@xihan-ui/styles 1.0.0-alpha.0 → 1.0.0-alpha.1

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 (58) hide show
  1. package/CHANGELOG.md +261 -0
  2. package/css/back-top.css +2 -2
  3. package/css/button-group.css +1 -1
  4. package/css/button.css +1 -1
  5. package/css/calendar.css +1 -1
  6. package/css/carousel.css +2 -2
  7. package/css/cascader.css +199 -24
  8. package/css/checkbox-group.css +20 -20
  9. package/css/checkbox.css +1 -1
  10. package/css/clipboard.css +3 -3
  11. package/css/color-picker.css +21 -5
  12. package/css/combobox.css +23 -20
  13. package/css/composer.css +1 -1
  14. package/css/context-menu.css +56 -26
  15. package/css/date-field.css +5 -5
  16. package/css/date-picker.css +66 -2
  17. package/css/drawer.css +3 -3
  18. package/css/dynamic-input.css +2 -2
  19. package/css/editable.css +6 -6
  20. package/css/field.css +32 -1
  21. package/css/file-upload.css +3 -3
  22. package/css/float-button.css +2 -2
  23. package/css/form.css +17 -5
  24. package/css/hover-card.css +15 -11
  25. package/css/image-viewer.css +176 -0
  26. package/css/listbox.css +9 -6
  27. package/css/mention.css +14 -22
  28. package/css/menu.css +38 -23
  29. package/css/menubar.css +28 -17
  30. package/css/number-field.css +16 -16
  31. package/css/pin-input.css +6 -6
  32. package/css/popconfirm.css +23 -0
  33. package/css/popover.css +15 -11
  34. package/css/popselect.css +31 -16
  35. package/css/progress.css +68 -1
  36. package/css/radio-group.css +1 -1
  37. package/css/select.css +148 -17
  38. package/css/side-nav.css +163 -0
  39. package/css/slider.css +55 -0
  40. package/css/steps.css +2 -2
  41. package/css/switch.css +27 -0
  42. package/css/table.css +6 -6
  43. package/css/tags-input.css +7 -7
  44. package/css/text-field.css +23 -10
  45. package/css/thread.css +1 -1
  46. package/css/time-field.css +5 -5
  47. package/css/time-picker.css +36 -26
  48. package/css/toggle-group.css +1 -1
  49. package/css/toggle.css +1 -1
  50. package/css/tone.css +22 -0
  51. package/css/tooltip.css +20 -15
  52. package/css/tour.css +16 -12
  53. package/css/transfer.css +11 -9
  54. package/css/tree-select.css +26 -18
  55. package/css/tree.css +8 -5
  56. package/index.css +6 -2
  57. package/index.unlayered.css +1499 -413
  58. package/package.json +4 -2
package/css/tooltip.css CHANGED
@@ -72,33 +72,38 @@
72
72
  --xh-_tooltip-font-size: var(--xh-font-size-md);
73
73
  }
74
74
 
75
- /* 箭头是旋转 45° 的方块,按落定朝向贴在 content 对侧边的中点 */
75
+ /* 箭头是旋转 45° 的方块,按自报的落定朝向贴在 content 对侧边上;
76
+ 交叉轴落点由定位引擎经内联自定义属性写进来,没给时退回居中 */
76
77
  [data-scope='tooltip'][data-part='arrow'] {
78
+ --xh-_tooltip-arrow-size: var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size));
79
+ --xh-_tooltip-arrow-x: 50%;
80
+ --xh-_tooltip-arrow-y: 50%;
81
+
77
82
  position: absolute;
78
- inline-size: var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size));
79
- block-size: var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size));
83
+ inline-size: var(--xh-_tooltip-arrow-size);
84
+ block-size: var(--xh-_tooltip-arrow-size);
80
85
  background: var(--xh-tooltip-bg, var(--xh-_tone, var(--xh-fg-default)));
81
86
  transform: rotate(45deg);
82
87
  }
83
88
 
84
- [data-scope='tooltip'][data-part='positioner'][data-placement^='bottom'] [data-scope='tooltip'][data-part='arrow'] {
85
- inset-block-start: calc(var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size)) / -2);
86
- inset-inline-start: calc(50% - var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size)) / 2);
89
+ [data-scope='tooltip'][data-part='arrow'][data-placement^='bottom'] {
90
+ inset-block-start: calc(var(--xh-_tooltip-arrow-size) / -2);
91
+ inset-inline-start: calc(var(--xh-_tooltip-arrow-x) - var(--xh-_tooltip-arrow-size) / 2);
87
92
  }
