@xihan-ui/styles 1.0.0-alpha.1 → 1.0.0-alpha.3
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/CHANGELOG.md +527 -0
- package/README.md +1 -1
- package/css/accordion.css +61 -5
- package/css/affix.css +5 -0
- package/css/alert.css +35 -5
- package/css/anchor.css +12 -7
- package/css/avatar-group.css +8 -3
- package/css/avatar.css +8 -3
- package/css/back-top.css +21 -1
- package/css/badge.css +21 -2
- package/css/breadcrumb.css +29 -4
- package/css/button-group.css +19 -13
- package/css/button.css +57 -11
- package/css/calendar.css +124 -2
- package/css/card.css +10 -5
- package/css/carousel.css +41 -5
- package/css/cascader.css +188 -102
- package/css/checkbox-group.css +46 -19
- package/css/checkbox.css +59 -8
- package/css/clipboard.css +7 -1
- package/css/code-block.css +17 -7
- package/css/collapsible.css +47 -2
- package/css/color-picker.css +117 -46
- package/css/combobox.css +132 -52
- package/css/composer.css +10 -3
- package/css/context-menu.css +101 -75
- package/css/countdown.css +5 -0
- package/css/date-field.css +96 -14
- package/css/date-picker.css +281 -65
- package/css/descriptions.css +7 -2
- package/css/dialog.css +109 -22
- package/css/download-trigger.css +76 -0
- package/css/drawer.css +75 -23
- package/css/dynamic-input.css +73 -17
- package/css/editable.css +17 -10
- package/css/ellipsis.css +6 -1
- package/css/empty-state.css +12 -7
- package/css/field.css +14 -6
- package/css/fieldset.css +69 -0
- package/css/file-upload.css +50 -7
- package/css/flex.css +5 -0
- package/css/float-button.css +21 -1
- package/css/floating-panel.css +310 -0
- package/css/form.css +10 -5
- package/css/gradient-text.css +5 -0
- package/css/grid.css +5 -0
- package/css/heatmap.css +410 -0
- package/css/highlight.css +6 -1
- package/css/hotkeys.css +90 -0
- package/css/hover-card.css +58 -50
- package/css/icon-wrapper.css +5 -0
- package/css/icon.css +5 -0
- package/css/image-cropper.css +231 -0
- package/css/image-viewer.css +167 -22
- package/css/image.css +7 -2
- package/css/infinite-scroll.css +6 -1
- package/css/json-viewer.css +241 -0
- package/css/layout.css +11 -10
- package/css/list.css +13 -8
- package/css/listbox.css +25 -4
- package/css/loading-bar.css +12 -1
- package/css/log.css +6 -1
- package/css/marquee.css +14 -0
- package/css/masonry.css +63 -0
- package/css/mention.css +105 -32
- package/css/menu.css +131 -46
- package/css/menubar.css +150 -66
- package/css/navigation-menu.css +59 -29
- package/css/number-animation.css +8 -3
- package/css/number-field.css +178 -16
- package/css/overlay-arrow.css +51 -0
- package/css/page-header.css +10 -5
- package/css/pagination.css +18 -13
- package/css/password-input.css +356 -0
- package/css/pin-input.css +18 -10
- package/css/popconfirm.css +73 -16
- package/css/popover.css +88 -44
- package/css/popselect.css +201 -52
- package/css/progress.css +52 -7
- package/css/qr-code.css +6 -1
- package/css/radio-group.css +19 -8
- package/css/rating.css +7 -2
- package/css/reset.css +17 -0
- package/css/result.css +11 -6
- package/css/scroll-area.css +65 -94
- package/css/scrollbar.css +167 -0
- package/css/segmented.css +215 -0
- package/css/select.css +292 -124
- package/css/separator.css +7 -2
- package/css/side-nav.css +116 -19
- package/css/signature-pad.css +144 -0
- package/css/skeleton.css +12 -1
- package/css/slider.css +15 -10
- package/css/space.css +117 -0
- package/css/spinner.css +31 -11
- package/css/splitter.css +5 -0
- package/css/statistic.css +14 -9
- package/css/steps.css +30 -8
- package/css/switch.css +62 -13
- package/css/table.css +136 -37
- package/css/tabs.css +9 -4
- package/css/tag.css +177 -0
- package/css/tags-input.css +83 -40
- package/css/text-field.css +154 -36
- package/css/thread.css +6 -1
- package/css/time-field.css +102 -16
- package/css/time-picker.css +264 -69
- package/css/time.css +5 -0
- package/css/timeline.css +15 -10
- package/css/timer.css +119 -0
- package/css/toast.css +46 -21
- package/css/toaster.css +6 -1
- package/css/toggle-group.css +5 -0
- package/css/toggle.css +11 -6
- package/css/tone.css +10 -5
- package/css/toolbar.css +6 -1
- package/css/tooltip.css +54 -38
- package/css/tour.css +128 -63
- package/css/transfer.css +73 -17
- package/css/tree-select.css +203 -83
- package/css/tree.css +90 -1
- package/css/typography.css +9 -4
- package/css/undefined.css +11 -1
- package/css/virtualizer.css +8 -1
- package/css/watermark.css +6 -2
- package/index.css +17 -1
- package/index.unlayered.css +9394 -2883
- package/package.json +19 -4
- package/css/motion.css +0 -58
package/css/tour.css
CHANGED
|
@@ -1,14 +1,47 @@
|
|
|
1
1
|
@layer xihan.motion {
|
|
2
|
-
/*
|
|
3
|
-
|
|
2
|
+
/* 动画名的查找只认「文档里有没有这个名字」:引用别处文件里的名字,那份文件不一定在场,
|
|
3
|
+
动画会静默地整个不跑。每份皮肤都能单独引入,所以它用到的关键帧都写在自己身上。 */
|
|
4
|
+
@keyframes xh-fade-in {
|
|
4
5
|
from {
|
|
5
6
|
opacity: 0;
|
|
6
|
-
translate: 0 4px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
to {
|
|
10
10
|
opacity: 1;
|
|
11
|
-
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes xh-fade-out {
|
|
15
|
+
from {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
to {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes xh-pop-in {
|
|
25
|
+
from {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
scale: var(--xh-motion-scale-enter);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
to {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
scale: 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes xh-pop-out {
|
|
37
|
+
from {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
scale: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
to {
|
|
43
|
+
opacity: 0;
|
|
44
|
+
scale: var(--xh-motion-scale-enter);
|
|
12
45
|
}
|
|
13
46
|
}
|
|
14
47
|
|
|
@@ -16,7 +49,7 @@
|
|
|
16
49
|
@keyframes xh-tour-spotlight-in {
|
|
17
50
|
from {
|
|
18
51
|
opacity: 0;
|
|
19
|
-
scale:
|
|
52
|
+
scale: calc(2 - var(--xh-motion-scale-enter));
|
|
20
53
|
}
|
|
21
54
|
|
|
22
55
|
to {
|
|
@@ -25,18 +58,32 @@
|
|
|
25
58
|
}
|
|
26
59
|
}
|
|
27
60
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
61
|
+
/* 退场反向放大淡出,与进场对称 */
|
|
62
|
+
@keyframes xh-tour-spotlight-out {
|
|
63
|
+
from {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
scale: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
to {
|
|
69
|
+
opacity: 0;
|
|
70
|
+
scale: calc(2 - var(--xh-motion-scale-enter));
|
|
32
71
|
}
|
|
33
72
|
}
|
|
34
73
|
}
|
|
35
74
|
|
|
36
75
|
@layer xihan.components {
|
|
76
|
+
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
77
|
+
[data-scope='tour'] {
|
|
78
|
+
--xh-tour-skin: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
37
81
|
/* 根节点只是几个浮层的归属容器,不参与排版。
|
|
38
82
|
这里不给 display,UA 的 [hidden]{display:none} 就仍然压得住 */
|
|
39
83
|
[data-scope='tour'][data-part='root'] {
|
|
84
|
+
/* 作者塞进指示符槽的图标跟着字号走,与皮肤画的兜底字形同一把尺 */
|
|
85
|
+
--xh-icon-size: var(--xh-tour-icon-size, var(--xh-glyph-size-text));
|
|
86
|
+
|
|
40
87
|
color: var(--xh-tour-fg, var(--xh-fg-default));
|
|
41
88
|
}
|
|
42
89
|
|
|
@@ -44,7 +91,7 @@
|
|
|
44
91
|
[data-scope='tour'][data-part='backdrop'] {
|
|
45
92
|
position: fixed;
|
|
46
93
|
inset: 0;
|
|
47
|
-
z-index: var(--xh-tour-backdrop-
|
|
94
|
+
z-index: var(--xh-tour-backdrop-layer, var(--xh-layer-modal));
|
|
48
95
|
background: var(--xh-tour-backdrop-bg, var(--xh-bg-overlay));
|
|
49
96
|
}
|
|
50
97
|
|
|
@@ -57,14 +104,14 @@
|
|
|
57
104
|
}
|
|
58
105
|
|
|
59
106
|
[data-scope='tour'][data-part='backdrop'][data-state='closed'] {
|
|
60
|
-
animation: xh-fade-out var(--xh-motion-duration-exit) var(--xh-motion-ease-exit);
|
|
107
|
+
animation: xh-fade-out var(--xh-motion-duration-exit) var(--xh-motion-ease-exit) forwards;
|
|
61
108
|
}
|
|
62
109
|
|
|
63
110
|
/* 挖洞的高亮框。位置与尺寸由连接层量出来写进内联 style(position/inset/尺寸那几条轴归它),
|
|
64
111
|
这里只管长相:一圈描边 + 一片铺满视口的投影当暗幕,中间那块因此是亮的——
|
|
65
112
|
这就是"洞"。不吃指针:它盖在目标上面,吃了的话目标就再也点不动了 */
|
|
66
113
|
[data-scope='tour'][data-part='spotlight'] {
|
|
67
|
-
z-index: var(--xh-tour-spotlight-
|
|
114
|
+
z-index: var(--xh-tour-spotlight-layer, var(--xh-layer-modal));
|
|
68
115
|
pointer-events: none;
|
|
69
116
|
border-radius: var(--xh-tour-spotlight-radius, var(--xh-shape-surface));
|
|
70
117
|
box-shadow:
|
|
@@ -86,18 +133,29 @@
|
|
|
86
133
|
animation: xh-tour-spotlight-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter);
|
|
87
134
|
}
|
|
88
135
|
|
|
136
|
+
/* 退场与气泡并行播,同一段时长;收起那一帧 hidden 由宿主押后到气泡的退场结束 */
|
|
137
|
+
[data-scope='tour'][data-part='spotlight'][data-state='closed'] {
|
|
138
|
+
animation: xh-tour-spotlight-out var(--xh-motion-duration-exit) var(--xh-motion-ease-exit) forwards;
|
|
139
|
+
}
|
|
140
|
+
|
|
89
141
|
/* 高亮框在场时遮罩让位:暗幕已经由那圈铺满视口的投影负责,
|
|
90
142
|
两层叠加会把页面压得过暗,而且洞里也会跟着变暗——洞就白挖了。
|
|
91
|
-
居中步的高亮框带 hidden
|
|
92
|
-
|
|
93
|
-
|
|
143
|
+
居中步的高亮框带 hidden,此时遮罩照常压暗(那一步本来就没有要突出的元素)。
|
|
144
|
+
两条兄弟选择器各管一个方向,谁写在前面都算数:遮罩与高亮框同为浮层落点里的兄弟,
|
|
145
|
+
不再共有 root 这个祖先 */
|
|
146
|
+
[data-scope='tour'][data-part='backdrop']:has(~ [data-scope='tour'][data-part='spotlight']:not([hidden])),
|
|
147
|
+
[data-scope='tour'][data-part='spotlight']:not([hidden]) ~ [data-scope='tour'][data-part='backdrop'] {
|
|
94
148
|
background: transparent;
|
|
95
149
|
}
|
|
96
150
|
|
|
97
151
|
/* 空壳不吃指针,交互只发生在 content 上。
|
|
98
152
|
锚定步的坐标由定位引擎写进内联 style,这里不碰那两条轴 */
|
|
99
153
|
[data-scope='tour'][data-part='positioner'] {
|
|
100
|
-
|
|
154
|
+
/* 落定那一侧的可用高度,由定位引擎经内联自定义属性写进来,气泡继承它限高;
|
|
155
|
+
居中步与尚未落位时不额外限高 */
|
|
156
|
+
--xh-_tour-available-h: 100vh;
|
|
157
|
+
|
|
158
|
+
z-index: var(--xh-tour-positioner-layer, var(--xh-layer-popover));
|
|
101
159
|
pointer-events: none;
|
|
102
160
|
}
|
|
103
161
|
|
|
@@ -122,21 +180,22 @@
|
|
|
122
180
|
flex-direction: column;
|
|
123
181
|
gap: var(--xh-tour-gap, var(--xh-space-2));
|
|
124
182
|
inline-size: max-content;
|
|
125
|
-
max-inline-size: var(--xh-tour-max-w,
|
|
126
|
-
padding-block: var(--xh-tour-py, var(--xh-
|
|
127
|
-
padding-inline: var(--xh-tour-px, var(--xh-
|
|
183
|
+
max-inline-size: var(--xh-tour-max-w, var(--xh-overlay-max-w-lg));
|
|
184
|
+
padding-block: var(--xh-tour-py, var(--xh-surface-py-md));
|
|
185
|
+
padding-inline: var(--xh-tour-px, var(--xh-surface-px-md));
|
|
186
|
+
/* 引导步骤的正文长度由作者定,矮视口下不限高气泡会整块伸出视口 */
|
|
187
|
+
max-block-size: min(var(--xh-tour-max-h, var(--xh-overlay-max-h)), var(--xh-_tour-available-h));
|
|
128
188
|
border: var(--xh-stroke-thin) solid var(--xh-tour-border, var(--xh-border-default));
|
|
129
189
|
border-radius: var(--xh-tour-radius, var(--xh-shape-surface));
|
|
130
190
|
background: var(--xh-tour-bg, var(--xh-bg-surface));
|
|
131
191
|
color: var(--xh-tour-fg, var(--xh-fg-default));
|
|
132
|
-
box-shadow: var(--xh-tour-shadow, var(--xh-elevation-
|
|
192
|
+
box-shadow: var(--xh-tour-shadow, var(--xh-elevation-sheet));
|
|
133
193
|
pointer-events: auto;
|
|
134
194
|
}
|
|
135
195
|
|
|
136
|
-
/*
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
196
|
+
/* 这里刻意没有 [data-part='content'][hidden] { display: none },与 popover 一致:
|
|
197
|
+
收起态连接层会给 content 打 hidden,补上这条退场动画就一帧都播不出来。
|
|
198
|
+
真正的收起由退场闸门落成内联 display,节点始终留在原地。 */
|
|
140
199
|
|
|
141
200
|
/* 焦点落在气泡本身(Enter/Space 归"下一步"管),但它是纯容器,不画焦点环 */
|
|
142
201
|
[data-scope='tour'][data-part='content']:focus-visible {
|
|
@@ -144,7 +203,13 @@
|
|
|
144
203
|
}
|
|
145
204
|
|
|
146
205
|
[data-scope='tour'][data-part='content'][data-state='open'] {
|
|
147
|
-
animation: xh-
|
|
206
|
+
animation: xh-pop-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* 退场:收起那一帧 hidden 由退场闸门押后,这里才播得出来。forwards 把末态钉住,
|
|
210
|
+
免得动画结束到收起落下来之间闪一下原样 */
|
|
211
|
+
[data-scope='tour'][data-part='content'][data-state='closed'] {
|
|
212
|
+
animation: xh-pop-out var(--xh-motion-duration-exit) var(--xh-motion-ease-exit) forwards;
|
|
148
213
|
}
|
|
149
214
|
|
|
150
215
|
[data-scope='tour'][data-part='title'] {
|
|
@@ -158,7 +223,7 @@
|
|
|
158
223
|
否则长标题会直接钻到按钮底下。只在真有关闭按钮时让位。 */
|
|
159
224
|
[data-scope='tour'][data-part='content']:has([data-scope='tour'][data-part='close-trigger'])
|
|
160
225
|
[data-scope='tour'][data-part='title'] {
|
|
161
|
-
padding-inline-end: calc(var(--xh-control-h-sm) + var(--xh-space-2));
|
|
226
|
+
padding-inline-end: calc(var(--xh-tour-close-size, var(--xh-control-h-sm)) + var(--xh-space-2));
|
|
162
227
|
}
|
|
163
228
|
|
|
164
229
|
[data-scope='tour'][data-part='description'] {
|
|
@@ -170,7 +235,7 @@
|
|
|
170
235
|
|
|
171
236
|
/* "第 m 步,共 n 步":辅助信息,字号压一档,与按钮排在同一行的两端 */
|
|
172
237
|
[data-scope='tour'][data-part='progress-text'] {
|
|
173
|
-
font-size: var(--xh-tour-progress-font-size, var(--xh-
|
|
238
|
+
font-size: var(--xh-tour-progress-font-size, var(--xh-text-caption-size));
|
|
174
239
|
color: var(--xh-tour-progress-fg, var(--xh-fg-subtle));
|
|
175
240
|
}
|
|
176
241
|
|
|
@@ -184,7 +249,7 @@
|
|
|
184
249
|
padding-inline: var(--xh-control-px-md);
|
|
185
250
|
border: var(--xh-stroke-thin) solid transparent;
|
|
186
251
|
border-radius: var(--xh-shape-control);
|
|
187
|
-
font-size: var(--xh-
|
|
252
|
+
font-size: var(--xh-text-secondary-size);
|
|
188
253
|
cursor: pointer;
|
|
189
254
|
}
|
|
190
255
|
|
|
@@ -234,13 +299,16 @@
|
|
|
234
299
|
display: inline-flex;
|
|
235
300
|
align-items: center;
|
|
236
301
|
justify-content: center;
|
|
237
|
-
block-size: var(--xh-control-h-sm);
|
|
238
|
-
inline-size: var(--xh-control-h-sm);
|
|
302
|
+
block-size: var(--xh-tour-close-size, var(--xh-control-h-sm));
|
|
303
|
+
inline-size: var(--xh-tour-close-size, var(--xh-control-h-sm));
|
|
239
304
|
border: 0;
|
|
240
|
-
border-radius: var(--xh-shape-control);
|
|
305
|
+
border-radius: var(--xh-tour-close-radius, var(--xh-shape-control));
|
|
241
306
|
background: transparent;
|
|
242
307
|
color: var(--xh-fg-muted);
|
|
243
308
|
cursor: pointer;
|
|
309
|
+
transition:
|
|
310
|
+
background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
311
|
+
scale var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
244
312
|
}
|
|
245
313
|
|
|
246
314
|
[data-scope='tour'][data-part='close-trigger'][hidden] {
|
|
@@ -248,10 +316,15 @@
|
|
|
248
316
|
}
|
|
249
317
|
|
|
250
318
|
[data-scope='tour'][data-part='close-trigger']:hover {
|
|
251
|
-
background: var(--xh-bg-subtle);
|
|
319
|
+
background: var(--xh-tour-close-bg-hover, var(--xh-bg-subtle-hover));
|
|
252
320
|
color: var(--xh-fg-default);
|
|
253
321
|
}
|
|
254
322
|
|
|
323
|
+
[data-scope='tour'][data-part='close-trigger']:active {
|
|
324
|
+
background: var(--xh-tour-close-bg-active, var(--xh-bg-subtle-active));
|
|
325
|
+
scale: var(--xh-motion-scale-press);
|
|
326
|
+
}
|
|
327
|
+
|
|
255
328
|
[data-scope='tour'][data-part='prev-trigger']:focus-visible,
|
|
256
329
|
[data-scope='tour'][data-part='next-trigger']:focus-visible,
|
|
257
330
|
[data-scope='tour'][data-part='skip-trigger']:focus-visible,
|
|
@@ -260,50 +333,42 @@
|
|
|
260
333
|
outline-offset: var(--xh-ring-offset);
|
|
261
334
|
}
|
|
262
335
|
|
|
263
|
-
/*
|
|
264
|
-
|
|
336
|
+
/* 箭头的底色与描边色,几何在 overlay-arrow.css。
|
|
337
|
+
交叉轴落点由定位引擎经内联自定义属性写进来,没给时退回居中 */
|
|
265
338
|
[data-scope='tour'][data-part='arrow'] {
|
|
266
|
-
--xh-_tour-arrow-size: var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size));
|
|
267
339
|
--xh-_tour-arrow-x: 50%;
|
|
268
340
|
--xh-_tour-arrow-y: 50%;
|
|
341
|
+
--xh-_overlay-arrow-size: var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size));
|
|
342
|
+
--xh-_overlay-arrow-x: var(--xh-_tour-arrow-x);
|
|
343
|
+
--xh-_overlay-arrow-y: var(--xh-_tour-arrow-y);
|
|
269
344
|
|
|
270
|
-
position: absolute;
|
|
271
|
-
inline-size: var(--xh-_tour-arrow-size);
|
|
272
|
-
block-size: var(--xh-_tour-arrow-size);
|
|
273
345
|
background: var(--xh-tour-bg, var(--xh-bg-surface));
|
|
274
346
|
border: var(--xh-stroke-thin) solid var(--xh-tour-border, var(--xh-border-default));
|
|
275
|
-
rotate: 45deg;
|
|
276
347
|
}
|
|
277
348
|
|
|
349
|
+
/* 居中步没有锚点,连接层会给箭头发 hidden */
|
|
278
350
|
[data-scope='tour'][data-part='arrow'][hidden] {
|
|
279
351
|
display: none;
|
|
280
352
|
}
|
|
281
353
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
border-block-start: 0;
|
|
293
|
-
border-inline-start: 0;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
[data-scope='tour'][data-part='arrow'][data-placement^='right'] {
|
|
297
|
-
inset-inline-start: calc(var(--xh-_tour-arrow-size) / -2);
|
|
298
|
-
inset-block-start: calc(var(--xh-_tour-arrow-y) - var(--xh-_tour-arrow-size) / 2);
|
|
299
|
-
border-block-start: 0;
|
|
300
|
-
border-inline-end: 0;
|
|
354
|
+
/* 没写内容就由皮肤画兜底字形;作者往部件里塞了自己的图形,这几条即不命中 */
|
|
355
|
+
[data-scope='tour'][data-part='close-trigger']:empty::before {
|
|
356
|
+
content: '';
|
|
357
|
+
display: inline-block;
|
|
358
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
359
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
360
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
361
|
+
background-color: currentColor;
|
|
362
|
+
-webkit-mask: var(--xh-glyph-mark-close) center / contain no-repeat;
|
|
363
|
+
mask: var(--xh-glyph-mark-close) center / contain no-repeat;
|
|
301
364
|
}
|
|
365
|
+
}
|
|
302
366
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
367
|
+
@layer xihan.components {
|
|
368
|
+
/* 气泡限高之后只让正文让步:标题与上下步按钮滚出视线就点不到了 */
|
|
369
|
+
[data-scope='tour'][data-part='description'] {
|
|
370
|
+
flex: 1 1 auto;
|
|
371
|
+
min-block-size: 0;
|
|
372
|
+
overflow-y: auto;
|
|
308
373
|
}
|
|
309
374
|
}
|
package/css/transfer.css
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
@layer xihan.components {
|
|
2
|
+
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
3
|
+
[data-scope='transfer'] {
|
|
4
|
+
--xh-transfer-skin: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
2
7
|
/* 三栏栅格:两侧面板各占一栏、跨两行,中间那栏上下各放一个搬运按钮,
|
|
3
8
|
两个按钮在中线处相遇。栅格的列号本身就是随书写方向走的(第 1 栏永远在行首侧),
|
|
4
9
|
dir=rtl 时整块自动镜像,不必另写一套。
|
|
5
10
|
中间那栏没有对应的角色节点(anatomy 里两个按钮是 root 的直接子节点),
|
|
6
11
|
所以只能按位置显式安放,不能靠自动流——自动流会把"往左搬"甩到右侧面板的位置上 */
|
|
7
12
|
[data-scope='transfer'][data-part='root'] {
|
|
13
|
+
/* 作者塞进指示符槽的图标跟着字号走,与皮肤画的兜底字形同一把尺 */
|
|
14
|
+
--xh-icon-size: var(--xh-transfer-icon-size, var(--xh-glyph-size-text));
|
|
15
|
+
|
|
8
16
|
display: grid;
|
|
9
17
|
grid-template-rows: 1fr 1fr;
|
|
10
18
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
@@ -79,7 +87,7 @@
|
|
|
79
87
|
[data-scope='transfer'][data-part='panel-count'] {
|
|
80
88
|
flex: none;
|
|
81
89
|
color: var(--xh-transfer-count-fg, var(--xh-fg-subtle));
|
|
82
|
-
font-size: var(--xh-transfer-count-font-size, var(--xh-
|
|
90
|
+
font-size: var(--xh-transfer-count-font-size, var(--xh-text-caption-size));
|
|
83
91
|
line-height: var(--xh-leading-none);
|
|
84
92
|
font-variant-numeric: tabular-nums;
|
|
85
93
|
}
|
|
@@ -115,12 +123,14 @@
|
|
|
115
123
|
cursor: not-allowed;
|
|
116
124
|
}
|
|
117
125
|
|
|
126
|
+
/* 两侧列表定高:高度只由这个槽给,与条目数无关。左右两块因此恒等高,
|
|
127
|
+
搬走条目、搜索筛掉条目、整侧搬空,面板都停在原地不缩。
|
|
128
|
+
flex-basis 取 auto 而不是 0,块尺寸才是这一栏真正的主轴基准 */
|
|
118
129
|
[data-scope='transfer'][data-part='list'] {
|
|
119
130
|
display: flex;
|
|
120
|
-
flex: 1;
|
|
131
|
+
flex: 1 1 auto;
|
|
121
132
|
flex-direction: column;
|
|
122
|
-
|
|
123
|
-
max-block-size: var(--xh-transfer-list-max-h, 16rem);
|
|
133
|
+
block-size: var(--xh-transfer-list-h, var(--xh-viewport-h-md));
|
|
124
134
|
padding-block: var(--xh-transfer-list-py, var(--xh-space-1));
|
|
125
135
|
padding-inline: var(--xh-transfer-list-px, var(--xh-space-1));
|
|
126
136
|
overflow: auto;
|
|
@@ -185,13 +195,13 @@
|
|
|
185
195
|
flex: none;
|
|
186
196
|
align-items: center;
|
|
187
197
|
justify-content: center;
|
|
188
|
-
inline-size: var(--xh-transfer-checkbox-size,
|
|
189
|
-
block-size: var(--xh-transfer-checkbox-size,
|
|
198
|
+
inline-size: var(--xh-transfer-checkbox-size, var(--xh-control-indicator-size));
|
|
199
|
+
block-size: var(--xh-transfer-checkbox-size, var(--xh-control-indicator-size));
|
|
190
200
|
border: var(--xh-stroke-thin) solid var(--xh-transfer-checkbox-border, var(--xh-border-control));
|
|
191
|
-
border-radius: var(--xh-transfer-checkbox-radius, var(--xh-
|
|
201
|
+
border-radius: var(--xh-transfer-checkbox-radius, var(--xh-shape-inset));
|
|
192
202
|
background: var(--xh-transfer-checkbox-bg, var(--xh-bg-canvas));
|
|
193
203
|
color: var(--xh-transfer-checkbox-fg, var(--xh-fg-on-brand));
|
|
194
|
-
font-size: var(--xh-transfer-checkbox-font-size,
|
|
204
|
+
font-size: var(--xh-transfer-checkbox-font-size, calc(var(--xh-control-indicator-size) * 0.75));
|
|
195
205
|
line-height: var(--xh-leading-none);
|
|
196
206
|
transition:
|
|
197
207
|
background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
@@ -206,24 +216,47 @@
|
|
|
206
216
|
|
|
207
217
|
/* 勾中即填色。全选格三态里 all 与 some 都算"有值",与条目共用同一副填色 */
|
|
208
218
|
[data-scope='transfer'][data-part='item-checkbox'][data-state='checked'],
|
|
209
|
-
[data-scope='transfer'][data-part='select-all-trigger']:is([data-state='
|
|
219
|
+
[data-scope='transfer'][data-part='select-all-trigger']:is([data-state='checked'], [data-state='indeterminate'])::before {
|
|
210
220
|
border-color: var(--xh-transfer-checkbox-border-checked, var(--xh-bg-brand));
|
|
211
221
|
background: var(--xh-transfer-checkbox-bg-checked, var(--xh-bg-brand));
|
|
212
222
|
}
|
|
213
223
|
|
|
214
|
-
/*
|
|
215
|
-
|
|
216
|
-
|
|
224
|
+
/* 没写内容就由皮肤画勾;作者往格子里塞了自己的图形,这条规则即不命中。
|
|
225
|
+
底下两处(全选格的两态)不带这条守卫:那里的 ::before 是方框本身,
|
|
226
|
+
而触发器里装的是全选那行文字,:empty 恒不命中,加了勾号会整个消失 */
|
|
227
|
+
[data-scope='transfer'][data-part='item-checkbox'][data-state='checked']:empty::before {
|
|
228
|
+
content: '';
|
|
229
|
+
display: inline-block;
|
|
230
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
231
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
232
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
233
|
+
background-color: currentColor;
|
|
234
|
+
-webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
235
|
+
mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
217
236
|
}
|
|
218
237
|
|
|
219
238
|
/* 全选格的三态:all 打勾、some 打横杠、none 留空。
|
|
220
239
|
some 就是读屏听到的 aria-checked=mixed,两者同源,样式只认 data-state */
|
|
221
|
-
[data-scope='transfer'][data-part='select-all-trigger'][data-state='
|
|
222
|
-
content: '
|
|
240
|
+
[data-scope='transfer'][data-part='select-all-trigger'][data-state='checked']::before {
|
|
241
|
+
content: '';
|
|
242
|
+
display: inline-block;
|
|
243
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
244
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
245
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
246
|
+
background-color: currentColor;
|
|
247
|
+
-webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
248
|
+
mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
223
249
|
}
|
|
224
250
|
|
|
225
|
-
[data-scope='transfer'][data-part='select-all-trigger'][data-state='
|
|
226
|
-
content: '
|
|
251
|
+
[data-scope='transfer'][data-part='select-all-trigger'][data-state='indeterminate']::before {
|
|
252
|
+
content: '';
|
|
253
|
+
display: inline-block;
|
|
254
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
255
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
256
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
257
|
+
background-color: currentColor;
|
|
258
|
+
-webkit-mask: var(--xh-glyph-mark-minus) center / contain no-repeat;
|
|
259
|
+
mask: var(--xh-glyph-mark-minus) center / contain no-repeat;
|
|
227
260
|
}
|
|
228
261
|
|
|
229
262
|
[data-scope='transfer'][data-part='item-checkbox'][data-disabled] {
|
|
@@ -243,7 +276,7 @@
|
|
|
243
276
|
border-radius: var(--xh-transfer-select-all-radius, var(--xh-shape-control));
|
|
244
277
|
background: none;
|
|
245
278
|
color: var(--xh-transfer-select-all-fg, var(--xh-fg-muted));
|
|
246
|
-
font-size: var(--xh-transfer-select-all-font-size, var(--xh-
|
|
279
|
+
font-size: var(--xh-transfer-select-all-font-size, var(--xh-text-caption-size));
|
|
247
280
|
font-weight: var(--xh-font-weight-medium);
|
|
248
281
|
line-height: var(--xh-leading-none);
|
|
249
282
|
cursor: pointer;
|
|
@@ -317,4 +350,27 @@
|
|
|
317
350
|
[data-scope='transfer'][data-part='to-source-trigger'][hidden] {
|
|
318
351
|
display: none;
|
|
319
352
|
}
|
|
353
|
+
|
|
354
|
+
/* 没写内容就由皮肤画兜底字形;作者往部件里塞了自己的图形,这几条即不命中 */
|
|
355
|
+
[data-scope='transfer'][data-part='to-source-trigger']:empty::before {
|
|
356
|
+
content: '';
|
|
357
|
+
display: inline-block;
|
|
358
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
359
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
360
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
361
|
+
background-color: currentColor;
|
|
362
|
+
-webkit-mask: var(--xh-glyph-mark-chevron-left) center / contain no-repeat;
|
|
363
|
+
mask: var(--xh-glyph-mark-chevron-left) center / contain no-repeat;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
[data-scope='transfer'][data-part='to-target-trigger']:empty::before {
|
|
367
|
+
content: '';
|
|
368
|
+
display: inline-block;
|
|
369
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
370
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
371
|
+
vertical-align: var(--xh-glyph-baseline-shift);
|
|
372
|
+
background-color: currentColor;
|
|
373
|
+
-webkit-mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
374
|
+
mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
375
|
+
}
|
|
320
376
|
}
|