@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.
Files changed (70) hide show
  1. package/README.md +174 -2
  2. package/dist/index.d.ts +83 -0
  3. package/dist/style/ai-msg.css +187 -0
  4. package/dist/style/alert.css +64 -0
  5. package/dist/style/audio.css +1363 -0
  6. package/dist/style/avatar.css +88 -0
  7. package/dist/style/badge.css +48 -0
  8. package/dist/style/breadcrumb.css +54 -0
  9. package/dist/style/button.css +234 -0
  10. package/dist/style/card.css +71 -0
  11. package/dist/style/carousel.css +101 -0
  12. package/dist/style/checkbox.css +129 -0
  13. package/dist/style/chevron.css +33 -0
  14. package/dist/style/collapse.css +69 -0
  15. package/dist/style/command.css +201 -0
  16. package/dist/style/container.css +7 -0
  17. package/dist/style/datepicker.css +205 -0
  18. package/dist/style/descriptions.css +119 -0
  19. package/dist/style/divider.css +62 -0
  20. package/dist/style/dot.css +30 -0
  21. package/dist/style/drawer.css +145 -0
  22. package/dist/style/dropdown.css +83 -0
  23. package/dist/style/empty.css +36 -0
  24. package/dist/style/explorer.css +336 -0
  25. package/dist/style/file-list.css +92 -0
  26. package/dist/style/form.css +96 -0
  27. package/dist/style/grid.css +4 -0
  28. package/dist/style/group.css +478 -0
  29. package/dist/style/icon-btn.css +75 -0
  30. package/dist/style/image-preview.css +81 -0
  31. package/dist/style/input.css +119 -0
  32. package/dist/style/list.css +81 -0
  33. package/dist/style/markdown.css +312 -0
  34. package/dist/style/modal.css +164 -0
  35. package/dist/style/notification.css +52 -0
  36. package/dist/style/otp.css +139 -0
  37. package/dist/style/pagination.css +120 -0
  38. package/dist/style/popconfirm.css +87 -0
  39. package/dist/style/popover.css +110 -0
  40. package/dist/style/post-item.css +134 -0
  41. package/dist/style/progress.css +34 -0
  42. package/dist/style/radio.css +126 -0
  43. package/dist/style/rate.css +44 -0
  44. package/dist/style/result.css +54 -0
  45. package/dist/style/segmented-picker.css +120 -0
  46. package/dist/style/segmented.css +190 -0
  47. package/dist/style/select.css +281 -0
  48. package/dist/style/skeleton.css +31 -0
  49. package/dist/style/slider.css +81 -0
  50. package/dist/style/sortable.css +128 -0
  51. package/dist/style/space.css +25 -0
  52. package/dist/style/spinner.css +27 -0
  53. package/dist/style/statistic.css +44 -0
  54. package/dist/style/steps.css +100 -0
  55. package/dist/style/switch.css +95 -0
  56. package/dist/style/table.css +379 -0
  57. package/dist/style/tabs.css +167 -0
  58. package/dist/style/tag.css +97 -0
  59. package/dist/style/timeline.css +521 -0
  60. package/dist/style/toast.css +37 -0
  61. package/dist/style/tooltip.css +45 -0
  62. package/dist/style/tree.css +189 -0
  63. package/dist/style/typography.css +66 -0
  64. package/dist/style/upload.css +169 -0
  65. package/dist/style/vlist.css +49 -0
  66. package/dist/style/vplayer.css +846 -0
  67. package/dist/wdesign-ui.css +10300 -0
  68. package/dist/wdesign-ui.esm.js +16333 -0
  69. package/package.json +47 -3
  70. package/tokens.json +385 -0
