@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.
Files changed (226) hide show
  1. package/README.md +1 -0
  2. package/all.scss +22 -0
  3. package/anim/am-loading.scss +220 -0
  4. package/anim/am-rotate.scss +17 -0
  5. package/anim/am-view-aa.scss +91 -0
  6. package/anim/am-view-ab.scss +107 -0
  7. package/anim/am-view-ac.scss +114 -0
  8. package/anim/am-view-ad.scss +109 -0
  9. package/anim/am-view-ae.scss +109 -0
  10. package/anim/am-view-af.scss +104 -0
  11. package/anim/am-view-ag.scss +1789 -0
  12. package/anim/am-view-ah.scss +122 -0
  13. package/anim/am-view-ai.scss +116 -0
  14. package/anim/am-view-aj.scss +112 -0
  15. package/anim/am-view-ak.scss +102 -0
  16. package/anim/am-view-al.scss +98 -0
  17. package/anim/am-view-am.scss +97 -0
  18. package/anim/am-view-an.scss +109 -0
  19. package/anim/am-view-ao.scss +123 -0
  20. package/anim/am-view-ap.scss +108 -0
  21. package/anim/am-view-aq.scss +115 -0
  22. package/anim/am-view-ar.scss +113 -0
  23. package/anim/am-view-as.scss +99 -0
  24. package/anim/am-view-at.scss +103 -0
  25. package/anim/mcui@anim.scss +22 -0
  26. package/anim/package.json +16 -0
  27. package/badge/badge@theme=aa.scss +36 -0
  28. package/badge/package.json +22 -0
  29. package/btns/README.md +79 -0
  30. package/btns/base.scss +152 -0
  31. package/btns/btns@a.scss +469 -0
  32. package/btns/btns@b.scss +187 -0
  33. package/btns/btns@c.scss +169 -0
  34. package/btns/mcui@btns.scss +3 -0
  35. package/btns/package.json +16 -0
  36. package/card/card@a.scss +238 -0
  37. package/card/card@b.scss +75 -0
  38. package/card/mcui@card.scss +2 -0
  39. package/card/package.json +15 -0
  40. package/chat/chat@a.scss +139 -0
  41. package/chat/mcui@chat.scss +1 -0
  42. package/chat/package.json +11 -0
  43. package/cite/cite@a.scss +33 -0
  44. package/cite/package.json +11 -0
  45. package/core/README.md +142 -0
  46. package/core/base.scss +544 -0
  47. package/core/border.scss +307 -0
  48. package/core/color.scss +245 -0
  49. package/core/cols.scss +148 -0
  50. package/core/cover.scss +94 -0
  51. package/core/flex.scss +616 -0
  52. package/core/line.scss +4 -0
  53. package/core/margin.scss +0 -0
  54. package/core/mcui@core.scss +36 -0
  55. package/core/mcui@mobile.scss +37 -0
  56. package/core/media.scss +268 -0
  57. package/core/package.json +16 -0
  58. package/core/padding.scss +0 -0
  59. package/core/pos.scss +252 -0
  60. package/core/reset.scss +165 -0
  61. package/core/scale.scss +24 -0
  62. package/core/scroll.scss +178 -0
  63. package/core/shadow.scss +81 -0
  64. package/core/size.mobile.scss +105 -0
  65. package/core/size.scss +178 -0
  66. package/core/theme.scss +156 -0
  67. package/core/trim.mobile.scss +327 -0
  68. package/core/trim.scss +443 -0
  69. package/core/ux.scss +334 -0
  70. package/demo/demo@a.scss +34 -0
  71. package/demo/mcui@demo.scss +1 -0
  72. package/form/README.md +142 -0
  73. package/form/base.scss +425 -0
  74. package/form/form@a/base.scss +33 -0
  75. package/form/form@a/checkbox.scss +194 -0
  76. package/form/form@a/date.scss +86 -0
  77. package/form/form@a/index.scss +9 -0
  78. package/form/form@a/input.scss +156 -0
  79. package/form/form@a/radio.scss +99 -0
  80. package/form/form@a/select.scss +128 -0
  81. package/form/form@a/switch.scss +83 -0
  82. package/form/form@a/textarea.scss +105 -0
  83. package/form/form@a/upload.scss +162 -0
  84. package/form/form@b/base.scss +33 -0
  85. package/form/form@b/checkbox.scss +86 -0
  86. package/form/form@b/date.scss +107 -0
  87. package/form/form@b/index.scss +9 -0
  88. package/form/form@b/input.scss +163 -0
  89. package/form/form@b/radio.scss +90 -0
  90. package/form/form@b/select.scss +124 -0
  91. package/form/form@b/switch.scss +83 -0
  92. package/form/form@b/textarea.scss +105 -0
  93. package/form/form@b/upload.scss +160 -0
  94. package/form/form@c/base.scss +44 -0
  95. package/form/form@c/checkbox.scss +90 -0
  96. package/form/form@c/date.scss +125 -0
  97. package/form/form@c/index.scss +9 -0
  98. package/form/form@c/input.scss +169 -0
  99. package/form/form@c/radio.scss +84 -0
  100. package/form/form@c/select.scss +121 -0
  101. package/form/form@c/switch.scss +83 -0
  102. package/form/form@c/textarea.scss +85 -0
  103. package/form/form@c/upload.scss +159 -0
  104. package/form/form@d/base.scss +45 -0
  105. package/form/form@d/checkbox.scss +87 -0
  106. package/form/form@d/date.scss +125 -0
  107. package/form/form@d/index.scss +9 -0
  108. package/form/form@d/input.scss +346 -0
  109. package/form/form@d/radio.scss +81 -0
  110. package/form/form@d/select.scss +121 -0
  111. package/form/form@d/switch.scss +83 -0
  112. package/form/form@d/textarea.scss +104 -0
  113. package/form/form@d/upload.scss +160 -0
  114. package/form/mcui@form.scss +4 -0
  115. package/form/package.json +22 -0
  116. package/form/radio@theme=aa.scss +74 -0
  117. package/grid/grid@a.scss +54 -0
  118. package/grid/mcui@grid.scss +1 -0
  119. package/grid/package.json +16 -0
  120. package/icon/icon@add.scss +9 -0
  121. package/icon/icon@close.scss +12 -0
  122. package/icon/icon@down.scss +9 -0
  123. package/icon/icon@download.scss +26 -0
  124. package/icon/icon@drag.scss +9 -0
  125. package/icon/icon@except.scss +9 -0
  126. package/icon/icon@hook.scss +16 -0
  127. package/icon/icon@left.scss +9 -0
  128. package/icon/icon@link.scss +14 -0
  129. package/icon/icon@menu.scss +10 -0
  130. package/icon/icon@minus.scss +7 -0
  131. package/icon/icon@more.scss +8 -0
  132. package/icon/icon@omit.scss +8 -0
  133. package/icon/icon@quit.scss +11 -0
  134. package/icon/icon@refresh.scss +11 -0
  135. package/icon/icon@right.scss +9 -0
  136. package/icon/icon@search.scss +9 -0
  137. package/icon/icon@time.scss +12 -0
  138. package/icon/icon@top.scss +9 -0
  139. package/icon/icon@upload.scss +26 -0
  140. package/icon/icon@view.scss +20 -0
  141. package/icon/mcui@icon.scss +21 -0
  142. package/icon/package.json +15 -0
  143. package/imgs/README.md +78 -0
  144. package/imgs/base.scss +8 -0
  145. package/imgs/imgs@a.scss +171 -0
  146. package/imgs/imgs@b.scss +173 -0
  147. package/imgs/mcui@imgs.scss +1 -0
  148. package/imgs/package.json +16 -0
  149. package/index.js +28 -0
  150. package/line/line@a.scss +51 -0
  151. package/line/line@b.scss +63 -0
  152. package/line/mcui@line.scss +2 -0
  153. package/line/package.json +16 -0
  154. package/list/list@a.scss +62 -0
  155. package/list/list@b.scss +83 -0
  156. package/list/list@c.scss +89 -0
  157. package/list/mcui@list.scss +2 -0
  158. package/list/package.json +16 -0
  159. package/load/README.md +69 -0
  160. package/load/load@a.scss +44 -0
  161. package/load/load@b.scss +56 -0
  162. package/load/load@c.scss +270 -0
  163. package/load/load@d.scss +26 -0
  164. package/load/load@e.scss +24 -0
  165. package/load/load@f.scss +124 -0
  166. package/load/load@g.scss +35 -0
  167. package/load/load@h.scss +51 -0
  168. package/load/load@i.scss +51 -0
  169. package/load/mcui@load.scss +8 -0
  170. package/load/package.json +16 -0
  171. package/menu/mcui@menu.scss +1 -0
  172. package/menu/menu@b.scss +302 -0
  173. package/menu/menu@theme=ab.scss +282 -0
  174. package/menu/package.json +22 -0
  175. package/navs/README.md +30 -0
  176. package/navs/mcui@navs.scss +2 -0
  177. package/navs/navs@a.scss +113 -0
  178. package/navs/navs@b.scss +111 -0
  179. package/navs/package.json +16 -0
  180. package/note/mcui@note.scss +2 -0
  181. package/note/note@a.scss +26 -0
  182. package/note/note@b.scss +33 -0
  183. package/note/package.json +11 -0
  184. package/opts/mcui@opts.scss +1 -0
  185. package/opts/opts@a.scss +52 -0
  186. package/opts/package.json +11 -0
  187. package/package.json +26 -0
  188. package/paging/mc-paging-ui1503.scss +106 -0
  189. package/paging/mc-paging.scss +432 -0
  190. package/paging/paging@theme=aa.scss +45 -0
  191. package/path/README.md +142 -0
  192. package/path/mcui@path.scss +1 -0
  193. package/path/package.json +22 -0
  194. package/path/path@a.scss +38 -0
  195. package/side/mcui@side.scss +0 -0
  196. package/side/side.scss +2 -0
  197. package/steps/mcui@steps.scss +2 -0
  198. package/steps/package.json +17 -0
  199. package/steps/steps@a.scss +89 -0
  200. package/steps/steps@v.scss +122 -0
  201. package/table/base.scss +140 -0
  202. package/table/mcui@table.scss +3 -0
  203. package/table/package.json +22 -0
  204. package/table/table@a.scss +230 -0
  205. package/table/table@b.scss +78 -0
  206. package/table/table@c.scss +18 -0
  207. package/tabs/README.md +62 -0
  208. package/tabs/mcui@tabs.scss +1 -0
  209. package/tabs/package.json +22 -0
  210. package/tabs/tabs@a.scss +62 -0
  211. package/tags/README.md +71 -0
  212. package/tags/mcui@tags.scss +2 -0
  213. package/tags/package.json +22 -0
  214. package/tags/tags@a.scss +125 -0
  215. package/tags/tags@b.scss +131 -0
  216. package/tips/README.md +62 -0
  217. package/tips/base.scss +351 -0
  218. package/tips/mcui@tips.scss +1 -0
  219. package/tips/package.json +22 -0
  220. package/tips/tips@a.scss +52 -0
  221. package/title/mcui@title.scss +2 -0
  222. package/title/package.json +15 -0
  223. package/title/title@a.scss +18 -0
  224. package/title/title@b.scss +7 -0
  225. package/user/mcui@user.scss +0 -0
  226. package/user/user@a.scss +7 -0
