@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,230 @@
1
+ // 主题
2
+
3
+ [ui-table~='@a'] {
4
+ width: 100%;
5
+
6
+ th {
7
+ @include theme {
8
+ color: co(text);
9
+ }
10
+ // text-align: left;
11
+ font-weight: normal;
12
+ }
13
+
14
+ .table-sort {
15
+ display: inline-block;
16
+ width: 1em;
17
+ height: 1em;
18
+ background-color: #fff;
19
+ }
20
+
21
+ td {
22
+ @include theme {
23
+ color: co(read);
24
+ }
25
+ }
26
+
27
+ &[tirm*='n'] {
28
+ border-collapse: separate;
29
+ }
30
+
31
+ // 固定宽度
32
+ &[ui-table~='fix'] {
33
+ table-layout: fixed;
34
+ }
35
+
36
+ // 线条
37
+ &[ui-table~='line'] {
38
+ th,
39
+ td {
40
+ @include theme {
41
+ border-bottom: 1px solid co(line);
42
+ }
43
+ padding: 0.75em 1em;
44
+
45
+ &:first-child {
46
+ padding-left: 0;
47
+ }
48
+ &:last-child {
49
+ padding-right: 0;
50
+ }
51
+ }
52
+
53
+ tr:last-child {
54
+ td {
55
+ border-bottom: 0;
56
+ }
57
+ }
58
+ }
59
+
60
+ // 格子
61
+ &[ui-table~='grid'],
62
+ &[ui-table~='cube'] {
63
+ tr {
64
+ @include theme {
65
+ box-shadow: inset 0 -1px 0 0 co(line);
66
+ }
67
+ // &:last-child {
68
+ // box-shadow: 0 0 0 0;
69
+ // }
70
+ }
71
+ th,
72
+ td {
73
+ @include theme {
74
+ // border-left: 1px solid co(line);
75
+ box-shadow: inset 1px 0 0 0 co(line);
76
+ // border-top: 1px solid co(line);
77
+ &:first-child {
78
+ box-shadow: 0 0 0 0;
79
+ }
80
+ }
81
+ // padding: 0.75em 1em;
82
+ }
83
+ }
84
+ &[ui-table~='grid'] {
85
+ @include theme {
86
+ // border: 1px solid co(line);
87
+ box-shadow: inset 0 0 0px 1px co(line);
88
+ }
89
+ border-radius: 0.25em;
90
+ border-left: 0;
91
+ border-top: 0;
92
+ &[trim*='n'] {
93
+ th,
94
+ td {
95
+ @include theme {
96
+ border-right: 1px solid co(line);
97
+ }
98
+ &:first-child {
99
+ @include theme {
100
+ border-left: 1px solid co(line);
101
+ }
102
+ }
103
+ }
104
+ tr:last-child {
105
+ td {
106
+ @include theme {
107
+ border-bottom: 1px solid co(line);
108
+ }
109
+ }
110
+ }
111
+ tr:first-child {
112
+ th,
113
+ td {
114
+ @include theme {
115
+ border-top: 1px solid co(line);
116
+ }
117
+ }
118
+ }
119
+ }
120
+
121
+ tr {
122
+ &:first-child {
123
+ th,
124
+ td {
125
+ &:first-child {
126
+ border-radius: 0.2rem 0 0 0;
127
+ }
128
+ &:last-child {
129
+ border-radius: 0 0.2rem 0 0;
130
+ }
131
+ }
132
+ }
133
+ &:last-child {
134
+ th,
135
+ td {
136
+ &:first-child {
137
+ border-radius: 0 0 0 0.2rem;
138
+ }
139
+ &:last-child {
140
+ border-radius: 0 0 0.2rem 0;
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ // 分割
148
+ &[ui-table~='cube'] {
149
+ border: 0;
150
+ &:first-child {
151
+ padding-left: 0;
152
+ }
153
+ &:last-child {
154
+ padding-right: 0;
155
+ }
156
+
157
+ [ui-hide] {
158
+ & + th,
159
+ & + td {
160
+ border-left: 0;
161
+ }
162
+ & + tr {
163
+ th,
164
+ td {
165
+ border-top: 0;
166
+ }
167
+ }
168
+ }
169
+
170
+ &[trim*='n'] {
171
+ @include theme {
172
+ border: 1px solid co(line);
173
+ }
174
+ }
175
+
176
+ th,
177
+ td {
178
+ &:first-child {
179
+ border-left: 0;
180
+ }
181
+ }
182
+ tr:first-child {
183
+ th,
184
+ td {
185
+ border-top: 0;
186
+ }
187
+ }
188
+ }
189
+
190
+ // // 小行
191
+ // &[ui-table~='s'] {
192
+ // th,
193
+ // td {
194
+ // padding: 0.5em 1em;
195
+ // }
196
+ // }
197
+
198
+ // // 大行
199
+ // &[ui-table~='l'] {
200
+ // th,
201
+ // td {
202
+ // padding: 1em 1em;
203
+ // }
204
+ // }
205
+
206
+ &[ui-table~=':hover'] {
207
+ tr {
208
+ transition: all 0.3s;
209
+ &:hover {
210
+ @include theme {
211
+ background-color: rgba(co(weak), 0.5);
212
+ }
213
+ }
214
+ }
215
+ }
216
+
217
+ // 对齐
218
+ &[ui-table~=':vt'] {
219
+ th,
220
+ td {
221
+ vertical-align: top;
222
+ }
223
+ }
224
+ &[ui-table~=':vb'] {
225
+ th,
226
+ td {
227
+ vertical-align: bottom;
228
+ }
229
+ }
230
+ }
@@ -0,0 +1,78 @@
1
+ // 主题
2
+ @import './base.scss';
3
+
4
+ [ui-table~='@b'] {
5
+ // 固定头部
6
+ thead > tr,
7
+ thead > tr th,
8
+ .table-head-fixed {
9
+ @include theme {
10
+ background: co(fore);
11
+ }
12
+ }
13
+ // 表格主体
14
+ tbody {
15
+ tr {
16
+ &:nth-child(even) {
17
+ &,
18
+ th,
19
+ td {
20
+ @include theme {
21
+ background-color: co(fore);
22
+ }
23
+ }
24
+ }
25
+ &:nth-child(odd) {
26
+ &,
27
+ th,
28
+ td {
29
+ @include theme {
30
+ background-color: mix(co(weak), co(fore), 75%);
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ // 移入效果
37
+ &[ui-table~='ux:hover'] {
38
+ tbody {
39
+ tr {
40
+ &:nth-child(even) {
41
+ &:hover {
42
+ @include theme {
43
+ box-shadow:
44
+ 0 0 0 2px co(fore),
45
+ 0 0 0 3px co(line);
46
+ z-index: 1;
47
+ position: relative;
48
+ }
49
+ }
50
+ }
51
+ &:nth-child(odd) {
52
+ &:hover {
53
+ @include theme {
54
+ box-shadow:
55
+ 0 0 0 2px co(weak),
56
+ 0 0 0 3px co(line);
57
+ z-index: 1;
58
+ position: relative;
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+
66
+ // 滚动固定补白
67
+ // &[ui-table~='ui:sticky'] {
68
+ // th,
69
+ // td {
70
+ // &:first-child {
71
+ // box-shadow: -3em 0 0 0 co(fore);
72
+ // }
73
+ // &:last-child {
74
+ // box-shadow: 3em 0 0 0 co(fore);
75
+ // }
76
+ // }
77
+ // }
78
+ }
@@ -0,0 +1,18 @@
1
+ // 主题
2
+ @import './base.scss';
3
+
4
+ [ui-table~='@c'] {
5
+ & {
6
+ border-collapse: separate;
7
+ border-spacing: 0 0.5em;
8
+ }
9
+
10
+ tbody {
11
+ tr {
12
+ @include theme {
13
+ box-shadow: inset 0 0 0 1px co(line);
14
+ border-radius: 0.2em;
15
+ }
16
+ }
17
+ }
18
+ }
package/tabs/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @neatui/core
2
+
3
+ MCUI 选项卡组件。本组件依赖框架核心 @neatui/core 。更多详情请访问官网 [https://mcui.fekit.cn/](https://mcui.fekit.cn/)
4
+
5
+ ## 安装
6
+
7
+ ### 安装核心
8
+
9
+ ```
10
+ npm i @neatui/core
11
+ ```
12
+
13
+ ### 安装组件
14
+
15
+ ```
16
+ npm i @neatui/tabs
17
+ ```
18
+
19
+ ## 引用
20
+
21
+ ### scss
22
+
23
+ ```scss
24
+ $theme: (
25
+ light: (
26
+ main: #d52932,
27
+ vice: #67337d,
28
+ text: #000000,
29
+ back: #ffffff,
30
+ link: #0d66d0,
31
+ code: #e23861,
32
+ well: #4bbc73,
33
+ warn: #fb9a2a,
34
+ risk: #f95850,
35
+ info: #0889e4
36
+ )
37
+ // 添加更多主题...
38
+ );
39
+
40
+ // 引用框架核心
41
+ @import '~@neatui/core';
42
+
43
+ // 引用业务组件
44
+ @import '~@neatui/tabs/tabs@a';
45
+ // 引用更多组件...
46
+ ```
47
+
48
+ ### html
49
+
50
+ ```html
51
+ <div ui-tabs="@a">
52
+ <div class="active">选择卡1</div>
53
+ <div>选择卡2</div>
54
+ <div>选择卡3</div>
55
+ </div>
56
+ ```
57
+
58
+ ## 使用
59
+
60
+ ## 更多
61
+
62
+ 详细文档请到 MCUI 官网 [https://mcui.fekit.cn](https://mcui.fekit.cn)
@@ -0,0 +1 @@
1
+ @import './tabs@a.scss';
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@neatui/tabs",
3
+ "version": "1.0.8",
4
+ "description": "",
5
+ "main": "mcui@tabs.scss",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://gitlab.com/mcui/mcui.desktop.git"
12
+ },
13
+ "keywords": [
14
+ "mcui"
15
+ ],
16
+ "author": "xiaojunbo",
17
+ "license": "MIT",
18
+ "bugs": {
19
+ "url": "https://gitlab.com/mcui/mcui.desktop/issues"
20
+ },
21
+ "homepage": "https://gitlab.com/mcui/mcui.desktop#readme"
22
+ }
@@ -0,0 +1,62 @@
1
+ $co: 'main', 'well', 'warn', 'risk', 'info';
2
+ $sz: 'xs', 's', 'm', 'l', 'xl';
3
+
4
+ [ui-tabs~='@a'] {
5
+ position: relative;
6
+ max-width: 100%;
7
+ height: 2.5em;
8
+ line-height: 2.5em;
9
+ white-space: nowrap;
10
+ overflow-x: auto;
11
+ overflow-y: hidden;
12
+
13
+ @include theme {
14
+ box-shadow: inset 0 -0.2em 0 rgba(co(line), 0.4);
15
+ }
16
+
17
+ & > * {
18
+ position: relative;
19
+ display: inline-block;
20
+ cursor: pointer;
21
+ margin-left: 1rem;
22
+ margin-right: 1rem;
23
+
24
+ &:first-child {
25
+ margin-left: 0;
26
+ }
27
+ &:last-child {
28
+ margin-right: 0;
29
+ }
30
+
31
+ &.active {
32
+ -webkit-font-smoothing: auto;
33
+ @include theme {
34
+ color: co(main);
35
+ box-shadow: inset 0 -0.2em 0 co(main);
36
+ }
37
+ }
38
+ }
39
+
40
+ // 对齐
41
+ &,
42
+ &[ui-tabs~='al'] {
43
+ text-align: left;
44
+ }
45
+ &[ui-tabs~='ac'] {
46
+ text-align: center;
47
+ }
48
+ &[ui-tabs~='ar'] {
49
+ text-align: right;
50
+ }
51
+
52
+ // 尺寸
53
+ $base: 2em;
54
+ @each $i in $sz {
55
+ // @debug $i;
56
+ &[ui-tabs~='#{$i}'] {
57
+ height: $base;
58
+ line-height: $base;
59
+ }
60
+ $base: $base + 0.5;
61
+ }
62
+ }
package/tags/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # @neatui/tags
2
+
3
+ MCUI 选项卡组件。本组件依赖框架核心 @neatui/core 。更多详情请访问官网 [https://mcui.fekit.cn/](https://mcui.fekit.cn/)
4
+
5
+ ## 安装
6
+
7
+ ### 安装核心
8
+
9
+ ```
10
+ npm i @neatui/core
11
+ ```
12
+
13
+ ### 安装组件
14
+
15
+ ```
16
+ npm i @neatui/tags
17
+ ```
18
+
19
+ ## 引用
20
+
21
+ ### scss
22
+
23
+ ```scss
24
+ $theme: (
25
+ light: (
26
+ main: #d52932,
27
+ vice: #67337d,
28
+ text: #000000,
29
+ back: #ffffff,
30
+ link: #0d66d0,
31
+ code: #e23861,
32
+ well: #4bbc73,
33
+ warn: #fb9a2a,
34
+ risk: #f95850,
35
+ info: #0889e4
36
+ )
37
+ // 添加更多主题...
38
+ );
39
+
40
+ // 引用框架核心
41
+ @import '~@neatui/core';
42
+
43
+ // 引用业务组件
44
+ @import '~@neatui/tags/tags@a';
45
+ // 引用更多组件...
46
+ ```
47
+
48
+ ### html
49
+
50
+ ```html
51
+ <!-- 群组 -->
52
+ <div ui-tags="@a main">
53
+ <div class="active">标签1</div>
54
+ <div>标签1</div>
55
+ <div>标签1</div>
56
+ </div>
57
+
58
+ <!-- 单个 -->
59
+ <ul>
60
+ <li ui-tag="@a info">信息</li>
61
+ <li ui-tag="@a well">提倡</li>
62
+ <li ui-tag="@a warn">警告</li>
63
+ <li ui-tag="@a risk">风险</li>
64
+ </ul>
65
+ ```
66
+
67
+ ## 使用
68
+
69
+ ## 更多
70
+
71
+ 详细文档请到 MCUI 官网 [https://mcui.fekit.cn](https://mcui.fekit.cn)
@@ -0,0 +1,2 @@
1
+ @import './tags@a.scss';
2
+ @import './tags@b.scss';
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@neatui/tags",
3
+ "version": "1.1.2",
4
+ "description": "",
5
+ "main": "mcui@tags.scss",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://gitlab.com/mcui/mcui.desktop.git"
12
+ },
13
+ "keywords": [
14
+ "mcui"
15
+ ],
16
+ "author": "xiaojunbo",
17
+ "license": "MIT",
18
+ "bugs": {
19
+ "url": "https://gitlab.com/mcui/mcui.desktop/issues"
20
+ },
21
+ "homepage": "https://gitlab.com/mcui/mcui.desktop#readme"
22
+ }
@@ -0,0 +1,125 @@
1
+ $state: 'main', 'well', 'warn', 'risk', 'info', 'read', 'note', 'idle';
2
+ $sz: 'xs', 's', 'm', 'l', 'xl';
3
+
4
+ // 单个
5
+ [ui-tag~='@a'] {
6
+ display: inline-block;
7
+ padding: 0.25em 0.5em;
8
+ border-radius: 0.2rem;
9
+ line-height: 1;
10
+ white-space: nowrap;
11
+ cursor: pointer;
12
+
13
+ // 圆角
14
+ &[ui-tag~=':round'] {
15
+ border-radius: 10em;
16
+ padding: 0.25em 0.65em;
17
+ }
18
+ // 叶型
19
+ &[ui-tag~=':leaf'] {
20
+ border-radius: 0.5em 0;
21
+ }
22
+ // 弹头
23
+ &[ui-tag~=':bullet'] {
24
+ padding: 0.25em 0.5em 0.25em 0.65em;
25
+ border-radius: 1em 0.2em 0.2em 1em;
26
+ }
27
+
28
+ @each $key in $state {
29
+ @include theme {
30
+ $val: co($key);
31
+ $co: mix($val, co(text), 95%);
32
+ $bg: saturate(rgba($val, 0.06), 20%);
33
+ $bk: $val;
34
+
35
+ @if ($key== 'main') {
36
+ &,
37
+ &[ui-tag~='#{$key}'] {
38
+ color: $co;
39
+ box-shadow: inset 0 0 0 1px rgba($bk, 0.15);
40
+ background: $bg;
41
+ }
42
+ } @else {
43
+ &[ui-tag~='#{$key}'] {
44
+ color: $co;
45
+ box-shadow: inset 0 0 0 1px rgba($bk, 0.15);
46
+ background: $bg;
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ // 群组
54
+ [ui-tags~='@a'] {
55
+ // 容器
56
+ & {
57
+ position: relative;
58
+ width: 100%;
59
+
60
+ &[ui-tags~='al'] {
61
+ & > * {
62
+ margin-right: 0.5rem;
63
+ }
64
+ }
65
+ &[ui-tags~='ac'] {
66
+ & > * {
67
+ margin-left: 0.5rem;
68
+ margin-right: 0.5rem;
69
+ }
70
+ }
71
+ &[ui-tags~='ar'] {
72
+ & > * {
73
+ margin-left: 0.5rem;
74
+ }
75
+ }
76
+ }
77
+
78
+ // 子项
79
+ & > * {
80
+ display: inline-block;
81
+ padding: 0.25em 0.5em;
82
+ border-radius: 0.2rem;
83
+ line-height: 1;
84
+ white-space: nowrap;
85
+ }
86
+
87
+ // 圆角
88
+ &[ui-tags~=':round'] > * {
89
+ border-radius: 10em;
90
+ }
91
+ // 叶型
92
+ &[ui-tags~=':leaf'] > * {
93
+ border-radius: 10em 0;
94
+ }
95
+ // 弹头
96
+ &[ui-tag~=':bullet'] > * {
97
+ padding: 0.25em 0.65em 0.25em 0.5em;
98
+ border-radius: 1em 0.2em 0.2em 1em;
99
+ }
100
+
101
+ // 主题
102
+ @each $key in $state {
103
+ @include theme {
104
+ $val: co($key);
105
+ $co: mix($val, co(text), 85%);
106
+ $bg: saturate(rgba($val, 0.06), 20%);
107
+ $bk: $val;
108
+
109
+ @if ($key== 'main') {
110
+ & > *,
111
+ &[ui-tags~='#{$key}'] > * {
112
+ color: $co;
113
+ box-shadow: inset 0 0 0 1px rgba($bk, 0.15);
114
+ background: $bg;
115
+ }
116
+ } @else {
117
+ &[ui-tags~='#{$key}'] > * {
118
+ color: $co;
119
+ box-shadow: inset 0 0 0 1px rgba($bk, 0.15);
120
+ background: $bg;
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }