@xihan-ui/styles 3.2.0 → 4.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 +441 -0
- package/component-tokens.d.ts +229 -60
- package/components.tokens.json +5124 -1555
- package/css/accordion.css +47 -20
- package/css/alert.css +14 -15
- package/css/anchor.css +2 -2
- package/css/approval.css +37 -13
- package/css/avatar-group.css +9 -12
- package/css/avatar.css +20 -18
- package/css/back-top.css +21 -7
- package/css/badge.css +5 -5
- package/css/breadcrumb.css +18 -16
- package/css/button-group.css +4 -6
- package/css/button.css +4 -7
- package/css/calendar-picker.css +177 -94
- package/css/calendar-range-picker.css +206 -121
- package/css/card.css +34 -6
- package/css/carousel.css +65 -49
- package/css/cascader.css +41 -29
- package/css/checkbox-group.css +9 -6
- package/css/checkbox.css +5 -4
- package/css/citation.css +7 -2
- package/css/clipboard.css +20 -4
- package/css/collapsible.css +29 -14
- package/css/color-field.css +4 -4
- package/css/color-picker.css +77 -23
- package/css/color-slider.css +10 -8
- package/css/color-swatch-picker.css +5 -5
- package/css/combobox.css +14 -10
- package/css/command.css +13 -8
- package/css/context-menu.css +10 -5
- package/css/date-field.css +4 -4
- package/css/date-picker.css +165 -102
- package/css/date-range-picker.css +186 -123
- package/css/description.css +10 -6
- package/css/descriptions.css +47 -19
- package/css/dialog.css +50 -35
- package/css/drawer.css +75 -21
- package/css/editable.css +15 -41
- package/css/empty-state.css +21 -3
- package/css/field-array.css +4 -1
- package/css/field.css +17 -18
- package/css/fieldset.css +33 -13
- package/css/file-upload.css +65 -32
- package/css/float-button.css +25 -15
- package/css/floating-panel.css +1 -1
- package/css/form.css +24 -10
- package/css/grid-list.css +1 -1
- package/css/highlight.css +4 -4
- package/css/hover-card.css +19 -12
- package/css/image-viewer.css +77 -27
- package/css/image.css +12 -4
- package/css/infinite-scroll.css +8 -4
- package/css/input-group.css +74 -26
- package/css/kbd.css +1 -1
- package/css/label.css +27 -11
- package/css/layout.css +17 -10
- package/css/list.css +13 -9
- package/css/listbox.css +12 -7
- package/css/loading-bar.css +3 -0
- package/css/mention.css +10 -8
- package/css/menu.css +10 -5
- package/css/menubar.css +13 -8
- package/css/navigation-menu.css +2 -2
- package/css/notification.css +114 -31
- package/css/number-animation.css +2 -2
- package/css/number-field.css +60 -37
- package/css/page-header.css +63 -26
- package/css/pagination.css +35 -38
- package/css/password-input.css +10 -66
- package/css/pin-input.css +18 -26
- package/css/popconfirm.css +20 -11
- package/css/popover.css +18 -12
- package/css/progress.css +14 -13
- package/css/prompt-input.css +3 -3
- package/css/question-flow.css +33 -7
- package/css/radio-group.css +120 -55
- package/css/rating.css +31 -14
- package/css/select.css +14 -10
- package/css/separator.css +22 -4
- package/css/side-nav.css +16 -11
- package/css/signature-pad.css +23 -9
- package/css/skeleton.css +7 -7
- package/css/slider.css +71 -42
- package/css/sparkline.css +8 -2
- package/css/spinner.css +40 -20
- package/css/statistic.css +14 -14
- package/css/steps.css +115 -84
- package/css/switch.css +9 -7
- package/css/table.css +27 -10
- package/css/tabs.css +35 -12
- package/css/tag-group.css +17 -6
- package/css/tag.css +54 -29
- package/css/tags-input.css +38 -19
- package/css/text-field.css +5 -5
- package/css/time-field.css +4 -4
- package/css/time-picker.css +150 -64
- package/css/time-range-picker.css +91 -62
- package/css/timeline.css +37 -20
- package/css/timer.css +3 -3
- package/css/toggle-group.css +4 -4
- package/css/tool-call.css +6 -4
- package/css/toolbar.css +6 -5
- package/css/tooltip.css +15 -16
- package/css/tour.css +14 -7
- package/css/transfer.css +22 -16
- package/css/tree-select.css +10 -10
- package/css/tree.css +26 -25
- package/css/typography.css +28 -25
- package/dist/css/accordion.css +47 -20
- package/dist/css/alert.css +14 -15
- package/dist/css/anchor.css +2 -2
- package/dist/css/approval.css +37 -13
- package/dist/css/avatar-group.css +9 -12
- package/dist/css/avatar.css +20 -18
- package/dist/css/back-top.css +21 -7
- package/dist/css/badge.css +5 -5
- package/dist/css/breadcrumb.css +18 -16
- package/dist/css/button-group.css +4 -6
- package/dist/css/button.css +4 -7
- package/dist/css/calendar-picker.css +177 -94
- package/dist/css/calendar-range-picker.css +206 -121
- package/dist/css/card.css +34 -6
- package/dist/css/carousel.css +65 -49
- package/dist/css/cascader.css +41 -29
- package/dist/css/checkbox-group.css +9 -6
- package/dist/css/checkbox.css +5 -4
- package/dist/css/citation.css +7 -2
- package/dist/css/clipboard.css +20 -4
- package/dist/css/collapsible.css +29 -14
- package/dist/css/color-field.css +4 -4
- package/dist/css/color-picker.css +77 -23
- package/dist/css/color-slider.css +10 -8
- package/dist/css/color-swatch-picker.css +5 -5
- package/dist/css/combobox.css +14 -10
- package/dist/css/command.css +13 -8
- package/dist/css/context-menu.css +10 -5
- package/dist/css/date-field.css +4 -4
- package/dist/css/date-picker.css +165 -102
- package/dist/css/date-range-picker.css +186 -123
- package/dist/css/description.css +10 -6
- package/dist/css/descriptions.css +47 -19
- package/dist/css/dialog.css +50 -35
- package/dist/css/drawer.css +75 -21
- package/dist/css/editable.css +15 -41
- package/dist/css/empty-state.css +21 -3
- package/dist/css/field-array.css +4 -1
- package/dist/css/field.css +17 -18
- package/dist/css/fieldset.css +33 -13
- package/dist/css/file-upload.css +65 -32
- package/dist/css/float-button.css +25 -15
- package/dist/css/floating-panel.css +1 -1
- package/dist/css/form.css +24 -10
- package/dist/css/grid-list.css +1 -1
- package/dist/css/highlight.css +4 -4
- package/dist/css/hover-card.css +19 -12
- package/dist/css/image-viewer.css +77 -27
- package/dist/css/image.css +12 -4
- package/dist/css/infinite-scroll.css +8 -4
- package/dist/css/input-group.css +74 -26
- package/dist/css/kbd.css +1 -1
- package/dist/css/label.css +27 -11
- package/dist/css/layout.css +17 -10
- package/dist/css/list.css +13 -9
- package/dist/css/listbox.css +12 -7
- package/dist/css/loading-bar.css +3 -0
- package/dist/css/mention.css +10 -8
- package/dist/css/menu.css +10 -5
- package/dist/css/menubar.css +13 -8
- package/dist/css/navigation-menu.css +2 -2
- package/dist/css/notification.css +114 -31
- package/dist/css/number-animation.css +2 -2
- package/dist/css/number-field.css +60 -37
- package/dist/css/page-header.css +63 -26
- package/dist/css/pagination.css +35 -38
- package/dist/css/password-input.css +10 -66
- package/dist/css/pin-input.css +18 -26
- package/dist/css/popconfirm.css +20 -11
- package/dist/css/popover.css +18 -12
- package/dist/css/progress.css +14 -13
- package/dist/css/prompt-input.css +3 -3
- package/dist/css/question-flow.css +33 -7
- package/dist/css/radio-group.css +120 -55
- package/dist/css/rating.css +31 -14
- package/dist/css/select.css +14 -10
- package/dist/css/separator.css +22 -4
- package/dist/css/side-nav.css +16 -11
- package/dist/css/signature-pad.css +23 -9
- package/dist/css/skeleton.css +7 -7
- package/dist/css/slider.css +71 -42
- package/dist/css/sparkline.css +8 -2
- package/dist/css/spinner.css +40 -20
- package/dist/css/statistic.css +14 -14
- package/dist/css/steps.css +115 -84
- package/dist/css/switch.css +9 -7
- package/dist/css/table.css +27 -10
- package/dist/css/tabs.css +35 -12
- package/dist/css/tag-group.css +17 -6
- package/dist/css/tag.css +54 -29
- package/dist/css/tags-input.css +38 -19
- package/dist/css/text-field.css +5 -5
- package/dist/css/time-field.css +4 -4
- package/dist/css/time-picker.css +150 -64
- package/dist/css/time-range-picker.css +91 -62
- package/dist/css/timeline.css +37 -20
- package/dist/css/timer.css +3 -3
- package/dist/css/toggle-group.css +4 -4
- package/dist/css/tool-call.css +6 -4
- package/dist/css/toolbar.css +6 -5
- package/dist/css/tooltip.css +15 -16
- package/dist/css/tour.css +14 -7
- package/dist/css/transfer.css +22 -16
- package/dist/css/tree-select.css +10 -10
- package/dist/css/tree.css +26 -25
- package/dist/css/typography.css +28 -25
- package/dist/family/action-control.css +30 -24
- package/dist/family/chart.css +57 -0
- package/dist/family/collection-item.css +12 -8
- package/dist/family/field-chrome.css +28 -19
- package/dist/family/loading-ring.css +20 -13
- package/dist/family/swatch.css +4 -4
- package/dist/family/tag-list.css +6 -0
- package/family/action-control.css +30 -24
- package/family/chart.css +57 -0
- package/family/collection-item.css +12 -8
- package/family/field-chrome.css +28 -19
- package/family/loading-ring.css +20 -13
- package/family/swatch.css +4 -4
- package/family/tag-list.css +6 -0
- package/index.css +3580 -2060
- package/index.unlayered.css +3579 -2060
- package/package.json +2 -2
package/dist/css/tooltip.css
CHANGED
|
@@ -71,13 +71,14 @@
|
|
|
71
71
|
|
|
72
72
|
.xh-scope-tooltip[data-part='content'] {
|
|
73
73
|
/* 尺寸档只换这三个私有槽。tooltip 没有 root 部件,两轴都落在浮层树最外层的 content 上,
|
|
74
|
-
|
|
75
|
-
--xh-_tooltip-py: var(--xh-space-
|
|
76
|
-
--xh-_tooltip-px: var(--xh-space-
|
|
77
|
-
--xh-_tooltip-font-size: var(--xh-
|
|
74
|
+
箭头是它的后代,语气槽一并继承。缺省档纵 8 横 12、正文 14px */
|
|
75
|
+
--xh-_tooltip-py: var(--xh-space-2);
|
|
76
|
+
--xh-_tooltip-px: var(--xh-space-3);
|
|
77
|
+
--xh-_tooltip-font-size: var(--xh-text-body-size);
|
|
78
78
|
/* Tooltip 保留反白身份(登记的反白 compact frosted):短提示要与可交互的普通主题浮层一眼分开。
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
底取正文色、字取承载面色:浅色主题下是深底白字,深色主题下整块翻成浅底深字,两头都是同一对反色。
|
|
80
|
+
compact 档的透明度缺省不透明,底是实底;主题要透景时再由材质令牌给。
|
|
81
|
+
边不取 --xh-material-frosted-border:那是中性描边色,压在反白深底上看不见,
|
|
81
82
|
浮层要的 1px 可见边界由 on 色 20% 拼色承担;浮层不用玻璃高光,顶光缺省不画 */
|
|
82
83
|
--xh-_tooltip-solid: var(--xh-_tone, var(--xh-fg-default));
|
|
83
84
|
--xh-_tooltip-on: var(--xh-_tone-on, var(--xh-bg-surface));
|
|
@@ -94,8 +95,8 @@
|
|
|
94
95
|
max-inline-size: var(--xh-tooltip-max-w, var(--xh-overlay-max-w));
|
|
95
96
|
padding-block: var(--xh-tooltip-py, var(--xh-_tooltip-py));
|
|
96
97
|
padding-inline: var(--xh-tooltip-px, var(--xh-_tooltip-px));
|
|
97
|
-
/* 这里刻意用 control 而不是浮层那档
|
|
98
|
-
|
|
98
|
+
/* 这里刻意用 control 而不是浮层那档 overlay:提示气泡通常只有一行字、高度接近控件,
|
|
99
|
+
与控件同一形状身份。档位定义里为此单列了一条 */
|
|
99
100
|
border-radius: var(--xh-tooltip-radius, var(--xh-shape-control));
|
|
100
101
|
border: var(--xh-stroke-thin) solid var(--xh-tooltip-border, var(--xh-_tooltip-border));
|
|
101
102
|
background: transparent;
|
|
@@ -152,18 +153,16 @@
|
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
/* —— 尺寸 —— */
|
|
155
|
-
/* 缺省档写在 content
|
|
156
|
-
|
|
156
|
+
/* 缺省档写在 content 的基础规则里。提示的内边距与字号不在 control-* 那把尺上
|
|
157
|
+
(它是浮层不是控件):三档字号都是正文 14px,一行字的提示不缩字,档位只换内距——
|
|
158
|
+
小号档只收纵向(纵 4 横 12),大号档纵横各放一档(纵 12 横 16) */
|
|
157
159
|
.xh-scope-tooltip[data-part='content'][data-size='sm'] {
|
|
158
|
-
--xh-_tooltip-py: var(--xh-space-
|
|
159
|
-
--xh-_tooltip-px: var(--xh-space-1_5);
|
|
160
|
-
--xh-_tooltip-font-size: var(--xh-control-caption-sm);
|
|
160
|
+
--xh-_tooltip-py: var(--xh-space-1);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
.xh-scope-tooltip[data-part='content'][data-size='lg'] {
|
|
164
|
-
--xh-_tooltip-py: var(--xh-space-
|
|
165
|
-
--xh-_tooltip-px: var(--xh-space-
|
|
166
|
-
--xh-_tooltip-font-size: var(--xh-control-caption-lg);
|
|
164
|
+
--xh-_tooltip-py: var(--xh-space-3);
|
|
165
|
+
--xh-_tooltip-px: var(--xh-space-4);
|
|
167
166
|
}
|
|
168
167
|
|
|
169
168
|
/* 箭头的底色与描边色,几何在 overlay-arrow.css。
|
package/dist/css/tour.css
CHANGED
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
var(--xh-_tour-spotlight-radius, var(--xh-shape-surface))
|
|
93
93
|
);
|
|
94
94
|
box-shadow:
|
|
95
|
-
0 0 0 var(--xh-stroke-thick) var(--xh-tour-spotlight-ring, var(--xh-ring-focus)),
|
|
95
|
+
0 0 0 var(--xh-stroke-thick) var(--xh-tour-spotlight-ring, var(--xh-_tour-spotlight-ring, var(--xh-ring-focus))),
|
|
96
96
|
0 0 0 100vmax var(--xh-_tour-spotlight-shroud);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -113,8 +113,10 @@
|
|
|
113
113
|
top var(--xh-motion-duration-move) var(--xh-motion-ease-continuous);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
/* 压暗时暗幕本身已把目标框出来,高亮框不再描一圈环;不压暗时那圈环是唯一的指示 */
|
|
116
117
|
.xh-scope-tour[data-part='spotlight'][data-dimmed] {
|
|
117
118
|
--xh-_tour-spotlight-shroud: var(--xh-tour-spotlight-shroud, var(--xh-bg-overlay));
|
|
119
|
+
--xh-_tour-spotlight-ring: transparent;
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
.xh-scope-tour[data-part='spotlight'][hidden] {
|
|
@@ -197,7 +199,7 @@
|
|
|
197
199
|
inline-size: max-content;
|
|
198
200
|
/* 静态档与落位后的可用宽度取小:窄视口下面板伸出去,最右侧的内容就点不到了 */
|
|
199
201
|
max-inline-size: min(var(--xh-tour-max-w, var(--xh-overlay-max-w-lg)), var(--xh-_tour-available-w));
|
|
200
|
-
padding-block: var(--xh-tour-py, var(--xh-surface-py-
|
|
202
|
+
padding-block: var(--xh-tour-py, var(--xh-surface-py-sm));
|
|
201
203
|
padding-inline: var(--xh-tour-px, var(--xh-surface-px-md));
|
|
202
204
|
/* 引导步骤的正文长度由作者定,矮视口下不限高气泡会整块伸出视口 */
|
|
203
205
|
max-block-size: min(var(--xh-tour-max-h, var(--xh-overlay-max-h)), var(--xh-_tour-available-h));
|
|
@@ -237,6 +239,11 @@
|
|
|
237
239
|
color: var(--xh-tour-title-fg, var(--xh-fg-default));
|
|
238
240
|
}
|
|
239
241
|
|
|
242
|
+
/* 标题与说明是一组:两者之间只留 4px,其余部件之间才是整档间距 */
|
|
243
|
+
.xh-scope-tour[data-part='title'] + .xh-scope-tour[data-part='description'] {
|
|
244
|
+
margin-block-start: calc(var(--xh-space-1) - var(--xh-tour-gap, var(--xh-space-2)));
|
|
245
|
+
}
|
|
246
|
+
|
|
240
247
|
/* 关闭按钮是绝对定位的,不占流内宽度:标题得自己让出右上角那块,
|
|
241
248
|
否则长标题会直接钻到按钮底下。只在真有关闭按钮时让位。 */
|
|
242
249
|
.xh-scope-tour[data-part='content']:has(.xh-scope-tour[data-part='close-trigger'])
|
|
@@ -258,22 +265,22 @@
|
|
|
258
265
|
color: var(--xh-tour-progress-fg, var(--xh-fg-subtle));
|
|
259
266
|
}
|
|
260
267
|
|
|
261
|
-
/*
|
|
268
|
+
/* 圆点组:一步一颗,横排;点距与走马灯的分页点同为 8px */
|
|
262
269
|
.xh-scope-tour[data-part='progress-indicator'] {
|
|
263
270
|
display: inline-flex;
|
|
264
271
|
align-items: center;
|
|
265
|
-
gap: var(--xh-tour-progress-indicator-gap, var(--xh-space-
|
|
272
|
+
gap: var(--xh-tour-progress-indicator-gap, var(--xh-space-2));
|
|
266
273
|
}
|
|
267
274
|
|
|
268
275
|
.xh-scope-tour[data-part='progress-indicator'][hidden] {
|
|
269
276
|
display: none;
|
|
270
277
|
}
|
|
271
278
|
|
|
272
|
-
/* 圆点:
|
|
279
|
+
/* 圆点:6px 正圆取 circle(与走马灯分页点同一种语言),未走到的一档取中性描边色。
|
|
273
280
|
宽度与底色都随状态换,换步那一下能看出进度在推进 */
|
|
274
281
|
.xh-scope-tour[data-part='progress-dot'] {
|
|
275
|
-
inline-size: var(--xh-space-
|
|
276
|
-
block-size: var(--xh-space-
|
|
282
|
+
inline-size: var(--xh-space-1_5);
|
|
283
|
+
block-size: var(--xh-space-1_5);
|
|
277
284
|
border-radius: var(--xh-shape-circle);
|
|
278
285
|
background: var(--xh-tour-progress-dot-bg, var(--xh-border-default));
|
|
279
286
|
transition:
|
package/dist/css/transfer.css
CHANGED
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
/* 尺寸档只换这六个私有槽,面板头、搜索框、条目与勾选格都从 root 继承它们,
|
|
35
35
|
换档不必给每个部件各写一条选择器 */
|
|
36
36
|
--xh-_transfer-item-py: var(--xh-list-option-py-md);
|
|
37
|
+
/* 行至少一个同档控件高(md 32px),勾选格、文字与悬停面都有落脚的余量 */
|
|
38
|
+
--xh-_transfer-item-h: var(--xh-control-h-md);
|
|
37
39
|
--xh-_transfer-h: var(--xh-control-h-md);
|
|
38
40
|
--xh-_transfer-px: var(--xh-control-px-md);
|
|
39
41
|
--xh-_transfer-gap: var(--xh-control-gap-md);
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
display: grid;
|
|
49
51
|
grid-template-rows: auto auto;
|
|
50
52
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
51
|
-
gap: var(--xh-transfer-gap, var(--xh-space-
|
|
53
|
+
gap: var(--xh-transfer-gap, var(--xh-space-5));
|
|
52
54
|
align-items: center;
|
|
53
55
|
color: var(--xh-transfer-fg, var(--xh-fg-default));
|
|
54
56
|
}
|
|
@@ -58,6 +60,7 @@
|
|
|
58
60
|
.xh-scope-transfer[data-part='root'][data-size='sm'] {
|
|
59
61
|
--xh-icon-size: var(--xh-transfer-icon-size, var(--xh-glyph-size-sm));
|
|
60
62
|
--xh-_transfer-item-py: var(--xh-list-option-py-sm);
|
|
63
|
+
--xh-_transfer-item-h: var(--xh-control-h-sm);
|
|
61
64
|
--xh-_transfer-h: var(--xh-control-h-sm);
|
|
62
65
|
--xh-_transfer-px: var(--xh-control-px-sm);
|
|
63
66
|
--xh-_transfer-gap: var(--xh-control-gap-sm);
|
|
@@ -68,6 +71,7 @@
|
|
|
68
71
|
.xh-scope-transfer[data-part='root'][data-size='lg'] {
|
|
69
72
|
--xh-icon-size: var(--xh-transfer-icon-size, var(--xh-glyph-size-lg));
|
|
70
73
|
--xh-_transfer-item-py: var(--xh-list-option-py-lg);
|
|
74
|
+
--xh-_transfer-item-h: var(--xh-control-h-lg);
|
|
71
75
|
--xh-_transfer-h: var(--xh-control-h-lg);
|
|
72
76
|
--xh-_transfer-px: var(--xh-control-px-lg);
|
|
73
77
|
--xh-_transfer-gap: var(--xh-control-gap-lg);
|
|
@@ -131,14 +135,15 @@
|
|
|
131
135
|
background: var(--xh-transfer-panel-bg-disabled, var(--xh-bg-muted));
|
|
132
136
|
}
|
|
133
137
|
|
|
134
|
-
/* 面板内三个角色的槽都带 panel-
|
|
138
|
+
/* 面板内三个角色的槽都带 panel- 段,与部件名逐字对上。
|
|
139
|
+
栏头是一条淡底:靠底色与下面的列表分开,不再画分隔线;上下 12px,单行约 40px 高 */
|
|
135
140
|
.xh-scope-transfer[data-part='panel-header'] {
|
|
136
141
|
display: flex;
|
|
137
142
|
gap: var(--xh-transfer-panel-header-gap, var(--xh-_transfer-gap));
|
|
138
143
|
align-items: center;
|
|
139
|
-
padding-block: var(--xh-transfer-panel-header-py, var(--xh-space-
|
|
144
|
+
padding-block: var(--xh-transfer-panel-header-py, var(--xh-space-3));
|
|
140
145
|
padding-inline: var(--xh-transfer-panel-header-px, var(--xh-_transfer-px));
|
|
141
|
-
|
|
146
|
+
background: var(--xh-transfer-panel-header-bg, var(--xh-bg-muted));
|
|
142
147
|
}
|
|
143
148
|
|
|
144
149
|
/* 标题占满剩余宽度,把计数挤到行尾侧 */
|
|
@@ -147,9 +152,9 @@
|
|
|
147
152
|
min-inline-size: 0;
|
|
148
153
|
overflow: hidden;
|
|
149
154
|
color: var(--xh-transfer-panel-title-fg, var(--xh-fg-default));
|
|
150
|
-
/* 面板标头是 Surface 内的标题:14 /
|
|
155
|
+
/* 面板标头是 Surface 内的标题:14 / 500 */
|
|
151
156
|
font-size: var(--xh-transfer-panel-title-font-size, var(--xh-text-label-size));
|
|
152
|
-
font-weight: var(--xh-transfer-panel-title-font-weight, var(--xh-font-weight-
|
|
157
|
+
font-weight: var(--xh-transfer-panel-title-font-weight, var(--xh-font-weight-medium));
|
|
153
158
|
line-height: var(--xh-leading-none);
|
|
154
159
|
white-space: nowrap;
|
|
155
160
|
text-overflow: ellipsis;
|
|
@@ -209,9 +214,10 @@
|
|
|
209
214
|
flex: 1 1 auto;
|
|
210
215
|
flex-direction: column;
|
|
211
216
|
gap: var(--xh-transfer-list-gap, var(--xh-list-option-gap));
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
padding-
|
|
217
|
+
/* 行通栏:列表不留内衬,行面直接贴到面板两缘 */
|
|
218
|
+
block-size: var(--xh-transfer-list-h, var(--xh-viewport-h-sm));
|
|
219
|
+
padding-block: var(--xh-transfer-list-py, var(--xh-space-0));
|
|
220
|
+
padding-inline: var(--xh-transfer-list-px, var(--xh-space-0));
|
|
215
221
|
overflow: auto;
|
|
216
222
|
transition: opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
217
223
|
}
|
|
@@ -359,7 +365,7 @@
|
|
|
359
365
|
--xh-collection-inline-padding: var(--xh-transfer-item-px, var(--xh-_transfer-px));
|
|
360
366
|
--xh-collection-gap: 0;
|
|
361
367
|
--xh-collection-font-size: var(--xh-transfer-item-font-size, var(--xh-_transfer-font-size));
|
|
362
|
-
--xh-collection-radius: var(--xh-transfer-item-radius,
|
|
368
|
+
--xh-collection-radius: var(--xh-transfer-item-radius, 0);
|
|
363
369
|
/* 作者的图标尺槽经桥接槽下发到条目,家族缺省按 data-xh-collection-size 取档 */
|
|
364
370
|
--xh-collection-glyph-size: var(--xh-transfer-icon-size, var(--xh-_collection-glyph-size));
|
|
365
371
|
--xh-collection-fg-rest: var(--xh-transfer-item-fg, var(--xh-fg-default));
|
|
@@ -382,6 +388,7 @@
|
|
|
382
388
|
flex: none;
|
|
383
389
|
gap: var(--xh-transfer-item-gap, var(--xh-_transfer-gap));
|
|
384
390
|
align-items: center;
|
|
391
|
+
min-block-size: var(--xh-transfer-item-h, var(--xh-_transfer-item-h));
|
|
385
392
|
/* 行高留出文字的上下伸展空间,行内那层 overflow:hidden 才不会把字削掉 */
|
|
386
393
|
line-height: var(--xh-transfer-item-leading, var(--xh-leading-normal));
|
|
387
394
|
white-space: nowrap;
|
|
@@ -417,7 +424,7 @@
|
|
|
417
424
|
justify-content: center;
|
|
418
425
|
inline-size: var(--xh-transfer-checkbox-size, var(--xh-_transfer-box));
|
|
419
426
|
block-size: var(--xh-transfer-checkbox-size, var(--xh-_transfer-box));
|
|
420
|
-
border: var(--xh-stroke-thin) solid var(--xh-transfer-checkbox-border, var(--xh-border-
|
|
427
|
+
border: var(--xh-stroke-thin) solid var(--xh-transfer-checkbox-border, var(--xh-border-strong));
|
|
421
428
|
border-radius: var(--xh-transfer-checkbox-radius, var(--xh-shape-inset));
|
|
422
429
|
background: var(--xh-transfer-checkbox-bg, transparent);
|
|
423
430
|
color: var(--xh-transfer-checkbox-fg, var(--xh-_transfer-on-accent));
|
|
@@ -488,16 +495,15 @@
|
|
|
488
495
|
font-weight: var(--xh-font-weight-medium);
|
|
489
496
|
}
|
|
490
497
|
|
|
491
|
-
/* 两颗搬运钮是只有字形的离散动作钮:接 Action Control 的 icon 档、
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
钮是正方盒,按 sm 档取一个控件高 */
|
|
498
|
+
/* 两颗搬运钮是只有字形的离散动作钮:接 Action Control 的 icon 档、subtle 形态(淡底、无边,
|
|
499
|
+
淡底阶梯 hover 200 → pressed 300),盒、焦点环、粗指针热区与禁用面由家族给。
|
|
500
|
+
钮是正方盒,按 sm 档取一个控件高,正方盒取圆形 */
|
|
495
501
|
.xh-scope-transfer[data-part='to-target-trigger'],
|
|
496
502
|
.xh-scope-transfer[data-part='to-source-trigger'] {
|
|
497
503
|
--xh-action-visual-size: var(--xh-transfer-trigger-size, var(--xh-_action-profile-visual-size));
|
|
498
504
|
--xh-action-min-inline-size: var(--xh-transfer-trigger-size, var(--xh-_action-profile-visual-size));
|
|
499
505
|
--xh-action-padding-inline: var(--xh-transfer-trigger-px, var(--xh-_action-profile-padding-inline));
|
|
500
|
-
--xh-action-radius: var(--xh-transfer-trigger-radius, var(--xh-shape-
|
|
506
|
+
--xh-action-radius: var(--xh-transfer-trigger-radius, var(--xh-shape-circle));
|
|
501
507
|
--xh-action-border-rest: var(--xh-transfer-trigger-border, var(--xh-_action-variant-border-rest));
|
|
502
508
|
--xh-action-border-hover: var(--xh-transfer-trigger-border, var(--xh-_action-variant-border-hover));
|
|
503
509
|
--xh-action-border-pressed: var(--xh-transfer-trigger-border, var(--xh-_action-variant-border-pressed));
|
package/dist/css/tree-select.css
CHANGED
|
@@ -129,7 +129,9 @@
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.xh-scope-tree-select[data-part='label'] {
|
|
132
|
-
|
|
132
|
+
/* 竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-tree-select-label-gap 给多少最终就是多少 */
|
|
133
|
+
margin-block-end: calc(var(--xh-tree-select-label-gap, var(--xh-space-2)) - var(--xh-tree-select-gap, var(--xh-space-1)));
|
|
134
|
+
color: var(--xh-tree-select-label-fg, var(--xh-fg-muted));
|
|
133
135
|
font-size: var(--xh-tree-select-label-font-size, var(--xh-text-label-size));
|
|
134
136
|
font-weight: var(--xh-tree-select-label-font-weight, var(--xh-text-label-weight));
|
|
135
137
|
line-height: var(--xh-leading-none);
|
|
@@ -137,7 +139,7 @@
|
|
|
137
139
|
|
|
138
140
|
/* 整个控件禁用会把 data-disabled 一路打到 label / value-text / indicator 上,各处观感保持一致 */
|
|
139
141
|
.xh-scope-tree-select[data-part='label'][data-disabled] {
|
|
140
|
-
color: var(--xh-fg-
|
|
142
|
+
color: var(--xh-tree-select-label-fg-disabled, var(--xh-fg-muted));
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
/* 盒:描边、底色、圆角、控件高度、行内内衬、聚焦环、五态与悬停由 Field Chrome 家族画在这一层,
|
|
@@ -158,8 +160,6 @@
|
|
|
158
160
|
--xh-field-border-hover: var(--xh-tree-select-control-border-hover, var(--xh-_field-variant-border-hover));
|
|
159
161
|
--xh-field-border-focus: var(--xh-tree-select-control-border-focus, var(--xh-_field-variant-border-focus));
|
|
160
162
|
--xh-field-border-invalid: var(--xh-tree-select-control-border-invalid, var(--xh-_field-variant-border-invalid));
|
|
161
|
-
--xh-field-ring-focus: var(--xh-ring-focus);
|
|
162
|
-
--xh-field-ring-invalid: var(--xh-ring-invalid);
|
|
163
163
|
--xh-field-shadow-rest: var(--xh-tree-select-control-shadow, none);
|
|
164
164
|
--xh-field-cursor-rest: pointer;
|
|
165
165
|
/* 家族 chrome 会重写 --xh-icon-size,使用者图标槽必须经桥接槽下发才能在盒内生效 */
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
max-inline-size: var(--xh-tree-select-content-max-w, none);
|
|
312
312
|
max-block-size: min(var(--xh-tree-select-content-max-h, var(--xh-overlay-menu-max-h)), var(--xh-_tree-select-available-h));
|
|
313
313
|
padding-block: var(--xh-tree-select-content-py, var(--xh-space-1));
|
|
314
|
-
padding-inline: var(--xh-tree-select-content-px,
|
|
314
|
+
padding-inline: var(--xh-tree-select-content-px, 0);
|
|
315
315
|
border-radius: var(--xh-tree-select-content-radius, var(--xh-shape-overlay));
|
|
316
316
|
/* 面板只是外壳,滚动归树:搜索框与底部操作区因此钉在树的上下沿,不随行滚走。
|
|
317
317
|
行的悬停底色是方角,滚到两端时会探出外壳的圆角 */
|
|
@@ -508,7 +508,7 @@
|
|
|
508
508
|
--xh-collection-inline-padding: var(--xh-tree-select-item-px, var(--xh-_tree-select-row-px));
|
|
509
509
|
--xh-collection-gap: var(--xh-tree-select-item-gap, var(--xh-_tree-select-gap));
|
|
510
510
|
--xh-collection-font-size: var(--xh-tree-select-item-font-size, var(--xh-_tree-select-font-size));
|
|
511
|
-
--xh-collection-radius: var(--xh-tree-select-item-radius,
|
|
511
|
+
--xh-collection-radius: var(--xh-tree-select-item-radius, 0);
|
|
512
512
|
--xh-collection-glyph-size: var(--xh-tree-select-icon-size, var(--xh-_collection-glyph-size));
|
|
513
513
|
--xh-collection-fg-rest: var(--xh-tree-select-item-fg, var(--xh-material-frosted-fg));
|
|
514
514
|
--xh-collection-fg-hover: var(--xh-tree-select-item-fg, var(--xh-material-frosted-fg));
|
|
@@ -518,10 +518,10 @@
|
|
|
518
518
|
--xh-collection-fg-selected-hover: var(--xh-tree-select-item-fg-selected, var(--xh-tree-select-item-fg, var(--xh-material-frosted-fg)));
|
|
519
519
|
--xh-collection-fg-selected-pressed: var(--xh-tree-select-item-fg-selected, var(--xh-tree-select-item-fg, var(--xh-material-frosted-fg)));
|
|
520
520
|
--xh-collection-fg-pressed: var(--xh-tree-select-item-fg, var(--xh-material-frosted-fg));
|
|
521
|
-
--xh-collection-font-weight-selected: var(--xh-tree-select-item-font-weight-selected, var(--xh-font-weight-
|
|
522
|
-
--xh-collection-font-weight-selected-highlight: var(--xh-tree-select-item-font-weight-selected, var(--xh-font-weight-
|
|
523
|
-
--xh-collection-font-weight-selected-hover: var(--xh-tree-select-item-font-weight-selected, var(--xh-font-weight-
|
|
524
|
-
--xh-collection-font-weight-selected-pressed: var(--xh-tree-select-item-font-weight-selected, var(--xh-font-weight-
|
|
521
|
+
--xh-collection-font-weight-selected: var(--xh-tree-select-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
522
|
+
--xh-collection-font-weight-selected-highlight: var(--xh-tree-select-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
523
|
+
--xh-collection-font-weight-selected-hover: var(--xh-tree-select-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
524
|
+
--xh-collection-font-weight-selected-pressed: var(--xh-tree-select-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
525
525
|
--xh-collection-bg-hover: var(--xh-tree-select-item-bg-hover, var(--xh-bg-subtle));
|
|
526
526
|
--xh-collection-bg-keyboard-highlight: var(--xh-tree-select-item-bg-hover, var(--xh-bg-subtle));
|
|
527
527
|
--xh-collection-bg-selected-highlight: var(--xh-tree-select-item-bg-hover, var(--xh-bg-subtle));
|
package/dist/css/tree.css
CHANGED
|
@@ -18,13 +18,15 @@
|
|
|
18
18
|
|
|
19
19
|
.xh-scope-tree[data-part='root'] {
|
|
20
20
|
/* 尺寸档只换这几支私有槽,行、指示符盒、缩进与占位从 root 继承,走集合家族的尺寸档:
|
|
21
|
-
|
|
21
|
+
行的块向内衬取列表条目档、间距 / 字号取控件档、指示符盒取指示符档。
|
|
22
|
+
行内内衬只留一条窄边(树行首就是箭头盒,不需要列表那样的起始留白);
|
|
23
|
+
缩进 = 箭头盒 + 箭头到文字的间距,子节点的箭头正好对齐父节点的文字起点 */
|
|
22
24
|
--xh-_tree-row-py: var(--xh-list-option-py-md);
|
|
23
|
-
--xh-_tree-row-px: var(--xh-
|
|
25
|
+
--xh-_tree-row-px: var(--xh-space-1);
|
|
24
26
|
--xh-_tree-row-gap: var(--xh-control-gap-md);
|
|
25
27
|
--xh-_tree-font-size: var(--xh-control-font-md);
|
|
26
28
|
--xh-_tree-indicator: var(--xh-control-indicator-md);
|
|
27
|
-
--xh-_tree-indent: var(--xh-
|
|
29
|
+
--xh-_tree-indent: calc(var(--xh-_tree-indicator) + var(--xh-_tree-row-gap));
|
|
28
30
|
/* 行外的字形(空态 / 在途占位里的加载环与作者塞的图标)按档取尺;行内的由家族随 data-xh-collection-size
|
|
29
31
|
下发。这支只管作者放进行里的图标:树自绘的状态字形(展开方向、行尾对号与半选杠)是指示符,
|
|
30
32
|
各部件在自己身上把 --xh-icon-size 改接到指示符盒的尺 */
|
|
@@ -37,21 +39,19 @@
|
|
|
37
39
|
|
|
38
40
|
.xh-scope-tree[data-part='root'][data-size='sm'] {
|
|
39
41
|
--xh-_tree-row-py: var(--xh-list-option-py-sm);
|
|
40
|
-
--xh-_tree-row-px: var(--xh-
|
|
42
|
+
--xh-_tree-row-px: var(--xh-space-0_5);
|
|
41
43
|
--xh-_tree-row-gap: var(--xh-control-gap-sm);
|
|
42
44
|
--xh-_tree-font-size: var(--xh-control-font-sm);
|
|
43
45
|
--xh-_tree-indicator: var(--xh-control-indicator-sm);
|
|
44
|
-
--xh-_tree-indent: var(--xh-space-3);
|
|
45
46
|
--xh-icon-size: var(--xh-tree-icon-size, var(--xh-glyph-size-sm));
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
.xh-scope-tree[data-part='root'][data-size='lg'] {
|
|
49
50
|
--xh-_tree-row-py: var(--xh-list-option-py-lg);
|
|
50
|
-
--xh-_tree-row-px: var(--xh-
|
|
51
|
+
--xh-_tree-row-px: var(--xh-space-1_5);
|
|
51
52
|
--xh-_tree-row-gap: var(--xh-control-gap-lg);
|
|
52
53
|
--xh-_tree-font-size: var(--xh-control-font-lg);
|
|
53
54
|
--xh-_tree-indicator: var(--xh-control-indicator-lg);
|
|
54
|
-
--xh-_tree-indent: var(--xh-space-5);
|
|
55
55
|
--xh-icon-size: var(--xh-tree-icon-size, var(--xh-glyph-size-lg));
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
.xh-scope-tree[data-part='tree'] {
|
|
90
90
|
display: flex;
|
|
91
91
|
flex-direction: column;
|
|
92
|
-
gap: var(--xh-tree-tree-gap, var(--xh-
|
|
92
|
+
gap: var(--xh-tree-tree-gap, var(--xh-space-0));
|
|
93
93
|
max-block-size: var(--xh-tree-max-h, var(--xh-viewport-h-lg));
|
|
94
94
|
padding-block: var(--xh-tree-py, var(--xh-space-1));
|
|
95
95
|
padding-inline: var(--xh-tree-px, var(--xh-space-1));
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
.xh-scope-tree[data-part='branch'] {
|
|
171
171
|
display: flex;
|
|
172
172
|
flex-direction: column;
|
|
173
|
-
gap: var(--xh-tree-branch-gap, var(--xh-
|
|
173
|
+
gap: var(--xh-tree-branch-gap, var(--xh-space-0));
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.xh-scope-tree[data-part='branch'][hidden] {
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
|
|
338
338
|
/* 展开箭头与方向指示符:两者都可能被作者用作"点这里展开"的把手,
|
|
339
339
|
所以尺寸与叶子的勾选标记一致,两种行的文字起点才对得齐。
|
|
340
|
-
盒里的 chevron
|
|
340
|
+
盒里的 chevron 是指示符:盒与 --xh-icon-size 同边长,兜底字形只画盒的四分之三(16px 盒里 12px) */
|
|
341
341
|
.xh-scope-tree[data-part='branch-trigger'],
|
|
342
342
|
.xh-scope-tree[data-part='branch-indicator'] {
|
|
343
343
|
--xh-icon-size: var(--xh-_tree-indicator-size);
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
align-items: center;
|
|
348
348
|
justify-content: center;
|
|
349
349
|
inline-size: var(--xh-_tree-indicator-size);
|
|
350
|
-
color: var(--xh-tree-branch-indicator-fg, var(--xh-fg-
|
|
350
|
+
color: var(--xh-tree-branch-indicator-fg, var(--xh-fg-muted));
|
|
351
351
|
transition: rotate var(--xh-motion-duration-nudge) var(--xh-motion-ease-enter-strong);
|
|
352
352
|
}
|
|
353
353
|
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
.xh-scope-tree[data-part='branch-content'] {
|
|
379
379
|
display: flex;
|
|
380
380
|
flex-direction: column;
|
|
381
|
-
gap: var(--xh-tree-branch-content-gap, var(--xh-
|
|
381
|
+
gap: var(--xh-tree-branch-content-gap, var(--xh-space-0));
|
|
382
382
|
padding-inline-start: var(--xh-tree-indent, var(--xh-_tree-indent));
|
|
383
383
|
}
|
|
384
384
|
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
* 把竖线接过它整棵子树,交给下一个兄弟。子节点之间、分支行与子层之间的间距由线向上下伸出补齐,竖线不断开。
|
|
390
390
|
* 只画在竖排的子层里:顶层节点没有父节点可连,横排的末端层没有行首可接。
|
|
391
391
|
* 首个与末位子节点按子层里的结构次序认:子层里只放节点,收起的子树整块不显示、不影响次序。
|
|
392
|
-
*
|
|
392
|
+
* 颜色取 border-default,与容器描边同一档;行悬停与选中换面时线压在面上照样看得见
|
|
393
393
|
*/
|
|
394
394
|
.xh-scope-tree[data-part='tree'][data-lines] .xh-scope-tree[data-part='branch-content'] {
|
|
395
395
|
position: relative;
|
|
@@ -406,19 +406,19 @@
|
|
|
406
406
|
var(--xh-tree-indent, var(--xh-_tree-indent))
|
|
407
407
|
);
|
|
408
408
|
--xh-_tree-line-top: 0px;
|
|
409
|
-
--xh-_tree-line-bottom: var(--xh-tree-branch-content-gap, var(--xh-
|
|
409
|
+
--xh-_tree-line-bottom: var(--xh-tree-branch-content-gap, var(--xh-space-0));
|
|
410
410
|
|
|
411
411
|
position: relative;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
.xh-scope-tree[data-part='tree'][data-lines] .xh-scope-tree[data-part='branch-content'][data-orientation='vertical'] > .xh-scope-tree[data-part='item']:first-child,
|
|
415
415
|
.xh-scope-tree[data-part='tree'][data-lines] .xh-scope-tree[data-part='branch-content'][data-orientation='vertical'] > .xh-scope-tree[data-part='branch']:first-child > .xh-scope-tree[data-part='branch-control'] {
|
|
416
|
-
--xh-_tree-line-top: var(--xh-tree-branch-gap, var(--xh-
|
|
416
|
+
--xh-_tree-line-top: var(--xh-tree-branch-gap, var(--xh-space-0));
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
/* 展开着的非末位分支:行下面先是它自己的子层,竖线只伸到子层顶上,余下那段由子层接着画 */
|
|
420
420
|
.xh-scope-tree[data-part='tree'][data-lines] .xh-scope-tree[data-part='branch-content'][data-orientation='vertical'] > .xh-scope-tree[data-part='branch'] > .xh-scope-tree[data-part='branch-control'][data-state='open'] {
|
|
421
|
-
--xh-_tree-line-bottom: var(--xh-tree-branch-gap, var(--xh-
|
|
421
|
+
--xh-_tree-line-bottom: var(--xh-tree-branch-gap, var(--xh-space-0));
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
.xh-scope-tree[data-part='tree'][data-lines] .xh-scope-tree[data-part='branch-content'][data-orientation='vertical'] > .xh-scope-tree[data-part='item']::before,
|
|
@@ -429,9 +429,9 @@
|
|
|
429
429
|
inset-inline-start: var(--xh-_tree-line-x);
|
|
430
430
|
/* 分支横出到展开箭头盒的起点;叶子没有箭头,横线穿过占位那一格接到正文前 */
|
|
431
431
|
inline-size: calc(var(--xh-tree-row-px, var(--xh-_tree-row-px)) - var(--xh-_tree-line-x));
|
|
432
|
-
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-
|
|
432
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-default));
|
|
433
433
|
/* 横出的那段落在行的中线:线盒上下伸出的量不对称时按差值的一半补回 */
|
|
434
|
-
background: linear-gradient(var(--xh-tree-line-color, var(--xh-border-
|
|
434
|
+
background: linear-gradient(var(--xh-tree-line-color, var(--xh-border-default)), var(--xh-tree-line-color, var(--xh-border-default)))
|
|
435
435
|
0 calc(50% + (var(--xh-_tree-line-top) - var(--xh-_tree-line-bottom)) / 2) / 100% var(--xh-stroke-thin) no-repeat;
|
|
436
436
|
pointer-events: none;
|
|
437
437
|
}
|
|
@@ -448,7 +448,7 @@
|
|
|
448
448
|
.xh-scope-tree[data-part='tree'][data-lines] .xh-scope-tree[data-part='branch-content'][data-orientation='vertical'] > .xh-scope-tree[data-part='item']:last-child::before,
|
|
449
449
|
.xh-scope-tree[data-part='tree'][data-lines] .xh-scope-tree[data-part='branch-content'][data-orientation='vertical'] > .xh-scope-tree[data-part='branch']:last-child > .xh-scope-tree[data-part='branch-control']::before {
|
|
450
450
|
inset-block-end: calc(50% - var(--xh-stroke-thin) / 2);
|
|
451
|
-
border-block-end: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-
|
|
451
|
+
border-block-end: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-default));
|
|
452
452
|
background: none;
|
|
453
453
|
}
|
|
454
454
|
|
|
@@ -457,14 +457,14 @@
|
|
|
457
457
|
.xh-scope-tree[data-part='tree'][data-lines] .xh-scope-tree[data-part='branch-content'][data-orientation='vertical'] > .xh-scope-tree[data-part='branch']:not(:last-child) > .xh-scope-tree[data-part='branch-content']::after {
|
|
458
458
|
content: '';
|
|
459
459
|
position: absolute;
|
|
460
|
-
inset-block: 0 calc(var(--xh-tree-branch-content-gap, var(--xh-
|
|
460
|
+
inset-block: 0 calc(var(--xh-tree-branch-content-gap, var(--xh-space-0)) * -1);
|
|
461
461
|
inset-inline-start: calc(
|
|
462
462
|
var(--xh-tree-row-px, var(--xh-_tree-row-px)) +
|
|
463
463
|
var(--xh-tree-indicator-size, var(--xh-_tree-indicator)) / 2 -
|
|
464
464
|
var(--xh-stroke-thin) / 2 -
|
|
465
465
|
var(--xh-tree-indent, var(--xh-_tree-indent))
|
|
466
466
|
);
|
|
467
|
-
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-
|
|
467
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-tree-line-color, var(--xh-border-default));
|
|
468
468
|
pointer-events: none;
|
|
469
469
|
}
|
|
470
470
|
|
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
flex-flow: row wrap;
|
|
475
475
|
align-items: center;
|
|
476
476
|
column-gap: var(--xh-tree-leaf-row-gap, var(--xh-space-3));
|
|
477
|
-
row-gap: var(--xh-tree-branch-content-gap, var(--xh-
|
|
477
|
+
row-gap: var(--xh-tree-branch-content-gap, var(--xh-space-0));
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
/* 横排的一层里节点并排,行盒不能再各自吃满一行 */
|
|
@@ -499,8 +499,8 @@
|
|
|
499
499
|
block-size: var(--xh-icon-size, var(--xh-glyph-size-text));
|
|
500
500
|
vertical-align: var(--xh-glyph-baseline-shift);
|
|
501
501
|
background-color: currentColor;
|
|
502
|
-
-webkit-mask: var(--xh-glyph-mark-chevron-right) center /
|
|
503
|
-
mask: var(--xh-glyph-mark-chevron-right) center /
|
|
502
|
+
-webkit-mask: var(--xh-glyph-mark-chevron-right) center / 75% no-repeat;
|
|
503
|
+
mask: var(--xh-glyph-mark-chevron-right) center / 75% no-repeat;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
/* 勾与半选杠叠成两层遮罩,按状态只换两层的尺寸:离开半选淡出的那一段里横杠留着,
|
|
@@ -529,10 +529,11 @@
|
|
|
529
529
|
transition-delay: 0s;
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
/*
|
|
532
|
+
/* 这一枝在取子节点:展开箭头换成品牌色的转圈,不再按开合转向 */
|
|
533
533
|
.xh-scope-tree[data-part='branch'][data-loading] > .xh-scope-tree[data-part='branch-control'] .xh-scope-tree[data-part='branch-trigger'],
|
|
534
534
|
.xh-scope-tree[data-part='branch'][data-loading] > .xh-scope-tree[data-part='branch-control'] .xh-scope-tree[data-part='branch-indicator'] {
|
|
535
535
|
rotate: none;
|
|
536
|
+
color: var(--xh-tree-branch-loading-fg, var(--xh-fg-brand));
|
|
536
537
|
}
|
|
537
538
|
|
|
538
539
|
.xh-scope-tree[data-part='branch'][data-loading] > .xh-scope-tree[data-part='branch-control'] .xh-scope-tree[data-part='branch-trigger']:empty::before,
|
package/dist/css/typography.css
CHANGED
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
--xh-_typography-body-size: var(--xh-text-body-size);
|
|
28
28
|
--xh-_typography-block-gap: var(--xh-space-4);
|
|
29
29
|
--xh-_typography-heading-gap: var(--xh-space-6);
|
|
30
|
-
|
|
31
|
-
--xh-_typography-
|
|
32
|
-
--xh-_typography-
|
|
33
|
-
--xh-_typography-
|
|
34
|
-
--xh-_typography-
|
|
35
|
-
--xh-_typography-
|
|
30
|
+
/* 六级标题沿字号阶梯从 36 逐档降到 16:最小的 h6 仍比正文大一号 */
|
|
31
|
+
--xh-_typography-h1: var(--xh-font-size-5xl);
|
|
32
|
+
--xh-_typography-h2: var(--xh-font-size-4xl);
|
|
33
|
+
--xh-_typography-h3: var(--xh-font-size-3xl);
|
|
34
|
+
--xh-_typography-h4: var(--xh-font-size-2xl);
|
|
35
|
+
--xh-_typography-h5: var(--xh-font-size-xl);
|
|
36
|
+
--xh-_typography-h6: var(--xh-font-size-lg);
|
|
36
37
|
/* 读行宽度:整块正文不收窄就会拉成一行行难读的长句 */
|
|
37
38
|
--xh-_typography-measure: 68ch;
|
|
38
39
|
/* 行内代码跟着所在那行的字号缩:以「随文字走」的字形尺寸为基数按比例收一点,不取固定档位 */
|
|
@@ -64,15 +65,15 @@
|
|
|
64
65
|
--xh-_typography-body-size: var(--xh-font-size-sm);
|
|
65
66
|
--xh-_typography-block-gap: var(--xh-space-3);
|
|
66
67
|
--xh-_typography-heading-gap: var(--xh-space-5);
|
|
67
|
-
--xh-_typography-h1: var(--xh-font-size-
|
|
68
|
-
--xh-_typography-h2: var(--xh-font-size-
|
|
69
|
-
--xh-_typography-h3: var(--xh-font-size-
|
|
70
|
-
--xh-_typography-h4: var(--xh-font-size-
|
|
71
|
-
--xh-_typography-h5: var(--xh-font-size-
|
|
72
|
-
--xh-_typography-h6: var(--xh-font-size-
|
|
68
|
+
--xh-_typography-h1: var(--xh-font-size-4xl);
|
|
69
|
+
--xh-_typography-h2: var(--xh-font-size-3xl);
|
|
70
|
+
--xh-_typography-h3: var(--xh-font-size-2xl);
|
|
71
|
+
--xh-_typography-h4: var(--xh-font-size-xl);
|
|
72
|
+
--xh-_typography-h5: var(--xh-font-size-lg);
|
|
73
|
+
--xh-_typography-h6: var(--xh-font-size-md);
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
/* 大档只放大正文与段距:标题档位在
|
|
76
|
+
/* 大档只放大正文与段距:标题档位在 5xl 见顶,六档保持原样 */
|
|
76
77
|
.xh-scope-typography[data-part='root'][data-size='lg'] {
|
|
77
78
|
--xh-_typography-body-size: var(--xh-font-size-lg);
|
|
78
79
|
--xh-_typography-block-gap: var(--xh-space-5);
|
|
@@ -123,7 +124,7 @@
|
|
|
123
124
|
.xh-scope-typography[data-part='heading'] {
|
|
124
125
|
color: var(--xh-typography-heading-fg, var(--xh-fg-default));
|
|
125
126
|
font-size: var(--xh-typography-heading-font-size, var(--xh-_typography-h3));
|
|
126
|
-
font-weight: var(--xh-typography-heading-font-weight, var(--xh-font-weight-
|
|
127
|
+
font-weight: var(--xh-typography-heading-font-weight, var(--xh-font-weight-medium));
|
|
127
128
|
line-height: var(--xh-typography-heading-leading, var(--xh-leading-tight));
|
|
128
129
|
/* 标题折行时把各行拉得一样长 */
|
|
129
130
|
text-wrap: balance;
|
|
@@ -177,14 +178,15 @@
|
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
.xh-scope-typography[data-part='text'][data-variant='strong'] {
|
|
180
|
-
font-weight: var(--xh-typography-text-font-weight, var(--xh-font-weight-
|
|
181
|
+
font-weight: var(--xh-typography-text-font-weight, var(--xh-font-weight-medium));
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
.xh-scope-typography[data-part='text'][data-variant='code'] {
|
|
184
185
|
padding-block: var(--xh-typography-code-py, var(--xh-space-0_5));
|
|
185
|
-
padding-inline: var(--xh-typography-code-px, var(--xh-space-
|
|
186
|
+
padding-inline: var(--xh-typography-code-px, var(--xh-space-2));
|
|
186
187
|
border-radius: var(--xh-typography-code-radius, var(--xh-shape-inset));
|
|
187
188
|
background: var(--xh-typography-code-bg, var(--xh-bg-subtle));
|
|
189
|
+
color: var(--xh-typography-code-fg, var(--xh-fg-muted));
|
|
188
190
|
font-family: var(--xh-typography-code-font, var(--xh-font-family-mono));
|
|
189
191
|
font-size: var(--xh-typography-code-font-size, var(--xh-_typography-code-size));
|
|
190
192
|
}
|
|
@@ -214,8 +216,8 @@
|
|
|
214
216
|
.xh-scope-typography[data-part='text'][data-marked] {
|
|
215
217
|
padding-inline: var(--xh-typography-mark-px, var(--xh-space-0_5));
|
|
216
218
|
border-radius: var(--xh-typography-mark-radius, var(--xh-shape-inset));
|
|
217
|
-
background: var(--xh-typography-mark-bg, var(--xh-bg-
|
|
218
|
-
color: var(--xh-typography-mark-fg, var(--xh-fg-
|
|
219
|
+
background: var(--xh-typography-mark-bg, var(--xh-bg-mark));
|
|
220
|
+
color: var(--xh-typography-mark-fg, var(--xh-fg-default));
|
|
219
221
|
-webkit-box-decoration-break: clone;
|
|
220
222
|
box-decoration-break: clone;
|
|
221
223
|
}
|
|
@@ -330,7 +332,7 @@
|
|
|
330
332
|
|
|
331
333
|
.xh-scope-typography[data-part='prose'] :where(h1, h2, h3, h4, h5, h6) {
|
|
332
334
|
color: var(--xh-typography-prose-heading-fg, var(--xh-fg-default));
|
|
333
|
-
font-weight: var(--xh-typography-prose-heading-font-weight, var(--xh-font-weight-
|
|
335
|
+
font-weight: var(--xh-typography-prose-heading-font-weight, var(--xh-font-weight-medium));
|
|
334
336
|
line-height: var(--xh-leading-tight);
|
|
335
337
|
text-wrap: balance;
|
|
336
338
|
}
|
|
@@ -362,7 +364,7 @@
|
|
|
362
364
|
|
|
363
365
|
/* 列表:项目符号要留在容器里面,缩进画在列表自己的起始内衬上 */
|
|
364
366
|
.xh-scope-typography[data-part='prose'] :where(ul, ol) {
|
|
365
|
-
padding-inline-start: var(--xh-typography-prose-list-ps, var(--xh-space-
|
|
367
|
+
padding-inline-start: var(--xh-typography-prose-list-ps, var(--xh-space-5));
|
|
366
368
|
}
|
|
367
369
|
|
|
368
370
|
.xh-scope-typography[data-part='prose'] :where(li + li) {
|
|
@@ -386,15 +388,16 @@
|
|
|
386
388
|
}
|
|
387
389
|
|
|
388
390
|
.xh-scope-typography[data-part='prose'] :where(strong) {
|
|
389
|
-
font-weight: var(--xh-typography-prose-strong-font-weight, var(--xh-font-weight-
|
|
391
|
+
font-weight: var(--xh-typography-prose-strong-font-weight, var(--xh-font-weight-medium));
|
|
390
392
|
}
|
|
391
393
|
|
|
392
394
|
/* 行内代码与 text 部件的 code 形态同源,同一块正文里两条路写出来一个样 */
|
|
393
395
|
.xh-scope-typography[data-part='prose'] :where(code) {
|
|
394
396
|
padding-block: var(--xh-typography-code-py, var(--xh-space-0_5));
|
|
395
|
-
padding-inline: var(--xh-typography-code-px, var(--xh-space-
|
|
397
|
+
padding-inline: var(--xh-typography-code-px, var(--xh-space-2));
|
|
396
398
|
border-radius: var(--xh-typography-code-radius, var(--xh-shape-inset));
|
|
397
399
|
background: var(--xh-typography-code-bg, var(--xh-bg-subtle));
|
|
400
|
+
color: var(--xh-typography-code-fg, var(--xh-fg-muted));
|
|
398
401
|
font-family: var(--xh-typography-code-font, var(--xh-font-family-mono));
|
|
399
402
|
font-size: var(--xh-typography-code-font-size, var(--xh-_typography-code-size));
|
|
400
403
|
}
|
|
@@ -418,10 +421,10 @@
|
|
|
418
421
|
}
|
|
419
422
|
|
|
420
423
|
.xh-scope-typography[data-part='prose'] :where(blockquote) {
|
|
421
|
-
padding-inline-start: var(--xh-typography-prose-quote-ps, var(--xh-space-
|
|
424
|
+
padding-inline-start: var(--xh-typography-prose-quote-ps, var(--xh-space-2));
|
|
422
425
|
border-inline-start: var(--xh-stroke-thick) solid
|
|
423
|
-
var(--xh-typography-prose-quote-border, var(--xh-border-
|
|
424
|
-
color: var(--xh-typography-prose-quote-fg,
|
|
426
|
+
var(--xh-typography-prose-quote-border, var(--xh-border-strong));
|
|
427
|
+
color: var(--xh-typography-prose-quote-fg, inherit);
|
|
425
428
|
}
|
|
426
429
|
|
|
427
430
|
.xh-scope-typography[data-part='prose'] :where(hr) {
|