@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,33 @@
1
+ @charset "UTF-8";
2
+ .wd-chevron {
3
+ display: inline-flex;
4
+ flex: none;
5
+ color: var(--wd-ink-3);
6
+ transition: transform var(--wd-dur) ease, color var(--wd-dur) ease;
7
+ }
8
+
9
+ /*
10
+ * 三种朝向的状态机。
11
+ *
12
+ * 图标本身固定用 chevron-down(朝下),靠容器旋转得到不同朝向:
13
+ * .wd-chevron 朝下 → 展开时转 180°(朝上)
14
+ * .wd-chevron--right 朝右 → 展开时转 90°(朝下)
15
+ *
16
+ * ⚠️ 之前漏了 `.wd-chevron--right` 的**初始旋转**
17
+ * (应为 -90deg,把朝下的图标转成朝右),
18
+ * 于是未展开时箭头朝下、展开后转 90° 变成朝左 —— 方向完全错乱。
19
+ */
20
+ .wd-chevron--right {
21
+ transform: rotate(-90deg);
22
+ }
23
+
24
+ .wd-chevron--open {
25
+ transform: rotate(180deg);
26
+ color: var(--wd-red-text);
27
+ }
28
+
29
+ /* 右向箭头展开:从 -90° 转到 0°(朝下),即旋转 90° */
30
+ .wd-chevron--right.wd-chevron--open {
31
+ transform: rotate(0deg);
32
+ color: var(--wd-red-text);
33
+ }
@@ -0,0 +1,69 @@
1
+ @charset "UTF-8";
2
+ .wd-collapse {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 10px;
6
+ }
7
+
8
+ .wd-collapse__item {
9
+ background: var(--wd-card);
10
+ border-radius: var(--wd-radius-md);
11
+ box-shadow: var(--wd-shadow);
12
+ overflow: hidden;
13
+ }
14
+
15
+ .wd-collapse__head {
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: space-between;
19
+ gap: 12px;
20
+ width: 100%;
21
+ padding: 16px 20px;
22
+ border: 0;
23
+ background: transparent;
24
+ font: inherit;
25
+ font-size: 14.5px;
26
+ font-weight: 600;
27
+ color: var(--wd-ink);
28
+ cursor: pointer;
29
+ text-align: left;
30
+ transition: background var(--wd-dur-fast) ease;
31
+ }
32
+
33
+ @media (hover: hover) {
34
+ .wd-collapse__head:hover {
35
+ background: var(--wd-bg);
36
+ }
37
+ }
38
+ /* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
39
+ .wd-collapse__head.is-hover {
40
+ background: var(--wd-bg);
41
+ }
42
+
43
+ .wd-collapse__body {
44
+ display: grid;
45
+ grid-template-rows: 0fr;
46
+ transition: grid-template-rows var(--wd-dur-slow) ease;
47
+ }
48
+
49
+ .wd-collapse__item--open .wd-collapse__body {
50
+ grid-template-rows: 1fr;
51
+ }
52
+
53
+ .wd-collapse__inner {
54
+ overflow: hidden;
55
+ }
56
+
57
+ .wd-collapse__content {
58
+ padding: 0 20px 18px;
59
+ font-size: 14px;
60
+ line-height: 1.65;
61
+ color: var(--wd-ink-2);
62
+ opacity: 1;
63
+ transition: opacity var(--wd-dur) ease;
64
+ }
65
+
66
+ .wd-collapse__item:not(.wd-collapse__item--open) .wd-collapse__content {
67
+ opacity: 0;
68
+ pointer-events: none;
69
+ }
@@ -0,0 +1,201 @@
1
+ @charset "UTF-8";
2
+ .wd-command {
3
+ position: fixed;
4
+ inset: 0;
5
+ z-index: 1300;
6
+ display: flex;
7
+ align-items: flex-start;
8
+ justify-content: center;
9
+ padding-top: 14vh;
10
+ }
11
+
12
+ .wd-command__mask {
13
+ position: absolute;
14
+ inset: 0;
15
+ background: var(--wd-mask);
16
+ backdrop-filter: blur(3px);
17
+ }
18
+
19
+ .wd-command__panel {
20
+ position: relative;
21
+ display: flex;
22
+ flex-direction: column;
23
+ width: min(620px, 100vw - 32px);
24
+ max-width: 100%;
25
+ border-radius: var(--wd-radius-lg);
26
+ background: var(--wd-card);
27
+ box-shadow: var(--wd-shadow-lg);
28
+ overflow: hidden;
29
+ animation: wd-command-in var(--wd-dur-pop) var(--wd-ease-out) both;
30
+ }
31
+
32
+ @keyframes wd-command-in {
33
+ from {
34
+ opacity: 0;
35
+ scale: 0.97;
36
+ translate: 0 -6px;
37
+ }
38
+ to {
39
+ opacity: 1;
40
+ scale: 1;
41
+ translate: 0 0;
42
+ }
43
+ }
44
+ @media (prefers-reduced-motion: reduce) {
45
+ .wd-command__panel {
46
+ animation: none;
47
+ }
48
+ }
49
+ /* ---- 搜索行 ---- */
50
+ .wd-command__input-row {
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 10px;
54
+ flex: none;
55
+ padding: 14px 16px;
56
+ border-bottom: 1px solid var(--wd-ink-5);
57
+ }
58
+
59
+ .wd-command__search-icon {
60
+ flex: none;
61
+ color: var(--wd-ink-2);
62
+ }
63
+
64
+ .wd-command__input {
65
+ flex: 1;
66
+ min-width: 0;
67
+ border: 0;
68
+ background: transparent;
69
+ color: var(--wd-ink);
70
+ font: inherit;
71
+ font-size: 15px;
72
+ outline: none;
73
+ }
74
+
75
+ .wd-command__input::placeholder {
76
+ color: var(--wd-ink-2);
77
+ }
78
+
79
+ .wd-command__esc {
80
+ flex: none;
81
+ padding: 2px 6px;
82
+ border-radius: 5px;
83
+ background: var(--wd-field);
84
+ color: var(--wd-ink-2);
85
+ font-family: var(--wd-font-mono);
86
+ font-size: 10.5px;
87
+ letter-spacing: 0.04em;
88
+ }
89
+
90
+ /* ---- 结果列表 ---- */
91
+ .wd-command__list {
92
+ flex: 1;
93
+ min-height: 0;
94
+ overflow-y: auto;
95
+ padding: 8px;
96
+ overscroll-behavior: contain;
97
+ }
98
+
99
+ .wd-command__group {
100
+ padding: 8px 8px 4px;
101
+ font-size: 11px;
102
+ font-weight: 700;
103
+ letter-spacing: 0.06em;
104
+ text-transform: uppercase;
105
+ color: var(--wd-ink-3);
106
+ }
107
+
108
+ .wd-command__item {
109
+ display: flex;
110
+ align-items: center;
111
+ gap: 10px;
112
+ width: 100%;
113
+ padding: 9px 10px;
114
+ border: 0;
115
+ border-radius: var(--wd-radius-xs);
116
+ background: transparent;
117
+ color: var(--wd-ink);
118
+ font: inherit;
119
+ font-size: 13.5px;
120
+ text-align: left;
121
+ cursor: pointer;
122
+ }
123
+
124
+ .wd-command__item--active {
125
+ background: var(--wd-field-hover);
126
+ }
127
+
128
+ .wd-command__item--disabled {
129
+ opacity: 0.45;
130
+ cursor: default;
131
+ }
132
+
133
+ .wd-command__item-icon {
134
+ flex: none;
135
+ display: inline-flex;
136
+ align-items: center;
137
+ justify-content: center;
138
+ width: 22px;
139
+ font-size: 15px;
140
+ }
141
+
142
+ .wd-command__item-main {
143
+ flex: 1;
144
+ min-width: 0;
145
+ display: flex;
146
+ flex-direction: column;
147
+ gap: 1px;
148
+ }
149
+
150
+ .wd-command__item-label {
151
+ overflow: hidden;
152
+ text-overflow: ellipsis;
153
+ white-space: nowrap;
154
+ }
155
+
156
+ .wd-command__item-hint {
157
+ font-size: 11.5px;
158
+ color: var(--wd-ink-2);
159
+ overflow: hidden;
160
+ text-overflow: ellipsis;
161
+ white-space: nowrap;
162
+ }
163
+
164
+ .wd-command__item-shortcut,
165
+ .wd-command__footer kbd {
166
+ flex: none;
167
+ padding: 2px 5px;
168
+ border-radius: 4px;
169
+ background: var(--wd-field);
170
+ color: var(--wd-ink-2);
171
+ font-family: var(--wd-font-mono);
172
+ font-size: 10.5px;
173
+ line-height: 1.5;
174
+ }
175
+
176
+ .wd-command__empty {
177
+ padding: 28px 12px;
178
+ text-align: center;
179
+ font-size: 13px;
180
+ color: var(--wd-ink-2);
181
+ }
182
+
183
+ /* ---- 底部提示 ---- */
184
+ .wd-command__footer {
185
+ flex: none;
186
+ display: flex;
187
+ align-items: center;
188
+ gap: 14px;
189
+ padding: 9px 14px;
190
+ border-top: 1px solid var(--wd-ink-5);
191
+ /* 提示条用中性浅灰,与面板主体区分即可 —— 不需要淡红 */
192
+ background: var(--wd-bg);
193
+ font-size: 11.5px;
194
+ color: var(--wd-ink-2);
195
+ }
196
+
197
+ .wd-command__footer span {
198
+ display: inline-flex;
199
+ align-items: center;
200
+ gap: 4px;
201
+ }
@@ -0,0 +1,7 @@
1
+ .wd-container {
2
+ width: 100%;
3
+ max-width: 1200px;
4
+ margin-inline: auto;
5
+ padding-inline: var(--wd-space-4);
6
+ padding-block: var(--wd-space-4);
7
+ }
@@ -0,0 +1,205 @@
1
+ @charset "UTF-8";
2
+ .wd-datepicker {
3
+ position: relative;
4
+ display: inline-block;
5
+ min-width: 220px;
6
+ }
7
+
8
+ /*
9
+ * 触发器尺寸走 --wd-size-* 令牌,与 Input / Select / Cascader 对齐。
10
+ *
11
+ * ⚠️ 原来是 `padding: 13px 20px` + `border-radius: pill`:
12
+ * · 高度靠 padding 撑出来(约 46px),与 --wd-size-md 的 44px 差 2px
13
+ * · 圆角是胶囊,而其他输入类是 --wd-radius-sm
14
+ * 两者叠加导致 DatePicker 和别的输入框并排时明显不像同一套控件。
15
+ */
16
+ .wd-datepicker__trigger {
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: space-between;
20
+ gap: 10px;
21
+ width: 100%;
22
+ height: var(--wd-size-md);
23
+ padding: 0 18px;
24
+ border: 0;
25
+ cursor: pointer;
26
+ background: var(--wd-field);
27
+ /* 胶囊:与 Input / Select 一致(本库可点击控件优先 pill) */
28
+ border-radius: var(--wd-radius-pill);
29
+ font: inherit;
30
+ font-size: 14px;
31
+ color: var(--wd-ink);
32
+ transition: background var(--wd-dur-fast) ease, box-shadow var(--wd-dur-fast) ease;
33
+ }
34
+
35
+ .wd-datepicker--sm .wd-datepicker__trigger {
36
+ height: var(--wd-size-sm);
37
+ padding: 0 14px;
38
+ font-size: var(--wd-font-size-sm);
39
+ }
40
+
41
+ .wd-datepicker--lg .wd-datepicker__trigger {
42
+ height: var(--wd-size-lg);
43
+ padding: 0 22px;
44
+ font-size: var(--wd-font-size-lg);
45
+ }
46
+
47
+ @media (hover: hover) {
48
+ .wd-datepicker__trigger:hover {
49
+ background: var(--wd-field-hover);
50
+ }
51
+ }
52
+ /* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
53
+ .wd-datepicker__trigger.is-hover {
54
+ background: var(--wd-field-hover);
55
+ }
56
+
57
+ .wd-datepicker--open .wd-datepicker__trigger {
58
+ box-shadow: 0 0 0 4px var(--wd-focus-ring-soft);
59
+ }
60
+
61
+ .wd-datepicker__placeholder {
62
+ color: var(--wd-ink-2);
63
+ }
64
+
65
+ .wd-datepicker__icon {
66
+ flex: none;
67
+ color: var(--wd-ink-3);
68
+ }
69
+
70
+ /* Teleport 到 body:定位由 JS 计算 */
71
+ .wd-datepicker__panel {
72
+ position: absolute; /* 文档坐标:JS 已加上 scrollX/scrollY */
73
+ z-index: 1200;
74
+ display: none;
75
+ width: 302px;
76
+ padding: 18px;
77
+ background: var(--wd-card);
78
+ border-radius: var(--wd-radius-lg);
79
+ box-shadow: var(--wd-shadow-hover);
80
+ }
81
+
82
+ .wd-datepicker__panel.is-open {
83
+ display: block;
84
+ }
85
+
86
+ .wd-datepicker__head {
87
+ display: flex;
88
+ align-items: center;
89
+ justify-content: space-between;
90
+ margin-bottom: 12px;
91
+ }
92
+
93
+ .wd-datepicker__month {
94
+ font-size: 14.5px;
95
+ font-weight: 700;
96
+ }
97
+
98
+ .wd-datepicker__nav {
99
+ display: flex;
100
+ gap: 6px;
101
+ }
102
+
103
+ .wd-datepicker__week {
104
+ display: grid;
105
+ grid-template-columns: repeat(7, 1fr);
106
+ margin-bottom: 4px;
107
+ }
108
+
109
+ .wd-datepicker__week span {
110
+ text-align: center;
111
+ font-size: 11.5px;
112
+ font-weight: 600;
113
+ color: var(--wd-ink-2);
114
+ }
115
+
116
+ .wd-datepicker__grid {
117
+ display: grid;
118
+ grid-template-columns: repeat(7, 1fr);
119
+ gap: 2px;
120
+ }
121
+
122
+ .wd-datepicker__day {
123
+ height: 34px;
124
+ border: 0;
125
+ background: transparent;
126
+ border-radius: 50%;
127
+ font: inherit;
128
+ font-size: 13px;
129
+ color: var(--wd-ink);
130
+ cursor: pointer;
131
+ display: inline-flex;
132
+ align-items: center;
133
+ justify-content: center;
134
+ transition: background var(--wd-dur-fast) ease;
135
+ }
136
+
137
+ @media (hover: hover) {
138
+ .wd-datepicker__day:hover {
139
+ background: var(--wd-tint-1);
140
+ }
141
+ }
142
+ .wd-datepicker__day.is-hover {
143
+ background: var(--wd-tint-1);
144
+ }
145
+
146
+ .wd-datepicker__day--muted {
147
+ color: var(--wd-ink-2);
148
+ }
149
+
150
+ .wd-datepicker__day--today {
151
+ color: var(--wd-red-text);
152
+ font-weight: 700;
153
+ }
154
+
155
+ .wd-datepicker__day--selected {
156
+ background: var(--wd-red);
157
+ color: #fff;
158
+ font-weight: 700;
159
+ }
160
+
161
+ @media (hover: hover) {
162
+ .wd-datepicker__day--selected:hover {
163
+ background: var(--wd-red-hover);
164
+ }
165
+ }
166
+ .wd-datepicker__day--selected.is-hover {
167
+ background: var(--wd-red-hover);
168
+ }
169
+
170
+ .wd-datepicker__foot {
171
+ display: flex;
172
+ justify-content: center;
173
+ margin-top: 10px;
174
+ }
175
+
176
+ .wd-datepicker__todaybtn {
177
+ border: 0;
178
+ background: transparent;
179
+ color: var(--wd-red-text);
180
+ font: inherit;
181
+ font-size: 13px;
182
+ font-weight: 700;
183
+ padding: 5px 12px;
184
+ border-radius: var(--wd-radius-pill);
185
+ cursor: pointer;
186
+ }
187
+
188
+ @media (hover: hover) {
189
+ .wd-datepicker__todaybtn:hover {
190
+ background: var(--wd-field-hover);
191
+ }
192
+ }
193
+ .wd-datepicker__todaybtn.is-hover {
194
+ background: var(--wd-field-hover);
195
+ }
196
+
197
+ /* 已选日期文本 */
198
+ .wd-datepicker__value {
199
+ flex: 1;
200
+ min-width: 0;
201
+ overflow: hidden;
202
+ text-overflow: ellipsis;
203
+ white-space: nowrap;
204
+ color: var(--wd-ink);
205
+ }
@@ -0,0 +1,119 @@
1
+ @charset "UTF-8";
2
+ .wd-descriptions {
3
+ display: flex;
4
+ flex-direction: column;
5
+ width: 100%;
6
+ border-radius: var(--wd-radius-sm);
7
+ overflow: hidden;
8
+ }
9
+
10
+ .wd-descriptions__row {
11
+ display: flex;
12
+ align-items: stretch;
13
+ min-height: 0;
14
+ }
15
+
16
+ .wd-descriptions__item {
17
+ display: flex;
18
+ flex: var(--wd-desc-span) 1 0;
19
+ min-width: 0;
20
+ gap: 10px;
21
+ align-items: baseline;
22
+ }
23
+
24
+ /*
25
+ ⚠️ 标签宽度不能写死(原来固定 96px):
26
+ 三列布局且容器偏窄时,每个单元格只有 ~127px,标签独占 96px 后
27
+ 值区只剩 21px —— 中文字符逐字竖排,完全不可读(实测复现)。
28
+ 改为「按内容自适应 + 上限 40%」,窄容器下标签让位给值。
29
+ */
30
+ .wd-descriptions__label {
31
+ flex: 0 1 auto;
32
+ min-width: 0;
33
+ max-width: 40%;
34
+ font-size: 12.5px;
35
+ font-weight: 600;
36
+ color: var(--wd-ink-2);
37
+ line-height: 1.6;
38
+ /* 标签本身也该换行,而不是被压成一条竖线 */
39
+ overflow-wrap: break-word;
40
+ }
41
+
42
+ .wd-descriptions__value {
43
+ flex: 1 1 0;
44
+ /* 保证值区至少有可读宽度,否则宁可整行变窄 */
45
+ min-width: 3.5em;
46
+ font-size: 13px;
47
+ color: var(--wd-ink);
48
+ line-height: 1.6;
49
+ overflow-wrap: break-word;
50
+ }
51
+
52
+ .wd-descriptions__hint {
53
+ display: inline-block;
54
+ margin-left: 6px;
55
+ font-size: 12px;
56
+ color: var(--wd-ink-2);
57
+ }
58
+
59
+ .wd-descriptions__colon {
60
+ color: var(--wd-ink-3);
61
+ }
62
+
63
+ /* ---- 尺寸 ---- */
64
+ .wd-descriptions--lg .wd-descriptions__row {
65
+ padding: 13px 0;
66
+ }
67
+
68
+ .wd-descriptions--lg .wd-descriptions__label,
69
+ .wd-descriptions--lg .wd-descriptions__value {
70
+ font-size: 13.5px;
71
+ }
72
+
73
+ .wd-descriptions--md .wd-descriptions__row {
74
+ padding: 9px 0;
75
+ }
76
+
77
+ .wd-descriptions--sm .wd-descriptions__row {
78
+ padding: 6px 0;
79
+ }
80
+
81
+ .wd-descriptions--sm .wd-descriptions__label,
82
+ .wd-descriptions--sm .wd-descriptions__value {
83
+ font-size: 12.5px;
84
+ }
85
+
86
+ /* ---- 竖排:标签在上 ---- */
87
+ .wd-descriptions--vertical .wd-descriptions__item {
88
+ flex-direction: column;
89
+ gap: 3px;
90
+ padding-right: 18px;
91
+ }
92
+
93
+ .wd-descriptions--vertical .wd-descriptions__label {
94
+ max-width: none;
95
+ font-size: 12px;
96
+ color: var(--wd-ink-2);
97
+ }
98
+
99
+ .wd-descriptions--vertical .wd-descriptions__value {
100
+ font-weight: 600;
101
+ }
102
+
103
+ /* ---- 斑马纹:按行交替 ---- */
104
+ .wd-descriptions--striped .wd-descriptions__row:nth-child(odd) {
105
+ background: var(--wd-tint-1);
106
+ }
107
+
108
+ .wd-descriptions--striped .wd-descriptions__row {
109
+ padding-left: 10px;
110
+ padding-right: 10px;
111
+ border-radius: var(--wd-radius-xs);
112
+ }
113
+
114
+ .wd-descriptions__empty {
115
+ padding: 18px 0;
116
+ text-align: center;
117
+ font-size: 13px;
118
+ color: var(--wd-ink-2);
119
+ }
@@ -0,0 +1,62 @@
1
+ @charset "UTF-8";
2
+ .wd-divider {
3
+ display: flex;
4
+ align-items: center;
5
+ gap: 12px;
6
+ width: 100%;
7
+ border: 0;
8
+ }
9
+
10
+ /* ---- 水平:用伪元素画线,有文字时自动断开 ---- */
11
+ .wd-divider--horizontal::before,
12
+ .wd-divider--horizontal::after {
13
+ content: "";
14
+ flex: 1;
15
+ height: 1px;
16
+ background: var(--wd-ink-5);
17
+ }
18
+
19
+ .wd-divider--dashed::before,
20
+ .wd-divider--dashed::after {
21
+ background: none;
22
+ border-top: 1px dashed var(--wd-ink-5);
23
+ height: 0;
24
+ }
25
+
26
+ /* 无文字时只留一条线 */
27
+ .wd-divider--horizontal:not(:has(.wd-divider__text))::before {
28
+ display: none;
29
+ }
30
+
31
+ .wd-divider__text {
32
+ flex: none;
33
+ font-size: 12.5px;
34
+ font-weight: 600;
35
+ color: var(--wd-ink-2);
36
+ white-space: nowrap;
37
+ }
38
+
39
+ /* 文字对齐:left 时左侧线全收起,right 反之 */
40
+ .wd-divider--left::before {
41
+ flex: 0 0 0;
42
+ }
43
+
44
+ .wd-divider--right::after {
45
+ flex: 0 0 0;
46
+ }
47
+
48
+ /* ---- 垂直:用在行内元素之间(如面包屑、工具栏) ---- */
49
+ .wd-divider--vertical {
50
+ display: inline-block;
51
+ width: 1px;
52
+ height: 1em;
53
+ flex: none;
54
+ align-self: center;
55
+ background: var(--wd-ink-5);
56
+ vertical-align: middle;
57
+ }
58
+
59
+ .wd-divider--vertical.wd-divider--dashed {
60
+ background: none;
61
+ border-left: 1px dashed var(--wd-ink-5);
62
+ }
@@ -0,0 +1,30 @@
1
+ .wd-dot {
2
+ display: inline-block;
3
+ width: 8px;
4
+ height: 8px;
5
+ flex: none;
6
+ border-radius: 50%;
7
+ background: currentColor;
8
+ color: var(--wd-ink-2);
9
+ }
10
+
11
+ .wd-dot--lg {
12
+ width: 10px;
13
+ height: 10px;
14
+ }
15
+
16
+ .wd-dot--info {
17
+ color: var(--wd-ink-2);
18
+ }
19
+
20
+ .wd-dot--success {
21
+ color: var(--wd-success);
22
+ }
23
+
24
+ .wd-dot--warning {
25
+ color: var(--wd-warning);
26
+ }
27
+
28
+ .wd-dot--danger {
29
+ color: var(--wd-red);
30
+ }