fansunited-frontend-components 0.0.31-RC6 → 0.0.31-RC7

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.
@@ -0,0 +1,1079 @@
1
+ import { n as Q, o as G, _ as p, C as w, p as q, q as H, r as K, v as Z, L as ee, w as oe, x as te, y as ne, z as ae, A as se, D as ie, E as re, F as N, G as D, H as E, S as le, I as U, R as ce, J as j, K as B, M as de, N as e, O, Q as J, U as ue, V as pe, X as be, Y as fe, Z as A } from "./Portal-DegkUXpU.js";
2
+ import * as l from "react";
3
+ import { jsx as C } from "react/jsx-runtime";
4
+ function ve(o) {
5
+ const {
6
+ value: t,
7
+ defaultValue: a,
8
+ onChange: n,
9
+ orientation: s = "horizontal",
10
+ direction: r = "ltr",
11
+ selectionFollowsFocus: i = !1
12
+ } = o, [d, u] = Q({
13
+ controlled: t,
14
+ default: a,
15
+ name: "Tabs",
16
+ state: "value"
17
+ }), c = l.useCallback((g, y) => {
18
+ u(y), n == null || n(g, y);
19
+ }, [n, u]), {
20
+ subitems: f,
21
+ contextValue: b
22
+ } = G(), v = l.useRef(() => {
23
+ }), m = l.useCallback((g) => {
24
+ var y;
25
+ return (y = f.get(g)) == null ? void 0 : y.id;
26
+ }, [f]), h = l.useCallback((g) => v.current(g), []), T = l.useCallback((g) => {
27
+ v.current = g;
28
+ }, []);
29
+ return {
30
+ contextValue: p({
31
+ direction: r,
32
+ getTabId: h,
33
+ getTabPanelId: m,
34
+ onSelected: c,
35
+ orientation: s,
36
+ registerTabIdLookup: T,
37
+ selectionFollowsFocus: i,
38
+ value: d
39
+ }, b)
40
+ };
41
+ }
42
+ const Y = /* @__PURE__ */ l.createContext(null);
43
+ process.env.NODE_ENV !== "production" && (Y.displayName = "TabsContext");
44
+ function S() {
45
+ const o = l.useContext(Y);
46
+ if (o == null)
47
+ throw new Error("No TabsContext provided");
48
+ return o;
49
+ }
50
+ function ge(o) {
51
+ const {
52
+ value: t,
53
+ children: a
54
+ } = o, {
55
+ direction: n,
56
+ getItemIndex: s,
57
+ onSelected: r,
58
+ orientation: i,
59
+ registerItem: d,
60
+ registerTabIdLookup: u,
61
+ selectionFollowsFocus: c,
62
+ totalSubitemCount: f,
63
+ value: b,
64
+ getTabId: v,
65
+ getTabPanelId: m
66
+ } = t, h = l.useMemo(() => ({
67
+ getItemIndex: s,
68
+ registerItem: d,
69
+ totalSubitemCount: f
70
+ }), [d, s, f]), T = l.useMemo(() => ({
71
+ direction: n,
72
+ getTabId: v,
73
+ getTabPanelId: m,
74
+ onSelected: r,
75
+ orientation: i,
76
+ registerTabIdLookup: u,
77
+ selectionFollowsFocus: c,
78
+ value: b
79
+ }), [n, v, m, r, i, u, c, b]);
80
+ return /* @__PURE__ */ C(w.Provider, {
81
+ value: h,
82
+ children: /* @__PURE__ */ C(Y.Provider, {
83
+ value: T,
84
+ children: a
85
+ })
86
+ });
87
+ }
88
+ function me(o) {
89
+ return o.size;
90
+ }
91
+ function Te(o) {
92
+ const {
93
+ value: t,
94
+ id: a,
95
+ rootRef: n
96
+ } = o, s = S();
97
+ if (s === null)
98
+ throw new Error("No TabContext provided");
99
+ const {
100
+ value: r,
101
+ getTabId: i
102
+ } = s, d = q(a), u = l.useRef(null), c = H(u, n), f = l.useMemo(() => ({
103
+ id: d,
104
+ ref: u
105
+ }), [d]), {
106
+ id: b
107
+ } = K(t ?? me, f), v = b !== r, m = b !== void 0 ? i(b) : void 0;
108
+ return {
109
+ hidden: v,
110
+ getRootProps: (T = {}) => p({
111
+ "aria-labelledby": m ?? void 0,
112
+ hidden: v,
113
+ id: d ?? void 0
114
+ }, T, {
115
+ ref: c
116
+ }),
117
+ rootRef: c
118
+ };
119
+ }
120
+ const X = {
121
+ valueChange: "valueChange"
122
+ };
123
+ function he(o, t) {
124
+ if (t.type === X.valueChange)
125
+ return p({}, o, {
126
+ highlightedValue: t.value
127
+ });
128
+ const a = Z(o, t), {
129
+ context: {
130
+ selectionFollowsFocus: n
131
+ }
132
+ } = t;
133
+ if (t.type === ee.itemsChange) {
134
+ if (a.selectedValues.length > 0)
135
+ return p({}, a, {
136
+ highlightedValue: a.selectedValues[0]
137
+ });
138
+ oe(null, "reset", t.context);
139
+ }
140
+ return n && a.highlightedValue != null ? p({}, a, {
141
+ selectedValues: [a.highlightedValue]
142
+ }) : a;
143
+ }
144
+ function ye(o) {
145
+ var t;
146
+ const {
147
+ rootRef: a
148
+ } = o, {
149
+ direction: n = "ltr",
150
+ onSelected: s,
151
+ orientation: r = "horizontal",
152
+ value: i,
153
+ registerTabIdLookup: d,
154
+ selectionFollowsFocus: u
155
+ } = S(), {
156
+ subitems: c,
157
+ contextValue: f
158
+ } = G(), b = l.useCallback((P) => {
159
+ var z;
160
+ return (z = c.get(P)) == null ? void 0 : z.id;
161
+ }, [c]);
162
+ d(b);
163
+ const v = l.useMemo(() => Array.from(c.keys()), [c]), m = l.useCallback((P) => {
164
+ var z, _;
165
+ return P == null ? null : (z = (_ = c.get(P)) == null ? void 0 : _.ref.current) != null ? z : null;
166
+ }, [c]), h = n === "rtl";
167
+ let T;
168
+ r === "vertical" ? T = "vertical" : T = h ? "horizontal-rtl" : "horizontal-ltr";
169
+ const g = l.useCallback((P, z) => {
170
+ var _;
171
+ s(P, (_ = z[0]) != null ? _ : null);
172
+ }, [s]), y = l.useMemo(() => i === void 0 ? {} : i != null ? {
173
+ selectedValues: [i]
174
+ } : {
175
+ selectedValues: []
176
+ }, [i]), I = l.useCallback((P) => {
177
+ var z, _;
178
+ return (z = (_ = c.get(P)) == null ? void 0 : _.disabled) != null ? z : !1;
179
+ }, [c]), {
180
+ contextValue: R,
181
+ dispatch: L,
182
+ getRootProps: k,
183
+ state: {
184
+ highlightedValue: x,
185
+ selectedValues: V
186
+ },
187
+ rootRef: F
188
+ } = te({
189
+ controlledProps: y,
190
+ disabledItemsFocusable: !u,
191
+ focusManagement: "DOM",
192
+ getItemDomElement: m,
193
+ isItemDisabled: I,
194
+ items: v,
195
+ rootRef: a,
196
+ onChange: g,
197
+ orientation: T,
198
+ reducerActionContext: l.useMemo(() => ({
199
+ selectionFollowsFocus: u || !1
200
+ }), [u]),
201
+ selectionMode: "single",
202
+ stateReducer: he
203
+ });
204
+ l.useEffect(() => {
205
+ i !== void 0 && i != null && L({
206
+ type: X.valueChange,
207
+ value: i
208
+ });
209
+ }, [L, i]);
210
+ const $ = (P = {}) => p({}, P, k(P), {
211
+ "aria-orientation": r === "vertical" ? "vertical" : void 0,
212
+ role: "tablist"
213
+ });
214
+ return {
215
+ contextValue: l.useMemo(() => p({}, f, R), [f, R]),
216
+ dispatch: L,
217
+ getRootProps: $,
218
+ highlightedValue: x,
219
+ isRtl: h,
220
+ orientation: r,
221
+ rootRef: F,
222
+ selectedValue: (t = V[0]) != null ? t : null
223
+ };
224
+ }
225
+ function xe(o) {
226
+ const {
227
+ value: t,
228
+ children: a
229
+ } = o, {
230
+ dispatch: n,
231
+ getItemIndex: s,
232
+ getItemState: r,
233
+ registerItem: i,
234
+ totalSubitemCount: d
235
+ } = t, u = l.useMemo(() => ({
236
+ dispatch: n,
237
+ getItemState: r,
238
+ getItemIndex: s
239
+ }), [n, s, r]), c = l.useMemo(() => ({
240
+ getItemIndex: s,
241
+ registerItem: i,
242
+ totalSubitemCount: d
243
+ }), [i, s, d]);
244
+ return /* @__PURE__ */ C(w.Provider, {
245
+ value: c,
246
+ children: /* @__PURE__ */ C(ne.Provider, {
247
+ value: u,
248
+ children: a
249
+ })
250
+ });
251
+ }
252
+ function Pe(o) {
253
+ return o.size;
254
+ }
255
+ function Ce(o) {
256
+ const {
257
+ value: t,
258
+ rootRef: a,
259
+ disabled: n = !1,
260
+ id: s
261
+ } = o, r = l.useRef(null), i = q(s), {
262
+ value: d,
263
+ selectionFollowsFocus: u,
264
+ getTabPanelId: c
265
+ } = S(), f = l.useMemo(() => ({
266
+ disabled: n,
267
+ ref: r,
268
+ id: i
269
+ }), [n, r, i]), {
270
+ id: b,
271
+ index: v,
272
+ totalItemCount: m
273
+ } = K(t ?? Pe, f), {
274
+ getRootProps: h,
275
+ highlighted: T,
276
+ selected: g
277
+ } = ae({
278
+ item: b
279
+ }), {
280
+ getRootProps: y,
281
+ rootRef: I,
282
+ active: R,
283
+ focusVisible: L,
284
+ setFocusVisible: k
285
+ } = se({
286
+ disabled: n,
287
+ focusableWhenDisabled: !u,
288
+ type: "button"
289
+ }), x = H(r, a, I), V = b !== void 0 ? c(b) : void 0;
290
+ return {
291
+ getRootProps: ($ = {}) => {
292
+ const M = ie($), P = re(h, y);
293
+ return p({}, $, P(M), {
294
+ role: "tab",
295
+ "aria-controls": V,
296
+ "aria-selected": g,
297
+ id: i,
298
+ ref: x
299
+ });
300
+ },
301
+ active: R,
302
+ focusVisible: L,
303
+ highlighted: T,
304
+ index: v,
305
+ rootRef: x,
306
+ // the `selected` state isn't set on the server (it relies on effects to be calculated),
307
+ // so we fall back to checking the `value` prop with the selectedValue from the TabsContext
308
+ selected: g || b === d,
309
+ setFocusVisible: k,
310
+ totalTabsCount: m
311
+ };
312
+ }
313
+ function Re(o) {
314
+ return D("MuiTab", o);
315
+ }
316
+ const Le = N("MuiTab", ["root", "disabled", "focusVisible", "selected", "horizontal", "vertical", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]), Ie = ["action", "children", "value", "disabled", "onChange", "onClick", "onFocus", "component", "orientation", "variant", "color", "disableIndicator", "indicatorPlacement", "indicatorInset", "slots", "slotProps"], ze = (o) => {
317
+ const {
318
+ selected: t,
319
+ disabled: a,
320
+ focusVisible: n,
321
+ variant: s,
322
+ color: r,
323
+ orientation: i
324
+ } = o, d = {
325
+ root: ["root", i, a && "disabled", n && "focusVisible", t && "selected", s && `variant${O(s)}`, r && `color${O(r)}`]
326
+ };
327
+ return J(d, Re, {});
328
+ }, Oe = E(le, {
329
+ name: "JoyTab",
330
+ slot: "Root",
331
+ overridesResolver: (o, t) => t.root
332
+ })(({
333
+ ownerState: o
334
+ }) => [
335
+ {
336
+ flex: "initial",
337
+ justifyContent: o.row ? "center" : "initial",
338
+ "--unstable_ListItemDecorator-alignItems": "center",
339
+ "--unstable_offset": "min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"
340
+ },
341
+ !o.disableIndicator && {
342
+ '&[aria-selected="true"]': {
343
+ "--Tab-indicatorColor": "currentColor",
344
+ zIndex: 1
345
+ // to stay above other tab elements
346
+ },
347
+ // using pseudo element for showing active indicator is best for controlling the size and customization.
348
+ // for example, developers can customize the radius, width or background.
349
+ // (border and box-shadow are not flexible when it comes to customization).
350
+ "&::after": {
351
+ content: '""',
352
+ display: "block",
353
+ position: "absolute",
354
+ margin: "auto",
355
+ background: "var(--Tab-indicatorColor)",
356
+ borderRadius: "var(--Tab-indicatorRadius)"
357
+ }
358
+ },
359
+ // the padding is to account for the indicator's thickness to make the text proportional.
360
+ !o.disableIndicator && o.indicatorPlacement === "bottom" && {
361
+ paddingBottom: "calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)",
362
+ "&::after": {
363
+ height: "var(--Tab-indicatorThickness)",
364
+ width: "var(--Tab-indicatorSize)",
365
+ left: o.indicatorInset ? "var(--ListItem-paddingLeft)" : "var(--unstable_offset)",
366
+ right: o.indicatorInset ? "var(--ListItem-paddingRight)" : "var(--unstable_offset)",
367
+ bottom: "calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"
368
+ }
369
+ },
370
+ !o.disableIndicator && o.indicatorPlacement === "top" && {
371
+ paddingTop: "calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)",
372
+ "&::after": {
373
+ height: "var(--Tab-indicatorThickness)",
374
+ width: "var(--Tab-indicatorSize)",
375
+ left: o.indicatorInset ? "var(--ListItem-paddingLeft)" : "var(--unstable_offset)",
376
+ right: o.indicatorInset ? "var(--ListItem-paddingRight)" : "var(--unstable_offset)",
377
+ top: "calc(-1px - var(--unstable_TabList-underlineTop, 0px))"
378
+ }
379
+ },
380
+ !o.disableIndicator && o.indicatorPlacement === "right" && {
381
+ paddingRight: "calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)",
382
+ "&::after": {
383
+ height: "var(--Tab-indicatorSize)",
384
+ width: "var(--Tab-indicatorThickness)",
385
+ top: o.indicatorInset ? "var(--ListItem-paddingY)" : "var(--unstable_offset)",
386
+ bottom: o.indicatorInset ? "var(--ListItem-paddingY)" : "var(--unstable_offset)",
387
+ right: "calc(-1px - var(--unstable_TabList-underlineRight, 0px))"
388
+ }
389
+ },
390
+ !o.disableIndicator && o.indicatorPlacement === "left" && {
391
+ paddingLeft: "calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)",
392
+ "&::after": {
393
+ height: "var(--Tab-indicatorSize)",
394
+ width: "var(--Tab-indicatorThickness)",
395
+ top: o.indicatorInset ? "var(--ListItem-paddingY)" : "var(--unstable_offset)",
396
+ bottom: o.indicatorInset ? "var(--ListItem-paddingY)" : "var(--unstable_offset)",
397
+ left: "calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"
398
+ }
399
+ }
400
+ ]), ke = /* @__PURE__ */ l.forwardRef(function(t, a) {
401
+ const n = U({
402
+ props: t,
403
+ name: "JoyTab"
404
+ }), s = l.useContext(ce), {
405
+ action: r,
406
+ children: i,
407
+ disabled: d = !1,
408
+ component: u = "button",
409
+ orientation: c = "horizontal",
410
+ variant: f = "plain",
411
+ color: b = "neutral",
412
+ disableIndicator: v = !1,
413
+ indicatorPlacement: m = s ? "bottom" : "right",
414
+ indicatorInset: h = !1,
415
+ slots: T = {},
416
+ slotProps: g = {}
417
+ } = n, y = j(n, Ie), I = l.useRef(), R = H(I, a), {
418
+ active: L,
419
+ focusVisible: k,
420
+ setFocusVisible: x,
421
+ selected: V,
422
+ getRootProps: F
423
+ } = Ce(p({}, n, {
424
+ rootRef: R
425
+ }));
426
+ l.useImperativeHandle(r, () => ({
427
+ focusVisible: () => {
428
+ x(!0), I.current.focus();
429
+ }
430
+ }), [x]);
431
+ const $ = p({}, n, {
432
+ disableIndicator: v,
433
+ indicatorPlacement: m,
434
+ indicatorInset: h,
435
+ orientation: c,
436
+ row: s,
437
+ active: L,
438
+ focusVisible: k,
439
+ disabled: d,
440
+ selected: V,
441
+ variant: f,
442
+ color: b
443
+ }), M = ze($), P = p({}, y, {
444
+ component: u,
445
+ slots: T,
446
+ slotProps: g
447
+ }), [z, _] = B("root", {
448
+ ref: a,
449
+ elementType: Oe,
450
+ getSlotProps: F,
451
+ externalForwardedProps: P,
452
+ ownerState: $,
453
+ className: M.root
454
+ });
455
+ return /* @__PURE__ */ C(de.Provider, {
456
+ value: c,
457
+ children: /* @__PURE__ */ C(z, p({}, _, {
458
+ children: i
459
+ }))
460
+ });
461
+ });
462
+ process.env.NODE_ENV !== "production" && (ke.propTypes = {
463
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
464
+ // │ These PropTypes are generated from the TypeScript type definitions. │
465
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
466
+ // └─────────────────────────────────────────────────────────────────────┘
467
+ /**
468
+ * A ref for imperative actions. It currently only supports `focusVisible()` action.
469
+ */
470
+ action: e.oneOfType([e.func, e.shape({
471
+ current: e.shape({
472
+ focusVisible: e.func.isRequired
473
+ })
474
+ })]),
475
+ /**
476
+ * @ignore
477
+ */
478
+ children: e.node,
479
+ /**
480
+ * The color of the component. It supports those theme colors that make sense for this component.
481
+ * @default 'neutral'
482
+ */
483
+ color: e.oneOfType([e.oneOf(["danger", "neutral", "primary", "success", "warning"]), e.string]),
484
+ /**
485
+ * The component used for the root node.
486
+ * Either a string to use a HTML element or a component.
487
+ */
488
+ component: e.elementType,
489
+ /**
490
+ * If `true`, the component is disabled.
491
+ * @default false
492
+ */
493
+ disabled: e.bool,
494
+ /**
495
+ * If `true`, the pseudo element indicator is hidden.
496
+ * @default false
497
+ */
498
+ disableIndicator: e.bool,
499
+ /**
500
+ * If `true`, the indicator stay within the padding based on the `Tabs` orientation.
501
+ * @default false
502
+ */
503
+ indicatorInset: e.bool,
504
+ /**
505
+ * The indicator's position when the Tab is selected.
506
+ * @default row ? 'bottom' : 'right'
507
+ */
508
+ indicatorPlacement: e.oneOf(["bottom", "left", "right", "top"]),
509
+ /**
510
+ * Callback invoked when new value is being set.
511
+ */
512
+ onChange: e.func,
513
+ /**
514
+ * @ignore
515
+ */
516
+ onClick: e.func,
517
+ /**
518
+ * @ignore
519
+ */
520
+ onFocus: e.func,
521
+ /**
522
+ * The content direction flow.
523
+ * @default 'horizontal'
524
+ */
525
+ orientation: e.oneOf(["horizontal", "vertical"]),
526
+ /**
527
+ * The props used for each slot inside.
528
+ * @default {}
529
+ */
530
+ slotProps: e.shape({
531
+ root: e.oneOfType([e.func, e.object])
532
+ }),
533
+ /**
534
+ * The components used for each slot inside.
535
+ * @default {}
536
+ */
537
+ slots: e.shape({
538
+ root: e.elementType
539
+ }),
540
+ /**
541
+ * The system prop that allows defining system overrides as well as additional CSS styles.
542
+ */
543
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
544
+ /**
545
+ * You can provide your own value. Otherwise, it falls back to the child position index.
546
+ */
547
+ value: e.oneOfType([e.number, e.string]),
548
+ /**
549
+ * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
550
+ * @default 'plain'
551
+ */
552
+ variant: e.oneOfType([e.oneOf(["outlined", "plain", "soft", "solid"]), e.string])
553
+ });
554
+ const W = /* @__PURE__ */ l.createContext("md");
555
+ process.env.NODE_ENV !== "production" && (W.displayName = "SizeTabsContext");
556
+ function Ve(o) {
557
+ return D("MuiTabList", o);
558
+ }
559
+ N("MuiTabList", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg"]);
560
+ const _e = ["component", "children", "variant", "color", "size", "disableUnderline", "underlinePlacement", "tabFlex", "sticky", "slots", "slotProps"], $e = (o) => {
561
+ const {
562
+ orientation: t,
563
+ size: a,
564
+ variant: n,
565
+ color: s
566
+ } = o, r = {
567
+ root: ["root", t, n && `variant${O(n)}`, s && `color${O(s)}`, a && `size${O(a)}`]
568
+ };
569
+ return J(r, Ve, {});
570
+ }, Fe = E(ue, {
571
+ name: "JoyTabList",
572
+ slot: "Root",
573
+ overridesResolver: (o, t) => t.root
574
+ })(({
575
+ theme: o,
576
+ ownerState: t
577
+ }) => {
578
+ var a;
579
+ const n = (a = o.variants[t.variant]) == null ? void 0 : a[t.color];
580
+ return p({
581
+ "--List-gap": "0px",
582
+ "--ListDivider-gap": "0px",
583
+ "--ListItem-paddingX": "var(--Tabs-spacing)",
584
+ "--ListItem-gap": "0.375rem",
585
+ // the `var(--unknown,)` is a workaround because emotion does not support space toggle.
586
+ "--unstable_TabList-hasUnderline": t.disableUnderline ? "var(--unknown,)" : "initial"
587
+ }, pe, {
588
+ flexGrow: "initial",
589
+ flexDirection: t.orientation === "vertical" ? "column" : "row",
590
+ borderRadius: "var(--List-radius, 0px)",
591
+ padding: "var(--List-padding, 0px)",
592
+ zIndex: 1
593
+ }, t.sticky && {
594
+ // sticky in list item can be found in grouped options
595
+ position: "sticky",
596
+ top: t.sticky === "top" ? "calc(-1 * var(--Tabs-padding, 0px))" : "initial",
597
+ bottom: t.sticky === "bottom" ? "calc(-1 * var(--Tabs-padding, 0px))" : "initial",
598
+ backgroundColor: (n == null ? void 0 : n.backgroundColor) || `var(--TabList-stickyBackground, ${o.vars.palette.background.body})`
599
+ }, !t.disableUnderline && p({}, t.underlinePlacement === "bottom" && {
600
+ "--unstable_TabList-underlineBottom": "1px",
601
+ paddingBottom: 1,
602
+ boxShadow: `inset 0 -1px ${o.vars.palette.divider}`
603
+ }, t.underlinePlacement === "top" && {
604
+ "--unstable_TabList-underlineTop": "1px",
605
+ paddingTop: 1,
606
+ boxShadow: `inset 0 1px ${o.vars.palette.divider}`
607
+ }, t.underlinePlacement === "right" && {
608
+ "--unstable_TabList-underlineRight": "1px",
609
+ paddingRight: 1,
610
+ boxShadow: `inset -1px 0 ${o.vars.palette.divider}`
611
+ }, t.underlinePlacement === "left" && {
612
+ "--unstable_TabList-underlineLeft": "1px",
613
+ paddingLeft: 1,
614
+ boxShadow: `inset 1px 0 ${o.vars.palette.divider}`
615
+ }), t.tabFlex && {
616
+ [`& .${Le.root}`]: {
617
+ flex: t.tabFlex
618
+ }
619
+ });
620
+ }), Me = /* @__PURE__ */ l.forwardRef(function(t, a) {
621
+ const n = U({
622
+ props: t,
623
+ name: "JoyTabList"
624
+ }), s = l.useContext(W), {
625
+ isRtl: r,
626
+ orientation: i,
627
+ getRootProps: d,
628
+ contextValue: u
629
+ } = ye({
630
+ rootRef: a
631
+ }), {
632
+ component: c = "div",
633
+ children: f,
634
+ variant: b = "plain",
635
+ color: v = "neutral",
636
+ size: m,
637
+ disableUnderline: h = !1,
638
+ underlinePlacement: T = i === "horizontal" ? "bottom" : "right",
639
+ tabFlex: g,
640
+ sticky: y,
641
+ slots: I = {},
642
+ slotProps: R = {}
643
+ } = n, L = j(n, _e), x = p({}, n, {
644
+ isRtl: r,
645
+ orientation: i,
646
+ variant: b,
647
+ color: v,
648
+ size: m ?? s,
649
+ sticky: y,
650
+ tabFlex: g,
651
+ nesting: !1,
652
+ disableUnderline: h,
653
+ underlinePlacement: T
654
+ }), V = $e(x), F = p({}, L, {
655
+ component: c,
656
+ slots: I,
657
+ slotProps: R
658
+ }), [$, M] = B("root", {
659
+ ref: a,
660
+ elementType: Fe,
661
+ getSlotProps: d,
662
+ externalForwardedProps: F,
663
+ ownerState: x,
664
+ className: V.root
665
+ });
666
+ return (
667
+ // @ts-ignore conflicted ref types
668
+ /* @__PURE__ */ C($, p({}, M, {
669
+ children: /* @__PURE__ */ C(xe, {
670
+ value: u,
671
+ children: /* @__PURE__ */ C(be, {
672
+ row: i === "horizontal",
673
+ nested: !0,
674
+ children: f
675
+ })
676
+ })
677
+ }))
678
+ );
679
+ });
680
+ process.env.NODE_ENV !== "production" && (Me.propTypes = {
681
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
682
+ // │ These PropTypes are generated from the TypeScript type definitions. │
683
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
684
+ // └─────────────────────────────────────────────────────────────────────┘
685
+ /**
686
+ * Used to render icon or text elements inside the TabList if `src` is not set.
687
+ * This can be an element, or just a string.
688
+ */
689
+ children: e.node,
690
+ /**
691
+ * The color of the component. It supports those theme colors that make sense for this component.
692
+ * @default 'neutral'
693
+ */
694
+ color: e.oneOfType([e.oneOf(["danger", "neutral", "primary", "success", "warning"]), e.string]),
695
+ /**
696
+ * The component used for the root node.
697
+ * Either a string to use a HTML element or a component.
698
+ */
699
+ component: e.elementType,
700
+ /**
701
+ * If `true`, the TabList's underline will disappear.
702
+ * @default false
703
+ */
704
+ disableUnderline: e.bool,
705
+ /**
706
+ * The size of the component.
707
+ */
708
+ size: e.oneOfType([e.oneOf(["sm", "md", "lg"]), e.string]),
709
+ /**
710
+ * The props used for each slot inside.
711
+ * @default {}
712
+ */
713
+ slotProps: e.shape({
714
+ root: e.oneOfType([e.func, e.object])
715
+ }),
716
+ /**
717
+ * The components used for each slot inside.
718
+ * @default {}
719
+ */
720
+ slots: e.shape({
721
+ root: e.elementType
722
+ }),
723
+ /**
724
+ * If provided, the TabList will have postion `sticky`.
725
+ */
726
+ sticky: e.oneOf(["bottom", "top"]),
727
+ /**
728
+ * The system prop that allows defining system overrides as well as additional CSS styles.
729
+ */
730
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
731
+ /**
732
+ * The flex value of the Tab.
733
+ * @example tabFlex={1} will set flex: '1 1 auto' on each tab (stretch the tab to equally fill the available space).
734
+ */
735
+ tabFlex: e.oneOfType([e.number, e.string]),
736
+ /**
737
+ * The placement of the TabList's underline.
738
+ * @default orientation === 'horizontal' ? 'bottom' : 'right'
739
+ */
740
+ underlinePlacement: e.oneOf(["bottom", "left", "right", "top"]),
741
+ /**
742
+ * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
743
+ * @default 'plain'
744
+ */
745
+ variant: e.oneOfType([e.oneOf(["outlined", "plain", "soft", "solid"]), e.string])
746
+ });
747
+ function Ne(o) {
748
+ return D("MuiTabPanel", o);
749
+ }
750
+ N("MuiTabPanel", ["root", "hidden", "sizeSm", "sizeMd", "sizeLg", "horizontal", "vertical", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
751
+ const De = ["children", "value", "component", "color", "variant", "size", "slots", "slotProps", "keepMounted"], Ee = (o) => {
752
+ const {
753
+ hidden: t,
754
+ size: a,
755
+ variant: n,
756
+ color: s,
757
+ orientation: r
758
+ } = o, i = {
759
+ root: ["root", t && "hidden", a && `size${O(a)}`, r, n && `variant${O(n)}`, s && `color${O(s)}`, a && `size${O(a)}`]
760
+ };
761
+ return J(i, Ne, {});
762
+ }, Ue = E("div", {
763
+ name: "JoyTabPanel",
764
+ slot: "Root",
765
+ overridesResolver: (o, t) => t.root
766
+ })(({
767
+ theme: o,
768
+ ownerState: t
769
+ }) => {
770
+ var a;
771
+ return p({
772
+ display: t.hidden ? "none" : "block",
773
+ padding: "var(--Tabs-spacing)",
774
+ flexGrow: 1,
775
+ fontFamily: o.vars.fontFamily.body
776
+ }, o.typography[`body-${t.size}`], (a = o.variants[t.variant]) == null ? void 0 : a[t.color]);
777
+ }), je = /* @__PURE__ */ l.forwardRef(function(t, a) {
778
+ const n = U({
779
+ props: t,
780
+ name: "JoyTabPanel"
781
+ }), {
782
+ orientation: s
783
+ } = S() || {
784
+ orientation: "horizontal"
785
+ }, r = l.useContext(W), {
786
+ children: i,
787
+ value: d = 0,
788
+ component: u,
789
+ color: c = "neutral",
790
+ variant: f = "plain",
791
+ size: b,
792
+ slots: v = {},
793
+ slotProps: m = {},
794
+ keepMounted: h = !1
795
+ } = n, T = j(n, De), {
796
+ hidden: g,
797
+ getRootProps: y
798
+ } = Te(p({}, n, {
799
+ value: d
800
+ })), R = p({}, n, {
801
+ orientation: s,
802
+ hidden: g,
803
+ size: b ?? r,
804
+ color: c,
805
+ variant: f
806
+ }), L = Ee(R), k = p({}, T, {
807
+ component: u,
808
+ slots: v,
809
+ slotProps: m
810
+ }), [x, V] = B("root", {
811
+ ref: a,
812
+ elementType: Ue,
813
+ getSlotProps: y,
814
+ externalForwardedProps: k,
815
+ additionalProps: {
816
+ role: "tabpanel",
817
+ ref: a,
818
+ as: u
819
+ },
820
+ ownerState: R,
821
+ className: L.root
822
+ });
823
+ return h ? /* @__PURE__ */ C(x, p({}, V, {
824
+ children: i
825
+ })) : /* @__PURE__ */ C(x, p({}, V, {
826
+ children: !g && i
827
+ }));
828
+ });
829
+ process.env.NODE_ENV !== "production" && (je.propTypes = {
830
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
831
+ // │ These PropTypes are generated from the TypeScript type definitions. │
832
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
833
+ // └─────────────────────────────────────────────────────────────────────┘
834
+ /**
835
+ * The content of the component.
836
+ */
837
+ children: e.node,
838
+ /**
839
+ * The color of the component. It supports those theme colors that make sense for this component.
840
+ * @default 'neutral'
841
+ */
842
+ color: e.oneOfType([e.oneOf(["danger", "neutral", "primary", "success", "warning"]), e.string]),
843
+ /**
844
+ * The component used for the root node.
845
+ * Either a string to use a HTML element or a component.
846
+ */
847
+ component: e.elementType,
848
+ /**
849
+ * Always keep the children in the DOM.
850
+ * @default false
851
+ */
852
+ keepMounted: e.bool,
853
+ /**
854
+ * The size of the component.
855
+ */
856
+ size: e.oneOfType([e.oneOf(["sm", "md", "lg"]), e.string]),
857
+ /**
858
+ * The props used for each slot inside.
859
+ * @default {}
860
+ */
861
+ slotProps: e.shape({
862
+ root: e.oneOfType([e.func, e.object])
863
+ }),
864
+ /**
865
+ * The components used for each slot inside.
866
+ * @default {}
867
+ */
868
+ slots: e.shape({
869
+ root: e.elementType
870
+ }),
871
+ /**
872
+ * The system prop that allows defining system overrides as well as additional CSS styles.
873
+ */
874
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
875
+ /**
876
+ * The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected.
877
+ * @default 0
878
+ */
879
+ value: e.oneOfType([e.number, e.string]),
880
+ /**
881
+ * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
882
+ * @default 'plain'
883
+ */
884
+ variant: e.oneOfType([e.oneOf(["outlined", "plain", "soft", "solid"]), e.string])
885
+ });
886
+ function Be(o) {
887
+ return D("MuiTabs", o);
888
+ }
889
+ N("MuiTabs", ["root", "horizontal", "vertical", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg"]);
890
+ const Je = ["children", "value", "defaultValue", "orientation", "direction", "component", "onChange", "selectionFollowsFocus", "variant", "color", "size", "slots", "slotProps"], Se = (o) => {
891
+ const {
892
+ orientation: t,
893
+ variant: a,
894
+ color: n,
895
+ size: s
896
+ } = o, r = {
897
+ root: ["root", t, a && `variant${O(a)}`, n && `color${O(n)}`, s && `size${O(s)}`]
898
+ };
899
+ return J(r, Be, {});
900
+ }, We = E("div", {
901
+ name: "JoyTabs",
902
+ slot: "Root",
903
+ overridesResolver: (o, t) => t.root
904
+ })(({
905
+ ownerState: o,
906
+ theme: t
907
+ }) => {
908
+ var a, n;
909
+ const s = (a = t.variants[o.variant]) == null ? void 0 : a[o.color], {
910
+ bgcolor: r,
911
+ backgroundColor: i,
912
+ background: d,
913
+ p: u,
914
+ padding: c
915
+ } = fe({
916
+ theme: t,
917
+ ownerState: o
918
+ }, ["bgcolor", "backgroundColor", "background", "p", "padding"]), f = A(t, `palette.${r}`) || r || A(t, `palette.${i}`) || i || d || (s == null ? void 0 : s.backgroundColor) || (s == null ? void 0 : s.background) || t.vars.palette.background.surface;
919
+ return p({}, o.size === "sm" && {
920
+ "--Tabs-spacing": "0.75rem"
921
+ }, o.size === "md" && {
922
+ "--Tabs-spacing": "1rem"
923
+ }, o.size === "lg" && {
924
+ "--Tabs-spacing": "1.25rem"
925
+ }, {
926
+ "--Tab-indicatorThickness": "2px",
927
+ "--Icon-color": o.color !== "neutral" || o.variant === "solid" ? "currentColor" : t.vars.palette.text.icon,
928
+ "--TabList-stickyBackground": f === "transparent" ? "initial" : f,
929
+ // for sticky TabList
930
+ display: "flex",
931
+ flexDirection: "column"
932
+ }, o.orientation === "vertical" && {
933
+ flexDirection: "row"
934
+ }, {
935
+ backgroundColor: t.vars.palette.background.surface,
936
+ position: "relative"
937
+ }, t.typography[`body-${o.size}`], (n = t.variants[o.variant]) == null ? void 0 : n[o.color], u !== void 0 && {
938
+ "--Tabs-padding": u
939
+ }, c !== void 0 && {
940
+ "--Tabs-padding": c
941
+ });
942
+ }), He = /* @__PURE__ */ l.forwardRef(function(t, a) {
943
+ const n = U({
944
+ props: t,
945
+ name: "JoyTabs"
946
+ }), {
947
+ children: s,
948
+ value: r,
949
+ defaultValue: i,
950
+ orientation: d = "horizontal",
951
+ direction: u = "ltr",
952
+ component: c,
953
+ variant: f = "plain",
954
+ color: b = "neutral",
955
+ size: v = "md",
956
+ slots: m = {},
957
+ slotProps: h = {}
958
+ } = n, T = j(n, Je), g = i || (r === void 0 ? 0 : void 0), {
959
+ contextValue: y
960
+ } = ve(p({}, n, {
961
+ orientation: d,
962
+ defaultValue: g
963
+ })), I = p({}, n, {
964
+ orientation: d,
965
+ direction: u,
966
+ variant: f,
967
+ color: b,
968
+ size: v
969
+ }), R = Se(I), L = p({}, T, {
970
+ component: c,
971
+ slots: m,
972
+ slotProps: h
973
+ }), [k, x] = B("root", {
974
+ ref: a,
975
+ elementType: We,
976
+ externalForwardedProps: L,
977
+ additionalProps: {
978
+ ref: a,
979
+ as: c
980
+ },
981
+ ownerState: I,
982
+ className: R.root
983
+ });
984
+ return (
985
+ // @ts-ignore `defaultValue` between HTMLDiv and TabsProps is conflicted.
986
+ /* @__PURE__ */ C(k, p({}, x, {
987
+ children: /* @__PURE__ */ C(ge, {
988
+ value: y,
989
+ children: /* @__PURE__ */ C(W.Provider, {
990
+ value: v,
991
+ children: s
992
+ })
993
+ })
994
+ }))
995
+ );
996
+ });
997
+ process.env.NODE_ENV !== "production" && (He.propTypes = {
998
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
999
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1000
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1001
+ // └─────────────────────────────────────────────────────────────────────┘
1002
+ /**
1003
+ * The content of the component.
1004
+ */
1005
+ children: e.node,
1006
+ /**
1007
+ * The color of the component. It supports those theme colors that make sense for this component.
1008
+ * @default 'neutral'
1009
+ */
1010
+ color: e.oneOfType([e.oneOf(["danger", "neutral", "primary", "success", "warning"]), e.string]),
1011
+ /**
1012
+ * The component used for the root node.
1013
+ * Either a string to use a HTML element or a component.
1014
+ */
1015
+ component: e.elementType,
1016
+ /**
1017
+ * The default value. Use when the component is not controlled.
1018
+ */
1019
+ defaultValue: e.oneOfType([e.number, e.string]),
1020
+ /**
1021
+ * The direction of the text.
1022
+ * @default 'ltr'
1023
+ */
1024
+ direction: e.oneOf(["ltr", "rtl"]),
1025
+ /**
1026
+ * Callback invoked when new value is being set.
1027
+ */
1028
+ onChange: e.func,
1029
+ /**
1030
+ * The component orientation (layout flow direction).
1031
+ * @default 'horizontal'
1032
+ */
1033
+ orientation: e.oneOf(["horizontal", "vertical"]),
1034
+ /**
1035
+ * If `true` the selected tab changes on focus. Otherwise it only
1036
+ * changes on activation.
1037
+ */
1038
+ selectionFollowsFocus: e.bool,
1039
+ /**
1040
+ * The size of the component.
1041
+ * @default 'md'
1042
+ */
1043
+ size: e.oneOfType([e.oneOf(["sm", "md", "lg"]), e.string]),
1044
+ /**
1045
+ * The props used for each slot inside.
1046
+ * @default {}
1047
+ */
1048
+ slotProps: e.shape({
1049
+ root: e.oneOfType([e.func, e.object])
1050
+ }),
1051
+ /**
1052
+ * The components used for each slot inside.
1053
+ * @default {}
1054
+ */
1055
+ slots: e.shape({
1056
+ root: e.elementType
1057
+ }),
1058
+ /**
1059
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1060
+ */
1061
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1062
+ /**
1063
+ * The value of the currently selected `Tab`.
1064
+ * If you don't want any selected `Tab`, you can set this prop to `null`.
1065
+ */
1066
+ value: e.oneOfType([e.number, e.string]),
1067
+ /**
1068
+ * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
1069
+ * @default 'plain'
1070
+ */
1071
+ variant: e.oneOfType([e.oneOf(["outlined", "plain", "soft", "solid"]), e.string])
1072
+ });
1073
+ export {
1074
+ He as T,
1075
+ Me as a,
1076
+ ke as b,
1077
+ je as c,
1078
+ Le as t
1079
+ };