@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,164 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-modal {
|
|
3
|
+
position: fixed;
|
|
4
|
+
inset: 0;
|
|
5
|
+
z-index: 1000;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
padding: 24px;
|
|
10
|
+
display: none;
|
|
11
|
+
opacity: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.wd-modal.is-open {
|
|
15
|
+
display: flex;
|
|
16
|
+
opacity: 1;
|
|
17
|
+
/*
|
|
18
|
+
* ⚠️ 这里**不加 opacity 动画**。
|
|
19
|
+
*
|
|
20
|
+
* 踩过的坑:`.wd-modal` 基础态是 `opacity: 0`,靠 `.is-open` 改成 1,
|
|
21
|
+
* 再叠一条 `animation: wd-modal-in`(from opacity:0)。
|
|
22
|
+
* 在动画时钟停摆的环境里(后台标签页 / 无头渲染),
|
|
23
|
+
* 动画停在 from 帧 → 弹窗永久透明,看起来像"没样式"。
|
|
24
|
+
*
|
|
25
|
+
* 现在的做法:显隐完全由 display + opacity 的**静态值**决定,
|
|
26
|
+
* 不进动画。淡入的观感交给面板自身的 transform 过渡,
|
|
27
|
+
* 即使那段也不播,内容依然可见。
|
|
28
|
+
*/
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.wd-modal__mask {
|
|
33
|
+
position: absolute;
|
|
34
|
+
inset: 0;
|
|
35
|
+
background: var(--wd-mask);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.wd-modal__panel {
|
|
39
|
+
position: relative;
|
|
40
|
+
width: 100%;
|
|
41
|
+
max-width: 440px;
|
|
42
|
+
padding: 26px 26px 24px;
|
|
43
|
+
background: var(--wd-card);
|
|
44
|
+
border-radius: var(--wd-radius-xl);
|
|
45
|
+
box-shadow: var(--wd-shadow-lg);
|
|
46
|
+
/*
|
|
47
|
+
* 面板基础态就是**可见**的。
|
|
48
|
+
*
|
|
49
|
+
* ⚠️ 这里曾经写 `opacity: 0`,靠 `.is-open` 再改回 1 ——
|
|
50
|
+
* 那是"先隐藏再显示"的思路,一旦驱动显隐的那条路径出问题
|
|
51
|
+
* (动画时钟停摆、动画被中断、样式加载顺序变化),
|
|
52
|
+
* 面板就永久不可见。实测在无头渲染环境里正是如此:
|
|
53
|
+
* modal 的 opacity 是 1,面板却是 0,整个对话框看起来"没样式"。
|
|
54
|
+
*
|
|
55
|
+
* 原则:**默认可见**,只在需要时做动画。
|
|
56
|
+
* 这样任何异常都不会让内容消失。
|
|
57
|
+
*/
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.wd-modal.is-open .wd-modal__panel {
|
|
62
|
+
transform: none;
|
|
63
|
+
animation: wd-modal-panel-in var(--wd-dur-slow) var(--wd-ease-out);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
* ⚠️ 关键帧里**不能有 opacity**。
|
|
68
|
+
*
|
|
69
|
+
* 只要 from 帧带 opacity:0,在任何"动画不推进"的环境里
|
|
70
|
+
* 面板就永久不可见 —— 而动画是否推进我们无法控制
|
|
71
|
+
* (后台标签页、无头渲染、系统省电模式都会停摆时钟)。
|
|
72
|
+
* 实测:animationPlayState 是 running,但 opacity 永远停在 0。
|
|
73
|
+
*
|
|
74
|
+
* 只做 transform 位移:即使动画卡住,最坏情况是位置略偏,
|
|
75
|
+
* 内容依然完全可见。这是"渐进增强"的正确方向。
|
|
76
|
+
*/
|
|
77
|
+
@keyframes wd-modal-panel-in {
|
|
78
|
+
from {
|
|
79
|
+
transform: translateY(-6px) scale(0.97);
|
|
80
|
+
}
|
|
81
|
+
to {
|
|
82
|
+
transform: none;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/* 减弱动效:直接到位 */
|
|
86
|
+
@media (prefers-reduced-motion: reduce) {
|
|
87
|
+
.wd-modal.is-open,
|
|
88
|
+
.wd-modal.is-open .wd-modal__panel {
|
|
89
|
+
animation: none;
|
|
90
|
+
opacity: 1;
|
|
91
|
+
transform: none;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/* =============================================================
|
|
95
|
+
* 内部结构:head / title / close / body / foot
|
|
96
|
+
*
|
|
97
|
+
* ⚠️ 这几条曾经完全缺失 —— 组件模板里用了 wd-modal__head / __title /
|
|
98
|
+
* __close / __body / __foot,但样式表里一个都没有定义。
|
|
99
|
+
* 结果关闭按钮掉到标题下面、标题与正文挤在一起,
|
|
100
|
+
* 整个对话框像是"样式没加载"。
|
|
101
|
+
* ============================================================= */
|
|
102
|
+
.wd-modal__head {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: flex-start;
|
|
105
|
+
gap: 12px;
|
|
106
|
+
/* 标题区与正文之间留出呼吸,不靠 margin 堆叠 */
|
|
107
|
+
margin-bottom: 14px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.wd-modal__title {
|
|
111
|
+
flex: 1;
|
|
112
|
+
min-width: 0;
|
|
113
|
+
font-size: 17px;
|
|
114
|
+
font-weight: 800;
|
|
115
|
+
letter-spacing: -0.015em;
|
|
116
|
+
line-height: 1.35;
|
|
117
|
+
color: var(--wd-ink);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
* 关闭按钮:**圆形**。
|
|
122
|
+
* 全站约定「圆形 / 胶囊优先」—— 图标按钮用正圆,
|
|
123
|
+
* 文字按钮用胶囊,方形只留给内容块。
|
|
124
|
+
*/
|
|
125
|
+
.wd-modal__close {
|
|
126
|
+
flex: none;
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
width: 28px;
|
|
131
|
+
height: 28px;
|
|
132
|
+
/* 上移 2px 让图标与标题首行的视觉中线对齐(标题有行高留白) */
|
|
133
|
+
margin-top: -2px;
|
|
134
|
+
padding: 0;
|
|
135
|
+
border: 0;
|
|
136
|
+
border-radius: 50%;
|
|
137
|
+
background: transparent;
|
|
138
|
+
color: var(--wd-ink-3);
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
transition: background var(--wd-dur-fast) ease, color var(--wd-dur-fast) ease;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.wd-modal__close:hover {
|
|
144
|
+
background: var(--wd-field);
|
|
145
|
+
color: var(--wd-ink);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.wd-modal__close:focus-visible {
|
|
149
|
+
outline: none;
|
|
150
|
+
box-shadow: 0 0 0 3px var(--wd-focus-ring-soft);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.wd-modal__body {
|
|
154
|
+
font-size: 14px;
|
|
155
|
+
line-height: 1.7;
|
|
156
|
+
color: var(--wd-ink-2);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.wd-modal__foot {
|
|
160
|
+
display: flex;
|
|
161
|
+
justify-content: flex-end;
|
|
162
|
+
gap: 8px;
|
|
163
|
+
margin-top: 22px;
|
|
164
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-notification {
|
|
3
|
+
position: fixed;
|
|
4
|
+
left: 24px;
|
|
5
|
+
bottom: 24px;
|
|
6
|
+
z-index: 1000;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
gap: 12px;
|
|
10
|
+
width: 360px;
|
|
11
|
+
max-width: calc(100% - 48px);
|
|
12
|
+
padding: 16px 18px;
|
|
13
|
+
background: var(--wd-card);
|
|
14
|
+
border-radius: var(--wd-radius-md);
|
|
15
|
+
box-shadow: var(--wd-shadow-pop);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.wd-notification__icon {
|
|
19
|
+
flex: none;
|
|
20
|
+
margin-top: 6px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.wd-notification__body {
|
|
24
|
+
flex: 1;
|
|
25
|
+
min-width: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.wd-notification__title {
|
|
29
|
+
font-size: 14.5px;
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.wd-notification__desc {
|
|
34
|
+
margin-top: 3px;
|
|
35
|
+
font-size: 13.5px;
|
|
36
|
+
color: var(--wd-ink-2);
|
|
37
|
+
line-height: 1.6;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.wd-notification-fade-enter-active,
|
|
41
|
+
.wd-notification-fade-leave-active {
|
|
42
|
+
transition: opacity var(--wd-dur-slow) ease, transform var(--wd-dur-slow) ease;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.wd-notification-fade-enter-from,
|
|
46
|
+
.wd-notification-fade-leave-to {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
transform: translateY(12px);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* 入场完全交给上方的 Transition(transition: opacity + transform),
|
|
52
|
+
不再叠加 animation —— 否则会先绘制最终态再回弹。 */
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-otp {
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* ---------------- 基础格 ---------------- */
|
|
7
|
+
.wd-otp__box {
|
|
8
|
+
width: 52px;
|
|
9
|
+
height: 56px;
|
|
10
|
+
border: 0;
|
|
11
|
+
background: var(--wd-field);
|
|
12
|
+
color: var(--wd-ink);
|
|
13
|
+
font: inherit;
|
|
14
|
+
font-family: var(--wd-font-mono);
|
|
15
|
+
font-size: 22px;
|
|
16
|
+
font-weight: 700;
|
|
17
|
+
text-align: center;
|
|
18
|
+
outline: none;
|
|
19
|
+
/* 去掉数字输入框的上下箭头 */
|
|
20
|
+
appearance: none;
|
|
21
|
+
-moz-appearance: textfield;
|
|
22
|
+
transition: background var(--wd-dur-fast) ease, box-shadow var(--wd-dur-fast) ease, border-color var(--wd-dur-fast) ease;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.wd-otp__box::placeholder {
|
|
26
|
+
color: var(--wd-ink-2);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.wd-otp__box::-webkit-outer-spin-button,
|
|
30
|
+
.wd-otp__box::-webkit-inner-spin-button {
|
|
31
|
+
appearance: none;
|
|
32
|
+
margin: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ---------------- separate:独立方块 ---------------- */
|
|
36
|
+
.wd-otp--separate {
|
|
37
|
+
gap: 10px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.wd-otp--separate .wd-otp__box {
|
|
41
|
+
border-radius: var(--wd-radius-sm);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.wd-otp--separate .wd-otp__box:focus {
|
|
45
|
+
background: var(--wd-card);
|
|
46
|
+
box-shadow: 0 0 0 4px var(--wd-focus-ring-soft);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ---------------- pill:连体胶囊 ---------------- */
|
|
50
|
+
/*
|
|
51
|
+
* 整体一个胶囊:只给容器画圆角和底色,格子本身透明,
|
|
52
|
+
* 格与格之间用 1px 分隔线暗示分段。
|
|
53
|
+
*
|
|
54
|
+
* ⚠️ 不给每个格子单独圆角再用负 margin 拼 ——
|
|
55
|
+
* 那样焦点态的高亮会被相邻格盖住,且拼接处会出现双线。
|
|
56
|
+
*/
|
|
57
|
+
.wd-otp--pill {
|
|
58
|
+
gap: 0;
|
|
59
|
+
padding: 4px;
|
|
60
|
+
border-radius: var(--wd-radius-pill);
|
|
61
|
+
background: var(--wd-field);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.wd-otp--pill .wd-otp__box {
|
|
65
|
+
background: transparent;
|
|
66
|
+
border-radius: 0;
|
|
67
|
+
width: 44px;
|
|
68
|
+
height: 48px;
|
|
69
|
+
font-size: 20px;
|
|
70
|
+
/*
|
|
71
|
+
* **不要分隔线**。
|
|
72
|
+
* 胶囊的语义是"一个整体",格与格之间靠字符间距自然分段即可;
|
|
73
|
+
* 加竖线会把它读成一排独立小格,失去"连体"的意思。
|
|
74
|
+
*/
|
|
75
|
+
box-shadow: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* 聚焦格:圆角胶囊高亮,不破坏整体轮廓 */
|
|
79
|
+
.wd-otp--pill .wd-otp__box:focus {
|
|
80
|
+
background: var(--wd-card);
|
|
81
|
+
border-radius: var(--wd-radius-pill);
|
|
82
|
+
box-shadow: var(--wd-shadow-sm);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* ---------------- underline:底部横线 ---------------- */
|
|
86
|
+
/*
|
|
87
|
+
* **六个格连成一条完整底线**,不是六条短线。
|
|
88
|
+
*
|
|
89
|
+
* 做法:容器画一条横线(::after),格子自己不带任何边框。
|
|
90
|
+
* 无论格数多少、间距多大,底线永远是一条连续的线。
|
|
91
|
+
*
|
|
92
|
+
* ⚠️ 不能每格各画一段:格间 gap 会让线断开,
|
|
93
|
+
* 看起来像六个独立输入框,而不是一个"验证码输入区"。
|
|
94
|
+
*/
|
|
95
|
+
.wd-otp--underline {
|
|
96
|
+
position: relative;
|
|
97
|
+
gap: 6px;
|
|
98
|
+
/* 给底线留位置,避免压住文字 */
|
|
99
|
+
padding-bottom: 10px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* 整条底线:横跨容器全宽 */
|
|
103
|
+
.wd-otp--underline::after {
|
|
104
|
+
content: "";
|
|
105
|
+
position: absolute;
|
|
106
|
+
left: 0;
|
|
107
|
+
right: 0;
|
|
108
|
+
bottom: 0;
|
|
109
|
+
height: 2px;
|
|
110
|
+
border-radius: 1px;
|
|
111
|
+
background: var(--wd-ink-4);
|
|
112
|
+
transition: background var(--wd-dur-fast) ease, height var(--wd-dur-fast) ease;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* 聚焦时整条线变主题红并加粗 —— 焦点属于"这一组" */
|
|
116
|
+
.wd-otp--underline:focus-within::after {
|
|
117
|
+
height: 3px;
|
|
118
|
+
background: var(--wd-red);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.wd-otp--underline .wd-otp__box {
|
|
122
|
+
width: 40px;
|
|
123
|
+
height: 46px;
|
|
124
|
+
background: transparent;
|
|
125
|
+
border-radius: 0;
|
|
126
|
+
/* 格子自身完全无边框 */
|
|
127
|
+
box-shadow: none;
|
|
128
|
+
padding-bottom: 4px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ---------------- 禁用 ---------------- */
|
|
132
|
+
.wd-otp--disabled {
|
|
133
|
+
opacity: 0.5;
|
|
134
|
+
pointer-events: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.wd-otp__box:disabled {
|
|
138
|
+
opacity: 0.5;
|
|
139
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-pagination {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 6px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.wd-pagination__btn {
|
|
9
|
+
min-width: 36px;
|
|
10
|
+
height: 36px;
|
|
11
|
+
padding: 0 6px;
|
|
12
|
+
border: 0;
|
|
13
|
+
border-radius: var(--wd-radius-pill);
|
|
14
|
+
background: transparent;
|
|
15
|
+
color: var(--wd-ink-2);
|
|
16
|
+
font: inherit;
|
|
17
|
+
font-size: 13.5px;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
transition: background var(--wd-dur-fast) ease, color var(--wd-dur-fast) ease;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (hover: hover) {
|
|
27
|
+
.wd-pagination__btn:hover:not(:disabled) {
|
|
28
|
+
background: var(--wd-field);
|
|
29
|
+
color: var(--wd-ink);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/* JS 增强(addHover):同一份声明,由 .is-hover 驱动,不受 hover 媒体查询限制 */
|
|
33
|
+
.wd-pagination__btn.is-hover:not(:disabled) {
|
|
34
|
+
background: var(--wd-field);
|
|
35
|
+
color: var(--wd-ink);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.wd-pagination__btn:focus-visible {
|
|
39
|
+
outline: none;
|
|
40
|
+
box-shadow: 0 0 0 4px var(--wd-focus-ring-soft);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.wd-pagination__btn:disabled {
|
|
44
|
+
color: var(--wd-ink-3);
|
|
45
|
+
cursor: default;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.wd-pagination__btn--active {
|
|
49
|
+
background: var(--wd-red);
|
|
50
|
+
color: #fff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (hover: hover) {
|
|
54
|
+
.wd-pagination__btn--active:hover:not(:disabled) {
|
|
55
|
+
background: var(--wd-red-hover);
|
|
56
|
+
color: #fff;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.wd-pagination__btn--active.is-hover:not(:disabled) {
|
|
60
|
+
background: var(--wd-red-hover);
|
|
61
|
+
color: #fff;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.wd-pagination__dots {
|
|
65
|
+
color: var(--wd-ink-2);
|
|
66
|
+
font-size: 13px;
|
|
67
|
+
padding: 0 2px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* ---- 微交互(精致版)---- */
|
|
71
|
+
.wd-pagination--anim-ready .wd-pagination__btn--active {
|
|
72
|
+
animation: wd-bloom var(--wd-dur) var(--wd-ease-out) forwards;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ---- 总条数 / 简洁模式 / 每页条数 ---- */
|
|
76
|
+
.wd-pagination {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 6px;
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.wd-pagination__total {
|
|
84
|
+
margin-right: 6px;
|
|
85
|
+
font-size: 12.5px;
|
|
86
|
+
color: var(--wd-ink-2);
|
|
87
|
+
font-variant-numeric: tabular-nums;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.wd-pagination__simple-text {
|
|
91
|
+
padding: 0 8px;
|
|
92
|
+
font-size: 13px;
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
color: var(--wd-ink);
|
|
95
|
+
font-variant-numeric: tabular-nums;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.wd-pagination__size {
|
|
99
|
+
margin-left: 6px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.wd-pagination__size select {
|
|
103
|
+
/* 可点击控件优先胶囊;尺寸走 sm 令牌 */
|
|
104
|
+
height: var(--wd-size-sm);
|
|
105
|
+
padding: 0 12px;
|
|
106
|
+
border: 0;
|
|
107
|
+
border-radius: var(--wd-radius-pill);
|
|
108
|
+
background: var(--wd-field);
|
|
109
|
+
color: var(--wd-ink);
|
|
110
|
+
font: inherit;
|
|
111
|
+
font-size: 12.5px;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
outline: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (hover: hover) {
|
|
117
|
+
.wd-pagination__size select:hover {
|
|
118
|
+
background: var(--wd-field-hover);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-popconfirm {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
vertical-align: middle;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.wd-popconfirm__bubble {
|
|
8
|
+
position: fixed;
|
|
9
|
+
z-index: 1100;
|
|
10
|
+
padding: 14px 16px 12px;
|
|
11
|
+
border-radius: var(--wd-radius-md);
|
|
12
|
+
background: var(--wd-card);
|
|
13
|
+
box-shadow: var(--wd-shadow-pop);
|
|
14
|
+
/*
|
|
15
|
+
可见性用 display 控制,不依赖 transition / animation:
|
|
16
|
+
气泡是「按需出现的交互层」,如果过渡因任何原因没跑完
|
|
17
|
+
(时钟停摆、样式缺失、宿主覆盖),用 opacity/visibility 会出现
|
|
18
|
+
「节点在但看不见 / 已关闭却仍挡住点击」这类难查的问题。
|
|
19
|
+
过渡留给入场时的 scale + opacity,但可见性始终由 display 兜住。
|
|
20
|
+
*/
|
|
21
|
+
display: none;
|
|
22
|
+
opacity: 0;
|
|
23
|
+
scale: 0.97;
|
|
24
|
+
transform-origin: center bottom;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.wd-popconfirm__bubble.is-open {
|
|
28
|
+
display: block;
|
|
29
|
+
opacity: 1;
|
|
30
|
+
scale: 1;
|
|
31
|
+
animation: wd-popconfirm-in var(--wd-dur-pop) var(--wd-ease-out) both;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes wd-popconfirm-in {
|
|
35
|
+
from {
|
|
36
|
+
opacity: 0;
|
|
37
|
+
scale: 0.97;
|
|
38
|
+
}
|
|
39
|
+
to {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
scale: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
@media (prefers-reduced-motion: reduce) {
|
|
45
|
+
.wd-popconfirm__bubble.is-open {
|
|
46
|
+
animation: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.wd-popconfirm__title {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: flex-start;
|
|
52
|
+
gap: 7px;
|
|
53
|
+
font-size: 13.5px;
|
|
54
|
+
font-weight: 700;
|
|
55
|
+
line-height: 1.5;
|
|
56
|
+
color: var(--wd-ink);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.wd-popconfirm__icon {
|
|
60
|
+
flex: none;
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
margin-top: 1px;
|
|
63
|
+
color: var(--wd-red-text);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.wd-popconfirm__desc {
|
|
67
|
+
margin: 6px 0 0;
|
|
68
|
+
font-size: 12.5px;
|
|
69
|
+
line-height: 1.55;
|
|
70
|
+
color: var(--wd-ink-2);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.wd-popconfirm__actions {
|
|
74
|
+
display: flex;
|
|
75
|
+
justify-content: flex-end;
|
|
76
|
+
gap: 8px;
|
|
77
|
+
margin-top: 12px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* 危险确认:改用更深的红,与普通主按钮区分 */
|
|
81
|
+
.wd-popconfirm__ok--danger {
|
|
82
|
+
background: var(--wd-red-active);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.wd-popconfirm__ok--danger:hover:not(:disabled) {
|
|
86
|
+
background: #8F1A25;
|
|
87
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wd-popover {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* 未提供 trigger 插槽时的兜底按钮:保持与其他组件一致的观感 */
|
|
8
|
+
.wd-popover__default-trigger {
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
height: 32px;
|
|
12
|
+
padding: 0 14px;
|
|
13
|
+
border: 0;
|
|
14
|
+
border-radius: var(--wd-radius-pill);
|
|
15
|
+
background: var(--wd-field);
|
|
16
|
+
color: var(--wd-ink);
|
|
17
|
+
font: inherit;
|
|
18
|
+
font-size: 13px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: background var(--wd-dur-fast) ease;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (hover: hover) {
|
|
25
|
+
.wd-popover__default-trigger:hover {
|
|
26
|
+
background: var(--wd-field-hover);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
.wd-popover__panel {
|
|
30
|
+
position: absolute; /* 文档坐标:JS 已加上 scrollX/scrollY */
|
|
31
|
+
z-index: 1200;
|
|
32
|
+
max-width: min(360px, 100vw - 32px);
|
|
33
|
+
padding: 14px 16px;
|
|
34
|
+
border-radius: var(--wd-radius-md);
|
|
35
|
+
background: var(--wd-card);
|
|
36
|
+
box-shadow: var(--wd-shadow-pop);
|
|
37
|
+
color: var(--wd-ink);
|
|
38
|
+
font-size: 13.5px;
|
|
39
|
+
line-height: 1.6;
|
|
40
|
+
/*
|
|
41
|
+
* 显隐用 display + 类切换,不用 <Transition>。
|
|
42
|
+
*
|
|
43
|
+
* 理由(踩过两次):
|
|
44
|
+
* 1. 无头/后台环境动画时钟停摆,Transition 的 enter-from 会残留,
|
|
45
|
+
* 面板卡在半透明状态永不完成
|
|
46
|
+
* 2. 本库其他浮层(Tooltip/Dropdown)都已统一成这个做法,
|
|
47
|
+
* 混用会让同一个页面的浮层行为不一致
|
|
48
|
+
*/
|
|
49
|
+
display: none;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
transform: translateY(-4px);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.wd-popover__panel.is-open {
|
|
55
|
+
display: block;
|
|
56
|
+
opacity: 1;
|
|
57
|
+
transform: translateY(0);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.wd-popover__head {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 8px;
|
|
64
|
+
margin-bottom: 8px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.wd-popover__title {
|
|
68
|
+
flex: 1;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
font-size: 13.5px;
|
|
71
|
+
font-weight: 700;
|
|
72
|
+
color: var(--wd-ink);
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
text-overflow: ellipsis;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.wd-popover__close {
|
|
79
|
+
flex: none;
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
width: 22px;
|
|
84
|
+
height: 22px;
|
|
85
|
+
padding: 0;
|
|
86
|
+
border: 0;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
background: transparent;
|
|
89
|
+
color: var(--wd-ink-3);
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
transition: background var(--wd-dur-fast) ease, color var(--wd-dur-fast) ease;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.wd-popover__close:hover {
|
|
95
|
+
background: var(--wd-field);
|
|
96
|
+
color: var(--wd-ink);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.wd-popover__body {
|
|
100
|
+
/* 内容块之间给一点默认节奏,避免使用者每次自己加间距 */
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: 8px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* 面板内的说明性文字:弱一档 */
|
|
107
|
+
.wd-popover__body .wd-popover__hint {
|
|
108
|
+
color: var(--wd-ink-2);
|
|
109
|
+
font-size: 12.5px;
|
|
110
|
+
}
|