@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/css/rating.css
CHANGED
|
@@ -17,10 +17,12 @@
|
|
|
17
17
|
根上不留基准它就会贴到更外层的定位祖先上,原生校验提示跟着飘到页面别处。 */
|
|
18
18
|
[data-scope='rating'][data-part='root'] {
|
|
19
19
|
/* 尺寸档只换这三个私有槽,星星与分值都从 root 继承它们,换档不必给每个部件各写一条选择器。
|
|
20
|
-
|
|
20
|
+
星是评分的主体而不是控件里的附属图标,比同档控件内图标大一档:sm / md / lg 取
|
|
21
|
+
--xh-glyph-size-md / lg / xl(20 / 24 / 32px);盒比星大一圈 4px(24 / 28 / 36px),星落在家族那圈透明边位之内、
|
|
22
|
+
不被挤偏。标签字号不随档 */
|
|
21
23
|
--xh-_rating-item-gap: var(--xh-control-gap-md);
|
|
22
|
-
--xh-_rating-item-size: var(--xh-glyph-size-
|
|
23
|
-
--xh-_rating-item-box-size: var(--xh-
|
|
24
|
+
--xh-_rating-item-size: var(--xh-glyph-size-lg);
|
|
25
|
+
--xh-_rating-item-box-size: calc(var(--xh-_rating-item-size) + var(--xh-space-1));
|
|
24
26
|
--xh-_rating-font-size: var(--xh-control-font-md);
|
|
25
27
|
--xh-icon-size: var(--xh-rating-item-font-size, var(--xh-_rating-item-size));
|
|
26
28
|
/* 点亮色随语气走。没写 data-tone 时 --xh-_tone 没被声明,退回原来的警示色 */
|
|
@@ -36,25 +38,27 @@
|
|
|
36
38
|
/* —— 尺寸 —— */
|
|
37
39
|
[data-scope='rating'][data-part='root'][data-size='sm'] {
|
|
38
40
|
--xh-_rating-item-gap: var(--xh-control-gap-sm);
|
|
39
|
-
--xh-_rating-item-size: var(--xh-glyph-size-
|
|
41
|
+
--xh-_rating-item-size: var(--xh-glyph-size-md);
|
|
40
42
|
--xh-_rating-font-size: var(--xh-control-font-sm);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
[data-scope='rating'][data-part='root'][data-size='lg'] {
|
|
44
46
|
--xh-_rating-item-gap: var(--xh-control-gap-lg);
|
|
45
|
-
--xh-_rating-item-size: var(--xh-glyph-size-
|
|
47
|
+
--xh-_rating-item-size: var(--xh-glyph-size-xl);
|
|
46
48
|
--xh-_rating-font-size: var(--xh-control-font-lg);
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
/* 字段标签:14 /
|
|
51
|
+
/* 字段标签:14 / 400 / fg-muted,与控件隔 space-2,禁用不另变色;文字部件不叠 opacity */
|
|
50
52
|
[data-scope='rating'][data-part='label'] {
|
|
51
|
-
|
|
53
|
+
/* 竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-rating-label-gap 给多少最终就是多少 */
|
|
54
|
+
margin-block-end: calc(var(--xh-rating-label-gap, var(--xh-space-2)) - var(--xh-rating-gap, var(--xh-space-1)));
|
|
55
|
+
color: var(--xh-rating-label-fg, var(--xh-fg-muted));
|
|
52
56
|
font-size: var(--xh-rating-label-font-size, var(--xh-text-label-size));
|
|
53
57
|
font-weight: var(--xh-rating-label-font-weight, var(--xh-text-label-weight));
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
[data-scope='rating'][data-part='label'][data-disabled] {
|
|
57
|
-
color: var(--xh-rating-label-fg-disabled, var(--xh-fg-
|
|
61
|
+
color: var(--xh-rating-label-fg-disabled, var(--xh-fg-muted));
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
[data-scope='rating'][data-part='control'] {
|
|
@@ -106,10 +110,14 @@
|
|
|
106
110
|
|
|
107
111
|
/* 条目固定成一枚方形图标盒:连接层用 clientWidth 判定指针落在左半还是右半,
|
|
108
112
|
固定盒能让半档分界与图形中心严格重合。
|
|
109
|
-
星接 Action Control icon 档(定尺的星):盒型、按下 /
|
|
113
|
+
星接 Action Control icon 档(定尺的星):盒型、按下 / 禁用面、换底、焦点环与过渡由家族配方给,
|
|
110
114
|
这里只把使用者槽映射到桥接槽。静息透明(ghost 形态);悬停不换底——悬停预览由点亮的星形(data-highlighted)
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
表达,再给盒换面是重复的通道。缩放是统一按压反馈的登记例外:悬停与键盘聚焦把这颗星放大到
|
|
116
|
+
--xh-motion-scale-emphasis(1.2)强调落点,按下保持放大(不取 --xh-motion-scale-press)并换到 200 档中性面
|
|
117
|
+
(白底承载)——按压的回执是换面,不往回缩。悬停放大只给能悬停的设备:触屏点过之后 :hover 会一直留在那颗星上,
|
|
118
|
+
放大跟着停住。减弱动效下放大比例为 1,只留换色。
|
|
119
|
+
前景五态映射同一个值:点亮时五态一起换到点亮色,家族的悬停 / 按下块才不会把点亮色换回静息色;
|
|
120
|
+
禁用不换前景,星带整体的压暗落在 control 的 opacity 上 */
|
|
113
121
|
[data-scope='rating'][data-part='item'] {
|
|
114
122
|
--xh-_rating-item-bg-pressed: var(--xh-rating-item-bg-pressed, var(--xh-bg-subtle-hover));
|
|
115
123
|
|
|
@@ -119,6 +127,8 @@
|
|
|
119
127
|
--xh-action-font-size: var(--xh-rating-item-font-size, var(--xh-_rating-item-size));
|
|
120
128
|
--xh-action-bg-hover: transparent;
|
|
121
129
|
--xh-action-bg-pressed: var(--xh-_rating-item-bg-pressed);
|
|
130
|
+
--xh-action-scale-focus-visible: var(--xh-motion-scale-emphasis);
|
|
131
|
+
--xh-action-scale-pressed: var(--xh-motion-scale-emphasis);
|
|
122
132
|
--xh-action-fg-rest: var(--xh-rating-item-fg, var(--xh-fg-subtle));
|
|
123
133
|
--xh-action-fg-hover: var(--xh-rating-item-fg, var(--xh-fg-subtle));
|
|
124
134
|
--xh-action-fg-pressed: var(--xh-rating-item-fg, var(--xh-fg-subtle));
|
|
@@ -131,8 +141,14 @@
|
|
|
131
141
|
--xh-action-border-disabled: transparent;
|
|
132
142
|
}
|
|
133
143
|
|
|
144
|
+
@media (hover: hover) {
|
|
145
|
+
[data-scope='rating'][data-part='item'] {
|
|
146
|
+
--xh-action-scale-hover: var(--xh-motion-scale-emphasis);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
134
150
|
/* 家族 icon 档在粗指针下用 ::after 扩热区到 44px:五颗星密排,44px 热区会压住相邻的星,
|
|
135
|
-
连接层又按 currentTarget
|
|
151
|
+
连接层又按 currentTarget 的宽度判半颗,热区串到邻星上半档就判错;星本身仍是不小于 24px 的盒,热区不外扩。
|
|
136
152
|
空条目的 ::after 是点亮那层星形,下限归零才不会被撑成 44px */
|
|
137
153
|
@media (pointer: coarse) {
|
|
138
154
|
[data-scope='rating'][data-part='item']::after {
|
|
@@ -205,10 +221,11 @@
|
|
|
205
221
|
clip-path: inset(0 calc(50% * var(--xh-_rating-end)) 0 calc(50% * var(--xh-_rating-start)));
|
|
206
222
|
}
|
|
207
223
|
|
|
208
|
-
/* 只读仍进得了 Tab
|
|
209
|
-
|
|
224
|
+
/* 只读仍进得了 Tab 序列、读屏也念得出,只是改不动:收掉手型与悬停放大,别暗示"点这儿能改";
|
|
225
|
+
家族的按压块由这里的映射钉回静息面——按下不缩放、不换底;键盘聚焦的放大留着,那是焦点落点 */
|
|
210
226
|
[data-scope='rating'][data-part='item'][data-readonly]:not([data-disabled]) {
|
|
211
227
|
--xh-_rating-item-bg-pressed: transparent;
|
|
228
|
+
--xh-action-scale-hover: none;
|
|
212
229
|
--xh-action-scale-pressed: none;
|
|
213
230
|
--xh-action-cursor-rest: default;
|
|
214
231
|
--xh-action-cursor-hover: default;
|
package/css/select.css
CHANGED
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
--xh-_select-h: var(--xh-control-h-md);
|
|
73
73
|
--xh-_select-px: var(--xh-control-px-md);
|
|
74
74
|
--xh-_select-item-py: var(--xh-list-option-py-md);
|
|
75
|
+
--xh-_select-item-h: var(--xh-list-option-h-md);
|
|
75
76
|
--xh-_select-item-px: var(--xh-control-px-md);
|
|
76
77
|
--xh-_select-gap: var(--xh-control-gap-md);
|
|
77
78
|
--xh-_select-font-size: var(--xh-control-font-md);
|
|
@@ -105,6 +106,7 @@
|
|
|
105
106
|
--xh-_select-h: var(--xh-control-h-sm);
|
|
106
107
|
--xh-_select-px: var(--xh-control-px-sm);
|
|
107
108
|
--xh-_select-item-py: var(--xh-list-option-py-sm);
|
|
109
|
+
--xh-_select-item-h: var(--xh-list-option-h-sm);
|
|
108
110
|
--xh-_select-item-px: var(--xh-control-px-sm);
|
|
109
111
|
--xh-_select-gap: var(--xh-control-gap-sm);
|
|
110
112
|
--xh-_select-font-size: var(--xh-control-font-sm);
|
|
@@ -123,20 +125,23 @@
|
|
|
123
125
|
--xh-_select-h: var(--xh-control-h-lg);
|
|
124
126
|
--xh-_select-px: var(--xh-control-px-lg);
|
|
125
127
|
--xh-_select-item-py: var(--xh-list-option-py-lg);
|
|
128
|
+
--xh-_select-item-h: var(--xh-list-option-h-lg);
|
|
126
129
|
--xh-_select-item-px: var(--xh-control-px-lg);
|
|
127
130
|
--xh-_select-gap: var(--xh-control-gap-lg);
|
|
128
131
|
--xh-_select-font-size: var(--xh-control-font-lg);
|
|
129
132
|
}
|
|
130
133
|
|
|
131
134
|
[data-scope='select'][data-part='label'] {
|
|
132
|
-
|
|
135
|
+
/* 竖排时标签与控件之间的距离:根的 gap 之上补一段差值,--xh-select-label-gap 给多少最终就是多少 */
|
|
136
|
+
margin-block-end: calc(var(--xh-select-label-gap, var(--xh-space-2)) - var(--xh-select-gap, var(--xh-space-1)));
|
|
137
|
+
color: var(--xh-select-label-fg, var(--xh-fg-muted));
|
|
133
138
|
font-size: var(--xh-select-label-font-size, var(--xh-text-label-size));
|
|
134
139
|
font-weight: var(--xh-select-label-font-weight, var(--xh-text-label-weight));
|
|
135
140
|
line-height: var(--xh-leading-none);
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
[data-scope='select'][data-part='label'][data-disabled] {
|
|
139
|
-
color: var(--xh-select-label-fg-disabled, var(--xh-fg-
|
|
144
|
+
color: var(--xh-select-label-fg-disabled, var(--xh-fg-muted));
|
|
140
145
|
}
|
|
141
146
|
|
|
142
147
|
/* 盒:描边、底色、圆角、控件高度、行内内衬、聚焦环、五态与悬停由 Field Chrome 家族画在这一层,
|
|
@@ -157,8 +162,6 @@
|
|
|
157
162
|
--xh-field-border-hover: var(--xh-select-control-border-hover, var(--xh-_field-variant-border-hover));
|
|
158
163
|
--xh-field-border-focus: var(--xh-select-control-border-focus, var(--xh-_field-variant-border-focus));
|
|
159
164
|
--xh-field-border-invalid: var(--xh-select-control-border-invalid, var(--xh-_field-variant-border-invalid));
|
|
160
|
-
--xh-field-ring-focus: var(--xh-ring-focus);
|
|
161
|
-
--xh-field-ring-invalid: var(--xh-ring-invalid);
|
|
162
165
|
--xh-field-shadow-rest: var(--xh-select-control-shadow, none);
|
|
163
166
|
--xh-field-cursor-rest: pointer;
|
|
164
167
|
/* 家族 chrome 会重写 --xh-icon-size,使用者图标槽必须经桥接槽下发才能在盒内生效 */
|
|
@@ -312,7 +315,7 @@
|
|
|
312
315
|
max-inline-size: var(--xh-select-content-max-w, none);
|
|
313
316
|
max-block-size: min(var(--xh-select-content-max-h, var(--xh-overlay-menu-max-h)), var(--xh-_select-available-h));
|
|
314
317
|
padding-block: var(--xh-select-content-py, var(--xh-space-1));
|
|
315
|
-
padding-inline: var(--xh-select-content-px,
|
|
318
|
+
padding-inline: var(--xh-select-content-px, 0);
|
|
316
319
|
border-radius: var(--xh-select-content-radius, var(--xh-shape-overlay));
|
|
317
320
|
/* 条目的悬停底色是方角,滚到两端时会探出外壳的圆角 */
|
|
318
321
|
overflow: hidden;
|
|
@@ -462,10 +465,11 @@
|
|
|
462
465
|
[data-scope='select'][data-part='item'] {
|
|
463
466
|
/* 公开 Select 槽只映射到家族合同;网格、尺寸与状态选择器不在组件皮肤复制。pressed 面与 selected 各态由家族按 overlay 上下文给出。 */
|
|
464
467
|
--xh-collection-block-padding: var(--xh-select-item-py, var(--xh-_select-item-py));
|
|
468
|
+
--xh-collection-row-h: var(--xh-select-item-h, var(--xh-_select-item-h));
|
|
465
469
|
--xh-collection-inline-padding: var(--xh-select-item-px, var(--xh-_select-item-px));
|
|
466
470
|
--xh-collection-gap: var(--xh-select-item-gap, var(--xh-_select-gap));
|
|
467
471
|
--xh-collection-font-size: var(--xh-select-item-font-size, var(--xh-_select-font-size));
|
|
468
|
-
--xh-collection-radius: var(--xh-select-item-radius,
|
|
472
|
+
--xh-collection-radius: var(--xh-select-item-radius, 0);
|
|
469
473
|
--xh-collection-fg-rest: var(--xh-select-item-fg, var(--xh-material-frosted-fg));
|
|
470
474
|
--xh-collection-fg-hover: var(--xh-select-item-fg, var(--xh-material-frosted-fg));
|
|
471
475
|
--xh-collection-fg-keyboard-highlight: var(--xh-select-item-fg, var(--xh-material-frosted-fg));
|
|
@@ -474,10 +478,10 @@
|
|
|
474
478
|
--xh-collection-fg-selected-hover: var(--xh-select-item-fg-selected, var(--xh-select-item-fg, var(--xh-material-frosted-fg)));
|
|
475
479
|
--xh-collection-fg-selected-pressed: var(--xh-select-item-fg-selected, var(--xh-select-item-fg, var(--xh-material-frosted-fg)));
|
|
476
480
|
--xh-collection-fg-pressed: var(--xh-select-item-fg, var(--xh-material-frosted-fg));
|
|
477
|
-
--xh-collection-font-weight-selected: var(--xh-select-item-font-weight-selected, var(--xh-font-weight-
|
|
478
|
-
--xh-collection-font-weight-selected-highlight: var(--xh-select-item-font-weight-selected, var(--xh-font-weight-
|
|
479
|
-
--xh-collection-font-weight-selected-hover: var(--xh-select-item-font-weight-selected, var(--xh-font-weight-
|
|
480
|
-
--xh-collection-font-weight-selected-pressed: var(--xh-select-item-font-weight-selected, var(--xh-font-weight-
|
|
481
|
+
--xh-collection-font-weight-selected: var(--xh-select-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
482
|
+
--xh-collection-font-weight-selected-highlight: var(--xh-select-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
483
|
+
--xh-collection-font-weight-selected-hover: var(--xh-select-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
484
|
+
--xh-collection-font-weight-selected-pressed: var(--xh-select-item-font-weight-selected, var(--xh-font-weight-medium));
|
|
481
485
|
--xh-collection-bg-hover: var(--xh-select-item-bg-hover, var(--xh-bg-subtle));
|
|
482
486
|
--xh-collection-bg-keyboard-highlight: var(--xh-select-item-bg-hover, var(--xh-bg-subtle));
|
|
483
487
|
--xh-collection-bg-selected-highlight: var(--xh-select-item-bg-hover, var(--xh-bg-subtle));
|
package/css/separator.css
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* 各自取用:换档只改槽,画在哪个节点上互不影响。
|
|
17
17
|
*/
|
|
18
18
|
[data-scope='separator'][data-part='root'] {
|
|
19
|
-
--xh-_separator-color: var(--xh-separator-color, var(--xh-
|
|
19
|
+
--xh-_separator-color: var(--xh-separator-color, var(--xh-border-default));
|
|
20
20
|
--xh-_separator-dash: var(--xh-separator-dash-length, var(--xh-space-1_5));
|
|
21
21
|
--xh-_separator-dash-gap: var(--xh-separator-dash-gap, var(--xh-space-1_5));
|
|
22
22
|
--xh-_separator-paint: var(--xh-_separator-color);
|
|
@@ -26,15 +26,20 @@
|
|
|
26
26
|
background: var(--xh-_separator-paint);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/* 分隔线自带上下(竖向为左右)留白:横向上下各 20px,竖向左右各 12px,放进内容里不必另包一层加边距 */
|
|
29
30
|
[data-scope='separator'][data-part='root'][data-orientation='horizontal'] {
|
|
30
31
|
inline-size: 100%;
|
|
31
32
|
block-size: var(--xh-separator-thickness, var(--xh-stroke-thin));
|
|
33
|
+
margin-block: var(--xh-separator-my, var(--xh-space-5));
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
[data-scope='separator'][data-part='root'][data-orientation='vertical'] {
|
|
35
37
|
align-self: stretch;
|
|
36
38
|
inline-size: var(--xh-separator-thickness, var(--xh-stroke-thin));
|
|
37
39
|
block-size: 100%;
|
|
40
|
+
/* 父容器没有高度时也留一截与文字等高的线 */
|
|
41
|
+
min-block-size: var(--xh-glyph-size-text);
|
|
42
|
+
margin-inline: var(--xh-separator-mx, var(--xh-space-3));
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
/* —— 形态 ——
|
|
@@ -74,7 +79,9 @@
|
|
|
74
79
|
align-items: center;
|
|
75
80
|
inline-size: 100%;
|
|
76
81
|
block-size: auto;
|
|
77
|
-
gap: var(--xh-separator-gap, var(--xh-space-
|
|
82
|
+
gap: var(--xh-separator-gap, var(--xh-space-4));
|
|
83
|
+
/* 文字自带一行行高,上下留白收一半,整段占的高度与单线时相当 */
|
|
84
|
+
margin-block: var(--xh-separator-my, var(--xh-space-2_5));
|
|
78
85
|
background: none;
|
|
79
86
|
}
|
|
80
87
|
|
|
@@ -102,8 +109,9 @@
|
|
|
102
109
|
/* 分节文字:不参与等分,也不折行 */
|
|
103
110
|
[data-scope='separator'][data-part='content'] {
|
|
104
111
|
flex: none;
|
|
105
|
-
color: var(--xh-separator-content-fg, var(--xh-fg-
|
|
106
|
-
font-size: var(--xh-separator-content-font-size, var(--xh-text-
|
|
112
|
+
color: var(--xh-separator-content-fg, var(--xh-fg-default));
|
|
113
|
+
font-size: var(--xh-separator-content-font-size, var(--xh-text-body-size));
|
|
114
|
+
font-weight: var(--xh-separator-content-font-weight, var(--xh-font-weight-medium));
|
|
107
115
|
line-height: var(--xh-leading-normal);
|
|
108
116
|
white-space: nowrap;
|
|
109
117
|
}
|
|
@@ -114,6 +122,16 @@
|
|
|
114
122
|
flex: 0 0 var(--xh-separator-align-length, var(--xh-space-6));
|
|
115
123
|
}
|
|
116
124
|
|
|
125
|
+
/* 强制色:线是底色(与虚线的渐变)画的,系统会把底色换成 Canvas,线就此消失。
|
|
126
|
+
线退出强制换色、颜色直接取 CanvasText,实线与虚线同一条槽 */
|
|
127
|
+
@media (forced-colors: active) {
|
|
128
|
+
[data-scope='separator']:is([data-part='root'], [data-part='line']) {
|
|
129
|
+
--xh-_separator-color: CanvasText;
|
|
130
|
+
|
|
131
|
+
forced-color-adjust: none;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
117
135
|
/* 声明过任何 display 就盖掉了 UA 的 [hidden]{display:none},收起态得自己还回去。
|
|
118
136
|
写在文件末尾:兜底必须排在该部件所有 display 声明之后 */
|
|
119
137
|
[data-scope='separator'][data-part='root'][hidden] {
|
package/css/side-nav.css
CHANGED
|
@@ -30,8 +30,11 @@
|
|
|
30
30
|
把 --xh-icon-size 改接到 --xh-control-indicator-* 一族的盒尺 */
|
|
31
31
|
--xh-icon-size: var(--xh-side-nav-icon-size, var(--xh-glyph-size-md));
|
|
32
32
|
|
|
33
|
-
/*
|
|
34
|
-
|
|
33
|
+
/* 尺寸档只换这三个私有槽,行从这两处继承它们,换档不必给每个部件各写一条选择器。
|
|
34
|
+
行高取导航行的尺(比同档控件高一截) */
|
|
35
|
+
--xh-_side-nav-row-h: var(--xh-nav-row-h-md);
|
|
36
|
+
/* 面板内的搜索框是字段,高度仍走控件尺 */
|
|
37
|
+
--xh-_side-nav-input-h: var(--xh-control-h-md);
|
|
35
38
|
--xh-_side-nav-row-px: var(--xh-control-px-md);
|
|
36
39
|
--xh-_side-nav-row-gap: var(--xh-control-gap-md);
|
|
37
40
|
--xh-_side-nav-row-font-size: var(--xh-control-font-md);
|
|
@@ -41,7 +44,8 @@
|
|
|
41
44
|
/* 缺省档写在上面那条里 */
|
|
42
45
|
[data-scope='side-nav']:is([data-part='root'], [data-part='positioner'])[data-size='sm'] {
|
|
43
46
|
--xh-icon-size: var(--xh-side-nav-icon-size, var(--xh-glyph-size-sm));
|
|
44
|
-
--xh-_side-nav-row-h: var(--xh-
|
|
47
|
+
--xh-_side-nav-row-h: var(--xh-nav-row-h-sm);
|
|
48
|
+
--xh-_side-nav-input-h: var(--xh-control-h-sm);
|
|
45
49
|
--xh-_side-nav-row-px: var(--xh-control-px-sm);
|
|
46
50
|
--xh-_side-nav-row-gap: var(--xh-control-gap-sm);
|
|
47
51
|
--xh-_side-nav-row-font-size: var(--xh-control-font-sm);
|
|
@@ -49,7 +53,8 @@
|
|
|
49
53
|
|
|
50
54
|
[data-scope='side-nav']:is([data-part='root'], [data-part='positioner'])[data-size='lg'] {
|
|
51
55
|
--xh-icon-size: var(--xh-side-nav-icon-size, var(--xh-glyph-size-lg));
|
|
52
|
-
--xh-_side-nav-row-h: var(--xh-
|
|
56
|
+
--xh-_side-nav-row-h: var(--xh-nav-row-h-lg);
|
|
57
|
+
--xh-_side-nav-input-h: var(--xh-control-h-lg);
|
|
53
58
|
--xh-_side-nav-row-px: var(--xh-control-px-lg);
|
|
54
59
|
--xh-_side-nav-row-gap: var(--xh-control-gap-lg);
|
|
55
60
|
--xh-_side-nav-row-font-size: var(--xh-control-font-lg);
|
|
@@ -79,7 +84,7 @@
|
|
|
79
84
|
|
|
80
85
|
flex: none;
|
|
81
86
|
min-inline-size: 0;
|
|
82
|
-
block-size: var(--xh-side-nav-input-h, var(--xh-_side-nav-
|
|
87
|
+
block-size: var(--xh-side-nav-input-h, var(--xh-_side-nav-input-h));
|
|
83
88
|
padding-block: 0;
|
|
84
89
|
padding-inline: var(--xh-side-nav-input-px, var(--xh-_side-nav-row-px));
|
|
85
90
|
border: none;
|
|
@@ -213,7 +218,7 @@
|
|
|
213
218
|
--xh-collection-inline-padding: var(--xh-side-nav-link-px, var(--xh-_side-nav-row-px));
|
|
214
219
|
--xh-collection-gap: 0;
|
|
215
220
|
--xh-collection-font-size: var(--xh-side-nav-link-font-size, var(--xh-_side-nav-row-font-size));
|
|
216
|
-
--xh-collection-radius: var(--xh-side-nav-link-radius, var(--xh-shape-
|
|
221
|
+
--xh-collection-radius: var(--xh-side-nav-link-radius, var(--xh-shape-surface));
|
|
217
222
|
/* 作者的图标尺槽经桥接槽下发到行,家族缺省按 data-xh-collection-size 取档 */
|
|
218
223
|
--xh-collection-glyph-size: var(--xh-side-nav-icon-size, var(--xh-_collection-glyph-size));
|
|
219
224
|
--xh-collection-fg-rest: var(--xh-side-nav-row-fg, currentColor);
|
|
@@ -223,16 +228,16 @@
|
|
|
223
228
|
--xh-collection-bg-hover: var(--xh-side-nav-row-bg-hover, var(--xh-bg-subtle));
|
|
224
229
|
--xh-collection-bg-keyboard-highlight: var(--xh-side-nav-row-bg-hover, var(--xh-bg-subtle));
|
|
225
230
|
--xh-collection-bg-pressed: var(--xh-side-nav-row-bg-pressed, var(--xh-bg-subtle-hover));
|
|
226
|
-
/*
|
|
231
|
+
/* 当前页:页内持久集合的标记是品牌淡底行面 + 淡底前景;侧栏另把字重提到 semibold,整列扫读时当前项一眼可见 */
|
|
227
232
|
--xh-collection-bg-current: var(--xh-side-nav-row-bg-active, var(--xh-bg-brand-subtle));
|
|
228
233
|
--xh-collection-fg-current: var(--xh-side-nav-row-fg-active, var(--xh-fg-on-brand-subtle));
|
|
229
234
|
--xh-collection-fg-current-hover: var(--xh-side-nav-row-fg-active, var(--xh-fg-on-brand-subtle));
|
|
230
235
|
--xh-collection-fg-current-highlight: var(--xh-side-nav-row-fg-active, var(--xh-fg-on-brand-subtle));
|
|
231
236
|
--xh-collection-fg-current-pressed: var(--xh-side-nav-row-fg-active, var(--xh-fg-on-brand-subtle));
|
|
232
|
-
--xh-collection-font-weight-current: var(--xh-side-nav-row-font-weight-active, var(--xh-font-weight-
|
|
233
|
-
--xh-collection-font-weight-current-hover: var(--xh-side-nav-row-font-weight-active, var(--xh-font-weight-
|
|
234
|
-
--xh-collection-font-weight-current-highlight: var(--xh-side-nav-row-font-weight-active, var(--xh-font-weight-
|
|
235
|
-
--xh-collection-font-weight-current-pressed: var(--xh-side-nav-row-font-weight-active, var(--xh-font-weight-
|
|
237
|
+
--xh-collection-font-weight-current: var(--xh-side-nav-row-font-weight-active, var(--xh-font-weight-semibold));
|
|
238
|
+
--xh-collection-font-weight-current-hover: var(--xh-side-nav-row-font-weight-active, var(--xh-font-weight-semibold));
|
|
239
|
+
--xh-collection-font-weight-current-highlight: var(--xh-side-nav-row-font-weight-active, var(--xh-font-weight-semibold));
|
|
240
|
+
--xh-collection-font-weight-current-pressed: var(--xh-side-nav-row-font-weight-active, var(--xh-font-weight-semibold));
|
|
236
241
|
--xh-collection-indicator-fg-current: var(--xh-side-nav-indicator-color, var(--xh-fg-brand));
|
|
237
242
|
--xh-collection-indicator-fg-current-hover: var(--xh-side-nav-indicator-color, var(--xh-fg-brand));
|
|
238
243
|
--xh-collection-indicator-fg-current-highlight: var(--xh-side-nav-indicator-color, var(--xh-fg-brand));
|
package/css/signature-pad.css
CHANGED
|
@@ -23,34 +23,34 @@
|
|
|
23
23
|
gap: var(--xh-signature-pad-gap, var(--xh-space-2));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
/* 复合单字段的标签:14 /
|
|
26
|
+
/* 复合单字段的标签:14 / 400 / fg-muted,不随档;与画布隔 space-2——
|
|
27
27
|
容器的 gap 归画布之后的部件,标签在它之上补一段差值把距离收成目标值 */
|
|
28
28
|
[data-scope='signature-pad'][data-part='label'] {
|
|
29
29
|
margin-block-end: calc(
|
|
30
|
-
var(--xh-signature-pad-label-gap, var(--xh-space-
|
|
30
|
+
var(--xh-signature-pad-label-gap, var(--xh-space-2))
|
|
31
31
|
- var(--xh-signature-pad-gap, var(--xh-space-2))
|
|
32
32
|
);
|
|
33
|
-
color: var(--xh-signature-pad-label-fg, var(--xh-fg-
|
|
33
|
+
color: var(--xh-signature-pad-label-fg, var(--xh-fg-muted));
|
|
34
34
|
font-size: var(--xh-signature-pad-label-font-size, var(--xh-text-label-size));
|
|
35
35
|
font-weight: var(--xh-signature-pad-label-font-weight, var(--xh-text-label-weight));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
[data-scope='signature-pad'][data-part='label'][data-disabled] {
|
|
39
|
-
color: var(--xh-signature-pad-label-fg-disabled, var(--xh-fg-
|
|
39
|
+
color: var(--xh-signature-pad-label-fg-disabled, var(--xh-fg-muted));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/* 画布是块状的写字区:宽度铺满外层,高度由宽高比决定。
|
|
43
43
|
控件行高那把尺量的是一行控件,一块要写字的面积用不上它。
|
|
44
44
|
touch-action 由连接层内联写死,触摸落笔才不会被页面滚动抢走。
|
|
45
45
|
外壳按字段规则自绘(登记的画布型字段例外:字段家族配方钉死控件行高,画布按宽高比撑高吃不下它):
|
|
46
|
-
|
|
46
|
+
静息字段淡底 + border-control 描边 + control 圆角 + 无影,与字段外壳同一副面 */
|
|
47
47
|
[data-scope='signature-pad'][data-part='control'] {
|
|
48
48
|
display: block;
|
|
49
49
|
inline-size: 100%;
|
|
50
50
|
aspect-ratio: var(--xh-signature-pad-aspect-ratio, 5 / 2);
|
|
51
51
|
border: var(--xh-stroke-thin) solid var(--xh-signature-pad-border, var(--xh-border-control));
|
|
52
52
|
border-radius: var(--xh-signature-pad-radius, var(--xh-shape-control));
|
|
53
|
-
background: var(--xh-signature-pad-bg,
|
|
53
|
+
background: var(--xh-signature-pad-bg, var(--xh-bg-field));
|
|
54
54
|
cursor: crosshair;
|
|
55
55
|
/* 一划就会把画布连同旁边的文字一起刷成选中态 */
|
|
56
56
|
user-select: none;
|
|
@@ -60,14 +60,21 @@
|
|
|
60
60
|
background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
/* 悬停:底不变、描边升 border-strong,与字段外壳的悬停同一档 */
|
|
64
|
+
[data-scope='signature-pad'][data-part='control']:not([data-disabled]):not([data-readonly]):not([data-invalid]):not([data-drawing]):hover {
|
|
65
|
+
border-color: var(--xh-signature-pad-border-hover, var(--xh-border-strong));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* 校验失败:失效描边 + 4% 失效色淡底,与字段外壳的失效档同一副面 */
|
|
63
69
|
[data-scope='signature-pad'][data-part='control'][data-invalid] {
|
|
64
70
|
border-color: var(--xh-signature-pad-control-border-invalid, var(--xh-border-invalid));
|
|
71
|
+
background: var(--xh-signature-pad-bg-invalid, var(--xh-bg-field-invalid));
|
|
65
72
|
}
|
|
66
73
|
|
|
67
|
-
/*
|
|
68
|
-
用在这儿会让描边在落笔时反而变弱 */
|
|
74
|
+
/* 落笔期间与字段聚焦同一副面:换承载面 + 聚焦描边。排在失效之后,落笔时失效档让位 */
|
|
69
75
|
[data-scope='signature-pad'][data-part='control'][data-drawing] {
|
|
70
|
-
border-color: var(--xh-signature-pad-border-drawing, var(--xh-border-control-
|
|
76
|
+
border-color: var(--xh-signature-pad-border-drawing, var(--xh-border-control-focus));
|
|
77
|
+
background: var(--xh-signature-pad-bg-drawing, var(--xh-bg-surface));
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
/* 只读仍看得见签名,只是改不动:收掉手型,别暗示"在这儿能写";
|
|
@@ -176,4 +183,11 @@
|
|
|
176
183
|
[data-scope='signature-pad'][data-part='clear-trigger'][hidden] {
|
|
177
184
|
display: none;
|
|
178
185
|
}
|
|
186
|
+
|
|
187
|
+
/* 高对比档底色被系统换掉,落笔与失效只剩描边分得开:换系统高亮色 */
|
|
188
|
+
@media (forced-colors: active) {
|
|
189
|
+
[data-scope='signature-pad'][data-part='control']:is([data-drawing], [data-invalid]) {
|
|
190
|
+
border-color: Highlight;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
179
193
|
}
|
package/css/skeleton.css
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
[data-scope='skeleton'][data-part='root'] {
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
|
-
gap: var(--xh-skeleton-gap, var(--xh-space-
|
|
30
|
+
gap: var(--xh-skeleton-gap, var(--xh-space-4));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/* 声明了 display 就盖掉了 UA 的 [hidden]{display:none},补这条兜住加载结束后的收起态 */
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
/*
|
|
46
46
|
* 单根骨架条。底色与微光两层叠在一起:
|
|
47
47
|
* background-color 是静止时看到的那层,background-image 是扫过去的那道光。
|
|
48
|
-
*
|
|
49
|
-
*
|
|
48
|
+
* 微光取淡底一档叠在条底上:浅色下黑墨叠深、扫过去是一道比条底深的暗带,
|
|
49
|
+
* 深色下白墨叠亮、是一道亮带;两个主题里都是条底往前景方向再进一档。
|
|
50
50
|
*/
|
|
51
51
|
[data-scope='skeleton'][data-part='item'] {
|
|
52
52
|
inline-size: 100%;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
background-image: linear-gradient(
|
|
57
57
|
90deg,
|
|
58
58
|
transparent 20%,
|
|
59
|
-
var(--xh-skeleton-sheen, var(--xh-bg-
|
|
59
|
+
var(--xh-skeleton-sheen, var(--xh-bg-subtle)) 50%,
|
|
60
60
|
transparent 80%
|
|
61
61
|
);
|
|
62
62
|
background-repeat: no-repeat;
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
animation: xh-shimmer var(--xh-skeleton-duration, var(--xh-motion-loop-shimmer)) var(--xh-motion-ease-loop) infinite;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/*
|
|
68
|
+
/* 一行文字的高度取一行正文的行框,小圆角的方条,看起来就是一行还没排出来的字 */
|
|
69
69
|
[data-scope='skeleton'][data-part='item'][data-shape='text'] {
|
|
70
|
-
block-size: var(--xh-skeleton-text-block-size, var(--xh-text-
|
|
71
|
-
border-radius: var(--xh-skeleton-text-radius, var(--xh-shape-
|
|
70
|
+
block-size: var(--xh-skeleton-text-block-size, var(--xh-text-body-line-h));
|
|
71
|
+
border-radius: var(--xh-skeleton-text-radius, var(--xh-shape-inset));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/* 头像位:正方形加满圆角。宽度定死不跟着容器拉长,高度也不许被主轴压扁 */
|