@tfdesign/b-end 1.0.9 → 1.0.10
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/package.json +1 -1
- package/skills/tfds/GLOBAL_DESIGN_RULES.md +2 -2
- package/skills/tfds/LAYOUT_RULES.md +5 -5
- package/skills/tfds/components.index.json +3 -3
- package/skills/tfds/components.summary.json +1 -1
- package/src/_b_end_runtime/components/ChatMessage.jsx +10 -10
- package/src/_b_end_runtime/components/ChatMessage.tokens.js +8 -8
- package/src/_b_end_runtime/components/ChatMessagePreview.jsx +1 -1
- package/src/_b_end_runtime/components/ConversationList.jsx +1 -1
- package/src/_b_end_runtime/components/Slider.jsx +1 -1
- package/src/_b_end_runtime/components.js +2 -2
- package/src/_b_end_runtime/tokens.js +1 -4
- package/theme.css +0 -2
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
| 卡片白底 | `var(--color-surface)` / `var(--color-white)` | `#FFFFFF` | 业务白卡 |
|
|
24
24
|
| 默认描边 | `var(--color-border-default)` | `#E4E7EC` | 输入框、卡片描边 |
|
|
25
25
|
| 强描边 | `var(--color-border-strong)` | `#D0D5DD` | hover/focus 描边 |
|
|
26
|
-
| 细线 | `var(--color-border-
|
|
26
|
+
| 细线 | `var(--color-border-default)` | `#E4E7EC` | 列表分隔线、表格行线 |
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
⛔ **禁止**:
|
|
@@ -353,7 +353,7 @@ B 端主路径的**标题与密集区强调文案**默认以 **600(`--font-sem
|
|
|
353
353
|
|
|
354
354
|
1. **白卡内嵌的灰卡**(`Card color="grey"`)→ 由组件自带浅描边表达"次级容器",保留
|
|
355
355
|
2. **TFDS 组件自带描边**:Input / Select / TextArea / TagInput / Tabs line / Table 行线 / Tooltip → 保留
|
|
356
|
-
3. **白卡内部的"分割线"**(`borderTop` / `borderBottom`)→ 用 `var(--color-border-
|
|
356
|
+
3. **白卡内部的"分割线"**(`borderTop` / `borderBottom`)→ 用 `var(--color-border-default)` 划行,不是给整张卡加 border
|
|
357
357
|
4. **浮层 Dialog / Drawer 自带的轻描边** → 由组件自带,保留
|
|
358
358
|
|
|
359
359
|
⛔ 以上 4 种之外,**任何**直接给白卡 div 加 `border` / `outline` / `ring` 都视为违规。
|
|
@@ -735,7 +735,7 @@ const [leftCardWidth, setLeftCardWidth] = useState(260);
|
|
|
735
735
|
{/* 分页:吸底 */}
|
|
736
736
|
<div
|
|
737
737
|
className="shrink-0 px-6 py-3"
|
|
738
|
-
style={{ borderTop: '1px solid var(--color-border-
|
|
738
|
+
style={{ borderTop: '1px solid var(--color-border-default)' }}
|
|
739
739
|
>
|
|
740
740
|
<Pagination ... />
|
|
741
741
|
</div>
|
|
@@ -983,7 +983,7 @@ const [leftCardWidth, setLeftCardWidth] = useState(260);
|
|
|
983
983
|
{/* 筛选栏 */}
|
|
984
984
|
<div
|
|
985
985
|
className="shrink-0 px-6 py-3 flex items-center gap-3"
|
|
986
|
-
style={{ borderTop: '1px solid var(--color-border-
|
|
986
|
+
style={{ borderTop: '1px solid var(--color-border-default)' }}
|
|
987
987
|
>
|
|
988
988
|
<Input placeholder="搜索变量名" style={{ width: 240 }} />
|
|
989
989
|
<Select placeholder="状态" style={{ width: 160 }} options={...} />
|
|
@@ -997,7 +997,7 @@ const [leftCardWidth, setLeftCardWidth] = useState(260);
|
|
|
997
997
|
{/* 分页 */}
|
|
998
998
|
<div
|
|
999
999
|
className="shrink-0 px-6 py-3"
|
|
1000
|
-
style={{ borderTop: '1px solid var(--color-border-
|
|
1000
|
+
style={{ borderTop: '1px solid var(--color-border-default)' }}
|
|
1001
1001
|
>
|
|
1002
1002
|
<Pagination ... />
|
|
1003
1003
|
</div>
|
|
@@ -1183,7 +1183,7 @@ const [leftCardWidth, setLeftCardWidth] = useState(260);
|
|
|
1183
1183
|
{/* 右侧元数据面板(可选) */}
|
|
1184
1184
|
<aside
|
|
1185
1185
|
className="shrink-0 w-[320px] overflow-y-auto"
|
|
1186
|
-
style={{ borderLeft: '1px solid var(--color-border-
|
|
1186
|
+
style={{ borderLeft: '1px solid var(--color-border-default)' }}
|
|
1187
1187
|
>
|
|
1188
1188
|
{/* 元数据/属性 */}
|
|
1189
1189
|
</aside>
|
|
@@ -1263,7 +1263,7 @@ const [leftCardWidth, setLeftCardWidth] = useState(260);
|
|
|
1263
1263
|
>
|
|
1264
1264
|
<header
|
|
1265
1265
|
className="shrink-0 px-6 py-4 flex items-center justify-between"
|
|
1266
|
-
style={{ borderBottom: '1px solid var(--color-border-
|
|
1266
|
+
style={{ borderBottom: '1px solid var(--color-border-default)' }}
|
|
1267
1267
|
>
|
|
1268
1268
|
{/* ⚠️ 面板/卡内 section 标题永远用 FormTitle level-2,⛔ 不要手搓 div+h3 */}
|
|
1269
1269
|
<FormTitle
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"system": "b-end",
|
|
3
3
|
"skill": "tfds",
|
|
4
|
-
"generatedAt": "2026-05-
|
|
4
|
+
"generatedAt": "2026-05-11T04:59:21.276Z",
|
|
5
5
|
"summary": "B 端 COMPONENTS 36 条 + 列表页模板 4 + PATTERNS 6;import 一律来自 @tf-designsystem/b-end。",
|
|
6
6
|
"components": [
|
|
7
7
|
{
|
|
@@ -2380,8 +2380,8 @@
|
|
|
2380
2380
|
"【消息原子】一个 ChatMessage = AI 对话页中的一条消息原子,role=\"ai\" 渲染 AI 消息(适配容器宽度),role=\"user\" 渲染用户气泡(右对齐 + 8% 容器宽度左缩进 ≈ 500px 容器下 40px 缩进)",
|
|
2381
2381
|
"【AI 友好命名】props 一律用最短同义词:header / thinking / plan / confirms / followUps / actions / userContent;读 props 即知 DOM 结构(<ChatMessage header thinking plan ... />)",
|
|
2382
2382
|
"【7 类子组件】内部按 AI 头像 / 文本回复 / 执行流 / 卡片回复 / 深度思考 / 操作栏 / 用户气泡 7 类子组件按需组合,全部通过 props 启用,互相正交不冲突",
|
|
2383
|
-
"【theme 必引】入口 CSS 必须 @import \"@tf-designsystem/b-end/theme.css\"。ChatMessage 子区块使用 --color-border-
|
|
2384
|
-
"【禁止手搓描边】勿包一层 div 并加 border-black / ring-black;追问 followUps 为白底 + border-border-
|
|
2383
|
+
"【theme 必引】入口 CSS 必须 @import \"@tf-designsystem/b-end/theme.css\"。ChatMessage 子区块使用 --color-border-default、--color-neutral、--color-neutral-500/300/700、--tfds-ai-execution-* 等;未引入 theme 时 var() 无效,描边易退化为浏览器默认深黑(追问按钮等)。",
|
|
2384
|
+
"【禁止手搓描边】勿包一层 div 并加 border-black / ring-black;追问 followUps 为白底 + border-border-default + hover:border-border-strong。",
|
|
2385
2385
|
"【AI 头像】header 传 true 启用默认 \"OLA AI\" + catcat 头像;传对象 { name, avatarSrc } 自定义名称与头像;建议每条 AI 消息都开启,保持身份一致;不传则该消息没有头像",
|
|
2386
2386
|
"【自定义头像素材】ChatMessage 默认 AI 头像使用包内 catcat.svg;若 header 对象自定义 avatarSrc(如拟人助手、成员身份或人工协作身份),优先使用包内本地成员头像图片素材,不要使用 pravatar/Unsplash/placeholder 随机外链头像。",
|
|
2387
2387
|
"【消息加载态】status=\"requesting\" 仅渲染 AI 头像 + 三圆点 bouncing 动画,用于刚发出请求未返回内容时;不渲染标题、步骤、结果区",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"system": "b-end",
|
|
3
3
|
"skill": "tfds",
|
|
4
|
-
"generatedAt": "2026-05-
|
|
4
|
+
"generatedAt": "2026-05-11T04:59:21.276Z",
|
|
5
5
|
"purpose": "轻量组件与页面模板目录。AI 先读本文件做选型;确定命中组件后,再到 components.index.json 按 id 读取 props / rules / examples。",
|
|
6
6
|
"counts": {
|
|
7
7
|
"total": 46,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 行业对齐:assistant-ui Message / Vercel AI SDK Message / Microsoft Copilot ChatMessage。
|
|
5
5
|
* 与 ChatBubble(仅气泡)、ChatInput(输入器)共同组成 Chat 命名空间。
|
|
6
|
-
* 样式依赖:入口 CSS 须 @import "@tf-designsystem/b-end/theme.css"(提供 --color-border-
|
|
6
|
+
* 样式依赖:入口 CSS 须 @import "@tf-designsystem/b-end/theme.css"(提供 --color-border-default、--color-blueGrey-*、--tfds-ai-execution-* 等);缺失时 var() 无效,追问/执行流等易出现深黑描边。
|
|
7
7
|
* 一个 ChatMessage = 一条会话消息,按 role 渲染:
|
|
8
8
|
* · role='ai' AI 输出消息(默认):header / thinking / plan / 执行流(title+steps/taskGroups)
|
|
9
9
|
* / 结果(resultText+resultArtifacts+confirms) / taskBadge / actions / followUps
|
|
@@ -333,7 +333,7 @@ const BODY = 'relative flex w-full min-w-0 max-w-full flex-col items-start gap-1
|
|
|
333
333
|
const HEADER = 'group/exec-header relative flex w-full min-w-0 max-w-full items-start gap-3 py-2 cursor-pointer select-none';
|
|
334
334
|
const HEADER_ICON_WRAP = 'mt-[2px] flex shrink-0 items-center';
|
|
335
335
|
const STATUS_SPINNER_WRAP = 'relative block size-4 shrink-0';
|
|
336
|
-
const STATUS_SPINNER_TRACK = 'absolute inset-[0.67px] rounded-full border border-border-
|
|
336
|
+
const STATUS_SPINNER_TRACK = 'absolute inset-[0.67px] rounded-full border border-border-default';
|
|
337
337
|
const STATUS_SPINNER_ARC = 'absolute inset-[0.67px] rounded-full animate-[spin_1.1s_linear_infinite]';
|
|
338
338
|
/* 标题:单行截断;不占满宽度,让 chevron 紧贴文字(或省略号)右侧;
|
|
339
339
|
颜色用 text token className(不用 inline style,否则 hover 失效);
|
|
@@ -492,7 +492,7 @@ const TASK_PLAN_FOOTER = 'mt-3 flex w-full min-w-0 items-center justify-end gap-
|
|
|
492
492
|
const FOLLOW_UP_GROUP = 'flex w-full min-w-0 flex-col items-stretch gap-2';
|
|
493
493
|
const FOLLOW_UP_BUTTON = [
|
|
494
494
|
'inline-flex h-10 w-fit max-w-full items-center justify-start',
|
|
495
|
-
'rounded-lg border border-border-
|
|
495
|
+
'rounded-lg border border-border-default bg-surface px-3 py-2',
|
|
496
496
|
'text-sm font-normal leading-5 tracking-[0] text-left',
|
|
497
497
|
'cursor-pointer transition-all duration-150',
|
|
498
498
|
'[outline:2px_solid_transparent] outline-offset-2',
|
|
@@ -1044,7 +1044,7 @@ function ThinkingProcess({ thinkingProcess, tokenStyles }) {
|
|
|
1044
1044
|
<div className={THINKING_BODY}>
|
|
1045
1045
|
<div
|
|
1046
1046
|
className={THINKING_RAIL}
|
|
1047
|
-
style={{ backgroundColor: 'var(--color-border-
|
|
1047
|
+
style={{ backgroundColor: 'var(--color-border-default)' }}
|
|
1048
1048
|
aria-hidden="true"
|
|
1049
1049
|
/>
|
|
1050
1050
|
<p className={THINKING_TEXT} style={tokenStyles.muted}>
|
|
@@ -1081,7 +1081,7 @@ function TaskPlanCard({ taskPlan, tokenStyles }) {
|
|
|
1081
1081
|
className={TASK_PLAN_CARD}
|
|
1082
1082
|
style={{
|
|
1083
1083
|
backgroundColor: 'var(--color-fill)',
|
|
1084
|
-
borderColor: 'var(--color-border-
|
|
1084
|
+
borderColor: 'var(--color-border-default)',
|
|
1085
1085
|
}}
|
|
1086
1086
|
data-tfds-component="ChatMessage.TaskPlan"
|
|
1087
1087
|
>
|
|
@@ -1405,7 +1405,7 @@ export function ResultArtifactCard({ artifact, className = '' }) {
|
|
|
1405
1405
|
return (
|
|
1406
1406
|
<div
|
|
1407
1407
|
className={[RESULT_ARTIFACT_CARD, className].filter(Boolean).join(' ')}
|
|
1408
|
-
style={{ borderColor: 'var(--color-border-
|
|
1408
|
+
style={{ borderColor: 'var(--color-border-default)' }}
|
|
1409
1409
|
>
|
|
1410
1410
|
<div className={RESULT_ARTIFACT_ICON} aria-hidden="true">
|
|
1411
1411
|
<ArtifactIcon type={a.type} size={32} />
|
|
@@ -1828,13 +1828,13 @@ export default function ChatMessage({
|
|
|
1828
1828
|
const tokenStyles = {
|
|
1829
1829
|
title: { color: 'var(--color-blueGrey-800)' },
|
|
1830
1830
|
muted: { color: 'var(--color-blueGrey-600)' },
|
|
1831
|
-
rail: { backgroundColor: 'var(--color-border-
|
|
1831
|
+
rail: { backgroundColor: 'var(--color-border-default)' },
|
|
1832
1832
|
card: {
|
|
1833
|
-
borderColor: 'var(--color-border-
|
|
1833
|
+
borderColor: 'var(--color-border-default)',
|
|
1834
1834
|
backgroundColor: 'var(--color-fill)',
|
|
1835
1835
|
},
|
|
1836
1836
|
iconWrap: {
|
|
1837
|
-
borderColor: 'var(--color-border-
|
|
1837
|
+
borderColor: 'var(--color-border-default)',
|
|
1838
1838
|
backgroundImage: 'var(--tfds-ai-execution-icon-gradient)',
|
|
1839
1839
|
},
|
|
1840
1840
|
humanConfirmCard: {
|
|
@@ -2070,7 +2070,7 @@ export default function ChatMessage({
|
|
|
2070
2070
|
<div
|
|
2071
2071
|
key={artifact.id}
|
|
2072
2072
|
className={RESULT_ARTIFACT_CARD}
|
|
2073
|
-
style={{ borderColor: 'var(--color-border-
|
|
2073
|
+
style={{ borderColor: 'var(--color-border-default)' }}
|
|
2074
2074
|
>
|
|
2075
2075
|
<div className={RESULT_ARTIFACT_ICON} aria-hidden="true">
|
|
2076
2076
|
<ArtifactIcon type={artifact.type} size={32} />
|
|
@@ -37,7 +37,7 @@ export const CHAT_MESSAGE_TOKEN_MAP = {
|
|
|
37
37
|
],
|
|
38
38
|
操作卡片: [
|
|
39
39
|
{ label: '背景色', cssProp: 'background', token: '--color-chat-incoming', value: 'rgba(52,59,57,0.05)' },
|
|
40
|
-
{ label: '描边色', cssProp: 'border-color', token: '--color-border-
|
|
40
|
+
{ label: '描边色', cssProp: 'border-color', token: '--color-border-default', value: '#E4E7EC', semanticRef: 'border-default' },
|
|
41
41
|
{ label: '宽度策略', cssProp: 'width/max-width', value: 'fit-content / max-width: 100%' },
|
|
42
42
|
{ label: '圆角', cssProp: 'border-radius', token: '--radius-md', value: '8px' },
|
|
43
43
|
{ label: '左内边距', cssProp: 'padding-left', token: '--spacing-2', value: '8px' },
|
|
@@ -54,7 +54,7 @@ export const CHAT_MESSAGE_TOKEN_MAP = {
|
|
|
54
54
|
{ label: '溢出处理', cssProp: 'text-overflow', value: 'ellipsis / nowrap / hidden' },
|
|
55
55
|
],
|
|
56
56
|
处理中: [
|
|
57
|
-
{ label: '轨道描边', cssProp: 'border-color', token: '--color-border-
|
|
57
|
+
{ label: '轨道描边', cssProp: 'border-color', token: '--color-border-default', value: '#E4E7EC', semanticRef: 'border-default' },
|
|
58
58
|
{ label: '底色', cssProp: 'background', token: '--tfds-ai-execution-processing-fill', value: 'rgba(52,59,57,0.04)' },
|
|
59
59
|
{ label: '扫光渐变', cssProp: 'background-image', token: '--tfds-ai-execution-processing-shimmer', value: 'linear-gradient(90deg, rgba(52,59,57,0.045) 0%, rgba(52,59,57,0.05) 28%, rgba(255,255,255,0.18) 50%, rgba(52,59,57,0.05) 72%, rgba(52,59,57,0.045) 100%)' },
|
|
60
60
|
{ label: '旋转渐变', cssProp: 'background', value: 'conic-gradient(var(--color-brand-500) → var(--color-purple-300))' },
|
|
@@ -78,7 +78,7 @@ export const CHAT_MESSAGE_TOKEN_MAP = {
|
|
|
78
78
|
],
|
|
79
79
|
结果产物: [
|
|
80
80
|
{ label: '卡片背景', cssProp: 'background', token: '--color-surface', value: '#FFFFFF' },
|
|
81
|
-
{ label: '描边色', cssProp: 'border-color', token: '--color-border-
|
|
81
|
+
{ label: '描边色', cssProp: 'border-color', token: '--color-border-default', value: '#E4E7EC', semanticRef: 'border-default' },
|
|
82
82
|
{ label: '卡片宽度', cssProp: 'width', value: '300px / max-width: 100%' },
|
|
83
83
|
{ label: '圆角', cssProp: 'border-radius', token: '--radius-md', value: '8px' },
|
|
84
84
|
{ label: '内边距', cssProp: 'padding', value: '12px' },
|
|
@@ -93,12 +93,12 @@ export const CHAT_MESSAGE_TOKEN_MAP = {
|
|
|
93
93
|
图标容器: [
|
|
94
94
|
{ label: '尺寸', cssProp: 'width/height', value: '24px' },
|
|
95
95
|
{ label: '背景渐变', cssProp: 'background-image', token: '--tfds-ai-execution-icon-gradient', value: 'linear-gradient(180deg, rgba(200,214,210,0.09) 0%, rgba(52,59,57,0.09) 100%)' },
|
|
96
|
-
{ label: '描边色', cssProp: 'border-color', token: '--color-border-
|
|
96
|
+
{ label: '描边色', cssProp: 'border-color', token: '--color-border-default', value: '#E4E7EC', semanticRef: 'border-default' },
|
|
97
97
|
{ label: '圆角', cssProp: 'border-radius', token: '--radius-md', value: '8px' },
|
|
98
98
|
{ label: '图标尺寸', cssProp: 'width/height', token: '--size-icon-14', value: '14px' },
|
|
99
99
|
],
|
|
100
100
|
连接线: [
|
|
101
|
-
{ label: '线色', cssProp: 'background', token: '--color-border-
|
|
101
|
+
{ label: '线色', cssProp: 'background', token: '--color-border-default', value: '#E4E7EC', semanticRef: 'border-default' },
|
|
102
102
|
{ label: '线宽', cssProp: 'width', value: '1px' },
|
|
103
103
|
{ label: '轨道宽度', cssProp: 'width', token: '--spacing-4', value: '16px' },
|
|
104
104
|
],
|
|
@@ -130,7 +130,7 @@ export const CHAT_MESSAGE_TOKEN_MAP = {
|
|
|
130
130
|
{ label: '标题字号', cssProp: 'font-size', token: '--text-xs', value: '12px' },
|
|
131
131
|
{ label: '标题行高', cssProp: 'line-height', token: '--leading-4', value: '16px' },
|
|
132
132
|
{ label: '展开/收起图标', cssProp: 'icon', value: 'chevron-up/down-stroked / 16px' },
|
|
133
|
-
{ label: '思考引用线', cssProp: 'background', token: '--color-border-
|
|
133
|
+
{ label: '思考引用线', cssProp: 'background', token: '--color-border-default', value: '#E4E7EC', semanticRef: 'border-default' },
|
|
134
134
|
{ label: '引用线宽', cssProp: 'width', value: '1px' },
|
|
135
135
|
{ label: '思考文本色', cssProp: 'color', token: '--color-neutral-500', value: '#858595' },
|
|
136
136
|
{ label: '思考文本字号', cssProp: 'font-size', token: '--text-xs', value: '12px' },
|
|
@@ -139,7 +139,7 @@ export const CHAT_MESSAGE_TOKEN_MAP = {
|
|
|
139
139
|
],
|
|
140
140
|
任务规划卡片: [
|
|
141
141
|
{ label: '外框背景', cssProp: 'background', token: '--color-fill', value: 'rgba(83,96,143,0.07)' },
|
|
142
|
-
{ label: '外框描边', cssProp: 'border', token: '--color-border-
|
|
142
|
+
{ label: '外框描边', cssProp: 'border', token: '--color-border-default', value: '#E4E7EC / 0.5px', semanticRef: 'border-default' },
|
|
143
143
|
{ label: '外框圆角', cssProp: 'border-radius', token: '--radius-lg', value: '12px' },
|
|
144
144
|
{ label: '外框内边距', cssProp: 'padding', value: '12px 16px' },
|
|
145
145
|
{ label: '头部图标容器', cssProp: 'size', value: '32px / 渐变灰底 / 0.5px 描边 / 8px 圆角' },
|
|
@@ -160,7 +160,7 @@ export const CHAT_MESSAGE_TOKEN_MAP = {
|
|
|
160
160
|
],
|
|
161
161
|
追问按钮组: [
|
|
162
162
|
{ label: '按钮背景', cssProp: 'background', token: '--color-surface', value: '#FFFFFF' },
|
|
163
|
-
{ label: '按钮描边', cssProp: 'border', token: '--color-border-
|
|
163
|
+
{ label: '按钮描边', cssProp: 'border', token: '--color-border-default', value: '#E4E7EC', semanticRef: 'border-default' },
|
|
164
164
|
{ label: '按钮圆角', cssProp: 'border-radius', token: '--radius-md', value: '8px' },
|
|
165
165
|
{ label: '按钮高度', cssProp: 'height', value: '40px' },
|
|
166
166
|
{ label: '按钮内边距', cssProp: 'padding', value: '8px 12px' },
|
|
@@ -251,7 +251,7 @@ export default function ChatMessagePreview({
|
|
|
251
251
|
{ALL_ARTIFACT_TYPES.map((a) => (
|
|
252
252
|
<div
|
|
253
253
|
key={a.id}
|
|
254
|
-
className="flex flex-col items-center gap-1 rounded-md border border-border-
|
|
254
|
+
className="flex flex-col items-center gap-1 rounded-md border border-border-default p-2"
|
|
255
255
|
title={a.type}
|
|
256
256
|
>
|
|
257
257
|
<ArtifactIcon type={a.type} size={32} />
|
|
@@ -288,7 +288,7 @@ const CARD_FOOTER_EDITABLE = 'flex flex-col gap-3 px-3 py-3';
|
|
|
288
288
|
const CARD_FOOTER_TEXT = 'w-full text-xs leading-4 text-foreground';
|
|
289
289
|
const CARD_FOOTER_BUTTON_ROW = 'flex w-full justify-end';
|
|
290
290
|
const CARD_STATUS_SPINNER_WRAP = 'relative inline-flex size-3 shrink-0 items-center justify-center';
|
|
291
|
-
const CARD_STATUS_SPINNER_TRACK = 'absolute inset-0 rounded-full border border-border-
|
|
291
|
+
const CARD_STATUS_SPINNER_TRACK = 'absolute inset-0 rounded-full border border-border-default';
|
|
292
292
|
const CARD_STATUS_SPINNER_ARC = 'absolute inset-0 rounded-full animate-spin [animation-duration:1.1s] [animation-timing-function:linear] [animation-iteration-count:infinite]';
|
|
293
293
|
|
|
294
294
|
function getSectionItemCount(section) {
|
|
@@ -1610,8 +1610,8 @@ export const COMPONENTS = [
|
|
|
1610
1610
|
'【消息原子】一个 ChatMessage = AI 对话页中的一条消息原子,role="ai" 渲染 AI 消息(适配容器宽度),role="user" 渲染用户气泡(右对齐 + 8% 容器宽度左缩进 ≈ 500px 容器下 40px 缩进)',
|
|
1611
1611
|
'【AI 友好命名】props 一律用最短同义词:header / thinking / plan / confirms / followUps / actions / userContent;读 props 即知 DOM 结构(<ChatMessage header thinking plan ... />)',
|
|
1612
1612
|
'【7 类子组件】内部按 AI 头像 / 文本回复 / 执行流 / 卡片回复 / 深度思考 / 操作栏 / 用户气泡 7 类子组件按需组合,全部通过 props 启用,互相正交不冲突',
|
|
1613
|
-
'【theme 必引】入口 CSS 必须 @import "@tf-designsystem/b-end/theme.css"。ChatMessage 子区块使用 --color-border-
|
|
1614
|
-
'【禁止手搓描边】勿包一层 div 并加 border-black / ring-black;追问 followUps 为白底 + border-border-
|
|
1613
|
+
'【theme 必引】入口 CSS 必须 @import "@tf-designsystem/b-end/theme.css"。ChatMessage 子区块使用 --color-border-default、--color-neutral、--color-neutral-500/300/700、--tfds-ai-execution-* 等;未引入 theme 时 var() 无效,描边易退化为浏览器默认深黑(追问按钮等)。',
|
|
1614
|
+
'【禁止手搓描边】勿包一层 div 并加 border-black / ring-black;追问 followUps 为白底 + border-border-default + hover:border-border-strong。',
|
|
1615
1615
|
|
|
1616
1616
|
/* —— 1. AI 头像 —— */
|
|
1617
1617
|
'【AI 头像】header 传 true 启用默认 "OLA AI" + catcat 头像;传对象 { name, avatarSrc } 自定义名称与头像;建议每条 AI 消息都开启,保持身份一致;不传则该消息没有头像',
|
|
@@ -188,7 +188,7 @@ export const SEMANTIC_CSS_MAP = {
|
|
|
188
188
|
'text-tertiary': 'foreground-muted', 'text-disabled': 'foreground-disabled', 'text-inverse': 'foreground-inverse',
|
|
189
189
|
'bg-page': 'page', 'bg-surface': 'surface', 'bg-elevated': 'elevated', 'bg-disabled': 'disabled', 'bg-card-secondary': 'card-secondary', 'bg-chat-incoming': 'chat-incoming', 'bg-chat-outgoing': 'chat-outgoing', 'bg-chat-outgoing-ai': 'chat-outgoing-ai',
|
|
190
190
|
'fill-default': 'fill', 'fill-hover': 'fill-hover', 'fill-active': 'fill-active',
|
|
191
|
-
'border-default': 'border-default', 'border-strong': 'border-strong', 'border-brand': 'border-brand',
|
|
191
|
+
'border-default': 'border-default', 'border-strong': 'border-strong', 'border-brand': 'border-brand',
|
|
192
192
|
'overlay-bg': 'overlay', 'focus-ring': 'ring',
|
|
193
193
|
};
|
|
194
194
|
|
|
@@ -227,9 +227,6 @@ export const TOKEN_SEMANTIC_MAP = {
|
|
|
227
227
|
'border-default': { label: '默认描边', color: '#E4E7EC', primitiveRef: 'blueGrey-300' },
|
|
228
228
|
'border-strong': { label: '强调/悬浮描边', color: '#D0D5DD', primitiveRef: 'blueGrey-400' },
|
|
229
229
|
'border-brand': { label: '品牌描边', color: '#56D3BC', primitiveRef: 'brand-500' },
|
|
230
|
-
'border-brand-strong': { label: '品牌强调描边', color: '#32C4AC', primitiveRef: 'brand-600' },
|
|
231
|
-
/** rgba 细线:ChatMessage 追问/执行流卡片描边;必须进 theme.css,否则 var() 失效时浏览器退化为深黑描边 */
|
|
232
|
-
'border-line-light': { label: '细线描边 rgba', color: 'rgba(22,24,35,0.08)' },
|
|
233
230
|
|
|
234
231
|
// ── overlay: 蒙层 ──
|
|
235
232
|
'overlay-bg': { label: '蒙层背景', color: 'rgba(22, 22, 26, 0.60)', primitiveRef: 'grey-950/60%' },
|
package/theme.css
CHANGED
|
@@ -224,8 +224,6 @@
|
|
|
224
224
|
--color-border-default: var(--color-blueGrey-300); /* 默认描边 ← blueGrey-300 */
|
|
225
225
|
--color-border-strong: var(--color-blueGrey-400); /* 强调/悬浮描边 ← blueGrey-400 */
|
|
226
226
|
--color-border-brand: var(--color-brand-500); /* 品牌描边 ← brand-500 */
|
|
227
|
-
--color-border-brand-strong: var(--color-brand-600); /* 品牌强调描边 ← brand-600 */
|
|
228
|
-
--color-border-line-light: rgba(22,24,35,0.08); /* 细线描边 rgba ← literal */
|
|
229
227
|
--color-overlay: rgba(22, 22, 26, 0.60); /* 蒙层背景 ← grey-950/60% */
|
|
230
228
|
--color-ring: var(--color-brand-500); /* 焦点环 ← brand-500 */
|
|
231
229
|
|