@neatui/css 2.0.0-beta.2 → 2.0.1
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/components/btns/btns@a.scss +16 -8
- package/core/reset.scss +1 -1
- package/core/theme.scss +14 -62
- package/core/ux.scss +11 -3
- package/package.json +1 -1
|
@@ -54,7 +54,8 @@ body [ui-btn~='@a'] {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// 移入状态
|
|
57
|
-
&:hover
|
|
57
|
+
&:hover,
|
|
58
|
+
&.active {
|
|
58
59
|
box-shadow:
|
|
59
60
|
inset 0 0 0 1px var(--co-line),
|
|
60
61
|
inset 0 0 0 100em var(--co-text-xs);
|
|
@@ -173,7 +174,8 @@ body [ui-btn~='@a'] {
|
|
|
173
174
|
}
|
|
174
175
|
box-shadow: inset 0 0 0 1px transparent;
|
|
175
176
|
|
|
176
|
-
&:hover
|
|
177
|
+
&:hover,
|
|
178
|
+
&.active {
|
|
177
179
|
box-shadow:
|
|
178
180
|
inset 0 0 0 1px transparent,
|
|
179
181
|
inset 0 0 0 100em var(--co-text-xs);
|
|
@@ -189,7 +191,8 @@ body [ui-btn~='@a'] {
|
|
|
189
191
|
}
|
|
190
192
|
box-shadow: inset 0 0 0 1px var(--co-#{$name});
|
|
191
193
|
|
|
192
|
-
&:hover
|
|
194
|
+
&:hover,
|
|
195
|
+
&.active {
|
|
193
196
|
box-shadow:
|
|
194
197
|
inset 0 0 0 1px var(--co-#{$name}),
|
|
195
198
|
inset 0 0 0 100em var(--co-#{$name}-xs);
|
|
@@ -268,7 +271,8 @@ body [ui-btn~='@a'] {
|
|
|
268
271
|
}
|
|
269
272
|
|
|
270
273
|
// 移入状态
|
|
271
|
-
& > *:hover
|
|
274
|
+
& > *:hover,
|
|
275
|
+
& > *.active {
|
|
272
276
|
box-shadow:
|
|
273
277
|
inset 0 0 0 1px var(--co-line),
|
|
274
278
|
inset 0 0 0 100em var(--co-text-xs);
|
|
@@ -293,7 +297,8 @@ body [ui-btn~='@a'] {
|
|
|
293
297
|
// 禁用按钮
|
|
294
298
|
&[ui-btns~=':disabled'] > * {
|
|
295
299
|
&,
|
|
296
|
-
&:hover
|
|
300
|
+
&:hover,
|
|
301
|
+
&.active {
|
|
297
302
|
opacity: 0.65;
|
|
298
303
|
box-shadow:
|
|
299
304
|
inset 0 0 0 1px transparent,
|
|
@@ -384,7 +389,8 @@ body [ui-btn~='@a'] {
|
|
|
384
389
|
|
|
385
390
|
box-shadow: inset 0 0 0 1px transparent;
|
|
386
391
|
|
|
387
|
-
&:hover
|
|
392
|
+
&:hover,
|
|
393
|
+
&.active {
|
|
388
394
|
box-shadow:
|
|
389
395
|
inset 0 0 0 1px transparent,
|
|
390
396
|
inset 0 0 0 100em var(--co-text-xs);
|
|
@@ -401,7 +407,8 @@ body [ui-btn~='@a'] {
|
|
|
401
407
|
}
|
|
402
408
|
box-shadow: inset 0 0 0 1px var(--co-#{$name});
|
|
403
409
|
|
|
404
|
-
&:hover
|
|
410
|
+
&:hover,
|
|
411
|
+
&.active {
|
|
405
412
|
box-shadow:
|
|
406
413
|
inset 0 0 0 1px var(--co-#{$name}),
|
|
407
414
|
inset 0 0 0 100em var(--co-#{$name}-xs);
|
|
@@ -414,7 +421,8 @@ body [ui-btn~='@a'] {
|
|
|
414
421
|
background: transparent;
|
|
415
422
|
box-shadow: inset 0 0 0 1px transparent;
|
|
416
423
|
|
|
417
|
-
&:hover
|
|
424
|
+
&:hover,
|
|
425
|
+
&.active {
|
|
418
426
|
box-shadow: inset 0 0 0 1px transparent;
|
|
419
427
|
text-decoration: underline;
|
|
420
428
|
}
|
package/core/reset.scss
CHANGED
package/core/theme.scss
CHANGED
|
@@ -59,9 +59,7 @@ $theme: if(
|
|
|
59
59
|
read: mix(map-get($s, 'text'), map-get($s, 'fore'), 85%),
|
|
60
60
|
desc: mix(map-get($s, 'text'), map-get($s, 'fore'), 55%),
|
|
61
61
|
note: mix(map-get($s, 'text'), map-get($s, 'fore'), 35%),
|
|
62
|
-
|
|
63
|
-
case:
|
|
64
|
-
mix(map-get($s, 'text'), map-get($s, 'fore'), 20%),
|
|
62
|
+
case: mix(map-get($s, 'text'), map-get($s, 'fore'), 20%),
|
|
65
63
|
line: mix(map-get($s, 'text'), map-get($s, 'fore'), 10%),
|
|
66
64
|
weak: mix(map-get($s, 'text'), map-get($s, 'fore'), 3%),
|
|
67
65
|
// deep:
|
|
@@ -202,53 +200,29 @@ $theme: if(
|
|
|
202
200
|
}
|
|
203
201
|
}
|
|
204
202
|
}
|
|
205
|
-
|
|
206
|
-
// 文本颜色
|
|
207
|
-
// --co-main-text: #{mix(map-get($s, 'main'), map-get($s, 'text'), 85%)};
|
|
208
|
-
// --co-well-text: #{mix(map-get($s, 'well'), map-get($s, 'text'), 85%)};
|
|
209
|
-
// --co-warn-text: #{mix(map-get($s, 'warn'), map-get($s, 'text'), 85%)};
|
|
210
|
-
// --co-risk-text: #{mix(map-get($s, 'risk'), map-get($s, 'text'), 85%)};
|
|
211
|
-
|
|
212
|
-
// --co-line-fore: #{mix(map-get($s, 'line'), map-get($s, 'fore'), 70%)};
|
|
213
|
-
// --bg-main: #{saturate(rgba(map-get($s, 'main'), 0.05), 20%)};
|
|
214
|
-
// --bg-weak: #{mix(map-get($s, 'weak'), map-get($s, 'fore'), 75%)};
|
|
215
|
-
// --bg-well: #{saturate(rgba(map-get($s, 'well'), 0.05), 20%)};
|
|
216
|
-
// --bg-warn: #{saturate(rgba(map-get($s, 'warn'), 0.05), 20%)};
|
|
217
|
-
// --bg-risk: #{saturate(rgba(map-get($s, 'risk'), 0.05), 20%)};
|
|
218
|
-
// --bg-info: #{saturate(rgba(map-get($s, 'info'), 0.05), 20%)};
|
|
219
|
-
// --bg-well: #{rgba(map-get($s, 'well'), 0.08)};
|
|
220
|
-
// --bg-warn: #{rgba(map-get($s, 'warn'), 0.08)};
|
|
221
|
-
// --bg-risk: #{rgba(map-get($s, 'risk'), 0.08)};
|
|
222
|
-
|
|
223
|
-
// @each $k in $colors {
|
|
224
|
-
// $v: map-get($s, $k);
|
|
225
|
-
// $ls: 0.05;
|
|
226
|
-
// @each $l in $levels {
|
|
227
|
-
// // 透明度
|
|
228
|
-
// --co-#{$k}-#{$l}: #{rgba($v, $ls)};
|
|
229
|
-
// // 增亮度
|
|
230
|
-
// --bg-#{$k}-#{$l}: #{saturate(rgba($v, $ls), 20%)};
|
|
231
|
-
// @if ($ls == 0.05 or $ls == 0.9) {
|
|
232
|
-
// $ls: $ls + 0.05;
|
|
233
|
-
// } @else {
|
|
234
|
-
// $ls: $ls + 0.1;
|
|
235
|
-
// }
|
|
236
|
-
// }
|
|
237
|
-
// }
|
|
238
203
|
}
|
|
239
204
|
} @else {
|
|
240
205
|
[theme~='#{$n}'] {
|
|
241
206
|
@each $c in $s {
|
|
242
207
|
$k: nth($c, 1);
|
|
243
208
|
$v: nth($c, 2);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
209
|
+
--#{$k}: #{red($v), green($v), blue($v)};
|
|
210
|
+
--co-#{$k}: #{$v};
|
|
247
211
|
|
|
248
212
|
$ls: 0.05;
|
|
249
213
|
@each $l in $levels {
|
|
250
214
|
// 透明度
|
|
251
|
-
|
|
215
|
+
@if ($k != 'none') {
|
|
216
|
+
--co-#{$k}-#{$l}: #{rgba($v, $ls)};
|
|
217
|
+
|
|
218
|
+
@if ($k != 'w' and $k != 'b') {
|
|
219
|
+
--co-#{$k}-fore-#{$l}: #{mix($v, map-get($s, 'fore'), $ls * 100%)};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk') {
|
|
223
|
+
--co-#{$k}-text-#{$l}: #{mix($v, map-get($s, 'text'), $ls * 100%)};
|
|
224
|
+
}
|
|
225
|
+
}
|
|
252
226
|
@if ($ls <= 0.1 or $ls >= 0.8) {
|
|
253
227
|
$ls: $ls + 0.05;
|
|
254
228
|
} @else {
|
|
@@ -256,28 +230,6 @@ $theme: if(
|
|
|
256
230
|
}
|
|
257
231
|
}
|
|
258
232
|
}
|
|
259
|
-
|
|
260
|
-
// 文本颜色
|
|
261
|
-
// --co-main-text: #{mix(map-get($s, 'main'), map-get($s, 'text'), 85%)};
|
|
262
|
-
// --co-well-text: #{mix(map-get($s, 'well'), map-get($s, 'text'), 85%)};
|
|
263
|
-
// --co-warn-text: #{mix(map-get($s, 'warn'), map-get($s, 'text'), 85%)};
|
|
264
|
-
// --co-risk-text: #{mix(map-get($s, 'risk'), map-get($s, 'text'), 85%)};
|
|
265
|
-
|
|
266
|
-
// @each $k in $colors {
|
|
267
|
-
// $v: map-get($s, $k);
|
|
268
|
-
// $ls: 0.05;
|
|
269
|
-
// @each $l in $levels {
|
|
270
|
-
// // 透明度
|
|
271
|
-
// --co-#{$k}-#{$l}: #{rgba($v, $ls)};
|
|
272
|
-
// // 增亮度
|
|
273
|
-
// --bg-#{$k}-#{$l}: #{saturate(rgba($v, $ls), 20%)};
|
|
274
|
-
// @if ($ls == 0.05 or $ls == 0.9) {
|
|
275
|
-
// $ls: $ls + 0.05;
|
|
276
|
-
// } @else {
|
|
277
|
-
// $ls: $ls + 0.1;
|
|
278
|
-
// }
|
|
279
|
-
// }
|
|
280
|
-
// }
|
|
281
233
|
}
|
|
282
234
|
}
|
|
283
235
|
}
|
package/core/ux.scss
CHANGED
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
&::after {
|
|
164
164
|
border-top-color: currentColor;
|
|
165
165
|
transform: translateY(120%);
|
|
166
|
-
opacity: 0.
|
|
166
|
+
opacity: 0.3;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
&[ui-sort~='0'] {
|
|
@@ -171,12 +171,20 @@
|
|
|
171
171
|
opacity: 0.3;
|
|
172
172
|
}
|
|
173
173
|
&::after {
|
|
174
|
-
opacity: 0.
|
|
174
|
+
opacity: 0.3;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
&[ui-sort~='1'] {
|
|
178
178
|
&::before {
|
|
179
|
-
opacity: 0.
|
|
179
|
+
opacity: 0.3;
|
|
180
|
+
}
|
|
181
|
+
&::after {
|
|
182
|
+
opacity: 0.9;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
&[ui-sort~='2'] {
|
|
186
|
+
&::before {
|
|
187
|
+
opacity: 0.9;
|
|
180
188
|
}
|
|
181
189
|
&::after {
|
|
182
190
|
opacity: 0.3;
|