@fangzsx/component-library 0.0.40 → 0.0.42
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/CheckboxGroup/index.d.ts +2 -1
- package/dist/components/CheckboxGroup/index.js +26 -24
- package/dist/components/CollapsibleSection/index.d.ts +32 -0
- package/dist/components/CollapsibleSection/index.js +90 -0
- package/dist/components/TextFieldInput/index.d.ts +2 -1
- package/dist/components/TextFieldInput/index.js +112 -110
- package/dist/main.d.ts +1 -0
- package/dist/main.js +30 -28
- package/package.json +1 -1
|
@@ -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
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SectionAction {
|
|
4
|
+
/** Icon element to render */
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
/** Click handler */
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
/** Accessible label for the button */
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
/** Disable the action button */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface CollapsibleSectionProps {
|
|
14
|
+
title: string;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
defaultExpanded?: boolean;
|
|
17
|
+
expanded?: boolean;
|
|
18
|
+
onChange?: (expanded: boolean) => void;
|
|
19
|
+
/** Optional icon displayed before the title */
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
/** One or more action buttons rendered on the right side of the header */
|
|
22
|
+
actions?: SectionAction[];
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
sx?: object;
|
|
25
|
+
}
|
|
26
|
+
export interface LabelValueProps {
|
|
27
|
+
label: string;
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
gutterBottom?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function LabelValue({ label, children, gutterBottom }: LabelValueProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function CollapsibleSection({ title, children, defaultExpanded, expanded: controlledExpanded, onChange, icon, actions, disabled, sx, }: CollapsibleSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I } from "react";
|
|
3
|
+
import { Accordion as A, AccordionSummary as S, Box as d, Typography as s, IconButton as M, AccordionDetails as j } from "@mui/material";
|
|
4
|
+
import { c as k } from "../../createSvgIcon-C0YrvByi.js";
|
|
5
|
+
const w = k(/* @__PURE__ */ e("path", {
|
|
6
|
+
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
7
|
+
}), "ExpandMore");
|
|
8
|
+
function L({ label: i, children: t, gutterBottom: a = !0 }) {
|
|
9
|
+
return /* @__PURE__ */ r(d, { sx: { mb: a ? 2.5 : 0 }, children: [
|
|
10
|
+
/* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, gutterBottom: !0, children: i }),
|
|
11
|
+
typeof t == "string" ? /* @__PURE__ */ e(s, { variant: "body2", color: "text.secondary", children: t }) : t
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
function W({
|
|
15
|
+
title: i,
|
|
16
|
+
children: t,
|
|
17
|
+
defaultExpanded: a = !1,
|
|
18
|
+
expanded: c,
|
|
19
|
+
onChange: f,
|
|
20
|
+
icon: x,
|
|
21
|
+
actions: l,
|
|
22
|
+
disabled: m = !1,
|
|
23
|
+
sx: u
|
|
24
|
+
}) {
|
|
25
|
+
const [b, g] = I(a), p = c !== void 0, h = p ? c : b;
|
|
26
|
+
function y(n, o) {
|
|
27
|
+
p || g(o), f?.(o);
|
|
28
|
+
}
|
|
29
|
+
function v(n, o) {
|
|
30
|
+
n.stopPropagation(), o.onClick();
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ r(
|
|
33
|
+
A,
|
|
34
|
+
{
|
|
35
|
+
expanded: h,
|
|
36
|
+
onChange: y,
|
|
37
|
+
disabled: m,
|
|
38
|
+
disableGutters: !0,
|
|
39
|
+
elevation: 0,
|
|
40
|
+
sx: {
|
|
41
|
+
border: "1px solid",
|
|
42
|
+
borderColor: "divider",
|
|
43
|
+
borderRadius: 2,
|
|
44
|
+
"&::before": { display: "none" },
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
...u
|
|
47
|
+
},
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ r(
|
|
50
|
+
S,
|
|
51
|
+
{
|
|
52
|
+
expandIcon: /* @__PURE__ */ e(w, {}),
|
|
53
|
+
sx: {
|
|
54
|
+
flexDirection: "row-reverse",
|
|
55
|
+
gap: 1,
|
|
56
|
+
"& .MuiAccordionSummary-content": {
|
|
57
|
+
display: "flex",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
justifyContent: "space-between",
|
|
60
|
+
my: 1
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ r(d, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
65
|
+
x,
|
|
66
|
+
/* @__PURE__ */ e(s, { variant: "subtitle1", fontWeight: 500, children: i })
|
|
67
|
+
] }),
|
|
68
|
+
l && l.length > 0 && /* @__PURE__ */ e(d, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: l.map((n, o) => /* @__PURE__ */ e(
|
|
69
|
+
M,
|
|
70
|
+
{
|
|
71
|
+
size: "small",
|
|
72
|
+
disabled: n.disabled,
|
|
73
|
+
onClick: (C) => v(C, n),
|
|
74
|
+
"aria-label": n.ariaLabel ?? `Action ${o + 1}`,
|
|
75
|
+
children: n.icon
|
|
76
|
+
},
|
|
77
|
+
o
|
|
78
|
+
)) })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ e(j, { sx: { pt: 0, px: 4, pb: 3 }, children: t })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
W as CollapsibleSection,
|
|
89
|
+
L as LabelValue
|
|
90
|
+
};
|
|
@@ -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
|
}
|
package/dist/main.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { AppBarPublic } from './components/AppBarPublic';
|
|
|
2
2
|
export { Banner } from './components/Banner';
|
|
3
3
|
export { Button } from './components/Button';
|
|
4
4
|
export { CheckBox } from './components/Checkbox';
|
|
5
|
+
export { CollapsibleSection } from './components/CollapsibleSection';
|
|
5
6
|
export { ScrollableDialog as Dialog } from './components/Dialog';
|
|
6
7
|
export { CheckboxGroup } from './components/CheckboxGroup';
|
|
7
8
|
export { Dropdown } from './components/Dropdown';
|
package/dist/main.js
CHANGED
|
@@ -2,39 +2,41 @@ import { AppBarPublic as e } from "./components/AppBarPublic/index.js";
|
|
|
2
2
|
import { Banner as p } from "./components/Banner/index.js";
|
|
3
3
|
import { B as m } from "./index-D9x5yU0s.js";
|
|
4
4
|
import { CheckBox as a } from "./components/Checkbox/index.js";
|
|
5
|
+
import { CollapsibleSection as l } from "./components/CollapsibleSection/index.js";
|
|
5
6
|
import { ScrollableDialog as d } from "./components/Dialog/index.js";
|
|
6
|
-
import { CheckboxGroup as
|
|
7
|
-
import { Dropdown as
|
|
8
|
-
import { DropdownOptions as
|
|
9
|
-
import { FlatBanner as
|
|
10
|
-
import { ImageUpload as
|
|
11
|
-
import { Label as
|
|
12
|
-
import { LinearProgress as
|
|
13
|
-
import { MediaCardWithAction as
|
|
14
|
-
import { PhoneAndCountryDropdown as
|
|
15
|
-
import { PromoCode as
|
|
16
|
-
import { RadioButtonGroup as
|
|
17
|
-
import { Stepper as
|
|
18
|
-
import { Text as
|
|
19
|
-
import { TextFieldInput as
|
|
7
|
+
import { CheckboxGroup as B } from "./components/CheckboxGroup/index.js";
|
|
8
|
+
import { Dropdown as s } from "./components/Dropdown/index.js";
|
|
9
|
+
import { DropdownOptions as b } from "./components/DropdownOptions/index.js";
|
|
10
|
+
import { FlatBanner as g } from "./components/FlatBanner/index.js";
|
|
11
|
+
import { ImageUpload as P } from "./components/ImageUpload/index.js";
|
|
12
|
+
import { Label as A } from "./components/Label/index.js";
|
|
13
|
+
import { LinearProgress as k } from "./components/LinearProgress/index.js";
|
|
14
|
+
import { MediaCardWithAction as G } from "./components/MediaCardWithAction/index.js";
|
|
15
|
+
import { PhoneAndCountryDropdown as L } from "./components/PhoneAndCountryDropdown/index.js";
|
|
16
|
+
import { PromoCode as y } from "./components/PromoCode/index.js";
|
|
17
|
+
import { RadioButtonGroup as O } from "./components/RadioButtonGroup/index.js";
|
|
18
|
+
import { Stepper as U } from "./components/Stepper/index.js";
|
|
19
|
+
import { Text as j } from "./components/Text/index.js";
|
|
20
|
+
import { TextFieldInput as v } from "./components/TextFieldInput/index.js";
|
|
20
21
|
export {
|
|
21
22
|
e as AppBarPublic,
|
|
22
23
|
p as Banner,
|
|
23
24
|
m as Button,
|
|
24
25
|
a as CheckBox,
|
|
25
|
-
|
|
26
|
+
B as CheckboxGroup,
|
|
27
|
+
l as CollapsibleSection,
|
|
26
28
|
d as Dialog,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
s as Dropdown,
|
|
30
|
+
b as DropdownOptions,
|
|
31
|
+
g as FlatBanner,
|
|
32
|
+
P as ImageUpload,
|
|
33
|
+
A as Label,
|
|
34
|
+
k as LinearProgress,
|
|
35
|
+
G as MediaCardWithAction,
|
|
36
|
+
L as PhoneAndCountryDropdown,
|
|
37
|
+
y as PromoCode,
|
|
38
|
+
O as RadioButtonGroup,
|
|
39
|
+
U as Stepper,
|
|
40
|
+
j as Text,
|
|
41
|
+
v as TextFieldInput
|
|
40
42
|
};
|