@still-forest/canopy 0.29.0 → 0.30.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/chunks/Code-DSfz_jrJ.js +6 -0
- package/dist/chunks/Heading-Bpvbpnw2.js +251 -0
- package/dist/chunks/{Layout-fBiCo4lc.js → Layout-DAdzkAxW.js} +57 -53
- package/dist/chunks/PageNotFound-BqoSSvCP.js +107 -0
- package/dist/chunks/Paragraph-Lcw42_Mz.js +7 -0
- package/dist/chunks/SidebarLayout-Bm8SlspC.js +1709 -0
- package/dist/chunks/Textarea-Doc1h--A.js +2815 -0
- package/dist/chunks/calendar-D21xByT8.js +3157 -0
- package/dist/chunks/index-CRiPKpXj.js +2743 -0
- package/dist/chunks/jsx-runtime-B0GD0xBr.js +40 -0
- package/dist/chunks/popover-BhBG-w7n.js +2911 -0
- package/dist/forms.js +12 -11
- package/dist/index.d.ts +21 -15
- package/dist/index.js +723 -321
- package/dist/interstitials.js +1 -1
- package/dist/layout.js +1 -1
- package/dist/navigation.js +5 -6
- package/dist/typography.js +7 -5
- package/dist/utilities.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/Heading-Dwx3mHff.js +0 -251
- package/dist/chunks/PageNotFound-DOYQfbRs.js +0 -51
- package/dist/chunks/SidebarLayout-BtEWD4ew.js +0 -52
- package/dist/chunks/TextInput-NfG9yrGJ.js +0 -330
- package/dist/chunks/cn-B6yFEsav.js +0 -8
|
@@ -0,0 +1,1709 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-B0GD0xBr.js";
|
|
2
|
+
import { c as D, u as I, f as Rt, g as At, B as kt, h as Et, S as Dt, b as Pt } from "./calendar-D21xByT8.js";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import T, { Fragment as It } from "react";
|
|
5
|
+
import { c as h } from "./index-CRiPKpXj.js";
|
|
6
|
+
import { a as F, c as K, b as O, P as N, e as w, d as $, f as St, g as Ot, u as Mt, h as _e, i as $t, R as Lt, j as zt, F as Ft, D as Ne, k as Ht, l as Re, m as Bt, A as Gt, n as Vt, C as Wt, o as qt, p as Kt, q as Ut, r as Yt, s as Xt } from "./popover-BhBG-w7n.js";
|
|
7
|
+
import { F as Ae } from "./Layout-DAdzkAxW.js";
|
|
8
|
+
import { T as ke } from "./Heading-Bpvbpnw2.js";
|
|
9
|
+
/**
|
|
10
|
+
* @license lucide-react v0.543.0 - ISC
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the ISC license.
|
|
13
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const Zt = [
|
|
16
|
+
["rect", { width: "14", height: "8", x: "5", y: "2", rx: "2", key: "wc9tft" }],
|
|
17
|
+
["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", key: "w68u3i" }],
|
|
18
|
+
["path", { d: "M6 18h2", key: "rwmk9e" }],
|
|
19
|
+
["path", { d: "M12 18h6", key: "aqd8w3" }]
|
|
20
|
+
], Jt = D("computer", Zt);
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.543.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 Qt = [
|
|
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
|
+
], eo = D("monitor-cog", Qt);
|
|
41
|
+
/**
|
|
42
|
+
* @license lucide-react v0.543.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
|
47
|
+
const to = [
|
|
48
|
+
[
|
|
49
|
+
"path",
|
|
50
|
+
{
|
|
51
|
+
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
52
|
+
key: "kfwtm"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
], Ee = D("moon", to);
|
|
56
|
+
/**
|
|
57
|
+
* @license lucide-react v0.543.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/
|
|
62
|
+
const oo = [
|
|
63
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
64
|
+
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
65
|
+
["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
|
|
66
|
+
], ro = D("panel-left-open", oo);
|
|
67
|
+
/**
|
|
68
|
+
* @license lucide-react v0.543.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/
|
|
73
|
+
const no = [
|
|
74
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
75
|
+
["path", { d: "M15 3v18", key: "14nvp0" }],
|
|
76
|
+
["path", { d: "m10 15-3-3 3-3", key: "1pgupc" }]
|
|
77
|
+
], ao = D("panel-right-open", no);
|
|
78
|
+
/**
|
|
79
|
+
* @license lucide-react v0.543.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/
|
|
84
|
+
const so = [
|
|
85
|
+
["path", { d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6", key: "y09zxi" }],
|
|
86
|
+
["path", { d: "m21 3-9 9", key: "mpx6sq" }],
|
|
87
|
+
["path", { d: "M15 3h6v6", key: "1q9fwt" }]
|
|
88
|
+
], io = D("square-arrow-out-up-right", so);
|
|
89
|
+
/**
|
|
90
|
+
* @license lucide-react v0.543.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/
|
|
95
|
+
const lo = [
|
|
96
|
+
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
97
|
+
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
98
|
+
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
99
|
+
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
|
|
100
|
+
["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
|
|
101
|
+
["path", { d: "M2 12h2", key: "1t8f8n" }],
|
|
102
|
+
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
103
|
+
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
104
|
+
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
105
|
+
], De = D("sun", lo);
|
|
106
|
+
/**
|
|
107
|
+
* @license lucide-react v0.543.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/
|
|
112
|
+
const co = [
|
|
113
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
114
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
115
|
+
], uo = D("x", co);
|
|
116
|
+
var U = "Collapsible", [po, Pe] = K(U), [fo, ie] = po(U), Ie = l.forwardRef(
|
|
117
|
+
(e, t) => {
|
|
118
|
+
const {
|
|
119
|
+
__scopeCollapsible: r,
|
|
120
|
+
open: n,
|
|
121
|
+
defaultOpen: a,
|
|
122
|
+
disabled: s,
|
|
123
|
+
onOpenChange: i,
|
|
124
|
+
...c
|
|
125
|
+
} = e, [d, p] = F({
|
|
126
|
+
prop: n,
|
|
127
|
+
defaultProp: a ?? !1,
|
|
128
|
+
onChange: i,
|
|
129
|
+
caller: U
|
|
130
|
+
});
|
|
131
|
+
return /* @__PURE__ */ o.jsx(
|
|
132
|
+
fo,
|
|
133
|
+
{
|
|
134
|
+
scope: r,
|
|
135
|
+
disabled: s,
|
|
136
|
+
contentId: O(),
|
|
137
|
+
open: d,
|
|
138
|
+
onOpenToggle: l.useCallback(() => p((u) => !u), [p]),
|
|
139
|
+
children: /* @__PURE__ */ o.jsx(
|
|
140
|
+
N.div,
|
|
141
|
+
{
|
|
142
|
+
"data-state": ue(d),
|
|
143
|
+
"data-disabled": s ? "" : void 0,
|
|
144
|
+
...c,
|
|
145
|
+
ref: t
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
Ie.displayName = U;
|
|
153
|
+
var Se = "CollapsibleTrigger", le = l.forwardRef(
|
|
154
|
+
(e, t) => {
|
|
155
|
+
const { __scopeCollapsible: r, ...n } = e, a = ie(Se, r);
|
|
156
|
+
return /* @__PURE__ */ o.jsx(
|
|
157
|
+
N.button,
|
|
158
|
+
{
|
|
159
|
+
type: "button",
|
|
160
|
+
"aria-controls": a.contentId,
|
|
161
|
+
"aria-expanded": a.open || !1,
|
|
162
|
+
"data-state": ue(a.open),
|
|
163
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
164
|
+
disabled: a.disabled,
|
|
165
|
+
...n,
|
|
166
|
+
ref: t,
|
|
167
|
+
onClick: w(e.onClick, a.onOpenToggle)
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
le.displayName = Se;
|
|
173
|
+
var ce = "CollapsibleContent", de = l.forwardRef(
|
|
174
|
+
(e, t) => {
|
|
175
|
+
const { forceMount: r, ...n } = e, a = ie(ce, e.__scopeCollapsible);
|
|
176
|
+
return /* @__PURE__ */ o.jsx($, { present: r || a.open, children: ({ present: s }) => /* @__PURE__ */ o.jsx(ho, { ...n, ref: t, present: s }) });
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
de.displayName = ce;
|
|
180
|
+
var ho = l.forwardRef((e, t) => {
|
|
181
|
+
const { __scopeCollapsible: r, present: n, children: a, ...s } = e, i = ie(ce, r), [c, d] = l.useState(n), p = l.useRef(null), u = I(t, p), g = l.useRef(0), b = g.current, x = l.useRef(0), v = x.current, C = i.open || c, y = l.useRef(C), m = l.useRef(void 0);
|
|
182
|
+
return l.useEffect(() => {
|
|
183
|
+
const f = requestAnimationFrame(() => y.current = !1);
|
|
184
|
+
return () => cancelAnimationFrame(f);
|
|
185
|
+
}, []), St(() => {
|
|
186
|
+
const f = p.current;
|
|
187
|
+
if (f) {
|
|
188
|
+
m.current = m.current || {
|
|
189
|
+
transitionDuration: f.style.transitionDuration,
|
|
190
|
+
animationName: f.style.animationName
|
|
191
|
+
}, f.style.transitionDuration = "0s", f.style.animationName = "none";
|
|
192
|
+
const _ = f.getBoundingClientRect();
|
|
193
|
+
g.current = _.height, x.current = _.width, y.current || (f.style.transitionDuration = m.current.transitionDuration, f.style.animationName = m.current.animationName), d(n);
|
|
194
|
+
}
|
|
195
|
+
}, [i.open, n]), /* @__PURE__ */ o.jsx(
|
|
196
|
+
N.div,
|
|
197
|
+
{
|
|
198
|
+
"data-state": ue(i.open),
|
|
199
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
200
|
+
id: i.contentId,
|
|
201
|
+
hidden: !C,
|
|
202
|
+
...s,
|
|
203
|
+
ref: u,
|
|
204
|
+
style: {
|
|
205
|
+
"--radix-collapsible-content-height": b ? `${b}px` : void 0,
|
|
206
|
+
"--radix-collapsible-content-width": v ? `${v}px` : void 0,
|
|
207
|
+
...e.style
|
|
208
|
+
},
|
|
209
|
+
children: C && a
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
});
|
|
213
|
+
function ue(e) {
|
|
214
|
+
return e ? "open" : "closed";
|
|
215
|
+
}
|
|
216
|
+
var Oe = Ie, go = le, xo = de, R = "Accordion", bo = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [pe, mo, vo] = Ot(R), [Y, mn] = K(R, [
|
|
217
|
+
vo,
|
|
218
|
+
Pe
|
|
219
|
+
]), fe = Pe(), Me = T.forwardRef(
|
|
220
|
+
(e, t) => {
|
|
221
|
+
const { type: r, ...n } = e, a = n, s = n;
|
|
222
|
+
return /* @__PURE__ */ o.jsx(pe.Provider, { scope: e.__scopeAccordion, children: r === "multiple" ? /* @__PURE__ */ o.jsx(wo, { ...s, ref: t }) : /* @__PURE__ */ o.jsx(jo, { ...a, ref: t }) });
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
Me.displayName = R;
|
|
226
|
+
var [$e, Co] = Y(R), [Le, yo] = Y(
|
|
227
|
+
R,
|
|
228
|
+
{ collapsible: !1 }
|
|
229
|
+
), jo = T.forwardRef(
|
|
230
|
+
(e, t) => {
|
|
231
|
+
const {
|
|
232
|
+
value: r,
|
|
233
|
+
defaultValue: n,
|
|
234
|
+
onValueChange: a = () => {
|
|
235
|
+
},
|
|
236
|
+
collapsible: s = !1,
|
|
237
|
+
...i
|
|
238
|
+
} = e, [c, d] = F({
|
|
239
|
+
prop: r,
|
|
240
|
+
defaultProp: n ?? "",
|
|
241
|
+
onChange: a,
|
|
242
|
+
caller: R
|
|
243
|
+
});
|
|
244
|
+
return /* @__PURE__ */ o.jsx(
|
|
245
|
+
$e,
|
|
246
|
+
{
|
|
247
|
+
scope: e.__scopeAccordion,
|
|
248
|
+
value: T.useMemo(() => c ? [c] : [], [c]),
|
|
249
|
+
onItemOpen: d,
|
|
250
|
+
onItemClose: T.useCallback(() => s && d(""), [s, d]),
|
|
251
|
+
children: /* @__PURE__ */ o.jsx(Le, { scope: e.__scopeAccordion, collapsible: s, children: /* @__PURE__ */ o.jsx(ze, { ...i, ref: t }) })
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
), wo = T.forwardRef((e, t) => {
|
|
256
|
+
const {
|
|
257
|
+
value: r,
|
|
258
|
+
defaultValue: n,
|
|
259
|
+
onValueChange: a = () => {
|
|
260
|
+
},
|
|
261
|
+
...s
|
|
262
|
+
} = e, [i, c] = F({
|
|
263
|
+
prop: r,
|
|
264
|
+
defaultProp: n ?? [],
|
|
265
|
+
onChange: a,
|
|
266
|
+
caller: R
|
|
267
|
+
}), d = T.useCallback(
|
|
268
|
+
(u) => c((g = []) => [...g, u]),
|
|
269
|
+
[c]
|
|
270
|
+
), p = T.useCallback(
|
|
271
|
+
(u) => c((g = []) => g.filter((b) => b !== u)),
|
|
272
|
+
[c]
|
|
273
|
+
);
|
|
274
|
+
return /* @__PURE__ */ o.jsx(
|
|
275
|
+
$e,
|
|
276
|
+
{
|
|
277
|
+
scope: e.__scopeAccordion,
|
|
278
|
+
value: i,
|
|
279
|
+
onItemOpen: d,
|
|
280
|
+
onItemClose: p,
|
|
281
|
+
children: /* @__PURE__ */ o.jsx(Le, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ o.jsx(ze, { ...s, ref: t }) })
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
}), [To, X] = Y(R), ze = T.forwardRef(
|
|
285
|
+
(e, t) => {
|
|
286
|
+
const { __scopeAccordion: r, disabled: n, dir: a, orientation: s = "vertical", ...i } = e, c = T.useRef(null), d = I(c, t), p = mo(r), g = Mt(a) === "ltr", b = w(e.onKeyDown, (x) => {
|
|
287
|
+
if (!bo.includes(x.key)) return;
|
|
288
|
+
const v = x.target, C = p().filter((te) => !te.ref.current?.disabled), y = C.findIndex((te) => te.ref.current === v), m = C.length;
|
|
289
|
+
if (y === -1) return;
|
|
290
|
+
x.preventDefault();
|
|
291
|
+
let f = y;
|
|
292
|
+
const _ = 0, k = m - 1, E = () => {
|
|
293
|
+
f = y + 1, f > k && (f = _);
|
|
294
|
+
}, S = () => {
|
|
295
|
+
f = y - 1, f < _ && (f = k);
|
|
296
|
+
};
|
|
297
|
+
switch (x.key) {
|
|
298
|
+
case "Home":
|
|
299
|
+
f = _;
|
|
300
|
+
break;
|
|
301
|
+
case "End":
|
|
302
|
+
f = k;
|
|
303
|
+
break;
|
|
304
|
+
case "ArrowRight":
|
|
305
|
+
s === "horizontal" && (g ? E() : S());
|
|
306
|
+
break;
|
|
307
|
+
case "ArrowDown":
|
|
308
|
+
s === "vertical" && E();
|
|
309
|
+
break;
|
|
310
|
+
case "ArrowLeft":
|
|
311
|
+
s === "horizontal" && (g ? S() : E());
|
|
312
|
+
break;
|
|
313
|
+
case "ArrowUp":
|
|
314
|
+
s === "vertical" && S();
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
const B = f % m;
|
|
318
|
+
C[B].ref.current?.focus();
|
|
319
|
+
});
|
|
320
|
+
return /* @__PURE__ */ o.jsx(
|
|
321
|
+
To,
|
|
322
|
+
{
|
|
323
|
+
scope: r,
|
|
324
|
+
disabled: n,
|
|
325
|
+
direction: a,
|
|
326
|
+
orientation: s,
|
|
327
|
+
children: /* @__PURE__ */ o.jsx(pe.Slot, { scope: r, children: /* @__PURE__ */ o.jsx(
|
|
328
|
+
N.div,
|
|
329
|
+
{
|
|
330
|
+
...i,
|
|
331
|
+
"data-orientation": s,
|
|
332
|
+
ref: d,
|
|
333
|
+
onKeyDown: n ? void 0 : b
|
|
334
|
+
}
|
|
335
|
+
) })
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
), W = "AccordionItem", [_o, he] = Y(W), Fe = T.forwardRef(
|
|
340
|
+
(e, t) => {
|
|
341
|
+
const { __scopeAccordion: r, value: n, ...a } = e, s = X(W, r), i = Co(W, r), c = fe(r), d = O(), p = n && i.value.includes(n) || !1, u = s.disabled || e.disabled;
|
|
342
|
+
return /* @__PURE__ */ o.jsx(
|
|
343
|
+
_o,
|
|
344
|
+
{
|
|
345
|
+
scope: r,
|
|
346
|
+
open: p,
|
|
347
|
+
disabled: u,
|
|
348
|
+
triggerId: d,
|
|
349
|
+
children: /* @__PURE__ */ o.jsx(
|
|
350
|
+
Oe,
|
|
351
|
+
{
|
|
352
|
+
"data-orientation": s.orientation,
|
|
353
|
+
"data-state": qe(p),
|
|
354
|
+
...c,
|
|
355
|
+
...a,
|
|
356
|
+
ref: t,
|
|
357
|
+
disabled: u,
|
|
358
|
+
open: p,
|
|
359
|
+
onOpenChange: (g) => {
|
|
360
|
+
g ? i.onItemOpen(n) : i.onItemClose(n);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
)
|
|
364
|
+
}
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
Fe.displayName = W;
|
|
369
|
+
var He = "AccordionHeader", Be = T.forwardRef(
|
|
370
|
+
(e, t) => {
|
|
371
|
+
const { __scopeAccordion: r, ...n } = e, a = X(R, r), s = he(He, r);
|
|
372
|
+
return /* @__PURE__ */ o.jsx(
|
|
373
|
+
N.h3,
|
|
374
|
+
{
|
|
375
|
+
"data-orientation": a.orientation,
|
|
376
|
+
"data-state": qe(s.open),
|
|
377
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
378
|
+
...n,
|
|
379
|
+
ref: t
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
);
|
|
384
|
+
Be.displayName = He;
|
|
385
|
+
var re = "AccordionTrigger", Ge = T.forwardRef(
|
|
386
|
+
(e, t) => {
|
|
387
|
+
const { __scopeAccordion: r, ...n } = e, a = X(R, r), s = he(re, r), i = yo(re, r), c = fe(r);
|
|
388
|
+
return /* @__PURE__ */ o.jsx(pe.ItemSlot, { scope: r, children: /* @__PURE__ */ o.jsx(
|
|
389
|
+
go,
|
|
390
|
+
{
|
|
391
|
+
"aria-disabled": s.open && !i.collapsible || void 0,
|
|
392
|
+
"data-orientation": a.orientation,
|
|
393
|
+
id: s.triggerId,
|
|
394
|
+
...c,
|
|
395
|
+
...n,
|
|
396
|
+
ref: t
|
|
397
|
+
}
|
|
398
|
+
) });
|
|
399
|
+
}
|
|
400
|
+
);
|
|
401
|
+
Ge.displayName = re;
|
|
402
|
+
var Ve = "AccordionContent", We = T.forwardRef(
|
|
403
|
+
(e, t) => {
|
|
404
|
+
const { __scopeAccordion: r, ...n } = e, a = X(R, r), s = he(Ve, r), i = fe(r);
|
|
405
|
+
return /* @__PURE__ */ o.jsx(
|
|
406
|
+
xo,
|
|
407
|
+
{
|
|
408
|
+
role: "region",
|
|
409
|
+
"aria-labelledby": s.triggerId,
|
|
410
|
+
"data-orientation": a.orientation,
|
|
411
|
+
...i,
|
|
412
|
+
...n,
|
|
413
|
+
ref: t,
|
|
414
|
+
style: {
|
|
415
|
+
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
|
|
416
|
+
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
|
|
417
|
+
...e.style
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
We.displayName = Ve;
|
|
424
|
+
function qe(e) {
|
|
425
|
+
return e ? "open" : "closed";
|
|
426
|
+
}
|
|
427
|
+
var No = Me, Ro = Fe, Ao = Be, ko = Ge, Eo = We, Z = "Dialog", [Ke, vn] = K(Z), [Do, A] = Ke(Z), Ue = (e) => {
|
|
428
|
+
const {
|
|
429
|
+
__scopeDialog: t,
|
|
430
|
+
children: r,
|
|
431
|
+
open: n,
|
|
432
|
+
defaultOpen: a,
|
|
433
|
+
onOpenChange: s,
|
|
434
|
+
modal: i = !0
|
|
435
|
+
} = e, c = l.useRef(null), d = l.useRef(null), [p, u] = F({
|
|
436
|
+
prop: n,
|
|
437
|
+
defaultProp: a ?? !1,
|
|
438
|
+
onChange: s,
|
|
439
|
+
caller: Z
|
|
440
|
+
});
|
|
441
|
+
return /* @__PURE__ */ o.jsx(
|
|
442
|
+
Do,
|
|
443
|
+
{
|
|
444
|
+
scope: t,
|
|
445
|
+
triggerRef: c,
|
|
446
|
+
contentRef: d,
|
|
447
|
+
contentId: O(),
|
|
448
|
+
titleId: O(),
|
|
449
|
+
descriptionId: O(),
|
|
450
|
+
open: p,
|
|
451
|
+
onOpenChange: u,
|
|
452
|
+
onOpenToggle: l.useCallback(() => u((g) => !g), [u]),
|
|
453
|
+
modal: i,
|
|
454
|
+
children: r
|
|
455
|
+
}
|
|
456
|
+
);
|
|
457
|
+
};
|
|
458
|
+
Ue.displayName = Z;
|
|
459
|
+
var Ye = "DialogTrigger", Xe = l.forwardRef(
|
|
460
|
+
(e, t) => {
|
|
461
|
+
const { __scopeDialog: r, ...n } = e, a = A(Ye, r), s = I(t, a.triggerRef);
|
|
462
|
+
return /* @__PURE__ */ o.jsx(
|
|
463
|
+
N.button,
|
|
464
|
+
{
|
|
465
|
+
type: "button",
|
|
466
|
+
"aria-haspopup": "dialog",
|
|
467
|
+
"aria-expanded": a.open,
|
|
468
|
+
"aria-controls": a.contentId,
|
|
469
|
+
"data-state": be(a.open),
|
|
470
|
+
...n,
|
|
471
|
+
ref: s,
|
|
472
|
+
onClick: w(e.onClick, a.onOpenToggle)
|
|
473
|
+
}
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
Xe.displayName = Ye;
|
|
478
|
+
var ge = "DialogPortal", [Po, Ze] = Ke(ge, {
|
|
479
|
+
forceMount: void 0
|
|
480
|
+
}), Je = (e) => {
|
|
481
|
+
const { __scopeDialog: t, forceMount: r, children: n, container: a } = e, s = A(ge, t);
|
|
482
|
+
return /* @__PURE__ */ o.jsx(Po, { scope: t, forceMount: r, children: l.Children.map(n, (i) => /* @__PURE__ */ o.jsx($, { present: r || s.open, children: /* @__PURE__ */ o.jsx(_e, { asChild: !0, container: a, children: i }) })) });
|
|
483
|
+
};
|
|
484
|
+
Je.displayName = ge;
|
|
485
|
+
var q = "DialogOverlay", Qe = l.forwardRef(
|
|
486
|
+
(e, t) => {
|
|
487
|
+
const r = Ze(q, e.__scopeDialog), { forceMount: n = r.forceMount, ...a } = e, s = A(q, e.__scopeDialog);
|
|
488
|
+
return s.modal ? /* @__PURE__ */ o.jsx($, { present: n || s.open, children: /* @__PURE__ */ o.jsx(So, { ...a, ref: t }) }) : null;
|
|
489
|
+
}
|
|
490
|
+
);
|
|
491
|
+
Qe.displayName = q;
|
|
492
|
+
var Io = Rt("DialogOverlay.RemoveScroll"), So = l.forwardRef(
|
|
493
|
+
(e, t) => {
|
|
494
|
+
const { __scopeDialog: r, ...n } = e, a = A(q, r);
|
|
495
|
+
return (
|
|
496
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
497
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
498
|
+
/* @__PURE__ */ o.jsx(Lt, { as: Io, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ o.jsx(
|
|
499
|
+
N.div,
|
|
500
|
+
{
|
|
501
|
+
"data-state": be(a.open),
|
|
502
|
+
...n,
|
|
503
|
+
ref: t,
|
|
504
|
+
style: { pointerEvents: "auto", ...n.style }
|
|
505
|
+
}
|
|
506
|
+
) })
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
), P = "DialogContent", et = l.forwardRef(
|
|
510
|
+
(e, t) => {
|
|
511
|
+
const r = Ze(P, e.__scopeDialog), { forceMount: n = r.forceMount, ...a } = e, s = A(P, e.__scopeDialog);
|
|
512
|
+
return /* @__PURE__ */ o.jsx($, { present: n || s.open, children: s.modal ? /* @__PURE__ */ o.jsx(Oo, { ...a, ref: t }) : /* @__PURE__ */ o.jsx(Mo, { ...a, ref: t }) });
|
|
513
|
+
}
|
|
514
|
+
);
|
|
515
|
+
et.displayName = P;
|
|
516
|
+
var Oo = l.forwardRef(
|
|
517
|
+
(e, t) => {
|
|
518
|
+
const r = A(P, e.__scopeDialog), n = l.useRef(null), a = I(t, r.contentRef, n);
|
|
519
|
+
return l.useEffect(() => {
|
|
520
|
+
const s = n.current;
|
|
521
|
+
if (s) return $t(s);
|
|
522
|
+
}, []), /* @__PURE__ */ o.jsx(
|
|
523
|
+
tt,
|
|
524
|
+
{
|
|
525
|
+
...e,
|
|
526
|
+
ref: a,
|
|
527
|
+
trapFocus: r.open,
|
|
528
|
+
disableOutsidePointerEvents: !0,
|
|
529
|
+
onCloseAutoFocus: w(e.onCloseAutoFocus, (s) => {
|
|
530
|
+
s.preventDefault(), r.triggerRef.current?.focus();
|
|
531
|
+
}),
|
|
532
|
+
onPointerDownOutside: w(e.onPointerDownOutside, (s) => {
|
|
533
|
+
const i = s.detail.originalEvent, c = i.button === 0 && i.ctrlKey === !0;
|
|
534
|
+
(i.button === 2 || c) && s.preventDefault();
|
|
535
|
+
}),
|
|
536
|
+
onFocusOutside: w(
|
|
537
|
+
e.onFocusOutside,
|
|
538
|
+
(s) => s.preventDefault()
|
|
539
|
+
)
|
|
540
|
+
}
|
|
541
|
+
);
|
|
542
|
+
}
|
|
543
|
+
), Mo = l.forwardRef(
|
|
544
|
+
(e, t) => {
|
|
545
|
+
const r = A(P, e.__scopeDialog), n = l.useRef(!1), a = l.useRef(!1);
|
|
546
|
+
return /* @__PURE__ */ o.jsx(
|
|
547
|
+
tt,
|
|
548
|
+
{
|
|
549
|
+
...e,
|
|
550
|
+
ref: t,
|
|
551
|
+
trapFocus: !1,
|
|
552
|
+
disableOutsidePointerEvents: !1,
|
|
553
|
+
onCloseAutoFocus: (s) => {
|
|
554
|
+
e.onCloseAutoFocus?.(s), s.defaultPrevented || (n.current || r.triggerRef.current?.focus(), s.preventDefault()), n.current = !1, a.current = !1;
|
|
555
|
+
},
|
|
556
|
+
onInteractOutside: (s) => {
|
|
557
|
+
e.onInteractOutside?.(s), s.defaultPrevented || (n.current = !0, s.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
558
|
+
const i = s.target;
|
|
559
|
+
r.triggerRef.current?.contains(i) && s.preventDefault(), s.detail.originalEvent.type === "focusin" && a.current && s.preventDefault();
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
), tt = l.forwardRef(
|
|
565
|
+
(e, t) => {
|
|
566
|
+
const { __scopeDialog: r, trapFocus: n, onOpenAutoFocus: a, onCloseAutoFocus: s, ...i } = e, c = A(P, r), d = l.useRef(null), p = I(t, d);
|
|
567
|
+
return zt(), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
568
|
+
/* @__PURE__ */ o.jsx(
|
|
569
|
+
Ft,
|
|
570
|
+
{
|
|
571
|
+
asChild: !0,
|
|
572
|
+
loop: !0,
|
|
573
|
+
trapped: n,
|
|
574
|
+
onMountAutoFocus: a,
|
|
575
|
+
onUnmountAutoFocus: s,
|
|
576
|
+
children: /* @__PURE__ */ o.jsx(
|
|
577
|
+
Ne,
|
|
578
|
+
{
|
|
579
|
+
role: "dialog",
|
|
580
|
+
id: c.contentId,
|
|
581
|
+
"aria-describedby": c.descriptionId,
|
|
582
|
+
"aria-labelledby": c.titleId,
|
|
583
|
+
"data-state": be(c.open),
|
|
584
|
+
...i,
|
|
585
|
+
ref: p,
|
|
586
|
+
onDismiss: () => c.onOpenChange(!1)
|
|
587
|
+
}
|
|
588
|
+
)
|
|
589
|
+
}
|
|
590
|
+
),
|
|
591
|
+
/* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
592
|
+
/* @__PURE__ */ o.jsx($o, { titleId: c.titleId }),
|
|
593
|
+
/* @__PURE__ */ o.jsx(zo, { contentRef: d, descriptionId: c.descriptionId })
|
|
594
|
+
] })
|
|
595
|
+
] });
|
|
596
|
+
}
|
|
597
|
+
), xe = "DialogTitle", ot = l.forwardRef(
|
|
598
|
+
(e, t) => {
|
|
599
|
+
const { __scopeDialog: r, ...n } = e, a = A(xe, r);
|
|
600
|
+
return /* @__PURE__ */ o.jsx(N.h2, { id: a.titleId, ...n, ref: t });
|
|
601
|
+
}
|
|
602
|
+
);
|
|
603
|
+
ot.displayName = xe;
|
|
604
|
+
var rt = "DialogDescription", nt = l.forwardRef(
|
|
605
|
+
(e, t) => {
|
|
606
|
+
const { __scopeDialog: r, ...n } = e, a = A(rt, r);
|
|
607
|
+
return /* @__PURE__ */ o.jsx(N.p, { id: a.descriptionId, ...n, ref: t });
|
|
608
|
+
}
|
|
609
|
+
);
|
|
610
|
+
nt.displayName = rt;
|
|
611
|
+
var at = "DialogClose", st = l.forwardRef(
|
|
612
|
+
(e, t) => {
|
|
613
|
+
const { __scopeDialog: r, ...n } = e, a = A(at, r);
|
|
614
|
+
return /* @__PURE__ */ o.jsx(
|
|
615
|
+
N.button,
|
|
616
|
+
{
|
|
617
|
+
type: "button",
|
|
618
|
+
...n,
|
|
619
|
+
ref: t,
|
|
620
|
+
onClick: w(e.onClick, () => a.onOpenChange(!1))
|
|
621
|
+
}
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
st.displayName = at;
|
|
626
|
+
function be(e) {
|
|
627
|
+
return e ? "open" : "closed";
|
|
628
|
+
}
|
|
629
|
+
var it = "DialogTitleWarning", [Cn, lt] = Ht(it, {
|
|
630
|
+
contentName: P,
|
|
631
|
+
titleName: xe,
|
|
632
|
+
docsSlug: "dialog"
|
|
633
|
+
}), $o = ({ titleId: e }) => {
|
|
634
|
+
const t = lt(it), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
635
|
+
|
|
636
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
637
|
+
|
|
638
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
639
|
+
return l.useEffect(() => {
|
|
640
|
+
e && (document.getElementById(e) || console.error(r));
|
|
641
|
+
}, [r, e]), null;
|
|
642
|
+
}, Lo = "DialogDescriptionWarning", zo = ({ contentRef: e, descriptionId: t }) => {
|
|
643
|
+
const n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lt(Lo).contentName}}.`;
|
|
644
|
+
return l.useEffect(() => {
|
|
645
|
+
const a = e.current?.getAttribute("aria-describedby");
|
|
646
|
+
t && a && (document.getElementById(t) || console.warn(n));
|
|
647
|
+
}, [n, e, t]), null;
|
|
648
|
+
}, Fo = Ue, yn = Xe, Ho = Je, Bo = Qe, Go = et, Vo = ot, Wo = nt, qo = st, Ko = "Separator", je = "horizontal", Uo = ["horizontal", "vertical"], ct = l.forwardRef((e, t) => {
|
|
649
|
+
const { decorative: r, orientation: n = je, ...a } = e, s = Yo(n) ? n : je, c = r ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
650
|
+
return /* @__PURE__ */ o.jsx(
|
|
651
|
+
N.div,
|
|
652
|
+
{
|
|
653
|
+
"data-orientation": s,
|
|
654
|
+
...c,
|
|
655
|
+
...a,
|
|
656
|
+
ref: t
|
|
657
|
+
}
|
|
658
|
+
);
|
|
659
|
+
});
|
|
660
|
+
ct.displayName = Ko;
|
|
661
|
+
function Yo(e) {
|
|
662
|
+
return Uo.includes(e);
|
|
663
|
+
}
|
|
664
|
+
var Xo = ct, [J, jn] = K("Tooltip", [
|
|
665
|
+
Re
|
|
666
|
+
]), Q = Re(), dt = "TooltipProvider", Zo = 700, ne = "tooltip.open", [Jo, me] = J(dt), ut = (e) => {
|
|
667
|
+
const {
|
|
668
|
+
__scopeTooltip: t,
|
|
669
|
+
delayDuration: r = Zo,
|
|
670
|
+
skipDelayDuration: n = 300,
|
|
671
|
+
disableHoverableContent: a = !1,
|
|
672
|
+
children: s
|
|
673
|
+
} = e, i = l.useRef(!0), c = l.useRef(!1), d = l.useRef(0);
|
|
674
|
+
return l.useEffect(() => {
|
|
675
|
+
const p = d.current;
|
|
676
|
+
return () => window.clearTimeout(p);
|
|
677
|
+
}, []), /* @__PURE__ */ o.jsx(
|
|
678
|
+
Jo,
|
|
679
|
+
{
|
|
680
|
+
scope: t,
|
|
681
|
+
isOpenDelayedRef: i,
|
|
682
|
+
delayDuration: r,
|
|
683
|
+
onOpen: l.useCallback(() => {
|
|
684
|
+
window.clearTimeout(d.current), i.current = !1;
|
|
685
|
+
}, []),
|
|
686
|
+
onClose: l.useCallback(() => {
|
|
687
|
+
window.clearTimeout(d.current), d.current = window.setTimeout(
|
|
688
|
+
() => i.current = !0,
|
|
689
|
+
n
|
|
690
|
+
);
|
|
691
|
+
}, [n]),
|
|
692
|
+
isPointerInTransitRef: c,
|
|
693
|
+
onPointerInTransitChange: l.useCallback((p) => {
|
|
694
|
+
c.current = p;
|
|
695
|
+
}, []),
|
|
696
|
+
disableHoverableContent: a,
|
|
697
|
+
children: s
|
|
698
|
+
}
|
|
699
|
+
);
|
|
700
|
+
};
|
|
701
|
+
ut.displayName = dt;
|
|
702
|
+
var z = "Tooltip", [Qo, H] = J(z), pt = (e) => {
|
|
703
|
+
const {
|
|
704
|
+
__scopeTooltip: t,
|
|
705
|
+
children: r,
|
|
706
|
+
open: n,
|
|
707
|
+
defaultOpen: a,
|
|
708
|
+
onOpenChange: s,
|
|
709
|
+
disableHoverableContent: i,
|
|
710
|
+
delayDuration: c
|
|
711
|
+
} = e, d = me(z, e.__scopeTooltip), p = Q(t), [u, g] = l.useState(null), b = O(), x = l.useRef(0), v = i ?? d.disableHoverableContent, C = c ?? d.delayDuration, y = l.useRef(!1), [m, f] = F({
|
|
712
|
+
prop: n,
|
|
713
|
+
defaultProp: a ?? !1,
|
|
714
|
+
onChange: (B) => {
|
|
715
|
+
B ? (d.onOpen(), document.dispatchEvent(new CustomEvent(ne))) : d.onClose(), s?.(B);
|
|
716
|
+
},
|
|
717
|
+
caller: z
|
|
718
|
+
}), _ = l.useMemo(() => m ? y.current ? "delayed-open" : "instant-open" : "closed", [m]), k = l.useCallback(() => {
|
|
719
|
+
window.clearTimeout(x.current), x.current = 0, y.current = !1, f(!0);
|
|
720
|
+
}, [f]), E = l.useCallback(() => {
|
|
721
|
+
window.clearTimeout(x.current), x.current = 0, f(!1);
|
|
722
|
+
}, [f]), S = l.useCallback(() => {
|
|
723
|
+
window.clearTimeout(x.current), x.current = window.setTimeout(() => {
|
|
724
|
+
y.current = !0, f(!0), x.current = 0;
|
|
725
|
+
}, C);
|
|
726
|
+
}, [C, f]);
|
|
727
|
+
return l.useEffect(() => () => {
|
|
728
|
+
x.current && (window.clearTimeout(x.current), x.current = 0);
|
|
729
|
+
}, []), /* @__PURE__ */ o.jsx(Bt, { ...p, children: /* @__PURE__ */ o.jsx(
|
|
730
|
+
Qo,
|
|
731
|
+
{
|
|
732
|
+
scope: t,
|
|
733
|
+
contentId: b,
|
|
734
|
+
open: m,
|
|
735
|
+
stateAttribute: _,
|
|
736
|
+
trigger: u,
|
|
737
|
+
onTriggerChange: g,
|
|
738
|
+
onTriggerEnter: l.useCallback(() => {
|
|
739
|
+
d.isOpenDelayedRef.current ? S() : k();
|
|
740
|
+
}, [d.isOpenDelayedRef, S, k]),
|
|
741
|
+
onTriggerLeave: l.useCallback(() => {
|
|
742
|
+
v ? E() : (window.clearTimeout(x.current), x.current = 0);
|
|
743
|
+
}, [E, v]),
|
|
744
|
+
onOpen: k,
|
|
745
|
+
onClose: E,
|
|
746
|
+
disableHoverableContent: v,
|
|
747
|
+
children: r
|
|
748
|
+
}
|
|
749
|
+
) });
|
|
750
|
+
};
|
|
751
|
+
pt.displayName = z;
|
|
752
|
+
var ae = "TooltipTrigger", ft = l.forwardRef(
|
|
753
|
+
(e, t) => {
|
|
754
|
+
const { __scopeTooltip: r, ...n } = e, a = H(ae, r), s = me(ae, r), i = Q(r), c = l.useRef(null), d = I(t, c, a.onTriggerChange), p = l.useRef(!1), u = l.useRef(!1), g = l.useCallback(() => p.current = !1, []);
|
|
755
|
+
return l.useEffect(() => () => document.removeEventListener("pointerup", g), [g]), /* @__PURE__ */ o.jsx(Gt, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
|
|
756
|
+
N.button,
|
|
757
|
+
{
|
|
758
|
+
"aria-describedby": a.open ? a.contentId : void 0,
|
|
759
|
+
"data-state": a.stateAttribute,
|
|
760
|
+
...n,
|
|
761
|
+
ref: d,
|
|
762
|
+
onPointerMove: w(e.onPointerMove, (b) => {
|
|
763
|
+
b.pointerType !== "touch" && !u.current && !s.isPointerInTransitRef.current && (a.onTriggerEnter(), u.current = !0);
|
|
764
|
+
}),
|
|
765
|
+
onPointerLeave: w(e.onPointerLeave, () => {
|
|
766
|
+
a.onTriggerLeave(), u.current = !1;
|
|
767
|
+
}),
|
|
768
|
+
onPointerDown: w(e.onPointerDown, () => {
|
|
769
|
+
a.open && a.onClose(), p.current = !0, document.addEventListener("pointerup", g, { once: !0 });
|
|
770
|
+
}),
|
|
771
|
+
onFocus: w(e.onFocus, () => {
|
|
772
|
+
p.current || a.onOpen();
|
|
773
|
+
}),
|
|
774
|
+
onBlur: w(e.onBlur, a.onClose),
|
|
775
|
+
onClick: w(e.onClick, a.onClose)
|
|
776
|
+
}
|
|
777
|
+
) });
|
|
778
|
+
}
|
|
779
|
+
);
|
|
780
|
+
ft.displayName = ae;
|
|
781
|
+
var ve = "TooltipPortal", [er, tr] = J(ve, {
|
|
782
|
+
forceMount: void 0
|
|
783
|
+
}), ht = (e) => {
|
|
784
|
+
const { __scopeTooltip: t, forceMount: r, children: n, container: a } = e, s = H(ve, t);
|
|
785
|
+
return /* @__PURE__ */ o.jsx(er, { scope: t, forceMount: r, children: /* @__PURE__ */ o.jsx($, { present: r || s.open, children: /* @__PURE__ */ o.jsx(_e, { asChild: !0, container: a, children: n }) }) });
|
|
786
|
+
};
|
|
787
|
+
ht.displayName = ve;
|
|
788
|
+
var M = "TooltipContent", gt = l.forwardRef(
|
|
789
|
+
(e, t) => {
|
|
790
|
+
const r = tr(M, e.__scopeTooltip), { forceMount: n = r.forceMount, side: a = "top", ...s } = e, i = H(M, e.__scopeTooltip);
|
|
791
|
+
return /* @__PURE__ */ o.jsx($, { present: n || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ o.jsx(xt, { side: a, ...s, ref: t }) : /* @__PURE__ */ o.jsx(or, { side: a, ...s, ref: t }) });
|
|
792
|
+
}
|
|
793
|
+
), or = l.forwardRef((e, t) => {
|
|
794
|
+
const r = H(M, e.__scopeTooltip), n = me(M, e.__scopeTooltip), a = l.useRef(null), s = I(t, a), [i, c] = l.useState(null), { trigger: d, onClose: p } = r, u = a.current, { onPointerInTransitChange: g } = n, b = l.useCallback(() => {
|
|
795
|
+
c(null), g(!1);
|
|
796
|
+
}, [g]), x = l.useCallback(
|
|
797
|
+
(v, C) => {
|
|
798
|
+
const y = v.currentTarget, m = { x: v.clientX, y: v.clientY }, f = sr(m, y.getBoundingClientRect()), _ = ir(m, f), k = lr(C.getBoundingClientRect()), E = dr([..._, ...k]);
|
|
799
|
+
c(E), g(!0);
|
|
800
|
+
},
|
|
801
|
+
[g]
|
|
802
|
+
);
|
|
803
|
+
return l.useEffect(() => () => b(), [b]), l.useEffect(() => {
|
|
804
|
+
if (d && u) {
|
|
805
|
+
const v = (y) => x(y, u), C = (y) => x(y, d);
|
|
806
|
+
return d.addEventListener("pointerleave", v), u.addEventListener("pointerleave", C), () => {
|
|
807
|
+
d.removeEventListener("pointerleave", v), u.removeEventListener("pointerleave", C);
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
}, [d, u, x, b]), l.useEffect(() => {
|
|
811
|
+
if (i) {
|
|
812
|
+
const v = (C) => {
|
|
813
|
+
const y = C.target, m = { x: C.clientX, y: C.clientY }, f = d?.contains(y) || u?.contains(y), _ = !cr(m, i);
|
|
814
|
+
f ? b() : _ && (b(), p());
|
|
815
|
+
};
|
|
816
|
+
return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
|
|
817
|
+
}
|
|
818
|
+
}, [d, u, i, p, b]), /* @__PURE__ */ o.jsx(xt, { ...e, ref: s });
|
|
819
|
+
}), [rr, nr] = J(z, { isInside: !1 }), ar = At("TooltipContent"), xt = l.forwardRef(
|
|
820
|
+
(e, t) => {
|
|
821
|
+
const {
|
|
822
|
+
__scopeTooltip: r,
|
|
823
|
+
children: n,
|
|
824
|
+
"aria-label": a,
|
|
825
|
+
onEscapeKeyDown: s,
|
|
826
|
+
onPointerDownOutside: i,
|
|
827
|
+
...c
|
|
828
|
+
} = e, d = H(M, r), p = Q(r), { onClose: u } = d;
|
|
829
|
+
return l.useEffect(() => (document.addEventListener(ne, u), () => document.removeEventListener(ne, u)), [u]), l.useEffect(() => {
|
|
830
|
+
if (d.trigger) {
|
|
831
|
+
const g = (b) => {
|
|
832
|
+
b.target?.contains(d.trigger) && u();
|
|
833
|
+
};
|
|
834
|
+
return window.addEventListener("scroll", g, { capture: !0 }), () => window.removeEventListener("scroll", g, { capture: !0 });
|
|
835
|
+
}
|
|
836
|
+
}, [d.trigger, u]), /* @__PURE__ */ o.jsx(
|
|
837
|
+
Ne,
|
|
838
|
+
{
|
|
839
|
+
asChild: !0,
|
|
840
|
+
disableOutsidePointerEvents: !1,
|
|
841
|
+
onEscapeKeyDown: s,
|
|
842
|
+
onPointerDownOutside: i,
|
|
843
|
+
onFocusOutside: (g) => g.preventDefault(),
|
|
844
|
+
onDismiss: u,
|
|
845
|
+
children: /* @__PURE__ */ o.jsxs(
|
|
846
|
+
Wt,
|
|
847
|
+
{
|
|
848
|
+
"data-state": d.stateAttribute,
|
|
849
|
+
...p,
|
|
850
|
+
...c,
|
|
851
|
+
ref: t,
|
|
852
|
+
style: {
|
|
853
|
+
...c.style,
|
|
854
|
+
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
855
|
+
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
856
|
+
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
857
|
+
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
858
|
+
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
859
|
+
},
|
|
860
|
+
children: [
|
|
861
|
+
/* @__PURE__ */ o.jsx(ar, { children: n }),
|
|
862
|
+
/* @__PURE__ */ o.jsx(rr, { scope: r, isInside: !0, children: /* @__PURE__ */ o.jsx(qt, { id: d.contentId, role: "tooltip", children: a || n }) })
|
|
863
|
+
]
|
|
864
|
+
}
|
|
865
|
+
)
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
);
|
|
870
|
+
gt.displayName = M;
|
|
871
|
+
var bt = "TooltipArrow", mt = l.forwardRef(
|
|
872
|
+
(e, t) => {
|
|
873
|
+
const { __scopeTooltip: r, ...n } = e, a = Q(r);
|
|
874
|
+
return nr(
|
|
875
|
+
bt,
|
|
876
|
+
r
|
|
877
|
+
).isInside ? null : /* @__PURE__ */ o.jsx(Vt, { ...a, ...n, ref: t });
|
|
878
|
+
}
|
|
879
|
+
);
|
|
880
|
+
mt.displayName = bt;
|
|
881
|
+
function sr(e, t) {
|
|
882
|
+
const r = Math.abs(t.top - e.y), n = Math.abs(t.bottom - e.y), a = Math.abs(t.right - e.x), s = Math.abs(t.left - e.x);
|
|
883
|
+
switch (Math.min(r, n, a, s)) {
|
|
884
|
+
case s:
|
|
885
|
+
return "left";
|
|
886
|
+
case a:
|
|
887
|
+
return "right";
|
|
888
|
+
case r:
|
|
889
|
+
return "top";
|
|
890
|
+
case n:
|
|
891
|
+
return "bottom";
|
|
892
|
+
default:
|
|
893
|
+
throw new Error("unreachable");
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
function ir(e, t, r = 5) {
|
|
897
|
+
const n = [];
|
|
898
|
+
switch (t) {
|
|
899
|
+
case "top":
|
|
900
|
+
n.push(
|
|
901
|
+
{ x: e.x - r, y: e.y + r },
|
|
902
|
+
{ x: e.x + r, y: e.y + r }
|
|
903
|
+
);
|
|
904
|
+
break;
|
|
905
|
+
case "bottom":
|
|
906
|
+
n.push(
|
|
907
|
+
{ x: e.x - r, y: e.y - r },
|
|
908
|
+
{ x: e.x + r, y: e.y - r }
|
|
909
|
+
);
|
|
910
|
+
break;
|
|
911
|
+
case "left":
|
|
912
|
+
n.push(
|
|
913
|
+
{ x: e.x + r, y: e.y - r },
|
|
914
|
+
{ x: e.x + r, y: e.y + r }
|
|
915
|
+
);
|
|
916
|
+
break;
|
|
917
|
+
case "right":
|
|
918
|
+
n.push(
|
|
919
|
+
{ x: e.x - r, y: e.y - r },
|
|
920
|
+
{ x: e.x - r, y: e.y + r }
|
|
921
|
+
);
|
|
922
|
+
break;
|
|
923
|
+
}
|
|
924
|
+
return n;
|
|
925
|
+
}
|
|
926
|
+
function lr(e) {
|
|
927
|
+
const { top: t, right: r, bottom: n, left: a } = e;
|
|
928
|
+
return [
|
|
929
|
+
{ x: a, y: t },
|
|
930
|
+
{ x: r, y: t },
|
|
931
|
+
{ x: r, y: n },
|
|
932
|
+
{ x: a, y: n }
|
|
933
|
+
];
|
|
934
|
+
}
|
|
935
|
+
function cr(e, t) {
|
|
936
|
+
const { x: r, y: n } = e;
|
|
937
|
+
let a = !1;
|
|
938
|
+
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
939
|
+
const c = t[s], d = t[i], p = c.x, u = c.y, g = d.x, b = d.y;
|
|
940
|
+
u > n != b > n && r < (g - p) * (n - u) / (b - u) + p && (a = !a);
|
|
941
|
+
}
|
|
942
|
+
return a;
|
|
943
|
+
}
|
|
944
|
+
function dr(e) {
|
|
945
|
+
const t = e.slice();
|
|
946
|
+
return t.sort((r, n) => r.x < n.x ? -1 : r.x > n.x ? 1 : r.y < n.y ? -1 : r.y > n.y ? 1 : 0), ur(t);
|
|
947
|
+
}
|
|
948
|
+
function ur(e) {
|
|
949
|
+
if (e.length <= 1) return e.slice();
|
|
950
|
+
const t = [];
|
|
951
|
+
for (let n = 0; n < e.length; n++) {
|
|
952
|
+
const a = e[n];
|
|
953
|
+
for (; t.length >= 2; ) {
|
|
954
|
+
const s = t[t.length - 1], i = t[t.length - 2];
|
|
955
|
+
if ((s.x - i.x) * (a.y - i.y) >= (s.y - i.y) * (a.x - i.x)) t.pop();
|
|
956
|
+
else break;
|
|
957
|
+
}
|
|
958
|
+
t.push(a);
|
|
959
|
+
}
|
|
960
|
+
t.pop();
|
|
961
|
+
const r = [];
|
|
962
|
+
for (let n = e.length - 1; n >= 0; n--) {
|
|
963
|
+
const a = e[n];
|
|
964
|
+
for (; r.length >= 2; ) {
|
|
965
|
+
const s = r[r.length - 1], i = r[r.length - 2];
|
|
966
|
+
if ((s.x - i.x) * (a.y - i.y) >= (s.y - i.y) * (a.x - i.x)) r.pop();
|
|
967
|
+
else break;
|
|
968
|
+
}
|
|
969
|
+
r.push(a);
|
|
970
|
+
}
|
|
971
|
+
return r.pop(), t.length === 1 && r.length === 1 && t[0].x === r[0].x && t[0].y === r[0].y ? t : t.concat(r);
|
|
972
|
+
}
|
|
973
|
+
var pr = ut, fr = pt, hr = ft, gr = ht, xr = gt, br = mt;
|
|
974
|
+
function mr({ ...e }) {
|
|
975
|
+
return /* @__PURE__ */ o.jsx(No, { "data-slot": "accordion", ...e });
|
|
976
|
+
}
|
|
977
|
+
function vr({ className: e, ...t }) {
|
|
978
|
+
return /* @__PURE__ */ o.jsx(
|
|
979
|
+
Ro,
|
|
980
|
+
{
|
|
981
|
+
className: h("border-b last:border-b-0", e),
|
|
982
|
+
"data-slot": "accordion-item",
|
|
983
|
+
...t
|
|
984
|
+
}
|
|
985
|
+
);
|
|
986
|
+
}
|
|
987
|
+
function Cr({ className: e, children: t, ...r }) {
|
|
988
|
+
return /* @__PURE__ */ o.jsx(Ao, { className: "flex", children: /* @__PURE__ */ o.jsxs(
|
|
989
|
+
ko,
|
|
990
|
+
{
|
|
991
|
+
className: h(
|
|
992
|
+
"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left font-medium text-sm outline-none transition-all hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
993
|
+
e
|
|
994
|
+
),
|
|
995
|
+
"data-slot": "accordion-trigger",
|
|
996
|
+
...r,
|
|
997
|
+
children: [
|
|
998
|
+
t,
|
|
999
|
+
/* @__PURE__ */ o.jsx(Kt, { className: "pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" })
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
1002
|
+
) });
|
|
1003
|
+
}
|
|
1004
|
+
function yr({ className: e, children: t, ...r }) {
|
|
1005
|
+
return /* @__PURE__ */ o.jsx(
|
|
1006
|
+
Eo,
|
|
1007
|
+
{
|
|
1008
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
1009
|
+
"data-slot": "accordion-content",
|
|
1010
|
+
...r,
|
|
1011
|
+
children: /* @__PURE__ */ o.jsx("div", { className: h("pt-0 pb-4", e), children: t })
|
|
1012
|
+
}
|
|
1013
|
+
);
|
|
1014
|
+
}
|
|
1015
|
+
const Ce = ({ children: e, ...t }) => /* @__PURE__ */ o.jsx(mr, { ...t, children: e });
|
|
1016
|
+
Ce.Item = vr;
|
|
1017
|
+
Ce.Trigger = Cr;
|
|
1018
|
+
Ce.Content = yr;
|
|
1019
|
+
function jr({ ...e }) {
|
|
1020
|
+
return /* @__PURE__ */ o.jsx(Oe, { "data-slot": "collapsible", ...e });
|
|
1021
|
+
}
|
|
1022
|
+
function wr({ ...e }) {
|
|
1023
|
+
return /* @__PURE__ */ o.jsx(le, { "data-slot": "collapsible-trigger", ...e });
|
|
1024
|
+
}
|
|
1025
|
+
function Tr({ ...e }) {
|
|
1026
|
+
return /* @__PURE__ */ o.jsx(de, { "data-slot": "collapsible-content", ...e });
|
|
1027
|
+
}
|
|
1028
|
+
const vt = ({ children: e, ...t }) => /* @__PURE__ */ o.jsx(jr, { ...t, children: e });
|
|
1029
|
+
vt.Trigger = wr;
|
|
1030
|
+
vt.Content = Tr;
|
|
1031
|
+
const Ct = ({ children: e, ...t }) => /* @__PURE__ */ o.jsx(Ut, { ...t, children: e });
|
|
1032
|
+
Ct.Trigger = Yt;
|
|
1033
|
+
Ct.Content = Xt;
|
|
1034
|
+
function _r({
|
|
1035
|
+
className: e,
|
|
1036
|
+
orientation: t = "horizontal",
|
|
1037
|
+
decorative: r = !0,
|
|
1038
|
+
...n
|
|
1039
|
+
}) {
|
|
1040
|
+
return /* @__PURE__ */ o.jsx(
|
|
1041
|
+
Xo,
|
|
1042
|
+
{
|
|
1043
|
+
className: h(
|
|
1044
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
|
|
1045
|
+
e
|
|
1046
|
+
),
|
|
1047
|
+
"data-slot": "separator-root",
|
|
1048
|
+
decorative: r,
|
|
1049
|
+
orientation: t,
|
|
1050
|
+
...n
|
|
1051
|
+
}
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
1054
|
+
function Nr({ className: e, ...t }) {
|
|
1055
|
+
return /* @__PURE__ */ o.jsx("div", { className: "relative w-full overflow-x-auto", "data-slot": "table-container", children: /* @__PURE__ */ o.jsx("table", { className: h("w-full caption-bottom text-sm", e), "data-slot": "table", ...t }) });
|
|
1056
|
+
}
|
|
1057
|
+
function Rr({ className: e, ...t }) {
|
|
1058
|
+
return /* @__PURE__ */ o.jsx("thead", { className: h("[&_tr]:border-b", e), "data-slot": "table-header", ...t });
|
|
1059
|
+
}
|
|
1060
|
+
function Ar({ className: e, ...t }) {
|
|
1061
|
+
return /* @__PURE__ */ o.jsx("tbody", { className: h("[&_tr:last-child]:border-0", e), "data-slot": "table-body", ...t });
|
|
1062
|
+
}
|
|
1063
|
+
function kr({ className: e, ...t }) {
|
|
1064
|
+
return /* @__PURE__ */ o.jsx(
|
|
1065
|
+
"tr",
|
|
1066
|
+
{
|
|
1067
|
+
className: h("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", e),
|
|
1068
|
+
"data-slot": "table-row",
|
|
1069
|
+
...t
|
|
1070
|
+
}
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
function Er({ className: e, ...t }) {
|
|
1074
|
+
return /* @__PURE__ */ o.jsx(
|
|
1075
|
+
"th",
|
|
1076
|
+
{
|
|
1077
|
+
className: h(
|
|
1078
|
+
"h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1079
|
+
e
|
|
1080
|
+
),
|
|
1081
|
+
"data-slot": "table-head",
|
|
1082
|
+
...t
|
|
1083
|
+
}
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
1086
|
+
function Dr({ className: e, ...t }) {
|
|
1087
|
+
return /* @__PURE__ */ o.jsx(
|
|
1088
|
+
"td",
|
|
1089
|
+
{
|
|
1090
|
+
className: h(
|
|
1091
|
+
"whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1092
|
+
e
|
|
1093
|
+
),
|
|
1094
|
+
"data-slot": "table-cell",
|
|
1095
|
+
...t
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
function Pr({ className: e, ...t }) {
|
|
1100
|
+
return /* @__PURE__ */ o.jsx("caption", { className: h("mt-4 text-muted-foreground text-sm", e), "data-slot": "table-caption", ...t });
|
|
1101
|
+
}
|
|
1102
|
+
const L = ({ children: e, ...t }) => /* @__PURE__ */ o.jsx(Nr, { ...t, children: e });
|
|
1103
|
+
L.Body = Ar;
|
|
1104
|
+
L.Caption = Pr;
|
|
1105
|
+
L.Cell = Dr;
|
|
1106
|
+
L.Head = Er;
|
|
1107
|
+
L.Header = Rr;
|
|
1108
|
+
L.Row = kr;
|
|
1109
|
+
const we = [
|
|
1110
|
+
{
|
|
1111
|
+
theme: "light",
|
|
1112
|
+
icon: /* @__PURE__ */ o.jsx(De, {}),
|
|
1113
|
+
label: "Light mode"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
theme: "dark",
|
|
1117
|
+
icon: /* @__PURE__ */ o.jsx(Ee, {}),
|
|
1118
|
+
label: "Dark mode"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
theme: "system",
|
|
1122
|
+
icon: /* @__PURE__ */ o.jsx(Jt, {}),
|
|
1123
|
+
label: "System theme"
|
|
1124
|
+
}
|
|
1125
|
+
], Ir = ({ theme: e, setTheme: t, className: r, buttonClassName: n, ...a }) => {
|
|
1126
|
+
const s = () => {
|
|
1127
|
+
t(e === "light" ? "dark" : e === "dark" ? "system" : "light");
|
|
1128
|
+
}, i = we.find((d) => d.theme === e)?.icon, c = we.find((d) => d.theme === e)?.label;
|
|
1129
|
+
return /* @__PURE__ */ o.jsx("span", { className: h(r), ...a, children: /* @__PURE__ */ o.jsxs(kt, { className: h("p-1 w-full", n), onClick: s, variant: "unstyled", children: [
|
|
1130
|
+
i,
|
|
1131
|
+
/* @__PURE__ */ o.jsx(ke, { size: "base", truncate: !0, children: c })
|
|
1132
|
+
] }) });
|
|
1133
|
+
}, Sr = ({
|
|
1134
|
+
variant: e = "horizontal",
|
|
1135
|
+
theme: t,
|
|
1136
|
+
setTheme: r,
|
|
1137
|
+
className: n,
|
|
1138
|
+
buttonClassName: a,
|
|
1139
|
+
...s
|
|
1140
|
+
}) => {
|
|
1141
|
+
const i = (c) => t === c ? "text-primary/75" : "text-primary/25 hover:text-primary";
|
|
1142
|
+
return e === "stacked" ? /* @__PURE__ */ o.jsx(
|
|
1143
|
+
Ir,
|
|
1144
|
+
{
|
|
1145
|
+
buttonClassName: a,
|
|
1146
|
+
className: n,
|
|
1147
|
+
setTheme: r,
|
|
1148
|
+
theme: t,
|
|
1149
|
+
...s
|
|
1150
|
+
}
|
|
1151
|
+
) : /* @__PURE__ */ o.jsxs(Ae, { gap: "4", children: [
|
|
1152
|
+
/* @__PURE__ */ o.jsxs(j, { children: [
|
|
1153
|
+
/* @__PURE__ */ o.jsx(j.Trigger, { children: /* @__PURE__ */ o.jsx(eo, { className: i("system"), onClick: () => r("system"), size: 32 }) }),
|
|
1154
|
+
/* @__PURE__ */ o.jsx(j.Content, { children: "Use system theme" })
|
|
1155
|
+
] }),
|
|
1156
|
+
/* @__PURE__ */ o.jsxs(j, { children: [
|
|
1157
|
+
/* @__PURE__ */ o.jsx(j.Trigger, { children: /* @__PURE__ */ o.jsx(De, { className: i("light"), onClick: () => r("light"), size: 32 }) }),
|
|
1158
|
+
/* @__PURE__ */ o.jsx(j.Content, { children: "Use light theme" })
|
|
1159
|
+
] }),
|
|
1160
|
+
/* @__PURE__ */ o.jsxs(j, { children: [
|
|
1161
|
+
/* @__PURE__ */ o.jsx(j.Trigger, { children: /* @__PURE__ */ o.jsx(Ee, { className: i("dark"), onClick: () => r("dark"), size: 32 }) }),
|
|
1162
|
+
/* @__PURE__ */ o.jsx(j.Content, { children: "Use dark theme" })
|
|
1163
|
+
] })
|
|
1164
|
+
] });
|
|
1165
|
+
};
|
|
1166
|
+
function ye({ delayDuration: e = 0, ...t }) {
|
|
1167
|
+
return /* @__PURE__ */ o.jsx(pr, { "data-slot": "tooltip-provider", delayDuration: e, ...t });
|
|
1168
|
+
}
|
|
1169
|
+
function yt({ ...e }) {
|
|
1170
|
+
return /* @__PURE__ */ o.jsx(ye, { children: /* @__PURE__ */ o.jsx(fr, { "data-slot": "tooltip", ...e }) });
|
|
1171
|
+
}
|
|
1172
|
+
function jt({ ...e }) {
|
|
1173
|
+
return /* @__PURE__ */ o.jsx(hr, { "data-slot": "tooltip-trigger", ...e });
|
|
1174
|
+
}
|
|
1175
|
+
function wt({
|
|
1176
|
+
className: e,
|
|
1177
|
+
sideOffset: t = 0,
|
|
1178
|
+
children: r,
|
|
1179
|
+
...n
|
|
1180
|
+
}) {
|
|
1181
|
+
return /* @__PURE__ */ o.jsx(gr, { children: /* @__PURE__ */ o.jsxs(
|
|
1182
|
+
xr,
|
|
1183
|
+
{
|
|
1184
|
+
className: h(
|
|
1185
|
+
"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",
|
|
1186
|
+
e
|
|
1187
|
+
),
|
|
1188
|
+
"data-slot": "tooltip-content",
|
|
1189
|
+
sideOffset: t,
|
|
1190
|
+
...n,
|
|
1191
|
+
children: [
|
|
1192
|
+
r,
|
|
1193
|
+
/* @__PURE__ */ o.jsx(br, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary" })
|
|
1194
|
+
]
|
|
1195
|
+
}
|
|
1196
|
+
) });
|
|
1197
|
+
}
|
|
1198
|
+
const j = ({ children: e, open: t, onOpenChange: r }) => /* @__PURE__ */ o.jsx(ye, { children: /* @__PURE__ */ o.jsx(yt, { onOpenChange: r, open: t, children: e }) }), Or = ({ children: e, cursor: t = "pointer", className: r }) => /* @__PURE__ */ o.jsx(
|
|
1199
|
+
jt,
|
|
1200
|
+
{
|
|
1201
|
+
asChild: !0,
|
|
1202
|
+
className: h(
|
|
1203
|
+
t === "arrow" && "cursor-default",
|
|
1204
|
+
t === "pointer" && "cursor-pointer",
|
|
1205
|
+
t === "text" && "cursor-text",
|
|
1206
|
+
t === "not-allowed" && "cursor-not-allowed",
|
|
1207
|
+
r
|
|
1208
|
+
),
|
|
1209
|
+
children: e
|
|
1210
|
+
}
|
|
1211
|
+
), Mr = ({ className: e, children: t }) => /* @__PURE__ */ o.jsx(wt, { className: e, children: t });
|
|
1212
|
+
j.Trigger = Or;
|
|
1213
|
+
j.Content = Mr;
|
|
1214
|
+
const wn = ({ children: e, content: t }) => /* @__PURE__ */ o.jsxs(j, { children: [
|
|
1215
|
+
/* @__PURE__ */ o.jsx(j.Trigger, { children: typeof e == "string" ? /* @__PURE__ */ o.jsx("span", { children: e }) : e }),
|
|
1216
|
+
/* @__PURE__ */ o.jsx(j.Content, { children: t })
|
|
1217
|
+
] });
|
|
1218
|
+
function $r({ ...e }) {
|
|
1219
|
+
return /* @__PURE__ */ o.jsx(Fo, { "data-slot": "sheet", ...e });
|
|
1220
|
+
}
|
|
1221
|
+
function Lr({ ...e }) {
|
|
1222
|
+
return /* @__PURE__ */ o.jsx(Ho, { "data-slot": "sheet-portal", ...e });
|
|
1223
|
+
}
|
|
1224
|
+
function zr({ className: e, ...t }) {
|
|
1225
|
+
return /* @__PURE__ */ o.jsx(
|
|
1226
|
+
Bo,
|
|
1227
|
+
{
|
|
1228
|
+
className: h(
|
|
1229
|
+
"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",
|
|
1230
|
+
e
|
|
1231
|
+
),
|
|
1232
|
+
"data-slot": "sheet-overlay",
|
|
1233
|
+
...t
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
function Fr({
|
|
1238
|
+
className: e,
|
|
1239
|
+
children: t,
|
|
1240
|
+
side: r = "right",
|
|
1241
|
+
...n
|
|
1242
|
+
}) {
|
|
1243
|
+
return /* @__PURE__ */ o.jsxs(Lr, { children: [
|
|
1244
|
+
/* @__PURE__ */ o.jsx(zr, {}),
|
|
1245
|
+
/* @__PURE__ */ o.jsxs(
|
|
1246
|
+
Go,
|
|
1247
|
+
{
|
|
1248
|
+
className: h(
|
|
1249
|
+
"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",
|
|
1250
|
+
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",
|
|
1251
|
+
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",
|
|
1252
|
+
r === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
1253
|
+
r === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
1254
|
+
e
|
|
1255
|
+
),
|
|
1256
|
+
"data-slot": "sheet-content",
|
|
1257
|
+
...n,
|
|
1258
|
+
children: [
|
|
1259
|
+
t,
|
|
1260
|
+
/* @__PURE__ */ o.jsxs(qo, { 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: [
|
|
1261
|
+
/* @__PURE__ */ o.jsx(uo, { className: "size-4" }),
|
|
1262
|
+
/* @__PURE__ */ o.jsx("span", { className: "sr-only", children: "Close" })
|
|
1263
|
+
] })
|
|
1264
|
+
]
|
|
1265
|
+
}
|
|
1266
|
+
)
|
|
1267
|
+
] });
|
|
1268
|
+
}
|
|
1269
|
+
function Hr({ className: e, ...t }) {
|
|
1270
|
+
return /* @__PURE__ */ o.jsx("div", { className: h("flex flex-col gap-1.5 p-4", e), "data-slot": "sheet-header", ...t });
|
|
1271
|
+
}
|
|
1272
|
+
function Br({ className: e, ...t }) {
|
|
1273
|
+
return /* @__PURE__ */ o.jsx(
|
|
1274
|
+
Vo,
|
|
1275
|
+
{
|
|
1276
|
+
className: h("font-semibold text-foreground", e),
|
|
1277
|
+
"data-slot": "sheet-title",
|
|
1278
|
+
...t
|
|
1279
|
+
}
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
function Gr({ className: e, ...t }) {
|
|
1283
|
+
return /* @__PURE__ */ o.jsx(
|
|
1284
|
+
Wo,
|
|
1285
|
+
{
|
|
1286
|
+
className: h("text-muted-foreground text-sm", e),
|
|
1287
|
+
"data-slot": "sheet-description",
|
|
1288
|
+
...t
|
|
1289
|
+
}
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1292
|
+
const oe = 768;
|
|
1293
|
+
function Vr() {
|
|
1294
|
+
const [e, t] = l.useState(void 0);
|
|
1295
|
+
return l.useEffect(() => {
|
|
1296
|
+
const r = window.matchMedia(`(max-width: ${oe - 1}px)`), n = () => {
|
|
1297
|
+
t(window.innerWidth < oe);
|
|
1298
|
+
};
|
|
1299
|
+
return r.addEventListener("change", n), t(window.innerWidth < oe), () => r.removeEventListener("change", n);
|
|
1300
|
+
}, []), !!e;
|
|
1301
|
+
}
|
|
1302
|
+
const Wr = "sidebar_state", qr = 60 * 60 * 24 * 7, Kr = "16rem", Ur = "18rem", Yr = "3rem", Xr = "b", Tt = l.createContext(null);
|
|
1303
|
+
function ee() {
|
|
1304
|
+
const e = l.useContext(Tt);
|
|
1305
|
+
if (!e)
|
|
1306
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1307
|
+
return e;
|
|
1308
|
+
}
|
|
1309
|
+
function Zr({
|
|
1310
|
+
defaultOpen: e = !0,
|
|
1311
|
+
open: t,
|
|
1312
|
+
onOpenChange: r,
|
|
1313
|
+
className: n,
|
|
1314
|
+
style: a,
|
|
1315
|
+
children: s,
|
|
1316
|
+
...i
|
|
1317
|
+
}) {
|
|
1318
|
+
const c = Vr(), [d, p] = l.useState(!1), [u, g] = l.useState(e), b = t ?? u, x = l.useCallback(
|
|
1319
|
+
(m) => {
|
|
1320
|
+
const f = typeof m == "function" ? m(b) : m;
|
|
1321
|
+
r ? r(f) : g(f), document.cookie = `${Wr}=${f}; path=/; max-age=${qr}`;
|
|
1322
|
+
},
|
|
1323
|
+
[r, b]
|
|
1324
|
+
), v = l.useCallback(() => c ? p((m) => !m) : x((m) => !m), [c, x]);
|
|
1325
|
+
l.useEffect(() => {
|
|
1326
|
+
const m = (f) => {
|
|
1327
|
+
f.key === Xr && (f.metaKey || f.ctrlKey) && (f.preventDefault(), v());
|
|
1328
|
+
};
|
|
1329
|
+
return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
|
|
1330
|
+
}, [v]);
|
|
1331
|
+
const C = b ? "expanded" : "collapsed", y = l.useMemo(
|
|
1332
|
+
() => ({
|
|
1333
|
+
state: C,
|
|
1334
|
+
open: b,
|
|
1335
|
+
setOpen: x,
|
|
1336
|
+
isMobile: c,
|
|
1337
|
+
openMobile: d,
|
|
1338
|
+
setOpenMobile: p,
|
|
1339
|
+
toggleSidebar: v
|
|
1340
|
+
}),
|
|
1341
|
+
[C, b, x, c, d, v]
|
|
1342
|
+
);
|
|
1343
|
+
return /* @__PURE__ */ o.jsx(Tt.Provider, { value: y, children: /* @__PURE__ */ o.jsx(ye, { delayDuration: 0, children: /* @__PURE__ */ o.jsx(
|
|
1344
|
+
"div",
|
|
1345
|
+
{
|
|
1346
|
+
className: h("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", n),
|
|
1347
|
+
"data-slot": "sidebar-wrapper",
|
|
1348
|
+
style: {
|
|
1349
|
+
"--sidebar-width": Kr,
|
|
1350
|
+
"--sidebar-width-icon": Yr,
|
|
1351
|
+
...a
|
|
1352
|
+
},
|
|
1353
|
+
...i,
|
|
1354
|
+
children: s
|
|
1355
|
+
}
|
|
1356
|
+
) }) });
|
|
1357
|
+
}
|
|
1358
|
+
function Jr({
|
|
1359
|
+
side: e = "left",
|
|
1360
|
+
variant: t = "sidebar",
|
|
1361
|
+
collapsible: r = "offcanvas",
|
|
1362
|
+
className: n,
|
|
1363
|
+
children: a,
|
|
1364
|
+
...s
|
|
1365
|
+
}) {
|
|
1366
|
+
const { isMobile: i, state: c, openMobile: d, setOpenMobile: p } = ee();
|
|
1367
|
+
return r === "none" ? /* @__PURE__ */ o.jsx(
|
|
1368
|
+
"div",
|
|
1369
|
+
{
|
|
1370
|
+
className: h("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", n),
|
|
1371
|
+
"data-slot": "sidebar",
|
|
1372
|
+
...s,
|
|
1373
|
+
children: a
|
|
1374
|
+
}
|
|
1375
|
+
) : i ? /* @__PURE__ */ o.jsx($r, { onOpenChange: p, open: d, ...s, children: /* @__PURE__ */ o.jsxs(
|
|
1376
|
+
Fr,
|
|
1377
|
+
{
|
|
1378
|
+
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
1379
|
+
"data-mobile": "true",
|
|
1380
|
+
"data-sidebar": "sidebar",
|
|
1381
|
+
"data-slot": "sidebar",
|
|
1382
|
+
side: e,
|
|
1383
|
+
style: {
|
|
1384
|
+
"--sidebar-width": Ur
|
|
1385
|
+
},
|
|
1386
|
+
children: [
|
|
1387
|
+
/* @__PURE__ */ o.jsxs(Hr, { className: "sr-only", children: [
|
|
1388
|
+
/* @__PURE__ */ o.jsx(Br, { children: "Sidebar" }),
|
|
1389
|
+
/* @__PURE__ */ o.jsx(Gr, { children: "Displays the mobile sidebar." })
|
|
1390
|
+
] }),
|
|
1391
|
+
/* @__PURE__ */ o.jsx("div", { className: "flex h-full w-full flex-col", children: a })
|
|
1392
|
+
]
|
|
1393
|
+
}
|
|
1394
|
+
) }) : /* @__PURE__ */ o.jsxs(
|
|
1395
|
+
"div",
|
|
1396
|
+
{
|
|
1397
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
1398
|
+
"data-collapsible": c === "collapsed" ? r : "",
|
|
1399
|
+
"data-side": e,
|
|
1400
|
+
"data-slot": "sidebar",
|
|
1401
|
+
"data-state": c,
|
|
1402
|
+
"data-variant": t,
|
|
1403
|
+
children: [
|
|
1404
|
+
/* @__PURE__ */ o.jsx(
|
|
1405
|
+
"div",
|
|
1406
|
+
{
|
|
1407
|
+
className: h(
|
|
1408
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
1409
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
1410
|
+
"group-data-[side=right]:rotate-180",
|
|
1411
|
+
t === "floating" || t === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
1412
|
+
),
|
|
1413
|
+
"data-slot": "sidebar-gap"
|
|
1414
|
+
}
|
|
1415
|
+
),
|
|
1416
|
+
/* @__PURE__ */ o.jsx(
|
|
1417
|
+
"div",
|
|
1418
|
+
{
|
|
1419
|
+
className: h(
|
|
1420
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
1421
|
+
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)]",
|
|
1422
|
+
// Adjust the padding for floating and inset variants.
|
|
1423
|
+
t === "floating" || t === "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",
|
|
1424
|
+
n
|
|
1425
|
+
),
|
|
1426
|
+
"data-slot": "sidebar-container",
|
|
1427
|
+
...s,
|
|
1428
|
+
children: /* @__PURE__ */ o.jsx(
|
|
1429
|
+
"div",
|
|
1430
|
+
{
|
|
1431
|
+
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",
|
|
1432
|
+
"data-sidebar": "sidebar",
|
|
1433
|
+
"data-slot": "sidebar-inner",
|
|
1434
|
+
children: a
|
|
1435
|
+
}
|
|
1436
|
+
)
|
|
1437
|
+
}
|
|
1438
|
+
)
|
|
1439
|
+
]
|
|
1440
|
+
}
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
function Qr({ className: e, onClick: t, children: r, ...n }) {
|
|
1444
|
+
const { toggleSidebar: a, open: s } = ee();
|
|
1445
|
+
return /* @__PURE__ */ o.jsxs(
|
|
1446
|
+
Et,
|
|
1447
|
+
{
|
|
1448
|
+
className: h("size-7", e),
|
|
1449
|
+
"data-sidebar": "trigger",
|
|
1450
|
+
"data-slot": "sidebar-trigger",
|
|
1451
|
+
onClick: (i) => {
|
|
1452
|
+
t?.(i), a();
|
|
1453
|
+
},
|
|
1454
|
+
size: "icon",
|
|
1455
|
+
variant: "ghost",
|
|
1456
|
+
...n,
|
|
1457
|
+
children: [
|
|
1458
|
+
s ? /* @__PURE__ */ o.jsx(ao, {}) : /* @__PURE__ */ o.jsx(ro, {}),
|
|
1459
|
+
/* @__PURE__ */ o.jsx("span", { className: "sr-only", children: "Toggle Sidebar" }),
|
|
1460
|
+
s ? r : null
|
|
1461
|
+
]
|
|
1462
|
+
}
|
|
1463
|
+
);
|
|
1464
|
+
}
|
|
1465
|
+
function en({ className: e, ...t }) {
|
|
1466
|
+
const { toggleSidebar: r } = ee();
|
|
1467
|
+
return /* @__PURE__ */ o.jsx(
|
|
1468
|
+
"button",
|
|
1469
|
+
{
|
|
1470
|
+
"aria-label": "Toggle Sidebar",
|
|
1471
|
+
className: h(
|
|
1472
|
+
"-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",
|
|
1473
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
1474
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
1475
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full",
|
|
1476
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
1477
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
1478
|
+
e
|
|
1479
|
+
),
|
|
1480
|
+
"data-sidebar": "rail",
|
|
1481
|
+
"data-slot": "sidebar-rail",
|
|
1482
|
+
onClick: r,
|
|
1483
|
+
tabIndex: -1,
|
|
1484
|
+
title: "Toggle Sidebar",
|
|
1485
|
+
...t
|
|
1486
|
+
}
|
|
1487
|
+
);
|
|
1488
|
+
}
|
|
1489
|
+
function tn({ className: e, ...t }) {
|
|
1490
|
+
return /* @__PURE__ */ o.jsx(
|
|
1491
|
+
"main",
|
|
1492
|
+
{
|
|
1493
|
+
className: h(
|
|
1494
|
+
"relative flex w-full flex-1 flex-col bg-background",
|
|
1495
|
+
"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",
|
|
1496
|
+
e
|
|
1497
|
+
),
|
|
1498
|
+
"data-slot": "sidebar-inset",
|
|
1499
|
+
...t
|
|
1500
|
+
}
|
|
1501
|
+
);
|
|
1502
|
+
}
|
|
1503
|
+
function on({ className: e, ...t }) {
|
|
1504
|
+
return /* @__PURE__ */ o.jsx(
|
|
1505
|
+
"div",
|
|
1506
|
+
{
|
|
1507
|
+
className: h("flex flex-col gap-2 p-2", e),
|
|
1508
|
+
"data-sidebar": "header",
|
|
1509
|
+
"data-slot": "sidebar-header",
|
|
1510
|
+
...t
|
|
1511
|
+
}
|
|
1512
|
+
);
|
|
1513
|
+
}
|
|
1514
|
+
function rn({ className: e, ...t }) {
|
|
1515
|
+
return /* @__PURE__ */ o.jsx(
|
|
1516
|
+
"div",
|
|
1517
|
+
{
|
|
1518
|
+
className: h("flex flex-col gap-2 p-2", e),
|
|
1519
|
+
"data-sidebar": "footer",
|
|
1520
|
+
"data-slot": "sidebar-footer",
|
|
1521
|
+
...t
|
|
1522
|
+
}
|
|
1523
|
+
);
|
|
1524
|
+
}
|
|
1525
|
+
function _t({ className: e, ...t }) {
|
|
1526
|
+
return /* @__PURE__ */ o.jsx(
|
|
1527
|
+
_r,
|
|
1528
|
+
{
|
|
1529
|
+
className: h("mx-2 w-auto bg-sidebar-border", e),
|
|
1530
|
+
"data-sidebar": "separator",
|
|
1531
|
+
"data-slot": "sidebar-separator",
|
|
1532
|
+
...t
|
|
1533
|
+
}
|
|
1534
|
+
);
|
|
1535
|
+
}
|
|
1536
|
+
function nn({ className: e, ...t }) {
|
|
1537
|
+
return /* @__PURE__ */ o.jsx(
|
|
1538
|
+
"div",
|
|
1539
|
+
{
|
|
1540
|
+
className: h(
|
|
1541
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
1542
|
+
e
|
|
1543
|
+
),
|
|
1544
|
+
"data-sidebar": "content",
|
|
1545
|
+
"data-slot": "sidebar-content",
|
|
1546
|
+
...t
|
|
1547
|
+
}
|
|
1548
|
+
);
|
|
1549
|
+
}
|
|
1550
|
+
function an({ className: e, ...t }) {
|
|
1551
|
+
return /* @__PURE__ */ o.jsx(
|
|
1552
|
+
"div",
|
|
1553
|
+
{
|
|
1554
|
+
className: h("relative flex w-full min-w-0 flex-col p-2", e),
|
|
1555
|
+
"data-sidebar": "group",
|
|
1556
|
+
"data-slot": "sidebar-group",
|
|
1557
|
+
...t
|
|
1558
|
+
}
|
|
1559
|
+
);
|
|
1560
|
+
}
|
|
1561
|
+
function sn({ className: e, ...t }) {
|
|
1562
|
+
return /* @__PURE__ */ o.jsx(
|
|
1563
|
+
"div",
|
|
1564
|
+
{
|
|
1565
|
+
className: h("w-full text-sm", e),
|
|
1566
|
+
"data-sidebar": "group-content",
|
|
1567
|
+
"data-slot": "sidebar-group-content",
|
|
1568
|
+
...t
|
|
1569
|
+
}
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
function se({ className: e, ...t }) {
|
|
1573
|
+
return /* @__PURE__ */ o.jsx(
|
|
1574
|
+
"ul",
|
|
1575
|
+
{
|
|
1576
|
+
className: h("flex w-full min-w-0 flex-col gap-1", e),
|
|
1577
|
+
"data-sidebar": "menu",
|
|
1578
|
+
"data-slot": "sidebar-menu",
|
|
1579
|
+
...t
|
|
1580
|
+
}
|
|
1581
|
+
);
|
|
1582
|
+
}
|
|
1583
|
+
function G({ className: e, ...t }) {
|
|
1584
|
+
return /* @__PURE__ */ o.jsx(
|
|
1585
|
+
"li",
|
|
1586
|
+
{
|
|
1587
|
+
className: h("group/menu-item relative", e),
|
|
1588
|
+
"data-sidebar": "menu-item",
|
|
1589
|
+
"data-slot": "sidebar-menu-item",
|
|
1590
|
+
...t
|
|
1591
|
+
}
|
|
1592
|
+
);
|
|
1593
|
+
}
|
|
1594
|
+
const ln = Pt(
|
|
1595
|
+
"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",
|
|
1596
|
+
{
|
|
1597
|
+
variants: {
|
|
1598
|
+
variant: {
|
|
1599
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
1600
|
+
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))]"
|
|
1601
|
+
},
|
|
1602
|
+
size: {
|
|
1603
|
+
default: "h-8 text-sm",
|
|
1604
|
+
sm: "h-7 text-xs",
|
|
1605
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
1606
|
+
}
|
|
1607
|
+
},
|
|
1608
|
+
defaultVariants: {
|
|
1609
|
+
variant: "default",
|
|
1610
|
+
size: "default"
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
);
|
|
1614
|
+
function V({
|
|
1615
|
+
asChild: e = !1,
|
|
1616
|
+
isActive: t = !1,
|
|
1617
|
+
variant: r = "default",
|
|
1618
|
+
size: n = "default",
|
|
1619
|
+
tooltip: a,
|
|
1620
|
+
className: s,
|
|
1621
|
+
...i
|
|
1622
|
+
}) {
|
|
1623
|
+
const c = e ? Dt : "button", { isMobile: d, state: p } = ee(), u = /* @__PURE__ */ o.jsx(
|
|
1624
|
+
c,
|
|
1625
|
+
{
|
|
1626
|
+
className: h(ln({ variant: r, size: n }), s),
|
|
1627
|
+
"data-active": t,
|
|
1628
|
+
"data-sidebar": "menu-button",
|
|
1629
|
+
"data-size": n,
|
|
1630
|
+
"data-slot": "sidebar-menu-button",
|
|
1631
|
+
...i
|
|
1632
|
+
}
|
|
1633
|
+
);
|
|
1634
|
+
return a ? (typeof a == "string" && (a = {
|
|
1635
|
+
children: a
|
|
1636
|
+
}), /* @__PURE__ */ o.jsxs(yt, { children: [
|
|
1637
|
+
/* @__PURE__ */ o.jsx(jt, { asChild: !0, children: u }),
|
|
1638
|
+
/* @__PURE__ */ o.jsx(wt, { align: "center", hidden: p !== "collapsed" || d, side: "right", ...a })
|
|
1639
|
+
] })) : u;
|
|
1640
|
+
}
|
|
1641
|
+
const Nt = ({ children: e }) => /* @__PURE__ */ o.jsx(ke, { size: "base", truncate: !0, children: e }), cn = ({ itemSet: e, activeSlug: t }) => /* @__PURE__ */ o.jsx(o.Fragment, { children: e.links.map((r) => /* @__PURE__ */ o.jsx(G, { className: "hover:cursor-pointer", onClick: r.onClick, children: /* @__PURE__ */ o.jsx(V, { asChild: !0, isActive: t === r.slug, children: /* @__PURE__ */ o.jsxs("span", { children: [
|
|
1642
|
+
/* @__PURE__ */ o.jsx(r.icon, {}),
|
|
1643
|
+
/* @__PURE__ */ o.jsx(Nt, { children: r.title }),
|
|
1644
|
+
r.external && /* @__PURE__ */ o.jsx(Ae, { children: /* @__PURE__ */ o.jsx(io, { size: 12, strokeWidth: 1.5 }) })
|
|
1645
|
+
] }) }) }, r.slug)) }), Te = ({ itemSets: e, activeSlug: t }) => /* @__PURE__ */ o.jsx(se, { children: e.map((r, n) => /* @__PURE__ */ o.jsxs(It, { children: [
|
|
1646
|
+
/* @__PURE__ */ o.jsx(cn, { activeSlug: t, itemSet: r }),
|
|
1647
|
+
n < e.length - 1 && /* @__PURE__ */ o.jsx(_t, {})
|
|
1648
|
+
] }, `item-set-${n}`)) }), dn = ({
|
|
1649
|
+
brandContent: e,
|
|
1650
|
+
brandOnClick: t,
|
|
1651
|
+
activeSlug: r,
|
|
1652
|
+
itemSets: n,
|
|
1653
|
+
bottomItemSets: a = [],
|
|
1654
|
+
theme: s,
|
|
1655
|
+
setTheme: i,
|
|
1656
|
+
...c
|
|
1657
|
+
}) => /* @__PURE__ */ o.jsxs(Jr, { collapsible: "icon", ...c, children: [
|
|
1658
|
+
/* @__PURE__ */ o.jsx(on, { children: /* @__PURE__ */ o.jsx(se, { children: /* @__PURE__ */ o.jsx(G, { children: /* @__PURE__ */ o.jsx(
|
|
1659
|
+
V,
|
|
1660
|
+
{
|
|
1661
|
+
className: t ? "cursor-pointer" : "cursor-default",
|
|
1662
|
+
onClick: t,
|
|
1663
|
+
size: "lg",
|
|
1664
|
+
children: e
|
|
1665
|
+
}
|
|
1666
|
+
) }) }) }),
|
|
1667
|
+
/* @__PURE__ */ o.jsx(nn, { children: /* @__PURE__ */ o.jsx(an, { children: /* @__PURE__ */ o.jsx(sn, { children: /* @__PURE__ */ o.jsx(Te, { activeSlug: r, itemSets: n }) }) }) }),
|
|
1668
|
+
/* @__PURE__ */ o.jsx(rn, { className: "mb-4", children: /* @__PURE__ */ o.jsxs(se, { children: [
|
|
1669
|
+
/* @__PURE__ */ o.jsx(G, { children: /* @__PURE__ */ o.jsx(V, { asChild: !0, children: /* @__PURE__ */ o.jsx(Qr, { className: "justify-start font-normal", children: /* @__PURE__ */ o.jsx(Nt, { children: "Collapse menu" }) }) }) }),
|
|
1670
|
+
/* @__PURE__ */ o.jsx(G, { children: /* @__PURE__ */ o.jsx(V, { asChild: !0, children: /* @__PURE__ */ o.jsx(Sr, { buttonClassName: "p-0", setTheme: i, theme: s, variant: "stacked" }) }) }),
|
|
1671
|
+
a.length > 0 && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
1672
|
+
/* @__PURE__ */ o.jsx(_t, {}),
|
|
1673
|
+
/* @__PURE__ */ o.jsx(Te, { activeSlug: r, itemSets: a })
|
|
1674
|
+
] })
|
|
1675
|
+
] }) }),
|
|
1676
|
+
/* @__PURE__ */ o.jsx(en, {})
|
|
1677
|
+
] }), Tn = ({ children: e, ...t }) => /* @__PURE__ */ o.jsxs(Zr, { children: [
|
|
1678
|
+
/* @__PURE__ */ o.jsx(dn, { ...t }),
|
|
1679
|
+
/* @__PURE__ */ o.jsx(tn, { className: "max-w-screen-xl", children: e })
|
|
1680
|
+
] });
|
|
1681
|
+
export {
|
|
1682
|
+
Ce as A,
|
|
1683
|
+
Go as C,
|
|
1684
|
+
Wo as D,
|
|
1685
|
+
Nt as M,
|
|
1686
|
+
Bo as O,
|
|
1687
|
+
Ho as P,
|
|
1688
|
+
Fo as R,
|
|
1689
|
+
Qr as S,
|
|
1690
|
+
yn as T,
|
|
1691
|
+
uo as X,
|
|
1692
|
+
dn as a,
|
|
1693
|
+
Tn as b,
|
|
1694
|
+
qo as c,
|
|
1695
|
+
Vo as d,
|
|
1696
|
+
_r as e,
|
|
1697
|
+
vt as f,
|
|
1698
|
+
Ct as g,
|
|
1699
|
+
L as h,
|
|
1700
|
+
Ar as i,
|
|
1701
|
+
Pr as j,
|
|
1702
|
+
Dr as k,
|
|
1703
|
+
Er as l,
|
|
1704
|
+
Rr as m,
|
|
1705
|
+
kr as n,
|
|
1706
|
+
Sr as o,
|
|
1707
|
+
j as p,
|
|
1708
|
+
wn as q
|
|
1709
|
+
};
|