@vlrc-fe/components 1.0.9 → 1.0.11
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/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/index100.js +30 -17
- package/dist/index101.cjs +1 -1
- package/dist/index102.js +35 -19
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +29 -19
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +98 -55
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +86 -48
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +12 -6
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +23 -16
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +205 -120
- package/dist/index109.cjs +1 -1
- package/dist/index11.js +105 -53
- package/dist/index113.js +12 -6
- package/dist/index114.cjs +1 -1
- package/dist/index115.js +18 -10
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +82 -41
- package/dist/index117.cjs +1 -1
- package/dist/index118.js +42 -21
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +12 -6
- package/dist/index12.cjs +1 -1
- package/dist/index120.cjs +1 -1
- package/dist/index121.js +18 -12
- package/dist/index122.cjs +1 -1
- package/dist/index123.js +42 -28
- package/dist/index124.cjs +1 -1
- package/dist/index126.js +86 -57
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +30 -17
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +42 -27
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +31 -18
- package/dist/index130.cjs +1 -1
- package/dist/index132.js +50 -23
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +28 -14
- package/dist/index134.cjs +1 -1
- package/dist/index135.js +147 -99
- package/dist/index136.cjs +1 -1
- package/dist/index138.js +242 -170
- package/dist/index139.cjs +1 -1
- package/dist/index14.js +9 -5
- package/dist/index141.js +21 -10
- package/dist/index142.cjs +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index18.js +32 -16
- package/dist/index186.js +57 -44
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +56 -48
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +16 -12
- package/dist/index189.cjs +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index191.js +36 -23
- package/dist/index192.cjs +1 -1
- package/dist/index197.js +18 -15
- package/dist/index198.cjs +1 -1
- package/dist/index20.js +79 -41
- package/dist/index200.js +49 -33
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +20 -11
- package/dist/index202.cjs +1 -1
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +30 -23
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +75 -39
- package/dist/index23.cjs +1 -1
- package/dist/index26.js +39 -28
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +20 -12
- package/dist/index28.cjs +1 -1
- package/dist/index33.js +23 -13
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +87 -49
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +86 -45
- package/dist/index36.cjs +1 -1
- package/dist/index4.js +49 -26
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +34 -18
- package/dist/index6.cjs +1 -1
- package/dist/index75.js +142 -77
- package/dist/index76.cjs +1 -1
- package/dist/index77.js +96 -49
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +137 -77
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +13 -7
- package/dist/index80.cjs +1 -1
- package/dist/index81.js +130 -63
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +201 -158
- package/dist/index83.cjs +1 -1
- package/dist/index84.js +97 -59
- package/dist/index85.cjs +1 -1
- package/dist/index86.js +17 -10
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +13 -7
- package/dist/index88.cjs +1 -1
- package/dist/index89.js +54 -28
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +94 -53
- package/dist/index91.cjs +1 -1
- package/dist/index92.js +156 -89
- package/dist/index93.cjs +1 -1
- package/dist/index96.js +89 -47
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +78 -43
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +27 -17
- package/dist/index99.cjs +1 -1
- package/package.json +1 -1
package/dist/index108.js
CHANGED
|
@@ -9,26 +9,34 @@ import { Tooltip as u, TooltipContent as d, TooltipProvider as f, TooltipTrigger
|
|
|
9
9
|
import { PanelLeftIcon as m } from "lucide-react";
|
|
10
10
|
import * as h from "react";
|
|
11
11
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { c as v } from "react/compiler-runtime";
|
|
13
|
+
import { cva as y } from "class-variance-authority";
|
|
14
|
+
import { Slot as b } from "@radix-ui/react-slot";
|
|
14
15
|
//#region src/ui/sidebar.tsx
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
return h.useSyncExternalStore(
|
|
18
|
-
let t = window.matchMedia(`(max-width: ${b - 1}px)`);
|
|
19
|
-
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
20
|
-
}, () => window.matchMedia(`(max-width: ${b - 1}px)`).matches, () => !1);
|
|
16
|
+
var x = 768;
|
|
17
|
+
function S() {
|
|
18
|
+
return h.useSyncExternalStore(T, w, C);
|
|
21
19
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
function C() {
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
function w() {
|
|
24
|
+
return window.matchMedia(`(max-width: ${x - 1}px)`).matches;
|
|
25
|
+
}
|
|
26
|
+
function T(e) {
|
|
27
|
+
let t = window.matchMedia(`(max-width: ${x - 1}px)`);
|
|
28
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
29
|
+
}
|
|
30
|
+
var E = "sidebar_state", D = 3600 * 24 * 7, O = "16rem", k = "18rem", A = "3rem", j = "b", M = h.createContext(null);
|
|
31
|
+
function N() {
|
|
32
|
+
let e = h.useContext(M);
|
|
25
33
|
if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
|
|
26
34
|
return e;
|
|
27
35
|
}
|
|
28
|
-
function
|
|
29
|
-
let c =
|
|
36
|
+
function P({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }) {
|
|
37
|
+
let c = S(), [l, u] = h.useState(!1), [d, p] = h.useState(t), m = n ?? d, _ = h.useCallback((e) => {
|
|
30
38
|
let t = typeof e == "function" ? e(m) : e;
|
|
31
|
-
r ? r(t) : p(t), document.cookie = `${
|
|
39
|
+
r ? r(t) : p(t), document.cookie = `${E}=${t}; path=/; max-age=${D}`;
|
|
32
40
|
}, [r, m]), v = h.useCallback(() => c ? u((e) => !e) : _((e) => !e), [
|
|
33
41
|
c,
|
|
34
42
|
_,
|
|
@@ -36,7 +44,7 @@ function A({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style:
|
|
|
36
44
|
]);
|
|
37
45
|
h.useEffect(() => {
|
|
38
46
|
let e = (e) => {
|
|
39
|
-
e.key ===
|
|
47
|
+
e.key === j && (e.metaKey || e.ctrlKey) && (e.preventDefault(), v());
|
|
40
48
|
};
|
|
41
49
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
42
50
|
}, [v]);
|
|
@@ -57,15 +65,15 @@ function A({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style:
|
|
|
57
65
|
u,
|
|
58
66
|
v
|
|
59
67
|
]);
|
|
60
|
-
return /* @__PURE__ */ g(
|
|
68
|
+
return /* @__PURE__ */ g(M.Provider, {
|
|
61
69
|
value: b,
|
|
62
70
|
children: /* @__PURE__ */ g(f, {
|
|
63
71
|
delayDuration: 0,
|
|
64
72
|
children: /* @__PURE__ */ g("div", {
|
|
65
73
|
"data-slot": "sidebar-wrapper",
|
|
66
74
|
style: {
|
|
67
|
-
"--sidebar-width":
|
|
68
|
-
"--sidebar-width-icon":
|
|
75
|
+
"--sidebar-width": O,
|
|
76
|
+
"--sidebar-width-icon": A,
|
|
69
77
|
...a
|
|
70
78
|
},
|
|
71
79
|
className: e("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", i),
|
|
@@ -75,8 +83,8 @@ function A({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style:
|
|
|
75
83
|
})
|
|
76
84
|
});
|
|
77
85
|
}
|
|
78
|
-
function
|
|
79
|
-
let { isMobile: f, state: p, openMobile: m, setOpenMobile: h } =
|
|
86
|
+
function F({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanvas", className: l, children: u, ...d }) {
|
|
87
|
+
let { isMobile: f, state: p, openMobile: m, setOpenMobile: h } = N();
|
|
80
88
|
return r === "none" ? /* @__PURE__ */ g("div", {
|
|
81
89
|
"data-slot": "sidebar",
|
|
82
90
|
className: e("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", l),
|
|
@@ -91,7 +99,7 @@ function j({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanv
|
|
|
91
99
|
"data-slot": "sidebar",
|
|
92
100
|
"data-mobile": "true",
|
|
93
101
|
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
94
|
-
style: { "--sidebar-width":
|
|
102
|
+
style: { "--sidebar-width": k },
|
|
95
103
|
side: t,
|
|
96
104
|
children: [/* @__PURE__ */ _(s, {
|
|
97
105
|
className: "sr-only",
|
|
@@ -124,133 +132,195 @@ function j({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanv
|
|
|
124
132
|
})]
|
|
125
133
|
});
|
|
126
134
|
}
|
|
127
|
-
function
|
|
128
|
-
let
|
|
129
|
-
|
|
135
|
+
function I(n) {
|
|
136
|
+
let r = v(15), i, a, o;
|
|
137
|
+
r[0] === n ? (i = r[1], a = r[2], o = r[3]) : ({className: i, onClick: a, ...o} = n, r[0] = n, r[1] = i, r[2] = a, r[3] = o);
|
|
138
|
+
let { toggleSidebar: s } = N(), c;
|
|
139
|
+
r[4] === i ? c = r[5] : (c = e("size-7", i), r[4] = i, r[5] = c);
|
|
140
|
+
let l;
|
|
141
|
+
r[6] !== a || r[7] !== s ? (l = (e) => {
|
|
142
|
+
a?.(e), s();
|
|
143
|
+
}, r[6] = a, r[7] = s, r[8] = l) : l = r[8];
|
|
144
|
+
let u, d;
|
|
145
|
+
r[9] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ g(m, {}), d = /* @__PURE__ */ g("span", {
|
|
146
|
+
className: "sr-only",
|
|
147
|
+
children: "Toggle Sidebar"
|
|
148
|
+
}), r[9] = u, r[10] = d) : (u = r[9], d = r[10]);
|
|
149
|
+
let f;
|
|
150
|
+
return r[11] !== o || r[12] !== c || r[13] !== l ? (f = /* @__PURE__ */ _(t, {
|
|
130
151
|
"data-sidebar": "trigger",
|
|
131
152
|
"data-slot": "sidebar-trigger",
|
|
132
153
|
variant: "ghost",
|
|
133
154
|
size: "icon",
|
|
134
|
-
className:
|
|
135
|
-
onClick:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
children: [/* @__PURE__ */ g(m, {}), /* @__PURE__ */ g("span", {
|
|
140
|
-
className: "sr-only",
|
|
141
|
-
children: "Toggle Sidebar"
|
|
142
|
-
})]
|
|
143
|
-
});
|
|
155
|
+
className: c,
|
|
156
|
+
onClick: l,
|
|
157
|
+
...o,
|
|
158
|
+
children: [u, d]
|
|
159
|
+
}), r[11] = o, r[12] = c, r[13] = l, r[14] = f) : f = r[14], f;
|
|
144
160
|
}
|
|
145
|
-
function
|
|
146
|
-
let
|
|
147
|
-
|
|
161
|
+
function L(t) {
|
|
162
|
+
let n = v(9), r, i;
|
|
163
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
164
|
+
let { toggleSidebar: a } = N(), o;
|
|
165
|
+
n[3] === r ? o = n[4] : (o = e("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", r), n[3] = r, n[4] = o);
|
|
166
|
+
let s;
|
|
167
|
+
return n[5] !== i || n[6] !== o || n[7] !== a ? (s = /* @__PURE__ */ g("button", {
|
|
148
168
|
"data-sidebar": "rail",
|
|
149
169
|
"data-slot": "sidebar-rail",
|
|
150
170
|
"aria-label": "Toggle Sidebar",
|
|
151
171
|
tabIndex: -1,
|
|
152
|
-
onClick:
|
|
172
|
+
onClick: a,
|
|
153
173
|
title: "Toggle Sidebar",
|
|
154
|
-
className:
|
|
155
|
-
...
|
|
156
|
-
});
|
|
174
|
+
className: o,
|
|
175
|
+
...i
|
|
176
|
+
}), n[5] = i, n[6] = o, n[7] = a, n[8] = s) : s = n[8], s;
|
|
157
177
|
}
|
|
158
|
-
function
|
|
159
|
-
|
|
178
|
+
function R(t) {
|
|
179
|
+
let n = v(8), r, i;
|
|
180
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
181
|
+
let a;
|
|
182
|
+
n[3] === r ? a = n[4] : (a = e("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", r), n[3] = r, n[4] = a);
|
|
183
|
+
let o;
|
|
184
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("main", {
|
|
160
185
|
"data-slot": "sidebar-inset",
|
|
161
|
-
className:
|
|
162
|
-
...
|
|
163
|
-
});
|
|
186
|
+
className: a,
|
|
187
|
+
...i
|
|
188
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
164
189
|
}
|
|
165
|
-
function
|
|
166
|
-
|
|
190
|
+
function z(t) {
|
|
191
|
+
let n = v(8), i, a;
|
|
192
|
+
n[0] === t ? (i = n[1], a = n[2]) : ({className: i, ...a} = t, n[0] = t, n[1] = i, n[2] = a);
|
|
193
|
+
let o;
|
|
194
|
+
n[3] === i ? o = n[4] : (o = e("bg-background h-8 w-full shadow-none", i), n[3] = i, n[4] = o);
|
|
195
|
+
let s;
|
|
196
|
+
return n[5] !== a || n[6] !== o ? (s = /* @__PURE__ */ g(r, {
|
|
167
197
|
"data-slot": "sidebar-input",
|
|
168
198
|
"data-sidebar": "input",
|
|
169
|
-
className:
|
|
170
|
-
...
|
|
171
|
-
});
|
|
199
|
+
className: o,
|
|
200
|
+
...a
|
|
201
|
+
}), n[5] = a, n[6] = o, n[7] = s) : s = n[7], s;
|
|
172
202
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
203
|
+
function B(t) {
|
|
204
|
+
let n = v(8), r, i;
|
|
205
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
206
|
+
let a;
|
|
207
|
+
n[3] === r ? a = n[4] : (a = e("flex flex-col gap-2 p-2", r), n[3] = r, n[4] = a);
|
|
208
|
+
let o;
|
|
209
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("div", {
|
|
175
210
|
"data-slot": "sidebar-header",
|
|
176
211
|
"data-sidebar": "header",
|
|
177
|
-
className:
|
|
178
|
-
...
|
|
179
|
-
});
|
|
212
|
+
className: a,
|
|
213
|
+
...i
|
|
214
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
180
215
|
}
|
|
181
|
-
function
|
|
182
|
-
|
|
216
|
+
function ee(t) {
|
|
217
|
+
let n = v(8), r, i;
|
|
218
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
219
|
+
let a;
|
|
220
|
+
n[3] === r ? a = n[4] : (a = e("flex flex-col gap-2 p-2", r), n[3] = r, n[4] = a);
|
|
221
|
+
let o;
|
|
222
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("div", {
|
|
183
223
|
"data-slot": "sidebar-footer",
|
|
184
224
|
"data-sidebar": "footer",
|
|
185
|
-
className:
|
|
186
|
-
...
|
|
187
|
-
});
|
|
225
|
+
className: a,
|
|
226
|
+
...i
|
|
227
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
188
228
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
229
|
+
function V(t) {
|
|
230
|
+
let r = v(8), i, a;
|
|
231
|
+
r[0] === t ? (i = r[1], a = r[2]) : ({className: i, ...a} = t, r[0] = t, r[1] = i, r[2] = a);
|
|
232
|
+
let o;
|
|
233
|
+
r[3] === i ? o = r[4] : (o = e("bg-sidebar-border mx-2 w-auto", i), r[3] = i, r[4] = o);
|
|
234
|
+
let s;
|
|
235
|
+
return r[5] !== a || r[6] !== o ? (s = /* @__PURE__ */ g(n, {
|
|
191
236
|
"data-slot": "sidebar-separator",
|
|
192
237
|
"data-sidebar": "separator",
|
|
193
|
-
className:
|
|
194
|
-
...
|
|
195
|
-
});
|
|
238
|
+
className: o,
|
|
239
|
+
...a
|
|
240
|
+
}), r[5] = a, r[6] = o, r[7] = s) : s = r[7], s;
|
|
196
241
|
}
|
|
197
|
-
function
|
|
198
|
-
|
|
242
|
+
function H(t) {
|
|
243
|
+
let n = v(8), r, i;
|
|
244
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
245
|
+
let a;
|
|
246
|
+
n[3] === r ? a = n[4] : (a = e("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", r), n[3] = r, n[4] = a);
|
|
247
|
+
let o;
|
|
248
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("div", {
|
|
199
249
|
"data-slot": "sidebar-content",
|
|
200
250
|
"data-sidebar": "content",
|
|
201
|
-
className:
|
|
202
|
-
...
|
|
203
|
-
});
|
|
251
|
+
className: a,
|
|
252
|
+
...i
|
|
253
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
204
254
|
}
|
|
205
|
-
function
|
|
206
|
-
|
|
255
|
+
function U(t) {
|
|
256
|
+
let n = v(8), r, i;
|
|
257
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
258
|
+
let a;
|
|
259
|
+
n[3] === r ? a = n[4] : (a = e("relative flex w-full min-w-0 flex-col p-2", r), n[3] = r, n[4] = a);
|
|
260
|
+
let o;
|
|
261
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("div", {
|
|
207
262
|
"data-slot": "sidebar-group",
|
|
208
263
|
"data-sidebar": "group",
|
|
209
|
-
className:
|
|
210
|
-
...
|
|
211
|
-
});
|
|
264
|
+
className: a,
|
|
265
|
+
...i
|
|
266
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
212
267
|
}
|
|
213
|
-
function
|
|
214
|
-
return /* @__PURE__ */ g(n ?
|
|
268
|
+
function W({ className: t, asChild: n = !1, ...r }) {
|
|
269
|
+
return /* @__PURE__ */ g(n ? b : "div", {
|
|
215
270
|
"data-slot": "sidebar-group-label",
|
|
216
271
|
"data-sidebar": "group-label",
|
|
217
272
|
className: e("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", t),
|
|
218
273
|
...r
|
|
219
274
|
});
|
|
220
275
|
}
|
|
221
|
-
function
|
|
222
|
-
return /* @__PURE__ */ g(n ?
|
|
276
|
+
function G({ className: t, asChild: n = !1, ...r }) {
|
|
277
|
+
return /* @__PURE__ */ g(n ? b : "button", {
|
|
223
278
|
"data-slot": "sidebar-group-action",
|
|
224
279
|
"data-sidebar": "group-action",
|
|
225
280
|
className: e("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", t),
|
|
226
281
|
...r
|
|
227
282
|
});
|
|
228
283
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
284
|
+
function K(t) {
|
|
285
|
+
let n = v(8), r, i;
|
|
286
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
287
|
+
let a;
|
|
288
|
+
n[3] === r ? a = n[4] : (a = e("w-full text-sm", r), n[3] = r, n[4] = a);
|
|
289
|
+
let o;
|
|
290
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("div", {
|
|
231
291
|
"data-slot": "sidebar-group-content",
|
|
232
292
|
"data-sidebar": "group-content",
|
|
233
|
-
className:
|
|
234
|
-
...
|
|
235
|
-
});
|
|
293
|
+
className: a,
|
|
294
|
+
...i
|
|
295
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
236
296
|
}
|
|
237
|
-
function
|
|
238
|
-
|
|
297
|
+
function q(t) {
|
|
298
|
+
let n = v(8), r, i;
|
|
299
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
300
|
+
let a;
|
|
301
|
+
n[3] === r ? a = n[4] : (a = e("flex w-full min-w-0 flex-col gap-1", r), n[3] = r, n[4] = a);
|
|
302
|
+
let o;
|
|
303
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("ul", {
|
|
239
304
|
"data-slot": "sidebar-menu",
|
|
240
305
|
"data-sidebar": "menu",
|
|
241
|
-
className:
|
|
242
|
-
...
|
|
243
|
-
});
|
|
306
|
+
className: a,
|
|
307
|
+
...i
|
|
308
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
244
309
|
}
|
|
245
|
-
function
|
|
246
|
-
|
|
310
|
+
function J(t) {
|
|
311
|
+
let n = v(8), r, i;
|
|
312
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
313
|
+
let a;
|
|
314
|
+
n[3] === r ? a = n[4] : (a = e("group/menu-item relative", r), n[3] = r, n[4] = a);
|
|
315
|
+
let o;
|
|
316
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("li", {
|
|
247
317
|
"data-slot": "sidebar-menu-item",
|
|
248
318
|
"data-sidebar": "menu-item",
|
|
249
|
-
className:
|
|
250
|
-
...
|
|
251
|
-
});
|
|
319
|
+
className: a,
|
|
320
|
+
...i
|
|
321
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
252
322
|
}
|
|
253
|
-
var
|
|
323
|
+
var Y = y("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
254
324
|
variants: {
|
|
255
325
|
variant: {
|
|
256
326
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
@@ -267,13 +337,13 @@ var K = v("peer/menu-button flex w-full items-center gap-2 overflow-hidden round
|
|
|
267
337
|
size: "default"
|
|
268
338
|
}
|
|
269
339
|
});
|
|
270
|
-
function
|
|
271
|
-
let c = t ?
|
|
340
|
+
function X({ asChild: t = !1, isActive: n = !1, variant: r = "default", size: i = "default", tooltip: a, className: o, ...s }) {
|
|
341
|
+
let c = t ? b : "button", { isMobile: l, state: f } = N(), m = /* @__PURE__ */ g(c, {
|
|
272
342
|
"data-slot": "sidebar-menu-button",
|
|
273
343
|
"data-sidebar": "menu-button",
|
|
274
344
|
"data-size": i,
|
|
275
345
|
"data-active": n,
|
|
276
|
-
className: e(
|
|
346
|
+
className: e(Y({
|
|
277
347
|
variant: r,
|
|
278
348
|
size: i
|
|
279
349
|
}), o),
|
|
@@ -289,23 +359,28 @@ function q({ asChild: t = !1, isActive: n = !1, variant: r = "default", size: i
|
|
|
289
359
|
...a
|
|
290
360
|
})] })) : m;
|
|
291
361
|
}
|
|
292
|
-
function
|
|
293
|
-
return /* @__PURE__ */ g(n ?
|
|
362
|
+
function Z({ className: t, asChild: n = !1, showOnHover: r = !1, ...i }) {
|
|
363
|
+
return /* @__PURE__ */ g(n ? b : "button", {
|
|
294
364
|
"data-slot": "sidebar-menu-action",
|
|
295
365
|
"data-sidebar": "menu-action",
|
|
296
366
|
className: e("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", r && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", t),
|
|
297
367
|
...i
|
|
298
368
|
});
|
|
299
369
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
370
|
+
function Q(t) {
|
|
371
|
+
let n = v(8), r, i;
|
|
372
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
373
|
+
let a;
|
|
374
|
+
n[3] === r ? a = n[4] : (a = e("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", r), n[3] = r, n[4] = a);
|
|
375
|
+
let o;
|
|
376
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("div", {
|
|
302
377
|
"data-slot": "sidebar-menu-badge",
|
|
303
378
|
"data-sidebar": "menu-badge",
|
|
304
|
-
className:
|
|
305
|
-
...
|
|
306
|
-
});
|
|
379
|
+
className: a,
|
|
380
|
+
...i
|
|
381
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
307
382
|
}
|
|
308
|
-
function
|
|
383
|
+
function $({ className: t, showIcon: n = !1, ...r }) {
|
|
309
384
|
let i = h.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
310
385
|
return /* @__PURE__ */ _("div", {
|
|
311
386
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -322,24 +397,34 @@ function X({ className: t, showIcon: n = !1, ...r }) {
|
|
|
322
397
|
})]
|
|
323
398
|
});
|
|
324
399
|
}
|
|
325
|
-
function
|
|
326
|
-
|
|
400
|
+
function te(t) {
|
|
401
|
+
let n = v(8), r, i;
|
|
402
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
403
|
+
let a;
|
|
404
|
+
n[3] === r ? a = n[4] : (a = e("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", r), n[3] = r, n[4] = a);
|
|
405
|
+
let o;
|
|
406
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("ul", {
|
|
327
407
|
"data-slot": "sidebar-menu-sub",
|
|
328
408
|
"data-sidebar": "menu-sub",
|
|
329
|
-
className:
|
|
330
|
-
...
|
|
331
|
-
});
|
|
409
|
+
className: a,
|
|
410
|
+
...i
|
|
411
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
332
412
|
}
|
|
333
|
-
function
|
|
334
|
-
|
|
413
|
+
function ne(t) {
|
|
414
|
+
let n = v(8), r, i;
|
|
415
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
416
|
+
let a;
|
|
417
|
+
n[3] === r ? a = n[4] : (a = e("group/menu-sub-item relative", r), n[3] = r, n[4] = a);
|
|
418
|
+
let o;
|
|
419
|
+
return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ g("li", {
|
|
335
420
|
"data-slot": "sidebar-menu-sub-item",
|
|
336
421
|
"data-sidebar": "menu-sub-item",
|
|
337
|
-
className:
|
|
338
|
-
...
|
|
339
|
-
});
|
|
422
|
+
className: a,
|
|
423
|
+
...i
|
|
424
|
+
}), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
|
|
340
425
|
}
|
|
341
|
-
function
|
|
342
|
-
return /* @__PURE__ */ g(t ?
|
|
426
|
+
function re({ asChild: t = !1, size: n = "md", isActive: r = !1, className: i, ...a }) {
|
|
427
|
+
return /* @__PURE__ */ g(t ? b : "a", {
|
|
343
428
|
"data-slot": "sidebar-menu-sub-button",
|
|
344
429
|
"data-sidebar": "menu-sub-button",
|
|
345
430
|
"data-size": n,
|
|
@@ -349,4 +434,4 @@ function $({ asChild: t = !1, size: n = "md", isActive: r = !1, className: i, ..
|
|
|
349
434
|
});
|
|
350
435
|
}
|
|
351
436
|
//#endregion
|
|
352
|
-
export {
|
|
437
|
+
export { F as Sidebar, H as SidebarContent, ee as SidebarFooter, U as SidebarGroup, G as SidebarGroupAction, K as SidebarGroupContent, W as SidebarGroupLabel, B as SidebarHeader, z as SidebarInput, R as SidebarInset, q as SidebarMenu, Z as SidebarMenuAction, Q as SidebarMenuBadge, X as SidebarMenuButton, J as SidebarMenuItem, $ as SidebarMenuSkeleton, te as SidebarMenuSub, re as SidebarMenuSubButton, ne as SidebarMenuSubItem, P as SidebarProvider, L as SidebarRail, V as SidebarSeparator, I as SidebarTrigger, N as useSidebar };
|
package/dist/index109.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index11.cjs"),r=require("./index81.cjs"),i=require("./index88.cjs"),a=require("./index106.cjs"),o=require("./index107.cjs"),s=require("./index108.cjs");let c=require("lucide-react"),l=require("react");l=e.__toESM(l,1);let u=require("react/jsx-runtime"),d=require("class-variance-authority"),f=require("@radix-ui/react-slot");var p=768;function m(){return l.useSyncExternalStore(e=>{let t=window.matchMedia(`(max-width: ${p-1}px)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},()=>window.matchMedia(`(max-width: ${p-1}px)`).matches,()=>!1)}var h=`sidebar_state`,g=3600*24*7,_=`16rem`,v=`18rem`,y=`3rem`,b=`b`,x=l.createContext(null);function S(){let e=l.useContext(x);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function C({defaultOpen:e=!0,open:n,onOpenChange:r,className:i,style:a,children:o,...c}){let d=m(),[f,p]=l.useState(!1),[v,S]=l.useState(e),C=n??v,w=l.useCallback(e=>{let t=typeof e==`function`?e(C):e;r?r(t):S(t),document.cookie=`${h}=${t}; path=/; max-age=${g}`},[r,C]),T=l.useCallback(()=>d?p(e=>!e):w(e=>!e),[d,w,p]);l.useEffect(()=>{let e=e=>{e.key===b&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),T())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[T]);let E=C?`expanded`:`collapsed`,D=l.useMemo(()=>({state:E,open:C,setOpen:w,isMobile:d,openMobile:f,setOpenMobile:p,toggleSidebar:T}),[E,C,w,d,f,p,T]);return(0,u.jsx)(x.Provider,{value:D,children:(0,u.jsx)(s.TooltipProvider,{delayDuration:0,children:(0,u.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":_,"--sidebar-width-icon":y,...a},className:t.cn(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full`,i),...c,children:o})})})}function w({side:e=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:i,children:o,...s}){let{isMobile:c,state:l,openMobile:d,setOpenMobile:f}=S();return r===`none`?(0,u.jsx)(`div`,{"data-slot":`sidebar`,className:t.cn(`bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col`,i),...s,children:o}):c?(0,u.jsx)(a.Sheet,{open:d,onOpenChange:f,...s,children:(0,u.jsxs)(a.SheetContent,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden`,style:{"--sidebar-width":v},side:e,children:[(0,u.jsxs)(a.SheetHeader,{className:`sr-only`,children:[(0,u.jsx)(a.SheetTitle,{children:`Sidebar`}),(0,u.jsx)(a.SheetDescription,{children:`Displays the mobile sidebar.`})]}),(0,u.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:o})]})}):(0,u.jsxs)(`div`,{className:`group peer text-sidebar-foreground hidden md:block`,"data-state":l,"data-collapsible":l===`collapsed`?r:``,"data-variant":n,"data-side":e,"data-slot":`sidebar`,children:[(0,u.jsx)(`div`,{"data-slot":`sidebar-gap`,className:t.cn(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,u.jsx)(`div`,{"data-slot":`sidebar-container`,className:t.cn(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,n===`floating`||n===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,i),...s,children:(0,u.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm`,children:o})})]})}function T({className:e,onClick:r,...i}){let{toggleSidebar:a}=S();return(0,u.jsxs)(n.Button,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:t.cn(`size-7`,e),onClick:e=>{r?.(e),a()},...i,children:[(0,u.jsx)(c.PanelLeftIcon,{}),(0,u.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function E({className:e,...n}){let{toggleSidebar:r}=S();return(0,u.jsx)(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:r,title:`Toggle Sidebar`,className:t.cn(`hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...n})}function D({className:e,...n}){return(0,u.jsx)(`main`,{"data-slot":`sidebar-inset`,className:t.cn(`bg-background relative flex w-full flex-1 flex-col`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...n})}function O({className:e,...n}){return(0,u.jsx)(i.Input,{"data-slot":`sidebar-input`,"data-sidebar":`input`,className:t.cn(`bg-background h-8 w-full shadow-none`,e),...n})}function k({className:e,...n}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:t.cn(`flex flex-col gap-2 p-2`,e),...n})}function A({className:e,...n}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:t.cn(`flex flex-col gap-2 p-2`,e),...n})}function j({className:e,...n}){return(0,u.jsx)(r.Separator,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:t.cn(`bg-sidebar-border mx-2 w-auto`,e),...n})}function M({className:e,...n}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:t.cn(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...n})}function N({className:e,...n}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:t.cn(`relative flex w-full min-w-0 flex-col p-2`,e),...n})}function P({className:e,asChild:n=!1,...r}){return(0,u.jsx)(n?f.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:t.cn(`text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...r})}function F({className:e,asChild:n=!1,...r}){return(0,u.jsx)(n?f.Slot:`button`,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:t.cn(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`group-data-[collapsible=icon]:hidden`,e),...r})}function I({className:e,...n}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:t.cn(`w-full text-sm`,e),...n})}function L({className:e,...n}){return(0,u.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:t.cn(`flex w-full min-w-0 flex-col gap-1`,e),...n})}function R({className:e,...n}){return(0,u.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:t.cn(`group/menu-item relative`,e),...n})}var z=(0,d.cva)(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function B({asChild:e=!1,isActive:n=!1,variant:r=`default`,size:i=`default`,tooltip:a,className:o,...c}){let l=e?f.Slot:`button`,{isMobile:d,state:p}=S(),m=(0,u.jsx)(l,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":i,"data-active":n,className:t.cn(z({variant:r,size:i}),o),...c});return a?(typeof a==`string`&&(a={children:a}),(0,u.jsxs)(s.Tooltip,{children:[(0,u.jsx)(s.TooltipTrigger,{asChild:!0,children:m}),(0,u.jsx)(s.TooltipContent,{side:`right`,align:`center`,hidden:p!==`collapsed`||d,...a})]})):m}function V({className:e,asChild:n=!1,showOnHover:r=!1,...i}){return(0,u.jsx)(n?f.Slot:`button`,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:t.cn(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,r&&`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0`,e),...i})}function H({className:e,...n}){return(0,u.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:t.cn(`text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none`,`peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...n})}function U({className:e,showIcon:n=!1,...r}){let i=l.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,u.jsxs)(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:t.cn(`flex h-8 items-center gap-2 rounded-md px-2`,e),...r,children:[n&&(0,u.jsx)(o.Skeleton,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,u.jsx)(o.Skeleton,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})}function W({className:e,...n}){return(0,u.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:t.cn(`border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...n})}function G({className:e,...n}){return(0,u.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:t.cn(`group/menu-sub-item relative`,e),...n})}function K({asChild:e=!1,size:n=`md`,isActive:r=!1,className:i,...a}){return(0,u.jsx)(e?f.Slot:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":n,"data-active":r,className:t.cn(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground`,n===`sm`&&`text-xs`,n===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,i),...a})}exports.Sidebar=w,exports.SidebarContent=M,exports.SidebarFooter=A,exports.SidebarGroup=N,exports.SidebarGroupAction=F,exports.SidebarGroupContent=I,exports.SidebarGroupLabel=P,exports.SidebarHeader=k,exports.SidebarInput=O,exports.SidebarInset=D,exports.SidebarMenu=L,exports.SidebarMenuAction=V,exports.SidebarMenuBadge=H,exports.SidebarMenuButton=B,exports.SidebarMenuItem=R,exports.SidebarMenuSkeleton=U,exports.SidebarMenuSub=W,exports.SidebarMenuSubButton=K,exports.SidebarMenuSubItem=G,exports.SidebarProvider=C,exports.SidebarRail=E,exports.SidebarSeparator=j,exports.SidebarTrigger=T,exports.useSidebar=S;
|
|
1
|
+
"use client";const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index11.cjs"),r=require("./index81.cjs"),i=require("./index88.cjs"),a=require("./index106.cjs"),o=require("./index107.cjs"),s=require("./index108.cjs");let c=require("lucide-react"),l=require("react");l=e.__toESM(l,1);let u=require("react/jsx-runtime"),d=require("react/compiler-runtime"),f=require("class-variance-authority"),p=require("@radix-ui/react-slot");var m=768;function h(){return l.useSyncExternalStore(v,_,g)}function g(){return!1}function _(){return window.matchMedia(`(max-width: ${m-1}px)`).matches}function v(e){let t=window.matchMedia(`(max-width: ${m-1}px)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)}var y=`sidebar_state`,b=3600*24*7,x=`16rem`,S=`18rem`,C=`3rem`,w=`b`,T=l.createContext(null);function E(){let e=l.useContext(T);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function D({defaultOpen:e=!0,open:n,onOpenChange:r,className:i,style:a,children:o,...c}){let d=h(),[f,p]=l.useState(!1),[m,g]=l.useState(e),_=n??m,v=l.useCallback(e=>{let t=typeof e==`function`?e(_):e;r?r(t):g(t),document.cookie=`${y}=${t}; path=/; max-age=${b}`},[r,_]),S=l.useCallback(()=>d?p(e=>!e):v(e=>!e),[d,v,p]);l.useEffect(()=>{let e=e=>{e.key===w&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),S())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S]);let E=_?`expanded`:`collapsed`,D=l.useMemo(()=>({state:E,open:_,setOpen:v,isMobile:d,openMobile:f,setOpenMobile:p,toggleSidebar:S}),[E,_,v,d,f,p,S]);return(0,u.jsx)(T.Provider,{value:D,children:(0,u.jsx)(s.TooltipProvider,{delayDuration:0,children:(0,u.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":x,"--sidebar-width-icon":C,...a},className:t.cn(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full`,i),...c,children:o})})})}function O({side:e=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:i,children:o,...s}){let{isMobile:c,state:l,openMobile:d,setOpenMobile:f}=E();return r===`none`?(0,u.jsx)(`div`,{"data-slot":`sidebar`,className:t.cn(`bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col`,i),...s,children:o}):c?(0,u.jsx)(a.Sheet,{open:d,onOpenChange:f,...s,children:(0,u.jsxs)(a.SheetContent,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden`,style:{"--sidebar-width":S},side:e,children:[(0,u.jsxs)(a.SheetHeader,{className:`sr-only`,children:[(0,u.jsx)(a.SheetTitle,{children:`Sidebar`}),(0,u.jsx)(a.SheetDescription,{children:`Displays the mobile sidebar.`})]}),(0,u.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:o})]})}):(0,u.jsxs)(`div`,{className:`group peer text-sidebar-foreground hidden md:block`,"data-state":l,"data-collapsible":l===`collapsed`?r:``,"data-variant":n,"data-side":e,"data-slot":`sidebar`,children:[(0,u.jsx)(`div`,{"data-slot":`sidebar-gap`,className:t.cn(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,u.jsx)(`div`,{"data-slot":`sidebar-container`,className:t.cn(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,n===`floating`||n===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,i),...s,children:(0,u.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm`,children:o})})]})}function k(e){let r=(0,d.c)(15),i,a,o;r[0]===e?(i=r[1],a=r[2],o=r[3]):({className:i,onClick:a,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o);let{toggleSidebar:s}=E(),l;r[4]===i?l=r[5]:(l=t.cn(`size-7`,i),r[4]=i,r[5]=l);let f;r[6]!==a||r[7]!==s?(f=e=>{a?.(e),s()},r[6]=a,r[7]=s,r[8]=f):f=r[8];let p,m;r[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,u.jsx)(c.PanelLeftIcon,{}),m=(0,u.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),r[9]=p,r[10]=m):(p=r[9],m=r[10]);let h;return r[11]!==o||r[12]!==l||r[13]!==f?(h=(0,u.jsxs)(n.Button,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:l,onClick:f,...o,children:[p,m]}),r[11]=o,r[12]=l,r[13]=f,r[14]=h):h=r[14],h}function A(e){let n=(0,d.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let{toggleSidebar:a}=E(),o;n[3]===r?o=n[4]:(o=t.cn(`hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,r),n[3]=r,n[4]=o);let s;return n[5]!==i||n[6]!==o||n[7]!==a?(s=(0,u.jsx)(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:a,title:`Toggle Sidebar`,className:o,...i}),n[5]=i,n[6]=o,n[7]=a,n[8]=s):s=n[8],s}function j(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`bg-background relative flex w-full flex-1 flex-col`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`main`,{"data-slot":`sidebar-inset`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function M(e){let n=(0,d.c)(8),r,a;n[0]===e?(r=n[1],a=n[2]):({className:r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=t.cn(`bg-background h-8 w-full shadow-none`,r),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==o?(s=(0,u.jsx)(i.Input,{"data-slot":`sidebar-input`,"data-sidebar":`input`,className:o,...a}),n[5]=a,n[6]=o,n[7]=s):s=n[7],s}function N(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`flex flex-col gap-2 p-2`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function P(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`flex flex-col gap-2 p-2`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function F(e){let n=(0,d.c)(8),i,a;n[0]===e?(i=n[1],a=n[2]):({className:i,...a}=e,n[0]=e,n[1]=i,n[2]=a);let o;n[3]===i?o=n[4]:(o=t.cn(`bg-sidebar-border mx-2 w-auto`,i),n[3]=i,n[4]=o);let s;return n[5]!==a||n[6]!==o?(s=(0,u.jsx)(r.Separator,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:o,...a}),n[5]=a,n[6]=o,n[7]=s):s=n[7],s}function I(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function L(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`relative flex w-full min-w-0 flex-col p-2`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function R({className:e,asChild:n=!1,...r}){return(0,u.jsx)(n?p.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:t.cn(`text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...r})}function z({className:e,asChild:n=!1,...r}){return(0,u.jsx)(n?p.Slot:`button`,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:t.cn(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`group-data-[collapsible=icon]:hidden`,e),...r})}function B(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`w-full text-sm`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function V(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`flex w-full min-w-0 flex-col gap-1`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function H(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`group/menu-item relative`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}var U=(0,f.cva)(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function W({asChild:e=!1,isActive:n=!1,variant:r=`default`,size:i=`default`,tooltip:a,className:o,...c}){let l=e?p.Slot:`button`,{isMobile:d,state:f}=E(),m=(0,u.jsx)(l,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":i,"data-active":n,className:t.cn(U({variant:r,size:i}),o),...c});return a?(typeof a==`string`&&(a={children:a}),(0,u.jsxs)(s.Tooltip,{children:[(0,u.jsx)(s.TooltipTrigger,{asChild:!0,children:m}),(0,u.jsx)(s.TooltipContent,{side:`right`,align:`center`,hidden:f!==`collapsed`||d,...a})]})):m}function G({className:e,asChild:n=!1,showOnHover:r=!1,...i}){return(0,u.jsx)(n?p.Slot:`button`,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:t.cn(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,r&&`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0`,e),...i})}function K(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none`,`peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function q({className:e,showIcon:n=!1,...r}){let i=l.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,u.jsxs)(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:t.cn(`flex h-8 items-center gap-2 rounded-md px-2`,e),...r,children:[n&&(0,u.jsx)(o.Skeleton,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,u.jsx)(o.Skeleton,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})}function J(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function Y(e){let n=(0,d.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=t.cn(`group/menu-sub-item relative`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,u.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function X({asChild:e=!1,size:n=`md`,isActive:r=!1,className:i,...a}){return(0,u.jsx)(e?p.Slot:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":n,"data-active":r,className:t.cn(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground`,n===`sm`&&`text-xs`,n===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,i),...a})}exports.Sidebar=O,exports.SidebarContent=I,exports.SidebarFooter=P,exports.SidebarGroup=L,exports.SidebarGroupAction=z,exports.SidebarGroupContent=B,exports.SidebarGroupLabel=R,exports.SidebarHeader=N,exports.SidebarInput=M,exports.SidebarInset=j,exports.SidebarMenu=V,exports.SidebarMenuAction=G,exports.SidebarMenuBadge=K,exports.SidebarMenuButton=W,exports.SidebarMenuItem=H,exports.SidebarMenuSkeleton=q,exports.SidebarMenuSub=J,exports.SidebarMenuSubButton=X,exports.SidebarMenuSubItem=Y,exports.SidebarProvider=D,exports.SidebarRail=A,exports.SidebarSeparator=F,exports.SidebarTrigger=k,exports.useSidebar=E;
|