@brightlocal/ui-components 2.8.0 → 2.9.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.
Files changed (46) hide show
  1. package/component-meta.json +1 -1
  2. package/dist/alert.cjs +1 -1
  3. package/dist/alert.js +1 -1
  4. package/dist/blocks/sidebar.cjs +1 -1
  5. package/dist/blocks/sidebar.d.ts +39 -21
  6. package/dist/blocks/sidebar.d.ts.map +1 -1
  7. package/dist/blocks/sidebar.js +379 -425
  8. package/dist/callout.cjs +1 -1
  9. package/dist/callout.js +1 -1
  10. package/dist/card.cjs +1 -1
  11. package/dist/card.js +11 -11
  12. package/dist/combobox.cjs +3 -3
  13. package/dist/combobox.d.ts +24 -3
  14. package/dist/combobox.d.ts.map +1 -1
  15. package/dist/combobox.js +327 -302
  16. package/dist/global-layout.cjs +1 -1
  17. package/dist/global-layout.d.ts +3 -3
  18. package/dist/global-layout.d.ts.map +1 -1
  19. package/dist/global-layout.js +90 -82
  20. package/dist/hooks/use-breakpoint.cjs +1 -0
  21. package/dist/hooks/use-breakpoint.d.ts +15 -0
  22. package/dist/hooks/use-breakpoint.d.ts.map +1 -0
  23. package/dist/hooks/use-breakpoint.js +30 -0
  24. package/dist/hooks/use-mobile.d.ts +13 -3
  25. package/dist/hooks/use-mobile.d.ts.map +1 -1
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +124 -121
  30. package/dist/scroll-area.cjs +1 -1
  31. package/dist/scroll-area.d.ts +5 -0
  32. package/dist/scroll-area.d.ts.map +1 -1
  33. package/dist/scroll-area.js +34 -25
  34. package/package.json +1 -1
  35. package/src/blocks/sidebar.tsx +134 -148
  36. package/src/components/alert.tsx +1 -1
  37. package/src/components/callout.tsx +1 -1
  38. package/src/components/card.tsx +1 -1
  39. package/src/components/combobox.tsx +72 -11
  40. package/src/components/global-layout.tsx +49 -40
  41. package/src/components/scroll-area.tsx +15 -1
  42. package/src/hooks/use-breakpoint.ts +58 -0
  43. package/src/hooks/use-mobile.ts +20 -40
  44. package/src/index.ts +1 -0
  45. package/dist/hooks/use-mobile.cjs +0 -1
  46. package/dist/hooks/use-mobile.js +0 -26
