devextreme-cli 1.7.1 → 1.8.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/package.json +2 -2
  2. package/src/applications/application.angular.js +4 -8
  3. package/src/applications/application.react.js +2 -0
  4. package/src/applications/application.vue.js +2 -0
  5. package/src/commands.json +3 -6
  6. package/src/templates/react/application/devextreme.json +28 -0
  7. package/src/templates/react/application/src/App.tsx +11 -7
  8. package/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx +86 -86
  9. package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.scss +3 -3
  10. package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx +107 -107
  11. package/src/templates/react/application/src/components/footer/Footer.scss +7 -4
  12. package/src/templates/react/application/src/components/header/Header.scss +4 -5
  13. package/src/templates/react/application/src/components/header/Header.tsx +8 -12
  14. package/src/templates/react/application/src/components/login-form/LoginForm.scss +1 -1
  15. package/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.scss +1 -1
  16. package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.scss +49 -68
  17. package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx +5 -3
  18. package/src/templates/react/application/src/components/theme-switcher/ThemeSwitcher.tsx +20 -0
  19. package/src/templates/react/application/src/components/user-panel/UserPanel.scss +41 -53
  20. package/src/templates/react/application/src/components/user-panel/UserPanel.tsx +22 -25
  21. package/src/templates/react/application/src/dx-styles.scss +63 -67
  22. package/src/templates/react/application/src/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.scss +1 -6
  23. package/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.scss +3 -3
  24. package/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.tsx +2 -2
  25. package/src/templates/react/application/src/layouts/single-card/single-card.scss +4 -2
  26. package/src/templates/react/application/src/theme.tsx +51 -0
  27. package/src/templates/react/application/src/themes/metadata.additional.dark.json +11 -0
  28. package/src/templates/react/application/src/themes/metadata.additional.json +1 -1
  29. package/src/templates/react/application/src/themes/metadata.base.dark.json +8 -0
  30. package/src/templates/react/application/src/themes/metadata.base.json +1 -1
  31. package/src/templates/react/application/src/variables.scss +37 -0
  32. package/src/templates/react/page/page.tsx +1 -1
  33. package/src/templates/react/sample-pages/home/home.scss +20 -15
  34. package/src/templates/react/sample-pages/home/home.tsx +50 -4
  35. package/src/templates/react/sample-pages/profile/profile.tsx +1 -1
  36. package/src/templates/react/sample-pages/tasks/tasks.scss +3 -0
  37. package/src/templates/react/sample-pages/tasks/tasks.tsx +3 -2
  38. package/src/templates/vue-v3/application/devextreme.json +28 -0
  39. package/src/templates/vue-v3/application/src/App.vue +1 -5
  40. package/src/templates/vue-v3/application/src/components/app-footer.vue +7 -4
  41. package/src/templates/vue-v3/application/src/components/header-toolbar.vue +23 -30
  42. package/src/templates/vue-v3/application/src/components/side-nav-menu.vue +63 -73
  43. package/src/templates/vue-v3/application/src/components/theme-switcher.vue +19 -0
  44. package/src/templates/vue-v3/application/src/components/user-panel.vue +61 -81
  45. package/src/templates/vue-v3/application/src/dx-styles.scss +66 -51
  46. package/src/templates/vue-v3/application/src/layouts/side-nav-inner-toolbar.vue +4 -7
  47. package/src/templates/vue-v3/application/src/layouts/side-nav-outer-toolbar.vue +4 -2
  48. package/src/templates/vue-v3/application/src/layouts/single-card.vue +2 -4
  49. package/src/templates/vue-v3/application/src/theme-service.js +40 -0
  50. package/src/templates/vue-v3/application/src/themes/metadata.additional.dark.json +11 -0
  51. package/src/templates/vue-v3/application/src/themes/metadata.additional.json +1 -1
  52. package/src/templates/vue-v3/application/src/themes/metadata.base.dark.json +8 -0
  53. package/src/templates/vue-v3/application/src/themes/metadata.base.json +1 -1
  54. package/src/templates/vue-v3/application/src/variables.scss +37 -0
  55. package/src/templates/vue-v3/application/src/views/create-account-form.vue +5 -7
  56. package/src/templates/vue-v3/application/src/views/login-form.vue +1 -3
  57. package/src/templates/vue-v3/application/src/views/reset-password-form.vue +2 -4
  58. package/src/templates/vue-v3/page/page.vue +1 -1
  59. package/src/templates/vue-v3/sample-pages/home-page.vue +86 -45
  60. package/src/templates/vue-v3/sample-pages/profile-page.vue +1 -1
  61. package/src/templates/vue-v3/sample-pages/tasks-page.vue +7 -2
  62. package/src/utility/latest-versions.js +3 -3
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="dx-swatch-additional side-navigation-menu"
3
+ :class="[swatchClassName, 'side-navigation-menu']"
4
4
  @click="forwardClick"
