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