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