@neatui/css 2.0.0-beta.1 → 2.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.
- package/core/color.scss +18 -0
- package/core/flex.scss +0 -29
- package/core/reset.scss +1 -1
- package/core/theme.scss +14 -60
- package/core/ux.scss +11 -3
- package/package.json +1 -1
package/core/color.scss
CHANGED
|
@@ -7,6 +7,24 @@ html {
|
|
|
7
7
|
@mixin color($n, $v) {
|
|
8
8
|
$levels: xs, ss, sm, sl, ms, mm, ml, ls, lm, ll, xl;
|
|
9
9
|
|
|
10
|
+
.co-auto,
|
|
11
|
+
.co-auto\:hover:hover,
|
|
12
|
+
.co-auto\:active:active {
|
|
13
|
+
color: currentColor !important;
|
|
14
|
+
fill: currentColor !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.bg-auto,
|
|
18
|
+
.bg-auto\:hover:hover,
|
|
19
|
+
.bg-auto\:active:active {
|
|
20
|
+
background-color: currentColor !important;
|
|
21
|
+
}
|
|
22
|
+
.bk-auto,
|
|
23
|
+
.bk-auto\:hover:hover,
|
|
24
|
+
.bk-auto\:active:active {
|
|
25
|
+
border-color: currentColor !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
10
28
|
.co-#{$n},
|
|
11
29
|
.co-#{$n}\:hover:hover,
|
|
12
30
|
.co-#{$n}\:active:active {
|
package/core/flex.scss
CHANGED
|
@@ -342,35 +342,6 @@
|
|
|
342
342
|
[ui-flex~='row'] {
|
|
343
343
|
flex-direction: row;
|
|
344
344
|
|
|
345
|
-
// 等分
|
|
346
|
-
&[ui-flex~='ew:1'] > * {
|
|
347
|
-
width: 100%;
|
|
348
|
-
}
|
|
349
|
-
&[ui-flex~='ew:2'] > * {
|
|
350
|
-
width: 50%;
|
|
351
|
-
}
|
|
352
|
-
&[ui-flex~='ew:3'] > * {
|
|
353
|
-
width: 33.333333%;
|
|
354
|
-
}
|
|
355
|
-
&[ui-flex~='ew:4'] > * {
|
|
356
|
-
width: 25%;
|
|
357
|
-
}
|
|
358
|
-
&[ui-flex~='ew:5'] > * {
|
|
359
|
-
width: 20%;
|
|
360
|
-
}
|
|
361
|
-
&[ui-flex~='ew:6'] > * {
|
|
362
|
-
width: 16.666666%;
|
|
363
|
-
}
|
|
364
|
-
&[ui-flex~='ew:7'] > * {
|
|
365
|
-
width: 14.285714%;
|
|
366
|
-
}
|
|
367
|
-
&[ui-flex~='ew:8'] > * {
|
|
368
|
-
width: 12.5%;
|
|
369
|
-
}
|
|
370
|
-
&[ui-flex~='ew:9'] > * {
|
|
371
|
-
width: 11.111111%;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
345
|
// 对齐
|
|
375
346
|
&[ui-flex~='lt'] {
|
|
376
347
|
justify-content: flex-start;
|
package/core/reset.scss
CHANGED
package/core/theme.scss
CHANGED
|
@@ -174,7 +174,7 @@ $theme: if(
|
|
|
174
174
|
$n: nth($i, 1);
|
|
175
175
|
$s: nth($i, 2);
|
|
176
176
|
@if ($n == $f) {
|
|
177
|
-
|
|
177
|
+
:root {
|
|
178
178
|
@each $c in $s {
|
|
179
179
|
$k: nth($c, 1);
|
|
180
180
|
$v: nth($c, 2);
|
|
@@ -202,53 +202,29 @@ $theme: if(
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}
|
|
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
205
|
}
|
|
239
206
|
} @else {
|
|
240
207
|
[theme~='#{$n}'] {
|
|
241
208
|
@each $c in $s {
|
|
242
209
|
$k: nth($c, 1);
|
|
243
210
|
$v: nth($c, 2);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
211
|
+
--#{$k}: #{red($v), green($v), blue($v)};
|
|
212
|
+
--co-#{$k}: #{$v};
|
|
247
213
|
|
|
248
214
|
$ls: 0.05;
|
|
249
215
|
@each $l in $levels {
|
|
250
216
|
// 透明度
|
|
251
|
-
|
|
217
|
+
@if ($k != 'none') {
|
|
218
|
+
--co-#{$k}-#{$l}: #{rgba($v, $ls)};
|
|
219
|
+
|
|
220
|
+
@if ($k != 'w' and $k != 'b') {
|
|
221
|
+
--co-#{$k}-fore-#{$l}: #{mix($v, map-get($s, 'fore'), $ls * 100%)};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk') {
|
|
225
|
+
--co-#{$k}-text-#{$l}: #{mix($v, map-get($s, 'text'), $ls * 100%)};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
252
228
|
@if ($ls <= 0.1 or $ls >= 0.8) {
|
|
253
229
|
$ls: $ls + 0.05;
|
|
254
230
|
} @else {
|
|
@@ -256,28 +232,6 @@ $theme: if(
|
|
|
256
232
|
}
|
|
257
233
|
}
|
|
258
234
|
}
|
|
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
235
|
}
|
|
282
236
|
}
|
|
283
237
|
}
|
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;
|