@neatui/css 1.0.2
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 +1 -0
- package/all.scss +22 -0
- package/anim/am-loading.scss +220 -0
- package/anim/am-rotate.scss +17 -0
- package/anim/am-view-aa.scss +91 -0
- package/anim/am-view-ab.scss +107 -0
- package/anim/am-view-ac.scss +114 -0
- package/anim/am-view-ad.scss +109 -0
- package/anim/am-view-ae.scss +109 -0
- package/anim/am-view-af.scss +104 -0
- package/anim/am-view-ag.scss +1789 -0
- package/anim/am-view-ah.scss +122 -0
- package/anim/am-view-ai.scss +116 -0
- package/anim/am-view-aj.scss +112 -0
- package/anim/am-view-ak.scss +102 -0
- package/anim/am-view-al.scss +98 -0
- package/anim/am-view-am.scss +97 -0
- package/anim/am-view-an.scss +109 -0
- package/anim/am-view-ao.scss +123 -0
- package/anim/am-view-ap.scss +108 -0
- package/anim/am-view-aq.scss +115 -0
- package/anim/am-view-ar.scss +113 -0
- package/anim/am-view-as.scss +99 -0
- package/anim/am-view-at.scss +103 -0
- package/anim/mcui@anim.scss +22 -0
- package/anim/package.json +16 -0
- package/badge/badge@theme=aa.scss +36 -0
- package/badge/package.json +22 -0
- package/btns/README.md +79 -0
- package/btns/base.scss +152 -0
- package/btns/btns@a.scss +469 -0
- package/btns/btns@b.scss +187 -0
- package/btns/btns@c.scss +169 -0
- package/btns/mcui@btns.scss +3 -0
- package/btns/package.json +16 -0
- package/card/card@a.scss +238 -0
- package/card/card@b.scss +75 -0
- package/card/mcui@card.scss +2 -0
- package/card/package.json +15 -0
- package/chat/chat@a.scss +139 -0
- package/chat/mcui@chat.scss +1 -0
- package/chat/package.json +11 -0
- package/cite/cite@a.scss +33 -0
- package/cite/package.json +11 -0
- package/core/README.md +142 -0
- package/core/base.scss +544 -0
- package/core/border.scss +307 -0
- package/core/color.scss +245 -0
- package/core/cols.scss +148 -0
- package/core/cover.scss +94 -0
- package/core/flex.scss +616 -0
- package/core/line.scss +4 -0
- package/core/margin.scss +0 -0
- package/core/mcui@core.scss +36 -0
- package/core/mcui@mobile.scss +37 -0
- package/core/media.scss +268 -0
- package/core/package.json +16 -0
- package/core/padding.scss +0 -0
- package/core/pos.scss +252 -0
- package/core/reset.scss +165 -0
- package/core/scale.scss +24 -0
- package/core/scroll.scss +178 -0
- package/core/shadow.scss +81 -0
- package/core/size.mobile.scss +105 -0
- package/core/size.scss +178 -0
- package/core/theme.scss +156 -0
- package/core/trim.mobile.scss +327 -0
- package/core/trim.scss +443 -0
- package/core/ux.scss +334 -0
- package/demo/demo@a.scss +34 -0
- package/demo/mcui@demo.scss +1 -0
- package/form/README.md +142 -0
- package/form/base.scss +425 -0
- package/form/form@a/base.scss +33 -0
- package/form/form@a/checkbox.scss +194 -0
- package/form/form@a/date.scss +86 -0
- package/form/form@a/index.scss +9 -0
- package/form/form@a/input.scss +156 -0
- package/form/form@a/radio.scss +99 -0
- package/form/form@a/select.scss +128 -0
- package/form/form@a/switch.scss +83 -0
- package/form/form@a/textarea.scss +105 -0
- package/form/form@a/upload.scss +162 -0
- package/form/form@b/base.scss +33 -0
- package/form/form@b/checkbox.scss +86 -0
- package/form/form@b/date.scss +107 -0
- package/form/form@b/index.scss +9 -0
- package/form/form@b/input.scss +163 -0
- package/form/form@b/radio.scss +90 -0
- package/form/form@b/select.scss +124 -0
- package/form/form@b/switch.scss +83 -0
- package/form/form@b/textarea.scss +105 -0
- package/form/form@b/upload.scss +160 -0
- package/form/form@c/base.scss +44 -0
- package/form/form@c/checkbox.scss +90 -0
- package/form/form@c/date.scss +125 -0
- package/form/form@c/index.scss +9 -0
- package/form/form@c/input.scss +169 -0
- package/form/form@c/radio.scss +84 -0
- package/form/form@c/select.scss +121 -0
- package/form/form@c/switch.scss +83 -0
- package/form/form@c/textarea.scss +85 -0
- package/form/form@c/upload.scss +159 -0
- package/form/form@d/base.scss +45 -0
- package/form/form@d/checkbox.scss +87 -0
- package/form/form@d/date.scss +125 -0
- package/form/form@d/index.scss +9 -0
- package/form/form@d/input.scss +346 -0
- package/form/form@d/radio.scss +81 -0
- package/form/form@d/select.scss +121 -0
- package/form/form@d/switch.scss +83 -0
- package/form/form@d/textarea.scss +104 -0
- package/form/form@d/upload.scss +160 -0
- package/form/mcui@form.scss +4 -0
- package/form/package.json +22 -0
- package/form/radio@theme=aa.scss +74 -0
- package/grid/grid@a.scss +54 -0
- package/grid/mcui@grid.scss +1 -0
- package/grid/package.json +16 -0
- package/icon/icon@add.scss +9 -0
- package/icon/icon@close.scss +12 -0
- package/icon/icon@down.scss +9 -0
- package/icon/icon@download.scss +26 -0
- package/icon/icon@drag.scss +9 -0
- package/icon/icon@except.scss +9 -0
- package/icon/icon@hook.scss +16 -0
- package/icon/icon@left.scss +9 -0
- package/icon/icon@link.scss +14 -0
- package/icon/icon@menu.scss +10 -0
- package/icon/icon@minus.scss +7 -0
- package/icon/icon@more.scss +8 -0
- package/icon/icon@omit.scss +8 -0
- package/icon/icon@quit.scss +11 -0
- package/icon/icon@refresh.scss +11 -0
- package/icon/icon@right.scss +9 -0
- package/icon/icon@search.scss +9 -0
- package/icon/icon@time.scss +12 -0
- package/icon/icon@top.scss +9 -0
- package/icon/icon@upload.scss +26 -0
- package/icon/icon@view.scss +20 -0
- package/icon/mcui@icon.scss +21 -0
- package/icon/package.json +15 -0
- package/imgs/README.md +78 -0
- package/imgs/base.scss +8 -0
- package/imgs/imgs@a.scss +171 -0
- package/imgs/imgs@b.scss +173 -0
- package/imgs/mcui@imgs.scss +1 -0
- package/imgs/package.json +16 -0
- package/index.js +28 -0
- package/line/line@a.scss +51 -0
- package/line/line@b.scss +63 -0
- package/line/mcui@line.scss +2 -0
- package/line/package.json +16 -0
- package/list/list@a.scss +62 -0
- package/list/list@b.scss +83 -0
- package/list/list@c.scss +89 -0
- package/list/mcui@list.scss +2 -0
- package/list/package.json +16 -0
- package/load/README.md +69 -0
- package/load/load@a.scss +44 -0
- package/load/load@b.scss +56 -0
- package/load/load@c.scss +270 -0
- package/load/load@d.scss +26 -0
- package/load/load@e.scss +24 -0
- package/load/load@f.scss +124 -0
- package/load/load@g.scss +35 -0
- package/load/load@h.scss +51 -0
- package/load/load@i.scss +51 -0
- package/load/mcui@load.scss +8 -0
- package/load/package.json +16 -0
- package/menu/mcui@menu.scss +1 -0
- package/menu/menu@b.scss +302 -0
- package/menu/menu@theme=ab.scss +282 -0
- package/menu/package.json +22 -0
- package/navs/README.md +30 -0
- package/navs/mcui@navs.scss +2 -0
- package/navs/navs@a.scss +113 -0
- package/navs/navs@b.scss +111 -0
- package/navs/package.json +16 -0
- package/note/mcui@note.scss +2 -0
- package/note/note@a.scss +26 -0
- package/note/note@b.scss +33 -0
- package/note/package.json +11 -0
- package/opts/mcui@opts.scss +1 -0
- package/opts/opts@a.scss +52 -0
- package/opts/package.json +11 -0
- package/package.json +26 -0
- package/paging/mc-paging-ui1503.scss +106 -0
- package/paging/mc-paging.scss +432 -0
- package/paging/paging@theme=aa.scss +45 -0
- package/path/README.md +142 -0
- package/path/mcui@path.scss +1 -0
- package/path/package.json +22 -0
- package/path/path@a.scss +38 -0
- package/side/mcui@side.scss +0 -0
- package/side/side.scss +2 -0
- package/steps/mcui@steps.scss +2 -0
- package/steps/package.json +17 -0
- package/steps/steps@a.scss +89 -0
- package/steps/steps@v.scss +122 -0
- package/table/base.scss +140 -0
- package/table/mcui@table.scss +3 -0
- package/table/package.json +22 -0
- package/table/table@a.scss +230 -0
- package/table/table@b.scss +78 -0
- package/table/table@c.scss +18 -0
- package/tabs/README.md +62 -0
- package/tabs/mcui@tabs.scss +1 -0
- package/tabs/package.json +22 -0
- package/tabs/tabs@a.scss +62 -0
- package/tags/README.md +71 -0
- package/tags/mcui@tags.scss +2 -0
- package/tags/package.json +22 -0
- package/tags/tags@a.scss +125 -0
- package/tags/tags@b.scss +131 -0
- package/tips/README.md +62 -0
- package/tips/base.scss +351 -0
- package/tips/mcui@tips.scss +1 -0
- package/tips/package.json +22 -0
- package/tips/tips@a.scss +52 -0
- package/title/mcui@title.scss +2 -0
- package/title/package.json +15 -0
- package/title/title@a.scss +18 -0
- package/title/title@b.scss +7 -0
- package/user/mcui@user.scss +0 -0
- package/user/user@a.scss +7 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
/**
|
|
2
|
+
属性 描述
|
|
3
|
+
disabled 规定输入字段应该被禁用。
|
|
4
|
+
max 规定输入字段的最大值。
|
|
5
|
+
maxlength 规定输入字段的最大字符数。
|
|
6
|
+
min 规定输入字段的最小值。
|
|
7
|
+
pattern 规定通过其检查输入值的正则表达式。
|
|
8
|
+
readonly 规定输入字段为只读(无法修改)。
|
|
9
|
+
required 规定输入字段是必需的(必需填写)。
|
|
10
|
+
size 规定输入字段的宽度(以字符计)。
|
|
11
|
+
step 规定输入字段的合法数字间隔。
|
|
12
|
+
value 规定输入字段的默认值。
|
|
13
|
+
*/
|
|
14
|
+
@use 'sass:math';
|
|
15
|
+
$co: 'main', 'text', 'read', 'note', 'idle', 'case', 'line', 'info', 'well', 'warn', 'risk';
|
|
16
|
+
$sz: 'xs', 's', 'm', 'l', 'xl';
|
|
17
|
+
|
|
18
|
+
[ui-form~='@d'] {
|
|
19
|
+
&[ui-form~='type:input'] {
|
|
20
|
+
position: relative;
|
|
21
|
+
min-width: 6em;
|
|
22
|
+
height: 100%;
|
|
23
|
+
height: 2.5em;
|
|
24
|
+
line-height: 1.5em;
|
|
25
|
+
padding: 0.5em 0;
|
|
26
|
+
transition: all 0.5s;
|
|
27
|
+
@include theme {
|
|
28
|
+
box-shadow: inset 0 -1px 0 0 co(case);
|
|
29
|
+
background-color: co(fore);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
align-items: center;
|
|
35
|
+
|
|
36
|
+
& > * {
|
|
37
|
+
position: relative;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
@include theme {
|
|
42
|
+
box-shadow: inset 0 -1px 0 0 rgba(co(main), 0.5);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.form-focus,
|
|
47
|
+
&:focus-within {
|
|
48
|
+
@include theme {
|
|
49
|
+
background-color: co(fore);
|
|
50
|
+
box-shadow:
|
|
51
|
+
inset 0 -1px 0 0 rgba(co(main), 0.5),
|
|
52
|
+
0 2px 0 0 rgba(co(main), 0.15);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
input {
|
|
57
|
+
flex-shrink: 1;
|
|
58
|
+
flex-grow: 1;
|
|
59
|
+
// 未知原因如果不设宽度会把 ui-form-subffix 挤出框外
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
padding: 0 0.25em;
|
|
63
|
+
border: 0;
|
|
64
|
+
background-color: transparent;
|
|
65
|
+
|
|
66
|
+
// 清除数字箭头
|
|
67
|
+
&[type='number'] {
|
|
68
|
+
// 火狐内核
|
|
69
|
+
appearance: textfield;
|
|
70
|
+
// 谷歌内核
|
|
71
|
+
&::-webkit-inner-spin-button,
|
|
72
|
+
&::-webkit-outer-spin-button {
|
|
73
|
+
appearance: none;
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:-webkit-autofill {
|
|
79
|
+
@include theme {
|
|
80
|
+
box-shadow: 0 0 0 1000px co(fore) inset;
|
|
81
|
+
color: co(read);
|
|
82
|
+
-webkit-text-fill-color: co(read);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&::-webkit-input-placeholder {
|
|
87
|
+
@include theme {
|
|
88
|
+
color: rgba(co(read), 0.5);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 前缀后缀
|
|
94
|
+
[ui-form-prefix],
|
|
95
|
+
[ui-form-suffix] {
|
|
96
|
+
position: relative;
|
|
97
|
+
line-height: 1;
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
align-content: center;
|
|
101
|
+
flex-shrink: 0;
|
|
102
|
+
|
|
103
|
+
& > * {
|
|
104
|
+
min-width: 1em;
|
|
105
|
+
margin: 0 0.25em;
|
|
106
|
+
height: 1em;
|
|
107
|
+
flex-shrink: 0;
|
|
108
|
+
transition:
|
|
109
|
+
transform 0.15s,
|
|
110
|
+
opacity 0.5s;
|
|
111
|
+
opacity: 0.8;
|
|
112
|
+
// &:hover {
|
|
113
|
+
// opacity: 1;
|
|
114
|
+
// transform: scale3d(1.1, 1.1, 1);
|
|
115
|
+
// }
|
|
116
|
+
// &:active,
|
|
117
|
+
// &:hover:active {
|
|
118
|
+
// transform: scale3d(0.95, 0.95, 1);
|
|
119
|
+
// }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
[ui-form-suffix] {
|
|
123
|
+
justify-content: end;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// 查看密码
|
|
127
|
+
[ui-form-cipher] {
|
|
128
|
+
@include theme {
|
|
129
|
+
color: co(note);
|
|
130
|
+
}
|
|
131
|
+
background:
|
|
132
|
+
radial-gradient(at 50% 50%, transparent 53%, currentColor 56%, currentColor 67%, transparent 70%) no-repeat center / 100% 75%,
|
|
133
|
+
radial-gradient(circle at 50% 50%, transparent 15%, currentColor 18%, currentColor 27%, transparent 30%),
|
|
134
|
+
linear-gradient(-45deg, transparent 44%, currentColor 47%, currentColor 53%, transparent 56%) no-repeat center / 75% 75%;
|
|
135
|
+
}
|
|
136
|
+
[type='password'] + * > [ui-form-cipher] {
|
|
137
|
+
background:
|
|
138
|
+
radial-gradient(at 50% 50%, transparent 53%, currentColor 56%, currentColor 67%, transparent 70%) no-repeat center / 100% 75%,
|
|
139
|
+
radial-gradient(circle at 50% 50%, transparent 15%, currentColor 18%, currentColor 27%, transparent 30%);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// 验证
|
|
143
|
+
[ui-form-verify] {
|
|
144
|
+
& {
|
|
145
|
+
position: absolute;
|
|
146
|
+
display: block;
|
|
147
|
+
width: 1em;
|
|
148
|
+
height: 1em;
|
|
149
|
+
right: -1.5em;
|
|
150
|
+
top: 50%;
|
|
151
|
+
margin-top: -0.5em;
|
|
152
|
+
|
|
153
|
+
&:before,
|
|
154
|
+
&:after {
|
|
155
|
+
position: absolute;
|
|
156
|
+
content: '';
|
|
157
|
+
display: block;
|
|
158
|
+
background-color: currentColor;
|
|
159
|
+
border-radius: 10rem;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&[ui-form-verify~='ok'] {
|
|
164
|
+
@include theme {
|
|
165
|
+
color: co(well);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@keyframes am-verify-ok-1 {
|
|
169
|
+
0% {
|
|
170
|
+
transform: rotate(43deg) scale3d(0, 1, 1);
|
|
171
|
+
}
|
|
172
|
+
40%,
|
|
173
|
+
100% {
|
|
174
|
+
transform: rotate(43deg) scale3d(1, 1, 1);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@keyframes am-verify-ok-2 {
|
|
179
|
+
0%,
|
|
180
|
+
40% {
|
|
181
|
+
transform: rotate(-53deg) scale3d(0, 1, 1);
|
|
182
|
+
}
|
|
183
|
+
100% {
|
|
184
|
+
transform: rotate(-53deg) scale3d(1, 1, 1);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&::before {
|
|
189
|
+
width: 50%;
|
|
190
|
+
height: 10%;
|
|
191
|
+
left: 9%;
|
|
192
|
+
top: 32%;
|
|
193
|
+
transform: rotate(43deg);
|
|
194
|
+
background-color: currentColor;
|
|
195
|
+
transform-origin: 0% 100%;
|
|
196
|
+
animation: am-verify-ok-1 ease-out 0.5s both;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&::after {
|
|
200
|
+
width: 74%;
|
|
201
|
+
height: 10%;
|
|
202
|
+
left: 46.5%;
|
|
203
|
+
bottom: 24.5%;
|
|
204
|
+
transform-origin: 0% 100%;
|
|
205
|
+
transform: rotate(-53deg);
|
|
206
|
+
background-color: currentColor;
|
|
207
|
+
animation: am-verify-ok-2 ease-out 0.5s both;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
&[ui-form-verify~='no'] {
|
|
211
|
+
@include theme {
|
|
212
|
+
color: co(risk);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@keyframes am-no-1 {
|
|
216
|
+
0%,
|
|
217
|
+
50% {
|
|
218
|
+
transform: rotate(45deg) scale3d(0, 1, 1);
|
|
219
|
+
}
|
|
220
|
+
100% {
|
|
221
|
+
transform: rotate(45deg) scale3d(1, 1, 1);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@keyframes am-no-2 {
|
|
226
|
+
0% {
|
|
227
|
+
transform: rotate(-45deg) scale3d(0, 1, 1);
|
|
228
|
+
}
|
|
229
|
+
50%,
|
|
230
|
+
100% {
|
|
231
|
+
transform: rotate(-45deg) scale3d(1, 1, 1);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&::before {
|
|
236
|
+
width: 90%;
|
|
237
|
+
height: 10%;
|
|
238
|
+
left: 15%;
|
|
239
|
+
top: 11.5%;
|
|
240
|
+
transform: rotate(45deg);
|
|
241
|
+
background-color: currentColor;
|
|
242
|
+
transform-origin: 0% 100%;
|
|
243
|
+
animation: am-no-1 ease 0.6s both;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&::after {
|
|
247
|
+
width: 90%;
|
|
248
|
+
height: 10%;
|
|
249
|
+
right: 15%;
|
|
250
|
+
top: 11.5%;
|
|
251
|
+
transform-origin: 100% 100%;
|
|
252
|
+
transform: rotate(45deg);
|
|
253
|
+
background-color: currentColor;
|
|
254
|
+
animation: am-no-2 ease 0.6s both;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// 清理
|
|
260
|
+
[ui-form-clean] {
|
|
261
|
+
display: inline-block;
|
|
262
|
+
@include theme {
|
|
263
|
+
color: co(case);
|
|
264
|
+
background:
|
|
265
|
+
linear-gradient(45deg, transparent 40%, co(fore) 45%, co(fore) 55%, transparent 60%) no-repeat center / 38% 38%,
|
|
266
|
+
linear-gradient(-45deg, transparent 40%, co(fore) 45%, co(fore) 55%, transparent 60%) no-repeat center / 38% 38%,
|
|
267
|
+
radial-gradient(circle at 50% 50%, currentColor 53%, transparent 58%);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// 禁用
|
|
272
|
+
&[ui-form~='disabled'] {
|
|
273
|
+
cursor: not-allowed;
|
|
274
|
+
opacity: 0.5;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// 撑满
|
|
278
|
+
&[ui-form~=':block'] {
|
|
279
|
+
width: 100%;
|
|
280
|
+
flex-grow: 1;
|
|
281
|
+
flex-shrink: 1;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// 圆弧
|
|
285
|
+
&[ui-form~=':round'] {
|
|
286
|
+
border-radius: 50em;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// 颜色
|
|
290
|
+
@each $c in $co {
|
|
291
|
+
&[ui-form~='co:#{$c}'] {
|
|
292
|
+
@include theme {
|
|
293
|
+
color: mix(co($c), co(text), 85%);
|
|
294
|
+
box-shadow:
|
|
295
|
+
inset 0 -1px 0 0 rgba(co($c), 0.6),
|
|
296
|
+
0 2px 0 0 rgba(co($c), 0.15) !important;
|
|
297
|
+
background-color: transparent;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&[ui-form~='co:hover:#{$c}'] {
|
|
302
|
+
&:hover {
|
|
303
|
+
@include theme {
|
|
304
|
+
color: mix(co($c), co(text), 85%);
|
|
305
|
+
box-shadow:
|
|
306
|
+
inset 0 -1px 0 0 rgba(co($c), 0.6),
|
|
307
|
+
0 2px 0 0 rgba(co($c), 0.15) !important;
|
|
308
|
+
background-color: transparent;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&[ui-form~='co:focus:#{$c}'] {
|
|
314
|
+
&:focus-within {
|
|
315
|
+
@include theme {
|
|
316
|
+
color: mix(co($c), co(text), 85%);
|
|
317
|
+
box-shadow:
|
|
318
|
+
inset 0 -1px 0 0 rgba(co($c), 0.6),
|
|
319
|
+
0 2px 0 0 rgba(co($c), 0.15) !important;
|
|
320
|
+
background-color: transparent;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// 尺寸
|
|
327
|
+
$sz_base: 1.5em;
|
|
328
|
+
@each $s in $sz {
|
|
329
|
+
&[ui-form~='sz:#{$s}'] {
|
|
330
|
+
height: $sz_base;
|
|
331
|
+
padding: (($sz_base - 1) * 0.25) 0;
|
|
332
|
+
input {
|
|
333
|
+
padding: (($sz_base - 1) * 0.25) 0;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
$sz_base: $sz_base + 0.5;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// 搜索
|
|
340
|
+
[ui-form-search] {
|
|
341
|
+
background: radial-gradient(circle at 47% 45%, transparent 40%, currentColor 43%, currentColor 53%, transparent 56%),
|
|
342
|
+
radial-gradient(circle at 78% 78%, currentColor 5%, rgba(0, 0, 0, 0) 6%), radial-gradient(circle at 82% 82%, currentColor 5%, rgba(0, 0, 0, 0) 6%),
|
|
343
|
+
radial-gradient(circle at 85% 85%, currentColor 5%, rgba(0, 0, 0, 0) 6%);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
属性 描述
|
|
3
|
+
disabled 规定输入字段应该被禁用。
|
|
4
|
+
max 规定输入字段的最大值。
|
|
5
|
+
maxlength 规定输入字段的最大字符数。
|
|
6
|
+
min 规定输入字段的最小值。
|
|
7
|
+
pattern 规定通过其检查输入值的正则表达式。
|
|
8
|
+
readonly 规定输入字段为只读(无法修改)。
|
|
9
|
+
required 规定输入字段是必需的(必需填写)。
|
|
10
|
+
size 规定输入字段的宽度(以字符计)。
|
|
11
|
+
step 规定输入字段的合法数字间隔。
|
|
12
|
+
value 规定输入字段的默认值。
|
|
13
|
+
*/
|
|
14
|
+
@use 'sass:math';
|
|
15
|
+
$co: 'info', 'well', 'warn', 'risk';
|
|
16
|
+
|
|
17
|
+
// 动画
|
|
18
|
+
@keyframes am-radio {
|
|
19
|
+
0% {
|
|
20
|
+
transform: scale3d(1, 1, 1);
|
|
21
|
+
}
|
|
22
|
+
50% {
|
|
23
|
+
transform: scale3d(1.1, 1.1, 1);
|
|
24
|
+
}
|
|
25
|
+
100% {
|
|
26
|
+
transform: scale3d(1, 1, 1);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[ui-form~='@d'] {
|
|
31
|
+
// 单选框
|
|
32
|
+
&[ui-form~='type:radio'] {
|
|
33
|
+
position: relative;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
align-content: center;
|
|
37
|
+
flex-wrap: nowrap;
|
|
38
|
+
|
|
39
|
+
&[ui-form~='lt'] {
|
|
40
|
+
align-items: baseline;
|
|
41
|
+
[type='radio'] {
|
|
42
|
+
position: relative;
|
|
43
|
+
top: 0.15em;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&[ui-form~=':block'] {
|
|
48
|
+
display: flex;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[type='radio'] {
|
|
52
|
+
appearance: none;
|
|
53
|
+
font-size: inherit;
|
|
54
|
+
width: 1em;
|
|
55
|
+
height: 1em;
|
|
56
|
+
border: 0;
|
|
57
|
+
margin: 0;
|
|
58
|
+
padding: 0;
|
|
59
|
+
background: transparent;
|
|
60
|
+
box-shadow: inset 0 0 0 1px currentColor;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
|
|
64
|
+
&:checked {
|
|
65
|
+
background: radial-gradient(circle at 50% 50%, currentColor 38%, transparent 40%);
|
|
66
|
+
box-shadow: inset 0 0 0 1px currentColor;
|
|
67
|
+
animation: am-radio 0.3s;
|
|
68
|
+
&,
|
|
69
|
+
& + * {
|
|
70
|
+
@include theme {
|
|
71
|
+
color: co(main);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& + * {
|
|
77
|
+
margin-left: 0.2em;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
$sz: 'xs', 's', 'm', 'l', 'xl';
|
|
3
|
+
|
|
4
|
+
[ui-form~='@d'] {
|
|
5
|
+
&[ui-form~='type:select'] {
|
|
6
|
+
position: relative;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
min-width: 6em;
|
|
9
|
+
height: 2.5em;
|
|
10
|
+
line-height: 1.5em;
|
|
11
|
+
transition: all 0.5s;
|
|
12
|
+
|
|
13
|
+
// 下拉
|
|
14
|
+
[ui-form-select] {
|
|
15
|
+
width: 0.8em;
|
|
16
|
+
height: 0.8em;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
border-radius: 35%;
|
|
19
|
+
@include theme {
|
|
20
|
+
color: co(note);
|
|
21
|
+
}
|
|
22
|
+
background:
|
|
23
|
+
linear-gradient(45deg, transparent 51%, currentColor 52%, currentColor 67%, transparent 68%) no-repeat 23.5% 65% / 35% 50%,
|
|
24
|
+
linear-gradient(-45deg, transparent 51%, currentColor 52%, currentColor 67%, transparent 68%) no-repeat 76.5% 65% / 35% 50%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 下拉菜单
|
|
28
|
+
[ui-form-dropdown] {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 100%;
|
|
31
|
+
@include theme {
|
|
32
|
+
background: co(fore);
|
|
33
|
+
}
|
|
34
|
+
min-width: 100%;
|
|
35
|
+
max-height: 20rem;
|
|
36
|
+
left: 0;
|
|
37
|
+
margin-top: 0.5em;
|
|
38
|
+
padding: 0.5em;
|
|
39
|
+
border-radius: 0.25em;
|
|
40
|
+
box-shadow: 0 1px 0.3em 1px rgba(0, 0, 0, 0.1);
|
|
41
|
+
transform: translate3d(0, 1rem, 0);
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
opacity: 0;
|
|
44
|
+
transition: all 0.35s;
|
|
45
|
+
z-index: 1;
|
|
46
|
+
|
|
47
|
+
&::before {
|
|
48
|
+
content: '';
|
|
49
|
+
position: absolute;
|
|
50
|
+
width: 100%;
|
|
51
|
+
left: 0;
|
|
52
|
+
height: 1em;
|
|
53
|
+
bottom: 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&::after {
|
|
57
|
+
content: '';
|
|
58
|
+
position: absolute;
|
|
59
|
+
box-sizing: content-box;
|
|
60
|
+
width: 0.5em;
|
|
61
|
+
height: 0.5em;
|
|
62
|
+
@include theme {
|
|
63
|
+
background: co(fore);
|
|
64
|
+
}
|
|
65
|
+
top: -0.25em;
|
|
66
|
+
left: 50%;
|
|
67
|
+
margin-left: -0.25em;
|
|
68
|
+
transform: rotate(45deg);
|
|
69
|
+
box-shadow: -1px -1px 0.15em 0 rgba(0, 0, 0, 0.07);
|
|
70
|
+
z-index: -1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// &[ui-form-dropdown~='show'] {
|
|
74
|
+
// opacity: 1;
|
|
75
|
+
// transform: translate3d(0, 0, 0);
|
|
76
|
+
// pointer-events: auto;
|
|
77
|
+
// }
|
|
78
|
+
|
|
79
|
+
& > * {
|
|
80
|
+
padding: 0.5em;
|
|
81
|
+
transition: all 0.35s;
|
|
82
|
+
border-radius: 0.2em;
|
|
83
|
+
&:hover {
|
|
84
|
+
@include theme {
|
|
85
|
+
background: co(weak);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// 下拉菜单活动
|
|
91
|
+
&[ui-form-open~='show'],
|
|
92
|
+
&[ui-form~='ux:hover']:hover {
|
|
93
|
+
[ui-form-select],
|
|
94
|
+
.icon.icon-dropdown {
|
|
95
|
+
transform: rotate(180deg);
|
|
96
|
+
}
|
|
97
|
+
[ui-form-dropdown] {
|
|
98
|
+
opacity: 1;
|
|
99
|
+
transform: translate3d(0, 0, 0);
|
|
100
|
+
pointer-events: auto;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// 尺寸
|
|
105
|
+
$sz_base: 1.5em;
|
|
106
|
+
@each $s in $sz {
|
|
107
|
+
&[ui-form~='sz:#{$s}'] {
|
|
108
|
+
height: $sz_base;
|
|
109
|
+
}
|
|
110
|
+
$sz_base: $sz_base + 0.5;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
& > *,
|
|
114
|
+
[ui-form~='type:input'] {
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 100%;
|
|
117
|
+
min-width: auto;
|
|
118
|
+
vertical-align: middle;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
属性 描述
|
|
3
|
+
disabled 规定输入字段应该被禁用。
|
|
4
|
+
max 规定输入字段的最大值。
|
|
5
|
+
maxlength 规定输入字段的最大字符数。
|
|
6
|
+
min 规定输入字段的最小值。
|
|
7
|
+
pattern 规定通过其检查输入值的正则表达式。
|
|
8
|
+
readonly 规定输入字段为只读(无法修改)。
|
|
9
|
+
required 规定输入字段是必需的(必需填写)。
|
|
10
|
+
size 规定输入字段的宽度(以字符计)。
|
|
11
|
+
step 规定输入字段的合法数字间隔。
|
|
12
|
+
value 规定输入字段的默认值。
|
|
13
|
+
*/
|
|
14
|
+
@use 'sass:math';
|
|
15
|
+
$co: 'info', 'well', 'warn', 'risk';
|
|
16
|
+
|
|
17
|
+
@keyframes am-checked {
|
|
18
|
+
0% {
|
|
19
|
+
transform: scale3d(0.9, 0.9, 1);
|
|
20
|
+
}
|
|
21
|
+
50% {
|
|
22
|
+
transform: scale3d(1, 1, 1);
|
|
23
|
+
}
|
|
24
|
+
100% {
|
|
25
|
+
transform: scale3d(0.9, 0.9, 1);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 复选框
|
|
30
|
+
[ui-form~='@d'] {
|
|
31
|
+
&[ui-form~='type:switch'] {
|
|
32
|
+
position: relative;
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: baseline;
|
|
35
|
+
flex-wrap: nowrap;
|
|
36
|
+
|
|
37
|
+
&[ui-form~=':block'] {
|
|
38
|
+
display: flex;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[type='checkbox'] {
|
|
42
|
+
appearance: none;
|
|
43
|
+
font-size: inherit;
|
|
44
|
+
width: 1.5em;
|
|
45
|
+
height: 1em;
|
|
46
|
+
border: 0;
|
|
47
|
+
margin: 0;
|
|
48
|
+
padding: 0;
|
|
49
|
+
background: transparent;
|
|
50
|
+
box-shadow: inset 0 0 0 1px currentColor;
|
|
51
|
+
border-radius: 10em;
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
position: relative;
|
|
54
|
+
top: 0.15em;
|
|
55
|
+
@include theme {
|
|
56
|
+
background-color: co(fore);
|
|
57
|
+
}
|
|
58
|
+
background-image: radial-gradient(circle at 50% 50%, currentColor 28%, transparent 30%);
|
|
59
|
+
background-position-x: -0.2em;
|
|
60
|
+
transition:
|
|
61
|
+
all 0.3s,
|
|
62
|
+
background-position-x ease-out 0.3s;
|
|
63
|
+
|
|
64
|
+
&:checked {
|
|
65
|
+
@include theme {
|
|
66
|
+
background-color: co(main);
|
|
67
|
+
background-image: radial-gradient(circle at 50% 50%, co(fore) 28%, transparent 30%);
|
|
68
|
+
}
|
|
69
|
+
background-position-x: 0.2em;
|
|
70
|
+
&,
|
|
71
|
+
& + * {
|
|
72
|
+
@include theme {
|
|
73
|
+
color: co(main);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
& + * {
|
|
79
|
+
margin-left: 0.2em;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|