@inertiaui/modal-react 0.6.0 → 0.6.1
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/inertiaui-modal.js +103 -102
- package/dist/inertiaui-modal.umd.cjs +11 -11
- package/package.json +1 -1
package/dist/inertiaui-modal.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Fo = Object.defineProperty;
|
|
2
2
|
var Co = (t, e, r) => e in t ? Fo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var ye = (t, e, r) => Co(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import * as
|
|
5
|
-
import A, { createContext as ce, useState as Q, useEffect as K, useContext as ie, createElement as Pr, useMemo as J, forwardRef as Hr, useImperativeHandle as na, useLayoutEffect as Io, useRef as j, useCallback as ve, Fragment as he, isValidElement as Mo, cloneElement as _o, useId as
|
|
4
|
+
import * as ht from "react";
|
|
5
|
+
import A, { createContext as ce, useState as Q, useEffect as K, useContext as ie, createElement as Pr, useMemo as J, forwardRef as Hr, useImperativeHandle as na, useLayoutEffect as Io, useRef as j, useCallback as ve, Fragment as he, isValidElement as Mo, cloneElement as _o, useId as Ot, useSyncExternalStore as Do, useReducer as No, createRef as ko } from "react";
|
|
6
6
|
import jt from "axios";
|
|
7
|
-
import { router as
|
|
7
|
+
import { router as vt } from "@inertiajs/react";
|
|
8
8
|
import { createPortal as jo } from "react-dom";
|
|
9
|
-
const
|
|
9
|
+
const ct = {
|
|
10
10
|
type: "modal",
|
|
11
11
|
navigate: !1,
|
|
12
12
|
modal: {
|
|
@@ -31,14 +31,15 @@ class Lo {
|
|
|
31
31
|
this.config = {}, this.reset();
|
|
32
32
|
}
|
|
33
33
|
reset() {
|
|
34
|
-
this.config = JSON.parse(JSON.stringify(
|
|
34
|
+
this.config = JSON.parse(JSON.stringify(ct));
|
|
35
35
|
}
|
|
36
36
|
put(e, r) {
|
|
37
37
|
if (typeof e == "object") {
|
|
38
38
|
this.config = {
|
|
39
|
-
type: e.type ??
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
type: e.type ?? ct.type,
|
|
40
|
+
navigate: e.navigate ?? ct.navigate,
|
|
41
|
+
modal: { ...ct.modal, ...e.modal ?? {} },
|
|
42
|
+
slideover: { ...ct.slideover, ...e.slideover ?? {} }
|
|
42
43
|
};
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
@@ -85,7 +86,7 @@ function Uo(t) {
|
|
|
85
86
|
});
|
|
86
87
|
}), r;
|
|
87
88
|
}
|
|
88
|
-
var Tr = { exports: {} },
|
|
89
|
+
var Tr = { exports: {} }, ft = {};
|
|
89
90
|
/**
|
|
90
91
|
* @license React
|
|
91
92
|
* react-jsx-runtime.production.min.js
|
|
@@ -97,7 +98,7 @@ var Tr = { exports: {} }, ct = {};
|
|
|
97
98
|
*/
|
|
98
99
|
var wn;
|
|
99
100
|
function Bo() {
|
|
100
|
-
if (wn) return
|
|
101
|
+
if (wn) return ft;
|
|
101
102
|
wn = 1;
|
|
102
103
|
var t = A, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
103
104
|
function l(u, i, d) {
|
|
@@ -107,9 +108,9 @@ function Bo() {
|
|
|
107
108
|
if (u && u.defaultProps) for (s in i = u.defaultProps, i) g[s] === void 0 && (g[s] = i[s]);
|
|
108
109
|
return { $$typeof: e, type: u, key: v, ref: w, props: g, _owner: a.current };
|
|
109
110
|
}
|
|
110
|
-
return
|
|
111
|
+
return ft.Fragment = r, ft.jsx = l, ft.jsxs = l, ft;
|
|
111
112
|
}
|
|
112
|
-
var
|
|
113
|
+
var dt = {};
|
|
113
114
|
/**
|
|
114
115
|
* @license React
|
|
115
116
|
* react-jsx-runtime.development.js
|
|
@@ -287,16 +288,16 @@ function Ho() {
|
|
|
287
288
|
` + Ne + c;
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
|
-
var Oe = !1,
|
|
291
|
+
var Oe = !1, Rt;
|
|
291
292
|
{
|
|
292
293
|
var ao = typeof WeakMap == "function" ? WeakMap : Map;
|
|
293
|
-
|
|
294
|
+
Rt = new ao();
|
|
294
295
|
}
|
|
295
296
|
function on(c, E) {
|
|
296
297
|
if (!c || Oe)
|
|
297
298
|
return "";
|
|
298
299
|
{
|
|
299
|
-
var x =
|
|
300
|
+
var x = Rt.get(c);
|
|
300
301
|
if (x !== void 0)
|
|
301
302
|
return x;
|
|
302
303
|
}
|
|
@@ -351,7 +352,7 @@ function Ho() {
|
|
|
351
352
|
if (G--, z--, z < 0 || F[G] !== ne[z]) {
|
|
352
353
|
var se = `
|
|
353
354
|
` + F[G].replace(" at new ", " at ");
|
|
354
|
-
return c.displayName && se.includes("<anonymous>") && (se = se.replace("<anonymous>", c.displayName)), typeof c == "function" &&
|
|
355
|
+
return c.displayName && se.includes("<anonymous>") && (se = se.replace("<anonymous>", c.displayName)), typeof c == "function" && Rt.set(c, se), se;
|
|
355
356
|
}
|
|
356
357
|
while (G >= 1 && z >= 0);
|
|
357
358
|
break;
|
|
@@ -361,7 +362,7 @@ function Ho() {
|
|
|
361
362
|
Oe = !1, lt.current = L, De(), Error.prepareStackTrace = N;
|
|
362
363
|
}
|
|
363
364
|
var Ye = c ? c.displayName || c.name : "", ke = Ye ? xe(Ye) : "";
|
|
364
|
-
return typeof c == "function" &&
|
|
365
|
+
return typeof c == "function" && Rt.set(c, ke), ke;
|
|
365
366
|
}
|
|
366
367
|
function oo(c, E, x) {
|
|
367
368
|
return on(c, !1);
|
|
@@ -370,7 +371,7 @@ function Ho() {
|
|
|
370
371
|
var E = c.prototype;
|
|
371
372
|
return !!(E && E.isReactComponent);
|
|
372
373
|
}
|
|
373
|
-
function
|
|
374
|
+
function Ft(c, E, x) {
|
|
374
375
|
if (c == null)
|
|
375
376
|
return "";
|
|
376
377
|
if (typeof c == "function")
|
|
@@ -388,11 +389,11 @@ function Ho() {
|
|
|
388
389
|
case i:
|
|
389
390
|
return oo(c.render);
|
|
390
391
|
case g:
|
|
391
|
-
return
|
|
392
|
+
return Ft(c.type, E, x);
|
|
392
393
|
case v: {
|
|
393
394
|
var P = c, N = P._payload, L = P._init;
|
|
394
395
|
try {
|
|
395
|
-
return
|
|
396
|
+
return Ft(L(N), E, x);
|
|
396
397
|
} catch {
|
|
397
398
|
}
|
|
398
399
|
}
|
|
@@ -400,9 +401,9 @@ function Ho() {
|
|
|
400
401
|
return "";
|
|
401
402
|
}
|
|
402
403
|
var ut = Object.prototype.hasOwnProperty, ln = {}, un = m.ReactDebugCurrentFrame;
|
|
403
|
-
function
|
|
404
|
+
function Ct(c) {
|
|
404
405
|
if (c) {
|
|
405
|
-
var E = c._owner, x =
|
|
406
|
+
var E = c._owner, x = Ft(c.type, c._source, E ? E.type : null);
|
|
406
407
|
un.setExtraStackFrame(x);
|
|
407
408
|
} else
|
|
408
409
|
un.setExtraStackFrame(null);
|
|
@@ -422,7 +423,7 @@ function Ho() {
|
|
|
422
423
|
} catch (G) {
|
|
423
424
|
F = G;
|
|
424
425
|
}
|
|
425
|
-
F && !(F instanceof Error) && (
|
|
426
|
+
F && !(F instanceof Error) && (Ct(N), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", P || "React class", x, I, typeof F), Ct(null)), F instanceof Error && !(F.message in ln) && (ln[F.message] = !0, Ct(N), h("Failed %s type: %s", x, F.message), Ct(null));
|
|
426
427
|
}
|
|
427
428
|
}
|
|
428
429
|
}
|
|
@@ -551,7 +552,7 @@ function Ho() {
|
|
|
551
552
|
var lr = m.ReactCurrentOwner, pn = m.ReactDebugCurrentFrame;
|
|
552
553
|
function Ge(c) {
|
|
553
554
|
if (c) {
|
|
554
|
-
var E = c._owner, x =
|
|
555
|
+
var E = c._owner, x = Ft(c.type, c._source, E ? E.type : null);
|
|
555
556
|
pn.setExtraStackFrame(x);
|
|
556
557
|
} else
|
|
557
558
|
pn.setExtraStackFrame(null);
|
|
@@ -710,8 +711,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
710
711
|
return bn(c, E, x, !1);
|
|
711
712
|
}
|
|
712
713
|
var Ao = Po, To = Oo;
|
|
713
|
-
|
|
714
|
-
}()),
|
|
714
|
+
dt.Fragment = n, dt.jsx = Ao, dt.jsxs = To;
|
|
715
|
+
}()), dt;
|
|
715
716
|
}
|
|
716
717
|
process.env.NODE_ENV === "production" ? Tr.exports = Bo() : Tr.exports = Ho();
|
|
717
718
|
var R = Tr.exports;
|
|
@@ -755,12 +756,12 @@ function Qo(t) {
|
|
|
755
756
|
function Zo(t) {
|
|
756
757
|
return Array.isArray(t) ? [] : {};
|
|
757
758
|
}
|
|
758
|
-
function
|
|
759
|
+
function xt(t, e) {
|
|
759
760
|
return e.clone !== !1 && e.isMergeableObject(t) ? Ze(Zo(t), t, e) : t;
|
|
760
761
|
}
|
|
761
762
|
function ei(t, e, r) {
|
|
762
763
|
return t.concat(e).map(function(n) {
|
|
763
|
-
return
|
|
764
|
+
return xt(n, r);
|
|
764
765
|
});
|
|
765
766
|
}
|
|
766
767
|
function ti(t, e) {
|
|
@@ -790,15 +791,15 @@ function ni(t, e) {
|
|
|
790
791
|
function ai(t, e, r) {
|
|
791
792
|
var n = {};
|
|
792
793
|
return r.isMergeableObject(t) && Sn(t).forEach(function(a) {
|
|
793
|
-
n[a] =
|
|
794
|
+
n[a] = xt(t[a], r);
|
|
794
795
|
}), Sn(e).forEach(function(a) {
|
|
795
|
-
ni(t, a) || (oa(t, a) && r.isMergeableObject(e[a]) ? n[a] = ti(a, r)(t[a], e[a], r) : n[a] =
|
|
796
|
+
ni(t, a) || (oa(t, a) && r.isMergeableObject(e[a]) ? n[a] = ti(a, r)(t[a], e[a], r) : n[a] = xt(e[a], r));
|
|
796
797
|
}), n;
|
|
797
798
|
}
|
|
798
799
|
function Ze(t, e, r) {
|
|
799
|
-
r = r || {}, r.arrayMerge = r.arrayMerge || ei, r.isMergeableObject = r.isMergeableObject || Yo, r.cloneUnlessOtherwiseSpecified =
|
|
800
|
+
r = r || {}, r.arrayMerge = r.arrayMerge || ei, r.isMergeableObject = r.isMergeableObject || Yo, r.cloneUnlessOtherwiseSpecified = xt;
|
|
800
801
|
var n = Array.isArray(e), a = Array.isArray(t), o = n === a;
|
|
801
|
-
return o ? n ? r.arrayMerge(t, e, r) : ai(t, e, r) :
|
|
802
|
+
return o ? n ? r.arrayMerge(t, e, r) : ai(t, e, r) : xt(e, r);
|
|
802
803
|
}
|
|
803
804
|
Ze.all = function(e, r) {
|
|
804
805
|
if (!Array.isArray(e))
|
|
@@ -809,7 +810,7 @@ Ze.all = function(e, r) {
|
|
|
809
810
|
};
|
|
810
811
|
var oi = Ze, ii = oi;
|
|
811
812
|
const li = /* @__PURE__ */ Wo(ii);
|
|
812
|
-
var ui = Error, si = EvalError, ci = RangeError, fi = ReferenceError, ia = SyntaxError,
|
|
813
|
+
var ui = Error, si = EvalError, ci = RangeError, fi = ReferenceError, ia = SyntaxError, Pt = TypeError, di = URIError, pi = function() {
|
|
813
814
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
814
815
|
return !1;
|
|
815
816
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -877,7 +878,7 @@ var ui = Error, si = EvalError, ci = RangeError, fi = ReferenceError, ia = Synta
|
|
|
877
878
|
d.prototype = r.prototype, a.prototype = new d(), d.prototype = null;
|
|
878
879
|
}
|
|
879
880
|
return a;
|
|
880
|
-
}, Pi = Oi, qr = Function.prototype.bind || Pi, Ai = Function.prototype.call, Ti = Object.prototype.hasOwnProperty, $i = qr, Ri = $i.call(Ai, Ti), C, Fi = ui, Ci = si, Ii = ci, Mi = fi, et = ia, Qe =
|
|
881
|
+
}, Pi = Oi, qr = Function.prototype.bind || Pi, Ai = Function.prototype.call, Ti = Object.prototype.hasOwnProperty, $i = qr, Ri = $i.call(Ai, Ti), C, Fi = ui, Ci = si, Ii = ci, Mi = fi, et = ia, Qe = Pt, _i = di, la = Function, dr = function(t) {
|
|
881
882
|
try {
|
|
882
883
|
return la('"use strict"; return (' + t + ").constructor;")();
|
|
883
884
|
} catch {
|
|
@@ -1049,7 +1050,7 @@ var Li = function t(e) {
|
|
|
1049
1050
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1050
1051
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1051
1052
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1052
|
-
},
|
|
1053
|
+
}, At = qr, Lt = Ri, Wi = At.call(Function.call, Array.prototype.concat), Ui = At.call(Function.apply, Array.prototype.splice), An = At.call(Function.call, String.prototype.replace), Wt = At.call(Function.call, String.prototype.slice), Bi = At.call(Function.call, RegExp.prototype.exec), Hi = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Vi = /\\(\\)?/g, qi = function(e) {
|
|
1053
1054
|
var r = Wt(e, 0, 1), n = Wt(e, -1);
|
|
1054
1055
|
if (r === "%" && n !== "%")
|
|
1055
1056
|
throw new et("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -1122,7 +1123,7 @@ if (Nt)
|
|
|
1122
1123
|
} catch {
|
|
1123
1124
|
Nt = null;
|
|
1124
1125
|
}
|
|
1125
|
-
var sa = Nt, $n = Gr(), zi = ia, Xe =
|
|
1126
|
+
var sa = Nt, $n = Gr(), zi = ia, Xe = Pt, Rn = sa, Ki = function(e, r, n) {
|
|
1126
1127
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
1127
1128
|
throw new Xe("`obj` must be an object or a function`");
|
|
1128
1129
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -1159,7 +1160,7 @@ ca.hasArrayLengthDefineBug = function() {
|
|
|
1159
1160
|
return !0;
|
|
1160
1161
|
}
|
|
1161
1162
|
};
|
|
1162
|
-
var Xi = ca, Ji = nt, Fn = Ki, Qi = Xi(), Cn = sa, In =
|
|
1163
|
+
var Xi = ca, Ji = nt, Fn = Ki, Qi = Xi(), Cn = sa, In = Pt, Zi = Ji("%Math.floor%"), el = function(e, r) {
|
|
1163
1164
|
if (typeof e != "function")
|
|
1164
1165
|
throw new In("`fn` is not a function");
|
|
1165
1166
|
if (typeof r != "number" || r < 0 || r > 4294967295 || Zi(r) !== r)
|
|
@@ -1184,7 +1185,7 @@ var Xi = ca, Ji = nt, Fn = Ki, Qi = Xi(), Cn = sa, In = Ot, Zi = Ji("%Math.floor
|
|
|
1184
1185
|
)), e;
|
|
1185
1186
|
};
|
|
1186
1187
|
(function(t) {
|
|
1187
|
-
var e = qr, r = nt, n = el, a =
|
|
1188
|
+
var e = qr, r = nt, n = el, a = Pt, o = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), u = r("%Reflect.apply%", !0) || e.call(l, o), i = Gr(), d = r("%Math.max%");
|
|
1188
1189
|
t.exports = function(v) {
|
|
1189
1190
|
if (typeof v != "function")
|
|
1190
1191
|
throw new a("a function is required");
|
|
@@ -1208,7 +1209,7 @@ const al = {}, ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
1208
1209
|
__proto__: null,
|
|
1209
1210
|
default: al
|
|
1210
1211
|
}, Symbol.toStringTag, { value: "Module" })), il = /* @__PURE__ */ Uo(ol);
|
|
1211
|
-
var Yr = typeof Map == "function" && Map.prototype, vr = Object.getOwnPropertyDescriptor && Yr ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Ut = Yr && vr && typeof vr.get == "function" ? vr.get : null, Mn = Yr && Map.prototype.forEach, zr = typeof Set == "function" && Set.prototype, mr = Object.getOwnPropertyDescriptor && zr ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Bt = zr && mr && typeof mr.get == "function" ? mr.get : null, _n = zr && Set.prototype.forEach, ll = typeof WeakMap == "function" && WeakMap.prototype,
|
|
1212
|
+
var Yr = typeof Map == "function" && Map.prototype, vr = Object.getOwnPropertyDescriptor && Yr ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Ut = Yr && vr && typeof vr.get == "function" ? vr.get : null, Mn = Yr && Map.prototype.forEach, zr = typeof Set == "function" && Set.prototype, mr = Object.getOwnPropertyDescriptor && zr ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Bt = zr && mr && typeof mr.get == "function" ? mr.get : null, _n = zr && Set.prototype.forEach, ll = typeof WeakMap == "function" && WeakMap.prototype, gt = ll ? WeakMap.prototype.has : null, ul = typeof WeakSet == "function" && WeakSet.prototype, bt = ul ? WeakSet.prototype.has : null, sl = typeof WeakRef == "function" && WeakRef.prototype, Dn = sl ? WeakRef.prototype.deref : null, cl = Boolean.prototype.valueOf, fl = Object.prototype.toString, dl = Function.prototype.toString, pl = String.prototype.match, Kr = String.prototype.slice, Re = String.prototype.replace, yl = String.prototype.toUpperCase, Nn = String.prototype.toLowerCase, pa = RegExp.prototype.test, kn = Array.prototype.concat, Ee = Array.prototype.join, vl = Array.prototype.slice, jn = Math.floor, Rr = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, hr = Object.getOwnPropertySymbols, Fr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, tt = typeof Symbol == "function" && typeof Symbol.iterator == "object", re = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === tt || !0) ? Symbol.toStringTag : null, ya = Object.prototype.propertyIsEnumerable, Ln = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
|
|
1212
1213
|
return t.__proto__;
|
|
1213
1214
|
} : null);
|
|
1214
1215
|
function Wn(t, e) {
|
|
@@ -1279,7 +1280,7 @@ var Cr = il, Un = Cr.custom, Bn = ma(Un) ? Un : null, ml = function t(e, r, n, a
|
|
|
1279
1280
|
}
|
|
1280
1281
|
if (ma(e)) {
|
|
1281
1282
|
var y = tt ? Re.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Fr.call(e);
|
|
1282
|
-
return typeof e == "object" && !tt ?
|
|
1283
|
+
return typeof e == "object" && !tt ? pt(y) : y;
|
|
1283
1284
|
}
|
|
1284
1285
|
if (Cl(e)) {
|
|
1285
1286
|
for (var p = "<" + Nn.call(String(e.nodeName)), m = e.attributes || [], h = 0; h < m.length; h++)
|
|
@@ -1321,13 +1322,13 @@ var Cr = il, Un = Cr.custom, Bn = ma(Un) ? Un : null, ml = function t(e, r, n, a
|
|
|
1321
1322
|
if ($l(e))
|
|
1322
1323
|
return gr("WeakRef");
|
|
1323
1324
|
if (El(e))
|
|
1324
|
-
return
|
|
1325
|
+
return pt(v(Number(e)));
|
|
1325
1326
|
if (xl(e))
|
|
1326
|
-
return
|
|
1327
|
+
return pt(v(Rr.call(e)));
|
|
1327
1328
|
if (Sl(e))
|
|
1328
|
-
return
|
|
1329
|
+
return pt(cl.call(e));
|
|
1329
1330
|
if (wl(e))
|
|
1330
|
-
return
|
|
1331
|
+
return pt(v(String(e)));
|
|
1331
1332
|
if (typeof window < "u" && e === window)
|
|
1332
1333
|
return "{ [object Window] }";
|
|
1333
1334
|
if (typeof globalThis < "u" && e === globalThis || typeof Ar < "u" && e === Ar)
|
|
@@ -1427,12 +1428,12 @@ function Al(t) {
|
|
|
1427
1428
|
return !1;
|
|
1428
1429
|
}
|
|
1429
1430
|
function Tl(t) {
|
|
1430
|
-
if (!
|
|
1431
|
+
if (!gt || !t || typeof t != "object")
|
|
1431
1432
|
return !1;
|
|
1432
1433
|
try {
|
|
1433
|
-
|
|
1434
|
+
gt.call(t, gt);
|
|
1434
1435
|
try {
|
|
1435
|
-
|
|
1436
|
+
bt.call(t, bt);
|
|
1436
1437
|
} catch {
|
|
1437
1438
|
return !0;
|
|
1438
1439
|
}
|
|
@@ -1466,12 +1467,12 @@ function Rl(t) {
|
|
|
1466
1467
|
return !1;
|
|
1467
1468
|
}
|
|
1468
1469
|
function Fl(t) {
|
|
1469
|
-
if (!
|
|
1470
|
+
if (!bt || !t || typeof t != "object")
|
|
1470
1471
|
return !1;
|
|
1471
1472
|
try {
|
|
1472
|
-
|
|
1473
|
+
bt.call(t, bt);
|
|
1473
1474
|
try {
|
|
1474
|
-
|
|
1475
|
+
gt.call(t, gt);
|
|
1475
1476
|
} catch {
|
|
1476
1477
|
return !0;
|
|
1477
1478
|
}
|
|
@@ -1501,7 +1502,7 @@ function Il(t) {
|
|
|
1501
1502
|
}[e];
|
|
1502
1503
|
return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + yl.call(e.toString(16));
|
|
1503
1504
|
}
|
|
1504
|
-
function
|
|
1505
|
+
function pt(t) {
|
|
1505
1506
|
return "Object(" + t + ")";
|
|
1506
1507
|
}
|
|
1507
1508
|
function gr(t) {
|
|
@@ -1559,7 +1560,7 @@ function It(t, e) {
|
|
|
1559
1560
|
ya.call(t, o[d]) && n.push("[" + e(o[d]) + "]: " + e(t[o[d]], t));
|
|
1560
1561
|
return n;
|
|
1561
1562
|
}
|
|
1562
|
-
var ba = nt, at = nl, Dl = ml, Nl =
|
|
1563
|
+
var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map%", !0), kl = at("WeakMap.prototype.get", !0), jl = at("WeakMap.prototype.set", !0), Ll = at("WeakMap.prototype.has", !0), Wl = at("Map.prototype.get", !0), Ul = at("Map.prototype.set", !0), Bl = at("Map.prototype.has", !0), Xr = function(t, e) {
|
|
1563
1564
|
for (var r = t, n; (n = r.next) !== null; r = n)
|
|
1564
1565
|
if (n.key === e)
|
|
1565
1566
|
return r.next = n.next, n.next = /** @type {NonNullable<typeof list.next>} */
|
|
@@ -1743,7 +1744,7 @@ var ba = nt, at = nl, Dl = ml, Nl = Ot, Mt = ba("%WeakMap%", !0), _t = ba("%Map%
|
|
|
1743
1744
|
isRegExp: ru,
|
|
1744
1745
|
maybeMap: ou,
|
|
1745
1746
|
merge: Jl
|
|
1746
|
-
}, Sa = Gl, kt = Ea,
|
|
1747
|
+
}, Sa = Gl, kt = Ea, wt = Jr, iu = Object.prototype.hasOwnProperty, xa = {
|
|
1747
1748
|
brackets: function(e) {
|
|
1748
1749
|
return e + "[]";
|
|
1749
1750
|
},
|
|
@@ -1756,7 +1757,7 @@ var ba = nt, at = nl, Dl = ml, Nl = Ot, Mt = ba("%WeakMap%", !0), _t = ba("%Map%
|
|
|
1756
1757
|
}
|
|
1757
1758
|
}, we = Array.isArray, lu = Array.prototype.push, Oa = function(t, e) {
|
|
1758
1759
|
lu.apply(t, we(e) ? e : [e]);
|
|
1759
|
-
}, uu = Date.prototype.toISOString, qn =
|
|
1760
|
+
}, uu = Date.prototype.toISOString, qn = wt.default, X = {
|
|
1760
1761
|
addQueryPrefix: !1,
|
|
1761
1762
|
allowDots: !1,
|
|
1762
1763
|
allowEmptyArrays: !1,
|
|
@@ -1769,7 +1770,7 @@ var ba = nt, at = nl, Dl = ml, Nl = Ot, Mt = ba("%WeakMap%", !0), _t = ba("%Map%
|
|
|
1769
1770
|
encoder: kt.encode,
|
|
1770
1771
|
encodeValuesOnly: !1,
|
|
1771
1772
|
format: qn,
|
|
1772
|
-
formatter:
|
|
1773
|
+
formatter: wt.formatters[qn],
|
|
1773
1774
|
// deprecated
|
|
1774
1775
|
indices: !1,
|
|
1775
1776
|
serializeDate: function(e) {
|
|
@@ -1859,13 +1860,13 @@ var ba = nt, at = nl, Dl = ml, Nl = Ot, Mt = ba("%WeakMap%", !0), _t = ba("%Map%
|
|
|
1859
1860
|
var r = e.charset || X.charset;
|
|
1860
1861
|
if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
|
|
1861
1862
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1862
|
-
var n =
|
|
1863
|
+
var n = wt.default;
|
|
1863
1864
|
if (typeof e.format < "u") {
|
|
1864
|
-
if (!iu.call(
|
|
1865
|
+
if (!iu.call(wt.formatters, e.format))
|
|
1865
1866
|
throw new TypeError("Unknown format option provided.");
|
|
1866
1867
|
n = e.format;
|
|
1867
1868
|
}
|
|
1868
|
-
var a =
|
|
1869
|
+
var a = wt.formatters[n], o = X.filter;
|
|
1869
1870
|
(typeof e.filter == "function" || we(e.filter)) && (o = e.filter);
|
|
1870
1871
|
var l;
|
|
1871
1872
|
if (e.arrayFormat in xa ? l = e.arrayFormat : "indices" in e ? l = e.indices ? "indices" : "repeat" : l = X.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
|
|
@@ -2347,7 +2348,7 @@ const Tu = ({ children: t }) => {
|
|
|
2347
2348
|
"X-InertiaUI-Modal": !0,
|
|
2348
2349
|
"X-InertiaUI-Modal-Use-Router": V ? 1 : 0
|
|
2349
2350
|
}, V)
|
|
2350
|
-
return
|
|
2351
|
+
return vt.visit(k, {
|
|
2351
2352
|
method: p,
|
|
2352
2353
|
data: Y,
|
|
2353
2354
|
headers: h,
|
|
@@ -2423,8 +2424,8 @@ const Tu = ({ children: t }) => {
|
|
|
2423
2424
|
}, $u = ({ children: t }) => {
|
|
2424
2425
|
const e = ie(zt);
|
|
2425
2426
|
let r = !1, n = !1;
|
|
2426
|
-
K(() =>
|
|
2427
|
-
() =>
|
|
2427
|
+
K(() => vt.on("start", () => r = !0), []), K(() => vt.on("finish", () => r = !1), []), K(
|
|
2428
|
+
() => vt.on("navigate", function(o) {
|
|
2428
2429
|
const l = o.detail.page.props._inertiaui_modal;
|
|
2429
2430
|
if (!l) {
|
|
2430
2431
|
n && e.closeAll();
|
|
@@ -2435,7 +2436,7 @@ const Tu = ({ children: t }) => {
|
|
|
2435
2436
|
console.error("No base url in modal response data so cannot navigate back");
|
|
2436
2437
|
return;
|
|
2437
2438
|
}
|
|
2438
|
-
!r && window.location.href !== l.baseUrl &&
|
|
2439
|
+
!r && window.location.href !== l.baseUrl && vt.visit(l.baseUrl, {
|
|
2439
2440
|
preserveScroll: !0,
|
|
2440
2441
|
preserveState: !0
|
|
2441
2442
|
});
|
|
@@ -2787,7 +2788,7 @@ function Wu() {
|
|
|
2787
2788
|
}
|
|
2788
2789
|
let Uu = "p";
|
|
2789
2790
|
function Bu(t, e) {
|
|
2790
|
-
let r =
|
|
2791
|
+
let r = Ot(), n = Mu(), { id: a = `headlessui-description-${r}`, ...o } = t, l = _a(), u = Se(e);
|
|
2791
2792
|
ae(() => l.register(a), [a, l.register]);
|
|
2792
2793
|
let i = n || !1, d = J(() => ({ ...l.slot, disabled: i }), [l.slot, i]), s = { ref: u, ...l.props, id: a };
|
|
2793
2794
|
return fe()({ ourProps: s, theirProps: o, slot: d, defaultTag: Uu, name: l.name || "Description" });
|
|
@@ -2831,23 +2832,23 @@ let zu = new Yu(() => Na(() => [], { ADD(t) {
|
|
|
2831
2832
|
return r.splice(e, 1), r;
|
|
2832
2833
|
} }));
|
|
2833
2834
|
function ot(t, e) {
|
|
2834
|
-
let r = zu.get(e), n =
|
|
2835
|
+
let r = zu.get(e), n = Ot(), a = ka(r);
|
|
2835
2836
|
if (ae(() => {
|
|
2836
2837
|
if (t) return r.dispatch("ADD", n), () => r.dispatch("REMOVE", n);
|
|
2837
2838
|
}, [r, t]), !t) return !1;
|
|
2838
2839
|
let o = a.indexOf(n), l = a.length;
|
|
2839
2840
|
return o === -1 && (o = l, l += 1), o === l - 1;
|
|
2840
2841
|
}
|
|
2841
|
-
let Lr = /* @__PURE__ */ new Map(),
|
|
2842
|
+
let Lr = /* @__PURE__ */ new Map(), Et = /* @__PURE__ */ new Map();
|
|
2842
2843
|
function Kn(t) {
|
|
2843
2844
|
var e;
|
|
2844
|
-
let r = (e =
|
|
2845
|
-
return
|
|
2845
|
+
let r = (e = Et.get(t)) != null ? e : 0;
|
|
2846
|
+
return Et.set(t, r + 1), r !== 0 ? () => Xn(t) : (Lr.set(t, { "aria-hidden": t.getAttribute("aria-hidden"), inert: t.inert }), t.setAttribute("aria-hidden", "true"), t.inert = !0, () => Xn(t));
|
|
2846
2847
|
}
|
|
2847
2848
|
function Xn(t) {
|
|
2848
2849
|
var e;
|
|
2849
|
-
let r = (e =
|
|
2850
|
-
if (r === 1 ?
|
|
2850
|
+
let r = (e = Et.get(t)) != null ? e : 1;
|
|
2851
|
+
if (r === 1 ? Et.delete(t) : Et.set(t, r - 1), r !== 1) return;
|
|
2851
2852
|
let n = Lr.get(t);
|
|
2852
2853
|
n && (n["aria-hidden"] === null ? t.removeAttribute("aria-hidden") : t.setAttribute("aria-hidden", n["aria-hidden"]), t.inert = n.inert, Lr.delete(t));
|
|
2853
2854
|
}
|
|
@@ -2937,7 +2938,7 @@ function os(t, e = (r) => r) {
|
|
|
2937
2938
|
return l & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : l & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
2938
2939
|
});
|
|
2939
2940
|
}
|
|
2940
|
-
function
|
|
2941
|
+
function St(t, e, { sorted: r = !0, relativeTo: n = null, skipElements: a = [] } = {}) {
|
|
2941
2942
|
let o = Array.isArray(t) ? t.length > 0 ? t[0].ownerDocument : document : t.ownerDocument, l = Array.isArray(t) ? r ? os(t) : t : e & 64 ? es(t) : Zu(t);
|
|
2942
2943
|
a.length > 0 && l.length > 1 && (l = l.filter((w) => !a.some((f) => f != null && "current" in f ? (f == null ? void 0 : f.current) === w : f === w))), n = n ?? o.activeElement;
|
|
2943
2944
|
let u = (() => {
|
|
@@ -2972,7 +2973,7 @@ function is() {
|
|
|
2972
2973
|
function ls() {
|
|
2973
2974
|
return La() || is();
|
|
2974
2975
|
}
|
|
2975
|
-
function
|
|
2976
|
+
function yt(t, e, r, n) {
|
|
2976
2977
|
let a = qe(r);
|
|
2977
2978
|
K(() => {
|
|
2978
2979
|
if (!t) return;
|
|
@@ -3004,24 +3005,24 @@ function us(t, e, r) {
|
|
|
3004
3005
|
for (let v of g) if (v !== null && (v.contains(s) || i.composed && i.composedPath().includes(v))) return;
|
|
3005
3006
|
return !ts(s, ja.Loose) && s.tabIndex !== -1 && i.preventDefault(), a.current(i, s);
|
|
3006
3007
|
}, [a, e]), l = j(null);
|
|
3007
|
-
|
|
3008
|
+
yt(n, "pointerdown", (i) => {
|
|
3008
3009
|
var d, s;
|
|
3009
3010
|
l.current = ((s = (d = i.composedPath) == null ? void 0 : d.call(i)) == null ? void 0 : s[0]) || i.target;
|
|
3010
|
-
}, !0),
|
|
3011
|
+
}, !0), yt(n, "mousedown", (i) => {
|
|
3011
3012
|
var d, s;
|
|
3012
3013
|
l.current = ((s = (d = i.composedPath) == null ? void 0 : d.call(i)) == null ? void 0 : s[0]) || i.target;
|
|
3013
|
-
}, !0),
|
|
3014
|
+
}, !0), yt(n, "click", (i) => {
|
|
3014
3015
|
ls() || l.current && (o(i, () => l.current), l.current = null);
|
|
3015
3016
|
}, !0);
|
|
3016
3017
|
let u = j({ x: 0, y: 0 });
|
|
3017
|
-
|
|
3018
|
+
yt(n, "touchstart", (i) => {
|
|
3018
3019
|
u.current.x = i.touches[0].clientX, u.current.y = i.touches[0].clientY;
|
|
3019
|
-
}, !0),
|
|
3020
|
+
}, !0), yt(n, "touchend", (i) => {
|
|
3020
3021
|
let d = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY };
|
|
3021
3022
|
if (!(Math.abs(d.x - u.current.x) >= Jn || Math.abs(d.y - u.current.y) >= Jn)) return o(i, () => i.target instanceof HTMLElement ? i.target : null);
|
|
3022
3023
|
}, !0), Wa(n, "blur", (i) => o(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
3023
3024
|
}
|
|
3024
|
-
function
|
|
3025
|
+
function Tt(...t) {
|
|
3025
3026
|
return J(() => Xt(...t), [...t]);
|
|
3026
3027
|
}
|
|
3027
3028
|
function Ua(t, e, r, n) {
|
|
@@ -3245,14 +3246,14 @@ function Ba(t) {
|
|
|
3245
3246
|
}
|
|
3246
3247
|
function Ps() {
|
|
3247
3248
|
let t = typeof document > "u";
|
|
3248
|
-
return "useSyncExternalStore" in
|
|
3249
|
+
return "useSyncExternalStore" in ht ? ((e) => e.useSyncExternalStore)(ht)(() => () => {
|
|
3249
3250
|
}, () => !1, () => !t) : !1;
|
|
3250
3251
|
}
|
|
3251
|
-
function
|
|
3252
|
-
let t = Ps(), [e, r] =
|
|
3253
|
-
return e && Ve.isHandoffComplete === !1 && r(!1),
|
|
3252
|
+
function $t() {
|
|
3253
|
+
let t = Ps(), [e, r] = ht.useState(Ve.isHandoffComplete);
|
|
3254
|
+
return e && Ve.isHandoffComplete === !1 && r(!1), ht.useEffect(() => {
|
|
3254
3255
|
e !== !0 && r(!0);
|
|
3255
|
-
}, [e]),
|
|
3256
|
+
}, [e]), ht.useEffect(() => Ve.handoff(), []), t ? !1 : e;
|
|
3256
3257
|
}
|
|
3257
3258
|
let Ha = ce(!1);
|
|
3258
3259
|
function As() {
|
|
@@ -3262,7 +3263,7 @@ function ea(t) {
|
|
|
3262
3263
|
return A.createElement(Ha.Provider, { value: t.force }, t.children);
|
|
3263
3264
|
}
|
|
3264
3265
|
function Ts(t) {
|
|
3265
|
-
let e = As(), r = ie(qa), n =
|
|
3266
|
+
let e = As(), r = ie(qa), n = Tt(t), [a, o] = Q(() => {
|
|
3266
3267
|
var l;
|
|
3267
3268
|
if (!e && r !== null) return (l = r.current) != null ? l : null;
|
|
3268
3269
|
if (Ve.isServer) return null;
|
|
@@ -3281,10 +3282,10 @@ function Ts(t) {
|
|
|
3281
3282
|
let Va = he, $s = le(function(t, e) {
|
|
3282
3283
|
let r = t, n = j(null), a = Se(Lu((g) => {
|
|
3283
3284
|
n.current = g;
|
|
3284
|
-
}), e), o =
|
|
3285
|
+
}), e), o = Tt(n), l = Ts(n), [u] = Q(() => {
|
|
3285
3286
|
var g;
|
|
3286
3287
|
return Ve.isServer ? null : (g = o == null ? void 0 : o.createElement("div")) != null ? g : null;
|
|
3287
|
-
}), i = ie(Ur), d =
|
|
3288
|
+
}), i = ie(Ur), d = $t();
|
|
3288
3289
|
ae(() => {
|
|
3289
3290
|
!l || !u || l.contains(u) || (u.setAttribute("data-headlessui-portal", ""), l.appendChild(u));
|
|
3290
3291
|
}, [l, u]), ae(() => {
|
|
@@ -3334,7 +3335,7 @@ function Ns() {
|
|
|
3334
3335
|
}, [e]), r;
|
|
3335
3336
|
}
|
|
3336
3337
|
function ks({ defaultContainers: t = [], portals: e, mainTreeNode: r } = {}) {
|
|
3337
|
-
let n =
|
|
3338
|
+
let n = Tt(r), a = U(() => {
|
|
3338
3339
|
var o, l;
|
|
3339
3340
|
let u = [];
|
|
3340
3341
|
for (let i of t) i !== null && (i instanceof HTMLElement ? u.push(i) : "current" in i && i.current instanceof HTMLElement && u.push(i.current));
|
|
@@ -3367,7 +3368,7 @@ function rn() {
|
|
|
3367
3368
|
t.current = !1;
|
|
3368
3369
|
}), []), t;
|
|
3369
3370
|
}
|
|
3370
|
-
var
|
|
3371
|
+
var mt = ((t) => (t[t.Forwards = 0] = "Forwards", t[t.Backwards = 1] = "Backwards", t))(mt || {});
|
|
3371
3372
|
function js() {
|
|
3372
3373
|
let t = j(0);
|
|
3373
3374
|
return Wa(!0, "keydown", (e) => {
|
|
@@ -3385,18 +3386,18 @@ let Ls = "div";
|
|
|
3385
3386
|
var We = ((t) => (t[t.None = 0] = "None", t[t.InitialFocus = 1] = "InitialFocus", t[t.TabLock = 2] = "TabLock", t[t.FocusLock = 4] = "FocusLock", t[t.RestoreFocus = 8] = "RestoreFocus", t[t.AutoFocus = 16] = "AutoFocus", t))(We || {});
|
|
3386
3387
|
function Ws(t, e) {
|
|
3387
3388
|
let r = j(null), n = Se(r, e), { initialFocus: a, initialFocusFallback: o, containers: l, features: u = 15, ...i } = t;
|
|
3388
|
-
|
|
3389
|
-
let d =
|
|
3389
|
+
$t() || (u = 0);
|
|
3390
|
+
let d = Tt(r);
|
|
3390
3391
|
Vs(u, { ownerDocument: d });
|
|
3391
3392
|
let s = qs(u, { ownerDocument: d, container: r, initialFocus: a, initialFocusFallback: o });
|
|
3392
3393
|
Gs(u, { ownerDocument: d, container: r, containers: l, previousActiveElement: s });
|
|
3393
3394
|
let g = js(), v = U((h) => {
|
|
3394
3395
|
let b = r.current;
|
|
3395
3396
|
b && ((S) => S())(() => {
|
|
3396
|
-
Ce(g.current, { [
|
|
3397
|
-
|
|
3398
|
-
}, [
|
|
3399
|
-
|
|
3397
|
+
Ce(g.current, { [mt.Forwards]: () => {
|
|
3398
|
+
St(b, Pe.First, { skipElements: [h.relatedTarget, o] });
|
|
3399
|
+
}, [mt.Backwards]: () => {
|
|
3400
|
+
St(b, Pe.Last, { skipElements: [h.relatedTarget, o] });
|
|
3400
3401
|
} });
|
|
3401
3402
|
});
|
|
3402
3403
|
}), w = ot(!!(u & 2), "focus-trap#tab-lock"), f = Zr(), y = j(!1), p = { ref: n, onKeyDown(h) {
|
|
@@ -3408,7 +3409,7 @@ function Ws(t, e) {
|
|
|
3408
3409
|
let b = Ka(l);
|
|
3409
3410
|
r.current instanceof HTMLElement && b.add(r.current);
|
|
3410
3411
|
let S = h.relatedTarget;
|
|
3411
|
-
S instanceof HTMLElement && S.dataset.headlessuiFocusGuard !== "true" && (Xa(b, S) || (y.current ?
|
|
3412
|
+
S instanceof HTMLElement && S.dataset.headlessuiFocusGuard !== "true" && (Xa(b, S) || (y.current ? St(r.current, Ce(g.current, { [mt.Forwards]: () => Pe.Next, [mt.Backwards]: () => Pe.Previous }) | Pe.WrapAround, { relativeTo: h.target }) : h.target instanceof HTMLElement && Ae(h.target)));
|
|
3412
3413
|
} }, m = fe();
|
|
3413
3414
|
return A.createElement(A.Fragment, null, w && A.createElement(jr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable }), m({ ourProps: p, theirProps: i, defaultTag: Ls, name: "FocusTrap" }), w && A.createElement(jr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable }));
|
|
3414
3415
|
}
|
|
@@ -3456,8 +3457,8 @@ function qs(t, { ownerDocument: e, container: r, initialFocus: n, initialFocusFa
|
|
|
3456
3457
|
if (n != null && n.current) Ae(n.current);
|
|
3457
3458
|
else {
|
|
3458
3459
|
if (t & 16) {
|
|
3459
|
-
if (
|
|
3460
|
-
} else if (
|
|
3460
|
+
if (St(i, Pe.First | Pe.AutoFocus) !== Wr.Error) return;
|
|
3461
|
+
} else if (St(i, Pe.First) !== Wr.Error) return;
|
|
3461
3462
|
if (a != null && a.current && (Ae(a.current), (e == null ? void 0 : e.activeElement) === a.current)) return;
|
|
3462
3463
|
console.warn("There are no focusable elements inside the <FocusTrap />");
|
|
3463
3464
|
}
|
|
@@ -3544,7 +3545,7 @@ function Xs(t, e) {
|
|
|
3544
3545
|
return Ce(k, { hidden: () => T(b), visible: () => $(b) });
|
|
3545
3546
|
}
|
|
3546
3547
|
}, [k, b, $, T, M, _]);
|
|
3547
|
-
let D =
|
|
3548
|
+
let D = $t();
|
|
3548
3549
|
ae(() => {
|
|
3549
3550
|
if (S && D && k === "visible" && b.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
3550
3551
|
}, [b, k, D, S]);
|
|
@@ -3572,7 +3573,7 @@ function Xs(t, e) {
|
|
|
3572
3573
|
}
|
|
3573
3574
|
function Js(t, e) {
|
|
3574
3575
|
let { show: r, appear: n = !1, unmount: a = !0, ...o } = t, l = j(null), u = Ja(t), i = Se(...u ? [l, e] : e === null ? [] : [e]);
|
|
3575
|
-
|
|
3576
|
+
$t();
|
|
3576
3577
|
let d = Zt();
|
|
3577
3578
|
if (r === void 0 && d !== null && (r = (d & me.Open) === me.Open), r === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
3578
3579
|
let [s, g] = Q(r ? "visible" : "hidden"), v = Qa(() => {
|
|
@@ -3616,13 +3617,13 @@ function rc(t, e) {
|
|
|
3616
3617
|
return Ce(e.type, tc, t, e);
|
|
3617
3618
|
}
|
|
3618
3619
|
let ra = le(function(t, e) {
|
|
3619
|
-
let r =
|
|
3620
|
+
let r = Ot(), { id: n = `headlessui-dialog-${r}`, open: a, onClose: o, initialFocus: l, role: u = "dialog", autoFocus: i = !0, __demoMode: d = !1, unmount: s = !1, ...g } = t, v = j(!1);
|
|
3620
3621
|
u = function() {
|
|
3621
3622
|
return u === "dialog" || u === "alertdialog" ? u : (v.current || (v.current = !0, console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
|
|
3622
3623
|
}();
|
|
3623
3624
|
let w = Zt();
|
|
3624
3625
|
a === void 0 && w !== null && (a = (w & me.Open) === me.Open);
|
|
3625
|
-
let f = j(null), y = Se(f, e), p =
|
|
3626
|
+
let f = j(null), y = Se(f, e), p = Tt(f), m = a ? 0 : 1, [h, b] = No(rc, { titleId: null, descriptionId: null, panelRef: ko() }), S = U(() => o(!1)), O = U((q) => b({ type: 0, id: q })), _ = $t() ? m === 0 : !1, [M, W] = Is(), H = { get current() {
|
|
3626
3627
|
var q;
|
|
3627
3628
|
return (q = h.panelRef.current) != null ? q : f.current;
|
|
3628
3629
|
} }, k = za(), { resolveContainers: Y } = ks({ mainTreeNode: k, portals: M, defaultContainers: [H] }), V = w !== null ? (w & me.Closing) === me.Closing : !1;
|
|
@@ -3653,7 +3654,7 @@ function oc(t, e) {
|
|
|
3653
3654
|
}
|
|
3654
3655
|
let ic = "div";
|
|
3655
3656
|
function lc(t, e) {
|
|
3656
|
-
let r =
|
|
3657
|
+
let r = Ot(), { id: n = `headlessui-dialog-panel-${r}`, transition: a = !1, ...o } = t, [{ dialogState: l, unmount: u }, i] = nr("Dialog.Panel"), d = Se(e, i.panelRef), s = J(() => ({ open: l === 0 }), [l]), g = U((p) => {
|
|
3657
3658
|
p.stopPropagation();
|
|
3658
3659
|
}), v = { ref: d, id: n, onClick: g }, w = a ? it : he, f = a ? { unmount: u } : {}, y = fe();
|
|
3659
3660
|
return A.createElement(w, { ...f }, y({ ourProps: v, theirProps: o, slot: s, defaultTag: ic, name: "Dialog.Panel" }));
|
|
@@ -3665,7 +3666,7 @@ function sc(t, e) {
|
|
|
3665
3666
|
}
|
|
3666
3667
|
let cc = "h2";
|
|
3667
3668
|
function fc(t, e) {
|
|
3668
|
-
let r =
|
|
3669
|
+
let r = Ot(), { id: n = `headlessui-dialog-title-${r}`, ...a } = t, [{ dialogState: o, setTitleId: l }] = nr("Dialog.Title"), u = Se(e);
|
|
3669
3670
|
K(() => (l(n), () => l(null)), [n, l]);
|
|
3670
3671
|
let i = J(() => ({ open: o === 0 }), [o]), d = { ref: u, id: n };
|
|
3671
3672
|
return fe()({ ourProps: d, theirProps: a, slot: i, defaultTag: cc, name: "Dialog.Title" });
|