@xihan-ui/styles 2.0.0 → 3.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.
Files changed (156) hide show
  1. package/CHANGELOG.md +1328 -0
  2. package/README.md +6 -1
  3. package/component-tokens.d.ts +505 -111
  4. package/components.tokens.json +34750 -26291
  5. package/css/accordion.css +39 -13
  6. package/css/alert.css +61 -3
  7. package/css/anchor.css +49 -11
  8. package/css/approval.css +124 -84
  9. package/css/avatar-group.css +1 -1
  10. package/css/avatar.css +13 -5
  11. package/css/back-top.css +63 -44
  12. package/css/badge.css +63 -13
  13. package/css/bar-code.css +1 -1
  14. package/css/breadcrumb.css +63 -4
  15. package/css/button-group.css +5 -5
  16. package/css/button.css +69 -21
  17. package/css/calendar-picker.css +27 -8
  18. package/css/calendar-range-picker.css +48 -11
  19. package/css/card.css +116 -2
  20. package/css/carousel.css +153 -48
  21. package/css/cartesian-chart.css +830 -0
  22. package/css/cascader.css +184 -70
  23. package/css/checkbox-group.css +69 -99
  24. package/css/checkbox.css +21 -54
  25. package/css/citation.css +470 -0
  26. package/css/clipboard.css +23 -66
  27. package/css/code-view.css +103 -8
  28. package/css/collapsible.css +37 -11
  29. package/css/color-field.css +18 -0
  30. package/css/color-picker.css +57 -62
  31. package/css/color-slider.css +26 -19
  32. package/css/color-swatch-picker.css +8 -6
  33. package/css/combobox.css +82 -37
  34. package/css/command.css +48 -48
  35. package/css/context-menu.css +43 -28
  36. package/css/date-field.css +23 -0
  37. package/css/date-picker.css +57 -24
  38. package/css/date-range-picker.css +301 -14
  39. package/css/description.css +17 -1
  40. package/css/descriptions.css +43 -1
  41. package/css/dialog.css +99 -43
  42. package/css/diff-view.css +101 -16
  43. package/css/download-trigger.css +46 -80
  44. package/css/drawer.css +168 -133
  45. package/css/editable.css +19 -0
  46. package/css/empty-state.css +8 -7
  47. package/css/field-array.css +36 -0
  48. package/css/field.css +17 -19
  49. package/css/fieldset.css +1 -1
  50. package/css/file-upload.css +126 -136
  51. package/css/flex.css +324 -8
  52. package/css/float-button.css +168 -41
  53. package/css/floating-panel.css +59 -27
  54. package/css/form.css +26 -20
  55. package/css/funnel-chart.css +106 -0
  56. package/css/graph-chart.css +205 -0
  57. package/css/grid-list.css +235 -0
  58. package/css/grid.css +252 -1
  59. package/css/heatmap.css +119 -36
  60. package/css/hierarchy-chart.css +298 -0
  61. package/css/hover-card.css +33 -18
  62. package/css/icon.css +100 -0
  63. package/css/image-cropper.css +34 -8
  64. package/css/image-viewer.css +169 -26
  65. package/css/image.css +23 -4
  66. package/css/infinite-scroll.css +2 -2
  67. package/css/input-group.css +13 -15
  68. package/css/json-viewer.css +55 -7
  69. package/css/kbd.css +1 -1
  70. package/css/layout.css +71 -21
  71. package/css/liquid.css +106 -0
  72. package/css/list.css +2 -2
  73. package/css/listbox.css +72 -23
  74. package/css/loading-bar.css +27 -13
  75. package/css/log.css +131 -35
  76. package/css/markdown-stream.css +1 -1
  77. package/css/marquee.css +163 -7
  78. package/css/matrix-code.css +1 -1
  79. package/css/mention.css +35 -21
  80. package/css/menu.css +40 -28
  81. package/css/menubar.css +42 -28
  82. package/css/message-feed.css +174 -53
  83. package/css/navigation-menu.css +177 -18
  84. package/css/notification.css +431 -110
  85. package/css/number-field.css +22 -0
  86. package/css/page-header.css +4 -2
  87. package/css/pagination.css +129 -29
  88. package/css/password-input.css +40 -8
  89. package/css/pie-chart.css +247 -0
  90. package/css/popconfirm.css +50 -58
  91. package/css/popover.css +55 -21
  92. package/css/progress.css +308 -10
  93. package/css/prompt-input.css +37 -1
  94. package/css/question-flow.css +104 -64
  95. package/css/radar-chart.css +233 -0
  96. package/css/radio-group.css +372 -14
  97. package/css/rating.css +25 -27
  98. package/css/reasoning.css +62 -55
  99. package/css/reset.css +1 -1
  100. package/css/resizable.css +6 -1
  101. package/css/sankey-chart.css +174 -0
  102. package/css/scroll-area.css +32 -0
  103. package/css/scrollbar.css +1 -1
  104. package/css/select.css +76 -59
  105. package/css/side-nav.css +177 -30
  106. package/css/signature-pad.css +23 -8
  107. package/css/skeleton.css +13 -14
  108. package/css/slider.css +39 -17
  109. package/css/sortable.css +38 -8
  110. package/css/sparkline.css +164 -0
  111. package/css/spinner.css +50 -22
  112. package/css/splitter.css +8 -2
  113. package/css/statistic.css +10 -0
  114. package/css/steps.css +257 -38
  115. package/css/switch.css +30 -55
  116. package/css/table.css +168 -128
  117. package/css/tabs.css +243 -31
  118. package/css/tag-group.css +65 -37
  119. package/css/tag.css +55 -14
  120. package/css/tags-input.css +40 -3
  121. package/css/text-field.css +19 -0
  122. package/css/time-field.css +20 -1
  123. package/css/time-picker.css +44 -17
  124. package/css/time-range-picker.css +45 -18
  125. package/css/timeline.css +1 -1
  126. package/css/toggle-group.css +8 -8
  127. package/css/toggle.css +6 -5
  128. package/css/tool-call.css +64 -56
  129. package/css/toolbar.css +105 -7
  130. package/css/tooltip.css +18 -7
  131. package/css/tour.css +49 -21
  132. package/css/transfer.css +104 -81
  133. package/css/tree-select.css +235 -58
  134. package/css/tree.css +240 -147
  135. package/css/truncate.css +55 -12
  136. package/css/typography.css +93 -0
  137. package/css/virtualizer.css +57 -1
  138. package/css/watermark.css +23 -0
  139. package/family/action-control.css +14 -5
  140. package/family/chart.css +480 -0
  141. package/family/check-mark.css +94 -0
  142. package/family/choice-card.css +97 -0
  143. package/family/collection-item.css +70 -27
  144. package/family/field-chrome.css +1 -12
  145. package/family/loading-ring.css +95 -0
  146. package/family/material.css +72 -0
  147. package/family/menu-choice.css +56 -0
  148. package/family/motion.css +208 -11
  149. package/family/tag-list.css +59 -0
  150. package/index.css +23363 -14091
  151. package/index.unlayered.css +23198 -13922
  152. package/package.json +20 -8
  153. package/css/gradient-text.css +0 -91
  154. package/css/icon-wrapper.css +0 -81
  155. package/css/segmented.css +0 -280
  156. package/css/toast.css +0 -499
