@xihan-ui/styles 2.1.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1261 -0
- package/README.md +6 -1
- package/component-tokens.d.ts +533 -96
- package/components.tokens.json +35461 -26045
- package/css/accordion.css +34 -8
- package/css/alert.css +59 -1
- package/css/anchor.css +46 -8
- package/css/approval.css +116 -76
- package/css/avatar-group.css +1 -1
- package/css/avatar.css +13 -5
- package/css/back-top.css +61 -42
- package/css/badge.css +62 -12
- package/css/bar-code.css +1 -1
- package/css/breadcrumb.css +62 -3
- package/css/button-group.css +4 -4
- package/css/button.css +67 -19
- package/css/calendar-picker.css +19 -0
- package/css/calendar-range-picker.css +39 -2
- package/css/card.css +115 -1
- package/css/carousel.css +148 -43
- package/css/cartesian-chart.css +830 -0
- package/css/cascader.css +181 -65
- package/css/checkbox-group.css +59 -89
- package/css/checkbox.css +16 -49
- package/css/citation.css +470 -0
- package/css/clipboard.css +20 -63
- package/css/code-view.css +101 -6
- package/css/collapsible.css +34 -8
- package/css/color-field.css +18 -0
- package/css/color-picker.css +128 -50
- package/css/color-slider.css +22 -15
- package/css/color-swatch-picker.css +3 -1
- package/css/combobox.css +80 -33
- package/css/command.css +45 -43
- package/css/context-menu.css +39 -22
- package/css/date-field.css +56 -0
- package/css/date-picker.css +132 -26
- package/css/date-range-picker.css +337 -14
- package/css/description.css +17 -1
- package/css/descriptions.css +42 -0
- package/css/dialog.css +94 -36
- package/css/diff-view.css +97 -12
- package/css/download-trigger.css +44 -78
- package/css/drawer.css +160 -119
- package/css/editable.css +19 -0
- package/css/empty-state.css +7 -6
- package/css/field-array.css +36 -0
- package/css/field.css +20 -18
- package/css/file-upload.css +125 -135
- package/css/flex.css +324 -8
- package/css/float-button.css +263 -38
- package/css/floating-panel.css +53 -19
- package/css/form.css +31 -17
- package/css/funnel-chart.css +106 -0
- package/css/graph-chart.css +205 -0
- package/css/grid-list.css +235 -0
- package/css/grid.css +252 -1
- package/css/heatmap.css +119 -36
- package/css/hierarchy-chart.css +298 -0
- package/css/hover-card.css +31 -14
- package/css/icon.css +100 -0
- package/css/image-cropper.css +33 -7
- package/css/image-viewer.css +167 -22
- package/css/image.css +23 -4
- package/css/input-group.css +11 -13
- package/css/json-viewer.css +50 -2
- package/css/layout.css +68 -18
- package/css/liquid.css +106 -0
- package/css/list.css +1 -1
- package/css/listbox.css +46 -6
- package/css/loading-bar.css +27 -13
- package/css/log.css +129 -33
- package/css/markdown-stream.css +1 -1
- package/css/marquee.css +163 -7
- package/css/matrix-code.css +1 -1
- package/css/mention.css +35 -19
- package/css/menu.css +35 -21
- package/css/menubar.css +36 -20
- package/css/message-feed.css +172 -51
- package/css/navigation-menu.css +172 -11
- package/css/notification.css +435 -108
- package/css/number-field.css +22 -0
- package/css/page-header.css +3 -1
- package/css/pagination.css +126 -24
- package/css/password-input.css +40 -8
- package/css/pie-chart.css +247 -0
- package/css/popconfirm.css +44 -50
- package/css/popover.css +50 -14
- package/css/progress.css +308 -10
- package/css/prompt-input.css +36 -0
- package/css/question-flow.css +97 -57
- package/css/radar-chart.css +233 -0
- package/css/radio-group.css +363 -5
- package/css/rating.css +21 -23
- package/css/reasoning.css +61 -54
- package/css/resizable.css +6 -1
- package/css/sankey-chart.css +174 -0
- package/css/scroll-area.css +32 -0
- package/css/scrollbar.css +1 -1
- package/css/select.css +74 -55
- package/css/side-nav.css +173 -24
- package/css/signature-pad.css +16 -1
- package/css/skeleton.css +13 -14
- package/css/slider.css +35 -13
- package/css/sortable.css +37 -7
- package/css/sparkline.css +164 -0
- package/css/spinner.css +50 -22
- package/css/splitter.css +7 -1
- package/css/statistic.css +10 -0
- package/css/steps.css +248 -29
- package/css/switch.css +23 -48
- package/css/table.css +175 -118
- package/css/tabs.css +231 -19
- package/css/tag-group.css +27 -3
- package/css/tag.css +53 -12
- package/css/tags-input.css +40 -3
- package/css/text-field.css +19 -0
- package/css/time-field.css +20 -1
- package/css/time-picker.css +103 -17
- package/css/time-range-picker.css +45 -16
- package/css/timeline.css +1 -1
- package/css/toggle-group.css +4 -4
- package/css/toggle.css +4 -3
- package/css/tool-call.css +59 -51
- package/css/toolbar.css +101 -3
- package/css/tooltip.css +15 -2
- package/css/tour.css +42 -12
- package/css/transfer.css +98 -75
- package/css/tree-select.css +232 -53
- package/css/tree.css +271 -55
- package/css/truncate.css +55 -12
- package/css/typography.css +93 -0
- package/css/virtualizer.css +56 -0
- package/css/watermark.css +23 -0
- package/family/action-control.css +14 -5
- package/family/chart.css +480 -0
- package/family/check-mark.css +94 -0
- package/family/choice-card.css +97 -0
- package/family/collection-item.css +9 -15
- package/family/field-chrome.css +1 -12
- package/family/loading-ring.css +95 -0
- package/family/material.css +72 -0
- package/family/menu-choice.css +56 -0
- package/family/motion.css +207 -10
- package/family/tag-list.css +59 -0
- package/index.css +13824 -4030
- package/index.unlayered.css +13403 -3605
- package/package.json +20 -8
- package/css/gradient-text.css +0 -91
- package/css/icon-wrapper.css +0 -81
- package/css/segmented.css +0 -280
- package/css/toast.css +0 -499
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-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
180
|
+
font-size: var(--xh-command-input-font-size, var(--xh-_command-font-size));
|
|
174
181
|
}
|
|
175
182
|
|
|
176
|
-
|
|
177
|
-
|
|
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-
|
|
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-
|
|
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
|
-
/*
|
|
289
|
-
|
|
290
|
-
|
|
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-
|
|
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-
|
|
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:
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
}
|
package/css/context-menu.css
CHANGED
|
@@ -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
|
-
|
|
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-
|
|
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
|
-
|
|
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 {
|
package/css/date-field.css
CHANGED
|
@@ -123,6 +123,30 @@
|
|
|
123
123
|
display: none;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
/* 整条占位:一段都没填、焦点也不在段上时,段位与分隔符让位给一句占位文字,焦点一进到段上就换回段位。
|
|
127
|
+
段位只是淡出(仍可聚焦、仍在读屏树里),文字以生成内容压在同一行上、不吃指针,点下去落到底下的段位 */
|
|
128
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] {
|
|
129
|
+
position: relative;
|
|
130
|
+
color: transparent;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] > * {
|
|
134
|
+
opacity: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
138
|
+
content: attr(data-placeholder-text);
|
|
139
|
+
position: absolute;
|
|
140
|
+
inset-inline: 0;
|
|
141
|
+
inset-block-start: 50%;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
color: var(--xh-date-field-placeholder-fg, var(--xh-fg-subtle));
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
text-overflow: ellipsis;
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
translate: 0 -50%;
|
|
148
|
+
}
|
|
149
|
+
|
|
126
150
|
[data-scope='date-field'][data-part='segment-group'] > :not([data-scope]) {
|
|
127
151
|
color: var(--xh-date-field-literal-fg, var(--xh-fg-subtle));
|
|
128
152
|
}
|
|
@@ -143,6 +167,10 @@
|
|
|
143
167
|
user-select: none;
|
|
144
168
|
/* 触屏上连点两下不该被当成缩放手势 */
|
|
145
169
|
touch-action: manipulation;
|
|
170
|
+
/* 反白随当前段换色:状态角色的 micro 淡变,与 TimeField 同一档;焦点环画在 control 上,不进过渡 */
|
|
171
|
+
transition:
|
|
172
|
+
background-color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter),
|
|
173
|
+
color var(--xh-motion-duration-micro) var(--xh-motion-ease-enter);
|
|
146
174
|
}
|
|
147
175
|
|
|
148
176
|
/* granularity 用不上的段带 hidden 留在文档里(不卸载作者节点)。
|
|
@@ -231,6 +259,15 @@
|
|
|
231
259
|
}
|
|
232
260
|
|
|
233
261
|
@media (forced-colors: active) {
|
|
262
|
+
/* 整条占位的文字照系统的弱色画;段位让位时的透明字不被强制换色顶回来 */
|
|
263
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown] {
|
|
264
|
+
forced-color-adjust: none;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
[data-scope='date-field'][data-part='segment-group'][data-placeholder-shown]::before {
|
|
268
|
+
color: GrayText;
|
|
269
|
+
}
|
|
270
|
+
|
|
234
271
|
[data-scope='date-field'][data-part='segment'][data-invalid]:is([data-focus], :focus-visible) {
|
|
235
272
|
outline: var(--xh-ring-width) solid Highlight;
|
|
236
273
|
outline-offset: var(--xh-ring-offset);
|
|
@@ -252,4 +289,23 @@
|
|
|
252
289
|
white-space: nowrap;
|
|
253
290
|
pointer-events: none;
|
|
254
291
|
}
|
|
292
|
+
|
|
293
|
+
@media (forced-colors: active) {
|
|
294
|
+
/* 兜底字形是 mask 挖出来的一块底色,这一档里底色被系统换成 Canvas,字形跟着消失。
|
|
295
|
+
字形退出强制换色、直接写系统色(不能取 currentColor:退出强制换色的伪元素读到的是被系统换掉之前的作者色):
|
|
296
|
+
按钮面上取 ButtonText,悬停与按下时家族把按钮涂成 Highlight、字形换 HighlightText;
|
|
297
|
+
禁用取 GrayText */
|
|
298
|
+
[data-scope='date-field'][data-part='clear-trigger']:empty::before {
|
|
299
|
+
forced-color-adjust: none;
|
|
300
|
+
background-color: ButtonText;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
[data-scope='date-field'][data-part='clear-trigger']:not([data-disabled]):not([data-loading]):is(:hover, :active, [data-pressed]):empty::before {
|
|
304
|
+
background-color: HighlightText;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
[data-scope='date-field'][data-part='clear-trigger'][data-disabled]:empty::before {
|
|
308
|
+
background-color: GrayText;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
255
311
|
}
|