@xihan-ui/styles 2.0.0 → 3.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/CHANGELOG.md +1328 -0
- package/README.md +6 -1
- package/component-tokens.d.ts +505 -111
- package/components.tokens.json +34750 -26291
- package/css/accordion.css +39 -13
- package/css/alert.css +61 -3
- package/css/anchor.css +49 -11
- package/css/approval.css +124 -84
- package/css/avatar-group.css +1 -1
- package/css/avatar.css +13 -5
- package/css/back-top.css +63 -44
- package/css/badge.css +63 -13
- package/css/bar-code.css +1 -1
- package/css/breadcrumb.css +63 -4
- package/css/button-group.css +5 -5
- package/css/button.css +69 -21
- package/css/calendar-picker.css +27 -8
- package/css/calendar-range-picker.css +48 -11
- package/css/card.css +116 -2
- package/css/carousel.css +153 -48
- package/css/cartesian-chart.css +830 -0
- package/css/cascader.css +184 -70
- package/css/checkbox-group.css +69 -99
- package/css/checkbox.css +21 -54
- package/css/citation.css +470 -0
- package/css/clipboard.css +23 -66
- package/css/code-view.css +103 -8
- package/css/collapsible.css +37 -11
- package/css/color-field.css +18 -0
- package/css/color-picker.css +57 -62
- package/css/color-slider.css +26 -19
- package/css/color-swatch-picker.css +8 -6
- package/css/combobox.css +82 -37
- package/css/command.css +48 -48
- package/css/context-menu.css +43 -28
- package/css/date-field.css +23 -0
- package/css/date-picker.css +57 -24
- package/css/date-range-picker.css +301 -14
- package/css/description.css +17 -1
- package/css/descriptions.css +43 -1
- package/css/dialog.css +99 -43
- package/css/diff-view.css +101 -16
- package/css/download-trigger.css +46 -80
- package/css/drawer.css +168 -133
- package/css/editable.css +19 -0
- package/css/empty-state.css +8 -7
- package/css/field-array.css +36 -0
- package/css/field.css +17 -19
- package/css/fieldset.css +1 -1
- package/css/file-upload.css +126 -136
- package/css/flex.css +324 -8
- package/css/float-button.css +168 -41
- package/css/floating-panel.css +59 -27
- package/css/form.css +26 -20
- package/css/funnel-chart.css +106 -0
- package/css/graph-chart.css +205 -0
- package/css/grid-list.css +235 -0
- package/css/grid.css +252 -1
- package/css/heatmap.css +119 -36
- package/css/hierarchy-chart.css +298 -0
- package/css/hover-card.css +33 -18
- package/css/icon.css +100 -0
- package/css/image-cropper.css +34 -8
- package/css/image-viewer.css +169 -26
- package/css/image.css +23 -4
- package/css/infinite-scroll.css +2 -2
- package/css/input-group.css +13 -15
- package/css/json-viewer.css +55 -7
- package/css/kbd.css +1 -1
- package/css/layout.css +71 -21
- package/css/liquid.css +106 -0
- package/css/list.css +2 -2
- package/css/listbox.css +72 -23
- package/css/loading-bar.css +27 -13
- package/css/log.css +131 -35
- package/css/markdown-stream.css +1 -1
- package/css/marquee.css +163 -7
- package/css/matrix-code.css +1 -1
- package/css/mention.css +35 -21
- package/css/menu.css +40 -28
- package/css/menubar.css +42 -28
- package/css/message-feed.css +174 -53
- package/css/navigation-menu.css +177 -18
- package/css/notification.css +431 -110
- package/css/number-field.css +22 -0
- package/css/page-header.css +4 -2
- package/css/pagination.css +129 -29
- package/css/password-input.css +40 -8
- package/css/pie-chart.css +247 -0
- package/css/popconfirm.css +50 -58
- package/css/popover.css +55 -21
- package/css/progress.css +308 -10
- package/css/prompt-input.css +37 -1
- package/css/question-flow.css +104 -64
- package/css/radar-chart.css +233 -0
- package/css/radio-group.css +372 -14
- package/css/rating.css +25 -27
- package/css/reasoning.css +62 -55
- package/css/reset.css +1 -1
- package/css/resizable.css +6 -1
- package/css/sankey-chart.css +174 -0
- package/css/scroll-area.css +32 -0
- package/css/scrollbar.css +1 -1
- package/css/select.css +76 -59
- package/css/side-nav.css +177 -30
- package/css/signature-pad.css +23 -8
- package/css/skeleton.css +13 -14
- package/css/slider.css +39 -17
- package/css/sortable.css +38 -8
- package/css/sparkline.css +164 -0
- package/css/spinner.css +50 -22
- package/css/splitter.css +8 -2
- package/css/statistic.css +10 -0
- package/css/steps.css +257 -38
- package/css/switch.css +30 -55
- package/css/table.css +168 -128
- package/css/tabs.css +243 -31
- package/css/tag-group.css +65 -37
- package/css/tag.css +55 -14
- package/css/tags-input.css +40 -3
- package/css/text-field.css +19 -0
- package/css/time-field.css +20 -1
- package/css/time-picker.css +44 -17
- package/css/time-range-picker.css +45 -18
- package/css/timeline.css +1 -1
- package/css/toggle-group.css +8 -8
- package/css/toggle.css +6 -5
- package/css/tool-call.css +64 -56
- package/css/toolbar.css +105 -7
- package/css/tooltip.css +18 -7
- package/css/tour.css +49 -21
- package/css/transfer.css +104 -81
- package/css/tree-select.css +235 -58
- package/css/tree.css +240 -147
- package/css/truncate.css +55 -12
- package/css/typography.css +93 -0
- package/css/virtualizer.css +57 -1
- package/css/watermark.css +23 -0
- package/family/action-control.css +14 -5
- package/family/chart.css +480 -0
- package/family/check-mark.css +94 -0
- package/family/choice-card.css +97 -0
- package/family/collection-item.css +70 -27
- package/family/field-chrome.css +1 -12
- package/family/loading-ring.css +95 -0
- package/family/material.css +72 -0
- package/family/menu-choice.css +56 -0
- package/family/motion.css +208 -11
- package/family/tag-list.css +59 -0
- package/index.css +23363 -14091
- package/index.unlayered.css +23198 -13922
- package/package.json +20 -8
- package/css/gradient-text.css +0 -91
- package/css/icon-wrapper.css +0 -81
- package/css/segmented.css +0 -280
- package/css/toast.css +0 -499
package/css/tour.css
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
/* 高亮框落定时那一下呼吸:换步时视线要跟着它走,纯位移太容易被漏看 */
|
|
14
14
|
@keyframes xh-tour-spotlight-in {
|
|
15
15
|
from {
|
|
16
|
-
opacity: 0;
|
|
16
|
+
opacity: var(--xh-_enter-from-opacity, 0);
|
|
17
17
|
scale: calc(2 - var(--xh-motion-scale-enter));
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
display: none;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
[data-scope='tour'][data-part='backdrop'][data-state='open'] {
|
|
73
|
+
[data-scope='tour'][data-part='backdrop'][data-state='open']:not([data-instant]) {
|
|
74
74
|
animation: xh-fade-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter);
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -94,13 +94,23 @@
|
|
|
94
94
|
box-shadow:
|
|
95
95
|
0 0 0 var(--xh-stroke-thick) var(--xh-tour-spotlight-ring, var(--xh-ring-focus)),
|
|
96
96
|
0 0 0 100vmax var(--xh-_tour-spotlight-shroud);
|
|
97
|
-
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* 换步那一段(data-animating):聚光框与气泡同一段时长、同一条曲线一起滑到下一个目标,视线跟得上;
|
|
100
|
+
页面滚动与视口缩放时不挂,两者跟手、不拖尾。坐标由连接层按物理 left / top 写进内联,过渡跟着写物理轴 */
|
|
101
|
+
[data-scope='tour'][data-part='spotlight'][data-animating] {
|
|
98
102
|
transition:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
inline-size var(--xh-motion-duration-
|
|
102
|
-
block-size var(--xh-motion-duration-
|
|
103
|
-
border-radius var(--xh-motion-duration-
|
|
103
|
+
left var(--xh-motion-duration-move) var(--xh-motion-ease-continuous),
|
|
104
|
+
top var(--xh-motion-duration-move) var(--xh-motion-ease-continuous),
|
|
105
|
+
inline-size var(--xh-motion-duration-move) var(--xh-motion-ease-continuous),
|
|
106
|
+
block-size var(--xh-motion-duration-move) var(--xh-motion-ease-continuous),
|
|
107
|
+
border-radius var(--xh-motion-duration-move) var(--xh-motion-ease-continuous);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-scope='tour'][data-part='positioner'][data-animating] {
|
|
111
|
+
transition:
|
|
112
|
+
left var(--xh-motion-duration-move) var(--xh-motion-ease-continuous),
|
|
113
|
+
top var(--xh-motion-duration-move) var(--xh-motion-ease-continuous);
|
|
104
114
|
}
|
|
105
115
|
|
|
106
116
|
[data-scope='tour'][data-part='spotlight'][data-dimmed] {
|
|
@@ -111,7 +121,7 @@
|
|
|
111
121
|
display: none;
|
|
112
122
|
}
|
|
113
123
|
|
|
114
|
-
[data-scope='tour'][data-part='spotlight'][data-state='open'] {
|
|
124
|
+
[data-scope='tour'][data-part='spotlight'][data-state='open']:not([data-instant]) {
|
|
115
125
|
animation: xh-tour-spotlight-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
|
|
116
126
|
}
|
|
117
127
|
|
|
@@ -191,7 +201,7 @@
|
|
|
191
201
|
padding-inline: var(--xh-tour-px, var(--xh-surface-px-md));
|
|
192
202
|
/* 引导步骤的正文长度由作者定,矮视口下不限高气泡会整块伸出视口 */
|
|
193
203
|
max-block-size: min(var(--xh-tour-max-h, var(--xh-overlay-max-h)), var(--xh-_tour-available-h));
|
|
194
|
-
/* M4 sheet
|
|
204
|
+
/* M4 sheet 三件套,与 dialog 同源:1px 描边是它的边界,不透明底,影只是加成 */
|
|
195
205
|
border: var(--xh-stroke-thin) solid var(--xh-tour-border, var(--xh-material-elevated-border));
|
|
196
206
|
border-radius: var(--xh-tour-radius, var(--xh-shape-overlay));
|
|
197
207
|
background: var(--xh-tour-bg, var(--xh-material-elevated-bg));
|
|
@@ -209,10 +219,9 @@
|
|
|
209
219
|
/* 焦点落在气泡本身,Enter / Space 落在它身上推进下一步:它是可操作目标,
|
|
210
220
|
环由 focus.css 的默认内收环画,这里不另写 */
|
|
211
221
|
|
|
212
|
-
|
|
222
|
+
/* 挂载时就开着的那一段(data-instant)属于首帧,直接呈现 */
|
|
223
|
+
[data-scope='tour'][data-part='content'][data-state='open']:not([data-instant]) {
|
|
213
224
|
animation: xh-overlay-pop-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
|
|
214
|
-
/* 只在开着的这一档挂:合成层随 data-state 一起收走,收起后不再占着 */
|
|
215
|
-
will-change: opacity, scale, translate;
|
|
216
225
|
}
|
|
217
226
|
|
|
218
227
|
/* 退场:收起那一帧 hidden 由退场闸门押后,这里才播得出来。forwards 把末态钉住,
|
|
@@ -235,10 +244,10 @@
|
|
|
235
244
|
padding-inline-end: calc(var(--xh-tour-close-size, var(--xh-control-h-sm)) + var(--xh-surface-action-inset));
|
|
236
245
|
}
|
|
237
246
|
|
|
238
|
-
/*
|
|
247
|
+
/* 说明文字走说明档:13px + fg-muted */
|
|
239
248
|
[data-scope='tour'][data-part='description'] {
|
|
240
249
|
margin: 0;
|
|
241
|
-
font-size: var(--xh-text-secondary-size);
|
|
250
|
+
font-size: var(--xh-tour-description-font-size, var(--xh-text-secondary-size));
|
|
242
251
|
line-height: var(--xh-leading-normal);
|
|
243
252
|
color: var(--xh-tour-description-fg, var(--xh-fg-muted));
|
|
244
253
|
}
|
|
@@ -260,7 +269,7 @@
|
|
|
260
269
|
display: none;
|
|
261
270
|
}
|
|
262
271
|
|
|
263
|
-
/* 圆点:8px 正圆取 circle
|
|
272
|
+
/* 圆点:8px 正圆取 circle(分页点统一款),未走到的一档取中性描边色。
|
|
264
273
|
宽度与底色都随状态换,换步那一下能看出进度在推进 */
|
|
265
274
|
[data-scope='tour'][data-part='progress-dot'] {
|
|
266
275
|
inline-size: var(--xh-space-2);
|
|
@@ -268,7 +277,7 @@
|
|
|
268
277
|
border-radius: var(--xh-shape-circle);
|
|
269
278
|
background: var(--xh-tour-progress-dot-bg, var(--xh-border-default));
|
|
270
279
|
transition:
|
|
271
|
-
inline-size var(--xh-motion-duration-
|
|
280
|
+
inline-size var(--xh-motion-duration-nudge) var(--xh-motion-ease-continuous),
|
|
272
281
|
background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
273
282
|
}
|
|
274
283
|
|
|
@@ -286,7 +295,7 @@
|
|
|
286
295
|
|
|
287
296
|
/*
|
|
288
297
|
* —— 末行三颗按钮 ——
|
|
289
|
-
* 上一步 / 下一步 /
|
|
298
|
+
* 上一步 / 下一步 / 跳过都是气泡末行的文字按钮:盒型、sm 档几何、四态面、0.97 按压并换底、粗指针命中区与
|
|
290
299
|
* 强制色由家族配方按连接层投影的 data-xh-action-variant / -size 给出。这里只把公开槽桥接到矩阵之前
|
|
291
300
|
* (使用者槽 → 形态矩阵 → 家族缺省)与几何映射;内衬与圆角槽三颗共用。
|
|
292
301
|
*/
|
|
@@ -305,7 +314,7 @@
|
|
|
305
314
|
display: none;
|
|
306
315
|
}
|
|
307
316
|
|
|
308
|
-
/* 下一步是整条引导的主线动作,显式 solid
|
|
317
|
+
/* 下一步是整条引导的主线动作,显式 solid:底、字与影三组使用者槽桥到配方 solid 列之前 */
|
|
309
318
|
[data-scope='tour'][data-part='next-trigger'] {
|
|
310
319
|
--xh-action-bg-rest: var(--xh-tour-next-bg, var(--xh-_action-variant-bg-rest));
|
|
311
320
|
--xh-action-bg-hover: var(--xh-tour-next-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
@@ -324,7 +333,7 @@
|
|
|
324
333
|
}
|
|
325
334
|
|
|
326
335
|
/*
|
|
327
|
-
*
|
|
336
|
+
* 关闭钮是气泡角落的单图标钮:正方盒、sm 档几何、ghost 四态面、0.97 按压并换底与粗指针命中区
|
|
328
337
|
* 由家族配方给出——白面上走画布承载阶梯悬停 --xh-bg-subtle(100)→ 按下 --xh-bg-subtle-hover(200),
|
|
329
338
|
* 焦点面透明吃库环。这里只把公开槽桥接到矩阵之前(使用者槽 → 形态矩阵 → 家族缺省)与摆放;
|
|
330
339
|
* 静息前景取 muted 字色,悬停 / 按下 / 聚焦回到 fg-default。
|
|
@@ -383,7 +392,7 @@
|
|
|
383
392
|
|
|
384
393
|
@layer xihan.components {
|
|
385
394
|
/* 气泡限高之后只让正文让步:标题与上下步按钮滚出视线就点不到了。
|
|
386
|
-
|
|
395
|
+
模态气泡里的原生细条滚动面:细条由 reset 层统一给,滚到头不把页面一起带走;内容高度不动态变化,不写 gutter */
|
|
387
396
|
[data-scope='tour'][data-part='description'] {
|
|
388
397
|
flex: 1 1 auto;
|
|
389
398
|
min-block-size: 0;
|
|
@@ -408,4 +417,23 @@
|
|
|
408
417
|
display: none;
|
|
409
418
|
}
|
|
410
419
|
}
|
|
420
|
+
|
|
421
|
+
@media (forced-colors: active) {
|
|
422
|
+
/* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
|
|
423
|
+
字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
|
|
424
|
+
按钮面上取 ButtonText,悬停与按下时家族把按钮涂成 Highlight、字形换 HighlightText;
|
|
425
|
+
禁用取 GrayText */
|
|
426
|
+
[data-scope='tour'][data-part='close-trigger']:empty::before {
|
|
427
|
+
forced-color-adjust: none;
|
|
428
|
+
background-color: ButtonText;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
[data-scope='tour'][data-part='close-trigger']:not([data-disabled]):not([data-loading]):is(:hover, :active, [data-pressed]):empty::before {
|
|
432
|
+
background-color: HighlightText;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
[data-scope='tour'][data-part='close-trigger'][data-disabled]:empty::before {
|
|
436
|
+
background-color: GrayText;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
411
439
|
}
|
package/css/transfer.css
CHANGED
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
/* 定义 transfer 样式。 */
|
|
7
7
|
|
|
8
8
|
@import '../family/action-control.css';
|
|
9
|
+
@import '../family/check-mark.css';
|
|
9
10
|
@import '../family/collection-item.css';
|
|
11
|
+
@import '../family/field-chrome.css';
|
|
12
|
+
@import '../family/loading-ring.css';
|
|
13
|
+
@import '../family/motion.css';
|
|
10
14
|
|
|
11
15
|
@layer xihan.components {
|
|
12
16
|
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
@@ -22,14 +26,15 @@
|
|
|
22
26
|
所以只能按位置显式安放,不能靠自动流——自动流会把"往回搬"甩到目标面板的位置上 */
|
|
23
27
|
[data-scope='transfer'][data-part='root'] {
|
|
24
28
|
/* 条目外的字形(空态占位里作者塞的图标)按档取尺,缺省 md;条目内的字形由家族随 data-xh-collection-size
|
|
25
|
-
下发,搬运钮内的按 Action Control icon
|
|
29
|
+
下发,搬运钮内的按 Action Control icon 档取,勾选格里的勾按边长比例取 */
|
|
26
30
|
--xh-icon-size: var(--xh-transfer-icon-size, var(--xh-glyph-size-md));
|
|
27
|
-
/*
|
|
31
|
+
/* 两侧定高小列表的自绘条挂在根上:根是条子的定位盒(面板不定位),轨道底色关掉才不会在列表边缘糊出一条灰带 */
|
|
28
32
|
--xh-scrollbar-track-bg: transparent;
|
|
29
33
|
|
|
30
|
-
/*
|
|
34
|
+
/* 尺寸档只换这六个私有槽,面板头、搜索框、条目与勾选格都从 root 继承它们,
|
|
31
35
|
换档不必给每个部件各写一条选择器 */
|
|
32
36
|
--xh-_transfer-item-py: var(--xh-list-option-py-md);
|
|
37
|
+
--xh-_transfer-h: var(--xh-control-h-md);
|
|
33
38
|
--xh-_transfer-px: var(--xh-control-px-md);
|
|
34
39
|
--xh-_transfer-gap: var(--xh-control-gap-md);
|
|
35
40
|
--xh-_transfer-font-size: var(--xh-control-font-md);
|
|
@@ -53,6 +58,7 @@
|
|
|
53
58
|
[data-scope='transfer'][data-part='root'][data-size='sm'] {
|
|
54
59
|
--xh-icon-size: var(--xh-transfer-icon-size, var(--xh-glyph-size-sm));
|
|
55
60
|
--xh-_transfer-item-py: var(--xh-list-option-py-sm);
|
|
61
|
+
--xh-_transfer-h: var(--xh-control-h-sm);
|
|
56
62
|
--xh-_transfer-px: var(--xh-control-px-sm);
|
|
57
63
|
--xh-_transfer-gap: var(--xh-control-gap-sm);
|
|
58
64
|
--xh-_transfer-font-size: var(--xh-control-font-sm);
|
|
@@ -62,6 +68,7 @@
|
|
|
62
68
|
[data-scope='transfer'][data-part='root'][data-size='lg'] {
|
|
63
69
|
--xh-icon-size: var(--xh-transfer-icon-size, var(--xh-glyph-size-lg));
|
|
64
70
|
--xh-_transfer-item-py: var(--xh-list-option-py-lg);
|
|
71
|
+
--xh-_transfer-h: var(--xh-control-h-lg);
|
|
65
72
|
--xh-_transfer-px: var(--xh-control-px-lg);
|
|
66
73
|
--xh-_transfer-gap: var(--xh-control-gap-lg);
|
|
67
74
|
--xh-_transfer-font-size: var(--xh-control-font-lg);
|
|
@@ -140,7 +147,7 @@
|
|
|
140
147
|
min-inline-size: 0;
|
|
141
148
|
overflow: hidden;
|
|
142
149
|
color: var(--xh-transfer-panel-title-fg, var(--xh-fg-default));
|
|
143
|
-
/* 面板标头是 Surface 内的标题:14 / 600
|
|
150
|
+
/* 面板标头是 Surface 内的标题:14 / 600 */
|
|
144
151
|
font-size: var(--xh-transfer-panel-title-font-size, var(--xh-text-label-size));
|
|
145
152
|
font-weight: var(--xh-transfer-panel-title-font-weight, var(--xh-font-weight-semibold));
|
|
146
153
|
line-height: var(--xh-leading-none);
|
|
@@ -163,19 +170,32 @@
|
|
|
163
170
|
content: attr(data-checked-count) ' / ' attr(data-count);
|
|
164
171
|
}
|
|
165
172
|
|
|
173
|
+
/* 面板内嵌的搜索框:通栏一行,控件高与字号随尺寸档,只画一道面内分隔的下划线(取面材质的分隔令牌);
|
|
174
|
+
重置与占位前景由字段家族按 data-xh-field-input 给 */
|
|
166
175
|
[data-scope='transfer'][data-part='search'] {
|
|
176
|
+
--xh-field-placeholder-fg: var(--xh-transfer-placeholder-fg, var(--xh-fg-subtle));
|
|
177
|
+
/* 自动填充铺的底取所在面板的面,不取画布:否则框内比周围亮出(或暗出)一块 */
|
|
178
|
+
--xh-field-autofill-bg: var(--xh-bg-surface);
|
|
179
|
+
|
|
167
180
|
display: block;
|
|
181
|
+
flex: none;
|
|
168
182
|
inline-size: 100%;
|
|
169
|
-
block-size: var(--xh-transfer-search-h, var(--xh-
|
|
183
|
+
block-size: var(--xh-transfer-search-h, var(--xh-_transfer-h));
|
|
184
|
+
padding-block: 0;
|
|
170
185
|
padding-inline: var(--xh-transfer-search-px, var(--xh-_transfer-px));
|
|
171
186
|
border: 0;
|
|
172
|
-
border-block-end: var(--xh-stroke-thin) solid var(--xh-transfer-search-border, var(--xh-
|
|
187
|
+
border-block-end: var(--xh-stroke-thin) solid var(--xh-transfer-search-border, var(--xh-material-solid-separator));
|
|
173
188
|
background: var(--xh-transfer-search-bg, transparent);
|
|
174
189
|
color: var(--xh-transfer-search-fg, var(--xh-fg-default));
|
|
175
190
|
font: inherit;
|
|
176
191
|
font-size: var(--xh-transfer-search-font-size, var(--xh-_transfer-font-size));
|
|
177
192
|
}
|
|
178
193
|
|
|
194
|
+
/* 聚焦不画环:插入符就是焦点指示。框没有外壳,全局那圈键盘焦点环只会压在通栏一行上 */
|
|
195
|
+
[data-scope='transfer'][data-part='search']:focus-visible {
|
|
196
|
+
outline: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
179
199
|
/* 单体控件的禁用是原生 disabled,样式只能写 :disabled;集合条目才读 data-disabled */
|
|
180
200
|
[data-scope='transfer'][data-part='search']:disabled {
|
|
181
201
|
color: var(--xh-fg-disabled);
|
|
@@ -193,6 +213,38 @@
|
|
|
193
213
|
padding-block: var(--xh-transfer-list-py, var(--xh-space-1));
|
|
194
214
|
padding-inline: var(--xh-transfer-list-px, var(--xh-space-1));
|
|
195
215
|
overflow: auto;
|
|
216
|
+
transition: opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* 刷新:这一侧已有条目时后台在取,保留上一帧,列表按 micro 淡下,数据到了再淡回;在途占位此时让位 */
|
|
220
|
+
[data-scope='transfer'][data-part='list'][aria-busy='true'] {
|
|
221
|
+
opacity: var(--xh-state-disabled-opacity);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Virtualizer viewport 才是真正的滚动层。此时 list 只负责 Transfer 的定高,
|
|
225
|
+
不再用内边距和自身滚动制造第二个窗口;viewport 铺满整块内容区,
|
|
226
|
+
贴着它量出的自绘滚动条也就从列表顶一直落到列表底。 */
|
|
227
|
+
[data-scope='transfer'][data-part='list'][data-xh-virtualized] {
|
|
228
|
+
gap: 0;
|
|
229
|
+
min-block-size: 0;
|
|
230
|
+
padding: 0;
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* Vue / React 的 virtualizer root 在 list 外,下面第一条只命中 viewport;
|
|
235
|
+
Web Components 的 Light DOM root 在 list 内,两条一起命中。
|
|
236
|
+
Web 作者把 xh-virtualizer 宿主设为 display: contents 后,root 会直接参与 list 的 flex 排布。 */
|
|
237
|
+
[data-scope='transfer'][data-part='list'][data-xh-virtualized]
|
|
238
|
+
[data-scope='virtualizer'][data-part='root'] {
|
|
239
|
+
flex: 1 1 auto;
|
|
240
|
+
min-block-size: 0;
|
|
241
|
+
block-size: 100%;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
[data-scope='transfer'][data-part='list'][data-xh-virtualized]
|
|
245
|
+
[data-scope='virtualizer'][data-part='viewport'] {
|
|
246
|
+
min-block-size: 0;
|
|
247
|
+
block-size: 100%;
|
|
196
248
|
}
|
|
197
249
|
|
|
198
250
|
/* 焦点在列表外时容器自己进 Tab 序列兜底,落焦不画环:高亮永远长在条目上 */
|
|
@@ -207,7 +259,7 @@
|
|
|
207
259
|
flex: none;
|
|
208
260
|
padding-block: var(--xh-transfer-empty-py, var(--xh-space-3));
|
|
209
261
|
padding-inline: var(--xh-transfer-empty-px, var(--xh-_transfer-px));
|
|
210
|
-
color: var(--xh-transfer-empty-fg, var(--xh-fg-
|
|
262
|
+
color: var(--xh-transfer-empty-fg, var(--xh-fg-muted));
|
|
211
263
|
font-size: var(--xh-transfer-empty-font-size, var(--xh-_transfer-font-size));
|
|
212
264
|
line-height: var(--xh-leading-none);
|
|
213
265
|
text-align: center;
|
|
@@ -224,11 +276,14 @@
|
|
|
224
276
|
|
|
225
277
|
/* 在途占位:与空态占位同一个位置、同一副观感,两者不同屏 */
|
|
226
278
|
[data-scope='transfer'][data-part='loading'] {
|
|
227
|
-
display:
|
|
279
|
+
display: flex;
|
|
280
|
+
align-items: center;
|
|
281
|
+
justify-content: center;
|
|
282
|
+
gap: var(--xh-_transfer-gap);
|
|
228
283
|
flex: none;
|
|
229
284
|
padding-block: var(--xh-transfer-loading-py, var(--xh-space-3));
|
|
230
285
|
padding-inline: var(--xh-transfer-loading-px, var(--xh-_transfer-px));
|
|
231
|
-
color: var(--xh-transfer-loading-fg, var(--xh-fg-
|
|
286
|
+
color: var(--xh-transfer-loading-fg, var(--xh-fg-muted));
|
|
232
287
|
font-size: var(--xh-transfer-loading-font-size, var(--xh-_transfer-font-size));
|
|
233
288
|
line-height: var(--xh-leading-none);
|
|
234
289
|
text-align: center;
|
|
@@ -238,6 +293,15 @@
|
|
|
238
293
|
display: none;
|
|
239
294
|
}
|
|
240
295
|
|
|
296
|
+
/* 首次加载:文案前一枚加载环,由加载环配方画(连接层投影 data-xh-loading-ring 与 data-loading),
|
|
297
|
+
直径取所在尺寸档的图标档 */
|
|
298
|
+
[data-scope='transfer'][data-part='loading']::before {
|
|
299
|
+
content: '';
|
|
300
|
+
flex: none;
|
|
301
|
+
inline-size: var(--xh-icon-size, var(--xh-glyph-size-md));
|
|
302
|
+
block-size: var(--xh-icon-size, var(--xh-glyph-size-md));
|
|
303
|
+
}
|
|
304
|
+
|
|
241
305
|
[data-scope='transfer'][data-part='loading'][data-disabled] {
|
|
242
306
|
color: var(--xh-fg-disabled);
|
|
243
307
|
}
|
|
@@ -270,7 +334,7 @@
|
|
|
270
334
|
display: block;
|
|
271
335
|
padding-block: var(--xh-transfer-group-label-py, var(--xh-space-1));
|
|
272
336
|
padding-inline: var(--xh-transfer-group-label-px, var(--xh-_transfer-px));
|
|
273
|
-
color: var(--xh-transfer-group-label-fg, var(--xh-fg-
|
|
337
|
+
color: var(--xh-transfer-group-label-fg, var(--xh-fg-muted));
|
|
274
338
|
font-size: var(--xh-transfer-group-label-font-size, var(--xh-text-caption-size));
|
|
275
339
|
font-weight: var(--xh-transfer-group-label-font-weight, var(--xh-font-weight-medium));
|
|
276
340
|
line-height: var(--xh-leading-none);
|
|
@@ -285,7 +349,7 @@
|
|
|
285
349
|
color: var(--xh-fg-disabled);
|
|
286
350
|
}
|
|
287
351
|
|
|
288
|
-
/* 条目走 Collection Item 的 page
|
|
352
|
+
/* 条目走 Collection Item 的 page 语境(页内持久集合):悬停 / 高亮 / 按下面(白底承载 hover 100 →
|
|
289
353
|
pressed 200)与勾选行的选中面(品牌淡底 + 淡底前景,selected+hover 20% / +pressed 28%)都由家族按
|
|
290
354
|
aria-selected / aria-disabled 给出,标记由行首的勾选方框承担;禁用面(字色降级、not-allowed、不换面)
|
|
291
355
|
也归家族。这里只把公开槽映射到桥接槽。
|
|
@@ -295,7 +359,7 @@
|
|
|
295
359
|
--xh-collection-inline-padding: var(--xh-transfer-item-px, var(--xh-_transfer-px));
|
|
296
360
|
--xh-collection-gap: 0;
|
|
297
361
|
--xh-collection-font-size: var(--xh-transfer-item-font-size, var(--xh-_transfer-font-size));
|
|
298
|
-
--xh-collection-radius: var(--xh-transfer-item-radius, var(--xh-shape-
|
|
362
|
+
--xh-collection-radius: var(--xh-transfer-item-radius, var(--xh-shape-inset));
|
|
299
363
|
/* 作者的图标尺槽经桥接槽下发到条目,家族缺省按 data-xh-collection-size 取档 */
|
|
300
364
|
--xh-collection-glyph-size: var(--xh-transfer-icon-size, var(--xh-_collection-glyph-size));
|
|
301
365
|
--xh-collection-fg-rest: var(--xh-transfer-item-fg, var(--xh-fg-default));
|
|
@@ -360,7 +424,7 @@
|
|
|
360
424
|
font-size: var(--xh-transfer-checkbox-font-size, calc(var(--xh-_transfer-box) * 0.75));
|
|
361
425
|
line-height: var(--xh-leading-none);
|
|
362
426
|
transition:
|
|
363
|
-
background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
427
|
+
background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
364
428
|
border-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
365
429
|
}
|
|
366
430
|
|
|
@@ -383,64 +447,9 @@
|
|
|
383
447
|
--xh-_ring-color: currentColor;
|
|
384
448
|
}
|
|
385
449
|
|
|
386
|
-
/*
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
content: '';
|
|
390
|
-
display: inline-block;
|
|
391
|
-
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
392
|
-
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
393
|
-
vertical-align: var(--xh-glyph-baseline-shift);
|
|
394
|
-
background-color: currentColor;
|
|
395
|
-
-webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
396
|
-
mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/* 全选格的三态:all 打勾、some 打横杠、none 留空。
|
|
400
|
-
some 就是读屏听到的 aria-checked=mixed,两者同源,样式只认 data-state。
|
|
401
|
-
|
|
402
|
-
字形走 ::after 而不是画方框的那颗 ::before:mask 会把所在元素的描边与底色一并裁成
|
|
403
|
-
字形的轮廓,写在 ::before 上就等于把方框本身裁没了,只剩一枚白勾。条目那一侧是
|
|
404
|
-
真实节点当方框、它的 ::before 当字形的两层结构,这里没有第二个节点,只能用
|
|
405
|
-
第二个伪元素补上那一层。
|
|
406
|
-
方框是行首那颗 ::before、宽度即勾选格尺寸,所以字形按「盒与字形的宽度差之半」
|
|
407
|
-
内推即落在圆心;纵向靠 inset-block: 0 + margin-block: auto 居中。
|
|
408
|
-
font-size 与 ::before 同值,--xh-icon-size 的 1em 兜底才和条目那侧量得一样大 */
|
|
409
|
-
[data-scope='transfer'][data-part='select-all-trigger'][data-state='checked']::after {
|
|
410
|
-
content: '';
|
|
411
|
-
position: absolute;
|
|
412
|
-
inset-block: 0;
|
|
413
|
-
inset-inline-start: 0;
|
|
414
|
-
margin-block: auto;
|
|
415
|
-
margin-inline-start: calc(
|
|
416
|
-
(var(--xh-transfer-checkbox-size, var(--xh-_transfer-box)) - var(--xh-icon-size, var(--xh-glyph-size-text))) /
|
|
417
|
-
2
|
|
418
|
-
);
|
|
419
|
-
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
420
|
-
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
421
|
-
background-color: var(--xh-transfer-checkbox-fg, var(--xh-_transfer-on-accent));
|
|
422
|
-
font-size: var(--xh-transfer-checkbox-font-size, calc(var(--xh-_transfer-box) * 0.75));
|
|
423
|
-
-webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
424
|
-
mask: var(--xh-glyph-mark-check) center / contain no-repeat;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
[data-scope='transfer'][data-part='select-all-trigger'][data-state='indeterminate']::after {
|
|
428
|
-
content: '';
|
|
429
|
-
position: absolute;
|
|
430
|
-
inset-block: 0;
|
|
431
|
-
inset-inline-start: 0;
|
|
432
|
-
margin-block: auto;
|
|
433
|
-
margin-inline-start: calc(
|
|
434
|
-
(var(--xh-transfer-checkbox-size, var(--xh-_transfer-box)) - var(--xh-icon-size, var(--xh-glyph-size-text))) /
|
|
435
|
-
2
|
|
436
|
-
);
|
|
437
|
-
inline-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
438
|
-
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
439
|
-
background-color: var(--xh-transfer-checkbox-fg, var(--xh-_transfer-on-accent));
|
|
440
|
-
font-size: var(--xh-transfer-checkbox-font-size, calc(var(--xh-_transfer-box) * 0.75));
|
|
441
|
-
-webkit-mask: var(--xh-glyph-mark-minus) center / contain no-repeat;
|
|
442
|
-
mask: var(--xh-glyph-mark-minus) center / contain no-repeat;
|
|
443
|
-
}
|
|
450
|
+
/* 格子里的勾与全选格的三态标记(all 打勾、some 打横杠、none 留空)由勾选标记配方画:常驻、按状态淡变
|
|
451
|
+
并轻缩放。条目的格子是真实节点,标记是它的 ::before;全选格自己就是按钮,方框只能是行首那颗 ::before,
|
|
452
|
+
标记是 ::after、叠在方框正中——两支桥接槽写在全选格上 */
|
|
444
453
|
|
|
445
454
|
[data-scope='transfer'][data-part='item-checkbox'][data-disabled] {
|
|
446
455
|
border-color: var(--xh-transfer-checkbox-border-disabled, var(--xh-border-default));
|
|
@@ -448,13 +457,16 @@
|
|
|
448
457
|
}
|
|
449
458
|
|
|
450
459
|
/* 全选格是原生按钮(三态经 aria-checked 上报,激活由平台负责),禁用同时打原生 disabled 与 data-disabled。
|
|
451
|
-
它是「方框 +
|
|
460
|
+
它是「方框 + 文案」的整行命中区:接 Action Control text 档、ghost 形态,悬停 / 按下 / 禁用面与过渡由家族给
|
|
452
461
|
(白底承载 hover 100 → pressed 200),按下只换面不缩放(--xh-action-scale-pressed: none),勾选回执落在方框上;
|
|
453
462
|
盒随内容收宽、高度取 xs 档的 24px 命中地板(方框 16px 居中其间),text 档的内距与最小宽度归零。
|
|
454
463
|
position 是给叠在方框上的那颗字形 ::after 当定位基准 */
|
|
455
464
|
[data-scope='transfer'][data-part='select-all-trigger'] {
|
|
456
465
|
/* 叠在方框上的那颗字形 ::after 与方框里的勾同一把尺 */
|
|
457
466
|
--xh-icon-size: calc(var(--xh-transfer-checkbox-size, var(--xh-_transfer-box)) * 0.75);
|
|
467
|
+
/* 勾选标记叠在行首方框正中:方框边长与标记色交给配方 */
|
|
468
|
+
--xh-check-mark-box-size: var(--xh-transfer-checkbox-size, var(--xh-_transfer-box));
|
|
469
|
+
--xh-check-mark-fg: var(--xh-transfer-checkbox-fg, var(--xh-_transfer-on-accent));
|
|
458
470
|
|
|
459
471
|
--xh-action-min-inline-size: 0;
|
|
460
472
|
--xh-action-padding-inline: 0;
|
|
@@ -476,17 +488,9 @@
|
|
|
476
488
|
font-weight: var(--xh-font-weight-medium);
|
|
477
489
|
}
|
|
478
490
|
|
|
479
|
-
/* 家族 text 档在粗指针下用 ::after 扩热区,勾中 / 半选时这里的 ::after 是叠在方框上的字形:钉回原位、下限归零 */
|
|
480
|
-
@media (pointer: coarse) {
|
|
481
|
-
[data-scope='transfer'][data-part='select-all-trigger']:is([data-state='checked'], [data-state='indeterminate'])::after {
|
|
482
|
-
min-block-size: 0;
|
|
483
|
-
translate: none;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
|
|
487
491
|
/* 两颗搬运钮是只有字形的离散动作钮:接 Action Control 的 icon 档、outline 形态(中性描边、透明底,
|
|
488
492
|
白底承载 hover 100 → pressed 200,按下 0.97 并同时换底),盒、焦点环、粗指针热区与禁用面由家族给;
|
|
489
|
-
此前的 raised
|
|
493
|
+
此前的 raised 悬停抬升退役(边界只由描边承担)。这里只把使用者槽映射到桥接槽;
|
|
490
494
|
钮是正方盒,按 sm 档取一个控件高 */
|
|
491
495
|
[data-scope='transfer'][data-part='to-target-trigger'],
|
|
492
496
|
[data-scope='transfer'][data-part='to-source-trigger'] {
|
|
@@ -612,4 +616,23 @@
|
|
|
612
616
|
mask: var(--xh-glyph-mark-chevron-right) center / contain no-repeat;
|
|
613
617
|
}
|
|
614
618
|
}
|
|
619
|
+
|
|
620
|
+
@media (forced-colors: active) {
|
|
621
|
+
/* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
|
|
622
|
+
字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
|
|
623
|
+
按钮面上取 ButtonText,悬停与按下时家族把按钮涂成 Highlight、字形换 HighlightText;
|
|
624
|
+
禁用取 GrayText */
|
|
625
|
+
[data-scope='transfer']:is([data-part='to-source-trigger'], [data-part='to-target-trigger']):empty::before {
|
|
626
|
+
forced-color-adjust: none;
|
|
627
|
+
background-color: ButtonText;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
[data-scope='transfer']:is([data-part='to-source-trigger'], [data-part='to-target-trigger']):not([data-disabled]):not([data-loading]):is(:hover, :active, [data-pressed]):empty::before {
|
|
631
|
+
background-color: HighlightText;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
[data-scope='transfer']:is([data-part='to-source-trigger'], [data-part='to-target-trigger'])[data-disabled]:empty::before {
|
|
635
|
+
background-color: GrayText;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
615
638
|
}
|