@brightlocal/ui-components 2.17.1 → 2.19.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 (79) hide show
  1. package/README.md +83 -1
  2. package/component-meta.json +23 -7
  3. package/dist/alert-dialog.cjs +1 -1
  4. package/dist/alert-dialog.d.ts +23 -2
  5. package/dist/alert-dialog.d.ts.map +1 -1
  6. package/dist/alert-dialog.js +21 -19
  7. package/dist/blocks/input-list.cjs +2 -2
  8. package/dist/blocks/input-list.d.ts.map +1 -1
  9. package/dist/blocks/input-list.js +64 -63
  10. package/dist/blocks/sidebar.cjs +1 -1
  11. package/dist/blocks/sidebar.d.ts +2 -0
  12. package/dist/blocks/sidebar.d.ts.map +1 -1
  13. package/dist/blocks/sidebar.js +426 -403
  14. package/dist/card.cjs +1 -1
  15. package/dist/card.d.ts +22 -2
  16. package/dist/card.d.ts.map +1 -1
  17. package/dist/card.js +93 -72
  18. package/dist/chip.cjs +1 -1
  19. package/dist/chip.d.ts.map +1 -1
  20. package/dist/chip.js +1 -7
  21. package/dist/dialog.cjs +1 -1
  22. package/dist/dialog.d.ts +23 -3
  23. package/dist/dialog.d.ts.map +1 -1
  24. package/dist/dialog.js +44 -42
  25. package/dist/dropdown-menu.cjs +1 -1
  26. package/dist/dropdown-menu.d.ts +10 -0
  27. package/dist/dropdown-menu.d.ts.map +1 -1
  28. package/dist/dropdown-menu.js +30 -29
  29. package/dist/field.cjs +1 -1
  30. package/dist/field.d.ts +5 -1
  31. package/dist/field.d.ts.map +1 -1
  32. package/dist/field.js +9 -7
  33. package/dist/global-layout.cjs +1 -1
  34. package/dist/global-layout.d.ts.map +1 -1
  35. package/dist/global-layout.js +44 -42
  36. package/dist/hooks/use-prefers-reduced-motion.cjs +1 -1
  37. package/dist/hooks/use-prefers-reduced-motion.d.ts +25 -2
  38. package/dist/hooks/use-prefers-reduced-motion.d.ts.map +1 -1
  39. package/dist/hooks/use-prefers-reduced-motion.js +17 -11
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.js +38 -37
  42. package/dist/link.cjs +1 -1
  43. package/dist/link.d.ts +13 -2
  44. package/dist/link.d.ts.map +1 -1
  45. package/dist/link.js +110 -53
  46. package/dist/logo.cjs +1 -1
  47. package/dist/logo.d.ts.map +1 -1
  48. package/dist/logo.js +44 -37
  49. package/dist/map.cjs +1 -1
  50. package/dist/map.d.ts.map +1 -1
  51. package/dist/map.js +1 -1
  52. package/dist/progress.cjs +1 -1
  53. package/dist/progress.d.ts.map +1 -1
  54. package/dist/progress.js +26 -25
  55. package/dist/sheet.cjs +1 -1
  56. package/dist/sheet.d.ts +17 -2
  57. package/dist/sheet.d.ts.map +1 -1
  58. package/dist/sheet.js +29 -27
  59. package/dist/stepper.cjs +1 -1
  60. package/dist/stepper.d.ts +15 -13
  61. package/dist/stepper.d.ts.map +1 -1
  62. package/dist/stepper.js +84 -85
  63. package/package.json +3 -3
  64. package/src/blocks/input-list.tsx +8 -1
  65. package/src/blocks/sidebar.tsx +47 -7
  66. package/src/components/alert-dialog.tsx +38 -4
  67. package/src/components/card.tsx +56 -9
  68. package/src/components/chip.tsx +1 -4
  69. package/src/components/dialog.tsx +39 -6
  70. package/src/components/dropdown-menu.tsx +7 -1
  71. package/src/components/field.tsx +6 -0
  72. package/src/components/global-layout.tsx +3 -1
  73. package/src/components/link.tsx +103 -27
  74. package/src/components/logo.tsx +19 -25
  75. package/src/components/map.tsx +1 -2
  76. package/src/components/progress.tsx +12 -6
  77. package/src/components/sheet.tsx +30 -5
  78. package/src/components/stepper.tsx +93 -80
  79. package/src/hooks/use-prefers-reduced-motion.ts +35 -5