@@ -7,7 +7,9 @@
7
7
 
8
8
  /* 共享关键帧由 family/motion.css 提供,条目走 Collection Item 家族;本皮肤 @import 它们,单独引入仍成立。 */
9
9
  @import '../family/collection-item.css';
10
+ @import '../family/menu-choice.css';
10
11
  @import '../family/motion.css';
12
+ @import '../family/material.css';
11
13
 
12
14
  @layer xihan.components {
13
15
  /* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
@@ -63,7 +65,7 @@
63
65
  /* 私有槽同时声明在根与 positioner 上:浮层被搬到 portal 落点,不是根的后代,继承不过去 */
64
66
  [data-scope='context-menu']:is([data-part='root'], [data-part='positioner']) {
65
67
  /* 条目外的字形(分组标题等)按档取尺,缺省 md,随 data-size 换档;同样声明在 positioner 上,被搬走的浮层
66
- 才拿得到;条目里作者放的图标由家族随 data-xh-collection-size 下发(§6.5)。菜单自绘的状态字形(标记位的盒、
68
+ 才拿得到;条目里作者放的图标由家族随 data-xh-collection-size 下发。菜单自绘的状态字形(标记位的盒、
67
69
  盒里兜底的勾、子菜单的展开 chevron)不读这支:它们是指示符,走 --xh-control-indicator-* 一族——标记位在
68
70
  自己身上把 --xh-icon-size 改接到盒的尺,子菜单箭头走 --xh-context-menu-submenu-indicator-size */
69
71
  --xh-icon-size: var(--xh-context-menu-icon-size, var(--xh-glyph-size-md));
@@ -83,6 +85,15 @@
83
85
  }
84
86
 
85
87
  [data-scope='context-menu'][data-part='content'] {
88
+ /* 材质由家族配方画(family/material.css 的 frosted 面:描边、底、1px 顶光、前景、投影与背景滤镜),
89
+ 这里只把使用者槽接进来 */
90
+ --xh-frosted-bg: var(--xh-context-menu-content-bg, var(--xh-_material-bg));
91
+ --xh-frosted-border: var(--xh-context-menu-border, var(--xh-_material-border));
92
+ --xh-frosted-fg: var(--xh-context-menu-content-fg, var(--xh-_material-fg));
93
+ --xh-frosted-shadow: var(--xh-context-menu-content-shadow, var(--xh-_material-shadow));
94
+ --xh-frosted-backdrop: var(--xh-context-menu-backdrop, var(--xh-_material-backdrop));
95
+ --xh-frosted-highlight: var(--xh-context-menu-highlight, var(--xh-_material-highlight));
96
+
86
97
  position: relative;
87
98
  display: flex;
88
99
  flex-direction: column;
@@ -94,32 +105,14 @@
94
105
  max-block-size: min(var(--xh-context-menu-max-h, var(--xh-overlay-menu-max-h)), var(--xh-_context-menu-available-h));
95
106
  padding-block: var(--xh-context-menu-content-py, var(--xh-surface-pad-xs));
96
107
  padding-inline: var(--xh-context-menu-content-px, var(--xh-surface-pad-xs));
97
- border: var(--xh-stroke-thin) solid var(--xh-context-menu-border, var(--xh-material-frosted-border));
98
108
  border-radius: var(--xh-context-menu-content-radius, var(--xh-shape-overlay));
99
- background: var(--xh-context-menu-content-bg, var(--xh-material-frosted-bg));
100
- color: var(--xh-context-menu-content-fg, var(--xh-material-frosted-fg));
101
- box-shadow: var(--xh-context-menu-content-shadow, var(--xh-material-frosted-shadow));
102
- -webkit-backdrop-filter: var(--xh-context-menu-backdrop, var(--xh-material-frosted-backdrop));
103
- backdrop-filter: var(--xh-context-menu-backdrop, var(--xh-material-frosted-backdrop));
104
109
  /* 条目超过上限就在菜单内部滚;内收焦点环不会被内边距缘裁掉。
105
- 浮层滚动面:到底后不把滚动链穿透给页面(§6.6) */
110
+ 浮层滚动面:到底后不把滚动链穿透给页面 */
106
111
  overflow-y: auto;
107
112
  overscroll-behavior: contain;
108
113
  pointer-events: auto;
109
114
  }
110
115
 
111
- /* 顶光单独叠在真实四边 border 内侧;强制色归零后轮廓仍在。 */
112
- [data-scope='context-menu'][data-part='content']::before {
113
- content: '';
114
- position: absolute;
115
- inset-block-start: 0;
116
- inset-inline: 0;
117
- block-size: var(--xh-stroke-thin);
118
- border-radius: inherit;
119
- background: var(--xh-context-menu-highlight, var(--xh-material-frosted-highlight));
120
- pointer-events: none;
121
- }
122
-
123
116
  [data-scope='context-menu'][data-part='root'][hidden] {
124
117
  display: none;
125
118
  }
@@ -147,7 +140,7 @@
147
140
  长按会先选中区域内的文字,长按菜单弹出时手指底下是一片高亮,很难看 */
148
141
  [data-scope='context-menu'][data-part='trigger'] {
149
142
  user-select: none;
150
- transition: background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
143
+ transition: background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
151
144
  }
152
145
 
153
146
  /* 触屏没有右键,菜单靠长按计时打开。这段等待里若一点变化都没有,用户会当成没按上而提前
@@ -177,9 +170,8 @@
177
170
  }
178
171
 
179
172
  /* 首帧落位后从锚点一侧淡入短移,不缩放整张面。 */
180
- [data-scope='context-menu'][data-part='content'][data-state='open'] {
181
- /* 在场那一档才提前备好合成层:属性随 data-state 一起消失,收起后不长期占着 */
182
- will-change: opacity, translate;
173
+ /* 挂载时就开着的那一段(data-instant)属于首帧,直接呈现 */
174
+ [data-scope='context-menu'][data-part='content'][data-state='open']:not([data-instant]) {
183
175
  animation: xh-overlay-slide-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
184
176
  }
185
177
 
@@ -226,7 +218,7 @@
226
218
  --xh-collection-inline-padding: var(--xh-context-menu-item-px, var(--xh-_context-menu-item-px));
227
219
  --xh-collection-gap: 0;
228
220
  --xh-collection-font-size: var(--xh-context-menu-item-font-size, var(--xh-_context-menu-font-size));
229
- --xh-collection-radius: var(--xh-context-menu-item-radius, var(--xh-shape-control));
221
+ --xh-collection-radius: var(--xh-context-menu-item-radius, var(--xh-shape-inset));
230
222
  --xh-collection-fg-rest: var(--xh-context-menu-item-fg, var(--xh-material-frosted-fg));
231
223
  --xh-collection-fg-hover: var(--xh-context-menu-item-fg, var(--xh-material-frosted-fg));
232
224
  --xh-collection-fg-keyboard-highlight: var(--xh-context-menu-item-fg, var(--xh-material-frosted-fg));
@@ -260,7 +252,7 @@
260
252
  }
261
253
 
262
254
  /* 子菜单箭头留在主行末端;description 即使写在它前面,也由 order 独占下一行。
263
- 箭头是指示符(§6.5):与标记位的盒同走 --xh-control-indicator-size,不读 --xh-icon-size——
255
+ 箭头是指示符:与标记位的盒同走 --xh-control-indicator-size,不读 --xh-icon-size——
264
256
  按图标档取的 20px 会比 16px 的标记位盒大一圈 */
265
257
  [data-scope='context-menu'][data-part='item'][aria-haspopup='menu']::after {
266
258
  content: '';
@@ -292,7 +284,7 @@
292
284
  display: none;
293
285
  }
294
286
 
295
- /* 标记位(勾选符号 / 图标)按作者写入的槽位留在主行,不为没写的条目强制占列。盒是指示符(§6.5):按指示符档
287
+ /* 标记位(勾选符号 / 图标)按作者写入的槽位留在主行,不为没写的条目强制占列。盒是指示符:按指示符档
296
288
  取尺,与 Menu / Cascader 的标记位同走 --xh-control-indicator-size,不读家族按档下发的 --xh-icon-size——
297
289
  按图标档取的 20px 会比同一行 16px 的指示符档大一圈。盒在自己身上把 --xh-icon-size 改接到盒的尺,
298
290
  皮肤画的兜底勾与作者塞进标记位的 XhIcon 读同一把尺、与盒同边长(行尾标记不是勾选格,不取 × 0.75);
@@ -323,7 +315,8 @@
323
315
  order: 2;
324
316
  min-inline-size: 0;
325
317
  color: var(--xh-context-menu-item-description-fg, var(--xh-material-frosted-fg-muted));
326
- font-size: var(--xh-context-menu-item-description-font-size, var(--xh-text-caption-size));
318
+ /* 与同一行的快捷键、Select 等列表的说明同档:控件次级字号,不取 caption 令牌 */
319
+ font-size: var(--xh-context-menu-item-description-font-size, var(--xh-control-caption-md));
327
320
  white-space: nowrap;
328
321
  text-overflow: ellipsis;
329
322
  overflow: hidden;
@@ -384,6 +377,28 @@
384
377
  -webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
385
378
  mask: var(--xh-glyph-mark-check) center / contain no-repeat;
386
379
  }
