@neatui/css 3.10.3 → 3.10.5
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.
- package/README.md +4 -4
- package/components/btns/btns@a.scss +3 -3
- package/components/btns/btns@b.scss +3 -3
- package/components/card/card@a.scss +4 -6
- package/components/card/card@b.scss +1 -1
- package/components/chat/chat@a.scss +1 -1
- package/components/form/base.scss +8 -7
- package/components/form/form@a/input.scss +4 -4
- package/components/form/form@a/switch.scss +4 -2
- package/components/form/form@a/textarea.scss +4 -4
- package/components/form/form@a/upload.scss +1 -1
- package/components/form/form@b/input.scss +4 -4
- package/components/form/form@b/textarea.scss +4 -4
- package/components/form/form@b/upload.scss +1 -1
- package/components/form/form@c/input.scss +6 -5
- package/components/form/form@c/textarea.scss +3 -3
- package/components/form/form@c/upload.scss +1 -1
- package/components/form/form@d/input.scss +4 -4
- package/components/form/form@d/textarea.scss +4 -4
- package/components/form/form@d/upload.scss +1 -1
- package/components/list/list@a.scss +1 -1
- package/components/load/load@a.scss +7 -7
- package/components/navs/navs@a.scss +2 -2
- package/components/navs/navs@b.scss +3 -3
- package/components/note/note@a.scss +2 -2
- package/components/note/note@b.scss +1 -1
- package/components/table/base.scss +2 -2
- package/components/table/table@a.scss +1 -1
- package/components/table/table@b.scss +4 -4
- package/components/table/table@c.scss +2 -2
- package/components/tags/tags@a.scss +4 -4
- package/components/tags/tags@b.scss +4 -4
- package/components/tips/base.scss +13 -12
- package/components/tips/tips@a.scss +1 -1
- package/core/basic.scss +34 -24
- package/core/color.scss +63 -147
- package/core/cover.scss +1 -1
- package/core/grid.scss +9 -0
- package/core/scroll.scss +5 -5
- package/core/theme.scss +98 -173
- package/core/trim.scss +0 -36
- package/core/ux.scss +3 -3
- package/package.json +1 -1
package/core/theme.scss
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
@use 'sass:string';
|
|
8
8
|
@use 'sass:math';
|
|
9
9
|
|
|
10
|
+
// 颜色分级
|
|
11
|
+
$levels: xxs, xs, ss, sm, sl, ms, mm, ml, ls, lm, ll, xl, xxl;
|
|
12
|
+
$exclude-keys: (w, b, fore, back, desc, note, case, deep, code, link);
|
|
13
|
+
|
|
10
14
|
// 整数颜色计算
|
|
11
15
|
@function mix-int($c1, $c2, $w) {
|
|
12
16
|
$mix: color.mix($c1, $c2, $w);
|
|
@@ -33,6 +37,20 @@
|
|
|
33
37
|
@return mix-int(black, $c, $w);
|
|
34
38
|
}
|
|
35
39
|
|
|
40
|
+
@function merge-theme($theme) {
|
|
41
|
+
$out: ();
|
|
42
|
+
@each $themeName, $colors in $theme {
|
|
43
|
+
@if meta.type-of($colors) == 'map' {
|
|
44
|
+
@each $key in map.keys($colors) {
|
|
45
|
+
@if not list.index($out, $key) {
|
|
46
|
+
$out: list.append($out, $key, comma);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
@return $out;
|
|
52
|
+
}
|
|
53
|
+
|
|
36
54
|
@mixin theme(
|
|
37
55
|
$theme: (
|
|
38
56
|
_sys: (
|
|
@@ -100,93 +118,49 @@
|
|
|
100
118
|
}
|
|
101
119
|
}
|
|
102
120
|
|
|
103
|
-
//
|
|
104
|
-
$levels: xxs, xs, ss, sm, sl, ms, mm, ml, ls, lm, ll, xl, xxl;
|
|
105
|
-
$colors: main, text, well, warn, risk;
|
|
121
|
+
// 第一主题
|
|
106
122
|
$f: list.nth(list.nth($theme, 1), 1);
|
|
123
|
+
|
|
107
124
|
@each $i in $theme {
|
|
108
125
|
$n: list.nth($i, 1);
|
|
109
126
|
$s: list.nth($i, 2);
|
|
110
|
-
@if ($n == $f) {
|
|
111
|
-
:root,
|
|
112
|
-
[theme~='#{$n}'] {
|
|
113
|
-
@each $c in $s {
|
|
114
|
-
$k: list.nth($c, 1);
|
|
115
|
-
$v: list.nth($c, 2);
|
|
116
|
-
--co-#{$k}: #{$v};
|
|
117
|
-
@if ($k != 'w' and $k != 'b') {
|
|
118
|
-
--co-#{$k}-fore: #{mix-int($v, map.get($s, 'fore'), 100%)};
|
|
119
|
-
}
|
|
120
|
-
@if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk' or $k == 'info') {
|
|
121
|
-
--co-#{$k}-text: #{mix-int($v, map.get($s, 'text'), 100%)};
|
|
122
|
-
}
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
--co-#{$k}-fore-#{$l}: #{mix-int($v, map.get($s, 'fore'), $ls * 100%)};
|
|
131
|
-
}
|
|
132
|
-
@if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk' or $k == 'info') {
|
|
133
|
-
--co-#{$k}-text-#{$l}: #{mix-int($v, map.get($s, 'text'), $ls * 100%)};
|
|
134
|
-
}
|
|
135
|
-
}
|
|
128
|
+
// 动态选择器:首个主题多一个 :root
|
|
129
|
+
$scope: if($n == $f, ':root', '[theme~="#{$n}"]');
|
|
130
|
+
#{$scope} {
|
|
131
|
+
@each $c in $s {
|
|
132
|
+
$k: list.nth($c, 1);
|
|
133
|
+
$v: list.nth($c, 2);
|
|
136
134
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
} @else if($ls <= 0.1 or $ls >= 0.8) {
|
|
140
|
-
$ls: $ls + 0.05;
|
|
141
|
-
} @else {
|
|
142
|
-
$ls: $ls + 0.1;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
} @else {
|
|
148
|
-
[theme~='#{$n}'] {
|
|
149
|
-
@each $c in $s {
|
|
150
|
-
$k: list.nth($c, 1);
|
|
151
|
-
$v: list.nth($c, 2);
|
|
152
|
-
--co-#{$k}: #{$v};
|
|
135
|
+
// 颜色变量
|
|
136
|
+
--co-#{$k}: #{$v};
|
|
153
137
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
138
|
+
// 透明度梯度
|
|
139
|
+
$ls: 0.035;
|
|
140
|
+
@each $l in $levels {
|
|
141
|
+
@if ($k != 'none') {
|
|
142
|
+
// @TODO 最新版本规划
|
|
143
|
+
--co-#{$k}-o-#{$l}: #{rgba($v, $ls)};
|
|
157
144
|
|
|
158
|
-
|
|
159
|
-
--co-#{$k}-
|
|
145
|
+
// @if not list.index($exclude-keys, $k) {
|
|
146
|
+
--co-#{$k}-w-#{$l}: #{mix-int($v, map.get($s, 'fore'), $ls * 100%)};
|
|
147
|
+
--co-#{$k}-b-#{$l}: #{mix-int($v, map.get($s, 'text'), $ls * 100%)};
|
|
148
|
+
// }
|
|
160
149
|
}
|
|
161
150
|
|
|
162
|
-
$ls
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
@if ($k != 'w' and $k != 'b') {
|
|
169
|
-
--co-#{$k}-fore-#{$l}: #{mix-int($v, map.get($s, 'fore'), $ls * 100%)};
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
@if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk' or $k == 'info') {
|
|
173
|
-
--co-#{$k}-text-#{$l}: #{mix-int($v, map.get($s, 'text'), $ls * 100%)};
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
@if ($ls == 0.035) {
|
|
177
|
-
$ls: 0.05;
|
|
178
|
-
} @else if($ls <= 0.1 or $ls >= 0.8) {
|
|
179
|
-
$ls: $ls + 0.05;
|
|
180
|
-
} @else {
|
|
181
|
-
$ls: $ls + 0.1;
|
|
182
|
-
}
|
|
151
|
+
@if ($ls == 0.035) {
|
|
152
|
+
$ls: 0.05;
|
|
153
|
+
} @else if ($ls <= 0.1 or $ls >= 0.8) {
|
|
154
|
+
$ls: $ls + 0.05;
|
|
155
|
+
} @else {
|
|
156
|
+
$ls: $ls + 0.1;
|
|
183
157
|
}
|
|
184
158
|
}
|
|
185
159
|
}
|
|
186
160
|
}
|
|
187
161
|
}
|
|
188
162
|
|
|
189
|
-
//
|
|
163
|
+
// 全局颜色
|
|
190
164
|
html,
|
|
191
165
|
[theme] {
|
|
192
166
|
color: var(--co-text);
|
|
@@ -218,114 +192,65 @@
|
|
|
218
192
|
border-color: currentColor !important;
|
|
219
193
|
}
|
|
220
194
|
|
|
221
|
-
//
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
195
|
+
// 合并主题
|
|
196
|
+
$themes: merge-theme($theme);
|
|
197
|
+
// 生成样式
|
|
198
|
+
@each $n in $themes {
|
|
199
|
+
.co-#{$n},
|
|
200
|
+
.co-#{$n}\:hover:hover,
|
|
201
|
+
.co-#{$n}\:active:active {
|
|
202
|
+
color: var(--co-#{$n}) !important;
|
|
203
|
+
fill: var(--co-#{$n}) !important;
|
|
204
|
+
}
|
|
225
205
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
.bg-3 {
|
|
233
|
-
background-color: #5e5ce6;
|
|
234
|
-
}
|
|
235
|
-
.bg-4 {
|
|
236
|
-
background-color: #ff9f0a;
|
|
237
|
-
}
|
|
238
|
-
.bg-5 {
|
|
239
|
-
background-color: #ff375f;
|
|
240
|
-
}
|
|
241
|
-
.bg-6 {
|
|
242
|
-
background-color: #af52de;
|
|
243
|
-
}
|
|
244
|
-
.bg-7 {
|
|
245
|
-
background-color: #ff453a;
|
|
246
|
-
}
|
|
247
|
-
.bg-8 {
|
|
248
|
-
background-color: #af52de;
|
|
249
|
-
}
|
|
250
|
-
.bg-9 {
|
|
251
|
-
background-color: #5ac8fa;
|
|
252
|
-
}
|
|
253
|
-
.bg-10 {
|
|
254
|
-
background-color: #ffcc00;
|
|
255
|
-
}
|
|
256
|
-
.bg-11 {
|
|
257
|
-
background-color: #8e8e93;
|
|
258
|
-
}
|
|
259
|
-
.bg-12 {
|
|
260
|
-
background-color: #bad80a;
|
|
261
|
-
}
|
|
262
|
-
.bg-13 {
|
|
263
|
-
background-color: #1d6fa3;
|
|
264
|
-
}
|
|
265
|
-
.bg-14 {
|
|
266
|
-
background-color: #fd6585;
|
|
267
|
-
}
|
|
268
|
-
.bg-15 {
|
|
269
|
-
background-color: #df5900;
|
|
270
|
-
}
|
|
271
|
-
.bg-16 {
|
|
272
|
-
background-color: #3388ff;
|
|
273
|
-
}
|
|
274
|
-
.bg-17 {
|
|
275
|
-
background-color: #623aa2;
|
|
276
|
-
}
|
|
277
|
-
.bg-18 {
|
|
278
|
-
background-color: #d939cd;
|
|
279
|
-
}
|
|
280
|
-
.bg-19 {
|
|
281
|
-
background-color: #f55555;
|
|
282
|
-
}
|
|
283
|
-
.bg-20 {
|
|
284
|
-
background-color: #bb4e75;
|
|
285
|
-
}
|
|
206
|
+
.bg-#{$n},
|
|
207
|
+
.bg-#{$n}\:hover:hover,
|
|
208
|
+
.bg-#{$n}\:active:active {
|
|
209
|
+
background-color: var(--co-#{$n}) !important;
|
|
210
|
+
}
|
|
286
211
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
$
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
$v: list.nth($c, 2);
|
|
293
|
-
$levels: xs, ss, sm, sl, ms, mm, ml, ls, lm, ll, xl;
|
|
212
|
+
.bk-#{$n},
|
|
213
|
+
.bk-#{$n}\:hover:hover,
|
|
214
|
+
.bk-#{$n}\:active:active {
|
|
215
|
+
border-color: var(--co-#{$n}) !important;
|
|
216
|
+
}
|
|
294
217
|
|
|
295
|
-
|
|
296
|
-
.co-#{$n}
|
|
297
|
-
.co-#{$n}\:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
.
|
|
302
|
-
.
|
|
303
|
-
.
|
|
304
|
-
|
|
218
|
+
@each $i in $levels {
|
|
219
|
+
.co-#{$n}-o-#{$i},
|
|
220
|
+
.co-#{$n}-o-#{$i}\:hover:hover,
|
|
221
|
+
.co-#{$n}-o-#{$i}\:active:active,
|
|
222
|
+
.co-#{$n}-w-#{$i},
|
|
223
|
+
.co-#{$n}-w-#{$i}\:hover:hover,
|
|
224
|
+
.co-#{$n}-w-#{$i}\:active:active,
|
|
225
|
+
.co-#{$n}-b-#{$i},
|
|
226
|
+
.co-#{$n}-b-#{$i}\:hover:hover,
|
|
227
|
+
.co-#{$n}-b-#{$i}\:active:active {
|
|
228
|
+
color: var(--co-#{$n}-o-#{$i}) !important;
|
|
229
|
+
fill: var(--co-#{$n}-o-#{$i}) !important;
|
|
305
230
|
}
|
|
306
|
-
|
|
307
|
-
.
|
|
308
|
-
.
|
|
309
|
-
|
|
231
|
+
|
|
232
|
+
.bg-#{$n}-o-#{$i},
|
|
233
|
+
.bg-#{$n}-o-#{$i}\:hover:hover,
|
|
234
|
+
.bg-#{$n}-o-#{$i}\:active:active,
|
|
235
|
+
.bg-#{$n}-w-#{$i},
|
|
236
|
+
.bg-#{$n}-w-#{$i}\:hover:hover,
|
|
237
|
+
.bg-#{$n}-w-#{$i}\:active:active,
|
|
238
|
+
.bg-#{$n}-b-#{$i},
|
|
239
|
+
.bg-#{$n}-b-#{$i}\:hover:hover,
|
|
240
|
+
.bg-#{$n}-b-#{$i}\:active:active {
|
|
241
|
+
background-color: var(--co-#{$n}-o-#{$i}) !important;
|
|
310
242
|
}
|
|
311
243
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
background-color: var(--co-#{$n}-#{$i}) !important;
|
|
323
|
-
}
|
|
324
|
-
.bk-#{$n}-#{$i},
|
|
325
|
-
.bk-#{$n}-#{$i}\:hover:hover,
|
|
326
|
-
.bk-#{$n}-#{$i}\:active:active {
|
|
327
|
-
border-color: var(--co-#{$n}-#{$i}) !important;
|
|
328
|
-
}
|
|
244
|
+
.bk-#{$n}-o-#{$i},
|
|
245
|
+
.bk-#{$n}-o-#{$i}\:hover:hover,
|
|
246
|
+
.bk-#{$n}-o-#{$i}\:active:active,
|
|
247
|
+
.bk-#{$n}-w-#{$i},
|
|
248
|
+
.bk-#{$n}-w-#{$i}\:hover:hover,
|
|
249
|
+
.bk-#{$n}-w-#{$i}\:active:active,
|
|
250
|
+
.bk-#{$n}-b-#{$i},
|
|
251
|
+
.bk-#{$n}-b-#{$i}\:hover:hover,
|
|
252
|
+
.bk-#{$n}-b-#{$i}\:active:active {
|
|
253
|
+
border-color: var(--co-#{$n}-o-#{$i}) !important;
|
|
329
254
|
}
|
|
330
255
|
}
|
|
331
256
|
}
|
package/core/trim.scss
CHANGED
|
@@ -409,24 +409,6 @@
|
|
|
409
409
|
}
|
|
410
410
|
$w_base: $w_base + 2;
|
|
411
411
|
}
|
|
412
|
-
.#{$media}w-auto {
|
|
413
|
-
width: auto;
|
|
414
|
-
}
|
|
415
|
-
.#{$media}min-w-auto {
|
|
416
|
-
min-width: auto;
|
|
417
|
-
}
|
|
418
|
-
.#{$media}max-w-auto {
|
|
419
|
-
max-width: auto;
|
|
420
|
-
}
|
|
421
|
-
.#{$media}w-full {
|
|
422
|
-
width: 100%;
|
|
423
|
-
}
|
|
424
|
-
.#{$media}min-w-full {
|
|
425
|
-
min-width: 100%;
|
|
426
|
-
}
|
|
427
|
-
.#{$media}max-w-full {
|
|
428
|
-
max-width: 100%;
|
|
429
|
-
}
|
|
430
412
|
|
|
431
413
|
// 高度
|
|
432
414
|
$h_base: 0;
|
|
@@ -469,24 +451,6 @@
|
|
|
469
451
|
}
|
|
470
452
|
$h_base: $h_base + 2;
|
|
471
453
|
}
|
|
472
|
-
.#{$media}h-auto {
|
|
473
|
-
height: auto;
|
|
474
|
-
}
|
|
475
|
-
.#{$media}min-h-auto {
|
|
476
|
-
min-height: auto;
|
|
477
|
-
}
|
|
478
|
-
.#{$media}max-h-auto {
|
|
479
|
-
max-height: auto;
|
|
480
|
-
}
|
|
481
|
-
.#{$media}h-full {
|
|
482
|
-
height: 100%;
|
|
483
|
-
}
|
|
484
|
-
.#{$media}min-h-full {
|
|
485
|
-
min-height: 100%;
|
|
486
|
-
}
|
|
487
|
-
.#{$media}max-h-full {
|
|
488
|
-
max-height: 100%;
|
|
489
|
-
}
|
|
490
454
|
|
|
491
455
|
// 缩小
|
|
492
456
|
.#{$media}s-no {
|
package/core/ux.scss
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
}
|
|
25
25
|
&:hover {
|
|
26
|
-
box-shadow: inset 0 0 0 100em var(--co-text-xxs);
|
|
26
|
+
box-shadow: inset 0 0 0 100em var(--co-text-o-xxs);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
cursor: pointer;
|
|
36
36
|
}
|
|
37
37
|
&:hover {
|
|
38
|
-
box-shadow: 0 0.1em 0.5em var(--co-text-xxs);
|
|
38
|
+
box-shadow: 0 0.1em 0.5em var(--co-text-o-xxs);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
top: 130%;
|
|
283
283
|
|
|
284
284
|
background: var(--co-fore);
|
|
285
|
-
box-shadow: 0 1px 0.3em 1px var(--co-text-ss);
|
|
285
|
+
box-shadow: 0 1px 0.3em 1px var(--co-text-o-ss);
|
|
286
286
|
|
|
287
287
|
padding: 1.5rem;
|
|
288
288
|
right: 0.15rem;
|