Skip to content

Commit 65044c0

Browse files
Angular:
add fluent as default theme add theme switching
1 parent d031eb9 commit 65044c0

File tree

31 files changed

+285
-122
lines changed

31 files changed

+285
-122
lines changed

packages/devextreme-cli/src/templates/react/application/src/components/theme-switcher/ThemeSwitcher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const ThemeSwitcher = () => {
1313
<Button
1414
className='theme-button'
1515
stylingMode='text'
16-
icon={`${themeContext?.theme !== 'dark' ? 'sun' : 'moon'}`}
16+
icon={`${themeContext?.theme === 'dark' ? 'sun' : 'moon'}`}
1717
onClick={onButtonClick} />
1818
</div>;
1919
};

packages/devextreme-cli/src/templates/vue-v3/application/src/dx-styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $side-panel-min-width: 60px;
6868
}
6969

7070
.dx-theme-fluent {
71-
.dx-drawer-panel-content {
71+
.dx-drawer-panel-content .dx-overlay-content {
7272
box-shadow: 0 4px 4px 0 var(--shadow-color-first), 0 1px 2px 0 var(--shadow-color-second);
7373
}
7474
}

packages/devextreme-schematics/src/add-app-template/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"dxversion": {
4040
"type": "string",
4141
"description": "The DevExtreme version",
42-
"default": "24.1.4"
42+
"default": "~24.1.7"
4343
},
4444
"globalNgCliVersion": {
4545
"type":"string",

packages/devextreme-schematics/src/add-layout/files/devextreme.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,55 @@
88
"inputFile": "<%= sourcePath %>/themes/metadata.base.json",
99
"outputFile": "<%= sourcePath %>/themes/generated/theme.base.css"
1010
}
11-
}, {
11+
},
12+
{
13+
"command": "build-theme",
14+
"options": {
15+
"inputFile": "<%= sourcePath %>/themes/metadata.base.dark.json",
16+
"outputFile": "<%= sourcePath %>/themes/generated/theme.base.dark.css"
17+
}
18+
},
19+
{
1220
"command": "build-theme",
1321
"options": {
1422
"inputFile": "<%= sourcePath %>/themes/metadata.additional.json",
1523
"outputFile": "<%= sourcePath %>/themes/generated/theme.additional.css"
1624
}
1725
},
26+
{
27+
"command": "build-theme",
28+
"options": {
29+
"inputFile": "<%= sourcePath %>/themes/metadata.additional.dark.json",
30+
"outputFile": "<%= sourcePath %>/themes/generated/theme.additional.dark.css"
31+
}
32+
},
1833
{
1934
"command": "export-theme-vars",
2035
"options": {
2136
"inputFile": "<%= sourcePath %>/themes/metadata.base.json",
2237
"outputFile": "<%= sourcePath %>/themes/generated/variables.base.scss"
2338
}
2439
},
40+
{
41+
"command": "export-theme-vars",
42+
"options": {
43+
"inputFile": "<%= sourcePath %>/themes/metadata.base.dark.json",
44+
"outputFile": "<%= sourcePath %>/themes/generated/variables.base.dark.scss"
45+
}
46+
},
2547
{
2648
"command": "export-theme-vars",
2749
"options": {
2850
"inputFile": "<%= sourcePath %>/themes/metadata.additional.json",
2951
"outputFile": "<%= sourcePath %>/themes/generated/variables.additional.scss"
3052
}
53+
},
54+
{
55+
"command": "export-theme-vars",
56+
"options": {
57+
"inputFile": "<%= sourcePath %>/themes/metadata.additional.dark.json",
58+
"outputFile": "<%= sourcePath %>/themes/generated/variables.additional.dark.scss"
59+
}
3160
}
3261
]
3362
}

packages/devextreme-schematics/src/add-layout/files/src/app/__name__.component.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
:host {
2-
@import "../themes/generated/variables.base.scss";
3-
background-color: darken($base-bg, 5);
2+
background-color: var(--base-bg-darken-5);
43
display: flex;
54
height: 100%;
65
width: 100%;

packages/devextreme-schematics/src/add-layout/files/src/app/__name__.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { AuthService, ScreenService, AppInfoService } from './shared/services';
88
})
99
export class <%= strings.classify(name) %>Component {
1010
@HostBinding('class') get getClass() {
11-
return Object.keys(this.screen.sizes).filter(cl => this.screen.sizes[cl]).join(' ');
11+
const sizeClassName = Object.keys(this.screen.sizes).filter(cl => this.screen.sizes[cl]).join(' ');
12+
return `${sizeClassName} app` ;
1213
}
1314

1415
constructor(private authService: AuthService, private screen: ScreenService, public appInfo: AppInfoService) { }

packages/devextreme-schematics/src/add-layout/files/src/app/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.component.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
}
44

55
#navigation-header {
6-
@import "../../../themes/generated/variables.additional.scss";
76
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
87

98
:host-context(.screen-x-small) & {

packages/devextreme-schematics/src/add-layout/files/src/app/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
}
77

88
.layout-header {
9-
z-index: 1501;
9+
z-index: 1505;
1010
}

packages/devextreme-schematics/src/add-layout/files/src/app/layouts/single-card/single-card.component.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import "../../../themes/generated/variables.base.scss";
2-
31
:host {
42
width: 100%;
53
height: 100%;
@@ -26,14 +24,14 @@
2624
margin-bottom: 30px;
2725

2826
.title {
29-
color: $base-text-color;
27+
color: var(--base-text-color);
3028
line-height: 28px;
3129
font-weight: 500;
3230
font-size: 24px;
3331
}
3432

3533
.description {
36-
color: rgba($base-text-color, alpha($base-text-color) * 0.7);
34+
color: var(--base-text-color-alpha-7);
3735
line-height: 18px;
3836
}
3937
}

packages/devextreme-schematics/src/add-layout/files/src/app/shared/components/create-account-form/create-account-form.component.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
@import "../../../../themes/generated/variables.base.scss";
2-
31
.create-account-form {
42
.policy-info {
53
margin: 10px 0;
6-
color: rgba($base-text-color, alpha($base-text-color) * 0.7);
4+
color: var(--base-text-color-alpha-7);
75
font-size: 14px;
86
font-style: normal;
97

108
a {
11-
color: rgba($base-text-color, alpha($base-text-color) * 0.7);
9+
color: var(--base-text-color-alpha-7);
1210
}
1311
}
1412

1513
.login-link {
16-
color: $base-accent;
14+
color: var(--base-accent);
1715
font-size: 16px;
1816
text-align: center;
1917
}

0 commit comments

Comments
 (0)