@@ -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 b, Fragment as D } 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 B } from "../button.js";
9
+ import { Input as Q } from "../input.js";
10
+ import { Separator as H } 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 L } 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: u,
39
+ children: m,
40
+ ...h
41
+ }, f) => {
42
+ const p = ke("lg"), [c, x] = i.useState(!1), [g, M] = i.useState(null), [I, K] = i.useState(o), S = s ?? I, 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 T = S ? "expanded" : "collapsed", W = i.useMemo(
55
56
  () => ({
56
- state: z,
57
- open: k,
57
+ state: T,
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: M
63
66
  }),
64
- [z, k, C, f, h, w, R]
67
+ [
68
+ T,
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
+ ...u
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: u,
113
+ mobileDescription: m,
114
+ className: h,
115
+ children: f,
116
+ ...p
117
+ }, c) => {
118
+ const { isMobile: x, state: g, openMobile: M, setOpenMobile: I } = 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: M, onOpenChange: I, children: /* @__PURE__ */ b(
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: u ?? "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";
175
- return /* @__PURE__ */ u(
176
- L,
186
+ const { toggleSidebar: u } = k(), m = o ?? "Toggle Sidebar";
187
+ return /* @__PURE__ */ b(
188
+ B,
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), u();
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,25 @@ 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, ...r }, o) => {
288
+ const { footerPortalEl: s } = k(), n = /* @__PURE__ */ a(
289
+ "footer",
290
+ {
291
+ ref: o,
292
+ className: l("flex shrink-0 flex-col gap-1 p-1", e),
293
+ "data-hook": t,
294
+ "data-slot": "sidebar-footer",
295
+ ...r
296
+ }
297
+ );
298
+ return s ? q(n, s) : n;
299
+ }
285
300
  );
286
- je.displayName = "SidebarFooter";
287
- const Ge = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
288
- B,
301
+ Ke.displayName = "SidebarFooter";
302
+ const We = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
303
+ H,
289
304
  {
290
305
  ref: r,
291
306
  className: l(
@@ -296,44 +311,52 @@ const Ge = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
296
311
  ...t
297
312
  }
298
313
  ));
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(
314
+ We.displayName = "SidebarSeparator";
315
+ const qe = i.forwardRef(
316
+ ({ className: e, dataHook: t, ariaLabel: r = "Sidebar", children: o, ...s }, n) => {
317
+ const { isMobile: d, setFooterPortalEl: u } = k(), m = i.useRef(null), [h, f] = i.useState(!1), p = i.useCallback(
318
+ (c) => {
319
+ const x = c?.querySelector(
305
320
  '[data-slot="scroll-area-viewport"]'
306
321
  );
307
- p && (p.tabIndex = -1), typeof s == "function" ? s(b) : s && (s.current = b);
322
+ m.current = x ?? null, x && (x.tabIndex = -1), typeof n == "function" ? n(c) : n && (n.current = c);
308
323
  },
309
- [s]
324
+ [n]
310
325
  );
311
- return /* @__PURE__ */ a(
312
- fe,
326
+ return i.useEffect(() => {
327
+ const c = m.current;
328
+ if (!c) return;
329
+ const x = () => f(c.scrollHeight > c.clientHeight), g = new ResizeObserver(x);
330
+ return g.observe(c), c.firstElementChild && g.observe(c.firstElementChild), () => g.disconnect();
331
+ }, []), /* @__PURE__ */ b(
332
+ ge,
313
333
  {
314
- ref: c,
334
+ ref: p,
315
335
  className: l(
316
- "min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [&_[data-slot=scroll-area-viewport]>div]:block!",
336
+ "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
337
  e
318
338
  ),
319
339
  dataHook: t ?? "sidebar-content-scroll",
320
340
  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
- )
341
+ ...s,
342
+ children: [
343
+ /* @__PURE__ */ a(
344
+ "nav",
345
+ {
346
+ "aria-label": r,
347
+ className: l("flex flex-col gap-2", h && "pr-2"),
348
+ "data-slot": "sidebar-content",
349
+ children: o
350
+ }
351
+ ),
352
+ /* @__PURE__ */ a("div", { ref: u, className: "mt-auto" })
353
+ ]
331
354
  }
332
355
  );
333
356
  }
334
357
  );
335
- Ue.displayName = "SidebarContent";
336
- const Ke = i.forwardRef(
358
+ qe.displayName = "SidebarContent";
359
+ const Xe = i.forwardRef(
337
360
  ({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
338
361
  "div",
339
362
  {
@@ -345,11 +368,11 @@ const Ke = i.forwardRef(
345
368
  }
346
369
  )
347
370
  );
348
- Ke.displayName = "SidebarGroup";
349
- const We = E(
371
+ Xe.displayName = "SidebarGroup";
372
+ const Ve = O(
350
373
  [
351
374
  "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
375
+ w
353
376
  ],
354
377
  {
355
378
  variants: {
@@ -369,63 +392,63 @@ const We = E(
369
392
  variant: "default"
370
393
  }
371
394
  }
372
- ), qe = i.forwardRef(
395
+ ), Ye = i.forwardRef(
373
396
  ({
374
397
  className: e,
375
398
  dataHook: t,
376
399
  asChild: r = !1,
377
400
  size: o = "sm",
378
- variant: n = "default",
379
- isOpen: s = !1,
401
+ variant: s = "default",
402
+ isOpen: n = !1,
380
403
  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());
404
+ onAction: u,
405
+ children: m,
406
+ ...h
407
+ }, f) => {
408
+ const p = r ? y : "div", c = () => {
409
+ s === "collapsible" && d ? d() : s === "action" && u && u();
410
+ }, x = (g) => {
411
+ (g.key === "Enter" || g.key === " ") && (g.preventDefault(), c());
389
412
  };
390
- return /* @__PURE__ */ u(
391
- f,
413
+ return /* @__PURE__ */ b(
414
+ p,
392
415
  {
393
- ref: m,
394
- className: l(We({ size: o, variant: n }), e),
416
+ ref: f,
417
+ className: l(Ve({ size: o, variant: s }), e),
395
418
  "data-hook": t,
396
419
  "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,
420
+ "data-variant": s,
421
+ role: s !== "default" ? "button" : void 0,
422
+ tabIndex: s !== "default" ? 0 : void 0,
423
+ onClick: s !== "default" ? c : void 0,
424
+ onKeyDown: s !== "default" ? x : void 0,
425
+ ...h,
403
426
  children: [
404
- /* @__PURE__ */ a("span", { children: b }),
405
- n === "collapsible" && /* @__PURE__ */ a(
406
- _,
427
+ /* @__PURE__ */ a("span", { children: m }),
428
+ s === "collapsible" && /* @__PURE__ */ a(
429
+ z,
407
430
  {
408
431
  className: l(
409
432
  "shrink-0 transition-transform duration-200",
410
- s && "rotate-180"
433
+ n && "rotate-180"
411
434
  ),
412
435
  size: 16
413
436
  }
414
437
  ),
415
- n === "action" && /* @__PURE__ */ a(O, { className: "shrink-0", size: 16 })
438
+ s === "action" && /* @__PURE__ */ a(_, { className: "shrink-0", size: 16 })
416
439
  ]
417
440
  }
418
441
  );
419
442
  }
420
443
  );
421
- qe.displayName = "SidebarGroupLabel";
422
- const Xe = i.forwardRef(({ className: e, asChild: t = !1, ...r }, o) => /* @__PURE__ */ a(
444
+ Ye.displayName = "SidebarGroupLabel";
445
+ const Ze = i.forwardRef(({ className: e, asChild: t = !1, ...r }, o) => /* @__PURE__ */ a(
423
446
  t ? y : "button",
424
447
  {
425
448
  ref: o,
426
449
  className: l(
427
450
  "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,
451
+ w,
429
452
  // Increases the hit area of the button on mobile.
430
453
  "after:absolute after:-inset-2 after:md:hidden",
431
454
  "group-data-[collapsible=icon]:hidden",
@@ -435,8 +458,8 @@ const Xe = i.forwardRef(({ className: e, asChild: t = !1, ...r }, o) => /* @__PU
435
458
  ...r
436
459
  }
437
460
  ));
438
- Xe.displayName = "SidebarGroupAction";
439
- const Ve = i.forwardRef(({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
461
+ Ze.displayName = "SidebarGroupAction";
462
+ const Je = i.forwardRef(({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
440
463
  "div",
441
464
  {
442
465
  ref: o,
@@ -446,8 +469,8 @@ const Ve = i.forwardRef(({ className: e, dataHook: t, ...r }, o) => /* @__PURE__
446
469
  ...r
447
470
  }
448
471
  ));
449
- Ve.displayName = "SidebarGroupContent";
450
- const Ye = i.forwardRef(
472
+ Je.displayName = "SidebarGroupContent";
473
+ const Qe = i.forwardRef(
451
474
  ({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
452
475
  "ul",
453
476
  {
@@ -459,8 +482,8 @@ const Ye = i.forwardRef(
459
482
  }
460
483
  )
461
484
  );
462
- Ye.displayName = "SidebarMenu";
463
- const $ = i.forwardRef(
485
+ Qe.displayName = "SidebarMenu";
486
+ const j = i.forwardRef(
464
487
  ({ className: e, dataHook: t, ...r }, o) => /* @__PURE__ */ a(
465
488
  "li",
466
489
  {
@@ -472,16 +495,16 @@ const $ = i.forwardRef(
472
495
  }
473
496
  )
474
497
  );
475
- $.displayName = "SidebarMenuItem";
476
- const Ze = i.forwardRef(
498
+ j.displayName = "SidebarMenuItem";
499
+ const ea = i.forwardRef(
477
500
  ({
478
501
  type: e = "caret",
479
502
  isActive: t = !1,
480
503
  className: r,
481
504
  ...o
482
- }, n) => {
483
- const s = {
484
- ref: n,
505
+ }, s) => {
506
+ const n = {
507
+ ref: s,
485
508
  className: l(
486
509
  "shrink-0 transition-transform",
487
510
  t && e === "caret" && "rotate-90",
@@ -492,25 +515,25 @@ const Ze = i.forwardRef(
492
515
  };
493
516
  switch (e) {
494
517
  case "horizontal":
495
- return /* @__PURE__ */ a(D, { ...s });
518
+ return /* @__PURE__ */ a(E, { ...n });
496
519
  case "vertical":
497
- return /* @__PURE__ */ a(_, { ...s });
520
+ return /* @__PURE__ */ a(z, { ...n });
498
521
  case "upDown":
499
- return /* @__PURE__ */ a(q, { ...s });
522
+ return /* @__PURE__ */ a(Y, { ...n });
500
523
  case "plusMinus":
501
- return t ? /* @__PURE__ */ a(W, { ...s }) : /* @__PURE__ */ a(O, { ...s });
524
+ return t ? /* @__PURE__ */ a(V, { ...n }) : /* @__PURE__ */ a(_, { ...n });
502
525
  case "dots":
503
- return /* @__PURE__ */ a(K, { ...s });
526
+ return /* @__PURE__ */ a(X, { ...n });
504
527
  default:
505
- return /* @__PURE__ */ a(D, { ...s });
528
+ return /* @__PURE__ */ a(E, { ...n });
506
529
  }
507
530
  }
508
531
  );
509
- Ze.displayName = "SidebarCollapseIcon";
510
- const Je = E(
532
+ ea.displayName = "SidebarCollapseIcon";
533
+ const aa = O(
511
534
  [
512
535
  "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
536
+ w
514
537
  ],
515
538
  {
516
539
  variants: {
@@ -539,61 +562,61 @@ const Je = E(
539
562
  size: "default"
540
563
  }
541
564
  }
542
- ), T = i.forwardRef(
565
+ ), P = i.forwardRef(
543
566
  ({
544
567
  asChild: e = !1,
545
568
  isActive: t = !1,
546
569
  variant: r = "simple",
547
570
  size: o = "default",
548
- tooltip: n,
549
- className: s,
571
+ tooltip: s,
572
+ className: n,
550
573
  dataHook: d,
551
- ...c
552
- }, b) => {
553
- const p = e ? y : "button", { isMobile: m, state: f } = S(), h = /* @__PURE__ */ a(
554
- p,
574
+ ...u
575
+ }, m) => {
576
+ const h = e ? y : "button", { isMobile: f, state: p } = k(), c = /* @__PURE__ */ a(
577
+ h,
555
578
  {
556
- ref: b,
557
- className: l(Je({ variant: r, size: o }), s),
579
+ ref: m,
580
+ className: l(aa({ variant: r, size: o }), n),
558
581
  "data-active": t,
559
582
  "data-hook": d,
560
583
  "data-size": o,
561
584
  "data-slot": "sidebar-menu-button",
562
585
  "data-variant": r,
563
- ...c
586
+ ...u
564
587
  }
565
588
  );
566
- return n ? (typeof n == "string" && (n = {
567
- children: n,
589
+ return s ? (typeof s == "string" && (s = {
590
+ children: s,
568
591
  dataHook: "sidebar-menu-button-tooltip"
569
- }), /* @__PURE__ */ u(me, { children: [
570
- /* @__PURE__ */ a(he, { asChild: !0, children: h }),
592
+ }), /* @__PURE__ */ b(xe, { children: [
593
+ /* @__PURE__ */ a(ve, { asChild: !0, children: c }),
571
594
  /* @__PURE__ */ a(
572
- ge,
595
+ we,
573
596
  {
574
597
  hideArrow: !0,
575
- ...n,
598
+ ...s,
576
599
  align: "center",
577
600
  className: l(
578
601
  "bg-foreground text-background border-none",
579
- n.className
602
+ s.className
580
603
  ),
581
- hidden: f !== "collapsed" || m,
604
+ hidden: p !== "collapsed" || f,
582
605
  side: "right",
583
606
  sideOffset: 8
584
607
  }
585
608
  )
586
- ] })) : h;
609
+ ] })) : c;
587
610
  }
588
611
  );
589
- T.displayName = "SidebarMenuButton";
590
- const Qe = i.forwardRef(({ className: e, asChild: t = !1, showOnHover: r = !1, ...o }, n) => /* @__PURE__ */ a(
612
+ P.displayName = "SidebarMenuButton";
613
+ const ta = i.forwardRef(({ className: e, asChild: t = !1, showOnHover: r = !1, ...o }, s) => /* @__PURE__ */ a(
591
614
  t ? y : "button",
592
615
  {
593
- ref: n,
616
+ ref: s,
594
617
  className: l(
595
618
  "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,
619
+ w,
597
620
  // Increases the hit area of the button on mobile.
598
621
  "after:absolute after:-inset-2 after:md:hidden",
599
622
  "peer-data-[size=sm]/menu-button:top-1",
@@ -608,8 +631,8 @@ const Qe = i.forwardRef(({ className: e, asChild: t = !1, showOnHover: r = !1, .
608
631
  ...o
609
632
  }
610
633
  ));
611
- Qe.displayName = "SidebarMenuAction";
612
- const ea = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
634
+ ta.displayName = "SidebarMenuAction";
635
+ const ra = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
613
636
  "div",
614
637
  {
615
638
  ref: r,
@@ -623,15 +646,15 @@ const ea = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
623
646
  ...t
624
647
  }
625
648
  ));
626
- ea.displayName = "SidebarMenuBadge";
627
- const aa = i.forwardRef(({ className: e, showIcon: t = !1, ...r }, o) => {
628
- const n = i.useId(), s = i.useMemo(() => {
649
+ ra.displayName = "SidebarMenuBadge";
650
+ const oa = i.forwardRef(({ className: e, showIcon: t = !1, ...r }, o) => {
651
+ const s = i.useId(), n = i.useMemo(() => {
629
652
  let d = 0;
630
- for (let c = 0; c < n.length; c++)
631
- d = (d << 5) - d + n.charCodeAt(c), d |= 0;
653
+ for (let u = 0; u < s.length; u++)
654
+ d = (d << 5) - d + s.charCodeAt(u), d |= 0;
632
655
  return `${Math.abs(d) % 40 + 50}%`;
633
- }, [n]);
634
- return /* @__PURE__ */ u(
656
+ }, [s]);
657
+ return /* @__PURE__ */ b(
635
658
  "div",
636
659
  {
637
660
  ref: o,
@@ -640,19 +663,19 @@ const aa = i.forwardRef(({ className: e, showIcon: t = !1, ...r }, o) => {
640
663
  ...r,
641
664
  children: [
642
665
  t && /* @__PURE__ */ a(
643
- P,
666
+ L,
644
667
  {
645
668
  className: "size-4 rounded-md",
646
669
  "data-slot": "sidebar-menu-skeleton-icon"
647
670
  }
648
671
  ),
649
672
  /* @__PURE__ */ a(
650
- P,
673
+ L,
651
674
  {
652
675
  className: "h-4 max-w-[--skeleton-width] flex-1",
653
676
  "data-slot": "sidebar-menu-skeleton-text",
654
677
  style: {
655
- "--skeleton-width": s
678
+ "--skeleton-width": n
656
679
  }
657
680
  }
658
681
  )
@@ -660,8 +683,8 @@ const aa = i.forwardRef(({ className: e, showIcon: t = !1, ...r }, o) => {
660
683
  }
661
684
  );
662
685
  });
663
- aa.displayName = "SidebarMenuSkeleton";
664
- const ta = E(
686
+ oa.displayName = "SidebarMenuSkeleton";
687
+ const sa = O(
665
688
  "flex min-w-0 flex-col items-start gap-1 py-1 group-data-[collapsible=icon]:hidden",
666
689
  {
667
690
  variants: {
@@ -675,20 +698,20 @@ const ta = E(
675
698
  variant: "border"
676
699
  }
677
700
  }
678
- ), j = i.forwardRef(
679
- ({ className: e, variant: t = "border", dataHook: r, ...o }, n) => /* @__PURE__ */ a(
701
+ ), G = i.forwardRef(
702
+ ({ className: e, variant: t = "border", dataHook: r, ...o }, s) => /* @__PURE__ */ a(
680
703
  "ul",
681
704
  {
682
- ref: n,
683
- className: l(ta({ variant: t }), e),
705
+ ref: s,
706
+ className: l(sa({ variant: t }), e),
684
707
  "data-hook": r,
685
708
  "data-slot": "sidebar-menu-sub",
686
709
  ...o
687
710
  }
688
711
  )
689
712
  );
690
- j.displayName = "SidebarMenuSub";
691
- const ra = i.forwardRef(({ dataHook: e, ...t }, r) => /* @__PURE__ */ a(
713
+ G.displayName = "SidebarMenuSub";
714
+ const na = i.forwardRef(({ dataHook: e, ...t }, r) => /* @__PURE__ */ a(
692
715
  "li",
693
716
  {
694
717
  ref: r,
@@ -697,22 +720,22 @@ const ra = i.forwardRef(({ dataHook: e, ...t }, r) => /* @__PURE__ */ a(
697
720
  ...t
698
721
  }
699
722
  ));
700
- ra.displayName = "SidebarMenuSubItem";
701
- const oa = i.forwardRef(
723
+ na.displayName = "SidebarMenuSubItem";
724
+ const ia = i.forwardRef(
702
725
  ({
703
726
  asChild: e = !1,
704
727
  size: t = "md",
705
728
  isActive: r,
706
729
  className: o,
707
- dataHook: n,
708
- ...s
730
+ dataHook: s,
731
+ ...n
709
732
  }, d) => /* @__PURE__ */ a(
710
733
  e ? y : "a",
711
734
  {
712
735
  ref: d,
713
736
  className: l(
714
737
  "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,
738
+ w,
716
739
  "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
717
740
  t === "sm" && "text-xs",
718
741
  t === "md" && "text-sm",
@@ -720,39 +743,39 @@ const oa = i.forwardRef(
720
743
  o
721
744
  ),
722
745
  "data-active": r,
723
- "data-hook": n,
746
+ "data-hook": s,
724
747
  "data-size": t,
725
748
  "data-slot": "sidebar-menu-sub-button",
726
- ...s
749
+ ...n
727
750
  }
728
751
  )
729
752
  );
730
- oa.displayName = "SidebarMenuSubButton";
731
- function na({
753
+ ia.displayName = "SidebarMenuSubButton";
754
+ function da({
732
755
  dataHook: e,
733
756
  className: t,
734
757
  children: r,
735
758
  defaultOpen: o,
736
- open: n,
737
- onOpenChange: s
759
+ open: s,
760
+ onOpenChange: n
738
761
  }) {
739
- return /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(
740
- ce,
762
+ return /* @__PURE__ */ a(j, { children: /* @__PURE__ */ a(
763
+ pe,
741
764
  {
742
765
  collapsible: !0,
743
766
  className: t,
744
767
  dataHook: e ?? "sidebar-menu-collapsible",
745
768
  defaultValue: o ? "item" : void 0,
746
769
  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 })
770
+ value: s !== void 0 ? s ? "item" : "" : void 0,
771
+ onValueChange: n ? (d) => n(d === "item") : void 0,
772
+ children: /* @__PURE__ */ a(fe, { className: "group/collapsible border-none", value: "item", children: r })
750
773
  }
751
774
  ) });
752
775
  }
753
- na.displayName = "SidebarMenuCollapsible";
754
- const sa = i.forwardRef(({ children: e, className: t, ...r }, o) => /* @__PURE__ */ a(pe.Trigger, { asChild: !0, children: /* @__PURE__ */ u(
755
- T,
776
+ da.displayName = "SidebarMenuCollapsible";
777
+ const la = i.forwardRef(({ children: e, className: t, ...r }, o) => /* @__PURE__ */ a(he.Trigger, { asChild: !0, children: /* @__PURE__ */ b(
778
+ P,
756
779
  {
757
780
  ref: o,
758
781
  className: t,
@@ -761,7 +784,7 @@ const sa = i.forwardRef(({ children: e, className: t, ...r }, o) => /* @__PURE__
761
784
  children: [
762
785
  e,
763
786
  /* @__PURE__ */ a(
764
- D,
787
+ E,
765
788
  {
766
789
  "data-collapse-icon": !0,
767
790
  className: "opacity-100! transition-transform duration-200 ease-out group-data-[collapsible=icon]:hidden",
@@ -771,18 +794,18 @@ const sa = i.forwardRef(({ children: e, className: t, ...r }, o) => /* @__PURE__
771
794
  ]
772
795
  }
773
796
  ) }));
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(
797
+ la.displayName = "SidebarMenuCollapsibleTrigger";
798
+ 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 }) }));
799
+ ca.displayName = "SidebarMenuCollapsibleContent";
800
+ const ua = i.forwardRef(
778
801
  ({
779
802
  className: e,
780
803
  dataHook: t = "sidebar-drawer",
781
804
  trackingEl: r,
782
805
  trackingLabel: o,
783
806
  // eslint-disable-next-line @typescript-eslint/no-unused-vars -- accepted for backward compat
784
- children: n,
785
- ...s
807
+ children: s,
808
+ ...n
786
809
  }, d) => /* @__PURE__ */ a(
787
810
  "div",
788
811
  {
@@ -792,22 +815,22 @@ const da = i.forwardRef(
792
815
  "data-slot": "sidebar-drawer",
793
816
  "data-tracking-el": r,
794
817
  "data-tracking-label": o,
795
- ...s,
796
- children: /* @__PURE__ */ a(F, { dataHook: `${t}-trigger`, children: /* @__PURE__ */ a(X, { size: 24 }) })
818
+ ...n,
819
+ children: /* @__PURE__ */ a($, { dataHook: `${t}-trigger`, children: /* @__PURE__ */ a(Z, { size: 24 }) })
797
820
  }
798
821
  )
799
822
  );
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,
823
+ ua.displayName = "SidebarDrawer";
824
+ const ba = i.forwardRef(
825
+ ({ className: e, dataHook: t = "sidebar-header-button", children: r, ...o }, s) => /* @__PURE__ */ a(
826
+ B,
804
827
  {
805
- ref: n,
828
+ ref: s,
806
829
  ...o,
807
830
  iconOnly: !0,
808
831
  className: l(
809
832
  "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground size-7 rounded-md shadow-none",
810
- v,
833
+ w,
811
834
  e
812
835
  ),
813
836
  "data-slot": "sidebar-header-button",
@@ -818,100 +841,100 @@ const la = i.forwardRef(
818
841
  }
819
842
  )
820
843
  );
821
- la.displayName = "SidebarHeaderButton";
822
- const G = i.forwardRef(
844
+ ba.displayName = "SidebarHeaderButton";
845
+ const U = i.forwardRef(
823
846
  ({
824
847
  className: e,
825
848
  dataHook: t = "sidebar-popover-trigger",
826
849
  icon: r,
827
850
  triggerAriaLabel: o,
828
- children: n,
829
- ...s
830
- }, d) => /* @__PURE__ */ u(
851
+ children: s,
852
+ ...n
853
+ }, d) => /* @__PURE__ */ b(
831
854
  "button",
832
855
  {
833
856
  ref: d,
834
857
  "aria-label": o ?? "Switch workspace",
835
858
  className: l(
836
859
  "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,
860
+ w,
838
861
  e
839
862
  ),
840
863
  "data-hook": t,
841
864
  "data-slot": "sidebar-popover-trigger",
842
865
  type: "button",
843
- ...s,
866
+ ...n,
844
867
  children: [
845
868
  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 })
869
+ /* @__PURE__ */ a("span", { className: "truncate", children: s }),
870
+ /* @__PURE__ */ a(z, { className: "shrink-0 opacity-50", size: 16 })
848
871
  ]
849
872
  }
850
873
  )
851
874
  );
852
- G.displayName = "SidebarPopoverTrigger";
853
- const A = i.forwardRef(({ className: e, dataHook: t, icon: r, shortcut: o, children: n, ...s }, d) => /* @__PURE__ */ u(
875
+ U.displayName = "SidebarPopoverTrigger";
876
+ const A = i.forwardRef(({ className: e, dataHook: t, icon: r, shortcut: o, children: s, ...n }, d) => /* @__PURE__ */ b(
854
877
  "button",
855
878
  {
856
879
  ref: d,
857
880
  className: l(
858
881
  "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,
882
+ w,
860
883
  e
861
884
  ),
862
885
  "data-hook": t,
863
886
  "data-slot": "sidebar-popover-menu-item",
864
887
  type: "button",
865
- ...s,
888
+ ...n,
866
889
  children: [
867
890
  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 }),
891
+ /* @__PURE__ */ a("span", { className: "min-w-px flex-1 truncate text-left", children: s }),
869
892
  o && /* @__PURE__ */ a("span", { className: "text-popover-foreground/60 shrink-0 text-xs", children: o })
870
893
  ]
871
894
  }
872
895
  ));
873
896
  A.displayName = "SidebarPopoverMenuItem";
874
- const ca = i.forwardRef(
897
+ const pa = i.forwardRef(
875
898
  ({
876
899
  className: e,
877
900
  dataHook: t = "sidebar-popover-menu",
878
901
  groupTitle: r = "Teams",
879
902
  items: o,
880
- addActionLabel: n,
881
- addActionIcon: s,
903
+ addActionLabel: s,
904
+ addActionIcon: n,
882
905
  onAddAction: d,
883
- children: c,
884
- ...b
885
- }, p) => /* @__PURE__ */ a(
906
+ children: u,
907
+ ...m
908
+ }, h) => /* @__PURE__ */ a(
886
909
  "div",
887
910
  {
888
- ref: p,
911
+ ref: h,
889
912
  className: l("flex flex-col", e),
890
913
  "data-hook": t,
891
914
  "data-slot": "sidebar-popover-menu",
892
- ...b,
893
- children: c || /* @__PURE__ */ u(I, { children: [
894
- /* @__PURE__ */ u("div", { className: "flex flex-col items-start p-1", children: [
915
+ ...m,
916
+ children: u || /* @__PURE__ */ b(D, { children: [
917
+ /* @__PURE__ */ b("div", { className: "flex flex-col items-start p-1", children: [
895
918
  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(
919
+ o?.map((f, p) => /* @__PURE__ */ a(
897
920
  A,
898
921
  {
899
- icon: m.icon,
900
- shortcut: m.shortcut,
901
- onClick: m.onClick,
902
- children: m.label
922
+ icon: f.icon,
923
+ shortcut: f.shortcut,
924
+ onClick: f.onClick,
925
+ children: f.label
903
926
  },
904
- f
927
+ p
905
928
  ))
906
929
  ] }),
907
- d && /* @__PURE__ */ u(I, { children: [
908
- /* @__PURE__ */ a(B, {}),
930
+ d && /* @__PURE__ */ b(D, { children: [
931
+ /* @__PURE__ */ a(H, {}),
909
932
  /* @__PURE__ */ a("div", { className: "flex flex-col items-start p-1", children: /* @__PURE__ */ a(
910
933
  A,
911
934
  {
912
- icon: s || /* @__PURE__ */ a(O, { size: 16 }),
935
+ icon: n || /* @__PURE__ */ a(_, { size: 16 }),
913
936
  onClick: d,
914
- children: n ?? "Add team"
937
+ children: s ?? "Add team"
915
938
  }
916
939
  ) })
917
940
  ] })
@@ -919,20 +942,20 @@ const ca = i.forwardRef(
919
942
  }
920
943
  )
921
944
  );
922
- ca.displayName = "SidebarPopoverMenu";
923
- function ua({
945
+ pa.displayName = "SidebarPopoverMenu";
946
+ function fa({
924
947
  dataHook: e = "sidebar-switcher",
925
948
  icon: t,
926
949
  label: r,
927
950
  triggerAriaLabel: o,
928
- triggerClassName: n,
929
- children: s
951
+ triggerClassName: s,
952
+ children: n
930
953
  }) {
931
- return /* @__PURE__ */ u(re, { children: [
932
- /* @__PURE__ */ a(oe, { asChild: !0, children: /* @__PURE__ */ a(
933
- G,
954
+ return /* @__PURE__ */ b(ne, { children: [
955
+ /* @__PURE__ */ a(ie, { asChild: !0, children: /* @__PURE__ */ a(
956
+ U,
934
957
  {
935
- className: n,
958
+ className: s,
936
959
  dataHook: `${e}-trigger`,
937
960
  icon: t,
938
961
  triggerAriaLabel: o,
@@ -940,41 +963,41 @@ function ua({
940
963
  }
941
964
  ) }),
942
965
  /* @__PURE__ */ a(
943
- ne,
966
+ de,
944
967
  {
945
968
  align: "start",
946
969
  className: "w-[316px] p-0",
947
970
  dataHook: `${e}-content`,
948
971
  side: "bottom",
949
972
  sideOffset: 4,
950
- children: s
973
+ children: n
951
974
  }
952
975
  )
953
976
  ] });
954
977
  }
955
- ua.displayName = "SidebarSwitcher";
956
- function ba({
978
+ fa.displayName = "SidebarSwitcher";
979
+ function ma({
957
980
  dataHook: e = "sidebar-account-dropdown",
958
981
  name: t,
959
982
  email: r,
960
983
  avatar: o,
961
- menuGroups: n,
962
- triggerAriaLabel: s,
984
+ menuGroups: s,
985
+ triggerAriaLabel: n,
963
986
  align: d = "end",
964
- side: c = "top",
965
- children: b
987
+ side: u = "top",
988
+ children: m
966
989
  }) {
967
- return /* @__PURE__ */ u(Z, { children: [
968
- /* @__PURE__ */ a(J, { asChild: !0, children: /* @__PURE__ */ u(
969
- T,
990
+ return /* @__PURE__ */ b(ee, { children: [
991
+ /* @__PURE__ */ a(ae, { asChild: !0, children: /* @__PURE__ */ b(
992
+ P,
970
993
  {
971
- "aria-label": s ?? "Account menu",
994
+ "aria-label": n ?? "Account menu",
972
995
  className: "h-auto py-1.5",
973
996
  dataHook: `${e}-button`,
974
997
  size: "lg",
975
998
  children: [
976
999
  o,
977
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
1000
+ /* @__PURE__ */ b("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
978
1001
  /* @__PURE__ */ a("span", { className: "truncate text-sm font-semibold", children: t }),
979
1002
  /* @__PURE__ */ a("span", { className: "truncate text-xs font-normal", children: r })
980
1003
  ] })
@@ -982,50 +1005,50 @@ function ba({
982
1005
  }
983
1006
  ) }),
984
1007
  /* @__PURE__ */ a(
985
- Q,
1008
+ te,
986
1009
  {
987
1010
  align: d,
988
1011
  className: "w-56",
989
1012
  dataHook: `${e}-content`,
990
- side: c,
1013
+ side: u,
991
1014
  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: [
1015
+ children: m || /* @__PURE__ */ b(D, { children: [
1016
+ /* @__PURE__ */ b(re, { className: "flex items-center gap-2 px-1 py-1.5", children: [
994
1017
  o,
995
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
1018
+ /* @__PURE__ */ b("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
996
1019
  /* @__PURE__ */ a("span", { className: "truncate text-sm font-semibold", children: t }),
997
1020
  /* @__PURE__ */ a("span", { className: "truncate text-xs font-normal", children: r })
998
1021
  ] })
999
1022
  ] }),
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))
1023
+ s?.map((h, f) => /* @__PURE__ */ b(i.Fragment, { children: [
1024
+ /* @__PURE__ */ a(oe, {}),
1025
+ h.map((p, c) => /* @__PURE__ */ b(se, { onClick: p.onClick, children: [
1026
+ p.icon,
1027
+ p.label
1028
+ ] }, c))
1029
+ ] }, f))
1007
1030
  ] })
1008
1031
  }
1009
1032
  )
1010
1033
  ] });
1011
1034
  }
1012
- ba.displayName = "SidebarAccountDropdown";
1013
- const pa = i.forwardRef(
1035
+ ma.displayName = "SidebarAccountDropdown";
1036
+ const ha = i.forwardRef(
1014
1037
  ({
1015
1038
  className: e,
1016
1039
  dataHook: t,
1017
1040
  senderName: r,
1018
1041
  title: o,
1019
- description: n,
1020
- timestamp: s,
1042
+ description: s,
1043
+ timestamp: n,
1021
1044
  ...d
1022
- }, c) => /* @__PURE__ */ u(
1045
+ }, u) => /* @__PURE__ */ b(
1023
1046
  "button",
1024
1047
  {
1025
- ref: c,
1048
+ ref: u,
1026
1049
  className: l(
1027
1050
  "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,
1051
+ w,
1029
1052
  e
1030
1053
  ),
1031
1054
  "data-hook": t,
@@ -1033,62 +1056,62 @@ const pa = i.forwardRef(
1033
1056
  type: "button",
1034
1057
  ...d,
1035
1058
  children: [
1036
- /* @__PURE__ */ u("div", { className: "flex w-full items-center justify-between text-sm", children: [
1059
+ /* @__PURE__ */ b("div", { className: "flex w-full items-center justify-between text-sm", children: [
1037
1060
  /* @__PURE__ */ a("span", { children: r }),
1038
- s && /* @__PURE__ */ a("span", { children: s })
1061
+ n && /* @__PURE__ */ a("span", { children: n })
1039
1062
  ] }),
1040
1063
  /* @__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 })
1064
+ s && /* @__PURE__ */ a("p", { className: "w-full truncate text-xs", children: s })
1042
1065
  ]
1043
1066
  }
1044
1067
  )
1045
1068
  );
1046
- pa.displayName = "SidebarInboxItem";
1069
+ ha.displayName = "SidebarInboxItem";
1047
1070
  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,
1070
- T as SidebarMenuButton,
1071
- Re as SidebarMenuButtonSize,
1072
- Ce as SidebarMenuButtonVariant,
1073
- na as SidebarMenuCollapsible,
1074
- ia as SidebarMenuCollapsibleContent,
1075
- sa as SidebarMenuCollapsibleTrigger,
1076
- $ as SidebarMenuItem,
1077
- aa as SidebarMenuSkeleton,
1078
- j as SidebarMenuSub,
1079
- oa as SidebarMenuSubButton,
1080
- Ie as SidebarMenuSubButtonSize,
1081
- ra as SidebarMenuSubItem,
1082
- Me as SidebarMenuSubVariant,
1083
- ca as SidebarPopoverMenu,
1071
+ Fe as Sidebar,
1072
+ ma as SidebarAccountDropdown,
1073
+ ea as SidebarCollapseIcon,
1074
+ Oe as SidebarCollapseIconType,
1075
+ Ce as SidebarCollapsible,
1076
+ qe as SidebarContent,
1077
+ ua as SidebarDrawer,
1078
+ Ke as SidebarFooter,
1079
+ Xe as SidebarGroup,
1080
+ Ze as SidebarGroupAction,
1081
+ Je as SidebarGroupContent,
1082
+ Ye as SidebarGroupLabel,
1083
+ Re as SidebarGroupLabelSize,
1084
+ Me as SidebarGroupLabelVariant,
1085
+ Ue as SidebarHeader,
1086
+ ba as SidebarHeaderButton,
1087
+ ha as SidebarInboxItem,
1088
+ Ge as SidebarInput,
1089
+ je as SidebarInset,
1090
+ Qe as SidebarMenu,
1091
+ ta as SidebarMenuAction,
1092
+ ra as SidebarMenuBadge,
1093
+ P as SidebarMenuButton,
1094
+ De as SidebarMenuButtonSize,
1095
+ Ie as SidebarMenuButtonVariant,
1096
+ da as SidebarMenuCollapsible,
1097
+ ca as SidebarMenuCollapsibleContent,
1098
+ la as SidebarMenuCollapsibleTrigger,
1099
+ j as SidebarMenuItem,
1100
+ oa as SidebarMenuSkeleton,
1101
+ G as SidebarMenuSub,
1102
+ ia as SidebarMenuSubButton,
1103
+ Ae as SidebarMenuSubButtonSize,
1104
+ na as SidebarMenuSubItem,
1105
+ Ee as SidebarMenuSubVariant,
1106
+ pa as SidebarPopoverMenu,
1084
1107
  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
1108
+ U as SidebarPopoverTrigger,
1109
+ He as SidebarProvider,
1110
+ $e as SidebarRail,
1111
+ We as SidebarSeparator,
1112
+ Se as SidebarSide,
1113
+ fa as SidebarSwitcher,
1114
+ $ as SidebarTrigger,
1115
+ ye as SidebarVariant,
1116
+ k as useSidebar
1094
1117
  };