@fangzsx/component-library 0.0.41 → 0.0.43
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/components/AppBarPublic/index.js +25 -22
- package/dist/components/CheckboxGroup/index.d.ts +2 -1
- package/dist/components/CheckboxGroup/index.js +26 -24
- package/dist/components/TextFieldInput/index.d.ts +2 -1
- package/dist/components/TextFieldInput/index.js +112 -110
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as j } from "../../createSvgIcon-C0YrvByi.js";
|
|
3
3
|
import { Stack as w, Popper as $, ClickAwayListener as D, Paper as U } from "@mui/material";
|
|
4
4
|
import * as C from "react";
|
|
5
5
|
import { useState as Z } from "react";
|
|
6
6
|
import { C as G, B as b } from "../../index-D9x5yU0s.js";
|
|
7
7
|
import { g as V, a as A, c as l, P as r } from "../../generateUtilityClasses-BCID9NF1.js";
|
|
8
|
-
import { u as H, s as B, c as
|
|
8
|
+
import { u as H, s as B, c as h, a as T, m as v } from "../../DefaultPropsProvider-DVX_ssOt.js";
|
|
9
9
|
import { c as I, a as F } from "../../useTimeout-UzNJH-cm.js";
|
|
10
10
|
import { P as W } from "../../Paper-Cz0ZdEav.js";
|
|
11
11
|
import { u as _ } from "../../useId-CK6Kn3Tn.js";
|
|
12
12
|
import { B as q } from "../../ButtonBase-CSQZHD_g.js";
|
|
13
13
|
import { B as Y } from "../../Box-DPlM16yK.js";
|
|
14
|
-
const J =
|
|
14
|
+
const J = j(/* @__PURE__ */ n("path", {
|
|
15
15
|
d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"
|
|
16
16
|
}), "Menu");
|
|
17
17
|
function K(o) {
|
|
@@ -26,7 +26,7 @@ const Q = (o) => {
|
|
|
26
26
|
} = o, s = {
|
|
27
27
|
root: ["root", `color${l(e)}`, `position${l(a)}`]
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return T(s, K, t);
|
|
30
30
|
}, L = (o, e) => o ? `${o?.replace(")", "")}, ${e})` : e, X = B(W, {
|
|
31
31
|
name: "MuiAppBar",
|
|
32
32
|
slot: "Root",
|
|
@@ -175,7 +175,7 @@ const Q = (o) => {
|
|
|
175
175
|
component: "header",
|
|
176
176
|
ownerState: d,
|
|
177
177
|
elevation: 4,
|
|
178
|
-
className:
|
|
178
|
+
className: h(g.root, s, i === "fixed" && "mui-fixed"),
|
|
179
179
|
ref: a,
|
|
180
180
|
...u
|
|
181
181
|
});
|
|
@@ -248,7 +248,7 @@ const R = A("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
248
248
|
loadingIndicator: ["loadingIndicator"],
|
|
249
249
|
loadingWrapper: ["loadingWrapper"]
|
|
250
250
|
};
|
|
251
|
-
return
|
|
251
|
+
return T(i, o2, e);
|
|
252
252
|
}, e2 = B(q, {
|
|
253
253
|
name: "MuiIconButton",
|
|
254
254
|
slot: "Root",
|
|
@@ -396,13 +396,13 @@ const R = A("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
396
396
|
size: g = "medium",
|
|
397
397
|
id: z,
|
|
398
398
|
loading: f = null,
|
|
399
|
-
loadingIndicator:
|
|
400
|
-
...
|
|
401
|
-
} = t, O = _(z), S =
|
|
399
|
+
loadingIndicator: E,
|
|
400
|
+
...P
|
|
401
|
+
} = t, O = _(z), S = E ?? /* @__PURE__ */ n(G, {
|
|
402
402
|
"aria-labelledby": O,
|
|
403
403
|
color: "inherit",
|
|
404
404
|
size: 16
|
|
405
|
-
}),
|
|
405
|
+
}), x = {
|
|
406
406
|
...t,
|
|
407
407
|
edge: s,
|
|
408
408
|
color: i,
|
|
@@ -411,25 +411,25 @@ const R = A("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
411
411
|
loading: f,
|
|
412
412
|
loadingIndicator: S,
|
|
413
413
|
size: g
|
|
414
|
-
},
|
|
414
|
+
}, m = r2(x);
|
|
415
415
|
return /* @__PURE__ */ y(e2, {
|
|
416
416
|
id: f ? O : z,
|
|
417
|
-
className:
|
|
417
|
+
className: h(m.root, c),
|
|
418
418
|
centerRipple: !0,
|
|
419
419
|
focusRipple: !d,
|
|
420
420
|
disabled: u || f,
|
|
421
421
|
ref: a,
|
|
422
|
-
...
|
|
423
|
-
ownerState:
|
|
422
|
+
...P,
|
|
423
|
+
ownerState: x,
|
|
424
424
|
children: [typeof f == "boolean" && // use plain HTML span to minimize the runtime overhead
|
|
425
425
|
/* @__PURE__ */ n("span", {
|
|
426
|
-
className:
|
|
426
|
+
className: m.loadingWrapper,
|
|
427
427
|
style: {
|
|
428
428
|
display: "contents"
|
|
429
429
|
},
|
|
430
430
|
children: /* @__PURE__ */ n(a2, {
|
|
431
|
-
className:
|
|
432
|
-
ownerState:
|
|
431
|
+
className: m.loadingIndicator,
|
|
432
|
+
ownerState: x,
|
|
433
433
|
children: f && S
|
|
434
434
|
})
|
|
435
435
|
}), p]
|
|
@@ -524,7 +524,7 @@ const n2 = (o) => {
|
|
|
524
524
|
disableGutters: a,
|
|
525
525
|
variant: t
|
|
526
526
|
} = o;
|
|
527
|
-
return
|
|
527
|
+
return T({
|
|
528
528
|
root: ["root", !a && "gutters", t]
|
|
529
529
|
}, t2, e);
|
|
530
530
|
}, s2 = B("div", {
|
|
@@ -585,7 +585,7 @@ const n2 = (o) => {
|
|
|
585
585
|
}, g = n2(d);
|
|
586
586
|
return /* @__PURE__ */ n(s2, {
|
|
587
587
|
as: p,
|
|
588
|
-
className:
|
|
588
|
+
className: h(g.root, s),
|
|
589
589
|
ref: a,
|
|
590
590
|
ownerState: d,
|
|
591
591
|
...u
|
|
@@ -630,15 +630,18 @@ process.env.NODE_ENV !== "production" && (N.propTypes = {
|
|
|
630
630
|
variant: r.oneOfType([r.oneOf(["dense", "regular"]), r.string])
|
|
631
631
|
});
|
|
632
632
|
const i2 = "data:image/svg+xml,%3csvg%20width='107'%20height='40'%20viewBox='0%200%20107%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%200V32.1252L3.0277%2033.8762L10.5965%2038.2503L13.6243%2040L16.652%2038.2503L24.2208%2033.8762L27.2485%2032.1261V0H0ZM24.2208%2030.3751L13.6243%2036.5002L3.0277%2030.3751V3.03121H24.2208V30.3751Z'%20fill='%230B6B9F'/%3e%3cpath%20d='M16.6808%2017.1008V10.8984H10.5728C10.5728%2012.1316%209.54697%2013.1315%208.28221%2013.1315V16.1098H10.5728V18.5895H22.7887V29.3101L13.6268%2034.4681L4.46484%2029.3101V22.3121H10.5728V25.7586L13.6226%2027.4759L16.6808%2025.7527V20.8352H4.46484V4.94531H22.7887V17.1008H16.6808Z'%20fill='%2327A4E8'/%3e%3cpath%20d='M46.0749%208.7868C46.0749%208.81752%2046.0749%208.84824%2046.0749%208.87896C46.0749%2011.1917%2046.0749%2013.5044%2046.0749%2015.8172C46.0738%2015.8325%2046.0738%2015.8479%2046.0749%2015.8632C46.0826%2015.9214%2046.0573%2015.9378%2046.0003%2015.9378C44.792%2015.9378%2043.5836%2015.9378%2042.3752%2015.9378C42.3127%2015.9378%2042.2996%2015.9175%2042.2996%2015.8589C42.2996%2014.731%2042.2996%2013.6032%2042.2996%2012.4753C42.2996%2012.3826%2042.2996%2012.3821%2042.2058%2012.3821H40.6888C40.5989%2012.3821%2040.5989%2012.3821%2040.5989%2012.4737V17.7859C40.5989%2017.8743%2040.5988%2017.8743%2040.6904%2017.8743C41.7058%2017.8743%2042.719%2017.8655%2043.7365%2017.877C44.6746%2017.8885%2045.3748%2018.3246%2045.8391%2019.1354C46.0038%2019.4378%2046.0855%2019.7785%2046.076%2020.1228C46.076%2023.0587%2046.076%2025.9946%2046.076%2028.9305C46.0789%2028.974%2046.0617%2029.0165%2046.0294%2029.0457C45.2655%2029.7632%2044.5019%2030.4813%2043.7387%2031.1999C43.7144%2031.2167%2043.6867%2031.2279%2043.6576%2031.2328C43.6394%2031.2353%2043.621%2031.2353%2043.6028%2031.2328H36.8323V24.0664H40.5989V27.5618C40.5989%2027.6557%2040.5988%2027.6557%2040.691%2027.6557C41.2019%2027.6557%2041.7129%2027.6557%2042.2261%2027.6557C42.2908%2027.6557%2042.3056%2027.6359%2042.3056%2027.5739C42.3056%2025.5574%2042.3056%2023.5409%2042.3056%2021.5244C42.3056%2021.4597%2042.2864%2021.4443%2042.2239%2021.4448C41.1997%2021.4448%2040.1756%2021.4498%2039.1536%2021.4448C38.5073%2021.4512%2037.8866%2021.1925%2037.4359%2020.729C37.1138%2020.4131%2036.9071%2019.9981%2036.8487%2019.5507C36.8368%2019.4528%2036.8311%2019.3542%2036.8317%2019.2555C36.8317%2016.5435%2036.8317%2013.8314%2036.8317%2011.1193C36.8273%2011.0738%2036.8441%2011.0289%2036.8773%2010.9975C37.6393%2010.2778%2038.4001%209.55698%2039.1597%208.83508C39.1739%208.81944%2039.1869%208.80275%2039.1986%208.78516L46.0749%208.7868Z'%20fill='%230B6B9F'/%3e%3cpath%20d='M57.369%208.78711C57.369%208.82002%2057.369%208.85294%2057.369%208.8853V12.2864C57.369%2012.3802%2057.369%2012.3802%2057.2769%2012.3802H53.0334C53.0115%2012.3802%2052.989%2012.3802%2052.9676%2012.3802C52.9128%2012.3741%2052.8925%2012.395%2052.8925%2012.4537C52.8925%2014.1301%2052.8925%2015.8065%2052.8925%2017.4829C52.8925%2017.5043%2052.8925%2017.5262%2052.8958%2017.5548H56.5329V21.1275C56.5044%2021.1275%2056.4748%2021.1314%2056.4452%2021.1314H52.9912C52.8925%2021.1314%2052.8925%2021.1314%2052.8925%2021.2323V27.5605C52.8925%2027.6565%2052.8925%2027.6565%2052.9884%2027.6565H57.5977V31.2271C57.5763%2031.2271%2057.5533%2031.2309%2057.5302%2031.2309C54.7524%2031.2309%2051.9745%2031.2309%2049.1967%2031.2309C49.1347%2031.2309%2049.1133%2031.2112%2049.1205%2031.1525C49.1216%2031.1328%2049.1216%2031.113%2049.1205%2031.0932V8.89902C49.1205%208.86171%2049.1205%208.82441%2049.1205%208.7893L57.369%208.78711Z'%20fill='%230B6B9F'/%3e%3cpath%20d='M62.8666%208.78906H69.7501V16.0685H65.9643V12.3898H64.2433V27.653H65.9643V23.9272H69.7501V29.0304L67.3415%2031.2378H60.4883V11.0431L62.8666%208.78906Z'%20fill='%230B6B9F'/%3e%3cpath%20d='M94.9616%208.84635V31.1432C94.9616%2031.2339%2094.9616%2031.2339%2094.8728%2031.2339H94.6875C93.4341%2031.2339%2092.1808%2031.2339%2090.9275%2031.2339H90.8271C90.8075%2031.2348%2090.7878%2031.2314%2090.7696%2031.2238C90.7453%2031.2088%2090.7294%2031.1832%2090.7268%2031.1547C90.5415%2030.3406%2090.3547%2029.5266%2090.1665%2028.7125L89.3326%2025.092C89.0632%2023.9217%2088.794%2022.7515%2088.525%2021.5812C88.5135%2021.5291%2088.4987%2021.4781%2088.4855%2021.4271H88.4685V31.232H84.8149C84.68%2031.232%2084.6938%2031.2534%2084.6938%2031.1092C84.6938%2023.7014%2084.6938%2016.2938%2084.6938%208.8864C84.6938%208.85349%2084.6938%208.82057%2084.6938%208.78766H89.0491C89.0483%208.79422%2089.0483%208.80085%2089.0491%208.80741L89.4455%2010.6067C89.6542%2011.5524%2089.8629%2012.4981%2090.0716%2013.4438C90.2504%2014.2524%2090.4291%2015.0612%2090.6078%2015.8701C90.6612%2016.1104%2090.714%2016.3509%2090.7663%2016.5915L90.9242%2017.3085C90.9823%2017.574%2091.0406%2017.8396%2091.0991%2018.1055C91.1259%2018.2284%2091.1539%2018.3507%2091.1819%2018.4731H91.1983V8.86555C91.1983%208.83922%2091.1983%208.81344%2091.1939%208.78711H94.9572C94.961%208.80686%2094.9616%208.82661%2094.9616%208.84635Z'%20fill='%2327A4E8'/%3e%3cpath%20d='M78.1551%208.76172H81.971C81.971%208.79628%2081.9672%208.83139%2081.9672%208.86649C81.9672%2015.5304%2081.9672%2022.1941%2081.9672%2028.8577C81.9725%2028.9054%2081.9557%2028.9529%2081.9217%2028.9866C81.1596%2029.7118%2080.3977%2030.4377%2079.636%2031.1644C79.6073%2031.1893%2079.5708%2031.2034%2079.5329%2031.2044C77.3267%2031.2066%2075.1205%2031.2066%2072.9143%2031.2044C72.8913%2031.2044%2072.8682%2031.2044%2072.8408%2031.2001V8.87143C72.8408%208.83468%2072.8408%208.79738%2072.8408%208.76172H76.6567C76.6567%208.78531%2076.6523%208.80944%2076.6523%208.83358C76.6523%2015.036%2076.6523%2021.2386%2076.6523%2027.4413C76.6523%2027.5082%2076.6693%2027.5263%2076.7362%2027.5263C77.1748%2027.5231%2077.6178%2027.5263%2078.0586%2027.5263C78.1622%2027.5263%2078.1622%2027.5263%2078.1622%2027.4238C78.1622%2021.2323%2078.1622%2015.0405%2078.1622%208.84839C78.1584%208.81657%2078.1562%208.7886%2078.1551%208.76172Z'%20fill='%2327A4E8'/%3e%3cpath%20d='M100.474%208.76172L98.0066%2011.2302L98%2011.1907V31.2335C99.2526%2031.2313%20100.506%2031.2313%20101.76%2031.2335V24.0666H103.099V31.2335C104.352%2031.2313%20105.605%2031.2313%20106.859%2031.2335V8.76172H100.474ZM101.76%2020.6106V12.2177H103.099V20.6106H101.76Z'%20fill='%2327A4E8'/%3e%3c/svg%3e";
|
|
633
|
-
function
|
|
633
|
+
function x2({ onLogin: o, onSignUp: e }) {
|
|
634
634
|
const [a, t] = Z(null), s = !!a;
|
|
635
635
|
return /* @__PURE__ */ n(
|
|
636
636
|
M,
|
|
637
637
|
{
|
|
638
638
|
position: "sticky",
|
|
639
|
+
elevation: 0,
|
|
639
640
|
sx: {
|
|
640
641
|
top: 0,
|
|
641
|
-
zIndex: 1200
|
|
642
|
+
zIndex: 1200,
|
|
643
|
+
boxShadow: "0px 5px 20px -5px rgba(0, 0, 0, 0.03)",
|
|
644
|
+
borderBottom: "1px solid #E6EAED"
|
|
642
645
|
},
|
|
643
646
|
children: /* @__PURE__ */ y(N, { sx: { backgroundColor: "white", justifyContent: "space-between" }, children: [
|
|
644
647
|
/* @__PURE__ */ n(
|
|
@@ -695,5 +698,5 @@ function m2({ onLogin: o, onSignUp: e }) {
|
|
|
695
698
|
);
|
|
696
699
|
}
|
|
697
700
|
export {
|
|
698
|
-
|
|
701
|
+
x2 as AppBarPublic
|
|
699
702
|
};
|
|
@@ -14,5 +14,6 @@ export interface CheckboxGroupProps {
|
|
|
14
14
|
onChange?: (checkedValues: string[]) => void;
|
|
15
15
|
sx?: any;
|
|
16
16
|
forceError?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
17
18
|
}
|
|
18
|
-
export declare function CheckboxGroup({ options, required, minChecked, maxChecked, errorMessage, helperText, onChange, sx, forceError, }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function CheckboxGroup({ options, required, minChecked, maxChecked, errorMessage, helperText, onChange, sx, forceError, disabled, }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FormControl as
|
|
1
|
+
import { jsxs as G, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { FormControl as I, FormGroup as y, FormControlLabel as B, Checkbox as C, FormHelperText as p } from "@mui/material";
|
|
3
3
|
import { useState as d } from "react";
|
|
4
|
-
function
|
|
4
|
+
function S({
|
|
5
5
|
options: c,
|
|
6
|
-
required:
|
|
6
|
+
required: b = !1,
|
|
7
7
|
minChecked: r,
|
|
8
8
|
maxChecked: o,
|
|
9
9
|
errorMessage: m,
|
|
10
10
|
helperText: i,
|
|
11
11
|
onChange: u,
|
|
12
|
-
sx:
|
|
13
|
-
forceError:
|
|
12
|
+
sx: h,
|
|
13
|
+
forceError: g = !1,
|
|
14
|
+
disabled: f = !1
|
|
14
15
|
}) {
|
|
15
|
-
const [n,
|
|
16
|
+
const [n, F] = d(
|
|
16
17
|
c.reduce((e, t) => ({
|
|
17
18
|
...e,
|
|
18
19
|
[t.name]: t.defaultChecked || !1
|
|
19
20
|
}), {})
|
|
20
|
-
), [
|
|
21
|
-
|
|
21
|
+
), [v, j] = d(!1), L = (e) => {
|
|
22
|
+
j(!0);
|
|
22
23
|
const t = {
|
|
23
24
|
...n,
|
|
24
25
|
[e.target.name]: e.target.checked
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
(
|
|
27
|
+
F(t);
|
|
28
|
+
const $ = Object.keys(t).filter(
|
|
29
|
+
(x) => t[x]
|
|
29
30
|
);
|
|
30
|
-
u && u(
|
|
31
|
-
}, a = Object.values(n).filter(Boolean).length, s =
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
|
|
31
|
+
u && u($);
|
|
32
|
+
}, a = Object.values(n).filter(Boolean).length, s = !f && (g || v && (r !== void 0 && a < r || o !== void 0 && a > o)), M = () => m || (r !== void 0 && a < r ? `Please select at least ${r} option${r > 1 ? "s" : ""}` : o !== void 0 && a > o ? `Please select no more than ${o} option${o > 1 ? "s" : ""}` : "");
|
|
33
|
+
return /* @__PURE__ */ G(
|
|
34
|
+
I,
|
|
34
35
|
{
|
|
35
|
-
required:
|
|
36
|
+
required: b,
|
|
36
37
|
error: s,
|
|
38
|
+
disabled: f,
|
|
37
39
|
component: "fieldset",
|
|
38
40
|
sx: {
|
|
39
41
|
m: 0,
|
|
@@ -47,12 +49,12 @@ function P({
|
|
|
47
49
|
"& .MuiFormControlLabel-label": {
|
|
48
50
|
margin: "0 !important"
|
|
49
51
|
},
|
|
50
|
-
...
|
|
52
|
+
...h
|
|
51
53
|
},
|
|
52
54
|
variant: "standard",
|
|
53
55
|
children: [
|
|
54
|
-
/* @__PURE__ */ l(
|
|
55
|
-
|
|
56
|
+
/* @__PURE__ */ l(y, { children: c.map((e) => /* @__PURE__ */ l(
|
|
57
|
+
B,
|
|
56
58
|
{
|
|
57
59
|
sx: {
|
|
58
60
|
color: "#404A58",
|
|
@@ -61,10 +63,10 @@ function P({
|
|
|
61
63
|
}
|
|
62
64
|
},
|
|
63
65
|
control: /* @__PURE__ */ l(
|
|
64
|
-
|
|
66
|
+
C,
|
|
65
67
|
{
|
|
66
68
|
checked: n[e.name] || !1,
|
|
67
|
-
onChange:
|
|
69
|
+
onChange: L,
|
|
68
70
|
name: e.name,
|
|
69
71
|
color: s ? "error" : "primary"
|
|
70
72
|
}
|
|
@@ -73,11 +75,11 @@ function P({
|
|
|
73
75
|
},
|
|
74
76
|
e.name
|
|
75
77
|
)) }),
|
|
76
|
-
s ? /* @__PURE__ */ l(
|
|
78
|
+
s ? /* @__PURE__ */ l(p, { children: M() }) : i ? /* @__PURE__ */ l(p, { children: i }) : null
|
|
77
79
|
]
|
|
78
80
|
}
|
|
79
81
|
);
|
|
80
82
|
}
|
|
81
83
|
export {
|
|
82
|
-
|
|
84
|
+
S as CheckboxGroup
|
|
83
85
|
};
|
|
@@ -12,5 +12,6 @@ export interface TextFieldInputProps {
|
|
|
12
12
|
rows?: number;
|
|
13
13
|
sx?: any;
|
|
14
14
|
forceError?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
15
16
|
}
|
|
16
|
-
export declare function TextFieldInput({ label, placeholder, required, errorMessage, helperText, variant, onChange, defaultValue, type, multiline, rows, sx, forceError, }: TextFieldInputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function TextFieldInput({ label, placeholder, required, errorMessage, helperText, variant, onChange, defaultValue, type, multiline, rows, sx, forceError, disabled, }: TextFieldInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as b, jsxs as de } from "react/jsx-runtime";
|
|
2
2
|
import * as me from "react";
|
|
3
3
|
import { useState as D } from "react";
|
|
4
4
|
import { g as fe, a as be, P as e } from "../../generateUtilityClasses-BCID9NF1.js";
|
|
5
5
|
import { u as Te, c as he, s as xe, a as ye } from "../../DefaultPropsProvider-DVX_ssOt.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as i } from "../../useSlot-DKccmcQE.js";
|
|
7
7
|
import { u as Pe } from "../../useId-CK6Kn3Tn.js";
|
|
8
8
|
import { O as Ie, F as Fe, I as ge, a as Oe, S as we } from "../../Select-BSsJnv6h.js";
|
|
9
9
|
import { F as Le, a as Se } from "../../FormHelperText-B-xlmRr4.js";
|
|
@@ -18,39 +18,39 @@ const Re = {
|
|
|
18
18
|
outlined: Ie
|
|
19
19
|
}, ve = (s) => {
|
|
20
20
|
const {
|
|
21
|
-
classes:
|
|
21
|
+
classes: a
|
|
22
22
|
} = s;
|
|
23
23
|
return ye({
|
|
24
24
|
root: ["root"]
|
|
25
|
-
}, je,
|
|
25
|
+
}, je, a);
|
|
26
26
|
}, He = xe(Se, {
|
|
27
27
|
name: "MuiTextField",
|
|
28
28
|
slot: "Root"
|
|
29
|
-
})({}), q = /* @__PURE__ */ me.forwardRef(function(
|
|
30
|
-
const
|
|
31
|
-
props:
|
|
29
|
+
})({}), q = /* @__PURE__ */ me.forwardRef(function(a, u) {
|
|
30
|
+
const T = Te({
|
|
31
|
+
props: a,
|
|
32
32
|
name: "MuiTextField"
|
|
33
33
|
}), {
|
|
34
|
-
autoComplete:
|
|
35
|
-
autoFocus:
|
|
36
|
-
children:
|
|
37
|
-
className:
|
|
38
|
-
color:
|
|
39
|
-
defaultValue:
|
|
40
|
-
disabled:
|
|
41
|
-
error:
|
|
42
|
-
FormHelperTextProps:
|
|
34
|
+
autoComplete: O,
|
|
35
|
+
autoFocus: h = !1,
|
|
36
|
+
children: c,
|
|
37
|
+
className: w,
|
|
38
|
+
color: x = "primary",
|
|
39
|
+
defaultValue: d,
|
|
40
|
+
disabled: y = !1,
|
|
41
|
+
error: P = !1,
|
|
42
|
+
FormHelperTextProps: L,
|
|
43
43
|
fullWidth: l = !1,
|
|
44
|
-
helperText:
|
|
45
|
-
id:
|
|
46
|
-
InputLabelProps:
|
|
47
|
-
inputProps:
|
|
48
|
-
InputProps:
|
|
49
|
-
inputRef:
|
|
44
|
+
helperText: p,
|
|
45
|
+
id: S,
|
|
46
|
+
InputLabelProps: C,
|
|
47
|
+
inputProps: j,
|
|
48
|
+
InputProps: R,
|
|
49
|
+
inputRef: v,
|
|
50
50
|
label: t,
|
|
51
|
-
maxRows:
|
|
52
|
-
minRows:
|
|
53
|
-
multiline:
|
|
51
|
+
maxRows: I,
|
|
52
|
+
minRows: H,
|
|
53
|
+
multiline: m = !1,
|
|
54
54
|
name: _,
|
|
55
55
|
onBlur: $,
|
|
56
56
|
onChange: z,
|
|
@@ -58,40 +58,40 @@ const Re = {
|
|
|
58
58
|
placeholder: G,
|
|
59
59
|
required: V = !1,
|
|
60
60
|
rows: J,
|
|
61
|
-
select:
|
|
62
|
-
SelectProps:
|
|
61
|
+
select: F = !1,
|
|
62
|
+
SelectProps: M,
|
|
63
63
|
slots: B = {},
|
|
64
64
|
slotProps: K = {},
|
|
65
65
|
type: Q,
|
|
66
66
|
value: U,
|
|
67
|
-
variant:
|
|
67
|
+
variant: g = "outlined",
|
|
68
68
|
...X
|
|
69
|
-
} =
|
|
70
|
-
...
|
|
71
|
-
autoFocus:
|
|
72
|
-
color:
|
|
73
|
-
disabled:
|
|
74
|
-
error:
|
|
69
|
+
} = T, o = {
|
|
70
|
+
...T,
|
|
71
|
+
autoFocus: h,
|
|
72
|
+
color: x,
|
|
73
|
+
disabled: y,
|
|
74
|
+
error: P,
|
|
75
75
|
fullWidth: l,
|
|
76
|
-
multiline:
|
|
76
|
+
multiline: m,
|
|
77
77
|
required: V,
|
|
78
|
-
select:
|
|
79
|
-
variant:
|
|
78
|
+
select: F,
|
|
79
|
+
variant: g
|
|
80
80
|
}, Y = ve(o);
|
|
81
|
-
process.env.NODE_ENV !== "production" &&
|
|
82
|
-
const n = Pe(
|
|
81
|
+
process.env.NODE_ENV !== "production" && F && !c && console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");
|
|
82
|
+
const n = Pe(S), E = p && n ? `${n}-helper-text` : void 0, k = t && n ? `${n}-label` : void 0, Z = Re[g], r = {
|
|
83
83
|
slots: B,
|
|
84
84
|
slotProps: {
|
|
85
|
-
input:
|
|
86
|
-
inputLabel:
|
|
87
|
-
htmlInput:
|
|
88
|
-
formHelperText:
|
|
89
|
-
select:
|
|
85
|
+
input: R,
|
|
86
|
+
inputLabel: C,
|
|
87
|
+
htmlInput: j,
|
|
88
|
+
formHelperText: L,
|
|
89
|
+
select: M,
|
|
90
90
|
...K
|
|
91
91
|
}
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
const [ee, te] =
|
|
92
|
+
}, f = {}, N = r.slotProps.inputLabel;
|
|
93
|
+
g === "outlined" && (N && typeof N.shrink < "u" && (f.notched = N.shrink), f.label = t), F && ((!M || !M.native) && (f.id = void 0), f["aria-describedby"] = void 0);
|
|
94
|
+
const [ee, te] = i("root", {
|
|
95
95
|
elementType: He,
|
|
96
96
|
shouldForwardComponentProp: !0,
|
|
97
97
|
externalForwardedProps: {
|
|
@@ -99,52 +99,52 @@ const Re = {
|
|
|
99
99
|
...X
|
|
100
100
|
},
|
|
101
101
|
ownerState: o,
|
|
102
|
-
className: he(Y.root,
|
|
103
|
-
ref:
|
|
102
|
+
className: he(Y.root, w),
|
|
103
|
+
ref: u,
|
|
104
104
|
additionalProps: {
|
|
105
|
-
disabled:
|
|
106
|
-
error:
|
|
105
|
+
disabled: y,
|
|
106
|
+
error: P,
|
|
107
107
|
fullWidth: l,
|
|
108
108
|
required: V,
|
|
109
|
-
color:
|
|
110
|
-
variant:
|
|
109
|
+
color: x,
|
|
110
|
+
variant: g
|
|
111
111
|
}
|
|
112
|
-
}), [oe, ne] =
|
|
112
|
+
}), [oe, ne] = i("input", {
|
|
113
113
|
elementType: Z,
|
|
114
114
|
externalForwardedProps: r,
|
|
115
|
-
additionalProps:
|
|
115
|
+
additionalProps: f,
|
|
116
116
|
ownerState: o
|
|
117
|
-
}), [re, se] =
|
|
117
|
+
}), [re, se] = i("inputLabel", {
|
|
118
118
|
elementType: Oe,
|
|
119
119
|
externalForwardedProps: r,
|
|
120
120
|
ownerState: o
|
|
121
|
-
}), [le, pe] =
|
|
121
|
+
}), [le, pe] = i("htmlInput", {
|
|
122
122
|
elementType: "input",
|
|
123
123
|
externalForwardedProps: r,
|
|
124
124
|
ownerState: o
|
|
125
|
-
}), [ie, ae] =
|
|
125
|
+
}), [ie, ae] = i("formHelperText", {
|
|
126
126
|
elementType: Le,
|
|
127
127
|
externalForwardedProps: r,
|
|
128
128
|
ownerState: o
|
|
129
|
-
}), [ue, ce] =
|
|
129
|
+
}), [ue, ce] = i("select", {
|
|
130
130
|
elementType: we,
|
|
131
131
|
externalForwardedProps: r,
|
|
132
132
|
ownerState: o
|
|
133
|
-
}), W = /* @__PURE__ */
|
|
134
|
-
"aria-describedby":
|
|
135
|
-
autoComplete:
|
|
136
|
-
autoFocus:
|
|
137
|
-
defaultValue:
|
|
133
|
+
}), W = /* @__PURE__ */ b(oe, {
|
|
134
|
+
"aria-describedby": E,
|
|
135
|
+
autoComplete: O,
|
|
136
|
+
autoFocus: h,
|
|
137
|
+
defaultValue: d,
|
|
138
138
|
fullWidth: l,
|
|
139
|
-
multiline:
|
|
139
|
+
multiline: m,
|
|
140
140
|
name: _,
|
|
141
141
|
rows: J,
|
|
142
|
-
maxRows:
|
|
143
|
-
minRows:
|
|
142
|
+
maxRows: I,
|
|
143
|
+
minRows: H,
|
|
144
144
|
type: Q,
|
|
145
145
|
value: U,
|
|
146
146
|
id: n,
|
|
147
|
-
inputRef:
|
|
147
|
+
inputRef: v,
|
|
148
148
|
onBlur: $,
|
|
149
149
|
onChange: z,
|
|
150
150
|
onFocus: A,
|
|
@@ -157,23 +157,23 @@ const Re = {
|
|
|
157
157
|
});
|
|
158
158
|
return /* @__PURE__ */ de(ee, {
|
|
159
159
|
...te,
|
|
160
|
-
children: [t != null && t !== "" && /* @__PURE__ */
|
|
160
|
+
children: [t != null && t !== "" && /* @__PURE__ */ b(re, {
|
|
161
161
|
htmlFor: n,
|
|
162
162
|
id: k,
|
|
163
163
|
...se,
|
|
164
164
|
children: t
|
|
165
|
-
}),
|
|
166
|
-
"aria-describedby":
|
|
165
|
+
}), F ? /* @__PURE__ */ b(ue, {
|
|
166
|
+
"aria-describedby": E,
|
|
167
167
|
id: n,
|
|
168
168
|
labelId: k,
|
|
169
169
|
value: U,
|
|
170
170
|
input: W,
|
|
171
171
|
...ce,
|
|
172
|
-
children:
|
|
173
|
-
}) : W,
|
|
174
|
-
id:
|
|
172
|
+
children: c
|
|
173
|
+
}) : W, p && /* @__PURE__ */ b(ie, {
|
|
174
|
+
id: E,
|
|
175
175
|
...ae,
|
|
176
|
-
children:
|
|
176
|
+
children: p
|
|
177
177
|
})]
|
|
178
178
|
});
|
|
179
179
|
});
|
|
@@ -381,46 +381,48 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
|
|
|
381
381
|
});
|
|
382
382
|
function qe({
|
|
383
383
|
label: s,
|
|
384
|
-
placeholder:
|
|
385
|
-
required:
|
|
386
|
-
errorMessage:
|
|
387
|
-
helperText:
|
|
388
|
-
variant:
|
|
389
|
-
onChange:
|
|
390
|
-
defaultValue:
|
|
391
|
-
type:
|
|
392
|
-
multiline:
|
|
393
|
-
rows:
|
|
394
|
-
sx:
|
|
395
|
-
forceError:
|
|
384
|
+
placeholder: a,
|
|
385
|
+
required: u = !1,
|
|
386
|
+
errorMessage: T = "This field is required",
|
|
387
|
+
helperText: O,
|
|
388
|
+
variant: h = "outlined",
|
|
389
|
+
onChange: c,
|
|
390
|
+
defaultValue: w = "",
|
|
391
|
+
type: x = "text",
|
|
392
|
+
multiline: d = !1,
|
|
393
|
+
rows: y,
|
|
394
|
+
sx: P,
|
|
395
|
+
forceError: L = !1,
|
|
396
|
+
disabled: l = !1
|
|
396
397
|
}) {
|
|
397
|
-
const [
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
},
|
|
403
|
-
return /* @__PURE__ */
|
|
398
|
+
const [p, S] = D(w), [C, j] = D(!1), R = (H) => {
|
|
399
|
+
const m = H.target.value;
|
|
400
|
+
S(m), c && c(m);
|
|
401
|
+
}, v = () => {
|
|
402
|
+
j(!0);
|
|
403
|
+
}, t = String(p || "").trim() === "", I = !l && (L || C && u && t);
|
|
404
|
+
return /* @__PURE__ */ b(
|
|
404
405
|
q,
|
|
405
406
|
{
|
|
406
407
|
label: s,
|
|
407
|
-
placeholder:
|
|
408
|
-
value:
|
|
409
|
-
onChange:
|
|
410
|
-
onBlur:
|
|
411
|
-
error:
|
|
412
|
-
helperText:
|
|
413
|
-
variant:
|
|
414
|
-
required:
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
408
|
+
placeholder: a,
|
|
409
|
+
value: p,
|
|
410
|
+
onChange: R,
|
|
411
|
+
onBlur: v,
|
|
412
|
+
error: I,
|
|
413
|
+
helperText: I ? T : O || " ",
|
|
414
|
+
variant: h,
|
|
415
|
+
required: u,
|
|
416
|
+
disabled: l,
|
|
417
|
+
type: x,
|
|
418
|
+
multiline: d,
|
|
419
|
+
rows: y,
|
|
420
|
+
slotProps: {
|
|
421
|
+
inputLabel: { shrink: !0 }
|
|
420
422
|
},
|
|
421
423
|
sx: {
|
|
422
424
|
"& .MuiInputBase-root": {
|
|
423
|
-
height:
|
|
425
|
+
height: d ? "auto" : 40
|
|
424
426
|
},
|
|
425
427
|
"& .MuiInputLabel-root": {
|
|
426
428
|
transform: "translate(14px, -9px) scale(0.75)",
|
|
@@ -429,7 +431,7 @@ function qe({
|
|
|
429
431
|
}
|
|
430
432
|
},
|
|
431
433
|
"& .MuiOutlinedInput-input": {
|
|
432
|
-
padding:
|
|
434
|
+
padding: d ? "8.5px 14px" : "8px 14px"
|
|
433
435
|
},
|
|
434
436
|
"& .MuiFormHelperText-root": {
|
|
435
437
|
marginLeft: 0,
|
|
@@ -439,7 +441,7 @@ function qe({
|
|
|
439
441
|
border: "none !important",
|
|
440
442
|
outline: "none !important"
|
|
441
443
|
},
|
|
442
|
-
...
|
|
444
|
+
...P
|
|
443
445
|
},
|
|
444
446
|
fullWidth: !0
|
|
445
447
|
}
|