@loopr-ai/craft 0.7.6 → 0.8.0
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/dist/{ButtonBase-85c9347b.js → ButtonBase-08b16b61.js} +3 -3
- package/dist/{TextField-fded06e5.js → TextField-f61d210a.js} +8 -7
- package/dist/{Tooltip-b926c320.js → Tooltip-e797a425.js} +6 -6
- package/dist/{TransitionGroupContext-fe9a562f.js → TransitionGroupContext-0e899f4c.js} +1 -1
- package/dist/{ZoomControllers-36e39bb0.js → ZoomControllers-d04c25f8.js} +5 -5
- package/dist/components/cell/AvatarGroup/index.js +3 -3
- package/dist/components/cell/Button/index.js +3 -3
- package/dist/components/cell/Chip/index.js +5 -5
- package/dist/components/cell/ProgressBar/index.js +3 -3
- package/dist/components/cell/Search/index.js +2 -2
- package/dist/components/cell/Typography/index.js +1 -1
- package/dist/components/organ/Form/Form.interfaces.d.ts +11 -3
- package/dist/components/organ/Form/Form.styles.d.ts +7 -2
- package/dist/components/organ/Form/Form.styles.js +9 -4
- package/dist/components/organ/Form/FormInput.d.ts +1 -0
- package/dist/components/organ/Form/FormInput.js +1284 -270
- package/dist/components/organ/Form/index.d.ts +3 -1
- package/dist/components/organ/Form/index.js +50 -47
- package/dist/components/organ/ZoomControlWithDrag/ZoomControllers.js +2 -2
- package/dist/components/organ/ZoomControlWithDrag/index.js +2 -2
- package/dist/{createSvgIcon-f773ce57.js → createSvgIcon-45340b5e.js} +17 -17
- package/dist/{createSvgIcon-58aa3adf.js → createSvgIcon-5aac746d.js} +2 -2
- package/dist/{createTheme-a4db2989.js → createTheme-759a022d.js} +507 -477
- package/dist/{exactProp-d79ccada.js → exactProp-23d6a154.js} +1 -1
- package/dist/{extendSxProp-db8b9da5.js → extendSxProp-cf8fd923.js} +1 -1
- package/dist/global/theme.js +1 -1
- package/dist/{index-03287c17.js → index-c9c32237.js} +3 -3
- package/dist/main.js +1 -1
- package/dist/providers/CraftThemeProvider.js +2 -2
- package/dist/{styled-126c6a62.js → styled-78608e1f.js} +16 -14
- package/dist/{useTheme-573c40a2.js → useTheme-8906bd79.js} +1 -1
- package/package.json +1 -1
|
@@ -1,113 +1,781 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r as
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { customColors as
|
|
6
|
-
import { M as
|
|
7
|
-
import
|
|
8
|
-
import { d as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import ze, { jsx as c, jsxs as j, Fragment as Be } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge, c as Ve, a as Ue, r as _e, i as Ge } from "../../../createSvgIcon-45340b5e.js";
|
|
3
|
+
import * as x from "react";
|
|
4
|
+
import { useState as qe, useCallback as Qe, useEffect as We } from "react";
|
|
5
|
+
import { customColors as K } from "../../../global/colors.js";
|
|
6
|
+
import { M as X, T as V } from "../../../index-c9c32237.js";
|
|
7
|
+
import O from "./Form.styles.js";
|
|
8
|
+
import { d as te, B as L, T as Ze } from "../../../Tooltip-e797a425.js";
|
|
9
|
+
import { P as e, h as He, a as f, j as se, r as J, k as Ye, m as Ke, n as Je, _ as D, o as ne, g as U, c as w, e as W } from "../../../createTheme-759a022d.js";
|
|
10
|
+
import { r as A, c as Xe, u as ye } from "../../../TransitionGroupContext-0e899f4c.js";
|
|
11
|
+
import { h as Ae, i as eo, c as E, b as _, g as z, s as P, a as G, r as ve } from "../../../styled-78608e1f.js";
|
|
12
|
+
import { u as H, f as he, F as oo, L as le, T as ro } from "../../../TextField-f61d210a.js";
|
|
13
|
+
import { e as ao } from "../../../extendSxProp-cf8fd923.js";
|
|
14
|
+
import { B as Ce } from "../../../ButtonBase-08b16b61.js";
|
|
15
|
+
import { c as xe } from "../../../createSvgIcon-5aac746d.js";
|
|
16
|
+
const to = Ae(), so = to, no = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], lo = He(), co = so("div", {
|
|
17
|
+
name: "MuiStack",
|
|
18
|
+
slot: "Root",
|
|
19
|
+
overridesResolver: (o, r) => r.root
|
|
20
|
+
});
|
|
21
|
+
function io(o) {
|
|
22
|
+
return eo({
|
|
23
|
+
props: o,
|
|
24
|
+
name: "MuiStack",
|
|
25
|
+
defaultTheme: lo
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function uo(o, r) {
|
|
29
|
+
const t = x.Children.toArray(o).filter(Boolean);
|
|
30
|
+
return t.reduce((s, n, l) => (s.push(n), l < t.length - 1 && s.push(/* @__PURE__ */ x.cloneElement(r, {
|
|
31
|
+
key: `separator-${l}`
|
|
32
|
+
})), s), []);
|
|
16
33
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
34
|
+
const po = (o) => ({
|
|
35
|
+
row: "Left",
|
|
36
|
+
"row-reverse": "Right",
|
|
37
|
+
column: "Top",
|
|
38
|
+
"column-reverse": "Bottom"
|
|
39
|
+
})[o], fo = ({
|
|
40
|
+
ownerState: o,
|
|
41
|
+
theme: r
|
|
42
|
+
}) => {
|
|
43
|
+
let t = f({
|
|
44
|
+
display: "flex",
|
|
45
|
+
flexDirection: "column"
|
|
46
|
+
}, se({
|
|
47
|
+
theme: r
|
|
48
|
+
}, J({
|
|
49
|
+
values: o.direction,
|
|
50
|
+
breakpoints: r.breakpoints.values
|
|
51
|
+
}), (s) => ({
|
|
52
|
+
flexDirection: s
|
|
53
|
+
})));
|
|
54
|
+
if (o.spacing) {
|
|
55
|
+
const s = Ye(r), n = Object.keys(r.breakpoints.values).reduce((i, d) => ((typeof o.spacing == "object" && o.spacing[d] != null || typeof o.direction == "object" && o.direction[d] != null) && (i[d] = !0), i), {}), l = J({
|
|
56
|
+
values: o.direction,
|
|
57
|
+
base: n
|
|
58
|
+
}), p = J({
|
|
59
|
+
values: o.spacing,
|
|
60
|
+
base: n
|
|
61
|
+
});
|
|
62
|
+
typeof l == "object" && Object.keys(l).forEach((i, d, g) => {
|
|
63
|
+
if (!l[i]) {
|
|
64
|
+
const m = d > 0 ? l[g[d - 1]] : "column";
|
|
65
|
+
l[i] = m;
|
|
66
|
+
}
|
|
67
|
+
}), t = Ke(t, se({
|
|
68
|
+
theme: r
|
|
69
|
+
}, p, (i, d) => o.useFlexGap ? {
|
|
70
|
+
gap: ne(s, i)
|
|
71
|
+
} : {
|
|
72
|
+
// The useFlexGap={false} implement relies on each child to give up control of the margin.
|
|
73
|
+
// We need to reset the margin to avoid double spacing.
|
|
74
|
+
"& > :not(style):not(style)": {
|
|
75
|
+
margin: 0
|
|
76
|
+
},
|
|
77
|
+
"& > :not(style) ~ :not(style)": {
|
|
78
|
+
[`margin${po(d ? l[d] : o.direction)}`]: ne(s, i)
|
|
79
|
+
}
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
return t = Je(r.breakpoints, t), t;
|
|
83
|
+
};
|
|
84
|
+
function bo(o = {}) {
|
|
20
85
|
const {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
86
|
+
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
87
|
+
createStyledComponent: r = co,
|
|
88
|
+
useThemeProps: t = io,
|
|
89
|
+
componentName: s = "MuiStack"
|
|
90
|
+
} = o, n = () => _({
|
|
91
|
+
root: ["root"]
|
|
92
|
+
}, (i) => U(s, i), {}), l = r(fo), p = /* @__PURE__ */ x.forwardRef(function(i, d) {
|
|
93
|
+
const g = t(i), h = ao(g), {
|
|
94
|
+
component: m = "div",
|
|
95
|
+
direction: I = "column",
|
|
96
|
+
spacing: a = 0,
|
|
97
|
+
divider: v,
|
|
98
|
+
children: b,
|
|
99
|
+
className: M,
|
|
100
|
+
useFlexGap: N = !1
|
|
101
|
+
} = h, T = D(h, no), k = {
|
|
102
|
+
direction: I,
|
|
103
|
+
spacing: a,
|
|
104
|
+
useFlexGap: N
|
|
105
|
+
}, u = n();
|
|
106
|
+
return /* @__PURE__ */ c(l, f({
|
|
107
|
+
as: m,
|
|
108
|
+
ownerState: k,
|
|
109
|
+
ref: d,
|
|
110
|
+
className: E(u.root, M)
|
|
111
|
+
}, T, {
|
|
112
|
+
children: v ? uo(b, v) : b
|
|
113
|
+
}));
|
|
114
|
+
});
|
|
115
|
+
return process.env.NODE_ENV !== "production" && (p.propTypes = {
|
|
116
|
+
children: e.node,
|
|
117
|
+
direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
|
|
118
|
+
divider: e.node,
|
|
119
|
+
spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
|
|
120
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
121
|
+
}), p;
|
|
122
|
+
}
|
|
123
|
+
function mo(o) {
|
|
124
|
+
return U("PrivateSwitchBase", o);
|
|
125
|
+
}
|
|
126
|
+
z("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
127
|
+
const go = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"], yo = (o) => {
|
|
25
128
|
const {
|
|
26
|
-
classes:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
root: ["root", s && "disablePointerEvents", i && `position${S(i)}`, l, a && "hiddenLabel", d && `size${S(d)}`]
|
|
129
|
+
classes: r,
|
|
130
|
+
checked: t,
|
|
131
|
+
disabled: s,
|
|
132
|
+
edge: n
|
|
133
|
+
} = o, l = {
|
|
134
|
+
root: ["root", t && "checked", s && "disabled", n && `edge${w(n)}`],
|
|
135
|
+
input: ["input"]
|
|
34
136
|
};
|
|
35
|
-
return
|
|
36
|
-
},
|
|
37
|
-
|
|
137
|
+
return _(l, mo, r);
|
|
138
|
+
}, vo = P(Ce)(({
|
|
139
|
+
ownerState: o
|
|
140
|
+
}) => f({
|
|
141
|
+
padding: 9,
|
|
142
|
+
borderRadius: "50%"
|
|
143
|
+
}, o.edge === "start" && {
|
|
144
|
+
marginLeft: o.size === "small" ? -3 : -12
|
|
145
|
+
}, o.edge === "end" && {
|
|
146
|
+
marginRight: o.size === "small" ? -3 : -12
|
|
147
|
+
})), ho = P("input")({
|
|
148
|
+
cursor: "inherit",
|
|
149
|
+
position: "absolute",
|
|
150
|
+
opacity: 0,
|
|
151
|
+
width: "100%",
|
|
152
|
+
height: "100%",
|
|
153
|
+
top: 0,
|
|
154
|
+
left: 0,
|
|
155
|
+
margin: 0,
|
|
156
|
+
padding: 0,
|
|
157
|
+
zIndex: 1
|
|
158
|
+
}), Ie = /* @__PURE__ */ x.forwardRef(function(r, t) {
|
|
159
|
+
const {
|
|
160
|
+
autoFocus: s,
|
|
161
|
+
checked: n,
|
|
162
|
+
checkedIcon: l,
|
|
163
|
+
className: p,
|
|
164
|
+
defaultChecked: y,
|
|
165
|
+
disabled: i,
|
|
166
|
+
disableFocusRipple: d = !1,
|
|
167
|
+
edge: g = !1,
|
|
168
|
+
icon: h,
|
|
169
|
+
id: m,
|
|
170
|
+
inputProps: I,
|
|
171
|
+
inputRef: a,
|
|
172
|
+
name: v,
|
|
173
|
+
onBlur: b,
|
|
174
|
+
onChange: M,
|
|
175
|
+
onFocus: N,
|
|
176
|
+
readOnly: T,
|
|
177
|
+
required: k = !1,
|
|
178
|
+
tabIndex: u,
|
|
179
|
+
type: C,
|
|
180
|
+
value: R
|
|
181
|
+
} = r, $ = D(r, go), [B, Le] = ge({
|
|
182
|
+
controlled: n,
|
|
183
|
+
default: !!y,
|
|
184
|
+
name: "SwitchBase",
|
|
185
|
+
state: "checked"
|
|
186
|
+
}), F = H(), we = (S) => {
|
|
187
|
+
N && N(S), F && F.onFocus && F.onFocus(S);
|
|
188
|
+
}, Ee = (S) => {
|
|
189
|
+
b && b(S), F && F.onBlur && F.onBlur(S);
|
|
190
|
+
}, Fe = (S) => {
|
|
191
|
+
if (S.nativeEvent.defaultPrevented)
|
|
192
|
+
return;
|
|
193
|
+
const ae = S.target.checked;
|
|
194
|
+
Le(ae), M && M(S, ae);
|
|
195
|
+
};
|
|
196
|
+
let q = i;
|
|
197
|
+
F && typeof q > "u" && (q = F.disabled);
|
|
198
|
+
const De = C === "checkbox" || C === "radio", Y = f({}, r, {
|
|
199
|
+
checked: B,
|
|
200
|
+
disabled: q,
|
|
201
|
+
disableFocusRipple: d,
|
|
202
|
+
edge: g
|
|
203
|
+
}), re = yo(Y);
|
|
204
|
+
return /* @__PURE__ */ j(vo, f({
|
|
205
|
+
component: "span",
|
|
206
|
+
className: E(re.root, p),
|
|
207
|
+
centerRipple: !0,
|
|
208
|
+
focusRipple: !d,
|
|
209
|
+
disabled: q,
|
|
210
|
+
tabIndex: null,
|
|
211
|
+
role: void 0,
|
|
212
|
+
onFocus: we,
|
|
213
|
+
onBlur: Ee,
|
|
214
|
+
ownerState: Y,
|
|
215
|
+
ref: t
|
|
216
|
+
}, $, {
|
|
217
|
+
children: [/* @__PURE__ */ c(ho, f({
|
|
218
|
+
autoFocus: s,
|
|
219
|
+
checked: n,
|
|
220
|
+
defaultChecked: y,
|
|
221
|
+
className: re.input,
|
|
222
|
+
disabled: q,
|
|
223
|
+
id: De ? m : void 0,
|
|
224
|
+
name: v,
|
|
225
|
+
onChange: Fe,
|
|
226
|
+
readOnly: T,
|
|
227
|
+
ref: a,
|
|
228
|
+
required: k,
|
|
229
|
+
ownerState: Y,
|
|
230
|
+
tabIndex: u,
|
|
231
|
+
type: C
|
|
232
|
+
}, C === "checkbox" && R === void 0 ? {} : {
|
|
233
|
+
value: R
|
|
234
|
+
}, I)), B ? l : h]
|
|
235
|
+
}));
|
|
236
|
+
});
|
|
237
|
+
process.env.NODE_ENV !== "production" && (Ie.propTypes = {
|
|
238
|
+
/**
|
|
239
|
+
* If `true`, the `input` element is focused during the first mount.
|
|
240
|
+
*/
|
|
241
|
+
autoFocus: e.bool,
|
|
242
|
+
/**
|
|
243
|
+
* If `true`, the component is checked.
|
|
244
|
+
*/
|
|
245
|
+
checked: e.bool,
|
|
246
|
+
/**
|
|
247
|
+
* The icon to display when the component is checked.
|
|
248
|
+
*/
|
|
249
|
+
checkedIcon: e.node.isRequired,
|
|
250
|
+
/**
|
|
251
|
+
* Override or extend the styles applied to the component.
|
|
252
|
+
* See [CSS API](#css) below for more details.
|
|
253
|
+
*/
|
|
254
|
+
classes: e.object,
|
|
255
|
+
/**
|
|
256
|
+
* @ignore
|
|
257
|
+
*/
|
|
258
|
+
className: e.string,
|
|
259
|
+
/**
|
|
260
|
+
* @ignore
|
|
261
|
+
*/
|
|
262
|
+
defaultChecked: e.bool,
|
|
263
|
+
/**
|
|
264
|
+
* If `true`, the component is disabled.
|
|
265
|
+
*/
|
|
266
|
+
disabled: e.bool,
|
|
267
|
+
/**
|
|
268
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
269
|
+
* @default false
|
|
270
|
+
*/
|
|
271
|
+
disableFocusRipple: e.bool,
|
|
272
|
+
/**
|
|
273
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
274
|
+
* side (this is often helpful for aligning the left or right
|
|
275
|
+
* side of the icon with content above or below, without ruining the border
|
|
276
|
+
* size and shape).
|
|
277
|
+
* @default false
|
|
278
|
+
*/
|
|
279
|
+
edge: e.oneOf(["end", "start", !1]),
|
|
280
|
+
/**
|
|
281
|
+
* The icon to display when the component is unchecked.
|
|
282
|
+
*/
|
|
283
|
+
icon: e.node.isRequired,
|
|
284
|
+
/**
|
|
285
|
+
* The id of the `input` element.
|
|
286
|
+
*/
|
|
287
|
+
id: e.string,
|
|
288
|
+
/**
|
|
289
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
290
|
+
*/
|
|
291
|
+
inputProps: e.object,
|
|
292
|
+
/**
|
|
293
|
+
* Pass a ref to the `input` element.
|
|
294
|
+
*/
|
|
295
|
+
inputRef: A,
|
|
296
|
+
/*
|
|
297
|
+
* @ignore
|
|
298
|
+
*/
|
|
299
|
+
name: e.string,
|
|
300
|
+
/**
|
|
301
|
+
* @ignore
|
|
302
|
+
*/
|
|
303
|
+
onBlur: e.func,
|
|
304
|
+
/**
|
|
305
|
+
* Callback fired when the state is changed.
|
|
306
|
+
*
|
|
307
|
+
* @param {object} event The event source of the callback.
|
|
308
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
309
|
+
*/
|
|
310
|
+
onChange: e.func,
|
|
311
|
+
/**
|
|
312
|
+
* @ignore
|
|
313
|
+
*/
|
|
314
|
+
onFocus: e.func,
|
|
315
|
+
/**
|
|
316
|
+
* It prevents the user from changing the value of the field
|
|
317
|
+
* (not from interacting with the field).
|
|
318
|
+
*/
|
|
319
|
+
readOnly: e.bool,
|
|
320
|
+
/**
|
|
321
|
+
* If `true`, the `input` element is required.
|
|
322
|
+
*/
|
|
323
|
+
required: e.bool,
|
|
324
|
+
/**
|
|
325
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
326
|
+
*/
|
|
327
|
+
sx: e.object,
|
|
328
|
+
/**
|
|
329
|
+
* @ignore
|
|
330
|
+
*/
|
|
331
|
+
tabIndex: e.oneOfType([e.number, e.string]),
|
|
332
|
+
/**
|
|
333
|
+
* The input component prop `type`.
|
|
334
|
+
*/
|
|
335
|
+
type: e.string.isRequired,
|
|
336
|
+
/**
|
|
337
|
+
* The value of the component.
|
|
338
|
+
*/
|
|
339
|
+
value: e.any
|
|
340
|
+
});
|
|
341
|
+
const Co = Ie, Me = bo({
|
|
342
|
+
createStyledComponent: P("div", {
|
|
343
|
+
name: "MuiStack",
|
|
344
|
+
slot: "Root",
|
|
345
|
+
overridesResolver: (o, r) => r.root
|
|
346
|
+
}),
|
|
347
|
+
useThemeProps: (o) => G({
|
|
348
|
+
props: o,
|
|
349
|
+
name: "MuiStack"
|
|
350
|
+
})
|
|
351
|
+
});
|
|
352
|
+
process.env.NODE_ENV !== "production" && (Me.propTypes = {
|
|
353
|
+
// ----------------------------- Warning --------------------------------
|
|
354
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
355
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
356
|
+
// ----------------------------------------------------------------------
|
|
357
|
+
/**
|
|
358
|
+
* The content of the component.
|
|
359
|
+
*/
|
|
360
|
+
children: e.node,
|
|
361
|
+
/**
|
|
362
|
+
* The component used for the root node.
|
|
363
|
+
* Either a string to use a HTML element or a component.
|
|
364
|
+
*/
|
|
365
|
+
component: e.elementType,
|
|
366
|
+
/**
|
|
367
|
+
* Defines the `flex-direction` style property.
|
|
368
|
+
* It is applied for all screen sizes.
|
|
369
|
+
* @default 'column'
|
|
370
|
+
*/
|
|
371
|
+
direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
|
|
372
|
+
/**
|
|
373
|
+
* Add an element between each child.
|
|
374
|
+
*/
|
|
375
|
+
divider: e.node,
|
|
376
|
+
/**
|
|
377
|
+
* Defines the space between immediate children.
|
|
378
|
+
* @default 0
|
|
379
|
+
*/
|
|
380
|
+
spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
|
|
381
|
+
/**
|
|
382
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
383
|
+
*/
|
|
384
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
385
|
+
/**
|
|
386
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
387
|
+
*
|
|
388
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
389
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
390
|
+
*
|
|
391
|
+
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
392
|
+
* @default false
|
|
393
|
+
*/
|
|
394
|
+
useFlexGap: e.bool
|
|
395
|
+
});
|
|
396
|
+
const xo = Me;
|
|
397
|
+
function Io(o) {
|
|
398
|
+
return U("MuiFormControlLabel", o);
|
|
399
|
+
}
|
|
400
|
+
const Mo = z("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]), Z = Mo, No = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"], Oo = (o) => {
|
|
401
|
+
const {
|
|
402
|
+
classes: r,
|
|
403
|
+
disabled: t,
|
|
404
|
+
labelPlacement: s,
|
|
405
|
+
error: n,
|
|
406
|
+
required: l
|
|
407
|
+
} = o, p = {
|
|
408
|
+
root: ["root", t && "disabled", `labelPlacement${w(s)}`, n && "error", l && "required"],
|
|
409
|
+
label: ["label", t && "disabled"],
|
|
410
|
+
asterisk: ["asterisk", n && "error"]
|
|
411
|
+
};
|
|
412
|
+
return _(p, Io, r);
|
|
413
|
+
}, To = P("label", {
|
|
414
|
+
name: "MuiFormControlLabel",
|
|
38
415
|
slot: "Root",
|
|
39
|
-
overridesResolver:
|
|
416
|
+
overridesResolver: (o, r) => {
|
|
417
|
+
const {
|
|
418
|
+
ownerState: t
|
|
419
|
+
} = o;
|
|
420
|
+
return [{
|
|
421
|
+
[`& .${Z.label}`]: r.label
|
|
422
|
+
}, r.root, r[`labelPlacement${w(t.labelPlacement)}`]];
|
|
423
|
+
}
|
|
424
|
+
})(({
|
|
425
|
+
theme: o,
|
|
426
|
+
ownerState: r
|
|
427
|
+
}) => f({
|
|
428
|
+
display: "inline-flex",
|
|
429
|
+
alignItems: "center",
|
|
430
|
+
cursor: "pointer",
|
|
431
|
+
// For correct alignment with the text.
|
|
432
|
+
verticalAlign: "middle",
|
|
433
|
+
WebkitTapHighlightColor: "transparent",
|
|
434
|
+
marginLeft: -11,
|
|
435
|
+
marginRight: 16,
|
|
436
|
+
// used for row presentation of radio/checkbox
|
|
437
|
+
[`&.${Z.disabled}`]: {
|
|
438
|
+
cursor: "default"
|
|
439
|
+
}
|
|
440
|
+
}, r.labelPlacement === "start" && {
|
|
441
|
+
flexDirection: "row-reverse",
|
|
442
|
+
marginLeft: 16,
|
|
443
|
+
// used for row presentation of radio/checkbox
|
|
444
|
+
marginRight: -11
|
|
445
|
+
}, r.labelPlacement === "top" && {
|
|
446
|
+
flexDirection: "column-reverse",
|
|
447
|
+
marginLeft: 16
|
|
448
|
+
}, r.labelPlacement === "bottom" && {
|
|
449
|
+
flexDirection: "column",
|
|
450
|
+
marginLeft: 16
|
|
451
|
+
}, {
|
|
452
|
+
[`& .${Z.label}`]: {
|
|
453
|
+
[`&.${Z.disabled}`]: {
|
|
454
|
+
color: (o.vars || o).palette.text.disabled
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
})), ko = P("span", {
|
|
458
|
+
name: "MuiFormControlLabel",
|
|
459
|
+
slot: "Asterisk",
|
|
460
|
+
overridesResolver: (o, r) => r.asterisk
|
|
461
|
+
})(({
|
|
462
|
+
theme: o
|
|
463
|
+
}) => ({
|
|
464
|
+
[`&.${Z.error}`]: {
|
|
465
|
+
color: (o.vars || o).palette.error.main
|
|
466
|
+
}
|
|
467
|
+
})), Ne = /* @__PURE__ */ x.forwardRef(function(r, t) {
|
|
468
|
+
var s, n;
|
|
469
|
+
const l = G({
|
|
470
|
+
props: r,
|
|
471
|
+
name: "MuiFormControlLabel"
|
|
472
|
+
}), {
|
|
473
|
+
className: p,
|
|
474
|
+
componentsProps: y = {},
|
|
475
|
+
control: i,
|
|
476
|
+
disabled: d,
|
|
477
|
+
disableTypography: g,
|
|
478
|
+
label: h,
|
|
479
|
+
labelPlacement: m = "end",
|
|
480
|
+
required: I,
|
|
481
|
+
slotProps: a = {}
|
|
482
|
+
} = l, v = D(l, No), b = H(), M = (s = d ?? i.props.disabled) != null ? s : b == null ? void 0 : b.disabled, N = I ?? i.props.required, T = {
|
|
483
|
+
disabled: M,
|
|
484
|
+
required: N
|
|
485
|
+
};
|
|
486
|
+
["checked", "name", "onChange", "value", "inputRef"].forEach((B) => {
|
|
487
|
+
typeof i.props[B] > "u" && typeof l[B] < "u" && (T[B] = l[B]);
|
|
488
|
+
});
|
|
489
|
+
const k = he({
|
|
490
|
+
props: l,
|
|
491
|
+
muiFormControl: b,
|
|
492
|
+
states: ["error"]
|
|
493
|
+
}), u = f({}, l, {
|
|
494
|
+
disabled: M,
|
|
495
|
+
labelPlacement: m,
|
|
496
|
+
required: N,
|
|
497
|
+
error: k.error
|
|
498
|
+
}), C = Oo(u), R = (n = a.typography) != null ? n : y.typography;
|
|
499
|
+
let $ = h;
|
|
500
|
+
return $ != null && $.type !== X && !g && ($ = /* @__PURE__ */ c(X, f({
|
|
501
|
+
component: "span"
|
|
502
|
+
}, R, {
|
|
503
|
+
className: E(C.label, R == null ? void 0 : R.className),
|
|
504
|
+
children: $
|
|
505
|
+
}))), /* @__PURE__ */ j(To, f({
|
|
506
|
+
className: E(C.root, p),
|
|
507
|
+
ownerState: u,
|
|
508
|
+
ref: t
|
|
509
|
+
}, v, {
|
|
510
|
+
children: [/* @__PURE__ */ x.cloneElement(i, T), N ? /* @__PURE__ */ j(xo, {
|
|
511
|
+
direction: "row",
|
|
512
|
+
alignItems: "center",
|
|
513
|
+
children: [$, /* @__PURE__ */ j(ko, {
|
|
514
|
+
ownerState: u,
|
|
515
|
+
"aria-hidden": !0,
|
|
516
|
+
className: C.asterisk,
|
|
517
|
+
children: [" ", "*"]
|
|
518
|
+
})]
|
|
519
|
+
}) : $]
|
|
520
|
+
}));
|
|
521
|
+
});
|
|
522
|
+
process.env.NODE_ENV !== "production" && (Ne.propTypes = {
|
|
523
|
+
// ----------------------------- Warning --------------------------------
|
|
524
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
525
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
526
|
+
// ----------------------------------------------------------------------
|
|
527
|
+
/**
|
|
528
|
+
* If `true`, the component appears selected.
|
|
529
|
+
*/
|
|
530
|
+
checked: e.bool,
|
|
531
|
+
/**
|
|
532
|
+
* Override or extend the styles applied to the component.
|
|
533
|
+
*/
|
|
534
|
+
classes: e.object,
|
|
535
|
+
/**
|
|
536
|
+
* @ignore
|
|
537
|
+
*/
|
|
538
|
+
className: e.string,
|
|
539
|
+
/**
|
|
540
|
+
* The props used for each slot inside.
|
|
541
|
+
* @default {}
|
|
542
|
+
*/
|
|
543
|
+
componentsProps: e.shape({
|
|
544
|
+
typography: e.object
|
|
545
|
+
}),
|
|
546
|
+
/**
|
|
547
|
+
* A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
|
|
548
|
+
*/
|
|
549
|
+
control: e.element.isRequired,
|
|
550
|
+
/**
|
|
551
|
+
* If `true`, the control is disabled.
|
|
552
|
+
*/
|
|
553
|
+
disabled: e.bool,
|
|
554
|
+
/**
|
|
555
|
+
* If `true`, the label is rendered as it is passed without an additional typography node.
|
|
556
|
+
*/
|
|
557
|
+
disableTypography: e.bool,
|
|
558
|
+
/**
|
|
559
|
+
* Pass a ref to the `input` element.
|
|
560
|
+
*/
|
|
561
|
+
inputRef: A,
|
|
562
|
+
/**
|
|
563
|
+
* A text or an element to be used in an enclosing label element.
|
|
564
|
+
*/
|
|
565
|
+
label: e.node,
|
|
566
|
+
/**
|
|
567
|
+
* The position of the label.
|
|
568
|
+
* @default 'end'
|
|
569
|
+
*/
|
|
570
|
+
labelPlacement: e.oneOf(["bottom", "end", "start", "top"]),
|
|
571
|
+
/**
|
|
572
|
+
* @ignore
|
|
573
|
+
*/
|
|
574
|
+
name: e.string,
|
|
575
|
+
/**
|
|
576
|
+
* Callback fired when the state is changed.
|
|
577
|
+
*
|
|
578
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
579
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
580
|
+
*/
|
|
581
|
+
onChange: e.func,
|
|
582
|
+
/**
|
|
583
|
+
* If `true`, the label will indicate that the `input` is required.
|
|
584
|
+
*/
|
|
585
|
+
required: e.bool,
|
|
586
|
+
/**
|
|
587
|
+
* The props used for each slot inside.
|
|
588
|
+
* @default {}
|
|
589
|
+
*/
|
|
590
|
+
slotProps: e.shape({
|
|
591
|
+
typography: e.object
|
|
592
|
+
}),
|
|
593
|
+
/**
|
|
594
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
595
|
+
*/
|
|
596
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
597
|
+
/**
|
|
598
|
+
* The value of the component.
|
|
599
|
+
*/
|
|
600
|
+
value: e.any
|
|
601
|
+
});
|
|
602
|
+
const Ro = Ne;
|
|
603
|
+
function $o(o) {
|
|
604
|
+
return U("MuiFormGroup", o);
|
|
605
|
+
}
|
|
606
|
+
z("MuiFormGroup", ["root", "row", "error"]);
|
|
607
|
+
const jo = ["className", "row"], Po = (o) => {
|
|
608
|
+
const {
|
|
609
|
+
classes: r,
|
|
610
|
+
row: t,
|
|
611
|
+
error: s
|
|
612
|
+
} = o;
|
|
613
|
+
return _({
|
|
614
|
+
root: ["root", t && "row", s && "error"]
|
|
615
|
+
}, $o, r);
|
|
616
|
+
}, So = P("div", {
|
|
617
|
+
name: "MuiFormGroup",
|
|
618
|
+
slot: "Root",
|
|
619
|
+
overridesResolver: (o, r) => {
|
|
620
|
+
const {
|
|
621
|
+
ownerState: t
|
|
622
|
+
} = o;
|
|
623
|
+
return [r.root, t.row && r.row];
|
|
624
|
+
}
|
|
40
625
|
})(({
|
|
41
|
-
theme: e,
|
|
42
626
|
ownerState: o
|
|
43
|
-
}) =>
|
|
627
|
+
}) => f({
|
|
628
|
+
display: "flex",
|
|
629
|
+
flexDirection: "column",
|
|
630
|
+
flexWrap: "wrap"
|
|
631
|
+
}, o.row && {
|
|
632
|
+
flexDirection: "row"
|
|
633
|
+
})), Oe = /* @__PURE__ */ x.forwardRef(function(r, t) {
|
|
634
|
+
const s = G({
|
|
635
|
+
props: r,
|
|
636
|
+
name: "MuiFormGroup"
|
|
637
|
+
}), {
|
|
638
|
+
className: n,
|
|
639
|
+
row: l = !1
|
|
640
|
+
} = s, p = D(s, jo), y = H(), i = he({
|
|
641
|
+
props: s,
|
|
642
|
+
muiFormControl: y,
|
|
643
|
+
states: ["error"]
|
|
644
|
+
}), d = f({}, s, {
|
|
645
|
+
row: l,
|
|
646
|
+
error: i.error
|
|
647
|
+
}), g = Po(d);
|
|
648
|
+
return /* @__PURE__ */ c(So, f({
|
|
649
|
+
className: E(g.root, n),
|
|
650
|
+
ownerState: d,
|
|
651
|
+
ref: t
|
|
652
|
+
}, p));
|
|
653
|
+
});
|
|
654
|
+
process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
655
|
+
// ----------------------------- Warning --------------------------------
|
|
656
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
657
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
658
|
+
// ----------------------------------------------------------------------
|
|
659
|
+
/**
|
|
660
|
+
* The content of the component.
|
|
661
|
+
*/
|
|
662
|
+
children: e.node,
|
|
663
|
+
/**
|
|
664
|
+
* Override or extend the styles applied to the component.
|
|
665
|
+
*/
|
|
666
|
+
classes: e.object,
|
|
667
|
+
/**
|
|
668
|
+
* @ignore
|
|
669
|
+
*/
|
|
670
|
+
className: e.string,
|
|
671
|
+
/**
|
|
672
|
+
* Display group of elements in a compact row.
|
|
673
|
+
* @default false
|
|
674
|
+
*/
|
|
675
|
+
row: e.bool,
|
|
676
|
+
/**
|
|
677
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
678
|
+
*/
|
|
679
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
680
|
+
});
|
|
681
|
+
const Lo = Oe;
|
|
682
|
+
function wo(o) {
|
|
683
|
+
return U("MuiInputAdornment", o);
|
|
684
|
+
}
|
|
685
|
+
const Eo = z("MuiInputAdornment", ["root", "filled", "standard", "outlined", "positionStart", "positionEnd", "disablePointerEvents", "hiddenLabel", "sizeSmall"]), ce = Eo;
|
|
686
|
+
var ie;
|
|
687
|
+
const Fo = ["children", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"], Do = (o, r) => {
|
|
688
|
+
const {
|
|
689
|
+
ownerState: t
|
|
690
|
+
} = o;
|
|
691
|
+
return [r.root, r[`position${w(t.position)}`], t.disablePointerEvents === !0 && r.disablePointerEvents, r[t.variant]];
|
|
692
|
+
}, zo = (o) => {
|
|
693
|
+
const {
|
|
694
|
+
classes: r,
|
|
695
|
+
disablePointerEvents: t,
|
|
696
|
+
hiddenLabel: s,
|
|
697
|
+
position: n,
|
|
698
|
+
size: l,
|
|
699
|
+
variant: p
|
|
700
|
+
} = o, y = {
|
|
701
|
+
root: ["root", t && "disablePointerEvents", n && `position${w(n)}`, p, s && "hiddenLabel", l && `size${w(l)}`]
|
|
702
|
+
};
|
|
703
|
+
return _(y, wo, r);
|
|
704
|
+
}, Bo = P("div", {
|
|
705
|
+
name: "MuiInputAdornment",
|
|
706
|
+
slot: "Root",
|
|
707
|
+
overridesResolver: Do
|
|
708
|
+
})(({
|
|
709
|
+
theme: o,
|
|
710
|
+
ownerState: r
|
|
711
|
+
}) => f({
|
|
44
712
|
display: "flex",
|
|
45
713
|
height: "0.01em",
|
|
46
714
|
// Fix IE11 flexbox alignment. To remove at some point.
|
|
47
715
|
maxHeight: "2em",
|
|
48
716
|
alignItems: "center",
|
|
49
717
|
whiteSpace: "nowrap",
|
|
50
|
-
color: (
|
|
51
|
-
},
|
|
718
|
+
color: (o.vars || o).palette.action.active
|
|
719
|
+
}, r.variant === "filled" && {
|
|
52
720
|
// Styles applied to the root element if `variant="filled"`.
|
|
53
|
-
[`&.${
|
|
721
|
+
[`&.${ce.positionStart}&:not(.${ce.hiddenLabel})`]: {
|
|
54
722
|
marginTop: 16
|
|
55
723
|
}
|
|
56
|
-
},
|
|
724
|
+
}, r.position === "start" && {
|
|
57
725
|
// Styles applied to the root element if `position="start"`.
|
|
58
726
|
marginRight: 8
|
|
59
|
-
},
|
|
727
|
+
}, r.position === "end" && {
|
|
60
728
|
// Styles applied to the root element if `position="end"`.
|
|
61
729
|
marginLeft: 8
|
|
62
|
-
},
|
|
730
|
+
}, r.disablePointerEvents === !0 && {
|
|
63
731
|
// Styles applied to the root element if `disablePointerEvents={true}`.
|
|
64
732
|
pointerEvents: "none"
|
|
65
|
-
})),
|
|
66
|
-
const
|
|
67
|
-
props:
|
|
733
|
+
})), Te = /* @__PURE__ */ x.forwardRef(function(r, t) {
|
|
734
|
+
const s = G({
|
|
735
|
+
props: r,
|
|
68
736
|
name: "MuiInputAdornment"
|
|
69
737
|
}), {
|
|
70
|
-
children:
|
|
71
|
-
className:
|
|
72
|
-
component:
|
|
73
|
-
disablePointerEvents:
|
|
74
|
-
disableTypography:
|
|
75
|
-
position:
|
|
76
|
-
variant:
|
|
77
|
-
} =
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
hiddenLabel:
|
|
82
|
-
size:
|
|
83
|
-
disablePointerEvents:
|
|
84
|
-
position:
|
|
85
|
-
variant:
|
|
86
|
-
}),
|
|
87
|
-
return /* @__PURE__ */
|
|
738
|
+
children: n,
|
|
739
|
+
className: l,
|
|
740
|
+
component: p = "div",
|
|
741
|
+
disablePointerEvents: y = !1,
|
|
742
|
+
disableTypography: i = !1,
|
|
743
|
+
position: d,
|
|
744
|
+
variant: g
|
|
745
|
+
} = s, h = D(s, Fo), m = H() || {};
|
|
746
|
+
let I = g;
|
|
747
|
+
g && m.variant && process.env.NODE_ENV !== "production" && g === m.variant && console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."), m && !I && (I = m.variant);
|
|
748
|
+
const a = f({}, s, {
|
|
749
|
+
hiddenLabel: m.hiddenLabel,
|
|
750
|
+
size: m.size,
|
|
751
|
+
disablePointerEvents: y,
|
|
752
|
+
position: d,
|
|
753
|
+
variant: I
|
|
754
|
+
}), v = zo(a);
|
|
755
|
+
return /* @__PURE__ */ c(oo.Provider, {
|
|
88
756
|
value: null,
|
|
89
|
-
children: /* @__PURE__ */
|
|
90
|
-
as:
|
|
91
|
-
ownerState:
|
|
92
|
-
className:
|
|
93
|
-
ref:
|
|
94
|
-
},
|
|
95
|
-
children: typeof
|
|
757
|
+
children: /* @__PURE__ */ c(Bo, f({
|
|
758
|
+
as: p,
|
|
759
|
+
ownerState: a,
|
|
760
|
+
className: E(v.root, l),
|
|
761
|
+
ref: t
|
|
762
|
+
}, h, {
|
|
763
|
+
children: typeof n == "string" && !i ? /* @__PURE__ */ c(X, {
|
|
96
764
|
color: "text.secondary",
|
|
97
|
-
children:
|
|
98
|
-
}) : /* @__PURE__ */
|
|
99
|
-
children: [
|
|
765
|
+
children: n
|
|
766
|
+
}) : /* @__PURE__ */ j(x.Fragment, {
|
|
767
|
+
children: [d === "start" ? (
|
|
100
768
|
/* notranslate needed while Google Translate will not fix zero-width space issue */
|
|
101
|
-
|
|
769
|
+
ie || (ie = /* @__PURE__ */ c("span", {
|
|
102
770
|
className: "notranslate",
|
|
103
771
|
children: ""
|
|
104
772
|
}))
|
|
105
|
-
) : null,
|
|
773
|
+
) : null, n]
|
|
106
774
|
})
|
|
107
775
|
}))
|
|
108
776
|
});
|
|
109
777
|
});
|
|
110
|
-
process.env.NODE_ENV !== "production" && (
|
|
778
|
+
process.env.NODE_ENV !== "production" && (Te.propTypes = {
|
|
111
779
|
// ----------------------------- Warning --------------------------------
|
|
112
780
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
113
781
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -115,76 +783,76 @@ process.env.NODE_ENV !== "production" && (J.propTypes = {
|
|
|
115
783
|
/**
|
|
116
784
|
* The content of the component, normally an `IconButton` or string.
|
|
117
785
|
*/
|
|
118
|
-
children:
|
|
786
|
+
children: e.node,
|
|
119
787
|
/**
|
|
120
788
|
* Override or extend the styles applied to the component.
|
|
121
789
|
*/
|
|
122
|
-
classes:
|
|
790
|
+
classes: e.object,
|
|
123
791
|
/**
|
|
124
792
|
* @ignore
|
|
125
793
|
*/
|
|
126
|
-
className:
|
|
794
|
+
className: e.string,
|
|
127
795
|
/**
|
|
128
796
|
* The component used for the root node.
|
|
129
797
|
* Either a string to use a HTML element or a component.
|
|
130
798
|
*/
|
|
131
|
-
component:
|
|
799
|
+
component: e.elementType,
|
|
132
800
|
/**
|
|
133
801
|
* Disable pointer events on the root.
|
|
134
802
|
* This allows for the content of the adornment to focus the `input` on click.
|
|
135
803
|
* @default false
|
|
136
804
|
*/
|
|
137
|
-
disablePointerEvents:
|
|
805
|
+
disablePointerEvents: e.bool,
|
|
138
806
|
/**
|
|
139
807
|
* If children is a string then disable wrapping in a Typography component.
|
|
140
808
|
* @default false
|
|
141
809
|
*/
|
|
142
|
-
disableTypography:
|
|
810
|
+
disableTypography: e.bool,
|
|
143
811
|
/**
|
|
144
812
|
* The position this adornment should appear relative to the `Input`.
|
|
145
813
|
*/
|
|
146
|
-
position:
|
|
814
|
+
position: e.oneOf(["end", "start"]).isRequired,
|
|
147
815
|
/**
|
|
148
816
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
149
817
|
*/
|
|
150
|
-
sx:
|
|
818
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
151
819
|
/**
|
|
152
820
|
* The variant to use.
|
|
153
821
|
* Note: If you are using the `TextField` component or the `FormControl` component
|
|
154
822
|
* you do not have to set this manually.
|
|
155
823
|
*/
|
|
156
|
-
variant:
|
|
824
|
+
variant: e.oneOf(["filled", "outlined", "standard"])
|
|
157
825
|
});
|
|
158
|
-
const
|
|
159
|
-
function
|
|
160
|
-
return
|
|
826
|
+
const de = Te, Vo = z("MuiListItemIcon", ["root", "alignItemsFlexStart"]), ue = Vo, Uo = z("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]), pe = Uo;
|
|
827
|
+
function _o(o) {
|
|
828
|
+
return U("MuiMenuItem", o);
|
|
161
829
|
}
|
|
162
|
-
const
|
|
830
|
+
const Go = z("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divider", "gutters", "selected"]), Q = Go, qo = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"], Qo = (o, r) => {
|
|
163
831
|
const {
|
|
164
|
-
ownerState:
|
|
165
|
-
} =
|
|
166
|
-
return [
|
|
167
|
-
},
|
|
832
|
+
ownerState: t
|
|
833
|
+
} = o;
|
|
834
|
+
return [r.root, t.dense && r.dense, t.divider && r.divider, !t.disableGutters && r.gutters];
|
|
835
|
+
}, Wo = (o) => {
|
|
168
836
|
const {
|
|
169
|
-
disabled:
|
|
170
|
-
dense:
|
|
171
|
-
divider:
|
|
172
|
-
disableGutters:
|
|
173
|
-
selected:
|
|
174
|
-
classes:
|
|
175
|
-
} =
|
|
176
|
-
root: ["root",
|
|
177
|
-
},
|
|
178
|
-
return
|
|
179
|
-
},
|
|
180
|
-
shouldForwardProp: (
|
|
837
|
+
disabled: r,
|
|
838
|
+
dense: t,
|
|
839
|
+
divider: s,
|
|
840
|
+
disableGutters: n,
|
|
841
|
+
selected: l,
|
|
842
|
+
classes: p
|
|
843
|
+
} = o, i = _({
|
|
844
|
+
root: ["root", t && "dense", r && "disabled", !n && "gutters", s && "divider", l && "selected"]
|
|
845
|
+
}, _o, p);
|
|
846
|
+
return f({}, p, i);
|
|
847
|
+
}, Zo = P(Ce, {
|
|
848
|
+
shouldForwardProp: (o) => ve(o) || o === "classes",
|
|
181
849
|
name: "MuiMenuItem",
|
|
182
850
|
slot: "Root",
|
|
183
|
-
overridesResolver:
|
|
851
|
+
overridesResolver: Qo
|
|
184
852
|
})(({
|
|
185
|
-
theme:
|
|
186
|
-
ownerState:
|
|
187
|
-
}) =>
|
|
853
|
+
theme: o,
|
|
854
|
+
ownerState: r
|
|
855
|
+
}) => f({}, o.typography.body1, {
|
|
188
856
|
display: "flex",
|
|
189
857
|
justifyContent: "flex-start",
|
|
190
858
|
alignItems: "center",
|
|
@@ -195,113 +863,113 @@ const De = E("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divid
|
|
|
195
863
|
paddingBottom: 6,
|
|
196
864
|
boxSizing: "border-box",
|
|
197
865
|
whiteSpace: "nowrap"
|
|
198
|
-
}, !
|
|
866
|
+
}, !r.disableGutters && {
|
|
199
867
|
paddingLeft: 16,
|
|
200
868
|
paddingRight: 16
|
|
201
|
-
},
|
|
202
|
-
borderBottom: `1px solid ${(
|
|
869
|
+
}, r.divider && {
|
|
870
|
+
borderBottom: `1px solid ${(o.vars || o).palette.divider}`,
|
|
203
871
|
backgroundClip: "padding-box"
|
|
204
872
|
}, {
|
|
205
873
|
"&:hover": {
|
|
206
874
|
textDecoration: "none",
|
|
207
|
-
backgroundColor: (
|
|
875
|
+
backgroundColor: (o.vars || o).palette.action.hover,
|
|
208
876
|
// Reset on touch devices, it doesn't add specificity
|
|
209
877
|
"@media (hover: none)": {
|
|
210
878
|
backgroundColor: "transparent"
|
|
211
879
|
}
|
|
212
880
|
},
|
|
213
|
-
[`&.${
|
|
214
|
-
backgroundColor:
|
|
215
|
-
[`&.${
|
|
216
|
-
backgroundColor:
|
|
881
|
+
[`&.${Q.selected}`]: {
|
|
882
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.selectedOpacity})` : W(o.palette.primary.main, o.palette.action.selectedOpacity),
|
|
883
|
+
[`&.${Q.focusVisible}`]: {
|
|
884
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.focusOpacity}))` : W(o.palette.primary.main, o.palette.action.selectedOpacity + o.palette.action.focusOpacity)
|
|
217
885
|
}
|
|
218
886
|
},
|
|
219
|
-
[`&.${
|
|
220
|
-
backgroundColor:
|
|
887
|
+
[`&.${Q.selected}:hover`]: {
|
|
888
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.hoverOpacity}))` : W(o.palette.primary.main, o.palette.action.selectedOpacity + o.palette.action.hoverOpacity),
|
|
221
889
|
// Reset on touch devices, it doesn't add specificity
|
|
222
890
|
"@media (hover: none)": {
|
|
223
|
-
backgroundColor:
|
|
891
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.selectedOpacity})` : W(o.palette.primary.main, o.palette.action.selectedOpacity)
|
|
224
892
|
}
|
|
225
893
|
},
|
|
226
|
-
[`&.${
|
|
227
|
-
backgroundColor: (
|
|
894
|
+
[`&.${Q.focusVisible}`]: {
|
|
895
|
+
backgroundColor: (o.vars || o).palette.action.focus
|
|
228
896
|
},
|
|
229
|
-
[`&.${
|
|
230
|
-
opacity: (
|
|
897
|
+
[`&.${Q.disabled}`]: {
|
|
898
|
+
opacity: (o.vars || o).palette.action.disabledOpacity
|
|
231
899
|
},
|
|
232
|
-
[`& + .${
|
|
233
|
-
marginTop:
|
|
234
|
-
marginBottom:
|
|
900
|
+
[`& + .${te.root}`]: {
|
|
901
|
+
marginTop: o.spacing(1),
|
|
902
|
+
marginBottom: o.spacing(1)
|
|
235
903
|
},
|
|
236
|
-
[`& + .${
|
|
904
|
+
[`& + .${te.inset}`]: {
|
|
237
905
|
marginLeft: 52
|
|
238
906
|
},
|
|
239
|
-
[`& .${
|
|
907
|
+
[`& .${pe.root}`]: {
|
|
240
908
|
marginTop: 0,
|
|
241
909
|
marginBottom: 0
|
|
242
910
|
},
|
|
243
|
-
[`& .${
|
|
911
|
+
[`& .${pe.inset}`]: {
|
|
244
912
|
paddingLeft: 36
|
|
245
913
|
},
|
|
246
|
-
[`& .${
|
|
914
|
+
[`& .${ue.root}`]: {
|
|
247
915
|
minWidth: 36
|
|
248
916
|
}
|
|
249
|
-
}, !
|
|
250
|
-
[
|
|
917
|
+
}, !r.dense && {
|
|
918
|
+
[o.breakpoints.up("sm")]: {
|
|
251
919
|
minHeight: "auto"
|
|
252
920
|
}
|
|
253
|
-
},
|
|
921
|
+
}, r.dense && f({
|
|
254
922
|
minHeight: 32,
|
|
255
923
|
// https://m2.material.io/components/menus#specs > Dense
|
|
256
924
|
paddingTop: 4,
|
|
257
925
|
paddingBottom: 4
|
|
258
|
-
},
|
|
259
|
-
[`& .${
|
|
926
|
+
}, o.typography.body2, {
|
|
927
|
+
[`& .${ue.root} svg`]: {
|
|
260
928
|
fontSize: "1.25rem"
|
|
261
929
|
}
|
|
262
|
-
}))),
|
|
263
|
-
const
|
|
264
|
-
props:
|
|
930
|
+
}))), ke = /* @__PURE__ */ x.forwardRef(function(r, t) {
|
|
931
|
+
const s = G({
|
|
932
|
+
props: r,
|
|
265
933
|
name: "MuiMenuItem"
|
|
266
934
|
}), {
|
|
267
|
-
autoFocus:
|
|
268
|
-
component:
|
|
269
|
-
dense:
|
|
270
|
-
divider:
|
|
271
|
-
disableGutters:
|
|
272
|
-
focusVisibleClassName:
|
|
273
|
-
role:
|
|
274
|
-
tabIndex:
|
|
275
|
-
className:
|
|
276
|
-
} =
|
|
277
|
-
dense:
|
|
278
|
-
disableGutters:
|
|
279
|
-
}), [
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}, [
|
|
283
|
-
const
|
|
284
|
-
dense:
|
|
285
|
-
divider:
|
|
286
|
-
disableGutters:
|
|
287
|
-
}),
|
|
288
|
-
let
|
|
289
|
-
return
|
|
290
|
-
value:
|
|
291
|
-
children: /* @__PURE__ */
|
|
292
|
-
ref:
|
|
293
|
-
role:
|
|
294
|
-
tabIndex:
|
|
295
|
-
component:
|
|
296
|
-
focusVisibleClassName:
|
|
297
|
-
className:
|
|
298
|
-
},
|
|
299
|
-
ownerState:
|
|
300
|
-
classes:
|
|
935
|
+
autoFocus: n = !1,
|
|
936
|
+
component: l = "li",
|
|
937
|
+
dense: p = !1,
|
|
938
|
+
divider: y = !1,
|
|
939
|
+
disableGutters: i = !1,
|
|
940
|
+
focusVisibleClassName: d,
|
|
941
|
+
role: g = "menuitem",
|
|
942
|
+
tabIndex: h,
|
|
943
|
+
className: m
|
|
944
|
+
} = s, I = D(s, qo), a = x.useContext(le), v = x.useMemo(() => ({
|
|
945
|
+
dense: p || a.dense || !1,
|
|
946
|
+
disableGutters: i
|
|
947
|
+
}), [a.dense, p, i]), b = x.useRef(null);
|
|
948
|
+
Xe(() => {
|
|
949
|
+
n && (b.current ? b.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."));
|
|
950
|
+
}, [n]);
|
|
951
|
+
const M = f({}, s, {
|
|
952
|
+
dense: v.dense,
|
|
953
|
+
divider: y,
|
|
954
|
+
disableGutters: i
|
|
955
|
+
}), N = Wo(s), T = ye(b, t);
|
|
956
|
+
let k;
|
|
957
|
+
return s.disabled || (k = h !== void 0 ? h : -1), /* @__PURE__ */ c(le.Provider, {
|
|
958
|
+
value: v,
|
|
959
|
+
children: /* @__PURE__ */ c(Zo, f({
|
|
960
|
+
ref: T,
|
|
961
|
+
role: g,
|
|
962
|
+
tabIndex: k,
|
|
963
|
+
component: l,
|
|
964
|
+
focusVisibleClassName: E(N.focusVisible, d),
|
|
965
|
+
className: E(N.root, m)
|
|
966
|
+
}, I, {
|
|
967
|
+
ownerState: M,
|
|
968
|
+
classes: N
|
|
301
969
|
}))
|
|
302
970
|
});
|
|
303
971
|
});
|
|
304
|
-
process.env.NODE_ENV !== "production" && (
|
|
972
|
+
process.env.NODE_ENV !== "production" && (ke.propTypes = {
|
|
305
973
|
// ----------------------------- Warning --------------------------------
|
|
306
974
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
307
975
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -311,44 +979,44 @@ process.env.NODE_ENV !== "production" && (X.propTypes = {
|
|
|
311
979
|
* Focus will also be triggered if the value changes from false to true.
|
|
312
980
|
* @default false
|
|
313
981
|
*/
|
|
314
|
-
autoFocus:
|
|
982
|
+
autoFocus: e.bool,
|
|
315
983
|
/**
|
|
316
984
|
* The content of the component.
|
|
317
985
|
*/
|
|
318
|
-
children:
|
|
986
|
+
children: e.node,
|
|
319
987
|
/**
|
|
320
988
|
* Override or extend the styles applied to the component.
|
|
321
989
|
*/
|
|
322
|
-
classes:
|
|
990
|
+
classes: e.object,
|
|
323
991
|
/**
|
|
324
992
|
* @ignore
|
|
325
993
|
*/
|
|
326
|
-
className:
|
|
994
|
+
className: e.string,
|
|
327
995
|
/**
|
|
328
996
|
* The component used for the root node.
|
|
329
997
|
* Either a string to use a HTML element or a component.
|
|
330
998
|
*/
|
|
331
|
-
component:
|
|
999
|
+
component: e.elementType,
|
|
332
1000
|
/**
|
|
333
1001
|
* If `true`, compact vertical padding designed for keyboard and mouse input is used.
|
|
334
1002
|
* The prop defaults to the value inherited from the parent Menu component.
|
|
335
1003
|
* @default false
|
|
336
1004
|
*/
|
|
337
|
-
dense:
|
|
1005
|
+
dense: e.bool,
|
|
338
1006
|
/**
|
|
339
1007
|
* @ignore
|
|
340
1008
|
*/
|
|
341
|
-
disabled:
|
|
1009
|
+
disabled: e.bool,
|
|
342
1010
|
/**
|
|
343
1011
|
* If `true`, the left and right padding is removed.
|
|
344
1012
|
* @default false
|
|
345
1013
|
*/
|
|
346
|
-
disableGutters:
|
|
1014
|
+
disableGutters: e.bool,
|
|
347
1015
|
/**
|
|
348
1016
|
* If `true`, a 1px light border is added to the bottom of the menu item.
|
|
349
1017
|
* @default false
|
|
350
1018
|
*/
|
|
351
|
-
divider:
|
|
1019
|
+
divider: e.bool,
|
|
352
1020
|
/**
|
|
353
1021
|
* This prop can help identify which element has keyboard focus.
|
|
354
1022
|
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
@@ -357,160 +1025,506 @@ process.env.NODE_ENV !== "production" && (X.propTypes = {
|
|
|
357
1025
|
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
358
1026
|
* if needed.
|
|
359
1027
|
*/
|
|
360
|
-
focusVisibleClassName:
|
|
1028
|
+
focusVisibleClassName: e.string,
|
|
361
1029
|
/**
|
|
362
1030
|
* @ignore
|
|
363
1031
|
*/
|
|
364
|
-
role:
|
|
1032
|
+
role: e.string,
|
|
365
1033
|
/**
|
|
366
1034
|
* If `true`, the component is selected.
|
|
367
1035
|
* @default false
|
|
368
1036
|
*/
|
|
369
|
-
selected:
|
|
1037
|
+
selected: e.bool,
|
|
370
1038
|
/**
|
|
371
1039
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
372
1040
|
*/
|
|
373
|
-
sx:
|
|
1041
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
374
1042
|
/**
|
|
375
1043
|
* @default 0
|
|
376
1044
|
*/
|
|
377
|
-
tabIndex:
|
|
1045
|
+
tabIndex: e.number
|
|
1046
|
+
});
|
|
1047
|
+
const Ho = ke, Yo = xe(/* @__PURE__ */ c("path", {
|
|
1048
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
1049
|
+
}), "RadioButtonUnchecked"), Ko = xe(/* @__PURE__ */ c("path", {
|
|
1050
|
+
d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
|
|
1051
|
+
}), "RadioButtonChecked"), Jo = P("span")({
|
|
1052
|
+
position: "relative",
|
|
1053
|
+
display: "flex"
|
|
1054
|
+
}), Xo = P(Yo)({
|
|
1055
|
+
// Scale applied to prevent dot misalignment in Safari
|
|
1056
|
+
transform: "scale(1)"
|
|
1057
|
+
}), Ao = P(Ko)(({
|
|
1058
|
+
theme: o,
|
|
1059
|
+
ownerState: r
|
|
1060
|
+
}) => f({
|
|
1061
|
+
left: 0,
|
|
1062
|
+
position: "absolute",
|
|
1063
|
+
transform: "scale(0)",
|
|
1064
|
+
transition: o.transitions.create("transform", {
|
|
1065
|
+
easing: o.transitions.easing.easeIn,
|
|
1066
|
+
duration: o.transitions.duration.shortest
|
|
1067
|
+
})
|
|
1068
|
+
}, r.checked && {
|
|
1069
|
+
transform: "scale(1)",
|
|
1070
|
+
transition: o.transitions.create("transform", {
|
|
1071
|
+
easing: o.transitions.easing.easeOut,
|
|
1072
|
+
duration: o.transitions.duration.shortest
|
|
1073
|
+
})
|
|
1074
|
+
}));
|
|
1075
|
+
function ee(o) {
|
|
1076
|
+
const {
|
|
1077
|
+
checked: r = !1,
|
|
1078
|
+
classes: t = {},
|
|
1079
|
+
fontSize: s
|
|
1080
|
+
} = o, n = f({}, o, {
|
|
1081
|
+
checked: r
|
|
1082
|
+
});
|
|
1083
|
+
return /* @__PURE__ */ j(Jo, {
|
|
1084
|
+
className: t.root,
|
|
1085
|
+
ownerState: n,
|
|
1086
|
+
children: [/* @__PURE__ */ c(Xo, {
|
|
1087
|
+
fontSize: s,
|
|
1088
|
+
className: t.background,
|
|
1089
|
+
ownerState: n
|
|
1090
|
+
}), /* @__PURE__ */ c(Ao, {
|
|
1091
|
+
fontSize: s,
|
|
1092
|
+
className: t.dot,
|
|
1093
|
+
ownerState: n
|
|
1094
|
+
})]
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
1098
|
+
/**
|
|
1099
|
+
* If `true`, the component is checked.
|
|
1100
|
+
*/
|
|
1101
|
+
checked: e.bool,
|
|
1102
|
+
/**
|
|
1103
|
+
* Override or extend the styles applied to the component.
|
|
1104
|
+
* See [CSS API](#css) below for more details.
|
|
1105
|
+
*/
|
|
1106
|
+
classes: e.object,
|
|
1107
|
+
/**
|
|
1108
|
+
* The size of the component.
|
|
1109
|
+
* `small` is equivalent to the dense radio styling.
|
|
1110
|
+
*/
|
|
1111
|
+
fontSize: e.oneOf(["small", "medium"])
|
|
1112
|
+
});
|
|
1113
|
+
const Re = /* @__PURE__ */ x.createContext(void 0);
|
|
1114
|
+
process.env.NODE_ENV !== "production" && (Re.displayName = "RadioGroupContext");
|
|
1115
|
+
const $e = Re;
|
|
1116
|
+
function er() {
|
|
1117
|
+
return x.useContext($e);
|
|
1118
|
+
}
|
|
1119
|
+
function or(o) {
|
|
1120
|
+
return U("MuiRadio", o);
|
|
1121
|
+
}
|
|
1122
|
+
const rr = z("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), fe = rr, ar = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"], tr = (o) => {
|
|
1123
|
+
const {
|
|
1124
|
+
classes: r,
|
|
1125
|
+
color: t,
|
|
1126
|
+
size: s
|
|
1127
|
+
} = o, n = {
|
|
1128
|
+
root: ["root", `color${w(t)}`, s !== "medium" && `size${w(s)}`]
|
|
1129
|
+
};
|
|
1130
|
+
return f({}, r, _(n, or, r));
|
|
1131
|
+
}, sr = P(Co, {
|
|
1132
|
+
shouldForwardProp: (o) => ve(o) || o === "classes",
|
|
1133
|
+
name: "MuiRadio",
|
|
1134
|
+
slot: "Root",
|
|
1135
|
+
overridesResolver: (o, r) => {
|
|
1136
|
+
const {
|
|
1137
|
+
ownerState: t
|
|
1138
|
+
} = o;
|
|
1139
|
+
return [r.root, r[`color${w(t.color)}`]];
|
|
1140
|
+
}
|
|
1141
|
+
})(({
|
|
1142
|
+
theme: o,
|
|
1143
|
+
ownerState: r
|
|
1144
|
+
}) => f({
|
|
1145
|
+
color: (o.vars || o).palette.text.secondary
|
|
1146
|
+
}, !r.disableRipple && {
|
|
1147
|
+
"&:hover": {
|
|
1148
|
+
backgroundColor: o.vars ? `rgba(${r.color === "default" ? o.vars.palette.action.activeChannel : o.vars.palette[r.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : W(r.color === "default" ? o.palette.action.active : o.palette[r.color].main, o.palette.action.hoverOpacity),
|
|
1149
|
+
// Reset on touch devices, it doesn't add specificity
|
|
1150
|
+
"@media (hover: none)": {
|
|
1151
|
+
backgroundColor: "transparent"
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}, r.color !== "default" && {
|
|
1155
|
+
[`&.${fe.checked}`]: {
|
|
1156
|
+
color: (o.vars || o).palette[r.color].main
|
|
1157
|
+
}
|
|
1158
|
+
}, {
|
|
1159
|
+
[`&.${fe.disabled}`]: {
|
|
1160
|
+
color: (o.vars || o).palette.action.disabled
|
|
1161
|
+
}
|
|
1162
|
+
}));
|
|
1163
|
+
function nr(o, r) {
|
|
1164
|
+
return typeof r == "object" && r !== null ? o === r : String(o) === String(r);
|
|
1165
|
+
}
|
|
1166
|
+
const be = /* @__PURE__ */ c(ee, {
|
|
1167
|
+
checked: !0
|
|
1168
|
+
}), me = /* @__PURE__ */ c(ee, {}), je = /* @__PURE__ */ x.forwardRef(function(r, t) {
|
|
1169
|
+
var s, n;
|
|
1170
|
+
const l = G({
|
|
1171
|
+
props: r,
|
|
1172
|
+
name: "MuiRadio"
|
|
1173
|
+
}), {
|
|
1174
|
+
checked: p,
|
|
1175
|
+
checkedIcon: y = be,
|
|
1176
|
+
color: i = "primary",
|
|
1177
|
+
icon: d = me,
|
|
1178
|
+
name: g,
|
|
1179
|
+
onChange: h,
|
|
1180
|
+
size: m = "medium",
|
|
1181
|
+
className: I
|
|
1182
|
+
} = l, a = D(l, ar), v = f({}, l, {
|
|
1183
|
+
color: i,
|
|
1184
|
+
size: m
|
|
1185
|
+
}), b = tr(v), M = er();
|
|
1186
|
+
let N = p;
|
|
1187
|
+
const T = Ve(h, M && M.onChange);
|
|
1188
|
+
let k = g;
|
|
1189
|
+
return M && (typeof N > "u" && (N = nr(M.value, l.value)), typeof k > "u" && (k = M.name)), /* @__PURE__ */ c(sr, f({
|
|
1190
|
+
type: "radio",
|
|
1191
|
+
icon: /* @__PURE__ */ x.cloneElement(d, {
|
|
1192
|
+
fontSize: (s = me.props.fontSize) != null ? s : m
|
|
1193
|
+
}),
|
|
1194
|
+
checkedIcon: /* @__PURE__ */ x.cloneElement(y, {
|
|
1195
|
+
fontSize: (n = be.props.fontSize) != null ? n : m
|
|
1196
|
+
}),
|
|
1197
|
+
ownerState: v,
|
|
1198
|
+
classes: b,
|
|
1199
|
+
name: k,
|
|
1200
|
+
checked: N,
|
|
1201
|
+
onChange: T,
|
|
1202
|
+
ref: t,
|
|
1203
|
+
className: E(b.root, I)
|
|
1204
|
+
}, a));
|
|
1205
|
+
});
|
|
1206
|
+
process.env.NODE_ENV !== "production" && (je.propTypes = {
|
|
1207
|
+
// ----------------------------- Warning --------------------------------
|
|
1208
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1209
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
1210
|
+
// ----------------------------------------------------------------------
|
|
1211
|
+
/**
|
|
1212
|
+
* If `true`, the component is checked.
|
|
1213
|
+
*/
|
|
1214
|
+
checked: e.bool,
|
|
1215
|
+
/**
|
|
1216
|
+
* The icon to display when the component is checked.
|
|
1217
|
+
* @default <RadioButtonIcon checked />
|
|
1218
|
+
*/
|
|
1219
|
+
checkedIcon: e.node,
|
|
1220
|
+
/**
|
|
1221
|
+
* Override or extend the styles applied to the component.
|
|
1222
|
+
*/
|
|
1223
|
+
classes: e.object,
|
|
1224
|
+
/**
|
|
1225
|
+
* @ignore
|
|
1226
|
+
*/
|
|
1227
|
+
className: e.string,
|
|
1228
|
+
/**
|
|
1229
|
+
* The color of the component.
|
|
1230
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
1231
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
1232
|
+
* @default 'primary'
|
|
1233
|
+
*/
|
|
1234
|
+
color: e.oneOfType([e.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
|
|
1235
|
+
/**
|
|
1236
|
+
* If `true`, the component is disabled.
|
|
1237
|
+
*/
|
|
1238
|
+
disabled: e.bool,
|
|
1239
|
+
/**
|
|
1240
|
+
* If `true`, the ripple effect is disabled.
|
|
1241
|
+
* @default false
|
|
1242
|
+
*/
|
|
1243
|
+
disableRipple: e.bool,
|
|
1244
|
+
/**
|
|
1245
|
+
* The icon to display when the component is unchecked.
|
|
1246
|
+
* @default <RadioButtonIcon />
|
|
1247
|
+
*/
|
|
1248
|
+
icon: e.node,
|
|
1249
|
+
/**
|
|
1250
|
+
* The id of the `input` element.
|
|
1251
|
+
*/
|
|
1252
|
+
id: e.string,
|
|
1253
|
+
/**
|
|
1254
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
1255
|
+
*/
|
|
1256
|
+
inputProps: e.object,
|
|
1257
|
+
/**
|
|
1258
|
+
* Pass a ref to the `input` element.
|
|
1259
|
+
*/
|
|
1260
|
+
inputRef: A,
|
|
1261
|
+
/**
|
|
1262
|
+
* Name attribute of the `input` element.
|
|
1263
|
+
*/
|
|
1264
|
+
name: e.string,
|
|
1265
|
+
/**
|
|
1266
|
+
* Callback fired when the state is changed.
|
|
1267
|
+
*
|
|
1268
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
1269
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
1270
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
1271
|
+
*/
|
|
1272
|
+
onChange: e.func,
|
|
1273
|
+
/**
|
|
1274
|
+
* If `true`, the `input` element is required.
|
|
1275
|
+
* @default false
|
|
1276
|
+
*/
|
|
1277
|
+
required: e.bool,
|
|
1278
|
+
/**
|
|
1279
|
+
* The size of the component.
|
|
1280
|
+
* `small` is equivalent to the dense radio styling.
|
|
1281
|
+
* @default 'medium'
|
|
1282
|
+
*/
|
|
1283
|
+
size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
|
|
1284
|
+
/**
|
|
1285
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1286
|
+
*/
|
|
1287
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
1288
|
+
/**
|
|
1289
|
+
* The value of the component. The DOM API casts this to a string.
|
|
1290
|
+
*/
|
|
1291
|
+
value: e.any
|
|
378
1292
|
});
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
|
|
1293
|
+
const lr = je, cr = ["actions", "children", "defaultValue", "name", "onChange", "value"], Pe = /* @__PURE__ */ x.forwardRef(function(r, t) {
|
|
1294
|
+
const {
|
|
1295
|
+
// private
|
|
1296
|
+
// eslint-disable-next-line react/prop-types
|
|
1297
|
+
actions: s,
|
|
1298
|
+
children: n,
|
|
1299
|
+
defaultValue: l,
|
|
1300
|
+
name: p,
|
|
1301
|
+
onChange: y,
|
|
1302
|
+
value: i
|
|
1303
|
+
} = r, d = D(r, cr), g = x.useRef(null), [h, m] = ge({
|
|
1304
|
+
controlled: i,
|
|
1305
|
+
default: l,
|
|
1306
|
+
name: "RadioGroup"
|
|
1307
|
+
});
|
|
1308
|
+
x.useImperativeHandle(s, () => ({
|
|
1309
|
+
focus: () => {
|
|
1310
|
+
let b = g.current.querySelector("input:not(:disabled):checked");
|
|
1311
|
+
b || (b = g.current.querySelector("input:not(:disabled)")), b && b.focus();
|
|
1312
|
+
}
|
|
1313
|
+
}), []);
|
|
1314
|
+
const I = ye(t, g), a = Ue(p), v = x.useMemo(() => ({
|
|
1315
|
+
name: a,
|
|
1316
|
+
onChange(b) {
|
|
1317
|
+
m(b.target.value), y && y(b, b.target.value);
|
|
1318
|
+
},
|
|
1319
|
+
value: h
|
|
1320
|
+
}), [a, y, m, h]);
|
|
1321
|
+
return /* @__PURE__ */ c($e.Provider, {
|
|
1322
|
+
value: v,
|
|
1323
|
+
children: /* @__PURE__ */ c(Lo, f({
|
|
1324
|
+
role: "radiogroup",
|
|
1325
|
+
ref: I
|
|
1326
|
+
}, d, {
|
|
1327
|
+
children: n
|
|
1328
|
+
}))
|
|
1329
|
+
});
|
|
1330
|
+
});
|
|
1331
|
+
process.env.NODE_ENV !== "production" && (Pe.propTypes = {
|
|
1332
|
+
// ----------------------------- Warning --------------------------------
|
|
1333
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1334
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
1335
|
+
// ----------------------------------------------------------------------
|
|
1336
|
+
/**
|
|
1337
|
+
* The content of the component.
|
|
1338
|
+
*/
|
|
1339
|
+
children: e.node,
|
|
1340
|
+
/**
|
|
1341
|
+
* The default value. Use when the component is not controlled.
|
|
1342
|
+
*/
|
|
1343
|
+
defaultValue: e.any,
|
|
1344
|
+
/**
|
|
1345
|
+
* The name used to reference the value of the control.
|
|
1346
|
+
* If you don't provide this prop, it falls back to a randomly generated name.
|
|
1347
|
+
*/
|
|
1348
|
+
name: e.string,
|
|
1349
|
+
/**
|
|
1350
|
+
* Callback fired when a radio button is selected.
|
|
1351
|
+
*
|
|
1352
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
1353
|
+
* @param {string} value The value of the selected radio button.
|
|
1354
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
1355
|
+
*/
|
|
1356
|
+
onChange: e.func,
|
|
1357
|
+
/**
|
|
1358
|
+
* Value of the selected radio button. The DOM API casts this to a string.
|
|
1359
|
+
*/
|
|
1360
|
+
value: e.any
|
|
1361
|
+
});
|
|
1362
|
+
const ir = Pe;
|
|
1363
|
+
var oe = {}, dr = Ge;
|
|
1364
|
+
Object.defineProperty(oe, "__esModule", {
|
|
382
1365
|
value: !0
|
|
383
1366
|
});
|
|
384
|
-
var
|
|
1367
|
+
var Se = oe.default = void 0, ur = dr(_e()), pr = ze, fr = (0, ur.default)(/* @__PURE__ */ (0, pr.jsx)("path", {
|
|
385
1368
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
|
|
386
1369
|
}), "Error");
|
|
387
|
-
|
|
388
|
-
const
|
|
389
|
-
name:
|
|
390
|
-
label:
|
|
391
|
-
type:
|
|
392
|
-
value:
|
|
393
|
-
handleChange:
|
|
394
|
-
placeholder:
|
|
395
|
-
required:
|
|
396
|
-
disabled:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
autofocus: C
|
|
1370
|
+
Se = oe.default = fr;
|
|
1371
|
+
const br = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNiAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjg3NzggMy4yNTUzOUMxNC4yODc1IDIuODM3MzkgMTQuOTYwNiAyLjgzNzM5IDE1LjM3MDMgMy4yNTUzOUMxNS43NzggMy42NjczOSAxNS43ODM3IDQuMzMzMDkgMTUuMzg0NSA0Ljc1MjE5TDYuOTU1NjMgMTQuNzE2M0M2LjU1MTYzIDE1LjE2IDUuODU3OTIgMTUuMTczIDUuNDM3NTIgMTQuNzQ0OEwwLjMwODYyNSA5LjU0NzQ5Qy0wLjEwMjg3NSA5LjEyNzg5IC0wLjEwMjg3NSA4LjQ1NjA5IDAuMzA4NjI1IDguMDM2NDlDMC43MTgzMjUgNy42MTg0OSAxLjM5MTQyIDcuNjE4NDkgMS44MDExMiA4LjAzNjQ5TDYuMTUxNzIgMTIuNDQ1NUwxMy44NDkzIDMuMjg2NzlMMTMuODc3OCAzLjI1NTM5WiIgZmlsbD0iIzE2MjMyNCIvPgo8L3N2Zz4K", $r = ({
|
|
1372
|
+
name: o,
|
|
1373
|
+
label: r,
|
|
1374
|
+
type: t,
|
|
1375
|
+
value: s,
|
|
1376
|
+
handleChange: n,
|
|
1377
|
+
placeholder: l,
|
|
1378
|
+
required: p,
|
|
1379
|
+
disabled: y,
|
|
1380
|
+
options: i,
|
|
1381
|
+
optionsResponseHandler: d,
|
|
1382
|
+
api_endpoint: g,
|
|
1383
|
+
error: h,
|
|
1384
|
+
helperText: m,
|
|
1385
|
+
autofocus: I,
|
|
1386
|
+
inputAdornments: a
|
|
405
1387
|
}) => {
|
|
406
|
-
const [
|
|
407
|
-
function
|
|
408
|
-
|
|
1388
|
+
const [v, b] = qe([]);
|
|
1389
|
+
function M(u) {
|
|
1390
|
+
n(o, u.target.value);
|
|
409
1391
|
}
|
|
410
|
-
const
|
|
411
|
-
var
|
|
412
|
-
return
|
|
413
|
-
name:
|
|
414
|
-
value:
|
|
1392
|
+
const N = Qe(async () => {
|
|
1393
|
+
var u;
|
|
1394
|
+
return t !== "select" ? [] : i || (g && d ? (u = (await (await fetch(g)).json())[d.key]) == null ? void 0 : u.map(($) => ({
|
|
1395
|
+
name: $[d.name],
|
|
1396
|
+
value: $[d.value]
|
|
415
1397
|
})) : []);
|
|
416
|
-
}, [
|
|
417
|
-
|
|
418
|
-
|
|
1398
|
+
}, [t, d, g]);
|
|
1399
|
+
We(() => {
|
|
1400
|
+
N().then((u) => b(u));
|
|
419
1401
|
}, []);
|
|
420
1402
|
let T = {
|
|
421
|
-
...
|
|
422
|
-
backgroundColor:
|
|
1403
|
+
...O.textfield,
|
|
1404
|
+
backgroundColor: h ? K.redLight : "transparent",
|
|
423
1405
|
"& input::placeholder": {
|
|
424
|
-
color:
|
|
1406
|
+
color: h ? K.redMedium : "grey"
|
|
425
1407
|
}
|
|
426
1408
|
};
|
|
427
|
-
const
|
|
1409
|
+
const k = {
|
|
428
1410
|
"& .MuiSelect-select > span::before": {
|
|
429
|
-
content: `'${
|
|
430
|
-
color:
|
|
1411
|
+
content: `'${l || ""}'`,
|
|
1412
|
+
color: h ? "rgba(254, 64, 76, 0.4)" : "rgba(153, 153, 153, 0.6)"
|
|
431
1413
|
}
|
|
432
1414
|
};
|
|
433
|
-
return
|
|
1415
|
+
return t === "select" && (T = {
|
|
434
1416
|
...T,
|
|
435
|
-
...
|
|
436
|
-
}),
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
-
|
|
439
|
-
|
|
1417
|
+
...k
|
|
1418
|
+
}), t !== "custom" ? t === "radio" ? /* @__PURE__ */ j(L, { sx: O.formInputWrapper, children: [
|
|
1419
|
+
/* @__PURE__ */ j(L, { sx: O.labelAdornmentBox, children: [
|
|
1420
|
+
(a == null ? void 0 : a.beforeLabel) && /* @__PURE__ */ c(L, { children: typeof (a == null ? void 0 : a.beforeLabel) == "string" ? /* @__PURE__ */ c(V, { sx: O.label, children: a == null ? void 0 : a.beforeLabel }) : a == null ? void 0 : a.beforeLabel }),
|
|
1421
|
+
/* @__PURE__ */ c("label", { htmlFor: `form-input-${o}`, children: /* @__PURE__ */ c(V, { sx: O.label, children: `${r} ${p ? "*" : ""}` }) }),
|
|
1422
|
+
(a == null ? void 0 : a.afterLabel) && /* @__PURE__ */ c(L, { children: typeof (a == null ? void 0 : a.afterLabel) == "string" ? /* @__PURE__ */ c(V, { sx: O.label, children: a == null ? void 0 : a.afterLabel }) : a == null ? void 0 : a.afterLabel })
|
|
1423
|
+
] }),
|
|
1424
|
+
/* @__PURE__ */ c(
|
|
1425
|
+
ir,
|
|
1426
|
+
{
|
|
1427
|
+
row: !0,
|
|
1428
|
+
name: "row-radio-buttons-group",
|
|
1429
|
+
value: s,
|
|
1430
|
+
onChange: M,
|
|
1431
|
+
children: i == null ? void 0 : i.map((u) => {
|
|
1432
|
+
const C = typeof u == "object";
|
|
1433
|
+
return /* @__PURE__ */ c(
|
|
1434
|
+
Ro,
|
|
1435
|
+
{
|
|
1436
|
+
value: C ? u.value : u,
|
|
1437
|
+
control: /* @__PURE__ */ c(lr, {}),
|
|
1438
|
+
label: C ? u.name : u,
|
|
1439
|
+
sx: O.label
|
|
1440
|
+
},
|
|
1441
|
+
C ? u.name : u
|
|
1442
|
+
);
|
|
1443
|
+
})
|
|
1444
|
+
}
|
|
1445
|
+
)
|
|
1446
|
+
] }) : /* @__PURE__ */ j(L, { sx: O.formInputWrapper, children: [
|
|
1447
|
+
/* @__PURE__ */ j(L, { sx: O.labelAdornmentBox, children: [
|
|
1448
|
+
(a == null ? void 0 : a.beforeLabel) && /* @__PURE__ */ c(L, { children: typeof (a == null ? void 0 : a.beforeLabel) == "string" ? /* @__PURE__ */ c(V, { sx: O.label, children: a == null ? void 0 : a.beforeLabel }) : a == null ? void 0 : a.beforeLabel }),
|
|
1449
|
+
/* @__PURE__ */ c("label", { htmlFor: `form-input-${o}`, children: /* @__PURE__ */ c(V, { sx: O.label, children: `${r} ${p ? "*" : ""}` }) }),
|
|
1450
|
+
(a == null ? void 0 : a.afterLabel) && /* @__PURE__ */ c(L, { children: typeof (a == null ? void 0 : a.afterLabel) == "string" ? /* @__PURE__ */ c(V, { sx: O.label, children: a == null ? void 0 : a.afterLabel }) : a == null ? void 0 : a.afterLabel })
|
|
1451
|
+
] }),
|
|
1452
|
+
/* @__PURE__ */ c(L, { sx: O.textfieldWrapper, children: /* @__PURE__ */ c(
|
|
1453
|
+
Ze,
|
|
440
1454
|
{
|
|
441
|
-
title:
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
|
|
1455
|
+
title: m && /* @__PURE__ */ j(V, { type: "subtitleSmall", textColor: "white", children: [
|
|
1456
|
+
/* @__PURE__ */ c(Se, { sx: O.errorIcon }),
|
|
1457
|
+
m
|
|
444
1458
|
] }),
|
|
445
1459
|
placement: "bottom",
|
|
446
1460
|
arrow: !0,
|
|
447
1461
|
componentsProps: {
|
|
448
1462
|
tooltip: {
|
|
449
|
-
sx:
|
|
1463
|
+
sx: O.tooltip
|
|
450
1464
|
},
|
|
451
1465
|
popper: {
|
|
452
|
-
sx:
|
|
1466
|
+
sx: O.tooltipPopper
|
|
453
1467
|
}
|
|
454
1468
|
},
|
|
455
|
-
children: /* @__PURE__ */
|
|
456
|
-
|
|
1469
|
+
children: /* @__PURE__ */ c(
|
|
1470
|
+
ro,
|
|
457
1471
|
{
|
|
458
|
-
id: `form-input-${
|
|
459
|
-
autoFocus:
|
|
460
|
-
name:
|
|
461
|
-
type:
|
|
462
|
-
select:
|
|
463
|
-
value:
|
|
464
|
-
onChange:
|
|
465
|
-
placeholder:
|
|
466
|
-
required:
|
|
467
|
-
disabled:
|
|
468
|
-
error:
|
|
1472
|
+
id: `form-input-${o}`,
|
|
1473
|
+
autoFocus: I,
|
|
1474
|
+
name: o,
|
|
1475
|
+
type: t,
|
|
1476
|
+
select: t === "select",
|
|
1477
|
+
value: s,
|
|
1478
|
+
onChange: M,
|
|
1479
|
+
placeholder: l,
|
|
1480
|
+
required: p,
|
|
1481
|
+
disabled: y,
|
|
1482
|
+
error: h,
|
|
469
1483
|
InputProps: {
|
|
470
|
-
startAdornment: /* @__PURE__ */
|
|
471
|
-
endAdornment: /* @__PURE__ */
|
|
1484
|
+
startAdornment: /* @__PURE__ */ c(de, { position: "start", children: a == null ? void 0 : a.beforeInput }),
|
|
1485
|
+
endAdornment: /* @__PURE__ */ c(de, { position: "end", children: a == null ? void 0 : a.afterInput })
|
|
472
1486
|
},
|
|
473
1487
|
SelectProps: {
|
|
474
|
-
renderValue: (
|
|
475
|
-
const
|
|
476
|
-
(
|
|
1488
|
+
renderValue: (u) => {
|
|
1489
|
+
const C = v == null ? void 0 : v.find(
|
|
1490
|
+
(R) => typeof R == "object" ? R.value === u : R === u
|
|
477
1491
|
);
|
|
478
|
-
return typeof
|
|
1492
|
+
return typeof C == "object" ? C.name : C;
|
|
479
1493
|
},
|
|
480
1494
|
MenuProps: {
|
|
481
1495
|
PaperProps: {
|
|
482
|
-
sx:
|
|
1496
|
+
sx: O.selectDropdown
|
|
483
1497
|
}
|
|
484
1498
|
}
|
|
485
1499
|
},
|
|
486
1500
|
sx: T,
|
|
487
|
-
children:
|
|
488
|
-
const
|
|
1501
|
+
children: t === "select" && (v == null ? void 0 : v.map((u) => {
|
|
1502
|
+
const C = typeof u == "object", R = C ? u.value === s : u === s, $ = {
|
|
489
1503
|
display: "flex",
|
|
490
1504
|
justifyContent: "space-between",
|
|
491
1505
|
alignItems: "center",
|
|
492
|
-
color:
|
|
1506
|
+
color: R ? "black" : K.darkGrey,
|
|
493
1507
|
gap: "1rem"
|
|
494
1508
|
};
|
|
495
|
-
return /* @__PURE__ */
|
|
496
|
-
|
|
1509
|
+
return /* @__PURE__ */ j(
|
|
1510
|
+
Ho,
|
|
497
1511
|
{
|
|
498
|
-
value:
|
|
499
|
-
sx:
|
|
1512
|
+
value: C ? u.value : u,
|
|
1513
|
+
sx: $,
|
|
500
1514
|
children: [
|
|
501
|
-
|
|
502
|
-
|
|
1515
|
+
C ? u.name : u,
|
|
1516
|
+
R && /* @__PURE__ */ c("img", { src: br, alt: "selected-option" })
|
|
503
1517
|
]
|
|
504
1518
|
},
|
|
505
|
-
|
|
1519
|
+
C ? u.name : u
|
|
506
1520
|
);
|
|
507
1521
|
}))
|
|
508
1522
|
}
|
|
509
1523
|
)
|
|
510
1524
|
}
|
|
511
1525
|
) })
|
|
512
|
-
] }) : /* @__PURE__ */
|
|
1526
|
+
] }) : /* @__PURE__ */ c(Be, {});
|
|
513
1527
|
};
|
|
514
1528
|
export {
|
|
515
|
-
|
|
1529
|
+
$r as default
|
|
516
1530
|
};
|