Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b71050c
#7070 Integrate new Tokens into Creator
novikov82 Aug 6, 2025
1c0e03a
#7070 Integrate new Tokens into Creator
novikov82 Aug 7, 2025
0367832
#7070 - do not add dependency
novikov82 Aug 7, 2025
6d50b75
#7070 add theme.js for tests
novikov82 Aug 7, 2025
8ac4901
special haze #7070
novikov82 Aug 7, 2025
f39b1e5
text color #7070
novikov82 Aug 7, 2025
e21576a
#7070 patch theme
novikov82 Aug 8, 2025
e430f35
border color #7070
novikov82 Aug 8, 2025
3b85104
#7070 size tokens
novikov82 Aug 8, 2025
477dddf
Revert "#7070 size tokens"
novikov82 Aug 8, 2025
c4dd1c2
#7070 - fix build
novikov82 Aug 8, 2025
9a50bc5
#7070 set borter color for tests
novikov82 Aug 8, 2025
7180b74
#7070 - patch shadow, some hovers and backgrounds
novikov82 Aug 8, 2025
3d734af
#7070 color fixes
novikov82 Aug 11, 2025
d24f792
#7070 load default theme
novikov82 Aug 14, 2025
2418f35
#7070 rename colors and update test theme
novikov82 Aug 15, 2025
03d26d4
#7070 update test theme
novikov82 Aug 15, 2025
bca9b0f
#7070 Integrate new Tokens into Creator
novikov82 Sep 5, 2025
2e05285
fix test theme
novikov82 Sep 5, 2025
75ebb6e
fix default theme loading #7070
novikov82 Sep 5, 2025
904b518
#7070 - fixed scaling and tests
novikov82 Sep 5, 2025
ac45ced
#7070 fix dark theme
novikov82 Sep 11, 2025
35f3e7a
#7070 - fixed carry-forward font color
novikov82 Sep 11, 2025
c5aa7d1
#7070 - extract vars to constants
novikov82 Sep 11, 2025
2b8fa86
#7070 add shadow patch
novikov82 Sep 15, 2025
9ade8e3
#7070 update theme
novikov82 Sep 16, 2025
c46335e
#7070 - fix localization test file
novikov82 Sep 16, 2025
e7edd63
#7070 - fix legacy theme icons color
novikov82 Sep 16, 2025
251ebcc
#7070 - updated preact test files
novikov82 Sep 16, 2025
0771247
#7070 - vue/angular
novikov82 Sep 16, 2025
d4a0cb2
#7070 fix preact test files
novikov82 Sep 16, 2025
0b0b6cd
#7070 - fix angular/vue example build
novikov82 Sep 16, 2025
1507cc5
#7070 - update etalons
novikov82 Sep 16, 2025
e111e0f
Revert "#7070 - update etalons"
novikov82 Sep 17, 2025
ebd81ad
#7070 - correct etalons update
novikov82 Sep 17, 2025
d41e8e5
#7070 - apply theme in testcafe examples
novikov82 Sep 17, 2025
99a34c2
#7070 - fix lecacy theme
novikov82 Sep 17, 2025
850834f
#7070 - fixed legacy buttongroup color
novikov82 Sep 17, 2025
d4fefda
#7070 remove tokens repo reference
novikov82 Sep 17, 2025
0dd64d8
#7070 - apply theme after creator update
novikov82 Sep 17, 2025
5057c6e
#7070 - fixed legacy theme
novikov82 Sep 17, 2025
5788a3e
#7070 - update legacy screenshots
novikov82 Sep 17, 2025
37f2a24
Merge remote-tracking branch 'origin/master' into issue/7070-Integrat…
novikov82 Sep 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ screenshotLegacyTests/*.ts

junit.xml
packages/survey-creator-core/.vscode/launch.json
packages/survey-creator-core/src/themes/default.ts
packages/survey-creator-core/src/themes/default-contrast.ts
packages/survey-creator-core/src/themes/default-dark.ts
packages/survey-creator-core/src/themes/default-light.ts
packages/survey-creator-core/src/themes/index.ts
packages/survey-creator-core/src/themes/sc2020.ts

**/test-results/
**/playwright-report/
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, ViewEncapsulation } from "@angular/core";
import { SurveyCreatorModel } from "survey-creator-core";
import { TestDefaultComponent } from "./default.component";
import SurveyCreatorTestTheme from "survey-creator-core/themes/test";