package/form/base.scss ADDED
@@ -0,0 +1,425 @@
1
+ // 颜色
2
+ $cos: 'main', 'text', 'read', 'note', 'idle', 'case', 'line', 'info', 'well', 'warn', 'risk';
3
+
4
+ [ui-form~=':block'] {
5
+ display: flex;
6
+ }
7
+
8
+ // 提示
9
+ [ui-form-tips] {
10
+ position: absolute !important;
11
+ bottom: 100%;
12
+ left: 0;
13
+ line-height: 1.5;
14
+ padding: 0.2em 0.5em;
15
+ border-radius: 0.25em;
16
+ margin-bottom: 0.3em;
17
+ opacity: 0;
18
+ font-size: 0.85em;
19
+ transform: translateY(-0.3em);
20
+ pointer-events: none;
21
+ transition:
22
+ transform 0s,
23
+ opacity 0s;
24
+ min-width: 2em;
25
+ min-height: 1.9em;
26
+
27
+ @include theme {
28
+ background: mix(co(main), co(fore), 85%);
29
+ color: co(fore);
30
+ }
31
+
32
+ &::after {
33
+ position: absolute;
34
+ content: '';
35
+ display: block;
36
+ box-sizing: content-box;
37
+ width: 0;
38
+ height: 0;
39
+ border: 3px solid transparent;
40
+ top: 100%;
41
+ left: 0.75em;
42
+ transition:
43
+ transform 0s,
44
+ opacity 0s;
45
+ @include theme {
46
+ border-top-color: mix(co(main), co(fore), 85%);
47
+ }
48
+ }
49
+
50
+ &[ui-form-tips~='rt'] {
51
+ left: auto;
52
+ right: 0;
53
+ &::after {
54
+ right: 1em;
55
+ left: auto;
56
+ }
57
+ }
58
+
59
+ &[ui-form-tips~=':round'] {
60
+ border-radius: 5em;
61
+ }
62
+ &[ui-form-tips~='show'] {
63
+ transform: translateY(0);
64
+ opacity: 0.95;
65
+ pointer-events: auto;
66
+ transition:
67
+ transform 0.5s,
68
+ opacity 0.5s;
69
+ &::after {
70
+ transition:
71
+ transform 0.5s,
72
+ opacity 0.5s;
73
+ }
74
+ }
75
+ }
76
+ @each $co in $cos {
77
+ [ui-form~='co:#{$co}'] {
78
+ [ui-form-tips] {
79
+ @include theme {
80
+ background: mix(co($co), co(fore), 85%);
81
+ }
82
+ &::after {
83
+ @include theme {
84
+ border-top-color: mix(co($co), co(fore), 85%);
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ [ui-form~='tips'],
91
+ [ui-form~='tips:hover']:hover,
92
+ [ui-form~='tips:focus']:focus-within {
93
+ [ui-form-tips] {
94
+ transform: translateY(0);
95
+ opacity: 0.95;
96
+ pointer-events: auto;
97
+ transition:
98
+ transform 0.5s,
99
+ opacity 0.5s;
100
+ &::after {
101
+ transition:
102
+ transform 0.5s,
103
+ opacity 0.5s;
104
+ }
105
+ }
106
+ }
107
+
108
+ // 验证
109
+ [ui-form-verify] {
110
+ & {
111
+ position: absolute !important;
112
+ display: block;
113
+ width: 1em;
114
+ height: 1em;
115
+ right: -1.1em;
116
+ top: 50%;
117
+ margin-top: -0.5em;
118
+ transform: scale3d(0.8, 0.8, 1);
119
+
120
+ &:before,
121
+ &:after {
122
+ position: absolute;
123
+ content: '';
124
+ display: block;
125
+ background-color: currentColor;
126
+ border-radius: 10rem;
127
+ }
128
+ }
129
+
130
+ &[ui-form-verify~='ok'] {
131
+ @include theme {
132
+ color: co(well);
133
+ }
134
+
135
+ @keyframes am-verify-ok-1 {
136
+ 0% {
137
+ transform: rotate(43deg) scale3d(0, 1, 1);
138
+ }
139
+ 40%,
140
+ 100% {
141
+ transform: rotate(43deg) scale3d(1, 1, 1);
142
+ }
143
+ }
144
+
145
+ @keyframes am-verify-ok-2 {
146
+ 0%,
147
+ 40% {
148
+ transform: rotate(-53deg) scale3d(0, 1, 1);
149
+ }
150
+ 100% {
151
+ transform: rotate(-53deg) scale3d(1, 1, 1);
152
+ }
153
+ }
154
+
155
+ &::before {
156
+ width: 50%;
157
+ height: 15%;
158
+ left: 9%;
159
+ top: 32%;
160
+ transform: rotate(43deg);
161
+ background-color: currentColor;
162
+ transform-origin: 0% 100%;
163
+ animation: am-verify-ok-1 ease-out 0.5s both;
164
+ }
165
+
166
+ &::after {
167
+ width: 74%;
168
+ height: 15%;
169
+ left: 50%;
170
+ bottom: 22%;
171
+ transform-origin: 0% 100%;
172
+ transform: rotate(-53deg);
173
+ background-color: currentColor;
174
+ animation: am-verify-ok-2 ease-out 0.5s both;
175
+ }
176
+ }
177
+ &[ui-form-verify~='no'] {
178
+ @include theme {
179
+ color: co(risk);
180
+ }
181
+
182
+ @keyframes am-no-1 {
183
+ 0% {
184
+ transform: rotate(45deg) scale3d(0, 1, 1);
185
+ }
186
+ 70%,
187
+ 100% {
188
+ transform: rotate(45deg) scale3d(1, 1, 1);
189
+ }
190
+ }
191
+
192
+ @keyframes am-no-2 {
193
+ 0%,
194
+ 50% {
195
+ transform: rotate(-45deg) scale3d(0, 1, 1);
196
+ }
197
+ 100% {
198
+ transform: rotate(-45deg) scale3d(1, 1, 1);
199
+ }
200
+ }
201
+
202
+ &::before {
203
+ width: 92%;
204
+ height: 15%;
205
+ left: 13%;
206
+ top: 8%;
207
+ transform: rotate(45deg);
208
+ background-color: currentColor;
209
+ transform-origin: 0% 100%;
210
+ animation: am-no-1 ease 0.5s both;
211
+ }
212
+
213
+ &::after {
214
+ width: 92%;
215
+ height: 15%;
216
+ right: 13%;
217
+ top: 8%;
218
+ transform-origin: 100% 100%;
219
+ transform: rotate(45deg);
220
+ background-color: currentColor;
221
+ animation: am-no-2 ease 0.5s both;
222
+ }
223
+ }
224
+ }
225
+
226
+ // 前缀后缀
227
+ [ui-form-prefix],
228
+ [ui-form-suffix] {
229
+ position: relative;
230
+ line-height: 1;
231
+ display: inline-flex;
232
+ align-items: center;
233
+ align-content: center;
234
+ flex-shrink: 0;
235
+ transform: scale3d(1, 1, 1);
236
+
237
+ & > * {
238
+ min-width: 1em;
239
+ margin: 0 0.25em;
240
+ height: 1em;
241
+ flex-shrink: 0;
242
+ transition:
243
+ transform 0.15s,
244
+ opacity 0.35s;
245
+ // opacity: 0.8;
246
+ // &:hover {
247
+ // opacity: 1;
248
+ // }
249
+ // &:active,
250
+ // &:hover:active {
251
+ // transform: scale3d(0.9, 0.9, 1);
252
+ // }
253
+ }
254
+ }
255
+ [ui-form-suffix] {
256
+ justify-content: end;
257
+ }
258
+
259
+ // 搜索
260
+ [ui-form-search] {
261
+ position: relative;
262
+ &::before {
263
+ position: absolute;
264
+ content: '';
265
+ display: block;
266
+ width: 2em;
267
+ height: 2em;
268
+ left: 0;
269
+ top: 0;
270
+ margin: -0.5em auto auto -0.5em;
271
+ transform: scale3d(0.5, 0.5, 1);
272
+ background: radial-gradient(circle at 47% 45%, transparent 41%, currentColor 44%, currentColor 52%, transparent 55%),
273
+ radial-gradient(circle at 78% 78%, currentColor 5%, transparent 6%), radial-gradient(circle at 82% 82%, currentColor 5%, transparent 6%),
274
+ radial-gradient(circle at 85% 85%, currentColor 5%, transparent 6%);
275
+ }
276
+ }
277
+
278
+ // 清理
279
+ [ui-form-clean] {
280
+ position: absolute;
281
+ display: none;
282
+ // opacity: 0.6;
283
+ right: 100%;
284
+ @include theme {
285
+ background: co(fore);
286
+ box-shadow:
287
+ -0.2em 0 0px 0.15em co(fore),
288
+ 0.2em 0 0px 0.15em co(fore),
289
+ 0 0 0px 0.15em co(fore);
290
+ }
291
+
292
+ &::before {
293
+ position: absolute;
294
+ content: '';
295
+ display: block;
296
+ width: 2em;
297
+ height: 2em;
298
+ left: 0;
299
+ top: 0;
300
+ margin: -0.5em auto auto -0.5em;
301
+ transform: scale3d(0.4, 0.4, 1) rotate(45deg);
302
+ background:
303
+ linear-gradient(0deg, transparent 41%, currentColor 42%, currentColor 59%, transparent 60%) no-repeat center/50% 50%,
304
+ linear-gradient(90deg, transparent 41%, currentColor 42%, currentColor 59%, transparent 60%) no-repeat center/50% 50%;
305
+ border-radius: 50%;
306
+ color: currentColor;
307
+ box-shadow: inset 0 0 0 2px currentColor;
308
+ }
309
+ }
310
+ @keyframes am-form-clean {
311
+ 0% {
312
+ opacity: 0;
313
+ transform: scale3d(0.5, 0.5, 1);
314
+ }
315
+ 100% {
316
+ opacity: 1;
317
+ transform: scale3d(1, 1, 1);
318
+ }
319
+ }
320
+ [ui-form] {
321
+ &:hover {
322
+ [ui-form-clean] {
323
+ display: inline-block;
324
+ animation: am-form-clean 0.2s;
325
+ }
326
+ }
327
+ }
328
+
329
+ // 查看密码
330
+ [ui-form-cipher] {
331
+ position: relative;
332
+ display: inline-block;
333
+ width: 1em;
334
+ height: 1em;
335
+ &:before {
336
+ position: absolute;
337
+ content: '';
338
+ display: block;
339
+ width: 80%;
340
+ height: 80%;
341
+ top: 10%;
342
+ left: 10%;
343
+ border-radius: 70% 25%;
344
+ box-shadow: 0 0 0 1px currentColor;
345
+ transform: rotate(45deg) scale3d(0.95, 0.95, 1);
346
+ }
347
+
348
+ &::after {
349
+ position: absolute;
350
+ content: '';
351
+ display: block;
352
+ width: 30%;
353
+ height: 30%;
354
+ top: 35%;
355
+ left: 35%;
356
+ border-radius: 50%;
357
+ box-shadow: 0 0 0 1px currentColor;
358
+ transform: rotate(45deg) scale3d(0.95, 0.95, 1);
359
+ }
360
+ }
361
+ [type='password'] + * > [ui-form-cipher] {
362
+ &:before {
363
+ background: linear-gradient(90deg, transparent 44%, currentColor 46%, currentColor 54%, transparent 56%) no-repeat center;
364
+ }
365
+ }
366
+
367
+ // 日期图标
368
+ [ui-form-date] {
369
+ position: relative;
370
+ width: 1em;
371
+ height: 1em;
372
+ &::before {
373
+ position: absolute;
374
+ content: '';
375
+ display: block;
376
+ width: 86%;
377
+ height: 75%;
378
+ border: 1px solid currentColor;
379
+ left: 7%;
380
+ bottom: 10%;
381
+ border-radius: 0.15em;
382
+ background: linear-gradient(180deg, transparent 28%, currentColor 32%, currentColor 40%, transparent 42%) no-repeat 50% 0%;
383
+ }
384
+ &::after {
385
+ position: absolute;
386
+ content: '';
387
+ display: block;
388
+ width: 50%;
389
+ height: 22%;
390
+ border-left: 1px solid currentColor;
391
+ border-right: 1px solid currentColor;
392
+ left: 25%;
393
+ top: 8%;
394
+ }
395
+ }
396
+
397
+ // 时间图标
398
+ [ui-form-time] {
399
+ position: relative;
400
+ width: 1em;
401
+ height: 1em;
402
+ &::before {
403
+ position: absolute;
404
+ content: '';
405
+ display: block;
406
+ width: 96%;
407
+ height: 96%;
408
+ border: 1px solid currentColor;
409
+ left: 2%;
410
+ top: 2%;
411
+ border-radius: 50%;
412
+ }
413
+ &::after {
414
+ position: absolute;
415
+ content: '';
416
+ display: block;
417
+ width: 32%;
418
+ height: 27%;
419
+ border-left: 1px solid currentColor;
420
+ border-bottom: 1px solid currentColor;
421
+ left: 44%;
422
+ top: 28%;
423
+ transform: skewX(-5deg);
424
+ }
425
+ }
@@ -0,0 +1,33 @@
1
+ @use 'sass:math';
2
+ // 全局共用
3
+ @import '../base.scss';
4
+
5
+ // 主题共用
6
+ [ui-form~='@a'] {
7
+ // 禁用
8
+ &[ui-form~='disabled'] {
9
+ cursor: not-allowed;
10
+ opacity: 0.5;
11
+ }
12
+
13
+ // 撑满
14
+ &[ui-form~=':block'] {
15
+ display: flex;
16
+ width: 100%;
17
+ flex-grow: 1;
18
+ flex-shrink: 1;
19
+ }
20
+
21
+ // 圆弧
22
+ &[ui-form~=':round'] {
23
+ border-radius: 50em;
24
+ }
25
+
26
+ input:-webkit-autofill {
27
+ @include theme {
28
+ box-shadow: 0 0 0 1000px co(fore) inset;
29
+ color: co(read);
30
+ -webkit-text-fill-color: co(read);
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,194 @@
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
+ [ui-form~='@a'] {
18
+ // 复选框
19
+ &[ui-form~='type:checkbox'] {
20
+ position: relative;
21
+ display: inline-flex;
22
+ align-items: center;
23
+ align-content: center;
24
+ flex-wrap: nowrap;
25
+ vertical-align: middle;
26
+
27
+ &[ui-form~='lt'] {
28
+ align-items: baseline;
29
+ [type='checkbox'] {
30
+ position: relative;
31
+ top: 0.15em;
32
+ }
33
+ }
34
+
35
+ [type='checkbox'] {
36
+ appearance: none;
37
+ font-size: inherit;
38
+ width: 1em;
39
+ height: 1em;
40
+ border: 0;
41
+ margin: 0;
42
+ padding: 0;
43
+ background: transparent;
44
+ box-shadow: inset 0 0 0 1px currentColor;
45
+ border-radius: 0.2em;
46
+ flex-shrink: 0;
47
+ transform: scale3d(0.95, 0.95, 1);
48
+
49
+ // &.part-selected {
50
+ // @include theme {
51
+ // box-shadow: inset 0 0 0 1px co(main);
52
+ // }
53
+ // &::before {
54
+ // width: 50%;
55
+ // height: 18%;
56
+ // left: 24%;
57
+ // border-radius: 1em;
58
+ // @include theme {
59
+ // background: co(main) !important;
60
+ // }
61
+ // bottom: 41%;
62
+ // }
63
+ // }
64
+
65
+ &:before,
66
+ &:after {
67
+ position: absolute;
68
+ content: '';
69
+ display: block;
70
+ @include theme {
71
+ background-color: co(fore);
72
+ }
73
+ border-radius: 10rem;
74
+ }
75
+
76
+ &:checked {
77
+ @include theme {
78
+ background-color: co(main);
79
+ }
80
+
81
+ @keyframes am-checkbox-a-1 {
82
+ 0% {
83
+ transform: rotate(43deg) scale3d(0, 1, 1);
84
+ }
85
+ 40%,
86
+ 100% {
87
+ transform: rotate(43deg) scale3d(1, 1, 1);
88
+ }
89
+ }
90
+
91
+ @keyframes am-checkbox-a-2 {
92
+ 0%,
93
+ 40% {
94
+ transform: rotate(-53deg) scale3d(0, 1, 1);
95
+ }
96
+ 100% {
97
+ transform: rotate(-53deg) scale3d(1, 1, 1);
98
+ }
99
+ }
100
+
101
+ &::before {
102
+ width: 35%;
103
+ height: 13%;
104
+ left: 20%;
105
+ top: 36%;
106
+ transform: rotate(43deg);
107
+ @include theme {
108
+ background-color: co(fore);
109
+ }
110
+ transform-origin: 0% 100%;
111
+ animation: am-checkbox-a-1 ease-out 0.35s both;
112
+ }
113
+
114
+ &::after {
115
+ width: 60%;
116
+ height: 13%;
117
+ left: 50%;
118
+ bottom: 25%;
119
+ transform-origin: 0% 100%;
120
+ transform: rotate(-53deg);
121
+ @include theme {
122
+ background-color: co(fore);
123
+ }
124
+ animation: am-checkbox-a-2 ease-out 0.35s both;
125
+ }
126
+
127
+ &,
128
+ & + * {
129
+ @include theme {
130
+ color: co(main);
131
+ }
132
+ }
133
+ }
134
+
135
+ // 半选
136
+ &.part-checked,
137
+ &[part-checked] {
138
+ @include theme {
139
+ background-color: co(main);
140
+ box-shadow: inset 0 0 0 1px co(main);
141
+ }
142
+
143
+ &::before {
144
+ width: 50%;
145
+ height: 18%;
146
+ left: 24%;
147
+ border-radius: 1em;
148
+ @include theme {
149
+ background: co(fore) !important;
150
+ }
151
+ bottom: 41%;
152
+ }
153
+
154
+ // &::before {
155
+ // width: 35%;
156
+ // height: 13%;
157
+ // left: 20%;
158
+ // top: 36%;
159
+ // transform: rotate(43deg);
160
+ // @include theme {
161
+ // background-color: co(fore);
162
+ // }
163
+ // transform-origin: 0% 100%;
164
+ // animation: am-checkbox-a-1 ease-out 0.35s both;
165
+ // }
166
+
167
+ // &::after {
168
+ // width: 60%;
169
+ // height: 13%;
170
+ // left: 50%;
171
+ // bottom: 25%;
172
+ // transform-origin: 0% 100%;
173
+ // transform: rotate(-53deg);
174
+ // @include theme {
175
+ // background-color: co(fore);
176
+ // }
177
+ // animation: am-checkbox-a-2 ease-out 0.35s both;
178
+ // }
179
+
180
+ // &,
181
+ // & + * {
182
+ // @include theme {
183
+ // color: co(main);
184
+ // }
185
+ // }
186
+ }
187
+
188
+ & + * {
189
+ margin-left: 0.2em;
190
+ user-select: none;
191
+ }
192
+ }
193
+ }
194
+ }