380
+
381
+ @media (forced-colors: active) {
382
+ /* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
383
+ 字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
384
+ 条目面上取 CanvasText;按下与没被高亮时的悬停,家族把条目涂成 Highlight,字形换 HighlightText;
385
+ 禁用取 GrayText */
386
+ [data-scope='context-menu'][data-part='item'][aria-haspopup='menu']::after,
387
+ [data-scope='context-menu'][data-part='item-indicator']:empty::before {
388
+ forced-color-adjust: none;
389
+ background-color: CanvasText;
390
+ }
391
+
392
+ [data-scope='context-menu'][data-part='item'][aria-haspopup='menu']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed], :hover:not(:focus-visible, [data-highlighted]))::after,
393
+ [data-scope='context-menu'][data-part='item']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed], :hover:not(:focus-visible, [data-highlighted])) [data-scope='context-menu'][data-part='item-indicator']:empty::before {
394
+ background-color: HighlightText;
395
+ }
396
+
397
+ [data-scope='context-menu'][data-part='item'][aria-haspopup='menu']:is([aria-disabled='true'], [data-disabled])::after,
398
+ [data-scope='context-menu'][data-part='item']:is([aria-disabled='true'], [data-disabled]) [data-scope='context-menu'][data-part='item-indicator']:empty::before {
399
+ background-color: GrayText;
400
+ }
401
+ }
387
402
  }
