@icen.ai/ui 0.9.0 → 0.10.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 +138 -80
- package/README.md +66 -91
- package/dist/base.css +208 -179
- package/dist/behaviors/accordion.mjs +8 -8
- package/dist/behaviors/ai-branch.d.mts +1 -1
- package/dist/behaviors/ai-branch.mjs +1010 -94
- package/dist/behaviors/ai-chat.d.mts +7 -7
- package/dist/behaviors/ai-chat.mjs +1071 -161
- package/dist/behaviors/ai-composer.d.mts +44 -12
- package/dist/behaviors/ai-composer.mjs +1997 -524
- package/dist/behaviors/ai-core.d.mts +1 -1
- package/dist/behaviors/ai-core.mjs +1016 -107
- package/dist/behaviors/ai-diff.mjs +1019 -127
- package/dist/behaviors/ai-feedback.d.mts +1 -1
- package/dist/behaviors/ai-feedback.mjs +1035 -126
- package/dist/behaviors/ai-panel.d.mts +8 -8
- package/dist/behaviors/ai-panel.mjs +1284 -266
- package/dist/behaviors/ai-provider.mjs +1003 -101
- package/dist/behaviors/ai-threads.d.mts +1 -1
- package/dist/behaviors/ai-threads.mjs +1068 -154
- package/dist/behaviors/ai-tool.d.mts +2 -2
- package/dist/behaviors/ai-tool.mjs +2037 -396
- package/dist/behaviors/ai-tools.d.mts +89 -16
- package/dist/behaviors/ai-tools.mjs +4448 -372
- package/dist/behaviors/autocomplete.d.mts +53 -0
- package/dist/behaviors/autocomplete.mjs +1600 -0
- package/dist/behaviors/back-top.d.mts +1 -1
- package/dist/behaviors/back-top.mjs +951 -14
- package/dist/behaviors/carousel.d.mts +1 -1
- package/dist/behaviors/carousel.mjs +906 -11
- package/dist/behaviors/cascader.d.mts +48 -0
- package/dist/behaviors/cascader.mjs +1853 -0
- package/dist/behaviors/charts.d.mts +72 -8
- package/dist/behaviors/charts.mjs +1901 -256
- package/dist/behaviors/code-block.d.mts +36 -0
- package/dist/behaviors/code-block.mjs +1611 -0
- package/dist/behaviors/command-palette.d.mts +9 -6
- package/dist/behaviors/command-palette.mjs +161 -59
- package/dist/behaviors/context-menu.d.mts +9 -8
- package/dist/behaviors/context-menu.mjs +1112 -44
- package/dist/behaviors/controls.d.mts +13 -13
- package/dist/behaviors/controls.mjs +989 -130
- package/dist/behaviors/copy.d.mts +21 -2
- package/dist/behaviors/copy.mjs +1206 -42
- package/dist/behaviors/datatable.d.mts +53 -3
- package/dist/behaviors/datatable.mjs +1963 -207
- package/dist/behaviors/date-picker.d.mts +0 -1
- package/dist/behaviors/date-picker.mjs +1340 -293
- package/dist/behaviors/design.d.mts +54 -0
- package/dist/behaviors/design.mjs +109 -0
- package/dist/behaviors/dropdown.d.mts +5 -6
- package/dist/behaviors/dropdown.mjs +262 -110
- package/dist/behaviors/events.d.mts +120 -3
- package/dist/behaviors/events.mjs +47 -2
- package/dist/behaviors/feedback.d.mts +30 -0
- package/dist/behaviors/feedback.mjs +296 -0
- package/dist/behaviors/focus.d.mts +8 -0
- package/dist/behaviors/focus.mjs +24 -0
- package/dist/behaviors/form-validate.d.mts +102 -0
- package/dist/behaviors/form-validate.mjs +6091 -0
- package/dist/behaviors/i18n.d.mts +789 -0
- package/dist/behaviors/i18n.mjs +1711 -0
- package/dist/behaviors/icons.d.mts +93 -0
- package/dist/behaviors/icons.mjs +113 -0
- package/dist/behaviors/input.d.mts +9 -1
- package/dist/behaviors/input.mjs +1056 -60
- package/dist/behaviors/kb-access.d.mts +1 -1
- package/dist/behaviors/kb-access.mjs +2129 -239
- package/dist/behaviors/kb-acl.d.mts +6 -6
- package/dist/behaviors/kb-acl.mjs +1119 -179
- package/dist/behaviors/kb-answer.mjs +2070 -418
- package/dist/behaviors/kb-audit.d.mts +1 -1
- package/dist/behaviors/kb-audit.mjs +1076 -154
- package/dist/behaviors/kb-canvas.mjs +1100 -177
- package/dist/behaviors/kb-chain.mjs +1022 -100
- package/dist/behaviors/kb-checkpoint.d.mts +1 -1
- package/dist/behaviors/kb-checkpoint.mjs +1319 -169
- package/dist/behaviors/kb-chunks.mjs +1152 -213
- package/dist/behaviors/kb-citation.d.mts +1 -1
- package/dist/behaviors/kb-citation.mjs +1201 -179
- package/dist/behaviors/kb-clarify.mjs +1058 -130
- package/dist/behaviors/kb-conflict.mjs +1041 -119
- package/dist/behaviors/kb-connector.mjs +1104 -176
- package/dist/behaviors/kb-core.d.mts +6 -1
- package/dist/behaviors/kb-core.mjs +1077 -162
- package/dist/behaviors/kb-eval.mjs +1971 -144
- package/dist/behaviors/kb-explain.d.mts +1 -1
- package/dist/behaviors/kb-explain.mjs +1024 -102
- package/dist/behaviors/kb-filter.mjs +2008 -178
- package/dist/behaviors/kb-gap.d.mts +1 -1
- package/dist/behaviors/kb-gap.mjs +1043 -121
- package/dist/behaviors/kb-hittest.d.mts +1 -1
- package/dist/behaviors/kb-hittest.mjs +1093 -150
- package/dist/behaviors/kb-metadata.mjs +1052 -130
- package/dist/behaviors/kb-passage.d.mts +2 -2
- package/dist/behaviors/kb-passage.mjs +1101 -161
- package/dist/behaviors/kb-pipeline.d.mts +2 -2
- package/dist/behaviors/kb-pipeline.mjs +1082 -162
- package/dist/behaviors/kb-qa.mjs +1088 -160
- package/dist/behaviors/kb-rerank.mjs +1047 -114
- package/dist/behaviors/kb-retrieval.mjs +2063 -224
- package/dist/behaviors/kb-review.mjs +1990 -159
- package/dist/behaviors/kb-sandbox.d.mts +1 -1
- package/dist/behaviors/kb-sandbox.mjs +1026 -104
- package/dist/behaviors/kb-segment.mjs +1111 -179
- package/dist/behaviors/kb-select.d.mts +24 -0
- package/dist/behaviors/kb-select.mjs +1989 -0
- package/dist/behaviors/kb-sources.d.mts +1 -1
- package/dist/behaviors/kb-sources.mjs +1084 -170
- package/dist/behaviors/kb-sql.d.mts +1 -1
- package/dist/behaviors/kb-sql.mjs +1143 -226
- package/dist/behaviors/kb-trace.d.mts +1 -1
- package/dist/behaviors/kb-trace.mjs +1042 -128
- package/dist/behaviors/kb-visibility.mjs +1086 -158
- package/dist/behaviors/kb-who-can.mjs +1974 -137
- package/dist/behaviors/mentions.d.mts +93 -0
- package/dist/behaviors/mentions.mjs +2152 -0
- package/dist/behaviors/modal.d.mts +4 -3
- package/dist/behaviors/modal.mjs +1055 -33
- package/dist/behaviors/nav.d.mts +1 -1
- package/dist/behaviors/nav.mjs +6 -6
- package/dist/behaviors/notification.d.mts +16 -8
- package/dist/behaviors/notification.mjs +1615 -265
- package/dist/behaviors/panel.d.mts +4 -0
- package/dist/behaviors/panel.mjs +994 -0
- package/dist/behaviors/popover.d.mts +28 -5
- package/dist/behaviors/popover.mjs +225 -24
- package/dist/behaviors/select.d.mts +5 -2
- package/dist/behaviors/select.mjs +1410 -117
- package/dist/behaviors/sidebar.d.mts +1 -1
- package/dist/behaviors/sidebar.mjs +13 -13
- package/dist/behaviors/slider.d.mts +1 -1
- package/dist/behaviors/slider.mjs +9 -9
- package/dist/behaviors/split-pane.d.mts +1 -1
- package/dist/behaviors/split-pane.mjs +7 -7
- package/dist/behaviors/suggestions.d.mts +27 -0
- package/dist/behaviors/suggestions.mjs +1089 -0
- package/dist/behaviors/svg-parse.d.mts +14 -0
- package/dist/behaviors/svg-parse.mjs +37 -0
- package/dist/behaviors/tabs.d.mts +2 -2
- package/dist/behaviors/tabs.mjs +25 -25
- package/dist/behaviors/tag-input.d.mts +23 -5
- package/dist/behaviors/tag-input.mjs +1359 -104
- package/dist/behaviors/theme-switcher.d.mts +24 -0
- package/dist/behaviors/theme-switcher.mjs +1981 -0
- package/dist/behaviors/theme.d.mts +15 -8
- package/dist/behaviors/theme.mjs +390 -28
- package/dist/behaviors/toast.d.mts +24 -25
- package/dist/behaviors/toast.mjs +1266 -88
- package/dist/behaviors/tooltip.d.mts +4 -0
- package/dist/behaviors/tooltip.mjs +378 -0
- package/dist/behaviors/tree-select.d.mts +69 -0
- package/dist/behaviors/tree-select.mjs +1907 -0
- package/dist/behaviors/tree.d.mts +1 -1
- package/dist/behaviors/tree.mjs +15 -15
- package/dist/behaviors/upload.d.mts +3 -2
- package/dist/behaviors/upload.mjs +1076 -66
- package/dist/cli.mjs +5 -6
- package/dist/components/ai-chat.css +666 -573
- package/dist/components/ai-diff.css +153 -132
- package/dist/components/ai-panel.css +351 -343
- package/dist/components/ai-tool.css +393 -238
- package/dist/components/autocomplete.css +61 -0
- package/dist/components/autocomplete.mjs +3 -0
- package/dist/components/back-top.css +34 -31
- package/dist/components/badge.css +44 -41
- package/dist/components/breadcrumb.css +67 -46
- package/dist/components/btn.css +80 -74
- package/dist/components/card.css +117 -106
- package/dist/components/cascader.css +311 -0
- package/dist/components/cascader.mjs +3 -0
- package/dist/components/chart-area.css +8 -2
- package/dist/components/chart-bar.css +95 -33
- package/dist/components/chart-gauge.css +14 -11
- package/dist/components/chart-graph.css +20 -17
- package/dist/components/chart-heatmap.css +96 -90
- package/dist/components/chart-line.css +8 -3
- package/dist/components/chart-pie.css +9 -6
- package/dist/components/chart-radar.css +8 -5
- package/dist/components/chart-scatter.css +9 -6
- package/dist/components/chart-sparkline.css +5 -2
- package/dist/components/chart-stack.css +14 -11
- package/dist/components/charts.css +164 -73
- package/dist/components/code-block.css +418 -0
- package/dist/components/code-block.mjs +4 -0
- package/dist/components/command-palette.css +138 -117
- package/dist/components/content.css +257 -251
- package/dist/components/copy.css +72 -44
- package/dist/components/datatable.css +423 -181
- package/dist/components/date-picker.css +135 -104
- package/dist/components/empty.css +68 -65
- package/dist/components/feedback.css +201 -183
- package/dist/components/form-validate.css +120 -0
- package/dist/components/form-validate.mjs +3 -0
- package/dist/components/form.css +150 -127
- package/dist/components/icon.css +102 -0
- package/dist/components/icon.mjs +3 -0
- package/dist/components/input.css +159 -104
- package/dist/components/kb-agent.css +188 -173
- package/dist/components/kb-data.css +257 -253
- package/dist/components/kb-ground.css +197 -185
- package/dist/components/kb-ingest.css +334 -350
- package/dist/components/kb-ops.css +265 -259
- package/dist/components/kb-perm.css +260 -271
- package/dist/components/kb-search.css +317 -360
- package/dist/components/kb.css +120 -109
- package/dist/components/layout.css +85 -82
- package/dist/components/material-chinese.css +73 -0
- package/dist/components/material-soviet.css +76 -0
- package/dist/components/material.css +275 -0
- package/dist/components/media.css +220 -166
- package/dist/components/mentions.css +189 -0
- package/dist/components/mentions.mjs +3 -0
- package/dist/components/menu.css +113 -105
- package/dist/components/modal.css +107 -112
- package/dist/components/nav.css +118 -115
- package/dist/components/notification.css +238 -174
- package/dist/components/pagination.css +56 -53
- package/dist/components/panel.css +66 -63
- package/dist/components/panel.mjs +1 -0
- package/dist/components/pill.css +81 -71
- package/dist/components/popover.css +67 -53
- package/dist/components/scroll-area.css +113 -110
- package/dist/components/segmented.css +146 -143
- package/dist/components/select.css +206 -186
- package/dist/components/sidebar.css +137 -127
- package/dist/components/slider.css +117 -114
- package/dist/components/split-pane.css +112 -109
- package/dist/components/stat.css +112 -106
- package/dist/components/steps.css +109 -103
- package/dist/components/switch.css +138 -134
- package/dist/components/table.css +131 -107
- package/dist/components/tabs.css +114 -108
- package/dist/components/tag-input.css +48 -133
- package/dist/components/tag.css +81 -71
- package/dist/components/theme-switcher.css +105 -0
- package/dist/components/theme-switcher.mjs +3 -0
- package/dist/components/toast.css +100 -86
- package/dist/components/toolbar.css +45 -42
- package/dist/components/tooltip.css +102 -43
- package/dist/components/tooltip.mjs +1 -0
- package/dist/components/tree-select.css +416 -0
- package/dist/components/tree-select.mjs +3 -0
- package/dist/components/upload.css +135 -92
- package/dist/fonts/LICENSES/ark-pixel/OFL.txt +96 -0
- package/dist/fonts/LICENSES/cubic-11/OFL.txt +108 -0
- package/dist/fonts/LICENSES/galmuri/LICENSE.txt +93 -0
- package/dist/fonts/OFL.txt +96 -0
- package/dist/fonts/README.md +14 -0
- package/dist/fonts/fusion-pixel-12px-zh-hans.woff2 +0 -0
- package/dist/index.d.mts +28 -14
- package/dist/index.mjs +20705 -9601
- package/dist/react.d.mts +91 -0
- package/dist/react.mjs +8208 -0
- package/dist/registry.json +130 -13
- package/dist/tokens/chinese.css +44 -0
- package/dist/tokens/colors.css +365 -1222
- package/dist/tokens/design.css +109 -0
- package/dist/tokens/dtcg.json +11198 -0
- package/dist/tokens/figma.variables.json +7017 -0
- package/dist/tokens/icon-masks.css +78 -0
- package/dist/tokens/pixel.css +50 -0
- package/dist/tokens/soviet.css +44 -0
- package/dist/tokens/style-profiles.css +36 -547
- package/dist/tokens/themes.json +308 -0
- package/dist/tokens/tokens-studio.json +6728 -0
- package/dist/tokens/typography.css +21 -18
- package/dist/tokens.css +1555 -1801
- package/dist/ui.css +11975 -9831
- package/dist/vue.d.mts +344 -0
- package/dist/vue.mjs +7781 -0
- package/docs/spec/ai-input-experience.md +75 -0
- package/docs/spec/ai-native.md +238 -147
- package/docs/spec/design-philosophy.md +189 -0
- package/docs/spec/design-primitives.md +196 -0
- package/docs/spec/kb-family.md +147 -115
- package/package.json +43 -8
- package/dist/retro-effects.css +0 -255
- package/dist/tokens/retro-effects.css +0 -255
- package/docs/research/2026-10-03-ai-kb-components.md +0 -392
- package/docs/research/2026-10-03-kb-permissions.md +0 -992
|
@@ -1,109 +1,132 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: charts base(图表共享基座,与 behaviors/charts 配套)
|
|
3
4
|
*
|
|
4
|
-
* 仅含所有图表类型共用的契约:.chart 容器、.chart-empty 空态、.chart-legend 图例、
|
|
5
|
-
* .chart-labels 轴标签行、.chart-tone-* 调色盘。
|
|
5
|
+
* 仅含所有图表类型共用的契约:.icen-chart 容器、.icen-chart-empty 空态、.icen-chart-legend 图例、
|
|
6
|
+
* .icen-chart-labels 轴标签行、.chart-tone-* 调色盘。
|
|
6
7
|
* 各图表类型的专属样式在独立 CSS 文件中(chart-line / chart-bar / chart-pie /
|
|
7
8
|
* chart-stack / chart-heatmap / chart-sparkline / chart-gauge / chart-radar / chart-area),
|
|
8
9
|
* 按需引入——kit/chart-<type> 入口会自动带上本基座 + 对应专属 CSS。
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
+
* 重度数据场景契约(renderChart 管线产出):
|
|
12
|
+
* 头部行 .icen-chart-head 附加件——.icen-chart-note(降采样诚实提示「已抽样 N→M 点」)、
|
|
13
|
+
* .icen-chart-zoom-reset(缩放态「重置缩放」chip);
|
|
14
|
+
* .icen-chart-zoom-rect(缩放手势选区,拖拽期挂 body,--icen-token-accent 10% 填充);
|
|
15
|
+
* .icen-chart-skeleton / .icen-chart-skeleton-bar(loading 骨架,复用 base.css 共享
|
|
16
|
+
* keyframes icen-skeleton-pulse;根挂 .icen-chart.is-loading,优先于空态);
|
|
17
|
+
* 标记 .icen-chart-mark-line / .icen-chart-mark-point / .icen-chart-mark-label
|
|
18
|
+
* (spec.marks:SVG 变体属性直出样式仅挡指针事件,vbar DOM 变体在 chart-bar.css)。
|
|
19
|
+
*
|
|
20
|
+
* 单色调通过容器或条上的 --chart-tone 自定义属性注入(默认 var(--icen-token-accent))。
|
|
11
21
|
*/
|
|
12
22
|
|
|
13
|
-
.chart {
|
|
23
|
+
.icen-chart {
|
|
14
24
|
width: 100%;
|
|
15
25
|
display: flex;
|
|
16
26
|
flex-direction: column;
|
|
17
|
-
gap: var(--density-space-sm);
|
|
27
|
+
gap: var(--icen-density-space-sm);
|
|
18
28
|
}
|
|
19
|
-
.chart-empty {
|
|
29
|
+
.icen-chart-empty {
|
|
20
30
|
height: 150px;
|
|
21
31
|
display: flex;
|
|
22
32
|
align-items: center;
|
|
23
33
|
justify-content: center;
|
|
24
|
-
font-size: var(--density-font-size-xs);
|
|
25
|
-
color: var(--token-text-faint);
|
|
34
|
+
font-size: var(--icen-density-font-size-xs);
|
|
35
|
+
color: var(--icen-token-text-faint);
|
|
26
36
|
}
|
|
27
37
|
|
|
28
38
|
/* ── 图例 / 轴标签(donut / stack / vbar / line 共用) ── */
|
|
29
|
-
.chart-legend {
|
|
39
|
+
.icen-chart-legend {
|
|
30
40
|
display: flex;
|
|
31
41
|
flex-direction: column;
|
|
32
42
|
gap: 6px;
|
|
33
43
|
min-width: 0;
|
|
34
44
|
flex: 1;
|
|
35
45
|
}
|
|
36
|
-
.chart-legend-item {
|
|
46
|
+
.icen-chart-legend-item {
|
|
37
47
|
display: flex;
|
|
38
48
|
align-items: center;
|
|
39
|
-
gap: var(--density-space-xs);
|
|
40
|
-
font-size: var(--density-font-size-xs);
|
|
49
|
+
gap: var(--icen-density-space-xs);
|
|
50
|
+
font-size: var(--icen-density-font-size-xs);
|
|
41
51
|
min-width: 0;
|
|
42
52
|
}
|
|
43
|
-
.chart-legend-dot {
|
|
53
|
+
.icen-chart-legend-dot {
|
|
44
54
|
width: 8px;
|
|
45
55
|
height: 8px;
|
|
46
56
|
flex-shrink: 0;
|
|
47
|
-
border-radius: var(--radius-full);
|
|
48
|
-
background: var(--chart-tone, var(--token-accent));
|
|
57
|
+
border-radius: var(--icen-radius-full);
|
|
58
|
+
background: var(--chart-tone, var(--icen-token-accent));
|
|
49
59
|
}
|
|
50
|
-
.chart-legend-label {
|
|
60
|
+
.icen-chart-legend-label {
|
|
51
61
|
flex: 1;
|
|
52
62
|
min-width: 0;
|
|
53
63
|
overflow: hidden;
|
|
54
64
|
text-overflow: ellipsis;
|
|
55
65
|
white-space: nowrap;
|
|
56
|
-
color: var(--token-text-muted);
|
|
66
|
+
color: var(--icen-token-text-muted);
|
|
57
67
|
}
|
|
58
|
-
.chart-legend-value {
|
|
68
|
+
.icen-chart-legend-value {
|
|
59
69
|
flex-shrink: 0;
|
|
60
70
|
font-variant-numeric: tabular-nums;
|
|
61
|
-
color: var(--token-text-faint);
|
|
71
|
+
color: var(--icen-token-text-faint);
|
|
62
72
|
}
|
|
63
73
|
|
|
64
|
-
.chart-labels {
|
|
74
|
+
.icen-chart-labels {
|
|
65
75
|
display: flex;
|
|
66
|
-
gap: var(--density-space-xs);
|
|
67
|
-
margin-top: var(--density-space-xs);
|
|
76
|
+
gap: var(--icen-density-space-xs);
|
|
77
|
+
margin-top: var(--icen-density-space-xs);
|
|
68
78
|
}
|
|
69
|
-
.chart-labels > span {
|
|
79
|
+
.icen-chart-labels > span {
|
|
70
80
|
flex: 1;
|
|
71
81
|
min-width: 0;
|
|
72
82
|
text-align: center;
|
|
73
|
-
font-size: var(--density-font-size-2xs);
|
|
74
|
-
color: var(--token-text-faint);
|
|
83
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
84
|
+
color: var(--icen-token-text-faint);
|
|
75
85
|
overflow: hidden;
|
|
76
86
|
text-overflow: ellipsis;
|
|
77
87
|
white-space: nowrap;
|
|
78
88
|
font-variant-numeric: tabular-nums;
|
|
79
89
|
}
|
|
80
90
|
|
|
91
|
+
/* Point labels use the sampled data index, never equal-width distribution.
|
|
92
|
+
* A bounded cell truncates long labels instead of overlapping adjacent ticks. */
|
|
93
|
+
.icen-chart-labels--points {
|
|
94
|
+
display: block;
|
|
95
|
+
position: relative;
|
|
96
|
+
min-block-size: 1.5em;
|
|
97
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
98
|
+
}
|
|
99
|
+
.icen-chart-labels--points > span {
|
|
100
|
+
position: absolute;
|
|
101
|
+
transform: translateX(-50%);
|
|
102
|
+
}
|
|
103
|
+
|
|
81
104
|
/* ── 调色盘:手写 markup 调色盘;behavior 走 charts.ts PALETTE_VARS 内联同值(两处值需人工同步) ── */
|
|
82
|
-
.chart-tone-1 { --chart-tone: var(--token-accent); }
|
|
83
|
-
.chart-tone-2 { --chart-tone: var(--token-accent-cold); }
|
|
84
|
-
.chart-tone-3 { --chart-tone: var(--token-success); }
|
|
85
|
-
.chart-tone-4 { --chart-tone: var(--token-warning); }
|
|
86
|
-
.chart-tone-5 { --chart-tone: var(--token-info); }
|
|
87
|
-
.chart-tone-6 { --chart-tone: color-mix(in srgb, var(--token-text) 50%, transparent); }
|
|
105
|
+
.icen-chart-tone-1 { --chart-tone: var(--icen-token-accent); }
|
|
106
|
+
.icen-chart-tone-2 { --chart-tone: var(--icen-token-accent-cold); }
|
|
107
|
+
.icen-chart-tone-3 { --chart-tone: var(--icen-token-success); }
|
|
108
|
+
.icen-chart-tone-4 { --chart-tone: var(--icen-token-warning); }
|
|
109
|
+
.icen-chart-tone-5 { --chart-tone: var(--icen-token-info); }
|
|
110
|
+
.icen-chart-tone-6 { --chart-tone: color-mix(in srgb, var(--icen-token-text) 50%, transparent); }
|
|
88
111
|
|
|
89
112
|
/* ═══ 通用层(renderChart):标题 / 内置 tooltip / 标记交互 / 图例切换 ═══ */
|
|
90
113
|
|
|
91
114
|
/* 标题(spec.title 有值时渲染) */
|
|
92
|
-
.chart-title {
|
|
93
|
-
font-size: var(--density-font-size-sm);
|
|
115
|
+
.icen-chart-title {
|
|
116
|
+
font-size: var(--icen-density-font-size-sm);
|
|
94
117
|
font-weight: 600;
|
|
95
|
-
color: var(--token-text);
|
|
118
|
+
color: var(--icen-token-text);
|
|
96
119
|
}
|
|
97
120
|
|
|
98
121
|
/* 头部行(renderChart 渲染):标题 + 图例可见性小眼睛 */
|
|
99
|
-
.chart-head {
|
|
122
|
+
.icen-chart-head {
|
|
100
123
|
display: flex;
|
|
101
124
|
align-items: center;
|
|
102
125
|
justify-content: space-between;
|
|
103
|
-
gap: var(--density-space-sm);
|
|
126
|
+
gap: var(--icen-density-space-sm);
|
|
104
127
|
min-height: 24px;
|
|
105
128
|
}
|
|
106
|
-
.chart-legend-eye {
|
|
129
|
+
.icen-chart-legend-eye {
|
|
107
130
|
display: inline-flex;
|
|
108
131
|
align-items: center;
|
|
109
132
|
justify-content: center;
|
|
@@ -111,65 +134,131 @@
|
|
|
111
134
|
height: 22px;
|
|
112
135
|
padding: 0;
|
|
113
136
|
border: 0;
|
|
114
|
-
border-radius: var(--radius-xs);
|
|
137
|
+
border-radius: var(--icen-radius-xs);
|
|
115
138
|
background: transparent;
|
|
116
|
-
color: var(--token-text-faint);
|
|
139
|
+
color: var(--icen-token-text-faint);
|
|
117
140
|
cursor: pointer;
|
|
118
141
|
transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast);
|
|
119
142
|
}
|
|
120
|
-
.chart-legend-eye:hover { color: var(--token-text); background: var(--token-fill-1); }
|
|
121
|
-
.chart-legend-eye:focus-visible { outline: none; box-shadow: var(--icen-ring); }
|
|
122
|
-
.chart-legend-eye svg { width: 13px; height: 13px; }
|
|
143
|
+
.icen-chart-legend-eye:hover { color: var(--icen-token-text); background: var(--icen-token-fill-1); }
|
|
144
|
+
.icen-chart-legend-eye:focus-visible { outline: none; box-shadow: var(--icen-ring); }
|
|
145
|
+
.icen-chart-legend-eye svg { width: 13px; height: 13px; }
|
|
146
|
+
@media (pointer: coarse) {
|
|
147
|
+
.icen-chart-legend-eye { min-inline-size: 44px; min-block-size: 44px; }
|
|
148
|
+
.icen-chart-legend-toggle-item { min-block-size: 44px; }
|
|
149
|
+
}
|
|
123
150
|
|
|
124
|
-
/* 图例统一隐藏:容器级继承——data-legend-hidden 一条选择器覆盖全部图型的图例 */
|
|
125
|
-
[data-legend-hidden='true'] .chart-legend,
|
|
126
|
-
[data-legend-hidden='true'] .chart-legend--toggle,
|
|
127
|
-
[data-legend-hidden='true'] .chart-heatmap-legend {
|
|
151
|
+
/* 图例统一隐藏:容器级继承——data-icen-legend-hidden 一条选择器覆盖全部图型的图例 */
|
|
152
|
+
[data-icen-legend-hidden='true'] .icen-chart-legend,
|
|
153
|
+
[data-icen-legend-hidden='true'] .icen-chart-legend--toggle,
|
|
154
|
+
[data-icen-legend-hidden='true'] .icen-chart-heatmap-legend {
|
|
128
155
|
display: none;
|
|
129
156
|
}
|
|
130
157
|
|
|
131
158
|
/* 内置 tooltip:portal 到 body 的单例,position: fixed 跟随指针 */
|
|
132
|
-
.chart-tooltip {
|
|
159
|
+
.icen-chart-tooltip {
|
|
133
160
|
position: fixed;
|
|
134
|
-
z-index: var(--z-tooltip);
|
|
161
|
+
z-index: var(--icen-z-tooltip);
|
|
135
162
|
max-width: 280px;
|
|
136
163
|
padding: 3px 8px;
|
|
137
|
-
border-radius: var(--radius-sm);
|
|
138
|
-
background: var(--token-card-strong);
|
|
139
|
-
border: 1px solid var(--token-line);
|
|
140
|
-
box-shadow: var(--token-shadow-elevated);
|
|
141
|
-
font-size: var(--density-font-size-xs);
|
|
164
|
+
border-radius: var(--icen-radius-sm);
|
|
165
|
+
background: var(--icen-token-card-strong);
|
|
166
|
+
border: 1px solid var(--icen-token-line);
|
|
167
|
+
box-shadow: var(--icen-token-shadow-elevated);
|
|
168
|
+
font-size: var(--icen-density-font-size-xs);
|
|
142
169
|
font-variant-numeric: tabular-nums;
|
|
143
|
-
color: var(--token-text);
|
|
170
|
+
color: var(--icen-token-text);
|
|
144
171
|
pointer-events: none;
|
|
145
172
|
}
|
|
146
|
-
.chart-tooltip[hidden] { display: none; }
|
|
173
|
+
.icen-chart-tooltip[hidden] { display: none; }
|
|
147
174
|
|
|
148
175
|
/* 数据标记(各图型的条/点/段/格):交互态由委托层挂 .is-hover,图例切换挂 .is-off */
|
|
149
|
-
[data-chart-mark] { cursor: pointer; }
|
|
150
|
-
[data-chart-mark].is-hover { filter: brightness(1.12); }
|
|
151
|
-
[data-chart-mark].is-off { opacity: 0.16; pointer-events: none; }
|
|
152
|
-
svg circle[data-chart-mark].is-hover { stroke-width: 3; }
|
|
176
|
+
[data-icen-chart-mark] { cursor: pointer; }
|
|
177
|
+
[data-icen-chart-mark].is-hover { filter: brightness(1.12); }
|
|
178
|
+
[data-icen-chart-mark].is-off { opacity: 0.16; pointer-events: none; }
|
|
179
|
+
svg circle[data-icen-chart-mark].is-hover { stroke-width: 3; }
|
|
153
180
|
|
|
154
181
|
/* 可切换图例:行可点(Enter/Space 等价),.is-off 划线淡化 */
|
|
155
|
-
.chart-legend--toggle .chart-legend-toggle-item {
|
|
182
|
+
.icen-chart-legend--toggle .icen-chart-legend-toggle-item {
|
|
156
183
|
cursor: pointer;
|
|
157
|
-
border-radius: var(--radius-xs);
|
|
184
|
+
border-radius: var(--icen-radius-xs);
|
|
158
185
|
padding: 2px 4px;
|
|
159
186
|
margin: -2px -4px;
|
|
160
187
|
transition: background-color var(--icen-tx-fast);
|
|
161
188
|
}
|
|
162
|
-
.chart-legend--toggle .chart-legend-toggle-item:hover { background: var(--token-fill-1); }
|
|
163
|
-
.chart-legend--toggle .chart-legend-toggle-item:focus-visible {
|
|
189
|
+
.icen-chart-legend--toggle .icen-chart-legend-toggle-item:hover { background: var(--icen-token-fill-1); }
|
|
190
|
+
.icen-chart-legend--toggle .icen-chart-legend-toggle-item:focus-visible {
|
|
164
191
|
outline: none;
|
|
165
192
|
box-shadow: var(--icen-ring);
|
|
166
193
|
}
|
|
167
|
-
.chart-legend--toggle .is-off .chart-legend-label,
|
|
168
|
-
.chart-legend--toggle .is-off .chart-legend-value {
|
|
169
|
-
color: var(--token-text-faint);
|
|
194
|
+
.icen-chart-legend--toggle .is-off .icen-chart-legend-label,
|
|
195
|
+
.icen-chart-legend--toggle .is-off .icen-chart-legend-value {
|
|
196
|
+
color: var(--icen-token-text-faint);
|
|
170
197
|
text-decoration: line-through;
|
|
171
198
|
}
|
|
172
|
-
.chart-legend--toggle .is-off .chart-legend-dot { opacity: 0.3; }
|
|
199
|
+
.icen-chart-legend--toggle .is-off .icen-chart-legend-dot { opacity: 0.3; }
|
|
200
|
+
|
|
201
|
+
/* ═══ 重度数据场景(renderChart 管线产出)═══ */
|
|
202
|
+
|
|
203
|
+
/* 头部行附加件:降采样诚实提示(faint)+ 缩放态「重置缩放」chip */
|
|
204
|
+
.icen-chart-note {
|
|
205
|
+
flex: 1;
|
|
206
|
+
min-width: 0;
|
|
207
|
+
overflow: hidden;
|
|
208
|
+
text-overflow: ellipsis;
|
|
209
|
+
white-space: nowrap;
|
|
210
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
211
|
+
color: var(--icen-token-text-faint);
|
|
212
|
+
}
|
|
213
|
+
.icen-chart-zoom-reset {
|
|
214
|
+
flex-shrink: 0;
|
|
215
|
+
padding: 1px 8px;
|
|
216
|
+
border: 1px solid var(--icen-token-line);
|
|
217
|
+
border-radius: var(--icen-radius-full);
|
|
218
|
+
background: var(--icen-token-fill-1);
|
|
219
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
220
|
+
color: var(--icen-token-text-muted);
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast);
|
|
223
|
+
}
|
|
224
|
+
.icen-chart-zoom-reset:hover { color: var(--icen-token-text); background: var(--icen-token-fill-2); }
|
|
225
|
+
.icen-chart-zoom-reset:focus-visible { outline: none; box-shadow: var(--icen-ring); }
|
|
226
|
+
|
|
227
|
+
/* 缩放手势选区(拖拽期挂 body,position:fixed;accent 10% 填充) */
|
|
228
|
+
.icen-chart-zoom-rect {
|
|
229
|
+
position: fixed;
|
|
230
|
+
z-index: var(--icen-z-tooltip);
|
|
231
|
+
border: 1px solid var(--icen-token-accent);
|
|
232
|
+
background: color-mix(in srgb, var(--icen-token-accent) 10%, transparent);
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* 加载态骨架(复用 base.css 共享 keyframes icen-skeleton-pulse,不各自重定义) */
|
|
237
|
+
.icen-chart-skeleton {
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
justify-content: center;
|
|
241
|
+
gap: var(--icen-density-space-sm);
|
|
242
|
+
height: 150px;
|
|
243
|
+
}
|
|
244
|
+
.icen-chart-skeleton-bar {
|
|
245
|
+
height: 10px;
|
|
246
|
+
border-radius: var(--icen-radius-sm);
|
|
247
|
+
background: color-mix(in srgb, var(--icen-token-text) 8%, transparent);
|
|
248
|
+
animation: icen-skeleton-pulse var(--skeleton-duration, 2s) ease-in-out infinite;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* 标记(spec.marks):SVG 变体(line/area)样式由 behaviors 属性直出,此处只挡指针
|
|
252
|
+
事件(防遮 tooltip 与 mark 点击);vbar DOM 变体见 chart-bar.css */
|
|
253
|
+
svg .icen-chart-mark-line,
|
|
254
|
+
svg .icen-chart-mark-point,
|
|
255
|
+
svg .icen-chart-mark-label {
|
|
256
|
+
pointer-events: none;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@media (prefers-reduced-motion: reduce) {
|
|
260
|
+
.icen-chart-skeleton-bar { animation: none; }
|
|
261
|
+
}
|
|
173
262
|
|
|
174
263
|
/* ═══ 知识图谱 / 嵌入地图追加区(graph 专属在独立 chart-graph.css;此处为 map 变体)═══ */
|
|
175
264
|
|
|
@@ -177,28 +266,30 @@ svg circle[data-chart-mark].is-hover { stroke-width: 3; }
|
|
|
177
266
|
* chart-map:embedding 2D 散点(renderMap)—— renderScatter 的去轴变体:
|
|
178
267
|
* 无刻度文字、只留细虚线网格(预投影坐标的刻度无意义);点 4px 半透明
|
|
179
268
|
* (fill-opacity .7,高密度层叠可辨)。DOM 由 behaviors/charts.ts 的
|
|
180
|
-
* renderMap 构建(.chart-map > svg > g.chart-map-point > dot + hit + title)。
|
|
269
|
+
* renderMap 构建(.icen-chart-map > svg > g.icen-chart-map-point > dot + hit + title)。
|
|
181
270
|
* 样式并入基座(map 无独立 css,与 chart-calendar 并入 chart-heatmap 同策略)。
|
|
182
271
|
*/
|
|
183
|
-
.chart-map svg {
|
|
272
|
+
.icen-chart-map svg {
|
|
184
273
|
width: 100%;
|
|
185
274
|
height: auto;
|
|
186
275
|
display: block;
|
|
187
276
|
}
|
|
188
|
-
.chart-map .chart-map-point {
|
|
277
|
+
.icen-chart-map .icen-chart-map-point {
|
|
189
278
|
cursor: pointer;
|
|
190
279
|
}
|
|
191
|
-
.chart-map-dot {
|
|
280
|
+
.icen-chart-map-dot {
|
|
192
281
|
transition: transform var(--icen-tx-fast);
|
|
193
282
|
transform-box: fill-box;
|
|
194
283
|
transform-origin: center;
|
|
195
284
|
}
|
|
196
|
-
.chart-map-point.is-hover .chart-map-dot {
|
|
285
|
+
.icen-chart-map-point.is-hover .icen-chart-map-dot {
|
|
197
286
|
transform: scale(1.5);
|
|
198
287
|
}
|
|
199
288
|
|
|
200
289
|
@media (prefers-reduced-motion: reduce) {
|
|
201
|
-
.chart-map-dot {
|
|
290
|
+
.icen-chart-map-dot {
|
|
202
291
|
transition: none;
|
|
203
292
|
}
|
|
204
293
|
}
|
|
294
|
+
|
|
295
|
+
}
|