@@ -0,0 +1,281 @@
1
+ @charset "UTF-8";
2
+ .wd-select {
3
+ position: relative;
4
+ display: inline-block;
5
+ min-width: 200px;
6
+ }
7
+
8
+ .wd-select__trigger {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ gap: 10px;
13
+ width: 100%;
14
+ height: var(--wd-size-md);
15
+ padding: 0 20px;
16
+ border: 0;
17
+ cursor: pointer;
18
+ background: var(--wd-field);
19
+ border-radius: var(--wd-radius-pill);
20
+ font: inherit;
21
+ font-size: 14.5px;
22
+ color: var(--wd-ink);
23
+ transition: background var(--wd-dur-fast) ease, box-shadow var(--wd-dur-fast) ease;
24
+ }
25
+
26
+ .wd-select__trigger--lg {
27
+ height: var(--wd-size-lg);
28
+ padding: 0 26px;
29
+ font-size: var(--wd-font-size-lg);
30
+ }
31
+
32
+ .wd-select__trigger--sm {
33
+ height: var(--wd-size-sm);
34
+ padding: 0 12px;
35
+ font-size: var(--wd-font-size-sm);
36
+ }
37
+
38
+ @media (hover: hover) {
39
+ .wd-select__trigger:hover {
40
+ background: var(--wd-field-hover);
41
+ }
42
+ }
43
+ /* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
44
+ .wd-select__trigger.is-hover {
45
+ background: var(--wd-field-hover);
46
+ }
47
+
48
+ .wd-select__trigger:focus-visible {
49
+ outline: none;
50
+ box-shadow: 0 0 0 4px var(--wd-focus-ring-soft);
51
+ }
52
+
53
+ .wd-select--open .wd-select__trigger {
54
+ box-shadow: 0 0 0 4px var(--wd-focus-ring-soft);
55
+ }
56
+
57
+ .wd-select__placeholder {
58
+ color: var(--wd-ink-2);
59
+ }
60
+
61
+ .wd-select--disabled {
62
+ opacity: 0.6;
63
+ pointer-events: none;
64
+ }
65
+
66
+ /* Teleport 到 body:定位由 JS 计算(top/left + matchWidth),这里只管视觉 */
67
+ .wd-select__menu.is-open {
68
+ display: flex;
69
+ }
70
+
71
+ .wd-select__menu {
72
+ position: absolute; /* 文档坐标:JS 已加上 scrollX/scrollY */
73
+ z-index: 1200;
74
+ padding: 8px;
75
+ display: none;
76
+ background: var(--wd-card);
77
+ border-radius: var(--wd-radius-md);
78
+ box-shadow: var(--wd-shadow-hover);
79
+ flex-direction: column;
80
+ gap: 2px;
81
+ max-height: 264px;
82
+ overflow: auto;
83
+ }
84
+
85
+ .wd-select__option {
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: space-between;
89
+ gap: 10px;
90
+ padding: 11px 16px;
91
+ border: 0;
92
+ background: transparent;
93
+ /* 可点击项优先胶囊 */
94
+ border-radius: var(--wd-radius-pill);
95
+ font: inherit;
96
+ font-size: 14.5px;
97
+ color: var(--wd-ink);
98
+ cursor: pointer;
99
+ text-align: left;
100
+ }
101
+
102
+ @media (hover: hover) {
103
+ .wd-select__option:hover {
104
+ background: var(--wd-field);
105
+ }
106
+ }
107
+ .wd-select__option.is-hover {
108
+ background: var(--wd-field);
109
+ }
110
+
111
+ /*
112
+ * 选中项用**中性底 + 加粗 + 勾选标记**表达,不用红色底。
113
+ *
114
+ * ⚠️ 本库主色是红色,而红色同时承载 danger 语义。
115
+ * 每次打开下拉选一项就看到整块红底,会让普通选择操作读起来像警告。
116
+ * 主题色的正确用法:少而精 —— 只出现在"必须引导视线"的位置
117
+ * (主按钮、当前步骤、错误态、进度),不在高频日常操作里铺底。
118
+ */
119
+ .wd-select__option--active {
120
+ background: var(--wd-field);
121
+ color: var(--wd-ink);
122
+ font-weight: 700;
123
+ }
124
+
125
+ .wd-select__option-mark {
126
+ flex: none;
127
+ color: var(--wd-red-text);
128
+ }
129
+
130
+ /* ---- 微交互(精致版)---- */
131
+ /* 入场交给 <Transition name="wd-pop">(_popover.scss);不要再叠 animation,否则会压掉过渡 */
132
+ /* ---- 多选:标签堆叠 ---- */
133
+ .wd-select__trigger--tags {
134
+ height: auto;
135
+ min-height: var(--wd-size-md, 44px);
136
+ padding-top: 6px;
137
+ padding-bottom: 6px;
138
+ align-items: center;
139
+ }
140
+
141
+ .wd-select__tags {
142
+ display: flex;
143
+ flex-wrap: wrap;
144
+ gap: 5px;
145
+ flex: 1;
146
+ min-width: 0;
147
+ align-items: center;
148
+ }
149
+
150
+ .wd-select__tag {
151
+ display: inline-flex;
152
+ align-items: center;
153
+ gap: 4px;
154
+ max-width: 160px;
155
+ padding: 3px 6px 3px 9px;
156
+ border-radius: var(--wd-radius-xs);
157
+ background: var(--wd-field-hover);
158
+ color: var(--wd-red-text);
159
+ font-size: 12.5px;
160
+ font-weight: 600;
161
+ line-height: 1.35;
162
+ white-space: nowrap;
163
+ overflow: hidden;
164
+ text-overflow: ellipsis;
165
+ }
166
+
167
+ .wd-select__tag--more {
168
+ padding: 3px 8px;
169
+ background: var(--wd-field);
170
+ color: var(--wd-ink-2);
171
+ }
172
+
173
+ .wd-select__tag-x {
174
+ flex: none;
175
+ display: inline-flex;
176
+ align-items: center;
177
+ justify-content: center;
178
+ width: 14px;
179
+ height: 14px;
180
+ padding: 0;
181
+ border: 0;
182
+ border-radius: 50%;
183
+ cursor: pointer;
184
+ background: transparent;
185
+ color: inherit;
186
+ opacity: 0.6;
187
+ transition: opacity var(--wd-dur-fast) ease, background var(--wd-dur-fast) ease;
188
+ }
189
+
190
+ @media (hover: hover) {
191
+ .wd-select__tag-x:hover {
192
+ opacity: 1;
193
+ background: var(--wd-tint-3);
194
+ }
195
+ }
196
+ /* ---- 右侧动作区(清除 + 箭头) ---- */
197
+ .wd-select__actions {
198
+ flex: none;
199
+ display: inline-flex;
200
+ align-items: center;
201
+ gap: 4px;
202
+ margin-left: auto;
203
+ }
204
+
205
+ .wd-select__clear {
206
+ display: inline-flex;
207
+ align-items: center;
208
+ justify-content: center;
209
+ width: 17px;
210
+ height: 17px;
211
+ padding: 0;
212
+ border: 0;
213
+ border-radius: 50%;
214
+ cursor: pointer;
215
+ background: var(--wd-ink-3);
216
+ color: var(--wd-card);
217
+ transition: background var(--wd-dur-fast) ease;
218
+ }
219
+
220
+ @media (hover: hover) {
221
+ .wd-select__clear:hover {
222
+ background: var(--wd-ink-2);
223
+ }
224
+ }
225
+ /* ---- 搜索框 ---- */
226
+ .wd-select__search {
227
+ padding: 8px 10px 6px;
228
+ position: sticky;
229
+ top: 0;
230
+ background: var(--wd-card);
231
+ z-index: 1;
232
+ }
233
+
234
+ .wd-select__search input {
235
+ width: 100%;
236
+ height: 32px;
237
+ padding: 0 10px;
238
+ border: 0;
239
+ border-radius: var(--wd-radius-xs);
240
+ background: var(--wd-field);
241
+ color: var(--wd-ink);
242
+ font: inherit;
243
+ font-size: 13px;
244
+ outline: none;
245
+ }
246
+
247
+ .wd-select__search input::placeholder {
248
+ color: var(--wd-ink-2);
249
+ }
250
+
251
+ /* ---- 空结果 / 键盘高亮 / 禁用项 ---- */
252
+ .wd-select__empty {
253
+ padding: 14px 12px;
254
+ text-align: center;
255
+ font-size: 13px;
256
+ color: var(--wd-ink-2);
257
+ }
258
+
259
+ .wd-select__option--hover {
260
+ background: var(--wd-field);
261
+ }
262
+
263
+ .wd-select__option--disabled {
264
+ color: var(--wd-ink-3);
265
+ cursor: default;
266
+ pointer-events: none;
267
+ }
268
+
269
+ .wd-select__option {
270
+ width: 100%;
271
+ }
272
+
273
+ /* 单选时的已选值文本 */
274
+ .wd-select__value {
275
+ flex: 1;
276
+ min-width: 0;
277
+ overflow: hidden;
278
+ text-overflow: ellipsis;
279
+ white-space: nowrap;
280
+ color: var(--wd-ink);
281
+ }
@@ -0,0 +1,31 @@
1
+ .wd-skeleton {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 10px;
5
+ width: 100%;
6
+ }
7
+
8
+ .wd-skeleton__item {
9
+ display: block;
10
+ background: var(--wd-field);
11
+ border-radius: 10px;
12
+ animation: wd-skeleton-pulse 1.4s ease-in-out infinite;
13
+ }
14
+
15
+ .wd-skeleton__item--text {
16
+ height: 14px;
17
+ border-radius: 7px;
18
+ }
19
+
20
+ .wd-skeleton--circle .wd-skeleton__item {
21
+ border-radius: 50%;
22
+ }
23
+
24
+ @keyframes wd-skeleton-pulse {
25
+ 0%, 100% {
26
+ opacity: 1;
27
+ }
28
+ 50% {
29
+ opacity: 0.55;
30
+ }
31
+ }
@@ -0,0 +1,81 @@
1
+ @charset "UTF-8";
2
+ .wd-slider {
3
+ /*
4
+ * 滑块的可配色变量,默认主题红。
5
+ * 由 `color` prop 通过 inline style 覆盖。
6
+ */
7
+ --wd-slider-color: var(--wd-red);
8
+ display: flex;
9
+ align-items: center;
10
+ gap: 14px;
11
+ width: 100%;
12
+ max-width: 340px;
13
+ }
14
+
15
+ .wd-slider input[type=range] {
16
+ -webkit-appearance: none;
17
+ appearance: none;
18
+ flex: 1;
19
+ height: 8px;
20
+ margin: 0;
21
+ border-radius: var(--wd-radius-pill);
22
+ /*
23
+ * 轨道保持中性灰,**主色只用在滑块上**。
24
+ *
25
+ * 试过用主色的低透明度做轨道,但自定义属性里的 color-mix 不会被求值
26
+ * (--x: color-mix(...) 里的 var() 不参与计算,拿到的是字面量),
27
+ * 浏览器会把整条 background 丢弃。
28
+ * 与其绕一大圈做"浓度可调"的轨道,不如简单点:
29
+ * 轨道是结构(灰),滑块是状态(主色)。
30
+ */
31
+ background: var(--wd-field);
32
+ outline: none;
33
+ }
34
+
35
+ .wd-slider input[type=range]::-webkit-slider-thumb {
36
+ -webkit-appearance: none;
37
+ appearance: none;
38
+ width: 22px;
39
+ height: 22px;
40
+ border-radius: 50%;
41
+ /*
42
+ * 滑块用主色:它是"当前值"的指示器,属于需要引导视线的位置标记。
43
+ * 边界用一圈白描边保证在白卡/灰底上都清晰。
44
+ */
45
+ background: var(--wd-slider-color);
46
+ box-shadow: 0 0 0 3px var(--wd-card), var(--wd-shadow-knob);
47
+ cursor: grab;
48
+ transition: transform var(--wd-dur-fast) ease;
49
+ }
50
+
51
+ .wd-slider input[type=range]::-webkit-slider-thumb:active {
52
+ cursor: grabbing;
53
+ transform: scale(1.08);
54
+ }
55
+
56
+ .wd-slider input[type=range]:focus-visible {
57
+ box-shadow: 0 0 0 4px var(--wd-focus-ring-soft);
58
+ }
59
+
60
+ .wd-slider__value {
61
+ min-width: 36px;
62
+ text-align: right;
63
+ font-size: 13.5px;
64
+ font-weight: 700;
65
+ color: var(--wd-ink);
66
+ }
67
+
68
+ /* ---- 微交互(精致版)---- */
69
+ .wd-slider input[type=range]::-webkit-slider-thumb {
70
+ transition: box-shadow var(--wd-dur) var(--wd-ease-out), transform var(--wd-dur-fast) var(--wd-ease-out);
71
+ }
72
+
73
+ @media (hover: hover) {
74
+ .wd-slider input[type=range]:hover::-webkit-slider-thumb {
75
+ box-shadow: 0 0 0 7px var(--wd-ink-5);
76
+ }
77
+ }
78
+ /* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
79
+ .wd-slider input[type=range].is-hover::-webkit-slider-thumb {
80
+ box-shadow: 0 0 0 7px var(--wd-ink-5);
81
+ }
@@ -0,0 +1,128 @@
1
+ @charset "UTF-8";
2
+ .wd-sortable {
3
+ position: relative;
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 8px;
7
+ }
8
+
9
+ /* 拖动过程中:全局禁止选中,避免选中文字干扰 */
10
+ .wd-sortable--dragging {
11
+ user-select: none;
12
+ }
13
+
14
+ .wd-sortable--dragging .wd-sortable__item {
15
+ cursor: grabbing;
16
+ }
17
+
18
+ .wd-sortable__list {
19
+ display: flex;
20
+ flex-direction: column;
21
+ gap: 8px;
22
+ }
23
+
24
+ .wd-sortable__item {
25
+ touch-action: none;
26
+ display: flex;
27
+ align-items: center;
28
+ gap: 12px;
29
+ padding: 13px 16px;
30
+ background: var(--wd-card);
31
+ border-radius: var(--wd-radius-sm);
32
+ box-shadow: var(--wd-shadow);
33
+ cursor: grab;
34
+ transition: transform var(--wd-dur-fast) ease, box-shadow var(--wd-dur-fast) ease, background var(--wd-dur-fast) ease;
35
+ }
36
+
37
+ .wd-sortable__item:active {
38
+ cursor: grabbing;
39
+ }
40
+
41
+ .wd-sortable__item--drag {
42
+ opacity: 0.55;
43
+ transform: scale(0.98);
44
+ background: var(--wd-tint-1);
45
+ box-shadow: var(--wd-shadow-sm);
46
+ }
47
+
48
+ .wd-sortable__item--over {
49
+ background: var(--wd-tint-1);
50
+ box-shadow: 0 0 0 2px var(--wd-red-soft);
51
+ }
52
+
53
+ .wd-sortable__handle {
54
+ display: inline-flex;
55
+ color: var(--wd-ink-3);
56
+ flex: none;
57
+ touch-action: none;
58
+ user-select: none;
59
+ cursor: grab;
60
+ }
61
+
62
+ .wd-sortable__item--drag .wd-sortable__handle {
63
+ cursor: grabbing;
64
+ }
65
+
66
+ .wd-sortable__label {
67
+ font-size: 14px;
68
+ font-weight: 600;
69
+ }
70
+
71
+ /* 拖动过程中悬浮镜像 */
72
+ .wd-sortable__clone {
73
+ position: fixed;
74
+ z-index: 9999;
75
+ pointer-events: none;
76
+ display: flex;
77
+ align-items: center;
78
+ gap: 12px;
79
+ padding: 13px 16px;
80
+ background: var(--wd-card);
81
+ border-radius: var(--wd-radius-sm);
82
+ box-shadow: var(--wd-shadow-lg);
83
+ opacity: 0.95;
84
+ /*
85
+ * ⚠️ 不要用 transform: scale() 做"抓起来放大"。
86
+ *
87
+ * 原因:`position: fixed` + `top/left` 定位的是**布局盒**,
88
+ * 而 transform 是布局后的视觉变换 ——
89
+ * scale(1.06) 会让视觉尺寸比布局盒大 6%,且以元素中心为原点,
90
+ * 于是视觉位置相对指针偏移约 3%(宽高各一半)。
91
+ * 拖拽时表现为"弹出层跟着手指但始终偏一点",
92
+ * 这正是之前 dropdown 踩过的同一个坑。
93
+ *
94
+ * 替代方案:用**更大的布局尺寸**模拟"放大"——
95
+ * 通过 padding 或 width 微调,让布局盒与视觉一致,偏移就消失了。
96
+ * 这里保持原尺寸,只用阴影和透明度表达"被抓起"。
97
+ */
98
+ outline: 1px solid var(--wd-ink-5);
99
+ outline-offset: 0;
100
+ cursor: grabbing;
101
+ }
102
+
103
+ /* 放置指示线 */
104
+ .wd-sortable__drop-line {
105
+ position: absolute;
106
+ left: 10px;
107
+ right: 10px;
108
+ height: 2px;
109
+ background: var(--wd-red);
110
+ border-radius: 999px;
111
+ z-index: 1000;
112
+ }
113
+
114
+ /* transition 动画 */
115
+ .wd-sort-move {
116
+ transition: transform var(--wd-dur-slow) var(--wd-ease), opacity var(--wd-dur-slow) var(--wd-ease);
117
+ }
118
+
119
+ .wd-sort-enter-active,
120
+ .wd-sort-leave-active {
121
+ transition: opacity var(--wd-dur) ease, transform var(--wd-dur) ease;
122
+ }
123
+
124
+ .wd-sort-enter-from,
125
+ .wd-sort-leave-to {
126
+ opacity: 0;
127
+ transform: translateY(8px);
128
+ }
@@ -0,0 +1,25 @@
1
+ .wd-space {
2
+ display: flex;
3
+ gap: var(--wd-space-3);
4
+ }
5
+
6
+ .wd-space--col {
7
+ flex-direction: column;
8
+ }
9
+
10
+ .wd-space--wrap {
11
+ flex-wrap: wrap;
12
+ }
13
+
14
+ .wd-space--between {
15
+ justify-content: space-between;
16
+ }
17
+
18
+ .wd-space--center {
19
+ justify-content: center;
20
+ align-items: center;
21
+ }
22
+
23
+ .wd-space--grow > * {
24
+ flex: 1;
25
+ }
@@ -0,0 +1,27 @@
1
+ .wd-spinner {
2
+ width: 28px;
3
+ height: 28px;
4
+ flex: none;
5
+ border-radius: 50%;
6
+ border: 3px solid var(--wd-ink-5);
7
+ border-top-color: var(--wd-red);
8
+ animation: wd-spinner-rotate 0.8s linear infinite;
9
+ }
10
+
11
+ .wd-spinner--sm {
12
+ width: 18px;
13
+ height: 18px;
14
+ border-width: 2.5px;
15
+ }
16
+
17
+ .wd-spinner--lg {
18
+ width: 40px;
19
+ height: 40px;
20
+ border-width: 4px;
21
+ }
22
+
23
+ @keyframes wd-spinner-rotate {
24
+ to {
25
+ transform: rotate(360deg);
26
+ }
27
+ }
@@ -0,0 +1,44 @@
1
+ .wd-statistic {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 4px;
5
+ min-width: 0;
6
+ }
7
+
8
+ .wd-statistic__title {
9
+ font-size: 12.5px;
10
+ font-weight: 600;
11
+ color: var(--wd-ink-2);
12
+ letter-spacing: 0.01em;
13
+ }
14
+
15
+ .wd-statistic__value {
16
+ display: flex;
17
+ align-items: baseline;
18
+ gap: 2px;
19
+ font-variant-numeric: tabular-nums;
20
+ letter-spacing: -0.02em;
21
+ line-height: 1.15;
22
+ }
23
+
24
+ .wd-statistic__num {
25
+ font-size: 30px;
26
+ font-weight: 800;
27
+ color: var(--wd-ink);
28
+ }
29
+
30
+ .wd-statistic__affix {
31
+ font-size: 16px;
32
+ font-weight: 700;
33
+ color: var(--wd-ink-2);
34
+ }
35
+
36
+ .wd-statistic__affix--suffix {
37
+ margin-left: 2px;
38
+ }
39
+
40
+ .wd-statistic__footer {
41
+ margin-top: 4px;
42
+ font-size: 12.5px;
43
+ color: var(--wd-ink-2);
44
+ }
@@ -0,0 +1,100 @@
1
+ @charset "UTF-8";
2
+ .wd-steps {
3
+ display: flex;
4
+ align-items: flex-start;
5
+ width: 100%;
6
+ }
7
+
8
+ .wd-steps__item {
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ gap: 8px;
13
+ flex: none;
14
+ max-width: 130px;
15
+ }
16
+
17
+ .wd-steps__dot {
18
+ width: 28px;
19
+ height: 28px;
20
+ border-radius: 50%;
21
+ display: inline-flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ font-size: 13px;
25
+ font-weight: 700;
26
+ background: var(--wd-field);
27
+ color: var(--wd-ink-2);
28
+ }
29
+
30
+ /*
31
+ * ===== 步骤条的三种状态 =====
32
+ *
33
+ * wait (未开始) 中性灰底 + 灰字
34
+ * finish (已完成) **深色**实心 + 白勾
35
+ * process (进行中) **主题红** + 呼吸动画
36
+ *
37
+ * ⚠️ 之前的问题是:已完成节点是浅灰底,但连接线却是红色 ——
38
+ * 节点和线对不上,读起来像"线走完了、点还没走",语义混乱。
39
+ *
40
+ * 现在统一为:
41
+ * · 已走过的(finish + 它的连接线)→ 深色,表达"这段路已经走过"
42
+ * · 正在走的(process)→ 主题红,唯一需要引导视线的位置
43
+ * · 没走的(wait)→ 灰
44
+ *
45
+ * 红色只出现一次(当前步骤),符合"主色少而精"。
46
+ */
47
+ .wd-steps__item--process .wd-steps__dot {
48
+ background: var(--wd-red);
49
+ color: #fff;
50
+ }
51
+
52
+ .wd-steps__item--finish .wd-steps__dot {
53
+ background: var(--wd-ink);
54
+ color: #fff;
55
+ }
56
+
57
+ .wd-steps__label {
58
+ font-size: 12.5px;
59
+ font-weight: 600;
60
+ color: var(--wd-ink-2);
61
+ text-align: center;
62
+ }
63
+
64
+ .wd-steps__item--process .wd-steps__label {
65
+ color: var(--wd-ink);
66
+ }
67
+
68
+ .wd-steps__desc {
69
+ display: block;
70
+ font-style: normal;
71
+ font-weight: 500;
72
+ font-size: 11.5px;
73
+ color: var(--wd-ink-2);
74
+ margin-top: 2px;
75
+ }
76
+
77
+ .wd-steps__bar {
78
+ flex: 1;
79
+ height: 3px;
80
+ border-radius: var(--wd-radius-pill);
81
+ background: var(--wd-field);
82
+ margin: 13px 10px 0;
83
+ }
84
+
85
+ /*
86
+ * 已完成的连接线用**深色**,与 finish 节点同色。
87
+ * 之前是红色,导致"已完成步骤是灰点、连线却是红线"的割裂。
88
+ */
89
+ .wd-steps__bar--done {
90
+ background: var(--wd-ink);
91
+ }
92
+
93
+ /* ---- 微交互(精致版)---- */
94
+ .wd-steps__item--process .wd-steps__dot {
95
+ animation: wd-breathe 2.4s ease-in-out infinite;
96
+ }
97
+
98
+ .wd-steps__dot {
99
+ transition: transform var(--wd-dur) var(--wd-ease-spring);
100
+ }