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