5
5
  >
6
6
  <slot />
@@ -25,6 +25,7 @@ import { sizes } from '../utils/media-query';
25
25
  import navigation from '../app-navigation';
26
26
  import { onMounted, ref, watch } from 'vue';
27
27
  import { useRoute, useRouter } from 'vue-router';
28
+ import { themeService } from '../theme-service';
28
29
 
29
30
  export default {
30
31
  props: {
@@ -43,6 +44,7 @@ export default {
43
44
  });
44
45
 
45
46
  const treeViewRef = ref(null);
47
+ const swatchClassName = ref('');
46
48
 
47
49
  function forwardClick (...args) {
48
50
  context.emit("click", args);
@@ -82,6 +84,14 @@ export default {
82
84
  }
83
85
  );
84
86
 
87
+ watch(
88
+ () => themeService.isDark,
89
+ () => {
90
+ swatchClassName.value = themeService.isDark.value ? 'dx-swatch-additional-dark' : 'dx-swatch-additional';
91
+ },
92
+ { immediate: true }
93
+ );
94
+
85
95
  watch(
86
96
  () => props.compactMode,
87
97
  () => {
@@ -98,7 +108,8 @@ export default {
98
108
  items,
99
109
  forwardClick,
100
110
  handleItemClick,
101
- updateSelection
111
+ updateSelection,
112
+ swatchClassName,
102
113
  };
103
114
  },
104
115
  components: {
@@ -108,97 +119,76 @@ export default {
108
119
  </script>
109
120
 
110
121
  <style lang="scss">
122
+ @import "../variables.scss";
111
123
  @import "../dx-styles.scss";
112
- @import "../themes/generated/variables.additional.scss";
113
-
114
- .side-navigation-menu {
115
- display: flex;
116
- flex-direction: column;
117
- min-height: 100%;
118
- height: 100%;
119
- width: 250px !important;
120
124
 
121
- .menu-container {
122
- min-height: 100%;
125
+ .dx-swatch-additional, .dx-swatch-additional-dark {
126
+ &.side-navigation-menu {
123
127
  display: flex;
124
- flex: 1;
125
-
126
- .dx-treeview {
127
- // ## Long text positioning
128
- white-space: nowrap;
129
- // ##
128
+ flex-direction: column;
129
+ min-height: 100%;
130
+ height: 100%;
131
+ width: 250px !important;
132
+ background-color: var(--base-bg);
133
+
134
+ .menu-container {
135
+ min-height: 100%;
136
+ display: flex;
137
+ flex: 1;
138
+
139
+ .dx-treeview {
140
+ // ## Long text positioning
141
+ white-space: nowrap;
142
+ // ##
143
+
144
+ .dx-treeview-node-container:empty {
145
+ display: none;
146
+ }
130
147
 
131
- // ## Icon width customization
132
- .dx-treeview-item {
133
- padding-left: 0;
134
- flex-direction: row-reverse;
148
+ // ## Icon width customization
149
+ .dx-treeview-item {
150
+ padding-left: 0;
151
+ border-radius: 0;
152
+ flex-direction: row-reverse;
135
153
 
136
- .dx-icon {
137
- width: $side-panel-min-width !important;
138
- margin: 0 !important;
154
+ .dx-icon {
155
+ width: $side-panel-min-width !important;
156
+ margin: 0 !important;
157
+ }
139
158
  }
140
- }
141
- // ##
142
-
143
- // ## Arrow customization
144
- .dx-treeview-node {
145
- padding: 0 0 !important;
146
- }
147
159
 
148
- .dx-treeview-toggle-item-visibility {
149
- right: 10px;
150
- left: auto;
151
- }
160
+ // ##
152
161
 
153
- .dx-rtl .dx-treeview-toggle-item-visibility {
154
- left: 10px;
155
- right: auto;
156
- }
157
- // ##
162
+ // ## Arrow customization
163
+ .dx-treeview-node {
164
+ padding: 0 0 !important;
165
+ }
158
166
 
159
- // ## Item levels customization
160
- .dx-treeview-node {
161
- &[aria-level="1"] {
162
- font-weight: bold;
163
- border-bottom: 1px solid $base-border-color;
167
+ .dx-treeview-toggle-item-visibility {
168
+ right: 10px;
169
+ left: auto;
164
170
  }
165
171
 
166
- &[aria-level="2"] .dx-treeview-item-content {
167
- font-weight: normal;
168
- padding: 0 $side-panel-min-width;
172
+ .dx-rtl .dx-treeview-toggle-item-visibility {
173
+ left: 10px;
174
+ right: auto;
169
175
  }
170
- }
171
- // ##
172
- }
176
+ // ##
173
177
 
174
- // ## Selected & Focuced items customization
175
- .dx-treeview {
176
- .dx-treeview-node-container {
178
+ // ## Item levels customization
177
179
  .dx-treeview-node {
178
- &.dx-state-selected:not(.dx-state-focused) > .dx-treeview-item {
179
- background: transparent;
180
- }
181
-
182
- &.dx-state-selected > .dx-treeview-item * {
183
- color: $base-accent;
180
+ &[aria-level="1"] {
181
+ font-weight: bold;
184
182
  }
185
183
 
186
- &:not(.dx-state-focused) > .dx-treeview-item.dx-state-hover {
187
- background-color: lighten($base-bg, 4);
184
+ &[aria-level="2"] .dx-treeview-item-content {
185
+ font-weight: normal;
186
+ padding: 0 $side-panel-min-width;
188
187
  }
189
188
  }
189
+ // ##
190
190
  }
191
191
  }
192
-
193
- .dx-theme-generic .dx-treeview {
194
- .dx-treeview-node-container
195
- .dx-treeview-node.dx-state-selected.dx-state-focused
196
- > .dx-treeview-item
197
- * {
198
- color: inherit;
199
- }
200
- }
201
- // ##
202
192
  }
203
193
  }
204
194
  </style>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <dx-button
3
+ class="theme-button"
4
+ styling-mode="text"
5
+ :icon="currentTheme === 'dark' ? 'sun' : 'moon'"
6
+ @click="onClickButton"
7
+ />
8
+ </template>
9
+
10
+ <script setup>
11
+ import { DxButton } from 'devextreme-vue/button';
12
+ import { themeService } from '../theme-service';
13
+
14
+ const currentTheme = themeService.currentTheme;
15
+
16
+ function onClickButton() {
17
+ themeService.switchAppTheme();
18
+ }
19
+ </script>
@@ -1,114 +1,94 @@
1
1
  <template>
2
2
  <div class="user-panel">
3
- <div class="user-info">
4
- <div class="image-container">
5
- <div class="user-image" />
6
- </div>
7
- <div class="user-name">{{email}}</div>
8
- </div>
9
-
10
- <dx-context-menu
11
- v-if="menuMode === 'context'"
12
- target=".user-button"
3
+ <dx-drop-down-button
4
+ v-if="menuMode !== 'list'"
5
+ stylingMode="text"
6
+ :icon="'https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/06.png'"
7
+ :showArrowIcon="false"
13
8
  :items="menuItems"
14
- :width="210"
15
- show-event="dxclick"
16
- css-class="user-menu"
17
- >
18
- <dx-position my="top center" at="bottom center" />
19
- </dx-context-menu>
20
-
9
+ displayExpr="text"
10
+ keyExpr="id"
11
+ :elementAttr="{
12
+ class: 'user-button'
13
+ }"
14
+ :dropDownOptions="{
15
+ width: '150px'
16
+ }"
17
+ />
21
18
  <dx-list
22
19
  v-if="menuMode === 'list'"
23
- class="dx-toolbar-menu-action"
24
20
  :items="menuItems"
21
+ displayExpr="text"
22
+ keyExpr="id"
23
+ width="130"
25
24
  />
26
25
  </div>
27
26
  </template>
28
27
 
29
28
  <script>
30
- import DxContextMenu, { DxPosition } from "devextreme-vue/context-menu";
31
- import DxList from "devextreme-vue/list";
29
+ import { DxDropDownButton, DxList } from 'devextreme-vue';
32
30
 
33
31
  export default {
34
32
  props: {
35
- menuMode: String,
36
33
  menuItems: Array,
37
- email: String
34
+ menuMode: String,
38
35
  },
39
36
  components: {
40
- DxContextMenu,
41
- DxPosition,
42
- DxList
37
+ DxDropDownButton,
38
+ DxList,
43
39
  }
44
40
  };
45
41
  </script>
46
-
47
42
  <style lang="scss">
48
- @import "../themes/generated/variables.base.scss";
43
+ .app .header-toolbar .user-panel .user-button.dx-dropdownbutton img.dx-icon {
44
+ height: 100%;
45
+ width: auto;
49
46
 
50
- .user-info {
51
- display: flex;
52
- align-items: center;
53
-
54
- .dx-toolbar-menu-section & {
55
- padding: 10px 6px;
56
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
47
+ .dx-theme-generic & {
48
+ max-height: 32px;
57
49
  }
50
+ }
58
51
 
59
- .image-container {
60
- overflow: hidden;
61
- border-radius: 50%;
62
- height: 30px;
63
- width: 30px;
64
- margin: 0 4px;
65
- border: 1px solid rgba(0, 0, 0, 0.1);
66
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
52
+ .user-panel {
53
+ display: flex;
54
+ flex-direction: column;
55
+
56
+ .user-button.dx-dropdownbutton {
57
+ margin-left: 5px;
67
58
 
68
- .user-image {
69
- width: 100%;
70
- height: 100%;
71
- background: url("https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/06.png")
72
- no-repeat #fff;
73
- background-size: cover;
59
+ img.dx-icon {
60
+ border-radius: 50%;
61
+ margin: 0;
62
+ width: auto;
63
+ aspect-ratio: 1 / 1;
64
+ box-sizing: border-box;
65
+ border: 1px solid var(--dx-color-border);
66
+ object-fit: cover;
67
+ object-position: top;
68
+ background: rgb(255, 255, 255);
69
+ background-clip: padding-box;
74
70
  }
75
- }
76
71
 
77
- .user-name {
78
- font-size: 14px;
79
- color: $base-text-color;
80
- margin: 0 9px;
81
- }
82
- }
83
72
 
84
- .user-panel {
85
- .dx-list-item .dx-icon {
86
- vertical-align: middle;
87
- color: $base-text-color;
88
- margin-right: 16px;
89
- }
90
- .dx-rtl .dx-list-item .dx-icon {
91
- margin-right: 0;
92
- margin-left: 16px;
93
- }
94
- }
95
73
 
96
- .dx-context-menu.user-menu.dx-menu-base {
97
- &.dx-rtl {
98
- .dx-submenu .dx-menu-items-container .dx-icon {
99
- margin-left: 16px;
74
+ .dx-buttongroup {
75
+ vertical-align: middle;
76
+
77
+ .dx-button.dx-button-has-icon:not(.dx-button-has-text) {
78
+ .dx-button-content {
79
+ padding: 0;
80
+ }
81
+
82
+ &.dx-state-hover,
83
+ &.dx-state-focused {
84
+ background-color: transparent;
85
+
86
+ img.dx-icon {
87
+ border-color: var(--dx-color-primary);
88
+ }
89
+ }
90
+ }
100
91
  }
101
92
  }
102
- .dx-submenu .dx-menu-items-container .dx-icon {
103
- margin-right: 16px;
104
- }
105
- .dx-menu-item .dx-menu-item-content {
106
- padding: 3px 15px 4px;
107
- }
108
- }
109
-
110
- .dx-theme-generic .user-menu .dx-menu-item-content .dx-menu-item-text {
111
- padding-left: 4px;
112
- padding-right: 4px;
113
93
  }
114
94
  </style>
@@ -1,69 +1,84 @@
1
- .content {
2
- line-height: 1.5;
3
- flex-grow: 1;
1
+ $side-panel-min-width: 60px;
4
2
 
5
- h2 {
6
- font-size: 30px;
7
- margin-top: 20px;
8
- margin-bottom: 20px;
3
+ .dx-viewport {
4
+ .dx-popup-wrapper {
5
+ z-index: 1510 !important;
9
6
  }
10
- }
11
7
 
12
- .container {
13
- height: 100%;
14
- flex-direction: column;
15
- display: flex;
16
- }
8
+ .content {
9
+ line-height: 1.5;
10
+ flex-grow: 1;
11
+ padding: 20px 40px;
17
12
 
18
- .layout-body {
19
- flex: 1;
20
- min-height: 0;
21
- }
13
+ h2 {
14
+ font-size: 32px;
15
+ margin: 0;
16
+ line-height: 40px;
17
+ }
22
18
 
23
- .side-nav-outer-toolbar .dx-drawer {
24
- height: calc(100% - 56px)
25
- }
19
+ .screen-x-small & {
20
+ padding: 20px;
21
+ }
22
+ }
26
23
 
27
- .content-block {
28
- margin-left: 40px;
29
- margin-right: 40px;
30
- margin-top: 20px;
24
+ .container {
25
+ height: 100%;
26
+ flex-direction: column;
27
+ display: flex;
28
+ }
31
29
 
32
- .screen-x-small & {
33
- margin-left: 20px;
34
- margin-right: 20px;
30
+ .layout-body {
31
+ flex: 1;
32
+ min-height: 0;
33
+ }
34
+
35
+ .side-nav-outer-toolbar .dx-drawer {
36
+ height: calc(100% - 56px)
35
37
  }
36
- }
37
38
 
38
- .responsive-paddings {
39
- padding: 20px;
39
+ .content-block {
40
+ margin-top: 20px;
41
+ }
40
42
 
41
- .screen-large & {
42
- padding: 40px;
43
+ .responsive-paddings {
44
+ padding: 20px;
45
+
46
+ .screen-large & {
47
+ padding: 40px;
48
+ }
43
49
  }
44
- }
45
50
 
46
- .dx-card.wide-card {
47
- border-radius: 0;
48
- margin-left: 0;
49
- margin-right: 0;
50
- border-right: 0;
51
- border-left: 0;
52
- }
51
+ .dx-card.wide-card {
52
+ border-radius: 0;
53
+ margin-left: 0;
54
+ margin-right: 0;
55
+ border-right: 0;
56
+ border-left: 0;
57
+ }
53
58
 
54
- .with-footer > .dx-scrollable-wrapper >
55
- .dx-scrollable-container > .dx-scrollable-content {
56
- height: 100%;
59
+ .with-footer > .dx-scrollable-wrapper >
60
+ .dx-scrollable-container > .dx-scrollable-content {
61
+ height: 100%;
57
62
 
58
- & > .dx-scrollview-content {
59
- display: flex;
60
- flex-direction: column;
61
- min-height: 100%;
63
+ & > .dx-scrollview-content {
64
+ display: flex;
65
+ flex-direction: column;
66
+ min-height: 100%;
67
+ }
68
+ }
69
+
70
+ #app {
71
+ background-color: var(--base-bg-darken-5);
72
+ height: 100%;
62
73
  }
63
74
  }
64
75
 
65
- #app {
66
- height: 100%;
67
- }
76
+ .dx-theme-fluent {
77
+ .dx-drawer-wrapper {
78
+ .dx-drawer-panel-content,
79
+ .dx-overlay-content {
80
+ box-shadow: 0 4px 4px 0 var(--shadow-color-first), 0 1px 2px 0 var(--shadow-color-second);
81
+ }
82
+ }
83
+ }
68
84
 
69
- $side-panel-min-width: 60px;
@@ -18,7 +18,9 @@
18
18
  :toggle-menu-func="toggleMenu"
19
19
  />
20
20
  <dx-scroll-view ref="scrollViewRef" class="layout-body with-footer">
21
- <slot />
21
+ <div class="content">
22
+ <slot />
23
+ </div>
22
24
  <slot name="footer" />
23
25
  </dx-scroll-view>
24
26
  </div>
@@ -157,13 +159,8 @@ export default {
157
159
  }
158
160
 
159
161
  #navigation-header {
160
- @import "../themes/generated/variables.additional.scss";
161
- background-color: $base-accent;
162
162
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
163
-
164
- .menu-button .dx-icon {
165
- color: $base-text-color;
166
- }
163
+ background-color: var(--base-bg);
167
164
 
168
165
  .screen-x-small & {
169
166
  padding-left: 20px;
@@ -19,7 +19,9 @@
19
19
  :close-on-outside-click="drawerOptions.closeOnOutsideClick"
20
20
  >
21
21
  <dx-scroll-view ref="scrollViewRef" class="with-footer">
22
- <slot />
22
+ <div class="content">
23
+ <slot />
24
+ </div>
23
25
  <slot name="footer" />
24
26
  </dx-scroll-view>
25
27
  <template #menuTemplate>
@@ -130,6 +132,6 @@ export default {
130
132
  }
131
133
 
132
134
  .layout-header {
133
- z-index: 1501;
135
+ z-index: 1505;
134
136
  }
135
137
  </style>
@@ -41,8 +41,6 @@ export default {
41
41
  </script>
42
42
 
43
43
  <style lang="scss">
44
- @import "../themes/generated/variables.base.scss";
45
-
46
44
  .single-card {
47
45
  width: 100%;
48
46
  height: 100%;
@@ -67,14 +65,14 @@ export default {
67
65
  margin-bottom: 30px;
68
66
 
69
67
  .title {
70
- color: $base-text-color;
68
+ color: var(--base-text-color);
71
69
  line-height: 28px;
72
70
  font-weight: 500;
73
71
  font-size: 24px;
74
72
  }
75
73
 
76
74
  .description {
77
- color: rgba($base-text-color, alpha($base-text-color) * 0.7);
75
+ color: var(--base-text-color-alpha-7);
78
76
  line-height: 18px;
79
77
  }
80
78
  }
@@ -0,0 +1,40 @@
1
+ import { ref } from 'vue';
2
+
3
+ class ThemeService {
4
+ themes = ['light', 'dark']
5
+ themeClassNamePrefix = 'dx-swatch-';
6
+ currentTheme = ref('');
7
+ isDark = ref(false);
8
+
9
+ constructor() {
10
+ if (!document.body.className.includes(this.themeClassNamePrefix)) {
11
+ this.currentTheme.value = this.themes[0];
12
+
13
+ document.body.classList.add(this.themeClassNamePrefix + this.currentTheme.value);
14
+ }
15
+ }
16
+
17
+ switchAppTheme() {
18
+ const prevTheme = this.currentTheme.value;
19
+ const isCurrentThemeDark = prevTheme === 'dark';
20
+
21
+ this.currentTheme.value = this.themes[prevTheme === this.themes[0] ? 1 : 0];
22
+
23
+ document.body.classList.replace(
24
+ this.themeClassNamePrefix + prevTheme,
25
+ this.themeClassNamePrefix + this.currentTheme.value
26
+ );
27
+
28
+ const additionalClassNamePrefix = this.themeClassNamePrefix + 'additional';
29
+ const additionalClassNamePostfix = isCurrentThemeDark ? '-' + prevTheme : '';
30
+ const additionalClassName = `${additionalClassNamePrefix}${additionalClassNamePostfix}`
31
+
32
+ document.body
33
+ .querySelector(`.${additionalClassName}`)?.classList
34
+ .replace(additionalClassName, additionalClassNamePrefix + (isCurrentThemeDark ? '' : '-dark'));
35
+
36
+ this.isDark.value = this.currentTheme.value === 'dark';
37
+ }
38
+ }
39
+
40
+ export const themeService = new ThemeService();
@@ -0,0 +1,11 @@
1
+ {
2
+ "items": [],
3
+ "baseTheme": "fluent.blue.dark",
4
+ "assetsBasePath": "../../../node_modules/devextreme/dist/css/",
5
+ "outputColorScheme": "additional-dark",
6
+ "makeSwatch": true,
7
+ "base": true,
8
+ "widgets": [
9
+ "treeview"
10
+ ]
11
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "items": [],
3
- "baseTheme": "material.orange.dark",
3
+ "baseTheme": "fluent.blue.light",
4
4
  "assetsBasePath": "../../../node_modules/devextreme/dist/css/",
5
5
  "outputColorScheme": "additional",
6
6
  "makeSwatch": true,
@@ -0,0 +1,8 @@
1
+ {
2
+ "items": [],
3
+ "baseTheme": "fluent.blue.dark",
4
+ "assetsBasePath": "../../../node_modules/devextreme/dist/css/",
5
+ "outputColorScheme": "dark",
6
+ "base": true,
7
+ "makeSwatch": true
8
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "items": [],
3
- "baseTheme": "material.orange.light",
3
+ "baseTheme": "fluent.blue.light",
4
4
  "assetsBasePath": "../../../node_modules/devextreme/dist/css/",
5
5
  "outputColorScheme": "base",
6
6
  "base": true