@behavioral-agentic-design-system/core 0.19.0 → 0.22.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/package.json +1 -1
- package/src/app/preview/components/page.tsx +178 -146
- package/src/app/shell.tsx +57 -4
- package/src/components/onboarding-wizard.tsx +1 -1
- package/src/components/ui/color-picker.tsx +171 -100
- package/src/components/ui/editable.tsx +294 -0
- package/src/components/ui/index.ts +1 -0
- package/src/stories/Accordion.stories.tsx +12 -9
- package/src/stories/ButtonGroup.stories.tsx +16 -16
- package/src/stories/ColorPicker.stories.tsx +36 -15
- package/src/stories/DatePicker.stories.tsx +2 -2
- package/src/stories/Editable.stories.tsx +143 -0
- package/src/stories/EmptyState.stories.tsx +21 -21
- package/src/stories/List.stories.tsx +28 -28
- package/src/stories/RatingGroup.stories.tsx +2 -2
- package/src/stories/SegmentedControl.stories.tsx +3 -3
- package/src/stories/TagsInput.stories.tsx +21 -21
- package/src/stories/Timeline.stories.tsx +50 -50
|
@@ -264,6 +264,13 @@ import {
|
|
|
264
264
|
} from "@behavioral-agentic-design-system/core/components/ui/tree-view";
|
|
265
265
|
import { ColorPicker } from "@behavioral-agentic-design-system/core/components/ui/color-picker";
|
|
266
266
|
import { NativeSelect } from "@behavioral-agentic-design-system/core/components/ui/native-select";
|
|
267
|
+
import {
|
|
268
|
+
Editable,
|
|
269
|
+
EditableCancel,
|
|
270
|
+
EditableControl,
|
|
271
|
+
EditablePreview,
|
|
272
|
+
EditableSubmit,
|
|
273
|
+
} from "@behavioral-agentic-design-system/core/components/ui/editable";
|
|
267
274
|
|
|
268
275
|
// Stable, deterministic data for ScrollArea — never use Math.random in
|
|
269
276
|
// SSR-rendered output, it causes hydration mismatches.
|
|
@@ -519,10 +526,10 @@ export default function ComponentsPreview() {
|
|
|
519
526
|
<div className="flex flex-wrap gap-6 items-start">
|
|
520
527
|
<div className="space-y-1.5">
|
|
521
528
|
<p className="text-xs font-medium text-muted-foreground">Horizontal (default)</p>
|
|
522
|
-
<ButtonGroup aria-label="
|
|
523
|
-
<Button variant="outline">All
|
|
524
|
-
<Button variant="outline">
|
|
525
|
-
<Button variant="outline">
|
|
529
|
+
<ButtonGroup aria-label="View controls">
|
|
530
|
+
<Button variant="outline">All</Button>
|
|
531
|
+
<Button variant="outline">Mine</Button>
|
|
532
|
+
<Button variant="outline">Recent</Button>
|
|
526
533
|
</ButtonGroup>
|
|
527
534
|
</div>
|
|
528
535
|
<div className="space-y-1.5">
|
|
@@ -541,10 +548,10 @@ export default function ComponentsPreview() {
|
|
|
541
548
|
</div>
|
|
542
549
|
<div className="space-y-1.5">
|
|
543
550
|
<p className="text-xs font-medium text-muted-foreground">Vertical</p>
|
|
544
|
-
<ButtonGroup orientation="vertical" aria-label="
|
|
545
|
-
<Button variant="outline">
|
|
546
|
-
<Button variant="outline">
|
|
547
|
-
<Button variant="outline">
|
|
551
|
+
<ButtonGroup orientation="vertical" aria-label="Density options">
|
|
552
|
+
<Button variant="outline">Comfortable</Button>
|
|
553
|
+
<Button variant="outline">Cozy</Button>
|
|
554
|
+
<Button variant="outline">Compact</Button>
|
|
548
555
|
</ButtonGroup>
|
|
549
556
|
</div>
|
|
550
557
|
<div className="space-y-1.5">
|
|
@@ -2174,7 +2181,7 @@ export default function ComponentsPreview() {
|
|
|
2174
2181
|
<RatingGroup value={2} disabled label="Rating" />
|
|
2175
2182
|
</div>
|
|
2176
2183
|
<div className="space-y-3">
|
|
2177
|
-
<p className="text-sm font-medium text-muted-foreground">Realistic use —
|
|
2184
|
+
<p className="text-sm font-medium text-muted-foreground">Realistic use — component feedback</p>
|
|
2178
2185
|
<RatingGroupFeedbackDemo />
|
|
2179
2186
|
</div>
|
|
2180
2187
|
</div>
|
|
@@ -2189,32 +2196,32 @@ export default function ComponentsPreview() {
|
|
|
2189
2196
|
<div className="space-y-3">
|
|
2190
2197
|
<p className="text-sm font-medium text-muted-foreground">With initial tags</p>
|
|
2191
2198
|
<TagsInputShowcase
|
|
2192
|
-
initialTags={["
|
|
2193
|
-
placeholder="Add
|
|
2199
|
+
initialTags={["button", "input", "select"]}
|
|
2200
|
+
placeholder="Add component…"
|
|
2194
2201
|
/>
|
|
2195
2202
|
</div>
|
|
2196
2203
|
<div className="space-y-3">
|
|
2197
|
-
<p className="text-sm font-medium text-muted-foreground">With suggestions (autocomplete) — type "
|
|
2204
|
+
<p className="text-sm font-medium text-muted-foreground">With suggestions (autocomplete) — type "but" or "car"</p>
|
|
2198
2205
|
<TagsInputShowcase
|
|
2199
|
-
placeholder="Add a
|
|
2206
|
+
placeholder="Add a component or token…"
|
|
2200
2207
|
suggestions={[
|
|
2201
|
-
"
|
|
2202
|
-
"
|
|
2203
|
-
"
|
|
2204
|
-
"
|
|
2205
|
-
"
|
|
2206
|
-
"
|
|
2207
|
-
"
|
|
2208
|
-
"
|
|
2209
|
-
"
|
|
2210
|
-
"
|
|
2208
|
+
"Button",
|
|
2209
|
+
"Badge",
|
|
2210
|
+
"Breadcrumb",
|
|
2211
|
+
"Card",
|
|
2212
|
+
"Carousel",
|
|
2213
|
+
"Checkbox",
|
|
2214
|
+
"Combobox",
|
|
2215
|
+
"Dialog",
|
|
2216
|
+
"Dropdown Menu",
|
|
2217
|
+
"Tooltip",
|
|
2211
2218
|
]}
|
|
2212
2219
|
/>
|
|
2213
2220
|
</div>
|
|
2214
2221
|
<div className="space-y-3">
|
|
2215
2222
|
<p className="text-sm font-medium text-muted-foreground">Max tags (4)</p>
|
|
2216
2223
|
<TagsInputShowcase
|
|
2217
|
-
initialTags={["
|
|
2224
|
+
initialTags={["design", "build"]}
|
|
2218
2225
|
maxTags={4}
|
|
2219
2226
|
placeholder="Add phase (max 4)…"
|
|
2220
2227
|
/>
|
|
@@ -2222,13 +2229,13 @@ export default function ComponentsPreview() {
|
|
|
2222
2229
|
<div className="space-y-3">
|
|
2223
2230
|
<p className="text-sm font-medium text-muted-foreground">Disabled</p>
|
|
2224
2231
|
<TagsInputShowcase
|
|
2225
|
-
initialTags={["
|
|
2232
|
+
initialTags={["button", "input"]}
|
|
2226
2233
|
disabled
|
|
2227
2234
|
placeholder="Disabled"
|
|
2228
2235
|
/>
|
|
2229
2236
|
</div>
|
|
2230
2237
|
<div className="space-y-3">
|
|
2231
|
-
<p className="text-sm font-medium text-muted-foreground">Realistic use —
|
|
2238
|
+
<p className="text-sm font-medium text-muted-foreground">Realistic use — component library filters</p>
|
|
2232
2239
|
<TagsInputFilterDemo />
|
|
2233
2240
|
</div>
|
|
2234
2241
|
</div>
|
|
@@ -2251,31 +2258,31 @@ export default function ComponentsPreview() {
|
|
|
2251
2258
|
<TimelineItem
|
|
2252
2259
|
status="complete"
|
|
2253
2260
|
icon={<CheckIcon className="size-3" strokeWidth={1.5} aria-hidden />}
|
|
2254
|
-
title="
|
|
2261
|
+
title="Design approved"
|
|
2255
2262
|
time="Jun 20"
|
|
2256
2263
|
/>
|
|
2257
2264
|
<TimelineItem
|
|
2258
2265
|
status="complete"
|
|
2259
2266
|
icon={<CreditCardIcon className="size-3" strokeWidth={1.5} aria-hidden />}
|
|
2260
|
-
title="
|
|
2267
|
+
title="Budget approved"
|
|
2261
2268
|
time="Jun 21"
|
|
2262
2269
|
/>
|
|
2263
2270
|
<TimelineItem
|
|
2264
2271
|
status="active"
|
|
2265
|
-
title="
|
|
2266
|
-
description="
|
|
2272
|
+
title="Component build"
|
|
2273
|
+
description="In review with Maya Chen"
|
|
2267
2274
|
time="Jun 25 (today)"
|
|
2268
2275
|
/>
|
|
2269
2276
|
<TimelineItem
|
|
2270
2277
|
status="pending"
|
|
2271
|
-
title="
|
|
2272
|
-
description="
|
|
2278
|
+
title="Release day"
|
|
2279
|
+
description="v2.4.0 to production"
|
|
2273
2280
|
time="Jun 28"
|
|
2274
2281
|
/>
|
|
2275
2282
|
</Timeline>
|
|
2276
2283
|
</div>
|
|
2277
2284
|
<div className="space-y-3">
|
|
2278
|
-
<p className="text-sm font-medium text-muted-foreground">Realistic use —
|
|
2285
|
+
<p className="text-sm font-medium text-muted-foreground">Realistic use — component adoption journey</p>
|
|
2279
2286
|
<TimelineRealisticDemo />
|
|
2280
2287
|
</div>
|
|
2281
2288
|
</div>
|
|
@@ -2363,21 +2370,21 @@ export default function ComponentsPreview() {
|
|
|
2363
2370
|
|
|
2364
2371
|
<Section title="Table">
|
|
2365
2372
|
<Table>
|
|
2366
|
-
<TableCaption>
|
|
2373
|
+
<TableCaption>Design System Team — Q2 contributions</TableCaption>
|
|
2367
2374
|
<TableHeader>
|
|
2368
2375
|
<TableRow>
|
|
2369
2376
|
<TableHead className="w-12">Place</TableHead>
|
|
2370
|
-
<TableHead>
|
|
2371
|
-
<TableHead>
|
|
2372
|
-
<TableHead className="text-right">
|
|
2377
|
+
<TableHead>Contributor</TableHead>
|
|
2378
|
+
<TableHead>Team</TableHead>
|
|
2379
|
+
<TableHead className="text-right">PRs</TableHead>
|
|
2373
2380
|
</TableRow>
|
|
2374
2381
|
</TableHeader>
|
|
2375
2382
|
<TableBody>
|
|
2376
2383
|
{[
|
|
2377
|
-
{ place: 1, name: "Avery Castillo", squad: "
|
|
2378
|
-
{ place: 2, name: "Noah Kim", squad: "
|
|
2379
|
-
{ place: 3, name: "Priya Raman", squad: "
|
|
2380
|
-
{ place: 4, name: "Liam O'Connor", squad: "
|
|
2384
|
+
{ place: 1, name: "Avery Castillo", squad: "Core", time: "48" },
|
|
2385
|
+
{ place: 2, name: "Noah Kim", squad: "Core", time: "41" },
|
|
2386
|
+
{ place: 3, name: "Priya Raman", squad: "Web", time: "37" },
|
|
2387
|
+
{ place: 4, name: "Liam O'Connor", squad: "Web", time: "29" },
|
|
2381
2388
|
].map((r) => (
|
|
2382
2389
|
<TableRow key={r.place}>
|
|
2383
2390
|
<TableCell className="font-medium tabular-nums">{r.place}</TableCell>
|
|
@@ -2389,8 +2396,8 @@ export default function ComponentsPreview() {
|
|
|
2389
2396
|
</TableBody>
|
|
2390
2397
|
<TableFooter>
|
|
2391
2398
|
<TableRow>
|
|
2392
|
-
<TableCell colSpan={3}>
|
|
2393
|
-
<TableCell className="text-right font-mono tabular-nums">
|
|
2399
|
+
<TableCell colSpan={3}>Team total</TableCell>
|
|
2400
|
+
<TableCell className="text-right font-mono tabular-nums">155</TableCell>
|
|
2394
2401
|
</TableRow>
|
|
2395
2402
|
</TableFooter>
|
|
2396
2403
|
</Table>
|
|
@@ -2405,34 +2412,34 @@ export default function ComponentsPreview() {
|
|
|
2405
2412
|
<Section title="Select">
|
|
2406
2413
|
<div className="grid gap-6 sm:grid-cols-2">
|
|
2407
2414
|
<div className="space-y-2">
|
|
2408
|
-
<Label htmlFor="select-squad">
|
|
2415
|
+
<Label htmlFor="select-squad">Team</Label>
|
|
2409
2416
|
<Select defaultValue="senior-a">
|
|
2410
2417
|
<SelectTrigger id="select-squad" className="w-full">
|
|
2411
|
-
<SelectValue placeholder="Choose a
|
|
2418
|
+
<SelectValue placeholder="Choose a team" />
|
|
2412
2419
|
</SelectTrigger>
|
|
2413
2420
|
<SelectContent>
|
|
2414
2421
|
<SelectGroup>
|
|
2415
|
-
<SelectLabel>
|
|
2416
|
-
<SelectItem value="senior-a">
|
|
2417
|
-
<SelectItem value="senior-b">
|
|
2422
|
+
<SelectLabel>Product</SelectLabel>
|
|
2423
|
+
<SelectItem value="senior-a">Core</SelectItem>
|
|
2424
|
+
<SelectItem value="senior-b">Web</SelectItem>
|
|
2418
2425
|
</SelectGroup>
|
|
2419
2426
|
<SelectGroup>
|
|
2420
|
-
<SelectLabel>
|
|
2421
|
-
<SelectItem value="junior-a">
|
|
2422
|
-
<SelectItem value="junior-b">
|
|
2423
|
-
<SelectItem value="dev" disabled>
|
|
2427
|
+
<SelectLabel>Platform</SelectLabel>
|
|
2428
|
+
<SelectItem value="junior-a">Mobile</SelectItem>
|
|
2429
|
+
<SelectItem value="junior-b">Docs</SelectItem>
|
|
2430
|
+
<SelectItem value="dev" disabled>Tokens (full)</SelectItem>
|
|
2424
2431
|
</SelectGroup>
|
|
2425
2432
|
</SelectContent>
|
|
2426
2433
|
</Select>
|
|
2427
2434
|
</div>
|
|
2428
2435
|
<div className="space-y-2">
|
|
2429
|
-
<Label htmlFor="select-stroke">
|
|
2436
|
+
<Label htmlFor="select-stroke">Framework (disabled)</Label>
|
|
2430
2437
|
<Select disabled>
|
|
2431
2438
|
<SelectTrigger id="select-stroke" className="w-full">
|
|
2432
|
-
<SelectValue placeholder="Locked for this
|
|
2439
|
+
<SelectValue placeholder="Locked for this project" />
|
|
2433
2440
|
</SelectTrigger>
|
|
2434
2441
|
<SelectContent>
|
|
2435
|
-
<SelectItem value="free">
|
|
2442
|
+
<SelectItem value="free">React</SelectItem>
|
|
2436
2443
|
</SelectContent>
|
|
2437
2444
|
</Select>
|
|
2438
2445
|
</div>
|
|
@@ -2442,19 +2449,19 @@ export default function ComponentsPreview() {
|
|
|
2442
2449
|
<Section title="Textarea">
|
|
2443
2450
|
<div className="grid gap-6 sm:grid-cols-2">
|
|
2444
2451
|
<div className="space-y-2">
|
|
2445
|
-
<Label htmlFor="ta-notes">
|
|
2446
|
-
<Textarea id="ta-notes" placeholder="Add notes for this
|
|
2452
|
+
<Label htmlFor="ta-notes">Review notes</Label>
|
|
2453
|
+
<Textarea id="ta-notes" placeholder="Add notes for this review…" />
|
|
2447
2454
|
</div>
|
|
2448
2455
|
<div className="space-y-2">
|
|
2449
2456
|
<Label htmlFor="ta-filled">With value</Label>
|
|
2450
2457
|
<Textarea
|
|
2451
2458
|
id="ta-filled"
|
|
2452
|
-
defaultValue={"
|
|
2459
|
+
defaultValue={"Solid API surface. Tighten the focus ring token and add a loading state before merge."}
|
|
2453
2460
|
/>
|
|
2454
2461
|
</div>
|
|
2455
2462
|
<div className="space-y-2">
|
|
2456
2463
|
<Label htmlFor="ta-disabled">Disabled</Label>
|
|
2457
|
-
<Textarea id="ta-disabled" disabled placeholder="Locked during the
|
|
2464
|
+
<Textarea id="ta-disabled" disabled placeholder="Locked during the release" />
|
|
2458
2465
|
</div>
|
|
2459
2466
|
<div className="space-y-2">
|
|
2460
2467
|
<Label htmlFor="ta-invalid">Invalid</Label>
|
|
@@ -2497,20 +2504,20 @@ export default function ComponentsPreview() {
|
|
|
2497
2504
|
<div className="flex flex-wrap gap-3">
|
|
2498
2505
|
<Popover>
|
|
2499
2506
|
<PopoverTrigger asChild>
|
|
2500
|
-
<Button variant="outline">
|
|
2507
|
+
<Button variant="outline">Grid settings</Button>
|
|
2501
2508
|
</PopoverTrigger>
|
|
2502
2509
|
<PopoverContent className="w-72">
|
|
2503
2510
|
<div className="space-y-3">
|
|
2504
2511
|
<div className="space-y-1">
|
|
2505
|
-
<p className="text-sm font-semibold">
|
|
2506
|
-
<p className="text-xs text-muted-foreground">Applies to this
|
|
2512
|
+
<p className="text-sm font-semibold">Grid settings</p>
|
|
2513
|
+
<p className="text-xs text-muted-foreground">Applies to this view only.</p>
|
|
2507
2514
|
</div>
|
|
2508
2515
|
<div className="flex items-center justify-between">
|
|
2509
|
-
<Label htmlFor="pop-pace">
|
|
2516
|
+
<Label htmlFor="pop-pace">Snap to grid</Label>
|
|
2510
2517
|
<Switch id="pop-pace" defaultChecked />
|
|
2511
2518
|
</div>
|
|
2512
2519
|
<div className="space-y-1.5">
|
|
2513
|
-
<Label htmlFor="pop-lanes">
|
|
2520
|
+
<Label htmlFor="pop-lanes">Columns</Label>
|
|
2514
2521
|
<Input id="pop-lanes" defaultValue="8" />
|
|
2515
2522
|
</div>
|
|
2516
2523
|
</div>
|
|
@@ -2524,15 +2531,15 @@ export default function ComponentsPreview() {
|
|
|
2524
2531
|
<div className="flex flex-wrap items-center gap-3">
|
|
2525
2532
|
<Tooltip>
|
|
2526
2533
|
<TooltipTrigger asChild>
|
|
2527
|
-
<Button variant="outline">
|
|
2534
|
+
<Button variant="outline">Version</Button>
|
|
2528
2535
|
</TooltipTrigger>
|
|
2529
|
-
<TooltipContent>
|
|
2536
|
+
<TooltipContent>v2.4.0 — released Jun 20</TooltipContent>
|
|
2530
2537
|
</Tooltip>
|
|
2531
2538
|
<Tooltip>
|
|
2532
2539
|
<TooltipTrigger asChild>
|
|
2533
2540
|
<Button variant="outline">Status</Button>
|
|
2534
2541
|
</TooltipTrigger>
|
|
2535
|
-
<TooltipContent side="right">
|
|
2542
|
+
<TooltipContent side="right">Draft until approved</TooltipContent>
|
|
2536
2543
|
</Tooltip>
|
|
2537
2544
|
</div>
|
|
2538
2545
|
</TooltipProvider>
|
|
@@ -2549,23 +2556,23 @@ export default function ComponentsPreview() {
|
|
|
2549
2556
|
</Button>
|
|
2550
2557
|
</DropdownMenuTrigger>
|
|
2551
2558
|
<DropdownMenuContent align="start" className="w-56">
|
|
2552
|
-
<DropdownMenuLabel>
|
|
2559
|
+
<DropdownMenuLabel>Button · v2.4.0</DropdownMenuLabel>
|
|
2553
2560
|
<DropdownMenuSeparator />
|
|
2554
2561
|
<DropdownMenuItem>
|
|
2555
|
-
Edit
|
|
2562
|
+
Edit version <DropdownMenuShortcut>⌘E</DropdownMenuShortcut>
|
|
2556
2563
|
</DropdownMenuItem>
|
|
2557
|
-
<DropdownMenuItem>Move to
|
|
2564
|
+
<DropdownMenuItem>Move to project…</DropdownMenuItem>
|
|
2558
2565
|
<DropdownMenuSeparator />
|
|
2559
2566
|
<DropdownMenuLabel>Display</DropdownMenuLabel>
|
|
2560
|
-
<DropdownMenuCheckboxItem checked>Show
|
|
2561
|
-
<DropdownMenuCheckboxItem>Show
|
|
2567
|
+
<DropdownMenuCheckboxItem checked>Show variants</DropdownMenuCheckboxItem>
|
|
2568
|
+
<DropdownMenuCheckboxItem>Show deprecated</DropdownMenuCheckboxItem>
|
|
2562
2569
|
<DropdownMenuSeparator />
|
|
2563
2570
|
<DropdownMenuRadioGroup value="time">
|
|
2564
|
-
<DropdownMenuRadioItem value="time">Sort by
|
|
2571
|
+
<DropdownMenuRadioItem value="time">Sort by updated</DropdownMenuRadioItem>
|
|
2565
2572
|
<DropdownMenuRadioItem value="name">Sort by name</DropdownMenuRadioItem>
|
|
2566
2573
|
</DropdownMenuRadioGroup>
|
|
2567
2574
|
<DropdownMenuSeparator />
|
|
2568
|
-
<DropdownMenuItem variant="destructive">
|
|
2575
|
+
<DropdownMenuItem variant="destructive">Remove component</DropdownMenuItem>
|
|
2569
2576
|
</DropdownMenuContent>
|
|
2570
2577
|
</DropdownMenu>
|
|
2571
2578
|
</div>
|
|
@@ -2581,18 +2588,18 @@ export default function ComponentsPreview() {
|
|
|
2581
2588
|
<CommandInput placeholder="Type a command or search…" />
|
|
2582
2589
|
<CommandList>
|
|
2583
2590
|
<CommandEmpty>No results found.</CommandEmpty>
|
|
2584
|
-
<CommandGroup heading="
|
|
2591
|
+
<CommandGroup heading="Quick actions">
|
|
2585
2592
|
<CommandItem>
|
|
2586
|
-
|
|
2593
|
+
Open changelog <CommandShortcut>⌘1</CommandShortcut>
|
|
2587
2594
|
</CommandItem>
|
|
2588
|
-
<CommandItem>
|
|
2589
|
-
<CommandItem>
|
|
2595
|
+
<CommandItem>View releases</CommandItem>
|
|
2596
|
+
<CommandItem>Adoption report</CommandItem>
|
|
2590
2597
|
</CommandGroup>
|
|
2591
2598
|
<CommandSeparator />
|
|
2592
|
-
<CommandGroup heading="
|
|
2593
|
-
<CommandItem>
|
|
2594
|
-
<CommandItem>
|
|
2595
|
-
<CommandItem>
|
|
2599
|
+
<CommandGroup heading="Components">
|
|
2600
|
+
<CommandItem>Button</CommandItem>
|
|
2601
|
+
<CommandItem>Data Table</CommandItem>
|
|
2602
|
+
<CommandItem>Combobox</CommandItem>
|
|
2596
2603
|
</CommandGroup>
|
|
2597
2604
|
</CommandList>
|
|
2598
2605
|
</Command>
|
|
@@ -2607,19 +2614,19 @@ export default function ComponentsPreview() {
|
|
|
2607
2614
|
</SheetTrigger>
|
|
2608
2615
|
<SheetContent side={side}>
|
|
2609
2616
|
<SheetHeader>
|
|
2610
|
-
<SheetTitle>
|
|
2617
|
+
<SheetTitle>Component details</SheetTitle>
|
|
2611
2618
|
<SheetDescription>
|
|
2612
|
-
Edit
|
|
2619
|
+
Edit variants and default props for Button.
|
|
2613
2620
|
</SheetDescription>
|
|
2614
2621
|
</SheetHeader>
|
|
2615
2622
|
<div className="flex flex-col gap-4 px-4">
|
|
2616
2623
|
<div className="space-y-1.5">
|
|
2617
|
-
<Label htmlFor={`sheet-seed-${side}`}>
|
|
2618
|
-
<Input id={`sheet-seed-${side}`} defaultValue="
|
|
2624
|
+
<Label htmlFor={`sheet-seed-${side}`}>Version</Label>
|
|
2625
|
+
<Input id={`sheet-seed-${side}`} defaultValue="2.4.0" />
|
|
2619
2626
|
</div>
|
|
2620
2627
|
<div className="space-y-1.5">
|
|
2621
|
-
<Label htmlFor={`sheet-
|
|
2622
|
-
<Input id={`sheet-
|
|
2628
|
+
<Label htmlFor={`sheet-variant-${side}`}>Variant</Label>
|
|
2629
|
+
<Input id={`sheet-variant-${side}`} defaultValue="default" />
|
|
2623
2630
|
</div>
|
|
2624
2631
|
</div>
|
|
2625
2632
|
<SheetFooter className="flex-row justify-end gap-2">
|
|
@@ -2721,19 +2728,19 @@ export default function ComponentsPreview() {
|
|
|
2721
2728
|
<div className="space-y-1.5">
|
|
2722
2729
|
<p className="text-xs font-medium text-muted-foreground">Default (unordered)</p>
|
|
2723
2730
|
<List className="w-64">
|
|
2724
|
-
<ListItem>
|
|
2725
|
-
<ListItem>Check the
|
|
2726
|
-
<ListItem>
|
|
2727
|
-
<ListItem>
|
|
2731
|
+
<ListItem>Run pnpm build:tokens before every commit</ListItem>
|
|
2732
|
+
<ListItem>Check the changelog for breaking changes</ListItem>
|
|
2733
|
+
<ListItem>Import components from the core package</ListItem>
|
|
2734
|
+
<ListItem>Open a PR before merging to main</ListItem>
|
|
2728
2735
|
</List>
|
|
2729
2736
|
</div>
|
|
2730
2737
|
<div className="space-y-1.5">
|
|
2731
2738
|
<p className="text-xs font-medium text-muted-foreground">With icons</p>
|
|
2732
2739
|
<List className="w-64">
|
|
2733
|
-
<ListItem icon={<CheckIcon />}>
|
|
2734
|
-
<ListItem icon={<CheckIcon />}>
|
|
2735
|
-
<ListItem icon={<CheckIcon />}>Monthly
|
|
2736
|
-
<ListItem icon={<XIcon className="text-destructive" />}>
|
|
2740
|
+
<ListItem icon={<CheckIcon />}>Design tokens included</ListItem>
|
|
2741
|
+
<ListItem icon={<CheckIcon />}>Storybook coverage</ListItem>
|
|
2742
|
+
<ListItem icon={<CheckIcon />}>Monthly release notes</ListItem>
|
|
2743
|
+
<ListItem icon={<XIcon className="text-destructive" />}>Legacy variants excluded</ListItem>
|
|
2737
2744
|
</List>
|
|
2738
2745
|
</div>
|
|
2739
2746
|
<div className="space-y-1.5">
|
|
@@ -2741,8 +2748,8 @@ export default function ComponentsPreview() {
|
|
|
2741
2748
|
<div className="space-y-4">
|
|
2742
2749
|
<List spacing="sm" className="w-48">
|
|
2743
2750
|
<ListItem icon={<ZapIcon />}>sm — gap-1</ListItem>
|
|
2744
|
-
<ListItem icon={<ZapIcon />}>
|
|
2745
|
-
<ListItem icon={<ZapIcon />}>
|
|
2751
|
+
<ListItem icon={<ZapIcon />}>Quick setup</ListItem>
|
|
2752
|
+
<ListItem icon={<ZapIcon />}>Core tokens</ListItem>
|
|
2746
2753
|
</List>
|
|
2747
2754
|
<List spacing="lg" className="w-48">
|
|
2748
2755
|
<ListItem icon={<StarIcon />}>lg — gap-3</ListItem>
|
|
@@ -2752,19 +2759,19 @@ export default function ComponentsPreview() {
|
|
|
2752
2759
|
</div>
|
|
2753
2760
|
</div>
|
|
2754
2761
|
<div className="space-y-1.5">
|
|
2755
|
-
<p className="text-xs font-medium text-muted-foreground">Realistic use —
|
|
2762
|
+
<p className="text-xs font-medium text-muted-foreground">Realistic use — plan card</p>
|
|
2756
2763
|
<Card className="w-72">
|
|
2757
2764
|
<CardContent className="p-5 space-y-4">
|
|
2758
2765
|
<div>
|
|
2759
|
-
<h3 className="text-sm font-semibold">
|
|
2766
|
+
<h3 className="text-sm font-semibold">Pro plan includes</h3>
|
|
2760
2767
|
<p className="text-xs text-muted-foreground mt-0.5">Everything in Standard, plus:</p>
|
|
2761
2768
|
</div>
|
|
2762
2769
|
<List spacing="sm">
|
|
2763
|
-
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>Unlimited
|
|
2764
|
-
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>
|
|
2765
|
-
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>
|
|
2770
|
+
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>Unlimited private component libraries</ListItem>
|
|
2771
|
+
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>Priority design review (monthly)</ListItem>
|
|
2772
|
+
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>Early access to new components</ListItem>
|
|
2766
2773
|
<ListItem icon={<XIcon className="text-muted-foreground" />}>
|
|
2767
|
-
<span className="text-muted-foreground">
|
|
2774
|
+
<span className="text-muted-foreground">SSO not included</span>
|
|
2768
2775
|
</ListItem>
|
|
2769
2776
|
</List>
|
|
2770
2777
|
</CardContent>
|
|
@@ -2783,7 +2790,7 @@ export default function ComponentsPreview() {
|
|
|
2783
2790
|
</EmptyStateIcon>
|
|
2784
2791
|
<EmptyStateTitle>No messages yet</EmptyStateTitle>
|
|
2785
2792
|
<EmptyStateDescription>
|
|
2786
|
-
Messages from your
|
|
2793
|
+
Messages from your team will appear here after your first review.
|
|
2787
2794
|
</EmptyStateDescription>
|
|
2788
2795
|
</EmptyState>
|
|
2789
2796
|
</div>
|
|
@@ -2793,14 +2800,14 @@ export default function ComponentsPreview() {
|
|
|
2793
2800
|
<EmptyStateIcon>
|
|
2794
2801
|
<CalendarIcon strokeWidth={1.5} />
|
|
2795
2802
|
</EmptyStateIcon>
|
|
2796
|
-
<EmptyStateTitle>No
|
|
2803
|
+
<EmptyStateTitle>No releases scheduled</EmptyStateTitle>
|
|
2797
2804
|
<EmptyStateDescription>
|
|
2798
|
-
Add a
|
|
2805
|
+
Add a release to start tracking adoption and changes.
|
|
2799
2806
|
</EmptyStateDescription>
|
|
2800
2807
|
<EmptyStateAction>
|
|
2801
2808
|
<Button size="sm">
|
|
2802
2809
|
<PlusIcon strokeWidth={1.5} />
|
|
2803
|
-
Schedule
|
|
2810
|
+
Schedule release
|
|
2804
2811
|
</Button>
|
|
2805
2812
|
</EmptyStateAction>
|
|
2806
2813
|
</EmptyState>
|
|
@@ -2811,7 +2818,7 @@ export default function ComponentsPreview() {
|
|
|
2811
2818
|
<EmptyStateIcon className="bg-destructive/10 text-destructive">
|
|
2812
2819
|
<WifiOffIcon strokeWidth={1.5} />
|
|
2813
2820
|
</EmptyStateIcon>
|
|
2814
|
-
<EmptyStateTitle>Couldn't load
|
|
2821
|
+
<EmptyStateTitle>Couldn't load components</EmptyStateTitle>
|
|
2815
2822
|
<EmptyStateDescription>
|
|
2816
2823
|
Check your connection and try again. Your data is safe.
|
|
2817
2824
|
</EmptyStateDescription>
|
|
@@ -2827,7 +2834,7 @@ export default function ComponentsPreview() {
|
|
|
2827
2834
|
<ClipboardListIcon strokeWidth={1.5} />
|
|
2828
2835
|
</EmptyStateIcon>
|
|
2829
2836
|
<EmptyStateTitle>No notes yet</EmptyStateTitle>
|
|
2830
|
-
<EmptyStateDescription>Add a note to this
|
|
2837
|
+
<EmptyStateDescription>Add a note to this component.</EmptyStateDescription>
|
|
2831
2838
|
</EmptyState>
|
|
2832
2839
|
</div>
|
|
2833
2840
|
</div>
|
|
@@ -2836,15 +2843,7 @@ export default function ComponentsPreview() {
|
|
|
2836
2843
|
<Section title="Color Picker">
|
|
2837
2844
|
<div className="flex flex-wrap gap-8 items-start">
|
|
2838
2845
|
<div className="space-y-1.5">
|
|
2839
|
-
<p className="text-xs font-medium text-muted-foreground">
|
|
2840
|
-
<ColorPicker
|
|
2841
|
-
wheel
|
|
2842
|
-
defaultValue="#3b82f6"
|
|
2843
|
-
aria-label="Pick a color from the wheel"
|
|
2844
|
-
/>
|
|
2845
|
-
</div>
|
|
2846
|
-
<div className="space-y-1.5">
|
|
2847
|
-
<p className="text-xs font-medium text-muted-foreground">Wheel + swatches</p>
|
|
2846
|
+
<p className="text-xs font-medium text-muted-foreground">Add via wheel (+)</p>
|
|
2848
2847
|
<ColorPicker
|
|
2849
2848
|
wheel
|
|
2850
2849
|
swatches={[
|
|
@@ -2852,7 +2851,7 @@ export default function ComponentsPreview() {
|
|
|
2852
2851
|
"#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899",
|
|
2853
2852
|
]}
|
|
2854
2853
|
defaultValue="#8b5cf6"
|
|
2855
|
-
aria-label="Pick a
|
|
2854
|
+
aria-label="Pick a swatch or add a custom color"
|
|
2856
2855
|
/>
|
|
2857
2856
|
</div>
|
|
2858
2857
|
<div className="space-y-1.5">
|
|
@@ -2991,6 +2990,39 @@ export default function ComponentsPreview() {
|
|
|
2991
2990
|
</div>
|
|
2992
2991
|
</div>
|
|
2993
2992
|
</Section>
|
|
2993
|
+
|
|
2994
|
+
<Section title="Editable">
|
|
2995
|
+
<div className="grid gap-6 sm:grid-cols-2">
|
|
2996
|
+
<div className="space-y-2">
|
|
2997
|
+
<p className="text-sm font-medium text-foreground">Default (blur to save)</p>
|
|
2998
|
+
<Editable defaultValue="Project Alpha">
|
|
2999
|
+
<EditablePreview />
|
|
3000
|
+
</Editable>
|
|
3001
|
+
</div>
|
|
3002
|
+
<div className="space-y-2">
|
|
3003
|
+
<p className="text-sm font-medium text-foreground">With save/cancel controls</p>
|
|
3004
|
+
<Editable defaultValue="Untitled sprint" submitMode="enter">
|
|
3005
|
+
<EditablePreview />
|
|
3006
|
+
<EditableControl>
|
|
3007
|
+
<EditableSubmit />
|
|
3008
|
+
<EditableCancel />
|
|
3009
|
+
</EditableControl>
|
|
3010
|
+
</Editable>
|
|
3011
|
+
</div>
|
|
3012
|
+
<div className="space-y-2">
|
|
3013
|
+
<p className="text-sm font-medium text-foreground">Empty with placeholder</p>
|
|
3014
|
+
<Editable defaultValue="" placeholder="Add a title…">
|
|
3015
|
+
<EditablePreview />
|
|
3016
|
+
</Editable>
|
|
3017
|
+
</div>
|
|
3018
|
+
<div className="space-y-2">
|
|
3019
|
+
<p className="text-sm font-medium text-foreground">Disabled</p>
|
|
3020
|
+
<Editable defaultValue="Read-only field" disabled>
|
|
3021
|
+
<EditablePreview />
|
|
3022
|
+
</Editable>
|
|
3023
|
+
</div>
|
|
3024
|
+
</div>
|
|
3025
|
+
</Section>
|
|
2994
3026
|
</div>
|
|
2995
3027
|
</div>
|
|
2996
3028
|
);
|
|
@@ -3025,9 +3057,9 @@ function DatePickerScheduleForm() {
|
|
|
3025
3057
|
return (
|
|
3026
3058
|
<Card className="w-80"><CardContent className="p-4 space-y-4">
|
|
3027
3059
|
<div className="space-y-1">
|
|
3028
|
-
<p className="text-sm font-semibold">Schedule
|
|
3060
|
+
<p className="text-sm font-semibold">Schedule release window</p>
|
|
3029
3061
|
<p className="text-xs text-muted-foreground">
|
|
3030
|
-
|
|
3062
|
+
Design System Team · Q2 2026
|
|
3031
3063
|
</p>
|
|
3032
3064
|
</div>
|
|
3033
3065
|
<div className="space-y-3">
|
|
@@ -3111,18 +3143,18 @@ function SegmentedControlShowcase() {
|
|
|
3111
3143
|
</div>
|
|
3112
3144
|
|
|
3113
3145
|
<Card className="w-80"><CardContent className="p-4 space-y-3">
|
|
3114
|
-
<p className="text-sm font-semibold">
|
|
3115
|
-
<SegmentedControl value={filter} onValueChange={setFilter} label="
|
|
3116
|
-
<SegmentedControlItem value="active">
|
|
3117
|
-
<SegmentedControlItem value="archived">
|
|
3146
|
+
<p className="text-sm font-semibold">Component library</p>
|
|
3147
|
+
<SegmentedControl value={filter} onValueChange={setFilter} label="Status filter">
|
|
3148
|
+
<SegmentedControlItem value="active">Active</SegmentedControlItem>
|
|
3149
|
+
<SegmentedControlItem value="archived">Deprecated</SegmentedControlItem>
|
|
3118
3150
|
<SegmentedControlItem value="all">All</SegmentedControlItem>
|
|
3119
3151
|
</SegmentedControl>
|
|
3120
3152
|
<p className="text-xs text-muted-foreground">
|
|
3121
3153
|
Showing{" "}
|
|
3122
3154
|
<span className="font-medium text-foreground">
|
|
3123
|
-
{filter === "active" ? "
|
|
3155
|
+
{filter === "active" ? "active" : filter === "archived" ? "deprecated" : "all"}
|
|
3124
3156
|
</span>{" "}
|
|
3125
|
-
|
|
3157
|
+
components · reviewed by Avery Castillo
|
|
3126
3158
|
</p>
|
|
3127
3159
|
</CardContent></Card>
|
|
3128
3160
|
</div>
|
|
@@ -3134,42 +3166,42 @@ function TimelineRealisticDemo() {
|
|
|
3134
3166
|
<Card className="w-96">
|
|
3135
3167
|
<CardContent className="p-5 space-y-4">
|
|
3136
3168
|
<div className="space-y-0.5">
|
|
3137
|
-
<p className="text-sm font-semibold">
|
|
3138
|
-
<p className="text-xs text-muted-foreground">
|
|
3169
|
+
<p className="text-sm font-semibold">Button · v2.4.0 release</p>
|
|
3170
|
+
<p className="text-xs text-muted-foreground">Design System Team</p>
|
|
3139
3171
|
</div>
|
|
3140
3172
|
<Timeline>
|
|
3141
3173
|
<TimelineItem
|
|
3142
3174
|
status="complete"
|
|
3143
3175
|
icon={<UserCheckIcon className="size-3" strokeWidth={2} aria-hidden />}
|
|
3144
|
-
title="
|
|
3145
|
-
description="
|
|
3176
|
+
title="Proposal submitted"
|
|
3177
|
+
description="Button · Badge · Card"
|
|
3146
3178
|
time="Jun 20, 9:00 AM"
|
|
3147
3179
|
/>
|
|
3148
3180
|
<TimelineItem
|
|
3149
3181
|
status="complete"
|
|
3150
3182
|
icon={<CreditCardIcon className="size-3" strokeWidth={2} aria-hidden />}
|
|
3151
|
-
title="
|
|
3152
|
-
description="
|
|
3183
|
+
title="Budget approved"
|
|
3184
|
+
description="Q2 component tooling"
|
|
3153
3185
|
time="Jun 21, 11:30 AM"
|
|
3154
3186
|
/>
|
|
3155
3187
|
<TimelineItem
|
|
3156
3188
|
status="complete"
|
|
3157
3189
|
icon={<ClipboardCheckIcon className="size-3" strokeWidth={2} aria-hidden />}
|
|
3158
|
-
title="
|
|
3159
|
-
description="
|
|
3190
|
+
title="Accessibility review"
|
|
3191
|
+
description="Signed off by Priya Nair"
|
|
3160
3192
|
time="Jun 22, 3:15 PM"
|
|
3161
3193
|
/>
|
|
3162
3194
|
<TimelineItem
|
|
3163
3195
|
status="active"
|
|
3164
|
-
title="
|
|
3165
|
-
description="
|
|
3196
|
+
title="Design review pending"
|
|
3197
|
+
description="Feedback expected Jun 26"
|
|
3166
3198
|
time="Jun 25 (today)"
|
|
3167
3199
|
/>
|
|
3168
3200
|
<TimelineItem
|
|
3169
3201
|
status="pending"
|
|
3170
3202
|
icon={<TrophyIcon className="size-3" strokeWidth={2} aria-hidden />}
|
|
3171
|
-
title="
|
|
3172
|
-
description="
|
|
3203
|
+
title="v2.4.0 shipped"
|
|
3204
|
+
description="Published to npm · release notes"
|
|
3173
3205
|
time="Jun 28, 2026"
|
|
3174
3206
|
/>
|
|
3175
3207
|
</Timeline>
|
|
@@ -3185,8 +3217,8 @@ function RatingGroupFeedbackDemo() {
|
|
|
3185
3217
|
return (
|
|
3186
3218
|
<Card className="w-72"><CardContent className="p-4 space-y-4">
|
|
3187
3219
|
<div className="space-y-1">
|
|
3188
|
-
<p className="text-sm font-semibold">Rate
|
|
3189
|
-
<p className="text-xs text-muted-foreground">
|
|
3220
|
+
<p className="text-sm font-semibold">Rate this component</p>
|
|
3221
|
+
<p className="text-xs text-muted-foreground">Design System Team · v2.4.0</p>
|
|
3190
3222
|
</div>
|
|
3191
3223
|
{submitted ? (
|
|
3192
3224
|
<div className="space-y-2">
|
|
@@ -3196,7 +3228,7 @@ function RatingGroupFeedbackDemo() {
|
|
|
3196
3228
|
) : (
|
|
3197
3229
|
<div className="space-y-3">
|
|
3198
3230
|
<div className="space-y-1.5">
|
|
3199
|
-
<RatingGroup value={value} onValueChange={setValue} label="
|
|
3231
|
+
<RatingGroup value={value} onValueChange={setValue} label="Component rating" />
|
|
3200
3232
|
{value > 0 && (
|
|
3201
3233
|
<p className="text-xs text-muted-foreground">{labels[value]}</p>
|
|
3202
3234
|
)}
|
|
@@ -3230,14 +3262,14 @@ function TagsInputShowcase({
|
|
|
3230
3262
|
}
|
|
3231
3263
|
|
|
3232
3264
|
function TagsInputFilterDemo() {
|
|
3233
|
-
const [tags, setTags] = React.useState<string[]>(["
|
|
3265
|
+
const [tags, setTags] = React.useState<string[]>(["Button", "v2.4.0"]);
|
|
3234
3266
|
return (
|
|
3235
3267
|
<div className="w-96 space-y-3">
|
|
3236
3268
|
<Card>
|
|
3237
3269
|
<CardContent className="p-4 space-y-3">
|
|
3238
3270
|
<div>
|
|
3239
|
-
<p className="text-sm font-semibold">
|
|
3240
|
-
<p className="text-xs text-muted-foreground">Filter
|
|
3271
|
+
<p className="text-sm font-semibold">Component library</p>
|
|
3272
|
+
<p className="text-xs text-muted-foreground">Filter components by tag</p>
|
|
3241
3273
|
</div>
|
|
3242
3274
|
<div className="space-y-1.5">
|
|
3243
3275
|
<label className="text-sm font-medium">Active filters</label>
|