@xihan-ui/styles 2.1.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 (152) hide show
  1. package/CHANGELOG.md +1227 -0
  2. package/README.md +6 -1
  3. package/component-tokens.d.ts +505 -96
  4. package/components.tokens.json +34636 -25846
  5. package/css/accordion.css +34 -8
  6. package/css/alert.css +59 -1
  7. package/css/anchor.css +46 -8
  8. package/css/approval.css +116 -76
  9. package/css/avatar-group.css +1 -1
  10. package/css/avatar.css +13 -5
  11. package/css/back-top.css +61 -42
  12. package/css/badge.css +62 -12
  13. package/css/bar-code.css +1 -1
  14. package/css/breadcrumb.css +62 -3
  15. package/css/button-group.css +4 -4
  16. package/css/button.css +67 -19
  17. package/css/calendar-picker.css +19 -0
  18. package/css/calendar-range-picker.css +39 -2
  19. package/css/card.css +115 -1
  20. package/css/carousel.css +148 -43
  21. package/css/cartesian-chart.css +830 -0
  22. package/css/cascader.css +181 -65
  23. package/css/checkbox-group.css +59 -89
  24. package/css/checkbox.css +16 -49
  25. package/css/citation.css +470 -0
  26. package/css/clipboard.css +20 -63
  27. package/css/code-view.css +101 -6
  28. package/css/collapsible.css +34 -8
  29. package/css/color-field.css +18 -0
  30. package/css/color-picker.css +55 -58
  31. package/css/color-slider.css +22 -15
  32. package/css/color-swatch-picker.css +3 -1
  33. package/css/combobox.css +80 -33
  34. package/css/command.css +45 -43
  35. package/css/context-menu.css +39 -22
  36. package/css/date-field.css +23 -0
  37. package/css/date-picker.css +57 -22
  38. package/css/date-range-picker.css +301 -12
  39. package/css/description.css +17 -1
  40. package/css/descriptions.css +42 -0
  41. package/css/dialog.css +94 -36
  42. package/css/diff-view.css +97 -12
  43. package/css/download-trigger.css +44 -78
  44. package/css/drawer.css +160 -119
  45. package/css/editable.css +19 -0
  46. package/css/empty-state.css +7 -6
  47. package/css/field-array.css +36 -0
  48. package/css/field.css +16 -18
  49. package/css/file-upload.css +125 -135
  50. package/css/flex.css +324 -8
  51. package/css/float-button.css +165 -38
  52. package/css/floating-panel.css +53 -19
  53. package/css/form.css +23 -17
  54. package/css/funnel-chart.css +106 -0
  55. package/css/graph-chart.css +205 -0
  56. package/css/grid-list.css +235 -0
  57. package/css/grid.css +252 -1
  58. package/css/heatmap.css +119 -36
  59. package/css/hierarchy-chart.css +298 -0
  60. package/css/hover-card.css +31 -14
  61. package/css/icon.css +100 -0
  62. package/css/image-cropper.css +33 -7
  63. package/css/image-viewer.css +167 -22
  64. package/css/image.css +23 -4
  65. package/css/input-group.css +11 -13
  66. package/css/json-viewer.css +50 -2
  67. package/css/layout.css +68 -18
  68. package/css/liquid.css +106 -0
  69. package/css/list.css +1 -1
  70. package/css/listbox.css +46 -6
  71. package/css/loading-bar.css +27 -13
  72. package/css/log.css +129 -33
  73. package/css/markdown-stream.css +1 -1
  74. package/css/marquee.css +163 -7
  75. package/css/matrix-code.css +1 -1
  76. package/css/mention.css +35 -19
  77. package/css/menu.css +35 -21
  78. package/css/menubar.css +36 -20
  79. package/css/message-feed.css +172 -51
  80. package/css/navigation-menu.css +172 -11
  81. package/css/notification.css +429 -108
  82. package/css/number-field.css +22 -0
  83. package/css/page-header.css +3 -1
  84. package/css/pagination.css +126 -24
  85. package/css/password-input.css +40 -8
  86. package/css/pie-chart.css +247 -0
  87. package/css/popconfirm.css +44 -50
  88. package/css/popover.css +50 -14
  89. package/css/progress.css +308 -10
  90. package/css/prompt-input.css +36 -0
  91. package/css/question-flow.css +97 -57
  92. package/css/radar-chart.css +233 -0
  93. package/css/radio-group.css +363 -5
  94. package/css/rating.css +21 -23
  95. package/css/reasoning.css +61 -54
  96. package/css/resizable.css +6 -1
  97. package/css/sankey-chart.css +174 -0
  98. package/css/scroll-area.css +32 -0
  99. package/css/scrollbar.css +1 -1
  100. package/css/select.css +74 -55
  101. package/css/side-nav.css +173 -24
  102. package/css/signature-pad.css +16 -1
  103. package/css/skeleton.css +13 -14
  104. package/css/slider.css +35 -13
  105. package/css/sortable.css +37 -7
  106. package/css/sparkline.css +164 -0
  107. package/css/spinner.css +50 -22
  108. package/css/splitter.css +7 -1
  109. package/css/statistic.css +10 -0
  110. package/css/steps.css +248 -29
  111. package/css/switch.css +23 -48
  112. package/css/table.css +158 -118
  113. package/css/tabs.css +231 -19
  114. package/css/tag-group.css +27 -3
  115. package/css/tag.css +53 -12
  116. package/css/tags-input.css +40 -3
  117. package/css/text-field.css +19 -0
  118. package/css/time-field.css +20 -1
  119. package/css/time-picker.css +44 -15
  120. package/css/time-range-picker.css +45 -16
  121. package/css/timeline.css +1 -1
  122. package/css/toggle-group.css +4 -4
  123. package/css/toggle.css +4 -3
  124. package/css/tool-call.css +59 -51
  125. package/css/toolbar.css +101 -3
  126. package/css/tooltip.css +15 -2
  127. package/css/tour.css +42 -12
  128. package/css/transfer.css +98 -75
  129. package/css/tree-select.css +232 -53
  130. package/css/tree.css +201 -55
  131. package/css/truncate.css +55 -12
  132. package/css/typography.css +93 -0
  133. package/css/virtualizer.css +56 -0
  134. package/css/watermark.css +23 -0
  135. package/family/action-control.css +14 -5
  136. package/family/chart.css +480 -0
  137. package/family/check-mark.css +94 -0
  138. package/family/choice-card.css +97 -0
  139. package/family/collection-item.css +9 -15
  140. package/family/field-chrome.css +1 -12
  141. package/family/loading-ring.css +95 -0
  142. package/family/material.css +72 -0
  143. package/family/menu-choice.css +56 -0
  144. package/family/motion.css +207 -10
  145. package/family/tag-list.css +59 -0
  146. package/index.css +22997 -13678
  147. package/index.unlayered.css +12928 -3605
  148. package/package.json +20 -8
  149. package/css/gradient-text.css +0 -91
  150. package/css/icon-wrapper.css +0 -81
  151. package/css/segmented.css +0 -280
  152. package/css/toast.css +0 -499
