@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/kb.css
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — kb 族共享视觉基座(与 docs/spec/kb-family.md §2 配套)
|
|
3
4
|
*
|
|
@@ -5,169 +6,173 @@
|
|
|
5
6
|
* kb-search/kb-data/kb-ops/kb-agent.css)不再重复定义这里的原语。
|
|
6
7
|
*
|
|
7
8
|
* 设计纪律(族内一致性硬约束):
|
|
8
|
-
* - 数字一律 .kb-num(等宽 + tabular-nums);元信息 .kb-meta(11.5px faint)
|
|
9
|
-
* - 证据引用体 .kb-quote
|
|
10
|
-
* - 行基元 .kb-row(28px 节奏,data-density="compact" 收 24px)
|
|
11
|
-
* - 分数条 .kb-score(序数呈现:条长=排序信号,不标榜比例语义)
|
|
12
|
-
* - 状态点 .kb-dot(语义色,只此一处给状态上色)
|
|
13
|
-
* - 徽标 .kb-badge(official 线框 accent / fresh·stale 中性+警示 / restricted 锁形)
|
|
14
|
-
* - 折叠摘要行 .kb-fold-head(状态徽章 + 计数/时长,muted 内容体 .kb-fold-body)
|
|
9
|
+
* - 数字一律 .icen-kb-num(等宽 + tabular-nums);元信息 .icen-kb-meta(11.5px faint)
|
|
10
|
+
* - 证据引用体 .icen-kb-quote(起始缘 2px 证据线——RTL 自动镜像,颜色只用层级色不用装饰色)
|
|
11
|
+
* - 行基元 .icen-kb-row(28px 节奏,data-icen-density="compact" 收 24px)
|
|
12
|
+
* - 分数条 .icen-kb-score(序数呈现:条长=排序信号,不标榜比例语义)
|
|
13
|
+
* - 状态点 .icen-kb-dot(语义色,只此一处给状态上色)
|
|
14
|
+
* - 徽标 .icen-kb-badge(official 线框 accent / fresh·stale 中性+警示 / restricted 锁形)
|
|
15
|
+
* - 折叠摘要行 .icen-kb-fold-head(状态徽章 + 计数/时长,muted 内容体 .kb-fold-body)
|
|
15
16
|
* - 动效 ≤240ms ease-out;流式脉冲 1.6s;reduced-motion 走全局规则
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
|
-
.kb-row {
|
|
19
|
+
.icen-kb-row {
|
|
19
20
|
display: grid;
|
|
20
21
|
grid-template-columns: auto 1fr auto;
|
|
21
22
|
align-items: center;
|
|
22
23
|
gap: 10px;
|
|
23
24
|
min-height: 28px;
|
|
24
25
|
padding: 2px 8px;
|
|
25
|
-
border-radius: var(--radius-sm
|
|
26
|
+
border-radius: var(--icen-radius-sm);
|
|
26
27
|
}
|
|
27
|
-
.kb-row:hover { background: var(--token-bg-soft); }
|
|
28
|
-
.kb-row-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
|
|
29
|
-
.kb-row-title {
|
|
28
|
+
.icen-kb-row:hover { background: var(--icen-token-bg-soft); }
|
|
29
|
+
.icen-kb-row-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
|
|
30
|
+
.icen-kb-row-title {
|
|
30
31
|
font-size: 13px;
|
|
31
|
-
color: var(--token-text);
|
|
32
|
+
color: var(--icen-token-text);
|
|
32
33
|
white-space: nowrap;
|
|
33
34
|
overflow: hidden;
|
|
34
35
|
text-overflow: ellipsis;
|
|
35
36
|
}
|
|
36
|
-
.kb-row-sub { font-size: 11.5px; color: var(--token-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
37
|
-
.kb-row-side { display: inline-flex; align-items: center; gap: 8px; }
|
|
37
|
+
.icen-kb-row-sub { font-size: 11.5px; color: var(--icen-token-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
38
|
+
.icen-kb-row-side { display: inline-flex; align-items: center; gap: 8px; }
|
|
38
39
|
|
|
39
40
|
/* 密度:compact 档(管理台/密集列表) */
|
|
40
|
-
[data-density='compact'] .kb-row { min-height: 24px; gap: 8px; }
|
|
41
|
+
[data-icen-density='compact'] .icen-kb-row { min-height: 24px; gap: 8px; }
|
|
41
42
|
|
|
42
43
|
/* 数字与元信息 */
|
|
43
|
-
.kb-num {
|
|
44
|
-
font-family: var(--font-mono
|
|
44
|
+
.icen-kb-num {
|
|
45
|
+
font-family: var(--icen-font-mono);
|
|
45
46
|
font-variant-numeric: tabular-nums;
|
|
46
47
|
font-size: 12px;
|
|
47
|
-
color: var(--token-text-muted);
|
|
48
|
+
color: var(--icen-token-text-muted);
|
|
48
49
|
white-space: nowrap;
|
|
49
50
|
}
|
|
50
|
-
.kb-meta {
|
|
51
|
-
font-family: var(--font-mono
|
|
51
|
+
.icen-kb-meta {
|
|
52
|
+
font-family: var(--icen-font-mono);
|
|
52
53
|
font-size: 11px;
|
|
53
54
|
letter-spacing: 0.3px;
|
|
54
|
-
color: var(--token-text-faint);
|
|
55
|
+
color: var(--icen-token-text-faint);
|
|
55
56
|
white-space: nowrap;
|
|
57
|
+
/* nowrap 必须配省略截断(诚实截断纪律):裸 nowrap 会让长文本横向溢出盖到邻列 */
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
/* 状态点(族内状态色的唯一入口) */
|
|
59
|
-
.kb-dot {
|
|
63
|
+
.icen-kb-dot {
|
|
60
64
|
width: 7px;
|
|
61
65
|
height: 7px;
|
|
62
66
|
border-radius: 50%;
|
|
63
67
|
flex: 0 0 auto;
|
|
64
|
-
background: var(--token-text-faint);
|
|
68
|
+
background: var(--icen-token-text-faint);
|
|
65
69
|
opacity: 0.6;
|
|
66
70
|
}
|
|
67
|
-
.kb-dot.is-ok { background: var(--token-success); opacity: 1; }
|
|
68
|
-
.kb-dot.is-warn { background: var(--token-warning); opacity: 1; }
|
|
69
|
-
.kb-dot.is-err { background: var(--
|
|
70
|
-
.kb-dot.is-live { background: var(--token-accent); opacity: 1; animation: kb-pulse 1.6s ease-in-out infinite; }
|
|
71
|
+
.icen-kb-dot.is-ok { background: var(--icen-token-success); opacity: 1; }
|
|
72
|
+
.icen-kb-dot.is-warn { background: var(--icen-token-warning); opacity: 1; }
|
|
73
|
+
.icen-kb-dot.is-err { background: var(--icen-token-error); opacity: 1; }
|
|
74
|
+
.icen-kb-dot.is-live { background: var(--icen-token-accent); opacity: 1; animation: kb-pulse 1.6s ease-in-out infinite; }
|
|
71
75
|
|
|
72
76
|
@keyframes kb-pulse {
|
|
73
|
-
0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--token-accent) 35%, transparent); }
|
|
74
|
-
50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--token-accent) 0%, transparent); }
|
|
77
|
+
0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--icen-token-accent) 35%, transparent); }
|
|
78
|
+
50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--icen-token-accent) 0%, transparent); }
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
/* 分数条(序数纪律:null 分数不渲染条) */
|
|
78
|
-
.kb-score { display: inline-flex; align-items: center; gap: 6px; min-
|
|
79
|
-
.kb-score-bar {
|
|
82
|
+
.icen-kb-score { display: inline-flex; align-items: center; gap: 6px; min-inline-size: 88px; }
|
|
83
|
+
.icen-kb-score-bar {
|
|
80
84
|
flex: 1 1 auto;
|
|
81
85
|
height: 3px;
|
|
82
|
-
border-radius: 2px;
|
|
83
|
-
background: var(--token-line-soft);
|
|
86
|
+
border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
|
|
87
|
+
background: var(--icen-token-line-soft);
|
|
84
88
|
overflow: hidden;
|
|
85
|
-
min-
|
|
89
|
+
min-inline-size: 40px;
|
|
86
90
|
}
|
|
87
|
-
.kb-score-bar > i { display: block; height: 100%; border-radius: 2px; background: var(--token-accent); opacity: 0.75; }
|
|
88
|
-
.kb-score-value { font-family: var(--font-mono
|
|
91
|
+
.icen-kb-score-bar > i { display: block; height: 100%; border-radius: 2px; background: var(--icen-token-accent); opacity: 0.75; /* guard:allow-radius 微构件(指示条等图形级,不属容器圆角面) */ }
|
|
92
|
+
.icen-kb-score-value { font-family: var(--icen-font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--icen-token-text-muted); min-inline-size: 34px; text-align: right; /* guard:allow-physical 分数数字右对齐惯例(数字是 LTR 文种,RTL 不镜像) */ }
|
|
89
93
|
|
|
90
|
-
/* 证据引用体(原文摘录、citedText、chunk
|
|
91
|
-
.kb-quote {
|
|
94
|
+
/* 证据引用体(原文摘录、citedText、chunk 预览;证据线沿 inline-start,RTL 镜像) */
|
|
95
|
+
.icen-kb-quote {
|
|
92
96
|
position: relative;
|
|
93
|
-
padding: 2px
|
|
97
|
+
padding-block: 2px;
|
|
98
|
+
padding-inline-start: 12px;
|
|
94
99
|
font-size: 12.5px;
|
|
95
100
|
line-height: 1.7;
|
|
96
|
-
color: var(--token-text-muted);
|
|
101
|
+
color: var(--icen-token-text-muted);
|
|
97
102
|
}
|
|
98
|
-
.kb-quote::before {
|
|
103
|
+
.icen-kb-quote::before {
|
|
99
104
|
content: '';
|
|
100
105
|
position: absolute;
|
|
101
|
-
|
|
106
|
+
inset-inline-start: 0;
|
|
102
107
|
top: 4px;
|
|
103
108
|
bottom: 4px;
|
|
104
109
|
width: 2px;
|
|
105
|
-
border-radius: 1px;
|
|
106
|
-
background: var(--token-line);
|
|
110
|
+
border-radius: 1px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
|
|
111
|
+
background: var(--icen-token-line);
|
|
107
112
|
}
|
|
108
|
-
.kb-quote mark,
|
|
109
|
-
.kb-passage-body mark,
|
|
110
|
-
.kb-hit mark {
|
|
111
|
-
background: color-mix(in srgb, var(--token-accent) 18%, transparent);
|
|
113
|
+
.icen-kb-quote mark,
|
|
114
|
+
.icen-kb-passage-body mark,
|
|
115
|
+
.icen-kb-hit mark {
|
|
116
|
+
background: color-mix(in srgb, var(--icen-token-accent) 18%, transparent);
|
|
112
117
|
color: inherit;
|
|
113
|
-
border-radius: 2px;
|
|
118
|
+
border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
|
|
114
119
|
padding: 0 2px;
|
|
115
120
|
}
|
|
116
|
-
/* 多命中分色(data-hit 轮转 3 色) */
|
|
117
|
-
.kb-quote mark[data-hit='1'],
|
|
118
|
-
.kb-passage-body mark[data-hit='1'] { background: color-mix(in srgb, var(--token-warning) 22%, transparent); }
|
|
119
|
-
.kb-quote mark[data-hit='2'],
|
|
120
|
-
.kb-passage-body mark[data-hit='2'] { background: color-mix(in srgb, var(--token-info
|
|
121
|
+
/* 多命中分色(data-icen-hit 轮转 3 色) */
|
|
122
|
+
.icen-kb-quote mark[data-icen-hit='1'],
|
|
123
|
+
.icen-kb-passage-body mark[data-icen-hit='1'] { background: color-mix(in srgb, var(--icen-token-warning) 22%, transparent); }
|
|
124
|
+
.icen-kb-quote mark[data-icen-hit='2'],
|
|
125
|
+
.icen-kb-passage-body mark[data-icen-hit='2'] { background: color-mix(in srgb, var(--icen-token-info) 20%, transparent); }
|
|
121
126
|
|
|
122
127
|
/* 徽标(来源元数据:官方/新鲜度/权限) */
|
|
123
|
-
.kb-badge {
|
|
128
|
+
.icen-kb-badge {
|
|
124
129
|
display: inline-flex;
|
|
125
130
|
align-items: center;
|
|
126
131
|
gap: 4px;
|
|
127
132
|
font-size: 10.5px;
|
|
128
133
|
line-height: 1;
|
|
129
134
|
letter-spacing: 0.3px;
|
|
130
|
-
color: var(--token-text-faint);
|
|
131
|
-
border: 1px solid var(--token-line-soft);
|
|
132
|
-
border-radius:
|
|
135
|
+
color: var(--icen-token-text-faint);
|
|
136
|
+
border: 1px solid var(--icen-token-line-soft);
|
|
137
|
+
border-radius: var(--icen-radius-full);
|
|
133
138
|
padding: 2.5px 7px;
|
|
134
139
|
white-space: nowrap;
|
|
135
140
|
}
|
|
136
|
-
.kb-badge svg { width: 10px; height: 10px; }
|
|
137
|
-
.kb-badge--official {
|
|
138
|
-
color: var(--token-accent);
|
|
139
|
-
border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
|
|
140
|
-
background: var(--token-accent-subtle
|
|
141
|
+
.icen-kb-badge svg { width: 10px; height: 10px; }
|
|
142
|
+
.icen-kb-badge--official {
|
|
143
|
+
color: var(--icen-token-accent-text);
|
|
144
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
|
|
145
|
+
background: var(--icen-token-accent-subtle);
|
|
141
146
|
}
|
|
142
|
-
.kb-badge--stale { color: var(--token-warning); border-color: color-mix(in srgb, var(--token-warning) 40%, transparent); }
|
|
143
|
-
.kb-badge--restricted { color: var(--token-text-faint); }
|
|
144
|
-
.kb-badge--trusted {
|
|
145
|
-
color: var(--token-success);
|
|
146
|
-
border-color: color-mix(in srgb, var(--token-success) 45%, transparent);
|
|
147
|
-
background: color-mix(in srgb, var(--token-success) 8%, transparent);
|
|
147
|
+
.icen-kb-badge--stale { color: color-mix(in srgb, var(--icen-token-warning) 50%, var(--icen-token-text)); border-color: color-mix(in srgb, var(--icen-token-warning) 40%, transparent); }
|
|
148
|
+
.icen-kb-badge--restricted { color: var(--icen-token-text-faint); }
|
|
149
|
+
.icen-kb-badge--trusted {
|
|
150
|
+
color: var(--icen-token-success);
|
|
151
|
+
border-color: color-mix(in srgb, var(--icen-token-success) 45%, transparent);
|
|
152
|
+
background: color-mix(in srgb, var(--icen-token-success) 8%, transparent);
|
|
148
153
|
}
|
|
149
|
-
.kb-badge--admin { font-family: var(--font-mono
|
|
154
|
+
.icen-kb-badge--admin { font-family: var(--icen-font-mono); }
|
|
150
155
|
|
|
151
|
-
/* 中性 chip(表名/关键词/过滤值;展示性标签用 tag.css 的 .tag,这里只做 kb 域自持变体) */
|
|
152
|
-
.kb-chip {
|
|
156
|
+
/* 中性 chip(表名/关键词/过滤值;展示性标签用 tag.css 的 .icen-tag,这里只做 kb 域自持变体) */
|
|
157
|
+
.icen-kb-chip {
|
|
153
158
|
display: inline-flex;
|
|
154
159
|
align-items: center;
|
|
155
160
|
gap: 4px;
|
|
156
|
-
font-family: var(--font-mono
|
|
161
|
+
font-family: var(--icen-font-mono);
|
|
157
162
|
font-size: 11px;
|
|
158
|
-
color: var(--token-text-muted);
|
|
159
|
-
background: var(--token-bg-soft);
|
|
160
|
-
border: 1px solid var(--token-line-soft);
|
|
161
|
-
border-radius: var(--radius-sm
|
|
163
|
+
color: var(--icen-token-text-muted);
|
|
164
|
+
background: var(--icen-token-bg-soft);
|
|
165
|
+
border: 1px solid var(--icen-token-line-soft);
|
|
166
|
+
border-radius: var(--icen-radius-sm);
|
|
162
167
|
padding: 2px 7px;
|
|
163
|
-
max-
|
|
168
|
+
max-inline-size: 220px;
|
|
164
169
|
white-space: nowrap;
|
|
165
170
|
overflow: hidden;
|
|
166
171
|
text-overflow: ellipsis;
|
|
167
172
|
}
|
|
168
173
|
|
|
169
174
|
/* 折叠两段式(摘要行 + muted 内容体;与 ai 族渐进披露同构) */
|
|
170
|
-
.kb-fold-head {
|
|
175
|
+
.icen-kb-fold-head {
|
|
171
176
|
display: flex;
|
|
172
177
|
align-items: center;
|
|
173
178
|
gap: 8px;
|
|
@@ -176,77 +181,83 @@
|
|
|
176
181
|
padding: 2px 8px;
|
|
177
182
|
border: none;
|
|
178
183
|
background: none;
|
|
179
|
-
border-radius: var(--radius-sm
|
|
184
|
+
border-radius: var(--icen-radius-sm);
|
|
180
185
|
font: inherit;
|
|
181
186
|
font-size: 12.5px;
|
|
182
|
-
color: var(--token-text-muted);
|
|
187
|
+
color: var(--icen-token-text-muted);
|
|
183
188
|
cursor: pointer;
|
|
184
|
-
text-align:
|
|
189
|
+
text-align: start;
|
|
185
190
|
}
|
|
186
|
-
.kb-fold-head:hover { color: var(--token-text); background: var(--token-bg-soft); }
|
|
187
|
-
.kb-fold-head:focus-visible { outline: 2px solid var(--token-accent); outline-offset: -2px; }
|
|
188
|
-
.kb-fold-caret {
|
|
191
|
+
.icen-kb-fold-head:hover { color: var(--icen-token-text); background: var(--icen-token-bg-soft); }
|
|
192
|
+
.icen-kb-fold-head:focus-visible { outline: 2px solid var(--icen-token-accent); outline-offset: -2px; }
|
|
193
|
+
.icen-kb-fold-caret {
|
|
189
194
|
display: inline-block;
|
|
190
195
|
width: 1em;
|
|
191
|
-
color: var(--token-text-faint);
|
|
196
|
+
color: var(--icen-token-text-faint);
|
|
192
197
|
font-size: 10px;
|
|
193
198
|
transition: transform 0.16s ease-out;
|
|
194
199
|
flex: 0 0 auto;
|
|
195
200
|
}
|
|
196
|
-
.kb-fold-head[aria-expanded='true'] .kb-fold-caret { transform: rotate(90deg); }
|
|
197
|
-
.kb-fold-count { margin-
|
|
201
|
+
.icen-kb-fold-head[aria-expanded='true'] .icen-kb-fold-caret { transform: rotate(90deg); }
|
|
202
|
+
.icen-kb-fold-count { margin-inline-start: auto; }
|
|
198
203
|
|
|
199
204
|
/* 键位提示(标注队列快捷键等) */
|
|
200
|
-
.kb-key {
|
|
201
|
-
font-family: var(--font-mono
|
|
205
|
+
.icen-kb-key {
|
|
206
|
+
font-family: var(--icen-font-mono);
|
|
202
207
|
font-size: 10px;
|
|
203
|
-
color: var(--token-text-faint);
|
|
204
|
-
border: 1px solid var(--token-line-soft);
|
|
208
|
+
color: var(--icen-token-text-faint);
|
|
209
|
+
border: 1px solid var(--icen-token-line-soft);
|
|
205
210
|
border-bottom-width: 2px;
|
|
206
|
-
border-radius: 4px;
|
|
211
|
+
border-radius: 4px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
|
|
207
212
|
padding: 1px 5px;
|
|
208
|
-
background: var(--token-bg-soft);
|
|
213
|
+
background: var(--icen-token-bg-soft);
|
|
209
214
|
}
|
|
210
215
|
|
|
211
216
|
/* 空态/无死路行动(组件空态的最小底座;复杂空态用 empty.css) */
|
|
212
|
-
.kb-empty {
|
|
217
|
+
.icen-kb-empty {
|
|
213
218
|
display: flex;
|
|
214
219
|
flex-direction: column;
|
|
215
220
|
align-items: center;
|
|
216
221
|
gap: 8px;
|
|
217
222
|
padding: 28px 16px;
|
|
218
|
-
color: var(--token-text-faint);
|
|
223
|
+
color: var(--icen-token-text-faint);
|
|
219
224
|
font-size: 12.5px;
|
|
220
225
|
text-align: center;
|
|
221
226
|
}
|
|
222
227
|
|
|
223
228
|
/* 截断/边界声明(诚实呈现) */
|
|
224
|
-
.kb-notice {
|
|
229
|
+
.icen-kb-notice {
|
|
225
230
|
display: flex;
|
|
226
231
|
align-items: center;
|
|
227
232
|
gap: 6px;
|
|
228
233
|
font-size: 11.5px;
|
|
229
|
-
color: var(--token-text-faint);
|
|
234
|
+
color: var(--icen-token-text-faint);
|
|
230
235
|
padding: 4px 8px;
|
|
231
236
|
}
|
|
232
|
-
.kb-notice svg { width: 12px; height: 12px; flex: 0 0 auto; }
|
|
237
|
+
.icen-kb-notice svg { width: 12px; height: 12px; flex: 0 0 auto; }
|
|
233
238
|
/* flex 容器内 hidden 会被 display 覆盖——notice 显隐必须显式归零 */
|
|
234
|
-
.kb-notice[hidden] { display: none; }
|
|
239
|
+
.icen-kb-notice[hidden] { display: none; }
|
|
235
240
|
|
|
236
241
|
/* 检索过滤层徽标(权限域注入检索域的共享原语,放基座使 kit/kb-retrieval 与 kit/kb-* 均自持;
|
|
237
242
|
三态:pre ✓ 安全基线 / post ⚠ 缺陷层 / none ✕ fail-open 危险——spec §9.0-1/§9.7) */
|
|
238
|
-
.kb-layer-chip {
|
|
239
|
-
font-family: var(--font-mono
|
|
243
|
+
.icen-kb-layer-chip {
|
|
244
|
+
font-family: var(--icen-font-mono);
|
|
240
245
|
font-size: 11px;
|
|
241
246
|
cursor: pointer;
|
|
242
247
|
}
|
|
243
|
-
.kb-layer-chip[data-layer='pre'] { color: var(--token-success); border-color: color-mix(in srgb, var(--token-success) 45%, transparent); }
|
|
244
|
-
.kb-layer-chip[data-layer='post'] { color: var(--token-warning); border-color: color-mix(in srgb, var(--token-warning) 45%, transparent); }
|
|
245
|
-
.kb-layer-chip[data-layer='none'] { color: var(--token-error
|
|
246
|
-
.kb-layer-chip:focus-visible { outline: 2px solid var(--token-accent); outline-offset: 1px; }
|
|
248
|
+
.icen-kb-layer-chip[data-icen-layer='pre'] { color: var(--icen-token-success); border-color: color-mix(in srgb, var(--icen-token-success) 45%, transparent); }
|
|
249
|
+
.icen-kb-layer-chip[data-icen-layer='post'] { color: var(--icen-token-warning); border-color: color-mix(in srgb, var(--icen-token-warning) 45%, transparent); }
|
|
250
|
+
.icen-kb-layer-chip[data-icen-layer='none'] { color: var(--icen-token-error); border-color: color-mix(in srgb, var(--icen-token-error) 45%, transparent); }
|
|
251
|
+
.icen-kb-layer-chip:focus-visible { outline: 2px solid var(--icen-token-accent); outline-offset: 1px; }
|
|
247
252
|
|
|
248
253
|
|
|
249
|
-
/* 动效守卫:kb-pulse(.kb-dot.is-live 的存活脉冲)在减少动效偏好下停帧(保持静态高亮,不隐状态) */
|
|
254
|
+
/* 动效守卫:kb-pulse(.icen-kb-dot.is-live 的存活脉冲)在减少动效偏好下停帧(保持静态高亮,不隐状态) */
|
|
250
255
|
@media (prefers-reduced-motion: reduce) {
|
|
251
|
-
.kb-dot.is-live { animation: none; }
|
|
256
|
+
.icen-kb-dot.is-live { animation: none; }
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* ── RTL:方向性折叠 caret 镜像(▸ 收起态指向行进方向) ── */
|
|
260
|
+
:is([dir='rtl']) .icen-kb-fold-caret { transform: scaleX(-1); }
|
|
261
|
+
:is([dir='rtl']) .icen-kb-fold-head[aria-expanded='true'] .icen-kb-fold-caret { transform: rotate(90deg) scaleX(-1); }
|
|
262
|
+
|
|
252
263
|
}
|
|
@@ -1,109 +1,112 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: layout(布局原语,全部是工具类,无 JS)
|
|
3
4
|
* stack / divider / surface / text / grid / center / container / aspect / visually-hidden
|
|
4
|
-
* 全部消费 --token-* 与 --density-*;档位类名与 opengal primitives/layout(-containers) 一一对应。
|
|
5
|
+
* 全部消费 --icen-token-* 与 --icen-density-*;档位类名与 opengal primitives/layout(-containers) 一一对应。
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
/* ── Stack:flex 堆叠(默认列向,gap = density-space-sm) ── */
|
|
8
|
-
.stack { display: flex; flex-direction: column; gap: var(--density-space-sm); }
|
|
9
|
-
.stack--row { flex-direction: row; }
|
|
10
|
-
.stack--inline { display: inline-flex; }
|
|
11
|
-
.stack--wrap { flex-wrap: wrap; }
|
|
12
|
-
.stack--gap-0 { gap: 0; }
|
|
13
|
-
.stack--gap-1 { gap: var(--density-space-xs); }
|
|
14
|
-
.stack--gap-2 { gap: var(--density-space-sm); }
|
|
15
|
-
.stack--gap-3 { gap: var(--density-space-md); }
|
|
16
|
-
.stack--gap-4 { gap: var(--density-space-lg); }
|
|
17
|
-
.stack--gap-6 { gap: var(--density-space-xl); }
|
|
18
|
-
.stack--gap-8 { gap: var(--density-space-2xl); }
|
|
19
|
-
.stack--gap-12 { gap: var(--density-space-3xl); }
|
|
20
|
-
.stack--gap-16 { gap: var(--density-space-4xl); }
|
|
21
|
-
.stack--items-start { align-items: flex-start; }
|
|
22
|
-
.stack--items-center { align-items: center; }
|
|
23
|
-
.stack--items-end { align-items: flex-end; }
|
|
24
|
-
.stack--items-stretch { align-items: stretch; }
|
|
25
|
-
.stack--items-baseline { align-items: baseline; }
|
|
26
|
-
.stack--justify-start { justify-content: flex-start; }
|
|
27
|
-
.stack--justify-center { justify-content: center; }
|
|
28
|
-
.stack--justify-end { justify-content: flex-end; }
|
|
29
|
-
.stack--justify-between { justify-content: space-between; }
|
|
30
|
-
.stack--justify-around { justify-content: space-around; }
|
|
31
|
-
.stack--justify-evenly { justify-content: space-evenly; }
|
|
9
|
+
.icen-stack { display: flex; flex-direction: column; gap: var(--icen-density-space-sm); }
|
|
10
|
+
.icen-stack--row { flex-direction: row; }
|
|
11
|
+
.icen-stack--inline { display: inline-flex; }
|
|
12
|
+
.icen-stack--wrap { flex-wrap: wrap; }
|
|
13
|
+
.icen-stack--gap-0 { gap: 0; }
|
|
14
|
+
.icen-stack--gap-1 { gap: var(--icen-density-space-xs); }
|
|
15
|
+
.icen-stack--gap-2 { gap: var(--icen-density-space-sm); }
|
|
16
|
+
.icen-stack--gap-3 { gap: var(--icen-density-space-md); }
|
|
17
|
+
.icen-stack--gap-4 { gap: var(--icen-density-space-lg); }
|
|
18
|
+
.icen-stack--gap-6 { gap: var(--icen-density-space-xl); }
|
|
19
|
+
.icen-stack--gap-8 { gap: var(--icen-density-space-2xl); }
|
|
20
|
+
.icen-stack--gap-12 { gap: var(--icen-density-space-3xl); }
|
|
21
|
+
.icen-stack--gap-16 { gap: var(--icen-density-space-4xl); }
|
|
22
|
+
.icen-stack--items-start { align-items: flex-start; }
|
|
23
|
+
.icen-stack--items-center { align-items: center; }
|
|
24
|
+
.icen-stack--items-end { align-items: flex-end; }
|
|
25
|
+
.icen-stack--items-stretch { align-items: stretch; }
|
|
26
|
+
.icen-stack--items-baseline { align-items: baseline; }
|
|
27
|
+
.icen-stack--justify-start { justify-content: flex-start; }
|
|
28
|
+
.icen-stack--justify-center { justify-content: center; }
|
|
29
|
+
.icen-stack--justify-end { justify-content: flex-end; }
|
|
30
|
+
.icen-stack--justify-between { justify-content: space-between; }
|
|
31
|
+
.icen-stack--justify-around { justify-content: space-around; }
|
|
32
|
+
.icen-stack--justify-evenly { justify-content: space-evenly; }
|
|
32
33
|
|
|
33
34
|
/* ── Divider:分隔线 ── */
|
|
34
|
-
.divider { background: var(--token-outline-soft); height: 1px; width: 100%; }
|
|
35
|
-
.divider--vertical { width: 1px; height: 100%; align-self: stretch; }
|
|
35
|
+
.icen-divider { background: var(--icen-token-outline-soft); height: 1px; width: 100%; }
|
|
36
|
+
.icen-divider--vertical { width: 1px; height: 100%; align-self: stretch; }
|
|
36
37
|
|
|
37
38
|
/* ── Surface:卡片容器(默认 inset 阴影 + density-space-lg padding) ── */
|
|
38
|
-
.surface {
|
|
39
|
-
border-radius: var(--radius-lg);
|
|
40
|
-
background: var(--token-card);
|
|
41
|
-
border: 1px solid var(--token-outline-soft);
|
|
42
|
-
box-shadow: var(--token-shadow-inset);
|
|
43
|
-
padding: var(--density-space-lg);
|
|
39
|
+
.icen-surface {
|
|
40
|
+
border-radius: var(--icen-radius-lg);
|
|
41
|
+
background: var(--icen-token-card);
|
|
42
|
+
border: 1px solid var(--icen-token-outline-soft);
|
|
43
|
+
box-shadow: var(--icen-token-shadow-inset);
|
|
44
|
+
padding: var(--icen-density-space-lg);
|
|
44
45
|
}
|
|
45
|
-
.surface--elevated { box-shadow: var(--token-shadow-card); }
|
|
46
|
-
.surface--overlay {
|
|
47
|
-
background: var(--token-card-strong);
|
|
48
|
-
border-color: var(--token-outline);
|
|
49
|
-
box-shadow: var(--token-shadow-overlay);
|
|
46
|
+
.icen-surface--elevated { box-shadow: var(--icen-token-shadow-card); }
|
|
47
|
+
.icen-surface--overlay {
|
|
48
|
+
background: var(--icen-token-card-strong);
|
|
49
|
+
border-color: var(--icen-token-outline);
|
|
50
|
+
box-shadow: var(--icen-token-shadow-overlay);
|
|
50
51
|
}
|
|
51
|
-
.surface--p-none { padding: 0; }
|
|
52
|
-
.surface--p-sm { padding: var(--density-space-md); }
|
|
53
|
-
.surface--p-md { padding: var(--density-space-lg); }
|
|
54
|
-
.surface--p-lg { padding: calc(var(--density-space-lg) + var(--density-space-xs)); }
|
|
52
|
+
.icen-surface--p-none { padding: 0; }
|
|
53
|
+
.icen-surface--p-sm { padding: var(--icen-density-space-md); }
|
|
54
|
+
.icen-surface--p-md { padding: var(--icen-density-space-lg); }
|
|
55
|
+
.icen-surface--p-lg { padding: calc(var(--icen-density-space-lg) + var(--icen-density-space-xs)); }
|
|
55
56
|
|
|
56
57
|
/* ── Text:字号 / 语义色 / 截断 ── */
|
|
57
|
-
.text--xs { font-size: var(--density-font-size-xs); }
|
|
58
|
-
.text--sm { font-size: var(--density-font-size-sm); }
|
|
59
|
-
.text--base { font-size: var(--density-font-size-md); }
|
|
60
|
-
.text--md { font-size: var(--density-font-size-lg); }
|
|
61
|
-
.text--lg { font-size: var(--density-font-size-lg); }
|
|
62
|
-
.text--xl { font-size: var(--density-font-size-xl); }
|
|
63
|
-
.text--2xl { font-size: var(--density-font-size-2xl); }
|
|
64
|
-
.text--muted { color: var(--token-text-muted); }
|
|
65
|
-
.text--faint { color: var(--token-text-faint); }
|
|
66
|
-
.text--accent { color: var(--token-accent); }
|
|
67
|
-
.text--success { color: var(--token-success); }
|
|
68
|
-
.text--warning { color: var(--token-warning); }
|
|
69
|
-
.text--error { color: var(--token-error); }
|
|
70
|
-
.text--truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
58
|
+
.icen-text--xs { font-size: var(--icen-density-font-size-xs); }
|
|
59
|
+
.icen-text--sm { font-size: var(--icen-density-font-size-sm); }
|
|
60
|
+
.icen-text--base { font-size: var(--icen-density-font-size-md); }
|
|
61
|
+
.icen-text--md { font-size: var(--icen-density-font-size-lg); }
|
|
62
|
+
.icen-text--lg { font-size: var(--icen-density-font-size-lg); }
|
|
63
|
+
.icen-text--xl { font-size: var(--icen-density-font-size-xl); }
|
|
64
|
+
.icen-text--2xl { font-size: var(--icen-density-font-size-2xl); }
|
|
65
|
+
.icen-text--muted { color: var(--icen-token-text-muted); }
|
|
66
|
+
.icen-text--faint { color: var(--icen-token-text-faint); }
|
|
67
|
+
.icen-text--accent { color: var(--icen-token-accent-text, var(--icen-token-accent-deep, var(--icen-token-accent))); }
|
|
68
|
+
.icen-text--success { color: var(--icen-token-success); }
|
|
69
|
+
.icen-text--warning { color: var(--icen-token-warning); }
|
|
70
|
+
.icen-text--error { color: var(--icen-token-error); }
|
|
71
|
+
.icen-text--truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
71
72
|
|
|
72
73
|
/* ── Grid:栅格(默认 gap = density-space-md) ── */
|
|
73
|
-
.grid { display: grid; gap: var(--density-space-md); }
|
|
74
|
-
.grid--cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
|
|
75
|
-
.grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
76
|
-
.grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
77
|
-
.grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
78
|
-
.grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
|
|
79
|
-
.grid--cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
|
|
80
|
-
.grid--gap-0 { gap: 0; }
|
|
81
|
-
.grid--gap-4 { gap: var(--density-space-xs); }
|
|
82
|
-
.grid--gap-8 { gap: var(--density-space-sm); }
|
|
83
|
-
.grid--gap-12 { gap: var(--density-space-md); }
|
|
84
|
-
.grid--gap-16 { gap: var(--density-space-lg); }
|
|
85
|
-
.grid--gap-24 { gap: var(--density-space-xl); }
|
|
74
|
+
.icen-grid { display: grid; gap: var(--icen-density-space-md); }
|
|
75
|
+
.icen-grid--cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
|
|
76
|
+
.icen-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
77
|
+
.icen-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
78
|
+
.icen-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
79
|
+
.icen-grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
|
|
80
|
+
.icen-grid--cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
|
|
81
|
+
.icen-grid--gap-0 { gap: 0; }
|
|
82
|
+
.icen-grid--gap-4 { gap: var(--icen-density-space-xs); }
|
|
83
|
+
.icen-grid--gap-8 { gap: var(--icen-density-space-sm); }
|
|
84
|
+
.icen-grid--gap-12 { gap: var(--icen-density-space-md); }
|
|
85
|
+
.icen-grid--gap-16 { gap: var(--icen-density-space-lg); }
|
|
86
|
+
.icen-grid--gap-24 { gap: var(--icen-density-space-xl); }
|
|
86
87
|
|
|
87
88
|
/* ── Center:flex 居中盒 ── */
|
|
88
|
-
.center { display: flex; align-items: center; justify-content: center; }
|
|
89
|
+
.icen-center { display: flex; align-items: center; justify-content: center; }
|
|
89
90
|
|
|
90
91
|
/* ── Container:限宽容器(默认 960px) ── */
|
|
91
|
-
.container { width: 100%; margin-inline: auto; padding-inline: var(--density-space-lg); max-width: 960px; }
|
|
92
|
-
.container--sm { max-width: 480px; }
|
|
93
|
-
.container--md { max-width: 720px; }
|
|
94
|
-
.container--lg { max-width: 960px; }
|
|
95
|
-
.container--xl { max-width: 1200px; }
|
|
96
|
-
.container--full { max-width: none; }
|
|
92
|
+
.icen-container { width: 100%; margin-inline: auto; padding-inline: var(--icen-density-space-lg); max-width: 960px; }
|
|
93
|
+
.icen-container--sm { max-width: 480px; }
|
|
94
|
+
.icen-container--md { max-width: 720px; }
|
|
95
|
+
.icen-container--lg { max-width: 960px; }
|
|
96
|
+
.icen-container--xl { max-width: 1200px; }
|
|
97
|
+
.icen-container--full { max-width: none; }
|
|
97
98
|
|
|
98
99
|
/* ── Aspect:固定比例盒(aspect-ratio,内容 absolute inset:0 铺满) ── */
|
|
99
|
-
.aspect { position: relative; width: 100%; overflow: hidden; aspect-ratio: 16 / 9; }
|
|
100
|
-
.aspect--square { aspect-ratio: 1 / 1; }
|
|
101
|
-
.aspect--4-3 { aspect-ratio: 4 / 3; }
|
|
102
|
-
.aspect--2-3 { aspect-ratio: 2 / 3; }
|
|
103
|
-
.aspect > * { position: absolute; inset: 0; }
|
|
100
|
+
.icen-aspect { position: relative; width: 100%; overflow: hidden; aspect-ratio: 16 / 9; }
|
|
101
|
+
.icen-aspect--square { aspect-ratio: 1 / 1; }
|
|
102
|
+
.icen-aspect--4-3 { aspect-ratio: 4 / 3; }
|
|
103
|
+
.icen-aspect--2-3 { aspect-ratio: 2 / 3; }
|
|
104
|
+
.icen-aspect > * { position: absolute; inset: 0; }
|
|
104
105
|
|
|
105
106
|
/* ── VisuallyHidden:屏幕阅读器专用文本(sr-only 等价) ── */
|
|
106
|
-
.visually-hidden {
|
|
107
|
+
.icen-visually-hidden {
|
|
107
108
|
position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
|
|
108
109
|
overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
|
|
109
110
|
}
|
|
111
|
+
|
|
112
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@layer icen.components {
|
|
2
|
+
/* 中式 material adapter. DOM contract: html[data-icen-style="chinese"] with
|
|
3
|
+
* existing ICEN components or [data-icen-material="content|chrome|floating"].
|
|
4
|
+
* No additional wrappers, decorative pseudo-elements or JavaScript required.
|
|
5
|
+
*/
|
|
6
|
+
:root[data-icen-style="chinese"] {
|
|
7
|
+
--icen-press: scale(.995);
|
|
8
|
+
--icen-press-soft: scale(.995);
|
|
9
|
+
--icen-hover-border: var(--icen-token-line);
|
|
10
|
+
--icen-hover-border-strong: var(--icen-token-line-strong);
|
|
11
|
+
--icen-ring: 0 0 0 2px var(--icen-token-surface), 0 0 0 4px var(--icen-token-accent);
|
|
12
|
+
--icen-ring-soft: 0 0 0 3px var(--icen-token-accent-subtle);
|
|
13
|
+
--icen-control-focus-shadow: var(--icen-ring-soft);
|
|
14
|
+
--icen-control-focus-border: var(--icen-token-accent);
|
|
15
|
+
}
|
|
16
|
+
:root[data-icen-style="chinese"] :is([data-icen-material],.icen-menu,.icen-popover,.icen-select-panel,.icen-date-picker-panel,.icen-autocomplete-panel,.icen-cascader-panel,.icen-tree-select-panel,.icen-mentions-panel,.icen-ai-composer-popup,.icen-command-palette,.icen-card--glass,.icen-nav) {
|
|
17
|
+
background: var(--icen-token-surface);
|
|
18
|
+
border-color: var(--icen-token-line);
|
|
19
|
+
backdrop-filter: none;
|
|
20
|
+
-webkit-backdrop-filter: none;
|
|
21
|
+
}
|
|
22
|
+
:root[data-icen-style="chinese"] :is(h1,h2,h3,h4,h5,h6,.icen-card-title,.icen-modal-title) {
|
|
23
|
+
font-family: var(--icen-font-heading);
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
letter-spacing: var(--icen-letter-spacing-heading);
|
|
26
|
+
line-height: var(--icen-line-height-heading);
|
|
27
|
+
}
|
|
28
|
+
:root[data-icen-style="chinese"] :is(.icen-btn,.icen-page-tab,.icen-segmented-item) {
|
|
29
|
+
font-family: var(--icen-font-body);
|
|
30
|
+
letter-spacing: .025em;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
}
|
|
33
|
+
:root[data-icen-style="chinese"] :is(.icen-card,.icen-panel,[data-icen-material="content"]) {
|
|
34
|
+
border-color: var(--icen-token-line-soft);
|
|
35
|
+
box-shadow: none;
|
|
36
|
+
}
|
|
37
|
+
:root[data-icen-style="chinese"] .icen-card--elevated { box-shadow: var(--icen-token-shadow-card); }
|
|
38
|
+
:root[data-icen-style="chinese"] :is(.icen-card.is-selected,.icen-card--interactive:focus-within) { box-shadow: var(--icen-ring); }
|
|
39
|
+
:root[data-icen-style="chinese"] .icen-panel-title {
|
|
40
|
+
padding-block: var(--icen-density-space-md);
|
|
41
|
+
color: var(--icen-token-text);
|
|
42
|
+
letter-spacing: .06em;
|
|
43
|
+
text-transform: none;
|
|
44
|
+
}
|
|
45
|
+
:root[data-icen-style="chinese"] :is(.icen-card-desc,.icen-modal-desc,.icen-panel-subtitle) { line-height: var(--icen-line-height-body); }
|
|
46
|
+
:root[data-icen-style="chinese"] .icen-segmented {
|
|
47
|
+
background: var(--icen-token-bg-soft);
|
|
48
|
+
border-color: var(--icen-token-line-soft);
|
|
49
|
+
}
|
|
50
|
+
:root[data-icen-style="chinese"] :is(.icen-segmented-item.is-active,.icen-segmented-item[aria-checked="true"],.icen-toggle-group-btn.is-active) {
|
|
51
|
+
box-shadow: inset 0 0 0 1px var(--icen-token-line), var(--icen-token-shadow-card);
|
|
52
|
+
}
|
|
53
|
+
/* A quiet ink rule makes navigation legible without changing its layout. */
|
|
54
|
+
:root[data-icen-style="chinese"] .icen-tabs:not(.icen-tabs--cards):not(.icen-tabs--segment):not(.icen-tabs--vertical) .icen-page-tab { border-block-end-width: 1px; }
|
|
55
|
+
:root[data-icen-style="chinese"] :is(.icen-btn,.icen-menu-item,.icen-select-option,.icen-segmented-item):focus-visible {
|
|
56
|
+
outline: 2px solid var(--icen-token-accent);
|
|
57
|
+
outline-offset: 3px;
|
|
58
|
+
}
|
|
59
|
+
@media (prefers-reduced-motion: reduce) {
|
|
60
|
+
:root[data-icen-style="chinese"] { --icen-press: none; --icen-press-soft: none; }
|
|
61
|
+
}
|
|
62
|
+
@media (forced-colors: active) {
|
|
63
|
+
:root[data-icen-style="chinese"] :is([data-icen-material],.icen-card,.icen-panel,.icen-menu,.icen-popover,.icen-select-panel,.icen-date-picker-panel,.icen-autocomplete-panel,.icen-cascader-panel,.icen-tree-select-panel,.icen-mentions-panel,.icen-ai-composer-popup,.icen-command-palette,.icen-modal,.icen-nav) {
|
|
64
|
+
background: Canvas;
|
|
65
|
+
color: CanvasText;
|
|
66
|
+
border-color: CanvasText;
|
|
67
|
+
box-shadow: none;
|
|
68
|
+
}
|
|
69
|
+
:root[data-icen-style="chinese"] :focus-visible { outline: 2px solid Highlight; outline-offset: 3px; }
|
|
70
|
+
:root[data-icen-style="chinese"] :is(.icen-card.is-selected,.icen-card--interactive:focus-within) { box-shadow: none; outline: 2px solid Highlight; outline-offset: 2px; }
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
}
|