shadcn-packaged 2025.8.18 → 2025.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.
Files changed (93) hide show
  1. package/index.css +20 -0
  2. package/package.json +4 -4
  3. package/ui/accordion.d.ts +4 -4
  4. package/ui/accordion.jsx +15 -20
  5. package/ui/alert-dialog.d.ts +17 -11
  6. package/ui/alert-dialog.jsx +23 -36
  7. package/ui/alert.d.ts +4 -5
  8. package/ui/alert.jsx +9 -12
  9. package/ui/aspect-ratio.d.ts +1 -1
  10. package/ui/aspect-ratio.jsx +1 -3
  11. package/ui/avatar.d.ts +3 -3
  12. package/ui/avatar.jsx +6 -9
  13. package/ui/badge.d.ts +3 -3
  14. package/ui/badge.jsx +7 -9
  15. package/ui/breadcrumb.d.ts +16 -8
  16. package/ui/breadcrumb.jsx +21 -26
  17. package/ui/button.d.ts +3 -2
  18. package/ui/button.jsx +14 -13
  19. package/ui/calendar.jsx +20 -20
  20. package/ui/card.d.ts +7 -8
  21. package/ui/card.jsx +13 -22
  22. package/ui/carousel.d.ts +5 -6
  23. package/ui/carousel.jsx +34 -26
  24. package/ui/chart.d.ts +28 -6
  25. package/ui/chart.jsx +40 -37
  26. package/ui/checkbox.d.ts +1 -1
  27. package/ui/checkbox.jsx +7 -8
  28. package/ui/collapsible.d.ts +3 -3
  29. package/ui/collapsible.jsx +3 -9
  30. package/ui/command.d.ts +78 -16
  31. package/ui/command.jsx +27 -37
  32. package/ui/context-menu.d.ts +21 -19
  33. package/ui/context-menu.jsx +47 -65
  34. package/ui/dialog.d.ts +17 -13
  35. package/ui/dialog.jsx +27 -41
  36. package/ui/drawer.d.ts +19 -10
  37. package/ui/drawer.jsx +23 -36
  38. package/ui/dropdown-menu.d.ts +22 -20
  39. package/ui/dropdown-menu.jsx +50 -66
  40. package/ui/form.d.ts +5 -6
  41. package/ui/form.jsx +23 -19
  42. package/ui/hover-card.d.ts +3 -3
  43. package/ui/hover-card.jsx +4 -11
  44. package/ui/input-otp.d.ts +30 -7
  45. package/ui/input-otp.jsx +15 -17
  46. package/ui/input.d.ts +1 -1
  47. package/ui/input.jsx +4 -3
  48. package/ui/label.d.ts +2 -1
  49. package/ui/label.jsx +4 -3
  50. package/ui/menubar.d.ts +19 -17
  51. package/ui/menubar.jsx +49 -58
  52. package/ui/navigation-menu.d.ts +9 -11
  53. package/ui/navigation-menu.jsx +29 -37
  54. package/ui/pagination.d.ts +25 -10
  55. package/ui/pagination.jsx +28 -35
  56. package/ui/popover.d.ts +4 -5
  57. package/ui/popover.jsx +7 -15
  58. package/ui/progress.d.ts +1 -1
  59. package/ui/progress.jsx +4 -5
  60. package/ui/radio-group.d.ts +2 -2
  61. package/ui/radio-group.jsx +11 -9
  62. package/ui/resizable.d.ts +20 -5
  63. package/ui/resizable.jsx +8 -15
  64. package/ui/scroll-area.d.ts +2 -2
  65. package/ui/scroll-area.jsx +14 -16
  66. package/ui/select.d.ts +11 -13
  67. package/ui/select.jsx +47 -58
  68. package/ui/separator.d.ts +1 -1
  69. package/ui/separator.jsx +2 -3
  70. package/ui/sheet.d.ts +23 -11
  71. package/ui/sheet.jsx +41 -45
  72. package/ui/sidebar.d.ts +34 -38
  73. package/ui/sidebar.jsx +122 -109
  74. package/ui/skeleton.d.ts +1 -1
  75. package/ui/skeleton.jsx +1 -1
  76. package/ui/slider.d.ts +1 -1
  77. package/ui/slider.jsx +7 -13
  78. package/ui/sonner.d.ts +2 -1
  79. package/ui/sonner.jsx +7 -4
  80. package/ui/switch.d.ts +2 -2
  81. package/ui/switch.jsx +5 -6
  82. package/ui/table.d.ts +8 -8
  83. package/ui/table.jsx +18 -27
  84. package/ui/tabs.d.ts +4 -4
  85. package/ui/tabs.jsx +7 -12
  86. package/ui/textarea.d.ts +1 -1
  87. package/ui/textarea.jsx +4 -3
  88. package/ui/toggle-group.d.ts +8 -3
  89. package/ui/toggle-group.jsx +11 -11
  90. package/ui/toggle.d.ts +4 -1
  91. package/ui/toggle.jsx +7 -8
  92. package/ui/tooltip.d.ts +4 -4
  93. package/ui/tooltip.jsx +5 -19
