@teamix-evo/skills 0.4.0 → 0.6.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.
Files changed (97) hide show
  1. package/README.md +7 -3
  2. package/manifest.json +3 -2
  3. package/package.json +2 -2
  4. package/src/teamix-evo-code-opentrek/SKILL.md +12 -10
  5. package/src/teamix-evo-code-opentrek/api-layering.md +8 -5
  6. package/src/teamix-evo-code-opentrek/checklist.md +2 -0
  7. package/src/teamix-evo-code-opentrek/error-and-loading.md +38 -25
  8. package/src/teamix-evo-code-opentrek/file-structure.md +63 -54
  9. package/src/teamix-evo-code-opentrek/forms-and-validation.md +14 -12
  10. package/src/teamix-evo-code-opentrek/reuse-first.md +2 -0
  11. package/src/teamix-evo-code-opentrek/routing-and-codesplit.md +23 -21
  12. package/src/teamix-evo-code-opentrek/testing.md +32 -28
  13. package/src/teamix-evo-code-uni-manager/SKILL.md +12 -10
  14. package/src/teamix-evo-code-uni-manager/api-layering.md +2 -0
  15. package/src/teamix-evo-code-uni-manager/checklist.md +2 -0
  16. package/src/teamix-evo-code-uni-manager/error-and-loading.md +3 -1
  17. package/src/teamix-evo-code-uni-manager/file-structure.md +2 -0
  18. package/src/teamix-evo-code-uni-manager/forms-and-validation.md +2 -0
  19. package/src/teamix-evo-code-uni-manager/reuse-first.md +3 -1
  20. package/src/teamix-evo-code-uni-manager/routing-and-codesplit.md +3 -1
  21. package/src/teamix-evo-code-uni-manager/testing.md +2 -0
  22. package/src/teamix-evo-design-opentrek/SKILL.md +213 -52
  23. package/src/teamix-evo-design-opentrek/boundaries.md +25 -5
  24. package/src/teamix-evo-design-opentrek/brand.md +7 -7
  25. package/src/teamix-evo-design-opentrek/checklist.md +15 -13
  26. package/src/teamix-evo-design-opentrek/components.md +89 -39
  27. package/src/teamix-evo-design-opentrek/examples/detail-ai-gateway-1.html +1069 -0
  28. package/src/teamix-evo-design-opentrek/examples/detail-ai-gateway-instance.html +941 -0
  29. package/src/teamix-evo-design-opentrek/examples/detail-page-api-doc.html +906 -0
  30. package/src/teamix-evo-design-opentrek/examples/detail-page-config.html +993 -0
  31. package/src/teamix-evo-design-opentrek/examples/detail-page-monitor.html +1339 -0
  32. package/src/teamix-evo-design-opentrek/examples/detail-page.html +933 -0
  33. package/src/teamix-evo-design-opentrek/examples/settings-page.html +1119 -0
  34. package/src/teamix-evo-design-opentrek/examples/standard-card-list.html +1094 -0
  35. package/src/teamix-evo-design-opentrek/examples/standard-table-list.html +1361 -0
  36. package/src/teamix-evo-design-opentrek/examples/wizard-form-page.html +877 -0
  37. package/src/teamix-evo-design-opentrek/flows.md +85 -12
  38. package/src/teamix-evo-design-opentrek/foundations.md +12 -9
  39. package/src/teamix-evo-design-opentrek/generation-flow.md +84 -14
  40. package/src/teamix-evo-design-opentrek/pages/detail-page/SKILL.md +260 -0
  41. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/api-doc-detail.md +163 -0
  42. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/comparison-detail.md +100 -0
  43. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/monitor-detail.md +190 -0
  44. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/resource-detail.md +148 -0
  45. package/src/teamix-evo-design-opentrek/pages/form-page/SKILL.md +362 -0
  46. package/src/teamix-evo-design-opentrek/pages/list-page/SKILL.md +286 -0
  47. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/action-column-spec.md +60 -0
  48. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/column-meta-rules.md +117 -0
  49. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/search-combo-spec.md +194 -0
  50. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/state-action-pattern.md +51 -0
  51. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/advanced-filter-list.md +94 -0
  52. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/card-list.md +558 -0
  53. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/drawer-list.md +76 -0
  54. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/expandable-list.md +70 -0
  55. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/l2-sidebar-list.md +73 -0
  56. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/standard-list.md +198 -0
  57. package/src/teamix-evo-design-opentrek/patterns/color-mapping.md +96 -0
  58. package/src/teamix-evo-design-opentrek/patterns/dashboard.md +2 -0
  59. package/src/teamix-evo-design-opentrek/patterns/detail-page.md +218 -152
  60. package/src/teamix-evo-design-opentrek/patterns/form-page.md +437 -228
  61. package/src/teamix-evo-design-opentrek/patterns/list-page.md +221 -260
  62. package/src/teamix-evo-design-opentrek/patterns/page-types.md +40 -125
  63. package/src/teamix-evo-design-opentrek/philosophy.md +7 -5
  64. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AGENT RUNTIME.svg +1 -0
  65. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI GATEWAY.svg +1 -0
  66. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI STUDIO.svg +1 -0
  67. package/src/teamix-evo-design-opentrek/rules/_assets/OP_DEV-2.svg +1 -0
  68. package/src/teamix-evo-design-opentrek/rules/_assets/OP_LOGO.svg +1 -0
  69. package/src/teamix-evo-design-opentrek/rules/_assets/OP_OPS.svg +1 -0
  70. package/src/teamix-evo-design-opentrek/rules/boundaries.rules.json +3 -3
  71. package/src/teamix-evo-design-opentrek/rules/business-mapping.json +124 -0
  72. package/src/teamix-evo-design-opentrek/rules/common-components.json +924 -0
  73. package/src/teamix-evo-design-opentrek/rules/component-specs.json +1083 -0
  74. package/src/teamix-evo-design-opentrek/rules/design-tokens.css +433 -0
  75. package/src/teamix-evo-design-opentrek/rules/design-tokens.json +2798 -0
  76. package/src/teamix-evo-design-opentrek/rules/layout-rules.json +218 -0
  77. package/src/teamix-evo-design-opentrek/rules/page-flow.json +351 -0
  78. package/src/teamix-evo-design-opentrek/rules/page-frame.json +241 -0
  79. package/src/teamix-evo-design-opentrek/rules/page-header-spec.md +123 -0
  80. package/src/teamix-evo-design-opentrek/rules/page-types.json +206 -0
  81. package/src/teamix-evo-design-opentrek/rules/sidebar-spec.md +217 -0
  82. package/src/teamix-evo-design-opentrek/rules/styling.json +188 -0
  83. package/src/teamix-evo-design-opentrek/rules/token-mapping.md +284 -0
  84. package/src/teamix-evo-design-uni-manager/SKILL.md +18 -27
  85. package/src/teamix-evo-design-uni-manager/boundaries.md +7 -4
  86. package/src/teamix-evo-design-uni-manager/brand.md +1 -1
  87. package/src/teamix-evo-design-uni-manager/components.md +33 -28
  88. package/src/teamix-evo-design-uni-manager/foundations.md +24 -21
  89. package/src/teamix-evo-design-uni-manager/generation-flow.md +46 -8
  90. package/src/teamix-evo-design-uni-manager/patterns/dashboard.md +3 -1
  91. package/src/teamix-evo-design-uni-manager/patterns/detail-page.md +42 -13
  92. package/src/teamix-evo-design-uni-manager/patterns/form-page.md +67 -30
  93. package/src/teamix-evo-design-uni-manager/patterns/list-page.md +73 -40
  94. package/src/teamix-evo-design-uni-manager/patterns/page-types.md +14 -12
  95. package/src/teamix-evo-design-uni-manager/philosophy.md +4 -2
  96. package/src/teamix-evo-design-uni-manager/rules/boundaries.rules.json +3 -3
  97. package/src/teamix-evo-manage/SKILL.md +74 -66
