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.
- package/index.css +20 -0
- package/package.json +4 -4
- package/ui/accordion.d.ts +4 -4
- package/ui/accordion.jsx +15 -20
- package/ui/alert-dialog.d.ts +17 -11
- package/ui/alert-dialog.jsx +23 -36
- package/ui/alert.d.ts +4 -5
- package/ui/alert.jsx +9 -12
- package/ui/aspect-ratio.d.ts +1 -1
- package/ui/aspect-ratio.jsx +1 -3
- package/ui/avatar.d.ts +3 -3
- package/ui/avatar.jsx +6 -9
- package/ui/badge.d.ts +3 -3
- package/ui/badge.jsx +7 -9
- package/ui/breadcrumb.d.ts +16 -8
- package/ui/breadcrumb.jsx +21 -26
- package/ui/button.d.ts +3 -2
- package/ui/button.jsx +14 -13
- package/ui/calendar.jsx +20 -20
- package/ui/card.d.ts +7 -8
- package/ui/card.jsx +13 -22
- package/ui/carousel.d.ts +5 -6
- package/ui/carousel.jsx +34 -26
- package/ui/chart.d.ts +28 -6
- package/ui/chart.jsx +40 -37
- package/ui/checkbox.d.ts +1 -1
- package/ui/checkbox.jsx +7 -8
- package/ui/collapsible.d.ts +3 -3
- package/ui/collapsible.jsx +3 -9
- package/ui/command.d.ts +78 -16
- package/ui/command.jsx +27 -37
- package/ui/context-menu.d.ts +21 -19
- package/ui/context-menu.jsx +47 -65
- package/ui/dialog.d.ts +17 -13
- package/ui/dialog.jsx +27 -41
- package/ui/drawer.d.ts +19 -10
- package/ui/drawer.jsx +23 -36
- package/ui/dropdown-menu.d.ts +22 -20
- package/ui/dropdown-menu.jsx +50 -66
- package/ui/form.d.ts +5 -6
- package/ui/form.jsx +23 -19
- package/ui/hover-card.d.ts +3 -3
- package/ui/hover-card.jsx +4 -11
- package/ui/input-otp.d.ts +30 -7
- package/ui/input-otp.jsx +15 -17
- package/ui/input.d.ts +1 -1
- package/ui/input.jsx +4 -3
- package/ui/label.d.ts +2 -1
- package/ui/label.jsx +4 -3
- package/ui/menubar.d.ts +19 -17
- package/ui/menubar.jsx +49 -58
- package/ui/navigation-menu.d.ts +9 -11
- package/ui/navigation-menu.jsx +29 -37
- package/ui/pagination.d.ts +25 -10
- package/ui/pagination.jsx +28 -35
- package/ui/popover.d.ts +4 -5
- package/ui/popover.jsx +7 -15
- package/ui/progress.d.ts +1 -1
- package/ui/progress.jsx +4 -5
- package/ui/radio-group.d.ts +2 -2
- package/ui/radio-group.jsx +11 -9
- package/ui/resizable.d.ts +20 -5
- package/ui/resizable.jsx +8 -15
- package/ui/scroll-area.d.ts +2 -2
- package/ui/scroll-area.jsx +14 -16
- package/ui/select.d.ts +11 -13
- package/ui/select.jsx +47 -58
- package/ui/separator.d.ts +1 -1
- package/ui/separator.jsx +2 -3
- package/ui/sheet.d.ts +23 -11
- package/ui/sheet.jsx +41 -45
- package/ui/sidebar.d.ts +34 -38
- package/ui/sidebar.jsx +122 -109
- package/ui/skeleton.d.ts +1 -1
- package/ui/skeleton.jsx +1 -1
- package/ui/slider.d.ts +1 -1
- package/ui/slider.jsx +7 -13
- package/ui/sonner.d.ts +2 -1
- package/ui/sonner.jsx +7 -4
- package/ui/switch.d.ts +2 -2
- package/ui/switch.jsx +5 -6
- package/ui/table.d.ts +8 -8
- package/ui/table.jsx +18 -27
- package/ui/tabs.d.ts +4 -4
- package/ui/tabs.jsx +7 -12
- package/ui/textarea.d.ts +1 -1
- package/ui/textarea.jsx +4 -3
- package/ui/toggle-group.d.ts +8 -3
- package/ui/toggle-group.jsx +11 -11
- package/ui/toggle.d.ts +4 -1
- package/ui/toggle.jsx +7 -8
- package/ui/tooltip.d.ts +4 -4
- 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.
|
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.
|
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.
|
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.
|
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
|
4
|
-
declare
|
5
|
-
declare
|
6
|
-
declare
|
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 {
|
4
|
+
import { ChevronDown } from "lucide-react";
|
5
5
|
import { cn } from "../lib/utils";
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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 };
|
package/ui/alert-dialog.d.ts
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
3
|
-
declare
|
4
|
-
declare
|
5
|
-
declare
|
6
|
-
declare
|
7
|
-
declare
|
8
|
-
declare
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
declare
|
13
|
-
|
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, };
|
package/ui/alert-dialog.jsx
CHANGED
@@ -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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
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
|
7
|
-
declare
|
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
|
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-
|
8
|
-
destructive: "text-destructive
|
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
|
-
|
16
|
-
|
17
|
-
}
|
18
|
-
|
19
|
-
|
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 };
|
package/ui/aspect-ratio.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
2
|
-
declare
|
2
|
+
declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
|
3
3
|
export { AspectRatio };
|
package/ui/aspect-ratio.jsx
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
"use client";
|
2
2
|
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
3
|
-
|
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
|
4
|
-
declare
|
5
|
-
declare
|
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
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
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
|
-
|
7
|
-
|
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
|
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
|
9
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground
|
10
|
-
destructive: "border-transparent bg-destructive text-
|
11
|
-
outline: "text-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,
|
19
|
-
|
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 };
|
package/ui/breadcrumb.d.ts
CHANGED
@@ -1,11 +1,19 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
declare
|
3
|
-
|
4
|
-
|
5
|
-
declare
|
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
|
-
}
|
8
|
-
declare
|
9
|
-
declare
|
10
|
-
|
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
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
17
|
-
}
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
-
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
8
8
|
asChild?: boolean;
|
9
|
-
}
|
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-
|
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
|
9
|
-
destructive: "bg-destructive text-
|
10
|
-
outline: "border bg-background
|
11
|
-
secondary: "bg-secondary text-secondary-foreground
|
12
|
-
ghost: "hover:bg-accent hover:text-accent-foreground
|
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-
|
17
|
-
sm: "h-
|
18
|
-
lg: "h-
|
19
|
-
icon: "
|
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
|
-
|
27
|
+
const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
28
28
|
const Comp = asChild ? Slot : "button";
|
29
|
-
return (<Comp
|
30
|
-
}
|
29
|
+
return (<Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props}/>);
|
30
|
+
});
|
31
|
+
Button.displayName = "Button";
|
31
32
|
export { Button, buttonVariants };
|