fansunited-widgets-cdn 0.0.86-RC4 → 0.0.86-RC5

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.
Files changed (85) hide show
  1. package/chunks/{Alert-DuMXT9be.js → Alert-B6o66mYo.js} +39 -39
  2. package/chunks/{CardContent-COgjZl3_.js → CardContent-NCZhfGcZ.js} +16 -16
  3. package/chunks/{Snackbar-DJz-WddP.js → ChevronRight-1pLZ7T0v.js} +100 -94
  4. package/chunks/{ClassicQuizWrapper-C7svf4eh.js → ClassicQuizWrapper-n2epPO4k.js} +201 -205
  5. package/chunks/CollectLeadForm-C_3plJtn-Dr8J3eDw.js +3918 -0
  6. package/chunks/{CollectLeadWrapper-DACvBsa_.js → CollectLeadWrapper-CCtTZAxL.js} +55 -56
  7. package/chunks/EitherOrById-ClGwMK0b.js +6820 -0
  8. package/chunks/EitherOrPreviewWrapper-BYiKyYwi.js +46 -0
  9. package/chunks/Error-BurPfBJw-DWYn31sK.js +1119 -0
  10. package/chunks/{EventGameWrapper-DmjaKr3I.js → EventGameWrapper-BphusLTk.js} +208 -219
  11. package/chunks/{Grid-BbegUe2J.js → Grid-yjqNNhEx.js} +32 -32
  12. package/chunks/{IconButton-zh1RLwcE.js → IconButton-D7onwgY0.js} +22 -22
  13. package/chunks/{List-CA3L6bUS.js → List-8Vy9IZiv.js} +26 -29
  14. package/chunks/{MatchPredictionContainer-CmHKsJ_z.js → MatchPredictionContainer-BGytBwLo.js} +52 -54
  15. package/chunks/{MatchQuizWrapper-BxHHl4a5.js → MatchQuizWrapper-BGjldBpF.js} +73 -85
  16. package/chunks/{OverlayLeadAfterCollection-DnqztPJ5-CJnicIes.js → OverlayLeadAfterCollection-Bjh1xAB5-DgVOuSX5.js} +104 -105
  17. package/chunks/{OverlayScoreStateSkeleton-C9FUhcnd-CZ7cct30.js → OverlayScoreStateSkeleton-Cha5KeNi-fyZTu-l5.js} +18 -19
  18. package/chunks/{PersonalityQuizWrapper-B-Rkzvc0.js → PersonalityQuizWrapper-BgLFw5tM.js} +3 -3
  19. package/chunks/{PlayerOfTheMatch-CzGMT1jr.js → PlayerOfTheMatch-CImBLG3T.js} +1008 -609
  20. package/chunks/{PollWrapper-Cdl3AbXE.js → PollWrapper-QpIKCCVF.js} +30 -34
  21. package/chunks/Portal-DegkUXpU-ByGP9zS1.js +19236 -0
  22. package/chunks/{PreviewQuizById-CPiwewW_.js → PreviewQuizById-Ba6yhxKV.js} +11 -14
  23. package/chunks/Sheet-U5EnSrgg.js +282 -0
  24. package/chunks/{Stack-BBjT-MoB.js → Stack-DbDi7kPO.js} +30 -30
  25. package/chunks/Tabs-leN3Fb8D--YMyy3EM.js +783 -0
  26. package/chunks/{TeamNextMatchPrediction-BOOGeVEv.js → TeamNextMatchPrediction-9VSQOCcC.js} +2 -2
  27. package/chunks/Tutorial-CRJLOovs.js +1072 -0
  28. package/chunks/createLucideIcon-CMWOQsDL.js +381 -0
  29. package/chunks/{createSvgIcon-cOpRx8M1.js → createSvgIcon-D9D4a1R9.js} +412 -390
  30. package/chunks/default-quiz-bg-ADjjIfPj.js +126 -0
  31. package/chunks/{index-CNAE4RYY.js → index-0ADq_9jd.js} +1 -1
  32. package/chunks/{index-D9kNvflO.js → index-B74jHeYm.js} +2 -2
  33. package/chunks/{index-Dr-yGqo_.js → index-BfVvJg5R.js} +1 -1
  34. package/chunks/{index-D3wDyWq_.js → index-BycLbIYY.js} +1 -1
  35. package/chunks/{index-BKyd0MUt.js → index-C6KAc5B_.js} +1 -1
  36. package/chunks/{index-BkU2GDR4.js → index-CHV6tlpH.js} +5 -5
  37. package/chunks/{index-Uv42o9aR.js → index-CILd3yUc.js} +1 -1
  38. package/chunks/index-CJqcqbHq.js +5 -0
  39. package/chunks/{index-DrlzgjUf.js → index-CK2RXrJm.js} +1 -1
  40. package/chunks/{index-DFXrZaoM.js → index-CPTAlr_t.js} +1 -1
  41. package/chunks/{index-D1SEUyHT.js → index-CiB_Gqim.js} +1 -1
  42. package/chunks/{index-CNukXTLi.js → index-CvGJXa6l.js} +1 -1
  43. package/chunks/{index-CpFMxpj1.js → index-CviTG4Nv.js} +1 -1
  44. package/chunks/index-DUQ2LFod-Cw45tHim.js +4510 -0
  45. package/chunks/{index-DbZ10tsY.js → index-Da0AXb_O.js} +1 -1
  46. package/chunks/{index-CiI_vSMR.js → index-DwR4J2nN.js} +1 -1
  47. package/chunks/{index-CMhbRdLz.js → index-UwW9niUj.js} +1 -1
  48. package/chunks/index.es-wHqA4PHm.js +11480 -0
  49. package/chunks/{init-DYY4CJtu.js → init-C-gCorsh.js} +1 -1
  50. package/chunks/{main-NO9IQFuY.js → main-Bh6iw92_.js} +94 -110
  51. package/chunks/{Button-DJj0KOh3.js → resolveProps-Bgg0H6c2.js} +471 -313
  52. package/chunks/{users-C-6eqEb6.js → users-CXdzg3DM.js} +1 -1
  53. package/fu-widgets.es.js +2 -2
  54. package/fu-widgets.iife.js +310 -257
  55. package/manifest.json +56 -72
  56. package/package.json +1 -1
  57. package/chunks/AspectRatio-CKWgGwn-.js +0 -125
  58. package/chunks/Avatar-Cv70g9HX.js +0 -186
  59. package/chunks/Card-BDn3dk3E.js +0 -129
  60. package/chunks/ChevronRight-BwGivLSL.js +0 -11
  61. package/chunks/Chip-BkY7Uww3.js +0 -281
  62. package/chunks/CollectLeadForm-DtmR2Vuf-DvAoHDnn.js +0 -1560
  63. package/chunks/DialogActions-CuXgjeCi.js +0 -45
  64. package/chunks/DialogContent-CyQJ8yz-.js +0 -60
  65. package/chunks/EitherOrById-B8v0nJmv.js +0 -1496
  66. package/chunks/EitherOrPreviewWrapper-C9O6TEVe.js +0 -47
  67. package/chunks/Error-DhQL89pn-DD0O1kEt.js +0 -418
  68. package/chunks/Link-Cw8ci6QQ.js +0 -228
  69. package/chunks/ListItemDecorator-DwvO_ty1.js +0 -1882
  70. package/chunks/ModalDialog-DLPhSR9-.js +0 -619
  71. package/chunks/NotFoundSkeleton-BYJTzYJR-JURKfNZv.js +0 -2764
  72. package/chunks/Portal-BWqqFvVm-pvatNKfM.js +0 -12717
  73. package/chunks/Portal-BsATdUrC.js +0 -41
  74. package/chunks/Select-Cewujqtd.js +0 -3418
  75. package/chunks/Sheet-B8wNvQTa.js +0 -167
  76. package/chunks/Tabs-BP1RMTCA.js +0 -784
  77. package/chunks/Tutorial-B1LWDD9l.js +0 -427
  78. package/chunks/createLucideIcon-nPUeaUEe.js +0 -79
  79. package/chunks/createSvgIcon-DhITitgm.js +0 -119
  80. package/chunks/default-quiz-bg-CTzaADn7.js +0 -4
  81. package/chunks/getReactElementRef-66jU_By9.js +0 -25
  82. package/chunks/index-BPH9IX2Q.js +0 -5
  83. package/chunks/index.es-BZbN3xaq.js +0 -6162
  84. package/chunks/resolveProps-BfYZubfk.js +0 -37
  85. package/chunks/variantColorInheritance-DVZ9CGcB.js +0 -28