88
93
 
89
- [data-scope='tooltip'][data-part='positioner'][data-placement^='top'] [data-scope='tooltip'][data-part='arrow'] {
90
- inset-block-end: calc(var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size)) / -2);
91
- inset-inline-start: calc(50% - var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size)) / 2);
94
+ [data-scope='tooltip'][data-part='arrow'][data-placement^='top'] {
95
+ inset-block-end: calc(var(--xh-_tooltip-arrow-size) / -2);
96
+ inset-inline-start: calc(var(--xh-_tooltip-arrow-x) - var(--xh-_tooltip-arrow-size) / 2);
92
97
  }
93
98
 
94
- [data-scope='tooltip'][data-part='positioner'][data-placement^='left'] [data-scope='tooltip'][data-part='arrow'] {
95
- inset-block-start: calc(50% - var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size)) / 2);
96
- inset-inline-end: calc(var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size)) / -2);
99
+ [data-scope='tooltip'][data-part='arrow'][data-placement^='left'] {
100
+ inset-block-start: calc(var(--xh-_tooltip-arrow-y) - var(--xh-_tooltip-arrow-size) / 2);
101
+ inset-inline-end: calc(var(--xh-_tooltip-arrow-size) / -2);
97
102
  }
98
103
 
99
- [data-scope='tooltip'][data-part='positioner'][data-placement^='right'] [data-scope='tooltip'][data-part='arrow'] {
100
- inset-block-start: calc(50% - var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size)) / 2);
101
- inset-inline-start: calc(var(--xh-tooltip-arrow-size, var(--xh-overlay-arrow-size)) / -2);
104
+ [data-scope='tooltip'][data-part='arrow'][data-placement^='right'] {
105
+ inset-block-start: calc(var(--xh-_tooltip-arrow-y) - var(--xh-_tooltip-arrow-size) / 2);
106
+ inset-inline-start: calc(var(--xh-_tooltip-arrow-size) / -2);
102
107
  }
103
108
 
104
109
  @media (prefers-reduced-motion: reduce) {
package/css/tour.css CHANGED
@@ -211,7 +211,7 @@
211
211
  }
212
212
 
213
213
  [data-scope='tour'][data-part='prev-trigger'] {
214
- border-color: var(--xh-border-default);
214
+ border-color: var(--xh-border-control);
215
215
  color: var(--xh-fg-default);
216
216
  }
217
217
 
@@ -261,11 +261,15 @@
261
261
  }
262
262
 
263
263
  /* 箭头是旋转 45° 的方块,只保留朝向目标那两条边的描边;
264
- 引擎不产出箭头偏移,因此沿交叉轴固定居中。居中步没有锚点,连接层会给它发 hidden */
264
+ 交叉轴落点由定位引擎经内联自定义属性写进来,没给时退回居中。居中步没有锚点,连接层会给它发 hidden */
265
265
  [data-scope='tour'][data-part='arrow'] {
266
+ --xh-_tour-arrow-size: var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size));
267
+ --xh-_tour-arrow-x: 50%;
268
+ --xh-_tour-arrow-y: 50%;
269
+
266
270
  position: absolute;
267
- inline-size: var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size));
268
- block-size: var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size));
271
+ inline-size: var(--xh-_tour-arrow-size);
272
+ block-size: var(--xh-_tour-arrow-size);
269
273
  background: var(--xh-tour-bg, var(--xh-bg-surface));
270
274
  border: var(--xh-stroke-thin) solid var(--xh-tour-border, var(--xh-border-default));
271
275
  rotate: 45deg;
@@ -276,29 +280,29 @@
276
280
  }
277
281
 
278
282
  [data-scope='tour'][data-part='arrow'][data-placement^='bottom'] {
279
- inset-block-start: calc(var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size)) / -2);
280
- inset-inline-start: calc(50% - var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size)) / 2);
283
+ inset-block-start: calc(var(--xh-_tour-arrow-size) / -2);
284
+ inset-inline-start: calc(var(--xh-_tour-arrow-x) - var(--xh-_tour-arrow-size) / 2);
281
285
  border-block-end: 0;
282
286
  border-inline-end: 0;
283
287
  }
284
288
 
