@photon-ai/pho-ui 4.4.0 → 4.5.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/basic-page-D3MY3uY6.js +1797 -0
- package/dist/chunks/basic-page-D3MY3uY6.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/sections/basic-page.js +1 -1
- package/dist/src/sections/basic-page/basic-page.d.ts +15 -2
- package/package.json +1 -1
- package/dist/chunks/basic-page-ijv-ijUB.js +0 -1768
- package/dist/chunks/basic-page-ijv-ijUB.js.map +0 -1
|
@@ -1,1768 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as p } from "./cn-ChIgwEl3.js";
|
|
3
|
-
import { n as We } from "./link-provider-DXzDQ08N.js";
|
|
4
|
-
import { FADE_ENTRANCE as ut, FADE_SWAP as dt, SPRING_ENTRANCE as pt, TRAVEL_LINEAR as mt, fadeThroughBlur as ae } from "../motion.js";
|
|
5
|
-
import { a as Z, o as ve } from "./button-CgUS0j3D.js";
|
|
6
|
-
import { t as ft } from "./error-VvHnteyf.js";
|
|
7
|
-
import { n as ht, t as gt } from "./IconArrowsMinimize-BfPUGuCB.js";
|
|
8
|
-
import { t as ie } from "./IconChevronLeft-CSWMKQ4C.js";
|
|
9
|
-
import { t as bt } from "./IconChevronRight-CzoJnYNI.js";
|
|
10
|
-
import { t as Re } from "./IconSearch-BKAHkLyX.js";
|
|
11
|
-
import { i as ye, n as vt, o as yt, r as xt } from "./data-table-Mog6m3d9.js";
|
|
12
|
-
import { t as wt } from "./IconX-pZ9vrtSr.js";
|
|
13
|
-
import { t as Nt } from "./toast-DUvjSZF7.js";
|
|
14
|
-
import { t as pe } from "./input-group-fc9_jD4d.js";
|
|
15
|
-
import { t as At } from "./animated-height-I44sUq0n.js";
|
|
16
|
-
import { n as xe, t as J } from "./scroll-area-DSwD9th7.js";
|
|
17
|
-
import { i as _t } from "./checkbox-CLPmblNA.js";
|
|
18
|
-
import { t as Et } from "./form-AiHbbw4m.js";
|
|
19
|
-
import { i as K } from "./menu-BQeprfxB.js";
|
|
20
|
-
import { t as Ct } from "./ghost-search-AmVXd0zE.js";
|
|
21
|
-
import { t as q } from "./tooltip-BTF7GChl.js";
|
|
22
|
-
import { Children as ee, Fragment as St, createContext as z, isValidElement as Ve, useCallback as we, useContext as T, useEffect as O, useId as kt, useLayoutEffect as H, useMemo as $, useRef as E, useState as w, useSyncExternalStore as ce } from "react";
|
|
23
|
-
import { Fragment as Ne, jsx as t, jsxs as y } from "react/jsx-runtime";
|
|
24
|
-
import { AnimatePresence as V, motion as A, useIsPresent as Tt, useReducedMotion as M } from "motion/react";
|
|
25
|
-
import { Dialog as ne } from "@base-ui/react/dialog";
|
|
26
|
-
import { createPortal as Pe } from "react-dom";
|
|
27
|
-
var Ae = "rounded-base border border-pho-secondary bg-pho-primary", se = "divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0", $e = `${Ae} ${se} gap-0`, Ie = "flex min-w-0 flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5", Rt = "flex min-h-[4.25rem] min-w-0 flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6", Pt = "flex flex-col gap-3 px-5 py-4", It = "-mx-5 -mb-4 flex items-center rounded-b-[calc(0.75rem-1px)] bg-pho-secondary py-1 pr-3 pl-5", Ot = "-mx-2 -mt-1.5 flex items-center rounded-sm bg-pho-secondary px-2 py-0.5", I = pt, D = ut, j = 12, qe = z(null), Bt = 768;
|
|
28
|
-
function Lt(e, a = "default") {
|
|
29
|
-
return Math.round(a === "wide" ? Math.min(Math.max(e * (2 / 3), 448), 768) : Math.min(Math.max(e * 0.4, 320), 448));
|
|
30
|
-
}
|
|
31
|
-
var je = z(null), Ke = z(null);
|
|
32
|
-
function Mt(e) {
|
|
33
|
-
const [a, n] = w(null), [r, s] = w(!1), [l, u] = w(!1), [c, i] = w(!1), [d, f] = w(() => ({
|
|
34
|
-
width: typeof window > "u" ? 0 : window.innerWidth,
|
|
35
|
-
height: null
|
|
36
|
-
}));
|
|
37
|
-
return H(() => {
|
|
38
|
-
const o = e.current;
|
|
39
|
-
if (!r || o == null) return;
|
|
40
|
-
const m = Ce(o), h = () => {
|
|
41
|
-
const b = o.offsetWidth, N = m?.clientHeight ?? null;
|
|
42
|
-
f((v) => v.width === b && v.height === N ? v : {
|
|
43
|
-
width: b,
|
|
44
|
-
height: N
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
if (h(), typeof ResizeObserver > "u") return;
|
|
48
|
-
const g = new ResizeObserver(h);
|
|
49
|
-
return g.observe(o), m != null && g.observe(m), () => g.disconnect();
|
|
50
|
-
}, [e, r]), {
|
|
51
|
-
host: $(() => ({
|
|
52
|
-
slot: a,
|
|
53
|
-
paneNarrow: d.width < Bt,
|
|
54
|
-
paneWidth: d.width,
|
|
55
|
-
paneHeight: d.height,
|
|
56
|
-
setOpen: u,
|
|
57
|
-
setAsPage: i,
|
|
58
|
-
setPresent: s
|
|
59
|
-
}), [a, d]),
|
|
60
|
-
setSlot: n,
|
|
61
|
-
open: l,
|
|
62
|
-
asPage: c
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function Dt(e) {
|
|
66
|
-
return e == null ? window.scrollY : e.scrollTop;
|
|
67
|
-
}
|
|
68
|
-
function Oe(e, a) {
|
|
69
|
-
e == null ? window.scrollTo({ top: a }) : e.scrollTop = a;
|
|
70
|
-
}
|
|
71
|
-
function Ht({ condense: e = !0, width: a, prerendered: n = !1, className: r, children: s, ref: l, ...u }) {
|
|
72
|
-
const c = T(ue)?.adopt ?? !1, i = T(Ke), [d, f] = w(!1), o = E(0), m = we((B) => {
|
|
73
|
-
o.current += B ? 1 : -1, f(o.current > 0);
|
|
74
|
-
}, []), h = a === "wide" || a == null && d, [g] = w(yt), b = E(null), N = $(() => ({
|
|
75
|
-
ref: b,
|
|
76
|
-
prerendered: n
|
|
77
|
-
}), [n]), [v, _] = w(null), [x, C] = w(null), R = $(() => ({
|
|
78
|
-
setTitle: _,
|
|
79
|
-
setTail: C
|
|
80
|
-
}), []);
|
|
81
|
-
O(() => {
|
|
82
|
-
if (i != null)
|
|
83
|
-
return i.setBack(x), () => i.setBack(null);
|
|
84
|
-
}, [i, x]);
|
|
85
|
-
const { host: P, setSlot: F, open: G, asPage: Y } = Mt(b), W = G && Y, U = E(!1), te = E(0);
|
|
86
|
-
H(() => {
|
|
87
|
-
const B = b.current;
|
|
88
|
-
if (W === U.current || B == null) return;
|
|
89
|
-
U.current = W;
|
|
90
|
-
const L = Ce(B);
|
|
91
|
-
W ? (te.current = Dt(L), Oe(L, 0)) : Oe(L, te.current);
|
|
92
|
-
}, [W]);
|
|
93
|
-
const k = e ? /* @__PURE__ */ t(Ft, {
|
|
94
|
-
title: v,
|
|
95
|
-
tail: i == null ? x : null,
|
|
96
|
-
silent: W || i != null
|
|
97
|
-
}) : null, S = /* @__PURE__ */ t("div", {
|
|
98
|
-
"data-basic-page-column": "",
|
|
99
|
-
className: p("mx-auto flex w-full min-w-0 flex-1 flex-col px-5 pt-12 pb-12 *:min-w-0", i == null && (h ? "max-w-[84rem] md:px-8" : "max-w-[44.5rem]"), c || i != null ? "[&_[data-basic-page-back]]:hidden" : "has-[[data-basic-page-back]]:pt-16"),
|
|
100
|
-
children: e ? /* @__PURE__ */ t(Ee.Provider, {
|
|
101
|
-
value: R,
|
|
102
|
-
children: s
|
|
103
|
-
}) : s
|
|
104
|
-
});
|
|
105
|
-
return /* @__PURE__ */ t("div", {
|
|
106
|
-
"data-basic-page-root": "",
|
|
107
|
-
"data-basic-page-width": h ? "wide" : void 0,
|
|
108
|
-
"data-basic-page-prerendered": n ? "" : void 0,
|
|
109
|
-
className: p("relative flex min-h-full w-full min-w-0 flex-row", r),
|
|
110
|
-
...u,
|
|
111
|
-
ref: (B) => {
|
|
112
|
-
b.current = B, typeof l == "function" ? l(B) : l != null && (l.current = B);
|
|
113
|
-
},
|
|
114
|
-
children: /* @__PURE__ */ t(qe.Provider, {
|
|
115
|
-
value: N,
|
|
116
|
-
children: /* @__PURE__ */ t(je.Provider, {
|
|
117
|
-
value: P,
|
|
118
|
-
children: /* @__PURE__ */ t(xt.Provider, {
|
|
119
|
-
value: m,
|
|
120
|
-
children: /* @__PURE__ */ y(ye.Provider, {
|
|
121
|
-
value: g,
|
|
122
|
-
children: [/* @__PURE__ */ y("div", {
|
|
123
|
-
"data-basic-page-main": "",
|
|
124
|
-
className: p("flex min-w-0 flex-1 flex-col", W && "hidden"),
|
|
125
|
-
children: [k, S]
|
|
126
|
-
}), /* @__PURE__ */ t("div", {
|
|
127
|
-
ref: F,
|
|
128
|
-
className: "contents"
|
|
129
|
-
})]
|
|
130
|
-
})
|
|
131
|
-
})
|
|
132
|
-
})
|
|
133
|
-
})
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
var me = /* @__PURE__ */ new Set();
|
|
137
|
-
function Ft({ title: e, tail: a, silent: n = !1 }) {
|
|
138
|
-
const r = M(), [s, l] = w(() => !n && me.size > 0), u = T(ue), c = kt();
|
|
139
|
-
H(() => {
|
|
140
|
-
if (!(!s || n))
|
|
141
|
-
return me.add(c), () => {
|
|
142
|
-
me.delete(c);
|
|
143
|
-
};
|
|
144
|
-
}, [
|
|
145
|
-
c,
|
|
146
|
-
s,
|
|
147
|
-
n
|
|
148
|
-
]), O(() => {
|
|
149
|
-
if (u != null) {
|
|
150
|
-
if (n) {
|
|
151
|
-
u.store.clear(c);
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
u.store.set(c, {
|
|
155
|
-
condensed: s,
|
|
156
|
-
title: e?.label ?? null,
|
|
157
|
-
back: a
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
}, [
|
|
161
|
-
u,
|
|
162
|
-
c,
|
|
163
|
-
s,
|
|
164
|
-
e,
|
|
165
|
-
a,
|
|
166
|
-
n
|
|
167
|
-
]), O(() => {
|
|
168
|
-
if (u != null)
|
|
169
|
-
return () => u.store.clear(c);
|
|
170
|
-
}, [u, c]);
|
|
171
|
-
const i = e?.el ?? null;
|
|
172
|
-
O(() => {
|
|
173
|
-
if (i == null || typeof IntersectionObserver > "u") {
|
|
174
|
-
if (typeof requestAnimationFrame > "u") return;
|
|
175
|
-
const m = requestAnimationFrame(() => l(!1));
|
|
176
|
-
return () => cancelAnimationFrame(m);
|
|
177
|
-
}
|
|
178
|
-
const o = new IntersectionObserver(([m]) => l(m != null && !m.isIntersecting), { root: Ce(i) });
|
|
179
|
-
return o.observe(i), () => o.disconnect();
|
|
180
|
-
}, [i]);
|
|
181
|
-
const d = r ? 0 : -Ut, f = r ? "blur(0px)" : `blur(${xe}px)`;
|
|
182
|
-
return /* @__PURE__ */ t("div", {
|
|
183
|
-
"data-basic-page-condense": "",
|
|
184
|
-
className: "sticky top-0 z-20 h-0 overflow-visible",
|
|
185
|
-
children: /* @__PURE__ */ t(V, {
|
|
186
|
-
initial: !1,
|
|
187
|
-
children: s && !(u?.adopt ?? !1) && /* @__PURE__ */ y(A.div, {
|
|
188
|
-
initial: { opacity: 0 },
|
|
189
|
-
animate: { opacity: 1 },
|
|
190
|
-
exit: { opacity: 0 },
|
|
191
|
-
transition: le,
|
|
192
|
-
className: "border-pho-secondary bg-pho-page/85 relative grid h-12 grid-cols-[1fr_minmax(0,auto)_1fr] items-center border-b px-3 backdrop-blur",
|
|
193
|
-
children: [/* @__PURE__ */ t("div", {
|
|
194
|
-
className: "flex min-w-0 items-center justify-start",
|
|
195
|
-
children: a != null && /* @__PURE__ */ t(ve, {
|
|
196
|
-
variant: "ghost",
|
|
197
|
-
size: "sm",
|
|
198
|
-
href: a.href,
|
|
199
|
-
onClick: a.onClick,
|
|
200
|
-
prefix: /* @__PURE__ */ t("span", {
|
|
201
|
-
className: "inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0",
|
|
202
|
-
children: /* @__PURE__ */ t(ie, {})
|
|
203
|
-
}),
|
|
204
|
-
className: "min-w-max",
|
|
205
|
-
children: a.label
|
|
206
|
-
})
|
|
207
|
-
}), /* @__PURE__ */ t(A.span, {
|
|
208
|
-
initial: {
|
|
209
|
-
opacity: 0,
|
|
210
|
-
y: d,
|
|
211
|
-
filter: f
|
|
212
|
-
},
|
|
213
|
-
animate: {
|
|
214
|
-
opacity: 1,
|
|
215
|
-
y: 0,
|
|
216
|
-
filter: "blur(0px)"
|
|
217
|
-
},
|
|
218
|
-
exit: {
|
|
219
|
-
opacity: 0,
|
|
220
|
-
y: d,
|
|
221
|
-
filter: f
|
|
222
|
-
},
|
|
223
|
-
transition: {
|
|
224
|
-
...le,
|
|
225
|
-
y: Yt
|
|
226
|
-
},
|
|
227
|
-
className: "text-pho-primary block max-w-full min-w-0 truncate text-center text-base font-medium",
|
|
228
|
-
children: e?.label
|
|
229
|
-
})]
|
|
230
|
-
})
|
|
231
|
-
})
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
function zt(e) {
|
|
235
|
-
return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
236
|
-
}
|
|
237
|
-
function Gt(e) {
|
|
238
|
-
if (!(typeof e != "string" && typeof e != "number"))
|
|
239
|
-
return zt(String(e)) || void 0;
|
|
240
|
-
}
|
|
241
|
-
function _e(e, a) {
|
|
242
|
-
if (e !== "")
|
|
243
|
-
return e ?? Gt(a);
|
|
244
|
-
}
|
|
245
|
-
var Wt = (e) => `basic-page-morph-${e}`, Vt = { layout: I }, Be = 10, Le = {
|
|
246
|
-
delay: 0.2,
|
|
247
|
-
duration: 0.12,
|
|
248
|
-
ease: "easeOut"
|
|
249
|
-
}, $t = {
|
|
250
|
-
duration: 0.18,
|
|
251
|
-
ease: "easeOut"
|
|
252
|
-
}, qt = -8, jt = {
|
|
253
|
-
duration: 0.16,
|
|
254
|
-
ease: "easeOut"
|
|
255
|
-
}, Kt = {
|
|
256
|
-
delay: 0.14,
|
|
257
|
-
duration: 0.16,
|
|
258
|
-
ease: "easeOut"
|
|
259
|
-
}, Xe = {
|
|
260
|
-
duration: 0.12,
|
|
261
|
-
ease: "easeOut"
|
|
262
|
-
}, X = [];
|
|
263
|
-
function Xt(e) {
|
|
264
|
-
const a = E({ labels: e });
|
|
265
|
-
a.current.labels = e, H(() => {
|
|
266
|
-
const n = a.current;
|
|
267
|
-
return X.push(n), () => {
|
|
268
|
-
X.splice(X.indexOf(n), 1);
|
|
269
|
-
};
|
|
270
|
-
}, []);
|
|
271
|
-
}
|
|
272
|
-
function Qe() {
|
|
273
|
-
const [e] = w(() => {
|
|
274
|
-
const a = X[X.length - 1];
|
|
275
|
-
return a ? { labels: [...a.labels] } : null;
|
|
276
|
-
});
|
|
277
|
-
return e;
|
|
278
|
-
}
|
|
279
|
-
var Ee = z(null), ge = {
|
|
280
|
-
condensed: !1,
|
|
281
|
-
title: null,
|
|
282
|
-
back: null
|
|
283
|
-
}, ue = z(null), de = () => () => {
|
|
284
|
-
}, Me = () => ge;
|
|
285
|
-
function Qt({ adopt: e = !0, children: a }) {
|
|
286
|
-
const [n] = w(() => {
|
|
287
|
-
let s = ge, l = null;
|
|
288
|
-
const u = /* @__PURE__ */ new Set(), c = () => {
|
|
289
|
-
for (const i of u) i();
|
|
290
|
-
};
|
|
291
|
-
return {
|
|
292
|
-
get: () => s,
|
|
293
|
-
set(i, d) {
|
|
294
|
-
l = i, s = d, c();
|
|
295
|
-
},
|
|
296
|
-
clear(i) {
|
|
297
|
-
l === i && (l = null, s = ge, c());
|
|
298
|
-
},
|
|
299
|
-
subscribe(i) {
|
|
300
|
-
return u.add(i), () => u.delete(i);
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
|
-
}), r = $(() => ({
|
|
304
|
-
store: n,
|
|
305
|
-
adopt: e
|
|
306
|
-
}), [n, e]);
|
|
307
|
-
return /* @__PURE__ */ t(ue.Provider, {
|
|
308
|
-
value: r,
|
|
309
|
-
children: a
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
function kn() {
|
|
313
|
-
const e = T(ue);
|
|
314
|
-
return ce(e?.store.subscribe ?? de, e?.store.get ?? Me, e?.store.get ?? Me);
|
|
315
|
-
}
|
|
316
|
-
var le = dt, Yt = mt, Ut = -8;
|
|
317
|
-
function Ce(e) {
|
|
318
|
-
if (typeof getComputedStyle != "function") return null;
|
|
319
|
-
for (let a = e.parentElement; a != null && a !== document.body; a = a.parentElement) {
|
|
320
|
-
const { overflowY: n } = getComputedStyle(a);
|
|
321
|
-
if (n === "auto" || n === "scroll") return a;
|
|
322
|
-
}
|
|
323
|
-
return null;
|
|
324
|
-
}
|
|
325
|
-
var fe = /* @__PURE__ */ new Map(), Jt = 96;
|
|
326
|
-
function Zt(e) {
|
|
327
|
-
const a = e.closest("[data-basic-page-root]"), n = a?.querySelector("[data-basic-page-column]");
|
|
328
|
-
return !a || !n ? 0 : n.getBoundingClientRect().left - a.getBoundingClientRect().left;
|
|
329
|
-
}
|
|
330
|
-
function Ye(e) {
|
|
331
|
-
const [a] = w(() => {
|
|
332
|
-
if (e == null) return !1;
|
|
333
|
-
const r = fe.get(e);
|
|
334
|
-
return r != null && r.visible && r.el.isConnected && Zt(r.el) <= Jt;
|
|
335
|
-
}), n = E(null);
|
|
336
|
-
return O(() => {
|
|
337
|
-
if (e == null || typeof IntersectionObserver > "u") return;
|
|
338
|
-
const r = n.current;
|
|
339
|
-
if (!r) return;
|
|
340
|
-
const s = new IntersectionObserver(([l]) => {
|
|
341
|
-
l && fe.set(e, {
|
|
342
|
-
visible: l.isIntersecting,
|
|
343
|
-
el: r
|
|
344
|
-
});
|
|
345
|
-
});
|
|
346
|
-
return s.observe(r), () => {
|
|
347
|
-
s.disconnect(), fe.delete(e);
|
|
348
|
-
};
|
|
349
|
-
}, [e]), {
|
|
350
|
-
fly: a,
|
|
351
|
-
ref: n
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
var ea = {
|
|
355
|
-
fade: {
|
|
356
|
-
initial: { opacity: 0 },
|
|
357
|
-
animate: { opacity: 1 },
|
|
358
|
-
transition: { opacity: D }
|
|
359
|
-
},
|
|
360
|
-
rise: {
|
|
361
|
-
initial: {
|
|
362
|
-
opacity: 0,
|
|
363
|
-
y: j
|
|
364
|
-
},
|
|
365
|
-
animate: {
|
|
366
|
-
opacity: 1,
|
|
367
|
-
y: 0
|
|
368
|
-
},
|
|
369
|
-
transition: {
|
|
370
|
-
y: I,
|
|
371
|
-
opacity: D
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
slide: {
|
|
375
|
-
initial: { x: "-100%" },
|
|
376
|
-
animate: { x: 0 },
|
|
377
|
-
transition: { x: Kt }
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
function Ue({ morphId: e, fromClassName: a, fly: n, morphRef: r, arrival: s, className: l, children: u }) {
|
|
381
|
-
const [c, i] = w(!1), d = !n && s != null ? ea[s] : null;
|
|
382
|
-
return /* @__PURE__ */ y(A.span, {
|
|
383
|
-
ref: r,
|
|
384
|
-
layoutId: Wt(e),
|
|
385
|
-
initial: d?.initial,
|
|
386
|
-
animate: d?.animate,
|
|
387
|
-
transition: n ? Vt : {
|
|
388
|
-
layout: { duration: 0 },
|
|
389
|
-
...d?.transition
|
|
390
|
-
},
|
|
391
|
-
onLayoutAnimationStart: () => {
|
|
392
|
-
n && i(!0);
|
|
393
|
-
},
|
|
394
|
-
onLayoutAnimationComplete: () => i(!1),
|
|
395
|
-
className: p("relative inline-block", l),
|
|
396
|
-
children: [u, c && /* @__PURE__ */ t(A.span, {
|
|
397
|
-
"aria-hidden": !0,
|
|
398
|
-
initial: { opacity: 1 },
|
|
399
|
-
animate: { opacity: 0 },
|
|
400
|
-
transition: $t,
|
|
401
|
-
onAnimationComplete: () => i(!1),
|
|
402
|
-
className: p("absolute inset-0", a),
|
|
403
|
-
children: u
|
|
404
|
-
})]
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
var De = "max-w-full min-w-0 truncate align-top", He = "flex shrink-0 items-center";
|
|
408
|
-
function ta({ id: e, morphId: a, enter: n, trailing: r, className: s, children: l, ...u }) {
|
|
409
|
-
const c = _e(e, l), i = M(), d = ke(n === !0), f = Ye(a), o = Qe(), m = !i && (a != null || d === !0), h = d || o != null ? "rise" : void 0, g = T(Ee), b = E(null);
|
|
410
|
-
H(() => {
|
|
411
|
-
if (g != null)
|
|
412
|
-
return g.setTitle({
|
|
413
|
-
label: l,
|
|
414
|
-
el: b.current
|
|
415
|
-
}), () => g.setTitle(null);
|
|
416
|
-
}, [g, l]);
|
|
417
|
-
const [N, v] = w(f.fly && o != null);
|
|
418
|
-
H(() => {
|
|
419
|
-
X.length > 0 && v(!1);
|
|
420
|
-
}, []);
|
|
421
|
-
const _ = r != null && r !== !1, x = !i && (a != null ? f.fly || h != null : d === !0), C = a != null && !i ? /* @__PURE__ */ t(Ue, {
|
|
422
|
-
morphId: a,
|
|
423
|
-
fromClassName: "text-pho-secondary",
|
|
424
|
-
fly: f.fly,
|
|
425
|
-
morphRef: f.ref,
|
|
426
|
-
arrival: h,
|
|
427
|
-
className: De,
|
|
428
|
-
children: l
|
|
429
|
-
}) : d && !i ? /* @__PURE__ */ t(A.span, {
|
|
430
|
-
initial: {
|
|
431
|
-
opacity: 0,
|
|
432
|
-
y: j
|
|
433
|
-
},
|
|
434
|
-
animate: {
|
|
435
|
-
opacity: 1,
|
|
436
|
-
y: 0
|
|
437
|
-
},
|
|
438
|
-
transition: {
|
|
439
|
-
y: I,
|
|
440
|
-
opacity: D
|
|
441
|
-
},
|
|
442
|
-
className: p("inline-block", De),
|
|
443
|
-
children: l
|
|
444
|
-
}) : _ ? /* @__PURE__ */ t("span", {
|
|
445
|
-
className: "min-w-0 truncate",
|
|
446
|
-
children: l
|
|
447
|
-
}) : l;
|
|
448
|
-
return /* @__PURE__ */ y("h1", {
|
|
449
|
-
id: c,
|
|
450
|
-
"data-basic-page-title": "",
|
|
451
|
-
className: p("text-display-base text-pho-primary max-w-full min-w-0 scroll-mt-12 px-5 font-medium", m ? "whitespace-nowrap" : "truncate", s),
|
|
452
|
-
...u,
|
|
453
|
-
ref: (R) => {
|
|
454
|
-
b.current = R;
|
|
455
|
-
const P = u.ref;
|
|
456
|
-
typeof P == "function" ? P(R) : P != null && (P.current = R);
|
|
457
|
-
},
|
|
458
|
-
children: [_ ? /* @__PURE__ */ y("span", {
|
|
459
|
-
className: "flex max-w-full min-w-0 items-center gap-2",
|
|
460
|
-
children: [C, x ? /* @__PURE__ */ t(A.span, {
|
|
461
|
-
"data-basic-page-title-trailing": "",
|
|
462
|
-
initial: {
|
|
463
|
-
opacity: 0,
|
|
464
|
-
y: j
|
|
465
|
-
},
|
|
466
|
-
animate: {
|
|
467
|
-
opacity: 1,
|
|
468
|
-
y: 0
|
|
469
|
-
},
|
|
470
|
-
transition: {
|
|
471
|
-
y: I,
|
|
472
|
-
opacity: D
|
|
473
|
-
},
|
|
474
|
-
className: He,
|
|
475
|
-
children: r
|
|
476
|
-
}) : /* @__PURE__ */ t("span", {
|
|
477
|
-
"data-basic-page-title-trailing": "",
|
|
478
|
-
className: He,
|
|
479
|
-
children: r
|
|
480
|
-
})]
|
|
481
|
-
}) : C, N && /* @__PURE__ */ t(A.span, {
|
|
482
|
-
"aria-hidden": !0,
|
|
483
|
-
initial: { opacity: 1 },
|
|
484
|
-
animate: { opacity: 0 },
|
|
485
|
-
transition: Xe,
|
|
486
|
-
onAnimationComplete: () => v(!1),
|
|
487
|
-
className: p("text-pho-secondary pointer-events-none absolute inline-flex items-center", Fa),
|
|
488
|
-
children: /* @__PURE__ */ t(ie, {})
|
|
489
|
-
})]
|
|
490
|
-
});
|
|
491
|
-
}
|
|
492
|
-
var Je = z(!1);
|
|
493
|
-
function aa() {
|
|
494
|
-
const e = T(Je), a = M(), [n] = w(() => e && !a);
|
|
495
|
-
return n;
|
|
496
|
-
}
|
|
497
|
-
var na = {
|
|
498
|
-
height: 0,
|
|
499
|
-
opacity: 0,
|
|
500
|
-
paddingTop: 0,
|
|
501
|
-
paddingBottom: 0,
|
|
502
|
-
borderTopWidth: 0
|
|
503
|
-
}, ra = {
|
|
504
|
-
y: I,
|
|
505
|
-
opacity: D,
|
|
506
|
-
height: I,
|
|
507
|
-
paddingTop: I,
|
|
508
|
-
paddingBottom: I,
|
|
509
|
-
borderTopWidth: I
|
|
510
|
-
};
|
|
511
|
-
function Se() {
|
|
512
|
-
const e = aa(), a = Tt(), n = M();
|
|
513
|
-
return {
|
|
514
|
-
initial: e ? {
|
|
515
|
-
opacity: 0,
|
|
516
|
-
y: j
|
|
517
|
-
} : !1,
|
|
518
|
-
animate: {
|
|
519
|
-
opacity: 1,
|
|
520
|
-
y: 0
|
|
521
|
-
},
|
|
522
|
-
exit: na,
|
|
523
|
-
transition: n ? { duration: 0 } : ra,
|
|
524
|
-
leaving: !a
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
var ia = typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
528
|
-
function Ze(e, a, n, r) {
|
|
529
|
-
O(() => {
|
|
530
|
-
if (!ia || e.current == null || typeof getComputedStyle != "function") return;
|
|
531
|
-
const s = (u) => {
|
|
532
|
-
const c = getComputedStyle(u).rowGap;
|
|
533
|
-
return c === "" || c === "normal" ? null : parseFloat(c);
|
|
534
|
-
}, l = s(e.current);
|
|
535
|
-
l != null && l !== n && console.warn(`[BasicPage.${a}] spaced at ${l}px instead of ${n}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, e.current);
|
|
536
|
-
for (const u of Array.from(e.current.children)) {
|
|
537
|
-
const c = r(u);
|
|
538
|
-
if (c == null || getComputedStyle(u).display === "contents") continue;
|
|
539
|
-
const i = s(u);
|
|
540
|
-
i != null && i !== c && console.warn(`[BasicPage.${a}] a child is spaced at ${i}px instead of ${c}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, u);
|
|
541
|
-
}
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
function sa(e) {
|
|
545
|
-
return Array.from(e.querySelectorAll("[data-basic-page-stack], [data-basic-page-title], [data-basic-page-header]")).some((a) => a.closest('[aria-busy="true"]') != null);
|
|
546
|
-
}
|
|
547
|
-
var la = () => !1, oa = () => !0;
|
|
548
|
-
function ca() {
|
|
549
|
-
return ce(de, la, oa);
|
|
550
|
-
}
|
|
551
|
-
function ke(e, a = !1) {
|
|
552
|
-
const n = T(qe), r = ca(), [s] = w(() => {
|
|
553
|
-
if (r || !e || n?.prerendered) return !1;
|
|
554
|
-
if (a) return !0;
|
|
555
|
-
if (document.querySelector("[data-basic-page-prerendered]") != null) return !1;
|
|
556
|
-
const l = n ? n.ref.current : document;
|
|
557
|
-
return l == null || !sa(l);
|
|
558
|
-
});
|
|
559
|
-
return s;
|
|
560
|
-
}
|
|
561
|
-
function re({ enter: e, className: a, children: n, ref: r, ...s }) {
|
|
562
|
-
const l = M(), u = E(null);
|
|
563
|
-
Ze(u, "Stack", 40, (m) => m.hasAttribute("data-basic-page-fields") ? 20 : m.hasAttribute("data-basic-page-card") || m.hasAttribute("data-basic-page-onboard") || m.hasAttribute("data-basic-page-header") || m.hasAttribute("data-basic-page-columns") || m.hasAttribute("data-data-table") ? null : 12);
|
|
564
|
-
const c = ke(e ?? !0, e === !0), i = s["aria-busy"], d = i === !0 || i === "true", f = E(d), o = f.current && !d;
|
|
565
|
-
return O(() => {
|
|
566
|
-
f.current = d;
|
|
567
|
-
}), /* @__PURE__ */ t(A.div, {
|
|
568
|
-
ref: (m) => {
|
|
569
|
-
u.current = m, typeof r == "function" ? r(m) : r != null && (r.current = m);
|
|
570
|
-
},
|
|
571
|
-
"data-basic-page-stack": "",
|
|
572
|
-
initial: l || !c ? !1 : {
|
|
573
|
-
opacity: 0,
|
|
574
|
-
y: j
|
|
575
|
-
},
|
|
576
|
-
animate: {
|
|
577
|
-
opacity: 1,
|
|
578
|
-
y: 0
|
|
579
|
-
},
|
|
580
|
-
transition: {
|
|
581
|
-
y: I,
|
|
582
|
-
opacity: D
|
|
583
|
-
},
|
|
584
|
-
className: p("mt-7 flex min-w-0 flex-col gap-10", "[&:has(>*:first-child:not([data-basic-page-callout])>[data-basic-page-header]:first-child)]:mt-6 [&:has(>*:first-child:not([data-basic-page-callout])>h2:first-child)]:mt-6 [&:has(>[data-basic-page-header]:first-child)]:mt-6 [&:has(>h2:first-child)]:mt-6", "*:min-w-0 [&>*:not([data-basic-page-fields]):not([data-basic-page-card]):not([data-basic-page-callout]):not([data-basic-page-onboard]):not([data-basic-page-header]):not([data-basic-page-columns]):not([data-data-table])]:flex [&>*:not([data-basic-page-fields]):not([data-basic-page-card]):not([data-basic-page-callout]):not([data-basic-page-onboard]):not([data-basic-page-header]):not([data-basic-page-columns]):not([data-data-table])]:flex-col [&>*:not([data-basic-page-fields]):not([data-basic-page-card]):not([data-basic-page-callout]):not([data-basic-page-onboard]):not([data-basic-page-header]):not([data-basic-page-columns]):not([data-data-table])]:gap-3", a),
|
|
585
|
-
...s,
|
|
586
|
-
children: /* @__PURE__ */ t(Je.Provider, {
|
|
587
|
-
value: o,
|
|
588
|
-
children: n
|
|
589
|
-
})
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
var Fe = "@container grid min-w-0 grid-cols-[minmax(0,1fr)_auto_auto] mb-3 gap-y-0 [&>:not([data-basic-page-search]):not([data-basic-page-header-action])]:col-start-1 [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action]))]:row-span-2 [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action]))]:self-center [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):not(:nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])))]:self-end [&>:not([data-basic-page-search]):not([data-basic-page-header-action]):not(:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])))]:self-start [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0";
|
|
593
|
-
function ua({ enter: e, className: a, ...n }) {
|
|
594
|
-
const r = M();
|
|
595
|
-
return ke(e === !0) && !r ? /* @__PURE__ */ t(A.div, {
|
|
596
|
-
initial: {
|
|
597
|
-
opacity: 0,
|
|
598
|
-
y: j
|
|
599
|
-
},
|
|
600
|
-
animate: {
|
|
601
|
-
opacity: 1,
|
|
602
|
-
y: 0
|
|
603
|
-
},
|
|
604
|
-
transition: {
|
|
605
|
-
y: I,
|
|
606
|
-
opacity: D
|
|
607
|
-
},
|
|
608
|
-
className: p(Fe, a),
|
|
609
|
-
...n,
|
|
610
|
-
"data-basic-page-header": ""
|
|
611
|
-
}) : /* @__PURE__ */ t("div", {
|
|
612
|
-
className: p(Fe, a),
|
|
613
|
-
...n,
|
|
614
|
-
"data-basic-page-header": ""
|
|
615
|
-
});
|
|
616
|
-
}
|
|
617
|
-
function da({ className: e, ...a }) {
|
|
618
|
-
return /* @__PURE__ */ t("div", {
|
|
619
|
-
"data-basic-page-header-action": "",
|
|
620
|
-
className: p("flex items-center gap-2", "[[data-basic-page-header]>&]:col-start-3 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:mr-5 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:self-start [[data-basic-page-header]>&]:justify-self-end", "[[data-basic-page-callout]_[data-basic-page-header]>&]:mr-0", e),
|
|
621
|
-
...a
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
function pa({ id: e, className: a, children: n, ...r }) {
|
|
625
|
-
const s = _e(e, n);
|
|
626
|
-
return /* @__PURE__ */ t("h2", {
|
|
627
|
-
id: s,
|
|
628
|
-
className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate px-5 font-medium", "mb-3 [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-header]>&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0", a),
|
|
629
|
-
...r,
|
|
630
|
-
children: n
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
function et({ className: e, ...a }) {
|
|
634
|
-
return /* @__PURE__ */ t("p", {
|
|
635
|
-
className: p("text-display-xs text-pho-description px-5 font-normal", e),
|
|
636
|
-
...a
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
function ma({ one: e, other: a, ...n }) {
|
|
640
|
-
const r = T(ye), s = ce(r?.subscribe ?? de, () => r?.get().api ?? null, () => null);
|
|
641
|
-
if (s == null) return null;
|
|
642
|
-
const l = s.query.trim() !== "" ? `${s.matched} of ${s.total}.` : `${s.total} ${s.total === 1 ? e : a}.`;
|
|
643
|
-
return /* @__PURE__ */ t(et, {
|
|
644
|
-
...n,
|
|
645
|
-
children: l
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
function fa({ className: e, ...a }) {
|
|
649
|
-
return /* @__PURE__ */ t("p", {
|
|
650
|
-
className: p("text-pho-description px-5 text-xs font-normal", "mt-3 [[data-basic-page-callout]_&]:mt-0 [[data-basic-page-stack]>*>&]:mt-0", e),
|
|
651
|
-
...a
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
function ha({ animateHeight: e, className: a, children: n, ...r }) {
|
|
655
|
-
const s = /* @__PURE__ */ t(V, { children: ee.toArray(n) });
|
|
656
|
-
return e ? /* @__PURE__ */ t("div", {
|
|
657
|
-
className: p(Ae, "min-h-0 gap-0", a),
|
|
658
|
-
...r,
|
|
659
|
-
"data-basic-page-card": "",
|
|
660
|
-
children: /* @__PURE__ */ t(At, {
|
|
661
|
-
transition: I,
|
|
662
|
-
className: se,
|
|
663
|
-
children: s
|
|
664
|
-
})
|
|
665
|
-
}) : /* @__PURE__ */ t("div", {
|
|
666
|
-
className: p($e, a),
|
|
667
|
-
...r,
|
|
668
|
-
"data-basic-page-card": "",
|
|
669
|
-
children: s
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
function ga({ className: e, ...a }) {
|
|
673
|
-
const { leaving: n, ...r } = Se();
|
|
674
|
-
return /* @__PURE__ */ t(A.div, {
|
|
675
|
-
...r,
|
|
676
|
-
className: p(Pt, n && "overflow-hidden", e),
|
|
677
|
-
...a
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
function ba({ divided: e = !1, className: a, ...n }) {
|
|
681
|
-
return /* @__PURE__ */ t("div", {
|
|
682
|
-
className: p(e ? Ot : It, a),
|
|
683
|
-
...n
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
function va({ className: e, icon: a, children: n, ...r }) {
|
|
687
|
-
if (a == null || a === !1 || a === !0) return /* @__PURE__ */ t("div", {
|
|
688
|
-
className: p(Ie, e),
|
|
689
|
-
...r,
|
|
690
|
-
"data-basic-page-callout": "",
|
|
691
|
-
children: n
|
|
692
|
-
});
|
|
693
|
-
const [s, ...l] = ee.toArray(n);
|
|
694
|
-
return /* @__PURE__ */ y("div", {
|
|
695
|
-
className: p(Ie, e),
|
|
696
|
-
...r,
|
|
697
|
-
"data-basic-page-callout": "",
|
|
698
|
-
children: [/* @__PURE__ */ y("div", {
|
|
699
|
-
className: "relative",
|
|
700
|
-
children: [/* @__PURE__ */ t("div", {
|
|
701
|
-
className: "min-w-0 pr-16",
|
|
702
|
-
children: s
|
|
703
|
-
}), /* @__PURE__ */ t("div", {
|
|
704
|
-
"aria-hidden": !0,
|
|
705
|
-
className: "text-pho-primary pointer-events-none absolute top-0 right-0 size-14 opacity-[0.275] [&>svg]:size-full",
|
|
706
|
-
children: a
|
|
707
|
-
})]
|
|
708
|
-
}), l]
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
function ya({ id: e, className: a, children: n, ...r }) {
|
|
712
|
-
const s = _e(e, n);
|
|
713
|
-
return /* @__PURE__ */ t("h2", {
|
|
714
|
-
id: s,
|
|
715
|
-
className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate font-medium", a),
|
|
716
|
-
...r,
|
|
717
|
-
children: n
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
function xa({ className: e, ...a }) {
|
|
721
|
-
return /* @__PURE__ */ t("p", {
|
|
722
|
-
className: p("text-display-xs text-pho-description font-normal", e),
|
|
723
|
-
...a
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
|
-
var tt = z(null), at = z(!1);
|
|
727
|
-
function wa({ className: e, children: a, ...n }) {
|
|
728
|
-
let r = !1;
|
|
729
|
-
const s = ee.toArray(a).map((l, u) => {
|
|
730
|
-
if (!Ve(l)) return l;
|
|
731
|
-
let c;
|
|
732
|
-
return l.props.done ? c = "done" : r ? c = "upcoming" : (r = !0, c = l.props.working ? "working" : l.props.pending ? "pending" : "current"), /* @__PURE__ */ t(tt.Provider, {
|
|
733
|
-
value: {
|
|
734
|
-
number: u + 1,
|
|
735
|
-
state: c
|
|
736
|
-
},
|
|
737
|
-
children: l
|
|
738
|
-
}, l.key ?? u);
|
|
739
|
-
});
|
|
740
|
-
return /* @__PURE__ */ t("ol", {
|
|
741
|
-
className: p($e, "m-0 list-none p-0", e),
|
|
742
|
-
...n,
|
|
743
|
-
"data-basic-page-onboard": "",
|
|
744
|
-
children: s
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
var Na = "relative grid size-5 shrink-0 place-items-center rounded-full border text-xs font-medium tabular-nums transition-[background-color,border-color,color] duration-200 ease-out *:[grid-area:1/1]", Aa = {
|
|
748
|
-
done: "border-pho-ink text-pho-primary",
|
|
749
|
-
current: "bg-pho-brand-solid text-pho-on-brand border-transparent",
|
|
750
|
-
working: "border-transparent text-pho-primary",
|
|
751
|
-
pending: "border-pho-ink text-pho-primary border-dashed",
|
|
752
|
-
upcoming: "border-pho-primary text-pho-description"
|
|
753
|
-
}, _a = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink opacity-30", Ea = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink border-r-transparent border-b-transparent border-l-transparent animate-pho-spinner", Ca = {
|
|
754
|
-
done: "Done.",
|
|
755
|
-
working: "In progress.",
|
|
756
|
-
pending: "Waiting."
|
|
757
|
-
};
|
|
758
|
-
function Sa({ icon: e, aside: a, title: n, description: r, done: s, working: l, pending: u, className: c, children: i, ...d }) {
|
|
759
|
-
const f = T(tt), o = f?.state ?? (s ? "done" : l ? "working" : u ? "pending" : "current"), m = M(), h = o === "current" || o === "working" || o === "pending", g = o === "upcoming", b = Ca[o], N = i != null && i !== !1, v = e != null && e !== !1, _ = a != null && a !== !1;
|
|
760
|
-
return /* @__PURE__ */ t("li", {
|
|
761
|
-
"data-basic-page-step": o,
|
|
762
|
-
"aria-current": h ? "step" : void 0,
|
|
763
|
-
className: p("relative m-0 grid min-w-0 grid-cols-[auto_minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)] items-center gap-x-3 px-5 py-4", "transition-[background-color] duration-200 ease-out first:rounded-t-[calc(0.75rem-1px)] last:rounded-b-[calc(0.75rem-1px)] motion-reduce:transition-none", h && "bg-pho-page", c),
|
|
764
|
-
...d,
|
|
765
|
-
children: /* @__PURE__ */ y(at.Provider, {
|
|
766
|
-
value: !0,
|
|
767
|
-
children: [
|
|
768
|
-
/* @__PURE__ */ y("span", {
|
|
769
|
-
"aria-hidden": !0,
|
|
770
|
-
className: p(Na, Aa[o], "col-start-1 row-start-1"),
|
|
771
|
-
children: [/* @__PURE__ */ t(V, {
|
|
772
|
-
initial: !1,
|
|
773
|
-
children: o === "done" ? /* @__PURE__ */ t(A.span, {
|
|
774
|
-
...ae(m),
|
|
775
|
-
className: "flex",
|
|
776
|
-
children: /* @__PURE__ */ t(_t, { className: "size-3" })
|
|
777
|
-
}, "check") : /* @__PURE__ */ t(A.span, {
|
|
778
|
-
...ae(m),
|
|
779
|
-
children: f?.number ?? 1
|
|
780
|
-
}, "number")
|
|
781
|
-
}), o === "working" ? /* @__PURE__ */ y(Ne, { children: [/* @__PURE__ */ t("span", { className: _a }), /* @__PURE__ */ t("span", { className: Ea })] }) : null]
|
|
782
|
-
}),
|
|
783
|
-
/* @__PURE__ */ y("div", {
|
|
784
|
-
"data-basic-page-step-title": "",
|
|
785
|
-
className: p("text-display-xs col-start-2 row-start-1 min-w-0 font-medium transition-colors duration-200 ease-out", g ? "text-pho-description" : "text-pho-primary"),
|
|
786
|
-
children: [b ? /* @__PURE__ */ y("span", {
|
|
787
|
-
className: "sr-only",
|
|
788
|
-
children: [b, " "]
|
|
789
|
-
}) : null, n]
|
|
790
|
-
}),
|
|
791
|
-
/* @__PURE__ */ t(Te, {
|
|
792
|
-
show: h,
|
|
793
|
-
gap: "none",
|
|
794
|
-
clip: !1,
|
|
795
|
-
className: "col-start-2 row-start-2 flex min-w-0 flex-col self-stretch",
|
|
796
|
-
children: /* @__PURE__ */ y("div", {
|
|
797
|
-
"data-basic-page-step-body": "",
|
|
798
|
-
className: "flex min-w-0 flex-1 flex-col",
|
|
799
|
-
children: [r ? /* @__PURE__ */ t("div", {
|
|
800
|
-
className: "text-display-xs text-pho-description font-normal",
|
|
801
|
-
children: r
|
|
802
|
-
}) : null, N ? /* @__PURE__ */ t("div", {
|
|
803
|
-
className: "mt-auto flex flex-wrap items-center gap-2 pt-3",
|
|
804
|
-
children: i
|
|
805
|
-
}) : null]
|
|
806
|
-
})
|
|
807
|
-
}),
|
|
808
|
-
o === "done" && N ? /* @__PURE__ */ t("div", {
|
|
809
|
-
className: "col-start-3 row-start-1 flex min-w-0 items-center gap-2",
|
|
810
|
-
children: i
|
|
811
|
-
}) : _ ? /* @__PURE__ */ t(V, {
|
|
812
|
-
initial: !1,
|
|
813
|
-
children: h ? /* @__PURE__ */ t(A.div, {
|
|
814
|
-
...ae(m),
|
|
815
|
-
className: "col-start-3 row-span-2 row-start-1 self-start",
|
|
816
|
-
children: a
|
|
817
|
-
}, "aside") : null
|
|
818
|
-
}) : v ? /* @__PURE__ */ t(V, {
|
|
819
|
-
initial: !1,
|
|
820
|
-
children: h ? /* @__PURE__ */ t(A.div, {
|
|
821
|
-
"aria-hidden": !0,
|
|
822
|
-
...ae(m),
|
|
823
|
-
className: "pointer-events-none col-start-3 row-span-2 row-start-1 size-14 self-start",
|
|
824
|
-
children: /* @__PURE__ */ t("div", {
|
|
825
|
-
className: "text-pho-primary size-full opacity-[0.275] [&>svg]:size-full",
|
|
826
|
-
children: e
|
|
827
|
-
})
|
|
828
|
-
}, "icon") : null
|
|
829
|
-
}) : null
|
|
830
|
-
]
|
|
831
|
-
})
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
function ka({ label: e, description: a, htmlFor: n, stacked: r = !1, className: s, children: l, ...u }) {
|
|
835
|
-
const { leaving: c, ...i } = Se();
|
|
836
|
-
return /* @__PURE__ */ y(A.div, {
|
|
837
|
-
...i,
|
|
838
|
-
className: p(Rt, r && "sm:flex-col sm:items-stretch sm:justify-start sm:gap-3", c && "overflow-hidden", s),
|
|
839
|
-
...u,
|
|
840
|
-
children: [/* @__PURE__ */ y("div", {
|
|
841
|
-
className: "min-w-0",
|
|
842
|
-
children: [n ? /* @__PURE__ */ t("label", {
|
|
843
|
-
htmlFor: n,
|
|
844
|
-
className: "text-pho-primary block text-base font-normal",
|
|
845
|
-
children: e
|
|
846
|
-
}) : /* @__PURE__ */ t("div", {
|
|
847
|
-
className: "text-pho-primary text-base font-normal",
|
|
848
|
-
children: e
|
|
849
|
-
}), a ? /* @__PURE__ */ t("p", {
|
|
850
|
-
className: "text-pho-description text-xs",
|
|
851
|
-
children: a
|
|
852
|
-
}) : null]
|
|
853
|
-
}), /* @__PURE__ */ t("div", {
|
|
854
|
-
className: p("flex w-full min-w-0 items-center gap-2 sm:w-auto", r && "sm:w-full"),
|
|
855
|
-
children: l
|
|
856
|
-
})]
|
|
857
|
-
});
|
|
858
|
-
}
|
|
859
|
-
function Ta({ className: e, ...a }) {
|
|
860
|
-
const n = T(at);
|
|
861
|
-
return /* @__PURE__ */ t("p", {
|
|
862
|
-
className: p("text-pho-description max-w-full min-w-0 truncate", n ? "text-display-xs font-normal" : "text-base", e),
|
|
863
|
-
...a
|
|
864
|
-
});
|
|
865
|
-
}
|
|
866
|
-
function Ra({ error: e, show: a, className: n, children: r, ...s }) {
|
|
867
|
-
const l = M(), u = T(Q), c = e ?? u?.error ?? void 0;
|
|
868
|
-
return /* @__PURE__ */ t(V, {
|
|
869
|
-
initial: !1,
|
|
870
|
-
children: (a ?? !0) && (c != null || r != null) ? /* @__PURE__ */ t(A.div, {
|
|
871
|
-
"data-basic-page-alert": "",
|
|
872
|
-
className: "overflow-hidden",
|
|
873
|
-
initial: {
|
|
874
|
-
height: 0,
|
|
875
|
-
opacity: 0
|
|
876
|
-
},
|
|
877
|
-
animate: {
|
|
878
|
-
height: "auto",
|
|
879
|
-
opacity: 1
|
|
880
|
-
},
|
|
881
|
-
exit: {
|
|
882
|
-
height: 0,
|
|
883
|
-
opacity: 0
|
|
884
|
-
},
|
|
885
|
-
transition: l ? { duration: 0 } : {
|
|
886
|
-
height: I,
|
|
887
|
-
opacity: D
|
|
888
|
-
},
|
|
889
|
-
children: /* @__PURE__ */ t(ft, {
|
|
890
|
-
error: c,
|
|
891
|
-
className: p("px-5 pb-3", n),
|
|
892
|
-
...s,
|
|
893
|
-
children: r
|
|
894
|
-
})
|
|
895
|
-
}) : null
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
function Tn() {
|
|
899
|
-
return T(Q)?.requestSave ?? null;
|
|
900
|
-
}
|
|
901
|
-
var Rn = 800, he = Nt.createToastManager(), Q = z(null);
|
|
902
|
-
function Pa({ action: e, errors: a, autoSave: n = !1, className: r, children: s, onChange: l, onBlur: u, ...c }) {
|
|
903
|
-
const [i, d] = w(!1), [f, o] = w(!1), [m, h] = w(null), [g, b] = w(a ?? {}), [N, v] = w(null), _ = E(null), x = E(null), C = E(null), R = E(!1), P = E(!1), F = E(null), G = E(async () => {
|
|
904
|
-
});
|
|
905
|
-
O(() => () => {
|
|
906
|
-
x.current != null && clearTimeout(x.current);
|
|
907
|
-
}, []);
|
|
908
|
-
const Y = async () => {
|
|
909
|
-
const k = _.current;
|
|
910
|
-
if (k == null || e == null) return;
|
|
911
|
-
if (R.current) {
|
|
912
|
-
P.current = !0;
|
|
913
|
-
return;
|
|
914
|
-
}
|
|
915
|
-
if (!k.checkValidity()) return;
|
|
916
|
-
const S = Object.fromEntries(new FormData(k).entries()), B = C.current;
|
|
917
|
-
R.current = !0, v({
|
|
918
|
-
field: B,
|
|
919
|
-
phase: "saving"
|
|
920
|
-
}), h(null);
|
|
921
|
-
try {
|
|
922
|
-
const L = (await e(S))?.errors;
|
|
923
|
-
if (L != null && Object.keys(L).length > 0) {
|
|
924
|
-
b(L), v(null);
|
|
925
|
-
return;
|
|
926
|
-
}
|
|
927
|
-
b({}), o(!1), v({
|
|
928
|
-
field: B,
|
|
929
|
-
phase: "saved"
|
|
930
|
-
}), F.current != null && (he.close(F.current), F.current = null);
|
|
931
|
-
} catch (L) {
|
|
932
|
-
v(null), h(L), F.current != null && he.close(F.current), F.current = he.add({
|
|
933
|
-
type: "error",
|
|
934
|
-
title: "Couldn't save",
|
|
935
|
-
description: L instanceof Error && L.message !== "" ? L.message : "The change is still here — try again.",
|
|
936
|
-
timeout: 0,
|
|
937
|
-
actionProps: {
|
|
938
|
-
children: "Retry",
|
|
939
|
-
onClick: () => {
|
|
940
|
-
G.current();
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
});
|
|
944
|
-
} finally {
|
|
945
|
-
R.current = !1, P.current && (P.current = !1, G.current());
|
|
946
|
-
}
|
|
947
|
-
};
|
|
948
|
-
G.current = Y;
|
|
949
|
-
const W = () => {
|
|
950
|
-
x.current != null && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
951
|
-
x.current = null, G.current();
|
|
952
|
-
}, 800);
|
|
953
|
-
}, U = $(() => n ? (k) => {
|
|
954
|
-
k != null && (C.current = k), o(!0), W();
|
|
955
|
-
} : null, [n]), te = $(() => ({
|
|
956
|
-
pending: i,
|
|
957
|
-
dirty: f,
|
|
958
|
-
error: m,
|
|
959
|
-
auto: N,
|
|
960
|
-
requestSave: U
|
|
961
|
-
}), [
|
|
962
|
-
i,
|
|
963
|
-
f,
|
|
964
|
-
m,
|
|
965
|
-
N,
|
|
966
|
-
U
|
|
967
|
-
]);
|
|
968
|
-
return /* @__PURE__ */ t(Q.Provider, {
|
|
969
|
-
value: te,
|
|
970
|
-
children: /* @__PURE__ */ t(Et, {
|
|
971
|
-
errors: g,
|
|
972
|
-
onFormSubmit: async (k) => {
|
|
973
|
-
if (e != null) {
|
|
974
|
-
d(!0), h(null);
|
|
975
|
-
try {
|
|
976
|
-
const S = (await e(k))?.errors;
|
|
977
|
-
if (S != null && Object.keys(S).length > 0) {
|
|
978
|
-
b(S);
|
|
979
|
-
return;
|
|
980
|
-
}
|
|
981
|
-
b({}), o(!1);
|
|
982
|
-
} catch (S) {
|
|
983
|
-
h(S);
|
|
984
|
-
} finally {
|
|
985
|
-
d(!1);
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
},
|
|
989
|
-
onChange: (k) => {
|
|
990
|
-
o(!0), h(null);
|
|
991
|
-
const S = k.target.name;
|
|
992
|
-
S && S in g && b((B) => {
|
|
993
|
-
const { [S]: L, ...ct } = B;
|
|
994
|
-
return ct;
|
|
995
|
-
}), n && (S && (C.current = S), W()), l?.(k);
|
|
996
|
-
},
|
|
997
|
-
onBlur: (k) => {
|
|
998
|
-
n && f && x.current != null && (clearTimeout(x.current), x.current = null, G.current()), u?.(k);
|
|
999
|
-
},
|
|
1000
|
-
className: p("contents [[data-basic-page-stack]>&]:flex [[data-basic-page-stack]>&]:min-w-0 [[data-basic-page-stack]>&]:flex-col", r),
|
|
1001
|
-
...c,
|
|
1002
|
-
ref: (k) => {
|
|
1003
|
-
_.current = k;
|
|
1004
|
-
const S = c.ref;
|
|
1005
|
-
typeof S == "function" ? S(k) : S != null && (S.current = k);
|
|
1006
|
-
},
|
|
1007
|
-
children: /* @__PURE__ */ t("fieldset", {
|
|
1008
|
-
disabled: i,
|
|
1009
|
-
"aria-busy": i || void 0,
|
|
1010
|
-
className: "contents",
|
|
1011
|
-
children: s
|
|
1012
|
-
})
|
|
1013
|
-
})
|
|
1014
|
-
});
|
|
1015
|
-
}
|
|
1016
|
-
function Ia({ name: e, className: a, ...n }) {
|
|
1017
|
-
const r = T(Q), s = M(), l = r?.auto ?? null, u = l != null && (e == null || l.field === e), [c, i] = w(!1), d = u ? l.phase : null;
|
|
1018
|
-
O(() => {
|
|
1019
|
-
if (d !== "saved") return;
|
|
1020
|
-
i(!0);
|
|
1021
|
-
const m = setTimeout(() => i(!1), 1800);
|
|
1022
|
-
return () => clearTimeout(m);
|
|
1023
|
-
}, [d, l]);
|
|
1024
|
-
const f = d === "saving" ? "Saving…" : d === "saved" && c ? "Saved" : null, o = s ? "blur(0px)" : `blur(${xe}px)`;
|
|
1025
|
-
return /* @__PURE__ */ t("span", {
|
|
1026
|
-
className: "grid justify-items-end",
|
|
1027
|
-
children: /* @__PURE__ */ t(V, {
|
|
1028
|
-
initial: !1,
|
|
1029
|
-
children: f != null && /* @__PURE__ */ t(A.output, {
|
|
1030
|
-
initial: {
|
|
1031
|
-
opacity: 0,
|
|
1032
|
-
filter: o
|
|
1033
|
-
},
|
|
1034
|
-
animate: {
|
|
1035
|
-
opacity: 1,
|
|
1036
|
-
filter: "blur(0px)"
|
|
1037
|
-
},
|
|
1038
|
-
exit: {
|
|
1039
|
-
opacity: 0,
|
|
1040
|
-
filter: o
|
|
1041
|
-
},
|
|
1042
|
-
transition: le,
|
|
1043
|
-
className: p("text-pho-description pl-8 [grid-area:1/1]", a),
|
|
1044
|
-
style: { background: "linear-gradient(to left, var(--background-color-pho-primary) calc(100% - 2rem), transparent)" },
|
|
1045
|
-
...n,
|
|
1046
|
-
children: f
|
|
1047
|
-
}, f)
|
|
1048
|
-
})
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
|
-
var Oa = "flex min-w-0 flex-col gap-5 p-5 [&>[data-basic-page-alert]]:-mx-5 [&>[data-basic-page-alert]]:-mt-2 [&>[data-basic-page-alert]]:-mb-5 [&>[data-basic-page-footer]]:pr-0 [&>[data-basic-page-reveal]]:flex [&>[data-basic-page-reveal]]:flex-col [&>[data-basic-page-reveal]]:gap-5";
|
|
1052
|
-
function Ba({ className: e, ...a }) {
|
|
1053
|
-
const n = E(null);
|
|
1054
|
-
return Ze(n, "Fields", 20, () => null), /* @__PURE__ */ t("div", {
|
|
1055
|
-
className: p(Ae, Oa, e),
|
|
1056
|
-
...a,
|
|
1057
|
-
ref: (r) => {
|
|
1058
|
-
n.current = r;
|
|
1059
|
-
const s = a.ref;
|
|
1060
|
-
typeof s == "function" ? s(r) : s != null && (s.current = r);
|
|
1061
|
-
},
|
|
1062
|
-
"data-basic-page-fields": ""
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
function La({ className: e, ...a }) {
|
|
1066
|
-
return /* @__PURE__ */ t("div", {
|
|
1067
|
-
className: p("flex min-w-0 flex-col gap-5 *:min-w-0 sm:flex-row sm:gap-3 sm:*:flex-1", e),
|
|
1068
|
-
...a
|
|
1069
|
-
});
|
|
1070
|
-
}
|
|
1071
|
-
function Ma({ children: e = "Save changes", ...a }) {
|
|
1072
|
-
const n = T(Q);
|
|
1073
|
-
return /* @__PURE__ */ t(Z, {
|
|
1074
|
-
type: "submit",
|
|
1075
|
-
variant: "effect",
|
|
1076
|
-
size: "sm",
|
|
1077
|
-
loading: n?.pending,
|
|
1078
|
-
...a,
|
|
1079
|
-
children: e
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1082
|
-
function Da({ show: e, className: a, ...n }) {
|
|
1083
|
-
const r = T(Q), s = e === "dirty" ? r?.dirty ?? !1 : e, l = /* @__PURE__ */ t("div", {
|
|
1084
|
-
"data-basic-page-footer": "",
|
|
1085
|
-
className: p("flex items-center justify-end gap-3 pr-[calc(1.25rem+2.5px)]", a),
|
|
1086
|
-
...n
|
|
1087
|
-
});
|
|
1088
|
-
return s === void 0 ? l : /* @__PURE__ */ t(Te, {
|
|
1089
|
-
show: s,
|
|
1090
|
-
gap: "block",
|
|
1091
|
-
clip: !1,
|
|
1092
|
-
children: l
|
|
1093
|
-
});
|
|
1094
|
-
}
|
|
1095
|
-
var Ha = {
|
|
1096
|
-
stack: "-2.5rem",
|
|
1097
|
-
block: "-0.75rem",
|
|
1098
|
-
fields: "-1.25rem",
|
|
1099
|
-
none: "0px"
|
|
1100
|
-
};
|
|
1101
|
-
function Te({ show: e, clip: a = !0, gap: n = "stack", dividers: r, className: s, ...l }) {
|
|
1102
|
-
const u = M(), c = Ha[r ? "none" : n], i = E(null), d = E(e !== !0);
|
|
1103
|
-
O(() => {
|
|
1104
|
-
d.current = !0;
|
|
1105
|
-
}, []);
|
|
1106
|
-
const f = () => {
|
|
1107
|
-
a && i.current && (i.current.style.overflow = "hidden");
|
|
1108
|
-
}, o = () => {
|
|
1109
|
-
i.current && (i.current.style.overflow = "");
|
|
1110
|
-
};
|
|
1111
|
-
return e === void 0 ? /* @__PURE__ */ t(A.div, {
|
|
1112
|
-
initial: u ? !1 : {
|
|
1113
|
-
opacity: 0,
|
|
1114
|
-
y: j
|
|
1115
|
-
},
|
|
1116
|
-
animate: {
|
|
1117
|
-
opacity: 1,
|
|
1118
|
-
y: 0
|
|
1119
|
-
},
|
|
1120
|
-
transition: {
|
|
1121
|
-
y: I,
|
|
1122
|
-
opacity: D
|
|
1123
|
-
},
|
|
1124
|
-
className: p(r && se, s),
|
|
1125
|
-
...l
|
|
1126
|
-
}) : /* @__PURE__ */ t(V, {
|
|
1127
|
-
initial: !1,
|
|
1128
|
-
children: e ? /* @__PURE__ */ t(A.div, {
|
|
1129
|
-
"data-basic-page-reveal": "",
|
|
1130
|
-
ref: (m) => {
|
|
1131
|
-
i.current = m, a && m && d.current && (m.style.overflow = "hidden");
|
|
1132
|
-
},
|
|
1133
|
-
onAnimationStart: f,
|
|
1134
|
-
onAnimationComplete: o,
|
|
1135
|
-
initial: {
|
|
1136
|
-
height: 0,
|
|
1137
|
-
opacity: 0,
|
|
1138
|
-
marginTop: c
|
|
1139
|
-
},
|
|
1140
|
-
animate: {
|
|
1141
|
-
height: "auto",
|
|
1142
|
-
opacity: 1,
|
|
1143
|
-
marginTop: 0
|
|
1144
|
-
},
|
|
1145
|
-
exit: {
|
|
1146
|
-
height: 0,
|
|
1147
|
-
opacity: 0,
|
|
1148
|
-
marginTop: c
|
|
1149
|
-
},
|
|
1150
|
-
transition: u ? { duration: 0 } : {
|
|
1151
|
-
height: I,
|
|
1152
|
-
marginTop: I,
|
|
1153
|
-
opacity: D
|
|
1154
|
-
},
|
|
1155
|
-
className: p(r && se, s),
|
|
1156
|
-
...l
|
|
1157
|
-
}) : null
|
|
1158
|
-
});
|
|
1159
|
-
}
|
|
1160
|
-
var Fa = "top-4 left-5 h-8 text-base [&>svg]:size-[1.125em] [&>svg]:shrink-0", za = "(min-width: 40rem)";
|
|
1161
|
-
function Ga() {
|
|
1162
|
-
return typeof window < "u" && typeof window.matchMedia == "function" && !window.matchMedia(za).matches;
|
|
1163
|
-
}
|
|
1164
|
-
var nt = z(null);
|
|
1165
|
-
function rt({ className: e, children: a, ...n }) {
|
|
1166
|
-
const r = ee.toArray(a).filter(Ve), s = r.map((_) => _.props.children ?? null), l = Qe();
|
|
1167
|
-
Xt(s);
|
|
1168
|
-
const [u] = w(Ga), c = M(), i = r.length, d = We(), f = !u && i >= Wa, o = T(Ee), m = i > 0 ? r[i - 1]?.props : null, h = m?.children ?? "Back", g = m?.href, b = m?.onClick;
|
|
1169
|
-
H(() => {
|
|
1170
|
-
if (!(o == null || g == null))
|
|
1171
|
-
return o.setTail({
|
|
1172
|
-
label: h,
|
|
1173
|
-
href: g,
|
|
1174
|
-
onClick: b
|
|
1175
|
-
}), () => o.setTail(null);
|
|
1176
|
-
}, [
|
|
1177
|
-
o,
|
|
1178
|
-
h,
|
|
1179
|
-
g,
|
|
1180
|
-
b
|
|
1181
|
-
]);
|
|
1182
|
-
const [N, v] = w(!c && !u && l != null && l.labels.length > i);
|
|
1183
|
-
return /* @__PURE__ */ t("nav", {
|
|
1184
|
-
"aria-label": "Breadcrumb",
|
|
1185
|
-
"data-basic-page-back": "",
|
|
1186
|
-
className: p("absolute top-4 left-3 flex min-w-max items-center", e),
|
|
1187
|
-
...n,
|
|
1188
|
-
children: /* @__PURE__ */ y("ol", {
|
|
1189
|
-
className: "m-0 flex list-none items-center p-0",
|
|
1190
|
-
children: [r.map((_, x) => f && x > 0 && x < i - 2 ? null : /* @__PURE__ */ y(St, { children: [f && x === i - 2 && /* @__PURE__ */ y("li", {
|
|
1191
|
-
className: "m-0 flex items-center max-sm:hidden",
|
|
1192
|
-
children: [/* @__PURE__ */ t("span", {
|
|
1193
|
-
"aria-hidden": !0,
|
|
1194
|
-
className: be,
|
|
1195
|
-
children: oe
|
|
1196
|
-
}), /* @__PURE__ */ y(K.Root, { children: [/* @__PURE__ */ t(K.Trigger, { render: /* @__PURE__ */ t(Z, {
|
|
1197
|
-
variant: "ghost",
|
|
1198
|
-
size: "sm",
|
|
1199
|
-
"aria-label": "Hidden pages",
|
|
1200
|
-
className: "px-2",
|
|
1201
|
-
children: Va
|
|
1202
|
-
}) }), /* @__PURE__ */ t(K.Portal, { children: /* @__PURE__ */ t(K.Positioner, {
|
|
1203
|
-
align: "start",
|
|
1204
|
-
sideOffset: 4,
|
|
1205
|
-
children: /* @__PURE__ */ t(K.Popup, { children: r.slice(1, i - 2).map((C, R) => {
|
|
1206
|
-
const P = C.props;
|
|
1207
|
-
return /* @__PURE__ */ t(K.LinkItem, {
|
|
1208
|
-
render: /* @__PURE__ */ t(d, {
|
|
1209
|
-
href: P.href,
|
|
1210
|
-
onClick: P.onClick
|
|
1211
|
-
}),
|
|
1212
|
-
children: P.children ?? "Back"
|
|
1213
|
-
}, C.key ?? R);
|
|
1214
|
-
}) })
|
|
1215
|
-
}) })] })]
|
|
1216
|
-
}), /* @__PURE__ */ t("li", {
|
|
1217
|
-
className: p("m-0 flex items-center", x < i - 1 && "max-sm:hidden"),
|
|
1218
|
-
children: /* @__PURE__ */ t(nt.Provider, {
|
|
1219
|
-
value: {
|
|
1220
|
-
index: x,
|
|
1221
|
-
count: i,
|
|
1222
|
-
departing: l,
|
|
1223
|
-
narrow: u
|
|
1224
|
-
},
|
|
1225
|
-
children: _
|
|
1226
|
-
})
|
|
1227
|
-
})] }, _.key ?? x)), N && /* @__PURE__ */ t("li", {
|
|
1228
|
-
"aria-hidden": !0,
|
|
1229
|
-
className: "m-0 flex items-center max-sm:hidden",
|
|
1230
|
-
children: /* @__PURE__ */ t(A.span, {
|
|
1231
|
-
initial: { opacity: 1 },
|
|
1232
|
-
animate: { opacity: 0 },
|
|
1233
|
-
transition: Xe,
|
|
1234
|
-
onAnimationComplete: () => v(!1),
|
|
1235
|
-
className: be,
|
|
1236
|
-
children: oe
|
|
1237
|
-
})
|
|
1238
|
-
})]
|
|
1239
|
-
})
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
var be = "text-pho-description -mx-1 inline-flex shrink-0 text-base select-none", oe = "/", Wa = 4, Va = "…";
|
|
1243
|
-
function it({ href: e, className: a, morphId: n, children: r = "Back", ...s }) {
|
|
1244
|
-
const l = T(nt), u = M(), c = n != null && !u, i = Ye(c ? n : void 0);
|
|
1245
|
-
if (l == null) throw new Error("BasicPage.Crumb must be rendered inside BasicPage.Breadcrumbs");
|
|
1246
|
-
const { index: d, count: f, departing: o, narrow: m } = l, h = d === 0, g = d === f - 1, b = o != null && o.labels.length < f, N = o != null && o.labels.length > f, v = g && (o == null || b || m), _ = h || g, x = h && g ? "" : h ? "max-sm:hidden" : "sm:hidden", C = o != null, R = g ? m ? N ? "slide" : "fade" : v ? "fade" : void 0 : void 0, [P, F] = w(c && m && i.fly && o != null && !N ? o.labels[o.labels.length - 1] : null), G = c && _ && !C, Y = c && !h && g && (o == null || b);
|
|
1247
|
-
return /* @__PURE__ */ y(Ne, { children: [!h && /* @__PURE__ */ t("span", {
|
|
1248
|
-
"aria-hidden": !0,
|
|
1249
|
-
className: p(be, "max-sm:hidden"),
|
|
1250
|
-
children: Y ? /* @__PURE__ */ t(A.span, {
|
|
1251
|
-
initial: i.fly ? {
|
|
1252
|
-
opacity: 0,
|
|
1253
|
-
x: Be
|
|
1254
|
-
} : { opacity: 0 },
|
|
1255
|
-
animate: i.fly ? {
|
|
1256
|
-
opacity: 1,
|
|
1257
|
-
x: 0
|
|
1258
|
-
} : { opacity: 1 },
|
|
1259
|
-
transition: i.fly ? Le : D,
|
|
1260
|
-
className: "inline-flex",
|
|
1261
|
-
children: oe
|
|
1262
|
-
}) : oe
|
|
1263
|
-
}), /* @__PURE__ */ t(ve, {
|
|
1264
|
-
variant: "ghost",
|
|
1265
|
-
size: "sm",
|
|
1266
|
-
href: e,
|
|
1267
|
-
prefix: _ ? G ? /* @__PURE__ */ t(A.span, {
|
|
1268
|
-
initial: i.fly ? {
|
|
1269
|
-
opacity: 0,
|
|
1270
|
-
x: Be
|
|
1271
|
-
} : { opacity: 0 },
|
|
1272
|
-
animate: i.fly ? {
|
|
1273
|
-
opacity: 1,
|
|
1274
|
-
x: 0
|
|
1275
|
-
} : { opacity: 1 },
|
|
1276
|
-
transition: i.fly ? Le : D,
|
|
1277
|
-
className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", x),
|
|
1278
|
-
children: /* @__PURE__ */ t(ie, {})
|
|
1279
|
-
}) : /* @__PURE__ */ t("span", {
|
|
1280
|
-
className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", x),
|
|
1281
|
-
children: /* @__PURE__ */ t(ie, {})
|
|
1282
|
-
}) : /* @__PURE__ */ t("span", { className: "hidden" }),
|
|
1283
|
-
className: p("min-w-max", a),
|
|
1284
|
-
...s,
|
|
1285
|
-
children: c && n != null ? /* @__PURE__ */ y("span", {
|
|
1286
|
-
className: p("relative block", !i.fly && R === "slide" && "overflow-hidden", !g && "max-w-40 truncate"),
|
|
1287
|
-
children: [/* @__PURE__ */ t(Ue, {
|
|
1288
|
-
morphId: n,
|
|
1289
|
-
fromClassName: "text-pho-primary",
|
|
1290
|
-
fly: i.fly,
|
|
1291
|
-
morphRef: i.ref,
|
|
1292
|
-
arrival: R,
|
|
1293
|
-
children: r
|
|
1294
|
-
}), P != null && /* @__PURE__ */ t(A.span, {
|
|
1295
|
-
"aria-hidden": !0,
|
|
1296
|
-
initial: {
|
|
1297
|
-
x: 0,
|
|
1298
|
-
opacity: 1
|
|
1299
|
-
},
|
|
1300
|
-
animate: {
|
|
1301
|
-
x: qt,
|
|
1302
|
-
opacity: 0
|
|
1303
|
-
},
|
|
1304
|
-
transition: jt,
|
|
1305
|
-
onAnimationComplete: () => F(null),
|
|
1306
|
-
className: "pointer-events-none absolute inset-y-0 left-0 whitespace-nowrap",
|
|
1307
|
-
children: P
|
|
1308
|
-
})]
|
|
1309
|
-
}) : /* @__PURE__ */ t("span", {
|
|
1310
|
-
className: p("block", !g && "max-w-40 truncate"),
|
|
1311
|
-
children: r
|
|
1312
|
-
})
|
|
1313
|
-
})] });
|
|
1314
|
-
}
|
|
1315
|
-
function $a({ className: e, ...a }) {
|
|
1316
|
-
return /* @__PURE__ */ t(rt, {
|
|
1317
|
-
className: e,
|
|
1318
|
-
children: /* @__PURE__ */ t(it, { ...a })
|
|
1319
|
-
});
|
|
1320
|
-
}
|
|
1321
|
-
function qa({ label: e, description: a, leading: n, href: r, className: s, children: l, ...u }) {
|
|
1322
|
-
const c = We(), i = $(() => A.create(c), [c]), { leaving: d, ...f } = Se();
|
|
1323
|
-
return /* @__PURE__ */ y(i, {
|
|
1324
|
-
href: r,
|
|
1325
|
-
...f,
|
|
1326
|
-
...u,
|
|
1327
|
-
className: p("flex min-h-[4.25rem] min-w-0 flex-row items-center justify-between gap-6 px-5 py-4", "group outline-pho-brand hover:bg-pho-primary-hover cursor-pointer transition-colors focus-visible:outline-2 focus-visible:-outline-offset-2", "aria-[current=page]:bg-pho-primary-hover", "first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]", d && "overflow-hidden", s),
|
|
1328
|
-
children: [/* @__PURE__ */ y("div", {
|
|
1329
|
-
className: p("flex min-w-0 flex-1 items-center", n != null && "gap-3"),
|
|
1330
|
-
children: [n, /* @__PURE__ */ y("div", {
|
|
1331
|
-
className: "min-w-0",
|
|
1332
|
-
children: [/* @__PURE__ */ t("div", {
|
|
1333
|
-
className: "flex min-w-0 items-center gap-1",
|
|
1334
|
-
children: typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ t("p", {
|
|
1335
|
-
className: "text-pho-primary truncate text-base font-medium",
|
|
1336
|
-
children: e
|
|
1337
|
-
}) : e
|
|
1338
|
-
}), a ? /* @__PURE__ */ t("div", {
|
|
1339
|
-
className: "text-pho-description truncate text-xs",
|
|
1340
|
-
children: a
|
|
1341
|
-
}) : null]
|
|
1342
|
-
})]
|
|
1343
|
-
}), /* @__PURE__ */ y("div", {
|
|
1344
|
-
className: "flex min-w-0 items-center justify-end gap-2",
|
|
1345
|
-
children: [l != null ? /* @__PURE__ */ t("div", {
|
|
1346
|
-
className: "min-w-0",
|
|
1347
|
-
children: l
|
|
1348
|
-
}) : null, /* @__PURE__ */ t(bt, {
|
|
1349
|
-
"aria-hidden": !0,
|
|
1350
|
-
className: "text-pho-secondary group-hover:text-pho-secondary-hover size-4 shrink-0 transition-colors"
|
|
1351
|
-
})]
|
|
1352
|
-
})]
|
|
1353
|
-
});
|
|
1354
|
-
}
|
|
1355
|
-
function ja({ open: e, variant: a = "overlay", modal: n = !1, placeholder: r, onClose: s, width: l = "default", presentation: u, defaultPresentation: c, onPresentationChange: i, expandable: d = !0, children: f }) {
|
|
1356
|
-
const o = T(je), m = o != null ? Lt(o.paneWidth, l) : 0, h = e ?? ee.toArray(f).length > 0, { presentation: g, setPresentation: b, canChoose: N } = Ka({
|
|
1357
|
-
isOpen: h,
|
|
1358
|
-
paneNarrow: o?.paneNarrow ?? !1,
|
|
1359
|
-
presentation: u,
|
|
1360
|
-
defaultPresentation: c,
|
|
1361
|
-
onPresentationChange: i
|
|
1362
|
-
}), v = o?.setOpen, _ = o?.setAsPage, x = o?.setPresent;
|
|
1363
|
-
if (H(() => {
|
|
1364
|
-
if (x != null)
|
|
1365
|
-
return x(!0), () => x(!1);
|
|
1366
|
-
}, [x]), H(() => {
|
|
1367
|
-
if (v != null)
|
|
1368
|
-
return v(h), () => v(!1);
|
|
1369
|
-
}, [v, h]), H(() => {
|
|
1370
|
-
if (_ != null)
|
|
1371
|
-
return _(g === "page"), () => _(!1);
|
|
1372
|
-
}, [_, g]), O(() => {
|
|
1373
|
-
o == null && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("BasicPage.Aside: needs a `BasicPage.Root` around it.");
|
|
1374
|
-
}, [o]), o == null || o.slot == null) return null;
|
|
1375
|
-
const C = d && N ? () => b("page") : void 0;
|
|
1376
|
-
if (g === "page") {
|
|
1377
|
-
const R = d && N && !o.paneNarrow ? () => b("panel") : void 0;
|
|
1378
|
-
return Pe(h ? /* @__PURE__ */ y("div", {
|
|
1379
|
-
"data-basic-page-aside": "page",
|
|
1380
|
-
"data-basic-page-aside-expanded": o.paneNarrow ? void 0 : "",
|
|
1381
|
-
className: "relative flex min-w-0 flex-1 flex-col",
|
|
1382
|
-
children: [R != null ? /* @__PURE__ */ t("span", {
|
|
1383
|
-
className: "absolute top-2 right-2 z-30",
|
|
1384
|
-
children: /* @__PURE__ */ t(q.Provider, { children: /* @__PURE__ */ t(lt, {
|
|
1385
|
-
label: "Show as panel",
|
|
1386
|
-
icon: /* @__PURE__ */ t(gt, {}),
|
|
1387
|
-
onClick: R
|
|
1388
|
-
}) })
|
|
1389
|
-
}) : null, f]
|
|
1390
|
-
}) : null, o.slot);
|
|
1391
|
-
}
|
|
1392
|
-
return a === "inline" ? Pe(/* @__PURE__ */ t(Xa, {
|
|
1393
|
-
width: m,
|
|
1394
|
-
paneHeight: o.paneHeight,
|
|
1395
|
-
onClose: s,
|
|
1396
|
-
onExpand: C,
|
|
1397
|
-
open: h,
|
|
1398
|
-
placeholder: r,
|
|
1399
|
-
children: f
|
|
1400
|
-
}), o.slot) : /* @__PURE__ */ t(Qa, {
|
|
1401
|
-
container: o.slot,
|
|
1402
|
-
width: m,
|
|
1403
|
-
paneHeight: o.paneHeight,
|
|
1404
|
-
onClose: s,
|
|
1405
|
-
onExpand: C,
|
|
1406
|
-
open: h,
|
|
1407
|
-
modal: n,
|
|
1408
|
-
children: f
|
|
1409
|
-
});
|
|
1410
|
-
}
|
|
1411
|
-
function Ka({ isOpen: e, paneNarrow: a, presentation: n, defaultPresentation: r, onPresentationChange: s }) {
|
|
1412
|
-
const [l, u] = w(e), [c, i] = w(null);
|
|
1413
|
-
H(() => {
|
|
1414
|
-
e || (u(!1), i(null));
|
|
1415
|
-
}, [e]);
|
|
1416
|
-
const d = n != null;
|
|
1417
|
-
return {
|
|
1418
|
-
presentation: a ? "page" : n ?? c ?? r ?? (l ? "page" : "panel"),
|
|
1419
|
-
setPresentation: we((f) => {
|
|
1420
|
-
d || i(f), s?.(f);
|
|
1421
|
-
}, [d, s]),
|
|
1422
|
-
canChoose: !d || s != null
|
|
1423
|
-
};
|
|
1424
|
-
}
|
|
1425
|
-
function st() {
|
|
1426
|
-
const [e, a] = w(null), n = $(() => ({ setBack: a }), []), r = E(null);
|
|
1427
|
-
return {
|
|
1428
|
-
back: e,
|
|
1429
|
-
panel: n,
|
|
1430
|
-
closeRef: r,
|
|
1431
|
-
leave: we(() => {
|
|
1432
|
-
const s = r.current?.querySelector("a, button");
|
|
1433
|
-
return s == null ? !1 : (s.click(), !0);
|
|
1434
|
-
}, [])
|
|
1435
|
-
};
|
|
1436
|
-
}
|
|
1437
|
-
var ze = {
|
|
1438
|
-
variant: "ghost",
|
|
1439
|
-
size: "sm",
|
|
1440
|
-
svgOnly: !0,
|
|
1441
|
-
"aria-label": "Close",
|
|
1442
|
-
children: /* @__PURE__ */ t(wt, {})
|
|
1443
|
-
};
|
|
1444
|
-
function lt({ label: e, icon: a, onClick: n }) {
|
|
1445
|
-
return /* @__PURE__ */ y(q.Root, { children: [/* @__PURE__ */ t(q.Trigger, { render: /* @__PURE__ */ t(Z, {
|
|
1446
|
-
variant: "ghost",
|
|
1447
|
-
size: "sm",
|
|
1448
|
-
svgOnly: !0,
|
|
1449
|
-
"aria-label": e,
|
|
1450
|
-
onClick: n,
|
|
1451
|
-
children: a
|
|
1452
|
-
}) }), /* @__PURE__ */ t(q.Portal, { children: /* @__PURE__ */ t(q.Positioner, { children: /* @__PURE__ */ t(q.Popup, { children: e }) }) })] });
|
|
1453
|
-
}
|
|
1454
|
-
function ot({ back: e, onClose: a, onExpand: n, closeRef: r, panel: s, children: l }) {
|
|
1455
|
-
return /* @__PURE__ */ y(Ne, { children: [/* @__PURE__ */ y("span", {
|
|
1456
|
-
className: "absolute top-2 right-2 z-30 flex items-center gap-0.5",
|
|
1457
|
-
children: [n != null ? /* @__PURE__ */ t(q.Provider, { children: /* @__PURE__ */ t(lt, {
|
|
1458
|
-
label: "Expand",
|
|
1459
|
-
icon: /* @__PURE__ */ t(ht, {}),
|
|
1460
|
-
onClick: n
|
|
1461
|
-
}) }) : null, /* @__PURE__ */ t("span", {
|
|
1462
|
-
ref: r,
|
|
1463
|
-
className: "contents",
|
|
1464
|
-
children: e != null ? /* @__PURE__ */ t(ve, {
|
|
1465
|
-
...ze,
|
|
1466
|
-
href: e.href,
|
|
1467
|
-
onClick: e.onClick
|
|
1468
|
-
}) : a != null ? /* @__PURE__ */ t(Z, {
|
|
1469
|
-
...ze,
|
|
1470
|
-
onClick: a
|
|
1471
|
-
}) : null
|
|
1472
|
-
})]
|
|
1473
|
-
}), /* @__PURE__ */ y(J.Root, {
|
|
1474
|
-
className: "min-h-0 min-w-0 flex-1",
|
|
1475
|
-
children: [/* @__PURE__ */ t(J.Viewport, {
|
|
1476
|
-
className: "overflow-x-hidden",
|
|
1477
|
-
style: { overflowX: "hidden" },
|
|
1478
|
-
children: /* @__PURE__ */ t(J.Content, {
|
|
1479
|
-
className: "flex min-h-full w-full min-w-0 flex-col",
|
|
1480
|
-
style: {
|
|
1481
|
-
minWidth: 0,
|
|
1482
|
-
width: "100%",
|
|
1483
|
-
maxWidth: "100%"
|
|
1484
|
-
},
|
|
1485
|
-
children: /* @__PURE__ */ t(Ke.Provider, {
|
|
1486
|
-
value: s,
|
|
1487
|
-
children: l
|
|
1488
|
-
})
|
|
1489
|
-
})
|
|
1490
|
-
}), /* @__PURE__ */ t(J.Scrollbar, { children: /* @__PURE__ */ t(J.Thumb, {}) })]
|
|
1491
|
-
})] });
|
|
1492
|
-
}
|
|
1493
|
-
function Xa({ width: e, paneHeight: a, onClose: n, onExpand: r, open: s, placeholder: l, children: u }) {
|
|
1494
|
-
const c = M(), { back: i, panel: d, closeRef: f, leave: o } = st(), m = c ? "blur(0px)" : `blur(${xe}px)`, h = a ?? "100dvh";
|
|
1495
|
-
O(() => {
|
|
1496
|
-
const b = (N) => {
|
|
1497
|
-
N.key !== "Escape" || N.defaultPrevented || o() && N.preventDefault();
|
|
1498
|
-
};
|
|
1499
|
-
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
1500
|
-
}, [o]);
|
|
1501
|
-
const g = {
|
|
1502
|
-
initial: {
|
|
1503
|
-
opacity: 0,
|
|
1504
|
-
filter: m
|
|
1505
|
-
},
|
|
1506
|
-
animate: {
|
|
1507
|
-
opacity: 1,
|
|
1508
|
-
filter: "blur(0px)"
|
|
1509
|
-
},
|
|
1510
|
-
exit: {
|
|
1511
|
-
opacity: 0,
|
|
1512
|
-
filter: m
|
|
1513
|
-
},
|
|
1514
|
-
transition: c ? { duration: 0 } : le
|
|
1515
|
-
};
|
|
1516
|
-
return /* @__PURE__ */ t("aside", {
|
|
1517
|
-
"data-basic-page-aside": "panel",
|
|
1518
|
-
"data-basic-page-aside-variant": "inline",
|
|
1519
|
-
className: "relative flex min-w-0 shrink-0 flex-col",
|
|
1520
|
-
style: {
|
|
1521
|
-
width: e,
|
|
1522
|
-
minWidth: 0,
|
|
1523
|
-
maxWidth: e,
|
|
1524
|
-
minHeight: h
|
|
1525
|
-
},
|
|
1526
|
-
children: /* @__PURE__ */ t("div", {
|
|
1527
|
-
className: "border-pho-secondary bg-pho-primary sticky top-0 grid min-w-0 overflow-hidden border-l *:min-h-0 *:[grid-area:1/1]",
|
|
1528
|
-
style: { height: h },
|
|
1529
|
-
children: /* @__PURE__ */ t(V, {
|
|
1530
|
-
initial: !1,
|
|
1531
|
-
children: s ? /* @__PURE__ */ t(A.div, {
|
|
1532
|
-
...g,
|
|
1533
|
-
className: "relative flex min-w-0 flex-col",
|
|
1534
|
-
children: /* @__PURE__ */ t(ot, {
|
|
1535
|
-
back: i,
|
|
1536
|
-
onClose: n,
|
|
1537
|
-
onExpand: r,
|
|
1538
|
-
closeRef: f,
|
|
1539
|
-
panel: d,
|
|
1540
|
-
children: u
|
|
1541
|
-
})
|
|
1542
|
-
}, "page") : /* @__PURE__ */ t(A.div, {
|
|
1543
|
-
...g,
|
|
1544
|
-
className: "flex flex-col",
|
|
1545
|
-
children: l
|
|
1546
|
-
}, "empty")
|
|
1547
|
-
})
|
|
1548
|
-
})
|
|
1549
|
-
});
|
|
1550
|
-
}
|
|
1551
|
-
function Qa({ container: e, width: a, paneHeight: n, onClose: r, onExpand: s, open: l, modal: u, children: c }) {
|
|
1552
|
-
const { back: i, panel: d, closeRef: f, leave: o } = st(), m = n ?? "100dvh";
|
|
1553
|
-
return /* @__PURE__ */ t(ne.Root, {
|
|
1554
|
-
open: l,
|
|
1555
|
-
modal: u ? "trap-focus" : !1,
|
|
1556
|
-
disablePointerDismissal: !0,
|
|
1557
|
-
onOpenChange: (h, g) => {
|
|
1558
|
-
h || (g.cancel(), o());
|
|
1559
|
-
},
|
|
1560
|
-
children: /* @__PURE__ */ y(ne.Portal, {
|
|
1561
|
-
container: e,
|
|
1562
|
-
className: "contents",
|
|
1563
|
-
children: [u ? /* @__PURE__ */ t(ne.Backdrop, {
|
|
1564
|
-
"data-basic-page-aside-backdrop": "",
|
|
1565
|
-
className: p("bg-pho-overlay absolute inset-0 z-30 transition-opacity duration-200 ease-out motion-reduce:transition-none", "data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"),
|
|
1566
|
-
onClick: o
|
|
1567
|
-
}) : null, /* @__PURE__ */ t(ne.Popup, {
|
|
1568
|
-
"data-basic-page-aside": "panel",
|
|
1569
|
-
"data-basic-page-aside-variant": "overlay",
|
|
1570
|
-
initialFocus: u ? void 0 : !1,
|
|
1571
|
-
finalFocus: u ? void 0 : !1,
|
|
1572
|
-
className: p("absolute inset-y-0 right-0 z-30 flex min-w-0 flex-col outline-none", "transition-[translate,opacity] duration-250 ease-out motion-reduce:transition-none", "data-[ending-style]:translate-x-3 data-[ending-style]:opacity-0 data-[ending-style]:duration-200 data-[starting-style]:translate-x-3 data-[starting-style]:opacity-0"),
|
|
1573
|
-
style: {
|
|
1574
|
-
width: a,
|
|
1575
|
-
minWidth: 0,
|
|
1576
|
-
maxWidth: a
|
|
1577
|
-
},
|
|
1578
|
-
children: /* @__PURE__ */ t("div", {
|
|
1579
|
-
className: "border-pho-secondary bg-pho-primary shadow-pho-xl sticky top-0 flex min-w-0 flex-col overflow-hidden border-l",
|
|
1580
|
-
style: { height: m },
|
|
1581
|
-
children: /* @__PURE__ */ t(ot, {
|
|
1582
|
-
back: i,
|
|
1583
|
-
onClose: r,
|
|
1584
|
-
onExpand: s,
|
|
1585
|
-
closeRef: f,
|
|
1586
|
-
panel: d,
|
|
1587
|
-
children: c
|
|
1588
|
-
})
|
|
1589
|
-
})
|
|
1590
|
-
})]
|
|
1591
|
-
})
|
|
1592
|
-
});
|
|
1593
|
-
}
|
|
1594
|
-
var Ya = "14rem", Ua = "transition-[width] duration-[330ms] ease-pho-spring motion-reduce:transition-none", Ge = "transition-[opacity,visibility] duration-200 ease-out motion-reduce:transition-none";
|
|
1595
|
-
function Ja({ variant: e = "box", fold: a = "auto", value: n, onValueChange: r, placeholder: s, label: l, className: u, ...c }) {
|
|
1596
|
-
const i = T(ye), d = ce(i?.subscribe ?? de, () => i?.get().api ?? null, () => null), f = n != null;
|
|
1597
|
-
O(() => {
|
|
1598
|
-
if (!(i == null || f))
|
|
1599
|
-
return i.adopt(!0), () => i.adopt(!1);
|
|
1600
|
-
}, [i, f]);
|
|
1601
|
-
const o = f ? {
|
|
1602
|
-
query: n,
|
|
1603
|
-
setQuery: r,
|
|
1604
|
-
placeholder: s ?? "Search",
|
|
1605
|
-
label: l ?? s ?? "Search"
|
|
1606
|
-
} : d == null ? null : {
|
|
1607
|
-
query: d.query,
|
|
1608
|
-
setQuery: d.setQuery,
|
|
1609
|
-
placeholder: d.placeholder,
|
|
1610
|
-
label: l ?? d.placeholder
|
|
1611
|
-
}, [m, h] = w(!1), g = E(null), b = m || (o?.query ?? "") !== "";
|
|
1612
|
-
if (O(() => {
|
|
1613
|
-
if (!m) return;
|
|
1614
|
-
let v = 0, _ = 0;
|
|
1615
|
-
const x = () => {
|
|
1616
|
-
const C = g.current;
|
|
1617
|
-
C != null && (C.focus(), document.activeElement !== C && _++ < 5 && (v = requestAnimationFrame(x)));
|
|
1618
|
-
};
|
|
1619
|
-
return v = requestAnimationFrame(x), () => cancelAnimationFrame(v);
|
|
1620
|
-
}, [m]), e === "ghost") return /* @__PURE__ */ t("div", {
|
|
1621
|
-
"data-basic-page-search": "",
|
|
1622
|
-
"data-variant": "ghost",
|
|
1623
|
-
className: p("flex min-w-0 flex-1", o == null && "hidden", u),
|
|
1624
|
-
...c,
|
|
1625
|
-
children: o != null && /* @__PURE__ */ t(Ct, {
|
|
1626
|
-
value: o.query,
|
|
1627
|
-
onChange: o.setQuery,
|
|
1628
|
-
placeholder: o.placeholder,
|
|
1629
|
-
"aria-label": o.label,
|
|
1630
|
-
onKeyDown: (v) => {
|
|
1631
|
-
v.key === "Escape" && (v.preventDefault(), o.setQuery(""), v.currentTarget.blur());
|
|
1632
|
-
}
|
|
1633
|
-
})
|
|
1634
|
-
});
|
|
1635
|
-
const N = a === "auto";
|
|
1636
|
-
return /* @__PURE__ */ t("div", {
|
|
1637
|
-
"data-basic-page-search": "",
|
|
1638
|
-
"data-expanded": b || void 0,
|
|
1639
|
-
className: p("grid min-w-0 content-center", "[[data-basic-page-header]>&]:col-start-2 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:justify-items-end [[data-basic-page-header]>&]:self-start", o == null && "hidden", u),
|
|
1640
|
-
...c,
|
|
1641
|
-
children: o != null && /* @__PURE__ */ y("div", {
|
|
1642
|
-
className: p("grid w-9 max-w-full justify-items-end *:[grid-area:1/1]", Ua, N && "@[36rem]:w-56"),
|
|
1643
|
-
style: b ? { width: Ya } : void 0,
|
|
1644
|
-
children: [/* @__PURE__ */ t(Z, {
|
|
1645
|
-
variant: "outlined",
|
|
1646
|
-
size: "sm",
|
|
1647
|
-
shape: "circle",
|
|
1648
|
-
svgOnly: !0,
|
|
1649
|
-
"aria-label": o.label,
|
|
1650
|
-
"aria-hidden": b || void 0,
|
|
1651
|
-
tabIndex: b ? -1 : void 0,
|
|
1652
|
-
onClick: () => h(!0),
|
|
1653
|
-
className: p(Ge, b ? "pointer-events-none invisible opacity-0" : "visible opacity-100", N && "@[36rem]:pointer-events-none @[36rem]:invisible @[36rem]:opacity-0"),
|
|
1654
|
-
children: /* @__PURE__ */ t(Re, {})
|
|
1655
|
-
}), /* @__PURE__ */ t("div", {
|
|
1656
|
-
inert: !N && !b,
|
|
1657
|
-
className: p("w-full min-w-0", Ge, b ? "visible opacity-100" : "pointer-events-none invisible opacity-0", N && "@[36rem]:pointer-events-auto @[36rem]:visible @[36rem]:opacity-100"),
|
|
1658
|
-
children: /* @__PURE__ */ y(pe.Root, {
|
|
1659
|
-
size: "sm",
|
|
1660
|
-
className: "w-full",
|
|
1661
|
-
children: [/* @__PURE__ */ t(pe.Addon, { children: /* @__PURE__ */ t(Re, {}) }), /* @__PURE__ */ t(pe.Input, {
|
|
1662
|
-
ref: g,
|
|
1663
|
-
type: "search",
|
|
1664
|
-
value: o.query,
|
|
1665
|
-
onChange: (v) => o.setQuery(v.target.value),
|
|
1666
|
-
onBlur: () => {
|
|
1667
|
-
o.query === "" && h(!1);
|
|
1668
|
-
},
|
|
1669
|
-
onKeyDown: (v) => {
|
|
1670
|
-
v.key === "Escape" && (v.preventDefault(), o.setQuery(""), h(!1), v.currentTarget.blur());
|
|
1671
|
-
},
|
|
1672
|
-
placeholder: o.placeholder,
|
|
1673
|
-
"aria-label": o.label
|
|
1674
|
-
})]
|
|
1675
|
-
})
|
|
1676
|
-
})]
|
|
1677
|
-
})
|
|
1678
|
-
});
|
|
1679
|
-
}
|
|
1680
|
-
function Za({ header: e, main: a, side: n, foot: r, enter: s }) {
|
|
1681
|
-
const l = n != null;
|
|
1682
|
-
return /* @__PURE__ */ t("div", {
|
|
1683
|
-
"data-basic-page-columns": "",
|
|
1684
|
-
className: "@container w-full min-w-0",
|
|
1685
|
-
children: /* @__PURE__ */ y("div", {
|
|
1686
|
-
className: p("mx-auto w-full max-w-[42rem]", l && "@min-[73.5rem]:max-w-none"),
|
|
1687
|
-
children: [e, /* @__PURE__ */ y("div", {
|
|
1688
|
-
className: p("grid gap-x-10 gap-y-4", l && "@min-[73.5rem]:grid-cols-[minmax(42rem,1fr)_minmax(29rem,32rem)] @min-[73.5rem]:grid-rows-[auto_minmax(0,1fr)]", l && "[&>[data-basic-page-columns-side]]:mt-6 @min-[73.5rem]:[&>[data-basic-page-columns-side]]:mt-7", r != null && "[&>[data-basic-page-columns-foot]]:mt-6"),
|
|
1689
|
-
children: [
|
|
1690
|
-
/* @__PURE__ */ t(re, {
|
|
1691
|
-
enter: s,
|
|
1692
|
-
"data-basic-page-columns-main": "",
|
|
1693
|
-
className: p("[[data-basic-page-stack]>[data-basic-page-columns]_&]:mt-0", l && "@min-[73.5rem]:col-start-1 @min-[73.5rem]:row-span-2 @min-[73.5rem]:row-start-1"),
|
|
1694
|
-
children: a
|
|
1695
|
-
}),
|
|
1696
|
-
l ? /* @__PURE__ */ t(re, {
|
|
1697
|
-
enter: s,
|
|
1698
|
-
"data-basic-page-columns-side": "",
|
|
1699
|
-
className: p("[[data-basic-page-stack]>[data-basic-page-columns]_&]:mt-0", "@min-[73.5rem]:col-start-2 @min-[73.5rem]:row-start-1"),
|
|
1700
|
-
children: n
|
|
1701
|
-
}) : null,
|
|
1702
|
-
r != null ? /* @__PURE__ */ t(re, {
|
|
1703
|
-
enter: s,
|
|
1704
|
-
"data-basic-page-columns-foot": "",
|
|
1705
|
-
className: p("[[data-basic-page-stack]>[data-basic-page-columns]_&]:mt-0", l && "@min-[73.5rem]:col-start-2 @min-[73.5rem]:row-start-2 @min-[73.5rem]:self-start"),
|
|
1706
|
-
children: r
|
|
1707
|
-
}) : null
|
|
1708
|
-
]
|
|
1709
|
-
})]
|
|
1710
|
-
})
|
|
1711
|
-
});
|
|
1712
|
-
}
|
|
1713
|
-
var Pn = {
|
|
1714
|
-
Root: Ht,
|
|
1715
|
-
Aside: ja,
|
|
1716
|
-
Search: Ja,
|
|
1717
|
-
Table: vt,
|
|
1718
|
-
CondenseScope: Qt,
|
|
1719
|
-
Breadcrumbs: rt,
|
|
1720
|
-
Crumb: it,
|
|
1721
|
-
Back: $a,
|
|
1722
|
-
Title: ta,
|
|
1723
|
-
Stack: re,
|
|
1724
|
-
Columns: Za,
|
|
1725
|
-
Header: ua,
|
|
1726
|
-
HeaderAction: da,
|
|
1727
|
-
SectionTitle: pa,
|
|
1728
|
-
Description: et,
|
|
1729
|
-
TableCount: ma,
|
|
1730
|
-
SectionFooter: fa,
|
|
1731
|
-
Card: ha,
|
|
1732
|
-
Item: ga,
|
|
1733
|
-
ItemPanel: ba,
|
|
1734
|
-
Callout: va,
|
|
1735
|
-
CalloutTitle: ya,
|
|
1736
|
-
CalloutDescription: xa,
|
|
1737
|
-
Onboard: wa,
|
|
1738
|
-
Step: Sa,
|
|
1739
|
-
Row: ka,
|
|
1740
|
-
RowLink: qa,
|
|
1741
|
-
Value: Ta,
|
|
1742
|
-
Alert: Ra,
|
|
1743
|
-
Footer: Da,
|
|
1744
|
-
Form: Pa,
|
|
1745
|
-
Saved: Ia,
|
|
1746
|
-
Fields: Ba,
|
|
1747
|
-
Inline: La,
|
|
1748
|
-
Submit: Ma,
|
|
1749
|
-
Reveal: Te
|
|
1750
|
-
};
|
|
1751
|
-
export {
|
|
1752
|
-
It as a,
|
|
1753
|
-
Pn as c,
|
|
1754
|
-
Yt as d,
|
|
1755
|
-
he as f,
|
|
1756
|
-
Pt as i,
|
|
1757
|
-
le as l,
|
|
1758
|
-
kn as m,
|
|
1759
|
-
Ie as n,
|
|
1760
|
-
Ot as o,
|
|
1761
|
-
Tn as p,
|
|
1762
|
-
$e as r,
|
|
1763
|
-
Rt as s,
|
|
1764
|
-
Rn as t,
|
|
1765
|
-
Ut as u
|
|
1766
|
-
};
|
|
1767
|
-
|
|
1768
|
-
//# sourceMappingURL=basic-page-ijv-ijUB.js.map
|