@@ -1,241 +1,204 @@
1
- import { jsx as t, jsxs as x } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { Slot as S } from "@radix-ui/react-slot";
4
- import { cva as D } from "class-variance-authority";
5
- import { ChevronRight as R, Ellipsis as F, Minus as G, Plus as E, ChevronsUpDown as H, ChevronDown as A, Menu as K, PanelLeft as U } from "@brightlocal/icons";
6
- import { cn as n } from "@brightlocal/ui-components/lib/utils";
7
- import { Button as O } from "../button.js";
8
- import { Input as j } from "../input.js";
9
- import { Separator as $ } from "../separator.js";
10
- import { Sheet as W, SheetContent as X } from "../sheet.js";
11
- import { Drawer as q, DrawerTrigger as V, DrawerContent as Y, DrawerTitle as Z, DrawerDescription as J } from "../drawer.js";
12
- import { Accordion as Q, AccordionItem as ee, AccordionContent as ae } from "../accordion.js";
13
- import * as te from "@radix-ui/react-accordion";
14
- import { ScrollArea as re } from "../scroll-area.js";
15
- import { Skeleton as I } from "../skeleton.js";
16
- import { Tooltip as oe, TooltipTrigger as ie, TooltipContent as se, TooltipProvider as de } from "../tooltip.js";
17
- import { useIsMobile as ne } from "../hooks/use-mobile.js";
18
- var le = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(le || {}), ce = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(ce || {}), ue = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(ue || {}), be = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(be || {}), pe = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(pe || {}), fe = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.TREE = "tree", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(fe || {}), me = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(me || {}), ge = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(ge || {}), he = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(he || {}), ve = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(ve || {});
19
- const xe = "sidebar:state", we = 3600 * 24 * 7, Ne = "256px", Se = "288px", ye = "48px", ke = "b", T = d.createContext(null);
20
- function C() {
21
- const e = d.useContext(T);
1
+ import { jsx as r, jsxs as k } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { Slot as N } from "@radix-ui/react-slot";
4
+ import { cva as I } from "class-variance-authority";
5
+ import { ChevronRight as M, Ellipsis as H, Minus as F, Plus as A, ChevronsUpDown as G, ChevronDown as O, Menu as K, PanelLeft as U } from "@brightlocal/icons";
6
+ import { cn as d } from "@brightlocal/ui-components/lib/utils";
7
+ import { Button as j } from "../button.js";
8
+ import { Input as $ } from "../input.js";
9
+ import { Separator as W } from "../separator.js";
10
+ import { Sheet as X, SheetContent as q, SheetTitle as V, SheetDescription as Y } from "../sheet.js";
11
+ import { Accordion as Z, AccordionItem as J, AccordionContent as Q } from "../accordion.js";
12
+ import * as ee from "@radix-ui/react-accordion";
13
+ import { ScrollArea as ae } from "../scroll-area.js";
14
+ import { Skeleton as E } from "../skeleton.js";
15
+ import { Tooltip as te, TooltipTrigger as re, TooltipContent as oe, TooltipProvider as ie } from "../tooltip.js";
16
+ import { useIsBelowBreakpoint as se } from "../hooks/use-breakpoint.js";
17
+ var ne = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(ne || {}), de = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(de || {}), le = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(le || {}), ce = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(ce || {}), ue = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(ue || {}), be = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.TREE = "tree", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(be || {}), pe = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(pe || {}), fe = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(fe || {}), me = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(me || {}), ge = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(ge || {});
18
+ const he = "sidebar:state", ve = 3600 * 24 * 7, xe = "224px", we = "336px", ke = "48px", Ne = "b", T = s.createContext(null);
19
+ function S() {
20
+ const e = s.useContext(T);
22
21
  if (!e)
23
22
  throw new Error("useSidebar must be used within a SidebarProvider.");
24
23
  return e;
25
24
  }
26
- const Ce = d.forwardRef(
25
+ const Se = s.forwardRef(
27
26
  ({
28
27
  dataHook: e,
29
28
  trackingEl: a,
30
- trackingLabel: r,
29
+ trackingLabel: t,
31
30
  defaultOpen: o = !0,
32
31
  open: i,
33
- onOpenChange: s,
32
+ onOpenChange: n,
34
33
  className: l,
35
34
  style: c,
36
- children: b,
37
- ...m
38
- }, g) => {
39
- const p = ne(), [u, h] = d.useState(!1), [w, B] = d.useState(o), N = i ?? w, y = d.useCallback(
35
+ children: x,
36
+ ...g
37
+ }, m) => {
38
+ const u = se("lg"), [b, h] = s.useState(!1), [p, R] = s.useState(o), w = i ?? p, y = s.useCallback(
40
39
  (f) => {
41
- const v = typeof f == "function" ? f(N) : f;
42
- s ? s(v) : B(v), document.cookie = `${xe}=${v}; path=/; max-age=${we}`;
40
+ const v = typeof f == "function" ? f(w) : f;
41
+ n ? n(v) : R(v), document.cookie = `${he}=${v}; path=/; max-age=${ve}`;
43
42
  },
44
- [s, N]
45
- ), k = d.useCallback(() => p ? h((f) => !f) : y((f) => !f), [p, y, h]);
46
- d.useEffect(() => {
43
+ [n, w]
44
+ ), C = s.useCallback(() => u ? h((f) => !f) : y((f) => !f), [u, y, h]);
45
+ s.useEffect(() => {
47
46
  const f = (v) => {
48
- v.key === ke && (v.metaKey || v.ctrlKey) && (v.preventDefault(), k());
47
+ v.key === Ne && (v.metaKey || v.ctrlKey) && (v.preventDefault(), C());
49
48
  };
50
49
  return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
51
- }, [k]);
52
- const M = N ? "expanded" : "collapsed", P = d.useMemo(
50
+ }, [C]);
51
+ const D = w ? "expanded" : "collapsed", P = s.useMemo(
53
52
  () => ({
54
- state: M,
55
- open: N,
53
+ state: D,
54
+ open: w,
56
55
  setOpen: y,
57
- isMobile: p,
58
- openMobile: u,
56
+ isMobile: u,
57
+ openMobile: b,
59
58
  setOpenMobile: h,
60
- toggleSidebar: k
59
+ toggleSidebar: C
61
60
  }),
62
- [M, N, y, p, u, h, k]
61
+ [D, w, y, u, b, h, C]
63
62
  );
64
- return /* @__PURE__ */ t(T.Provider, { value: P, children: /* @__PURE__ */ t(de, { delayDuration: 0, children: /* @__PURE__ */ t(
63
+ return /* @__PURE__ */ r(T.Provider, { value: P, children: /* @__PURE__ */ r(ie, { delayDuration: 0, children: /* @__PURE__ */ r(
65
64
  "div",
66
65
  {
67
- ref: g,
68
- className: n(
66
+ ref: m,
67
+ className: d(
69
68
  "group/sidebar-wrapper flex min-h-svh w-full",
70
69
  l
71
70
  ),
72
71
  "data-hook": e,
73
72
  "data-slot": "sidebar-provider",
74
73
  "data-tracking-el": a || "sidebar-provider",
75
- "data-tracking-label": r,
74
+ "data-tracking-label": t,
76
75
  style: {
77
- "--sidebar-width": Ne,
78
- "--sidebar-width-icon": ye,
76
+ "--sidebar-width": xe,
77
+ "--sidebar-width-icon": ke,
79
78
  ...c
80
79
  },
81
- ...m,
82
- children: b
80
+ ...g,
81
+ children: x
83
82
  }
84
83
  ) }) });
85
84
  }
86
85
  );
87
- Ce.displayName = "SidebarProvider";
88
- const Re = d.forwardRef(
86
+ Se.displayName = "SidebarProvider";
87
+ const ye = s.forwardRef(
89
88
  ({
90
89
  dataHook: e,
91
90
  trackingEl: a,
92
- trackingLabel: r,
91
+ trackingLabel: t,
93
92
  side: o = "left",
94
93
  variant: i = "sidebar",
95
- collapsible: s = "offcanvas",
96
- embedded: l = !1,
97
- className: c,
98
- children: b,
99
- ...m
100
- }, g) => {
101
- const { isMobile: p, state: u, openMobile: h, setOpenMobile: w } = C();
102
- return s === "none" ? /* @__PURE__ */ t(
103
- "div",
104
- {
105
- ref: g,
106
- className: n(
107
- "bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",
108
- c
109
- ),
110
- "data-hook": e,
111
- "data-slot": "sidebar",
112
- "data-tracking-el": a || "sidebar",
113
- "data-tracking-label": r,
114
- ...m,
115
- children: b
116
- }
117
- ) : l ? /* @__PURE__ */ t(
94
+ collapsible: n = "offcanvas",
95
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- accepted for backward compat
96
+ embedded: l,
97
+ mobileTitle: c = "Navigation",
98
+ mobileDescription: x = "Main navigation menu",
99
+ className: g,
100
+ children: m,
101
+ ...u
102
+ }, b) => {
103
+ const { isMobile: h, state: p, openMobile: R, setOpenMobile: w } = S();
104
+ return n === "none" ? /* @__PURE__ */ r(
118
105
  "div",
119
106
  {
120
- ref: g,
121
- className: n(
122
- "group bg-sidebar text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",
123
- u === "expanded" && "w-[var(--sidebar-width)]",
124
- s === "icon" && u === "collapsed" && "w-[var(--sidebar-width-icon)]",
125
- s === "offcanvas" && u === "collapsed" && "w-0",
126
- c
107
+ ref: b,
108
+ className: d(
109
+ "text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",
110
+ g
127
111
  ),
128
- "data-collapsible": u === "collapsed" ? s : "",
129
112
  "data-hook": e,
130
- "data-side": o,
131
113
  "data-slot": "sidebar",
132
- "data-state": u,
133
114
  "data-tracking-el": a || "sidebar",
134
- "data-tracking-label": r,
135
- "data-variant": i,
136
- ...m,
137
- children: b
115
+ "data-tracking-label": t,
116
+ ...u,
117
+ children: m
138
118
  }
139
- ) : p ? /* @__PURE__ */ t(W, { open: h, onOpenChange: w, children: /* @__PURE__ */ t(
140
- X,
119
+ ) : h ? /* @__PURE__ */ r(X, { open: R, onOpenChange: w, children: /* @__PURE__ */ k(
120
+ q,
141
121
  {
142
- className: "bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden",
122
+ className: "bg-sidebar-background text-sidebar-foreground w-[var(--sidebar-width)] p-6",
143
123
  "data-hook": `${e}-mobile-content`,
144
124
  "data-mobile": "true",
145
125
  "data-sidebar": "sidebar",
146
126
  side: "left",
147
127
  style: {
148
- "--sidebar-width": Se
128
+ "--sidebar-width": `min(${we}, calc(100vw - 40px))`
149
129
  },
150
- children: /* @__PURE__ */ t("div", { className: "flex h-full w-full flex-col", children: b })
130
+ children: [
131
+ /* @__PURE__ */ r(V, { className: "sr-only", children: c }),
132
+ /* @__PURE__ */ r(Y, { className: "sr-only", children: x }),
133
+ /* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: m })
134
+ ]
151
135
  }
152
- ) }) : /* @__PURE__ */ x(
136
+ ) }) : /* @__PURE__ */ r(
153
137
  "div",
154
138
  {
155
- ref: g,
156
- className: "group peer text-sidebar-foreground hidden md:block",
157
- "data-collapsible": u === "collapsed" ? s : "",
139
+ ref: b,
140
+ className: d(
141
+ "group text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",
142
+ p === "expanded" && "w-[var(--sidebar-width)]",
143
+ n === "icon" && p === "collapsed" && "w-[var(--sidebar-width-icon)]",
144
+ n === "offcanvas" && p === "collapsed" && "w-0",
145
+ g
146
+ ),
147
+ "data-collapsible": p === "collapsed" ? n : "",
158
148
  "data-hook": e,
159
149
  "data-side": o,
160
150
  "data-slot": "sidebar",
161
- "data-state": u,
151
+ "data-state": p,
162
152
  "data-tracking-el": a || "sidebar",
163
- "data-tracking-label": r,
153
+ "data-tracking-label": t,
164
154
  "data-variant": i,
155
+ ...u,
156
+ children: m
157
+ }
158
+ );
159
+ }
160
+ );
161
+ ye.displayName = "Sidebar";
162
+ const z = s.forwardRef(
163
+ ({ className: e, onClick: a, dataHook: t = "sidebar-trigger", children: o, ...i }, n) => {
164
+ const { toggleSidebar: l } = S();
165
+ return /* @__PURE__ */ k(
166
+ j,
167
+ {
168
+ ref: n,
169
+ iconOnly: !0,
170
+ "aria-label": "Toggle Sidebar",
171
+ className: d("h-7 w-7", e),
172
+ "data-slot": "sidebar-trigger",
173
+ dataHook: t,
174
+ size: "sm",
175
+ variant: "ghost",
176
+ onClick: (c) => {
177
+ a?.(c), l();
178
+ },
179
+ ...i,
165
180
  children: [
166
- /* @__PURE__ */ t(
167
- "div",
168
- {
169
- className: n(
170
- "relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
171
- "group-data-[collapsible=offcanvas]:w-0",
172
- "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
173
- )
174
- }
175
- ),
176
- /* @__PURE__ */ t(
177
- "div",
178
- {
179
- className: n(
180
- "fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
181
- "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]",
182
- "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]",
183
- c
184
- ),
185
- ...m,
186
- children: /* @__PURE__ */ t(
187
- "div",
188
- {
189
- className: "bg-sidebar flex h-full w-full flex-col",
190
- "data-sidebar": "sidebar",
191
- children: b
192
- }
193
- )
194
- }
195
- )
181
+ o || /* @__PURE__ */ r(U, {}),
182
+ /* @__PURE__ */ r("span", { className: "sr-only", children: "Toggle Sidebar" })
196
183
  ]
197
184
  }
198
185
  );
199
186
  }
200
187
  );
201
- Re.displayName = "Sidebar";
202
- const De = d.forwardRef(({ className: e, onClick: a, dataHook: r = "sidebar-trigger", ...o }, i) => {
203
- const { toggleSidebar: s } = C();
204
- return /* @__PURE__ */ x(
205
- O,
206
- {
207
- ref: i,
208
- "aria-label": "Toggle Sidebar",
209
- className: n("h-7 w-7", e),
210
- "data-slot": "sidebar-trigger",
211
- dataHook: r,
212
- size: "sm",
213
- variant: "ghost",
214
- onClick: (l) => {
215
- a?.(l), s();
216
- },
217
- ...o,
218
- children: [
219
- /* @__PURE__ */ t(U, {}),
220
- /* @__PURE__ */ t("span", { className: "sr-only", children: "Toggle Sidebar" })
221
- ]
222
- }
223
- );
224
- });
225
- De.displayName = "SidebarTrigger";
226
- const Me = d.forwardRef(
227
- ({ className: e, ...a }, r) => {
228
- const { toggleSidebar: o } = C();
229
- return /* @__PURE__ */ t(
188
+ z.displayName = "SidebarTrigger";
189
+ const Ce = s.forwardRef(
190
+ ({ className: e, ...a }, t) => {
191
+ const { toggleSidebar: o } = S();
192
+ return /* @__PURE__ */ r(
230
193
  "button",
231
194
  {
232
- ref: r,
195
+ ref: t,
233
196
  "aria-label": "Toggle Sidebar",
234
- className: n(
197
+ className: d(
235
198
  "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-[2px] sm:flex",
236
199
  "cursor-w-resize",
237
200
  "[[data-state=collapsed]_&]:cursor-e-resize",
238
- "group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
201
+ "group-data-[collapsible=offcanvas]:hover:bg-sidebar-background group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
239
202
  "[[data-collapsible=offcanvas]_&]:-right-2",
240
203
  e
241
204
  ),
@@ -248,30 +211,30 @@ const Me = d.forwardRef(
248
211
  );
249
212
  }
250
213
  );
251
- Me.displayName = "SidebarRail";
252
- const Ie = d.forwardRef(
253
- ({ className: e, dataHook: a, trackingEl: r, trackingLabel: o, ...i }, s) => /* @__PURE__ */ t(
214
+ Ce.displayName = "SidebarRail";
215
+ const Re = s.forwardRef(
216
+ ({ className: e, dataHook: a, trackingEl: t, trackingLabel: o, ...i }, n) => /* @__PURE__ */ r(
254
217
  "main",
255
218
  {
256
- ref: s,
257
- className: n(
219
+ ref: n,
220
+ className: d(
258
221
  "bg-background relative flex min-h-svh flex-1 flex-col",
259
222
  e
260
223
  ),
261
224
  "data-hook": a,
262
225
  "data-slot": "sidebar-inset",
263
- "data-tracking-el": r || "sidebar-inset",
226
+ "data-tracking-el": t || "sidebar-inset",
264
227
  "data-tracking-label": o,
265
228
  ...i
266
229
  }
267
230
  )
268
231
  );
269
- Ie.displayName = "SidebarInset";
270
- const Ee = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
271
- j,
232
+ Re.displayName = "SidebarInset";
233
+ const Me = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
234
+ $,
272
235
  {
273
- ref: r,
274
- className: n(
236
+ ref: t,
237
+ className: d(
275
238
  "bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2",
276
239
  e
277
240
  ),
@@ -280,38 +243,41 @@ const Ee = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
280
243
  ...a
281
244
  }
282
245
  ));
283
- Ee.displayName = "SidebarInput";
284
- const Ae = d.forwardRef(
285
- ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
246
+ Me.displayName = "SidebarInput";
247
+ const Ie = s.forwardRef(
248
+ ({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
286
249
  "div",
287
250
  {
288
251
  ref: o,
289
- className: n("px-section-xs flex flex-col gap-2 pt-2 pb-9", e),
252
+ className: d(
253
+ "pr-section-xs flex flex-col gap-2 pt-2 pb-9 pl-8",
254
+ e
255
+ ),
290
256
  "data-hook": a,
291
257
  "data-slot": "sidebar-header",
292
- ...r
258
+ ...t
293
259
  }
294
260
  )
295
261
  );
296
- Ae.displayName = "SidebarHeader";
297
- const Oe = d.forwardRef(
298
- ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
262
+ Ie.displayName = "SidebarHeader";
263
+ const De = s.forwardRef(
264
+ ({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
299
265
  "div",
300
266
  {
301
267
  ref: o,
302
- className: n("flex flex-col gap-2 p-2", e),
268
+ className: d("flex flex-col gap-2 p-2", e),
303
269
  "data-hook": a,
304
270
  "data-slot": "sidebar-footer",
305
- ...r
271
+ ...t
306
272
  }
307
273
  )
308
274
  );
309
- Oe.displayName = "SidebarFooter";
310
- const Te = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
311
- $,
275
+ De.displayName = "SidebarFooter";
276
+ const Ee = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
277
+ W,
312
278
  {
313
- ref: r,
314
- className: n(
279
+ ref: t,
280
+ className: d(
315
281
  "bg-sidebar-border mx-2 my-2 w-auto group-data-[collapsible=icon]:mx-0",
316
282
  e
317
283
  ),
@@ -319,45 +285,49 @@ const Te = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
319
285
  ...a
320
286
  }
321
287
  ));
322
- Te.displayName = "SidebarSeparator";
323
- const ze = d.forwardRef(
324
- ({ className: e, dataHook: a, ariaLabel: r = "Sidebar", children: o, ...i }, s) => /* @__PURE__ */ t(
325
- re,
326
- {
327
- ref: s,
328
- className: n(
329
- "min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [&>[data-slot=scroll-area-viewport]]:p-0",
330
- e
331
- ),
332
- dataHook: a ?? "sidebar-content-scroll",
333
- ...i,
334
- children: /* @__PURE__ */ t(
335
- "nav",
336
- {
337
- "aria-label": r,
338
- className: "flex flex-col gap-2",
339
- "data-slot": "sidebar-content",
340
- children: o
341
- }
342
- )
343
- }
344
- )
288
+ Ee.displayName = "SidebarSeparator";
289
+ const Ae = s.forwardRef(
290
+ ({ className: e, dataHook: a, ariaLabel: t = "Sidebar", children: o, ...i }, n) => {
291
+ const { isMobile: l } = S();
292
+ return /* @__PURE__ */ r(
293
+ ae,
294
+ {
295
+ ref: n,
296
+ className: d(
297
+ "min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [&>[data-slot=scroll-area-viewport]]:p-0",
298
+ e
299
+ ),
300
+ dataHook: a ?? "sidebar-content-scroll",
301
+ scrollOrientation: l ? "both" : "vertical",
302
+ ...i,
303
+ children: /* @__PURE__ */ r(
304
+ "nav",
305
+ {
306
+ "aria-label": t,
307
+ className: "flex flex-col gap-2",
308
+ "data-slot": "sidebar-content",
309
+ children: o
310
+ }
311
+ )
312
+ }
313
+ );
314
+ }
345
315
  );
346
- ze.displayName = "SidebarContent";
347
- const _e = d.forwardRef(
348
- ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
316
+ Ae.displayName = "SidebarContent";
317
+ const Oe = s.forwardRef(
318
+ ({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
349
319
  "div",
350
320
  {
351
321
  ref: o,
352
- className: n("relative flex w-full min-w-0 flex-col p-2", e),
322
+ className: d("relative flex w-full min-w-0 flex-col p-2", e),
353
323
  "data-hook": a,
354
324
  "data-slot": "sidebar-group",
355
- ...r
325
+ ...t
356
326
  }
357
327
  )
358
328
  );
359
- _e.displayName = "SidebarGroup";
360
- const Le = D(
329
+ Oe.displayName = "SidebarGroup";
330
+ const Te = I(
361
331
  "flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
362
332
  {
363
333
  variants: {
@@ -377,61 +347,61 @@ const Le = D(
377
347
  variant: "default"
378
348
  }
379
349
  }
380
- ), Be = d.forwardRef(
350
+ ), ze = s.forwardRef(
381
351
  ({
382
352
  className: e,
383
353
  dataHook: a,
384
- asChild: r = !1,
354
+ asChild: t = !1,
385
355
  size: o = "sm",
386
356
  variant: i = "default",
387
- isOpen: s = !1,
357
+ isOpen: n = !1,
388
358
  onToggle: l,
389
359
  onAction: c,
390
- children: b,
391
- ...m
392
- }, g) => {
393
- const p = r ? S : "div", u = () => {
360
+ children: x,
361
+ ...g
362
+ }, m) => {
363
+ const u = t ? N : "div", b = () => {
394
364
  i === "collapsible" && l ? l() : i === "action" && c && c();
395
- }, h = (w) => {
396
- (w.key === "Enter" || w.key === " ") && (w.preventDefault(), u());
365
+ }, h = (p) => {
366
+ (p.key === "Enter" || p.key === " ") && (p.preventDefault(), b());
397
367
  };
398
- return /* @__PURE__ */ x(
399
- p,
368
+ return /* @__PURE__ */ k(
369
+ u,
400
370
  {
401
- ref: g,
402
- className: n(Le({ size: o, variant: i }), e),
371
+ ref: m,
372
+ className: d(Te({ size: o, variant: i }), e),
403
373
  "data-hook": a,
404
374
  "data-slot": "sidebar-group-label",
405
375
  "data-variant": i,
406
376
  role: i !== "default" ? "button" : void 0,
407
377
  tabIndex: i !== "default" ? 0 : void 0,
408
- onClick: i !== "default" ? u : void 0,
378
+ onClick: i !== "default" ? b : void 0,
409
379
  onKeyDown: i !== "default" ? h : void 0,
410
- ...m,
380
+ ...g,
411
381
  children: [
412
- /* @__PURE__ */ t("span", { children: b }),
413
- i === "collapsible" && /* @__PURE__ */ t(
414
- A,
382
+ /* @__PURE__ */ r("span", { children: x }),
383
+ i === "collapsible" && /* @__PURE__ */ r(
384
+ O,
415
385
  {
416
- className: n(
386
+ className: d(
417
387
  "shrink-0 transition-transform duration-200",
418
- s && "rotate-180"
388
+ n && "rotate-180"
419
389
  ),
420
390
  size: 16
421
391
  }
422
392
  ),
423
- i === "action" && /* @__PURE__ */ t(E, { className: "shrink-0", size: 16 })
393
+ i === "action" && /* @__PURE__ */ r(A, { className: "shrink-0", size: 16 })
424
394
  ]
425
395
  }
426
396
  );
427
397
  }
428
398
  );
429
- Be.displayName = "SidebarGroupLabel";
430
- const Pe = d.forwardRef(({ className: e, asChild: a = !1, ...r }, o) => /* @__PURE__ */ t(
431
- a ? S : "button",
399
+ ze.displayName = "SidebarGroupLabel";
400
+ const _e = s.forwardRef(({ className: e, asChild: a = !1, ...t }, o) => /* @__PURE__ */ r(
401
+ a ? N : "button",
432
402
  {
433
403
  ref: o,
434
- className: n(
404
+ className: d(
435
405
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:shrink-0",
436
406
  // Increases the hit area of the button on mobile.
437
407
  "after:absolute after:-inset-2 after:md:hidden",
@@ -439,82 +409,82 @@ const Pe = d.forwardRef(({ className: e, asChild: a = !1, ...r }, o) => /* @__PU
439
409
  e
440
410
  ),
441
411
  "data-slot": "sidebar-group-action",
442
- ...r
412
+ ...t
443
413
  }
444
414
  ));
445
- Pe.displayName = "SidebarGroupAction";
446
- const Fe = d.forwardRef(({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
415
+ _e.displayName = "SidebarGroupAction";
416
+ const Le = s.forwardRef(({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
447
417
  "div",
448
418
  {
449
419
  ref: o,
450
- className: n("w-full text-sm", e),
420
+ className: d("w-full text-sm", e),
451
421
  "data-hook": a,
452
422
  "data-slot": "sidebar-group-content",
453
- ...r
423
+ ...t
454
424
  }
455
425
  ));
456
- Fe.displayName = "SidebarGroupContent";
457
- const Ge = d.forwardRef(
458
- ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
426
+ Le.displayName = "SidebarGroupContent";
427
+ const Be = s.forwardRef(
428
+ ({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
459
429
  "ul",
460
430
  {
461
431
  ref: o,
462
- className: n("flex w-full min-w-0 flex-col gap-1", e),
432
+ className: d("flex w-full min-w-0 flex-col gap-1", e),
463
433
  "data-hook": a,
464
434
  "data-slot": "sidebar-menu",
465
- ...r
435
+ ...t
466
436
  }
467
437
  )
468
438
  );
469
- Ge.displayName = "SidebarMenu";
470
- const z = d.forwardRef(
471
- ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
439
+ Be.displayName = "SidebarMenu";
440
+ const _ = s.forwardRef(
441
+ ({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
472
442
  "li",
473
443
  {
474
444
  ref: o,
475
- className: n("group/menu-item relative", e),
445
+ className: d("group/menu-item relative", e),
476
446
  "data-hook": a,
477
447
  "data-slot": "sidebar-menu-item",
478
- ...r
448
+ ...t
479
449
  }
480
450
  )
481
451
  );
482
- z.displayName = "SidebarMenuItem";
483
- const He = d.forwardRef(
452
+ _.displayName = "SidebarMenuItem";
453
+ const Pe = s.forwardRef(
484
454
  ({
485
455
  type: e = "caret",
486
456
  isActive: a = !1,
487
- className: r,
457
+ className: t,
488
458
  ...o
489
459
  }, i) => {
490
- const s = {
460
+ const n = {
491
461
  ref: i,
492
- className: n(
462
+ className: d(
493
463
  "shrink-0 transition-transform",
494
464
  a && e === "caret" && "rotate-90",
495
- r
465
+ t
496
466
  ),
497
467
  "data-slot": "sidebar-collapse-icon",
498
468
  ...o
499
469
  };
500
470
  switch (e) {
501
471
  case "horizontal":
502
- return /* @__PURE__ */ t(R, { ...s });
472
+ return /* @__PURE__ */ r(M, { ...n });
503
473
  case "vertical":
504
- return /* @__PURE__ */ t(A, { ...s });
474
+ return /* @__PURE__ */ r(O, { ...n });
505
475
  case "upDown":
506
- return /* @__PURE__ */ t(H, { ...s });
476
+ return /* @__PURE__ */ r(G, { ...n });
507
477
  case "plusMinus":
508
- return a ? /* @__PURE__ */ t(G, { ...s }) : /* @__PURE__ */ t(E, { ...s });
478
+ return a ? /* @__PURE__ */ r(F, { ...n }) : /* @__PURE__ */ r(A, { ...n });
509
479
  case "dots":
510
- return /* @__PURE__ */ t(F, { ...s });
480
+ return /* @__PURE__ */ r(H, { ...n });
511
481
  default:
512
- return /* @__PURE__ */ t(R, { ...s });
482
+ return /* @__PURE__ */ r(M, { ...n });
513
483
  }
514
484
  }
515
485
  );
516
- He.displayName = "SidebarCollapseIcon";
517
- const Ke = D(
486
+ Pe.displayName = "SidebarCollapseIcon";
487
+ const He = I(
518
488
  "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 ring-sidebar-ring 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 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-[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-child]: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",
519
489
  {
520
490
  variants: {
@@ -530,7 +500,7 @@ const Ke = D(
530
500
  // Badge - has a number badge on the right (handled via SidebarMenuBadge)
531
501
  badge: "group-has-[[data-sidebar=menu-badge]]/menu-item:pr-16",
532
502
  // Big Icon - larger icon with title and subtitle
533
- bigIcon: "h-auto flex-col items-start gap-1 rounded-lg p-3 [&>svg]:size-6 [&>svg]:rounded-md [&>svg]:bg-sidebar-foreground [&>svg]:p-1 [&>svg]:text-sidebar [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:[&>svg]:size-6",
503
+ bigIcon: "h-auto flex-col items-start gap-1 rounded-lg p-3 [&>svg]:size-6 [&>svg]:rounded-md [&>svg]:bg-sidebar-foreground [&>svg]:p-1 [&>svg]:text-sidebar-background [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar-background group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:[&>svg]:size-6",
534
504
  // Checkbox - has a checkbox indicator
535
505
  checkbox: "[&>[data-checkbox]]:size-4 [&>[data-checkbox]]:shrink-0 [&>[data-checkbox]]:rounded [&>[data-checkbox]]:border [&>[data-checkbox]]:border-sidebar-foreground/30 data-[checked=true]:[&>[data-checkbox]]:bg-primary data-[checked=true]:[&>[data-checkbox]]:border-primary data-[checked=true]:[&>[data-checkbox]]:text-primary-foreground"
536
506
  },
@@ -545,59 +515,59 @@ const Ke = D(
545
515
  size: "default"
546
516
  }
547
517
  }
548
- ), _ = d.forwardRef(
518
+ ), L = s.forwardRef(
549
519
  ({
550
520
  asChild: e = !1,
551
521
  isActive: a = !1,
552
- variant: r = "simple",
522
+ variant: t = "simple",
553
523
  size: o = "default",
554
524
  tooltip: i,
555
- className: s,
525
+ className: n,
556
526
  dataHook: l,
557
527
  ...c
558
- }, b) => {
559
- const m = e ? S : "button", { isMobile: g, state: p } = C(), u = /* @__PURE__ */ t(
560
- m,
528
+ }, x) => {
529
+ const g = e ? N : "button", { isMobile: m, state: u } = S(), b = /* @__PURE__ */ r(
530
+ g,
561
531
  {
562
- ref: b,
563
- className: n(Ke({ variant: r, size: o }), s),
532
+ ref: x,
533
+ className: d(He({ variant: t, size: o }), n),
564
534
  "data-active": a,
565
535
  "data-hook": l,
566
536
  "data-size": o,
567
537
  "data-slot": "sidebar-menu-button",
568
- "data-variant": r,
538
+ "data-variant": t,
569
539
  ...c
570
540
  }
571
541
  );
572
542
  return i ? (typeof i == "string" && (i = {
573
543
  children: i,
574
544
  dataHook: "sidebar-menu-button-tooltip"
575
- }), /* @__PURE__ */ x(oe, { children: [
576
- /* @__PURE__ */ t(ie, { asChild: !0, children: u }),
577
- /* @__PURE__ */ t(
578
- se,
545
+ }), /* @__PURE__ */ k(te, { children: [
546
+ /* @__PURE__ */ r(re, { asChild: !0, children: b }),
547
+ /* @__PURE__ */ r(
548
+ oe,
579
549
  {
580
550
  hideArrow: !0,
581
551
  ...i,
582
552
  align: "center",
583
- className: n(
553
+ className: d(
584
554
  "bg-foreground text-background border-none",
585
555
  i.className
586
556
  ),
587
- hidden: p !== "collapsed" || g,
557
+ hidden: u !== "collapsed" || m,
588
558
  side: "right",
589
559
  sideOffset: 8
590
560
  }
591
561
  )
592
- ] })) : u;
562
+ ] })) : b;
593
563
  }
594
564
  );
595
- _.displayName = "SidebarMenuButton";
596
- const Ue = d.forwardRef(({ className: e, asChild: a = !1, showOnHover: r = !1, ...o }, i) => /* @__PURE__ */ t(
597
- a ? S : "button",
565
+ L.displayName = "SidebarMenuButton";
566
+ const Fe = s.forwardRef(({ className: e, asChild: a = !1, showOnHover: t = !1, ...o }, i) => /* @__PURE__ */ r(
567
+ a ? N : "button",
598
568
  {
599
569
  ref: i,
600
- className: n(
570
+ className: d(
601
571
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:shrink-0",
602
572
  // Increases the hit area of the button on mobile.
603
573
  "after:absolute after:-inset-2 after:md:hidden",
@@ -607,19 +577,19 @@ const Ue = d.forwardRef(({ className: e, asChild: a = !1, showOnHover: r = !1, .
607
577
  "peer-data-[size=bigIcon]/menu-button:top-2.5",
608
578
  "peer-data-[size=tree]/menu-button:top-1.5",
609
579
  "group-data-[collapsible=icon]:hidden",
610
- 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",
580
+ t && "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",
611
581
  e
612
582
  ),
613
583
  "data-slot": "sidebar-menu-action",
614
584
  ...o
615
585
  }
616
586
  ));
617
- Ue.displayName = "SidebarMenuAction";
618
- const je = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
587
+ Fe.displayName = "SidebarMenuAction";
588
+ const Ge = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
619
589
  "div",
620
590
  {
621
- ref: r,
622
- className: n(
591
+ ref: t,
592
+ className: d(
623
593
  "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",
624
594
  "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
625
595
  "group-data-[collapsible=icon]:hidden",
@@ -629,36 +599,36 @@ const je = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
629
599
  ...a
630
600
  }
631
601
  ));
632
- je.displayName = "SidebarMenuBadge";
633
- const $e = d.forwardRef(({ className: e, showIcon: a = !1, ...r }, o) => {
634
- const i = d.useId(), s = d.useMemo(() => {
602
+ Ge.displayName = "SidebarMenuBadge";
603
+ const Ke = s.forwardRef(({ className: e, showIcon: a = !1, ...t }, o) => {
604
+ const i = s.useId(), n = s.useMemo(() => {
635
605
  let l = 0;
636
606
  for (let c = 0; c < i.length; c++)
637
607
  l = (l << 5) - l + i.charCodeAt(c), l |= 0;
638
608
  return `${Math.abs(l) % 40 + 50}%`;
639
609
  }, [i]);
640
- return /* @__PURE__ */ x(
610
+ return /* @__PURE__ */ k(
641
611
  "div",
642
612
  {
643
613
  ref: o,
644
- className: n("flex h-8 items-center gap-2 rounded-md px-2", e),
614
+ className: d("flex h-8 items-center gap-2 rounded-md px-2", e),
645
615
  "data-slot": "sidebar-menu-skeleton",
646
- ...r,
616
+ ...t,
647
617
  children: [
648
- a && /* @__PURE__ */ t(
649
- I,
618
+ a && /* @__PURE__ */ r(
619
+ E,
650
620
  {
651
621
  className: "size-4 rounded-md",
652
622
  "data-slot": "sidebar-menu-skeleton-icon"
653
623
  }
654
624
  ),
655
- /* @__PURE__ */ t(
656
- I,
625
+ /* @__PURE__ */ r(
626
+ E,
657
627
  {
658
628
  className: "h-4 max-w-[--skeleton-width] flex-1",
659
629
  "data-slot": "sidebar-menu-skeleton-text",
660
630
  style: {
661
- "--skeleton-width": s
631
+ "--skeleton-width": n
662
632
  }
663
633
  }
664
634
  )
@@ -666,8 +636,8 @@ const $e = d.forwardRef(({ className: e, showIcon: a = !1, ...r }, o) => {
666
636
  }
667
637
  );
668
638
  });
669
- $e.displayName = "SidebarMenuSkeleton";
670
- const We = D(
639
+ Ke.displayName = "SidebarMenuSkeleton";
640
+ const Ue = I(
671
641
  "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",
672
642
  {
673
643
  variants: {
@@ -681,42 +651,42 @@ const We = D(
681
651
  variant: "border"
682
652
  }
683
653
  }
684
- ), L = d.forwardRef(
685
- ({ className: e, variant: a = "border", dataHook: r, ...o }, i) => /* @__PURE__ */ t(
654
+ ), B = s.forwardRef(
655
+ ({ className: e, variant: a = "border", dataHook: t, ...o }, i) => /* @__PURE__ */ r(
686
656
  "ul",
687
657
  {
688
658
  ref: i,
689
- className: n(We({ variant: a }), e),
690
- "data-hook": r,
659
+ className: d(Ue({ variant: a }), e),
660
+ "data-hook": t,
691
661
  "data-slot": "sidebar-menu-sub",
692
662
  ...o
693
663
  }
694
664
  )
695
665
  );
696
- L.displayName = "SidebarMenuSub";
697
- const Xe = d.forwardRef(({ dataHook: e, ...a }, r) => /* @__PURE__ */ t(
666
+ B.displayName = "SidebarMenuSub";
667
+ const je = s.forwardRef(({ dataHook: e, ...a }, t) => /* @__PURE__ */ r(
698
668
  "li",
699
669
  {
700
- ref: r,
670
+ ref: t,
701
671
  "data-hook": e,
702
672
  "data-slot": "sidebar-menu-sub-item",
703
673
  ...a
704
674
  }
705
675
  ));
706
- Xe.displayName = "SidebarMenuSubItem";
707
- const qe = d.forwardRef(
676
+ je.displayName = "SidebarMenuSubItem";
677
+ const $e = s.forwardRef(
708
678
  ({
709
679
  asChild: e = !1,
710
680
  size: a = "md",
711
- isActive: r,
681
+ isActive: t,
712
682
  className: o,
713
683
  dataHook: i,
714
- ...s
715
- }, l) => /* @__PURE__ */ t(
716
- e ? S : "a",
684
+ ...n
685
+ }, l) => /* @__PURE__ */ r(
686
+ e ? N : "a",
717
687
  {
718
688
  ref: l,
719
- className: n(
689
+ className: d(
720
690
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 transition-[color,background-color,box-shadow,opacity] duration-150 ease-in-out outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0",
721
691
  "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
722
692
  a === "sm" && "text-xs",
@@ -724,25 +694,25 @@ const qe = d.forwardRef(
724
694
  "group-data-[collapsible=icon]:hidden",
725
695
  o
726
696
  ),
727
- "data-active": r,
697
+ "data-active": t,
728
698
  "data-hook": i,
729
699
  "data-size": a,
730
700
  "data-slot": "sidebar-menu-sub-button",
731
- ...s
701
+ ...n
732
702
  }
733
703
  )
734
704
  );
735
- qe.displayName = "SidebarMenuSubButton";
736
- function Ve({
705
+ $e.displayName = "SidebarMenuSubButton";
706
+ function We({
737
707
  dataHook: e,
738
708
  className: a,
739
- children: r,
709
+ children: t,
740
710
  defaultOpen: o,
741
711
  open: i,
742
- onOpenChange: s
712
+ onOpenChange: n
743
713
  }) {
744
- return /* @__PURE__ */ t(z, { children: /* @__PURE__ */ t(
745
- Q,
714
+ return /* @__PURE__ */ r(_, { children: /* @__PURE__ */ r(
715
+ Z,
746
716
  {
747
717
  collapsible: !0,
748
718
  className: a,
@@ -750,22 +720,22 @@ function Ve({
750
720
  defaultValue: o ? "item" : void 0,
751
721
  type: "single",
752
722
  value: i !== void 0 ? i ? "item" : "" : void 0,
753
- onValueChange: s ? (l) => s(l === "item") : void 0,
754
- children: /* @__PURE__ */ t(ee, { className: "group/collapsible border-none", value: "item", children: r })
723
+ onValueChange: n ? (l) => n(l === "item") : void 0,
724
+ children: /* @__PURE__ */ r(J, { className: "group/collapsible border-none", value: "item", children: t })
755
725
  }
756
726
  ) });
757
727
  }
758
- Ve.displayName = "SidebarMenuCollapsible";
759
- const Ye = d.forwardRef(({ children: e, className: a, ...r }, o) => /* @__PURE__ */ t(te.Trigger, { asChild: !0, children: /* @__PURE__ */ x(
760
- _,
728
+ We.displayName = "SidebarMenuCollapsible";
729
+ const Xe = s.forwardRef(({ children: e, className: a, ...t }, o) => /* @__PURE__ */ r(ee.Trigger, { asChild: !0, children: /* @__PURE__ */ k(
730
+ L,
761
731
  {
762
732
  ref: o,
763
- className: n("relative", a),
733
+ className: d("relative", a),
764
734
  variant: "collapsible",
765
- ...r,
735
+ ...t,
766
736
  children: [
767
- /* @__PURE__ */ t(
768
- R,
737
+ /* @__PURE__ */ r(
738
+ M,
769
739
  {
770
740
  "data-collapse-icon": !0,
771
741
  className: "absolute left-2.5 !opacity-100 transition-transform duration-200 ease-out group-data-[state=open]/collapsible:rotate-90",
@@ -776,87 +746,71 @@ const Ye = d.forwardRef(({ children: e, className: a, ...r }, o) => /* @__PURE__
776
746
  ]
777
747
  }
778
748
  ) }));
779
- Ye.displayName = "SidebarMenuCollapsibleTrigger";
780
- const Ze = d.forwardRef(({ dataHook: e, children: a, ...r }, o) => /* @__PURE__ */ t(ae, { className: "p-0", children: /* @__PURE__ */ t(L, { ref: o, dataHook: e, ...r, children: a }) }));
781
- Ze.displayName = "SidebarMenuCollapsibleContent";
782
- function Je({
783
- dataHook: e,
784
- title: a = "Navigation",
785
- description: r = "Main navigation menu",
786
- trackingEl: o,
787
- trackingLabel: i,
788
- children: s,
789
- className: l,
790
- ...c
791
- }) {
792
- return /* @__PURE__ */ x(q, { direction: "left", children: [
793
- /* @__PURE__ */ t(V, { asChild: !0, children: /* @__PURE__ */ t(
794
- O,
795
- {
796
- iconOnly: !0,
797
- "aria-label": "Open menu",
798
- dataHook: `${e}-trigger`,
799
- size: "sm",
800
- trackingEl: o,
801
- trackingLabel: i,
802
- variant: "ghost",
803
- children: /* @__PURE__ */ t(K, { size: 24 })
804
- }
805
- ) }),
806
- /* @__PURE__ */ x(
807
- Y,
808
- {
809
- className: n("max-w-96", l),
810
- dataHook: e,
811
- ...c,
812
- children: [
813
- /* @__PURE__ */ t(Z, { className: "sr-only", children: a }),
814
- /* @__PURE__ */ t(J, { className: "sr-only", children: r }),
815
- /* @__PURE__ */ t("div", { className: "flex h-full flex-col p-6", children: s })
816
- ]
817
- }
818
- )
819
- ] });
820
- }
821
- Je.displayName = "SidebarDrawer";
749
+ Xe.displayName = "SidebarMenuCollapsibleTrigger";
750
+ const qe = s.forwardRef(({ dataHook: e, children: a, ...t }, o) => /* @__PURE__ */ r(Q, { className: "p-0", children: /* @__PURE__ */ r(B, { ref: o, dataHook: e, ...t, children: a }) }));
751
+ qe.displayName = "SidebarMenuCollapsibleContent";
752
+ const Ve = s.forwardRef(
753
+ ({
754
+ className: e,
755
+ dataHook: a = "sidebar-drawer",
756
+ trackingEl: t,
757
+ trackingLabel: o,
758
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- accepted for backward compat
759
+ children: i,
760
+ ...n
761
+ }, l) => /* @__PURE__ */ r(
762
+ "div",
763
+ {
764
+ ref: l,
765
+ className: e,
766
+ "data-hook": a,
767
+ "data-slot": "sidebar-drawer",
768
+ "data-tracking-el": t,
769
+ "data-tracking-label": o,
770
+ ...n,
771
+ children: /* @__PURE__ */ r(z, { dataHook: `${a}-trigger`, children: /* @__PURE__ */ r(K, { size: 24 }) })
772
+ }
773
+ )
774
+ );
775
+ Ve.displayName = "SidebarDrawer";
822
776
  export {
823
- Re as Sidebar,
824
- He as SidebarCollapseIcon,
825
- ve as SidebarCollapseIconType,
826
- ue as SidebarCollapsible,
827
- ze as SidebarContent,
828
- Je as SidebarDrawer,
829
- Oe as SidebarFooter,
830
- _e as SidebarGroup,
831
- Pe as SidebarGroupAction,
832
- Fe as SidebarGroupContent,
833
- Be as SidebarGroupLabel,
834
- be as SidebarGroupLabelSize,
835
- pe as SidebarGroupLabelVariant,
836
- Ae as SidebarHeader,
837
- Ee as SidebarInput,
838
- Ie as SidebarInset,
839
- Ge as SidebarMenu,
840
- Ue as SidebarMenuAction,
841
- je as SidebarMenuBadge,
842
- _ as SidebarMenuButton,
843
- me as SidebarMenuButtonSize,
844
- fe as SidebarMenuButtonVariant,
845
- Ve as SidebarMenuCollapsible,
846
- Ze as SidebarMenuCollapsibleContent,
847
- Ye as SidebarMenuCollapsibleTrigger,
848
- z as SidebarMenuItem,
849
- $e as SidebarMenuSkeleton,
850
- L as SidebarMenuSub,
851
- qe as SidebarMenuSubButton,
852
- he as SidebarMenuSubButtonSize,
853
- Xe as SidebarMenuSubItem,
854
- ge as SidebarMenuSubVariant,
855
- Ce as SidebarProvider,
856
- Me as SidebarRail,
857
- Te as SidebarSeparator,
858
- le as SidebarSide,
859
- De as SidebarTrigger,
860
- ce as SidebarVariant,
861
- C as useSidebar
777
+ ye as Sidebar,
778
+ Pe as SidebarCollapseIcon,
779
+ ge as SidebarCollapseIconType,
780
+ le as SidebarCollapsible,
781
+ Ae as SidebarContent,
782
+ Ve as SidebarDrawer,
783
+ De as SidebarFooter,
784
+ Oe as SidebarGroup,
785
+ _e as SidebarGroupAction,
786
+ Le as SidebarGroupContent,
787
+ ze as SidebarGroupLabel,
788
+ ce as SidebarGroupLabelSize,
789
+ ue as SidebarGroupLabelVariant,
790
+ Ie as SidebarHeader,
791
+ Me as SidebarInput,
792
+ Re as SidebarInset,
793
+ Be as SidebarMenu,
794
+ Fe as SidebarMenuAction,
795
+ Ge as SidebarMenuBadge,
796
+ L as SidebarMenuButton,
797
+ pe as SidebarMenuButtonSize,
798
+ be as SidebarMenuButtonVariant,
799
+ We as SidebarMenuCollapsible,
800
+ qe as SidebarMenuCollapsibleContent,
801
+ Xe as SidebarMenuCollapsibleTrigger,
802
+ _ as SidebarMenuItem,
803
+ Ke as SidebarMenuSkeleton,
804
+ B as SidebarMenuSub,
805
+ $e as SidebarMenuSubButton,
806
+ me as SidebarMenuSubButtonSize,
807
+ je as SidebarMenuSubItem,
808
+ fe as SidebarMenuSubVariant,
809
+ Se as SidebarProvider,
810
+ Ce as SidebarRail,
811
+ Ee as SidebarSeparator,
812
+ ne as SidebarSide,
813
+ z as SidebarTrigger,
814
+ de as SidebarVariant,
815
+ S as useSidebar
862
816
  };