@Component({
selector: "test-by-page",
Expand All @@ -14,5 +15,6 @@ export class TestByPageComponent extends TestDefaultComponent {
this.creator["animationEnabled"] = false;
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { SurveyCreatorModel } from "survey-creator-core";
import * as SurveyCreatorCore from "survey-creator-core";
import * as Survey from "survey-core";
import SurveyThemes from "survey-core/themes";
import SurveyCreatorTestTheme from "survey-creator-core/themes/test";
import "survey-core/survey.i18n";
import "survey-creator-core/survey-creator-core.i18n";
SurveyCreatorCore.registerSurveyTheme(SurveyThemes);

SurveyCreatorCore.registerCreatorTheme(SurveyCreatorTestTheme);
@Component({
selector: "test-default",
templateUrl: "./test.component.html",
Expand All @@ -28,6 +29,7 @@ export class TestDefaultComponent implements OnInit {
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.JSON = json;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
(<any>window).creator = this.creator;
});
};
Expand All @@ -43,5 +45,6 @@ export class TestDefaultComponent implements OnInit {
this.creator["animationEnabled"] = false;
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, ViewEncapsulation } from "@angular/core";
import { SurveyCreatorModel } from "survey-creator-core";
import { TestDefaultComponent } from "./default.component";
import SurveyCreatorTestTheme from "survey-creator-core/themes/test";
@Component({
selector: "test-dropdown-collapse",
templateUrl: "./test.component.html",
Expand All @@ -14,5 +15,6 @@ export class TestDropdownCollapseComponent extends TestDefaultComponent {
this.creator["animationEnabled"] = false;
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, ViewEncapsulation } from "@angular/core";
import { SurveyCreatorModel, localization } from "survey-creator-core";
import { TestDefaultComponent } from "./default.component";
import SurveyCreatorTestTheme from "survey-creator-core/themes/test";

@Component({
selector: "test-by-page",
Expand All @@ -17,5 +18,6 @@ export class TestLocalizationComponent extends TestDefaultComponent {
this.creator["animationEnabled"] = false;
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, ViewEncapsulation } from "@angular/core";
import { SurveyCreatorModel } from "survey-creator-core";
import { TestDefaultComponent } from "./default.component";
import SurveyCreatorTestTheme from "survey-creator-core/themes/test";
@Component({
selector: "test-theme-preview",
templateUrl: "./test.component.html",
Expand All @@ -17,5 +18,6 @@ export class NoLicenseComponent extends TestDefaultComponent {
this.creator["animationEnabled"] = false;
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, ViewEncapsulation } from "@angular/core";
import { SurveyCreatorModel } from "survey-creator-core";
import { TestDefaultComponent } from "./default.component";
import SurveyCreatorTestTheme from "survey-creator-core/themes/test";
@Component({
selector: "test-theme-preview",
templateUrl: "./test.component.html",
Expand All @@ -16,5 +17,6 @@ export class ThemeTabComponent extends TestDefaultComponent {
this.creator["animationEnabled"] = false;
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, ViewEncapsulation } from "@angular/core";
import { SurveyCreatorModel } from "survey-creator-core";
import { TestDefaultComponent } from "./default.component";
import SurveyCreatorTestTheme from "survey-creator-core/themes/test";
@Component({
selector: "test-theme-preview",
templateUrl: "./test.component.html",
Expand All @@ -17,5 +18,6 @@ export class ThemePreviewComponent extends TestDefaultComponent {
this.creator["animationEnabled"] = false;
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, ViewEncapsulation } from "@angular/core";
import { SurveyCreatorModel } from "survey-creator-core";
import { TestDefaultComponent } from "./default.component";
import SurveyCreatorTestTheme from "survey-creator-core/themes/test";

@Component({
selector: "test-theme-switcher",
Expand All @@ -13,5 +14,6 @@ export class TestThemeSwitcherComponent extends TestDefaultComponent {
this.creator = new SurveyCreatorModel({});
this.creator.showOneCategoryInPropertyGrid = false;
this.creator.allowZoom = false;
this.creator.applyCreatorTheme(SurveyCreatorTestTheme);
}
}
2 changes: 1 addition & 1 deletion packages/survey-creator-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"build": "webpack --env buildType=dev --env emitDeclarations --env emitStyles --env emitNonSourceFiles && webpack --env buildType=prod --env emitStyles && rollup -c",
"build:i18n": "webpack --config ./webpack.i18n.js --env buildType=dev && webpack --config ./webpack.i18n.js --env buildType=prod && rollup -c rollup.i18n.config.js",
"build:themes": "node creator-themes-import.js && webpack --config ./webpack.themes.config.js --env buildType=dev --env emitDeclarations && webpack --config ./webpack.themes.config.js --env buildType=prod && rollup -c rollup.themes.config.js",
"build:themes": "webpack --config ./webpack.themes.config.js --env buildType=dev --env emitDeclarations && webpack --config ./webpack.themes.config.js --env buildType=prod && rollup -c rollup.themes.config.js",
"build:all": "npm run build && npm run build:i18n && npm run build:themes",
"build:presets": "webpack --config ./webpack.presets.config.js --env buildType=dev --env emitDeclarations && webpack --config ./webpack.presets.config.js --env buildType=prod && rollup -c rollup.presets.config.js --bundleConfigAsCjs",
"test": "jest",
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-creator-core/src/components/creator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@use "../lbr-sizes.scss";
@use "../ctr-font-sizes.scss";
@use "../ctr-sizes.scss";
@use "../ctr-colors.scss";
@use "../ctr-base-units.scss";

survey-creator,
.svc-creator {
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-creator-core/src/components/question.scss
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ svc-question {
.svc-list__item {
&, &:hover {
& > .svc-list__item-body .sv-svg-icon use {
fill: var(--sjs-secondary-background-500, #19b394ff);
fill: var(--sjs-secondary-background-500, #FF9814);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ export class TabDesignerPlugin implements ICreatorPlugin {
}
private updatePredefinedColorChoices() {
this.themePropertyGrid.survey.getAllQuestions().forEach(question => {
if (question.name === "--sjs-special-background") {
if (question.name === CreatorThemeModel.varColorUtilitySurface) {
(question as any).choices = this.themeModel && this.themeModel.isLight ? getPredefinedBackgoundColorsChoices() : [];
}
if (question.name === "--sjs-primary-background-500" || question.name === "--sjs-secondary-background-500") {
if (question.name === CreatorThemeModel.varColorProjectBrand || question.name === CreatorThemeModel.varColorProjectAccent) {
(question as any).choices = getPredefinedColorsItemValues(this.themeModel.isLight === false ? "dark" : "light");
}
});
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-creator-core/src/creator-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import "./creator-theme/creator.scss";
import { DomDocumentHelper } from "./utils/global_variables_utils";
import { deprecate } from "util";
import { TabJsonEditorBasePlugin } from "./components/tabs/json-editor-plugin";
import Default from "./themes/default-light";

addIconsToThemeSet("v1", iconsV1);
addIconsToThemeSet("v2", iconsV2);
Expand Down Expand Up @@ -1663,6 +1664,7 @@ export class SurveyCreatorModel extends Base
SurveyHelper.warnText("Creator constructor has one parameter, as creator options, in V2.");
}
SvgRegistry.registerIcons(SvgThemeSets["v2"]);
this.applyCreatorTheme(Default);
this.previewDevice = options.previewDevice ?? "desktop";
this.previewOrientation = options.previewOrientation;
this.toolbarValue = new ToolbarActionContainer(this);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { ISurveyPropertiesDefinition, ISurveyPropertyGridDefinition } from "../question-editor/definition";
import { CreatorThemeModel } from "./creator-theme-model";

const creatorThemeModelProperties: ISurveyPropertiesDefinition = {
"creatortheme": {
properties: [
{ name: "themeName", index: 1 },
{ name: "--sjs-primary-background-500", index: 10, tab: "accentColors" },
{ name: "--sjs-secondary-background-500", index: 20, tab: "accentColors" },
{ name: "--sjs-special-background", index: 30, tab: "surfaceBackground" },
{ name: CreatorThemeModel.varColorProjectBrand, index: 10, tab: "accentColors" },
{ name: CreatorThemeModel.varColorProjectAccent, index: 20, tab: "accentColors" },
{ name: CreatorThemeModel.varColorUtilitySurface, index: 30, tab: "surfaceBackground" },
{ name: "fontScale", index: 40, tab: "scaling" },
{ name: "scale", index: 50, tab: "scaling" },
],
Expand Down
Loading