@icen.ai/ui 0.8.0 → 0.9.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 +63 -14
- package/README.md +17 -9
- package/dist/base.css +4 -3
- package/dist/behaviors/accordion.d.mts +5 -2
- package/dist/behaviors/accordion.mjs +36 -11
- package/dist/behaviors/ai-branch.d.mts +19 -0
- package/dist/behaviors/ai-branch.mjs +217 -0
- package/dist/behaviors/ai-chat.d.mts +11 -7
- package/dist/behaviors/ai-chat.mjs +134 -51
- package/dist/behaviors/ai-composer.d.mts +28 -3
- package/dist/behaviors/ai-composer.mjs +399 -229
- package/dist/behaviors/ai-core.d.mts +9 -4
- package/dist/behaviors/ai-core.mjs +21 -8
- package/dist/behaviors/ai-diff.d.mts +2 -2
- package/dist/behaviors/ai-diff.mjs +172 -41
- package/dist/behaviors/ai-feedback.d.mts +26 -0
- package/dist/behaviors/ai-feedback.mjs +303 -0
- package/dist/behaviors/ai-panel.d.mts +26 -9
- package/dist/behaviors/ai-panel.mjs +211 -110
- package/dist/behaviors/ai-provider.mjs +54 -48
- package/dist/behaviors/ai-threads.d.mts +38 -0
- package/dist/behaviors/ai-threads.mjs +319 -0
- package/dist/behaviors/ai-tool.d.mts +12 -4
- package/dist/behaviors/ai-tool.mjs +316 -263
- package/dist/behaviors/ai-tools.d.mts +9 -6
- package/dist/behaviors/ai-tools.mjs +264 -155
- package/dist/behaviors/back-top.mjs +16 -1
- package/dist/behaviors/carousel.d.mts +5 -2
- package/dist/behaviors/carousel.mjs +53 -26
- package/dist/behaviors/charts.d.mts +170 -22
- package/dist/behaviors/charts.mjs +1016 -150
- package/dist/behaviors/command-palette.d.mts +40 -6
- package/dist/behaviors/command-palette.mjs +143 -15
- package/dist/behaviors/context-menu.d.mts +21 -4
- package/dist/behaviors/context-menu.mjs +122 -38
- package/dist/behaviors/controls.d.mts +59 -0
- package/dist/behaviors/controls.mjs +601 -0
- package/dist/behaviors/copy.d.mts +5 -2
- package/dist/behaviors/copy.mjs +37 -12
- package/dist/behaviors/datatable.d.mts +12 -0
- package/dist/behaviors/datatable.mjs +226 -43
- package/dist/behaviors/date-picker.d.mts +2 -2
- package/dist/behaviors/date-picker.mjs +171 -32
- package/dist/behaviors/dropdown.d.mts +6 -2
- package/dist/behaviors/dropdown.mjs +164 -25
- package/dist/behaviors/events.d.mts +523 -0
- package/dist/behaviors/events.mjs +208 -0
- package/dist/behaviors/input.mjs +25 -12
- package/dist/behaviors/kb-access.d.mts +34 -0
- package/dist/behaviors/kb-access.mjs +569 -0
- package/dist/behaviors/kb-acl.d.mts +50 -0
- package/dist/behaviors/kb-acl.mjs +405 -0
- package/dist/behaviors/kb-answer.d.mts +38 -0
- package/dist/behaviors/kb-answer.mjs +2055 -0
- package/dist/behaviors/kb-audit.d.mts +23 -0
- package/dist/behaviors/kb-audit.mjs +375 -0
- package/dist/behaviors/kb-canvas.d.mts +44 -0
- package/dist/behaviors/kb-canvas.mjs +589 -0
- package/dist/behaviors/kb-chain.d.mts +15 -0
- package/dist/behaviors/kb-chain.mjs +270 -0
- package/dist/behaviors/kb-checkpoint.d.mts +16 -0
- package/dist/behaviors/kb-checkpoint.mjs +342 -0
- package/dist/behaviors/kb-chunks.d.mts +31 -0
- package/dist/behaviors/kb-chunks.mjs +475 -0
- package/dist/behaviors/kb-citation.d.mts +38 -0
- package/dist/behaviors/kb-citation.mjs +677 -0
- package/dist/behaviors/kb-clarify.d.mts +20 -0
- package/dist/behaviors/kb-clarify.mjs +248 -0
- package/dist/behaviors/kb-conflict.d.mts +22 -0
- package/dist/behaviors/kb-conflict.mjs +284 -0
- package/dist/behaviors/kb-connector.d.mts +17 -0
- package/dist/behaviors/kb-connector.mjs +375 -0
- package/dist/behaviors/kb-core.d.mts +529 -0
- package/dist/behaviors/kb-core.mjs +890 -0
- package/dist/behaviors/kb-eval.d.mts +22 -0
- package/dist/behaviors/kb-eval.mjs +408 -0
- package/dist/behaviors/kb-explain.d.mts +11 -0
- package/dist/behaviors/kb-explain.mjs +243 -0
- package/dist/behaviors/kb-filter.d.mts +31 -0
- package/dist/behaviors/kb-filter.mjs +587 -0
- package/dist/behaviors/kb-gap.d.mts +27 -0
- package/dist/behaviors/kb-gap.mjs +273 -0
- package/dist/behaviors/kb-hittest.d.mts +34 -0
- package/dist/behaviors/kb-hittest.mjs +409 -0
- package/dist/behaviors/kb-metadata.d.mts +29 -0
- package/dist/behaviors/kb-metadata.mjs +326 -0
- package/dist/behaviors/kb-passage.d.mts +41 -0
- package/dist/behaviors/kb-passage.mjs +529 -0
- package/dist/behaviors/kb-pipeline.d.mts +18 -0
- package/dist/behaviors/kb-pipeline.mjs +381 -0
- package/dist/behaviors/kb-qa.d.mts +26 -0
- package/dist/behaviors/kb-qa.mjs +332 -0
- package/dist/behaviors/kb-rerank.d.mts +20 -0
- package/dist/behaviors/kb-rerank.mjs +315 -0
- package/dist/behaviors/kb-retrieval.d.mts +49 -0
- package/dist/behaviors/kb-retrieval.mjs +746 -0
- package/dist/behaviors/kb-review.d.mts +44 -0
- package/dist/behaviors/kb-review.mjs +451 -0
- package/dist/behaviors/kb-sandbox.d.mts +33 -0
- package/dist/behaviors/kb-sandbox.mjs +325 -0
- package/dist/behaviors/kb-segment.d.mts +32 -0
- package/dist/behaviors/kb-segment.mjs +499 -0
- package/dist/behaviors/kb-sources.d.mts +27 -0
- package/dist/behaviors/kb-sources.mjs +373 -0
- package/dist/behaviors/kb-sql.d.mts +43 -0
- package/dist/behaviors/kb-sql.mjs +948 -0
- package/dist/behaviors/kb-trace.d.mts +16 -0
- package/dist/behaviors/kb-trace.mjs +414 -0
- package/dist/behaviors/kb-visibility.d.mts +44 -0
- package/dist/behaviors/kb-visibility.mjs +403 -0
- package/dist/behaviors/kb-who-can.d.mts +32 -0
- package/dist/behaviors/kb-who-can.mjs +379 -0
- package/dist/behaviors/modal.d.mts +24 -5
- package/dist/behaviors/modal.mjs +76 -10
- package/dist/behaviors/nav.d.mts +1 -1
- package/dist/behaviors/nav.mjs +33 -7
- package/dist/behaviors/notification.d.mts +20 -4
- package/dist/behaviors/notification.mjs +53 -73
- package/dist/behaviors/popover.d.mts +39 -3
- package/dist/behaviors/popover.mjs +90 -4
- package/dist/behaviors/select.d.mts +4 -2
- package/dist/behaviors/select.mjs +161 -24
- package/dist/behaviors/sidebar.d.mts +5 -2
- package/dist/behaviors/sidebar.mjs +43 -13
- package/dist/behaviors/slider.d.mts +5 -2
- package/dist/behaviors/slider.mjs +54 -43
- package/dist/behaviors/split-pane.d.mts +6 -2
- package/dist/behaviors/split-pane.mjs +62 -21
- package/dist/behaviors/tabs.d.mts +3 -2
- package/dist/behaviors/tabs.mjs +65 -14
- package/dist/behaviors/tag-input.d.mts +5 -2
- package/dist/behaviors/tag-input.mjs +61 -21
- package/dist/behaviors/theme.d.mts +13 -2
- package/dist/behaviors/theme.mjs +48 -4
- package/dist/behaviors/toast.d.mts +30 -8
- package/dist/behaviors/toast.mjs +74 -7
- package/dist/behaviors/tree.d.mts +5 -2
- package/dist/behaviors/tree.mjs +38 -15
- package/dist/behaviors/upload.mjs +21 -23
- package/dist/cli.mjs +1 -1
- package/dist/components/ai-branch.mjs +3 -0
- package/dist/components/ai-chat.css +295 -0
- package/dist/components/ai-feedback.mjs +3 -0
- package/dist/components/ai-panel.css +218 -1
- package/dist/components/ai-threads.mjs +3 -0
- package/dist/components/ai-tool-call.mjs +1 -1
- package/dist/components/badge.css +1 -1
- package/dist/components/breadcrumb.css +0 -32
- package/dist/components/chart-calendar.mjs +1 -2
- package/dist/components/chart-graph.css +57 -0
- package/dist/components/chart-graph.mjs +4 -0
- package/dist/components/chart-map.mjs +3 -0
- package/dist/components/chart-pie.css +0 -6
- package/dist/components/chart-scatter.mjs +1 -1
- package/dist/components/charts.css +33 -1
- package/dist/components/charts.mjs +1 -0
- package/dist/components/content.css +3 -16
- package/dist/components/datatable.css +1 -1
- package/dist/components/date-picker.css +1 -1
- package/dist/components/kb-access.mjs +4 -0
- package/dist/components/kb-acl.mjs +4 -0
- package/dist/components/kb-agent.css +481 -0
- package/dist/components/kb-answer.mjs +4 -0
- package/dist/components/kb-audit.mjs +4 -0
- package/dist/components/kb-canvas.mjs +4 -0
- package/dist/components/kb-chain.mjs +4 -0
- package/dist/components/kb-checkpoint.mjs +4 -0
- package/dist/components/kb-chunks.mjs +4 -0
- package/dist/components/kb-citation.mjs +4 -0
- package/dist/components/kb-clarify.mjs +4 -0
- package/dist/components/kb-conflict.mjs +4 -0
- package/dist/components/kb-connector.mjs +4 -0
- package/dist/components/kb-data.css +649 -0
- package/dist/components/kb-eval.mjs +4 -0
- package/dist/components/kb-explain.mjs +4 -0
- package/dist/components/kb-filter.mjs +4 -0
- package/dist/components/kb-gap.mjs +4 -0
- package/dist/components/kb-ground.css +566 -0
- package/dist/components/kb-hittest.mjs +4 -0
- package/dist/components/kb-ingest.css +898 -0
- package/dist/components/kb-metadata.mjs +4 -0
- package/dist/components/kb-ops.css +548 -0
- package/dist/components/kb-passage.mjs +4 -0
- package/dist/components/kb-perm.css +444 -0
- package/dist/components/kb-pipeline.mjs +4 -0
- package/dist/components/kb-qa.mjs +4 -0
- package/dist/components/kb-rerank.mjs +4 -0
- package/dist/components/kb-retrieval.mjs +4 -0
- package/dist/components/kb-review.mjs +4 -0
- package/dist/components/kb-sandbox.mjs +4 -0
- package/dist/components/kb-search.css +940 -0
- package/dist/components/kb-segment.mjs +4 -0
- package/dist/components/kb-sources.mjs +4 -0
- package/dist/components/kb-sql.mjs +4 -0
- package/dist/components/kb-trace.mjs +4 -0
- package/dist/components/kb-visibility.mjs +4 -0
- package/dist/components/kb-who-can.mjs +4 -0
- package/dist/components/kb.css +252 -0
- package/dist/components/kb.mjs +9 -0
- package/dist/components/notification.css +2 -3
- package/dist/components/pagination.css +3 -1
- package/dist/components/pagination.mjs +1 -0
- package/dist/components/rating.mjs +1 -0
- package/dist/components/segmented.css +9 -1
- package/dist/components/segmented.mjs +1 -1
- package/dist/components/select.css +67 -4
- package/dist/components/steps.css +13 -3
- package/dist/components/steps.mjs +1 -0
- package/dist/components/switch.css +3 -1
- package/dist/components/switch.mjs +1 -0
- package/dist/components/table.mjs +1 -0
- package/dist/components/tabs.css +23 -0
- package/dist/components/tag-input.css +1 -6
- package/dist/components/upload.css +0 -15
- package/dist/index.d.mts +48 -11
- package/dist/index.mjs +13205 -3615
- package/dist/registry.json +366 -15
- package/dist/retro-effects.css +3 -16
- package/dist/tokens/retro-effects.css +3 -16
- package/dist/tokens/style-profiles.css +3 -2
- package/dist/tokens/typography.css +2 -0
- package/dist/tokens.css +5 -2
- package/dist/ui.css +5713 -267
- package/docs/research/2026-10-03-ai-kb-components.md +392 -0
- package/docs/research/2026-10-03-kb-permissions.md +992 -0
- package/docs/spec/ai-native.md +7 -4
- package/docs/spec/kb-family.md +443 -0
- package/package.json +2 -2
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @icen.ai/ui — kb 族共享视觉基座(与 docs/spec/kb-family.md §2 配套)
|
|
3
|
+
*
|
|
4
|
+
* 每个 kb-* 组件的 kit 入口经 EXTRA_CSS 引入本文件;六个域文件(kb-ground/kb-ingest/
|
|
5
|
+
* kb-search/kb-data/kb-ops/kb-agent.css)不再重复定义这里的原语。
|
|
6
|
+
*
|
|
7
|
+
* 设计纪律(族内一致性硬约束):
|
|
8
|
+
* - 数字一律 .kb-num(等宽 + tabular-nums);元信息 .kb-meta(11.5px faint)
|
|
9
|
+
* - 证据引用体 .kb-quote(左侧 2px 证据线,颜色只用层级色不用装饰色)
|
|
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)
|
|
15
|
+
* - 动效 ≤240ms ease-out;流式脉冲 1.6s;reduced-motion 走全局规则
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
.kb-row {
|
|
19
|
+
display: grid;
|
|
20
|
+
grid-template-columns: auto 1fr auto;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 10px;
|
|
23
|
+
min-height: 28px;
|
|
24
|
+
padding: 2px 8px;
|
|
25
|
+
border-radius: var(--radius-sm, 6px);
|
|
26
|
+
}
|
|
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 {
|
|
30
|
+
font-size: 13px;
|
|
31
|
+
color: var(--token-text);
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
}
|
|
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; }
|
|
38
|
+
|
|
39
|
+
/* 密度:compact 档(管理台/密集列表) */
|
|
40
|
+
[data-density='compact'] .kb-row { min-height: 24px; gap: 8px; }
|
|
41
|
+
|
|
42
|
+
/* 数字与元信息 */
|
|
43
|
+
.kb-num {
|
|
44
|
+
font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
45
|
+
font-variant-numeric: tabular-nums;
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
color: var(--token-text-muted);
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
}
|
|
50
|
+
.kb-meta {
|
|
51
|
+
font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
52
|
+
font-size: 11px;
|
|
53
|
+
letter-spacing: 0.3px;
|
|
54
|
+
color: var(--token-text-faint);
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* 状态点(族内状态色的唯一入口) */
|
|
59
|
+
.kb-dot {
|
|
60
|
+
width: 7px;
|
|
61
|
+
height: 7px;
|
|
62
|
+
border-radius: 50%;
|
|
63
|
+
flex: 0 0 auto;
|
|
64
|
+
background: var(--token-text-faint);
|
|
65
|
+
opacity: 0.6;
|
|
66
|
+
}
|
|
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(--token-danger, var(--token-error)); opacity: 1; }
|
|
70
|
+
.kb-dot.is-live { background: var(--token-accent); opacity: 1; animation: kb-pulse 1.6s ease-in-out infinite; }
|
|
71
|
+
|
|
72
|
+
@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); }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* 分数条(序数纪律:null 分数不渲染条) */
|
|
78
|
+
.kb-score { display: inline-flex; align-items: center; gap: 6px; min-width: 88px; }
|
|
79
|
+
.kb-score-bar {
|
|
80
|
+
flex: 1 1 auto;
|
|
81
|
+
height: 3px;
|
|
82
|
+
border-radius: 2px;
|
|
83
|
+
background: var(--token-line-soft);
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
min-width: 40px;
|
|
86
|
+
}
|
|
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, ui-monospace, monospace); font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--token-text-muted); min-width: 34px; text-align: right; }
|
|
89
|
+
|
|
90
|
+
/* 证据引用体(原文摘录、citedText、chunk 预览) */
|
|
91
|
+
.kb-quote {
|
|
92
|
+
position: relative;
|
|
93
|
+
padding: 2px 0 2px 12px;
|
|
94
|
+
font-size: 12.5px;
|
|
95
|
+
line-height: 1.7;
|
|
96
|
+
color: var(--token-text-muted);
|
|
97
|
+
}
|
|
98
|
+
.kb-quote::before {
|
|
99
|
+
content: '';
|
|
100
|
+
position: absolute;
|
|
101
|
+
left: 0;
|
|
102
|
+
top: 4px;
|
|
103
|
+
bottom: 4px;
|
|
104
|
+
width: 2px;
|
|
105
|
+
border-radius: 1px;
|
|
106
|
+
background: var(--token-line);
|
|
107
|
+
}
|
|
108
|
+
.kb-quote mark,
|
|
109
|
+
.kb-passage-body mark,
|
|
110
|
+
.kb-hit mark {
|
|
111
|
+
background: color-mix(in srgb, var(--token-accent) 18%, transparent);
|
|
112
|
+
color: inherit;
|
|
113
|
+
border-radius: 2px;
|
|
114
|
+
padding: 0 2px;
|
|
115
|
+
}
|
|
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, var(--token-accent)) 20%, transparent); }
|
|
121
|
+
|
|
122
|
+
/* 徽标(来源元数据:官方/新鲜度/权限) */
|
|
123
|
+
.kb-badge {
|
|
124
|
+
display: inline-flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
gap: 4px;
|
|
127
|
+
font-size: 10.5px;
|
|
128
|
+
line-height: 1;
|
|
129
|
+
letter-spacing: 0.3px;
|
|
130
|
+
color: var(--token-text-faint);
|
|
131
|
+
border: 1px solid var(--token-line-soft);
|
|
132
|
+
border-radius: 999px;
|
|
133
|
+
padding: 2.5px 7px;
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
}
|
|
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, transparent);
|
|
141
|
+
}
|
|
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);
|
|
148
|
+
}
|
|
149
|
+
.kb-badge--admin { font-family: var(--font-mono, monospace); }
|
|
150
|
+
|
|
151
|
+
/* 中性 chip(表名/关键词/过滤值;展示性标签用 tag.css 的 .tag,这里只做 kb 域自持变体) */
|
|
152
|
+
.kb-chip {
|
|
153
|
+
display: inline-flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
gap: 4px;
|
|
156
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
157
|
+
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, 6px);
|
|
162
|
+
padding: 2px 7px;
|
|
163
|
+
max-width: 220px;
|
|
164
|
+
white-space: nowrap;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
text-overflow: ellipsis;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* 折叠两段式(摘要行 + muted 内容体;与 ai 族渐进披露同构) */
|
|
170
|
+
.kb-fold-head {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
gap: 8px;
|
|
174
|
+
width: 100%;
|
|
175
|
+
min-height: 28px;
|
|
176
|
+
padding: 2px 8px;
|
|
177
|
+
border: none;
|
|
178
|
+
background: none;
|
|
179
|
+
border-radius: var(--radius-sm, 6px);
|
|
180
|
+
font: inherit;
|
|
181
|
+
font-size: 12.5px;
|
|
182
|
+
color: var(--token-text-muted);
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
text-align: left;
|
|
185
|
+
}
|
|
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 {
|
|
189
|
+
display: inline-block;
|
|
190
|
+
width: 1em;
|
|
191
|
+
color: var(--token-text-faint);
|
|
192
|
+
font-size: 10px;
|
|
193
|
+
transition: transform 0.16s ease-out;
|
|
194
|
+
flex: 0 0 auto;
|
|
195
|
+
}
|
|
196
|
+
.kb-fold-head[aria-expanded='true'] .kb-fold-caret { transform: rotate(90deg); }
|
|
197
|
+
.kb-fold-count { margin-left: auto; }
|
|
198
|
+
|
|
199
|
+
/* 键位提示(标注队列快捷键等) */
|
|
200
|
+
.kb-key {
|
|
201
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
202
|
+
font-size: 10px;
|
|
203
|
+
color: var(--token-text-faint);
|
|
204
|
+
border: 1px solid var(--token-line-soft);
|
|
205
|
+
border-bottom-width: 2px;
|
|
206
|
+
border-radius: 4px;
|
|
207
|
+
padding: 1px 5px;
|
|
208
|
+
background: var(--token-bg-soft);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* 空态/无死路行动(组件空态的最小底座;复杂空态用 empty.css) */
|
|
212
|
+
.kb-empty {
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
align-items: center;
|
|
216
|
+
gap: 8px;
|
|
217
|
+
padding: 28px 16px;
|
|
218
|
+
color: var(--token-text-faint);
|
|
219
|
+
font-size: 12.5px;
|
|
220
|
+
text-align: center;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* 截断/边界声明(诚实呈现) */
|
|
224
|
+
.kb-notice {
|
|
225
|
+
display: flex;
|
|
226
|
+
align-items: center;
|
|
227
|
+
gap: 6px;
|
|
228
|
+
font-size: 11.5px;
|
|
229
|
+
color: var(--token-text-faint);
|
|
230
|
+
padding: 4px 8px;
|
|
231
|
+
}
|
|
232
|
+
.kb-notice svg { width: 12px; height: 12px; flex: 0 0 auto; }
|
|
233
|
+
/* flex 容器内 hidden 会被 display 覆盖——notice 显隐必须显式归零 */
|
|
234
|
+
.kb-notice[hidden] { display: none; }
|
|
235
|
+
|
|
236
|
+
/* 检索过滤层徽标(权限域注入检索域的共享原语,放基座使 kit/kb-retrieval 与 kit/kb-* 均自持;
|
|
237
|
+
三态:pre ✓ 安全基线 / post ⚠ 缺陷层 / none ✕ fail-open 危险——spec §9.0-1/§9.7) */
|
|
238
|
+
.kb-layer-chip {
|
|
239
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
240
|
+
font-size: 11px;
|
|
241
|
+
cursor: pointer;
|
|
242
|
+
}
|
|
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, #c0392b); border-color: color-mix(in srgb, var(--token-error, #c0392b) 45%, transparent); }
|
|
246
|
+
.kb-layer-chip:focus-visible { outline: 2px solid var(--token-accent); outline-offset: 1px; }
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
/* 动效守卫:kb-pulse(.kb-dot.is-live 的存活脉冲)在减少动效偏好下停帧(保持静态高亮,不隐状态) */
|
|
250
|
+
@media (prefers-reduced-motion: reduce) {
|
|
251
|
+
.kb-dot.is-live { animation: none; }
|
|
252
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* 完整契约(由 behavior 渲染):
|
|
11
11
|
* <div class="notification-container" role="region" aria-label="通知" data-position="top-right">
|
|
12
|
-
* <div class="notification [notification--success|warning|error
|
|
12
|
+
* <div class="notification [notification--success|warning|error]
|
|
13
13
|
* [.is-priority] [.is-unread] [.is-progress] [.is-clickable] [.is-paused]
|
|
14
14
|
* [.has-avatar]" role="alert|button">
|
|
15
15
|
* <span class="notification-icon">…svg 或 img.notification-avatar…</span>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
.notification.notification--success { border-left-color: var(--token-success); }
|
|
82
82
|
.notification.notification--warning { border-left-color: var(--token-warning); }
|
|
83
83
|
.notification.notification--error { border-left-color: var(--token-error); }
|
|
84
|
-
|
|
84
|
+
/* info 为基类默认配色(基类左侧边即 --token-info),无修饰类 */
|
|
85
85
|
|
|
86
86
|
/* ── 优先级:高优先级强调(左侧加粗 + 更强阴影)── */
|
|
87
87
|
.notification.is-priority {
|
|
@@ -138,7 +138,6 @@
|
|
|
138
138
|
.notification--success .notification-icon { color: var(--token-success); }
|
|
139
139
|
.notification--warning .notification-icon { color: var(--token-warning); }
|
|
140
140
|
.notification--error .notification-icon { color: var(--token-error); }
|
|
141
|
-
.notification--info .notification-icon { color: var(--token-info); }
|
|
142
141
|
|
|
143
142
|
/* 头像(圆形图) */
|
|
144
143
|
.notification-avatar {
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
* <button class="page-btn motion" aria-label="下一页">›</button>
|
|
11
11
|
* </nav>
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* 点击接线由 behaviors/controls.ts 的 initPagination() 提供(.page-btn 激活位移 +
|
|
14
|
+
* icen:page-change,上下页按钮按 aria-label / data-dir 推断方向);总页数与省略号
|
|
15
|
+
* 折叠策略由消费方维护,这里只提供样式契约。
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
.pagination {
|
|
@@ -28,7 +28,15 @@
|
|
|
28
28
|
* …
|
|
29
29
|
* </div>
|
|
30
30
|
*
|
|
31
|
-
* segmented/
|
|
31
|
+
* segmented / stepper 由 behaviors/controls.ts 接线(initSegmented / initStepper,
|
|
32
|
+
* 派 icen:segmented-change / icen:stepper-change);otp 由 behaviors/input.ts 的
|
|
33
|
+
* initInput 接线;toggle-group 为纯 CSS 状态组件(.is-active,使用方自行驱动)。
|
|
34
|
+
*
|
|
35
|
+
* 增强段(正文"增强"段):
|
|
36
|
+
* 变体:segmented--block / segmented--ghost / toggle-group--block / toggle-group--ghost
|
|
37
|
+
* 槽位:stepper-unit(步进器单位后缀)/ otp-separator(OTP 分组分隔符)
|
|
38
|
+
* 状态类(消费方施加):.otp.is-complete(behavior 接线中)/ .otp.is-error /
|
|
39
|
+
* .segmented.is-error / .segmented.is-disabled / .toggle-group.is-error / .toggle-group.is-disabled
|
|
32
40
|
*/
|
|
33
41
|
|
|
34
42
|
/* ── 分段控件(排他单选) ── */
|
|
@@ -4,14 +4,24 @@
|
|
|
4
4
|
*
|
|
5
5
|
* 完整契约:
|
|
6
6
|
* <div class="select [data-disabled] [.is-open]" data-select
|
|
7
|
-
* [data-select-search] [data-select-multiple] [data-select-max="3"]
|
|
7
|
+
* [data-select-search] [data-select-multiple] [data-select-max="3"]
|
|
8
|
+
* [data-panel-width="220"] [data-panel-min="200"]
|
|
9
|
+
* [data-panel-max="360"] [data-panel-max-height="320"]>
|
|
10
|
+
* <!-- 选项 .select-option 内支持任意 HTML(色卡 / 图标 / 多行);
|
|
11
|
+
* 面板尺寸为全库统一 PanelSizing 契约(behaviors/popover.ts) -->
|
|
8
12
|
* <button class="select-trigger pressable focus-ring [--sm|--lg]" aria-haspopup="listbox"
|
|
9
13
|
* aria-expanded="false" [disabled]>
|
|
10
14
|
* <span class="select-leading">…</span> 可选前缀
|
|
11
|
-
* <span class="select-value is-empty">占位</span>
|
|
12
|
-
* <
|
|
15
|
+
* <span class="select-value is-empty">占位</span> 多选有选中时 behavior 隐藏它
|
|
16
|
+
* <span class="select-chips"> ← 多选选中态由 behavior 渲染(勿手写)
|
|
17
|
+
* <span class="select-chip">标签<span class="select-chip-x" role="button" tabindex="-1">×</span></span>
|
|
18
|
+
* <span class="select-chip select-chip--more">+2</span>
|
|
19
|
+
* </span>
|
|
13
20
|
* <svg class="select-chevron">…</svg>
|
|
14
21
|
* </button>
|
|
22
|
+
* <button class="select-clear" aria-label="清除全部" hidden>×</button> ← 多选可选:
|
|
23
|
+
* 与 trigger 同级(不能嵌套在 button 内),绝对定位叠进 trigger 右侧;
|
|
24
|
+
* behavior 在有选中时自动显示
|
|
15
25
|
* <div class="select-panel" hidden role="listbox">
|
|
16
26
|
* <div class="select-search"> ← data-select-search 时 behavior 自动注入
|
|
17
27
|
* <input class="select-search-input" placeholder="搜索…" />
|
|
@@ -209,8 +219,13 @@
|
|
|
209
219
|
box-shadow: var(--icen-control-focus-shadow);
|
|
210
220
|
}
|
|
211
221
|
|
|
212
|
-
/* ──
|
|
222
|
+
/* ── 多选清除按钮(与 trigger 同级,绝对定位叠进 trigger 右侧、chevron 左侧) ── */
|
|
213
223
|
.select-clear {
|
|
224
|
+
position: absolute;
|
|
225
|
+
top: 50%;
|
|
226
|
+
right: calc(var(--density-space-sm) + 20px);
|
|
227
|
+
transform: translateY(-50%);
|
|
228
|
+
z-index: 1;
|
|
214
229
|
display: inline-flex;
|
|
215
230
|
align-items: center;
|
|
216
231
|
justify-content: center;
|
|
@@ -231,6 +246,53 @@
|
|
|
231
246
|
color: var(--token-text);
|
|
232
247
|
background: var(--token-fill-1);
|
|
233
248
|
}
|
|
249
|
+
/* 有清除钮时 trigger 右侧让位(clear 18px + chevron 14px + 间距) */
|
|
250
|
+
.select:has(.select-clear) .select-trigger { padding-right: 52px; }
|
|
251
|
+
|
|
252
|
+
/* ── 多选 chips(tag 式展示;× 仅 hover 对应 chip 时出现) ── */
|
|
253
|
+
.select-chips {
|
|
254
|
+
display: inline-flex;
|
|
255
|
+
flex-wrap: wrap;
|
|
256
|
+
align-items: center;
|
|
257
|
+
gap: 4px;
|
|
258
|
+
flex: 1;
|
|
259
|
+
min-width: 0;
|
|
260
|
+
}
|
|
261
|
+
.select-chip {
|
|
262
|
+
display: inline-flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
max-width: 100%;
|
|
265
|
+
font-size: var(--density-font-size-xs);
|
|
266
|
+
line-height: 1.6;
|
|
267
|
+
color: var(--token-text);
|
|
268
|
+
background: var(--token-fill-2);
|
|
269
|
+
border-radius: var(--radius-sm);
|
|
270
|
+
padding: 0 7px;
|
|
271
|
+
white-space: nowrap;
|
|
272
|
+
}
|
|
273
|
+
.select-chip-x {
|
|
274
|
+
display: inline-flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
justify-content: center;
|
|
277
|
+
width: 0;
|
|
278
|
+
opacity: 0;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
margin-left: 0;
|
|
281
|
+
color: var(--token-text-faint);
|
|
282
|
+
border-radius: var(--radius-full);
|
|
283
|
+
font-size: var(--density-font-size-md);
|
|
284
|
+
line-height: 1;
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
transition:
|
|
287
|
+
width var(--icen-tx-fast),
|
|
288
|
+
opacity var(--icen-tx-fast),
|
|
289
|
+
margin-left var(--icen-tx-fast),
|
|
290
|
+
color var(--icen-tx-fast);
|
|
291
|
+
}
|
|
292
|
+
.select-chip:hover .select-chip-x,
|
|
293
|
+
.select-chip-x:focus-visible { width: 12px; opacity: 1; margin-left: 4px; }
|
|
294
|
+
.select-chip-x:hover { color: var(--token-error); }
|
|
295
|
+
.select-chip--more { color: var(--token-text-muted); background: var(--token-fill-1); }
|
|
234
296
|
|
|
235
297
|
/* ── 多选 trigger 高度自适应(chips 可能换行) ── */
|
|
236
298
|
.select[data-select-multiple] .select-trigger {
|
|
@@ -263,5 +325,6 @@
|
|
|
263
325
|
@media (prefers-reduced-motion: reduce) {
|
|
264
326
|
.select-panel { animation: none; }
|
|
265
327
|
.select-search-input,
|
|
328
|
+
.select-chip-x,
|
|
266
329
|
.select-clear { transition: none; }
|
|
267
330
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @icen.ai/ui — Component: steps(步骤条,横向默认 / .steps--vertical 垂直)
|
|
3
3
|
*
|
|
4
4
|
* 完整契约:
|
|
5
|
-
* <ol class="steps [steps--vertical] [steps--sm|steps--lg]
|
|
5
|
+
* <ol class="steps [steps--vertical] [steps--sm|steps--lg] [steps--dots|steps--progress|steps--connected]"
|
|
6
|
+
* aria-label="进度">
|
|
6
7
|
* <li class="step [step--finish|step--process|step--wait] [.step--error]">
|
|
7
8
|
* <span class="step-line"></span> ← 横向:右半段连线;末步自动隐藏
|
|
8
9
|
* <span class="step-dot">[✓ | ! | 数字]</span>
|
|
@@ -14,7 +15,11 @@
|
|
|
14
15
|
* </ol>
|
|
15
16
|
*
|
|
16
17
|
* 四态:finish / process / wait / error(错误用 error 色 dot + 描边)。
|
|
17
|
-
*
|
|
18
|
+
* 变体与增强(正文下半段):--dots 纯点紧凑 / --progress 步骤间填充进度线 / --connected 虚线连接;
|
|
19
|
+
* dot 内可放 svg.step-dot-icon;step-desc 旁可加 .step-extra 富化描述;
|
|
20
|
+
* 可点击步骤标 .step--clickable(与 controls.ts initSteps 的 JSDoc 同口径)。
|
|
21
|
+
* 点击 .step[role=button] 由 behaviors/controls.ts 的 initSteps() 接线(激活态位移 +
|
|
22
|
+
* icen:step-change);跳转业务仍由使用方监听事件实现。
|
|
18
23
|
*/
|
|
19
24
|
|
|
20
25
|
.steps {
|
|
@@ -141,7 +146,9 @@
|
|
|
141
146
|
padding: 0;
|
|
142
147
|
font-size: 0;
|
|
143
148
|
}
|
|
144
|
-
|
|
149
|
+
/* 线 top = dot 高度一半:默认 32→16 / sm 24→12 / lg 40→20 / dots 10→5;
|
|
150
|
+
本块位于尺寸变体之后,同等特异性下靠源顺序生效,dots 与 --sm/--lg 叠加时以 5px 为准 */
|
|
151
|
+
.steps--dots .step-line { top: 5px; }
|
|
145
152
|
.steps--dots .step-title,
|
|
146
153
|
.steps--dots .step-desc { display: none; }
|
|
147
154
|
.steps--dots .step { flex: none; }
|
|
@@ -171,8 +178,11 @@
|
|
|
171
178
|
}
|
|
172
179
|
|
|
173
180
|
/* ── 进度条变体(步骤间的填充进度,非离散连线) ── */
|
|
181
|
+
/* 高度 1px→3px 时线只向下扩张 2px,整体上移 1px 使线心与 1px 基线居中一致;
|
|
182
|
+
用 translateY 而非改 top,可同时适配 --sm(12px)/--lg(20px) 的不同基线 */
|
|
174
183
|
.steps--progress .step-line {
|
|
175
184
|
height: 3px;
|
|
185
|
+
transform: translateY(-1px);
|
|
176
186
|
border-radius: var(--radius-full);
|
|
177
187
|
background: var(--token-fill-2);
|
|
178
188
|
overflow: hidden;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @icen.ai/ui — Component: switch / checkbox / radio(开关 / 勾选 / 单选行)
|
|
3
|
-
*
|
|
3
|
+
* 状态组件:状态全走 aria-checked / .is-selected;交互由 behaviors/controls.ts 的
|
|
4
|
+
* initSwitch() 接线(点击 / Space / Enter 翻转并派 icen:switch-change / icen:check-change),
|
|
5
|
+
* 不接线时亦可由使用方自行驱动状态。
|
|
4
6
|
*
|
|
5
7
|
* 完整契约:
|
|
6
8
|
* <button class="switch [--sm|--lg]" role="switch" aria-checked="true|false" [disabled]>
|
package/dist/components/tabs.css
CHANGED
|
@@ -221,3 +221,26 @@
|
|
|
221
221
|
@media (prefers-reduced-motion: reduce) {
|
|
222
222
|
.page-tab, .tabs a, .page-tab-close { transition: none; }
|
|
223
223
|
}
|
|
224
|
+
|
|
225
|
+
/* ── 指示条([data-tabs-ink],与 behaviors/tabs 配套;本节为追加)── */
|
|
226
|
+
/* tablist(.tabs)挂 data-tabs-ink 时,行为层创建并移动 .tabs-ink:
|
|
227
|
+
宽 / translateX 由 JS 内联写入(布局定位,同 popover 模式);
|
|
228
|
+
此处只负责视觉(高度 / 圆角 / 背景)与位移过渡(--duration / --ease token)。 */
|
|
229
|
+
.tabs[data-tabs-ink] {
|
|
230
|
+
position: relative;
|
|
231
|
+
}
|
|
232
|
+
.tabs-ink {
|
|
233
|
+
position: absolute;
|
|
234
|
+
bottom: -1px; /* 盖在容器 1px 底边线上,与活动 tab 的 2px 下划线同高 */
|
|
235
|
+
left: 0;
|
|
236
|
+
height: 2px;
|
|
237
|
+
border-radius: var(--radius-full);
|
|
238
|
+
background: var(--token-accent);
|
|
239
|
+
pointer-events: none;
|
|
240
|
+
transition:
|
|
241
|
+
width var(--duration-normal) var(--ease-out),
|
|
242
|
+
transform var(--duration-normal) var(--ease-out);
|
|
243
|
+
}
|
|
244
|
+
@media (prefers-reduced-motion: reduce) {
|
|
245
|
+
.tabs-ink { transition: none; }
|
|
246
|
+
}
|
|
@@ -70,12 +70,7 @@
|
|
|
70
70
|
max-width: 100%;
|
|
71
71
|
animation: tag-pop var(--icen-tx-fast);
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
white-space: nowrap;
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
text-overflow: ellipsis;
|
|
77
|
-
max-width: 200px;
|
|
78
|
-
}
|
|
73
|
+
/* readonly 变体(消费方手写标记,behavior 不产出) */
|
|
79
74
|
.tag-chip--readonly { background: var(--token-fill-2); color: var(--token-text-muted); }
|
|
80
75
|
|
|
81
76
|
@keyframes tag-pop {
|
|
@@ -195,21 +195,6 @@
|
|
|
195
195
|
box-shadow: var(--icen-ring);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
/* 进度条(behavior 可选注入 .upload-list-item-progress) */
|
|
199
|
-
.upload-list-item-progress {
|
|
200
|
-
height: 2px;
|
|
201
|
-
width: 100%;
|
|
202
|
-
background: var(--token-fill-2);
|
|
203
|
-
border-radius: var(--radius-full);
|
|
204
|
-
overflow: hidden;
|
|
205
|
-
margin-top: 2px;
|
|
206
|
-
}
|
|
207
|
-
.upload-list-item-progress-bar {
|
|
208
|
-
height: 100%;
|
|
209
|
-
background: var(--token-accent);
|
|
210
|
-
border-radius: var(--radius-full);
|
|
211
|
-
transition: width var(--icen-tx-normal) var(--ease-out);
|
|
212
|
-
}
|
|
213
198
|
.upload-list-item.is-error {
|
|
214
199
|
border-color: var(--token-error);
|
|
215
200
|
}
|