388
403
 
389
404
  @layer xihan.motion {
@@ -143,6 +143,10 @@
143
143
  user-select: none;
144
144
  /* 触屏上连点两下不该被当成缩放手势 */
145
145
  touch-action: manipulation;
146
+ /* 反白随当前段换色:状态角色的 micro 淡变,与 TimeField 同一档;焦点环画在 control 上,不进过渡 */
147
+ transition:
148
+ background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
149
+ color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
146
150
  }
147
151
 
148
152
  /* granularity 用不上的段带 hidden 留在文档里(不卸载作者节点)。
@@ -252,4 +256,23 @@
252
256
  white-space: nowrap;
253
257
  pointer-events: none;
254
258
  }
259
+
260
+ @media (forced-colors: active) {
261
+ /* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
262
+ 字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
263
+ 按钮面上取 ButtonText,悬停与按下时家族把按钮涂成 Highlight、字形换 HighlightText;
264
+ 禁用取 GrayText */
265
+ [data-scope='date-field'][data-part='clear-trigger']:empty::before {
266
+ forced-color-adjust: none;
267
+ background-color: ButtonText;
268
+ }
269
+
270
+ [data-scope='date-field'][data-part='clear-trigger']:not([data-disabled]):not([data-loading]):is(:hover, :active, [data-pressed]):empty::before {
271
+ background-color: HighlightText;
272
+ }
273
+
274
+ [data-scope='date-field'][data-part='clear-trigger'][data-disabled]:empty::before {
275
+ background-color: GrayText;
276
+ }
277
+ }
255
278
  }
