@xihan-ui/styles 3.1.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/CHANGELOG.md +470 -0
  2. package/component-tokens.d.ts +230 -60
  3. package/components.tokens.json +5156 -1557
  4. package/css/accordion.css +47 -20
  5. package/css/alert.css +16 -17
  6. package/css/anchor.css +2 -2
  7. package/css/approval.css +41 -17
  8. package/css/avatar-group.css +9 -12
  9. package/css/avatar.css +20 -18
  10. package/css/back-top.css +21 -7
  11. package/css/badge.css +5 -5
  12. package/css/breadcrumb.css +18 -16
  13. package/css/button-group.css +4 -6
  14. package/css/button.css +13 -12
  15. package/css/calendar-picker.css +178 -95
  16. package/css/calendar-range-picker.css +207 -122
  17. package/css/card.css +34 -6
  18. package/css/carousel.css +94 -46
  19. package/css/cartesian-chart.css +11 -11
  20. package/css/cascader.css +51 -39
  21. package/css/checkbox-group.css +9 -6
  22. package/css/checkbox.css +5 -4
  23. package/css/citation.css +9 -4
  24. package/css/clipboard.css +20 -4
  25. package/css/code-view.css +6 -6
  26. package/css/collapsible.css +29 -14
  27. package/css/color-field.css +4 -4
  28. package/css/color-picker.css +77 -23
  29. package/css/color-slider.css +10 -8
  30. package/css/color-swatch-picker.css +14 -9
  31. package/css/combobox.css +26 -14
  32. package/css/command.css +14 -9
  33. package/css/context-menu.css +10 -5
  34. package/css/date-field.css +12 -6
  35. package/css/date-picker.css +178 -109
  36. package/css/date-range-picker.css +199 -130
  37. package/css/description.css +10 -6
  38. package/css/descriptions.css +47 -19
  39. package/css/dialog.css +50 -35
  40. package/css/diff-view.css +8 -8
  41. package/css/drawer.css +75 -21
  42. package/css/editable.css +15 -41
  43. package/css/empty-state.css +21 -3
  44. package/css/field-array.css +5 -2
  45. package/css/field.css +17 -18
  46. package/css/fieldset.css +33 -13
  47. package/css/file-upload.css +66 -33
  48. package/css/float-button.css +60 -35
  49. package/css/floating-panel.css +1 -1
  50. package/css/form.css +30 -16
  51. package/css/graph-chart.css +2 -2
  52. package/css/grid-list.css +1 -1
  53. package/css/highlight.css +5 -5
  54. package/css/hover-card.css +19 -12
  55. package/css/image-viewer.css +77 -27
  56. package/css/image.css +13 -5
  57. package/css/infinite-scroll.css +8 -4
  58. package/css/input-group.css +74 -26
  59. package/css/kbd.css +1 -1
  60. package/css/label.css +27 -11
  61. package/css/layout.css +17 -10
  62. package/css/list.css +13 -9
  63. package/css/listbox.css +12 -7
  64. package/css/loading-bar.css +3 -0
  65. package/css/mention.css +11 -9
  66. package/css/menu.css +10 -5
  67. package/css/menubar.css +13 -8
  68. package/css/message-feed.css +1 -1
  69. package/css/navigation-menu.css +2 -2
  70. package/css/notification.css +132 -49
  71. package/css/number-animation.css +2 -2
  72. package/css/number-field.css +75 -52
  73. package/css/page-header.css +64 -27
  74. package/css/pagination.css +35 -38
  75. package/css/password-input.css +12 -68
  76. package/css/pin-input.css +18 -26
  77. package/css/popconfirm.css +23 -14
  78. package/css/popover.css +18 -12
  79. package/css/progress.css +14 -13
  80. package/css/prompt-input.css +3 -3
  81. package/css/question-flow.css +41 -15
  82. package/css/radar-chart.css +6 -6
  83. package/css/radio-group.css +120 -55
  84. package/css/rating.css +32 -15
  85. package/css/select.css +16 -12
  86. package/css/separator.css +24 -6
  87. package/css/side-nav.css +29 -24
  88. package/css/signature-pad.css +23 -9
  89. package/css/skeleton.css +12 -12
  90. package/css/slider.css +77 -48
  91. package/css/sortable.css +2 -2
  92. package/css/sparkline.css +8 -2
  93. package/css/spinner.css +40 -20
  94. package/css/statistic.css +14 -14
  95. package/css/steps.css +115 -84
  96. package/css/switch.css +9 -7
  97. package/css/table.css +29 -12
  98. package/css/tabs.css +35 -12
  99. package/css/tag-group.css +17 -6
  100. package/css/tag.css +54 -29
  101. package/css/tags-input.css +39 -20
  102. package/css/text-field.css +5 -5
  103. package/css/time-field.css +4 -4
  104. package/css/time-picker.css +150 -64
  105. package/css/time-range-picker.css +91 -62
  106. package/css/timeline.css +37 -20
  107. package/css/timer.css +3 -3
  108. package/css/toggle-group.css +4 -4
  109. package/css/tool-call.css +13 -11
  110. package/css/toolbar.css +6 -5
  111. package/css/tooltip.css +16 -17
  112. package/css/tour.css +14 -7
  113. package/css/transfer.css +22 -16
  114. package/css/tree-select.css +12 -12
  115. package/css/tree.css +26 -25
  116. package/css/typography.css +28 -25
  117. package/dist/css/accordion.css +296 -0
  118. package/dist/css/affix.css +47 -0
  119. package/dist/css/alert.css +246 -0
  120. package/dist/css/anchor.css +252 -0
  121. package/dist/css/approval.css +525 -0
  122. package/dist/css/avatar-group.css +96 -0
  123. package/dist/css/avatar.css +100 -0
  124. package/dist/css/back-top.css +175 -0
  125. package/dist/css/badge.css +205 -0
  126. package/dist/css/bar-code.css +62 -0
  127. package/dist/css/breadcrumb.css +232 -0
  128. package/dist/css/button-group.css +261 -0
  129. package/dist/css/button.css +216 -0
  130. package/dist/css/calendar-picker.css +550 -0
  131. package/dist/css/calendar-range-picker.css +639 -0
  132. package/dist/css/card.css +249 -0
  133. package/dist/css/carousel.css +726 -0
  134. package/dist/css/cartesian-chart.css +830 -0
  135. package/dist/css/cascader.css +973 -0
  136. package/dist/css/checkbox-group.css +361 -0
  137. package/dist/css/checkbox.css +258 -0
  138. package/dist/css/citation.css +475 -0
  139. package/dist/css/clipboard.css +331 -0
  140. package/dist/css/code-view.css +374 -0
  141. package/dist/css/collapsible.css +200 -0
  142. package/dist/css/color-field.css +176 -0
  143. package/dist/css/color-picker.css +649 -0
  144. package/dist/css/color-slider.css +283 -0
  145. package/dist/css/color-swatch-picker.css +250 -0
  146. package/dist/css/color-swatch.css +35 -0
  147. package/dist/css/combobox.css +578 -0
  148. package/dist/css/command.css +404 -0
  149. package/dist/css/context-menu.css +425 -0
  150. package/dist/css/date-field.css +317 -0
  151. package/dist/css/date-picker.css +931 -0
  152. package/dist/css/date-range-picker.css +949 -0
  153. package/dist/css/description.css +71 -0
  154. package/dist/css/descriptions.css +327 -0
  155. package/dist/css/dialog.css +470 -0
  156. package/dist/css/diff-view.css +513 -0
  157. package/dist/css/download-trigger.css +151 -0
  158. package/dist/css/drawer.css +606 -0
  159. package/dist/css/editable.css +269 -0
  160. package/dist/css/empty-state.css +181 -0
  161. package/dist/css/field-array.css +229 -0
  162. package/dist/css/field.css +165 -0
  163. package/dist/css/fieldset.css +122 -0
  164. package/dist/css/file-upload.css +462 -0
  165. package/dist/css/flex.css +441 -0
  166. package/dist/css/float-button.css +579 -0
  167. package/dist/css/floating-panel.css +429 -0
  168. package/dist/css/focus.css +46 -0
  169. package/dist/css/forced-colors.css +93 -0
  170. package/dist/css/form.css +407 -0
  171. package/dist/css/funnel-chart.css +106 -0
  172. package/dist/css/graph-chart.css +205 -0
  173. package/dist/css/grid-list.css +235 -0
  174. package/dist/css/grid.css +1201 -0
  175. package/dist/css/heatmap.css +552 -0
  176. package/dist/css/hierarchy-chart.css +298 -0
  177. package/dist/css/highlight.css +41 -0
  178. package/dist/css/hover-card.css +233 -0
  179. package/dist/css/icon.css +225 -0
  180. package/dist/css/image-cropper.css +373 -0
  181. package/dist/css/image-viewer.css +588 -0
  182. package/dist/css/image.css +106 -0
  183. package/dist/css/infinite-scroll.css +81 -0
  184. package/dist/css/input-group.css +323 -0
  185. package/dist/css/json-viewer.css +379 -0
  186. package/dist/css/kbd.css +72 -0
  187. package/dist/css/label.css +94 -0
  188. package/dist/css/layers.css +7 -0
  189. package/dist/css/layout.css +379 -0
  190. package/dist/css/liquid.css +106 -0
  191. package/dist/css/list.css +156 -0
  192. package/dist/css/listbox.css +395 -0
  193. package/dist/css/loading-bar.css +144 -0
  194. package/dist/css/log.css +306 -0
  195. package/dist/css/markdown-stream.css +149 -0
  196. package/dist/css/marquee.css +378 -0
  197. package/dist/css/masonry.css +70 -0
  198. package/dist/css/matrix-code.css +67 -0
  199. package/dist/css/mention.css +395 -0
  200. package/dist/css/menu.css +369 -0
  201. package/dist/css/menubar.css +461 -0
  202. package/dist/css/message-feed.css +318 -0
  203. package/dist/css/navigation-menu.css +513 -0
  204. package/dist/css/notification.css +865 -0
  205. package/dist/css/number-animation.css +44 -0
  206. package/dist/css/number-field.css +275 -0
  207. package/dist/css/overlay-arrow.css +56 -0
  208. package/dist/css/page-header.css +221 -0
  209. package/dist/css/pagination.css +447 -0
  210. package/dist/css/password-input.css +335 -0
  211. package/dist/css/pie-chart.css +247 -0
  212. package/dist/css/pin-input.css +191 -0
  213. package/dist/css/pointer.css +36 -0
  214. package/dist/css/popconfirm.css +329 -0
  215. package/dist/css/popover.css +285 -0
  216. package/dist/css/progress.css +502 -0
  217. package/dist/css/prompt-input.css +260 -0
  218. package/dist/css/question-flow.css +579 -0
  219. package/dist/css/radar-chart.css +233 -0
  220. package/dist/css/radio-group.css +663 -0
  221. package/dist/css/rating.css +311 -0
  222. package/dist/css/reasoning.css +343 -0
  223. package/dist/css/reset.css +117 -0
  224. package/dist/css/resizable.css +242 -0
  225. package/dist/css/sankey-chart.css +174 -0
  226. package/dist/css/scroll-area.css +240 -0
  227. package/dist/css/scrollbar.css +204 -0
  228. package/dist/css/select.css +616 -0
  229. package/dist/css/separator.css +140 -0
  230. package/dist/css/side-nav.css +481 -0
  231. package/dist/css/signature-pad.css +193 -0
  232. package/dist/css/skeleton.css +161 -0
  233. package/dist/css/slider.css +403 -0
  234. package/dist/css/sortable.css +228 -0
  235. package/dist/css/sparkline.css +170 -0
  236. package/dist/css/spinner.css +256 -0
  237. package/dist/css/splitter.css +159 -0
  238. package/dist/css/statistic.css +137 -0
  239. package/dist/css/steps.css +658 -0
  240. package/dist/css/switch.css +353 -0
  241. package/dist/css/table.css +1162 -0
  242. package/dist/css/tabs.css +967 -0
  243. package/dist/css/tag-group.css +258 -0
  244. package/dist/css/tag.css +335 -0
  245. package/dist/css/tags-input.css +341 -0
  246. package/dist/css/text-field.css +197 -0
  247. package/dist/css/time-field.css +277 -0
  248. package/dist/css/time-picker.css +793 -0
  249. package/dist/css/time-range-picker.css +775 -0
  250. package/dist/css/timeline.css +440 -0
  251. package/dist/css/timer.css +123 -0
  252. package/dist/css/timestamp.css +34 -0
  253. package/dist/css/toggle-group.css +424 -0
  254. package/dist/css/toggle.css +146 -0
  255. package/dist/css/tone.css +189 -0
  256. package/dist/css/tool-call.css +431 -0
  257. package/dist/css/toolbar.css +366 -0
  258. package/dist/css/tooltip.css +217 -0
  259. package/dist/css/tour.css +446 -0
  260. package/dist/css/transfer.css +644 -0
  261. package/dist/css/tree-select.css +878 -0
  262. package/dist/css/tree.css +734 -0
  263. package/dist/css/truncate.css +108 -0
  264. package/dist/css/typography.css +475 -0
  265. package/dist/css/undefined.css +58 -0
  266. package/dist/css/virtualizer.css +166 -0
  267. package/dist/css/visually-hidden.css +20 -0
  268. package/dist/css/watermark.css +82 -0
  269. package/dist/family/action-control.css +493 -0
  270. package/dist/family/chart.css +537 -0
  271. package/dist/family/check-mark.css +94 -0
  272. package/dist/family/choice-card.css +97 -0
  273. package/dist/family/collection-item.css +768 -0
  274. package/dist/family/field-chrome.css +296 -0
  275. package/dist/family/loading-ring.css +102 -0
  276. package/dist/family/material.css +72 -0
  277. package/dist/family/menu-choice.css +56 -0
  278. package/dist/family/motion.css +363 -0
  279. package/dist/family/swatch.css +59 -0
  280. package/dist/family/tag-list.css +65 -0
  281. package/family/action-control.css +33 -36
  282. package/family/chart.css +57 -0
  283. package/family/collection-item.css +12 -8
  284. package/family/field-chrome.css +28 -19
  285. package/family/loading-ring.css +20 -13
  286. package/family/swatch.css +4 -4
  287. package/family/tag-list.css +6 -0
  288. package/index.css +10349 -8756
  289. package/index.unlayered.css +10350 -8758
  290. package/package.json +165 -164
