fansunited-frontend-components 0.0.92 → 0.0.94

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 (139) hide show
  1. package/Betslip.js +1 -1
  2. package/ChanceGame.js +139 -146
  3. package/ClassicQuizPlay.js +1 -1
  4. package/CollectLead.js +14 -20
  5. package/CompetitionStatistics.js +27 -27
  6. package/CompetitorCard.js +895 -891
  7. package/Discussion.js +1 -1
  8. package/EitherOrPlay.js +1 -1
  9. package/EventCard.js +1494 -1571
  10. package/EventGamePlay.js +1 -1
  11. package/Leaderboard.js +249 -257
  12. package/List.js +319 -436
  13. package/MatchQuizPlay.js +1 -1
  14. package/Odds.js +30 -30
  15. package/PersonalityQuizPlay.js +1 -1
  16. package/PickThePair.js +627 -693
  17. package/PlayerOfTheMatch.js +256 -279
  18. package/PollVote.js +1 -1
  19. package/Predictor.js +19443 -2
  20. package/README.md +2 -1
  21. package/Standings.js +94 -99
  22. package/TopX.js +5871 -6988
  23. package/chunks/ChanceGameEmbedVariant-C3NGwvTF.js +21 -0
  24. package/chunks/OddsSkeleton-Bav8FHHN.js +26 -0
  25. package/chunks/{OddsStrip-B159Nivm.js → OddsStrip-CviVfQI4.js} +51 -53
  26. package/chunks/{PickOneOfX-D9qlxKTD.js → PickOneOfX-a6Dv0-rR.js} +210 -212
  27. package/chunks/index-B1d9q8fX.js +4 -0
  28. package/chunks/index-BP0pvFJ4.js +4 -0
  29. package/chunks/index-CHZyL_g_.js +4 -0
  30. package/chunks/index-CeCUdRmF.js +4 -0
  31. package/chunks/index-Ckyyw-I8.js +4 -0
  32. package/chunks/index-DGvCP5G8.js +4 -0
  33. package/chunks/index-yjMVOgwO.js +4 -0
  34. package/chunks/{main-CcPVuc5G.js → main-CFwRpvUi.js} +219 -238
  35. package/chunks/{main-By2Fg4Us.js → main-D9tFZv2q.js} +272 -309
  36. package/chunks/{main-Db4YC1C9.js → main-Dj4Manb5.js} +386 -407
  37. package/chunks/{main-BhONg691.js → main-DjiQz1dv.js} +764 -1125
  38. package/chunks/{main-BoLNJccN.js → main-Dys2_Jt2.js} +1625 -1954
  39. package/chunks/{main-JAewg2VD.js → main-dwV_55lz.js} +409 -432
  40. package/chunks/main-eAQMCxQ7.js +1949 -0
  41. package/chunks/{main-CWfREbUv.js → main-gexg6lc-.js} +959 -977
  42. package/index.js +40 -44
  43. package/package.json +13 -5
  44. package/chunks/AccessTime-B7Q_InTi.js +0 -10
  45. package/chunks/AlertMessage-CTbc9daZ.js +0 -318
  46. package/chunks/Avatar-Ve0m4ut_.js +0 -353
  47. package/chunks/Button-x1sQVMH2.js +0 -665
  48. package/chunks/Card-DfxnA3Cz.js +0 -196
  49. package/chunks/CardActions-TMBAbk8a.js +0 -140
  50. package/chunks/CardContent-CLQHztIU.js +0 -106
  51. package/chunks/ChanceGameEmbedVariant-C3TKbPI4.js +0 -913
  52. package/chunks/CheckCircle-DW1VzjQO.js +0 -8
  53. package/chunks/Chip-BUoNpinI.js +0 -365
  54. package/chunks/CircularProgress-D88LgW2V.js +0 -317
  55. package/chunks/Close-BxLZcPtb.js +0 -9
  56. package/chunks/Close-DVx6f5-e.js +0 -8
  57. package/chunks/CollectLeadForm-DtUFKk99.js +0 -3419
  58. package/chunks/ConsentsList-BcIMKviP.js +0 -339
  59. package/chunks/DirectionScope-CK0duYt8.js +0 -36
  60. package/chunks/Divider-D_ALv2uC.js +0 -166
  61. package/chunks/Edit-CiKqhDom.js +0 -99
  62. package/chunks/EmojiEvents-BYoxruEl.js +0 -8
  63. package/chunks/FavoriteBorder-YhT6RHv5.js +0 -11
  64. package/chunks/FormControl-BNG04EhC.js +0 -656
  65. package/chunks/FormControlContext-Ct0huDDM.js +0 -6
  66. package/chunks/FormLabel-Bl7hTa8O.js +0 -130
  67. package/chunks/GlobalStyles-PokSS9bO.js +0 -12
  68. package/chunks/InlineSpinner-BhKW6lxZ.js +0 -28
  69. package/chunks/Input-B7kPqO0b.js +0 -391
  70. package/chunks/KeyboardArrowDown-OGGGLEnE.js +0 -8
  71. package/chunks/KeyboardArrowRight-DN7qrp17.js +0 -11
  72. package/chunks/KeyboardArrowUp-jvN5m_A0.js +0 -8
  73. package/chunks/Link-brb09X-6.js +0 -319
  74. package/chunks/ListItemButton-BFG5QJbo.js +0 -1151
  75. package/chunks/ModalClose-D3i-AyMB.js +0 -153
  76. package/chunks/ModalDialog-Be6w76fh.js +0 -880
  77. package/chunks/NotFoundSkeleton-BHRVG8yg.js +0 -83
  78. package/chunks/Notification-CC66HKXb.js +0 -614
  79. package/chunks/OddsSkeleton-BBOVhfsn.js +0 -137
  80. package/chunks/OverlayScoreStateSkeleton-D5rnBJ_w.js +0 -154
  81. package/chunks/OverlayScoreStateWrapperSkeleton-CTXzD0bm.js +0 -81
  82. package/chunks/OverlaySignInSkeleton-T8A_9Tco.js +0 -518
  83. package/chunks/OverlaySkeleton-y02LRXZy.js +0 -1193
  84. package/chunks/Person-BD-IO4aX.js +0 -8
  85. package/chunks/PersonOutline-Nxl_9g9S.js +0 -8
  86. package/chunks/Popper-CGfJHTbM.js +0 -1263
  87. package/chunks/Portal-DQQSLiON.js +0 -74
  88. package/chunks/Portal-X8O64KaQ.js +0 -66
  89. package/chunks/Predictor-BJBBwZ6R.js +0 -19513
  90. package/chunks/PrizeCard-B2tBhY45.js +0 -36400
  91. package/chunks/Search-jaDXe8g7.js +0 -14
  92. package/chunks/Select-CzBMHr7z.js +0 -1165
  93. package/chunks/Sheet-x-YGYOYz.js +0 -132
  94. package/chunks/SignInCta-3NFxIOuf.js +0 -79
  95. package/chunks/Spinner-_5U881sC.js +0 -39
  96. package/chunks/SportsSoccer-DLUgspA-.js +0 -20
  97. package/chunks/Stack-CDpKA1D-.js +0 -169
  98. package/chunks/StandardContentSkeleton-DaZftDxZ.js +0 -57
  99. package/chunks/Table-IJ9-D2DF.js +0 -394
  100. package/chunks/Tabs-iyOvjGfd.js +0 -1084
  101. package/chunks/Textarea-Dv_Z4l5j.js +0 -475
  102. package/chunks/TimerOutlined-jNsK__Zz.js +0 -8
  103. package/chunks/Tooltip-clSjN1oC.js +0 -535
  104. package/chunks/Typography-BsucZNXl.js +0 -775
  105. package/chunks/areArraysEqual-B3mXtHvh.js +0 -6
  106. package/chunks/colorInversionUtils-AoR_6ghW.js +0 -347
  107. package/chunks/createSvgIcon-BWoHeNkc.js +0 -2813
  108. package/chunks/createSvgIcon-DBkOhFdn.js +0 -206
  109. package/chunks/dividerClasses-BkQMLbsL.js +0 -9
  110. package/chunks/elementAcceptingRef-DjUfkpLB.js +0 -25
  111. package/chunks/enums-B1lTCQvC.js +0 -15
  112. package/chunks/formLabelClasses-N0g8NZ67.js +0 -9
  113. package/chunks/getReactElementRef-B3MFPBbS.js +0 -21
  114. package/chunks/helpers-CKFwVhwj.js +0 -558
  115. package/chunks/index-Bg5jypgn.js +0 -11
  116. package/chunks/index-Bnad45hB.js +0 -4
  117. package/chunks/index-C6rtfeRX.js +0 -4
  118. package/chunks/index-CFc0WTOi.js +0 -848
  119. package/chunks/index-C_kf8WZI.js +0 -4
  120. package/chunks/index-CaVpDbdC.js +0 -4
  121. package/chunks/index-DJJVbXn_.js +0 -4
  122. package/chunks/index-DQO7VDRC.js +0 -4
  123. package/chunks/index-Kgehqf8J.js +0 -4
  124. package/chunks/main-W_W6YBtr.js +0 -3280
  125. package/chunks/ownerWindow-PI509BpA.js +0 -7
  126. package/chunks/searchEntities-SJcoznz0.js +0 -38
  127. package/chunks/sportsEvents-CGX-WkNB.js +0 -27
  128. package/chunks/useButton-C9taTgFS.js +0 -106
  129. package/chunks/useConsents-BLhgfEDf.js +0 -1168
  130. package/chunks/useControlled-BYdyS7Pn.js +0 -31
  131. package/chunks/useEmbedCode-DCWnWGak.js +0 -31
  132. package/chunks/useEventCallback-C9W0M_8l.js +0 -14
  133. package/chunks/useForwardedInput-CkAnayh_.js +0 -180
  134. package/chunks/useImageVariant-B62O7iLC.js +0 -15
  135. package/chunks/useInfoPage-BHdgKdme.js +0 -50
  136. package/chunks/useParticipationDraft-Brnd_p3w.js +0 -307
  137. package/chunks/useSwitch-DLSSqtcZ.js +0 -66
  138. package/chunks/variantColorInheritance-DZr7CNx6.js +0 -30
  139. package/chunks/visuallyHidden-B8J7BVSJ.js +0 -14
