@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
|
@@ -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
package/imgs/imgs@a.scss
ADDED
|
@@ -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', '>*');
|
package/imgs/imgs@b.scss
ADDED
|
@@ -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;
|
package/line/line@a.scss
ADDED
|
@@ -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
|
+
}
|
package/line/line@b.scss
ADDED
|
@@ -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,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
|
+
}
|