fansunited-frontend-components 0.0.69 → 0.0.71

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 (95) hide show
  1. package/Betslip.js +1 -1
  2. package/ChanceGame.js +529 -520
  3. package/ClassicQuizPlay.js +1725 -1458
  4. package/CollectLead.js +141 -141
  5. package/Discussion.js +1 -1
  6. package/EitherOrPlay.js +1524 -1331
  7. package/EventCard.js +3001 -1848
  8. package/EventGamePlay.js +2023 -1742
  9. package/Leaderboard.js +367 -357
  10. package/MatchQuizPlay.js +2936 -2649
  11. package/PersonalityQuizPlay.js +1395 -1119
  12. package/PickThePair.js +481 -472
  13. package/PlayerOfTheMatch.js +235 -234
  14. package/PollVote.js +1318 -1036
  15. package/Predictor.js +4383 -4390
  16. package/README.md +110 -4
  17. package/Standings.js +652 -643
  18. package/TopX.js +2646 -2645
  19. package/chunks/{AccessTime-7cim24ED.js → AccessTime-BkHriW4j.js} +1 -1
  20. package/chunks/{AlertMessage-X4MQ4qsN.js → AlertMessage-DwSmhmHt.js} +11 -11
  21. package/chunks/{Avatar-RBMU1Gkk.js → Avatar-CEbT4X-o.js} +22 -22
  22. package/chunks/{Button-GawVOPKi.js → Button-CO-k2gLb.js} +3 -3
  23. package/chunks/{Card--xcz3SKi.js → Card-DZdPl8-h.js} +7 -7
  24. package/chunks/{CardActions-CPwvcLGp.js → CardActions-DTThyeLX.js} +20 -20
  25. package/chunks/{CardContent-Ew6fr-KR.js → CardContent-CzC1EwoD.js} +14 -14
  26. package/chunks/{ChanceGameEmbedVariant-Dio4ihOd.js → ChanceGameEmbedVariant-CteJ4tix.js} +309 -195
  27. package/chunks/{CheckCircle-DgKcR_no.js → CheckCircle-BzM-2e1z.js} +1 -1
  28. package/chunks/{Chip-CYpaygnD.js → Chip-BF1FXK0I.js} +15 -15
  29. package/chunks/{Close-CdJNGcLx.js → Close-BiMLcNyG.js} +1 -1
  30. package/chunks/{Close-D2mtuGDo.js → Close-CggU6Ga3.js} +1 -1
  31. package/chunks/{CollectLeadForm-D0P_JHmT.js → CollectLeadForm-BZj-9IDt.js} +1389 -1463
  32. package/chunks/ConsentsList-CtKgLYa8.js +339 -0
  33. package/chunks/DirectionScope-BGDPaR6B.js +24 -0
  34. package/chunks/{Divider-DcW0V71y.js → Divider-Dueyhj7K.js} +8 -8
  35. package/chunks/{Edit-Bcj6J4rt.js → Edit-Dqa7th_A.js} +3 -3
  36. package/chunks/EditOutlined-B__rjTwX.js +14 -0
  37. package/chunks/{EmojiEvents-g001ss_z.js → EmojiEvents-CpsA2Qo0.js} +1 -1
  38. package/chunks/{FavoriteBorder-Lr6swB6-.js → FavoriteBorder-DrC_eOCd.js} +1 -1
  39. package/chunks/{FormControl-BKlK7WPd.js → FormControl-fKyT2Mql.js} +34 -33
  40. package/chunks/{FormControlContext-B2HqeXgq.js → FormControlContext-CSrMcHcv.js} +11 -11
  41. package/chunks/{FormLabel-C47pX5hN.js → FormLabel-DlXT5RZd.js} +22 -25
  42. package/chunks/{InlineSpinner-Imz27zb2.js → InlineSpinner-CuisRY-E.js} +2 -2
  43. package/chunks/{Input-nS_KO1Bu.js → Input-CkSIGH-d.js} +15 -15
  44. package/chunks/{KeyboardArrowDown-CyZAOE-W.js → KeyboardArrowDown-DL8VjkJT.js} +1 -1
  45. package/chunks/{KeyboardArrowRight-FI0kqwO1.js → KeyboardArrowRight-Cm50UqHb.js} +1 -1
  46. package/chunks/{Link-DKU7kDL8.js → Link-BljMbRuR.js} +13 -13
  47. package/chunks/{ListItemButton-CPVIEVpf.js → ListItemButton-BqEcbBU0.js} +50 -50
  48. package/chunks/{ModalDialog-DDx8wQa3.js → ModalDialog-B0DLv5vW.js} +59 -59
  49. package/chunks/{NotFoundSkeleton-CJZIRj5-.js → NotFoundSkeleton-DKxLhOwI.js} +149 -125
  50. package/chunks/{Notification-BvVfrrB3.js → Notification-CEdU0opQ.js} +18 -18
  51. package/chunks/{OverlayScoreStateSkeleton-CAhCAjkS.js → OverlayScoreStateSkeleton-BtCy650g.js} +18 -12
  52. package/chunks/{ArrowRightAlt-DrBMgptf.js → OverlayScoreStateWrapperSkeleton-Ch_E6KQ6.js} +18 -21
  53. package/chunks/OverlaySignInSkeleton-DEiH7fmp.js +517 -0
  54. package/chunks/{Person-DB_bEPcg.js → Person-CLQl7Sxs.js} +1 -1
  55. package/chunks/{PersonOutline-BAOtfb1t.js → PersonOutline-D8yrpbw7.js} +1 -1
  56. package/chunks/{PickOneOfX-Dp6fzXJn.js → PickOneOfX-CG0B5u7Y.js} +3 -3
  57. package/chunks/{Popper-Bpy7eYt-.js → Popper-BSnc2Lit.js} +58 -58
  58. package/chunks/Portal-D8t1Jd5e.js +65 -0
  59. package/chunks/{Portal-Dvh4m8kk.js → Portal-cK515D9M.js} +4 -4
  60. package/chunks/{PrizeCard-CXjFADAN.js → PrizeCard-CyVJJLo1.js} +6295 -4346
  61. package/chunks/{Search-uVJw-NhK.js → Search-BXhhax8M.js} +1 -1
  62. package/chunks/{Select-BeixD4Vw.js → Select-DyRdhrMr.js} +61 -61
  63. package/chunks/{Sheet-vOgATocO.js → Sheet-sYNAL7gX.js} +14 -14
  64. package/chunks/{Spinner-C219bcnm.js → Spinner-Bb4eb64F.js} +2 -2
  65. package/chunks/SplitSignInSkeleton-BZT0ngoW.js +150 -0
  66. package/chunks/{Stack-JIDLCVx0.js → Stack-DX41loGb.js} +21 -21
  67. package/chunks/{StandardContentSkeleton-DsGBNMHN.js → StandardContentSkeleton-DAh7l7cd.js} +12 -12
  68. package/chunks/{Table-Cx7htUDp.js → Table-C09wF6nK.js} +8 -8
  69. package/chunks/{Tabs-CIJK8YZY.js → Tabs-Dhih1Lqb.js} +46 -46
  70. package/chunks/{Textarea-KSwIUuq8.js → Textarea-DWyUKbVv.js} +184 -244
  71. package/chunks/{TimerOutlined-BUL4BZFp.js → TimerOutlined-DeWQFv5g.js} +1 -1
  72. package/chunks/{Tooltip-DrP2vx9i.js → Tooltip-Dnj_oxHb.js} +55 -55
  73. package/chunks/{Typography-DFdgIDQS.js → Typography-B8CtvKkm.js} +1 -1
  74. package/chunks/{dividerClasses-BtSFa36Z.js → dividerClasses-BoOrlu7X.js} +1 -1
  75. package/chunks/{elementAcceptingRef-CZFKGdxR.js → elementAcceptingRef-DROQPsxj.js} +1 -1
  76. package/chunks/formLabelClasses-Bh4Fh0fk.js +9 -0
  77. package/chunks/{helpers-D8cWUfGf.js → helpers-DgUDSfd1.js} +14 -12
  78. package/chunks/{index-DZqXLvFO.js → index-C_R74meU.js} +69 -72
  79. package/chunks/index-PC-q6Shn.js +4 -0
  80. package/chunks/{main-C05CZWMa.js → main-5c5yYsj9.js} +973 -963
  81. package/chunks/{main-CHr45Z4W.js → main-BXu1mzLz.js} +157 -157
  82. package/chunks/{useButton-tjUHKc-B.js → useButton-CQ2o2nXk.js} +2 -2
  83. package/chunks/useConsents-CIhPZNel.js +1165 -0
  84. package/chunks/{useEventCallback-BFPi8YtI.js → useEventCallback-B1ahtq-a.js} +1 -1
  85. package/chunks/{useForwardedInput-VvmRv9KU.js → useForwardedInput-DRXHXEOw.js} +22 -22
  86. package/chunks/{useImageVariant-Cs6lWUs2.js → useImageVariant-D6aho5sy.js} +1 -1
  87. package/chunks/useSwitch-CYz8kkTr.js +65 -0
  88. package/index.js +3 -3
  89. package/package.json +2 -2
  90. package/chunks/EditOutlined-PCc4gafz.js +0 -11
  91. package/chunks/OverlayApiErrorSkeleton-JMWA0FV8.js +0 -731
  92. package/chunks/OverlayLeadAfterCollection-BwF9MvIB.js +0 -678
  93. package/chunks/Portal-bNE7Trh9.js +0 -55
  94. package/chunks/SplitLeadAfterCollection-BijLacCk.js +0 -236
  95. package/chunks/index-JDeYpSi1.js +0 -4