package/index.css CHANGED
@@ -111,6 +111,26 @@
111
111
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
112
112
  --color-sidebar-border: var(--sidebar-border);
113
113
  --color-sidebar-ring: var(--sidebar-ring);
114
+ --animate-accordion-down: accordion-down 0.2s ease-out;
115
+ --animate-accordion-up: accordion-up 0.2s ease-out;
116
+
117
+ @keyframes accordion-down {
118
+ from {
119
+ height: 0;
120
+ }
121
+ to {
122
+ height: var(--radix-accordion-content-height);
123
+ }
124
+ }
125
+
126
+ @keyframes accordion-up {
127
+ from {
128
+ height: var(--radix-accordion-content-height);
129
+ }
130
+ to {
131
+ height: 0;
132
+ }
133
+ }
114
134
  }
115
135
 
116
136
  @layer base {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shadcn-packaged",
3
3
  "private": false,
4
- "version": "2025.8.18",
4
+ "version": "2025.9.1",
5
5
  "type": "module",
6
6
  "module": "index.mjs",
7
7
  "scripts": {
@@ -58,11 +58,11 @@
58
58
  "next-themes": "^0.4.6",
59
59
  "react-day-picker": "^9.9.0",
60
60
  "react-hook-form": "^7.62.0",
61
- "react-resizable-panels": "^3.0.4",
61
+ "react-resizable-panels": "^3.0.5",
62
62
  "recharts": "^2.15.4",
63
63
  "sonner": "^2.0.7",
64
64
  "vaul": "^1.1.2",
65
- "zod": "^4.0.17"
65
+ "zod": "^4.1.5"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/node": "^22.10.7",
@@ -71,7 +71,7 @@
71
71
  "class-variance-authority": "^0.7.1",
72
72
  "clsx": "^2.1.1",
73
73
  "globals": "^15.14.0",
74
- "lucide-react": "^0.539.0",
74
+ "lucide-react": "^0.542.0",
75
75
  "tailwind-merge": "^3.3.1",
76
76
  "tailwindcss": "^3.4.17",
77
77
  "tw-animate-css": "^1.3.7",
package/ui/accordion.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
- declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): React.JSX.Element;
4
- declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
5
- declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
6
- declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
3
+ declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
7
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
package/ui/accordion.jsx CHANGED
@@ -1,25 +1,20 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
3
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
4
- import { ChevronDownIcon } from "lucide-react";
4
+ import { ChevronDown } from "lucide-react";
5
5
  import { cn } from "../lib/utils";
6
- function Accordion({ ...props }) {
7
- return <AccordionPrimitive.Root data-slot="accordion" {...props}/>;
8
- }
9
- function AccordionItem({ className, ...props }) {
10
- return (<AccordionPrimitive.Item data-slot="accordion-item" className={cn("border-b last:border-b-0", className)} {...props}/>);
11
- }
12
- function AccordionTrigger({ className, children, ...props }) {
13
- return (<AccordionPrimitive.Header className="flex">
14
- <AccordionPrimitive.Trigger data-slot="accordion-trigger" className={cn("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className)} {...props}>
15
- {children}
16
- <ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"/>
17
- </AccordionPrimitive.Trigger>
18
- </AccordionPrimitive.Header>);
19
- }
20
- function AccordionContent({ className, children, ...props }) {
21
- return (<AccordionPrimitive.Content data-slot="accordion-content" className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm" {...props}>
22
- <div className={cn("pt-0 pb-4", className)}>{children}</div>
23
- </AccordionPrimitive.Content>);
24
- }
6
+ const Accordion = AccordionPrimitive.Root;
7
+ const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (<AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props}/>));
8
+ AccordionItem.displayName = "AccordionItem";
9
+ const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => (<AccordionPrimitive.Header className="flex">
10
+ <AccordionPrimitive.Trigger ref={ref} className={cn("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className)} {...props}>
11
+ {children}
12
+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200"/>
13
+ </AccordionPrimitive.Trigger>
14
+ </AccordionPrimitive.Header>));
15
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
16
+ const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => (<AccordionPrimitive.Content ref={ref} className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down" {...props}>
17
+ <div className={cn("pb-4 pt-0", className)}>{children}</div>
18
+ </AccordionPrimitive.Content>));
19
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
25
20
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -1,14 +1,20 @@
1
1
  import * as React from "react";
2
2
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
- declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): React.JSX.Element;
4
- declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.JSX.Element;
5
- declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): React.JSX.Element;
6
- declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): React.JSX.Element;
7
- declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): React.JSX.Element;
8
- declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
- declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
- declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
11
- declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
12
- declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): React.JSX.Element;
13
- declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): React.JSX.Element;
3
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
+ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const AlertDialogHeader: {
9
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
10
+ displayName: string;
11
+ };
12
+ declare const AlertDialogFooter: {
13
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
14
+ displayName: string;
15
+ };
16
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
17
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
18
+ declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
+ declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
14
20
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
@@ -3,40 +3,27 @@ import * as React from "react";
3
3
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
4
  import { cn } from "../lib/utils";