@@ -132,13 +132,14 @@
132
132
  box-sizing: border-box;
133
133
  inline-size: var(--xh-_thumb-size);
134
134
  block-size: var(--xh-_thumb-size);
135
- border: var(--xh-stroke-thick) solid var(--xh-color-slider-thumb-border, var(--xh-border-default));
135
+ /* 描边取装饰边的不透明档:墨色描边半透明,压在当前色上框不住圆点 */
136
+ border: var(--xh-stroke-thick) solid var(--xh-color-slider-thumb-border, var(--xh-border-default-opaque));
136
137
  border-radius: var(--xh-color-slider-thumb-radius, var(--xh-shape-circle));
137
138
  background: var(--xh-color-slider-thumb-bg, var(--xh-_color-slider-thumb-color));
138
139
  box-shadow: var(--xh-color-slider-thumb-shadow, var(--xh-elevation-raised));
139
140
  cursor: grab;
140
141
  transition:
141
- scale var(--xh-motion-duration-micro) var(--xh-motion-ease-enter-strong),
142
+ scale var(--xh-motion-duration-nudge) var(--xh-motion-ease-enter-strong),
142
143
  box-shadow var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
143
144
  }
144
145
 
@@ -159,7 +160,10 @@
159
160
 
160
161
  /* 放大用 scale 而不是改尺寸:变换绕自身中心发生,圆心不动。海拔从 raised 换到 lifted */
161
162
  [data-scope='color-slider'][data-part='thumb'][data-dragging] {
162
- scale: var(--xh-color-slider-thumb-scale-dragging, var(--xh-motion-scale-drag));
163
+ /* 放大比例落进私有槽:挂在拇指里的值气泡读同一支反向缩回原尺寸 */
164
+ --xh-_color-slider-thumb-scale: var(--xh-color-slider-thumb-scale-dragging, var(--xh-motion-scale-drag));
165
+
166
+ scale: var(--xh-_color-slider-thumb-scale);
163
167
  cursor: grabbing;
164
168
  box-shadow: var(--xh-color-slider-thumb-shadow-dragging, var(--xh-elevation-lifted));
165
169
  }
@@ -179,14 +183,19 @@
179
183
  cursor: not-allowed;
180
184
  }
181
185
 
182
- /* 值气泡:挂在拇指里,跟着拇指一起走位。默认只在推动那一刻露面 */
186
+ /* 值气泡:挂在拇指里,跟着拇指一起走位。默认只在推动那一刻露面。
187
+ 气泡宽度由文字撑出,只能靠平移回中:两侧 inset 都钉在 50% 再靠自动外边距回中时可用宽度是 0,
188
+ 气泡比它宽,自动外边距按规范取 0,气泡从拇指中线起排、偏出半个自身宽。平移乘书写方向的符号,
189
+ rtl 下行内分量掉头。拖动时拇指放大,气泡按同一比例反向缩回、与拇指同一段过渡:文字不跟着放大,
190
+ 缩放原点在贴着拇指那一边 */
183
191
  [data-scope='color-slider'][data-part='value-text'] {
184
192
  position: absolute;
185
193
  inset-block-end: 100%;
186
- inset-inline: 50%;
194
+ inset-inline-start: 50%;
187
195
  inline-size: max-content;
188
196
  margin-block-end: var(--xh-color-slider-value-text-offset, var(--xh-space-2));
189
- margin-inline: auto;
197
+ translate: calc(-50% * var(--xh-direction-sign)) 0;
198
+ transform-origin: 50% 100%;
190
199
  padding-block: var(--xh-color-slider-value-text-py, var(--xh-space-0_5));
191
200
  padding-inline: var(--xh-color-slider-value-text-px, var(--xh-space-2));
192
201
  border-radius: var(--xh-color-slider-value-text-radius, var(--xh-shape-control));
@@ -199,7 +208,9 @@
199
208
  /* 气泡贴在拇指上方,指针要落到拇指上,不能被它挡住 */
200
209
  pointer-events: none;
201
210
  opacity: 0;
202
- transition: opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
211
+ transition:
212
+ opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
213
+ scale var(--xh-motion-duration-nudge) var(--xh-motion-ease-enter-strong);
203
214
  }
