@teamix-evo/skills 0.12.0 → 0.13.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/README.md +1 -1
- package/manifest.json +11 -28
- package/package.json +2 -2
- package/src/teamix-evo-code-opentrek/SKILL.md +13 -13
- package/src/teamix-evo-code-opentrek/api-layering.md +53 -44
- package/src/teamix-evo-code-opentrek/checklist.md +24 -24
- package/src/teamix-evo-code-opentrek/file-structure.md +55 -36
- package/src/teamix-evo-code-opentrek/forms-and-validation.md +17 -16
- package/src/teamix-evo-code-opentrek/reuse-first.md +6 -9
- package/src/teamix-evo-code-opentrek/testing.md +14 -14
- package/src/teamix-evo-code-uni-manager/SKILL.md +15 -15
- package/src/teamix-evo-code-uni-manager/api-layering.md +74 -58
- package/src/teamix-evo-code-uni-manager/checklist.md +28 -28
- package/src/teamix-evo-code-uni-manager/error-and-loading.md +2 -2
- package/src/teamix-evo-code-uni-manager/file-structure.md +77 -62
- package/src/teamix-evo-code-uni-manager/forms-and-validation.md +17 -15
- package/src/teamix-evo-code-uni-manager/reuse-first.md +7 -10
- package/src/teamix-evo-code-uni-manager/routing-and-codesplit.md +1 -1
- package/src/teamix-evo-code-uni-manager/testing.md +37 -37
- package/src/teamix-evo-design-opentrek/SKILL.md +41 -20
- package/src/teamix-evo-design-opentrek/boundaries.md +1 -1
- package/src/teamix-evo-design-opentrek/checklist.md +5 -5
- package/src/teamix-evo-design-opentrek/components.md +19 -19
- package/src/teamix-evo-design-opentrek/examples/standard-card-list.html +1 -1
- package/src/teamix-evo-design-opentrek/examples/standard-table-list.html +1 -1
- package/src/teamix-evo-design-opentrek/foundations.md +17 -17
- package/src/teamix-evo-design-opentrek/pages/dashboard-page/SKILL.md +18 -19
- package/src/teamix-evo-design-opentrek/pages/dashboard-page/patterns/dashboard-opentrek.md +6 -6
- package/src/teamix-evo-design-opentrek/pages/detail-page/SKILL.md +24 -25
- package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/api-doc-detail.md +3 -7
- package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/comparison-detail.md +3 -7
- package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/monitor-detail.md +3 -7
- package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/resource-detail.md +10 -10
- package/src/teamix-evo-design-opentrek/pages/form-page/SKILL.md +26 -27
- package/src/teamix-evo-design-opentrek/pages/list-page/SKILL.md +35 -36
- package/src/teamix-evo-design-opentrek/pages/list-page/_shared/item-card-spec.md +41 -32
- package/src/teamix-evo-design-opentrek/pages/list-page/patterns/card-list-opentrek.md +10 -10
- package/src/teamix-evo-design-opentrek/pages/list-page/patterns/card-list.md +23 -23
- package/src/teamix-evo-design-opentrek/pages/list-page/patterns/standard-list-opentrek.md +8 -8
- package/src/teamix-evo-design-opentrek/pages/list-page/patterns/standard-list.md +8 -8
- package/src/teamix-evo-design-opentrek/patterns/color-mapping.md +2 -2
- package/src/teamix-evo-design-opentrek/patterns/dashboard.md +1 -1
- package/src/teamix-evo-design-opentrek/patterns/detail-page.md +9 -9
- package/src/teamix-evo-design-opentrek/patterns/form-page.md +6 -6
- package/src/teamix-evo-design-opentrek/patterns/list-page.md +9 -9
- package/src/teamix-evo-design-opentrek/patterns/page-types.md +3 -3
- package/src/teamix-evo-design-opentrek/principles.md +541 -0
- package/src/teamix-evo-design-opentrek/rules/common-components.json +206 -76
- package/src/teamix-evo-design-opentrek/rules/component-specs.json +2 -2
- package/src/teamix-evo-design-opentrek/rules/design-tokens.css +223 -218
- package/src/teamix-evo-design-opentrek/rules/design-tokens.json +10 -32
- package/src/teamix-evo-design-opentrek/rules/page-frame.json +197 -193
- package/src/teamix-evo-design-opentrek/{generation-flow.md → workflow.md} +141 -22
- package/src/teamix-evo-design-uni-manager/SKILL.md +30 -6
- package/src/teamix-evo-design-uni-manager/boundaries.md +2 -2
- package/src/teamix-evo-design-uni-manager/brand.md +1 -1
- package/src/teamix-evo-design-uni-manager/checklist.md +2 -2
- package/src/teamix-evo-design-uni-manager/components.md +11 -11
- package/src/teamix-evo-design-uni-manager/foundations.md +7 -7
- package/src/teamix-evo-design-uni-manager/generation-flow.md +3 -3
- package/src/teamix-evo-manage/SKILL.md +111 -709
- package/src/teamix-evo-manage/init.md +98 -0
- package/src/teamix-evo-manage/migrate.md +100 -0
- package/src/teamix-evo-manage/rearchitect-capture-guide.md +174 -0
- package/src/teamix-evo-manage/rearchitect.md +373 -0
- package/src/teamix-evo-manage/update-component-staging.md +188 -0
- package/src/teamix-evo-manage/update-token-rename.md +126 -0
- package/src/teamix-evo-manage/update-token-treatment.md +116 -0
- package/src/teamix-evo-manage/update.md +213 -0
- package/src/teamix-evo-design-opentrek/brand.md +0 -154
- package/src/teamix-evo-design-opentrek/pages/list-page/_shared/search-combo-spec.md +0 -194
- package/src/teamix-evo-design-opentrek/philosophy.md +0 -98
- package/src/teamix-evo-design-opentrek/rules/README.md +0 -39
- package/src/teamix-evo-design-opentrek/rules/_assets/OP_AGENT RUNTIME.svg +0 -1
- package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI GATEWAY.svg +0 -1
- package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI STUDIO.svg +0 -1
- package/src/teamix-evo-design-opentrek/rules/_assets/OP_DEV-2.svg +0 -1
- package/src/teamix-evo-design-opentrek/rules/_assets/OP_LOGO.svg +0 -1
- package/src/teamix-evo-design-opentrek/rules/_assets/OP_OPS.svg +0 -1
- package/src/teamix-evo-design-opentrek/rules/layout-rules.json +0 -218
- package/src/teamix-evo-design-opentrek/rules/page-header-spec.md +0 -123
- package/src/teamix-evo-design-opentrek/rules/sidebar-spec.md +0 -217
- package/src/teamix-evo-upgrade/SKILL.md +0 -431
- /package/src/teamix-evo-design-opentrek/{rules/boundaries.rules.json → boundaries.json} +0 -0
|
@@ -27,11 +27,11 @@ description: >
|
|
|
27
27
|
| 子类型ID | 识别关键词 | 路由到 | 布局模式 | 核心组件 |
|
|
28
28
|
|----------|-----------|--------|----------|----------|
|
|
29
29
|
| standard | "列表"/"表格"/"查询" | → `patterns/standard-list.md`;OpenTrek 业务规则 → `patterns/standard-list-opentrek.md` | 模式D | DataTable + Pagination |
|
|
30
|
-
| l2-sidebar | "分类"/"分组"/"左侧树" | → 本文件 §8.1 | 模式D +
|
|
30
|
+
| l2-sidebar | "分类"/"分组"/"左侧树" | → 本文件 §8.1 | 模式D + OpSidebar | OpSidebar(240px) + DataTable |
|
|
31
31
|
| expandable | "展开"/"子项"/"详情" | → 本文件 §8.2 | 模式D | DataTable(行内展开) |
|
|
32
32
|
| drawer | "弹窗列表"/"选择器" | → 本文件 §8.3 | 模式D (Sheet内) | DataTable ⊂ Sheet |
|
|
33
33
|
| **pure-card** | "纯卡片"/"卡片管理"/"智能体列表" | → `patterns/card-list.md` | 模式A-CARD | CardGrid + ItemCard + CardActionBar |
|
|
34
|
-
| **standard-card** | "卡片列表"/"分类卡片"/"资源卡片" | → `patterns/card-list.md` | 模式D-CARD (TWO_COL) |
|
|
34
|
+
| **standard-card** | "卡片列表"/"分类卡片"/"资源卡片" | → `patterns/card-list.md` | 模式D-CARD (TWO_COL) | OpSidebar + CardGrid + ItemCard + CardActionBar |
|
|
35
35
|
| **view-toggle** | "视图切换"/"列表卡片切换" | → `patterns/card-list.md` | 模式D + ViewToggle | ViewToggle + CardGrid/DataTable + ItemCard(tile) |
|
|
36
36
|
| advanced-filter | "高级筛选"/"更多条件" | → 本文件 §8.4 | 模式D+ | AdvancedFilterPanel + DataTable |
|
|
37
37
|
|
|
@@ -56,11 +56,11 @@ description: >
|
|
|
56
56
|
| 属性 | 值 | 说明 |
|
|
57
57
|
|------|-----|------|
|
|
58
58
|
| layout.type | TWO_COL / SINGLE_COL | 见 `rules/page-frame.json` layoutSelectionRules |
|
|
59
|
-
| layout.frame | L1 | 列表页为 L1 级页面,自动继承
|
|
59
|
+
| layout.frame | L1 | 列表页为 L1 级页面,自动继承 OpSidebar(含Logo+产品名)。无面包屑。 |
|
|
60
60
|
| responsive | Desktop ≥1200px(完整), Tablet 768-1199px(横滚), Mobile <768px(不推荐) |
|
|
61
61
|
| pagination.default | 标准列表 10 条/页, 纯卡片 12 条/页 |
|
|
62
62
|
|
|
63
|
-
> **框架组件自动继承**:
|
|
63
|
+
> **框架组件自动继承**:OpSidebar 的存在性由 `rules/page-frame.json` 统一管理,子技能只定义内容区组件。L1 级页面自动包含:OpSidebar(顶部Logo+产品名),无面包屑。
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
@@ -74,7 +74,7 @@ description: >
|
|
|
74
74
|
| ActionToolbar | — | ORGANISM | top | 操作工具栏,单行 flex(flex-wrap:nowrap),左侧创建按钮 + 右侧搜索工具 |
|
|
75
75
|
| Pagination | — | MOLECULAR | bottom | 分页控件 |
|
|
76
76
|
|
|
77
|
-
> **框架级组件**(自动继承,无需在此声明):
|
|
77
|
+
> **框架级组件**(自动继承,无需在此声明):OpSidebar 由 `rules/page-frame.json` 统一管理,L1 级页面自动包含。
|
|
78
78
|
> 注:DataTable 为 standard/l2/expandable/drawer/view-toggle 的必需组件;CardGrid 为 standard-card/pure-card/view-toggle 的必需组件。
|
|
79
79
|
|
|
80
80
|
### 禁止组件
|
|
@@ -83,7 +83,7 @@ description: >
|
|
|
83
83
|
|------|------|------|
|
|
84
84
|
| Form(ORGANISM) | 禁止直接出现在内容区 | 表单应通过 Dialog/Sheet/FormPage 触发 |
|
|
85
85
|
| Chart(ORGANISM) | 禁止出现在标准列表页 | 图表属于 Dashboard |
|
|
86
|
-
| PageContainer | 禁止嵌套 | 见 `rules/
|
|
86
|
+
| PageContainer / OpPageContainer | 禁止嵌套 | 见 `rules/page-frame.json` |
|
|
87
87
|
| 内联编辑 | 禁止 | 编辑应通过 Sheet/Dialog/FormPage |
|
|
88
88
|
| 拖拽排序 | 禁止 | 表格数据为服务端排序 |
|
|
89
89
|
| 无限滚动 | 禁止 | B2B 管理场景需精确分页 |
|
|
@@ -104,7 +104,7 @@ description: >
|
|
|
104
104
|
|
|
105
105
|
> 注意:Table 首列内容 X = Card 外缘 + 40px,与 PageHeader / ActionToolbar / Pagination 起始线**不对齐**(这是设计预期)。
|
|
106
106
|
|
|
107
|
-
Card 白卡容器:`padding: 0 var(--card-padding-x)` (上下 0 / 左右 20px)。注意:`--card-padding-x` (20px) 独立于
|
|
107
|
+
Card 白卡容器:`padding: 0 var(--card-padding-x)` (上下 0 / 左右 20px)。注意:`--card-padding-x` (20px) 独立于 OpPageContainer 外层间距(py-5 pr-5,各 20px)。OpenTrek 使用 `OpPageContainer`(`components/business/op-page-container`)内置白卡替代手动 Card 包裹。
|
|
108
108
|
|
|
109
109
|
| 组件 | 水平 padding | 起始线 X 坐标 | 说明 |
|
|
110
110
|
|------|---------------|-----------------|------|
|
|
@@ -159,9 +159,9 @@ Card 白卡容器:`padding: 0 var(--card-padding-x)` (上下 0 / 左右 20px
|
|
|
159
159
|
|
|
160
160
|
---
|
|
161
161
|
|
|
162
|
-
## 5.2 ContentCard 表面规则 v7.6【硬约束】
|
|
162
|
+
## 5.2 ContentCard / OpPageContainer 表面规则 v7.6【硬约束】
|
|
163
163
|
|
|
164
|
-
内容区大卡片容器(
|
|
164
|
+
内容区大卡片容器(OpPageContainer 内置白卡)表面规则:
|
|
165
165
|
|
|
166
166
|
| 属性 | v7.5 及之前 | **v7.6(当前)** |
|
|
167
167
|
|------|-------------|----------------|
|
|
@@ -205,24 +205,23 @@ Card 白卡容器:`padding: 0 var(--card-padding-x)` (上下 0 / 左右 20px
|
|
|
205
205
|
|
|
206
206
|
| 父子关系 | 状态 | 说明 |
|
|
207
207
|
|----------|------|------|
|
|
208
|
-
|
|
|
209
|
-
|
|
|
210
|
-
|
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
217
|
-
|
|
|
218
|
-
| Card(白卡容器) → Card(白卡容器) | FORBID | 白卡容器为单例,禁止嵌套 |
|
|
208
|
+
| PageShell → OpSidebar + OpPageContainer | ALLOW | OpenTrek 标准页面框架(必需) |
|
|
209
|
+
| OpPageContainer → PageHeader | ALLOW | 标准结构(header slot) |
|
|
210
|
+
| OpPageContainer → ActionToolbar | ALLOW | 操作工具栏(children) |
|
|
211
|
+
| OpPageContainer → DataTable | ALLOW | 核心组件 |
|
|
212
|
+
| OpPageContainer → CardGrid | ALLOW | 卡片列表 |
|
|
213
|
+
| OpPageContainer → ViewToggle | ALLOW | 视图切换 |
|
|
214
|
+
| OpPageContainer → AdvancedFilterPanel | ALLOW | 高级筛选面板 |
|
|
215
|
+
| OpPageContainer → Pagination | ALLOW | 分页控件 |
|
|
216
|
+
| 跳过 OpPageContainer 直接挂载业务组件 | FORBID | 业务组件必须经过 OpPageContainer 包裹 |
|
|
217
|
+
| OpPageContainer → OpPageContainer | FORBID | 页面容器为单例,禁止嵌套 |
|
|
219
218
|
| ActionToolbar → SearchCombo | ALLOW | 搜索组合 |
|
|
220
219
|
| CardGrid → ItemCard | ALLOW | 业务卡片(v7.3 起详见 `patterns/card-list.md` §9.1) |
|
|
221
220
|
| ItemCard → CardActionBar | ALLOW | 卡片操作栏,三态:hover-slidebar / hover-fade / always-visible(v7.3 详见 `patterns/card-list.md` §9.3) |
|
|
222
221
|
| DataTable → Pagination | ALLOW | 分页控件 |
|
|
223
222
|
| DataTable → Dialog | WARN | 确认弹窗由全局状态管理 |
|
|
224
223
|
| DataTable → Form | FORBID | 表格内不应直接嵌套完整表单 |
|
|
225
|
-
|
|
|
224
|
+
| OpSidebar → DescriptionList | FORBID | 描述列表不应嵌套在侧边栏 |
|
|
226
225
|
|
|
227
226
|
---
|
|
228
227
|
|
|
@@ -342,14 +341,14 @@ pointer-events: none;
|
|
|
342
341
|
|
|
343
342
|
### 8.1 L2 导航列表 (l2-sidebar)
|
|
344
343
|
|
|
345
|
-
> 布局模式: 模式D +
|
|
344
|
+
> 布局模式: 模式D + OpSidebar(TWO_COL) | 核心差异: 左侧 240px 分类导航 + 右侧标准列表
|
|
346
345
|
|
|
347
346
|
#### 布局骨架
|
|
348
347
|
|
|
349
348
|
```
|
|
350
349
|
┌──────────┬──────────────────────────────────────────────┤
|
|
351
350
|
│ │ PageHeader + ActionToolbar + DataTable │
|
|
352
|
-
│
|
|
351
|
+
│ OpSidebar │ + BulkActionBar + Pagination │
|
|
353
352
|
│ (240px) │ (同标准列表页完整结构) │
|
|
354
353
|
│ │ │
|
|
355
354
|
│ [分类A] │ │
|
|
@@ -365,17 +364,17 @@ pointer-events: none;
|
|
|
365
364
|
| 维度 | 标准列表 | L2 导航列表 |
|
|
366
365
|
|------|----------|-------------|
|
|
367
366
|
| 布局 | SINGLE_COL / TWO_COL | **TWO_COL** |
|
|
368
|
-
|
|
|
367
|
+
| OpSidebar | 可选 | **必需** |
|
|
369
368
|
|
|
370
|
-
>
|
|
369
|
+
> OpSidebar 收起/展开、交互规范、色彩全部引用 `rules/design-tokens.json` sidebarRules。
|
|
371
370
|
|
|
372
|
-
####
|
|
371
|
+
#### OpSidebar 交互规范
|
|
373
372
|
|
|
374
373
|
| 交互 | 行为 |
|
|
375
374
|
|------|------|
|
|
376
375
|
| 点击分类 | 刷新右侧列表数据,保持当前页码 |
|
|
377
376
|
| 展开/收起 | 切换子分类列表,动画过渡 |
|
|
378
|
-
| 收起
|
|
377
|
+
| 收起 OpSidebar | 宽度缩至 68px,仅显示图标 |
|
|
379
378
|
| 选中态 | 灰色背景 `var(--sidebar-active)` |
|
|
380
379
|
| 手风琴 | 打开一个分组自动关闭其他分组 |
|
|
381
380
|
| 收起态 Tooltip | Hover 显示节点名称 |
|
|
@@ -388,7 +387,7 @@ pointer-events: none;
|
|
|
388
387
|
|
|
389
388
|
| 验证项 | 检查点 | 目标 |
|
|
390
389
|
|--------|--------|------|
|
|
391
|
-
|
|
|
390
|
+
| OpSidebar 规格 | 展开240px / 收起68px | 正确 |
|
|
392
391
|
| 分类选中态 | 灰色背景 `var(--sidebar-active)` | 正确 |
|
|
393
392
|
| 分类切换 | 右侧列表刷新 | 正确 |
|
|
394
393
|
| 计数徽章 | 每项右侧灰色 12px | 正确 |
|
|
@@ -480,7 +479,7 @@ pointer-events: none;
|
|
|
480
479
|
|
|
481
480
|
| 维度 | 标准列表 | 抽屉中列表 |
|
|
482
481
|
|------|----------|-----------|
|
|
483
|
-
| 容器 |
|
|
482
|
+
| 容器 | OpPageContainer | **Sheet** |
|
|
484
483
|
| 触发方式 | 直接访问 URL | **点击按钮/链接打开 Sheet** |
|
|
485
484
|
| 选择返回 | 跳转页面 | **选择后点击确定关闭 Sheet,返回选中数据** |
|
|
486
485
|
| 宽度 | 全宽/自适应 | **固定宽度 (600-900px)** |
|
|
@@ -521,7 +520,7 @@ pointer-events: none;
|
|
|
521
520
|
|
|
522
521
|
```
|
|
523
522
|
┌──────────┬──────────────────────────────────────────────┤
|
|
524
|
-
│
|
|
523
|
+
│ OpSidebar │ PageHeader: 标题(18px/medium) │
|
|
525
524
|
│ │ ActionToolbar: [创建] + [搜索🔍] [高级筛选▾] │
|
|
526
525
|
│ │ ┌─── AdvancedFilterPanel ───────────────┐ │
|
|
527
526
|
│ │ │ 条件1: [Select] [Input] │ │
|
|
@@ -562,11 +561,11 @@ pointer-events: none;
|
|
|
562
561
|
- 筛选条件清空后,FilterTag 区域隐藏(display: none)
|
|
563
562
|
- 支持"清空全部"操作
|
|
564
563
|
|
|
565
|
-
#### 与
|
|
564
|
+
#### 与 OpPageContainer 模式对照
|
|
566
565
|
|
|
567
566
|
高级筛选列表使用 **模式D+**:
|
|
568
567
|
```
|
|
569
|
-
|
|
568
|
+
PageShell → OpSidebar + OpPageContainer → PageHeader + ActionToolbar + AdvancedFilterPanel(可展开) + DataTable + BulkActionBar + Pagination
|
|
570
569
|
```
|
|
571
570
|
|
|
572
571
|
#### 验证差异项
|
|
@@ -588,7 +587,7 @@ PageContainer → ContentWrapper → PageHeader + ActionToolbar + AdvancedFilter
|
|
|
588
587
|
| 共享规则 | 路径 | 被引用子类型 |
|
|
589
588
|
|----------|------|-------------|
|
|
590
589
|
| 表格列元规则 | `_shared/column-meta-rules.md` | standard, l2-sidebar, expandable, drawer, view-toggle(列表视图) |
|
|
591
|
-
| SearchCombo 规范 | `
|
|
590
|
+
| SearchCombo 规范 | `rules/common-components.json` → SearchCombo | 全部子类型 |
|
|
592
591
|
| 业务卡片三件套规格 | `_shared/item-card-spec.md` | pure-card, standard-card, view-toggle |
|
|
593
592
|
|
|
594
593
|
> v7.9 变更:操作列规范(原 `_shared/action-column-spec.md`)和状态-操作模式(原 `_shared/state-action-pattern.md`)已合并到本文件 §6、§7。
|
|
@@ -619,7 +618,7 @@ PageContainer → ContentWrapper → PageHeader + ActionToolbar + AdvancedFilter
|
|
|
619
618
|
|
|
620
619
|
- **读取路径**:见根技能 `../../SKILL.md` §4.5 四阶段读取决策树
|
|
621
620
|
- 阶段①:`page-types.json` + `business-mapping.json`
|
|
622
|
-
- 阶段②:`page-frame.json` + `
|
|
621
|
+
- 阶段②:`page-frame.json` + `page-flow.json` + `common-components.json`(SearchCombo);卡片子类型追加读取 `patterns/card-list.md`;OpenTrek 标准列表追加读取 `patterns/standard-list-opentrek.md`
|
|
623
622
|
- 阶段②.5:`products/{产品}/columns.json` + `states.json`
|
|
624
623
|
- 阶段③(生成 HTML 时):`design-tokens.json` + `design-tokens.css` + `styling.json` + `../../boundaries.md` + `../../foundations.md`
|
|
625
624
|
|
|
@@ -635,8 +634,8 @@ PageContainer → ContentWrapper → PageHeader + ActionToolbar + AdvancedFilter
|
|
|
635
634
|
|
|
636
635
|
| 检查项 | 检查点 | 目标 |
|
|
637
636
|
|--------|--------|------|
|
|
638
|
-
| 嵌套结构 |
|
|
639
|
-
| Card 内左右对齐 | 非 Table 组件 padding = 0(由
|
|
637
|
+
| 嵌套结构 | PageShell → OpSidebar + OpPageContainer → PageHeader/ActionToolbar/DataTable/Pagination | 100% |
|
|
638
|
+
| Card 内左右对齐 | 非 Table 组件 padding = 0(由 OpPageContainer 内白卡 p-6 提供);Table 首末列 paddingX = 20px | 100% |
|
|
640
639
|
| 必需组件 | PageHeader、ActionToolbar、Pagination + 子类型组件 | 100% |
|
|
641
640
|
| 禁止组件 | 无内联编辑、拖拽排序、无限滚动、悬浮操作栏、右键菜单 | 0 个 |
|
|
642
641
|
| 操作可用性 | 状态-操作矩阵匹配(§7) | 所有状态正确 |
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# 业务卡片三件套完整规格(ItemCard / CardGrid / CardActionBar)
|
|
2
2
|
|
|
3
|
+
> **实物组件**: `@teamix-evo/biz-ui` → [`ListCard`](../../../../../../biz-ui/variants/opentrek/list-card/list-card.tsx)
|
|
4
|
+
> AI 生成页面时**必须优先使用 ListCard 组件**(P0 业务组件),仅当 ListCard props 无法覆盖需求时才按本 spec 用原子件拼装(P2 兜底)。
|
|
5
|
+
|
|
3
6
|
> 本文件自 v7.3 起从 `rules/card-component.json` 下沉至此。`common-components.json` 中 ItemCard/CardGrid/CardActionBar 的 `specRef` 指向本文件。
|
|
4
7
|
> 三件套用于列表页卡片视图;未来如 Dashboard / Workspace / Overview 需要复用,可直接引用本文件。
|
|
5
8
|
> **规范唯一来源** — 禁止在其他文件中重复定义卡片三件套的 variants/slots/states/tokens。
|
|
@@ -18,14 +21,14 @@
|
|
|
18
21
|
| 维度 | 选项 | 默认 | 说明 |
|
|
19
22
|
|------|------|------|------|
|
|
20
23
|
| density | minimal / standard / complex | standard | 信息密度,按选型矩阵决定 |
|
|
21
|
-
| iconStyle | avatar / tile | avatar | avatar=
|
|
24
|
+
| iconStyle | avatar / tile | avatar | avatar=28×28 圆角(pure-card / standard-card);tile=40×40 大方块(view-toggle) |
|
|
22
25
|
| titleFontSize | 14px / 16px | — | iconStyle=avatar → 14px/500;iconStyle=tile → 16px/500 |
|
|
23
26
|
|
|
24
27
|
**iconStyle.avatar 详细**:
|
|
25
|
-
- size:
|
|
26
|
-
- shape: 圆角矩形 `var(--
|
|
28
|
+
- size: 28×28(常规/复杂)/ 24×24(极简)
|
|
29
|
+
- shape: 圆角矩形 `var(--radius-md)` (8px)
|
|
27
30
|
- fallback: 首字母色块 + Glossy 光泽(见 §1.6)
|
|
28
|
-
- **UI 组件库引用**: `components/avatar` → `Avatar` (size='default'=
|
|
31
|
+
- **UI 组件库引用**: `components/avatar` → `Avatar` (size='default'=28px / size='sm'=24px) + `AvatarFallback`
|
|
29
32
|
|
|
30
33
|
**iconStyle.tile 详细**:
|
|
31
34
|
- size: 40×40
|
|
@@ -38,15 +41,15 @@
|
|
|
38
41
|
| Slot | minimal | standard | complex | 元素与样式 | UI 组件库引用 |
|
|
39
42
|
|------|---------|----------|---------|-----------|--------------|
|
|
40
43
|
| **CardTitleRow** | 必需 | 必需 | 必需 | icon + title + [badge] + [statusDot] | `Avatar` + `CardTitle` + `Badge` / `Tag` |
|
|
41
|
-
| **CardDescriptionRow** | 禁止 | 必需 | 必需 | text(standard: 12px/lineClamp 1;complex: 14px/lineClamp 2);color: `var(--
|
|
44
|
+
| **CardDescriptionRow** | 禁止 | 必需 | 必需 | text(standard: 12px/lineClamp 1;complex: 14px/lineClamp 2);color: `var(--muted-foreground)` | `CardDescription` |
|
|
42
45
|
| **CardFieldRow** | 禁止 | 0-2 行(可选) | 2-4 行(可选) | fieldIcon(12×12) + fieldLabel(12px) + fieldValue(14px standard / 12px complex) | 内联 span 元素 |
|
|
43
46
|
| **CardSupplementaryRow** | 1 行(必需) | 0-1 行(可选) | 1 行(必需) | 元信息:创建人/时间/地域;icon(12×12) + label(12px) + value(12px) | 内联 span + `Tooltip` |
|
|
44
47
|
| **CardActionBar** | 必需 | 必需 | 必需 | 通过 slot 引用(见 §3) | 组合组件 |
|
|
45
48
|
|
|
46
49
|
**CardTitleRow 元素**:
|
|
47
|
-
- icon: minimal=24×24;standard=Avatar
|
|
50
|
+
- icon: minimal=24×24;standard=Avatar 28×28(avatar) / Icon 40×40(tile);complex=Avatar 28×28;borderRadius `var(--radius-md)`;flex-shrink 0
|
|
48
51
|
- **UI 组件库引用**: `components/avatar` → `Avatar` + `AvatarFallback`
|
|
49
|
-
- title: 由 variants.titleFontSize 决定;font-weight 500;color `var(--
|
|
52
|
+
- title: 由 variants.titleFontSize 决定;font-weight 500;color `var(--foreground)`;单行 truncate
|
|
50
53
|
- **UI 组件库引用**: `components/card` → `CardTitle`
|
|
51
54
|
- **subName**(可选): 12px / 400 / `var(--gray-tertiary)`;margin-top 2px 紧贴 title 下方;用于英文标识(如 "code-generator"/"self-improvement")
|
|
52
55
|
- **UI 组件库引用**: 原生 `<span>` 或 `components/typography` → `Text`
|
|
@@ -74,8 +77,8 @@
|
|
|
74
77
|
**CardFieldRow 元素与行内状态指示器**:
|
|
75
78
|
- fieldIcon(可选): 12-14px inline icon;color `var(--gray-tertiary)`
|
|
76
79
|
- **UI 组件库引用**: lucide-react 图标(12px size)
|
|
77
|
-
- fieldLabel: 12px / `var(--
|
|
78
|
-
- fieldValue: 12px / `var(--
|
|
80
|
+
- fieldLabel: 12px / `var(--muted-foreground)` / 后跟中文冒号 ":"
|
|
81
|
+
- fieldValue: 12px / `var(--muted-foreground)`(纯文本)
|
|
79
82
|
- **inlineStatus**(可选,替代 fieldValue): 带色彩和图标的状态值
|
|
80
83
|
- **UI 组件库引用**: `components/tag` → `Tag` (variant='borderless', size='sm') 或内联 span
|
|
81
84
|
|
|
@@ -92,8 +95,8 @@
|
|
|
92
95
|
```css
|
|
93
96
|
/* CardFieldRow inline-status */
|
|
94
97
|
.field-row { display: flex; align-items: center; gap: 4px; font-size: 12px; }
|
|
95
|
-
.field-row__label { color: var(--
|
|
96
|
-
.field-row__value { color: var(--
|
|
98
|
+
.field-row__label { color: var(--muted-foreground); white-space: nowrap; }
|
|
99
|
+
.field-row__value { color: var(--muted-foreground); }
|
|
97
100
|
.field-row__status { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
|
|
98
101
|
.field-row__status--success { color: var(--success); }
|
|
99
102
|
.field-row__status--warning { color: var(--warning); }
|
|
@@ -118,20 +121,21 @@
|
|
|
118
121
|
|
|
119
122
|
### 1.5 states(卡片整体状态)
|
|
120
123
|
|
|
124
|
+
> ⚠️ 已与 `ListCard` 实物组件对齐(v7.5+),hover 为渐变边框非 breathing 动画。
|
|
125
|
+
|
|
121
126
|
| state | border | background | shadow | actionBar |
|
|
122
127
|
|-------|--------|------------|--------|-----------|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
128
|
+
| idle | 1px solid `var(--gray-border)` | `var(--card)` | none | 由 footerMode 决定 |
|
|
129
|
+
| hovered | 渐变 primary 边框 `bg-gradient-to-r from-primary/60 to-primary` + padding-border 技巧 | `var(--card)` | `shadow-[0_4px_8px_0_rgba(0,0,0,0.08)]` | 可见 |
|
|
130
|
+
| selected | outline 2px solid `var(--primary)` | `var(--card)` | none | 隐藏 |
|
|
126
131
|
| disabled | 1px solid `var(--gray-border)` | `var(--gray-fill)` | none | 隐藏 |
|
|
127
|
-
| **selected** | **2px solid `var(--primary)`** | **`var(--card)`** | **none** | 隐藏 |
|
|
128
132
|
|
|
129
|
-
**
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
**hovered 边框实现**(ListCard 渐变边框方案):
|
|
134
|
+
```html
|
|
135
|
+
<div class="rounded-xl bg-gradient-to-r from-primary/60 to-primary p-px">
|
|
136
|
+
<div class="rounded-[calc(var(--radius-xl)-1px)] bg-card ...">内容</div>
|
|
137
|
+
</div>
|
|
133
138
|
```
|
|
134
|
-
应用在 hover 状态下的 border。
|
|
135
139
|
|
|
136
140
|
**clickBehavior**:
|
|
137
141
|
- 卡片主体点击:跳转 DetailPage 或进入编辑
|
|
@@ -149,11 +153,11 @@
|
|
|
149
153
|
3. avatar 字段为空 → `name.charAt(0)` hash 到预设色 + 首字母 → 使用 `AvatarFallback`
|
|
150
154
|
|
|
151
155
|
**blockStyle**:
|
|
152
|
-
- size:
|
|
153
|
-
- borderRadius: `var(--
|
|
156
|
+
- size: 28×28 (h-7 w-7)
|
|
157
|
+
- borderRadius: `var(--radius-md)` (8px / rounded-md)
|
|
154
158
|
- textColor: `#fff`
|
|
155
159
|
- fontWeight: 600
|
|
156
|
-
- fontSize:
|
|
160
|
+
- fontSize: 13px
|
|
157
161
|
- content: `name.charAt(0).toUpperCase()`
|
|
158
162
|
|
|
159
163
|
**glossy 光泽 CSS**(色块右侧叠加半透明白色渐变):
|
|
@@ -178,17 +182,19 @@
|
|
|
178
182
|
|
|
179
183
|
### 1.8 tokens(设计 token 映射)
|
|
180
184
|
|
|
185
|
+
> ⚠️ 以下值已与 `ListCard` 实物组件对齐(v7.5+)。
|
|
186
|
+
|
|
181
187
|
| 用途 | token |
|
|
182
188
|
|------|-------|
|
|
183
189
|
| background | `--card` |
|
|
184
|
-
| border | `--gray-border` |
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
| iconRadius | `--
|
|
189
|
-
| titleColor | `--
|
|
190
|
-
| fieldColor | `--
|
|
191
|
-
| descColor | `--
|
|
190
|
+
| border | `--gray-border`(idle)/ 渐变 primary(hovered)/ `outline 2px --primary`(selected) |
|
|
191
|
+
| shadowHover | `shadow-[0_4px_8px_0_rgba(0,0,0,0.08)]` |
|
|
192
|
+
| radius | `--radius-xl` (16px / rounded-xl) |
|
|
193
|
+
| iconSize | 28×28 (h-7 w-7) |
|
|
194
|
+
| iconRadius | `--radius-md` (8px / rounded-md) |
|
|
195
|
+
| titleColor | `--foreground` (text-foreground) |
|
|
196
|
+
| fieldColor | `--muted-foreground` |
|
|
197
|
+
| descColor | `--muted-foreground` |
|
|
192
198
|
| disabledBg | `--gray-fill` |
|
|
193
199
|
| transitionDuration | `--duration-normal` (200ms) |
|
|
194
200
|
| transitionEasing | `--easing-ease` |
|
|
@@ -255,10 +261,13 @@
|
|
|
255
261
|
|
|
256
262
|
## 3. CardActionBar(卡片操作栏)
|
|
257
263
|
|
|
264
|
+
> ⚠️ ListCard 实物组件中操作栏使用 `ButtonGroup` + `variant="link"` 按钮实现(非 slidebar),且通过 `footerMode` 控制显隐。以下规格保留 spec 原始设计意图供 P2 兜底拼装参考。
|
|
265
|
+
|
|
258
266
|
- **level**: MOLECULAR
|
|
259
267
|
- **layer**: business
|
|
260
268
|
- **shadcnImpl**: null
|
|
261
|
-
- **
|
|
269
|
+
- **ListCard 实现**: `ButtonGroup` + `Button variant="link" size="sm"`,间隔由 ButtonGroup 自带 gap 管理,无 border-right 分隔
|
|
270
|
+
- **P2 拼装引用**: 组合使用 `components/button` → `Button` (variant='ghost', size='sm') + `components/separator` → `Separator`(按钮间分隔)
|
|
262
271
|
- **场景**:ItemCard 底部的操作栏 — 滑条式 (SlideBar) 设计,白底 + 主要文字色 + 等分宽度(v7.3.1 从主色底调整为白底以提升可读性与表单化一致性)。
|
|
263
272
|
|
|
264
273
|
### 3.1 props
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
┌─ PageShell (components/page-shell) ──────────────────────────────────────┐
|
|
28
|
-
│ sidebar:
|
|
28
|
+
│ sidebar: OpSidebar (components/business/op-sidebar) │
|
|
29
29
|
│ children: │
|
|
30
|
-
│ ┌─
|
|
30
|
+
│ ┌─ OpPageContainer (components/business/op-page-container) ─────────┐ │
|
|
31
31
|
│ │ PageHeader (components/page-header → PageHeader + PageHeaderHeading)│ │
|
|
32
32
|
│ │ 标题: "评估器" / "知识库" / "Skills Hub" / "智能体" │ │
|
|
33
33
|
│ │ │ │
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
| 区域 | UI 组件库引用 | 用途 | 必需 |
|
|
75
75
|
|------|--------------|------|------|
|
|
76
76
|
| 页面框架 | `components/page-shell` → `PageShell` | L1 级页面壳,sidebar + children | ✅ |
|
|
77
|
-
| 侧边导航 | `components/sidebar` → `
|
|
78
|
-
|
|
|
77
|
+
| 侧边导航 | `components/business/op-sidebar` → `OpSidebar` | 左侧导航(OpenTrek 整装侧边栏) | ✅ (TWO_COL) |
|
|
78
|
+
| 页面容器 | `components/business/op-page-container` → `OpPageContainer` | 灰底 + 白卡容器 | ✅ |
|
|
79
79
|
| 页面标题 | `components/page-header` → `PageHeader` + `PageHeaderHeading` | 标题 18px/500 | ✅ |
|
|
80
80
|
| Tab 切换 | `components/tabs` → `Tabs` + `TabsList`(variant='line') + `TabsTrigger` + `TabsContent` | 子视图切换 | ✅ |
|
|
81
81
|
| 主操作按钮 | `components/button` → `Button`(variant='default', color='primary') | "+ 新建XXX" | ✅ |
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
| 筛选标签 | `components/tag` → `CheckableTag` + `CheckableTagGroup` | 多分类筛选 | 可选 |
|
|
86
86
|
| 下拉筛选 | `components/select` → `Select` + `SelectTrigger` + `SelectContent` + `SelectItem` | 下拉选择 "全部 ▼" | 可选 |
|
|
87
87
|
| 卡片网格 | CSS Grid (item-card-spec §2) | 承载 ItemCard | ✅ |
|
|
88
|
-
| 业务卡片 | `components/card` → `
|
|
88
|
+
| 业务卡片 | `components/business/list-card` → `ListCard` | 单个数据项卡片(三态边框 + hover 操作栏) | ✅ |
|
|
89
89
|
| 卡片头像 | `components/avatar` → `Avatar` + `AvatarFallback` | 首字母色块 / 图标 | ✅ |
|
|
90
90
|
| 状态标签 | `components/tag` → `Tag`(variant='status') | 启用/禁用/正常/有风险 | 按业务 |
|
|
91
91
|
| 版本标签 | `components/badge` → `Badge`(variant='secondary') | v1.0.0 等版本信息 | 按业务 |
|
|
@@ -267,9 +267,9 @@
|
|
|
267
267
|
|
|
268
268
|
```
|
|
269
269
|
┌─ PageShell (components/page-shell) ──────────────────────────────────────┐
|
|
270
|
-
│ sidebar:
|
|
270
|
+
│ sidebar: OpSidebar (components/business/op-sidebar) │
|
|
271
271
|
│ children: │
|
|
272
|
-
│ ┌─
|
|
272
|
+
│ ┌─ OpPageContainer (components/business/op-page-container) ─────────┐ │
|
|
273
273
|
│ │ Breadcrumb (components/breadcrumb → Breadcrumb + BreadcrumbItem): │ │
|
|
274
274
|
│ │ 记忆体 > 空间共用 │ │
|
|
275
275
|
│ │ │ │
|
|
@@ -345,9 +345,9 @@
|
|
|
345
345
|
|
|
346
346
|
```
|
|
347
347
|
┌─ PageShell (components/page-shell) ──────────────────────────────────────┐
|
|
348
|
-
│ sidebar:
|
|
348
|
+
│ sidebar: OpSidebar (components/business/op-sidebar) │
|
|
349
349
|
│ children: │
|
|
350
|
-
│ ┌─
|
|
350
|
+
│ ┌─ OpPageContainer (components/business/op-page-container) ─────────┐ │
|
|
351
351
|
│ │ PageHeader (components/page-header): │ │
|
|
352
352
|
│ │ 标题: "记忆体" │ │
|
|
353
353
|
│ │ │ │
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
|
|
382
382
|
## 5. ActionToolbar 组合规则
|
|
383
383
|
|
|
384
|
-
> 基于
|
|
384
|
+
> 基于 `common-components.json` → SearchCombo 通用规则,本节补充 OpenTrek 页面中 ActionToolbar 的实际组合方式。
|
|
385
385
|
|
|
386
386
|
### 5.1 DOM 结构
|
|
387
387
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> 路由自 `../SKILL.md`
|
|
4
4
|
> 覆盖三种卡片视图子类型:**pure-card** / **standard-card** / **view-toggle**
|
|
5
5
|
> 核心组件:**CardGrid** > **ItemCard** × N → **CardActionBar**
|
|
6
|
-
> 全局规则继承:[L1 框架](../../../rules/page-frame.json) / [
|
|
6
|
+
> 全局规则继承:[L1 框架](../../../rules/page-frame.json) / [CRUD 流转](../../../rules/page-flow.json) / SearchCombo(见 common-components.json)
|
|
7
7
|
> **业务卡片三件套(ItemCard/CardGrid/CardActionBar)完整规格** → [_shared/item-card-spec.md](../_shared/item-card-spec.md)
|
|
8
8
|
> **OpenTrek 业务页面组合规则** → [card-list-opentrek.md](./card-list-opentrek.md)
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
| 术语 | 定位 | 别名 | 规范来源 |
|
|
15
15
|
|------|------|------|------|
|
|
16
|
-
| **ContentCard** |
|
|
16
|
+
| **ContentCard** | 页面主内容**白色容器**(由 `OpPageContainer` 内置白卡承载),每页**单例** | 白卡容器 / OpPageContainer 内卡 | `components/business/op-page-container` |
|
|
17
17
|
| **ItemCard** | CardGrid 内的**单个数据项卡片**,可重复 N 次 | 业务卡片 / 卡片视图列表项 | [item-card-spec.md §1](../_shared/item-card-spec.md) |
|
|
18
18
|
|
|
19
19
|
> **规则**:本 pattern 及任何引用本 pattern 的文档,禁止只写 "Card",必须显式使用 `ContentCard` 或 `ItemCard` 区分。
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
| 触发关键词 | "纯卡片"/"卡片管理"/"智能体列表" | "卡片列表"/"分类卡片"/"资源卡片" | "视图切换"/"列表卡片切换" |
|
|
28
28
|
| layout.type | SINGLE_COL | TWO_COL | TWO_COL |
|
|
29
29
|
| layout 模式 | 模式A-CARD | 模式D-CARD | 模式D + ViewToggle |
|
|
30
|
-
|
|
|
30
|
+
| OpSidebar | 无 | **有 (240px)** | **有 (240px)** |
|
|
31
31
|
| ViewToggle (ToggleGroup 复用) | 无 | 无 | **必需,ActionToolbar 右侧 Tab 样式** |
|
|
32
32
|
| ItemCard.density | minimal / standard / complex(按信息量选) | 同 pure-card | 仅 **standard** |
|
|
33
33
|
| ItemCard.iconStyle | **avatar**(32×32 圆角) | **avatar** | **tile**(40×40 大方块) |
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
## 2. 通用布局骨架(三个子类型共享,差异仅
|
|
44
|
+
## 2. 通用布局骨架(三个子类型共享,差异仅 OpSidebar / ViewToggle)
|
|
45
45
|
|
|
46
46
|
```
|
|
47
|
-
┌─[
|
|
48
|
-
│ │
|
|
49
|
-
│ * pure-card 无 │ ┌─
|
|
47
|
+
┌─[OpSidebar]*──────┬─────────────────────────────────────────┤
|
|
48
|
+
│ │ OpPageContainer │
|
|
49
|
+
│ * pure-card 无 │ ┌─ 内置白卡 (bg-card rounded-2xl) ────┐ │
|
|
50
50
|
│ │ │ PageHeader (标题 18px/500) │ │
|
|
51
51
|
│ │ │ ActionToolbar: │ │
|
|
52
52
|
│ │ │ [创建] [导入] │ │
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
└────────────────────┴─────────────────────────────────────────┘
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
> Sidebar 由 [`page-frame.json`](../../../rules/page-frame.json) L1 自动继承(TWO_COL 显示 / SINGLE_COL 隐藏),本 pattern 不重复声明。
|
|
69
|
-
>
|
|
68
|
+
> Sidebar 由 [`page-frame.json`](../../../rules/page-frame.json) L1 自动继承(TWO_COL 显示 / SINGLE_COL 隐藏),本 pattern 不重复声明。OpenTrek 使用 `OpSidebar`(`components/business/op-sidebar`)。
|
|
69
|
+
> OpPageContainer 内白卡的 `p-6`(24px)统一提供内边距,对齐 [分层 padding 模型 v7.5](../SKILL.md#5-1-card-内左右对齐稳定规则硬约束)。
|
|
70
70
|
|
|
71
71
|
### 2.1 ActionToolbar 布局细则(截图实证补充)
|
|
72
72
|
|
|
@@ -100,14 +100,14 @@
|
|
|
100
100
|
|
|
101
101
|
| 组件 | 来源规范 | UI 组件库引用 | 子类型适用 |
|
|
102
102
|
|------|----------|--------------|------------|
|
|
103
|
-
| Sidebar | rules/page-frame.json (L1 框架自动继承) | `components/sidebar` | standard-card / view-toggle |
|
|
104
|
-
| ContentCard |
|
|
103
|
+
| Sidebar | rules/page-frame.json (L1 框架自动继承) | `components/business/op-sidebar` → `OpSidebar` | standard-card / view-toggle |
|
|
104
|
+
| ContentCard | OpPageContainer 内置白卡 | `components/business/op-page-container` → `OpPageContainer` | 全部 |
|
|
105
105
|
| PageHeader | rules/common-components.json | `components/page-header` → `PageHeader` + `PageHeaderHeading` | 全部 |
|
|
106
106
|
| ActionToolbar | — | 组合组件(见 [opentrek §5.2](./card-list-opentrek.md#52-组件引用清单)) | 全部 |
|
|
107
|
-
| SearchCombo |
|
|
107
|
+
| SearchCombo | common-components.json → SearchCombo | `components/input` → `Input` + `components/select` → `Select` | 全部 |
|
|
108
108
|
| ToggleGroup(胶囊筛选 / ViewToggle 复用) | rules/common-components.json | `components/toggle-group` → `ToggleGroup` + `ToggleGroupItem` | 全部 |
|
|
109
109
|
| **CardGrid** | [item-card-spec.md §2](../_shared/item-card-spec.md#2-cardgrid卡片网格) | CSS Grid 实现(无对应 UI 组件) | 全部 |
|
|
110
|
-
| **ItemCard** × N | [item-card-spec.md §1](../_shared/item-card-spec.md#1-itemcard业务卡片) | `components/card` → `
|
|
110
|
+
| **ItemCard** × N | [item-card-spec.md §1](../_shared/item-card-spec.md#1-itemcard业务卡片) | `components/business/list-card` → `ListCard` | 全部 |
|
|
111
111
|
| **CardActionBar** | [item-card-spec.md §3](../_shared/item-card-spec.md#3-cardactionbar卡片操作栏) | 组合组件 | 全部 |
|
|
112
112
|
| Pagination | rules/common-components.json | `components/pagination` → `Pagination` + 子组件 | 全部 |
|
|
113
113
|
| DataTable | _shared/column-meta-rules.md + action-column-spec.md | `components/data-table` | view-toggle 切换列表视图时 |
|
|
@@ -132,14 +132,13 @@
|
|
|
132
132
|
|
|
133
133
|
| 父子关系 | 状态 | 适用子类型 |
|
|
134
134
|
|----------|------|----------|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
| ContentCard → DataTable + BulkActionBar | ALLOW | view-toggle(与 CardGrid 同级,切换可见) |
|
|
135
|
+
| OpPageContainer → PageHeader / ActionToolbar / CardGrid / Pagination | ALLOW | 全部 |
|
|
136
|
+
| OpPageContainer → DataTable + BulkActionBar | ALLOW | view-toggle(与 CardGrid 同级,切换可见) |
|
|
138
137
|
| ActionToolbar → SearchCombo / ToggleGroup / ViewToggle | ALLOW | 全部(ViewToggle 仅 view-toggle) |
|
|
139
|
-
| **CardGrid → ItemCard** | ALLOW | 全部 |
|
|
138
|
+
| **CardGrid → ItemCard (ListCard)** | ALLOW | 全部 |
|
|
140
139
|
| **ItemCard → CardActionBar** | ALLOW(slot 引用) | 全部 |
|
|
141
|
-
|
|
|
142
|
-
|
|
|
140
|
+
| OpPageContainer 外直挂 CardGrid | FORBID | 必须经 OpPageContainer 包裹 |
|
|
141
|
+
| OpPageContainer → OpPageContainer | FORBID | 页面容器为单例 |
|
|
143
142
|
| ItemCard → ItemCard | FORBID | 业务卡片禁止嵌套 |
|
|
144
143
|
| CardGrid → 任何非 ItemCard 子节点 | FORBID | Grid 仅承载业务卡片 |
|
|
145
144
|
|
|
@@ -171,13 +170,13 @@
|
|
|
171
170
|
- [ ] CardActionBar.mode ∈ {hover-slidebar, hover-fade, always-visible} 三态之一
|
|
172
171
|
- [ ] CardActionBar position: absolute(不撑开卡片高度)
|
|
173
172
|
- [ ] 危险操作(删除)使用 var(--destructive) 底色 + 始终最后位置
|
|
174
|
-
- [ ]
|
|
173
|
+
- [ ] OpPageContainer 内白卡 `p-6`(24px)统一提供内边距,遵循分层 padding 模型 v7.5
|
|
175
174
|
|
|
176
175
|
### 子类型差异项
|
|
177
176
|
|
|
178
177
|
| 验证项 | pure-card | standard-card | view-toggle |
|
|
179
178
|
|--------|-----------|---------------|-------------|
|
|
180
|
-
| layout | SINGLE_COL | TWO_COL +
|
|
179
|
+
| layout | SINGLE_COL | TWO_COL + OpSidebar | TWO_COL + OpSidebar |
|
|
181
180
|
| ViewToggle 存在性 | ❌ | ❌ | ✅ Tab 样式 |
|
|
182
181
|
| ItemCard.iconStyle | avatar | avatar | tile |
|
|
183
182
|
| 标题字号 | 14px | 14px | 16px |
|
|
@@ -246,8 +245,9 @@
|
|
|
246
245
|
| 组件路径 | 导出组件 | 在卡片列表页中的用途 |
|
|
247
246
|
|----------|----------|-------------------|
|
|
248
247
|
| `components/page-shell` | `PageShell` | L1 级页面壳(header + sidebar + children) |
|
|
249
|
-
| `components/sidebar` | `
|
|
250
|
-
| `components/
|
|
248
|
+
| `components/business/op-sidebar` | `OpSidebar` | 左侧导航(OpenTrek 整装侧边栏,内置 SidebarProvider) |
|
|
249
|
+
| `components/business/op-page-container` | `OpPageContainer` | 灰底 + 内置白卡页面容器(header + children) |
|
|
250
|
+
| `components/business/list-card` | `ListCard`, `CardStatusBadge` | ItemCard 业务卡片(三态边框 + hover 操作栏) |
|
|
251
251
|
| `components/page-header` | `PageHeader`, `PageHeaderNav`, `PageHeaderContent`, `PageHeaderHeading`, `PageHeaderDescription`, `PageHeaderActions`, `PageHeaderFooter` | 页面标题区域 |
|
|
252
252
|
| `components/button` | `Button`, `buttonVariants` | 创建/导入/辅助操作按钮 |
|
|
253
253
|
| `components/input` | `Input`, `inputVariants` | 搜索输入框 |
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
┌─ PageShell (components/page-shell) ──────────────────────────────────────┐
|
|
28
|
-
│ sidebar:
|
|
28
|
+
│ sidebar: OpSidebar (components/business/op-sidebar) │
|
|
29
29
|
│ children: │
|
|
30
|
-
│ ┌─
|
|
30
|
+
│ ┌─ OpPageContainer (components/business/op-page-container) ─────────┐ │
|
|
31
31
|
│ │ PageHeader (components/page-header → PageHeader + PageHeaderHeading)│ │
|
|
32
32
|
│ │ 标题: "上架CoWorker" / "内置资产" / "评测集" / "元数据管理" │ │
|
|
33
33
|
│ │ │ │
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
|
|
83
83
|
```
|
|
84
84
|
┌─ PageShell ──────────────────────────────────────────────────────────────┐
|
|
85
|
-
│ sidebar:
|
|
86
|
-
│ ┌─
|
|
85
|
+
│ sidebar: OpSidebar │
|
|
86
|
+
│ ┌─ OpPageContainer ────────────────────────────────────────────────────┐ │
|
|
87
87
|
│ │ PageHeader: "操作记录" / "Trace追踪" │ │
|
|
88
88
|
│ │ │ │
|
|
89
89
|
│ │ ActionToolbar (flex, nowrap): │ │
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
|
|
120
120
|
```
|
|
121
121
|
┌─ PageShell ──────────────────────────────────────────────────────────────┐
|
|
122
|
-
│ sidebar:
|
|
123
|
-
│ ┌─
|
|
122
|
+
│ sidebar: OpSidebar │
|
|
123
|
+
│ ┌─ OpPageContainer ────────────────────────────────────────────────────┐ │
|
|
124
124
|
│ │ PageHeader: "内置服务" │ │
|
|
125
125
|
│ │ Tabs: [沙箱管理 | 消息渠道管理 | 数据源管理 | 模型接入] │ │
|
|
126
126
|
│ │ │ │
|
|
@@ -262,8 +262,8 @@
|
|
|
262
262
|
| 区域 | UI 组件库引用 | 用途 |
|
|
263
263
|
|------|--------------|------|
|
|
264
264
|
| 页面框架 | `components/page-shell` → `PageShell` | L1 级页面壳 |
|
|
265
|
-
| 侧边导航 | `components/sidebar` → `
|
|
266
|
-
|
|
|
265
|
+
| 侧边导航 | `components/business/op-sidebar` → `OpSidebar` | 左侧导航(OpenTrek 整装侧边栏) |
|
|
266
|
+
| 页面容器 | `components/business/op-page-container` → `OpPageContainer` | 灰底 + 白卡容器 |
|
|
267
267
|
| 页面标题 | `components/page-header` → `PageHeader` + `PageHeaderHeading` | 标题 18px/500 |
|
|
268
268
|
| Tab 切换 | `components/tabs` → `Tabs` + `TabsList`(variant='line') + `TabsTrigger` + `TabsContent` | 子视图切换 |
|
|
269
269
|
| 主操作按钮 | `components/button` → `Button`(variant='default', color='primary') | "+ 新建XXX" |
|