5
5
  import { buttonVariants } from "../ui/button";
6
- function AlertDialog({ ...props }) {
7
- return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props}/>;
8
- }
9
- function AlertDialogTrigger({ ...props }) {
10
- return (<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props}/>);
11
- }
12
- function AlertDialogPortal({ ...props }) {
13
- return (<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props}/>);
14
- }
15
- function AlertDialogOverlay({ className, ...props }) {
16
- return (<AlertDialogPrimitive.Overlay data-slot="alert-dialog-overlay" className={cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className)} {...props}/>);
17
- }
18
- function AlertDialogContent({ className, ...props }) {
19
- return (<AlertDialogPortal>
20
- <AlertDialogOverlay />
21
- <AlertDialogPrimitive.Content data-slot="alert-dialog-content" className={cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className)} {...props}/>
22
- </AlertDialogPortal>);
23
- }
24
- function AlertDialogHeader({ className, ...props }) {
25
- return (<div data-slot="alert-dialog-header" className={cn("flex flex-col gap-2 text-center sm:text-left", className)} {...props}/>);
26
- }
27
- function AlertDialogFooter({ className, ...props }) {
28
- return (<div data-slot="alert-dialog-footer" className={cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)} {...props}/>);
29
- }
30
- function AlertDialogTitle({ className, ...props }) {
31
- return (<AlertDialogPrimitive.Title data-slot="alert-dialog-title" className={cn("text-lg font-semibold", className)} {...props}/>);
32
- }
33
- function AlertDialogDescription({ className, ...props }) {
34
- return (<AlertDialogPrimitive.Description data-slot="alert-dialog-description" className={cn("text-muted-foreground text-sm", className)} {...props}/>);
35
- }
36
- function AlertDialogAction({ className, ...props }) {
37
- return (<AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props}/>);
38
- }
39
- function AlertDialogCancel({ className, ...props }) {
40
- return (<AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: "outline" }), className)} {...props}/>);
41
- }
6
+ const AlertDialog = AlertDialogPrimitive.Root;
7
+ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
8
+ const AlertDialogPortal = AlertDialogPrimitive.Portal;
9
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Overlay className={cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)} {...props} ref={ref}/>));
10
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
11
+ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPortal>
12
+ <AlertDialogOverlay />
13
+ <AlertDialogPrimitive.Content ref={ref} className={cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)} {...props}/>
14
+ </AlertDialogPortal>));
15
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
16
+ const AlertDialogHeader = ({ className, ...props }) => (<div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props}/>);
17
+ AlertDialogHeader.displayName = "AlertDialogHeader";
18
+ const AlertDialogFooter = ({ className, ...props }) => (<div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props}/>);
19
+ AlertDialogFooter.displayName = "AlertDialogFooter";
20
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold", className)} {...props}/>));
21
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
22
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props}/>));
23
+ AlertDialogDescription.displayName =
24
+ AlertDialogPrimitive.Description.displayName;
25
+ const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props}/>));
26
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
27
+ const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Cancel ref={ref} className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)} {...props}/>));
28
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
42
29
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
package/ui/alert.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
- declare const alertVariants: (props?: {
3
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: {
4
4
  variant?: "default" | "destructive";
5
- } & import("class-variance-authority/dist/types").ClassProp) => string;
6
- declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
7
- declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
- declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
+ } & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
9
8
  export { Alert, AlertTitle, AlertDescription };