204
215
 
205
216
  [data-scope='color-slider'][data-part='value-text'][hidden] {
@@ -208,15 +219,18 @@
208
219
 
209
220
  [data-scope='color-slider'][data-part='value-text'][data-dragging] {
210
221
  opacity: 1;
222
+ scale: calc(1 / var(--xh-_color-slider-thumb-scale, 1));
211
223
  }
212
224
 
213
- /* 竖排轨道的气泡挪到行侧:压在拇指上方会挡住上一档的值 */
225
+ /* 竖排轨道的气泡挪到行侧:压在拇指上方会挡住上一档的值;反向缩放的原点换到贴着拇指的行首那一侧 */
214
226
  [data-scope='color-slider'][data-part='value-text'][data-orientation='vertical'] {
215
227
  inset-block: 50%;
216
228
  inset-inline: 100% auto;
217
229
  block-size: max-content;
218
230
  margin-block: auto;
219
231
  margin-inline: var(--xh-color-slider-value-text-offset, var(--xh-space-2)) 0;
232
+ translate: none;
233
+ transform-origin: calc(50% - 50% * var(--xh-direction-sign)) 50%;
220
234
  }
221
235
 
222
236
  /* —— 尺寸 —— */
@@ -239,13 +253,6 @@
239
253
 
240
254
  /* hidden-input 是 type=hidden 的原生输入,浏览器本就不渲染它,这里一条声明都不给。 */
241
255
 
242
- @media (prefers-reduced-motion: reduce) {
243
- [data-scope='color-slider'][data-part='thumb'],
244
- [data-scope='color-slider'][data-part='value-text'] {
245
- transition: none;
246
- }
247
- }
248
-
249
256
  /*
250
257
  * 高对比档:轨道画的就是颜色本身,被系统换掉之后整条滑杆不再能调色。
251
258
  * 轨道与拇指退出强制着色保住原色,各补一圈系统描边把它们从背景里框出来。
@@ -169,7 +169,7 @@
169
169
  scale: 0;
170
170
  transition:
171
171
  opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
172
- scale var(--xh-motion-duration-micro) var(--xh-motion-ease-settle);
172
+ scale var(--xh-motion-duration-nudge) var(--xh-motion-ease-settle);
173
173
  }
174
174
 
175
175
  /* 没写内容就由皮肤画勾;作者往部件里塞了自己的图形,这条规则即不命中 */
@@ -236,7 +236,9 @@
236
236
  background: Highlight;
237
237
  }
238
238
 
239
+ /* 勾是 mask 挖出来的一块底色:退出强制换色、直接写系统色,否则底色被换成 Canvas、勾跟着消失 */
239
240
  [data-scope='color-swatch-picker'][data-part='indicator']:empty::after {
241
+ forced-color-adjust: none;
240
242
  background-color: HighlightText;
241
243
  }
242
244
  }
package/css/combobox.css CHANGED
@@ -7,9 +7,12 @@
7
7
  @import '../family/field-chrome.css';
8
8
  @import '../family/action-control.css';
9
9
  @import '../family/collection-item.css';
10
+ @import '../family/loading-ring.css';
10
11
 
11
12
  /* 共享关键帧由 family/motion.css 提供,本皮肤 @import 它,单独引入仍成立。 */
12
13
  @import '../family/motion.css';
14
+ @import '../family/material.css';
15
+ @import '../family/tag-list.css';
13
16
 
14
17
  @layer xihan.components {
15
18
  /* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
@@ -25,8 +28,8 @@
25
28
  /* 落定那一侧的可用宽度,同样由定位引擎经内联自定义属性写进来,行内轴据此夹取;
26
29
  引擎没算(尚未落位 / 无引擎 / 贴边归零)时退到视口宽 */
27
30
  --xh-_combobox-available-w: 100vw;
28
- /* 输入框实测宽度,由定位引擎经内联自定义属性写进来,内容层拿它当最小宽的下界;
29
- 引擎没算(尚未落位 / 无引擎)时为 0,max 取静态档,等于不抬宽 */
31
+ /* 字段盒实测宽度,由定位引擎经内联自定义属性写进来,内容层与它等宽;
32
+ 引擎没算(尚未落位 / 无引擎)时为 0,面板取下界 */
30
33
  --xh-_combobox-anchor-w: 0px;
31
34
  /* 每层使用自身落位方向,不继承外层弹窗留下的方向。 */
32
35
  --xh-_overlay-enter-up: 0;
@@ -183,6 +186,15 @@
183
186
  --xh-field-placeholder-fg: var(--xh-combobox-placeholder-fg, var(--xh-fg-subtle));
184
187
  --xh-field-autofill-bg: var(--xh-combobox-input-autofill-bg, var(--xh-bg-canvas));
185
188
  --xh-field-autofill-fg: var(--xh-combobox-input-autofill-fg, var(--xh-fg-default));
189
+
190
+ /* 多选的标签排在它前面:标签再多也给打字留出这一截,挤不下时标签先截断、再折进 +N */
191
+ min-inline-size: var(--xh-combobox-input-min-w, var(--xh-control-input-min-w));
192
+ }
193
+
194
+ /* 标签行:盒里、输入框之前收着已选值标签与 +N 那一枚的一行,行里每一枚都是 tag(data-scope="tag"),
195
+ 样子归 tag.css;行怎么排、标签怎么进出归标签行家族配方(family/tag-list.css),这里只把使用者的间距槽接进去 */
196
+ [data-scope='combobox'][data-part='tag-list'] {
197
+ --xh-tag-list-gap: var(--xh-combobox-tag-list-gap, var(--xh-space-1));
186
198
  }
