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