@arolariu/components 0.2.0 → 0.3.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/changelog.md +15 -0
- package/dist/components/ui/accordion.d.ts +4 -4
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +19 -27
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +17 -11
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +38 -61
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +4 -5
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +17 -20
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +1 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -8
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -3
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +16 -19
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +3 -3
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +7 -10
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +16 -8
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +28 -35
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button-group.d.ts +13 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +47 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +3 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +15 -14
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js +20 -20
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +7 -8
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +31 -44
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +5 -6
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +29 -20
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +35 -27
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +28 -26
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +10 -12
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +2 -4
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +31 -20
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts +78 -16
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +47 -72
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +21 -19
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +57 -101
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +16 -12
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +36 -64
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +19 -10
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +32 -57
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +21 -19
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +64 -108
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +1 -1
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +2 -5
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +65 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +135 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/form.d.ts +5 -6
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +29 -28
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +3 -3
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +11 -25
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +91 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +30 -7
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +22 -25
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +6 -7
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +2 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +8 -7
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +18 -16
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +73 -93
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +8 -10
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +36 -55
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +24 -9
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +33 -45
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +4 -4
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +9 -25
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +5 -7
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +16 -19
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +20 -4
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +8 -19
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +2 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +12 -16
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +10 -12
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +54 -77
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +6 -7
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +23 -11
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +54 -66
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +34 -38
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +116 -124
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +1 -2
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +11 -30
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +4 -2
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -4
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +7 -9
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +8 -8
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +36 -45
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +17 -26
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +6 -7
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +8 -3
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +11 -15
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +4 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +7 -8
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +4 -4
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +13 -38
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +2 -6
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/index.css +839 -1126
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/package.json +37 -2
- package/src/components/ui/accordion.tsx +43 -44
- package/src/components/ui/alert-dialog.tsx +88 -99
- package/src/components/ui/alert.tsx +24 -25
- package/src/components/ui/aspect-ratio.tsx +1 -9
- package/src/components/ui/avatar.tsx +33 -27
- package/src/components/ui/badge.tsx +8 -16
- package/src/components/ui/breadcrumb.tsx +70 -73
- package/src/components/ui/button-group.tsx +69 -0
- package/src/components/ui/button.tsx +18 -24
- package/src/components/ui/calendar.tsx +20 -20
- package/src/components/ui/card.tsx +52 -71
- package/src/components/ui/carousel.tsx +145 -133
- package/src/components/ui/chart.tsx +174 -182
- package/src/components/ui/checkbox.tsx +18 -18
- package/src/components/ui/collapsible.tsx +2 -26
- package/src/components/ui/command.tsx +101 -99
- package/src/components/ui/context-menu.tsx +150 -193
- package/src/components/ui/dialog.tsx +75 -110
- package/src/components/ui/drawer.tsx +74 -102
- package/src/components/ui/dropdown-menu.tsx +153 -200
- package/src/components/ui/dropdrawer.tsx +0 -5
- package/src/components/ui/empty.tsx +86 -0
- package/src/components/ui/field.tsx +199 -0
- package/src/components/ui/form.tsx +49 -50
- package/src/components/ui/hover-card.tsx +18 -37
- package/src/components/ui/input-group.tsx +145 -0
- package/src/components/ui/input-otp.tsx +49 -59
- package/src/components/ui/input.tsx +5 -6
- package/src/components/ui/item.tsx +163 -0
- package/src/components/ui/kbd.tsx +31 -0
- package/src/components/ui/label.tsx +14 -12
- package/src/components/ui/menubar.tsx +178 -201
- package/src/components/ui/navigation-menu.tsx +84 -100
- package/src/components/ui/pagination.tsx +75 -85
- package/src/components/ui/popover.tsx +19 -38
- package/src/components/ui/progress.tsx +15 -14
- package/src/components/ui/radio-group.tsx +19 -13
- package/src/components/ui/resizable.tsx +23 -36
- package/src/components/ui/scroll-area.tsx +32 -35
- package/src/components/ui/select.tsx +112 -127
- package/src/components/ui/separator.tsx +17 -19
- package/src/components/ui/sheet.tsx +87 -108
- package/src/components/ui/sidebar.tsx +276 -279
- package/src/components/ui/skeleton.tsx +2 -3
- package/src/components/ui/slider.tsx +15 -40
- package/src/components/ui/sonner.tsx +15 -9
- package/src/components/ui/spinner.tsx +18 -0
- package/src/components/ui/switch.tsx +18 -17
- package/src/components/ui/table.tsx +66 -71
- package/src/components/ui/tabs.tsx +36 -36
- package/src/components/ui/textarea.tsx +5 -4
- package/src/components/ui/toggle-group.tsx +21 -34
- package/src/components/ui/toggle.tsx +14 -16
- package/src/components/ui/tooltip.tsx +19 -43
- package/src/components/ui/typewriter.tsx +3 -4
- package/src/index.css +6 -6
- package/src/index.ts +43 -4
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import {
|
|
6
|
-
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
5
|
+
import { PanelLeft } from "lucide-react";
|
|
6
|
+
import { createContext, forwardRef, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
7
7
|
import { Button } from "./button.js";
|
|
8
8
|
import { Input } from "./input.js";
|
|
9
9
|
import { Separator } from "./separator.js";
|
|
@@ -24,7 +24,7 @@ function useSidebar() {
|
|
|
24
24
|
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
25
25
|
return context;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
const SidebarProvider = /*#__PURE__*/ forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref)=>{
|
|
28
28
|
const isMobile = useIsMobile();
|
|
29
29
|
const [openMobile, setOpenMobile] = useState(false);
|
|
30
30
|
const [_open, _setOpen] = useState(defaultOpen);
|
|
@@ -50,8 +50,8 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
50
50
|
toggleSidebar();
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
54
|
-
return ()=>window.removeEventListener("keydown", handleKeyDown);
|
|
53
|
+
globalThis.window.addEventListener("keydown", handleKeyDown);
|
|
54
|
+
return ()=>globalThis.window.removeEventListener("keydown", handleKeyDown);
|
|
55
55
|
}, [
|
|
56
56
|
toggleSidebar
|
|
57
57
|
]);
|
|
@@ -78,24 +78,25 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
78
78
|
children: /*#__PURE__*/ jsx(TooltipProvider, {
|
|
79
79
|
delayDuration: 0,
|
|
80
80
|
children: /*#__PURE__*/ jsx("div", {
|
|
81
|
-
"data-slot": "sidebar-wrapper",
|
|
82
81
|
style: {
|
|
83
82
|
"--sidebar-width": SIDEBAR_WIDTH,
|
|
84
83
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
85
84
|
...style
|
|
86
85
|
},
|
|
87
|
-
className: cn("group/sidebar-wrapper has-data-
|
|
86
|
+
className: cn("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full", className),
|
|
87
|
+
ref: ref,
|
|
88
88
|
...props,
|
|
89
89
|
children: children
|
|
90
90
|
})
|
|
91
91
|
})
|
|
92
92
|
});
|
|
93
|
-
}
|
|
94
|
-
|
|
93
|
+
});
|
|
94
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
95
|
+
const Sidebar = /*#__PURE__*/ forwardRef(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref)=>{
|
|
95
96
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
96
97
|
if ("none" === collapsible) return /*#__PURE__*/ jsx("div", {
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
className: cn("bg-sidebar text-sidebar-foreground flex h-full w-[--sidebar-width] flex-col", className),
|
|
99
|
+
ref: ref,
|
|
99
100
|
...props,
|
|
100
101
|
children: children
|
|
101
102
|
});
|
|
@@ -105,9 +106,8 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
105
106
|
...props,
|
|
106
107
|
children: /*#__PURE__*/ jsxs(SheetContent, {
|
|
107
108
|
"data-sidebar": "sidebar",
|
|
108
|
-
"data-slot": "sidebar",
|
|
109
109
|
"data-mobile": "true",
|
|
110
|
-
className: "bg-sidebar text-sidebar-foreground w-
|
|
110
|
+
className: "bg-sidebar text-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden",
|
|
111
111
|
style: {
|
|
112
112
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
113
113
|
},
|
|
@@ -132,164 +132,157 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
132
132
|
})
|
|
133
133
|
});
|
|
134
134
|
return /*#__PURE__*/ jsxs("div", {
|
|
135
|
+
ref: ref,
|
|
135
136
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
136
137
|
"data-state": state,
|
|
137
138
|
"data-collapsible": "collapsed" === state ? collapsible : "",
|
|
138
139
|
"data-variant": variant,
|
|
139
140
|
"data-side": side,
|
|
140
|
-
"data-slot": "sidebar",
|
|
141
141
|
children: [
|
|
142
142
|
/*#__PURE__*/ jsx("div", {
|
|
143
|
-
"data-
|
|
144
|
-
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", "floating" === variant || "inset" === variant ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
143
|
+
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", "floating" === variant || "inset" === variant ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]")
|
|
145
144
|
}),
|
|
146
145
|
/*#__PURE__*/ jsx("div", {
|
|
147
|
-
"data-
|
|
148
|
-
className: 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),
|
|
146
|
+
className: 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)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
149
147
|
...props,
|
|
150
148
|
children: /*#__PURE__*/ jsx("div", {
|
|
151
149
|
"data-sidebar": "sidebar",
|
|
152
|
-
"data-
|
|
153
|
-
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",
|
|
150
|
+
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",
|
|
154
151
|
children: children
|
|
155
152
|
})
|
|
156
153
|
})
|
|
157
154
|
]
|
|
158
155
|
});
|
|
159
|
-
}
|
|
160
|
-
|
|
156
|
+
});
|
|
157
|
+
Sidebar.displayName = "Sidebar";
|
|
158
|
+
const SidebarTrigger = /*#__PURE__*/ forwardRef(({ className, onClick, ...props }, ref)=>{
|
|
161
159
|
const { toggleSidebar } = useSidebar();
|
|
162
160
|
return /*#__PURE__*/ jsxs(Button, {
|
|
161
|
+
ref: ref,
|
|
163
162
|
"data-sidebar": "trigger",
|
|
164
|
-
"data-slot": "sidebar-trigger",
|
|
165
163
|
variant: "ghost",
|
|
166
164
|
size: "icon",
|
|
167
|
-
className: cn("
|
|
165
|
+
className: cn("h-7 w-7", className),
|
|
168
166
|
onClick: (event)=>{
|
|
169
167
|
onClick?.(event);
|
|
170
168
|
toggleSidebar();
|
|
171
169
|
},
|
|
172
170
|
...props,
|
|
173
171
|
children: [
|
|
174
|
-
/*#__PURE__*/ jsx(
|
|
172
|
+
/*#__PURE__*/ jsx(PanelLeft, {}),
|
|
175
173
|
/*#__PURE__*/ jsx("span", {
|
|
176
174
|
className: "sr-only",
|
|
177
175
|
children: "Toggle Sidebar"
|
|
178
176
|
})
|
|
179
177
|
]
|
|
180
178
|
});
|
|
181
|
-
}
|
|
182
|
-
|
|
179
|
+
});
|
|
180
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
181
|
+
const SidebarRail = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
183
182
|
const { toggleSidebar } = useSidebar();
|
|
184
183
|
return /*#__PURE__*/ jsx("button", {
|
|
184
|
+
ref: ref,
|
|
185
185
|
"data-sidebar": "rail",
|
|
186
|
-
"data-slot": "sidebar-rail",
|
|
187
186
|
"aria-label": "Toggle Sidebar",
|
|
188
187
|
tabIndex: -1,
|
|
188
|
+
type: "button",
|
|
189
189
|
onClick: toggleSidebar,
|
|
190
190
|
title: "Toggle Sidebar",
|
|
191
|
-
className: 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", "
|
|
191
|
+
className: 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", "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:hover: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),
|
|
192
192
|
...props
|
|
193
193
|
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
className: cn("relative flex w-full flex-1 flex-col bg-white dark:bg-neutral-950", "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
|
|
194
|
+
});
|
|
195
|
+
SidebarRail.displayName = "SidebarRail";
|
|
196
|
+
const SidebarInset = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("main", {
|
|
197
|
+
ref: ref,
|
|
198
|
+
className: cn("relative flex w-full flex-1 flex-col bg-white dark:bg-neutral-950", "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 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2", className),
|
|
199
199
|
...props
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
"data-slot": "sidebar-input",
|
|
200
|
+
}));
|
|
201
|
+
SidebarInset.displayName = "SidebarInset";
|
|
202
|
+
const SidebarInput = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Input, {
|
|
203
|
+
ref: ref,
|
|
205
204
|
"data-sidebar": "input",
|
|
206
|
-
className: cn("h-8 w-full bg-white shadow-none dark:bg-neutral-950", className),
|
|
205
|
+
className: cn("focus-visible:ring-sidebar-ring h-8 w-full bg-white shadow-none focus-visible:ring-2 dark:bg-neutral-950", className),
|
|
207
206
|
...props
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
"data-slot": "sidebar-header",
|
|
207
|
+
}));
|
|
208
|
+
SidebarInput.displayName = "SidebarInput";
|
|
209
|
+
const SidebarHeader = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
210
|
+
ref: ref,
|
|
213
211
|
"data-sidebar": "header",
|
|
214
212
|
className: cn("flex flex-col gap-2 p-2", className),
|
|
215
213
|
...props
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
"data-slot": "sidebar-footer",
|
|
214
|
+
}));
|
|
215
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
216
|
+
const SidebarFooter = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
217
|
+
ref: ref,
|
|
221
218
|
"data-sidebar": "footer",
|
|
222
219
|
className: cn("flex flex-col gap-2 p-2", className),
|
|
223
220
|
...props
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
"data-slot": "sidebar-separator",
|
|
221
|
+
}));
|
|
222
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
223
|
+
const SidebarSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, {
|
|
224
|
+
ref: ref,
|
|
229
225
|
"data-sidebar": "separator",
|
|
230
226
|
className: cn("bg-sidebar-border mx-2 w-auto", className),
|
|
231
227
|
...props
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"data-slot": "sidebar-content",
|
|
228
|
+
}));
|
|
229
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
230
|
+
const SidebarContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
231
|
+
ref: ref,
|
|
237
232
|
"data-sidebar": "content",
|
|
238
233
|
className: cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
239
234
|
...props
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
"data-slot": "sidebar-group",
|
|
235
|
+
}));
|
|
236
|
+
SidebarContent.displayName = "SidebarContent";
|
|
237
|
+
const SidebarGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
238
|
+
ref: ref,
|
|
245
239
|
"data-sidebar": "group",
|
|
246
240
|
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
247
241
|
...props
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
|
|
242
|
+
}));
|
|
243
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
244
|
+
const SidebarGroupLabel = /*#__PURE__*/ forwardRef(({ className, asChild = false, ...props }, ref)=>{
|
|
251
245
|
const Comp = asChild ? Slot : "div";
|
|
252
246
|
return /*#__PURE__*/ jsx(Comp, {
|
|
253
|
-
|
|
247
|
+
ref: ref,
|
|
254
248
|
"data-sidebar": "group-label",
|
|
255
|
-
className: cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium
|
|
249
|
+
className: cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className),
|
|
256
250
|
...props
|
|
257
251
|
});
|
|
258
|
-
}
|
|
259
|
-
|
|
252
|
+
});
|
|
253
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
254
|
+
const SidebarGroupAction = /*#__PURE__*/ forwardRef(({ className, asChild = false, ...props }, ref)=>{
|
|
260
255
|
const Comp = asChild ? Slot : "button";
|
|
261
256
|
return /*#__PURE__*/ jsx(Comp, {
|
|
262
|
-
|
|
257
|
+
ref: ref,
|
|
263
258
|
"data-sidebar": "group-action",
|
|
264
|
-
className: 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
|
|
259
|
+
className: 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 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 after:md:hidden", "group-data-[collapsible=icon]:hidden", className),
|
|
265
260
|
...props
|
|
266
261
|
});
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
262
|
+
});
|
|
263
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
264
|
+
const SidebarGroupContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
265
|
+
ref: ref,
|
|
271
266
|
"data-sidebar": "group-content",
|
|
272
267
|
className: cn("w-full text-sm", className),
|
|
273
268
|
...props
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
"data-slot": "sidebar-menu",
|
|
269
|
+
}));
|
|
270
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
271
|
+
const SidebarMenu = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ul", {
|
|
272
|
+
ref: ref,
|
|
279
273
|
"data-sidebar": "menu",
|
|
280
274
|
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
281
275
|
...props
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
"data-slot": "sidebar-menu-item",
|
|
276
|
+
}));
|
|
277
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
278
|
+
const SidebarMenuItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
|
|
279
|
+
ref: ref,
|
|
287
280
|
"data-sidebar": "menu-item",
|
|
288
281
|
className: cn("group/menu-item relative", className),
|
|
289
282
|
...props
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-
|
|
283
|
+
}));
|
|
284
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
285
|
+
const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none 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", {
|
|
293
286
|
variants: {
|
|
294
287
|
variant: {
|
|
295
288
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
@@ -298,7 +291,7 @@ const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center
|
|
|
298
291
|
size: {
|
|
299
292
|
default: "h-8 text-sm",
|
|
300
293
|
sm: "h-7 text-xs",
|
|
301
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]
|
|
294
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
302
295
|
}
|
|
303
296
|
},
|
|
304
297
|
defaultVariants: {
|
|
@@ -306,11 +299,11 @@ const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center
|
|
|
306
299
|
size: "default"
|
|
307
300
|
}
|
|
308
301
|
});
|
|
309
|
-
|
|
302
|
+
const SidebarMenuButton = /*#__PURE__*/ forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref)=>{
|
|
310
303
|
const Comp = asChild ? Slot : "button";
|
|
311
304
|
const { isMobile, state } = useSidebar();
|
|
312
305
|
const button = /*#__PURE__*/ jsx(Comp, {
|
|
313
|
-
|
|
306
|
+
ref: ref,
|
|
314
307
|
"data-sidebar": "menu-button",
|
|
315
308
|
"data-size": size,
|
|
316
309
|
"data-active": isActive,
|
|
@@ -338,28 +331,29 @@ function SidebarMenuButton({ asChild = false, isActive = false, variant = "defau
|
|
|
338
331
|
})
|
|
339
332
|
]
|
|
340
333
|
});
|
|
341
|
-
}
|
|
342
|
-
|
|
334
|
+
});
|
|
335
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
336
|
+
const SidebarMenuAction = /*#__PURE__*/ forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref)=>{
|
|
343
337
|
const Comp = asChild ? Slot : "button";
|
|
344
338
|
return /*#__PURE__*/ jsx(Comp, {
|
|
345
|
-
|
|
339
|
+
ref: ref,
|
|
346
340
|
"data-sidebar": "menu-action",
|
|
347
|
-
className: 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
|
|
341
|
+
className: 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 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 after:md: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),
|
|
348
342
|
...props
|
|
349
343
|
});
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
344
|
+
});
|
|
345
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
346
|
+
const SidebarMenuBadge = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
347
|
+
ref: ref,
|
|
354
348
|
"data-sidebar": "menu-badge",
|
|
355
349
|
className: 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),
|
|
356
350
|
...props
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
|
|
351
|
+
}));
|
|
352
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
353
|
+
const SidebarMenuSkeleton = /*#__PURE__*/ forwardRef(({ className, showIcon = false, ...props }, ref)=>{
|
|
360
354
|
const width = useMemo(()=>`${Math.floor(40 * Math.random()) + 50}%`, []);
|
|
361
355
|
return /*#__PURE__*/ jsxs("div", {
|
|
362
|
-
|
|
356
|
+
ref: ref,
|
|
363
357
|
"data-sidebar": "menu-skeleton",
|
|
364
358
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
365
359
|
...props,
|
|
@@ -369,7 +363,7 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
369
363
|
"data-sidebar": "menu-skeleton-icon"
|
|
370
364
|
}),
|
|
371
365
|
/*#__PURE__*/ jsx(Skeleton, {
|
|
372
|
-
className: "h-4 max-w-
|
|
366
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
373
367
|
"data-sidebar": "menu-skeleton-text",
|
|
374
368
|
style: {
|
|
375
369
|
"--skeleton-width": width
|
|
@@ -377,34 +371,32 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
377
371
|
})
|
|
378
372
|
]
|
|
379
373
|
});
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
374
|
+
});
|
|
375
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
376
|
+
const SidebarMenuSub = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ul", {
|
|
377
|
+
ref: ref,
|
|
384
378
|
"data-sidebar": "menu-sub",
|
|
385
379
|
className: 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),
|
|
386
380
|
...props
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
"data-slot": "sidebar-menu-sub-item",
|
|
392
|
-
"data-sidebar": "menu-sub-item",
|
|
393
|
-
className: cn("group/menu-sub-item relative", className),
|
|
381
|
+
}));
|
|
382
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
383
|
+
const SidebarMenuSubItem = /*#__PURE__*/ forwardRef(({ ...props }, ref)=>/*#__PURE__*/ jsx("li", {
|
|
384
|
+
ref: ref,
|
|
394
385
|
...props
|
|
395
|
-
});
|
|
396
|
-
|
|
397
|
-
|
|
386
|
+
}));
|
|
387
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
388
|
+
const SidebarMenuSubButton = /*#__PURE__*/ forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref)=>{
|
|
398
389
|
const Comp = asChild ? Slot : "a";
|
|
399
390
|
return /*#__PURE__*/ jsx(Comp, {
|
|
400
|
-
|
|
391
|
+
ref: ref,
|
|
401
392
|
"data-sidebar": "menu-sub-button",
|
|
402
393
|
"data-size": size,
|
|
403
394
|
"data-active": isActive,
|
|
404
|
-
className: 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-
|
|
395
|
+
className: 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-none 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),
|
|
405
396
|
...props
|
|
406
397
|
});
|
|
407
|
-
}
|
|
398
|
+
});
|
|
399
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
408
400
|
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 };
|
|
409
401
|
|
|
410
402
|
//# sourceMappingURL=sidebar.js.map
|