@xihan-ui/styles 1.0.0 → 2.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 +5146 -6
- package/README.md +22 -2
- package/component-tokens.d.ts +4212 -0
- package/component-tokens.js +2 -0
- package/components.tokens.json +80116 -0
- package/css/accordion.css +131 -75
- package/css/affix.css +16 -1
- package/css/alert.css +114 -67
- package/css/anchor.css +99 -27
- package/css/approval.css +461 -0
- package/css/avatar-group.css +14 -6
- package/css/avatar.css +33 -9
- package/css/back-top.css +103 -48
- package/css/badge.css +42 -14
- package/css/bar-code.css +62 -0
- package/css/breadcrumb.css +40 -21
- package/css/button-group.css +146 -24
- package/css/button.css +116 -99
- package/css/calendar-picker.css +448 -0
- package/css/calendar-range-picker.css +517 -0
- package/css/card.css +54 -77
- package/css/carousel.css +412 -68
- package/css/cascader.css +429 -246
- package/css/checkbox-group.css +225 -77
- package/css/checkbox.css +174 -37
- package/css/clipboard.css +266 -47
- package/css/code-view.css +279 -0
- package/css/collapsible.css +108 -63
- package/css/color-field.css +158 -0
- package/css/color-picker.css +172 -184
- package/css/color-slider.css +274 -0
- package/css/color-swatch-picker.css +243 -0
- package/css/color-swatch.css +35 -0
- package/css/combobox.css +267 -273
- package/css/command.css +399 -0
- package/css/context-menu.css +183 -108
- package/css/date-field.css +94 -121
- package/css/date-picker.css +486 -249
- package/css/date-range-picker.css +559 -0
- package/css/description.css +51 -0
- package/css/descriptions.css +133 -87
- package/css/dialog.css +247 -68
- package/css/diff-view.css +428 -0
- package/css/download-trigger.css +155 -46
- package/css/drawer.css +194 -111
- package/css/editable.css +172 -152
- package/css/empty-state.css +80 -11
- package/css/field-array.css +190 -0
- package/css/field.css +84 -31
- package/css/fieldset.css +51 -18
- package/css/file-upload.css +134 -36
- package/css/flex.css +20 -1
- package/css/float-button.css +238 -57
- package/css/floating-panel.css +173 -92
- package/css/focus.css +46 -0
- package/css/forced-colors.css +93 -0
- package/css/form.css +254 -77
- package/css/gradient-text.css +34 -10
- package/css/grid.css +516 -5
- package/css/heatmap.css +87 -29
- package/css/highlight.css +20 -5
- package/css/hover-card.css +97 -47
- package/css/icon-wrapper.css +15 -3
- package/css/icon.css +74 -8
- package/css/image-cropper.css +143 -29
- package/css/image-viewer.css +150 -89
- package/css/image.css +30 -1
- package/css/infinite-scroll.css +51 -1
- package/css/input-group.css +277 -0
- package/css/json-viewer.css +102 -45
- package/css/kbd.css +72 -0
- package/css/label.css +78 -0
- package/css/layers.css +5 -0
- package/css/layout.css +175 -31
- package/css/list.css +24 -3
- package/css/listbox.css +208 -67
- package/css/loading-bar.css +52 -3
- package/css/log.css +144 -9
- package/css/markdown-stream.css +149 -0
- package/css/marquee.css +27 -1
- package/css/masonry.css +7 -0
- package/css/matrix-code.css +67 -0
- package/css/mention.css +234 -152
- package/css/menu.css +180 -83
- package/css/menubar.css +204 -136
- package/css/message-feed.css +197 -0
- package/css/navigation-menu.css +144 -90
- package/css/notification.css +178 -100
- package/css/number-animation.css +7 -0
- package/css/number-field.css +120 -277
- package/css/overlay-arrow.css +12 -7
- package/css/page-header.css +99 -14
- package/css/pagination.css +175 -135
- package/css/password-input.css +222 -219
- package/css/pin-input.css +101 -67
- package/css/pointer.css +36 -0
- package/css/popconfirm.css +185 -94
- package/css/popover.css +121 -77
- package/css/progress.css +60 -12
- package/css/prompt-input.css +224 -0
- package/css/question-flow.css +513 -0
- package/css/radio-group.css +147 -30
- package/css/rating.css +193 -43
- package/css/reasoning.css +336 -0
- package/css/reset.css +84 -6
- package/css/resizable.css +237 -0
- package/css/scroll-area.css +68 -7
- package/css/scrollbar.css +47 -13
- package/css/segmented.css +94 -29
- package/css/select.css +288 -274
- package/css/separator.css +101 -1
- package/css/side-nav.css +133 -75
- package/css/signature-pad.css +74 -54
- package/css/skeleton.css +84 -11
- package/css/slider.css +132 -39
- package/css/sortable.css +198 -0
- package/css/spinner.css +126 -12
- package/css/splitter.css +29 -8
- package/css/statistic.css +55 -0
- package/css/steps.css +206 -72
- package/css/switch.css +268 -36
- package/css/table.css +695 -118
- package/css/tabs.css +604 -42
- package/css/tag-group.css +219 -0
- package/css/tag.css +118 -28
- package/css/tags-input.css +156 -274
- package/css/text-field.css +101 -249
- package/css/time-field.css +100 -128
- package/css/time-picker.css +323 -252
- package/css/time-range-picker.css +719 -0
- package/css/timeline.css +202 -68
- package/css/timer.css +56 -52
- package/css/timestamp.css +34 -0
- package/css/toast.css +373 -144
- package/css/toggle-group.css +309 -76
- package/css/toggle.css +116 -85
- package/css/tone.css +47 -0
- package/css/tool-call.css +421 -0
- package/css/toolbar.css +181 -33
- package/css/tooltip.css +107 -36
- package/css/tour.css +183 -152
- package/css/transfer.css +351 -138
- package/css/tree-select.css +323 -216
- package/css/tree.css +294 -62
- package/css/truncate.css +65 -0
- package/css/typography.css +228 -5
- package/css/undefined.css +10 -1
- package/css/virtualizer.css +9 -10
- package/css/visually-hidden.css +7 -0
- package/css/watermark.css +7 -0
- package/family/action-control.css +487 -0
- package/family/collection-item.css +721 -0
- package/family/field-chrome.css +298 -0
- package/family/motion.css +166 -0
- package/family/swatch.css +59 -0
- package/index.css +41705 -126
- package/index.unlayered.css +33692 -17339
- package/package.json +51 -17
- package/css/calendar.css +0 -367
- package/css/code-block.css +0 -91
- package/css/composer.css +0 -134
- package/css/countdown.css +0 -26
- package/css/dynamic-input.css +0 -220
- package/css/ellipsis.css +0 -52
- package/css/hotkeys.css +0 -90
- package/css/popselect.css +0 -391
- package/css/qr-code.css +0 -55
- package/css/result.css +0 -119
- package/css/space.css +0 -117
- package/css/thread.css +0 -120
- package/css/time.css +0 -25
package/css/time-field.css
CHANGED
|
@@ -1,32 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-Present XiHanFun and contributors.
|
|
3
|
+
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* TimeField 独立皮肤同时传递引入字段视觉盒与字段内动作;full bundle 递归去重。 */
|
|
7
|
+
@import '../family/field-chrome.css';
|
|
8
|
+
@import '../family/action-control.css';
|
|
9
|
+
|
|
1
10
|
@layer xihan.components {
|
|
2
11
|
/* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
|
|
3
12
|
[data-scope='time-field'] {
|
|
4
13
|
--xh-time-field-skin: 1;
|
|
5
14
|
}
|
|
6
15
|
|
|
7
|
-
/*
|
|
16
|
+
/* 与文本框、数字框同一套堆叠:标签一行、控件一行。
|
|
17
|
+
组件层只把既有公开槽映射到家族合同;形态三档由家族按 control 上的 data-variant 生成,皮肤不再声明。 */
|
|
8
18
|
[data-scope='time-field'][data-part='root'] {
|
|
9
19
|
/* 作者塞进来的图标跟着控件的尺寸档走;它自己写了 size 时仍以作者的为准 */
|
|
10
20
|
--xh-icon-size: var(--xh-time-field-icon-size, var(--xh-glyph-size-md));
|
|
11
21
|
|
|
12
|
-
/*
|
|
22
|
+
/* 尺寸档只换这四个私有槽,控件从 root 继承它们,换档不必给每个部件各写一条选择器 */
|
|
13
23
|
--xh-_time-field-control-h: var(--xh-control-h-md);
|
|
14
24
|
--xh-_time-field-control-px: var(--xh-control-px-md);
|
|
15
25
|
--xh-_time-field-gap: var(--xh-control-gap-md);
|
|
16
26
|
--xh-_time-field-font-size: var(--xh-control-font-md);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
--xh-_time-field-
|
|
20
|
-
--xh-_time-field-
|
|
21
|
-
--xh-_time-field-control-border-hover: var(--xh-border-control-hover);
|
|
22
|
-
/* 聚焦描边与段位反白随语气走。没写 data-tone 时这几个 --xh-_tone* 没被声明,退回原来的焦点色与品牌色 */
|
|
23
|
-
--xh-_time-field-ring: var(--xh-ring-focus);
|
|
24
|
-
--xh-_time-field-segment-bg: var(--xh-_tone, var(--xh-bg-brand));
|
|
25
|
-
--xh-_time-field-segment-fg: var(--xh-_tone-on, var(--xh-fg-on-brand));
|
|
27
|
+
/* 段位反白随语气走:当前段是「当前项」,淡底 + 淡底前景。
|
|
28
|
+
没写 data-tone 时这几个 --xh-_tone* 没被声明,退回品牌淡底 */
|
|
29
|
+
--xh-_time-field-segment-bg: var(--xh-_tone-subtle, var(--xh-bg-brand-subtle));
|
|
30
|
+
--xh-_time-field-segment-fg: var(--xh-_tone-fg, var(--xh-fg-on-brand-subtle));
|
|
26
31
|
|
|
27
32
|
display: inline-flex;
|
|
28
33
|
flex-direction: column;
|
|
29
34
|
gap: var(--xh-time-field-gap, var(--xh-space-1));
|
|
35
|
+
|
|
36
|
+
/* 不传尺寸时一律这么宽,宽度不随内容走;父容器给不出这么宽时整件跟着收,地板同步让步,不越出父容器。
|
|
37
|
+
地板不高过缺省宽:使用者把缺省宽钉到底线以下时不必再放开底线 */
|
|
38
|
+
inline-size: var(--xh-time-field-control-w, var(--xh-control-w));
|
|
39
|
+
min-inline-size: min(var(--xh-time-field-control-w, var(--xh-control-w)), var(--xh-time-field-control-min-w, var(--xh-control-min-w)), 100%);
|
|
40
|
+
max-inline-size: 100%;
|
|
30
41
|
}
|
|
31
42
|
|
|
32
43
|
/* —— 尺寸 —— */
|
|
@@ -36,7 +47,6 @@
|
|
|
36
47
|
--xh-_time-field-control-px: var(--xh-control-px-sm);
|
|
37
48
|
--xh-_time-field-gap: var(--xh-control-gap-sm);
|
|
38
49
|
--xh-_time-field-font-size: var(--xh-control-font-sm);
|
|
39
|
-
--xh-_time-field-label-font-size: var(--xh-control-font-sm);
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
[data-scope='time-field'][data-part='root'][data-size='lg'] {
|
|
@@ -45,29 +55,6 @@
|
|
|
45
55
|
--xh-_time-field-control-px: var(--xh-control-px-lg);
|
|
46
56
|
--xh-_time-field-gap: var(--xh-control-gap-lg);
|
|
47
57
|
--xh-_time-field-font-size: var(--xh-control-font-lg);
|
|
48
|
-
--xh-_time-field-label-font-size: var(--xh-control-font-lg);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* —— 形态 —— */
|
|
52
|
-
/* 描边式:与缺省等价,写出来是为了三档形态在皮肤里都看得见 */
|
|
53
|
-
[data-scope='time-field'][data-part='root'][data-variant='outline'] {
|
|
54
|
-
--xh-_time-field-control-bg: var(--xh-bg-canvas);
|
|
55
|
-
--xh-_time-field-control-border: var(--xh-border-control);
|
|
56
|
-
--xh-_time-field-control-border-hover: var(--xh-border-control-hover);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* 填充式:底色顶替描边,悬停时才浮出一道淡边 */
|
|
60
|
-
[data-scope='time-field'][data-part='root'][data-variant='subtle'] {
|
|
61
|
-
--xh-_time-field-control-bg: var(--xh-_tone-subtle, var(--xh-bg-subtle));
|
|
62
|
-
--xh-_time-field-control-border: transparent;
|
|
63
|
-
--xh-_time-field-control-border-hover: var(--xh-_tone-border, var(--xh-border-control-hover));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* 无框:底与常态描边透明,悬停与聚焦浮出描边 */
|
|
67
|
-
[data-scope='time-field'][data-part='root'][data-variant='ghost'] {
|
|
68
|
-
--xh-_time-field-control-bg: transparent;
|
|
69
|
-
--xh-_time-field-control-border: transparent;
|
|
70
|
-
--xh-_time-field-control-border-hover: var(--xh-_tone-border, var(--xh-border-control-hover));
|
|
71
58
|
}
|
|
72
59
|
|
|
73
60
|
/* 声明了 display 就盖掉了 UA 的 [hidden]{display:none},收起态得自己还回去 */
|
|
@@ -77,75 +64,50 @@
|
|
|
77
64
|
|
|
78
65
|
[data-scope='time-field'][data-part='label'] {
|
|
79
66
|
color: var(--xh-time-field-label-fg, var(--xh-fg-default));
|
|
80
|
-
font-size: var(--xh-time-field-label-font-size, var(--xh-
|
|
67
|
+
font-size: var(--xh-time-field-label-font-size, var(--xh-text-label-size));
|
|
81
68
|
font-weight: var(--xh-time-field-label-font-weight, var(--xh-text-label-weight));
|
|
82
|
-
line-height: var(--xh-leading-none);
|
|
83
69
|
}
|
|
84
70
|
|
|
85
71
|
[data-scope='time-field'][data-part='label'][data-disabled] {
|
|
86
72
|
color: var(--xh-time-field-label-fg-disabled, var(--xh-fg-subtle));
|
|
87
|
-
cursor: not-allowed;
|
|
88
73
|
}
|
|
89
74
|
|
|
90
|
-
/*
|
|
91
|
-
|
|
75
|
+
/* 几段合起来看着像一个输入框:描边、底色、圆角、聚焦环、五态与悬停由 Field Chrome 家族画在
|
|
76
|
+
control 上,段自己只管一小块可聚焦的高亮区。组件只映射既有公开槽;段位靠键盘编辑,盒上不是文本光标 */
|
|
92
77
|
[data-scope='time-field'][data-part='control'] {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
78
|
+
--xh-field-control-height: var(--xh-time-field-control-h, var(--xh-_time-field-control-h));
|
|
79
|
+
--xh-field-control-padding-inline: var(--xh-time-field-control-px, var(--xh-_time-field-control-px));
|
|
80
|
+
--xh-field-control-gap: var(--xh-time-field-control-gap, var(--xh-_time-field-gap));
|
|
81
|
+
--xh-field-control-min-inline-size: var(--xh-time-field-control-min-w, var(--xh-control-min-w));
|
|
82
|
+
--xh-field-control-radius: var(--xh-time-field-control-radius, var(--xh-shape-control));
|
|
83
|
+
--xh-field-bg-rest: var(--xh-time-field-control-bg, var(--xh-_field-variant-bg-rest));
|
|
84
|
+
--xh-field-bg-hover: var(--xh-time-field-control-bg-hover, var(--xh-_field-variant-bg-hover));
|
|
85
|
+
--xh-field-bg-read-only: var(--xh-time-field-control-bg-readonly, var(--xh-_field-variant-bg-read-only));
|
|
86
|
+
--xh-field-bg-disabled: var(--xh-time-field-control-bg-disabled, var(--xh-_field-variant-bg-disabled));
|
|
87
|
+
--xh-field-fg-rest: var(--xh-time-field-control-fg, var(--xh-fg-default));
|
|
88
|
+
--xh-field-border-rest: var(--xh-time-field-control-border, var(--xh-_field-variant-border-rest));
|
|
89
|
+
--xh-field-border-hover: var(--xh-time-field-control-border-hover, var(--xh-_field-variant-border-hover));
|
|
90
|
+
--xh-field-border-focus: var(--xh-time-field-control-border-focus, var(--xh-_field-variant-border-focus));
|
|
91
|
+
--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
|
+
--xh-field-shadow-rest: var(--xh-time-field-control-shadow, none);
|
|
95
|
+
--xh-field-cursor-rest: default;
|
|
96
|
+
/* 家族 chrome 会重写 --xh-icon-size,使用者图标槽必须经桥接槽下发才能在盒内生效 */
|
|
97
|
+
--xh-field-glyph-size: var(--xh-time-field-icon-size, var(--xh-_field-size-glyph-size));
|
|
98
|
+
|
|
104
99
|
/* 表单控件不继承页面字体,只给字号会让它用 UA 默认字族,与周围文本对不上 */
|
|
105
100
|
font-family: inherit;
|
|
106
101
|
font-size: var(--xh-time-field-font-size, var(--xh-_time-field-font-size));
|
|
107
102
|
/* 等宽数字:各位字宽不一时逐段填入会让整行左右跳 */
|
|
108
103
|
font-variant-numeric: tabular-nums;
|
|
109
104
|
line-height: var(--xh-leading-normal);
|
|
110
|
-
transition: border-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
111
105
|
}
|
|
112
106
|
|
|
113
107
|
[data-scope='time-field'][data-part='control'][hidden] {
|
|
114
108
|
display: none;
|
|
115
109
|
}
|
|
116
110
|
|
|
117
|
-
/* hover 只在中性态换描边:invalid 正拿边框颜色说事,被 hover 盖掉那条信息就没了 */
|
|
118
|
-
[data-scope='time-field'][data-part='control']:hover:not([data-disabled], [data-invalid]) {
|
|
119
|
-
border-color: var(--xh-time-field-control-border-hover, var(--xh-_time-field-control-border-hover));
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/* 焦点真正落在段上,但整块看起来才是一个控件:段内有焦点时整框亮起来。
|
|
123
|
-
control 自己不占 Tab 位,所以这里写的是 focus-within 而不是 focus-visible */
|
|
124
|
-
[data-scope='time-field'][data-part='control']:focus-within:not([data-disabled]) {
|
|
125
|
-
border-color: var(--xh-time-field-control-border-focus, var(--xh-_tone, var(--xh-border-control-focus)));
|
|
126
|
-
outline: var(--xh-ring-width) solid var(--xh-_time-field-ring);
|
|
127
|
-
outline-offset: var(--xh-ring-offset);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
[data-scope='time-field'][data-part='control'][data-invalid] {
|
|
131
|
-
border-color: var(--xh-time-field-control-border-invalid, var(--xh-border-invalid));
|
|
132
|
-
|
|
133
|
-
/* 校验失败时环也跟着变红:两圈等宽相邻却一红一蓝,读的人不知道哪个才是当前状态 */
|
|
134
|
-
--xh-_time-field-ring: var(--xh-ring-invalid);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* 只读仍可聚焦、可换段,所以不置灰,只把底色压下去表示"改不动" */
|
|
138
|
-
[data-scope='time-field'][data-part='control'][data-readonly] {
|
|
139
|
-
background: var(--xh-time-field-control-bg-readonly, var(--xh-bg-subtle));
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* control 是个 div,没有 :disabled 可用;禁用态由连接层的 data-disabled 表达 */
|
|
143
|
-
[data-scope='time-field'][data-part='control'][data-disabled] {
|
|
144
|
-
background: var(--xh-time-field-control-bg-disabled, var(--xh-bg-subtle));
|
|
145
|
-
color: var(--xh-fg-disabled);
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
111
|
/* 段位与作者写在段间的分隔符都在这一层里:它占满盒里剩下的宽度,
|
|
150
112
|
清空钮因此靠在框内末端 */
|
|
151
113
|
[data-scope='time-field'][data-part='segment-group'] {
|
|
@@ -159,17 +121,23 @@
|
|
|
159
121
|
display: none;
|
|
160
122
|
}
|
|
161
123
|
|
|
124
|
+
[data-scope='time-field'][data-part='segment-group'] > :not([data-scope]) {
|
|
125
|
+
color: var(--xh-time-field-literal-fg, var(--xh-fg-subtle));
|
|
126
|
+
}
|
|
127
|
+
|
|
162
128
|
/* 段是一小块可聚焦区,紧挨着排;间距长在段自己身上 */
|
|
163
129
|
[data-scope='time-field'][data-part='segment'] {
|
|
164
130
|
display: inline-block;
|
|
165
|
-
padding-inline: var(--xh-time-field-segment-px, var(--xh-space-
|
|
166
|
-
padding-block: 0;
|
|
131
|
+
padding-inline: var(--xh-time-field-segment-px, var(--xh-space-0_5));
|
|
132
|
+
padding-block: var(--xh-time-field-segment-py, var(--xh-space-0));
|
|
167
133
|
border-radius: var(--xh-time-field-segment-radius, var(--xh-shape-inset));
|
|
168
134
|
color: inherit;
|
|
169
135
|
font-variant-numeric: inherit;
|
|
170
136
|
text-align: center;
|
|
171
137
|
/* 段是 role=spinbutton 的展示节点,双击选中一段文字只会碍事 */
|
|
172
138
|
user-select: none;
|
|
139
|
+
/* 触屏上连点两下不该被当成缩放手势 */
|
|
140
|
+
touch-action: manipulation;
|
|
173
141
|
transition:
|
|
174
142
|
background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
175
143
|
color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
@@ -201,61 +169,58 @@
|
|
|
201
169
|
color: var(--xh-time-field-segment-fg-focus, var(--xh-_time-field-segment-fg));
|
|
202
170
|
}
|
|
203
171
|
|
|
172
|
+
[data-scope='time-field'][data-part='segment'][data-invalid] {
|
|
173
|
+
color: var(--xh-time-field-segment-fg-invalid, var(--xh-fg-danger));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
[data-scope='time-field'][data-part='segment'][data-invalid]:is([data-focus], :focus-visible) {
|
|
177
|
+
background: var(
|
|
178
|
+
--xh-time-field-segment-bg-invalid-focus,
|
|
179
|
+
var(--xh-bg-subtle)
|
|
180
|
+
);
|
|
181
|
+
color: var(--xh-time-field-segment-fg-invalid-focus, var(--xh-fg-danger));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* 白底承载的悬停走 100:段位铺在 canvas 底的盒里,不是淡底容器 */
|
|
204
185
|
[data-scope='time-field'][data-part='segment']:hover:not([data-focus], [data-disabled]) {
|
|
205
|
-
background: var(--xh-time-field-segment-bg-hover, var(--xh-bg-subtle
|
|
186
|
+
background: var(--xh-time-field-segment-bg-hover, var(--xh-bg-subtle));
|
|
206
187
|
}
|
|
207
188
|
|
|
208
189
|
/* 段是集合条目形态(role=spinbutton 的 span),禁用走 data-disabled 而不是 :disabled */
|
|
209
190
|
[data-scope='time-field'][data-part='segment'][data-disabled] {
|
|
210
191
|
color: var(--xh-fg-disabled);
|
|
211
|
-
cursor: not-allowed;
|
|
212
192
|
}
|
|
213
193
|
|
|
214
|
-
/*
|
|
215
|
-
|
|
194
|
+
/* 清空按钮贴在框内末端,靠段位外壳的 flex:1 顶到末端,自己不写 margin:正方视觉盒、inset 圆角、
|
|
195
|
+
悬停 100 / 按下 200 与 0.97 按压、粗指针热区与 :focus-visible 关环全由 Action Control 的
|
|
196
|
+
field-inset ghost 档给,组件只映射既有覆盖槽。没值时连接层给 hidden 收起 */
|
|
216
197
|
[data-scope='time-field'][data-part='clear-trigger'] {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/* 没值时连接层给的是 hidden
|
|
198
|
+
--xh-action-visual-size: var(--xh-time-field-action-size, var(--xh-_action-profile-visual-size));
|
|
199
|
+
--xh-action-min-inline-size: var(--xh-time-field-action-size, var(--xh-_action-profile-visual-size));
|
|
200
|
+
--xh-action-radius: var(--xh-time-field-action-radius, var(--xh-shape-inset));
|
|
201
|
+
/* 底色阶梯由 ghost 档给(透明 → 100 → 200),使用者槽只作覆盖入口 */
|
|
202
|
+
--xh-action-bg-rest: var(--xh-time-field-action-bg, var(--xh-_action-variant-bg-rest));
|
|
203
|
+
--xh-action-bg-hover: var(--xh-time-field-action-bg-hover, var(--xh-_action-variant-bg-hover));
|
|
204
|
+
--xh-action-bg-pressed: var(--xh-time-field-action-bg-active, var(--xh-_action-variant-bg-pressed));
|
|
205
|
+
--xh-action-fg-rest: var(--xh-time-field-action-fg, var(--xh-fg-muted));
|
|
206
|
+
--xh-action-fg-hover: var(--xh-time-field-action-fg-hover, var(--xh-fg-default));
|
|
207
|
+
--xh-action-border-rest: transparent;
|
|
208
|
+
--xh-action-highlight-rest: transparent;
|
|
209
|
+
--xh-action-shadow-rest: none;
|
|
210
|
+
--xh-action-shadow-hover: none;
|
|
211
|
+
--xh-action-shadow-pressed: none;
|
|
212
|
+
--xh-action-font-size: var(--xh-time-field-action-font-size, var(--xh-text-secondary-size));
|
|
213
|
+
/* 配方尚未把 profile 字形档灌进 --xh-icon-size,钮内字形先按 field-inset 档逐钮取值 */
|
|
214
|
+
--xh-icon-size: var(--xh-_action-profile-glyph-size);
|
|
215
|
+
|
|
216
|
+
border-width: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* 没值时连接层给的是 hidden 属性;家族那条 display 会把 UA 规则盖掉 */
|
|
239
220
|
[data-scope='time-field'][data-part='clear-trigger'][hidden] {
|
|
240
221
|
display: none;
|
|
241
222
|
}
|
|
242
223
|
|
|
243
|
-
[data-scope='time-field'][data-part='clear-trigger']:hover {
|
|
244
|
-
background: var(--xh-time-field-action-bg-hover, var(--xh-bg-subtle-hover));
|
|
245
|
-
color: var(--xh-time-field-action-fg-hover, var(--xh-fg-default));
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
[data-scope='time-field'][data-part='clear-trigger']:active {
|
|
249
|
-
background: var(--xh-time-field-action-bg-active, var(--xh-bg-subtle-active));
|
|
250
|
-
scale: var(--xh-motion-scale-press);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/* 按钮不占 Tab 位(tabindex=-1),这条是给程序化聚焦兜底:落焦时得看得见 */
|
|
254
|
-
[data-scope='time-field'][data-part='clear-trigger']:focus-visible {
|
|
255
|
-
outline: var(--xh-ring-width) solid var(--xh-_time-field-ring);
|
|
256
|
-
outline-offset: var(--xh-ring-offset);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
224
|
/* 没写内容就由皮肤画兜底字形;作者往部件里塞了自己的图形,这条即不命中 */
|
|
260
225
|
[data-scope='time-field'][data-part='clear-trigger']:empty::before {
|
|
261
226
|
content: '';
|
|
@@ -268,6 +233,13 @@
|
|
|
268
233
|
mask: var(--xh-glyph-mark-close) center / contain no-repeat;
|
|
269
234
|
}
|
|
270
235
|
|
|
236
|
+
@media (forced-colors: active) {
|
|
237
|
+
[data-scope='time-field'][data-part='segment'][data-invalid]:is([data-focus], :focus-visible) {
|
|
238
|
+
outline: var(--xh-ring-width) solid Highlight;
|
|
239
|
+
outline-offset: var(--xh-ring-offset);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
271
243
|
/* 连接层把它写成 type=hidden,UA 自己就不渲染;这里的视觉隐藏是给元素升级前那一瞬兜底
|
|
272
244
|
(作者手写的是一个普通 input,升级完成前它是可见的文本框)。
|
|
273
245
|
刻意不写 display:写了反而会盖掉 UA 对 type=hidden 的收起,把它显出来 */
|