187
199
 
188
200
  [data-scope='combobox'][data-part='input'][hidden] {
@@ -232,7 +244,7 @@
232
244
  按钮自带悬停底色,整个按钮转会带着底色一起转;家族按压缩放的是整钮,不影响这里的转向 */
233
245
  [data-scope='combobox'][data-part='trigger']:empty::before,
234
246
  [data-scope='combobox'][data-part='trigger'] > * {
235
- transition: rotate var(--xh-motion-duration-micro) var(--xh-motion-ease-enter-strong);
247
+ transition: rotate var(--xh-motion-duration-nudge) var(--xh-motion-ease-enter-strong);
236
248
  }
237
249
 
238
250
  /* 没写内容就由皮肤画箭头;作者往部件里塞了自己的图形,这条规则即不命中 */
@@ -266,49 +278,39 @@
266
278
  }
267
279
 
268
280
  [data-scope='combobox'][data-part='content'] {
281
+ /* 材质由家族配方画(family/material.css 的 frosted 面:描边、底、1px 顶光、前景、投影与背景滤镜),
282
+ 这里只把使用者槽接进来 */
283
+ --xh-frosted-bg: var(--xh-combobox-content-bg, var(--xh-_material-bg));
284
+ --xh-frosted-border: var(--xh-combobox-content-border, var(--xh-_material-border));
285
+ --xh-frosted-fg: var(--xh-combobox-content-fg, var(--xh-_material-fg));
286
+ --xh-frosted-shadow: var(--xh-combobox-content-shadow, var(--xh-_material-shadow));
287
+ --xh-frosted-backdrop: var(--xh-combobox-content-backdrop, var(--xh-_material-backdrop));
288
+ --xh-frosted-highlight: var(--xh-combobox-content-highlight, var(--xh-_material-highlight));
289
+
269
290
  position: relative;
270
291
  display: flex;
271
292
  flex-direction: column;
272
293
  gap: var(--xh-combobox-content-gap, var(--xh-list-option-gap));
273
294
  grid-area: 1 / 1;
274
- /* 下界跟着输入框走,面板不窄于它;可用宽度的夹取写在这一侧:
275
- min-inline-size 恒压过 max-inline-size,锚点比可用区还宽时只夹 max 等于没夹 */
276
- min-inline-size: min(
277
- max(var(--xh-combobox-content-min-w, var(--xh-overlay-min-w)), var(--xh-_combobox-anchor-w)),
295
+ /* 列表型浮层与字段盒等宽:长选项在条目里截断,面板不随最长的一条变宽。锚点比下界还窄时取下界,
296
+ 比可用区还宽时收成可用宽度;要封顶由作者另写上界槽 */
297
+ inline-size: min(
298
+ max(var(--xh-combobox-content-min-w, var(--xh-overlay-menu-min-w)), var(--xh-_combobox-anchor-w)),
278
299
  var(--xh-_combobox-available-w)
279
300
  );
280
- /* 静态档与落位后的可用宽度取小:窄视口下面板伸出去,最右侧的内容就点不到了 */
281
- max-inline-size: min(var(--xh-combobox-content-max-w, var(--xh-overlay-max-w)), var(--xh-_combobox-available-w));
301
+ max-inline-size: var(--xh-combobox-content-max-w, none);
282
302
  /* 空列表也保留完整状态面的高度;empty/loading 先隐藏时,Presence 退场不会塌成细边条。 */
283
303
  min-block-size: var(--xh-combobox-content-min-h, var(--xh-_combobox-h));
284
- max-block-size: min(var(--xh-combobox-content-max-h, var(--xh-overlay-max-h)), var(--xh-_combobox-available-h));
304
+ max-block-size: min(var(--xh-combobox-content-max-h, var(--xh-overlay-menu-max-h)), var(--xh-_combobox-available-h));
285
305
  padding-block: var(--xh-combobox-content-py, var(--xh-space-1));
286
306
  padding-inline: var(--xh-combobox-content-px, var(--xh-space-1));
287
- border: var(--xh-stroke-thin) solid var(--xh-combobox-content-border, var(--xh-material-frosted-border));
288
307
  border-radius: var(--xh-combobox-content-radius, var(--xh-shape-overlay));
289
- background: var(--xh-combobox-content-bg, var(--xh-material-frosted-bg));
290
- color: var(--xh-combobox-content-fg, var(--xh-material-frosted-fg));
291
- box-shadow: var(--xh-combobox-content-shadow, var(--xh-material-frosted-shadow));
292
- -webkit-backdrop-filter: var(--xh-combobox-content-backdrop, var(--xh-material-frosted-backdrop));
293
- backdrop-filter: var(--xh-combobox-content-backdrop, var(--xh-material-frosted-backdrop));
294
308
  overflow-y: auto;
295
309
  /* 浮层滚动面:滚到头不把页面一起带走 */
296
310
  overscroll-behavior: contain;
297
311
  pointer-events: auto;
298
312
  }
299
313
 
300
- /* 顶光只沿表面上边缘绘制,不参与列表布局、不拦截候选交互。 */
301
- [data-scope='combobox'][data-part='content']::before {
302
- content: '';
303
- position: absolute;
304
- inset-block-start: 0;
305
- inset-inline: 0;
306
- block-size: var(--xh-stroke-thin);
307
- border-radius: inherit;
308
- background: var(--xh-combobox-content-highlight, var(--xh-material-frosted-highlight));
309
- pointer-events: none;
310
- }
311
-
312
314
  /* 这里刻意没有 [data-part='content'][hidden] { display: none },与 dialog 一致:
313
315
  收起态连接层会给 content 打 hidden,而上面那条 display 正是要盖掉 UA 的
314
316
  [hidden]{display:none}——退场动画得先能播。presence 读的是 content 的 animationName,
@@ -321,7 +323,8 @@
321
323
  outline: none;
322
324
  }
323
325
 
324
- [data-scope='combobox'][data-part='content'][data-state='open'] {
326
+ /* 挂载时就开着的那一段(data-instant)属于首帧,直接呈现 */
327
+ [data-scope='combobox'][data-part='content'][data-state='open']:not([data-instant]) {
325
328
  animation: xh-overlay-slide-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
326
329
  }
327
330
 
@@ -350,12 +353,19 @@
350
353
  [data-scope='combobox'][data-part='group-label'] {
351
354
  display: block;
352
355
  padding-block: var(--xh-combobox-group-label-py, var(--xh-space-1));
353
- padding-inline: var(--xh-combobox-group-label-px, var(--xh-control-px-md));
356
+ padding-inline: var(--xh-combobox-group-label-px, var(--xh-_combobox-item-px));
354
357
  color: var(--xh-combobox-group-label-fg, var(--xh-material-frosted-fg-muted));
355
358
  font-size: var(--xh-combobox-group-label-font-size, var(--xh-text-caption-size));
356
359
  font-weight: var(--xh-combobox-group-label-font-weight, var(--xh-font-weight-medium));
357
360
  line-height: var(--xh-leading-none);
358
361
  user-select: none;
362
+ transition: opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
363
+ }
364
+
365
+ /* 刷新:已有候选时后台在取,保留上一帧,条目与分组标题按 micro 淡下,数据到了再淡回;在途占位此时让位。
366
+ 淡的是内容不是面:content 是整块磨砂面,整块淡下去面就透了 */
367
+ [data-scope='combobox'][data-part='content'][aria-busy='true'] [data-scope='combobox']:is([data-part='item'], [data-part='group-label']) {
368
+ opacity: var(--xh-state-disabled-opacity);
359
369
  }
360
370
 
361
371
  [data-scope='combobox'][data-part='group-label'][hidden] {
@@ -369,7 +379,7 @@
369
379
  --xh-collection-inline-padding: var(--xh-combobox-item-px, var(--xh-_combobox-item-px));
370
380
  --xh-collection-gap: var(--xh-combobox-item-gap, var(--xh-_combobox-gap));
371
381
  --xh-collection-font-size: var(--xh-combobox-item-font-size, var(--xh-_combobox-font-size));
372
- --xh-collection-radius: var(--xh-combobox-item-radius, var(--xh-shape-control));
382
+ --xh-collection-radius: var(--xh-combobox-item-radius, var(--xh-shape-inset));
373
383
  --xh-collection-fg-rest: var(--xh-combobox-item-fg, var(--xh-material-frosted-fg));
374
384
  --xh-collection-fg-hover: var(--xh-combobox-item-fg, var(--xh-material-frosted-fg));
375
385
  --xh-collection-fg-keyboard-highlight: var(--xh-combobox-item-fg, var(--xh-material-frosted-fg));
@@ -462,7 +472,7 @@
462
472
  justify-content: center;
463
473
  grid-area: 1 / 1;
464
474
  padding-block: var(--xh-combobox-empty-py, var(--xh-space-3));
465
- padding-inline: var(--xh-combobox-empty-px, var(--xh-control-px-md));
475
+ padding-inline: var(--xh-combobox-empty-px, var(--xh-_combobox-item-px));
466
476
  color: var(--xh-combobox-empty-fg, var(--xh-material-frosted-fg-muted));
467
477
  font-size: var(--xh-combobox-empty-font-size, var(--xh-_combobox-font-size));
468
478
  line-height: var(--xh-leading-none);
@@ -481,9 +491,10 @@
481
491
  display: flex;
482
492
  align-items: center;
483
493
  justify-content: center;
494
+ gap: var(--xh-_combobox-gap);
484
495
  grid-area: 1 / 1;
485
496
  padding-block: var(--xh-combobox-loading-py, var(--xh-space-3));
486
- padding-inline: var(--xh-combobox-loading-px, var(--xh-control-px-md));
497
+ padding-inline: var(--xh-combobox-loading-px, var(--xh-_combobox-item-px));
487
498
  color: var(--xh-combobox-loading-fg, var(--xh-material-frosted-fg-muted));
488
499
  font-size: var(--xh-combobox-loading-font-size, var(--xh-_combobox-font-size));
489
500
  line-height: var(--xh-leading-none);
@@ -495,6 +506,15 @@
495
506
  display: none;
496
507
  }
497
508
 
509
+ /* 首次加载:文案前一枚加载环,由加载环配方画(连接层投影 data-xh-loading-ring 与 data-loading),
510
+ 直径取所在尺寸档的图标档 */
511
+ [data-scope='combobox'][data-part='loading']::before {
512
+ content: '';
513
+ flex: none;
514
+ inline-size: var(--xh-icon-size, var(--xh-glyph-size-md));
515
+ block-size: var(--xh-icon-size, var(--xh-glyph-size-md));
516
+ }
517
+
498
518
  /* 自动结构没收到状态文案时,空 status 不生成盒;打开着的空 listbox 也不画无意义表面。
499
519
  closed 不命中:有文案的空态刚关闭时,content 仍要作为 Presence 宿主完成退场。 */
500
520
  [data-scope='combobox'][data-part='empty']:empty,
@@ -516,4 +536,31 @@
516
536
  display: none;
517
537
  }
