@still-forest/canopy 0.26.0 → 0.27.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/Layout2.js +80 -71
- package/dist/SidebarLayout.js +504 -449
- package/dist/calendar.js +189 -185
- package/dist/forms.d.ts +6 -4
- package/dist/index.d.ts +20 -8
- package/dist/index.js +24 -23
- package/dist/layout.d.ts +1 -1
- package/dist/navigation.d.ts +3 -3
- package/package.json +3 -2
package/dist/SidebarLayout.js
CHANGED
|
@@ -1,72 +1,92 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import * as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { c } from "./index2.js";
|
|
6
|
-
import { P as
|
|
7
|
-
import { F as
|
|
8
|
-
import { T as
|
|
1
|
+
import { j as t } from "./jsx-runtime.js";
|
|
2
|
+
import { c as T, u as X, b as ye, B as we, d as je, S as Te, e as Ce } from "./calendar.js";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { Fragment as ke } from "react";
|
|
5
|
+
import { c as u } from "./index2.js";
|
|
6
|
+
import { P as Y, c as Ne, a as Z, u as _e, b as Se, R as Ee, A as Re, d as C, e as J, f as Pe, g as Me, D as Oe, C as De, h as Ae, i as Ie, j as ze, k as Le, l as $e, m as He, n as Be, T as Fe, o as Ge, p as qe, O as Ue } from "./popover.js";
|
|
7
|
+
import { F as Q } from "./Layout2.js";
|
|
8
|
+
import { T as ee } from "./Heading.js";
|
|
9
9
|
/**
|
|
10
10
|
* @license lucide-react v0.525.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
const
|
|
15
|
+
const Ve = [
|
|
16
16
|
["rect", { width: "14", height: "8", x: "5", y: "2", rx: "2", key: "wc9tft" }],
|
|
17
17
|
["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", key: "w68u3i" }],
|
|
18
18
|
["path", { d: "M6 18h2", key: "rwmk9e" }],
|
|
19
19
|
["path", { d: "M12 18h6", key: "aqd8w3" }]
|
|
20
|
-
],
|
|
20
|
+
], Ke = T("computer", Ve);
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.525.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/
|
|
27
|
+
const We = [
|
|
28
|
+
["path", { d: "M12 17v4", key: "1riwvh" }],
|
|
29
|
+
["path", { d: "m14.305 7.53.923-.382", key: "1mlnsw" }],
|
|
30
|
+
["path", { d: "m15.228 4.852-.923-.383", key: "82mpwg" }],
|
|
31
|
+
["path", { d: "m16.852 3.228-.383-.924", key: "ln4sir" }],
|
|
32
|
+
["path", { d: "m16.852 8.772-.383.923", key: "1dejw0" }],
|
|
33
|
+
["path", { d: "m19.148 3.228.383-.924", key: "192kgf" }],
|
|
34
|
+
["path", { d: "m19.53 9.696-.382-.924", key: "fiavlr" }],
|
|
35
|
+
["path", { d: "m20.772 4.852.924-.383", key: "1j8mgp" }],
|
|
36
|
+
["path", { d: "m20.772 7.148.924.383", key: "zix9be" }],
|
|
37
|
+
["path", { d: "M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7", key: "1tnzv8" }],
|
|
38
|
+
["path", { d: "M8 21h8", key: "1ev6f3" }],
|
|
39
|
+
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }]
|
|
40
|
+
], Xe = T("monitor-cog", We);
|
|
21
41
|
/**
|
|
22
42
|
* @license lucide-react v0.525.0 - ISC
|
|
23
43
|
*
|
|
24
44
|
* This source code is licensed under the ISC license.
|
|
25
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
46
|
*/
|
|
27
|
-
const
|
|
47
|
+
const Ye = [
|
|
28
48
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
29
|
-
],
|
|
49
|
+
], te = T("moon", Ye);
|
|
30
50
|
/**
|
|
31
51
|
* @license lucide-react v0.525.0 - ISC
|
|
32
52
|
*
|
|
33
53
|
* This source code is licensed under the ISC license.
|
|
34
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
55
|
*/
|
|
36
|
-
const
|
|
56
|
+
const Ze = [
|
|
37
57
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
38
58
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
39
59
|
["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
|
|
40
|
-
],
|
|
60
|
+
], Je = T("panel-left-open", Ze);
|
|
41
61
|
/**
|
|
42
62
|
* @license lucide-react v0.525.0 - ISC
|
|
43
63
|
*
|
|
44
64
|
* This source code is licensed under the ISC license.
|
|
45
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
66
|
*/
|
|
47
|
-
const
|
|
67
|
+
const Qe = [
|
|
48
68
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
49
69
|
["path", { d: "M15 3v18", key: "14nvp0" }],
|
|
50
70
|
["path", { d: "m10 15-3-3 3-3", key: "1pgupc" }]
|
|
51
|
-
],
|
|
71
|
+
], et = T("panel-right-open", Qe);
|
|
52
72
|
/**
|
|
53
73
|
* @license lucide-react v0.525.0 - ISC
|
|
54
74
|
*
|
|
55
75
|
* This source code is licensed under the ISC license.
|
|
56
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
77
|
*/
|
|
58
|
-
const
|
|
78
|
+
const tt = [
|
|
59
79
|
["path", { d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6", key: "y09zxi" }],
|
|
60
80
|
["path", { d: "m21 3-9 9", key: "mpx6sq" }],
|
|
61
81
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }]
|
|
62
|
-
],
|
|
82
|
+
], at = T("square-arrow-out-up-right", tt);
|
|
63
83
|
/**
|
|
64
84
|
* @license lucide-react v0.525.0 - ISC
|
|
65
85
|
*
|
|
66
86
|
* This source code is licensed under the ISC license.
|
|
67
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
88
|
*/
|
|
69
|
-
const
|
|
89
|
+
const rt = [
|
|
70
90
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
71
91
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
72
92
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -76,223 +96,223 @@ const Je = [
|
|
|
76
96
|
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
77
97
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
78
98
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
79
|
-
],
|
|
99
|
+
], ae = T("sun", rt);
|
|
80
100
|
/**
|
|
81
101
|
* @license lucide-react v0.525.0 - ISC
|
|
82
102
|
*
|
|
83
103
|
* This source code is licensed under the ISC license.
|
|
84
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
105
|
*/
|
|
86
|
-
const
|
|
106
|
+
const ot = [
|
|
87
107
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
88
108
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
89
|
-
],
|
|
90
|
-
var
|
|
91
|
-
const { decorative: r, orientation: o = V, ...n } = e,
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
|
|
109
|
+
], nt = T("x", ot);
|
|
110
|
+
var st = "Separator", V = "horizontal", it = ["horizontal", "vertical"], re = i.forwardRef((e, a) => {
|
|
111
|
+
const { decorative: r, orientation: o = V, ...n } = e, s = lt(o) ? o : V, c = r ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
112
|
+
return /* @__PURE__ */ t.jsx(
|
|
113
|
+
Y.div,
|
|
94
114
|
{
|
|
95
|
-
"data-orientation":
|
|
96
|
-
...
|
|
115
|
+
"data-orientation": s,
|
|
116
|
+
...c,
|
|
97
117
|
...n,
|
|
98
|
-
ref:
|
|
118
|
+
ref: a
|
|
99
119
|
}
|
|
100
120
|
);
|
|
101
121
|
});
|
|
102
|
-
|
|
103
|
-
function
|
|
104
|
-
return
|
|
122
|
+
re.displayName = st;
|
|
123
|
+
function lt(e) {
|
|
124
|
+
return it.includes(e);
|
|
105
125
|
}
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
]), A =
|
|
126
|
+
var dt = re, [D, Ta] = Ne("Tooltip", [
|
|
127
|
+
Z
|
|
128
|
+
]), A = Z(), oe = "TooltipProvider", ct = 700, L = "tooltip.open", [ut, B] = D(oe), ne = (e) => {
|
|
109
129
|
const {
|
|
110
|
-
__scopeTooltip:
|
|
111
|
-
delayDuration: r =
|
|
130
|
+
__scopeTooltip: a,
|
|
131
|
+
delayDuration: r = ct,
|
|
112
132
|
skipDelayDuration: o = 300,
|
|
113
133
|
disableHoverableContent: n = !1,
|
|
114
|
-
children:
|
|
115
|
-
} = e, l =
|
|
116
|
-
return
|
|
117
|
-
const
|
|
118
|
-
return () => window.clearTimeout(
|
|
119
|
-
}, []), /* @__PURE__ */
|
|
120
|
-
|
|
134
|
+
children: s
|
|
135
|
+
} = e, l = i.useRef(!0), c = i.useRef(!1), d = i.useRef(0);
|
|
136
|
+
return i.useEffect(() => {
|
|
137
|
+
const h = d.current;
|
|
138
|
+
return () => window.clearTimeout(h);
|
|
139
|
+
}, []), /* @__PURE__ */ t.jsx(
|
|
140
|
+
ut,
|
|
121
141
|
{
|
|
122
|
-
scope:
|
|
142
|
+
scope: a,
|
|
123
143
|
isOpenDelayedRef: l,
|
|
124
144
|
delayDuration: r,
|
|
125
|
-
onOpen:
|
|
145
|
+
onOpen: i.useCallback(() => {
|
|
126
146
|
window.clearTimeout(d.current), l.current = !1;
|
|
127
147
|
}, []),
|
|
128
|
-
onClose:
|
|
148
|
+
onClose: i.useCallback(() => {
|
|
129
149
|
window.clearTimeout(d.current), d.current = window.setTimeout(
|
|
130
150
|
() => l.current = !0,
|
|
131
151
|
o
|
|
132
152
|
);
|
|
133
153
|
}, [o]),
|
|
134
|
-
isPointerInTransitRef:
|
|
135
|
-
onPointerInTransitChange:
|
|
136
|
-
|
|
154
|
+
isPointerInTransitRef: c,
|
|
155
|
+
onPointerInTransitChange: i.useCallback((h) => {
|
|
156
|
+
c.current = h;
|
|
137
157
|
}, []),
|
|
138
158
|
disableHoverableContent: n,
|
|
139
|
-
children:
|
|
159
|
+
children: s
|
|
140
160
|
}
|
|
141
161
|
);
|
|
142
162
|
};
|
|
143
|
-
|
|
144
|
-
var R = "Tooltip", [
|
|
163
|
+
ne.displayName = oe;
|
|
164
|
+
var R = "Tooltip", [pt, P] = D(R), se = (e) => {
|
|
145
165
|
const {
|
|
146
|
-
__scopeTooltip:
|
|
166
|
+
__scopeTooltip: a,
|
|
147
167
|
children: r,
|
|
148
168
|
open: o,
|
|
149
169
|
defaultOpen: n,
|
|
150
|
-
onOpenChange:
|
|
170
|
+
onOpenChange: s,
|
|
151
171
|
disableHoverableContent: l,
|
|
152
|
-
delayDuration:
|
|
153
|
-
} = e, d = B(R, e.__scopeTooltip),
|
|
172
|
+
delayDuration: c
|
|
173
|
+
} = e, d = B(R, e.__scopeTooltip), h = A(a), [p, b] = i.useState(null), x = _e(), f = i.useRef(0), v = l ?? d.disableHoverableContent, y = c ?? d.delayDuration, w = i.useRef(!1), [m, g] = Se({
|
|
154
174
|
prop: o,
|
|
155
175
|
defaultProp: n ?? !1,
|
|
156
|
-
onChange: (
|
|
157
|
-
|
|
176
|
+
onChange: (U) => {
|
|
177
|
+
U ? (d.onOpen(), document.dispatchEvent(new CustomEvent(L))) : d.onClose(), s?.(U);
|
|
158
178
|
},
|
|
159
179
|
caller: R
|
|
160
|
-
}),
|
|
161
|
-
window.clearTimeout(
|
|
162
|
-
}, [
|
|
163
|
-
window.clearTimeout(
|
|
164
|
-
}, [
|
|
165
|
-
window.clearTimeout(
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
}, [
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
-
}, []), /* @__PURE__ */
|
|
172
|
-
|
|
180
|
+
}), _ = i.useMemo(() => m ? w.current ? "delayed-open" : "instant-open" : "closed", [m]), S = i.useCallback(() => {
|
|
181
|
+
window.clearTimeout(f.current), f.current = 0, w.current = !1, g(!0);
|
|
182
|
+
}, [g]), E = i.useCallback(() => {
|
|
183
|
+
window.clearTimeout(f.current), f.current = 0, g(!1);
|
|
184
|
+
}, [g]), q = i.useCallback(() => {
|
|
185
|
+
window.clearTimeout(f.current), f.current = window.setTimeout(() => {
|
|
186
|
+
w.current = !0, g(!0), f.current = 0;
|
|
187
|
+
}, y);
|
|
188
|
+
}, [y, g]);
|
|
189
|
+
return i.useEffect(() => () => {
|
|
190
|
+
f.current && (window.clearTimeout(f.current), f.current = 0);
|
|
191
|
+
}, []), /* @__PURE__ */ t.jsx(Ee, { ...h, children: /* @__PURE__ */ t.jsx(
|
|
192
|
+
pt,
|
|
173
193
|
{
|
|
174
|
-
scope:
|
|
194
|
+
scope: a,
|
|
175
195
|
contentId: x,
|
|
176
|
-
open:
|
|
177
|
-
stateAttribute:
|
|
196
|
+
open: m,
|
|
197
|
+
stateAttribute: _,
|
|
178
198
|
trigger: p,
|
|
179
199
|
onTriggerChange: b,
|
|
180
|
-
onTriggerEnter:
|
|
181
|
-
d.isOpenDelayedRef.current ? q() :
|
|
182
|
-
}, [d.isOpenDelayedRef, q,
|
|
183
|
-
onTriggerLeave:
|
|
184
|
-
v ?
|
|
185
|
-
}, [
|
|
186
|
-
onOpen:
|
|
187
|
-
onClose:
|
|
200
|
+
onTriggerEnter: i.useCallback(() => {
|
|
201
|
+
d.isOpenDelayedRef.current ? q() : S();
|
|
202
|
+
}, [d.isOpenDelayedRef, q, S]),
|
|
203
|
+
onTriggerLeave: i.useCallback(() => {
|
|
204
|
+
v ? E() : (window.clearTimeout(f.current), f.current = 0);
|
|
205
|
+
}, [E, v]),
|
|
206
|
+
onOpen: S,
|
|
207
|
+
onClose: E,
|
|
188
208
|
disableHoverableContent: v,
|
|
189
209
|
children: r
|
|
190
210
|
}
|
|
191
211
|
) });
|
|
192
212
|
};
|
|
193
|
-
|
|
194
|
-
var
|
|
195
|
-
(e,
|
|
196
|
-
const { __scopeTooltip: r, ...o } = e, n = P(
|
|
197
|
-
return
|
|
198
|
-
|
|
213
|
+
se.displayName = R;
|
|
214
|
+
var $ = "TooltipTrigger", ie = i.forwardRef(
|
|
215
|
+
(e, a) => {
|
|
216
|
+
const { __scopeTooltip: r, ...o } = e, n = P($, r), s = B($, r), l = A(r), c = i.useRef(null), d = X(a, c, n.onTriggerChange), h = i.useRef(!1), p = i.useRef(!1), b = i.useCallback(() => h.current = !1, []);
|
|
217
|
+
return i.useEffect(() => () => document.removeEventListener("pointerup", b), [b]), /* @__PURE__ */ t.jsx(Re, { asChild: !0, ...l, children: /* @__PURE__ */ t.jsx(
|
|
218
|
+
Y.button,
|
|
199
219
|
{
|
|
200
220
|
"aria-describedby": n.open ? n.contentId : void 0,
|
|
201
221
|
"data-state": n.stateAttribute,
|
|
202
222
|
...o,
|
|
203
223
|
ref: d,
|
|
204
|
-
onPointerMove:
|
|
205
|
-
x.pointerType !== "touch" && !p.current && !
|
|
224
|
+
onPointerMove: C(e.onPointerMove, (x) => {
|
|
225
|
+
x.pointerType !== "touch" && !p.current && !s.isPointerInTransitRef.current && (n.onTriggerEnter(), p.current = !0);
|
|
206
226
|
}),
|
|
207
|
-
onPointerLeave:
|
|
227
|
+
onPointerLeave: C(e.onPointerLeave, () => {
|
|
208
228
|
n.onTriggerLeave(), p.current = !1;
|
|
209
229
|
}),
|
|
210
|
-
onPointerDown:
|
|
211
|
-
n.open && n.onClose(),
|
|
230
|
+
onPointerDown: C(e.onPointerDown, () => {
|
|
231
|
+
n.open && n.onClose(), h.current = !0, document.addEventListener("pointerup", b, { once: !0 });
|
|
212
232
|
}),
|
|
213
|
-
onFocus:
|
|
214
|
-
|
|
233
|
+
onFocus: C(e.onFocus, () => {
|
|
234
|
+
h.current || n.onOpen();
|
|
215
235
|
}),
|
|
216
|
-
onBlur:
|
|
217
|
-
onClick:
|
|
236
|
+
onBlur: C(e.onBlur, n.onClose),
|
|
237
|
+
onClick: C(e.onClick, n.onClose)
|
|
218
238
|
}
|
|
219
239
|
) });
|
|
220
240
|
}
|
|
221
241
|
);
|
|
222
|
-
|
|
223
|
-
var F = "TooltipPortal", [
|
|
242
|
+
ie.displayName = $;
|
|
243
|
+
var F = "TooltipPortal", [ht, ft] = D(F, {
|
|
224
244
|
forceMount: void 0
|
|
225
|
-
}),
|
|
226
|
-
const { __scopeTooltip:
|
|
227
|
-
return /* @__PURE__ */
|
|
245
|
+
}), le = (e) => {
|
|
246
|
+
const { __scopeTooltip: a, forceMount: r, children: o, container: n } = e, s = P(F, a);
|
|
247
|
+
return /* @__PURE__ */ t.jsx(ht, { scope: a, forceMount: r, children: /* @__PURE__ */ t.jsx(J, { present: r || s.open, children: /* @__PURE__ */ t.jsx(Pe, { asChild: !0, container: n, children: o }) }) });
|
|
228
248
|
};
|
|
229
|
-
|
|
230
|
-
var
|
|
231
|
-
(e,
|
|
232
|
-
const r =
|
|
233
|
-
return /* @__PURE__ */
|
|
249
|
+
le.displayName = F;
|
|
250
|
+
var k = "TooltipContent", de = i.forwardRef(
|
|
251
|
+
(e, a) => {
|
|
252
|
+
const r = ft(k, e.__scopeTooltip), { forceMount: o = r.forceMount, side: n = "top", ...s } = e, l = P(k, e.__scopeTooltip);
|
|
253
|
+
return /* @__PURE__ */ t.jsx(J, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ t.jsx(ce, { side: n, ...s, ref: a }) : /* @__PURE__ */ t.jsx(xt, { side: n, ...s, ref: a }) });
|
|
234
254
|
}
|
|
235
|
-
),
|
|
236
|
-
const r = P(
|
|
237
|
-
|
|
238
|
-
}, [b]),
|
|
239
|
-
(v,
|
|
240
|
-
const
|
|
241
|
-
|
|
255
|
+
), xt = i.forwardRef((e, a) => {
|
|
256
|
+
const r = P(k, e.__scopeTooltip), o = B(k, e.__scopeTooltip), n = i.useRef(null), s = X(a, n), [l, c] = i.useState(null), { trigger: d, onClose: h } = r, p = n.current, { onPointerInTransitChange: b } = o, x = i.useCallback(() => {
|
|
257
|
+
c(null), b(!1);
|
|
258
|
+
}, [b]), f = i.useCallback(
|
|
259
|
+
(v, y) => {
|
|
260
|
+
const w = v.currentTarget, m = { x: v.clientX, y: v.clientY }, g = vt(m, w.getBoundingClientRect()), _ = yt(m, g), S = wt(y.getBoundingClientRect()), E = Tt([..._, ...S]);
|
|
261
|
+
c(E), b(!0);
|
|
242
262
|
},
|
|
243
263
|
[b]
|
|
244
264
|
);
|
|
245
|
-
return
|
|
265
|
+
return i.useEffect(() => () => x(), [x]), i.useEffect(() => {
|
|
246
266
|
if (d && p) {
|
|
247
|
-
const v = (
|
|
248
|
-
return d.addEventListener("pointerleave", v), p.addEventListener("pointerleave",
|
|
249
|
-
d.removeEventListener("pointerleave", v), p.removeEventListener("pointerleave",
|
|
267
|
+
const v = (w) => f(w, p), y = (w) => f(w, d);
|
|
268
|
+
return d.addEventListener("pointerleave", v), p.addEventListener("pointerleave", y), () => {
|
|
269
|
+
d.removeEventListener("pointerleave", v), p.removeEventListener("pointerleave", y);
|
|
250
270
|
};
|
|
251
271
|
}
|
|
252
|
-
}, [d, p,
|
|
272
|
+
}, [d, p, f, x]), i.useEffect(() => {
|
|
253
273
|
if (l) {
|
|
254
|
-
const v = (
|
|
255
|
-
const
|
|
256
|
-
|
|
274
|
+
const v = (y) => {
|
|
275
|
+
const w = y.target, m = { x: y.clientX, y: y.clientY }, g = d?.contains(w) || p?.contains(w), _ = !jt(m, l);
|
|
276
|
+
g ? x() : _ && (x(), h());
|
|
257
277
|
};
|
|
258
278
|
return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
|
|
259
279
|
}
|
|
260
|
-
}, [d, p, l,
|
|
261
|
-
}), [
|
|
262
|
-
(e,
|
|
280
|
+
}, [d, p, l, h, x]), /* @__PURE__ */ t.jsx(ce, { ...e, ref: s });
|
|
281
|
+
}), [bt, mt] = D(R, { isInside: !1 }), gt = ye("TooltipContent"), ce = i.forwardRef(
|
|
282
|
+
(e, a) => {
|
|
263
283
|
const {
|
|
264
284
|
__scopeTooltip: r,
|
|
265
285
|
children: o,
|
|
266
286
|
"aria-label": n,
|
|
267
|
-
onEscapeKeyDown:
|
|
287
|
+
onEscapeKeyDown: s,
|
|
268
288
|
onPointerDownOutside: l,
|
|
269
|
-
...
|
|
270
|
-
} = e, d = P(
|
|
271
|
-
return
|
|
289
|
+
...c
|
|
290
|
+
} = e, d = P(k, r), h = A(r), { onClose: p } = d;
|
|
291
|
+
return i.useEffect(() => (document.addEventListener(L, p), () => document.removeEventListener(L, p)), [p]), i.useEffect(() => {
|
|
272
292
|
if (d.trigger) {
|
|
273
293
|
const b = (x) => {
|
|
274
294
|
x.target?.contains(d.trigger) && p();
|
|
275
295
|
};
|
|
276
296
|
return window.addEventListener("scroll", b, { capture: !0 }), () => window.removeEventListener("scroll", b, { capture: !0 });
|
|
277
297
|
}
|
|
278
|
-
}, [d.trigger, p]), /* @__PURE__ */
|
|
279
|
-
|
|
298
|
+
}, [d.trigger, p]), /* @__PURE__ */ t.jsx(
|
|
299
|
+
Oe,
|
|
280
300
|
{
|
|
281
301
|
asChild: !0,
|
|
282
302
|
disableOutsidePointerEvents: !1,
|
|
283
|
-
onEscapeKeyDown:
|
|
303
|
+
onEscapeKeyDown: s,
|
|
284
304
|
onPointerDownOutside: l,
|
|
285
305
|
onFocusOutside: (b) => b.preventDefault(),
|
|
286
306
|
onDismiss: p,
|
|
287
|
-
children: /* @__PURE__ */
|
|
288
|
-
|
|
307
|
+
children: /* @__PURE__ */ t.jsxs(
|
|
308
|
+
De,
|
|
289
309
|
{
|
|
290
310
|
"data-state": d.stateAttribute,
|
|
291
|
-
...
|
|
292
|
-
...
|
|
293
|
-
ref:
|
|
311
|
+
...h,
|
|
312
|
+
...c,
|
|
313
|
+
ref: a,
|
|
294
314
|
style: {
|
|
295
|
-
...
|
|
315
|
+
...c.style,
|
|
296
316
|
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
297
317
|
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
298
318
|
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -300,8 +320,8 @@ var C = "TooltipContent", oe = s.forwardRef(
|
|
|
300
320
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
301
321
|
},
|
|
302
322
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ t.jsx(gt, { children: o }),
|
|
324
|
+
/* @__PURE__ */ t.jsx(bt, { scope: r, isInside: !0, children: /* @__PURE__ */ t.jsx(Ae, { id: d.contentId, role: "tooltip", children: n || o }) })
|
|
305
325
|
]
|
|
306
326
|
}
|
|
307
327
|
)
|
|
@@ -309,21 +329,21 @@ var C = "TooltipContent", oe = s.forwardRef(
|
|
|
309
329
|
);
|
|
310
330
|
}
|
|
311
331
|
);
|
|
312
|
-
|
|
313
|
-
var
|
|
314
|
-
(e,
|
|
332
|
+
de.displayName = k;
|
|
333
|
+
var ue = "TooltipArrow", pe = i.forwardRef(
|
|
334
|
+
(e, a) => {
|
|
315
335
|
const { __scopeTooltip: r, ...o } = e, n = A(r);
|
|
316
|
-
return
|
|
317
|
-
|
|
336
|
+
return mt(
|
|
337
|
+
ue,
|
|
318
338
|
r
|
|
319
|
-
).isInside ? null : /* @__PURE__ */
|
|
339
|
+
).isInside ? null : /* @__PURE__ */ t.jsx(Me, { ...n, ...o, ref: a });
|
|
320
340
|
}
|
|
321
341
|
);
|
|
322
|
-
|
|
323
|
-
function
|
|
324
|
-
const r = Math.abs(
|
|
325
|
-
switch (Math.min(r, o, n,
|
|
326
|
-
case
|
|
342
|
+
pe.displayName = ue;
|
|
343
|
+
function vt(e, a) {
|
|
344
|
+
const r = Math.abs(a.top - e.y), o = Math.abs(a.bottom - e.y), n = Math.abs(a.right - e.x), s = Math.abs(a.left - e.x);
|
|
345
|
+
switch (Math.min(r, o, n, s)) {
|
|
346
|
+
case s:
|
|
327
347
|
return "left";
|
|
328
348
|
case n:
|
|
329
349
|
return "right";
|
|
@@ -335,9 +355,9 @@ function xt(e, t) {
|
|
|
335
355
|
throw new Error("unreachable");
|
|
336
356
|
}
|
|
337
357
|
}
|
|
338
|
-
function
|
|
358
|
+
function yt(e, a, r = 5) {
|
|
339
359
|
const o = [];
|
|
340
|
-
switch (
|
|
360
|
+
switch (a) {
|
|
341
361
|
case "top":
|
|
342
362
|
o.push(
|
|
343
363
|
{ x: e.x - r, y: e.y + r },
|
|
@@ -365,211 +385,268 @@ function bt(e, t, r = 5) {
|
|
|
365
385
|
}
|
|
366
386
|
return o;
|
|
367
387
|
}
|
|
368
|
-
function
|
|
369
|
-
const { top:
|
|
388
|
+
function wt(e) {
|
|
389
|
+
const { top: a, right: r, bottom: o, left: n } = e;
|
|
370
390
|
return [
|
|
371
|
-
{ x: n, y:
|
|
372
|
-
{ x: r, y:
|
|
391
|
+
{ x: n, y: a },
|
|
392
|
+
{ x: r, y: a },
|
|
373
393
|
{ x: r, y: o },
|
|
374
394
|
{ x: n, y: o }
|
|
375
395
|
];
|
|
376
396
|
}
|
|
377
|
-
function
|
|
397
|
+
function jt(e, a) {
|
|
378
398
|
const { x: r, y: o } = e;
|
|
379
399
|
let n = !1;
|
|
380
|
-
for (let
|
|
381
|
-
const
|
|
382
|
-
p > o != x > o && r < (b -
|
|
400
|
+
for (let s = 0, l = a.length - 1; s < a.length; l = s++) {
|
|
401
|
+
const c = a[s], d = a[l], h = c.x, p = c.y, b = d.x, x = d.y;
|
|
402
|
+
p > o != x > o && r < (b - h) * (o - p) / (x - p) + h && (n = !n);
|
|
383
403
|
}
|
|
384
404
|
return n;
|
|
385
405
|
}
|
|
386
|
-
function
|
|
387
|
-
const
|
|
388
|
-
return
|
|
406
|
+
function Tt(e) {
|
|
407
|
+
const a = e.slice();
|
|
408
|
+
return a.sort((r, o) => r.x < o.x ? -1 : r.x > o.x ? 1 : r.y < o.y ? -1 : r.y > o.y ? 1 : 0), Ct(a);
|
|
389
409
|
}
|
|
390
|
-
function
|
|
410
|
+
function Ct(e) {
|
|
391
411
|
if (e.length <= 1) return e.slice();
|
|
392
|
-
const
|
|
412
|
+
const a = [];
|
|
393
413
|
for (let o = 0; o < e.length; o++) {
|
|
394
414
|
const n = e[o];
|
|
395
|
-
for (;
|
|
396
|
-
const
|
|
397
|
-
if ((
|
|
415
|
+
for (; a.length >= 2; ) {
|
|
416
|
+
const s = a[a.length - 1], l = a[a.length - 2];
|
|
417
|
+
if ((s.x - l.x) * (n.y - l.y) >= (s.y - l.y) * (n.x - l.x)) a.pop();
|
|
398
418
|
else break;
|
|
399
419
|
}
|
|
400
|
-
|
|
420
|
+
a.push(n);
|
|
401
421
|
}
|
|
402
|
-
|
|
422
|
+
a.pop();
|
|
403
423
|
const r = [];
|
|
404
424
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
405
425
|
const n = e[o];
|
|
406
426
|
for (; r.length >= 2; ) {
|
|
407
|
-
const
|
|
408
|
-
if ((
|
|
427
|
+
const s = r[r.length - 1], l = r[r.length - 2];
|
|
428
|
+
if ((s.x - l.x) * (n.y - l.y) >= (s.y - l.y) * (n.x - l.x)) r.pop();
|
|
409
429
|
else break;
|
|
410
430
|
}
|
|
411
431
|
r.push(n);
|
|
412
432
|
}
|
|
413
|
-
return r.pop(),
|
|
433
|
+
return r.pop(), a.length === 1 && r.length === 1 && a[0].x === r[0].x && a[0].y === r[0].y ? a : a.concat(r);
|
|
414
434
|
}
|
|
415
|
-
var
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
function
|
|
435
|
+
var kt = ne, Nt = se, _t = ie, St = le, Et = de, Rt = pe;
|
|
436
|
+
const he = ({ children: e, ...a }) => /* @__PURE__ */ t.jsx(Ie, { ...a, children: e });
|
|
437
|
+
he.Trigger = ze;
|
|
438
|
+
he.Content = Le;
|
|
439
|
+
function Pt({
|
|
420
440
|
className: e,
|
|
421
|
-
orientation:
|
|
441
|
+
orientation: a = "horizontal",
|
|
422
442
|
decorative: r = !0,
|
|
423
443
|
...o
|
|
424
444
|
}) {
|
|
425
|
-
return /* @__PURE__ */
|
|
426
|
-
|
|
445
|
+
return /* @__PURE__ */ t.jsx(
|
|
446
|
+
dt,
|
|
427
447
|
{
|
|
428
|
-
className:
|
|
448
|
+
className: u(
|
|
429
449
|
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
|
|
430
450
|
e
|
|
431
451
|
),
|
|
432
452
|
"data-slot": "separator-root",
|
|
433
453
|
decorative: r,
|
|
434
|
-
orientation:
|
|
454
|
+
orientation: a,
|
|
435
455
|
...o
|
|
436
456
|
}
|
|
437
457
|
);
|
|
438
458
|
}
|
|
439
|
-
function
|
|
440
|
-
return /* @__PURE__ */
|
|
459
|
+
function Mt({ className: e, ...a }) {
|
|
460
|
+
return /* @__PURE__ */ t.jsx("div", { className: "relative w-full overflow-x-auto", "data-slot": "table-container", children: /* @__PURE__ */ t.jsx("table", { className: u("w-full caption-bottom text-sm", e), "data-slot": "table", ...a }) });
|
|
441
461
|
}
|
|
442
|
-
function
|
|
443
|
-
return /* @__PURE__ */
|
|
462
|
+
function Ot({ className: e, ...a }) {
|
|
463
|
+
return /* @__PURE__ */ t.jsx("thead", { className: u("[&_tr]:border-b", e), "data-slot": "table-header", ...a });
|
|
444
464
|
}
|
|
445
|
-
function
|
|
446
|
-
return /* @__PURE__ */
|
|
465
|
+
function Dt({ className: e, ...a }) {
|
|
466
|
+
return /* @__PURE__ */ t.jsx("tbody", { className: u("[&_tr:last-child]:border-0", e), "data-slot": "table-body", ...a });
|
|
447
467
|
}
|
|
448
|
-
function
|
|
449
|
-
return /* @__PURE__ */
|
|
468
|
+
function At({ className: e, ...a }) {
|
|
469
|
+
return /* @__PURE__ */ t.jsx(
|
|
450
470
|
"tr",
|
|
451
471
|
{
|
|
452
|
-
className:
|
|
472
|
+
className: u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", e),
|
|
453
473
|
"data-slot": "table-row",
|
|
454
|
-
...
|
|
474
|
+
...a
|
|
455
475
|
}
|
|
456
476
|
);
|
|
457
477
|
}
|
|
458
|
-
function
|
|
459
|
-
return /* @__PURE__ */
|
|
478
|
+
function It({ className: e, ...a }) {
|
|
479
|
+
return /* @__PURE__ */ t.jsx(
|
|
460
480
|
"th",
|
|
461
481
|
{
|
|
462
|
-
className:
|
|
482
|
+
className: u(
|
|
463
483
|
"h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
464
484
|
e
|
|
465
485
|
),
|
|
466
486
|
"data-slot": "table-head",
|
|
467
|
-
...
|
|
487
|
+
...a
|
|
468
488
|
}
|
|
469
489
|
);
|
|
470
490
|
}
|
|
471
|
-
function
|
|
472
|
-
return /* @__PURE__ */
|
|
491
|
+
function zt({ className: e, ...a }) {
|
|
492
|
+
return /* @__PURE__ */ t.jsx(
|
|
473
493
|
"td",
|
|
474
494
|
{
|
|
475
|
-
className:
|
|
495
|
+
className: u(
|
|
476
496
|
"whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
477
497
|
e
|
|
478
498
|
),
|
|
479
499
|
"data-slot": "table-cell",
|
|
480
|
-
...
|
|
500
|
+
...a
|
|
481
501
|
}
|
|
482
502
|
);
|
|
483
503
|
}
|
|
484
|
-
function
|
|
485
|
-
return /* @__PURE__ */
|
|
504
|
+
function Lt({ className: e, ...a }) {
|
|
505
|
+
return /* @__PURE__ */ t.jsx("caption", { className: u("mt-4 text-muted-foreground text-sm", e), "data-slot": "table-caption", ...a });
|
|
486
506
|
}
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
507
|
+
const N = ({ children: e, ...a }) => /* @__PURE__ */ t.jsx(Mt, { ...a, children: e });
|
|
508
|
+
N.Body = Dt;
|
|
509
|
+
N.Caption = Lt;
|
|
510
|
+
N.Cell = zt;
|
|
511
|
+
N.Head = It;
|
|
512
|
+
N.Header = Ot;
|
|
513
|
+
N.Row = At;
|
|
514
|
+
const K = [
|
|
515
|
+
{
|
|
516
|
+
theme: "light",
|
|
517
|
+
icon: /* @__PURE__ */ t.jsx(ae, {}),
|
|
518
|
+
label: "Light mode"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
theme: "dark",
|
|
522
|
+
icon: /* @__PURE__ */ t.jsx(te, {}),
|
|
523
|
+
label: "Dark mode"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
theme: "system",
|
|
527
|
+
icon: /* @__PURE__ */ t.jsx(Ke, {}),
|
|
528
|
+
label: "System theme"
|
|
529
|
+
}
|
|
530
|
+
], $t = ({ theme: e, setTheme: a, className: r, buttonClassName: o, ...n }) => {
|
|
531
|
+
const s = () => {
|
|
532
|
+
a(e === "light" ? "dark" : e === "dark" ? "system" : "light");
|
|
533
|
+
}, l = K.find((d) => d.theme === e)?.icon, c = K.find((d) => d.theme === e)?.label;
|
|
534
|
+
return /* @__PURE__ */ t.jsx("span", { className: u(r), ...n, children: /* @__PURE__ */ t.jsxs(we, { className: u("p-1 w-full", o), onClick: s, variant: "unstyled", children: [
|
|
535
|
+
l,
|
|
536
|
+
/* @__PURE__ */ t.jsx(ee, { size: "base", truncate: !0, children: c })
|
|
537
|
+
] }) });
|
|
538
|
+
}, Ht = ({
|
|
539
|
+
variant: e = "horizontal",
|
|
540
|
+
theme: a,
|
|
541
|
+
setTheme: r,
|
|
542
|
+
className: o,
|
|
543
|
+
buttonClassName: n,
|
|
544
|
+
...s
|
|
545
|
+
}) => {
|
|
546
|
+
const l = (c) => a === c ? "text-primary/75" : "text-primary/25 hover:text-primary";
|
|
547
|
+
return e === "stacked" ? /* @__PURE__ */ t.jsx(
|
|
548
|
+
$t,
|
|
549
|
+
{
|
|
550
|
+
buttonClassName: n,
|
|
551
|
+
className: o,
|
|
552
|
+
setTheme: r,
|
|
553
|
+
theme: a,
|
|
554
|
+
...s
|
|
555
|
+
}
|
|
556
|
+
) : /* @__PURE__ */ t.jsxs(Q, { gap: "4", children: [
|
|
557
|
+
/* @__PURE__ */ t.jsxs(j, { children: [
|
|
558
|
+
/* @__PURE__ */ t.jsx(j.Trigger, { children: /* @__PURE__ */ t.jsx(Xe, { className: l("system"), onClick: () => r("system"), size: 32 }) }),
|
|
559
|
+
/* @__PURE__ */ t.jsx(j.Content, { children: "Use system theme" })
|
|
560
|
+
] }),
|
|
561
|
+
/* @__PURE__ */ t.jsxs(j, { children: [
|
|
562
|
+
/* @__PURE__ */ t.jsx(j.Trigger, { children: /* @__PURE__ */ t.jsx(ae, { className: l("light"), onClick: () => r("light"), size: 32 }) }),
|
|
563
|
+
/* @__PURE__ */ t.jsx(j.Content, { children: "Use light theme" })
|
|
564
|
+
] }),
|
|
565
|
+
/* @__PURE__ */ t.jsxs(j, { children: [
|
|
566
|
+
/* @__PURE__ */ t.jsx(j.Trigger, { children: /* @__PURE__ */ t.jsx(te, { className: l("dark"), onClick: () => r("dark"), size: 32 }) }),
|
|
567
|
+
/* @__PURE__ */ t.jsx(j.Content, { children: "Use dark theme" })
|
|
568
|
+
] })
|
|
569
|
+
] });
|
|
570
|
+
};
|
|
571
|
+
function G({ delayDuration: e = 0, ...a }) {
|
|
572
|
+
return /* @__PURE__ */ t.jsx(kt, { "data-slot": "tooltip-provider", delayDuration: e, ...a });
|
|
496
573
|
}
|
|
497
|
-
function
|
|
498
|
-
return /* @__PURE__ */
|
|
574
|
+
function fe({ ...e }) {
|
|
575
|
+
return /* @__PURE__ */ t.jsx(G, { children: /* @__PURE__ */ t.jsx(Nt, { "data-slot": "tooltip", ...e }) });
|
|
499
576
|
}
|
|
500
|
-
function
|
|
501
|
-
return /* @__PURE__ */
|
|
577
|
+
function xe({ ...e }) {
|
|
578
|
+
return /* @__PURE__ */ t.jsx(_t, { "data-slot": "tooltip-trigger", ...e });
|
|
502
579
|
}
|
|
503
|
-
function
|
|
580
|
+
function be({
|
|
504
581
|
className: e,
|
|
505
|
-
sideOffset:
|
|
582
|
+
sideOffset: a = 0,
|
|
506
583
|
children: r,
|
|
507
584
|
...o
|
|
508
585
|
}) {
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
|
|
586
|
+
return /* @__PURE__ */ t.jsx(St, { children: /* @__PURE__ */ t.jsxs(
|
|
587
|
+
Et,
|
|
511
588
|
{
|
|
512
|
-
className:
|
|
589
|
+
className: u(
|
|
513
590
|
"fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in text-balance rounded-md bg-primary px-3 py-1.5 text-primary-foreground text-xs data-[state=closed]:animate-out",
|
|
514
591
|
e
|
|
515
592
|
),
|
|
516
593
|
"data-slot": "tooltip-content",
|
|
517
|
-
sideOffset:
|
|
594
|
+
sideOffset: a,
|
|
518
595
|
...o,
|
|
519
596
|
children: [
|
|
520
597
|
r,
|
|
521
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ t.jsx(Rt, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary" })
|
|
522
599
|
]
|
|
523
600
|
}
|
|
524
601
|
) });
|
|
525
602
|
}
|
|
526
|
-
const
|
|
527
|
-
|
|
603
|
+
const j = ({ children: e, open: a, onOpenChange: r }) => /* @__PURE__ */ t.jsx(G, { children: /* @__PURE__ */ t.jsx(fe, { onOpenChange: r, open: a, children: e }) }), Bt = ({ children: e, cursor: a = "pointer", className: r }) => /* @__PURE__ */ t.jsx(
|
|
604
|
+
xe,
|
|
528
605
|
{
|
|
529
606
|
asChild: !0,
|
|
530
|
-
className:
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
607
|
+
className: u(
|
|
608
|
+
a === "arrow" && "cursor-default",
|
|
609
|
+
a === "pointer" && "cursor-pointer",
|
|
610
|
+
a === "text" && "cursor-text",
|
|
611
|
+
a === "not-allowed" && "cursor-not-allowed",
|
|
535
612
|
r
|
|
536
613
|
),
|
|
537
614
|
children: e
|
|
538
615
|
}
|
|
539
|
-
),
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
function
|
|
543
|
-
return /* @__PURE__ */
|
|
616
|
+
), Ft = ({ children: e }) => /* @__PURE__ */ t.jsx(be, { children: e });
|
|
617
|
+
j.Trigger = Bt;
|
|
618
|
+
j.Content = Ft;
|
|
619
|
+
function Gt({ ...e }) {
|
|
620
|
+
return /* @__PURE__ */ t.jsx($e, { "data-slot": "sheet", ...e });
|
|
544
621
|
}
|
|
545
|
-
function
|
|
546
|
-
return /* @__PURE__ */
|
|
622
|
+
function qt({ ...e }) {
|
|
623
|
+
return /* @__PURE__ */ t.jsx(qe, { "data-slot": "sheet-portal", ...e });
|
|
547
624
|
}
|
|
548
|
-
function
|
|
549
|
-
return /* @__PURE__ */
|
|
550
|
-
|
|
625
|
+
function Ut({ className: e, ...a }) {
|
|
626
|
+
return /* @__PURE__ */ t.jsx(
|
|
627
|
+
Ue,
|
|
551
628
|
{
|
|
552
|
-
className:
|
|
629
|
+
className: u(
|
|
553
630
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
554
631
|
e
|
|
555
632
|
),
|
|
556
633
|
"data-slot": "sheet-overlay",
|
|
557
|
-
...
|
|
634
|
+
...a
|
|
558
635
|
}
|
|
559
636
|
);
|
|
560
637
|
}
|
|
561
|
-
function
|
|
638
|
+
function Vt({
|
|
562
639
|
className: e,
|
|
563
|
-
children:
|
|
640
|
+
children: a,
|
|
564
641
|
side: r = "right",
|
|
565
642
|
...o
|
|
566
643
|
}) {
|
|
567
|
-
return /* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
|
|
644
|
+
return /* @__PURE__ */ t.jsxs(qt, { children: [
|
|
645
|
+
/* @__PURE__ */ t.jsx(Ut, {}),
|
|
646
|
+
/* @__PURE__ */ t.jsxs(
|
|
647
|
+
He,
|
|
571
648
|
{
|
|
572
|
-
className:
|
|
649
|
+
className: u(
|
|
573
650
|
"fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
574
651
|
r === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
575
652
|
r === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
@@ -580,124 +657,124 @@ function $t({
|
|
|
580
657
|
"data-slot": "sheet-content",
|
|
581
658
|
...o,
|
|
582
659
|
children: [
|
|
583
|
-
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
586
|
-
/* @__PURE__ */
|
|
660
|
+
a,
|
|
661
|
+
/* @__PURE__ */ t.jsxs(Be, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
662
|
+
/* @__PURE__ */ t.jsx(nt, { className: "size-4" }),
|
|
663
|
+
/* @__PURE__ */ t.jsx("span", { className: "sr-only", children: "Close" })
|
|
587
664
|
] })
|
|
588
665
|
]
|
|
589
666
|
}
|
|
590
667
|
)
|
|
591
668
|
] });
|
|
592
669
|
}
|
|
593
|
-
function
|
|
594
|
-
return /* @__PURE__ */
|
|
670
|
+
function Kt({ className: e, ...a }) {
|
|
671
|
+
return /* @__PURE__ */ t.jsx("div", { className: u("flex flex-col gap-1.5 p-4", e), "data-slot": "sheet-header", ...a });
|
|
595
672
|
}
|
|
596
|
-
function
|
|
597
|
-
return /* @__PURE__ */
|
|
598
|
-
|
|
673
|
+
function Wt({ className: e, ...a }) {
|
|
674
|
+
return /* @__PURE__ */ t.jsx(
|
|
675
|
+
Fe,
|
|
599
676
|
{
|
|
600
|
-
className:
|
|
677
|
+
className: u("font-semibold text-foreground", e),
|
|
601
678
|
"data-slot": "sheet-title",
|
|
602
|
-
...
|
|
679
|
+
...a
|
|
603
680
|
}
|
|
604
681
|
);
|
|
605
682
|
}
|
|
606
|
-
function
|
|
607
|
-
return /* @__PURE__ */
|
|
608
|
-
|
|
683
|
+
function Xt({ className: e, ...a }) {
|
|
684
|
+
return /* @__PURE__ */ t.jsx(
|
|
685
|
+
Ge,
|
|
609
686
|
{
|
|
610
|
-
className:
|
|
687
|
+
className: u("text-muted-foreground text-sm", e),
|
|
611
688
|
"data-slot": "sheet-description",
|
|
612
|
-
...
|
|
689
|
+
...a
|
|
613
690
|
}
|
|
614
691
|
);
|
|
615
692
|
}
|
|
616
|
-
const
|
|
617
|
-
function
|
|
618
|
-
const [e,
|
|
619
|
-
return
|
|
620
|
-
const r = window.matchMedia(`(max-width: ${
|
|
621
|
-
|
|
693
|
+
const z = 768;
|
|
694
|
+
function Yt() {
|
|
695
|
+
const [e, a] = i.useState(void 0);
|
|
696
|
+
return i.useEffect(() => {
|
|
697
|
+
const r = window.matchMedia(`(max-width: ${z - 1}px)`), o = () => {
|
|
698
|
+
a(window.innerWidth < z);
|
|
622
699
|
};
|
|
623
|
-
return r.addEventListener("change", o),
|
|
700
|
+
return r.addEventListener("change", o), a(window.innerWidth < z), () => r.removeEventListener("change", o);
|
|
624
701
|
}, []), !!e;
|
|
625
702
|
}
|
|
626
|
-
const
|
|
703
|
+
const Zt = "sidebar_state", Jt = 60 * 60 * 24 * 7, Qt = "16rem", ea = "18rem", ta = "3rem", aa = "b", me = i.createContext(null);
|
|
627
704
|
function I() {
|
|
628
|
-
const e =
|
|
705
|
+
const e = i.useContext(me);
|
|
629
706
|
if (!e)
|
|
630
707
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
631
708
|
return e;
|
|
632
709
|
}
|
|
633
|
-
function
|
|
710
|
+
function ra({
|
|
634
711
|
defaultOpen: e = !0,
|
|
635
|
-
open:
|
|
712
|
+
open: a,
|
|
636
713
|
onOpenChange: r,
|
|
637
714
|
className: o,
|
|
638
715
|
style: n,
|
|
639
|
-
children:
|
|
716
|
+
children: s,
|
|
640
717
|
...l
|
|
641
718
|
}) {
|
|
642
|
-
const
|
|
643
|
-
(
|
|
644
|
-
const
|
|
645
|
-
r ? r(
|
|
719
|
+
const c = Yt(), [d, h] = i.useState(!1), [p, b] = i.useState(e), x = a ?? p, f = i.useCallback(
|
|
720
|
+
(m) => {
|
|
721
|
+
const g = typeof m == "function" ? m(x) : m;
|
|
722
|
+
r ? r(g) : b(g), document.cookie = `${Zt}=${g}; path=/; max-age=${Jt}`;
|
|
646
723
|
},
|
|
647
724
|
[r, x]
|
|
648
|
-
), v =
|
|
649
|
-
|
|
650
|
-
const
|
|
651
|
-
|
|
725
|
+
), v = i.useCallback(() => c ? h((m) => !m) : f((m) => !m), [c, f]);
|
|
726
|
+
i.useEffect(() => {
|
|
727
|
+
const m = (g) => {
|
|
728
|
+
g.key === aa && (g.metaKey || g.ctrlKey) && (g.preventDefault(), v());
|
|
652
729
|
};
|
|
653
|
-
return window.addEventListener("keydown",
|
|
730
|
+
return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
|
|
654
731
|
}, [v]);
|
|
655
|
-
const
|
|
732
|
+
const y = x ? "expanded" : "collapsed", w = i.useMemo(
|
|
656
733
|
() => ({
|
|
657
|
-
state:
|
|
734
|
+
state: y,
|
|
658
735
|
open: x,
|
|
659
|
-
setOpen:
|
|
660
|
-
isMobile:
|
|
736
|
+
setOpen: f,
|
|
737
|
+
isMobile: c,
|
|
661
738
|
openMobile: d,
|
|
662
|
-
setOpenMobile:
|
|
739
|
+
setOpenMobile: h,
|
|
663
740
|
toggleSidebar: v
|
|
664
741
|
}),
|
|
665
|
-
[
|
|
742
|
+
[y, x, f, c, d, v]
|
|
666
743
|
);
|
|
667
|
-
return /* @__PURE__ */
|
|
744
|
+
return /* @__PURE__ */ t.jsx(me.Provider, { value: w, children: /* @__PURE__ */ t.jsx(G, { delayDuration: 0, children: /* @__PURE__ */ t.jsx(
|
|
668
745
|
"div",
|
|
669
746
|
{
|
|
670
|
-
className:
|
|
747
|
+
className: u("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", o),
|
|
671
748
|
"data-slot": "sidebar-wrapper",
|
|
672
749
|
style: {
|
|
673
|
-
"--sidebar-width":
|
|
674
|
-
"--sidebar-width-icon":
|
|
750
|
+
"--sidebar-width": Qt,
|
|
751
|
+
"--sidebar-width-icon": ta,
|
|
675
752
|
...n
|
|
676
753
|
},
|
|
677
754
|
...l,
|
|
678
|
-
children:
|
|
755
|
+
children: s
|
|
679
756
|
}
|
|
680
757
|
) }) });
|
|
681
758
|
}
|
|
682
|
-
function
|
|
759
|
+
function oa({
|
|
683
760
|
side: e = "left",
|
|
684
|
-
variant:
|
|
761
|
+
variant: a = "sidebar",
|
|
685
762
|
collapsible: r = "offcanvas",
|
|
686
763
|
className: o,
|
|
687
764
|
children: n,
|
|
688
|
-
...
|
|
765
|
+
...s
|
|
689
766
|
}) {
|
|
690
|
-
const { isMobile: l, state:
|
|
691
|
-
return r === "none" ? /* @__PURE__ */
|
|
767
|
+
const { isMobile: l, state: c, openMobile: d, setOpenMobile: h } = I();
|
|
768
|
+
return r === "none" ? /* @__PURE__ */ t.jsx(
|
|
692
769
|
"div",
|
|
693
770
|
{
|
|
694
|
-
className:
|
|
771
|
+
className: u("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", o),
|
|
695
772
|
"data-slot": "sidebar",
|
|
696
|
-
...
|
|
773
|
+
...s,
|
|
697
774
|
children: n
|
|
698
775
|
}
|
|
699
|
-
) : l ? /* @__PURE__ */
|
|
700
|
-
|
|
776
|
+
) : l ? /* @__PURE__ */ t.jsx(Gt, { onOpenChange: h, open: d, ...s, children: /* @__PURE__ */ t.jsxs(
|
|
777
|
+
Vt,
|
|
701
778
|
{
|
|
702
779
|
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
703
780
|
"data-mobile": "true",
|
|
@@ -705,51 +782,51 @@ function Jt({
|
|
|
705
782
|
"data-slot": "sidebar",
|
|
706
783
|
side: e,
|
|
707
784
|
style: {
|
|
708
|
-
"--sidebar-width":
|
|
785
|
+
"--sidebar-width": ea
|
|
709
786
|
},
|
|
710
787
|
children: [
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ t.jsxs(Kt, { className: "sr-only", children: [
|
|
789
|
+
/* @__PURE__ */ t.jsx(Wt, { children: "Sidebar" }),
|
|
790
|
+
/* @__PURE__ */ t.jsx(Xt, { children: "Displays the mobile sidebar." })
|
|
714
791
|
] }),
|
|
715
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex h-full w-full flex-col", children: n })
|
|
716
793
|
]
|
|
717
794
|
}
|
|
718
|
-
) }) : /* @__PURE__ */
|
|
795
|
+
) }) : /* @__PURE__ */ t.jsxs(
|
|
719
796
|
"div",
|
|
720
797
|
{
|
|
721
798
|
className: "group peer hidden text-sidebar-foreground md:block",
|
|
722
|
-
"data-collapsible":
|
|
799
|
+
"data-collapsible": c === "collapsed" ? r : "",
|
|
723
800
|
"data-side": e,
|
|
724
801
|
"data-slot": "sidebar",
|
|
725
|
-
"data-state":
|
|
726
|
-
"data-variant":
|
|
802
|
+
"data-state": c,
|
|
803
|
+
"data-variant": a,
|
|
727
804
|
children: [
|
|
728
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ t.jsx(
|
|
729
806
|
"div",
|
|
730
807
|
{
|
|
731
|
-
className:
|
|
808
|
+
className: u(
|
|
732
809
|
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
733
810
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
734
811
|
"group-data-[side=right]:rotate-180",
|
|
735
|
-
|
|
812
|
+
a === "floating" || a === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
736
813
|
),
|
|
737
814
|
"data-slot": "sidebar-gap"
|
|
738
815
|
}
|
|
739
816
|
),
|
|
740
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ t.jsx(
|
|
741
818
|
"div",
|
|
742
819
|
{
|
|
743
|
-
className:
|
|
820
|
+
className: u(
|
|
744
821
|
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
745
822
|
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)]",
|
|
746
823
|
// Adjust the padding for floating and inset variants.
|
|
747
|
-
|
|
824
|
+
a === "floating" || a === "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",
|
|
748
825
|
o
|
|
749
826
|
),
|
|
750
827
|
"data-slot": "sidebar-container",
|
|
751
|
-
...
|
|
752
|
-
children: /* @__PURE__ */
|
|
828
|
+
...s,
|
|
829
|
+
children: /* @__PURE__ */ t.jsx(
|
|
753
830
|
"div",
|
|
754
831
|
{
|
|
755
832
|
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",
|
|
@@ -764,35 +841,35 @@ function Jt({
|
|
|
764
841
|
}
|
|
765
842
|
);
|
|
766
843
|
}
|
|
767
|
-
function
|
|
768
|
-
const { toggleSidebar: n, open:
|
|
769
|
-
return /* @__PURE__ */
|
|
770
|
-
|
|
844
|
+
function na({ className: e, onClick: a, children: r, ...o }) {
|
|
845
|
+
const { toggleSidebar: n, open: s } = I();
|
|
846
|
+
return /* @__PURE__ */ t.jsxs(
|
|
847
|
+
je,
|
|
771
848
|
{
|
|
772
|
-
className:
|
|
849
|
+
className: u("size-7", e),
|
|
773
850
|
"data-sidebar": "trigger",
|
|
774
851
|
"data-slot": "sidebar-trigger",
|
|
775
852
|
onClick: (l) => {
|
|
776
|
-
|
|
853
|
+
a?.(l), n();
|
|
777
854
|
},
|
|
778
855
|
size: "icon",
|
|
779
856
|
variant: "ghost",
|
|
780
857
|
...o,
|
|
781
858
|
children: [
|
|
782
|
-
|
|
783
|
-
/* @__PURE__ */
|
|
784
|
-
|
|
859
|
+
s ? /* @__PURE__ */ t.jsx(et, {}) : /* @__PURE__ */ t.jsx(Je, {}),
|
|
860
|
+
/* @__PURE__ */ t.jsx("span", { className: "sr-only", children: "Toggle Sidebar" }),
|
|
861
|
+
s ? r : null
|
|
785
862
|
]
|
|
786
863
|
}
|
|
787
864
|
);
|
|
788
865
|
}
|
|
789
|
-
function
|
|
866
|
+
function sa({ className: e, ...a }) {
|
|
790
867
|
const { toggleSidebar: r } = I();
|
|
791
|
-
return /* @__PURE__ */
|
|
868
|
+
return /* @__PURE__ */ t.jsx(
|
|
792
869
|
"button",
|
|
793
870
|
{
|
|
794
871
|
"aria-label": "Toggle Sidebar",
|
|
795
|
-
className:
|
|
872
|
+
className: u(
|
|
796
873
|
"-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex",
|
|
797
874
|
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
798
875
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
@@ -806,116 +883,116 @@ function ea({ className: e, ...t }) {
|
|
|
806
883
|
onClick: r,
|
|
807
884
|
tabIndex: -1,
|
|
808
885
|
title: "Toggle Sidebar",
|
|
809
|
-
...
|
|
886
|
+
...a
|
|
810
887
|
}
|
|
811
888
|
);
|
|
812
889
|
}
|
|
813
|
-
function
|
|
814
|
-
return /* @__PURE__ */
|
|
890
|
+
function ia({ className: e, ...a }) {
|
|
891
|
+
return /* @__PURE__ */ t.jsx(
|
|
815
892
|
"main",
|
|
816
893
|
{
|
|
817
|
-
className:
|
|
894
|
+
className: u(
|
|
818
895
|
"relative flex w-full flex-1 flex-col bg-background",
|
|
819
896
|
"md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 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",
|
|
820
897
|
e
|
|
821
898
|
),
|
|
822
899
|
"data-slot": "sidebar-inset",
|
|
823
|
-
...
|
|
900
|
+
...a
|
|
824
901
|
}
|
|
825
902
|
);
|
|
826
903
|
}
|
|
827
|
-
function
|
|
828
|
-
return /* @__PURE__ */
|
|
904
|
+
function la({ className: e, ...a }) {
|
|
905
|
+
return /* @__PURE__ */ t.jsx(
|
|
829
906
|
"div",
|
|
830
907
|
{
|
|
831
|
-
className:
|
|
908
|
+
className: u("flex flex-col gap-2 p-2", e),
|
|
832
909
|
"data-sidebar": "header",
|
|
833
910
|
"data-slot": "sidebar-header",
|
|
834
|
-
...
|
|
911
|
+
...a
|
|
835
912
|
}
|
|
836
913
|
);
|
|
837
914
|
}
|
|
838
|
-
function
|
|
839
|
-
return /* @__PURE__ */
|
|
915
|
+
function da({ className: e, ...a }) {
|
|
916
|
+
return /* @__PURE__ */ t.jsx(
|
|
840
917
|
"div",
|
|
841
918
|
{
|
|
842
|
-
className:
|
|
919
|
+
className: u("flex flex-col gap-2 p-2", e),
|
|
843
920
|
"data-sidebar": "footer",
|
|
844
921
|
"data-slot": "sidebar-footer",
|
|
845
|
-
...
|
|
922
|
+
...a
|
|
846
923
|
}
|
|
847
924
|
);
|
|
848
925
|
}
|
|
849
|
-
function
|
|
850
|
-
return /* @__PURE__ */
|
|
851
|
-
|
|
926
|
+
function ge({ className: e, ...a }) {
|
|
927
|
+
return /* @__PURE__ */ t.jsx(
|
|
928
|
+
Pt,
|
|
852
929
|
{
|
|
853
|
-
className:
|
|
930
|
+
className: u("mx-2 w-auto bg-sidebar-border", e),
|
|
854
931
|
"data-sidebar": "separator",
|
|
855
932
|
"data-slot": "sidebar-separator",
|
|
856
|
-
...
|
|
933
|
+
...a
|
|
857
934
|
}
|
|
858
935
|
);
|
|
859
936
|
}
|
|
860
|
-
function
|
|
861
|
-
return /* @__PURE__ */
|
|
937
|
+
function ca({ className: e, ...a }) {
|
|
938
|
+
return /* @__PURE__ */ t.jsx(
|
|
862
939
|
"div",
|
|
863
940
|
{
|
|
864
|
-
className:
|
|
941
|
+
className: u(
|
|
865
942
|
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
866
943
|
e
|
|
867
944
|
),
|
|
868
945
|
"data-sidebar": "content",
|
|
869
946
|
"data-slot": "sidebar-content",
|
|
870
|
-
...
|
|
947
|
+
...a
|
|
871
948
|
}
|
|
872
949
|
);
|
|
873
950
|
}
|
|
874
|
-
function
|
|
875
|
-
return /* @__PURE__ */
|
|
951
|
+
function ua({ className: e, ...a }) {
|
|
952
|
+
return /* @__PURE__ */ t.jsx(
|
|
876
953
|
"div",
|
|
877
954
|
{
|
|
878
|
-
className:
|
|
955
|
+
className: u("relative flex w-full min-w-0 flex-col p-2", e),
|
|
879
956
|
"data-sidebar": "group",
|
|
880
957
|
"data-slot": "sidebar-group",
|
|
881
|
-
...
|
|
958
|
+
...a
|
|
882
959
|
}
|
|
883
960
|
);
|
|
884
961
|
}
|
|
885
|
-
function
|
|
886
|
-
return /* @__PURE__ */
|
|
962
|
+
function pa({ className: e, ...a }) {
|
|
963
|
+
return /* @__PURE__ */ t.jsx(
|
|
887
964
|
"div",
|
|
888
965
|
{
|
|
889
|
-
className:
|
|
966
|
+
className: u("w-full text-sm", e),
|
|
890
967
|
"data-sidebar": "group-content",
|
|
891
968
|
"data-slot": "sidebar-group-content",
|
|
892
|
-
...
|
|
969
|
+
...a
|
|
893
970
|
}
|
|
894
971
|
);
|
|
895
972
|
}
|
|
896
|
-
function
|
|
897
|
-
return /* @__PURE__ */
|
|
973
|
+
function H({ className: e, ...a }) {
|
|
974
|
+
return /* @__PURE__ */ t.jsx(
|
|
898
975
|
"ul",
|
|
899
976
|
{
|
|
900
|
-
className:
|
|
977
|
+
className: u("flex w-full min-w-0 flex-col gap-1", e),
|
|
901
978
|
"data-sidebar": "menu",
|
|
902
979
|
"data-slot": "sidebar-menu",
|
|
903
|
-
...
|
|
980
|
+
...a
|
|
904
981
|
}
|
|
905
982
|
);
|
|
906
983
|
}
|
|
907
|
-
function M({ className: e, ...
|
|
908
|
-
return /* @__PURE__ */
|
|
984
|
+
function M({ className: e, ...a }) {
|
|
985
|
+
return /* @__PURE__ */ t.jsx(
|
|
909
986
|
"li",
|
|
910
987
|
{
|
|
911
|
-
className:
|
|
988
|
+
className: u("group/menu-item relative", e),
|
|
912
989
|
"data-sidebar": "menu-item",
|
|
913
990
|
"data-slot": "sidebar-menu-item",
|
|
914
|
-
...
|
|
991
|
+
...a
|
|
915
992
|
}
|
|
916
993
|
);
|
|
917
994
|
}
|
|
918
|
-
const
|
|
995
|
+
const ha = Ce(
|
|
919
996
|
"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",
|
|
920
997
|
{
|
|
921
998
|
variants: {
|
|
@@ -937,18 +1014,18 @@ const ia = me(
|
|
|
937
1014
|
);
|
|
938
1015
|
function O({
|
|
939
1016
|
asChild: e = !1,
|
|
940
|
-
isActive:
|
|
1017
|
+
isActive: a = !1,
|
|
941
1018
|
variant: r = "default",
|
|
942
1019
|
size: o = "default",
|
|
943
1020
|
tooltip: n,
|
|
944
|
-
className:
|
|
1021
|
+
className: s,
|
|
945
1022
|
...l
|
|
946
1023
|
}) {
|
|
947
|
-
const
|
|
948
|
-
|
|
1024
|
+
const c = e ? Te : "button", { isMobile: d, state: h } = I(), p = /* @__PURE__ */ t.jsx(
|
|
1025
|
+
c,
|
|
949
1026
|
{
|
|
950
|
-
className:
|
|
951
|
-
"data-active":
|
|
1027
|
+
className: u(ha({ variant: r, size: o }), s),
|
|
1028
|
+
"data-active": a,
|
|
952
1029
|
"data-sidebar": "menu-button",
|
|
953
1030
|
"data-size": o,
|
|
954
1031
|
"data-slot": "sidebar-menu-button",
|
|
@@ -957,88 +1034,66 @@ function O({
|
|
|
957
1034
|
);
|
|
958
1035
|
return n ? (typeof n == "string" && (n = {
|
|
959
1036
|
children: n
|
|
960
|
-
}), /* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
/* @__PURE__ */
|
|
1037
|
+
}), /* @__PURE__ */ t.jsxs(fe, { children: [
|
|
1038
|
+
/* @__PURE__ */ t.jsx(xe, { asChild: !0, children: p }),
|
|
1039
|
+
/* @__PURE__ */ t.jsx(be, { align: "center", hidden: h !== "collapsed" || d, side: "right", ...n })
|
|
963
1040
|
] })) : p;
|
|
964
1041
|
}
|
|
965
|
-
const
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
968
|
-
r.external && /* @__PURE__ */
|
|
969
|
-
] }) }) }, r.slug)) }), W = ({ itemSets: e, activeSlug:
|
|
970
|
-
/* @__PURE__ */
|
|
971
|
-
o < e.length - 1 && /* @__PURE__ */
|
|
972
|
-
] }, `item-set-${o}`)) }),
|
|
973
|
-
O,
|
|
974
|
-
{
|
|
975
|
-
asChild: !0,
|
|
976
|
-
className: "cursor-pointer",
|
|
977
|
-
onClick: () => {
|
|
978
|
-
t(e === "light" ? "dark" : "light");
|
|
979
|
-
},
|
|
980
|
-
children: /* @__PURE__ */ a.jsxs("span", { children: [
|
|
981
|
-
e === "light" && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
982
|
-
/* @__PURE__ */ a.jsx(Ke, {}),
|
|
983
|
-
/* @__PURE__ */ a.jsx(E, { children: "Dark mode" })
|
|
984
|
-
] }),
|
|
985
|
-
e === "dark" && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
986
|
-
/* @__PURE__ */ a.jsx(Qe, {}),
|
|
987
|
-
/* @__PURE__ */ a.jsx(E, { children: "Light mode" })
|
|
988
|
-
] }),
|
|
989
|
-
e === "system" && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
990
|
-
/* @__PURE__ */ a.jsx(Ge, {}),
|
|
991
|
-
/* @__PURE__ */ a.jsx(E, { children: "System theme" })
|
|
992
|
-
] })
|
|
993
|
-
] })
|
|
994
|
-
}
|
|
995
|
-
), ca = ({
|
|
1042
|
+
const ve = ({ children: e }) => /* @__PURE__ */ t.jsx(ee, { size: "base", truncate: !0, children: e }), fa = ({ itemSet: e, activeSlug: a }) => /* @__PURE__ */ t.jsx(t.Fragment, { children: e.links.map((r) => /* @__PURE__ */ t.jsx(M, { className: "hover:cursor-pointer", onClick: r.onClick, children: /* @__PURE__ */ t.jsx(O, { asChild: !0, isActive: a === r.slug, children: /* @__PURE__ */ t.jsxs("span", { children: [
|
|
1043
|
+
/* @__PURE__ */ t.jsx(r.icon, {}),
|
|
1044
|
+
/* @__PURE__ */ t.jsx(ve, { children: r.title }),
|
|
1045
|
+
r.external && /* @__PURE__ */ t.jsx(Q, { children: /* @__PURE__ */ t.jsx(at, { size: 12, strokeWidth: 1.5 }) })
|
|
1046
|
+
] }) }) }, r.slug)) }), W = ({ itemSets: e, activeSlug: a }) => /* @__PURE__ */ t.jsx(H, { children: e.map((r, o) => /* @__PURE__ */ t.jsxs(ke, { children: [
|
|
1047
|
+
/* @__PURE__ */ t.jsx(fa, { activeSlug: a, itemSet: r }),
|
|
1048
|
+
o < e.length - 1 && /* @__PURE__ */ t.jsx(ge, {})
|
|
1049
|
+
] }, `item-set-${o}`)) }), xa = ({
|
|
996
1050
|
brandContent: e,
|
|
997
|
-
brandOnClick:
|
|
1051
|
+
brandOnClick: a,
|
|
998
1052
|
activeSlug: r,
|
|
999
1053
|
itemSets: o,
|
|
1000
1054
|
bottomItemSets: n = [],
|
|
1001
|
-
theme:
|
|
1055
|
+
theme: s,
|
|
1002
1056
|
setTheme: l,
|
|
1003
|
-
...
|
|
1004
|
-
}) => /* @__PURE__ */
|
|
1005
|
-
/* @__PURE__ */
|
|
1057
|
+
...c
|
|
1058
|
+
}) => /* @__PURE__ */ t.jsxs(oa, { collapsible: "icon", ...c, children: [
|
|
1059
|
+
/* @__PURE__ */ t.jsx(la, { children: /* @__PURE__ */ t.jsx(H, { children: /* @__PURE__ */ t.jsx(M, { children: /* @__PURE__ */ t.jsx(
|
|
1006
1060
|
O,
|
|
1007
1061
|
{
|
|
1008
|
-
className:
|
|
1009
|
-
onClick:
|
|
1062
|
+
className: a ? "cursor-pointer" : "cursor-default",
|
|
1063
|
+
onClick: a,
|
|
1010
1064
|
size: "lg",
|
|
1011
1065
|
children: e
|
|
1012
1066
|
}
|
|
1013
1067
|
) }) }) }),
|
|
1014
|
-
/* @__PURE__ */
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
/* @__PURE__ */
|
|
1018
|
-
n.length > 0 && /* @__PURE__ */
|
|
1019
|
-
/* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
1068
|
+
/* @__PURE__ */ t.jsx(ca, { children: /* @__PURE__ */ t.jsx(ua, { children: /* @__PURE__ */ t.jsx(pa, { children: /* @__PURE__ */ t.jsx(W, { activeSlug: r, itemSets: o }) }) }) }),
|
|
1069
|
+
/* @__PURE__ */ t.jsx(da, { className: "mb-4", children: /* @__PURE__ */ t.jsxs(H, { children: [
|
|
1070
|
+
/* @__PURE__ */ t.jsx(M, { children: /* @__PURE__ */ t.jsx(O, { asChild: !0, children: /* @__PURE__ */ t.jsx(na, { className: "justify-start font-normal", children: /* @__PURE__ */ t.jsx(ve, { children: "Collapse menu" }) }) }) }),
|
|
1071
|
+
/* @__PURE__ */ t.jsx(M, { children: /* @__PURE__ */ t.jsx(O, { asChild: !0, children: /* @__PURE__ */ t.jsx(Ht, { buttonClassName: "p-0", setTheme: l, theme: s, variant: "stacked" }) }) }),
|
|
1072
|
+
n.length > 0 && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1073
|
+
/* @__PURE__ */ t.jsx(ge, {}),
|
|
1074
|
+
/* @__PURE__ */ t.jsx(W, { activeSlug: r, itemSets: n })
|
|
1021
1075
|
] })
|
|
1022
1076
|
] }) }),
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
] }),
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ t.jsx(sa, {})
|
|
1078
|
+
] }), Ca = ({ children: e, ...a }) => /* @__PURE__ */ t.jsxs(ra, { children: [
|
|
1079
|
+
/* @__PURE__ */ t.jsx(xa, { ...a }),
|
|
1080
|
+
/* @__PURE__ */ t.jsx(ia, { className: "max-w-screen-xl", children: e })
|
|
1027
1081
|
] });
|
|
1028
1082
|
export {
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1083
|
+
ve as M,
|
|
1084
|
+
he as P,
|
|
1085
|
+
na as S,
|
|
1086
|
+
N as T,
|
|
1087
|
+
nt as X,
|
|
1088
|
+
xa as a,
|
|
1089
|
+
Ca as b,
|
|
1090
|
+
Pt as c,
|
|
1091
|
+
Dt as d,
|
|
1092
|
+
Lt as e,
|
|
1093
|
+
zt as f,
|
|
1094
|
+
It as g,
|
|
1095
|
+
Ot as h,
|
|
1096
|
+
At as i,
|
|
1097
|
+
Ht as j,
|
|
1098
|
+
j as k
|
|
1044
1099
|
};
|