@photon-ai/pho-ui 4.18.5 → 4.19.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/IconAlertTriangleFilled-QV-gsVQW.js +11 -0
- package/dist/chunks/IconAlertTriangleFilled-QV-gsVQW.js.map +1 -0
- package/dist/chunks/{basic-page-BKvtEQkZ.js → basic-page-Cp7CccNN.js} +3 -3
- package/dist/chunks/{basic-page-BKvtEQkZ.js.map → basic-page-Cp7CccNN.js.map} +1 -1
- package/dist/chunks/{dialog-CCfeyQBG.js → dialog-DORIrfyJ.js} +101 -100
- package/dist/chunks/dialog-DORIrfyJ.js.map +1 -0
- package/dist/chunks/{error-yAVi4cBu.js → error-BObcQClz.js} +86 -68
- package/dist/chunks/error-BObcQClz.js.map +1 -0
- package/dist/chunks/{toast-DrLKzrDJ.js → toast-B3oURNJC.js} +33 -35
- package/dist/chunks/toast-B3oURNJC.js.map +1 -0
- package/dist/components/command.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/error.js +11 -10
- package/dist/components/toast.js +1 -1
- package/dist/index.js +151 -150
- package/dist/sections/basic-page.js +1 -1
- package/dist/src/components/dialog/dialog.d.ts +2 -0
- package/dist/src/components/error/error.d.ts +21 -0
- package/package.json +1 -1
- package/dist/chunks/dialog-CCfeyQBG.js.map +0 -1
- package/dist/chunks/error-yAVi4cBu.js.map +0 -1
- package/dist/chunks/toast-DrLKzrDJ.js.map +0 -1
|
@@ -1,121 +1,122 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as
|
|
2
|
+
import { t as u } from "./cn-CPbhpG1q.js";
|
|
3
|
+
import { a as V } from "./button-CLfWdqm-.js";
|
|
4
4
|
import { t as P } from "./close-button-Ck4rY1Fp.js";
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { createContext as F, useCallback as
|
|
8
|
-
import { jsx as e, jsxs as
|
|
9
|
-
import { Dialog as
|
|
5
|
+
import { t as E } from "./animated-height-zr7BmFY1.js";
|
|
6
|
+
import { t as f } from "./scroll-area-Dhl5hqay.js";
|
|
7
|
+
import { createContext as F, useCallback as L, useContext as j, useEffect as R, useMemo as M, useRef as C, useState as A } from "react";
|
|
8
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
9
|
+
import { Dialog as h } from "@base-ui/react/dialog";
|
|
10
10
|
var w = F(null);
|
|
11
|
-
function
|
|
11
|
+
function le() {
|
|
12
12
|
return j(w)?.pending ?? !1;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const [r,
|
|
16
|
-
|
|
14
|
+
function W({ onOpenChange: t, actionsRef: n, ...o }) {
|
|
15
|
+
const [r, l] = A(!1), i = C(!1), a = C(null);
|
|
16
|
+
R(() => {
|
|
17
17
|
if (n)
|
|
18
|
-
return n.current =
|
|
18
|
+
return n.current = a.current, () => {
|
|
19
19
|
n.current = null;
|
|
20
20
|
};
|
|
21
21
|
}, [n]);
|
|
22
|
-
const d =
|
|
23
|
-
if (!
|
|
22
|
+
const d = L((p, g) => {
|
|
23
|
+
if (!p && i.current) {
|
|
24
24
|
g.cancel();
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
t?.(
|
|
27
|
+
t?.(p, g);
|
|
28
28
|
}, [t]), c = M(() => ({
|
|
29
29
|
pending: r,
|
|
30
30
|
beginPending: () => {
|
|
31
|
-
i.current = !0,
|
|
31
|
+
i.current = !0, l(!0);
|
|
32
32
|
},
|
|
33
33
|
endPending: () => {
|
|
34
|
-
i.current = !1,
|
|
34
|
+
i.current = !1, l(!1);
|
|
35
35
|
},
|
|
36
|
-
close: () =>
|
|
36
|
+
close: () => a.current?.close()
|
|
37
37
|
}), [r]);
|
|
38
38
|
return /* @__PURE__ */ e(w.Provider, {
|
|
39
39
|
value: c,
|
|
40
|
-
children: /* @__PURE__ */ e(
|
|
41
|
-
actionsRef:
|
|
40
|
+
children: /* @__PURE__ */ e(h.Root, {
|
|
41
|
+
actionsRef: a,
|
|
42
42
|
onOpenChange: d,
|
|
43
|
-
...
|
|
43
|
+
...o
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
47
|
+
var $ = h.Trigger, x = h.Portal, y = h.Close;
|
|
48
|
+
function G(t) {
|
|
49
49
|
return t != null && typeof t.then == "function";
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
|
|
51
|
+
function J({ onClick: t, loading: n, disabled: o, ...r }) {
|
|
52
|
+
const l = j(w), [i, a] = A(!1), d = C(!0);
|
|
53
|
+
R(() => (d.current = !0, () => {
|
|
54
54
|
d.current = !1;
|
|
55
55
|
}), []);
|
|
56
56
|
function c(g) {
|
|
57
57
|
if (i || n) return;
|
|
58
58
|
const m = t?.(g);
|
|
59
|
-
if (!
|
|
60
|
-
|
|
59
|
+
if (!G(m)) {
|
|
60
|
+
l?.close();
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
a(!0), l?.beginPending(), m.then(() => {
|
|
64
|
+
l?.endPending(), d.current && a(!1), l?.close();
|
|
65
65
|
}, (v) => {
|
|
66
|
-
|
|
66
|
+
l?.endPending(), d.current && a(!1), typeof process < "u" && process.env.NODE_ENV !== "production" && console.error("Dialog.Action: async onClick rejected —", v);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
return /* @__PURE__ */ e(
|
|
69
|
+
const p = i || n;
|
|
70
|
+
return /* @__PURE__ */ e(V, {
|
|
71
71
|
...r,
|
|
72
|
-
disabled:
|
|
73
|
-
loading:
|
|
72
|
+
disabled: o || p,
|
|
73
|
+
loading: p,
|
|
74
74
|
onClick: c
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
function z({ className: t, ...n }) {
|
|
78
|
-
return /* @__PURE__ */ e(
|
|
79
|
-
className:
|
|
78
|
+
return /* @__PURE__ */ e(h.Backdrop, {
|
|
79
|
+
className: u("bg-pho-overlay fixed inset-0 z-50 transition-opacity duration-200 ease-out", "data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0", t),
|
|
80
80
|
...n
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
return /* @__PURE__ */ e(
|
|
85
|
-
className:
|
|
83
|
+
function S({ className: t, ...n }) {
|
|
84
|
+
return /* @__PURE__ */ e(h.Popup, {
|
|
85
|
+
className: u("border-pho-secondary bg-pho-primary shadow-pho-xl fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-lg border outline-none", "flex max-h-[calc(100dvh-2rem)] flex-col sm:max-h-[calc(100dvh-4rem)]", "transition-[opacity,scale] duration-200 ease-out", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-150", t),
|
|
86
86
|
...n
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
function N({ className: t, ...n }) {
|
|
90
|
-
return /* @__PURE__ */ e(
|
|
91
|
-
className:
|
|
90
|
+
return /* @__PURE__ */ e(h.Title, {
|
|
91
|
+
className: u("text-pho-primary font-display text-display-sm font-medium text-balance", t),
|
|
92
92
|
...n
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
function b({ className: t, ...n }) {
|
|
96
|
-
return /* @__PURE__ */ e(
|
|
97
|
-
className:
|
|
96
|
+
return /* @__PURE__ */ e(h.Description, {
|
|
97
|
+
className: u("text-pho-description text-display-xs font-normal", t),
|
|
98
98
|
...n
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
function B({ children: t, size: n = "md" }) {
|
|
102
102
|
return /* @__PURE__ */ e("span", {
|
|
103
103
|
"aria-hidden": !0,
|
|
104
|
-
className:
|
|
104
|
+
className: u("text-pho-secondary mb-1", n === "lg" ? "[&>svg]:size-12" : "[&>svg]:size-8"),
|
|
105
105
|
children: t
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
var k = "[&:has(>:nth-child(3))>:first-child]:me-auto";
|
|
109
|
+
function K({ icon: t, title: n, description: o, consequences: r, warning: l, actions: i, caption: a, showClose: d = !0, children: c, className: p, ...g }) {
|
|
110
|
+
const m = i == null && d, v = !!(t || n || o || m), T = r != null && r.length > 0, D = T || l != null || c != null;
|
|
111
|
+
return /* @__PURE__ */ s(x, { children: [/* @__PURE__ */ e(z, {}), /* @__PURE__ */ s(S, {
|
|
112
|
+
className: p,
|
|
112
113
|
...g,
|
|
113
114
|
children: [
|
|
114
|
-
v && /* @__PURE__ */
|
|
115
|
+
v && /* @__PURE__ */ s("div", {
|
|
115
116
|
className: "flex shrink-0 flex-col gap-1 px-6 pt-6",
|
|
116
117
|
children: [
|
|
117
118
|
t && /* @__PURE__ */ e(B, { children: t }),
|
|
118
|
-
(n || m) && /* @__PURE__ */
|
|
119
|
+
(n || m) && /* @__PURE__ */ s("div", {
|
|
119
120
|
className: "relative",
|
|
120
121
|
children: [n ? /* @__PURE__ */ e(N, {
|
|
121
122
|
className: m ? "pr-12" : void 0,
|
|
@@ -125,57 +126,57 @@ function L({ icon: t, title: n, description: s, consequences: r, warning: a, act
|
|
|
125
126
|
"aria-hidden": "true"
|
|
126
127
|
}), m && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "absolute top-1/2 right-0 z-10 -translate-y-1/2" }) })]
|
|
127
128
|
}),
|
|
128
|
-
|
|
129
|
+
o && /* @__PURE__ */ e(b, { children: o })
|
|
129
130
|
]
|
|
130
131
|
}),
|
|
131
|
-
D && /* @__PURE__ */
|
|
132
|
+
D && /* @__PURE__ */ s(f.Root, {
|
|
132
133
|
className: "min-h-0 flex-1",
|
|
133
|
-
children: [/* @__PURE__ */ e(
|
|
134
|
+
children: [/* @__PURE__ */ e(f.Viewport, { children: /* @__PURE__ */ s(f.Content, {
|
|
134
135
|
className: "flex flex-col gap-5 px-6 py-5",
|
|
135
136
|
children: [
|
|
136
|
-
|
|
137
|
+
T && /* @__PURE__ */ e("ul", {
|
|
137
138
|
className: "text-pho-description text-md [&_strong]:text-pho-secondary space-y-1 [&_strong]:font-medium",
|
|
138
|
-
children: r.map((
|
|
139
|
+
children: r.map((_, O) => /* @__PURE__ */ e("li", {
|
|
139
140
|
className: "relative pl-4 before:absolute before:top-2.5 before:left-1 before:size-1 before:rounded-full before:bg-current",
|
|
140
|
-
children:
|
|
141
|
-
},
|
|
141
|
+
children: _
|
|
142
|
+
}, O))
|
|
142
143
|
}),
|
|
143
|
-
|
|
144
|
+
l != null && /* @__PURE__ */ e("p", {
|
|
144
145
|
className: "text-pho-error text-display-xs font-medium",
|
|
145
|
-
children:
|
|
146
|
+
children: l
|
|
146
147
|
}),
|
|
147
148
|
c
|
|
148
149
|
]
|
|
149
|
-
}) }), /* @__PURE__ */ e(
|
|
150
|
+
}) }), /* @__PURE__ */ e(f.Scrollbar, { children: /* @__PURE__ */ e(f.Thumb, {}) })]
|
|
150
151
|
}),
|
|
151
|
-
(i != null ||
|
|
152
|
-
className:
|
|
153
|
-
children: [
|
|
152
|
+
(i != null || a != null) && /* @__PURE__ */ s("div", {
|
|
153
|
+
className: u("flex shrink-0 flex-wrap items-center justify-end gap-x-2 gap-y-3 px-6 pb-5", a == null && k, !D && "pt-5"),
|
|
154
|
+
children: [a != null && /* @__PURE__ */ e("p", {
|
|
154
155
|
"data-dialog-caption": "",
|
|
155
156
|
className: "text-pho-description min-w-48 flex-1 pr-2 text-xs",
|
|
156
|
-
children:
|
|
157
|
+
children: a
|
|
157
158
|
}), i]
|
|
158
159
|
})
|
|
159
160
|
]
|
|
160
161
|
})] });
|
|
161
162
|
}
|
|
162
163
|
function H({ className: t, ...n }) {
|
|
163
|
-
return /* @__PURE__ */ e(
|
|
164
|
-
className:
|
|
164
|
+
return /* @__PURE__ */ e(h.Popup, {
|
|
165
|
+
className: u("border-pho-secondary bg-pho-primary shadow-pho-xl fixed inset-4 z-50 flex flex-col overflow-hidden rounded-lg border outline-none sm:inset-8", "transition-[opacity,scale] duration-200 ease-out", "data-[starting-style]:scale-[0.98] data-[starting-style]:opacity-0", "data-[ending-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[ending-style]:duration-150", t),
|
|
165
166
|
...n
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
|
-
function Q({ icon: t, title: n, description:
|
|
169
|
-
const c = r == null &&
|
|
170
|
-
return /* @__PURE__ */
|
|
171
|
-
className:
|
|
169
|
+
function Q({ icon: t, title: n, description: o, actions: r, showClose: l = !0, children: i, className: a, ...d }) {
|
|
170
|
+
const c = r == null && l;
|
|
171
|
+
return /* @__PURE__ */ s(x, { children: [/* @__PURE__ */ e(z, {}), /* @__PURE__ */ s(H, {
|
|
172
|
+
className: a,
|
|
172
173
|
...d,
|
|
173
174
|
children: [
|
|
174
|
-
!!(t || n ||
|
|
175
|
+
!!(t || n || o || c) && /* @__PURE__ */ s("div", {
|
|
175
176
|
className: "flex shrink-0 flex-col gap-1 px-6 pt-6",
|
|
176
177
|
children: [
|
|
177
178
|
t && /* @__PURE__ */ e(B, { children: t }),
|
|
178
|
-
(n || c) && /* @__PURE__ */
|
|
179
|
+
(n || c) && /* @__PURE__ */ s("div", {
|
|
179
180
|
className: "relative",
|
|
180
181
|
children: [n ? /* @__PURE__ */ e(N, {
|
|
181
182
|
className: c ? "pr-12" : void 0,
|
|
@@ -185,41 +186,41 @@ function Q({ icon: t, title: n, description: s, actions: r, showClose: a = !0, c
|
|
|
185
186
|
"aria-hidden": "true"
|
|
186
187
|
}), c && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "absolute top-1/2 right-0 z-10 -translate-y-1/2" }) })]
|
|
187
188
|
}),
|
|
188
|
-
|
|
189
|
+
o && /* @__PURE__ */ e(b, { children: o })
|
|
189
190
|
]
|
|
190
191
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ s(f.Root, {
|
|
192
193
|
className: "min-h-0 flex-1",
|
|
193
|
-
children: [/* @__PURE__ */ e(
|
|
194
|
+
children: [/* @__PURE__ */ e(f.Viewport, { children: /* @__PURE__ */ e(f.Content, {
|
|
194
195
|
className: "px-6 py-5",
|
|
195
196
|
children: i
|
|
196
|
-
}) }), /* @__PURE__ */ e(
|
|
197
|
+
}) }), /* @__PURE__ */ e(f.Scrollbar, { children: /* @__PURE__ */ e(f.Thumb, {}) })]
|
|
197
198
|
}),
|
|
198
199
|
r != null && /* @__PURE__ */ e("div", {
|
|
199
|
-
className: "flex shrink-0 items-center justify-end gap-2 px-6 pb-5",
|
|
200
|
+
className: u("flex shrink-0 items-center justify-end gap-2 px-6 pb-5", k),
|
|
200
201
|
children: r
|
|
201
202
|
})
|
|
202
203
|
]
|
|
203
204
|
})] });
|
|
204
205
|
}
|
|
205
|
-
function
|
|
206
|
-
return /* @__PURE__ */ e(
|
|
207
|
-
className:
|
|
206
|
+
function I({ className: t, ...n }) {
|
|
207
|
+
return /* @__PURE__ */ e(h.Popup, {
|
|
208
|
+
className: u("bg-pho-page fixed inset-0 z-50 overflow-y-auto outline-none", "transition-opacity duration-200 ease-out", "data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0", t),
|
|
208
209
|
...n
|
|
209
210
|
});
|
|
210
211
|
}
|
|
211
|
-
function U({ icon: t, title: n, description:
|
|
212
|
-
const
|
|
213
|
-
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */
|
|
212
|
+
function U({ icon: t, title: n, description: o, actions: r, showClose: l = !0, frameClassName: i, children: a, className: d, ...c }) {
|
|
213
|
+
const p = r == null && l;
|
|
214
|
+
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ s(I, {
|
|
214
215
|
className: d,
|
|
215
216
|
...c,
|
|
216
|
-
children: [
|
|
217
|
-
className:
|
|
218
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: [p && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "fixed top-4 right-4 z-10" }) }), /* @__PURE__ */ e("div", {
|
|
218
|
+
className: u("flex min-h-full items-center justify-center px-6 pt-6 pb-20", i),
|
|
219
|
+
children: /* @__PURE__ */ s("div", {
|
|
219
220
|
className: "w-full max-w-md",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ s(E, {
|
|
221
222
|
className: "flex flex-col gap-5",
|
|
222
|
-
children: [(t || n ||
|
|
223
|
+
children: [(t || n || o) && /* @__PURE__ */ s("div", {
|
|
223
224
|
className: "flex flex-col gap-1",
|
|
224
225
|
children: [
|
|
225
226
|
t && /* @__PURE__ */ e(B, {
|
|
@@ -227,11 +228,11 @@ function U({ icon: t, title: n, description: s, actions: r, showClose: a = !0, f
|
|
|
227
228
|
children: t
|
|
228
229
|
}),
|
|
229
230
|
n && /* @__PURE__ */ e(N, { children: n }),
|
|
230
|
-
|
|
231
|
+
o && /* @__PURE__ */ e(b, { children: o })
|
|
231
232
|
]
|
|
232
|
-
}),
|
|
233
|
+
}), a]
|
|
233
234
|
}), r != null && /* @__PURE__ */ e("div", {
|
|
234
|
-
className: "mt-5 flex items-center justify-end gap-2",
|
|
235
|
+
className: u("mt-5 flex items-center justify-end gap-2", k),
|
|
235
236
|
children: r
|
|
236
237
|
})]
|
|
237
238
|
})
|
|
@@ -239,24 +240,24 @@ function U({ icon: t, title: n, description: s, actions: r, showClose: a = !0, f
|
|
|
239
240
|
}) });
|
|
240
241
|
}
|
|
241
242
|
var ae = {
|
|
242
|
-
Root:
|
|
243
|
-
Trigger:
|
|
243
|
+
Root: W,
|
|
244
|
+
Trigger: $,
|
|
244
245
|
Portal: x,
|
|
245
246
|
Backdrop: z,
|
|
246
|
-
Popup:
|
|
247
|
+
Popup: S,
|
|
247
248
|
InsetPopup: H,
|
|
248
|
-
FullscreenPopup:
|
|
249
|
+
FullscreenPopup: I,
|
|
249
250
|
Title: N,
|
|
250
251
|
Description: b,
|
|
251
252
|
Close: y,
|
|
252
|
-
Action:
|
|
253
|
-
Content:
|
|
253
|
+
Action: J,
|
|
254
|
+
Content: K,
|
|
254
255
|
InsetContent: Q,
|
|
255
256
|
FullscreenContent: U
|
|
256
257
|
};
|
|
257
258
|
export {
|
|
258
|
-
|
|
259
|
+
le as n,
|
|
259
260
|
ae as t
|
|
260
261
|
};
|
|
261
262
|
|
|
262
|
-
//# sourceMappingURL=dialog-
|
|
263
|
+
//# sourceMappingURL=dialog-DORIrfyJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-DORIrfyJ.js","names":["BaseDialog","Dialog","cn","Button","CloseButton","AnimatedHeight","ScrollArea","createContext","useCallback","useContext","useEffect","useMemo","useRef","useState","jsx","jsxs","Dialog","DialogPendingContext","useDialogPending","Root","onOpenChange","actionsRef","props","pending","setPending","pendingRef","internalActionsRef","handleOpenChange","open","eventDetails","contextValue","Trigger","Portal","Close","isThenable","value","Action","onClick","loading","disabled","pendingContext","busy","setBusy","mountedRef","handleClick","event","result","error","inert","Backdrop","className","Popup","Title","Description","DialogHeaderIcon","children","size","ACTION_ROW_SPLIT","Content","icon","title","description","consequences","warning","actions","caption","showClose","showCloseButton","hasHeader","hasConsequences","hasScrollBody","item","index","InsetPopup","InsetContent","FullscreenPopup","FullscreenContent","frameClassName","Dialog$1"],"sources":["../../src/components/dialog/dialog.tsx"],"sourcesContent":["import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ComponentProps,\n type ElementType,\n type MouseEvent as ReactMouseEvent,\n type ReactNode,\n} from \"react\";\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { AnimatedHeight } from \"../../utils/animated-height\";\nimport { cn } from \"../../utils/cn\";\nimport { ScrollArea } from \"../scroll-area\";\nimport { Button, type ButtonProps } from \"../button/button\";\nimport { CloseButton } from \"../button/close-button\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/* ========================== Async pending context ========================== */\n\n/** Imperative actions exposed by Base UI's `actionsRef`. */\ninterface RootActions {\n unmount: () => void;\n close: () => void;\n}\n\ninterface DialogPendingContextValue {\n /** True while a `Dialog.Action` promise is in flight. */\n pending: boolean;\n beginPending: () => void;\n endPending: () => void;\n /** Close the dialog imperatively (used by `Dialog.Action` on resolve). */\n close: () => void;\n}\n\nconst DialogPendingContext = createContext<DialogPendingContextValue | null>(\n null,\n);\n\n/**\n * Whether the surrounding dialog has a `Dialog.Action` promise in flight —\n * use it to disable secondary actions (Cancel etc.) while work is pending.\n * Returns `false` outside a `Dialog.Root`.\n */\nexport function useDialogPending(): boolean {\n return useContext(DialogPendingContext)?.pending ?? false;\n}\n\ntype RootProps = ComponentProps<typeof BaseDialog.Root>;\n\n/**\n * `Dialog.Root` with async awareness: while a `Dialog.Action` promise is\n * pending, every close request (outside press, Escape, `Dialog.Close`) is\n * cancelled so the dialog stays open until the work settles. Props pass\n * through to Base UI's `Dialog.Root` unchanged.\n */\nfunction Root({ onOpenChange, actionsRef, ...props }: RootProps) {\n const [pending, setPending] = useState(false);\n // Guard reads a ref so a resolve → close() in the same tick isn't blocked\n // by a not-yet-flushed state update.\n const pendingRef = useRef(false);\n const internalActionsRef = useRef<RootActions | null>(null);\n\n // Keep a caller-supplied actionsRef working alongside our internal one.\n useEffect(() => {\n if (!actionsRef) return;\n actionsRef.current = internalActionsRef.current;\n return () => {\n actionsRef.current = null;\n };\n }, [actionsRef]);\n\n const handleOpenChange = useCallback<NonNullable<RootProps[\"onOpenChange\"]>>(\n (open, eventDetails) => {\n if (!open && pendingRef.current) {\n eventDetails.cancel();\n return;\n }\n onOpenChange?.(open, eventDetails);\n },\n [onOpenChange],\n );\n\n const contextValue = useMemo<DialogPendingContextValue>(\n () => ({\n pending,\n beginPending: () => {\n pendingRef.current = true;\n setPending(true);\n },\n endPending: () => {\n pendingRef.current = false;\n setPending(false);\n },\n close: () => internalActionsRef.current?.close(),\n }),\n [pending],\n );\n\n return (\n <DialogPendingContext.Provider value={contextValue}>\n <BaseDialog.Root\n actionsRef={internalActionsRef}\n onOpenChange={handleOpenChange}\n {...props}\n />\n </DialogPendingContext.Provider>\n );\n}\n\nconst Trigger = BaseDialog.Trigger;\nconst Portal = BaseDialog.Portal;\nconst Close = BaseDialog.Close;\n\n/* ============================== Dialog.Action ============================== */\n\nexport interface DialogActionProps extends Omit<ButtonProps, \"onClick\"> {\n /**\n * Confirm handler. Return a promise to keep the dialog open while it runs:\n * the button shows `loading`, all dismissal is locked, and the dialog\n * closes when the promise resolves. On rejection the dialog stays open —\n * surface errors inside the handler. A non-promise return closes\n * immediately, like `Dialog.Close`.\n */\n onClick?: (\n event: ReactMouseEvent<HTMLButtonElement>,\n ) => void | Promise<unknown>;\n}\n\nfunction isThenable(value: unknown): value is Promise<unknown> {\n return (\n value != null && typeof (value as { then?: unknown }).then === \"function\"\n );\n}\n\n/**\n * The confirm button of an action row, with native promise support — a\n * `Button` that runs its (possibly async) `onClick` and closes the dialog\n * when the work settles successfully.\n */\nfunction Action({ onClick, loading, disabled, ...props }: DialogActionProps) {\n const pendingContext = useContext(DialogPendingContext);\n const [busy, setBusy] = useState(false);\n const mountedRef = useRef(true);\n\n useEffect(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n function handleClick(event: ReactMouseEvent<HTMLButtonElement>) {\n if (busy || loading) return;\n const result = onClick?.(event);\n if (!isThenable(result)) {\n pendingContext?.close();\n return;\n }\n setBusy(true);\n pendingContext?.beginPending();\n result.then(\n () => {\n pendingContext?.endPending();\n if (mountedRef.current) setBusy(false);\n pendingContext?.close();\n },\n (error: unknown) => {\n pendingContext?.endPending();\n if (mountedRef.current) setBusy(false);\n if (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n ) {\n console.error(\"Dialog.Action: async onClick rejected —\", error);\n }\n },\n );\n }\n\n const inert = busy || loading;\n return (\n <Button\n {...props}\n disabled={disabled || inert}\n loading={inert}\n onClick={handleClick}\n />\n );\n}\n\nfunction Backdrop({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Backdrop>) {\n return (\n <BaseDialog.Backdrop\n className={cn(\n \"bg-pho-overlay fixed inset-0 z-50 transition-opacity duration-200 ease-out\",\n \"data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseDialog.Popup>) {\n return (\n <BaseDialog.Popup\n className={cn(\n // Floating layer: bg-pho-primary + border-pho-secondary hairline, elevation kept.\n \"border-pho-secondary bg-pho-primary shadow-pho-xl fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-lg border outline-none\",\n // Global height cap — the inset panel's footprint (inset-4 /\n // sm:inset-8). A flex column so the body region can shrink and\n // scroll while header and actions stay pinned.\n \"flex max-h-[calc(100dvh-2rem)] flex-col sm:max-h-[calc(100dvh-4rem)]\",\n // Opacity + scale only — leave translate centering alone (no transition-all).\n \"transition-[opacity,scale] duration-200 ease-out\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-150\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BaseDialog.Title>) {\n return (\n <BaseDialog.Title\n className={cn(\n \"text-pho-primary font-display text-display-sm font-medium text-balance\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Description>) {\n return (\n <BaseDialog.Description\n className={cn(\n \"text-pho-description text-display-xs font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Header icon chrome: secondary ink, a hair of extra air before the title.\n * Panel dialogs use 32px (`size-8`); fullscreen gates step up to 48px\n * (`size-12`) so the glyph reads at viewport scale.\n */\nfunction DialogHeaderIcon({\n children,\n size = \"md\",\n}: {\n children: ReactNode;\n size?: \"md\" | \"lg\";\n}) {\n return (\n <span\n aria-hidden\n className={cn(\n \"text-pho-secondary mb-1\",\n size === \"lg\" ? \"[&>svg]:size-12\" : \"[&>svg]:size-8\",\n )}\n >\n {children}\n </span>\n );\n}\n\ninterface ContentProps extends Omit<\n StyledProps<typeof BaseDialog.Popup>,\n \"title\"\n> {\n /**\n * Decorative icon above the title — typically a Tabler outline icon.\n * Rendered aria-hidden in secondary ink at 32px (`[&>svg]:size-8`). Pass a\n * styled node to override the ink; the size is owned by the slot.\n */\n icon?: ReactNode;\n /** Heading rendered in the panel header. */\n title?: ReactNode;\n /** Supporting text under the title. */\n description?: ReactNode;\n /**\n * Consequence bullets rendered as a list at the top of the body — one item\n * per outcome (what is deleted, what survives, who loses access). Use on\n * destructive confirms where the one-line description undersells the\n * impact; keep each item to a single short sentence. Wrap the load-bearing\n * figure in `<strong>` (\"<strong>3 members</strong> lose access\") — the\n * list styles it (secondary ink, medium weight); no classes needed.\n */\n consequences?: ReactNode[];\n /**\n * Final cautionary line under `consequences` — error ink at description\n * size (e.g. \"It cannot be undone. Please be certain.\"). Reserve it for\n * irreversible actions; keep it short.\n */\n warning?: ReactNode;\n /**\n * Footer action row (Cancel / Confirm, etc.). Iron rule: when `actions` is\n * set, the header close button is never shown — dismiss via the actions.\n * Three actions split: the first (tertiary) at the row's start, the\n * secondary and the primary at its end.\n */\n actions?: ReactNode;\n /**\n * A quiet footnote at the panel's foot — the limit, cost or policy that\n * frames the decision without being it (\"You may change these up to five\n * times a week.\"). Description ink at `text-xs`, at the action row's\n * start with the actions at its end; when the row runs short of room it\n * takes a line of its own above them. One short sentence.\n */\n caption?: ReactNode;\n /**\n * Header close control. Only applies when `actions` is absent.\n * @default true\n */\n showClose?: boolean;\n children?: ReactNode;\n}\n\n/**\n * The action row's split. One or two actions sit together at the row's end.\n * With three, the first (the tertiary, \"Not now\") sits alone at the row's\n * start and the other two stay at its end: pass them tertiary, secondary,\n * primary. A `caption` already holds the start, so beside one nothing moves.\n */\nconst ACTION_ROW_SPLIT = \"[&:has(>:nth-child(3))>:first-child]:me-auto\";\n\n/**\n * Convenience panel: renders the portal, backdrop, and styled popup with an\n * optional header (title/description + close) and optional action row. For\n * full control, compose the parts directly (`Dialog.Portal` /\n * `Dialog.Backdrop` / `Dialog.Popup`).\n */\nfunction Content({\n icon,\n title,\n description,\n consequences,\n warning,\n actions,\n caption,\n showClose = true,\n children,\n className,\n ...props\n}: ContentProps) {\n // Iron rule: action dialogs dismiss via their actions — never a header X.\n const showCloseButton = actions == null && showClose;\n const hasHeader = Boolean(icon || title || description || showCloseButton);\n const hasConsequences = consequences != null && consequences.length > 0;\n // The scrollable middle region — actions stay pinned below it.\n const hasScrollBody = hasConsequences || warning != null || children != null;\n\n return (\n <Portal>\n <Backdrop />\n <Popup className={className} {...props}>\n {hasHeader && (\n <div className=\"flex shrink-0 flex-col gap-1 px-6 pt-6\">\n {icon && <DialogHeaderIcon>{icon}</DialogHeaderIcon>}\n {(title || showCloseButton) && (\n // Title row height = title only. Close is out of flow, centered\n // on the row, and may paint outside it (no clip, no stretch).\n <div className=\"relative\">\n {title ? (\n <Title className={showCloseButton ? \"pr-12\" : undefined}>\n {title}\n </Title>\n ) : (\n <div className=\"h-[1.625rem]\" aria-hidden=\"true\" />\n )}\n {showCloseButton && (\n <Close\n render={\n <CloseButton className=\"absolute top-1/2 right-0 z-10 -translate-y-1/2\" />\n }\n />\n )}\n </div>\n )}\n {description && <Description>{description}</Description>}\n </div>\n )}\n {hasScrollBody && (\n <ScrollArea.Root className=\"min-h-0 flex-1\">\n <ScrollArea.Viewport>\n <ScrollArea.Content className=\"flex flex-col gap-5 px-6 py-5\">\n {hasConsequences && (\n <ul className=\"text-pho-description text-md [&_strong]:text-pho-secondary space-y-1 [&_strong]:font-medium\">\n {consequences.map((item, index) => (\n // Hand-drawn marker: a 4px dot on the first line's center —\n // quieter than the browser disc, ink tracks the text.\n <li\n key={index}\n className=\"relative pl-4 before:absolute before:top-2.5 before:left-1 before:size-1 before:rounded-full before:bg-current\"\n >\n {item}\n </li>\n ))}\n </ul>\n )}\n {warning != null && (\n <p className=\"text-pho-error text-display-xs font-medium\">\n {warning}\n </p>\n )}\n {children}\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n )}\n {(actions != null || caption != null) && (\n <div\n className={cn(\n \"flex shrink-0 flex-wrap items-center justify-end gap-x-2 gap-y-3 px-6 pb-5\",\n // A caption is the row's first child and already fills it.\n caption == null && ACTION_ROW_SPLIT,\n !hasScrollBody && \"pt-5\",\n )}\n >\n {caption != null && (\n // Grows into the row's free width, never under 12rem: below\n // that it wraps to a line of its own above the actions.\n <p\n data-dialog-caption=\"\"\n className=\"text-pho-description min-w-48 flex-1 pr-2 text-xs\"\n >\n {caption}\n </p>\n )}\n {actions}\n </div>\n )}\n </Popup>\n </Portal>\n );\n}\n\n/* =========================== Dialog.InsetContent =========================== */\n\n/**\n * Near-fullscreen popup — the viewport minus a breathing ring, floating over\n * a backdrop (the page stays visible through the gap, so it dims like any\n * floating layer). Still a card: border, elevation, rounded corners; the\n * scale gesture stays but shrinks to 98% — at this size 95% reads like a jump.\n */\nfunction InsetPopup({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Popup>) {\n return (\n <BaseDialog.Popup\n className={cn(\n \"border-pho-secondary bg-pho-primary shadow-pho-xl fixed inset-4 z-50 flex flex-col overflow-hidden rounded-lg border outline-none sm:inset-8\",\n \"transition-[opacity,scale] duration-200 ease-out\",\n \"data-[starting-style]:scale-[0.98] data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[ending-style]:duration-150\",\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface InsetContentProps extends Omit<\n StyledProps<typeof BaseDialog.Popup>,\n \"title\"\n> {\n /** Decorative icon above the title — same treatment as `Content`. */\n icon?: ReactNode;\n /** Heading rendered in the panel header. */\n title?: ReactNode;\n /** Supporting text under the title. */\n description?: ReactNode;\n /**\n * Bottom action row. Iron rule as `Content`: when `actions` is set, the\n * header close button is never shown — dismiss via the actions.\n */\n actions?: ReactNode;\n /**\n * Header close control. Only applies when `actions` is absent.\n * @default true\n */\n showClose?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Convenience near-fullscreen panel: header pinned on top, body filling and\n * scrolling on its own, optional action row pinned at the bottom. Sits\n * between `Content` (a focused card) and `FullscreenContent` (a page\n * takeover): use it for roomy working surfaces — pickers, editors, previews —\n * that still want the page peeking through an edge.\n */\nfunction InsetContent({\n icon,\n title,\n description,\n actions,\n showClose = true,\n children,\n className,\n ...props\n}: InsetContentProps) {\n // Iron rule: action dialogs dismiss via their actions — never a header X.\n const showCloseButton = actions == null && showClose;\n const hasHeader = Boolean(icon || title || description || showCloseButton);\n\n return (\n <Portal>\n <Backdrop />\n <InsetPopup className={className} {...props}>\n {hasHeader && (\n <div className=\"flex shrink-0 flex-col gap-1 px-6 pt-6\">\n {icon && <DialogHeaderIcon>{icon}</DialogHeaderIcon>}\n {(title || showCloseButton) && (\n <div className=\"relative\">\n {title ? (\n <Title className={showCloseButton ? \"pr-12\" : undefined}>\n {title}\n </Title>\n ) : (\n <div className=\"h-[1.625rem]\" aria-hidden=\"true\" />\n )}\n {showCloseButton && (\n <Close\n render={\n <CloseButton className=\"absolute top-1/2 right-0 z-10 -translate-y-1/2\" />\n }\n />\n )}\n </div>\n )}\n {description && <Description>{description}</Description>}\n </div>\n )}\n <ScrollArea.Root className=\"min-h-0 flex-1\">\n <ScrollArea.Viewport>\n <ScrollArea.Content className=\"px-6 py-5\">\n {children}\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n {actions != null && (\n <div\n className={cn(\n \"flex shrink-0 items-center justify-end gap-2 px-6 pb-5\",\n ACTION_ROW_SPLIT,\n )}\n >\n {actions}\n </div>\n )}\n </InsetPopup>\n </Portal>\n );\n}\n\n/* ========================= Dialog.FullscreenContent ======================== */\n\n/**\n * Full-viewport popup — a page-surface takeover instead of a floating card.\n * No backdrop: the popup itself is the layer. Fade only; scale is a floating-\n * card gesture and reads wrong at viewport size.\n */\nfunction FullscreenPopup({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Popup>) {\n return (\n <BaseDialog.Popup\n className={cn(\n \"bg-pho-page fixed inset-0 z-50 overflow-y-auto outline-none\",\n \"transition-opacity duration-200 ease-out\",\n \"data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface FullscreenContentProps extends Omit<\n StyledProps<typeof BaseDialog.Popup>,\n \"title\"\n> {\n /**\n * Decorative icon above the title — same chrome as `Content`, but 48px\n * (`size-12`) for viewport-scale gates.\n */\n icon?: ReactNode;\n /** Heading of the takeover. */\n title?: ReactNode;\n /** Supporting text under the title. */\n description?: ReactNode;\n /**\n * Action row under the body. Iron rule as `Content`: when `actions` is set,\n * the corner close button is never shown — dismiss via the actions.\n */\n actions?: ReactNode;\n /**\n * Corner close control. Only applies when `actions` is absent.\n * @default true\n */\n showClose?: boolean;\n /**\n * Classes on the viewport-centering frame (the `min-h-full` flex host).\n * Use to drop the default optical `pb-20` when the stack grows (e.g. a\n * captcha) so true center stays put: `frameClassName=\"pb-6\"`.\n */\n frameClassName?: string;\n children?: ReactNode;\n}\n\n/**\n * Convenience full-screen panel: the whole viewport becomes the dialog, with\n * a centered column at the standalone-flow width (28rem — the same measure as\n * onboarding / invite cards). Column height follows its content through\n * `AnimatedHeight` (same spring as the Card shell), so step swaps — phone →\n * OTP → captcha — glide instead of jumping. Use for gates the visitor must\n * deal with before the page behind makes sense (e.g. binding a phone number);\n * prefer `Content` for everything conversational.\n */\nfunction FullscreenContent({\n icon,\n title,\n description,\n actions,\n showClose = true,\n frameClassName,\n children,\n className,\n ...props\n}: FullscreenContentProps) {\n // Iron rule: action dialogs dismiss via their actions — never a corner X.\n const showCloseButton = actions == null && showClose;\n\n return (\n <Portal>\n <FullscreenPopup className={className} {...props}>\n {showCloseButton && (\n <Close\n render={<CloseButton className=\"fixed top-4 right-4 z-10\" />}\n />\n )}\n {/* Default `pb-20` optically lifts the column above true center. */}\n <div\n className={cn(\n \"flex min-h-full items-center justify-center px-6 pt-6 pb-20\",\n frameClassName,\n )}\n >\n {/* Width stays on the outer host; AnimatedHeight measures the\n header + body stack and springs its own height on content\n changes. The action row sits below it, outside the clip: while\n the body grows the container is shorter than its content for a\n few frames, and a row inside it would be cut off at the bottom\n (a pressed \"Send code\" turning grey right as a captcha mounts).\n Outside, the row rides the spring instead. */}\n <div className=\"w-full max-w-md\">\n <AnimatedHeight className=\"flex flex-col gap-5\">\n {(icon || title || description) && (\n <div className=\"flex flex-col gap-1\">\n {icon && (\n <DialogHeaderIcon size=\"lg\">{icon}</DialogHeaderIcon>\n )}\n {title && <Title>{title}</Title>}\n {description && <Description>{description}</Description>}\n </div>\n )}\n {children}\n </AnimatedHeight>\n {actions != null && (\n <div\n className={cn(\n \"mt-5 flex items-center justify-end gap-2\",\n ACTION_ROW_SPLIT,\n )}\n >\n {actions}\n </div>\n )}\n </div>\n </div>\n </FullscreenPopup>\n </Portal>\n );\n}\n\n/**\n * Modal dialog built on Base UI `Dialog`. Controlled or uncontrolled via\n * `Dialog.Root` (`open` / `onOpenChange` / `defaultOpen`). `Dialog.Action`\n * adds native promise support: an async confirm keeps the dialog open and\n * undismissable until the work resolves.\n */\nexport const Dialog = {\n Root,\n Trigger,\n Portal,\n Backdrop,\n Popup,\n InsetPopup,\n FullscreenPopup,\n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