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