@neatui/css 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/all.scss +22 -0
- package/anim/am-loading.scss +220 -0
- package/anim/am-rotate.scss +17 -0
- package/anim/am-view-aa.scss +91 -0
- package/anim/am-view-ab.scss +107 -0
- package/anim/am-view-ac.scss +114 -0
- package/anim/am-view-ad.scss +109 -0
- package/anim/am-view-ae.scss +109 -0
- package/anim/am-view-af.scss +104 -0
- package/anim/am-view-ag.scss +1789 -0
- package/anim/am-view-ah.scss +122 -0
- package/anim/am-view-ai.scss +116 -0
- package/anim/am-view-aj.scss +112 -0
- package/anim/am-view-ak.scss +102 -0
- package/anim/am-view-al.scss +98 -0
- package/anim/am-view-am.scss +97 -0
- package/anim/am-view-an.scss +109 -0
- package/anim/am-view-ao.scss +123 -0
- package/anim/am-view-ap.scss +108 -0
- package/anim/am-view-aq.scss +115 -0
- package/anim/am-view-ar.scss +113 -0
- package/anim/am-view-as.scss +99 -0
- package/anim/am-view-at.scss +103 -0
- package/anim/mcui@anim.scss +22 -0
- package/anim/package.json +16 -0
- package/badge/badge@theme=aa.scss +36 -0
- package/badge/package.json +22 -0
- package/btns/README.md +79 -0
- package/btns/base.scss +152 -0
- package/btns/btns@a.scss +469 -0
- package/btns/btns@b.scss +187 -0
- package/btns/btns@c.scss +169 -0
- package/btns/mcui@btns.scss +3 -0
- package/btns/package.json +16 -0
- package/card/card@a.scss +238 -0
- package/card/card@b.scss +75 -0
- package/card/mcui@card.scss +2 -0
- package/card/package.json +15 -0
- package/chat/chat@a.scss +139 -0
- package/chat/mcui@chat.scss +1 -0
- package/chat/package.json +11 -0
- package/cite/cite@a.scss +33 -0
- package/cite/package.json +11 -0
- package/core/README.md +142 -0
- package/core/base.scss +544 -0
- package/core/border.scss +307 -0
- package/core/color.scss +245 -0
- package/core/cols.scss +148 -0
- package/core/cover.scss +94 -0
- package/core/flex.scss +616 -0
- package/core/line.scss +4 -0
- package/core/margin.scss +0 -0
- package/core/mcui@core.scss +36 -0
- package/core/mcui@mobile.scss +37 -0
- package/core/media.scss +268 -0
- package/core/package.json +16 -0
- package/core/padding.scss +0 -0
- package/core/pos.scss +252 -0
- package/core/reset.scss +165 -0
- package/core/scale.scss +24 -0
- package/core/scroll.scss +178 -0
- package/core/shadow.scss +81 -0
- package/core/size.mobile.scss +105 -0
- package/core/size.scss +178 -0
- package/core/theme.scss +156 -0
- package/core/trim.mobile.scss +327 -0
- package/core/trim.scss +443 -0
- package/core/ux.scss +334 -0
- package/demo/demo@a.scss +34 -0
- package/demo/mcui@demo.scss +1 -0
- package/form/README.md +142 -0
- package/form/base.scss +425 -0
- package/form/form@a/base.scss +33 -0
- package/form/form@a/checkbox.scss +194 -0
- package/form/form@a/date.scss +86 -0
- package/form/form@a/index.scss +9 -0
- package/form/form@a/input.scss +156 -0
- package/form/form@a/radio.scss +99 -0
- package/form/form@a/select.scss +128 -0
- package/form/form@a/switch.scss +83 -0
- package/form/form@a/textarea.scss +105 -0
- package/form/form@a/upload.scss +162 -0
- package/form/form@b/base.scss +33 -0
- package/form/form@b/checkbox.scss +86 -0
- package/form/form@b/date.scss +107 -0
- package/form/form@b/index.scss +9 -0
- package/form/form@b/input.scss +163 -0
- package/form/form@b/radio.scss +90 -0
- package/form/form@b/select.scss +124 -0
- package/form/form@b/switch.scss +83 -0
- package/form/form@b/textarea.scss +105 -0
- package/form/form@b/upload.scss +160 -0
- package/form/form@c/base.scss +44 -0
- package/form/form@c/checkbox.scss +90 -0
- package/form/form@c/date.scss +125 -0
- package/form/form@c/index.scss +9 -0
- package/form/form@c/input.scss +169 -0
- package/form/form@c/radio.scss +84 -0
- package/form/form@c/select.scss +121 -0
- package/form/form@c/switch.scss +83 -0
- package/form/form@c/textarea.scss +85 -0
- package/form/form@c/upload.scss +159 -0
- package/form/form@d/base.scss +45 -0
- package/form/form@d/checkbox.scss +87 -0
- package/form/form@d/date.scss +125 -0
- package/form/form@d/index.scss +9 -0
- package/form/form@d/input.scss +346 -0
- package/form/form@d/radio.scss +81 -0
- package/form/form@d/select.scss +121 -0
- package/form/form@d/switch.scss +83 -0
- package/form/form@d/textarea.scss +104 -0
- package/form/form@d/upload.scss +160 -0
- package/form/mcui@form.scss +4 -0
- package/form/package.json +22 -0
- package/form/radio@theme=aa.scss +74 -0
- package/grid/grid@a.scss +54 -0
- package/grid/mcui@grid.scss +1 -0
- package/grid/package.json +16 -0
- package/icon/icon@add.scss +9 -0
- package/icon/icon@close.scss +12 -0
- package/icon/icon@down.scss +9 -0
- package/icon/icon@download.scss +26 -0
- package/icon/icon@drag.scss +9 -0
- package/icon/icon@except.scss +9 -0
- package/icon/icon@hook.scss +16 -0
- package/icon/icon@left.scss +9 -0
- package/icon/icon@link.scss +14 -0
- package/icon/icon@menu.scss +10 -0
- package/icon/icon@minus.scss +7 -0
- package/icon/icon@more.scss +8 -0
- package/icon/icon@omit.scss +8 -0
- package/icon/icon@quit.scss +11 -0
- package/icon/icon@refresh.scss +11 -0
- package/icon/icon@right.scss +9 -0
- package/icon/icon@search.scss +9 -0
- package/icon/icon@time.scss +12 -0
- package/icon/icon@top.scss +9 -0
- package/icon/icon@upload.scss +26 -0
- package/icon/icon@view.scss +20 -0
- package/icon/mcui@icon.scss +21 -0
- package/icon/package.json +15 -0
- package/imgs/README.md +78 -0
- package/imgs/base.scss +8 -0
- package/imgs/imgs@a.scss +171 -0
- package/imgs/imgs@b.scss +173 -0
- package/imgs/mcui@imgs.scss +1 -0
- package/imgs/package.json +16 -0
- package/index.js +28 -0
- package/line/line@a.scss +51 -0
- package/line/line@b.scss +63 -0
- package/line/mcui@line.scss +2 -0
- package/line/package.json +16 -0
- package/list/list@a.scss +62 -0
- package/list/list@b.scss +83 -0
- package/list/list@c.scss +89 -0
- package/list/mcui@list.scss +2 -0
- package/list/package.json +16 -0
- package/load/README.md +69 -0
- package/load/load@a.scss +44 -0
- package/load/load@b.scss +56 -0
- package/load/load@c.scss +270 -0
- package/load/load@d.scss +26 -0
- package/load/load@e.scss +24 -0
- package/load/load@f.scss +124 -0
- package/load/load@g.scss +35 -0
- package/load/load@h.scss +51 -0
- package/load/load@i.scss +51 -0
- package/load/mcui@load.scss +8 -0
- package/load/package.json +16 -0
- package/menu/mcui@menu.scss +1 -0
- package/menu/menu@b.scss +302 -0
- package/menu/menu@theme=ab.scss +282 -0
- package/menu/package.json +22 -0
- package/navs/README.md +30 -0
- package/navs/mcui@navs.scss +2 -0
- package/navs/navs@a.scss +113 -0
- package/navs/navs@b.scss +111 -0
- package/navs/package.json +16 -0
- package/note/mcui@note.scss +2 -0
- package/note/note@a.scss +26 -0
- package/note/note@b.scss +33 -0
- package/note/package.json +11 -0
- package/opts/mcui@opts.scss +1 -0
- package/opts/opts@a.scss +52 -0
- package/opts/package.json +11 -0
- package/package.json +26 -0
- package/paging/mc-paging-ui1503.scss +106 -0
- package/paging/mc-paging.scss +432 -0
- package/paging/paging@theme=aa.scss +45 -0
- package/path/README.md +142 -0
- package/path/mcui@path.scss +1 -0
- package/path/package.json +22 -0
- package/path/path@a.scss +38 -0
- package/side/mcui@side.scss +0 -0
- package/side/side.scss +2 -0
- package/steps/mcui@steps.scss +2 -0
- package/steps/package.json +17 -0
- package/steps/steps@a.scss +89 -0
- package/steps/steps@v.scss +122 -0
- package/table/base.scss +140 -0
- package/table/mcui@table.scss +3 -0
- package/table/package.json +22 -0
- package/table/table@a.scss +230 -0
- package/table/table@b.scss +78 -0
- package/table/table@c.scss +18 -0
- package/tabs/README.md +62 -0
- package/tabs/mcui@tabs.scss +1 -0
- package/tabs/package.json +22 -0
- package/tabs/tabs@a.scss +62 -0
- package/tags/README.md +71 -0
- package/tags/mcui@tags.scss +2 -0
- package/tags/package.json +22 -0
- package/tags/tags@a.scss +125 -0
- package/tags/tags@b.scss +131 -0
- package/tips/README.md +62 -0
- package/tips/base.scss +351 -0
- package/tips/mcui@tips.scss +1 -0
- package/tips/package.json +22 -0
- package/tips/tips@a.scss +52 -0
- package/title/mcui@title.scss +2 -0
- package/title/package.json +15 -0
- package/title/title@a.scss +18 -0
- package/title/title@b.scss +7 -0
- package/user/mcui@user.scss +0 -0
- package/user/user@a.scss +7 -0
package/btns/btns@c.scss
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
$size: 'xs', 's', 'm', 'l', 'xl';
|
|
3
|
+
$type: 'none', 'main', 'vice', 'text', 'read', 'weak', 'back', 'info', 'well', 'warn', 'risk';
|
|
4
|
+
|
|
5
|
+
// 按钮
|
|
6
|
+
[ui-btn~='@c'] {
|
|
7
|
+
// 基础样式
|
|
8
|
+
& {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-table;
|
|
11
|
+
height: 2.5em;
|
|
12
|
+
line-height: 2.5em;
|
|
13
|
+
padding: 0 1em;
|
|
14
|
+
border-radius: 0.25em;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
transition: all 50ms;
|
|
17
|
+
text-align: center;
|
|
18
|
+
vertical-align: middle;
|
|
19
|
+
border: 0;
|
|
20
|
+
user-select: none;
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
@include theme {
|
|
23
|
+
color: co(text);
|
|
24
|
+
background: co(weak);
|
|
25
|
+
box-shadow: inset 0 0 0 1px co(line);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
& > * {
|
|
30
|
+
&.icon {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
& + * {
|
|
33
|
+
margin-left: 0.2em;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 绝对尺寸
|
|
39
|
+
&[ui-btn~=':abs'] {
|
|
40
|
+
height: 2.5rem;
|
|
41
|
+
line-height: 2.5rem;
|
|
42
|
+
padding: 0 1rem;
|
|
43
|
+
border-radius: 0.25rem;
|
|
44
|
+
}
|
|
45
|
+
// 圆弧按钮
|
|
46
|
+
&[ui-btn~=':round'] {
|
|
47
|
+
border-radius: 100em;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 移入状态
|
|
51
|
+
&:hover {
|
|
52
|
+
@include theme {
|
|
53
|
+
box-shadow:
|
|
54
|
+
inset 0 0 0 1px co(line),
|
|
55
|
+
inset 0 0 0 100em rgba(co(text), 0.04);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 按下状态
|
|
60
|
+
&:active {
|
|
61
|
+
transform: scale(0.98, 0.95);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 正方形按钮
|
|
65
|
+
&[ui-btn~=':square'] {
|
|
66
|
+
width: 2.5em;
|
|
67
|
+
padding: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 禁用按钮
|
|
71
|
+
&[ui-btn~=':disabled'] {
|
|
72
|
+
&,
|
|
73
|
+
&:hover {
|
|
74
|
+
opacity: 0.65;
|
|
75
|
+
box-shadow:
|
|
76
|
+
inset 0 0 0 1px transparent,
|
|
77
|
+
inset 0 0 0 100em rgba(0, 0, 0, 0);
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
}
|
|
80
|
+
&:active {
|
|
81
|
+
transform: scale(1, 1);
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 按钮尺寸
|
|
87
|
+
$base: 1.5;
|
|
88
|
+
@each $i in $size {
|
|
89
|
+
&[ui-btn~='#{$i}'] {
|
|
90
|
+
height: #{$base}em;
|
|
91
|
+
line-height: #{$base}em;
|
|
92
|
+
padding: 0 #{calc(($base - 1) / 2)}em;
|
|
93
|
+
|
|
94
|
+
// 方形按钮
|
|
95
|
+
&[ui-btn~=':square'] {
|
|
96
|
+
width: #{$base}em;
|
|
97
|
+
padding: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&[ui-btn~=':block'] {
|
|
101
|
+
width: 100%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&[ui-btn~=':abs'] {
|
|
105
|
+
height: #{$base}rem;
|
|
106
|
+
line-height: #{$base}rem;
|
|
107
|
+
padding: 0 #{calc(($base - 1) / 2)}rem;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
$base: $base + 0.5;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// 按钮颜色
|
|
114
|
+
@each $name in $type {
|
|
115
|
+
&[ui-btn~='#{$name}'] {
|
|
116
|
+
@if ($name == 'none' or $name == 'weak' or $name == 'back') {
|
|
117
|
+
@include theme {
|
|
118
|
+
background: co($name);
|
|
119
|
+
}
|
|
120
|
+
color: inherit;
|
|
121
|
+
} @else {
|
|
122
|
+
@include theme {
|
|
123
|
+
color: co(back);
|
|
124
|
+
background-image: linear-gradient(90deg, mix(co($name), #fff, 70%) 0%, co($name) 100%);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
box-shadow: inset 0 0 0 1px transparent;
|
|
128
|
+
|
|
129
|
+
&:hover {
|
|
130
|
+
@include theme {
|
|
131
|
+
box-shadow:
|
|
132
|
+
inset 0 0 0 1px transparent,
|
|
133
|
+
inset 0 0 0 100em rgba(co(text), 0.04);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// 边框式
|
|
138
|
+
&[ui-btn~=':border'] {
|
|
139
|
+
background: transparent;
|
|
140
|
+
@include theme {
|
|
141
|
+
color: co($name);
|
|
142
|
+
box-shadow: inset 0 0 0 1px co($name);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:hover {
|
|
146
|
+
@include theme {
|
|
147
|
+
box-shadow:
|
|
148
|
+
inset 0 0 0 1px co($name),
|
|
149
|
+
inset 0 0 0 100em rgba(co($name), 0.08);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// 下划线
|
|
155
|
+
&[ui-btn~=':underline'] {
|
|
156
|
+
@include theme {
|
|
157
|
+
color: co($name);
|
|
158
|
+
}
|
|
159
|
+
background: transparent;
|
|
160
|
+
box-shadow: inset 0 0 0 1px transparent;
|
|
161
|
+
|
|
162
|
+
&:hover {
|
|
163
|
+
box-shadow: inset 0 0 0 1px transparent;
|
|
164
|
+
text-decoration: underline;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neatui/btns",
|
|
3
|
+
"version": "1.2.14",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "mcui@btns.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/card/card@a.scss
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
$co: 'none', 'main', 'vice', 'text', 'read', 'note', 'line', 'case', 'weak', 'fore', 'back', 'info', 'well', 'warn', 'risk';
|
|
2
|
+
$sz: 'xs', 's', 'm', 'l', 'xl';
|
|
3
|
+
|
|
4
|
+
@mixin card_a($name: 'ui-card', $group: 0, $path: '') {
|
|
5
|
+
&#{$path} {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
border-radius: 0.3em;
|
|
10
|
+
transition: box-shadow 0.3s;
|
|
11
|
+
// &:hover {
|
|
12
|
+
// @include theme {
|
|
13
|
+
// box-shadow: 0 1px 6px co(deep);
|
|
14
|
+
// box-shadow: 0 1px 0.2em 1px rgba(0, 0, 0, 0.07);
|
|
15
|
+
// }
|
|
16
|
+
// }
|
|
17
|
+
&.active {
|
|
18
|
+
@include theme {
|
|
19
|
+
border: 1px solid co(read);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
& > * {
|
|
24
|
+
@include theme {
|
|
25
|
+
background-color: co(fore);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:first-child {
|
|
29
|
+
border-top-left-radius: 0.3em;
|
|
30
|
+
border-top-right-radius: 0.3em;
|
|
31
|
+
}
|
|
32
|
+
&:last-child {
|
|
33
|
+
border-bottom-left-radius: 0.3em;
|
|
34
|
+
border-bottom-right-radius: 0.3em;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 标题
|
|
39
|
+
[ui-card-head],
|
|
40
|
+
[ui-card-foot] {
|
|
41
|
+
position: relative;
|
|
42
|
+
padding: 1em 1.5em;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
align-items: center;
|
|
47
|
+
z-index: 5;
|
|
48
|
+
}
|
|
49
|
+
[ui-card-head~='xm'],
|
|
50
|
+
[ui-card-foot~='xm'] {
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
}
|
|
53
|
+
[ui-card-head~='cm'],
|
|
54
|
+
[ui-card-foot~='cm'] {
|
|
55
|
+
justify-content: center;
|
|
56
|
+
}
|
|
57
|
+
[ui-card-head~='lm'],
|
|
58
|
+
[ui-card-foot~='lm'] {
|
|
59
|
+
justify-content: flex-start;
|
|
60
|
+
}
|
|
61
|
+
[ui-card-head~='rm'],
|
|
62
|
+
[ui-card-foot~='rm'] {
|
|
63
|
+
justify-content: flex-end;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 工具
|
|
67
|
+
[ui-card-tool] {
|
|
68
|
+
& {
|
|
69
|
+
position: relative;
|
|
70
|
+
pointer-events: auto;
|
|
71
|
+
max-height: 1000px;
|
|
72
|
+
opacity: 1;
|
|
73
|
+
z-index: 2;
|
|
74
|
+
transition:
|
|
75
|
+
all 0.2s,
|
|
76
|
+
padding 0.35s,
|
|
77
|
+
margin 0.35s;
|
|
78
|
+
@include theme {
|
|
79
|
+
background: rgba(co(fore), 0.8);
|
|
80
|
+
}
|
|
81
|
+
padding: 1em 1.5em;
|
|
82
|
+
margin-bottom: 1px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&[ui-card-tool~='hide'] {
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
padding-top: 0 !important;
|
|
88
|
+
padding-bottom: 0 !important;
|
|
89
|
+
margin-bottom: 0 !important;
|
|
90
|
+
max-height: 0 !important;
|
|
91
|
+
opacity: 0;
|
|
92
|
+
transition:
|
|
93
|
+
all 0.25s,
|
|
94
|
+
padding ease 0.35s,
|
|
95
|
+
margin ease 0.35s;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 主体
|
|
100
|
+
[ui-card-body] {
|
|
101
|
+
position: relative;
|
|
102
|
+
padding: 1.5em;
|
|
103
|
+
flex-grow: 1;
|
|
104
|
+
height: auto;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 头部
|
|
108
|
+
[ui-card-head] {
|
|
109
|
+
margin-bottom: 2px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 底部
|
|
113
|
+
[ui-card-foot] {
|
|
114
|
+
margin-top: 1px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@each $i in $co {
|
|
119
|
+
// 背景
|
|
120
|
+
&[#{$name}~='bg:#{$i}']#{$path} {
|
|
121
|
+
& > * {
|
|
122
|
+
@include theme {
|
|
123
|
+
background-color: co($i);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&[ui-card-tool] {
|
|
127
|
+
@include theme {
|
|
128
|
+
background-color: rgba(co($i), 0.8);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// 边框
|
|
135
|
+
&[#{$name}~='bk:#{$i}']#{$path} {
|
|
136
|
+
@include theme {
|
|
137
|
+
border: 1px solid co($i);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// 颜色
|
|
142
|
+
&[#{$name}~='co:#{$i}']#{$path} {
|
|
143
|
+
@include theme {
|
|
144
|
+
color: co($i);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
// 交互
|
|
149
|
+
&[#{$name}~='ux:hover']#{$path} {
|
|
150
|
+
&:hover {
|
|
151
|
+
@include theme {
|
|
152
|
+
box-shadow: 0 1px 6px co(deep);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// 尺寸
|
|
158
|
+
$sz_base: 0.5em;
|
|
159
|
+
@each $i in $sz {
|
|
160
|
+
&[#{$name}~='sz:#{$i}']#{$path} {
|
|
161
|
+
[ui-card-head],
|
|
162
|
+
[ui-card-foot] {
|
|
163
|
+
padding: $sz_base ($sz_base + 0.5);
|
|
164
|
+
}
|
|
165
|
+
[ui-card-body] {
|
|
166
|
+
padding: $sz_base ($sz_base + 0.5);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
$sz_base: $sz_base + 0.25;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// 单个卡片
|
|
174
|
+
[ui-card~='@a'] {
|
|
175
|
+
@include card_a('ui-card', 0, '');
|
|
176
|
+
// 撑满
|
|
177
|
+
&[ui-card~=':full'] {
|
|
178
|
+
flex-grow: 1;
|
|
179
|
+
height: auto;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&[ui-card~=':inline'] {
|
|
183
|
+
display: inline-flex;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// 放大
|
|
187
|
+
&[ui-card~=':max'] {
|
|
188
|
+
position: fixed;
|
|
189
|
+
width: 100%;
|
|
190
|
+
height: 100%;
|
|
191
|
+
left: 0;
|
|
192
|
+
top: 0;
|
|
193
|
+
z-index: 10;
|
|
194
|
+
overflow: auto;
|
|
195
|
+
@include theme {
|
|
196
|
+
background-color: co(back);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
[ui-card-body] {
|
|
200
|
+
overflow: auto;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// 群组卡片
|
|
206
|
+
[ui-cards~='@a'] {
|
|
207
|
+
@include card_a('ui-cards', 1, '>*>*');
|
|
208
|
+
|
|
209
|
+
// 撑满
|
|
210
|
+
&[ui-cards~=':full'] {
|
|
211
|
+
& > * {
|
|
212
|
+
flex-grow: 1;
|
|
213
|
+
height: auto;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// 放大
|
|
218
|
+
[ui-card~=':max'] {
|
|
219
|
+
position: fixed;
|
|
220
|
+
width: 100%;
|
|
221
|
+
height: 100%;
|
|
222
|
+
left: 0;
|
|
223
|
+
top: 0;
|
|
224
|
+
z-index: 10;
|
|
225
|
+
overflow: auto;
|
|
226
|
+
@include theme {
|
|
227
|
+
background-color: co(back);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
[ui-card-body] {
|
|
231
|
+
overflow: auto;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
& > * > * {
|
|
236
|
+
height: 100%;
|
|
237
|
+
}
|
|
238
|
+
}
|
package/card/card@b.scss
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@mixin card_b($name) {
|
|
2
|
+
& {
|
|
3
|
+
position: relative;
|
|
4
|
+
|
|
5
|
+
& > * {
|
|
6
|
+
position: relative;
|
|
7
|
+
transition: box-shadow 0.3s;
|
|
8
|
+
border-radius: 0.3em;
|
|
9
|
+
@include theme {
|
|
10
|
+
background: co(fore);
|
|
11
|
+
&:hover {
|
|
12
|
+
box-shadow: 0 1px 6px co(line);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
&.active {
|
|
16
|
+
@include theme {
|
|
17
|
+
border: 1px solid co(read);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 标题
|
|
22
|
+
[ui-card-head] {
|
|
23
|
+
padding: 0 1.5rem;
|
|
24
|
+
line-height: 4rem;
|
|
25
|
+
@include med('<dpc') {
|
|
26
|
+
padding: 0 1rem;
|
|
27
|
+
line-height: 3.5rem;
|
|
28
|
+
}
|
|
29
|
+
@include theme {
|
|
30
|
+
border-bottom: 1px solid rgba(co(line), 0.5);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// 主体
|
|
34
|
+
[ui-card-body] {
|
|
35
|
+
padding: 1.5rem;
|
|
36
|
+
@include med('<dpc') {
|
|
37
|
+
padding: 1.5rem;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@at-root {
|
|
44
|
+
// 最大化
|
|
45
|
+
&[#{$name}~='max'] {
|
|
46
|
+
position: fixed;
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
|
+
left: 0;
|
|
50
|
+
top: 0;
|
|
51
|
+
z-index: 10;
|
|
52
|
+
overflow: auto;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// 单个卡片
|
|
58
|
+
[ui-card~='@b'] {
|
|
59
|
+
@include card_b('ui-card');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// 多个卡片
|
|
63
|
+
[ui-cards~='@b'] {
|
|
64
|
+
& {
|
|
65
|
+
position: relative;
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
align-items: stretch;
|
|
69
|
+
justify-content: flex-start;
|
|
70
|
+
align-content: stretch;
|
|
71
|
+
}
|
|
72
|
+
& > * {
|
|
73
|
+
@include card_b('ui-cards');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neatui/card",
|
|
3
|
+
"version": "1.0.52",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "mcui@card.scss",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"card"
|
|
11
|
+
],
|
|
12
|
+
"author": "xiaojunbo",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"dependencies": {}
|
|
15
|
+
}
|
package/chat/chat@a.scss
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
$cos: 'main', 'well', 'warn', 'risk', 'info';
|
|
2
|
+
[ui-chats~='@a'] {
|
|
3
|
+
// 基础
|
|
4
|
+
& > * {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
max-width: 80%;
|
|
8
|
+
margin-bottom: 1em;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// 用户
|
|
12
|
+
// [ui-chat-user] {
|
|
13
|
+
|
|
14
|
+
// }
|
|
15
|
+
|
|
16
|
+
// 主体
|
|
17
|
+
[ui-chat-body] {
|
|
18
|
+
position: relative;
|
|
19
|
+
padding: 0.75em 1rem;
|
|
20
|
+
border-radius: 0.5rem;
|
|
21
|
+
margin-left: 1rem;
|
|
22
|
+
line-height: 1.6em;
|
|
23
|
+
|
|
24
|
+
@include theme {
|
|
25
|
+
color: co(read);
|
|
26
|
+
background: co(weak);
|
|
27
|
+
box-shadow: 0 1px 2px co(deep);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::before {
|
|
31
|
+
position: absolute;
|
|
32
|
+
content: '';
|
|
33
|
+
display: block;
|
|
34
|
+
-webkit-box-sizing: content-box;
|
|
35
|
+
box-sizing: content-box;
|
|
36
|
+
width: 0;
|
|
37
|
+
height: 0;
|
|
38
|
+
right: 100%;
|
|
39
|
+
margin-right: -1px;
|
|
40
|
+
top: 0.8em;
|
|
41
|
+
border-style: solid;
|
|
42
|
+
border-width: 0.3em 0.6em 0.6em;
|
|
43
|
+
|
|
44
|
+
@include theme {
|
|
45
|
+
border-color: transparent co(weak) transparent transparent;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&[ui-chats~='bg:fore'] {
|
|
51
|
+
[ui-chat-body] {
|
|
52
|
+
@include theme {
|
|
53
|
+
color: co(read);
|
|
54
|
+
background: co(fore);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&::before {
|
|
58
|
+
@include theme {
|
|
59
|
+
border-color: transparent co(fore) transparent transparent;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&[ui-chats~='bg:main'] {
|
|
66
|
+
[ui-chat-body] {
|
|
67
|
+
@include theme {
|
|
68
|
+
color: co(fore);
|
|
69
|
+
background: co(main);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&::before {
|
|
73
|
+
@include theme {
|
|
74
|
+
border-color: transparent co(main) transparent transparent;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&[ui-chats~='bg:read'] {
|
|
81
|
+
[ui-chat-body] {
|
|
82
|
+
@include theme {
|
|
83
|
+
color: co(fore);
|
|
84
|
+
background: co(read);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&::before {
|
|
88
|
+
@include theme {
|
|
89
|
+
border-color: transparent co(read) transparent transparent;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&[ui-chats~='bg:well'] {
|
|
96
|
+
[ui-chat-body] {
|
|
97
|
+
@include theme {
|
|
98
|
+
color: co(fore);
|
|
99
|
+
background: co(well);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&::before {
|
|
103
|
+
@include theme {
|
|
104
|
+
border-color: transparent co(well) transparent transparent;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&[ui-chats~='bg:warn'] {
|
|
111
|
+
[ui-chat-body] {
|
|
112
|
+
@include theme {
|
|
113
|
+
color: co(fore);
|
|
114
|
+
background: co(warn);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&::before {
|
|
118
|
+
@include theme {
|
|
119
|
+
border-color: transparent co(warn) transparent transparent;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&[ui-chats~='bg:risk'] {
|
|
126
|
+
[ui-chat-body] {
|
|
127
|
+
@include theme {
|
|
128
|
+
color: co(fore);
|
|
129
|
+
background: co(risk);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&::before {
|
|
133
|
+
@include theme {
|
|
134
|
+
border-color: transparent co(risk) transparent transparent;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './chat@a.scss';
|
package/cite/cite@a.scss
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
$state: 'main', 'read', 'well', 'warn', 'risk', 'info';
|
|
2
|
+
|
|
3
|
+
[ui-cite~='@a'] {
|
|
4
|
+
width: 100%;
|
|
5
|
+
padding: 1em;
|
|
6
|
+
border-radius: 0.25em;
|
|
7
|
+
|
|
8
|
+
@mixin cite($co, $bk) {
|
|
9
|
+
color: inherit;
|
|
10
|
+
border-left: 0.3em solid rgba($co, 0.8);
|
|
11
|
+
box-shadow:
|
|
12
|
+
inset -1px 0 0 0 $bk,
|
|
13
|
+
inset 0 1px 0 0 $bk,
|
|
14
|
+
inset 0 -1px 0 0 $bk;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@each $key in $state {
|
|
18
|
+
@include theme {
|
|
19
|
+
$co: co($key);
|
|
20
|
+
$bk: co(line);
|
|
21
|
+
@if ($key== 'main') {
|
|
22
|
+
&,
|
|
23
|
+
&[ui-cite~='#{$key}'] {
|
|
24
|
+
@include cite($co, $bk);
|
|
25
|
+
}
|
|
26
|
+
} @else {
|
|
27
|
+
&[ui-cite~='#{$key}'] {
|
|
28
|
+
@include cite($co, $bk);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|