@@ -1,1151 +0,0 @@
1
- import { _ as g, D as Ee, F as K, G as Y, P as o, H as re, I as oe, J as M } from "./PrizeCard-B2tBhY45.js";
2
- import * as l from "react";
3
- import { a as te } from "./areArraysEqual-B3mXtHvh.js";
4
- import { u as se, e as ae, s as j, a as le, b as ce, c as ue } from "./Typography-BsucZNXl.js";
5
- import { r as Oe } from "./colorInversionUtils-AoR_6ghW.js";
6
- import { jsx as k } from "react/jsx-runtime";
7
- import { u as Se } from "./useButton-C9taTgFS.js";
8
- function Ve(t, e) {
9
- return t === e;
10
- }
11
- const X = {}, ne = () => {
12
- };
13
- function J(t, e) {
14
- const i = g({}, t);
15
- return Object.keys(e).forEach((n) => {
16
- e[n] !== void 0 && (i[n] = e[n]);
17
- }), i;
18
- }
19
- function ke(t) {
20
- const {
21
- nextState: e,
22
- initialState: i,
23
- stateComparers: n,
24
- onStateChange: r,
25
- controlledProps: a,
26
- lastActionRef: s
27
- } = t, c = l.useRef(i);
28
- l.useEffect(() => {
29
- if (s.current === null)
30
- return;
31
- const u = J(c.current, a);
32
- Object.keys(e).forEach((f) => {
33
- var L;
34
- const m = (L = n[f]) != null ? L : Ve, h = e[f], p = u[f];
35
- if (p == null && h != null || p != null && h == null || p != null && h != null && !m(h, p)) {
36
- var d, I;
37
- r == null || r((d = s.current.event) != null ? d : null, f, h, (I = s.current.type) != null ? I : "", e);
38
- }
39
- }), c.current = e, s.current = null;
40
- }, [c, e, s, r, n, a]);
41
- }
42
- function Pe(t) {
43
- const e = l.useRef(null), {
44
- reducer: i,
45
- initialState: n,
46
- controlledProps: r = X,
47
- stateComparers: a = X,
48
- onStateChange: s = ne,
49
- actionContext: c,
50
- componentName: u = ""
51
- } = t, f = l.useRef(r);
52
- process.env.NODE_ENV !== "production" && l.useEffect(() => {
53
- Object.keys(r).forEach((d) => {
54
- f.current[d] !== void 0 && r[d] === void 0 && console.error(`useControllableReducer: ${u ? `The ${u} component` : "A component"} is changing a controlled prop to be uncontrolled: ${d}`), f.current[d] === void 0 && r[d] !== void 0 && console.error(`useControllableReducer: ${u ? `The ${u} component` : "A component"} is changing an uncontrolled prop to be controlled: ${d}`);
55
- });
56
- }, [r, u]);
57
- const L = l.useCallback((d, I) => {
58
- e.current = I;
59
- const R = J(d, r);
60
- return i(R, I);
61
- }, [r, i]), [m, h] = l.useReducer(L, n), p = l.useCallback((d) => {
62
- h(g({}, d, {
63
- context: c
64
- }));
65
- }, [c]);
66
- return ke({
67
- nextState: m,
68
- initialState: n,
69
- stateComparers: a ?? X,
70
- onStateChange: s ?? ne,
71
- controlledProps: r,
72
- lastActionRef: e
73
- }), [J(m, r), p];
74
- }
75
- const C = {
76
- blur: "list:blur",
77
- focus: "list:focus",
78
- itemClick: "list:itemClick",
79
- itemHover: "list:itemHover",
80
- itemsChange: "list:itemsChange",
81
- keyDown: "list:keyDown",
82
- resetHighlight: "list:resetHighlight",
83
- highlightLast: "list:highlightLast",
84
- textNavigation: "list:textNavigation",
85
- clearSelection: "list:clearSelection"
86
- };
87
- function Te(t, e, i, n, r, a) {
88
- if (i.length === 0 || !n && i.every((c, u) => r(c, u)))
89
- return -1;
90
- let s = t;
91
- for (; ; ) {
92
- if (!a && e === "next" && s === i.length || !a && e === "previous" && s === -1)
93
- return -1;
94
- if (n ? !1 : r(i[s], s))
95
- s += e === "next" ? 1 : -1, a && (s = (s + i.length) % i.length);
96
- else
97
- return s;
98
- }
99
- }
100
- function D(t, e, i) {
101
- var n;
102
- const {
103
- items: r,
104
- isItemDisabled: a,
105
- disableListWrap: s,
106
- disabledItemsFocusable: c,
107
- itemComparer: u,
108
- focusManagement: f
109
- } = i, L = f === "DOM" ? 0 : -1, m = r.length - 1, h = t == null ? -1 : r.findIndex((y) => u(y, t));
110
- let p, d, I = !s;
111
- switch (e) {
112
- case "reset":
113
- if (L === -1)
114
- return null;
115
- p = 0, d = "next", I = !1;
116
- break;
117
- case "start":
118
- p = 0, d = "next", I = !1;
119
- break;
120
- case "end":
121
- p = m, d = "previous", I = !1;
122
- break;
123
- default: {
124
- const y = h + e;
125
- y < 0 ? !I && h !== -1 || Math.abs(e) > 1 ? (p = 0, d = "next") : (p = m, d = "previous") : y > m ? !I || Math.abs(e) > 1 ? (p = m, d = "previous") : (p = 0, d = "next") : (p = y, d = e >= 0 ? "next" : "previous");
126
- }
127
- }
128
- const R = Te(p, d, r, c, a, I);
129
- return R === -1 && t !== null && !a(t, h) ? t : (n = r[R]) != null ? n : null;
130
- }
131
- function ze(t, e, i, n) {
132
- return i === "none" ? [] : i === "single" ? n(e[0], t) ? e : [t] : e.some((r) => n(r, t)) ? e.filter((r) => !n(r, t)) : [...e, t];
133
- }
134
- function de(t, e, i) {
135
- const {
136
- itemComparer: n,
137
- isItemDisabled: r,
138
- selectionMode: a,
139
- items: s
140
- } = i, {
141
- selectedValues: c
142
- } = e, u = s.findIndex((L) => n(t, L));
143
- if (r(t, u))
144
- return e;
145
- const f = ze(t, c, a, n);
146
- return g({}, e, {
147
- selectedValues: f,
148
- highlightedValue: t
149
- });
150
- }
151
- function _e(t, e, i) {
152
- const n = e.highlightedValue, {
153
- orientation: r,
154
- pageSize: a
155
- } = i;
156
- switch (t) {
157
- case "Home":
158
- return g({}, e, {
159
- highlightedValue: D(n, "start", i)
160
- });
161
- case "End":
162
- return g({}, e, {
163
- highlightedValue: D(n, "end", i)
164
- });
165
- case "PageUp":
166
- return g({}, e, {
167
- highlightedValue: D(n, -a, i)
168
- });
169
- case "PageDown":
170
- return g({}, e, {
171
- highlightedValue: D(n, a, i)
172
- });
173
- case "ArrowUp":
174
- if (r !== "vertical")
175
- break;
176
- return g({}, e, {
177
- highlightedValue: D(n, -1, i)
178
- });
179
- case "ArrowDown":
180
- if (r !== "vertical")
181
- break;
182
- return g({}, e, {
183
- highlightedValue: D(n, 1, i)
184
- });
185
- case "ArrowLeft": {
186
- if (r === "vertical")
187
- break;
188
- return g({}, e, {
189
- highlightedValue: D(n, r === "horizontal-ltr" ? -1 : 1, i)
190
- });
191
- }
192
- case "ArrowRight": {
193
- if (r === "vertical")
194
- break;
195
- return g({}, e, {
196
- highlightedValue: D(n, r === "horizontal-ltr" ? 1 : -1, i)
197
- });
198
- }
199
- case "Enter":
200
- case " ":
201
- return e.highlightedValue === null ? e : de(e.highlightedValue, e, i);
202
- }
203
- return e;
204
- }
205
- function $e(t, e) {
206
- return e.focusManagement === "DOM" ? t : g({}, t, {
207
- highlightedValue: null
208
- });
209
- }
210
- function we(t, e, i) {
211
- var n;
212
- const r = (n = i(t)) == null ? void 0 : n.trim().toLowerCase();
213
- return !r || r.length === 0 ? !1 : r.indexOf(e) === 0;
214
- }
215
- function Me(t, e, i) {
216
- const {
217
- items: n,
218
- isItemDisabled: r,
219
- disabledItemsFocusable: a,
220
- getItemAsString: s
221
- } = i, c = e.length > 1;
222
- let u = c ? t.highlightedValue : D(t.highlightedValue, 1, i);
223
- for (let f = 0; f < n.length; f += 1) {
224
- if (!u || !c && t.highlightedValue === u)
225
- return t;
226
- if (we(u, e, s) && (!r(u, n.indexOf(u)) || a))
227
- return g({}, t, {
228
- highlightedValue: u
229
- });
230
- u = D(u, 1, i);
231
- }
232
- return t;
233
- }
234
- function Be(t, e, i, n) {
235
- var r;
236
- const {
237
- itemComparer: a,
238
- focusManagement: s
239
- } = n;
240
- let c = null;
241
- if (i.highlightedValue != null) {
242
- var u;
243
- c = (u = t.find((m) => a(m, i.highlightedValue))) != null ? u : null;
244
- } else s === "DOM" && e.length === 0 && (c = D(null, "reset", n));
245
- const L = ((r = i.selectedValues) != null ? r : []).filter((m) => t.some((h) => a(h, m)));
246
- return g({}, i, {
247
- highlightedValue: c,
248
- selectedValues: L
249
- });
250
- }
251
- function Ae(t, e) {
252
- return g({}, t, {
253
- highlightedValue: D(null, "reset", e)
254
- });
255
- }
256
- function He(t, e) {
257
- return g({}, t, {
258
- highlightedValue: D(null, "end", e)
259
- });
260
- }
261
- function We(t, e) {
262
- return g({}, t, {
263
- selectedValues: [],
264
- highlightedValue: D(null, "reset", e)
265
- });
266
- }
267
- function je(t, e) {
268
- const {
269
- type: i,
270
- context: n
271
- } = e;
272
- switch (i) {
273
- case C.keyDown:
274
- return _e(e.key, t, n);
275
- case C.itemClick:
276
- return de(e.item, t, n);
277
- case C.blur:
278
- return $e(t, n);
279
- case C.textNavigation:
280
- return Me(t, e.searchString, n);
281
- case C.itemsChange:
282
- return Be(e.items, e.previousItems, t, n);
283
- case C.resetHighlight:
284
- return Ae(t, n);
285
- case C.highlightLast:
286
- return He(t, n);
287
- case C.clearSelection:
288
- return We(t, n);
289
- default:
290
- return t;
291
- }
292
- }
293
- const Ue = 500;
294
- function Fe(t) {
295
- const e = l.useRef({
296
- searchString: "",
297
- lastTime: null
298
- });
299
- return l.useCallback((i) => {
300
- if (i.key.length === 1 && i.key !== " ") {
301
- const n = e.current, r = i.key.toLowerCase(), a = performance.now();
302
- n.searchString.length > 0 && n.lastTime && a - n.lastTime > Ue ? n.searchString = r : (n.searchString.length !== 1 || r !== n.searchString) && (n.searchString += r), n.lastTime = a, t(n.searchString, i);
303
- }
304
- }, [t]);
305
- }
306
- const ie = {}, Ge = () => {
307
- }, Xe = (t, e) => t === e, Je = () => !1, Ke = (t) => typeof t == "string" ? t : String(t), Ye = () => ({
308
- highlightedValue: null,
309
- selectedValues: []
310
- });
311
- function It(t) {
312
- const {
313
- controlledProps: e = ie,
314
- disabledItemsFocusable: i = !1,
315
- disableListWrap: n = !1,
316
- focusManagement: r = "activeDescendant",
317
- getInitialState: a = Ye,
318
- getItemDomElement: s,
319
- getItemId: c,
320
- isItemDisabled: u = Je,
321
- rootRef: f,
322
- onStateChange: L = Ge,
323
- items: m,
324
- itemComparer: h = Xe,
325
- getItemAsString: p = Ke,
326
- onChange: d,
327
- onHighlightChange: I,
328
- onItemsChange: R,
329
- orientation: y = "vertical",
330
- pageSize: z = 5,
331
- reducerActionContext: _ = ie,
332
- selectionMode: P = "single",
333
- stateReducer: E,
334
- componentName: T = "useList"
335
- } = t;
336
- if (process.env.NODE_ENV !== "production") {
337
- if (r === "DOM" && s == null)
338
- throw new Error("useList: The `getItemDomElement` prop is required when using the `DOM` focus management.");
339
- if (r === "activeDescendant" && c == null)
340
- throw new Error("useList: The `getItemId` prop is required when using the `activeDescendant` focus management.");
341
- }
342
- const $ = l.useRef(null), w = se(f, $), O = l.useCallback((x, v, b) => {
343
- if (I == null || I(x, v, b), r === "DOM" && v != null && (b === C.itemClick || b === C.keyDown || b === C.textNavigation)) {
344
- var N;
345
- s == null || (N = s(v)) == null || N.focus();
346
- }
347
- }, [s, I, r]), S = l.useMemo(() => ({
348
- highlightedValue: h,
349
- selectedValues: (x, v) => te(x, v, h)
350
- }), [h]), A = l.useCallback((x, v, b, N, H) => {
351
- switch (L == null || L(x, v, b, N, H), v) {
352
- case "highlightedValue":
353
- O(x, b, N);
354
- break;
355
- case "selectedValues":
356
- d == null || d(x, b, N);
357
- break;
358
- }
359
- }, [O, d, L]), Z = l.useMemo(() => ({
360
- disabledItemsFocusable: i,
361
- disableListWrap: n,
362
- focusManagement: r,
363
- isItemDisabled: u,
364
- itemComparer: h,
365
- items: m,
366
- getItemAsString: p,
367
- onHighlightChange: O,
368
- orientation: y,
369
- pageSize: z,
370
- selectionMode: P,
371
- stateComparers: S
372
- }), [i, n, r, u, h, m, p, O, y, z, P, S]), Le = a(), xe = E ?? je, Ce = l.useMemo(() => g({}, _, Z), [_, Z]), [U, V] = Pe({
373
- reducer: xe,
374
- actionContext: Ce,
375
- initialState: Le,
376
- controlledProps: e,
377
- stateComparers: S,
378
- onStateChange: A,
379
- componentName: T
380
- }), {
381
- highlightedValue: B,
382
- selectedValues: F
383
- } = U, be = Fe((x, v) => V({
384
- type: C.textNavigation,
385
- event: v,
386
- searchString: x
387
- })), G = l.useRef([]);
388
- l.useEffect(() => {
389
- te(G.current, m, h) || (V({
390
- type: C.itemsChange,
391
- event: null,
392
- items: m,
393
- previousItems: G.current
394
- }), G.current = m, R == null || R(m));
395
- }, [m, h, V, R]);
396
- const ye = (x) => (v) => {
397
- var b;
398
- if ((b = x.onKeyDown) == null || b.call(x, v), v.defaultMuiPrevented)
399
- return;
400
- const N = ["Home", "End", "PageUp", "PageDown"];
401
- y === "vertical" ? N.push("ArrowUp", "ArrowDown") : N.push("ArrowLeft", "ArrowRight"), r === "activeDescendant" && N.push(" ", "Enter"), N.includes(v.key) && v.preventDefault(), V({
402
- type: C.keyDown,
403
- key: v.key,
404
- event: v
405
- }), be(v);
406
- }, Ne = (x) => (v) => {
407
- var b, N;
408
- (b = x.onBlur) == null || b.call(x, v), !v.defaultMuiPrevented && ((N = $.current) != null && N.contains(v.relatedTarget) || V({
409
- type: C.blur,
410
- event: v
411
- }));
412
- }, De = (x = {}) => {
413
- const v = ae(x);
414
- return g({}, x, {
415
- "aria-activedescendant": r === "activeDescendant" && B != null ? c(B) : void 0,
416
- tabIndex: r === "DOM" ? -1 : 0,
417
- ref: w
418
- }, v, {
419
- onBlur: Ne(v),
420
- onKeyDown: ye(v)
421
- });
422
- }, ee = l.useCallback((x) => {
423
- const v = (F ?? []).some((H) => H != null && h(x, H)), b = B != null && h(x, B);
424
- return {
425
- focusable: r === "DOM",
426
- highlighted: b,
427
- selected: v
428
- };
429
- }, [h, F, B, r]), Re = l.useMemo(() => ({
430
- dispatch: V,
431
- getItemState: ee
432
- }), [V, ee]);
433
- return l.useDebugValue({
434
- state: U
435
- }), {
436
- contextValue: Re,
437
- dispatch: V,
438
- getRootProps: De,
439
- rootRef: w,
440
- state: U
441
- };
442
- }
443
- const ge = /* @__PURE__ */ l.createContext(null);
444
- process.env.NODE_ENV !== "production" && (ge.displayName = "ListContext");
445
- function Lt(t) {
446
- const {
447
- handlePointerOverEvents: e = !1,
448
- item: i
449
- } = t, n = l.useContext(ge);
450
- if (!n)
451
- throw new Error("useListItem must be used within a ListProvider");
452
- const {
453
- dispatch: r,
454
- getItemState: a
455
- } = n, {
456
- highlighted: s,
457
- selected: c,
458
- focusable: u
459
- } = a(i), f = l.useCallback((p) => (d) => {
460
- var I;
461
- if ((I = p.onClick) == null || I.call(p, d), !d.defaultPrevented) {
462
- if (process.env.NODE_ENV !== "production" && i === void 0)
463
- throw new Error(["MUI: The `item` provided to useListItem() is undefined.", "This should happen only during server-side rendering under React 17."].join(`
464
- `));
465
- r({
466
- type: C.itemClick,
467
- item: i,
468
- event: d
469
- });
470
- }
471
- }, [r, i]), L = l.useCallback((p) => (d) => {
472
- var I;
473
- if ((I = p.onMouseOver) == null || I.call(p, d), !d.defaultPrevented) {
474
- if (process.env.NODE_ENV !== "production" && i === void 0)
475
- throw new Error(["MUI: The `item` provided to useListItem() is undefined.", "This should happen only during server-side rendering under React 17."].join(`
476
- `));
477
- r({
478
- type: C.itemHover,
479
- item: i,
480
- event: d
481
- });
482
- }
483
- }, [r, i]);
484
- let m;
485
- return u && (m = s ? 0 : -1), {
486
- getRootProps: (p = {}) => {
487
- const d = ae(p);
488
- return g({}, p, {
489
- onClick: f(d),
490
- onPointerOver: e ? L(d) : void 0,
491
- tabIndex: m
492
- });
493
- },
494
- highlighted: s,
495
- selected: c
496
- };
497
- }
498
- const me = /* @__PURE__ */ l.createContext(null);
499
- process.env.NODE_ENV !== "production" && (me.displayName = "CompoundComponentContext");
500
- function qe(t) {
501
- const e = Array.from(t.keys()).map((i) => {
502
- const n = t.get(i);
503
- return {
504
- key: i,
505
- subitem: n
506
- };
507
- });
508
- return e.sort((i, n) => {
509
- const r = i.subitem.ref.current, a = n.subitem.ref.current;
510
- return r === null || a === null || r === a ? 0 : r.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
511
- }), new Map(e.map((i) => [i.key, i.subitem]));
512
- }
513
- function xt() {
514
- const [t, e] = l.useState(/* @__PURE__ */ new Map()), i = l.useRef(/* @__PURE__ */ new Set()), n = l.useCallback(function(f) {
515
- i.current.delete(f), e((L) => {
516
- const m = new Map(L);
517
- return m.delete(f), m;
518
- });
519
- }, []), r = l.useCallback(function(f, L) {
520
- let m;
521
- return typeof f == "function" ? m = f(i.current) : m = f, i.current.add(m), e((h) => {
522
- const p = new Map(h);
523
- return p.set(m, L), p;
524
- }), {
525
- id: m,
526
- deregister: () => n(m)
527
- };
528
- }, [n]), a = l.useMemo(() => qe(t), [t]), s = l.useCallback(function(f) {
529
- return Array.from(a.keys()).indexOf(f);
530
- }, [a]);
531
- return {
532
- contextValue: l.useMemo(() => ({
533
- getItemIndex: s,
534
- registerItem: r,
535
- totalSubitemCount: t.size
536
- }), [s, r, t.size]),
537
- subitems: a
538
- };
539
- }
540
- function Ct(t, e) {
541
- const i = l.useContext(me);
542
- if (i === null)
543
- throw new Error("useCompoundItem must be used within a useCompoundParent");
544
- const {
545
- registerItem: n
546
- } = i, [r, a] = l.useState(typeof t == "function" ? void 0 : t);
547
- return Ee(() => {
548
- const {
549
- id: s,
550
- deregister: c
551
- } = n(t, e);
552
- return a(s), c;
553
- }, [n, e, t]), {
554
- id: r,
555
- index: r !== void 0 ? i.getItemIndex(r) : -1,
556
- totalItemCount: i.totalSubitemCount
557
- };
558
- }
559
- function bt(t, e) {
560
- return function(n = {}) {
561
- const r = g({}, n, t(n));
562
- return g({}, r, e(r));
563
- };
564
- }
565
- function yt(t) {
566
- return Y("MuiListItem", t);
567
- }
568
- const Qe = K("MuiListItem", ["root", "startAction", "endAction", "nested", "nesting", "sticky", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantSoft", "variantOutlined", "variantSolid"]), q = /* @__PURE__ */ l.createContext(!1);
569
- process.env.NODE_ENV !== "production" && (q.displayName = "NestedListContext");
570
- const Q = /* @__PURE__ */ l.createContext(!1);
571
- process.env.NODE_ENV !== "production" && (Q.displayName = "RowListContext");
572
- const pe = /* @__PURE__ */ l.createContext(!1);
573
- process.env.NODE_ENV !== "production" && (pe.displayName = "WrapListContext");
574
- const fe = /* @__PURE__ */ l.createContext(void 0);
575
- process.env.NODE_ENV !== "production" && (fe.displayName = "ComponentListContext");
576
- const he = /* @__PURE__ */ l.createContext(void 0);
577
- process.env.NODE_ENV !== "production" && (he.displayName = "GroupListContext");
578
- const Nt = {
579
- "--NestedList-marginRight": "0px",
580
- "--NestedList-marginLeft": "0px",
581
- "--NestedListItem-paddingLeft": "var(--ListItem-paddingX)",
582
- // reset ListItem, ListItemButton negative margin (caused by NestedListItem)
583
- "--ListItemButton-marginBlock": "0px",
584
- "--ListItemButton-marginInline": "0px",
585
- "--ListItem-marginBlock": "0px",
586
- "--ListItem-marginInline": "0px"
587
- };
588
- function Ze(t) {
589
- const {
590
- children: e,
591
- nested: i,
592
- row: n = !1,
593
- wrap: r = !1
594
- } = t, a = /* @__PURE__ */ k(Q.Provider, {
595
- value: n,
596
- children: /* @__PURE__ */ k(pe.Provider, {
597
- value: r,
598
- children: l.Children.map(e, (s, c) => /* @__PURE__ */ l.isValidElement(s) ? /* @__PURE__ */ l.cloneElement(s, g({}, c === 0 && {
599
- "data-first-child": ""
600
- }, c === l.Children.count(e) - 1 && {
601
- "data-last-child": ""
602
- })) : s)
603
- })
604
- });
605
- return i === void 0 ? a : /* @__PURE__ */ k(q.Provider, {
606
- value: i,
607
- children: a
608
- });
609
- }
610
- function et(t) {
611
- return Y("MuiList", t);
612
- }
613
- const Dt = K("MuiList", ["root", "nesting", "scoped", "sizeSm", "sizeMd", "sizeLg", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "horizontal", "vertical"]), ve = /* @__PURE__ */ l.createContext(void 0);
614
- process.env.NODE_ENV !== "production" && (ve.displayName = "RadioGroupContext");
615
- const tt = ["component", "className", "children", "size", "orientation", "wrap", "variant", "color", "role", "slots", "slotProps"], nt = (t) => {
616
- const {
617
- variant: e,
618
- color: i,
619
- size: n,
620
- nesting: r,
621
- orientation: a,
622
- instanceSize: s
623
- } = t, c = {
624
- root: ["root", a, e && `variant${M(e)}`, i && `color${M(i)}`, !s && !r && n && `size${M(n)}`, s && `size${M(s)}`, r && "nesting"]
625
- };
626
- return ue(c, et, {});
627
- }, it = j("ul")(({
628
- theme: t,
629
- ownerState: e
630
- }) => {
631
- var i;
632
- const {
633
- p: n,
634
- padding: r,
635
- borderRadius: a
636
- } = Oe({
637
- theme: t,
638
- ownerState: e
639
- }, ["p", "padding", "borderRadius"]);
640
- function s(c) {
641
- return c === "sm" ? {
642
- "--ListDivider-gap": "0.25rem",
643
- "--ListItem-minHeight": "2rem",
644
- "--ListItem-paddingY": "3px",
645
- "--ListItem-paddingX": e.marker ? "3px" : "0.5rem",
646
- "--ListItem-gap": "0.5rem",
647
- "--ListItemDecorator-size": e.orientation === "horizontal" ? "1.5rem" : "2rem",
648
- "--Icon-fontSize": t.vars.fontSize.lg
649
- } : c === "md" ? {
650
- "--ListDivider-gap": "0.375rem",
651
- "--ListItem-minHeight": "2.25rem",
652
- "--ListItem-paddingY": "0.25rem",
653
- "--ListItem-paddingX": e.marker ? "0.25rem" : "0.75rem",
654
- "--ListItem-gap": "0.625rem",
655
- "--ListItemDecorator-size": e.orientation === "horizontal" ? "1.75rem" : "2.5rem",
656
- "--Icon-fontSize": t.vars.fontSize.xl
657
- } : c === "lg" ? {
658
- "--ListDivider-gap": "0.5rem",
659
- "--ListItem-minHeight": "2.75rem",
660
- "--ListItem-paddingY": "0.375rem",
661
- "--ListItem-paddingX": e.marker ? "0.5rem" : "1rem",
662
- "--ListItem-gap": "0.75rem",
663
- "--ListItemDecorator-size": e.orientation === "horizontal" ? "2.25rem" : "3rem",
664
- "--Icon-fontSize": t.vars.fontSize.xl2
665
- } : {};
666
- }
667
- return [e.nesting && g({}, s(e.instanceSize), {
668
- "--ListItem-paddingRight": "var(--ListItem-paddingX)",
669
- "--ListItem-paddingLeft": "var(--NestedListItem-paddingLeft)",
670
- // reset ListItem, ListItemButton negative margin (caused by NestedListItem)
671
- "--ListItemButton-marginBlock": "0px",
672
- "--ListItemButton-marginInline": "0px",
673
- "--ListItem-marginBlock": "0px",
674
- "--ListItem-marginInline": "0px",
675
- padding: 0
676
- }, e.marker && {
677
- paddingInlineStart: "calc(3ch - var(--_List-markerDeduct, 0px))"
678
- // the width of the marker
679
- }, {
680
- marginInlineStart: "var(--NestedList-marginLeft)",
681
- marginInlineEnd: "var(--NestedList-marginRight)",
682
- marginBlockStart: "var(--List-gap)",
683
- marginBlockEnd: "initial"
684
- // reset user agent stylesheet.
685
- }), !e.nesting && g({}, s(e.size), {
686
- "--List-gap": "0px",
687
- "--List-nestedInsetStart": "0px",
688
- "--ListItem-paddingLeft": "var(--ListItem-paddingX)",
689
- "--ListItem-paddingRight": "var(--ListItem-paddingX)"
690
- }, e.marker && {
691
- "--_List-markerDeduct": "1ch"
692
- }, {
693
- // Automatic radius adjustment kicks in only if '--List-padding' and '--List-radius' are provided.
694
- "--unstable_List-childRadius": "calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))",
695
- "--ListItem-radius": "var(--unstable_List-childRadius)",
696
- // by default, The ListItem & ListItemButton use automatic radius adjustment based on the parent List.
697
- "--ListItem-startActionTranslateX": "calc(0.5 * var(--ListItem-paddingLeft))",
698
- "--ListItem-endActionTranslateX": "calc(-0.5 * var(--ListItem-paddingRight))",
699
- margin: "initial"
700
- }, t.typography[`body-${e.size}`], e.orientation === "horizontal" ? g({}, e.wrap ? {
701
- padding: "var(--List-padding)",
702
- // Fallback is not needed for row-wrap List
703
- marginInlineStart: "calc(-1 * var(--List-gap))",
704
- marginBlockStart: "calc(-1 * var(--List-gap))"
705
- } : {
706
- paddingInline: "var(--List-padding, var(--ListDivider-gap))",
707
- paddingBlock: "var(--List-padding)"
708
- }) : {
709
- paddingBlock: "var(--List-padding, var(--ListDivider-gap))",
710
- paddingInline: "var(--List-padding)"
711
- }, e.marker && {
712
- paddingInlineStart: "3ch"
713
- // the width of the marker
714
- }), g({
715
- boxSizing: "border-box",
716
- borderRadius: "var(--List-radius)",
717
- listStyle: "none",
718
- display: "flex",
719
- flexDirection: e.orientation === "horizontal" ? "row" : "column"
720
- }, e.wrap && {
721
- flexWrap: "wrap"
722
- }, e.marker && {
723
- "--_List-markerDisplay": "list-item",
724
- "--_List-markerType": e.marker,
725
- lineHeight: "calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"
726
- }, {
727
- flexGrow: 1,
728
- position: "relative"
729
- }, (i = t.variants[e.variant]) == null ? void 0 : i[e.color], {
730
- "--unstable_List-borderWidth": "var(--variant-borderWidth, 0px)"
731
- }, a !== void 0 && {
732
- "--List-radius": a
733
- }, n !== void 0 && {
734
- "--List-padding": n
735
- }, r !== void 0 && {
736
- "--List-padding": r
737
- })];
738
- }), rt = j(it, {
739
- name: "JoyList",
740
- slot: "Root",
741
- overridesResolver: (t, e) => e.root
742
- })({}), ot = /* @__PURE__ */ l.forwardRef(function(e, i) {
743
- var n;
744
- const r = l.useContext(q), a = l.useContext(he), s = l.useContext(ve), c = le({
745
- props: e,
746
- name: "JoyList"
747
- }), {
748
- component: u,
749
- className: f,
750
- children: L,
751
- size: m,
752
- orientation: h = "vertical",
753
- wrap: p = !1,
754
- variant: d = "plain",
755
- color: I = "neutral",
756
- role: R,
757
- slots: y = {},
758
- slotProps: z = {}
759
- } = c, _ = re(c, tt), P = m || ((n = e.size) != null ? n : "md");
760
- let E;
761
- a && (E = "group"), s && (E = "presentation"), R && (E = R);
762
- const T = g({}, c, {
763
- instanceSize: e.size,
764
- size: P,
765
- nesting: r,
766
- orientation: h,
767
- wrap: p,
768
- variant: d,
769
- color: I,
770
- role: E
771
- }), $ = nt(T), w = g({}, _, {
772
- component: u,
773
- slots: y,
774
- slotProps: z
775
- }), [O, S] = ce("root", {
776
- ref: i,
777
- className: oe($.root, f),
778
- elementType: rt,
779
- externalForwardedProps: w,
780
- ownerState: T,
781
- additionalProps: {
782
- as: u,
783
- role: E,
784
- "aria-labelledby": typeof r == "string" ? r : void 0
785
- }
786
- });
787
- return /* @__PURE__ */ k(O, g({}, S, {
788
- children: /* @__PURE__ */ k(fe.Provider, {
789
- value: `${typeof u == "string" ? u : ""}:${E || ""}`,
790
- children: /* @__PURE__ */ k(Ze, {
791
- row: h === "horizontal",
792
- wrap: p,
793
- children: L
794
- })
795
- })
796
- }));
797
- });
798
- process.env.NODE_ENV !== "production" && (ot.propTypes = {
799
- // ┌────────────────────────────── Warning ──────────────────────────────┐
800
- // │ These PropTypes are generated from the TypeScript type definitions. │
801
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
802
- // └─────────────────────────────────────────────────────────────────────┘
803
- /**
804
- * The content of the component.
805
- */
806
- children: o.node,
807
- /**
808
- * @ignore
809
- */
810
- className: o.string,
811
- /**
812
- * The color of the component. It supports those theme colors that make sense for this component.
813
- * @default 'neutral'
814
- */
815
- color: o.oneOfType([o.oneOf(["danger", "neutral", "primary", "success", "warning"]), o.string]),
816
- /**
817
- * The component used for the root node.
818
- * Either a string to use a HTML element or a component.
819
- */
820
- component: o.elementType,
821
- /**
822
- * The marker (such as a disc, character, or custom counter style) of the list items.
823
- * When this prop is specified, the List Item changes the CSS display to `list-item` in order to apply the marker.
824
- *
825
- * To see all available options, check out the [MDN list-style-type page](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type).
826
- */
827
- marker: o.string,
828
- /**
829
- * The component orientation.
830
- * @default 'vertical'
831
- */
832
- orientation: o.oneOf(["horizontal", "vertical"]),
833
- /**
834
- * @ignore
835
- */
836
- role: o.string,
837
- /**
838
- * The size of the component (affect other nested list* components).
839
- * @default 'md'
840
- */
841
- size: o.oneOfType([o.oneOf(["sm", "md", "lg"]), o.string]),
842
- /**
843
- * The props used for each slot inside.
844
- * @default {}
845
- */
846
- slotProps: o.shape({
847
- root: o.oneOfType([o.func, o.object])
848
- }),
849
- /**
850
- * The components used for each slot inside.
851
- * @default {}
852
- */
853
- slots: o.shape({
854
- root: o.elementType
855
- }),
856
- /**
857
- * The system prop that allows defining system overrides as well as additional CSS styles.
858
- */
859
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
860
- /**
861
- * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
862
- * @default 'plain'
863
- */
864
- variant: o.oneOfType([o.oneOf(["outlined", "plain", "soft", "solid"]), o.string]),
865
- /**
866
- * Only for horizontal list.
867
- * If `true`, the list sets the flex-wrap to "wrap" and adjust margin to have gap-like behavior (will move to `gap` in the future).
868
- *
869
- * @default false
870
- */
871
- wrap: o.bool
872
- });
873
- function st(t) {
874
- return Y("MuiListItemButton", t);
875
- }
876
- const W = K("MuiListItemButton", ["root", "horizontal", "vertical", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "focusVisible", "disabled", "selected", "variantPlain", "variantSoft", "variantOutlined", "variantSolid"]), Ie = /* @__PURE__ */ l.createContext("horizontal");
877
- process.env.NODE_ENV !== "production" && (Ie.displayName = "ListItemButtonOrientationContext");
878
- const at = ["children", "className", "action", "component", "orientation", "role", "selected", "color", "variant", "slots", "slotProps"], lt = (t) => {
879
- const {
880
- color: e,
881
- disabled: i,
882
- focusVisible: n,
883
- focusVisibleClassName: r,
884
- selected: a,
885
- variant: s
886
- } = t, c = {
887
- root: ["root", i && "disabled", n && "focusVisible", e && `color${M(e)}`, a && "selected", s && `variant${M(s)}`]
888
- }, u = ue(c, st, {});
889
- return n && r && (u.root += ` ${r}`), u;
890
- }, ct = j("div")(({
891
- theme: t,
892
- ownerState: e
893
- }) => {
894
- var i, n, r, a, s, c;
895
- return g({
896
- "--Icon-margin": "initial",
897
- // reset the icon's margin.
898
- "--Icon-color": e.color !== "neutral" || e.variant === "solid" ? "currentColor" : t.vars.palette.text.icon,
899
- WebkitTapHighlightColor: "transparent",
900
- boxSizing: "border-box",
901
- position: "relative",
902
- font: "inherit",
903
- display: "flex",
904
- flexDirection: "row",
905
- alignItems: "center",
906
- alignSelf: "stretch",
907
- // always stretch itself to fill the parent (List|ListItem)
908
- gap: "var(--ListItem-gap)"
909
- }, e.orientation === "vertical" && {
910
- flexDirection: "column",
911
- justifyContent: "center"
912
- }, {
913
- textAlign: "initial",
914
- textDecoration: "initial",
915
- // reset native anchor tag
916
- backgroundColor: "initial",
917
- // reset button background
918
- cursor: "pointer",
919
- // In some cases, ListItemButton is a child of ListItem so the margin needs to be controlled by the ListItem. The value is negative to account for the ListItem's padding
920
- marginInline: "var(--ListItemButton-marginInline)",
921
- marginBlock: "var(--ListItemButton-marginBlock)"
922
- }, e["data-first-child"] === void 0 && {
923
- marginInlineStart: e.row ? "var(--List-gap)" : void 0,
924
- marginBlockStart: e.row ? void 0 : "var(--List-gap)"
925
- }, {
926
- // account for the border width, so that all of the ListItemButtons content aligned horizontally
927
- paddingBlock: "calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",
928
- // account for the border width, so that all of the ListItemButtons content aligned vertically
929
- paddingInlineStart: "calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",
930
- // --internal variable makes it possible to customize the actionWidth from the top List
931
- paddingInlineEnd: "calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",
932
- // --internal variable makes it possible to customize the actionWidth from the top List
933
- minBlockSize: "var(--ListItem-minHeight)",
934
- border: "1px solid transparent",
935
- // use `transparent` as a placeholder to prevent the button from jumping when switching to `outlined` variant
936
- borderRadius: "var(--ListItem-radius)",
937
- flex: "var(--unstable_ListItem-flex, none)",
938
- // prevent children from shrinking when the List's height is limited.
939
- fontSize: "inherit",
940
- // prevent user agent style when component="button"
941
- lineHeight: "inherit",
942
- // prevent user agent style when component="button"
943
- minInlineSize: 0,
944
- [t.focus.selector]: g({}, t.focus.default, {
945
- zIndex: 1
946
- // to be above of the next element. For example, the first Tab item should be above the second so that the outline is above the second Tab.
947
- })
948
- }, (i = t.variants[e.variant]) == null ? void 0 : i[e.color], {
949
- "&:active": (n = t.variants[`${e.variant}Active`]) == null ? void 0 : n[e.color],
950
- [`.${Qe.root} > &`]: {
951
- "--unstable_ListItem-flex": "1 0 0%"
952
- // grow to fill the available space of ListItem
953
- },
954
- [`&.${W.selected}`]: g({}, (r = t.variants[`${e.variant}Active`]) == null ? void 0 : r[e.color], {
955
- "--Icon-color": "currentColor"
956
- }),
957
- [`&:not(.${W.selected}, [aria-selected="true"])`]: {
958
- "&:hover": (a = t.variants[`${e.variant}Hover`]) == null ? void 0 : a[e.color],
959
- "&:active": (s = t.variants[`${e.variant}Active`]) == null ? void 0 : s[e.color]
960
- },
961
- [`&.${W.disabled}`]: g({}, (c = t.variants[`${e.variant}Disabled`]) == null ? void 0 : c[e.color])
962
- });
963
- }), ut = j(ct, {
964
- name: "JoyListItemButton",
965
- slot: "Root",
966
- overridesResolver: (t, e) => e.root
967
- })(({
968
- ownerState: t,
969
- theme: e
970
- }) => g({}, !t.row && {
971
- [`&.${W.selected}`]: {
972
- fontWeight: e.vars.fontWeight.md
973
- }
974
- })), dt = /* @__PURE__ */ l.forwardRef(function(e, i) {
975
- const n = le({
976
- props: e,
977
- name: "JoyListItemButton"
978
- }), r = l.useContext(Q), {
979
- children: a,
980
- className: s,
981
- action: c,
982
- component: u = "div",
983
- orientation: f = "horizontal",
984
- role: L,
985
- selected: m = !1,
986
- color: h = "neutral",
987
- variant: p = "plain",
988
- slots: d = {},
989
- slotProps: I = {}
990
- } = n, R = re(n, at), y = l.useRef(null), z = se(y, i), {
991
- focusVisible: _,
992
- setFocusVisible: P,
993
- getRootProps: E
994
- } = Se(g({}, n, {
995
- rootRef: z
996
- }));
997
- l.useImperativeHandle(c, () => ({
998
- focusVisible: () => {
999
- var A;
1000
- P(!0), (A = y.current) == null || A.focus();
1001
- }
1002
- }), [P]);
1003
- const T = g({}, n, {
1004
- component: u,
1005
- color: h,
1006
- focusVisible: _,
1007
- orientation: f,
1008
- row: r,
1009
- selected: m,
1010
- variant: p
1011
- }), $ = lt(T), w = g({}, R, {
1012
- component: u,
1013
- slots: d,
1014
- slotProps: I
1015
- }), [O, S] = ce("root", {
1016
- ref: i,
1017
- className: oe($.root, s),
1018
- elementType: ut,
1019
- externalForwardedProps: w,
1020
- ownerState: T,
1021
- getSlotProps: E
1022
- });
1023
- return /* @__PURE__ */ k(Ie.Provider, {
1024
- value: f,
1025
- children: /* @__PURE__ */ k(O, g({}, S, {
1026
- role: L ?? S.role,
1027
- children: a
1028
- }))
1029
- });
1030
- });
1031
- process.env.NODE_ENV !== "production" && (dt.propTypes = {
1032
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1033
- // │ These PropTypes are generated from the TypeScript type definitions. │
1034
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1035
- // └─────────────────────────────────────────────────────────────────────┘
1036
- /**
1037
- * A ref for imperative actions. It currently only supports `focusVisible()` action.
1038
- */
1039
- action: o.oneOfType([o.func, o.shape({
1040
- current: o.shape({
1041
- focusVisible: o.func.isRequired
1042
- })
1043
- })]),
1044
- /**
1045
- * If `true`, the list item is focused during the first mount.
1046
- * Focus will also be triggered if the value changes from false to true.
1047
- * @default false
1048
- */
1049
- autoFocus: o.bool,
1050
- /**
1051
- * The content of the component.
1052
- */
1053
- children: o.node,
1054
- /**
1055
- * @ignore
1056
- */
1057
- className: o.string,
1058
- /**
1059
- * The color of the component. It supports those theme colors that make sense for this component.
1060
- * @default 'neutral'
1061
- */
1062
- color: o.oneOfType([o.oneOf(["danger", "neutral", "primary", "success", "warning"]), o.string]),
1063
- /**
1064
- * The component used for the root node.
1065
- * Either a string to use a HTML element or a component.
1066
- */
1067
- component: o.elementType,
1068
- /**
1069
- * If `true`, the component is disabled.
1070
- * @default false
1071
- */
1072
- disabled: o.bool,
1073
- /**
1074
- * This prop can help identify which element has keyboard focus.
1075
- * The class name will be applied when the element gains the focus through keyboard interaction.
1076
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
1077
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
1078
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
1079
- * if needed.
1080
- */
1081
- focusVisibleClassName: o.string,
1082
- /**
1083
- * The content direction flow.
1084
- * @default 'horizontal'
1085
- */
1086
- orientation: o.oneOf(["horizontal", "vertical"]),
1087
- /**
1088
- * @ignore
1089
- */
1090
- role: o.string,
1091
- /**
1092
- * If `true`, the component is selected.
1093
- * @default false
1094
- */
1095
- selected: o.bool,
1096
- /**
1097
- * The props used for each slot inside.
1098
- * @default {}
1099
- */
1100
- slotProps: o.shape({
1101
- root: o.oneOfType([o.func, o.object])
1102
- }),
1103
- /**
1104
- * The components used for each slot inside.
1105
- * @default {}
1106
- */
1107
- slots: o.shape({
1108
- root: o.elementType
1109
- }),
1110
- /**
1111
- * The system prop that allows defining system overrides as well as additional CSS styles.
1112
- */
1113
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
1114
- /**
1115
- * @default 0
1116
- */
1117
- tabIndex: o.number,
1118
- /**
1119
- * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
1120
- * @default 'plain'
1121
- */
1122
- variant: o.oneOfType([o.oneOf(["outlined", "plain", "soft", "solid"]), o.string])
1123
- });
1124
- export {
1125
- fe as C,
1126
- he as G,
1127
- Ze as L,
1128
- q as N,
1129
- Q as R,
1130
- it as S,
1131
- pe as W,
1132
- Dt as a,
1133
- ct as b,
1134
- ot as c,
1135
- Ie as d,
1136
- me as e,
1137
- Ct as f,
1138
- yt as g,
1139
- je as h,
1140
- C as i,
1141
- It as j,
1142
- ge as k,
1143
- Qe as l,
1144
- D as m,
1145
- Lt as n,
1146
- bt as o,
1147
- ve as p,
1148
- de as q,
1149
- Nt as s,
1150
- xt as u
1151
- };