285
289
  [data-scope='tour'][data-part='arrow'][data-placement^='top'] {
286
- inset-block-end: calc(var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size)) / -2);
287
- inset-inline-start: calc(50% - var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size)) / 2);
290
+ inset-block-end: calc(var(--xh-_tour-arrow-size) / -2);
291
+ inset-inline-start: calc(var(--xh-_tour-arrow-x) - var(--xh-_tour-arrow-size) / 2);
288
292
  border-block-start: 0;
289
293
  border-inline-start: 0;
290
294
  }
291
295
 
292
296
  [data-scope='tour'][data-part='arrow'][data-placement^='right'] {
293
- inset-inline-start: calc(var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size)) / -2);
294
- inset-block-start: calc(50% - var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size)) / 2);
297
+ inset-inline-start: calc(var(--xh-_tour-arrow-size) / -2);
298
+ inset-block-start: calc(var(--xh-_tour-arrow-y) - var(--xh-_tour-arrow-size) / 2);
295
299
  border-block-start: 0;
296
300
  border-inline-end: 0;
297
301
  }
298
302
 
299
303
  [data-scope='tour'][data-part='arrow'][data-placement^='left'] {
300
- inset-inline-end: calc(var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size)) / -2);
301
- inset-block-start: calc(50% - var(--xh-tour-arrow-size, var(--xh-overlay-arrow-size)) / 2);
304
+ inset-inline-end: calc(var(--xh-_tour-arrow-size) / -2);
305
+ inset-block-start: calc(var(--xh-_tour-arrow-y) - var(--xh-_tour-arrow-size) / 2);
302
306
  border-block-end: 0;
303
307
  border-inline-start: 0;
304
308
  }
package/css/transfer.css CHANGED
@@ -59,7 +59,7 @@
59
59
  gap: var(--xh-transfer-header-gap, var(--xh-control-gap-md));
60
60
  align-items: center;
61
61
  padding-block: var(--xh-transfer-header-py, var(--xh-space-2));
62
- padding-inline: var(--xh-transfer-header-px, var(--xh-control-px-sm));
62
+ padding-inline: var(--xh-transfer-header-px, var(--xh-control-px-md));
63
63
  border-block-end: var(--xh-stroke-thin) solid var(--xh-transfer-panel-border, var(--xh-border-default));
64
64
  }
65
65
 
@@ -95,9 +95,9 @@
95
95
  display: block;
96
96
  inline-size: 100%;
97
97
  block-size: var(--xh-transfer-search-h, var(--xh-control-h-sm));
98
- padding-inline: var(--xh-transfer-search-px, var(--xh-control-px-sm));
98
+ padding-inline: var(--xh-transfer-search-px, var(--xh-control-px-md));
99
99
  border: 0;
100
- border-block-end: var(--xh-stroke-thin) solid var(--xh-transfer-panel-border, var(--xh-border-default));
100
+ border-block-end: var(--xh-stroke-thin) solid var(--xh-transfer-search-border, var(--xh-border-control));
101
101
  background: var(--xh-transfer-search-bg, transparent);
102
102
  color: var(--xh-transfer-search-fg, var(--xh-fg-default));
103
103
  font: inherit;
@@ -136,8 +136,8 @@
136
136
  flex: none;
137
137
  gap: var(--xh-transfer-item-gap, var(--xh-control-gap-md));
138
138
  align-items: center;
139
- padding-block: var(--xh-transfer-item-py, var(--xh-space-1));
140
- padding-inline: var(--xh-transfer-item-px, var(--xh-control-px-sm));
139
+ padding-block: var(--xh-transfer-item-py, var(--xh-space-1_5));
140
+ padding-inline: var(--xh-transfer-item-px, var(--xh-control-px-md));
141
141
  border-radius: var(--xh-transfer-item-radius, var(--xh-shape-control));
142
142
  color: var(--xh-transfer-item-fg, var(--xh-fg-default));
143
143
  font-size: var(--xh-transfer-item-font-size, var(--xh-text-body-size));
@@ -146,13 +146,15 @@
146
146
  white-space: nowrap;
147
147
  cursor: pointer;
148
148
  user-select: none;
149
- transition: background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
149
+ transition:
150
+ background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
151
+ color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
150
152
  }
151
153
 
152
- /* 键盘高亮与指针悬停共用一套底色:条目本身承载焦点,不另画描边。
154
+ /* 悬停与键盘锚点共用中性灰轻档:条目本身承载焦点,不另画描边。
153
155
  data-highlighted 跟的是连接层记的焦点条目,与勾选互相独立 */
