@photon-ai/pho-ui 2.8.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{basic-page-BI8y4hHk.js → basic-page-B3iBvhbz.js} +568 -551
- package/dist/chunks/basic-page-B3iBvhbz.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/motion.js.map +1 -1
- package/dist/sections/basic-page.js +1 -1
- package/dist/src/motion/index.d.ts +4 -3
- package/dist/src/sections/basic-page/basic-page.d.ts +50 -12
- package/package.json +1 -1
- package/dist/chunks/basic-page-BI8y4hHk.js.map +0 -1
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
3
|
-
import { n as
|
|
4
|
-
import { FADE_ENTRANCE as
|
|
2
|
+
import { t as p } from "./cn-ChIgwEl3.js";
|
|
3
|
+
import { n as Oe } from "./link-provider-DXzDQ08N.js";
|
|
4
|
+
import { FADE_ENTRANCE as Ze, FADE_SWAP as et, SPRING_ENTRANCE as tt, TRAVEL_LINEAR as nt } from "../motion.js";
|
|
5
5
|
import { a as ae, o as de } from "./button-CdqS_t5a.js";
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
6
|
+
import { t as at } from "./createReactComponent-BqCmnqfX.js";
|
|
7
|
+
import { t as rt } from "./error-D0yoFxCv.js";
|
|
8
8
|
import { t as ee } from "./IconChevronLeft-CSWMKQ4C.js";
|
|
9
|
-
import { a as pe, i as
|
|
9
|
+
import { a as pe, i as it, n as st, r as lt, s as ot } from "./data-table-Cmz0p-jt.js";
|
|
10
10
|
import { t as we } from "./IconSearch-BKAHkLyX.js";
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
11
|
+
import { t as ct } from "./IconX-pZ9vrtSr.js";
|
|
12
|
+
import { t as ut } from "./toast-iSf6NuAS.js";
|
|
13
13
|
import { t as se } from "./input-group-fc9_jD4d.js";
|
|
14
|
-
import { t as
|
|
15
|
-
import { n as
|
|
16
|
-
import { t as
|
|
14
|
+
import { t as dt } from "./animated-height-CCO-Ocoz.js";
|
|
15
|
+
import { n as Le, t as Q } from "./scroll-area-BO-9PMM7.js";
|
|
16
|
+
import { t as pt } from "./form-AiHbbw4m.js";
|
|
17
17
|
import { i as j } from "./menu-BQeprfxB.js";
|
|
18
|
-
import { Children as re, Fragment as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { AnimatePresence as
|
|
18
|
+
import { Children as re, Fragment as ft, createContext as V, isValidElement as mt, useCallback as Be, useContext as S, useEffect as I, useId as ht, useLayoutEffect as G, useMemo as z, useRef as A, useState as b, useSyncExternalStore as fe } from "react";
|
|
19
|
+
import { Fragment as Me, jsx as n, jsxs as w } from "react/jsx-runtime";
|
|
20
|
+
import { AnimatePresence as W, motion as E, useIsPresent as gt, useReducedMotion as L } from "motion/react";
|
|
21
21
|
import { Dialog as Z } from "@base-ui/react/dialog";
|
|
22
22
|
import { createPortal as Ne } from "react-dom";
|
|
23
|
-
var
|
|
23
|
+
var vt = [["path", {
|
|
24
24
|
d: "M9 6l6 6l-6 6",
|
|
25
25
|
key: "svg-0"
|
|
26
|
-
}]],
|
|
26
|
+
}]], yt = at("outline", "chevron-right", "ChevronRight", vt), me = "rounded-base border border-pho-secondary bg-pho-primary", te = "divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0", bt = `${me} ${te}`, Ae = "flex min-w-0 flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5", xt = "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", wt = "flex flex-col gap-3 px-5 py-4", Nt = "-mx-5 -mb-4 flex items-center rounded-b-[calc(0.75rem-1px)] bg-pho-secondary py-1 pr-3 pl-5", At = "-mx-2 -mt-1.5 flex items-center rounded-sm bg-pho-secondary px-2 py-0.5", T = tt, B = Ze, X = 12, Et = 768;
|
|
27
27
|
function Ct(e) {
|
|
28
28
|
return Math.round(Math.min(Math.max(e * 0.4, 320), 448));
|
|
29
29
|
}
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
-
const [t, a] =
|
|
30
|
+
var De = V(null), He = V(null);
|
|
31
|
+
function _t(e) {
|
|
32
|
+
const [t, a] = b(null), [r, i] = b(!1), [c, o] = b(!1), [l, s] = b(() => ({
|
|
33
33
|
width: typeof window > "u" ? 0 : window.innerWidth,
|
|
34
34
|
height: null
|
|
35
35
|
}));
|
|
36
36
|
return G(() => {
|
|
37
37
|
const d = e.current;
|
|
38
|
-
if (!
|
|
39
|
-
const f = be(d),
|
|
40
|
-
const
|
|
41
|
-
s((
|
|
42
|
-
width:
|
|
43
|
-
height:
|
|
38
|
+
if (!r || d == null) return;
|
|
39
|
+
const f = be(d), u = () => {
|
|
40
|
+
const g = d.offsetWidth, y = f?.clientHeight ?? null;
|
|
41
|
+
s((h) => h.width === g && h.height === y ? h : {
|
|
42
|
+
width: g,
|
|
43
|
+
height: y
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
|
-
if (
|
|
47
|
-
const m = new ResizeObserver(
|
|
46
|
+
if (u(), typeof ResizeObserver > "u") return;
|
|
47
|
+
const m = new ResizeObserver(u);
|
|
48
48
|
return m.observe(d), f != null && m.observe(f), () => m.disconnect();
|
|
49
|
-
}, [e,
|
|
49
|
+
}, [e, r]), {
|
|
50
50
|
host: z(() => ({
|
|
51
51
|
slot: t,
|
|
52
|
-
presentation: l.width >=
|
|
52
|
+
presentation: l.width >= Et ? "panel" : "page",
|
|
53
53
|
width: Ct(l.width),
|
|
54
54
|
paneHeight: l.height,
|
|
55
55
|
setOpen: o,
|
|
56
|
-
setPresent:
|
|
56
|
+
setPresent: i
|
|
57
57
|
}), [t, l]),
|
|
58
58
|
setSlot: a,
|
|
59
59
|
open: c
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function St(e) {
|
|
63
63
|
return e == null ? window.scrollY : e.scrollTop;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Ee(e, t) {
|
|
66
66
|
e == null ? window.scrollTo({ top: t }) : e.scrollTop = t;
|
|
67
67
|
}
|
|
68
|
-
function Rt({ condense: e = !0, width: t, className: a, children:
|
|
69
|
-
const o =
|
|
68
|
+
function Rt({ condense: e = !0, width: t, className: a, children: r, ref: i, ...c }) {
|
|
69
|
+
const o = S(ie)?.adopt ?? !1, l = S(He), [s, d] = b(!1), f = A(0), u = Be((H) => {
|
|
70
70
|
f.current += H ? 1 : -1, d(f.current > 0);
|
|
71
|
-
}, []), m = t === "wide" || t == null && s, [
|
|
72
|
-
setTitle:
|
|
71
|
+
}, []), m = t === "wide" || t == null && s, [g] = b(ot), y = A(null), [h, C] = b(null), [v, P] = b(null), x = z(() => ({
|
|
72
|
+
setTitle: C,
|
|
73
73
|
setTail: P
|
|
74
74
|
}), []);
|
|
75
|
-
|
|
75
|
+
I(() => {
|
|
76
76
|
if (l != null)
|
|
77
|
-
return l.setBack(
|
|
78
|
-
}, [l,
|
|
79
|
-
const { host:
|
|
77
|
+
return l.setBack(v), () => l.setBack(null);
|
|
78
|
+
}, [l, v]);
|
|
79
|
+
const { host: R, setSlot: M, open: O } = _t(y), k = O && R.presentation === "page", D = A(!1), $ = A(0);
|
|
80
80
|
G(() => {
|
|
81
|
-
const H =
|
|
82
|
-
if (
|
|
83
|
-
D.current =
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
const
|
|
88
|
-
title:
|
|
89
|
-
tail: l == null ?
|
|
90
|
-
silent:
|
|
81
|
+
const H = y.current;
|
|
82
|
+
if (k === D.current || H == null) return;
|
|
83
|
+
D.current = k;
|
|
84
|
+
const N = be(H);
|
|
85
|
+
k ? ($.current = St(N), Ee(N, 0)) : Ee(N, $.current);
|
|
86
|
+
}, [k]);
|
|
87
|
+
const Y = e ? /* @__PURE__ */ n(kt, {
|
|
88
|
+
title: h,
|
|
89
|
+
tail: l == null ? v : null,
|
|
90
|
+
silent: k || l != null
|
|
91
91
|
}) : null, U = /* @__PURE__ */ n("div", {
|
|
92
92
|
"data-basic-page-column": "",
|
|
93
|
-
className:
|
|
93
|
+
className: p("mx-auto flex w-full min-w-0 flex-1 flex-col px-5 pt-12 pb-12 *:min-w-0", m ? "max-w-[84rem] md:px-8" : "max-w-[44.5rem]", o || l != null ? "[&_[data-basic-page-back]]:hidden" : "has-[[data-basic-page-back]]:pt-16"),
|
|
94
94
|
children: e ? /* @__PURE__ */ n(ge.Provider, {
|
|
95
95
|
value: x,
|
|
96
|
-
children:
|
|
97
|
-
}) :
|
|
96
|
+
children: r
|
|
97
|
+
}) : r
|
|
98
98
|
});
|
|
99
99
|
return /* @__PURE__ */ n("div", {
|
|
100
100
|
"data-basic-page-root": "",
|
|
101
101
|
"data-basic-page-width": m ? "wide" : void 0,
|
|
102
|
-
className:
|
|
102
|
+
className: p("relative flex min-h-full w-full min-w-0 flex-row", a),
|
|
103
103
|
...c,
|
|
104
104
|
ref: (H) => {
|
|
105
|
-
|
|
105
|
+
y.current = H, typeof i == "function" ? i(H) : i != null && (i.current = H);
|
|
106
106
|
},
|
|
107
|
-
children: /* @__PURE__ */ n(
|
|
108
|
-
value:
|
|
109
|
-
children: /* @__PURE__ */ n(
|
|
110
|
-
value:
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
value:
|
|
113
|
-
children: [/* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ n(De.Provider, {
|
|
108
|
+
value: R,
|
|
109
|
+
children: /* @__PURE__ */ n(it.Provider, {
|
|
110
|
+
value: u,
|
|
111
|
+
children: /* @__PURE__ */ w(pe.Provider, {
|
|
112
|
+
value: g,
|
|
113
|
+
children: [/* @__PURE__ */ w("div", {
|
|
114
114
|
"data-basic-page-main": "",
|
|
115
|
-
className:
|
|
116
|
-
children: [
|
|
115
|
+
className: p("flex min-w-0 flex-1 flex-col", k && "hidden"),
|
|
116
|
+
children: [Y, U]
|
|
117
117
|
}), /* @__PURE__ */ n("div", {
|
|
118
118
|
ref: M,
|
|
119
119
|
className: "contents"
|
|
@@ -123,16 +123,16 @@ function Rt({ condense: e = !0, width: t, className: a, children: i, ref: r, ...
|
|
|
123
123
|
})
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
const
|
|
128
|
-
|
|
126
|
+
function kt({ title: e, tail: t, silent: a = !1 }) {
|
|
127
|
+
const r = L(), [i, c] = b(!1), o = S(ie), l = ht();
|
|
128
|
+
I(() => {
|
|
129
129
|
if (o != null) {
|
|
130
130
|
if (a) {
|
|
131
131
|
o.store.clear(l);
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
o.store.set(l, {
|
|
135
|
-
condensed:
|
|
135
|
+
condensed: i,
|
|
136
136
|
title: e?.label ?? null,
|
|
137
137
|
back: t
|
|
138
138
|
});
|
|
@@ -140,26 +140,26 @@ function St({ title: e, tail: t, silent: a = !1 }) {
|
|
|
140
140
|
}, [
|
|
141
141
|
o,
|
|
142
142
|
l,
|
|
143
|
-
|
|
143
|
+
i,
|
|
144
144
|
e,
|
|
145
145
|
t,
|
|
146
146
|
a
|
|
147
|
-
]),
|
|
147
|
+
]), I(() => {
|
|
148
148
|
if (o != null)
|
|
149
149
|
return () => o.store.clear(l);
|
|
150
150
|
}, [o, l]);
|
|
151
151
|
const s = e?.el ?? null;
|
|
152
|
-
return
|
|
152
|
+
return I(() => {
|
|
153
153
|
if (s == null || typeof IntersectionObserver > "u") return;
|
|
154
154
|
const d = new IntersectionObserver(([f]) => c(f != null && !f.isIntersecting), { root: be(s) });
|
|
155
155
|
return d.observe(s), () => d.disconnect();
|
|
156
156
|
}, [s]), /* @__PURE__ */ n("div", {
|
|
157
157
|
"data-basic-page-condense": "",
|
|
158
158
|
className: "sticky top-0 z-20 h-0 overflow-visible",
|
|
159
|
-
children: /* @__PURE__ */ n(
|
|
159
|
+
children: /* @__PURE__ */ n(W, { children: i && !(o?.adopt ?? !1) && /* @__PURE__ */ w(E.div, {
|
|
160
160
|
initial: {
|
|
161
161
|
opacity: 0,
|
|
162
|
-
y:
|
|
162
|
+
y: r ? 0 : Re
|
|
163
163
|
},
|
|
164
164
|
animate: {
|
|
165
165
|
opacity: 1,
|
|
@@ -167,11 +167,11 @@ function St({ title: e, tail: t, silent: a = !1 }) {
|
|
|
167
167
|
},
|
|
168
168
|
exit: {
|
|
169
169
|
opacity: 0,
|
|
170
|
-
y:
|
|
170
|
+
y: r ? 0 : Re
|
|
171
171
|
},
|
|
172
172
|
transition: {
|
|
173
173
|
...ye,
|
|
174
|
-
y:
|
|
174
|
+
y: Gt
|
|
175
175
|
},
|
|
176
176
|
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",
|
|
177
177
|
children: [/* @__PURE__ */ n("div", {
|
|
@@ -195,47 +195,47 @@ function St({ title: e, tail: t, silent: a = !1 }) {
|
|
|
195
195
|
}) })
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Tt(e) {
|
|
199
199
|
return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Pt(e) {
|
|
202
202
|
if (!(typeof e != "string" && typeof e != "number"))
|
|
203
|
-
return
|
|
203
|
+
return Tt(String(e)) || void 0;
|
|
204
204
|
}
|
|
205
205
|
function he(e, t) {
|
|
206
206
|
if (e !== "")
|
|
207
|
-
return e ??
|
|
207
|
+
return e ?? Pt(t);
|
|
208
208
|
}
|
|
209
|
-
var
|
|
209
|
+
var It = (e) => `basic-page-morph-${e}`, Ot = { layout: T }, Ce = 10, _e = {
|
|
210
210
|
delay: 0.2,
|
|
211
211
|
duration: 0.12,
|
|
212
212
|
ease: "easeOut"
|
|
213
|
-
},
|
|
213
|
+
}, Lt = {
|
|
214
214
|
duration: 0.18,
|
|
215
215
|
ease: "easeOut"
|
|
216
|
-
},
|
|
216
|
+
}, Bt = -8, Mt = {
|
|
217
217
|
duration: 0.16,
|
|
218
218
|
ease: "easeOut"
|
|
219
|
-
},
|
|
219
|
+
}, Dt = {
|
|
220
220
|
delay: 0.14,
|
|
221
221
|
duration: 0.16,
|
|
222
222
|
ease: "easeOut"
|
|
223
|
-
},
|
|
223
|
+
}, Fe = {
|
|
224
224
|
duration: 0.12,
|
|
225
225
|
ease: "easeOut"
|
|
226
|
-
},
|
|
227
|
-
function
|
|
228
|
-
const t =
|
|
226
|
+
}, q = [];
|
|
227
|
+
function Ht(e) {
|
|
228
|
+
const t = A({ labels: e });
|
|
229
229
|
t.current.labels = e, G(() => {
|
|
230
230
|
const a = t.current;
|
|
231
|
-
return
|
|
232
|
-
|
|
231
|
+
return q.push(a), () => {
|
|
232
|
+
q.splice(q.indexOf(a), 1);
|
|
233
233
|
};
|
|
234
234
|
}, []);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
const [e] =
|
|
238
|
-
const t =
|
|
236
|
+
function Ge() {
|
|
237
|
+
const [e] = b(() => {
|
|
238
|
+
const t = q[q.length - 1];
|
|
239
239
|
return t ? { labels: [...t.labels] } : null;
|
|
240
240
|
});
|
|
241
241
|
return e;
|
|
@@ -245,39 +245,39 @@ var ge = V(null), ce = {
|
|
|
245
245
|
title: null,
|
|
246
246
|
back: null
|
|
247
247
|
}, ie = V(null), ve = () => () => {
|
|
248
|
-
},
|
|
249
|
-
function
|
|
250
|
-
const [a] =
|
|
251
|
-
let
|
|
248
|
+
}, Se = () => ce;
|
|
249
|
+
function Ft({ adopt: e = !0, children: t }) {
|
|
250
|
+
const [a] = b(() => {
|
|
251
|
+
let i = ce, c = null;
|
|
252
252
|
const o = /* @__PURE__ */ new Set(), l = () => {
|
|
253
253
|
for (const s of o) s();
|
|
254
254
|
};
|
|
255
255
|
return {
|
|
256
|
-
get: () =>
|
|
256
|
+
get: () => i,
|
|
257
257
|
set(s, d) {
|
|
258
|
-
c = s,
|
|
258
|
+
c = s, i = d, l();
|
|
259
259
|
},
|
|
260
260
|
clear(s) {
|
|
261
|
-
c === s && (c = null,
|
|
261
|
+
c === s && (c = null, i = ce, l());
|
|
262
262
|
},
|
|
263
263
|
subscribe(s) {
|
|
264
264
|
return o.add(s), () => o.delete(s);
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
|
-
}),
|
|
267
|
+
}), r = z(() => ({
|
|
268
268
|
store: a,
|
|
269
269
|
adopt: e
|
|
270
270
|
}), [a, e]);
|
|
271
271
|
return /* @__PURE__ */ n(ie.Provider, {
|
|
272
|
-
value:
|
|
272
|
+
value: r,
|
|
273
273
|
children: t
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
const e =
|
|
278
|
-
return fe(e?.store.subscribe ?? ve, e?.store.get ??
|
|
276
|
+
function ta() {
|
|
277
|
+
const e = S(ie);
|
|
278
|
+
return fe(e?.store.subscribe ?? ve, e?.store.get ?? Se, e?.store.get ?? Se);
|
|
279
279
|
}
|
|
280
|
-
var ye =
|
|
280
|
+
var ye = et, Gt = nt, Re = -8;
|
|
281
281
|
function be(e) {
|
|
282
282
|
if (typeof getComputedStyle != "function") return null;
|
|
283
283
|
for (let t = e.parentElement; t != null && t !== document.body; t = t.parentElement) {
|
|
@@ -286,36 +286,36 @@ function be(e) {
|
|
|
286
286
|
}
|
|
287
287
|
return null;
|
|
288
288
|
}
|
|
289
|
-
var le = /* @__PURE__ */ new Map(),
|
|
290
|
-
function
|
|
289
|
+
var le = /* @__PURE__ */ new Map(), zt = 96;
|
|
290
|
+
function Vt(e) {
|
|
291
291
|
const t = e.closest("[data-basic-page-root]"), a = t?.querySelector("[data-basic-page-column]");
|
|
292
292
|
return !t || !a ? 0 : a.getBoundingClientRect().left - t.getBoundingClientRect().left;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
const [t] =
|
|
294
|
+
function ze(e) {
|
|
295
|
+
const [t] = b(() => {
|
|
296
296
|
if (e == null) return !1;
|
|
297
|
-
const
|
|
298
|
-
return
|
|
299
|
-
}), a =
|
|
300
|
-
return
|
|
297
|
+
const r = le.get(e);
|
|
298
|
+
return r != null && r.visible && r.el.isConnected && Vt(r.el) <= zt;
|
|
299
|
+
}), a = A(null);
|
|
300
|
+
return I(() => {
|
|
301
301
|
if (e == null || typeof IntersectionObserver > "u") return;
|
|
302
|
-
const
|
|
303
|
-
if (!
|
|
304
|
-
const
|
|
302
|
+
const r = a.current;
|
|
303
|
+
if (!r) return;
|
|
304
|
+
const i = new IntersectionObserver(([c]) => {
|
|
305
305
|
c && le.set(e, {
|
|
306
306
|
visible: c.isIntersecting,
|
|
307
|
-
el:
|
|
307
|
+
el: r
|
|
308
308
|
});
|
|
309
309
|
});
|
|
310
|
-
return
|
|
311
|
-
|
|
310
|
+
return i.observe(r), () => {
|
|
311
|
+
i.disconnect(), le.delete(e);
|
|
312
312
|
};
|
|
313
313
|
}, [e]), {
|
|
314
314
|
fly: t,
|
|
315
315
|
ref: a
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
var
|
|
318
|
+
var $t = {
|
|
319
319
|
fade: {
|
|
320
320
|
initial: { opacity: 0 },
|
|
321
321
|
animate: { opacity: 1 },
|
|
@@ -324,31 +324,31 @@ var Vt = {
|
|
|
324
324
|
rise: {
|
|
325
325
|
initial: {
|
|
326
326
|
opacity: 0,
|
|
327
|
-
y:
|
|
327
|
+
y: X
|
|
328
328
|
},
|
|
329
329
|
animate: {
|
|
330
330
|
opacity: 1,
|
|
331
331
|
y: 0
|
|
332
332
|
},
|
|
333
333
|
transition: {
|
|
334
|
-
y:
|
|
334
|
+
y: T,
|
|
335
335
|
opacity: B
|
|
336
336
|
}
|
|
337
337
|
},
|
|
338
338
|
slide: {
|
|
339
339
|
initial: { x: "-100%" },
|
|
340
340
|
animate: { x: 0 },
|
|
341
|
-
transition: { x:
|
|
341
|
+
transition: { x: Dt }
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
|
-
function
|
|
345
|
-
const [l, s] =
|
|
346
|
-
return /* @__PURE__ */
|
|
347
|
-
ref:
|
|
348
|
-
layoutId:
|
|
344
|
+
function Ve({ morphId: e, fromClassName: t, fly: a, morphRef: r, arrival: i, className: c, children: o }) {
|
|
345
|
+
const [l, s] = b(!1), d = !a && i != null ? $t[i] : null;
|
|
346
|
+
return /* @__PURE__ */ w(E.span, {
|
|
347
|
+
ref: r,
|
|
348
|
+
layoutId: It(e),
|
|
349
349
|
initial: d?.initial,
|
|
350
350
|
animate: d?.animate,
|
|
351
|
-
transition: a ?
|
|
351
|
+
transition: a ? Ot : {
|
|
352
352
|
layout: { duration: 0 },
|
|
353
353
|
...d?.transition
|
|
354
354
|
},
|
|
@@ -356,77 +356,77 @@ function ze({ morphId: e, fromClassName: t, fly: a, morphRef: i, arrival: r, cla
|
|
|
356
356
|
a && s(!0);
|
|
357
357
|
},
|
|
358
358
|
onLayoutAnimationComplete: () => s(!1),
|
|
359
|
-
className:
|
|
360
|
-
children: [o, l && /* @__PURE__ */ n(
|
|
359
|
+
className: p("relative inline-block", c),
|
|
360
|
+
children: [o, l && /* @__PURE__ */ n(E.span, {
|
|
361
361
|
"aria-hidden": !0,
|
|
362
362
|
initial: { opacity: 1 },
|
|
363
363
|
animate: { opacity: 0 },
|
|
364
|
-
transition:
|
|
364
|
+
transition: Lt,
|
|
365
365
|
onAnimationComplete: () => s(!1),
|
|
366
|
-
className:
|
|
366
|
+
className: p("absolute inset-0", t),
|
|
367
367
|
children: o
|
|
368
368
|
})]
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
371
|
var ke = "max-w-full min-w-0 truncate align-top";
|
|
372
|
-
function
|
|
373
|
-
const o = he(e,
|
|
372
|
+
function jt({ id: e, morphId: t, enter: a, className: r, children: i, ...c }) {
|
|
373
|
+
const o = he(e, i), l = L(), s = ze(t), d = Ge(), f = !l && (t != null || a === !0), u = a || d != null ? "rise" : void 0, m = S(ge), g = A(null);
|
|
374
374
|
G(() => {
|
|
375
375
|
if (m != null)
|
|
376
376
|
return m.setTitle({
|
|
377
|
-
label:
|
|
378
|
-
el:
|
|
377
|
+
label: i,
|
|
378
|
+
el: g.current
|
|
379
379
|
}), () => m.setTitle(null);
|
|
380
|
-
}, [m,
|
|
381
|
-
const [
|
|
380
|
+
}, [m, i]);
|
|
381
|
+
const [y, h] = b(s.fly && d != null);
|
|
382
382
|
return G(() => {
|
|
383
|
-
|
|
384
|
-
}, []), /* @__PURE__ */
|
|
383
|
+
q.length > 0 && h(!1);
|
|
384
|
+
}, []), /* @__PURE__ */ w("h1", {
|
|
385
385
|
id: o,
|
|
386
|
-
className:
|
|
386
|
+
className: p("text-display-base text-pho-primary max-w-full min-w-0 scroll-mt-12 px-5 font-medium", f ? "whitespace-nowrap" : "truncate", r),
|
|
387
387
|
...c,
|
|
388
|
-
ref: (
|
|
389
|
-
|
|
390
|
-
const
|
|
391
|
-
typeof
|
|
388
|
+
ref: (C) => {
|
|
389
|
+
g.current = C;
|
|
390
|
+
const v = c.ref;
|
|
391
|
+
typeof v == "function" ? v(C) : v != null && (v.current = C);
|
|
392
392
|
},
|
|
393
|
-
children: [t != null && !l ? /* @__PURE__ */ n(
|
|
393
|
+
children: [t != null && !l ? /* @__PURE__ */ n(Ve, {
|
|
394
394
|
morphId: t,
|
|
395
395
|
fromClassName: "text-pho-secondary",
|
|
396
396
|
fly: s.fly,
|
|
397
397
|
morphRef: s.ref,
|
|
398
|
-
arrival:
|
|
398
|
+
arrival: u,
|
|
399
399
|
className: ke,
|
|
400
|
-
children:
|
|
401
|
-
}) : a && !l ? /* @__PURE__ */ n(
|
|
400
|
+
children: i
|
|
401
|
+
}) : a && !l ? /* @__PURE__ */ n(E.span, {
|
|
402
402
|
initial: {
|
|
403
403
|
opacity: 0,
|
|
404
|
-
y:
|
|
404
|
+
y: X
|
|
405
405
|
},
|
|
406
406
|
animate: {
|
|
407
407
|
opacity: 1,
|
|
408
408
|
y: 0
|
|
409
409
|
},
|
|
410
410
|
transition: {
|
|
411
|
-
y:
|
|
411
|
+
y: T,
|
|
412
412
|
opacity: B
|
|
413
413
|
},
|
|
414
|
-
className:
|
|
415
|
-
children:
|
|
416
|
-
}) :
|
|
414
|
+
className: p("inline-block", ke),
|
|
415
|
+
children: i
|
|
416
|
+
}) : i, y && /* @__PURE__ */ n(E.span, {
|
|
417
417
|
"aria-hidden": !0,
|
|
418
418
|
initial: { opacity: 1 },
|
|
419
419
|
animate: { opacity: 0 },
|
|
420
|
-
transition:
|
|
421
|
-
onAnimationComplete: () =>
|
|
422
|
-
className:
|
|
420
|
+
transition: Fe,
|
|
421
|
+
onAnimationComplete: () => h(!1),
|
|
422
|
+
className: p("text-pho-secondary pointer-events-none absolute inline-flex items-center", bn),
|
|
423
423
|
children: /* @__PURE__ */ n(ee, {})
|
|
424
424
|
})]
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
|
-
var
|
|
428
|
-
function
|
|
429
|
-
const e =
|
|
427
|
+
var $e = V(!1);
|
|
428
|
+
function qt() {
|
|
429
|
+
const e = S($e), t = L(), [a] = b(() => e && !t);
|
|
430
430
|
return a;
|
|
431
431
|
}
|
|
432
432
|
var Wt = {
|
|
@@ -436,19 +436,19 @@ var Wt = {
|
|
|
436
436
|
paddingBottom: 0,
|
|
437
437
|
borderTopWidth: 0
|
|
438
438
|
}, Xt = {
|
|
439
|
-
y:
|
|
439
|
+
y: T,
|
|
440
440
|
opacity: B,
|
|
441
|
-
height:
|
|
442
|
-
paddingTop:
|
|
443
|
-
paddingBottom:
|
|
444
|
-
borderTopWidth:
|
|
441
|
+
height: T,
|
|
442
|
+
paddingTop: T,
|
|
443
|
+
paddingBottom: T,
|
|
444
|
+
borderTopWidth: T
|
|
445
445
|
};
|
|
446
446
|
function xe() {
|
|
447
|
-
const e =
|
|
447
|
+
const e = qt(), t = gt(), a = L();
|
|
448
448
|
return {
|
|
449
449
|
initial: e ? {
|
|
450
450
|
opacity: 0,
|
|
451
|
-
y:
|
|
451
|
+
y: X
|
|
452
452
|
} : !1,
|
|
453
453
|
animate: {
|
|
454
454
|
opacity: 1,
|
|
@@ -460,48 +460,48 @@ function xe() {
|
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
462
|
var Kt = typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
463
|
-
function
|
|
464
|
-
|
|
463
|
+
function je(e, t, a, r) {
|
|
464
|
+
I(() => {
|
|
465
465
|
if (!Kt || e.current == null || typeof getComputedStyle != "function") return;
|
|
466
|
-
const
|
|
466
|
+
const i = (o) => {
|
|
467
467
|
const l = getComputedStyle(o).rowGap;
|
|
468
468
|
return l === "" || l === "normal" ? null : parseFloat(l);
|
|
469
|
-
}, c =
|
|
469
|
+
}, c = i(e.current);
|
|
470
470
|
c != null && c !== a && console.warn(`[BasicPage.${t}] spaced at ${c}px instead of ${a}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);
|
|
471
471
|
for (const o of Array.from(e.current.children)) {
|
|
472
|
-
const l =
|
|
472
|
+
const l = r(o);
|
|
473
473
|
if (l == null || getComputedStyle(o).display === "contents") continue;
|
|
474
|
-
const s =
|
|
474
|
+
const s = i(o);
|
|
475
475
|
s != null && s !== l && console.warn(`[BasicPage.${t}] a child is spaced at ${s}px instead of ${l}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.`, o);
|
|
476
476
|
}
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
const
|
|
481
|
-
|
|
482
|
-
const o =
|
|
483
|
-
return
|
|
479
|
+
function Qt({ className: e, children: t, ref: a, ...r }) {
|
|
480
|
+
const i = L(), c = A(null);
|
|
481
|
+
je(c, "Stack", 40, (f) => f.hasAttribute("data-basic-page-fields") ? 20 : 12);
|
|
482
|
+
const o = r["aria-busy"], l = o === !0 || o === "true", s = A(l), d = s.current && !l;
|
|
483
|
+
return I(() => {
|
|
484
484
|
s.current = l;
|
|
485
|
-
}), /* @__PURE__ */ n(
|
|
485
|
+
}), /* @__PURE__ */ n(E.div, {
|
|
486
486
|
ref: (f) => {
|
|
487
487
|
c.current = f, typeof a == "function" ? a(f) : a != null && (a.current = f);
|
|
488
488
|
},
|
|
489
489
|
"data-basic-page-stack": "",
|
|
490
|
-
initial:
|
|
490
|
+
initial: i ? !1 : {
|
|
491
491
|
opacity: 0,
|
|
492
|
-
y:
|
|
492
|
+
y: X
|
|
493
493
|
},
|
|
494
494
|
animate: {
|
|
495
495
|
opacity: 1,
|
|
496
496
|
y: 0
|
|
497
497
|
},
|
|
498
498
|
transition: {
|
|
499
|
-
y:
|
|
499
|
+
y: T,
|
|
500
500
|
opacity: B
|
|
501
501
|
},
|
|
502
|
-
className:
|
|
503
|
-
...
|
|
504
|
-
children: /* @__PURE__ */ n(
|
|
502
|
+
className: p("mt-7 flex min-w-0 flex-col gap-10", "[&:has(>*:first-child:not([data-basic-page-callout])>[data-basic-page-header]:first-child)]:mt-6 [&:has(>*:first-child:not([data-basic-page-callout])>h2:first-child)]:mt-6 [&:has(>[data-basic-page-header]:first-child)]:mt-6 [&:has(>h2:first-child)]:mt-6", "*:flex *:min-w-0 *:flex-col [&>*:not([data-basic-page-fields])]:gap-3", e),
|
|
503
|
+
...r,
|
|
504
|
+
children: /* @__PURE__ */ n($e.Provider, {
|
|
505
505
|
value: d,
|
|
506
506
|
children: t
|
|
507
507
|
})
|
|
@@ -509,113 +509,113 @@ function qt({ className: e, children: t, ref: a, ...i }) {
|
|
|
509
509
|
}
|
|
510
510
|
var Te = "@container grid min-w-0 grid-cols-[minmax(0,1fr)_auto_auto] mb-3 [&>:not([data-basic-page-search]):not([data-basic-page-header-action])]:col-start-1 [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0";
|
|
511
511
|
function Yt({ enter: e, className: t, ...a }) {
|
|
512
|
-
const
|
|
513
|
-
return e && !
|
|
512
|
+
const r = L();
|
|
513
|
+
return e && !r ? /* @__PURE__ */ n(E.div, {
|
|
514
514
|
initial: {
|
|
515
515
|
opacity: 0,
|
|
516
|
-
y:
|
|
516
|
+
y: X
|
|
517
517
|
},
|
|
518
518
|
animate: {
|
|
519
519
|
opacity: 1,
|
|
520
520
|
y: 0
|
|
521
521
|
},
|
|
522
522
|
transition: {
|
|
523
|
-
y:
|
|
523
|
+
y: T,
|
|
524
524
|
opacity: B
|
|
525
525
|
},
|
|
526
526
|
"data-basic-page-header": "",
|
|
527
|
-
className:
|
|
527
|
+
className: p(Te, t),
|
|
528
528
|
...a
|
|
529
529
|
}) : /* @__PURE__ */ n("div", {
|
|
530
530
|
"data-basic-page-header": "",
|
|
531
|
-
className:
|
|
531
|
+
className: p(Te, t),
|
|
532
532
|
...a
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Ut({ className: e, ...t }) {
|
|
536
536
|
return /* @__PURE__ */ n("div", {
|
|
537
537
|
"data-basic-page-header-action": "",
|
|
538
|
-
className:
|
|
538
|
+
className: p("flex items-center gap-2", "[[data-basic-page-header]>&]:col-start-3 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:self-start [[data-basic-page-header]>&]:justify-self-end", e),
|
|
539
539
|
...t
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
const
|
|
542
|
+
function Jt({ id: e, className: t, children: a, ...r }) {
|
|
543
|
+
const i = he(e, a);
|
|
544
544
|
return /* @__PURE__ */ n("h2", {
|
|
545
|
-
id:
|
|
546
|
-
className:
|
|
547
|
-
...
|
|
545
|
+
id: i,
|
|
546
|
+
className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate px-5 font-medium", "mb-3 [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-header]>&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0", t),
|
|
547
|
+
...r,
|
|
548
548
|
children: a
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function qe({ className: e, ...t }) {
|
|
552
552
|
return /* @__PURE__ */ n("p", {
|
|
553
|
-
className:
|
|
553
|
+
className: p("text-display-xs text-pho-description px-5 font-normal", e),
|
|
554
554
|
...t
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
const
|
|
559
|
-
if (
|
|
560
|
-
const c =
|
|
561
|
-
return /* @__PURE__ */ n(
|
|
557
|
+
function Zt({ one: e, other: t, ...a }) {
|
|
558
|
+
const r = S(pe), i = fe(r?.subscribe ?? ve, () => r?.get().api ?? null, () => null);
|
|
559
|
+
if (i == null) return null;
|
|
560
|
+
const c = i.query.trim() !== "" ? `${i.matched} of ${i.total}.` : `${i.total} ${i.total === 1 ? e : t}.`;
|
|
561
|
+
return /* @__PURE__ */ n(qe, {
|
|
562
562
|
...a,
|
|
563
563
|
children: c
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function en({ className: e, ...t }) {
|
|
567
567
|
return /* @__PURE__ */ n("p", {
|
|
568
|
-
className:
|
|
568
|
+
className: p("text-pho-description px-5 text-xs font-normal", "mt-3 [[data-basic-page-callout]_&]:mt-0 [[data-basic-page-stack]>*>&]:mt-0", e),
|
|
569
569
|
...t
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
const
|
|
572
|
+
function tn({ animateHeight: e, className: t, children: a, ...r }) {
|
|
573
|
+
const i = /* @__PURE__ */ n(W, { children: re.toArray(a) });
|
|
574
574
|
return e ? /* @__PURE__ */ n("div", {
|
|
575
|
-
className:
|
|
576
|
-
...
|
|
577
|
-
children: /* @__PURE__ */ n(
|
|
578
|
-
transition:
|
|
575
|
+
className: p(me, "min-h-0 overflow-hidden", t),
|
|
576
|
+
...r,
|
|
577
|
+
children: /* @__PURE__ */ n(dt, {
|
|
578
|
+
transition: T,
|
|
579
579
|
className: te,
|
|
580
|
-
children:
|
|
580
|
+
children: i
|
|
581
581
|
})
|
|
582
582
|
}) : /* @__PURE__ */ n("div", {
|
|
583
|
-
className:
|
|
584
|
-
...
|
|
585
|
-
children:
|
|
583
|
+
className: p(bt, t),
|
|
584
|
+
...r,
|
|
585
|
+
children: i
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
const { leaving: a, ...
|
|
590
|
-
return /* @__PURE__ */ n(
|
|
591
|
-
...
|
|
592
|
-
className:
|
|
588
|
+
function nn({ className: e, ...t }) {
|
|
589
|
+
const { leaving: a, ...r } = xe();
|
|
590
|
+
return /* @__PURE__ */ n(E.div, {
|
|
591
|
+
...r,
|
|
592
|
+
className: p(wt, a && "overflow-hidden", e),
|
|
593
593
|
...t
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function an({ divided: e = !1, className: t, ...a }) {
|
|
597
597
|
return /* @__PURE__ */ n("div", {
|
|
598
|
-
className:
|
|
598
|
+
className: p(e ? At : Nt, t),
|
|
599
599
|
...a
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function rn({ className: e, icon: t, children: a, ...r }) {
|
|
603
603
|
if (t == null || t === !1 || t === !0) return /* @__PURE__ */ n("div", {
|
|
604
604
|
"data-basic-page-callout": "",
|
|
605
|
-
className:
|
|
606
|
-
...
|
|
605
|
+
className: p(Ae, e),
|
|
606
|
+
...r,
|
|
607
607
|
children: a
|
|
608
608
|
});
|
|
609
|
-
const [
|
|
610
|
-
return /* @__PURE__ */
|
|
609
|
+
const [i, ...c] = re.toArray(a);
|
|
610
|
+
return /* @__PURE__ */ w("div", {
|
|
611
611
|
"data-basic-page-callout": "",
|
|
612
|
-
className:
|
|
613
|
-
...
|
|
614
|
-
children: [/* @__PURE__ */
|
|
612
|
+
className: p(Ae, e),
|
|
613
|
+
...r,
|
|
614
|
+
children: [/* @__PURE__ */ w("div", {
|
|
615
615
|
className: "relative",
|
|
616
616
|
children: [/* @__PURE__ */ n("div", {
|
|
617
617
|
className: "min-w-0 pr-16",
|
|
618
|
-
children:
|
|
618
|
+
children: i
|
|
619
619
|
}), /* @__PURE__ */ n("div", {
|
|
620
620
|
"aria-hidden": !0,
|
|
621
621
|
className: "text-pho-primary pointer-events-none absolute top-0 right-0 size-14 opacity-[0.275] [&>svg]:size-full",
|
|
@@ -624,28 +624,28 @@ function an({ className: e, icon: t, children: a, ...i }) {
|
|
|
624
624
|
}), c]
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
const
|
|
627
|
+
function sn({ id: e, className: t, children: a, ...r }) {
|
|
628
|
+
const i = he(e, a);
|
|
629
629
|
return /* @__PURE__ */ n("h2", {
|
|
630
|
-
id:
|
|
631
|
-
className:
|
|
632
|
-
...
|
|
630
|
+
id: i,
|
|
631
|
+
className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate font-medium", t),
|
|
632
|
+
...r,
|
|
633
633
|
children: a
|
|
634
634
|
});
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function ln({ className: e, ...t }) {
|
|
637
637
|
return /* @__PURE__ */ n("p", {
|
|
638
|
-
className:
|
|
638
|
+
className: p("text-display-xs text-pho-description font-normal", e),
|
|
639
639
|
...t
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function on({ label: e, description: t, htmlFor: a, stacked: r = !1, className: i, children: c, ...o }) {
|
|
643
643
|
const { leaving: l, ...s } = xe();
|
|
644
|
-
return /* @__PURE__ */
|
|
644
|
+
return /* @__PURE__ */ w(E.div, {
|
|
645
645
|
...s,
|
|
646
|
-
className:
|
|
646
|
+
className: p(xt, r && "sm:flex-col sm:items-stretch sm:justify-start sm:gap-3", l && "overflow-hidden", i),
|
|
647
647
|
...o,
|
|
648
|
-
children: [/* @__PURE__ */
|
|
648
|
+
children: [/* @__PURE__ */ w("div", {
|
|
649
649
|
className: "min-w-0",
|
|
650
650
|
children: [a ? /* @__PURE__ */ n("label", {
|
|
651
651
|
htmlFor: a,
|
|
@@ -659,22 +659,22 @@ function ln({ label: e, description: t, htmlFor: a, stacked: i = !1, className:
|
|
|
659
659
|
children: t
|
|
660
660
|
}) : null]
|
|
661
661
|
}), /* @__PURE__ */ n("div", {
|
|
662
|
-
className:
|
|
662
|
+
className: p("flex w-full min-w-0 items-center gap-2 sm:w-auto", r && "sm:w-full"),
|
|
663
663
|
children: c
|
|
664
664
|
})]
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function cn({ className: e, ...t }) {
|
|
668
668
|
return /* @__PURE__ */ n("p", {
|
|
669
|
-
className:
|
|
669
|
+
className: p("text-pho-description max-w-full min-w-0 truncate text-base", e),
|
|
670
670
|
...t
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
const c =
|
|
675
|
-
return /* @__PURE__ */ n(
|
|
673
|
+
function un({ error: e, show: t, className: a, children: r, ...i }) {
|
|
674
|
+
const c = L(), o = S(K), l = e ?? o?.error ?? void 0;
|
|
675
|
+
return /* @__PURE__ */ n(W, {
|
|
676
676
|
initial: !1,
|
|
677
|
-
children: (t ?? !0) && (l != null ||
|
|
677
|
+
children: (t ?? !0) && (l != null || r != null) ? /* @__PURE__ */ n(E.div, {
|
|
678
678
|
"data-basic-page-alert": "",
|
|
679
679
|
className: "overflow-hidden",
|
|
680
680
|
initial: {
|
|
@@ -690,53 +690,53 @@ function cn({ error: e, show: t, className: a, children: i, ...r }) {
|
|
|
690
690
|
opacity: 0
|
|
691
691
|
},
|
|
692
692
|
transition: c ? { duration: 0 } : {
|
|
693
|
-
height:
|
|
693
|
+
height: T,
|
|
694
694
|
opacity: B
|
|
695
695
|
},
|
|
696
|
-
children: /* @__PURE__ */ n(
|
|
696
|
+
children: /* @__PURE__ */ n(rt, {
|
|
697
697
|
error: l,
|
|
698
|
-
className:
|
|
699
|
-
...
|
|
700
|
-
children:
|
|
698
|
+
className: p("px-5 pb-3", a),
|
|
699
|
+
...i,
|
|
700
|
+
children: r
|
|
701
701
|
})
|
|
702
702
|
}) : null
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
return
|
|
705
|
+
function na() {
|
|
706
|
+
return S(K)?.requestSave ?? null;
|
|
707
707
|
}
|
|
708
|
-
var
|
|
709
|
-
function
|
|
710
|
-
const [s, d] =
|
|
708
|
+
var aa = 800, oe = ut.createToastManager(), K = V(null);
|
|
709
|
+
function dn({ action: e, errors: t, autoSave: a = !1, className: r, children: i, onChange: c, onBlur: o, ...l }) {
|
|
710
|
+
const [s, d] = b(!1), [f, u] = b(!1), [m, g] = b(null), [y, h] = b(t ?? {}), [C, v] = b(null), P = A(null), x = A(null), R = A(null), M = A(!1), O = A(!1), k = A(null), D = A(async () => {
|
|
711
711
|
});
|
|
712
|
-
|
|
712
|
+
I(() => () => {
|
|
713
713
|
x.current != null && clearTimeout(x.current);
|
|
714
714
|
}, []);
|
|
715
715
|
const $ = async () => {
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
716
|
+
const N = P.current;
|
|
717
|
+
if (N == null || e == null) return;
|
|
718
718
|
if (M.current) {
|
|
719
|
-
|
|
719
|
+
O.current = !0;
|
|
720
720
|
return;
|
|
721
721
|
}
|
|
722
|
-
if (!
|
|
723
|
-
const
|
|
724
|
-
M.current = !0,
|
|
722
|
+
if (!N.checkValidity()) return;
|
|
723
|
+
const _ = Object.fromEntries(new FormData(N).entries()), J = R.current;
|
|
724
|
+
M.current = !0, v({
|
|
725
725
|
field: J,
|
|
726
726
|
phase: "saving"
|
|
727
|
-
}),
|
|
727
|
+
}), g(null);
|
|
728
728
|
try {
|
|
729
|
-
const F = (await e(
|
|
729
|
+
const F = (await e(_))?.errors;
|
|
730
730
|
if (F != null && Object.keys(F).length > 0) {
|
|
731
|
-
|
|
731
|
+
h(F), v(null);
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
734
|
-
|
|
734
|
+
h({}), u(!1), v({
|
|
735
735
|
field: J,
|
|
736
736
|
phase: "saved"
|
|
737
|
-
}),
|
|
737
|
+
}), k.current != null && (oe.close(k.current), k.current = null);
|
|
738
738
|
} catch (F) {
|
|
739
|
-
|
|
739
|
+
v(null), g(F), k.current != null && oe.close(k.current), k.current = oe.add({
|
|
740
740
|
type: "error",
|
|
741
741
|
title: "Couldn't save",
|
|
742
742
|
description: F instanceof Error && F.message !== "" ? F.message : "The change is still here — try again.",
|
|
@@ -749,94 +749,94 @@ function un({ action: e, errors: t, autoSave: a = !1, className: i, children: r,
|
|
|
749
749
|
}
|
|
750
750
|
});
|
|
751
751
|
} finally {
|
|
752
|
-
M.current = !1,
|
|
752
|
+
M.current = !1, O.current && (O.current = !1, D.current());
|
|
753
753
|
}
|
|
754
754
|
};
|
|
755
755
|
D.current = $;
|
|
756
|
-
const
|
|
756
|
+
const Y = () => {
|
|
757
757
|
x.current != null && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
758
758
|
x.current = null, D.current();
|
|
759
759
|
}, 800);
|
|
760
|
-
}, U = z(() => a ? (
|
|
761
|
-
|
|
760
|
+
}, U = z(() => a ? (N) => {
|
|
761
|
+
N != null && (R.current = N), u(!0), Y();
|
|
762
762
|
} : null, [a]), H = z(() => ({
|
|
763
763
|
pending: s,
|
|
764
764
|
dirty: f,
|
|
765
765
|
error: m,
|
|
766
|
-
auto:
|
|
766
|
+
auto: C,
|
|
767
767
|
requestSave: U
|
|
768
768
|
}), [
|
|
769
769
|
s,
|
|
770
770
|
f,
|
|
771
771
|
m,
|
|
772
|
-
|
|
772
|
+
C,
|
|
773
773
|
U
|
|
774
774
|
]);
|
|
775
|
-
return /* @__PURE__ */ n(
|
|
775
|
+
return /* @__PURE__ */ n(K.Provider, {
|
|
776
776
|
value: H,
|
|
777
|
-
children: /* @__PURE__ */ n(
|
|
778
|
-
errors:
|
|
779
|
-
onFormSubmit: async (
|
|
777
|
+
children: /* @__PURE__ */ n(pt, {
|
|
778
|
+
errors: y,
|
|
779
|
+
onFormSubmit: async (N) => {
|
|
780
780
|
if (e != null) {
|
|
781
|
-
d(!0),
|
|
781
|
+
d(!0), g(null);
|
|
782
782
|
try {
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
785
|
-
|
|
783
|
+
const _ = (await e(N))?.errors;
|
|
784
|
+
if (_ != null && Object.keys(_).length > 0) {
|
|
785
|
+
h(_);
|
|
786
786
|
return;
|
|
787
787
|
}
|
|
788
|
-
|
|
789
|
-
} catch (
|
|
790
|
-
|
|
788
|
+
h({}), u(!1);
|
|
789
|
+
} catch (_) {
|
|
790
|
+
g(_);
|
|
791
791
|
} finally {
|
|
792
792
|
d(!1);
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
795
|
},
|
|
796
|
-
onChange: (
|
|
797
|
-
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
const { [
|
|
801
|
-
return
|
|
802
|
-
}), a && (
|
|
796
|
+
onChange: (N) => {
|
|
797
|
+
u(!0), g(null);
|
|
798
|
+
const _ = N.target.name;
|
|
799
|
+
_ && _ in y && h((J) => {
|
|
800
|
+
const { [_]: F, ...Je } = J;
|
|
801
|
+
return Je;
|
|
802
|
+
}), a && (_ && (R.current = _), Y()), c?.(N);
|
|
803
803
|
},
|
|
804
|
-
onBlur: (
|
|
805
|
-
a && f && x.current != null && (clearTimeout(x.current), x.current = null, D.current()), o?.(
|
|
804
|
+
onBlur: (N) => {
|
|
805
|
+
a && f && x.current != null && (clearTimeout(x.current), x.current = null, D.current()), o?.(N);
|
|
806
806
|
},
|
|
807
|
-
className:
|
|
807
|
+
className: p("contents [[data-basic-page-stack]>&]:flex [[data-basic-page-stack]>&]:min-w-0 [[data-basic-page-stack]>&]:flex-col", r),
|
|
808
808
|
...l,
|
|
809
|
-
ref: (
|
|
810
|
-
P.current =
|
|
811
|
-
const
|
|
812
|
-
typeof
|
|
809
|
+
ref: (N) => {
|
|
810
|
+
P.current = N;
|
|
811
|
+
const _ = l.ref;
|
|
812
|
+
typeof _ == "function" ? _(N) : _ != null && (_.current = N);
|
|
813
813
|
},
|
|
814
814
|
children: /* @__PURE__ */ n("fieldset", {
|
|
815
815
|
disabled: s,
|
|
816
816
|
"aria-busy": s || void 0,
|
|
817
817
|
className: "contents",
|
|
818
|
-
children:
|
|
818
|
+
children: i
|
|
819
819
|
})
|
|
820
820
|
})
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
-
function
|
|
824
|
-
const
|
|
825
|
-
|
|
823
|
+
function pn({ name: e, className: t, ...a }) {
|
|
824
|
+
const r = S(K), i = L(), c = r?.auto ?? null, o = c != null && (e == null || c.field === e), [l, s] = b(!1), d = o ? c.phase : null;
|
|
825
|
+
I(() => {
|
|
826
826
|
if (d !== "saved") return;
|
|
827
827
|
s(!0);
|
|
828
828
|
const m = setTimeout(() => s(!1), 1800);
|
|
829
829
|
return () => clearTimeout(m);
|
|
830
830
|
}, [d, c]);
|
|
831
|
-
const f = d === "saving" ? "Saving…" : d === "saved" && l ? "Saved" : null,
|
|
831
|
+
const f = d === "saving" ? "Saving…" : d === "saved" && l ? "Saved" : null, u = i ? "blur(0px)" : `blur(${Le}px)`;
|
|
832
832
|
return /* @__PURE__ */ n("span", {
|
|
833
833
|
className: "grid justify-items-end",
|
|
834
|
-
children: /* @__PURE__ */ n(
|
|
834
|
+
children: /* @__PURE__ */ n(W, {
|
|
835
835
|
initial: !1,
|
|
836
|
-
children: f != null && /* @__PURE__ */ n(
|
|
836
|
+
children: f != null && /* @__PURE__ */ n(E.output, {
|
|
837
837
|
initial: {
|
|
838
838
|
opacity: 0,
|
|
839
|
-
filter:
|
|
839
|
+
filter: u
|
|
840
840
|
},
|
|
841
841
|
animate: {
|
|
842
842
|
opacity: 1,
|
|
@@ -844,10 +844,10 @@ function dn({ name: e, className: t, ...a }) {
|
|
|
844
844
|
},
|
|
845
845
|
exit: {
|
|
846
846
|
opacity: 0,
|
|
847
|
-
filter:
|
|
847
|
+
filter: u
|
|
848
848
|
},
|
|
849
849
|
transition: ye,
|
|
850
|
-
className:
|
|
850
|
+
className: p("text-pho-description pl-8 [grid-area:1/1]", t),
|
|
851
851
|
style: { background: "linear-gradient(to left, var(--background-color-pho-primary) calc(100% - 2rem), transparent)" },
|
|
852
852
|
...a,
|
|
853
853
|
children: f
|
|
@@ -855,28 +855,28 @@ function dn({ name: e, className: t, ...a }) {
|
|
|
855
855
|
})
|
|
856
856
|
});
|
|
857
857
|
}
|
|
858
|
-
var
|
|
859
|
-
function
|
|
860
|
-
const a =
|
|
861
|
-
return
|
|
858
|
+
var fn = "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";
|
|
859
|
+
function mn({ className: e, ...t }) {
|
|
860
|
+
const a = A(null);
|
|
861
|
+
return je(a, "Fields", 20, () => null), /* @__PURE__ */ n("div", {
|
|
862
862
|
"data-basic-page-fields": "",
|
|
863
|
-
className:
|
|
863
|
+
className: p(me, fn, e),
|
|
864
864
|
...t,
|
|
865
|
-
ref: (
|
|
866
|
-
a.current =
|
|
867
|
-
const
|
|
868
|
-
typeof
|
|
865
|
+
ref: (r) => {
|
|
866
|
+
a.current = r;
|
|
867
|
+
const i = t.ref;
|
|
868
|
+
typeof i == "function" ? i(r) : i != null && (i.current = r);
|
|
869
869
|
}
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function hn({ className: e, ...t }) {
|
|
873
873
|
return /* @__PURE__ */ n("div", {
|
|
874
|
-
className:
|
|
874
|
+
className: p("flex min-w-0 flex-col gap-5 *:min-w-0 sm:flex-row sm:gap-3 sm:*:flex-1", e),
|
|
875
875
|
...t
|
|
876
876
|
});
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
const a =
|
|
878
|
+
function gn({ children: e = "Save changes", ...t }) {
|
|
879
|
+
const a = S(K);
|
|
880
880
|
return /* @__PURE__ */ n(ae, {
|
|
881
881
|
type: "submit",
|
|
882
882
|
variant: "effect",
|
|
@@ -886,59 +886,59 @@ function hn({ children: e = "Save changes", ...t }) {
|
|
|
886
886
|
children: e
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
const
|
|
889
|
+
function vn({ show: e, className: t, ...a }) {
|
|
890
|
+
const r = S(K), i = e === "dirty" ? r?.dirty ?? !1 : e, c = /* @__PURE__ */ n("div", {
|
|
891
891
|
"data-basic-page-footer": "",
|
|
892
|
-
className:
|
|
892
|
+
className: p("flex items-center justify-end gap-3 pr-[calc(1.25rem+2.5px)]", t),
|
|
893
893
|
...a
|
|
894
894
|
});
|
|
895
|
-
return
|
|
896
|
-
show:
|
|
895
|
+
return i === void 0 ? c : /* @__PURE__ */ n(We, {
|
|
896
|
+
show: i,
|
|
897
897
|
gap: "block",
|
|
898
898
|
clip: !1,
|
|
899
899
|
children: c
|
|
900
900
|
});
|
|
901
901
|
}
|
|
902
|
-
var
|
|
902
|
+
var yn = {
|
|
903
903
|
stack: "-2.5rem",
|
|
904
904
|
block: "-0.75rem",
|
|
905
905
|
fields: "-1.25rem",
|
|
906
906
|
none: "0px"
|
|
907
907
|
};
|
|
908
|
-
function We({ show: e, clip: t = !0, gap: a = "stack", dividers:
|
|
909
|
-
const o =
|
|
910
|
-
|
|
908
|
+
function We({ show: e, clip: t = !0, gap: a = "stack", dividers: r, className: i, ...c }) {
|
|
909
|
+
const o = L(), l = yn[r ? "none" : a], s = A(null), d = A(e !== !0);
|
|
910
|
+
I(() => {
|
|
911
911
|
d.current = !0;
|
|
912
912
|
}, []);
|
|
913
913
|
const f = () => {
|
|
914
914
|
t && s.current && (s.current.style.overflow = "hidden");
|
|
915
|
-
},
|
|
915
|
+
}, u = () => {
|
|
916
916
|
s.current && (s.current.style.overflow = "");
|
|
917
917
|
};
|
|
918
|
-
return e === void 0 ? /* @__PURE__ */ n(
|
|
918
|
+
return e === void 0 ? /* @__PURE__ */ n(E.div, {
|
|
919
919
|
initial: o ? !1 : {
|
|
920
920
|
opacity: 0,
|
|
921
|
-
y:
|
|
921
|
+
y: X
|
|
922
922
|
},
|
|
923
923
|
animate: {
|
|
924
924
|
opacity: 1,
|
|
925
925
|
y: 0
|
|
926
926
|
},
|
|
927
927
|
transition: {
|
|
928
|
-
y:
|
|
928
|
+
y: T,
|
|
929
929
|
opacity: B
|
|
930
930
|
},
|
|
931
|
-
className:
|
|
931
|
+
className: p(r && te, i),
|
|
932
932
|
...c
|
|
933
|
-
}) : /* @__PURE__ */ n(
|
|
933
|
+
}) : /* @__PURE__ */ n(W, {
|
|
934
934
|
initial: !1,
|
|
935
|
-
children: e ? /* @__PURE__ */ n(
|
|
935
|
+
children: e ? /* @__PURE__ */ n(E.div, {
|
|
936
936
|
"data-basic-page-reveal": "",
|
|
937
937
|
ref: (m) => {
|
|
938
938
|
s.current = m, t && m && d.current && (m.style.overflow = "hidden");
|
|
939
939
|
},
|
|
940
940
|
onAnimationStart: f,
|
|
941
|
-
onAnimationComplete:
|
|
941
|
+
onAnimationComplete: u,
|
|
942
942
|
initial: {
|
|
943
943
|
height: 0,
|
|
944
944
|
opacity: 0,
|
|
@@ -955,73 +955,73 @@ function We({ show: e, clip: t = !0, gap: a = "stack", dividers: i, className: r
|
|
|
955
955
|
marginTop: l
|
|
956
956
|
},
|
|
957
957
|
transition: o ? { duration: 0 } : {
|
|
958
|
-
height:
|
|
959
|
-
marginTop:
|
|
958
|
+
height: T,
|
|
959
|
+
marginTop: T,
|
|
960
960
|
opacity: B
|
|
961
961
|
},
|
|
962
|
-
className:
|
|
962
|
+
className: p(r && te, i),
|
|
963
963
|
...c
|
|
964
964
|
}) : null
|
|
965
965
|
});
|
|
966
966
|
}
|
|
967
|
-
var
|
|
968
|
-
function
|
|
969
|
-
return typeof window < "u" && typeof window.matchMedia == "function" && !window.matchMedia(
|
|
967
|
+
var bn = "top-4 left-5 h-8 text-base [&>svg]:size-[1.125em] [&>svg]:shrink-0", xn = "(min-width: 40rem)";
|
|
968
|
+
function wn() {
|
|
969
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && !window.matchMedia(xn).matches;
|
|
970
970
|
}
|
|
971
971
|
var Xe = V(null);
|
|
972
972
|
function Ke({ className: e, children: t, ...a }) {
|
|
973
|
-
const
|
|
974
|
-
|
|
975
|
-
const [o] =
|
|
973
|
+
const r = re.toArray(t).filter(mt), i = r.map((P) => P.props.children ?? null), c = Ge();
|
|
974
|
+
Ht(i);
|
|
975
|
+
const [o] = b(wn), l = L(), s = r.length, d = Oe(), f = !o && s >= Nn, u = S(ge), m = s > 0 ? r[s - 1]?.props : null, g = m?.children ?? "Back", y = m?.href, h = m?.onClick;
|
|
976
976
|
G(() => {
|
|
977
|
-
if (!(
|
|
978
|
-
return
|
|
979
|
-
label:
|
|
980
|
-
href:
|
|
981
|
-
onClick:
|
|
982
|
-
}), () =>
|
|
977
|
+
if (!(u == null || y == null))
|
|
978
|
+
return u.setTail({
|
|
979
|
+
label: g,
|
|
980
|
+
href: y,
|
|
981
|
+
onClick: h
|
|
982
|
+
}), () => u.setTail(null);
|
|
983
983
|
}, [
|
|
984
|
-
|
|
985
|
-
h,
|
|
984
|
+
u,
|
|
986
985
|
g,
|
|
987
|
-
y
|
|
986
|
+
y,
|
|
987
|
+
h
|
|
988
988
|
]);
|
|
989
|
-
const [
|
|
989
|
+
const [C, v] = b(!l && !o && c != null && c.labels.length > s);
|
|
990
990
|
return /* @__PURE__ */ n("nav", {
|
|
991
991
|
"aria-label": "Breadcrumb",
|
|
992
992
|
"data-basic-page-back": "",
|
|
993
|
-
className:
|
|
993
|
+
className: p("absolute top-4 left-3 flex min-w-max items-center", e),
|
|
994
994
|
...a,
|
|
995
|
-
children: /* @__PURE__ */
|
|
995
|
+
children: /* @__PURE__ */ w("ol", {
|
|
996
996
|
className: "m-0 flex list-none items-center p-0",
|
|
997
|
-
children: [
|
|
997
|
+
children: [r.map((P, x) => f && x > 0 && x < s - 2 ? null : /* @__PURE__ */ w(ft, { children: [f && x === s - 2 && /* @__PURE__ */ w("li", {
|
|
998
998
|
className: "m-0 flex items-center max-sm:hidden",
|
|
999
999
|
children: [/* @__PURE__ */ n("span", {
|
|
1000
1000
|
"aria-hidden": !0,
|
|
1001
1001
|
className: ue,
|
|
1002
1002
|
children: ne
|
|
1003
|
-
}), /* @__PURE__ */
|
|
1003
|
+
}), /* @__PURE__ */ w(j.Root, { children: [/* @__PURE__ */ n(j.Trigger, { render: /* @__PURE__ */ n(ae, {
|
|
1004
1004
|
variant: "ghost",
|
|
1005
1005
|
size: "sm",
|
|
1006
1006
|
"aria-label": "Hidden pages",
|
|
1007
1007
|
className: "px-2",
|
|
1008
|
-
children:
|
|
1008
|
+
children: An
|
|
1009
1009
|
}) }), /* @__PURE__ */ n(j.Portal, { children: /* @__PURE__ */ n(j.Positioner, {
|
|
1010
1010
|
align: "start",
|
|
1011
1011
|
sideOffset: 4,
|
|
1012
|
-
children: /* @__PURE__ */ n(j.Popup, { children:
|
|
1013
|
-
const
|
|
1012
|
+
children: /* @__PURE__ */ n(j.Popup, { children: r.slice(1, s - 2).map((R, M) => {
|
|
1013
|
+
const O = R.props;
|
|
1014
1014
|
return /* @__PURE__ */ n(j.LinkItem, {
|
|
1015
1015
|
render: /* @__PURE__ */ n(d, {
|
|
1016
|
-
href:
|
|
1017
|
-
onClick:
|
|
1016
|
+
href: O.href,
|
|
1017
|
+
onClick: O.onClick
|
|
1018
1018
|
}),
|
|
1019
|
-
children:
|
|
1020
|
-
},
|
|
1019
|
+
children: O.children ?? "Back"
|
|
1020
|
+
}, R.key ?? M);
|
|
1021
1021
|
}) })
|
|
1022
1022
|
}) })] })]
|
|
1023
1023
|
}), /* @__PURE__ */ n("li", {
|
|
1024
|
-
className:
|
|
1024
|
+
className: p("m-0 flex items-center", x < s - 1 && "max-sm:hidden"),
|
|
1025
1025
|
children: /* @__PURE__ */ n(Xe.Provider, {
|
|
1026
1026
|
value: {
|
|
1027
1027
|
index: x,
|
|
@@ -1031,14 +1031,14 @@ function Ke({ className: e, children: t, ...a }) {
|
|
|
1031
1031
|
},
|
|
1032
1032
|
children: P
|
|
1033
1033
|
})
|
|
1034
|
-
})] }, P.key ?? x)),
|
|
1034
|
+
})] }, P.key ?? x)), C && /* @__PURE__ */ n("li", {
|
|
1035
1035
|
"aria-hidden": !0,
|
|
1036
1036
|
className: "m-0 flex items-center max-sm:hidden",
|
|
1037
|
-
children: /* @__PURE__ */ n(
|
|
1037
|
+
children: /* @__PURE__ */ n(E.span, {
|
|
1038
1038
|
initial: { opacity: 1 },
|
|
1039
1039
|
animate: { opacity: 0 },
|
|
1040
|
-
transition:
|
|
1041
|
-
onAnimationComplete: () =>
|
|
1040
|
+
transition: Fe,
|
|
1041
|
+
onAnimationComplete: () => v(!1),
|
|
1042
1042
|
className: ue,
|
|
1043
1043
|
children: ne
|
|
1044
1044
|
})
|
|
@@ -1046,18 +1046,18 @@ function Ke({ className: e, children: t, ...a }) {
|
|
|
1046
1046
|
})
|
|
1047
1047
|
});
|
|
1048
1048
|
}
|
|
1049
|
-
var ue = "text-pho-description -mx-1 inline-flex shrink-0 text-base select-none", ne = "/",
|
|
1050
|
-
function
|
|
1051
|
-
const c =
|
|
1049
|
+
var ue = "text-pho-description -mx-1 inline-flex shrink-0 text-base select-none", ne = "/", Nn = 4, An = "…";
|
|
1050
|
+
function Qe({ href: e, className: t, morphId: a, children: r = "Back", ...i }) {
|
|
1051
|
+
const c = S(Xe), o = L(), l = a != null && !o, s = ze(l ? a : void 0);
|
|
1052
1052
|
if (c == null) throw new Error("BasicPage.Crumb must be rendered inside BasicPage.Breadcrumbs");
|
|
1053
|
-
const { index: d, count: f, departing:
|
|
1054
|
-
return /* @__PURE__ */
|
|
1053
|
+
const { index: d, count: f, departing: u, narrow: m } = c, g = d === 0, y = d === f - 1, h = u != null && u.labels.length < f, C = u != null && u.labels.length > f, v = y && (u == null || h || m), P = g || y, x = g && y ? "" : g ? "max-sm:hidden" : "sm:hidden", R = u != null, M = y ? m ? C ? "slide" : "fade" : v ? "fade" : void 0 : void 0, [O, k] = b(l && m && s.fly && u != null && !C ? u.labels[u.labels.length - 1] : null), D = l && P && !R, $ = l && !g && y && (u == null || h);
|
|
1054
|
+
return /* @__PURE__ */ w(Me, { children: [!g && /* @__PURE__ */ n("span", {
|
|
1055
1055
|
"aria-hidden": !0,
|
|
1056
|
-
className:
|
|
1057
|
-
children: $ ? /* @__PURE__ */ n(
|
|
1056
|
+
className: p(ue, "max-sm:hidden"),
|
|
1057
|
+
children: $ ? /* @__PURE__ */ n(E.span, {
|
|
1058
1058
|
initial: s.fly ? {
|
|
1059
1059
|
opacity: 0,
|
|
1060
|
-
x:
|
|
1060
|
+
x: Ce
|
|
1061
1061
|
} : { opacity: 0 },
|
|
1062
1062
|
animate: s.fly ? {
|
|
1063
1063
|
opacity: 1,
|
|
@@ -1071,70 +1071,70 @@ function qe({ href: e, className: t, morphId: a, children: i = "Back", ...r }) {
|
|
|
1071
1071
|
variant: "ghost",
|
|
1072
1072
|
size: "sm",
|
|
1073
1073
|
href: e,
|
|
1074
|
-
prefix: P ? D ? /* @__PURE__ */ n(
|
|
1074
|
+
prefix: P ? D ? /* @__PURE__ */ n(E.span, {
|
|
1075
1075
|
initial: s.fly ? {
|
|
1076
1076
|
opacity: 0,
|
|
1077
|
-
x:
|
|
1077
|
+
x: Ce
|
|
1078
1078
|
} : { opacity: 0 },
|
|
1079
1079
|
animate: s.fly ? {
|
|
1080
1080
|
opacity: 1,
|
|
1081
1081
|
x: 0
|
|
1082
1082
|
} : { opacity: 1 },
|
|
1083
1083
|
transition: s.fly ? _e : B,
|
|
1084
|
-
className:
|
|
1084
|
+
className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", x),
|
|
1085
1085
|
children: /* @__PURE__ */ n(ee, {})
|
|
1086
1086
|
}) : /* @__PURE__ */ n("span", {
|
|
1087
|
-
className:
|
|
1087
|
+
className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", x),
|
|
1088
1088
|
children: /* @__PURE__ */ n(ee, {})
|
|
1089
1089
|
}) : /* @__PURE__ */ n("span", { className: "hidden" }),
|
|
1090
|
-
className:
|
|
1091
|
-
...
|
|
1092
|
-
children: l && a != null ? /* @__PURE__ */
|
|
1093
|
-
className:
|
|
1094
|
-
children: [/* @__PURE__ */ n(
|
|
1090
|
+
className: p("min-w-max", t),
|
|
1091
|
+
...i,
|
|
1092
|
+
children: l && a != null ? /* @__PURE__ */ w("span", {
|
|
1093
|
+
className: p("relative block", !s.fly && M === "slide" && "overflow-hidden", !y && "max-w-40 truncate"),
|
|
1094
|
+
children: [/* @__PURE__ */ n(Ve, {
|
|
1095
1095
|
morphId: a,
|
|
1096
1096
|
fromClassName: "text-pho-primary",
|
|
1097
1097
|
fly: s.fly,
|
|
1098
1098
|
morphRef: s.ref,
|
|
1099
1099
|
arrival: M,
|
|
1100
|
-
children:
|
|
1101
|
-
}),
|
|
1100
|
+
children: r
|
|
1101
|
+
}), O != null && /* @__PURE__ */ n(E.span, {
|
|
1102
1102
|
"aria-hidden": !0,
|
|
1103
1103
|
initial: {
|
|
1104
1104
|
x: 0,
|
|
1105
1105
|
opacity: 1
|
|
1106
1106
|
},
|
|
1107
1107
|
animate: {
|
|
1108
|
-
x:
|
|
1108
|
+
x: Bt,
|
|
1109
1109
|
opacity: 0
|
|
1110
1110
|
},
|
|
1111
|
-
transition:
|
|
1112
|
-
onAnimationComplete: () =>
|
|
1111
|
+
transition: Mt,
|
|
1112
|
+
onAnimationComplete: () => k(null),
|
|
1113
1113
|
className: "pointer-events-none absolute inset-y-0 left-0 whitespace-nowrap",
|
|
1114
|
-
children:
|
|
1114
|
+
children: O
|
|
1115
1115
|
})]
|
|
1116
1116
|
}) : /* @__PURE__ */ n("span", {
|
|
1117
|
-
className:
|
|
1118
|
-
children:
|
|
1117
|
+
className: p("block", !y && "max-w-40 truncate"),
|
|
1118
|
+
children: r
|
|
1119
1119
|
})
|
|
1120
1120
|
})] });
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function En({ className: e, ...t }) {
|
|
1123
1123
|
return /* @__PURE__ */ n(Ke, {
|
|
1124
1124
|
className: e,
|
|
1125
|
-
children: /* @__PURE__ */ n(
|
|
1125
|
+
children: /* @__PURE__ */ n(Qe, { ...t })
|
|
1126
1126
|
});
|
|
1127
1127
|
}
|
|
1128
|
-
function Cn({ label: e, description: t, leading: a, href:
|
|
1129
|
-
const l =
|
|
1130
|
-
return /* @__PURE__ */
|
|
1131
|
-
href:
|
|
1128
|
+
function Cn({ label: e, description: t, leading: a, href: r, className: i, children: c, ...o }) {
|
|
1129
|
+
const l = Oe(), s = z(() => E.create(l), [l]), { leaving: d, ...f } = xe();
|
|
1130
|
+
return /* @__PURE__ */ w(s, {
|
|
1131
|
+
href: r,
|
|
1132
1132
|
...f,
|
|
1133
1133
|
...o,
|
|
1134
|
-
className:
|
|
1135
|
-
children: [/* @__PURE__ */
|
|
1136
|
-
className:
|
|
1137
|
-
children: [a, /* @__PURE__ */
|
|
1134
|
+
className: p("flex min-h-[4.25rem] min-w-0 flex-row items-center justify-between gap-6 px-5 py-4", "group outline-pho-brand hover:bg-pho-primary-hover cursor-pointer transition-colors focus-visible:outline-2 focus-visible:-outline-offset-2", "aria-[current=page]:bg-pho-primary-hover", "first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]", d && "overflow-hidden", i),
|
|
1135
|
+
children: [/* @__PURE__ */ w("div", {
|
|
1136
|
+
className: p("flex min-w-0 flex-1 items-center", a != null && "gap-3"),
|
|
1137
|
+
children: [a, /* @__PURE__ */ w("div", {
|
|
1138
1138
|
className: "min-w-0",
|
|
1139
1139
|
children: [/* @__PURE__ */ n("div", {
|
|
1140
1140
|
className: "flex min-w-0 items-center gap-1",
|
|
@@ -1147,58 +1147,58 @@ function Cn({ label: e, description: t, leading: a, href: i, className: r, child
|
|
|
1147
1147
|
children: t
|
|
1148
1148
|
}) : null]
|
|
1149
1149
|
})]
|
|
1150
|
-
}), /* @__PURE__ */
|
|
1150
|
+
}), /* @__PURE__ */ w("div", {
|
|
1151
1151
|
className: "flex min-w-0 items-center justify-end gap-2",
|
|
1152
1152
|
children: [c != null ? /* @__PURE__ */ n("div", {
|
|
1153
1153
|
className: "min-w-0",
|
|
1154
1154
|
children: c
|
|
1155
|
-
}) : null, /* @__PURE__ */ n(
|
|
1155
|
+
}) : null, /* @__PURE__ */ n(yt, {
|
|
1156
1156
|
"aria-hidden": !0,
|
|
1157
1157
|
className: "text-pho-secondary group-hover:text-pho-secondary-hover size-4 shrink-0 transition-colors"
|
|
1158
1158
|
})]
|
|
1159
1159
|
})]
|
|
1160
1160
|
});
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1163
|
-
const o =
|
|
1162
|
+
function _n({ open: e, variant: t = "overlay", modal: a = !1, placeholder: r, onClose: i, children: c }) {
|
|
1163
|
+
const o = S(De), l = e ?? re.toArray(c).length > 0, s = o?.setOpen, d = o?.setPresent;
|
|
1164
1164
|
return G(() => {
|
|
1165
1165
|
if (d != null)
|
|
1166
1166
|
return d(!0), () => d(!1);
|
|
1167
1167
|
}, [d]), G(() => {
|
|
1168
1168
|
if (s != null)
|
|
1169
1169
|
return s(l), () => s(!1);
|
|
1170
|
-
}, [s, l]),
|
|
1170
|
+
}, [s, l]), I(() => {
|
|
1171
1171
|
o == null && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("BasicPage.Aside: needs a `BasicPage.Root` around it.");
|
|
1172
1172
|
}, [o]), o == null || o.slot == null ? null : o.presentation === "page" ? Ne(l ? /* @__PURE__ */ n("div", {
|
|
1173
1173
|
"data-basic-page-aside": "page",
|
|
1174
1174
|
className: "flex min-w-0 flex-1 flex-col",
|
|
1175
1175
|
children: c
|
|
1176
|
-
}) : null, o.slot) : t === "inline" ? Ne(/* @__PURE__ */ n(
|
|
1176
|
+
}) : null, o.slot) : t === "inline" ? Ne(/* @__PURE__ */ n(Sn, {
|
|
1177
1177
|
width: o.width,
|
|
1178
1178
|
paneHeight: o.paneHeight,
|
|
1179
|
-
onClose:
|
|
1179
|
+
onClose: i,
|
|
1180
1180
|
open: l,
|
|
1181
|
-
placeholder:
|
|
1181
|
+
placeholder: r,
|
|
1182
1182
|
children: c
|
|
1183
1183
|
}), o.slot) : /* @__PURE__ */ n(Rn, {
|
|
1184
1184
|
container: o.slot,
|
|
1185
1185
|
width: o.width,
|
|
1186
1186
|
paneHeight: o.paneHeight,
|
|
1187
|
-
onClose:
|
|
1187
|
+
onClose: i,
|
|
1188
1188
|
open: l,
|
|
1189
1189
|
modal: a,
|
|
1190
1190
|
children: c
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
1193
|
function Ye() {
|
|
1194
|
-
const [e, t] =
|
|
1194
|
+
const [e, t] = b(null), a = z(() => ({ setBack: t }), []), r = A(null);
|
|
1195
1195
|
return {
|
|
1196
1196
|
back: e,
|
|
1197
1197
|
panel: a,
|
|
1198
|
-
closeRef:
|
|
1199
|
-
leave:
|
|
1200
|
-
const
|
|
1201
|
-
return
|
|
1198
|
+
closeRef: r,
|
|
1199
|
+
leave: Be(() => {
|
|
1200
|
+
const i = r.current?.querySelector("a, button");
|
|
1201
|
+
return i == null ? !1 : (i.click(), !0);
|
|
1202
1202
|
}, [])
|
|
1203
1203
|
};
|
|
1204
1204
|
}
|
|
@@ -1207,10 +1207,10 @@ var Pe = {
|
|
|
1207
1207
|
size: "sm",
|
|
1208
1208
|
svgOnly: !0,
|
|
1209
1209
|
"aria-label": "Close",
|
|
1210
|
-
children: /* @__PURE__ */ n(
|
|
1210
|
+
children: /* @__PURE__ */ n(ct, {})
|
|
1211
1211
|
};
|
|
1212
|
-
function
|
|
1213
|
-
return /* @__PURE__ */
|
|
1212
|
+
function Ue({ back: e, onClose: t, closeRef: a, panel: r, children: i }) {
|
|
1213
|
+
return /* @__PURE__ */ w(Me, { children: [/* @__PURE__ */ n("span", {
|
|
1214
1214
|
ref: a,
|
|
1215
1215
|
className: "absolute top-2 right-2 z-30",
|
|
1216
1216
|
children: e != null ? /* @__PURE__ */ n(de, {
|
|
@@ -1221,29 +1221,29 @@ function Qe({ back: e, onClose: t, closeRef: a, panel: i, children: r }) {
|
|
|
1221
1221
|
...Pe,
|
|
1222
1222
|
onClick: t
|
|
1223
1223
|
}) : null
|
|
1224
|
-
}), /* @__PURE__ */
|
|
1224
|
+
}), /* @__PURE__ */ w(Q.Root, {
|
|
1225
1225
|
className: "min-h-0 flex-1",
|
|
1226
|
-
children: [/* @__PURE__ */ n(
|
|
1226
|
+
children: [/* @__PURE__ */ n(Q.Viewport, { children: /* @__PURE__ */ n(Q.Content, {
|
|
1227
1227
|
className: "flex min-h-full flex-col",
|
|
1228
|
-
children: /* @__PURE__ */ n(
|
|
1229
|
-
value:
|
|
1230
|
-
children:
|
|
1228
|
+
children: /* @__PURE__ */ n(He.Provider, {
|
|
1229
|
+
value: r,
|
|
1230
|
+
children: i
|
|
1231
1231
|
})
|
|
1232
|
-
}) }), /* @__PURE__ */ n(
|
|
1232
|
+
}) }), /* @__PURE__ */ n(Q.Scrollbar, { children: /* @__PURE__ */ n(Q.Thumb, {}) })]
|
|
1233
1233
|
})] });
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const o =
|
|
1237
|
-
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1235
|
+
function Sn({ width: e, paneHeight: t, onClose: a, open: r, placeholder: i, children: c }) {
|
|
1236
|
+
const o = L(), { back: l, panel: s, closeRef: d, leave: f } = Ye(), u = o ? "blur(0px)" : `blur(${Le}px)`, m = t ?? "100dvh";
|
|
1237
|
+
I(() => {
|
|
1238
|
+
const y = (h) => {
|
|
1239
|
+
h.key !== "Escape" || h.defaultPrevented || f() && h.preventDefault();
|
|
1240
1240
|
};
|
|
1241
|
-
return document.addEventListener("keydown",
|
|
1241
|
+
return document.addEventListener("keydown", y), () => document.removeEventListener("keydown", y);
|
|
1242
1242
|
}, [f]);
|
|
1243
|
-
const
|
|
1243
|
+
const g = {
|
|
1244
1244
|
initial: {
|
|
1245
1245
|
opacity: 0,
|
|
1246
|
-
filter:
|
|
1246
|
+
filter: u
|
|
1247
1247
|
},
|
|
1248
1248
|
animate: {
|
|
1249
1249
|
opacity: 1,
|
|
@@ -1251,7 +1251,7 @@ function _n({ width: e, paneHeight: t, onClose: a, open: i, placeholder: r, chil
|
|
|
1251
1251
|
},
|
|
1252
1252
|
exit: {
|
|
1253
1253
|
opacity: 0,
|
|
1254
|
-
filter:
|
|
1254
|
+
filter: u
|
|
1255
1255
|
},
|
|
1256
1256
|
transition: o ? { duration: 0 } : ye
|
|
1257
1257
|
};
|
|
@@ -1266,56 +1266,56 @@ function _n({ width: e, paneHeight: t, onClose: a, open: i, placeholder: r, chil
|
|
|
1266
1266
|
children: /* @__PURE__ */ n("div", {
|
|
1267
1267
|
className: "border-pho-secondary bg-pho-primary sticky top-0 grid border-l *:min-h-0 *:[grid-area:1/1]",
|
|
1268
1268
|
style: { height: m },
|
|
1269
|
-
children: /* @__PURE__ */ n(
|
|
1269
|
+
children: /* @__PURE__ */ n(W, {
|
|
1270
1270
|
initial: !1,
|
|
1271
|
-
children:
|
|
1272
|
-
...
|
|
1271
|
+
children: r ? /* @__PURE__ */ n(E.div, {
|
|
1272
|
+
...g,
|
|
1273
1273
|
className: "relative flex flex-col",
|
|
1274
|
-
children: /* @__PURE__ */ n(
|
|
1274
|
+
children: /* @__PURE__ */ n(Ue, {
|
|
1275
1275
|
back: l,
|
|
1276
1276
|
onClose: a,
|
|
1277
1277
|
closeRef: d,
|
|
1278
1278
|
panel: s,
|
|
1279
1279
|
children: c
|
|
1280
1280
|
})
|
|
1281
|
-
}, "page") : /* @__PURE__ */ n(
|
|
1282
|
-
...
|
|
1281
|
+
}, "page") : /* @__PURE__ */ n(E.div, {
|
|
1282
|
+
...g,
|
|
1283
1283
|
className: "flex flex-col",
|
|
1284
|
-
children:
|
|
1284
|
+
children: i
|
|
1285
1285
|
}, "empty")
|
|
1286
1286
|
})
|
|
1287
1287
|
})
|
|
1288
1288
|
});
|
|
1289
1289
|
}
|
|
1290
|
-
function Rn({ container: e, width: t, paneHeight: a, onClose:
|
|
1291
|
-
const { back: l, panel: s, closeRef: d, leave: f } = Ye(),
|
|
1290
|
+
function Rn({ container: e, width: t, paneHeight: a, onClose: r, open: i, modal: c, children: o }) {
|
|
1291
|
+
const { back: l, panel: s, closeRef: d, leave: f } = Ye(), u = a ?? "100dvh";
|
|
1292
1292
|
return /* @__PURE__ */ n(Z.Root, {
|
|
1293
|
-
open:
|
|
1293
|
+
open: i,
|
|
1294
1294
|
modal: c ? "trap-focus" : !1,
|
|
1295
1295
|
disablePointerDismissal: !0,
|
|
1296
|
-
onOpenChange: (m,
|
|
1297
|
-
m || (
|
|
1296
|
+
onOpenChange: (m, g) => {
|
|
1297
|
+
m || (g.cancel(), f());
|
|
1298
1298
|
},
|
|
1299
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ w(Z.Portal, {
|
|
1300
1300
|
container: e,
|
|
1301
1301
|
className: "contents",
|
|
1302
1302
|
children: [c ? /* @__PURE__ */ n(Z.Backdrop, {
|
|
1303
1303
|
"data-basic-page-aside-backdrop": "",
|
|
1304
|
-
className:
|
|
1304
|
+
className: p("bg-pho-overlay absolute inset-0 z-30 transition-opacity duration-200 ease-out motion-reduce:transition-none", "data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"),
|
|
1305
1305
|
onClick: f
|
|
1306
1306
|
}) : null, /* @__PURE__ */ n(Z.Popup, {
|
|
1307
1307
|
"data-basic-page-aside": "panel",
|
|
1308
1308
|
"data-basic-page-aside-variant": "overlay",
|
|
1309
1309
|
initialFocus: c ? void 0 : !1,
|
|
1310
1310
|
finalFocus: c ? void 0 : !1,
|
|
1311
|
-
className:
|
|
1311
|
+
className: p("absolute inset-y-0 right-0 z-30 flex 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"),
|
|
1312
1312
|
style: { width: t },
|
|
1313
1313
|
children: /* @__PURE__ */ n("div", {
|
|
1314
1314
|
className: "border-pho-secondary bg-pho-primary shadow-pho-xl sticky top-0 flex flex-col border-l",
|
|
1315
|
-
style: { height:
|
|
1316
|
-
children: /* @__PURE__ */ n(
|
|
1315
|
+
style: { height: u },
|
|
1316
|
+
children: /* @__PURE__ */ n(Ue, {
|
|
1317
1317
|
back: l,
|
|
1318
|
-
onClose:
|
|
1318
|
+
onClose: r,
|
|
1319
1319
|
closeRef: d,
|
|
1320
1320
|
panel: s,
|
|
1321
1321
|
children: o
|
|
@@ -1325,125 +1325,142 @@ function Rn({ container: e, width: t, paneHeight: a, onClose: i, open: r, modal:
|
|
|
1325
1325
|
})
|
|
1326
1326
|
});
|
|
1327
1327
|
}
|
|
1328
|
-
var
|
|
1329
|
-
function
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
if (
|
|
1333
|
-
return
|
|
1334
|
-
}, [
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
c
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
|
|
1328
|
+
var kn = "14rem", Tn = "transition-[width] duration-[330ms] ease-pho-spring motion-reduce:transition-none", Ie = "transition-[opacity,visibility] duration-200 ease-out motion-reduce:transition-none";
|
|
1329
|
+
function Pn({ variant: e = "box", fold: t = "auto", value: a, onValueChange: r, placeholder: i, label: c, className: o, ...l }) {
|
|
1330
|
+
const s = S(pe), d = fe(s?.subscribe ?? ve, () => s?.get().api ?? null, () => null), f = a != null;
|
|
1331
|
+
I(() => {
|
|
1332
|
+
if (!(s == null || f))
|
|
1333
|
+
return s.adopt(!0), () => s.adopt(!1);
|
|
1334
|
+
}, [s, f]);
|
|
1335
|
+
const u = f ? {
|
|
1336
|
+
query: a,
|
|
1337
|
+
setQuery: r,
|
|
1338
|
+
placeholder: i ?? "Search",
|
|
1339
|
+
label: c ?? i ?? "Search"
|
|
1340
|
+
} : d == null ? null : {
|
|
1341
|
+
query: d.query,
|
|
1342
|
+
setQuery: d.setQuery,
|
|
1343
|
+
placeholder: d.placeholder,
|
|
1344
|
+
label: c ?? d.placeholder
|
|
1345
|
+
}, [m, g] = b(!1), y = A(null), h = m || (u?.query ?? "") !== "";
|
|
1346
|
+
if (I(() => {
|
|
1347
|
+
if (!m) return;
|
|
1348
|
+
let v = 0, P = 0;
|
|
1349
|
+
const x = () => {
|
|
1350
|
+
const R = y.current;
|
|
1351
|
+
R != null && (R.focus(), document.activeElement !== R && P++ < 5 && (v = requestAnimationFrame(x)));
|
|
1352
|
+
};
|
|
1353
|
+
return v = requestAnimationFrame(x), () => cancelAnimationFrame(v);
|
|
1354
|
+
}, [m]), e === "ghost") return /* @__PURE__ */ n("div", {
|
|
1343
1355
|
"data-basic-page-search": "",
|
|
1344
1356
|
"data-variant": "ghost",
|
|
1345
|
-
className:
|
|
1346
|
-
...
|
|
1347
|
-
children:
|
|
1348
|
-
value:
|
|
1349
|
-
onChange:
|
|
1350
|
-
placeholder:
|
|
1351
|
-
"aria-label":
|
|
1352
|
-
onKeyDown: (
|
|
1353
|
-
|
|
1357
|
+
className: p("flex min-w-0 flex-1", u == null && "hidden", o),
|
|
1358
|
+
...l,
|
|
1359
|
+
children: u != null && /* @__PURE__ */ n(lt, {
|
|
1360
|
+
value: u.query,
|
|
1361
|
+
onChange: u.setQuery,
|
|
1362
|
+
placeholder: u.placeholder,
|
|
1363
|
+
"aria-label": u.label,
|
|
1364
|
+
onKeyDown: (v) => {
|
|
1365
|
+
v.key === "Escape" && (v.preventDefault(), u.setQuery(""), v.currentTarget.blur());
|
|
1354
1366
|
}
|
|
1355
1367
|
})
|
|
1356
|
-
})
|
|
1368
|
+
});
|
|
1369
|
+
const C = t === "auto";
|
|
1370
|
+
return /* @__PURE__ */ n("div", {
|
|
1357
1371
|
"data-basic-page-search": "",
|
|
1358
|
-
"data-expanded":
|
|
1359
|
-
className:
|
|
1360
|
-
...
|
|
1361
|
-
children:
|
|
1362
|
-
className:
|
|
1363
|
-
style:
|
|
1372
|
+
"data-expanded": h || void 0,
|
|
1373
|
+
className: p("grid min-w-0 content-center", "[[data-basic-page-header]>&]:col-start-2 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:justify-items-end [[data-basic-page-header]>&]:self-center", "[[data-basic-page-header]:has([data-basic-page-header-action])>&]:self-start", u == null && "hidden", o),
|
|
1374
|
+
...l,
|
|
1375
|
+
children: u != null && /* @__PURE__ */ w("div", {
|
|
1376
|
+
className: p("grid w-9 max-w-full justify-items-end *:[grid-area:1/1]", Tn, C && "@[36rem]:w-56"),
|
|
1377
|
+
style: h ? { width: kn } : void 0,
|
|
1364
1378
|
children: [/* @__PURE__ */ n(ae, {
|
|
1365
1379
|
variant: "outlined",
|
|
1366
1380
|
size: "sm",
|
|
1367
1381
|
shape: "circle",
|
|
1368
1382
|
svgOnly: !0,
|
|
1369
|
-
"aria-label":
|
|
1370
|
-
|
|
1371
|
-
|
|
1383
|
+
"aria-label": u.label,
|
|
1384
|
+
"aria-hidden": h || void 0,
|
|
1385
|
+
tabIndex: h ? -1 : void 0,
|
|
1386
|
+
onClick: () => g(!0),
|
|
1387
|
+
className: p(Ie, h ? "pointer-events-none invisible opacity-0" : "visible opacity-100", C && "@[36rem]:pointer-events-none @[36rem]:invisible @[36rem]:opacity-0"),
|
|
1372
1388
|
children: /* @__PURE__ */ n(we, {})
|
|
1373
1389
|
}), /* @__PURE__ */ n("div", {
|
|
1374
|
-
|
|
1375
|
-
|
|
1390
|
+
inert: !C && !h,
|
|
1391
|
+
className: p("w-full min-w-0", Ie, h ? "visible opacity-100" : "pointer-events-none invisible opacity-0", C && "@[36rem]:pointer-events-auto @[36rem]:visible @[36rem]:opacity-100"),
|
|
1392
|
+
children: /* @__PURE__ */ w(se.Root, {
|
|
1376
1393
|
size: "sm",
|
|
1377
1394
|
className: "w-full",
|
|
1378
1395
|
children: [/* @__PURE__ */ n(se.Addon, { children: /* @__PURE__ */ n(we, {}) }), /* @__PURE__ */ n(se.Input, {
|
|
1379
|
-
ref:
|
|
1396
|
+
ref: y,
|
|
1380
1397
|
type: "search",
|
|
1381
|
-
value:
|
|
1382
|
-
onChange: (
|
|
1398
|
+
value: u.query,
|
|
1399
|
+
onChange: (v) => u.setQuery(v.target.value),
|
|
1383
1400
|
onBlur: () => {
|
|
1384
|
-
|
|
1401
|
+
u.query === "" && g(!1);
|
|
1385
1402
|
},
|
|
1386
|
-
onKeyDown: (
|
|
1387
|
-
|
|
1403
|
+
onKeyDown: (v) => {
|
|
1404
|
+
v.key === "Escape" && (v.preventDefault(), u.setQuery(""), g(!1), v.currentTarget.blur());
|
|
1388
1405
|
},
|
|
1389
|
-
placeholder:
|
|
1390
|
-
"aria-label":
|
|
1406
|
+
placeholder: u.placeholder,
|
|
1407
|
+
"aria-label": u.label
|
|
1391
1408
|
})]
|
|
1392
1409
|
})
|
|
1393
1410
|
})]
|
|
1394
1411
|
})
|
|
1395
1412
|
});
|
|
1396
1413
|
}
|
|
1397
|
-
var
|
|
1414
|
+
var ra = {
|
|
1398
1415
|
Root: Rt,
|
|
1399
|
-
Aside:
|
|
1400
|
-
Search:
|
|
1401
|
-
Table:
|
|
1402
|
-
CondenseScope:
|
|
1416
|
+
Aside: _n,
|
|
1417
|
+
Search: Pn,
|
|
1418
|
+
Table: st,
|
|
1419
|
+
CondenseScope: Ft,
|
|
1403
1420
|
Breadcrumbs: Ke,
|
|
1404
|
-
Crumb:
|
|
1405
|
-
Back:
|
|
1406
|
-
Title:
|
|
1407
|
-
Stack:
|
|
1421
|
+
Crumb: Qe,
|
|
1422
|
+
Back: En,
|
|
1423
|
+
Title: jt,
|
|
1424
|
+
Stack: Qt,
|
|
1408
1425
|
Header: Yt,
|
|
1409
|
-
HeaderAction:
|
|
1410
|
-
SectionTitle:
|
|
1411
|
-
Description:
|
|
1412
|
-
TableCount:
|
|
1413
|
-
SectionFooter:
|
|
1414
|
-
Card:
|
|
1415
|
-
Item:
|
|
1416
|
-
ItemPanel:
|
|
1417
|
-
Callout:
|
|
1418
|
-
CalloutTitle:
|
|
1419
|
-
CalloutDescription:
|
|
1420
|
-
Row:
|
|
1426
|
+
HeaderAction: Ut,
|
|
1427
|
+
SectionTitle: Jt,
|
|
1428
|
+
Description: qe,
|
|
1429
|
+
TableCount: Zt,
|
|
1430
|
+
SectionFooter: en,
|
|
1431
|
+
Card: tn,
|
|
1432
|
+
Item: nn,
|
|
1433
|
+
ItemPanel: an,
|
|
1434
|
+
Callout: rn,
|
|
1435
|
+
CalloutTitle: sn,
|
|
1436
|
+
CalloutDescription: ln,
|
|
1437
|
+
Row: on,
|
|
1421
1438
|
RowLink: Cn,
|
|
1422
|
-
Value:
|
|
1423
|
-
Alert:
|
|
1424
|
-
Footer:
|
|
1425
|
-
Form:
|
|
1426
|
-
Saved:
|
|
1427
|
-
Fields:
|
|
1428
|
-
Inline:
|
|
1429
|
-
Submit:
|
|
1439
|
+
Value: cn,
|
|
1440
|
+
Alert: un,
|
|
1441
|
+
Footer: vn,
|
|
1442
|
+
Form: dn,
|
|
1443
|
+
Saved: pn,
|
|
1444
|
+
Fields: mn,
|
|
1445
|
+
Inline: hn,
|
|
1446
|
+
Submit: gn,
|
|
1430
1447
|
Reveal: We
|
|
1431
1448
|
};
|
|
1432
1449
|
export {
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1450
|
+
Nt as a,
|
|
1451
|
+
ra as c,
|
|
1452
|
+
Gt as d,
|
|
1436
1453
|
oe as f,
|
|
1437
|
-
|
|
1454
|
+
wt as i,
|
|
1438
1455
|
ye as l,
|
|
1439
|
-
|
|
1456
|
+
ta as m,
|
|
1440
1457
|
Ae as n,
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1458
|
+
At as o,
|
|
1459
|
+
na as p,
|
|
1460
|
+
bt as r,
|
|
1461
|
+
xt as s,
|
|
1462
|
+
aa as t,
|
|
1463
|
+
Re as u
|
|
1447
1464
|
};
|
|
1448
1465
|
|
|
1449
|
-
//# sourceMappingURL=basic-page-
|
|
1466
|
+
//# sourceMappingURL=basic-page-B3iBvhbz.js.map
|