@@ -0,0 +1,1083 @@
1
+ {
2
+ "version": "1.0",
3
+ "description": "TrekClaw 组件级精确尺寸约束。来源:OP-DesignTokens-V5.md Part C(C1~C25)。生成/翻新页面时必须遵守。",
4
+ "source": {
5
+ "path": "../../design token进展/4.1/迭代/OP-DesignTokens-V5.md",
6
+ "section": "Part C — 组件级规则",
7
+ "lastSynced": "2026-05-15"
8
+ },
9
+
10
+ "components": {
11
+ "C1-Button": {
12
+ "name": "Button",
13
+ "file": "button.tsx",
14
+ "sizes": [
15
+ { "name": "default", "height": "32px (h-8)" },
16
+ { "name": "sm", "height": "28px (h-7)" },
17
+ { "name": "lg", "height": "40px (h-10)" },
18
+ { "name": "icon", "height": "32px, width: 32px (h-8 w-8)" }
19
+ ],
20
+ "iconGap": "4px (--gap-xs),全尺寸统一,禁止页面层覆盖",
21
+ "radius": "8px (--input-radius / --radius-md)",
22
+ "outlineBorder": "使用 border-gray-line(不使用 border-input)",
23
+ "variants": "default / destructive / outline / secondary / ghost / link / gradient / success",
24
+ "spotlight": "内置 Spotlight 光效(鼠标追踪),default 变体色 rgba(100,230,255,0.45),其他变体 rgba(255,255,255,0.25)"
25
+ },
26
+
27
+ "C2-Input": {
28
+ "name": "Input",
29
+ "file": "input.tsx",
30
+ "height": "32px (--input-height)",
31
+ "borderRadius": "8px (--input-radius)",
32
+ "padding": "7px 8px (--input-padding-y --input-padding-x)",
33
+ "fontSize": "12px (--input-font-size)",
34
+ "border": "border-input (--gray-border #D4D6DB)",
35
+ "background": "bg-card (白色)",
36
+ "textColor": "--gray-primary",
37
+ "placeholder": "hsl(var(--input-placeholder)) (#AAAAAA)",
38
+ "focus": "仅改变 border 颜色,不使用 ring;过渡 200ms"
39
+ },
40
+
41
+ "C3-Textarea": {
42
+ "name": "Textarea",
43
+ "file": "textarea.tsx",
44
+ "note": "与 Input 同套 token:borderRadius/fontSize/lineHeight/padding 均从 --input-* 变量",
45
+ "background": "bg-card + disabled:opacity-50",
46
+ "transition": "transition-colors 200ms"
47
+ },
48
+
49
+ "C4-InputGroup": {
50
+ "name": "InputGroup",
51
+ "file": "input-group.tsx",
52
+ "structure": "InputGroup > InputGroupAddon + InputGroupInput(可选 InputGroupButton/InputGroupText/InputGroupTextarea)",
53
+ "height": "--input-height (32px)",
54
+ "borderRadius": "--input-radius (8px)",
55
+ "border": "默认 --gray-line,focus-within 变 --primary",
56
+ "searchAddon": "必须使用 InputGroup 结构,Addon 默认 align=inline-end(搜索图标在右侧),禁止改为 inline-start",
57
+ "searchIconSize": "--input-icon-size (16px)",
58
+ "searchIconColor": "--gray-tertiary",
59
+ "innerInput": "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0"
60
+ },
61
+
62
+ "C5-Label": {
63
+ "name": "Label",
64
+ "file": "label.tsx",
65
+ "default": "text-sm(表单场景需手动覆盖为 text-xs)",
66
+ "dialog": "弹窗内 Label 必须使用 text-xs(12px)"
67
+ },
68
+
69
+ "C6-Badge": {
70
+ "name": "Badge",
71
+ "file": "badge.tsx",
72
+ "radius": "4px (--radius-sm)",
73
+ "_comment_legacyTopLevel": "以下顶层 padding / fontSize 字段对应 sizes.sm,保留以向后兼容;新使用方请优先引用 sizes 字段",
74
+ "padding": "3px 8px",
75
+ "gap": "2px",
76
+ "fontSize": "12px",
77
+ "variants": "default / secondary / destructive / status / outline / success / warning / inactive / info(API) / purple(MCP)",
78
+ "colorPalette": "12 色相 × 2 值(--badge-*-text 13阶 + --badge-*-bg 20阶),见 design-tokens.json → glossy.badge10",
79
+ "sizes": {
80
+ "sm": {
81
+ "fontSize": "12px",
82
+ "padding": "3px 8px",
83
+ "height": "auto (~18px)",
84
+ "useCase": "表格内状态标签、列表项标签"
85
+ },
86
+ "default": {
87
+ "fontSize": "14px",
88
+ "padding": "4px 10px",
89
+ "height": "24px",
90
+ "lineHeight": "16px",
91
+ "useCase": "跟随页面标题使用的大尺寸标签(如 PageHeader 面包屑后的分类标签)"
92
+ }
93
+ }
94
+ },
95
+
96
+ "C7-Card": {
97
+ "name": "Card",
98
+ "file": "card.tsx",
99
+ "default": "rounded-xl border bg-card text-card-foreground shadow-card card-hover",
100
+ "contentCardOverride": "【v7.6】作为内容区大卡片容器(ContentCard)使用时:`rounded-xl border-0 bg-card text-card-foreground shadow-sm` — 去掉 1px border,使用最弱阴影 shadow-sm。详见 design-tokens.json · componentSpacing.Card.surface。",
101
+ "padding": "shadcn 默认 24px (p-6);ContentCard 作为白卡容器使用时 override 为 0 var(--card-padding-x) = 0 20px(v7.5 由 24px → 20px)",
102
+ "structure": "CardHeader / CardTitle / CardDescription / CardContent / CardFooter",
103
+ "cardFooter": {
104
+ "description": "页面级 Card 内 SubmitBar/Footer 定位规则(适用于 FormPage)",
105
+ "height": "auto(内容决定,典型值 72px = 24px padding-top + 36px button-height + 12px padding-bottom)",
106
+ "positioning": "智能定位:Footer 作为 Card 直接子元素(非 scrollable 内),flex-shrink: 0",
107
+ "behavior": {
108
+ "contentFits": "Card 高度 = 内容高度,Footer 跟随表单自然展示",
109
+ "contentOverflows": "Card 高度 = max-height,内容区 overflow-y: auto 滚动,Footer 固定在 Card 底部"
110
+ },
111
+ "maxHeight": "calc(100vh - 2 × --page-container-padding)",
112
+ "zIndex": 10,
113
+ "background": "hsl(var(--card))",
114
+ "borderTop": "1px solid hsl(var(--gray-line))",
115
+ "reference": "与 DialogFooter(C18) / DrawerFooter(C19) 固定底部策略一致"
116
+ }
117
+ },
118
+
119
+ "C8-SpotlightCard": {
120
+ "name": "SpotlightCard",
121
+ "file": "SpotlightCard.tsx",
122
+ "outer": "relative overflow-hidden",
123
+ "effect": "鼠标追踪 + radial-gradient 层,opacity 在 hover/focus 上升至 0.6",
124
+ "spotlightColor": "rgba(255,255,255,0.25)",
125
+ "transition": "opacity 500ms ease-in-out"
126
+ },
127
+
128
+ "C9-Checkbox": {
129
+ "name": "Checkbox",
130
+ "file": "checkbox.tsx",
131
+ "size": "16x16 (--input-icon-size)",
132
+ "radius": "4px (--radius-sm)",
133
+ "border": "--gray-border",
134
+ "background": "--card",
135
+ "checked": "bg-primary + border-primary + text-primary-foreground",
136
+ "states": "unchecked / checked / indeterminate(Minus 图标 strokeWidth=3)"
137
+ },
138
+
139
+ "C10-RadioGroup": {
140
+ "name": "RadioGroup",
141
+ "file": "radio-group.tsx",
142
+ "itemSize": "16x16 (size-4)",
143
+ "border": "--gray-border",
144
+ "checked": "border-primary + bg-primary,内部 Circle 2px、填充 primary-foreground"
145
+ },
146
+
147
+ "C11-Switch": {
148
+ "name": "Switch",
149
+ "file": "switch.tsx",
150
+ "pillSize": "28x16, borderRadius 8px",
151
+ "handleSize": "12x12, borderRadius 50%",
152
+ "offset": "top:2 / left:2 (off) / left:14 (on)",
153
+ "enabledPill": "--success(不是 primary)",
154
+ "disabledPill": "--gray-border",
155
+ "handle": "--card",
156
+ "animation": "0.2s"
157
+ },
158
+
159
+ "C12-Slider": {
160
+ "name": "Slider",
161
+ "file": "slider.tsx",
162
+ "trackHeight": "h-1 (4px)",
163
+ "trackRadius": "rounded-full",
164
+ "trackBg": "bg-gray-border",
165
+ "rangeBg": "bg-primary",
166
+ "thumbSize": "14x14 (size-3.5)",
167
+ "thumbBorder": "border-2 border-primary",
168
+ "thumbBg": "白色 + ring-primary/20",
169
+ "thumbHover": "ring-4"
170
+ },
171
+
172
+ "C13-Progress": {
173
+ "name": "Progress",
174
+ "file": "progress.tsx",
175
+ "height": "h-2 (8px)",
176
+ "radius": "全圆角",
177
+ "trackBg": "bg-muted",
178
+ "fillBg": "bg-primary",
179
+ "transition": "transition-all duration-500 ease-out"
180
+ },
181
+
182
+ "C14-Tabs": {
183
+ "name": "Tabs",
184
+ "file": "tabs.tsx",
185
+ "variants": [
186
+ {
187
+ "name": "default(胶囊)",
188
+ "container": "h-10 rounded-lg bg-muted p-1",
189
+ "selected": "bg-background text-foreground shadow-sm"
190
+ },
191
+ {
192
+ "name": "underline(下划线)",
193
+ "containerHeight": "32px (h-8)",
194
+ "tabSpacing": "40px",
195
+ "containerBorder": "底贯穿 1px --gray-line",
196
+ "trigger": "h-8 leading-[22px] pt-0 pb-2.5",
197
+ "activeText": "--primary + medium + 2px 底部蓝色指示线",
198
+ "normalText": "--gray-secondary + regular"
199
+ }
200
+ ]
201
+ },
202
+
203
+ "C15-ToggleGroup": {
204
+ "name": "ToggleGroup / Toggle",
205
+ "file": "toggle-group.tsx / toggle.tsx",
206
+ "variants": "default / outline / capsule(快筛胶囊)",
207
+ "sizes": "default(h-8) / sm(h-7) / lg(h-9) / capsule(h-8 px-4 text-xs)",
208
+ "capsuleBorder": "--gray-line",
209
+ "normalText": "--gray-secondary",
210
+ "selectedText": "--primary + font-medium",
211
+ "spacing0": "颈部圆角与边框折叠:first:rounded-l、last:rounded-r、[&:not(:first-child)]:border-l-0"
212
+ },
213
+
214
+ "C16-Pagination": {
215
+ "name": "Pagination",
216
+ "file": "pagination.tsx",
217
+ "layout": "两段布局:左侧(总条数)/ 右侧(页码导航,间距 12px + 前往跳转,间距 8px + 每页选择器)",
218
+ "buttonSize": "32x32",
219
+ "arrowIconSize": "20x20 (size-5)",
220
+ "ellipsisSize": "16x16 (size-4)",
221
+ "tokenReuse": "禁止新增 --pagination-* 变量,必须复用:尺寸→--input-height、圆角→--input-radius、间距→--button-gap、字号→--input-font-size",
222
+ "activePage": "--primary + medium",
223
+ "normalPage": "--gray-secondary + regular",
224
+ "hoverBg": "--gray-fill",
225
+ "gotoJump": {
226
+ "position": "右侧区域最右,紧邻页码导航(间距 12px)",
227
+ "structure": "「前往」文字 + input[type=text](宽度约 40px,高度 --button-sm-height)+「页」文字 + 「确定」按钮(ghost/outline,高度 --button-sm-height)",
228
+ "inputStyle": "复用 Input 规范:--button-sm-height (28px), --radius-md, --input-font-size, padding-x 4px, 居中文字, focus 变 --primary",
229
+ "buttonStyle": "小按钮,高度 --button-sm-height (28px),圆角 --radius-md,文字「确定」,无图标"
230
+ }
231
+ },
232
+
233
+ "C17-Table": {
234
+ "name": "Table",
235
+ "file": "table.tsx",
236
+ "header": {
237
+ "bg": "--gray-bg",
238
+ "textColor": "--gray-tertiary",
239
+ "fontSize": "--input-font-size (12px)",
240
+ "fontWeight": "medium (500)",
241
+ "whiteSpace": "nowrap(强制不折行)",
242
+ "padding": "12px 12px【上下 12px / 左右 12px】;仅供列间内部呼吸;外侧呼吸由 Card.paddingX (20px) 提供"
243
+ },
244
+ "cell": {
245
+ "bg": "--card",
246
+ "textColor": "--gray-primary",
247
+ "fontSize": "--input-font-size (12px)",
248
+ "fontWeight": "regular (400)",
249
+ "lineHeight": "--input-line-height (18px)",
250
+ "padding": "12px 12px【上下 12px / 左右 12px】;仅供列间内部呼吸;外侧呼吸由 Card.paddingX (20px) 提供",
251
+ "firstChild": "padding-left: 20px(表格作为密集数据区,首列额外享有 20px 缩进)",
252
+ "lastChild": "padding-right: 20px(末列同样额外享有 20px 缩进)",
253
+ "border": "--gray-line (1px bottom)",
254
+ "outerBorder": "无"
255
+ },
256
+ "horizontalPaddingRule": {
257
+ "model": "分层 padding v7.5:Card.paddingX (20px) 提供非 Table 子组件外侧呼吸;td.paddingX (12px) 提供中间列间内部呼吸;首末列 padding-left/right = 20px 提供表格首末列额外视觉缩进",
258
+ "middleColumns": "padding: 12px 12px",
259
+ "firstColumn": "padding-left: 20px",
260
+ "lastColumn": "padding-right: 20px",
261
+ "description": "【分层模型 v7.5】Table 的水平 padding 分为三层职责:\n 1) 非 Table 子组件与 Card 外侧边缘的 20px 呼吸→ 由 Card.paddingX 提供\n 2) 中间列与列之间的 24px 内部呼吸→ 由中间 td 的 12+12 paddingX 提供\n 3) 表格首末列额外的 20px 视觉缩进→ 由首末列 td 的 padding-left/right = 20px 提供\n首列内容 X = Card 外缘 + 40px,末列右缘 X = Card 右缘 - 40px。",
262
+ "forbidden": [
263
+ "禁止中间列 td paddingX 不为 12px(列间距不为 24px,与设计不一致)",
264
+ "禁止首列 padding-left 为非 20 值(0 / 12 / 16 / 24 都不适用;20px 是唯一权威值)",
265
+ "禁止末列 padding-right 为非 20 值(同上)",
266
+ "禁止使用 px-4 / px-6 等字面量。Tailwind 中唯一接受模式:`px-3 first:pl-5 last:pr-5`\uff0820px = pl-5 / pr-5\uff09",
267
+ "禁止在 Card 与 Table 之间插入额外的 paddingX 包裹层"
268
+ ],
269
+ "firstAndLastColumn": "首列 (col-checkbox 或首字段列) 内容左边缘 = Card 左边缘 + 20 + 20 = 40px;末列内容右边缘 = Card 右边缘 - 40px。表格首末列不与 PageHeader / ActionToolbar / Pagination 起始线对齐,这是设计预期。"
270
+ },
271
+ "hoverBg": "--gray-bg / 0.5",
272
+ "actionColumn": "纯文字按钮 + 竖线分隔,可用 --primary,禁用 --gray-disabled",
273
+ "actionColumnAlignment": {
274
+ "rule": "表头与表体均需显式 text-align: left,使「操作」标题与操作列左侧第一个字段左边缘对齐",
275
+ "css": [
276
+ ".data-table .col-action { width: 140px; text-align: left; position: sticky; right: 0; background: hsl(var(--card)); }",
277
+ ".data-table thead th.col-action { background: hsl(var(--gray-bg)); text-align: left; }",
278
+ ".data-table tbody td.col-action { text-align: left; }"
279
+ ],
280
+ "reason": "操作列标题与左侧第一个操作字段(如「详情」链接)左边缘对齐,保持视觉一致性",
281
+ "forbidden": [
282
+ "禁止只在 .col-action 设 text-align: left 而不重复声明",
283
+ "禁止表头「操作」与表体操作内容对齐方式不一致",
284
+ "禁止操作列内容居中"
285
+ ],
286
+ "verification": "表头「操作」左边缘 X = 表体「详情」链接左边缘 X"
287
+ },
288
+ "globalRules": [
289
+ "内容文字统一 --gray-primary,禁止页面层覆盖为 --gray-secondary",
290
+ "表头与内容严格左对齐,禁止 text-center / justify-center",
291
+ "hover 背景 --gray-bg / 0.5",
292
+ "操作列:纯文字按钮 + 竖线分隔(表头与表体均 text-align: left,左边缘对齐)",
293
+ "纯文案不设独立颜色,继承 TableCell 的 --gray-primary",
294
+ "表头文字强制不折行",
295
+ "th/td 的水平 padding 分层 v7.5:中间列 12px 提供列间呼吸;首列 padding-left = 20px / 末列 padding-right = 20px(表格额外享有 20px 视觉缩进);Card.paddingX (20px) 提供非 Table 子组件的外侧呼吸"
296
+ ]
297
+ },
298
+
299
+ "C18-Dialog": {
300
+ "name": "Dialog",
301
+ "file": "dialog.tsx",
302
+ "structure": "Dialog > DialogContent > [DialogHeader + DialogBody | 自由内容 + DialogFooter]",
303
+ "globalRules": [
304
+ "标题区纯文字,禁止任何 icon;禁止 flex items-center gap-2 图标布局类;禁止 text-destructive / text-warning 颜色类",
305
+ "必须有关闭按钮:传入 onClose 回调,右侧自动渲染 X",
306
+ "行动点区默认不加图标(特殊业务需求除外)",
307
+ "确定/提交按钮始终可点击,禁用 disabled;点击后再触发校验、反馈错误信息",
308
+ "字段 Label 默认 text-xs(12px),不得使用 Label 默认的 text-sm",
309
+ "简单弹窗使用 <DialogBody>,仅复杂分栏弹窗可用自定义 div",
310
+ "宽度四档变量约束:禁止 max-w-* 硬编码,必须 style={{ width: 'var(--dialog-width-*)' }}(s=400/m=600/l=800/xl=1000)",
311
+ "通过 ReactDOM.createPortal 渲染到 document.body,不受祖先 overflow-hidden 裁剪",
312
+ "遮罩层 bg-black/50,禁止 backdrop-blur / backdrop-filter 等背景模糊"
313
+ ],
314
+ "headerHeight": "46px (--dialog-header-height)",
315
+ "padding": "12px 20px",
316
+ "titleSize": "14px medium --gray-title",
317
+ "closeIcon": "16x16 --gray-tertiary hover --gray-primary",
318
+ "bodyPadding": "16px 20px",
319
+ "footerHeight": "64px (--dialog-footer-height)",
320
+ "footerPadding": "0 20px",
321
+ "radius": "--radius (16px)",
322
+ "shadow": "--dialog-shadow"
323
+ },
324
+
325
+ "C19-Sheet": {
326
+ "name": "Sheet",
327
+ "file": "drawer.tsx",
328
+ "note": "基于 vaul,direction=right,右侧滑入三段式结构(DrawerHeader / DrawerBody / DrawerFooter)",
329
+ "rules": [
330
+ "标题区纯文字,禁止 icon",
331
+ "必须有关闭按钮(onClose)",
332
+ "Footer 按钮默认不加图标",
333
+ "宽度四档:style={{ width: 'var(--drawer-width-*)' }}(s=400/m=600/l=800/xl=1200)"
334
+ ],
335
+ "headerHeight": "46px (--dialog-header-height)",
336
+ "titleSize": "14px medium --gray-title",
337
+ "bodyPadding": "flex-1 overflow-y-auto py-4 px-[var(--dialog-body-padding-x)]",
338
+ "footerHeight": "64px (--dialog-footer-height)",
339
+ "footerPadding": "0 20px",
340
+ "radius": "var(--radius) 0 0 var(--radius)(仅左上+左下)",
341
+ "shadow": "--dialog-shadow",
342
+ "overlay": "bg-black/50"
343
+ },
344
+
345
+ "C20-Sheet": {
346
+ "name": "Sheet",
347
+ "file": "sheet.tsx",
348
+ "note": "基于 @base-ui/react/dialog,默认 side=right",
349
+ "overlay": "bg-black/10 + supports-backdrop-filter:backdrop-blur-xs",
350
+ "closeButton": "右上角默认 Button variant=ghost size=icon-sm 关闭按钮"
351
+ },
352
+
353
+ "C21-Popover": {
354
+ "name": "Popover",
355
+ "file": "popover.tsx",
356
+ "library": "@radix-ui/react-popover",
357
+ "defaultAlign": "center",
358
+ "sideOffset": "4px",
359
+ "container": "rounded-md border border-gray-line bg-popover p-4 text-popover-foreground shadow-md"
360
+ },
361
+
362
+ "C22-Tooltip": {
363
+ "name": "Tooltip",
364
+ "file": "tooltip.tsx",
365
+ "library": "@base-ui/react/tooltip",
366
+ "defaultDelay": "0",
367
+ "defaultSide": "top",
368
+ "sideOffset": "4px",
369
+ "container": "深色底 bg-foreground + text-background,rounded-md,px-3 py-1.5 text-xs,携 Arrow"
370
+ },
371
+
372
+ "C23-Select": {
373
+ "name": "Select",
374
+ "file": "select.tsx",
375
+ "trigger": {
376
+ "height": "32px (h-8)",
377
+ "radius": "8px (--radius-md)",
378
+ "fontSize": "12px (text-xs)",
379
+ "border": "--gray-line",
380
+ "bg": "--card",
381
+ "arrow": "14px chevron-down --gray-title opacity 80"
382
+ },
383
+ "content": {
384
+ "bg": "--card",
385
+ "radius": "rounded-md",
386
+ "shadow": "0 6px 24px rgba(0,0,0,0.1)",
387
+ "padding": "p-2"
388
+ },
389
+ "item": {
390
+ "height": "32px (h-8)",
391
+ "radius": "4px (rounded-sm)",
392
+ "padding": "px-2 text-xs",
393
+ "normalText": "--foreground",
394
+ "disabledText": "--gray-disabled",
395
+ "hoverBg": "--gray-bg",
396
+ "selected": "data-[state=checked]:text-primary + font-medium"
397
+ },
398
+ "label": "text-xs font-medium text-[hsl(var(--gray-disabled))]",
399
+ "separator": "bg-[hsl(var(--gray-line))]"
400
+ },
401
+
402
+ "C24-DropdownMenu": {
403
+ "name": "DropdownMenu",
404
+ "file": "dropdown-menu.tsx",
405
+ "library": "@base-ui/react/menu",
406
+ "content": {
407
+ "radius": "rounded-md",
408
+ "bg": "bg-card",
409
+ "padding": "p-1",
410
+ "border": "border-gray-line",
411
+ "shadow": "0 6px 24px rgba(0,0,0,0.1)(与 Select 一致)",
412
+ "minWidth": "min-w-32",
413
+ "fontSize": "text-xs"
414
+ },
415
+ "item": {
416
+ "height": "32px (h-8)",
417
+ "radius": "rounded-sm",
418
+ "padding": "px-2",
419
+ "fontSize": "text-xs",
420
+ "focusBg": "--gray-bg",
421
+ "iconSize": "16x16 (size-4)"
422
+ },
423
+ "destructiveItem": "text-destructive,focus bg-destructive/10",
424
+ "shortcut": "右对齐,text-xs tracking-widest text-[hsl(var(--gray-disabled))]",
425
+ "sub": "SubTrigger 右侧 ChevronRightIcon;SubContent 默认 align-start、alignOffset=-3、side=right、sideOffset=0",
426
+ "separator": "bg-[hsl(var(--gray-line))]"
427
+ },
428
+
429
+ "C25-Misc": {
430
+ "name": "Notice / Separator / Skeleton / Sidebar",
431
+ "notice": {
432
+ "background": "渐变 Gradient-3(linear-gradient(90deg, hsl(var(--info-light)), hsl(var(--info-border))))",
433
+ "icon": "Info --primary",
434
+ "text": "--gray-secondary",
435
+ "padding": "var(--input-padding-y) var(--input-padding-x)",
436
+ "radius": "--input-radius",
437
+ "fontSize/lineHeight": "同 Input"
438
+ },
439
+ "separator": {
440
+ "color": "--gray-line(禁止硬编码)"
441
+ },
442
+ "skeleton": {
443
+ "bg": "bg-muted",
444
+ "animation": "animate-pulse rounded-md"
445
+ },
446
+ "sidebar": {
447
+ "width": "--layout-sidebar-width (240px)",
448
+ "collapsedWidth": "68px (= --sidebar-collapsed-width)",
449
+ "colors": "全部走 --sidebar-* token(详见 design-tokens.json colorMapping)",
450
+ "collapseBehavior": "菜单项 40x40px 居中于 34px 中轴,gap:0,flyout z-index:200(详见 design-tokens.json sidebarRules.collapseBehavior)",
451
+ "note": "v4.1 后项目已移除顶栏,用户信息与全局功能入口均收纳于侧边栏"
452
+ }
453
+ },
454
+
455
+ "C26-Stepper": {
456
+ "description": "数值增减器组件,用于配置有范围限制的数字值(如节点数)",
457
+ "structure": "display: flex; align-items: center; gap: 0; 三部分: 减按钮 + 输入框 + 加按钮",
458
+ "button": {
459
+ "width": "32px",
460
+ "height": "32px",
461
+ "border": "1px solid hsl(var(--gray-line))",
462
+ "background": "hsl(var(--card))",
463
+ "fontSize": "18px",
464
+ "color": "hsl(var(--gray-primary))",
465
+ "cursor": "pointer",
466
+ "hoverBackground": "hsl(var(--gray-fill))",
467
+ "disabledOpacity": "0.45",
468
+ "leftBorderRadius": "var(--radius-md) 0 0 var(--radius-md)",
469
+ "rightBorderRadius": "0 var(--radius-md) var(--radius-md) 0"
470
+ },
471
+ "input": {
472
+ "width": "60px",
473
+ "height": "32px",
474
+ "border": "1px solid hsl(var(--gray-line))",
475
+ "borderLeft": "none",
476
+ "borderRight": "none",
477
+ "textAlign": "center",
478
+ "fontSize": "var(--font-size-base) (12px)",
479
+ "color": "hsl(var(--gray-primary))",
480
+ "background": "hsl(var(--card))"
481
+ },
482
+ "borderRadius": "var(--radius-md) (8px) — 仅外侧两端有圆角",
483
+ "usage": "实例节点数、副本数等整数配置项"
484
+ },
485
+
486
+ "C27-Steps": {
487
+ "id": "C27",
488
+ "component": "Steps",
489
+ "description": "流程步骤条组件,用于多步骤向导/表单的进度指示,区别于 C26-Stepper 数值增减器",
490
+ "usage": "WizardPage / 多步骤表单 / 分步向导流程",
491
+ "orientation": ["horizontal", "vertical"],
492
+ "states": {
493
+ "inactive": "未到达的步骤,灰色边框圆形 + 灰色数字/文字",
494
+ "active": "当前步骤,品牌色填充圆形 + 白色数字 + 加粗标签",
495
+ "completed": "已完成步骤,品牌色填充圆形 + 白色对勾图标",
496
+ "loading": "异步加载中,Spinner 动画替代数字(可选)"
497
+ },
498
+ "specs": {
499
+ "stepCircle": {
500
+ "width": "30px",
501
+ "height": "30px",
502
+ "borderRadius": "50%",
503
+ "border": "2px solid",
504
+ "fontSize": "var(--font-size-lg)",
505
+ "fontWeight": "var(--font-weight-semibold)",
506
+ "colors": {
507
+ "inactive": {
508
+ "borderColor": "hsl(var(--gray-border))",
509
+ "background": "hsl(var(--card))",
510
+ "color": "hsl(var(--gray-secondary))"
511
+ },
512
+ "active": {
513
+ "borderColor": "hsl(var(--brand-primary))",
514
+ "background": "hsl(var(--brand-primary))",
515
+ "color": "hsl(var(--primary-foreground))"
516
+ },
517
+ "completed": {
518
+ "borderColor": "hsl(var(--brand-primary))",
519
+ "background": "hsl(var(--brand-primary))",
520
+ "color": "hsl(var(--primary-foreground))",
521
+ "content": "SVG checkmark icon"
522
+ }
523
+ }
524
+ },
525
+ "stepConnector": {
526
+ "height": "2px",
527
+ "margin": "0 var(--gap-lg)",
528
+ "colors": {
529
+ "default": "hsl(var(--gray-border))",
530
+ "completed": "hsl(var(--brand-primary))"
531
+ },
532
+ "borderRadius": "9999px"
533
+ },
534
+ "stepLabel": {
535
+ "fontSize": "var(--font-size-lg)",
536
+ "gap": "var(--gap-sm)",
537
+ "colors": {
538
+ "inactive": {
539
+ "color": "hsl(var(--gray-secondary))",
540
+ "fontWeight": "var(--font-weight-normal)"
541
+ },
542
+ "active": {
543
+ "color": "hsl(var(--gray-title))",
544
+ "fontWeight": "var(--font-weight-semibold)"
545
+ },
546
+ "completed": {
547
+ "color": "hsl(var(--gray-primary))",
548
+ "fontWeight": "var(--font-weight-medium)"
549
+ }
550
+ }
551
+ },
552
+ "stepDescription": {
553
+ "fontSize": "var(--font-size-sm)",
554
+ "color": "hsl(var(--gray-secondary))",
555
+ "marginTop": "2px",
556
+ "note": "可选,用于补充说明每步内容"
557
+ },
558
+ "container": {
559
+ "padding": "var(--gap-2xl) 0",
560
+ "maxWidth": "600px",
561
+ "margin": "0 auto",
562
+ "display": "flex",
563
+ "alignItems": "center",
564
+ "justifyContent": "center"
565
+ }
566
+ },
567
+ "accessibility": {
568
+ "role": "group (container), tablist (steps)",
569
+ "ariaLabel": "步骤指示器需提供 aria-label",
570
+ "ariaSelected": "当前步骤 aria-selected=true",
571
+ "keyboard": {
572
+ "Tab": "聚焦步骤条",
573
+ "ArrowRight": "下一步(horizontal)",
574
+ "ArrowLeft": "上一步(horizontal)",
575
+ "ArrowDown": "下一步(vertical)",
576
+ "ArrowUp": "上一步(vertical)",
577
+ "Enter/Space": "选择当前步骤(非线性模式)"
578
+ }
579
+ },
580
+ "constraints": [
581
+ "所有色值必须引用 CSS 变量,禁止硬编码",
582
+ "圆形指示器与标签间距使用 var(--gap-sm) = 8px",
583
+ "连接线左右间距使用 var(--gap-lg) = 12px",
584
+ "容器上下 padding 使用 var(--gap-2xl) = 24px",
585
+ "步骤条下方不带分割线(与表单内容区无 border 分隔)",
586
+ "Footer 行动点(取消/上一步/下一步/提交)全部居右排列 justify-content: flex-end"
587
+ ],
588
+ "examples": "page-rule-examples/wizard-form-page.html"
589
+ },
590
+ "C26-DescriptionList": {
591
+ "component": "DescriptionList",
592
+ "description": "详情页核心展示组件 — 键值对列表容器,支持多列布局与响应式降级",
593
+ "dimensions": {
594
+ "columns": {
595
+ "default": 2,
596
+ "options": [2, 3, 4],
597
+ "responsive": {
598
+ ">=1200px": "使用配置列数",
599
+ "768px-1199px": "最多 2 列",
600
+ "<768px": "强制 1 列(vertical 布局)"
601
+ }
602
+ },
603
+ "label": {
604
+ "width": "auto(由最长 label 决定)或固定值",
605
+ "minWidth": "80px",
606
+ "maxWidth": "180px",
607
+ "color": "hsl(var(--gray-secondary))",
608
+ "fontSize": "var(--font-size-base) = 12px",
609
+ "fontWeight": "400"
610
+ },
611
+ "value": {
612
+ "color": "hsl(var(--gray-primary))",
613
+ "fontSize": "var(--font-size-base) = 12px",
614
+ "fontWeight": "400",
615
+ "truncate": "single-line ellipsis + Tooltip,超过容器宽度时截断"
616
+ },
617
+ "row": {
618
+ "height": "36px(含 padding)",
619
+ "paddingY": "8px",
620
+ "gap": "var(--gap-md) = 12px(label 与 value 间距)"
621
+ },
622
+ "section": {
623
+ "titleFontSize": "14px",
624
+ "titleFontWeight": "600",
625
+ "titleColor": "hsl(var(--gray-title))",
626
+ "titleMarginBottom": "12px",
627
+ "sectionGap": "24px(分组间距,v7.6.1 对齐 design-tokens.json Detail.groupGap)",
628
+ "borderTop": "1px solid hsl(var(--gray-line))(非首个分组)— 属「功能性分组分割线」,不受 v7.6 surface 规则约束"
629
+ },
630
+ "container": {
631
+ "paddingX": "0(继承 Card 内边距 var(--card-padding-x) = 20px)",
632
+ "paddingY": "0"
633
+ }
634
+ },
635
+ "interactions": {
636
+ "copyable": "点击复制图标 → 复制到剪贴板 + Sonner '已复制'",
637
+ "editable": "点击编辑图标 → value 切换为 inline Input,失焦/Enter 保存",
638
+ "link": "蓝色文字 + hover 下划线,点击跳转关联资源",
639
+ "status": "Badge 颜色展示(运行中=绿、已停止=灰、异常=红)",
640
+ "tooltip": "截断文本 hover 展示完整内容"
641
+ },
642
+ "emptyValue": "字段为空时展示 '-' 占位,使用 var(--gray-disabled) 色值",
643
+ "constraints": [
644
+ "label 和 value 必须使用 CSS 变量色值,禁止硬编码",
645
+ "bordered 模式下使用 1px solid hsl(var(--gray-line)) 边框",
646
+ "响应式降级必须按 768px 断点强制转为单列",
647
+ "可复制字段的 icon 使用 Copy (16x16),hover 色 var(--primary)",
648
+ "可编辑字段切换为 Input 时高度保持 32px(与表单组件一致)"
649
+ ]
650
+ },
651
+
652
+ "C26-CodeBlock": {
653
+ "id": "C26",
654
+ "ref": "CodeBlock",
655
+ "name": "CodeBlock",
656
+ "category": "ORGANISM",
657
+ "description": "代码/配置片段只读展示,支持语法高亮、行号、复制",
658
+ "dimensions": {
659
+ "minHeight": 120,
660
+ "maxHeight": 480,
661
+ "padding": 16
662
+ },
663
+ "typography": {
664
+ "fontFamily": "'SF Mono', 'Fira Code', 'Cascadia Code', monospace",
665
+ "fontSize": 13,
666
+ "lineHeight": 1.6
667
+ },
668
+ "visual": {
669
+ "background": "hsl(var(--gray-muted))",
670
+ "borderRadius": "var(--radius-md)",
671
+ "lineNumberWidth": 40,
672
+ "lineNumberColor": "hsl(var(--muted-foreground))"
673
+ },
674
+ "variants": [
675
+ {
676
+ "name": "default",
677
+ "description": "标准代码展示",
678
+ "props": ["language", "lineNumbers", "copyable"]
679
+ },
680
+ {
681
+ "name": "collapsible",
682
+ "description": "可折叠模式(超长内容)",
683
+ "props": ["maxLines", "expandLabel"],
684
+ "trigger": "内容超过 maxHeight"
685
+ },
686
+ {
687
+ "name": "multi-language",
688
+ "description": "多语言Tab切换",
689
+ "props": ["languages[]", "activeLanguage"],
690
+ "extraUI": "顶部语言Tab栏"
691
+ }
692
+ ],
693
+ "responsive": {
694
+ "768": { "padding": 12, "fontSize": 12 }
695
+ },
696
+ "interactions": {
697
+ "copy": "右上角复制按钮,hover显示,点击复制全文",
698
+ "collapse": "底部渐变遮罩 + '展开全部(N行)' 按钮",
699
+ "languageSwitch": "顶部Tab切换不同语言展示"
700
+ }
701
+ },
702
+
703
+ "C27-ConfigDiff": {
704
+ "id": "C27",
705
+ "ref": "ConfigDiff",
706
+ "name": "ConfigDiff",
707
+ "category": "ORGANISM",
708
+ "description": "配置版本双栏对比展示,标记新增/删除/修改行",
709
+ "dimensions": {
710
+ "maxHeight": 600,
711
+ "headerHeight": 36,
712
+ "padding": 0
713
+ },
714
+ "typography": {
715
+ "fontFamily": "'SF Mono', 'Fira Code', monospace",
716
+ "fontSize": 13,
717
+ "lineHeight": 1.6
718
+ },
719
+ "visual": {
720
+ "addedLineBg": "hsl(152 82% 96%)",
721
+ "removedLineBg": "hsl(0 72% 96%)",
722
+ "unchangedBg": "transparent",
723
+ "borderRadius": "var(--radius-md)",
724
+ "headerBg": "hsl(var(--gray-muted))"
725
+ },
726
+ "variants": [
727
+ {
728
+ "name": "split",
729
+ "description": "双栏并排对比(默认)",
730
+ "layout": "左旧版本 | 右新版本,各占50%"
731
+ },
732
+ {
733
+ "name": "inline",
734
+ "description": "单栏标记差异",
735
+ "layout": "合并展示,添加行绿色背景,删除行红色背景"
736
+ }
737
+ ],
738
+ "responsive": {
739
+ "768": { "defaultMode": "inline", "description": "窄屏自动切换为inline模式" }
740
+ },
741
+ "interactions": {
742
+ "modeSwitch": "顶部切换 split/inline 模式",
743
+ "scrollSync": "split模式下双栏同步滚动",
744
+ "stats": "底部统计 '+N行 / -M行'"
745
+ }
746
+ },
747
+
748
+ "C28-VersionHistory": {
749
+ "id": "C28",
750
+ "ref": "VersionHistory",
751
+ "name": "VersionHistory",
752
+ "category": "ORGANISM",
753
+ "description": "版本变更时间线,展示版本记录与回滚操作",
754
+ "dimensions": {
755
+ "itemMinHeight": 56,
756
+ "itemMinHeightCompact": 40,
757
+ "dotSize": 8,
758
+ "lineWidth": 1
759
+ },
760
+ "typography": {
761
+ "versionLabel": { "fontSize": 14, "fontWeight": 500 },
762
+ "timestamp": { "fontSize": 12, "color": "hsl(var(--muted-foreground))" },
763
+ "summary": { "fontSize": 12, "color": "hsl(var(--gray-secondary-foreground))" }
764
+ },
765
+ "visual": {
766
+ "dotColorCurrent": "hsl(var(--primary))",
767
+ "dotColorHistory": "hsl(var(--gray-line))",
768
+ "lineColor": "hsl(var(--gray-line))",
769
+ "currentBadge": "primary"
770
+ },
771
+ "variants": [
772
+ {
773
+ "name": "default",
774
+ "description": "标准时间线(含变更摘要)"
775
+ },
776
+ {
777
+ "name": "compact",
778
+ "description": "紧凑模式(隐藏变更摘要)",
779
+ "itemHeight": 40
780
+ }
781
+ ],
782
+ "interactions": {
783
+ "select": "点击条目选中,触发版本对比",
784
+ "rollback": "hover显示回滚按钮,点击触发Dialog确认",
785
+ "expand": "点击条目展开变更摘要详情"
786
+ }
787
+ },
788
+
789
+ "C29-ApiEndpoint": {
790
+ "id": "C29",
791
+ "ref": "ApiEndpoint",
792
+ "name": "ApiEndpoint",
793
+ "category": "MOLECULE",
794
+ "description": "API端点信息概览卡(HTTP方法 + 路径 + 状态)",
795
+ "dimensions": {
796
+ "height": 48,
797
+ "padding": "0 16px"
798
+ },
799
+ "typography": {
800
+ "path": { "fontFamily": "monospace", "fontSize": 14, "fontWeight": 500 },
801
+ "method": { "fontSize": 12, "fontWeight": 600 }
802
+ },
803
+ "visual": {
804
+ "background": "hsl(var(--gray-muted))",
805
+ "borderRadius": "var(--radius-md)",
806
+ "methodColors": {
807
+ "GET": "hsl(218 100% 47%)",
808
+ "POST": "hsl(142 76% 36%)",
809
+ "PUT": "hsl(40 88% 48%)",
810
+ "DELETE": "hsl(0 72% 51%)",
811
+ "PATCH": "hsl(262 83% 58%)"
812
+ },
813
+ "statusColors": {
814
+ "published": "hsl(var(--success))",
815
+ "draft": "hsl(var(--muted-foreground))",
816
+ "deprecated": "hsl(var(--destructive))"
817
+ }
818
+ },
819
+ "variants": [
820
+ {
821
+ "name": "default",
822
+ "description": "单端点展示"
823
+ },
824
+ {
825
+ "name": "with-base-url",
826
+ "description": "含基础URL前缀",
827
+ "extraUI": "baseUrl(灰色) + path(主色)"
828
+ }
829
+ ],
830
+ "interactions": {
831
+ "copy": "路径右侧复制图标,hover显示,复制完整URL",
832
+ "click": "可选:点击路径跳转到API调试"
833
+ }
834
+ },
835
+
836
+ "C30-ParameterTable": {
837
+ "id": "C30",
838
+ "ref": "ParameterTable",
839
+ "name": "ParameterTable",
840
+ "category": "ORGANISM",
841
+ "description": "API参数结构化表格,支持嵌套展开",
842
+ "dimensions": {
843
+ "headerHeight": 36,
844
+ "rowHeight": 40,
845
+ "indentPerLevel": 24,
846
+ "maxNestLevel": 3
847
+ },
848
+ "typography": {
849
+ "paramName": { "fontFamily": "monospace", "fontSize": 13 },
850
+ "description": { "fontSize": 12, "color": "hsl(var(--gray-secondary-foreground))" }
851
+ },
852
+ "visual": {
853
+ "headerBg": "hsl(var(--gray-muted))",
854
+ "borderColor": "hsl(var(--gray-line))",
855
+ "typeColors": {
856
+ "string": "hsl(218 100% 47%)",
857
+ "number": "hsl(142 76% 36%)",
858
+ "boolean": "hsl(40 88% 48%)",
859
+ "object": "hsl(262 83% 58%)",
860
+ "array": "hsl(180 60% 40%)"
861
+ },
862
+ "requiredMark": "hsl(var(--destructive))",
863
+ "nestLine": "1px solid hsl(var(--gray-line))"
864
+ },
865
+ "variants": [
866
+ {
867
+ "name": "request",
868
+ "description": "请求参数表",
869
+ "columns": ["参数名", "类型", "必填", "说明"]
870
+ },
871
+ {
872
+ "name": "response",
873
+ "description": "响应参数表",
874
+ "columns": ["参数名", "类型", "说明"]
875
+ },
876
+ {
877
+ "name": "header",
878
+ "description": "请求头参数表",
879
+ "columns": ["参数名", "类型", "必填", "说明"]
880
+ }
881
+ ],
882
+ "interactions": {
883
+ "expand": "左侧箭头▶/▼展开子参数",
884
+ "hover": "行hover高亮",
885
+ "collapse-optional": "参数>30时默认折叠选填参数 + '展示全部'"
886
+ }
887
+ },
888
+
889
+ "C31-MetricCard": {
890
+ "id": "C31",
891
+ "ref": "MetricCard",
892
+ "name": "MetricCard",
893
+ "category": "MOLECULE",
894
+ "description": "单指标数值展示卡片,含趋势与迷你图",
895
+ "dimensions": {
896
+ "height": 96,
897
+ "minWidth": 200,
898
+ "padding": "16px 20px",
899
+ "sparklineHeight": 24
900
+ },
901
+ "typography": {
902
+ "title": { "fontSize": 12, "fontWeight": 400, "color": "hsl(var(--muted-foreground))" },
903
+ "value": { "fontSize": 24, "fontWeight": 600, "color": "hsl(var(--gray-primary))" },
904
+ "unit": { "fontSize": 14, "fontWeight": 400, "color": "hsl(var(--muted-foreground))" },
905
+ "trend": { "fontSize": 12 }
906
+ },
907
+ "visual": {
908
+ "background": "hsl(var(--gray-muted))",
909
+ "borderRadius": "var(--radius-md)",
910
+ "trendColors": {
911
+ "up": "hsl(var(--success))",
912
+ "down": "hsl(var(--destructive))",
913
+ "flat": "hsl(var(--muted-foreground))"
914
+ },
915
+ "sparklineWidth": 1.5
916
+ },
917
+ "layout": {
918
+ "grid": "repeat(4, 1fr)",
919
+ "gap": 12
920
+ },
921
+ "responsive": {
922
+ "1200": { "grid": "repeat(2, 1fr)" },
923
+ "768": { "grid": "1fr" }
924
+ },
925
+ "variants": [
926
+ {
927
+ "name": "default",
928
+ "description": "标准指标卡(标题+数值+趋势)"
929
+ },
930
+ {
931
+ "name": "with-sparkline",
932
+ "description": "含底部迷你趋势图"
933
+ },
934
+ {
935
+ "name": "compact",
936
+ "description": "紧凑模式(高度 72px,无迷你图)",
937
+ "height": 72
938
+ }
939
+ ]
940
+ },
941
+
942
+ "C32-ChartPanel": {
943
+ "id": "C32",
944
+ "ref": "ChartPanel",
945
+ "name": "ChartPanel",
946
+ "category": "ORGANISM",
947
+ "description": "图表面板容器,支持折线图/柱状图/面积图",
948
+ "dimensions": {
949
+ "heightFull": 280,
950
+ "heightGrid": 220,
951
+ "padding": 16,
952
+ "titleBarHeight": 32
953
+ },
954
+ "typography": {
955
+ "title": { "fontSize": 14, "fontWeight": 500 },
956
+ "axisLabel": { "fontSize": 11, "color": "hsl(var(--muted-foreground))" },
957
+ "tooltip": { "fontSize": 12 }
958
+ },
959
+ "visual": {
960
+ "background": "transparent",
961
+ "borderRadius": "var(--radius-md)",
962
+ "gridLineColor": "hsl(var(--gray-line))",
963
+ "gridLineStyle": "dashed",
964
+ "gridLineWidth": 0.5,
965
+ "primaryLineColor": "hsl(var(--primary))",
966
+ "lineWidth": 2,
967
+ "dotRadius": 3
968
+ },
969
+ "layout": {
970
+ "gridColumns": "repeat(2, 1fr)",
971
+ "gridGap": 16
972
+ },
973
+ "responsive": {
974
+ "768": { "gridColumns": "1fr", "heightGrid": 200 }
975
+ },
976
+ "variants": [
977
+ {
978
+ "name": "line",
979
+ "description": "折线图"
980
+ },
981
+ {
982
+ "name": "bar",
983
+ "description": "柱状图"
984
+ },
985
+ {
986
+ "name": "area",
987
+ "description": "面积图(折线+填充)"
988
+ }
989
+ ],
990
+ "states": {
991
+ "loading": "Skeleton脉冲动画占位",
992
+ "empty": "居中'暂无数据'+图表图标",
993
+ "error": "居中'加载失败'+重试按钮"
994
+ }
995
+ },
996
+
997
+ "C33-AlertList": {
998
+ "id": "C33",
999
+ "ref": "AlertList",
1000
+ "name": "AlertList",
1001
+ "category": "ORGANISM",
1002
+ "description": "告警事件列表,按严重度分级展示",
1003
+ "dimensions": {
1004
+ "itemMinHeight": 56,
1005
+ "itemPadding": "12px 16px",
1006
+ "dotSize": 20,
1007
+ "gap": 0
1008
+ },
1009
+ "typography": {
1010
+ "title": { "fontSize": 13, "fontWeight": 500, "color": "hsl(var(--gray-primary))" },
1011
+ "timestamp": { "fontSize": 12, "color": "hsl(var(--muted-foreground))" },
1012
+ "description": { "fontSize": 12, "color": "hsl(var(--gray-secondary-foreground))", "maxLines": 2 }
1013
+ },
1014
+ "visual": {
1015
+ "borderBottom": "1px solid hsl(var(--gray-line))",
1016
+ "severityColors": {
1017
+ "critical": "hsl(var(--destructive))",
1018
+ "warning": "hsl(var(--warning))",
1019
+ "info": "hsl(var(--primary))"
1020
+ },
1021
+ "hoverBg": "hsl(var(--gray-muted))"
1022
+ },
1023
+ "variants": [
1024
+ {
1025
+ "name": "default",
1026
+ "description": "标准告警列表"
1027
+ },
1028
+ {
1029
+ "name": "compact",
1030
+ "description": "紧凑模式(隐藏描述,高度 40px)"
1031
+ }
1032
+ ],
1033
+ "states": {
1034
+ "empty": "'暂无告警,系统运行正常' + 绿色✓图标",
1035
+ "loading": "Skeleton条目占位"
1036
+ },
1037
+ "interactions": {
1038
+ "acknowledge": "右侧确认按钮(Ghost),hover显示",
1039
+ "expand": "点击条目展开详细描述",
1040
+ "filter": "顶部可选严重度筛选Tab"
1041
+ }
1042
+ },
1043
+
1044
+ "C34-TimeRangeSelector": {
1045
+ "id": "C34",
1046
+ "ref": "TimeRangeSelector",
1047
+ "name": "TimeRangeSelector",
1048
+ "category": "MOLECULE",
1049
+ "description": "时间范围快捷选择器,SegmentedControl样式",
1050
+ "dimensions": {
1051
+ "height": 32,
1052
+ "itemPadding": "0 12px"
1053
+ },
1054
+ "typography": {
1055
+ "label": { "fontSize": 12, "fontWeight": 500 }
1056
+ },
1057
+ "visual": {
1058
+ "borderRadius": "var(--radius-md)",
1059
+ "selectedBg": "hsl(var(--primary))",
1060
+ "selectedColor": "hsl(var(--primary-foreground))",
1061
+ "unselectedBg": "transparent",
1062
+ "unselectedColor": "hsl(var(--gray-secondary-foreground))",
1063
+ "border": "1px solid hsl(var(--gray-line))"
1064
+ },
1065
+ "presets": ["1h", "6h", "24h", "7d", "30d"],
1066
+ "variants": [
1067
+ {
1068
+ "name": "default",
1069
+ "description": "预设时间范围选择"
1070
+ },
1071
+ {
1072
+ "name": "with-custom",
1073
+ "description": "含自定义范围(日历图标)",
1074
+ "extraUI": "右侧日历图标,点击弹出DateRangePicker"
1075
+ }
1076
+ ],
1077
+ "interactions": {
1078
+ "select": "点击预设项切换,触发全局数据刷新",
1079
+ "custom": "点击日历图标打开DateRangePicker弹层"
1080
+ }
1081
+ }
1082
+ }
1083
+ }