impact-nova 1.5.13 → 1.5.14
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.
- package/dist/components/ui/calendar.js +2 -3
- package/dist/components/ui/command-palette/command-palette.d.ts +5 -2
- package/dist/components/ui/command-palette/command-palette.js +242 -225
- package/dist/components/ui/command-palette/shortcut-settings.js +69 -58
- package/dist/components/ui/sidebar.js +145 -152
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as k } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import * as z from "@radix-ui/react-collapsible";
|
|
4
4
|
import { Slot as C } from "@radix-ui/react-slot";
|
|
5
|
-
import { cva as
|
|
6
|
-
import { ChevronRight as A, HamburgerClosed as
|
|
5
|
+
import { cva as H } from "class-variance-authority";
|
|
6
|
+
import { ChevronRight as A, HamburgerClosed as L, HamburgerOpen as j } from "../../icons/index.js";
|
|
7
7
|
import { cn as l } from "../../lib/utils.js";
|
|
8
|
-
import { Button as
|
|
9
|
-
import { Input as
|
|
10
|
-
import { Separator as
|
|
11
|
-
import { Skeleton as
|
|
12
|
-
import { Tooltip as
|
|
8
|
+
import { Button as P } 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
13
|
import { useImpactNovaI18n as N } from "../../i18n/ImpactNovaI18nContext.js";
|
|
14
|
-
const
|
|
15
|
-
function
|
|
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
16
|
const a = i.useContext(B);
|
|
17
17
|
if (!a)
|
|
18
18
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
19
19
|
return a;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const Y = i.forwardRef(
|
|
22
22
|
({
|
|
23
23
|
defaultOpen: a = !1,
|
|
24
24
|
open: r,
|
|
@@ -29,37 +29,30 @@ const Z = i.forwardRef(
|
|
|
29
29
|
autoHideAfter: c,
|
|
30
30
|
...u
|
|
31
31
|
}, f) => {
|
|
32
|
-
const [
|
|
33
|
-
(
|
|
34
|
-
const
|
|
35
|
-
e ? e(
|
|
32
|
+
const [h, d] = i.useState(a), p = r ?? h, m = 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
|
-
|
|
40
|
-
}, [
|
|
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
|
+
m((v) => !v);
|
|
40
|
+
}, [m]), b = p ? "expanded" : "collapsed", w = i.useMemo(
|
|
48
41
|
() => ({
|
|
49
42
|
state: b,
|
|
50
43
|
open: p,
|
|
51
|
-
setOpen:
|
|
44
|
+
setOpen: m,
|
|
52
45
|
toggleSidebar: x,
|
|
53
46
|
autoHideAfter: c
|
|
54
47
|
}),
|
|
55
|
-
[b, p,
|
|
48
|
+
[b, p, m, x, c]
|
|
56
49
|
);
|
|
57
|
-
return /* @__PURE__ */ t(B.Provider, { value:
|
|
50
|
+
return /* @__PURE__ */ t(B.Provider, { value: w, children: /* @__PURE__ */ t(V, { children: /* @__PURE__ */ t(
|
|
58
51
|
"div",
|
|
59
52
|
{
|
|
60
53
|
style: {
|
|
61
|
-
"--sidebar-width":
|
|
62
|
-
"--sidebar-width-icon":
|
|
54
|
+
"--sidebar-width": Q,
|
|
55
|
+
"--sidebar-width-icon": U,
|
|
63
56
|
...n
|
|
64
57
|
},
|
|
65
58
|
className: l(
|
|
@@ -73,8 +66,8 @@ const Z = i.forwardRef(
|
|
|
73
66
|
) }) });
|
|
74
67
|
}
|
|
75
68
|
);
|
|
76
|
-
|
|
77
|
-
const
|
|
69
|
+
Y.displayName = "SidebarProvider";
|
|
70
|
+
const Z = i.forwardRef(
|
|
78
71
|
({
|
|
79
72
|
side: a = "left",
|
|
80
73
|
variant: r = "sidebar",
|
|
@@ -83,7 +76,7 @@ const ee = i.forwardRef(
|
|
|
83
76
|
children: n,
|
|
84
77
|
...s
|
|
85
78
|
}, c) => {
|
|
86
|
-
const { state: u } =
|
|
79
|
+
const { state: u } = S();
|
|
87
80
|
return e === "none" ? /* @__PURE__ */ t(
|
|
88
81
|
"div",
|
|
89
82
|
{
|
|
@@ -95,7 +88,7 @@ const ee = i.forwardRef(
|
|
|
95
88
|
...s,
|
|
96
89
|
children: n
|
|
97
90
|
}
|
|
98
|
-
) : /* @__PURE__ */
|
|
91
|
+
) : /* @__PURE__ */ g(
|
|
99
92
|
"div",
|
|
100
93
|
{
|
|
101
94
|
ref: c,
|
|
@@ -138,11 +131,11 @@ const ee = i.forwardRef(
|
|
|
138
131
|
);
|
|
139
132
|
}
|
|
140
133
|
);
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
const { t: n } = N(), { toggleSidebar: s, state: c } =
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
|
|
134
|
+
Z.displayName = "Sidebar";
|
|
135
|
+
const ee = i.forwardRef(({ className: a, onClick: r, ...e }, o) => {
|
|
136
|
+
const { t: n } = N(), { toggleSidebar: s, state: c } = S(), u = n("aria.toggleSidebar");
|
|
137
|
+
return /* @__PURE__ */ g(
|
|
138
|
+
P,
|
|
146
139
|
{
|
|
147
140
|
ref: o,
|
|
148
141
|
"data-sidebar": "trigger",
|
|
@@ -155,15 +148,15 @@ const ae = i.forwardRef(({ className: a, onClick: r, ...e }, o) => {
|
|
|
155
148
|
"aria-label": u,
|
|
156
149
|
...e,
|
|
157
150
|
children: [
|
|
158
|
-
c === "expanded" ? /* @__PURE__ */ t(
|
|
151
|
+
c === "expanded" ? /* @__PURE__ */ t(L, { size: "3xl" }) : /* @__PURE__ */ t(j, { size: "3xl" }),
|
|
159
152
|
/* @__PURE__ */ t("span", { className: "sr-only", children: u })
|
|
160
153
|
]
|
|
161
154
|
}
|
|
162
155
|
);
|
|
163
156
|
});
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
const { t: o } = N(), { toggleSidebar: n } =
|
|
157
|
+
ee.displayName = "SidebarTrigger";
|
|
158
|
+
const ae = i.forwardRef(({ className: a, ...r }, e) => {
|
|
159
|
+
const { t: o } = N(), { toggleSidebar: n } = S(), s = o("aria.toggleSidebar");
|
|
167
160
|
return /* @__PURE__ */ t(
|
|
168
161
|
"button",
|
|
169
162
|
{
|
|
@@ -186,8 +179,8 @@ const te = i.forwardRef(({ className: a, ...r }, e) => {
|
|
|
186
179
|
}
|
|
187
180
|
);
|
|
188
181
|
});
|
|
189
|
-
|
|
190
|
-
const
|
|
182
|
+
ae.displayName = "SidebarRail";
|
|
183
|
+
const te = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
191
184
|
"div",
|
|
192
185
|
{
|
|
193
186
|
ref: e,
|
|
@@ -199,9 +192,9 @@ const re = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
|
199
192
|
...r
|
|
200
193
|
}
|
|
201
194
|
));
|
|
202
|
-
|
|
203
|
-
const
|
|
204
|
-
|
|
195
|
+
te.displayName = "SidebarInset";
|
|
196
|
+
const re = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
197
|
+
W,
|
|
205
198
|
{
|
|
206
199
|
ref: e,
|
|
207
200
|
"data-sidebar": "input",
|
|
@@ -212,8 +205,8 @@ const ie = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
|
212
205
|
...r
|
|
213
206
|
}
|
|
214
207
|
));
|
|
215
|
-
|
|
216
|
-
const
|
|
208
|
+
re.displayName = "SidebarInput";
|
|
209
|
+
const ie = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
217
210
|
"div",
|
|
218
211
|
{
|
|
219
212
|
ref: e,
|
|
@@ -225,8 +218,8 @@ const ne = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
|
225
218
|
...r
|
|
226
219
|
}
|
|
227
220
|
));
|
|
228
|
-
|
|
229
|
-
const
|
|
221
|
+
ie.displayName = "SidebarHeader";
|
|
222
|
+
const ne = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
230
223
|
"div",
|
|
231
224
|
{
|
|
232
225
|
ref: e,
|
|
@@ -235,9 +228,9 @@ const oe = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
|
235
228
|
...r
|
|
236
229
|
}
|
|
237
230
|
));
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
|
|
231
|
+
ne.displayName = "SidebarFooter";
|
|
232
|
+
const oe = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
233
|
+
$,
|
|
241
234
|
{
|
|
242
235
|
ref: e,
|
|
243
236
|
"data-sidebar": "separator",
|
|
@@ -245,26 +238,26 @@ const se = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
|
245
238
|
...r
|
|
246
239
|
}
|
|
247
240
|
));
|
|
248
|
-
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
const p = !!d.children,
|
|
252
|
-
return /* @__PURE__ */
|
|
253
|
-
p ?
|
|
241
|
+
oe.displayName = "SidebarSeparator";
|
|
242
|
+
const se = i.forwardRef(({ className: a, routes: r, activeValue: e, isActive: o, onNavigate: n, asLinks: s = !1, children: c, ...u }, f) => {
|
|
243
|
+
const h = r ? /* @__PURE__ */ t(O, { children: r.map((d) => {
|
|
244
|
+
const p = !!d.children, m = e === d.value || p && d.children?.some((b) => b.value === e);
|
|
245
|
+
return /* @__PURE__ */ g(
|
|
246
|
+
p ? D : y,
|
|
254
247
|
{
|
|
255
|
-
isActive:
|
|
248
|
+
isActive: m,
|
|
256
249
|
children: [
|
|
257
250
|
/* @__PURE__ */ t(
|
|
258
|
-
|
|
251
|
+
R,
|
|
259
252
|
{
|
|
260
253
|
asChild: s,
|
|
261
|
-
isActive:
|
|
254
|
+
isActive: m,
|
|
262
255
|
tooltip: d.label,
|
|
263
256
|
onClick: () => {
|
|
264
257
|
!s && !p && !d.disabled && n?.(d.value);
|
|
265
258
|
},
|
|
266
259
|
disabled: d.disabled,
|
|
267
|
-
children: s ? /* @__PURE__ */
|
|
260
|
+
children: s ? /* @__PURE__ */ g(
|
|
268
261
|
"a",
|
|
269
262
|
{
|
|
270
263
|
href: d.url,
|
|
@@ -286,20 +279,20 @@ const de = i.forwardRef(({ className: a, routes: r, activeValue: e, isActive: o,
|
|
|
286
279
|
/* @__PURE__ */ t("span", { children: d.label })
|
|
287
280
|
]
|
|
288
281
|
}
|
|
289
|
-
) : /* @__PURE__ */
|
|
282
|
+
) : /* @__PURE__ */ g(k, { children: [
|
|
290
283
|
d.icon,
|
|
291
284
|
/* @__PURE__ */ t("span", { children: d.label })
|
|
292
285
|
] })
|
|
293
286
|
}
|
|
294
287
|
),
|
|
295
|
-
p && d.children && /* @__PURE__ */ t(
|
|
296
|
-
|
|
288
|
+
p && d.children && /* @__PURE__ */ t(E, { children: d.children.map((b) => /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(
|
|
289
|
+
G,
|
|
297
290
|
{
|
|
298
291
|
asChild: s,
|
|
299
292
|
isActive: e === b.value,
|
|
300
293
|
href: s ? b.url : void 0,
|
|
301
|
-
onClick: s ? (
|
|
302
|
-
|
|
294
|
+
onClick: s ? (w) => {
|
|
295
|
+
w.preventDefault(), n?.(b.value);
|
|
303
296
|
} : () => n?.(b.value),
|
|
304
297
|
children: /* @__PURE__ */ t("span", { children: b.label })
|
|
305
298
|
}
|
|
@@ -319,12 +312,12 @@ const de = i.forwardRef(({ className: a, routes: r, activeValue: e, isActive: o,
|
|
|
319
312
|
a
|
|
320
313
|
),
|
|
321
314
|
...u,
|
|
322
|
-
children:
|
|
315
|
+
children: h
|
|
323
316
|
}
|
|
324
317
|
);
|
|
325
318
|
});
|
|
326
|
-
|
|
327
|
-
const
|
|
319
|
+
se.displayName = "SidebarContent";
|
|
320
|
+
const de = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
328
321
|
"div",
|
|
329
322
|
{
|
|
330
323
|
ref: e,
|
|
@@ -333,8 +326,8 @@ const le = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
|
333
326
|
...r
|
|
334
327
|
}
|
|
335
328
|
));
|
|
336
|
-
|
|
337
|
-
const
|
|
329
|
+
de.displayName = "SidebarGroup";
|
|
330
|
+
const le = i.forwardRef(({ className: a, asChild: r = !1, ...e }, o) => /* @__PURE__ */ t(
|
|
338
331
|
r ? C : "div",
|
|
339
332
|
{
|
|
340
333
|
ref: o,
|
|
@@ -347,8 +340,8 @@ const ce = i.forwardRef(({ className: a, asChild: r = !1, ...e }, o) => /* @__PU
|
|
|
347
340
|
...e
|
|
348
341
|
}
|
|
349
342
|
));
|
|
350
|
-
|
|
351
|
-
const
|
|
343
|
+
le.displayName = "SidebarGroupLabel";
|
|
344
|
+
const ce = i.forwardRef(({ className: a, asChild: r = !1, ...e }, o) => /* @__PURE__ */ t(
|
|
352
345
|
r ? C : "button",
|
|
353
346
|
{
|
|
354
347
|
ref: o,
|
|
@@ -363,8 +356,8 @@ const be = i.forwardRef(({ className: a, asChild: r = !1, ...e }, o) => /* @__PU
|
|
|
363
356
|
...e
|
|
364
357
|
}
|
|
365
358
|
));
|
|
366
|
-
|
|
367
|
-
const
|
|
359
|
+
ce.displayName = "SidebarGroupAction";
|
|
360
|
+
const be = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
368
361
|
"div",
|
|
369
362
|
{
|
|
370
363
|
ref: e,
|
|
@@ -373,9 +366,9 @@ const ue = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
|
373
366
|
...r
|
|
374
367
|
}
|
|
375
368
|
));
|
|
376
|
-
|
|
377
|
-
const
|
|
378
|
-
const { t: n } = N(), { autoHideAfter: s } =
|
|
369
|
+
be.displayName = "SidebarGroupContent";
|
|
370
|
+
const O = i.forwardRef(({ className: a, children: r, ...e }, o) => {
|
|
371
|
+
const { t: n } = N(), { autoHideAfter: s } = S(), [c, u] = i.useState(!1), f = i.Children.toArray(r), h = n("sidebar.viewMore"), d = n("sidebar.viewLess");
|
|
379
372
|
return /* @__PURE__ */ t(
|
|
380
373
|
"ul",
|
|
381
374
|
{
|
|
@@ -383,14 +376,14 @@ const D = i.forwardRef(({ className: a, children: r, ...e }, o) => {
|
|
|
383
376
|
"data-sidebar": "menu",
|
|
384
377
|
className: l("flex w-full min-w-0 flex-col gap-1", a),
|
|
385
378
|
...e,
|
|
386
|
-
children: !s || f.length <= s + 1 ? r : /* @__PURE__ */
|
|
379
|
+
children: !s || f.length <= s + 1 ? r : /* @__PURE__ */ g(k, { children: [
|
|
387
380
|
f.slice(0, s),
|
|
388
|
-
/* @__PURE__ */ t(
|
|
389
|
-
|
|
381
|
+
/* @__PURE__ */ t(y, { children: /* @__PURE__ */ g(
|
|
382
|
+
R,
|
|
390
383
|
{
|
|
391
384
|
onClick: () => u(!c),
|
|
392
385
|
className: "hover:bg-transparent",
|
|
393
|
-
tooltip: c ? d :
|
|
386
|
+
tooltip: c ? d : h,
|
|
394
387
|
children: [
|
|
395
388
|
/* @__PURE__ */ t("div", { className: "text-[#3bb273]", children: /* @__PURE__ */ t(
|
|
396
389
|
A,
|
|
@@ -399,7 +392,7 @@ const D = i.forwardRef(({ className: a, children: r, ...e }, o) => {
|
|
|
399
392
|
className: l("transition-transform duration-200", c ? "-rotate-90" : "rotate-90")
|
|
400
393
|
}
|
|
401
394
|
) }),
|
|
402
|
-
/* @__PURE__ */ t("span", { children: c ? d :
|
|
395
|
+
/* @__PURE__ */ t("span", { children: c ? d : h })
|
|
403
396
|
]
|
|
404
397
|
}
|
|
405
398
|
) }),
|
|
@@ -408,8 +401,8 @@ const D = i.forwardRef(({ className: a, children: r, ...e }, o) => {
|
|
|
408
401
|
}
|
|
409
402
|
);
|
|
410
403
|
});
|
|
411
|
-
|
|
412
|
-
const
|
|
404
|
+
O.displayName = "SidebarMenu";
|
|
405
|
+
const y = i.forwardRef(({ className: a, isActive: r, ...e }, o) => /* @__PURE__ */ t(
|
|
413
406
|
"li",
|
|
414
407
|
{
|
|
415
408
|
ref: o,
|
|
@@ -418,14 +411,14 @@ const R = i.forwardRef(({ className: a, isActive: r, ...e }, o) => /* @__PURE__
|
|
|
418
411
|
...e
|
|
419
412
|
}
|
|
420
413
|
));
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
const { state: u } =
|
|
424
|
-
o === void 0 &&
|
|
414
|
+
y.displayName = "SidebarMenuItem";
|
|
415
|
+
const D = i.forwardRef(({ children: a, isActive: r, defaultOpen: e, open: o, onOpenChange: n, ...s }, c) => {
|
|
416
|
+
const { state: u } = S(), [f, h] = i.useState(e ?? !1), d = o !== void 0 ? o : f, p = (m) => {
|
|
417
|
+
o === void 0 && h(m), n?.(m);
|
|
425
418
|
};
|
|
426
419
|
return i.useEffect(() => {
|
|
427
420
|
u === "expanded" && r && !d && p(!0);
|
|
428
|
-
}, [u, r]), /* @__PURE__ */ t(
|
|
421
|
+
}, [u, r]), /* @__PURE__ */ t(I.Provider, { value: { isCollapsible: !0 }, children: /* @__PURE__ */ t(
|
|
429
422
|
z.Root,
|
|
430
423
|
{
|
|
431
424
|
ref: c,
|
|
@@ -433,12 +426,12 @@ const E = i.forwardRef(({ children: a, isActive: r, defaultOpen: e, open: o, onO
|
|
|
433
426
|
open: d,
|
|
434
427
|
onOpenChange: p,
|
|
435
428
|
...s,
|
|
436
|
-
children: /* @__PURE__ */ t(
|
|
429
|
+
children: /* @__PURE__ */ t(y, { children: a })
|
|
437
430
|
}
|
|
438
431
|
) });
|
|
439
432
|
});
|
|
440
|
-
|
|
441
|
-
const
|
|
433
|
+
D.displayName = "SidebarMenuCollapsible";
|
|
434
|
+
const ue = H(
|
|
442
435
|
"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
436
|
{
|
|
444
437
|
variants: {
|
|
@@ -457,7 +450,7 @@ const pe = G(
|
|
|
457
450
|
size: "default"
|
|
458
451
|
}
|
|
459
452
|
}
|
|
460
|
-
),
|
|
453
|
+
), R = i.forwardRef(
|
|
461
454
|
({
|
|
462
455
|
asChild: a = !1,
|
|
463
456
|
isActive: r = !1,
|
|
@@ -468,30 +461,30 @@ const pe = G(
|
|
|
468
461
|
children: c,
|
|
469
462
|
...u
|
|
470
463
|
}, f) => {
|
|
471
|
-
const
|
|
472
|
-
|
|
464
|
+
const h = a ? C : "button", { state: d, setOpen: p } = S(), x = !!i.useContext(I)?.isCollapsible, b = /* @__PURE__ */ t(
|
|
465
|
+
h,
|
|
473
466
|
{
|
|
474
467
|
ref: f,
|
|
475
468
|
"data-sidebar": "menu-button",
|
|
476
469
|
"data-size": o,
|
|
477
470
|
"data-active": r,
|
|
478
|
-
className: l("relative",
|
|
471
|
+
className: l("relative", ue({ variant: e, size: o }), s),
|
|
479
472
|
...u,
|
|
480
|
-
onClick: (
|
|
481
|
-
d === "collapsed" && x && (p(!0), r && (
|
|
473
|
+
onClick: (v) => {
|
|
474
|
+
d === "collapsed" && x && (p(!0), r && (v.preventDefault(), v.stopPropagation())), u.onClick?.(v);
|
|
482
475
|
},
|
|
483
|
-
children: a ? c : /* @__PURE__ */
|
|
476
|
+
children: a ? c : /* @__PURE__ */ g(k, { children: [
|
|
484
477
|
c,
|
|
485
478
|
x && /* @__PURE__ */ t(A, { "data-sidebar": "menu-button-chevron" })
|
|
486
479
|
] })
|
|
487
480
|
}
|
|
488
|
-
),
|
|
481
|
+
), w = x ? /* @__PURE__ */ t(z.Trigger, { asChild: !0, children: b }) : b;
|
|
489
482
|
return n ? (typeof n == "string" && (n = {
|
|
490
483
|
children: n
|
|
491
|
-
}), /* @__PURE__ */
|
|
492
|
-
/* @__PURE__ */ t(
|
|
484
|
+
}), /* @__PURE__ */ g(F, { children: [
|
|
485
|
+
/* @__PURE__ */ t(q, { asChild: !0, children: w }),
|
|
493
486
|
/* @__PURE__ */ t(
|
|
494
|
-
|
|
487
|
+
K,
|
|
495
488
|
{
|
|
496
489
|
side: "right",
|
|
497
490
|
align: "center",
|
|
@@ -500,14 +493,14 @@ const pe = G(
|
|
|
500
493
|
...n
|
|
501
494
|
}
|
|
502
495
|
)
|
|
503
|
-
] })) :
|
|
496
|
+
] })) : w;
|
|
504
497
|
}
|
|
505
498
|
);
|
|
506
|
-
|
|
507
|
-
const
|
|
499
|
+
R.displayName = "SidebarMenuButton";
|
|
500
|
+
const pe = i.forwardRef(({ className: a, isActive: r, ...e }, o) => {
|
|
508
501
|
const { t: n } = N(), s = n("sidebar.logout");
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
|
|
502
|
+
return /* @__PURE__ */ g(
|
|
503
|
+
R,
|
|
511
504
|
{
|
|
512
505
|
ref: o,
|
|
513
506
|
className: l("text-[#3bb273] hover:text-[#3bb273] hover:bg-[#30416e]", a),
|
|
@@ -539,8 +532,8 @@ const fe = i.forwardRef(({ className: a, isActive: r, ...e }, o) => {
|
|
|
539
532
|
}
|
|
540
533
|
);
|
|
541
534
|
});
|
|
542
|
-
|
|
543
|
-
const
|
|
535
|
+
pe.displayName = "SidebarLogout";
|
|
536
|
+
const fe = i.forwardRef(({ className: a, asChild: r = !1, showOnHover: e = !1, ...o }, n) => /* @__PURE__ */ t(
|
|
544
537
|
r ? C : "button",
|
|
545
538
|
{
|
|
546
539
|
ref: n,
|
|
@@ -559,8 +552,8 @@ const me = i.forwardRef(({ className: a, asChild: r = !1, showOnHover: e = !1, .
|
|
|
559
552
|
...o
|
|
560
553
|
}
|
|
561
554
|
));
|
|
562
|
-
|
|
563
|
-
const
|
|
555
|
+
fe.displayName = "SidebarMenuAction";
|
|
556
|
+
const me = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
564
557
|
"div",
|
|
565
558
|
{
|
|
566
559
|
ref: e,
|
|
@@ -577,10 +570,10 @@ const ge = i.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
|
|
|
577
570
|
...r
|
|
578
571
|
}
|
|
579
572
|
));
|
|
580
|
-
|
|
581
|
-
const
|
|
573
|
+
me.displayName = "SidebarMenuBadge";
|
|
574
|
+
const ge = i.forwardRef(({ className: a, showIcon: r = !1, ...e }, o) => {
|
|
582
575
|
const n = i.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
583
|
-
return /* @__PURE__ */
|
|
576
|
+
return /* @__PURE__ */ g(
|
|
584
577
|
"div",
|
|
585
578
|
{
|
|
586
579
|
ref: o,
|
|
@@ -589,14 +582,14 @@ const he = i.forwardRef(({ className: a, showIcon: r = !1, ...e }, o) => {
|
|
|
589
582
|
...e,
|
|
590
583
|
children: [
|
|
591
584
|
r && /* @__PURE__ */ t(
|
|
592
|
-
|
|
585
|
+
_,
|
|
593
586
|
{
|
|
594
587
|
className: "size-4 rounded-md",
|
|
595
588
|
"data-sidebar": "menu-skeleton-icon"
|
|
596
589
|
}
|
|
597
590
|
),
|
|
598
591
|
/* @__PURE__ */ t(
|
|
599
|
-
|
|
592
|
+
_,
|
|
600
593
|
{
|
|
601
594
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
602
595
|
"data-sidebar": "menu-skeleton-text",
|
|
@@ -609,9 +602,9 @@ const he = i.forwardRef(({ className: a, showIcon: r = !1, ...e }, o) => {
|
|
|
609
602
|
}
|
|
610
603
|
);
|
|
611
604
|
});
|
|
612
|
-
|
|
613
|
-
const
|
|
614
|
-
const n = !!i.useContext(
|
|
605
|
+
ge.displayName = "SidebarMenuSkeleton";
|
|
606
|
+
const E = i.forwardRef(({ className: a, ...r }, e) => {
|
|
607
|
+
const n = !!i.useContext(I)?.isCollapsible, s = /* @__PURE__ */ t(
|
|
615
608
|
"ul",
|
|
616
609
|
{
|
|
617
610
|
ref: e,
|
|
@@ -626,7 +619,7 @@ const O = i.forwardRef(({ className: a, ...r }, e) => {
|
|
|
626
619
|
);
|
|
627
620
|
return n ? /* @__PURE__ */ t(z.Content, { className: "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down", children: s }) : s;
|
|
628
621
|
});
|
|
629
|
-
|
|
622
|
+
E.displayName = "SidebarMenuSub";
|
|
630
623
|
const T = i.forwardRef(({ className: a, isActive: r, ...e }, o) => /* @__PURE__ */ t(
|
|
631
624
|
"li",
|
|
632
625
|
{
|
|
@@ -637,7 +630,7 @@ const T = i.forwardRef(({ className: a, isActive: r, ...e }, o) => /* @__PURE__
|
|
|
637
630
|
}
|
|
638
631
|
));
|
|
639
632
|
T.displayName = "SidebarMenuSubItem";
|
|
640
|
-
const
|
|
633
|
+
const G = i.forwardRef(({ asChild: a = !1, size: r = "md", isActive: e, className: o, ...n }, s) => /* @__PURE__ */ t(
|
|
641
634
|
a ? C : "a",
|
|
642
635
|
{
|
|
643
636
|
ref: s,
|
|
@@ -657,32 +650,32 @@ const L = i.forwardRef(({ asChild: a = !1, size: r = "md", isActive: e, classNam
|
|
|
657
650
|
children: n.children
|
|
658
651
|
}
|
|
659
652
|
));
|
|
660
|
-
|
|
653
|
+
G.displayName = "SidebarMenuSubButton";
|
|
661
654
|
export {
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
655
|
+
Z as Sidebar,
|
|
656
|
+
se as SidebarContent,
|
|
657
|
+
ne as SidebarFooter,
|
|
658
|
+
de as SidebarGroup,
|
|
659
|
+
ce as SidebarGroupAction,
|
|
660
|
+
be as SidebarGroupContent,
|
|
661
|
+
le as SidebarGroupLabel,
|
|
662
|
+
ie as SidebarHeader,
|
|
663
|
+
re as SidebarInput,
|
|
664
|
+
te as SidebarInset,
|
|
665
|
+
pe as SidebarLogout,
|
|
666
|
+
O as SidebarMenu,
|
|
667
|
+
fe as SidebarMenuAction,
|
|
668
|
+
me as SidebarMenuBadge,
|
|
669
|
+
R as SidebarMenuButton,
|
|
670
|
+
D as SidebarMenuCollapsible,
|
|
671
|
+
y as SidebarMenuItem,
|
|
672
|
+
ge as SidebarMenuSkeleton,
|
|
673
|
+
E as SidebarMenuSub,
|
|
674
|
+
G as SidebarMenuSubButton,
|
|
682
675
|
T as SidebarMenuSubItem,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
676
|
+
Y as SidebarProvider,
|
|
677
|
+
ae as SidebarRail,
|
|
678
|
+
oe as SidebarSeparator,
|
|
679
|
+
ee as SidebarTrigger,
|
|
680
|
+
S as useSidebar
|
|
688
681
|
};
|