@@ -73,6 +73,7 @@
73
73
  --xh-_date-picker-control-px: var(--xh-control-px-md);
74
74
  --xh-_date-picker-gap: var(--xh-control-gap-md);
75
75
  --xh-_date-picker-font-size: var(--xh-control-font-md);
76
+ --xh-_date-picker-item-py: var(--xh-list-option-py-md);
76
77
 
77
78
  /* 选中对号随语气走。没写 data-tone 时这几个 --xh-_tone* 没被声明,退回品牌色 */
78
79
  /* 内嵌日期段沿用日期输入的轻强调焦点:当前段是「当前项」,淡底 + 淡底前景,不另画一套实心选择态。 */
@@ -80,7 +81,8 @@
80
81
  --xh-_date-field-segment-fg: var(--xh-_tone-fg, var(--xh-fg-on-brand-subtle));
81
82
  /* 对号画在普通面上,取语气前景角色,不能拿确认按钮的实心背景色充当前景。 */
82
83
  --xh-_date-picker-check-fg: var(--xh-_tone, var(--xh-fg-brand));
83
- --xh-_date-picker-time-item-check-size: var(--xh-glyph-size-sm);
84
+ /* 时间列与预设的对号与 Select 等列表的对号同一把尺:指示符档,随密度收放 */
85
+ --xh-_date-picker-time-item-check-size: var(--xh-control-indicator-size);
84
86
  }
85
87
 
86
88
  /* 与文本框、分段日期同一套堆叠:标签一行、输入行一行 */
@@ -107,6 +109,7 @@
107
109
  --xh-_date-picker-control-px: var(--xh-control-px-sm);
108
110
  --xh-_date-picker-gap: var(--xh-control-gap-sm);
109
111
  --xh-_date-picker-font-size: var(--xh-control-font-sm);
112
+ --xh-_date-picker-item-py: var(--xh-list-option-py-sm);
110
113
  }
111
114
 
