@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
@@ -0,0 +1,124 @@
1
+ @use 'sass:math';
2
+ $sz: 'xs', 's', 'm', 'l', 'xl';
3
+
4
+ [ui-form~='@b'] {
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
+ cursor: pointer;
15
+ }
16
+
17
+ // 下拉
18
+ [ui-form-select] {
19
+ width: 0.8em;
20
+ height: 0.8em;
21
+ display: inline-block;
22
+ @include theme {
23
+ color: co(note);
24
+ }
25
+ background:
26
+ linear-gradient(45deg, transparent 51%, currentColor 52%, currentColor 67%, transparent 68%) no-repeat 23.5% 65% / 35% 50%,
27
+ linear-gradient(-45deg, transparent 51%, currentColor 52%, currentColor 67%, transparent 68%) no-repeat 76.5% 65% / 35% 50%;
28
+ }
29
+
30
+ // 下拉菜单
31
+ [ui-form-dropdown] {
32
+ position: absolute;
33
+ top: 100%;
34
+ @include theme {
35
+ background: co(fore);
36
+ }
37
+ min-width: 100%;
38
+ max-height: 20rem;
39
+ left: 0;
40
+ margin-top: 0.5em;
41
+ padding: 0.5em;
42
+ border-radius: 0.25em;
43
+ box-shadow: 0 1px 0.3em 1px rgba(0, 0, 0, 0.1);
44
+ transform: translate3d(0, 1rem, 0);
45
+ pointer-events: none;
46
+ opacity: 0;
47
+ transition: all 0.35s;
48
+ z-index: 1;
49
+
50
+ &::before {
51
+ content: '';
52
+ position: absolute;
53
+ width: 100%;
54
+ left: 0;
55
+ height: 1em;
56
+ bottom: 100%;
57
+ }
58
+
59
+ &::after {
60
+ content: '';
61
+ position: absolute;
62
+ box-sizing: content-box;
63
+ width: 0.5em;
64
+ height: 0.5em;
65
+ @include theme {
66
+ background: co(fore);
67
+ }
68
+ top: -0.25em;
69
+ left: 50%;
70
+ margin-left: -0.25em;
71
+ transform: rotate(45deg);
72
+ box-shadow: -1px -1px 0.15em 0 rgba(0, 0, 0, 0.07);
73
+ z-index: -1;
74
+ }
75
+
76
+ // &[ui-form-dropdown~='show'] {
77
+ // opacity: 1;
78
+ // transform: translate3d(0, 0, 0);
79
+ // pointer-events: auto;
80
+ // }
81
+
82
+ & > * {
83
+ padding: 0.5em;
84
+ transition: all 0.35s;
85
+ border-radius: 0.2em;
86
+ &:hover {
87
+ @include theme {
88
+ background: co(weak);
89
+ }
90
+ }
91
+ }
92
+ }
93
+ // 下拉菜单活动
94
+ &[ui-form-open~='show'],
95
+ &[ui-form~='ux:hover']:hover {
96
+ [ui-form-select],
97
+ .icon.icon-dropdown {
98
+ transform: rotate(180deg);
99
+ }
100
+ [ui-form-dropdown] {
101
+ opacity: 1;
102
+ transform: translate3d(0, 0, 0);
103
+ pointer-events: auto;
104
+ }
105
+ }
106
+
107
+ // 尺寸
108
+ $sz_base: 1.5em;
109
+ @each $s in $sz {
110
+ &[ui-form~='sz:#{$s}'] {
111
+ height: $sz_base;
112
+ }
113
+ $sz_base: $sz_base + 0.5;
114
+ }
115
+
116
+ & > *,
117
+ [ui-form~='type:input'] {
118
+ width: 100%;
119
+ height: 100%;
120
+ min-width: auto;
121
+ vertical-align: middle;
122
+ }
123
+ }
124
+ }
@@ -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~='@b'] {
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
+ }
@@ -0,0 +1,105 @@
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
+ $sz: 'xs', 's', 'm', 'l', 'xl';
17
+
18
+ [ui-form~='@b'] {
19
+ &[ui-form~='type:textarea'] {
20
+ position: relative;
21
+ min-width: 6em;
22
+ line-height: 1.5em;
23
+ padding: 0.5em;
24
+ border-radius: 0.25em;
25
+ transition: all 0.5s;
26
+
27
+ @include theme {
28
+ box-shadow: inset 0 0 0 1px co(case);
29
+ background-color: co(fore);
30
+ }
31
+
32
+ &:hover {
33
+ @include theme {
34
+ box-shadow: inset 0 0 0 1px rgba(co(main), 0.5);
35
+ }
36
+ }
37
+
38
+ &.form-focus,
39
+ &:focus {
40
+ @include theme {
41
+ box-shadow:
42
+ inset 0 0 0 1px rgba(co(main), 0.5),
43
+ 0 0 0 2px rgba(co(main), 0.15);
44
+ }
45
+ }
46
+
47
+ // 颜色
48
+ @each $c in $co {
49
+ &[ui-form~='co:#{$c}'] {
50
+ @include theme {
51
+ color: mix(co($c), co(text), 85%);
52
+ box-shadow:
53
+ inset 0 0 0 1px rgba(co($c), 0.6),
54
+ 0 0 0 2px rgba(co($c), 0.15) !important;
55
+ background-color: rgba(co($c), 0.035);
56
+ }
57
+ }
58
+
59
+ &[ui-form~='co:hover:#{$c}'] {
60
+ &:hover {
61
+ @include theme {
62
+ color: mix(co($c), co(text), 85%);
63
+ box-shadow:
64
+ inset 0 0 0 1px rgba(co($c), 0.6),
65
+ 0 0 0 2px rgba(co($c), 0.15) !important;
66
+ background-color: rgba(co($c), 0.035);
67
+ }
68
+ }
69
+ }
70
+
71
+ &[ui-form~='co:focus:#{$c}'] {
72
+ &:focus-within {
73
+ @include theme {
74
+ color: mix(co($c), co(text), 85%);
75
+ box-shadow:
76
+ inset 0 0 0 1px rgba(co($c), 0.6),
77
+ 0 0 0 2px rgba(co($c), 0.15) !important;
78
+ background-color: rgba(co($c), 0.035);
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ &,
85
+ textarea {
86
+ &:-webkit-autofill {
87
+ @include theme {
88
+ box-shadow: 0 0 0 1000px co(fore) inset;
89
+ color: co(read);
90
+ -webkit-text-fill-color: co(read);
91
+ }
92
+ }
93
+
94
+ &::-webkit-input-placeholder {
95
+ @include theme {
96
+ color: rgba(co(read), 0.5);
97
+ }
98
+ }
99
+ }
100
+
101
+ textarea {
102
+ width: 100%;
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,160 @@
1
+ @use 'sass:math';
2
+
3
+ [ui-form~='@b'] {
4
+ &[ui-form~='type:upload'] {
5
+ position: relative;
6
+ display: inline-flex;
7
+
8
+ &[ui-form~=':block'] {
9
+ display: flex;
10
+ }
11
+
12
+ %item {
13
+ position: relative;
14
+ width: 10rem;
15
+ height: 10rem;
16
+ display: inline-flex;
17
+ justify-content: center;
18
+ align-items: center;
19
+ justify-items: center;
20
+ border-radius: 0.25em;
21
+ padding: 0.5em;
22
+ text-align: center;
23
+ overflow: hidden;
24
+ transition: all 0.5s;
25
+ border-style: solid;
26
+ border-width: 1px;
27
+ @include theme {
28
+ border-color: co(line);
29
+ background-color: co(fore);
30
+ }
31
+ }
32
+
33
+ @keyframes am-file-add {
34
+ 0% {
35
+ }
36
+ 100% {
37
+ }
38
+ }
39
+ @keyframes am-file-del {
40
+ 0% {
41
+ opacity: 1;
42
+ }
43
+ 30% {
44
+ margin: 0.5em 1.5em 1.5em 0.5em;
45
+ opacity: 0;
46
+ }
47
+ 100% {
48
+ width: 0;
49
+ height: 0;
50
+ margin: 0;
51
+ opacity: 0;
52
+ padding: 0;
53
+ }
54
+ }
55
+
56
+ [ui-form-files] {
57
+ position: relative;
58
+ display: flex;
59
+ flex-direction: row;
60
+ flex-wrap: wrap;
61
+
62
+ & > * {
63
+ @extend %item;
64
+
65
+ &::after {
66
+ content: '';
67
+ position: absolute;
68
+ display: block;
69
+ width: 100%;
70
+ height: 0.5em;
71
+ top: 0;
72
+ left: 0;
73
+
74
+ @include theme {
75
+ background-color: co(fore);
76
+ }
77
+ }
78
+
79
+ img,
80
+ video {
81
+ max-width: 100%;
82
+ max-height: 100%;
83
+ border-radius: 0.15em;
84
+ transform: translate3d(0, 0, 0);
85
+ transition: all 0.5s;
86
+ transform-origin: 50% 0%;
87
+ }
88
+ // 进度条
89
+ [ui-form-file-progress] {
90
+ position: absolute;
91
+ width: 100%;
92
+ height: 100%;
93
+ @include theme {
94
+ background-color: rgba(co(fore), 0.85);
95
+ }
96
+ top: 0;
97
+ right: 0;
98
+ }
99
+
100
+ // 工具栏
101
+ [ui-form-file-tools] {
102
+ position: absolute;
103
+ height: 1.5em;
104
+ width: 100%;
105
+ opacity: 0;
106
+ pointer-events: none;
107
+ transition: all 0.5s;
108
+ bottom: 0em;
109
+ left: 0;
110
+ transform: translate3d(0, 2em, 0);
111
+
112
+ & > * {
113
+ width: 1.5em;
114
+ height: 1.5em;
115
+ border-radius: 50%;
116
+ }
117
+ }
118
+ &:hover {
119
+ [ui-form-file-tools] {
120
+ opacity: 1;
121
+ pointer-events: auto;
122
+ transform: translate3d(0, -0.5em, 0);
123
+ }
124
+ img,
125
+ video {
126
+ border-radius: 1em;
127
+ transform: translate3d(0, -2em, 0);
128
+ }
129
+ }
130
+
131
+ // 删除时
132
+ &.deling {
133
+ animation: am-file-del 0.35s forwards;
134
+ }
135
+ }
136
+ }
137
+
138
+ [ui-form-input] {
139
+ @extend %item;
140
+ border-style: dashed;
141
+ @include theme {
142
+ border-color: co(case);
143
+ }
144
+ input {
145
+ position: absolute;
146
+ width: 100%;
147
+ height: 100%;
148
+ left: 0;
149
+ top: 0;
150
+ opacity: 0;
151
+
152
+ &:-webkit-autofill {
153
+ @include theme {
154
+ box-shadow: 0 0 0 1000px co(fore) inset;
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
@@ -0,0 +1,44 @@
1
+ @use 'sass:math';
2
+ // 全局共用
3
+ @import '../base.scss';
4
+
5
+ // 主题共用
6
+ [ui-form~='@c'] {
7
+ // 禁用
8
+ &[ui-form~='disabled'] {
9
+ cursor: not-allowed;
10
+ opacity: 0.5;
11
+ }
12
+
13
+ // 撑满
14
+ &[ui-form~=':block'] {
15
+ width: 100%;
16
+ flex-grow: 1;
17
+ flex-shrink: 1;
18
+ }
19
+
20
+ // 圆弧
21
+ &[ui-form~=':round'] {
22
+ border-radius: 50em;
23
+ }
24
+
25
+ // 清理
26
+ [ui-form-clean] {
27
+ display: inline-block;
28
+ @include theme {
29
+ color: co(case);
30
+ background:
31
+ linear-gradient(45deg, transparent 40%, co(fore) 45%, co(fore) 55%, transparent 60%) no-repeat center / 38% 38%,
32
+ linear-gradient(-45deg, transparent 40%, co(fore) 45%, co(fore) 55%, transparent 60%) no-repeat center / 38% 38%,
33
+ radial-gradient(circle at 50% 50%, currentColor 53%, transparent 58%);
34
+ }
35
+ }
36
+
37
+ input:-webkit-autofill {
38
+ @include theme {
39
+ box-shadow: 0 0 0 1000px mix(co(weak), co(fore), 50%) inset;
40
+ color: co(read);
41
+ -webkit-text-fill-color: co(read);
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,90 @@
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
+ [ui-form~='@c'] {
30
+ // 复选框
31
+ &[ui-form~='type:checkbox'] {
32
+ position: relative;
33
+ display: inline-flex;
34
+ align-items: center;
35
+ align-content: center;
36
+ flex-wrap: nowrap;
37
+
38
+ &[ui-form~='lt'] {
39
+ align-items: baseline;
40
+ [type='checkbox'] {
41
+ position: relative;
42
+ top: 0.15em;
43
+ }
44
+ }
45
+
46
+ &[ui-form~=':block'] {
47
+ display: flex;
48
+ }
49
+
50
+ [type='checkbox'] {
51
+ appearance: none;
52
+ font-size: inherit;
53
+ width: 1em;
54
+ height: 1em;
55
+ border: 0;
56
+ margin: 0;
57
+ padding: 0;
58
+ background: transparent;
59
+ box-shadow: inset 0 0 0 1px currentColor;
60
+ border-radius: 25%;
61
+ transform: scale3d(0.9, 0.9, 1);
62
+ flex-shrink: 0;
63
+ @include theme {
64
+ background-color: mix(co(weak), co(fore), 50%);
65
+ }
66
+
67
+ &:checked {
68
+ background:
69
+ linear-gradient(0deg, transparent 29%, currentColor 31%) no-repeat 39.5% 0% / 5% 79%,
70
+ linear-gradient(47deg, currentColor 33%, transparent 34%) no-repeat,
71
+ linear-gradient(-50deg, currentColor 42%, transparent 43%) no-repeat,
72
+ linear-gradient(-50deg, transparent 73%, currentColor 74%) no-repeat,
73
+ linear-gradient(43deg, transparent 59%, currentColor 60%) no-repeat -32% 18% / 55% 80%,
74
+ linear-gradient(-45deg, transparent 59%, currentColor 60%) no-repeat 133% -20% / 70% 80%,
75
+ linear-gradient(45deg, transparent 65%, currentColor 66%) no-repeat 125% 0% / 50% 80%;
76
+ animation: am-checked 0.3s;
77
+ &,
78
+ & + * {
79
+ @include theme {
80
+ color: co(main);
81
+ }
82
+ }
83
+ }
84
+
85
+ & + * {
86
+ margin-left: 0.2em;
87
+ }
88
+ }
89
+ }
90
+ }