518
538
  }
539
+
540
+ @media (forced-colors: active) {
541
+ /* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
542
+ 字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
543
+ 按钮面上取 ButtonText,悬停与按下时家族把按钮涂成 Highlight、字形换 HighlightText;
544
+ 条目面上取 CanvasText;按下与没被高亮时的悬停,家族把条目涂成 Highlight,字形换 HighlightText;
545
+ 禁用取 GrayText */
546
+ [data-scope='combobox']:is([data-part='trigger'], [data-part='clear-trigger']):empty::before {
547
+ forced-color-adjust: none;
548
+ background-color: ButtonText;
549
+ }
550
+
551
+ [data-scope='combobox'][data-part='item-indicator']:empty::before {
552
+ forced-color-adjust: none;
553
+ background-color: CanvasText;
554
+ }
555
+
556
+ [data-scope='combobox']:is([data-part='trigger'], [data-part='clear-trigger']):not([data-disabled]):not([data-loading]):is(:hover, :active, [data-pressed]):empty::before,
557
+ [data-scope='combobox'][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='combobox'][data-part='item-indicator']:empty::before {
558
+ background-color: HighlightText;
559
+ }
560
+
561
+ [data-scope='combobox']:is([data-part='trigger'], [data-part='clear-trigger'])[data-disabled]:empty::before,
562
+ [data-scope='combobox'][data-part='item']:is([aria-disabled='true'], [data-disabled]) [data-scope='combobox'][data-part='item-indicator']:empty::before {
563
+ background-color: GrayText;
564
+ }
565
+ }
519
566
  }
