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,784 +0,0 @@
1
- import { r, w as u, j as C, a0 as Y, Z as O, a5 as Z, G as j, F as U, v as D, _ as B, x as N, y as E, z, D as W, a6 as H } from "./main-NO9IQFuY.js";
2
- import { b as Q, o as G, p as A, q, r as w, t as tt, v as et, w as ot, x as at, y as nt, z as st, R as it, n as rt, f as lt, h as ct, d as dt, s as ut } from "./Select-Cewujqtd.js";
3
- import { u as bt, r as pt } from "./Button-DJj0KOh3.js";
4
- function vt(t) {
5
- const {
6
- value: e,
7
- defaultValue: a,
8
- onChange: o,
9
- orientation: n = "horizontal",
10
- direction: i = "ltr",
11
- selectionFollowsFocus: s = !1
12
- } = t, [c, d] = Q({
13
- controlled: e,
14
- default: a,
15
- name: "Tabs",
16
- state: "value"
17
- }), l = r.useCallback((g, h) => {
18
- d(h), o == null || o(g, h);
19
- }, [o, d]), {
20
- subitems: p,
21
- contextValue: b
22
- } = G(), v = r.useRef(() => {
23
- }), f = r.useCallback((g) => {
24
- var h;
25
- return (h = p.get(g)) == null ? void 0 : h.id;
26
- }, [p]), x = r.useCallback((g) => v.current(g), []), m = r.useCallback((g) => {
27
- v.current = g;
28
- }, []);
29
- return {
30
- contextValue: u({
31
- direction: i,
32
- getTabId: x,
33
- getTabPanelId: f,
34
- onSelected: l,
35
- orientation: n,
36
- registerTabIdLookup: m,
37
- selectionFollowsFocus: s,
38
- value: c
39
- }, b)
40
- };
41
- }
42
- const K = /* @__PURE__ */ r.createContext(null);
43
- function J() {
44
- const t = r.useContext(K);
45
- if (t == null)
46
- throw new Error("No TabsContext provided");
47
- return t;
48
- }
49
- function gt(t) {
50
- const {
51
- value: e,
52
- children: a
53
- } = t, {
54
- direction: o,
55
- getItemIndex: n,
56
- onSelected: i,
57
- orientation: s,
58
- registerItem: c,
59
- registerTabIdLookup: d,
60
- selectionFollowsFocus: l,
61
- totalSubitemCount: p,
62
- value: b,
63
- getTabId: v,
64
- getTabPanelId: f
65
- } = e, x = r.useMemo(() => ({
66
- getItemIndex: n,
67
- registerItem: c,
68
- totalSubitemCount: p
69
- }), [c, n, p]), m = r.useMemo(() => ({
70
- direction: o,
71
- getTabId: v,
72
- getTabPanelId: f,
73
- onSelected: i,
74
- orientation: s,
75
- registerTabIdLookup: d,
76
- selectionFollowsFocus: l,
77
- value: b
78
- }), [o, v, f, i, s, d, l, b]);
79
- return /* @__PURE__ */ C.jsx(A.Provider, {
80
- value: x,
81
- children: /* @__PURE__ */ C.jsx(K.Provider, {
82
- value: m,
83
- children: a
84
- })
85
- });
86
- }
87
- function ft(t) {
88
- return t.size;
89
- }
90
- function mt(t) {
91
- const {
92
- value: e,
93
- id: a,
94
- rootRef: o
95
- } = t, n = J();
96
- if (n === null)
97
- throw new Error("No TabContext provided");
98
- const {
99
- value: i,
100
- getTabId: s
101
- } = n, c = Y(a), d = r.useRef(null), l = O(d, o), p = r.useMemo(() => ({
102
- id: c,
103
- ref: d
104
- }), [c]), {
105
- id: b
106
- } = q(e ?? ft, p), v = b !== i, f = b !== void 0 ? s(b) : void 0;
107
- return {
108
- hidden: v,
109
- getRootProps: (m = {}) => u({
110
- "aria-labelledby": f ?? void 0,
111
- hidden: v,
112
- id: c ?? void 0
113
- }, m, {
114
- ref: l
115
- }),
116
- rootRef: l
117
- };
118
- }
119
- const X = {
120
- valueChange: "valueChange"
121
- };
122
- function xt(t, e) {
123
- if (e.type === X.valueChange)
124
- return u({}, t, {
125
- highlightedValue: e.value
126
- });
127
- const a = w(t, e), {
128
- context: {
129
- selectionFollowsFocus: o
130
- }
131
- } = e;
132
- if (e.type === tt.itemsChange) {
133
- if (a.selectedValues.length > 0)
134
- return u({}, a, {
135
- highlightedValue: a.selectedValues[0]
136
- });
137
- et(null, "reset", e.context);
138
- }
139
- return o && a.highlightedValue != null ? u({}, a, {
140
- selectedValues: [a.highlightedValue]
141
- }) : a;
142
- }
143
- function ht(t) {
144
- var e;
145
- const {
146
- rootRef: a
147
- } = t, {
148
- direction: o = "ltr",
149
- onSelected: n,
150
- orientation: i = "horizontal",
151
- value: s,
152
- registerTabIdLookup: c,
153
- selectionFollowsFocus: d
154
- } = J(), {
155
- subitems: l,
156
- contextValue: p
157
- } = G(), b = r.useCallback((P) => {
158
- var y;
159
- return (y = l.get(P)) == null ? void 0 : y.id;
160
- }, [l]);
161
- c(b);
162
- const v = r.useMemo(() => Array.from(l.keys()), [l]), f = r.useCallback((P) => {
163
- var y, $;
164
- return P == null ? null : (y = ($ = l.get(P)) == null ? void 0 : $.ref.current) != null ? y : null;
165
- }, [l]), x = o === "rtl";
166
- let m;
167
- i === "vertical" ? m = "vertical" : m = x ? "horizontal-rtl" : "horizontal-ltr";
168
- const g = r.useCallback((P, y) => {
169
- var $;
170
- n(P, ($ = y[0]) != null ? $ : null);
171
- }, [n]), h = r.useMemo(() => s === void 0 ? {} : s != null ? {
172
- selectedValues: [s]
173
- } : {
174
- selectedValues: []
175
- }, [s]), I = r.useCallback((P) => {
176
- var y, $;
177
- return (y = ($ = l.get(P)) == null ? void 0 : $.disabled) != null ? y : !1;
178
- }, [l]), {
179
- contextValue: R,
180
- dispatch: L,
181
- getRootProps: k,
182
- state: {
183
- highlightedValue: T,
184
- selectedValues: V
185
- },
186
- rootRef: F
187
- } = ot({
188
- controlledProps: h,
189
- disabledItemsFocusable: !d,
190
- focusManagement: "DOM",
191
- getItemDomElement: f,
192
- isItemDisabled: I,
193
- items: v,
194
- rootRef: a,
195
- onChange: g,
196
- orientation: m,
197
- reducerActionContext: r.useMemo(() => ({
198
- selectionFollowsFocus: d || !1
199
- }), [d]),
200
- selectionMode: "single",
201
- stateReducer: xt
202
- });
203
- r.useEffect(() => {
204
- s !== void 0 && s != null && L({
205
- type: X.valueChange,
206
- value: s
207
- });
208
- }, [L, s]);
209
- const _ = (P = {}) => u({}, P, k(P), {
210
- "aria-orientation": i === "vertical" ? "vertical" : void 0,
211
- role: "tablist"
212
- });
213
- return {
214
- contextValue: r.useMemo(() => u({}, p, R), [p, R]),
215
- dispatch: L,
216
- getRootProps: _,
217
- highlightedValue: T,
218
- isRtl: x,
219
- orientation: i,
220
- rootRef: F,
221
- selectedValue: (e = V[0]) != null ? e : null
222
- };
223
- }
224
- function Tt(t) {
225
- const {
226
- value: e,
227
- children: a
228
- } = t, {
229
- dispatch: o,
230
- getItemIndex: n,
231
- getItemState: i,
232
- registerItem: s,
233
- totalSubitemCount: c
234
- } = e, d = r.useMemo(() => ({
235
- dispatch: o,
236
- getItemState: i,
237
- getItemIndex: n
238
- }), [o, n, i]), l = r.useMemo(() => ({
239
- getItemIndex: n,
240
- registerItem: s,
241
- totalSubitemCount: c
242
- }), [s, n, c]);
243
- return /* @__PURE__ */ C.jsx(A.Provider, {
244
- value: l,
245
- children: /* @__PURE__ */ C.jsx(at.Provider, {
246
- value: d,
247
- children: a
248
- })
249
- });
250
- }
251
- function Pt(t) {
252
- return t.size;
253
- }
254
- function Ct(t) {
255
- const {
256
- value: e,
257
- rootRef: a,
258
- disabled: o = !1,
259
- id: n
260
- } = t, i = r.useRef(null), s = Y(n), {
261
- value: c,
262
- selectionFollowsFocus: d,
263
- getTabPanelId: l
264
- } = J(), p = r.useMemo(() => ({
265
- disabled: o,
266
- ref: i,
267
- id: s
268
- }), [o, i, s]), {
269
- id: b,
270
- index: v,
271
- totalItemCount: f
272
- } = q(e ?? Pt, p), {
273
- getRootProps: x,
274
- highlighted: m,
275
- selected: g
276
- } = nt({
277
- item: b
278
- }), {
279
- getRootProps: h,
280
- rootRef: I,
281
- active: R,
282
- focusVisible: L,
283
- setFocusVisible: k
284
- } = bt({
285
- disabled: o,
286
- focusableWhenDisabled: !d,
287
- type: "button"
288
- }), T = O(i, a, I), V = b !== void 0 ? l(b) : void 0;
289
- return {
290
- getRootProps: (_ = {}) => {
291
- const M = Z(_), P = st(x, h);
292
- return u({}, _, P(M), {
293
- role: "tab",
294
- "aria-controls": V,
295
- "aria-selected": g,
296
- id: s,
297
- ref: T
298
- });
299
- },
300
- active: R,
301
- focusVisible: L,
302
- highlighted: m,
303
- index: v,
304
- rootRef: T,
305
- // the `selected` state isn't set on the server (it relies on effects to be calculated),
306
- // so we fall back to checking the `value` prop with the selectedValue from the TabsContext
307
- selected: g || b === c,
308
- setFocusVisible: k,
309
- totalTabsCount: f
310
- };
311
- }
312
- function Rt(t) {
313
- return U("MuiTab", t);
314
- }
315
- const Lt = j("MuiTab", ["root", "disabled", "focusVisible", "selected", "horizontal", "vertical", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]), It = ["action", "children", "value", "disabled", "onChange", "onClick", "onFocus", "component", "orientation", "variant", "color", "disableIndicator", "indicatorPlacement", "indicatorInset", "slots", "slotProps"], yt = (t) => {
316
- const {
317
- selected: e,
318
- disabled: a,
319
- focusVisible: o,
320
- variant: n,
321
- color: i,
322
- orientation: s
323
- } = t, c = {
324
- root: ["root", s, a && "disabled", o && "focusVisible", e && "selected", n && `variant${z(n)}`, i && `color${z(i)}`]
325
- };
326
- return W(c, Rt, {});
327
- }, zt = E(lt, {
328
- name: "JoyTab",
329
- slot: "Root",
330
- overridesResolver: (t, e) => e.root
331
- })(({
332
- ownerState: t
333
- }) => [
334
- {
335
- flex: "initial",
336
- justifyContent: t.row ? "center" : "initial",
337
- "--unstable_ListItemDecorator-alignItems": "center",
338
- "--unstable_offset": "min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"
339
- },
340
- !t.disableIndicator && {
341
- '&[aria-selected="true"]': {
342
- "--Tab-indicatorColor": "currentColor",
343
- zIndex: 1
344
- // to stay above other tab elements
345
- },
346
- // using pseudo element for showing active indicator is best for controlling the size and customization.
347
- // for example, developers can customize the radius, width or background.
348
- // (border and box-shadow are not flexible when it comes to customization).
349
- "&::after": {
350
- content: '""',
351
- display: "block",
352
- position: "absolute",
353
- margin: "auto",
354
- background: "var(--Tab-indicatorColor)",
355
- borderRadius: "var(--Tab-indicatorRadius)"
356
- }
357
- },
358
- // the padding is to account for the indicator's thickness to make the text proportional.
359
- !t.disableIndicator && t.indicatorPlacement === "bottom" && {
360
- paddingBottom: "calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)",
361
- "&::after": {
362
- height: "var(--Tab-indicatorThickness)",
363
- width: "var(--Tab-indicatorSize)",
364
- left: t.indicatorInset ? "var(--ListItem-paddingLeft)" : "var(--unstable_offset)",
365
- right: t.indicatorInset ? "var(--ListItem-paddingRight)" : "var(--unstable_offset)",
366
- bottom: "calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"
367
- }
368
- },
369
- !t.disableIndicator && t.indicatorPlacement === "top" && {
370
- paddingTop: "calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)",
371
- "&::after": {
372
- height: "var(--Tab-indicatorThickness)",
373
- width: "var(--Tab-indicatorSize)",
374
- left: t.indicatorInset ? "var(--ListItem-paddingLeft)" : "var(--unstable_offset)",
375
- right: t.indicatorInset ? "var(--ListItem-paddingRight)" : "var(--unstable_offset)",
376
- top: "calc(-1px - var(--unstable_TabList-underlineTop, 0px))"
377
- }
378
- },
379
- !t.disableIndicator && t.indicatorPlacement === "right" && {
380
- paddingRight: "calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)",
381
- "&::after": {
382
- height: "var(--Tab-indicatorSize)",
383
- width: "var(--Tab-indicatorThickness)",
384
- top: t.indicatorInset ? "var(--ListItem-paddingY)" : "var(--unstable_offset)",
385
- bottom: t.indicatorInset ? "var(--ListItem-paddingY)" : "var(--unstable_offset)",
386
- right: "calc(-1px - var(--unstable_TabList-underlineRight, 0px))"
387
- }
388
- },
389
- !t.disableIndicator && t.indicatorPlacement === "left" && {
390
- paddingLeft: "calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)",
391
- "&::after": {
392
- height: "var(--Tab-indicatorSize)",
393
- width: "var(--Tab-indicatorThickness)",
394
- top: t.indicatorInset ? "var(--ListItem-paddingY)" : "var(--unstable_offset)",
395
- bottom: t.indicatorInset ? "var(--ListItem-paddingY)" : "var(--unstable_offset)",
396
- left: "calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"
397
- }
398
- }
399
- ]), St = /* @__PURE__ */ r.forwardRef(function(e, a) {
400
- const o = D({
401
- props: e,
402
- name: "JoyTab"
403
- }), n = r.useContext(it), {
404
- action: i,
405
- children: s,
406
- disabled: c = !1,
407
- component: d = "button",
408
- orientation: l = "horizontal",
409
- variant: p = "plain",
410
- color: b = "neutral",
411
- disableIndicator: v = !1,
412
- indicatorPlacement: f = n ? "bottom" : "right",
413
- indicatorInset: x = !1,
414
- slots: m = {},
415
- slotProps: g = {}
416
- } = o, h = B(o, It), I = r.useRef(null), R = O(I, a), {
417
- active: L,
418
- focusVisible: k,
419
- setFocusVisible: T,
420
- selected: V,
421
- getRootProps: F
422
- } = Ct(u({}, o, {
423
- rootRef: R
424
- }));
425
- r.useImperativeHandle(i, () => ({
426
- focusVisible: () => {
427
- T(!0), I.current.focus();
428
- }
429
- }), [T]);
430
- const _ = u({}, o, {
431
- disableIndicator: v,
432
- indicatorPlacement: f,
433
- indicatorInset: x,
434
- orientation: l,
435
- row: n,
436
- active: L,
437
- focusVisible: k,
438
- disabled: c,
439
- selected: V,
440
- variant: p,
441
- color: b
442
- }), M = yt(_), P = u({}, h, {
443
- component: d,
444
- slots: m,
445
- slotProps: g
446
- }), [y, $] = N("root", {
447
- ref: a,
448
- elementType: zt,
449
- getSlotProps: F,
450
- externalForwardedProps: P,
451
- ownerState: _,
452
- className: M.root
453
- });
454
- return /* @__PURE__ */ C.jsx(rt.Provider, {
455
- value: l,
456
- children: /* @__PURE__ */ C.jsx(y, u({}, $, {
457
- children: s
458
- }))
459
- });
460
- }), S = /* @__PURE__ */ r.createContext("md");
461
- function kt(t) {
462
- return U("MuiTabList", t);
463
- }
464
- j("MuiTabList", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg"]);
465
- const Vt = ["component", "children", "variant", "color", "size", "disableUnderline", "underlinePlacement", "tabFlex", "sticky", "slots", "slotProps"], $t = (t) => {
466
- const {
467
- orientation: e,
468
- size: a,
469
- variant: o,
470
- color: n
471
- } = t, i = {
472
- root: ["root", e, o && `variant${z(o)}`, n && `color${z(n)}`, a && `size${z(a)}`]
473
- };
474
- return W(i, kt, {});
475
- }, _t = E(dt, {
476
- name: "JoyTabList",
477
- slot: "Root",
478
- overridesResolver: (t, e) => e.root
479
- })(({
480
- theme: t,
481
- ownerState: e
482
- }) => {
483
- var a;
484
- const o = (a = t.variants[e.variant]) == null ? void 0 : a[e.color];
485
- return u({
486
- "--List-gap": "0px",
487
- "--ListDivider-gap": "0px",
488
- "--ListItem-paddingX": "var(--Tabs-spacing)",
489
- "--ListItem-gap": "0.375rem",
490
- // the `var(--unknown,)` is a workaround because emotion does not support space toggle.
491
- "--unstable_TabList-hasUnderline": e.disableUnderline ? "var(--unknown,)" : "initial"
492
- }, ut, {
493
- flexGrow: "initial",
494
- flexDirection: e.orientation === "vertical" ? "column" : "row",
495
- borderRadius: "var(--List-radius, 0px)",
496
- padding: "var(--List-padding, 0px)",
497
- zIndex: 1
498
- }, e.sticky && {
499
- // sticky in list item can be found in grouped options
500
- position: "sticky",
501
- top: e.sticky === "top" ? "calc(-1 * var(--Tabs-padding, 0px))" : "initial",
502
- bottom: e.sticky === "bottom" ? "calc(-1 * var(--Tabs-padding, 0px))" : "initial",
503
- backgroundColor: (o == null ? void 0 : o.backgroundColor) || `var(--TabList-stickyBackground, ${t.vars.palette.background.body})`
504
- }, !e.disableUnderline && u({}, e.underlinePlacement === "bottom" && {
505
- "--unstable_TabList-underlineBottom": "1px",
506
- paddingBottom: 1,
507
- boxShadow: `inset 0 -1px ${t.vars.palette.divider}`
508
- }, e.underlinePlacement === "top" && {
509
- "--unstable_TabList-underlineTop": "1px",
510
- paddingTop: 1,
511
- boxShadow: `inset 0 1px ${t.vars.palette.divider}`
512
- }, e.underlinePlacement === "right" && {
513
- "--unstable_TabList-underlineRight": "1px",
514
- paddingRight: 1,
515
- boxShadow: `inset -1px 0 ${t.vars.palette.divider}`
516
- }, e.underlinePlacement === "left" && {
517
- "--unstable_TabList-underlineLeft": "1px",
518
- paddingLeft: 1,
519
- boxShadow: `inset 1px 0 ${t.vars.palette.divider}`
520
- }), e.tabFlex && {
521
- [`& .${Lt.root}`]: {
522
- flex: e.tabFlex
523
- }
524
- });
525
- }), Ht = /* @__PURE__ */ r.forwardRef(function(e, a) {
526
- const o = D({
527
- props: e,
528
- name: "JoyTabList"
529
- }), n = r.useContext(S), {
530
- isRtl: i,
531
- orientation: s,
532
- getRootProps: c,
533
- contextValue: d
534
- } = ht({
535
- rootRef: a
536
- }), {
537
- component: l = "div",
538
- children: p,
539
- variant: b = "plain",
540
- color: v = "neutral",
541
- size: f,
542
- disableUnderline: x = !1,
543
- underlinePlacement: m = s === "horizontal" ? "bottom" : "right",
544
- tabFlex: g,
545
- sticky: h,
546
- slots: I = {},
547
- slotProps: R = {}
548
- } = o, L = B(o, Vt), T = u({}, o, {
549
- isRtl: i,
550
- orientation: s,
551
- variant: b,
552
- color: v,
553
- size: f ?? n,
554
- sticky: h,
555
- tabFlex: g,
556
- nesting: !1,
557
- disableUnderline: x,
558
- underlinePlacement: m
559
- }), V = $t(T), F = u({}, L, {
560
- component: l,
561
- slots: I,
562
- slotProps: R
563
- }), [_, M] = N("root", {
564
- ref: a,
565
- elementType: _t,
566
- getSlotProps: c,
567
- externalForwardedProps: F,
568
- ownerState: T,
569
- className: V.root
570
- });
571
- return (
572
- // @ts-ignore conflicted ref types
573
- /* @__PURE__ */ C.jsx(_, u({}, M, {
574
- children: /* @__PURE__ */ C.jsx(Tt, {
575
- value: d,
576
- children: /* @__PURE__ */ C.jsx(ct, {
577
- row: s === "horizontal",
578
- nested: !0,
579
- children: p
580
- })
581
- })
582
- }))
583
- );
584
- });
585
- function Ft(t) {
586
- return U("MuiTabPanel", t);
587
- }
588
- j("MuiTabPanel", ["root", "hidden", "sizeSm", "sizeMd", "sizeLg", "horizontal", "vertical", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
589
- const Mt = ["children", "value", "component", "color", "variant", "size", "slots", "slotProps", "keepMounted"], jt = (t) => {
590
- const {
591
- hidden: e,
592
- size: a,
593
- variant: o,
594
- color: n,
595
- orientation: i
596
- } = t, s = {
597
- root: ["root", e && "hidden", a && `size${z(a)}`, i, o && `variant${z(o)}`, n && `color${z(n)}`, a && `size${z(a)}`]
598
- };
599
- return W(s, Ft, {});
600
- }, Ut = E("div", {
601
- name: "JoyTabPanel",
602
- slot: "Root",
603
- overridesResolver: (t, e) => e.root
604
- })(({
605
- theme: t,
606
- ownerState: e
607
- }) => {
608
- var a;
609
- return u({
610
- display: e.hidden ? "none" : "block",
611
- padding: "var(--Tabs-spacing)",
612
- flexGrow: 1,
613
- fontFamily: t.vars.fontFamily.body
614
- }, t.typography[`body-${e.size}`], (a = t.variants[e.variant]) == null ? void 0 : a[e.color]);
615
- }), Yt = /* @__PURE__ */ r.forwardRef(function(e, a) {
616
- const o = D({
617
- props: e,
618
- name: "JoyTabPanel"
619
- }), {
620
- orientation: n
621
- } = J() || {
622
- orientation: "horizontal"
623
- }, i = r.useContext(S), {
624
- children: s,
625
- value: c = 0,
626
- component: d,
627
- color: l = "neutral",
628
- variant: p = "plain",
629
- size: b,
630
- slots: v = {},
631
- slotProps: f = {},
632
- keepMounted: x = !1
633
- } = o, m = B(o, Mt), {
634
- hidden: g,
635
- getRootProps: h
636
- } = mt(u({}, o, {
637
- value: c
638
- })), R = u({}, o, {
639
- orientation: n,
640
- hidden: g,
641
- size: b ?? i,
642
- color: l,
643
- variant: p
644
- }), L = jt(R), k = u({}, m, {
645
- component: d,
646
- slots: v,
647
- slotProps: f
648
- }), [T, V] = N("root", {
649
- ref: a,
650
- elementType: Ut,
651
- getSlotProps: h,
652
- externalForwardedProps: k,
653
- additionalProps: {
654
- role: "tabpanel",
655
- ref: a,
656
- as: d
657
- },
658
- ownerState: R,
659
- className: L.root
660
- });
661
- return x ? /* @__PURE__ */ C.jsx(T, u({}, V, {
662
- children: s
663
- })) : /* @__PURE__ */ C.jsx(T, u({}, V, {
664
- children: !g && s
665
- }));
666
- });
667
- function Dt(t) {
668
- return U("MuiTabs", t);
669
- }
670
- j("MuiTabs", ["root", "horizontal", "vertical", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg"]);
671
- const Bt = ["children", "value", "defaultValue", "orientation", "direction", "component", "onChange", "selectionFollowsFocus", "variant", "color", "size", "slots", "slotProps"], Nt = (t) => {
672
- const {
673
- orientation: e,
674
- variant: a,
675
- color: o,
676
- size: n
677
- } = t, i = {
678
- root: ["root", e, a && `variant${z(a)}`, o && `color${z(o)}`, n && `size${z(n)}`]
679
- };
680
- return W(i, Dt, {});
681
- }, Et = E("div", {
682
- name: "JoyTabs",
683
- slot: "Root",
684
- overridesResolver: (t, e) => e.root
685
- })(({
686
- ownerState: t,
687
- theme: e
688
- }) => {
689
- var a, o;
690
- const n = (a = e.variants[t.variant]) == null ? void 0 : a[t.color], {
691
- bgcolor: i,
692
- backgroundColor: s,
693
- background: c,
694
- p: d,
695
- padding: l
696
- } = pt({
697
- theme: e,
698
- ownerState: t
699
- }, ["bgcolor", "backgroundColor", "background", "p", "padding"]), p = H(e, `palette.${i}`) || i || H(e, `palette.${s}`) || s || c || (n == null ? void 0 : n.backgroundColor) || (n == null ? void 0 : n.background) || e.vars.palette.background.surface;
700
- return u({}, t.size === "sm" && {
701
- "--Tabs-spacing": "0.75rem"
702
- }, t.size === "md" && {
703
- "--Tabs-spacing": "1rem"
704
- }, t.size === "lg" && {
705
- "--Tabs-spacing": "1.25rem"
706
- }, {
707
- "--Tab-indicatorThickness": "2px",
708
- "--Icon-color": t.color !== "neutral" || t.variant === "solid" ? "currentColor" : e.vars.palette.text.icon,
709
- "--TabList-stickyBackground": p === "transparent" ? "initial" : p,
710
- // for sticky TabList
711
- display: "flex",
712
- flexDirection: "column"
713
- }, t.orientation === "vertical" && {
714
- flexDirection: "row"
715
- }, {
716
- backgroundColor: e.vars.palette.background.surface,
717
- position: "relative"
718
- }, e.typography[`body-${t.size}`], (o = e.variants[t.variant]) == null ? void 0 : o[t.color], d !== void 0 && {
719
- "--Tabs-padding": d
720
- }, l !== void 0 && {
721
- "--Tabs-padding": l
722
- });
723
- }), Gt = /* @__PURE__ */ r.forwardRef(function(e, a) {
724
- const o = D({
725
- props: e,
726
- name: "JoyTabs"
727
- }), {
728
- children: n,
729
- value: i,
730
- defaultValue: s,
731
- orientation: c = "horizontal",
732
- direction: d = "ltr",
733
- component: l,
734
- variant: p = "plain",
735
- color: b = "neutral",
736
- size: v = "md",
737
- slots: f = {},
738
- slotProps: x = {}
739
- } = o, m = B(o, Bt), g = s || (i === void 0 ? 0 : void 0), {
740
- contextValue: h
741
- } = vt(u({}, o, {
742
- orientation: c,
743
- defaultValue: g
744
- })), I = u({}, o, {
745
- orientation: c,
746
- direction: d,
747
- variant: p,
748
- color: b,
749
- size: v
750
- }), R = Nt(I), L = u({}, m, {
751
- component: l,
752
- slots: f,
753
- slotProps: x
754
- }), [k, T] = N("root", {
755
- ref: a,
756
- elementType: Et,
757
- externalForwardedProps: L,
758
- additionalProps: {
759
- ref: a,
760
- as: l
761
- },
762
- ownerState: I,
763
- className: R.root
764
- });
765
- return (
766
- // @ts-ignore `defaultValue` between HTMLDiv and TabsProps is conflicted.
767
- /* @__PURE__ */ C.jsx(k, u({}, T, {
768
- children: /* @__PURE__ */ C.jsx(gt, {
769
- value: h,
770
- children: /* @__PURE__ */ C.jsx(S.Provider, {
771
- value: v,
772
- children: n
773
- })
774
- })
775
- }))
776
- );
777
- });
778
- export {
779
- Gt as T,
780
- Ht as a,
781
- St as b,
782
- Yt as c,
783
- Lt as t
784
- };