@behavioral-agentic-design-system/core 0.14.0 → 0.16.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 +8 -2
- package/scripts/a11y-lint.cjs +229 -0
- package/scripts/build-tokens.cjs +3 -3
- package/scripts/check-stories.mjs +109 -0
- package/scripts/fix-stories.mjs +785 -0
- package/scripts/generate-stories.cjs +101 -0
- package/scripts/oklch-to-hex.cjs +156 -0
- package/scripts/wcag-audit.cjs +444 -0
- package/src/app/preview/components/page.tsx +1118 -7
- package/src/components/dev-identity-badge.tsx +1 -1
- package/src/components/ui/button-group.tsx +57 -0
- package/src/components/ui/calendar.tsx +4 -0
- package/src/components/ui/circular-progress.tsx +120 -0
- package/src/components/ui/color-picker.tsx +219 -0
- package/src/components/ui/copy-button.tsx +114 -0
- package/src/components/ui/date-range-picker.tsx +174 -0
- package/src/components/ui/empty-state.tsx +115 -0
- package/src/components/ui/index.ts +3 -0
- package/src/components/ui/indicator.tsx +144 -0
- package/src/components/ui/list.tsx +70 -0
- package/src/components/ui/multi-select.tsx +196 -0
- package/src/components/ui/password-input.tsx +150 -0
- package/src/components/ui/time-picker.tsx +363 -0
- package/src/components/ui/tree-view.tsx +405 -0
- package/src/data/docs-index.ts +1 -0
- package/src/hooks/use-global-primary-color.ts +1 -1
- package/src/styles.css +2 -2
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
AccordionContent,
|
|
18
18
|
} from "@behavioral-agentic-design-system/core/components/ui/accordion";
|
|
19
19
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
20
|
+
import { ButtonGroup } from "@behavioral-agentic-design-system/core/components/ui/button-group";
|
|
20
21
|
import { Input } from "@behavioral-agentic-design-system/core/components/ui/input";
|
|
21
22
|
import { Label } from "@behavioral-agentic-design-system/core/components/ui/label";
|
|
22
23
|
import { Badge } from "@behavioral-agentic-design-system/core/components/ui/badge";
|
|
@@ -80,9 +81,21 @@ import {
|
|
|
80
81
|
StepperSeparator,
|
|
81
82
|
} from "@behavioral-agentic-design-system/core/components/ui/stepper";
|
|
82
83
|
import { PinInput } from "@behavioral-agentic-design-system/core/components/ui/pin-input";
|
|
84
|
+
import { PasswordInput } from "@behavioral-agentic-design-system/core/components/ui/password-input";
|
|
83
85
|
import { NumberInput } from "@behavioral-agentic-design-system/core/components/ui/number-input";
|
|
84
86
|
import { FileUpload } from "@behavioral-agentic-design-system/core/components/ui/file-upload";
|
|
85
87
|
import { Spinner } from "@behavioral-agentic-design-system/core/components/ui/spinner";
|
|
88
|
+
import { CircularProgress } from "@behavioral-agentic-design-system/core/components/ui/circular-progress";
|
|
89
|
+
import { Indicator } from "@behavioral-agentic-design-system/core/components/ui/indicator";
|
|
90
|
+
import { CopyButton } from "@behavioral-agentic-design-system/core/components/ui/copy-button";
|
|
91
|
+
import { List, ListItem } from "@behavioral-agentic-design-system/core/components/ui/list";
|
|
92
|
+
import {
|
|
93
|
+
EmptyState,
|
|
94
|
+
EmptyStateIcon,
|
|
95
|
+
EmptyStateTitle,
|
|
96
|
+
EmptyStateDescription,
|
|
97
|
+
EmptyStateAction,
|
|
98
|
+
} from "@behavioral-agentic-design-system/core/components/ui/empty-state";
|
|
86
99
|
import { AspectRatio } from "@behavioral-agentic-design-system/core/components/ui/aspect-ratio";
|
|
87
100
|
import {
|
|
88
101
|
ContextMenu,
|
|
@@ -108,6 +121,7 @@ import {
|
|
|
108
121
|
NavigationMenuTrigger,
|
|
109
122
|
} from "@behavioral-agentic-design-system/core/components/ui/navigation-menu";
|
|
110
123
|
import { Combobox } from "@behavioral-agentic-design-system/core/components/ui/combobox";
|
|
124
|
+
import { MultiSelect } from "@behavioral-agentic-design-system/core/components/ui/multi-select";
|
|
111
125
|
import { Kbd } from "@behavioral-agentic-design-system/core/components/ui/kbd";
|
|
112
126
|
import {
|
|
113
127
|
Toolbar,
|
|
@@ -124,6 +138,8 @@ import {
|
|
|
124
138
|
LinkIcon as ToolbarLinkIcon,
|
|
125
139
|
UndoIcon,
|
|
126
140
|
RedoIcon,
|
|
141
|
+
ChevronLeftIcon,
|
|
142
|
+
ChevronRightIcon,
|
|
127
143
|
} from "lucide-react";
|
|
128
144
|
import {
|
|
129
145
|
Menubar,
|
|
@@ -149,15 +165,113 @@ import {
|
|
|
149
165
|
HoverCardDescription,
|
|
150
166
|
HoverCardTrigger,
|
|
151
167
|
} from "@behavioral-agentic-design-system/core/components/ui/hover-card";
|
|
152
|
-
import { Sparkles, Info, CircleAlert, CalendarIcon, BuildingIcon, CheckIcon, CreditCardIcon, ClipboardCheckIcon, TrophyIcon, UserCheckIcon } from "lucide-react";
|
|
168
|
+
import { Sparkles, Info, CircleAlert, CalendarIcon, BuildingIcon, CheckIcon, CreditCardIcon, ClipboardCheckIcon, TrophyIcon, UserCheckIcon, XIcon, ZapIcon, StarIcon, ShieldCheckIcon, InboxIcon, WifiOffIcon, ClipboardListIcon, PlusIcon } from "lucide-react";
|
|
153
169
|
import { DatePicker } from "@behavioral-agentic-design-system/core/components/ui/date-picker";
|
|
170
|
+
import { DateRangePicker } from "@behavioral-agentic-design-system/core/components/ui/date-range-picker";
|
|
154
171
|
import { RatingGroup } from "@behavioral-agentic-design-system/core/components/ui/rating-group";
|
|
155
172
|
import { SegmentedControl, SegmentedControlItem } from "@behavioral-agentic-design-system/core/components/ui/segmented-control";
|
|
156
173
|
import { Timeline, TimelineItem } from "@behavioral-agentic-design-system/core/components/ui/timeline";
|
|
157
174
|
import { TagsInput } from "@behavioral-agentic-design-system/core/components/ui/tags-input";
|
|
175
|
+
import { TimePicker } from "@behavioral-agentic-design-system/core/components/ui/time-picker";
|
|
158
176
|
|
|
159
177
|
import { Toaster } from "@behavioral-agentic-design-system/core/components/ui/sonner";
|
|
160
178
|
import { toast } from "sonner";
|
|
179
|
+
import {
|
|
180
|
+
ChartConfig,
|
|
181
|
+
ChartContainer,
|
|
182
|
+
ChartTooltip,
|
|
183
|
+
ChartTooltipContent,
|
|
184
|
+
} from "@behavioral-agentic-design-system/core/components/ui/chart";
|
|
185
|
+
import {
|
|
186
|
+
Area,
|
|
187
|
+
AreaChart,
|
|
188
|
+
Bar,
|
|
189
|
+
BarChart,
|
|
190
|
+
CartesianGrid,
|
|
191
|
+
Line,
|
|
192
|
+
LineChart,
|
|
193
|
+
Pie,
|
|
194
|
+
PieChart,
|
|
195
|
+
XAxis,
|
|
196
|
+
Label as RLabel,
|
|
197
|
+
} from "recharts";
|
|
198
|
+
import {
|
|
199
|
+
Table,
|
|
200
|
+
TableBody,
|
|
201
|
+
TableCaption,
|
|
202
|
+
TableCell,
|
|
203
|
+
TableFooter,
|
|
204
|
+
TableHead,
|
|
205
|
+
TableHeader,
|
|
206
|
+
TableRow,
|
|
207
|
+
} from "@behavioral-agentic-design-system/core/components/ui/table";
|
|
208
|
+
import {
|
|
209
|
+
Select,
|
|
210
|
+
SelectContent,
|
|
211
|
+
SelectGroup,
|
|
212
|
+
SelectItem,
|
|
213
|
+
SelectLabel,
|
|
214
|
+
SelectTrigger,
|
|
215
|
+
SelectValue,
|
|
216
|
+
} from "@behavioral-agentic-design-system/core/components/ui/select";
|
|
217
|
+
import { Textarea } from "@behavioral-agentic-design-system/core/components/ui/textarea";
|
|
218
|
+
import { Calendar } from "@behavioral-agentic-design-system/core/components/ui/calendar";
|
|
219
|
+
import { Toggle } from "@behavioral-agentic-design-system/core/components/ui/toggle";
|
|
220
|
+
import {
|
|
221
|
+
ToggleGroup,
|
|
222
|
+
ToggleGroupItem,
|
|
223
|
+
} from "@behavioral-agentic-design-system/core/components/ui/toggle-group";
|
|
224
|
+
import {
|
|
225
|
+
Popover,
|
|
226
|
+
PopoverContent,
|
|
227
|
+
PopoverTrigger,
|
|
228
|
+
} from "@behavioral-agentic-design-system/core/components/ui/popover";
|
|
229
|
+
import {
|
|
230
|
+
Tooltip,
|
|
231
|
+
TooltipContent,
|
|
232
|
+
TooltipProvider,
|
|
233
|
+
TooltipTrigger,
|
|
234
|
+
} from "@behavioral-agentic-design-system/core/components/ui/tooltip";
|
|
235
|
+
import {
|
|
236
|
+
DropdownMenu,
|
|
237
|
+
DropdownMenuCheckboxItem,
|
|
238
|
+
DropdownMenuContent,
|
|
239
|
+
DropdownMenuItem,
|
|
240
|
+
DropdownMenuLabel,
|
|
241
|
+
DropdownMenuRadioGroup,
|
|
242
|
+
DropdownMenuRadioItem,
|
|
243
|
+
DropdownMenuSeparator,
|
|
244
|
+
DropdownMenuShortcut,
|
|
245
|
+
DropdownMenuTrigger,
|
|
246
|
+
} from "@behavioral-agentic-design-system/core/components/ui/dropdown-menu";
|
|
247
|
+
import {
|
|
248
|
+
Command,
|
|
249
|
+
CommandEmpty,
|
|
250
|
+
CommandGroup,
|
|
251
|
+
CommandInput,
|
|
252
|
+
CommandItem,
|
|
253
|
+
CommandList,
|
|
254
|
+
CommandSeparator,
|
|
255
|
+
CommandShortcut,
|
|
256
|
+
} from "@behavioral-agentic-design-system/core/components/ui/command";
|
|
257
|
+
import {
|
|
258
|
+
Sheet,
|
|
259
|
+
SheetClose,
|
|
260
|
+
SheetContent,
|
|
261
|
+
SheetDescription,
|
|
262
|
+
SheetFooter,
|
|
263
|
+
SheetHeader,
|
|
264
|
+
SheetTitle,
|
|
265
|
+
SheetTrigger,
|
|
266
|
+
} from "@behavioral-agentic-design-system/core/components/ui/sheet";
|
|
267
|
+
import { TrendingUp, MoreHorizontal, Folder, File, FileText, Settings as SettingsIcon, Users as UsersIcon } from "lucide-react";
|
|
268
|
+
import {
|
|
269
|
+
Tree,
|
|
270
|
+
TreeItem,
|
|
271
|
+
TreeItemTrigger,
|
|
272
|
+
TreeItemContent,
|
|
273
|
+
} from "@behavioral-agentic-design-system/core/components/ui/tree-view";
|
|
274
|
+
import { ColorPicker } from "@behavioral-agentic-design-system/core/components/ui/color-picker";
|
|
161
275
|
|
|
162
276
|
// Stable, deterministic data for ScrollArea — never use Math.random in
|
|
163
277
|
// SSR-rendered output, it causes hydration mismatches.
|
|
@@ -167,6 +281,61 @@ const SCROLL_ITEMS = Array.from({ length: 40 }, (_, i) => ({
|
|
|
167
281
|
meta: `entry-${i + 1}`,
|
|
168
282
|
}));
|
|
169
283
|
|
|
284
|
+
// Chart showcase data. Reuses the canonical sample datasets shipped in the
|
|
285
|
+
// cards + dashboard chart examples so the Components tab matches them 1:1.
|
|
286
|
+
const CHART_TREND_DATA = [
|
|
287
|
+
{ day: "Mon", today: 240, average: 400 },
|
|
288
|
+
{ day: "Tue", today: 139, average: 300 },
|
|
289
|
+
{ day: "Wed", today: 480, average: 200 },
|
|
290
|
+
{ day: "Thu", today: 390, average: 278 },
|
|
291
|
+
{ day: "Fri", today: 480, average: 189 },
|
|
292
|
+
{ day: "Sat", today: 380, average: 239 },
|
|
293
|
+
{ day: "Sun", today: 430, average: 349 },
|
|
294
|
+
];
|
|
295
|
+
|
|
296
|
+
const CHART_TREND_CONFIG = {
|
|
297
|
+
today: { label: "Today", color: "var(--chart-1)" },
|
|
298
|
+
average: { label: "Average", color: "var(--chart-2)" },
|
|
299
|
+
} satisfies ChartConfig;
|
|
300
|
+
|
|
301
|
+
const CHART_BROWSER_DATA = [
|
|
302
|
+
{ browser: "chrome", visitors: 275, fill: "var(--color-chrome)" },
|
|
303
|
+
{ browser: "safari", visitors: 200, fill: "var(--color-safari)" },
|
|
304
|
+
{ browser: "firefox", visitors: 187, fill: "var(--color-firefox)" },
|
|
305
|
+
{ browser: "edge", visitors: 173, fill: "var(--color-edge)" },
|
|
306
|
+
{ browser: "other", visitors: 90, fill: "var(--color-other)" },
|
|
307
|
+
];
|
|
308
|
+
|
|
309
|
+
const CHART_BROWSER_CONFIG = {
|
|
310
|
+
visitors: { label: "Visitors" },
|
|
311
|
+
chrome: { label: "Chrome", color: "var(--chart-1)" },
|
|
312
|
+
safari: { label: "Safari", color: "var(--chart-2)" },
|
|
313
|
+
firefox: { label: "Firefox", color: "var(--chart-3)" },
|
|
314
|
+
edge: { label: "Edge", color: "var(--chart-4)" },
|
|
315
|
+
other: { label: "Other", color: "var(--chart-5)" },
|
|
316
|
+
} satisfies ChartConfig;
|
|
317
|
+
|
|
318
|
+
const CHART_BROWSER_TOTAL = CHART_BROWSER_DATA.reduce(
|
|
319
|
+
(sum, d) => sum + d.visitors,
|
|
320
|
+
0
|
|
321
|
+
);
|
|
322
|
+
|
|
323
|
+
function CalendarShowcase() {
|
|
324
|
+
// Deterministic default — never new Date()/Math.random in SSR output.
|
|
325
|
+
const [date, setDate] = React.useState<Date | undefined>(
|
|
326
|
+
new Date("2026-06-25")
|
|
327
|
+
);
|
|
328
|
+
return (
|
|
329
|
+
<Calendar
|
|
330
|
+
mode="single"
|
|
331
|
+
selected={date}
|
|
332
|
+
onSelect={setDate}
|
|
333
|
+
defaultMonth={new Date("2026-06-01")}
|
|
334
|
+
className="rounded-md border"
|
|
335
|
+
/>
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
170
339
|
function Section({ title, children }: { title: string; children: React.ReactNode }) {
|
|
171
340
|
const id = title
|
|
172
341
|
.toLowerCase()
|
|
@@ -354,6 +523,55 @@ export default function ComponentsPreview() {
|
|
|
354
523
|
</div>
|
|
355
524
|
</Section>
|
|
356
525
|
|
|
526
|
+
<Section title="ButtonGroup">
|
|
527
|
+
<div className="flex flex-wrap gap-6 items-start">
|
|
528
|
+
<div className="space-y-1.5">
|
|
529
|
+
<p className="text-xs font-medium text-muted-foreground">Horizontal (default)</p>
|
|
530
|
+
<ButtonGroup aria-label="Lane view controls">
|
|
531
|
+
<Button variant="outline">All lanes</Button>
|
|
532
|
+
<Button variant="outline">My lanes</Button>
|
|
533
|
+
<Button variant="outline">Open only</Button>
|
|
534
|
+
</ButtonGroup>
|
|
535
|
+
</div>
|
|
536
|
+
<div className="space-y-1.5">
|
|
537
|
+
<p className="text-xs font-medium text-muted-foreground">Icon-only</p>
|
|
538
|
+
<ButtonGroup aria-label="Text alignment">
|
|
539
|
+
<Button variant="outline" size="icon" aria-label="Align left">
|
|
540
|
+
<AlignLeftIcon strokeWidth={1.5} />
|
|
541
|
+
</Button>
|
|
542
|
+
<Button variant="outline" size="icon" aria-label="Align center">
|
|
543
|
+
<AlignCenterIcon strokeWidth={1.5} />
|
|
544
|
+
</Button>
|
|
545
|
+
<Button variant="outline" size="icon" aria-label="Align right">
|
|
546
|
+
<AlignRightIcon strokeWidth={1.5} />
|
|
547
|
+
</Button>
|
|
548
|
+
</ButtonGroup>
|
|
549
|
+
</div>
|
|
550
|
+
<div className="space-y-1.5">
|
|
551
|
+
<p className="text-xs font-medium text-muted-foreground">Vertical</p>
|
|
552
|
+
<ButtonGroup orientation="vertical" aria-label="Stroke options">
|
|
553
|
+
<Button variant="outline">Freestyle</Button>
|
|
554
|
+
<Button variant="outline">Backstroke</Button>
|
|
555
|
+
<Button variant="outline">Breaststroke</Button>
|
|
556
|
+
</ButtonGroup>
|
|
557
|
+
</div>
|
|
558
|
+
<div className="space-y-1.5">
|
|
559
|
+
<p className="text-xs font-medium text-muted-foreground">Realistic use — pagination</p>
|
|
560
|
+
<ButtonGroup aria-label="Pagination">
|
|
561
|
+
<Button variant="outline" size="icon" aria-label="Previous page">
|
|
562
|
+
<ChevronLeftIcon strokeWidth={1.5} />
|
|
563
|
+
</Button>
|
|
564
|
+
<Button variant="outline" size="icon" aria-label="Page 1">1</Button>
|
|
565
|
+
<Button variant="default" size="icon" aria-label="Page 2, current">2</Button>
|
|
566
|
+
<Button variant="outline" size="icon" aria-label="Page 3">3</Button>
|
|
567
|
+
<Button variant="outline" size="icon" aria-label="Next page">
|
|
568
|
+
<ChevronRightIcon strokeWidth={1.5} />
|
|
569
|
+
</Button>
|
|
570
|
+
</ButtonGroup>
|
|
571
|
+
</div>
|
|
572
|
+
</div>
|
|
573
|
+
</Section>
|
|
574
|
+
|
|
357
575
|
<Section title="Inputs">
|
|
358
576
|
<div className="grid gap-4 sm:grid-cols-2">
|
|
359
577
|
<div className="space-y-2">
|
|
@@ -375,6 +593,47 @@ export default function ComponentsPreview() {
|
|
|
375
593
|
</div>
|
|
376
594
|
</Section>
|
|
377
595
|
|
|
596
|
+
<Section title="Password Input">
|
|
597
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
598
|
+
<div className="space-y-2">
|
|
599
|
+
<Label htmlFor="pw-sm">sm</Label>
|
|
600
|
+
<PasswordInput id="pw-sm" size="sm" placeholder="Small" />
|
|
601
|
+
</div>
|
|
602
|
+
<div className="space-y-2">
|
|
603
|
+
<Label htmlFor="pw-default">default</Label>
|
|
604
|
+
<PasswordInput id="pw-default" placeholder="Default" />
|
|
605
|
+
</div>
|
|
606
|
+
<div className="space-y-2">
|
|
607
|
+
<Label htmlFor="pw-lg">lg</Label>
|
|
608
|
+
<PasswordInput id="pw-lg" size="lg" placeholder="Large" />
|
|
609
|
+
</div>
|
|
610
|
+
<div className="space-y-2">
|
|
611
|
+
<Label htmlFor="pw-xl">xl</Label>
|
|
612
|
+
<PasswordInput id="pw-xl" size="xl" placeholder="Extra large" />
|
|
613
|
+
</div>
|
|
614
|
+
<div className="space-y-2">
|
|
615
|
+
<Label htmlFor="pw-disabled">Disabled</Label>
|
|
616
|
+
<PasswordInput id="pw-disabled" size="xl" disabled placeholder="Disabled" />
|
|
617
|
+
</div>
|
|
618
|
+
<div className="space-y-2">
|
|
619
|
+
<Label htmlFor="pw-invalid">Invalid</Label>
|
|
620
|
+
<PasswordInput id="pw-invalid" size="xl" aria-invalid placeholder="Invalid" />
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
<div className="w-80 space-y-1.5">
|
|
624
|
+
<Label htmlFor="pw-realistic">Current password</Label>
|
|
625
|
+
<PasswordInput
|
|
626
|
+
id="pw-realistic"
|
|
627
|
+
autoComplete="current-password"
|
|
628
|
+
size="xl"
|
|
629
|
+
placeholder="Enter your password"
|
|
630
|
+
/>
|
|
631
|
+
<p className="text-xs text-muted-foreground">
|
|
632
|
+
Click the eye icon to reveal.
|
|
633
|
+
</p>
|
|
634
|
+
</div>
|
|
635
|
+
</Section>
|
|
636
|
+
|
|
378
637
|
<Section title="Form controls">
|
|
379
638
|
<div className="flex flex-wrap items-center gap-6">
|
|
380
639
|
<div className="flex items-center gap-2">
|
|
@@ -1177,6 +1436,148 @@ export default function ComponentsPreview() {
|
|
|
1177
1436
|
</div>
|
|
1178
1437
|
</Section>
|
|
1179
1438
|
|
|
1439
|
+
{/* ── Circular Progress ────────────────────────────────────── */}
|
|
1440
|
+
<Section title="Circular Progress">
|
|
1441
|
+
<div className="space-y-6">
|
|
1442
|
+
<div className="space-y-2">
|
|
1443
|
+
<p className="text-sm font-medium text-muted-foreground">Sizes</p>
|
|
1444
|
+
<div className="flex items-center gap-6">
|
|
1445
|
+
<CircularProgress value={65} size="sm" label="Small: 65%" />
|
|
1446
|
+
<CircularProgress value={65} size="default" label="Default: 65%" />
|
|
1447
|
+
<CircularProgress value={65} size="lg" label="Large: 65%" />
|
|
1448
|
+
</div>
|
|
1449
|
+
</div>
|
|
1450
|
+
<div className="space-y-2">
|
|
1451
|
+
<p className="text-sm font-medium text-muted-foreground">Variants</p>
|
|
1452
|
+
<div className="flex items-center gap-6">
|
|
1453
|
+
<CircularProgress value={65} variant="default" label="default: 65%" />
|
|
1454
|
+
<CircularProgress value={65} variant="muted" label="muted: 65%" />
|
|
1455
|
+
<CircularProgress value={100} variant="success" label="success: 100%" />
|
|
1456
|
+
<CircularProgress value={55} variant="warning" label="warning: 55%" />
|
|
1457
|
+
<CircularProgress value={20} variant="destructive" label="destructive: 20%" />
|
|
1458
|
+
</div>
|
|
1459
|
+
</div>
|
|
1460
|
+
<div className="space-y-2">
|
|
1461
|
+
<p className="text-sm font-medium text-muted-foreground">With center label</p>
|
|
1462
|
+
<div className="flex items-center gap-6">
|
|
1463
|
+
<CircularProgress value={72} size="lg" label="Storage: 72%">
|
|
1464
|
+
<span className="text-xs font-semibold">72%</span>
|
|
1465
|
+
</CircularProgress>
|
|
1466
|
+
<CircularProgress value={100} size="lg" variant="success" label="Complete">
|
|
1467
|
+
<span className="text-xs font-semibold">✓</span>
|
|
1468
|
+
</CircularProgress>
|
|
1469
|
+
</div>
|
|
1470
|
+
</div>
|
|
1471
|
+
<div className="space-y-2">
|
|
1472
|
+
<p className="text-sm font-medium text-muted-foreground">Indeterminate</p>
|
|
1473
|
+
<CircularProgress label="Loading…" />
|
|
1474
|
+
</div>
|
|
1475
|
+
</div>
|
|
1476
|
+
</Section>
|
|
1477
|
+
|
|
1478
|
+
{/* ── Indicator ────────────────────────────────────────────── */}
|
|
1479
|
+
<Section title="Indicator"> <div className="space-y-6">
|
|
1480
|
+
{/* Variants */}
|
|
1481
|
+
<div className="space-y-3">
|
|
1482
|
+
<p className="text-sm font-medium text-muted-foreground">Variants</p>
|
|
1483
|
+
<div className="flex flex-wrap items-center gap-6">
|
|
1484
|
+
{(["default", "secondary", "destructive", "success", "warning"] as const).map((v) => (
|
|
1485
|
+
<div key={v} className="flex flex-col items-center gap-2">
|
|
1486
|
+
<Indicator variant={v} label={v === "destructive" ? 3 : undefined}>
|
|
1487
|
+
<div className="size-10 rounded-md border bg-muted" />
|
|
1488
|
+
</Indicator>
|
|
1489
|
+
<span className="text-xs text-muted-foreground">{v}</span>
|
|
1490
|
+
</div>
|
|
1491
|
+
))} </div>
|
|
1492
|
+
</div>
|
|
1493
|
+
{/* Sizes */}
|
|
1494
|
+
<div className="space-y-3">
|
|
1495
|
+
<p className="text-sm font-medium text-muted-foreground">Sizes</p>
|
|
1496
|
+
<div className="flex items-center gap-6">
|
|
1497
|
+
<div className="flex flex-col items-center gap-2">
|
|
1498
|
+
<Indicator size="sm"><div className="size-10 rounded-md border bg-muted" /></Indicator>
|
|
1499
|
+
<span className="text-xs text-muted-foreground">sm</span>
|
|
1500
|
+
</div>
|
|
1501
|
+
<div className="flex flex-col items-center gap-2">
|
|
1502
|
+
<Indicator size="default" label={4}><div className="size-10 rounded-md border bg-muted" /></Indicator>
|
|
1503
|
+
<span className="text-xs text-muted-foreground">default</span>
|
|
1504
|
+
</div>
|
|
1505
|
+
<div className="flex flex-col items-center gap-2">
|
|
1506
|
+
<Indicator size="lg" label={12}><div className="size-10 rounded-md border bg-muted" /></Indicator>
|
|
1507
|
+
<span className="text-xs text-muted-foreground">lg</span>
|
|
1508
|
+
</div>
|
|
1509
|
+
</div>
|
|
1510
|
+
</div>
|
|
1511
|
+
{/* Processing */}
|
|
1512
|
+
<div className="space-y-3">
|
|
1513
|
+
<p className="text-sm font-medium text-muted-foreground">Processing (ping)</p>
|
|
1514
|
+
<div className="flex items-center gap-6">
|
|
1515
|
+
<Indicator processing variant="success"><div className="size-10 rounded-md border bg-muted" /></Indicator>
|
|
1516
|
+
<Indicator processing variant="destructive"><div className="size-10 rounded-md border bg-muted" /></Indicator>
|
|
1517
|
+
</div>
|
|
1518
|
+
</div>
|
|
1519
|
+
{/* Realistic use */}
|
|
1520
|
+
<div className="space-y-3">
|
|
1521
|
+
<p className="text-sm font-medium text-muted-foreground">Online status + notification count</p>
|
|
1522
|
+
<div className="flex items-center gap-6">
|
|
1523
|
+
<Indicator position="bottom-right" variant="success" withBorder>
|
|
1524
|
+
<div className="size-10 rounded-full border bg-muted flex items-center justify-center text-sm font-medium">JL</div>
|
|
1525
|
+
</Indicator>
|
|
1526
|
+
<Indicator label={9} variant="destructive">
|
|
1527
|
+
<div className="size-10 rounded-md border bg-muted flex items-center justify-center">
|
|
1528
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
|
|
1529
|
+
</div>
|
|
1530
|
+
</Indicator> </div>
|
|
1531
|
+
</div>
|
|
1532
|
+
</div>
|
|
1533
|
+
</Section>
|
|
1534
|
+
|
|
1535
|
+
{/* ── CopyButton ───────────────────────────────────────────── */}
|
|
1536
|
+
<Section title="CopyButton"> <div className="space-y-6">
|
|
1537
|
+
{/* Variants */}
|
|
1538
|
+
<div className="space-y-3">
|
|
1539
|
+
<p className="text-sm font-medium text-muted-foreground">Variants</p>
|
|
1540
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
1541
|
+
<CopyButton value="default" variant="default">Copy</CopyButton>
|
|
1542
|
+
<CopyButton value="outline" variant="outline">Copy</CopyButton>
|
|
1543
|
+
<CopyButton value="secondary" variant="secondary">Copy</CopyButton>
|
|
1544
|
+
<CopyButton value="ghost" variant="ghost">Copy</CopyButton> </div>
|
|
1545
|
+
</div>
|
|
1546
|
+
{/* Sizes */}
|
|
1547
|
+
<div className="space-y-3">
|
|
1548
|
+
<p className="text-sm font-medium text-muted-foreground">Sizes</p>
|
|
1549
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
1550
|
+
<CopyButton value="sm" size="sm" variant="outline">Copy</CopyButton>
|
|
1551
|
+
<CopyButton value="default" size="default" variant="outline">Copy</CopyButton>
|
|
1552
|
+
<CopyButton value="lg" size="lg" variant="outline">Copy</CopyButton>
|
|
1553
|
+
</div>
|
|
1554
|
+
</div>
|
|
1555
|
+
{/* Icon-only */}
|
|
1556
|
+
<div className="space-y-3">
|
|
1557
|
+
<p className="text-sm font-medium text-muted-foreground">Icon-only</p>
|
|
1558
|
+
<div className="flex items-center gap-3">
|
|
1559
|
+
<CopyButton value="abc" size="icon-sm" variant="ghost" aria-label="Copy token" />
|
|
1560
|
+
<CopyButton value="abc" size="icon" variant="outline" aria-label="Copy value" />
|
|
1561
|
+
<CopyButton value="abc" size="icon-lg" variant="secondary" aria-label="Copy large" />
|
|
1562
|
+
</div>
|
|
1563
|
+
</div>
|
|
1564
|
+
{/* Realistic use — API key row */}
|
|
1565
|
+
<div className="space-y-3">
|
|
1566
|
+
<p className="text-sm font-medium text-muted-foreground">API key row</p>
|
|
1567
|
+
<div className="flex w-full max-w-sm items-center gap-2 rounded-md border bg-muted px-3 py-2">
|
|
1568
|
+
<code className="min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground">
|
|
1569
|
+
sk-proj-Xk9mNpQ2vR7tLwYjAb4cDeFgHiJkLmNo
|
|
1570
|
+
</code>
|
|
1571
|
+
<CopyButton
|
|
1572
|
+
value="sk-proj-Xk9mNpQ2vR7tLwYjAb4cDeFgHiJkLmNo"
|
|
1573
|
+
size="icon-sm"
|
|
1574
|
+
variant="ghost"
|
|
1575
|
+
aria-label="Copy API key"
|
|
1576
|
+
/> </div>
|
|
1577
|
+
</div>
|
|
1578
|
+
</div>
|
|
1579
|
+
</Section>
|
|
1580
|
+
|
|
1180
1581
|
{/* ── Aspect Ratio ─────────────────────────────────────────── */}
|
|
1181
1582
|
<Section title="Aspect Ratio">
|
|
1182
1583
|
<div className="space-y-6">
|
|
@@ -1487,7 +1888,7 @@ export default function ComponentsPreview() {
|
|
|
1487
1888
|
</div>
|
|
1488
1889
|
<div className="space-y-2">
|
|
1489
1890
|
<p className="text-sm font-medium text-muted-foreground">Keyboard shortcuts list</p>
|
|
1490
|
-
<
|
|
1891
|
+
<Card className="w-[320px]"><CardContent className="p-4 space-y-2">
|
|
1491
1892
|
{[
|
|
1492
1893
|
{ keys: ["⌘", "K"], label: "Open command palette" },
|
|
1493
1894
|
{ keys: ["⌘", "Shift", "F"], label: "Search across files" },
|
|
@@ -1503,7 +1904,7 @@ export default function ComponentsPreview() {
|
|
|
1503
1904
|
</div>
|
|
1504
1905
|
</div>
|
|
1505
1906
|
))}
|
|
1506
|
-
</
|
|
1907
|
+
</CardContent></Card>
|
|
1507
1908
|
</div>
|
|
1508
1909
|
</div>
|
|
1509
1910
|
</Section>
|
|
@@ -1539,6 +1940,55 @@ export default function ComponentsPreview() {
|
|
|
1539
1940
|
</div>
|
|
1540
1941
|
</div>
|
|
1541
1942
|
</Section>
|
|
1943
|
+
<Section title="MultiSelect">
|
|
1944
|
+
<div className="space-y-6">
|
|
1945
|
+
<div className="space-y-3">
|
|
1946
|
+
<p className="text-sm font-medium text-muted-foreground">Default</p>
|
|
1947
|
+
<div className="max-w-xs">
|
|
1948
|
+
<MultiSelect
|
|
1949
|
+
options={[
|
|
1950
|
+
{ value: "next", label: "Next.js" },
|
|
1951
|
+
{ value: "remix", label: "Remix" },
|
|
1952
|
+
{ value: "astro", label: "Astro" },
|
|
1953
|
+
{ value: "sveltekit", label: "SvelteKit" },
|
|
1954
|
+
]}
|
|
1955
|
+
value={["next", "remix"]}
|
|
1956
|
+
onValueChange={() => {}}
|
|
1957
|
+
/>
|
|
1958
|
+
</div>
|
|
1959
|
+
</div>
|
|
1960
|
+
<div className="space-y-3">
|
|
1961
|
+
<p className="text-sm font-medium text-muted-foreground">With maxCount=2</p>
|
|
1962
|
+
<div className="max-w-xs">
|
|
1963
|
+
<MultiSelect
|
|
1964
|
+
options={[
|
|
1965
|
+
{ value: "next", label: "Next.js" },
|
|
1966
|
+
{ value: "remix", label: "Remix" },
|
|
1967
|
+
{ value: "astro", label: "Astro" },
|
|
1968
|
+
{ value: "sveltekit", label: "SvelteKit" },
|
|
1969
|
+
]}
|
|
1970
|
+
value={["next", "remix", "astro"]}
|
|
1971
|
+
onValueChange={() => {}}
|
|
1972
|
+
maxCount={2}
|
|
1973
|
+
/>
|
|
1974
|
+
</div>
|
|
1975
|
+
</div>
|
|
1976
|
+
<div className="space-y-3">
|
|
1977
|
+
<p className="text-sm font-medium text-muted-foreground">Disabled</p>
|
|
1978
|
+
<div className="max-w-xs">
|
|
1979
|
+
<MultiSelect
|
|
1980
|
+
options={[
|
|
1981
|
+
{ value: "next", label: "Next.js" },
|
|
1982
|
+
{ value: "remix", label: "Remix" },
|
|
1983
|
+
]}
|
|
1984
|
+
value={["next"]}
|
|
1985
|
+
onValueChange={() => {}}
|
|
1986
|
+
disabled
|
|
1987
|
+
/>
|
|
1988
|
+
</div>
|
|
1989
|
+
</div>
|
|
1990
|
+
</div>
|
|
1991
|
+
</Section>
|
|
1542
1992
|
<Section title="Context Menu">
|
|
1543
1993
|
<div className="space-y-6">
|
|
1544
1994
|
<div className="space-y-3">
|
|
@@ -1633,6 +2083,79 @@ export default function ComponentsPreview() {
|
|
|
1633
2083
|
</div>
|
|
1634
2084
|
</Section>
|
|
1635
2085
|
|
|
2086
|
+
<Section title="TimePicker">
|
|
2087
|
+
<div className="space-y-6">
|
|
2088
|
+
<div className="space-y-3">
|
|
2089
|
+
<p className="text-sm text-muted-foreground font-medium">Sizes</p>
|
|
2090
|
+
<div className="flex flex-col gap-3 max-w-xs">
|
|
2091
|
+
<TimePicker value="08:00" size="sm" />
|
|
2092
|
+
<TimePicker value="08:00" size="default" />
|
|
2093
|
+
<TimePicker value="08:00" size="lg" />
|
|
2094
|
+
</div>
|
|
2095
|
+
</div>
|
|
2096
|
+
<div className="space-y-3">
|
|
2097
|
+
<p className="text-sm text-muted-foreground font-medium">12-hour mode with clear</p>
|
|
2098
|
+
<div className="max-w-xs">
|
|
2099
|
+
<TimePicker value="14:30" hours12 clearable />
|
|
2100
|
+
</div>
|
|
2101
|
+
</div>
|
|
2102
|
+
<div className="space-y-3">
|
|
2103
|
+
<p className="text-sm text-muted-foreground font-medium">With seconds</p>
|
|
2104
|
+
<div className="max-w-xs">
|
|
2105
|
+
<TimePicker value="09:30:00" showSeconds clearable />
|
|
2106
|
+
</div>
|
|
2107
|
+
</div>
|
|
2108
|
+
<div className="space-y-3">
|
|
2109
|
+
<p className="text-sm text-muted-foreground font-medium">Disabled</p>
|
|
2110
|
+
<div className="max-w-xs">
|
|
2111
|
+
<TimePicker value="09:30" disabled />
|
|
2112
|
+
</div>
|
|
2113
|
+
</div>
|
|
2114
|
+
</div>
|
|
2115
|
+
</Section>
|
|
2116
|
+
|
|
2117
|
+
<Section title="DateRangePicker">
|
|
2118
|
+
<div className="space-y-6">
|
|
2119
|
+
<div className="space-y-3">
|
|
2120
|
+
<p className="text-sm font-medium text-muted-foreground">With range selected</p>
|
|
2121
|
+
<div className="max-w-md">
|
|
2122
|
+
<DateRangePicker
|
|
2123
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
2124
|
+
onValueChange={() => {}}
|
|
2125
|
+
clearable
|
|
2126
|
+
/>
|
|
2127
|
+
</div>
|
|
2128
|
+
</div>
|
|
2129
|
+
<div className="space-y-3">
|
|
2130
|
+
<p className="text-sm font-medium text-muted-foreground">Sizes</p>
|
|
2131
|
+
<div className="flex flex-col gap-3 max-w-md">
|
|
2132
|
+
<DateRangePicker
|
|
2133
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
2134
|
+
size="sm"
|
|
2135
|
+
/>
|
|
2136
|
+
<DateRangePicker
|
|
2137
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
2138
|
+
size="default"
|
|
2139
|
+
/>
|
|
2140
|
+
<DateRangePicker
|
|
2141
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
2142
|
+
size="lg"
|
|
2143
|
+
/>
|
|
2144
|
+
</div>
|
|
2145
|
+
</div>
|
|
2146
|
+
<div className="space-y-3">
|
|
2147
|
+
<p className="text-sm font-medium text-muted-foreground">Empty / Disabled</p>
|
|
2148
|
+
<div className="flex flex-col gap-3 max-w-md">
|
|
2149
|
+
<DateRangePicker />
|
|
2150
|
+
<DateRangePicker
|
|
2151
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
2152
|
+
disabled
|
|
2153
|
+
/>
|
|
2154
|
+
</div>
|
|
2155
|
+
</div>
|
|
2156
|
+
</div>
|
|
2157
|
+
</Section>
|
|
2158
|
+
|
|
1636
2159
|
<Section title="Rating Group">
|
|
1637
2160
|
<div className="space-y-6">
|
|
1638
2161
|
<div className="space-y-3">
|
|
@@ -1744,6 +2267,594 @@ export default function ComponentsPreview() {
|
|
|
1744
2267
|
</div>
|
|
1745
2268
|
</div>
|
|
1746
2269
|
</Section>
|
|
2270
|
+
|
|
2271
|
+
<Section title="Chart">
|
|
2272
|
+
<p className="text-sm text-muted-foreground">
|
|
2273
|
+
Recharts wrapped in{" "}
|
|
2274
|
+
<code className="font-mono text-xs">ChartContainer</code> — series
|
|
2275
|
+
colors come from the{" "}
|
|
2276
|
+
<code className="font-mono text-xs">--chart-1…5</code> tokens,
|
|
2277
|
+
tooltips are token-styled, and the entrance animation auto-disables
|
|
2278
|
+
under <code className="font-mono text-xs">prefers-reduced-motion</code>.
|
|
2279
|
+
</p>
|
|
2280
|
+
<div className="grid gap-6 sm:grid-cols-2">
|
|
2281
|
+
<div className="space-y-3">
|
|
2282
|
+
<p className="text-sm font-medium text-muted-foreground">Line</p>
|
|
2283
|
+
<ChartContainer config={CHART_TREND_CONFIG} className="h-[200px] w-full">
|
|
2284
|
+
<LineChart accessibilityLayer data={CHART_TREND_DATA} margin={{ top: 5, right: 10, left: 12, bottom: 0 }}>
|
|
2285
|
+
<CartesianGrid vertical={false} />
|
|
2286
|
+
<XAxis dataKey="day" tickLine={false} axisLine={false} tickMargin={8} />
|
|
2287
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
2288
|
+
<Line type="monotone" dataKey="today" stroke="var(--color-today)" strokeWidth={2} dot={{ fill: "var(--color-today)" }} activeDot={{ r: 5 }} />
|
|
2289
|
+
<Line type="monotone" dataKey="average" stroke="var(--color-average)" strokeWidth={2} strokeOpacity={0.5} dot={{ fill: "var(--color-average)", opacity: 0.5 }} activeDot={{ r: 5 }} />
|
|
2290
|
+
</LineChart>
|
|
2291
|
+
</ChartContainer>
|
|
2292
|
+
</div>
|
|
2293
|
+
<div className="space-y-3">
|
|
2294
|
+
<p className="text-sm font-medium text-muted-foreground">Area</p>
|
|
2295
|
+
<ChartContainer config={CHART_TREND_CONFIG} className="h-[200px] w-full">
|
|
2296
|
+
<AreaChart accessibilityLayer data={CHART_TREND_DATA} margin={{ top: 5, right: 10, left: 12, bottom: 0 }}>
|
|
2297
|
+
<CartesianGrid vertical={false} />
|
|
2298
|
+
<XAxis dataKey="day" tickLine={false} axisLine={false} tickMargin={8} />
|
|
2299
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
2300
|
+
<Area type="monotone" dataKey="average" stroke="var(--color-average)" fill="var(--color-average)" fillOpacity={0.1} strokeWidth={2} />
|
|
2301
|
+
<Area type="monotone" dataKey="today" stroke="var(--color-today)" fill="var(--color-today)" fillOpacity={0.12} strokeWidth={2} />
|
|
2302
|
+
</AreaChart>
|
|
2303
|
+
</ChartContainer>
|
|
2304
|
+
</div>
|
|
2305
|
+
<div className="space-y-3">
|
|
2306
|
+
<p className="text-sm font-medium text-muted-foreground">Bar</p>
|
|
2307
|
+
<ChartContainer config={CHART_BROWSER_CONFIG} className="h-[200px] w-full">
|
|
2308
|
+
<BarChart accessibilityLayer data={CHART_BROWSER_DATA} margin={{ top: 5, right: 10, left: 0, bottom: 0 }}>
|
|
2309
|
+
<CartesianGrid vertical={false} />
|
|
2310
|
+
<XAxis
|
|
2311
|
+
dataKey="browser"
|
|
2312
|
+
tickLine={false}
|
|
2313
|
+
axisLine={false}
|
|
2314
|
+
tickMargin={8}
|
|
2315
|
+
tickFormatter={(v) => CHART_BROWSER_CONFIG[v as keyof typeof CHART_BROWSER_CONFIG]?.label as string}
|
|
2316
|
+
/>
|
|
2317
|
+
<ChartTooltip cursor={false} content={<ChartTooltipContent hideLabel />} />
|
|
2318
|
+
<Bar dataKey="visitors" radius={6} />
|
|
2319
|
+
</BarChart>
|
|
2320
|
+
</ChartContainer>
|
|
2321
|
+
</div>
|
|
2322
|
+
<div className="space-y-3">
|
|
2323
|
+
<p className="text-sm font-medium text-muted-foreground">Pie (donut)</p>
|
|
2324
|
+
<ChartContainer config={CHART_BROWSER_CONFIG} className="mx-auto aspect-square h-[200px]">
|
|
2325
|
+
<PieChart>
|
|
2326
|
+
<ChartTooltip cursor={false} content={<ChartTooltipContent hideLabel />} />
|
|
2327
|
+
<Pie data={CHART_BROWSER_DATA} dataKey="visitors" nameKey="browser" innerRadius={50} strokeWidth={5}>
|
|
2328
|
+
<RLabel
|
|
2329
|
+
content={({ viewBox }) => {
|
|
2330
|
+
if (viewBox && "cx" in viewBox && "cy" in viewBox) {
|
|
2331
|
+
return (
|
|
2332
|
+
<text x={viewBox.cx} y={viewBox.cy} textAnchor="middle" dominantBaseline="middle">
|
|
2333
|
+
<tspan x={viewBox.cx} y={viewBox.cy} className="fill-foreground text-2xl font-bold">
|
|
2334
|
+
{CHART_BROWSER_TOTAL.toLocaleString()}
|
|
2335
|
+
</tspan>
|
|
2336
|
+
<tspan x={viewBox.cx} y={(viewBox.cy || 0) + 20} className="fill-muted-foreground">
|
|
2337
|
+
Visitors
|
|
2338
|
+
</tspan>
|
|
2339
|
+
</text>
|
|
2340
|
+
);
|
|
2341
|
+
}
|
|
2342
|
+
}}
|
|
2343
|
+
/>
|
|
2344
|
+
</Pie>
|
|
2345
|
+
</PieChart>
|
|
2346
|
+
</ChartContainer>
|
|
2347
|
+
</div>
|
|
2348
|
+
</div>
|
|
2349
|
+
</Section>
|
|
2350
|
+
|
|
2351
|
+
<Section title="Table">
|
|
2352
|
+
<Table>
|
|
2353
|
+
<TableCaption>Breezy Hills Aquatic Club — 100m Freestyle finals</TableCaption>
|
|
2354
|
+
<TableHeader>
|
|
2355
|
+
<TableRow>
|
|
2356
|
+
<TableHead className="w-12">Place</TableHead>
|
|
2357
|
+
<TableHead>Swimmer</TableHead>
|
|
2358
|
+
<TableHead>Squad</TableHead>
|
|
2359
|
+
<TableHead className="text-right">Time</TableHead>
|
|
2360
|
+
</TableRow>
|
|
2361
|
+
</TableHeader>
|
|
2362
|
+
<TableBody>
|
|
2363
|
+
{[
|
|
2364
|
+
{ place: 1, name: "Avery Castillo", squad: "Senior A", time: "52.18" },
|
|
2365
|
+
{ place: 2, name: "Noah Kim", squad: "Senior A", time: "52.94" },
|
|
2366
|
+
{ place: 3, name: "Priya Raman", squad: "Senior B", time: "53.40" },
|
|
2367
|
+
{ place: 4, name: "Liam O'Connor", squad: "Senior B", time: "54.07" },
|
|
2368
|
+
].map((r) => (
|
|
2369
|
+
<TableRow key={r.place}>
|
|
2370
|
+
<TableCell className="font-medium tabular-nums">{r.place}</TableCell>
|
|
2371
|
+
<TableCell>{r.name}</TableCell>
|
|
2372
|
+
<TableCell className="text-muted-foreground">{r.squad}</TableCell>
|
|
2373
|
+
<TableCell className="text-right font-mono tabular-nums">{r.time}</TableCell>
|
|
2374
|
+
</TableRow>
|
|
2375
|
+
))}
|
|
2376
|
+
</TableBody>
|
|
2377
|
+
<TableFooter>
|
|
2378
|
+
<TableRow>
|
|
2379
|
+
<TableCell colSpan={3}>Heat average</TableCell>
|
|
2380
|
+
<TableCell className="text-right font-mono tabular-nums">53.15</TableCell>
|
|
2381
|
+
</TableRow>
|
|
2382
|
+
</TableFooter>
|
|
2383
|
+
</Table>
|
|
2384
|
+
</Section>
|
|
2385
|
+
|
|
2386
|
+
<Section title="Calendar">
|
|
2387
|
+
<div className="flex flex-wrap gap-6">
|
|
2388
|
+
<CalendarShowcase />
|
|
2389
|
+
</div>
|
|
2390
|
+
</Section>
|
|
2391
|
+
|
|
2392
|
+
<Section title="Select">
|
|
2393
|
+
<div className="grid gap-6 sm:grid-cols-2">
|
|
2394
|
+
<div className="space-y-2">
|
|
2395
|
+
<Label htmlFor="select-squad">Squad</Label>
|
|
2396
|
+
<Select defaultValue="senior-a">
|
|
2397
|
+
<SelectTrigger id="select-squad" className="w-full">
|
|
2398
|
+
<SelectValue placeholder="Choose a squad" />
|
|
2399
|
+
</SelectTrigger>
|
|
2400
|
+
<SelectContent>
|
|
2401
|
+
<SelectGroup>
|
|
2402
|
+
<SelectLabel>Senior</SelectLabel>
|
|
2403
|
+
<SelectItem value="senior-a">Senior A</SelectItem>
|
|
2404
|
+
<SelectItem value="senior-b">Senior B</SelectItem>
|
|
2405
|
+
</SelectGroup>
|
|
2406
|
+
<SelectGroup>
|
|
2407
|
+
<SelectLabel>Age group</SelectLabel>
|
|
2408
|
+
<SelectItem value="junior-a">Junior A</SelectItem>
|
|
2409
|
+
<SelectItem value="junior-b">Junior B</SelectItem>
|
|
2410
|
+
<SelectItem value="dev" disabled>Development (full)</SelectItem>
|
|
2411
|
+
</SelectGroup>
|
|
2412
|
+
</SelectContent>
|
|
2413
|
+
</Select>
|
|
2414
|
+
</div>
|
|
2415
|
+
<div className="space-y-2">
|
|
2416
|
+
<Label htmlFor="select-stroke">Stroke (disabled)</Label>
|
|
2417
|
+
<Select disabled>
|
|
2418
|
+
<SelectTrigger id="select-stroke" className="w-full">
|
|
2419
|
+
<SelectValue placeholder="Locked for this event" />
|
|
2420
|
+
</SelectTrigger>
|
|
2421
|
+
<SelectContent>
|
|
2422
|
+
<SelectItem value="free">Freestyle</SelectItem>
|
|
2423
|
+
</SelectContent>
|
|
2424
|
+
</Select>
|
|
2425
|
+
</div>
|
|
2426
|
+
</div>
|
|
2427
|
+
</Section>
|
|
2428
|
+
|
|
2429
|
+
<Section title="Textarea">
|
|
2430
|
+
<div className="grid gap-6 sm:grid-cols-2">
|
|
2431
|
+
<div className="space-y-2">
|
|
2432
|
+
<Label htmlFor="ta-notes">Coach notes</Label>
|
|
2433
|
+
<Textarea id="ta-notes" placeholder="Add notes for this swimmer…" />
|
|
2434
|
+
</div>
|
|
2435
|
+
<div className="space-y-2">
|
|
2436
|
+
<Label htmlFor="ta-filled">With value</Label>
|
|
2437
|
+
<Textarea
|
|
2438
|
+
id="ta-filled"
|
|
2439
|
+
defaultValue={"Strong back half. Work on streamline off the wall and breakout timing."}
|
|
2440
|
+
/>
|
|
2441
|
+
</div>
|
|
2442
|
+
<div className="space-y-2">
|
|
2443
|
+
<Label htmlFor="ta-disabled">Disabled</Label>
|
|
2444
|
+
<Textarea id="ta-disabled" disabled placeholder="Locked during the meet" />
|
|
2445
|
+
</div>
|
|
2446
|
+
<div className="space-y-2">
|
|
2447
|
+
<Label htmlFor="ta-invalid">Invalid</Label>
|
|
2448
|
+
<Textarea id="ta-invalid" aria-invalid defaultValue="Too short" />
|
|
2449
|
+
</div>
|
|
2450
|
+
</div>
|
|
2451
|
+
</Section>
|
|
2452
|
+
|
|
2453
|
+
<Section title="Toggle & Toggle Group">
|
|
2454
|
+
<div className="space-y-6">
|
|
2455
|
+
<div className="space-y-3">
|
|
2456
|
+
<p className="text-sm font-medium text-muted-foreground">Toggle — standalone</p>
|
|
2457
|
+
<div className="flex items-center gap-3">
|
|
2458
|
+
<Toggle aria-label="Bold" defaultPressed><BoldIcon className="size-4" strokeWidth={1.5} /></Toggle>
|
|
2459
|
+
<Toggle aria-label="Italic"><ItalicIcon className="size-4" strokeWidth={1.5} /></Toggle>
|
|
2460
|
+
<Toggle aria-label="Underline" variant="outline"><UnderlineIcon className="size-4" strokeWidth={1.5} /></Toggle>
|
|
2461
|
+
<Toggle aria-label="Bold disabled" disabled><BoldIcon className="size-4" strokeWidth={1.5} /></Toggle>
|
|
2462
|
+
</div>
|
|
2463
|
+
</div>
|
|
2464
|
+
<div className="space-y-3">
|
|
2465
|
+
<p className="text-sm font-medium text-muted-foreground">Toggle group — single select (alignment)</p>
|
|
2466
|
+
<ToggleGroup type="single" defaultValue="left" variant="outline" aria-label="Text alignment">
|
|
2467
|
+
<ToggleGroupItem value="left" aria-label="Align left"><AlignLeftIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2468
|
+
<ToggleGroupItem value="center" aria-label="Align center"><AlignCenterIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2469
|
+
<ToggleGroupItem value="right" aria-label="Align right"><AlignRightIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2470
|
+
</ToggleGroup>
|
|
2471
|
+
</div>
|
|
2472
|
+
<div className="space-y-3">
|
|
2473
|
+
<p className="text-sm font-medium text-muted-foreground">Toggle group — multiple select (formatting)</p>
|
|
2474
|
+
<ToggleGroup type="multiple" defaultValue={["bold"]} variant="outline" aria-label="Text formatting">
|
|
2475
|
+
<ToggleGroupItem value="bold" aria-label="Bold"><BoldIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2476
|
+
<ToggleGroupItem value="italic" aria-label="Italic"><ItalicIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2477
|
+
<ToggleGroupItem value="underline" aria-label="Underline"><UnderlineIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2478
|
+
</ToggleGroup>
|
|
2479
|
+
</div>
|
|
2480
|
+
</div>
|
|
2481
|
+
</Section>
|
|
2482
|
+
|
|
2483
|
+
<Section title="Popover">
|
|
2484
|
+
<div className="flex flex-wrap gap-3">
|
|
2485
|
+
<Popover>
|
|
2486
|
+
<PopoverTrigger asChild>
|
|
2487
|
+
<Button variant="outline">Lane settings</Button>
|
|
2488
|
+
</PopoverTrigger>
|
|
2489
|
+
<PopoverContent className="w-72">
|
|
2490
|
+
<div className="space-y-3">
|
|
2491
|
+
<div className="space-y-1">
|
|
2492
|
+
<p className="text-sm font-semibold">Lane settings</p>
|
|
2493
|
+
<p className="text-xs text-muted-foreground">Applies to this heat only.</p>
|
|
2494
|
+
</div>
|
|
2495
|
+
<div className="flex items-center justify-between">
|
|
2496
|
+
<Label htmlFor="pop-pace">Pace clock</Label>
|
|
2497
|
+
<Switch id="pop-pace" defaultChecked />
|
|
2498
|
+
</div>
|
|
2499
|
+
<div className="space-y-1.5">
|
|
2500
|
+
<Label htmlFor="pop-lanes">Lanes</Label>
|
|
2501
|
+
<Input id="pop-lanes" defaultValue="8" />
|
|
2502
|
+
</div>
|
|
2503
|
+
</div>
|
|
2504
|
+
</PopoverContent>
|
|
2505
|
+
</Popover>
|
|
2506
|
+
</div>
|
|
2507
|
+
</Section>
|
|
2508
|
+
|
|
2509
|
+
<Section title="Tooltip">
|
|
2510
|
+
<TooltipProvider>
|
|
2511
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
2512
|
+
<Tooltip>
|
|
2513
|
+
<TooltipTrigger asChild>
|
|
2514
|
+
<Button variant="outline">Seed time</Button>
|
|
2515
|
+
</TooltipTrigger>
|
|
2516
|
+
<TooltipContent>52.18 — submitted Jun 20</TooltipContent>
|
|
2517
|
+
</Tooltip>
|
|
2518
|
+
<Tooltip>
|
|
2519
|
+
<TooltipTrigger asChild>
|
|
2520
|
+
<Button variant="outline">Status</Button>
|
|
2521
|
+
</TooltipTrigger>
|
|
2522
|
+
<TooltipContent side="right">Unofficial until ratified</TooltipContent>
|
|
2523
|
+
</Tooltip>
|
|
2524
|
+
</div>
|
|
2525
|
+
</TooltipProvider>
|
|
2526
|
+
</Section>
|
|
2527
|
+
|
|
2528
|
+
<Section title="Dropdown Menu">
|
|
2529
|
+
<DropdownMenu>
|
|
2530
|
+
<DropdownMenuTrigger asChild>
|
|
2531
|
+
<Button variant="outline" className="gap-2">
|
|
2532
|
+
Actions <MoreHorizontal className="size-4" strokeWidth={1.5} />
|
|
2533
|
+
</Button>
|
|
2534
|
+
</DropdownMenuTrigger>
|
|
2535
|
+
<DropdownMenuContent align="start" className="w-56">
|
|
2536
|
+
<DropdownMenuLabel>Heat 4 · Lane 4</DropdownMenuLabel>
|
|
2537
|
+
<DropdownMenuSeparator />
|
|
2538
|
+
<DropdownMenuItem>
|
|
2539
|
+
Edit seed time <DropdownMenuShortcut>⌘E</DropdownMenuShortcut>
|
|
2540
|
+
</DropdownMenuItem>
|
|
2541
|
+
<DropdownMenuItem>Move to heat…</DropdownMenuItem>
|
|
2542
|
+
<DropdownMenuSeparator />
|
|
2543
|
+
<DropdownMenuLabel>Display</DropdownMenuLabel>
|
|
2544
|
+
<DropdownMenuCheckboxItem checked>Show splits</DropdownMenuCheckboxItem>
|
|
2545
|
+
<DropdownMenuCheckboxItem>Show reaction time</DropdownMenuCheckboxItem>
|
|
2546
|
+
<DropdownMenuSeparator />
|
|
2547
|
+
<DropdownMenuRadioGroup value="time">
|
|
2548
|
+
<DropdownMenuRadioItem value="time">Sort by time</DropdownMenuRadioItem>
|
|
2549
|
+
<DropdownMenuRadioItem value="name">Sort by name</DropdownMenuRadioItem>
|
|
2550
|
+
</DropdownMenuRadioGroup>
|
|
2551
|
+
<DropdownMenuSeparator />
|
|
2552
|
+
<DropdownMenuItem variant="destructive">Scratch swimmer</DropdownMenuItem>
|
|
2553
|
+
</DropdownMenuContent>
|
|
2554
|
+
</DropdownMenu>
|
|
2555
|
+
</Section>
|
|
2556
|
+
|
|
2557
|
+
<Section title="Command">
|
|
2558
|
+
<p className="text-sm text-muted-foreground">
|
|
2559
|
+
The command primitive (cmdk) as an inline menu. BADS treats it as a
|
|
2560
|
+
power-user accelerator on top of a designed search surface, not the
|
|
2561
|
+
default search affordance.
|
|
2562
|
+
</p>
|
|
2563
|
+
<Command className="max-w-md rounded-lg border shadow-sm">
|
|
2564
|
+
<CommandInput placeholder="Type a command or search…" />
|
|
2565
|
+
<CommandList>
|
|
2566
|
+
<CommandEmpty>No results found.</CommandEmpty>
|
|
2567
|
+
<CommandGroup heading="Sessions">
|
|
2568
|
+
<CommandItem>
|
|
2569
|
+
Practice today <CommandShortcut>⌘1</CommandShortcut>
|
|
2570
|
+
</CommandItem>
|
|
2571
|
+
<CommandItem>Upcoming meets</CommandItem>
|
|
2572
|
+
<CommandItem>Attendance</CommandItem>
|
|
2573
|
+
</CommandGroup>
|
|
2574
|
+
<CommandSeparator />
|
|
2575
|
+
<CommandGroup heading="Swimmers">
|
|
2576
|
+
<CommandItem>Avery Castillo</CommandItem>
|
|
2577
|
+
<CommandItem>Noah Kim</CommandItem>
|
|
2578
|
+
<CommandItem>Priya Raman</CommandItem>
|
|
2579
|
+
</CommandGroup>
|
|
2580
|
+
</CommandList>
|
|
2581
|
+
</Command>
|
|
2582
|
+
</Section>
|
|
2583
|
+
|
|
2584
|
+
<Section title="Sheet">
|
|
2585
|
+
<div className="flex flex-wrap gap-3">
|
|
2586
|
+
{(["right", "left", "top", "bottom"] as const).map((side) => (
|
|
2587
|
+
<Sheet key={side}>
|
|
2588
|
+
<SheetTrigger asChild>
|
|
2589
|
+
<Button variant="outline">From {side}</Button>
|
|
2590
|
+
</SheetTrigger>
|
|
2591
|
+
<SheetContent side={side}>
|
|
2592
|
+
<SheetHeader>
|
|
2593
|
+
<SheetTitle>Heat details</SheetTitle>
|
|
2594
|
+
<SheetDescription>
|
|
2595
|
+
Edit lane assignments and seed times for Heat 4.
|
|
2596
|
+
</SheetDescription>
|
|
2597
|
+
</SheetHeader>
|
|
2598
|
+
<div className="flex flex-col gap-4 px-4">
|
|
2599
|
+
<div className="space-y-1.5">
|
|
2600
|
+
<Label htmlFor={`sheet-seed-${side}`}>Seed time</Label>
|
|
2601
|
+
<Input id={`sheet-seed-${side}`} defaultValue="52.18" />
|
|
2602
|
+
</div>
|
|
2603
|
+
<div className="space-y-1.5">
|
|
2604
|
+
<Label htmlFor={`sheet-lane-${side}`}>Lane</Label>
|
|
2605
|
+
<Input id={`sheet-lane-${side}`} defaultValue="4" />
|
|
2606
|
+
</div>
|
|
2607
|
+
</div>
|
|
2608
|
+
<SheetFooter className="flex-row justify-end gap-2">
|
|
2609
|
+
<SheetClose asChild><Button variant="ghost">Cancel</Button></SheetClose>
|
|
2610
|
+
<SheetClose asChild><Button>Save</Button></SheetClose>
|
|
2611
|
+
</SheetFooter>
|
|
2612
|
+
</SheetContent>
|
|
2613
|
+
</Sheet>
|
|
2614
|
+
))}
|
|
2615
|
+
</div>
|
|
2616
|
+
</Section>
|
|
2617
|
+
|
|
2618
|
+
<Section title="Tree View">
|
|
2619
|
+
<div className="flex flex-wrap gap-6 items-start">
|
|
2620
|
+
<div className="w-60">
|
|
2621
|
+
<p className="mb-2 text-xs font-medium text-muted-foreground">Default</p>
|
|
2622
|
+
<Tree defaultExpanded={["docs"]}>
|
|
2623
|
+
<TreeItem id="src">
|
|
2624
|
+
<TreeItemTrigger>src</TreeItemTrigger>
|
|
2625
|
+
<TreeItemContent>
|
|
2626
|
+
<TreeItem id="components">
|
|
2627
|
+
<TreeItemTrigger>components</TreeItemTrigger>
|
|
2628
|
+
<TreeItemContent>
|
|
2629
|
+
<TreeItem id="button"><TreeItemTrigger>Button.tsx</TreeItemTrigger></TreeItem>
|
|
2630
|
+
<TreeItem id="input"><TreeItemTrigger>Input.tsx</TreeItemTrigger></TreeItem>
|
|
2631
|
+
</TreeItemContent>
|
|
2632
|
+
</TreeItem>
|
|
2633
|
+
<TreeItem id="pages">
|
|
2634
|
+
<TreeItemTrigger>pages</TreeItemTrigger>
|
|
2635
|
+
<TreeItemContent>
|
|
2636
|
+
<TreeItem id="index"><TreeItemTrigger>index.tsx</TreeItemTrigger></TreeItem>
|
|
2637
|
+
</TreeItemContent>
|
|
2638
|
+
</TreeItem>
|
|
2639
|
+
</TreeItemContent>
|
|
2640
|
+
</TreeItem>
|
|
2641
|
+
<TreeItem id="docs">
|
|
2642
|
+
<TreeItemTrigger>docs</TreeItemTrigger>
|
|
2643
|
+
<TreeItemContent>
|
|
2644
|
+
<TreeItem id="readme"><TreeItemTrigger>README.md</TreeItemTrigger></TreeItem>
|
|
2645
|
+
</TreeItemContent>
|
|
2646
|
+
</TreeItem>
|
|
2647
|
+
<TreeItem id="pkg"><TreeItemTrigger>package.json</TreeItemTrigger></TreeItem>
|
|
2648
|
+
</Tree>
|
|
2649
|
+
</div>
|
|
2650
|
+
<div className="w-64">
|
|
2651
|
+
<p className="mb-2 text-xs font-medium text-muted-foreground">With icons</p>
|
|
2652
|
+
<Tree defaultExpanded={["project", "assets"]}>
|
|
2653
|
+
<TreeItem id="project">
|
|
2654
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>Project</TreeItemTrigger>
|
|
2655
|
+
<TreeItemContent>
|
|
2656
|
+
<TreeItem id="assets">
|
|
2657
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>Assets</TreeItemTrigger>
|
|
2658
|
+
<TreeItemContent>
|
|
2659
|
+
<TreeItem id="logo"><TreeItemTrigger icon={<File strokeWidth={1.5} />}>logo.svg</TreeItemTrigger></TreeItem>
|
|
2660
|
+
<TreeItem id="notes"><TreeItemTrigger icon={<FileText strokeWidth={1.5} />}>notes.md</TreeItemTrigger></TreeItem>
|
|
2661
|
+
</TreeItemContent>
|
|
2662
|
+
</TreeItem>
|
|
2663
|
+
<TreeItem id="cfg"><TreeItemTrigger icon={<SettingsIcon strokeWidth={1.5} />}>config.json</TreeItemTrigger></TreeItem>
|
|
2664
|
+
</TreeItemContent>
|
|
2665
|
+
</TreeItem>
|
|
2666
|
+
</Tree>
|
|
2667
|
+
</div>
|
|
2668
|
+
<Card className="w-72 p-3">
|
|
2669
|
+
<p className="mb-2 px-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground">BADS Design System</p>
|
|
2670
|
+
<Tree defaultExpanded={["layer-1"]} aria-label="BADS file browser">
|
|
2671
|
+
<TreeItem id="layer-1">
|
|
2672
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>layer-1-foundation</TreeItemTrigger>
|
|
2673
|
+
<TreeItemContent>
|
|
2674
|
+
<TreeItem id="manifest"><TreeItemTrigger icon={<File strokeWidth={1.5} />}>manifest.json</TreeItemTrigger></TreeItem>
|
|
2675
|
+
<TreeItem id="voice"><TreeItemTrigger icon={<FileText strokeWidth={1.5} />}>voice-and-tone.md</TreeItemTrigger></TreeItem>
|
|
2676
|
+
<TreeItem id="personas"><TreeItemTrigger icon={<FileText strokeWidth={1.5} />}>personas.md</TreeItemTrigger></TreeItem>
|
|
2677
|
+
</TreeItemContent>
|
|
2678
|
+
</TreeItem>
|
|
2679
|
+
<TreeItem id="layer-5">
|
|
2680
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>layer-5-component-registry</TreeItemTrigger>
|
|
2681
|
+
<TreeItemContent>
|
|
2682
|
+
<TreeItem id="registry"><TreeItemTrigger icon={<File strokeWidth={1.5} />}>component-registry.json</TreeItemTrigger></TreeItem>
|
|
2683
|
+
</TreeItemContent>
|
|
2684
|
+
</TreeItem>
|
|
2685
|
+
<TreeItem id="packages">
|
|
2686
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>packages</TreeItemTrigger>
|
|
2687
|
+
<TreeItemContent>
|
|
2688
|
+
<TreeItem id="core-dir">
|
|
2689
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>core</TreeItemTrigger>
|
|
2690
|
+
<TreeItemContent>
|
|
2691
|
+
<TreeItem id="tokens"><TreeItemTrigger icon={<File strokeWidth={1.5} />}>tokens.json</TreeItemTrigger></TreeItem>
|
|
2692
|
+
</TreeItemContent>
|
|
2693
|
+
</TreeItem>
|
|
2694
|
+
</TreeItemContent>
|
|
2695
|
+
</TreeItem>
|
|
2696
|
+
<TreeItem id="claude-md"><TreeItemTrigger icon={<FileText strokeWidth={1.5} />}>CLAUDE.md</TreeItemTrigger></TreeItem>
|
|
2697
|
+
</Tree>
|
|
2698
|
+
</Card>
|
|
2699
|
+
</div>
|
|
2700
|
+
</Section>
|
|
2701
|
+
|
|
2702
|
+
<Section title="List">
|
|
2703
|
+
<div className="flex flex-wrap gap-8 items-start">
|
|
2704
|
+
<div className="space-y-1.5">
|
|
2705
|
+
<p className="text-xs font-medium text-muted-foreground">Default (unordered)</p>
|
|
2706
|
+
<List className="w-64">
|
|
2707
|
+
<ListItem>Practice every Monday at 6 AM</ListItem>
|
|
2708
|
+
<ListItem>Check the coach board for lane assignments</ListItem>
|
|
2709
|
+
<ListItem>Bring your own cap and goggles</ListItem>
|
|
2710
|
+
<ListItem>Sign in at the front desk before entering the pool</ListItem>
|
|
2711
|
+
</List>
|
|
2712
|
+
</div>
|
|
2713
|
+
<div className="space-y-1.5">
|
|
2714
|
+
<p className="text-xs font-medium text-muted-foreground">With icons</p>
|
|
2715
|
+
<List className="w-64">
|
|
2716
|
+
<ListItem icon={<CheckIcon />}>Pool access included</ListItem>
|
|
2717
|
+
<ListItem icon={<CheckIcon />}>Video stroke analysis</ListItem>
|
|
2718
|
+
<ListItem icon={<CheckIcon />}>Monthly progress report</ListItem>
|
|
2719
|
+
<ListItem icon={<XIcon className="text-destructive" />}>Open swim excluded</ListItem>
|
|
2720
|
+
</List>
|
|
2721
|
+
</div>
|
|
2722
|
+
<div className="space-y-1.5">
|
|
2723
|
+
<p className="text-xs font-medium text-muted-foreground">Spacing variants</p>
|
|
2724
|
+
<div className="space-y-4">
|
|
2725
|
+
<List spacing="sm" className="w-48">
|
|
2726
|
+
<ListItem icon={<ZapIcon />}>sm — gap-1</ListItem>
|
|
2727
|
+
<ListItem icon={<ZapIcon />}>Fast warm-up</ListItem>
|
|
2728
|
+
<ListItem icon={<ZapIcon />}>Main set</ListItem>
|
|
2729
|
+
</List>
|
|
2730
|
+
<List spacing="lg" className="w-48">
|
|
2731
|
+
<ListItem icon={<StarIcon />}>lg — gap-3</ListItem>
|
|
2732
|
+
<ListItem icon={<StarIcon />}>Content-heavy</ListItem>
|
|
2733
|
+
<ListItem icon={<StarIcon />}>More breathing room</ListItem>
|
|
2734
|
+
</List>
|
|
2735
|
+
</div>
|
|
2736
|
+
</div>
|
|
2737
|
+
<div className="space-y-1.5">
|
|
2738
|
+
<p className="text-xs font-medium text-muted-foreground">Realistic use — membership card</p>
|
|
2739
|
+
<Card className="w-72">
|
|
2740
|
+
<CardContent className="p-5 space-y-4">
|
|
2741
|
+
<div>
|
|
2742
|
+
<h3 className="text-sm font-semibold">Premier Membership includes</h3>
|
|
2743
|
+
<p className="text-xs text-muted-foreground mt-0.5">Everything in Standard, plus:</p>
|
|
2744
|
+
</div>
|
|
2745
|
+
<List spacing="sm">
|
|
2746
|
+
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>Unlimited pool access, all sessions</ListItem>
|
|
2747
|
+
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>Personal stroke video review (monthly)</ListItem>
|
|
2748
|
+
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>Priority meet registration</ListItem>
|
|
2749
|
+
<ListItem icon={<XIcon className="text-muted-foreground" />}>
|
|
2750
|
+
<span className="text-muted-foreground">Guest passes not included</span>
|
|
2751
|
+
</ListItem>
|
|
2752
|
+
</List>
|
|
2753
|
+
</CardContent>
|
|
2754
|
+
</Card>
|
|
2755
|
+
</div>
|
|
2756
|
+
</div>
|
|
2757
|
+
</Section>
|
|
2758
|
+
|
|
2759
|
+
<Section title="EmptyState">
|
|
2760
|
+
<div className="flex flex-wrap gap-8 items-start">
|
|
2761
|
+
<div className="space-y-1.5">
|
|
2762
|
+
<p className="text-xs font-medium text-muted-foreground">Default</p>
|
|
2763
|
+
<EmptyState className="w-72 border border-border rounded-lg">
|
|
2764
|
+
<EmptyStateIcon>
|
|
2765
|
+
<InboxIcon strokeWidth={1.5} />
|
|
2766
|
+
</EmptyStateIcon>
|
|
2767
|
+
<EmptyStateTitle>No messages yet</EmptyStateTitle>
|
|
2768
|
+
<EmptyStateDescription>
|
|
2769
|
+
Messages from your coach will appear here after your first session.
|
|
2770
|
+
</EmptyStateDescription>
|
|
2771
|
+
</EmptyState>
|
|
2772
|
+
</div>
|
|
2773
|
+
<div className="space-y-1.5">
|
|
2774
|
+
<p className="text-xs font-medium text-muted-foreground">With action</p>
|
|
2775
|
+
<EmptyState className="w-72 border border-border rounded-lg">
|
|
2776
|
+
<EmptyStateIcon>
|
|
2777
|
+
<CalendarIcon strokeWidth={1.5} />
|
|
2778
|
+
</EmptyStateIcon>
|
|
2779
|
+
<EmptyStateTitle>No practices scheduled</EmptyStateTitle>
|
|
2780
|
+
<EmptyStateDescription>
|
|
2781
|
+
Add a practice block to start tracking attendance and yardage.
|
|
2782
|
+
</EmptyStateDescription>
|
|
2783
|
+
<EmptyStateAction>
|
|
2784
|
+
<Button size="sm">
|
|
2785
|
+
<PlusIcon strokeWidth={1.5} />
|
|
2786
|
+
Schedule practice
|
|
2787
|
+
</Button>
|
|
2788
|
+
</EmptyStateAction>
|
|
2789
|
+
</EmptyState>
|
|
2790
|
+
</div>
|
|
2791
|
+
<div className="space-y-1.5">
|
|
2792
|
+
<p className="text-xs font-medium text-muted-foreground">Error / destructive</p>
|
|
2793
|
+
<EmptyState className="w-72 border border-border rounded-lg">
|
|
2794
|
+
<EmptyStateIcon className="bg-destructive/10 text-destructive">
|
|
2795
|
+
<WifiOffIcon strokeWidth={1.5} />
|
|
2796
|
+
</EmptyStateIcon>
|
|
2797
|
+
<EmptyStateTitle>Couldn't load roster</EmptyStateTitle>
|
|
2798
|
+
<EmptyStateDescription>
|
|
2799
|
+
Check your connection and try again. Your data is safe.
|
|
2800
|
+
</EmptyStateDescription>
|
|
2801
|
+
<EmptyStateAction>
|
|
2802
|
+
<Button variant="outline" size="sm">Retry</Button>
|
|
2803
|
+
</EmptyStateAction>
|
|
2804
|
+
</EmptyState>
|
|
2805
|
+
</div>
|
|
2806
|
+
<div className="space-y-1.5">
|
|
2807
|
+
<p className="text-xs font-medium text-muted-foreground">sm — inline card</p>
|
|
2808
|
+
<EmptyState size="sm" className="w-56 border border-border rounded-lg">
|
|
2809
|
+
<EmptyStateIcon className="size-9 [&>svg]:size-5">
|
|
2810
|
+
<ClipboardListIcon strokeWidth={1.5} />
|
|
2811
|
+
</EmptyStateIcon>
|
|
2812
|
+
<EmptyStateTitle>No notes yet</EmptyStateTitle>
|
|
2813
|
+
<EmptyStateDescription>Add a note to this set.</EmptyStateDescription>
|
|
2814
|
+
</EmptyState>
|
|
2815
|
+
</div>
|
|
2816
|
+
</div>
|
|
2817
|
+
</Section>
|
|
2818
|
+
|
|
2819
|
+
<Section title="Color Picker">
|
|
2820
|
+
<div className="flex flex-wrap gap-8 items-start">
|
|
2821
|
+
<div className="space-y-1.5">
|
|
2822
|
+
<p className="text-xs font-medium text-muted-foreground">Swatches</p>
|
|
2823
|
+
<ColorPicker
|
|
2824
|
+
swatches={[
|
|
2825
|
+
"#ef4444", "#f97316", "#eab308", "#22c55e",
|
|
2826
|
+
"#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899",
|
|
2827
|
+
"#64748b", "#1e293b",
|
|
2828
|
+
]}
|
|
2829
|
+
aria-label="Select a color"
|
|
2830
|
+
/>
|
|
2831
|
+
</div>
|
|
2832
|
+
<div className="space-y-1.5">
|
|
2833
|
+
<p className="text-xs font-medium text-muted-foreground">With custom hex input</p>
|
|
2834
|
+
<ColorPicker
|
|
2835
|
+
swatches={[
|
|
2836
|
+
"#ef4444", "#f97316", "#eab308", "#22c55e",
|
|
2837
|
+
"#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899",
|
|
2838
|
+
]}
|
|
2839
|
+
allowCustom
|
|
2840
|
+
defaultValue="#3b82f6"
|
|
2841
|
+
aria-label="Select or enter a color"
|
|
2842
|
+
/>
|
|
2843
|
+
</div>
|
|
2844
|
+
<div className="space-y-1.5">
|
|
2845
|
+
<p className="text-xs font-medium text-muted-foreground">Disabled</p>
|
|
2846
|
+
<ColorPicker
|
|
2847
|
+
swatches={[
|
|
2848
|
+
"#ef4444", "#f97316", "#eab308", "#22c55e",
|
|
2849
|
+
"#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899",
|
|
2850
|
+
]}
|
|
2851
|
+
defaultValue="#3b82f6"
|
|
2852
|
+
disabled
|
|
2853
|
+
aria-label="Color (disabled)"
|
|
2854
|
+
/>
|
|
2855
|
+
</div>
|
|
2856
|
+
</div>
|
|
2857
|
+
</Section>
|
|
1747
2858
|
</div>
|
|
1748
2859
|
</div>
|
|
1749
2860
|
);
|
|
@@ -1776,7 +2887,7 @@ function DatePickerScheduleForm() {
|
|
|
1776
2887
|
const [startDate, setStartDate] = React.useState<Date | undefined>(undefined);
|
|
1777
2888
|
const [endDate, setEndDate] = React.useState<Date | undefined>(undefined);
|
|
1778
2889
|
return (
|
|
1779
|
-
<
|
|
2890
|
+
<Card className="w-80"><CardContent className="p-4 space-y-4">
|
|
1780
2891
|
<div className="space-y-1">
|
|
1781
2892
|
<p className="text-sm font-semibold">Schedule practice block</p>
|
|
1782
2893
|
<p className="text-xs text-muted-foreground">
|
|
@@ -1809,7 +2920,7 @@ function DatePickerScheduleForm() {
|
|
|
1809
2920
|
<Button variant="outline" size="sm" className="min-h-11">Cancel</Button>
|
|
1810
2921
|
<Button size="sm" className="min-h-11">Schedule</Button>
|
|
1811
2922
|
</div>
|
|
1812
|
-
</
|
|
2923
|
+
</CardContent></Card>
|
|
1813
2924
|
);
|
|
1814
2925
|
}
|
|
1815
2926
|
|
|
@@ -1936,7 +3047,7 @@ function RatingGroupFeedbackDemo() {
|
|
|
1936
3047
|
const [submitted, setSubmitted] = React.useState(false);
|
|
1937
3048
|
const labels = ["", "Needs work", "Below average", "Average", "Good", "Excellent"];
|
|
1938
3049
|
return (
|
|
1939
|
-
<
|
|
3050
|
+
<Card className="w-72"><CardContent className="p-4 space-y-4">
|
|
1940
3051
|
<div className="space-y-1">
|
|
1941
3052
|
<p className="text-sm font-semibold">Rate your practice session</p>
|
|
1942
3053
|
<p className="text-xs text-muted-foreground">Breezy Hills Aquatic Club · Tuesday AM</p>
|
|
@@ -1964,7 +3075,7 @@ function RatingGroupFeedbackDemo() {
|
|
|
1964
3075
|
</Button>
|
|
1965
3076
|
</div>
|
|
1966
3077
|
)}
|
|
1967
|
-
</
|
|
3078
|
+
</CardContent></Card>
|
|
1968
3079
|
);
|
|
1969
3080
|
}
|
|
1970
3081
|
|