@icen.ai/ui 0.8.1 → 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 +49 -6
- package/README.md +12 -9
- package/dist/behaviors/ai-branch.d.mts +19 -0
- package/dist/behaviors/ai-branch.mjs +217 -0
- package/dist/behaviors/ai-chat.d.mts +8 -6
- package/dist/behaviors/ai-chat.mjs +68 -8
- package/dist/behaviors/ai-composer.mjs +108 -20
- package/dist/behaviors/ai-feedback.d.mts +26 -0
- package/dist/behaviors/ai-feedback.mjs +303 -0
- package/dist/behaviors/ai-panel.d.mts +15 -1
- package/dist/behaviors/ai-panel.mjs +26 -0
- package/dist/behaviors/ai-threads.d.mts +38 -0
- package/dist/behaviors/ai-threads.mjs +319 -0
- package/dist/behaviors/ai-tool.mjs +5 -0
- package/dist/behaviors/ai-tools.mjs +5 -0
- package/dist/behaviors/charts.d.mts +103 -1
- package/dist/behaviors/charts.mjs +795 -0
- package/dist/behaviors/events.d.mts +193 -0
- 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/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 +217 -0
- package/dist/components/ai-threads.mjs +3 -0
- 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-scatter.mjs +1 -1
- package/dist/components/charts.css +32 -0
- package/dist/components/charts.mjs +1 -0
- 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/index.d.mts +37 -2
- package/dist/index.mjs +8555 -205
- package/dist/registry.json +325 -3
- package/dist/ui.css +5451 -45
- 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/kb-family.md +443 -0
- package/package.json +2 -2
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @icen.ai/ui — kb-perm.css(权限域:kb-acl / kb-who-can / kb-access / kb-audit / kb-visibility)
|
|
3
|
+
*
|
|
4
|
+
* 安全纪律(spec §9.0,评审必查):
|
|
5
|
+
* - 对授权侧诚实(身份/过滤层徽标/安全计数/审批路由),对受限侧沉默(被裁数量/标题/分数一律不渲染)
|
|
6
|
+
* - 「不知道」与「不能说」不可区分;deny 一票否决置顶;break-glass 行警示粒度 ≥ 常规
|
|
7
|
+
*
|
|
8
|
+
* 共享原语来自 kb.css(.kb-row/.kb-num/.kb-meta/.kb-dot/.kb-badge/.kb-chip/.kb-empty/.kb-notice)。
|
|
9
|
+
* 本文件三段分界,各组件作者只填自己的段。
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* ══════════════ 段A · kb-acl + kb-who-can(文档权限面板 + 有效权限检查器)══════════════ */
|
|
13
|
+
|
|
14
|
+
/* —— kb-acl:继承 banner / grants 双区 / deny 置顶 / system 不可删 —— */
|
|
15
|
+
.kb-acl { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
|
|
16
|
+
|
|
17
|
+
.kb-acl-inherit {
|
|
18
|
+
display: flex; align-items: center; gap: 8px;
|
|
19
|
+
padding: 7px 10px;
|
|
20
|
+
font-size: 12px; color: var(--token-text-muted);
|
|
21
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
22
|
+
background: color-mix(in srgb, var(--token-bg) 55%, transparent);
|
|
23
|
+
}
|
|
24
|
+
.kb-acl-inherit .kb-acl-chain-link { color: var(--token-text-faint); }
|
|
25
|
+
.kb-acl-inherit.is-broken {
|
|
26
|
+
color: var(--token-warning);
|
|
27
|
+
border-color: color-mix(in srgb, var(--token-warning) 45%, transparent);
|
|
28
|
+
background: color-mix(in srgb, var(--token-warning) 6%, transparent);
|
|
29
|
+
}
|
|
30
|
+
.kb-acl-inherit.is-partial { color: var(--token-info); }
|
|
31
|
+
|
|
32
|
+
.kb-acl-grant {
|
|
33
|
+
display: flex; align-items: center; gap: 8px;
|
|
34
|
+
min-height: 28px; padding: 2px 0;
|
|
35
|
+
border-bottom: 1px solid var(--token-line-soft);
|
|
36
|
+
}
|
|
37
|
+
.kb-acl-grant:last-child { border-bottom: none; }
|
|
38
|
+
.kb-acl-grant.is-deny { order: -1; }
|
|
39
|
+
.kb-acl-grant.is-deny .kb-acl-role { color: var(--token-error, #c0392b); border-color: color-mix(in srgb, var(--token-error, #c0392b) 45%, transparent); }
|
|
40
|
+
.kb-acl-grant.is-expiring .kb-acl-meta { color: var(--token-warning); }
|
|
41
|
+
.kb-acl-grant.is-system .kb-acl-remove { display: none; }
|
|
42
|
+
|
|
43
|
+
.kb-acl-subject { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; font-size: 12.5px; color: var(--token-text); }
|
|
44
|
+
.kb-acl-subject[data-kind='group']::before,
|
|
45
|
+
.kb-acl-subject[data-kind='link']::before {
|
|
46
|
+
content: ''; width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto;
|
|
47
|
+
background: var(--token-text-faint);
|
|
48
|
+
}
|
|
49
|
+
.kb-acl-role { flex: 0 0 auto; }
|
|
50
|
+
.kb-acl-meta { flex: 0 1 auto; margin-left: auto; font-size: 11.5px; color: var(--token-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
51
|
+
.kb-acl-remove { flex: 0 0 auto; }
|
|
52
|
+
.kb-acl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
|
|
53
|
+
|
|
54
|
+
/* —— kb-who-can:view-as 检查器(结论 + 扁平原因链)—— */
|
|
55
|
+
.kb-whocan { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
|
|
56
|
+
.kb-whocan-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
57
|
+
.kb-whocan-result { display: flex; flex-direction: column; gap: 8px; }
|
|
58
|
+
.kb-whocan-verdict { font-size: 13px; font-weight: 600; color: var(--token-text); }
|
|
59
|
+
.kb-whocan-result.is-denied .kb-whocan-verdict { color: var(--token-error, #c0392b); }
|
|
60
|
+
.kb-whocan-deniedby {
|
|
61
|
+
padding: 6px 10px; font-size: 12px;
|
|
62
|
+
color: var(--token-error, #c0392b);
|
|
63
|
+
border-left: 2px solid var(--token-error, #c0392b);
|
|
64
|
+
background: color-mix(in srgb, var(--token-error, #c0392b) 6%, transparent);
|
|
65
|
+
border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
|
|
66
|
+
}
|
|
67
|
+
.kb-whocan-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
|
|
68
|
+
.kb-whocan-reason { display: flex; align-items: baseline; gap: 8px; min-height: 26px; padding: 2px 0; border-bottom: 1px solid var(--token-line-soft); font-size: 12.5px; }
|
|
69
|
+
.kb-whocan-reason:last-child { border-bottom: none; }
|
|
70
|
+
.kb-whocan-reason .kb-meta { margin-left: auto; }
|
|
71
|
+
.kb-whocan-rule { font-size: 11.5px; color: var(--token-text-faint); }
|
|
72
|
+
|
|
73
|
+
/* —— 段A 装配件细化:kb-acl head / 区块标题 / 动作钮 / 移除钮 —— */
|
|
74
|
+
.kb-acl-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
75
|
+
.kb-acl-title {
|
|
76
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
77
|
+
flex: 1 1 auto; min-width: 0;
|
|
78
|
+
font-size: 13px; font-weight: 600; color: var(--token-text);
|
|
79
|
+
}
|
|
80
|
+
.kb-acl-title svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--token-text-faint); }
|
|
81
|
+
.kb-acl-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
82
|
+
.kb-acl-act {
|
|
83
|
+
flex: 0 0 auto; height: 24px; padding: 0 10px;
|
|
84
|
+
font: inherit; font-size: 12px; line-height: 1;
|
|
85
|
+
color: var(--token-text-muted);
|
|
86
|
+
background: transparent;
|
|
87
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out;
|
|
90
|
+
}
|
|
91
|
+
.kb-acl-act:hover { color: var(--token-text); border-color: var(--token-line); }
|
|
92
|
+
/* 恢复继承将丢弃本项自定义授权——破坏性动作用描边式 danger(克制,不做实底) */
|
|
93
|
+
.kb-acl-act.is-danger {
|
|
94
|
+
color: var(--token-error, #c0392b);
|
|
95
|
+
border-color: color-mix(in srgb, var(--token-error, #c0392b) 45%, transparent);
|
|
96
|
+
}
|
|
97
|
+
.kb-acl-act.is-danger:hover {
|
|
98
|
+
background: color-mix(in srgb, var(--token-error, #c0392b) 6%, transparent);
|
|
99
|
+
border-color: color-mix(in srgb, var(--token-error, #c0392b) 60%, transparent);
|
|
100
|
+
}
|
|
101
|
+
/* 授权区容器走 flex 列:deny 行的 order:-1(骨架已置)真正生效,区块标题恒在其前 */
|
|
102
|
+
.kb-acl-grants, .kb-acl-links { display: flex; flex-direction: column; }
|
|
103
|
+
.kb-acl-sec { order: -2; font-size: 11.5px; letter-spacing: 0.3px; color: var(--token-text-faint); }
|
|
104
|
+
.kb-acl-note { font-size: 11px; }
|
|
105
|
+
.kb-acl-none { padding: 4px 0; }
|
|
106
|
+
.kb-acl-remove {
|
|
107
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
108
|
+
width: 22px; height: 22px; padding: 0;
|
|
109
|
+
font: inherit; font-size: 13px; line-height: 1;
|
|
110
|
+
color: var(--token-text-faint);
|
|
111
|
+
background: transparent; border: none; border-radius: var(--radius-sm, 6px);
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
transition: color 0.16s ease-out, background-color 0.16s ease-out;
|
|
114
|
+
}
|
|
115
|
+
.kb-acl-remove:hover { color: var(--token-error, #c0392b); background: color-mix(in srgb, var(--token-error, #c0392b) 7%, transparent); }
|
|
116
|
+
/* 面板主行动(accent 线框——面板内唯一 accent 级操作) */
|
|
117
|
+
.kb-acl-grant-btn {
|
|
118
|
+
flex: 0 0 auto; height: 26px; padding: 0 12px;
|
|
119
|
+
font: inherit; font-size: 12.5px; line-height: 1;
|
|
120
|
+
color: var(--token-accent);
|
|
121
|
+
background: transparent;
|
|
122
|
+
border: 1px solid color-mix(in srgb, var(--token-accent) 45%, transparent);
|
|
123
|
+
border-radius: var(--radius-sm, 6px);
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
|
|
126
|
+
}
|
|
127
|
+
.kb-acl-grant-btn:hover { background: color-mix(in srgb, var(--token-accent) 8%, transparent); }
|
|
128
|
+
.kb-acl-remove:focus-visible, .kb-acl-act:focus-visible, .kb-acl-grant-btn:focus-visible {
|
|
129
|
+
outline: 2px solid var(--token-accent); outline-offset: -2px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* —— 段A 装配件细化:kb-who-can 身份下拉 / 检查钮 / 原因链徽标 —— */
|
|
133
|
+
.kb-whocan-user {
|
|
134
|
+
height: 28px; max-width: 240px; padding: 0 8px;
|
|
135
|
+
font: inherit; font-size: 12.5px;
|
|
136
|
+
color: var(--token-text);
|
|
137
|
+
background: var(--token-bg);
|
|
138
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
.kb-whocan-user:focus-visible { outline: none; border-color: var(--token-accent); }
|
|
142
|
+
.kb-whocan-check {
|
|
143
|
+
height: 26px; padding: 0 12px;
|
|
144
|
+
font: inherit; font-size: 12.5px; line-height: 1;
|
|
145
|
+
color: var(--token-text-muted);
|
|
146
|
+
background: transparent;
|
|
147
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out;
|
|
150
|
+
}
|
|
151
|
+
.kb-whocan-check:hover:not(:disabled) { color: var(--token-text); background: var(--token-bg-soft); border-color: var(--token-line); }
|
|
152
|
+
.kb-whocan-check:focus-visible { outline: 2px solid var(--token-accent); outline-offset: -2px; }
|
|
153
|
+
.kb-whocan-user:disabled, .kb-whocan-check:disabled { opacity: var(--icen-disabled-opacity, 0.45); cursor: not-allowed; }
|
|
154
|
+
.kb-whocan-source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--token-text); }
|
|
155
|
+
.kb-whocan-reason .kb-badge { flex: 0 0 auto; }
|
|
156
|
+
/* deny 来源:红色 badge(克制——只落在徽标层),主体文本弱化 */
|
|
157
|
+
.kb-whocan-reason.is-deny .kb-badge {
|
|
158
|
+
color: var(--token-error, #c0392b);
|
|
159
|
+
border-color: color-mix(in srgb, var(--token-error, #c0392b) 45%, transparent);
|
|
160
|
+
}
|
|
161
|
+
.kb-whocan-reason.is-deny .kb-whocan-source { color: var(--token-text-muted); }
|
|
162
|
+
.kb-whocan-role { flex: 0 0 auto; }
|
|
163
|
+
.kb-whocan-none { padding: 4px 0; }
|
|
164
|
+
.kb-whocan-expires { font-size: 11px; }
|
|
165
|
+
|
|
166
|
+
/* ══════════════ 段B · kb-access + kb-audit(访问申请流 + 审计时间线)══════════════ */
|
|
167
|
+
|
|
168
|
+
/* —— kb-access:被拒五件套 + 状态机徽章族 —— */
|
|
169
|
+
.kb-access { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
|
|
170
|
+
.kb-access-denied { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--token-line-soft); border-radius: var(--radius-md, 10px); }
|
|
171
|
+
.kb-access-title { font-size: 13.5px; font-weight: 600; color: var(--token-text); }
|
|
172
|
+
.kb-access-why { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--token-text-muted); }
|
|
173
|
+
.kb-access-owner { font-size: 12px; color: var(--token-text-faint); }
|
|
174
|
+
.kb-access-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
|
|
175
|
+
.kb-access-form { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--token-line-soft); border-radius: var(--radius-md, 10px); }
|
|
176
|
+
.kb-access-form[hidden] { display: none; }
|
|
177
|
+
.kb-access-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--token-text-muted); }
|
|
178
|
+
.kb-access-state .kb-chip[data-state='granted'] { color: var(--token-success); border-color: color-mix(in srgb, var(--token-success) 45%, transparent); }
|
|
179
|
+
.kb-access-state .kb-chip[data-state='expiring'],
|
|
180
|
+
.kb-access-state .kb-chip[data-state='expired'] { color: var(--token-warning); border-color: color-mix(in srgb, var(--token-warning) 45%, transparent); }
|
|
181
|
+
.kb-access-state .kb-chip[data-state='revoked'] { color: var(--token-text-faint); }
|
|
182
|
+
/* denied 不做刺眼红色终态(业界静默默契)——中性呈现 */
|
|
183
|
+
.kb-access-queue { display: flex; flex-direction: column; gap: 8px; }
|
|
184
|
+
.kb-access-req { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px); font-size: 12.5px; }
|
|
185
|
+
.kb-access-req .kb-access-req-actions { margin-left: auto; display: inline-flex; gap: 6px; }
|
|
186
|
+
|
|
187
|
+
/* —— kb-audit:通道过滤 + 异味节 + 时间线 —— */
|
|
188
|
+
.kb-audit { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
|
|
189
|
+
.kb-audit-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
190
|
+
.kb-audit-channels { display: inline-flex; gap: 6px; flex-wrap: wrap; }
|
|
191
|
+
.kb-audit-channels .kb-chip[aria-pressed='true'] { color: var(--token-accent); border-color: var(--token-accent); }
|
|
192
|
+
.kb-audit-hygiene { display: flex; flex-direction: column; gap: 6px; }
|
|
193
|
+
.kb-hygiene { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 7px 10px; font-size: 12.5px; border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px); }
|
|
194
|
+
.kb-hygiene.is-high { border-color: color-mix(in srgb, var(--token-error, #c0392b) 40%, transparent); background: color-mix(in srgb, var(--token-error, #c0392b) 5%, transparent); }
|
|
195
|
+
.kb-hygiene.is-medium { border-color: color-mix(in srgb, var(--token-warning) 40%, transparent); }
|
|
196
|
+
.kb-hygiene .kb-hygiene-act { margin-left: auto; }
|
|
197
|
+
.kb-audit-list { list-style: none; margin: 0; padding: 0; }
|
|
198
|
+
.kb-audit-entry { display: flex; align-items: baseline; gap: 8px; min-height: 28px; padding: 2px 0; border-bottom: 1px solid var(--token-line-soft); font-size: 12.5px; }
|
|
199
|
+
.kb-audit-entry:last-child { border-bottom: none; }
|
|
200
|
+
.kb-audit-entry .kb-audit-detail { flex: 1 1 auto; min-width: 0; color: var(--token-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
201
|
+
/* break-glass:审计粒度 ≥ 常规 + 常驻警示 */
|
|
202
|
+
.kb-audit-entry.is-breakglass { padding: 4px 8px; border-radius: var(--radius-sm, 6px); background: color-mix(in srgb, var(--token-error, #c0392b) 7%, transparent); border-bottom-color: transparent; }
|
|
203
|
+
.kb-audit-entry.is-breakglass .kb-audit-action { color: var(--token-error, #c0392b); border-color: color-mix(in srgb, var(--token-error, #c0392b) 45%, transparent); }
|
|
204
|
+
.kb-audit-actor[data-kind='system'], .kb-audit-actor[data-kind='app'] { color: var(--token-text-faint); }
|
|
205
|
+
|
|
206
|
+
/* —— 段B 细化 · kb-access 构件(按钮/表单/角色 chip/队列行)—— */
|
|
207
|
+
|
|
208
|
+
/* 主作用(accent 稀缺资源:被拒五件套的「申请访问」/表单的「提交申请」各为其视图唯一 accent 钮) */
|
|
209
|
+
.kb-access-btn {
|
|
210
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
211
|
+
font: inherit; font-size: 12.5px;
|
|
212
|
+
color: var(--token-on-accent, #fff);
|
|
213
|
+
background: var(--token-accent);
|
|
214
|
+
border: none; border-radius: var(--radius-sm, 6px);
|
|
215
|
+
padding: 6px 14px; cursor: pointer;
|
|
216
|
+
}
|
|
217
|
+
.kb-access-btn:hover { background: var(--token-accent-deep, var(--token-accent)); }
|
|
218
|
+
.kb-access-btn:focus-visible, .kb-access-act:focus-visible { outline: 2px solid var(--token-accent); outline-offset: 2px; }
|
|
219
|
+
.kb-access-btn svg { width: 12px; height: 12px; flex: 0 0 auto; }
|
|
220
|
+
/* 次作用 ghost(切换身份 / 批准 / 拒绝):永不用 accent,避免与主行动争夺 */
|
|
221
|
+
.kb-access-btn--ghost {
|
|
222
|
+
color: var(--token-text-muted);
|
|
223
|
+
background: transparent;
|
|
224
|
+
border: 1px solid var(--token-line-soft);
|
|
225
|
+
}
|
|
226
|
+
.kb-access-btn--ghost:hover {
|
|
227
|
+
color: var(--token-text);
|
|
228
|
+
border-color: var(--token-line);
|
|
229
|
+
background: var(--token-bg-soft);
|
|
230
|
+
}
|
|
231
|
+
/* 状态行文字钮(申请续期/重新申请):链接级弱化,不用按钮盒子 */
|
|
232
|
+
.kb-access-act {
|
|
233
|
+
font: inherit; font-size: 12px;
|
|
234
|
+
color: var(--token-accent);
|
|
235
|
+
background: none; border: none; padding: 0;
|
|
236
|
+
cursor: pointer; text-decoration: underline;
|
|
237
|
+
text-underline-offset: 3px;
|
|
238
|
+
}
|
|
239
|
+
.kb-access-act:hover { color: var(--token-accent-deep, var(--token-accent)); }
|
|
240
|
+
|
|
241
|
+
/* 表单控件:理由 / 角色三选 / 时长 */
|
|
242
|
+
.kb-access-reason {
|
|
243
|
+
font: inherit; font-size: 12.5px; line-height: 1.6;
|
|
244
|
+
color: var(--token-text);
|
|
245
|
+
background: var(--token-bg);
|
|
246
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
247
|
+
padding: 7px 9px; resize: vertical; min-height: 56px;
|
|
248
|
+
}
|
|
249
|
+
.kb-access-reason:focus-visible, .kb-access-duration:focus-visible,
|
|
250
|
+
.kb-access-approve-role:focus-visible, .kb-access-note:focus-visible {
|
|
251
|
+
outline: 2px solid var(--token-accent); outline-offset: 1px;
|
|
252
|
+
}
|
|
253
|
+
.kb-access-roles { display: inline-flex; gap: 6px; flex-wrap: wrap; }
|
|
254
|
+
.kb-access-role {
|
|
255
|
+
display: inline-flex; align-items: center;
|
|
256
|
+
font: inherit; font-size: 12px;
|
|
257
|
+
color: var(--token-text-muted);
|
|
258
|
+
background: var(--token-bg);
|
|
259
|
+
border: 1px solid var(--token-line-soft);
|
|
260
|
+
border-radius: 999px;
|
|
261
|
+
padding: 3px 10px; cursor: pointer;
|
|
262
|
+
}
|
|
263
|
+
.kb-access-role:hover { border-color: var(--token-line); color: var(--token-text); }
|
|
264
|
+
.kb-access-role.is-on {
|
|
265
|
+
color: var(--token-accent);
|
|
266
|
+
border-color: color-mix(in srgb, var(--token-accent) 50%, transparent);
|
|
267
|
+
background: var(--token-accent-subtle, transparent);
|
|
268
|
+
}
|
|
269
|
+
.kb-access-duration-row { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--token-text-muted); }
|
|
270
|
+
.kb-access-duration {
|
|
271
|
+
font: inherit; font-size: 12px;
|
|
272
|
+
color: var(--token-text);
|
|
273
|
+
background: var(--token-bg);
|
|
274
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
275
|
+
padding: 3px 6px; cursor: pointer;
|
|
276
|
+
}
|
|
277
|
+
.kb-access-route { align-self: flex-start; }
|
|
278
|
+
.kb-access-submit {
|
|
279
|
+
align-self: flex-start;
|
|
280
|
+
font: inherit; font-size: 12.5px;
|
|
281
|
+
color: var(--token-on-accent, #fff);
|
|
282
|
+
background: var(--token-accent);
|
|
283
|
+
border: none; border-radius: var(--radius-sm, 6px);
|
|
284
|
+
padding: 6px 14px; cursor: pointer;
|
|
285
|
+
}
|
|
286
|
+
.kb-access-submit:hover { background: var(--token-accent-deep, var(--token-accent)); }
|
|
287
|
+
.kb-access-countdown { font-size: 11.5px; color: var(--token-text-muted); }
|
|
288
|
+
|
|
289
|
+
/* 队列行(approver 视角) */
|
|
290
|
+
.kb-access-req-user { font-weight: 600; color: var(--token-text); }
|
|
291
|
+
.kb-access-req-resource { color: var(--token-text); }
|
|
292
|
+
.kb-access-req-at { font-size: 11px; color: var(--token-text-faint); }
|
|
293
|
+
.kb-access-req-reason { flex: 1 1 160px; min-width: 120px; }
|
|
294
|
+
.kb-access-approve-role {
|
|
295
|
+
font: inherit; font-size: 12px;
|
|
296
|
+
color: var(--token-text);
|
|
297
|
+
background: var(--token-bg);
|
|
298
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
299
|
+
padding: 3px 6px; cursor: pointer;
|
|
300
|
+
}
|
|
301
|
+
.kb-access-note {
|
|
302
|
+
font: inherit; font-size: 12px;
|
|
303
|
+
color: var(--token-text);
|
|
304
|
+
background: var(--token-bg);
|
|
305
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
306
|
+
padding: 4px 8px; resize: none; min-width: 140px;
|
|
307
|
+
}
|
|
308
|
+
.kb-access-req-decided { color: var(--token-text-faint); }
|
|
309
|
+
|
|
310
|
+
/* —— 段B 细化 · kb-audit 构件(chip 钮 / 导出钮 / 异味行 / 过滤断崖)—— */
|
|
311
|
+
|
|
312
|
+
/* 通道 chip 是原生 button:补指针与过渡(激活态配色由上方 aria-pressed 规则承担) */
|
|
313
|
+
.kb-audit-channels .kb-chip { cursor: pointer; transition: color 0.16s ease-out, border-color 0.16s ease-out; }
|
|
314
|
+
.kb-audit-channels .kb-chip:focus-visible { outline: 2px solid var(--token-accent); outline-offset: 1px; }
|
|
315
|
+
.kb-audit-export {
|
|
316
|
+
font: inherit; font-size: 11.5px;
|
|
317
|
+
color: var(--token-text-muted);
|
|
318
|
+
background: transparent;
|
|
319
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
320
|
+
padding: 3px 10px; cursor: pointer;
|
|
321
|
+
margin-left: auto;
|
|
322
|
+
}
|
|
323
|
+
.kb-audit-export:hover { color: var(--token-text); border-color: var(--token-line); background: var(--token-bg-soft); }
|
|
324
|
+
.kb-audit-export:focus-visible { outline: 2px solid var(--token-accent); outline-offset: 1px; }
|
|
325
|
+
/* 过滤显隐:行本身是 flex,hidden 属性会被 display 覆盖——必须显式归零 */
|
|
326
|
+
.kb-audit-entry[hidden] { display: none; }
|
|
327
|
+
.kb-audit-at { flex: 0 0 auto; font-size: 11px; color: var(--token-text-faint); }
|
|
328
|
+
.kb-audit-actor { flex: 0 1 auto; min-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
329
|
+
.kb-audit-action { flex: 0 0 auto; }
|
|
330
|
+
.kb-audit-alert { flex: 0 0 auto; }
|
|
331
|
+
|
|
332
|
+
/* 权限异味行内件 */
|
|
333
|
+
.kb-hygiene-kind { flex: 0 0 auto; }
|
|
334
|
+
.kb-hygiene.is-high .kb-hygiene-kind { color: var(--token-error, #c0392b); border-color: color-mix(in srgb, var(--token-error, #c0392b) 45%, transparent); }
|
|
335
|
+
.kb-hygiene.is-medium .kb-hygiene-kind { color: var(--token-warning); border-color: color-mix(in srgb, var(--token-warning) 45%, transparent); }
|
|
336
|
+
.kb-hygiene-resource { font-weight: 600; color: var(--token-text); }
|
|
337
|
+
.kb-hygiene-metric { flex: 0 0 auto; font-size: 11.5px; }
|
|
338
|
+
.kb-hygiene-hint { flex: 1 1 140px; min-width: 100px; }
|
|
339
|
+
.kb-hygiene-act {
|
|
340
|
+
font: inherit; font-size: 11.5px;
|
|
341
|
+
color: var(--token-text-muted);
|
|
342
|
+
background: transparent;
|
|
343
|
+
border: 1px solid var(--token-line-soft); border-radius: var(--radius-sm, 6px);
|
|
344
|
+
padding: 2px 10px; cursor: pointer;
|
|
345
|
+
}
|
|
346
|
+
.kb-hygiene-act:hover { color: var(--token-text); border-color: var(--token-line); background: var(--token-bg-soft); }
|
|
347
|
+
.kb-hygiene-act:focus-visible { outline: 2px solid var(--token-accent); outline-offset: 1px; }
|
|
348
|
+
|
|
349
|
+
/* ══════════════ 段C · kb-visibility(检索可见性对照器,admin 专用)══════════════ */
|
|
350
|
+
|
|
351
|
+
.kb-visibility { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
|
|
352
|
+
.kb-visibility-warn {
|
|
353
|
+
padding: 7px 10px; font-size: 12px;
|
|
354
|
+
color: var(--token-warning);
|
|
355
|
+
border-left: 2px solid var(--token-warning);
|
|
356
|
+
background: color-mix(in srgb, var(--token-warning) 6%, transparent);
|
|
357
|
+
border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
|
|
358
|
+
}
|
|
359
|
+
.kb-visibility-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
360
|
+
.kb-visibility-bar .kb-chip[aria-pressed='true'] { color: var(--token-accent); border-color: var(--token-accent); }
|
|
361
|
+
/* 过滤层徽标 .kb-layer-chip 三态定义在 kb.css 基座(检索域 kit 也消费,勿在此重复) */
|
|
362
|
+
.kb-visibility-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
|
|
363
|
+
.kb-visibility-col { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--token-line-soft); border-radius: var(--radius-md, 10px); min-width: 0; }
|
|
364
|
+
.kb-visibility-col header { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--token-text); }
|
|
365
|
+
.kb-visibility-count { font-size: 11.5px; color: var(--token-text-faint); }
|
|
366
|
+
/* metadata 级:锁 + 标题 + 打码摘要 + 申请入口(知道存在,内容不可见) */
|
|
367
|
+
.kb-visibility-hit { display: flex; flex-direction: column; gap: 3px; padding: 6px 0; border-bottom: 1px solid var(--token-line-soft); font-size: 12.5px; }
|
|
368
|
+
.kb-visibility-hit:last-child { border-bottom: none; }
|
|
369
|
+
.kb-visibility-hit[data-visibility='metadata'] .kb-visibility-snippet,
|
|
370
|
+
.kb-visibility-hit[data-visibility='summary'] .kb-visibility-snippet {
|
|
371
|
+
display: block; height: 10px; border-radius: 3px;
|
|
372
|
+
background: color-mix(in srgb, var(--token-text-faint) 18%, transparent);
|
|
373
|
+
}
|
|
374
|
+
.kb-visibility-hit[data-visibility='summary'] .kb-visibility-summary { font-size: 12px; color: var(--token-text-muted); line-height: 1.6; }
|
|
375
|
+
.kb-visibility-lesson { font-size: 12px; line-height: 1.8; color: var(--token-text-muted); padding-top: 6px; border-top: 1px solid var(--token-line-soft); }
|
|
376
|
+
|
|
377
|
+
/* —— 段C 细化(实现补齐;上方骨架规则不动)—— */
|
|
378
|
+
|
|
379
|
+
/* 身份 chip 是可点控件:补指针语义(kb-chip 基座不含 cursor;.kb-layer-chip 的已在 kb.css) */
|
|
380
|
+
.kb-visibility-idn { cursor: pointer; }
|
|
381
|
+
.kb-visibility-idn:focus-visible { outline: 2px solid var(--token-accent); outline-offset: 1px; }
|
|
382
|
+
|
|
383
|
+
/* 身份聚焦:点击 bar 内身份 chip 高亮对应列(accent 弱化底,不与警示条抢注意力) */
|
|
384
|
+
.kb-visibility-col.is-focused {
|
|
385
|
+
border-color: color-mix(in srgb, var(--token-accent) 55%, transparent);
|
|
386
|
+
background: color-mix(in srgb, var(--token-accent) 4%, transparent);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/* 列头:身份 label 主位 + note 弱化(只放身份,不放有效角色——角色求值属 kb-who-can 职责) */
|
|
390
|
+
.kb-visibility-col header .kb-meta { font-weight: 400; }
|
|
391
|
+
|
|
392
|
+
/* 命中行标题:锁图标(metadata/restricted 级)+ 标题单行省略 */
|
|
393
|
+
.kb-visibility-hit-title { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--token-text); }
|
|
394
|
+
.kb-visibility-hit-title svg { width: 12px; height: 12px; flex: 0 0 auto; color: var(--token-text-faint); }
|
|
395
|
+
.kb-visibility-hit-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
396
|
+
.kb-visibility-hits { display: flex; flex-direction: column; }
|
|
397
|
+
|
|
398
|
+
/* summary 级:「原文不可用」禁用钮——显式禁用不做可点假象(摘要权限 ≠ 原文权限) */
|
|
399
|
+
.kb-visibility-origoff {
|
|
400
|
+
align-self: flex-start;
|
|
401
|
+
padding: 0; border: none; background: none;
|
|
402
|
+
font: inherit; font-size: 11.5px;
|
|
403
|
+
color: var(--token-text-faint);
|
|
404
|
+
cursor: not-allowed;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/* restricted 级:「申请访问」文字钮(展示件——真实申请流由宿主接 kb-access) */
|
|
408
|
+
.kb-visibility-request {
|
|
409
|
+
align-self: flex-start;
|
|
410
|
+
padding: 0; border: none; background: none;
|
|
411
|
+
font: inherit; font-size: 11.5px;
|
|
412
|
+
color: var(--token-text-muted);
|
|
413
|
+
cursor: pointer;
|
|
414
|
+
}
|
|
415
|
+
.kb-visibility-request:hover { color: var(--token-text); text-decoration: underline; }
|
|
416
|
+
.kb-visibility-request:focus-visible { outline: 2px solid var(--token-accent); outline-offset: 2px; }
|
|
417
|
+
|
|
418
|
+
/* 教学段列表(三条安全课)+ 尾注 */
|
|
419
|
+
.kb-visibility-lesson ul { list-style: disc; margin: 0 0 6px; padding-left: 18px; }
|
|
420
|
+
|
|
421
|
+
/* 检索身份选择器 .kb-retrieval-idn(-group) 与 .kb-retrieval .kb-notice[hidden] 归 kb-search.css
|
|
422
|
+
(检索域 kit 自持;kit/kb-retrieval 只带 kb.css + kb-search.css,放这里会缺样式) */
|
|
423
|
+
|
|
424
|
+
/* —— .is-revoked:权限收回后的历史引用中性态(spec §9.0-6;revoked 引用属权限呈现,故置于段C 尾。
|
|
425
|
+
faint 中性,禁红——「不知道」与「不能说」不可区分) —— */
|
|
426
|
+
|
|
427
|
+
/* hover 卡内标题后的中性 chip */
|
|
428
|
+
.kb-chip.is-revoked {
|
|
429
|
+
color: var(--token-text-faint);
|
|
430
|
+
border-color: var(--token-line-soft);
|
|
431
|
+
background: transparent;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/* 正文角标 revoked 态:虚线框弱化、hover 不点亮 accent(保持可点/可悬停看卡,不删不留裸链) */
|
|
435
|
+
.kb-citation.is-revoked {
|
|
436
|
+
color: var(--token-text-faint);
|
|
437
|
+
border-style: dashed;
|
|
438
|
+
border-color: color-mix(in srgb, var(--token-text-faint) 45%, transparent);
|
|
439
|
+
}
|
|
440
|
+
.kb-citation.is-revoked:hover {
|
|
441
|
+
color: var(--token-text-faint);
|
|
442
|
+
border-color: color-mix(in srgb, var(--token-text-faint) 45%, transparent);
|
|
443
|
+
background: transparent;
|
|
444
|
+
}
|