@brightlocal/ui-components 2.11.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/component-meta.json +474 -27
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +16 -4
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +57 -53
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts +7 -1
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +82 -81
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +221 -11
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +687 -406
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +14 -2
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +37 -37
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +3 -3
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +2 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +24 -3
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +121 -117
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +11 -0
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +43 -38
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +20 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +244 -238
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +5 -0
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +207 -206
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +10 -0
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +96 -96
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +38 -30
- package/dist/drawer.d.ts +2 -2
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +5 -0
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +15 -7
- package/dist/index.cjs +1 -1
- package/dist/index.js +313 -305
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +7 -1
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +131 -130
- package/dist/input-group.d.ts +1 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +10 -0
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +108 -106
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +1 -1
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +36 -37
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts +25 -4
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +71 -53
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +6 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +25 -22
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +17 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +32 -26
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +29 -3
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +26 -25
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +7 -7
- package/dist/rating.cjs +1 -1
- package/dist/rating.d.ts +6 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +28 -20
- package/dist/resizable.d.ts +1 -1
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +17 -3
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +65 -58
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +16 -4
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +38 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +6 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +42 -41
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +13 -11
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +14 -0
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +57 -39
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +25 -9
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +128 -113
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts +5 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +111 -110
- package/dist/typography.cjs +1 -1
- package/dist/typography.d.ts +1 -2
- package/dist/typography.d.ts.map +1 -1
- package/dist/typography.js +49 -50
- package/package.json +2 -3
- package/src/blocks/data-table.tsx +26 -9
- package/src/blocks/input-list.tsx +12 -1
- package/src/blocks/sidebar.tsx +638 -29
- package/src/components/breadcrumb.tsx +43 -26
- package/src/components/callout.tsx +5 -4
- package/src/components/carousel.tsx +33 -4
- package/src/components/chip.tsx +22 -2
- package/src/components/combobox.tsx +28 -3
- package/src/components/command.tsx +7 -1
- package/src/components/date-picker.tsx +17 -3
- package/src/components/dialog.tsx +17 -4
- package/src/components/drawer.tsx +2 -2
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/global-layout.tsx +15 -2
- package/src/components/input-chip.tsx +12 -1
- package/src/components/input-password.tsx +73 -49
- package/src/components/link.tsx +29 -17
- package/src/components/list.tsx +45 -2
- package/src/components/logo.tsx +10 -2
- package/src/components/map.tsx +23 -0
- package/src/components/pagination.tsx +44 -11
- package/src/components/popover.tsx +1 -1
- package/src/components/rating.tsx +21 -3
- package/src/components/select.tsx +33 -3
- package/src/components/separator.tsx +40 -25
- package/src/components/sheet.tsx +28 -20
- package/src/components/skeleton.tsx +13 -2
- package/src/components/table.tsx +39 -2
- package/src/components/tabs.tsx +195 -146
- package/src/components/text-reveal-motion.tsx +7 -1
- package/src/components/typography.tsx +6 -7
package/dist/blocks/sidebar.js
CHANGED
|
@@ -1,123 +1,126 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { ChevronRight as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Input as
|
|
9
|
-
import { Separator as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsx as a, jsxs as u, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { Slot as y } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as E } from "class-variance-authority";
|
|
5
|
+
import { ChevronRight as D, Ellipsis as K, Minus as W, Plus as O, ChevronsUpDown as q, ChevronDown as _, Menu as X, PanelLeft as V } from "@brightlocal/icons";
|
|
6
|
+
import { cn as l } from "@brightlocal/ui-components/lib/utils";
|
|
7
|
+
import { Button as L } from "../button.js";
|
|
8
|
+
import { Input as Y } from "../input.js";
|
|
9
|
+
import { Separator as B } from "../separator.js";
|
|
10
|
+
import { DropdownMenu as Z, DropdownMenuTrigger as J, DropdownMenuContent as Q, DropdownMenuLabel as ee, DropdownMenuSeparator as ae, DropdownMenuItem as te } from "../dropdown-menu.js";
|
|
11
|
+
import { Popover as re, PopoverTrigger as oe, PopoverContent as ne } from "../popover.js";
|
|
12
|
+
import { Sheet as se, SheetContent as ie, SheetTitle as de, SheetDescription as le } from "../sheet.js";
|
|
13
|
+
import { Accordion as ce, AccordionItem as ue, AccordionContent as be } from "../accordion.js";
|
|
14
|
+
import * as pe from "@radix-ui/react-accordion";
|
|
15
|
+
import { ScrollArea as fe } from "../scroll-area.js";
|
|
16
|
+
import { Skeleton as P } from "../skeleton.js";
|
|
17
|
+
import { Tooltip as me, TooltipTrigger as he, TooltipContent as ge, TooltipProvider as xe } from "../tooltip.js";
|
|
18
|
+
import { useIsBelowBreakpoint as ve } from "../hooks/use-breakpoint.js";
|
|
19
|
+
const v = "focus-visible:[box-shadow:0_0_0_1px_color-mix(in_srgb,var(--color-sidebar-ring)_50%,transparent),0_0_0_3px_rgba(0,0,0,0.1)]";
|
|
20
|
+
var we = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(we || {}), Ne = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(Ne || {}), ke = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(ke || {}), ye = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(ye || {}), Se = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(Se || {}), Ce = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(Ce || {}), Re = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(Re || {}), Me = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(Me || {}), Ie = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(Ie || {}), De = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(De || {});
|
|
21
|
+
const Ae = "sidebar:state", Ee = 3600 * 24 * 7, Oe = "224px", _e = "336px", Te = "48px", ze = "b", H = i.createContext(null);
|
|
19
22
|
function S() {
|
|
20
|
-
const e =
|
|
23
|
+
const e = i.useContext(H);
|
|
21
24
|
if (!e)
|
|
22
25
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
23
26
|
return e;
|
|
24
27
|
}
|
|
25
|
-
const
|
|
28
|
+
const Pe = i.forwardRef(
|
|
26
29
|
({
|
|
27
30
|
dataHook: e,
|
|
28
|
-
trackingEl:
|
|
29
|
-
trackingLabel:
|
|
31
|
+
trackingEl: t,
|
|
32
|
+
trackingLabel: r,
|
|
30
33
|
defaultOpen: o = !0,
|
|
31
|
-
open:
|
|
32
|
-
onOpenChange:
|
|
33
|
-
className:
|
|
34
|
+
open: n,
|
|
35
|
+
onOpenChange: s,
|
|
36
|
+
className: d,
|
|
34
37
|
style: c,
|
|
35
|
-
children:
|
|
36
|
-
...
|
|
38
|
+
children: b,
|
|
39
|
+
...p
|
|
37
40
|
}, m) => {
|
|
38
|
-
const
|
|
39
|
-
(
|
|
40
|
-
const
|
|
41
|
-
|
|
41
|
+
const f = ve("lg"), [h, w] = i.useState(!1), [g, M] = i.useState(o), k = n ?? g, C = i.useCallback(
|
|
42
|
+
(x) => {
|
|
43
|
+
const N = typeof x == "function" ? x(k) : x;
|
|
44
|
+
s ? s(N) : M(N), document.cookie = `${Ae}=${N}; path=/; max-age=${Ee}`;
|
|
42
45
|
},
|
|
43
|
-
[
|
|
44
|
-
),
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
46
|
+
[s, k]
|
|
47
|
+
), R = i.useCallback(() => f ? w((x) => !x) : C((x) => !x), [f, C, w]);
|
|
48
|
+
i.useEffect(() => {
|
|
49
|
+
const x = (N) => {
|
|
50
|
+
N.key === ze && (N.metaKey || N.ctrlKey) && (N.preventDefault(), R());
|
|
48
51
|
};
|
|
49
|
-
return window.addEventListener("keydown",
|
|
50
|
-
}, [
|
|
51
|
-
const
|
|
52
|
+
return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
|
|
53
|
+
}, [R]);
|
|
54
|
+
const z = k ? "expanded" : "collapsed", U = i.useMemo(
|
|
52
55
|
() => ({
|
|
53
|
-
state:
|
|
54
|
-
open:
|
|
55
|
-
setOpen:
|
|
56
|
-
isMobile:
|
|
57
|
-
openMobile:
|
|
58
|
-
setOpenMobile:
|
|
59
|
-
toggleSidebar:
|
|
56
|
+
state: z,
|
|
57
|
+
open: k,
|
|
58
|
+
setOpen: C,
|
|
59
|
+
isMobile: f,
|
|
60
|
+
openMobile: h,
|
|
61
|
+
setOpenMobile: w,
|
|
62
|
+
toggleSidebar: R
|
|
60
63
|
}),
|
|
61
|
-
[
|
|
64
|
+
[z, k, C, f, h, w, R]
|
|
62
65
|
);
|
|
63
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ a(H.Provider, { value: U, children: /* @__PURE__ */ a(xe, { delayDuration: 0, children: /* @__PURE__ */ a(
|
|
64
67
|
"div",
|
|
65
68
|
{
|
|
66
69
|
ref: m,
|
|
67
|
-
className:
|
|
70
|
+
className: l(
|
|
68
71
|
"group/sidebar-wrapper flex min-h-svh w-full",
|
|
69
|
-
|
|
72
|
+
d
|
|
70
73
|
),
|
|
71
74
|
"data-hook": e,
|
|
72
75
|
"data-slot": "sidebar-provider",
|
|
73
|
-
"data-tracking-el":
|
|
74
|
-
"data-tracking-label":
|
|
76
|
+
"data-tracking-el": t || "sidebar-provider",
|
|
77
|
+
"data-tracking-label": r,
|
|
75
78
|
style: {
|
|
76
|
-
"--sidebar-width":
|
|
77
|
-
"--sidebar-width-icon":
|
|
79
|
+
"--sidebar-width": Oe,
|
|
80
|
+
"--sidebar-width-icon": Te,
|
|
78
81
|
...c
|
|
79
82
|
},
|
|
80
|
-
...
|
|
81
|
-
children:
|
|
83
|
+
...p,
|
|
84
|
+
children: b
|
|
82
85
|
}
|
|
83
86
|
) }) });
|
|
84
87
|
}
|
|
85
88
|
);
|
|
86
|
-
|
|
87
|
-
const
|
|
89
|
+
Pe.displayName = "SidebarProvider";
|
|
90
|
+
const Le = i.forwardRef(
|
|
88
91
|
({
|
|
89
92
|
dataHook: e,
|
|
90
|
-
trackingEl:
|
|
91
|
-
trackingLabel:
|
|
93
|
+
trackingEl: t,
|
|
94
|
+
trackingLabel: r,
|
|
92
95
|
side: o = "left",
|
|
93
|
-
variant:
|
|
94
|
-
collapsible:
|
|
96
|
+
variant: n = "sidebar",
|
|
97
|
+
collapsible: s = "offcanvas",
|
|
95
98
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- accepted for backward compat
|
|
96
|
-
embedded:
|
|
97
|
-
mobileTitle: c
|
|
98
|
-
mobileDescription:
|
|
99
|
-
className:
|
|
99
|
+
embedded: d,
|
|
100
|
+
mobileTitle: c,
|
|
101
|
+
mobileDescription: b,
|
|
102
|
+
className: p,
|
|
100
103
|
children: m,
|
|
101
|
-
...
|
|
102
|
-
},
|
|
103
|
-
const { isMobile:
|
|
104
|
-
return
|
|
104
|
+
...f
|
|
105
|
+
}, h) => {
|
|
106
|
+
const { isMobile: w, state: g, openMobile: M, setOpenMobile: k } = S();
|
|
107
|
+
return s === "none" ? /* @__PURE__ */ a(
|
|
105
108
|
"div",
|
|
106
109
|
{
|
|
107
|
-
ref:
|
|
108
|
-
className:
|
|
110
|
+
ref: h,
|
|
111
|
+
className: l(
|
|
109
112
|
"text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
110
|
-
|
|
113
|
+
p
|
|
111
114
|
),
|
|
112
115
|
"data-hook": e,
|
|
113
116
|
"data-slot": "sidebar",
|
|
114
|
-
"data-tracking-el":
|
|
115
|
-
"data-tracking-label":
|
|
116
|
-
...
|
|
117
|
+
"data-tracking-el": t || "sidebar",
|
|
118
|
+
"data-tracking-label": r,
|
|
119
|
+
...f,
|
|
117
120
|
children: m
|
|
118
121
|
}
|
|
119
|
-
) :
|
|
120
|
-
|
|
122
|
+
) : w ? /* @__PURE__ */ a(se, { open: M, onOpenChange: k, children: /* @__PURE__ */ u(
|
|
123
|
+
ie,
|
|
121
124
|
{
|
|
122
125
|
className: "bg-sidebar-background text-sidebar-foreground w-(--sidebar-width) p-6",
|
|
123
126
|
"data-hook": `${e}-mobile-content`,
|
|
@@ -125,76 +128,83 @@ const ye = s.forwardRef(
|
|
|
125
128
|
"data-sidebar": "sidebar",
|
|
126
129
|
side: "left",
|
|
127
130
|
style: {
|
|
128
|
-
"--sidebar-width": `min(${
|
|
131
|
+
"--sidebar-width": `min(${_e}, calc(100vw - 40px))`
|
|
129
132
|
},
|
|
130
133
|
children: [
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ a(de, { className: "sr-only", children: c ?? "Navigation" }),
|
|
135
|
+
/* @__PURE__ */ a(le, { className: "sr-only", children: b ?? "Main navigation menu" }),
|
|
136
|
+
/* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: m })
|
|
134
137
|
]
|
|
135
138
|
}
|
|
136
|
-
) }) : /* @__PURE__ */
|
|
139
|
+
) }) : /* @__PURE__ */ a(
|
|
137
140
|
"div",
|
|
138
141
|
{
|
|
139
|
-
ref:
|
|
140
|
-
className:
|
|
142
|
+
ref: h,
|
|
143
|
+
className: l(
|
|
141
144
|
"group text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
g === "expanded" && "w-(--sidebar-width)",
|
|
146
|
+
s === "icon" && g === "collapsed" && "w-(--sidebar-width-icon)",
|
|
147
|
+
s === "offcanvas" && g === "collapsed" && "w-0",
|
|
148
|
+
p
|
|
146
149
|
),
|
|
147
|
-
"data-collapsible":
|
|
150
|
+
"data-collapsible": g === "collapsed" ? s : "",
|
|
148
151
|
"data-hook": e,
|
|
149
152
|
"data-side": o,
|
|
150
153
|
"data-slot": "sidebar",
|
|
151
|
-
"data-state":
|
|
152
|
-
"data-tracking-el":
|
|
153
|
-
"data-tracking-label":
|
|
154
|
-
"data-variant":
|
|
155
|
-
...
|
|
154
|
+
"data-state": g,
|
|
155
|
+
"data-tracking-el": t || "sidebar",
|
|
156
|
+
"data-tracking-label": r,
|
|
157
|
+
"data-variant": n,
|
|
158
|
+
...f,
|
|
156
159
|
children: m
|
|
157
160
|
}
|
|
158
161
|
);
|
|
159
162
|
}
|
|
160
163
|
);
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
({
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
Le.displayName = "Sidebar";
|
|
165
|
+
const F = i.forwardRef(
|
|
166
|
+
({
|
|
167
|
+
className: e,
|
|
168
|
+
onClick: t,
|
|
169
|
+
dataHook: r = "sidebar-trigger",
|
|
170
|
+
toggleAriaLabel: o,
|
|
171
|
+
children: n,
|
|
172
|
+
...s
|
|
173
|
+
}, d) => {
|
|
174
|
+
const { toggleSidebar: c } = S(), b = o ?? "Toggle Sidebar";
|
|
175
|
+
return /* @__PURE__ */ u(
|
|
176
|
+
L,
|
|
167
177
|
{
|
|
168
|
-
ref:
|
|
178
|
+
ref: d,
|
|
169
179
|
iconOnly: !0,
|
|
170
|
-
"aria-label":
|
|
171
|
-
className:
|
|
180
|
+
"aria-label": b,
|
|
181
|
+
className: l("h-7 w-7", e),
|
|
172
182
|
"data-slot": "sidebar-trigger",
|
|
173
|
-
dataHook:
|
|
183
|
+
dataHook: r,
|
|
174
184
|
size: "sm",
|
|
175
185
|
variant: "ghost",
|
|
176
|
-
onClick: (
|
|
177
|
-
|
|
186
|
+
onClick: (p) => {
|
|
187
|
+
t?.(p), c();
|
|
178
188
|
},
|
|
179
|
-
...
|
|
189
|
+
...s,
|
|
180
190
|
children: [
|
|
181
|
-
|
|
182
|
-
/* @__PURE__ */
|
|
191
|
+
n || /* @__PURE__ */ a(V, {}),
|
|
192
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: b })
|
|
183
193
|
]
|
|
184
194
|
}
|
|
185
195
|
);
|
|
186
196
|
}
|
|
187
197
|
);
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
({ className: e, ...
|
|
191
|
-
const { toggleSidebar:
|
|
192
|
-
return /* @__PURE__ */
|
|
198
|
+
F.displayName = "SidebarTrigger";
|
|
199
|
+
const Be = i.forwardRef(
|
|
200
|
+
({ className: e, toggleAriaLabel: t, ...r }, o) => {
|
|
201
|
+
const { toggleSidebar: n } = S(), s = t ?? "Toggle Sidebar";
|
|
202
|
+
return /* @__PURE__ */ a(
|
|
193
203
|
"button",
|
|
194
204
|
{
|
|
195
|
-
ref:
|
|
196
|
-
"aria-label":
|
|
197
|
-
className:
|
|
205
|
+
ref: o,
|
|
206
|
+
"aria-label": s,
|
|
207
|
+
className: l(
|
|
198
208
|
"hover:after:bg-sidebar-border absolute inset-y-0 -right-4 z-20 hidden w-4 -translate-x-1/2 transition-transform ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 sm:flex",
|
|
199
209
|
"cursor-w-resize",
|
|
200
210
|
"in-data-[state=collapsed]:cursor-e-resize",
|
|
@@ -204,106 +214,115 @@ const Ce = s.forwardRef(
|
|
|
204
214
|
),
|
|
205
215
|
"data-slot": "sidebar-rail",
|
|
206
216
|
tabIndex: -1,
|
|
207
|
-
title:
|
|
208
|
-
onClick:
|
|
209
|
-
...
|
|
217
|
+
title: s,
|
|
218
|
+
onClick: n,
|
|
219
|
+
...r
|
|
210
220
|
}
|
|
211
221
|
);
|
|
212
222
|
}
|
|
213
223
|
);
|
|
214
|
-
|
|
215
|
-
const
|
|
216
|
-
({ className: e, dataHook:
|
|
224
|
+
Be.displayName = "SidebarRail";
|
|
225
|
+
const He = i.forwardRef(
|
|
226
|
+
({ className: e, dataHook: t, trackingEl: r, trackingLabel: o, ...n }, s) => /* @__PURE__ */ a(
|
|
217
227
|
"main",
|
|
218
228
|
{
|
|
219
|
-
ref:
|
|
220
|
-
className:
|
|
229
|
+
ref: s,
|
|
230
|
+
className: l(
|
|
221
231
|
"bg-background relative flex min-h-svh flex-1 flex-col",
|
|
222
232
|
e
|
|
223
233
|
),
|
|
224
|
-
"data-hook":
|
|
234
|
+
"data-hook": t,
|
|
225
235
|
"data-slot": "sidebar-inset",
|
|
226
|
-
"data-tracking-el":
|
|
236
|
+
"data-tracking-el": r || "sidebar-inset",
|
|
227
237
|
"data-tracking-label": o,
|
|
228
|
-
...
|
|
238
|
+
...n
|
|
229
239
|
}
|
|
230
240
|
)
|
|
231
241
|
);
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
|
|
242
|
+
He.displayName = "SidebarInset";
|
|
243
|
+
const Fe = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
244
|
+
Y,
|
|
235
245
|
{
|
|
236
|
-
ref:
|
|
237
|
-
className:
|
|
238
|
-
"bg-background
|
|
246
|
+
ref: r,
|
|
247
|
+
className: l(
|
|
248
|
+
"bg-background h-8 w-full shadow-none",
|
|
249
|
+
v,
|
|
239
250
|
e
|
|
240
251
|
),
|
|
241
252
|
"data-slot": "sidebar-input",
|
|
242
253
|
dataHook: "sidebar-input",
|
|
243
|
-
...
|
|
254
|
+
...t
|
|
244
255
|
}
|
|
245
256
|
));
|
|
246
|
-
|
|
247
|
-
const
|
|
248
|
-
({ className: e, dataHook:
|
|
249
|
-
"
|
|
257
|
+
Fe.displayName = "SidebarInput";
|
|
258
|
+
const $e = i.forwardRef(
|
|
259
|
+
({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
|
|
260
|
+
"header",
|
|
250
261
|
{
|
|
251
262
|
ref: o,
|
|
252
|
-
className:
|
|
263
|
+
className: l(
|
|
253
264
|
"pr-section-xs flex flex-col gap-2 pt-2 pb-9 pl-8",
|
|
254
265
|
e
|
|
255
266
|
),
|
|
256
|
-
"data-hook":
|
|
267
|
+
"data-hook": t,
|
|
257
268
|
"data-slot": "sidebar-header",
|
|
258
|
-
...
|
|
269
|
+
...r
|
|
259
270
|
}
|
|
260
271
|
)
|
|
261
272
|
);
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
({ className: e, dataHook:
|
|
265
|
-
"
|
|
273
|
+
$e.displayName = "SidebarHeader";
|
|
274
|
+
const je = i.forwardRef(
|
|
275
|
+
({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
|
|
276
|
+
"footer",
|
|
266
277
|
{
|
|
267
278
|
ref: o,
|
|
268
|
-
className:
|
|
269
|
-
"data-hook":
|
|
279
|
+
className: l("flex flex-col gap-2 p-2", e),
|
|
280
|
+
"data-hook": t,
|
|
270
281
|
"data-slot": "sidebar-footer",
|
|
271
|
-
...
|
|
282
|
+
...r
|
|
272
283
|
}
|
|
273
284
|
)
|
|
274
285
|
);
|
|
275
|
-
|
|
276
|
-
const
|
|
277
|
-
|
|
286
|
+
je.displayName = "SidebarFooter";
|
|
287
|
+
const Ge = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
288
|
+
B,
|
|
278
289
|
{
|
|
279
|
-
ref:
|
|
280
|
-
className:
|
|
290
|
+
ref: r,
|
|
291
|
+
className: l(
|
|
281
292
|
"bg-sidebar-border mx-2 my-5 w-auto group-data-[collapsible=icon]:mx-0",
|
|
282
293
|
e
|
|
283
294
|
),
|
|
284
295
|
"data-slot": "sidebar-separator",
|
|
285
|
-
...
|
|
296
|
+
...t
|
|
286
297
|
}
|
|
287
298
|
));
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
({ className: e, dataHook:
|
|
291
|
-
const { isMobile:
|
|
292
|
-
|
|
293
|
-
|
|
299
|
+
Ge.displayName = "SidebarSeparator";
|
|
300
|
+
const Ue = i.forwardRef(
|
|
301
|
+
({ className: e, dataHook: t, ariaLabel: r = "Sidebar", children: o, ...n }, s) => {
|
|
302
|
+
const { isMobile: d } = S(), c = i.useCallback(
|
|
303
|
+
(b) => {
|
|
304
|
+
const p = b?.querySelector(
|
|
305
|
+
'[data-slot="scroll-area-viewport"]'
|
|
306
|
+
);
|
|
307
|
+
p && (p.tabIndex = -1), typeof s == "function" ? s(b) : s && (s.current = b);
|
|
308
|
+
},
|
|
309
|
+
[s]
|
|
310
|
+
);
|
|
311
|
+
return /* @__PURE__ */ a(
|
|
312
|
+
fe,
|
|
294
313
|
{
|
|
295
|
-
ref:
|
|
296
|
-
className:
|
|
297
|
-
"min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden
|
|
314
|
+
ref: c,
|
|
315
|
+
className: l(
|
|
316
|
+
"min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [&_[data-slot=scroll-area-viewport]>div]:block!",
|
|
298
317
|
e
|
|
299
318
|
),
|
|
300
|
-
dataHook:
|
|
301
|
-
scrollOrientation:
|
|
302
|
-
...
|
|
303
|
-
children: /* @__PURE__ */
|
|
319
|
+
dataHook: t ?? "sidebar-content-scroll",
|
|
320
|
+
scrollOrientation: d ? "both" : "vertical",
|
|
321
|
+
...n,
|
|
322
|
+
children: /* @__PURE__ */ a(
|
|
304
323
|
"nav",
|
|
305
324
|
{
|
|
306
|
-
"aria-label":
|
|
325
|
+
"aria-label": r,
|
|
307
326
|
className: "flex flex-col gap-2",
|
|
308
327
|
"data-slot": "sidebar-content",
|
|
309
328
|
children: o
|
|
@@ -313,22 +332,25 @@ const Ee = s.forwardRef(
|
|
|
313
332
|
);
|
|
314
333
|
}
|
|
315
334
|
);
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
({ className: e, dataHook:
|
|
335
|
+
Ue.displayName = "SidebarContent";
|
|
336
|
+
const Ke = i.forwardRef(
|
|
337
|
+
({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
|
|
319
338
|
"div",
|
|
320
339
|
{
|
|
321
340
|
ref: o,
|
|
322
|
-
className:
|
|
323
|
-
"data-hook":
|
|
341
|
+
className: l("relative flex w-full min-w-0 flex-col p-2", e),
|
|
342
|
+
"data-hook": t,
|
|
324
343
|
"data-slot": "sidebar-group",
|
|
325
|
-
...
|
|
344
|
+
...r
|
|
326
345
|
}
|
|
327
346
|
)
|
|
328
347
|
);
|
|
329
|
-
|
|
330
|
-
const
|
|
331
|
-
|
|
348
|
+
Ke.displayName = "SidebarGroup";
|
|
349
|
+
const We = E(
|
|
350
|
+
[
|
|
351
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 outline-none transition-[margin,opacity] duration-200 ease-linear [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
352
|
+
v
|
|
353
|
+
],
|
|
332
354
|
{
|
|
333
355
|
variants: {
|
|
334
356
|
size: {
|
|
@@ -347,145 +369,149 @@ const Te = I(
|
|
|
347
369
|
variant: "default"
|
|
348
370
|
}
|
|
349
371
|
}
|
|
350
|
-
),
|
|
372
|
+
), qe = i.forwardRef(
|
|
351
373
|
({
|
|
352
374
|
className: e,
|
|
353
|
-
dataHook:
|
|
354
|
-
asChild:
|
|
375
|
+
dataHook: t,
|
|
376
|
+
asChild: r = !1,
|
|
355
377
|
size: o = "sm",
|
|
356
|
-
variant:
|
|
357
|
-
isOpen:
|
|
358
|
-
onToggle:
|
|
378
|
+
variant: n = "default",
|
|
379
|
+
isOpen: s = !1,
|
|
380
|
+
onToggle: d,
|
|
359
381
|
onAction: c,
|
|
360
|
-
children:
|
|
361
|
-
...
|
|
382
|
+
children: b,
|
|
383
|
+
...p
|
|
362
384
|
}, m) => {
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
},
|
|
366
|
-
(
|
|
385
|
+
const f = r ? y : "div", h = () => {
|
|
386
|
+
n === "collapsible" && d ? d() : n === "action" && c && c();
|
|
387
|
+
}, w = (g) => {
|
|
388
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), h());
|
|
367
389
|
};
|
|
368
|
-
return /* @__PURE__ */
|
|
369
|
-
|
|
390
|
+
return /* @__PURE__ */ u(
|
|
391
|
+
f,
|
|
370
392
|
{
|
|
371
393
|
ref: m,
|
|
372
|
-
className:
|
|
373
|
-
"data-hook":
|
|
394
|
+
className: l(We({ size: o, variant: n }), e),
|
|
395
|
+
"data-hook": t,
|
|
374
396
|
"data-slot": "sidebar-group-label",
|
|
375
|
-
"data-variant":
|
|
376
|
-
role:
|
|
377
|
-
tabIndex:
|
|
378
|
-
onClick:
|
|
379
|
-
onKeyDown:
|
|
380
|
-
...
|
|
397
|
+
"data-variant": n,
|
|
398
|
+
role: n !== "default" ? "button" : void 0,
|
|
399
|
+
tabIndex: n !== "default" ? 0 : void 0,
|
|
400
|
+
onClick: n !== "default" ? h : void 0,
|
|
401
|
+
onKeyDown: n !== "default" ? w : void 0,
|
|
402
|
+
...p,
|
|
381
403
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
|
|
384
|
-
|
|
404
|
+
/* @__PURE__ */ a("span", { children: b }),
|
|
405
|
+
n === "collapsible" && /* @__PURE__ */ a(
|
|
406
|
+
_,
|
|
385
407
|
{
|
|
386
|
-
className:
|
|
408
|
+
className: l(
|
|
387
409
|
"shrink-0 transition-transform duration-200",
|
|
388
|
-
|
|
410
|
+
s && "rotate-180"
|
|
389
411
|
),
|
|
390
412
|
size: 16
|
|
391
413
|
}
|
|
392
414
|
),
|
|
393
|
-
|
|
415
|
+
n === "action" && /* @__PURE__ */ a(O, { className: "shrink-0", size: 16 })
|
|
394
416
|
]
|
|
395
417
|
}
|
|
396
418
|
);
|
|
397
419
|
}
|
|
398
420
|
);
|
|
399
|
-
|
|
400
|
-
const
|
|
401
|
-
|
|
421
|
+
qe.displayName = "SidebarGroupLabel";
|
|
422
|
+
const Xe = i.forwardRef(({ className: e, asChild: t = !1, ...r }, o) => /* @__PURE__ */ a(
|
|
423
|
+
t ? y : "button",
|
|
402
424
|
{
|
|
403
425
|
ref: o,
|
|
404
|
-
className:
|
|
405
|
-
"text-sidebar-foreground
|
|
426
|
+
className: l(
|
|
427
|
+
"text-sidebar-foreground 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 [&>svg]:shrink-0",
|
|
428
|
+
v,
|
|
406
429
|
// Increases the hit area of the button on mobile.
|
|
407
430
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
408
431
|
"group-data-[collapsible=icon]:hidden",
|
|
409
432
|
e
|
|
410
433
|
),
|
|
411
434
|
"data-slot": "sidebar-group-action",
|
|
412
|
-
...
|
|
435
|
+
...r
|
|
413
436
|
}
|
|
414
437
|
));
|
|
415
|
-
|
|
416
|
-
const
|
|
438
|
+
Xe.displayName = "SidebarGroupAction";
|
|
439
|
+
const Ve = i.forwardRef(({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
|
|
417
440
|
"div",
|
|
418
441
|
{
|
|
419
442
|
ref: o,
|
|
420
|
-
className:
|
|
421
|
-
"data-hook":
|
|
443
|
+
className: l("w-full text-sm", e),
|
|
444
|
+
"data-hook": t,
|
|
422
445
|
"data-slot": "sidebar-group-content",
|
|
423
|
-
...
|
|
446
|
+
...r
|
|
424
447
|
}
|
|
425
448
|
));
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
({ className: e, dataHook:
|
|
449
|
+
Ve.displayName = "SidebarGroupContent";
|
|
450
|
+
const Ye = i.forwardRef(
|
|
451
|
+
({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
|
|
429
452
|
"ul",
|
|
430
453
|
{
|
|
431
454
|
ref: o,
|
|
432
|
-
className:
|
|
433
|
-
"data-hook":
|
|
455
|
+
className: l("flex w-full min-w-0 flex-col gap-1", e),
|
|
456
|
+
"data-hook": t,
|
|
434
457
|
"data-slot": "sidebar-menu",
|
|
435
|
-
...
|
|
458
|
+
...r
|
|
436
459
|
}
|
|
437
460
|
)
|
|
438
461
|
);
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
({ className: e, dataHook:
|
|
462
|
+
Ye.displayName = "SidebarMenu";
|
|
463
|
+
const $ = i.forwardRef(
|
|
464
|
+
({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
|
|
442
465
|
"li",
|
|
443
466
|
{
|
|
444
467
|
ref: o,
|
|
445
|
-
className:
|
|
446
|
-
"data-hook":
|
|
468
|
+
className: l("group/menu-item relative", e),
|
|
469
|
+
"data-hook": t,
|
|
447
470
|
"data-slot": "sidebar-menu-item",
|
|
448
|
-
...
|
|
471
|
+
...r
|
|
449
472
|
}
|
|
450
473
|
)
|
|
451
474
|
);
|
|
452
|
-
|
|
453
|
-
const
|
|
475
|
+
$.displayName = "SidebarMenuItem";
|
|
476
|
+
const Ze = i.forwardRef(
|
|
454
477
|
({
|
|
455
478
|
type: e = "caret",
|
|
456
|
-
isActive:
|
|
457
|
-
className:
|
|
479
|
+
isActive: t = !1,
|
|
480
|
+
className: r,
|
|
458
481
|
...o
|
|
459
|
-
},
|
|
460
|
-
const
|
|
461
|
-
ref:
|
|
462
|
-
className:
|
|
482
|
+
}, n) => {
|
|
483
|
+
const s = {
|
|
484
|
+
ref: n,
|
|
485
|
+
className: l(
|
|
463
486
|
"shrink-0 transition-transform",
|
|
464
|
-
|
|
465
|
-
|
|
487
|
+
t && e === "caret" && "rotate-90",
|
|
488
|
+
r
|
|
466
489
|
),
|
|
467
490
|
"data-slot": "sidebar-collapse-icon",
|
|
468
491
|
...o
|
|
469
492
|
};
|
|
470
493
|
switch (e) {
|
|
471
494
|
case "horizontal":
|
|
472
|
-
return /* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ a(D, { ...s });
|
|
473
496
|
case "vertical":
|
|
474
|
-
return /* @__PURE__ */
|
|
497
|
+
return /* @__PURE__ */ a(_, { ...s });
|
|
475
498
|
case "upDown":
|
|
476
|
-
return /* @__PURE__ */
|
|
499
|
+
return /* @__PURE__ */ a(q, { ...s });
|
|
477
500
|
case "plusMinus":
|
|
478
|
-
return
|
|
501
|
+
return t ? /* @__PURE__ */ a(W, { ...s }) : /* @__PURE__ */ a(O, { ...s });
|
|
479
502
|
case "dots":
|
|
480
|
-
return /* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ a(K, { ...s });
|
|
481
504
|
default:
|
|
482
|
-
return /* @__PURE__ */
|
|
505
|
+
return /* @__PURE__ */ a(D, { ...s });
|
|
483
506
|
}
|
|
484
507
|
}
|
|
485
508
|
);
|
|
486
|
-
|
|
487
|
-
const
|
|
488
|
-
|
|
509
|
+
Ze.displayName = "SidebarCollapseIcon";
|
|
510
|
+
const Je = E(
|
|
511
|
+
[
|
|
512
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-full px-6 py-2 text-left text-sm font-medium outline-none transition-[color,background-color,border-color,box-shadow,opacity,width,height,padding] duration-150 ease-in-out hover:bg-sidebar-accent hover:text-sidebar-accent-foreground 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-[active=true]:bg-sidebar-accent data-[active=true]:font-semibold 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 group-data-[collapsible=icon]:rounded-md [&>span:last-of-type]:truncate [&>svg]:shrink-0 [&>svg]:opacity-70 data-[active=true]:[&>svg]:opacity-100 group-data-[collapsible=icon]:[&>span]:hidden group-data-[collapsible=icon]:[&>div]:hidden",
|
|
513
|
+
v
|
|
514
|
+
],
|
|
489
515
|
{
|
|
490
516
|
variants: {
|
|
491
517
|
variant: {
|
|
@@ -513,60 +539,61 @@ const He = I(
|
|
|
513
539
|
size: "default"
|
|
514
540
|
}
|
|
515
541
|
}
|
|
516
|
-
),
|
|
542
|
+
), T = i.forwardRef(
|
|
517
543
|
({
|
|
518
544
|
asChild: e = !1,
|
|
519
|
-
isActive:
|
|
520
|
-
variant:
|
|
545
|
+
isActive: t = !1,
|
|
546
|
+
variant: r = "simple",
|
|
521
547
|
size: o = "default",
|
|
522
|
-
tooltip:
|
|
523
|
-
className:
|
|
524
|
-
dataHook:
|
|
548
|
+
tooltip: n,
|
|
549
|
+
className: s,
|
|
550
|
+
dataHook: d,
|
|
525
551
|
...c
|
|
526
|
-
},
|
|
527
|
-
const
|
|
528
|
-
|
|
552
|
+
}, b) => {
|
|
553
|
+
const p = e ? y : "button", { isMobile: m, state: f } = S(), h = /* @__PURE__ */ a(
|
|
554
|
+
p,
|
|
529
555
|
{
|
|
530
|
-
ref:
|
|
531
|
-
className:
|
|
532
|
-
"data-active":
|
|
533
|
-
"data-hook":
|
|
556
|
+
ref: b,
|
|
557
|
+
className: l(Je({ variant: r, size: o }), s),
|
|
558
|
+
"data-active": t,
|
|
559
|
+
"data-hook": d,
|
|
534
560
|
"data-size": o,
|
|
535
561
|
"data-slot": "sidebar-menu-button",
|
|
536
|
-
"data-variant":
|
|
562
|
+
"data-variant": r,
|
|
537
563
|
...c
|
|
538
564
|
}
|
|
539
565
|
);
|
|
540
|
-
return
|
|
541
|
-
children:
|
|
566
|
+
return n ? (typeof n == "string" && (n = {
|
|
567
|
+
children: n,
|
|
542
568
|
dataHook: "sidebar-menu-button-tooltip"
|
|
543
|
-
}), /* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
|
|
569
|
+
}), /* @__PURE__ */ u(me, { children: [
|
|
570
|
+
/* @__PURE__ */ a(he, { asChild: !0, children: h }),
|
|
571
|
+
/* @__PURE__ */ a(
|
|
572
|
+
ge,
|
|
547
573
|
{
|
|
548
574
|
hideArrow: !0,
|
|
549
|
-
...
|
|
575
|
+
...n,
|
|
550
576
|
align: "center",
|
|
551
|
-
className:
|
|
577
|
+
className: l(
|
|
552
578
|
"bg-foreground text-background border-none",
|
|
553
|
-
|
|
579
|
+
n.className
|
|
554
580
|
),
|
|
555
|
-
hidden:
|
|
581
|
+
hidden: f !== "collapsed" || m,
|
|
556
582
|
side: "right",
|
|
557
583
|
sideOffset: 8
|
|
558
584
|
}
|
|
559
585
|
)
|
|
560
|
-
] })) :
|
|
586
|
+
] })) : h;
|
|
561
587
|
}
|
|
562
588
|
);
|
|
563
|
-
|
|
564
|
-
const
|
|
565
|
-
|
|
589
|
+
T.displayName = "SidebarMenuButton";
|
|
590
|
+
const Qe = i.forwardRef(({ className: e, asChild: t = !1, showOnHover: r = !1, ...o }, n) => /* @__PURE__ */ a(
|
|
591
|
+
t ? y : "button",
|
|
566
592
|
{
|
|
567
|
-
ref:
|
|
568
|
-
className:
|
|
569
|
-
"text-sidebar-foreground
|
|
593
|
+
ref: n,
|
|
594
|
+
className: l(
|
|
595
|
+
"text-sidebar-foreground 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 [&>svg]:shrink-0",
|
|
596
|
+
v,
|
|
570
597
|
// Increases the hit area of the button on mobile.
|
|
571
598
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
572
599
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
@@ -574,58 +601,58 @@ const Fe = s.forwardRef(({ className: e, asChild: a = !1, showOnHover: t = !1, .
|
|
|
574
601
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
575
602
|
"peer-data-[size=bigIcon]/menu-button:top-2.5",
|
|
576
603
|
"group-data-[collapsible=icon]:hidden",
|
|
577
|
-
|
|
604
|
+
r && "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",
|
|
578
605
|
e
|
|
579
606
|
),
|
|
580
607
|
"data-slot": "sidebar-menu-action",
|
|
581
608
|
...o
|
|
582
609
|
}
|
|
583
610
|
));
|
|
584
|
-
|
|
585
|
-
const
|
|
611
|
+
Qe.displayName = "SidebarMenuAction";
|
|
612
|
+
const ea = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
586
613
|
"div",
|
|
587
614
|
{
|
|
588
|
-
ref:
|
|
589
|
-
className:
|
|
615
|
+
ref: r,
|
|
616
|
+
className: l(
|
|
590
617
|
"text-sidebar-foreground pointer-events-none absolute inset-y-0 right-4 my-auto flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
591
618
|
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
592
619
|
"group-data-[collapsible=icon]:hidden",
|
|
593
620
|
e
|
|
594
621
|
),
|
|
595
622
|
"data-slot": "sidebar-menu-badge",
|
|
596
|
-
...
|
|
623
|
+
...t
|
|
597
624
|
}
|
|
598
625
|
));
|
|
599
|
-
|
|
600
|
-
const
|
|
601
|
-
const
|
|
602
|
-
let
|
|
603
|
-
for (let c = 0; c <
|
|
604
|
-
|
|
605
|
-
return `${Math.abs(
|
|
606
|
-
}, [
|
|
607
|
-
return /* @__PURE__ */
|
|
626
|
+
ea.displayName = "SidebarMenuBadge";
|
|
627
|
+
const aa = i.forwardRef(({ className: e, showIcon: t = !1, ...r }, o) => {
|
|
628
|
+
const n = i.useId(), s = i.useMemo(() => {
|
|
629
|
+
let d = 0;
|
|
630
|
+
for (let c = 0; c < n.length; c++)
|
|
631
|
+
d = (d << 5) - d + n.charCodeAt(c), d |= 0;
|
|
632
|
+
return `${Math.abs(d) % 40 + 50}%`;
|
|
633
|
+
}, [n]);
|
|
634
|
+
return /* @__PURE__ */ u(
|
|
608
635
|
"div",
|
|
609
636
|
{
|
|
610
637
|
ref: o,
|
|
611
|
-
className:
|
|
638
|
+
className: l("flex h-8 items-center gap-2 rounded-md px-2", e),
|
|
612
639
|
"data-slot": "sidebar-menu-skeleton",
|
|
613
|
-
...
|
|
640
|
+
...r,
|
|
614
641
|
children: [
|
|
615
|
-
|
|
616
|
-
|
|
642
|
+
t && /* @__PURE__ */ a(
|
|
643
|
+
P,
|
|
617
644
|
{
|
|
618
645
|
className: "size-4 rounded-md",
|
|
619
646
|
"data-slot": "sidebar-menu-skeleton-icon"
|
|
620
647
|
}
|
|
621
648
|
),
|
|
622
|
-
/* @__PURE__ */
|
|
623
|
-
|
|
649
|
+
/* @__PURE__ */ a(
|
|
650
|
+
P,
|
|
624
651
|
{
|
|
625
652
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
626
653
|
"data-slot": "sidebar-menu-skeleton-text",
|
|
627
654
|
style: {
|
|
628
|
-
"--skeleton-width":
|
|
655
|
+
"--skeleton-width": s
|
|
629
656
|
}
|
|
630
657
|
}
|
|
631
658
|
)
|
|
@@ -633,107 +660,108 @@ const Ke = s.forwardRef(({ className: e, showIcon: a = !1, ...t }, o) => {
|
|
|
633
660
|
}
|
|
634
661
|
);
|
|
635
662
|
});
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
"flex min-w-0 flex-col items-start gap-1
|
|
663
|
+
aa.displayName = "SidebarMenuSkeleton";
|
|
664
|
+
const ta = E(
|
|
665
|
+
"flex min-w-0 flex-col items-start gap-1 py-1 group-data-[collapsible=icon]:hidden",
|
|
639
666
|
{
|
|
640
667
|
variants: {
|
|
641
668
|
variant: {
|
|
642
|
-
default: "",
|
|
643
|
-
border: "
|
|
644
|
-
indent: "
|
|
669
|
+
default: "px-10",
|
|
670
|
+
border: "border-l border-sidebar-border ml-10 pl-1 pr-10",
|
|
671
|
+
indent: "px-10"
|
|
645
672
|
}
|
|
646
673
|
},
|
|
647
674
|
defaultVariants: {
|
|
648
675
|
variant: "border"
|
|
649
676
|
}
|
|
650
677
|
}
|
|
651
|
-
),
|
|
652
|
-
({ className: e, variant:
|
|
678
|
+
), j = i.forwardRef(
|
|
679
|
+
({ className: e, variant: t = "border", dataHook: r, ...o }, n) => /* @__PURE__ */ a(
|
|
653
680
|
"ul",
|
|
654
681
|
{
|
|
655
|
-
ref:
|
|
656
|
-
className:
|
|
657
|
-
"data-hook":
|
|
682
|
+
ref: n,
|
|
683
|
+
className: l(ta({ variant: t }), e),
|
|
684
|
+
"data-hook": r,
|
|
658
685
|
"data-slot": "sidebar-menu-sub",
|
|
659
686
|
...o
|
|
660
687
|
}
|
|
661
688
|
)
|
|
662
689
|
);
|
|
663
|
-
|
|
664
|
-
const
|
|
690
|
+
j.displayName = "SidebarMenuSub";
|
|
691
|
+
const ra = i.forwardRef(({ dataHook: e, ...t }, r) => /* @__PURE__ */ a(
|
|
665
692
|
"li",
|
|
666
693
|
{
|
|
667
|
-
ref:
|
|
694
|
+
ref: r,
|
|
668
695
|
"data-hook": e,
|
|
669
696
|
"data-slot": "sidebar-menu-sub-item",
|
|
670
|
-
...
|
|
697
|
+
...t
|
|
671
698
|
}
|
|
672
699
|
));
|
|
673
|
-
|
|
674
|
-
const
|
|
700
|
+
ra.displayName = "SidebarMenuSubItem";
|
|
701
|
+
const oa = i.forwardRef(
|
|
675
702
|
({
|
|
676
703
|
asChild: e = !1,
|
|
677
|
-
size:
|
|
678
|
-
isActive:
|
|
704
|
+
size: t = "md",
|
|
705
|
+
isActive: r,
|
|
679
706
|
className: o,
|
|
680
|
-
dataHook:
|
|
681
|
-
...
|
|
682
|
-
},
|
|
683
|
-
e ?
|
|
707
|
+
dataHook: n,
|
|
708
|
+
...s
|
|
709
|
+
}, d) => /* @__PURE__ */ a(
|
|
710
|
+
e ? y : "a",
|
|
684
711
|
{
|
|
685
|
-
ref:
|
|
686
|
-
className:
|
|
687
|
-
"text-sidebar-foreground
|
|
712
|
+
ref: d,
|
|
713
|
+
className: l(
|
|
714
|
+
"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-foreground flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-md px-2 transition-[color,background-color,box-shadow,opacity] duration-150 ease-in-out outline-none disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-of-type]:truncate [&>svg]:shrink-0",
|
|
715
|
+
v,
|
|
688
716
|
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
689
|
-
|
|
690
|
-
|
|
717
|
+
t === "sm" && "text-xs",
|
|
718
|
+
t === "md" && "text-sm",
|
|
691
719
|
"group-data-[collapsible=icon]:hidden",
|
|
692
720
|
o
|
|
693
721
|
),
|
|
694
|
-
"data-active":
|
|
695
|
-
"data-hook":
|
|
696
|
-
"data-size":
|
|
722
|
+
"data-active": r,
|
|
723
|
+
"data-hook": n,
|
|
724
|
+
"data-size": t,
|
|
697
725
|
"data-slot": "sidebar-menu-sub-button",
|
|
698
|
-
...
|
|
726
|
+
...s
|
|
699
727
|
}
|
|
700
728
|
)
|
|
701
729
|
);
|
|
702
|
-
|
|
703
|
-
function
|
|
730
|
+
oa.displayName = "SidebarMenuSubButton";
|
|
731
|
+
function na({
|
|
704
732
|
dataHook: e,
|
|
705
|
-
className:
|
|
706
|
-
children:
|
|
733
|
+
className: t,
|
|
734
|
+
children: r,
|
|
707
735
|
defaultOpen: o,
|
|
708
|
-
open:
|
|
709
|
-
onOpenChange:
|
|
736
|
+
open: n,
|
|
737
|
+
onOpenChange: s
|
|
710
738
|
}) {
|
|
711
|
-
return /* @__PURE__ */
|
|
712
|
-
|
|
739
|
+
return /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(
|
|
740
|
+
ce,
|
|
713
741
|
{
|
|
714
742
|
collapsible: !0,
|
|
715
|
-
className:
|
|
743
|
+
className: t,
|
|
716
744
|
dataHook: e ?? "sidebar-menu-collapsible",
|
|
717
745
|
defaultValue: o ? "item" : void 0,
|
|
718
746
|
type: "single",
|
|
719
|
-
value:
|
|
720
|
-
onValueChange:
|
|
721
|
-
children: /* @__PURE__ */
|
|
747
|
+
value: n !== void 0 ? n ? "item" : "" : void 0,
|
|
748
|
+
onValueChange: s ? (d) => s(d === "item") : void 0,
|
|
749
|
+
children: /* @__PURE__ */ a(ue, { className: "group/collapsible border-none", value: "item", children: r })
|
|
722
750
|
}
|
|
723
751
|
) });
|
|
724
752
|
}
|
|
725
|
-
|
|
726
|
-
const
|
|
727
|
-
|
|
753
|
+
na.displayName = "SidebarMenuCollapsible";
|
|
754
|
+
const sa = i.forwardRef(({ children: e, className: t, ...r }, o) => /* @__PURE__ */ a(pe.Trigger, { asChild: !0, children: /* @__PURE__ */ u(
|
|
755
|
+
T,
|
|
728
756
|
{
|
|
729
757
|
ref: o,
|
|
730
|
-
className:
|
|
758
|
+
className: t,
|
|
731
759
|
variant: "collapsible",
|
|
732
|
-
...
|
|
760
|
+
...r,
|
|
733
761
|
children: [
|
|
734
762
|
e,
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
|
|
763
|
+
/* @__PURE__ */ a(
|
|
764
|
+
D,
|
|
737
765
|
{
|
|
738
766
|
"data-collapse-icon": !0,
|
|
739
767
|
className: "opacity-100! transition-transform duration-200 ease-out group-data-[collapsible=icon]:hidden",
|
|
@@ -743,71 +771,324 @@ const Xe = s.forwardRef(({ children: e, className: a, ...t }, o) => /* @__PURE__
|
|
|
743
771
|
]
|
|
744
772
|
}
|
|
745
773
|
) }));
|
|
746
|
-
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
const
|
|
774
|
+
sa.displayName = "SidebarMenuCollapsibleTrigger";
|
|
775
|
+
const ia = i.forwardRef(({ dataHook: e, children: t, ...r }, o) => /* @__PURE__ */ a(be, { className: "p-0", children: /* @__PURE__ */ a(j, { ref: o, dataHook: e, ...r, children: t }) }));
|
|
776
|
+
ia.displayName = "SidebarMenuCollapsibleContent";
|
|
777
|
+
const da = i.forwardRef(
|
|
750
778
|
({
|
|
751
779
|
className: e,
|
|
752
|
-
dataHook:
|
|
753
|
-
trackingEl:
|
|
780
|
+
dataHook: t = "sidebar-drawer",
|
|
781
|
+
trackingEl: r,
|
|
754
782
|
trackingLabel: o,
|
|
755
783
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- accepted for backward compat
|
|
756
|
-
children:
|
|
757
|
-
...
|
|
758
|
-
},
|
|
784
|
+
children: n,
|
|
785
|
+
...s
|
|
786
|
+
}, d) => /* @__PURE__ */ a(
|
|
759
787
|
"div",
|
|
760
788
|
{
|
|
761
|
-
ref:
|
|
789
|
+
ref: d,
|
|
762
790
|
className: e,
|
|
763
|
-
"data-hook":
|
|
791
|
+
"data-hook": t,
|
|
764
792
|
"data-slot": "sidebar-drawer",
|
|
765
|
-
"data-tracking-el":
|
|
793
|
+
"data-tracking-el": r,
|
|
766
794
|
"data-tracking-label": o,
|
|
767
|
-
...
|
|
768
|
-
children: /* @__PURE__ */
|
|
795
|
+
...s,
|
|
796
|
+
children: /* @__PURE__ */ a(F, { dataHook: `${t}-trigger`, children: /* @__PURE__ */ a(X, { size: 24 }) })
|
|
797
|
+
}
|
|
798
|
+
)
|
|
799
|
+
);
|
|
800
|
+
da.displayName = "SidebarDrawer";
|
|
801
|
+
const la = i.forwardRef(
|
|
802
|
+
({ className: e, dataHook: t = "sidebar-header-button", children: r, ...o }, n) => /* @__PURE__ */ a(
|
|
803
|
+
L,
|
|
804
|
+
{
|
|
805
|
+
ref: n,
|
|
806
|
+
...o,
|
|
807
|
+
iconOnly: !0,
|
|
808
|
+
className: l(
|
|
809
|
+
"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground size-7 rounded-md shadow-none",
|
|
810
|
+
v,
|
|
811
|
+
e
|
|
812
|
+
),
|
|
813
|
+
"data-slot": "sidebar-header-button",
|
|
814
|
+
dataHook: t,
|
|
815
|
+
size: "sm",
|
|
816
|
+
variant: "ghost",
|
|
817
|
+
children: r
|
|
818
|
+
}
|
|
819
|
+
)
|
|
820
|
+
);
|
|
821
|
+
la.displayName = "SidebarHeaderButton";
|
|
822
|
+
const G = i.forwardRef(
|
|
823
|
+
({
|
|
824
|
+
className: e,
|
|
825
|
+
dataHook: t = "sidebar-popover-trigger",
|
|
826
|
+
icon: r,
|
|
827
|
+
triggerAriaLabel: o,
|
|
828
|
+
children: n,
|
|
829
|
+
...s
|
|
830
|
+
}, d) => /* @__PURE__ */ u(
|
|
831
|
+
"button",
|
|
832
|
+
{
|
|
833
|
+
ref: d,
|
|
834
|
+
"aria-label": o ?? "Switch workspace",
|
|
835
|
+
className: l(
|
|
836
|
+
"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground flex items-center gap-2 rounded-md px-1.5 py-2 text-sm font-semibold transition-colors duration-200 ease-out outline-none",
|
|
837
|
+
v,
|
|
838
|
+
e
|
|
839
|
+
),
|
|
840
|
+
"data-hook": t,
|
|
841
|
+
"data-slot": "sidebar-popover-trigger",
|
|
842
|
+
type: "button",
|
|
843
|
+
...s,
|
|
844
|
+
children: [
|
|
845
|
+
r && /* @__PURE__ */ a("span", { className: "bg-sidebar-primary text-sidebar-primary-foreground flex size-5 shrink-0 items-center justify-center rounded-md", children: r }),
|
|
846
|
+
/* @__PURE__ */ a("span", { className: "truncate", children: n }),
|
|
847
|
+
/* @__PURE__ */ a(_, { className: "shrink-0 opacity-50", size: 16 })
|
|
848
|
+
]
|
|
849
|
+
}
|
|
850
|
+
)
|
|
851
|
+
);
|
|
852
|
+
G.displayName = "SidebarPopoverTrigger";
|
|
853
|
+
const A = i.forwardRef(({ className: e, dataHook: t, icon: r, shortcut: o, children: n, ...s }, d) => /* @__PURE__ */ u(
|
|
854
|
+
"button",
|
|
855
|
+
{
|
|
856
|
+
ref: d,
|
|
857
|
+
className: l(
|
|
858
|
+
"text-popover-foreground hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground flex h-10 w-full items-center gap-2 rounded-xs p-2 text-sm transition-colors duration-150 ease-in-out outline-none",
|
|
859
|
+
v,
|
|
860
|
+
e
|
|
861
|
+
),
|
|
862
|
+
"data-hook": t,
|
|
863
|
+
"data-slot": "sidebar-popover-menu-item",
|
|
864
|
+
type: "button",
|
|
865
|
+
...s,
|
|
866
|
+
children: [
|
|
867
|
+
r && /* @__PURE__ */ a("span", { className: "border-border flex size-6 shrink-0 items-center justify-center rounded-xs border [&_svg]:size-4", children: r }),
|
|
868
|
+
/* @__PURE__ */ a("span", { className: "min-w-px flex-1 truncate text-left", children: n }),
|
|
869
|
+
o && /* @__PURE__ */ a("span", { className: "text-popover-foreground/60 shrink-0 text-xs", children: o })
|
|
870
|
+
]
|
|
871
|
+
}
|
|
872
|
+
));
|
|
873
|
+
A.displayName = "SidebarPopoverMenuItem";
|
|
874
|
+
const ca = i.forwardRef(
|
|
875
|
+
({
|
|
876
|
+
className: e,
|
|
877
|
+
dataHook: t = "sidebar-popover-menu",
|
|
878
|
+
groupTitle: r = "Teams",
|
|
879
|
+
items: o,
|
|
880
|
+
addActionLabel: n,
|
|
881
|
+
addActionIcon: s,
|
|
882
|
+
onAddAction: d,
|
|
883
|
+
children: c,
|
|
884
|
+
...b
|
|
885
|
+
}, p) => /* @__PURE__ */ a(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
ref: p,
|
|
889
|
+
className: l("flex flex-col", e),
|
|
890
|
+
"data-hook": t,
|
|
891
|
+
"data-slot": "sidebar-popover-menu",
|
|
892
|
+
...b,
|
|
893
|
+
children: c || /* @__PURE__ */ u(I, { children: [
|
|
894
|
+
/* @__PURE__ */ u("div", { className: "flex flex-col items-start p-1", children: [
|
|
895
|
+
r && /* @__PURE__ */ a("div", { className: "flex w-full items-center px-2 py-1.5", children: /* @__PURE__ */ a("span", { className: "text-muted-foreground flex-1 text-xs font-medium", children: r }) }),
|
|
896
|
+
o?.map((m, f) => /* @__PURE__ */ a(
|
|
897
|
+
A,
|
|
898
|
+
{
|
|
899
|
+
icon: m.icon,
|
|
900
|
+
shortcut: m.shortcut,
|
|
901
|
+
onClick: m.onClick,
|
|
902
|
+
children: m.label
|
|
903
|
+
},
|
|
904
|
+
f
|
|
905
|
+
))
|
|
906
|
+
] }),
|
|
907
|
+
d && /* @__PURE__ */ u(I, { children: [
|
|
908
|
+
/* @__PURE__ */ a(B, {}),
|
|
909
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col items-start p-1", children: /* @__PURE__ */ a(
|
|
910
|
+
A,
|
|
911
|
+
{
|
|
912
|
+
icon: s || /* @__PURE__ */ a(O, { size: 16 }),
|
|
913
|
+
onClick: d,
|
|
914
|
+
children: n ?? "Add team"
|
|
915
|
+
}
|
|
916
|
+
) })
|
|
917
|
+
] })
|
|
918
|
+
] })
|
|
919
|
+
}
|
|
920
|
+
)
|
|
921
|
+
);
|
|
922
|
+
ca.displayName = "SidebarPopoverMenu";
|
|
923
|
+
function ua({
|
|
924
|
+
dataHook: e = "sidebar-switcher",
|
|
925
|
+
icon: t,
|
|
926
|
+
label: r,
|
|
927
|
+
triggerAriaLabel: o,
|
|
928
|
+
triggerClassName: n,
|
|
929
|
+
children: s
|
|
930
|
+
}) {
|
|
931
|
+
return /* @__PURE__ */ u(re, { children: [
|
|
932
|
+
/* @__PURE__ */ a(oe, { asChild: !0, children: /* @__PURE__ */ a(
|
|
933
|
+
G,
|
|
934
|
+
{
|
|
935
|
+
className: n,
|
|
936
|
+
dataHook: `${e}-trigger`,
|
|
937
|
+
icon: t,
|
|
938
|
+
triggerAriaLabel: o,
|
|
939
|
+
children: r
|
|
940
|
+
}
|
|
941
|
+
) }),
|
|
942
|
+
/* @__PURE__ */ a(
|
|
943
|
+
ne,
|
|
944
|
+
{
|
|
945
|
+
align: "start",
|
|
946
|
+
className: "w-[316px] p-0",
|
|
947
|
+
dataHook: `${e}-content`,
|
|
948
|
+
side: "bottom",
|
|
949
|
+
sideOffset: 4,
|
|
950
|
+
children: s
|
|
951
|
+
}
|
|
952
|
+
)
|
|
953
|
+
] });
|
|
954
|
+
}
|
|
955
|
+
ua.displayName = "SidebarSwitcher";
|
|
956
|
+
function ba({
|
|
957
|
+
dataHook: e = "sidebar-account-dropdown",
|
|
958
|
+
name: t,
|
|
959
|
+
email: r,
|
|
960
|
+
avatar: o,
|
|
961
|
+
menuGroups: n,
|
|
962
|
+
triggerAriaLabel: s,
|
|
963
|
+
align: d = "end",
|
|
964
|
+
side: c = "top",
|
|
965
|
+
children: b
|
|
966
|
+
}) {
|
|
967
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
968
|
+
/* @__PURE__ */ a(J, { asChild: !0, children: /* @__PURE__ */ u(
|
|
969
|
+
T,
|
|
970
|
+
{
|
|
971
|
+
"aria-label": s ?? "Account menu",
|
|
972
|
+
className: "h-auto py-1.5",
|
|
973
|
+
dataHook: `${e}-button`,
|
|
974
|
+
size: "lg",
|
|
975
|
+
children: [
|
|
976
|
+
o,
|
|
977
|
+
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
|
|
978
|
+
/* @__PURE__ */ a("span", { className: "truncate text-sm font-semibold", children: t }),
|
|
979
|
+
/* @__PURE__ */ a("span", { className: "truncate text-xs font-normal", children: r })
|
|
980
|
+
] })
|
|
981
|
+
]
|
|
982
|
+
}
|
|
983
|
+
) }),
|
|
984
|
+
/* @__PURE__ */ a(
|
|
985
|
+
Q,
|
|
986
|
+
{
|
|
987
|
+
align: d,
|
|
988
|
+
className: "w-56",
|
|
989
|
+
dataHook: `${e}-content`,
|
|
990
|
+
side: c,
|
|
991
|
+
sideOffset: 4,
|
|
992
|
+
children: b || /* @__PURE__ */ u(I, { children: [
|
|
993
|
+
/* @__PURE__ */ u(ee, { className: "flex items-center gap-2 px-1 py-1.5", children: [
|
|
994
|
+
o,
|
|
995
|
+
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
|
|
996
|
+
/* @__PURE__ */ a("span", { className: "truncate text-sm font-semibold", children: t }),
|
|
997
|
+
/* @__PURE__ */ a("span", { className: "truncate text-xs font-normal", children: r })
|
|
998
|
+
] })
|
|
999
|
+
] }),
|
|
1000
|
+
n?.map((p, m) => /* @__PURE__ */ u(i.Fragment, { children: [
|
|
1001
|
+
/* @__PURE__ */ a(ae, {}),
|
|
1002
|
+
p.map((f, h) => /* @__PURE__ */ u(te, { onClick: f.onClick, children: [
|
|
1003
|
+
f.icon,
|
|
1004
|
+
f.label
|
|
1005
|
+
] }, h))
|
|
1006
|
+
] }, m))
|
|
1007
|
+
] })
|
|
1008
|
+
}
|
|
1009
|
+
)
|
|
1010
|
+
] });
|
|
1011
|
+
}
|
|
1012
|
+
ba.displayName = "SidebarAccountDropdown";
|
|
1013
|
+
const pa = i.forwardRef(
|
|
1014
|
+
({
|
|
1015
|
+
className: e,
|
|
1016
|
+
dataHook: t,
|
|
1017
|
+
senderName: r,
|
|
1018
|
+
title: o,
|
|
1019
|
+
description: n,
|
|
1020
|
+
timestamp: s,
|
|
1021
|
+
...d
|
|
1022
|
+
}, c) => /* @__PURE__ */ u(
|
|
1023
|
+
"button",
|
|
1024
|
+
{
|
|
1025
|
+
ref: c,
|
|
1026
|
+
className: l(
|
|
1027
|
+
"border-sidebar-border text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent flex w-full flex-col gap-2 border-b p-4 text-left transition-colors duration-150 ease-in-out outline-none",
|
|
1028
|
+
v,
|
|
1029
|
+
e
|
|
1030
|
+
),
|
|
1031
|
+
"data-hook": t,
|
|
1032
|
+
"data-slot": "sidebar-inbox-item",
|
|
1033
|
+
type: "button",
|
|
1034
|
+
...d,
|
|
1035
|
+
children: [
|
|
1036
|
+
/* @__PURE__ */ u("div", { className: "flex w-full items-center justify-between text-sm", children: [
|
|
1037
|
+
/* @__PURE__ */ a("span", { children: r }),
|
|
1038
|
+
s && /* @__PURE__ */ a("span", { children: s })
|
|
1039
|
+
] }),
|
|
1040
|
+
/* @__PURE__ */ a("p", { className: "w-full text-sm font-medium", children: o }),
|
|
1041
|
+
n && /* @__PURE__ */ a("p", { className: "w-full truncate text-xs", children: n })
|
|
1042
|
+
]
|
|
769
1043
|
}
|
|
770
1044
|
)
|
|
771
1045
|
);
|
|
772
|
-
|
|
1046
|
+
pa.displayName = "SidebarInboxItem";
|
|
773
1047
|
export {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
Fe as
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
$
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
1048
|
+
Le as Sidebar,
|
|
1049
|
+
ba as SidebarAccountDropdown,
|
|
1050
|
+
Ze as SidebarCollapseIcon,
|
|
1051
|
+
De as SidebarCollapseIconType,
|
|
1052
|
+
ke as SidebarCollapsible,
|
|
1053
|
+
Ue as SidebarContent,
|
|
1054
|
+
da as SidebarDrawer,
|
|
1055
|
+
je as SidebarFooter,
|
|
1056
|
+
Ke as SidebarGroup,
|
|
1057
|
+
Xe as SidebarGroupAction,
|
|
1058
|
+
Ve as SidebarGroupContent,
|
|
1059
|
+
qe as SidebarGroupLabel,
|
|
1060
|
+
ye as SidebarGroupLabelSize,
|
|
1061
|
+
Se as SidebarGroupLabelVariant,
|
|
1062
|
+
$e as SidebarHeader,
|
|
1063
|
+
la as SidebarHeaderButton,
|
|
1064
|
+
pa as SidebarInboxItem,
|
|
1065
|
+
Fe as SidebarInput,
|
|
1066
|
+
He as SidebarInset,
|
|
1067
|
+
Ye as SidebarMenu,
|
|
1068
|
+
Qe as SidebarMenuAction,
|
|
1069
|
+
ea as SidebarMenuBadge,
|
|
1070
|
+
T as SidebarMenuButton,
|
|
1071
|
+
Re as SidebarMenuButtonSize,
|
|
1072
|
+
Ce as SidebarMenuButtonVariant,
|
|
1073
|
+
na as SidebarMenuCollapsible,
|
|
1074
|
+
ia as SidebarMenuCollapsibleContent,
|
|
1075
|
+
sa as SidebarMenuCollapsibleTrigger,
|
|
1076
|
+
$ as SidebarMenuItem,
|
|
1077
|
+
aa as SidebarMenuSkeleton,
|
|
1078
|
+
j as SidebarMenuSub,
|
|
1079
|
+
oa as SidebarMenuSubButton,
|
|
1080
|
+
Ie as SidebarMenuSubButtonSize,
|
|
1081
|
+
ra as SidebarMenuSubItem,
|
|
1082
|
+
Me as SidebarMenuSubVariant,
|
|
1083
|
+
ca as SidebarPopoverMenu,
|
|
1084
|
+
A as SidebarPopoverMenuItem,
|
|
1085
|
+
G as SidebarPopoverTrigger,
|
|
1086
|
+
Pe as SidebarProvider,
|
|
1087
|
+
Be as SidebarRail,
|
|
1088
|
+
Ge as SidebarSeparator,
|
|
1089
|
+
we as SidebarSide,
|
|
1090
|
+
ua as SidebarSwitcher,
|
|
1091
|
+
F as SidebarTrigger,
|
|
1092
|
+
Ne as SidebarVariant,
|
|
812
1093
|
S as useSidebar
|
|
813
1094
|
};
|