impact-nova 1.5.13 → 1.5.15

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 (39) hide show
  1. package/dist/components/ui/badge.d.ts +1 -1
  2. package/dist/components/ui/badge.js +12 -11
  3. package/dist/components/ui/breadcrumb.js +25 -20
  4. package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
  5. package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
  6. package/dist/components/ui/command-palette/command-palette.d.ts +5 -2
  7. package/dist/components/ui/command-palette/command-palette.js +271 -264
  8. package/dist/components/ui/command-palette/index.d.ts +1 -1
  9. package/dist/components/ui/command-palette/index.js +42 -41
  10. package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
  11. package/dist/components/ui/command-palette/shortcut-settings.js +112 -107
  12. package/dist/components/ui/command-palette/utils.d.ts +6 -1
  13. package/dist/components/ui/command-palette/utils.js +81 -74
  14. package/dist/components/ui/data-table/data-table.js +51 -40
  15. package/dist/components/ui/dialog.js +2 -5
  16. package/dist/components/ui/empty-container.js +72 -65
  17. package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
  18. package/dist/components/ui/filter-panel/filter-panel.js +154 -76
  19. package/dist/components/ui/filter-strip/filter-summary.js +30 -32
  20. package/dist/components/ui/header.d.ts +7 -3
  21. package/dist/components/ui/header.js +46 -44
  22. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +1 -1
  23. package/dist/components/ui/select/select.js +84 -88
  24. package/dist/components/ui/sidebar.js +341 -305
  25. package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
  26. package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
  27. package/dist/i18n/defaultMessages.d.ts +1 -0
  28. package/dist/i18n/defaultMessages.js +1 -0
  29. package/dist/i18n/locales/de.js +1 -0
  30. package/dist/i18n/locales/es.js +1 -0
  31. package/dist/i18n/locales/hi.js +1 -0
  32. package/dist/i18n/locales/kn.js +1 -0
  33. package/dist/icons/assets/clock.svg.js +5 -0
  34. package/dist/icons/index.d.ts +1 -0
  35. package/dist/icons/index.js +159 -157
  36. package/dist/impact-nova.css +1 -1
  37. package/dist/index.js +106 -105
  38. package/package.json +1 -1
  39. package/tailwind.config.js +14 -1
@@ -1,26 +1,26 @@
1
- import { jsx as t, jsxs as h, Fragment as M } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as g, Fragment as C } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import * as z from "@radix-ui/react-collapsible";
4
- import { Slot as C } from "@radix-ui/react-slot";
5
- import { cva as G } from "class-variance-authority";
6
- import { ChevronRight as A, HamburgerClosed as H, HamburgerOpen as j } from "../../icons/index.js";
4
+ import { Slot as N } from "@radix-ui/react-slot";
5
+ import { cva as H } from "class-variance-authority";
6
+ import { ChevronRight as A, HamburgerClosed as L, HamburgerOpen as P } from "../../icons/index.js";
7
7
  import { cn as l } from "../../lib/utils.js";