154
156
  [data-scope='transfer'][data-part='item']:not([data-disabled]):is(:hover, [data-highlighted]) {
155
- background: var(--xh-transfer-item-bg-highlight, var(--xh-bg-subtle-hover));
157
+ background: var(--xh-transfer-item-bg-hover, var(--xh-bg-subtle));
156
158
  }
157
159
 
158
160
  [data-scope='transfer'][data-part='item']:focus-visible {
@@ -185,7 +187,7 @@
185
187
  justify-content: center;
186
188
  inline-size: var(--xh-transfer-checkbox-size, 16px);
187
189
  block-size: var(--xh-transfer-checkbox-size, 16px);
188
- border: var(--xh-stroke-thin) solid var(--xh-transfer-checkbox-border, var(--xh-border-default));
190
+ border: var(--xh-stroke-thin) solid var(--xh-transfer-checkbox-border, var(--xh-border-control));
189
191
  border-radius: var(--xh-transfer-checkbox-radius, var(--xh-radius-sm));
190
192
  background: var(--xh-transfer-checkbox-bg, var(--xh-bg-canvas));
191
193
  color: var(--xh-transfer-checkbox-fg, var(--xh-fg-on-brand));
@@ -12,8 +12,8 @@
12
12
 
13
13
  /* 形态档只换触发框的描边与底色这三个槽,浮层与树不跟着变:
14
14
  变的是「这是个输入位」的表达方式,不是弹出内容的表达方式 */
15
- --xh-_tree-select-border: var(--xh-border-default);
16
- --xh-_tree-select-border-hover: var(--xh-border-strong);
15
+ --xh-_tree-select-border: var(--xh-border-control);
16
+ --xh-_tree-select-border-hover: var(--xh-border-control-hover);
17
17
  --xh-_tree-select-bg: var(--xh-bg-canvas);
18
18
 
19
19
  /* 选中行的文字色随语气走,没写 data-tone 时退回品牌强调色 */
@@ -34,15 +34,15 @@
34
34
  /* 形态只决定描边与底色怎么用;用哪族颜色由 data-tone 决定,没写 tone 就沿用原来的中性配色 */
35
35
  /* outline 就是缺省那一身:描边加画布底,写出来只为让三档并列可读 */
36
36
  [data-scope='tree-select'][data-part='root'][data-variant='outline'] {
37
- --xh-_tree-select-border: var(--xh-border-default);
38
- --xh-_tree-select-border-hover: var(--xh-border-strong);
37
+ --xh-_tree-select-border: var(--xh-border-control);
38
+ --xh-_tree-select-border-hover: var(--xh-border-control-hover);
39
39
  --xh-_tree-select-bg: var(--xh-bg-canvas);
40
40
  }
41
41
 
42
42
  /* subtle 是填充式:底色接过「这里能点」的表达,描边随之让位 */
43
43
  [data-scope='tree-select'][data-part='root'][data-variant='subtle'] {
44
44
  --xh-_tree-select-border: transparent;
45
- --xh-_tree-select-border-hover: var(--xh-_tone-border, var(--xh-border-default));
45
+ --xh-_tree-select-border-hover: var(--xh-_tone-border, var(--xh-border-control-hover));
46
46
  --xh-_tree-select-bg: var(--xh-_tone-subtle, var(--xh-bg-subtle));
47
47
  }
48
48
 
@@ -117,10 +117,9 @@
117
117
  border-color: var(--xh-tree-select-trigger-border-hover, var(--xh-_tree-select-border-hover));
118
118
  }
119
119
 
120
- /* trigger 是整个控件唯一的 Tab 停靠点(展开后停靠点才移进树里),落焦必须看得见。
121
- 语气落在环上:没写 data-tone 时 --xh-_tone 没被声明,退回原来的聚焦环色 */
120
+ /* trigger 是整个控件唯一的 Tab 停靠点(展开后停靠点才移进树里),落焦必须看得见 */
122
121
  [data-scope='tree-select'][data-part='trigger']:focus-visible {
123
- outline: var(--xh-ring-width) solid var(--xh-_tone, var(--xh-ring-focus));
122
+ outline: var(--xh-ring-width) solid var(--xh-ring-focus);
124
123
  outline-offset: var(--xh-ring-offset);
125
124
  }
126
125
 
@@ -219,7 +218,7 @@
219
218
  /* 清空按钮退出了 Tab 序列(tabindex=-1),正常操作走不到这里;
220
219
  留着是给程序化聚焦兜底,落焦时得看得见 */