package/ui/alert.jsx CHANGED
@@ -1,24 +1,21 @@
1
1
  import * as React from "react";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "../lib/utils";
4
- const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
4
+ const alertVariants = cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
5
5
  variants: {
6
6
  variant: {
7
- default: "bg-card text-card-foreground",
8
- destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
7
+ default: "bg-background text-foreground",
8
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
9
9
  },
10
10
  },
11
11
  defaultVariants: {
12
12
  variant: "default",
13
13
  },
14
14
  });
15
- function Alert({ className, variant, ...props }) {
16
- return (<div data-slot="alert" role="alert" className={cn(alertVariants({ variant }), className)} {...props}/>);
17
- }
18
- function AlertTitle({ className, ...props }) {
19
- return (<div data-slot="alert-title" className={cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className)} {...props}/>);
20
- }
21
- function AlertDescription({ className, ...props }) {
22
- return (<div data-slot="alert-description" className={cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className)} {...props}/>);
23
- }
15
+ const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (<div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props}/>));
16
+ Alert.displayName = "Alert";
17
+ const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (<h5 ref={ref} className={cn("mb-1 font-medium leading-none tracking-tight", className)} {...props}/>));
18
+ AlertTitle.displayName = "AlertTitle";
19
+ const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (<div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props}/>));
20
+ AlertDescription.displayName = "AlertDescription";
24
21
  export { Alert, AlertTitle, AlertDescription };
@@ -1,3 +1,3 @@
1
1
  import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2
- declare function AspectRatio({ ...props }: React.ComponentProps<typeof AspectRatioPrimitive.Root>): import("react").JSX.Element;
2
+ declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
3
3
  export { AspectRatio };
@@ -1,6 +1,4 @@
1
1
  "use client";
2
2
  import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
3
- function AspectRatio({ ...props }) {
4
- return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props}/>;
5
- }
3
+ const AspectRatio = AspectRatioPrimitive.Root;
6
4
  export { AspectRatio };
package/ui/avatar.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
- declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): React.JSX.Element;
4
- declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
5
- declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
3
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
6
  export { Avatar, AvatarImage, AvatarFallback };
package/ui/avatar.jsx CHANGED
@@ -2,13 +2,10 @@
2
2
  import * as React from "react";
3
3
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
4
4
  import { cn } from "../lib/utils";
