@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,26 @@
1
+ // 添加
2
+ %icon-upload {
3
+ background:
4
+ radial-gradient(circle at 50% 23%, currentColor 4%, transparent 5%),
5
+ radial-gradient(circle at 47% 25%, currentColor 4%, transparent 5%),
6
+ radial-gradient(circle at 53% 25%, currentColor 4%, transparent 5%),
7
+ radial-gradient(circle at 44% 27%, currentColor 3.7%, transparent 4.7%),
8
+ radial-gradient(circle at 56% 27%, currentColor 3.7%, transparent 4.7%),
9
+ \radial-gradient(circle at 41% 29%, currentColor 3.5%, transparent 4.5%),
10
+ radial-gradient(circle at 59% 29%, currentColor 3.5%, transparent 4.5%),
11
+ radial-gradient(circle at 38% 31%, currentColor 3.3%, transparent 4.3%),
12
+ radial-gradient(circle at 62% 31%, currentColor 3.3%, transparent 4.3%),
13
+ radial-gradient(circle at 35% 33%, currentColor 3.1%, transparent 4.1%),
14
+ radial-gradient(circle at 65% 33%, currentColor 3.1%, transparent 4.1%),
15
+ radial-gradient(circle at 32% 35%, currentColor 2.9%, transparent 3.9%),
16
+ radial-gradient(circle at 68% 35%, currentColor 2.9%, transparent 3.9%),
17
+ radial-gradient(circle at 80% 82%, currentColor 3.5%, transparent 4.5%),
18
+ radial-gradient(circle at 20% 82%, currentColor 3.5%, transparent 4.5%),
19
+ linear-gradient(90deg, transparent 0%, currentColor 2%, currentColor 10%, transparent 13%, transparent 87%, currentColor 90%, currentColor 98%, transparent 100%) no-repeat 50%
20
+ 75% / 70% 20%,
21
+ linear-gradient(0deg, transparent 42%, currentColor 45%, currentColor 55%, transparent 58%) no-repeat 50% 116% / 60% 50%,
22
+ linear-gradient(90deg, transparent 42%, currentColor 45%, currentColor 55%, transparent 58%) no-repeat 50% 40% / 50% 40%;
23
+ }
24
+ [ui-icon~='upload'] {
25
+ @extend %icon-upload;
26
+ }
@@ -0,0 +1,20 @@
1
+ %icon-view {
2
+ background:
3
+ radial-gradient(at 50% 50%, transparent 53%, currentColor 56%, currentColor 67%, transparent 70%) no-repeat center / 100% 70%,
4
+ radial-gradient(circle at 50% 50%, transparent 15%, currentColor 18%, currentColor 27%, transparent 30%);
5
+ }
6
+
7
+ %icon-unview {
8
+ background:
9
+ radial-gradient(at 50% 50%, transparent 53%, currentColor 56%, currentColor 67%, transparent 70%) no-repeat center / 100% 70%,
10
+ radial-gradient(circle at 50% 50%, transparent 15%, currentColor 18%, currentColor 27%, transparent 30%),
11
+ linear-gradient(-45deg, transparent 45%, currentColor 48%, currentColor 52%, transparent 55%) no-repeat center / 75% 75%;
12
+ }
13
+
14
+ [ui-icon~='view'] {
15
+ @extend %icon-view;
16
+ }
17
+
18
+ [ui-icon~='unview'] {
19
+ @extend %icon-unview;
20
+ }
@@ -0,0 +1,21 @@
1
+ @import './icon@add.scss';
2
+ @import './icon@close.scss';
3
+ @import './icon@down.scss';
4
+ @import './icon@except.scss';
5
+ @import './icon@hook.scss';
6
+ @import './icon@left.scss';
7
+ @import './icon@link.scss';
8
+ @import './icon@menu.scss';
9
+ @import './icon@minus.scss';
10
+ @import './icon@more.scss';
11
+ @import './icon@omit.scss';
12
+ @import './icon@refresh.scss';
13
+ @import './icon@right.scss';
14
+ @import './icon@search.scss';
15
+ @import './icon@time.scss';
16
+ @import './icon@top.scss';
17
+ @import './icon@view.scss';
18
+ @import './icon@drag.scss';
19
+ @import './icon@quit.scss';
20
+ @import './icon@upload.scss';
21
+ @import './icon@download.scss';
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@neatui/icon",
3
+ "version": "1.1.1",
4
+ "description": "",
5
+ "main": "mcui@icon.scss",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "icon"
11
+ ],
12
+ "author": "xiaojunbo",
13
+ "license": "MIT",
14
+ "dependencies": {}
15
+ }
package/imgs/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # @neatui/imgs
2
+
3
+ MCUI图片组件,依赖@neatui/core核心,文档详见官网 https://mcui.fekit.cn/
4
+
5
+ ## 安装组件
6
+
7
+ ```
8
+ npm i @neatui/imgs
9
+ ```
10
+
11
+ 或
12
+
13
+ ```
14
+ yarn add @neatui/imgs
15
+ ```
16
+
17
+ ## 可选主题
18
+
19
+ - imgs@a.scss
20
+ - imgs@b.scss
21
+ 使用示例:
22
+
23
+ ```html
24
+ <button ui-btn="@a">按钮</button>
25
+ ```
26
+
27
+ ## 指定语义
28
+
29
+ | 语议 | 属性 | 备注 |
30
+ | ---- | ---- | -------------------------------------------------------- |
31
+ | 主体 | main | 跟随主题风格主体色 |
32
+ | 主体 | vice | 跟随主题风格辅助色 |
33
+ | 提倡 | well | 代表提倡的,安全的,推荐的,成功的,建议用户点击的 |
34
+ | 警告 | warn | 代表警告的,需再次确认的,并非绝对安全的,需要用户慎重的 |
35
+ | 风险 | risk | 代表失败的,危险的,错误的,有风险的,不建议用户操作的 |
36
+ | 信息 | info | 代表只读的,上面三个状态之外使用 |
37
+
38
+ 使用示例:
39
+
40
+ ```html
41
+ <button ui-btn="@a well"></button>
42
+ ```
43
+
44
+ ## 指定大小
45
+
46
+ | 大小 | 属性 |
47
+ | ---- | ---- |
48
+ | 小 | ss |
49
+ | 中 | sm |
50
+ | 大 | sl |
51
+
52
+ 使用示例:
53
+
54
+ ```html
55
+ <button ui-btn="@a s"></button>
56
+ ```
57
+
58
+ ## 线形按钮
59
+
60
+ ```html
61
+ <button ui-btn="@a :line"></button>
62
+ ```
63
+
64
+ ## 圆角按钮
65
+
66
+ ```html
67
+ <button ui-btn="@a round"></button>
68
+ ```
69
+
70
+ ## 按钮群组
71
+
72
+ ```html
73
+ <div ui-imgs="@a line :border">
74
+ <button>Button1</button>
75
+ <button>Button2</button>
76
+ <button>Button3</button>
77
+ </div>
78
+ ```
package/imgs/base.scss ADDED
@@ -0,0 +1,8 @@
1
+ [ui-imgs~=':strand'] {
2
+ & > * {
3
+ margin-right: -0.5em;
4
+ @include theme {
5
+ background-color: co(fore);
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,171 @@
1
+ @use 'sass:math';
2
+ @import './base.scss';
3
+
4
+ @mixin imgs($n: 'ui-img', $sub: '') {
5
+ [#{$n}~='@a'] {
6
+ &#{$sub} {
7
+ position: relative;
8
+ display: inline-flex;
9
+ vertical-align: middle;
10
+ width: 2.5rem;
11
+ height: 2.5rem;
12
+ border-radius: 0.25rem;
13
+ padding: 3px;
14
+ overflow: hidden;
15
+ align-items: center;
16
+ justify-content: center;
17
+ cursor: pointer;
18
+ box-shadow: inset 0 0 0 1px currentColor;
19
+ transition: all 0.3s;
20
+
21
+ & > * {
22
+ width: 100%;
23
+ height: 100%;
24
+ transform: scale3d(1, 1, 1);
25
+ border-radius: 2px;
26
+ overflow: hidden;
27
+ transition: all 0.3s;
28
+ background-size: cover;
29
+ background-position: center;
30
+ background-repeat: no-repeat;
31
+ }
32
+ & > img {
33
+ width: 100%;
34
+ height: 100%;
35
+ // max-width: 100%;
36
+ // max-height: 100%;
37
+ object-fit: cover;
38
+ }
39
+
40
+ &:hover {
41
+ @include theme {
42
+ // border: 1px solid co(text);
43
+ box-shadow: inset 0 0 0 1px co(text);
44
+ }
45
+ & > * {
46
+ transform: scale3d(0.85, 0.85, 1);
47
+ }
48
+ }
49
+
50
+ // 激活
51
+ &.active {
52
+ @include theme {
53
+ // border: 1px solid co(main) !important;
54
+ box-shadow: inset 0 0 0 1px co(main);
55
+ }
56
+ }
57
+ // 选中
58
+ &.selected,
59
+ &[selected~='1'] {
60
+ @include theme {
61
+ // border: 1px solid co(main) !important;
62
+ box-shadow: inset 0 0 0 1px co(main);
63
+ }
64
+
65
+ &::after {
66
+ position: absolute;
67
+ display: block;
68
+ content: '';
69
+ width: 0.6rem;
70
+ height: 0.6rem;
71
+ max-width: 1rem;
72
+ max-height: 1rem;
73
+ top: 3%;
74
+ right: 3%;
75
+ border-radius: 0.2rem;
76
+ background-image: radial-gradient(circle at 26% 56%, currentColor 8%, transparent 9%), radial-gradient(circle at 32% 62%, currentColor 8%, transparent 9%),
77
+ radial-gradient(circle at 35% 65%, currentColor 8%, transparent 9%), radial-gradient(circle at 41% 71%, currentColor 8%, transparent 9%),
78
+ radial-gradient(circle at 47% 70%, currentColor 9%, transparent 10%), radial-gradient(circle at 53% 62%, currentColor 9%, transparent 10%),
79
+ radial-gradient(circle at 59% 54%, currentColor 9%, transparent 10%), radial-gradient(circle at 65% 46%, currentColor 9%, transparent 10%),
80
+ radial-gradient(circle at 71% 38%, currentColor 8%, transparent 9%);
81
+ @include theme {
82
+ background-color: co(main);
83
+ color: co(back);
84
+ }
85
+ animation: am-selected 0.2s 0.1s both;
86
+ }
87
+ }
88
+ }
89
+
90
+ // 文本类
91
+ &[#{$n}~=':text']#{$sub} {
92
+ width: auto;
93
+ }
94
+
95
+ // 圆形
96
+ &[#{$n}~=':round']#{$sub} {
97
+ border-radius: 50%;
98
+ &.selected,
99
+ &[selected~='1'] {
100
+ &::after {
101
+ width: 1rem;
102
+ height: 1rem;
103
+ top: 15%;
104
+ right: 15%;
105
+ border-radius: 2rem;
106
+ }
107
+ }
108
+
109
+ & > * {
110
+ border-radius: 50%;
111
+ }
112
+ }
113
+ // 叶形
114
+ &[#{$n}~=':leaf']#{$sub} {
115
+ border-radius: 30% 0.3rem;
116
+ & > * {
117
+ border-radius: 28% 0.1rem;
118
+ }
119
+ }
120
+
121
+ // 颜色
122
+ $color: 'none', 'main', 'text', 'read', 'case', 'line', 'note', 'weak', 'back', 'fore';
123
+ @each $co in $color {
124
+ &[#{$n}~='#{$co}'] {
125
+ &#{$sub} {
126
+ @include theme {
127
+ box-shadow: inset 0 0 0 1px co($co);
128
+ }
129
+ }
130
+ }
131
+ }
132
+
133
+ // 尺寸
134
+ $size: 'xs', 'ss', 'sm', 'sl', 'ms', 'mm', 'ml', 'ls', 'lm', 'll', 'xl';
135
+ $base: 1.5em;
136
+ $padd: 2px;
137
+ @each $sz in $size {
138
+ &[#{$n}~='sz:#{$sz}'] {
139
+ &#{$sub} {
140
+ width: $base;
141
+ min-width: $base;
142
+ height: $base;
143
+ padding: $padd;
144
+ }
145
+
146
+ &.selected,
147
+ &[selected~='1'] {
148
+ &::after {
149
+ width: calc($base / 5);
150
+ height: calc($base / 5);
151
+ }
152
+ }
153
+
154
+ &[#{$n}~=':text']#{$sub} {
155
+ width: auto;
156
+ }
157
+ }
158
+ @if ($base<3) {
159
+ $base: $base + 0.5;
160
+ } @else {
161
+ $base: $base + 1;
162
+ }
163
+ $padd: $padd + 1;
164
+ }
165
+ }
166
+ }
167
+
168
+ // 单个
169
+ @include imgs('ui-img');
170
+ // 群组
171
+ @include imgs('ui-imgs', '>*');
@@ -0,0 +1,173 @@
1
+ @use 'sass:math';
2
+ @mixin imgs($n: 'ui-img', $sub: '') {
3
+ [#{$n}~='@b'] {
4
+ &#{$sub} {
5
+ position: relative;
6
+ display: inline-flex;
7
+ vertical-align: middle;
8
+ width: 2.5rem;
9
+ height: 2.5rem;
10
+ border-radius: 0.25rem;
11
+ padding: 3px;
12
+ align-items: center;
13
+ justify-content: center;
14
+ cursor: pointer;
15
+ box-shadow: inset 0 0 0 1px currentColor;
16
+ transition: all 0.3s;
17
+
18
+ & > * {
19
+ // width: 200%;
20
+ // height: 200%;
21
+ min-width: 200% !important;
22
+ min-height: 200% !important;
23
+ max-width: 200% !important;
24
+ max-height: 200% !important;
25
+ transform: scale3d(0.5, 0.5, 1);
26
+ border-radius: 2px;
27
+ overflow: hidden;
28
+ transition: all 0.35s;
29
+ background-size: cover;
30
+ background-position: center;
31
+ background-repeat: no-repeat;
32
+ flex-shrink: 0;
33
+ }
34
+ & > img {
35
+ width: auto;
36
+ height: auto;
37
+ max-width: 100%;
38
+ max-height: 100%;
39
+ }
40
+
41
+ &:hover {
42
+ @include theme {
43
+ border: 1px solid co(text);
44
+ box-shadow: inset 0 0 0 1px co(text);
45
+ }
46
+ & > * {
47
+ transform: scale3d(1, 1, 1);
48
+ z-index: 2;
49
+ }
50
+ }
51
+
52
+ // 激活
53
+ &.active {
54
+ @include theme {
55
+ // border: 1px solid co(main) !important;
56
+ box-shadow: inset 0 0 0 1px co(main);
57
+ }
58
+ }
59
+ // 选中
60
+ &.selected,
61
+ &[selected~='1'] {
62
+ @include theme {
63
+ // border: 1px solid co(main) !important;
64
+ box-shadow: inset 0 0 0 1px co(main);
65
+ }
66
+
67
+ &::after {
68
+ position: absolute;
69
+ display: block;
70
+ content: '';
71
+ width: 0.6rem;
72
+ height: 0.6rem;
73
+ max-width: 1rem;
74
+ max-height: 1rem;
75
+ top: 3%;
76
+ right: 3%;
77
+ border-radius: 0.2rem;
78
+ background-image: radial-gradient(circle at 26% 56%, currentColor 8%, transparent 9%), radial-gradient(circle at 32% 62%, currentColor 8%, transparent 9%),
79
+ radial-gradient(circle at 35% 65%, currentColor 8%, transparent 9%), radial-gradient(circle at 41% 71%, currentColor 8%, transparent 9%),
80
+ radial-gradient(circle at 47% 70%, currentColor 9%, transparent 10%), radial-gradient(circle at 53% 62%, currentColor 9%, transparent 10%),
81
+ radial-gradient(circle at 59% 54%, currentColor 9%, transparent 10%), radial-gradient(circle at 65% 46%, currentColor 9%, transparent 10%),
82
+ radial-gradient(circle at 71% 38%, currentColor 8%, transparent 9%);
83
+ @include theme {
84
+ background-color: co(main);
85
+ color: co(back);
86
+ }
87
+ animation: am-selected 0.2s 0.1s both;
88
+ }
89
+ }
90
+ }
91
+
92
+ // 文本类
93
+ &[#{$n}~=':text']#{$sub} {
94
+ width: auto;
95
+ }
96
+
97
+ // 圆形
98
+ &[#{$n}~=':round']#{$sub} {
99
+ border-radius: 50%;
100
+ &.selected,
101
+ &[selected~='1'] {
102
+ &::after {
103
+ width: 1rem;
104
+ height: 1rem;
105
+ top: 15%;
106
+ right: 15%;
107
+ border-radius: 2rem;
108
+ }
109
+ }
110
+
111
+ & > * {
112
+ border-radius: 50%;
113
+ }
114
+ }
115
+ // 叶形
116
+ &[#{$n}~=':leaf']#{$sub} {
117
+ border-radius: 30% 0.3rem;
118
+ & > * {
119
+ border-radius: 28% 0.1rem;
120
+ }
121
+ }
122
+
123
+ // 颜色
124
+ $color: 'none', 'main', 'text', 'read', 'case', 'line', 'note', 'weak', 'back', 'fore';
125
+ @each $co in $color {
126
+ &[#{$n}~='#{$co}'] {
127
+ &#{$sub} {
128
+ @include theme {
129
+ box-shadow: inset 0 0 0 1px co($co);
130
+ }
131
+ }
132
+ }
133
+ }
134
+
135
+ // 尺寸
136
+ $size: 'xs', 'ss', 'sm', 'sl', 'ms', 'mm', 'ml', 'ls', 'lm', 'll', 'xl';
137
+ $base: 1.5em;
138
+ $padd: 2px;
139
+ @each $sz in $size {
140
+ &[#{$n}~='sz:#{$sz}'] {
141
+ &#{$sub} {
142
+ width: $base;
143
+ min-width: $base;
144
+ height: $base;
145
+ padding: $padd;
146
+ }
147
+
148
+ &.selected,
149
+ &[selected~='1'] {
150
+ &::after {
151
+ width: calc($base / 5);
152
+ height: calc($base / 5);
153
+ }
154
+ }
155
+
156
+ &[#{$n}~=':text']#{$sub} {
157
+ width: auto;
158
+ }
159
+ }
160
+ @if ($base<3) {
161
+ $base: $base + 0.5;
162
+ } @else {
163
+ $base: $base + 1;
164
+ }
165
+ $padd: $padd + 1;
166
+ }
167
+ }
168
+ }
169
+
170
+ // 单个
171
+ @include imgs('ui-img');
172
+ // 群组
173
+ @include imgs('ui-imgs', '>*');
@@ -0,0 +1 @@
1
+ @import './imgs@a.scss';
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@neatui/imgs",
3
+ "version": "1.1.17",
4
+ "description": "",
5
+ "main": "mcui@imgs.scss",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "xiaojunbo",
10
+ "license": "MIT",
11
+ "dependencies": {},
12
+ "keywords": [
13
+ "mcui",
14
+ "ui"
15
+ ]
16
+ }
package/index.js ADDED
@@ -0,0 +1,28 @@
1
+ const mcui = {
2
+ theme: {
3
+ set: function (theme) {
4
+ document.documentElement.attr('theme', theme);
5
+ },
6
+ get: function () {
7
+ return document.documentElement.attr('theme');
8
+ }
9
+ },
10
+ size: {
11
+ set(size) {
12
+ document.documentElement.attr('size', size);
13
+ },
14
+ get: function () {
15
+ return document.documentElement.attr('size');
16
+ }
17
+ },
18
+ layout: {
19
+ set(layout) {
20
+ document.documentElement.attr('layout', layout);
21
+ },
22
+ get: function () {
23
+ return document.documentElement.attr('layout');
24
+ }
25
+ }
26
+ };
27
+
28
+ module.exports = mcui;
@@ -0,0 +1,51 @@
1
+ [ui-line~='@a'] {
2
+ $szs: xs, s, m, l, xl;
3
+ $cos: main, read, case, weak;
4
+
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ justify-items: center;
9
+ white-space: nowrap;
10
+
11
+ &::before,
12
+ &::after {
13
+ content: '';
14
+ display: block;
15
+ width: 50%;
16
+ height: 1px;
17
+ flex-grow: 1;
18
+ flex-shrink: 1;
19
+ @include theme {
20
+ background: co(line);
21
+ }
22
+ }
23
+
24
+ & > * {
25
+ padding: 0 0.5em;
26
+ }
27
+
28
+ // 粗细
29
+ $sz_base: 0px;
30
+ @each $sz in $szs {
31
+ $sz_base: $sz_base + 1;
32
+ &[ui-line~='sz:#{$sz}'] {
33
+ &::before,
34
+ &::after {
35
+ height: $sz_base;
36
+ }
37
+ }
38
+ }
39
+
40
+ // 颜色
41
+ @each $co in $cos {
42
+ &[ui-line~='co:#{$co}'] {
43
+ &::before,
44
+ &::after {
45
+ @include theme {
46
+ background: co($co);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,63 @@
1
+ [ui-line~='@b'] {
2
+ $szs: xs, s, m, l, xl;
3
+ $cos: main, read, case, weak;
4
+
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ justify-items: center;
9
+ white-space: nowrap;
10
+
11
+ &::before,
12
+ &::after {
13
+ content: '';
14
+ display: block;
15
+ width: 50%;
16
+ height: 1px;
17
+ flex-grow: 1;
18
+ flex-shrink: 1;
19
+ }
20
+
21
+ &::before {
22
+ @include theme {
23
+ background: linear-gradient(90deg, transparent 0%, co(line) 10%);
24
+ }
25
+ }
26
+ &::after {
27
+ @include theme {
28
+ background: linear-gradient(270deg, transparent 0%, co(line) 10%);
29
+ }
30
+ }
31
+
32
+ & > * {
33
+ padding: 0 0.5em;
34
+ }
35
+
36
+ // 粗细
37
+ $sz_base: 0px;
38
+ @each $sz in $szs {
39
+ $sz_base: $sz_base + 1;
40
+ &[ui-line~='sz:#{$sz}'] {
41
+ &::before,
42
+ &::after {
43
+ height: $sz_base;
44
+ }
45
+ }
46
+ }
47
+
48
+ // 颜色
49
+ @each $co in $cos {
50
+ &[ui-line~='co:#{$co}'] {
51
+ &::before {
52
+ @include theme {
53
+ background: linear-gradient(90deg, transparent 0%, co($co) 10%);
54
+ }
55
+ }
56
+ &::after {
57
+ @include theme {
58
+ background: linear-gradient(270deg, transparent 0%, co($co) 10%);
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,2 @@
1
+ @import './line@a.scss';
2
+ @import './line@b.scss';
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@neatui/line",
3
+ "version": "1.0.5",
4
+ "description": "",
5
+ "main": "mcui@line.scss",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "xiaojunbo",
10
+ "license": "MIT",
11
+ "dependencies": {},
12
+ "keywords": [
13
+ "mcui",
14
+ "ui"
15
+ ]
16
+ }