@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/text-field.css
CHANGED
|
@@ -56,13 +56,15 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.xh-scope-text-field[data-part='label'] {
|
|
59
|
-
|
|
59
|
+
/* 竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-text-field-label-gap 给多少最终就是多少 */
|
|
60
|
+
margin-block-end: calc(var(--xh-text-field-label-gap, var(--xh-space-2)) - var(--xh-text-field-gap, var(--xh-space-1)));
|
|
61
|
+
color: var(--xh-text-field-label-fg, var(--xh-fg-muted));
|
|
60
62
|
font-size: var(--xh-text-field-label-font-size, var(--xh-text-label-size));
|
|
61
63
|
font-weight: var(--xh-text-field-label-font-weight, var(--xh-text-label-weight));
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
.xh-scope-text-field[data-part='label'][data-disabled] {
|
|
65
|
-
color: var(--xh-text-field-label-fg-disabled, var(--xh-fg-
|
|
67
|
+
color: var(--xh-text-field-label-fg-disabled, var(--xh-fg-muted));
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
.xh-scope-text-field[data-part='control'] {
|
|
@@ -80,8 +82,6 @@
|
|
|
80
82
|
--xh-field-border-hover: var(--xh-text-field-control-border-hover, var(--xh-_field-variant-border-hover));
|
|
81
83
|
--xh-field-border-focus: var(--xh-text-field-control-border-focus, var(--xh-_field-variant-border-focus));
|
|
82
84
|
--xh-field-border-invalid: var(--xh-text-field-control-border-invalid, var(--xh-_field-variant-border-invalid));
|
|
83
|
-
--xh-field-ring-focus: var(--xh-ring-focus);
|
|
84
|
-
--xh-field-ring-invalid: var(--xh-ring-invalid);
|
|
85
85
|
--xh-field-shadow-rest: var(--xh-text-field-control-shadow, none);
|
|
86
86
|
/* 家族 chrome 会重写 --xh-icon-size,使用者图标槽必须经桥接槽下发才能在盒内生效 */
|
|
87
87
|
--xh-field-glyph-size: var(--xh-text-field-icon-size, var(--xh-_field-size-glyph-size));
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
--xh-field-placeholder-fg: var(--xh-text-field-placeholder-fg, var(--xh-fg-subtle));
|
|
101
101
|
--xh-field-autofill-bg: var(--xh-text-field-input-autofill-bg, var(--xh-bg-canvas));
|
|
102
102
|
--xh-field-autofill-fg: var(--xh-text-field-input-autofill-fg, var(--xh-fg-default));
|
|
103
|
-
--xh-field-textarea-padding-block: var(--xh-text-field-textarea-py, var(--xh-space-
|
|
103
|
+
--xh-field-textarea-padding-block: var(--xh-text-field-textarea-py, var(--xh-space-1));
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.xh-scope-text-field[data-part='control'][hidden] {
|
package/dist/css/time-field.css
CHANGED
|
@@ -63,13 +63,15 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.xh-scope-time-field[data-part='label'] {
|
|
66
|
-
|
|
66
|
+
/* 竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-time-field-label-gap 给多少最终就是多少 */
|
|
67
|
+
margin-block-end: calc(var(--xh-time-field-label-gap, var(--xh-space-2)) - var(--xh-time-field-gap, var(--xh-space-1)));
|
|
68
|
+
color: var(--xh-time-field-label-fg, var(--xh-fg-muted));
|
|
67
69
|
font-size: var(--xh-time-field-label-font-size, var(--xh-text-label-size));
|
|
68
70
|
font-weight: var(--xh-time-field-label-font-weight, var(--xh-text-label-weight));
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
.xh-scope-time-field[data-part='label'][data-disabled] {
|
|
72
|
-
color: var(--xh-time-field-label-fg-disabled, var(--xh-fg-
|
|
74
|
+
color: var(--xh-time-field-label-fg-disabled, var(--xh-fg-muted));
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
/* 几段合起来看着像一个输入框:描边、底色、圆角、聚焦环、五态与悬停由 Field Chrome 家族画在
|
|
@@ -89,8 +91,6 @@
|
|
|
89
91
|
--xh-field-border-hover: var(--xh-time-field-control-border-hover, var(--xh-_field-variant-border-hover));
|
|
90
92
|
--xh-field-border-focus: var(--xh-time-field-control-border-focus, var(--xh-_field-variant-border-focus));
|
|
91
93
|
--xh-field-border-invalid: var(--xh-time-field-control-border-invalid, var(--xh-_field-variant-border-invalid));
|
|
92
|
-
--xh-field-ring-focus: var(--xh-ring-focus);
|
|
93
|
-
--xh-field-ring-invalid: var(--xh-ring-invalid);
|
|
94
94
|
--xh-field-shadow-rest: var(--xh-time-field-control-shadow, none);
|
|
95
95
|
--xh-field-cursor-rest: default;
|
|
96
96
|
/* 家族 chrome 会重写 --xh-icon-size,使用者图标槽必须经桥接槽下发才能在盒内生效 */
|
package/dist/css/time-picker.css
CHANGED
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
--xh-_time-picker-control-px: var(--xh-control-px-md);
|
|
65
65
|
--xh-_time-picker-gap: var(--xh-control-gap-md);
|
|
66
66
|
--xh-_time-picker-font-size: var(--xh-control-font-md);
|
|
67
|
-
--xh-_time-picker-item-py: var(--xh-list-option-py-md);
|
|
68
67
|
|
|
69
68
|
/* 段位强调随语气走:当前段是「当前项」,淡底 + 淡底前景;对号使用普通表面上的前景色。
|
|
70
69
|
没写 data-tone 时这几个 --xh-_tone* 没被声明,退回品牌色 */
|
|
@@ -97,7 +96,6 @@
|
|
|
97
96
|
--xh-_time-picker-control-px: var(--xh-control-px-sm);
|
|
98
97
|
--xh-_time-picker-gap: var(--xh-control-gap-sm);
|
|
99
98
|
--xh-_time-picker-font-size: var(--xh-control-font-sm);
|
|
100
|
-
--xh-_time-picker-item-py: var(--xh-list-option-py-sm);
|
|
101
99
|
}
|
|
102
100
|
|
|
103
101
|
.xh-scope-time-picker:is([data-part='root'], [data-part='positioner'])[data-size='lg'] {
|
|
@@ -106,7 +104,6 @@
|
|
|
106
104
|
--xh-_time-picker-control-px: var(--xh-control-px-lg);
|
|
107
105
|
--xh-_time-picker-gap: var(--xh-control-gap-lg);
|
|
108
106
|
--xh-_time-picker-font-size: var(--xh-control-font-lg);
|
|
109
|
-
--xh-_time-picker-item-py: var(--xh-list-option-py-lg);
|
|
110
107
|
}
|
|
111
108
|
|
|
112
109
|
/* 声明了 display 就盖掉了 UA 的 [hidden]{display:none},收起态得自己还回去 */
|
|
@@ -115,14 +112,16 @@
|
|
|
115
112
|
}
|
|
116
113
|
|
|
117
114
|
.xh-scope-time-picker[data-part='label'] {
|
|
118
|
-
|
|
115
|
+
/* 竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-time-picker-label-gap 给多少最终就是多少 */
|
|
116
|
+
margin-block-end: calc(var(--xh-time-picker-label-gap, var(--xh-space-2)) - var(--xh-time-picker-gap, var(--xh-space-1)));
|
|
117
|
+
color: var(--xh-time-picker-label-fg, var(--xh-fg-muted));
|
|
119
118
|
font-size: var(--xh-time-picker-label-font-size, var(--xh-text-label-size));
|
|
120
119
|
font-weight: var(--xh-time-picker-label-font-weight, var(--xh-text-label-weight));
|
|
121
120
|
line-height: var(--xh-leading-none);
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
.xh-scope-time-picker[data-part='label'][data-disabled] {
|
|
125
|
-
color: var(--xh-time-picker-label-fg-disabled, var(--xh-fg-
|
|
124
|
+
color: var(--xh-time-picker-label-fg-disabled, var(--xh-fg-muted));
|
|
126
125
|
}
|
|
127
126
|
|
|
128
127
|
/* 画成一个框的是 control:几段文字、展开按钮、清空按钮要看起来是一体的,
|
|
@@ -144,8 +143,6 @@
|
|
|
144
143
|
--xh-field-border-hover: var(--xh-time-picker-control-border-hover, var(--xh-_field-variant-border-hover));
|
|
145
144
|
--xh-field-border-focus: var(--xh-time-picker-control-border-focus, var(--xh-_field-variant-border-focus));
|
|
146
145
|
--xh-field-border-invalid: var(--xh-time-picker-control-border-invalid, var(--xh-_field-variant-border-invalid));
|
|
147
|
-
--xh-field-ring-focus: var(--xh-ring-focus);
|
|
148
|
-
--xh-field-ring-invalid: var(--xh-ring-invalid);
|
|
149
146
|
--xh-field-shadow-rest: var(--xh-time-picker-control-shadow, none);
|
|
150
147
|
/* 段位靠键盘编辑,盒上不是文本光标 */
|
|
151
148
|
--xh-field-cursor-rest: default;
|
|
@@ -315,15 +312,16 @@
|
|
|
315
312
|
/* 几列并排:整体高度由列自己撑,滚动发生在列里而不是整个面板上——
|
|
316
313
|
整面板滚会让时列与分列一起走,挑分的时候时就看不见了。
|
|
317
314
|
含多列的锚定面板走 floating 材质:实体底 + --xh-border-default 描边 + --xh-elevation-floating 落影,
|
|
318
|
-
|
|
315
|
+
不透景、不画顶光。面板自己不留内衬:各列与快捷选项列自带内衬,列间分隔线从面板顶边通到底边 */
|
|
319
316
|
.xh-scope-time-picker[data-part='content'] {
|
|
320
317
|
position: relative;
|
|
321
318
|
display: flex;
|
|
322
319
|
align-items: stretch;
|
|
323
|
-
padding-block: var(--xh-time-picker-content-py, var(--xh-space-
|
|
324
|
-
padding-inline: var(--xh-time-picker-content-px, var(--xh-space-
|
|
325
|
-
/*
|
|
326
|
-
|
|
320
|
+
padding-block: var(--xh-time-picker-content-py, var(--xh-space-0));
|
|
321
|
+
padding-inline: var(--xh-time-picker-content-px, var(--xh-space-0));
|
|
322
|
+
/* 列与底栏都按 px 定高(列取 --xh-overlay-time-column-h),面板的天然高度就是它们的和,缺省不另设上限:
|
|
323
|
+
按 rem 的滚动面档会随根字号缩小,根字号很小时底栏被挤到描边外 */
|
|
324
|
+
max-block-size: var(--xh-time-picker-content-max-h, none);
|
|
327
325
|
border: var(--xh-stroke-thin) solid var(--xh-time-picker-content-border, var(--xh-border-default));
|
|
328
326
|
border-radius: var(--xh-time-picker-content-radius, var(--xh-shape-overlay));
|
|
329
327
|
background: var(--xh-time-picker-content-bg, var(--xh-bg-surface));
|
|
@@ -357,18 +355,25 @@
|
|
|
357
355
|
animation: xh-overlay-slide-out var(--xh-motion-duration-exit) var(--xh-motion-ease-exit) forwards;
|
|
358
356
|
}
|
|
359
357
|
|
|
360
|
-
/*
|
|
358
|
+
/* 有底栏时面板折行:各列与快捷选项列排在第一行,底栏独占下一行。
|
|
359
|
+
不加 :not([hidden]):content 收起态带 hidden 但仍在播退场动画,退回不折行会让底栏挤到各列旁边 */
|
|
360
|
+
.xh-scope-time-picker[data-part='content']:has(> [data-part='footer']) {
|
|
361
|
+
flex-wrap: wrap;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* 「添加」沉到各列的右下角:它是多选时整块面板的出口,不跟列顶对齐;面板不留内衬,
|
|
365
|
+
钮自己与底边、末边各让一档空当 */
|
|
361
366
|
.xh-scope-time-picker[data-part='content'] > .xh-scope-time-picker[data-part='confirm-trigger'] {
|
|
362
367
|
flex: none;
|
|
363
368
|
align-self: flex-end;
|
|
364
|
-
margin
|
|
369
|
+
margin: var(--xh-time-picker-confirm-trigger-margin, var(--xh-space-2));
|
|
365
370
|
}
|
|
366
371
|
|
|
367
|
-
/* 「添加」是面板里唯一的主要动作:品牌实心、悬停 /
|
|
368
|
-
|
|
372
|
+
/* 「添加」是面板里唯一的主要动作:品牌实心、悬停 / 按下换面、焦点环全由 Action Control 的 text solid 档给,
|
|
373
|
+
xs 档 24 高、字取说明档 12px;槽名统一按部件取 --xh-time-picker-confirm-trigger-*,只映射到家族桥接槽 */
|
|
369
374
|
.xh-scope-time-picker[data-part='confirm-trigger'] {
|
|
370
375
|
--xh-action-visual-size: var(--xh-time-picker-confirm-trigger-h, var(--xh-_action-profile-visual-size));
|
|
371
|
-
--xh-action-padding-inline: var(--xh-time-picker-confirm-trigger-px, var(--xh-
|
|
376
|
+
--xh-action-padding-inline: var(--xh-time-picker-confirm-trigger-px, var(--xh-space-2));
|
|
372
377
|
--xh-action-radius: var(--xh-time-picker-confirm-trigger-radius, var(--xh-shape-control));
|
|
373
378
|
--xh-action-bg-rest: var(--xh-time-picker-confirm-trigger-bg, var(--xh-_action-variant-bg-rest));
|
|
374
379
|
--xh-action-bg-hover: var(--xh-time-picker-confirm-trigger-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
@@ -381,7 +386,7 @@
|
|
|
381
386
|
--xh-action-shadow-rest: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
382
387
|
--xh-action-shadow-hover: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
383
388
|
--xh-action-shadow-pressed: var(--xh-time-picker-confirm-trigger-shadow, none);
|
|
384
|
-
--xh-action-font-size: var(--xh-text-
|
|
389
|
+
--xh-action-font-size: var(--xh-time-picker-confirm-trigger-font-size, var(--xh-text-caption-size));
|
|
385
390
|
|
|
386
391
|
border-width: 0;
|
|
387
392
|
}
|
|
@@ -391,60 +396,126 @@
|
|
|
391
396
|
display: none;
|
|
392
397
|
}
|
|
393
398
|
|
|
394
|
-
/*
|
|
399
|
+
/* 底栏:面板底部通栏的一条操作区,上沿一道 border-default 线与各列隔开,四周 8 的内衬;
|
|
400
|
+
独占一整行,落在快捷选项列与各列下面。
|
|
401
|
+
首个子节点落在撑满余宽的那条轨道上,其后的各自按内容宽排在行尾:作者另放的文字与链接排在行首,
|
|
402
|
+
「添加」总落在行尾;只放了「添加」时它独占那条轨道,靠 justify-self 贴到行尾。
|
|
403
|
+
底栏不参与撑宽:面板换行排布时,Chrome 把每个子项的固有宽相加当作面板的固有宽,
|
|
404
|
+
底栏的字与钮会把面板多撑出一截、最后一列末端空出一块。inline-size 包含让它的内容不计入固有宽,
|
|
405
|
+
行内内衬也就不能写在它自己身上(内衬照样计入),改由两端各一个定宽占位让出(见下面那条) */
|
|
406
|
+
.xh-scope-time-picker[data-part='footer'] {
|
|
407
|
+
/* 两端占位的宽:占位与相邻项之间本来就隔着一道 gap,占位自己只补到内衬的差额 */
|
|
408
|
+
--xh-_time-picker-footer-inset: max(
|
|
409
|
+
var(--xh-space-0),
|
|
410
|
+
calc(var(--xh-time-picker-footer-px, var(--xh-space-2)) - var(--xh-time-picker-footer-gap, var(--xh-space-2)))
|
|
411
|
+
);
|
|
412
|
+
|
|
413
|
+
display: grid;
|
|
414
|
+
contain: inline-size;
|
|
415
|
+
flex-basis: 100%;
|
|
416
|
+
grid-auto-flow: column;
|
|
417
|
+
grid-template-columns: minmax(0, 1fr);
|
|
418
|
+
align-items: center;
|
|
419
|
+
gap: var(--xh-time-picker-footer-gap, var(--xh-space-2));
|
|
420
|
+
padding-block: var(--xh-time-picker-footer-py, var(--xh-space-2));
|
|
421
|
+
border-block-start: var(--xh-stroke-thin) solid var(--xh-time-picker-footer-border, var(--xh-material-solid-border));
|
|
422
|
+
color: var(--xh-time-picker-footer-fg, var(--xh-fg-muted));
|
|
423
|
+
font-size: var(--xh-time-picker-footer-font-size, var(--xh-text-caption-size));
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/* 上面给了 display,UA 的 [hidden]{display:none} 已被盖掉,这里补回来 */
|
|
427
|
+
.xh-scope-time-picker[data-part='footer'][hidden] {
|
|
428
|
+
display: none;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/* 底栏里只放了「添加」、而「添加」按状态收起(单选)时,底栏一并让位,不留一条空栏 */
|
|
432
|
+
.xh-scope-time-picker[data-part='footer']:has(> .xh-scope-time-picker[data-part='confirm-trigger'][hidden]:only-child) {
|
|
433
|
+
display: none;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.xh-scope-time-picker[data-part='footer'] > .xh-scope-time-picker[data-part='confirm-trigger'] {
|
|
437
|
+
justify-self: end;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* 行首行尾的内衬由两端的定宽占位让出,不挂在首末子节点上:首个子节点可能是裸文本,
|
|
441
|
+
末一个可能是按状态收起的「添加」,外边距都接不住。占位与其余子项一样在 inline-size 包含之内,不计入面板的固有宽 */
|
|
442
|
+
.xh-scope-time-picker[data-part='footer']::before,
|
|
443
|
+
.xh-scope-time-picker[data-part='footer']::after {
|
|
444
|
+
content: '';
|
|
445
|
+
inline-size: var(--xh-_time-picker-footer-inset);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* 行首占位落在那条撑满余宽的显式轨道之前(在它前面长出一条隐式列),首个子节点仍落在那条轨道上。
|
|
449
|
+
占位不进显式轨道:尺寸包含照样计入显式轨道与轨道间的 gap,多一条显式列面板就多撑出一道 gap */
|
|
450
|
+
.xh-scope-time-picker[data-part='footer']::before {
|
|
451
|
+
grid-column: span 1 / 1;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/* 快捷选项也是一列,与时分秒那几列并排,排在行内起始一侧;限高与时间列同一档 */
|
|
395
455
|
.xh-scope-time-picker[data-part='preset-group'] {
|
|
396
456
|
display: flex;
|
|
397
457
|
flex: none;
|
|
398
458
|
flex-direction: column;
|
|
399
|
-
gap: var(--xh-time-picker-preset-group-gap, var(--xh-
|
|
400
|
-
max-block-size: var(--xh-time-picker-preset-group-h, var(--xh-
|
|
401
|
-
padding-
|
|
459
|
+
gap: var(--xh-time-picker-preset-group-gap, var(--xh-space-1));
|
|
460
|
+
max-block-size: var(--xh-time-picker-preset-group-h, var(--xh-overlay-time-column-h));
|
|
461
|
+
padding-block: var(--xh-time-picker-preset-group-py, var(--xh-space-2_5));
|
|
462
|
+
padding-inline: var(--xh-time-picker-preset-group-px, var(--xh-space-2));
|
|
402
463
|
overflow-y: auto;
|
|
403
464
|
/* 浮层滚动面:滚到头不把页面一起带走 */
|
|
404
465
|
overscroll-behavior: contain;
|
|
405
|
-
border-inline-end: var(--xh-stroke-thin) solid var(--xh-time-picker-column-divider, var(--xh-material-solid-
|
|
466
|
+
border-inline-end: var(--xh-stroke-thin) solid var(--xh-time-picker-column-divider, var(--xh-material-solid-border));
|
|
406
467
|
}
|
|
407
468
|
|
|
408
469
|
.xh-scope-time-picker[data-part='preset-group'][hidden] {
|
|
409
470
|
display: none;
|
|
410
471
|
}
|
|
411
472
|
|
|
412
|
-
/*
|
|
413
|
-
|
|
414
|
-
|
|
473
|
+
/* 快捷选项:每一项是一颗 24 高的淡底小钮——静息 100、悬停 / 高亮 200、按下 300(淡底承载阶梯),
|
|
474
|
+
字取说明档 12px、次级前景;禁用面由 Collection Item 家族按 overlay 语境给。headless 把它投成 listbox 的
|
|
475
|
+
option、当前值落在哪一项就报 aria-selected,选中仍画行尾对号(面与字不变),对号是这条状态唯一的视觉通道。
|
|
476
|
+
选项没有正文部件,匿名文本进不了家族网格的 text 列,行保持块级排版,末端为对号预留固定轨 */
|
|
415
477
|
.xh-scope-time-picker[data-part='preset'] {
|
|
416
|
-
--xh-collection-block-padding:
|
|
417
|
-
--xh-collection-inline-padding: var(--xh-time-picker-preset-px, var(--xh-space-
|
|
418
|
-
--xh-collection-font-size: var(--xh-text-
|
|
419
|
-
--xh-collection-radius: var(--xh-time-picker-preset-radius, var(--xh-shape-
|
|
420
|
-
|
|
421
|
-
--xh-collection-fg-
|
|
422
|
-
|
|
423
|
-
--xh-collection-fg-
|
|
424
|
-
--xh-collection-fg-
|
|
425
|
-
--xh-collection-fg-
|
|
426
|
-
--xh-collection-fg-selected-highlight: var(--xh-time-picker-preset-fg-
|
|
427
|
-
--xh-collection-fg-selected-hover: var(--xh-time-picker-preset-fg-
|
|
428
|
-
--xh-collection-fg-selected-pressed: var(--xh-time-picker-preset-fg-
|
|
478
|
+
--xh-collection-block-padding: 0;
|
|
479
|
+
--xh-collection-inline-padding: var(--xh-time-picker-preset-px, var(--xh-space-2));
|
|
480
|
+
--xh-collection-font-size: var(--xh-time-picker-preset-font-size, var(--xh-text-caption-size));
|
|
481
|
+
--xh-collection-radius: var(--xh-time-picker-preset-radius, var(--xh-shape-control));
|
|
482
|
+
--xh-collection-fg-rest: var(--xh-time-picker-preset-fg, var(--xh-fg-muted));
|
|
483
|
+
--xh-collection-fg-selected: var(--xh-time-picker-preset-fg, var(--xh-fg-muted));
|
|
484
|
+
/* 悬停 / 高亮 / 按下时字换正文色:底升到 200 / 300 之后,次级前景在暗色下不足 4.5:1 */
|
|
485
|
+
--xh-collection-fg-hover: var(--xh-time-picker-preset-fg-hover, var(--xh-fg-default));
|
|
486
|
+
--xh-collection-fg-keyboard-highlight: var(--xh-time-picker-preset-fg-hover, var(--xh-fg-default));
|
|
487
|
+
--xh-collection-fg-pressed: var(--xh-time-picker-preset-fg-hover, var(--xh-fg-default));
|
|
488
|
+
--xh-collection-fg-selected-highlight: var(--xh-time-picker-preset-fg-hover, var(--xh-fg-default));
|
|
489
|
+
--xh-collection-fg-selected-hover: var(--xh-time-picker-preset-fg-hover, var(--xh-fg-default));
|
|
490
|
+
--xh-collection-fg-selected-pressed: var(--xh-time-picker-preset-fg-hover, var(--xh-fg-default));
|
|
429
491
|
--xh-collection-fg-disabled: var(--xh-time-picker-preset-fg-disabled, var(--xh-fg-disabled));
|
|
430
|
-
--xh-collection-
|
|
431
|
-
--xh-collection-
|
|
432
|
-
--xh-collection-
|
|
433
|
-
--xh-collection-
|
|
434
|
-
--xh-collection-bg-
|
|
435
|
-
--xh-collection-bg-selected
|
|
492
|
+
--xh-collection-font-weight-selected: var(--xh-font-weight-regular);
|
|
493
|
+
--xh-collection-font-weight-selected-highlight: var(--xh-font-weight-regular);
|
|
494
|
+
--xh-collection-font-weight-selected-hover: var(--xh-font-weight-regular);
|
|
495
|
+
--xh-collection-font-weight-selected-pressed: var(--xh-font-weight-regular);
|
|
496
|
+
--xh-collection-bg-rest: var(--xh-time-picker-preset-bg, var(--xh-bg-subtle));
|
|
497
|
+
--xh-collection-bg-selected: var(--xh-time-picker-preset-bg, var(--xh-bg-subtle));
|
|
498
|
+
--xh-collection-bg-hover: var(--xh-time-picker-preset-bg-hover, var(--xh-bg-subtle-hover));
|
|
499
|
+
--xh-collection-bg-keyboard-highlight: var(--xh-time-picker-preset-bg-hover, var(--xh-bg-subtle-hover));
|
|
500
|
+
--xh-collection-bg-selected-highlight: var(--xh-time-picker-preset-bg-hover, var(--xh-bg-subtle-hover));
|
|
501
|
+
--xh-collection-bg-selected-hover: var(--xh-time-picker-preset-bg-hover, var(--xh-bg-subtle-hover));
|
|
502
|
+
--xh-collection-bg-pressed: var(--xh-time-picker-preset-bg-pressed, var(--xh-bg-subtle-active));
|
|
503
|
+
--xh-collection-bg-selected-pressed: var(--xh-time-picker-preset-bg-pressed, var(--xh-bg-subtle-active));
|
|
436
504
|
--xh-collection-outline-keyboard-highlight: transparent;
|
|
437
505
|
--xh-collection-outline-selected-highlight: transparent;
|
|
438
506
|
|
|
439
507
|
position: relative;
|
|
440
508
|
display: block;
|
|
441
509
|
flex: none;
|
|
510
|
+
block-size: var(--xh-time-picker-preset-h, var(--xh-control-action-size));
|
|
442
511
|
/* 对号的末端轨始终留着,切换选中时文字与整列宽度都不移动。 */
|
|
443
512
|
padding-inline-end: calc(
|
|
444
|
-
var(--xh-time-picker-preset-px, var(--xh-space-
|
|
445
|
-
+ var(--xh-time-picker-preset-check-size, var(--xh-control-indicator-
|
|
513
|
+
var(--xh-time-picker-preset-px, var(--xh-space-2))
|
|
514
|
+
+ var(--xh-time-picker-preset-check-size, var(--xh-control-indicator-sm))
|
|
446
515
|
+ var(--xh-space-1)
|
|
447
516
|
);
|
|
517
|
+
/* 一行字在 24 高的钮里垂直居中 */
|
|
518
|
+
line-height: var(--xh-time-picker-preset-h, var(--xh-control-action-size));
|
|
448
519
|
white-space: nowrap;
|
|
449
520
|
user-select: none;
|
|
450
521
|
}
|
|
@@ -462,9 +533,9 @@
|
|
|
462
533
|
content: '';
|
|
463
534
|
position: absolute;
|
|
464
535
|
inset-block-start: 50%;
|
|
465
|
-
inset-inline-end: var(--xh-time-picker-preset-px, var(--xh-space-
|
|
466
|
-
inline-size: var(--xh-time-picker-preset-check-size, var(--xh-control-indicator-
|
|
467
|
-
block-size: var(--xh-time-picker-preset-check-size, var(--xh-control-indicator-
|
|
536
|
+
inset-inline-end: var(--xh-time-picker-preset-px, var(--xh-space-2));
|
|
537
|
+
inline-size: var(--xh-time-picker-preset-check-size, var(--xh-control-indicator-sm));
|
|
538
|
+
block-size: var(--xh-time-picker-preset-check-size, var(--xh-control-indicator-sm));
|
|
468
539
|
background-color: var(--xh-time-picker-preset-check-fg, var(--xh-_time-picker-check-fg));
|
|
469
540
|
opacity: 0;
|
|
470
541
|
translate: 0 -50%;
|
|
@@ -488,15 +559,21 @@
|
|
|
488
559
|
background-color: var(--xh-time-picker-preset-fg-disabled, var(--xh-fg-disabled));
|
|
489
560
|
}
|
|
490
561
|
|
|
491
|
-
/* 一列一个滚动区:列与列之间用细分隔线,视觉上"时 | 分 | 秒"
|
|
562
|
+
/* 一列一个滚动区:列与列之间用细分隔线,视觉上"时 | 分 | 秒"三栏分明。列宽取时间列档(两位数字加两侧对号轨),
|
|
563
|
+
列高是七格整行;列顶留 4,列底留出一截空白,末尾几格(23 时、55–59 分)也能滚到列顶,各列的选中落在同一行 */
|
|
492
564
|
.xh-scope-time-picker[data-part='column'] {
|
|
565
|
+
--xh-_time-picker-column-h: var(--xh-time-picker-column-h, var(--xh-overlay-time-column-h));
|
|
566
|
+
--xh-_time-picker-column-py: var(--xh-time-picker-column-py, var(--xh-space-1));
|
|
567
|
+
|
|
493
568
|
display: flex;
|
|
494
569
|
flex: none;
|
|
495
570
|
flex-direction: column;
|
|
496
|
-
gap: var(--xh-time-picker-column-gap,
|
|
497
|
-
min-inline-size: var(--xh-time-picker-column-min-w, var(--xh-overlay-column-
|
|
571
|
+
gap: var(--xh-time-picker-column-gap, var(--xh-space-2));
|
|
572
|
+
min-inline-size: var(--xh-time-picker-column-min-w, var(--xh-overlay-time-column-w));
|
|
498
573
|
/* 几列并排:定高而不是随内容收,否则时列与分列的可选值一多一少就错位 */
|
|
499
|
-
block-size: var(--xh-
|
|
574
|
+
block-size: var(--xh-_time-picker-column-h);
|
|
575
|
+
padding-block: var(--xh-_time-picker-column-py)
|
|
576
|
+
calc(var(--xh-_time-picker-column-h) - var(--xh-time-picker-item-h, var(--xh-control-action-size)) - var(--xh-_time-picker-column-py));
|
|
500
577
|
padding-inline: var(--xh-time-picker-column-px, 0);
|
|
501
578
|
overflow-y: auto;
|
|
502
579
|
/* 浮层滚动面:滚到头不把页面一起带走 */
|
|
@@ -511,7 +588,7 @@
|
|
|
511
588
|
|
|
512
589
|
/* 每列后面紧跟着它自己的贴层条子节点,相邻选择器接不到下一列,按「前面有过列」取第二列起 */
|
|
513
590
|
.xh-scope-time-picker[data-part='column'] ~ .xh-scope-time-picker[data-part='column'] {
|
|
514
|
-
border-inline-start: var(--xh-stroke-thin) solid var(--xh-time-picker-column-divider, var(--xh-material-solid-
|
|
591
|
+
border-inline-start: var(--xh-stroke-thin) solid var(--xh-time-picker-column-divider, var(--xh-material-solid-border));
|
|
515
592
|
}
|
|
516
593
|
|
|
517
594
|
/* 焦点落在列上有两种情形:指针打开、这一段还空着、还没有任何格当锚点,或整列被界裁空。
|
|
@@ -525,8 +602,8 @@
|
|
|
525
602
|
outline: none;
|
|
526
603
|
}
|
|
527
604
|
|
|
528
|
-
/*
|
|
529
|
-
|
|
605
|
+
/* 时间格:24 高的通栏条,列内间距 8 撑出 32 的行距;悬停 / 高亮 100、按下 200 由 Collection Item 家族按
|
|
606
|
+
overlay 语境给,选中透明底 + 中等字重 + 末端对号(对号集合的选中),不上品牌淡底、不变字色。格里只有数字、没有正文部件,保持自己的
|
|
530
607
|
居中排版与等宽标记轨,家族只给状态面。行的字色与字重按值选择族的同一套映射写(--xh-time-picker-item-fg
|
|
531
608
|
/ -fg-selected / -font-weight-selected 使用者槽,缺省落家族配方的行字色 --xh-material-frosted-fg:
|
|
532
609
|
它在各主题与 forced-colors 下都等于 --xh-fg-default,floating 面板上的面色仍由 content 自己给) */
|
|
@@ -535,11 +612,12 @@
|
|
|
535
612
|
var(--xh-time-picker-item-px, var(--xh-space-0_5)),
|
|
536
613
|
calc(var(--xh-time-picker-item-check-size, var(--xh-control-indicator-size)) + var(--xh-space-0_5))
|
|
537
614
|
);
|
|
538
|
-
--xh-collection-block-padding:
|
|
615
|
+
--xh-collection-block-padding: 0;
|
|
539
616
|
/* 两侧留同宽轨:对号绝对落在末端,数字仍在整格的数学中心。 */
|
|
540
617
|
--xh-collection-inline-padding: var(--xh-_time-picker-item-rail);
|
|
541
618
|
--xh-collection-font-size: var(--xh-time-picker-item-font-size, var(--xh-_time-picker-font-size));
|
|
542
|
-
|
|
619
|
+
/* 浮层里的列表是通栏行:格铺满列宽、不取圆角 */
|
|
620
|
+
--xh-collection-radius: var(--xh-time-picker-item-radius, 0);
|
|
543
621
|
--xh-collection-fg-rest: var(--xh-time-picker-item-fg, var(--xh-material-frosted-fg));
|
|
544
622
|
--xh-collection-fg-hover: var(--xh-time-picker-item-fg, var(--xh-material-frosted-fg));
|
|
545
623
|
--xh-collection-fg-keyboard-highlight: var(--xh-time-picker-item-fg, var(--xh-material-frosted-fg));
|
|
@@ -548,10 +626,10 @@
|
|
|
548
626
|
--xh-collection-fg-selected-highlight: var(--xh-time-picker-item-fg-selected, var(--xh-time-picker-item-fg, var(--xh-material-frosted-fg)));
|
|
549
627
|
--xh-collection-fg-selected-hover: var(--xh-time-picker-item-fg-selected, var(--xh-time-picker-item-fg, var(--xh-material-frosted-fg)));
|
|
550
628
|
--xh-collection-fg-selected-pressed: var(--xh-time-picker-item-fg-selected, var(--xh-time-picker-item-fg, var(--xh-material-frosted-fg)));
|
|
551
|
-
--xh-collection-font-weight-selected: var(--xh-time-picker-item-font-weight-selected, var(--xh-font-weight-
|
|
552
|
-
--xh-collection-font-weight-selected-highlight: var(--xh-time-picker-item-font-weight-selected, var(--xh-font-weight-
|
|
553
|
-
--xh-collection-font-weight-selected-hover: var(--xh-time-picker-item-font-weight-selected, var(--xh-font-weight-
|
|
554
|
-
--xh-collection-font-weight-selected-pressed: var(--xh-time-picker-item-font-weight-selected, var(--xh-font-weight-
|
|
629
|
+
--xh-collection-font-weight-selected: var(--xh-time-picker-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
630
|
+
--xh-collection-font-weight-selected-highlight: var(--xh-time-picker-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
631
|
+
--xh-collection-font-weight-selected-hover: var(--xh-time-picker-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
632
|
+
--xh-collection-font-weight-selected-pressed: var(--xh-time-picker-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
555
633
|
--xh-collection-bg-hover: var(--xh-time-picker-item-bg-hover, var(--xh-bg-subtle));
|
|
556
634
|
--xh-collection-bg-keyboard-highlight: var(--xh-time-picker-item-bg-hover, var(--xh-bg-subtle));
|
|
557
635
|
--xh-collection-bg-selected-highlight: var(--xh-time-picker-item-bg-hover, var(--xh-bg-subtle));
|
|
@@ -566,7 +644,7 @@
|
|
|
566
644
|
flex: none;
|
|
567
645
|
align-items: center;
|
|
568
646
|
justify-content: center;
|
|
569
|
-
block-size: var(--xh-time-picker-item-h,
|
|
647
|
+
block-size: var(--xh-time-picker-item-h, var(--xh-control-action-size));
|
|
570
648
|
/* 居中的单个数字格没有截断层,行高保持紧排,列内多露几格 */
|
|
571
649
|
line-height: var(--xh-leading-normal);
|
|
572
650
|
white-space: nowrap;
|
|
@@ -582,6 +660,14 @@
|
|
|
582
660
|
}
|
|
583
661
|
|
|
584
662
|
/* 作者自己藏掉某几格时要让位,有 display 就得补这条 */
|
|
663
|
+
/* 命中区向上下各补半个列内间距:两格之间那 8px 缝归上下两格各一半,指针落在缝里不落空 */
|
|
664
|
+
.xh-scope-time-picker[data-part='item']::before {
|
|
665
|
+
content: '';
|
|
666
|
+
position: absolute;
|
|
667
|
+
inset-block: calc(-0.5 * var(--xh-time-picker-column-gap, var(--xh-space-2)));
|
|
668
|
+
inset-inline: 0;
|
|
669
|
+
}
|
|
670
|
+
|
|
585
671
|
.xh-scope-time-picker[data-part='item'][hidden] {
|
|
586
672
|
display: none;
|
|
587
673
|
}
|