@@ -1,619 +0,0 @@
1
- import { r as i, Z as X, j as P, w as M, a5 as ne, F as Z, G as Q, v as ee, _ as te, x as U, y as L, D as oe, a0 as _, E as re, z as j } from "./main-NO9IQFuY.js";
2
- import { g as ae, o as A, u as J } from "./getReactElementRef-66jU_By9.js";
3
- import { o as K, P as se } from "./Portal-BsATdUrC.js";
4
- import { S as ie } from "./Card-BDn3dk3E.js";
5
- import { i as le } from "./Button-DJj0KOh3.js";
6
- function V(...e) {
7
- return e.reduce((t, n) => n == null ? t : function(...a) {
8
- t.apply(this, a), n.apply(this, a);
9
- }, () => {
10
- });
11
- }
12
- function de(e) {
13
- const t = e.documentElement.clientWidth;
14
- return Math.abs(window.innerWidth - t);
15
- }
16
- const ce = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
17
- function ue(e) {
18
- const t = parseInt(e.getAttribute("tabindex") || "", 10);
19
- return Number.isNaN(t) ? e.contentEditable === "true" || (e.nodeName === "AUDIO" || e.nodeName === "VIDEO" || e.nodeName === "DETAILS") && e.getAttribute("tabindex") === null ? 0 : e.tabIndex : t;
20
- }
21
- function fe(e) {
22
- if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name)
23
- return !1;
24
- const t = (o) => e.ownerDocument.querySelector(`input[type="radio"]${o}`);
25
- let n = t(`[name="${e.name}"]:checked`);
26
- return n || (n = t(`[name="${e.name}"]`)), n !== e;
27
- }
28
- function pe(e) {
29
- return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || fe(e));
30
- }
31
- function ge(e) {
32
- const t = [], n = [];
33
- return Array.from(e.querySelectorAll(ce)).forEach((o, a) => {
34
- const r = ue(o);
35
- r === -1 || !pe(o) || (r === 0 ? t.push(o) : n.push({
36
- documentOrder: a,
37
- tabIndex: r,
38
- node: o
39
- }));
40
- }), n.sort((o, a) => o.tabIndex === a.tabIndex ? o.documentOrder - a.documentOrder : o.tabIndex - a.tabIndex).map((o) => o.node).concat(t);
41
- }
42
- function me() {
43
- return !0;
44
- }
45
- function he(e) {
46
- const {
47
- children: t,
48
- disableAutoFocus: n = !1,
49
- disableEnforceFocus: o = !1,
50
- disableRestoreFocus: a = !1,
51
- getTabbable: r = ge,
52
- isEnabled: s = me,
53
- open: d
54
- } = e, u = i.useRef(!1), h = i.useRef(null), p = i.useRef(null), b = i.useRef(null), R = i.useRef(null), v = i.useRef(!1), c = i.useRef(null), I = X(ae(t), c), S = i.useRef(null);
55
- i.useEffect(() => {
56
- !d || !c.current || (v.current = !n);
57
- }, [n, d]), i.useEffect(() => {
58
- if (!d || !c.current)
59
- return;
60
- const l = A(c.current);
61
- return c.current.contains(l.activeElement) || (c.current.hasAttribute("tabIndex") || c.current.setAttribute("tabIndex", "-1"), v.current && c.current.focus()), () => {
62
- a || (b.current && b.current.focus && (u.current = !0, b.current.focus()), b.current = null);
63
- };
64
- }, [d]), i.useEffect(() => {
65
- if (!d || !c.current)
66
- return;
67
- const l = A(c.current), x = (E) => {
68
- S.current = E, !(o || !s() || E.key !== "Tab") && l.activeElement === c.current && E.shiftKey && (u.current = !0, p.current && p.current.focus());
69
- }, y = () => {
70
- const E = c.current;
71
- if (E === null)
72
- return;
73
- if (!l.hasFocus() || !s() || u.current) {
74
- u.current = !1;
75
- return;
76
- }
77
- if (E.contains(l.activeElement) || o && l.activeElement !== h.current && l.activeElement !== p.current)
78
- return;
79
- if (l.activeElement !== R.current)
80
- R.current = null;
81
- else if (R.current !== null)
82
- return;
83
- if (!v.current)
84
- return;
85
- let C = [];
86
- if ((l.activeElement === h.current || l.activeElement === p.current) && (C = r(c.current)), C.length > 0) {
87
- var F, m;
88
- const O = !!((F = S.current) != null && F.shiftKey && ((m = S.current) == null ? void 0 : m.key) === "Tab"), T = C[0], W = C[C.length - 1];
89
- typeof T != "string" && typeof W != "string" && (O ? W.focus() : T.focus());
90
- } else
91
- E.focus();
92
- };
93
- l.addEventListener("focusin", y), l.addEventListener("keydown", x, !0);
94
- const k = setInterval(() => {
95
- l.activeElement && l.activeElement.tagName === "BODY" && y();
96
- }, 50);
97
- return () => {
98
- clearInterval(k), l.removeEventListener("focusin", y), l.removeEventListener("keydown", x, !0);
99
- };
100
- }, [n, o, a, s, d, r]);
101
- const N = (l) => {
102
- b.current === null && (b.current = l.relatedTarget), v.current = !0, R.current = l.target;
103
- const x = t.props.onFocus;
104
- x && x(l);
105
- }, D = (l) => {
106
- b.current === null && (b.current = l.relatedTarget), v.current = !0;
107
- };
108
- return /* @__PURE__ */ P.jsxs(i.Fragment, {
109
- children: [/* @__PURE__ */ P.jsx("div", {
110
- tabIndex: d ? 0 : -1,
111
- onFocus: D,
112
- ref: h,
113
- "data-testid": "sentinelStart"
114
- }), /* @__PURE__ */ i.cloneElement(t, {
115
- ref: I,
116
- onFocus: N
117
- }), /* @__PURE__ */ P.jsx("div", {
118
- tabIndex: d ? 0 : -1,
119
- onFocus: D,
120
- ref: p,
121
- "data-testid": "sentinelEnd"
122
- })]
123
- });
124
- }
125
- function be(e) {
126
- const t = A(e);
127
- return t.body === e ? K(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
128
- }
129
- function $(e, t) {
130
- t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
131
- }
132
- function Y(e) {
133
- return parseInt(K(e).getComputedStyle(e).paddingRight, 10) || 0;
134
- }
135
- function ve(e) {
136
- const n = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(e.tagName) !== -1, o = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
137
- return n || o;
138
- }
139
- function q(e, t, n, o, a) {
140
- const r = [t, n, ...o];
141
- [].forEach.call(e.children, (s) => {
142
- const d = r.indexOf(s) === -1, u = !ve(s);
143
- d && u && $(s, a);
144
- });
145
- }
146
- function B(e, t) {
147
- let n = -1;
148
- return e.some((o, a) => t(o) ? (n = a, !0) : !1), n;
149
- }
150
- function xe(e, t) {
151
- const n = [], o = e.container;
152
- if (!t.disableScrollLock) {
153
- if (be(o)) {
154
- const s = de(A(o));
155
- n.push({
156
- value: o.style.paddingRight,
157
- property: "padding-right",
158
- el: o
159
- }), o.style.paddingRight = `${Y(o) + s}px`;
160
- const d = A(o).querySelectorAll(".mui-fixed");
161
- [].forEach.call(d, (u) => {
162
- n.push({
163
- value: u.style.paddingRight,
164
- property: "padding-right",
165
- el: u
166
- }), u.style.paddingRight = `${Y(u) + s}px`;
167
- });
168
- }
169
- let r;
170
- if (o.parentNode instanceof DocumentFragment)
171
- r = A(o).body;
172
- else {
173
- const s = o.parentElement, d = K(o);
174
- r = (s == null ? void 0 : s.nodeName) === "HTML" && d.getComputedStyle(s).overflowY === "scroll" ? s : o;
175
- }
176
- n.push({
177
- value: r.style.overflow,
178
- property: "overflow",
179
- el: r
180
- }, {
181
- value: r.style.overflowX,
182
- property: "overflow-x",
183
- el: r
184
- }, {
185
- value: r.style.overflowY,
186
- property: "overflow-y",
187
- el: r
188
- }), r.style.overflow = "hidden";
189
- }
190
- return () => {
191
- n.forEach(({
192
- value: r,
193
- el: s,
194
- property: d
195
- }) => {
196
- r ? s.style.setProperty(d, r) : s.style.removeProperty(d);
197
- });
198
- };
199
- }
200
- function ye(e) {
201
- const t = [];
202
- return [].forEach.call(e.children, (n) => {
203
- n.getAttribute("aria-hidden") === "true" && t.push(n);
204
- }), t;
205
- }
206
- class Ee {
207
- constructor() {
208
- this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
209
- }
210
- add(t, n) {
211
- let o = this.modals.indexOf(t);
212
- if (o !== -1)
213
- return o;
214
- o = this.modals.length, this.modals.push(t), t.modalRef && $(t.modalRef, !1);
215
- const a = ye(n);
216
- q(n, t.mount, t.modalRef, a, !0);
217
- const r = B(this.containers, (s) => s.container === n);
218
- return r !== -1 ? (this.containers[r].modals.push(t), o) : (this.containers.push({
219
- modals: [t],
220
- container: n,
221
- restore: null,
222
- hiddenSiblings: a
223
- }), o);
224
- }
225
- mount(t, n) {
226
- const o = B(this.containers, (r) => r.modals.indexOf(t) !== -1), a = this.containers[o];
227
- a.restore || (a.restore = xe(a, n));
228
- }
229
- remove(t, n = !0) {
230
- const o = this.modals.indexOf(t);
231
- if (o === -1)
232
- return o;
233
- const a = B(this.containers, (s) => s.modals.indexOf(t) !== -1), r = this.containers[a];
234
- if (r.modals.splice(r.modals.indexOf(t), 1), this.modals.splice(o, 1), r.modals.length === 0)
235
- r.restore && r.restore(), t.modalRef && $(t.modalRef, n), q(r.container, t.mount, t.modalRef, r.hiddenSiblings, !1), this.containers.splice(a, 1);
236
- else {
237
- const s = r.modals[r.modals.length - 1];
238
- s.modalRef && $(s.modalRef, !1);
239
- }
240
- return o;
241
- }
242
- isTopModal(t) {
243
- return this.modals.length > 0 && this.modals[this.modals.length - 1] === t;
244
- }
245
- }
246
- function Me(e) {
247
- return typeof e == "function" ? e() : e;
248
- }
249
- function Re(e) {
250
- return e ? e.props.hasOwnProperty("in") : !1;
251
- }
252
- const Ce = new Ee();
253
- function Te(e) {
254
- const {
255
- container: t,
256
- disableEscapeKeyDown: n = !1,
257
- disableScrollLock: o = !1,
258
- // @ts-ignore internal logic - Base UI supports the manager as a prop too
259
- manager: a = Ce,
260
- closeAfterTransition: r = !1,
261
- onTransitionEnter: s,
262
- onTransitionExited: d,
263
- children: u,
264
- onClose: h,
265
- open: p,
266
- rootRef: b
267
- } = e, R = i.useRef({}), v = i.useRef(null), c = i.useRef(null), I = X(c, b), [S, N] = i.useState(!p), D = Re(u);
268
- let l = !0;
269
- (e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (l = !1);
270
- const x = () => A(v.current), y = () => (R.current.modalRef = c.current, R.current.mount = v.current, R.current), k = () => {
271
- a.mount(y(), {
272
- disableScrollLock: o
273
- }), c.current && (c.current.scrollTop = 0);
274
- }, E = J(() => {
275
- const g = Me(t) || x().body;
276
- a.add(y(), g), c.current && k();
277
- }), C = i.useCallback(() => a.isTopModal(y()), [a]), F = J((g) => {
278
- v.current = g, g && (p && C() ? k() : c.current && $(c.current, l));
279
- }), m = i.useCallback(() => {
280
- a.remove(y(), l);
281
- }, [l, a]);
282
- i.useEffect(() => () => {
283
- m();
284
- }, [m]), i.useEffect(() => {
285
- p ? E() : (!D || !r) && m();
286
- }, [p, m, D, r, E]);
287
- const O = (g) => (f) => {
288
- var w;
289
- (w = g.onKeyDown) == null || w.call(g, f), !(f.key !== "Escape" || f.which === 229 || // Wait until IME is settled.
290
- !C()) && (n || (f.stopPropagation(), h && h(f, "escapeKeyDown")));
291
- }, T = (g) => (f) => {
292
- var w;
293
- (w = g.onClick) == null || w.call(g, f), f.target === f.currentTarget && h && h(f, "backdropClick");
294
- };
295
- return {
296
- getRootProps: (g = {}) => {
297
- const f = ne(e);
298
- delete f.onTransitionEnter, delete f.onTransitionExited;
299
- const w = M({}, f, g);
300
- return M({
301
- role: "presentation"
302
- }, w, {
303
- onKeyDown: O(w),
304
- ref: I
305
- });
306
- },
307
- getBackdropProps: (g = {}) => {
308
- const f = g;
309
- return M({
310
- "aria-hidden": !0
311
- }, f, {
312
- onClick: T(f),
313
- open: p
314
- });
315
- },
316
- getTransitionProps: () => {
317
- const g = () => {
318
- N(!1), s && s();
319
- }, f = () => {
320
- N(!0), d && d(), r && m();
321
- };
322
- return {
323
- onEnter: V(g, u == null ? void 0 : u.props.onEnter),
324
- onExited: V(f, u == null ? void 0 : u.props.onExited)
325
- };
326
- },
327
- rootRef: I,
328
- portalRef: F,
329
- isTopModal: C,
330
- exited: S,
331
- hasTransition: D
332
- };
333
- }
334
- function De(e) {
335
- return Z("MuiModalDialog", e);
336
- }
337
- const _e = Q("MuiModalDialog", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "layoutCenter", "layoutFullscreen"]), Pe = /* @__PURE__ */ i.createContext(void 0), ke = /* @__PURE__ */ i.createContext(void 0);
338
- function Ie(e) {
339
- return Z("MuiModal", e);
340
- }
341
- Q("MuiModal", ["root", "hidden", "backdrop"]);
342
- const Se = /* @__PURE__ */ i.createContext(void 0), Oe = ["children", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onClose", "onKeyDown", "open", "component", "slots", "slotProps"], Ne = (e) => {
343
- const {
344
- open: t
345
- } = e;
346
- return oe({
347
- root: ["root", !t && "hidden"],
348
- backdrop: ["backdrop"]
349
- }, Ie, {});
350
- }, Fe = L("div")(({
351
- ownerState: e,
352
- theme: t
353
- }) => M({
354
- "--unstable_popup-zIndex": `calc(${t.vars.zIndex.modal} + 1)`,
355
- '& ~ [role="listbox"]': {
356
- // target all the listbox (Autocomplete, Menu, Select, etc.) that uses portal
357
- "--unstable_popup-zIndex": `calc(${t.vars.zIndex.modal} + 1)`
358
- },
359
- position: "fixed",
360
- zIndex: t.vars.zIndex.modal,
361
- right: 0,
362
- bottom: 0,
363
- top: 0,
364
- left: 0
365
- }, !e.open && {
366
- visibility: "hidden"
367
- })), We = L(Fe, {
368
- name: "JoyModal",
369
- slot: "Root",
370
- overridesResolver: (e, t) => t.root
371
- })({}), we = L("div")(({
372
- theme: e
373
- }) => ({
374
- zIndex: -1,
375
- position: "fixed",
376
- right: 0,
377
- bottom: 0,
378
- top: 0,
379
- left: 0,
380
- backgroundColor: e.vars.palette.background.backdrop,
381
- WebkitTapHighlightColor: "transparent",
382
- backdropFilter: "blur(8px)"
383
- })), ze = L(we, {
384
- name: "JoyModal",
385
- slot: "Backdrop",
386
- overridesResolver: (e, t) => t.backdrop
387
- })({}), Je = /* @__PURE__ */ i.forwardRef(function(t, n) {
388
- const o = ee({
389
- props: t,
390
- name: "JoyModal"
391
- }), {
392
- children: a,
393
- container: r,
394
- disableAutoFocus: s = !1,
395
- disableEnforceFocus: d = !1,
396
- disableEscapeKeyDown: u = !1,
397
- disablePortal: h = !1,
398
- disableRestoreFocus: p = !1,
399
- disableScrollLock: b = !1,
400
- hideBackdrop: R = !1,
401
- keepMounted: v = !1,
402
- onClose: c,
403
- open: I,
404
- component: S,
405
- slots: N = {},
406
- slotProps: D = {}
407
- } = o, l = te(o, Oe), x = M({}, o, {
408
- disableAutoFocus: s,
409
- disableEnforceFocus: d,
410
- disableEscapeKeyDown: u,
411
- disablePortal: h,
412
- disableRestoreFocus: p,
413
- disableScrollLock: b,
414
- hideBackdrop: R,
415
- keepMounted: v
416
- }), {
417
- getRootProps: y,
418
- getBackdropProps: k,
419
- rootRef: E,
420
- portalRef: C,
421
- isTopModal: F
422
- } = Te(M({}, x, {
423
- rootRef: n
424
- })), m = Ne(x), O = M({}, l, {
425
- component: S,
426
- slots: N,
427
- slotProps: D
428
- }), [T, W] = U("root", {
429
- ref: E,
430
- className: m.root,
431
- elementType: We,
432
- externalForwardedProps: O,
433
- getSlotProps: y,
434
- ownerState: x
435
- }), [H, z] = U("backdrop", {
436
- className: m.backdrop,
437
- elementType: ze,
438
- externalForwardedProps: O,
439
- getSlotProps: k,
440
- ownerState: x
441
- });
442
- return !v && !I ? null : /* @__PURE__ */ P.jsx(Se.Provider, {
443
- value: c,
444
- children: /* @__PURE__ */ P.jsx(se, {
445
- ref: C,
446
- container: r,
447
- disablePortal: h,
448
- children: /* @__PURE__ */ P.jsxs(T, M({}, W, {
449
- children: [R ? null : /* @__PURE__ */ P.jsx(H, M({}, z)), /* @__PURE__ */ P.jsx(he, {
450
- disableEnforceFocus: d,
451
- disableAutoFocus: s,
452
- disableRestoreFocus: p,
453
- isEnabled: F,
454
- open: I,
455
- children: i.Children.only(a) && /* @__PURE__ */ i.cloneElement(a, M({}, a.props.tabIndex === void 0 && {
456
- tabIndex: -1
457
- }))
458
- })]
459
- }))
460
- })
461
- });
462
- }), Ae = ["className", "children", "invertedColors", "orientation", "color", "component", "variant", "size", "layout", "maxWidth", "minWidth", "slots", "slotProps"], He = (e) => {
463
- const {
464
- variant: t,
465
- color: n,
466
- size: o,
467
- layout: a
468
- } = e, r = {
469
- root: ["root", t && `variant${j(t)}`, n && `color${j(n)}`, o && `size${j(o)}`, a && `layout${j(a)}`]
470
- };
471
- return oe(r, De, {});
472
- };
473
- function G(e, t) {
474
- var n, o;
475
- return t && (n = e.breakpoints) != null && n.values[t] ? `${(o = e.breakpoints) == null ? void 0 : o.values[t]}px` : t;
476
- }
477
- const $e = L(ie, {
478
- name: "JoyModalDialog",
479
- slot: "Root",
480
- overridesResolver: (e, t) => t.root
481
- })(({
482
- theme: e,
483
- ownerState: t
484
- }) => M({
485
- "--ModalDialog-minWidth": typeof t.minWidth == "number" ? `${t.minWidth}px` : G(e, t.minWidth),
486
- "--ModalDialog-maxWidth": typeof t.maxWidth == "number" ? `${t.maxWidth}px` : G(e, t.maxWidth),
487
- "--ModalClose-radius": "max((var(--Card-radius) - var(--variant-borderWidth, 0px)) - var(--ModalClose-inset), min(var(--ModalClose-inset) / 2, (var(--Card-radius) - var(--variant-borderWidth, 0px)) / 2))"
488
- }, t.variant === "solid" && {
489
- "--DialogContent-color": "currentColor"
490
- }, t.size === "sm" && {
491
- "--Card-padding": "1rem",
492
- "--ModalDialog-titleOffset": e.spacing(0.25),
493
- "--ModalDialog-descriptionOffset": e.spacing(0.25),
494
- "--ModalClose-inset": "0.375rem"
495
- }, t.size === "md" && {
496
- "--Card-padding": "1.25rem",
497
- "--ModalDialog-titleOffset": e.spacing(0.25),
498
- "--ModalDialog-descriptionOffset": e.spacing(0.75),
499
- "--ModalClose-inset": "0.5rem"
500
- }, t.size === "lg" && {
501
- "--Card-padding": "1.5rem",
502
- "--ModalDialog-titleOffset": e.spacing(0.5),
503
- "--ModalDialog-descriptionOffset": e.spacing(1),
504
- "--ModalClose-inset": "0.625rem"
505
- }, {
506
- boxSizing: "border-box",
507
- boxShadow: e.shadow.md,
508
- minWidth: "min(calc(100vw - 2 * var(--Card-padding)), var(--ModalDialog-minWidth, 300px))",
509
- outline: 0,
510
- position: "absolute"
511
- }, t.layout === "fullscreen" && {
512
- top: 0,
513
- left: 0,
514
- right: 0,
515
- bottom: 0,
516
- border: 0,
517
- borderRadius: 0
518
- }, t.layout === "center" && {
519
- top: "50%",
520
- left: "50%",
521
- transform: "translate(-50%, -50%)",
522
- maxWidth: "min(calc(100vw - 2 * var(--Card-padding)), var(--ModalDialog-maxWidth, 100vw))",
523
- maxHeight: "calc(100% - 2 * var(--Card-padding))"
524
- }, {
525
- [`& [id="${t["aria-labelledby"]}"]`]: {
526
- "--Typography-margin": "calc(-1 * var(--ModalDialog-titleOffset)) 0 var(--ModalDialog-gap) 0",
527
- "--Typography-fontSize": "1.125em",
528
- [`& + [id="${t["aria-describedby"]}"]`]: {
529
- "--unstable_ModalDialog-descriptionOffset": "calc(-1 * var(--ModalDialog-descriptionOffset))"
530
- }
531
- },
532
- [`& [id="${t["aria-describedby"]}"]`]: {
533
- "--Typography-fontSize": "1em",
534
- "--Typography-margin": "var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 0 0",
535
- "&:not(:last-child)": {
536
- // create spacing between description and the next element.
537
- "--Typography-margin": "var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 var(--ModalDialog-gap) 0"
538
- }
539
- }
540
- })), Ve = /* @__PURE__ */ i.forwardRef(function(t, n) {
541
- const o = ee({
542
- props: t,
543
- name: "JoyModalDialog"
544
- }), {
545
- className: a,
546
- children: r,
547
- invertedColors: s = !1,
548
- orientation: d = "vertical",
549
- color: u = "neutral",
550
- component: h = "div",
551
- variant: p = "outlined",
552
- size: b = "md",
553
- layout: R = "center",
554
- maxWidth: v,
555
- minWidth: c,
556
- slots: I = {},
557
- slotProps: S = {}
558
- } = o, N = te(o, Ae), D = M({}, o, {
559
- color: u,
560
- component: h,
561
- maxWidth: v,
562
- minWidth: c,
563
- layout: R,
564
- size: b,
565
- variant: p,
566
- invertedColors: s
567
- }), l = He(D), x = M({}, N, {
568
- component: h,
569
- slots: I,
570
- slotProps: S
571
- }), y = _(), k = _(), E = i.useMemo(() => ({
572
- variant: p,
573
- color: u,
574
- labelledBy: y,
575
- describedBy: k
576
- }), [u, p, y, k]), [C, F] = U("root", {
577
- ref: n,
578
- className: re(l.root, a),
579
- elementType: $e,
580
- externalForwardedProps: x,
581
- ownerState: D,
582
- additionalProps: {
583
- as: h,
584
- role: "dialog",
585
- "aria-modal": "true",
586
- "aria-labelledby": y,
587
- "aria-describedby": k
588
- }
589
- });
590
- return /* @__PURE__ */ P.jsx(ke.Provider, {
591
- value: b,
592
- children: /* @__PURE__ */ P.jsx(Pe.Provider, {
593
- value: E,
594
- children: /* @__PURE__ */ P.jsx(C, M({}, F, {
595
- children: i.Children.map(r, (m, O) => {
596
- if (!/* @__PURE__ */ i.isValidElement(m))
597
- return m;
598
- const T = {};
599
- if (le(m, ["Divider"])) {
600
- var W, H;
601
- const z = m.props;
602
- T.inset = (W = z == null ? void 0 : z.inset) != null ? W : "context";
603
- const g = d === "vertical" ? "horizontal" : "vertical";
604
- T.orientation = (H = z == null ? void 0 : z.orientation) != null ? H : g;
605
- }
606
- return O === 0 && (T["data-first-child"] = ""), O === i.Children.count(r) - 1 && (T["data-last-child"] = ""), /* @__PURE__ */ i.cloneElement(m, T);
607
- })
608
- }))
609
- })
610
- });
611
- });
612
- export {
613
- Se as C,
614
- Je as M,
615
- Ve as a,
616
- ke as b,
617
- Pe as c,
618
- _e as m
619
- };