@teamix-evo/ui 0.7.0 → 0.7.2

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 (121) hide show
  1. package/manifest.json +16 -7
  2. package/package.json +4 -4
  3. package/src/_design-system/theme-tokens/stories.tsx +2 -2
  4. package/src/components/accordion/index.tsx +1 -1
  5. package/src/components/affix/meta.md +26 -0
  6. package/src/components/alert/index.tsx +2 -2
  7. package/src/components/alert-dialog/index.tsx +3 -3
  8. package/src/components/alert-dialog/meta.md +52 -0
  9. package/src/components/alert-dialog/stories.tsx +45 -48
  10. package/src/components/avatar/index.tsx +1 -1
  11. package/src/components/badge/index.tsx +2 -2
  12. package/src/components/badge/meta.md +48 -0
  13. package/src/components/button/index.tsx +2 -2
  14. package/src/components/button/meta.md +15 -0
  15. package/src/components/button/stories.tsx +1 -1
  16. package/src/components/calendar/index.tsx +2 -2
  17. package/src/components/card/index.tsx +1 -1
  18. package/src/components/carousel/index.tsx +2 -2
  19. package/src/components/carousel/meta.md +34 -2
  20. package/src/components/carousel/stories.tsx +2 -2
  21. package/src/components/cascader-select/index.tsx +2 -1
  22. package/src/components/cascader-select/meta.md +46 -0
  23. package/src/components/checkbox/meta.md +47 -0
  24. package/src/components/color-picker/index.tsx +3 -3
  25. package/src/components/color-picker/meta.md +80 -0
  26. package/src/components/combobox/index.tsx +2 -2
  27. package/src/components/combobox/meta.md +130 -0
  28. package/src/components/data-table/index.tsx +3 -3
  29. package/src/components/data-table/meta.md +419 -0
  30. package/src/components/data-table/stories.tsx +4 -4
  31. package/src/components/date-picker/meta.md +91 -0
  32. package/src/components/descriptions/index.tsx +1 -1
  33. package/src/components/descriptions/meta.md +245 -0
  34. package/src/components/dialog/index.tsx +4 -4
  35. package/src/components/dialog/meta.md +47 -1
  36. package/src/components/dialog/stories.tsx +38 -41
  37. package/src/components/dropdown-menu/index.tsx +5 -5
  38. package/src/components/empty/index.tsx +2 -2
  39. package/src/components/field/index.tsx +4 -4
  40. package/src/components/filter-bar/index.tsx +6 -6
  41. package/src/components/filter-bar/meta.md +323 -0
  42. package/src/components/float-button/index.tsx +2 -2
  43. package/src/components/form/index.tsx +1 -1
  44. package/src/components/form/meta.md +119 -0
  45. package/src/components/hover-card/index.tsx +1 -1
  46. package/src/components/hover-card/meta.md +21 -0
  47. package/src/components/input/meta.md +16 -0
  48. package/src/components/input-group/index.tsx +1 -1
  49. package/src/components/input-group/meta.md +118 -0
  50. package/src/components/input-group/stories.tsx +6 -6
  51. package/src/components/input-ip/index.tsx +2 -2
  52. package/src/components/input-ip/meta.md +30 -0
  53. package/src/components/input-ip/stories.tsx +2 -2
  54. package/src/components/input-number/index.tsx +3 -2
  55. package/src/components/input-number/meta.md +67 -0
  56. package/src/components/input-number/stories.tsx +2 -2
  57. package/src/components/item/index.tsx +4 -4
  58. package/src/components/label/meta.md +8 -0
  59. package/src/components/mentions/meta.md +15 -0
  60. package/src/components/menubar/index.tsx +4 -4
  61. package/src/components/navigation-menu/index.tsx +4 -4
  62. package/src/components/page-header/index.tsx +2 -2
  63. package/src/components/page-header/meta.md +145 -0
  64. package/src/components/page-shell/index.tsx +3 -3
  65. package/src/components/pagination/index.tsx +1 -1
  66. package/src/components/pagination/meta.md +203 -0
  67. package/src/components/popconfirm/meta.md +45 -0
  68. package/src/components/popover/index.tsx +2 -2
  69. package/src/components/popover/meta.md +47 -0
  70. package/src/components/progress/index.tsx +1 -1
  71. package/src/components/progress/meta.md +36 -0
  72. package/src/components/progress/stories.tsx +1 -1
  73. package/src/components/radio-group/meta.md +69 -0
  74. package/src/components/rate/index.tsx +1 -1
  75. package/src/components/rate/meta.md +50 -0
  76. package/src/components/resizable/index.tsx +1 -1
  77. package/src/components/select/index.tsx +2 -2
  78. package/src/components/select/meta.md +20 -0
  79. package/src/components/separator/index.tsx +1 -1
  80. package/src/components/sheet/index.tsx +13 -14
  81. package/src/components/sheet/meta.md +124 -0
  82. package/src/components/sheet/stories.tsx +110 -119
  83. package/src/components/sidebar/index.tsx +5 -5
  84. package/src/components/sidebar/meta.md +383 -0
  85. package/src/components/skeleton/meta.md +13 -0
  86. package/src/components/slider/index.tsx +2 -2
  87. package/src/components/sonner/meta.md +86 -0
  88. package/src/components/spinner/meta.md +46 -0
  89. package/src/components/spinner/stories.tsx +2 -2
  90. package/src/components/steps/meta.md +20 -0
  91. package/src/components/steps/stories.tsx +1 -1
  92. package/src/components/switch/index.tsx +2 -2
  93. package/src/components/switch/meta.md +33 -0
  94. package/src/components/table/index.tsx +4 -4
  95. package/src/components/table/meta.md +11 -0
  96. package/src/components/tabs/index.tsx +7 -7
  97. package/src/components/tabs/meta.md +52 -0
  98. package/src/components/tag/index.tsx +8 -8
  99. package/src/components/tag/meta.md +194 -0
  100. package/src/components/textarea/index.tsx +1 -1
  101. package/src/components/textarea/meta.md +27 -0
  102. package/src/components/textarea/stories.tsx +1 -1
  103. package/src/components/time-picker/index.tsx +3 -3
  104. package/src/components/time-picker/meta.md +76 -0
  105. package/src/components/timeline/index.tsx +1 -0
  106. package/src/components/toggle/index.tsx +1 -1
  107. package/src/components/toggle-group/index.tsx +1 -1
  108. package/src/components/tooltip/index.tsx +1 -1
  109. package/src/components/tooltip/meta.md +23 -0
  110. package/src/components/transfer/index.tsx +2 -2
  111. package/src/components/transfer/meta.md +97 -0
  112. package/src/components/tree/index.tsx +245 -15
  113. package/src/components/tree/meta.md +151 -0
  114. package/src/components/tree-select/index.tsx +16 -2
  115. package/src/components/tree-select/meta.md +150 -0
  116. package/src/components/typography/index.tsx +3 -3
  117. package/src/components/upload/index.tsx +3 -3
  118. package/src/components/upload/meta.md +82 -0
  119. package/src/components/tree/utils.ts +0 -269
  120. package/src/examples/built-in-assets/stories.tsx +0 -572
  121. package/src/examples/evaluators/stories.tsx +0 -502
