@delon/theme 17.3.1 → 18.0.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 (79) hide show
  1. package/esm2022/layout-default/layout-header-item-trigger.directive.mjs +3 -3
  2. package/esm2022/layout-default/layout-header-item.component.mjs +3 -3
  3. package/esm2022/layout-default/layout-header.component.mjs +3 -3
  4. package/esm2022/layout-default/layout-nav.component.mjs +7 -7
  5. package/esm2022/layout-default/layout-top-menu-item.mjs +3 -3
  6. package/esm2022/layout-default/layout.component.mjs +3 -3
  7. package/esm2022/layout-default/layout.module.mjs +4 -4
  8. package/esm2022/layout-default/layout.service.mjs +3 -3
  9. package/esm2022/setting-drawer/setting-drawer-item.component.mjs +3 -3
  10. package/esm2022/setting-drawer/setting-drawer.component.mjs +7 -7
  11. package/esm2022/setting-drawer/setting-drawer.module.mjs +4 -4
  12. package/esm2022/src/locale/languages/ar-SA.mjs +83 -0
  13. package/esm2022/src/locale/locale.module.mjs +4 -4
  14. package/esm2022/src/locale/locale.service.mjs +3 -3
  15. package/esm2022/src/locale/public_api.mjs +2 -1
  16. package/esm2022/src/pipes/date/date.pipe.mjs +3 -3
  17. package/esm2022/src/pipes/keys/keys.pipe.mjs +3 -3
  18. package/esm2022/src/pipes/safe/html.pipe.mjs +3 -3
  19. package/esm2022/src/pipes/safe/url.pipe.mjs +3 -3
  20. package/esm2022/src/pipes/yn/yn.pipe.mjs +3 -3
  21. package/esm2022/src/services/drawer/drawer.helper.mjs +3 -3
  22. package/esm2022/src/services/http/http.client.mjs +4 -4
  23. package/esm2022/src/services/http/http.decorator.mjs +3 -3
  24. package/esm2022/src/services/i18n/i18n-url.guard.mjs +3 -3
  25. package/esm2022/src/services/i18n/i18n.mjs +6 -6
  26. package/esm2022/src/services/i18n/i18n.pipe.mjs +3 -3
  27. package/esm2022/src/services/menu/menu.service.mjs +10 -10
  28. package/esm2022/src/services/modal/modal.helper.mjs +3 -3
  29. package/esm2022/src/services/responsive/responsive.mjs +3 -3
  30. package/esm2022/src/services/rtl/rtl.service.mjs +3 -3
  31. package/esm2022/src/services/settings/settings.service.mjs +3 -3
  32. package/esm2022/src/services/title/title.service.mjs +9 -9
  33. package/esm2022/src/theme.module.mjs +4 -4
  34. package/esm2022/src/version.mjs +1 -1
  35. package/esm2022/theme-btn/theme-btn.component.mjs +7 -7
  36. package/esm2022/theme-btn/theme-btn.module.mjs +4 -4
  37. package/fesm2022/layout-default.mjs +28 -28
  38. package/fesm2022/layout-default.mjs.map +1 -1
  39. package/fesm2022/setting-drawer.mjs +13 -13
  40. package/fesm2022/setting-drawer.mjs.map +1 -1
  41. package/fesm2022/theme-btn.mjs +10 -10
  42. package/fesm2022/theme-btn.mjs.map +1 -1
  43. package/fesm2022/theme.mjs +161 -78
  44. package/fesm2022/theme.mjs.map +1 -1
  45. package/layout-blank/style/index.less +0 -1
  46. package/layout-blank/style/theme-default.less +5 -2
  47. package/layout-blank/style/theme-variable.less +1 -0
  48. package/layout-default/style/_layout.less +7 -3
  49. package/layout-default/style/fix/_reuse-tab.less +3 -2
  50. package/layout-default/style/index.less +0 -1
  51. package/layout-default/style/theme-dark.less +1 -1
  52. package/layout-default/style/theme-default.less +8 -7
  53. package/layout-default/style/theme-variable.less +1 -0
  54. package/mixins.less +2 -0
  55. package/package.json +6 -6
  56. package/src/locale/languages/ar-SA.d.ts +3 -0
  57. package/src/locale/public_api.d.ts +1 -0
  58. package/src/services/http/http.client.d.ts +1 -1
  59. package/system/entry.less +0 -2
  60. package/system/index.less +6 -3
  61. package/system/mixins/_freak.js +49 -0
  62. package/system/mixins/_freak.less +1 -57
  63. package/system/theme-default.less +14 -22
  64. package/system/theme-variable.less +34 -0
  65. package/system/utils/_border.less +27 -14
  66. package/system/utils/_color.less +71 -38
  67. package/system/utils/_spacing.less +25 -10
  68. package/system/utils/_width.less +9 -6
  69. package/theme-compact.less +1 -0
  70. package/theme-dark.less +1 -0
  71. package/theme-default.less +1 -0
  72. package/theme-variable.less +6 -0
  73. package/variable.less +6 -0
  74. package/compact.css +0 -34492
  75. package/compact.min.css +0 -1
  76. package/dark.css +0 -35056
  77. package/dark.min.css +0 -1
  78. package/default.css +0 -34493
  79. package/default.min.css +0 -1