@@ -0,0 +1,768 @@
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
+ /* AUTO-GENERATED by build/collection-item-recipe.mjs — do not edit. */
7
+ @layer xihan.components {
8
+ [data-xh-collection-item] {
9
+ --xh-_collection-block-padding: var(--xh-list-option-py-md);
10
+ --xh-_collection-inline-padding: var(--xh-control-px-md);
11
+ --xh-_collection-gap: var(--xh-control-gap-md);
12
+ --xh-_collection-font-size: var(--xh-control-font-md);
13
+ --xh-_collection-glyph-size: var(--xh-glyph-size-md);
14
+ --xh-_collection-bg: var(--xh-collection-bg-rest, transparent);
15
+ --xh-_collection-fg: var(--xh-collection-fg-rest, var(--xh-material-frosted-fg));
16
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-rest, var(--xh-material-frosted-fg-muted));
17
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-rest, var(--xh-fg-brand));
18
+ --xh-_collection-outline: var(--xh-collection-outline-rest, transparent);
19
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-rest, var(--xh-font-weight-regular));
20
+ --xh-_collection-cursor: var(--xh-collection-cursor-rest, pointer);
21
+ --xh-_collection-opacity: var(--xh-collection-opacity-rest, 1);
22
+
23
+ --xh-icon-size: var(--xh-collection-glyph-size, var(--xh-_collection-glyph-size));
24
+
25
+ display: grid;
26
+ grid-template-columns:
27
+ [prefix] max-content
28
+ [text] minmax(0, 1fr)
29
+ [shortcut] max-content
30
+ [suffix] max-content
31
+ [indicator] max-content;
32
+ /* 第 2 行是说明行。各皮肤为了省略号给 text 槽写了 overflow: hidden,它因此成为滚动容器、自动最小尺寸
33
+ 归 0;轨道尺寸算法里第 1 行的 base size 只有 0,处理跨两行的 prefix / indicator 等图标时会把图标高度
34
+ 平均分给两行,没有说明的条目也长出半个图标高的第 2 行,图标随之整体下沉。minmax(0, max-content)
35
+ 把第 2 行的最小尺寸钉在 0,它不再参与跨行项的最小高度分配,只在真有说明时按说明长;上限取 max-content
36
+ 而不是 auto,皮肤给条目定死 block-size 时多余空间也不会被说明行分走。 */
37
+ grid-template-rows: auto minmax(0, max-content);
38
+ align-items: center;
39
+ min-inline-size: 0;
40
+ /* 定高行:锚定浮层里的集合(下拉、菜单、级联、命令面板)由皮肤经这支桥接槽接上按档的行高,
41
+ 一行文字的行落在这一档、带说明的行照常撑高;条目在 reset 里已是 border-box,行高就是可见盒高。
42
+ overlay 语境同时覆盖页内列表、树与时间格,它们不接这支槽,仍由内距加一行文字撑开 */
43
+ min-block-size: var(--xh-collection-row-h, auto);
44
+ padding-block: var(--xh-collection-block-padding, var(--xh-_collection-block-padding));
45
+ padding-inline: var(--xh-collection-inline-padding, var(--xh-_collection-inline-padding));
46
+ border-radius: var(--xh-collection-radius, var(--xh-shape-control));
47
+ outline: var(--xh-ring-width) solid var(--xh-_collection-outline);
48
+ outline-offset: var(--xh-ring-offset);
49
+ background-color: var(--xh-_collection-bg);
50
+ color: var(--xh-_collection-fg);
51
+ font-size: var(--xh-collection-font-size, var(--xh-_collection-font-size));
52
+ font-weight: var(--xh-_collection-font-weight);
53
+ line-height: var(--xh-leading-normal);
54
+ cursor: var(--xh-_collection-cursor);
55
+ opacity: var(--xh-_collection-opacity);
56
+ /* 描边色不进过渡,与 focus.css 的公共环同一节奏(即时出现、即时消失):
57
+ 描边在这里常驻 solid、静息透明,靠颜色表达键盘高亮。宿主页面常见的
58
+ button:focus:not(:focus-visible) { outline: none } 复位(VitePress 等)是无层规则,压过本份;
59
+ 指针落焦时它把简写复位成 none,outline-color 同时落到 currentColor;焦点离开、规则失效的那一刻
60
+ solid 立即回来,颜色若还在过渡就画成一圈实心边(上一条目闪边)。颜色即时切换后这条路径没有中间帧。
61
+ 不透明度同一节奏:集合在后台刷新时保留上一帧、条目按 micro 淡下,数据到了再淡回 */
62
+ transition:
63
+ background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
64
+ color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
65
+ opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
66
+ }
67
+
68
+ [data-xh-collection-item][data-xh-collection-size='sm'] {
69
+ --xh-_collection-block-padding: var(--xh-list-option-py-sm);
70
+ --xh-_collection-inline-padding: var(--xh-control-px-sm);
71
+ --xh-_collection-gap: var(--xh-control-gap-sm);
72
+ --xh-_collection-font-size: var(--xh-control-font-sm);
73
+ --xh-_collection-glyph-size: var(--xh-glyph-size-sm);
74
+ }
75
+
76
+ [data-xh-collection-item][data-xh-collection-size='md'] {
77
+ --xh-_collection-block-padding: var(--xh-list-option-py-md);
78
+ --xh-_collection-inline-padding: var(--xh-control-px-md);
79
+ --xh-_collection-gap: var(--xh-control-gap-md);
80
+ --xh-_collection-font-size: var(--xh-control-font-md);
81
+ --xh-_collection-glyph-size: var(--xh-glyph-size-md);
82
+ }
83
+
84
+ [data-xh-collection-item][data-xh-collection-size='lg'] {
85
+ --xh-_collection-block-padding: var(--xh-list-option-py-lg);
86
+ --xh-_collection-inline-padding: var(--xh-control-px-lg);
87
+ --xh-_collection-gap: var(--xh-control-gap-lg);
88
+ --xh-_collection-font-size: var(--xh-control-font-lg);
89
+ --xh-_collection-glyph-size: var(--xh-glyph-size-lg);
90
+ }
91
+
92
+ [data-xh-collection-slot='prefix'] {
93
+ grid-column: prefix;
94
+ grid-row: 1 / span 2;
95
+ margin-inline-end: var(--xh-collection-gap, var(--xh-_collection-gap));
96
+ }
97
+
98
+ [data-xh-collection-slot='text'] {
99
+ grid-column: text;
100
+ grid-row: 1;
101
+ min-inline-size: 0;
102
+ }
103
+
104
+ [data-xh-collection-slot='description'] {
105
+ grid-column: text;
106
+ grid-row: 2;
107
+ min-inline-size: 0;
108
+ color: var(--xh-_collection-description-fg);
109
+ font-size: var(--xh-collection-description-font-size, var(--xh-control-caption-md));
110
+ }
111
+
112
+ /* 快捷键提示:与说明同档同色的次级文字,只是落位在行尾而不是第 2 行。
113
+ 不换行——它是一串按键记号,折行会被读成两个组合。跟着 description 那支前景走,因此也不跟语气。 */
114
+ [data-xh-collection-slot='shortcut'] {
115
+ grid-column: shortcut;
116
+ color: var(--xh-_collection-description-fg);
117
+ font-size: var(--xh-collection-shortcut-font-size, var(--xh-control-caption-md));
118
+ white-space: nowrap;
119
+ }
120
+
121
+ [data-xh-collection-slot='suffix'] {
122
+ grid-column: suffix;
123
+ }
124
+
125
+ /* 对号常驻在 indicator 列、未选中时透明:按选中态淡变,不按 visibility 瞬切 */
126
+ [data-xh-collection-slot='indicator'] {
127
+ grid-column: indicator;
128
+ color: var(--xh-_collection-indicator-fg);
129
+ opacity: 0;
130
+ transition: opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
131
+ }
132
+
133
+ [data-xh-collection-slot='shortcut'],
134
+ [data-xh-collection-slot='suffix'],
135
+ [data-xh-collection-slot='indicator'] {
136
+ grid-row: 1 / span 2;
137
+ margin-inline-start: var(--xh-collection-gap, var(--xh-_collection-gap));
138
+ }
139
+
140
+ /* page 上下文:对号与 overlay 同在行尾的 indicator 列(trailing);当前项的起始侧指示条按配方开关(none),none 即只由行面与字色表达。 */
141
+ [data-xh-collection-item][data-xh-collection-context='page'] {
142
+ position: relative;
143
+ }
144
+
145
+ [data-xh-collection-item][data-in-path] {
146
+ --xh-_collection-bg: var(--xh-collection-bg-open-path, var(--xh-bg-subtle));
147
+ --xh-_collection-fg: var(--xh-collection-fg-open-path, var(--xh-material-frosted-fg));
148
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-open-path, var(--xh-material-frosted-fg-muted));
149
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-open-path, var(--xh-fg-brand));
150
+ --xh-_collection-outline: var(--xh-collection-outline-open-path, transparent);
151
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-open-path, var(--xh-font-weight-regular));
152
+ --xh-_collection-cursor: var(--xh-collection-cursor-open-path, pointer);
153
+ --xh-_collection-opacity: var(--xh-collection-opacity-open-path, 1);
154
+ }
155
+
156
+ [data-xh-collection-item]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
157
+ --xh-_collection-bg: var(--xh-collection-bg-hover, var(--xh-bg-subtle));
158
+ --xh-_collection-fg: var(--xh-collection-fg-hover, var(--xh-material-frosted-fg));
159
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-hover, var(--xh-material-frosted-fg-muted));
160
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-hover, var(--xh-fg-brand));
161
+ --xh-_collection-outline: var(--xh-collection-outline-hover, transparent);
162
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-hover, var(--xh-font-weight-regular));
163
+ --xh-_collection-cursor: var(--xh-collection-cursor-hover, pointer);
164
+ --xh-_collection-opacity: var(--xh-collection-opacity-hover, 1);
165
+ }
166
+
167
+ [data-xh-collection-item]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
168
+ --xh-_collection-bg: var(--xh-collection-bg-keyboard-highlight, var(--xh-bg-subtle));
169
+ --xh-_collection-fg: var(--xh-collection-fg-keyboard-highlight, var(--xh-material-frosted-fg));
170
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-keyboard-highlight, var(--xh-material-frosted-fg-muted));
171
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-keyboard-highlight, var(--xh-fg-brand));
172
+ --xh-_collection-outline: var(--xh-collection-outline-keyboard-highlight, var(--xh-ring-focus));
173
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-keyboard-highlight, var(--xh-font-weight-regular));
174
+ --xh-_collection-cursor: var(--xh-collection-cursor-keyboard-highlight, pointer);
175
+ --xh-_collection-opacity: var(--xh-collection-opacity-keyboard-highlight, 1);
176
+ }
177
+
178
+ /* 按下段:pressed 面与按下时长、曲线一起给出;排在 hover 与高亮之后,同特指度才不会被它们盖掉。 */
179
+ [data-xh-collection-item]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
180
+ --xh-_collection-bg: var(--xh-collection-bg-pressed, var(--xh-bg-subtle-hover));
181
+ --xh-_collection-fg: var(--xh-collection-fg-pressed, var(--xh-material-frosted-fg));
182
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-pressed, var(--xh-material-frosted-fg-muted));
183
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-pressed, var(--xh-fg-brand));
184
+ --xh-_collection-outline: var(--xh-collection-outline-pressed, transparent);
185
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-pressed, var(--xh-font-weight-regular));
186
+ --xh-_collection-cursor: var(--xh-collection-cursor-pressed, pointer);
187
+ --xh-_collection-opacity: var(--xh-collection-opacity-pressed, 1);
188
+
189
+ transition-duration: var(--xh-motion-duration-press);
190
+ transition-timing-function: var(--xh-motion-ease-press);
191
+ }
192
+
193
+ /* 语气段:条目自身动作的性质,静息只换字、hover / 高亮 / 按下换语气淡底,节奏与中性行一致。
194
+ 必须排在上下文段之前:语气与 selected / current 同特指度,靠源序让选中与当前压过语气。 */
195
+ [data-xh-collection-item][data-tone]:not([data-xh-collection-context='nav']):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
196
+ --xh-_collection-bg: transparent;
197
+ --xh-_collection-fg: var(--xh-tone-fg);
198
+ }
199
+
200
+ [data-xh-collection-item][data-tone]:not([data-xh-collection-context='nav']):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
201
+ --xh-_collection-bg: var(--xh-tone-subtle);
202
+ --xh-_collection-fg: var(--xh-tone-fg);
203
+ }
204
+
205
+ [data-xh-collection-item][data-tone]:not([data-xh-collection-context='nav']):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
206
+ --xh-_collection-bg: var(--xh-tone-subtle);
207
+ --xh-_collection-fg: var(--xh-tone-fg);
208
+ }
209
+
210
+ [data-xh-collection-item][data-tone]:not([data-xh-collection-context='nav']):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
211
+ --xh-_collection-bg: var(--xh-tone-subtle-hover);
212
+ --xh-_collection-fg: var(--xh-tone-fg);
213
+
214
+ transition-duration: var(--xh-motion-duration-press);
215
+ transition-timing-function: var(--xh-motion-ease-press);
216
+ }
217
+
218
+ [data-xh-collection-item][data-xh-collection-context='overlay']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
219
+ --xh-_collection-bg: var(--xh-collection-bg-selected, transparent);
220
+ --xh-_collection-fg: var(--xh-collection-fg-selected, var(--xh-material-frosted-fg));
221
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-selected, var(--xh-material-frosted-fg-muted));
222
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-selected, var(--xh-fg-brand));
223
+ --xh-_collection-outline: var(--xh-collection-outline-selected, transparent);
224
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-selected, var(--xh-font-weight-medium));
225
+ --xh-_collection-cursor: var(--xh-collection-cursor-selected, pointer);
226
+ --xh-_collection-opacity: var(--xh-collection-opacity-selected, 1);
227
+ }
228
+
229
+ [data-xh-collection-item][data-xh-collection-context='overlay']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
230
+ --xh-_collection-bg: var(--xh-collection-bg-selected-hover, var(--xh-bg-subtle));
231
+ --xh-_collection-fg: var(--xh-collection-fg-selected-hover, var(--xh-material-frosted-fg));
232
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-selected-hover, var(--xh-material-frosted-fg-muted));
233
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-selected-hover, var(--xh-fg-brand));
234
+ --xh-_collection-outline: var(--xh-collection-outline-selected-hover, transparent);
235
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-selected-hover, var(--xh-font-weight-medium));
236
+ --xh-_collection-cursor: var(--xh-collection-cursor-selected-hover, pointer);
237
+ --xh-_collection-opacity: var(--xh-collection-opacity-selected-hover, 1);
238
+ }
239
+
240
+ [data-xh-collection-item][data-xh-collection-context='overlay']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
241
+ --xh-_collection-bg: var(--xh-collection-bg-selected-highlight, var(--xh-bg-subtle));
242
+ --xh-_collection-fg: var(--xh-collection-fg-selected-highlight, var(--xh-material-frosted-fg));
243
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-selected-highlight, var(--xh-material-frosted-fg-muted));
244
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-selected-highlight, var(--xh-fg-brand));
245
+ --xh-_collection-outline: var(--xh-collection-outline-selected-highlight, var(--xh-ring-focus));
246
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-selected-highlight, var(--xh-font-weight-medium));
247
+ --xh-_collection-cursor: var(--xh-collection-cursor-selected-highlight, pointer);
248
+ --xh-_collection-opacity: var(--xh-collection-opacity-selected-highlight, 1);
249
+ }
250
+
251
+ [data-xh-collection-item][data-xh-collection-context='overlay']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
252
+ --xh-_collection-bg: var(--xh-collection-bg-selected-pressed, var(--xh-bg-subtle-hover));
253
+ --xh-_collection-fg: var(--xh-collection-fg-selected-pressed, var(--xh-material-frosted-fg));
254
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-selected-pressed, var(--xh-material-frosted-fg-muted));
255
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-selected-pressed, var(--xh-fg-brand));
256
+ --xh-_collection-outline: var(--xh-collection-outline-selected-pressed, transparent);
257
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-selected-pressed, var(--xh-font-weight-medium));
258
+ --xh-_collection-cursor: var(--xh-collection-cursor-selected-pressed, pointer);
259
+ --xh-_collection-opacity: var(--xh-collection-opacity-selected-pressed, 1);
260
+ }
261
+
262
+ [data-xh-collection-item][data-xh-collection-context='page']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
263
+ --xh-_collection-bg: var(--xh-collection-bg-selected, var(--xh-bg-brand-subtle));
264
+ --xh-_collection-fg: var(--xh-collection-fg-selected, var(--xh-fg-on-brand-subtle));
265
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-selected, var(--xh-material-frosted-fg-muted));
266
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-selected, var(--xh-fg-on-brand-subtle));
267
+ --xh-_collection-outline: var(--xh-collection-outline-selected, transparent);
268
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-selected, var(--xh-font-weight-regular));
269
+ --xh-_collection-cursor: var(--xh-collection-cursor-selected, pointer);
270
+ --xh-_collection-opacity: var(--xh-collection-opacity-selected, 1);
271
+ }
272
+
273
+ [data-xh-collection-item][data-xh-collection-context='page']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
274
+ --xh-_collection-bg: var(--xh-collection-bg-selected-hover, var(--xh-bg-brand-subtle-hover));
275
+ --xh-_collection-fg: var(--xh-collection-fg-selected-hover, var(--xh-fg-on-brand-subtle));
276
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-selected-hover, var(--xh-material-frosted-fg-muted));
277
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-selected-hover, var(--xh-fg-on-brand-subtle));
278
+ --xh-_collection-outline: var(--xh-collection-outline-selected-hover, transparent);
279
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-selected-hover, var(--xh-font-weight-regular));
280
+ --xh-_collection-cursor: var(--xh-collection-cursor-selected-hover, pointer);
281
+ --xh-_collection-opacity: var(--xh-collection-opacity-selected-hover, 1);
282
+ }
283
+
284
+ [data-xh-collection-item][data-xh-collection-context='page']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
285
+ --xh-_collection-bg: var(--xh-collection-bg-selected-highlight, var(--xh-bg-brand-subtle-hover));
286
+ --xh-_collection-fg: var(--xh-collection-fg-selected-highlight, var(--xh-fg-on-brand-subtle));
287
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-selected-highlight, var(--xh-material-frosted-fg-muted));
288
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-selected-highlight, var(--xh-fg-on-brand-subtle));
289
+ --xh-_collection-outline: var(--xh-collection-outline-selected-highlight, var(--xh-ring-focus));
290
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-selected-highlight, var(--xh-font-weight-regular));
291
+ --xh-_collection-cursor: var(--xh-collection-cursor-selected-highlight, pointer);
292
+ --xh-_collection-opacity: var(--xh-collection-opacity-selected-highlight, 1);
293
+ }
294
+
295
+ [data-xh-collection-item][data-xh-collection-context='page']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
296
+ --xh-_collection-bg: var(--xh-collection-bg-selected-pressed, var(--xh-bg-brand-subtle-active));
297
+ --xh-_collection-fg: var(--xh-collection-fg-selected-pressed, var(--xh-fg-on-brand-subtle));
298
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-selected-pressed, var(--xh-material-frosted-fg-muted));
299
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-selected-pressed, var(--xh-fg-on-brand-subtle));
300
+ --xh-_collection-outline: var(--xh-collection-outline-selected-pressed, transparent);
301
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-selected-pressed, var(--xh-font-weight-regular));
302
+ --xh-_collection-cursor: var(--xh-collection-cursor-selected-pressed, pointer);
303
+ --xh-_collection-opacity: var(--xh-collection-opacity-selected-pressed, 1);
304
+ }
305
+
306
+ [data-xh-collection-item][data-xh-collection-context='page'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
307
+ --xh-_collection-bg: var(--xh-collection-bg-current, var(--xh-bg-brand-subtle));
308
+ --xh-_collection-fg: var(--xh-collection-fg-current, var(--xh-fg-on-brand-subtle));
309
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-current, var(--xh-material-frosted-fg-muted));
310
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-current, var(--xh-fg-on-brand-subtle));
311
+ --xh-_collection-outline: var(--xh-collection-outline-current, transparent);
312
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-current, var(--xh-font-weight-regular));
313
+ --xh-_collection-cursor: var(--xh-collection-cursor-current, pointer);
314
+ --xh-_collection-opacity: var(--xh-collection-opacity-current, 1);
315
+ }
316
+
317
+ [data-xh-collection-item][data-xh-collection-context='page'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
318
+ --xh-_collection-bg: var(--xh-collection-bg-current-hover, var(--xh-bg-brand-subtle-hover));
319
+ --xh-_collection-fg: var(--xh-collection-fg-current-hover, var(--xh-fg-on-brand-subtle));
320
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-current-hover, var(--xh-material-frosted-fg-muted));
321
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-current-hover, var(--xh-fg-on-brand-subtle));
322
+ --xh-_collection-outline: var(--xh-collection-outline-current-hover, transparent);
323
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-current-hover, var(--xh-font-weight-regular));
324
+ --xh-_collection-cursor: var(--xh-collection-cursor-current-hover, pointer);
325
+ --xh-_collection-opacity: var(--xh-collection-opacity-current-hover, 1);
326
+ }
327
+
328
+ [data-xh-collection-item][data-xh-collection-context='page'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
329
+ --xh-_collection-bg: var(--xh-collection-bg-current-highlight, var(--xh-bg-brand-subtle-hover));
330
+ --xh-_collection-fg: var(--xh-collection-fg-current-highlight, var(--xh-fg-on-brand-subtle));
331
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-current-highlight, var(--xh-material-frosted-fg-muted));
332
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-current-highlight, var(--xh-fg-on-brand-subtle));
333
+ --xh-_collection-outline: var(--xh-collection-outline-current-highlight, var(--xh-ring-focus));
334
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-current-highlight, var(--xh-font-weight-regular));
335
+ --xh-_collection-cursor: var(--xh-collection-cursor-current-highlight, pointer);
336
+ --xh-_collection-opacity: var(--xh-collection-opacity-current-highlight, 1);
337
+ }
338
+
339
+ [data-xh-collection-item][data-xh-collection-context='page'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
340
+ --xh-_collection-bg: var(--xh-collection-bg-current-pressed, var(--xh-bg-brand-subtle-active));
341
+ --xh-_collection-fg: var(--xh-collection-fg-current-pressed, var(--xh-fg-on-brand-subtle));
342
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-current-pressed, var(--xh-material-frosted-fg-muted));
343
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-current-pressed, var(--xh-fg-on-brand-subtle));
344
+ --xh-_collection-outline: var(--xh-collection-outline-current-pressed, transparent);
345
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-current-pressed, var(--xh-font-weight-regular));
346
+ --xh-_collection-cursor: var(--xh-collection-cursor-current-pressed, pointer);
347
+ --xh-_collection-opacity: var(--xh-collection-opacity-current-pressed, 1);
348
+ }
349
+
350
+ [data-xh-collection-item][data-xh-collection-context='nav'] {
351
+ --xh-_collection-bg: var(--xh-collection-bg-rest, transparent);
352
+ --xh-_collection-fg: var(--xh-collection-fg-rest, var(--xh-fg-muted));
353
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-rest, var(--xh-fg-muted));
354
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-rest, var(--xh-fg-brand));
355
+ --xh-_collection-outline: var(--xh-collection-outline-rest, transparent);
356
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-rest, var(--xh-font-weight-regular));
357
+ --xh-_collection-cursor: var(--xh-collection-cursor-rest, pointer);
358
+ --xh-_collection-opacity: var(--xh-collection-opacity-rest, 1);
359
+ }
360
+
361
+ [data-xh-collection-item][data-xh-collection-context='nav']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
362
+ --xh-_collection-bg: var(--xh-collection-bg-hover, var(--xh-bg-subtle));
363
+ --xh-_collection-fg: var(--xh-collection-fg-hover, var(--xh-fg-default));
364
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-hover, var(--xh-fg-muted));
365
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-hover, var(--xh-fg-brand));
366
+ --xh-_collection-outline: var(--xh-collection-outline-hover, transparent);
367
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-hover, var(--xh-font-weight-regular));
368
+ --xh-_collection-cursor: var(--xh-collection-cursor-hover, pointer);
369
+ --xh-_collection-opacity: var(--xh-collection-opacity-hover, 1);
370
+ }
371
+
372
+ [data-xh-collection-item][data-xh-collection-context='nav']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
373
+ --xh-_collection-bg: var(--xh-collection-bg-keyboard-highlight, var(--xh-bg-subtle));
374
+ --xh-_collection-fg: var(--xh-collection-fg-keyboard-highlight, var(--xh-fg-default));
375
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-keyboard-highlight, var(--xh-fg-muted));
376
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-keyboard-highlight, var(--xh-fg-brand));
377
+ --xh-_collection-outline: var(--xh-collection-outline-keyboard-highlight, var(--xh-ring-focus));
378
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-keyboard-highlight, var(--xh-font-weight-regular));
379
+ --xh-_collection-cursor: var(--xh-collection-cursor-keyboard-highlight, pointer);
380
+ --xh-_collection-opacity: var(--xh-collection-opacity-keyboard-highlight, 1);
381
+ }
382
+
383
+ [data-xh-collection-item][data-xh-collection-context='nav']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
384
+ --xh-_collection-bg: var(--xh-collection-bg-pressed, var(--xh-bg-subtle-hover));
385
+ --xh-_collection-fg: var(--xh-collection-fg-pressed, var(--xh-fg-default));
386
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-pressed, var(--xh-fg-muted));
387
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-pressed, var(--xh-fg-brand));
388
+ --xh-_collection-outline: var(--xh-collection-outline-pressed, transparent);
389
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-pressed, var(--xh-font-weight-regular));
390
+ --xh-_collection-cursor: var(--xh-collection-cursor-pressed, pointer);
391
+ --xh-_collection-opacity: var(--xh-collection-opacity-pressed, 1);
392
+
393
+ transition-duration: var(--xh-motion-duration-press);
394
+ transition-timing-function: var(--xh-motion-ease-press);
395
+ }
396
+
397
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-in-path] {
398
+ --xh-_collection-bg: var(--xh-collection-bg-open-path, var(--xh-bg-subtle));
399
+ --xh-_collection-fg: var(--xh-collection-fg-open-path, var(--xh-fg-default));
400
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-open-path, var(--xh-fg-muted));
401
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-open-path, var(--xh-fg-brand));
402
+ --xh-_collection-outline: var(--xh-collection-outline-open-path, transparent);
403
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-open-path, var(--xh-font-weight-regular));
404
+ --xh-_collection-cursor: var(--xh-collection-cursor-open-path, pointer);
405
+ --xh-_collection-opacity: var(--xh-collection-opacity-open-path, 1);
406
+ }
407
+
408
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
409
+ --xh-_collection-bg: var(--xh-collection-bg-current, transparent);
410
+ --xh-_collection-fg: var(--xh-collection-fg-current, var(--xh-fg-brand));
411
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-current, var(--xh-fg-muted));
412
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-current, var(--xh-fg-brand));
413
+ --xh-_collection-outline: var(--xh-collection-outline-current, transparent);
414
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-current, var(--xh-font-weight-medium));
415
+ --xh-_collection-cursor: var(--xh-collection-cursor-current, pointer);
416
+ --xh-_collection-opacity: var(--xh-collection-opacity-current, 1);
417
+ }
418
+
419
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
420
+ --xh-_collection-bg: var(--xh-collection-bg-current-hover, var(--xh-bg-subtle));
421
+ --xh-_collection-fg: var(--xh-collection-fg-current-hover, var(--xh-fg-brand));
422
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-current-hover, var(--xh-fg-muted));
423
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-current-hover, var(--xh-fg-brand));
424
+ --xh-_collection-outline: var(--xh-collection-outline-current-hover, transparent);
425
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-current-hover, var(--xh-font-weight-medium));
426
+ --xh-_collection-cursor: var(--xh-collection-cursor-current-hover, pointer);
427
+ --xh-_collection-opacity: var(--xh-collection-opacity-current-hover, 1);
428
+ }
429
+
430
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
431
+ --xh-_collection-bg: var(--xh-collection-bg-current-highlight, var(--xh-bg-subtle));
432
+ --xh-_collection-fg: var(--xh-collection-fg-current-highlight, var(--xh-fg-brand));
433
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-current-highlight, var(--xh-fg-muted));
434
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-current-highlight, var(--xh-fg-brand));
435
+ --xh-_collection-outline: var(--xh-collection-outline-current-highlight, var(--xh-ring-focus));
436
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-current-highlight, var(--xh-font-weight-medium));
437
+ --xh-_collection-cursor: var(--xh-collection-cursor-current-highlight, pointer);
438
+ --xh-_collection-opacity: var(--xh-collection-opacity-current-highlight, 1);
439
+ }
440
+
441
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
442
+ --xh-_collection-bg: var(--xh-collection-bg-current-pressed, var(--xh-bg-subtle-hover));
443
+ --xh-_collection-fg: var(--xh-collection-fg-current-pressed, var(--xh-fg-brand));
444
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-current-pressed, var(--xh-fg-muted));
445
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-current-pressed, var(--xh-fg-brand));
446
+ --xh-_collection-outline: var(--xh-collection-outline-current-pressed, transparent);
447
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-current-pressed, var(--xh-font-weight-medium));
448
+ --xh-_collection-cursor: var(--xh-collection-cursor-current-pressed, pointer);
449
+ --xh-_collection-opacity: var(--xh-collection-opacity-current-pressed, 1);
450
+ }
451
+
452
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current][data-xh-collection-terminal] {
453
+ --xh-_collection-bg: var(--xh-collection-bg-terminal, transparent);
454
+ --xh-_collection-fg: var(--xh-collection-fg-terminal, var(--xh-fg-default));
455
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-terminal, var(--xh-fg-muted));
456
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-terminal, var(--xh-fg-brand));
457
+ --xh-_collection-outline: var(--xh-collection-outline-terminal, transparent);
458
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-terminal, var(--xh-font-weight-medium));
459
+ --xh-_collection-cursor: var(--xh-collection-cursor-terminal, default);
460
+ --xh-_collection-opacity: var(--xh-collection-opacity-terminal, 1);
461
+
462
+ cursor: var(--xh-_collection-cursor);
463
+ }
464
+
465
+ [data-xh-collection-item]:is([aria-selected='true'], [data-state='checked']) [data-xh-collection-slot='indicator'] {
466
+ opacity: 1;
467
+ }
468
+
469
+ [data-xh-collection-item][data-state='checked'] {
470
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-checked, var(--xh-fg-brand));
471
+ }
472
+
473
+ [data-xh-collection-item][aria-disabled='true'] {
474
+ --xh-_collection-bg: var(--xh-collection-bg-disabled, transparent);
475
+ --xh-_collection-fg: var(--xh-collection-fg-disabled, var(--xh-fg-disabled));
476
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-disabled, var(--xh-fg-disabled));
477
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-disabled, var(--xh-fg-disabled));
478
+ --xh-_collection-outline: var(--xh-collection-outline-disabled, transparent);
479
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-disabled, var(--xh-font-weight-regular));
480
+ --xh-_collection-cursor: var(--xh-collection-cursor-disabled, not-allowed);
481
+ --xh-_collection-opacity: var(--xh-collection-opacity-disabled, 1);
482
+ }
483
+
484
+ [data-xh-collection-item][aria-busy='true'] {
485
+ --xh-_collection-bg: var(--xh-collection-bg-loading, transparent);
486
+ --xh-_collection-fg: var(--xh-collection-fg-loading, var(--xh-material-frosted-fg));
487
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-loading, var(--xh-material-frosted-fg-muted));
488
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-loading, var(--xh-fg-brand));
489
+ --xh-_collection-outline: var(--xh-collection-outline-loading, transparent);
490
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-loading, var(--xh-font-weight-regular));
491
+ --xh-_collection-cursor: var(--xh-collection-cursor-loading, progress);
492
+ --xh-_collection-opacity: var(--xh-collection-opacity-loading, 1);
493
+ }
494
+
495
+ [data-xh-collection-item][data-error] {
496
+ --xh-_collection-bg: var(--xh-collection-bg-error, color-mix(in oklab, var(--xh-fg-danger) 10%, transparent));
497
+ --xh-_collection-fg: var(--xh-collection-fg-error, var(--xh-fg-danger));
498
+ --xh-_collection-description-fg: var(--xh-collection-description-fg-error, var(--xh-fg-danger));
499
+ --xh-_collection-indicator-fg: var(--xh-collection-indicator-fg-error, var(--xh-fg-danger));
500
+ --xh-_collection-outline: var(--xh-collection-outline-error, var(--xh-fg-danger));
501
+ --xh-_collection-font-weight: var(--xh-collection-font-weight-error, var(--xh-font-weight-regular));
502
+ --xh-_collection-cursor: var(--xh-collection-cursor-error, pointer);
503
+ --xh-_collection-opacity: var(--xh-collection-opacity-error, 1);
504
+ }
505
+
506
+ [data-xh-collection-separator] {
507
+ block-size: var(--xh-stroke-thin);
508
+ margin-block: var(--xh-collection-separator-block-margin, var(--xh-space-1));
509
+ margin-inline: var(--xh-collection-separator-inline-margin, var(--xh-control-px-md));
510
+ border: 0;
511
+ background-color: var(--xh-collection-separator-color, var(--xh-material-frosted-separator));
512
+ }
513
+
514
+ [data-xh-collection-item][hidden],
515
+ [data-xh-collection-separator][hidden] {
516
+ display: none;
517
+ }
518
+
519
+ @media (forced-colors: active) {
520
+ [data-xh-collection-item] {
521
+ --xh-_collection-bg: Canvas;
522
+ --xh-_collection-fg: CanvasText;
523
+ --xh-_collection-outline: transparent;
524
+ --xh-_collection-indicator-fg: ButtonText;
525
+ }
526
+
527
+ [data-xh-collection-item][data-in-path] {
528
+ --xh-_collection-bg: Canvas;
529
+ --xh-_collection-fg: CanvasText;
530
+ --xh-_collection-outline: Highlight;
531
+ --xh-_collection-indicator-fg: Highlight;
532
+ }
533
+
534
+ [data-xh-collection-item]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
535
+ --xh-_collection-bg: Highlight;
536
+ --xh-_collection-fg: HighlightText;
537
+ --xh-_collection-outline: transparent;
538
+ --xh-_collection-indicator-fg: HighlightText;
539
+ }
540
+
541
+ [data-xh-collection-item]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
542
+ --xh-_collection-bg: Canvas;
543
+ --xh-_collection-fg: CanvasText;
544
+ --xh-_collection-outline: Highlight;
545
+ --xh-_collection-indicator-fg: Highlight;
546
+ }
547
+
548
+ [data-xh-collection-item]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
549
+ --xh-_collection-bg: Highlight;
550
+ --xh-_collection-fg: HighlightText;
551
+ --xh-_collection-outline: transparent;
552
+ --xh-_collection-indicator-fg: HighlightText;
553
+ }
554
+
555
+ /* 语气在强制颜色下退出:逐态用系统色盖回家族缺省,只留图标与文案通道。
556
+ 语气段在媒体查询外的特指度比这里的基础态各高一级,必须逐条同形盖回,不能只写一条。 */
557
+ [data-xh-collection-item][data-tone]:not([data-xh-collection-context='nav']):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
558
+ --xh-_collection-bg: Canvas;
559
+ --xh-_collection-fg: CanvasText;
560
+ --xh-_collection-outline: transparent;
561
+ --xh-_collection-indicator-fg: ButtonText;
562
+ }
563
+
564
+ [data-xh-collection-item][data-tone]:not([data-xh-collection-context='nav']):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
565
+ --xh-_collection-bg: Highlight;
566
+ --xh-_collection-fg: HighlightText;
567
+ --xh-_collection-outline: transparent;
568
+ --xh-_collection-indicator-fg: HighlightText;
569
+ }
570
+
571
+ [data-xh-collection-item][data-tone]:not([data-xh-collection-context='nav']):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
572
+ --xh-_collection-bg: Canvas;
573
+ --xh-_collection-fg: CanvasText;
574
+ --xh-_collection-outline: Highlight;
575
+ --xh-_collection-indicator-fg: Highlight;
576
+ }
577
+
578
+ [data-xh-collection-item][data-tone]:not([data-xh-collection-context='nav']):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
579
+ --xh-_collection-bg: Highlight;
580
+ --xh-_collection-fg: HighlightText;
581
+ --xh-_collection-outline: transparent;
582
+ --xh-_collection-indicator-fg: HighlightText;
583
+ }
584
+
585
+ [data-xh-collection-item][data-xh-collection-context='overlay']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
586
+ --xh-_collection-bg: Canvas;
587
+ --xh-_collection-fg: CanvasText;
588
+ --xh-_collection-outline: transparent;
589
+ --xh-_collection-indicator-fg: Highlight;
590
+ }
591
+
592
+ [data-xh-collection-item][data-xh-collection-context='overlay']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
593
+ --xh-_collection-bg: Highlight;
594
+ --xh-_collection-fg: HighlightText;
595
+ --xh-_collection-outline: transparent;
596
+ --xh-_collection-indicator-fg: HighlightText;
597
+ }
598
+
599
+ [data-xh-collection-item][data-xh-collection-context='overlay']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
600
+ --xh-_collection-bg: Canvas;
601
+ --xh-_collection-fg: CanvasText;
602
+ --xh-_collection-outline: Highlight;
603
+ --xh-_collection-indicator-fg: Highlight;
604
+ }
605
+
606
+ [data-xh-collection-item][data-xh-collection-context='overlay']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
607
+ --xh-_collection-bg: Highlight;
608
+ --xh-_collection-fg: HighlightText;
609
+ --xh-_collection-outline: transparent;
610
+ --xh-_collection-indicator-fg: HighlightText;
611
+ }
612
+
613
+ [data-xh-collection-item][data-xh-collection-context='page']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
614
+ --xh-_collection-bg: Highlight;
615
+ --xh-_collection-fg: HighlightText;
616
+ --xh-_collection-outline: transparent;
617
+ --xh-_collection-indicator-fg: HighlightText;
618
+ }
619
+
620
+ [data-xh-collection-item][data-xh-collection-context='page']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
621
+ --xh-_collection-bg: Highlight;
622
+ --xh-_collection-fg: HighlightText;
623
+ --xh-_collection-outline: transparent;
624
+ --xh-_collection-indicator-fg: HighlightText;
625
+ }
626
+
627
+ [data-xh-collection-item][data-xh-collection-context='page']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
628
+ --xh-_collection-bg: Highlight;
629
+ --xh-_collection-fg: HighlightText;
630
+ --xh-_collection-outline: HighlightText;
631
+ --xh-_collection-indicator-fg: HighlightText;
632
+ }
633
+
634
+ [data-xh-collection-item][data-xh-collection-context='page']:is([aria-selected='true'], [data-selected]):not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
635
+ --xh-_collection-bg: Highlight;
636
+ --xh-_collection-fg: HighlightText;
637
+ --xh-_collection-outline: transparent;
638
+ --xh-_collection-indicator-fg: HighlightText;
639
+ }
640
+
641
+ [data-xh-collection-item][data-xh-collection-context='page'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
642
+ --xh-_collection-bg: Highlight;
643
+ --xh-_collection-fg: HighlightText;
644
+ --xh-_collection-outline: transparent;
645
+ --xh-_collection-indicator-fg: HighlightText;
646
+ }
647
+
648
+ [data-xh-collection-item][data-xh-collection-context='page'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
649
+ --xh-_collection-bg: Highlight;
650
+ --xh-_collection-fg: HighlightText;
651
+ --xh-_collection-outline: transparent;
652
+ --xh-_collection-indicator-fg: HighlightText;
653
+ }
654
+
655
+ [data-xh-collection-item][data-xh-collection-context='page'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
656
+ --xh-_collection-bg: Highlight;
657
+ --xh-_collection-fg: HighlightText;
658
+ --xh-_collection-outline: HighlightText;
659
+ --xh-_collection-indicator-fg: HighlightText;
660
+ }
661
+
662
+ [data-xh-collection-item][data-xh-collection-context='page'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
663
+ --xh-_collection-bg: Highlight;
664
+ --xh-_collection-fg: HighlightText;
665
+ --xh-_collection-outline: transparent;
666
+ --xh-_collection-indicator-fg: HighlightText;
667
+ }
668
+
669
+ [data-xh-collection-item][data-xh-collection-context='nav'] {
670
+ --xh-_collection-bg: Canvas;
671
+ --xh-_collection-fg: CanvasText;
672
+ --xh-_collection-outline: transparent;
673
+ --xh-_collection-indicator-fg: ButtonText;
674
+ }
675
+
676
+ [data-xh-collection-item][data-xh-collection-context='nav']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
677
+ --xh-_collection-bg: Highlight;
678
+ --xh-_collection-fg: HighlightText;
679
+ --xh-_collection-outline: transparent;
680
+ --xh-_collection-indicator-fg: HighlightText;
681
+ }
682
+
683
+ [data-xh-collection-item][data-xh-collection-context='nav']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
684
+ --xh-_collection-bg: Canvas;
685
+ --xh-_collection-fg: CanvasText;
686
+ --xh-_collection-outline: Highlight;
687
+ --xh-_collection-indicator-fg: Highlight;
688
+ }
689
+
690
+ [data-xh-collection-item][data-xh-collection-context='nav']:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
691
+ --xh-_collection-bg: Highlight;
692
+ --xh-_collection-fg: HighlightText;
693
+ --xh-_collection-outline: transparent;
694
+ --xh-_collection-indicator-fg: HighlightText;
695
+ }
696
+
697
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-in-path] {
698
+ --xh-_collection-bg: Canvas;
699
+ --xh-_collection-fg: CanvasText;
700
+ --xh-_collection-outline: Highlight;
701
+ --xh-_collection-indicator-fg: Highlight;
702
+ }
703
+
704
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]) {
705
+ --xh-_collection-bg: Canvas;
706
+ --xh-_collection-fg: CanvasText;
707
+ --xh-_collection-outline: transparent;
708
+ --xh-_collection-indicator-fg: ButtonText;
709
+ }
710
+
711
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):hover {
712
+ --xh-_collection-bg: Highlight;
713
+ --xh-_collection-fg: HighlightText;
714
+ --xh-_collection-outline: transparent;
715
+ --xh-_collection-indicator-fg: HighlightText;
716
+ }
717
+
718
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:focus-visible, [data-highlighted]) {
719
+ --xh-_collection-bg: Canvas;
720
+ --xh-_collection-fg: CanvasText;
721
+ --xh-_collection-outline: Highlight;
722
+ --xh-_collection-indicator-fg: Highlight;
723
+ }
724
+
725
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current]:not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error]):is(:active, [data-pressed]) {
726
+ --xh-_collection-bg: Highlight;
727
+ --xh-_collection-fg: HighlightText;
728
+ --xh-_collection-outline: transparent;
729
+ --xh-_collection-indicator-fg: HighlightText;
730
+ }
731
+
732
+ [data-xh-collection-item][data-xh-collection-context='nav'][data-current][data-xh-collection-terminal] {
733
+ --xh-_collection-bg: Canvas;
734
+ --xh-_collection-fg: CanvasText;
735
+ --xh-_collection-outline: transparent;
736
+ --xh-_collection-indicator-fg: ButtonText;
737
+ }
738
+
739
+ [data-xh-collection-item][data-state='checked'] {
740
+ --xh-_collection-indicator-fg: Highlight;
741
+ }
742
+
743
+ [data-xh-collection-item][aria-disabled='true'] {
744
+ --xh-_collection-bg: Canvas;
745
+ --xh-_collection-fg: GrayText;
746
+ --xh-_collection-outline: transparent;
747
+ --xh-_collection-indicator-fg: GrayText;
748
+ }
749
+
750
+ [data-xh-collection-item][aria-busy='true'] {
751
+ --xh-_collection-bg: Canvas;
752
+ --xh-_collection-fg: CanvasText;
753
+ --xh-_collection-outline: Highlight;
754
+ --xh-_collection-indicator-fg: Highlight;
755
+ }
756
+
757
+ [data-xh-collection-item][data-error] {
758
+ --xh-_collection-bg: Canvas;
759
+ --xh-_collection-fg: CanvasText;
760
+ --xh-_collection-outline: Highlight;
761
+ --xh-_collection-indicator-fg: Highlight;
762
+ }
763
+
764
+ [data-xh-collection-separator] {
765
+ background-color: CanvasText;
766
+ }
767
+ }
768
+ }