@tfdesign/b-end 1.0.13 → 1.0.15
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/CHECKLIST.md +5 -0
- package/skills/tfds/COMMON_FAILURES.md +48 -0
- package/skills/tfds/DESIGN_PRINCIPLES.md +5 -0
- package/skills/tfds/GLOBAL_DESIGN_RULES.md +31 -0
- package/skills/tfds/LAYOUT_RULES.md +31 -0
- package/skills/tfds/components.index.json +75 -27
- package/skills/tfds/components.summary.json +13 -13
- package/src/_b_end_runtime/components/Card.jsx +151 -13
- package/src/_b_end_runtime/components/Card.tokens.js +27 -3
- package/src/_b_end_runtime/components/CardPreview.jsx +11 -3
- package/src/_b_end_runtime/components/ChatMessage.jsx +59 -1
- package/src/_b_end_runtime/components/ConversationList.jsx +68 -68
- package/src/_b_end_runtime/components/ConversationList.tokens.js +5 -3
- 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/Modal.jsx +1 -0
- 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/Tabs.jsx +46 -3
- package/src/_b_end_runtime/components/Tabs.tokens.js +3 -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 +24 -11
- package/src/_b_end_runtime/page-patterns/ChatConversationPattern.jsx +548 -135
- 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/CustomerServiceWorkspaceFramePattern.jsx +66 -5
- package/src/_b_end_runtime/page-patterns/IMConversationPattern.jsx +50 -17
- package/src/_b_end_runtime/page-patterns/TabTopBarListPage.jsx +28 -78
- package/src/_b_end_runtime/patterns.js +32 -21
- package/src/_b_end_runtime/preview-registry.jsx +20 -4
- package/src/index.d.ts +4 -2
|
@@ -1171,13 +1171,14 @@ export const PREVIEW_REGISTRY = {
|
|
|
1171
1171
|
{ id: 'product', label: '商品卡片' },
|
|
1172
1172
|
{ id: 'info', label: '信息卡片1' },
|
|
1173
1173
|
{ id: 'info2', label: '信息卡片2' },
|
|
1174
|
+
{ id: 'info3', label: '信息卡片3' },
|
|
1174
1175
|
],
|
|
1175
1176
|
default: 'default',
|
|
1176
1177
|
},
|
|
1177
1178
|
],
|
|
1178
1179
|
|
|
1179
1180
|
mapProps: (cv, enums) => {
|
|
1180
|
-
const type = ['product', 'info', 'info2'].includes(cv.category) ? cv.category : 'data';
|
|
1181
|
+
const type = ['product', 'info', 'info2', 'info3'].includes(cv.category) ? cv.category : 'data';
|
|
1181
1182
|
return {
|
|
1182
1183
|
type,
|
|
1183
1184
|
color: enums.color || 'white',
|
|
@@ -1216,6 +1217,9 @@ export const PREVIEW_REGISTRY = {
|
|
|
1216
1217
|
if (category === 'info2') {
|
|
1217
1218
|
return props.filter((prop) => ['color', 'animatedTone'].includes(prop.name));
|
|
1218
1219
|
}
|
|
1220
|
+
if (category === 'info3') {
|
|
1221
|
+
return props.filter((prop) => prop.name === 'color');
|
|
1222
|
+
}
|
|
1219
1223
|
const dataVisibleNames = ['color', 'dataIconVisible'];
|
|
1220
1224
|
if ((enumValues.dataIconVisible || 'hidden') === 'visible') {
|
|
1221
1225
|
dataVisibleNames.push('dataIconStyle');
|
|
@@ -1228,7 +1232,7 @@ export const PREVIEW_REGISTRY = {
|
|
|
1228
1232
|
generateUsage: (enums, cv = {}) => {
|
|
1229
1233
|
const lines = [`import Card from './components/Card';`];
|
|
1230
1234
|
const color = enums.color || 'white';
|
|
1231
|
-
const type = ['product', 'info', 'info2'].includes(cv.category) ? cv.category : 'data';
|
|
1235
|
+
const type = ['product', 'info', 'info2', 'info3'].includes(cv.category) ? cv.category : 'data';
|
|
1232
1236
|
lines.push('');
|
|
1233
1237
|
|
|
1234
1238
|
if (type === 'data') {
|
|
@@ -1241,16 +1245,17 @@ export const PREVIEW_REGISTRY = {
|
|
|
1241
1245
|
}
|
|
1242
1246
|
|
|
1243
1247
|
if (color === 'grey') {
|
|
1244
|
-
lines.push('/*
|
|
1248
|
+
lines.push('/* 所有 Card 分类都遵守同一规则:白色背景容器里,推荐使用灰底 Card 做层次分隔 */');
|
|
1245
1249
|
lines.push('<div className="bg-white p-6">');
|
|
1246
1250
|
} else {
|
|
1247
|
-
lines.push('/*
|
|
1251
|
+
lines.push('/* 所有 Card 分类都遵守同一规则:灰色、浅灰或其他非纯白背景容器里,推荐使用白底 Card 做内容承载 */');
|
|
1248
1252
|
lines.push('<div className="bg-blueGrey-200 p-6">');
|
|
1249
1253
|
}
|
|
1250
1254
|
lines.push(' <Card');
|
|
1251
1255
|
if (type === 'product') lines.push(' type="product"');
|
|
1252
1256
|
if (type === 'info') lines.push(' type="info"');
|
|
1253
1257
|
if (type === 'info2') lines.push(' type="info2"');
|
|
1258
|
+
if (type === 'info3') lines.push(' type="info3"');
|
|
1254
1259
|
if (color !== 'white') lines.push(` color="${color}"`);
|
|
1255
1260
|
if (type === 'product') {
|
|
1256
1261
|
lines.push(' title="海底捞门店通用双人套餐"');
|
|
@@ -1281,6 +1286,17 @@ export const PREVIEW_REGISTRY = {
|
|
|
1281
1286
|
lines.push(' animatedBadge="AI 推荐"');
|
|
1282
1287
|
lines.push(' animatedActionText="立即体验"');
|
|
1283
1288
|
lines.push(' onAction={() => {}}');
|
|
1289
|
+
} else if (type === 'info3') {
|
|
1290
|
+
lines.push(' title="抖音生服订单已签收后还能申请退款吗?"');
|
|
1291
|
+
lines.push(' description="已签收订单仍可在 7 天无理由保障期内发起退款,需提供商品照片或服务异常说明,平台介入后通常 24h 内出结果。"');
|
|
1292
|
+
lines.push(' status="生效"');
|
|
1293
|
+
lines.push(' metaItems={[');
|
|
1294
|
+
lines.push(' { iconName: "tag-01-stroked", value: "QA" },');
|
|
1295
|
+
lines.push(' { iconName: "clock-stroked", value: "2026-04-21 10:30" },');
|
|
1296
|
+
lines.push(' { value: "李思儒" },');
|
|
1297
|
+
lines.push(' ]}');
|
|
1298
|
+
lines.push(' actionAriaLabel="查看知识详情"');
|
|
1299
|
+
lines.push(' onAction={() => {}}');
|
|
1284
1300
|
} else {
|
|
1285
1301
|
lines.push(' title="更新用户资料"');
|
|
1286
1302
|
lines.push(' description="更新用户个人资料信息,支持修改昵称、头像、简介等。"');
|
package/src/index.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ export interface TagBarProps extends TfdsCommonProps {
|
|
|
155
155
|
}
|
|
156
156
|
export const TagBar: React.FC<TagBarProps>;
|
|
157
157
|
|
|
158
|
-
/** Card — 业务信息摘要卡片,支持数据卡片、商品卡片、信息卡片1和信息卡片2
|
|
158
|
+
/** Card — 业务信息摘要卡片,支持数据卡片、商品卡片、信息卡片1和信息卡片2。所有卡片分类统一遵循背景反衬原则:灰色/浅灰/非纯白背景用白底卡,纯白背景用灰底卡。 */
|
|
159
159
|
export interface CardProps extends TfdsCommonProps {
|
|
160
160
|
/** enum<data | product | info | info2 | animated>, default: "data" */
|
|
161
161
|
type?: "data" | "product" | "info" | "info2" | "animated";
|
|
@@ -261,7 +261,7 @@ export interface ConversationListProps extends TfdsCommonProps {
|
|
|
261
261
|
}
|
|
262
262
|
export const ConversationList: React.FC<ConversationListProps>;
|
|
263
263
|
|
|
264
|
-
/** InfoDisplayPanel — 信息展示面板框架,用于客服工作台、在线 Agent、工单详情右侧信息区等场景;默认以主栏承载全部 tabs
|
|
264
|
+
/** InfoDisplayPanel — 信息展示面板框架,用于客服工作台、在线 Agent、工单详情右侧信息区等场景;默认以主栏承载全部 tabs,并按业务动态 tab1 / tab2 / tab3 拆分为 1-3 栏,支持整体宽度与栏间宽度拖拽。 */
|
|
265
265
|
export interface InfoDisplayPanelProps extends TfdsCommonProps {
|
|
266
266
|
/** array, default: null */
|
|
267
267
|
panels?: unknown[];
|
|
@@ -452,6 +452,8 @@ export interface TabsProps extends TfdsCommonProps {
|
|
|
452
452
|
defaultIndex?: number;
|
|
453
453
|
/** function, default: null */
|
|
454
454
|
onChange?: (...args: any[]) => any;
|
|
455
|
+
/** enum<auto | visible>, default: "auto" */
|
|
456
|
+
overflow?: "auto" | "visible";
|
|
455
457
|
}
|
|
456
458
|
export const Tabs: React.FC<TabsProps>;
|
|
457
459
|
|