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.
- package/Betslip.js +1 -1
- package/ChanceGame.js +529 -520
- package/ClassicQuizPlay.js +1725 -1458
- package/CollectLead.js +141 -141
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +1524 -1331
- package/EventCard.js +3001 -1848
- package/EventGamePlay.js +2023 -1742
- package/Leaderboard.js +367 -357
- package/MatchQuizPlay.js +2936 -2649
- package/PersonalityQuizPlay.js +1395 -1119
- package/PickThePair.js +481 -472
- package/PlayerOfTheMatch.js +235 -234
- package/PollVote.js +1318 -1036
- package/Predictor.js +4383 -4390
- package/README.md +110 -4
- package/Standings.js +652 -643
- package/TopX.js +2646 -2645
- package/chunks/{AccessTime-7cim24ED.js → AccessTime-BkHriW4j.js} +1 -1
- package/chunks/{AlertMessage-X4MQ4qsN.js → AlertMessage-DwSmhmHt.js} +11 -11
- package/chunks/{Avatar-RBMU1Gkk.js → Avatar-CEbT4X-o.js} +22 -22
- package/chunks/{Button-GawVOPKi.js → Button-CO-k2gLb.js} +3 -3
- package/chunks/{Card--xcz3SKi.js → Card-DZdPl8-h.js} +7 -7
- package/chunks/{CardActions-CPwvcLGp.js → CardActions-DTThyeLX.js} +20 -20
- package/chunks/{CardContent-Ew6fr-KR.js → CardContent-CzC1EwoD.js} +14 -14
- package/chunks/{ChanceGameEmbedVariant-Dio4ihOd.js → ChanceGameEmbedVariant-CteJ4tix.js} +309 -195
- package/chunks/{CheckCircle-DgKcR_no.js → CheckCircle-BzM-2e1z.js} +1 -1
- package/chunks/{Chip-CYpaygnD.js → Chip-BF1FXK0I.js} +15 -15
- package/chunks/{Close-CdJNGcLx.js → Close-BiMLcNyG.js} +1 -1
- package/chunks/{Close-D2mtuGDo.js → Close-CggU6Ga3.js} +1 -1
- package/chunks/{CollectLeadForm-D0P_JHmT.js → CollectLeadForm-BZj-9IDt.js} +1389 -1463
- package/chunks/ConsentsList-CtKgLYa8.js +339 -0
- package/chunks/DirectionScope-BGDPaR6B.js +24 -0
- package/chunks/{Divider-DcW0V71y.js → Divider-Dueyhj7K.js} +8 -8
- package/chunks/{Edit-Bcj6J4rt.js → Edit-Dqa7th_A.js} +3 -3
- package/chunks/EditOutlined-B__rjTwX.js +14 -0
- package/chunks/{EmojiEvents-g001ss_z.js → EmojiEvents-CpsA2Qo0.js} +1 -1
- package/chunks/{FavoriteBorder-Lr6swB6-.js → FavoriteBorder-DrC_eOCd.js} +1 -1
- package/chunks/{FormControl-BKlK7WPd.js → FormControl-fKyT2Mql.js} +34 -33
- package/chunks/{FormControlContext-B2HqeXgq.js → FormControlContext-CSrMcHcv.js} +11 -11
- package/chunks/{FormLabel-C47pX5hN.js → FormLabel-DlXT5RZd.js} +22 -25
- package/chunks/{InlineSpinner-Imz27zb2.js → InlineSpinner-CuisRY-E.js} +2 -2
- package/chunks/{Input-nS_KO1Bu.js → Input-CkSIGH-d.js} +15 -15
- package/chunks/{KeyboardArrowDown-CyZAOE-W.js → KeyboardArrowDown-DL8VjkJT.js} +1 -1
- package/chunks/{KeyboardArrowRight-FI0kqwO1.js → KeyboardArrowRight-Cm50UqHb.js} +1 -1
- package/chunks/{Link-DKU7kDL8.js → Link-BljMbRuR.js} +13 -13
- package/chunks/{ListItemButton-CPVIEVpf.js → ListItemButton-BqEcbBU0.js} +50 -50
- package/chunks/{ModalDialog-DDx8wQa3.js → ModalDialog-B0DLv5vW.js} +59 -59
- package/chunks/{NotFoundSkeleton-CJZIRj5-.js → NotFoundSkeleton-DKxLhOwI.js} +149 -125
- package/chunks/{Notification-BvVfrrB3.js → Notification-CEdU0opQ.js} +18 -18
- package/chunks/{OverlayScoreStateSkeleton-CAhCAjkS.js → OverlayScoreStateSkeleton-BtCy650g.js} +18 -12
- package/chunks/{ArrowRightAlt-DrBMgptf.js → OverlayScoreStateWrapperSkeleton-Ch_E6KQ6.js} +18 -21
- package/chunks/OverlaySignInSkeleton-DEiH7fmp.js +517 -0
- package/chunks/{Person-DB_bEPcg.js → Person-CLQl7Sxs.js} +1 -1
- package/chunks/{PersonOutline-BAOtfb1t.js → PersonOutline-D8yrpbw7.js} +1 -1
- package/chunks/{PickOneOfX-Dp6fzXJn.js → PickOneOfX-CG0B5u7Y.js} +3 -3
- package/chunks/{Popper-Bpy7eYt-.js → Popper-BSnc2Lit.js} +58 -58
- package/chunks/Portal-D8t1Jd5e.js +65 -0
- package/chunks/{Portal-Dvh4m8kk.js → Portal-cK515D9M.js} +4 -4
- package/chunks/{PrizeCard-CXjFADAN.js → PrizeCard-CyVJJLo1.js} +6295 -4346
- package/chunks/{Search-uVJw-NhK.js → Search-BXhhax8M.js} +1 -1
- package/chunks/{Select-BeixD4Vw.js → Select-DyRdhrMr.js} +61 -61
- package/chunks/{Sheet-vOgATocO.js → Sheet-sYNAL7gX.js} +14 -14
- package/chunks/{Spinner-C219bcnm.js → Spinner-Bb4eb64F.js} +2 -2
- package/chunks/SplitSignInSkeleton-BZT0ngoW.js +150 -0
- package/chunks/{Stack-JIDLCVx0.js → Stack-DX41loGb.js} +21 -21
- package/chunks/{StandardContentSkeleton-DsGBNMHN.js → StandardContentSkeleton-DAh7l7cd.js} +12 -12
- package/chunks/{Table-Cx7htUDp.js → Table-C09wF6nK.js} +8 -8
- package/chunks/{Tabs-CIJK8YZY.js → Tabs-Dhih1Lqb.js} +46 -46
- package/chunks/{Textarea-KSwIUuq8.js → Textarea-DWyUKbVv.js} +184 -244
- package/chunks/{TimerOutlined-BUL4BZFp.js → TimerOutlined-DeWQFv5g.js} +1 -1
- package/chunks/{Tooltip-DrP2vx9i.js → Tooltip-Dnj_oxHb.js} +55 -55
- package/chunks/{Typography-DFdgIDQS.js → Typography-B8CtvKkm.js} +1 -1
- package/chunks/{dividerClasses-BtSFa36Z.js → dividerClasses-BoOrlu7X.js} +1 -1
- package/chunks/{elementAcceptingRef-CZFKGdxR.js → elementAcceptingRef-DROQPsxj.js} +1 -1
- package/chunks/formLabelClasses-Bh4Fh0fk.js +9 -0
- package/chunks/{helpers-D8cWUfGf.js → helpers-DgUDSfd1.js} +14 -12
- package/chunks/{index-DZqXLvFO.js → index-C_R74meU.js} +69 -72
- package/chunks/index-PC-q6Shn.js +4 -0
- package/chunks/{main-C05CZWMa.js → main-5c5yYsj9.js} +973 -963
- package/chunks/{main-CHr45Z4W.js → main-BXu1mzLz.js} +157 -157
- package/chunks/{useButton-tjUHKc-B.js → useButton-CQ2o2nXk.js} +2 -2
- package/chunks/useConsents-CIhPZNel.js +1165 -0
- package/chunks/{useEventCallback-BFPi8YtI.js → useEventCallback-B1ahtq-a.js} +1 -1
- package/chunks/{useForwardedInput-VvmRv9KU.js → useForwardedInput-DRXHXEOw.js} +22 -22
- package/chunks/{useImageVariant-Cs6lWUs2.js → useImageVariant-D6aho5sy.js} +1 -1
- package/chunks/useSwitch-CYz8kkTr.js +65 -0
- package/index.js +3 -3
- package/package.json +2 -2
- package/chunks/EditOutlined-PCc4gafz.js +0 -11
- package/chunks/OverlayApiErrorSkeleton-JMWA0FV8.js +0 -731
- package/chunks/OverlayLeadAfterCollection-BwF9MvIB.js +0 -678
- package/chunks/Portal-bNE7Trh9.js +0 -55
- package/chunks/SplitLeadAfterCollection-BijLacCk.js +0 -236
- package/chunks/index-JDeYpSi1.js +0 -4
|
@@ -1,85 +1,26 @@
|
|
|
1
|
-
import {
|
|
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 "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
|
9
|
-
let
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
a.apply(this,
|
|
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(
|
|
13
|
+
clearTimeout(d), d = setTimeout(s, r);
|
|
15
14
|
}
|
|
16
|
-
return
|
|
17
|
-
clearTimeout(
|
|
18
|
-
},
|
|
15
|
+
return n.clear = () => {
|
|
16
|
+
clearTimeout(d);
|
|
17
|
+
}, n;
|
|
19
18
|
}
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
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
|
|
38
|
+
function me(a) {
|
|
98
39
|
return a == null || Object.keys(a).length === 0 || a.outerHeightStyle === 0 && !a.overflowing;
|
|
99
40
|
}
|
|
100
|
-
const
|
|
41
|
+
const j = /* @__PURE__ */ x.forwardRef(function(r, d) {
|
|
101
42
|
const {
|
|
102
|
-
onChange:
|
|
103
|
-
maxRows:
|
|
104
|
-
minRows:
|
|
105
|
-
style:
|
|
106
|
-
value:
|
|
107
|
-
} =
|
|
108
|
-
current:
|
|
109
|
-
} = x.useRef(
|
|
110
|
-
const
|
|
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
|
|
117
|
-
|
|
118
|
-
` && (
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
let
|
|
123
|
-
|
|
124
|
-
const
|
|
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:
|
|
127
|
-
overflowing:
|
|
67
|
+
outerHeightStyle: N,
|
|
68
|
+
overflowing: W
|
|
128
69
|
};
|
|
129
|
-
}, [
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
70
|
+
}, [i, s, r.placeholder]), T = x.useCallback(() => {
|
|
71
|
+
const t = z();
|
|
72
|
+
if (me(t))
|
|
132
73
|
return;
|
|
133
|
-
const o =
|
|
134
|
-
|
|
135
|
-
}, [
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
|
|
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
|
-
|
|
84
|
+
t();
|
|
144
85
|
});
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
let
|
|
148
|
-
return typeof ResizeObserver < "u" && (
|
|
149
|
-
|
|
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
|
-
}, [
|
|
152
|
-
|
|
92
|
+
}, [z, T]), V(() => {
|
|
93
|
+
T();
|
|
153
94
|
});
|
|
154
|
-
const B = (
|
|
155
|
-
|
|
95
|
+
const B = (t) => {
|
|
96
|
+
w || T(), n && n(t);
|
|
156
97
|
};
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
-
value:
|
|
98
|
+
return /* @__PURE__ */ U(x.Fragment, {
|
|
99
|
+
children: [/* @__PURE__ */ S("textarea", u({
|
|
100
|
+
value: g,
|
|
160
101
|
onChange: B,
|
|
161
|
-
ref:
|
|
162
|
-
rows:
|
|
163
|
-
style:
|
|
164
|
-
},
|
|
102
|
+
ref: D,
|
|
103
|
+
rows: s,
|
|
104
|
+
style: v
|
|
105
|
+
}, f)), /* @__PURE__ */ S("textarea", {
|
|
165
106
|
"aria-hidden": !0,
|
|
166
|
-
className:
|
|
107
|
+
className: r.className,
|
|
167
108
|
readOnly: !0,
|
|
168
|
-
ref:
|
|
109
|
+
ref: O,
|
|
169
110
|
tabIndex: -1,
|
|
170
|
-
style:
|
|
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" && (
|
|
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:
|
|
126
|
+
className: e.string,
|
|
186
127
|
/**
|
|
187
128
|
* Maximum number of rows to display.
|
|
188
129
|
*/
|
|
189
|
-
maxRows:
|
|
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:
|
|
135
|
+
minRows: e.oneOfType([e.number, e.string]),
|
|
195
136
|
/**
|
|
196
137
|
* @ignore
|
|
197
138
|
*/
|
|
198
|
-
onChange:
|
|
139
|
+
onChange: e.func,
|
|
199
140
|
/**
|
|
200
141
|
* @ignore
|
|
201
142
|
*/
|
|
202
|
-
placeholder:
|
|
143
|
+
placeholder: e.string,
|
|
203
144
|
/**
|
|
204
145
|
* @ignore
|
|
205
146
|
*/
|
|
206
|
-
style:
|
|
147
|
+
style: e.object,
|
|
207
148
|
/**
|
|
208
149
|
* @ignore
|
|
209
150
|
*/
|
|
210
|
-
value:
|
|
151
|
+
value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
|
|
211
152
|
});
|
|
212
|
-
function
|
|
213
|
-
return
|
|
153
|
+
function Te(a) {
|
|
154
|
+
return ce("MuiTextarea", a);
|
|
214
155
|
}
|
|
215
|
-
const
|
|
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:
|
|
218
|
-
variant:
|
|
219
|
-
color:
|
|
220
|
-
size:
|
|
221
|
-
} = a,
|
|
222
|
-
root: ["root",
|
|
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
|
|
228
|
-
},
|
|
168
|
+
return xe(s, Te, {});
|
|
169
|
+
}, Ce = $("div", {
|
|
229
170
|
name: "JoyTextarea",
|
|
230
171
|
slot: "Root",
|
|
231
|
-
overridesResolver: (a,
|
|
172
|
+
overridesResolver: (a, r) => r.root
|
|
232
173
|
})(({
|
|
233
174
|
theme: a,
|
|
234
|
-
ownerState:
|
|
175
|
+
ownerState: r
|
|
235
176
|
}) => {
|
|
236
|
-
var
|
|
237
|
-
const
|
|
238
|
-
return [
|
|
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": (
|
|
247
|
-
'&:not([data-inverted-colors="false"])':
|
|
248
|
-
"--_Textarea-focusedHighlight": (
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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-${
|
|
297
|
-
backgroundColor: (
|
|
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":
|
|
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
|
-
[`&.${
|
|
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
|
-
}),
|
|
266
|
+
}), Re = $(j, {
|
|
326
267
|
name: "JoyTextarea",
|
|
327
268
|
slot: "Textarea",
|
|
328
|
-
overridesResolver: (a,
|
|
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
|
-
}),
|
|
309
|
+
}), ze = $("div", {
|
|
369
310
|
name: "JoyTextarea",
|
|
370
311
|
slot: "StartDecorator",
|
|
371
|
-
overridesResolver: (a,
|
|
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
|
-
}),
|
|
320
|
+
}), He = $("div", {
|
|
380
321
|
name: "JoyTextarea",
|
|
381
322
|
slot: "EndDecorator",
|
|
382
|
-
overridesResolver: (a,
|
|
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
|
-
}),
|
|
391
|
-
var
|
|
392
|
-
const
|
|
393
|
-
props:
|
|
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
|
-
}),
|
|
396
|
-
propsToForward:
|
|
397
|
-
rootStateClasses:
|
|
398
|
-
inputStateClasses:
|
|
336
|
+
}), R = ve(D, q), {
|
|
337
|
+
propsToForward: O,
|
|
338
|
+
rootStateClasses: z,
|
|
339
|
+
inputStateClasses: T,
|
|
399
340
|
getRootProps: B,
|
|
400
|
-
getInputProps:
|
|
341
|
+
getInputProps: t,
|
|
401
342
|
formControl: o,
|
|
402
343
|
focused: l,
|
|
403
|
-
error:
|
|
404
|
-
disabled:
|
|
405
|
-
size:
|
|
406
|
-
color:
|
|
407
|
-
variant:
|
|
408
|
-
startDecorator:
|
|
409
|
-
endDecorator:
|
|
410
|
-
minRows:
|
|
411
|
-
maxRows:
|
|
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:
|
|
415
|
-
} =
|
|
355
|
+
slotProps: K = {}
|
|
356
|
+
} = R, Q = L(R, ye);
|
|
416
357
|
if (process.env.NODE_ENV !== "production") {
|
|
417
|
-
const
|
|
358
|
+
const A = o == null ? void 0 : o.registerEffect;
|
|
418
359
|
x.useEffect(() => {
|
|
419
|
-
if (
|
|
420
|
-
return
|
|
421
|
-
}, [
|
|
360
|
+
if (A)
|
|
361
|
+
return A();
|
|
362
|
+
}, [A]);
|
|
422
363
|
}
|
|
423
|
-
const
|
|
424
|
-
instanceColor:
|
|
425
|
-
},
|
|
426
|
-
color:
|
|
427
|
-
disabled:
|
|
428
|
-
error:
|
|
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:
|
|
431
|
-
variant:
|
|
432
|
-
}),
|
|
371
|
+
size: Y,
|
|
372
|
+
variant: k
|
|
373
|
+
}), _ = be(H), I = u({}, Q, {
|
|
433
374
|
component: Z,
|
|
434
375
|
slots: G,
|
|
435
|
-
slotProps:
|
|
436
|
-
}), [
|
|
437
|
-
ref:
|
|
438
|
-
className: [
|
|
439
|
-
elementType:
|
|
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:
|
|
443
|
-
}), [
|
|
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: [
|
|
449
|
-
elementType:
|
|
450
|
-
internalForwardedProps:
|
|
451
|
-
minRows:
|
|
452
|
-
maxRows:
|
|
389
|
+
className: [_.textarea, T],
|
|
390
|
+
elementType: Re,
|
|
391
|
+
internalForwardedProps: u({}, O, {
|
|
392
|
+
minRows: N,
|
|
393
|
+
maxRows: W
|
|
453
394
|
}),
|
|
454
|
-
externalForwardedProps:
|
|
455
|
-
getSlotProps:
|
|
456
|
-
ownerState:
|
|
457
|
-
}), [
|
|
458
|
-
className:
|
|
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:
|
|
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__ */
|
|
469
|
-
children: [
|
|
470
|
-
children:
|
|
471
|
-
})), /* @__PURE__ */
|
|
472
|
-
children:
|
|
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" && (
|
|
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:
|
|
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:
|
|
430
|
+
color: e.oneOfType([e.oneOf(["danger", "neutral", "primary", "success", "warning"]), e.string]),
|
|
490
431
|
/**
|
|
491
432
|
* @ignore
|
|
492
433
|
*/
|
|
493
|
-
disabled:
|
|
434
|
+
disabled: e.bool,
|
|
494
435
|
/**
|
|
495
436
|
* Trailing adornment for this input.
|
|
496
437
|
*/
|
|
497
|
-
endDecorator:
|
|
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:
|
|
444
|
+
error: e.bool,
|
|
504
445
|
/**
|
|
505
446
|
* Maximum number of rows to display.
|
|
506
447
|
*/
|
|
507
|
-
maxRows:
|
|
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:
|
|
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:
|
|
458
|
+
size: e.oneOfType([e.oneOf(["sm", "md", "lg"]), e.string]),
|
|
518
459
|
/**
|
|
519
460
|
* Leading adornment for this input.
|
|
520
461
|
*/
|
|
521
|
-
startDecorator:
|
|
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:
|
|
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:
|
|
471
|
+
variant: e.oneOfType([e.oneOf(["outlined", "plain", "soft", "solid"]), e.string])
|
|
531
472
|
});
|
|
532
473
|
export {
|
|
533
|
-
|
|
534
|
-
Ee as u
|
|
474
|
+
Se as T
|
|
535
475
|
};
|