@@ -6,6 +6,7 @@
6
6
  .bg-white {
7
7
  background-color: #fff !important;
8
8
  }
9
+
9
10
  /**
10
11
  * Set the background to transparent
11
12
  *
@@ -14,6 +15,7 @@
14
15
  .bg-transparent {
15
16
  background-color: transparent !important;
16
17
  }
18
+
17
19
  /**
18
20
  * Set the text to white
19
21
  *
@@ -22,6 +24,7 @@
22
24
  .text-white {
23
25
  color: #fff !important;
24
26
  }
27
+
25
28
  /**
26
29
  * Set the color as the primary color when hovering the text
27
30
  *
@@ -29,6 +32,7 @@
29
32
  */
30
33
  .text-hover {
31
34
  cursor: pointer;
35
+
32
36
  &:hover {
33
37
  color: @primary-color !important;
34
38
  }
@@ -37,92 +41,112 @@
37
41
  .for-each(@colors, {
38
42
  .bg-@{adKey}-light {
39
43
  @color-bg-light-color: extract(@adItem, @color-light-position);
40
- e(~`genCommentTypeColor('background', '@{color-bg-light-color}')`);
44
+ genCommentTypeColor('background', '@{color-bg-light-color}');
41
45
  background-color: @color-bg-light-color !important;
42
46
  }
47
+
43
48
  .bg-@{adKey} {
44
49
  @color-bg-color: extract(@adItem, @color-basic-position);
45
- e(~`genCommentTypeColor('background', '@{color-bg-color}')`);
50
+ genCommentTypeColor('background', '@{color-bg-color}');
46
51
  background-color: @color-bg-color !important;
47
52
  }
53
+
48
54
  .bg-@{adKey}-dark {
49
55
  @color-bg-dark-color: extract(@adItem, @color-dark-position);
50
- e(~`genCommentTypeColor('background', '@{color-bg-dark-color}')`);
56
+ genCommentTypeColor('background', '@{color-bg-dark-color}');
51
57
  background-color: @color-bg-dark-color !important;
52
58
  }
53
59
 
54
60
  .bg-@{adKey}-light-h {
55
61
  @color-bg-light-h-color: extract(@adItem, @color-light-position);
56
- e(~`genCommentTypeColor('hoverBackground', '@{color-bg-light-h-color}')`);
62
+ genCommentTypeColor('hoverBackground', '@{color-bg-light-h-color}');
57
63
  transition: background-color 300ms;
58
- &:hover { background-color: @color-bg-light-h-color !important; }
64
+
65
+ &:hover {
66
+ background-color: @color-bg-light-h-color !important;
67
+ }
59
68
  }
69
+
60
70
  .bg-@{adKey}-h {
61
71
  @color-bg-basic-h-color: extract(@adItem, @color-basic-position);
62
- e(~`genCommentTypeColor('hoverBackground', '@{color-bg-basic-h-color}')`);
72
+ genCommentTypeColor('hoverBackground', '@{color-bg-basic-h-color}');
63
73
  transition: background-color 300ms;
64
- &:hover { background-color: @color-bg-basic-h-color !important; }
74
+
75
+ &:hover {
76
+ background-color: @color-bg-basic-h-color !important;
77
+ }
65
78
  }
79
+
66
80
  .bg-@{adKey}-dark-h {
67
81
  @color-bg-dark-h-color: extract(@adItem, @color-dark-position);
68
- e(~`genCommentTypeColor('hoverBackground', '@{color-bg-dark-h-color}')`);
82
+ genCommentTypeColor('hoverBackground', '@{color-bg-dark-h-color}');
69
83
  transition: background-color 300ms;
70
- &:hover { background-color: @color-bg-dark-h-color !important; }
84
+
85
+ &:hover {
86
+ background-color: @color-bg-dark-h-color !important;
87
+ }
71
88
  }
72
89
 
73
90
  .text-@{adKey}-light {
74
91
  @color-text-light-color: extract(@adItem, @color-light-position);
75
- e(~`genCommentTypeColor('text', '@{color-text-light-color}')`);
92
+ genCommentTypeColor('text', '@{color-text-light-color}');
76
93
  color: @color-text-light-color !important;
77
94
  }
95
+
78
96
  .text-@{adKey} {
79
97
  @color-text-basic-color: extract(@adItem, @color-basic-position);
80
- e(~`genCommentTypeColor('text', '@{color-text-basic-color}')`);
98
+ genCommentTypeColor('text', '@{color-text-basic-color}');
81
99
  color: @color-text-basic-color !important;
82
100
  }
101
+
83
102
  .text-@{adKey}-dark {
84
103
  @color-text-dark-color: extract(@adItem, @color-dark-position);
85
- e(~`genCommentTypeColor('text', '@{color-text-dark-color}')`);
104
+ genCommentTypeColor('text', '@{color-text-dark-color}');
86
105
  color: @color-text-dark-color !important;
87
106
  }
88
107
  });
89
108
 
90
109
  .for-each(@aliasColors, {
91
- .bg-@{adKey}-light {
92
- @alias-bg-light-color: color(~`colorPalette('@{adValue}', @{color-light-index})`);
93
- e(~`genCommentTypeColor('background', '@{alias-bg-light-color}')`);
110
+ .bg-@{adKey}-light {
111
+ @alias-bg-light-color: color(colorPalette('@{adValue}', @color-light-index));
112
+ genCommentTypeColor('background', '@{alias-bg-light-color}');
94
113
  background-color: @alias-bg-light-color !important;
95
114
  }
115
+
96
116
  .bg-@{adKey} {
97
- e(~`genCommentTypeColor('background', '@{adValue}')`);
117
+ genCommentTypeColor('background', '@{adValue}');
98
118
  background-color: @adValue !important;
99
119
  }
100
- .bg-@{adKey}-dark {
101
- @alias-bg-dark-color: color(~`colorPalette('@{adValue}', @{color-dark-index})`);
102
- e(~`genCommentTypeColor('background', '@{alias-bg-dark-color}')`);
120
+
121
+ .bg-@{adKey}-dark {
122
+ @alias-bg-dark-color: color(colorPalette('@{adValue}', @color-dark-index));
123
+ genCommentTypeColor('background', '@{alias-bg-dark-color}');
103
124
  background-color: @alias-bg-dark-color !important;
104
- }
125
+ }
105
126
 
106
127
  .bg-@{adKey}-h {
107
- e(~`genCommentTypeColor('hoverBackground', '@{adValue}')`);
128
+ genCommentTypeColor('hoverBackground', '@{adValue}');
108
129
  transition: background-color 300ms;
130
+
109
131
  &:hover {
110
132
  background-color: @adValue !important;
111
133
  }
112
134
  }
113
135
 
114
- .text-@{adKey}-light {
115
- @alias-text-light-color: color(~`colorPalette('@{adValue}', @{color-light-index})`);
116
- e(~`genCommentTypeColor('text', '@{alias-text-light-color}')`);
136
+ .text-@{adKey}-light {
137
+ @alias-text-light-color: color(colorPalette('@{adValue}', @color-light-index));
138
+ genCommentTypeColor('text', '@{alias-text-light-color}');
117
139
  color: @alias-text-light-color !important;
118
- }
140
+ }
141
+
119
142
  .text-@{adKey} {
120
- e(~`genCommentTypeColor('text', '@{adValue}')`);
143
+ genCommentTypeColor('text', '@{adValue}');
121
144
  color: @adValue !important;
122
145
  }
123
- .text-@{adKey}-dark {
124
- @alias-text-dark-color: color(~`colorPalette('@{adValue}', @{color-dark-index})`);
125
- e(~`genCommentTypeColor('text', '@{alias-text-dark-color}')`);
146
+
147
+ .text-@{adKey}-dark {
148
+ @alias-text-dark-color: color(colorPalette('@{adValue}', @color-dark-index));
149
+ genCommentTypeColor('text', '@{alias-text-dark-color}');
126
150
  color: @alias-text-dark-color !important;
127
151
  }
128
152
  });
@@ -130,41 +154,49 @@
130
154
  // grey
131
155
  .for-each(@greyColorer, {
132
156
  .bg-grey-@{adKey} {
133
- e(~`genCommentTypeColor('background', '@{adValue}')`);
157
+ genCommentTypeColor('background', '@{adValue}');
134
158
  background-color: @adValue !important;
135
159
  }
160
+
136
161
  .bg-grey-@{adKey}-h {
137
- e(~`genCommentTypeColor('hoverBackground', '@{adValue}')`);
162
+ genCommentTypeColor('hoverBackground', '@{adValue}');
138
163
  transition: background-color 300ms;
164
+
139
165
  &:hover {
140
166
  background-color: @adValue !important;
141
167
  }
142
168
  }
169
+
143
170
  .text-grey-@{adKey} {
144
- e(~`genCommentTypeColor('text', '@{adValue}')`);
171
+ genCommentTypeColor('text', '@{adValue}');
145
172
  color: @adValue !important;
146
173
  }
147
174
  });
148
175
 
149
- .all-colors-minin(@enabled) when (@enabled = true) {
176
+ .all-colors-minin(@enabled) when (@enabled =true) {
150
177
  .loop-no(@adKey, @adValue, @i: 1) when (@i =< length(@color-no-list)) {
151
- @name: '@{adKey}-@{i}'; // red-1, red-2, red-3 ....
178
+ @name: '@{adKey}-@{i}'; // red-1, red-2, red-3 ....
152
179
  @nameValue: e(@@name);
180
+
153
181
  .bg-@{adKey}-@{i} {
154
- e(~`genCommentTypeColor('background', '@{nameValue}')`);
182
+ genCommentTypeColor('background', '@{nameValue}');
155
183
  background-color: @nameValue !important;
156
184
  }
185
+
157
186
  .bg-@{adKey}-@{i}-h {
158
- e(~`genCommentTypeColor('hoverBackground', '@{nameValue}')`);
187
+ genCommentTypeColor('hoverBackground', '@{nameValue}');
159
188
  transition: background-color 300ms;
189
+
160
190
  &:hover {
161
191
  background-color: @nameValue !important;
162
192
  }
163
193
  }
194
+
164
195
  .text-@{adKey}-@{i} {
165
- e(~`genCommentTypeColor('text', '@{nameValue}')`);
196
+ genCommentTypeColor('text', '@{nameValue}');
166
197
  color: @nameValue !important;
167
198
  }
199
+
168
200
  .loop-no(@adKey, @adValue, @i + 1);
169
201
  }
170
202
 
@@ -172,4 +204,5 @@
172
204
  .loop-no(@adKey, @adValue, 1);
173
205
  });
174
206
  }
175
- .all-colors-minin(@enable-all-colors);
207
+
208
+ .all-colors-minin(@enable-all-colors);
@@ -4,33 +4,40 @@
4
4
  @item: extract(@mp-list, @i);
5
5
  @abbrev: extract(@item, 2);
6
6
  @prop: extract(@item, 1);
7
+
7
8
  .@{abbrev}@{infix} {
8
- e(~`genComment('@{adValue}', 'Set the @{prop} size to {0}', '设置 @{prop} 大小为 {0}')`);
9
+ genComment('@{adValue}', 'Set the @{prop} size to {0}', '设置 @{prop} 大小为 {0}');
9
10
  @{prop}: @adValue !important;
10
11
  }
12
+
11
13
  .@{abbrev}t@{infix} {
12
- e(~`genComment('@{adValue}', 'Set the @{prop}-top size to {0}', '设置 @{prop}-top 大小为 {0}')`);
14
+ genComment('@{adValue}', 'Set the @{prop}-top size to {0}', '设置 @{prop}-top 大小为 {0}');
13
15
  @{prop}-top: @adValue !important;
14
16
  }
17
+
15
18
  .@{abbrev}r@{infix} {
16
- e(~`genComment('@{adValue}', 'Set the @{prop}-right size to {0}', '设置 @{prop}-right 大小为 {0}')`);
19
+ genComment('@{adValue}', 'Set the @{prop}-right size to {0}', '设置 @{prop}-right 大小为 {0}');
17
20
  @{prop}-right: @adValue !important;
18
21
  }
22
+
19
23
  .@{abbrev}b@{infix} {
20
- e(~`genComment('@{adValue}', 'Set the @{prop}-bottom size to {0}', '设置 @{prop}-bottom 大小为 {0}')`);
24
+ genComment('@{adValue}', 'Set the @{prop}-bottom size to {0}', '设置 @{prop}-bottom 大小为 {0}');
21
25
  @{prop}-bottom: @adValue !important;
22
26
  }
27
+
23
28
  .@{abbrev}l@{infix} {
24
- e(~`genComment('@{adValue}', 'Set the @{prop}-left size to {0}', '设置 @{prop}-left 大小为 {0}')`);
29
+ genComment('@{adValue}', 'Set the @{prop}-left size to {0}', '设置 @{prop}-left 大小为 {0}');
25
30
  @{prop}-left: @adValue !important;
26
31
  }
32
+
27
33
  .@{abbrev}x@{infix} {
28
- e(~`genComment('@{adValue}', 'Set the @{prop} horizontal (left & right) size to {0}', '设置 @{prop} 水平(即左与右)大小为 {0}')`);
34
+ genComment('@{adValue}', 'Set the @{prop} horizontal (left & right) size to {0}', '设置 @{prop} 水平(即左与右)大小为 {0}');
29
35
  @{prop}-right: @adValue !important;
30
36
  @{prop}-left: @adValue !important;
31
37
  }
38
+
32
39
  .@{abbrev}y@{infix} {
33
- e(~`genComment('@{adValue}', 'Set the @{prop} vertical (top & bottom) size to {0}', '设置 @{prop} 垂直(即上与下)大小为 {0}')`);
40
+ genComment('@{adValue}', 'Set the @{prop} vertical (top & bottom) size to {0}', '设置 @{prop} 垂直(即上与下)大小为 {0}');
34
41
  @{prop}-top: @adValue !important;
35
42
  @{prop}-bottom: @adValue !important;
36
43
  }
@@ -42,12 +49,14 @@
42
49
  @item: extract(@mp-list, @i);
43
50
  @abbrev: extract(@item, 2);
44
51
  @prop: extract(@item, 1);
52
+
45
53
  // 无须设置注释
46
54
  [dir="rtl"] {
47
55
  .@{abbrev}r@{infix} {
48
56
  @{prop}-left: @adValue !important;
49
57
  @{prop}-right: inherit !important;
50
58
  }
59
+
51
60
  .@{abbrev}l@{infix} {
52
61
  @{prop}-right: @adValue !important;
53
62
  @{prop}-left: inherit !important;
@@ -59,26 +68,32 @@
59
68
 
60
69
  .spacings-loop(@type) {
61
70
  .for-each(@spacings, {
62
- .infix-mixin(@adKey) when(@adKey = 0) {
71
+ .infix-mixin(@adKey) when(@adKey =0) {
63
72
  @infix: 0;
64
73
  }
74
+
65
75
  .infix-mixin(@adKey) when(default()) {
66
76
  @infix: ~'-@{adKey}';
67
77
  }
78
+
68
79
  .infix-mixin(@adKey);
69
80
 
70
- .loop-mp-fn-mixin(@type) when(@type = 'lrt') {
81
+ .loop-mp-fn-mixin(@type) when(@type ='lrt') {
71
82
  .loop-mp(@infix, @adKey, @adValue, 1);
72
83
  }
84
+
73
85
  .loop-mp-fn-mixin(@type) when(default()) {
74
86
  .loop-mp-rtl(@infix, @adKey, @adValue, 1);
75
87
  }
88
+
76
89
  .loop-mp-fn-mixin(@type);
77
90
  });
78
91
  }
79
92
 
80
93
  .spacings-loop('lrt');
94
+
81
95
  .spacings-rtl-mixin(@enabled) when(@enabled=true) {
82
96
  .spacings-loop('rtl');
83
97
  }
84
- .spacings-rtl-mixin(@rtl-enabled);
98
+
99
+ .spacings-rtl-mixin(@rtl-enabled);
@@ -1,20 +1,23 @@
1
1
  .for-each(@widths, {
2
- .width-@{adKey} {
3
- e(~`genComment('@{adValue}', 'Specify the width as {0}', '指定宽度为 {0}')`);
2
+ .width-@{adKey} {
3
+ genComment('@{adValue}', 'Specify the width as {0}', '指定宽度为 {0}');
4
4
  width: @adValue !important;
5
5
  }
6
- .max-width-@{adKey} {
7
- e(~`genComment('@{adValue}', 'Specify the maximum width as {0}', '指定最大宽度为 {0}')`);
6
+
7
+ .max-width-@{adKey} {
8
+ genComment('@{adValue}', 'Specify the maximum width as {0}', '指定最大宽度为 {0}');
8
9
  max-width: @adValue !important;
9
10
  }
10
11
 
11
- .min-width-@{adKey} {
12
- e(~`genComment('@{adValue}', 'Specify the minimum width as {0}', '指定最小宽度为 {0}')`);
12
+ .min-width-@{adKey} {
13
+ genComment('@{adValue}', 'Specify the minimum width as {0}', '指定最小宽度为 {0}');
13
14
  min-width: @adValue !important;
14
15
  }
15
16
  });
16
17
 
17
18
  @media (max-width: @mobile-max) {
19
+
20
+ /* stylelint-disable-next-line rule-empty-line-before */
18
21
  .width-sm,
19
22
  .max-width-sm,
20
23
  .min-width-sm {
@@ -1,3 +1,4 @@
1
+ @import './mixins.less';
1
2
  @import 'ng-zorro-antd/src/style/themes/compact.less';
2
3
  @import './system/theme-compact.less';
3
4
  @import './layout-default/style/theme-compact.less';
package/theme-dark.less CHANGED
@@ -1,3 +1,4 @@
1
+ @import './mixins.less';
1
2
  @import 'ng-zorro-antd/src/style/themes/dark.less';
2
3
  @import './system/theme-dark.less';
3
4
  @import './layout-default/style/theme-dark.less';
@@ -1,3 +1,4 @@
1
+ @import './mixins.less';
1
2
  @import 'ng-zorro-antd/src/style/themes/default.less';
2
3
  @import './system/theme-default.less';
3
4
  @import './layout-default/style/theme-default.less';
@@ -0,0 +1,6 @@
1
+ @import './mixins.less';
2
+ @import 'ng-zorro-antd/src/style/themes/variable.less';
3
+ @import './system/theme-variable.less';
4
+ @import './layout-default/style/theme-variable.less';
5
+ @import './layout-blank/style/theme-variable.less';
6
+ @import '../abc/theme-variable.less';
package/variable.less ADDED
@@ -0,0 +1,6 @@
1
+ @import './theme-variable.less';
2
+ @import './system/index.less';
3
+ @import './layout-default/style/index.less';
4
+ @import './layout-blank/style/index.less';
5
+ @import '../abc/index.less';
6
+ @import '../chart/index.less';