@icen.ai/ui 0.10.0 → 0.11.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/AGENTS.md +79 -309
- package/LICENSE +21 -0
- package/README.md +43 -54
- package/dist/base.css +57 -16
- package/dist/behaviors/accordion.mjs +1 -1
- package/dist/behaviors/ai-branch.mjs +1 -0
- package/dist/behaviors/ai-chat.d.mts +2 -2
- package/dist/behaviors/ai-chat.mjs +53 -10
- package/dist/behaviors/ai-composer.d.mts +5 -5
- package/dist/behaviors/ai-composer.mjs +21 -10
- package/dist/behaviors/ai-core.mjs +1 -0
- package/dist/behaviors/ai-diff.mjs +1 -0
- package/dist/behaviors/ai-feedback.mjs +1 -0
- package/dist/behaviors/ai-panel.d.mts +2 -2
- package/dist/behaviors/ai-panel.mjs +1 -0
- package/dist/behaviors/ai-provider.d.mts +1 -1
- package/dist/behaviors/ai-provider.mjs +1 -0
- package/dist/behaviors/ai-threads.mjs +1 -0
- package/dist/behaviors/ai-tool.d.mts +1 -1
- package/dist/behaviors/ai-tool.mjs +57 -24
- package/dist/behaviors/ai-tools.mjs +937 -28
- package/dist/behaviors/autocomplete.d.mts +1 -1
- package/dist/behaviors/autocomplete.mjs +1 -0
- package/dist/behaviors/back-top.mjs +1 -0
- package/dist/behaviors/carousel.mjs +8 -1
- package/dist/behaviors/cascader.mjs +14 -0
- package/dist/behaviors/charts.mjs +56 -20
- package/dist/behaviors/code-block.mjs +9 -1
- package/dist/behaviors/command-palette.mjs +3 -3
- package/dist/behaviors/context-menu.d.mts +2 -2
- package/dist/behaviors/context-menu.mjs +1 -0
- package/dist/behaviors/controls.d.mts +8 -8
- package/dist/behaviors/controls.mjs +37 -6
- package/dist/behaviors/copy.mjs +1 -0
- package/dist/behaviors/datatable.d.mts +3 -3
- package/dist/behaviors/datatable.mjs +76 -11
- package/dist/behaviors/date-picker.mjs +1 -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 +266 -4611
- package/dist/behaviors/i18n.d.mts +1 -0
- package/dist/behaviors/i18n.mjs +2 -0
- package/dist/behaviors/input.mjs +3 -0
- package/dist/behaviors/kb-access.d.mts +2 -2
- package/dist/behaviors/kb-access.mjs +8 -2
- package/dist/behaviors/kb-acl.d.mts +2 -2
- package/dist/behaviors/kb-acl.mjs +1 -0
- package/dist/behaviors/kb-answer.d.mts +2 -2
- package/dist/behaviors/kb-answer.mjs +56 -23
- package/dist/behaviors/kb-audit.d.mts +2 -2
- package/dist/behaviors/kb-audit.mjs +1 -0
- package/dist/behaviors/kb-canvas.d.mts +3 -3
- package/dist/behaviors/kb-canvas.mjs +1 -0
- package/dist/behaviors/kb-chain.d.mts +2 -2
- package/dist/behaviors/kb-chain.mjs +1 -0
- package/dist/behaviors/kb-checkpoint.d.mts +2 -2
- package/dist/behaviors/kb-checkpoint.mjs +1 -0
- package/dist/behaviors/kb-chunks.d.mts +2 -2
- package/dist/behaviors/kb-chunks.mjs +1 -0
- package/dist/behaviors/kb-citation.d.mts +2 -2
- package/dist/behaviors/kb-citation.mjs +20 -6
- package/dist/behaviors/kb-clarify.d.mts +2 -2
- package/dist/behaviors/kb-clarify.mjs +1 -0
- package/dist/behaviors/kb-conflict.d.mts +2 -2
- package/dist/behaviors/kb-conflict.mjs +1 -0
- package/dist/behaviors/kb-connector.d.mts +2 -2
- package/dist/behaviors/kb-connector.mjs +1 -0
- package/dist/behaviors/kb-core.d.mts +1 -1
- package/dist/behaviors/kb-core.mjs +1 -0
- package/dist/behaviors/kb-eval.d.mts +2 -2
- package/dist/behaviors/kb-eval.mjs +8 -2
- package/dist/behaviors/kb-explain.d.mts +2 -2
- package/dist/behaviors/kb-explain.mjs +13 -2
- package/dist/behaviors/kb-filter.d.mts +2 -2
- package/dist/behaviors/kb-filter.mjs +8 -2
- package/dist/behaviors/kb-gap.d.mts +2 -2
- package/dist/behaviors/kb-gap.mjs +1 -0
- package/dist/behaviors/kb-hittest.d.mts +2 -2
- package/dist/behaviors/kb-hittest.mjs +2 -1
- package/dist/behaviors/kb-metadata.mjs +6 -0
- package/dist/behaviors/kb-passage.d.mts +2 -2
- package/dist/behaviors/kb-passage.mjs +1 -0
- package/dist/behaviors/kb-pipeline.d.mts +2 -2
- package/dist/behaviors/kb-pipeline.mjs +1 -0
- package/dist/behaviors/kb-qa.mjs +1 -0
- package/dist/behaviors/kb-rerank.d.mts +2 -2
- package/dist/behaviors/kb-rerank.mjs +1 -0
- package/dist/behaviors/kb-retrieval.d.mts +2 -2
- package/dist/behaviors/kb-retrieval.mjs +18 -4
- package/dist/behaviors/kb-review.d.mts +2 -2
- package/dist/behaviors/kb-review.mjs +8 -2
- package/dist/behaviors/kb-sandbox.d.mts +2 -2
- package/dist/behaviors/kb-sandbox.mjs +7 -1
- package/dist/behaviors/kb-segment.d.mts +2 -2
- package/dist/behaviors/kb-segment.mjs +2 -1
- package/dist/behaviors/kb-select.mjs +8 -2
- package/dist/behaviors/kb-sources.d.mts +2 -2
- package/dist/behaviors/kb-sources.mjs +1 -0
- package/dist/behaviors/kb-sql.d.mts +2 -2
- package/dist/behaviors/kb-sql.mjs +1 -0
- package/dist/behaviors/kb-trace.d.mts +2 -2
- package/dist/behaviors/kb-trace.mjs +9 -3
- package/dist/behaviors/kb-visibility.d.mts +2 -2
- package/dist/behaviors/kb-visibility.mjs +1 -0
- package/dist/behaviors/kb-who-can.d.mts +2 -2
- package/dist/behaviors/kb-who-can.mjs +8 -2
- package/dist/behaviors/mentions.d.mts +1 -1
- package/dist/behaviors/mentions.mjs +1 -0
- package/dist/behaviors/modal.d.mts +1 -1
- package/dist/behaviors/modal.mjs +1 -0
- package/dist/behaviors/notification.d.mts +2 -2
- package/dist/behaviors/notification.mjs +14 -3
- package/dist/behaviors/panel.mjs +1 -0
- package/dist/behaviors/scroll-area.d.mts +17 -0
- package/dist/behaviors/scroll-area.mjs +59 -0
- package/dist/behaviors/select.mjs +8 -2
- package/dist/behaviors/slider.mjs +3 -3
- package/dist/behaviors/split-pane.mjs +2 -0
- package/dist/behaviors/suggestions.mjs +1 -0
- package/dist/behaviors/tabs.mjs +10 -0
- package/dist/behaviors/tag-input.mjs +1 -0
- package/dist/behaviors/theme-switcher.d.mts +2 -2
- package/dist/behaviors/theme-switcher.mjs +17 -2
- package/dist/behaviors/theme.mjs +16 -2
- package/dist/behaviors/toast.d.mts +2 -2
- package/dist/behaviors/toast.mjs +1 -0
- package/dist/behaviors/tree-select.mjs +14 -0
- package/dist/behaviors/tree.mjs +4 -4
- package/dist/behaviors/upload.mjs +1 -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 +80 -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 +14764 -14311
- package/dist/react.d.mts +18 -18
- package/dist/react.mjs +135 -36
- package/dist/registry.json +795 -64
- package/dist/tokens/colors.css +6 -0
- package/dist/tokens/design.css +130 -30
- package/dist/tokens/dtcg.json +6189 -1461
- package/dist/tokens/figma.variables.json +4107 -345
- package/dist/tokens/pixel.css +3 -0
- package/dist/tokens/scrollbars.css +40 -0
- package/dist/tokens/tokens-studio.json +5191 -271
- package/dist/tokens.css +304 -81
- package/dist/ui.css +4050 -2148
- package/dist/vue.d.mts +17 -17
- package/dist/vue.mjs +129 -34
- package/docs/spec/design-philosophy.md +5 -5
- package/docs/spec/design-primitives.md +10 -10
- package/docs/spec/scrollbars.md +46 -0
- package/package.json +16 -3
package/dist/components/btn.css
CHANGED
|
@@ -11,37 +11,42 @@
|
|
|
11
11
|
* </button>
|
|
12
12
|
*
|
|
13
13
|
* 变体:
|
|
14
|
-
* .icen-btn 默认(
|
|
15
|
-
* .icen-btn-primary 实心 accent
|
|
16
|
-
* .icen-btn-danger 透明底 + error 描边(hover
|
|
17
|
-
* .icen-btn-ghost 全透明,hover
|
|
14
|
+
* .icen-btn 默认(control 面 + 中性描边)
|
|
15
|
+
* .icen-btn-primary 实心 accent(承文本用 accent-strong)
|
|
16
|
+
* .icen-btn-danger 透明底 + error 描边(hover 淡红面)
|
|
17
|
+
* .icen-btn-ghost 全透明,hover 浮起中性填充
|
|
18
18
|
* .icen-btn-link link 文本按钮(无背景、underline on hover)
|
|
19
19
|
*
|
|
20
20
|
* 尺寸:默认 / .icen-btn-sm / .icen-btn-lg / .icen-btn-icon(正方形)
|
|
21
21
|
* 状态:.is-loading 加 spinner + aria-busy;.is-error error 边;disabled/aria-disabled/data-icen-disabled
|
|
22
|
+
*
|
|
23
|
+
* 几何走 control token;表面物理(顶部高光、接触影)由原语适配层补。
|
|
24
|
+
* 按下以「面变深 + 内影」表达,不改变按钮占位或位置。
|
|
22
25
|
*/
|
|
23
26
|
|
|
24
27
|
.icen-btn {
|
|
25
|
-
--btn-bg: var(--icen-token-
|
|
26
|
-
--btn-fg: var(--icen-token-text);
|
|
27
|
-
--btn-border: var(--icen-token-line-soft);
|
|
28
|
+
--btn-bg: var(--icen-token-control);
|
|
28
29
|
--btn-bg-hover: var(--icen-token-surface-hover);
|
|
29
|
-
--btn-
|
|
30
|
+
--btn-bg-active: var(--icen-token-surface-pressed);
|
|
31
|
+
--btn-fg: var(--icen-token-text);
|
|
32
|
+
--btn-border: var(--icen-token-control-border);
|
|
33
|
+
--btn-border-hover: var(--icen-token-control-border-hover);
|
|
30
34
|
|
|
31
35
|
display: inline-flex;
|
|
32
36
|
align-items: center;
|
|
33
37
|
justify-content: center;
|
|
34
|
-
gap:
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
gap: var(--icen-control-gap);
|
|
39
|
+
block-size: var(--icen-control-height-md);
|
|
40
|
+
padding: 0 var(--icen-control-padding-inline);
|
|
37
41
|
background: var(--btn-bg);
|
|
38
42
|
color: var(--btn-fg);
|
|
39
|
-
border:
|
|
40
|
-
border-radius: var(--icen-radius
|
|
43
|
+
border: var(--icen-control-border-width) solid var(--btn-border);
|
|
44
|
+
border-radius: var(--icen-control-radius);
|
|
41
45
|
font-family: var(--icen-font-body);
|
|
42
|
-
font-size: var(--icen-
|
|
43
|
-
font-weight:
|
|
44
|
-
|
|
46
|
+
font-size: var(--icen-font-size-control);
|
|
47
|
+
font-weight: var(--icen-font-weight-control);
|
|
48
|
+
line-height: 1;
|
|
49
|
+
letter-spacing: var(--icen-letter-spacing-control);
|
|
45
50
|
white-space: nowrap;
|
|
46
51
|
cursor: pointer;
|
|
47
52
|
user-select: none;
|
|
@@ -54,11 +59,14 @@
|
|
|
54
59
|
box-shadow var(--icen-tx-fast),
|
|
55
60
|
transform var(--icen-tx-fast);
|
|
56
61
|
}
|
|
57
|
-
.icen-btn:hover {
|
|
62
|
+
.icen-btn:hover:not(:disabled):not([aria-disabled='true']):not([data-icen-disabled]) {
|
|
58
63
|
background: var(--btn-bg-hover);
|
|
59
64
|
border-color: var(--btn-border-hover);
|
|
60
65
|
}
|
|
61
|
-
.icen-btn:active
|
|
66
|
+
.icen-btn:active:not(:disabled):not([aria-disabled='true']):not([data-icen-disabled]):not(.is-loading) {
|
|
67
|
+
background: var(--btn-bg-active);
|
|
68
|
+
transform: var(--icen-press-soft);
|
|
69
|
+
}
|
|
62
70
|
.icen-btn:focus-visible {
|
|
63
71
|
outline: none;
|
|
64
72
|
box-shadow: var(--icen-ring);
|
|
@@ -76,83 +84,80 @@
|
|
|
76
84
|
/* ── 变体 ── */
|
|
77
85
|
.icen-btn-primary {
|
|
78
86
|
--btn-bg: var(--icen-token-accent-strong);
|
|
87
|
+
--btn-bg-hover: color-mix(in srgb, var(--icen-token-accent-strong) 92%, var(--icen-token-text));
|
|
88
|
+
--btn-bg-active: color-mix(in srgb, var(--icen-token-accent-strong) 84%, var(--icen-token-text));
|
|
79
89
|
--btn-fg: var(--icen-token-on-accent);
|
|
80
90
|
--btn-border: var(--icen-token-accent-strong);
|
|
81
|
-
--btn-
|
|
82
|
-
--btn-border-hover: color-mix(in srgb, var(--icen-token-accent-strong) 88%, black);
|
|
83
|
-
}
|
|
84
|
-
/* hover 阴影抬升仅可悬停设备生效(触屏关闭,AGENTS 动效守卫) */
|
|
85
|
-
@media (hover: hover) and (pointer: fine) {
|
|
86
|
-
.icen-btn-primary:hover {
|
|
87
|
-
box-shadow: var(--icen-token-shadow-elevated);
|
|
88
|
-
}
|
|
91
|
+
--btn-border-hover: color-mix(in srgb, var(--icen-token-accent-strong) 92%, var(--icen-token-text));
|
|
89
92
|
}
|
|
90
93
|
|
|
91
94
|
.icen-btn-danger {
|
|
92
|
-
--btn-fg: var(--icen-token-error);
|
|
93
|
-
--btn-border: color-mix(in srgb, var(--icen-token-error) 35%, transparent);
|
|
94
95
|
--btn-bg: transparent;
|
|
95
|
-
--btn-bg-hover: var(--icen-token-error);
|
|
96
|
+
--btn-bg-hover: var(--icen-token-error-muted);
|
|
97
|
+
--btn-bg-active: color-mix(in srgb, var(--icen-token-error) 18%, transparent);
|
|
98
|
+
--btn-fg: var(--icen-token-error);
|
|
99
|
+
--btn-border: color-mix(in srgb, var(--icen-token-error) 38%, transparent);
|
|
96
100
|
--btn-border-hover: var(--icen-token-error);
|
|
97
101
|
}
|
|
98
|
-
.icen-btn-danger:hover { color: var(--icen-token-on-accent); }
|
|
99
102
|
|
|
100
103
|
.icen-btn-ghost {
|
|
101
104
|
--btn-bg: transparent;
|
|
105
|
+
--btn-bg-hover: var(--icen-token-fill-hover);
|
|
106
|
+
--btn-bg-active: var(--icen-token-fill-pressed);
|
|
102
107
|
--btn-border: transparent;
|
|
103
|
-
--btn-bg-hover: var(--icen-token-fill-2);
|
|
104
108
|
--btn-border-hover: transparent;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
.icen-btn-link {
|
|
108
112
|
--btn-bg: transparent;
|
|
109
|
-
--btn-border: transparent;
|
|
110
|
-
--btn-fg: var(--icen-token-accent);
|
|
111
113
|
--btn-bg-hover: transparent;
|
|
114
|
+
--btn-bg-active: transparent;
|
|
115
|
+
--btn-fg: var(--icen-token-accent-text);
|
|
116
|
+
--btn-border: transparent;
|
|
112
117
|
--btn-border-hover: transparent;
|
|
113
|
-
|
|
118
|
+
block-size: auto;
|
|
114
119
|
padding: 0;
|
|
115
120
|
border: 0;
|
|
116
121
|
border-radius: 0;
|
|
117
122
|
text-decoration: none;
|
|
118
123
|
}
|
|
119
|
-
.icen-btn-link:hover {
|
|
120
|
-
|
|
121
|
-
text-underline-offset: 3px;
|
|
122
|
-
background: transparent;
|
|
123
|
-
}
|
|
124
|
+
.icen-btn-link:hover { text-decoration: underline; text-underline-offset: 3px; background: transparent; }
|
|
125
|
+
.icen-btn-link:active { transform: none; }
|
|
124
126
|
|
|
125
127
|
/* ── 尺寸 ── */
|
|
126
128
|
.icen-btn-sm {
|
|
127
|
-
|
|
128
|
-
padding: 0 var(--icen-
|
|
129
|
+
block-size: var(--icen-control-height-sm);
|
|
130
|
+
padding: 0 var(--icen-control-padding-inline-sm);
|
|
129
131
|
font-size: var(--icen-density-font-size-sm);
|
|
130
|
-
gap:
|
|
132
|
+
gap: var(--icen-control-gap-sm);
|
|
133
|
+
border-radius: var(--icen-control-radius-sm);
|
|
131
134
|
}
|
|
132
135
|
.icen-btn-lg {
|
|
133
|
-
|
|
134
|
-
padding: 0 var(--icen-
|
|
136
|
+
block-size: var(--icen-control-height-lg);
|
|
137
|
+
padding: 0 var(--icen-control-padding-inline-lg);
|
|
135
138
|
font-size: var(--icen-density-font-size-lg);
|
|
136
139
|
gap: 8px;
|
|
140
|
+
border-radius: var(--icen-control-radius-lg);
|
|
137
141
|
}
|
|
138
142
|
.icen-btn-icon {
|
|
139
|
-
|
|
143
|
+
inline-size: var(--icen-control-height-md);
|
|
140
144
|
padding: 0;
|
|
141
145
|
gap: 0;
|
|
142
146
|
}
|
|
143
|
-
.icen-btn-icon.icen-btn-sm {
|
|
144
|
-
.icen-btn-icon.icen-btn-lg {
|
|
147
|
+
.icen-btn-icon.icen-btn-sm { inline-size: var(--icen-control-height-sm); }
|
|
148
|
+
.icen-btn-icon.icen-btn-lg { inline-size: var(--icen-control-height-lg); }
|
|
145
149
|
|
|
146
|
-
.icen-btn-block {
|
|
147
|
-
display: flex;
|
|
148
|
-
width: 100%;
|
|
149
|
-
}
|
|
150
|
+
.icen-btn-block { display: flex; inline-size: 100%; }
|
|
150
151
|
|
|
151
152
|
/* ── 状态 ── */
|
|
152
153
|
.icen-btn.is-error {
|
|
153
154
|
--btn-border: var(--icen-token-error);
|
|
154
155
|
--btn-border-hover: var(--icen-token-error);
|
|
155
156
|
}
|
|
157
|
+
.icen-btn.is-error:focus-visible {
|
|
158
|
+
outline: none;
|
|
159
|
+
box-shadow: var(--icen-ring-error);
|
|
160
|
+
}
|
|
156
161
|
|
|
157
162
|
/* 加载态:居中 spinner 占位 + 文本保留(避免重排)。
|
|
158
163
|
behavior 在挂 .is-loading 时把 [aria-busy=true] 也挂上。 */
|
|
@@ -160,27 +165,27 @@
|
|
|
160
165
|
.icen-btn.is-loading::after {
|
|
161
166
|
content: '';
|
|
162
167
|
position: absolute;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
168
|
+
inset-block-start: 50%;
|
|
169
|
+
inset-inline-start: 50%;
|
|
170
|
+
inline-size: 14px;
|
|
171
|
+
block-size: 14px;
|
|
172
|
+
margin-block-start: -7px;
|
|
173
|
+
margin-inline-start: -7px;
|
|
174
|
+
color: var(--btn-fg);
|
|
175
|
+
border: 1.5px solid color-mix(in srgb, currentColor 30%, transparent);
|
|
167
176
|
border-top-color: currentColor;
|
|
168
177
|
border-radius: 50%;
|
|
169
178
|
animation: icen-spin var(--btn-spin-duration, var(--icen-duration-slow)) linear infinite;
|
|
170
|
-
opacity: 1;
|
|
179
|
+
opacity: 1;
|
|
171
180
|
background: none;
|
|
172
181
|
pointer-events: none;
|
|
173
182
|
}
|
|
174
183
|
|
|
175
184
|
/* 图标按钮内部 svg 默认尺寸对齐字号 */
|
|
176
185
|
.icen-btn-icon-start, .icen-btn-icon-end {
|
|
177
|
-
|
|
178
|
-
|
|
186
|
+
inline-size: 1.1em;
|
|
187
|
+
block-size: 1.1em;
|
|
179
188
|
flex-shrink: 0;
|
|
180
189
|
}
|
|
181
190
|
|
|
182
|
-
@media (prefers-reduced-motion: reduce) {
|
|
183
|
-
.icen-btn.is-loading::after { --btn-spin-duration: 1.2s; }
|
|
184
|
-
}
|
|
185
|
-
|
|
186
191
|
}
|
package/dist/components/card.css
CHANGED
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
|
|
28
28
|
.icen-card {
|
|
29
29
|
position: relative;
|
|
30
|
-
background: var(--icen-token-
|
|
31
|
-
border: 1px solid var(--icen-token-
|
|
32
|
-
box-shadow:
|
|
30
|
+
background: var(--icen-token-surface);
|
|
31
|
+
border: 1px solid var(--icen-token-separator-soft);
|
|
32
|
+
box-shadow: none;
|
|
33
33
|
border-radius: var(--icen-radius-lg);
|
|
34
34
|
overflow: hidden;
|
|
35
35
|
}
|
|
@@ -37,20 +37,21 @@
|
|
|
37
37
|
/* ── 变体 ── */
|
|
38
38
|
.icen-card--elevated {
|
|
39
39
|
box-shadow: var(--icen-token-shadow-card);
|
|
40
|
-
border-color:
|
|
40
|
+
border-color: var(--icen-token-separator-soft);
|
|
41
41
|
}
|
|
42
42
|
.icen-card--outlined {
|
|
43
|
-
border-color: var(--icen-token-
|
|
43
|
+
border-color: var(--icen-token-separator);
|
|
44
44
|
box-shadow: none;
|
|
45
45
|
}
|
|
46
46
|
.icen-card--flat {
|
|
47
47
|
box-shadow: none;
|
|
48
|
-
background: var(--icen-token-
|
|
48
|
+
background: var(--icen-token-surface-chrome);
|
|
49
|
+
border-color: transparent;
|
|
49
50
|
}
|
|
50
51
|
.icen-card--glass {
|
|
51
52
|
background: var(--icen-token-surface-glass);
|
|
52
|
-
backdrop-filter: blur(
|
|
53
|
-
-webkit-backdrop-filter: blur(
|
|
53
|
+
backdrop-filter: blur(var(--icen-material-blur-floating)) saturate(var(--icen-material-saturate));
|
|
54
|
+
-webkit-backdrop-filter: blur(var(--icen-material-blur-floating)) saturate(var(--icen-material-saturate));
|
|
54
55
|
box-shadow: none;
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -73,11 +74,9 @@
|
|
|
73
74
|
.icen-card--interactive:focus-within {
|
|
74
75
|
border-color: var(--icen-token-accent);
|
|
75
76
|
}
|
|
76
|
-
.icen-card--interactive:focus-within {
|
|
77
|
-
border-color: var(--icen-token-accent);
|
|
78
|
-
}
|
|
79
77
|
.icen-card.is-selected {
|
|
80
|
-
|
|
78
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 34%, var(--icen-token-separator));
|
|
79
|
+
box-shadow: var(--icen-token-shadow-control);
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
/* ── 媒体封面 ── */
|
|
@@ -86,7 +85,7 @@
|
|
|
86
85
|
width: 100%;
|
|
87
86
|
aspect-ratio: 16 / 9;
|
|
88
87
|
overflow: hidden;
|
|
89
|
-
background: var(--icen-token-
|
|
88
|
+
background: var(--icen-token-surface-raised);
|
|
90
89
|
}
|
|
91
90
|
/* 封面比例变体 */
|
|
92
91
|
.icen-card-media--square { aspect-ratio: 1 / 1; }
|
|
@@ -105,7 +104,7 @@
|
|
|
105
104
|
inline-size: 100%;
|
|
106
105
|
height: 100%;
|
|
107
106
|
object-fit: cover;
|
|
108
|
-
transition: transform var(--icen-
|
|
107
|
+
transition: transform var(--icen-duration-slow) var(--icen-ease-out);
|
|
109
108
|
}
|
|
110
109
|
.icen-card-tag {
|
|
111
110
|
position: absolute;
|
|
@@ -127,13 +126,14 @@
|
|
|
127
126
|
align-items: flex-start;
|
|
128
127
|
justify-content: space-between;
|
|
129
128
|
gap: var(--icen-density-space-sm);
|
|
130
|
-
padding: var(--icen-density-space-md);
|
|
129
|
+
padding: var(--icen-density-space-md) var(--icen-density-space-md) var(--icen-density-space-xs);
|
|
131
130
|
}
|
|
132
131
|
.icen-card-title {
|
|
133
|
-
font-size: var(--icen-
|
|
134
|
-
font-weight:
|
|
132
|
+
font-size: var(--icen-font-size-title);
|
|
133
|
+
font-weight: var(--icen-font-weight-title);
|
|
135
134
|
color: var(--icen-token-text);
|
|
136
135
|
line-height: 1.3;
|
|
136
|
+
letter-spacing: -.01em;
|
|
137
137
|
margin: 0;
|
|
138
138
|
font-family: var(--icen-font-heading);
|
|
139
139
|
}
|
|
@@ -141,13 +141,13 @@
|
|
|
141
141
|
font-size: var(--icen-density-font-size-sm);
|
|
142
142
|
color: var(--icen-token-text-muted);
|
|
143
143
|
margin: 2px 0 0;
|
|
144
|
-
line-height: 1.
|
|
144
|
+
line-height: 1.45;
|
|
145
145
|
}
|
|
146
146
|
.icen-card-body {
|
|
147
147
|
padding: 0 var(--icen-density-space-md) var(--icen-density-space-md);
|
|
148
|
-
font-size: var(--icen-
|
|
148
|
+
font-size: var(--icen-font-size-control);
|
|
149
149
|
color: var(--icen-token-text-muted);
|
|
150
|
-
line-height: 1.
|
|
150
|
+
line-height: 1.55;
|
|
151
151
|
}
|
|
152
152
|
.icen-card-body > p:first-child { margin-top: 0; }
|
|
153
153
|
.icen-card-body > p:last-child { margin-bottom: 0; }
|
|
@@ -157,8 +157,8 @@
|
|
|
157
157
|
align-items: center;
|
|
158
158
|
gap: var(--icen-density-space-sm);
|
|
159
159
|
padding: var(--icen-density-space-sm) var(--icen-density-space-md);
|
|
160
|
-
border-top: 1px solid var(--icen-token-
|
|
161
|
-
background:
|
|
160
|
+
border-top: 1px solid var(--icen-token-separator-soft);
|
|
161
|
+
background: var(--icen-token-surface-chrome);
|
|
162
162
|
}
|
|
163
163
|
.icen-card-meta {
|
|
164
164
|
display: flex;
|
|
@@ -60,25 +60,26 @@
|
|
|
60
60
|
position: relative;
|
|
61
61
|
display: flex;
|
|
62
62
|
align-items: center;
|
|
63
|
-
gap: var(--icen-
|
|
63
|
+
gap: var(--icen-control-gap-sm);
|
|
64
64
|
inline-size: 100%;
|
|
65
|
-
height: var(--icen-
|
|
66
|
-
padding: 0 var(--icen-
|
|
67
|
-
font-
|
|
65
|
+
height: var(--icen-control-height-md);
|
|
66
|
+
padding: 0 var(--icen-field-padding-inline);
|
|
67
|
+
font-family: var(--icen-font-body);
|
|
68
|
+
font-size: var(--icen-font-size-control);
|
|
68
69
|
text-align: start;
|
|
69
70
|
background: var(--icen-token-control);
|
|
70
71
|
color: var(--icen-token-text);
|
|
71
|
-
border:
|
|
72
|
-
border-radius: var(--icen-radius
|
|
73
|
-
box-shadow: var(--icen-token-shadow-
|
|
72
|
+
border: var(--icen-control-border-width) solid var(--icen-token-control-border);
|
|
73
|
+
border-radius: var(--icen-control-radius);
|
|
74
|
+
box-shadow: var(--icen-token-shadow-field);
|
|
74
75
|
cursor: pointer;
|
|
75
76
|
transition:
|
|
76
77
|
border-color var(--icen-tx-fast),
|
|
77
78
|
box-shadow var(--icen-tx-fast);
|
|
78
|
-
padding-inline-end: var(--icen-
|
|
79
|
+
padding-inline-end: calc(var(--icen-field-padding-inline) + 18px);
|
|
79
80
|
}
|
|
80
81
|
.icen-cascader-trigger:hover:not(:disabled) {
|
|
81
|
-
border-color: var(--icen-
|
|
82
|
+
border-color: var(--icen-token-control-border-hover);
|
|
82
83
|
}
|
|
83
84
|
.icen-cascader-trigger:focus-visible {
|
|
84
85
|
outline: none;
|
|
@@ -106,15 +107,16 @@
|
|
|
106
107
|
|
|
107
108
|
.icen-cascader-chevron {
|
|
108
109
|
position: absolute;
|
|
109
|
-
inset-inline-end: var(--icen-
|
|
110
|
+
inset-inline-end: var(--icen-field-padding-inline);
|
|
110
111
|
inset-block-start: 50%;
|
|
111
112
|
translate: 0 -50%;
|
|
112
|
-
inline-size:
|
|
113
|
-
block-size:
|
|
113
|
+
inline-size: 12px;
|
|
114
|
+
block-size: 12px;
|
|
114
115
|
flex: none;
|
|
115
116
|
color: var(--icen-token-text-muted);
|
|
117
|
+
opacity: .82;
|
|
116
118
|
pointer-events: none;
|
|
117
|
-
transition: transform var(--icen-tx-fast);
|
|
119
|
+
transition: transform var(--icen-tx-fast), opacity var(--icen-tx-fast);
|
|
118
120
|
}
|
|
119
121
|
.icen-cascader.is-open .icen-cascader-chevron { transform: rotate(180deg); }
|
|
120
122
|
|
|
@@ -139,10 +141,10 @@
|
|
|
139
141
|
}
|
|
140
142
|
.icen-cascader-clear:hover {
|
|
141
143
|
color: var(--icen-token-text);
|
|
142
|
-
background: var(--icen-token-fill-
|
|
144
|
+
background: var(--icen-token-fill-hover);
|
|
143
145
|
}
|
|
144
146
|
/* 有清除钮时 trigger 行内末端侧让位(clear 18px + chevron 14px + 间距) */
|
|
145
|
-
.icen-cascader:has(.icen-cascader-clear:not([hidden])) .icen-cascader-trigger { padding-inline-end: calc(var(--icen-density-space-sm) + var(--icen-
|
|
147
|
+
.icen-cascader:has(.icen-cascader-clear:not([hidden])) .icen-cascader-trigger { padding-inline-end: calc(var(--icen-density-space-sm) + var(--icen-control-height-sm) + var(--icen-density-space-xs)); }
|
|
146
148
|
|
|
147
149
|
/* 面板由 behavior portal 到 body:left/top/width/max-height 由 JS 按 trigger rect inline 写入;
|
|
148
150
|
data-icen-side="top|bottom" 标记翻侧方向。 */
|
|
@@ -151,11 +153,11 @@
|
|
|
151
153
|
z-index: var(--icen-z-popover);
|
|
152
154
|
overflow-y: auto;
|
|
153
155
|
overscroll-behavior: contain;
|
|
154
|
-
padding: var(--icen-density-space-
|
|
155
|
-
background: var(--icen-token-
|
|
156
|
-
border: 1px solid var(--icen-token-
|
|
156
|
+
padding: var(--icen-density-space-xs);
|
|
157
|
+
background: var(--icen-token-surface);
|
|
158
|
+
border: 1px solid var(--icen-token-material-edge);
|
|
157
159
|
border-radius: var(--icen-radius-lg);
|
|
158
|
-
box-shadow: var(--icen-token-shadow-
|
|
160
|
+
box-shadow: var(--icen-token-material-light), var(--icen-token-shadow-elevated);
|
|
159
161
|
transform-origin: top center;
|
|
160
162
|
animation: icen-pop-in var(--icen-tx-fast);
|
|
161
163
|
}
|
|
@@ -164,11 +166,11 @@
|
|
|
164
166
|
/* ── 搜索框(opts.searchable 时 behavior 渲染)── */
|
|
165
167
|
.icen-cascader-search {
|
|
166
168
|
padding: var(--icen-density-space-xs);
|
|
167
|
-
border-bottom: 1px solid var(--icen-token-
|
|
168
|
-
margin-bottom:
|
|
169
|
+
border-bottom: 1px solid var(--icen-token-separator-soft);
|
|
170
|
+
margin-bottom: var(--icen-density-space-xs);
|
|
169
171
|
position: sticky;
|
|
170
172
|
top: 0;
|
|
171
|
-
background: var(--icen-token-
|
|
173
|
+
background: var(--icen-token-surface);
|
|
172
174
|
z-index: 1;
|
|
173
175
|
}
|
|
174
176
|
.icen-cascader-search-input { min-inline-size: 0; }
|
|
@@ -195,25 +197,41 @@
|
|
|
195
197
|
.icen-cascader-item {
|
|
196
198
|
display: flex;
|
|
197
199
|
align-items: center;
|
|
198
|
-
gap: var(--icen-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
gap: var(--icen-control-gap-sm);
|
|
201
|
+
min-block-size: var(--icen-control-height-sm);
|
|
202
|
+
padding: 4px var(--icen-density-space-sm);
|
|
203
|
+
font-size: var(--icen-font-size-control);
|
|
204
|
+
border-radius: var(--icen-radius-xs);
|
|
202
205
|
color: var(--icen-token-text);
|
|
203
206
|
cursor: pointer;
|
|
204
207
|
transition:
|
|
205
208
|
background-color var(--icen-tx-fast),
|
|
206
209
|
color var(--icen-tx-fast);
|
|
207
210
|
}
|
|
208
|
-
.icen-cascader-item:hover:not(.is-disabled) { background: var(--icen-token-fill-
|
|
211
|
+
.icen-cascader-item:hover:not(.is-disabled) { background: var(--icen-token-fill-hover); }
|
|
209
212
|
.icen-cascader-item.is-focused {
|
|
210
|
-
background: var(--icen-token-fill-
|
|
213
|
+
background: var(--icen-token-fill-selected);
|
|
211
214
|
}
|
|
212
215
|
.icen-cascader-item.is-active {
|
|
213
216
|
color: var(--icen-token-accent-text);
|
|
214
217
|
font-weight: 500;
|
|
215
218
|
background: var(--icen-token-accent-subtle);
|
|
216
219
|
}
|
|
220
|
+
.icen-cascader-item.is-selected {
|
|
221
|
+
background: var(--icen-token-fill-selected);
|
|
222
|
+
color: var(--icen-token-text);
|
|
223
|
+
font-weight: var(--icen-font-weight-control);
|
|
224
|
+
}
|
|
225
|
+
.icen-cascader-item.is-selected::after {
|
|
226
|
+
content: '';
|
|
227
|
+
inline-size: 12px;
|
|
228
|
+
block-size: 12px;
|
|
229
|
+
flex: none;
|
|
230
|
+
margin-inline-start: auto;
|
|
231
|
+
background: currentColor;
|
|
232
|
+
mask: var(--icen-token-icon-check) center / contain no-repeat;
|
|
233
|
+
-webkit-mask: var(--icen-token-icon-check) center / contain no-repeat;
|
|
234
|
+
}
|
|
217
235
|
.icen-cascader-item.is-disabled {
|
|
218
236
|
opacity: 0.4;
|
|
219
237
|
cursor: not-allowed;
|
|
@@ -254,8 +272,8 @@
|
|
|
254
272
|
cursor: pointer;
|
|
255
273
|
transition: background-color var(--icen-tx-fast);
|
|
256
274
|
}
|
|
257
|
-
.icen-cascader-result:hover:not(.is-disabled) { background: var(--icen-token-fill-
|
|
258
|
-
.icen-cascader-result.is-focused { background: var(--icen-token-fill-
|
|
275
|
+
.icen-cascader-result:hover:not(.is-disabled) { background: var(--icen-token-fill-hover); }
|
|
276
|
+
.icen-cascader-result.is-focused { background: var(--icen-token-fill-selected); }
|
|
259
277
|
.icen-cascader-result.is-disabled {
|
|
260
278
|
opacity: 0.4;
|
|
261
279
|
cursor: not-allowed;
|
|
@@ -297,15 +315,18 @@
|
|
|
297
315
|
}
|
|
298
316
|
@media (pointer: coarse) {
|
|
299
317
|
.icen-cascader-clear { min-inline-size: 44px; min-block-size: 44px; inset-inline-end: var(--icen-density-space-sm); }
|
|
300
|
-
.icen-cascader:has(.icen-cascader-clear:not([hidden])) .icen-cascader-trigger { padding-inline-end: calc(var(--icen-
|
|
318
|
+
.icen-cascader:has(.icen-cascader-clear:not([hidden])) .icen-cascader-trigger { padding-inline-end: calc(var(--icen-control-height-sm) + var(--icen-density-space-sm) + var(--icen-density-space-xs)); }
|
|
301
319
|
}
|
|
302
320
|
|
|
303
|
-
.icen-cascader--sm .icen-cascader-trigger { block-size: var(--icen-
|
|
304
|
-
.icen-cascader--lg .icen-cascader-trigger { block-size: var(--icen-
|
|
321
|
+
.icen-cascader--sm .icen-cascader-trigger { block-size: var(--icen-control-height-sm); font-size: var(--icen-density-font-size-sm); }
|
|
322
|
+
.icen-cascader--lg .icen-cascader-trigger { block-size: var(--icen-control-height-lg); font-size: var(--icen-density-font-size-lg); }
|
|
305
323
|
|
|
306
|
-
.icen-cascader-panel:has(> .icen-cascader-search) { scroll-padding-block-start: calc(var(--icen-
|
|
324
|
+
.icen-cascader-panel:has(> .icen-cascader-search) { scroll-padding-block-start: calc(var(--icen-control-height-sm) + 3 * var(--icen-density-space-xs) + var(--icen-density-space-sm) + 1px); }
|
|
307
325
|
|
|
308
326
|
/* Popup affordance is carried by the control surface, not a direction glyph. */
|
|
309
|
-
|
|
327
|
+
/* Clear affordance replaces the popup glyph in the trailing slot. */
|
|
328
|
+
.icen-cascader:has(.icen-cascader-clear:not([hidden])) .icen-cascader-chevron { display: none; }
|
|
329
|
+
|
|
330
|
+
|
|
310
331
|
|
|
311
332
|
}
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
* 同样追加进 svg(样式属性直出,挡指针事件在基座 charts.css)。
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
.icen-chart-area {
|
|
15
|
+
position: relative;
|
|
16
|
+
min-width: 0;
|
|
17
|
+
}
|
|
14
18
|
.icen-chart-area > svg {
|
|
15
19
|
display: block;
|
|
16
20
|
width: 100%;
|
|
@@ -18,4 +22,46 @@
|
|
|
18
22
|
overflow: visible;
|
|
19
23
|
}
|
|
20
24
|
|
|
25
|
+
.icen-chart-area svg .icen-chart-grid {
|
|
26
|
+
stroke: var(--icen-token-line-soft);
|
|
27
|
+
opacity: 0.9;
|
|
28
|
+
}
|
|
29
|
+
.icen-chart-area svg .icen-chart-baseline {
|
|
30
|
+
stroke: var(--icen-token-line);
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* 面积是主体:渐变略浓于折线(.3 → 0),但描边收细到 1.75 */
|
|
35
|
+
.icen-chart-area svg > path[fill='none'] {
|
|
36
|
+
stroke-width: 1.75;
|
|
37
|
+
}
|
|
38
|
+
.icen-chart-area svg stop:first-child { stop-opacity: 0.3; }
|
|
39
|
+
.icen-chart-area svg stop:last-child { stop-opacity: 0; }
|
|
40
|
+
|
|
41
|
+
/* 数据点:小一号的白芯色环,hover 放大到 1.5×(与折线同一套手感) */
|
|
42
|
+
.icen-chart-area svg circle[data-icen-chart-mark]:not([data-icen-chart-hit]) {
|
|
43
|
+
transform-box: fill-box;
|
|
44
|
+
transform-origin: center;
|
|
45
|
+
transition: transform var(--icen-duration-fast) var(--icen-ease-out), opacity var(--icen-tx-fast);
|
|
46
|
+
}
|
|
47
|
+
.icen-chart-area svg circle[data-icen-chart-mark]:not([data-icen-chart-hit]):has(+ .is-hover) {
|
|
48
|
+
transform: scale(1.5);
|
|
49
|
+
}
|
|
50
|
+
.icen-chart-area svg circle[data-icen-chart-hit].is-hover {
|
|
51
|
+
fill: color-mix(in srgb, var(--icen-token-accent) 9%, transparent);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.icen-chart-area .icen-chart-labels {
|
|
55
|
+
margin-top: 5px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
.icen-chart-area svg circle[data-icen-chart-mark] { transition: none; }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (forced-colors: active) {
|
|
63
|
+
.icen-chart-area svg .icen-chart-grid,
|
|
64
|
+
.icen-chart-area svg .icen-chart-baseline { stroke: GrayText; }
|
|
65
|
+
}
|
|
66
|
+
|
|
21
67
|
}
|