@icen.ai/ui 0.10.0 → 0.11.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.
- package/AGENTS.md +79 -309
- package/LICENSE +21 -0
- package/README.md +43 -54
- package/dist/base.css +68 -22
- package/dist/behaviors/accordion.mjs +1 -1
- package/dist/behaviors/ai-branch.mjs +14 -0
- package/dist/behaviors/ai-chat.d.mts +2 -2
- package/dist/behaviors/ai-chat.mjs +66 -10
- package/dist/behaviors/ai-composer.d.mts +5 -5
- package/dist/behaviors/ai-composer.mjs +34 -10
- package/dist/behaviors/ai-core.mjs +14 -0
- package/dist/behaviors/ai-diff.mjs +14 -0
- package/dist/behaviors/ai-feedback.mjs +14 -0
- package/dist/behaviors/ai-panel.d.mts +2 -2
- package/dist/behaviors/ai-panel.mjs +14 -0
- package/dist/behaviors/ai-provider.d.mts +1 -1
- package/dist/behaviors/ai-provider.mjs +14 -0
- package/dist/behaviors/ai-threads.mjs +14 -0
- package/dist/behaviors/ai-tool.d.mts +1 -1
- package/dist/behaviors/ai-tool.mjs +299 -24
- package/dist/behaviors/ai-tools.mjs +1179 -28
- package/dist/behaviors/autocomplete.d.mts +1 -1
- package/dist/behaviors/autocomplete.mjs +14 -0
- package/dist/behaviors/back-top.mjs +14 -0
- package/dist/behaviors/carousel.mjs +21 -1
- package/dist/behaviors/cascader.mjs +27 -0
- package/dist/behaviors/charts.d.mts +12 -1
- package/dist/behaviors/charts.mjs +298 -20
- package/dist/behaviors/code-block.mjs +22 -1
- package/dist/behaviors/command-palette.mjs +3 -3
- package/dist/behaviors/context-menu.d.mts +2 -2
- package/dist/behaviors/context-menu.mjs +14 -0
- package/dist/behaviors/controls.d.mts +8 -8
- package/dist/behaviors/controls.mjs +50 -6
- package/dist/behaviors/copy.mjs +14 -0
- package/dist/behaviors/datatable.d.mts +3 -3
- package/dist/behaviors/datatable.mjs +89 -11
- package/dist/behaviors/date-picker.mjs +14 -0
- package/dist/behaviors/events.d.mts +10 -10
- package/dist/behaviors/events.mjs +11 -1
- package/dist/behaviors/form-validate.d.mts +10 -1
- package/dist/behaviors/form-validate.mjs +279 -4611
- package/dist/behaviors/i18n.d.mts +14 -0
- package/dist/behaviors/i18n.mjs +28 -0
- package/dist/behaviors/input.mjs +16 -0
- package/dist/behaviors/kb-access.d.mts +2 -2
- package/dist/behaviors/kb-access.mjs +21 -2
- package/dist/behaviors/kb-acl.d.mts +2 -2
- package/dist/behaviors/kb-acl.mjs +14 -0
- package/dist/behaviors/kb-answer.d.mts +2 -2
- package/dist/behaviors/kb-answer.mjs +298 -23
- package/dist/behaviors/kb-audit.d.mts +2 -2
- package/dist/behaviors/kb-audit.mjs +14 -0
- package/dist/behaviors/kb-canvas.d.mts +3 -3
- package/dist/behaviors/kb-canvas.mjs +14 -0
- package/dist/behaviors/kb-chain.d.mts +2 -2
- package/dist/behaviors/kb-chain.mjs +14 -0
- package/dist/behaviors/kb-checkpoint.d.mts +2 -2
- package/dist/behaviors/kb-checkpoint.mjs +14 -0
- package/dist/behaviors/kb-chunks.d.mts +2 -2
- package/dist/behaviors/kb-chunks.mjs +14 -0
- package/dist/behaviors/kb-citation.d.mts +2 -2
- package/dist/behaviors/kb-citation.mjs +33 -6
- package/dist/behaviors/kb-clarify.d.mts +2 -2
- package/dist/behaviors/kb-clarify.mjs +14 -0
- package/dist/behaviors/kb-conflict.d.mts +2 -2
- package/dist/behaviors/kb-conflict.mjs +14 -0
- package/dist/behaviors/kb-connector.d.mts +2 -2
- package/dist/behaviors/kb-connector.mjs +14 -0
- package/dist/behaviors/kb-core.d.mts +1 -1
- package/dist/behaviors/kb-core.mjs +14 -0
- package/dist/behaviors/kb-eval.d.mts +2 -2
- package/dist/behaviors/kb-eval.mjs +21 -2
- package/dist/behaviors/kb-explain.d.mts +2 -2
- package/dist/behaviors/kb-explain.mjs +26 -2
- package/dist/behaviors/kb-filter.d.mts +2 -2
- package/dist/behaviors/kb-filter.mjs +21 -2
- package/dist/behaviors/kb-gap.d.mts +2 -2
- package/dist/behaviors/kb-gap.mjs +14 -0
- package/dist/behaviors/kb-hittest.d.mts +2 -2
- package/dist/behaviors/kb-hittest.mjs +15 -1
- package/dist/behaviors/kb-metadata.mjs +19 -0
- package/dist/behaviors/kb-passage.d.mts +2 -2
- package/dist/behaviors/kb-passage.mjs +14 -0
- package/dist/behaviors/kb-pipeline.d.mts +2 -2
- package/dist/behaviors/kb-pipeline.mjs +14 -0
- package/dist/behaviors/kb-qa.mjs +14 -0
- package/dist/behaviors/kb-rerank.d.mts +2 -2
- package/dist/behaviors/kb-rerank.mjs +14 -0
- package/dist/behaviors/kb-retrieval.d.mts +2 -2
- package/dist/behaviors/kb-retrieval.mjs +31 -4
- package/dist/behaviors/kb-review.d.mts +2 -2
- package/dist/behaviors/kb-review.mjs +21 -2
- package/dist/behaviors/kb-sandbox.d.mts +2 -2
- package/dist/behaviors/kb-sandbox.mjs +20 -1
- package/dist/behaviors/kb-segment.d.mts +2 -2
- package/dist/behaviors/kb-segment.mjs +15 -1
- package/dist/behaviors/kb-select.mjs +21 -2
- package/dist/behaviors/kb-sources.d.mts +2 -2
- package/dist/behaviors/kb-sources.mjs +14 -0
- package/dist/behaviors/kb-sql.d.mts +2 -2
- package/dist/behaviors/kb-sql.mjs +14 -0
- package/dist/behaviors/kb-trace.d.mts +2 -2
- package/dist/behaviors/kb-trace.mjs +22 -3
- package/dist/behaviors/kb-visibility.d.mts +2 -2
- package/dist/behaviors/kb-visibility.mjs +14 -0
- package/dist/behaviors/kb-who-can.d.mts +2 -2
- package/dist/behaviors/kb-who-can.mjs +21 -2
- package/dist/behaviors/mentions.d.mts +1 -1
- package/dist/behaviors/mentions.mjs +14 -0
- package/dist/behaviors/modal.d.mts +1 -1
- package/dist/behaviors/modal.mjs +14 -0
- package/dist/behaviors/motion.d.mts +16 -0
- package/dist/behaviors/motion.mjs +39 -0
- package/dist/behaviors/notification.d.mts +2 -2
- package/dist/behaviors/notification.mjs +27 -3
- package/dist/behaviors/panel.mjs +14 -0
- package/dist/behaviors/scroll-area.d.mts +17 -0
- package/dist/behaviors/scroll-area.mjs +59 -0
- package/dist/behaviors/select.mjs +21 -2
- package/dist/behaviors/slider.mjs +3 -3
- package/dist/behaviors/split-pane.mjs +2 -0
- package/dist/behaviors/suggestions.mjs +14 -0
- package/dist/behaviors/tabs.mjs +10 -0
- package/dist/behaviors/tag-input.mjs +14 -0
- package/dist/behaviors/theme-switcher.d.mts +2 -2
- package/dist/behaviors/theme-switcher.mjs +30 -2
- package/dist/behaviors/theme.mjs +16 -2
- package/dist/behaviors/toast.d.mts +2 -2
- package/dist/behaviors/toast.mjs +14 -0
- package/dist/behaviors/tree-select.mjs +27 -0
- package/dist/behaviors/tree.mjs +4 -4
- package/dist/behaviors/upload.mjs +14 -0
- package/dist/behaviors/url-safety.d.mts +8 -0
- package/dist/behaviors/url-safety.mjs +11 -0
- package/dist/components/accordion.d.mts +2 -0
- package/dist/components/ai-branch.d.mts +2 -0
- package/dist/components/ai-chat.css +40 -33
- package/dist/components/ai-chat.d.mts +2 -0
- package/dist/components/ai-composer.d.mts +2 -0
- package/dist/components/ai-context.d.mts +2 -0
- package/dist/components/ai-context.mjs +1 -0
- package/dist/components/ai-diff.css +6 -6
- package/dist/components/ai-diff.d.mts +2 -0
- package/dist/components/ai-feedback.d.mts +2 -0
- package/dist/components/ai-files.d.mts +2 -0
- package/dist/components/ai-message.d.mts +2 -0
- package/dist/components/ai-panel.css +12 -10
- package/dist/components/ai-reasoning.d.mts +2 -0
- package/dist/components/ai-subagent.d.mts +2 -0
- package/dist/components/ai-subagent.mjs +1 -0
- package/dist/components/ai-threads.d.mts +2 -0
- package/dist/components/ai-todo.d.mts +2 -0
- package/dist/components/ai-todo.mjs +1 -0
- package/dist/components/ai-tool-call.d.mts +2 -0
- package/dist/components/ai-tool-call.mjs +1 -0
- package/dist/components/ai-tool.css +16 -16
- package/dist/components/ai-usage.d.mts +2 -0
- package/dist/components/alert.d.mts +2 -0
- package/dist/components/autocomplete.css +12 -12
- package/dist/components/autocomplete.d.mts +2 -0
- package/dist/components/avatar.d.mts +2 -0
- package/dist/components/back-top.css +47 -16
- package/dist/components/back-top.d.mts +2 -0
- package/dist/components/badge.css +1 -1
- package/dist/components/badge.d.mts +2 -0
- package/dist/components/breadcrumb.css +26 -8
- package/dist/components/breadcrumb.d.mts +2 -0
- package/dist/components/btn.css +67 -62
- package/dist/components/btn.d.mts +2 -0
- package/dist/components/card.css +22 -22
- package/dist/components/card.d.mts +2 -0
- package/dist/components/carousel.d.mts +2 -0
- package/dist/components/cascader.css +56 -35
- package/dist/components/cascader.d.mts +2 -0
- package/dist/components/chart-area.css +46 -0
- package/dist/components/chart-area.d.mts +2 -0
- package/dist/components/chart-bar.css +66 -19
- package/dist/components/chart-bar.d.mts +2 -0
- package/dist/components/chart-calendar.d.mts +2 -0
- package/dist/components/chart-gauge.css +23 -3
- package/dist/components/chart-gauge.d.mts +2 -0
- package/dist/components/chart-graph.css +15 -3
- package/dist/components/chart-graph.d.mts +2 -0
- package/dist/components/chart-heatmap.css +117 -95
- package/dist/components/chart-heatmap.d.mts +2 -0
- package/dist/components/chart-line.css +54 -0
- package/dist/components/chart-line.d.mts +2 -0
- package/dist/components/chart-map.d.mts +2 -0
- package/dist/components/chart-pie.css +29 -0
- package/dist/components/chart-pie.d.mts +2 -0
- package/dist/components/chart-radar.css +50 -1
- package/dist/components/chart-radar.d.mts +2 -0
- package/dist/components/chart-scatter.css +39 -2
- package/dist/components/chart-scatter.d.mts +2 -0
- package/dist/components/chart-sparkline.css +20 -0
- package/dist/components/chart-sparkline.d.mts +2 -0
- package/dist/components/chart-stack.css +16 -5
- package/dist/components/chart-stack.d.mts +2 -0
- package/dist/components/charts.css +109 -35
- package/dist/components/charts.d.mts +2 -0
- package/dist/components/code-block.css +10 -8
- package/dist/components/code-block.d.mts +2 -0
- package/dist/components/command-palette.css +45 -38
- package/dist/components/command-palette.d.mts +2 -0
- package/dist/components/content.css +62 -57
- package/dist/components/context-menu.d.mts +2 -0
- package/dist/components/copy.css +10 -10
- package/dist/components/copy.d.mts +2 -0
- package/dist/components/datatable.css +72 -59
- package/dist/components/datatable.d.mts +2 -0
- package/dist/components/date-picker.css +26 -26
- package/dist/components/date-picker.d.mts +2 -0
- package/dist/components/desc.d.mts +2 -0
- package/dist/components/dropdown.d.mts +2 -0
- package/dist/components/empty.css +16 -16
- package/dist/components/empty.d.mts +2 -0
- package/dist/components/feedback.css +31 -29
- package/dist/components/form-validate.css +20 -6
- package/dist/components/form-validate.d.mts +2 -0
- package/dist/components/form.css +17 -14
- package/dist/components/form.d.mts +2 -0
- package/dist/components/icon.css +21 -10
- package/dist/components/icon.d.mts +2 -0
- package/dist/components/input.css +22 -22
- package/dist/components/input.d.mts +2 -0
- package/dist/components/kb-access.d.mts +2 -0
- package/dist/components/kb-acl.d.mts +2 -0
- package/dist/components/kb-agent.css +134 -55
- package/dist/components/kb-answer.d.mts +2 -0
- package/dist/components/kb-audit.d.mts +2 -0
- package/dist/components/kb-canvas.d.mts +2 -0
- package/dist/components/kb-chain.d.mts +2 -0
- package/dist/components/kb-checkpoint.d.mts +2 -0
- package/dist/components/kb-chunks.d.mts +2 -0
- package/dist/components/kb-citation.d.mts +2 -0
- package/dist/components/kb-clarify.d.mts +2 -0
- package/dist/components/kb-conflict.d.mts +2 -0
- package/dist/components/kb-connector.d.mts +2 -0
- package/dist/components/kb-data.css +192 -80
- package/dist/components/kb-eval.d.mts +2 -0
- package/dist/components/kb-explain.d.mts +2 -0
- package/dist/components/kb-filter.d.mts +2 -0
- package/dist/components/kb-gap.d.mts +2 -0
- package/dist/components/kb-ground.css +165 -73
- package/dist/components/kb-hittest.d.mts +2 -0
- package/dist/components/kb-ingest.css +308 -113
- package/dist/components/kb-metadata.d.mts +2 -0
- package/dist/components/kb-ops.css +189 -75
- package/dist/components/kb-passage.d.mts +2 -0
- package/dist/components/kb-perm.css +158 -87
- package/dist/components/kb-pipeline.d.mts +2 -0
- package/dist/components/kb-qa.d.mts +2 -0
- package/dist/components/kb-rerank.d.mts +2 -0
- package/dist/components/kb-retrieval.d.mts +2 -0
- package/dist/components/kb-review.d.mts +2 -0
- package/dist/components/kb-sandbox.d.mts +2 -0
- package/dist/components/kb-search.css +353 -116
- package/dist/components/kb-segment.d.mts +2 -0
- package/dist/components/kb-sources.d.mts +2 -0
- package/dist/components/kb-sql.d.mts +2 -0
- package/dist/components/kb-trace.d.mts +2 -0
- package/dist/components/kb-visibility.d.mts +2 -0
- package/dist/components/kb-who-can.d.mts +2 -0
- package/dist/components/kb.css +60 -36
- package/dist/components/kb.d.mts +2 -0
- package/dist/components/kbd.d.mts +2 -0
- package/dist/components/layout.css +10 -10
- package/dist/components/layout.d.mts +2 -0
- package/dist/components/list.d.mts +2 -0
- package/dist/components/material-chinese.css +10 -0
- package/dist/components/material-soviet.css +10 -0
- package/dist/components/material.css +61 -18
- package/dist/components/media-card.d.mts +2 -0
- package/dist/components/media.css +22 -27
- package/dist/components/mentions.css +18 -17
- package/dist/components/mentions.d.mts +2 -0
- package/dist/components/menu.css +32 -28
- package/dist/components/modal.css +30 -27
- package/dist/components/modal.d.mts +2 -0
- package/dist/components/nav.css +48 -44
- package/dist/components/nav.d.mts +2 -0
- package/dist/components/notification.css +31 -25
- package/dist/components/notification.d.mts +2 -0
- package/dist/components/pagination.css +15 -13
- package/dist/components/pagination.d.mts +2 -0
- package/dist/components/panel.css +19 -20
- package/dist/components/panel.d.mts +2 -0
- package/dist/components/pill.css +8 -7
- package/dist/components/pill.d.mts +2 -0
- package/dist/components/popover.css +32 -23
- package/dist/components/popover.d.mts +2 -0
- package/dist/components/progress.d.mts +2 -0
- package/dist/components/rating.d.mts +2 -0
- package/dist/components/result.d.mts +2 -0
- package/dist/components/scroll-area.css +84 -112
- package/dist/components/scroll-area.d.mts +2 -0
- package/dist/components/scroll-area.mjs +1 -0
- package/dist/components/segmented.css +47 -29
- package/dist/components/segmented.d.mts +2 -0
- package/dist/components/select.css +80 -41
- package/dist/components/select.d.mts +2 -0
- package/dist/components/sidebar.css +42 -38
- package/dist/components/sidebar.d.mts +2 -0
- package/dist/components/skeleton.d.mts +2 -0
- package/dist/components/slider.css +26 -22
- package/dist/components/slider.d.mts +2 -0
- package/dist/components/spinner.d.mts +2 -0
- package/dist/components/split-pane.css +16 -7
- package/dist/components/split-pane.d.mts +2 -0
- package/dist/components/stat.css +17 -16
- package/dist/components/stat.d.mts +2 -0
- package/dist/components/steps.css +26 -26
- package/dist/components/steps.d.mts +2 -0
- package/dist/components/switch.css +78 -39
- package/dist/components/switch.d.mts +2 -0
- package/dist/components/table.css +54 -32
- package/dist/components/table.d.mts +2 -0
- package/dist/components/tabs.css +53 -32
- package/dist/components/tabs.d.mts +2 -0
- package/dist/components/tag-input.css +12 -8
- package/dist/components/tag-input.d.mts +2 -0
- package/dist/components/tag.css +20 -12
- package/dist/components/tag.d.mts +2 -0
- package/dist/components/theme-switcher.css +7 -7
- package/dist/components/theme-switcher.d.mts +2 -0
- package/dist/components/timeline.d.mts +2 -0
- package/dist/components/toast.css +34 -30
- package/dist/components/toast.d.mts +2 -0
- package/dist/components/toolbar.css +19 -18
- package/dist/components/toolbar.d.mts +2 -0
- package/dist/components/tooltip.css +9 -8
- package/dist/components/tooltip.d.mts +2 -0
- package/dist/components/tree-select.css +63 -40
- package/dist/components/tree-select.d.mts +2 -0
- package/dist/components/tree.d.mts +2 -0
- package/dist/components/upload.css +9 -11
- package/dist/components/upload.d.mts +2 -0
- package/dist/index.d.mts +85 -84
- package/dist/index.mjs +14644 -13935
- package/dist/react.d.mts +18 -18
- package/dist/react.mjs +377 -36
- package/dist/registry.json +797 -64
- package/dist/tokens/colors.css +6 -0
- package/dist/tokens/design.css +137 -31
- package/dist/tokens/dtcg.json +9592 -2008
- package/dist/tokens/figma.variables.json +7451 -2141
- package/dist/tokens/motion.css +51 -0
- package/dist/tokens/pixel.css +10 -0
- package/dist/tokens/scrollbars.css +40 -0
- package/dist/tokens/tokens-studio.json +8390 -1142
- package/dist/tokens/typography.css +33 -0
- package/dist/tokens.css +402 -82
- package/dist/ui.css +4196 -2163
- package/dist/vue.d.mts +17 -17
- package/dist/vue.mjs +371 -34
- package/docs/spec/charts-scale-a11y.md +115 -0
- package/docs/spec/design-philosophy.md +5 -5
- package/docs/spec/design-primitives.md +10 -10
- package/docs/spec/motion-typography.md +105 -0
- package/docs/spec/scrollbars.md +46 -0
- package/package.json +17 -3
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
|
|
25
25
|
/* ── 开关 ── */
|
|
26
26
|
.icen-switch {
|
|
27
|
-
--switch-w:
|
|
28
|
-
--switch-h:
|
|
29
|
-
--switch-thumb:
|
|
27
|
+
--switch-w: 38px;
|
|
28
|
+
--switch-h: 22px;
|
|
29
|
+
--switch-thumb: 18px;
|
|
30
30
|
position: relative;
|
|
31
31
|
display: inline-flex;
|
|
32
32
|
flex-shrink: 0;
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
padding: 0;
|
|
36
36
|
border: none;
|
|
37
37
|
border-radius: var(--icen-radius-full);
|
|
38
|
-
background: var(--icen-token-
|
|
38
|
+
background: var(--icen-token-fill-2);
|
|
39
39
|
cursor: pointer;
|
|
40
40
|
-webkit-tap-highlight-color: transparent;
|
|
41
41
|
transition: background-color var(--icen-tx-normal);
|
|
42
42
|
}
|
|
43
43
|
.icen-switch[aria-checked='true'] {
|
|
44
|
-
background: var(--icen-token-accent);
|
|
44
|
+
background: var(--icen-token-accent-strong);
|
|
45
45
|
}
|
|
46
46
|
.icen-switch:disabled,
|
|
47
47
|
.icen-switch[aria-disabled='true'],
|
|
@@ -57,26 +57,30 @@
|
|
|
57
57
|
.icen-switch-thumb {
|
|
58
58
|
position: absolute;
|
|
59
59
|
top: 50%;
|
|
60
|
-
left: calc((var(--switch-h) - var(--switch-thumb)) / 2); /* guard:allow-physical 开关是物理隐喻控件(
|
|
60
|
+
left: calc((var(--switch-h) - var(--switch-thumb)) / 2); /* guard:allow-physical 开关是物理隐喻控件(RTL 下开/关方向保持物理,不镜像) */
|
|
61
61
|
transform: translateY(-50%);
|
|
62
62
|
width: var(--switch-thumb);
|
|
63
63
|
height: var(--switch-thumb);
|
|
64
64
|
border-radius: var(--icen-radius-full);
|
|
65
|
-
background: var(--icen-token-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
background: var(--icen-token-surface);
|
|
66
|
+
border: 0;
|
|
67
|
+
box-shadow:
|
|
68
|
+
0 0 0 .5px color-mix(in srgb, var(--icen-token-text) 16%, transparent),
|
|
69
|
+
0 1px 2px color-mix(in srgb, var(--icen-design-shadow-color) 22%, transparent),
|
|
70
|
+
0 2px 6px -2px color-mix(in srgb, var(--icen-design-shadow-color) 18%, transparent);
|
|
71
|
+
transition: transform var(--icen-duration-normal) var(--icen-ease-out);
|
|
68
72
|
}
|
|
69
73
|
.icen-switch[aria-checked='true'] .icen-switch-thumb {
|
|
70
74
|
transform: translateY(-50%) translateX(calc(var(--switch-w) - var(--switch-h))); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
/* 尺寸变体 */
|
|
74
|
-
.icen-switch--sm { --switch-w:
|
|
75
|
-
.icen-switch--lg { --switch-w:
|
|
78
|
+
.icen-switch--sm { --switch-w: 32px; --switch-h: 18px; --switch-thumb: 14px; }
|
|
79
|
+
.icen-switch--lg { --switch-w: 46px; --switch-h: 26px; --switch-thumb: 22px; }
|
|
76
80
|
|
|
77
81
|
/* ── 勾选框(✓ 与半选横条均 ::before 自绘) ── */
|
|
78
82
|
.icen-checkbox {
|
|
79
|
-
--checkbox-size:
|
|
83
|
+
--checkbox-size: 15px;
|
|
80
84
|
display: inline-flex;
|
|
81
85
|
align-items: center;
|
|
82
86
|
justify-content: center;
|
|
@@ -86,8 +90,8 @@
|
|
|
86
90
|
padding: 0;
|
|
87
91
|
background: var(--icen-token-control);
|
|
88
92
|
color: transparent;
|
|
89
|
-
border: 1px solid var(--icen-token-
|
|
90
|
-
border-radius: var(--icen-radius-
|
|
93
|
+
border: 1px solid var(--icen-token-control-border);
|
|
94
|
+
border-radius: var(--icen-radius-xs);
|
|
91
95
|
cursor: pointer;
|
|
92
96
|
-webkit-tap-highlight-color: transparent;
|
|
93
97
|
transition:
|
|
@@ -97,7 +101,7 @@
|
|
|
97
101
|
box-shadow var(--icen-tx-fast);
|
|
98
102
|
}
|
|
99
103
|
.icen-checkbox:hover:not([aria-checked='true']):not([aria-checked='mixed']):not(:disabled) {
|
|
100
|
-
border-color:
|
|
104
|
+
border-color: var(--icen-token-control-border-hover);
|
|
101
105
|
}
|
|
102
106
|
.icen-checkbox[aria-checked='true'],
|
|
103
107
|
.icen-checkbox[aria-checked='mixed'] {
|
|
@@ -107,20 +111,21 @@
|
|
|
107
111
|
}
|
|
108
112
|
.icen-checkbox::before {
|
|
109
113
|
content: '';
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
inline-size: 11px;
|
|
115
|
+
block-size: 11px;
|
|
112
116
|
background: currentColor;
|
|
113
117
|
opacity: 0;
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
mask: var(--icen-token-icon-check) center / contain no-repeat;
|
|
119
|
+
-webkit-mask: var(--icen-token-icon-check) center / contain no-repeat;
|
|
120
|
+
transition: opacity var(--icen-duration-fast) var(--icen-ease-out);
|
|
116
121
|
}
|
|
117
122
|
.icen-checkbox[aria-checked='true']::before { opacity: 1; }
|
|
118
123
|
.icen-checkbox[aria-checked='mixed']::before {
|
|
119
124
|
opacity: 1;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
inline-size: 9px;
|
|
126
|
+
block-size: 9px;
|
|
127
|
+
mask-image: var(--icen-token-icon-minus);
|
|
128
|
+
-webkit-mask-image: var(--icen-token-icon-minus);
|
|
124
129
|
}
|
|
125
130
|
.icen-checkbox:disabled,
|
|
126
131
|
.icen-checkbox[aria-disabled='true'],
|
|
@@ -133,8 +138,8 @@
|
|
|
133
138
|
box-shadow: var(--icen-ring);
|
|
134
139
|
}
|
|
135
140
|
|
|
136
|
-
.icen-checkbox--sm { --checkbox-size:
|
|
137
|
-
.icen-checkbox--lg { --checkbox-size:
|
|
141
|
+
.icen-checkbox--sm { --checkbox-size: 13px; }
|
|
142
|
+
.icen-checkbox--lg { --checkbox-size: 18px; }
|
|
138
143
|
|
|
139
144
|
/* ── 单选行(radio item:整行可点) ── */
|
|
140
145
|
.icen-radio-group {
|
|
@@ -148,13 +153,14 @@
|
|
|
148
153
|
align-items: center;
|
|
149
154
|
gap: var(--icen-density-space-sm);
|
|
150
155
|
width: 100%;
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
min-block-size: calc(var(--icen-control-height-sm) + 2px);
|
|
157
|
+
padding: var(--icen-density-space-xs) var(--icen-density-space-sm);
|
|
158
|
+
font-size: var(--icen-font-size-control);
|
|
153
159
|
text-align: start;
|
|
154
160
|
border: 1px solid transparent;
|
|
155
161
|
background: transparent;
|
|
156
162
|
color: var(--icen-token-text);
|
|
157
|
-
border-radius: var(--icen-radius
|
|
163
|
+
border-radius: var(--icen-control-radius);
|
|
158
164
|
cursor: pointer;
|
|
159
165
|
-webkit-tap-highlight-color: transparent;
|
|
160
166
|
transition:
|
|
@@ -163,14 +169,14 @@
|
|
|
163
169
|
border-color var(--icen-tx-fast);
|
|
164
170
|
}
|
|
165
171
|
.icen-radio-item:hover:not(.is-disabled) {
|
|
166
|
-
background: var(--icen-token-fill-
|
|
172
|
+
background: var(--icen-token-fill-hover);
|
|
167
173
|
}
|
|
168
174
|
.icen-radio-item.is-selected,
|
|
169
175
|
.icen-radio-item[aria-checked='true'] {
|
|
170
176
|
background: var(--icen-token-accent-subtle);
|
|
171
|
-
color: var(--icen-token-
|
|
177
|
+
color: var(--icen-token-text);
|
|
172
178
|
font-weight: 500;
|
|
173
|
-
border-color:
|
|
179
|
+
border-color: transparent;
|
|
174
180
|
}
|
|
175
181
|
.icen-radio-item:focus-visible {
|
|
176
182
|
outline: none;
|
|
@@ -185,26 +191,26 @@
|
|
|
185
191
|
|
|
186
192
|
.icen-radio-dot {
|
|
187
193
|
position: relative;
|
|
188
|
-
width:
|
|
189
|
-
height:
|
|
194
|
+
width: 15px;
|
|
195
|
+
height: 15px;
|
|
190
196
|
flex-shrink: 0;
|
|
191
|
-
border: 1px solid var(--icen-token-
|
|
197
|
+
border: 1px solid var(--icen-token-control-border);
|
|
192
198
|
border-radius: var(--icen-radius-full);
|
|
193
199
|
background: var(--icen-token-control);
|
|
194
200
|
transition: border-color var(--icen-tx-fast);
|
|
195
201
|
}
|
|
196
202
|
.icen-radio-item.is-selected .icen-radio-dot,
|
|
197
|
-
.icen-radio-item[aria-checked='true'] .icen-radio-dot { border-color: var(--icen-token-accent); }
|
|
203
|
+
.icen-radio-item[aria-checked='true'] .icen-radio-dot { border-color: var(--icen-token-accent-strong); }
|
|
198
204
|
.icen-radio-dot::after {
|
|
199
205
|
content: '';
|
|
200
206
|
position: absolute;
|
|
201
207
|
top: 50%; left: 50%; /* guard:allow-physical 圆心居中:left 50% + translate(-50%) 任意方向下均为圆心 */
|
|
202
|
-
width:
|
|
203
|
-
height:
|
|
208
|
+
width: 7px;
|
|
209
|
+
height: 7px;
|
|
204
210
|
border-radius: var(--icen-radius-full);
|
|
205
|
-
background: var(--icen-token-accent);
|
|
211
|
+
background: var(--icen-token-accent-strong);
|
|
206
212
|
transform: translate(-50%, -50%) scale(0);
|
|
207
|
-
transition: transform var(--icen-
|
|
213
|
+
transition: transform var(--icen-duration-fast) var(--icen-ease-out);
|
|
208
214
|
}
|
|
209
215
|
.icen-radio-item.is-selected .icen-radio-dot::after,
|
|
210
216
|
.icen-radio-item[aria-checked='true'] .icen-radio-dot::after {
|
|
@@ -353,4 +359,37 @@
|
|
|
353
359
|
.icen-radio-card { transition: none; }
|
|
354
360
|
}
|
|
355
361
|
|
|
362
|
+
/* 高对比模式:开关/勾选/单选靠底色与 mask 表达状态,强制颜色会抹平——
|
|
363
|
+
用系统高亮色 + forced-color-adjust:none 保住「开/关」的可辨差异。 */
|
|
364
|
+
@media (forced-colors: active) {
|
|
365
|
+
.icen-switch {
|
|
366
|
+
border: 1px solid CanvasText;
|
|
367
|
+
background: Canvas;
|
|
368
|
+
}
|
|
369
|
+
.icen-switch[aria-checked='true'] {
|
|
370
|
+
forced-color-adjust: none;
|
|
371
|
+
background: Highlight;
|
|
372
|
+
border-color: Highlight;
|
|
373
|
+
}
|
|
374
|
+
.icen-switch-thumb {
|
|
375
|
+
forced-color-adjust: none;
|
|
376
|
+
background: CanvasText;
|
|
377
|
+
border: 1px solid Canvas;
|
|
378
|
+
}
|
|
379
|
+
.icen-switch[aria-checked='true'] .icen-switch-thumb { background: HighlightText; }
|
|
380
|
+
.icen-checkbox[aria-checked='true'],
|
|
381
|
+
.icen-checkbox[aria-checked='mixed'] {
|
|
382
|
+
forced-color-adjust: none;
|
|
383
|
+
background: Highlight;
|
|
384
|
+
border-color: Highlight;
|
|
385
|
+
color: HighlightText;
|
|
386
|
+
}
|
|
387
|
+
.icen-checkbox::before { forced-color-adjust: none; background: HighlightText; }
|
|
388
|
+
.icen-radio-dot::after { forced-color-adjust: none; background: Highlight; }
|
|
389
|
+
.icen-radio-item.is-selected,
|
|
390
|
+
.icen-radio-item[aria-checked='true'] { outline: 1px solid Highlight; outline-offset: -1px; }
|
|
391
|
+
.icen-radio-card.is-selected,
|
|
392
|
+
.icen-radio-card[aria-checked='true'] { border-color: Highlight; }
|
|
393
|
+
}
|
|
394
|
+
|
|
356
395
|
}
|
|
@@ -33,38 +33,37 @@
|
|
|
33
33
|
.icen-table-wrap {
|
|
34
34
|
overflow-x: auto;
|
|
35
35
|
overscroll-behavior: contain;
|
|
36
|
-
border-radius: var(--icen-radius-lg);
|
|
36
|
+
border-radius: var(--icen-control-radius-lg);
|
|
37
37
|
}
|
|
38
38
|
.icen-table-wrap--bordered {
|
|
39
|
-
border: 1px solid var(--icen-token-
|
|
39
|
+
border: 1px solid var(--icen-token-separator-soft);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.icen-table {
|
|
43
43
|
inline-size: 100%;
|
|
44
44
|
border-collapse: collapse;
|
|
45
|
-
font-size: var(--icen-
|
|
45
|
+
font-size: var(--icen-font-size-control);
|
|
46
46
|
font-variant-numeric: tabular-nums;
|
|
47
47
|
}
|
|
48
48
|
.icen-table th,
|
|
49
49
|
.icen-table td {
|
|
50
|
-
padding:
|
|
50
|
+
padding: 6px 10px;
|
|
51
51
|
text-align: start;
|
|
52
52
|
}
|
|
53
53
|
.icen-table th {
|
|
54
54
|
font-weight: 600;
|
|
55
|
-
font-size: var(--icen-
|
|
56
|
-
letter-spacing:
|
|
57
|
-
color: var(--icen-token-text-
|
|
58
|
-
border-bottom: 1px solid var(--icen-token-
|
|
55
|
+
font-size: var(--icen-font-size-caption);
|
|
56
|
+
letter-spacing: var(--icen-letter-spacing-caption);
|
|
57
|
+
color: var(--icen-token-text-muted);
|
|
58
|
+
border-bottom: 1px solid var(--icen-token-separator);
|
|
59
59
|
white-space: nowrap;
|
|
60
|
-
|
|
61
|
-
background: var(--icen-token-bg-soft);
|
|
60
|
+
background: var(--icen-token-surface-chrome);
|
|
62
61
|
position: sticky;
|
|
63
62
|
top: 0;
|
|
64
63
|
z-index: var(--icen-z-raised);
|
|
65
64
|
}
|
|
66
65
|
.icen-table td {
|
|
67
|
-
border-bottom: 1px solid var(--icen-token-
|
|
66
|
+
border-bottom: 1px solid var(--icen-token-separator-soft);
|
|
68
67
|
vertical-align: middle;
|
|
69
68
|
color: var(--icen-token-text);
|
|
70
69
|
}
|
|
@@ -73,29 +72,29 @@
|
|
|
73
72
|
transition: background-color var(--icen-tx-fast);
|
|
74
73
|
}
|
|
75
74
|
.icen-table tbody tr:hover {
|
|
76
|
-
background: var(--icen-token-
|
|
75
|
+
background: var(--icen-token-fill-hover);
|
|
77
76
|
}
|
|
78
77
|
.icen-table tbody tr.icen-row-link {
|
|
79
78
|
cursor: pointer;
|
|
80
79
|
}
|
|
81
80
|
.icen-table tbody tr.is-selected {
|
|
82
|
-
background: var(--icen-token-
|
|
81
|
+
background: var(--icen-token-fill-selected);
|
|
83
82
|
}
|
|
84
83
|
.icen-table tfoot td {
|
|
85
|
-
border-top: 1px solid var(--icen-token-
|
|
84
|
+
border-top: 1px solid var(--icen-token-separator);
|
|
86
85
|
border-bottom: 0;
|
|
87
86
|
font-weight: 500;
|
|
88
|
-
background: var(--icen-token-
|
|
87
|
+
background: var(--icen-token-surface-chrome);
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
/* 紧凑变体 */
|
|
92
91
|
.icen-table--compact th,
|
|
93
92
|
.icen-table--compact td {
|
|
94
|
-
padding:
|
|
93
|
+
padding: 4px 8px;
|
|
95
94
|
}
|
|
96
95
|
.icen-table--dense th,
|
|
97
96
|
.icen-table--dense td {
|
|
98
|
-
padding:
|
|
97
|
+
padding: 2px 6px;
|
|
99
98
|
font-size: var(--icen-density-font-size-sm);
|
|
100
99
|
}
|
|
101
100
|
|
|
@@ -150,18 +149,20 @@
|
|
|
150
149
|
mask: var(--icen-token-icon-arrow-down) center / contain no-repeat; opacity: 1; color: var(--icen-token-accent); }
|
|
151
150
|
|
|
152
151
|
/* ── 斑马纹 ── */
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
/* :not 守卫:斑马纹与状态行同为行级背景,后写同特异性会盖掉选中/状态色
|
|
153
|
+
( datatable.css 同款口径) */
|
|
154
|
+
.icen-table--zebra tbody tr:nth-child(odd):not(.is-selected):not(.icen-row-success, .icen-row-warning, .icen-row-error) {
|
|
155
|
+
background: color-mix(in srgb, var(--icen-token-fill-hover) 55%, transparent);
|
|
155
156
|
}
|
|
156
|
-
.icen-table--zebra tbody tr:hover {
|
|
157
|
-
background: var(--icen-token-
|
|
157
|
+
.icen-table--zebra tbody tr:hover:not(.is-selected):not(.icen-row-success, .icen-row-warning, .icen-row-error) {
|
|
158
|
+
background: var(--icen-token-fill-hover);
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
/* ── 表格标题(caption) ── */
|
|
161
162
|
.icen-table-caption {
|
|
162
163
|
text-align: start;
|
|
163
|
-
padding:
|
|
164
|
-
font-size: var(--icen-
|
|
164
|
+
padding: 8px 10px;
|
|
165
|
+
font-size: var(--icen-font-size-control);
|
|
165
166
|
font-weight: 600;
|
|
166
167
|
color: var(--icen-token-text);
|
|
167
168
|
caption-side: top;
|
|
@@ -173,21 +174,30 @@
|
|
|
173
174
|
position: sticky;
|
|
174
175
|
inset-inline-start: 0;
|
|
175
176
|
z-index: calc(var(--icen-z-raised) + 1);
|
|
176
|
-
background: var(--icen-token-
|
|
177
|
-
box-shadow:
|
|
177
|
+
background: var(--icen-token-surface-chrome);
|
|
178
|
+
box-shadow: 1px 0 0 var(--icen-token-separator-soft);
|
|
178
179
|
}
|
|
179
180
|
.icen-table--sticky-col tbody td.icen-col-fixed {
|
|
180
181
|
background: var(--icen-token-surface);
|
|
181
182
|
}
|
|
183
|
+
/* 粘滞列是不透明面:选中/斑马/状态的行级底色透不上来,需在此重铺,
|
|
184
|
+
否则整行只有粘滞列一格「没被选中」,读起来像半选 */
|
|
185
|
+
.icen-table--sticky-col tbody tr.is-selected td.icen-col-fixed,
|
|
186
|
+
.icen-table--sticky-col tbody tr.is-selected th:first-child {
|
|
187
|
+
background: color-mix(in srgb, var(--icen-token-accent) 13%, var(--icen-token-surface));
|
|
188
|
+
}
|
|
189
|
+
.icen-table--sticky-col tbody tr.icen-row-success td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-success) 6%, var(--icen-token-surface)); }
|
|
190
|
+
.icen-table--sticky-col tbody tr.icen-row-warning td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-warning) 6%, var(--icen-token-surface)); }
|
|
191
|
+
.icen-table--sticky-col tbody tr.icen-row-error td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-error) 6%, var(--icen-token-surface)); }
|
|
182
192
|
.icen-table--sticky-col tbody tr:hover td.icen-col-fixed {
|
|
183
|
-
background: var(--icen-token-
|
|
193
|
+
background: color-mix(in srgb, var(--icen-token-fill-hover) 65%, var(--icen-token-surface));
|
|
184
194
|
}
|
|
185
195
|
|
|
186
196
|
/* ── 展开行 ── */
|
|
187
197
|
.icen-table .icen-row-expand > td {
|
|
188
|
-
padding: 0
|
|
189
|
-
background: var(--icen-token-
|
|
190
|
-
border-bottom: 1px solid var(--icen-token-
|
|
198
|
+
padding: 0 10px;
|
|
199
|
+
background: var(--icen-token-surface-chrome);
|
|
200
|
+
border-bottom: 1px solid var(--icen-token-separator-soft);
|
|
191
201
|
font-size: var(--icen-density-font-size-sm);
|
|
192
202
|
color: var(--icen-token-text-muted);
|
|
193
203
|
}
|
|
@@ -195,7 +205,7 @@
|
|
|
195
205
|
/* 展开行的内容容器(使用方可加 padding/动画) */
|
|
196
206
|
.icen-row-expand-content {
|
|
197
207
|
padding: var(--icen-density-space-sm) 0;
|
|
198
|
-
animation: row-expand-in var(--icen-
|
|
208
|
+
animation: row-expand-in var(--icen-duration-fast) var(--icen-ease-out);
|
|
199
209
|
}
|
|
200
210
|
@keyframes row-expand-in {
|
|
201
211
|
from { opacity: 0; transform: translateY(-4px); }
|
|
@@ -212,9 +222,9 @@
|
|
|
212
222
|
.icen-table tbody tr.icen-row-warning { background: color-mix(in srgb, var(--icen-token-warning) 6%, transparent); }
|
|
213
223
|
.icen-table tbody tr.icen-row-error { background: color-mix(in srgb, var(--icen-token-error) 6%, transparent); }
|
|
214
224
|
|
|
215
|
-
/* ──
|
|
225
|
+
/* ── 粘滞表头提示:底部 1px 分隔已足够,不再叠阴影 ── */
|
|
216
226
|
.icen-table thead th {
|
|
217
|
-
box-shadow:
|
|
227
|
+
box-shadow: none;
|
|
218
228
|
}
|
|
219
229
|
|
|
220
230
|
/* ── 表头分组(rowspan/colspan 样式) ── */
|
|
@@ -224,4 +234,16 @@
|
|
|
224
234
|
.icen-row-expand-content { animation: none; }
|
|
225
235
|
}
|
|
226
236
|
|
|
237
|
+
/* 高对比模式:选中行/语义行不能只靠底色差 */
|
|
238
|
+
@media (forced-colors: active) {
|
|
239
|
+
.icen-table tbody tr.is-selected {
|
|
240
|
+
background: Highlight;
|
|
241
|
+
color: HighlightText;
|
|
242
|
+
}
|
|
243
|
+
.icen-table tbody tr.is-selected :is(td, th) { color: HighlightText; }
|
|
244
|
+
.icen-table tbody tr.icen-row-success,
|
|
245
|
+
.icen-table tbody tr.icen-row-warning,
|
|
246
|
+
.icen-table tbody tr.icen-row-error { border-inline-start: 2px solid CanvasText; }
|
|
247
|
+
}
|
|
248
|
+
|
|
227
249
|
}
|
package/dist/components/tabs.css
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
display: flex;
|
|
20
20
|
gap: 2px;
|
|
21
21
|
flex-wrap: wrap;
|
|
22
|
-
border-bottom: 1px solid var(--icen-token-
|
|
22
|
+
border-bottom: 1px solid var(--icen-token-separator-soft);
|
|
23
23
|
margin-bottom: var(--icen-density-space-lg);
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -27,20 +27,24 @@
|
|
|
27
27
|
background: none;
|
|
28
28
|
border: 0;
|
|
29
29
|
cursor: pointer;
|
|
30
|
-
padding: var(--icen-density-space-sm)
|
|
31
|
-
font-family: var(--icen-font-
|
|
32
|
-
font-size: var(--icen-
|
|
33
|
-
|
|
30
|
+
padding: 6px var(--icen-density-space-sm);
|
|
31
|
+
font-family: var(--icen-font-body);
|
|
32
|
+
font-size: var(--icen-font-size-control);
|
|
33
|
+
font-weight: var(--icen-font-weight-control);
|
|
34
|
+
letter-spacing: 0;
|
|
34
35
|
color: var(--icen-token-text-muted);
|
|
35
36
|
border-bottom: 2px solid transparent;
|
|
36
37
|
margin-bottom: -1px;
|
|
38
|
+
border-radius: var(--icen-radius-xs) var(--icen-radius-xs) 0 0;
|
|
37
39
|
white-space: nowrap;
|
|
38
40
|
transition:
|
|
39
41
|
color var(--icen-tx-fast),
|
|
42
|
+
background-color var(--icen-tx-fast),
|
|
40
43
|
border-color var(--icen-tx-fast);
|
|
41
44
|
}
|
|
42
45
|
.icen-page-tab:hover {
|
|
43
|
-
color: var(--icen-token-
|
|
46
|
+
color: var(--icen-token-text);
|
|
47
|
+
background: var(--icen-token-fill-hover);
|
|
44
48
|
}
|
|
45
49
|
.icen-page-tab:focus-visible {
|
|
46
50
|
outline: none;
|
|
@@ -49,14 +53,15 @@
|
|
|
49
53
|
}
|
|
50
54
|
.icen-page-tab.is-active,
|
|
51
55
|
.icen-page-tab[aria-selected='true'] {
|
|
52
|
-
color: var(--icen-token-
|
|
56
|
+
color: var(--icen-token-text);
|
|
53
57
|
border-bottom-color: var(--icen-token-accent);
|
|
54
|
-
font-weight:
|
|
58
|
+
font-weight: 600;
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
.icen-tabs a {
|
|
58
|
-
padding: var(--icen-density-space-sm)
|
|
59
|
-
font-size: var(--icen-
|
|
62
|
+
padding: 6px var(--icen-density-space-sm);
|
|
63
|
+
font-size: var(--icen-font-size-control);
|
|
64
|
+
font-weight: var(--icen-font-weight-control);
|
|
60
65
|
color: var(--icen-token-text-muted);
|
|
61
66
|
border-bottom: 2px solid transparent;
|
|
62
67
|
margin-bottom: -1px;
|
|
@@ -67,7 +72,7 @@
|
|
|
67
72
|
border-color var(--icen-tx-fast);
|
|
68
73
|
}
|
|
69
74
|
.icen-tabs a:hover {
|
|
70
|
-
color: var(--icen-token-
|
|
75
|
+
color: var(--icen-token-text);
|
|
71
76
|
text-decoration: none;
|
|
72
77
|
}
|
|
73
78
|
.icen-tabs a:focus-visible {
|
|
@@ -89,16 +94,18 @@
|
|
|
89
94
|
}
|
|
90
95
|
.icen-tabs--cards .icen-page-tab {
|
|
91
96
|
padding: var(--icen-density-space-xs) var(--icen-density-space-md);
|
|
92
|
-
border: 1px solid var(--icen-token-
|
|
97
|
+
border: 1px solid var(--icen-token-control-border);
|
|
93
98
|
border-radius: var(--icen-radius-full);
|
|
94
99
|
margin-bottom: 0;
|
|
100
|
+
color: var(--icen-token-text-muted);
|
|
101
|
+
background: var(--icen-token-control);
|
|
95
102
|
}
|
|
96
103
|
.icen-tabs--cards .icen-page-tab.is-active,
|
|
97
104
|
.icen-tabs--cards .icen-page-tab[aria-selected='true'] {
|
|
98
|
-
background: var(--icen-token-accent-
|
|
99
|
-
color: var(--icen-token-
|
|
100
|
-
border-color: var(--icen-token-accent-
|
|
101
|
-
font-weight:
|
|
105
|
+
background: var(--icen-token-accent-subtle);
|
|
106
|
+
color: var(--icen-token-text);
|
|
107
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 28%, var(--icen-token-line-soft));
|
|
108
|
+
font-weight: 600;
|
|
102
109
|
}
|
|
103
110
|
|
|
104
111
|
/* 等宽变体:tab 平均占满容器 */
|
|
@@ -112,11 +119,11 @@
|
|
|
112
119
|
|
|
113
120
|
/* 尺寸变体 */
|
|
114
121
|
.icen-tabs--sm .icen-page-tab {
|
|
115
|
-
padding:
|
|
122
|
+
padding: 4px var(--icen-density-space-sm);
|
|
116
123
|
font-size: var(--icen-density-font-size-sm);
|
|
117
124
|
}
|
|
118
125
|
.icen-tabs--lg .icen-page-tab {
|
|
119
|
-
padding:
|
|
126
|
+
padding: 8px calc(var(--icen-density-space-md) + 2px);
|
|
120
127
|
font-size: var(--icen-density-font-size-lg);
|
|
121
128
|
}
|
|
122
129
|
|
|
@@ -156,8 +163,8 @@
|
|
|
156
163
|
display: inline-flex;
|
|
157
164
|
align-items: center;
|
|
158
165
|
justify-content: center;
|
|
159
|
-
width: 16px
|
|
160
|
-
height:
|
|
166
|
+
width: 24px; /* WCAG 2.5.8 下限:16px 关闭钮过小(svg 视觉仍 10px) */
|
|
167
|
+
height: 24px;
|
|
161
168
|
margin-inline-start: var(--icen-density-space-xs);
|
|
162
169
|
margin-inline-end: -4px;
|
|
163
170
|
padding: 0;
|
|
@@ -172,6 +179,10 @@
|
|
|
172
179
|
color: var(--icen-token-error);
|
|
173
180
|
background: var(--icen-token-error-muted);
|
|
174
181
|
}
|
|
182
|
+
.icen-page-tab-close:focus-visible {
|
|
183
|
+
outline: none;
|
|
184
|
+
box-shadow: var(--icen-ring); /* 与 .icen-page-tab 同款系统环(缺省会落回浏览器默认蓝圈) */
|
|
185
|
+
}
|
|
175
186
|
.icen-page-tab-close svg { width: 10px; height: 10px; }
|
|
176
187
|
|
|
177
188
|
/* 分段式 tab(替代底边线,用 segmented 视觉) */
|
|
@@ -179,31 +190,35 @@
|
|
|
179
190
|
display: inline-flex;
|
|
180
191
|
border-bottom: none;
|
|
181
192
|
gap: 2px;
|
|
182
|
-
padding:
|
|
183
|
-
background: var(--icen-token-
|
|
184
|
-
border: 1px solid var(--icen-token-
|
|
185
|
-
border-radius: var(--icen-radius-
|
|
186
|
-
box-shadow: var(--icen-token-shadow-
|
|
193
|
+
padding: 3px;
|
|
194
|
+
background: var(--icen-token-surface-raised);
|
|
195
|
+
border: 1px solid var(--icen-token-control-border);
|
|
196
|
+
border-radius: var(--icen-control-radius-lg);
|
|
197
|
+
box-shadow: var(--icen-token-shadow-field);
|
|
187
198
|
}
|
|
188
199
|
.icen-tabs--segment .icen-page-tab {
|
|
189
200
|
border-bottom: none;
|
|
190
201
|
margin-bottom: 0;
|
|
191
|
-
|
|
192
|
-
|
|
202
|
+
min-block-size: calc(var(--icen-control-height-sm) - 8px);
|
|
203
|
+
padding: 0 var(--icen-control-padding-inline-sm);
|
|
204
|
+
border-radius: max(0px, calc(var(--icen-control-radius-lg) - 3px));
|
|
193
205
|
}
|
|
194
206
|
.icen-tabs--segment .icen-page-tab.is-active,
|
|
195
207
|
.icen-tabs--segment .icen-page-tab[aria-selected='true'] {
|
|
196
|
-
background: var(--icen-token-
|
|
197
|
-
color: var(--icen-token-
|
|
198
|
-
border-
|
|
199
|
-
|
|
208
|
+
background: var(--icen-token-surface);
|
|
209
|
+
color: var(--icen-token-text);
|
|
210
|
+
border: 1px solid color-mix(in srgb, var(--icen-token-line) 72%, transparent);
|
|
211
|
+
margin: -1px;
|
|
212
|
+
border-bottom-color: color-mix(in srgb, var(--icen-token-line) 72%, transparent);
|
|
213
|
+
font-weight: var(--icen-font-weight-control);
|
|
214
|
+
box-shadow: var(--icen-token-shadow-control);
|
|
200
215
|
}
|
|
201
216
|
|
|
202
217
|
/* 垂直 tab(侧栏式):轨道与指示条在 inline-end 侧,RTL 自动镜像到左缘 */
|
|
203
218
|
.icen-tabs--vertical {
|
|
204
219
|
flex-direction: column;
|
|
205
220
|
border-bottom: none;
|
|
206
|
-
border-inline-end: 1px solid var(--icen-token-
|
|
221
|
+
border-inline-end: 1px solid var(--icen-token-separator-soft);
|
|
207
222
|
margin-bottom: 0;
|
|
208
223
|
min-inline-size: 160px;
|
|
209
224
|
}
|
|
@@ -212,11 +227,17 @@
|
|
|
212
227
|
border-inline-end: 2px solid transparent;
|
|
213
228
|
margin-bottom: 0;
|
|
214
229
|
margin-inline-end: -1px;
|
|
230
|
+
border-start-start-radius: var(--icen-radius-xs);
|
|
231
|
+
border-end-start-radius: var(--icen-radius-xs);
|
|
232
|
+
min-block-size: var(--icen-control-height-sm);
|
|
233
|
+
text-align: start;
|
|
234
|
+
justify-content: flex-start;
|
|
215
235
|
}
|
|
216
236
|
.icen-tabs--vertical .icen-page-tab.is-active,
|
|
217
237
|
.icen-tabs--vertical .icen-page-tab[aria-selected='true'] {
|
|
218
238
|
border-inline-end-color: var(--icen-token-accent);
|
|
219
239
|
border-bottom-color: transparent;
|
|
240
|
+
background: var(--icen-token-fill-selected);
|
|
220
241
|
}
|
|
221
242
|
|
|
222
243
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -7,27 +7,27 @@
|
|
|
7
7
|
* is-max is a capacity state, is-unavailable follows actual disabled state.
|
|
8
8
|
*/
|
|
9
9
|
.icen-tag-input {
|
|
10
|
-
--tag-action-size: calc(var(--icen-
|
|
10
|
+
--tag-action-size: calc(var(--icen-control-height-md) - 10px);
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-wrap: wrap;
|
|
13
13
|
align-items: center;
|
|
14
14
|
gap: var(--icen-density-space-xs);
|
|
15
15
|
padding: var(--icen-density-space-xs);
|
|
16
|
-
min-block-size: var(--icen-
|
|
16
|
+
min-block-size: var(--icen-control-height-md);
|
|
17
17
|
background: var(--icen-token-control);
|
|
18
|
-
border:
|
|
19
|
-
border-radius: var(--icen-radius
|
|
20
|
-
box-shadow: var(--icen-token-shadow-
|
|
18
|
+
border: var(--icen-control-border-width) solid var(--icen-token-control-border);
|
|
19
|
+
border-radius: var(--icen-control-radius);
|
|
20
|
+
box-shadow: var(--icen-token-shadow-field);
|
|
21
21
|
transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
|
|
22
22
|
}
|
|
23
23
|
.icen-tag-input:focus-within { border-color: var(--icen-control-focus-border); box-shadow: var(--icen-control-focus-shadow); }
|
|
24
|
-
.icen-tag-input--sm { --tag-action-size: calc(var(--icen-
|
|
25
|
-
.icen-tag-input--lg { --tag-action-size: calc(var(--icen-
|
|
24
|
+
.icen-tag-input--sm { --tag-action-size: calc(var(--icen-control-height-sm) - 8px); min-block-size: var(--icen-control-height-sm); }
|
|
25
|
+
.icen-tag-input--lg { --tag-action-size: calc(var(--icen-control-height-lg) - 12px); min-block-size: var(--icen-control-height-lg); }
|
|
26
26
|
.icen-tag-input:is(.is-disabled,.is-unavailable,[aria-disabled='true'],[data-icen-disabled]) { background: var(--icen-token-bg-soft); cursor: not-allowed; }
|
|
27
27
|
.icen-tag-input.is-unavailable > .icen-tag-chip { background: var(--icen-token-fill-2); color: var(--icen-token-text-muted); }
|
|
28
28
|
.icen-tag-input.is-unavailable .icen-tag-chip-x { visibility: hidden; }
|
|
29
29
|
.icen-tag-input.is-unavailable :is(.icen-tag-input-field,.icen-tag-chip-x) { cursor: not-allowed; }
|
|
30
|
-
.icen-tag-chip { display: inline-flex; align-items: center; gap: var(--icen-
|
|
30
|
+
.icen-tag-chip { display: inline-flex; align-items: center; gap: var(--icen-control-gap-sm); padding-inline-start: var(--icen-density-space-sm); border-radius: var(--icen-radius-full); background: var(--icen-token-accent-subtle); color: var(--icen-token-text); font-size: var(--icen-density-font-size-sm); font-weight: var(--icen-font-weight-control); line-height: 1.4; max-inline-size: 100%; min-inline-size: 0; animation: icen-pop-in var(--icen-tx-fast); }
|
|
31
31
|
.icen-tag-chip-label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
32
32
|
.icen-tag-chip--readonly, .is-readonly > .icen-tag-chip { background: var(--icen-token-fill-2); color: var(--icen-token-text-muted); padding-inline: var(--icen-density-space-sm); min-block-size: var(--tag-action-size); }
|
|
33
33
|
.icen-tag-chip-x { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; inline-size: var(--tag-action-size); block-size: var(--tag-action-size); padding: 0; border: 0; border-radius: var(--icen-radius-full); color: inherit; background: transparent; cursor: pointer; transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), opacity var(--icen-tx-fast); }
|
|
@@ -41,6 +41,10 @@
|
|
|
41
41
|
.icen-tag-input-count { flex: 0 0 auto; padding-inline: var(--icen-density-space-xs); color: var(--icen-token-text-muted); font-size: var(--icen-density-font-size-xs); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
|
|
42
42
|
.icen-tag-input-feedback { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
43
43
|
.icen-tag-input-feedback.is-visible { position: static; display: block; inline-size: auto; block-size: auto; margin-block-start: var(--icen-density-space-xs); overflow: visible; clip-path: none; color: var(--icen-token-text-muted); font-size: var(--icen-density-font-size-sm); }
|
|
44
|
+
/* 行为侧错误(重复 tag / 超上限)可见时必挂 aria-invalid:错误文案走 error 色、
|
|
45
|
+
边框同步,否则错误与中性提示同灰、字段看不出异常(form.css 同款口径) */
|
|
46
|
+
.icen-tag-input:has(.icen-tag-input-field[aria-invalid='true']) .icen-tag-input-feedback.is-visible { color: var(--icen-token-error); }
|
|
47
|
+
.icen-tag-input:has(.icen-tag-input-field[aria-invalid='true']) { border-color: var(--icen-token-error); }
|
|
44
48
|
@media (hover: hover) and (pointer: fine) {
|
|
45
49
|
.icen-tag-input:not(.is-unavailable):hover { border-color: var(--icen-hover-border); }
|
|
46
50
|
.icen-tag-chip-x { opacity: 0; }
|