package/css/command.css CHANGED
@@ -7,6 +7,8 @@
7
7
 
8
8
  /* 共享关键帧由 family/motion.css 提供,命令走 Collection Item 家族;本皮肤 @import 它们,单独引入仍成立。 */
9
9
  @import '../family/collection-item.css';
10
+ @import '../family/field-chrome.css';
11
+ @import '../family/loading-ring.css';
10
12
  @import '../family/motion.css';
11
13
 
12
14
  @layer xihan.components {
@@ -31,9 +33,10 @@
31
33
  --xh-_command-font-size: var(--xh-control-font-md);
32
34
  }
33
35
 
34
- /* 面板从上方落下来一小段:方向槽写在定位层上,面板继承过去喂给进场那支动画 */
36
+ /* 面板从上方落下来一小段:起点在终点之上(up 一侧写 1),与锚在顶缘的缩放同向。
37
+ 方向槽写在定位层上,面板继承过去喂给进场那支动画 */
35
38
  [data-scope='command'][data-part='positioner'] {
36
- --xh-_overlay-enter-down: 1;
39
+ --xh-_overlay-enter-up: 1;
37
40
  }
38
41
 
39
42
  /* —— 尺寸 —— */
@@ -76,7 +79,7 @@
76
79
  background: transparent;
77
80
  }
78
81
 
79
- [data-scope='command'][data-part='backdrop'][data-state='open'] {
82
+ [data-scope='command'][data-part='backdrop'][data-state='open']:not([data-instant]) {
80
83
  animation: xh-fade-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter);
81
84
  }
82
85
 
@@ -146,7 +149,8 @@
146
149
  outline: none;
147
150
  }
148
151
 
149
- [data-scope='command'][data-part='content'][data-state='open'] {
152
+ /* 挂载时就开着的那一段(data-instant)属于首帧,直接呈现 */
153
+ [data-scope='command'][data-part='content'][data-state='open']:not([data-instant]) {
150
154
  animation: xh-overlay-pop-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
151
155
  }
152
156
 
@@ -157,24 +161,28 @@
157
161
  }
158
162
 
159
163
  /* —— 检索框 —— */
160
- /* 通栏一行,底下一道线把它与结果分开;框自己不画边不画底,边界归面板 */
164
+ /* 面板内嵌的搜索框:通栏一行,控件高与字号随尺寸档,底下一道面内分隔(sheet 面的分隔令牌)把它与结果分开;
165
+ 框自己不画边不画底,边界归面板。重置与占位前景由字段家族按 data-xh-field-input 给 */
161
166
  [data-scope='command'][data-part='input'] {
167
+ --xh-field-placeholder-fg: var(--xh-command-placeholder-fg, var(--xh-fg-subtle));
168
+
162
169
  flex: none;
163
170
  inline-size: 100%;
164
171
  block-size: var(--xh-command-input-h, var(--xh-_command-input-h));
165
172
  padding-block: 0;
166
173
  padding-inline: var(--xh-command-input-px, var(--xh-_command-px));
167
174
  border: 0;
168
- border-block-end: var(--xh-stroke-thin) solid var(--xh-command-input-border, var(--xh-border-subtle));
175
+ border-block-end: var(--xh-stroke-thin) solid var(--xh-command-input-border, var(--xh-material-elevated-separator));
169
176
  border-radius: 0;
170
177
  background: transparent;
171
178
  color: var(--xh-command-input-fg, var(--xh-fg-default));
172
179
  font-family: inherit;
173
- font-size: var(--xh-command-input-font-size, var(--xh-text-body-size));
180
+ font-size: var(--xh-command-input-font-size, var(--xh-_command-font-size));
174
181
  }
175
182
 
