fansunited-widgets-cdn 0.0.84 → 0.0.86-RC1
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/chunks/Alert-CuOsmojH.js +149 -0
- package/chunks/AspectRatio-D3Sgxj7p.js +125 -0
- package/chunks/Avatar-BTsEKfhc.js +186 -0
- package/chunks/Button-BV7YIFkS.js +858 -0
- package/chunks/Card-DRIT0wtY.js +129 -0
- package/chunks/CardContent-CD-WZh1l.js +60 -0
- package/chunks/ChevronRight-BrCKlr3T.js +11 -0
- package/chunks/Chip-6HLNTHMI.js +281 -0
- package/chunks/ClassicQuizWrapper-t04e9_6c.js +4883 -0
- package/chunks/CollectLeadForm-DtmR2Vuf-B_3JkHJC.js +1560 -0
- package/chunks/CollectLeadWrapper-CVAVswua.js +1294 -0
- package/chunks/DialogActions-C5kAgHal.js +45 -0
- package/chunks/DialogContent-MIXff4nd.js +60 -0
- package/chunks/EitherOrById-CAo8gPjm.js +1496 -0
- package/chunks/EitherOrPreviewWrapper-DFi2bviS.js +47 -0
- package/chunks/Error-DhQL89pn-BwTV1meb.js +418 -0
- package/chunks/EventGameWrapper-BxyLL3eA.js +7633 -0
- package/chunks/Grid-Dpv_ZL23.js +279 -0
- package/chunks/IconButton-Lt9Xks7c.js +207 -0
- package/chunks/Link-DLuj1USf.js +228 -0
- package/chunks/List-DLPlZGTP.js +397 -0
- package/chunks/ListItemDecorator-CE2eQLip.js +1882 -0
- package/chunks/MatchPredictionContainer-Ct6gXvLw.js +751 -0
- package/chunks/MatchQuizWrapper-Fu6RfWVn.js +11046 -0
- package/chunks/ModalDialog-Ci3hulZA.js +619 -0
- package/chunks/NotFoundSkeleton-BYJTzYJR-Be3R34nS.js +2764 -0
- package/chunks/OverlayLeadAfterCollection-DnqztPJ5-CpELr0AC.js +896 -0
- package/chunks/OverlayScoreStateSkeleton-C9FUhcnd-DMFELrvA.js +146 -0
- package/chunks/PersonalityQuizWrapper-MpUK4n3Y.js +34374 -0
- package/chunks/PlayerOfTheMatch-D4vuR7pz.js +1406 -0
- package/chunks/PollWrapper-CzKj8xxE.js +4198 -0
- package/chunks/Portal-BWqqFvVm-TuHZWjxn.js +12717 -0
- package/chunks/Portal-DA1mxzSo.js +41 -0
- package/chunks/PreviewQuizById-WWS_LyJR.js +4864 -0
- package/chunks/Select-p_cHpLhi.js +3418 -0
- package/chunks/Sheet-BaCzogZK.js +167 -0
- package/chunks/Snackbar-DHxnbCA3.js +358 -0
- package/chunks/Stack-Dgf2LXN0.js +117 -0
- package/chunks/Tabs-CSu_cWNi.js +784 -0
- package/chunks/TeamNextMatchPrediction-C7HilNqW.js +6 -0
- package/chunks/Tutorial-DFNZxmAx.js +427 -0
- package/chunks/createLucideIcon-B6NxpYkb.js +79 -0
- package/chunks/createSvgIcon-7h7XC877.js +119 -0
- package/chunks/createSvgIcon-DVA0KIUd.js +2490 -0
- package/chunks/dataAttributeParser-CF9vxaVN.js +28 -0
- package/chunks/default-quiz-bg-CTzaADn7.js +4 -0
- package/chunks/getReactElementRef-BD-S8A24.js +25 -0
- package/chunks/index-24AwmTVJ.js +85 -0
- package/chunks/index-3vJS8JzK.js +63 -0
- package/chunks/index-BSD7mvEU.js +57 -0
- package/chunks/index-BU6iona7.js +57 -0
- package/chunks/index-BqCHiyI6.js +59 -0
- package/chunks/index-C5qRf4TV.js +20 -0
- package/chunks/index-C9MpfjqV.js +35 -0
- package/chunks/index-CMmQs5A5.js +56 -0
- package/chunks/index-CicEY2Jv.js +5 -0
- package/chunks/index-DNeawo0R.js +17 -0
- package/chunks/index-DePIySlY.js +29 -0
- package/chunks/index-DoRYU_1L.js +41 -0
- package/chunks/index-DvgG9XJj.js +20 -0
- package/chunks/index-QpZE-92Y.js +33 -0
- package/chunks/index-rgFj976B.js +17 -0
- package/chunks/index-tzsdMoo-.js +16 -0
- package/chunks/index.es-CHqz6mjo.js +6162 -0
- package/chunks/init-BEkECL0v.js +32 -0
- package/chunks/main-XP7dqk6g.js +39843 -0
- package/chunks/resolveProps-BfYZubfk.js +37 -0
- package/chunks/users-D_xgC4iQ.js +16 -0
- package/chunks/variantColorInheritance-DI3wUohX.js +28 -0
- package/fu-widgets-loader.es.js +76 -0
- package/fu-widgets-loader.js +1 -0
- package/fu-widgets.es.js +4 -0
- package/fu-widgets.iife.js +621 -682
- package/manifest.json +84 -0
- package/package.json +9 -2
|
@@ -0,0 +1,784 @@
|
|
|
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-XP7dqk6g.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-p_cHpLhi.js";
|
|
3
|
+
import { u as bt, r as pt } from "./Button-BV7YIFkS.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
|
+
};
|