@brightlocal/ui-components 2.12.0 → 2.13.0

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