@neatui/css 3.0.13 → 3.2.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/components/btns/base.scss +2 -2
- package/components/btns/btns@a.scss +26 -56
- package/components/btns/btns@b.scss +393 -0
- package/components/btns/index.scss +1 -0
- package/components/form/form@a/checkbox.scss +3 -3
- package/components/form/form@a/switch.scss +1 -1
- package/components/form/form@a/textarea.scss +2 -2
- package/components/form/form@b/checkbox.scss +1 -1
- package/components/form/form@b/radio.scss +2 -2
- package/components/form/form@b/switch.scss +1 -1
- package/components/form/form@b/textarea.scss +2 -2
- package/components/form/form@c/checkbox.scss +1 -1
- package/components/form/form@c/input.scss +2 -2
- package/components/form/form@c/radio.scss +2 -2
- package/components/form/form@c/switch.scss +1 -1
- package/components/form/form@c/textarea.scss +2 -2
- package/components/form/form@d/checkbox.scss +2 -2
- package/components/form/form@d/switch.scss +1 -1
- package/components/form/form@d/textarea.scss +2 -2
- package/core/ux.scss +0 -2
- package/core/vars.scss +0 -2
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use './../../core/media.scss' as *;
|
|
3
3
|
|
|
4
4
|
$size: 'xs', 's', 'm', 'l', 'xl';
|
|
5
|
+
$type: none, main, vice, text, link, read, note, case, line, weak, back, info, well, warn, risk, w, b;
|
|
5
6
|
|
|
6
7
|
[ui-btn] {
|
|
7
8
|
& {
|
|
@@ -15,7 +16,6 @@ $size: 'xs', 's', 'm', 'l', 'xl';
|
|
|
15
16
|
|
|
16
17
|
height: 2.5em;
|
|
17
18
|
padding: 0 1em;
|
|
18
|
-
border-radius: 0.25em;
|
|
19
19
|
cursor: pointer;
|
|
20
20
|
transition: all 50ms;
|
|
21
21
|
text-align: center;
|
|
@@ -24,7 +24,6 @@ $size: 'xs', 's', 'm', 'l', 'xl';
|
|
|
24
24
|
user-select: none;
|
|
25
25
|
white-space: nowrap;
|
|
26
26
|
color: inherit;
|
|
27
|
-
border: 1px solid currentColor;
|
|
28
27
|
background: var(--co-weak);
|
|
29
28
|
}
|
|
30
29
|
&.disabled {
|
|
@@ -117,6 +116,7 @@ $size: 'xs', 's', 'm', 'l', 'xl';
|
|
|
117
116
|
& > * {
|
|
118
117
|
&:active {
|
|
119
118
|
filter: brightness(0.85);
|
|
119
|
+
z-index: 1;
|
|
120
120
|
}
|
|
121
121
|
&[ui-btn~='am:s']:active {
|
|
122
122
|
transform: scale(0.98, 0.95);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
-
@
|
|
2
|
+
@use './base.scss' as *;
|
|
3
3
|
@use './../../core/media.scss' as *;
|
|
4
|
-
$size: xs, s, m, l, xl;
|
|
5
|
-
$type: none, main, vice, text, link, read, note, case, line, weak, back, info, well, warn, risk, w, b;
|
|
6
4
|
|
|
7
5
|
// 基础
|
|
8
|
-
%
|
|
6
|
+
%btnBaseA {
|
|
9
7
|
& {
|
|
10
8
|
position: relative;
|
|
11
9
|
display: inline-flex;
|
|
@@ -24,7 +22,7 @@ $type: none, main, vice, text, link, read, note, case, line, weak, back, info, w
|
|
|
24
22
|
user-select: none;
|
|
25
23
|
white-space: nowrap;
|
|
26
24
|
color: inherit;
|
|
27
|
-
|
|
25
|
+
border: 1px solid var(--co-line);
|
|
28
26
|
background: var(--co-weak);
|
|
29
27
|
}
|
|
30
28
|
|
|
@@ -41,7 +39,7 @@ $type: none, main, vice, text, link, read, note, case, line, weak, back, info, w
|
|
|
41
39
|
// 按钮
|
|
42
40
|
body [ui-btn~='@a'] {
|
|
43
41
|
// 基础样式
|
|
44
|
-
@extend %
|
|
42
|
+
@extend %btnBaseA;
|
|
45
43
|
|
|
46
44
|
// 绝对尺寸
|
|
47
45
|
&[ui-btn~=':abs'] {
|
|
@@ -58,16 +56,9 @@ body [ui-btn~='@a'] {
|
|
|
58
56
|
// 移入状态
|
|
59
57
|
&:hover,
|
|
60
58
|
&.active {
|
|
61
|
-
|
|
62
|
-
inset 0 0 0 1px var(--co-line),
|
|
63
|
-
inset 0 0 0 100em var(--co-text-xs);
|
|
59
|
+
border: 1px solid var(--co-line);
|
|
64
60
|
}
|
|
65
61
|
|
|
66
|
-
// 按下状态
|
|
67
|
-
// &:active {
|
|
68
|
-
// transform: scale(0.98);
|
|
69
|
-
// }
|
|
70
|
-
|
|
71
62
|
// 正方形按钮
|
|
72
63
|
&[ui-btn~=':square'] {
|
|
73
64
|
width: 2.5em;
|
|
@@ -85,9 +76,8 @@ body [ui-btn~='@a'] {
|
|
|
85
76
|
&,
|
|
86
77
|
&:hover {
|
|
87
78
|
opacity: 0.65;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
inset 0 0 0 100em rgba(0, 0, 0, 0);
|
|
79
|
+
border: 1px solid transparent;
|
|
80
|
+
box-shadow: inset 0 0 0 100em rgba(0, 0, 0, 0);
|
|
91
81
|
cursor: not-allowed;
|
|
92
82
|
}
|
|
93
83
|
&:active {
|
|
@@ -150,7 +140,6 @@ body [ui-btn~='@a'] {
|
|
|
150
140
|
|
|
151
141
|
&[ui-btn~=':abs'] {
|
|
152
142
|
height: #{$base}rem;
|
|
153
|
-
// line-height: #{$base}rem;
|
|
154
143
|
padding: 0 #{calc(($base - 0.5) / 2)}rem;
|
|
155
144
|
}
|
|
156
145
|
}
|
|
@@ -162,25 +151,19 @@ body [ui-btn~='@a'] {
|
|
|
162
151
|
// 按钮颜色
|
|
163
152
|
@each $name in $type {
|
|
164
153
|
&[ui-btn~='#{$name}'] {
|
|
165
|
-
@if ($name == 'none' or $name == '
|
|
166
|
-
// @include theme {
|
|
154
|
+
@if ($name == 'none' or $name == 'weak' or $name == 'back') {
|
|
167
155
|
background: var(--co-#{$name});
|
|
168
|
-
// }
|
|
169
156
|
color: inherit;
|
|
170
157
|
} @else {
|
|
171
|
-
// @include theme {
|
|
172
158
|
// 背景色
|
|
173
159
|
background: var(--co-#{$name});
|
|
174
160
|
color: var(--co-fore);
|
|
175
|
-
// }
|
|
176
161
|
}
|
|
177
|
-
|
|
162
|
+
border: 1px solid transparent;
|
|
178
163
|
|
|
179
164
|
&:hover,
|
|
180
165
|
&.active {
|
|
181
|
-
box-shadow:
|
|
182
|
-
inset 0 0 0 1px transparent,
|
|
183
|
-
inset 0 0 0 100em var(--co-text-xs);
|
|
166
|
+
box-shadow: inset 0 0 0 100em var(--co-text-xs);
|
|
184
167
|
}
|
|
185
168
|
|
|
186
169
|
// 边框式
|
|
@@ -191,13 +174,12 @@ body [ui-btn~='@a'] {
|
|
|
191
174
|
} @else {
|
|
192
175
|
color: var(--co-#{$name});
|
|
193
176
|
}
|
|
194
|
-
|
|
177
|
+
border: 1px solid var(--co-#{$name});
|
|
195
178
|
|
|
196
179
|
&:hover,
|
|
197
180
|
&.active {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
inset 0 0 0 100em var(--co-#{$name}-xs);
|
|
181
|
+
border: 1px solid var(--co-#{$name});
|
|
182
|
+
box-shadow: inset 0 0 0 100em var(--co-#{$name}-xs);
|
|
201
183
|
}
|
|
202
184
|
}
|
|
203
185
|
|
|
@@ -205,10 +187,10 @@ body [ui-btn~='@a'] {
|
|
|
205
187
|
&[ui-btn~=':underline'] {
|
|
206
188
|
color: var(--co-#{$name});
|
|
207
189
|
background: transparent;
|
|
208
|
-
|
|
190
|
+
border: 1px solid transparent;
|
|
209
191
|
|
|
210
192
|
&:hover {
|
|
211
|
-
|
|
193
|
+
border: 1px solid transparent;
|
|
212
194
|
text-decoration: underline;
|
|
213
195
|
}
|
|
214
196
|
}
|
|
@@ -252,7 +234,7 @@ body [ui-btn~='@a'] {
|
|
|
252
234
|
|
|
253
235
|
// 基础样式
|
|
254
236
|
& > * {
|
|
255
|
-
@extend %
|
|
237
|
+
@extend %btnBaseA;
|
|
256
238
|
}
|
|
257
239
|
|
|
258
240
|
&[ui-btns~=':flex'] > * {
|
|
@@ -275,16 +257,10 @@ body [ui-btn~='@a'] {
|
|
|
275
257
|
// 移入状态
|
|
276
258
|
& > *:hover,
|
|
277
259
|
& > *.active {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
inset 0 0 0 100em var(--co-text-xs);
|
|
260
|
+
border: 1px solid var(--co-line);
|
|
261
|
+
box-shadow: inset 0 0 0 100em var(--co-text-xs);
|
|
281
262
|
}
|
|
282
263
|
|
|
283
|
-
// 按下状态
|
|
284
|
-
// & > *:active {
|
|
285
|
-
// transform: scale(0.98, 0.95);
|
|
286
|
-
// }
|
|
287
|
-
|
|
288
264
|
// 正方形按钮
|
|
289
265
|
&[ui-btns~=':square'] > * {
|
|
290
266
|
width: 2.5em;
|
|
@@ -302,9 +278,8 @@ body [ui-btn~='@a'] {
|
|
|
302
278
|
&:hover,
|
|
303
279
|
&.active {
|
|
304
280
|
opacity: 0.65;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
inset 0 0 0 100em rgba(0, 0, 0, 0);
|
|
281
|
+
border: 1px solid transparent;
|
|
282
|
+
box-shadow: inset 0 0 0 100em rgba(0, 0, 0, 0);
|
|
308
283
|
cursor: not-allowed;
|
|
309
284
|
}
|
|
310
285
|
&:active {
|
|
@@ -388,14 +363,11 @@ body [ui-btn~='@a'] {
|
|
|
388
363
|
background: var(--co-#{$name});
|
|
389
364
|
color: var(--co-fore);
|
|
390
365
|
}
|
|
391
|
-
|
|
392
|
-
box-shadow: inset 0 0 0 1px transparent;
|
|
366
|
+
border: 1px solid transparent;
|
|
393
367
|
|
|
394
368
|
&:hover,
|
|
395
369
|
&.active {
|
|
396
|
-
box-shadow:
|
|
397
|
-
inset 0 0 0 1px transparent,
|
|
398
|
-
inset 0 0 0 100em var(--co-text-xs);
|
|
370
|
+
box-shadow: inset 0 0 0 100em var(--co-text-xs);
|
|
399
371
|
}
|
|
400
372
|
}
|
|
401
373
|
|
|
@@ -407,13 +379,11 @@ body [ui-btn~='@a'] {
|
|
|
407
379
|
} @else {
|
|
408
380
|
color: var(--co-#{$name});
|
|
409
381
|
}
|
|
410
|
-
|
|
382
|
+
border: 1px solid var(--co-#{$name});
|
|
411
383
|
|
|
412
384
|
&:hover,
|
|
413
385
|
&.active {
|
|
414
|
-
box-shadow:
|
|
415
|
-
inset 0 0 0 1px var(--co-#{$name}),
|
|
416
|
-
inset 0 0 0 100em var(--co-#{$name}-xs);
|
|
386
|
+
box-shadow: inset 0 0 0 100em var(--co-#{$name}-xs);
|
|
417
387
|
}
|
|
418
388
|
}
|
|
419
389
|
|
|
@@ -421,11 +391,11 @@ body [ui-btn~='@a'] {
|
|
|
421
391
|
&[ui-btns~=':underline'] > * {
|
|
422
392
|
color: var(--co-#{$name});
|
|
423
393
|
background: transparent;
|
|
424
|
-
|
|
394
|
+
border: 1px solid transparent;
|
|
425
395
|
|
|
426
396
|
&:hover,
|
|
427
397
|
&.active {
|
|
428
|
-
|
|
398
|
+
border: 1px solid transparent;
|
|
429
399
|
text-decoration: underline;
|
|
430
400
|
}
|
|
431
401
|
}
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use './base.scss' as *;
|
|
3
|
+
@use './../../core/media.scss' as *;
|
|
4
|
+
|
|
5
|
+
// 基础
|
|
6
|
+
%btnBaseB {
|
|
7
|
+
& {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
align-content: center;
|
|
14
|
+
height: 2.5em;
|
|
15
|
+
padding: 0 1em;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
transition: all 50ms;
|
|
18
|
+
text-align: center;
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
border: 0;
|
|
21
|
+
user-select: none;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
color: inherit;
|
|
24
|
+
border: 1px solid var(--co-line);
|
|
25
|
+
background: var(--co-weak);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
& > * {
|
|
29
|
+
&.icon {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
& + * {
|
|
32
|
+
margin-left: 0.2em;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 按钮
|
|
39
|
+
body [ui-btn~='@b'] {
|
|
40
|
+
// 基础样式
|
|
41
|
+
@extend %btnBaseB;
|
|
42
|
+
|
|
43
|
+
// 绝对尺寸
|
|
44
|
+
&[ui-btn~=':abs'] {
|
|
45
|
+
height: 2.5rem;
|
|
46
|
+
line-height: 2.5rem;
|
|
47
|
+
padding: 0 1rem;
|
|
48
|
+
}
|
|
49
|
+
// 圆弧按钮
|
|
50
|
+
&[ui-btn~=':round'] {
|
|
51
|
+
border-radius: 100em;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 移入状态
|
|
55
|
+
&:hover,
|
|
56
|
+
&.active {
|
|
57
|
+
border: 1px solid var(--co-line);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 正方形按钮
|
|
61
|
+
&[ui-btn~=':square'] {
|
|
62
|
+
width: 2.5em;
|
|
63
|
+
padding: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 块状按钮
|
|
67
|
+
&[ui-btn~=':block'] {
|
|
68
|
+
width: 100%;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// 禁用按钮
|
|
72
|
+
&[ui-btn~=':disabled'] {
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
&,
|
|
75
|
+
&:hover {
|
|
76
|
+
opacity: 0.65;
|
|
77
|
+
border: 1px solid transparent;
|
|
78
|
+
box-shadow: inset 0 0 0 100em rgba(0, 0, 0, 0);
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
}
|
|
81
|
+
&:active {
|
|
82
|
+
transform: scale(1, 1);
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 按钮尺寸
|
|
88
|
+
$base: 1.5;
|
|
89
|
+
@each $i in $size {
|
|
90
|
+
&[ui-btn~='#{$i}'] {
|
|
91
|
+
height: #{$base}em;
|
|
92
|
+
// line-height: #{$base}em;
|
|
93
|
+
padding: 0 #{calc(($base - 0.5) / 2)}em;
|
|
94
|
+
|
|
95
|
+
// 方形按钮
|
|
96
|
+
&[ui-btn~=':square'] {
|
|
97
|
+
width: #{$base}em;
|
|
98
|
+
padding: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&[ui-btn~=':abs'] {
|
|
102
|
+
height: #{$base}rem;
|
|
103
|
+
// line-height: #{$base}rem;
|
|
104
|
+
padding: 0 #{calc(($base - 0.5) / 2)}rem;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@include med('=mob') {
|
|
109
|
+
&[ui-btn~='mob-#{$i}'] {
|
|
110
|
+
height: #{$base}em;
|
|
111
|
+
// line-height: #{$base}em;
|
|
112
|
+
padding: 0 #{calc(($base - 0.5) / 2)}em;
|
|
113
|
+
|
|
114
|
+
// 方形按钮
|
|
115
|
+
&[ui-btn~=':square'] {
|
|
116
|
+
width: #{$base}em;
|
|
117
|
+
padding: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&[ui-btn~=':abs'] {
|
|
121
|
+
height: #{$base}rem;
|
|
122
|
+
// line-height: #{$base}rem;
|
|
123
|
+
padding: 0 #{calc(($base - 0.5) / 2)}rem;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
@include med('=pad') {
|
|
128
|
+
&[ui-btn~='pad-#{$i}'] {
|
|
129
|
+
height: #{$base}em;
|
|
130
|
+
// line-height: #{$base}em;
|
|
131
|
+
padding: 0 #{calc(($base - 0.5) / 2)}em;
|
|
132
|
+
|
|
133
|
+
// 方形按钮
|
|
134
|
+
&[ui-btn~=':square'] {
|
|
135
|
+
width: #{$base}em;
|
|
136
|
+
padding: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&[ui-btn~=':abs'] {
|
|
140
|
+
height: #{$base}rem;
|
|
141
|
+
padding: 0 #{calc(($base - 0.5) / 2)}rem;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
$base: $base + 0.5;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// 按钮颜色
|
|
150
|
+
@each $name in $type {
|
|
151
|
+
&[ui-btn~='#{$name}'] {
|
|
152
|
+
@if ($name == 'none' or $name == 'weak' or $name == 'back') {
|
|
153
|
+
background: var(--co-#{$name});
|
|
154
|
+
color: inherit;
|
|
155
|
+
} @else {
|
|
156
|
+
// 背景色
|
|
157
|
+
background: var(--co-#{$name});
|
|
158
|
+
color: var(--co-fore);
|
|
159
|
+
}
|
|
160
|
+
border: 1px solid transparent;
|
|
161
|
+
|
|
162
|
+
&:hover,
|
|
163
|
+
&.active {
|
|
164
|
+
box-shadow: inset 0 0 0 100em var(--co-text-xs);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// 边框式
|
|
168
|
+
&[ui-btn~=':border'] {
|
|
169
|
+
background: transparent;
|
|
170
|
+
@if ($name == 'line' or $name == 'case') {
|
|
171
|
+
color: var(--co-read);
|
|
172
|
+
} @else {
|
|
173
|
+
color: var(--co-#{$name});
|
|
174
|
+
}
|
|
175
|
+
border: 1px solid var(--co-#{$name});
|
|
176
|
+
|
|
177
|
+
&:hover,
|
|
178
|
+
&.active {
|
|
179
|
+
border: 1px solid var(--co-#{$name});
|
|
180
|
+
box-shadow: inset 0 0 0 100em var(--co-#{$name}-xs);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 下划线
|
|
185
|
+
&[ui-btn~=':underline'] {
|
|
186
|
+
color: var(--co-#{$name});
|
|
187
|
+
background: transparent;
|
|
188
|
+
border: 1px solid transparent;
|
|
189
|
+
|
|
190
|
+
&:hover {
|
|
191
|
+
border: 1px solid transparent;
|
|
192
|
+
text-decoration: underline;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// 群组
|
|
200
|
+
[ui-btns~='@b'] {
|
|
201
|
+
// 群组模式
|
|
202
|
+
&[ui-btns~=':group'] {
|
|
203
|
+
& > * {
|
|
204
|
+
border-radius: 0;
|
|
205
|
+
margin-right: -1px;
|
|
206
|
+
}
|
|
207
|
+
// 圆弧倒角
|
|
208
|
+
&[ui-btns~=':round'] > * {
|
|
209
|
+
border-radius: 0;
|
|
210
|
+
|
|
211
|
+
// 普通倒角
|
|
212
|
+
&:first-child {
|
|
213
|
+
border-radius: 100em 0 0 100em;
|
|
214
|
+
}
|
|
215
|
+
&:last-child {
|
|
216
|
+
border-radius: 0 100em 100em 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
& {
|
|
221
|
+
display: inline-flex;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// 基础样式
|
|
226
|
+
& > * {
|
|
227
|
+
@extend %btnBaseB;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&[ui-btns~=':flex'] > * {
|
|
231
|
+
display: inline-flex;
|
|
232
|
+
justify-content: center;
|
|
233
|
+
align-items: center;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// 绝对尺寸
|
|
237
|
+
&[ui-btns~=':abs'] > * {
|
|
238
|
+
height: 2.5rem;
|
|
239
|
+
padding: 0 1rem;
|
|
240
|
+
}
|
|
241
|
+
// 圆弧按钮
|
|
242
|
+
&[ui-btns~=':round'] > * {
|
|
243
|
+
border-radius: 100em;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// 移入状态
|
|
247
|
+
& > *:hover,
|
|
248
|
+
& > *.active {
|
|
249
|
+
border: 1px solid var(--co-line);
|
|
250
|
+
box-shadow: inset 0 0 0 100em var(--co-text-xs);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// 正方形按钮
|
|
254
|
+
&[ui-btns~=':square'] > * {
|
|
255
|
+
width: 2.5em;
|
|
256
|
+
padding: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// 块状按钮
|
|
260
|
+
&[ui-btns~=':block'] > * {
|
|
261
|
+
width: 100%;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// 禁用按钮
|
|
265
|
+
&[ui-btns~=':disabled'] > * {
|
|
266
|
+
&,
|
|
267
|
+
&:hover,
|
|
268
|
+
&.active {
|
|
269
|
+
opacity: 0.65;
|
|
270
|
+
border: 1px solid transparent;
|
|
271
|
+
box-shadow: inset 0 0 0 100em rgba(0, 0, 0, 0);
|
|
272
|
+
cursor: not-allowed;
|
|
273
|
+
}
|
|
274
|
+
&:active {
|
|
275
|
+
transform: scale(1, 1);
|
|
276
|
+
cursor: not-allowed;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// 按钮尺寸
|
|
281
|
+
$base: 1.5;
|
|
282
|
+
@each $i in $size {
|
|
283
|
+
&[ui-btns~='#{$i}'] {
|
|
284
|
+
& > * {
|
|
285
|
+
height: #{$base}em;
|
|
286
|
+
padding: 0 #{calc(($base - 0.5) / 2)}em;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// 方形按钮
|
|
290
|
+
&[ui-btns~=':square'] > * {
|
|
291
|
+
width: #{$base}em;
|
|
292
|
+
padding: 0;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&[ui-btns~=':abs'] > * {
|
|
296
|
+
height: #{$base}rem;
|
|
297
|
+
padding: 0 #{calc(($base - 0.5) / 2)}rem;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
@include med('=mob') {
|
|
302
|
+
&[ui-btns~='mob-#{$i}'] {
|
|
303
|
+
& > * {
|
|
304
|
+
height: #{$base}em;
|
|
305
|
+
padding: 0 #{calc(($base - 0.5) / 2)}em;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// 方形按钮
|
|
309
|
+
&[ui-btns~=':square'] > * {
|
|
310
|
+
width: #{$base}em;
|
|
311
|
+
padding: 0;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&[ui-btns~=':abs'] > * {
|
|
315
|
+
height: #{$base}rem;
|
|
316
|
+
padding: 0 #{calc(($base - 0.5) / 2)}rem;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
@include med('=pad') {
|
|
321
|
+
&[ui-btns~='pad-#{$i}'] {
|
|
322
|
+
& > * {
|
|
323
|
+
height: #{$base}em;
|
|
324
|
+
padding: 0 #{calc(($base - 0.5) / 2)}em;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// 方形按钮
|
|
328
|
+
&[ui-btns~=':square'] > * {
|
|
329
|
+
width: #{$base}em;
|
|
330
|
+
padding: 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&[ui-btns~=':abs'] > * {
|
|
334
|
+
height: #{$base}rem;
|
|
335
|
+
padding: 0 #{calc(($base - 0.5) / 2)}rem;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
$base: $base + 0.5;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// 按钮颜色
|
|
344
|
+
@each $name in $type {
|
|
345
|
+
&[ui-btns~='#{$name}'] {
|
|
346
|
+
& > * {
|
|
347
|
+
@if ($name == 'none' or $name == 'weak' or $name == 'back') {
|
|
348
|
+
background: var(--co-#{$name});
|
|
349
|
+
color: inherit;
|
|
350
|
+
} @else {
|
|
351
|
+
// 背景色
|
|
352
|
+
background: var(--co-#{$name});
|
|
353
|
+
color: var(--co-fore);
|
|
354
|
+
}
|
|
355
|
+
border: 1px solid transparent;
|
|
356
|
+
|
|
357
|
+
&:hover,
|
|
358
|
+
&.active {
|
|
359
|
+
box-shadow: inset 0 0 0 100em var(--co-text-xs);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// 边框式
|
|
364
|
+
&[ui-btns~=':border'] > * {
|
|
365
|
+
background: transparent;
|
|
366
|
+
@if ($name == 'line') {
|
|
367
|
+
color: var(--co-read);
|
|
368
|
+
} @else {
|
|
369
|
+
color: var(--co-#{$name});
|
|
370
|
+
}
|
|
371
|
+
border: 1px solid var(--co-#{$name});
|
|
372
|
+
|
|
373
|
+
&:hover,
|
|
374
|
+
&.active {
|
|
375
|
+
box-shadow: inset 0 0 0 100em var(--co-#{$name}-xs);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// 下划线
|
|
380
|
+
&[ui-btns~=':underline'] > * {
|
|
381
|
+
color: var(--co-#{$name});
|
|
382
|
+
background: transparent;
|
|
383
|
+
border: 1px solid transparent;
|
|
384
|
+
|
|
385
|
+
&:hover,
|
|
386
|
+
&.active {
|
|
387
|
+
border: 1px solid transparent;
|
|
388
|
+
text-decoration: underline;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
@@ -41,14 +41,14 @@ value 规定输入字段的默认值。
|
|
|
41
41
|
margin: 0;
|
|
42
42
|
padding: 0;
|
|
43
43
|
background: transparent;
|
|
44
|
-
|
|
44
|
+
border: 1px solid currentColor;
|
|
45
45
|
border-radius: 0.2em;
|
|
46
46
|
flex-shrink: 0;
|
|
47
47
|
transform: scale3d(0.95, 0.95, 1);
|
|
48
48
|
|
|
49
49
|
// &.part-selected {
|
|
50
50
|
// @include theme {
|
|
51
|
-
//
|
|
51
|
+
// border: 1px solid var(--co-main);
|
|
52
52
|
// }
|
|
53
53
|
// &::before {
|
|
54
54
|
// width: 50%;
|
|
@@ -132,7 +132,7 @@ value 规定输入字段的默认值。
|
|
|
132
132
|
&.part-checked,
|
|
133
133
|
&[part-checked] {
|
|
134
134
|
background-color: var(--co-main);
|
|
135
|
-
|
|
135
|
+
border: 1px solid var(--co-main);
|
|
136
136
|
|
|
137
137
|
&::before {
|
|
138
138
|
width: 50%;
|
|
@@ -24,13 +24,13 @@ value 规定输入字段的默认值。
|
|
|
24
24
|
transition: all 0.5s;
|
|
25
25
|
|
|
26
26
|
// @include theme {
|
|
27
|
-
|
|
27
|
+
border: 1px solid var(--co-case);
|
|
28
28
|
background-color: var(--co-fore);
|
|
29
29
|
// }
|
|
30
30
|
|
|
31
31
|
&:hover {
|
|
32
32
|
// @include theme {
|
|
33
|
-
|
|
33
|
+
border: 1px solid var(--co-main-mm);
|
|
34
34
|
// }
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -56,7 +56,7 @@ value 规定输入字段的默认值。
|
|
|
56
56
|
margin: 0;
|
|
57
57
|
padding: 0;
|
|
58
58
|
background: transparent;
|
|
59
|
-
|
|
59
|
+
border: 1px solid currentColor;
|
|
60
60
|
border-radius: 50%;
|
|
61
61
|
flex-shrink: 0;
|
|
62
62
|
|
|
@@ -71,7 +71,7 @@ value 规定输入字段的默认值。
|
|
|
71
71
|
radial-gradient(circle at 66.8% 37%, currentColor 5%, transparent 6%), radial-gradient(circle at 70% 32.5%, currentColor 4.5%, transparent 5.5%),
|
|
72
72
|
radial-gradient(circle at 73.8% 28%, currentColor 3.9%, transparent 4.9%), radial-gradient(circle at 77.5% 23.7%, currentColor 3.4%, transparent 4.4%),
|
|
73
73
|
radial-gradient(circle at 81% 19.5%, currentColor 3%, transparent 4%), radial-gradient(circle at 85% 15.2%, currentColor 2.5%, transparent 3.5%);
|
|
74
|
-
|
|
74
|
+
border: 1px solid currentColor;
|
|
75
75
|
animation: am-b-radio 0.3s;
|
|
76
76
|
&,
|
|
77
77
|
& + * {
|
|
@@ -23,11 +23,11 @@ value 规定输入字段的默认值。
|
|
|
23
23
|
border-radius: 0.25em;
|
|
24
24
|
transition: all 0.5s;
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
border: 1px solid var(--co-case);
|
|
27
27
|
background-color: var(--co-fore);
|
|
28
28
|
|
|
29
29
|
&:hover {
|
|
30
|
-
|
|
30
|
+
border: 1px solid var(--co-main-mm);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&.form-focus,
|
|
@@ -25,7 +25,7 @@ value 规定输入字段的默认值。
|
|
|
25
25
|
border-radius: 0.25em;
|
|
26
26
|
transition: all 0.5s;
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// border: 1px solid var(--co-case);
|
|
29
29
|
background-color: var(--bg-weak);
|
|
30
30
|
|
|
31
31
|
display: inline-flex;
|
|
@@ -37,7 +37,7 @@ value 规定输入字段的默认值。
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&:hover {
|
|
40
|
-
|
|
40
|
+
border: 1px solid var(--co-main-mm);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&.form-focus,
|
|
@@ -56,7 +56,7 @@ value 规定输入字段的默认值。
|
|
|
56
56
|
margin: 0;
|
|
57
57
|
padding: 0;
|
|
58
58
|
background: transparent;
|
|
59
|
-
|
|
59
|
+
border: 1px solid currentColor;
|
|
60
60
|
border-radius: 50%;
|
|
61
61
|
flex-shrink: 0;
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ value 规定输入字段的默认值。
|
|
|
64
64
|
|
|
65
65
|
&:checked {
|
|
66
66
|
background-image: radial-gradient(circle at 50% 50%, currentColor 38%, transparent 40%);
|
|
67
|
-
|
|
67
|
+
border: 1px solid currentColor;
|
|
68
68
|
animation: am-radio 0.3s;
|
|
69
69
|
&,
|
|
70
70
|
& + * {
|
|
@@ -24,11 +24,11 @@ value 规定输入字段的默认值。
|
|
|
24
24
|
transition: all 0.5s;
|
|
25
25
|
background-color: transparent;
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
border: 1px solid var(--co-case);
|
|
28
28
|
background-color: var(--bg-weak);
|
|
29
29
|
|
|
30
30
|
&:hover {
|
|
31
|
-
|
|
31
|
+
border: 1px solid var(--co-main-mm);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
&.form-focus,
|
|
@@ -42,7 +42,7 @@ value 规定输入字段的默认值。
|
|
|
42
42
|
margin: 0;
|
|
43
43
|
padding: 0;
|
|
44
44
|
background: transparent;
|
|
45
|
-
//
|
|
45
|
+
// border: 1px solid currentColor;
|
|
46
46
|
border-radius: 0.2em;
|
|
47
47
|
flex-shrink: 0;
|
|
48
48
|
transform: scale3d(0.95, 0.95, 1);
|
|
@@ -116,7 +116,7 @@ value 规定输入字段的默认值。
|
|
|
116
116
|
// 半选
|
|
117
117
|
&.part-checked,
|
|
118
118
|
&[part-checked] {
|
|
119
|
-
|
|
119
|
+
border: 1px solid var(--co-main);
|
|
120
120
|
|
|
121
121
|
&::before {
|
|
122
122
|
width: 50%;
|
|
@@ -24,13 +24,13 @@ value 规定输入字段的默认值。
|
|
|
24
24
|
transition: all 0.5s;
|
|
25
25
|
|
|
26
26
|
// @include theme {
|
|
27
|
-
|
|
27
|
+
border: 1px solid var(--co-case);
|
|
28
28
|
background-color: var(--co-fore);
|
|
29
29
|
// }
|
|
30
30
|
|
|
31
31
|
&:hover {
|
|
32
32
|
// @include theme {
|
|
33
|
-
|
|
33
|
+
border: 1px solid var(--co-main-mm);
|
|
34
34
|
// }
|
|
35
35
|
}
|
|
36
36
|
|
package/core/ux.scss
CHANGED
package/core/vars.scss
CHANGED