5
- function Avatar({ className, ...props }) {
6
- return (<AvatarPrimitive.Root data-slot="avatar" className={cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className)} {...props}/>);
7
- }
8
- function AvatarImage({ className, ...props }) {
9
- return (<AvatarPrimitive.Image data-slot="avatar-image" className={cn("aspect-square size-full", className)} {...props}/>);
10
- }
11
- function AvatarFallback({ className, ...props }) {
12
- return (<AvatarPrimitive.Fallback data-slot="avatar-fallback" className={cn("bg-muted flex size-full items-center justify-center rounded-full", className)} {...props}/>);
13
- }
5
+ const Avatar = React.forwardRef(({ className, ...props }, ref) => (<AvatarPrimitive.Root ref={ref} className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)} {...props}/>));
6
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
7
+ const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (<AvatarPrimitive.Image ref={ref} className={cn("aspect-square h-full w-full", className)} {...props}/>));
8
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
9
+ const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (<AvatarPrimitive.Fallback ref={ref} className={cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className)} {...props}/>));
10
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
14
11
  export { Avatar, AvatarImage, AvatarFallback };
package/ui/badge.d.ts CHANGED
@@ -3,7 +3,7 @@ import { type VariantProps } from "class-variance-authority";
3
3
  declare const badgeVariants: (props?: {
4
4
  variant?: "default" | "outline" | "destructive" | "secondary";
5
5
  } & import("class-variance-authority/dist/types").ClassProp) => string;
6
- declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
- asChild?: boolean;
8
- }): React.JSX.Element;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
+ }
8
+ declare function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element;
9
9
  export { Badge, badgeVariants };
package/ui/badge.jsx CHANGED
@@ -1,22 +1,20 @@
1
1
  import * as React from "react";
2
- import { Slot } from "@radix-ui/react-slot";
3
2
  import { cva } from "class-variance-authority";
4
3
  import { cn } from "../lib/utils";
5
- const badgeVariants = cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
4
+ const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
6
5
  variants: {
7
6
  variant: {
8
- default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
9
- secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
10
- destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
11
- outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
7
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
8
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
9
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
10
+ outline: "text-foreground",
12
11
  },
13
12
  },
14
13
  defaultVariants: {
15
14
  variant: "default",
16
15
  },
17
16
  });
18
- function Badge({ className, variant, asChild = false, ...props }) {
19
- const Comp = asChild ? Slot : "span";
20
- return (<Comp data-slot="badge" className={cn(badgeVariants({ variant }), className)} {...props}/>);
17
+ function Badge({ className, variant, ...props }) {
18
+ return (<div className={cn(badgeVariants({ variant }), className)} {...props}/>);
21
19
  }
22
20
  export { Badge, badgeVariants };
@@ -1,11 +1,19 @@
1
1
  import * as React from "react";
2
- declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): React.JSX.Element;
3
- declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
4
- declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
5
- declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
2
+ declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
3
+ separator?: React.ReactNode;
4
+ } & React.RefAttributes<HTMLElement>>;
5
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
7
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
6
8
  asChild?: boolean;
