@behavioral-agentic-design-system/core 0.8.4 → 0.9.1

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.
@@ -1,5 +1,20 @@
1
1
  "use client";
2
2
 
3
+ import {
4
+ Pagination,
5
+ PaginationContent,
6
+ PaginationEllipsis,
7
+ PaginationItem,
8
+ PaginationLink,
9
+ PaginationNext,
10
+ PaginationPrevious,
11
+ } from "@behavioral-agentic-design-system/core/components/ui/pagination";
12
+ import {
13
+ Accordion,
14
+ AccordionItem,
15
+ AccordionTrigger,
16
+ AccordionContent,
17
+ } from "@behavioral-agentic-design-system/core/components/ui/accordion";
3
18
  import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
4
19
  import { Input } from "@behavioral-agentic-design-system/core/components/ui/input";
5
20
  import { Label } from "@behavioral-agentic-design-system/core/components/ui/label";
@@ -25,6 +40,18 @@ import {
25
40
  DialogTitle,
26
41
  DialogTrigger,
27
42
  } from "@behavioral-agentic-design-system/core/components/ui/dialog";
43
+ import {
44
+ AlertDialog,
45
+ AlertDialogAction,
46
+ AlertDialogCancel,
47
+ AlertDialogContent,
48
+ AlertDialogDescription,
49
+ AlertDialogFooter,
50
+ AlertDialogHeader,
51
+ AlertDialogTitle,
52
+ AlertDialogTrigger,
53
+ } from "@behavioral-agentic-design-system/core/components/ui/alert-dialog";
54
+ import { buttonVariants } from "@behavioral-agentic-design-system/core/components/ui/button";
28
55
  import {
29
56
  BottomSheet,
30
57
  BottomSheetClose,
@@ -35,6 +62,49 @@ import {
35
62
  BottomSheetTitle,
36
63
  BottomSheetTrigger,
37
64
  } from "@behavioral-agentic-design-system/core/components/ui/bottom-sheet";
65
+ import {
66
+ Carousel,
67
+ CarouselContent,
68
+ CarouselItem,
69
+ CarouselPrevious,
70
+ CarouselNext,
71
+ CarouselIndicators,
72
+ } from "@behavioral-agentic-design-system/core/components/ui/carousel";
73
+ import {
74
+ Stepper,
75
+ StepperItem,
76
+ StepperIndicator,
77
+ StepperTitle,
78
+ StepperDescription,
79
+ StepperSeparator,
80
+ } from "@behavioral-agentic-design-system/core/components/ui/stepper";
81
+ import { PinInput } from "@behavioral-agentic-design-system/core/components/ui/pin-input";
82
+ import { NumberInput } from "@behavioral-agentic-design-system/core/components/ui/number-input";
83
+ import { FileUpload } from "@behavioral-agentic-design-system/core/components/ui/file-upload";
84
+ import { Spinner } from "@behavioral-agentic-design-system/core/components/ui/spinner";
85
+ import {
86
+ ContextMenu,
87
+ ContextMenuTrigger,
88
+ ContextMenuContent,
89
+ ContextMenuItem,
90
+ ContextMenuCheckboxItem,
91
+ ContextMenuRadioGroup,
92
+ ContextMenuRadioItem,
93
+ ContextMenuLabel,
94
+ ContextMenuSeparator,
95
+ ContextMenuShortcut,
96
+ ContextMenuSub,
97
+ ContextMenuSubTrigger,
98
+ ContextMenuSubContent,
99
+ } from "@behavioral-agentic-design-system/core/components/ui/context-menu";
100
+ import {
101
+ NavigationMenu,
102
+ NavigationMenuContent,
103
+ NavigationMenuItem,
104
+ NavigationMenuLink,
105
+ NavigationMenuList,
106
+ NavigationMenuTrigger,
107
+ } from "@behavioral-agentic-design-system/core/components/ui/navigation-menu";
38
108
  import { Sparkles, Info, CircleAlert } from "lucide-react";
39
109
  import { Toaster } from "@behavioral-agentic-design-system/core/components/ui/sonner";
40
110
  import { toast } from "sonner";
@@ -48,8 +118,12 @@ const SCROLL_ITEMS = Array.from({ length: 40 }, (_, i) => ({
48
118
  }));
49
119
 
50
120
  function Section({ title, children }: { title: string; children: React.ReactNode }) {
121
+ const id = title
122
+ .toLowerCase()
123
+ .replace(/[^a-z0-9]+/g, "-")
124
+ .replace(/(^-|-$)/g, "");
51
125
  return (
52
- <section className="space-y-4">
126
+ <section id={id} className="scroll-mt-6 space-y-4">
53
127
  <h2 className="text-2xl font-semibold tracking-tight">{title}</h2>
54
128
  <Card className="p-6 shadow-none">{children}</Card>
55
129
  </section>
@@ -255,6 +329,55 @@ export default function ComponentsPreview() {
255
329
  </div>
256
330
  </Section>
257
331
 
332
+ <Section title="Alert Dialog">
333
+ <div className="flex flex-wrap gap-3">
334
+ {/* Default — destructive confirm */}
335
+ <AlertDialog>
336
+ <AlertDialogTrigger asChild>
337
+ <Button variant="outline">Delete project</Button>
338
+ </AlertDialogTrigger>
339
+ <AlertDialogContent>
340
+ <AlertDialogHeader>
341
+ <AlertDialogTitle>Delete this project?</AlertDialogTitle>
342
+ <AlertDialogDescription>
343
+ This will permanently delete the Meridian Brand Refresh project
344
+ and all its components. This action cannot be undone.
345
+ </AlertDialogDescription>
346
+ </AlertDialogHeader>
347
+ <AlertDialogFooter>
348
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
349
+ <AlertDialogAction
350
+ className={buttonVariants({ variant: "destructive" })}
351
+ >
352
+ Delete
353
+ </AlertDialogAction>
354
+ </AlertDialogFooter>
355
+ </AlertDialogContent>
356
+ </AlertDialog>
357
+
358
+ {/* Confirm (non-destructive) */}
359
+ <AlertDialog>
360
+ <AlertDialogTrigger asChild>
361
+ <Button>Publish design system</Button>
362
+ </AlertDialogTrigger>
363
+ <AlertDialogContent>
364
+ <AlertDialogHeader>
365
+ <AlertDialogTitle>Publish to production?</AlertDialogTitle>
366
+ <AlertDialogDescription>
367
+ The Clap v2.1.0 package will be published to npm and made
368
+ available to all client forks. Existing installs will not
369
+ auto-update.
370
+ </AlertDialogDescription>
371
+ </AlertDialogHeader>
372
+ <AlertDialogFooter>
373
+ <AlertDialogCancel>Not yet</AlertDialogCancel>
374
+ <AlertDialogAction>Publish now</AlertDialogAction>
375
+ </AlertDialogFooter>
376
+ </AlertDialogContent>
377
+ </AlertDialog>
378
+ </div>
379
+ </Section>
380
+
258
381
  <Section title="ScrollArea">
259
382
  <ScrollArea className="h-64 w-full rounded-md border">
260
383
  <ul className="divide-y">
@@ -388,6 +511,600 @@ export default function ComponentsPreview() {
388
511
  </div>
389
512
  <Toaster />
390
513
  </Section>
514
+
515
+ <Section title="Pagination">
516
+ <div className="space-y-8">
517
+ <div>
518
+ <p className="mb-3 text-xs text-muted-foreground">Default (page 3 of 10)</p>
519
+ <Pagination>
520
+ <PaginationContent>
521
+ <PaginationItem>
522
+ <PaginationPrevious href="#" />
523
+ </PaginationItem>
524
+ <PaginationItem>
525
+ <PaginationLink href="#">1</PaginationLink>
526
+ </PaginationItem>
527
+ <PaginationItem>
528
+ <PaginationLink href="#">2</PaginationLink>
529
+ </PaginationItem>
530
+ <PaginationItem>
531
+ <PaginationLink href="#" isActive>3</PaginationLink>
532
+ </PaginationItem>
533
+ <PaginationItem>
534
+ <PaginationEllipsis />
535
+ </PaginationItem>
536
+ <PaginationItem>
537
+ <PaginationLink href="#">10</PaginationLink>
538
+ </PaginationItem>
539
+ <PaginationItem>
540
+ <PaginationNext href="#" />
541
+ </PaginationItem>
542
+ </PaginationContent>
543
+ </Pagination>
544
+ </div>
545
+ <div>
546
+ <p className="mb-3 text-xs text-muted-foreground">Simple arrows (prev/next only)</p>
547
+ <Pagination>
548
+ <PaginationContent>
549
+ <PaginationItem>
550
+ <PaginationPrevious href="#" />
551
+ </PaginationItem>
552
+ <PaginationItem>
553
+ <PaginationLink href="#" isActive className="w-auto px-4 text-sm font-medium">
554
+ Page 4 of 12
555
+ </PaginationLink>
556
+ </PaginationItem>
557
+ <PaginationItem>
558
+ <PaginationNext href="#" />
559
+ </PaginationItem>
560
+ </PaginationContent>
561
+ </Pagination>
562
+ </div>
563
+ <div>
564
+ <p className="mb-3 text-xs text-muted-foreground">Disabled (first page)</p>
565
+ <Pagination>
566
+ <PaginationContent>
567
+ <PaginationItem>
568
+ <PaginationPrevious disabled />
569
+ </PaginationItem>
570
+ <PaginationItem>
571
+ <PaginationLink href="#" isActive>1</PaginationLink>
572
+ </PaginationItem>
573
+ <PaginationItem>
574
+ <PaginationLink href="#">2</PaginationLink>
575
+ </PaginationItem>
576
+ <PaginationItem>
577
+ <PaginationLink href="#">3</PaginationLink>
578
+ </PaginationItem>
579
+ <PaginationItem>
580
+ <PaginationNext href="#" />
581
+ </PaginationItem>
582
+ </PaginationContent>
583
+ </Pagination>
584
+ </div>
585
+ </div>
586
+ </Section>
587
+
588
+ <Section title="Accordion">
589
+ <div className="space-y-8">
590
+ <div>
591
+ <p className="mb-3 text-xs text-muted-foreground">Single (collapsible)</p>
592
+ <Accordion type="single" collapsible className="w-full max-w-md">
593
+ <AccordionItem value="a1">
594
+ <AccordionTrigger>What is BADS?</AccordionTrigger>
595
+ <AccordionContent>
596
+ A portable design system for client engagements — tokens, components,
597
+ ethics layers, and agent interfaces shipped as one cohesive package.
598
+ </AccordionContent>
599
+ </AccordionItem>
600
+ <AccordionItem value="a2">
601
+ <AccordionTrigger>How do I customize tokens?</AccordionTrigger>
602
+ <AccordionContent>
603
+ Edit <code>tokens.json</code> and run{" "}
604
+ <code>pnpm build:tokens</code>. Both CSS outputs regenerate automatically.
605
+ </AccordionContent>
606
+ </AccordionItem>
607
+ <AccordionItem value="a3">
608
+ <AccordionTrigger>What accessibility standard?</AccordionTrigger>
609
+ <AccordionContent>
610
+ WCAG 2.2 AAA — 7:1 contrast, 44 × 44 px touch targets, reduced-motion
611
+ respected, focus-visible on every interactive element.
612
+ </AccordionContent>
613
+ </AccordionItem>
614
+ </Accordion>
615
+ </div>
616
+ <div>
617
+ <p className="mb-3 text-xs text-muted-foreground">Multiple</p>
618
+ <Accordion type="multiple" className="w-full max-w-md">
619
+ <AccordionItem value="b1">
620
+ <AccordionTrigger>Primary membership</AccordionTrigger>
621
+ <AccordionContent>
622
+ Covers the account holder and up to two dependents.
623
+ </AccordionContent>
624
+ </AccordionItem>
625
+ <AccordionItem value="b2">
626
+ <AccordionTrigger>Guest passes</AccordionTrigger>
627
+ <AccordionContent>
628
+ Members may bring one guest per visit at no charge.
629
+ </AccordionContent>
630
+ </AccordionItem>
631
+ </Accordion>
632
+ </div>
633
+ <div>
634
+ <p className="mb-3 text-xs text-muted-foreground">Disabled item</p>
635
+ <Accordion type="single" collapsible className="w-full max-w-md">
636
+ <AccordionItem value="c1">
637
+ <AccordionTrigger>Available</AccordionTrigger>
638
+ <AccordionContent>This item is interactive.</AccordionContent>
639
+ </AccordionItem>
640
+ <AccordionItem value="c2">
641
+ <AccordionTrigger disabled>Disabled</AccordionTrigger>
642
+ <AccordionContent>Inaccessible when trigger is disabled.</AccordionContent>
643
+ </AccordionItem>
644
+ </Accordion>
645
+ </div>
646
+ </div>
647
+ </Section>
648
+
649
+ <Section title="Carousel">
650
+ <div className="space-y-8">
651
+ <div>
652
+ <p className="mb-3 text-xs text-muted-foreground">Default — horizontal with prev/next controls</p>
653
+ <div className="w-full max-w-lg">
654
+ <Carousel aria-label="BADS feature highlights">
655
+ <CarouselContent>
656
+ {[
657
+ { heading: "Token-first design", body: "One tokens.json drives every color, spacing, and motion value." },
658
+ { heading: "WCAG 2.2 AAA", body: "7:1 contrast, 44 px touch targets, focus-visible on every element." },
659
+ { heading: "Agent-ready layers", body: "Machine-readable manifests so the right rule loads on demand." },
660
+ { heading: "Portable by design", body: "Fork, rename, customize — full git history, no lock-in." },
661
+ ].map((s, i) => (
662
+ <CarouselItem key={i} index={i}>
663
+ <Card>
664
+ <CardContent className="flex flex-col gap-2 p-5">
665
+ <p className="text-sm font-semibold">{s.heading}</p>
666
+ <p className="text-sm text-muted-foreground">{s.body}</p>
667
+ </CardContent>
668
+ </Card>
669
+ </CarouselItem>
670
+ ))}
671
+ </CarouselContent>
672
+ <CarouselPrevious />
673
+ <CarouselNext />
674
+ </Carousel>
675
+ </div>
676
+ </div>
677
+ <div>
678
+ <p className="mb-3 text-xs text-muted-foreground">With indicators</p>
679
+ <div className="w-full max-w-lg">
680
+ <Carousel aria-label="Team members">
681
+ <CarouselContent>
682
+ {["Jordan Reeves — Lead designer", "Seo-yun Park — Front-end engineer", "Marcus Lindqvist — Design system architect", "Anika Patel — Accessibility specialist"].map((member, i) => (
683
+ <CarouselItem key={i} index={i}>
684
+ <Card>
685
+ <CardContent className="p-5">
686
+ <p className="text-sm font-medium">{member.split(" — ")[0]}</p>
687
+ <p className="text-xs text-muted-foreground">{member.split(" — ")[1]}</p>
688
+ </CardContent>
689
+ </Card>
690
+ </CarouselItem>
691
+ ))}
692
+ </CarouselContent>
693
+ <CarouselPrevious />
694
+ <CarouselNext />
695
+ <CarouselIndicators />
696
+ </Carousel>
697
+ </div>
698
+ </div>
699
+ </div>
700
+ </Section>
701
+
702
+ <Section title="Stepper">
703
+ <div className="space-y-8">
704
+ <div>
705
+ <p className="mb-4 text-xs text-muted-foreground">Default — horizontal (step 2 active)</p>
706
+ <div className="w-full max-w-lg">
707
+ <Stepper value={2} aria-label="Checkout steps">
708
+ <StepperItem step={1}>
709
+ <StepperIndicator />
710
+ <StepperTitle className="mt-2 text-center">Shipping</StepperTitle>
711
+ </StepperItem>
712
+ <StepperSeparator step={1} />
713
+ <StepperItem step={2}>
714
+ <StepperIndicator />
715
+ <StepperTitle className="mt-2 text-center">Payment</StepperTitle>
716
+ </StepperItem>
717
+ <StepperSeparator step={2} />
718
+ <StepperItem step={3}>
719
+ <StepperIndicator />
720
+ <StepperTitle className="mt-2 text-center">Review</StepperTitle>
721
+ </StepperItem>
722
+ <StepperSeparator step={3} />
723
+ <StepperItem step={4}>
724
+ <StepperIndicator />
725
+ <StepperTitle className="mt-2 text-center">Confirm</StepperTitle>
726
+ </StepperItem>
727
+ </Stepper>
728
+ </div>
729
+ </div>
730
+
731
+ <div>
732
+ <p className="mb-4 text-xs text-muted-foreground">With descriptions</p>
733
+ <div className="w-full max-w-lg">
734
+ <Stepper value={2} aria-label="Account setup">
735
+ <StepperItem step={1}>
736
+ <StepperIndicator />
737
+ <div className="mt-2 text-center">
738
+ <StepperTitle>Profile</StepperTitle>
739
+ <StepperDescription>Your details</StepperDescription>
740
+ </div>
741
+ </StepperItem>
742
+ <StepperSeparator step={1} />
743
+ <StepperItem step={2}>
744
+ <StepperIndicator />
745
+ <div className="mt-2 text-center">
746
+ <StepperTitle>Security</StepperTitle>
747
+ <StepperDescription>Password + 2FA</StepperDescription>
748
+ </div>
749
+ </StepperItem>
750
+ <StepperSeparator step={2} />
751
+ <StepperItem step={3}>
752
+ <StepperIndicator />
753
+ <div className="mt-2 text-center">
754
+ <StepperTitle>Preferences</StepperTitle>
755
+ <StepperDescription>Notifications</StepperDescription>
756
+ </div>
757
+ </StepperItem>
758
+ </Stepper>
759
+ </div>
760
+ </div>
761
+
762
+ <div>
763
+ <p className="mb-4 text-xs text-muted-foreground">Vertical</p>
764
+ <div className="w-72">
765
+ <Stepper value={2} orientation="vertical" aria-label="Onboarding steps">
766
+ <StepperItem step={1}>
767
+ <div className="flex flex-col items-center shrink-0">
768
+ <StepperIndicator />
769
+ <StepperSeparator />
770
+ </div>
771
+ <div className="pb-6">
772
+ <StepperTitle>Connect your data</StepperTitle>
773
+ <StepperDescription>Integrate your existing tools via OAuth or API key.</StepperDescription>
774
+ </div>
775
+ </StepperItem>
776
+ <StepperItem step={2}>
777
+ <div className="flex flex-col items-center shrink-0">
778
+ <StepperIndicator />
779
+ <StepperSeparator />
780
+ </div>
781
+ <div className="pb-6">
782
+ <StepperTitle>Set up your workspace</StepperTitle>
783
+ <StepperDescription>Invite teammates, configure roles, and set a team name.</StepperDescription>
784
+ </div>
785
+ </StepperItem>
786
+ <StepperItem step={3}>
787
+ <div className="flex flex-col items-center shrink-0">
788
+ <StepperIndicator />
789
+ </div>
790
+ <div className="pb-6">
791
+ <StepperTitle>Publish your first flow</StepperTitle>
792
+ <StepperDescription>Run the onboarding workflow and invite your first client.</StepperDescription>
793
+ </div>
794
+ </StepperItem>
795
+ </Stepper>
796
+ </div>
797
+ </div>
798
+
799
+ <div>
800
+ <p className="mb-4 text-xs text-muted-foreground">Error state</p>
801
+ <div className="w-full max-w-md">
802
+ <Stepper value={2} aria-label="Import steps — step 2 has an error">
803
+ <StepperItem step={1}>
804
+ <StepperIndicator />
805
+ <StepperTitle className="mt-2 text-center">Upload file</StepperTitle>
806
+ </StepperItem>
807
+ <StepperSeparator step={1} />
808
+ <StepperItem step={2} error>
809
+ <StepperIndicator />
810
+ <StepperTitle className="mt-2 text-center">Validate</StepperTitle>
811
+ </StepperItem>
812
+ <StepperSeparator step={2} />
813
+ <StepperItem step={3}>
814
+ <StepperIndicator />
815
+ <StepperTitle className="mt-2 text-center">Import</StepperTitle>
816
+ </StepperItem>
817
+ </Stepper>
818
+ </div>
819
+ </div>
820
+ </div>
821
+ </Section>
822
+
823
+ <Section title="Pin Input">
824
+ <div className="space-y-6">
825
+ <div className="space-y-4">
826
+ <p className="text-xs text-muted-foreground">Sizes</p>
827
+ <div className="flex flex-col gap-4">
828
+ <PinInput length={6} size="sm" aria-label="sm size pin input demo" />
829
+ <PinInput length={6} size="default" aria-label="default size pin input demo" />
830
+ <PinInput length={6} size="lg" aria-label="lg size pin input demo" />
831
+ </div>
832
+ </div>
833
+ <div className="space-y-4">
834
+ <p className="text-xs text-muted-foreground">4-digit PIN</p>
835
+ <PinInput length={4} aria-label="4 digit pin input demo" />
836
+ </div>
837
+ <div className="space-y-4">
838
+ <p className="text-xs text-muted-foreground">Disabled (partial fill)</p>
839
+ <PinInput length={6} value="483" disabled aria-label="disabled pin input demo" />
840
+ </div>
841
+ <div className="space-y-4">
842
+ <p className="text-xs text-muted-foreground">Invalid state</p>
843
+ <PinInput length={6} value="483291" aria-invalid={true} aria-label="invalid pin input demo" />
844
+ </div>
845
+ </div>
846
+ </Section>
847
+ {/* ── Number Input ─────────────────────────────────────────── */}
848
+ <Section title="Number Input">
849
+ <div className="space-y-6">
850
+ {/* Sizes */}
851
+ <div className="space-y-3">
852
+ <p className="text-sm font-medium text-muted-foreground">Sizes</p>
853
+ <div className="flex flex-wrap items-center gap-4">
854
+ <NumberInput size="sm" defaultValue={0} aria-label="Small quantity" />
855
+ <NumberInput size="default" defaultValue={0} aria-label="Default quantity" />
856
+ <NumberInput size="lg" defaultValue={0} aria-label="Large quantity" />
857
+ </div>
858
+ </div>
859
+ {/* Bounded */}
860
+ <div className="space-y-3">
861
+ <p className="text-sm font-medium text-muted-foreground">With min / max (1–20)</p>
862
+ <div className="flex flex-wrap items-center gap-4">
863
+ <NumberInput min={1} max={20} defaultValue={1} aria-label="Bounded quantity" />
864
+ </div>
865
+ </div>
866
+ {/* Step */}
867
+ <div className="space-y-3">
868
+ <p className="text-sm font-medium text-muted-foreground">Step of 5</p>
869
+ <div className="flex flex-wrap items-center gap-4">
870
+ <NumberInput step={5} defaultValue={0} min={0} max={100} aria-label="Amount in steps of 5" />
871
+ </div>
872
+ </div>
873
+ {/* Disabled */}
874
+ <div className="space-y-3">
875
+ <p className="text-sm font-medium text-muted-foreground">Disabled</p>
876
+ <NumberInput value={42} disabled aria-label="Disabled quantity" />
877
+ </div>
878
+ </div>
879
+ </Section>
880
+ {/* ── File Upload ──────────────────────────────────────────── */}
881
+ <Section title="File Upload">
882
+ <div className="space-y-6">
883
+ {/* Sizes */}
884
+ <div className="space-y-3">
885
+ <p className="text-sm font-medium text-muted-foreground">Sizes</p>
886
+ <div className="grid gap-4 sm:grid-cols-3">
887
+ <FileUpload size="sm" aria-label="Upload file small" />
888
+ <FileUpload size="default" aria-label="Upload file default" />
889
+ <FileUpload size="lg" aria-label="Upload file large" />
890
+ </div>
891
+ </div>
892
+ {/* With constraints */}
893
+ <div className="space-y-3">
894
+ <p className="text-sm font-medium text-muted-foreground">With accept + max size</p>
895
+ <FileUpload
896
+ accept="image/png,image/jpeg,.pdf"
897
+ maxSize={5 * 1024 * 1024}
898
+ multiple
899
+ aria-label="Upload images or PDFs, max 5 MB"
900
+ />
901
+ </div>
902
+ {/* Disabled */}
903
+ <div className="space-y-3">
904
+ <p className="text-sm font-medium text-muted-foreground">Disabled</p>
905
+ <FileUpload disabled aria-label="Upload file disabled" />
906
+ </div>
907
+ </div>
908
+ </Section>
909
+ {/* ── Spinner ──────────────────────────────────────────────── */}
910
+ <Section title="Spinner">
911
+ <div className="space-y-6">
912
+ {/* Sizes */}
913
+ <div className="space-y-3">
914
+ <p className="text-sm font-medium text-muted-foreground">Sizes</p>
915
+ <div className="flex flex-wrap items-center gap-6">
916
+ <div className="flex flex-col items-center gap-2">
917
+ <Spinner size="xs" />
918
+ <span className="text-xs text-muted-foreground">xs</span>
919
+ </div>
920
+ <div className="flex flex-col items-center gap-2">
921
+ <Spinner size="sm" />
922
+ <span className="text-xs text-muted-foreground">sm</span>
923
+ </div>
924
+ <div className="flex flex-col items-center gap-2">
925
+ <Spinner size="default" />
926
+ <span className="text-xs text-muted-foreground">default</span>
927
+ </div>
928
+ <div className="flex flex-col items-center gap-2">
929
+ <Spinner size="lg" />
930
+ <span className="text-xs text-muted-foreground">lg</span>
931
+ </div>
932
+ </div>
933
+ </div>
934
+ {/* Variants */}
935
+ <div className="space-y-3">
936
+ <p className="text-sm font-medium text-muted-foreground">Variants</p>
937
+ <div className="flex flex-wrap items-center gap-6">
938
+ <div className="flex flex-col items-center gap-2">
939
+ <Spinner variant="default" />
940
+ <span className="text-xs text-muted-foreground">default</span>
941
+ </div>
942
+ <div className="flex flex-col items-center gap-2">
943
+ <Spinner variant="muted" />
944
+ <span className="text-xs text-muted-foreground">muted</span>
945
+ </div>
946
+ <div className="flex flex-col items-center gap-2">
947
+ <Spinner variant="primary" />
948
+ <span className="text-xs text-muted-foreground">primary</span>
949
+ </div>
950
+ </div>
951
+ </div>
952
+ {/* Button loading state */}
953
+ <div className="space-y-3">
954
+ <p className="text-sm font-medium text-muted-foreground">Button loading state</p>
955
+ <div className="flex flex-wrap items-center gap-3">
956
+ <Button disabled className="gap-2">
957
+ <Spinner size="xs" className="text-primary-foreground" label="Saving" />
958
+ Saving changes…
959
+ </Button>
960
+ <Button variant="outline" disabled className="gap-2">
961
+ <Spinner size="xs" label="Uploading" />
962
+ Uploading
963
+ </Button>
964
+ <Button variant="secondary" disabled className="gap-2">
965
+ <Spinner size="xs" label="Processing" />
966
+ Processing
967
+ </Button>
968
+ </div>
969
+ </div>
970
+ {/* Page-level loading */}
971
+ <div className="space-y-3">
972
+ <p className="text-sm font-medium text-muted-foreground">Page-level loading</p>
973
+ <div className="flex h-32 items-center justify-center rounded-md border border-dashed border-border">
974
+ <div className="flex flex-col items-center gap-2">
975
+ <Spinner size="lg" variant="muted" label="Loading dashboard" />
976
+ <p className="text-sm text-muted-foreground">Loading dashboard…</p>
977
+ </div>
978
+ </div>
979
+ </div>
980
+ </div>
981
+ </Section>
982
+
983
+ <Section title="Navigation Menu">
984
+ <div className="space-y-6">
985
+ <div className="space-y-3">
986
+ <p className="text-sm font-medium text-muted-foreground">With flyout panels</p>
987
+ <NavigationMenu>
988
+ <NavigationMenuList>
989
+ <NavigationMenuItem>
990
+ <NavigationMenuTrigger>System</NavigationMenuTrigger>
991
+ <NavigationMenuContent>
992
+ <ul className="grid gap-2 p-4 md:w-[380px] md:grid-cols-2">
993
+ {[
994
+ { title: "Design Tokens", desc: "Color, spacing, and type primitives." },
995
+ { title: "Components", desc: "47 WCAG AAA accessible primitives." },
996
+ { title: "Brand Layer", desc: "Voice, tone, and identity docs." },
997
+ { title: "Patterns", desc: "Loading, empty, feedback, confirmation." },
998
+ ].map((item) => (
999
+ <li key={item.title}>
1000
+ <NavigationMenuLink asChild>
1001
+ <a
1002
+ href="#"
1003
+ className="block select-none rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
1004
+ >
1005
+ <div className="text-sm font-medium leading-none">{item.title}</div>
1006
+ <p className="mt-1 line-clamp-2 text-sm leading-snug text-muted-foreground">{item.desc}</p>
1007
+ </a>
1008
+ </NavigationMenuLink>
1009
+ </li>
1010
+ ))}
1011
+ </ul>
1012
+ </NavigationMenuContent>
1013
+ </NavigationMenuItem>
1014
+ <NavigationMenuItem>
1015
+ <NavigationMenuTrigger>Guides</NavigationMenuTrigger>
1016
+ <NavigationMenuContent>
1017
+ <ul className="grid gap-2 p-4 md:w-[260px]">
1018
+ {[
1019
+ { title: "Quick start", desc: "Get up and running fast." },
1020
+ { title: "Dark mode", desc: "Light and dark CSS vars." },
1021
+ { title: "Accessibility", desc: "WCAG 2.2 AAA compliance." },
1022
+ ].map((item) => (
1023
+ <li key={item.title}>
1024
+ <NavigationMenuLink asChild>
1025
+ <a
1026
+ href="#"
1027
+ className="block select-none rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
1028
+ >
1029
+ <div className="text-sm font-medium leading-none">{item.title}</div>
1030
+ <p className="mt-1 line-clamp-2 text-sm leading-snug text-muted-foreground">{item.desc}</p>
1031
+ </a>
1032
+ </NavigationMenuLink>
1033
+ </li>
1034
+ ))}
1035
+ </ul>
1036
+ </NavigationMenuContent>
1037
+ </NavigationMenuItem>
1038
+ <NavigationMenuItem>
1039
+ <NavigationMenuLink
1040
+ href="#"
1041
+ className="inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-hidden"
1042
+ >
1043
+ Docs
1044
+ </NavigationMenuLink>
1045
+ </NavigationMenuItem>
1046
+ </NavigationMenuList>
1047
+ </NavigationMenu>
1048
+ </div>
1049
+ </div>
1050
+ </Section>
1051
+
1052
+ <Section title="Context Menu">
1053
+ <div className="space-y-6">
1054
+ <div className="space-y-3">
1055
+ <p className="text-sm font-medium text-muted-foreground">Right-click trigger</p>
1056
+ <ContextMenu>
1057
+ <ContextMenuTrigger>
1058
+ <div className="flex h-36 w-full max-w-sm items-center justify-center rounded-md border border-dashed border-border bg-muted/40 text-sm text-muted-foreground select-none">
1059
+ Right-click here
1060
+ </div>
1061
+ </ContextMenuTrigger>
1062
+ <ContextMenuContent className="w-52">
1063
+ <ContextMenuItem>
1064
+ Open <ContextMenuShortcut>↵</ContextMenuShortcut>
1065
+ </ContextMenuItem>
1066
+ <ContextMenuItem>Duplicate</ContextMenuItem>
1067
+ <ContextMenuSeparator />
1068
+ <ContextMenuSub>
1069
+ <ContextMenuSubTrigger>Share</ContextMenuSubTrigger>
1070
+ <ContextMenuSubContent>
1071
+ <ContextMenuItem>Copy link</ContextMenuItem>
1072
+ <ContextMenuItem>Email</ContextMenuItem>
1073
+ </ContextMenuSubContent>
1074
+ </ContextMenuSub>
1075
+ <ContextMenuSeparator />
1076
+ <ContextMenuItem variant="destructive">
1077
+ Delete <ContextMenuShortcut>⌫</ContextMenuShortcut>
1078
+ </ContextMenuItem>
1079
+ </ContextMenuContent>
1080
+ </ContextMenu>
1081
+ </div>
1082
+ <div className="space-y-3">
1083
+ <p className="text-sm font-medium text-muted-foreground">With checkbox + radio items</p>
1084
+ <ContextMenu>
1085
+ <ContextMenuTrigger>
1086
+ <div className="flex h-24 w-full max-w-sm items-center justify-center rounded-md border border-dashed border-border bg-muted/40 text-sm text-muted-foreground select-none">
1087
+ Right-click for view options
1088
+ </div>
1089
+ </ContextMenuTrigger>
1090
+ <ContextMenuContent className="w-48">
1091
+ <ContextMenuLabel>View</ContextMenuLabel>
1092
+ <ContextMenuSeparator />
1093
+ <ContextMenuCheckboxItem checked>Show grid</ContextMenuCheckboxItem>
1094
+ <ContextMenuCheckboxItem>Show rulers</ContextMenuCheckboxItem>
1095
+ <ContextMenuSeparator />
1096
+ <ContextMenuLabel>Sort by</ContextMenuLabel>
1097
+ <ContextMenuSeparator />
1098
+ <ContextMenuRadioGroup value="name">
1099
+ <ContextMenuRadioItem value="name">Name</ContextMenuRadioItem>
1100
+ <ContextMenuRadioItem value="date">Date modified</ContextMenuRadioItem>
1101
+ <ContextMenuRadioItem value="size">Size</ContextMenuRadioItem>
1102
+ </ContextMenuRadioGroup>
1103
+ </ContextMenuContent>
1104
+ </ContextMenu>
1105
+ </div>
1106
+ </div>
1107
+ </Section>
391
1108
  </div>
392
1109
  </div>
393
1110
  );