@esmate/shadcn 0.0.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +230 -0
- package/package.json +23 -17
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.js +0 -16
- package/dist/hooks/use-zod-form.d.ts +0 -8
- package/dist/hooks/use-zod-form.js +0 -10
- package/dist/lib/hook-form/react.d.ts +0 -1
- package/dist/lib/hook-form/react.js +0 -1
- package/dist/lib/hook-form/resolvers.d.ts +0 -1
- package/dist/lib/hook-form/resolvers.js +0 -1
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +0 -6
- package/dist/lib/zod.d.ts +0 -1
- package/dist/lib/zod.js +0 -1
- package/dist/styles/minimal.css +0 -1
- package/dist/styles/new-york.css +0 -122
- package/dist/ui/accordion.d.ts +0 -7
- package/dist/ui/accordion.js +0 -39
- package/dist/ui/alert-dialog.d.ts +0 -14
- package/dist/ui/alert-dialog.js +0 -80
- package/dist/ui/alert.d.ts +0 -9
- package/dist/ui/alert.js +0 -39
- package/dist/ui/aspect-ratio.d.ts +0 -3
- package/dist/ui/aspect-ratio.js +0 -9
- package/dist/ui/avatar.d.ts +0 -6
- package/dist/ui/avatar.js +0 -26
- package/dist/ui/badge.d.ts +0 -9
- package/dist/ui/badge.js +0 -28
- package/dist/ui/breadcrumb.d.ts +0 -11
- package/dist/ui/breadcrumb.js +0 -66
- package/dist/ui/button.d.ts +0 -10
- package/dist/ui/button.js +0 -39
- package/dist/ui/calendar.d.ts +0 -4
- package/dist/ui/calendar.js +0 -53
- package/dist/ui/card.d.ts +0 -9
- package/dist/ui/card.js +0 -52
- package/dist/ui/carousel.d.ts +0 -19
- package/dist/ui/carousel.js +0 -135
- package/dist/ui/chart.d.ts +0 -40
- package/dist/ui/chart.js +0 -138
- package/dist/ui/checkbox.d.ts +0 -4
- package/dist/ui/checkbox.js +0 -18
- package/dist/ui/collapsible.d.ts +0 -5
- package/dist/ui/collapsible.js +0 -21
- package/dist/ui/command.d.ts +0 -16
- package/dist/ui/command.js +0 -77
- package/dist/ui/context-menu.d.ts +0 -25
- package/dist/ui/context-menu.js +0 -120
- package/dist/ui/dialog.d.ts +0 -13
- package/dist/ui/dialog.js +0 -78
- package/dist/ui/drawer.d.ts +0 -13
- package/dist/ui/drawer.js +0 -75
- package/dist/ui/dropdown-menu.d.ts +0 -25
- package/dist/ui/dropdown-menu.js +0 -121
- package/dist/ui/form.d.ts +0 -24
- package/dist/ui/form.js +0 -86
- package/dist/ui/hover-card.d.ts +0 -6
- package/dist/ui/hover-card.js +0 -28
- package/dist/ui/input-otp.d.ts +0 -11
- package/dist/ui/input-otp.js +0 -42
- package/dist/ui/input.d.ts +0 -3
- package/dist/ui/input.js +0 -11
- package/dist/ui/label.d.ts +0 -4
- package/dist/ui/label.js +0 -12
- package/dist/ui/menubar.d.ts +0 -26
- package/dist/ui/menubar.js +0 -131
- package/dist/ui/navigation-menu.d.ts +0 -14
- package/dist/ui/navigation-menu.js +0 -71
- package/dist/ui/pagination.d.ts +0 -13
- package/dist/ui/pagination.js +0 -71
- package/dist/ui/popover.d.ts +0 -7
- package/dist/ui/popover.js +0 -32
- package/dist/ui/progress.d.ts +0 -4
- package/dist/ui/progress.js +0 -18
- package/dist/ui/radio-group.d.ts +0 -5
- package/dist/ui/radio-group.js +0 -25
- package/dist/ui/resizable.d.ts +0 -8
- package/dist/ui/resizable.js +0 -30
- package/dist/ui/scroll-area.d.ts +0 -5
- package/dist/ui/scroll-area.js +0 -26
- package/dist/ui/select.d.ts +0 -15
- package/dist/ui/select.js +0 -89
- package/dist/ui/separator.d.ts +0 -4
- package/dist/ui/separator.js +0 -14
- package/dist/ui/sheet.d.ts +0 -13
- package/dist/ui/sheet.js +0 -78
- package/dist/ui/sidebar.d.ts +0 -69
- package/dist/ui/sidebar.js +0 -368
- package/dist/ui/skeleton.d.ts +0 -2
- package/dist/ui/skeleton.js +0 -9
- package/dist/ui/slider.d.ts +0 -4
- package/dist/ui/slider.js +0 -37
- package/dist/ui/sonner.d.ts +0 -3
- package/dist/ui/sonner.js +0 -17
- package/dist/ui/switch.d.ts +0 -4
- package/dist/ui/switch.js +0 -15
- package/dist/ui/table.d.ts +0 -10
- package/dist/ui/table.js +0 -63
- package/dist/ui/tabs.d.ts +0 -7
- package/dist/ui/tabs.js +0 -33
- package/dist/ui/textarea.d.ts +0 -3
- package/dist/ui/textarea.js +0 -10
- package/dist/ui/toggle-group.d.ts +0 -7
- package/dist/ui/toggle-group.js +0 -37
- package/dist/ui/toggle.d.ts +0 -9
- package/dist/ui/toggle.js +0 -34
- package/dist/ui/tooltip.d.ts +0 -7
- package/dist/ui/tooltip.js +0 -34
package/dist/ui/separator.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_separator_30da60f9__ from "@radix-ui/react-separator";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
5
|
-
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
6
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_separator_30da60f9__.Root, {
|
|
7
|
-
"data-slot": "separator-root",
|
|
8
|
-
decorative: decorative,
|
|
9
|
-
orientation: orientation,
|
|
10
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
export { Separator };
|
package/dist/ui/sheet.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
7
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
package/dist/ui/sheet.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__ from "@radix-ui/react-dialog";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
6
|
-
function Sheet({ ...props }) {
|
|
7
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Root, {
|
|
8
|
-
"data-slot": "sheet",
|
|
9
|
-
...props
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function SheetTrigger({ ...props }) {
|
|
13
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Trigger, {
|
|
14
|
-
"data-slot": "sheet-trigger",
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function SheetClose({ ...props }) {
|
|
19
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Close, {
|
|
20
|
-
"data-slot": "sheet-close",
|
|
21
|
-
...props
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function SheetPortal({ ...props }) {
|
|
25
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Portal, {
|
|
26
|
-
"data-slot": "sheet-portal",
|
|
27
|
-
...props
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function SheetOverlay({ className, ...props }) {
|
|
31
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Overlay, {
|
|
32
|
-
"data-slot": "sheet-overlay",
|
|
33
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.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),
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function SheetContent({ className, children, side = "right", ...props }) {
|
|
38
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(SheetPortal, null, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(SheetOverlay, null), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Content, {
|
|
39
|
-
"data-slot": "sheet-content",
|
|
40
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", "right" === side && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", "left" === side && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", "top" === side && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", "bottom" === side && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
|
|
41
|
-
...props
|
|
42
|
-
}, children, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Close, {
|
|
43
|
-
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"
|
|
44
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.XIcon, {
|
|
45
|
-
className: "size-4"
|
|
46
|
-
}), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
47
|
-
className: "sr-only"
|
|
48
|
-
}, "Close"))));
|
|
49
|
-
}
|
|
50
|
-
function SheetHeader({ className, ...props }) {
|
|
51
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
52
|
-
"data-slot": "sheet-header",
|
|
53
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex flex-col gap-1.5 p-4", className),
|
|
54
|
-
...props
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function SheetFooter({ className, ...props }) {
|
|
58
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
59
|
-
"data-slot": "sheet-footer",
|
|
60
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("mt-auto flex flex-col gap-2 p-4", className),
|
|
61
|
-
...props
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function SheetTitle({ className, ...props }) {
|
|
65
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Title, {
|
|
66
|
-
"data-slot": "sheet-title",
|
|
67
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-foreground font-semibold", className),
|
|
68
|
-
...props
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
function SheetDescription({ className, ...props }) {
|
|
72
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Description, {
|
|
73
|
-
"data-slot": "sheet-description",
|
|
74
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-muted-foreground text-sm", className),
|
|
75
|
-
...props
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
package/dist/ui/sidebar.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import { Button } from "./button";
|
|
4
|
-
import { Input } from "./input";
|
|
5
|
-
import { Separator } from "./separator";
|
|
6
|
-
import { TooltipContent } from "./tooltip";
|
|
7
|
-
type SidebarContextProps = {
|
|
8
|
-
state: "expanded" | "collapsed";
|
|
9
|
-
open: boolean;
|
|
10
|
-
setOpen: (open: boolean) => void;
|
|
11
|
-
openMobile: boolean;
|
|
12
|
-
setOpenMobile: (open: boolean) => void;
|
|
13
|
-
isMobile: boolean;
|
|
14
|
-
toggleSidebar: () => void;
|
|
15
|
-
};
|
|
16
|
-
declare function useSidebar(): SidebarContextProps;
|
|
17
|
-
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
|
|
18
|
-
defaultOpen?: boolean;
|
|
19
|
-
open?: boolean;
|
|
20
|
-
onOpenChange?: (open: boolean) => void;
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<"div"> & {
|
|
23
|
-
side?: "left" | "right";
|
|
24
|
-
variant?: "sidebar" | "floating" | "inset";
|
|
25
|
-
collapsible?: "offcanvas" | "icon" | "none";
|
|
26
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
37
|
-
asChild?: boolean;
|
|
38
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<"button"> & {
|
|
40
|
-
asChild?: boolean;
|
|
41
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
43
|
-
declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
declare const sidebarMenuButtonVariants: (props?: ({
|
|
46
|
-
variant?: "default" | "outline" | null | undefined;
|
|
47
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
48
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
49
|
-
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
|
|
50
|
-
asChild?: boolean;
|
|
51
|
-
isActive?: boolean;
|
|
52
|
-
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
53
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React.ComponentProps<"button"> & {
|
|
55
|
-
asChild?: boolean;
|
|
56
|
-
showOnHover?: boolean;
|
|
57
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
58
|
-
declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
|
|
60
|
-
showIcon?: boolean;
|
|
61
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
62
|
-
declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
63
|
-
declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
64
|
-
declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React.ComponentProps<"a"> & {
|
|
65
|
-
asChild?: boolean;
|
|
66
|
-
size?: "sm" | "md";
|
|
67
|
-
isActive?: boolean;
|
|
68
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
69
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
package/dist/ui/sidebar.js
DELETED
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__ from "@radix-ui/react-slot";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE_class_variance_authority_159ad65c__ from "class-variance-authority";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
6
|
-
import * as __WEBPACK_EXTERNAL_MODULE__hooks_use_mobile_js_7eed1184__ from "../hooks/use-mobile.js";
|
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
8
|
-
import * as __WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__ from "./button.js";
|
|
9
|
-
import * as __WEBPACK_EXTERNAL_MODULE__input_js_53f4619d__ from "./input.js";
|
|
10
|
-
import * as __WEBPACK_EXTERNAL_MODULE__separator_js_5c835db5__ from "./separator.js";
|
|
11
|
-
import * as __WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__ from "./sheet.js";
|
|
12
|
-
import * as __WEBPACK_EXTERNAL_MODULE__skeleton_js_fad59023__ from "./skeleton.js";
|
|
13
|
-
import * as __WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__ from "./tooltip.js";
|
|
14
|
-
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
15
|
-
const SIDEBAR_COOKIE_MAX_AGE = 604800;
|
|
16
|
-
const SIDEBAR_WIDTH = "16rem";
|
|
17
|
-
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
18
|
-
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
19
|
-
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
20
|
-
const SidebarContext = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createContext(null);
|
|
21
|
-
function useSidebar() {
|
|
22
|
-
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(SidebarContext);
|
|
23
|
-
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
24
|
-
return context;
|
|
25
|
-
}
|
|
26
|
-
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
|
|
27
|
-
const isMobile = (0, __WEBPACK_EXTERNAL_MODULE__hooks_use_mobile_js_7eed1184__.useIsMobile)();
|
|
28
|
-
const [openMobile, setOpenMobile] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
29
|
-
const [_open, _setOpen] = __WEBPACK_EXTERNAL_MODULE_react__.useState(defaultOpen);
|
|
30
|
-
const open = openProp ?? _open;
|
|
31
|
-
const setOpen = __WEBPACK_EXTERNAL_MODULE_react__.useCallback((value)=>{
|
|
32
|
-
const openState = "function" == typeof value ? value(open) : value;
|
|
33
|
-
if (setOpenProp) setOpenProp(openState);
|
|
34
|
-
else _setOpen(openState);
|
|
35
|
-
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
36
|
-
}, [
|
|
37
|
-
setOpenProp,
|
|
38
|
-
open
|
|
39
|
-
]);
|
|
40
|
-
const toggleSidebar = __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>isMobile ? setOpenMobile((open)=>!open) : setOpen((open)=>!open), [
|
|
41
|
-
isMobile,
|
|
42
|
-
setOpen,
|
|
43
|
-
setOpenMobile
|
|
44
|
-
]);
|
|
45
|
-
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
46
|
-
const handleKeyDown = (event)=>{
|
|
47
|
-
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
48
|
-
event.preventDefault();
|
|
49
|
-
toggleSidebar();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
53
|
-
return ()=>window.removeEventListener("keydown", handleKeyDown);
|
|
54
|
-
}, [
|
|
55
|
-
toggleSidebar
|
|
56
|
-
]);
|
|
57
|
-
const state = open ? "expanded" : "collapsed";
|
|
58
|
-
const contextValue = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>({
|
|
59
|
-
state,
|
|
60
|
-
open,
|
|
61
|
-
setOpen,
|
|
62
|
-
isMobile,
|
|
63
|
-
openMobile,
|
|
64
|
-
setOpenMobile,
|
|
65
|
-
toggleSidebar
|
|
66
|
-
}), [
|
|
67
|
-
state,
|
|
68
|
-
open,
|
|
69
|
-
setOpen,
|
|
70
|
-
isMobile,
|
|
71
|
-
openMobile,
|
|
72
|
-
setOpenMobile,
|
|
73
|
-
toggleSidebar
|
|
74
|
-
]);
|
|
75
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(SidebarContext.Provider, {
|
|
76
|
-
value: contextValue
|
|
77
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__.TooltipProvider, {
|
|
78
|
-
delayDuration: 0
|
|
79
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
80
|
-
"data-slot": "sidebar-wrapper",
|
|
81
|
-
style: {
|
|
82
|
-
"--sidebar-width": SIDEBAR_WIDTH,
|
|
83
|
-
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
84
|
-
...style
|
|
85
|
-
},
|
|
86
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
|
|
87
|
-
...props
|
|
88
|
-
}, children)));
|
|
89
|
-
}
|
|
90
|
-
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }) {
|
|
91
|
-
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
92
|
-
if ("none" === collapsible) return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
93
|
-
"data-slot": "sidebar",
|
|
94
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
|
|
95
|
-
...props
|
|
96
|
-
}, children);
|
|
97
|
-
if (isMobile) return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.Sheet, {
|
|
98
|
-
open: openMobile,
|
|
99
|
-
onOpenChange: setOpenMobile,
|
|
100
|
-
...props
|
|
101
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.SheetContent, {
|
|
102
|
-
"data-sidebar": "sidebar",
|
|
103
|
-
"data-slot": "sidebar",
|
|
104
|
-
"data-mobile": "true",
|
|
105
|
-
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
106
|
-
style: {
|
|
107
|
-
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
108
|
-
},
|
|
109
|
-
side: side
|
|
110
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.SheetHeader, {
|
|
111
|
-
className: "sr-only"
|
|
112
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.SheetTitle, null, "Sidebar"), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.SheetDescription, null, "Displays the mobile sidebar.")), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
113
|
-
className: "flex h-full w-full flex-col"
|
|
114
|
-
}, children)));
|
|
115
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
116
|
-
className: "group peer text-sidebar-foreground hidden md:block",
|
|
117
|
-
"data-state": state,
|
|
118
|
-
"data-collapsible": "collapsed" === state ? collapsible : "",
|
|
119
|
-
"data-variant": variant,
|
|
120
|
-
"data-side": side,
|
|
121
|
-
"data-slot": "sidebar"
|
|
122
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
123
|
-
"data-slot": "sidebar-gap",
|
|
124
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.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", "floating" === variant || "inset" === variant ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
125
|
-
}), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
126
|
-
"data-slot": "sidebar-container",
|
|
127
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", "left" === side ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", "floating" === variant || "inset" === variant ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
128
|
-
...props
|
|
129
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
130
|
-
"data-sidebar": "sidebar",
|
|
131
|
-
"data-slot": "sidebar-inner",
|
|
132
|
-
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"
|
|
133
|
-
}, children)));
|
|
134
|
-
}
|
|
135
|
-
function SidebarTrigger({ className, onClick, ...props }) {
|
|
136
|
-
const { toggleSidebar } = useSidebar();
|
|
137
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__.Button, {
|
|
138
|
-
"data-sidebar": "trigger",
|
|
139
|
-
"data-slot": "sidebar-trigger",
|
|
140
|
-
variant: "ghost",
|
|
141
|
-
size: "icon",
|
|
142
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("size-7", className),
|
|
143
|
-
onClick: (event)=>{
|
|
144
|
-
null == onClick || onClick(event);
|
|
145
|
-
toggleSidebar();
|
|
146
|
-
},
|
|
147
|
-
...props
|
|
148
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.PanelLeftIcon, null), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
149
|
-
className: "sr-only"
|
|
150
|
-
}, "Toggle Sidebar"));
|
|
151
|
-
}
|
|
152
|
-
function SidebarRail({ className, ...props }) {
|
|
153
|
-
const { toggleSidebar } = useSidebar();
|
|
154
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("button", {
|
|
155
|
-
"data-sidebar": "rail",
|
|
156
|
-
"data-slot": "sidebar-rail",
|
|
157
|
-
"aria-label": "Toggle Sidebar",
|
|
158
|
-
tabIndex: -1,
|
|
159
|
-
onClick: toggleSidebar,
|
|
160
|
-
title: "Toggle Sidebar",
|
|
161
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
162
|
-
...props
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
function SidebarInset({ className, ...props }) {
|
|
166
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("main", {
|
|
167
|
-
"data-slot": "sidebar-inset",
|
|
168
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
|
|
169
|
-
...props
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
function SidebarInput({ className, ...props }) {
|
|
173
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__input_js_53f4619d__.Input, {
|
|
174
|
-
"data-slot": "sidebar-input",
|
|
175
|
-
"data-sidebar": "input",
|
|
176
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-background h-8 w-full shadow-none", className),
|
|
177
|
-
...props
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
function SidebarHeader({ className, ...props }) {
|
|
181
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
182
|
-
"data-slot": "sidebar-header",
|
|
183
|
-
"data-sidebar": "header",
|
|
184
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex flex-col gap-2 p-2", className),
|
|
185
|
-
...props
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
function SidebarFooter({ className, ...props }) {
|
|
189
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
190
|
-
"data-slot": "sidebar-footer",
|
|
191
|
-
"data-sidebar": "footer",
|
|
192
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex flex-col gap-2 p-2", className),
|
|
193
|
-
...props
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
function SidebarSeparator({ className, ...props }) {
|
|
197
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__separator_js_5c835db5__.Separator, {
|
|
198
|
-
"data-slot": "sidebar-separator",
|
|
199
|
-
"data-sidebar": "separator",
|
|
200
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-sidebar-border mx-2 w-auto", className),
|
|
201
|
-
...props
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
function SidebarContent({ className, ...props }) {
|
|
205
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
206
|
-
"data-slot": "sidebar-content",
|
|
207
|
-
"data-sidebar": "content",
|
|
208
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
209
|
-
...props
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
function SidebarGroup({ className, ...props }) {
|
|
213
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
214
|
-
"data-slot": "sidebar-group",
|
|
215
|
-
"data-sidebar": "group",
|
|
216
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("relative flex w-full min-w-0 flex-col p-2", className),
|
|
217
|
-
...props
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
221
|
-
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "div";
|
|
222
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
223
|
-
"data-slot": "sidebar-group-label",
|
|
224
|
-
"data-sidebar": "group-label",
|
|
225
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden 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),
|
|
226
|
-
...props
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
230
|
-
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "button";
|
|
231
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
232
|
-
"data-slot": "sidebar-group-action",
|
|
233
|
-
"data-sidebar": "group-action",
|
|
234
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", className),
|
|
235
|
-
...props
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
function SidebarGroupContent({ className, ...props }) {
|
|
239
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
240
|
-
"data-slot": "sidebar-group-content",
|
|
241
|
-
"data-sidebar": "group-content",
|
|
242
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("w-full text-sm", className),
|
|
243
|
-
...props
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
function SidebarMenu({ className, ...props }) {
|
|
247
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("ul", {
|
|
248
|
-
"data-slot": "sidebar-menu",
|
|
249
|
-
"data-sidebar": "menu",
|
|
250
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex w-full min-w-0 flex-col gap-1", className),
|
|
251
|
-
...props
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
function SidebarMenuItem({ className, ...props }) {
|
|
255
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("li", {
|
|
256
|
-
"data-slot": "sidebar-menu-item",
|
|
257
|
-
"data-sidebar": "menu-item",
|
|
258
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("group/menu-item relative", className),
|
|
259
|
-
...props
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
const sidebarMenuButtonVariants = (0, __WEBPACK_EXTERNAL_MODULE_class_variance_authority_159ad65c__.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
263
|
-
variants: {
|
|
264
|
-
variant: {
|
|
265
|
-
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
266
|
-
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
267
|
-
},
|
|
268
|
-
size: {
|
|
269
|
-
default: "h-8 text-sm",
|
|
270
|
-
sm: "h-7 text-xs",
|
|
271
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
defaultVariants: {
|
|
275
|
-
variant: "default",
|
|
276
|
-
size: "default"
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
function SidebarMenuButton({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
|
|
280
|
-
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "button";
|
|
281
|
-
const { isMobile, state } = useSidebar();
|
|
282
|
-
const button = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
283
|
-
"data-slot": "sidebar-menu-button",
|
|
284
|
-
"data-sidebar": "menu-button",
|
|
285
|
-
"data-size": size,
|
|
286
|
-
"data-active": isActive,
|
|
287
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)(sidebarMenuButtonVariants({
|
|
288
|
-
variant,
|
|
289
|
-
size
|
|
290
|
-
}), className),
|
|
291
|
-
...props
|
|
292
|
-
});
|
|
293
|
-
if (!tooltip) return button;
|
|
294
|
-
if ("string" == typeof tooltip) tooltip = {
|
|
295
|
-
children: tooltip
|
|
296
|
-
};
|
|
297
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__.Tooltip, null, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__.TooltipTrigger, {
|
|
298
|
-
asChild: true
|
|
299
|
-
}, button), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__.TooltipContent, {
|
|
300
|
-
side: "right",
|
|
301
|
-
align: "center",
|
|
302
|
-
hidden: "collapsed" !== state || isMobile,
|
|
303
|
-
...tooltip
|
|
304
|
-
}));
|
|
305
|
-
}
|
|
306
|
-
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
307
|
-
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "button";
|
|
308
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
309
|
-
"data-slot": "sidebar-menu-action",
|
|
310
|
-
"data-sidebar": "menu-action",
|
|
311
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "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", showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", className),
|
|
312
|
-
...props
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
function SidebarMenuBadge({ className, ...props }) {
|
|
316
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
317
|
-
"data-slot": "sidebar-menu-badge",
|
|
318
|
-
"data-sidebar": "menu-badge",
|
|
319
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "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),
|
|
320
|
-
...props
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
324
|
-
const width = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>`${Math.floor(40 * Math.random()) + 50}%`, []);
|
|
325
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
326
|
-
"data-slot": "sidebar-menu-skeleton",
|
|
327
|
-
"data-sidebar": "menu-skeleton",
|
|
328
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
329
|
-
...props
|
|
330
|
-
}, showIcon && /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__skeleton_js_fad59023__.Skeleton, {
|
|
331
|
-
className: "size-4 rounded-md",
|
|
332
|
-
"data-sidebar": "menu-skeleton-icon"
|
|
333
|
-
}), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__skeleton_js_fad59023__.Skeleton, {
|
|
334
|
-
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
335
|
-
"data-sidebar": "menu-skeleton-text",
|
|
336
|
-
style: {
|
|
337
|
-
"--skeleton-width": width
|
|
338
|
-
}
|
|
339
|
-
}));
|
|
340
|
-
}
|
|
341
|
-
function SidebarMenuSub({ className, ...props }) {
|
|
342
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("ul", {
|
|
343
|
-
"data-slot": "sidebar-menu-sub",
|
|
344
|
-
"data-sidebar": "menu-sub",
|
|
345
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", className),
|
|
346
|
-
...props
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
function SidebarMenuSubItem({ className, ...props }) {
|
|
350
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("li", {
|
|
351
|
-
"data-slot": "sidebar-menu-sub-item",
|
|
352
|
-
"data-sidebar": "menu-sub-item",
|
|
353
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("group/menu-sub-item relative", className),
|
|
354
|
-
...props
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
|
|
358
|
-
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "a";
|
|
359
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
360
|
-
"data-slot": "sidebar-menu-sub-button",
|
|
361
|
-
"data-sidebar": "menu-sub-button",
|
|
362
|
-
"data-size": size,
|
|
363
|
-
"data-active": isActive,
|
|
364
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", "sm" === size && "text-xs", "md" === size && "text-sm", "group-data-[collapsible=icon]:hidden", className),
|
|
365
|
-
...props
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
package/dist/ui/skeleton.d.ts
DELETED
package/dist/ui/skeleton.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
2
|
-
function Skeleton({ className, ...props }) {
|
|
3
|
-
return /*#__PURE__*/ React.createElement("div", {
|
|
4
|
-
"data-slot": "skeleton",
|
|
5
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-accent animate-pulse rounded-md", className),
|
|
6
|
-
...props
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
export { Skeleton };
|
package/dist/ui/slider.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
-
declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export { Slider };
|
package/dist/ui/slider.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__ from "@radix-ui/react-slider";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
5
|
-
function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
6
|
-
const _values = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [
|
|
7
|
-
min,
|
|
8
|
-
max
|
|
9
|
-
], [
|
|
10
|
-
value,
|
|
11
|
-
defaultValue,
|
|
12
|
-
min,
|
|
13
|
-
max
|
|
14
|
-
]);
|
|
15
|
-
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__.Root, {
|
|
16
|
-
"data-slot": "slider",
|
|
17
|
-
defaultValue: defaultValue,
|
|
18
|
-
value: value,
|
|
19
|
-
min: min,
|
|
20
|
-
max: max,
|
|
21
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
|
|
22
|
-
...props
|
|
23
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__.Track, {
|
|
24
|
-
"data-slot": "slider-track",
|
|
25
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")
|
|
26
|
-
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__.Range, {
|
|
27
|
-
"data-slot": "slider-range",
|
|
28
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
29
|
-
})), Array.from({
|
|
30
|
-
length: _values.length
|
|
31
|
-
}, (_, index)=>/*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__.Thumb, {
|
|
32
|
-
"data-slot": "slider-thumb",
|
|
33
|
-
key: index,
|
|
34
|
-
className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
35
|
-
})));
|
|
36
|
-
}
|
|
37
|
-
export { Slider };
|
package/dist/ui/sonner.d.ts
DELETED
package/dist/ui/sonner.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_next_themes_25055421__ from "next-themes";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_sonner__ from "sonner";
|
|
4
|
-
const Toaster = ({ ...props })=>{
|
|
5
|
-
const { theme = "system" } = (0, __WEBPACK_EXTERNAL_MODULE_next_themes_25055421__.useTheme)();
|
|
6
|
-
return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE_sonner__.Toaster, {
|
|
7
|
-
theme: theme,
|
|
8
|
-
className: "toaster group",
|
|
9
|
-
style: {
|
|
10
|
-
"--normal-bg": "var(--popover)",
|
|
11
|
-
"--normal-text": "var(--popover-foreground)",
|
|
12
|
-
"--normal-border": "var(--border)"
|
|
13
|
-
},
|
|
14
|
-
...props
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
export { Toaster };
|