7
- }): React.JSX.Element;
8
- declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
9
- declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
10
- declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
9
+ } & React.RefAttributes<HTMLAnchorElement>>;
10
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
11
+ declare const BreadcrumbSeparator: {
12
+ ({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const BreadcrumbEllipsis: {
16
+ ({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
17
+ displayName: string;
18
+ };
11
19
  export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
package/ui/breadcrumb.jsx CHANGED
@@ -2,31 +2,26 @@ import * as React from "react";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import { ChevronRight, MoreHorizontal } from "lucide-react";
4
4
  import { cn } from "../lib/utils";
5
- function Breadcrumb({ ...props }) {
6
- return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props}/>;
7
- }
8
- function BreadcrumbList({ className, ...props }) {
9
- return (<ol data-slot="breadcrumb-list" className={cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5", className)} {...props}/>);
10
- }
11
- function BreadcrumbItem({ className, ...props }) {
12
- return (<li data-slot="breadcrumb-item" className={cn("inline-flex items-center gap-1.5", className)} {...props}/>);
13
- }
14
- function BreadcrumbLink({ asChild, className, ...props }) {
5
+ const Breadcrumb = React.forwardRef(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props}/>);
6
+ Breadcrumb.displayName = "Breadcrumb";
7
+ const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (<ol ref={ref} className={cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className)} {...props}/>));
8
+ BreadcrumbList.displayName = "BreadcrumbList";
9
+ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (<li ref={ref} className={cn("inline-flex items-center gap-1.5", className)} {...props}/>));
10
+ BreadcrumbItem.displayName = "BreadcrumbItem";
11
+ const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
15
12
  const Comp = asChild ? Slot : "a";
16
- return (<Comp data-slot="breadcrumb-link" className={cn("hover:text-foreground transition-colors", className)} {...props}/>);
17
- }
18
- function BreadcrumbPage({ className, ...props }) {
19
- return (<span data-slot="breadcrumb-page" role="link" aria-disabled="true" aria-current="page" className={cn("text-foreground font-normal", className)} {...props}/>);
20
- }
21
- function BreadcrumbSeparator({ children, className, ...props }) {
22
- return (<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" className={cn("[&>svg]:size-3.5", className)} {...props}>
23
- {children ?? <ChevronRight />}
24
- </li>);
25
- }
26
- function BreadcrumbEllipsis({ className, ...props }) {
27
- return (<span data-slot="breadcrumb-ellipsis" role="presentation" aria-hidden="true" className={cn("flex size-9 items-center justify-center", className)} {...props}>
28
- <MoreHorizontal className="size-4"/>
29
- <span className="sr-only">More</span>
30
- </span>);
31
- }
13
+ return (<Comp ref={ref} className={cn("transition-colors hover:text-foreground", className)} {...props}/>);
14
+ });
15
+ BreadcrumbLink.displayName = "BreadcrumbLink";
16
+ const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (<span ref={ref} role="link" aria-disabled="true" aria-current="page" className={cn("font-normal text-foreground", className)} {...props}/>));
17
+ BreadcrumbPage.displayName = "BreadcrumbPage";
18
+ const BreadcrumbSeparator = ({ children, className, ...props }) => (<li role="presentation" aria-hidden="true" className={cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)} {...props}>
19
+ {children ?? <ChevronRight />}
20
+ </li>);
21
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
22
+ const BreadcrumbEllipsis = ({ className, ...props }) => (<span role="presentation" aria-hidden="true" className={cn("flex h-9 w-9 items-center justify-center", className)} {...props}>
23
+ <MoreHorizontal className="h-4 w-4"/>
24
+ <span className="sr-only">More</span>
25
+ </span>);
26
+ BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
32
27
  export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
package/ui/button.d.ts CHANGED
@@ -4,7 +4,8 @@ declare const buttonVariants: (props?: {
4
4
  variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost";
5
5
  size?: "default" | "icon" | "sm" | "lg";
6
6
  } & import("class-variance-authority/dist/types").ClassProp) => string;
7
- declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
9
- }): React.JSX.Element;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
10
11
  export { Button, buttonVariants };
package/ui/button.jsx CHANGED
@@ -2,21 +2,21 @@ import * as React from "react";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { cn } from "../lib/utils";
5
- const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
5
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
6
6
  variants: {
7
7
  variant: {
8
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
9
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
10
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
11
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
12
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
8
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
9
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
10
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
11
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
+ ghost: "hover:bg-accent hover:text-accent-foreground",
13
13
  link: "text-primary underline-offset-4 hover:underline",
14
14
  },
15
15
  size: {
16
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
17
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
18
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
19
- icon: "size-9",
16
+ default: "h-10 px-4 py-2",
17
+ sm: "h-9 rounded-md px-3",
18
+ lg: "h-11 rounded-md px-8",
19
+ icon: "h-10 w-10",
20
20
  },
21
21
  },
22
22
  defaultVariants: {
@@ -24,8 +24,9 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
24
24
  size: "default",
25
25
  },
26
26
  });
27
- function Button({ className, variant, size, asChild = false, ...props }) {
27
+ const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
28
28
  const Comp = asChild ? Slot : "button";
29
- return (<Comp data-slot="button" className={cn(buttonVariants({ variant, size, className }))} {...props}/>);
30
- }
29
+ return (<Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props}/>);
30
+ });
31
+ Button.displayName = "Button";
31
32
  export { Button, buttonVariants };