8
- import { Button as K } from "./button.js";
9
- import { Input as P } from "./input.js";
10
- import { Separator as W } from "./separator.js";
11
- import { Skeleton as I } from "./skeleton.js";
12
- import { Tooltip as $, TooltipTrigger as F, TooltipContent as q, TooltipProvider as V } from "./tooltip.js";
13
- import { useImpactNovaI18n as N } from "../../i18n/ImpactNovaI18nContext.js";
14
- const U = "sidebar_state", X = 3600 * 24 * 7, Y = "280px", J = "64px", Q = "b", B = i.createContext(null), _ = i.createContext(null);
15
- function y() {
16
- const a = i.useContext(B);
17
- if (!a)
8
+ import { Button as j } from "./button.js";
9
+ import { Input as W } from "./input.js";
10
+ import { Separator as $ } from "./separator.js";
11
+ import { Skeleton as _ } from "./skeleton.js";
12
+ import { Tooltip as F, TooltipTrigger as q, TooltipContent as K, TooltipProvider as V } from "./tooltip.js";
13
+ import { useImpactNovaI18n as y } from "../../i18n/ImpactNovaI18nContext.js";
14
+ const X = "sidebar_state", J = 3600 * 24 * 7, Q = "280px", U = "64px", B = i.createContext(null), I = i.createContext(null);
15
+ function S() {
16
+ const t = i.useContext(B);
17
+ if (!t)
18
18
  throw new Error("useSidebar must be used within a SidebarProvider.");
19
- return a;
19
+ return t;
20
20
  }
21
- const Z = i.forwardRef(
21
+ const Y = i.forwardRef(
22
22
  ({
23
- defaultOpen: a = !1,
23
+ defaultOpen: t = !1,
24
24
  open: r,
25
25
  onOpenChange: e,
26
26
  className: o,
@@ -29,37 +29,30 @@ const Z = i.forwardRef(
29
29
  autoHideAfter: c,
30
30
  ...u
31
31
  }, f) => {
32
- const [v, d] = i.useState(a), p = r ?? v, g = i.useCallback(
33
- (m) => {
34
- const w = typeof m == "function" ? m(p) : m;
35
- e ? e(w) : d(w), document.cookie = `${U}=${w}; path=/; max-age=${X}`;
32
+ const [m, d] = i.useState(t), p = r ?? m, h = i.useCallback(
33
+ (v) => {
34
+ const M = typeof v == "function" ? v(p) : v;
35
+ e ? e(M) : d(M), document.cookie = `${X}=${M}; path=/; max-age=${J}`;
36
36
  },
37
37
  [e, p]
38
38
  ), x = i.useCallback(() => {
39
- g((m) => !m);
40
- }, [g]);
41
- i.useEffect(() => {
42
- const m = (w) => {
43
- w.key === Q && (w.metaKey || w.ctrlKey) && (w.preventDefault(), x());
44
- };
45
- return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
46
- }, [x]);
47
- const b = p ? "expanded" : "collapsed", S = i.useMemo(
39
+ h((v) => !v);
40
+ }, [h]), b = p ? "expanded" : "collapsed", w = i.useMemo(
48
41
  () => ({
49
42
  state: b,
50
43
  open: p,
51
- setOpen: g,
44
+ setOpen: h,
52
45
  toggleSidebar: x,
53
46
  autoHideAfter: c
54
47
  }),
55
- [b, p, g, x, c]
48
+ [b, p, h, x, c]
56
49
  );
57
- return /* @__PURE__ */ t(B.Provider, { value: S, children: /* @__PURE__ */ t(V, { children: /* @__PURE__ */ t(
50
+ return /* @__PURE__ */ a(B.Provider, { value: w, children: /* @__PURE__ */ a(V, { children: /* @__PURE__ */ a(
58
51
  "div",
59
52
  {
60
53
  style: {
61
- "--sidebar-width": Y,
62
- "--sidebar-width-icon": J,
54
+ "--sidebar-width": Q,
55
+ "--sidebar-width-icon": U,
63
56
  ...n
64
57
  },
65
58
  className: l(
@@ -73,18 +66,18 @@ const Z = i.forwardRef(
73
66
  ) }) });
74
67
  }
75
68
  );
76
- Z.displayName = "SidebarProvider";
77
- const ee = i.forwardRef(
69
+ Y.displayName = "SidebarProvider";
70
+ const Z = i.forwardRef(
78
71
  ({
79
- side: a = "left",
72
+ side: t = "left",
80
73
  variant: r = "sidebar",
81
74
  collapsible: e = "offcanvas",
82
75
  className: o,
83
76
  children: n,
84
77
  ...s
85
78
  }, c) => {
86
- const { state: u } = y();
87
- return e === "none" ? /* @__PURE__ */ t(
79
+ const { state: u, open: f, setOpen: m } = S();
80
+ return e === "none" ? /* @__PURE__ */ a(
88
81
  "div",
89
82
  {
90
83
  className: l(
@@ -95,76 +88,88 @@ const ee = i.forwardRef(
95
88
  ...s,
96
89
  children: n
97
90
  }
98
- ) : /* @__PURE__ */ h(
99
- "div",
100
- {
101
- ref: c,
102
- className: "group peer hidden md:block text-sidebar-foreground",
103
- "data-state": u,
104
- "data-collapsible": u === "collapsed" ? e : "",
105
- "data-variant": r,
106
- "data-side": a,
107
- children: [
108
- /* @__PURE__ */ t(
109
- "div",
110
- {
111
- className: l(
112
- "relative h-full w-[--sidebar-width-icon] bg-transparent transition-[width] duration-200 ease-linear"
113
- )
114
- }
115
- ),
116
- /* @__PURE__ */ t(
117
- "div",
118
- {
119
- className: l(
120
- "absolute inset-y-0 left-0 z-[45] duration-200 ease-linear md:flex h-full w-[--sidebar-width] flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
121
- "group-data-[state=collapsed]:w-[--sidebar-width-icon]",
122
- a === "left" ? "border-r group-data-[variant=floating]:border-r-0" : "border-l group-data-[variant=floating]:border-l-0",
123
- o
124
- ),
125
- ...s,
126
- children: /* @__PURE__ */ t(
127
- "div",
128
- {
129
- "data-sidebar": "sidebar",
130
- className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
131
- children: n
132
- }
133
- )
134
- }
135
- )
136
- ]
137
- }
138
- );
91
+ ) : /* @__PURE__ */ g(C, { children: [
92
+ e === "offcanvas" && f ? /* @__PURE__ */ a(
93
+ "div",
94
+ {
95
+ role: "presentation",
96
+ "aria-hidden": !0,
97
+ "data-sidebar": "offcanvas-backdrop",
98
+ className: "fixed inset-0 z-[44] hidden md:block",
99
+ onPointerDown: () => m(!1)
100
+ }
101
+ ) : null,
102
+ /* @__PURE__ */ g(
103
+ "div",
104
+ {
105
+ ref: c,
106
+ className: "group peer hidden md:block text-sidebar-foreground",
107
+ "data-state": u,
108
+ "data-collapsible": u === "collapsed" ? e : "",
109
+ "data-variant": r,
110
+ "data-side": t,
111
+ children: [
112
+ /* @__PURE__ */ a(
113
+ "div",
114
+ {
115
+ className: l(
116
+ "relative h-full w-[--sidebar-width-icon] bg-transparent transition-[width] duration-200 ease-linear"
117
+ )
118
+ }
119
+ ),
120
+ /* @__PURE__ */ a(
121
+ "div",
122
+ {
123
+ className: l(
124
+ "absolute inset-y-0 left-0 z-[45] duration-200 ease-linear md:flex h-full w-[--sidebar-width] flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
125
+ "group-data-[state=collapsed]:w-[--sidebar-width-icon]",
126
+ t === "left" ? "border-r group-data-[variant=floating]:border-r-0" : "border-l group-data-[variant=floating]:border-l-0",
127
+ o
128
+ ),
129
+ ...s,
130
+ children: /* @__PURE__ */ a(
131
+ "div",
132
+ {
133
+ "data-sidebar": "sidebar",
134
+ className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
135
+ children: n
136
+ }
137
+ )
138
+ }
139
+ )
140
+ ]
141
+ }
142
+ )
143
+ ] });
139
144
  }
140
145
  );
141
- ee.displayName = "Sidebar";
142
- const ae = i.forwardRef(({ className: a, onClick: r, ...e }, o) => {
143
- const { t: n } = N(), { toggleSidebar: s, state: c } = y(), u = n("aria.toggleSidebar");
144
- return /* @__PURE__ */ h(
145
- K,
146
+ Z.displayName = "Sidebar";
147
+ const ee = i.forwardRef(({ className: t, onClick: r, ...e }, o) => {
148
+ const { t: n } = y(), { toggleSidebar: s, state: c } = S(), u = n("aria.toggleSidebar");
149
+ return /* @__PURE__ */ g(
150
+ j,
146
151
  {
147
152
  ref: o,
148
153
  "data-sidebar": "trigger",
149
154
  variant: "ghost",
150
155
  size: "icon",
151
- className: l("rounded-lg p-0 hover:bg-transparent", a),
156
+ className: l("rounded-lg p-0 hover:bg-transparent", t),
152
157
  onClick: (f) => {
153
158
  r?.(f), s();
154
159
  },
155
160
  "aria-label": u,
156
161
  ...e,
157
162
  children: [
158
- c === "expanded" ? /* @__PURE__ */ t(H, { size: "3xl" }) : /* @__PURE__ */ t(j, { size: "3xl" }),
159
- /* @__PURE__ */ t("span", { className: "sr-only", children: u })
163
+ c === "expanded" ? /* @__PURE__ */ a(L, { size: "3xl" }) : /* @__PURE__ */ a(P, { size: "3xl" }),
164
+ /* @__PURE__ */ a("span", { className: "sr-only", children: u })
160
165
  ]
161
166
  }
162
167
  );
163
168
  });
164
- ae.displayName = "SidebarTrigger";
165
- const te = i.forwardRef(({ className: a, ...r }, e) => {
166
- const { t: o } = N(), { toggleSidebar: n } = y(), s = o("aria.toggleSidebar");
167
- return /* @__PURE__ */ t(
169
+ ee.displayName = "SidebarTrigger";
170
+ const ae = i.forwardRef(({ className: t, ...r }, e) => {
171
+ const { t: o } = y(), { toggleSidebar: n } = S(), s = o("aria.toggleSidebar");
172
+ return /* @__PURE__ */ a(
168
173
  "button",
169
174
  {
170
175
  ref: e,
@@ -180,176 +185,186 @@ const te = i.forwardRef(({ className: a, ...r }, e) => {
180
185
  "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
181
186
  "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
182
187
  "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
183
- a
188
+ t
184
189
  ),
185
190
  ...r
186
191
  }
187
192
  );
188
193
  });
189
- te.displayName = "SidebarRail";
190
- const re = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
194
+ ae.displayName = "SidebarRail";
195
+ const te = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
191
196
  "div",
192
197
  {
193
198
  ref: e,
194
199
  className: l(
195
200
  "relative flex w-full flex-1 flex-col bg-background",
196
201
  "md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
197
- a
202
+ t
198
203
  ),
199
204
  ...r
200
205
  }
201
206
  ));
202
- re.displayName = "SidebarInset";
203
- const ie = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
204
- P,
207
+ te.displayName = "SidebarInset";
208
+ const re = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
209
+ W,
205
210
  {
206
211
  ref: e,
207
212
  "data-sidebar": "input",
208
213
  className: l(
209
214
  "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
210
- a
215
+ t
211
216
  ),
212
217
  ...r
213
218
  }
214
219
  ));
215
- ie.displayName = "SidebarInput";
216
- const ne = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
220
+ re.displayName = "SidebarInput";
221
+ const ie = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
217
222
  "div",
218
223
  {
219
224
  ref: e,
220
225
  "data-sidebar": "header",
221
226
  className: l(
222
227
  "flex mt-4 mb-6 items-center px-3 transition-all duration-200 ease-linear",
223
- a
228
+ t
224
229
  ),
225
230
  ...r
226
231
  }
227
232
  ));
228
- ne.displayName = "SidebarHeader";
229
- const oe = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
233
+ ie.displayName = "SidebarHeader";
234
+ const ne = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
230
235
  "div",
231
236
  {
232
237
  ref: e,
233
238
  "data-sidebar": "footer",
234
- className: l("flex flex-col gap-2 py-2 group-data-[state=collapsed]:px-0", a),
239
+ className: l(
240
+ "flex shrink-0 flex-col gap-2 py-2 min-w-0 w-full overflow-x-hidden group-data-[state=collapsed]:px-0",
241
+ t
242
+ ),
235
243
  ...r
236
244
  }
237
245
  ));
238
- oe.displayName = "SidebarFooter";
239
- const se = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
240
- W,
246
+ ne.displayName = "SidebarFooter";
247
+ const oe = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
248
+ $,
241
249
  {
242
250
  ref: e,
243
251
  "data-sidebar": "separator",
244
- className: l("mx-2 w-auto bg-sidebar-border", a),
252
+ className: l("mx-2 w-auto bg-sidebar-border", t),
245
253
  ...r
246
254
  }
247
255
  ));
248
- se.displayName = "SidebarSeparator";
249
- const de = i.forwardRef(({ className: a, routes: r, activeValue: e, isActive: o, onNavigate: n, asLinks: s = !1, children: c, ...u }, f) => {
250
- const v = r ? /* @__PURE__ */ t(D, { children: r.map((d) => {
251
- const p = !!d.children, g = e === d.value || p && d.children?.some((b) => b.value === e);
252
- return /* @__PURE__ */ h(
253
- p ? E : R,
256
+ oe.displayName = "SidebarSeparator";
257
+ const se = i.forwardRef(
258
+ ({
259
+ className: t,
260
+ routes: r,
261
+ activeValue: e,
262
+ isActive: o,
263
+ onNavigate: n,
264
+ asLinks: s = !1,
265
+ children: c,
266
+ ...u
267
+ }, f) => {
268
+ const m = r ? /* @__PURE__ */ a(O, { children: r.map((d) => {
269
+ const p = !!d.children, h = e === d.value || p && d.children?.some((b) => b.value === e);
270
+ return /* @__PURE__ */ g(p ? D : R, { isActive: h, children: [
271
+ /* @__PURE__ */ a(
272
+ k,
273
+ {
274
+ asChild: s,
275
+ isActive: h,
276
+ tooltip: d.label,
277
+ onClick: () => {
278
+ !s && !p && !d.disabled && n?.(d.value);
279
+ },
280
+ disabled: d.disabled,
281
+ children: s ? /* @__PURE__ */ g(
282
+ "a",
283
+ {
284
+ href: d.url,
285
+ "aria-disabled": d.disabled,
286
+ className: d.disabled ? "pointer-events-none" : "",
287
+ onClick: (b) => {
288
+ if (d.disabled) {
289
+ b.preventDefault();
290
+ return;
291
+ }
292
+ if (p) {
293
+ b.preventDefault();
294
+ return;
295
+ }
296
+ b.preventDefault(), n?.(d.value);
297
+ },
298
+ children: [
299
+ d.icon,
300
+ /* @__PURE__ */ a("span", { children: d.label })
301
+ ]
302
+ }
303
+ ) : /* @__PURE__ */ g(C, { children: [
304
+ d.icon,
305
+ /* @__PURE__ */ a("span", { children: d.label })
306
+ ] })
307
+ }
308
+ ),
309
+ p && d.children && /* @__PURE__ */ a(E, { children: d.children.map((b) => /* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(
310
+ G,
311
+ {
312
+ asChild: s,
313
+ isActive: e === b.value,
314
+ href: s ? b.url : void 0,
315
+ onClick: s ? (w) => {
316
+ w.preventDefault(), n?.(b.value);
317
+ } : () => n?.(b.value),
318
+ children: /* @__PURE__ */ a("span", { children: b.label })
319
+ }
320
+ ) }, b.value)) })
321
+ ] }, d.value);
322
+ }) }) : c;
323
+ return /* @__PURE__ */ a(
324
+ "div",
254
325
  {
255
- isActive: g,
256
- children: [
257
- /* @__PURE__ */ t(
258
- k,
259
- {
260
- asChild: s,
261
- isActive: g,
262
- tooltip: d.label,
263
- onClick: () => {
264
- !s && !p && !d.disabled && n?.(d.value);
265
- },
266
- disabled: d.disabled,
267
- children: s ? /* @__PURE__ */ h(
268
- "a",
269
- {
270
- href: d.url,
271
- "aria-disabled": d.disabled,
272
- className: d.disabled ? "pointer-events-none" : "",
273
- onClick: (b) => {
274
- if (d.disabled) {
275
- b.preventDefault();
276
- return;
277
- }
278
- if (p) {
279
- b.preventDefault();
280
- return;
281
- }
282
- b.preventDefault(), n?.(d.value);
283
- },
284
- children: [
285
- d.icon,
286
- /* @__PURE__ */ t("span", { children: d.label })
287
- ]
288
- }
289
- ) : /* @__PURE__ */ h(M, { children: [
290
- d.icon,
291
- /* @__PURE__ */ t("span", { children: d.label })
292
- ] })
293
- }
294
- ),
295
- p && d.children && /* @__PURE__ */ t(O, { children: d.children.map((b) => /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(
296
- L,
297
- {
298
- asChild: s,
299
- isActive: e === b.value,
300
- href: s ? b.url : void 0,
301
- onClick: s ? (S) => {
302
- S.preventDefault(), n?.(b.value);
303
- } : () => n?.(b.value),
304
- children: /* @__PURE__ */ t("span", { children: b.label })
305
- }
306
- ) }, b.value)) })
307
- ]
308
- },
309
- d.value
326
+ ref: f,
327
+ "data-sidebar": "content",
328
+ className: l(
329
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden group-data-[collapsible=icon]:overflow-hidden",
330
+ t
331
+ ),
332
+ ...u,
333
+ children: m
334
+ }
310
335
  );
311
- }) }) : c;
312
- return /* @__PURE__ */ t(
313
- "div",
314
- {
315
- ref: f,
316
- "data-sidebar": "content",
317
- className: l(
318
- "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden group-data-[collapsible=icon]:overflow-hidden",
319
- a
320
- ),
321
- ...u,
322
- children: v
323
- }
324
- );
325
- });
326
- de.displayName = "SidebarContent";
327
- const le = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
336
+ }
337
+ );
338
+ se.displayName = "SidebarContent";
339
+ const de = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
328
340
  "div",
329
341
  {
330
342
  ref: e,
331
343
  "data-sidebar": "group",
332
- className: l("relative flex w-full min-w-0 flex-col py-2 group-data-[state=collapsed]:px-0", a),
344
+ className: l(
345
+ "relative flex w-full min-w-0 flex-col py-2 group-data-[state=collapsed]:px-0",
346
+ t
347
+ ),
333
348
  ...r
334
349
  }
335
350
  ));
336
- le.displayName = "SidebarGroup";
337
- const ce = i.forwardRef(({ className: a, asChild: r = !1, ...e }, o) => /* @__PURE__ */ t(
338
- r ? C : "div",
351
+ de.displayName = "SidebarGroup";
352
+ const le = i.forwardRef(({ className: t, asChild: r = !1, ...e }, o) => /* @__PURE__ */ a(
353
+ r ? N : "div",
339
354
  {
340
355
  ref: o,
341
356
  "data-sidebar": "group-label",
342
357
  className: l(
343
358
  "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
344
359
  "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
345
- a
360
+ t
346
361
  ),
347
362
  ...e
348
363
  }
349
364
  ));
350
- ce.displayName = "SidebarGroupLabel";
351
- const be = i.forwardRef(({ className: a, asChild: r = !1, ...e }, o) => /* @__PURE__ */ t(
352
- r ? C : "button",
365
+ le.displayName = "SidebarGroupLabel";
366
+ const ce = i.forwardRef(({ className: t, asChild: r = !1, ...e }, o) => /* @__PURE__ */ a(
367
+ r ? N : "button",
353
368
  {
354
369
  ref: o,
355
370
  "data-sidebar": "group-action",
@@ -358,48 +373,51 @@ const be = i.forwardRef(({ className: a, asChild: r = !1, ...e }, o) => /* @__PU
358
373
  // Increases the hit area of the button on mobile.
359
374
  "after:absolute after:-inset-2 after:md:hidden",
360
375
  "group-data-[collapsible=icon]:hidden",
361
- a
376
+ t
362
377
  ),
363
378
  ...e
364
379
  }
365
380
  ));
366
- be.displayName = "SidebarGroupAction";
367
- const ue = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
381
+ ce.displayName = "SidebarGroupAction";
382
+ const be = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
368
383
  "div",
369
384
  {
370
385
  ref: e,
371
386
  "data-sidebar": "group-content",
372
- className: l("w-full text-sm", a),
387
+ className: l("w-full text-sm", t),
373
388
  ...r
374
389
  }
375
390
  ));
376
- ue.displayName = "SidebarGroupContent";
377
- const D = i.forwardRef(({ className: a, children: r, ...e }, o) => {
378
- const { t: n } = N(), { autoHideAfter: s } = y(), [c, u] = i.useState(!1), f = i.Children.toArray(r), v = n("sidebar.viewMore"), d = n("sidebar.viewLess");
379
- return /* @__PURE__ */ t(
391
+ be.displayName = "SidebarGroupContent";
392
+ const O = i.forwardRef(({ className: t, children: r, ...e }, o) => {
393
+ const { t: n } = y(), { autoHideAfter: s } = S(), [c, u] = i.useState(!1), f = i.Children.toArray(r), m = n("sidebar.viewMore"), d = n("sidebar.viewLess");
394
+ return /* @__PURE__ */ a(
380
395
  "ul",
381
396
  {
382
397
  ref: o,
383
398
  "data-sidebar": "menu",
384
- className: l("flex w-full min-w-0 flex-col gap-1", a),
399
+ className: l("flex w-full min-w-0 flex-col gap-1", t),
385
400
  ...e,
386
- children: !s || f.length <= s + 1 ? r : /* @__PURE__ */ h(M, { children: [
401
+ children: !s || f.length <= s + 1 ? r : /* @__PURE__ */ g(C, { children: [
387
402
  f.slice(0, s),
388
- /* @__PURE__ */ t(R, { children: /* @__PURE__ */ h(
403
+ /* @__PURE__ */ a(R, { children: /* @__PURE__ */ g(
389
404
  k,
390
405
  {
391
406
  onClick: () => u(!c),
392
407
  className: "hover:bg-transparent",
393
- tooltip: c ? d : v,
408
+ tooltip: c ? d : m,
394
409
  children: [
395
- /* @__PURE__ */ t("div", { className: "text-[#3bb273]", children: /* @__PURE__ */ t(
410
+ /* @__PURE__ */ a("div", { className: "text-[#3bb273]", children: /* @__PURE__ */ a(
396
411
  A,
397
412
  {
398
413
  size: "lg",
399
- className: l("transition-transform duration-200", c ? "-rotate-90" : "rotate-90")
414
+ className: l(
415
+ "transition-transform duration-200",
416
+ c ? "-rotate-90" : "rotate-90"
417
+ )
400
418
  }
401
419
  ) }),
402
- /* @__PURE__ */ t("span", { children: c ? d : v })
420
+ /* @__PURE__ */ a("span", { children: c ? d : m })
403
421
  ]
404
422
  }
405
423
  ) }),
@@ -408,37 +426,48 @@ const D = i.forwardRef(({ className: a, children: r, ...e }, o) => {
408
426
  }
409
427
  );
410
428
  });
411
- D.displayName = "SidebarMenu";
412
- const R = i.forwardRef(({ className: a, isActive: r, ...e }, o) => /* @__PURE__ */ t(
429
+ O.displayName = "SidebarMenu";
430
+ const R = i.forwardRef(({ className: t, isActive: r, ...e }, o) => /* @__PURE__ */ a(
413
431
  "li",
414
432
  {
415
433
  ref: o,
416
434
  "data-sidebar": "menu-item",
417
- className: l("group/menu-item relative", a),
435
+ className: l("group/menu-item relative", t),
418
436
  ...e
419
437
  }
420
438
  ));
421
439
  R.displayName = "SidebarMenuItem";
422
- const E = i.forwardRef(({ children: a, isActive: r, defaultOpen: e, open: o, onOpenChange: n, ...s }, c) => {
423
- const { state: u } = y(), [f, v] = i.useState(e ?? !1), d = o !== void 0 ? o : f, p = (g) => {
424
- o === void 0 && v(g), n?.(g);
425
- };
426
- return i.useEffect(() => {
427
- u === "expanded" && r && !d && p(!0);
428
- }, [u, r]), /* @__PURE__ */ t(_.Provider, { value: { isCollapsible: !0 }, children: /* @__PURE__ */ t(
429
- z.Root,
430
- {
431
- ref: c,
432
- asChild: !0,
433
- open: d,
434
- onOpenChange: p,
435
- ...s,
436
- children: /* @__PURE__ */ t(R, { children: a })
437
- }
438
- ) });
439
- });
440
- E.displayName = "SidebarMenuCollapsible";
441
- const pe = G(
440
+ const D = i.forwardRef(
441
+ ({
442
+ children: t,
443
+ isActive: r,
444
+ defaultOpen: e,
445
+ open: o,
446
+ onOpenChange: n,
447
+ ...s
448
+ }, c) => {
449
+ const { state: u } = S(), [f, m] = i.useState(
450
+ e ?? !1
451
+ ), d = o !== void 0 ? o : f, p = (h) => {
452
+ o === void 0 && m(h), n?.(h);
453
+ };
454
+ return i.useEffect(() => {
455
+ u === "expanded" && r && !d && p(!0);
456
+ }, [u, r]), /* @__PURE__ */ a(I.Provider, { value: { isCollapsible: !0 }, children: /* @__PURE__ */ a(
457
+ z.Root,
458
+ {
459
+ ref: c,
460
+ asChild: !0,
461
+ open: d,
462
+ onOpenChange: p,
463
+ ...s,
464
+ children: /* @__PURE__ */ a(R, { children: t })
465
+ }
466
+ ) });
467
+ }
468
+ );
469
+ D.displayName = "SidebarMenuCollapsible";
470
+ const ue = H(
442
471
  "peer/menu-button flex w-full items-center gap-[22px] overflow-hidden py-[14px] px-[22px] text-left text-[14px] outline-none ring-sidebar-ring transition-[width,height,padding,background-color] hover:bg-[#1f2b4d] hover:text-sidebar-accent-foreground focus-visible:ring-2 disabled:pointer-events-none disabled:text-[#7a8294] group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:text-[#7a8294] aria-disabled:opacity-50 hover:aria-disabled:bg-transparent data-[active=true]:bg-[#1f2b4d] data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground cursor-pointer group-data-[state=collapsed]:!w-[var(--sidebar-width-icon)] group-data-[state=collapsed]:!h-12 group-data-[state=collapsed]:!p-0 group-data-[state=collapsed]:!pl-[22px] [&>span:last-child]:truncate [&>svg]:size-5 [&>img]:size-5 [&>svg]:shrink-0 [&>svg]:text-inherit group-data-[state=collapsed]:[&>span]:hidden group-data-[state=collapsed]:[&>svg:not(:first-of-type)]:hidden [&>[data-sidebar=menu-button-chevron]]:ml-auto [&>[data-sidebar=menu-button-chevron]]:size-4 [&>[data-sidebar=menu-button-chevron]]:transition-transform [&>[data-sidebar=menu-button-chevron]]:duration-200 [&>[data-sidebar=menu-button-chevron]]:rotate-90 data-[state=open]:[&>[data-sidebar=menu-button-chevron]]:rotate-[270deg] before:absolute before:left-0 before:top-0 before:w-1 before:bg-[#3bb273] before:rounded-r-[4px] before:transition-[height] before:duration-200 before:linear before:z-20 data-[active=false]:before:h-0 data-[active=true]:before:h-full",
443
472
  {
444
473
  variants: {
@@ -459,7 +488,7 @@ const pe = G(
459
488
  }
460
489
  ), k = i.forwardRef(
461
490
  ({
462
- asChild: a = !1,
491
+ asChild: t = !1,
463
492
  isActive: r = !1,
464
493
  variant: e = "default",
465
494
  size: o = "default",
@@ -468,30 +497,34 @@ const pe = G(
468
497
  children: c,
469
498
  ...u
470
499
  }, f) => {
471
- const v = a ? C : "button", { state: d, setOpen: p } = y(), x = !!i.useContext(_)?.isCollapsible, b = /* @__PURE__ */ t(
472
- v,
500
+ const m = t ? N : "button", { state: d, setOpen: p } = S(), x = !!i.useContext(I)?.isCollapsible, b = /* @__PURE__ */ a(
501
+ m,
473
502
  {
474
503
  ref: f,
475
504
  "data-sidebar": "menu-button",
476
505
  "data-size": o,
477
506
  "data-active": r,
478
- className: l("relative", pe({ variant: e, size: o }), s),
507
+ className: l(
508
+ "relative",
509
+ ue({ variant: e, size: o }),
510
+ s
511
+ ),
479
512
  ...u,
480
- onClick: (m) => {
481
- d === "collapsed" && x && (p(!0), r && (m.preventDefault(), m.stopPropagation())), u.onClick?.(m);
513
+ onClick: (v) => {
514
+ d === "collapsed" && x && (p(!0), r && (v.preventDefault(), v.stopPropagation())), u.onClick?.(v);
482
515
  },
483
- children: a ? c : /* @__PURE__ */ h(M, { children: [
516
+ children: t ? c : /* @__PURE__ */ g(C, { children: [
484
517
  c,
485
- x && /* @__PURE__ */ t(A, { "data-sidebar": "menu-button-chevron" })
518
+ x && /* @__PURE__ */ a(A, { "data-sidebar": "menu-button-chevron" })
486
519
  ] })
487
520
  }
488
- ), S = x ? /* @__PURE__ */ t(z.Trigger, { asChild: !0, children: b }) : b;
521
+ ), w = x ? /* @__PURE__ */ a(z.Trigger, { asChild: !0, children: b }) : b;
489
522
  return n ? (typeof n == "string" && (n = {
490
523
  children: n
491
- }), /* @__PURE__ */ h($, { children: [
492
- /* @__PURE__ */ t(F, { asChild: !0, children: S }),
493
- /* @__PURE__ */ t(
494
- q,
524
+ }), /* @__PURE__ */ g(F, { children: [
525
+ /* @__PURE__ */ a(q, { asChild: !0, children: w }),
526
+ /* @__PURE__ */ a(
527
+ K,
495
528
  {
496
529
  side: "right",
497
530
  align: "center",
@@ -500,21 +533,24 @@ const pe = G(
500
533
  ...n
501
534
  }
502
535
  )
503
- ] })) : S;
536
+ ] })) : w;
504
537
  }
505
538
  );
506
539
  k.displayName = "SidebarMenuButton";
507
- const fe = i.forwardRef(({ className: a, isActive: r, ...e }, o) => {
508
- const { t: n } = N(), s = n("sidebar.logout");
509
- return /* @__PURE__ */ h(
540
+ const pe = i.forwardRef(({ className: t, isActive: r, ...e }, o) => {
541
+ const { t: n } = y(), s = n("sidebar.logout");
542
+ return /* @__PURE__ */ g(
510
543
  k,
511
544
  {
512
545
  ref: o,
513
- className: l("text-[#3bb273] hover:text-[#3bb273] hover:bg-[#30416e]", a),
546
+ className: l(
547
+ "text-[#3bb273] hover:text-[#3bb273] hover:bg-[#30416e]",
548
+ t
549
+ ),
514
550
  "aria-label": s,
515
551
  ...e,
516
552
  children: [
517
- /* @__PURE__ */ t(
553
+ /* @__PURE__ */ a(
518
554
  "svg",
519
555
  {
520
556
  width: "20",
@@ -522,7 +558,7 @@ const fe = i.forwardRef(({ className: a, isActive: r, ...e }, o) => {
522
558
  viewBox: "0 0 24 24",
523
559
  fill: "none",
524
560
  xmlns: "http://www.w3.org/2000/svg",
525
- children: /* @__PURE__ */ t(
561
+ children: /* @__PURE__ */ a(
526
562
  "path",
527
563
  {
528
564
  d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9",
@@ -534,14 +570,14 @@ const fe = i.forwardRef(({ className: a, isActive: r, ...e }, o) => {
534
570
  )
535
571
  }
536
572
  ),
537
- /* @__PURE__ */ t("span", { children: s })
573
+ /* @__PURE__ */ a("span", { children: s })
538
574
  ]
539
575
  }
540
576
  );
541
577
  });
542
- fe.displayName = "SidebarLogout";
543
- const me = i.forwardRef(({ className: a, asChild: r = !1, showOnHover: e = !1, ...o }, n) => /* @__PURE__ */ t(
544
- r ? C : "button",
578
+ pe.displayName = "SidebarLogout";
579
+ const fe = i.forwardRef(({ className: t, asChild: r = !1, showOnHover: e = !1, ...o }, n) => /* @__PURE__ */ a(
580
+ r ? N : "button",
545
581
  {
546
582
  ref: n,
547
583
  "data-sidebar": "menu-action",
@@ -554,13 +590,13 @@ const me = i.forwardRef(({ className: a, asChild: r = !1, showOnHover: e = !1, .
554
590
  "peer-data-[size=lg]/menu-button:top-2.5",
555
591
  "group-data-[collapsible=icon]:hidden",
556
592
  e && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
557
- a
593
+ t
558
594
  ),
559
595
  ...o
560
596
  }
561
597
  ));
562
- me.displayName = "SidebarMenuAction";
563
- const ge = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
598
+ fe.displayName = "SidebarMenuAction";
599
+ const me = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
564
600
  "div",
565
601
  {
566
602
  ref: e,
@@ -572,31 +608,31 @@ const ge = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
572
608
  "peer-data-[size=default]/menu-button:top-1.5",
573
609
  "peer-data-[size=lg]/menu-button:top-2.5",
574
610
  "group-data-[collapsible=icon]:hidden",
575
- a
611
+ t
576
612
  ),
577
613
  ...r
578
614
  }
579
615
  ));
580
- ge.displayName = "SidebarMenuBadge";
581
- const he = i.forwardRef(({ className: a, showIcon: r = !1, ...e }, o) => {
616
+ me.displayName = "SidebarMenuBadge";
617
+ const ge = i.forwardRef(({ className: t, showIcon: r = !1, ...e }, o) => {
582
618
  const n = i.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
583
- return /* @__PURE__ */ h(
619
+ return /* @__PURE__ */ g(
584
620
  "div",
585
621
  {
586
622
  ref: o,
587
623
  "data-sidebar": "menu-skeleton",
588
- className: l("flex h-8 items-center gap-2 rounded-md px-2", a),
624
+ className: l("flex h-8 items-center gap-2 rounded-md px-2", t),
589
625
  ...e,
590
626
  children: [
591
- r && /* @__PURE__ */ t(
592
- I,
627
+ r && /* @__PURE__ */ a(
628
+ _,
593
629
  {
594
630
  className: "size-4 rounded-md",
595
631
  "data-sidebar": "menu-skeleton-icon"
596
632
  }
597
633
  ),
598
- /* @__PURE__ */ t(
599
- I,
634
+ /* @__PURE__ */ a(
635
+ _,
600
636
  {
601
637
  className: "h-4 max-w-[--skeleton-width] flex-1",
602
638
  "data-sidebar": "menu-skeleton-text",
@@ -609,9 +645,9 @@ const he = i.forwardRef(({ className: a, showIcon: r = !1, ...e }, o) => {
609
645
  }
610
646
  );
611
647
  });
612
- he.displayName = "SidebarMenuSkeleton";
613
- const O = i.forwardRef(({ className: a, ...r }, e) => {
614
- const n = !!i.useContext(_)?.isCollapsible, s = /* @__PURE__ */ t(
648
+ ge.displayName = "SidebarMenuSkeleton";
649
+ const E = i.forwardRef(({ className: t, ...r }, e) => {
650
+ const n = !!i.useContext(I)?.isCollapsible, s = /* @__PURE__ */ a(
615
651
  "ul",
616
652
  {
617
653
  ref: e,
@@ -619,26 +655,26 @@ const O = i.forwardRef(({ className: a, ...r }, e) => {
619
655
  className: l(
620
656
  "relative ml-8 mt-2 mb-2 flex min-w-0 flex-col gap-0 py-0",
621
657
  "group-data-[state=collapsed]:hidden",
622
- a
658
+ t
623
659
  ),
624
660
  ...r
625
661
  }
626
662
  );
627
- return n ? /* @__PURE__ */ t(z.Content, { className: "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down", children: s }) : s;
663
+ return n ? /* @__PURE__ */ a(z.Content, { className: "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down", children: s }) : s;
628
664
  });
629
- O.displayName = "SidebarMenuSub";
630
- const T = i.forwardRef(({ className: a, isActive: r, ...e }, o) => /* @__PURE__ */ t(
665
+ E.displayName = "SidebarMenuSub";
666
+ const T = i.forwardRef(({ className: t, isActive: r, ...e }, o) => /* @__PURE__ */ a(
631
667
  "li",
632
668
  {
633
669
  ref: o,
634
670
  "data-sidebar": "menu-sub-item",
635
- className: l("group/menu-sub-item relative", a),
671
+ className: l("group/menu-sub-item relative", t),
636
672
  ...e
637
673
  }
638
674
  ));
639
675
  T.displayName = "SidebarMenuSubItem";
640
- const L = i.forwardRef(({ asChild: a = !1, size: r = "md", isActive: e, className: o, ...n }, s) => /* @__PURE__ */ t(
641
- a ? C : "a",
676
+ const G = i.forwardRef(({ asChild: t = !1, size: r = "md", isActive: e, className: o, ...n }, s) => /* @__PURE__ */ a(
677
+ t ? N : "a",
642
678
  {
643
679
  ref: s,
644
680
  "data-sidebar": "menu-sub-button",
@@ -657,32 +693,32 @@ const L = i.forwardRef(({ asChild: a = !1, size: r = "md", isActive: e, classNam
657
693
  children: n.children
658
694
  }
659
695
  ));
660
- L.displayName = "SidebarMenuSubButton";
696
+ G.displayName = "SidebarMenuSubButton";
661
697
  export {
662
- ee as Sidebar,
663
- de as SidebarContent,
664
- oe as SidebarFooter,
665
- le as SidebarGroup,
666
- be as SidebarGroupAction,
667
- ue as SidebarGroupContent,
668
- ce as SidebarGroupLabel,
669
- ne as SidebarHeader,
670
- ie as SidebarInput,
671
- re as SidebarInset,
672
- fe as SidebarLogout,
673
- D as SidebarMenu,
674
- me as SidebarMenuAction,
675
- ge as SidebarMenuBadge,
698
+ Z as Sidebar,
699
+ se as SidebarContent,
700
+ ne as SidebarFooter,
701
+ de as SidebarGroup,
702
+ ce as SidebarGroupAction,
703
+ be as SidebarGroupContent,
704
+ le as SidebarGroupLabel,
705
+ ie as SidebarHeader,
706
+ re as SidebarInput,
707
+ te as SidebarInset,
708
+ pe as SidebarLogout,
709
+ O as SidebarMenu,
710
+ fe as SidebarMenuAction,
711
+ me as SidebarMenuBadge,
676
712
  k as SidebarMenuButton,
677
- E as SidebarMenuCollapsible,
713
+ D as SidebarMenuCollapsible,
678
714
  R as SidebarMenuItem,
679
- he as SidebarMenuSkeleton,
680
- O as SidebarMenuSub,
681
- L as SidebarMenuSubButton,
715
+ ge as SidebarMenuSkeleton,
716
+ E as SidebarMenuSub,
717
+ G as SidebarMenuSubButton,
682
718
  T as SidebarMenuSubItem,
683
- Z as SidebarProvider,
684
- te as SidebarRail,
685
- se as SidebarSeparator,
686
- ae as SidebarTrigger,
687
- y as useSidebar
719
+ Y as SidebarProvider,
720
+ ae as SidebarRail,
721
+ oe as SidebarSeparator,
722
+ ee as SidebarTrigger,
723
+ S as useSidebar
688
724
  };