112
115
  [data-scope='date-picker']:is([data-part='root'], [data-part='positioner'])[data-size='lg'] {
@@ -115,10 +118,11 @@
115
118
  --xh-_date-picker-control-px: var(--xh-control-px-lg);
116
119
  --xh-_date-picker-gap: var(--xh-control-gap-lg);
117
120
  --xh-_date-picker-font-size: var(--xh-control-font-lg);
121
+ --xh-_date-picker-item-py: var(--xh-list-option-py-lg);
118
122
  }
119
123
 
120
124
  /* 375px 复合面板要同时容下日历与时/分两列;手机档用正式小指示符,平板起恢复16px。 */
121
- @media (width < 768px) {
125
+ @media not all and (min-width: 768px) {
122
126
  [data-scope='date-picker']:is([data-part='root'], [data-part='positioner']) {
123
127
  --xh-_date-picker-time-item-check-size: var(--xh-control-indicator-sm);
124
128
  }
@@ -291,9 +295,8 @@
291
295
  outline: none;
292
296
  }
293
297
 
294
- [data-scope='date-picker'][data-part='content'][data-state='open'] {
295
- /* 只在展开态挂着:随状态属性一起消失,不长期占着合成层 */
296
- will-change: opacity, translate;
298
+ /* 挂载时就开着的那一段(data-instant)属于首帧,直接呈现 */
299
+ [data-scope='date-picker'][data-part='content'][data-state='open']:not([data-instant]) {
297
300
  animation: xh-overlay-slide-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
298
301
  }
299
302
 
@@ -346,7 +349,7 @@
346
349
  手机档两张月历折行堆叠,线画在块起始边 */
347
350
  [data-scope='date-picker'][data-part='calendar'] + [data-scope='date-picker'][data-part='calendar'] {
348
351
  padding-block-start: var(--xh-date-picker-panel-gap, var(--xh-space-3));
349
- border-block-start: var(--xh-stroke-thin) solid var(--xh-date-picker-panel-divider, var(--xh-material-frosted-separator));
352
+ border-block-start: var(--xh-stroke-thin) solid var(--xh-date-picker-panel-divider, var(--xh-material-solid-separator));
350
353
  }
351
354
 
352
355
  /* 平板起两张月历并排放得下,线改画在行内起始边 */
@@ -355,7 +358,7 @@
355
358
  padding-block-start: 0;
356
359
  padding-inline-start: var(--xh-date-picker-panel-gap, var(--xh-space-3));
357
360
  border-block-start: none;
358
- border-inline-start: var(--xh-stroke-thin) solid var(--xh-date-picker-panel-divider, var(--xh-material-frosted-separator));
361
+ border-inline-start: var(--xh-stroke-thin) solid var(--xh-date-picker-panel-divider, var(--xh-material-solid-separator));
359
362
  }
360
363
  }
361
364
 
@@ -395,7 +398,7 @@
395
398
  inset-block: 0;
396
399
  inset-inline-end: calc(-1 * var(--xh-stroke-thin));
397
400
  inline-size: var(--xh-stroke-thin);
398
- background: var(--xh-date-picker-column-divider, var(--xh-material-frosted-separator));
401
+ background: var(--xh-date-picker-column-divider, var(--xh-material-solid-separator));
399
402
  pointer-events: none;
400
403
  }
401
404
 
@@ -420,7 +423,7 @@
420
423
  overflow-y: hidden;
421
424
  /* 浮层滚动面:滚到头不把页面一起带走 */
422
425
  overscroll-behavior: contain;
423
- border-block-end: var(--xh-stroke-thin) solid var(--xh-date-picker-column-divider, var(--xh-material-frosted-separator));
426
+ border-block-end: var(--xh-stroke-thin) solid var(--xh-date-picker-column-divider, var(--xh-material-solid-separator));
424
427
  }
425
428
 
426
429
  /* 平板起:换成贴在日历行内起始一侧的竖列,滚动轴与分隔线一起转过来 */
@@ -430,7 +433,7 @@
430
433
  flex-direction: column;
431
434
  overflow: auto;
432
435
  border-block-end: none;
433
- border-inline-end: var(--xh-stroke-thin) solid var(--xh-date-picker-column-divider, var(--xh-material-frosted-separator));
436
+ border-inline-end: var(--xh-stroke-thin) solid var(--xh-date-picker-column-divider, var(--xh-material-solid-separator));
434
437
  }