@@ -1,85 +1,26 @@
1
- import { t as g, _ as L, K as M, P as r, r as de, s as ue, J as A } from "./PrizeCard-CXjFADAN.js";
1
+ import { _ as L, T as V, w as u, P as e, t as de, v as ce, O as M } from "./PrizeCard-CyVJJLo1.js";
2
2
  import * as x from "react";
3
- import { u as pe } from "./useControlled-BYdyS7Pn.js";
4
- import { g as fe, d as U, s as F, u as xe, a as $, c as ge } from "./Typography-DFdgIDQS.js";
5
- import { u as he } from "./useForwardedInput-VvmRv9KU.js";
6
- import { jsxs as j, jsx as I } from "react/jsx-runtime";
3
+ import { d as ue, s as $, u as pe, a as E, c as xe } from "./Typography-B8CtvKkm.js";
4
+ import { u as ve } from "./useForwardedInput-DRXHXEOw.js";
5
+ import { jsxs as U, jsx as S } from "react/jsx-runtime";
7
6
  import { o as J } from "./ownerWindow-PI509BpA.js";
8
- function ve(a, e = 166) {
9
- let p;
10
- function s(...d) {
11
- const u = () => {
12
- a.apply(this, d);
7
+ function ge(a, r = 166) {
8
+ let d;
9
+ function n(...i) {
10
+ const s = () => {
11
+ a.apply(this, i);
13
12
  };
14
- clearTimeout(p), p = setTimeout(u, e);
13
+ clearTimeout(d), d = setTimeout(s, r);
15
14
  }
16
- return s.clear = () => {
17
- clearTimeout(p);
18
- }, s;
15
+ return n.clear = () => {
16
+ clearTimeout(d);
17
+ }, n;
19
18
  }
20
- function Ee(a) {
21
- const {
22
- checked: e,
23
- defaultChecked: p,
24
- disabled: s,
25
- onBlur: d,
26
- onChange: u,
27
- onFocus: h,
28
- onFocusVisible: v,
29
- readOnly: m,
30
- required: S
31
- } = a, [T, w] = pe({
32
- controlled: e,
33
- default: !!p,
34
- name: "Switch",
35
- state: "checked"
36
- }), k = (c) => (t) => {
37
- var i;
38
- t.nativeEvent.defaultPrevented || (w(t.target.checked), u == null || u(t), (i = c.onChange) == null || i.call(c, t));
39
- }, {
40
- isFocusVisibleRef: b,
41
- onBlur: H,
42
- onFocus: R,
43
- ref: B
44
- } = fe(), [n, o] = x.useState(!1);
45
- s && n && o(!1), x.useEffect(() => {
46
- b.current = n;
47
- }, [n, b]);
48
- const l = x.useRef(null), f = (c) => (t) => {
49
- var i;
50
- l.current || (l.current = t.currentTarget), R(t), b.current === !0 && (o(!0), v == null || v(t)), h == null || h(t), (i = c.onFocus) == null || i.call(c, t);
51
- }, z = (c) => (t) => {
52
- var i;
53
- H(t), b.current === !1 && o(!1), d == null || d(t), (i = c.onBlur) == null || i.call(c, t);
54
- }, y = U(B, l);
55
- return {
56
- checked: T,
57
- disabled: !!s,
58
- focusVisible: n,
59
- getInputProps: (c = {}) => g({
60
- checked: e,
61
- defaultChecked: p,
62
- disabled: s,
63
- readOnly: m,
64
- ref: y,
65
- required: S,
66
- type: "checkbox",
67
- role: "switch",
68
- "aria-checked": e
69
- }, c, {
70
- onChange: k(c),
71
- onFocus: f(c),
72
- onBlur: z(c)
73
- }),
74
- inputRef: y,
75
- readOnly: !!m
76
- };
77
- }
78
- const me = ["onChange", "maxRows", "minRows", "style", "value"];
79
- function E(a) {
19
+ const fe = ["onChange", "maxRows", "minRows", "style", "value"];
20
+ function P(a) {
80
21
  return parseInt(a, 10) || 0;
81
22
  }
82
- const Te = {
23
+ const he = {
83
24
  shadow: {
84
25
  // Visibility needed to hide the extra text area on iPads
85
26
  visibility: "hidden",
@@ -94,87 +35,87 @@ const Te = {
94
35
  transform: "translateZ(0)"
95
36
  }
96
37
  };
97
- function be(a) {
38
+ function me(a) {
98
39
  return a == null || Object.keys(a).length === 0 || a.outerHeightStyle === 0 && !a.overflowing;
99
40
  }
100
- const q = /* @__PURE__ */ x.forwardRef(function(e, p) {
41
+ const j = /* @__PURE__ */ x.forwardRef(function(r, d) {
101
42
  const {
102
- onChange: s,
103
- maxRows: d,
104
- minRows: u = 1,
105
- style: h,
106
- value: v
107
- } = e, m = L(e, me), {
108
- current: S
109
- } = x.useRef(v != null), T = x.useRef(null), w = U(p, T), k = x.useRef(null), b = x.useRef(null), H = x.useCallback(() => {
110
- const n = T.current, l = J(n).getComputedStyle(n);
43
+ onChange: n,
44
+ maxRows: i,
45
+ minRows: s = 1,
46
+ style: v,
47
+ value: g
48
+ } = r, f = L(r, fe), {
49
+ current: w
50
+ } = x.useRef(g != null), m = x.useRef(null), D = ue(d, m), R = x.useRef(null), O = x.useRef(null), z = x.useCallback(() => {
51
+ const t = m.current, l = J(t).getComputedStyle(t);
111
52
  if (l.width === "0px")
112
53
  return {
113
54
  outerHeightStyle: 0,
114
55
  overflowing: !1
115
56
  };
116
- const f = b.current;
117
- f.style.width = l.width, f.value = n.value || e.placeholder || "x", f.value.slice(-1) === `
118
- ` && (f.value += " ");
119
- const z = l.boxSizing, y = E(l.paddingBottom) + E(l.paddingTop), C = E(l.borderBottomWidth) + E(l.borderTopWidth), c = f.scrollHeight;
120
- f.value = "x";
121
- const t = f.scrollHeight;
122
- let i = c;
123
- u && (i = Math.max(Number(u) * t, i)), d && (i = Math.min(Number(d) * t, i)), i = Math.max(i, t);
124
- const P = i + (z === "border-box" ? y + C : 0), N = Math.abs(i - c) <= 1;
57
+ const c = O.current;
58
+ c.style.width = l.width, c.value = t.value || r.placeholder || "x", c.value.slice(-1) === `
59
+ ` && (c.value += " ");
60
+ const y = l.boxSizing, b = P(l.paddingBottom) + P(l.paddingTop), h = P(l.borderBottomWidth) + P(l.borderTopWidth), k = c.scrollHeight;
61
+ c.value = "x";
62
+ const C = c.scrollHeight;
63
+ let p = k;
64
+ s && (p = Math.max(Number(s) * C, p)), i && (p = Math.min(Number(i) * C, p)), p = Math.max(p, C);
65
+ const N = p + (y === "border-box" ? b + h : 0), W = Math.abs(p - k) <= 1;
125
66
  return {
126
- outerHeightStyle: P,
127
- overflowing: N
67
+ outerHeightStyle: N,
68
+ overflowing: W
128
69
  };
129
- }, [d, u, e.placeholder]), R = x.useCallback(() => {
130
- const n = H();
131
- if (be(n))
70
+ }, [i, s, r.placeholder]), T = x.useCallback(() => {
71
+ const t = z();
72
+ if (me(t))
132
73
  return;
133
- const o = n.outerHeightStyle, l = T.current;
134
- k.current !== o && (k.current = o, l.style.height = `${o}px`), l.style.overflow = n.overflowing ? "hidden" : "";
135
- }, [H]);
136
- M(() => {
137
- const n = () => {
138
- R();
74
+ const o = t.outerHeightStyle, l = m.current;
75
+ R.current !== o && (R.current = o, l.style.height = `${o}px`), l.style.overflow = t.overflowing ? "hidden" : "";
76
+ }, [z]);
77
+ V(() => {
78
+ const t = () => {
79
+ T();
139
80
  };
140
81
  let o;
141
82
  const l = () => {
142
83
  cancelAnimationFrame(o), o = requestAnimationFrame(() => {
143
- n();
84
+ t();
144
85
  });
145
- }, f = ve(n), z = T.current, y = J(z);
146
- y.addEventListener("resize", f);
147
- let C;
148
- return typeof ResizeObserver < "u" && (C = new ResizeObserver(process.env.NODE_ENV === "test" ? l : n), C.observe(z)), () => {
149
- f.clear(), cancelAnimationFrame(o), y.removeEventListener("resize", f), C && C.disconnect();
86
+ }, c = ge(t), y = m.current, b = J(y);
87
+ b.addEventListener("resize", c);
88
+ let h;
89
+ return typeof ResizeObserver < "u" && (h = new ResizeObserver(process.env.NODE_ENV === "test" ? l : t), h.observe(y)), () => {
90
+ c.clear(), cancelAnimationFrame(o), b.removeEventListener("resize", c), h && h.disconnect();
150
91
  };
151
- }, [H, R]), M(() => {
152
- R();
92
+ }, [z, T]), V(() => {
93
+ T();
153
94
  });
154
- const B = (n) => {
155
- S || R(), s && s(n);
95
+ const B = (t) => {
96
+ w || T(), n && n(t);
156
97
  };
157
- return /* @__PURE__ */ j(x.Fragment, {
158
- children: [/* @__PURE__ */ I("textarea", g({
159
- value: v,
98
+ return /* @__PURE__ */ U(x.Fragment, {
99
+ children: [/* @__PURE__ */ S("textarea", u({
100
+ value: g,
160
101
  onChange: B,
161
- ref: w,
162
- rows: u,
163
- style: h
164
- }, m)), /* @__PURE__ */ I("textarea", {
102
+ ref: D,
103
+ rows: s,
104
+ style: v
105
+ }, f)), /* @__PURE__ */ S("textarea", {
165
106
  "aria-hidden": !0,
166
- className: e.className,
107
+ className: r.className,
167
108
  readOnly: !0,
168
- ref: b,
109
+ ref: O,
169
110
  tabIndex: -1,
170
- style: g({}, Te.shadow, h, {
111
+ style: u({}, he.shadow, v, {
171
112
  paddingTop: 0,
172
113
  paddingBottom: 0
173
114
  })
174
115
  })]
175
116
  });
176
117
  });
177
- process.env.NODE_ENV !== "production" && (q.propTypes = {
118
+ process.env.NODE_ENV !== "production" && (j.propTypes = {
178
119
  // ┌────────────────────────────── Warning ──────────────────────────────┐
179
120
  // │ These PropTypes are generated from the TypeScript type definitions. │
180
121
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -182,60 +123,60 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
182
123
  /**
183
124
  * @ignore
184
125
  */
185
- className: r.string,
126
+ className: e.string,
186
127
  /**
187
128
  * Maximum number of rows to display.
188
129
  */
189
- maxRows: r.oneOfType([r.number, r.string]),
130
+ maxRows: e.oneOfType([e.number, e.string]),
190
131
  /**
191
132
  * Minimum number of rows to display.
192
133
  * @default 1
193
134
  */
194
- minRows: r.oneOfType([r.number, r.string]),
135
+ minRows: e.oneOfType([e.number, e.string]),
195
136
  /**
196
137
  * @ignore
197
138
  */
198
- onChange: r.func,
139
+ onChange: e.func,
199
140
  /**
200
141
  * @ignore
201
142
  */
202
- placeholder: r.string,
143
+ placeholder: e.string,
203
144
  /**
204
145
  * @ignore
205
146
  */
206
- style: r.object,
147
+ style: e.object,
207
148
  /**
208
149
  * @ignore
209
150
  */
210
- value: r.oneOfType([r.arrayOf(r.string), r.number, r.string])
151
+ value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
211
152
  });
212
- function ye(a) {
213
- return ue("MuiTextarea", a);
153
+ function Te(a) {
154
+ return ce("MuiTextarea", a);
214
155
  }
215
- const K = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator", "formControl", "disabled", "error", "focused", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "sizeSm", "sizeMd", "sizeLg", "variantPlain", "variantOutlined", "variantSoft"]), Ce = ["propsToForward", "rootStateClasses", "inputStateClasses", "getRootProps", "getInputProps", "formControl", "focused", "error", "disabled", "size", "color", "variant", "startDecorator", "endDecorator", "minRows", "maxRows", "component", "slots", "slotProps"], Re = (a) => {
156
+ const q = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator", "formControl", "disabled", "error", "focused", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "sizeSm", "sizeMd", "sizeLg", "variantPlain", "variantOutlined", "variantSoft"]), ye = ["propsToForward", "rootStateClasses", "inputStateClasses", "getRootProps", "getInputProps", "formControl", "focused", "error", "disabled", "size", "color", "variant", "startDecorator", "endDecorator", "minRows", "maxRows", "component", "slots", "slotProps"], be = (a) => {
216
157
  const {
217
- disabled: e,
218
- variant: p,
219
- color: s,
220
- size: d
221
- } = a, u = {
222
- root: ["root", e && "disabled", p && `variant${A(p)}`, s && `color${A(s)}`, d && `size${A(d)}`],
158
+ disabled: r,
159
+ variant: d,
160
+ color: n,
161
+ size: i
162
+ } = a, s = {
163
+ root: ["root", r && "disabled", d && `variant${M(d)}`, n && `color${M(n)}`, i && `size${M(i)}`],
223
164
  textarea: ["textarea"],
224
165
  startDecorator: ["startDecorator"],
225
166
  endDecorator: ["endDecorator"]
226
167
  };
227
- return ge(u, ye, {});
228
- }, ze = F("div", {
168
+ return xe(s, Te, {});
169
+ }, Ce = $("div", {
229
170
  name: "JoyTextarea",
230
171
  slot: "Root",
231
- overridesResolver: (a, e) => e.root
172
+ overridesResolver: (a, r) => r.root
232
173
  })(({
233
174
  theme: a,
234
- ownerState: e
175
+ ownerState: r
235
176
  }) => {
236
- var p, s, d, u, h, v;
237
- const m = (p = a.variants[`${e.variant}`]) == null ? void 0 : p[e.color];
238
- return [g({
177
+ var d, n, i, s, v, g;
178
+ const f = (d = a.variants[`${r.variant}`]) == null ? void 0 : d[r.color];
179
+ return [u({
239
180
  "--Textarea-radius": a.vars.radius.sm,
240
181
  "--Textarea-gap": "0.5rem",
241
182
  "--Textarea-placeholderColor": "inherit",
@@ -243,26 +184,26 @@ const K = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator
243
184
  "--Textarea-decoratorColor": a.vars.palette.text.icon,
244
185
  "--Textarea-focused": "0",
245
186
  "--Textarea-focusedThickness": a.vars.focus.thickness,
246
- "--Textarea-focusedHighlight": (s = a.vars.palette[e.color === "neutral" ? "primary" : e.color]) == null ? void 0 : s[500],
247
- '&:not([data-inverted-colors="false"])': g({}, e.instanceColor && {
248
- "--_Textarea-focusedHighlight": (d = a.vars.palette[e.instanceColor === "neutral" ? "primary" : e.instanceColor]) == null ? void 0 : d[500]
187
+ "--Textarea-focusedHighlight": (n = a.vars.palette[r.color === "neutral" ? "primary" : r.color]) == null ? void 0 : n[500],
188
+ '&:not([data-inverted-colors="false"])': u({}, r.instanceColor && {
189
+ "--_Textarea-focusedHighlight": (i = a.vars.palette[r.instanceColor === "neutral" ? "primary" : r.instanceColor]) == null ? void 0 : i[500]
249
190
  }, {
250
191
  "--Textarea-focusedHighlight": `var(--_Textarea-focusedHighlight, ${a.vars.palette.focusVisible})`
251
192
  })
252
- }, e.size === "sm" && {
193
+ }, r.size === "sm" && {
253
194
  "--Textarea-minHeight": "2rem",
254
195
  "--Textarea-paddingBlock": "calc(0.375rem - 0.5px - var(--variant-borderWidth, 0px))",
255
196
  // to match Input because <textarea> does not center the text at the middle like <input>
256
197
  "--Textarea-paddingInline": "0.5rem",
257
198
  "--Textarea-decoratorChildHeight": "min(1.5rem, var(--Textarea-minHeight))",
258
199
  "--Icon-fontSize": a.vars.fontSize.xl
259
- }, e.size === "md" && {
200
+ }, r.size === "md" && {
260
201
  "--Textarea-minHeight": "2.25rem",
261
202
  "--Textarea-paddingBlock": "calc(0.375rem - var(--variant-borderWidth, 0px))",
262
203
  "--Textarea-paddingInline": "0.75rem",
263
204
  "--Textarea-decoratorChildHeight": "min(1.75rem, var(--Textarea-minHeight))",
264
205
  "--Icon-fontSize": a.vars.fontSize.xl2
265
- }, e.size === "lg" && {
206
+ }, r.size === "lg" && {
266
207
  "--Textarea-minHeight": "3rem",
267
208
  "--Textarea-paddingBlock": "calc(0.75rem - var(--variant-borderWidth, 0px))",
268
209
  "--Textarea-paddingInline": "1rem",
@@ -280,7 +221,7 @@ const K = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator
280
221
  "--Button-radius": "var(--Textarea-decoratorChildRadius)",
281
222
  "--IconButton-radius": "var(--Textarea-decoratorChildRadius)",
282
223
  boxSizing: "border-box"
283
- }, e.variant !== "plain" && {
224
+ }, r.variant !== "plain" && {
284
225
  boxShadow: a.shadow.xs
285
226
  }, {
286
227
  minWidth: 0,
@@ -293,8 +234,8 @@ const K = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator
293
234
  // the paddingInlineEnd is added to the textarea. It looks better when the scrollbar appears.
294
235
  paddingBlock: "var(--Textarea-paddingBlock)",
295
236
  borderRadius: "var(--Textarea-radius)"
296
- }, a.typography[`body-${e.size}`], m, {
297
- backgroundColor: (u = m == null ? void 0 : m.backgroundColor) != null ? u : a.vars.palette.background.surface,
237
+ }, a.typography[`body-${r.size}`], f, {
238
+ backgroundColor: (s = f == null ? void 0 : f.backgroundColor) != null ? s : a.vars.palette.background.surface,
298
239
  "&::before": {
299
240
  boxSizing: "border-box",
300
241
  content: '""',
@@ -312,20 +253,20 @@ const K = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator
312
253
  boxShadow: "var(--Textarea-focusedInset, inset) 0 0 0 calc(var(--Textarea-focused) * var(--Textarea-focusedThickness)) var(--Textarea-focusedHighlight)"
313
254
  }
314
255
  }), {
315
- "&:hover": g({}, (h = a.variants[`${e.variant}Hover`]) == null ? void 0 : h[e.color], {
256
+ "&:hover": u({}, (v = a.variants[`${r.variant}Hover`]) == null ? void 0 : v[r.color], {
316
257
  backgroundColor: null,
317
258
  // it is not common to change background on hover for Textarea
318
259
  cursor: "text"
319
260
  }),
320
- [`&.${K.disabled}`]: (v = a.variants[`${e.variant}Disabled`]) == null ? void 0 : v[e.color],
261
+ [`&.${q.disabled}`]: (g = a.variants[`${r.variant}Disabled`]) == null ? void 0 : g[r.color],
321
262
  "&:focus-within::before": {
322
263
  "--Textarea-focused": "1"
323
264
  }
324
265
  }];
325
- }), ke = F(q, {
266
+ }), Re = $(j, {
326
267
  name: "JoyTextarea",
327
268
  slot: "Textarea",
328
- overridesResolver: (a, e) => e.textarea
269
+ overridesResolver: (a, r) => r.textarea
329
270
  })({
330
271
  resize: "none",
331
272
  border: "none",
@@ -365,10 +306,10 @@ const K = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator
365
306
  color: "var(--Textarea-placeholderColor)",
366
307
  opacity: "var(--Textarea-placeholderOpacity)"
367
308
  }
368
- }), He = F("div", {
309
+ }), ze = $("div", {
369
310
  name: "JoyTextarea",
370
311
  slot: "StartDecorator",
371
- overridesResolver: (a, e) => e.startDecorator
312
+ overridesResolver: (a, r) => r.startDecorator
372
313
  })({
373
314
  display: "flex",
374
315
  marginInlineStart: "calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",
@@ -376,10 +317,10 @@ const K = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator
376
317
  marginBlockEnd: "var(--Textarea-gap)",
377
318
  color: "var(--Textarea-decoratorColor)",
378
319
  cursor: "initial"
379
- }), Se = F("div", {
320
+ }), He = $("div", {
380
321
  name: "JoyTextarea",
381
322
  slot: "EndDecorator",
382
- overridesResolver: (a, e) => e.endDecorator
323
+ overridesResolver: (a, r) => r.endDecorator
383
324
  })({
384
325
  display: "flex",
385
326
  marginInlineStart: "calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",
@@ -387,93 +328,93 @@ const K = de("MuiTextarea", ["root", "textarea", "startDecorator", "endDecorator
387
328
  marginBlockStart: "var(--Textarea-gap)",
388
329
  color: "var(--Textarea-decoratorColor)",
389
330
  cursor: "initial"
390
- }), we = /* @__PURE__ */ x.forwardRef(function(e, p) {
391
- var s, d, u, h, v, m, S, T;
392
- const w = xe({
393
- props: e,
331
+ }), Se = /* @__PURE__ */ x.forwardRef(function(r, d) {
332
+ var n, i, s, v, g, f, w, m;
333
+ const D = pe({
334
+ props: r,
394
335
  name: "JoyTextarea"
395
- }), k = he(w, K), {
396
- propsToForward: b,
397
- rootStateClasses: H,
398
- inputStateClasses: R,
336
+ }), R = ve(D, q), {
337
+ propsToForward: O,
338
+ rootStateClasses: z,
339
+ inputStateClasses: T,
399
340
  getRootProps: B,
400
- getInputProps: n,
341
+ getInputProps: t,
401
342
  formControl: o,
402
343
  focused: l,
403
- error: f = !1,
404
- disabled: z = !1,
405
- size: y = "md",
406
- color: C = "neutral",
407
- variant: c = "outlined",
408
- startDecorator: t,
409
- endDecorator: i,
410
- minRows: P,
411
- maxRows: N,
344
+ error: c = !1,
345
+ disabled: y = !1,
346
+ size: b = "md",
347
+ color: h = "neutral",
348
+ variant: k = "outlined",
349
+ startDecorator: C,
350
+ endDecorator: p,
351
+ minRows: N,
352
+ maxRows: W,
412
353
  component: Z,
413
354
  slots: G = {},
414
- slotProps: Q = {}
415
- } = k, X = L(k, Ce);
355
+ slotProps: K = {}
356
+ } = R, Q = L(R, ye);
416
357
  if (process.env.NODE_ENV !== "production") {
417
- const V = o == null ? void 0 : o.registerEffect;
358
+ const A = o == null ? void 0 : o.registerEffect;
418
359
  x.useEffect(() => {
419
- if (V)
420
- return V();
421
- }, [V]);
360
+ if (A)
361
+ return A();
362
+ }, [A]);
422
363
  }
423
- const Y = (s = (d = e.disabled) != null ? d : o == null ? void 0 : o.disabled) != null ? s : z, W = (u = (h = e.error) != null ? h : o == null ? void 0 : o.error) != null ? u : f, ee = (v = (m = e.size) != null ? m : o == null ? void 0 : o.size) != null ? v : y, re = (S = e.color) != null ? S : W ? "danger" : (T = o == null ? void 0 : o.color) != null ? T : C, D = g({
424
- instanceColor: W ? "danger" : e.color
425
- }, w, {
426
- color: re,
427
- disabled: Y,
428
- error: W,
364
+ const X = (n = (i = r.disabled) != null ? i : o == null ? void 0 : o.disabled) != null ? n : y, F = (s = (v = r.error) != null ? v : o == null ? void 0 : o.error) != null ? s : c, Y = (g = (f = r.size) != null ? f : o == null ? void 0 : o.size) != null ? g : b, ee = (w = r.color) != null ? w : F ? "danger" : (m = o == null ? void 0 : o.color) != null ? m : h, H = u({
365
+ instanceColor: F ? "danger" : r.color
366
+ }, D, {
367
+ color: ee,
368
+ disabled: X,
369
+ error: F,
429
370
  focused: l,
430
- size: ee,
431
- variant: c
432
- }), O = Re(D), _ = g({}, X, {
371
+ size: Y,
372
+ variant: k
373
+ }), _ = be(H), I = u({}, Q, {
433
374
  component: Z,
434
375
  slots: G,
435
- slotProps: Q
436
- }), [ae, oe] = $("root", {
437
- ref: p,
438
- className: [O.root, H],
439
- elementType: ze,
440
- externalForwardedProps: _,
376
+ slotProps: K
377
+ }), [re, ae] = E("root", {
378
+ ref: d,
379
+ className: [_.root, z],
380
+ elementType: Ce,
381
+ externalForwardedProps: I,
441
382
  getSlotProps: B,
442
- ownerState: D
443
- }), [te, ne] = $("textarea", {
383
+ ownerState: H
384
+ }), [oe, te] = E("textarea", {
444
385
  additionalProps: {
445
386
  id: o == null ? void 0 : o.htmlFor,
446
387
  "aria-describedby": o == null ? void 0 : o["aria-describedby"]
447
388
  },
448
- className: [O.textarea, R],
449
- elementType: ke,
450
- internalForwardedProps: g({}, b, {
451
- minRows: P,
452
- maxRows: N
389
+ className: [_.textarea, T],
390
+ elementType: Re,
391
+ internalForwardedProps: u({}, O, {
392
+ minRows: N,
393
+ maxRows: W
453
394
  }),
454
- externalForwardedProps: _,
455
- getSlotProps: n,
456
- ownerState: D
457
- }), [ie, se] = $("startDecorator", {
458
- className: O.startDecorator,
395
+ externalForwardedProps: I,
396
+ getSlotProps: t,
397
+ ownerState: H
398
+ }), [ne, ie] = E("startDecorator", {
399
+ className: _.startDecorator,
400
+ elementType: ze,
401
+ externalForwardedProps: I,
402
+ ownerState: H
403
+ }), [se, le] = E("endDecorator", {
404
+ className: _.endDecorator,
459
405
  elementType: He,
460
- externalForwardedProps: _,
461
- ownerState: D
462
- }), [le, ce] = $("endDecorator", {
463
- className: O.endDecorator,
464
- elementType: Se,
465
- externalForwardedProps: _,
466
- ownerState: D
406
+ externalForwardedProps: I,
407
+ ownerState: H
467
408
  });
468
- return /* @__PURE__ */ j(ae, g({}, oe, {
469
- children: [t && /* @__PURE__ */ I(ie, g({}, se, {
470
- children: t
471
- })), /* @__PURE__ */ I(te, g({}, ne)), i && /* @__PURE__ */ I(le, g({}, ce, {
472
- children: i
409
+ return /* @__PURE__ */ U(re, u({}, ae, {
410
+ children: [C && /* @__PURE__ */ S(ne, u({}, ie, {
411
+ children: C
412
+ })), /* @__PURE__ */ S(oe, u({}, te)), p && /* @__PURE__ */ S(se, u({}, le, {
413
+ children: p
473
414
  }))]
474
415
  }));
475
416
  });
476
- process.env.NODE_ENV !== "production" && (we.propTypes = {
417
+ process.env.NODE_ENV !== "production" && (Se.propTypes = {
477
418
  // ┌────────────────────────────── Warning ──────────────────────────────┐
478
419
  // │ These PropTypes are generated from the TypeScript type definitions. │
479
420
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -481,55 +422,54 @@ process.env.NODE_ENV !== "production" && (we.propTypes = {
481
422
  /**
482
423
  * @ignore
483
424
  */
484
- children: r.node,
425
+ children: e.node,
485
426
  /**
486
427
  * The color of the component. It supports those theme colors that make sense for this component.
487
428
  * @default 'neutral'
488
429
  */
489
- color: r.oneOfType([r.oneOf(["danger", "neutral", "primary", "success", "warning"]), r.string]),
430
+ color: e.oneOfType([e.oneOf(["danger", "neutral", "primary", "success", "warning"]), e.string]),
490
431
  /**
491
432
  * @ignore
492
433
  */
493
- disabled: r.bool,
434
+ disabled: e.bool,
494
435
  /**
495
436
  * Trailing adornment for this input.
496
437
  */
497
- endDecorator: r.node,
438
+ endDecorator: e.node,
498
439
  /**
499
440
  * If `true`, the `input` will indicate an error.
500
441
  * The prop defaults to the value (`false`) inherited from the parent FormControl component.
501
442
  * @default false
502
443
  */
503
- error: r.bool,
444
+ error: e.bool,
504
445
  /**
505
446
  * Maximum number of rows to display.
506
447
  */
507
- maxRows: r.oneOfType([r.number, r.string]),
448
+ maxRows: e.oneOfType([e.number, e.string]),
508
449
  /**
509
450
  * Minimum number of rows to display.
510
451
  * @default 1
511
452
  */
512
- minRows: r.oneOfType([r.number, r.string]),
453
+ minRows: e.oneOfType([e.number, e.string]),
513
454
  /**
514
455
  * The size of the component.
515
456
  * @default 'md'
516
457
  */
517
- size: r.oneOfType([r.oneOf(["sm", "md", "lg"]), r.string]),
458
+ size: e.oneOfType([e.oneOf(["sm", "md", "lg"]), e.string]),
518
459
  /**
519
460
  * Leading adornment for this input.
520
461
  */
521
- startDecorator: r.node,
462
+ startDecorator: e.node,
522
463
  /**
523
464
  * The system prop that allows defining system overrides as well as additional CSS styles.
524
465
  */
525
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
466
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
526
467
  /**
527
468
  * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
528
469
  * @default 'outlined'
529
470
  */
530
- variant: r.oneOfType([r.oneOf(["outlined", "plain", "soft", "solid"]), r.string])
471
+ variant: e.oneOfType([e.oneOf(["outlined", "plain", "soft", "solid"]), e.string])
531
472
  });
532
473
  export {
533
- we as T,
534
- Ee as u
474
+ Se as T
535
475
  };