176
- [data-scope='command'][data-part='input']::placeholder {
177
- color: var(--xh-command-placeholder-fg, var(--xh-fg-subtle));
183
+ /* 聚焦不画环:插入符就是焦点指示。框没有外壳,全局那圈键盘焦点环只会压在通栏一行上 */
184
+ [data-scope='command'][data-part='input']:focus-visible {
185
+ outline: none;
178
186
  }
179
187
 
180
188
  /* 自动填充态:浏览器给填过的框强加一套系统色(多数引擎是黄底黑字),
@@ -206,6 +214,7 @@
206
214
  /* 模态面板里的滚动面:到底后不把滚动链穿透给页面 */
207
215
  overflow-y: auto;
208
216
  overscroll-behavior: contain;
217
+ transition: opacity var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
209
218
  }
210
219
 
211
220
  /* 没有可见命令时不保留列表的上下内距;只排除列表内部 hidden 祖先,退场中的外壳不影响判断。 */
@@ -240,7 +249,7 @@
240
249
  display: block;
241
250
  padding-block: var(--xh-command-group-label-py, var(--xh-space-1));
242
251
  padding-inline: var(--xh-command-group-label-px, var(--xh-_command-px));
243
- color: var(--xh-command-group-label-fg, var(--xh-fg-subtle));
252
+ color: var(--xh-command-group-label-fg, var(--xh-fg-muted));
244
253
  font-size: var(--xh-command-group-label-font-size, var(--xh-text-caption-size));
245
254
  font-weight: var(--xh-command-group-label-font-weight, var(--xh-font-weight-medium));
246
255
  line-height: var(--xh-leading-none);
@@ -258,7 +267,7 @@
258
267
  --xh-collection-inline-padding: var(--xh-command-item-px, var(--xh-_command-px));
259
268
  --xh-collection-gap: 0;
260
269
  --xh-collection-font-size: var(--xh-command-item-font-size, var(--xh-_command-font-size));
261
- --xh-collection-radius: var(--xh-command-item-radius, var(--xh-shape-control));
270
+ --xh-collection-radius: var(--xh-command-item-radius, var(--xh-shape-inset));
262
271
  --xh-collection-fg-rest: var(--xh-command-item-fg, var(--xh-fg-default));
263
272
  --xh-collection-fg-hover: var(--xh-command-item-fg, var(--xh-fg-default));
264
273
  --xh-collection-fg-keyboard-highlight: var(--xh-command-item-fg, var(--xh-fg-default));
@@ -285,32 +294,13 @@
285
294
  user-select: none;
286
295
  }
287
296
 
288
- /* 开幕:结果自上而下逐条冒出来。筛掉的条目带 hidden 不生成盒子,重新露面时这段动画重新起跑,
289
- 所以每改一次检索串都会重播一遍。backwards 让每条在自己那份延迟里保持起始帧 */
290
- [data-scope='command'][data-part='list'] [data-part='item'] {
297
+ /* 新插进列表的命令(宿主追加、异步取回的一批)自上而下逐条冒出来,同一批按到达顺序错开(序号封顶,命令再多也
298
+ 不会拖出一条越来越慢的尾巴)。打开时已有的结果直接呈现:自己或本列表带 data-instant。
299
+ 检索过滤筛掉的条目带 hidden 不生成盒子,重新露面只是换一批已有结果,机器给它打上 data-instant 直接呈现。
300
+ backwards 让每条在自己那份延迟里保持起始帧 */
301
+ [data-scope='command'][data-part='list'] [data-part='item']:not([data-instant], [data-scope='command'][data-part='list'][data-instant] *) {
291
302
  animation: xh-rise-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong) backwards;
292
- }
293
-
294
- /* 交错的间隔:第二条起逐级往后推,第六条起统一钉在第五级,命令再多也不会拖出一条越来越慢的尾巴。
295
- 列表里同时挂着被筛掉的条目(收起态),计数把它们排掉,序号才对得上看得见的那几条 */
296
- [data-scope='command'][data-part='list'] [data-part='item']:nth-child(2 of :not([hidden])) {
297
- animation-delay: var(--xh-motion-stagger-step);
298
- }
299
-
300
- [data-scope='command'][data-part='list'] [data-part='item']:nth-child(3 of :not([hidden])) {
301
- animation-delay: calc(2 * var(--xh-motion-stagger-step));
302
- }
303
-
304
- [data-scope='command'][data-part='list'] [data-part='item']:nth-child(4 of :not([hidden])) {
305
- animation-delay: calc(3 * var(--xh-motion-stagger-step));
306
- }
307
-
308
- [data-scope='command'][data-part='list'] [data-part='item']:nth-child(5 of :not([hidden])) {
309
- animation-delay: calc(4 * var(--xh-motion-stagger-step));
310
- }
311
-
312
- [data-scope='command'][data-part='list'] [data-part='item']:nth-child(n + 6 of :not([hidden])) {
313
- animation-delay: calc(5 * var(--xh-motion-stagger-step));
303
+ animation-delay: calc(var(--xh-_stagger-index, 0) * var(--xh-motion-stagger-step));
314
304
  }
315
305
 