435
438
  }
436
439
 
@@ -445,7 +448,7 @@
445
448
  --xh-collection-block-padding: var(--xh-date-picker-preset-py, var(--xh-space-1));
446
449
  --xh-collection-inline-padding: var(--xh-date-picker-preset-px, var(--xh-space-3));
447
450
  --xh-collection-font-size: var(--xh-text-secondary-size);
448
- --xh-collection-radius: var(--xh-date-picker-preset-radius, var(--xh-shape-control));
451
+ --xh-collection-radius: var(--xh-date-picker-preset-radius, var(--xh-shape-inset));
449
452
  /* 面板是实体面(floating),正文取页面前景 */
450
453
  --xh-collection-fg-rest: var(--xh-fg-default);
451
454
  --xh-collection-fg-hover: var(--xh-fg-default);
@@ -472,7 +475,7 @@
472
475
  /* 对号的末端轨始终留着,切换选中时文字与整列宽度都不移动。 */
473
476
  padding-inline-end: calc(
474
477
  var(--xh-date-picker-preset-px, var(--xh-space-3)) +
475
- var(--xh-date-picker-preset-check-size, var(--xh-glyph-size-sm)) +
478
+ var(--xh-date-picker-preset-check-size, var(--xh-control-indicator-size)) +
476
479
  var(--xh-space-1)
477
480
  );
478
481
  white-space: nowrap;
@@ -497,8 +500,8 @@
497
500
  position: absolute;
498
501
  inset-block-start: 50%;
499
502
  inset-inline-end: var(--xh-date-picker-preset-px, var(--xh-space-3));
500
- inline-size: var(--xh-date-picker-preset-check-size, var(--xh-glyph-size-sm));
501
- block-size: var(--xh-date-picker-preset-check-size, var(--xh-glyph-size-sm));
503
+ inline-size: var(--xh-date-picker-preset-check-size, var(--xh-control-indicator-size));
504
+ block-size: var(--xh-date-picker-preset-check-size, var(--xh-control-indicator-size));
502
505
  translate: 0 -50%;
503
506
  background-color: var(--xh-date-picker-preset-check-fg, var(--xh-_date-picker-check-fg));
504
507
  opacity: 0;
@@ -525,10 +528,7 @@
525
528
  gap: var(--xh-date-picker-time-column-gap, 0);
526
529
  min-inline-size: var(--xh-date-picker-time-column-min-w, var(--xh-overlay-column-min-w));
527
530
  /* 几列并排:定高而不是随内容收,否则时列与分列的可选值一多一少就错位 */
528
- block-size: var(
529
- --xh-date-picker-time-column-h,
530
- min(var(--xh-viewport-h-md), calc(var(--xh-control-h-sm) * 7 + var(--xh-space-7)))
531
- );
531
+ block-size: var(--xh-date-picker-time-column-h, var(--xh-overlay-calendar-column-h));
532
532
  margin-block-start: var(
533
533
  --xh-date-picker-time-column-offset,
534
534
  calc(var(--xh-control-h-sm) + var(--xh-date-picker-calendar-gap, var(--xh-space-2)))
@@ -539,7 +539,7 @@
539
539
  overflow-y: auto;
540
540
  /* 浮层滚动面:滚到头不把页面一起带走 */
541
541
  overscroll-behavior: contain;
542
- border-inline-start: var(--xh-stroke-thin) solid var(--xh-date-picker-column-divider, var(--xh-material-frosted-separator));
542
+ border-inline-start: var(--xh-stroke-thin) solid var(--xh-date-picker-column-divider, var(--xh-material-solid-separator));
543
543
  }
544
544
 
545
545
  [data-scope='date-picker'][data-part='time-column'][hidden] {
@@ -556,10 +556,10 @@
556
556
  var(--xh-date-picker-time-item-px, var(--xh-space-0_5)),
557
557
  calc(var(--xh-date-picker-time-item-check-size, var(--xh-_date-picker-time-item-check-size)) + var(--xh-space-0_5))
558
558
  );
559
- --xh-collection-block-padding: var(--xh-date-picker-time-item-py, 0);
559
+ --xh-collection-block-padding: var(--xh-date-picker-time-item-py, var(--xh-_date-picker-item-py));
560
560
  --xh-collection-inline-padding: var(--xh-_date-picker-time-item-rail);
