@w-run/wdesign-ui 0.0.0-stage → 1.0.0
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 +174 -2
- package/dist/index.d.ts +83 -0
- package/dist/style/ai-msg.css +187 -0
- package/dist/style/alert.css +64 -0
- package/dist/style/audio.css +1363 -0
- package/dist/style/avatar.css +88 -0
- package/dist/style/badge.css +48 -0
- package/dist/style/breadcrumb.css +54 -0
- package/dist/style/button.css +234 -0
- package/dist/style/card.css +71 -0
- package/dist/style/carousel.css +101 -0
- package/dist/style/checkbox.css +129 -0
- package/dist/style/chevron.css +33 -0
- package/dist/style/collapse.css +69 -0
- package/dist/style/command.css +201 -0
- package/dist/style/container.css +7 -0
- package/dist/style/datepicker.css +205 -0
- package/dist/style/descriptions.css +119 -0
- package/dist/style/divider.css +62 -0
- package/dist/style/dot.css +30 -0
- package/dist/style/drawer.css +145 -0
- package/dist/style/dropdown.css +83 -0
- package/dist/style/empty.css +36 -0
- package/dist/style/explorer.css +336 -0
- package/dist/style/file-list.css +92 -0
- package/dist/style/form.css +96 -0
- package/dist/style/grid.css +4 -0
- package/dist/style/group.css +478 -0
- package/dist/style/icon-btn.css +75 -0
- package/dist/style/image-preview.css +81 -0
- package/dist/style/input.css +119 -0
- package/dist/style/list.css +81 -0
- package/dist/style/markdown.css +312 -0
- package/dist/style/modal.css +164 -0
- package/dist/style/notification.css +52 -0
- package/dist/style/otp.css +139 -0
- package/dist/style/pagination.css +120 -0
- package/dist/style/popconfirm.css +87 -0
- package/dist/style/popover.css +110 -0
- package/dist/style/post-item.css +134 -0
- package/dist/style/progress.css +34 -0
- package/dist/style/radio.css +126 -0
- package/dist/style/rate.css +44 -0
- package/dist/style/result.css +54 -0
- package/dist/style/segmented-picker.css +120 -0
- package/dist/style/segmented.css +190 -0
- package/dist/style/select.css +281 -0
- package/dist/style/skeleton.css +31 -0
- package/dist/style/slider.css +81 -0
- package/dist/style/sortable.css +128 -0
- package/dist/style/space.css +25 -0
- package/dist/style/spinner.css +27 -0
- package/dist/style/statistic.css +44 -0
- package/dist/style/steps.css +100 -0
- package/dist/style/switch.css +95 -0
- package/dist/style/table.css +379 -0
- package/dist/style/tabs.css +167 -0
- package/dist/style/tag.css +97 -0
- package/dist/style/timeline.css +521 -0
- package/dist/style/toast.css +37 -0
- package/dist/style/tooltip.css +45 -0
- package/dist/style/tree.css +189 -0
- package/dist/style/typography.css +66 -0
- package/dist/style/upload.css +169 -0
- package/dist/style/vlist.css +49 -0
- package/dist/style/vplayer.css +846 -0
- package/dist/wdesign-ui.css +10300 -0
- package/dist/wdesign-ui.esm.js +16333 -0
- package/package.json +47 -3
- package/tokens.json +385 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-avatar {
|
|
3
|
+
width: 42px;
|
|
4
|
+
height: 42px;
|
|
5
|
+
flex: none;
|
|
6
|
+
border-radius: 50%;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
font-weight: 700;
|
|
12
|
+
user-select: none;
|
|
13
|
+
/*
|
|
14
|
+
* 默认底色用中性灰,不用淡红。
|
|
15
|
+
* 头像是最常见的占位元素,一屏可能十几个 ——
|
|
16
|
+
* 每个都带淡红底会让整页泛粉,与"主色只做点睛"冲突。
|
|
17
|
+
*/
|
|
18
|
+
background: var(--wd-field);
|
|
19
|
+
color: var(--wd-ink-2);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* tone 变体:全部落在中性灰族里做明度区分。
|
|
24
|
+
*
|
|
25
|
+
* 不用彩虹色 —— 头像是最常见的元素,一屏十几个,
|
|
26
|
+
* 每个都带彩色底会让页面变成色板。
|
|
27
|
+
* 不用红色系 —— 红是主色,不该拿来做装饰分类。
|
|
28
|
+
* 用灰度层次区分即可,识别主要靠首字母/图片本身。
|
|
29
|
+
*/
|
|
30
|
+
.wd-avatar--tone-1 {
|
|
31
|
+
background: var(--wd-ink-5);
|
|
32
|
+
color: var(--wd-ink-2);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.wd-avatar--tone-2 {
|
|
36
|
+
background: var(--wd-bg);
|
|
37
|
+
color: var(--wd-ink-2);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.wd-avatar--tone-3 {
|
|
41
|
+
background: var(--wd-field);
|
|
42
|
+
color: var(--wd-ink-2);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.wd-avatar--dark {
|
|
46
|
+
background: var(--wd-dark);
|
|
47
|
+
color: var(--wd-dark-text);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.wd-avatar--sm {
|
|
51
|
+
width: 34px;
|
|
52
|
+
height: 34px;
|
|
53
|
+
font-size: 12.5px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.wd-avatar--lg {
|
|
57
|
+
width: 56px;
|
|
58
|
+
height: 56px;
|
|
59
|
+
font-size: 18px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.wd-avatars {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.wd-avatars .wd-avatar + .wd-avatar {
|
|
68
|
+
margin-left: -11px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* ---- 微交互(精致版)---- */
|
|
72
|
+
.wd-avatars .wd-avatar {
|
|
73
|
+
transition: transform var(--wd-dur) var(--wd-ease-out), box-shadow var(--wd-dur) var(--wd-ease-out);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (hover: hover) {
|
|
77
|
+
.wd-avatars .wd-avatar:hover {
|
|
78
|
+
transform: translateY(-2px);
|
|
79
|
+
box-shadow: var(--wd-shadow-sm);
|
|
80
|
+
z-index: 2;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
|
|
84
|
+
.wd-avatars .wd-avatar.is-hover {
|
|
85
|
+
transform: translateY(-2px);
|
|
86
|
+
box-shadow: var(--wd-shadow-sm);
|
|
87
|
+
z-index: 2;
|
|
88
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-badge {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.wd-badge__dot,
|
|
8
|
+
.wd-badge__count {
|
|
9
|
+
position: absolute;
|
|
10
|
+
z-index: 1;
|
|
11
|
+
top: -4px;
|
|
12
|
+
right: -6px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.wd-badge__dot {
|
|
16
|
+
width: 10px;
|
|
17
|
+
height: 10px;
|
|
18
|
+
border-radius: 50%;
|
|
19
|
+
background: var(--wd-red);
|
|
20
|
+
box-shadow: 0 0 0 3px var(--wd-card);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.wd-badge__count {
|
|
24
|
+
min-width: 19px;
|
|
25
|
+
height: 19px;
|
|
26
|
+
padding: 0 6px;
|
|
27
|
+
border-radius: var(--wd-radius-pill);
|
|
28
|
+
background: var(--wd-red);
|
|
29
|
+
color: #fff;
|
|
30
|
+
font-size: 11.5px;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
line-height: 1;
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
box-shadow: 0 0 0 3px var(--wd-card);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.wd-badge--gray .wd-badge__dot,
|
|
40
|
+
.wd-badge--gray .wd-badge__count {
|
|
41
|
+
background: var(--wd-ink-3);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ---- 微交互(精致版)---- */
|
|
45
|
+
.wd-badge--anim-ready .wd-badge__dot,
|
|
46
|
+
.wd-badge--anim-ready .wd-badge__count {
|
|
47
|
+
animation: wd-bloom var(--wd-dur) var(--wd-ease-out) forwards;
|
|
48
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-breadcrumb {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
gap: 2px;
|
|
7
|
+
font-size: 13.5px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.wd-breadcrumb__item {
|
|
11
|
+
border: 0;
|
|
12
|
+
background: transparent;
|
|
13
|
+
padding: 4px 9px;
|
|
14
|
+
border-radius: var(--wd-radius-pill);
|
|
15
|
+
font: inherit;
|
|
16
|
+
color: var(--wd-ink-2);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
transition: color var(--wd-dur-fast) ease, background var(--wd-dur-fast) ease;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media (hover: hover) {
|
|
22
|
+
.wd-breadcrumb__item:hover {
|
|
23
|
+
color: var(--wd-red-text);
|
|
24
|
+
background: var(--wd-tint-1);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
|
|
28
|
+
.wd-breadcrumb__item.is-hover {
|
|
29
|
+
color: var(--wd-red-text);
|
|
30
|
+
background: var(--wd-tint-1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.wd-breadcrumb__item--current {
|
|
34
|
+
color: var(--wd-ink);
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
cursor: default;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (hover: hover) {
|
|
40
|
+
.wd-breadcrumb__item--current:hover {
|
|
41
|
+
color: var(--wd-ink);
|
|
42
|
+
background: transparent;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.wd-breadcrumb__item--current.is-hover {
|
|
46
|
+
color: var(--wd-ink);
|
|
47
|
+
background: transparent;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.wd-breadcrumb__sep {
|
|
51
|
+
color: var(--wd-ink-2);
|
|
52
|
+
font-size: 12px;
|
|
53
|
+
user-select: none;
|
|
54
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-btn {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
gap: 8px;
|
|
7
|
+
border: 0;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
font-family: inherit;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
line-height: 1;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
height: var(--wd-size-md);
|
|
14
|
+
padding: 0 24px;
|
|
15
|
+
border-radius: var(--wd-radius-pill);
|
|
16
|
+
transition: background var(--wd-dur-fast) ease, box-shadow var(--wd-dur-fast) ease, transform var(--wd-dur-fast) ease;
|
|
17
|
+
}
|
|
18
|
+
.wd-btn:active:not(:disabled) {
|
|
19
|
+
transform: scale(0.97);
|
|
20
|
+
}
|
|
21
|
+
.wd-btn:focus-visible {
|
|
22
|
+
outline: none;
|
|
23
|
+
box-shadow: 0 0 0 4px var(--wd-focus-ring-soft);
|
|
24
|
+
}
|
|
25
|
+
.wd-btn:disabled {
|
|
26
|
+
cursor: default;
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
}
|
|
29
|
+
.wd-btn.wd-btn--lg {
|
|
30
|
+
height: var(--wd-size-lg);
|
|
31
|
+
padding: 0 34px;
|
|
32
|
+
font-size: var(--wd-font-size-lg);
|
|
33
|
+
}
|
|
34
|
+
.wd-btn.wd-btn--md {
|
|
35
|
+
height: var(--wd-size-md);
|
|
36
|
+
padding: 0 24px;
|
|
37
|
+
font-size: var(--wd-font-size-md);
|
|
38
|
+
}
|
|
39
|
+
.wd-btn.wd-btn--sm {
|
|
40
|
+
height: var(--wd-size-sm);
|
|
41
|
+
padding: 0 14px;
|
|
42
|
+
font-size: var(--wd-font-size-sm);
|
|
43
|
+
}
|
|
44
|
+
.wd-btn.wd-btn--icon {
|
|
45
|
+
width: var(--wd-size-md);
|
|
46
|
+
height: var(--wd-size-md);
|
|
47
|
+
padding: 0;
|
|
48
|
+
}
|
|
49
|
+
.wd-btn.wd-btn--icon.wd-btn--lg {
|
|
50
|
+
width: var(--wd-size-lg);
|
|
51
|
+
height: var(--wd-size-lg);
|
|
52
|
+
}
|
|
53
|
+
.wd-btn.wd-btn--icon.wd-btn--md {
|
|
54
|
+
width: var(--wd-size-md);
|
|
55
|
+
height: var(--wd-size-md);
|
|
56
|
+
}
|
|
57
|
+
.wd-btn.wd-btn--icon.wd-btn--sm {
|
|
58
|
+
width: var(--wd-size-sm);
|
|
59
|
+
height: var(--wd-size-sm);
|
|
60
|
+
}
|
|
61
|
+
.wd-btn.wd-btn--block {
|
|
62
|
+
display: flex;
|
|
63
|
+
width: 100%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.wd-btn--primary {
|
|
67
|
+
background: var(--wd-red);
|
|
68
|
+
color: #fff;
|
|
69
|
+
}
|
|
70
|
+
@media (hover: hover) {
|
|
71
|
+
.wd-btn--primary:hover:not(:disabled) {
|
|
72
|
+
background: var(--wd-red-hover);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.wd-btn--primary {
|
|
76
|
+
/* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
|
|
77
|
+
}
|
|
78
|
+
.wd-btn--primary.is-hover:not(:disabled) {
|
|
79
|
+
background: var(--wd-red-hover);
|
|
80
|
+
}
|
|
81
|
+
.wd-btn--primary:active:not(:disabled) {
|
|
82
|
+
background: var(--wd-red-active);
|
|
83
|
+
}
|
|
84
|
+
.wd-btn--primary:disabled {
|
|
85
|
+
background: var(--wd-field);
|
|
86
|
+
color: var(--wd-ink-3);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
* 次级按钮 · 中性灰块底。
|
|
91
|
+
*
|
|
92
|
+
* ⚠️ 原来是 `--wd-tint-2`(淡红底)+ 红字。
|
|
93
|
+
* 问题:tint 是"次级"语义 —— 它表达"这是个可选操作",
|
|
94
|
+
* 不表达"注意/危险/品牌"。用淡红底会让页面上每个次级按钮
|
|
95
|
+
* 都像警告,与 danger 语义混淆。
|
|
96
|
+
* 极简黑白灰体系里,层级靠**明度**建立:primary 深底、tint 浅灰底、
|
|
97
|
+
* ghost 透明底 —— 颜色只留给真正的强调点。
|
|
98
|
+
*/
|
|
99
|
+
.wd-btn--tint {
|
|
100
|
+
background: var(--wd-field);
|
|
101
|
+
color: var(--wd-ink);
|
|
102
|
+
}
|
|
103
|
+
@media (hover: hover) {
|
|
104
|
+
.wd-btn--tint:hover:not(:disabled) {
|
|
105
|
+
background: var(--wd-field-hover);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
.wd-btn--tint.is-hover:not(:disabled) {
|
|
109
|
+
background: var(--wd-field-hover);
|
|
110
|
+
}
|
|
111
|
+
.wd-btn--tint:active:not(:disabled) {
|
|
112
|
+
background: var(--wd-tint-4);
|
|
113
|
+
}
|
|
114
|
+
.wd-btn--tint:disabled {
|
|
115
|
+
background: var(--wd-field);
|
|
116
|
+
color: var(--wd-ink-3);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.wd-btn--dark {
|
|
120
|
+
background: var(--wd-dark);
|
|
121
|
+
color: var(--wd-dark-text);
|
|
122
|
+
}
|
|
123
|
+
@media (hover: hover) {
|
|
124
|
+
.wd-btn--dark:hover:not(:disabled) {
|
|
125
|
+
background: var(--wd-dark-hover);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
.wd-btn--dark.is-hover:not(:disabled) {
|
|
129
|
+
background: var(--wd-dark-hover);
|
|
130
|
+
}
|
|
131
|
+
.wd-btn--dark:active:not(:disabled) {
|
|
132
|
+
background: var(--wd-dark-active);
|
|
133
|
+
}
|
|
134
|
+
.wd-btn--dark:disabled {
|
|
135
|
+
background: var(--wd-field);
|
|
136
|
+
color: var(--wd-ink-3);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.wd-btn--ghost {
|
|
140
|
+
background: transparent;
|
|
141
|
+
color: var(--wd-ink);
|
|
142
|
+
}
|
|
143
|
+
@media (hover: hover) {
|
|
144
|
+
.wd-btn--ghost:hover:not(:disabled) {
|
|
145
|
+
background: var(--wd-field);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
.wd-btn--ghost.is-hover:not(:disabled) {
|
|
149
|
+
background: var(--wd-field);
|
|
150
|
+
}
|
|
151
|
+
.wd-btn--ghost:active:not(:disabled) {
|
|
152
|
+
background: var(--wd-field-hover);
|
|
153
|
+
}
|
|
154
|
+
.wd-btn--ghost:disabled {
|
|
155
|
+
background: transparent;
|
|
156
|
+
color: var(--wd-ink-3);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* ---- 微交互(精致版)---- */
|
|
160
|
+
.wd-btn {
|
|
161
|
+
position: relative;
|
|
162
|
+
overflow: hidden;
|
|
163
|
+
transition: background var(--wd-dur-fast) var(--wd-ease-out), box-shadow var(--wd-dur-fast) var(--wd-ease-out), transform var(--wd-dur-fast) var(--wd-ease-spring);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.wd-btn:not(:disabled):active {
|
|
167
|
+
transform: scale(0.985);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.wd-btn--primary::after,
|
|
171
|
+
.wd-btn--dark::after {
|
|
172
|
+
content: "";
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: -60%;
|
|
175
|
+
bottom: -60%;
|
|
176
|
+
left: 0;
|
|
177
|
+
width: 38%;
|
|
178
|
+
/* 高光扫过:白色常量(深色按钮上的反光,不随主题翻转) */
|
|
179
|
+
background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
|
|
180
|
+
transform: translateX(-130%) skewX(-18deg);
|
|
181
|
+
opacity: 0;
|
|
182
|
+
pointer-events: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (hover: hover) {
|
|
186
|
+
.wd-btn--primary:not(:disabled):hover::after, .wd-btn--dark:not(:disabled):hover::after {
|
|
187
|
+
animation: wd-sheen var(--wd-dur-slow) var(--wd-ease-out);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
.wd-btn--primary:not(:disabled).is-hover::after, .wd-btn--dark:not(:disabled).is-hover::after {
|
|
191
|
+
animation: wd-sheen var(--wd-dur-slow) var(--wd-ease-out);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@media (hover: hover) {
|
|
195
|
+
.wd-btn--tint:not(:disabled):hover {
|
|
196
|
+
background: var(--wd-field-hover);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
.wd-btn--tint:not(:disabled).is-hover {
|
|
200
|
+
background: var(--wd-field-hover);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/*
|
|
204
|
+
* active 比 hover 再深一档,**仍在中性灰范围内**。
|
|
205
|
+
* ⚠️ 之前写的是 --wd-tint-3(淡红)—— 按下时整块变粉,
|
|
206
|
+
* 配合 danger 语义会让人误以为操作出错。次级按钮全程不该出现红色。
|
|
207
|
+
*/
|
|
208
|
+
.wd-btn--tint:not(:disabled):active {
|
|
209
|
+
background: var(--wd-ink-5);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* ---- 加载态 ---- */
|
|
213
|
+
.wd-btn--loading {
|
|
214
|
+
cursor: default;
|
|
215
|
+
/* 保留原色,只降低一点存在感;禁用态用的是褪色,二者要能区分 */
|
|
216
|
+
opacity: 0.82;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.wd-btn__spinner {
|
|
220
|
+
width: 1em;
|
|
221
|
+
height: 1em;
|
|
222
|
+
flex: none;
|
|
223
|
+
border-radius: 50%;
|
|
224
|
+
/* 用 currentColor 描边,自动适配任何 variant 的文字色 */
|
|
225
|
+
border: 2px solid color-mix(in srgb, currentColor 26%, transparent);
|
|
226
|
+
border-top-color: currentColor;
|
|
227
|
+
animation: wd-spinner-rotate 0.7s linear infinite;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@media (prefers-reduced-motion: reduce) {
|
|
231
|
+
.wd-btn__spinner {
|
|
232
|
+
animation-duration: 2s;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-card {
|
|
3
|
+
background: var(--wd-card);
|
|
4
|
+
border-radius: var(--wd-radius-lg);
|
|
5
|
+
padding: 22px;
|
|
6
|
+
box-shadow: var(--wd-shadow);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.wd-card--tint {
|
|
10
|
+
background: var(--wd-tint-2);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.wd-card--dark {
|
|
14
|
+
background: var(--wd-dark);
|
|
15
|
+
color: var(--wd-dark-text);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.wd-card--pad-sm {
|
|
19
|
+
padding: 16px;
|
|
20
|
+
border-radius: var(--wd-radius-md);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.wd-card--pad-lg {
|
|
24
|
+
padding: 32px;
|
|
25
|
+
border-radius: var(--wd-radius-xl);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.wd-card--hoverable {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
transition: box-shadow var(--wd-dur) ease, transform var(--wd-dur) ease;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (hover: hover) {
|
|
34
|
+
.wd-card--hoverable:hover {
|
|
35
|
+
box-shadow: var(--wd-shadow-hover);
|
|
36
|
+
transform: translateY(-2px);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
|
|
40
|
+
.wd-card--hoverable.is-hover {
|
|
41
|
+
box-shadow: var(--wd-shadow-hover);
|
|
42
|
+
transform: translateY(-2px);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.wd-card__title {
|
|
46
|
+
font-size: 16px;
|
|
47
|
+
font-weight: 700;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.wd-card__meta {
|
|
51
|
+
font-size: 13px;
|
|
52
|
+
color: var(--wd-ink-2);
|
|
53
|
+
margin-top: 4px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.wd-card--dark .wd-card__meta {
|
|
57
|
+
color: var(--wd-dark-text-2);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.wd-card__stat {
|
|
61
|
+
font-size: 40px;
|
|
62
|
+
font-weight: 800;
|
|
63
|
+
letter-spacing: -0.02em;
|
|
64
|
+
line-height: 1.15;
|
|
65
|
+
color: var(--wd-red-text);
|
|
66
|
+
margin-top: 12px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.wd-card--dark .wd-card__stat {
|
|
70
|
+
color: var(--wd-red-on-dark);
|
|
71
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-carousel {
|
|
3
|
+
position: relative;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
border-radius: var(--wd-radius-lg);
|
|
6
|
+
background: var(--wd-field);
|
|
7
|
+
touch-action: pan-y;
|
|
8
|
+
/* 高度由组件内联 height 决定;容器本身不裁切字面内容 */
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.wd-carousel__track {
|
|
12
|
+
display: flex;
|
|
13
|
+
height: 100%;
|
|
14
|
+
transition: transform 0.45s var(--wd-ease);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.wd-carousel__slide {
|
|
18
|
+
flex: none;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
user-select: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.wd-carousel__img {
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
object-fit: contain;
|
|
32
|
+
object-position: center;
|
|
33
|
+
-webkit-user-drag: none;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
display: block;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.wd-carousel__label {
|
|
39
|
+
font-size: 20px;
|
|
40
|
+
font-weight: 800;
|
|
41
|
+
color: var(--wd-ink);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.wd-carousel__arrow {
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 50%;
|
|
47
|
+
transform: translateY(-50%);
|
|
48
|
+
z-index: 2;
|
|
49
|
+
box-shadow: var(--wd-shadow-pop);
|
|
50
|
+
transition: transform var(--wd-dur) ease;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (hover: hover) {
|
|
54
|
+
.wd-carousel__arrow:hover {
|
|
55
|
+
transform: translateY(-50%) scale(1.08);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
|
|
59
|
+
.wd-carousel__arrow.is-hover {
|
|
60
|
+
transform: translateY(-50%) scale(1.08);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wd-carousel__arrow--prev {
|
|
64
|
+
left: 16px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.wd-carousel__arrow--next {
|
|
68
|
+
right: 16px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.wd-carousel__dots {
|
|
72
|
+
position: absolute;
|
|
73
|
+
bottom: 14px;
|
|
74
|
+
left: 50%;
|
|
75
|
+
transform: translateX(-50%);
|
|
76
|
+
z-index: 2;
|
|
77
|
+
display: flex;
|
|
78
|
+
gap: 7px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.wd-carousel__dot {
|
|
82
|
+
width: 8px;
|
|
83
|
+
height: 8px;
|
|
84
|
+
padding: 0;
|
|
85
|
+
border: 0;
|
|
86
|
+
border-radius: 999px;
|
|
87
|
+
background: var(--wd-on-dark-2);
|
|
88
|
+
box-shadow: 0 0 0 1px var(--wd-ring-soft);
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
transition: width var(--wd-dur-slow) var(--wd-ease), background var(--wd-dur-slow) ease;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.wd-carousel__dot--active {
|
|
94
|
+
width: 26px;
|
|
95
|
+
background: var(--wd-red);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* 跟手拖动:拖动过程中禁用过渡(避免滞后感) */
|
|
99
|
+
.wd-carousel--dragging .wd-carousel__track {
|
|
100
|
+
transition: none;
|
|
101
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-checkbox {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 10px;
|
|
6
|
+
border: 0;
|
|
7
|
+
background: transparent;
|
|
8
|
+
padding: 0;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
font: inherit;
|
|
11
|
+
font-size: 14.5px;
|
|
12
|
+
color: var(--wd-ink);
|
|
13
|
+
user-select: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.wd-checkbox:focus-visible {
|
|
17
|
+
outline: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.wd-checkbox:focus-visible .wd-checkbox__box {
|
|
21
|
+
box-shadow: 0 0 0 4px var(--wd-focus-ring-soft);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* 选中色可配置。
|
|
26
|
+
*
|
|
27
|
+
* `--wd-check-color` 由组件通过 `color` prop 注入;
|
|
28
|
+
* 未指定时回落到 --wd-ink(深色)—— 见下方选中态说明。
|
|
29
|
+
* 派生色(hover / disabled)全部用 color-mix 从它算出来,
|
|
30
|
+
* 这样自定义任意颜色时,hover 与禁用态都能自动跟随,
|
|
31
|
+
* 不会像之前那样"选中是深色、hover 却变红"。
|
|
32
|
+
*/
|
|
33
|
+
.wd-checkbox {
|
|
34
|
+
--wd-check-color: var(--wd-ink);
|
|
35
|
+
--wd-check-hover: color-mix(in srgb, var(--wd-check-color) 82%, #000);
|
|
36
|
+
--wd-check-disabled: color-mix(in srgb, var(--wd-check-color) 22%, transparent);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.wd-checkbox__box {
|
|
40
|
+
width: 24px;
|
|
41
|
+
height: 24px;
|
|
42
|
+
flex: none;
|
|
43
|
+
/* 复选框也走圆形,与全站一致(圆形表达"可勾选") */
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
background: var(--wd-field);
|
|
46
|
+
color: transparent;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
transition: background var(--wd-dur-fast) ease, color var(--wd-dur-fast) ease;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (hover: hover) {
|
|
54
|
+
.wd-checkbox:hover .wd-checkbox__box {
|
|
55
|
+
background: var(--wd-tint-1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
|
|
59
|
+
.wd-checkbox.is-hover .wd-checkbox__box {
|
|
60
|
+
background: var(--wd-tint-1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* 选中态用**深色**而非主题红。
|
|
65
|
+
* 勾选是高频操作(表单、列表、树),红色会读成"危险/错误",
|
|
66
|
+
* 与 danger 语义混淆。深色块在黑白灰体系里已经足够明确。
|
|
67
|
+
* 与 WdTree / WdTransfer 的自绘勾选保持一致。
|
|
68
|
+
*/
|
|
69
|
+
.wd-checkbox--checked .wd-checkbox__box {
|
|
70
|
+
background: var(--wd-check-color);
|
|
71
|
+
color: #fff;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (hover: hover) {
|
|
75
|
+
.wd-checkbox--checked:hover .wd-checkbox__box {
|
|
76
|
+
background: var(--wd-check-hover);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
.wd-checkbox--checked.is-hover .wd-checkbox__box {
|
|
80
|
+
background: var(--wd-check-hover);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.wd-checkbox__label {
|
|
84
|
+
line-height: 1.4;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.wd-checkbox--disabled {
|
|
88
|
+
cursor: default;
|
|
89
|
+
color: var(--wd-ink-3);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (hover: hover) {
|
|
93
|
+
.wd-checkbox--disabled:hover .wd-checkbox__box {
|
|
94
|
+
background: var(--wd-field);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
.wd-checkbox--disabled.is-hover .wd-checkbox__box {
|
|
98
|
+
background: var(--wd-field);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* 禁用态:用主色的低透明度版本,而不是固定的 tint-3。
|
|
103
|
+
* 换色时禁用态自动跟随,不会出现"自定义成蓝色、禁用却是粉色"。
|
|
104
|
+
*/
|
|
105
|
+
.wd-checkbox--checked.wd-checkbox--disabled .wd-checkbox__box {
|
|
106
|
+
background: var(--wd-check-disabled);
|
|
107
|
+
color: #fff;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* ---- 微交互(精致版)---- */
|
|
111
|
+
.wd-checkbox__box svg path {
|
|
112
|
+
stroke-dasharray: 26;
|
|
113
|
+
stroke-dashoffset: 26;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.wd-checkbox--checked .wd-checkbox__box svg path {
|
|
117
|
+
stroke-dashoffset: 0;
|
|
118
|
+
transition: stroke-dashoffset var(--wd-dur-slow) var(--wd-ease-out);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* 选中瞬间:盒子轻微弹一下(红底回弹) */
|
|
122
|
+
.wd-checkbox--checked .wd-checkbox__box {
|
|
123
|
+
animation: wd-check-pop var(--wd-dur-slow) var(--wd-ease-spring);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* 取消选中:盒底色回落 */
|
|
127
|
+
.wd-checkbox .wd-checkbox__box {
|
|
128
|
+
transition: background var(--wd-dur-fast) ease, color var(--wd-dur-fast) ease, transform var(--wd-dur) var(--wd-ease-out);
|
|
129
|
+
}
|