221
220
  [data-scope='tree-select'][data-part='clear-trigger']:focus-visible {
222
- outline: var(--xh-ring-width) solid var(--xh-_tone, var(--xh-ring-focus));
221
+ outline: var(--xh-ring-width) solid var(--xh-ring-focus);
223
222
  outline-offset: var(--xh-ring-offset);
224
223
  }
225
224
 
@@ -285,8 +284,14 @@
285
284
  display: none;
286
285
  }
287
286
 
288
- /* 没有锚点时容器自己进 Tab 序列兜底,落焦不画环:高亮永远长在行上 */
289
- [data-scope='tree-select'][data-part='tree']:focus-visible {
287
+ /* 焦点落在树容器上只有一种情形:指针打开、还没有任何行当锚点。那一刻它认领着 Tab 位,
288
+ 环画在内沿,用户才看得出键盘此刻在哪儿;有锚点时环长在行上,容器不再画 */
289
+ [data-scope='tree-select'][data-part='tree'][tabindex='0']:focus-visible {
290
+ outline: var(--xh-ring-width) solid var(--xh-ring-focus);
291
+ outline-offset: calc(-1 * var(--xh-ring-width));
292
+ }
293
+
294
+ [data-scope='tree-select'][data-part='tree']:not([tabindex='0']):focus-visible {
290
295
  outline: none;
291
296
  }
292
297
 
@@ -297,7 +302,7 @@
297
302
  }
298
303
 
299
304
  [data-scope='tree-select'][data-part='branch']:focus-visible > [data-scope='tree-select'][data-part='branch-control'] {
300
- outline: var(--xh-ring-width) solid var(--xh-_tone, var(--xh-ring-focus));
305
+ outline: var(--xh-ring-width) solid var(--xh-ring-focus);
301
306
  /* 往内收:行是撑满宽度的,环画在外沿会被容器裁掉 */
302
307
  outline-offset: calc(-1 * var(--xh-ring-width));
303
308
  }
@@ -308,8 +313,8 @@
308
313
  display: flex;
309
314
  align-items: center;
310
315
  gap: var(--xh-tree-select-row-gap, var(--xh-_tree-select-gap));
311
- padding-block: var(--xh-tree-select-row-py, var(--xh-space-1));
312
- padding-inline: var(--xh-tree-select-row-px, var(--xh-control-px-sm));
316
+ padding-block: var(--xh-tree-select-row-py, var(--xh-space-1_5));
317
+ padding-inline: var(--xh-tree-select-row-px, var(--xh-control-px-md));
313
318
  border-radius: var(--xh-tree-select-row-radius, var(--xh-shape-control));
314
319
  color: var(--xh-tree-select-row-fg, var(--xh-fg-default));
315
320
  font-size: var(--xh-tree-select-row-font-size, var(--xh-_tree-select-font-size));
@@ -318,6 +323,9 @@
318
323
  white-space: nowrap;
319
324
  cursor: pointer;
320
325
  user-select: none;
326
+ transition:
327
+ background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
328
+ color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
321
329
  }
322
330
 
323
331
  [data-scope='tree-select'][data-part='item'][hidden],
@@ -325,11 +333,11 @@
325
333
  display: none;
326
334
  }
327
335
 
328
- /* 键盘高亮与指针高亮共用一套底色。data-highlighted 跟的是连接层记的焦点行,
329
- 与选中互相独立:可以停在一个没被选中的节点上 */
336
+ /* 悬停与键盘锚点共用中性灰轻档:data-highlighted 跟的是连接层记的焦点行,
337
+ 与选中互相独立,键盘落焦另有聚焦环标记位置 */
330
338
  [data-scope='tree-select'][data-part='item']:not([data-disabled]):is(:hover, [data-highlighted]),
331
339
  [data-scope='tree-select'][data-part='branch-control']:not([data-disabled]):is(:hover, [data-highlighted]) {
332
- background: var(--xh-tree-select-row-bg-highlight, var(--xh-bg-subtle-hover));
340
+ background: var(--xh-tree-select-row-bg-hover, var(--xh-bg-subtle));
333
341
  }
334
342
 
335
343
  /* 选中只换文字色与字重,配合行尾的 ✓ 标记;底色整条通道留给高亮,
@@ -342,7 +350,7 @@
342
350
 
343
351
  /* 叶子自己就是 treeitem,环直接画在它身上 */
