@tfdesign/b-end 1.0.12 → 1.0.14
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/README.md +23 -25
- package/package.json +1 -1
- package/skills/tfds/components.index.json +226 -59
- package/skills/tfds/components.summary.json +93 -54
- package/src/_b_end_runtime/components/Card.jsx +4 -2
- package/src/_b_end_runtime/components/Card.tokens.js +2 -0
- package/src/_b_end_runtime/components/ChatMessage.jsx +1 -1
- package/src/_b_end_runtime/components/ConversationList.jsx +53 -58
- package/src/_b_end_runtime/components/Filter.jsx +390 -0
- package/src/_b_end_runtime/components/Filter.tokens.js +98 -0
- package/src/_b_end_runtime/components/FullScreenPage.jsx +1 -0
- package/src/_b_end_runtime/components/InfoDisplayPanel.jsx +13 -15
- package/src/_b_end_runtime/components/InfoDisplayPanel.tokens.js +2 -0
- package/src/_b_end_runtime/components/Input.jsx +3 -1
- package/src/_b_end_runtime/components/Modal.jsx +11 -3
- package/src/_b_end_runtime/components/Sheet.jsx +1 -0
- package/src/_b_end_runtime/components/Table.jsx +7 -0
- package/src/_b_end_runtime/components/TagBar.jsx +2 -0
- package/src/_b_end_runtime/components/Toast.jsx +1 -0
- package/src/_b_end_runtime/components/Upload.jsx +1 -0
- package/src/_b_end_runtime/components.js +98 -5
- package/src/_b_end_runtime/page-patterns/ChatConversationPattern.jsx +34 -22
- package/src/_b_end_runtime/page-patterns/ChatHomePagePattern.jsx +1 -1
- package/src/_b_end_runtime/page-patterns/CopilotPagePattern.jsx +6 -6
- package/src/_b_end_runtime/page-patterns/IMConversationPattern.jsx +12 -13
- package/src/_b_end_runtime/page-patterns/McpManagementPage.jsx +14 -1
- package/src/_b_end_runtime/page-patterns/StrategyListPage.jsx +19 -12
- package/src/_b_end_runtime/page-patterns/TabTopBarListPage.jsx +16 -1
- package/src/_b_end_runtime/page-patterns/VariableManagementPage.jsx +15 -2
- package/src/_b_end_runtime/page-patterns/pageListShared.jsx +54 -36
- package/src/_b_end_runtime/patterns.js +10 -6
- package/src/_b_end_runtime/preview-registry.jsx +97 -2
- package/src/index.d.ts +29 -2
- package/src/index.js +2 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"system": "b-end",
|
|
3
3
|
"skill": "tfds",
|
|
4
|
-
"generatedAt": "2026-05-
|
|
4
|
+
"generatedAt": "2026-05-13T05:01:47.099Z",
|
|
5
5
|
"purpose": "轻量组件与页面模板目录。AI 先读本文件做选型;确定命中组件后,再到 components.index.json 按 id 读取 props / rules / examples。",
|
|
6
6
|
"counts": {
|
|
7
|
-
"total":
|
|
8
|
-
"components":
|
|
7
|
+
"total": 47,
|
|
8
|
+
"components": 37,
|
|
9
9
|
"pageTemplates": 4,
|
|
10
10
|
"pagePatterns": 6
|
|
11
11
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"category": "basic",
|
|
33
33
|
"description": "单个实体(人/机器人/AI/兜底)的头像锚点。用于表格、会话、导航等需要「一眼认出是谁」的位置;不用于多人交叠缩略(那是 AvatarGroup)。",
|
|
34
34
|
"import": {
|
|
35
|
-
"from": "@
|
|
35
|
+
"from": "@tfdesign/b-end",
|
|
36
36
|
"default": "Avatar"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"category": "basic",
|
|
73
73
|
"description": "多人参与的缩略表达:固定 5 个圆形图片头像、固定交叠间距,用于「协作成员、围观者」等氛围装饰。需要可配置人数/顺序/文案时请用列表 + 多个 Avatar,不要用本组件硬凑。",
|
|
74
74
|
"import": {
|
|
75
|
-
"from": "@
|
|
75
|
+
"from": "@tfdesign/b-end",
|
|
76
76
|
"default": "AvatarGroup"
|
|
77
77
|
},
|
|
78
78
|
"keywords": [
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"category": "basic",
|
|
111
111
|
"description": "矢量符号(1198+ 图标名)。用于按钮/输入框前后缀、导航、状态提示等「非人像」图形;需要人像或账号识别请用 Avatar,需要文字标签请用 Button/Tag。",
|
|
112
112
|
"import": {
|
|
113
|
-
"from": "@
|
|
113
|
+
"from": "@tfdesign/b-end",
|
|
114
114
|
"default": "Icon"
|
|
115
115
|
},
|
|
116
116
|
"keywords": [
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"category": "business",
|
|
152
152
|
"description": "业务竖向导航栏,集成品牌区、业务入口切换、统一 navItems 主导航、底部工具按钮和用户头像。",
|
|
153
153
|
"import": {
|
|
154
|
-
"from": "@
|
|
154
|
+
"from": "@tfdesign/b-end",
|
|
155
155
|
"default": "NavBar"
|
|
156
156
|
},
|
|
157
157
|
"keywords": [
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"category": "business",
|
|
193
193
|
"description": "业务标签栏,集成顶部搜索、业务切换、树形标签与最小宽度折叠,适合服务平台左侧标签导航场景。",
|
|
194
194
|
"import": {
|
|
195
|
-
"from": "@
|
|
195
|
+
"from": "@tfdesign/b-end",
|
|
196
196
|
"default": "TagBar"
|
|
197
197
|
},
|
|
198
198
|
"keywords": [
|
|
@@ -231,9 +231,9 @@
|
|
|
231
231
|
"kind": "component",
|
|
232
232
|
"name": "Card",
|
|
233
233
|
"category": "business",
|
|
234
|
-
"description": "业务信息摘要卡片,支持数据卡片、商品卡片、信息卡片1和信息卡片2
|
|
234
|
+
"description": "业务信息摘要卡片,支持数据卡片、商品卡片、信息卡片1和信息卡片2。所有卡片分类统一遵循背景反衬原则:灰色/浅灰/非纯白背景用白底卡,纯白背景用灰底卡。",
|
|
235
235
|
"import": {
|
|
236
|
-
"from": "@
|
|
236
|
+
"from": "@tfdesign/b-end",
|
|
237
237
|
"default": "Card"
|
|
238
238
|
},
|
|
239
239
|
"keywords": [
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
"category": "business",
|
|
275
275
|
"description": "会话 / 工单 / 线程侧栏列表,用于 IM 对话、即时通讯工作台、客服接待、工单处理、托管队列等需要按状态分组浏览并快速切换当前处理线程的业务场景,默认支持“默认列表 / 卡片列表”双布局切换。",
|
|
276
276
|
"import": {
|
|
277
|
-
"from": "@
|
|
277
|
+
"from": "@tfdesign/b-end",
|
|
278
278
|
"default": "ConversationList"
|
|
279
279
|
},
|
|
280
280
|
"keywords": [
|
|
@@ -313,9 +313,9 @@
|
|
|
313
313
|
"kind": "component",
|
|
314
314
|
"name": "InfoDisplayPanel",
|
|
315
315
|
"category": "business",
|
|
316
|
-
"description": "信息展示面板框架,用于客服工作台、在线 Agent、工单详情右侧信息区等场景;默认以主栏承载全部 tabs
|
|
316
|
+
"description": "信息展示面板框架,用于客服工作台、在线 Agent、工单详情右侧信息区等场景;默认以主栏承载全部 tabs,并按业务动态 tab1 / tab2 / tab3 拆分为 1-3 栏,支持整体宽度与栏间宽度拖拽。",
|
|
317
317
|
"import": {
|
|
318
|
-
"from": "@
|
|
318
|
+
"from": "@tfdesign/b-end",
|
|
319
319
|
"default": "InfoDisplayPanel"
|
|
320
320
|
},
|
|
321
321
|
"keywords": [
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
"多面板工作区",
|
|
345
345
|
"panel tabs"
|
|
346
346
|
],
|
|
347
|
-
"ruleCount":
|
|
347
|
+
"ruleCount": 28,
|
|
348
348
|
"exampleCount": 8,
|
|
349
349
|
"hasCode": false,
|
|
350
350
|
"detailRef": "components.index.json#info-display-panel"
|
|
@@ -356,7 +356,7 @@
|
|
|
356
356
|
"category": "business",
|
|
357
357
|
"description": "IM 聊天气泡,支持左右 2 种角色布局、单条/多条 2 种气泡组织,以及图片/机器人/AI/隐藏 4 种头像类型,并支持 hover 查看分层消息时间。",
|
|
358
358
|
"import": {
|
|
359
|
-
"from": "@
|
|
359
|
+
"from": "@tfdesign/b-end",
|
|
360
360
|
"default": "ChatBubble"
|
|
361
361
|
},
|
|
362
362
|
"keywords": [
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
"category": "business",
|
|
398
398
|
"description": "对话/消息发送输入框,统一覆盖所有「输入内容并发出」场景。变体选择只看一个维度——UI 上是否有 Agent/工具栏:有(Agent 切换 / @ / 指令 / 附件)→ default;没有 → im-basic。im-basic(基础输入框)是使用频率最高的变体,适用范围:IM 消息输入、会话底部发送栏、评论框、工单回复、模型 Playground 发送栏(type prompt → 「发送并运行模型」)、任何 user/assistant 测试界面。default/default-sm/replying/busy/readonly 专用于内置完整 AI 工具栏的 Agent 对话场景(三层结构:底层氛围背景 → 输入区域 → 猫条)。im-basic 左下角按钮通过声明式 `imActions` 场景化配置,默认是图片 + 表情,最多展示 5 个。",
|
|
399
399
|
"import": {
|
|
400
|
-
"from": "@
|
|
400
|
+
"from": "@tfdesign/b-end",
|
|
401
401
|
"default": "ChatInput"
|
|
402
402
|
},
|
|
403
403
|
"keywords": [
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
"category": "business",
|
|
439
439
|
"description": "AI 对话页「一条消息」原子单元(行业对齐 assistant-ui Message / Microsoft ChatMessage)。一个 ChatMessage = 一条消息(user 气泡 / AI 头像 / 文本回复 / 执行流 / 卡片回复 / 深度思考 / 操作栏),按 role 与 7 类子能力组合呈现。",
|
|
440
440
|
"import": {
|
|
441
|
-
"from": "@
|
|
441
|
+
"from": "@tfdesign/b-end",
|
|
442
442
|
"default": "ChatMessage"
|
|
443
443
|
},
|
|
444
444
|
"keywords": [
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
"category": "basic",
|
|
480
480
|
"description": "触发一次性动作(提交、取消、打开弹窗、行内「编辑/删除」)。不负责在同一视图内切换多块内容(那是 Tabs);不负责从枚举里选题(那是 Select/Radio)。primary 为每视图唯一主按钮(黑底)。⚠️ 尺寸硬规则:全局默认 size=\"md\"(36px),AI 生成页面时禁止擅自使用 size=\"sm\",仅在设计明确标注或卡片空间极度受限时才可使用 SM。",
|
|
481
481
|
"import": {
|
|
482
|
-
"from": "@
|
|
482
|
+
"from": "@tfdesign/b-end",
|
|
483
483
|
"default": "Button"
|
|
484
484
|
},
|
|
485
485
|
"keywords": [
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
"category": "basic",
|
|
521
521
|
"description": "同一页面或同一卡片内,多块平级内容的切换(视图状态保持在本页)。典型:详情子页签、表单分段、筛选维度切换。跨模块站点级导航优先侧栏/路由,而不是 Tabs 堆满一级入口。",
|
|
522
522
|
"import": {
|
|
523
|
-
"from": "@
|
|
523
|
+
"from": "@tfdesign/b-end",
|
|
524
524
|
"default": "Tabs"
|
|
525
525
|
},
|
|
526
526
|
"keywords": [
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
"category": "basic",
|
|
562
562
|
"description": "B端标题组件,统一收敛整体页面总标题、工作台标题、一级/二级/三级标题和卡片标题 5 种变体;描述文案默认隐藏,仅在有板块介绍/场景说明/明确要求时通过 showDescription 显示;支持标题后缀 titleSuffix(如状态 Tag)。⚠️ 字体强约束:所有变体的标题文字均通过组件内部 `[font-weight:var(--font-semibold)]` 固定为 600 semibold,字号、行高、颜色由组件 token 固定,禁止通过 className 或 style 覆写字体粗细、字号、颜色。",
|
|
563
563
|
"import": {
|
|
564
|
-
"from": "@
|
|
564
|
+
"from": "@tfdesign/b-end",
|
|
565
565
|
"default": "FormTitle"
|
|
566
566
|
},
|
|
567
567
|
"keywords": [
|
|
@@ -602,7 +602,7 @@
|
|
|
602
602
|
"category": "basic",
|
|
603
603
|
"description": "B端表单组合组件,负责字段标题、说明、错误反馈与 top/left 布局;字段控件复用平台已有基础组件,覆盖 13 类表单字段。",
|
|
604
604
|
"import": {
|
|
605
|
-
"from": "@
|
|
605
|
+
"from": "@tfdesign/b-end",
|
|
606
606
|
"default": "Form"
|
|
607
607
|
},
|
|
608
608
|
"keywords": [
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
"category": "basic",
|
|
644
644
|
"description": "用户自输入的短文本/搜索词。值不可穷举或需键盘高效录入时用 Input;若合法值来自有限枚举列表,应优先 Select 或 Radio,避免用 Input 接收「只能是 A/B/C」的值。",
|
|
645
645
|
"import": {
|
|
646
|
-
"from": "@
|
|
646
|
+
"from": "@tfdesign/b-end",
|
|
647
647
|
"default": "Input"
|
|
648
648
|
},
|
|
649
649
|
"keywords": [
|
|
@@ -684,7 +684,7 @@
|
|
|
684
684
|
"category": "basic",
|
|
685
685
|
"description": "多行文本输入,与 Input 共用边框与状态语义;固定 MD 尺寸(14px 字、与 Input md 一致的内边距)。新增 code 类型用于代码 / Prompt 编辑,左侧显示行号并使用等宽字体。默认占位 3 行高度,可选 1~5 行作为最小高度(1 行与 Input md 同高)。高度仅按内容与规则自动变化,不可拖拽改高。maxLength 可选,不设则字数不限。",
|
|
686
686
|
"import": {
|
|
687
|
-
"from": "@
|
|
687
|
+
"from": "@tfdesign/b-end",
|
|
688
688
|
"default": "TextArea"
|
|
689
689
|
},
|
|
690
690
|
"keywords": [
|
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
"category": "basic",
|
|
726
726
|
"description": "数字输入框,复用 Input 触发器视觉,支持最小值、最大值、步长、小数精度,以及外置/内置步进按钮。",
|
|
727
727
|
"import": {
|
|
728
|
-
"from": "@
|
|
728
|
+
"from": "@tfdesign/b-end",
|
|
729
729
|
"default": "InputNumber"
|
|
730
730
|
},
|
|
731
731
|
"keywords": [
|
|
@@ -766,7 +766,7 @@
|
|
|
766
766
|
"category": "basic",
|
|
767
767
|
"description": "从预定义 options 中选值:节省纵向空间、选项可较多、与 Input 视觉同构。单选枚举默认 mode=default;同一字段多选且以标签形式回显用 mode=tag。少量互斥项且需一眼比较布局 → 优先 Radio。",
|
|
768
768
|
"import": {
|
|
769
|
-
"from": "@
|
|
769
|
+
"from": "@tfdesign/b-end",
|
|
770
770
|
"default": "Select"
|
|
771
771
|
},
|
|
772
772
|
"keywords": [
|
|
@@ -807,7 +807,7 @@
|
|
|
807
807
|
"category": "basic",
|
|
808
808
|
"description": "互斥单选:同一组内只能选一个值。支持基础样式、带圆点单选卡片、单选卡片 3 类形态,适合选项少且需要平铺比较的表单场景。多选请用 CheckboxGroup;布尔即时开关请用 Switch;选项很多请用 Select。",
|
|
809
809
|
"import": {
|
|
810
|
-
"from": "@
|
|
810
|
+
"from": "@tfdesign/b-end",
|
|
811
811
|
"default": "RadioGroup",
|
|
812
812
|
"named": [
|
|
813
813
|
"Radio"
|
|
@@ -845,7 +845,7 @@
|
|
|
845
845
|
"category": "basic",
|
|
846
846
|
"description": "多选或二元勾选(含「全选/半选」树形父级)。用于权限、标签、筛选条件、同意协议等。互斥单选用 Radio;单一功能开闭且立即生效优先 Switch。",
|
|
847
847
|
"import": {
|
|
848
|
-
"from": "@
|
|
848
|
+
"from": "@tfdesign/b-end",
|
|
849
849
|
"default": "CheckboxGroup",
|
|
850
850
|
"named": [
|
|
851
851
|
"Checkbox"
|
|
@@ -883,7 +883,7 @@
|
|
|
883
883
|
"category": "basic",
|
|
884
884
|
"description": "开关组件,两种状态间即时切换,支持品牌绿/主色黑两种视觉变体,尺寸固定为 MD(36px 体系)。",
|
|
885
885
|
"import": {
|
|
886
|
-
"from": "@
|
|
886
|
+
"from": "@tfdesign/b-end",
|
|
887
887
|
"default": "Switch"
|
|
888
888
|
},
|
|
889
889
|
"keywords": [
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
"category": "basic",
|
|
917
917
|
"description": "滑动输入条,支持单值和区间双滑块,拖动时显示数值气泡并支持刻度标签。",
|
|
918
918
|
"import": {
|
|
919
|
-
"from": "@
|
|
919
|
+
"from": "@tfdesign/b-end",
|
|
920
920
|
"default": "Slider"
|
|
921
921
|
},
|
|
922
922
|
"keywords": [
|
|
@@ -954,7 +954,7 @@
|
|
|
954
954
|
"category": "basic",
|
|
955
955
|
"description": "图片宫格上传,96×96 缩略图卡片,支持上传进度、错误重试和禁用态。",
|
|
956
956
|
"import": {
|
|
957
|
-
"from": "@
|
|
957
|
+
"from": "@tfdesign/b-end",
|
|
958
958
|
"default": "Upload"
|
|
959
959
|
},
|
|
960
960
|
"keywords": [
|
|
@@ -991,7 +991,7 @@
|
|
|
991
991
|
"category": "business",
|
|
992
992
|
"description": "纵向堆叠 Form 的业务片段(无独立背景/描边、无 FormTitle、无底栏按钮):按 FormFieldStack 间距样式规范(p-6、gap-6、全宽 stretch)组合任意数量与类型的基础表单控件。stackLayout=select-stack 为 5 段单列 select 示意;stackLayout=mixed-fields 为单 Form 内含 2×input / 2×select / 2×radio / 2×checkbox / 3×textarea 示意。",
|
|
993
993
|
"import": {
|
|
994
|
-
"from": "@
|
|
994
|
+
"from": "@tfdesign/b-end",
|
|
995
995
|
"default": "FormFieldStack"
|
|
996
996
|
},
|
|
997
997
|
"keywords": [
|
|
@@ -1023,7 +1023,7 @@
|
|
|
1023
1023
|
"category": "business",
|
|
1024
1024
|
"description": "B端业务列表表格,支持标准表格与卡片型表单两种类型。标准表格按列配置单元格类型与尺寸;卡片型表单用于策略、流程、脚本、模板等带父项和版本子项的业务列表,并带展开、查看、更多和分页交互。",
|
|
1025
1025
|
"import": {
|
|
1026
|
-
"from": "@
|
|
1026
|
+
"from": "@tfdesign/b-end",
|
|
1027
1027
|
"default": "Table"
|
|
1028
1028
|
},
|
|
1029
1029
|
"keywords": [
|
|
@@ -1064,7 +1064,7 @@
|
|
|
1064
1064
|
"category": "basic",
|
|
1065
1065
|
"description": "日期选择器,支持日期、日期时间、日期范围、日期时间范围 4 种类型。",
|
|
1066
1066
|
"import": {
|
|
1067
|
-
"from": "@
|
|
1067
|
+
"from": "@tfdesign/b-end",
|
|
1068
1068
|
"default": "DatePicker"
|
|
1069
1069
|
},
|
|
1070
1070
|
"keywords": [
|
|
@@ -1105,7 +1105,7 @@
|
|
|
1105
1105
|
"category": "basic",
|
|
1106
1106
|
"description": "时间选择器,支持单时间与时间范围,触发器视觉对齐 DatePicker,浮层内按 Figma 滚轮面板选择时/分。",
|
|
1107
1107
|
"import": {
|
|
1108
|
-
"from": "@
|
|
1108
|
+
"from": "@tfdesign/b-end",
|
|
1109
1109
|
"default": "TimePicker"
|
|
1110
1110
|
},
|
|
1111
1111
|
"keywords": [
|
|
@@ -1134,7 +1134,7 @@
|
|
|
1134
1134
|
"category": "basic",
|
|
1135
1135
|
"description": "模态弹窗面板,含标题区、内容区和底部按钮。支持居中(center)和全屏弹窗(fullscreen)两种布局变体。",
|
|
1136
1136
|
"import": {
|
|
1137
|
-
"from": "@
|
|
1137
|
+
"from": "@tfdesign/b-end",
|
|
1138
1138
|
"default": "Modal"
|
|
1139
1139
|
},
|
|
1140
1140
|
"keywords": [
|
|
@@ -1175,7 +1175,7 @@
|
|
|
1175
1175
|
"category": "basic",
|
|
1176
1176
|
"description": "侧边抽屉面板,从屏幕右侧(或左侧)滑入,含标题区、内容区和底部按钮,3 档宽度,内容超高可滚动。",
|
|
1177
1177
|
"import": {
|
|
1178
|
-
"from": "@
|
|
1178
|
+
"from": "@tfdesign/b-end",
|
|
1179
1179
|
"default": "Sheet"
|
|
1180
1180
|
},
|
|
1181
1181
|
"keywords": [
|
|
@@ -1212,7 +1212,7 @@
|
|
|
1212
1212
|
"category": "basic",
|
|
1213
1213
|
"description": "标签输入框,严格复用 Tag 展示已选项与 +N 折叠项,宽度自适应折叠超出标签,并通过 Tooltip 展示被省略标签。",
|
|
1214
1214
|
"import": {
|
|
1215
|
-
"from": "@
|
|
1215
|
+
"from": "@tfdesign/b-end",
|
|
1216
1216
|
"default": "TagInput"
|
|
1217
1217
|
},
|
|
1218
1218
|
"keywords": [
|
|
@@ -1248,7 +1248,7 @@
|
|
|
1248
1248
|
"category": "basic",
|
|
1249
1249
|
"description": "标签组件,用于标记、分类或状态展示。支持 13 种颜色变体、2 档字体粗细、3 档尺寸、3 种圆角、可关闭功能。",
|
|
1250
1250
|
"import": {
|
|
1251
|
-
"from": "@
|
|
1251
|
+
"from": "@tfdesign/b-end",
|
|
1252
1252
|
"default": "Tag"
|
|
1253
1253
|
},
|
|
1254
1254
|
"keywords": [
|
|
@@ -1282,6 +1282,45 @@
|
|
|
1282
1282
|
"hasCode": false,
|
|
1283
1283
|
"detailRef": "components.index.json#tag"
|
|
1284
1284
|
},
|
|
1285
|
+
{
|
|
1286
|
+
"id": "filter",
|
|
1287
|
+
"kind": "component",
|
|
1288
|
+
"name": "Filter",
|
|
1289
|
+
"category": "basic",
|
|
1290
|
+
"description": "筛选胶囊项:用于筛选栏中的单个筛选触发器或已选条件展示,36px 高、全圆角、标签 semibold + 值 regular。支持点击展开下拉面板、多选、白底常态、填充态、品牌选中态、禁用态和可清除态。",
|
|
1291
|
+
"import": {
|
|
1292
|
+
"from": "@tfdesign/b-end",
|
|
1293
|
+
"default": "Filter"
|
|
1294
|
+
},
|
|
1295
|
+
"keywords": [
|
|
1296
|
+
"Filter",
|
|
1297
|
+
"filter",
|
|
1298
|
+
"筛选",
|
|
1299
|
+
"筛选项",
|
|
1300
|
+
"筛选组件",
|
|
1301
|
+
"筛选胶囊",
|
|
1302
|
+
"筛选 chip",
|
|
1303
|
+
"筛选触发器",
|
|
1304
|
+
"已选筛选",
|
|
1305
|
+
"过滤条件",
|
|
1306
|
+
"filter item",
|
|
1307
|
+
"filter chip",
|
|
1308
|
+
"pill filter",
|
|
1309
|
+
"closable",
|
|
1310
|
+
"clear",
|
|
1311
|
+
"清除筛选",
|
|
1312
|
+
"下拉筛选",
|
|
1313
|
+
"多选筛选",
|
|
1314
|
+
"selected filter",
|
|
1315
|
+
"span rounded-full border",
|
|
1316
|
+
"手搓筛选",
|
|
1317
|
+
"自制筛选 chip"
|
|
1318
|
+
],
|
|
1319
|
+
"ruleCount": 13,
|
|
1320
|
+
"exampleCount": 12,
|
|
1321
|
+
"hasCode": false,
|
|
1322
|
+
"detailRef": "components.index.json#filter"
|
|
1323
|
+
},
|
|
1285
1324
|
{
|
|
1286
1325
|
"id": "toast",
|
|
1287
1326
|
"kind": "component",
|
|
@@ -1289,7 +1328,7 @@
|
|
|
1289
1328
|
"category": "basic",
|
|
1290
1329
|
"description": "轻量反馈条:信息/成功/警示/错误四态,左侧状态图标(相对行首额外 4px 左边距)+ 主文案 + 可选文字操作(绿色文字 Button)+ 可关闭;宽度随内容收缩(w-fit),最大不超过 min(100%,560px);圆角 12px、可选语义描边(bordered)、内距 12px、主文案 14px 半粗,行内纵向居中对齐。规范仅覆盖单条条目视觉;全局队列、停留时长与 Portal 由业务集成(对齐 HiUI Toast)。",
|
|
1291
1330
|
"import": {
|
|
1292
|
-
"from": "@
|
|
1331
|
+
"from": "@tfdesign/b-end",
|
|
1293
1332
|
"default": "Toast"
|
|
1294
1333
|
},
|
|
1295
1334
|
"keywords": [
|
|
@@ -1330,7 +1369,7 @@
|
|
|
1330
1369
|
"category": "basic",
|
|
1331
1370
|
"description": "文字提示气泡,hover/focus 触发,支持 12 个方位与视口边缘自动翻转。默认深色变体(grey-800 背景 + 白字),light 白底变体仅用于 TagInput +N 更多标签场景;文本容器固定规格(圆角 8px、内距 8/12、字号 14px),通过 Portal 渲染到 body 以避开父容器裁切。",
|
|
1332
1371
|
"import": {
|
|
1333
|
-
"from": "@
|
|
1372
|
+
"from": "@tfdesign/b-end",
|
|
1334
1373
|
"default": "Tooltip"
|
|
1335
1374
|
},
|
|
1336
1375
|
"keywords": [
|
|
@@ -1371,7 +1410,7 @@
|
|
|
1371
1410
|
"category": "basic",
|
|
1372
1411
|
"description": "空状态占位组件,固定布局(插画 → 文案 → 操作),所有内容区域独立配置、按需组合。10 种内置插画对应常见场景;标题/描述/链接行/三种按钮均可独立传入或省略;buttonLayout 控制横排/竖排。",
|
|
1373
1412
|
"import": {
|
|
1374
|
-
"from": "@
|
|
1413
|
+
"from": "@tfdesign/b-end",
|
|
1375
1414
|
"default": "Empty"
|
|
1376
1415
|
},
|
|
1377
1416
|
"keywords": [
|
|
@@ -1412,7 +1451,7 @@
|
|
|
1412
1451
|
"category": "business",
|
|
1413
1452
|
"description": "全屏操作页容器,覆盖整个模版框架(含侧边导航),适合分步骤编辑、创建页面不同板块内容流程,以及内容量大、需沉浸长时间编辑的业务场景。支持白底(直铺/描边面板)和灰底(白卡面板)两种背景模式。",
|
|
1414
1453
|
"import": {
|
|
1415
|
-
"from": "@
|
|
1454
|
+
"from": "@tfdesign/b-end",
|
|
1416
1455
|
"default": "FullScreenPage"
|
|
1417
1456
|
},
|
|
1418
1457
|
"keywords": [
|
|
@@ -1453,7 +1492,7 @@
|
|
|
1453
1492
|
"category": "page-template",
|
|
1454
1493
|
"description": "列表页示例片段(与 BasePageFramePattern 配套),可直接复制改造。源文件:./page-patterns/VariableManagementPage.jsx",
|
|
1455
1494
|
"import": {
|
|
1456
|
-
"from": "@
|
|
1495
|
+
"from": "@tfdesign/b-end",
|
|
1457
1496
|
"default": "VariableManagementPage"
|
|
1458
1497
|
},
|
|
1459
1498
|
"keywords": [
|
|
@@ -1481,7 +1520,7 @@
|
|
|
1481
1520
|
"category": "page-template",
|
|
1482
1521
|
"description": "列表页示例片段(与 BasePageFramePattern 配套),可直接复制改造。源文件:./page-patterns/McpManagementPage.jsx",
|
|
1483
1522
|
"import": {
|
|
1484
|
-
"from": "@
|
|
1523
|
+
"from": "@tfdesign/b-end",
|
|
1485
1524
|
"default": "McpManagementPage"
|
|
1486
1525
|
},
|
|
1487
1526
|
"keywords": [
|
|
@@ -1510,7 +1549,7 @@
|
|
|
1510
1549
|
"category": "page-template",
|
|
1511
1550
|
"description": "列表页示例片段(与 BasePageFramePattern 配套),可直接复制改造。源文件:./page-patterns/TabTopBarListPage.jsx",
|
|
1512
1551
|
"import": {
|
|
1513
|
-
"from": "@
|
|
1552
|
+
"from": "@tfdesign/b-end",
|
|
1514
1553
|
"default": "TabTopBarListPage"
|
|
1515
1554
|
},
|
|
1516
1555
|
"keywords": [
|
|
@@ -1540,7 +1579,7 @@
|
|
|
1540
1579
|
"category": "page-template",
|
|
1541
1580
|
"description": "列表页示例片段(与 BasePageFramePattern 配套),可直接复制改造。源文件:./page-patterns/StrategyListPage.jsx",
|
|
1542
1581
|
"import": {
|
|
1543
|
-
"from": "@
|
|
1582
|
+
"from": "@tfdesign/b-end",
|
|
1544
1583
|
"default": "StrategyListPage"
|
|
1545
1584
|
},
|
|
1546
1585
|
"keywords": [
|
|
@@ -1568,7 +1607,7 @@
|
|
|
1568
1607
|
"category": "page-pattern",
|
|
1569
1608
|
"description": "客服 / 在线 Agent 工作台页面框架:顶部在线状态、指标工具区、基础/托管模式切换、半透明工作区与右侧主白卡。适用于客服正在处理会话、工单、质检、托管等工作台页面。",
|
|
1570
1609
|
"import": {
|
|
1571
|
-
"from": "@
|
|
1610
|
+
"from": "@tfdesign/b-end",
|
|
1572
1611
|
"default": "CustomerServiceWorkspaceFramePattern"
|
|
1573
1612
|
},
|
|
1574
1613
|
"keywords": [
|
|
@@ -1595,7 +1634,7 @@
|
|
|
1595
1634
|
"工单处理框架",
|
|
1596
1635
|
"CustomerServiceWorkspaceFrame"
|
|
1597
1636
|
],
|
|
1598
|
-
"ruleCount":
|
|
1637
|
+
"ruleCount": 25,
|
|
1599
1638
|
"exampleCount": 0,
|
|
1600
1639
|
"hasCode": true,
|
|
1601
1640
|
"detailRef": "components.index.json#customer-service-workspace-frame"
|
|
@@ -1607,7 +1646,7 @@
|
|
|
1607
1646
|
"category": "page-pattern",
|
|
1608
1647
|
"description": "B 端列表页模板示例集:左侧 NavBar 业务侧导(5 个\"列表示例\"菜单),每项对应一个独立完整的列表页模板。每个模板自上而下:标题栏 + 筛选栏 + 表格,业务可直接复制单文件作为新页面起点。",
|
|
1609
1648
|
"import": {
|
|
1610
|
-
"from": "@
|
|
1649
|
+
"from": "@tfdesign/b-end",
|
|
1611
1650
|
"default": "BasePageFramePattern"
|
|
1612
1651
|
},
|
|
1613
1652
|
"keywords": [
|
|
@@ -1648,7 +1687,7 @@
|
|
|
1648
1687
|
"category": "page-pattern",
|
|
1649
1688
|
"description": "AI 产品的入口首页模板:左侧 NavBar + 右侧内容区(顶部 Hero ChatInput + 筛选 Tab + 卡片列表网格)。适用于用户尚未进入具体上下文、第一步是输入需求 / 搜索助手 / 从模板开始的场景。",
|
|
1650
1689
|
"import": {
|
|
1651
|
-
"from": "@
|
|
1690
|
+
"from": "@tfdesign/b-end",
|
|
1652
1691
|
"default": "ChatHomePagePattern"
|
|
1653
1692
|
},
|
|
1654
1693
|
"keywords": [
|
|
@@ -1689,7 +1728,7 @@
|
|
|
1689
1728
|
"category": "page-pattern",
|
|
1690
1729
|
"description": "适用于对象详情、产物预览、策略画布、配置编辑等“主工作区 + AI 侧助”的混合协作页。左侧 Copilot 面板可通过顶栏按钮一键展开/收起,右侧为主内容区。",
|
|
1691
1730
|
"import": {
|
|
1692
|
-
"from": "@
|
|
1731
|
+
"from": "@tfdesign/b-end",
|
|
1693
1732
|
"default": "CopilotPagePattern"
|
|
1694
1733
|
},
|
|
1695
1734
|
"keywords": [
|
|
@@ -1730,7 +1769,7 @@
|
|
|
1730
1769
|
"category": "page-pattern",
|
|
1731
1770
|
"description": "独立的 AI 助手会话详情页:顶导栏(返回 + 标题 + 操作按钮组)+ 800px 居中消息流 + 底部吸底 ChatInput。所有消息(用户 / AI)一律用 ChatMessage 渲染(用户走 role=\"user\",AI 走 header=true)。支持 phase 切换:默认 chat 阶段展示端到端 mock 对话,点「新会话」清空回到 welcome 欢迎屏(CATCAT 头像 + 推荐 chip)。关键词驱动完整任务流:「整理 / 分析 / 生成」→ 任务规划卡 → 用户点开始 → 流式执行流(每 600ms 推一步) → 同条消息更新为总结+产物+追问。",
|
|
1732
1771
|
"import": {
|
|
1733
|
-
"from": "@
|
|
1772
|
+
"from": "@tfdesign/b-end",
|
|
1734
1773
|
"default": "ChatConversationPattern"
|
|
1735
1774
|
},
|
|
1736
1775
|
"keywords": [
|
|
@@ -1759,7 +1798,7 @@
|
|
|
1759
1798
|
"流式执行",
|
|
1760
1799
|
"任务规划卡"
|
|
1761
1800
|
],
|
|
1762
|
-
"ruleCount":
|
|
1801
|
+
"ruleCount": 19,
|
|
1763
1802
|
"exampleCount": 0,
|
|
1764
1803
|
"hasCode": true,
|
|
1765
1804
|
"detailRef": "components.index.json#chat-conversation-page"
|
|
@@ -1771,7 +1810,7 @@
|
|
|
1771
1810
|
"category": "page-pattern",
|
|
1772
1811
|
"description": "IM 对话片段:适用于客服接待、用户私信、站内信、履约沟通、社群协作等以连续消息往返为核心的即时通讯场景。单个白卡内默认包含当前线程顶部信息元素、消息流和底部组合输入框,并支持真实发送;若是 AI 协同型对话,可切换为 AI 输入框。",
|
|
1773
1812
|
"import": {
|
|
1774
|
-
"from": "@
|
|
1813
|
+
"from": "@tfdesign/b-end",
|
|
1775
1814
|
"default": "IMConversationPattern"
|
|
1776
1815
|
},
|
|
1777
1816
|
"keywords": [
|
|
@@ -284,7 +284,7 @@ const ACTION = [
|
|
|
284
284
|
* @prop {'data'|'product'|'info'|'info2'|'animated'} [type='data'] — 卡片类型:data 为数据卡片,product 为商品卡片,info 为信息卡片1,info2 为信息卡片2;animated 为旧版兼容别名
|
|
285
285
|
* @prop {string} [title] — 卡片标题,商品卡片中为商品标题
|
|
286
286
|
* @prop {string} [description] — 卡片描述,商品卡片中为数量、价格等辅助信息
|
|
287
|
-
* @prop {'white'|'grey'} [color='white'] — 卡片颜色:white
|
|
287
|
+
* @prop {'white'|'grey'} [color='white'] — 卡片颜色:white 为白底样式,适用于灰/浅灰/非纯白容器;grey 为 Blue Grey 灰底样式,适用于纯白容器
|
|
288
288
|
* @prop {Array<{iconName: string, value: string, tooltip?: string}>|null} [stats=null] — 数据卡片指标数组,最多展示 3 项;tooltip 用于 hover/focus 展示详细说明
|
|
289
289
|
* @prop {string[]|null} [tags=null] — 数据卡片标签数组,建议 1-2 个短标签;商品卡片和信息卡片1不渲染通用 tags
|
|
290
290
|
* @prop {string} [productStatus='已使用'] — 商品状态标签文案
|
|
@@ -314,7 +314,8 @@ const ACTION = [
|
|
|
314
314
|
* @prop {object} [style] — 内联样式
|
|
315
315
|
*
|
|
316
316
|
* 通用 tags 仅用于数据卡片左下角;商品和信息卡片1不渲染标题左侧通用标签。
|
|
317
|
-
*
|
|
317
|
+
* 所有 Card 分类都遵循“背景反衬”规则:父容器是纯白色时必须使用灰底卡;父容器是灰色、浅灰色或其他非纯白底时必须使用白底卡。
|
|
318
|
+
* 卡片容器默认半透明白底,hover 后补满白底并出现业务卡片专用投影;灰底卡保持灰底与灰描边,并保留相同投影反馈。
|
|
318
319
|
*/
|
|
319
320
|
export default function Card({
|
|
320
321
|
type = 'data',
|
|
@@ -353,6 +354,7 @@ export default function Card({
|
|
|
353
354
|
const resolvedType = type === 'product' || type === 'info'
|
|
354
355
|
? type
|
|
355
356
|
: (type === 'info2' || type === 'animated' ? 'info2' : 'data');
|
|
357
|
+
// Card 颜色依赖父级背景做反衬,不按卡片类型区分。
|
|
356
358
|
const resolvedColor = color === 'grey' ? 'grey' : 'white';
|
|
357
359
|
const resolvedTitle = title || (
|
|
358
360
|
resolvedType === 'product'
|
|
@@ -116,6 +116,8 @@ export const CARD_TOKEN_MAP = {
|
|
|
116
116
|
{ label: '操作文案', cssProp: 'a11y-label', value: 'animatedActionText 作为圆形箭头按钮语义文案,不直接渲染为文字按钮' },
|
|
117
117
|
],
|
|
118
118
|
卡片: [
|
|
119
|
+
{ label: '容器映射规则', cssProp: 'usage', value: '所有卡片分类统一按父容器背景反衬:纯白容器用 grey 灰底卡;灰色 / 浅灰 / 其他非纯白容器用 white 白底卡' },
|
|
120
|
+
{ label: '规则适用范围', cssProp: 'scope', value: '数据卡片 / 商品卡片 / 信息卡片1 / 信息卡片2 全部生效,不因卡片类型变化' },
|
|
119
121
|
{ label: '白底背景', cssProp: 'background', token: '--color-card-secondary', value: 'rgba(255,255,255,0.65)', semanticRef: 'bg-card-secondary', state: 'default' },
|
|
120
122
|
{ label: '白底 Hover 背景', cssProp: 'background', token: '--color-surface', value: '#FFFFFF', semanticRef: 'bg-surface', state: 'hover' },
|
|
121
123
|
{ label: '白底描边', cssProp: 'border-color', token: '--color-white', value: '#FFFFFF' },
|
|
@@ -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 "@
|
|
6
|
+
* 样式依赖:入口 CSS 须 @import "@tfdesign/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
|