316
306
  [data-scope='command'][data-part='item-text'] {
@@ -327,9 +317,9 @@
327
317
  [data-scope='command'][data-part='empty'] {
328
318
  display: block;
329
319
  flex: none;
330
- padding-block: var(--xh-command-empty-py, var(--xh-space-6));
320
+ padding-block: var(--xh-command-empty-py, var(--xh-space-3));
331
321
  padding-inline: var(--xh-command-empty-px, var(--xh-_command-px));
332
- color: var(--xh-command-empty-fg, var(--xh-fg-subtle));
322
+ color: var(--xh-command-empty-fg, var(--xh-fg-muted));
333
323
  font-size: var(--xh-command-empty-font-size, var(--xh-_command-font-size));
334
324
  line-height: var(--xh-leading-none);
335
325
  text-align: center;
@@ -337,23 +327,35 @@
337
327
 
338
328
  /* 在途占位:与空态占位同一个位置、同一副观感,两者不同屏 */
339
329
  [data-scope='command'][data-part='loading'] {
340
- display: block;
330
+ display: flex;
331
+ align-items: center;
332
+ justify-content: center;
333
+ gap: var(--xh-_command-gap);
341
334
  flex: none;
342
- padding-block: var(--xh-command-loading-py, var(--xh-space-6));
335
+ padding-block: var(--xh-command-loading-py, var(--xh-space-3));
343
336
  padding-inline: var(--xh-command-loading-px, var(--xh-_command-px));
344
- color: var(--xh-command-loading-fg, var(--xh-fg-subtle));
337
+ color: var(--xh-command-loading-fg, var(--xh-fg-muted));
345
338
  font-size: var(--xh-command-loading-font-size, var(--xh-_command-font-size));
346
339
  line-height: var(--xh-leading-none);
347
340
  text-align: center;
348
341
  }
349
342
 
343
+ /* 首次加载:文案前一枚加载环,由加载环配方画(连接层投影 data-xh-loading-ring 与 data-loading),
344
+ 直径取所在尺寸档的图标档 */
345
+ [data-scope='command'][data-part='loading']::before {
346
+ content: '';
347
+ flex: none;
348
+ inline-size: var(--xh-icon-size, var(--xh-glyph-size-md));
349
+ block-size: var(--xh-icon-size, var(--xh-glyph-size-md));
350
+ }
351
+
350
352
  /* 未提供状态内容时不渲染一块纯留白,提示文案仍由作者明确提供。 */
351
353
  [data-scope='command'][data-part='empty']:empty,
352
354
  [data-scope='command'][data-part='loading']:empty {
353
355
  display: none;
354
356
  }
355
357
 
356
- /* 取数在途:列表压暗一档,与在途占位一起说明这块正在变 */
358
+ /* 刷新:已有命令时后台在取,保留上一帧,列表按 micro 淡下,数据到了再淡回;在途占位此时让位 */
357
359
  [data-scope='command'][data-part='list'][aria-busy='true'] {
358
360
  opacity: var(--xh-command-list-busy-opacity, var(--xh-state-disabled-opacity));
359
361
  }
@@ -367,7 +369,7 @@
367
369
  gap: var(--xh-command-footer-gap, var(--xh-space-2));
368
370
  padding-block: var(--xh-command-footer-py, var(--xh-space-2));
369
371
  padding-inline: var(--xh-command-footer-px, var(--xh-_command-px));
370
- border-block-start: var(--xh-stroke-thin) solid var(--xh-command-footer-border, var(--xh-border-subtle));
372
+ border-block-start: var(--xh-stroke-thin) solid var(--xh-command-footer-border, var(--xh-material-elevated-separator));
371
373
  color: var(--xh-command-footer-fg, var(--xh-fg-muted));
372
374
  font-size: var(--xh-command-footer-font-size, var(--xh-text-caption-size));
373
375
  }
@@ -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 探一次,取不到就说明这份皮肤没被引入。 */
@@ -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,13 +105,7 @@
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
110
  浮层滚动面:到底后不把滚动链穿透给页面 */
106
111
  overflow-y: auto;
@@ -108,18 +113,6 @@
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,7 +170,8 @@
177
170
  }
178
171
 
179
172
  /* 首帧落位后从锚点一侧淡入短移,不缩放整张面。 */
180
- [data-scope='context-menu'][data-part='content'][data-state='open'] {
173
+ /* 挂载时就开着的那一段(data-instant)属于首帧,直接呈现 */
174
+ [data-scope='context-menu'][data-part='content'][data-state='open']:not([data-instant]) {
181
175
  animation: xh-overlay-slide-in var(--xh-motion-duration-enter) var(--xh-motion-ease-enter-strong);
182
176
  }
183
177
 
@@ -224,7 +218,7 @@
224
218
  --xh-collection-inline-padding: var(--xh-context-menu-item-px, var(--xh-_context-menu-item-px));
225
219
  --xh-collection-gap: 0;
226
220
  --xh-collection-font-size: var(--xh-context-menu-item-font-size, var(--xh-_context-menu-font-size));
227
- --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));
228
222
  --xh-collection-fg-rest: var(--xh-context-menu-item-fg, var(--xh-material-frosted-fg));
229
223
  --xh-collection-fg-hover: var(--xh-context-menu-item-fg, var(--xh-material-frosted-fg));
230
224
  --xh-collection-fg-keyboard-highlight: var(--xh-context-menu-item-fg, var(--xh-material-frosted-fg));
@@ -321,7 +315,8 @@
321
315
  order: 2;
322
316
  min-inline-size: 0;
323
317
  color: var(--xh-context-menu-item-description-fg, var(--xh-material-frosted-fg-muted));
324
- 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));
325
320
  white-space: nowrap;
326
321
  text-overflow: ellipsis;
327
322
  overflow: hidden;
@@ -382,6 +377,28 @@
382
377
  -webkit-mask: var(--xh-glyph-mark-check) center / contain no-repeat;
383
378
  mask: var(--xh-glyph-mark-check) center / contain no-repeat;
384
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
+ }
385
402
  }
386
403
 
387
404
  @layer xihan.motion {