shadcn-packaged 2025.2.24 → 2025.3.10
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 +0 -11
- package/package.json +4 -4
- package/ui/chart.jsx +1 -1
- package/ui/dialog.jsx +1 -1
- package/ui/dropdown-menu.jsx +2 -2
- package/ui/form.d.ts +1 -1
- package/ui/form.jsx +1 -1
- package/ui/navigation-menu.jsx +1 -1
- package/ui/sidebar.jsx +13 -9
package/index.css
CHANGED
@@ -143,17 +143,6 @@
|
|
143
143
|
@apply border-border;
|
144
144
|
}
|
145
145
|
|
146
|
-
body {
|
147
|
-
@apply bg-background text-foreground;
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
@layer base {
|
154
|
-
* {
|
155
|
-
@apply border-border outline-ring/50;
|
156
|
-
}
|
157
146
|
body {
|
158
147
|
@apply bg-background text-foreground;
|
159
148
|
}
|
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.3.10",
|
5
5
|
"type": "module",
|
6
6
|
"module": "index.mjs",
|
7
7
|
"scripts": {
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"index.mjs"
|
25
25
|
],
|
26
26
|
"dependencies": {
|
27
|
-
"@hookform/resolvers": "^4.1.
|
27
|
+
"@hookform/resolvers": "^4.1.3",
|
28
28
|
"@radix-ui/react-accordion": "^1.2.3",
|
29
29
|
"@radix-ui/react-alert-dialog": "^1.1.6",
|
30
30
|
"@radix-ui/react-aspect-ratio": "^1.1.2",
|
@@ -55,7 +55,7 @@
|
|
55
55
|
"date-fns": "^4.1.0",
|
56
56
|
"embla-carousel-react": "^8.5.2",
|
57
57
|
"input-otp": "^1.4.2",
|
58
|
-
"next-themes": "^0.4.
|
58
|
+
"next-themes": "^0.4.5",
|
59
59
|
"react-day-picker": "^8.10.1",
|
60
60
|
"react-hook-form": "^7.54.2",
|
61
61
|
"react-resizable-panels": "^2.1.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.479.0",
|
75
75
|
"tailwind-merge": "^3.0.2",
|
76
76
|
"tailwindcss": "^3.4.17",
|
77
77
|
"tailwindcss-animate": "^1.0.7",
|
package/ui/chart.jsx
CHANGED
@@ -54,7 +54,7 @@ const ChartTooltipContent = React.forwardRef(({ active, payload, className, indi
|
|
54
54
|
return null;
|
55
55
|
}
|
56
56
|
const [item] = payload;
|
57
|
-
const key = `${labelKey || item
|
57
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
58
58
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
59
59
|
const value = !labelKey && typeof label === "string"
|
60
60
|
? config[label]?.label || label
|
package/ui/dialog.jsx
CHANGED
@@ -7,7 +7,7 @@ const Dialog = DialogPrimitive.Root;
|
|
7
7
|
const DialogTrigger = DialogPrimitive.Trigger;
|
8
8
|
const DialogPortal = DialogPrimitive.Portal;
|
9
9
|
const DialogClose = DialogPrimitive.Close;
|
10
|
-
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Overlay ref={ref} className={cn("fixed inset-0 z-50 bg-black/80
|
10
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Overlay ref={ref} 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}/>));
|
11
11
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
12
12
|
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (<DialogPortal>
|
13
13
|
<DialogOverlay />
|
package/ui/dropdown-menu.jsx
CHANGED
@@ -9,7 +9,7 @@ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
9
9
|
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
10
10
|
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
11
11
|
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
12
|
-
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (<DropdownMenuPrimitive.SubTrigger ref={ref} className={cn("flex cursor-default
|
12
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (<DropdownMenuPrimitive.SubTrigger ref={ref} className={cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className)} {...props}>
|
13
13
|
{children}
|
14
14
|
<ChevronRight className="ml-auto"/>
|
15
15
|
</DropdownMenuPrimitive.SubTrigger>));
|
@@ -19,7 +19,7 @@ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =
|
|
19
19
|
DropdownMenuSubContent.displayName =
|
20
20
|
DropdownMenuPrimitive.SubContent.displayName;
|
21
21
|
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (<DropdownMenuPrimitive.Portal>
|
22
|
-
<DropdownMenuPrimitive.Content ref={ref} sideOffset={sideOffset} className={cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)} {...props}/>
|
22
|
+
<DropdownMenuPrimitive.Content ref={ref} sideOffset={sideOffset} className={cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)} {...props}/>
|
23
23
|
</DropdownMenuPrimitive.Portal>));
|
24
24
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
25
25
|
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (<DropdownMenuPrimitive.Item ref={ref} className={cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className)} {...props}/>));
|
package/ui/form.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
3
|
-
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
3
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
4
4
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
5
5
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
6
6
|
declare const useFormField: () => {
|
package/ui/form.jsx
CHANGED
@@ -56,7 +56,7 @@ const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
56
56
|
FormDescription.displayName = "FormDescription";
|
57
57
|
const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
58
58
|
const { error, formMessageId } = useFormField();
|
59
|
-
const body = error ? String(error?.message) : children;
|
59
|
+
const body = error ? String(error?.message ?? "") : children;
|
60
60
|
if (!body) {
|
61
61
|
return null;
|
62
62
|
}
|
package/ui/navigation-menu.jsx
CHANGED
@@ -11,7 +11,7 @@ NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
11
11
|
const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => (<NavigationMenuPrimitive.List ref={ref} className={cn("group flex flex-1 list-none items-center justify-center space-x-1", className)} {...props}/>));
|
12
12
|
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
13
13
|
const NavigationMenuItem = NavigationMenuPrimitive.Item;
|
14
|
-
const navigationMenuTriggerStyle = cva("group inline-flex h-10 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:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[
|
14
|
+
const navigationMenuTriggerStyle = cva("group inline-flex h-10 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:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent");
|
15
15
|
const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => (<NavigationMenuPrimitive.Trigger ref={ref} className={cn(navigationMenuTriggerStyle(), "group", className)} {...props}>
|
16
16
|
{children}{" "}
|
17
17
|
<ChevronDown className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180" aria-hidden="true"/>
|
package/ui/sidebar.jsx
CHANGED
@@ -8,7 +8,7 @@ import { cn } from "../lib/utils";
|
|
8
8
|
import { Button } from "../ui/button";
|
9
9
|
import { Input } from "../ui/input";
|
10
10
|
import { Separator } from "../ui/separator";
|
11
|
-
import { Sheet, SheetContent } from "../ui/sheet";
|
11
|
+
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from "../ui/sheet";
|
12
12
|
import { Skeleton } from "../ui/skeleton";
|
13
13
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../ui/tooltip";
|
14
14
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
@@ -98,16 +98,20 @@ const Sidebar = React.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
98
98
|
<SheetContent data-sidebar="sidebar" data-mobile="true" className="w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden" style={{
|
99
99
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
100
100
|
}} side={side}>
|
101
|
+
<SheetHeader className="sr-only">
|
102
|
+
<SheetTitle>Sidebar</SheetTitle>
|
103
|
+
<SheetDescription>Displays the mobile sidebar.</SheetDescription>
|
104
|
+
</SheetHeader>
|
101
105
|
<div className="flex h-full w-full flex-col">{children}</div>
|
102
106
|
</SheetContent>
|
103
107
|
</Sheet>);
|
104
108
|
}
|
105
|
-
return (<div ref={ref} className="group peer hidden
|
109
|
+
return (<div ref={ref} className="group peer hidden text-sidebar-foreground md:block" data-state={state} data-collapsible={state === "collapsed" ? collapsible : ""} data-variant={variant} data-side={side}>
|
106
110
|
{/* This is what handles the sidebar gap on desktop */}
|
107
|
-
<div className={cn("
|
111
|
+
<div className={cn("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset"
|
108
112
|
? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]"
|
109
113
|
: "group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}/>
|
110
|
-
<div className={cn("
|
114
|
+
<div className={cn("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex", side === "left"
|
111
115
|
? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
|
112
116
|
: "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
113
117
|
// Adjust the padding for floating and inset variants.
|
@@ -138,7 +142,7 @@ const SidebarRail = React.forwardRef(({ className, ...props }, ref) => {
|
|
138
142
|
});
|
139
143
|
SidebarRail.displayName = "SidebarRail";
|
140
144
|
const SidebarInset = React.forwardRef(({ className, ...props }, ref) => {
|
141
|
-
return (<main ref={ref} className={cn("relative flex
|
145
|
+
return (<main ref={ref} className={cn("relative flex w-full flex-1 flex-col bg-background", "md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow", className)} {...props}/>);
|
142
146
|
});
|
143
147
|
SidebarInset.displayName = "SidebarInset";
|
144
148
|
const SidebarInput = React.forwardRef(({ className, ...props }, ref) => {
|
@@ -167,7 +171,7 @@ const SidebarGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
167
171
|
SidebarGroup.displayName = "SidebarGroup";
|
168
172
|
const SidebarGroupLabel = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
169
173
|
const Comp = asChild ? Slot : "div";
|
170
|
-
return (<Comp ref={ref} data-sidebar="group-label" className={cn("
|
174
|
+
return (<Comp ref={ref} data-sidebar="group-label" className={cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className)} {...props}/>);
|
171
175
|
});
|
172
176
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
173
177
|
const SidebarGroupAction = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
@@ -226,16 +230,16 @@ const SidebarMenuAction = React.forwardRef(({ className, asChild = false, showOn
|
|
226
230
|
"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", className)} {...props}/>);
|
227
231
|
});
|
228
232
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
229
|
-
const SidebarMenuBadge = React.forwardRef(({ className, ...props }, ref) => (<div ref={ref} data-sidebar="menu-badge" className={cn("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground
|
233
|
+
const SidebarMenuBadge = React.forwardRef(({ className, ...props }, ref) => (<div ref={ref} data-sidebar="menu-badge" className={cn("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", className)} {...props}/>));
|
230
234
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
231
235
|
const SidebarMenuSkeleton = React.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
232
236
|
// Random width between 50 to 90%.
|
233
237
|
const width = React.useMemo(() => {
|
234
238
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
235
239
|
}, []);
|
236
|
-
return (<div ref={ref} data-sidebar="menu-skeleton" className={cn("
|
240
|
+
return (<div ref={ref} data-sidebar="menu-skeleton" className={cn("flex h-8 items-center gap-2 rounded-md px-2", className)} {...props}>
|
237
241
|
{showIcon && (<Skeleton className="size-4 rounded-md" data-sidebar="menu-skeleton-icon"/>)}
|
238
|
-
<Skeleton className="h-4
|
242
|
+
<Skeleton className="h-4 max-w-[--skeleton-width] flex-1" data-sidebar="menu-skeleton-text" style={{
|
239
243
|
"--skeleton-width": width,
|
240
244
|
}}/>
|
241
245
|
</div>);
|