@@ -1,572 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import {
3
- Sidebar,
4
- SidebarContent,
5
- SidebarFooter,
6
- SidebarGroup,
7
- SidebarGroupContent,
8
- SidebarGroupLabel,
9
- SidebarHeader,
10
- SidebarMenu,
11
- SidebarMenuButton,
12
- SidebarMenuItem,
13
- } from '@/components/sidebar';
14
- import { PageShell } from '@/components/page-shell';
15
- import { PageHeader, PageHeaderHeading } from '@/components/page-header';
16
- import { Card, CardContent } from '@/components/card';
17
- import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/tabs';
18
- import { Input } from '@/components/input';
19
- import {
20
- Select,
21
- SelectContent,
22
- SelectItem,
23
- SelectTrigger,
24
- SelectValue,
25
- } from '@/components/select';
26
- import { Avatar, AvatarFallback } from '@/components/avatar';
27
- import { Badge } from '@/components/badge';
28
- import { Tag } from '@/components/tag';
29
- import { TooltipProvider } from '@/components/tooltip';
30
- import {
31
- Search,
32
- Bot,
33
- BookOpen,
34
- Sparkles,
35
- ShieldCheck,
36
- FlaskConical,
37
- BarChart3,
38
- MoreVertical,
39
- PanelLeftClose,
40
- LayoutGrid,
41
- Wrench,
42
- Brain,
43
- MessageSquare,
44
- FileText,
45
- ListChecks,
46
- Activity,
47
- ClipboardList,
48
- ChevronDown,
49
- } from 'lucide-react';
50
-
51
- const meta: Meta = {
52
- title: '页面示例 · Page Examples/内置资产 卡片列表',
53
- tags: ['autodocs'],
54
- parameters: {
55
- layout: 'fullscreen',
56
- },
57
- };
58
- export default meta;
59
-
60
- type Story = StoryObj;
61
-
62
- // ─── Mock Data ─────────────────────────────────────────────────────────────
63
-
64
- const builtInSkills = [
65
- {
66
- id: '1',
67
- name: '网络搜索',
68
- subName: 'web-search',
69
- version: 'v1.0.0',
70
- description: 'Web search and content extraction with Tavily and Exa ...',
71
- category: 'AI能力',
72
- categoryPalette: 'blue' as const,
73
- security: 'safe' as const,
74
- installStatus: 'installed' as const,
75
- createdAt: '2026-04-16',
76
- avatarColor: 'bg-primary',
77
- },
78
- {
79
- id: '2',
80
- name: '曙光环境综合运维工具集',
81
- subName: 'sgenv',
82
- version: 'v1.0.0',
83
- description: '统一CLI入口,覆盖环境代理查询、数据库信息、DockerID...',
84
- category: '数据处理',
85
- categoryPalette: 'green' as const,
86
- security: 'safe' as const,
87
- installStatus: 'installed' as const,
88
- createdAt: '2026-04-16',
89
- avatarColor: 'bg-success',
90
- },
91
- {
92
- id: '3',
93
- name: '经验总结与改进',
94
- subName: 'self-improvement',
95
- version: 'v1.0.0',
96
- description: 'Captures learnings, errors, and corrections to enable c...',
97
- category: '自动化',
98
- categoryPalette: 'orange' as const,
99
- security: 'safe' as const,
100
- installStatus: 'has-update' as const,
101
- createdAt: '2026-04-16',
102
- avatarColor: 'bg-data-4',
103
- },
104
- {
105
- id: '4',
106
- name: '天气查询',
107
- subName: 'weather',
108
- version: 'v1.0.0',
109
- description: 'Get current weather and forecasts (no API required).',
110
- category: 'AI能力',
111
- categoryPalette: 'blue' as const,
112
- security: 'safe' as const,
113
- installStatus: 'not-installed' as const,
114
- createdAt: '2026-04-16',
115
- avatarColor: 'bg-primary',
116
- },
117
- {
118
- id: '5',
119
- name: 'A/B test方案制定',
120
- subName: 'ab-test-setup',
121
- version: 'v1.0.0',
122
- description: 'When the user wants to plan, design, or implement an ...',
123
- category: '数据处理',
124
- categoryPalette: 'green' as const,
125
- security: 'safe' as const,
126
- installStatus: 'not-installed' as const,
127
- createdAt: '2026-04-16',
128
- avatarColor: 'bg-warning',
129
- },
130
- {
131
- id: '6',
132
- name: '代码质控',
133
- subName: 'code-quality-checker',
134
- version: 'v1.0.0',
135
- description: '代码质量检测技能,在代码更新完成后自动进行多维度质量...',
136
- category: '数据处理',
137
- categoryPalette: 'green' as const,
138
- security: 'safe' as const,
139
- installStatus: 'not-installed' as const,
140
- createdAt: '2026-04-16',
141
- avatarColor: 'bg-brand-3',
142
- },
143
- {
144
- id: '7',
145
- name: '分析追踪',
146
- subName: 'analytics-tracking',
147
- version: 'v1.0.0',
148
- description: 'When the user wants to set up, improve, or audit analyt...',
149
- category: 'AI能力',
150
- categoryPalette: 'blue' as const,
151
- security: 'safe' as const,
152
- installStatus: 'not-installed' as const,
153
- createdAt: '2026-04-16',
154
- avatarColor: 'bg-success',
155
- },
156
- {
157
- id: '8',
158
- name: '头脑风暴',
159
- subName: 'brainstorming',
160
- version: 'v1.0.0',
161
- description: 'You MUST use this before any creative work - creating ...',
162
- category: 'AI能力',
163
- categoryPalette: 'blue' as const,
164
- security: 'safe' as const,
165
- installStatus: 'not-installed' as const,
166
- createdAt: '2026-04-16',
167
- avatarColor: 'bg-warning',
168
- },
169
- {
170
- id: '9',
171
- name: '深度研究',
172
- subName: 'deep-research',
173
- version: 'v1.0.0',
174
- description: '综合多来源信息并引用的深度研究助手,适用于进行深...',
175
- category: 'AI能力',
176
- categoryPalette: 'blue' as const,
177
- security: 'safe' as const,
178
- installStatus: 'not-installed' as const,
179
- createdAt: '2026-04-16',
180
- avatarColor: 'bg-data-4',
181
- },
182
- ];
183
-
184
- // ─── Sidebar ───────────────────────────────────────────────────────────────
185
-
186
- /**
187
- * OP Logo — inline SVG(来源:_assets/OP_LOGO.svg)
188
- * 外层 rect 使用 fill="currentColor" 适配主题,内层图案使用 fill="white"
189
- */
190
- function OpLogo({ className }: { className?: string }) {
191
- return (
192
- <svg
193
- xmlns="http://www.w3.org/2000/svg"
194
- fill="none"
195
- viewBox="0 0 84 84"
196
- className={className}
197
- >
198
- <defs>
199
- <clipPath id="opai-logo-clip-built-in-assets">
200
- <rect x="0" y="0" width="84" height="84" rx="18" />
201
- </clipPath>
202
- </defs>
203
- <g clipPath="url(#opai-logo-clip-built-in-assets)">
204
- <rect x="0" y="0" width="84" height="84" rx="18" fill="currentColor" />
205
- <path
206
- d="M56.628 43.209L48.407 45.869C46.698 46.422 45.142 44.688 45.876 43.048L60.648 10.047C61.316 8.554 62.798 7.594 64.434 7.594L70.258 7.594C71.893 7.594 73.376 8.554 74.044 10.047L88.816 43.048C89.55 44.688 87.994 46.422 86.284 45.869L78.063 43.209C77.784 43.119 77.556 42.914 77.436 42.646L69.239 24.334C68.507 22.698 66.185 22.698 65.453 24.334L57.255 42.646C57.136 42.914 56.908 43.119 56.628 43.209ZM54.737 51.511C53.792 51.195 53.792 49.859 54.737 49.543L63.03 46.774C63.3 46.684 63.521 46.487 63.641 46.229L66.407 40.304C66.779 39.506 67.914 39.506 68.286 40.304L71.052 46.229C71.172 46.487 71.393 46.684 71.663 46.774L79.956 49.543C80.901 49.859 80.901 51.195 79.956 51.511L71.663 54.28C71.393 54.37 71.172 54.567 71.052 54.825L68.286 60.75C67.914 61.548 66.779 61.548 66.407 60.75L63.641 54.825C63.521 54.567 63.3 54.37 63.03 54.28L54.737 51.511Z"
207
- fillRule="evenodd"
208
- fill="white"
209
- transform="matrix(0.707 0.707 -0.707 0.707 18.752 -30.083)"
210
- />
211
- </g>
212
- </svg>
213
- );
214
- }
215
-
216
- function OpentrekSidebar() {
217
- return (
218
- <Sidebar collapsible="none">
219
- <SidebarHeader className="px-4 pt-4 pb-0">
220
- <div className="flex items-center justify-between">
221
- <div className="flex h-8 items-center gap-2">
222
- <OpLogo className="size-6 shrink-0 text-foreground" />
223
- <span className="text-base font-black leading-tight tracking-tight">
224
- OPENTREK
225
- {/* eslint-disable-next-line teamix-evo/no-arbitrary-tw-value -- demo badge 10px 无对应 token */}
226
- <span className="ml-1 text-[10px] font-bold tracking-wider text-muted-foreground">
227
- DEV
228
- </span>
229
- </span>
230
- </div>
231
- <button
232
- type="button"
233
- className="flex size-7 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground"
234
- >
235
- <PanelLeftClose className="size-4" />
236
- </button>
237
- </div>
238
- </SidebarHeader>
239
-
240
- <SidebarContent className="pt-4">
241
- {/* 空间选择器 */}
242
- <SidebarGroup>
243
- <SidebarGroupContent>
244
- <SidebarMenu>
245
- <SidebarMenuItem>
246
- <SidebarMenuButton tooltip="产品研发空间">
247
- <Bot className="size-4" />
248
- <span>产品研发空间</span>
249
- <ChevronDown className="ml-auto size-3.5 text-muted-foreground" />
250
- </SidebarMenuButton>
251
- </SidebarMenuItem>
252
- </SidebarMenu>
253
- </SidebarGroupContent>
254
- </SidebarGroup>
255
-
256
- {/* 概览 */}
257
- <SidebarGroup>
258
- <SidebarGroupContent>
259
- <SidebarMenu>
260
- <SidebarMenuItem>
261
- <SidebarMenuButton tooltip="概览">
262
- <LayoutGrid className="size-4" />
263
- <span>概览</span>
264
- </SidebarMenuButton>
265
- </SidebarMenuItem>
266
- </SidebarMenu>
267
- </SidebarGroupContent>
268
- </SidebarGroup>
269
-
270
- {/* 开发 */}
271
- <SidebarGroup>
272
- <SidebarGroupLabel>开发</SidebarGroupLabel>
273
- <SidebarGroupContent>
274
- <SidebarMenu>
275
- <SidebarMenuItem>
276
- <SidebarMenuButton tooltip="智能体">
277
- <Bot className="size-4" />
278
- <span>智能体</span>
279
- </SidebarMenuButton>
280
- </SidebarMenuItem>
281
- <SidebarMenuItem>
282
- <SidebarMenuButton tooltip="工具箱">
283
- <Wrench className="size-4" />
284
- <span>工具箱</span>
285
- </SidebarMenuButton>
286
- </SidebarMenuItem>
287
- </SidebarMenu>
288
- </SidebarGroupContent>
289
- </SidebarGroup>
290
-
291
- {/* Skills Hub (独立项,当前激活) */}
292
- <SidebarGroup>
293
- <SidebarGroupContent>
294
- <SidebarMenu>
295
- <SidebarMenuItem>
296
- <SidebarMenuButton isActive tooltip="Skills Hub">
297
- <Sparkles className="size-4" />
298
- <span>Skills Hub</span>
299
- </SidebarMenuButton>
300
- </SidebarMenuItem>
301
- <SidebarMenuItem>
302
- <SidebarMenuButton tooltip="记忆体">
303
- <Brain className="size-4" />
304
- <span>记忆体</span>
305
- </SidebarMenuButton>
306
- </SidebarMenuItem>
307
- <SidebarMenuItem>
308
- <SidebarMenuButton tooltip="知识库">
309
- <BookOpen className="size-4" />
310
- <span>知识库</span>
311
- </SidebarMenuButton>
312
- </SidebarMenuItem>
313
- <SidebarMenuItem>
314
- <SidebarMenuButton tooltip="提示词">
315
- <MessageSquare className="size-4" />
316
- <span>提示词</span>
317
- </SidebarMenuButton>
318
- </SidebarMenuItem>
319
- </SidebarMenu>
320
- </SidebarGroupContent>
321
- </SidebarGroup>
322
-
323
- {/* 评测 */}
324
- <SidebarGroup>
325
- <SidebarGroupLabel>评测</SidebarGroupLabel>
326
- <SidebarGroupContent>
327
- <SidebarMenu>
328
- <SidebarMenuItem>
329
- <SidebarMenuButton tooltip="评测集">
330
- <FileText className="size-4" />
331
- <span>评测集</span>
332
- </SidebarMenuButton>
333
- </SidebarMenuItem>
334
- <SidebarMenuItem>
335
- <SidebarMenuButton tooltip="评估器">
336
- <FlaskConical className="size-4" />
337
- <span>评估器</span>
338
- </SidebarMenuButton>
339
- </SidebarMenuItem>
340
- <SidebarMenuItem>
341
- <SidebarMenuButton tooltip="评测任务">
342
- <ListChecks className="size-4" />
343
- <span>评测任务</span>
344
- </SidebarMenuButton>
345
- </SidebarMenuItem>
346
- </SidebarMenu>
347
- </SidebarGroupContent>
348
- </SidebarGroup>
349
-
350
- {/* 观测 */}
351
- <SidebarGroup>
352
- <SidebarGroupLabel>观测</SidebarGroupLabel>
353
- <SidebarGroupContent>
354
- <SidebarMenu>
355
- <SidebarMenuItem>
356
- <SidebarMenuButton tooltip="指标监控">
357
- <BarChart3 className="size-4" />
358
- <span>指标监控</span>
359
- </SidebarMenuButton>
360
- </SidebarMenuItem>
361
- <SidebarMenuItem>
362
- <SidebarMenuButton tooltip="Trace追踪">
363
- <Activity className="size-4" />
364
- <span>Trace追踪</span>
365
- </SidebarMenuButton>
366
- </SidebarMenuItem>
367
- <SidebarMenuItem>
368
- <SidebarMenuButton tooltip="操作记录">
369
- <ClipboardList className="size-4" />
370
- <span>操作记录</span>
371
- </SidebarMenuButton>
372
- </SidebarMenuItem>
373
- </SidebarMenu>
374
- </SidebarGroupContent>
375
- </SidebarGroup>
376
- </SidebarContent>
377
-
378
- <SidebarFooter>
379
- <div className="flex items-center gap-2 px-3 py-3">
380
- <div className="flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold">
381
-
382
- </div>
383
- <span className="truncate text-sm font-medium">少食</span>
384
- <button
385
- type="button"
386
- className="ml-auto flex size-7 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground"
387
- >
388
- <MoreVertical className="size-4" />
389
- </button>
390
- </div>
391
- </SidebarFooter>
392
- </Sidebar>
393
- );
394
- }
395
-
396
- // ─── ItemCard (Labeled Fields 布局,匹配目标设计) ─────────────────────────
397
-
398
- function ItemCard({ skill }: { skill: (typeof builtInSkills)[number] }) {
399
- return (
400
- <Card className="group/item relative cursor-pointer transition-shadow hover:shadow-md">
401
- <CardContent className="flex flex-col gap-2.5">
402
- {/* Title Row: Avatar + Name + SubName */}
403
- <div className="flex items-center gap-3">
404
- <Avatar className="size-10 shrink-0 rounded-lg">
405
- <AvatarFallback
406
- className={`rounded-lg text-base font-semibold text-white ${skill.avatarColor}`}
407
- >
408
- {skill.name.charAt(0)}
409
- </AvatarFallback>
410
- </Avatar>
411
- <div className="min-w-0 flex-1">
412
- <div className="truncate text-sm font-semibold text-foreground">
413
- {skill.name}
414
- </div>
415
- <div className="truncate text-xs text-muted-foreground">
416
- {skill.subName}
417
- </div>
418
- </div>
419
- </div>
420
-
421
- {/* 描述 */}
422
- <div className="text-xs text-muted-foreground">
423
- <span className="text-foreground/70">描述:</span>
424
- <span className="line-clamp-1">{skill.description}</span>
425
- </div>
426
-
427
- {/* 版本 */}
428
- <div className="text-xs text-muted-foreground">
429
- <span className="text-foreground/70">版本:</span>
430
- {skill.version}
431
- </div>
432
-
433
- {/* 安全扫描 */}
434
- <div className="flex items-center gap-1 text-xs">
435
- <span className="text-foreground/70">安全扫描:</span>
436
- {skill.security === 'safe' ? (
437
- <Badge
438
- variant="outline"
439
- className="h-5 gap-0.5 px-1.5 text-success"
440
- >
441
- <ShieldCheck className="size-3" />
442
- 安全
443
- </Badge>
444
- ) : (
445
- <Badge
446
- variant="outline"
447
- className="h-5 gap-0.5 px-1.5 text-destructive"
448
- >
449
- <ShieldCheck className="size-3" />
450
- 有风险
451
- </Badge>
452
- )}
453
- </div>
454
-
455
- {/* 安装状态 */}
456
- <div className="flex items-center gap-1 text-xs">
457
- <span className="text-foreground/70">安装状态:</span>
458
- {skill.installStatus === 'installed' && (
459
- <Tag variant="status" status="success">
460
- 已安装
461
- </Tag>
462
- )}
463
- {skill.installStatus === 'not-installed' && (
464
- <span className="text-muted-foreground">未安装</span>
465
- )}
466
- {skill.installStatus === 'has-update' && (
467
- <Tag variant="status" status="warning">
468
- 有更新
469
- </Tag>
470
- )}
471
- </div>
472
-
473
- {/* 标签分类 */}
474
- <div className="flex items-center gap-1 text-xs">
475
- <span className="text-foreground/70">标签分类:</span>
476
- <Tag palette={skill.categoryPalette}>{skill.category}</Tag>
477
- </div>
478
-
479
- {/* 创建时间 */}
480
- <div className="text-xs text-muted-foreground">
481
- <span>📅 创建时间:{skill.createdAt}</span>
482
- </div>
483
- </CardContent>
484
- </Card>
485
- );
486
- }
487
-
488
- // ─── Page Story ────────────────────────────────────────────────────────────
489
-
490
- /** Skills Hub - OT-CL-1 Tab导航卡片列表(内置Skills Tab) */
491
- export const Default: Story = {
492
- render: () => (
493
- <TooltipProvider>
494
- <PageShell
495
- sidebar={<OpentrekSidebar />}
496
- background="muted"
497
- // eslint-disable-next-line teamix-evo/no-arbitrary-tw-value -- Storybook 固定高度展示
498
- className="h-[900px]"
499
- >
500
- <div className="flex-1 p-5">
501
- <Card>
502
- <CardContent className="flex flex-col gap-4">
503
- {/* PageHeader */}
504
- <PageHeader>
505
- <PageHeaderHeading>
506
- <span className="text-lg font-medium">Skills Hub</span>
507
- </PageHeaderHeading>
508
- </PageHeader>
509
-
510
- {/* Tabs */}
511
- <Tabs defaultValue="builtin" className="flex-col">
512
- <TabsList variant="line">
513
- <TabsTrigger value="workspace">空间Skills</TabsTrigger>
514
- <TabsTrigger value="shared">共享Skills</TabsTrigger>
515
- <TabsTrigger value="builtin">内置Skills</TabsTrigger>
516
- </TabsList>
517
-
518
- <TabsContent
519
- value="builtin"
520
- className="flex flex-col gap-4 pt-4"
521
- >
522
- {/* ActionToolbar */}
523
- <div className="flex items-center gap-2">
524
- <div className="relative">
525
- <Input
526
- placeholder="搜索Skills名称..."
527
- className="w-56 pr-8"
528
- />
529
- <Search className="absolute right-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" />
530
- </div>
531
- <div className="ml-auto">
532
- <Select defaultValue="all">
533
- <SelectTrigger className="w-24">
534
- <SelectValue placeholder="全部" />
535
- </SelectTrigger>
536
- <SelectContent>
537
- <SelectItem value="all">全部</SelectItem>
538
- <SelectItem value="ai">AI能力</SelectItem>
539
- <SelectItem value="data">数据处理</SelectItem>
540
- <SelectItem value="auto">自动化</SelectItem>
541
- </SelectContent>
542
- </Select>
543
- </div>
544
- </div>
545
-
546
- {/* CardGrid - 3列 */}
547
- <div className="grid grid-cols-3 gap-4">
548
- {builtInSkills.map((skill) => (
549
- <ItemCard key={skill.id} skill={skill} />
550
- ))}
551
- </div>
552
- </TabsContent>
553
-
554
- <TabsContent value="workspace" className="pt-4">
555
- <p className="text-sm text-muted-foreground">
556
- 空间Skills内容区(卡片列表)
557
- </p>
558
- </TabsContent>
559
-
560
- <TabsContent value="shared" className="pt-4">
561
- <p className="text-sm text-muted-foreground">
562
- 共享Skills内容区(卡片列表)
563
- </p>
564
- </TabsContent>
565
- </Tabs>
566
- </CardContent>
567
- </Card>
568
- </div>
569
- </PageShell>
570
- </TooltipProvider>
571
- ),
572
- };