561
- --xh-collection-font-size: var(--xh-text-secondary-size);
562
- --xh-collection-radius: var(--xh-date-picker-time-item-radius, var(--xh-shape-control));
561
+ --xh-collection-font-size: var(--xh-date-picker-time-item-font-size, var(--xh-_date-picker-font-size));
562
+ --xh-collection-radius: var(--xh-date-picker-time-item-radius, var(--xh-shape-inset));
563
563
  --xh-collection-fg-rest: var(--xh-date-picker-time-item-fg, var(--xh-material-frosted-fg));
564
564
  --xh-collection-fg-hover: var(--xh-date-picker-time-item-fg, var(--xh-material-frosted-fg));
565
565
  --xh-collection-fg-keyboard-highlight: var(--xh-date-picker-time-item-fg, var(--xh-material-frosted-fg));
@@ -586,8 +586,9 @@
586
586
  flex: none;
587
587
  align-items: center;
588
588
  justify-content: center;
589
- block-size: var(--xh-date-picker-time-item-h, calc(var(--xh-control-h-sm) - var(--xh-space-1)));
589
+ block-size: var(--xh-date-picker-time-item-h, auto);
590
590
  font-variant-numeric: tabular-nums;
591
+ line-height: var(--xh-leading-normal);
591
592
  text-align: center;
592
593
  white-space: nowrap;
593
594
  user-select: none;
@@ -630,7 +631,12 @@
630
631
  opacity: 1;
631
632
  }
632
633
 
633
- @media (width < 768px) {
634
+ /* 界外、被判为不可用的格走 aria-disabled,家族按它给禁用面;选中标记跟着降级 */
635
+ [data-scope='date-picker'][data-part='time-item'][data-disabled]::after {
636
+ background-color: var(--xh-fg-disabled);
637
+ }
638
+
639
+ @media not all and (min-width: 768px) {
634
640
  [data-scope='date-picker'][data-part='content'] {
635
641
  padding-inline: var(--xh-date-picker-content-px, var(--xh-space-2));
636
642
  }
@@ -735,16 +741,43 @@
735
741
  background-color: CanvasText;
736
742
  }
737
743
 
744
+ /* 按下与没被高亮时的悬停,家族把条目涂成 Highlight,对号跟着换 HighlightText */
745
+ [data-scope='date-picker'][data-part='preset']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed], :hover:not(:focus-visible, [data-highlighted]))::after,
746
+ [data-scope='date-picker'][data-part='time-item']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed], :hover:not(:focus-visible, [data-highlighted]))::after {
747
+ background-color: HighlightText;
748
+ }
749
+
738
750
  [data-scope='date-picker'][data-part='preset'][data-disabled]::after,
751
+ [data-scope='date-picker'][data-part='time-item'][data-disabled]::after,
739
752
  [data-scope='date-picker'][data-part='time-column'][aria-disabled='true'] [data-part='time-item']::after {
740
753
  background-color: GrayText;
741
754
  }
742
755
 
743
756
  [data-scope='date-picker'][data-part='preset'][data-disabled],
757
+ [data-scope='date-picker'][data-part='time-item'][data-disabled],
744
758
  [data-scope='date-picker'][data-part='time-column'][aria-disabled='true'] [data-part='time-item'] {
745
759
  color: GrayText;
746
760
  }
747
761
  }
762
+
763
+ @media (forced-colors: active) {
764
+ /* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
765
+ 字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
766
+ 按钮面上取 ButtonText,悬停与按下时家族把按钮涂成 Highlight、字形换 HighlightText;
767
+ 禁用取 GrayText */
768
+ [data-scope='date-picker']:is([data-part='clear-trigger'], [data-part='trigger']):empty::before {
769
+ forced-color-adjust: none;
770
+ background-color: ButtonText;
771
+ }
772
+
773
+ [data-scope='date-picker']:is([data-part='clear-trigger'], [data-part='trigger']):not([data-disabled]):not([data-loading]):is(:hover, :active, [data-pressed]):empty::before {
774
+ background-color: HighlightText;
775
+ }
776
+
777
+ [data-scope='date-picker']:is([data-part='clear-trigger'], [data-part='trigger'])[data-disabled]:empty::before {
778
+ background-color: GrayText;
779
+ }
780
+ }
748
781
  }
749
782
 
750
783
  @layer xihan.motion {