@utopia-studio-design/design-system-cli 0.1.0 → 0.2.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 +12 -41
- package/bin/utopia-ds-mcp.mjs +55 -0
- package/bin/utopia-ds.mjs +233 -318
- package/data/docs/ai-platform-plan.md +53 -0
- package/data/docs/arabic-friendly.md +72 -0
- package/data/docs/foundations.md +154 -0
- package/data/docs/guide.md +37 -0
- package/data/docs/quick-start-ai.md +122 -0
- package/data/docs/shadcn-conversion.md +35 -0
- package/data/docs/theme-authoring.md +46 -0
- package/data/manifests/catalog.json +546 -0
- package/data/manifests/components.json +4780 -0
- package/data/manifests/patterns.json +12 -0
- package/data/manifests/templates.json +96 -0
- package/data/manifests/theme-barrier-intelligence.json +123 -0
- package/data/manifests/theme-dextrum.json +255 -0
- package/data/manifests/theme-utopia-default.json +163 -0
- package/data/manifests/themes.json +417 -0
- package/data/templates/saas-solution-homepage/README.md +52 -0
- package/data/templates/saas-solution-homepage/agents/index.html +1 -0
- package/data/templates/saas-solution-homepage/changelog/index.html +1 -0
- package/data/templates/saas-solution-homepage/contact-sales/index.html +1 -0
- package/data/templates/saas-solution-homepage/customers/aster-labs/index.html +1 -0
- package/data/templates/saas-solution-homepage/customers/index.html +1 -0
- package/data/templates/saas-solution-homepage/index.html +17 -0
- package/data/templates/saas-solution-homepage/integrations/index.html +1 -0
- package/data/templates/saas-solution-homepage/integrations/slack/index.html +1 -0
- package/data/templates/saas-solution-homepage/main.tsx +642 -0
- package/data/templates/saas-solution-homepage/pricing/index.html +1 -0
- package/data/templates/saas-solution-homepage/product/index.html +1 -0
- package/data/templates/saas-solution-homepage/styles.css +863 -0
- package/data/templates/saas-solution-homepage/template.manifest.json +36 -0
- package/lib/api.mjs +146 -0
- package/package.json +13 -20
- package/LICENSE +0 -21
- package/templates/agent-docs/examples.md +0 -33
- package/templates/agent-docs/index.md +0 -78
- package/templates/agent-docs/llms.txt +0 -33
- package/templates/components/badge.tsx +0 -12
- package/templates/components/brand-action.tsx +0 -32
- package/templates/components/button-group.tsx +0 -30
- package/templates/components/button.tsx +0 -44
- package/templates/components/card.tsx +0 -23
- package/templates/components/cta-section.tsx +0 -34
- package/templates/components/icon-button.tsx +0 -44
- package/templates/components/page-hero.tsx +0 -47
- package/templates/components/tooltip.tsx +0 -48
- package/templates/components/topbar.tsx +0 -59
- package/templates/lib/utils.ts +0 -6
- package/templates/styles/styles.css +0 -271
- package/templates/styles/tokens.css +0 -21
- package/templates/tokens.json +0 -41
|
@@ -0,0 +1,4780 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Accordion",
|
|
5
|
+
"category": "Disclosure",
|
|
6
|
+
"status": "available",
|
|
7
|
+
"packageImport": "import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@utopia-studio-design/design-system/Accordion';",
|
|
8
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
9
|
+
"shadcnFoundation": [
|
|
10
|
+
"accordion",
|
|
11
|
+
"Radix Accordion",
|
|
12
|
+
"shadcn/ui registry",
|
|
13
|
+
"semantic Utopia wrapper"
|
|
14
|
+
],
|
|
15
|
+
"fallbackToShadcn": "accordion",
|
|
16
|
+
"requiredTokens": [
|
|
17
|
+
"--surface",
|
|
18
|
+
"--surface-hover",
|
|
19
|
+
"--foreground",
|
|
20
|
+
"--muted-foreground",
|
|
21
|
+
"--border",
|
|
22
|
+
"--radius-surface",
|
|
23
|
+
"--space-3",
|
|
24
|
+
"--space-4",
|
|
25
|
+
"--focus-ring-width",
|
|
26
|
+
"--motion-duration-expand",
|
|
27
|
+
"--motion-ease-standard"
|
|
28
|
+
],
|
|
29
|
+
"useWhen": [
|
|
30
|
+
"A sectioned disclosure list needs keyboard-accessible expand/collapse behavior",
|
|
31
|
+
"FAQ, settings, or docs content should stay on one page",
|
|
32
|
+
"One or multiple panels can be open using Radix Accordion semantics"
|
|
33
|
+
],
|
|
34
|
+
"avoidWhen": [
|
|
35
|
+
"A single disclosure is enough; use Collapsible",
|
|
36
|
+
"The content is primary navigation; use Side Nav Section",
|
|
37
|
+
"Opening a panel should route to another page"
|
|
38
|
+
],
|
|
39
|
+
"neverInvent": [
|
|
40
|
+
"Custom disclosure keyboard behavior",
|
|
41
|
+
"Raw shadcn theme colors",
|
|
42
|
+
"Left/right-only indicator placement",
|
|
43
|
+
"Utopia brand primitives inside reusable component logic",
|
|
44
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
45
|
+
],
|
|
46
|
+
"ai": {
|
|
47
|
+
"props": {
|
|
48
|
+
"type": "Use single for one open item, multiple for independent open items.",
|
|
49
|
+
"collapsible": "Allow the active single item to close when the content is optional.",
|
|
50
|
+
"AccordionItem": "Requires a stable value for Radix state.",
|
|
51
|
+
"AccordionTrigger": "Visible section title and full hit target.",
|
|
52
|
+
"AccordionContent": "Panel body. Keep product copy supplied by the app.",
|
|
53
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
54
|
+
},
|
|
55
|
+
"arabicFriendly": "Trigger text uses start alignment and indicator sits at inline-end. In dir=\"rtl\", spacing and hit target must mirror without left/right CSS."
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "Account Status",
|
|
60
|
+
"category": "Data Display",
|
|
61
|
+
"status": "available",
|
|
62
|
+
"packageImport": "import { AccountStatus } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
63
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
64
|
+
"shadcnFoundation": [
|
|
65
|
+
"avatar",
|
|
66
|
+
"Radix Avatar",
|
|
67
|
+
"semantic account/status wrapper",
|
|
68
|
+
"semantic Utopia wrapper"
|
|
69
|
+
],
|
|
70
|
+
"fallbackToShadcn": "avatar",
|
|
71
|
+
"requiredTokens": [
|
|
72
|
+
"--foreground",
|
|
73
|
+
"--muted-foreground",
|
|
74
|
+
"--radius-control",
|
|
75
|
+
"--nav-item-height",
|
|
76
|
+
"--space-2",
|
|
77
|
+
"--font-size-supporting",
|
|
78
|
+
"--line-height-supporting"
|
|
79
|
+
],
|
|
80
|
+
"useWhen": [
|
|
81
|
+
"Showing a signed-in user, workspace, or account status in Top Nav or Side Nav",
|
|
82
|
+
"A compact identity row needs Avatar plus label and optional description",
|
|
83
|
+
"Collapsed side navigation should keep the avatar visible while hiding text"
|
|
84
|
+
],
|
|
85
|
+
"avoidWhen": [
|
|
86
|
+
"Decorative fake people are needed",
|
|
87
|
+
"A logo or product mark should use brand assets instead",
|
|
88
|
+
"A full profile card or account menu is required"
|
|
89
|
+
],
|
|
90
|
+
"neverInvent": [
|
|
91
|
+
"Fake user identity or status copy",
|
|
92
|
+
"Background surfaces by default",
|
|
93
|
+
"Left/right-only layout rules",
|
|
94
|
+
"Utopia brand primitives inside reusable component logic"
|
|
95
|
+
],
|
|
96
|
+
"ai": {
|
|
97
|
+
"props": {
|
|
98
|
+
"avatar": "Optional custom Avatar node. Prefer the design-system Avatar component.",
|
|
99
|
+
"avatarAlt": "Accessible text for the fallback avatar when avatar is not supplied.",
|
|
100
|
+
"avatarSrc": "Optional avatar image source.",
|
|
101
|
+
"avatarFallback": "Fallback initials passed to Avatar.",
|
|
102
|
+
"label": "Required account, user, workspace, or organization label.",
|
|
103
|
+
"description": "Optional status, plan, role, or workspace metadata.",
|
|
104
|
+
"endContent": "Optional trailing status or menu affordance."
|
|
105
|
+
},
|
|
106
|
+
"usage": "Use AccountStatus in Top Nav or Side Nav footer. Keep background transparent by default and let the parent surface own framing."
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "Alert",
|
|
111
|
+
"category": "Feedback",
|
|
112
|
+
"status": "available",
|
|
113
|
+
"packageImport": "import { Alert, AlertDescription, AlertTitle } from '@utopia-studio-design/design-system/Alert';",
|
|
114
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
115
|
+
"shadcnFoundation": [
|
|
116
|
+
"alert",
|
|
117
|
+
"shadcn/ui registry",
|
|
118
|
+
"semantic status surface",
|
|
119
|
+
"semantic Utopia wrapper"
|
|
120
|
+
],
|
|
121
|
+
"fallbackToShadcn": "alert",
|
|
122
|
+
"requiredTokens": [
|
|
123
|
+
"--surface",
|
|
124
|
+
"--foreground",
|
|
125
|
+
"--muted-foreground",
|
|
126
|
+
"--border",
|
|
127
|
+
"--radius-surface",
|
|
128
|
+
"--space-1",
|
|
129
|
+
"--space-3",
|
|
130
|
+
"--space-4",
|
|
131
|
+
"--space-5",
|
|
132
|
+
"--success",
|
|
133
|
+
"--success-foreground",
|
|
134
|
+
"--success-surface",
|
|
135
|
+
"--success-border",
|
|
136
|
+
"--success-text",
|
|
137
|
+
"--warning",
|
|
138
|
+
"--warning-foreground",
|
|
139
|
+
"--warning-surface",
|
|
140
|
+
"--warning-border",
|
|
141
|
+
"--warning-text",
|
|
142
|
+
"--destructive",
|
|
143
|
+
"--destructive-surface",
|
|
144
|
+
"--destructive-border",
|
|
145
|
+
"--destructive-text",
|
|
146
|
+
"--focus-ring-width"
|
|
147
|
+
],
|
|
148
|
+
"useWhen": [
|
|
149
|
+
"Inline status or system notices need to be announced",
|
|
150
|
+
"A warning or destructive state should stay in context",
|
|
151
|
+
"Feedback should not block the user"
|
|
152
|
+
],
|
|
153
|
+
"avoidWhen": [
|
|
154
|
+
"A blocking confirmation is required; use Alert Dialog",
|
|
155
|
+
"The message is purely decorative",
|
|
156
|
+
"The notice needs product-specific localization rules inside the component"
|
|
157
|
+
],
|
|
158
|
+
"neverInvent": [
|
|
159
|
+
"Product alert copy",
|
|
160
|
+
"Raw shadcn theme colors",
|
|
161
|
+
"Left/right-only layout rules",
|
|
162
|
+
"Utopia brand primitives inside reusable component logic"
|
|
163
|
+
],
|
|
164
|
+
"ai": {
|
|
165
|
+
"props": {
|
|
166
|
+
"variant": "Use default, info, success, warning, or destructive. The variant selects the default icon and tokenized status emphasis.",
|
|
167
|
+
"showIcon": "Defaults to true. Set false for text-only alerts when nearby UI already communicates the status.",
|
|
168
|
+
"icon": "Optional ReactNode override. Prefer semantic, non-directional lucide icons unless the alert meaning requires direction.",
|
|
169
|
+
"tone": "Backward-compatible alias for variant. Prefer variant in new code.",
|
|
170
|
+
"AlertTitle": "Short status headline.",
|
|
171
|
+
"AlertDescription": "Supporting details; product owns wording and localization."
|
|
172
|
+
},
|
|
173
|
+
"arabicFriendly": "Use logical spacing and product-supplied localized copy. Mixed Arabic/English text must wrap without overlapping action or icon slots."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "Alert Dialog",
|
|
178
|
+
"category": "Feedback",
|
|
179
|
+
"status": "available",
|
|
180
|
+
"packageImport": "import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@utopia-studio-design/design-system/AlertDialog';",
|
|
181
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
182
|
+
"shadcnFoundation": [
|
|
183
|
+
"alert-dialog",
|
|
184
|
+
"Radix AlertDialog",
|
|
185
|
+
"shadcn/ui registry",
|
|
186
|
+
"semantic Utopia wrapper"
|
|
187
|
+
],
|
|
188
|
+
"fallbackToShadcn": "alert-dialog",
|
|
189
|
+
"requiredTokens": [
|
|
190
|
+
"--surface",
|
|
191
|
+
"--foreground",
|
|
192
|
+
"--muted-foreground",
|
|
193
|
+
"--border",
|
|
194
|
+
"--radius-surface",
|
|
195
|
+
"--radius-control",
|
|
196
|
+
"--primary",
|
|
197
|
+
"--primary-foreground",
|
|
198
|
+
"--secondary",
|
|
199
|
+
"--secondary-foreground",
|
|
200
|
+
"--z-overlay",
|
|
201
|
+
"--z-modal",
|
|
202
|
+
"--focus-ring-width",
|
|
203
|
+
"--overlay",
|
|
204
|
+
"--modal-surface",
|
|
205
|
+
"--motion-duration-reveal",
|
|
206
|
+
"--motion-ease-emphasized"
|
|
207
|
+
],
|
|
208
|
+
"useWhen": [
|
|
209
|
+
"Destructive confirmations",
|
|
210
|
+
"Irreversible decisions",
|
|
211
|
+
"Blocking choices that require explicit acknowledgement and focus trapping"
|
|
212
|
+
],
|
|
213
|
+
"avoidWhen": [
|
|
214
|
+
"Inline status would be enough",
|
|
215
|
+
"The action can be undone without confirmation",
|
|
216
|
+
"The dialog copy is not localized or verified"
|
|
217
|
+
],
|
|
218
|
+
"neverInvent": [
|
|
219
|
+
"Unreviewed destructive copy",
|
|
220
|
+
"Raw shadcn theme colors",
|
|
221
|
+
"Left/right-only footer ordering",
|
|
222
|
+
"Utopia brand primitives inside reusable component logic",
|
|
223
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
224
|
+
],
|
|
225
|
+
"ai": {
|
|
226
|
+
"props": {
|
|
227
|
+
"AlertDialogTrigger": "Use asChild with Button for visible trigger controls.",
|
|
228
|
+
"AlertDialogContent": "Modal content with overlay and semantic surface tokens.",
|
|
229
|
+
"AlertDialogHeader": "Groups title and description.",
|
|
230
|
+
"AlertDialogFooter": "Groups cancel/action controls at inline-end.",
|
|
231
|
+
"AlertDialogCancel": "Non-destructive escape path.",
|
|
232
|
+
"AlertDialogAction": "Confirmed action; pair destructive wording with product-approved copy.",
|
|
233
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
234
|
+
},
|
|
235
|
+
"arabicFriendly": "Footer, text alignment, and modal centering use logical properties. Do not invent Arabic confirmation copy; use supplied localization."
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "Aspect Ratio",
|
|
240
|
+
"category": "Layout",
|
|
241
|
+
"status": "available",
|
|
242
|
+
"packageImport": "import { AspectRatio } from '@utopia-studio-design/design-system/Layout';",
|
|
243
|
+
"sourcePath": "packages/design-system/src/components/Layout.tsx",
|
|
244
|
+
"shadcnFoundation": [
|
|
245
|
+
"aspect-ratio",
|
|
246
|
+
"Radix Aspect Ratio",
|
|
247
|
+
"shadcn/ui registry",
|
|
248
|
+
"semantic Utopia wrapper"
|
|
249
|
+
],
|
|
250
|
+
"fallbackToShadcn": "aspect-ratio",
|
|
251
|
+
"requiredTokens": [
|
|
252
|
+
"--radius-surface",
|
|
253
|
+
"--surface",
|
|
254
|
+
"--border"
|
|
255
|
+
],
|
|
256
|
+
"useWhen": [
|
|
257
|
+
"Media frames need stable dimensions before assets load",
|
|
258
|
+
"Gallery, thumbnail, video, and preview regions need fixed ratios",
|
|
259
|
+
"AI-generated templates need layout stability without viewport-based type scaling"
|
|
260
|
+
],
|
|
261
|
+
"avoidWhen": [
|
|
262
|
+
"Content height is unknown and should grow naturally",
|
|
263
|
+
"A responsive grid should own the sizing instead",
|
|
264
|
+
"Text-only cards need normal content flow"
|
|
265
|
+
],
|
|
266
|
+
"neverInvent": [
|
|
267
|
+
"Viewport-width font scaling",
|
|
268
|
+
"Unstable media boxes",
|
|
269
|
+
"Left/right-only layout rules",
|
|
270
|
+
"Utopia brand primitives inside reusable component logic"
|
|
271
|
+
],
|
|
272
|
+
"ai": {
|
|
273
|
+
"props": {
|
|
274
|
+
"ratio": "Number such as 16 / 9, 4 / 3, or 1. Use constants or expressions, not raw string dimensions."
|
|
275
|
+
},
|
|
276
|
+
"arabicFriendly": "Aspect ratio is direction-neutral. Content inside still needs dir=\"rtl\" checks for text, controls, and media captions."
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "Attachment",
|
|
281
|
+
"category": "Data Display",
|
|
282
|
+
"status": "available",
|
|
283
|
+
"packageImport": "import { Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger } from '@utopia-studio-design/design-system/Attachment';",
|
|
284
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
285
|
+
"shadcnFoundation": [
|
|
286
|
+
"attachment",
|
|
287
|
+
"shadcn/ui registry",
|
|
288
|
+
"composable attachment primitives",
|
|
289
|
+
"semantic Utopia wrapper"
|
|
290
|
+
],
|
|
291
|
+
"fallbackToShadcn": "attachment",
|
|
292
|
+
"requiredTokens": [
|
|
293
|
+
"--surface",
|
|
294
|
+
"--surface-hover",
|
|
295
|
+
"--surface-strong",
|
|
296
|
+
"--foreground",
|
|
297
|
+
"--muted-foreground",
|
|
298
|
+
"--border",
|
|
299
|
+
"--primary",
|
|
300
|
+
"--primary-foreground",
|
|
301
|
+
"--destructive",
|
|
302
|
+
"--ring",
|
|
303
|
+
"--radius-control",
|
|
304
|
+
"--button-height",
|
|
305
|
+
"--button-height-sm",
|
|
306
|
+
"--focus-ring-width",
|
|
307
|
+
"--duration-fast",
|
|
308
|
+
"--duration-medium",
|
|
309
|
+
"--ease-standard"
|
|
310
|
+
],
|
|
311
|
+
"useWhen": [
|
|
312
|
+
"Files or generated artifacts need a compact preview row",
|
|
313
|
+
"An upload, processing, error, or done state needs semantic status styling",
|
|
314
|
+
"A file attachment needs title, description, media, actions, trigger, or grouped layout primitives"
|
|
315
|
+
],
|
|
316
|
+
"avoidWhen": [
|
|
317
|
+
"A full file manager or product-specific upload workflow is required",
|
|
318
|
+
"File validation, storage, or localization rules belong in product logic",
|
|
319
|
+
"Decorative fake files are being generated"
|
|
320
|
+
],
|
|
321
|
+
"neverInvent": [
|
|
322
|
+
"Fake product file names in production examples",
|
|
323
|
+
"Raw shadcn theme colors",
|
|
324
|
+
"Left/right-only action placement",
|
|
325
|
+
"Utopia brand primitives inside reusable component logic"
|
|
326
|
+
],
|
|
327
|
+
"ai": {
|
|
328
|
+
"props": {
|
|
329
|
+
"orientation": "Use horizontal for rows and vertical for stacked previews.",
|
|
330
|
+
"progress": "Optional 0-100 progress value for uploading or processing states. Product code owns upload math and state changes.",
|
|
331
|
+
"size": "Use default for normal rows, sm/xs for dense lists.",
|
|
332
|
+
"state": "Use idle, uploading, processing, error, or done; do not invent custom visual states.",
|
|
333
|
+
"AttachmentMedia": "Leading media slot for file icon, image thumbnail, spinner, or generated artifact preview. Use variant=\"image\" for thumbnails.",
|
|
334
|
+
"AttachmentContent": "Text content wrapper containing title and description.",
|
|
335
|
+
"AttachmentActions": "Inline-end action group for open, remove, retry, or download actions.",
|
|
336
|
+
"AttachmentTrigger": "Dashed add/upload trigger; product owns file input behavior."
|
|
337
|
+
},
|
|
338
|
+
"arabicFriendly": "Use AttachmentMedia at inline-start and AttachmentActions at inline-end. In dir=\"rtl\", action placement, progress, image cards, and truncation must mirror through logical layout. Do not invent Arabic file names or production copy."
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"name": "Avatar",
|
|
343
|
+
"category": "Data Display",
|
|
344
|
+
"status": "available",
|
|
345
|
+
"packageImport": "import { Avatar, AvatarFallback, AvatarGroup, AvatarImage, AvatarOverflow, AvatarStatusDot } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
346
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
347
|
+
"shadcnFoundation": [
|
|
348
|
+
"avatar",
|
|
349
|
+
"Radix Avatar",
|
|
350
|
+
"semantic Utopia wrapper"
|
|
351
|
+
],
|
|
352
|
+
"fallbackToShadcn": "avatar",
|
|
353
|
+
"requiredTokens": [
|
|
354
|
+
"--background",
|
|
355
|
+
"--secondary",
|
|
356
|
+
"--secondary-foreground",
|
|
357
|
+
"--border",
|
|
358
|
+
"--avatar-size",
|
|
359
|
+
"--button-height-sm",
|
|
360
|
+
"--font-size-small",
|
|
361
|
+
"--font-size-body-lg",
|
|
362
|
+
"--font-weight-medium",
|
|
363
|
+
"--success",
|
|
364
|
+
"--warning",
|
|
365
|
+
"--destructive",
|
|
366
|
+
"--muted-foreground"
|
|
367
|
+
],
|
|
368
|
+
"useWhen": [
|
|
369
|
+
"People or account identifiers",
|
|
370
|
+
"Team member references with fallback initials",
|
|
371
|
+
"Entity identity where alt text is known",
|
|
372
|
+
"A compact team stack needs an overflow count"
|
|
373
|
+
],
|
|
374
|
+
"avoidWhen": [
|
|
375
|
+
"Decorative profile filler",
|
|
376
|
+
"Unverified fake people",
|
|
377
|
+
"A logo or product mark should be used instead"
|
|
378
|
+
],
|
|
379
|
+
"neverInvent": [
|
|
380
|
+
"Generic fake people",
|
|
381
|
+
"Left/right-only layout rules",
|
|
382
|
+
"Utopia brand primitives inside reusable component logic"
|
|
383
|
+
],
|
|
384
|
+
"ai": {
|
|
385
|
+
"props": {
|
|
386
|
+
"alt": "Required when src is provided. Use localized, factual identity text; do not invent a fake person.",
|
|
387
|
+
"children": "Default visual fallback. Prefer initials or a short entity mark when no verified image exists.",
|
|
388
|
+
"size": "xs, sm, md, or lg. Use sm in dense groups, md for account rows, lg for profile previews.",
|
|
389
|
+
"src": "Optional verified image URL. Avatar must still render the fallback when the image fails.",
|
|
390
|
+
"status": "Optional online, busy, away, or offline indicator. Status dot is decorative and mirrors with inline-end.",
|
|
391
|
+
"AvatarGroup": "Groups multiple avatars with logical overlap and requires an aria-label.",
|
|
392
|
+
"AvatarOverflow": "Use for localized remaining count such as +3 or +٣. Match its size to grouped avatars.",
|
|
393
|
+
"AvatarStatusDot": "Internal status indicator; prefer the status prop unless composing a custom avatar."
|
|
394
|
+
},
|
|
395
|
+
"arabicFriendly": "Default to initials/fallback when a culturally appropriate verified image is unavailable. Use Arabic initials or localized short labels, logical overlap, inline-end status dots, and Arabic numerals for overflow counts in dir=\"rtl\". Do not fabricate Arabic names or people."
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "Badge",
|
|
400
|
+
"category": "Data Display",
|
|
401
|
+
"status": "available",
|
|
402
|
+
"packageImport": "import { Badge } from '@utopia-studio-design/design-system/Badge';",
|
|
403
|
+
"sourcePath": "packages/design-system/src/components/Badge.tsx",
|
|
404
|
+
"shadcnFoundation": [
|
|
405
|
+
"badge",
|
|
406
|
+
"cva"
|
|
407
|
+
],
|
|
408
|
+
"fallbackToShadcn": "badge",
|
|
409
|
+
"requiredTokens": [
|
|
410
|
+
"--primary",
|
|
411
|
+
"--primary-foreground",
|
|
412
|
+
"--secondary",
|
|
413
|
+
"--secondary-foreground",
|
|
414
|
+
"--success",
|
|
415
|
+
"--success-surface",
|
|
416
|
+
"--success-border",
|
|
417
|
+
"--success-text",
|
|
418
|
+
"--warning-surface",
|
|
419
|
+
"--warning-border",
|
|
420
|
+
"--warning-text",
|
|
421
|
+
"--destructive",
|
|
422
|
+
"--destructive-surface",
|
|
423
|
+
"--destructive-border",
|
|
424
|
+
"--destructive-text",
|
|
425
|
+
"--border",
|
|
426
|
+
"--radius-control",
|
|
427
|
+
"--badge-padding-block",
|
|
428
|
+
"--badge-padding-inline",
|
|
429
|
+
"--badge-font-size"
|
|
430
|
+
],
|
|
431
|
+
"useWhen": [
|
|
432
|
+
"Short status",
|
|
433
|
+
"Taxonomy",
|
|
434
|
+
"Type markers",
|
|
435
|
+
"Unread counts",
|
|
436
|
+
"Compact metadata"
|
|
437
|
+
],
|
|
438
|
+
"avoidWhen": [
|
|
439
|
+
"Full sentences",
|
|
440
|
+
"Pure decoration",
|
|
441
|
+
"Primary actions",
|
|
442
|
+
"Unlocalized status copy"
|
|
443
|
+
],
|
|
444
|
+
"neverInvent": [
|
|
445
|
+
"Extra badge color families",
|
|
446
|
+
"Long badge copy",
|
|
447
|
+
"Left/right-only layout rules",
|
|
448
|
+
"Utopia brand primitives inside reusable component logic"
|
|
449
|
+
],
|
|
450
|
+
"ai": {
|
|
451
|
+
"props": {
|
|
452
|
+
"variant": "Semantic visual role. Use default, secondary, destructive, outline, success, info, or warning.",
|
|
453
|
+
"size": "Compact sizing role. Use sm, md, or lg; do not use size to fix long copy.",
|
|
454
|
+
"startContent": "Optional inline-start content such as a non-directional icon.",
|
|
455
|
+
"endContent": "Optional inline-end content such as a localized count.",
|
|
456
|
+
"children": "Short visible label from product copy or localization."
|
|
457
|
+
},
|
|
458
|
+
"rules": [
|
|
459
|
+
"Use Badge for short status, taxonomy, and compact metadata only.",
|
|
460
|
+
"Do not hardcode raw Utopia colors inside Badge usage.",
|
|
461
|
+
"Use semantic variants instead of one-off classes.",
|
|
462
|
+
"Keep labels short enough to avoid truncation in dense navigation or tables."
|
|
463
|
+
],
|
|
464
|
+
"arabicFriendly": "Badge must support dir=\"rtl\", logical start/end slots, Arabic numerals for counts, IBM Plex Sans Arabic through theme typography tokens, and localized short labels. Do not invent Arabic production copy."
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "Breadcrumb",
|
|
469
|
+
"category": "Navigation",
|
|
470
|
+
"status": "available",
|
|
471
|
+
"packageImport": "import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '@utopia-studio-design/design-system/Navigation';",
|
|
472
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
473
|
+
"shadcnFoundation": [
|
|
474
|
+
"breadcrumb",
|
|
475
|
+
"semantic navigation",
|
|
476
|
+
"shadcn/ui breadcrumb",
|
|
477
|
+
"ordered-list composition"
|
|
478
|
+
],
|
|
479
|
+
"fallbackToShadcn": "breadcrumb",
|
|
480
|
+
"requiredTokens": [
|
|
481
|
+
"--foreground",
|
|
482
|
+
"--muted-foreground",
|
|
483
|
+
"--foreground-subtle",
|
|
484
|
+
"--surface-hover",
|
|
485
|
+
"--radius-control",
|
|
486
|
+
"--space-2",
|
|
487
|
+
"--control-height-sm",
|
|
488
|
+
"--duration-fast",
|
|
489
|
+
"--ease-standard",
|
|
490
|
+
"--focus-ring-width",
|
|
491
|
+
"--font-weight-medium"
|
|
492
|
+
],
|
|
493
|
+
"useWhen": [
|
|
494
|
+
"A deep page needs parent-page context",
|
|
495
|
+
"Users need to understand where the current resource sits in a hierarchy",
|
|
496
|
+
"A long path may need collapsed middle items or an overflow menu"
|
|
497
|
+
],
|
|
498
|
+
"avoidWhen": [
|
|
499
|
+
"Primary navigation is needed; use Top Nav, Side Nav, or Navigation Menu",
|
|
500
|
+
"A single-level page has no parent context",
|
|
501
|
+
"The UI is a wizard or progress flow; use steps/progress patterns"
|
|
502
|
+
],
|
|
503
|
+
"neverInvent": [
|
|
504
|
+
"Directional icon without RTL rule",
|
|
505
|
+
"Left/right-only layout rules",
|
|
506
|
+
"Utopia brand primitives inside reusable component logic"
|
|
507
|
+
],
|
|
508
|
+
"ai": {
|
|
509
|
+
"props": {
|
|
510
|
+
"aria-label": "Required localized label for the breadcrumb navigation landmark.",
|
|
511
|
+
"Breadcrumb": "Root nav landmark. Keep aria-label descriptive and localized when needed.",
|
|
512
|
+
"BreadcrumbList": "Ordered list wrapper for breadcrumb items and separators.",
|
|
513
|
+
"BreadcrumbItem": "List item wrapper for link, current page, or collapsed menu trigger.",
|
|
514
|
+
"BreadcrumbLink": "Clickable ancestor link. Use a router link only through composition.",
|
|
515
|
+
"BreadcrumbPage": "Current page label with aria-current=page.",
|
|
516
|
+
"BreadcrumbSeparator": "Visual separator. Use non-directional slash by default or mirror directional chevrons in RTL.",
|
|
517
|
+
"BreadcrumbEllipsis": "Collapsed middle path indicator. Pair with a menu when hidden parents need discovery."
|
|
518
|
+
},
|
|
519
|
+
"arabicFriendly": "Breadcrumb order, separator spacing, dropdown alignment, and focus rings must follow dir=\"rtl\" using logical properties. Arabic labels must come from localization."
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "Breadcrumb Item",
|
|
524
|
+
"category": "Navigation",
|
|
525
|
+
"status": "available",
|
|
526
|
+
"packageImport": "import { BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator } from '@utopia-studio-design/design-system/Navigation';",
|
|
527
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
528
|
+
"shadcnFoundation": [
|
|
529
|
+
"breadcrumb item",
|
|
530
|
+
"semantic list item",
|
|
531
|
+
"shadcn/ui breadcrumb",
|
|
532
|
+
"ordered-list composition"
|
|
533
|
+
],
|
|
534
|
+
"fallbackToShadcn": "breadcrumb",
|
|
535
|
+
"requiredTokens": [
|
|
536
|
+
"--foreground",
|
|
537
|
+
"--muted-foreground",
|
|
538
|
+
"--foreground-subtle",
|
|
539
|
+
"--space-2",
|
|
540
|
+
"--font-weight-medium"
|
|
541
|
+
],
|
|
542
|
+
"useWhen": [
|
|
543
|
+
"A breadcrumb path needs one ancestor, separator, current page, or collapsed menu segment",
|
|
544
|
+
"Each path segment needs semantic list structure for screen readers",
|
|
545
|
+
"A current page must expose aria-current through BreadcrumbPage"
|
|
546
|
+
],
|
|
547
|
+
"avoidWhen": [
|
|
548
|
+
"The item is not part of a breadcrumb hierarchy",
|
|
549
|
+
"Primary navigation rows are needed; use Side Nav Item, Top Nav Item, or Navigation Menu",
|
|
550
|
+
"The path segment should trigger an action unrelated to navigation"
|
|
551
|
+
],
|
|
552
|
+
"neverInvent": [
|
|
553
|
+
"Directional icon without RTL rule",
|
|
554
|
+
"Left/right-only layout rules",
|
|
555
|
+
"Utopia brand primitives inside reusable component logic"
|
|
556
|
+
],
|
|
557
|
+
"ai": {
|
|
558
|
+
"props": {
|
|
559
|
+
"BreadcrumbItem": "List item wrapper for a breadcrumb link, current page, separator, or collapsed menu trigger.",
|
|
560
|
+
"BreadcrumbLink": "Clickable ancestor path segment. Compose with a router link when needed.",
|
|
561
|
+
"BreadcrumbPage": "Current page path segment. It owns aria-current=page.",
|
|
562
|
+
"BreadcrumbSeparator": "Visual hierarchy separator. Keep spacing logical and mirror directional separators in RTL."
|
|
563
|
+
},
|
|
564
|
+
"arabicFriendly": "Breadcrumb Item must preserve DOM order, logical spacing, current-page semantics, and mixed-script labels in dir=\"rtl\". Use localized path labels."
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "Breadcrumbs",
|
|
569
|
+
"category": "Navigation",
|
|
570
|
+
"status": "available",
|
|
571
|
+
"packageImport": "import { Breadcrumb, Breadcrumbs, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator } from '@utopia-studio-design/design-system/Navigation';",
|
|
572
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
573
|
+
"shadcnFoundation": [
|
|
574
|
+
"breadcrumb list",
|
|
575
|
+
"semantic ordered list",
|
|
576
|
+
"shadcn/ui breadcrumb",
|
|
577
|
+
"ordered-list composition"
|
|
578
|
+
],
|
|
579
|
+
"fallbackToShadcn": "breadcrumb",
|
|
580
|
+
"requiredTokens": [
|
|
581
|
+
"--foreground",
|
|
582
|
+
"--muted-foreground",
|
|
583
|
+
"--foreground-subtle",
|
|
584
|
+
"--space-2",
|
|
585
|
+
"--font-weight-medium"
|
|
586
|
+
],
|
|
587
|
+
"useWhen": [
|
|
588
|
+
"A breadcrumb path needs the compact ordered-list alias",
|
|
589
|
+
"A component page or app surface needs a full path rendered inside a Breadcrumb landmark",
|
|
590
|
+
"A hierarchy needs multiple Breadcrumb Item children with separators"
|
|
591
|
+
],
|
|
592
|
+
"avoidWhen": [
|
|
593
|
+
"A single current page label is enough",
|
|
594
|
+
"The UI needs tabs, side navigation, or top navigation instead of hierarchy context",
|
|
595
|
+
"A progress or wizard path is being represented"
|
|
596
|
+
],
|
|
597
|
+
"neverInvent": [
|
|
598
|
+
"Directional icon without RTL rule",
|
|
599
|
+
"Left/right-only layout rules",
|
|
600
|
+
"Utopia brand primitives inside reusable component logic"
|
|
601
|
+
],
|
|
602
|
+
"ai": {
|
|
603
|
+
"props": {
|
|
604
|
+
"Breadcrumbs": "Compact alias for BreadcrumbList. Use inside Breadcrumb as the ordered list wrapper.",
|
|
605
|
+
"children": "BreadcrumbItem and BreadcrumbSeparator children in hierarchy order."
|
|
606
|
+
},
|
|
607
|
+
"arabicFriendly": "Breadcrumbs must keep equivalent hierarchy discovery in dir=\"rtl\", including logical spacing, separator treatment, dropdown alignment, and localized labels."
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"name": "Bubble",
|
|
612
|
+
"category": "Data Display",
|
|
613
|
+
"status": "available",
|
|
614
|
+
"packageImport": "import { Bubble } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
615
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
616
|
+
"shadcnFoundation": [
|
|
617
|
+
"bubble",
|
|
618
|
+
"shadcn/ui registry",
|
|
619
|
+
"semantic Utopia wrapper"
|
|
620
|
+
],
|
|
621
|
+
"fallbackToShadcn": "bubble",
|
|
622
|
+
"requiredTokens": [
|
|
623
|
+
"--background",
|
|
624
|
+
"--foreground",
|
|
625
|
+
"--surface",
|
|
626
|
+
"--surface-strong",
|
|
627
|
+
"--border",
|
|
628
|
+
"--radius-surface",
|
|
629
|
+
"--radius-control",
|
|
630
|
+
"--muted-foreground",
|
|
631
|
+
"--focus-ring",
|
|
632
|
+
"--focus-ring-width",
|
|
633
|
+
"--focus-ring-offset"
|
|
634
|
+
],
|
|
635
|
+
"useWhen": [
|
|
636
|
+
"Use when the shadcn/ui bubble pattern is required",
|
|
637
|
+
"Use as the Utopia semantic-token wrapper before deeper specialization",
|
|
638
|
+
"Use when AI needs a safe conversion target from shadcn source code"
|
|
639
|
+
],
|
|
640
|
+
"avoidWhen": [
|
|
641
|
+
"A more specific Utopia primitive already exists",
|
|
642
|
+
"The behavior requires product-specific copy or data rules"
|
|
643
|
+
],
|
|
644
|
+
"neverInvent": [
|
|
645
|
+
"Raw shadcn theme colors",
|
|
646
|
+
"Left/right-only layout rules",
|
|
647
|
+
"Utopia brand primitives inside reusable component logic"
|
|
648
|
+
]
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "Button",
|
|
652
|
+
"category": "Action",
|
|
653
|
+
"status": "available",
|
|
654
|
+
"packageImport": "import { Button } from '@utopia-studio-design/design-system/Button';",
|
|
655
|
+
"sourcePath": "packages/design-system/src/components/Button.tsx",
|
|
656
|
+
"shadcnFoundation": [
|
|
657
|
+
"button",
|
|
658
|
+
"Slot",
|
|
659
|
+
"cva"
|
|
660
|
+
],
|
|
661
|
+
"fallbackToShadcn": "button",
|
|
662
|
+
"requiredTokens": [
|
|
663
|
+
"--primary",
|
|
664
|
+
"--primary-hover",
|
|
665
|
+
"--primary-active",
|
|
666
|
+
"--primary-foreground",
|
|
667
|
+
"--secondary",
|
|
668
|
+
"--secondary-hover",
|
|
669
|
+
"--secondary-active",
|
|
670
|
+
"--secondary-foreground",
|
|
671
|
+
"--destructive",
|
|
672
|
+
"--destructive-hover",
|
|
673
|
+
"--destructive-active",
|
|
674
|
+
"--radius-control",
|
|
675
|
+
"--button-height",
|
|
676
|
+
"--button-height-sm",
|
|
677
|
+
"--button-height-lg",
|
|
678
|
+
"--focus-ring-width",
|
|
679
|
+
"--motion-duration-press",
|
|
680
|
+
"--motion-ease-standard",
|
|
681
|
+
"--motion-press-scale"
|
|
682
|
+
],
|
|
683
|
+
"useWhen": [
|
|
684
|
+
"Primary actions",
|
|
685
|
+
"Form submissions",
|
|
686
|
+
"Navigation CTAs"
|
|
687
|
+
],
|
|
688
|
+
"avoidWhen": [
|
|
689
|
+
"Passive metadata",
|
|
690
|
+
"Decorative labels"
|
|
691
|
+
],
|
|
692
|
+
"neverInvent": [
|
|
693
|
+
"New button colors",
|
|
694
|
+
"Gradient states",
|
|
695
|
+
"Unlabeled icon-only buttons",
|
|
696
|
+
"Left/right-only layout rules",
|
|
697
|
+
"Utopia brand primitives inside reusable component logic",
|
|
698
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
699
|
+
],
|
|
700
|
+
"ai": {
|
|
701
|
+
"props": {
|
|
702
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "Button Group",
|
|
708
|
+
"category": "Action",
|
|
709
|
+
"status": "available",
|
|
710
|
+
"packageImport": "import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from '@utopia-studio-design/design-system/ButtonGroup';",
|
|
711
|
+
"sourcePath": "packages/design-system/src/components/ButtonGroup.tsx",
|
|
712
|
+
"shadcnFoundation": [
|
|
713
|
+
"button-group",
|
|
714
|
+
"ButtonGroup",
|
|
715
|
+
"ButtonGroupSeparator",
|
|
716
|
+
"ButtonGroupText",
|
|
717
|
+
"cva",
|
|
718
|
+
"DropdownMenu composition",
|
|
719
|
+
"split overflow actions"
|
|
720
|
+
],
|
|
721
|
+
"fallbackToShadcn": "shadcn/ui button-group",
|
|
722
|
+
"requiredTokens": [
|
|
723
|
+
"--button-group-gap",
|
|
724
|
+
"--button-group-gap-compact",
|
|
725
|
+
"--radius-control",
|
|
726
|
+
"--button-height",
|
|
727
|
+
"--focus-ring-width",
|
|
728
|
+
"--popover-surface",
|
|
729
|
+
"--border"
|
|
730
|
+
],
|
|
731
|
+
"useWhen": [
|
|
732
|
+
"Related actions",
|
|
733
|
+
"Toolbar clusters",
|
|
734
|
+
"Choice-like action sets",
|
|
735
|
+
"Split or overflow action groups with Dropdown Menu",
|
|
736
|
+
"Connected controls that combine buttons, static text, and menu triggers"
|
|
737
|
+
],
|
|
738
|
+
"avoidWhen": [
|
|
739
|
+
"Unrelated actions",
|
|
740
|
+
"Primary action stacks",
|
|
741
|
+
"Navigation lists"
|
|
742
|
+
],
|
|
743
|
+
"neverInvent": [
|
|
744
|
+
"Button group colors",
|
|
745
|
+
"Left/right-only spacing",
|
|
746
|
+
"Serialized React children arrays",
|
|
747
|
+
"Multiple primary actions without hierarchy",
|
|
748
|
+
"Utopia brand primitives inside reusable component logic",
|
|
749
|
+
"Hidden overflow menus for primary actions",
|
|
750
|
+
"Dropdown triggers without accessible labels"
|
|
751
|
+
],
|
|
752
|
+
"ai": {
|
|
753
|
+
"props": [
|
|
754
|
+
"orientation",
|
|
755
|
+
"density",
|
|
756
|
+
"asToolbar",
|
|
757
|
+
"label",
|
|
758
|
+
"children",
|
|
759
|
+
"ButtonGroupSeparator.orientation",
|
|
760
|
+
"ButtonGroupText.asChild"
|
|
761
|
+
],
|
|
762
|
+
"shadcnReferencePatterns": [
|
|
763
|
+
"button group",
|
|
764
|
+
"button group with dropdown menu",
|
|
765
|
+
"split button",
|
|
766
|
+
"toolbar",
|
|
767
|
+
"input group composition"
|
|
768
|
+
],
|
|
769
|
+
"arabicFriendly": [
|
|
770
|
+
"Use logical orientation and preserve action meaning in RTL.",
|
|
771
|
+
"Dropdown overflow triggers require localized aria-label text.",
|
|
772
|
+
"Do not reorder destructive or primary actions only to mirror the visual layout."
|
|
773
|
+
]
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"name": "Calendar",
|
|
778
|
+
"category": "Data Display",
|
|
779
|
+
"status": "available",
|
|
780
|
+
"packageImport": "import { Calendar } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
781
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
782
|
+
"shadcnFoundation": [
|
|
783
|
+
"calendar",
|
|
784
|
+
"react-day-picker",
|
|
785
|
+
"semantic date grid",
|
|
786
|
+
"shadcn/ui calendar",
|
|
787
|
+
"controlled/uncontrolled state"
|
|
788
|
+
],
|
|
789
|
+
"fallbackToShadcn": "calendar",
|
|
790
|
+
"requiredTokens": [
|
|
791
|
+
"--surface",
|
|
792
|
+
"--background",
|
|
793
|
+
"--foreground",
|
|
794
|
+
"--muted-foreground",
|
|
795
|
+
"--foreground-subtle",
|
|
796
|
+
"--border",
|
|
797
|
+
"--input",
|
|
798
|
+
"--radius-surface",
|
|
799
|
+
"--radius-control",
|
|
800
|
+
"--primary",
|
|
801
|
+
"--primary-foreground",
|
|
802
|
+
"--surface-hover",
|
|
803
|
+
"--button-height-sm",
|
|
804
|
+
"--duration-fast",
|
|
805
|
+
"--ease-standard",
|
|
806
|
+
"--focus-ring-width"
|
|
807
|
+
],
|
|
808
|
+
"useWhen": [
|
|
809
|
+
"Date browsing and date picking with visible month/year navigation",
|
|
810
|
+
"Product forms need controlled or uncontrolled selected date state",
|
|
811
|
+
"Month-grid previews need product-owned localization rules and RTL-safe layout"
|
|
812
|
+
],
|
|
813
|
+
"avoidWhen": [
|
|
814
|
+
"Hijri calendar without localization requirements",
|
|
815
|
+
"Date math or booking rules that belong in product logic",
|
|
816
|
+
"Unverified locale-specific calendar behavior"
|
|
817
|
+
],
|
|
818
|
+
"neverInvent": [
|
|
819
|
+
"Locale-specific calendar behavior",
|
|
820
|
+
"Left/right-only layout rules",
|
|
821
|
+
"Utopia brand primitives inside reusable component logic",
|
|
822
|
+
"Business disabled-date rules inside the design-system package"
|
|
823
|
+
],
|
|
824
|
+
"ai": {
|
|
825
|
+
"props": {
|
|
826
|
+
"month": "Controlled visible month. Pair with onMonthChange.",
|
|
827
|
+
"defaultMonth": "Initial visible month for uncontrolled usage.",
|
|
828
|
+
"selectedDate": "Controlled selected date. Pair with onSelect.",
|
|
829
|
+
"defaultSelectedDate": "Initial selected date for uncontrolled usage.",
|
|
830
|
+
"onSelect": "Called with a Date when an enabled day is selected.",
|
|
831
|
+
"onMonthChange": "Called when previous/next or month/year controls change the visible month.",
|
|
832
|
+
"weekStartsOn": "Use product locale requirements. 0 is Sunday, 1 Monday, 6 Saturday.",
|
|
833
|
+
"disabledDates": "Product-owned predicate for disabled days."
|
|
834
|
+
},
|
|
835
|
+
"arabicFriendly": "Calendar supports dir inheritance, localized month/day labels, logical layout, Arabic numerals through Intl, and configurable week start. Hijri support must be explicit product work, not assumed."
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"name": "Card",
|
|
840
|
+
"category": "Surface",
|
|
841
|
+
"status": "available",
|
|
842
|
+
"packageImport": "import { Card, CardHeader, CardTitle, CardDescription, CardAction, CardStatus, CardContent, CardFooter } from '@utopia-studio-design/design-system/Card';",
|
|
843
|
+
"sourcePath": "packages/design-system/src/components/Card.tsx",
|
|
844
|
+
"shadcnFoundation": [
|
|
845
|
+
"shadcn/ui card",
|
|
846
|
+
"header/content/footer composition",
|
|
847
|
+
"semantic surface wrapper"
|
|
848
|
+
],
|
|
849
|
+
"fallbackToShadcn": "card",
|
|
850
|
+
"requiredTokens": [
|
|
851
|
+
"--card",
|
|
852
|
+
"--card-foreground",
|
|
853
|
+
"--border",
|
|
854
|
+
"--border-width-strong",
|
|
855
|
+
"--primary",
|
|
856
|
+
"--surface",
|
|
857
|
+
"--surface-hover",
|
|
858
|
+
"--foreground",
|
|
859
|
+
"--muted-foreground",
|
|
860
|
+
"--radius-surface",
|
|
861
|
+
"--radius-control",
|
|
862
|
+
"--card-padding",
|
|
863
|
+
"--card-title-size",
|
|
864
|
+
"--badge-height",
|
|
865
|
+
"--badge-padding-block",
|
|
866
|
+
"--badge-padding-inline",
|
|
867
|
+
"--focus-ring-width",
|
|
868
|
+
"--duration-fast",
|
|
869
|
+
"--duration-medium",
|
|
870
|
+
"--ease-standard"
|
|
871
|
+
],
|
|
872
|
+
"useWhen": [
|
|
873
|
+
"A surface needs a clear header, content, and footer contract",
|
|
874
|
+
"Repeated content such as resource cards, product summaries, or dashboard modules",
|
|
875
|
+
"Grouped data where status or secondary action belongs in the header inline-end",
|
|
876
|
+
"Framed tool surfaces that need the Utopia Ceramic hover accent"
|
|
877
|
+
],
|
|
878
|
+
"avoidWhen": [
|
|
879
|
+
"Full page sections or marketing bands",
|
|
880
|
+
"Nested cards",
|
|
881
|
+
"Navigation rows that should use SideNavItem, TopNavItem, Breadcrumbs, or List",
|
|
882
|
+
"Clickable behavior without using ClickableCard, SelectableCard, or explicit interactive semantics"
|
|
883
|
+
],
|
|
884
|
+
"neverInvent": [
|
|
885
|
+
"Raw colors",
|
|
886
|
+
"Raw shadows",
|
|
887
|
+
"Raw radius values",
|
|
888
|
+
"Drop shadows",
|
|
889
|
+
"Rounded marketing panels",
|
|
890
|
+
"Decorative card grids",
|
|
891
|
+
"Left/right-only layout rules",
|
|
892
|
+
"Utopia brand primitives inside reusable component logic"
|
|
893
|
+
],
|
|
894
|
+
"ai": {
|
|
895
|
+
"props": {
|
|
896
|
+
"Card.accent": "false | 'hover' | 'always'. Shows the semantic block-start accent line using --primary.",
|
|
897
|
+
"Card.interactive": "boolean. Adds hover and focus-visible treatment only; use semantic link or button wrappers when the whole card is actionable.",
|
|
898
|
+
"Card.size": "'default' | 'sm'. Changes density through --card-padding and --card-title-size.",
|
|
899
|
+
"CardHeader": "Header region. Place CardTitle, CardDescription, and optional CardAction here.",
|
|
900
|
+
"CardAction": "Header inline-end region for compact actions or CardStatus.",
|
|
901
|
+
"CardStatus": "Compact status pill that uses badge/control tokens instead of raw colors.",
|
|
902
|
+
"CardContent": "Main content region.",
|
|
903
|
+
"CardFooter": "Footer region for actions. Uses logical border-block-start and wraps safely.",
|
|
904
|
+
"ClickableCard": "Anchor wrapper for full-card links. Defaults to hover accent.",
|
|
905
|
+
"SelectableCard": "Button wrapper for selectable surfaces. Defaults to hover accent and exposes aria-pressed."
|
|
906
|
+
},
|
|
907
|
+
"arabicFriendly": "Card uses logical block/inline layout, puts CardAction at inline-end through CSS grid, supports dir='rtl', tolerates mixed Arabic/English status text, and does not provide production Arabic copy.",
|
|
908
|
+
"shadcnConversion": "Keep the shadcn/ui Card family shape but consume Utopia semantic CSS tokens and exports only.",
|
|
909
|
+
"cli": "npm run ds -- component Card --dense"
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"name": "Carousel",
|
|
914
|
+
"category": "Data Display",
|
|
915
|
+
"status": "available",
|
|
916
|
+
"packageImport": "import { Carousel, CarouselButton, CarouselContent, CarouselControls, CarouselItem } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
917
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
918
|
+
"shadcnFoundation": [
|
|
919
|
+
"carousel",
|
|
920
|
+
"scroll snap carousel",
|
|
921
|
+
"shadcn/ui registry"
|
|
922
|
+
],
|
|
923
|
+
"fallbackToShadcn": "carousel",
|
|
924
|
+
"requiredTokens": [
|
|
925
|
+
"--surface",
|
|
926
|
+
"--foreground",
|
|
927
|
+
"--foreground-muted",
|
|
928
|
+
"--border",
|
|
929
|
+
"--radius-surface",
|
|
930
|
+
"--radius-control",
|
|
931
|
+
"--secondary",
|
|
932
|
+
"--secondary-foreground",
|
|
933
|
+
"--focus-ring-width",
|
|
934
|
+
"--primary"
|
|
935
|
+
],
|
|
936
|
+
"useWhen": [
|
|
937
|
+
"Small sets of related items where order matters",
|
|
938
|
+
"Horizontal browsing that should support wheel, trackpad, touch, and keyboard-friendly focus targets",
|
|
939
|
+
"DIY item collections where the product team supplies its own media, copy, and item layout",
|
|
940
|
+
"AI-generated previews that need explicit item labels and replaceable data"
|
|
941
|
+
],
|
|
942
|
+
"avoidWhen": [
|
|
943
|
+
"Large data sets",
|
|
944
|
+
"Primary navigation",
|
|
945
|
+
"Content that must all be visible at once"
|
|
946
|
+
],
|
|
947
|
+
"neverInvent": [
|
|
948
|
+
"Raw shadcn theme colors",
|
|
949
|
+
"Left/right-only layout rules",
|
|
950
|
+
"Utopia brand primitives inside reusable component logic"
|
|
951
|
+
],
|
|
952
|
+
"arabicFriendly": "CarouselContent converts vertical wheel input to inline scrolling, mirrors movement under dir='rtl', hides scrollbars without changing layout width, and requires logical start/end naming for directional controls.",
|
|
953
|
+
"shadcnConversion": "Keep the shadcn/ui carousel composition shape: Carousel wraps behavior, CarouselContent owns horizontal scroll, CarouselItem owns each replaceable item, and controls remain optional.",
|
|
954
|
+
"cli": "npm run ds -- component Carousel --dense"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"name": "Chart",
|
|
958
|
+
"category": "Data Display",
|
|
959
|
+
"status": "available",
|
|
960
|
+
"packageImport": "import { Chart, ChartBars } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
961
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
962
|
+
"shadcnFoundation": [
|
|
963
|
+
"chart",
|
|
964
|
+
"shadcn/ui chart pattern",
|
|
965
|
+
"semantic Utopia data display wrapper",
|
|
966
|
+
"shadcn/ui registry"
|
|
967
|
+
],
|
|
968
|
+
"fallbackToShadcn": "chart",
|
|
969
|
+
"requiredTokens": [
|
|
970
|
+
"--surface",
|
|
971
|
+
"--foreground",
|
|
972
|
+
"--muted-foreground",
|
|
973
|
+
"--border",
|
|
974
|
+
"--radius-surface",
|
|
975
|
+
"--radius-control",
|
|
976
|
+
"--primary",
|
|
977
|
+
"--chart-bar-size",
|
|
978
|
+
"--chart-block-size",
|
|
979
|
+
"--chart-grid-color",
|
|
980
|
+
"--duration-medium",
|
|
981
|
+
"--ease-standard"
|
|
982
|
+
],
|
|
983
|
+
"useWhen": [
|
|
984
|
+
"Simple visual summaries with explicit labels and values",
|
|
985
|
+
"Component docs examples that need a token-safe chart scaffold",
|
|
986
|
+
"AI-generated dashboards before product-specific chart logic is selected"
|
|
987
|
+
],
|
|
988
|
+
"avoidWhen": [
|
|
989
|
+
"Financial or analytics charts without domain requirements",
|
|
990
|
+
"Unlabeled data",
|
|
991
|
+
"Locale-specific number formatting inside reusable component logic"
|
|
992
|
+
],
|
|
993
|
+
"neverInvent": [
|
|
994
|
+
"Raw shadcn theme colors",
|
|
995
|
+
"Left/right-only layout rules",
|
|
996
|
+
"Utopia brand primitives inside reusable component logic"
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "Chat Composer",
|
|
1001
|
+
"category": "Chat",
|
|
1002
|
+
"status": "available",
|
|
1003
|
+
"packageImport": "import { ChatComposer } from '@utopia-studio-design/design-system/Chat';",
|
|
1004
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1005
|
+
"shadcnFoundation": [
|
|
1006
|
+
"textarea + button",
|
|
1007
|
+
"shadcn/ui registry pattern",
|
|
1008
|
+
"AI/chat product primitive",
|
|
1009
|
+
"semantic Utopia wrapper"
|
|
1010
|
+
],
|
|
1011
|
+
"fallbackToShadcn": "textarea + button",
|
|
1012
|
+
"requiredTokens": [
|
|
1013
|
+
"--background",
|
|
1014
|
+
"--surface",
|
|
1015
|
+
"--surface-elevated",
|
|
1016
|
+
"--surface-hover",
|
|
1017
|
+
"--foreground",
|
|
1018
|
+
"--foreground-muted",
|
|
1019
|
+
"--border",
|
|
1020
|
+
"--radius-control",
|
|
1021
|
+
"--radius-surface",
|
|
1022
|
+
"--space-1",
|
|
1023
|
+
"--space-2",
|
|
1024
|
+
"--space-3",
|
|
1025
|
+
"--space-4",
|
|
1026
|
+
"--duration-fast",
|
|
1027
|
+
"--ease-standard",
|
|
1028
|
+
"--focus-ring-width",
|
|
1029
|
+
"--radius-chat-bubble",
|
|
1030
|
+
"--radius-chat-composer",
|
|
1031
|
+
"--radius-chat-token"
|
|
1032
|
+
],
|
|
1033
|
+
"useWhen": [
|
|
1034
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1035
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1036
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1037
|
+
],
|
|
1038
|
+
"avoidWhen": [
|
|
1039
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1040
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1041
|
+
"You only need a single generic card or empty state"
|
|
1042
|
+
],
|
|
1043
|
+
"neverInvent": [
|
|
1044
|
+
"Left/right-only layout rules",
|
|
1045
|
+
"Raw shadcn theme colors",
|
|
1046
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1047
|
+
"Arabic production copy generated by the component package"
|
|
1048
|
+
],
|
|
1049
|
+
"ai": {
|
|
1050
|
+
"props": {
|
|
1051
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1052
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1053
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1054
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only.",
|
|
1055
|
+
"accessibilityText": "Supply every visible label, aria-label, status summary, and action name from product localization. ChatSendButton and ChatDictationButton require label; ChatLayoutScrollButton requires accessibilityLabel; ChatToolCalls requires label."
|
|
1056
|
+
},
|
|
1057
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"name": "Chat Composer Drawer",
|
|
1062
|
+
"category": "Chat",
|
|
1063
|
+
"status": "available",
|
|
1064
|
+
"packageImport": "import { ChatComposerDrawer } from '@utopia-studio-design/design-system/Chat';",
|
|
1065
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1066
|
+
"shadcnFoundation": [
|
|
1067
|
+
"drawer",
|
|
1068
|
+
"shadcn/ui registry pattern",
|
|
1069
|
+
"AI/chat product primitive",
|
|
1070
|
+
"semantic Utopia wrapper"
|
|
1071
|
+
],
|
|
1072
|
+
"fallbackToShadcn": "drawer",
|
|
1073
|
+
"requiredTokens": [
|
|
1074
|
+
"--background",
|
|
1075
|
+
"--surface",
|
|
1076
|
+
"--surface-elevated",
|
|
1077
|
+
"--surface-hover",
|
|
1078
|
+
"--foreground",
|
|
1079
|
+
"--foreground-muted",
|
|
1080
|
+
"--border",
|
|
1081
|
+
"--radius-control",
|
|
1082
|
+
"--radius-surface",
|
|
1083
|
+
"--space-1",
|
|
1084
|
+
"--space-2",
|
|
1085
|
+
"--space-3",
|
|
1086
|
+
"--space-4",
|
|
1087
|
+
"--duration-fast",
|
|
1088
|
+
"--ease-standard",
|
|
1089
|
+
"--focus-ring-width",
|
|
1090
|
+
"--radius-chat-bubble",
|
|
1091
|
+
"--radius-chat-composer",
|
|
1092
|
+
"--radius-chat-token"
|
|
1093
|
+
],
|
|
1094
|
+
"useWhen": [
|
|
1095
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1096
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1097
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1098
|
+
],
|
|
1099
|
+
"avoidWhen": [
|
|
1100
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1101
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1102
|
+
"You only need a single generic card or empty state"
|
|
1103
|
+
],
|
|
1104
|
+
"neverInvent": [
|
|
1105
|
+
"Left/right-only layout rules",
|
|
1106
|
+
"Raw shadcn theme colors",
|
|
1107
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1108
|
+
"Arabic production copy generated by the component package"
|
|
1109
|
+
],
|
|
1110
|
+
"ai": {
|
|
1111
|
+
"props": {
|
|
1112
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1113
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1114
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1115
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1116
|
+
},
|
|
1117
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1118
|
+
}
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"name": "Chat Composer Input",
|
|
1122
|
+
"category": "Chat",
|
|
1123
|
+
"status": "available",
|
|
1124
|
+
"packageImport": "import { ChatComposerInput } from '@utopia-studio-design/design-system/Chat';",
|
|
1125
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1126
|
+
"shadcnFoundation": [
|
|
1127
|
+
"textarea",
|
|
1128
|
+
"shadcn/ui registry pattern",
|
|
1129
|
+
"AI/chat product primitive",
|
|
1130
|
+
"semantic Utopia wrapper"
|
|
1131
|
+
],
|
|
1132
|
+
"fallbackToShadcn": "textarea",
|
|
1133
|
+
"requiredTokens": [
|
|
1134
|
+
"--background",
|
|
1135
|
+
"--surface",
|
|
1136
|
+
"--surface-elevated",
|
|
1137
|
+
"--surface-hover",
|
|
1138
|
+
"--foreground",
|
|
1139
|
+
"--foreground-muted",
|
|
1140
|
+
"--border",
|
|
1141
|
+
"--radius-control",
|
|
1142
|
+
"--radius-surface",
|
|
1143
|
+
"--space-1",
|
|
1144
|
+
"--space-2",
|
|
1145
|
+
"--space-3",
|
|
1146
|
+
"--space-4",
|
|
1147
|
+
"--duration-fast",
|
|
1148
|
+
"--ease-standard",
|
|
1149
|
+
"--focus-ring-width",
|
|
1150
|
+
"--radius-chat-bubble",
|
|
1151
|
+
"--radius-chat-composer",
|
|
1152
|
+
"--radius-chat-token"
|
|
1153
|
+
],
|
|
1154
|
+
"useWhen": [
|
|
1155
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1156
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1157
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1158
|
+
],
|
|
1159
|
+
"avoidWhen": [
|
|
1160
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1161
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1162
|
+
"You only need a single generic card or empty state"
|
|
1163
|
+
],
|
|
1164
|
+
"neverInvent": [
|
|
1165
|
+
"Left/right-only layout rules",
|
|
1166
|
+
"Raw shadcn theme colors",
|
|
1167
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1168
|
+
"Arabic production copy generated by the component package"
|
|
1169
|
+
],
|
|
1170
|
+
"ai": {
|
|
1171
|
+
"props": {
|
|
1172
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1173
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1174
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1175
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1176
|
+
},
|
|
1177
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"name": "Chat Composer Token Element",
|
|
1182
|
+
"category": "Chat",
|
|
1183
|
+
"status": "available",
|
|
1184
|
+
"packageImport": "import { ChatComposerTokenElement } from '@utopia-studio-design/design-system/Chat';",
|
|
1185
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1186
|
+
"shadcnFoundation": [
|
|
1187
|
+
"badge",
|
|
1188
|
+
"shadcn/ui registry pattern",
|
|
1189
|
+
"AI/chat product primitive",
|
|
1190
|
+
"semantic Utopia wrapper"
|
|
1191
|
+
],
|
|
1192
|
+
"fallbackToShadcn": "badge",
|
|
1193
|
+
"requiredTokens": [
|
|
1194
|
+
"--background",
|
|
1195
|
+
"--surface",
|
|
1196
|
+
"--surface-elevated",
|
|
1197
|
+
"--surface-hover",
|
|
1198
|
+
"--foreground",
|
|
1199
|
+
"--foreground-muted",
|
|
1200
|
+
"--border",
|
|
1201
|
+
"--radius-control",
|
|
1202
|
+
"--radius-surface",
|
|
1203
|
+
"--space-1",
|
|
1204
|
+
"--space-2",
|
|
1205
|
+
"--space-3",
|
|
1206
|
+
"--space-4",
|
|
1207
|
+
"--duration-fast",
|
|
1208
|
+
"--ease-standard",
|
|
1209
|
+
"--focus-ring-width",
|
|
1210
|
+
"--radius-chat-bubble",
|
|
1211
|
+
"--radius-chat-composer",
|
|
1212
|
+
"--radius-chat-token"
|
|
1213
|
+
],
|
|
1214
|
+
"useWhen": [
|
|
1215
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1216
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1217
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1218
|
+
],
|
|
1219
|
+
"avoidWhen": [
|
|
1220
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1221
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1222
|
+
"You only need a single generic card or empty state"
|
|
1223
|
+
],
|
|
1224
|
+
"neverInvent": [
|
|
1225
|
+
"Left/right-only layout rules",
|
|
1226
|
+
"Raw shadcn theme colors",
|
|
1227
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1228
|
+
"Arabic production copy generated by the component package"
|
|
1229
|
+
],
|
|
1230
|
+
"ai": {
|
|
1231
|
+
"props": {
|
|
1232
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1233
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1234
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1235
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1236
|
+
},
|
|
1237
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1238
|
+
}
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"name": "Chat Dictation Button",
|
|
1242
|
+
"category": "Chat",
|
|
1243
|
+
"status": "available",
|
|
1244
|
+
"packageImport": "import { ChatDictationButton } from '@utopia-studio-design/design-system/Chat';",
|
|
1245
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1246
|
+
"shadcnFoundation": [
|
|
1247
|
+
"button",
|
|
1248
|
+
"shadcn/ui registry pattern",
|
|
1249
|
+
"AI/chat product primitive",
|
|
1250
|
+
"semantic Utopia wrapper"
|
|
1251
|
+
],
|
|
1252
|
+
"fallbackToShadcn": "button",
|
|
1253
|
+
"requiredTokens": [
|
|
1254
|
+
"--background",
|
|
1255
|
+
"--surface",
|
|
1256
|
+
"--surface-elevated",
|
|
1257
|
+
"--surface-hover",
|
|
1258
|
+
"--foreground",
|
|
1259
|
+
"--foreground-muted",
|
|
1260
|
+
"--border",
|
|
1261
|
+
"--radius-control",
|
|
1262
|
+
"--radius-surface",
|
|
1263
|
+
"--space-1",
|
|
1264
|
+
"--space-2",
|
|
1265
|
+
"--space-3",
|
|
1266
|
+
"--space-4",
|
|
1267
|
+
"--duration-fast",
|
|
1268
|
+
"--ease-standard",
|
|
1269
|
+
"--focus-ring-width",
|
|
1270
|
+
"--radius-chat-bubble",
|
|
1271
|
+
"--radius-chat-composer",
|
|
1272
|
+
"--radius-chat-token"
|
|
1273
|
+
],
|
|
1274
|
+
"useWhen": [
|
|
1275
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1276
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1277
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1278
|
+
],
|
|
1279
|
+
"avoidWhen": [
|
|
1280
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1281
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1282
|
+
"You only need a single generic card or empty state"
|
|
1283
|
+
],
|
|
1284
|
+
"neverInvent": [
|
|
1285
|
+
"Left/right-only layout rules",
|
|
1286
|
+
"Raw shadcn theme colors",
|
|
1287
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1288
|
+
"Arabic production copy generated by the component package"
|
|
1289
|
+
],
|
|
1290
|
+
"ai": {
|
|
1291
|
+
"props": {
|
|
1292
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1293
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1294
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1295
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only.",
|
|
1296
|
+
"accessibilityText": "The required label prop is localized product copy for the dictation action and current state."
|
|
1297
|
+
},
|
|
1298
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"name": "Chat Layout",
|
|
1303
|
+
"category": "Chat",
|
|
1304
|
+
"status": "available",
|
|
1305
|
+
"packageImport": "import { ChatLayout } from '@utopia-studio-design/design-system/Chat';",
|
|
1306
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1307
|
+
"shadcnFoundation": [
|
|
1308
|
+
"scroll-area",
|
|
1309
|
+
"shadcn/ui registry pattern",
|
|
1310
|
+
"AI/chat product primitive",
|
|
1311
|
+
"semantic Utopia wrapper"
|
|
1312
|
+
],
|
|
1313
|
+
"fallbackToShadcn": "scroll-area",
|
|
1314
|
+
"requiredTokens": [
|
|
1315
|
+
"--background",
|
|
1316
|
+
"--surface",
|
|
1317
|
+
"--surface-elevated",
|
|
1318
|
+
"--surface-hover",
|
|
1319
|
+
"--foreground",
|
|
1320
|
+
"--foreground-muted",
|
|
1321
|
+
"--border",
|
|
1322
|
+
"--radius-control",
|
|
1323
|
+
"--radius-surface",
|
|
1324
|
+
"--space-1",
|
|
1325
|
+
"--space-2",
|
|
1326
|
+
"--space-3",
|
|
1327
|
+
"--space-4",
|
|
1328
|
+
"--duration-fast",
|
|
1329
|
+
"--ease-standard",
|
|
1330
|
+
"--focus-ring-width",
|
|
1331
|
+
"--radius-chat-bubble",
|
|
1332
|
+
"--radius-chat-composer",
|
|
1333
|
+
"--radius-chat-token"
|
|
1334
|
+
],
|
|
1335
|
+
"useWhen": [
|
|
1336
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1337
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1338
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1339
|
+
],
|
|
1340
|
+
"avoidWhen": [
|
|
1341
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1342
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1343
|
+
"You only need a single generic card or empty state"
|
|
1344
|
+
],
|
|
1345
|
+
"neverInvent": [
|
|
1346
|
+
"Left/right-only layout rules",
|
|
1347
|
+
"Raw shadcn theme colors",
|
|
1348
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1349
|
+
"Arabic production copy generated by the component package"
|
|
1350
|
+
],
|
|
1351
|
+
"ai": {
|
|
1352
|
+
"props": {
|
|
1353
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1354
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1355
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1356
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1357
|
+
},
|
|
1358
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"name": "Chat Layout Scroll Button",
|
|
1363
|
+
"category": "Chat",
|
|
1364
|
+
"status": "available",
|
|
1365
|
+
"packageImport": "import { ChatLayoutScrollButton } from '@utopia-studio-design/design-system/Chat';",
|
|
1366
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1367
|
+
"shadcnFoundation": [
|
|
1368
|
+
"button",
|
|
1369
|
+
"shadcn/ui registry pattern",
|
|
1370
|
+
"AI/chat product primitive",
|
|
1371
|
+
"semantic Utopia wrapper"
|
|
1372
|
+
],
|
|
1373
|
+
"fallbackToShadcn": "button",
|
|
1374
|
+
"requiredTokens": [
|
|
1375
|
+
"--background",
|
|
1376
|
+
"--surface",
|
|
1377
|
+
"--surface-elevated",
|
|
1378
|
+
"--surface-hover",
|
|
1379
|
+
"--foreground",
|
|
1380
|
+
"--foreground-muted",
|
|
1381
|
+
"--border",
|
|
1382
|
+
"--radius-control",
|
|
1383
|
+
"--radius-surface",
|
|
1384
|
+
"--space-1",
|
|
1385
|
+
"--space-2",
|
|
1386
|
+
"--space-3",
|
|
1387
|
+
"--space-4",
|
|
1388
|
+
"--duration-fast",
|
|
1389
|
+
"--ease-standard",
|
|
1390
|
+
"--focus-ring-width",
|
|
1391
|
+
"--radius-chat-bubble",
|
|
1392
|
+
"--radius-chat-composer",
|
|
1393
|
+
"--radius-chat-token"
|
|
1394
|
+
],
|
|
1395
|
+
"useWhen": [
|
|
1396
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1397
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1398
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1399
|
+
],
|
|
1400
|
+
"avoidWhen": [
|
|
1401
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1402
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1403
|
+
"You only need a single generic card or empty state"
|
|
1404
|
+
],
|
|
1405
|
+
"neverInvent": [
|
|
1406
|
+
"Left/right-only layout rules",
|
|
1407
|
+
"Raw shadcn theme colors",
|
|
1408
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1409
|
+
"Arabic production copy generated by the component package"
|
|
1410
|
+
],
|
|
1411
|
+
"ai": {
|
|
1412
|
+
"props": {
|
|
1413
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1414
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1415
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1416
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only.",
|
|
1417
|
+
"accessibilityText": "The required accessibilityLabel prop names the scroll action; the optional label prop is localized visible status copy."
|
|
1418
|
+
},
|
|
1419
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"name": "Chat Message",
|
|
1424
|
+
"category": "Chat",
|
|
1425
|
+
"status": "available",
|
|
1426
|
+
"packageImport": "import { ChatMessage } from '@utopia-studio-design/design-system/Chat';",
|
|
1427
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1428
|
+
"shadcnFoundation": [
|
|
1429
|
+
"message",
|
|
1430
|
+
"shadcn/ui registry pattern",
|
|
1431
|
+
"AI/chat product primitive",
|
|
1432
|
+
"semantic Utopia wrapper"
|
|
1433
|
+
],
|
|
1434
|
+
"fallbackToShadcn": "message",
|
|
1435
|
+
"requiredTokens": [
|
|
1436
|
+
"--background",
|
|
1437
|
+
"--surface",
|
|
1438
|
+
"--surface-elevated",
|
|
1439
|
+
"--surface-hover",
|
|
1440
|
+
"--foreground",
|
|
1441
|
+
"--foreground-muted",
|
|
1442
|
+
"--border",
|
|
1443
|
+
"--radius-control",
|
|
1444
|
+
"--radius-surface",
|
|
1445
|
+
"--space-1",
|
|
1446
|
+
"--space-2",
|
|
1447
|
+
"--space-3",
|
|
1448
|
+
"--space-4",
|
|
1449
|
+
"--duration-fast",
|
|
1450
|
+
"--ease-standard",
|
|
1451
|
+
"--focus-ring-width",
|
|
1452
|
+
"--radius-chat-bubble",
|
|
1453
|
+
"--radius-chat-composer",
|
|
1454
|
+
"--radius-chat-token"
|
|
1455
|
+
],
|
|
1456
|
+
"useWhen": [
|
|
1457
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1458
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1459
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1460
|
+
],
|
|
1461
|
+
"avoidWhen": [
|
|
1462
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1463
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1464
|
+
"You only need a single generic card or empty state"
|
|
1465
|
+
],
|
|
1466
|
+
"neverInvent": [
|
|
1467
|
+
"Left/right-only layout rules",
|
|
1468
|
+
"Raw shadcn theme colors",
|
|
1469
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1470
|
+
"Arabic production copy generated by the component package"
|
|
1471
|
+
],
|
|
1472
|
+
"ai": {
|
|
1473
|
+
"props": {
|
|
1474
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1475
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1476
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1477
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1478
|
+
},
|
|
1479
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"name": "Chat Message Bubble",
|
|
1484
|
+
"category": "Chat",
|
|
1485
|
+
"status": "available",
|
|
1486
|
+
"packageImport": "import { ChatMessageBubble } from '@utopia-studio-design/design-system/Chat';",
|
|
1487
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1488
|
+
"shadcnFoundation": [
|
|
1489
|
+
"bubble",
|
|
1490
|
+
"shadcn/ui registry pattern",
|
|
1491
|
+
"AI/chat product primitive",
|
|
1492
|
+
"semantic Utopia wrapper"
|
|
1493
|
+
],
|
|
1494
|
+
"fallbackToShadcn": "bubble",
|
|
1495
|
+
"requiredTokens": [
|
|
1496
|
+
"--background",
|
|
1497
|
+
"--surface",
|
|
1498
|
+
"--surface-elevated",
|
|
1499
|
+
"--surface-hover",
|
|
1500
|
+
"--foreground",
|
|
1501
|
+
"--foreground-muted",
|
|
1502
|
+
"--border",
|
|
1503
|
+
"--radius-control",
|
|
1504
|
+
"--radius-surface",
|
|
1505
|
+
"--space-1",
|
|
1506
|
+
"--space-2",
|
|
1507
|
+
"--space-3",
|
|
1508
|
+
"--space-4",
|
|
1509
|
+
"--duration-fast",
|
|
1510
|
+
"--ease-standard",
|
|
1511
|
+
"--focus-ring-width",
|
|
1512
|
+
"--radius-chat-bubble",
|
|
1513
|
+
"--radius-chat-composer",
|
|
1514
|
+
"--radius-chat-token"
|
|
1515
|
+
],
|
|
1516
|
+
"useWhen": [
|
|
1517
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1518
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1519
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1520
|
+
],
|
|
1521
|
+
"avoidWhen": [
|
|
1522
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1523
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1524
|
+
"You only need a single generic card or empty state"
|
|
1525
|
+
],
|
|
1526
|
+
"neverInvent": [
|
|
1527
|
+
"Left/right-only layout rules",
|
|
1528
|
+
"Raw shadcn theme colors",
|
|
1529
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1530
|
+
"Arabic production copy generated by the component package"
|
|
1531
|
+
],
|
|
1532
|
+
"ai": {
|
|
1533
|
+
"props": {
|
|
1534
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1535
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1536
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1537
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1538
|
+
},
|
|
1539
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
"name": "Chat Message List",
|
|
1544
|
+
"category": "Chat",
|
|
1545
|
+
"status": "available",
|
|
1546
|
+
"packageImport": "import { ChatMessageList } from '@utopia-studio-design/design-system/Chat';",
|
|
1547
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1548
|
+
"shadcnFoundation": [
|
|
1549
|
+
"message-scroller",
|
|
1550
|
+
"shadcn/ui registry pattern",
|
|
1551
|
+
"AI/chat product primitive",
|
|
1552
|
+
"semantic Utopia wrapper"
|
|
1553
|
+
],
|
|
1554
|
+
"fallbackToShadcn": "message-scroller",
|
|
1555
|
+
"requiredTokens": [
|
|
1556
|
+
"--background",
|
|
1557
|
+
"--surface",
|
|
1558
|
+
"--surface-elevated",
|
|
1559
|
+
"--surface-hover",
|
|
1560
|
+
"--foreground",
|
|
1561
|
+
"--foreground-muted",
|
|
1562
|
+
"--border",
|
|
1563
|
+
"--radius-control",
|
|
1564
|
+
"--radius-surface",
|
|
1565
|
+
"--space-1",
|
|
1566
|
+
"--space-2",
|
|
1567
|
+
"--space-3",
|
|
1568
|
+
"--space-4",
|
|
1569
|
+
"--duration-fast",
|
|
1570
|
+
"--ease-standard",
|
|
1571
|
+
"--focus-ring-width",
|
|
1572
|
+
"--radius-chat-bubble",
|
|
1573
|
+
"--radius-chat-composer",
|
|
1574
|
+
"--radius-chat-token"
|
|
1575
|
+
],
|
|
1576
|
+
"useWhen": [
|
|
1577
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1578
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1579
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1580
|
+
],
|
|
1581
|
+
"avoidWhen": [
|
|
1582
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1583
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1584
|
+
"You only need a single generic card or empty state"
|
|
1585
|
+
],
|
|
1586
|
+
"neverInvent": [
|
|
1587
|
+
"Left/right-only layout rules",
|
|
1588
|
+
"Raw shadcn theme colors",
|
|
1589
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1590
|
+
"Arabic production copy generated by the component package"
|
|
1591
|
+
],
|
|
1592
|
+
"ai": {
|
|
1593
|
+
"props": {
|
|
1594
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1595
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1596
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1597
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1598
|
+
},
|
|
1599
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
"name": "Chat Message Metadata",
|
|
1604
|
+
"category": "Chat",
|
|
1605
|
+
"status": "available",
|
|
1606
|
+
"packageImport": "import { ChatMessageMetadata } from '@utopia-studio-design/design-system/Chat';",
|
|
1607
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1608
|
+
"shadcnFoundation": [
|
|
1609
|
+
"text",
|
|
1610
|
+
"shadcn/ui registry pattern",
|
|
1611
|
+
"AI/chat product primitive",
|
|
1612
|
+
"semantic Utopia wrapper"
|
|
1613
|
+
],
|
|
1614
|
+
"fallbackToShadcn": "text",
|
|
1615
|
+
"requiredTokens": [
|
|
1616
|
+
"--background",
|
|
1617
|
+
"--surface",
|
|
1618
|
+
"--surface-elevated",
|
|
1619
|
+
"--surface-hover",
|
|
1620
|
+
"--foreground",
|
|
1621
|
+
"--foreground-muted",
|
|
1622
|
+
"--border",
|
|
1623
|
+
"--radius-control",
|
|
1624
|
+
"--radius-surface",
|
|
1625
|
+
"--space-1",
|
|
1626
|
+
"--space-2",
|
|
1627
|
+
"--space-3",
|
|
1628
|
+
"--space-4",
|
|
1629
|
+
"--duration-fast",
|
|
1630
|
+
"--ease-standard",
|
|
1631
|
+
"--focus-ring-width",
|
|
1632
|
+
"--radius-chat-bubble",
|
|
1633
|
+
"--radius-chat-composer",
|
|
1634
|
+
"--radius-chat-token"
|
|
1635
|
+
],
|
|
1636
|
+
"useWhen": [
|
|
1637
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1638
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1639
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1640
|
+
],
|
|
1641
|
+
"avoidWhen": [
|
|
1642
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1643
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1644
|
+
"You only need a single generic card or empty state"
|
|
1645
|
+
],
|
|
1646
|
+
"neverInvent": [
|
|
1647
|
+
"Left/right-only layout rules",
|
|
1648
|
+
"Raw shadcn theme colors",
|
|
1649
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1650
|
+
"Arabic production copy generated by the component package"
|
|
1651
|
+
],
|
|
1652
|
+
"ai": {
|
|
1653
|
+
"props": {
|
|
1654
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1655
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1656
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1657
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1658
|
+
},
|
|
1659
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1660
|
+
}
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
"name": "Chat Send Button",
|
|
1664
|
+
"category": "Chat",
|
|
1665
|
+
"status": "available",
|
|
1666
|
+
"packageImport": "import { ChatSendButton } from '@utopia-studio-design/design-system/Chat';",
|
|
1667
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1668
|
+
"shadcnFoundation": [
|
|
1669
|
+
"button",
|
|
1670
|
+
"shadcn/ui registry pattern",
|
|
1671
|
+
"AI/chat product primitive",
|
|
1672
|
+
"semantic Utopia wrapper"
|
|
1673
|
+
],
|
|
1674
|
+
"fallbackToShadcn": "button",
|
|
1675
|
+
"requiredTokens": [
|
|
1676
|
+
"--background",
|
|
1677
|
+
"--surface",
|
|
1678
|
+
"--surface-elevated",
|
|
1679
|
+
"--surface-hover",
|
|
1680
|
+
"--foreground",
|
|
1681
|
+
"--foreground-muted",
|
|
1682
|
+
"--border",
|
|
1683
|
+
"--radius-control",
|
|
1684
|
+
"--radius-surface",
|
|
1685
|
+
"--space-1",
|
|
1686
|
+
"--space-2",
|
|
1687
|
+
"--space-3",
|
|
1688
|
+
"--space-4",
|
|
1689
|
+
"--duration-fast",
|
|
1690
|
+
"--ease-standard",
|
|
1691
|
+
"--focus-ring-width",
|
|
1692
|
+
"--radius-chat-bubble",
|
|
1693
|
+
"--radius-chat-composer",
|
|
1694
|
+
"--radius-chat-token"
|
|
1695
|
+
],
|
|
1696
|
+
"useWhen": [
|
|
1697
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1698
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1699
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1700
|
+
],
|
|
1701
|
+
"avoidWhen": [
|
|
1702
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1703
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1704
|
+
"You only need a single generic card or empty state"
|
|
1705
|
+
],
|
|
1706
|
+
"neverInvent": [
|
|
1707
|
+
"Left/right-only layout rules",
|
|
1708
|
+
"Raw shadcn theme colors",
|
|
1709
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1710
|
+
"Arabic production copy generated by the component package"
|
|
1711
|
+
],
|
|
1712
|
+
"ai": {
|
|
1713
|
+
"props": {
|
|
1714
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1715
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1716
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1717
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only.",
|
|
1718
|
+
"accessibilityText": "The required label prop is localized product copy for the send action and current state."
|
|
1719
|
+
},
|
|
1720
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"name": "Chat System Message",
|
|
1725
|
+
"category": "Chat",
|
|
1726
|
+
"status": "available",
|
|
1727
|
+
"packageImport": "import { ChatSystemMessage } from '@utopia-studio-design/design-system/Chat';",
|
|
1728
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1729
|
+
"shadcnFoundation": [
|
|
1730
|
+
"separator",
|
|
1731
|
+
"shadcn/ui registry pattern",
|
|
1732
|
+
"AI/chat product primitive",
|
|
1733
|
+
"semantic Utopia wrapper"
|
|
1734
|
+
],
|
|
1735
|
+
"fallbackToShadcn": "separator",
|
|
1736
|
+
"requiredTokens": [
|
|
1737
|
+
"--background",
|
|
1738
|
+
"--surface",
|
|
1739
|
+
"--surface-elevated",
|
|
1740
|
+
"--surface-hover",
|
|
1741
|
+
"--foreground",
|
|
1742
|
+
"--foreground-muted",
|
|
1743
|
+
"--border",
|
|
1744
|
+
"--radius-control",
|
|
1745
|
+
"--radius-surface",
|
|
1746
|
+
"--space-1",
|
|
1747
|
+
"--space-2",
|
|
1748
|
+
"--space-3",
|
|
1749
|
+
"--space-4",
|
|
1750
|
+
"--duration-fast",
|
|
1751
|
+
"--ease-standard",
|
|
1752
|
+
"--focus-ring-width",
|
|
1753
|
+
"--radius-chat-bubble",
|
|
1754
|
+
"--radius-chat-composer",
|
|
1755
|
+
"--radius-chat-token"
|
|
1756
|
+
],
|
|
1757
|
+
"useWhen": [
|
|
1758
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1759
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1760
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1761
|
+
],
|
|
1762
|
+
"avoidWhen": [
|
|
1763
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1764
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1765
|
+
"You only need a single generic card or empty state"
|
|
1766
|
+
],
|
|
1767
|
+
"neverInvent": [
|
|
1768
|
+
"Left/right-only layout rules",
|
|
1769
|
+
"Raw shadcn theme colors",
|
|
1770
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1771
|
+
"Arabic production copy generated by the component package"
|
|
1772
|
+
],
|
|
1773
|
+
"ai": {
|
|
1774
|
+
"props": {
|
|
1775
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1776
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1777
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1778
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1779
|
+
},
|
|
1780
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
"name": "Chat Tokenized Text",
|
|
1785
|
+
"category": "Chat",
|
|
1786
|
+
"status": "available",
|
|
1787
|
+
"packageImport": "import { ChatTokenizedText } from '@utopia-studio-design/design-system/Chat';",
|
|
1788
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1789
|
+
"shadcnFoundation": [
|
|
1790
|
+
"badge",
|
|
1791
|
+
"shadcn/ui registry pattern",
|
|
1792
|
+
"AI/chat product primitive",
|
|
1793
|
+
"semantic Utopia wrapper"
|
|
1794
|
+
],
|
|
1795
|
+
"fallbackToShadcn": "badge",
|
|
1796
|
+
"requiredTokens": [
|
|
1797
|
+
"--background",
|
|
1798
|
+
"--surface",
|
|
1799
|
+
"--surface-elevated",
|
|
1800
|
+
"--surface-hover",
|
|
1801
|
+
"--foreground",
|
|
1802
|
+
"--foreground-muted",
|
|
1803
|
+
"--border",
|
|
1804
|
+
"--radius-control",
|
|
1805
|
+
"--radius-surface",
|
|
1806
|
+
"--space-1",
|
|
1807
|
+
"--space-2",
|
|
1808
|
+
"--space-3",
|
|
1809
|
+
"--space-4",
|
|
1810
|
+
"--duration-fast",
|
|
1811
|
+
"--ease-standard",
|
|
1812
|
+
"--focus-ring-width",
|
|
1813
|
+
"--radius-chat-bubble",
|
|
1814
|
+
"--radius-chat-composer",
|
|
1815
|
+
"--radius-chat-token"
|
|
1816
|
+
],
|
|
1817
|
+
"useWhen": [
|
|
1818
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1819
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1820
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1821
|
+
],
|
|
1822
|
+
"avoidWhen": [
|
|
1823
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1824
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1825
|
+
"You only need a single generic card or empty state"
|
|
1826
|
+
],
|
|
1827
|
+
"neverInvent": [
|
|
1828
|
+
"Left/right-only layout rules",
|
|
1829
|
+
"Raw shadcn theme colors",
|
|
1830
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1831
|
+
"Arabic production copy generated by the component package"
|
|
1832
|
+
],
|
|
1833
|
+
"ai": {
|
|
1834
|
+
"props": {
|
|
1835
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1836
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1837
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1838
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only."
|
|
1839
|
+
},
|
|
1840
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1841
|
+
}
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
"name": "Chat Tool Calls",
|
|
1845
|
+
"category": "Chat",
|
|
1846
|
+
"status": "available",
|
|
1847
|
+
"packageImport": "import { ChatToolCalls } from '@utopia-studio-design/design-system/Chat';",
|
|
1848
|
+
"sourcePath": "packages/design-system/src/components/Chat.tsx",
|
|
1849
|
+
"shadcnFoundation": [
|
|
1850
|
+
"collapsible",
|
|
1851
|
+
"shadcn/ui registry pattern",
|
|
1852
|
+
"AI/chat product primitive",
|
|
1853
|
+
"semantic Utopia wrapper"
|
|
1854
|
+
],
|
|
1855
|
+
"fallbackToShadcn": "collapsible",
|
|
1856
|
+
"requiredTokens": [
|
|
1857
|
+
"--background",
|
|
1858
|
+
"--surface",
|
|
1859
|
+
"--surface-elevated",
|
|
1860
|
+
"--surface-hover",
|
|
1861
|
+
"--foreground",
|
|
1862
|
+
"--foreground-muted",
|
|
1863
|
+
"--border",
|
|
1864
|
+
"--radius-control",
|
|
1865
|
+
"--radius-surface",
|
|
1866
|
+
"--space-1",
|
|
1867
|
+
"--space-2",
|
|
1868
|
+
"--space-3",
|
|
1869
|
+
"--space-4",
|
|
1870
|
+
"--duration-fast",
|
|
1871
|
+
"--ease-standard",
|
|
1872
|
+
"--focus-ring-width",
|
|
1873
|
+
"--radius-chat-bubble",
|
|
1874
|
+
"--radius-chat-composer",
|
|
1875
|
+
"--radius-chat-token"
|
|
1876
|
+
],
|
|
1877
|
+
"useWhen": [
|
|
1878
|
+
"Building assistant, support, collaboration, or AI product chat surfaces",
|
|
1879
|
+
"Message, composer, token, metadata, and tool-call regions need consistent reusable parts",
|
|
1880
|
+
"The interface must support mixed-script content and dir=\"rtl\" layout without page-local rewrites"
|
|
1881
|
+
],
|
|
1882
|
+
"avoidWhen": [
|
|
1883
|
+
"The content is a static marketing testimonial rather than an interactive conversation",
|
|
1884
|
+
"The product needs a bespoke transcript renderer with non-chat semantics",
|
|
1885
|
+
"You only need a single generic card or empty state"
|
|
1886
|
+
],
|
|
1887
|
+
"neverInvent": [
|
|
1888
|
+
"Left/right-only layout rules",
|
|
1889
|
+
"Raw shadcn theme colors",
|
|
1890
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1891
|
+
"Arabic production copy generated by the component package"
|
|
1892
|
+
],
|
|
1893
|
+
"ai": {
|
|
1894
|
+
"props": {
|
|
1895
|
+
"dir": "Use inherited dir by default. Set dir=\"rtl\" only for isolated smoke tests.",
|
|
1896
|
+
"role": "Use user, assistant, or system where the component exposes message role.",
|
|
1897
|
+
"metadata": "Pass localized timestamp/read/tool metadata from the app layer.",
|
|
1898
|
+
"children": "Use product-owned copy. The design system supplies layout and tokens only.",
|
|
1899
|
+
"accessibilityText": "The required label prop is a localized summary of the tool-call group; call labels, descriptions, durations, and states come from product data."
|
|
1900
|
+
},
|
|
1901
|
+
"arabicFriendly": "Chat components use logical spacing, role-based alignment, mixed-script safe typography, and mirrored message flow in dir=\"rtl\". Do not invent Arabic copy in reusable components."
|
|
1902
|
+
}
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
"name": "Checkbox",
|
|
1906
|
+
"category": "Forms",
|
|
1907
|
+
"status": "available",
|
|
1908
|
+
"packageImport": "import { Checkbox } from '@utopia-studio-design/design-system/Forms';",
|
|
1909
|
+
"sourcePath": "packages/design-system/src/components/Forms.tsx",
|
|
1910
|
+
"shadcnFoundation": [
|
|
1911
|
+
"checkbox",
|
|
1912
|
+
"Radix Checkbox",
|
|
1913
|
+
"semantic Utopia wrapper"
|
|
1914
|
+
],
|
|
1915
|
+
"fallbackToShadcn": "checkbox",
|
|
1916
|
+
"requiredTokens": [
|
|
1917
|
+
"--background",
|
|
1918
|
+
"--foreground",
|
|
1919
|
+
"--input",
|
|
1920
|
+
"--primary",
|
|
1921
|
+
"--primary-foreground",
|
|
1922
|
+
"--radius-control",
|
|
1923
|
+
"--focus-ring-width",
|
|
1924
|
+
"--motion-duration-press",
|
|
1925
|
+
"--motion-ease-standard"
|
|
1926
|
+
],
|
|
1927
|
+
"useWhen": [
|
|
1928
|
+
"Multi-select boolean choices",
|
|
1929
|
+
"Terms acknowledgement",
|
|
1930
|
+
"Independent option toggles in forms"
|
|
1931
|
+
],
|
|
1932
|
+
"avoidWhen": [
|
|
1933
|
+
"Single persistent settings",
|
|
1934
|
+
"Exclusive choices",
|
|
1935
|
+
"Actions that should be buttons"
|
|
1936
|
+
],
|
|
1937
|
+
"neverInvent": [
|
|
1938
|
+
"Left/right label placement",
|
|
1939
|
+
"Left/right-only layout rules",
|
|
1940
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1941
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
1942
|
+
],
|
|
1943
|
+
"ai": {
|
|
1944
|
+
"props": {
|
|
1945
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
"name": "Collapsible",
|
|
1951
|
+
"category": "Disclosure",
|
|
1952
|
+
"status": "available",
|
|
1953
|
+
"packageImport": "import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
1954
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
1955
|
+
"shadcnFoundation": [
|
|
1956
|
+
"collapsible",
|
|
1957
|
+
"Radix Collapsible",
|
|
1958
|
+
"shadcn/ui registry"
|
|
1959
|
+
],
|
|
1960
|
+
"fallbackToShadcn": "collapsible",
|
|
1961
|
+
"requiredTokens": [
|
|
1962
|
+
"--surface",
|
|
1963
|
+
"--foreground",
|
|
1964
|
+
"--muted-foreground",
|
|
1965
|
+
"--border",
|
|
1966
|
+
"--radius-surface",
|
|
1967
|
+
"--radius-control",
|
|
1968
|
+
"--focus-ring-width",
|
|
1969
|
+
"--motion-duration-expand",
|
|
1970
|
+
"--motion-ease-standard"
|
|
1971
|
+
],
|
|
1972
|
+
"useWhen": [
|
|
1973
|
+
"Optional details",
|
|
1974
|
+
"Progressive disclosure inside a page",
|
|
1975
|
+
"Content that can be hidden without changing route"
|
|
1976
|
+
],
|
|
1977
|
+
"avoidWhen": [
|
|
1978
|
+
"Primary page navigation",
|
|
1979
|
+
"Required instructions",
|
|
1980
|
+
"Complex multi-section disclosure that should be Accordion"
|
|
1981
|
+
],
|
|
1982
|
+
"neverInvent": [
|
|
1983
|
+
"Raw shadcn theme colors",
|
|
1984
|
+
"Left/right-only layout rules",
|
|
1985
|
+
"Utopia brand primitives inside reusable component logic",
|
|
1986
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
1987
|
+
],
|
|
1988
|
+
"ai": {
|
|
1989
|
+
"props": {
|
|
1990
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
"name": "Combobox",
|
|
1996
|
+
"category": "Forms",
|
|
1997
|
+
"status": "available",
|
|
1998
|
+
"packageImport": "import { Combobox, ComboboxContent, ComboboxInput, ComboboxOption, ComboboxTrigger } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
1999
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2000
|
+
"shadcnFoundation": [
|
|
2001
|
+
"combobox",
|
|
2002
|
+
"shadcn/ui registry",
|
|
2003
|
+
"semantic Utopia wrapper"
|
|
2004
|
+
],
|
|
2005
|
+
"fallbackToShadcn": "combobox",
|
|
2006
|
+
"requiredTokens": [
|
|
2007
|
+
"--background",
|
|
2008
|
+
"--foreground",
|
|
2009
|
+
"--surface",
|
|
2010
|
+
"--border",
|
|
2011
|
+
"--radius-surface",
|
|
2012
|
+
"--radius-control",
|
|
2013
|
+
"--input",
|
|
2014
|
+
"--surface-hover",
|
|
2015
|
+
"--focus-ring-width"
|
|
2016
|
+
],
|
|
2017
|
+
"useWhen": [
|
|
2018
|
+
"Searchable selection from a known option set",
|
|
2019
|
+
"AI-generated forms that need an explicit trigger, input, content, and option contract",
|
|
2020
|
+
"Arabic-friendly product UI where option labels may be mixed-script or RTL"
|
|
2021
|
+
],
|
|
2022
|
+
"avoidWhen": [
|
|
2023
|
+
"A native select is sufficient",
|
|
2024
|
+
"Free text input with no option selection",
|
|
2025
|
+
"Product-specific filtering or async loading belongs in app logic"
|
|
2026
|
+
],
|
|
2027
|
+
"neverInvent": [
|
|
2028
|
+
"Raw shadcn theme colors",
|
|
2029
|
+
"Left/right-only layout rules",
|
|
2030
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2031
|
+
]
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
"name": "Command",
|
|
2035
|
+
"category": "Navigation",
|
|
2036
|
+
"status": "available",
|
|
2037
|
+
"packageImport": "import { Command, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList } from '@utopia-studio-design/design-system/Navigation';",
|
|
2038
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
2039
|
+
"shadcnFoundation": [
|
|
2040
|
+
"command",
|
|
2041
|
+
"cmdk",
|
|
2042
|
+
"shadcn/ui command",
|
|
2043
|
+
"semantic Utopia navigation wrapper"
|
|
2044
|
+
],
|
|
2045
|
+
"fallbackToShadcn": "command",
|
|
2046
|
+
"requiredTokens": [
|
|
2047
|
+
"--surface",
|
|
2048
|
+
"--border",
|
|
2049
|
+
"--radius-surface",
|
|
2050
|
+
"--input",
|
|
2051
|
+
"--focus-ring-width",
|
|
2052
|
+
"--foreground",
|
|
2053
|
+
"--muted-foreground",
|
|
2054
|
+
"--popover-surface",
|
|
2055
|
+
"--surface-hover",
|
|
2056
|
+
"--button-height"
|
|
2057
|
+
],
|
|
2058
|
+
"useWhen": [
|
|
2059
|
+
"Keyboard-first navigation and app command palettes",
|
|
2060
|
+
"Global search with grouped suggestions and shortcuts",
|
|
2061
|
+
"AI-generated admin surfaces where commands need explicit values and labels"
|
|
2062
|
+
],
|
|
2063
|
+
"avoidWhen": [
|
|
2064
|
+
"Small static menus that should use Dropdown Menu or Context Menu",
|
|
2065
|
+
"Unstructured free-text search without command actions",
|
|
2066
|
+
"Hidden shortcuts with no visible label or accessible value"
|
|
2067
|
+
],
|
|
2068
|
+
"neverInvent": [
|
|
2069
|
+
"Hidden commands without labels",
|
|
2070
|
+
"Left/right-only layout rules",
|
|
2071
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2072
|
+
]
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
"name": "Context Menu",
|
|
2076
|
+
"category": "Navigation",
|
|
2077
|
+
"status": "available",
|
|
2078
|
+
"packageImport": "import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from '@utopia-studio-design/design-system/Navigation';",
|
|
2079
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
2080
|
+
"shadcnFoundation": [
|
|
2081
|
+
"context-menu",
|
|
2082
|
+
"Radix Context Menu",
|
|
2083
|
+
"shadcn/ui context-menu",
|
|
2084
|
+
"semantic Utopia menu wrapper"
|
|
2085
|
+
],
|
|
2086
|
+
"fallbackToShadcn": "context-menu",
|
|
2087
|
+
"requiredTokens": [
|
|
2088
|
+
"--surface",
|
|
2089
|
+
"--border",
|
|
2090
|
+
"--radius-surface",
|
|
2091
|
+
"--focus-ring-width",
|
|
2092
|
+
"--foreground",
|
|
2093
|
+
"--muted-foreground",
|
|
2094
|
+
"--popover-surface",
|
|
2095
|
+
"--surface-hover",
|
|
2096
|
+
"--button-height"
|
|
2097
|
+
],
|
|
2098
|
+
"useWhen": [
|
|
2099
|
+
"Secondary contextual actions triggered from right-click or long-press surfaces",
|
|
2100
|
+
"Dense command sets that need labels, shortcuts, separators, checked state, or submenus",
|
|
2101
|
+
"AI-generated product tools where contextual actions should stay separate from primary navigation"
|
|
2102
|
+
],
|
|
2103
|
+
"avoidWhen": [
|
|
2104
|
+
"Primary workflows that must be visible without right click",
|
|
2105
|
+
"Mobile-only critical actions unless an equivalent visible trigger exists",
|
|
2106
|
+
"Navigation menus that should be discoverable as Top Nav, Side Nav, or Dropdown Menu"
|
|
2107
|
+
],
|
|
2108
|
+
"neverInvent": [
|
|
2109
|
+
"Unavailable actions with no disabled state",
|
|
2110
|
+
"Left/right-only layout rules",
|
|
2111
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2112
|
+
]
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"name": "Data Table",
|
|
2116
|
+
"category": "Data Display",
|
|
2117
|
+
"status": "available",
|
|
2118
|
+
"packageImport": "import { DataTable, DataTableBody, DataTableCell, DataTableFooter, DataTableHead, DataTableHeader, DataTableRow, DataTableShell, DataTableToolbar } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2119
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2120
|
+
"shadcnFoundation": [
|
|
2121
|
+
"data-table",
|
|
2122
|
+
"TanStack Table-compatible composition pattern",
|
|
2123
|
+
"shadcn/ui registry",
|
|
2124
|
+
"semantic Utopia wrapper"
|
|
2125
|
+
],
|
|
2126
|
+
"fallbackToShadcn": "table",
|
|
2127
|
+
"requiredTokens": [
|
|
2128
|
+
"--background",
|
|
2129
|
+
"--foreground",
|
|
2130
|
+
"--surface",
|
|
2131
|
+
"--border",
|
|
2132
|
+
"--radius-surface",
|
|
2133
|
+
"--radius-control",
|
|
2134
|
+
"--muted-foreground",
|
|
2135
|
+
"--surface-hover",
|
|
2136
|
+
"--surface-strong",
|
|
2137
|
+
"--input",
|
|
2138
|
+
"--focus-ring-width"
|
|
2139
|
+
],
|
|
2140
|
+
"useWhen": [
|
|
2141
|
+
"Structured tabular data with headers and comparable rows",
|
|
2142
|
+
"AI-generated admin/product views that need accessible table semantics",
|
|
2143
|
+
"Arabic-friendly data displays that must preserve table meaning in dir='rtl'"
|
|
2144
|
+
],
|
|
2145
|
+
"avoidWhen": [
|
|
2146
|
+
"Card lists are easier to scan",
|
|
2147
|
+
"Large virtualized data sets without product table requirements",
|
|
2148
|
+
"Locale-specific sorting, formatting, or filtering inside the reusable primitive"
|
|
2149
|
+
],
|
|
2150
|
+
"neverInvent": [
|
|
2151
|
+
"Raw shadcn theme colors",
|
|
2152
|
+
"Left/right-only layout rules",
|
|
2153
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2154
|
+
]
|
|
2155
|
+
},
|
|
2156
|
+
{
|
|
2157
|
+
"name": "Date Picker",
|
|
2158
|
+
"category": "Forms",
|
|
2159
|
+
"status": "available",
|
|
2160
|
+
"packageImport": "import { DatePicker } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
2161
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
2162
|
+
"shadcnFoundation": [
|
|
2163
|
+
"date-picker",
|
|
2164
|
+
"react-day-picker",
|
|
2165
|
+
"Radix Popover",
|
|
2166
|
+
"shadcn/ui date picker",
|
|
2167
|
+
"semantic Utopia wrapper",
|
|
2168
|
+
"controlled/uncontrolled state"
|
|
2169
|
+
],
|
|
2170
|
+
"fallbackToShadcn": "calendar plus popover",
|
|
2171
|
+
"requiredTokens": [
|
|
2172
|
+
"--background",
|
|
2173
|
+
"--foreground",
|
|
2174
|
+
"--surface",
|
|
2175
|
+
"--border",
|
|
2176
|
+
"--radius-surface",
|
|
2177
|
+
"--radius-control",
|
|
2178
|
+
"--input",
|
|
2179
|
+
"--primary",
|
|
2180
|
+
"--primary-foreground",
|
|
2181
|
+
"--surface-hover",
|
|
2182
|
+
"--button-height-sm",
|
|
2183
|
+
"--button-height-lg",
|
|
2184
|
+
"--z-popover",
|
|
2185
|
+
"--shadow-popover",
|
|
2186
|
+
"--duration-fast",
|
|
2187
|
+
"--ease-standard",
|
|
2188
|
+
"--focus-ring-width"
|
|
2189
|
+
],
|
|
2190
|
+
"useWhen": [
|
|
2191
|
+
"Calendar-backed date selection",
|
|
2192
|
+
"AI-generated forms that need a visible trigger and calendar grid contract",
|
|
2193
|
+
"Arabic-friendly date UI where locale formatting belongs in product or theme configuration"
|
|
2194
|
+
],
|
|
2195
|
+
"avoidWhen": [
|
|
2196
|
+
"Plain date text is enough",
|
|
2197
|
+
"Hijri or country-specific calendars before product requirements are defined",
|
|
2198
|
+
"Business date validation inside the reusable primitive"
|
|
2199
|
+
],
|
|
2200
|
+
"neverInvent": [
|
|
2201
|
+
"Raw shadcn theme colors",
|
|
2202
|
+
"Left/right-only layout rules",
|
|
2203
|
+
"Utopia brand primitives inside reusable component logic",
|
|
2204
|
+
"Product-specific date validation inside the reusable primitive"
|
|
2205
|
+
],
|
|
2206
|
+
"ai": {
|
|
2207
|
+
"props": {
|
|
2208
|
+
"defaultSelectedDate": "Initial selected date for uncontrolled usage.",
|
|
2209
|
+
"selectedDate": "Controlled selected date. Pair with onSelect.",
|
|
2210
|
+
"onSelect": "Called with a Date and closes the popover by default.",
|
|
2211
|
+
"locale": "Use a BCP 47 locale. Arabic locales switch the trigger, popover, and calendar to RTL.",
|
|
2212
|
+
"weekStartsOn": "Use product locale requirements. 0 is Sunday, 1 Monday, 6 Saturday.",
|
|
2213
|
+
"label": "Visible trigger label. Localize this in product copy.",
|
|
2214
|
+
"placeholder": "Visible trigger placeholder. Localize this in product copy."
|
|
2215
|
+
},
|
|
2216
|
+
"arabicFriendly": "Date Picker mirrors the popover alignment and trigger direction for Arabic, delegates calendar labels to react-day-picker locale data, and keeps Hijri/calendar-system support explicit."
|
|
2217
|
+
}
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"name": "Dialog",
|
|
2221
|
+
"category": "Feedback",
|
|
2222
|
+
"status": "available",
|
|
2223
|
+
"packageImport": "import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2224
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2225
|
+
"shadcnFoundation": [
|
|
2226
|
+
"dialog",
|
|
2227
|
+
"shadcn/ui registry",
|
|
2228
|
+
"semantic Utopia wrapper"
|
|
2229
|
+
],
|
|
2230
|
+
"fallbackToShadcn": "dialog",
|
|
2231
|
+
"requiredTokens": [
|
|
2232
|
+
"--background",
|
|
2233
|
+
"--foreground",
|
|
2234
|
+
"--surface",
|
|
2235
|
+
"--border",
|
|
2236
|
+
"--radius-surface",
|
|
2237
|
+
"--radius-control",
|
|
2238
|
+
"--z-overlay",
|
|
2239
|
+
"--z-modal",
|
|
2240
|
+
"--focus-ring-width",
|
|
2241
|
+
"--overlay",
|
|
2242
|
+
"--modal-surface",
|
|
2243
|
+
"--motion-duration-reveal",
|
|
2244
|
+
"--motion-ease-emphasized"
|
|
2245
|
+
],
|
|
2246
|
+
"useWhen": [
|
|
2247
|
+
"Focused interruptive content",
|
|
2248
|
+
"Forms or details that need an overlay surface",
|
|
2249
|
+
"AI-generated modals that need explicit trigger, content, title, description, and close parts"
|
|
2250
|
+
],
|
|
2251
|
+
"avoidWhen": [
|
|
2252
|
+
"Inline disclosure is enough",
|
|
2253
|
+
"Irreversible confirmation that should use Alert Dialog",
|
|
2254
|
+
"Product-specific flows hidden in reusable component logic"
|
|
2255
|
+
],
|
|
2256
|
+
"neverInvent": [
|
|
2257
|
+
"Raw shadcn theme colors",
|
|
2258
|
+
"Left/right-only layout rules",
|
|
2259
|
+
"Utopia brand primitives inside reusable component logic",
|
|
2260
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
2261
|
+
],
|
|
2262
|
+
"ai": {
|
|
2263
|
+
"props": {
|
|
2264
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
},
|
|
2268
|
+
{
|
|
2269
|
+
"name": "Direction",
|
|
2270
|
+
"category": "Utilities",
|
|
2271
|
+
"status": "available",
|
|
2272
|
+
"packageImport": "import { Direction } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2273
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2274
|
+
"shadcnFoundation": [
|
|
2275
|
+
"direction",
|
|
2276
|
+
"shadcn/ui registry",
|
|
2277
|
+
"semantic Utopia wrapper"
|
|
2278
|
+
],
|
|
2279
|
+
"fallbackToShadcn": "direction",
|
|
2280
|
+
"requiredTokens": [
|
|
2281
|
+
"--background",
|
|
2282
|
+
"--foreground",
|
|
2283
|
+
"--surface",
|
|
2284
|
+
"--border",
|
|
2285
|
+
"--radius-surface",
|
|
2286
|
+
"--font-arabic",
|
|
2287
|
+
"--focus-ring-width"
|
|
2288
|
+
],
|
|
2289
|
+
"useWhen": [
|
|
2290
|
+
"Scoped RTL smoke checks",
|
|
2291
|
+
"Mixed-script examples",
|
|
2292
|
+
"AI-generated demos that need to prove start/end layout instead of left/right layout"
|
|
2293
|
+
],
|
|
2294
|
+
"avoidWhen": [
|
|
2295
|
+
"App-level direction can be set on the document",
|
|
2296
|
+
"Arabic copy has not been localized or verified",
|
|
2297
|
+
"A component needs behavioral RTL handling instead of just a direction scope"
|
|
2298
|
+
],
|
|
2299
|
+
"neverInvent": [
|
|
2300
|
+
"Raw shadcn theme colors",
|
|
2301
|
+
"Left/right-only layout rules",
|
|
2302
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2303
|
+
]
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
"name": "Drawer",
|
|
2307
|
+
"category": "Feedback",
|
|
2308
|
+
"status": "available",
|
|
2309
|
+
"packageImport": "import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2310
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2311
|
+
"shadcnFoundation": [
|
|
2312
|
+
"drawer",
|
|
2313
|
+
"shadcn/ui registry",
|
|
2314
|
+
"semantic Utopia wrapper"
|
|
2315
|
+
],
|
|
2316
|
+
"fallbackToShadcn": "drawer",
|
|
2317
|
+
"requiredTokens": [
|
|
2318
|
+
"--background",
|
|
2319
|
+
"--foreground",
|
|
2320
|
+
"--surface",
|
|
2321
|
+
"--border",
|
|
2322
|
+
"--radius-surface",
|
|
2323
|
+
"--radius-control",
|
|
2324
|
+
"--z-overlay",
|
|
2325
|
+
"--z-modal",
|
|
2326
|
+
"--focus-ring-width",
|
|
2327
|
+
"--overlay",
|
|
2328
|
+
"--modal-surface",
|
|
2329
|
+
"--motion-duration-reveal",
|
|
2330
|
+
"--motion-ease-emphasized"
|
|
2331
|
+
],
|
|
2332
|
+
"useWhen": [
|
|
2333
|
+
"Supplemental panels that slide from logical start, end, or bottom",
|
|
2334
|
+
"Mobile-friendly task surfaces",
|
|
2335
|
+
"AI-generated layouts that need explicit side semantics for RTL"
|
|
2336
|
+
],
|
|
2337
|
+
"avoidWhen": [
|
|
2338
|
+
"A Dialog communicates the task better",
|
|
2339
|
+
"Primary navigation that should use Side Nav or Sheet",
|
|
2340
|
+
"Left/right side naming in reusable APIs"
|
|
2341
|
+
],
|
|
2342
|
+
"neverInvent": [
|
|
2343
|
+
"Raw shadcn theme colors",
|
|
2344
|
+
"Left/right-only layout rules",
|
|
2345
|
+
"Utopia brand primitives inside reusable component logic",
|
|
2346
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
2347
|
+
],
|
|
2348
|
+
"ai": {
|
|
2349
|
+
"props": {
|
|
2350
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
"name": "Dropdown Menu",
|
|
2356
|
+
"category": "Navigation",
|
|
2357
|
+
"status": "available",
|
|
2358
|
+
"packageImport": "import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from '@utopia-studio-design/design-system/Navigation';",
|
|
2359
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
2360
|
+
"shadcnFoundation": [
|
|
2361
|
+
"dropdown-menu",
|
|
2362
|
+
"Radix Dropdown Menu",
|
|
2363
|
+
"DropdownMenuLabel",
|
|
2364
|
+
"DropdownMenuSeparator",
|
|
2365
|
+
"DropdownMenuSub",
|
|
2366
|
+
"DropdownMenuGroup",
|
|
2367
|
+
"DropdownMenuCheckboxItem",
|
|
2368
|
+
"DropdownMenuRadioGroup",
|
|
2369
|
+
"DropdownMenuRadioItem",
|
|
2370
|
+
"DropdownMenuShortcut"
|
|
2371
|
+
],
|
|
2372
|
+
"fallbackToShadcn": "dropdown-menu",
|
|
2373
|
+
"requiredTokens": [
|
|
2374
|
+
"--surface",
|
|
2375
|
+
"--border",
|
|
2376
|
+
"--radius-surface",
|
|
2377
|
+
"--popover-surface",
|
|
2378
|
+
"--destructive",
|
|
2379
|
+
"--muted-foreground",
|
|
2380
|
+
"--button-height",
|
|
2381
|
+
"--focus-ring-width"
|
|
2382
|
+
],
|
|
2383
|
+
"useWhen": [
|
|
2384
|
+
"Compact action lists",
|
|
2385
|
+
"Overflow actions",
|
|
2386
|
+
"Grouped overflow actions with separators and submenus",
|
|
2387
|
+
"Button Group overflow triggers",
|
|
2388
|
+
"Checkbox and radio menu state",
|
|
2389
|
+
"Keyboard shortcut hints",
|
|
2390
|
+
"Submenu actions with RTL-aware indicators"
|
|
2391
|
+
],
|
|
2392
|
+
"avoidWhen": [
|
|
2393
|
+
"Primary page nav"
|
|
2394
|
+
],
|
|
2395
|
+
"neverInvent": [
|
|
2396
|
+
"Menu items without labels",
|
|
2397
|
+
"Left/right-only layout rules",
|
|
2398
|
+
"Utopia brand primitives inside reusable component logic",
|
|
2399
|
+
"Destructive actions without semantic destructive state",
|
|
2400
|
+
"Submenus without visible trigger text",
|
|
2401
|
+
"Checkbox or radio menu items without checked state ownership",
|
|
2402
|
+
"Shortcut text used as the only accessible label"
|
|
2403
|
+
],
|
|
2404
|
+
"ai": {
|
|
2405
|
+
"parts": [
|
|
2406
|
+
"DropdownMenu",
|
|
2407
|
+
"DropdownMenuTrigger",
|
|
2408
|
+
"DropdownMenuContent",
|
|
2409
|
+
"DropdownMenuGroup",
|
|
2410
|
+
"DropdownMenuItem",
|
|
2411
|
+
"DropdownMenuLabel",
|
|
2412
|
+
"DropdownMenuSeparator",
|
|
2413
|
+
"DropdownMenuCheckboxItem",
|
|
2414
|
+
"DropdownMenuRadioGroup",
|
|
2415
|
+
"DropdownMenuRadioItem",
|
|
2416
|
+
"DropdownMenuShortcut",
|
|
2417
|
+
"DropdownMenuSub",
|
|
2418
|
+
"DropdownMenuSubTrigger",
|
|
2419
|
+
"DropdownMenuSubContent"
|
|
2420
|
+
],
|
|
2421
|
+
"arabicFriendly": [
|
|
2422
|
+
"Use align=start/end instead of physical left/right positioning.",
|
|
2423
|
+
"Submenu indicators mirror in dir=rtl.",
|
|
2424
|
+
"Icon slots are optional; labels remain required.",
|
|
2425
|
+
"Shortcut hints stay inline-end using logical spacing."
|
|
2426
|
+
],
|
|
2427
|
+
"shadcnReferencePatterns": [
|
|
2428
|
+
"basic menu",
|
|
2429
|
+
"menu with icons",
|
|
2430
|
+
"menu with shortcuts",
|
|
2431
|
+
"checkbox items",
|
|
2432
|
+
"radio group",
|
|
2433
|
+
"submenu",
|
|
2434
|
+
"destructive action"
|
|
2435
|
+
]
|
|
2436
|
+
}
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
"name": "Empty",
|
|
2440
|
+
"category": "Data Display",
|
|
2441
|
+
"status": "available",
|
|
2442
|
+
"packageImport": "import { Empty } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
2443
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
2444
|
+
"shadcnFoundation": [
|
|
2445
|
+
"empty",
|
|
2446
|
+
"semantic empty state"
|
|
2447
|
+
],
|
|
2448
|
+
"fallbackToShadcn": "empty",
|
|
2449
|
+
"requiredTokens": [
|
|
2450
|
+
"--surface",
|
|
2451
|
+
"--border",
|
|
2452
|
+
"--radius-surface"
|
|
2453
|
+
],
|
|
2454
|
+
"useWhen": [
|
|
2455
|
+
"No data states",
|
|
2456
|
+
"First-run guidance"
|
|
2457
|
+
],
|
|
2458
|
+
"avoidWhen": [
|
|
2459
|
+
"Error states"
|
|
2460
|
+
],
|
|
2461
|
+
"neverInvent": [
|
|
2462
|
+
"Marketing filler copy",
|
|
2463
|
+
"Left/right-only layout rules",
|
|
2464
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2465
|
+
]
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
"name": "Field",
|
|
2469
|
+
"category": "Forms",
|
|
2470
|
+
"status": "available",
|
|
2471
|
+
"packageImport": "import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle } from '@utopia-studio-design/design-system/Forms';",
|
|
2472
|
+
"sourcePath": "packages/design-system/src/components/Forms.tsx",
|
|
2473
|
+
"shadcnFoundation": [
|
|
2474
|
+
"field",
|
|
2475
|
+
"label",
|
|
2476
|
+
"input"
|
|
2477
|
+
],
|
|
2478
|
+
"fallbackToShadcn": "field",
|
|
2479
|
+
"requiredTokens": [
|
|
2480
|
+
"--space-1",
|
|
2481
|
+
"--space-2",
|
|
2482
|
+
"--space-4",
|
|
2483
|
+
"--foreground",
|
|
2484
|
+
"--muted-foreground",
|
|
2485
|
+
"--destructive",
|
|
2486
|
+
"--border"
|
|
2487
|
+
],
|
|
2488
|
+
"useWhen": [
|
|
2489
|
+
"Form field composition",
|
|
2490
|
+
"Related controls need a semantic fieldset",
|
|
2491
|
+
"Labels, descriptions, and errors need a shared layout contract"
|
|
2492
|
+
],
|
|
2493
|
+
"avoidWhen": [
|
|
2494
|
+
"Inline metadata",
|
|
2495
|
+
"Standalone text without a form control"
|
|
2496
|
+
],
|
|
2497
|
+
"neverInvent": [
|
|
2498
|
+
"Placeholder-only labels",
|
|
2499
|
+
"Unconnected validation messages",
|
|
2500
|
+
"Left/right orientation names",
|
|
2501
|
+
"Left/right-only layout rules",
|
|
2502
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2503
|
+
]
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
"name": "Hover Card",
|
|
2507
|
+
"category": "Surface",
|
|
2508
|
+
"status": "available",
|
|
2509
|
+
"packageImport": "import { HoverCard, HoverCardContent, HoverCardTrigger } from '@utopia-studio-design/design-system/Surface';",
|
|
2510
|
+
"sourcePath": "packages/design-system/src/components/Surface.tsx",
|
|
2511
|
+
"shadcnFoundation": [
|
|
2512
|
+
"hover-card",
|
|
2513
|
+
"Radix Hover Card"
|
|
2514
|
+
],
|
|
2515
|
+
"fallbackToShadcn": "hover-card",
|
|
2516
|
+
"requiredTokens": [
|
|
2517
|
+
"--surface",
|
|
2518
|
+
"--border",
|
|
2519
|
+
"--shadow-popover",
|
|
2520
|
+
"--radius-surface",
|
|
2521
|
+
"--popover-surface",
|
|
2522
|
+
"--floating-content-width",
|
|
2523
|
+
"--motion-duration-reveal",
|
|
2524
|
+
"--motion-ease-emphasized"
|
|
2525
|
+
],
|
|
2526
|
+
"useWhen": [
|
|
2527
|
+
"Supplemental previews",
|
|
2528
|
+
"Nonessential hover detail",
|
|
2529
|
+
"A link or compact trigger benefits from a sighted preview"
|
|
2530
|
+
],
|
|
2531
|
+
"avoidWhen": [
|
|
2532
|
+
"Critical instructions",
|
|
2533
|
+
"Touch-only flows",
|
|
2534
|
+
"Content must be keyboard or screen-reader discoverable without the trigger context"
|
|
2535
|
+
],
|
|
2536
|
+
"neverInvent": [
|
|
2537
|
+
"Required content hidden on hover",
|
|
2538
|
+
"Unbounded popover widths",
|
|
2539
|
+
"Physical left/right names for logical alignment",
|
|
2540
|
+
"Hover-only product actions",
|
|
2541
|
+
"Left/right-only layout rules",
|
|
2542
|
+
"Utopia brand primitives inside reusable component logic",
|
|
2543
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
2544
|
+
],
|
|
2545
|
+
"ai": {
|
|
2546
|
+
"props": {
|
|
2547
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
{
|
|
2552
|
+
"name": "Icon Button",
|
|
2553
|
+
"category": "Action",
|
|
2554
|
+
"status": "available",
|
|
2555
|
+
"packageImport": "import { IconButton } from '@utopia-studio-design/design-system/IconButton';",
|
|
2556
|
+
"sourcePath": "packages/design-system/src/components/IconButton.tsx",
|
|
2557
|
+
"shadcnFoundation": [
|
|
2558
|
+
"button",
|
|
2559
|
+
"Slot",
|
|
2560
|
+
"cva"
|
|
2561
|
+
],
|
|
2562
|
+
"fallbackToShadcn": "shadcn/ui button with icon-only composition",
|
|
2563
|
+
"requiredTokens": [
|
|
2564
|
+
"--primary",
|
|
2565
|
+
"--primary-hover",
|
|
2566
|
+
"--primary-active",
|
|
2567
|
+
"--secondary",
|
|
2568
|
+
"--secondary-hover",
|
|
2569
|
+
"--secondary-active",
|
|
2570
|
+
"--ghost-hover",
|
|
2571
|
+
"--ghost-active",
|
|
2572
|
+
"--destructive",
|
|
2573
|
+
"--destructive-hover",
|
|
2574
|
+
"--destructive-active",
|
|
2575
|
+
"--radius-control",
|
|
2576
|
+
"--button-height",
|
|
2577
|
+
"--button-height-sm",
|
|
2578
|
+
"--button-height-lg",
|
|
2579
|
+
"--focus-ring-width"
|
|
2580
|
+
],
|
|
2581
|
+
"useWhen": [
|
|
2582
|
+
"Compact repeated actions",
|
|
2583
|
+
"Toolbar actions with recognizable icons",
|
|
2584
|
+
"Side navigation collapse or utility controls"
|
|
2585
|
+
],
|
|
2586
|
+
"avoidWhen": [
|
|
2587
|
+
"Primary actions that need visible labels",
|
|
2588
|
+
"Ambiguous actions without a tooltip or nearby context",
|
|
2589
|
+
"Navigation labels that should remain readable"
|
|
2590
|
+
],
|
|
2591
|
+
"neverInvent": [
|
|
2592
|
+
"Unlabeled icon-only buttons",
|
|
2593
|
+
"Theme-specific icon policy inside reusable component logic",
|
|
2594
|
+
"Removing icon-only support because a theme discourages icons",
|
|
2595
|
+
"Left/right-only icon direction rules",
|
|
2596
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2597
|
+
],
|
|
2598
|
+
"ai": {
|
|
2599
|
+
"props": [
|
|
2600
|
+
"label",
|
|
2601
|
+
"children",
|
|
2602
|
+
"variant",
|
|
2603
|
+
"size",
|
|
2604
|
+
"disabled",
|
|
2605
|
+
"loading",
|
|
2606
|
+
"loadingText",
|
|
2607
|
+
"asChild"
|
|
2608
|
+
],
|
|
2609
|
+
"rules": [
|
|
2610
|
+
"IconButton is the explicit reusable primitive for icon-only actions.",
|
|
2611
|
+
"A theme may constrain which icons are appropriate, but must not remove the primitive or its accessibility contract.",
|
|
2612
|
+
"Always provide label; visual children are not the accessible name."
|
|
2613
|
+
],
|
|
2614
|
+
"arabicFriendly": [
|
|
2615
|
+
"Mirror only directional icons in RTL; non-directional icons such as settings, add, download, and home should not be mirrored by default.",
|
|
2616
|
+
"Use localized aria-label text supplied by the product; do not invent Arabic copy."
|
|
2617
|
+
]
|
|
2618
|
+
}
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
"name": "Input",
|
|
2622
|
+
"category": "Forms",
|
|
2623
|
+
"status": "available",
|
|
2624
|
+
"packageImport": "import { Input } from '@utopia-studio-design/design-system/Forms';",
|
|
2625
|
+
"sourcePath": "packages/design-system/src/components/Forms.tsx",
|
|
2626
|
+
"shadcnFoundation": [
|
|
2627
|
+
"input",
|
|
2628
|
+
"semantic form control"
|
|
2629
|
+
],
|
|
2630
|
+
"fallbackToShadcn": "input",
|
|
2631
|
+
"requiredTokens": [
|
|
2632
|
+
"--input",
|
|
2633
|
+
"--radius-control",
|
|
2634
|
+
"--focus-ring-width"
|
|
2635
|
+
],
|
|
2636
|
+
"useWhen": [
|
|
2637
|
+
"Single-line text entry"
|
|
2638
|
+
],
|
|
2639
|
+
"avoidWhen": [
|
|
2640
|
+
"Long-form writing"
|
|
2641
|
+
],
|
|
2642
|
+
"neverInvent": [
|
|
2643
|
+
"Placeholder-only labels",
|
|
2644
|
+
"Left/right-only layout rules",
|
|
2645
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2646
|
+
]
|
|
2647
|
+
},
|
|
2648
|
+
{
|
|
2649
|
+
"name": "Input Group",
|
|
2650
|
+
"category": "Forms",
|
|
2651
|
+
"status": "available",
|
|
2652
|
+
"packageImport": "import { InputGroup, InputGroupInput, InputGroupText } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2653
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2654
|
+
"shadcnFoundation": [
|
|
2655
|
+
"input-group",
|
|
2656
|
+
"shadcn/ui registry",
|
|
2657
|
+
"semantic Utopia wrapper"
|
|
2658
|
+
],
|
|
2659
|
+
"fallbackToShadcn": "input-group",
|
|
2660
|
+
"requiredTokens": [
|
|
2661
|
+
"--background",
|
|
2662
|
+
"--foreground",
|
|
2663
|
+
"--surface",
|
|
2664
|
+
"--border",
|
|
2665
|
+
"--radius-control",
|
|
2666
|
+
"--input",
|
|
2667
|
+
"--muted-foreground",
|
|
2668
|
+
"--focus-ring-width"
|
|
2669
|
+
],
|
|
2670
|
+
"useWhen": [
|
|
2671
|
+
"Text input needs a prefix, suffix, unit, or scope label",
|
|
2672
|
+
"AI-generated forms need explicit addon and input parts",
|
|
2673
|
+
"Arabic-friendly forms need logical start/end addon placement"
|
|
2674
|
+
],
|
|
2675
|
+
"avoidWhen": [
|
|
2676
|
+
"A plain Input is sufficient",
|
|
2677
|
+
"The addon is decorative only",
|
|
2678
|
+
"Product validation or formatting belongs inside reusable component logic"
|
|
2679
|
+
],
|
|
2680
|
+
"neverInvent": [
|
|
2681
|
+
"Raw shadcn theme colors",
|
|
2682
|
+
"Left/right-only layout rules",
|
|
2683
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2684
|
+
]
|
|
2685
|
+
},
|
|
2686
|
+
{
|
|
2687
|
+
"name": "Input OTP",
|
|
2688
|
+
"category": "Forms",
|
|
2689
|
+
"status": "available",
|
|
2690
|
+
"packageImport": "import { InputOTP } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2691
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2692
|
+
"shadcnFoundation": [
|
|
2693
|
+
"input-otp",
|
|
2694
|
+
"shadcn/ui registry",
|
|
2695
|
+
"semantic Utopia wrapper"
|
|
2696
|
+
],
|
|
2697
|
+
"fallbackToShadcn": "input-otp",
|
|
2698
|
+
"requiredTokens": [
|
|
2699
|
+
"--background",
|
|
2700
|
+
"--foreground",
|
|
2701
|
+
"--input",
|
|
2702
|
+
"--radius-control",
|
|
2703
|
+
"--focus-ring-width"
|
|
2704
|
+
],
|
|
2705
|
+
"useWhen": [
|
|
2706
|
+
"One-time passcodes",
|
|
2707
|
+
"Short verification codes",
|
|
2708
|
+
"AI-generated authentication examples that need accessible grouped digit slots"
|
|
2709
|
+
],
|
|
2710
|
+
"avoidWhen": [
|
|
2711
|
+
"Long secrets or passwords",
|
|
2712
|
+
"Arbitrary numeric input",
|
|
2713
|
+
"Verification transport or security logic inside the reusable primitive"
|
|
2714
|
+
],
|
|
2715
|
+
"neverInvent": [
|
|
2716
|
+
"Raw shadcn theme colors",
|
|
2717
|
+
"Left/right-only layout rules",
|
|
2718
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2719
|
+
],
|
|
2720
|
+
"ai": {
|
|
2721
|
+
"props": {
|
|
2722
|
+
"aria-label": "Required localized label for the complete one-time-code group.",
|
|
2723
|
+
"getSlotLabel": "Required localization formatter that names each visual slot for assistive technology."
|
|
2724
|
+
},
|
|
2725
|
+
"arabicFriendly": "Supply Arabic slot labels and localized numerals from the product layer. Slot order follows inherited direction without hardcoded left/right spacing."
|
|
2726
|
+
}
|
|
2727
|
+
},
|
|
2728
|
+
{
|
|
2729
|
+
"name": "Item",
|
|
2730
|
+
"category": "Data Display",
|
|
2731
|
+
"status": "available",
|
|
2732
|
+
"packageImport": "import { Item, ItemActions, ItemContent, ItemDescription, ItemTitle } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2733
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2734
|
+
"shadcnFoundation": [
|
|
2735
|
+
"item",
|
|
2736
|
+
"shadcn/ui registry",
|
|
2737
|
+
"semantic Utopia wrapper"
|
|
2738
|
+
],
|
|
2739
|
+
"fallbackToShadcn": "item",
|
|
2740
|
+
"requiredTokens": [
|
|
2741
|
+
"--background",
|
|
2742
|
+
"--foreground",
|
|
2743
|
+
"--surface",
|
|
2744
|
+
"--border",
|
|
2745
|
+
"--radius-surface",
|
|
2746
|
+
"--muted-foreground",
|
|
2747
|
+
"--focus-ring-width"
|
|
2748
|
+
],
|
|
2749
|
+
"useWhen": [
|
|
2750
|
+
"Repeated rows with title and description",
|
|
2751
|
+
"Settings or resource lists with optional actions",
|
|
2752
|
+
"AI-generated list rows that need stable title, description, and action slots"
|
|
2753
|
+
],
|
|
2754
|
+
"avoidWhen": [
|
|
2755
|
+
"Tabular comparison data",
|
|
2756
|
+
"Complex cards with media or large content blocks",
|
|
2757
|
+
"Navigation-only rows that should be links or menu items"
|
|
2758
|
+
],
|
|
2759
|
+
"neverInvent": [
|
|
2760
|
+
"Raw shadcn theme colors",
|
|
2761
|
+
"Left/right-only layout rules",
|
|
2762
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2763
|
+
]
|
|
2764
|
+
},
|
|
2765
|
+
{
|
|
2766
|
+
"name": "Kbd",
|
|
2767
|
+
"category": "Data Display",
|
|
2768
|
+
"status": "available",
|
|
2769
|
+
"packageImport": "import { Kbd } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2770
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2771
|
+
"shadcnFoundation": [
|
|
2772
|
+
"kbd",
|
|
2773
|
+
"shadcn/ui registry",
|
|
2774
|
+
"semantic Utopia wrapper"
|
|
2775
|
+
],
|
|
2776
|
+
"fallbackToShadcn": "kbd",
|
|
2777
|
+
"requiredTokens": [
|
|
2778
|
+
"--foreground",
|
|
2779
|
+
"--surface",
|
|
2780
|
+
"--border",
|
|
2781
|
+
"--radius-control",
|
|
2782
|
+
"--focus-ring-width"
|
|
2783
|
+
],
|
|
2784
|
+
"useWhen": [
|
|
2785
|
+
"Keyboard shortcuts",
|
|
2786
|
+
"Command hints",
|
|
2787
|
+
"AI-readable docs that need compact key labels"
|
|
2788
|
+
],
|
|
2789
|
+
"avoidWhen": [
|
|
2790
|
+
"Clickable commands",
|
|
2791
|
+
"Long instructions",
|
|
2792
|
+
"Decorative keycap styling without an actual shortcut"
|
|
2793
|
+
],
|
|
2794
|
+
"neverInvent": [
|
|
2795
|
+
"Raw shadcn theme colors",
|
|
2796
|
+
"Left/right-only layout rules",
|
|
2797
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2798
|
+
]
|
|
2799
|
+
},
|
|
2800
|
+
{
|
|
2801
|
+
"name": "Label",
|
|
2802
|
+
"category": "Forms",
|
|
2803
|
+
"status": "available",
|
|
2804
|
+
"packageImport": "import { Label } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2805
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2806
|
+
"shadcnFoundation": [
|
|
2807
|
+
"label",
|
|
2808
|
+
"shadcn/ui registry",
|
|
2809
|
+
"semantic Utopia wrapper"
|
|
2810
|
+
],
|
|
2811
|
+
"fallbackToShadcn": "label",
|
|
2812
|
+
"requiredTokens": [
|
|
2813
|
+
"--foreground",
|
|
2814
|
+
"--muted-foreground",
|
|
2815
|
+
"--destructive",
|
|
2816
|
+
"--space-2"
|
|
2817
|
+
],
|
|
2818
|
+
"useWhen": [
|
|
2819
|
+
"Visible labels for checkboxes, switches, inputs, and other controls",
|
|
2820
|
+
"Accessible control association through matching htmlFor and id values",
|
|
2821
|
+
"AI-generated forms where placeholder-only labels are forbidden"
|
|
2822
|
+
],
|
|
2823
|
+
"avoidWhen": [
|
|
2824
|
+
"Decorative text",
|
|
2825
|
+
"Complex fields that need descriptions, validation, or grouped layout; use Field instead",
|
|
2826
|
+
"Field status or help text"
|
|
2827
|
+
],
|
|
2828
|
+
"neverInvent": [
|
|
2829
|
+
"A label whose htmlFor does not match the associated control id",
|
|
2830
|
+
"Placeholder-only labeling",
|
|
2831
|
+
"Production Arabic copy that was not supplied by localization",
|
|
2832
|
+
"Left/right-only layout rules",
|
|
2833
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2834
|
+
]
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
"name": "Menubar",
|
|
2838
|
+
"category": "Navigation",
|
|
2839
|
+
"status": "available",
|
|
2840
|
+
"packageImport": "import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2841
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2842
|
+
"shadcnFoundation": [
|
|
2843
|
+
"menubar",
|
|
2844
|
+
"shadcn/ui registry",
|
|
2845
|
+
"semantic Utopia wrapper"
|
|
2846
|
+
],
|
|
2847
|
+
"fallbackToShadcn": "menubar",
|
|
2848
|
+
"requiredTokens": [
|
|
2849
|
+
"--foreground",
|
|
2850
|
+
"--surface",
|
|
2851
|
+
"--surface-hover",
|
|
2852
|
+
"--muted-foreground",
|
|
2853
|
+
"--border",
|
|
2854
|
+
"--radius-surface",
|
|
2855
|
+
"--radius-control",
|
|
2856
|
+
"--secondary",
|
|
2857
|
+
"--secondary-foreground",
|
|
2858
|
+
"--z-popover",
|
|
2859
|
+
"--focus-ring-width",
|
|
2860
|
+
"--popover-surface"
|
|
2861
|
+
],
|
|
2862
|
+
"useWhen": [
|
|
2863
|
+
"Application-level command menus",
|
|
2864
|
+
"Desktop-style grouped navigation actions",
|
|
2865
|
+
"Persistent File, Edit, View, or Profiles command families",
|
|
2866
|
+
"AI-generated command surfaces that need groups, checkbox items, radio items, shortcuts, or submenus"
|
|
2867
|
+
],
|
|
2868
|
+
"avoidWhen": [
|
|
2869
|
+
"Simple page navigation where Top Nav or Navigation Menu is clearer",
|
|
2870
|
+
"Mobile-first primary navigation",
|
|
2871
|
+
"A single contextual action menu where Dropdown Menu is clearer"
|
|
2872
|
+
],
|
|
2873
|
+
"neverInvent": [
|
|
2874
|
+
"Keyboard shortcuts that the application has not registered",
|
|
2875
|
+
"Checkbox or radio state without application-owned state",
|
|
2876
|
+
"Production Arabic command labels not supplied by localization",
|
|
2877
|
+
"Left/right-only layout rules",
|
|
2878
|
+
"Utopia brand primitives inside reusable component logic"
|
|
2879
|
+
]
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
"category": "Navigation",
|
|
2883
|
+
"status": "available",
|
|
2884
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
2885
|
+
"neverInvent": [
|
|
2886
|
+
"Raw shadcn theme colors",
|
|
2887
|
+
"Left/right-only layout rules",
|
|
2888
|
+
"Utopia brand primitives inside reusable component logic",
|
|
2889
|
+
"Invented Arabic production copy"
|
|
2890
|
+
],
|
|
2891
|
+
"name": "Mobile Nav",
|
|
2892
|
+
"packageImport": "import { MobileNav, MobileNavContent, MobileNavToggle, MobileNavTrigger } from '@utopia-studio-design/design-system/Navigation';",
|
|
2893
|
+
"shadcnFoundation": [
|
|
2894
|
+
"dialog",
|
|
2895
|
+
"sheet",
|
|
2896
|
+
"Radix Dialog",
|
|
2897
|
+
"shadcn/ui sheet composition"
|
|
2898
|
+
],
|
|
2899
|
+
"fallbackToShadcn": "sheet",
|
|
2900
|
+
"requiredTokens": [
|
|
2901
|
+
"--foreground",
|
|
2902
|
+
"--muted-foreground",
|
|
2903
|
+
"--secondary",
|
|
2904
|
+
"--secondary-foreground",
|
|
2905
|
+
"--border",
|
|
2906
|
+
"--radius-control",
|
|
2907
|
+
"--radius-surface",
|
|
2908
|
+
"--popover-surface",
|
|
2909
|
+
"--focus-ring-width",
|
|
2910
|
+
"--modal-surface",
|
|
2911
|
+
"--overlay",
|
|
2912
|
+
"--z-modal"
|
|
2913
|
+
],
|
|
2914
|
+
"useWhen": [
|
|
2915
|
+
"Small viewport navigation needs an off-canvas panel",
|
|
2916
|
+
"Desktop Top Nav or Side Nav needs a mobile counterpart",
|
|
2917
|
+
"A mobile IA surface needs Dialog accessibility and escape/outside-click behavior"
|
|
2918
|
+
],
|
|
2919
|
+
"avoidWhen": [
|
|
2920
|
+
"Always-visible desktop navigation",
|
|
2921
|
+
"Non-navigation drawers that should use Drawer or Sheet"
|
|
2922
|
+
],
|
|
2923
|
+
"ai": {
|
|
2924
|
+
"props": {
|
|
2925
|
+
"defaultOpen": "Initial uncontrolled open state.",
|
|
2926
|
+
"open": "Controlled open state.",
|
|
2927
|
+
"onOpenChange": "Radix Dialog state callback.",
|
|
2928
|
+
"children": "MobileNavTrigger and MobileNavContent."
|
|
2929
|
+
},
|
|
2930
|
+
"arabicFriendly": "Panel opens from inline start, which becomes the right side in RTL. Use logical spacing and localized labels."
|
|
2931
|
+
}
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
"category": "Navigation",
|
|
2935
|
+
"status": "available",
|
|
2936
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
2937
|
+
"neverInvent": [
|
|
2938
|
+
"Raw shadcn theme colors",
|
|
2939
|
+
"Left/right-only layout rules",
|
|
2940
|
+
"Utopia brand primitives inside reusable component logic",
|
|
2941
|
+
"Invented Arabic production copy"
|
|
2942
|
+
],
|
|
2943
|
+
"name": "Mobile Nav Toggle",
|
|
2944
|
+
"packageImport": "import { MobileNavToggle } from '@utopia-studio-design/design-system/Navigation';",
|
|
2945
|
+
"shadcnFoundation": [
|
|
2946
|
+
"button",
|
|
2947
|
+
"icon-only button",
|
|
2948
|
+
"Dialog trigger composition"
|
|
2949
|
+
],
|
|
2950
|
+
"fallbackToShadcn": "button",
|
|
2951
|
+
"requiredTokens": [
|
|
2952
|
+
"--foreground",
|
|
2953
|
+
"--muted-foreground",
|
|
2954
|
+
"--secondary",
|
|
2955
|
+
"--secondary-foreground",
|
|
2956
|
+
"--border",
|
|
2957
|
+
"--radius-control",
|
|
2958
|
+
"--radius-surface",
|
|
2959
|
+
"--popover-surface",
|
|
2960
|
+
"--focus-ring-width"
|
|
2961
|
+
],
|
|
2962
|
+
"useWhen": [
|
|
2963
|
+
"An icon-only control opens or closes Mobile Nav",
|
|
2964
|
+
"The trigger needs Button semantics with accessible label"
|
|
2965
|
+
],
|
|
2966
|
+
"avoidWhen": [
|
|
2967
|
+
"Visible text buttons",
|
|
2968
|
+
"Desktop side nav collapse; use SideNavCollapseButton"
|
|
2969
|
+
],
|
|
2970
|
+
"ai": {
|
|
2971
|
+
"props": {
|
|
2972
|
+
"aria-label": "Required accessible label.",
|
|
2973
|
+
"open": "Optional visual open state.",
|
|
2974
|
+
"children": "Icon-only visual content."
|
|
2975
|
+
},
|
|
2976
|
+
"arabicFriendly": "Use direction-neutral menu icons unless product supplies mirrored directional icons."
|
|
2977
|
+
}
|
|
2978
|
+
},
|
|
2979
|
+
{
|
|
2980
|
+
"name": "Native Select",
|
|
2981
|
+
"category": "Forms",
|
|
2982
|
+
"status": "available",
|
|
2983
|
+
"packageImport": "import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
2984
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
2985
|
+
"shadcnFoundation": [
|
|
2986
|
+
"native-select",
|
|
2987
|
+
"shadcn/ui registry",
|
|
2988
|
+
"semantic Utopia wrapper"
|
|
2989
|
+
],
|
|
2990
|
+
"fallbackToShadcn": "native-select",
|
|
2991
|
+
"requiredTokens": [
|
|
2992
|
+
"--background",
|
|
2993
|
+
"--foreground",
|
|
2994
|
+
"--muted-foreground",
|
|
2995
|
+
"--surface-hover",
|
|
2996
|
+
"--destructive",
|
|
2997
|
+
"--input",
|
|
2998
|
+
"--radius-control",
|
|
2999
|
+
"--focus-ring-width",
|
|
3000
|
+
"--popover-surface"
|
|
3001
|
+
],
|
|
3002
|
+
"useWhen": [
|
|
3003
|
+
"Simple or grouped option selection using native browser behavior",
|
|
3004
|
+
"Performance-sensitive forms and mobile-optimized platform pickers",
|
|
3005
|
+
"Disabled or invalid form states that must retain native semantics",
|
|
3006
|
+
"Arabic-friendly forms that need platform behavior before custom Select is necessary"
|
|
3007
|
+
],
|
|
3008
|
+
"avoidWhen": [
|
|
3009
|
+
"Searchable or async option sets",
|
|
3010
|
+
"Complex custom option rendering",
|
|
3011
|
+
"Product localization rules inside reusable component logic"
|
|
3012
|
+
],
|
|
3013
|
+
"neverInvent": [
|
|
3014
|
+
"Product-owned option values or selection rules",
|
|
3015
|
+
"Production Arabic option labels not supplied by localization",
|
|
3016
|
+
"Left/right-only layout rules",
|
|
3017
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3018
|
+
]
|
|
3019
|
+
},
|
|
3020
|
+
{
|
|
3021
|
+
"category": "Navigation",
|
|
3022
|
+
"status": "available",
|
|
3023
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
3024
|
+
"neverInvent": [
|
|
3025
|
+
"Raw shadcn theme colors",
|
|
3026
|
+
"Left/right-only layout rules",
|
|
3027
|
+
"Utopia brand primitives inside reusable component logic",
|
|
3028
|
+
"Invented Arabic production copy"
|
|
3029
|
+
],
|
|
3030
|
+
"name": "Nav Heading Menu",
|
|
3031
|
+
"packageImport": "import { NavHeadingMenu, NavHeadingMenuContent, NavHeadingMenuTrigger } from '@utopia-studio-design/design-system/Navigation';",
|
|
3032
|
+
"shadcnFoundation": [
|
|
3033
|
+
"dropdown-menu",
|
|
3034
|
+
"Radix DropdownMenu",
|
|
3035
|
+
"heading selector menu"
|
|
3036
|
+
],
|
|
3037
|
+
"fallbackToShadcn": "dropdown-menu",
|
|
3038
|
+
"requiredTokens": [
|
|
3039
|
+
"--foreground",
|
|
3040
|
+
"--muted-foreground",
|
|
3041
|
+
"--secondary",
|
|
3042
|
+
"--secondary-foreground",
|
|
3043
|
+
"--border",
|
|
3044
|
+
"--radius-control",
|
|
3045
|
+
"--radius-surface",
|
|
3046
|
+
"--popover-surface",
|
|
3047
|
+
"--focus-ring-width"
|
|
3048
|
+
],
|
|
3049
|
+
"useWhen": [
|
|
3050
|
+
"A nav heading needs a workspace/version/project selector",
|
|
3051
|
+
"SideNavHeading or mobile nav heading needs an end-slot menu"
|
|
3052
|
+
],
|
|
3053
|
+
"avoidWhen": [
|
|
3054
|
+
"Primary navigation link lists",
|
|
3055
|
+
"Arbitrary action menus outside navigation headings"
|
|
3056
|
+
],
|
|
3057
|
+
"ai": {
|
|
3058
|
+
"props": {
|
|
3059
|
+
"children": "NavHeadingMenuTrigger and NavHeadingMenuContent."
|
|
3060
|
+
},
|
|
3061
|
+
"arabicFriendly": "Align content using logical start/end; labels come from localization."
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
"category": "Navigation",
|
|
3066
|
+
"status": "available",
|
|
3067
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
3068
|
+
"neverInvent": [
|
|
3069
|
+
"Raw shadcn theme colors",
|
|
3070
|
+
"Left/right-only layout rules",
|
|
3071
|
+
"Utopia brand primitives inside reusable component logic",
|
|
3072
|
+
"Invented Arabic production copy"
|
|
3073
|
+
],
|
|
3074
|
+
"name": "Nav Icon",
|
|
3075
|
+
"packageImport": "import { NavIcon } from '@utopia-studio-design/design-system/Navigation';",
|
|
3076
|
+
"shadcnFoundation": [
|
|
3077
|
+
"button",
|
|
3078
|
+
"icon-only button",
|
|
3079
|
+
"navigation utility action"
|
|
3080
|
+
],
|
|
3081
|
+
"fallbackToShadcn": "button",
|
|
3082
|
+
"requiredTokens": [
|
|
3083
|
+
"--foreground",
|
|
3084
|
+
"--muted-foreground",
|
|
3085
|
+
"--secondary",
|
|
3086
|
+
"--secondary-foreground",
|
|
3087
|
+
"--border",
|
|
3088
|
+
"--radius-control",
|
|
3089
|
+
"--radius-surface",
|
|
3090
|
+
"--popover-surface",
|
|
3091
|
+
"--focus-ring-width"
|
|
3092
|
+
],
|
|
3093
|
+
"useWhen": [
|
|
3094
|
+
"Top Nav, Mobile Nav, or nav heading needs icon-only utility actions like search, notifications, account, or workspace menus",
|
|
3095
|
+
"A navigation icon needs Button accessibility and tokenized hover/focus states"
|
|
3096
|
+
],
|
|
3097
|
+
"avoidWhen": [
|
|
3098
|
+
"Content icons inside body copy",
|
|
3099
|
+
"Navigation links with visible text; use TopNavItem or SideNavItem"
|
|
3100
|
+
],
|
|
3101
|
+
"ai": {
|
|
3102
|
+
"props": {
|
|
3103
|
+
"aria-label": "Required accessible label.",
|
|
3104
|
+
"active": "Selected visual state.",
|
|
3105
|
+
"children": "Icon-only visual content."
|
|
3106
|
+
},
|
|
3107
|
+
"arabicFriendly": "Directional icons must mirror or be replaced in RTL; direction-neutral icons need no mirroring."
|
|
3108
|
+
}
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
"name": "Navigation Menu",
|
|
3112
|
+
"category": "Navigation",
|
|
3113
|
+
"status": "available",
|
|
3114
|
+
"packageImport": "import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
3115
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
3116
|
+
"shadcnFoundation": [
|
|
3117
|
+
"navigation-menu",
|
|
3118
|
+
"shadcn/ui registry",
|
|
3119
|
+
"semantic Utopia wrapper"
|
|
3120
|
+
],
|
|
3121
|
+
"fallbackToShadcn": "navigation-menu",
|
|
3122
|
+
"requiredTokens": [
|
|
3123
|
+
"--background",
|
|
3124
|
+
"--foreground",
|
|
3125
|
+
"--surface",
|
|
3126
|
+
"--border",
|
|
3127
|
+
"--radius-surface",
|
|
3128
|
+
"--radius-control",
|
|
3129
|
+
"--secondary",
|
|
3130
|
+
"--secondary-foreground",
|
|
3131
|
+
"--surface-hover",
|
|
3132
|
+
"--muted-foreground",
|
|
3133
|
+
"--z-popover",
|
|
3134
|
+
"--focus-ring-width",
|
|
3135
|
+
"--duration-fast",
|
|
3136
|
+
"--duration-medium",
|
|
3137
|
+
"--ease-standard"
|
|
3138
|
+
],
|
|
3139
|
+
"useWhen": [
|
|
3140
|
+
"Top-level navigation with nested content",
|
|
3141
|
+
"Documentation or product navigation where a menu trigger reveals related links",
|
|
3142
|
+
"AI-generated navigation that needs explicit root, list, item, trigger, content, link, and viewport parts"
|
|
3143
|
+
],
|
|
3144
|
+
"avoidWhen": [
|
|
3145
|
+
"Simple inline links are enough",
|
|
3146
|
+
"Mobile primary navigation that should use Mobile Nav or Sheet",
|
|
3147
|
+
"Action commands that should use Menubar or Command",
|
|
3148
|
+
"Navigation labels without product-owned copy"
|
|
3149
|
+
],
|
|
3150
|
+
"neverInvent": [
|
|
3151
|
+
"Raw shadcn theme colors",
|
|
3152
|
+
"Left/right-only layout rules; use logical start/end and dir instead",
|
|
3153
|
+
"Product routes or Arabic production copy that were not supplied",
|
|
3154
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3155
|
+
]
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
"name": "Pagination",
|
|
3159
|
+
"category": "Navigation",
|
|
3160
|
+
"status": "available",
|
|
3161
|
+
"packageImport": "import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
3162
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
3163
|
+
"shadcnFoundation": [
|
|
3164
|
+
"pagination",
|
|
3165
|
+
"shadcn/ui registry",
|
|
3166
|
+
"semantic Utopia wrapper"
|
|
3167
|
+
],
|
|
3168
|
+
"fallbackToShadcn": "pagination",
|
|
3169
|
+
"requiredTokens": [
|
|
3170
|
+
"--foreground",
|
|
3171
|
+
"--surface",
|
|
3172
|
+
"--border",
|
|
3173
|
+
"--radius-control",
|
|
3174
|
+
"--secondary",
|
|
3175
|
+
"--secondary-foreground",
|
|
3176
|
+
"--muted-foreground",
|
|
3177
|
+
"--focus-ring-width",
|
|
3178
|
+
"--focus-ring-offset"
|
|
3179
|
+
],
|
|
3180
|
+
"useWhen": [
|
|
3181
|
+
"Paged result sets",
|
|
3182
|
+
"Tables or lists with known page navigation",
|
|
3183
|
+
"AI-generated data views that need previous, next, and current page semantics"
|
|
3184
|
+
],
|
|
3185
|
+
"avoidWhen": [
|
|
3186
|
+
"Infinite scrolling is the product pattern",
|
|
3187
|
+
"Small result sets",
|
|
3188
|
+
"Unknown or continuously loaded result sets where pagination would misrepresent progress",
|
|
3189
|
+
"Action controls that only resemble page navigation"
|
|
3190
|
+
],
|
|
3191
|
+
"neverInvent": [
|
|
3192
|
+
"Raw shadcn theme colors",
|
|
3193
|
+
"Left/right-only layout rules or unmirrored directional icons",
|
|
3194
|
+
"Page totals, localized numerals, or Arabic labels not supplied by product data",
|
|
3195
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3196
|
+
],
|
|
3197
|
+
"ai": {
|
|
3198
|
+
"props": {
|
|
3199
|
+
"aria-label": "Required localized label for the pagination navigation landmark.",
|
|
3200
|
+
"PaginationPrevious.text": "Required localized visible previous-page label.",
|
|
3201
|
+
"PaginationNext.text": "Required localized visible next-page label.",
|
|
3202
|
+
"PaginationEllipsis.label": "Required localized screen-reader label for omitted pages."
|
|
3203
|
+
},
|
|
3204
|
+
"arabicFriendly": "Pass localized labels and numerals from product code. Previous and next icons mirror through dir=\"rtl\" while the component uses logical spacing."
|
|
3205
|
+
}
|
|
3206
|
+
},
|
|
3207
|
+
{
|
|
3208
|
+
"name": "Popover",
|
|
3209
|
+
"category": "Surface",
|
|
3210
|
+
"status": "available",
|
|
3211
|
+
"packageImport": "import { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from '@utopia-studio-design/design-system/Surface';",
|
|
3212
|
+
"sourcePath": "packages/design-system/src/components/Surface.tsx",
|
|
3213
|
+
"shadcnFoundation": [
|
|
3214
|
+
"popover",
|
|
3215
|
+
"Radix Popover"
|
|
3216
|
+
],
|
|
3217
|
+
"fallbackToShadcn": "popover",
|
|
3218
|
+
"requiredTokens": [
|
|
3219
|
+
"--surface",
|
|
3220
|
+
"--border",
|
|
3221
|
+
"--shadow-popover",
|
|
3222
|
+
"--radius-surface",
|
|
3223
|
+
"--z-popover",
|
|
3224
|
+
"--focus-ring-width",
|
|
3225
|
+
"--focus-ring-offset",
|
|
3226
|
+
"--surface-hover",
|
|
3227
|
+
"--muted-foreground",
|
|
3228
|
+
"--popover-surface",
|
|
3229
|
+
"--motion-duration-reveal",
|
|
3230
|
+
"--motion-ease-emphasized"
|
|
3231
|
+
],
|
|
3232
|
+
"useWhen": [
|
|
3233
|
+
"Small contextual panels",
|
|
3234
|
+
"Inline configuration",
|
|
3235
|
+
"Non-modal supplemental controls that can be dismissed"
|
|
3236
|
+
],
|
|
3237
|
+
"avoidWhen": [
|
|
3238
|
+
"Long forms",
|
|
3239
|
+
"Full workflows",
|
|
3240
|
+
"Critical confirmations"
|
|
3241
|
+
],
|
|
3242
|
+
"neverInvent": [
|
|
3243
|
+
"Modal behavior",
|
|
3244
|
+
"Left/right-only alignment rules instead of logical start/end alignment",
|
|
3245
|
+
"Product form values, Arabic production copy, or persistence behavior",
|
|
3246
|
+
"Utopia brand primitives inside reusable component logic",
|
|
3247
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
3248
|
+
],
|
|
3249
|
+
"ai": {
|
|
3250
|
+
"props": {
|
|
3251
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
},
|
|
3255
|
+
{
|
|
3256
|
+
"name": "Progress",
|
|
3257
|
+
"category": "Data Display",
|
|
3258
|
+
"status": "available",
|
|
3259
|
+
"packageImport": "import { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
3260
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
3261
|
+
"shadcnFoundation": [
|
|
3262
|
+
"progress",
|
|
3263
|
+
"semantic progress indicator"
|
|
3264
|
+
],
|
|
3265
|
+
"fallbackToShadcn": "progress",
|
|
3266
|
+
"requiredTokens": [
|
|
3267
|
+
"--primary",
|
|
3268
|
+
"--secondary",
|
|
3269
|
+
"--success",
|
|
3270
|
+
"--warning",
|
|
3271
|
+
"--destructive",
|
|
3272
|
+
"--muted-foreground",
|
|
3273
|
+
"--radius-control",
|
|
3274
|
+
"--duration-medium",
|
|
3275
|
+
"--duration-slow",
|
|
3276
|
+
"--ease-standard"
|
|
3277
|
+
],
|
|
3278
|
+
"useWhen": [
|
|
3279
|
+
"Known progress values",
|
|
3280
|
+
"Uploads, setup steps, or task completion where aria-valuenow is meaningful"
|
|
3281
|
+
],
|
|
3282
|
+
"avoidWhen": [
|
|
3283
|
+
"Unknown loading states unless indeterminate is explicitly selected",
|
|
3284
|
+
"Decorative completion bars"
|
|
3285
|
+
],
|
|
3286
|
+
"neverInvent": [
|
|
3287
|
+
"Missing aria-valuenow for determinate progress",
|
|
3288
|
+
"Invented percentages or completion states not supplied by product data",
|
|
3289
|
+
"Left/right-only layout rules",
|
|
3290
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3291
|
+
],
|
|
3292
|
+
"ai": {
|
|
3293
|
+
"props": {
|
|
3294
|
+
"value": "Known numeric completion supplied by product state.",
|
|
3295
|
+
"indeterminate": "Use only when completion cannot be quantified.",
|
|
3296
|
+
"valueText": "Localized visible value such as Arabic numerals; keep numeric aria-valuenow on the track.",
|
|
3297
|
+
"status": "Semantic task status, never a raw color choice."
|
|
3298
|
+
},
|
|
3299
|
+
"arabicFriendly": "Progress grows from inline-start, indeterminate motion follows logical direction, and localized valueText is separate from numeric aria-valuenow."
|
|
3300
|
+
}
|
|
3301
|
+
},
|
|
3302
|
+
{
|
|
3303
|
+
"name": "Radio Group",
|
|
3304
|
+
"category": "Forms",
|
|
3305
|
+
"status": "available",
|
|
3306
|
+
"packageImport": "import { RadioGroup, RadioGroupItem, RadioGroupOption } from '@utopia-studio-design/design-system/Forms';",
|
|
3307
|
+
"sourcePath": "packages/design-system/src/components/Forms.tsx",
|
|
3308
|
+
"shadcnFoundation": [
|
|
3309
|
+
"radio-group",
|
|
3310
|
+
"semantic form choice"
|
|
3311
|
+
],
|
|
3312
|
+
"fallbackToShadcn": "radio-group",
|
|
3313
|
+
"requiredTokens": [
|
|
3314
|
+
"--primary",
|
|
3315
|
+
"--primary-foreground",
|
|
3316
|
+
"--input",
|
|
3317
|
+
"--background",
|
|
3318
|
+
"--surface",
|
|
3319
|
+
"--surface-hover",
|
|
3320
|
+
"--border",
|
|
3321
|
+
"--muted-foreground",
|
|
3322
|
+
"--destructive",
|
|
3323
|
+
"--radius-surface",
|
|
3324
|
+
"--focus-ring",
|
|
3325
|
+
"--focus-ring-width",
|
|
3326
|
+
"--focus-ring-offset"
|
|
3327
|
+
],
|
|
3328
|
+
"useWhen": [
|
|
3329
|
+
"Single choice from visible options",
|
|
3330
|
+
"Settings where all options should be visible",
|
|
3331
|
+
"Arabic-friendly forms that need label and control order to mirror with dir='rtl'"
|
|
3332
|
+
],
|
|
3333
|
+
"avoidWhen": [
|
|
3334
|
+
"Independent booleans",
|
|
3335
|
+
"Large option sets",
|
|
3336
|
+
"Compact selects are clearer"
|
|
3337
|
+
],
|
|
3338
|
+
"neverInvent": [
|
|
3339
|
+
"Checkbox behavior",
|
|
3340
|
+
"A card option without the same keyboard and selection contract as a standard option",
|
|
3341
|
+
"Product labels, descriptions, or selected values not supplied by the consumer",
|
|
3342
|
+
"Left/right-only layout rules",
|
|
3343
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3344
|
+
],
|
|
3345
|
+
"ai": {
|
|
3346
|
+
"props": {
|
|
3347
|
+
"value": "Controlled selected value for a mutually exclusive option set.",
|
|
3348
|
+
"defaultValue": "Initial value for an uncontrolled option set.",
|
|
3349
|
+
"onValueChange": "Receives the selected option value.",
|
|
3350
|
+
"orientation": "Keyboard navigation orientation: vertical or horizontal.",
|
|
3351
|
+
"variant": "RadioGroupOption presentation: default for dense forms or card for descriptive choices.",
|
|
3352
|
+
"label": "Visible option label supplied by product or localization.",
|
|
3353
|
+
"description": "Optional supporting text; do not repeat the label."
|
|
3354
|
+
},
|
|
3355
|
+
"arabicFriendly": "The control and copy follow logical inline order under dir='rtl'; labels align to inline-start, and card selection does not depend on a left/right position."
|
|
3356
|
+
}
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
"name": "Resizable",
|
|
3360
|
+
"category": "Layout",
|
|
3361
|
+
"status": "available",
|
|
3362
|
+
"packageImport": "import { Resizable, ResizableHandle, ResizablePanel } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
3363
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
3364
|
+
"shadcnFoundation": [
|
|
3365
|
+
"resizable",
|
|
3366
|
+
"shadcn/ui registry",
|
|
3367
|
+
"semantic Utopia wrapper"
|
|
3368
|
+
],
|
|
3369
|
+
"fallbackToShadcn": "resizable",
|
|
3370
|
+
"requiredTokens": [
|
|
3371
|
+
"--background",
|
|
3372
|
+
"--foreground",
|
|
3373
|
+
"--surface",
|
|
3374
|
+
"--border",
|
|
3375
|
+
"--radius-surface",
|
|
3376
|
+
"--focus-ring-width"
|
|
3377
|
+
],
|
|
3378
|
+
"useWhen": [
|
|
3379
|
+
"Split-pane layouts",
|
|
3380
|
+
"Inspector/editor surfaces where panel sizes are user-adjustable",
|
|
3381
|
+
"AI-generated app shells that need explicit panel and handle parts"
|
|
3382
|
+
],
|
|
3383
|
+
"avoidWhen": [
|
|
3384
|
+
"Static content layout",
|
|
3385
|
+
"Mobile layouts without a resize affordance",
|
|
3386
|
+
"Persistence or storage logic inside reusable component code"
|
|
3387
|
+
],
|
|
3388
|
+
"neverInvent": [
|
|
3389
|
+
"Raw shadcn theme colors",
|
|
3390
|
+
"A decorative divider that cannot be focused or resized with the keyboard",
|
|
3391
|
+
"A visible grip without the ResizableHandle separator behavior",
|
|
3392
|
+
"Left/right-only layout rules",
|
|
3393
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3394
|
+
],
|
|
3395
|
+
"ai": {
|
|
3396
|
+
"props": {
|
|
3397
|
+
"orientation": "Use horizontal for inline panels and vertical for stacked panels.",
|
|
3398
|
+
"defaultSize": "Initial panel percentage or size supplied by the product layout.",
|
|
3399
|
+
"withHandle": "Adds a visible grip without changing separator behavior.",
|
|
3400
|
+
"onLayoutChange": "Optional consumer-owned persistence hook; storage stays outside the component."
|
|
3401
|
+
},
|
|
3402
|
+
"arabicFriendly": "Horizontal panels follow DOM and logical inline order under dir='rtl'; do not encode left/right ownership in component props. Vertical resizing is direction-neutral."
|
|
3403
|
+
}
|
|
3404
|
+
},
|
|
3405
|
+
{
|
|
3406
|
+
"name": "Scroll Area",
|
|
3407
|
+
"category": "Layout",
|
|
3408
|
+
"status": "available",
|
|
3409
|
+
"packageImport": "import { ScrollArea, ScrollAreaCorner, ScrollAreaViewport, ScrollBar } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
3410
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
3411
|
+
"shadcnFoundation": [
|
|
3412
|
+
"scroll-area",
|
|
3413
|
+
"shadcn/ui registry",
|
|
3414
|
+
"semantic Utopia wrapper"
|
|
3415
|
+
],
|
|
3416
|
+
"fallbackToShadcn": "scroll-area",
|
|
3417
|
+
"requiredTokens": [
|
|
3418
|
+
"--background",
|
|
3419
|
+
"--foreground",
|
|
3420
|
+
"--surface",
|
|
3421
|
+
"--surface-strong",
|
|
3422
|
+
"--border",
|
|
3423
|
+
"--muted-foreground",
|
|
3424
|
+
"--radius-surface",
|
|
3425
|
+
"--radius-control",
|
|
3426
|
+
"--duration-fast",
|
|
3427
|
+
"--ease-standard",
|
|
3428
|
+
"--focus-ring-width"
|
|
3429
|
+
],
|
|
3430
|
+
"useWhen": [
|
|
3431
|
+
"Constrained panels with overflow content",
|
|
3432
|
+
"Scrollable side navigation regions, menus, and inspector regions",
|
|
3433
|
+
"AI-generated layouts that need an explicit viewport and scrollbar contract"
|
|
3434
|
+
],
|
|
3435
|
+
"avoidWhen": [
|
|
3436
|
+
"Page-level document scrolling is enough",
|
|
3437
|
+
"Virtualized large lists",
|
|
3438
|
+
"Hiding essential content behind an unlabelled scroll region"
|
|
3439
|
+
],
|
|
3440
|
+
"neverInvent": [
|
|
3441
|
+
"Raw shadcn theme colors",
|
|
3442
|
+
"A fixed component width or height instead of a consumer-owned layout constraint",
|
|
3443
|
+
"Always-visible scrollbars when hover or auto behavior is sufficient",
|
|
3444
|
+
"Horizontal content that assumes the physical left edge is the start",
|
|
3445
|
+
"Left/right-only layout rules",
|
|
3446
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3447
|
+
],
|
|
3448
|
+
"ai": {
|
|
3449
|
+
"props": {
|
|
3450
|
+
"type": "Scrollbar visibility behavior; hover is the default, with auto, scroll, and always available when explicitly required.",
|
|
3451
|
+
"orientation": "Set each ScrollBar to vertical or horizontal; render both plus ScrollAreaCorner for two-axis content.",
|
|
3452
|
+
"dir": "Inherit or set ltr/rtl so horizontal scrolling follows the locale direction."
|
|
3453
|
+
},
|
|
3454
|
+
"arabicFriendly": "Horizontal galleries begin at logical inline-start under dir='rtl'; content alignment uses start/end and scrollbar behavior must not assume a physical left origin."
|
|
3455
|
+
}
|
|
3456
|
+
},
|
|
3457
|
+
{
|
|
3458
|
+
"name": "Select",
|
|
3459
|
+
"category": "Forms",
|
|
3460
|
+
"status": "available",
|
|
3461
|
+
"packageImport": "import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from '@utopia-studio-design/design-system/Forms';",
|
|
3462
|
+
"sourcePath": "packages/design-system/src/components/Forms.tsx",
|
|
3463
|
+
"shadcnFoundation": [
|
|
3464
|
+
"select",
|
|
3465
|
+
"semantic selection control",
|
|
3466
|
+
"Radix Select",
|
|
3467
|
+
"SelectGroup",
|
|
3468
|
+
"SelectLabel",
|
|
3469
|
+
"SelectSeparator",
|
|
3470
|
+
"SelectScrollUpButton",
|
|
3471
|
+
"SelectScrollDownButton"
|
|
3472
|
+
],
|
|
3473
|
+
"fallbackToShadcn": "select",
|
|
3474
|
+
"requiredTokens": [
|
|
3475
|
+
"--input",
|
|
3476
|
+
"--surface",
|
|
3477
|
+
"--radius-control",
|
|
3478
|
+
"--radius-surface",
|
|
3479
|
+
"--z-popover",
|
|
3480
|
+
"--focus-ring-width",
|
|
3481
|
+
"--popover-surface",
|
|
3482
|
+
"--background",
|
|
3483
|
+
"--foreground",
|
|
3484
|
+
"--muted-foreground",
|
|
3485
|
+
"--button-height-sm"
|
|
3486
|
+
],
|
|
3487
|
+
"useWhen": [
|
|
3488
|
+
"Compact option selection",
|
|
3489
|
+
"Longer option sets than Radio Group",
|
|
3490
|
+
"AI-generated forms that need explicit trigger, value, content, and item parts",
|
|
3491
|
+
"Grouped option lists with labels",
|
|
3492
|
+
"Long option sets that need scroll buttons",
|
|
3493
|
+
"Disabled options with visible state"
|
|
3494
|
+
],
|
|
3495
|
+
"avoidWhen": [
|
|
3496
|
+
"Few visible choices where radio is clearer",
|
|
3497
|
+
"Searchable or async options that need Combobox",
|
|
3498
|
+
"Native platform select is enough"
|
|
3499
|
+
],
|
|
3500
|
+
"neverInvent": [
|
|
3501
|
+
"Menu without keyboard labels",
|
|
3502
|
+
"Left/right-only layout rules",
|
|
3503
|
+
"Utopia brand primitives inside reusable component logic",
|
|
3504
|
+
"Searchable async options; use Combobox",
|
|
3505
|
+
"Unlabeled SelectTrigger controls",
|
|
3506
|
+
"Physical left/right placement APIs"
|
|
3507
|
+
],
|
|
3508
|
+
"ai": {
|
|
3509
|
+
"parts": [
|
|
3510
|
+
"Select",
|
|
3511
|
+
"SelectTrigger",
|
|
3512
|
+
"SelectValue",
|
|
3513
|
+
"SelectContent",
|
|
3514
|
+
"SelectGroup",
|
|
3515
|
+
"SelectLabel",
|
|
3516
|
+
"SelectItem",
|
|
3517
|
+
"SelectSeparator",
|
|
3518
|
+
"SelectScrollUpButton",
|
|
3519
|
+
"SelectScrollDownButton"
|
|
3520
|
+
],
|
|
3521
|
+
"shadcnReferencePatterns": [
|
|
3522
|
+
"basic select",
|
|
3523
|
+
"select with groups",
|
|
3524
|
+
"disabled option",
|
|
3525
|
+
"scrollable select",
|
|
3526
|
+
"RTL select"
|
|
3527
|
+
],
|
|
3528
|
+
"arabicFriendly": [
|
|
3529
|
+
"Use aria-label or an external FieldLabel for the trigger.",
|
|
3530
|
+
"Use align=start/end for content placement and let dir=rtl handle inline flow.",
|
|
3531
|
+
"Keep selected indicators and labels visible for mixed-script text.",
|
|
3532
|
+
"Do not use native select when a tokenized shadcn/Utopia surface is required."
|
|
3533
|
+
]
|
|
3534
|
+
}
|
|
3535
|
+
},
|
|
3536
|
+
{
|
|
3537
|
+
"name": "Separator",
|
|
3538
|
+
"category": "Layout",
|
|
3539
|
+
"status": "available",
|
|
3540
|
+
"packageImport": "import { Separator } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
3541
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
3542
|
+
"shadcnFoundation": [
|
|
3543
|
+
"separator",
|
|
3544
|
+
"shadcn/ui registry",
|
|
3545
|
+
"semantic Utopia wrapper"
|
|
3546
|
+
],
|
|
3547
|
+
"fallbackToShadcn": "separator",
|
|
3548
|
+
"requiredTokens": [
|
|
3549
|
+
"--border"
|
|
3550
|
+
],
|
|
3551
|
+
"useWhen": [
|
|
3552
|
+
"Separating related sections",
|
|
3553
|
+
"Visual grouping inside dense surfaces",
|
|
3554
|
+
"AI-generated layouts that need semantic dividers without decorative lines"
|
|
3555
|
+
],
|
|
3556
|
+
"avoidWhen": [
|
|
3557
|
+
"Spacing alone communicates the grouping",
|
|
3558
|
+
"A heading or landmark is required",
|
|
3559
|
+
"Decorative rules that do not communicate structure"
|
|
3560
|
+
],
|
|
3561
|
+
"neverInvent": [
|
|
3562
|
+
"Raw shadcn theme colors",
|
|
3563
|
+
"Left/right-only layout rules",
|
|
3564
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3565
|
+
]
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
"name": "Sheet",
|
|
3569
|
+
"category": "Feedback",
|
|
3570
|
+
"status": "available",
|
|
3571
|
+
"packageImport": "import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
3572
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
3573
|
+
"shadcnFoundation": [
|
|
3574
|
+
"sheet",
|
|
3575
|
+
"shadcn/ui registry",
|
|
3576
|
+
"semantic Utopia wrapper"
|
|
3577
|
+
],
|
|
3578
|
+
"fallbackToShadcn": "sheet",
|
|
3579
|
+
"requiredTokens": [
|
|
3580
|
+
"--background",
|
|
3581
|
+
"--foreground",
|
|
3582
|
+
"--surface",
|
|
3583
|
+
"--border",
|
|
3584
|
+
"--radius-surface",
|
|
3585
|
+
"--radius-control",
|
|
3586
|
+
"--z-overlay",
|
|
3587
|
+
"--z-modal",
|
|
3588
|
+
"--focus-ring-width",
|
|
3589
|
+
"--overlay",
|
|
3590
|
+
"--modal-surface",
|
|
3591
|
+
"--motion-duration-reveal",
|
|
3592
|
+
"--motion-ease-emphasized"
|
|
3593
|
+
],
|
|
3594
|
+
"useWhen": [
|
|
3595
|
+
"Supplemental panels attached to a logical side",
|
|
3596
|
+
"Configuration or navigation surfaces that should not become full Dialogs",
|
|
3597
|
+
"AI-generated panels that need explicit trigger, content, header, footer, title, description, and close parts"
|
|
3598
|
+
],
|
|
3599
|
+
"avoidWhen": [
|
|
3600
|
+
"A centered Dialog is clearer",
|
|
3601
|
+
"Primary page layout that should use Side Nav",
|
|
3602
|
+
"Left/right side names instead of start/end or logical side handling"
|
|
3603
|
+
],
|
|
3604
|
+
"neverInvent": [
|
|
3605
|
+
"Raw shadcn theme colors",
|
|
3606
|
+
"Left/right-only layout rules",
|
|
3607
|
+
"Utopia brand primitives inside reusable component logic",
|
|
3608
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
3609
|
+
],
|
|
3610
|
+
"ai": {
|
|
3611
|
+
"props": {
|
|
3612
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
},
|
|
3616
|
+
{
|
|
3617
|
+
"name": "Side Nav",
|
|
3618
|
+
"category": "Navigation",
|
|
3619
|
+
"status": "available",
|
|
3620
|
+
"packageImport": "import { PanelIcon, SideNav, SideNavCollapseButton, SideNavContent, SideNavHeading, SideNavItem, SideNavNestedGroup, SideNavNestedItems, SideNavSearch, SideNavSection } from '@utopia-studio-design/design-system/Navigation';",
|
|
3621
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
3622
|
+
"shadcnFoundation": [
|
|
3623
|
+
"sidebar",
|
|
3624
|
+
"navigation",
|
|
3625
|
+
"shadcn/ui composition",
|
|
3626
|
+
"semantic Utopia wrapper"
|
|
3627
|
+
],
|
|
3628
|
+
"fallbackToShadcn": "sidebar",
|
|
3629
|
+
"requiredTokens": [
|
|
3630
|
+
"--background",
|
|
3631
|
+
"--foreground",
|
|
3632
|
+
"--border",
|
|
3633
|
+
"--radius-control",
|
|
3634
|
+
"--secondary",
|
|
3635
|
+
"--secondary-foreground",
|
|
3636
|
+
"--muted-foreground",
|
|
3637
|
+
"--foreground-subtle",
|
|
3638
|
+
"--button-height-sm",
|
|
3639
|
+
"--focus-ring-width"
|
|
3640
|
+
],
|
|
3641
|
+
"useWhen": [
|
|
3642
|
+
"Persistent docs or app navigation",
|
|
3643
|
+
"Grouped navigation links with current page state",
|
|
3644
|
+
"A navigation surface needs package-owned content, search, section, nested group, item, heading, account, and collapse composition parts",
|
|
3645
|
+
"A navigation surface should receive heading and search as SideNav props instead of hardcoding local wrappers",
|
|
3646
|
+
"AI-generated app shells that need explicit section, heading, item, nested item, search, and collapse button parts"
|
|
3647
|
+
],
|
|
3648
|
+
"avoidWhen": [
|
|
3649
|
+
"Temporary panels that should use Sheet",
|
|
3650
|
+
"Top-level horizontal navigation that should use Top Nav",
|
|
3651
|
+
"Navigation without accessible labels or current state"
|
|
3652
|
+
],
|
|
3653
|
+
"neverInvent": [
|
|
3654
|
+
"Raw shadcn theme colors",
|
|
3655
|
+
"Left/right-only layout rules",
|
|
3656
|
+
"Utopia brand primitives inside reusable component logic",
|
|
3657
|
+
"Local CSS-only search, nested group, or content wrappers when SideNavSearch, SideNavNestedGroup, SideNavNestedItems, or SideNavContent are available"
|
|
3658
|
+
],
|
|
3659
|
+
"ai": {
|
|
3660
|
+
"props": {
|
|
3661
|
+
"collapsed": "Sets the collapsed side navigation state and hides labels, badges, and account copy while preserving icon-only affordances.",
|
|
3662
|
+
"density": "Use default for app navigation; use compact for docs/library sidebars with dense catalog lists.",
|
|
3663
|
+
"heading": "Optional SideNavHeading node rendered before search and navigation content.",
|
|
3664
|
+
"search": "Optional SideNavSearch node rendered after heading and before navigation content.",
|
|
3665
|
+
"SideNavContent": "Scrollable or flexible body region for repeated SideNavSection groups.",
|
|
3666
|
+
"SideNavSearch": "Package-owned search field for filtering navigation lists without local input styling.",
|
|
3667
|
+
"SideNavNestedGroup": "Groups a parent SideNavItem and its nested child collection.",
|
|
3668
|
+
"SideNavNestedItems": "Indented child item collection using logical inline-start spacing and border.",
|
|
3669
|
+
"PanelIcon": "Direction-neutral icon exported for SideNavCollapseButton examples. Prefer it over directional arrows unless the directional icon has an RTL mirror rule."
|
|
3670
|
+
},
|
|
3671
|
+
"arabicFriendly": "Use logical start/end spacing in nested items and let document direction control order. Closed disclosure indicators rotate toward the inline start in LTR and RTL. Preserve scroll position when the side nav collapses and expands, and do not use left/right naming in generated side navigation layouts."
|
|
3672
|
+
}
|
|
3673
|
+
},
|
|
3674
|
+
{
|
|
3675
|
+
"name": "Side Nav Collapse Button",
|
|
3676
|
+
"category": "Navigation",
|
|
3677
|
+
"status": "available",
|
|
3678
|
+
"packageImport": "import { PanelIcon, SideNavCollapseButton } from '@utopia-studio-design/design-system/Navigation';",
|
|
3679
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
3680
|
+
"shadcnFoundation": [
|
|
3681
|
+
"button",
|
|
3682
|
+
"Button variant=ghost",
|
|
3683
|
+
"icon-only control",
|
|
3684
|
+
"sidebar collapse control",
|
|
3685
|
+
"semantic Utopia wrapper"
|
|
3686
|
+
],
|
|
3687
|
+
"fallbackToShadcn": "button",
|
|
3688
|
+
"requiredTokens": [
|
|
3689
|
+
"--foreground",
|
|
3690
|
+
"--muted-foreground",
|
|
3691
|
+
"--radius-control",
|
|
3692
|
+
"--focus-ring-width",
|
|
3693
|
+
"--ghost-hover",
|
|
3694
|
+
"--ghost-active"
|
|
3695
|
+
],
|
|
3696
|
+
"useWhen": [
|
|
3697
|
+
"A persistent side navigation can collapse or expand",
|
|
3698
|
+
"The control is composed as SideNavHeading endContent",
|
|
3699
|
+
"The button uses the design-system Button primitive with variant=ghost and isIconOnly",
|
|
3700
|
+
"The button is icon-only with hover/focus background and an accessible label; add Tooltip when visual context is not enough",
|
|
3701
|
+
"The button has aria-expanded and an accessible label",
|
|
3702
|
+
"AI-generated app shells expose side nav state without inventing local controls"
|
|
3703
|
+
],
|
|
3704
|
+
"avoidWhen": [
|
|
3705
|
+
"The side navigation has no collapsed state",
|
|
3706
|
+
"A text button is required",
|
|
3707
|
+
"A temporary panel close action that should use SheetClose",
|
|
3708
|
+
"Icon-only controls without accessible labels; add visible or tooltip help when context is ambiguous"
|
|
3709
|
+
],
|
|
3710
|
+
"neverInvent": [
|
|
3711
|
+
"Visible Collapse text inside the control",
|
|
3712
|
+
"Custom button styling instead of Button variant=ghost isIconOnly",
|
|
3713
|
+
"Hardcoded app icons",
|
|
3714
|
+
"Raw shadcn theme colors",
|
|
3715
|
+
"Left/right-only layout rules",
|
|
3716
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3717
|
+
],
|
|
3718
|
+
"ai": {
|
|
3719
|
+
"props": {
|
|
3720
|
+
"aria-label": "Required accessible label, such as Close sidebar or Open sidebar.",
|
|
3721
|
+
"aria-expanded": "Reflects the controlled side navigation state.",
|
|
3722
|
+
"children": "Icon-only visual content. SideNavCollapseButton wraps Button with variant=ghost and isIconOnly; compose inside SideNavHeading endContent. Add Tooltip when the surrounding UI does not already make the action clear."
|
|
3723
|
+
},
|
|
3724
|
+
"usage": "Place SideNavCollapseButton in SideNavHeading endContent. Always provide aria-label and aria-expanded. When a tooltip is needed, wrap with Tooltip/TooltipTrigger asChild and keep visible helper text in TooltipContent rather than inside the button.",
|
|
3725
|
+
"arabicFriendly": "PanelIcon is direction-neutral. If a product supplies a directional collapse icon, it must mirror in dir=\"rtl\" or be replaced with a neutral panel icon. Prefer direction-neutral tooltip placement, or use logical placement/RTL branching where the host app supports it."
|
|
3726
|
+
}
|
|
3727
|
+
},
|
|
3728
|
+
{
|
|
3729
|
+
"name": "Side Nav Heading",
|
|
3730
|
+
"category": "Navigation",
|
|
3731
|
+
"status": "available",
|
|
3732
|
+
"packageImport": "import { SideNavHeading } from '@utopia-studio-design/design-system/Navigation';",
|
|
3733
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
3734
|
+
"shadcnFoundation": [
|
|
3735
|
+
"sidebar group label",
|
|
3736
|
+
"semantic heading",
|
|
3737
|
+
"semantic Utopia wrapper"
|
|
3738
|
+
],
|
|
3739
|
+
"fallbackToShadcn": "sidebar",
|
|
3740
|
+
"requiredTokens": [
|
|
3741
|
+
"--foreground",
|
|
3742
|
+
"--muted-foreground",
|
|
3743
|
+
"--radius-control",
|
|
3744
|
+
"--radius-surface",
|
|
3745
|
+
"--space-1",
|
|
3746
|
+
"--space-3",
|
|
3747
|
+
"--font-size-supporting",
|
|
3748
|
+
"--line-height-supporting"
|
|
3749
|
+
],
|
|
3750
|
+
"useWhen": [
|
|
3751
|
+
"Grouping related side navigation items with variant=section",
|
|
3752
|
+
"A side navigation surface needs a brand, workspace, product, or documentation heading with variant=brand",
|
|
3753
|
+
"A heading needs optional icon, meta, subtitle/version, or endContent slots without hardcoding icon assets",
|
|
3754
|
+
"AI-generated navigation needs stable section labels from manifest data"
|
|
3755
|
+
],
|
|
3756
|
+
"avoidWhen": [
|
|
3757
|
+
"A clickable navigation item is required",
|
|
3758
|
+
"A dropdown menu body is required; compose SideNavHeading with a menu primitive instead",
|
|
3759
|
+
"Decorative labels with no section relationship"
|
|
3760
|
+
],
|
|
3761
|
+
"neverInvent": [
|
|
3762
|
+
"Raw brand colors inside the component",
|
|
3763
|
+
"Hardcoded app icons",
|
|
3764
|
+
"Left/right-only layout rules",
|
|
3765
|
+
"Arabic copy invented by the component",
|
|
3766
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3767
|
+
],
|
|
3768
|
+
"ai": {
|
|
3769
|
+
"props": {
|
|
3770
|
+
"variant": "section keeps compact group-label styling; brand renders a larger app/workspace header.",
|
|
3771
|
+
"icon": "Optional leading visual slot. Omit for text-only headings; artwork is app or theme owned. Large logos and wordmarks are constrained by the component.",
|
|
3772
|
+
"mediaSize": "Use mark for compact square icons, wordmark for wide logos, or auto when the consumer controls sizing.",
|
|
3773
|
+
"meta": "Optional line above the label, such as organization or workspace.",
|
|
3774
|
+
"subtitle": "Optional line below the label.",
|
|
3775
|
+
"version": "Alias for subtitle for versioned docs/product surfaces.",
|
|
3776
|
+
"endContent": "Optional trailing slot for chevrons, status, or menu affordance."
|
|
3777
|
+
},
|
|
3778
|
+
"arabicFriendly": "Use logical layout and start/end slots. Do not bake English-only ordering into icon, label, meta, or endContent."
|
|
3779
|
+
}
|
|
3780
|
+
},
|
|
3781
|
+
{
|
|
3782
|
+
"name": "Side Nav Item",
|
|
3783
|
+
"category": "Navigation",
|
|
3784
|
+
"status": "available",
|
|
3785
|
+
"packageImport": "import { SideNavItem } from '@utopia-studio-design/design-system/Navigation';",
|
|
3786
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
3787
|
+
"shadcnFoundation": [
|
|
3788
|
+
"sidebar menu item",
|
|
3789
|
+
"link",
|
|
3790
|
+
"semantic Utopia wrapper"
|
|
3791
|
+
],
|
|
3792
|
+
"fallbackToShadcn": "sidebar",
|
|
3793
|
+
"requiredTokens": [
|
|
3794
|
+
"--secondary",
|
|
3795
|
+
"--secondary-foreground",
|
|
3796
|
+
"--muted-foreground",
|
|
3797
|
+
"--foreground-subtle",
|
|
3798
|
+
"--radius-control",
|
|
3799
|
+
"--focus-ring-width",
|
|
3800
|
+
"--space-2",
|
|
3801
|
+
"--space-3",
|
|
3802
|
+
"--space-4",
|
|
3803
|
+
"--space-6",
|
|
3804
|
+
"--space-8"
|
|
3805
|
+
],
|
|
3806
|
+
"useWhen": [
|
|
3807
|
+
"A side navigation row links to a route or section",
|
|
3808
|
+
"The current page can be marked with isCurrent or aria-current",
|
|
3809
|
+
"The row needs optional icon/startContent, badge, or endContent slots while keeping spacing owned by the component.",
|
|
3810
|
+
"The row is nested inside a side nav hierarchy and needs depth-based indentation",
|
|
3811
|
+
"A navigation option needs disabled status without becoming a button"
|
|
3812
|
+
],
|
|
3813
|
+
"avoidWhen": [
|
|
3814
|
+
"Submitting actions that should use Button",
|
|
3815
|
+
"Nested disclosure controls that should use a future collapsible nav primitive",
|
|
3816
|
+
"Hardcoded icons or counts inside local navigation markup"
|
|
3817
|
+
],
|
|
3818
|
+
"neverInvent": [
|
|
3819
|
+
"Raw shadcn theme colors",
|
|
3820
|
+
"Left/right-only layout rules",
|
|
3821
|
+
"Utopia brand primitives inside reusable component logic",
|
|
3822
|
+
"Local CSS-only side nav item layouts when SideNavItem slots are available"
|
|
3823
|
+
],
|
|
3824
|
+
"ai": {
|
|
3825
|
+
"props": {
|
|
3826
|
+
"icon": "Optional leading visual slot. Omit for text-only rows; do not add placeholder marks.",
|
|
3827
|
+
"depth": "Use 0 for root rows, 1 for items inside a top-level section, 2 for nested section children, and 3 only for rare deep navigation.",
|
|
3828
|
+
"badge": "Optional trailing count or status pill aligned to the inline end.",
|
|
3829
|
+
"endContent": "Optional trailing action/content slot after the badge."
|
|
3830
|
+
},
|
|
3831
|
+
"arabicFriendly": "Use icon/startContent for inline-start content and badge/endContent for inline-end content. In dir=\"rtl\", spacing and indentation must follow inline start/end, mixed Arabic/English labels must truncate without overlapping badges, and disabled/current states must remain keyboard and screen-reader equivalent."
|
|
3832
|
+
}
|
|
3833
|
+
},
|
|
3834
|
+
{
|
|
3835
|
+
"name": "Side Nav Section",
|
|
3836
|
+
"category": "Navigation",
|
|
3837
|
+
"status": "available",
|
|
3838
|
+
"packageImport": "import { SideNavSection } from '@utopia-studio-design/design-system/Navigation';",
|
|
3839
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
3840
|
+
"shadcnFoundation": [
|
|
3841
|
+
"sidebar group",
|
|
3842
|
+
"semantic section wrapper",
|
|
3843
|
+
"semantic Utopia wrapper"
|
|
3844
|
+
],
|
|
3845
|
+
"fallbackToShadcn": "sidebar",
|
|
3846
|
+
"requiredTokens": [
|
|
3847
|
+
"--space-1",
|
|
3848
|
+
"--space-3",
|
|
3849
|
+
"--space-4",
|
|
3850
|
+
"--border",
|
|
3851
|
+
"--muted-foreground",
|
|
3852
|
+
"--duration-fast",
|
|
3853
|
+
"--duration-medium",
|
|
3854
|
+
"--ease-standard"
|
|
3855
|
+
],
|
|
3856
|
+
"useWhen": [
|
|
3857
|
+
"Grouping a section label and related Side Nav Item rows",
|
|
3858
|
+
"A side nav needs repeated IA groups from a manifest",
|
|
3859
|
+
"A long side nav section should optionally collapse without inventing local disclosure controls",
|
|
3860
|
+
"Nested component families that need a parent row with collapsible children should use variant=nested",
|
|
3861
|
+
"AI-generated shells should map Docs, Account, Project, or Settings groups into sections"
|
|
3862
|
+
],
|
|
3863
|
+
"avoidWhen": [
|
|
3864
|
+
"A single clickable navigation row is required; use SideNavItem",
|
|
3865
|
+
"A brand/workspace header is required; use SideNavHeading variant=brand",
|
|
3866
|
+
"Content regions that should use Layout or Section"
|
|
3867
|
+
],
|
|
3868
|
+
"neverInvent": [
|
|
3869
|
+
"Raw shadcn theme colors",
|
|
3870
|
+
"Left/right-only layout rules",
|
|
3871
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3872
|
+
],
|
|
3873
|
+
"ai": {
|
|
3874
|
+
"props": {
|
|
3875
|
+
"label": "Optional section label rendered before children with SideNavHeading variant=section or a row-style nested trigger when variant=nested.",
|
|
3876
|
+
"children": "SideNavItem rows or related navigation content owned by this section.",
|
|
3877
|
+
"collapsible": "When true, the full section heading or nested trigger toggles the section; the chevron is a visual end indicator, not the only hit target.",
|
|
3878
|
+
"variant": "Use section for top-level IA groups. Use nested for a row-style parent with indented collapsible children, such as component families.",
|
|
3879
|
+
"defaultExpanded": "Initial uncontrolled expanded state for collapsible sections.",
|
|
3880
|
+
"expanded": "Controlled expanded state for collapsible sections.",
|
|
3881
|
+
"onExpandedChange": "Called when a collapsible section toggles."
|
|
3882
|
+
},
|
|
3883
|
+
"arabicFriendly": "Group order follows document direction. Use logical spacing and avoid left/right labels in generated section layouts."
|
|
3884
|
+
}
|
|
3885
|
+
},
|
|
3886
|
+
{
|
|
3887
|
+
"name": "Skeleton",
|
|
3888
|
+
"category": "Data Display",
|
|
3889
|
+
"status": "available",
|
|
3890
|
+
"packageImport": "import { Skeleton } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
3891
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
3892
|
+
"shadcnFoundation": [
|
|
3893
|
+
"skeleton"
|
|
3894
|
+
],
|
|
3895
|
+
"fallbackToShadcn": "skeleton",
|
|
3896
|
+
"requiredTokens": [
|
|
3897
|
+
"--muted",
|
|
3898
|
+
"--radius-surface",
|
|
3899
|
+
"--duration-fast"
|
|
3900
|
+
],
|
|
3901
|
+
"useWhen": [
|
|
3902
|
+
"Loading placeholders",
|
|
3903
|
+
"Layout-preserving content previews",
|
|
3904
|
+
"Avoiding layout shift while data loads"
|
|
3905
|
+
],
|
|
3906
|
+
"avoidWhen": [
|
|
3907
|
+
"Finished empty states",
|
|
3908
|
+
"Unknown long-running progress where Spinner or Progress is clearer"
|
|
3909
|
+
],
|
|
3910
|
+
"neverInvent": [
|
|
3911
|
+
"Spinner-only page skeletons",
|
|
3912
|
+
"Left/right-only layout rules",
|
|
3913
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3914
|
+
]
|
|
3915
|
+
},
|
|
3916
|
+
{
|
|
3917
|
+
"name": "Sidebar",
|
|
3918
|
+
"category": "Navigation",
|
|
3919
|
+
"status": "available",
|
|
3920
|
+
"packageImport": "import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarOverlay, SidebarProvider, SidebarRail, SidebarTrigger, useSidebar } from '@utopia-studio-design/design-system/Sidebar';",
|
|
3921
|
+
"sourcePath": "packages/design-system/src/components/Sidebar.tsx",
|
|
3922
|
+
"shadcnFoundation": [
|
|
3923
|
+
"sidebar",
|
|
3924
|
+
"composable app shell",
|
|
3925
|
+
"semantic Utopia wrapper"
|
|
3926
|
+
],
|
|
3927
|
+
"fallbackToShadcn": "sidebar",
|
|
3928
|
+
"requiredTokens": [
|
|
3929
|
+
"--background",
|
|
3930
|
+
"--foreground",
|
|
3931
|
+
"--border",
|
|
3932
|
+
"--surface-hover",
|
|
3933
|
+
"--popover-surface",
|
|
3934
|
+
"--radius-control",
|
|
3935
|
+
"--radius-surface",
|
|
3936
|
+
"--sidebar-width",
|
|
3937
|
+
"--sidebar-width-collapsed",
|
|
3938
|
+
"--sidebar-min-block-size",
|
|
3939
|
+
"--sidebar-rail-size",
|
|
3940
|
+
"--duration-medium",
|
|
3941
|
+
"--ease-standard"
|
|
3942
|
+
],
|
|
3943
|
+
"useWhen": [
|
|
3944
|
+
"Building a controlled or uncontrolled application shell with collapsible navigation",
|
|
3945
|
+
"Composing header, content, footer, groups, menu items, actions, badges, submenus, rail, and inset content",
|
|
3946
|
+
"A responsive off-canvas or icon-collapse application sidebar is required independently from documentation Side Nav"
|
|
3947
|
+
],
|
|
3948
|
+
"avoidWhen": [
|
|
3949
|
+
"Rendering the design-system documentation tree; use Side Nav",
|
|
3950
|
+
"A temporary overlay should use Sheet",
|
|
3951
|
+
"Hardcoding product destinations inside the reusable primitive"
|
|
3952
|
+
],
|
|
3953
|
+
"neverInvent": [
|
|
3954
|
+
"Left/right-only collapse rules",
|
|
3955
|
+
"Product-specific menu data",
|
|
3956
|
+
"Utopia brand primitives inside reusable component logic"
|
|
3957
|
+
],
|
|
3958
|
+
"ai": {
|
|
3959
|
+
"parts": [
|
|
3960
|
+
"SidebarProvider",
|
|
3961
|
+
"Sidebar",
|
|
3962
|
+
"SidebarHeader",
|
|
3963
|
+
"SidebarContent",
|
|
3964
|
+
"SidebarFooter",
|
|
3965
|
+
"SidebarGroup",
|
|
3966
|
+
"SidebarGroupAction",
|
|
3967
|
+
"SidebarGroupLabel",
|
|
3968
|
+
"SidebarInset",
|
|
3969
|
+
"SidebarMenu",
|
|
3970
|
+
"SidebarMenuItem",
|
|
3971
|
+
"SidebarMenuButton",
|
|
3972
|
+
"SidebarMenuAction",
|
|
3973
|
+
"SidebarMenuBadge",
|
|
3974
|
+
"SidebarMenuSub",
|
|
3975
|
+
"SidebarMenuSubItem",
|
|
3976
|
+
"SidebarMenuSubButton",
|
|
3977
|
+
"SidebarOverlay",
|
|
3978
|
+
"SidebarRail",
|
|
3979
|
+
"SidebarTrigger",
|
|
3980
|
+
"useSidebar"
|
|
3981
|
+
],
|
|
3982
|
+
"arabicFriendly": "Use dir=rtl at the shell boundary and provide localized collapseLabel, expandLabel, overlay labels, rail labels, and tooltip strings. Logical borders, alignment, off-canvas motion, submenus, and badges mirror without changing the component API."
|
|
3983
|
+
}
|
|
3984
|
+
},
|
|
3985
|
+
{
|
|
3986
|
+
"name": "Slider",
|
|
3987
|
+
"category": "Forms",
|
|
3988
|
+
"status": "available",
|
|
3989
|
+
"packageImport": "import { Slider } from '@utopia-studio-design/design-system/Forms';",
|
|
3990
|
+
"sourcePath": "packages/design-system/src/components/Forms.tsx",
|
|
3991
|
+
"shadcnFoundation": [
|
|
3992
|
+
"slider",
|
|
3993
|
+
"Radix Slider"
|
|
3994
|
+
],
|
|
3995
|
+
"fallbackToShadcn": "slider",
|
|
3996
|
+
"requiredTokens": [
|
|
3997
|
+
"--primary",
|
|
3998
|
+
"--secondary",
|
|
3999
|
+
"--background",
|
|
4000
|
+
"--shadow-control",
|
|
4001
|
+
"--focus-ring-width"
|
|
4002
|
+
],
|
|
4003
|
+
"useWhen": [
|
|
4004
|
+
"Continuous numeric adjustment",
|
|
4005
|
+
"Approximate values where dragging is useful",
|
|
4006
|
+
"Arabic-friendly numeric controls that must mirror direction with RTL"
|
|
4007
|
+
],
|
|
4008
|
+
"avoidWhen": [
|
|
4009
|
+
"Exact numeric entry only",
|
|
4010
|
+
"Unlabeled ranges",
|
|
4011
|
+
"Business validation inside reusable component logic"
|
|
4012
|
+
],
|
|
4013
|
+
"neverInvent": [
|
|
4014
|
+
"Unlabeled ranges",
|
|
4015
|
+
"Left/right-only layout rules",
|
|
4016
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4017
|
+
]
|
|
4018
|
+
},
|
|
4019
|
+
{
|
|
4020
|
+
"name": "Sonner",
|
|
4021
|
+
"category": "Feedback",
|
|
4022
|
+
"status": "available",
|
|
4023
|
+
"packageImport": "import { Toaster, toast } from '@utopia-studio-design/design-system/ShadcnPrimitives';",
|
|
4024
|
+
"sourcePath": "packages/design-system/src/components/ShadcnPrimitives.tsx",
|
|
4025
|
+
"shadcnFoundation": [
|
|
4026
|
+
"sonner",
|
|
4027
|
+
"shadcn/ui registry",
|
|
4028
|
+
"semantic Utopia wrapper"
|
|
4029
|
+
],
|
|
4030
|
+
"fallbackToShadcn": "toast",
|
|
4031
|
+
"requiredTokens": [
|
|
4032
|
+
"--background",
|
|
4033
|
+
"--foreground",
|
|
4034
|
+
"--surface",
|
|
4035
|
+
"--border",
|
|
4036
|
+
"--radius-surface",
|
|
4037
|
+
"--shadow-popover",
|
|
4038
|
+
"--muted-foreground",
|
|
4039
|
+
"--focus-ring-width"
|
|
4040
|
+
],
|
|
4041
|
+
"useWhen": [
|
|
4042
|
+
"Nonblocking toast feedback",
|
|
4043
|
+
"Status messages that should be announced politely",
|
|
4044
|
+
"AI-generated examples that need success, error, promise, description, and position behavior"
|
|
4045
|
+
],
|
|
4046
|
+
"avoidWhen": [
|
|
4047
|
+
"Blocking errors",
|
|
4048
|
+
"Long-form content",
|
|
4049
|
+
"Product notification scheduling inside reusable component logic"
|
|
4050
|
+
],
|
|
4051
|
+
"neverInvent": [
|
|
4052
|
+
"Raw shadcn theme colors",
|
|
4053
|
+
"Left/right-only layout rules",
|
|
4054
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4055
|
+
]
|
|
4056
|
+
},
|
|
4057
|
+
{
|
|
4058
|
+
"name": "Spinner",
|
|
4059
|
+
"category": "Data Display",
|
|
4060
|
+
"status": "available",
|
|
4061
|
+
"packageImport": "import { Spinner } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
4062
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
4063
|
+
"shadcnFoundation": [
|
|
4064
|
+
"spinner"
|
|
4065
|
+
],
|
|
4066
|
+
"fallbackToShadcn": "spinner",
|
|
4067
|
+
"requiredTokens": [
|
|
4068
|
+
"--foreground",
|
|
4069
|
+
"--duration-fast"
|
|
4070
|
+
],
|
|
4071
|
+
"useWhen": [
|
|
4072
|
+
"Short inline loading",
|
|
4073
|
+
"Small pending states next to text or controls"
|
|
4074
|
+
],
|
|
4075
|
+
"avoidWhen": [
|
|
4076
|
+
"Large page loading",
|
|
4077
|
+
"Known progress values where Progress is clearer"
|
|
4078
|
+
],
|
|
4079
|
+
"neverInvent": [
|
|
4080
|
+
"Unannounced loading state",
|
|
4081
|
+
"Left/right-only layout rules",
|
|
4082
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4083
|
+
],
|
|
4084
|
+
"ai": {
|
|
4085
|
+
"props": {
|
|
4086
|
+
"label": "Localized loading text. Supplying it exposes role=status and a live region.",
|
|
4087
|
+
"aria-label": "Localized accessible name when no visible label is rendered. Without either label, Spinner is decorative and aria-hidden."
|
|
4088
|
+
},
|
|
4089
|
+
"arabicFriendly": "Loading labels come from product localization. The spinner is direction-neutral and must not be mirrored."
|
|
4090
|
+
}
|
|
4091
|
+
},
|
|
4092
|
+
{
|
|
4093
|
+
"name": "Switch",
|
|
4094
|
+
"category": "Forms",
|
|
4095
|
+
"status": "available",
|
|
4096
|
+
"packageImport": "import { Switch } from '@utopia-studio-design/design-system/Forms';",
|
|
4097
|
+
"sourcePath": "packages/design-system/src/components/Forms.tsx",
|
|
4098
|
+
"shadcnFoundation": [
|
|
4099
|
+
"switch",
|
|
4100
|
+
"Radix Switch"
|
|
4101
|
+
],
|
|
4102
|
+
"fallbackToShadcn": "switch",
|
|
4103
|
+
"requiredTokens": [
|
|
4104
|
+
"--primary",
|
|
4105
|
+
"--secondary",
|
|
4106
|
+
"--background",
|
|
4107
|
+
"--border",
|
|
4108
|
+
"--shadow-control",
|
|
4109
|
+
"--focus-ring-width"
|
|
4110
|
+
],
|
|
4111
|
+
"useWhen": [
|
|
4112
|
+
"Persistent binary settings",
|
|
4113
|
+
"Preferences that save immediately",
|
|
4114
|
+
"Arabic-friendly forms where switch thumb movement must mirror in RTL"
|
|
4115
|
+
],
|
|
4116
|
+
"avoidWhen": [
|
|
4117
|
+
"Submit actions",
|
|
4118
|
+
"Temporary pressed states that should be Toggle",
|
|
4119
|
+
"Mutually exclusive options that should be Radio Group"
|
|
4120
|
+
],
|
|
4121
|
+
"neverInvent": [
|
|
4122
|
+
"Toggle button behavior",
|
|
4123
|
+
"Left/right-only layout rules",
|
|
4124
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4125
|
+
]
|
|
4126
|
+
},
|
|
4127
|
+
{
|
|
4128
|
+
"name": "Table",
|
|
4129
|
+
"category": "Data Display",
|
|
4130
|
+
"status": "available",
|
|
4131
|
+
"packageImport": "import { Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
4132
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
4133
|
+
"shadcnFoundation": [
|
|
4134
|
+
"table"
|
|
4135
|
+
],
|
|
4136
|
+
"fallbackToShadcn": "table",
|
|
4137
|
+
"requiredTokens": [
|
|
4138
|
+
"--border",
|
|
4139
|
+
"--space-2",
|
|
4140
|
+
"--space-3",
|
|
4141
|
+
"--muted-foreground"
|
|
4142
|
+
],
|
|
4143
|
+
"useWhen": [
|
|
4144
|
+
"Structured rows and columns",
|
|
4145
|
+
"Small semantic tables that do not need sorting/filtering",
|
|
4146
|
+
"AI-generated static table examples with explicit header, body, row, head, and cell parts"
|
|
4147
|
+
],
|
|
4148
|
+
"avoidWhen": [
|
|
4149
|
+
"Simple metadata",
|
|
4150
|
+
"Interactive data grids that should use Data Table",
|
|
4151
|
+
"Div-based tables"
|
|
4152
|
+
],
|
|
4153
|
+
"neverInvent": [
|
|
4154
|
+
"Div-based tables",
|
|
4155
|
+
"Left/right-only layout rules",
|
|
4156
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4157
|
+
]
|
|
4158
|
+
},
|
|
4159
|
+
{
|
|
4160
|
+
"name": "Tabs",
|
|
4161
|
+
"category": "Navigation",
|
|
4162
|
+
"status": "available",
|
|
4163
|
+
"packageImport": "import { Tabs, TabList, Tab, TabPanel } from '@utopia-studio-design/design-system/Navigation';",
|
|
4164
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
4165
|
+
"shadcnFoundation": [
|
|
4166
|
+
"tabs",
|
|
4167
|
+
"Radix Tabs"
|
|
4168
|
+
],
|
|
4169
|
+
"fallbackToShadcn": "tabs",
|
|
4170
|
+
"requiredTokens": [
|
|
4171
|
+
"--border",
|
|
4172
|
+
"--secondary",
|
|
4173
|
+
"--radius-control",
|
|
4174
|
+
"--focus-ring-width",
|
|
4175
|
+
"--motion-duration-page",
|
|
4176
|
+
"--motion-ease-standard"
|
|
4177
|
+
],
|
|
4178
|
+
"useWhen": [
|
|
4179
|
+
"Peer views",
|
|
4180
|
+
"Same-context panels",
|
|
4181
|
+
"Keyboard-switchable content sections"
|
|
4182
|
+
],
|
|
4183
|
+
"avoidWhen": [
|
|
4184
|
+
"Page navigation",
|
|
4185
|
+
"Unrelated destinations"
|
|
4186
|
+
],
|
|
4187
|
+
"neverInvent": [
|
|
4188
|
+
"Tabs as unrelated links",
|
|
4189
|
+
"Left/right-only layout rules",
|
|
4190
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4191
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
4192
|
+
],
|
|
4193
|
+
"ai": {
|
|
4194
|
+
"props": {
|
|
4195
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4198
|
+
},
|
|
4199
|
+
{
|
|
4200
|
+
"name": "Textarea",
|
|
4201
|
+
"category": "Forms",
|
|
4202
|
+
"status": "available",
|
|
4203
|
+
"packageImport": "import { Textarea } from '@utopia-studio-design/design-system/Forms';",
|
|
4204
|
+
"sourcePath": "packages/design-system/src/components/Forms.tsx",
|
|
4205
|
+
"shadcnFoundation": [
|
|
4206
|
+
"textarea",
|
|
4207
|
+
"semantic multiline input"
|
|
4208
|
+
],
|
|
4209
|
+
"fallbackToShadcn": "textarea",
|
|
4210
|
+
"requiredTokens": [
|
|
4211
|
+
"--input",
|
|
4212
|
+
"--radius-control",
|
|
4213
|
+
"--focus-ring-width"
|
|
4214
|
+
],
|
|
4215
|
+
"useWhen": [
|
|
4216
|
+
"Multi-line text entry",
|
|
4217
|
+
"Notes, comments, and longer form content"
|
|
4218
|
+
],
|
|
4219
|
+
"avoidWhen": [
|
|
4220
|
+
"Single-line labels",
|
|
4221
|
+
"Rich text editing"
|
|
4222
|
+
],
|
|
4223
|
+
"neverInvent": [
|
|
4224
|
+
"Fixed tiny text areas",
|
|
4225
|
+
"Left/right-only layout rules",
|
|
4226
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4227
|
+
]
|
|
4228
|
+
},
|
|
4229
|
+
{
|
|
4230
|
+
"name": "Toast",
|
|
4231
|
+
"category": "Data Display",
|
|
4232
|
+
"status": "legacy",
|
|
4233
|
+
"packageImport": "import { Toast, ToastDescription, ToastTitle } from '@utopia-studio-design/design-system/DataDisplay';",
|
|
4234
|
+
"sourcePath": "packages/design-system/src/components/DataDisplay.tsx",
|
|
4235
|
+
"shadcnFoundation": [
|
|
4236
|
+
"sonner",
|
|
4237
|
+
"toast"
|
|
4238
|
+
],
|
|
4239
|
+
"fallbackToShadcn": "sonner",
|
|
4240
|
+
"requiredTokens": [
|
|
4241
|
+
"--surface",
|
|
4242
|
+
"--border",
|
|
4243
|
+
"--radius-surface",
|
|
4244
|
+
"--muted-foreground"
|
|
4245
|
+
],
|
|
4246
|
+
"useWhen": [
|
|
4247
|
+
"Short nonblocking feedback",
|
|
4248
|
+
"Small status messages rendered inline or by a toast system",
|
|
4249
|
+
"AI-generated examples that need title and description structure"
|
|
4250
|
+
],
|
|
4251
|
+
"avoidWhen": [
|
|
4252
|
+
"Critical blocking errors",
|
|
4253
|
+
"Long messages or workflows",
|
|
4254
|
+
"Any new implementation; import Toaster and toast from the Sonner contract instead"
|
|
4255
|
+
],
|
|
4256
|
+
"replacement": "Sonner",
|
|
4257
|
+
"neverInvent": [
|
|
4258
|
+
"Toast-only error handling",
|
|
4259
|
+
"Left/right-only layout rules",
|
|
4260
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4261
|
+
]
|
|
4262
|
+
},
|
|
4263
|
+
{
|
|
4264
|
+
"name": "Toggle Button",
|
|
4265
|
+
"category": "Action",
|
|
4266
|
+
"status": "available",
|
|
4267
|
+
"packageImport": "import { ToggleButton } from '@utopia-studio-design/design-system/ToggleButton';",
|
|
4268
|
+
"sourcePath": "packages/design-system/src/components/ToggleButton.tsx",
|
|
4269
|
+
"shadcnFoundation": [
|
|
4270
|
+
"toggle",
|
|
4271
|
+
"Radix Toggle",
|
|
4272
|
+
"cva"
|
|
4273
|
+
],
|
|
4274
|
+
"fallbackToShadcn": "shadcn/ui toggle",
|
|
4275
|
+
"requiredTokens": [
|
|
4276
|
+
"--secondary",
|
|
4277
|
+
"--secondary-hover",
|
|
4278
|
+
"--secondary-active",
|
|
4279
|
+
"--ghost-hover",
|
|
4280
|
+
"--ghost-active",
|
|
4281
|
+
"--radius-control",
|
|
4282
|
+
"--button-height",
|
|
4283
|
+
"--focus-ring-width"
|
|
4284
|
+
],
|
|
4285
|
+
"useWhen": [
|
|
4286
|
+
"Persistent selected/unselected states",
|
|
4287
|
+
"Formatting controls",
|
|
4288
|
+
"Favorite or mute actions"
|
|
4289
|
+
],
|
|
4290
|
+
"avoidWhen": [
|
|
4291
|
+
"Form submission",
|
|
4292
|
+
"Navigation",
|
|
4293
|
+
"Mutually exclusive sets"
|
|
4294
|
+
],
|
|
4295
|
+
"neverInvent": [
|
|
4296
|
+
"New pressed colors",
|
|
4297
|
+
"Checkbox behavior",
|
|
4298
|
+
"Left/right-only state names",
|
|
4299
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4300
|
+
],
|
|
4301
|
+
"ai": {
|
|
4302
|
+
"props": [
|
|
4303
|
+
"label",
|
|
4304
|
+
"isPressed",
|
|
4305
|
+
"defaultPressed",
|
|
4306
|
+
"onPressedChange",
|
|
4307
|
+
"icon",
|
|
4308
|
+
"pressedIcon",
|
|
4309
|
+
"isIconOnly",
|
|
4310
|
+
"isDisabled",
|
|
4311
|
+
"isLoading",
|
|
4312
|
+
"variant",
|
|
4313
|
+
"size"
|
|
4314
|
+
],
|
|
4315
|
+
"arabicFriendly": [
|
|
4316
|
+
"Use logical start/end language for labels and adjacent content.",
|
|
4317
|
+
"In RTL, keep persistent pressed state behavior identical; only directional layout and directional icons may mirror.",
|
|
4318
|
+
"Do not invent Arabic copy; use provided localized strings or neutral test copy."
|
|
4319
|
+
]
|
|
4320
|
+
}
|
|
4321
|
+
},
|
|
4322
|
+
{
|
|
4323
|
+
"name": "Toggle Button Group",
|
|
4324
|
+
"category": "Action",
|
|
4325
|
+
"status": "available",
|
|
4326
|
+
"packageImport": "import { ToggleButtonGroup, ToggleButtonGroupItem } from '@utopia-studio-design/design-system/ToggleButtonGroup';",
|
|
4327
|
+
"sourcePath": "packages/design-system/src/components/ToggleButtonGroup.tsx",
|
|
4328
|
+
"shadcnFoundation": [
|
|
4329
|
+
"toggle-group",
|
|
4330
|
+
"Radix Toggle Group",
|
|
4331
|
+
"cva"
|
|
4332
|
+
],
|
|
4333
|
+
"fallbackToShadcn": "shadcn/ui toggle-group",
|
|
4334
|
+
"requiredTokens": [
|
|
4335
|
+
"--button-group-gap",
|
|
4336
|
+
"--button-group-gap-compact",
|
|
4337
|
+
"--secondary",
|
|
4338
|
+
"--secondary-hover",
|
|
4339
|
+
"--secondary-active",
|
|
4340
|
+
"--radius-control",
|
|
4341
|
+
"--button-height",
|
|
4342
|
+
"--focus-ring-width"
|
|
4343
|
+
],
|
|
4344
|
+
"useWhen": [
|
|
4345
|
+
"Mutually exclusive toggle sets",
|
|
4346
|
+
"Multi-select formatting controls",
|
|
4347
|
+
"Segmented tool options"
|
|
4348
|
+
],
|
|
4349
|
+
"avoidWhen": [
|
|
4350
|
+
"Unrelated actions",
|
|
4351
|
+
"Navigation tabs",
|
|
4352
|
+
"One-off binary choices"
|
|
4353
|
+
],
|
|
4354
|
+
"neverInvent": [
|
|
4355
|
+
"Serialized React children arrays",
|
|
4356
|
+
"Button group colors",
|
|
4357
|
+
"Left/right-only orientation logic",
|
|
4358
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4359
|
+
],
|
|
4360
|
+
"ai": {
|
|
4361
|
+
"props": [
|
|
4362
|
+
"label",
|
|
4363
|
+
"type",
|
|
4364
|
+
"value",
|
|
4365
|
+
"defaultValue",
|
|
4366
|
+
"onValueChange",
|
|
4367
|
+
"onChange",
|
|
4368
|
+
"orientation",
|
|
4369
|
+
"isDisabled",
|
|
4370
|
+
"density",
|
|
4371
|
+
"ToggleButtonGroupItem.label",
|
|
4372
|
+
"ToggleButtonGroupItem.value",
|
|
4373
|
+
"ToggleButtonGroupItem.icon",
|
|
4374
|
+
"ToggleButtonGroupItem.pressedIcon",
|
|
4375
|
+
"ToggleButtonGroupItem.isIconOnly"
|
|
4376
|
+
],
|
|
4377
|
+
"arabicFriendly": [
|
|
4378
|
+
"Use start/end labels instead of left/right labels for alignment controls.",
|
|
4379
|
+
"Preserve item order according to product meaning; rely on dir='rtl' and logical CSS for inline flow.",
|
|
4380
|
+
"Icon-only items require aria-label in the localized language."
|
|
4381
|
+
]
|
|
4382
|
+
}
|
|
4383
|
+
},
|
|
4384
|
+
{
|
|
4385
|
+
"name": "Tooltip",
|
|
4386
|
+
"category": "Surface",
|
|
4387
|
+
"status": "available",
|
|
4388
|
+
"packageImport": "import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@utopia-studio-design/design-system/Surface';",
|
|
4389
|
+
"sourcePath": "packages/design-system/src/components/Surface.tsx",
|
|
4390
|
+
"shadcnFoundation": [
|
|
4391
|
+
"tooltip",
|
|
4392
|
+
"Radix Tooltip"
|
|
4393
|
+
],
|
|
4394
|
+
"fallbackToShadcn": "tooltip",
|
|
4395
|
+
"requiredTokens": [
|
|
4396
|
+
"--surface",
|
|
4397
|
+
"--border",
|
|
4398
|
+
"--radius-surface",
|
|
4399
|
+
"--popover-surface",
|
|
4400
|
+
"--motion-duration-reveal",
|
|
4401
|
+
"--motion-ease-emphasized"
|
|
4402
|
+
],
|
|
4403
|
+
"useWhen": [
|
|
4404
|
+
"Short helper text",
|
|
4405
|
+
"Icon-only action explanation"
|
|
4406
|
+
],
|
|
4407
|
+
"avoidWhen": [
|
|
4408
|
+
"Required information",
|
|
4409
|
+
"Long content"
|
|
4410
|
+
],
|
|
4411
|
+
"neverInvent": [
|
|
4412
|
+
"Interactive tooltip content",
|
|
4413
|
+
"Untranslated production Arabic copy",
|
|
4414
|
+
"Left/right-only layout rules",
|
|
4415
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4416
|
+
"Motion that bypasses MotionProvider or prefers-reduced-motion"
|
|
4417
|
+
],
|
|
4418
|
+
"ai": {
|
|
4419
|
+
"props": {
|
|
4420
|
+
"motion": "Optional boolean. Defaults to the MotionProvider policy and disables this component pattern when false."
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4423
|
+
},
|
|
4424
|
+
{
|
|
4425
|
+
"category": "Navigation",
|
|
4426
|
+
"status": "available",
|
|
4427
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
4428
|
+
"neverInvent": [
|
|
4429
|
+
"Raw shadcn theme colors",
|
|
4430
|
+
"Left/right-only layout rules",
|
|
4431
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4432
|
+
"Invented Arabic production copy"
|
|
4433
|
+
],
|
|
4434
|
+
"name": "Top Nav",
|
|
4435
|
+
"packageImport": "import { TopNav, TopNavHeading, TopNavItem, TopNavMenu, TopNavMegaMenu, NavIcon } from '@utopia-studio-design/design-system/Navigation';",
|
|
4436
|
+
"shadcnFoundation": [
|
|
4437
|
+
"navigation-menu",
|
|
4438
|
+
"Radix NavigationMenu",
|
|
4439
|
+
"shadcn/ui navigation-menu composition",
|
|
4440
|
+
"semantic Utopia wrapper"
|
|
4441
|
+
],
|
|
4442
|
+
"fallbackToShadcn": "navigation-menu",
|
|
4443
|
+
"requiredTokens": [
|
|
4444
|
+
"--foreground",
|
|
4445
|
+
"--muted-foreground",
|
|
4446
|
+
"--secondary",
|
|
4447
|
+
"--secondary-foreground",
|
|
4448
|
+
"--border",
|
|
4449
|
+
"--radius-control",
|
|
4450
|
+
"--radius-surface",
|
|
4451
|
+
"--popover-surface",
|
|
4452
|
+
"--focus-ring-width"
|
|
4453
|
+
],
|
|
4454
|
+
"useWhen": [
|
|
4455
|
+
"Desktop horizontal app or docs navigation",
|
|
4456
|
+
"Navigation needs brand heading, current item state, menu triggers, mega menu content, and end icon actions",
|
|
4457
|
+
"AI-generated app shells need explicit top navigation parts instead of ad hoc flex rows"
|
|
4458
|
+
],
|
|
4459
|
+
"avoidWhen": [
|
|
4460
|
+
"Mobile-only navigation; use Mobile Nav",
|
|
4461
|
+
"Persistent vertical navigation; use Side Nav",
|
|
4462
|
+
"Submitting actions that should use Button"
|
|
4463
|
+
],
|
|
4464
|
+
"ai": {
|
|
4465
|
+
"props": {
|
|
4466
|
+
"children": "Use TopNavItem, TopNavMenu, or TopNavMegaMenu children. Pair with TopNavHeading and NavIcon outside or near the root as needed."
|
|
4467
|
+
},
|
|
4468
|
+
"arabicFriendly": "Use document direction for order. Keep item labels as localized product content and use logical alignment for menu content."
|
|
4469
|
+
}
|
|
4470
|
+
},
|
|
4471
|
+
{
|
|
4472
|
+
"category": "Navigation",
|
|
4473
|
+
"status": "available",
|
|
4474
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
4475
|
+
"neverInvent": [
|
|
4476
|
+
"Raw shadcn theme colors",
|
|
4477
|
+
"Left/right-only layout rules",
|
|
4478
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4479
|
+
"Invented Arabic production copy"
|
|
4480
|
+
],
|
|
4481
|
+
"name": "Top Nav Heading",
|
|
4482
|
+
"packageImport": "import { TopNavHeading } from '@utopia-studio-design/design-system/Navigation';",
|
|
4483
|
+
"shadcnFoundation": [
|
|
4484
|
+
"navigation brand slot",
|
|
4485
|
+
"semantic Utopia wrapper"
|
|
4486
|
+
],
|
|
4487
|
+
"fallbackToShadcn": "navigation-menu composition",
|
|
4488
|
+
"requiredTokens": [
|
|
4489
|
+
"--foreground",
|
|
4490
|
+
"--muted-foreground",
|
|
4491
|
+
"--secondary",
|
|
4492
|
+
"--secondary-foreground",
|
|
4493
|
+
"--border",
|
|
4494
|
+
"--radius-control",
|
|
4495
|
+
"--radius-surface",
|
|
4496
|
+
"--popover-surface",
|
|
4497
|
+
"--focus-ring-width"
|
|
4498
|
+
],
|
|
4499
|
+
"useWhen": [
|
|
4500
|
+
"Top navigation needs product, workspace, or app identity",
|
|
4501
|
+
"A brand mark and label should stay aligned in a horizontal navigation bar"
|
|
4502
|
+
],
|
|
4503
|
+
"avoidWhen": [
|
|
4504
|
+
"Side navigation headers; use SideNavHeading",
|
|
4505
|
+
"Decorative logos without accessible text"
|
|
4506
|
+
],
|
|
4507
|
+
"ai": {
|
|
4508
|
+
"props": {
|
|
4509
|
+
"label": "Primary app/product name.",
|
|
4510
|
+
"icon": "Optional leading mark slot owned by app/theme.",
|
|
4511
|
+
"meta": "Optional line above label.",
|
|
4512
|
+
"subtitle": "Optional line below label."
|
|
4513
|
+
},
|
|
4514
|
+
"arabicFriendly": "Do not assume English label order. Slot order follows inline start/end."
|
|
4515
|
+
}
|
|
4516
|
+
},
|
|
4517
|
+
{
|
|
4518
|
+
"category": "Navigation",
|
|
4519
|
+
"status": "available",
|
|
4520
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
4521
|
+
"neverInvent": [
|
|
4522
|
+
"Raw shadcn theme colors",
|
|
4523
|
+
"Left/right-only layout rules",
|
|
4524
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4525
|
+
"Invented Arabic production copy"
|
|
4526
|
+
],
|
|
4527
|
+
"name": "Top Nav Item",
|
|
4528
|
+
"packageImport": "import { TopNavItem } from '@utopia-studio-design/design-system/Navigation';",
|
|
4529
|
+
"shadcnFoundation": [
|
|
4530
|
+
"navigation-menu link",
|
|
4531
|
+
"Radix NavigationMenu.Link"
|
|
4532
|
+
],
|
|
4533
|
+
"fallbackToShadcn": "navigation-menu link",
|
|
4534
|
+
"requiredTokens": [
|
|
4535
|
+
"--foreground",
|
|
4536
|
+
"--muted-foreground",
|
|
4537
|
+
"--secondary",
|
|
4538
|
+
"--secondary-foreground",
|
|
4539
|
+
"--border",
|
|
4540
|
+
"--radius-control",
|
|
4541
|
+
"--radius-surface",
|
|
4542
|
+
"--popover-surface",
|
|
4543
|
+
"--focus-ring-width"
|
|
4544
|
+
],
|
|
4545
|
+
"useWhen": [
|
|
4546
|
+
"A top navigation row links to a route or section",
|
|
4547
|
+
"The current route needs isCurrent or aria-current"
|
|
4548
|
+
],
|
|
4549
|
+
"avoidWhen": [
|
|
4550
|
+
"Opening nested content; use TopNavMenu or TopNavMegaMenu",
|
|
4551
|
+
"Actions that should use Button"
|
|
4552
|
+
],
|
|
4553
|
+
"ai": {
|
|
4554
|
+
"props": {
|
|
4555
|
+
"href": "Navigation target.",
|
|
4556
|
+
"isCurrent": "Sets aria-current page and selected visual state.",
|
|
4557
|
+
"children": "Visible label."
|
|
4558
|
+
},
|
|
4559
|
+
"arabicFriendly": "Mixed Arabic/English labels must not affect hit target or alignment."
|
|
4560
|
+
}
|
|
4561
|
+
},
|
|
4562
|
+
{
|
|
4563
|
+
"category": "Navigation",
|
|
4564
|
+
"status": "available",
|
|
4565
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
4566
|
+
"neverInvent": [
|
|
4567
|
+
"Raw shadcn theme colors",
|
|
4568
|
+
"Left/right-only layout rules",
|
|
4569
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4570
|
+
"Invented Arabic production copy"
|
|
4571
|
+
],
|
|
4572
|
+
"name": "Top Nav Mega Menu",
|
|
4573
|
+
"packageImport": "import { TopNavMegaMenu, TopNavMegaMenuFeaturedCard, TopNavMegaMenuItem } from '@utopia-studio-design/design-system/Navigation';",
|
|
4574
|
+
"shadcnFoundation": [
|
|
4575
|
+
"navigation-menu mega menu pattern",
|
|
4576
|
+
"Radix NavigationMenu.Content"
|
|
4577
|
+
],
|
|
4578
|
+
"fallbackToShadcn": "navigation-menu",
|
|
4579
|
+
"requiredTokens": [
|
|
4580
|
+
"--foreground",
|
|
4581
|
+
"--muted-foreground",
|
|
4582
|
+
"--secondary",
|
|
4583
|
+
"--secondary-foreground",
|
|
4584
|
+
"--border",
|
|
4585
|
+
"--radius-control",
|
|
4586
|
+
"--radius-surface",
|
|
4587
|
+
"--popover-surface",
|
|
4588
|
+
"--focus-ring-width",
|
|
4589
|
+
"--surface-hover"
|
|
4590
|
+
],
|
|
4591
|
+
"useWhen": [
|
|
4592
|
+
"A top navigation trigger opens grouped destinations, a featured card, or multi-column navigation content",
|
|
4593
|
+
"Desktop IA needs richer scanable navigation without leaving the page"
|
|
4594
|
+
],
|
|
4595
|
+
"avoidWhen": [
|
|
4596
|
+
"Small lists that should use TopNavMenu",
|
|
4597
|
+
"Mobile panels that should use Mobile Nav"
|
|
4598
|
+
],
|
|
4599
|
+
"ai": {
|
|
4600
|
+
"props": {
|
|
4601
|
+
"label": "Visible trigger label.",
|
|
4602
|
+
"align": "Logical start/end alignment for the menu surface.",
|
|
4603
|
+
"children": "Featured card and item children."
|
|
4604
|
+
},
|
|
4605
|
+
"arabicFriendly": "Use logical alignment and mirror only directional icons supplied by product code."
|
|
4606
|
+
}
|
|
4607
|
+
},
|
|
4608
|
+
{
|
|
4609
|
+
"category": "Navigation",
|
|
4610
|
+
"status": "available",
|
|
4611
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
4612
|
+
"neverInvent": [
|
|
4613
|
+
"Raw shadcn theme colors",
|
|
4614
|
+
"Left/right-only layout rules",
|
|
4615
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4616
|
+
"Invented Arabic production copy"
|
|
4617
|
+
],
|
|
4618
|
+
"name": "Top Nav Mega Menu Featured Card",
|
|
4619
|
+
"packageImport": "import { TopNavMegaMenuFeaturedCard } from '@utopia-studio-design/design-system/Navigation';",
|
|
4620
|
+
"shadcnFoundation": [
|
|
4621
|
+
"navigation-menu link",
|
|
4622
|
+
"featured destination card"
|
|
4623
|
+
],
|
|
4624
|
+
"fallbackToShadcn": "navigation-menu link",
|
|
4625
|
+
"requiredTokens": [
|
|
4626
|
+
"--foreground",
|
|
4627
|
+
"--muted-foreground",
|
|
4628
|
+
"--secondary",
|
|
4629
|
+
"--secondary-foreground",
|
|
4630
|
+
"--border",
|
|
4631
|
+
"--radius-control",
|
|
4632
|
+
"--radius-surface",
|
|
4633
|
+
"--popover-surface",
|
|
4634
|
+
"--focus-ring-width"
|
|
4635
|
+
],
|
|
4636
|
+
"useWhen": [
|
|
4637
|
+
"Mega menu needs one prominent destination or product area"
|
|
4638
|
+
],
|
|
4639
|
+
"avoidWhen": [
|
|
4640
|
+
"Repeated simple rows; use TopNavMegaMenuItem"
|
|
4641
|
+
],
|
|
4642
|
+
"ai": {
|
|
4643
|
+
"props": {
|
|
4644
|
+
"href": "Navigation target.",
|
|
4645
|
+
"title": "Primary destination title.",
|
|
4646
|
+
"description": "Supporting destination copy.",
|
|
4647
|
+
"icon": "Optional start icon slot."
|
|
4648
|
+
},
|
|
4649
|
+
"arabicFriendly": "Keep title/description localized; do not invent Arabic copy."
|
|
4650
|
+
}
|
|
4651
|
+
},
|
|
4652
|
+
{
|
|
4653
|
+
"category": "Navigation",
|
|
4654
|
+
"status": "available",
|
|
4655
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
4656
|
+
"neverInvent": [
|
|
4657
|
+
"Raw shadcn theme colors",
|
|
4658
|
+
"Left/right-only layout rules",
|
|
4659
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4660
|
+
"Invented Arabic production copy"
|
|
4661
|
+
],
|
|
4662
|
+
"name": "Top Nav Mega Menu Item",
|
|
4663
|
+
"packageImport": "import { TopNavMegaMenuItem } from '@utopia-studio-design/design-system/Navigation';",
|
|
4664
|
+
"shadcnFoundation": [
|
|
4665
|
+
"navigation-menu link",
|
|
4666
|
+
"mega menu list item"
|
|
4667
|
+
],
|
|
4668
|
+
"fallbackToShadcn": "navigation-menu link",
|
|
4669
|
+
"requiredTokens": [
|
|
4670
|
+
"--foreground",
|
|
4671
|
+
"--muted-foreground",
|
|
4672
|
+
"--secondary",
|
|
4673
|
+
"--secondary-foreground",
|
|
4674
|
+
"--border",
|
|
4675
|
+
"--radius-control",
|
|
4676
|
+
"--radius-surface",
|
|
4677
|
+
"--popover-surface",
|
|
4678
|
+
"--focus-ring-width"
|
|
4679
|
+
],
|
|
4680
|
+
"useWhen": [
|
|
4681
|
+
"Mega menu needs repeated destination rows with title and description"
|
|
4682
|
+
],
|
|
4683
|
+
"avoidWhen": [
|
|
4684
|
+
"The destination should be visually featured; use TopNavMegaMenuFeaturedCard"
|
|
4685
|
+
],
|
|
4686
|
+
"ai": {
|
|
4687
|
+
"props": {
|
|
4688
|
+
"href": "Navigation target.",
|
|
4689
|
+
"title": "Primary destination title.",
|
|
4690
|
+
"description": "Supporting destination copy.",
|
|
4691
|
+
"icon": "Optional start icon slot."
|
|
4692
|
+
},
|
|
4693
|
+
"arabicFriendly": "Logical grid columns must keep icon/title/description readable in RTL."
|
|
4694
|
+
}
|
|
4695
|
+
},
|
|
4696
|
+
{
|
|
4697
|
+
"category": "Navigation",
|
|
4698
|
+
"status": "available",
|
|
4699
|
+
"sourcePath": "packages/design-system/src/components/Navigation.tsx",
|
|
4700
|
+
"neverInvent": [
|
|
4701
|
+
"Raw shadcn theme colors",
|
|
4702
|
+
"Left/right-only layout rules",
|
|
4703
|
+
"Utopia brand primitives inside reusable component logic",
|
|
4704
|
+
"Invented Arabic production copy"
|
|
4705
|
+
],
|
|
4706
|
+
"name": "Top Nav Menu",
|
|
4707
|
+
"packageImport": "import { TopNavMenu, TopNavMenuItem } from '@utopia-studio-design/design-system/Navigation';",
|
|
4708
|
+
"shadcnFoundation": [
|
|
4709
|
+
"navigation-menu trigger/content",
|
|
4710
|
+
"Radix NavigationMenu.Item",
|
|
4711
|
+
"Radix NavigationMenu.Content"
|
|
4712
|
+
],
|
|
4713
|
+
"fallbackToShadcn": "navigation-menu",
|
|
4714
|
+
"requiredTokens": [
|
|
4715
|
+
"--foreground",
|
|
4716
|
+
"--muted-foreground",
|
|
4717
|
+
"--secondary",
|
|
4718
|
+
"--secondary-foreground",
|
|
4719
|
+
"--border",
|
|
4720
|
+
"--radius-control",
|
|
4721
|
+
"--radius-surface",
|
|
4722
|
+
"--popover-surface",
|
|
4723
|
+
"--focus-ring-width"
|
|
4724
|
+
],
|
|
4725
|
+
"useWhen": [
|
|
4726
|
+
"A top navigation trigger opens a compact list of links",
|
|
4727
|
+
"Navigation content is too small for a mega menu"
|
|
4728
|
+
],
|
|
4729
|
+
"avoidWhen": [
|
|
4730
|
+
"Large grouped destination panels; use TopNavMegaMenu"
|
|
4731
|
+
],
|
|
4732
|
+
"ai": {
|
|
4733
|
+
"props": {
|
|
4734
|
+
"label": "Visible trigger label.",
|
|
4735
|
+
"children": "TopNavMenuItem children."
|
|
4736
|
+
},
|
|
4737
|
+
"arabicFriendly": "Trigger and content align with logical inline start/end."
|
|
4738
|
+
}
|
|
4739
|
+
},
|
|
4740
|
+
{
|
|
4741
|
+
"name": "Typography",
|
|
4742
|
+
"category": "Data Display",
|
|
4743
|
+
"status": "available",
|
|
4744
|
+
"packageImport": "import { ArabicText, Heading, Prose, Text, Typography } from '@utopia-studio-design/design-system/Typography';",
|
|
4745
|
+
"sourcePath": "packages/design-system/src/components/Typography.tsx",
|
|
4746
|
+
"shadcnFoundation": [
|
|
4747
|
+
"typography",
|
|
4748
|
+
"semantic text primitives",
|
|
4749
|
+
"Arabic-friendly type contract"
|
|
4750
|
+
],
|
|
4751
|
+
"fallbackToShadcn": "typography",
|
|
4752
|
+
"requiredTokens": [
|
|
4753
|
+
"--font-sans",
|
|
4754
|
+
"--font-arabic",
|
|
4755
|
+
"--foreground",
|
|
4756
|
+
"--foreground-muted",
|
|
4757
|
+
"--foreground-subtle",
|
|
4758
|
+
"--line-height-body",
|
|
4759
|
+
"--line-height-arabic",
|
|
4760
|
+
"--tracking-heading"
|
|
4761
|
+
],
|
|
4762
|
+
"useWhen": [
|
|
4763
|
+
"Headings and body copy need semantic hierarchy",
|
|
4764
|
+
"Mixed English and Arabic text must render cleanly",
|
|
4765
|
+
"AI needs copy-safe text primitives instead of ad hoc CSS"
|
|
4766
|
+
],
|
|
4767
|
+
"avoidWhen": [
|
|
4768
|
+
"The text is only a status marker; use Badge instead",
|
|
4769
|
+
"A layout primitive should own spacing instead"
|
|
4770
|
+
],
|
|
4771
|
+
"neverInvent": [
|
|
4772
|
+
"Viewport-scaled body text",
|
|
4773
|
+
"Negative letter spacing",
|
|
4774
|
+
"Arabic copy not supplied by the product team",
|
|
4775
|
+
"Left/right-only layout rules",
|
|
4776
|
+
"Utopia brand primitives inside reusable component logic"
|
|
4777
|
+
]
|
|
4778
|
+
}
|
|
4779
|
+
]
|
|
4780
|
+
}
|