@inspirare/design-system 0.0.22 → 0.0.24
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 +82 -61
- package/dist/book-logo-filled.svg +55 -0
- package/dist/components/ui/accessibility-improvements.js +26 -23
- package/dist/components/ui/accordion.js +34 -24
- package/dist/components/ui/alert-dialog.js +91 -57
- package/dist/components/ui/alert.js +38 -26
- package/dist/components/ui/aspect-ratio.js +11 -3
- package/dist/components/ui/avatar.js +30 -8
- package/dist/components/ui/badge.js +20 -14
- package/dist/components/ui/breadcrumb.js +69 -56
- package/dist/components/ui/button-group.js +17 -13
- package/dist/components/ui/button.js +19 -15
- package/dist/components/ui/calendar.js +63 -59
- package/dist/components/ui/card.js +11 -9
- package/dist/components/ui/carousel.js +70 -75
- package/dist/components/ui/chart.js +75 -72
- package/dist/components/ui/checkbox.js +4 -5
- package/dist/components/ui/collapsible.js +12 -14
- package/dist/components/ui/color-picker.js +60 -80
- package/dist/components/ui/combobox.js +153 -33
- package/dist/components/ui/command.js +50 -48
- package/dist/components/ui/context-menu.js +129 -68
- package/dist/components/ui/dialog.js +65 -60
- package/dist/components/ui/drawer.js +81 -40
- package/dist/components/ui/dropdown-menu.js +100 -87
- package/dist/components/ui/empty.js +7 -6
- package/dist/components/ui/field.js +44 -47
- package/dist/components/ui/form.js +22 -23
- package/dist/components/ui/hover-card.js +14 -11
- package/dist/components/ui/input-group.js +16 -13
- package/dist/components/ui/input-otp.js +37 -32
- package/dist/components/ui/input.js +9 -7
- package/dist/components/ui/item.js +42 -36
- package/dist/components/ui/kbd.js +2 -1
- package/dist/components/ui/label.js +6 -7
- package/dist/components/ui/menubar.js +124 -93
- package/dist/components/ui/navigation-menu.js +79 -54
- package/dist/components/ui/pagination.js +78 -58
- package/dist/components/ui/popover.js +35 -16
- package/dist/components/ui/progress.js +37 -13
- package/dist/components/ui/radio-group.js +14 -14
- package/dist/components/ui/resizable.js +24 -15
- package/dist/components/ui/scroll-area.js +29 -11
- package/dist/components/ui/select.js +98 -56
- package/dist/components/ui/separator.js +5 -7
- package/dist/components/ui/sheet.js +47 -42
- package/dist/components/ui/sidebar.js +279 -248
- package/dist/components/ui/skeleton.js +4 -40
- package/dist/components/ui/slider.js +27 -29
- package/dist/components/ui/sonner.js +27 -10
- package/dist/components/ui/spinner.js +2 -0
- package/dist/components/ui/switch.js +3 -4
- package/dist/components/ui/table.js +6 -6
- package/dist/components/ui/tabs.js +45 -22
- package/dist/components/ui/textarea.js +3 -2
- package/dist/components/ui/theme-toggle.js +38 -41
- package/dist/components/ui/toggle-group.js +30 -21
- package/dist/components/ui/toggle.js +8 -9
- package/dist/components/ui/tooltip.js +28 -23
- package/dist/index.css +1 -1
- package/dist/index.d.ts +446 -468
- package/dist/index.js +58 -58
- package/package.json +42 -41
- package/src/App.tsx +28 -34
- package/src/components/branding/assets/book-logo-filled.svg +55 -0
- package/src/components/branding/logo/logo.tsx +56 -0
- package/src/components/ui/accessibility-improvements.stories.tsx +18 -0
- package/src/components/ui/accessibility-improvements.test.tsx +13 -0
- package/src/components/ui/accessibility-improvements.tsx +16 -6
- package/src/components/ui/accordion.stories.tsx +19 -0
- package/src/components/ui/accordion.test.tsx +14 -0
- package/src/components/ui/accordion.tsx +28 -20
- package/src/components/ui/alert-dialog.stories.tsx +19 -0
- package/src/components/ui/alert-dialog.test.tsx +14 -0
- package/src/components/ui/alert-dialog.tsx +159 -123
- package/src/components/ui/alert.stories.tsx +19 -0
- package/src/components/ui/alert.test.tsx +14 -0
- package/src/components/ui/alert.tsx +60 -41
- package/src/components/ui/aspect-ratio.stories.tsx +19 -0
- package/src/components/ui/aspect-ratio.test.tsx +14 -0
- package/src/components/ui/aspect-ratio.tsx +19 -2
- package/src/components/ui/attachment.stories.tsx +19 -0
- package/src/components/ui/attachment.test.tsx +14 -0
- package/src/components/ui/attachment.tsx +209 -0
- package/src/components/ui/avatar.stories.tsx +19 -0
- package/src/components/ui/avatar.test.tsx +14 -0
- package/src/components/ui/avatar.tsx +73 -17
- package/src/components/ui/badge.stories.tsx +19 -0
- package/src/components/ui/badge.test.tsx +14 -0
- package/src/components/ui/badge.tsx +33 -25
- package/src/components/ui/breadcrumb.stories.tsx +19 -0
- package/src/components/ui/breadcrumb.test.tsx +14 -0
- package/src/components/ui/breadcrumb.tsx +98 -86
- package/src/components/ui/bubble.stories.tsx +19 -0
- package/src/components/ui/bubble.test.tsx +14 -0
- package/src/components/ui/bubble.tsx +130 -0
- package/src/components/ui/button-group.stories.tsx +19 -0
- package/src/components/ui/button-group.test.tsx +14 -0
- package/src/components/ui/button-group.tsx +26 -20
- package/src/components/ui/button.stories.tsx +19 -0
- package/src/components/ui/button.test.tsx +14 -0
- package/src/components/ui/button.tsx +30 -31
- package/src/components/ui/calendar.stories.tsx +19 -0
- package/src/components/ui/calendar.test.tsx +14 -0
- package/src/components/ui/calendar.tsx +28 -26
- package/src/components/ui/card.stories.tsx +19 -0
- package/src/components/ui/card.test.tsx +14 -0
- package/src/components/ui/card.tsx +30 -17
- package/src/components/ui/carousel.stories.tsx +19 -0
- package/src/components/ui/carousel.test.tsx +14 -0
- package/src/components/ui/carousel.tsx +115 -135
- package/src/components/ui/chart.stories.tsx +18 -0
- package/src/components/ui/chart.test.tsx +13 -0
- package/src/components/ui/chart.tsx +220 -216
- package/src/components/ui/checkbox.stories.tsx +19 -0
- package/src/components/ui/checkbox.test.tsx +14 -0
- package/src/components/ui/checkbox.tsx +7 -10
- package/src/components/ui/collapsible.stories.tsx +19 -0
- package/src/components/ui/collapsible.test.tsx +14 -0
- package/src/components/ui/collapsible.tsx +11 -26
- package/src/components/ui/color-picker.stories.tsx +19 -0
- package/src/components/ui/color-picker.test.tsx +14 -0
- package/src/components/ui/color-picker.tsx +36 -26
- package/src/components/ui/combobox.stories.tsx +19 -0
- package/src/components/ui/combobox.test.tsx +14 -0
- package/src/components/ui/combobox.tsx +281 -96
- package/src/components/ui/command.stories.tsx +19 -0
- package/src/components/ui/command.test.tsx +14 -0
- package/src/components/ui/command.tsx +59 -47
- package/src/components/ui/context-menu.stories.tsx +19 -0
- package/src/components/ui/context-menu.test.tsx +14 -0
- package/src/components/ui/context-menu.tsx +231 -160
- package/src/components/ui/dialog.stories.tsx +19 -0
- package/src/components/ui/dialog.test.tsx +14 -0
- package/src/components/ui/dialog.tsx +81 -72
- package/src/components/ui/direction.stories.tsx +19 -0
- package/src/components/ui/direction.test.tsx +14 -0
- package/src/components/ui/direction.tsx +6 -0
- package/src/components/ui/drawer.stories.tsx +19 -0
- package/src/components/ui/drawer.test.tsx +14 -0
- package/src/components/ui/drawer.tsx +143 -64
- package/src/components/ui/dropdown-menu.stories.tsx +19 -0
- package/src/components/ui/dropdown-menu.test.tsx +14 -0
- package/src/components/ui/dropdown-menu.tsx +199 -153
- package/src/components/ui/empty.stories.tsx +18 -0
- package/src/components/ui/empty.test.tsx +13 -0
- package/src/components/ui/empty.tsx +11 -9
- package/src/components/ui/field.stories.tsx +18 -0
- package/src/components/ui/field.test.tsx +13 -0
- package/src/components/ui/field.tsx +26 -32
- package/src/components/ui/form.stories.tsx +22 -0
- package/src/components/ui/form.test.tsx +15 -0
- package/src/components/ui/form.tsx +1 -2
- package/src/components/ui/hover-card.stories.tsx +19 -0
- package/src/components/ui/hover-card.test.tsx +14 -0
- package/src/components/ui/hover-card.tsx +34 -32
- package/src/components/ui/input-group.stories.tsx +18 -0
- package/src/components/ui/input-group.test.tsx +13 -0
- package/src/components/ui/input-group.tsx +21 -28
- package/src/components/ui/input-otp.stories.tsx +19 -0
- package/src/components/ui/input-otp.test.tsx +14 -0
- package/src/components/ui/input-otp.tsx +58 -42
- package/src/components/ui/input.stories.tsx +19 -0
- package/src/components/ui/input.test.tsx +14 -0
- package/src/components/ui/input.tsx +9 -8
- package/src/components/ui/item.stories.tsx +18 -0
- package/src/components/ui/item.test.tsx +13 -0
- package/src/components/ui/item.tsx +38 -28
- package/src/components/ui/kbd.stories.tsx +18 -0
- package/src/components/ui/kbd.test.tsx +13 -0
- package/src/components/ui/kbd.tsx +3 -3
- package/src/components/ui/label.stories.tsx +18 -0
- package/src/components/ui/label.test.tsx +13 -0
- package/src/components/ui/label.tsx +7 -11
- package/src/components/ui/marker.stories.tsx +19 -0
- package/src/components/ui/marker.test.tsx +14 -0
- package/src/components/ui/marker.tsx +73 -0
- package/src/components/ui/menubar.stories.tsx +19 -0
- package/src/components/ui/menubar.test.tsx +14 -0
- package/src/components/ui/menubar.tsx +226 -202
- package/src/components/ui/message-scroller.stories.tsx +19 -0
- package/src/components/ui/message-scroller.test.tsx +14 -0
- package/src/components/ui/message-scroller.tsx +131 -0
- package/src/components/ui/message.stories.tsx +19 -0
- package/src/components/ui/message.test.tsx +14 -0
- package/src/components/ui/message.tsx +94 -0
- package/src/components/ui/native-select.stories.tsx +18 -0
- package/src/components/ui/native-select.test.tsx +13 -0
- package/src/components/ui/native-select.tsx +63 -0
- package/src/components/ui/navigation-menu.stories.tsx +19 -0
- package/src/components/ui/navigation-menu.test.tsx +14 -0
- package/src/components/ui/navigation-menu.tsx +145 -103
- package/src/components/ui/pagination.stories.tsx +19 -0
- package/src/components/ui/pagination.test.tsx +14 -0
- package/src/components/ui/pagination.tsx +114 -83
- package/src/components/ui/popover.stories.tsx +19 -0
- package/src/components/ui/popover.test.tsx +14 -0
- package/src/components/ui/popover.tsx +68 -33
- package/src/components/ui/progress.stories.tsx +19 -0
- package/src/components/ui/progress.test.tsx +14 -0
- package/src/components/ui/progress.tsx +67 -15
- package/src/components/ui/questionnaire.stories.tsx +19 -0
- package/src/components/ui/questionnaire.test.tsx +14 -0
- package/src/components/ui/questionnaire.tsx +324 -0
- package/src/components/ui/radio-group.stories.tsx +19 -0
- package/src/components/ui/radio-group.test.tsx +14 -0
- package/src/components/ui/radio-group.tsx +15 -20
- package/src/components/ui/resizable.stories.tsx +19 -0
- package/src/components/ui/resizable.test.tsx +14 -0
- package/src/components/ui/resizable.tsx +37 -30
- package/src/components/ui/scroll-area.stories.tsx +19 -0
- package/src/components/ui/scroll-area.test.tsx +14 -0
- package/src/components/ui/scroll-area.tsx +41 -19
- package/src/components/ui/select.stories.tsx +19 -0
- package/src/components/ui/select.test.tsx +14 -0
- package/src/components/ui/select.tsx +145 -78
- package/src/components/ui/separator.stories.tsx +19 -0
- package/src/components/ui/separator.test.tsx +14 -0
- package/src/components/ui/separator.tsx +8 -11
- package/src/components/ui/sheet.stories.tsx +19 -0
- package/src/components/ui/sheet.test.tsx +14 -0
- package/src/components/ui/sheet.tsx +56 -71
- package/src/components/ui/sidebar.stories.tsx +18 -0
- package/src/components/ui/sidebar.test.tsx +13 -0
- package/src/components/ui/sidebar.tsx +469 -513
- package/src/components/ui/skeleton.stories.tsx +19 -0
- package/src/components/ui/skeleton.test.tsx +14 -0
- package/src/components/ui/skeleton.tsx +8 -114
- package/src/components/ui/slider.stories.tsx +19 -0
- package/src/components/ui/slider.test.tsx +14 -0
- package/src/components/ui/slider.tsx +31 -40
- package/src/components/ui/sonner.stories.tsx +19 -0
- package/src/components/ui/sonner.test.tsx +14 -0
- package/src/components/ui/sonner.tsx +39 -7
- package/src/components/ui/spinner.stories.tsx +18 -0
- package/src/components/ui/spinner.test.tsx +13 -0
- package/src/components/ui/spinner.tsx +3 -7
- package/src/components/ui/switch.stories.tsx +19 -0
- package/src/components/ui/switch.test.tsx +14 -0
- package/src/components/ui/switch.tsx +4 -7
- package/src/components/ui/table.stories.tsx +19 -0
- package/src/components/ui/table.test.tsx +14 -0
- package/src/components/ui/table.tsx +17 -17
- package/src/components/ui/tabs.stories.tsx +19 -0
- package/src/components/ui/tabs.test.tsx +14 -0
- package/src/components/ui/tabs.tsx +71 -31
- package/src/components/ui/textarea.stories.tsx +19 -0
- package/src/components/ui/textarea.test.tsx +14 -0
- package/src/components/ui/textarea.tsx +7 -5
- package/src/components/ui/theme-toggle.stories.tsx +18 -0
- package/src/components/ui/theme-toggle.test.tsx +13 -0
- package/src/components/ui/theme-toggle.tsx +35 -37
- package/src/components/ui/toggle-group.stories.tsx +19 -0
- package/src/components/ui/toggle-group.test.tsx +14 -0
- package/src/components/ui/toggle-group.tsx +41 -25
- package/src/components/ui/toggle.stories.tsx +19 -0
- package/src/components/ui/toggle.test.tsx +14 -0
- package/src/components/ui/toggle.tsx +17 -19
- package/src/components/ui/tooltip.stories.tsx +19 -0
- package/src/components/ui/tooltip.test.tsx +14 -0
- package/src/components/ui/tooltip.tsx +53 -44
- package/src/demo/AIDemo.tsx +50 -0
- package/src/demo/ButtonsDemo.tsx +41 -18
- package/src/demo/CalendarDemo.tsx +1 -1
- package/src/demo/FeedbackDemo.tsx +4 -6
- package/src/demo/FormsDemo.tsx +34 -11
- package/src/demo/NavigationDemo.tsx +38 -13
- package/src/demo/OverlaysDemo.tsx +22 -36
- package/src/demo/update-demos.js +82 -0
- package/src/index.css +66 -46
- package/src/lib/utils.ts +3 -3
- package/src/stories/Button.stories.ts +54 -0
- package/src/stories/Button.tsx +36 -0
- package/src/stories/Configure.mdx +388 -0
- package/src/stories/Header.stories.ts +34 -0
- package/src/stories/Header.tsx +55 -0
- package/src/stories/Page.stories.ts +33 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
|
@@ -3,324 +3,355 @@ import { cn as e } from "../../lib/utils.js";
|
|
|
3
3
|
import { Button as t } from "./button.js";
|
|
4
4
|
import { Separator as n } from "./separator.js";
|
|
5
5
|
import { Input as r } from "./input.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import { cva as
|
|
14
|
-
import {
|
|
6
|
+
import { Tooltip as i, TooltipContent as a, TooltipTrigger as o } from "./tooltip.js";
|
|
7
|
+
import { Sheet as s, SheetContent as c, SheetDescription as l, SheetHeader as u, SheetTitle as d } from "./sheet.js";
|
|
8
|
+
import { useIsMobile as f } from "../../hooks/use-mobile.js";
|
|
9
|
+
import { Skeleton as p } from "./skeleton.js";
|
|
10
|
+
import { PanelLeftIcon as m } from "lucide-react";
|
|
11
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
|
+
import * as _ from "react";
|
|
13
|
+
import { cva as v } from "class-variance-authority";
|
|
14
|
+
import { mergeProps as y } from "@base-ui/react/merge-props";
|
|
15
|
+
import { useRender as b } from "@base-ui/react/use-render";
|
|
15
16
|
//#region src/components/ui/sidebar.tsx
|
|
16
|
-
var x = "sidebar_state", S = 3600 * 24 * 7, C = "16rem", w = "18rem", T = "3rem", E = "b", D =
|
|
17
|
+
var x = "sidebar_state", S = 3600 * 24 * 7, C = "16rem", w = "18rem", T = "3rem", E = "b", D = _.createContext(null);
|
|
17
18
|
function O() {
|
|
18
|
-
let e =
|
|
19
|
+
let e = _.useContext(D);
|
|
19
20
|
if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
|
|
20
21
|
return e;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
let t = typeof e == "function" ? e(
|
|
25
|
-
r ? r(t) :
|
|
26
|
-
}, [r,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
function k({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }) {
|
|
24
|
+
let c = f(), [l, u] = _.useState(!1), [d, p] = _.useState(t), m = n ?? d, g = _.useCallback((e) => {
|
|
25
|
+
let t = typeof e == "function" ? e(m) : e;
|
|
26
|
+
r ? r(t) : p(t), document.cookie = `${x}=${t}; path=/; max-age=${S}`;
|
|
27
|
+
}, [r, m]), v = _.useCallback(() => c ? u((e) => !e) : g((e) => !e), [
|
|
28
|
+
c,
|
|
29
|
+
g,
|
|
30
|
+
u
|
|
30
31
|
]);
|
|
31
|
-
|
|
32
|
+
_.useEffect(() => {
|
|
32
33
|
let e = (e) => {
|
|
33
|
-
e.key === E && (e.metaKey || e.ctrlKey) && (e.preventDefault(),
|
|
34
|
+
e.key === E && (e.metaKey || e.ctrlKey) && (e.preventDefault(), v());
|
|
34
35
|
};
|
|
35
36
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
36
|
-
}, [
|
|
37
|
-
let
|
|
38
|
-
state:
|
|
39
|
-
open:
|
|
40
|
-
setOpen:
|
|
41
|
-
isMobile:
|
|
42
|
-
openMobile:
|
|
43
|
-
setOpenMobile:
|
|
44
|
-
toggleSidebar:
|
|
37
|
+
}, [v]);
|
|
38
|
+
let y = m ? "expanded" : "collapsed", b = _.useMemo(() => ({
|
|
39
|
+
state: y,
|
|
40
|
+
open: m,
|
|
41
|
+
setOpen: g,
|
|
42
|
+
isMobile: c,
|
|
43
|
+
openMobile: l,
|
|
44
|
+
setOpenMobile: u,
|
|
45
|
+
toggleSidebar: v
|
|
45
46
|
}), [
|
|
46
|
-
w,
|
|
47
|
-
v,
|
|
48
47
|
y,
|
|
48
|
+
m,
|
|
49
|
+
g,
|
|
50
|
+
c,
|
|
51
|
+
l,
|
|
49
52
|
u,
|
|
50
|
-
|
|
51
|
-
f,
|
|
52
|
-
b
|
|
53
|
+
v
|
|
53
54
|
]);
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
-
value:
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
...s,
|
|
67
|
-
children: o
|
|
68
|
-
})
|
|
55
|
+
return /* @__PURE__ */ h(D.Provider, {
|
|
56
|
+
value: b,
|
|
57
|
+
children: /* @__PURE__ */ h("div", {
|
|
58
|
+
"data-slot": "sidebar-wrapper",
|
|
59
|
+
style: {
|
|
60
|
+
"--sidebar-width": C,
|
|
61
|
+
"--sidebar-width-icon": T,
|
|
62
|
+
...a
|
|
63
|
+
},
|
|
64
|
+
className: e("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", i),
|
|
65
|
+
...s,
|
|
66
|
+
children: o
|
|
69
67
|
})
|
|
70
68
|
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
className: e("flex h-full w-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
69
|
+
}
|
|
70
|
+
function A({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanvas", className: i, children: a, dir: o, ...f }) {
|
|
71
|
+
let { isMobile: p, state: m, openMobile: _, setOpenMobile: v } = O();
|
|
72
|
+
return r === "none" ? /* @__PURE__ */ h("div", {
|
|
73
|
+
"data-slot": "sidebar",
|
|
74
|
+
className: e("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", i),
|
|
75
|
+
...f,
|
|
76
|
+
children: a
|
|
77
|
+
}) : p ? /* @__PURE__ */ h(s, {
|
|
78
|
+
open: _,
|
|
79
|
+
onOpenChange: v,
|
|
80
|
+
...f,
|
|
81
|
+
children: /* @__PURE__ */ g(c, {
|
|
82
|
+
dir: o,
|
|
85
83
|
"data-sidebar": "sidebar",
|
|
84
|
+
"data-slot": "sidebar",
|
|
86
85
|
"data-mobile": "true",
|
|
87
|
-
className: "w-
|
|
86
|
+
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
88
87
|
style: { "--sidebar-width": w },
|
|
89
88
|
side: t,
|
|
90
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ g(u, {
|
|
91
90
|
className: "sr-only",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
-
}), /* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ h(d, { children: "Sidebar" }), /* @__PURE__ */ h(l, { children: "Displays the mobile sidebar." })]
|
|
92
|
+
}), /* @__PURE__ */ h("div", {
|
|
94
93
|
className: "flex h-full w-full flex-col",
|
|
95
|
-
children:
|
|
94
|
+
children: a
|
|
96
95
|
})]
|
|
97
96
|
})
|
|
98
|
-
}) : /* @__PURE__ */
|
|
99
|
-
ref: f,
|
|
97
|
+
}) : /* @__PURE__ */ g("div", {
|
|
100
98
|
className: "group peer hidden text-sidebar-foreground md:block",
|
|
101
99
|
"data-state": m,
|
|
102
100
|
"data-collapsible": m === "collapsed" ? r : "",
|
|
103
101
|
"data-variant": n,
|
|
104
102
|
"data-side": t,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
"data-slot": "sidebar",
|
|
104
|
+
children: [/* @__PURE__ */ h("div", {
|
|
105
|
+
"data-slot": "sidebar-gap",
|
|
106
|
+
className: e("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", n === "floating" || n === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
107
|
+
}), /* @__PURE__ */ h("div", {
|
|
108
|
+
"data-slot": "sidebar-container",
|
|
109
|
+
"data-side": t,
|
|
110
|
+
className: e("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", n === "floating" || n === "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", i),
|
|
111
|
+
...f,
|
|
112
|
+
children: /* @__PURE__ */ h("div", {
|
|
109
113
|
"data-sidebar": "sidebar",
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
"data-slot": "sidebar-inner",
|
|
115
|
+
className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
|
|
116
|
+
children: a
|
|
112
117
|
})
|
|
113
118
|
})]
|
|
114
119
|
});
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return /* @__PURE__ */ v(t, {
|
|
120
|
-
ref: a,
|
|
120
|
+
}
|
|
121
|
+
function j({ className: n, onClick: r, ...i }) {
|
|
122
|
+
let { toggleSidebar: a } = O();
|
|
123
|
+
return /* @__PURE__ */ g(t, {
|
|
121
124
|
"data-sidebar": "trigger",
|
|
125
|
+
"data-slot": "sidebar-trigger",
|
|
122
126
|
variant: "ghost",
|
|
123
|
-
size: "icon",
|
|
124
|
-
className: e(
|
|
127
|
+
size: "icon-sm",
|
|
128
|
+
className: e(n),
|
|
125
129
|
onClick: (e) => {
|
|
126
|
-
r?.(e),
|
|
130
|
+
r?.(e), a();
|
|
127
131
|
},
|
|
128
132
|
...i,
|
|
129
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ h(m, {}), /* @__PURE__ */ h("span", {
|
|
130
134
|
className: "sr-only",
|
|
131
135
|
children: "Toggle Sidebar"
|
|
132
136
|
})]
|
|
133
137
|
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return /* @__PURE__ */ _("button", {
|
|
139
|
-
ref: r,
|
|
138
|
+
}
|
|
139
|
+
function M({ className: t, ...n }) {
|
|
140
|
+
let { toggleSidebar: r } = O();
|
|
141
|
+
return /* @__PURE__ */ g(i, { children: [/* @__PURE__ */ h(o, { render: /* @__PURE__ */ h("button", {
|
|
140
142
|
"data-sidebar": "rail",
|
|
143
|
+
"data-slot": "sidebar-rail",
|
|
141
144
|
"aria-label": "Toggle Sidebar",
|
|
142
145
|
tabIndex: -1,
|
|
143
|
-
onClick:
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
onClick: r,
|
|
147
|
+
className: e("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "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", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", t),
|
|
148
|
+
...n
|
|
149
|
+
}) }), /* @__PURE__ */ h(a, { children: "Toggle Sidebar" })] });
|
|
150
|
+
}
|
|
151
|
+
function N({ className: t, ...n }) {
|
|
152
|
+
return /* @__PURE__ */ h("main", {
|
|
153
|
+
"data-slot": "sidebar-inset",
|
|
154
|
+
className: e("relative flex w-full flex-1 flex-col bg-background 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", t),
|
|
146
155
|
...n
|
|
147
156
|
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
})
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
})
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
157
|
+
}
|
|
158
|
+
function P({ className: t, ...n }) {
|
|
159
|
+
return /* @__PURE__ */ h(r, {
|
|
160
|
+
"data-slot": "sidebar-input",
|
|
161
|
+
"data-sidebar": "input",
|
|
162
|
+
className: e("h-8 w-full bg-background shadow-none", t),
|
|
163
|
+
...n
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function F({ className: t, ...n }) {
|
|
167
|
+
return /* @__PURE__ */ h("div", {
|
|
168
|
+
"data-slot": "sidebar-header",
|
|
169
|
+
"data-sidebar": "header",
|
|
170
|
+
className: e("flex flex-col gap-2 p-2", t),
|
|
171
|
+
...n
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function I({ className: t, ...n }) {
|
|
175
|
+
return /* @__PURE__ */ h("div", {
|
|
176
|
+
"data-slot": "sidebar-footer",
|
|
177
|
+
"data-sidebar": "footer",
|
|
178
|
+
className: e("flex flex-col gap-2 p-2", t),
|
|
179
|
+
...n
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function L({ className: t, ...r }) {
|
|
183
|
+
return /* @__PURE__ */ h(n, {
|
|
184
|
+
"data-slot": "sidebar-separator",
|
|
185
|
+
"data-sidebar": "separator",
|
|
186
|
+
className: e("mx-2 w-auto bg-sidebar-border", t),
|
|
187
|
+
...r
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function R({ className: t, ...n }) {
|
|
191
|
+
return /* @__PURE__ */ h("div", {
|
|
192
|
+
"data-slot": "sidebar-content",
|
|
193
|
+
"data-sidebar": "content",
|
|
194
|
+
className: e("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden", t),
|
|
195
|
+
...n
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function z({ className: t, ...n }) {
|
|
199
|
+
return /* @__PURE__ */ h("div", {
|
|
200
|
+
"data-slot": "sidebar-group",
|
|
201
|
+
"data-sidebar": "group",
|
|
202
|
+
className: e("relative flex w-full min-w-0 flex-col p-2", t),
|
|
203
|
+
...n
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function B({ className: t, render: n, ...r }) {
|
|
207
|
+
return b({
|
|
208
|
+
defaultTagName: "div",
|
|
209
|
+
props: y({ className: e("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", t) }, r),
|
|
210
|
+
render: n,
|
|
211
|
+
state: {
|
|
212
|
+
slot: "sidebar-group-label",
|
|
213
|
+
sidebar: "group-label"
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function V({ className: t, render: n, ...r }) {
|
|
218
|
+
return b({
|
|
219
|
+
defaultTagName: "button",
|
|
220
|
+
props: y({ className: e("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", t) }, r),
|
|
221
|
+
render: n,
|
|
222
|
+
state: {
|
|
223
|
+
slot: "sidebar-group-action",
|
|
224
|
+
sidebar: "group-action"
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function H({ className: t, ...n }) {
|
|
229
|
+
return /* @__PURE__ */ h("div", {
|
|
230
|
+
"data-slot": "sidebar-group-content",
|
|
231
|
+
"data-sidebar": "group-content",
|
|
232
|
+
className: e("w-full text-sm", t),
|
|
233
|
+
...n
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function U({ className: t, ...n }) {
|
|
237
|
+
return /* @__PURE__ */ h("ul", {
|
|
238
|
+
"data-slot": "sidebar-menu",
|
|
239
|
+
"data-sidebar": "menu",
|
|
240
|
+
className: e("flex w-full min-w-0 flex-col gap-0", t),
|
|
241
|
+
...n
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function W({ className: t, ...n }) {
|
|
245
|
+
return /* @__PURE__ */ h("li", {
|
|
246
|
+
"data-slot": "sidebar-menu-item",
|
|
247
|
+
"data-sidebar": "menu-item",
|
|
248
|
+
className: e("group/menu-item relative", t),
|
|
249
|
+
...n
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
var G = v("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! 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 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
|
|
234
253
|
variants: {
|
|
235
254
|
variant: {
|
|
236
255
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
237
|
-
outline: "bg-background shadow-[
|
|
256
|
+
outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
|
|
238
257
|
},
|
|
239
258
|
size: {
|
|
240
259
|
default: "h-8 text-sm",
|
|
241
260
|
sm: "h-7 text-xs",
|
|
242
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]
|
|
261
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
243
262
|
}
|
|
244
263
|
},
|
|
245
264
|
defaultVariants: {
|
|
246
265
|
variant: "default",
|
|
247
266
|
size: "default"
|
|
248
267
|
}
|
|
249
|
-
})
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
"data-active": n,
|
|
255
|
-
className: e(G({
|
|
268
|
+
});
|
|
269
|
+
function K({ render: t, isActive: n = !1, variant: r = "default", size: s = "default", tooltip: c, className: l, ...u }) {
|
|
270
|
+
let { isMobile: d, state: f } = O(), p = b({
|
|
271
|
+
defaultTagName: "button",
|
|
272
|
+
props: y({ className: e(G({
|
|
256
273
|
variant: r,
|
|
257
|
-
size:
|
|
258
|
-
}),
|
|
259
|
-
|
|
274
|
+
size: s
|
|
275
|
+
}), l) }, u),
|
|
276
|
+
render: c ? /* @__PURE__ */ h(o, { render: t }) : t,
|
|
277
|
+
state: {
|
|
278
|
+
slot: "sidebar-menu-button",
|
|
279
|
+
sidebar: "menu-button",
|
|
280
|
+
size: s,
|
|
281
|
+
active: n
|
|
282
|
+
}
|
|
260
283
|
});
|
|
261
|
-
return
|
|
262
|
-
asChild: !0,
|
|
263
|
-
children: h
|
|
264
|
-
}), /* @__PURE__ */ _(f, {
|
|
284
|
+
return c ? (typeof c == "string" && (c = { children: c }), /* @__PURE__ */ g(i, { children: [p, /* @__PURE__ */ h(a, {
|
|
265
285
|
side: "right",
|
|
266
286
|
align: "center",
|
|
267
|
-
hidden:
|
|
268
|
-
...
|
|
269
|
-
})] })) :
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
hidden: f !== "collapsed" || d,
|
|
288
|
+
...c
|
|
289
|
+
})] })) : p;
|
|
290
|
+
}
|
|
291
|
+
function q({ className: t, render: n, showOnHover: r = !1, ...i }) {
|
|
292
|
+
return b({
|
|
293
|
+
defaultTagName: "button",
|
|
294
|
+
props: y({ className: e("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", r && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", t) }, i),
|
|
295
|
+
render: n,
|
|
296
|
+
state: {
|
|
297
|
+
slot: "sidebar-menu-action",
|
|
298
|
+
sidebar: "menu-action"
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
function J({ className: t, ...n }) {
|
|
303
|
+
return /* @__PURE__ */ h("div", {
|
|
304
|
+
"data-slot": "sidebar-menu-badge",
|
|
305
|
+
"data-sidebar": "menu-badge",
|
|
306
|
+
className: e("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", t),
|
|
307
|
+
...n
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
function Y({ className: t, showIcon: n = !1, ...r }) {
|
|
311
|
+
let [i] = _.useState(() => `${Math.floor(Math.random() * 40) + 50}%`);
|
|
312
|
+
return /* @__PURE__ */ g("div", {
|
|
313
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
290
314
|
"data-sidebar": "menu-skeleton",
|
|
291
315
|
className: e("flex h-8 items-center gap-2 rounded-md px-2", t),
|
|
292
316
|
...r,
|
|
293
|
-
children: [n && /* @__PURE__ */
|
|
317
|
+
children: [n && /* @__PURE__ */ h(p, {
|
|
294
318
|
className: "size-4 rounded-md",
|
|
295
319
|
"data-sidebar": "menu-skeleton-icon"
|
|
296
|
-
}), /* @__PURE__ */
|
|
297
|
-
className: "h-4 max-w-
|
|
320
|
+
}), /* @__PURE__ */ h(p, {
|
|
321
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
298
322
|
"data-sidebar": "menu-skeleton-text",
|
|
299
|
-
style: { "--skeleton-width":
|
|
323
|
+
style: { "--skeleton-width": i }
|
|
300
324
|
})]
|
|
301
325
|
});
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
})
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
326
|
+
}
|
|
327
|
+
function X({ className: t, ...n }) {
|
|
328
|
+
return /* @__PURE__ */ h("ul", {
|
|
329
|
+
"data-slot": "sidebar-menu-sub",
|
|
330
|
+
"data-sidebar": "menu-sub",
|
|
331
|
+
className: e("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", t),
|
|
332
|
+
...n
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
function Z({ className: t, ...n }) {
|
|
336
|
+
return /* @__PURE__ */ h("li", {
|
|
337
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
338
|
+
"data-sidebar": "menu-sub-item",
|
|
339
|
+
className: e("group/menu-sub-item relative", t),
|
|
340
|
+
...n
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
function Q({ render: t, size: n = "md", isActive: r = !1, className: i, ...a }) {
|
|
344
|
+
return b({
|
|
345
|
+
defaultTagName: "a",
|
|
346
|
+
props: y({ className: e("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden 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 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", i) }, a),
|
|
347
|
+
render: t,
|
|
348
|
+
state: {
|
|
349
|
+
slot: "sidebar-menu-sub-button",
|
|
350
|
+
sidebar: "menu-sub-button",
|
|
351
|
+
size: n,
|
|
352
|
+
active: r
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}
|
|
325
356
|
//#endregion
|
|
326
357
|
export { A as Sidebar, R as SidebarContent, I as SidebarFooter, z as SidebarGroup, V as SidebarGroupAction, H as SidebarGroupContent, B as SidebarGroupLabel, F as SidebarHeader, P as SidebarInput, N as SidebarInset, U as SidebarMenu, q as SidebarMenuAction, J as SidebarMenuBadge, K as SidebarMenuButton, W as SidebarMenuItem, Y as SidebarMenuSkeleton, X as SidebarMenuSub, Q as SidebarMenuSubButton, Z as SidebarMenuSubItem, k as SidebarProvider, M as SidebarRail, L as SidebarSeparator, j as SidebarTrigger, O as useSidebar };
|