344
352
  [data-scope='tree-select'][data-part='item']:focus-visible {
345
- outline: var(--xh-ring-width) solid var(--xh-_tone, var(--xh-ring-focus));
353
+ outline: var(--xh-ring-width) solid var(--xh-ring-focus);
346
354
  outline-offset: calc(-1 * var(--xh-ring-width));
347
355
  }
348
356
 
package/css/tree.css CHANGED
@@ -70,8 +70,8 @@
70
70
  display: flex;
71
71
  align-items: center;
72
72
  gap: var(--xh-tree-row-gap, var(--xh-control-gap-md));
73
- padding-block: var(--xh-tree-row-py, var(--xh-space-1));
74
- padding-inline: var(--xh-tree-row-px, var(--xh-control-px-sm));
73
+ padding-block: var(--xh-tree-row-py, var(--xh-space-1_5));
74
+ padding-inline: var(--xh-tree-row-px, var(--xh-control-px-md));
75
75
  border-radius: var(--xh-tree-row-radius, var(--xh-shape-control));
76
76
  color: var(--xh-tree-row-fg, var(--xh-fg-default));
77
77
  font-size: var(--xh-tree-row-font-size, var(--xh-text-body-size));
@@ -80,6 +80,9 @@
80
80
  white-space: nowrap;
81
81
  cursor: pointer;
82
82
  user-select: none;
83
+ transition:
84
+ background var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
85
+ color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
83
86
  }
84
87
 
85
88
  [data-scope='tree'][data-part='item'][hidden],
@@ -87,11 +90,11 @@
87
90
  display: none;
88
91
  }
89
92
 
90
- /* 键盘高亮与指针高亮共用一套底色。data-highlighted 跟的是连接层记的焦点行,
91
- 与选中互相独立:可以停在一个没被选中的节点上 */
93
+ /* 悬停与键盘锚点共用中性灰轻档:data-highlighted 跟的是连接层记的焦点行,
94
+ 与选中互相独立,键盘落焦另有聚焦环标记位置 */
92
95
  [data-scope='tree'][data-part='item']:not([data-disabled]):is(:hover, [data-highlighted]),
93
96
  [data-scope='tree'][data-part='branch-control']:not([data-disabled]):is(:hover, [data-highlighted]) {
94
- background: var(--xh-tree-row-bg-highlight, var(--xh-bg-subtle-hover));
97
+ background: var(--xh-tree-row-bg-hover, var(--xh-bg-subtle));
95
98
  }
96
99
 
97
100
  /* 选中只换文字色与字重,配合行尾的 ✓ 标记;底色整条通道留给高亮,
package/index.css CHANGED
@@ -1,8 +1,11 @@
1
+ /* 层序声明必须最先:级联层的先后由首次出现定死,layers.css 打头才立得住序。 */
2
+ @import './css/layers.css';
3
+
1
4
  /* 令牌先于一切:皮肤里不写兜底值,令牌缺席就是缺陷,不是降级。
2
5
  tokens.css 自带 @layer xihan.tokens,层序由 layers.css 定。 */
3
6
  @import '@xihan-ui/tokens/tokens.css';
4
7
 
5
- /* 层序声明必须最先,其余按层归属排列。 */
8
+ /* 其余按层归属排列。 */
6
9
  @import './css/affix.css';
7
10
  @import './css/avatar-group.css';
8
11
  @import './css/back-top.css';
@@ -18,7 +21,6 @@
18
21
  @import './css/highlight.css';
19
22
  @import './css/icon-wrapper.css';
20
23
  @import './css/infinite-scroll.css';
21
- @import './css/layers.css';
22
24
  @import './css/layout.css';
23
25
  @import './css/list.css';
24
26
  @import './css/log.css';
@@ -73,6 +75,7 @@
73
75
  @import './css/hover-card.css';
74
76
  @import './css/icon.css';
75
77
  @import './css/image.css';
78
+ @import './css/image-viewer.css';
76
79
  @import './css/listbox.css';
77
80
  @import './css/loading-bar.css';
78
81
  @import './css/menu.css';
@@ -88,6 +91,7 @@
88
91
  @import './css/scroll-area.css';
89
92
  @import './css/select.css';
90
93
  @import './css/separator.css';
94
+ @import './css/side-nav.css';
91
95
  @import './css/slider.css';
92
96
  @import './css/splitter.css';
93
97
  @import './css/steps.css';