@health-samurai/react-components 0.0.0-alpha.1 → 0.0.0-alpha.2
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/dist/bundle.css +100 -7
- package/dist/src/components/code-editor/index.js +53 -29
- package/dist/src/components/code-editor/index.js.map +1 -1
- package/dist/src/components/code-editor.stories.js +22 -7
- package/dist/src/components/code-editor.stories.js.map +1 -1
- package/dist/src/components/copy-icon.js +11 -4
- package/dist/src/components/copy-icon.js.map +1 -1
- package/dist/src/components/request-line-editor.js +56 -14
- package/dist/src/components/request-line-editor.js.map +1 -1
- package/dist/src/components/request-line-editor.stories.js +71 -22
- package/dist/src/components/request-line-editor.stories.js.map +1 -1
- package/dist/src/global.d.js +2 -0
- package/dist/src/global.d.js.map +1 -0
- package/dist/src/index.css +6 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +52 -50
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.stories.js +8 -5
- package/dist/src/index.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.js +34 -5
- package/dist/src/shadcn/components/ui/accordion.js.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.stories.js +68 -3
- package/dist/src/shadcn/components/ui/accordion.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.js +61 -14
- package/dist/src/shadcn/components/ui/alert-dialog.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.stories.js +39 -4
- package/dist/src/shadcn/components/ui/alert-dialog.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert.js +24 -8
- package/dist/src/shadcn/components/ui/alert.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert.stories.js +57 -3
- package/dist/src/shadcn/components/ui/alert.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/aspect-ratio.js +5 -1
- package/dist/src/shadcn/components/ui/aspect-ratio.js.map +1 -1
- package/dist/src/shadcn/components/ui/aspect-ratio.stories.js +12 -3
- package/dist/src/shadcn/components/ui/aspect-ratio.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/avatar.js +17 -4
- package/dist/src/shadcn/components/ui/avatar.js.map +1 -1
- package/dist/src/shadcn/components/ui/avatar.stories.js +69 -3
- package/dist/src/shadcn/components/ui/avatar.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/badge.js +13 -6
- package/dist/src/shadcn/components/ui/badge.js.map +1 -1
- package/dist/src/shadcn/components/ui/badge.stories.js +55 -3
- package/dist/src/shadcn/components/ui/badge.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.js +56 -11
- package/dist/src/shadcn/components/ui/breadcrumb.js.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.stories.js +69 -4
- package/dist/src/shadcn/components/ui/breadcrumb.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/button.js +23 -13
- package/dist/src/shadcn/components/ui/button.js.map +1 -1
- package/dist/src/shadcn/components/ui/button.stories.js +190 -10
- package/dist/src/shadcn/components/ui/button.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/calendar.js +75 -33
- package/dist/src/shadcn/components/ui/calendar.js.map +1 -1
- package/dist/src/shadcn/components/ui/calendar.stories.js +12 -5
- package/dist/src/shadcn/components/ui/calendar.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/card.js +38 -9
- package/dist/src/shadcn/components/ui/card.js.map +1 -1
- package/dist/src/shadcn/components/ui/card.stories.js +91 -6
- package/dist/src/shadcn/components/ui/card.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/carousel.js +99 -39
- package/dist/src/shadcn/components/ui/carousel.js.map +1 -1
- package/dist/src/shadcn/components/ui/carousel.stories.js +30 -6
- package/dist/src/shadcn/components/ui/carousel.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/chart.js +118 -55
- package/dist/src/shadcn/components/ui/chart.js.map +1 -1
- package/dist/src/shadcn/components/ui/chart.stories.js +72 -12
- package/dist/src/shadcn/components/ui/chart.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.js +14 -2
- package/dist/src/shadcn/components/ui/checkbox.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.js +79 -4
- package/dist/src/shadcn/components/ui/checkbox.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/collapsible.js +13 -3
- package/dist/src/shadcn/components/ui/collapsible.js.map +1 -1
- package/dist/src/shadcn/components/ui/collapsible.stories.js +54 -6
- package/dist/src/shadcn/components/ui/collapsible.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/command.js +77 -12
- package/dist/src/shadcn/components/ui/command.js.map +1 -1
- package/dist/src/shadcn/components/ui/command.stories.js +88 -4
- package/dist/src/shadcn/components/ui/command.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/context-menu.js +106 -17
- package/dist/src/shadcn/components/ui/context-menu.js.map +1 -1
- package/dist/src/shadcn/components/ui/context-menu.stories.js +101 -3
- package/dist/src/shadcn/components/ui/context-menu.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/dialog.js +69 -12
- package/dist/src/shadcn/components/ui/dialog.js.map +1 -1
- package/dist/src/shadcn/components/ui/dialog.stories.js +82 -6
- package/dist/src/shadcn/components/ui/dialog.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/drawer.js +61 -12
- package/dist/src/shadcn/components/ui/drawer.js.map +1 -1
- package/dist/src/shadcn/components/ui/drawer.stories.js +154 -21
- package/dist/src/shadcn/components/ui/drawer.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.js +107 -17
- package/dist/src/shadcn/components/ui/dropdown-menu.js.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.js +119 -4
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/form.js +58 -18
- package/dist/src/shadcn/components/ui/form.js.map +1 -1
- package/dist/src/shadcn/components/ui/form.stories.js +45 -11
- package/dist/src/shadcn/components/ui/form.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/hover-card.js +20 -4
- package/dist/src/shadcn/components/ui/hover-card.js.map +1 -1
- package/dist/src/shadcn/components/ui/hover-card.stories.js +51 -5
- package/dist/src/shadcn/components/ui/hover-card.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/input-otp.js +35 -7
- package/dist/src/shadcn/components/ui/input-otp.js.map +1 -1
- package/dist/src/shadcn/components/ui/input-otp.stories.js +35 -3
- package/dist/src/shadcn/components/ui/input-otp.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/input.js +59 -40
- package/dist/src/shadcn/components/ui/input.js.map +1 -1
- package/dist/src/shadcn/components/ui/input.stories.js +391 -23
- package/dist/src/shadcn/components/ui/input.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/label.js +7 -2
- package/dist/src/shadcn/components/ui/label.js.map +1 -1
- package/dist/src/shadcn/components/ui/label.stories.js +18 -4
- package/dist/src/shadcn/components/ui/label.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/menubar.js +116 -19
- package/dist/src/shadcn/components/ui/menubar.js.map +1 -1
- package/dist/src/shadcn/components/ui/menubar.stories.js +216 -3
- package/dist/src/shadcn/components/ui/menubar.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/navigation-menu.js +62 -10
- package/dist/src/shadcn/components/ui/navigation-menu.js.map +1 -1
- package/dist/src/shadcn/components/ui/navigation-menu.stories.js +263 -11
- package/dist/src/shadcn/components/ui/navigation-menu.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.js +73 -16
- package/dist/src/shadcn/components/ui/pagination.js.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.stories.js +41 -3
- package/dist/src/shadcn/components/ui/pagination.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/popover.js +23 -5
- package/dist/src/shadcn/components/ui/popover.js.map +1 -1
- package/dist/src/shadcn/components/ui/popover.stories.js +99 -6
- package/dist/src/shadcn/components/ui/popover.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/progress.js +14 -2
- package/dist/src/shadcn/components/ui/progress.js.map +1 -1
- package/dist/src/shadcn/components/ui/progress.stories.js +12 -8
- package/dist/src/shadcn/components/ui/progress.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.js +19 -3
- package/dist/src/shadcn/components/ui/radio-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.js +48 -4
- package/dist/src/shadcn/components/ui/radio-group.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/resizable.js +22 -4
- package/dist/src/shadcn/components/ui/resizable.js.map +1 -1
- package/dist/src/shadcn/components/ui/resizable.stories.js +49 -3
- package/dist/src/shadcn/components/ui/resizable.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/scroll-area.js +26 -5
- package/dist/src/shadcn/components/ui/scroll-area.js.map +1 -1
- package/dist/src/shadcn/components/ui/scroll-area.stories.js +30 -5
- package/dist/src/shadcn/components/ui/scroll-area.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.js +98 -19
- package/dist/src/shadcn/components/ui/select.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.stories.js +84 -5
- package/dist/src/shadcn/components/ui/select.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/separator.js +9 -2
- package/dist/src/shadcn/components/ui/separator.js.map +1 -1
- package/dist/src/shadcn/components/ui/separator.stories.js +43 -3
- package/dist/src/shadcn/components/ui/separator.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/sheet.js +69 -16
- package/dist/src/shadcn/components/ui/sheet.js.map +1 -1
- package/dist/src/shadcn/components/ui/sheet.stories.js +77 -6
- package/dist/src/shadcn/components/ui/sheet.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.js +304 -79
- package/dist/src/shadcn/components/ui/sidebar.js.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.stories.js +321 -59
- package/dist/src/shadcn/components/ui/sidebar.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/skeleton.js +7 -2
- package/dist/src/shadcn/components/ui/skeleton.js.map +1 -1
- package/dist/src/shadcn/components/ui/skeleton.stories.js +22 -3
- package/dist/src/shadcn/components/ui/skeleton.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/slider.js +40 -7
- package/dist/src/shadcn/components/ui/slider.js.map +1 -1
- package/dist/src/shadcn/components/ui/slider.stories.js +11 -3
- package/dist/src/shadcn/components/ui/slider.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.js +10 -4
- package/dist/src/shadcn/components/ui/sonner.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.stories.js +14 -9
- package/dist/src/shadcn/components/ui/sonner.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/switch.js +11 -2
- package/dist/src/shadcn/components/ui/switch.js.map +1 -1
- package/dist/src/shadcn/components/ui/switch.stories.js +16 -4
- package/dist/src/shadcn/components/ui/switch.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/table.js +47 -10
- package/dist/src/shadcn/components/ui/table.js.map +1 -1
- package/dist/src/shadcn/components/ui/table.stories.js +72 -11
- package/dist/src/shadcn/components/ui/table.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.d.ts +9 -5
- package/dist/src/shadcn/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.js +75 -18
- package/dist/src/shadcn/components/ui/tabs.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts +6 -0
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.js +221 -10
- package/dist/src/shadcn/components/ui/tabs.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.js +7 -2
- package/dist/src/shadcn/components/ui/textarea.js.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.stories.js +6 -3
- package/dist/src/shadcn/components/ui/textarea.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.js +29 -8
- package/dist/src/shadcn/components/ui/toggle-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.stories.js +30 -3
- package/dist/src/shadcn/components/ui/toggle-group.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.js +16 -7
- package/dist/src/shadcn/components/ui/toggle.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.stories.js +9 -3
- package/dist/src/shadcn/components/ui/toggle.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.js +26 -5
- package/dist/src/shadcn/components/ui/tooltip.js.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.stories.js +20 -4
- package/dist/src/shadcn/components/ui/tooltip.stories.js.map +1 -1
- package/dist/src/shadcn/hooks/use-mobile.js +4 -3
- package/dist/src/shadcn/hooks/use-mobile.js.map +1 -1
- package/dist/src/shadcn/lib/utils.js +1 -0
- package/dist/src/shadcn/lib/utils.js.map +1 -1
- package/package.json +8 -4
- package/src/index.css +6 -0
- package/src/index.tsx +1 -0
- package/src/shadcn/components/ui/tabs.stories.tsx +57 -0
- package/src/shadcn/components/ui/tabs.tsx +76 -26
|
@@ -3,21 +3,21 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { PanelLeftIcon } from "lucide-react";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { Button } from "
|
|
7
|
-
import { Input } from "
|
|
8
|
-
import { Separator } from "
|
|
9
|
-
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle
|
|
10
|
-
import { Skeleton } from "
|
|
11
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger
|
|
12
|
-
import { useIsMobile } from "
|
|
13
|
-
import { cn } from "
|
|
6
|
+
import { Button } from "./button.js";
|
|
7
|
+
import { Input } from "./input.js";
|
|
8
|
+
import { Separator } from "./separator.js";
|
|
9
|
+
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.js";
|
|
10
|
+
import { Skeleton } from "./skeleton.js";
|
|
11
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
|
|
12
|
+
import { useIsMobile } from "../../hooks/use-mobile.js";
|
|
13
|
+
import { cn } from "../../lib/utils.js";
|
|
14
14
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
15
15
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
16
16
|
const SIDEBAR_WIDTH = "13.75rem";
|
|
17
17
|
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
18
18
|
const SIDEBAR_WIDTH_ICON = "3.125rem";
|
|
19
19
|
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
20
|
-
const SidebarContext = React.createContext(null);
|
|
20
|
+
const SidebarContext = /*#__PURE__*/ React.createContext(null);
|
|
21
21
|
function useSidebar() {
|
|
22
22
|
const context = React.useContext(SidebarContext);
|
|
23
23
|
if (!context) {
|
|
@@ -32,184 +32,409 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
32
32
|
// We use openProp and setOpenProp for control from outside the component.
|
|
33
33
|
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
34
34
|
const open = openProp ?? _open;
|
|
35
|
-
const setOpen = React.useCallback((value)
|
|
35
|
+
const setOpen = React.useCallback((value)=>{
|
|
36
36
|
const openState = typeof value === "function" ? value(open) : value;
|
|
37
37
|
if (setOpenProp) {
|
|
38
38
|
setOpenProp(openState);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
39
|
+
} else {
|
|
41
40
|
_setOpen(openState);
|
|
42
41
|
}
|
|
43
42
|
// This sets the cookie to keep the sidebar state.
|
|
44
43
|
// biome-ignore lint/suspicious/noDocumentCookie: FIXME: unchanged shadcn
|
|
45
44
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
46
|
-
}, [
|
|
45
|
+
}, [
|
|
46
|
+
setOpenProp,
|
|
47
|
+
open
|
|
48
|
+
]);
|
|
47
49
|
// Helper to toggle the sidebar.
|
|
48
50
|
// biome-ignore lint/correctness/useExhaustiveDependencies: FIXME: unchanged shadcn
|
|
49
|
-
const toggleSidebar = React.useCallback(()
|
|
50
|
-
return isMobile ? setOpenMobile((open)
|
|
51
|
-
}, [
|
|
51
|
+
const toggleSidebar = React.useCallback(()=>{
|
|
52
|
+
return isMobile ? setOpenMobile((open)=>!open) : setOpen((open)=>!open);
|
|
53
|
+
}, [
|
|
54
|
+
isMobile,
|
|
55
|
+
setOpen,
|
|
56
|
+
setOpenMobile
|
|
57
|
+
]);
|
|
52
58
|
// Adds a keyboard shortcut to toggle the sidebar.
|
|
53
|
-
React.useEffect(()
|
|
54
|
-
const handleKeyDown = (event)
|
|
55
|
-
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT &&
|
|
56
|
-
(event.metaKey || event.ctrlKey)) {
|
|
59
|
+
React.useEffect(()=>{
|
|
60
|
+
const handleKeyDown = (event)=>{
|
|
61
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
57
62
|
event.preventDefault();
|
|
58
63
|
toggleSidebar();
|
|
59
64
|
}
|
|
60
65
|
};
|
|
61
66
|
window.addEventListener("keydown", handleKeyDown);
|
|
62
|
-
return ()
|
|
63
|
-
}, [
|
|
67
|
+
return ()=>window.removeEventListener("keydown", handleKeyDown);
|
|
68
|
+
}, [
|
|
69
|
+
toggleSidebar
|
|
70
|
+
]);
|
|
64
71
|
// We add a state so that we can do data-state="expanded" or "collapsed".
|
|
65
72
|
// This makes it easier to style the sidebar with Tailwind classes.
|
|
66
73
|
const state = open ? "expanded" : "collapsed";
|
|
67
74
|
// biome-ignore lint/correctness/useExhaustiveDependencies: FIXME: unchanged shadcn
|
|
68
|
-
const contextValue = React.useMemo(()
|
|
75
|
+
const contextValue = React.useMemo(()=>({
|
|
76
|
+
state,
|
|
77
|
+
open,
|
|
78
|
+
setOpen,
|
|
79
|
+
isMobile,
|
|
80
|
+
openMobile,
|
|
81
|
+
setOpenMobile,
|
|
82
|
+
toggleSidebar
|
|
83
|
+
}), [
|
|
69
84
|
state,
|
|
70
85
|
open,
|
|
71
86
|
setOpen,
|
|
72
87
|
isMobile,
|
|
73
88
|
openMobile,
|
|
74
89
|
setOpenMobile,
|
|
75
|
-
toggleSidebar
|
|
76
|
-
|
|
77
|
-
return
|
|
90
|
+
toggleSidebar
|
|
91
|
+
]);
|
|
92
|
+
return /*#__PURE__*/ _jsx(SidebarContext.Provider, {
|
|
93
|
+
value: contextValue,
|
|
94
|
+
children: /*#__PURE__*/ _jsx(TooltipProvider, {
|
|
95
|
+
delayDuration: 0,
|
|
96
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
97
|
+
"data-slot": "sidebar-wrapper",
|
|
98
|
+
style: {
|
|
78
99
|
"--sidebar-width": SIDEBAR_WIDTH,
|
|
79
100
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
80
|
-
...style
|
|
81
|
-
},
|
|
101
|
+
...style
|
|
102
|
+
},
|
|
103
|
+
className: cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full box-content", className),
|
|
104
|
+
...props,
|
|
105
|
+
children: children
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
});
|
|
82
109
|
}
|
|
83
110
|
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }) {
|
|
84
111
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
85
112
|
if (collapsible === "none") {
|
|
86
|
-
return
|
|
113
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
114
|
+
"data-slot": "sidebar",
|
|
115
|
+
className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
|
|
116
|
+
...props,
|
|
117
|
+
children: children
|
|
118
|
+
});
|
|
87
119
|
}
|
|
88
120
|
if (isMobile) {
|
|
89
|
-
return
|
|
90
|
-
|
|
91
|
-
|
|
121
|
+
return /*#__PURE__*/ _jsx(Sheet, {
|
|
122
|
+
open: openMobile,
|
|
123
|
+
onOpenChange: setOpenMobile,
|
|
124
|
+
...props,
|
|
125
|
+
children: /*#__PURE__*/ _jsxs(SheetContent, {
|
|
126
|
+
"data-sidebar": "sidebar",
|
|
127
|
+
"data-slot": "sidebar",
|
|
128
|
+
"data-mobile": "true",
|
|
129
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
130
|
+
style: {
|
|
131
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
132
|
+
},
|
|
133
|
+
side: side,
|
|
134
|
+
children: [
|
|
135
|
+
/*#__PURE__*/ _jsxs(SheetHeader, {
|
|
136
|
+
className: "sr-only",
|
|
137
|
+
children: [
|
|
138
|
+
/*#__PURE__*/ _jsx(SheetTitle, {
|
|
139
|
+
children: "Sidebar"
|
|
140
|
+
}),
|
|
141
|
+
/*#__PURE__*/ _jsx(SheetDescription, {
|
|
142
|
+
children: "Displays the mobile sidebar."
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
}),
|
|
146
|
+
/*#__PURE__*/ _jsx("div", {
|
|
147
|
+
className: "flex h-full w-full flex-col",
|
|
148
|
+
children: children
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
})
|
|
152
|
+
});
|
|
92
153
|
}
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
154
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
155
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
156
|
+
"data-state": state,
|
|
157
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
158
|
+
"data-variant": variant,
|
|
159
|
+
"data-side": side,
|
|
160
|
+
"data-slot": "sidebar",
|
|
161
|
+
children: [
|
|
162
|
+
/*#__PURE__*/ _jsx("div", {
|
|
163
|
+
"data-slot": "sidebar-gap",
|
|
164
|
+
className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-120 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
165
|
+
}),
|
|
166
|
+
/*#__PURE__*/ _jsx("div", {
|
|
167
|
+
"data-slot": "sidebar-container",
|
|
168
|
+
className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-120 ease-linear md:flex box-content", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", // Adjust the padding for floating and inset variants.
|
|
169
|
+
variant === "floating" || variant === "inset" ? "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),
|
|
170
|
+
...props,
|
|
171
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
172
|
+
"data-sidebar": "sidebar",
|
|
173
|
+
"data-slot": "sidebar-inner",
|
|
174
|
+
className: "bg-bg-primary 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",
|
|
175
|
+
children: children
|
|
176
|
+
})
|
|
177
|
+
})
|
|
178
|
+
]
|
|
179
|
+
});
|
|
102
180
|
}
|
|
103
181
|
function SidebarTrigger({ className, onClick, ...props }) {
|
|
104
182
|
const { toggleSidebar } = useSidebar();
|
|
105
|
-
return
|
|
183
|
+
return /*#__PURE__*/ _jsxs(Button, {
|
|
184
|
+
"data-sidebar": "trigger",
|
|
185
|
+
"data-slot": "sidebar-trigger",
|
|
186
|
+
variant: "ghost",
|
|
187
|
+
size: "small",
|
|
188
|
+
className: cn("size-7", className),
|
|
189
|
+
onClick: (event)=>{
|
|
106
190
|
onClick?.(event);
|
|
107
191
|
toggleSidebar();
|
|
108
|
-
},
|
|
192
|
+
},
|
|
193
|
+
...props,
|
|
194
|
+
children: [
|
|
195
|
+
/*#__PURE__*/ _jsx(PanelLeftIcon, {}),
|
|
196
|
+
/*#__PURE__*/ _jsx("span", {
|
|
197
|
+
className: "sr-only",
|
|
198
|
+
children: "Toggle Sidebar"
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
});
|
|
109
202
|
}
|
|
110
203
|
function SidebarRail({ className, ...props }) {
|
|
111
204
|
const { toggleSidebar } = useSidebar();
|
|
112
|
-
return
|
|
205
|
+
return /*#__PURE__*/ _jsx("button", {
|
|
206
|
+
"data-sidebar": "rail",
|
|
207
|
+
"data-slot": "sidebar-rail",
|
|
208
|
+
"aria-label": "Toggle Sidebar",
|
|
209
|
+
tabIndex: -1,
|
|
210
|
+
onClick: toggleSidebar,
|
|
211
|
+
title: "Toggle Sidebar",
|
|
212
|
+
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", "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),
|
|
213
|
+
...props
|
|
214
|
+
});
|
|
113
215
|
}
|
|
114
216
|
function SidebarInset({ className, ...props }) {
|
|
115
|
-
return
|
|
217
|
+
return /*#__PURE__*/ _jsx("main", {
|
|
218
|
+
"data-slot": "sidebar-inset",
|
|
219
|
+
className: 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", "peer-has-data-[sidebar-mode=hover]:fixed peer-has-data-[sidebar-mode=hover]:h-full peer-has-data-[sidebar-mode=hover]:grow", "peer-has-data-[sidebar-mode=hover]:left-(--sidebar-width-icon)", className),
|
|
220
|
+
...props
|
|
221
|
+
});
|
|
116
222
|
}
|
|
117
223
|
function SidebarInput({ className, ...props }) {
|
|
118
|
-
return
|
|
224
|
+
return /*#__PURE__*/ _jsx(Input, {
|
|
225
|
+
"data-slot": "sidebar-input",
|
|
226
|
+
"data-sidebar": "input",
|
|
227
|
+
className: cn("bg-background h-8 w-full shadow-none", className),
|
|
228
|
+
...props
|
|
229
|
+
});
|
|
119
230
|
}
|
|
120
231
|
function SidebarHeader({ className, ...props }) {
|
|
121
|
-
return
|
|
232
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
233
|
+
"data-slot": "sidebar-header",
|
|
234
|
+
"data-sidebar": "header",
|
|
235
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
236
|
+
...props
|
|
237
|
+
});
|
|
122
238
|
}
|
|
123
239
|
function SidebarFooter({ className, ...props }) {
|
|
124
|
-
return
|
|
240
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
241
|
+
"data-slot": "sidebar-footer",
|
|
242
|
+
"data-sidebar": "footer",
|
|
243
|
+
className: cn("flex flex-col gap-2 p-2 pb-3", className),
|
|
244
|
+
...props
|
|
245
|
+
});
|
|
125
246
|
}
|
|
126
247
|
function SidebarSeparator({ className, ...props }) {
|
|
127
|
-
return
|
|
248
|
+
return /*#__PURE__*/ _jsx(Separator, {
|
|
249
|
+
"data-slot": "sidebar-separator",
|
|
250
|
+
"data-sidebar": "separator",
|
|
251
|
+
className: cn("border-border-secondary w-auto", className),
|
|
252
|
+
...props
|
|
253
|
+
});
|
|
128
254
|
}
|
|
129
255
|
function SidebarContent({ className, ...props }) {
|
|
130
|
-
return
|
|
256
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
257
|
+
"data-slot": "sidebar-content",
|
|
258
|
+
"data-sidebar": "content",
|
|
259
|
+
className: cn("flex min-h-0 flex-1 flex-col gap-1 p-2 pt-3 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
260
|
+
...props
|
|
261
|
+
});
|
|
131
262
|
}
|
|
132
263
|
function SidebarGroup({ className, ...props }) {
|
|
133
|
-
return
|
|
264
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
265
|
+
"data-slot": "sidebar-group",
|
|
266
|
+
"data-sidebar": "group",
|
|
267
|
+
className: cn("relative flex w-full min-w-0 flex-col", className),
|
|
268
|
+
...props
|
|
269
|
+
});
|
|
134
270
|
}
|
|
135
271
|
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
136
272
|
const Comp = asChild ? Slot : "div";
|
|
137
|
-
return
|
|
273
|
+
return /*#__PURE__*/ _jsx(Comp, {
|
|
274
|
+
"data-slot": "sidebar-group-label",
|
|
275
|
+
"data-sidebar": "group-label",
|
|
276
|
+
className: 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),
|
|
277
|
+
...props
|
|
278
|
+
});
|
|
138
279
|
}
|
|
139
280
|
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
140
281
|
const Comp = asChild ? Slot : "button";
|
|
141
|
-
return
|
|
142
|
-
|
|
143
|
-
"
|
|
282
|
+
return /*#__PURE__*/ _jsx(Comp, {
|
|
283
|
+
"data-slot": "sidebar-group-action",
|
|
284
|
+
"data-sidebar": "group-action",
|
|
285
|
+
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 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", // Increases the hit area of the button on mobile.
|
|
286
|
+
"after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", className),
|
|
287
|
+
...props
|
|
288
|
+
});
|
|
144
289
|
}
|
|
145
290
|
function SidebarGroupContent({ className, ...props }) {
|
|
146
|
-
return
|
|
291
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
292
|
+
"data-slot": "sidebar-group-content",
|
|
293
|
+
"data-sidebar": "group-content",
|
|
294
|
+
className: cn("w-full text-sm", className),
|
|
295
|
+
...props
|
|
296
|
+
});
|
|
147
297
|
}
|
|
148
298
|
function SidebarMenu({ className, ...props }) {
|
|
149
|
-
return
|
|
299
|
+
return /*#__PURE__*/ _jsx("ul", {
|
|
300
|
+
"data-slot": "sidebar-menu",
|
|
301
|
+
"data-sidebar": "menu",
|
|
302
|
+
className: cn("flex w-full min-w-0 flex-col gap-0.5", className),
|
|
303
|
+
...props
|
|
304
|
+
});
|
|
150
305
|
}
|
|
151
306
|
function SidebarMenuItem({ className, ...props }) {
|
|
152
|
-
return
|
|
307
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
308
|
+
"data-slot": "sidebar-menu-item",
|
|
309
|
+
"data-sidebar": "menu-item",
|
|
310
|
+
className: cn("group/menu-item relative", className),
|
|
311
|
+
...props
|
|
312
|
+
});
|
|
153
313
|
}
|
|
154
314
|
const sidebarMenuButtonVariants = cva(cn("typo-body text-text-secondary flex items-center gap-2 overflow-hidden rounded-lg py-2 px-[0.44rem] outline-hidden ", "ring-sidebar-ring transition-all focus-visible:ring-2 active:bg-bg-quaternary 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-bg-brand-secondary data-[active=true]:text-text-primary data-[state=open]:hover:bg-sidebar-accent", "data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:py-2! group-data-[collapsible=icon]:px-[0.44rem]!", "[&>span:last-child]:truncate [&>svg]:size-5 [&>svg]:shrink-0 hover:bg-bg-secondary hover:text-text-primary", "data-[active=true]:[&>svg]:text-text-brand-primary w-full"), {
|
|
155
315
|
variants: {
|
|
156
316
|
variant: {
|
|
157
317
|
default: "",
|
|
158
|
-
outline: "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))]"
|
|
318
|
+
outline: "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))]"
|
|
159
319
|
},
|
|
160
320
|
size: {
|
|
161
321
|
default: "",
|
|
162
322
|
sm: "",
|
|
163
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
164
|
-
}
|
|
323
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
324
|
+
}
|
|
165
325
|
},
|
|
166
326
|
defaultVariants: {
|
|
167
327
|
variant: "default",
|
|
168
|
-
size: "default"
|
|
169
|
-
}
|
|
328
|
+
size: "default"
|
|
329
|
+
}
|
|
170
330
|
});
|
|
171
331
|
function SidebarMenuButton({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
|
|
172
332
|
const Comp = asChild ? Slot : "button";
|
|
173
333
|
const { isMobile, state } = useSidebar();
|
|
174
|
-
const button =
|
|
334
|
+
const button = /*#__PURE__*/ _jsx(Comp, {
|
|
335
|
+
"data-slot": "sidebar-menu-button",
|
|
336
|
+
"data-sidebar": "menu-button",
|
|
337
|
+
"data-size": size,
|
|
338
|
+
"data-active": isActive,
|
|
339
|
+
className: cn(sidebarMenuButtonVariants({
|
|
340
|
+
variant,
|
|
341
|
+
size
|
|
342
|
+
}), className),
|
|
343
|
+
...props
|
|
344
|
+
});
|
|
175
345
|
if (!tooltip) {
|
|
176
346
|
return button;
|
|
177
347
|
}
|
|
178
348
|
if (typeof tooltip === "string") {
|
|
179
349
|
tooltip = {
|
|
180
|
-
children: tooltip
|
|
350
|
+
children: tooltip
|
|
181
351
|
};
|
|
182
352
|
}
|
|
183
|
-
return
|
|
353
|
+
return /*#__PURE__*/ _jsxs(Tooltip, {
|
|
354
|
+
children: [
|
|
355
|
+
/*#__PURE__*/ _jsx(TooltipTrigger, {
|
|
356
|
+
asChild: true,
|
|
357
|
+
children: button
|
|
358
|
+
}),
|
|
359
|
+
/*#__PURE__*/ _jsx(TooltipContent, {
|
|
360
|
+
side: "right",
|
|
361
|
+
align: "center",
|
|
362
|
+
hidden: state !== "collapsed" || isMobile,
|
|
363
|
+
...tooltip
|
|
364
|
+
})
|
|
365
|
+
]
|
|
366
|
+
});
|
|
184
367
|
}
|
|
185
368
|
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
186
369
|
const Comp = asChild ? Slot : "button";
|
|
187
|
-
return
|
|
188
|
-
|
|
189
|
-
"
|
|
190
|
-
|
|
370
|
+
return /*#__PURE__*/ _jsx(Comp, {
|
|
371
|
+
"data-slot": "sidebar-menu-action",
|
|
372
|
+
"data-sidebar": "menu-action",
|
|
373
|
+
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 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", // Increases the hit area of the button on mobile.
|
|
374
|
+
"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),
|
|
375
|
+
...props
|
|
376
|
+
});
|
|
191
377
|
}
|
|
192
378
|
function SidebarMenuBadge({ className, ...props }) {
|
|
193
|
-
return
|
|
379
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
380
|
+
"data-slot": "sidebar-menu-badge",
|
|
381
|
+
"data-sidebar": "menu-badge",
|
|
382
|
+
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),
|
|
383
|
+
...props
|
|
384
|
+
});
|
|
194
385
|
}
|
|
195
386
|
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
196
387
|
// Random width between 50 to 90%.
|
|
197
|
-
const width = React.useMemo(()
|
|
388
|
+
const width = React.useMemo(()=>{
|
|
198
389
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
199
390
|
}, []);
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
|
|
391
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
392
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
393
|
+
"data-sidebar": "menu-skeleton",
|
|
394
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
395
|
+
...props,
|
|
396
|
+
children: [
|
|
397
|
+
showIcon && /*#__PURE__*/ _jsx(Skeleton, {
|
|
398
|
+
className: "size-4 rounded-md",
|
|
399
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
400
|
+
}),
|
|
401
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
402
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
403
|
+
"data-sidebar": "menu-skeleton-text",
|
|
404
|
+
style: {
|
|
405
|
+
"--skeleton-width": width
|
|
406
|
+
}
|
|
407
|
+
})
|
|
408
|
+
]
|
|
409
|
+
});
|
|
203
410
|
}
|
|
204
411
|
function SidebarMenuSub({ className, ...props }) {
|
|
205
|
-
return
|
|
412
|
+
return /*#__PURE__*/ _jsx("ul", {
|
|
413
|
+
"data-slot": "sidebar-menu-sub",
|
|
414
|
+
"data-sidebar": "menu-sub",
|
|
415
|
+
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),
|
|
416
|
+
...props
|
|
417
|
+
});
|
|
206
418
|
}
|
|
207
419
|
function SidebarMenuSubItem({ className, ...props }) {
|
|
208
|
-
return
|
|
420
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
421
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
422
|
+
"data-sidebar": "menu-sub-item",
|
|
423
|
+
className: cn("group/menu-sub-item relative", className),
|
|
424
|
+
...props
|
|
425
|
+
});
|
|
209
426
|
}
|
|
210
427
|
function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
|
|
211
428
|
const Comp = asChild ? Slot : "a";
|
|
212
|
-
return
|
|
429
|
+
return /*#__PURE__*/ _jsx(Comp, {
|
|
430
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
431
|
+
"data-sidebar": "menu-sub-button",
|
|
432
|
+
"data-size": size,
|
|
433
|
+
"data-active": isActive,
|
|
434
|
+
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-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", size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", className),
|
|
435
|
+
...props
|
|
436
|
+
});
|
|
213
437
|
}
|
|
214
|
-
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
|
|
438
|
+
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 };
|
|
439
|
+
|
|
215
440
|
//# sourceMappingURL=sidebar.js.map
|