@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
package/dist/components/stat.css
CHANGED
|
@@ -1,232 +1,238 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: stat(指标卡)
|
|
3
4
|
*
|
|
4
5
|
* 完整契约:
|
|
5
|
-
* <div class="stat-grid [stat-grid--2|stat-grid--3|stat-grid--4]">
|
|
6
|
-
* <div class="stat-card [.stat-card--interactive] [.stat-card--horizontal]">
|
|
7
|
-
* <div class="stat-head">
|
|
8
|
-
* <span class="stat-label">用户总数</span>
|
|
9
|
-
* <span class="stat-icon [.icon--success|.icon--warning|.icon--error|.icon--info]>…svg…</span>
|
|
6
|
+
* <div class="icen-stat-grid [icen-stat-grid--2|icen-stat-grid--3|icen-stat-grid--4]">
|
|
7
|
+
* <div class="icen-stat-card [.icen-stat-card--interactive] [.icen-stat-card--horizontal]">
|
|
8
|
+
* <div class="icen-stat-head">
|
|
9
|
+
* <span class="icen-stat-label">用户总数</span>
|
|
10
|
+
* <span class="icen-stat-icon [.icen-icon--success|.icen-icon--warning|.icen-icon--error|.icen-icon--info]>…svg…</span>
|
|
10
11
|
* </div>
|
|
11
|
-
* <div class="stat-body">
|
|
12
|
-
* <div class="stat-num [--accent|--warning|--error|--info]">0</div>
|
|
13
|
-
* <div class="stat-delta [.up|.down|.flat]"> ← 可选趋势
|
|
12
|
+
* <div class="icen-stat-body">
|
|
13
|
+
* <div class="icen-stat-num [--accent|--warning|--error|--info]">0</div>
|
|
14
|
+
* <div class="icen-stat-delta [.icen-up|.icen-down|.icen-flat]"> ← 可选趋势
|
|
14
15
|
* <svg>…arrow…</svg> +12.4%
|
|
15
|
-
* <span class="stat-period">比上周</span>
|
|
16
|
+
* <span class="icen-stat-period">比上周</span>
|
|
16
17
|
* </div>
|
|
17
18
|
* </div>
|
|
18
|
-
* <div class="stat-spark">…svg mini chart…</div> ← 可选:迷你折线/柱状
|
|
19
|
-
* <div class="stat-progress"> ← 可选:进度环
|
|
20
|
-
* <svg class="stat-ring" viewBox="0 0 36 36">
|
|
21
|
-
* <circle class="stat-ring-track" cx="18" cy="18" r="15.5" />
|
|
22
|
-
* <circle class="stat-ring-fill" cx="18" cy="18" r="15.5" style="stroke-dasharray:75,100" />
|
|
19
|
+
* <div class="icen-stat-spark">…svg mini icen-chart…</div> ← 可选:迷你折线/柱状
|
|
20
|
+
* <div class="icen-stat-progress"> ← 可选:进度环
|
|
21
|
+
* <svg class="icen-stat-ring" viewBox="0 0 36 36">
|
|
22
|
+
* <circle class="icen-stat-ring-track" cx="18" cy="18" r="15.5" />
|
|
23
|
+
* <circle class="icen-stat-ring-fill" cx="18" cy="18" r="15.5" style="stroke-dasharray:75,100" />
|
|
23
24
|
* </svg>
|
|
24
25
|
* </div>
|
|
25
26
|
* </div>
|
|
26
27
|
* </div>
|
|
27
28
|
*
|
|
28
|
-
* .stat-card--horizontal:横向布局(数字在右,标签在左),适合 dashboard 顶栏。
|
|
29
|
-
* .stat-spark:内嵌迷你折线/柱状图(消费方可引用 chart-sparkline.css 或自绘 SVG)。
|
|
30
|
-
* .stat-ring:进度环(SVG stroke-dasharray 控制百分比,0-100)。
|
|
29
|
+
* .icen-stat-card--horizontal:横向布局(数字在右,标签在左),适合 dashboard 顶栏。
|
|
30
|
+
* .icen-stat-spark:内嵌迷你折线/柱状图(消费方可引用 chart-sparkline.css 或自绘 SVG)。
|
|
31
|
+
* .icen-stat-ring:进度环(SVG stroke-dasharray 控制百分比,0-100)。
|
|
31
32
|
*/
|
|
32
33
|
|
|
33
|
-
.stat-grid {
|
|
34
|
+
.icen-stat-grid {
|
|
34
35
|
display: grid;
|
|
35
36
|
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
36
|
-
gap: var(--density-space-md);
|
|
37
|
-
margin-bottom: var(--density-space-lg);
|
|
37
|
+
gap: var(--icen-density-space-md);
|
|
38
|
+
margin-bottom: var(--icen-density-space-lg);
|
|
38
39
|
}
|
|
39
|
-
.stat-grid--2 { grid-template-columns: repeat(2, 1fr); }
|
|
40
|
-
.stat-grid--3 { grid-template-columns: repeat(3, 1fr); }
|
|
41
|
-
.stat-grid--4 { grid-template-columns: repeat(4, 1fr); }
|
|
40
|
+
.icen-stat-grid--2 { grid-template-columns: repeat(2, 1fr); }
|
|
41
|
+
.icen-stat-grid--3 { grid-template-columns: repeat(3, 1fr); }
|
|
42
|
+
.icen-stat-grid--4 { grid-template-columns: repeat(4, 1fr); }
|
|
42
43
|
|
|
43
|
-
.stat-card {
|
|
44
|
+
.icen-stat-card {
|
|
44
45
|
display: flex;
|
|
45
46
|
flex-direction: column;
|
|
46
|
-
gap: var(--density-space-xs);
|
|
47
|
-
background: var(--token-surface);
|
|
48
|
-
border: 1px solid var(--token-line-soft);
|
|
49
|
-
border-radius: var(--radius-lg);
|
|
50
|
-
padding: var(--density-space-md);
|
|
51
|
-
box-shadow: var(--token-shadow-elevated);
|
|
47
|
+
gap: var(--icen-density-space-xs);
|
|
48
|
+
background: var(--icen-token-surface);
|
|
49
|
+
border: 1px solid var(--icen-token-line-soft);
|
|
50
|
+
border-radius: var(--icen-radius-lg);
|
|
51
|
+
padding: var(--icen-density-space-md);
|
|
52
|
+
box-shadow: var(--icen-token-shadow-elevated);
|
|
52
53
|
transition:
|
|
53
54
|
border-color var(--icen-tx-fast),
|
|
54
55
|
box-shadow var(--icen-tx-fast),
|
|
55
56
|
transform var(--icen-tx-fast);
|
|
56
57
|
}
|
|
57
|
-
.stat-card--interactive {
|
|
58
|
+
.icen-stat-card--interactive {
|
|
58
59
|
cursor: pointer;
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
/* hover 抬升仅可悬停设备生效(触屏关闭,AGENTS 动效守卫) */
|
|
62
|
+
@media (hover: hover) and (pointer: fine) {
|
|
63
|
+
.icen-stat-card--interactive:hover {
|
|
64
|
+
transform: translateY(-1px);
|
|
65
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 26%, var(--icen-token-outline-soft));
|
|
66
|
+
box-shadow: var(--icen-token-shadow-card);
|
|
67
|
+
}
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
.stat-head {
|
|
70
|
+
.icen-stat-head {
|
|
67
71
|
display: flex;
|
|
68
72
|
align-items: center;
|
|
69
73
|
justify-content: space-between;
|
|
70
|
-
gap: var(--density-space-sm);
|
|
74
|
+
gap: var(--icen-density-space-sm);
|
|
71
75
|
}
|
|
72
|
-
.stat-label {
|
|
73
|
-
color: var(--token-text-faint);
|
|
74
|
-
font-size: var(--density-font-size-xs);
|
|
76
|
+
.icen-stat-label {
|
|
77
|
+
color: var(--icen-token-text-faint);
|
|
78
|
+
font-size: var(--icen-density-font-size-xs);
|
|
75
79
|
letter-spacing: 0.05em;
|
|
76
80
|
text-transform: uppercase;
|
|
77
81
|
}
|
|
78
|
-
.stat-icon {
|
|
82
|
+
.icen-stat-icon {
|
|
79
83
|
display: inline-flex;
|
|
80
84
|
align-items: center;
|
|
81
85
|
justify-content: center;
|
|
82
86
|
width: 24px;
|
|
83
87
|
height: 24px;
|
|
84
|
-
border-radius: var(--radius-sm);
|
|
85
|
-
background: var(--token-accent-subtle);
|
|
86
|
-
color: var(--token-accent);
|
|
87
|
-
}
|
|
88
|
-
.stat-icon.icon--success { background: color-mix(in srgb, var(--token-success) 14%, transparent); color: var(--token-success); }
|
|
89
|
-
.stat-icon.icon--warning { background: color-mix(in srgb, var(--token-warning) 14%, transparent); color: var(--token-warning); }
|
|
90
|
-
.stat-icon.icon--error { background: color-mix(in srgb, var(--token-error) 14%, transparent); color: var(--token-error); }
|
|
91
|
-
.stat-icon.icon--info { background: color-mix(in srgb, var(--token-info) 14%, transparent); color: var(--token-info); }
|
|
92
|
-
.stat-icon svg { width: 14px; height: 14px; }
|
|
88
|
+
border-radius: var(--icen-radius-sm);
|
|
89
|
+
background: var(--icen-token-accent-subtle);
|
|
90
|
+
color: var(--icen-token-accent);
|
|
91
|
+
}
|
|
92
|
+
.icen-stat-icon.icen-icon--success { background: color-mix(in srgb, var(--icen-token-success) 14%, transparent); color: var(--icen-token-success); }
|
|
93
|
+
.icen-stat-icon.icen-icon--warning { background: color-mix(in srgb, var(--icen-token-warning) 14%, transparent); color: var(--icen-token-warning); }
|
|
94
|
+
.icen-stat-icon.icen-icon--error { background: color-mix(in srgb, var(--icen-token-error) 14%, transparent); color: var(--icen-token-error); }
|
|
95
|
+
.icen-stat-icon.icen-icon--info { background: color-mix(in srgb, var(--icen-token-info) 14%, transparent); color: var(--icen-token-info); }
|
|
96
|
+
.icen-stat-icon svg { width: 14px; height: 14px; }
|
|
93
97
|
|
|
94
98
|
/* ── 内容体(数字 + 趋势) ── */
|
|
95
|
-
.stat-body {
|
|
99
|
+
.icen-stat-body {
|
|
96
100
|
display: flex;
|
|
97
101
|
flex-direction: column;
|
|
98
102
|
gap: 2px;
|
|
99
103
|
}
|
|
100
104
|
|
|
101
|
-
.stat-num {
|
|
102
|
-
font-size: var(--density-font-size-2xl);
|
|
105
|
+
.icen-stat-num {
|
|
106
|
+
font-size: var(--icen-density-font-size-2xl);
|
|
103
107
|
font-weight: 700;
|
|
104
108
|
line-height: 1.2;
|
|
105
109
|
font-variant-numeric: tabular-nums lining-nums;
|
|
106
|
-
color: var(--token-text);
|
|
110
|
+
color: var(--icen-token-text);
|
|
107
111
|
word-break: break-all;
|
|
108
112
|
}
|
|
109
|
-
.stat-num--accent { color: var(--token-accent); }
|
|
110
|
-
.stat-num--warning { color: var(--token-warning); }
|
|
111
|
-
.stat-num--error { color: var(--token-error); }
|
|
112
|
-
.stat-num--info { color: var(--token-info); }
|
|
113
|
+
.icen-stat-num--accent { color: var(--icen-token-accent); }
|
|
114
|
+
.icen-stat-num--warning { color: var(--icen-token-warning); }
|
|
115
|
+
.icen-stat-num--error { color: var(--icen-token-error); }
|
|
116
|
+
.icen-stat-num--info { color: var(--icen-token-info); }
|
|
113
117
|
|
|
114
|
-
.stat-delta {
|
|
118
|
+
.icen-stat-delta {
|
|
115
119
|
display: inline-flex;
|
|
116
120
|
align-items: center;
|
|
117
121
|
gap: 4px;
|
|
118
|
-
font-size: var(--density-font-size-xs);
|
|
119
|
-
color: var(--token-text-muted);
|
|
122
|
+
font-size: var(--icen-density-font-size-xs);
|
|
123
|
+
color: var(--icen-token-text-muted);
|
|
120
124
|
font-variant-numeric: tabular-nums;
|
|
121
125
|
}
|
|
122
|
-
.stat-delta svg { width: 12px; height: 12px; }
|
|
123
|
-
.stat-delta.up { color: var(--token-success); }
|
|
124
|
-
.stat-delta.down { color: var(--token-error); }
|
|
125
|
-
.stat-delta.flat { color: var(--token-text-faint); }
|
|
126
|
-
.stat-period {
|
|
127
|
-
color: var(--token-text-faint);
|
|
128
|
-
margin-
|
|
126
|
+
.icen-stat-delta svg { width: 12px; height: 12px; }
|
|
127
|
+
.icen-stat-delta.icen-up { color: var(--icen-token-success); }
|
|
128
|
+
.icen-stat-delta.icen-down { color: var(--icen-token-error); }
|
|
129
|
+
.icen-stat-delta.icen-flat { color: var(--icen-token-text-faint); }
|
|
130
|
+
.icen-stat-period {
|
|
131
|
+
color: var(--icen-token-text-faint);
|
|
132
|
+
margin-inline-start: var(--icen-density-space-xs);
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
/* 紧凑变体 */
|
|
132
|
-
.stat-card--sm {
|
|
133
|
-
padding: var(--density-space-sm);
|
|
136
|
+
.icen-stat-card--sm {
|
|
137
|
+
padding: var(--icen-density-space-sm);
|
|
134
138
|
gap: 2px;
|
|
135
139
|
}
|
|
136
|
-
.stat-card--sm .stat-num { font-size: var(--density-font-size-lg); }
|
|
137
|
-
.stat-card--sm .stat-label { font-size: var(--density-font-size-2xs); }
|
|
140
|
+
.icen-stat-card--sm .icen-stat-num { font-size: var(--icen-density-font-size-lg); }
|
|
141
|
+
.icen-stat-card--sm .icen-stat-label { font-size: var(--icen-density-font-size-2xs); }
|
|
138
142
|
|
|
139
|
-
/* ── 横向布局(dashboard
|
|
140
|
-
.stat-card--horizontal {
|
|
143
|
+
/* ── 横向布局(dashboard 顶栏:标签起始缘 + 数字行内末端) ── */
|
|
144
|
+
.icen-stat-card--horizontal {
|
|
141
145
|
flex-direction: row;
|
|
142
146
|
align-items: center;
|
|
143
147
|
justify-content: space-between;
|
|
144
|
-
gap: var(--density-space-md);
|
|
148
|
+
gap: var(--icen-density-space-md);
|
|
145
149
|
}
|
|
146
|
-
.stat-card--horizontal .stat-head {
|
|
150
|
+
.icen-stat-card--horizontal .icen-stat-head {
|
|
147
151
|
flex-direction: column;
|
|
148
152
|
align-items: flex-start;
|
|
149
153
|
gap: 2px;
|
|
150
154
|
flex: 1;
|
|
151
|
-
min-
|
|
155
|
+
min-inline-size: 0;
|
|
152
156
|
}
|
|
153
|
-
.stat-card--horizontal .stat-body {
|
|
154
|
-
text-align:
|
|
157
|
+
.icen-stat-card--horizontal .icen-stat-body {
|
|
158
|
+
text-align: end;
|
|
155
159
|
flex-shrink: 0;
|
|
156
160
|
}
|
|
157
|
-
.stat-card--horizontal .stat-delta {
|
|
161
|
+
.icen-stat-card--horizontal .icen-stat-delta {
|
|
158
162
|
justify-content: flex-end;
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
/* ── 迷你图槽(stat-spark)── */
|
|
162
|
-
.stat-spark {
|
|
163
|
-
margin-top: var(--density-space-xs);
|
|
166
|
+
.icen-stat-spark {
|
|
167
|
+
margin-top: var(--icen-density-space-xs);
|
|
164
168
|
height: 28px;
|
|
165
169
|
width: 100%;
|
|
166
170
|
}
|
|
167
|
-
.stat-spark svg {
|
|
171
|
+
.icen-stat-spark svg {
|
|
168
172
|
width: 100%;
|
|
169
173
|
height: 100%;
|
|
170
174
|
display: block;
|
|
171
175
|
}
|
|
172
|
-
.stat-card--horizontal .stat-spark {
|
|
176
|
+
.icen-stat-card--horizontal .icen-stat-spark {
|
|
173
177
|
margin-top: 0;
|
|
174
178
|
width: 80px;
|
|
175
179
|
flex-shrink: 0;
|
|
176
180
|
}
|
|
177
181
|
|
|
178
182
|
/* ── 进度环 ── */
|
|
179
|
-
.stat-progress {
|
|
183
|
+
.icen-stat-progress {
|
|
180
184
|
display: flex;
|
|
181
185
|
align-items: center;
|
|
182
186
|
justify-content: center;
|
|
183
|
-
margin-top: var(--density-space-xs);
|
|
187
|
+
margin-top: var(--icen-density-space-xs);
|
|
184
188
|
}
|
|
185
|
-
.stat-card--horizontal .stat-progress {
|
|
189
|
+
.icen-stat-card--horizontal .icen-stat-progress {
|
|
186
190
|
margin-top: 0;
|
|
187
191
|
flex-shrink: 0;
|
|
188
192
|
}
|
|
189
|
-
.stat-ring {
|
|
193
|
+
.icen-stat-ring {
|
|
190
194
|
width: 48px;
|
|
191
195
|
height: 48px;
|
|
192
196
|
transform: rotate(-90deg);
|
|
193
197
|
}
|
|
194
|
-
.stat-ring-track {
|
|
198
|
+
.icen-stat-ring-track {
|
|
195
199
|
fill: none;
|
|
196
|
-
stroke: var(--token-fill-2);
|
|
200
|
+
stroke: var(--icen-token-fill-2);
|
|
197
201
|
stroke-width: 3;
|
|
198
202
|
}
|
|
199
|
-
.stat-ring-fill {
|
|
203
|
+
.icen-stat-ring-fill {
|
|
200
204
|
fill: none;
|
|
201
|
-
stroke: var(--token-accent);
|
|
205
|
+
stroke: var(--icen-token-accent);
|
|
202
206
|
stroke-width: 3;
|
|
203
207
|
stroke-linecap: round;
|
|
204
208
|
stroke-dasharray: 0, 100;
|
|
205
|
-
transition: stroke-dasharray var(--icen-tx-slow) var(--ease-out);
|
|
209
|
+
transition: stroke-dasharray var(--icen-tx-slow) var(--icen-ease-out);
|
|
206
210
|
}
|
|
207
|
-
.stat-card .stat-ring-fill { stroke: var(--token-accent); }
|
|
211
|
+
.icen-stat-card .icen-stat-ring-fill { stroke: var(--icen-token-accent); }
|
|
208
212
|
|
|
209
213
|
/* ── 数字带前缀/后缀 ── */
|
|
210
|
-
.stat-num-prefix,
|
|
211
|
-
.stat-num-suffix {
|
|
214
|
+
.icen-stat-num-prefix,
|
|
215
|
+
.icen-stat-num-suffix {
|
|
212
216
|
font-size: 0.6em;
|
|
213
217
|
font-weight: 500;
|
|
214
|
-
color: var(--token-text-faint);
|
|
218
|
+
color: var(--icen-token-text-faint);
|
|
215
219
|
margin: 0 1px;
|
|
216
220
|
}
|
|
217
221
|
|
|
218
222
|
/* ── 加载态骨架(脉冲 keyframes 见 base.css 的 icen-skeleton-pulse) ── */
|
|
219
|
-
.stat-card.is-loading .stat-num,
|
|
220
|
-
.stat-card.is-loading .stat-delta {
|
|
223
|
+
.icen-stat-card.is-loading .icen-stat-num,
|
|
224
|
+
.icen-stat-card.is-loading .icen-stat-delta {
|
|
221
225
|
color: transparent;
|
|
222
|
-
background: var(--token-fill-2);
|
|
223
|
-
border-radius: var(--radius-xs);
|
|
226
|
+
background: var(--icen-token-fill-2);
|
|
227
|
+
border-radius: var(--icen-radius-xs);
|
|
224
228
|
animation: icen-skeleton-pulse var(--stat-skeleton-duration, 1.5s) ease-in-out infinite;
|
|
225
229
|
}
|
|
226
|
-
.stat-card.is-loading .stat-num { height: 28px; }
|
|
227
|
-
.stat-card.is-loading .stat-delta { height: 14px; width: 60%; }
|
|
230
|
+
.icen-stat-card.is-loading .icen-stat-num { height: 28px; }
|
|
231
|
+
.icen-stat-card.is-loading .icen-stat-delta { height: 14px; width: 60%; }
|
|
228
232
|
@media (prefers-reduced-motion: reduce) {
|
|
229
|
-
.stat-card.is-loading .stat-num,
|
|
230
|
-
.stat-card.is-loading .stat-delta { animation: none; }
|
|
231
|
-
.stat-ring-fill { transition: none; }
|
|
233
|
+
.icen-stat-card.is-loading .icen-stat-num,
|
|
234
|
+
.icen-stat-card.is-loading .icen-stat-delta { animation: none; }
|
|
235
|
+
.icen-stat-ring-fill { transition: none; }
|
|
236
|
+
}
|
|
237
|
+
|
|
232
238
|
}
|