@xihan-ui/styles 3.1.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 +470 -0
- package/component-tokens.d.ts +230 -60
- package/components.tokens.json +5156 -1557
- package/css/accordion.css +47 -20
- package/css/alert.css +16 -17
- package/css/anchor.css +2 -2
- package/css/approval.css +41 -17
- 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 +13 -12
- package/css/calendar-picker.css +178 -95
- package/css/calendar-range-picker.css +207 -122
- package/css/card.css +34 -6
- package/css/carousel.css +94 -46
- package/css/cartesian-chart.css +11 -11
- package/css/cascader.css +51 -39
- package/css/checkbox-group.css +9 -6
- package/css/checkbox.css +5 -4
- package/css/citation.css +9 -4
- package/css/clipboard.css +20 -4
- package/css/code-view.css +6 -6
- 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 +14 -9
- package/css/combobox.css +26 -14
- package/css/command.css +14 -9
- package/css/context-menu.css +10 -5
- package/css/date-field.css +12 -6
- package/css/date-picker.css +178 -109
- package/css/date-range-picker.css +199 -130
- package/css/description.css +10 -6
- package/css/descriptions.css +47 -19
- package/css/dialog.css +50 -35
- package/css/diff-view.css +8 -8
- package/css/drawer.css +75 -21
- package/css/editable.css +15 -41
- package/css/empty-state.css +21 -3
- package/css/field-array.css +5 -2
- package/css/field.css +17 -18
- package/css/fieldset.css +33 -13
- package/css/file-upload.css +66 -33
- package/css/float-button.css +60 -35
- package/css/floating-panel.css +1 -1
- package/css/form.css +30 -16
- package/css/graph-chart.css +2 -2
- package/css/grid-list.css +1 -1
- package/css/highlight.css +5 -5
- package/css/hover-card.css +19 -12
- package/css/image-viewer.css +77 -27
- package/css/image.css +13 -5
- 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 +11 -9
- package/css/menu.css +10 -5
- package/css/menubar.css +13 -8
- package/css/message-feed.css +1 -1
- package/css/navigation-menu.css +2 -2
- package/css/notification.css +132 -49
- package/css/number-animation.css +2 -2
- package/css/number-field.css +75 -52
- package/css/page-header.css +64 -27
- package/css/pagination.css +35 -38
- package/css/password-input.css +12 -68
- package/css/pin-input.css +18 -26
- package/css/popconfirm.css +23 -14
- package/css/popover.css +18 -12
- package/css/progress.css +14 -13
- package/css/prompt-input.css +3 -3
- package/css/question-flow.css +41 -15
- package/css/radar-chart.css +6 -6
- package/css/radio-group.css +120 -55
- package/css/rating.css +32 -15
- package/css/select.css +16 -12
- package/css/separator.css +24 -6
- package/css/side-nav.css +29 -24
- package/css/signature-pad.css +23 -9
- package/css/skeleton.css +12 -12
- package/css/slider.css +77 -48
- package/css/sortable.css +2 -2
- 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 +29 -12
- package/css/tabs.css +35 -12
- package/css/tag-group.css +17 -6
- package/css/tag.css +54 -29
- package/css/tags-input.css +39 -20
- 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 +13 -11
- package/css/toolbar.css +6 -5
- package/css/tooltip.css +16 -17
- package/css/tour.css +14 -7
- package/css/transfer.css +22 -16
- package/css/tree-select.css +12 -12
- package/css/tree.css +26 -25
- package/css/typography.css +28 -25
- package/dist/css/accordion.css +296 -0
- package/dist/css/affix.css +47 -0
- package/dist/css/alert.css +246 -0
- package/dist/css/anchor.css +252 -0
- package/dist/css/approval.css +525 -0
- package/dist/css/avatar-group.css +96 -0
- package/dist/css/avatar.css +100 -0
- package/dist/css/back-top.css +175 -0
- package/dist/css/badge.css +205 -0
- package/dist/css/bar-code.css +62 -0
- package/dist/css/breadcrumb.css +232 -0
- package/dist/css/button-group.css +261 -0
- package/dist/css/button.css +216 -0
- package/dist/css/calendar-picker.css +550 -0
- package/dist/css/calendar-range-picker.css +639 -0
- package/dist/css/card.css +249 -0
- package/dist/css/carousel.css +726 -0
- package/dist/css/cartesian-chart.css +830 -0
- package/dist/css/cascader.css +973 -0
- package/dist/css/checkbox-group.css +361 -0
- package/dist/css/checkbox.css +258 -0
- package/dist/css/citation.css +475 -0
- package/dist/css/clipboard.css +331 -0
- package/dist/css/code-view.css +374 -0
- package/dist/css/collapsible.css +200 -0
- package/dist/css/color-field.css +176 -0
- package/dist/css/color-picker.css +649 -0
- package/dist/css/color-slider.css +283 -0
- package/dist/css/color-swatch-picker.css +250 -0
- package/dist/css/color-swatch.css +35 -0
- package/dist/css/combobox.css +578 -0
- package/dist/css/command.css +404 -0
- package/dist/css/context-menu.css +425 -0
- package/dist/css/date-field.css +317 -0
- package/dist/css/date-picker.css +931 -0
- package/dist/css/date-range-picker.css +949 -0
- package/dist/css/description.css +71 -0
- package/dist/css/descriptions.css +327 -0
- package/dist/css/dialog.css +470 -0
- package/dist/css/diff-view.css +513 -0
- package/dist/css/download-trigger.css +151 -0
- package/dist/css/drawer.css +606 -0
- package/dist/css/editable.css +269 -0
- package/dist/css/empty-state.css +181 -0
- package/dist/css/field-array.css +229 -0
- package/dist/css/field.css +165 -0
- package/dist/css/fieldset.css +122 -0
- package/dist/css/file-upload.css +462 -0
- package/dist/css/flex.css +441 -0
- package/dist/css/float-button.css +579 -0
- package/dist/css/floating-panel.css +429 -0
- package/dist/css/focus.css +46 -0
- package/dist/css/forced-colors.css +93 -0
- package/dist/css/form.css +407 -0
- package/dist/css/funnel-chart.css +106 -0
- package/dist/css/graph-chart.css +205 -0
- package/dist/css/grid-list.css +235 -0
- package/dist/css/grid.css +1201 -0
- package/dist/css/heatmap.css +552 -0
- package/dist/css/hierarchy-chart.css +298 -0
- package/dist/css/highlight.css +41 -0
- package/dist/css/hover-card.css +233 -0
- package/dist/css/icon.css +225 -0
- package/dist/css/image-cropper.css +373 -0
- package/dist/css/image-viewer.css +588 -0
- package/dist/css/image.css +106 -0
- package/dist/css/infinite-scroll.css +81 -0
- package/dist/css/input-group.css +323 -0
- package/dist/css/json-viewer.css +379 -0
- package/dist/css/kbd.css +72 -0
- package/dist/css/label.css +94 -0
- package/dist/css/layers.css +7 -0
- package/dist/css/layout.css +379 -0
- package/dist/css/liquid.css +106 -0
- package/dist/css/list.css +156 -0
- package/dist/css/listbox.css +395 -0
- package/dist/css/loading-bar.css +144 -0
- package/dist/css/log.css +306 -0
- package/dist/css/markdown-stream.css +149 -0
- package/dist/css/marquee.css +378 -0
- package/dist/css/masonry.css +70 -0
- package/dist/css/matrix-code.css +67 -0
- package/dist/css/mention.css +395 -0
- package/dist/css/menu.css +369 -0
- package/dist/css/menubar.css +461 -0
- package/dist/css/message-feed.css +318 -0
- package/dist/css/navigation-menu.css +513 -0
- package/dist/css/notification.css +865 -0
- package/dist/css/number-animation.css +44 -0
- package/dist/css/number-field.css +275 -0
- package/dist/css/overlay-arrow.css +56 -0
- package/dist/css/page-header.css +221 -0
- package/dist/css/pagination.css +447 -0
- package/dist/css/password-input.css +335 -0
- package/dist/css/pie-chart.css +247 -0
- package/dist/css/pin-input.css +191 -0
- package/dist/css/pointer.css +36 -0
- package/dist/css/popconfirm.css +329 -0
- package/dist/css/popover.css +285 -0
- package/dist/css/progress.css +502 -0
- package/dist/css/prompt-input.css +260 -0
- package/dist/css/question-flow.css +579 -0
- package/dist/css/radar-chart.css +233 -0
- package/dist/css/radio-group.css +663 -0
- package/dist/css/rating.css +311 -0
- package/dist/css/reasoning.css +343 -0
- package/dist/css/reset.css +117 -0
- package/dist/css/resizable.css +242 -0
- package/dist/css/sankey-chart.css +174 -0
- package/dist/css/scroll-area.css +240 -0
- package/dist/css/scrollbar.css +204 -0
- package/dist/css/select.css +616 -0
- package/dist/css/separator.css +140 -0
- package/dist/css/side-nav.css +481 -0
- package/dist/css/signature-pad.css +193 -0
- package/dist/css/skeleton.css +161 -0
- package/dist/css/slider.css +403 -0
- package/dist/css/sortable.css +228 -0
- package/dist/css/sparkline.css +170 -0
- package/dist/css/spinner.css +256 -0
- package/dist/css/splitter.css +159 -0
- package/dist/css/statistic.css +137 -0
- package/dist/css/steps.css +658 -0
- package/dist/css/switch.css +353 -0
- package/dist/css/table.css +1162 -0
- package/dist/css/tabs.css +967 -0
- package/dist/css/tag-group.css +258 -0
- package/dist/css/tag.css +335 -0
- package/dist/css/tags-input.css +341 -0
- package/dist/css/text-field.css +197 -0
- package/dist/css/time-field.css +277 -0
- package/dist/css/time-picker.css +793 -0
- package/dist/css/time-range-picker.css +775 -0
- package/dist/css/timeline.css +440 -0
- package/dist/css/timer.css +123 -0
- package/dist/css/timestamp.css +34 -0
- package/dist/css/toggle-group.css +424 -0
- package/dist/css/toggle.css +146 -0
- package/dist/css/tone.css +189 -0
- package/dist/css/tool-call.css +431 -0
- package/dist/css/toolbar.css +366 -0
- package/dist/css/tooltip.css +217 -0
- package/dist/css/tour.css +446 -0
- package/dist/css/transfer.css +644 -0
- package/dist/css/tree-select.css +878 -0
- package/dist/css/tree.css +734 -0
- package/dist/css/truncate.css +108 -0
- package/dist/css/typography.css +475 -0
- package/dist/css/undefined.css +58 -0
- package/dist/css/virtualizer.css +166 -0
- package/dist/css/visually-hidden.css +20 -0
- package/dist/css/watermark.css +82 -0
- package/dist/family/action-control.css +493 -0
- package/dist/family/chart.css +537 -0
- package/dist/family/check-mark.css +94 -0
- package/dist/family/choice-card.css +97 -0
- package/dist/family/collection-item.css +768 -0
- package/dist/family/field-chrome.css +296 -0
- package/dist/family/loading-ring.css +102 -0
- package/dist/family/material.css +72 -0
- package/dist/family/menu-choice.css +56 -0
- package/dist/family/motion.css +363 -0
- package/dist/family/swatch.css +59 -0
- package/dist/family/tag-list.css +65 -0
- package/family/action-control.css +33 -36
- 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 +10349 -8756
- package/index.unlayered.css +10350 -8758
- package/package.json +165 -164
package/css/cascader.css
CHANGED
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
--xh-_cascader-h: var(--xh-control-h-md);
|
|
76
76
|
--xh-_cascader-px: var(--xh-control-px-md);
|
|
77
77
|
--xh-_cascader-row-py: var(--xh-list-option-py-md);
|
|
78
|
+
--xh-_cascader-row-h: var(--xh-list-option-h-md);
|
|
78
79
|
--xh-_cascader-row-px: var(--xh-control-px-md);
|
|
79
80
|
--xh-_cascader-gap: var(--xh-control-gap-md);
|
|
80
81
|
--xh-_cascader-font-size: var(--xh-control-font-md);
|
|
@@ -108,6 +109,7 @@
|
|
|
108
109
|
--xh-_cascader-h: var(--xh-control-h-sm);
|
|
109
110
|
--xh-_cascader-px: var(--xh-control-px-sm);
|
|
110
111
|
--xh-_cascader-row-py: var(--xh-list-option-py-sm);
|
|
112
|
+
--xh-_cascader-row-h: var(--xh-list-option-h-sm);
|
|
111
113
|
--xh-_cascader-row-px: var(--xh-control-px-sm);
|
|
112
114
|
--xh-_cascader-gap: var(--xh-control-gap-sm);
|
|
113
115
|
--xh-_cascader-font-size: var(--xh-control-font-sm);
|
|
@@ -118,13 +120,16 @@
|
|
|
118
120
|
--xh-_cascader-h: var(--xh-control-h-lg);
|
|
119
121
|
--xh-_cascader-px: var(--xh-control-px-lg);
|
|
120
122
|
--xh-_cascader-row-py: var(--xh-list-option-py-lg);
|
|
123
|
+
--xh-_cascader-row-h: var(--xh-list-option-h-lg);
|
|
121
124
|
--xh-_cascader-row-px: var(--xh-control-px-lg);
|
|
122
125
|
--xh-_cascader-gap: var(--xh-control-gap-lg);
|
|
123
126
|
--xh-_cascader-font-size: var(--xh-control-font-lg);
|
|
124
127
|
}
|
|
125
128
|
|
|
126
129
|
[data-scope='cascader'][data-part='label'] {
|
|
127
|
-
|
|
130
|
+
/* 竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-cascader-label-gap 给多少最终就是多少 */
|
|
131
|
+
margin-block-end: calc(var(--xh-cascader-label-gap, var(--xh-space-2)) - var(--xh-cascader-gap, var(--xh-space-1)));
|
|
132
|
+
color: var(--xh-cascader-label-fg, var(--xh-fg-muted));
|
|
128
133
|
font-size: var(--xh-cascader-label-font-size, var(--xh-text-label-size));
|
|
129
134
|
font-weight: var(--xh-cascader-label-font-weight, var(--xh-text-label-weight));
|
|
130
135
|
line-height: var(--xh-leading-none);
|
|
@@ -132,7 +137,7 @@
|
|
|
132
137
|
|
|
133
138
|
/* 整个控件禁用会把 data-disabled 一路打到 label / value-text / indicator 上,各处观感保持一致 */
|
|
134
139
|
[data-scope='cascader'][data-part='label'][data-disabled] {
|
|
135
|
-
color: var(--xh-cascader-label-fg-disabled, var(--xh-fg-
|
|
140
|
+
color: var(--xh-cascader-label-fg-disabled, var(--xh-fg-muted));
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
/* 盒:描边、底色、圆角、控件高度、行内内衬、聚焦环、五态与悬停由 Field Chrome 家族画在这一层,
|
|
@@ -153,8 +158,6 @@
|
|
|
153
158
|
--xh-field-border-hover: var(--xh-cascader-control-border-hover, var(--xh-_field-variant-border-hover));
|
|
154
159
|
--xh-field-border-focus: var(--xh-cascader-control-border-focus, var(--xh-_field-variant-border-focus));
|
|
155
160
|
--xh-field-border-invalid: var(--xh-cascader-control-border-invalid, var(--xh-_field-variant-border-invalid));
|
|
156
|
-
--xh-field-ring-focus: var(--xh-ring-focus);
|
|
157
|
-
--xh-field-ring-invalid: var(--xh-ring-invalid);
|
|
158
161
|
--xh-field-shadow-rest: var(--xh-cascader-control-shadow, none);
|
|
159
162
|
--xh-field-cursor-rest: pointer;
|
|
160
163
|
/* 家族 chrome 会重写 --xh-icon-size,使用者图标槽必须经桥接槽下发才能在盒内生效 */
|
|
@@ -219,14 +222,14 @@
|
|
|
219
222
|
|
|
220
223
|
/* 标签行露面时 value-text 让位:两者是触发器里的同一格,占位文字与标签不同屏。
|
|
221
224
|
value-text 留在 DOM 里,trigger 的可及名仍从它取到完整的选中路径文本 */
|
|
222
|
-
[data-scope='cascader'][data-part='trigger']:has([data-part='tag-list']:not([hidden])) [data-part='value-text'] {
|
|
225
|
+
[data-scope='cascader'][data-part='trigger']:has([data-part='tag-list']:not([hidden])) [data-part='value-text']:where([data-scope='cascader']) {
|
|
223
226
|
display: none;
|
|
224
227
|
}
|
|
225
228
|
|
|
226
229
|
/* 有值时清空钮顶上来,箭头让位:两个图标并排堆着,用户分不清点哪个。
|
|
227
230
|
判据查的是盒里此刻真有一颗没收起的清空钮,不是「有没有值」——
|
|
228
231
|
作者没摆清空钮时箭头照常留着,不然让了位没人接,指示符整个消失 */
|
|
229
|
-
[data-scope='cascader'][data-part='control']:has([data-part='clear-trigger']:not([hidden])) [data-part='indicator'] {
|
|
232
|
+
[data-scope='cascader'][data-part='control']:has([data-part='clear-trigger']:not([hidden])) [data-part='indicator']:where([data-scope='cascader']) {
|
|
230
233
|
display: none;
|
|
231
234
|
}
|
|
232
235
|
|
|
@@ -303,7 +306,7 @@
|
|
|
303
306
|
align-items: stretch;
|
|
304
307
|
/* 面板的下界:搜索视图与两个占位没有列托底,靠这一条不缩成一小块;可用区比它还窄时让位。
|
|
305
308
|
可用宽写在定位层上、沿继承流下来 */
|
|
306
|
-
min-inline-size: min(var(--xh-cascader-content-min-w, var(--xh-overlay-
|
|
309
|
+
min-inline-size: min(var(--xh-cascader-content-min-w, var(--xh-overlay-cascade-min-w)), var(--xh-_cascader-available-w));
|
|
307
310
|
/* 列多起来时外框宽过可用区就收成可用宽度,溢出的列交给下面那条 overflow-x;
|
|
308
311
|
缺省不封顶,作者要封顶写 --xh-cascader-content-max-w */
|
|
309
312
|
max-inline-size: min(var(--xh-cascader-content-max-w, var(--xh-_cascader-available-w)), var(--xh-_cascader-available-w));
|
|
@@ -352,10 +355,10 @@
|
|
|
352
355
|
flex-direction: column;
|
|
353
356
|
gap: var(--xh-cascader-column-gap, var(--xh-list-option-gap));
|
|
354
357
|
/* 每一列按条目的自然宽度,受菜单的下界托底;长选项撑到条目的上限为止,余下的在条目里截断 */
|
|
355
|
-
min-inline-size: var(--xh-cascader-column-min-w, var(--xh-overlay-
|
|
358
|
+
min-inline-size: var(--xh-cascader-column-min-w, var(--xh-overlay-cascade-min-w));
|
|
356
359
|
block-size: var(--xh-cascader-column-h, var(--xh-viewport-h-sm));
|
|
357
360
|
padding-block: var(--xh-cascader-column-py, var(--xh-space-1));
|
|
358
|
-
padding-inline: var(--xh-cascader-column-px,
|
|
361
|
+
padding-inline: var(--xh-cascader-column-px, 0);
|
|
359
362
|
overflow-y: auto;
|
|
360
363
|
/* 浮层滚动面:滚到头不把页面一起带走 */
|
|
361
364
|
overscroll-behavior: contain;
|
|
@@ -378,7 +381,7 @@
|
|
|
378
381
|
用逻辑属性,rtl 下自动跑到另一侧。每列后面紧跟着它自己的竖条节点,相邻选择器接不到下一列,
|
|
379
382
|
按「前面有过列」取后续的列 */
|
|
380
383
|
[data-scope='cascader'][data-part='column'] ~ [data-scope='cascader'][data-part='column'] {
|
|
381
|
-
border-inline-start: var(--xh-stroke-thin) solid var(--xh-cascader-column-divider, var(--xh-material-solid-
|
|
384
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-cascader-column-divider, var(--xh-material-solid-border));
|
|
382
385
|
}
|
|
383
386
|
|
|
384
387
|
[data-scope='cascader'][data-part='column']:not([tabindex='0']):focus-visible {
|
|
@@ -407,9 +410,9 @@
|
|
|
407
410
|
display: block;
|
|
408
411
|
padding-block: var(--xh-cascader-group-label-py, var(--xh-space-1));
|
|
409
412
|
padding-inline: var(--xh-cascader-group-label-px, var(--xh-_cascader-row-px));
|
|
410
|
-
color: var(--xh-cascader-group-label-fg, var(--xh-fg-
|
|
413
|
+
color: var(--xh-cascader-group-label-fg, var(--xh-fg-subtle));
|
|
411
414
|
font-size: var(--xh-cascader-group-label-font-size, var(--xh-text-caption-size));
|
|
412
|
-
font-weight: var(--xh-cascader-group-label-font-weight, var(--xh-font-weight-
|
|
415
|
+
font-weight: var(--xh-cascader-group-label-font-weight, var(--xh-font-weight-regular));
|
|
413
416
|
line-height: var(--xh-leading-none);
|
|
414
417
|
user-select: none;
|
|
415
418
|
}
|
|
@@ -428,10 +431,11 @@
|
|
|
428
431
|
环只在真正的键盘焦点上接回,见下 */
|
|
429
432
|
[data-scope='cascader'][data-part='item'] {
|
|
430
433
|
--xh-collection-block-padding: var(--xh-cascader-item-py, var(--xh-_cascader-row-py));
|
|
434
|
+
--xh-collection-row-h: var(--xh-cascader-item-h, var(--xh-_cascader-row-h));
|
|
431
435
|
--xh-collection-inline-padding: var(--xh-cascader-item-px, var(--xh-_cascader-row-px));
|
|
432
436
|
--xh-collection-gap: var(--xh-cascader-item-gap, var(--xh-_cascader-gap));
|
|
433
437
|
--xh-collection-font-size: var(--xh-cascader-item-font-size, var(--xh-_cascader-font-size));
|
|
434
|
-
--xh-collection-radius: var(--xh-cascader-item-radius,
|
|
438
|
+
--xh-collection-radius: var(--xh-cascader-item-radius, 0);
|
|
435
439
|
--xh-collection-glyph-size: var(--xh-cascader-icon-size, var(--xh-_collection-glyph-size));
|
|
436
440
|
--xh-collection-fg-rest: var(--xh-cascader-item-fg, var(--xh-material-frosted-fg));
|
|
437
441
|
--xh-collection-fg-hover: var(--xh-cascader-item-fg, var(--xh-material-frosted-fg));
|
|
@@ -443,10 +447,10 @@
|
|
|
443
447
|
--xh-collection-fg-selected-pressed: var(--xh-cascader-item-fg-selected, var(--xh-cascader-item-fg, var(--xh-material-frosted-fg)));
|
|
444
448
|
--xh-collection-fg-pressed: var(--xh-cascader-item-fg, var(--xh-material-frosted-fg));
|
|
445
449
|
--xh-collection-font-weight-open-path: var(--xh-cascader-item-active-font-weight, var(--xh-font-weight-regular));
|
|
446
|
-
--xh-collection-font-weight-selected: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-
|
|
447
|
-
--xh-collection-font-weight-selected-highlight: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-
|
|
448
|
-
--xh-collection-font-weight-selected-hover: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-
|
|
449
|
-
--xh-collection-font-weight-selected-pressed: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-
|
|
450
|
+
--xh-collection-font-weight-selected: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
451
|
+
--xh-collection-font-weight-selected-highlight: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
452
|
+
--xh-collection-font-weight-selected-hover: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
453
|
+
--xh-collection-font-weight-selected-pressed: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
450
454
|
--xh-collection-bg-hover: var(--xh-cascader-item-bg-hover, var(--xh-bg-subtle));
|
|
451
455
|
--xh-collection-bg-keyboard-highlight: var(--xh-cascader-item-bg-hover, var(--xh-bg-subtle));
|
|
452
456
|
--xh-collection-bg-open-path: var(--xh-cascader-item-bg-active, var(--xh-bg-subtle));
|
|
@@ -503,29 +507,29 @@
|
|
|
503
507
|
/* 一列开幕:条目自上而下逐条淡入。只在列头一次出现时播(浮层展开、此前收着的子列铺出来);
|
|
504
508
|
列此前就在、展开路径换到同列另一个父项时(悬停扫过),连接层给露面的条目标 data-instant,
|
|
505
509
|
换内容不重播。backwards 让每条在自己那份延迟里保持起始帧 */
|
|
506
|
-
[data-scope='cascader'][data-part='column'] [data-part='item']:not([data-instant]) {
|
|
510
|
+
[data-scope='cascader'][data-part='column'] [data-part='item']:where([data-scope='cascader']):not([data-instant]) {
|
|
507
511
|
animation: xh-fade-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter) backwards;
|
|
508
512
|
}
|
|
509
513
|
|
|
510
514
|
/* 交错的间隔:第二条起逐级往后推,第六条起统一钉在第五级,条目再多也不会拖出一条越来越慢的尾巴。
|
|
511
515
|
列里同时挂着别的父节点下的条目(收起态),计数把它们排掉,序号才对得上看得见的那几条 */
|
|
512
|
-
[data-scope='cascader'][data-part='column'] [data-part='item']:nth-child(2 of :not([hidden])) {
|
|
516
|
+
[data-scope='cascader'][data-part='column'] [data-part='item']:where([data-scope='cascader']):nth-child(2 of :not([hidden])) {
|
|
513
517
|
animation-delay: var(--xh-motion-stagger-step);
|
|
514
518
|
}
|
|
515
519
|
|
|
516
|
-
[data-scope='cascader'][data-part='column'] [data-part='item']:nth-child(3 of :not([hidden])) {
|
|
520
|
+
[data-scope='cascader'][data-part='column'] [data-part='item']:where([data-scope='cascader']):nth-child(3 of :not([hidden])) {
|
|
517
521
|
animation-delay: calc(2 * var(--xh-motion-stagger-step));
|
|
518
522
|
}
|
|
519
523
|
|
|
520
|
-
[data-scope='cascader'][data-part='column'] [data-part='item']:nth-child(4 of :not([hidden])) {
|
|
524
|
+
[data-scope='cascader'][data-part='column'] [data-part='item']:where([data-scope='cascader']):nth-child(4 of :not([hidden])) {
|
|
521
525
|
animation-delay: calc(3 * var(--xh-motion-stagger-step));
|
|
522
526
|
}
|
|
523
527
|
|
|
524
|
-
[data-scope='cascader'][data-part='column'] [data-part='item']:nth-child(5 of :not([hidden])) {
|
|
528
|
+
[data-scope='cascader'][data-part='column'] [data-part='item']:where([data-scope='cascader']):nth-child(5 of :not([hidden])) {
|
|
525
529
|
animation-delay: calc(4 * var(--xh-motion-stagger-step));
|
|
526
530
|
}
|
|
527
531
|
|
|
528
|
-
[data-scope='cascader'][data-part='column'] [data-part='item']:nth-child(n + 6 of :not([hidden])) {
|
|
532
|
+
[data-scope='cascader'][data-part='column'] [data-part='item']:where([data-scope='cascader']):nth-child(n + 6 of :not([hidden])) {
|
|
529
533
|
animation-delay: calc(5 * var(--xh-motion-stagger-step));
|
|
530
534
|
}
|
|
531
535
|
|
|
@@ -549,9 +553,10 @@
|
|
|
549
553
|
inline-size: var(--xh-cascader-branch-arrow-size, var(--xh-control-indicator-size));
|
|
550
554
|
block-size: var(--xh-cascader-branch-arrow-size, var(--xh-control-indicator-size));
|
|
551
555
|
margin-inline-start: var(--xh-cascader-item-gap, var(--xh-_cascader-gap));
|
|
552
|
-
|
|
553
|
-
-
|
|
554
|
-
mask: var(--xh-glyph-mark-chevron-right) center /
|
|
556
|
+
/* 盒与标记盒同为 16px,字形只画四分之三(12px),比行里的文字轻一档 */
|
|
557
|
+
background-color: var(--xh-cascader-branch-arrow-fg, var(--xh-fg-muted));
|
|
558
|
+
-webkit-mask: var(--xh-glyph-mark-chevron-right) center / 75% no-repeat;
|
|
559
|
+
mask: var(--xh-glyph-mark-chevron-right) center / 75% no-repeat;
|
|
555
560
|
}
|
|
556
561
|
|
|
557
562
|
[data-scope='cascader'][data-part='item'][data-branch][data-disabled]::after {
|
|
@@ -651,7 +656,7 @@
|
|
|
651
656
|
padding-block: 0;
|
|
652
657
|
padding-inline: var(--xh-cascader-input-px, var(--xh-_cascader-px));
|
|
653
658
|
border: none;
|
|
654
|
-
border-block-end: var(--xh-stroke-thin) solid var(--xh-cascader-search-divider, var(--xh-material-solid-
|
|
659
|
+
border-block-end: var(--xh-stroke-thin) solid var(--xh-cascader-search-divider, var(--xh-material-solid-border));
|
|
655
660
|
border-start-start-radius: inherit;
|
|
656
661
|
border-start-end-radius: inherit;
|
|
657
662
|
background: none;
|
|
@@ -710,7 +715,7 @@
|
|
|
710
715
|
}
|
|
711
716
|
|
|
712
717
|
/* 搜索视图里列整体让位 */
|
|
713
|
-
[data-scope='cascader'][data-part='content'][data-searching] [data-part='column'] {
|
|
718
|
+
[data-scope='cascader'][data-part='content'][data-searching] [data-part='column']:where([data-scope='cascader']) {
|
|
714
719
|
display: none;
|
|
715
720
|
}
|
|
716
721
|
|
|
@@ -719,10 +724,11 @@
|
|
|
719
724
|
末端为同一枚皮肤对号预留固定轨 */
|
|
720
725
|
[data-scope='cascader'][data-part='search-item'] {
|
|
721
726
|
--xh-collection-block-padding: var(--xh-cascader-item-py, var(--xh-_cascader-row-py));
|
|
727
|
+
--xh-collection-row-h: var(--xh-cascader-item-h, var(--xh-_cascader-row-h));
|
|
722
728
|
--xh-collection-inline-padding: var(--xh-cascader-item-px, var(--xh-_cascader-row-px));
|
|
723
729
|
--xh-collection-gap: var(--xh-cascader-item-gap, var(--xh-_cascader-gap));
|
|
724
730
|
--xh-collection-font-size: var(--xh-cascader-item-font-size, var(--xh-_cascader-font-size));
|
|
725
|
-
--xh-collection-radius: var(--xh-cascader-item-radius,
|
|
731
|
+
--xh-collection-radius: var(--xh-cascader-item-radius, 0);
|
|
726
732
|
--xh-collection-fg-rest: var(--xh-cascader-item-fg, var(--xh-material-frosted-fg));
|
|
727
733
|
--xh-collection-fg-hover: var(--xh-cascader-item-fg, var(--xh-material-frosted-fg));
|
|
728
734
|
--xh-collection-fg-keyboard-highlight: var(--xh-cascader-item-fg, var(--xh-material-frosted-fg));
|
|
@@ -731,10 +737,10 @@
|
|
|
731
737
|
--xh-collection-fg-selected-hover: var(--xh-cascader-item-fg-selected, var(--xh-cascader-item-fg, var(--xh-material-frosted-fg)));
|
|
732
738
|
--xh-collection-fg-selected-pressed: var(--xh-cascader-item-fg-selected, var(--xh-cascader-item-fg, var(--xh-material-frosted-fg)));
|
|
733
739
|
--xh-collection-fg-pressed: var(--xh-cascader-item-fg, var(--xh-material-frosted-fg));
|
|
734
|
-
--xh-collection-font-weight-selected: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-
|
|
735
|
-
--xh-collection-font-weight-selected-highlight: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-
|
|
736
|
-
--xh-collection-font-weight-selected-hover: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-
|
|
737
|
-
--xh-collection-font-weight-selected-pressed: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-
|
|
740
|
+
--xh-collection-font-weight-selected: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
741
|
+
--xh-collection-font-weight-selected-highlight: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
742
|
+
--xh-collection-font-weight-selected-hover: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
743
|
+
--xh-collection-font-weight-selected-pressed: var(--xh-cascader-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
738
744
|
--xh-collection-bg-hover: var(--xh-cascader-item-bg-hover, var(--xh-bg-subtle));
|
|
739
745
|
--xh-collection-bg-keyboard-highlight: var(--xh-cascader-item-bg-hover, var(--xh-bg-subtle));
|
|
740
746
|
--xh-collection-bg-selected-highlight: var(--xh-cascader-item-bg-hover, var(--xh-bg-subtle));
|
|
@@ -809,7 +815,7 @@
|
|
|
809
815
|
|
|
810
816
|
/* —— 空态:当前视图没有条目时由 empty 部件出面,文案由适配器或作者供给,皮肤只管排版 —— */
|
|
811
817
|
/* 根列没有条目时那条空列让位,占位面接管整个浮层 */
|
|
812
|
-
[data-scope='cascader'][data-part='content'][data-empty] [data-part='column'] {
|
|
818
|
+
[data-scope='cascader'][data-part='content'][data-empty] [data-part='column']:where([data-scope='cascader']) {
|
|
813
819
|
display: none;
|
|
814
820
|
}
|
|
815
821
|
|
|
@@ -818,8 +824,10 @@
|
|
|
818
824
|
flex: 1 1 100%;
|
|
819
825
|
align-items: center;
|
|
820
826
|
justify-content: center;
|
|
827
|
+
/* 空态与在途占位撑到一列的高度,居中落在面板里,不缩成一条窄条 */
|
|
828
|
+
min-block-size: var(--xh-cascader-empty-min-h, var(--xh-viewport-h-sm));
|
|
821
829
|
padding: var(--xh-cascader-empty-p, var(--xh-space-3));
|
|
822
|
-
color: var(--xh-cascader-empty-fg, var(--xh-fg-
|
|
830
|
+
color: var(--xh-cascader-empty-fg, var(--xh-fg-subtle));
|
|
823
831
|
font-size: var(--xh-cascader-item-font-size, var(--xh-_cascader-font-size));
|
|
824
832
|
}
|
|
825
833
|
|
|
@@ -829,13 +837,17 @@
|
|
|
829
837
|
|
|
830
838
|
/* 在途占位:与空态占位同一个位置、同一副观感,两者不同屏 */
|
|
831
839
|
[data-scope='cascader'][data-part='loading'] {
|
|
840
|
+
/* 加载环取品牌色,文案仍是弱一档的前景 */
|
|
841
|
+
--xh-_loading-ring-fg: var(--xh-cascader-loading-ring-fg, var(--xh-fg-brand));
|
|
842
|
+
|
|
832
843
|
display: flex;
|
|
833
844
|
flex: 0 0 100%;
|
|
834
845
|
align-items: center;
|
|
835
846
|
justify-content: center;
|
|
836
847
|
gap: var(--xh-_cascader-gap);
|
|
848
|
+
min-block-size: var(--xh-cascader-loading-min-h, var(--xh-viewport-h-sm));
|
|
837
849
|
padding: var(--xh-cascader-loading-p, var(--xh-space-3));
|
|
838
|
-
color: var(--xh-cascader-loading-fg, var(--xh-fg-
|
|
850
|
+
color: var(--xh-cascader-loading-fg, var(--xh-fg-subtle));
|
|
839
851
|
font-size: var(--xh-cascader-loading-font-size, var(--xh-_cascader-font-size));
|
|
840
852
|
}
|
|
841
853
|
|
|
@@ -892,10 +904,10 @@
|
|
|
892
904
|
align-items: center;
|
|
893
905
|
gap: var(--xh-cascader-footer-gap, var(--xh-space-2));
|
|
894
906
|
padding-block: var(--xh-cascader-footer-py, var(--xh-space-2));
|
|
895
|
-
padding-inline: var(--xh-cascader-footer-px, var(--xh-
|
|
896
|
-
border-block-start: var(--xh-stroke-thin) solid var(--xh-cascader-footer-border, var(--xh-border
|
|
907
|
+
padding-inline: var(--xh-cascader-footer-px, var(--xh-_cascader-row-px));
|
|
908
|
+
border-block-start: var(--xh-stroke-thin) solid var(--xh-cascader-footer-border, var(--xh-material-solid-border));
|
|
897
909
|
color: var(--xh-cascader-footer-fg, var(--xh-fg-muted));
|
|
898
|
-
font-size: var(--xh-cascader-footer-font-size, var(--xh-
|
|
910
|
+
font-size: var(--xh-cascader-footer-font-size, var(--xh-_cascader-font-size));
|
|
899
911
|
}
|
|
900
912
|
|
|
901
913
|
/* 上面给了 display,UA 的 [hidden]{display:none} 已被盖掉,这里补回来 */
|
package/css/checkbox-group.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
没写 data-tone 时退回品牌色 */
|
|
33
33
|
--xh-_checkbox-group-accent: var(--xh-_tone-border-control, var(--xh-bg-brand));
|
|
34
34
|
--xh-_checkbox-group-on-accent: var(--xh-_tone-on, var(--xh-fg-on-brand));
|
|
35
|
-
/*
|
|
35
|
+
/* 方框是控件盒:透明底 + --xh-border-strong 描边(与 Checkbox 同一重量)+ 无影,不消费海拔与顶光 */
|
|
36
36
|
--xh-_checkbox-group-bg: var(--xh-checkbox-group-indicator-bg, transparent);
|
|
37
37
|
/* 条目与全选格是方框的承载面:行自己坐画布走 100 → 200,行面上的方框按淡底容器阶梯再上一档(200 → 300)。
|
|
38
38
|
两支私有槽是这一档的唯一来源——宿主拿它们给 --xh-action-host-bg-* 赋值(桥接槽只写不读),
|
|
@@ -125,13 +125,17 @@
|
|
|
125
125
|
--xh-action-host-bg-pressed: var(--xh-_checkbox-group-host-bg-pressed);
|
|
126
126
|
|
|
127
127
|
position: relative;
|
|
128
|
-
/* row 档铺满容器(inline-size: 100%)会把竖排的命中区拉到整行空白处、横排 wrap 也塌:
|
|
129
|
-
沿用「条目按内容收宽」的既有决定 */
|
|
130
|
-
inline-size: auto;
|
|
131
128
|
/* ghost 的 1px 透明边位会把方框列相对组标题错开 1px:边归零,几何保持不变 */
|
|
132
129
|
border-width: 0;
|
|
133
130
|
}
|
|
134
131
|
|
|
132
|
+
/* 条目与全选格按内容收宽,盖掉 row 档的 inline-size: 100%(竖排时命中区拉到整行空白处,横排时每格独占一行)。
|
|
133
|
+
从根往下写,特指度高过 row 档,有层与无层两份产物里都生效 */
|
|
134
|
+
[data-scope='checkbox-group'][data-part='root'] [data-scope='checkbox-group'][data-part='item'],
|
|
135
|
+
[data-scope='checkbox-group'][data-part='root'] [data-scope='checkbox-group'][data-part='select-all-trigger'] {
|
|
136
|
+
inline-size: auto;
|
|
137
|
+
}
|
|
138
|
+
|
|
135
139
|
/* 只读整组都改不动,但不是禁用:颜色照常,把整行的悬停 / 按下面与"可点"这个暗示一起收回来。
|
|
136
140
|
家族的 :hover / 按压块不排 readonly,只能从槽上收回;排掉禁用项是因为这条选择器权重高过家族的禁用块,
|
|
137
141
|
不排就会把 not-allowed 覆盖回 default */
|
|
@@ -156,7 +160,7 @@
|
|
|
156
160
|
justify-content: center;
|
|
157
161
|
inline-size: var(--xh-checkbox-group-indicator-size, var(--xh-_checkbox-group-box));
|
|
158
162
|
block-size: var(--xh-checkbox-group-indicator-size, var(--xh-_checkbox-group-box));
|
|
159
|
-
border: var(--xh-stroke-thin) solid var(--xh-checkbox-group-indicator-border, var(--xh-border-
|
|
163
|
+
border: var(--xh-stroke-thin) solid var(--xh-checkbox-group-indicator-border, var(--xh-border-strong));
|
|
160
164
|
border-radius: var(--xh-checkbox-group-indicator-radius, var(--xh-shape-inset));
|
|
161
165
|
background-color: var(--xh-_checkbox-group-bg);
|
|
162
166
|
color: var(--xh-checkbox-group-indicator-fg, var(--xh-_checkbox-group-on-accent));
|
|
@@ -301,7 +305,6 @@
|
|
|
301
305
|
--xh-check-mark-fg: var(--xh-checkbox-group-indicator-fg, var(--xh-_checkbox-group-on-accent));
|
|
302
306
|
|
|
303
307
|
position: relative;
|
|
304
|
-
inline-size: auto;
|
|
305
308
|
border-width: 0;
|
|
306
309
|
font-weight: var(--xh-checkbox-group-select-all-trigger-font-weight, var(--xh-font-weight-medium));
|
|
307
310
|
}
|
package/css/checkbox.css
CHANGED
|
@@ -28,14 +28,15 @@
|
|
|
28
28
|
/* 实心底上的勾与横杠,同样没写 data-tone 时退回原来的品牌底前景色 */
|
|
29
29
|
--xh-_checkbox-on-accent: var(--xh-_tone-on, var(--xh-fg-on-brand));
|
|
30
30
|
|
|
31
|
-
/* 方框接 Action Control icon 档(定尺方框):盒型、悬停 / 按下 /
|
|
32
|
-
|
|
33
|
-
--xh-border-
|
|
31
|
+
/* 方框接 Action Control icon 档(定尺方框):盒型、悬停 / 按下 / 禁用面、按压与换底、粗指针热区、
|
|
32
|
+
焦点环由家族配方给,这里只把使用者槽映射到桥接槽。面取控件盒的静息形态:透明底 +
|
|
33
|
+
--xh-border-strong 描边(比字段边重一档,小方框要一眼认得出)+ 无影,不消费海拔与顶光;
|
|
34
|
+
悬停只把描边升一档,底不动;按下换到 200 档中性面
|
|
34
35
|
(白底承载);边长随 --xh-control-indicator-* 走,不取家族的 profile 尺寸。
|
|
35
36
|
常态 / 勾中 / 校验失败 / 只读只换下面四支私有槽,桥接槽的映射写一次 */
|
|
36
37
|
--xh-_checkbox-bg: var(--xh-checkbox-bg, transparent);
|
|
37
38
|
--xh-_checkbox-bg-pressed: var(--xh-checkbox-bg-pressed, var(--xh-bg-subtle-hover));
|
|
38
|
-
--xh-_checkbox-border: var(--xh-checkbox-border, var(--xh-border-
|
|
39
|
+
--xh-_checkbox-border: var(--xh-checkbox-border, var(--xh-border-strong));
|
|
39
40
|
--xh-_checkbox-border-hover: var(--xh-checkbox-border-hover, var(--xh-border-control-hover));
|
|
40
41
|
|
|
41
42
|
--xh-action-visual-size: var(--xh-_checkbox-box);
|
package/css/citation.css
CHANGED
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
overflow: hidden;
|
|
275
275
|
color: var(--xh-citation-title-fg, var(--xh-fg-default));
|
|
276
276
|
font-size: var(--xh-citation-title-font-size, var(--xh-text-label-size));
|
|
277
|
-
font-weight: var(--xh-citation-title-font-weight, var(--xh-font-weight-
|
|
277
|
+
font-weight: var(--xh-citation-title-font-weight, var(--xh-font-weight-medium));
|
|
278
278
|
text-overflow: ellipsis;
|
|
279
279
|
white-space: nowrap;
|
|
280
280
|
}
|
|
@@ -355,12 +355,17 @@
|
|
|
355
355
|
--xh-action-radius: var(--xh-citation-source-radius, var(--xh-shape-control));
|
|
356
356
|
--xh-action-fg-rest: var(--xh-citation-source-fg, var(--xh-fg-default));
|
|
357
357
|
|
|
358
|
-
display: grid;
|
|
359
358
|
grid-template-columns: auto minmax(0, 1fr);
|
|
360
359
|
align-items: start;
|
|
361
360
|
text-align: start;
|
|
362
361
|
}
|
|
363
362
|
|
|
363
|
+
/* 排成「序号 | 标题 / 来源」两列,盖掉 row 档的 display: flex。选择器点名 row 档,
|
|
364
|
+
有层与无层两份产物里都压得住它;收起的来源行留给 [hidden] 那条 */
|
|
365
|
+
[data-scope='citation'][data-part='source-link'][data-xh-action-profile='row']:not([hidden]) {
|
|
366
|
+
display: grid;
|
|
367
|
+
}
|
|
368
|
+
|
|
364
369
|
[data-scope='citation'][data-part='source-link'][data-current] {
|
|
365
370
|
--xh-action-bg-rest: var(--xh-bg-brand-subtle);
|
|
366
371
|
--xh-action-bg-hover: var(--xh-bg-brand-subtle);
|
|
@@ -388,7 +393,7 @@
|
|
|
388
393
|
color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
389
394
|
}
|
|
390
395
|
|
|
391
|
-
[data-scope='citation'][data-part='source'][data-state='active'] [data-part='source-index'] {
|
|
396
|
+
[data-scope='citation'][data-part='source'][data-state='active'] [data-part='source-index']:where([data-scope='citation']) {
|
|
392
397
|
background: var(--xh-citation-index-active-bg, var(--xh-bg-brand));
|
|
393
398
|
color: var(--xh-citation-index-active-fg, var(--xh-fg-on-brand));
|
|
394
399
|
}
|
|
@@ -416,7 +421,7 @@
|
|
|
416
421
|
}
|
|
417
422
|
|
|
418
423
|
@media (forced-colors: active) {
|
|
419
|
-
[data-scope='citation'][data-part='source'][data-state='active'] [data-part='source-index'] {
|
|
424
|
+
[data-scope='citation'][data-part='source'][data-state='active'] [data-part='source-index']:where([data-scope='citation']) {
|
|
420
425
|
background: Highlight;
|
|
421
426
|
color: HighlightText;
|
|
422
427
|
}
|
package/css/clipboard.css
CHANGED
|
@@ -72,8 +72,11 @@
|
|
|
72
72
|
display: none;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/* 带输入框的用法是一件单行字段,标签与其余字段同一副字段标签排版:次要文字色、标签字号字重。
|
|
76
|
+
竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-clipboard-label-gap 给多少最终就是多少 */
|
|
75
77
|
[data-scope='clipboard'][data-part='label'] {
|
|
76
|
-
|
|
78
|
+
margin-block-end: calc(var(--xh-clipboard-label-gap, var(--xh-space-2)) - var(--xh-clipboard-gap, var(--xh-space-1)));
|
|
79
|
+
color: var(--xh-clipboard-label-fg, var(--xh-fg-muted));
|
|
77
80
|
font-size: var(--xh-clipboard-label-font-size, var(--xh-text-label-size));
|
|
78
81
|
font-weight: var(--xh-clipboard-label-font-weight, var(--xh-text-label-weight));
|
|
79
82
|
line-height: var(--xh-leading-none);
|
|
@@ -121,9 +124,14 @@
|
|
|
121
124
|
border-end-end-radius: 0;
|
|
122
125
|
}
|
|
123
126
|
|
|
124
|
-
/*
|
|
125
|
-
[data-scope='clipboard'][data-part='input']:focus-
|
|
127
|
+
/* 照只读字段外壳标出焦点:换承载面底 + 品牌描边(不随 tone),不画环;点进去选字也算聚焦 */
|
|
128
|
+
[data-scope='clipboard'][data-part='input']:focus-within {
|
|
126
129
|
border-color: var(--xh-clipboard-input-border-focus, var(--xh-border-control-focus));
|
|
130
|
+
background: var(--xh-clipboard-input-bg-focus, var(--xh-bg-surface));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-scope='clipboard'][data-part='input']:focus-visible {
|
|
134
|
+
outline: none;
|
|
127
135
|
}
|
|
128
136
|
|
|
129
137
|
/* 自动填充:引擎给填过的框强加一套系统色(多数是黄底黑字),盖得过 background 与 color,
|
|
@@ -203,7 +211,7 @@
|
|
|
203
211
|
);
|
|
204
212
|
}
|
|
205
213
|
|
|
206
|
-
[data-scope='clipboard'][data-part='control'] > [data-scope='clipboard'][data-part='input']:focus-
|
|
214
|
+
[data-scope='clipboard'][data-part='control'] > [data-scope='clipboard'][data-part='input']:focus-within,
|
|
207
215
|
[data-scope='clipboard'][data-part='control'] > [data-scope='clipboard'][data-part='copy-trigger']:focus-visible,
|
|
208
216
|
[data-scope='clipboard'][data-part='control'] > [data-scope='clipboard'][data-part='copy-trigger']:hover {
|
|
209
217
|
position: relative;
|
|
@@ -312,4 +320,12 @@
|
|
|
312
320
|
clip-path: inset(50%);
|
|
313
321
|
white-space: nowrap;
|
|
314
322
|
}
|
|
323
|
+
|
|
324
|
+
/* 只读框聚焦不画环、描边又被换成系统色,补一圈 Highlight 环 */
|
|
325
|
+
@media (forced-colors: active) {
|
|
326
|
+
[data-scope='clipboard'][data-part='input']:focus {
|
|
327
|
+
outline: var(--xh-ring-width) solid Highlight;
|
|
328
|
+
outline-offset: var(--xh-ring-offset);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
315
331
|
}
|
package/css/code-view.css
CHANGED
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/* 折叠时 <pre> 的高度被连接层写死,超出部分沿圆角收边 */
|
|
94
|
-
[data-scope='code-view'][data-part='root'][data-clamped] [data-part='pre'] {
|
|
94
|
+
[data-scope='code-view'][data-part='root'][data-clamped] [data-part='pre']:where([data-scope='code-view']) {
|
|
95
95
|
overflow-y: hidden;
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -163,13 +163,13 @@
|
|
|
163
163
|
|
|
164
164
|
/* 开了换行:pre-wrap 仍保留缩进与连续空白,只是允许行尾折下来;
|
|
165
165
|
anywhere 让没有空格的长串(url、base64)也能断,否则照样撑出横向滚动 */
|
|
166
|
-
[data-scope='code-view'][data-part='code'][data-wrap] [data-part='line-content'] {
|
|
166
|
+
[data-scope='code-view'][data-part='code'][data-wrap] [data-part='line-content']:where([data-scope='code-view']) {
|
|
167
167
|
white-space: pre-wrap;
|
|
168
168
|
overflow-wrap: anywhere;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
/* 没开行号时正文自带左内衬;开了行号则由行号槽的内衬顶开 */
|
|
172
|
-
[data-scope='code-view'][data-part='root']:not([data-line-numbers]) [data-part='line-content'] {
|
|
172
|
+
[data-scope='code-view'][data-part='root']:not([data-line-numbers]) [data-part='line-content']:where([data-scope='code-view']) {
|
|
173
173
|
padding-inline-start: var(--xh-code-view-px, var(--xh-space-3));
|
|
174
174
|
}
|
|
175
175
|
|
|
@@ -233,12 +233,12 @@
|
|
|
233
233
|
--xh-_code-view-fold-col: var(--xh-code-view-fold-col, var(--xh-code-view-line-height, var(--xh-text-code-leading)));
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
[data-scope='code-view'][data-part='root'][data-block-folding] [data-part='line-content'] {
|
|
236
|
+
[data-scope='code-view'][data-part='root'][data-block-folding] [data-part='line-content']:where([data-scope='code-view']) {
|
|
237
237
|
position: relative;
|
|
238
238
|
padding-inline-start: var(--xh-_code-view-fold-col);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
[data-scope='code-view'][data-part='root'][data-block-folding]:not([data-line-numbers]) [data-part='line-content'] {
|
|
241
|
+
[data-scope='code-view'][data-part='root'][data-block-folding]:not([data-line-numbers]) [data-part='line-content']:where([data-scope='code-view']) {
|
|
242
242
|
padding-inline-start: calc(var(--xh-code-view-px, var(--xh-space-3)) + var(--xh-_code-view-fold-col));
|
|
243
243
|
}
|
|
244
244
|
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
block-size: var(--xh-_code-view-fold-col);
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
[data-scope='code-view'][data-part='root'][data-block-folding]:not([data-line-numbers]) [data-part='line-fold-trigger'] {
|
|
261
|
+
[data-scope='code-view'][data-part='root'][data-block-folding]:not([data-line-numbers]) [data-part='line-fold-trigger']:where([data-scope='code-view']) {
|
|
262
262
|
inset-inline-start: var(--xh-code-view-px, var(--xh-space-3));
|
|
263
263
|
}
|
|
264
264
|
|
package/css/collapsible.css
CHANGED
|
@@ -22,9 +22,14 @@
|
|
|
22
22
|
/* 作者塞进正文里的图标与皮肤画的兜底字形同一把尺:md 档,触发器上另按家族档取值 */
|
|
23
23
|
--xh-icon-size: var(--xh-collapsible-icon-size, var(--xh-glyph-size-md));
|
|
24
24
|
|
|
25
|
+
/* 触发器比家族 disclosure-trigger 档收一截:md 上下 10px + 一行正文行高 21px = 41px 高,横向 12px;
|
|
26
|
+
正文与触发器同一条起点,上下各留 8px */
|
|
25
27
|
--xh-_collapsible-trigger-gap: var(--xh-control-gap-md);
|
|
26
|
-
--xh-_collapsible-
|
|
27
|
-
--xh-_collapsible-
|
|
28
|
+
--xh-_collapsible-trigger-py: var(--xh-space-2_5);
|
|
29
|
+
--xh-_collapsible-trigger-px: var(--xh-space-3);
|
|
30
|
+
--xh-_collapsible-content-px: var(--xh-space-3);
|
|
31
|
+
--xh-_collapsible-content-pt: var(--xh-space-2);
|
|
32
|
+
--xh-_collapsible-content-pb: var(--xh-space-2);
|
|
28
33
|
|
|
29
34
|
/* 语气落在展开着的触发器上,指示器写在触发器里、跟着继承这个色,不另立规则。
|
|
30
35
|
没写 data-tone 时 --xh-_tone-fg 没被声明,退回原来的前景色。
|
|
@@ -48,14 +53,20 @@
|
|
|
48
53
|
/* 缺省档写在上面那条里 */
|
|
49
54
|
[data-scope='collapsible'][data-part='root'][data-size='sm'] {
|
|
50
55
|
--xh-_collapsible-trigger-gap: var(--xh-control-gap-sm);
|
|
51
|
-
--xh-_collapsible-
|
|
52
|
-
--xh-_collapsible-
|
|
56
|
+
--xh-_collapsible-trigger-py: var(--xh-space-1_5);
|
|
57
|
+
--xh-_collapsible-trigger-px: var(--xh-space-2_5);
|
|
58
|
+
--xh-_collapsible-content-px: var(--xh-space-2_5);
|
|
59
|
+
--xh-_collapsible-content-pt: var(--xh-space-1_5);
|
|
60
|
+
--xh-_collapsible-content-pb: var(--xh-space-1_5);
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
[data-scope='collapsible'][data-part='root'][data-size='lg'] {
|
|
56
64
|
--xh-_collapsible-trigger-gap: var(--xh-control-gap-lg);
|
|
57
|
-
--xh-_collapsible-
|
|
58
|
-
--xh-_collapsible-
|
|
65
|
+
--xh-_collapsible-trigger-py: var(--xh-space-3);
|
|
66
|
+
--xh-_collapsible-trigger-px: var(--xh-space-4);
|
|
67
|
+
--xh-_collapsible-content-px: var(--xh-space-4);
|
|
68
|
+
--xh-_collapsible-content-pt: var(--xh-space-3);
|
|
69
|
+
--xh-_collapsible-content-pb: var(--xh-space-3);
|
|
59
70
|
}
|
|
60
71
|
|
|
61
72
|
/* 触发器铺满一行,盒型、三档几何、悬停 / 按下 / 禁用面由 Action Control 的 disclosure-trigger 档给
|
|
@@ -65,8 +76,8 @@
|
|
|
65
76
|
[data-scope='collapsible'][data-part='trigger'] {
|
|
66
77
|
--xh-action-gap: var(--xh-collapsible-trigger-gap, var(--xh-_action-profile-gap));
|
|
67
78
|
--xh-action-visual-size: var(--xh-collapsible-trigger-h, var(--xh-_action-profile-visual-size));
|
|
68
|
-
--xh-action-padding-block: var(--xh-collapsible-trigger-py, var(--xh-
|
|
69
|
-
--xh-action-padding-inline: var(--xh-collapsible-trigger-px, var(--xh-
|
|
79
|
+
--xh-action-padding-block: var(--xh-collapsible-trigger-py, var(--xh-_collapsible-trigger-py));
|
|
80
|
+
--xh-action-padding-inline: var(--xh-collapsible-trigger-px, var(--xh-_collapsible-trigger-px));
|
|
70
81
|
--xh-action-radius: var(--xh-collapsible-trigger-radius, var(--xh-_action-profile-radius));
|
|
71
82
|
--xh-action-bg-rest: var(--xh-collapsible-trigger-bg, var(--xh-_action-variant-bg-rest));
|
|
72
83
|
--xh-action-bg-hover: var(--xh-collapsible-trigger-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
@@ -74,10 +85,11 @@
|
|
|
74
85
|
--xh-action-fg-hover: var(--xh-collapsible-trigger-fg, var(--xh-_action-variant-fg-hover));
|
|
75
86
|
--xh-action-fg-pressed: var(--xh-collapsible-trigger-fg, var(--xh-_action-variant-fg-pressed));
|
|
76
87
|
--xh-action-font-size: var(--xh-collapsible-trigger-font-size, var(--xh-_action-profile-font-size));
|
|
77
|
-
--xh-icon-size: var(--xh-collapsible-icon-size, var(--xh-
|
|
88
|
+
--xh-icon-size: var(--xh-collapsible-icon-size, var(--xh-glyph-size-sm));
|
|
78
89
|
|
|
79
90
|
border-width: 0;
|
|
80
91
|
font-weight: var(--xh-collapsible-trigger-font-weight, var(--xh-text-label-weight));
|
|
92
|
+
line-height: var(--xh-leading-normal);
|
|
81
93
|
}
|
|
82
94
|
|
|
83
95
|
/* 展开着的那一档单开一个槽:与常态共用一个的话,作者一改常态字色就把展开态也改掉了。
|
|
@@ -86,6 +98,8 @@
|
|
|
86
98
|
--xh-action-fg-rest: var(--xh-collapsible-trigger-fg-open, var(--xh-_collapsible-open-fg));
|
|
87
99
|
--xh-action-fg-hover: var(--xh-collapsible-trigger-fg-open, var(--xh-_collapsible-open-fg));
|
|
88
100
|
--xh-action-fg-pressed: var(--xh-collapsible-trigger-fg-open, var(--xh-_collapsible-open-fg));
|
|
101
|
+
|
|
102
|
+
font-weight: var(--xh-collapsible-trigger-font-weight-open, var(--xh-font-weight-medium));
|
|
89
103
|
}
|
|
90
104
|
|
|
91
105
|
/* 禁用前景换成禁用色,不靠 opacity 压暗(家族按 data-disabled 给禁用面与指针,字色槽在这里保留优先) */
|
|
@@ -99,7 +113,7 @@
|
|
|
99
113
|
flex: none;
|
|
100
114
|
align-items: center;
|
|
101
115
|
justify-content: center;
|
|
102
|
-
color: var(--xh-collapsible-indicator-fg, var(--xh-fg-
|
|
116
|
+
color: var(--xh-collapsible-indicator-fg, var(--xh-fg-subtle));
|
|
103
117
|
line-height: var(--xh-leading-none);
|
|
104
118
|
}
|
|
105
119
|
|
|
@@ -132,17 +146,18 @@
|
|
|
132
146
|
/* 这里刻意没有 [data-part='content'][hidden] { display: none }:补了动画一帧都播不出来。
|
|
133
147
|
收起由适配器在退场结束后写内联 display 落成,退场窗口内靠 connect 发的 inert 挡住焦点 */
|
|
134
148
|
[data-scope='collapsible'][data-part='content'] {
|
|
135
|
-
/*
|
|
149
|
+
/* 行高与内缩同帧动的共享关键帧读这两条槽,两端内缩一起收放 */
|
|
150
|
+
--xh-_disclosure-pt: var(--xh-collapsible-content-pt, var(--xh-_collapsible-content-pt));
|
|
136
151
|
--xh-_disclosure-pb: var(--xh-collapsible-content-pb, var(--xh-_collapsible-content-pb));
|
|
137
152
|
|
|
138
153
|
display: grid;
|
|
139
154
|
grid-template-rows: 1fr;
|
|
140
155
|
overflow: clip;
|
|
141
|
-
padding-block-start:
|
|
156
|
+
padding-block-start: var(--xh-collapsible-content-pt, var(--xh-_collapsible-content-pt));
|
|
142
157
|
padding-block-end: var(--xh-collapsible-content-pb, var(--xh-_collapsible-content-pb));
|
|
143
158
|
padding-inline: var(--xh-collapsible-content-px, var(--xh-_collapsible-content-px));
|
|
144
|
-
color: var(--xh-collapsible-content-fg, var(--xh-fg-
|
|
145
|
-
font-size: var(--xh-collapsible-content-font-size, var(--xh-text-
|
|
159
|
+
color: var(--xh-collapsible-content-fg, var(--xh-fg-default));
|
|
160
|
+
font-size: var(--xh-collapsible-content-font-size, var(--xh-text-body-size));
|
|
146
161
|
line-height: var(--xh-leading-normal);
|
|
147
162
|
}
|
|
148
163
|
|
package/css/color-field.css
CHANGED
|
@@ -57,13 +57,15 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
[data-scope='color-field'][data-part='label'] {
|
|
60
|
-
|
|
60
|
+
/* 竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-color-field-label-gap 给多少最终就是多少 */
|
|
61
|
+
margin-block-end: calc(var(--xh-color-field-label-gap, var(--xh-space-2)) - var(--xh-color-field-gap, var(--xh-space-1)));
|
|
62
|
+
color: var(--xh-color-field-label-fg, var(--xh-fg-muted));
|
|
61
63
|
font-size: var(--xh-color-field-label-font-size, var(--xh-text-label-size));
|
|
62
64
|
font-weight: var(--xh-color-field-label-font-weight, var(--xh-text-label-weight));
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
[data-scope='color-field'][data-part='label'][data-disabled] {
|
|
66
|
-
color: var(--xh-color-field-label-fg-disabled, var(--xh-fg-
|
|
68
|
+
color: var(--xh-color-field-label-fg-disabled, var(--xh-fg-muted));
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
[data-scope='color-field'][data-part='control'] {
|
|
@@ -81,8 +83,6 @@
|
|
|
81
83
|
--xh-field-border-hover: var(--xh-color-field-control-border-hover, var(--xh-_field-variant-border-hover));
|
|
82
84
|
--xh-field-border-focus: var(--xh-color-field-control-border-focus, var(--xh-_field-variant-border-focus));
|
|
83
85
|
--xh-field-border-invalid: var(--xh-color-field-control-border-invalid, var(--xh-_field-variant-border-invalid));
|
|
84
|
-
--xh-field-ring-focus: var(--xh-ring-focus);
|
|
85
|
-
--xh-field-ring-invalid: var(--xh-ring-invalid);
|
|
86
86
|
--xh-field-shadow-rest: var(--xh-color-field-control-shadow, none);
|
|
87
87
|
/* 家族 chrome 会重写 --xh-icon-size,使用者图标槽必须经桥接槽下发才能在盒内生效 */
|
|
88
88
|
--xh-field-glyph-size: var(--xh-color-field-icon-size, var(--xh-_field-size-glyph-size));
|