@behavioral-agentic-design-system/core 0.13.0 → 0.15.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 +989 -6
- package/src/components/ui/bottom-sheet.tsx +10 -1
- package/src/components/ui/carousel.tsx +1 -1
- package/src/components/ui/color-picker.tsx +219 -0
- package/src/components/ui/date-range-picker.tsx +174 -0
- package/src/components/ui/index.ts +6 -0
- package/src/components/ui/password-input.tsx +150 -0
- package/src/components/ui/segmented-control.tsx +213 -0
- package/src/components/ui/stepper.tsx +11 -3
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/tags-input.tsx +199 -0
- package/src/components/ui/time-picker.tsx +363 -0
- package/src/components/ui/timeline.tsx +171 -0
- package/src/components/ui/tree-view.tsx +405 -0
- package/src/data/docs-index.ts +1 -0
- package/src/lib/brand-mark-tone.ts +56 -2
|
@@ -80,6 +80,7 @@ import {
|
|
|
80
80
|
StepperSeparator,
|
|
81
81
|
} from "@behavioral-agentic-design-system/core/components/ui/stepper";
|
|
82
82
|
import { PinInput } from "@behavioral-agentic-design-system/core/components/ui/pin-input";
|
|
83
|
+
import { PasswordInput } from "@behavioral-agentic-design-system/core/components/ui/password-input";
|
|
83
84
|
import { NumberInput } from "@behavioral-agentic-design-system/core/components/ui/number-input";
|
|
84
85
|
import { FileUpload } from "@behavioral-agentic-design-system/core/components/ui/file-upload";
|
|
85
86
|
import { Spinner } from "@behavioral-agentic-design-system/core/components/ui/spinner";
|
|
@@ -149,11 +150,113 @@ import {
|
|
|
149
150
|
HoverCardDescription,
|
|
150
151
|
HoverCardTrigger,
|
|
151
152
|
} from "@behavioral-agentic-design-system/core/components/ui/hover-card";
|
|
152
|
-
import { Sparkles, Info, CircleAlert, CalendarIcon, BuildingIcon } from "lucide-react";
|
|
153
|
+
import { Sparkles, Info, CircleAlert, CalendarIcon, BuildingIcon, CheckIcon, CreditCardIcon, ClipboardCheckIcon, TrophyIcon, UserCheckIcon } from "lucide-react";
|
|
153
154
|
import { DatePicker } from "@behavioral-agentic-design-system/core/components/ui/date-picker";
|
|
155
|
+
import { DateRangePicker } from "@behavioral-agentic-design-system/core/components/ui/date-range-picker";
|
|
154
156
|
import { RatingGroup } from "@behavioral-agentic-design-system/core/components/ui/rating-group";
|
|
157
|
+
import { SegmentedControl, SegmentedControlItem } from "@behavioral-agentic-design-system/core/components/ui/segmented-control";
|
|
158
|
+
import { Timeline, TimelineItem } from "@behavioral-agentic-design-system/core/components/ui/timeline";
|
|
159
|
+
import { TagsInput } from "@behavioral-agentic-design-system/core/components/ui/tags-input";
|
|
160
|
+
import { TimePicker } from "@behavioral-agentic-design-system/core/components/ui/time-picker";
|
|
161
|
+
|
|
155
162
|
import { Toaster } from "@behavioral-agentic-design-system/core/components/ui/sonner";
|
|
156
163
|
import { toast } from "sonner";
|
|
164
|
+
import {
|
|
165
|
+
ChartConfig,
|
|
166
|
+
ChartContainer,
|
|
167
|
+
ChartTooltip,
|
|
168
|
+
ChartTooltipContent,
|
|
169
|
+
} from "@behavioral-agentic-design-system/core/components/ui/chart";
|
|
170
|
+
import {
|
|
171
|
+
Area,
|
|
172
|
+
AreaChart,
|
|
173
|
+
Bar,
|
|
174
|
+
BarChart,
|
|
175
|
+
CartesianGrid,
|
|
176
|
+
Line,
|
|
177
|
+
LineChart,
|
|
178
|
+
Pie,
|
|
179
|
+
PieChart,
|
|
180
|
+
XAxis,
|
|
181
|
+
Label as RLabel,
|
|
182
|
+
} from "recharts";
|
|
183
|
+
import {
|
|
184
|
+
Table,
|
|
185
|
+
TableBody,
|
|
186
|
+
TableCaption,
|
|
187
|
+
TableCell,
|
|
188
|
+
TableFooter,
|
|
189
|
+
TableHead,
|
|
190
|
+
TableHeader,
|
|
191
|
+
TableRow,
|
|
192
|
+
} from "@behavioral-agentic-design-system/core/components/ui/table";
|
|
193
|
+
import {
|
|
194
|
+
Select,
|
|
195
|
+
SelectContent,
|
|
196
|
+
SelectGroup,
|
|
197
|
+
SelectItem,
|
|
198
|
+
SelectLabel,
|
|
199
|
+
SelectTrigger,
|
|
200
|
+
SelectValue,
|
|
201
|
+
} from "@behavioral-agentic-design-system/core/components/ui/select";
|
|
202
|
+
import { Textarea } from "@behavioral-agentic-design-system/core/components/ui/textarea";
|
|
203
|
+
import { Calendar } from "@behavioral-agentic-design-system/core/components/ui/calendar";
|
|
204
|
+
import { Toggle } from "@behavioral-agentic-design-system/core/components/ui/toggle";
|
|
205
|
+
import {
|
|
206
|
+
ToggleGroup,
|
|
207
|
+
ToggleGroupItem,
|
|
208
|
+
} from "@behavioral-agentic-design-system/core/components/ui/toggle-group";
|
|
209
|
+
import {
|
|
210
|
+
Popover,
|
|
211
|
+
PopoverContent,
|
|
212
|
+
PopoverTrigger,
|
|
213
|
+
} from "@behavioral-agentic-design-system/core/components/ui/popover";
|
|
214
|
+
import {
|
|
215
|
+
Tooltip,
|
|
216
|
+
TooltipContent,
|
|
217
|
+
TooltipProvider,
|
|
218
|
+
TooltipTrigger,
|
|
219
|
+
} from "@behavioral-agentic-design-system/core/components/ui/tooltip";
|
|
220
|
+
import {
|
|
221
|
+
DropdownMenu,
|
|
222
|
+
DropdownMenuCheckboxItem,
|
|
223
|
+
DropdownMenuContent,
|
|
224
|
+
DropdownMenuItem,
|
|
225
|
+
DropdownMenuLabel,
|
|
226
|
+
DropdownMenuRadioGroup,
|
|
227
|
+
DropdownMenuRadioItem,
|
|
228
|
+
DropdownMenuSeparator,
|
|
229
|
+
DropdownMenuShortcut,
|
|
230
|
+
DropdownMenuTrigger,
|
|
231
|
+
} from "@behavioral-agentic-design-system/core/components/ui/dropdown-menu";
|
|
232
|
+
import {
|
|
233
|
+
Command,
|
|
234
|
+
CommandEmpty,
|
|
235
|
+
CommandGroup,
|
|
236
|
+
CommandInput,
|
|
237
|
+
CommandItem,
|
|
238
|
+
CommandList,
|
|
239
|
+
CommandSeparator,
|
|
240
|
+
CommandShortcut,
|
|
241
|
+
} from "@behavioral-agentic-design-system/core/components/ui/command";
|
|
242
|
+
import {
|
|
243
|
+
Sheet,
|
|
244
|
+
SheetClose,
|
|
245
|
+
SheetContent,
|
|
246
|
+
SheetDescription,
|
|
247
|
+
SheetFooter,
|
|
248
|
+
SheetHeader,
|
|
249
|
+
SheetTitle,
|
|
250
|
+
SheetTrigger,
|
|
251
|
+
} from "@behavioral-agentic-design-system/core/components/ui/sheet";
|
|
252
|
+
import { TrendingUp, MoreHorizontal, Folder, File, FileText, Settings as SettingsIcon, Users as UsersIcon } from "lucide-react";
|
|
253
|
+
import {
|
|
254
|
+
Tree,
|
|
255
|
+
TreeItem,
|
|
256
|
+
TreeItemTrigger,
|
|
257
|
+
TreeItemContent,
|
|
258
|
+
} from "@behavioral-agentic-design-system/core/components/ui/tree-view";
|
|
259
|
+
import { ColorPicker } from "@behavioral-agentic-design-system/core/components/ui/color-picker";
|
|
157
260
|
|
|
158
261
|
// Stable, deterministic data for ScrollArea — never use Math.random in
|
|
159
262
|
// SSR-rendered output, it causes hydration mismatches.
|
|
@@ -163,6 +266,61 @@ const SCROLL_ITEMS = Array.from({ length: 40 }, (_, i) => ({
|
|
|
163
266
|
meta: `entry-${i + 1}`,
|
|
164
267
|
}));
|
|
165
268
|
|
|
269
|
+
// Chart showcase data. Reuses the canonical sample datasets shipped in the
|
|
270
|
+
// cards + dashboard chart examples so the Components tab matches them 1:1.
|
|
271
|
+
const CHART_TREND_DATA = [
|
|
272
|
+
{ day: "Mon", today: 240, average: 400 },
|
|
273
|
+
{ day: "Tue", today: 139, average: 300 },
|
|
274
|
+
{ day: "Wed", today: 480, average: 200 },
|
|
275
|
+
{ day: "Thu", today: 390, average: 278 },
|
|
276
|
+
{ day: "Fri", today: 480, average: 189 },
|
|
277
|
+
{ day: "Sat", today: 380, average: 239 },
|
|
278
|
+
{ day: "Sun", today: 430, average: 349 },
|
|
279
|
+
];
|
|
280
|
+
|
|
281
|
+
const CHART_TREND_CONFIG = {
|
|
282
|
+
today: { label: "Today", color: "var(--chart-1)" },
|
|
283
|
+
average: { label: "Average", color: "var(--chart-2)" },
|
|
284
|
+
} satisfies ChartConfig;
|
|
285
|
+
|
|
286
|
+
const CHART_BROWSER_DATA = [
|
|
287
|
+
{ browser: "chrome", visitors: 275, fill: "var(--color-chrome)" },
|
|
288
|
+
{ browser: "safari", visitors: 200, fill: "var(--color-safari)" },
|
|
289
|
+
{ browser: "firefox", visitors: 187, fill: "var(--color-firefox)" },
|
|
290
|
+
{ browser: "edge", visitors: 173, fill: "var(--color-edge)" },
|
|
291
|
+
{ browser: "other", visitors: 90, fill: "var(--color-other)" },
|
|
292
|
+
];
|
|
293
|
+
|
|
294
|
+
const CHART_BROWSER_CONFIG = {
|
|
295
|
+
visitors: { label: "Visitors" },
|
|
296
|
+
chrome: { label: "Chrome", color: "var(--chart-1)" },
|
|
297
|
+
safari: { label: "Safari", color: "var(--chart-2)" },
|
|
298
|
+
firefox: { label: "Firefox", color: "var(--chart-3)" },
|
|
299
|
+
edge: { label: "Edge", color: "var(--chart-4)" },
|
|
300
|
+
other: { label: "Other", color: "var(--chart-5)" },
|
|
301
|
+
} satisfies ChartConfig;
|
|
302
|
+
|
|
303
|
+
const CHART_BROWSER_TOTAL = CHART_BROWSER_DATA.reduce(
|
|
304
|
+
(sum, d) => sum + d.visitors,
|
|
305
|
+
0
|
|
306
|
+
);
|
|
307
|
+
|
|
308
|
+
function CalendarShowcase() {
|
|
309
|
+
// Deterministic default — never new Date()/Math.random in SSR output.
|
|
310
|
+
const [date, setDate] = React.useState<Date | undefined>(
|
|
311
|
+
new Date("2026-06-25")
|
|
312
|
+
);
|
|
313
|
+
return (
|
|
314
|
+
<Calendar
|
|
315
|
+
mode="single"
|
|
316
|
+
selected={date}
|
|
317
|
+
onSelect={setDate}
|
|
318
|
+
defaultMonth={new Date("2026-06-01")}
|
|
319
|
+
className="rounded-md border"
|
|
320
|
+
/>
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
|
|
166
324
|
function Section({ title, children }: { title: string; children: React.ReactNode }) {
|
|
167
325
|
const id = title
|
|
168
326
|
.toLowerCase()
|
|
@@ -371,6 +529,47 @@ export default function ComponentsPreview() {
|
|
|
371
529
|
</div>
|
|
372
530
|
</Section>
|
|
373
531
|
|
|
532
|
+
<Section title="Password Input">
|
|
533
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
534
|
+
<div className="space-y-2">
|
|
535
|
+
<Label htmlFor="pw-sm">sm</Label>
|
|
536
|
+
<PasswordInput id="pw-sm" size="sm" placeholder="Small" />
|
|
537
|
+
</div>
|
|
538
|
+
<div className="space-y-2">
|
|
539
|
+
<Label htmlFor="pw-default">default</Label>
|
|
540
|
+
<PasswordInput id="pw-default" placeholder="Default" />
|
|
541
|
+
</div>
|
|
542
|
+
<div className="space-y-2">
|
|
543
|
+
<Label htmlFor="pw-lg">lg</Label>
|
|
544
|
+
<PasswordInput id="pw-lg" size="lg" placeholder="Large" />
|
|
545
|
+
</div>
|
|
546
|
+
<div className="space-y-2">
|
|
547
|
+
<Label htmlFor="pw-xl">xl</Label>
|
|
548
|
+
<PasswordInput id="pw-xl" size="xl" placeholder="Extra large" />
|
|
549
|
+
</div>
|
|
550
|
+
<div className="space-y-2">
|
|
551
|
+
<Label htmlFor="pw-disabled">Disabled</Label>
|
|
552
|
+
<PasswordInput id="pw-disabled" size="xl" disabled placeholder="Disabled" />
|
|
553
|
+
</div>
|
|
554
|
+
<div className="space-y-2">
|
|
555
|
+
<Label htmlFor="pw-invalid">Invalid</Label>
|
|
556
|
+
<PasswordInput id="pw-invalid" size="xl" aria-invalid placeholder="Invalid" />
|
|
557
|
+
</div>
|
|
558
|
+
</div>
|
|
559
|
+
<div className="w-80 space-y-1.5">
|
|
560
|
+
<Label htmlFor="pw-realistic">Current password</Label>
|
|
561
|
+
<PasswordInput
|
|
562
|
+
id="pw-realistic"
|
|
563
|
+
autoComplete="current-password"
|
|
564
|
+
size="xl"
|
|
565
|
+
placeholder="Enter your password"
|
|
566
|
+
/>
|
|
567
|
+
<p className="text-xs text-muted-foreground">
|
|
568
|
+
Click the eye icon to reveal.
|
|
569
|
+
</p>
|
|
570
|
+
</div>
|
|
571
|
+
</Section>
|
|
572
|
+
|
|
374
573
|
<Section title="Form controls">
|
|
375
574
|
<div className="flex flex-wrap items-center gap-6">
|
|
376
575
|
<div className="flex items-center gap-2">
|
|
@@ -583,6 +782,10 @@ export default function ComponentsPreview() {
|
|
|
583
782
|
</ScrollArea>
|
|
584
783
|
</Section>
|
|
585
784
|
|
|
785
|
+
<Section title="SegmentedControl">
|
|
786
|
+
<SegmentedControlShowcase />
|
|
787
|
+
</Section>
|
|
788
|
+
|
|
586
789
|
<Section title="BottomSheet">
|
|
587
790
|
<div className="flex flex-wrap gap-3">
|
|
588
791
|
{/* Default — grab handle + close button */}
|
|
@@ -1479,7 +1682,7 @@ export default function ComponentsPreview() {
|
|
|
1479
1682
|
</div>
|
|
1480
1683
|
<div className="space-y-2">
|
|
1481
1684
|
<p className="text-sm font-medium text-muted-foreground">Keyboard shortcuts list</p>
|
|
1482
|
-
<
|
|
1685
|
+
<Card className="w-[320px]"><CardContent className="p-4 space-y-2">
|
|
1483
1686
|
{[
|
|
1484
1687
|
{ keys: ["⌘", "K"], label: "Open command palette" },
|
|
1485
1688
|
{ keys: ["⌘", "Shift", "F"], label: "Search across files" },
|
|
@@ -1495,7 +1698,7 @@ export default function ComponentsPreview() {
|
|
|
1495
1698
|
</div>
|
|
1496
1699
|
</div>
|
|
1497
1700
|
))}
|
|
1498
|
-
</
|
|
1701
|
+
</CardContent></Card>
|
|
1499
1702
|
</div>
|
|
1500
1703
|
</div>
|
|
1501
1704
|
</Section>
|
|
@@ -1625,6 +1828,79 @@ export default function ComponentsPreview() {
|
|
|
1625
1828
|
</div>
|
|
1626
1829
|
</Section>
|
|
1627
1830
|
|
|
1831
|
+
<Section title="TimePicker">
|
|
1832
|
+
<div className="space-y-6">
|
|
1833
|
+
<div className="space-y-3">
|
|
1834
|
+
<p className="text-sm text-muted-foreground font-medium">Sizes</p>
|
|
1835
|
+
<div className="flex flex-col gap-3 max-w-xs">
|
|
1836
|
+
<TimePicker value="08:00" size="sm" />
|
|
1837
|
+
<TimePicker value="08:00" size="default" />
|
|
1838
|
+
<TimePicker value="08:00" size="lg" />
|
|
1839
|
+
</div>
|
|
1840
|
+
</div>
|
|
1841
|
+
<div className="space-y-3">
|
|
1842
|
+
<p className="text-sm text-muted-foreground font-medium">12-hour mode with clear</p>
|
|
1843
|
+
<div className="max-w-xs">
|
|
1844
|
+
<TimePicker value="14:30" hours12 clearable />
|
|
1845
|
+
</div>
|
|
1846
|
+
</div>
|
|
1847
|
+
<div className="space-y-3">
|
|
1848
|
+
<p className="text-sm text-muted-foreground font-medium">With seconds</p>
|
|
1849
|
+
<div className="max-w-xs">
|
|
1850
|
+
<TimePicker value="09:30:00" showSeconds clearable />
|
|
1851
|
+
</div>
|
|
1852
|
+
</div>
|
|
1853
|
+
<div className="space-y-3">
|
|
1854
|
+
<p className="text-sm text-muted-foreground font-medium">Disabled</p>
|
|
1855
|
+
<div className="max-w-xs">
|
|
1856
|
+
<TimePicker value="09:30" disabled />
|
|
1857
|
+
</div>
|
|
1858
|
+
</div>
|
|
1859
|
+
</div>
|
|
1860
|
+
</Section>
|
|
1861
|
+
|
|
1862
|
+
<Section title="DateRangePicker">
|
|
1863
|
+
<div className="space-y-6">
|
|
1864
|
+
<div className="space-y-3">
|
|
1865
|
+
<p className="text-sm font-medium text-muted-foreground">With range selected</p>
|
|
1866
|
+
<div className="max-w-md">
|
|
1867
|
+
<DateRangePicker
|
|
1868
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
1869
|
+
onValueChange={() => {}}
|
|
1870
|
+
clearable
|
|
1871
|
+
/>
|
|
1872
|
+
</div>
|
|
1873
|
+
</div>
|
|
1874
|
+
<div className="space-y-3">
|
|
1875
|
+
<p className="text-sm font-medium text-muted-foreground">Sizes</p>
|
|
1876
|
+
<div className="flex flex-col gap-3 max-w-md">
|
|
1877
|
+
<DateRangePicker
|
|
1878
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
1879
|
+
size="sm"
|
|
1880
|
+
/>
|
|
1881
|
+
<DateRangePicker
|
|
1882
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
1883
|
+
size="default"
|
|
1884
|
+
/>
|
|
1885
|
+
<DateRangePicker
|
|
1886
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
1887
|
+
size="lg"
|
|
1888
|
+
/>
|
|
1889
|
+
</div>
|
|
1890
|
+
</div>
|
|
1891
|
+
<div className="space-y-3">
|
|
1892
|
+
<p className="text-sm font-medium text-muted-foreground">Empty / Disabled</p>
|
|
1893
|
+
<div className="flex flex-col gap-3 max-w-md">
|
|
1894
|
+
<DateRangePicker />
|
|
1895
|
+
<DateRangePicker
|
|
1896
|
+
value={{ from: new Date(2026, 5, 1), to: new Date(2026, 5, 15) }}
|
|
1897
|
+
disabled
|
|
1898
|
+
/>
|
|
1899
|
+
</div>
|
|
1900
|
+
</div>
|
|
1901
|
+
</div>
|
|
1902
|
+
</Section>
|
|
1903
|
+
|
|
1628
1904
|
<Section title="Rating Group">
|
|
1629
1905
|
<div className="space-y-6">
|
|
1630
1906
|
<div className="space-y-3">
|
|
@@ -1653,6 +1929,560 @@ export default function ComponentsPreview() {
|
|
|
1653
1929
|
</div>
|
|
1654
1930
|
</div>
|
|
1655
1931
|
</Section>
|
|
1932
|
+
|
|
1933
|
+
<Section title="TagsInput">
|
|
1934
|
+
<div className="space-y-6">
|
|
1935
|
+
<div className="space-y-3">
|
|
1936
|
+
<p className="text-sm font-medium text-muted-foreground">Default — empty</p>
|
|
1937
|
+
<TagsInputShowcase placeholder="Add a tag…" />
|
|
1938
|
+
</div>
|
|
1939
|
+
<div className="space-y-3">
|
|
1940
|
+
<p className="text-sm font-medium text-muted-foreground">With initial tags</p>
|
|
1941
|
+
<TagsInputShowcase
|
|
1942
|
+
initialTags={["butterfly", "freestyle", "backstroke"]}
|
|
1943
|
+
placeholder="Add stroke…"
|
|
1944
|
+
/>
|
|
1945
|
+
</div>
|
|
1946
|
+
<div className="space-y-3">
|
|
1947
|
+
<p className="text-sm font-medium text-muted-foreground">Max tags (4)</p>
|
|
1948
|
+
<TagsInputShowcase
|
|
1949
|
+
initialTags={["warm-up", "main set"]}
|
|
1950
|
+
maxTags={4}
|
|
1951
|
+
placeholder="Add phase (max 4)…"
|
|
1952
|
+
/>
|
|
1953
|
+
</div>
|
|
1954
|
+
<div className="space-y-3">
|
|
1955
|
+
<p className="text-sm font-medium text-muted-foreground">Disabled</p>
|
|
1956
|
+
<TagsInputShowcase
|
|
1957
|
+
initialTags={["100m freestyle", "200m backstroke"]}
|
|
1958
|
+
disabled
|
|
1959
|
+
placeholder="Disabled"
|
|
1960
|
+
/>
|
|
1961
|
+
</div>
|
|
1962
|
+
<div className="space-y-3">
|
|
1963
|
+
<p className="text-sm font-medium text-muted-foreground">Realistic use — Breezy Hills Aquatic Club session filters</p>
|
|
1964
|
+
<TagsInputFilterDemo />
|
|
1965
|
+
</div>
|
|
1966
|
+
</div>
|
|
1967
|
+
</Section>
|
|
1968
|
+
|
|
1969
|
+
<Section title="Timeline">
|
|
1970
|
+
<div className="space-y-8">
|
|
1971
|
+
<div className="space-y-3">
|
|
1972
|
+
<p className="text-sm font-medium text-muted-foreground">Status variants</p>
|
|
1973
|
+
<Timeline>
|
|
1974
|
+
<TimelineItem status="complete" title="Complete" description="Step is done." time="Yesterday" />
|
|
1975
|
+
<TimelineItem status="active" title="Active" description="Currently in progress." time="Today" />
|
|
1976
|
+
<TimelineItem status="default" title="Default" description="No semantic status." />
|
|
1977
|
+
<TimelineItem status="pending" title="Pending" description="Not yet started." time="Next week" />
|
|
1978
|
+
</Timeline>
|
|
1979
|
+
</div>
|
|
1980
|
+
<div className="space-y-3">
|
|
1981
|
+
<p className="text-sm font-medium text-muted-foreground">With icons</p>
|
|
1982
|
+
<Timeline>
|
|
1983
|
+
<TimelineItem
|
|
1984
|
+
status="complete"
|
|
1985
|
+
icon={<CheckIcon className="size-3" strokeWidth={1.5} aria-hidden />}
|
|
1986
|
+
title="Registration confirmed"
|
|
1987
|
+
time="Jun 20"
|
|
1988
|
+
/>
|
|
1989
|
+
<TimelineItem
|
|
1990
|
+
status="complete"
|
|
1991
|
+
icon={<CreditCardIcon className="size-3" strokeWidth={1.5} aria-hidden />}
|
|
1992
|
+
title="Payment received"
|
|
1993
|
+
time="Jun 21"
|
|
1994
|
+
/>
|
|
1995
|
+
<TimelineItem
|
|
1996
|
+
status="active"
|
|
1997
|
+
title="Heat assignment"
|
|
1998
|
+
description="Times submitted to meet director"
|
|
1999
|
+
time="Jun 25 (today)"
|
|
2000
|
+
/>
|
|
2001
|
+
<TimelineItem
|
|
2002
|
+
status="pending"
|
|
2003
|
+
title="Meet day"
|
|
2004
|
+
description="Breezy Hills Aquatic Center"
|
|
2005
|
+
time="Jun 28"
|
|
2006
|
+
/>
|
|
2007
|
+
</Timeline>
|
|
2008
|
+
</div>
|
|
2009
|
+
<div className="space-y-3">
|
|
2010
|
+
<p className="text-sm font-medium text-muted-foreground">Realistic use — athlete registration journey</p>
|
|
2011
|
+
<TimelineRealisticDemo />
|
|
2012
|
+
</div>
|
|
2013
|
+
</div>
|
|
2014
|
+
</Section>
|
|
2015
|
+
|
|
2016
|
+
<Section title="Chart">
|
|
2017
|
+
<p className="text-sm text-muted-foreground">
|
|
2018
|
+
Recharts wrapped in{" "}
|
|
2019
|
+
<code className="font-mono text-xs">ChartContainer</code> — series
|
|
2020
|
+
colors come from the{" "}
|
|
2021
|
+
<code className="font-mono text-xs">--chart-1…5</code> tokens,
|
|
2022
|
+
tooltips are token-styled, and the entrance animation auto-disables
|
|
2023
|
+
under <code className="font-mono text-xs">prefers-reduced-motion</code>.
|
|
2024
|
+
</p>
|
|
2025
|
+
<div className="grid gap-6 sm:grid-cols-2">
|
|
2026
|
+
<div className="space-y-3">
|
|
2027
|
+
<p className="text-sm font-medium text-muted-foreground">Line</p>
|
|
2028
|
+
<ChartContainer config={CHART_TREND_CONFIG} className="h-[200px] w-full">
|
|
2029
|
+
<LineChart accessibilityLayer data={CHART_TREND_DATA} margin={{ top: 5, right: 10, left: 12, bottom: 0 }}>
|
|
2030
|
+
<CartesianGrid vertical={false} />
|
|
2031
|
+
<XAxis dataKey="day" tickLine={false} axisLine={false} tickMargin={8} />
|
|
2032
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
2033
|
+
<Line type="monotone" dataKey="today" stroke="var(--color-today)" strokeWidth={2} dot={{ fill: "var(--color-today)" }} activeDot={{ r: 5 }} />
|
|
2034
|
+
<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 }} />
|
|
2035
|
+
</LineChart>
|
|
2036
|
+
</ChartContainer>
|
|
2037
|
+
</div>
|
|
2038
|
+
<div className="space-y-3">
|
|
2039
|
+
<p className="text-sm font-medium text-muted-foreground">Area</p>
|
|
2040
|
+
<ChartContainer config={CHART_TREND_CONFIG} className="h-[200px] w-full">
|
|
2041
|
+
<AreaChart accessibilityLayer data={CHART_TREND_DATA} margin={{ top: 5, right: 10, left: 12, bottom: 0 }}>
|
|
2042
|
+
<CartesianGrid vertical={false} />
|
|
2043
|
+
<XAxis dataKey="day" tickLine={false} axisLine={false} tickMargin={8} />
|
|
2044
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
2045
|
+
<Area type="monotone" dataKey="average" stroke="var(--color-average)" fill="var(--color-average)" fillOpacity={0.1} strokeWidth={2} />
|
|
2046
|
+
<Area type="monotone" dataKey="today" stroke="var(--color-today)" fill="var(--color-today)" fillOpacity={0.12} strokeWidth={2} />
|
|
2047
|
+
</AreaChart>
|
|
2048
|
+
</ChartContainer>
|
|
2049
|
+
</div>
|
|
2050
|
+
<div className="space-y-3">
|
|
2051
|
+
<p className="text-sm font-medium text-muted-foreground">Bar</p>
|
|
2052
|
+
<ChartContainer config={CHART_BROWSER_CONFIG} className="h-[200px] w-full">
|
|
2053
|
+
<BarChart accessibilityLayer data={CHART_BROWSER_DATA} margin={{ top: 5, right: 10, left: 0, bottom: 0 }}>
|
|
2054
|
+
<CartesianGrid vertical={false} />
|
|
2055
|
+
<XAxis
|
|
2056
|
+
dataKey="browser"
|
|
2057
|
+
tickLine={false}
|
|
2058
|
+
axisLine={false}
|
|
2059
|
+
tickMargin={8}
|
|
2060
|
+
tickFormatter={(v) => CHART_BROWSER_CONFIG[v as keyof typeof CHART_BROWSER_CONFIG]?.label as string}
|
|
2061
|
+
/>
|
|
2062
|
+
<ChartTooltip cursor={false} content={<ChartTooltipContent hideLabel />} />
|
|
2063
|
+
<Bar dataKey="visitors" radius={6} />
|
|
2064
|
+
</BarChart>
|
|
2065
|
+
</ChartContainer>
|
|
2066
|
+
</div>
|
|
2067
|
+
<div className="space-y-3">
|
|
2068
|
+
<p className="text-sm font-medium text-muted-foreground">Pie (donut)</p>
|
|
2069
|
+
<ChartContainer config={CHART_BROWSER_CONFIG} className="mx-auto aspect-square h-[200px]">
|
|
2070
|
+
<PieChart>
|
|
2071
|
+
<ChartTooltip cursor={false} content={<ChartTooltipContent hideLabel />} />
|
|
2072
|
+
<Pie data={CHART_BROWSER_DATA} dataKey="visitors" nameKey="browser" innerRadius={50} strokeWidth={5}>
|
|
2073
|
+
<RLabel
|
|
2074
|
+
content={({ viewBox }) => {
|
|
2075
|
+
if (viewBox && "cx" in viewBox && "cy" in viewBox) {
|
|
2076
|
+
return (
|
|
2077
|
+
<text x={viewBox.cx} y={viewBox.cy} textAnchor="middle" dominantBaseline="middle">
|
|
2078
|
+
<tspan x={viewBox.cx} y={viewBox.cy} className="fill-foreground text-2xl font-bold">
|
|
2079
|
+
{CHART_BROWSER_TOTAL.toLocaleString()}
|
|
2080
|
+
</tspan>
|
|
2081
|
+
<tspan x={viewBox.cx} y={(viewBox.cy || 0) + 20} className="fill-muted-foreground">
|
|
2082
|
+
Visitors
|
|
2083
|
+
</tspan>
|
|
2084
|
+
</text>
|
|
2085
|
+
);
|
|
2086
|
+
}
|
|
2087
|
+
}}
|
|
2088
|
+
/>
|
|
2089
|
+
</Pie>
|
|
2090
|
+
</PieChart>
|
|
2091
|
+
</ChartContainer>
|
|
2092
|
+
</div>
|
|
2093
|
+
</div>
|
|
2094
|
+
</Section>
|
|
2095
|
+
|
|
2096
|
+
<Section title="Table">
|
|
2097
|
+
<Table>
|
|
2098
|
+
<TableCaption>Breezy Hills Aquatic Club — 100m Freestyle finals</TableCaption>
|
|
2099
|
+
<TableHeader>
|
|
2100
|
+
<TableRow>
|
|
2101
|
+
<TableHead className="w-12">Place</TableHead>
|
|
2102
|
+
<TableHead>Swimmer</TableHead>
|
|
2103
|
+
<TableHead>Squad</TableHead>
|
|
2104
|
+
<TableHead className="text-right">Time</TableHead>
|
|
2105
|
+
</TableRow>
|
|
2106
|
+
</TableHeader>
|
|
2107
|
+
<TableBody>
|
|
2108
|
+
{[
|
|
2109
|
+
{ place: 1, name: "Avery Castillo", squad: "Senior A", time: "52.18" },
|
|
2110
|
+
{ place: 2, name: "Noah Kim", squad: "Senior A", time: "52.94" },
|
|
2111
|
+
{ place: 3, name: "Priya Raman", squad: "Senior B", time: "53.40" },
|
|
2112
|
+
{ place: 4, name: "Liam O'Connor", squad: "Senior B", time: "54.07" },
|
|
2113
|
+
].map((r) => (
|
|
2114
|
+
<TableRow key={r.place}>
|
|
2115
|
+
<TableCell className="font-medium tabular-nums">{r.place}</TableCell>
|
|
2116
|
+
<TableCell>{r.name}</TableCell>
|
|
2117
|
+
<TableCell className="text-muted-foreground">{r.squad}</TableCell>
|
|
2118
|
+
<TableCell className="text-right font-mono tabular-nums">{r.time}</TableCell>
|
|
2119
|
+
</TableRow>
|
|
2120
|
+
))}
|
|
2121
|
+
</TableBody>
|
|
2122
|
+
<TableFooter>
|
|
2123
|
+
<TableRow>
|
|
2124
|
+
<TableCell colSpan={3}>Heat average</TableCell>
|
|
2125
|
+
<TableCell className="text-right font-mono tabular-nums">53.15</TableCell>
|
|
2126
|
+
</TableRow>
|
|
2127
|
+
</TableFooter>
|
|
2128
|
+
</Table>
|
|
2129
|
+
</Section>
|
|
2130
|
+
|
|
2131
|
+
<Section title="Calendar">
|
|
2132
|
+
<div className="flex flex-wrap gap-6">
|
|
2133
|
+
<CalendarShowcase />
|
|
2134
|
+
</div>
|
|
2135
|
+
</Section>
|
|
2136
|
+
|
|
2137
|
+
<Section title="Select">
|
|
2138
|
+
<div className="grid gap-6 sm:grid-cols-2">
|
|
2139
|
+
<div className="space-y-2">
|
|
2140
|
+
<Label htmlFor="select-squad">Squad</Label>
|
|
2141
|
+
<Select defaultValue="senior-a">
|
|
2142
|
+
<SelectTrigger id="select-squad" className="w-full">
|
|
2143
|
+
<SelectValue placeholder="Choose a squad" />
|
|
2144
|
+
</SelectTrigger>
|
|
2145
|
+
<SelectContent>
|
|
2146
|
+
<SelectGroup>
|
|
2147
|
+
<SelectLabel>Senior</SelectLabel>
|
|
2148
|
+
<SelectItem value="senior-a">Senior A</SelectItem>
|
|
2149
|
+
<SelectItem value="senior-b">Senior B</SelectItem>
|
|
2150
|
+
</SelectGroup>
|
|
2151
|
+
<SelectGroup>
|
|
2152
|
+
<SelectLabel>Age group</SelectLabel>
|
|
2153
|
+
<SelectItem value="junior-a">Junior A</SelectItem>
|
|
2154
|
+
<SelectItem value="junior-b">Junior B</SelectItem>
|
|
2155
|
+
<SelectItem value="dev" disabled>Development (full)</SelectItem>
|
|
2156
|
+
</SelectGroup>
|
|
2157
|
+
</SelectContent>
|
|
2158
|
+
</Select>
|
|
2159
|
+
</div>
|
|
2160
|
+
<div className="space-y-2">
|
|
2161
|
+
<Label htmlFor="select-stroke">Stroke (disabled)</Label>
|
|
2162
|
+
<Select disabled>
|
|
2163
|
+
<SelectTrigger id="select-stroke" className="w-full">
|
|
2164
|
+
<SelectValue placeholder="Locked for this event" />
|
|
2165
|
+
</SelectTrigger>
|
|
2166
|
+
<SelectContent>
|
|
2167
|
+
<SelectItem value="free">Freestyle</SelectItem>
|
|
2168
|
+
</SelectContent>
|
|
2169
|
+
</Select>
|
|
2170
|
+
</div>
|
|
2171
|
+
</div>
|
|
2172
|
+
</Section>
|
|
2173
|
+
|
|
2174
|
+
<Section title="Textarea">
|
|
2175
|
+
<div className="grid gap-6 sm:grid-cols-2">
|
|
2176
|
+
<div className="space-y-2">
|
|
2177
|
+
<Label htmlFor="ta-notes">Coach notes</Label>
|
|
2178
|
+
<Textarea id="ta-notes" placeholder="Add notes for this swimmer…" />
|
|
2179
|
+
</div>
|
|
2180
|
+
<div className="space-y-2">
|
|
2181
|
+
<Label htmlFor="ta-filled">With value</Label>
|
|
2182
|
+
<Textarea
|
|
2183
|
+
id="ta-filled"
|
|
2184
|
+
defaultValue={"Strong back half. Work on streamline off the wall and breakout timing."}
|
|
2185
|
+
/>
|
|
2186
|
+
</div>
|
|
2187
|
+
<div className="space-y-2">
|
|
2188
|
+
<Label htmlFor="ta-disabled">Disabled</Label>
|
|
2189
|
+
<Textarea id="ta-disabled" disabled placeholder="Locked during the meet" />
|
|
2190
|
+
</div>
|
|
2191
|
+
<div className="space-y-2">
|
|
2192
|
+
<Label htmlFor="ta-invalid">Invalid</Label>
|
|
2193
|
+
<Textarea id="ta-invalid" aria-invalid defaultValue="Too short" />
|
|
2194
|
+
</div>
|
|
2195
|
+
</div>
|
|
2196
|
+
</Section>
|
|
2197
|
+
|
|
2198
|
+
<Section title="Toggle & Toggle Group">
|
|
2199
|
+
<div className="space-y-6">
|
|
2200
|
+
<div className="space-y-3">
|
|
2201
|
+
<p className="text-sm font-medium text-muted-foreground">Toggle — standalone</p>
|
|
2202
|
+
<div className="flex items-center gap-3">
|
|
2203
|
+
<Toggle aria-label="Bold" defaultPressed><BoldIcon className="size-4" strokeWidth={1.5} /></Toggle>
|
|
2204
|
+
<Toggle aria-label="Italic"><ItalicIcon className="size-4" strokeWidth={1.5} /></Toggle>
|
|
2205
|
+
<Toggle aria-label="Underline" variant="outline"><UnderlineIcon className="size-4" strokeWidth={1.5} /></Toggle>
|
|
2206
|
+
<Toggle aria-label="Bold disabled" disabled><BoldIcon className="size-4" strokeWidth={1.5} /></Toggle>
|
|
2207
|
+
</div>
|
|
2208
|
+
</div>
|
|
2209
|
+
<div className="space-y-3">
|
|
2210
|
+
<p className="text-sm font-medium text-muted-foreground">Toggle group — single select (alignment)</p>
|
|
2211
|
+
<ToggleGroup type="single" defaultValue="left" variant="outline" aria-label="Text alignment">
|
|
2212
|
+
<ToggleGroupItem value="left" aria-label="Align left"><AlignLeftIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2213
|
+
<ToggleGroupItem value="center" aria-label="Align center"><AlignCenterIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2214
|
+
<ToggleGroupItem value="right" aria-label="Align right"><AlignRightIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2215
|
+
</ToggleGroup>
|
|
2216
|
+
</div>
|
|
2217
|
+
<div className="space-y-3">
|
|
2218
|
+
<p className="text-sm font-medium text-muted-foreground">Toggle group — multiple select (formatting)</p>
|
|
2219
|
+
<ToggleGroup type="multiple" defaultValue={["bold"]} variant="outline" aria-label="Text formatting">
|
|
2220
|
+
<ToggleGroupItem value="bold" aria-label="Bold"><BoldIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2221
|
+
<ToggleGroupItem value="italic" aria-label="Italic"><ItalicIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2222
|
+
<ToggleGroupItem value="underline" aria-label="Underline"><UnderlineIcon className="size-4" strokeWidth={1.5} /></ToggleGroupItem>
|
|
2223
|
+
</ToggleGroup>
|
|
2224
|
+
</div>
|
|
2225
|
+
</div>
|
|
2226
|
+
</Section>
|
|
2227
|
+
|
|
2228
|
+
<Section title="Popover">
|
|
2229
|
+
<div className="flex flex-wrap gap-3">
|
|
2230
|
+
<Popover>
|
|
2231
|
+
<PopoverTrigger asChild>
|
|
2232
|
+
<Button variant="outline">Lane settings</Button>
|
|
2233
|
+
</PopoverTrigger>
|
|
2234
|
+
<PopoverContent className="w-72">
|
|
2235
|
+
<div className="space-y-3">
|
|
2236
|
+
<div className="space-y-1">
|
|
2237
|
+
<p className="text-sm font-semibold">Lane settings</p>
|
|
2238
|
+
<p className="text-xs text-muted-foreground">Applies to this heat only.</p>
|
|
2239
|
+
</div>
|
|
2240
|
+
<div className="flex items-center justify-between">
|
|
2241
|
+
<Label htmlFor="pop-pace">Pace clock</Label>
|
|
2242
|
+
<Switch id="pop-pace" defaultChecked />
|
|
2243
|
+
</div>
|
|
2244
|
+
<div className="space-y-1.5">
|
|
2245
|
+
<Label htmlFor="pop-lanes">Lanes</Label>
|
|
2246
|
+
<Input id="pop-lanes" defaultValue="8" />
|
|
2247
|
+
</div>
|
|
2248
|
+
</div>
|
|
2249
|
+
</PopoverContent>
|
|
2250
|
+
</Popover>
|
|
2251
|
+
</div>
|
|
2252
|
+
</Section>
|
|
2253
|
+
|
|
2254
|
+
<Section title="Tooltip">
|
|
2255
|
+
<TooltipProvider>
|
|
2256
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
2257
|
+
<Tooltip>
|
|
2258
|
+
<TooltipTrigger asChild>
|
|
2259
|
+
<Button variant="outline">Seed time</Button>
|
|
2260
|
+
</TooltipTrigger>
|
|
2261
|
+
<TooltipContent>52.18 — submitted Jun 20</TooltipContent>
|
|
2262
|
+
</Tooltip>
|
|
2263
|
+
<Tooltip>
|
|
2264
|
+
<TooltipTrigger asChild>
|
|
2265
|
+
<Button variant="outline">Status</Button>
|
|
2266
|
+
</TooltipTrigger>
|
|
2267
|
+
<TooltipContent side="right">Unofficial until ratified</TooltipContent>
|
|
2268
|
+
</Tooltip>
|
|
2269
|
+
</div>
|
|
2270
|
+
</TooltipProvider>
|
|
2271
|
+
</Section>
|
|
2272
|
+
|
|
2273
|
+
<Section title="Dropdown Menu">
|
|
2274
|
+
<DropdownMenu>
|
|
2275
|
+
<DropdownMenuTrigger asChild>
|
|
2276
|
+
<Button variant="outline" className="gap-2">
|
|
2277
|
+
Actions <MoreHorizontal className="size-4" strokeWidth={1.5} />
|
|
2278
|
+
</Button>
|
|
2279
|
+
</DropdownMenuTrigger>
|
|
2280
|
+
<DropdownMenuContent align="start" className="w-56">
|
|
2281
|
+
<DropdownMenuLabel>Heat 4 · Lane 4</DropdownMenuLabel>
|
|
2282
|
+
<DropdownMenuSeparator />
|
|
2283
|
+
<DropdownMenuItem>
|
|
2284
|
+
Edit seed time <DropdownMenuShortcut>⌘E</DropdownMenuShortcut>
|
|
2285
|
+
</DropdownMenuItem>
|
|
2286
|
+
<DropdownMenuItem>Move to heat…</DropdownMenuItem>
|
|
2287
|
+
<DropdownMenuSeparator />
|
|
2288
|
+
<DropdownMenuLabel>Display</DropdownMenuLabel>
|
|
2289
|
+
<DropdownMenuCheckboxItem checked>Show splits</DropdownMenuCheckboxItem>
|
|
2290
|
+
<DropdownMenuCheckboxItem>Show reaction time</DropdownMenuCheckboxItem>
|
|
2291
|
+
<DropdownMenuSeparator />
|
|
2292
|
+
<DropdownMenuRadioGroup value="time">
|
|
2293
|
+
<DropdownMenuRadioItem value="time">Sort by time</DropdownMenuRadioItem>
|
|
2294
|
+
<DropdownMenuRadioItem value="name">Sort by name</DropdownMenuRadioItem>
|
|
2295
|
+
</DropdownMenuRadioGroup>
|
|
2296
|
+
<DropdownMenuSeparator />
|
|
2297
|
+
<DropdownMenuItem variant="destructive">Scratch swimmer</DropdownMenuItem>
|
|
2298
|
+
</DropdownMenuContent>
|
|
2299
|
+
</DropdownMenu>
|
|
2300
|
+
</Section>
|
|
2301
|
+
|
|
2302
|
+
<Section title="Command">
|
|
2303
|
+
<p className="text-sm text-muted-foreground">
|
|
2304
|
+
The command primitive (cmdk) as an inline menu. BADS treats it as a
|
|
2305
|
+
power-user accelerator on top of a designed search surface, not the
|
|
2306
|
+
default search affordance.
|
|
2307
|
+
</p>
|
|
2308
|
+
<Command className="max-w-md rounded-lg border shadow-sm">
|
|
2309
|
+
<CommandInput placeholder="Type a command or search…" />
|
|
2310
|
+
<CommandList>
|
|
2311
|
+
<CommandEmpty>No results found.</CommandEmpty>
|
|
2312
|
+
<CommandGroup heading="Sessions">
|
|
2313
|
+
<CommandItem>
|
|
2314
|
+
Practice today <CommandShortcut>⌘1</CommandShortcut>
|
|
2315
|
+
</CommandItem>
|
|
2316
|
+
<CommandItem>Upcoming meets</CommandItem>
|
|
2317
|
+
<CommandItem>Attendance</CommandItem>
|
|
2318
|
+
</CommandGroup>
|
|
2319
|
+
<CommandSeparator />
|
|
2320
|
+
<CommandGroup heading="Swimmers">
|
|
2321
|
+
<CommandItem>Avery Castillo</CommandItem>
|
|
2322
|
+
<CommandItem>Noah Kim</CommandItem>
|
|
2323
|
+
<CommandItem>Priya Raman</CommandItem>
|
|
2324
|
+
</CommandGroup>
|
|
2325
|
+
</CommandList>
|
|
2326
|
+
</Command>
|
|
2327
|
+
</Section>
|
|
2328
|
+
|
|
2329
|
+
<Section title="Sheet">
|
|
2330
|
+
<div className="flex flex-wrap gap-3">
|
|
2331
|
+
{(["right", "left", "top", "bottom"] as const).map((side) => (
|
|
2332
|
+
<Sheet key={side}>
|
|
2333
|
+
<SheetTrigger asChild>
|
|
2334
|
+
<Button variant="outline">From {side}</Button>
|
|
2335
|
+
</SheetTrigger>
|
|
2336
|
+
<SheetContent side={side}>
|
|
2337
|
+
<SheetHeader>
|
|
2338
|
+
<SheetTitle>Heat details</SheetTitle>
|
|
2339
|
+
<SheetDescription>
|
|
2340
|
+
Edit lane assignments and seed times for Heat 4.
|
|
2341
|
+
</SheetDescription>
|
|
2342
|
+
</SheetHeader>
|
|
2343
|
+
<div className="flex flex-col gap-4 px-4">
|
|
2344
|
+
<div className="space-y-1.5">
|
|
2345
|
+
<Label htmlFor={`sheet-seed-${side}`}>Seed time</Label>
|
|
2346
|
+
<Input id={`sheet-seed-${side}`} defaultValue="52.18" />
|
|
2347
|
+
</div>
|
|
2348
|
+
<div className="space-y-1.5">
|
|
2349
|
+
<Label htmlFor={`sheet-lane-${side}`}>Lane</Label>
|
|
2350
|
+
<Input id={`sheet-lane-${side}`} defaultValue="4" />
|
|
2351
|
+
</div>
|
|
2352
|
+
</div>
|
|
2353
|
+
<SheetFooter className="flex-row justify-end gap-2">
|
|
2354
|
+
<SheetClose asChild><Button variant="ghost">Cancel</Button></SheetClose>
|
|
2355
|
+
<SheetClose asChild><Button>Save</Button></SheetClose>
|
|
2356
|
+
</SheetFooter>
|
|
2357
|
+
</SheetContent>
|
|
2358
|
+
</Sheet>
|
|
2359
|
+
))}
|
|
2360
|
+
</div>
|
|
2361
|
+
</Section>
|
|
2362
|
+
|
|
2363
|
+
<Section title="Tree View">
|
|
2364
|
+
<div className="flex flex-wrap gap-6 items-start">
|
|
2365
|
+
<div className="w-60">
|
|
2366
|
+
<p className="mb-2 text-xs font-medium text-muted-foreground">Default</p>
|
|
2367
|
+
<Tree defaultExpanded={["docs"]}>
|
|
2368
|
+
<TreeItem id="src">
|
|
2369
|
+
<TreeItemTrigger>src</TreeItemTrigger>
|
|
2370
|
+
<TreeItemContent>
|
|
2371
|
+
<TreeItem id="components">
|
|
2372
|
+
<TreeItemTrigger>components</TreeItemTrigger>
|
|
2373
|
+
<TreeItemContent>
|
|
2374
|
+
<TreeItem id="button"><TreeItemTrigger>Button.tsx</TreeItemTrigger></TreeItem>
|
|
2375
|
+
<TreeItem id="input"><TreeItemTrigger>Input.tsx</TreeItemTrigger></TreeItem>
|
|
2376
|
+
</TreeItemContent>
|
|
2377
|
+
</TreeItem>
|
|
2378
|
+
<TreeItem id="pages">
|
|
2379
|
+
<TreeItemTrigger>pages</TreeItemTrigger>
|
|
2380
|
+
<TreeItemContent>
|
|
2381
|
+
<TreeItem id="index"><TreeItemTrigger>index.tsx</TreeItemTrigger></TreeItem>
|
|
2382
|
+
</TreeItemContent>
|
|
2383
|
+
</TreeItem>
|
|
2384
|
+
</TreeItemContent>
|
|
2385
|
+
</TreeItem>
|
|
2386
|
+
<TreeItem id="docs">
|
|
2387
|
+
<TreeItemTrigger>docs</TreeItemTrigger>
|
|
2388
|
+
<TreeItemContent>
|
|
2389
|
+
<TreeItem id="readme"><TreeItemTrigger>README.md</TreeItemTrigger></TreeItem>
|
|
2390
|
+
</TreeItemContent>
|
|
2391
|
+
</TreeItem>
|
|
2392
|
+
<TreeItem id="pkg"><TreeItemTrigger>package.json</TreeItemTrigger></TreeItem>
|
|
2393
|
+
</Tree>
|
|
2394
|
+
</div>
|
|
2395
|
+
<div className="w-64">
|
|
2396
|
+
<p className="mb-2 text-xs font-medium text-muted-foreground">With icons</p>
|
|
2397
|
+
<Tree defaultExpanded={["project", "assets"]}>
|
|
2398
|
+
<TreeItem id="project">
|
|
2399
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>Project</TreeItemTrigger>
|
|
2400
|
+
<TreeItemContent>
|
|
2401
|
+
<TreeItem id="assets">
|
|
2402
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>Assets</TreeItemTrigger>
|
|
2403
|
+
<TreeItemContent>
|
|
2404
|
+
<TreeItem id="logo"><TreeItemTrigger icon={<File strokeWidth={1.5} />}>logo.svg</TreeItemTrigger></TreeItem>
|
|
2405
|
+
<TreeItem id="notes"><TreeItemTrigger icon={<FileText strokeWidth={1.5} />}>notes.md</TreeItemTrigger></TreeItem>
|
|
2406
|
+
</TreeItemContent>
|
|
2407
|
+
</TreeItem>
|
|
2408
|
+
<TreeItem id="cfg"><TreeItemTrigger icon={<SettingsIcon strokeWidth={1.5} />}>config.json</TreeItemTrigger></TreeItem>
|
|
2409
|
+
</TreeItemContent>
|
|
2410
|
+
</TreeItem>
|
|
2411
|
+
</Tree>
|
|
2412
|
+
</div>
|
|
2413
|
+
<Card className="w-72 p-3">
|
|
2414
|
+
<p className="mb-2 px-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground">BADS Design System</p>
|
|
2415
|
+
<Tree defaultExpanded={["layer-1"]} aria-label="BADS file browser">
|
|
2416
|
+
<TreeItem id="layer-1">
|
|
2417
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>layer-1-foundation</TreeItemTrigger>
|
|
2418
|
+
<TreeItemContent>
|
|
2419
|
+
<TreeItem id="manifest"><TreeItemTrigger icon={<File strokeWidth={1.5} />}>manifest.json</TreeItemTrigger></TreeItem>
|
|
2420
|
+
<TreeItem id="voice"><TreeItemTrigger icon={<FileText strokeWidth={1.5} />}>voice-and-tone.md</TreeItemTrigger></TreeItem>
|
|
2421
|
+
<TreeItem id="personas"><TreeItemTrigger icon={<FileText strokeWidth={1.5} />}>personas.md</TreeItemTrigger></TreeItem>
|
|
2422
|
+
</TreeItemContent>
|
|
2423
|
+
</TreeItem>
|
|
2424
|
+
<TreeItem id="layer-5">
|
|
2425
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>layer-5-component-registry</TreeItemTrigger>
|
|
2426
|
+
<TreeItemContent>
|
|
2427
|
+
<TreeItem id="registry"><TreeItemTrigger icon={<File strokeWidth={1.5} />}>component-registry.json</TreeItemTrigger></TreeItem>
|
|
2428
|
+
</TreeItemContent>
|
|
2429
|
+
</TreeItem>
|
|
2430
|
+
<TreeItem id="packages">
|
|
2431
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>packages</TreeItemTrigger>
|
|
2432
|
+
<TreeItemContent>
|
|
2433
|
+
<TreeItem id="core-dir">
|
|
2434
|
+
<TreeItemTrigger icon={<Folder strokeWidth={1.5} />}>core</TreeItemTrigger>
|
|
2435
|
+
<TreeItemContent>
|
|
2436
|
+
<TreeItem id="tokens"><TreeItemTrigger icon={<File strokeWidth={1.5} />}>tokens.json</TreeItemTrigger></TreeItem>
|
|
2437
|
+
</TreeItemContent>
|
|
2438
|
+
</TreeItem>
|
|
2439
|
+
</TreeItemContent>
|
|
2440
|
+
</TreeItem>
|
|
2441
|
+
<TreeItem id="claude-md"><TreeItemTrigger icon={<FileText strokeWidth={1.5} />}>CLAUDE.md</TreeItemTrigger></TreeItem>
|
|
2442
|
+
</Tree>
|
|
2443
|
+
</Card>
|
|
2444
|
+
</div>
|
|
2445
|
+
</Section>
|
|
2446
|
+
|
|
2447
|
+
<Section title="Color Picker">
|
|
2448
|
+
<div className="flex flex-wrap gap-8 items-start">
|
|
2449
|
+
<div className="space-y-1.5">
|
|
2450
|
+
<p className="text-xs font-medium text-muted-foreground">Swatches</p>
|
|
2451
|
+
<ColorPicker
|
|
2452
|
+
swatches={[
|
|
2453
|
+
"#ef4444", "#f97316", "#eab308", "#22c55e",
|
|
2454
|
+
"#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899",
|
|
2455
|
+
"#64748b", "#1e293b",
|
|
2456
|
+
]}
|
|
2457
|
+
aria-label="Select a color"
|
|
2458
|
+
/>
|
|
2459
|
+
</div>
|
|
2460
|
+
<div className="space-y-1.5">
|
|
2461
|
+
<p className="text-xs font-medium text-muted-foreground">With custom hex input</p>
|
|
2462
|
+
<ColorPicker
|
|
2463
|
+
swatches={[
|
|
2464
|
+
"#ef4444", "#f97316", "#eab308", "#22c55e",
|
|
2465
|
+
"#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899",
|
|
2466
|
+
]}
|
|
2467
|
+
allowCustom
|
|
2468
|
+
defaultValue="#3b82f6"
|
|
2469
|
+
aria-label="Select or enter a color"
|
|
2470
|
+
/>
|
|
2471
|
+
</div>
|
|
2472
|
+
<div className="space-y-1.5">
|
|
2473
|
+
<p className="text-xs font-medium text-muted-foreground">Disabled</p>
|
|
2474
|
+
<ColorPicker
|
|
2475
|
+
swatches={[
|
|
2476
|
+
"#ef4444", "#f97316", "#eab308", "#22c55e",
|
|
2477
|
+
"#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899",
|
|
2478
|
+
]}
|
|
2479
|
+
defaultValue="#3b82f6"
|
|
2480
|
+
disabled
|
|
2481
|
+
aria-label="Color (disabled)"
|
|
2482
|
+
/>
|
|
2483
|
+
</div>
|
|
2484
|
+
</div>
|
|
2485
|
+
</Section>
|
|
1656
2486
|
</div>
|
|
1657
2487
|
</div>
|
|
1658
2488
|
);
|
|
@@ -1685,7 +2515,7 @@ function DatePickerScheduleForm() {
|
|
|
1685
2515
|
const [startDate, setStartDate] = React.useState<Date | undefined>(undefined);
|
|
1686
2516
|
const [endDate, setEndDate] = React.useState<Date | undefined>(undefined);
|
|
1687
2517
|
return (
|
|
1688
|
-
<
|
|
2518
|
+
<Card className="w-80"><CardContent className="p-4 space-y-4">
|
|
1689
2519
|
<div className="space-y-1">
|
|
1690
2520
|
<p className="text-sm font-semibold">Schedule practice block</p>
|
|
1691
2521
|
<p className="text-xs text-muted-foreground">
|
|
@@ -1718,7 +2548,7 @@ function DatePickerScheduleForm() {
|
|
|
1718
2548
|
<Button variant="outline" size="sm" className="min-h-11">Cancel</Button>
|
|
1719
2549
|
<Button size="sm" className="min-h-11">Schedule</Button>
|
|
1720
2550
|
</div>
|
|
1721
|
-
</
|
|
2551
|
+
</CardContent></Card>
|
|
1722
2552
|
);
|
|
1723
2553
|
}
|
|
1724
2554
|
|
|
@@ -1735,12 +2565,117 @@ function RatingGroupShowcase({
|
|
|
1735
2565
|
return <RatingGroup size={size} value={value} onValueChange={setValue} label={label} />;
|
|
1736
2566
|
}
|
|
1737
2567
|
|
|
2568
|
+
function SegmentedControlShowcase() {
|
|
2569
|
+
const [view, setView] = React.useState("grid");
|
|
2570
|
+
const [period, setPeriod] = React.useState("month");
|
|
2571
|
+
const [filter, setFilter] = React.useState("active");
|
|
2572
|
+
return (
|
|
2573
|
+
<div className="flex flex-col gap-6">
|
|
2574
|
+
<div className="flex flex-col gap-4">
|
|
2575
|
+
<p className="text-sm font-medium text-muted-foreground">Size sm</p>
|
|
2576
|
+
<SegmentedControl value={period} onValueChange={setPeriod} size="sm" label="Time period">
|
|
2577
|
+
<SegmentedControlItem value="day">Day</SegmentedControlItem>
|
|
2578
|
+
<SegmentedControlItem value="week">Week</SegmentedControlItem>
|
|
2579
|
+
<SegmentedControlItem value="month">Month</SegmentedControlItem>
|
|
2580
|
+
</SegmentedControl>
|
|
2581
|
+
|
|
2582
|
+
<p className="text-sm font-medium text-muted-foreground">Default — view toggle</p>
|
|
2583
|
+
<SegmentedControl value={view} onValueChange={setView} label="View">
|
|
2584
|
+
<SegmentedControlItem value="list">List</SegmentedControlItem>
|
|
2585
|
+
<SegmentedControlItem value="grid">Grid</SegmentedControlItem>
|
|
2586
|
+
<SegmentedControlItem value="map">Map</SegmentedControlItem>
|
|
2587
|
+
</SegmentedControl>
|
|
2588
|
+
|
|
2589
|
+
<p className="text-sm font-medium text-muted-foreground">With disabled item</p>
|
|
2590
|
+
<SegmentedControl value={filter} onValueChange={setFilter} label="Filter">
|
|
2591
|
+
<SegmentedControlItem value="all">All</SegmentedControlItem>
|
|
2592
|
+
<SegmentedControlItem value="active">Active</SegmentedControlItem>
|
|
2593
|
+
<SegmentedControlItem value="archived">Archived</SegmentedControlItem>
|
|
2594
|
+
<SegmentedControlItem value="deleted" disabled>Deleted</SegmentedControlItem>
|
|
2595
|
+
</SegmentedControl>
|
|
2596
|
+
|
|
2597
|
+
<p className="text-sm font-medium text-muted-foreground">Disabled</p>
|
|
2598
|
+
<SegmentedControl value="week" onValueChange={() => {}} disabled label="Disabled">
|
|
2599
|
+
<SegmentedControlItem value="day">Day</SegmentedControlItem>
|
|
2600
|
+
<SegmentedControlItem value="week">Week</SegmentedControlItem>
|
|
2601
|
+
<SegmentedControlItem value="month">Month</SegmentedControlItem>
|
|
2602
|
+
</SegmentedControl>
|
|
2603
|
+
</div>
|
|
2604
|
+
|
|
2605
|
+
<Card className="w-80"><CardContent className="p-4 space-y-3">
|
|
2606
|
+
<p className="text-sm font-semibold">Breezy Hills Aquatic Club</p>
|
|
2607
|
+
<SegmentedControl value={filter} onValueChange={setFilter} label="Session filter">
|
|
2608
|
+
<SegmentedControlItem value="active">Upcoming</SegmentedControlItem>
|
|
2609
|
+
<SegmentedControlItem value="archived">Past</SegmentedControlItem>
|
|
2610
|
+
<SegmentedControlItem value="all">All</SegmentedControlItem>
|
|
2611
|
+
</SegmentedControl>
|
|
2612
|
+
<p className="text-xs text-muted-foreground">
|
|
2613
|
+
Showing{" "}
|
|
2614
|
+
<span className="font-medium text-foreground">
|
|
2615
|
+
{filter === "active" ? "upcoming" : filter === "archived" ? "past" : "all"}
|
|
2616
|
+
</span>{" "}
|
|
2617
|
+
sessions · Avery Castillo coaching
|
|
2618
|
+
</p>
|
|
2619
|
+
</CardContent></Card>
|
|
2620
|
+
</div>
|
|
2621
|
+
);
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
function TimelineRealisticDemo() {
|
|
2625
|
+
return (
|
|
2626
|
+
<Card className="w-96">
|
|
2627
|
+
<CardContent className="p-5 space-y-4">
|
|
2628
|
+
<div className="space-y-0.5">
|
|
2629
|
+
<p className="text-sm font-semibold">Avery Castillo · Summer Invitational</p>
|
|
2630
|
+
<p className="text-xs text-muted-foreground">Breezy Hills Aquatic Club</p>
|
|
2631
|
+
</div>
|
|
2632
|
+
<Timeline>
|
|
2633
|
+
<TimelineItem
|
|
2634
|
+
status="complete"
|
|
2635
|
+
icon={<UserCheckIcon className="size-3" strokeWidth={2} aria-hidden />}
|
|
2636
|
+
title="Registration submitted"
|
|
2637
|
+
description="200m freestyle · 400m IM"
|
|
2638
|
+
time="Jun 20, 9:00 AM"
|
|
2639
|
+
/>
|
|
2640
|
+
<TimelineItem
|
|
2641
|
+
status="complete"
|
|
2642
|
+
icon={<CreditCardIcon className="size-3" strokeWidth={2} aria-hidden />}
|
|
2643
|
+
title="Payment confirmed"
|
|
2644
|
+
description="$85 — credit card ending 4821"
|
|
2645
|
+
time="Jun 21, 11:30 AM"
|
|
2646
|
+
/>
|
|
2647
|
+
<TimelineItem
|
|
2648
|
+
status="complete"
|
|
2649
|
+
icon={<ClipboardCheckIcon className="size-3" strokeWidth={2} aria-hidden />}
|
|
2650
|
+
title="Waiver signed"
|
|
2651
|
+
description="Guardian: Morgan Castillo"
|
|
2652
|
+
time="Jun 22, 3:15 PM"
|
|
2653
|
+
/>
|
|
2654
|
+
<TimelineItem
|
|
2655
|
+
status="active"
|
|
2656
|
+
title="Heat assignment pending"
|
|
2657
|
+
description="Sheet expected Jun 26"
|
|
2658
|
+
time="Jun 25 (today)"
|
|
2659
|
+
/>
|
|
2660
|
+
<TimelineItem
|
|
2661
|
+
status="pending"
|
|
2662
|
+
icon={<TrophyIcon className="size-3" strokeWidth={2} aria-hidden />}
|
|
2663
|
+
title="Summer Invitational"
|
|
2664
|
+
description="Check-in 7:30 AM · South entrance"
|
|
2665
|
+
time="Jun 28, 2026"
|
|
2666
|
+
/>
|
|
2667
|
+
</Timeline>
|
|
2668
|
+
</CardContent>
|
|
2669
|
+
</Card>
|
|
2670
|
+
);
|
|
2671
|
+
}
|
|
2672
|
+
|
|
1738
2673
|
function RatingGroupFeedbackDemo() {
|
|
1739
2674
|
const [value, setValue] = React.useState(0);
|
|
1740
2675
|
const [submitted, setSubmitted] = React.useState(false);
|
|
1741
2676
|
const labels = ["", "Needs work", "Below average", "Average", "Good", "Excellent"];
|
|
1742
2677
|
return (
|
|
1743
|
-
<
|
|
2678
|
+
<Card className="w-72"><CardContent className="p-4 space-y-4">
|
|
1744
2679
|
<div className="space-y-1">
|
|
1745
2680
|
<p className="text-sm font-semibold">Rate your practice session</p>
|
|
1746
2681
|
<p className="text-xs text-muted-foreground">Breezy Hills Aquatic Club · Tuesday AM</p>
|
|
@@ -1768,6 +2703,54 @@ function RatingGroupFeedbackDemo() {
|
|
|
1768
2703
|
</Button>
|
|
1769
2704
|
</div>
|
|
1770
2705
|
)}
|
|
2706
|
+
</CardContent></Card>
|
|
2707
|
+
);
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
function TagsInputShowcase({
|
|
2711
|
+
initialTags = [],
|
|
2712
|
+
...props
|
|
2713
|
+
}: Omit<React.ComponentProps<typeof TagsInput>, "value" | "onValueChange"> & {
|
|
2714
|
+
initialTags?: string[];
|
|
2715
|
+
}) {
|
|
2716
|
+
const [tags, setTags] = React.useState<string[]>(initialTags);
|
|
2717
|
+
return (
|
|
2718
|
+
<div className="w-80">
|
|
2719
|
+
<TagsInput value={tags} onValueChange={setTags} {...props} />
|
|
2720
|
+
</div>
|
|
2721
|
+
);
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
function TagsInputFilterDemo() {
|
|
2725
|
+
const [tags, setTags] = React.useState<string[]>(["Junior A", "Summer Invitational"]);
|
|
2726
|
+
return (
|
|
2727
|
+
<div className="w-96 space-y-3">
|
|
2728
|
+
<Card>
|
|
2729
|
+
<CardContent className="p-4 space-y-3">
|
|
2730
|
+
<div>
|
|
2731
|
+
<p className="text-sm font-semibold">Breezy Hills Aquatic Club</p>
|
|
2732
|
+
<p className="text-xs text-muted-foreground">Filter practice sessions by tag</p>
|
|
2733
|
+
</div>
|
|
2734
|
+
<div className="space-y-1.5">
|
|
2735
|
+
<label className="text-sm font-medium">Active filters</label>
|
|
2736
|
+
<TagsInput
|
|
2737
|
+
value={tags}
|
|
2738
|
+
onValueChange={setTags}
|
|
2739
|
+
placeholder="Add filter tag…"
|
|
2740
|
+
maxTags={6}
|
|
2741
|
+
/>
|
|
2742
|
+
<p className="text-xs text-muted-foreground">
|
|
2743
|
+
Press Enter or comma to add · Backspace to remove last
|
|
2744
|
+
</p>
|
|
2745
|
+
</div>
|
|
2746
|
+
</CardContent>
|
|
2747
|
+
</Card>
|
|
2748
|
+
{tags.length > 0 && (
|
|
2749
|
+
<p className="text-sm text-muted-foreground">
|
|
2750
|
+
Filtering by:{" "}
|
|
2751
|
+
<span className="font-medium text-foreground">{tags.join(", ")}</span>
|
|
2752
|
+
</p>
|
|
2753
|
+
)}
|
|
1771
2754
|
</div>
|
|
1772
2755
|
);
|
|
1773
2756
|
}
|