@pismo/marola 1.0.0-beta.4 → 1.0.0-beta.40
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/{Button-2b1peDFT.js → Button-BAljjMv3.js} +2 -2
- package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-DbEYZpyh.js} +4 -3
- package/dist/Dialog.module-D9e4RsKo.js +30 -0
- package/dist/Group-B80_u5Q1.js +27 -0
- package/dist/{Popup-B6ZSGIEI.js → Popup-Ck3XlWMq.js} +3 -3
- package/dist/{Portal-DIeBsWdL.js → Portal-oY3enyAm.js} +2 -2
- package/dist/SelectButton-BlVl6pJn.js +70 -0
- package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
- package/dist/Toggle-Dl-yPy8S.js +187 -0
- package/dist/assets/Adornment.css +1 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Autocomplete.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/EllipsisTooltip.css +1 -1
- package/dist/assets/Group.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/ResultWithChips.css +1 -0
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/Skeleton.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/SortTooltip.css +1 -1
- package/dist/assets/Stepper.css +1 -1
- package/dist/assets/StepperNavigator.css +1 -0
- package/dist/assets/Table.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/TextDisplay.css +1 -1
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/{combineHooksSlotProps-DVjg9PRh.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
- package/dist/components/Adornment/Adornment.d.ts +20 -0
- package/dist/components/Adornment/Adornment.js +13 -0
- package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
- package/dist/components/Adornment/adornment.test.d.ts +1 -0
- package/dist/components/Advice/Advice.d.ts +32 -17
- package/dist/components/Advice/Advice.js +39 -40
- package/dist/components/Advice/Advice.stories.d.ts +4 -3
- package/dist/components/Autocomplete/Autocomplete.d.ts +20 -0
- package/dist/components/Autocomplete/Autocomplete.js +679 -0
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +23 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.js +51 -49
- package/dist/components/Checkbox/Checkbox.js +52 -52
- package/dist/components/Chip/Chip.d.ts +6 -12
- package/dist/components/Chip/Chip.js +8 -6
- package/dist/components/Chip/Chip.stories.d.ts +6 -15
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +3 -3
- package/dist/components/Dialog/Backdrop.js +8 -7
- package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
- package/dist/components/Dialog/CloseIconButton.js +15 -18
- package/dist/components/Dialog/Dialog.d.ts +9 -6
- package/dist/components/Dialog/Dialog.js +139 -139
- package/dist/components/Dialog/Dialog.stories.d.ts +51 -47
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +3 -2
- package/dist/components/Icon/Icon.js +141 -47
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.d.ts +24 -5
- package/dist/components/Input/Input.js +291 -278
- package/dist/components/Input/Input.stories.d.ts +2 -21
- package/dist/components/InputSearch/InputSearch.stories.d.ts +1 -21
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.js +57 -57
- package/dist/components/Pagination/Pagination.d.ts +5 -1
- package/dist/components/Pagination/Pagination.js +87 -185
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Pagination/usePagination.d.ts +90 -0
- package/dist/components/Pagination/usePagination.js +79 -0
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
- package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
- package/dist/components/RowItem/RowItem.d.ts +25 -0
- package/dist/components/RowItem/RowItem.js +20 -0
- package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
- package/dist/components/RowItem/rowItem.test.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +7 -0
- package/dist/components/Select/Select.js +409 -365
- package/dist/components/Select/SelectButton.d.ts +1 -0
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +3 -1
- package/dist/components/Skeleton/Skeleton.js +20 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +94 -94
- package/dist/components/Snackbar/Snackbar.stories.d.ts +4 -4
- package/dist/components/SortTooltip/SortTooltip.js +46 -46
- package/dist/components/Stepper/Stepper.js +35 -35
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +43 -0
- package/dist/components/StepperNavigator/StepperNavigator.js +56 -0
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +16 -0
- package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +3 -1
- package/dist/components/Table/Table.js +87 -99
- package/dist/components/Table/Table.stories.d.ts +1 -1
- package/dist/components/Tabs/Tab.d.ts +5 -3
- package/dist/components/Tabs/Tab.js +38 -36
- package/dist/components/Tabs/TabPanel.d.ts +4 -2
- package/dist/components/Tabs/TabPanel.js +51 -40
- package/dist/components/Tabs/Tabs.d.ts +6 -4
- package/dist/components/Tabs/Tabs.js +131 -128
- package/dist/components/TextDisplay/TextDisplay.d.ts +9 -3
- package/dist/components/TextDisplay/TextDisplay.js +45 -31
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
- package/dist/components/Toggle/Toggle.js +56 -56
- package/dist/components/ToggleGroup/Group.js +1 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +1 -0
- package/dist/components/ToggleGroup/Toggle.js +6 -5
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -1
- package/dist/components/Typography/Typography.js +47 -47
- package/dist/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
- package/dist/{index-CjW42-M-.js → index-bQFToy-I.js} +1 -1
- package/dist/main.d.ts +5 -0
- package/dist/main.js +85 -76
- package/dist/ownerDocument-YGhwAnr1.js +33 -0
- package/dist/{useButton-DNk3wrQp.js → useButton-DcihopJG.js} +1 -1
- package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
- package/dist/useEventCallback-BAQJJ3ye.js +14 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/{useList-B0hog_3-.js → useList-B9C55YB7.js} +2 -2
- package/dist/{index-CH45lKw7.js → useSlotProps-C_I1kEHr.js} +99 -99
- package/package.json +21 -12
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/SelectButton-K3OIfR5m.js +0 -61
- package/dist/Toggle-BCgIItCc.js +0 -142
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
|
@@ -1,225 +1,225 @@
|
|
|
1
1
|
import '../../assets/Input.css';
|
|
2
|
-
import { jsxs as q, jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
2
|
+
import { jsxs as q, jsx as S } from "react/jsx-runtime";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { forwardRef as de, useState as ce, useId as _e, useMemo as me } from "react";
|
|
5
|
+
import { c as E } from "../../clsx-DB4S2d7J.js";
|
|
6
6
|
import { Typography as L } from "../Typography/Typography.js";
|
|
7
|
-
import { g as
|
|
8
|
-
function
|
|
9
|
-
let l = "https://mui.com/production-error/?code=" +
|
|
10
|
-
for (let
|
|
11
|
-
l += "&args[]=" + encodeURIComponent(arguments[
|
|
12
|
-
return "Minified MUI error #" +
|
|
7
|
+
import { g as he, a as fe, u as ye, f as z, b as y, _ as ge, c as Q, i as be, P as e, d as ve, e as we } from "../../useSlotProps-C_I1kEHr.js";
|
|
8
|
+
function Ce(s) {
|
|
9
|
+
let l = "https://mui.com/production-error/?code=" + s;
|
|
10
|
+
for (let p = 1; p < arguments.length; p += 1)
|
|
11
|
+
l += "&args[]=" + encodeURIComponent(arguments[p]);
|
|
12
|
+
return "Minified MUI error #" + s + "; visit " + l + " for the full message.";
|
|
13
13
|
}
|
|
14
|
-
const X =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return h.useContext(X);
|
|
14
|
+
const X = "Input";
|
|
15
|
+
function xe(s) {
|
|
16
|
+
return he(X, s);
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
fe(X, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
19
|
+
const Z = /* @__PURE__ */ f.createContext(void 0);
|
|
20
|
+
process.env.NODE_ENV !== "production" && (Z.displayName = "FormControlContext");
|
|
21
|
+
function Pe() {
|
|
22
|
+
return f.useContext(Z);
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
function ke(a = {}) {
|
|
24
|
+
function Ne(s = {}) {
|
|
25
25
|
const {
|
|
26
26
|
defaultValue: l,
|
|
27
|
-
disabled:
|
|
28
|
-
error:
|
|
29
|
-
onBlur:
|
|
30
|
-
onChange:
|
|
27
|
+
disabled: p = !1,
|
|
28
|
+
error: d = !1,
|
|
29
|
+
onBlur: c,
|
|
30
|
+
onChange: m,
|
|
31
31
|
onFocus: x,
|
|
32
|
-
required:
|
|
33
|
-
value:
|
|
34
|
-
inputRef:
|
|
35
|
-
} =
|
|
36
|
-
let
|
|
37
|
-
if (
|
|
38
|
-
var
|
|
39
|
-
if (
|
|
40
|
-
const t = ["defaultValue", "disabled", "error", "required", "value"].filter((
|
|
32
|
+
required: P = !1,
|
|
33
|
+
value: F,
|
|
34
|
+
inputRef: N
|
|
35
|
+
} = s, n = Pe();
|
|
36
|
+
let b, h, v, w, g;
|
|
37
|
+
if (n) {
|
|
38
|
+
var I, _, O;
|
|
39
|
+
if (b = void 0, h = (I = n.disabled) != null ? I : !1, v = (_ = n.error) != null ? _ : !1, w = (O = n.required) != null ? O : !1, g = n.value, process.env.NODE_ENV !== "production") {
|
|
40
|
+
const t = ["defaultValue", "disabled", "error", "required", "value"].filter((o) => s[o] !== void 0);
|
|
41
41
|
t.length > 0 && console.warn(["MUI: You have set props on an input that is inside a FormControl.", "Set these props on a FormControl instead. Otherwise they will be ignored.", `Ignored props: ${t.join(", ")}`].join(`
|
|
42
42
|
`));
|
|
43
43
|
}
|
|
44
44
|
} else
|
|
45
|
-
|
|
45
|
+
b = l, h = p, v = d, w = P, g = F;
|
|
46
46
|
const {
|
|
47
|
-
current:
|
|
48
|
-
} =
|
|
47
|
+
current: k
|
|
48
|
+
} = f.useRef(g != null), B = f.useCallback((t) => {
|
|
49
49
|
process.env.NODE_ENV !== "production" && t && t.nodeName !== "INPUT" && !t.focus && console.error(["MUI: You have provided a `slots.input` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
50
50
|
`));
|
|
51
|
-
}, []),
|
|
52
|
-
|
|
53
|
-
!
|
|
54
|
-
}, [
|
|
55
|
-
const
|
|
56
|
-
var
|
|
57
|
-
if (
|
|
58
|
-
|
|
51
|
+
}, []), C = f.useRef(null), T = ye(C, N, B), [R, a] = f.useState(!1);
|
|
52
|
+
f.useEffect(() => {
|
|
53
|
+
!n && h && R && (a(!1), c == null || c());
|
|
54
|
+
}, [n, h, R, c]);
|
|
55
|
+
const V = (t) => (o) => {
|
|
56
|
+
var r;
|
|
57
|
+
if (n != null && n.disabled) {
|
|
58
|
+
o.stopPropagation();
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
-
if ((
|
|
62
|
-
var
|
|
63
|
-
|
|
61
|
+
if ((r = t.onFocus) == null || r.call(t, o), n && n.onFocus) {
|
|
62
|
+
var i;
|
|
63
|
+
n == null || (i = n.onFocus) == null || i.call(n);
|
|
64
64
|
} else
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
var
|
|
68
|
-
(
|
|
69
|
-
},
|
|
70
|
-
var
|
|
71
|
-
if (!
|
|
72
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." :
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
var
|
|
76
|
-
|
|
65
|
+
a(!0);
|
|
66
|
+
}, M = (t) => (o) => {
|
|
67
|
+
var r;
|
|
68
|
+
(r = t.onBlur) == null || r.call(t, o), n && n.onBlur ? n.onBlur() : a(!1);
|
|
69
|
+
}, U = (t) => (o, ...r) => {
|
|
70
|
+
var i, H;
|
|
71
|
+
if (!k && (o.target || C.current) == null)
|
|
72
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : Ce(17));
|
|
73
|
+
n == null || (i = n.onChange) == null || i.call(n, o), (H = t.onChange) == null || H.call(t, o, ...r);
|
|
74
|
+
}, A = (t) => (o) => {
|
|
75
|
+
var r;
|
|
76
|
+
C.current && o.currentTarget === o.target && C.current.focus(), (r = t.onClick) == null || r.call(t, o);
|
|
77
77
|
};
|
|
78
78
|
return {
|
|
79
|
-
disabled:
|
|
79
|
+
disabled: h,
|
|
80
80
|
error: v,
|
|
81
|
-
focused:
|
|
82
|
-
formControlContext:
|
|
81
|
+
focused: R,
|
|
82
|
+
formControlContext: n,
|
|
83
83
|
getInputProps: (t = {}) => {
|
|
84
|
-
const
|
|
85
|
-
onBlur:
|
|
86
|
-
onChange:
|
|
84
|
+
const r = y({}, {
|
|
85
|
+
onBlur: c,
|
|
86
|
+
onChange: m,
|
|
87
87
|
onFocus: x
|
|
88
|
-
}, z(t)),
|
|
89
|
-
onBlur:
|
|
90
|
-
onChange:
|
|
91
|
-
onFocus:
|
|
88
|
+
}, z(t)), i = y({}, r, {
|
|
89
|
+
onBlur: M(r),
|
|
90
|
+
onChange: U(r),
|
|
91
|
+
onFocus: V(r)
|
|
92
92
|
});
|
|
93
|
-
return
|
|
93
|
+
return y({}, i, {
|
|
94
94
|
"aria-invalid": v || void 0,
|
|
95
|
-
defaultValue:
|
|
96
|
-
value:
|
|
97
|
-
required:
|
|
98
|
-
disabled:
|
|
95
|
+
defaultValue: b,
|
|
96
|
+
value: g,
|
|
97
|
+
required: w,
|
|
98
|
+
disabled: h
|
|
99
99
|
}, t, {
|
|
100
|
-
ref:
|
|
101
|
-
},
|
|
100
|
+
ref: T
|
|
101
|
+
}, i);
|
|
102
102
|
},
|
|
103
103
|
getRootProps: (t = {}) => {
|
|
104
|
-
const
|
|
105
|
-
return
|
|
106
|
-
onClick:
|
|
104
|
+
const o = z(s, ["onBlur", "onChange", "onFocus"]), r = y({}, o, z(t));
|
|
105
|
+
return y({}, t, r, {
|
|
106
|
+
onClick: A(r)
|
|
107
107
|
});
|
|
108
108
|
},
|
|
109
|
-
inputRef:
|
|
110
|
-
required:
|
|
111
|
-
value:
|
|
109
|
+
inputRef: T,
|
|
110
|
+
required: w,
|
|
111
|
+
value: g
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
const
|
|
114
|
+
const Re = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "endAdornment", "error", "id", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "startAdornment", "value", "type", "rows", "slotProps", "slots", "minRows", "maxRows"], Ee = (s) => {
|
|
115
115
|
const {
|
|
116
116
|
disabled: l,
|
|
117
|
-
error:
|
|
118
|
-
focused:
|
|
119
|
-
formControlContext:
|
|
120
|
-
multiline:
|
|
117
|
+
error: p,
|
|
118
|
+
focused: d,
|
|
119
|
+
formControlContext: c,
|
|
120
|
+
multiline: m,
|
|
121
121
|
startAdornment: x,
|
|
122
|
-
endAdornment:
|
|
123
|
-
} =
|
|
124
|
-
return
|
|
125
|
-
root: ["root", l && "disabled",
|
|
126
|
-
input: ["input", l && "disabled",
|
|
127
|
-
},
|
|
128
|
-
}, ee = /* @__PURE__ */
|
|
129
|
-
var
|
|
122
|
+
endAdornment: P
|
|
123
|
+
} = s;
|
|
124
|
+
return ve({
|
|
125
|
+
root: ["root", l && "disabled", p && "error", d && "focused", !!c && "formControl", m && "multiline", !!x && "adornedStart", !!P && "adornedEnd"],
|
|
126
|
+
input: ["input", l && "disabled", m && "multiline"]
|
|
127
|
+
}, we(xe));
|
|
128
|
+
}, ee = /* @__PURE__ */ f.forwardRef(function(l, p) {
|
|
129
|
+
var d, c, m;
|
|
130
130
|
const {
|
|
131
131
|
"aria-describedby": x,
|
|
132
|
-
"aria-label":
|
|
133
|
-
"aria-labelledby":
|
|
134
|
-
autoComplete:
|
|
135
|
-
autoFocus:
|
|
136
|
-
className:
|
|
137
|
-
defaultValue:
|
|
132
|
+
"aria-label": P,
|
|
133
|
+
"aria-labelledby": F,
|
|
134
|
+
autoComplete: N,
|
|
135
|
+
autoFocus: n,
|
|
136
|
+
className: b,
|
|
137
|
+
defaultValue: h,
|
|
138
138
|
disabled: v,
|
|
139
|
-
endAdornment:
|
|
140
|
-
error:
|
|
141
|
-
id:
|
|
142
|
-
multiline:
|
|
143
|
-
name:
|
|
144
|
-
onClick:
|
|
145
|
-
onChange:
|
|
146
|
-
onKeyDown:
|
|
147
|
-
onKeyUp:
|
|
148
|
-
onFocus:
|
|
149
|
-
onBlur:
|
|
150
|
-
placeholder:
|
|
151
|
-
readOnly:
|
|
152
|
-
required:
|
|
153
|
-
startAdornment:
|
|
154
|
-
value:
|
|
155
|
-
type:
|
|
139
|
+
endAdornment: w,
|
|
140
|
+
error: g,
|
|
141
|
+
id: I,
|
|
142
|
+
multiline: _ = !1,
|
|
143
|
+
name: O,
|
|
144
|
+
onClick: k,
|
|
145
|
+
onChange: B,
|
|
146
|
+
onKeyDown: C,
|
|
147
|
+
onKeyUp: T,
|
|
148
|
+
onFocus: R,
|
|
149
|
+
onBlur: a,
|
|
150
|
+
placeholder: V,
|
|
151
|
+
readOnly: M,
|
|
152
|
+
required: U,
|
|
153
|
+
startAdornment: A,
|
|
154
|
+
value: D,
|
|
155
|
+
type: j,
|
|
156
156
|
rows: t,
|
|
157
|
-
slotProps:
|
|
158
|
-
slots:
|
|
159
|
-
minRows:
|
|
157
|
+
slotProps: o = {},
|
|
158
|
+
slots: r = {},
|
|
159
|
+
minRows: i,
|
|
160
160
|
maxRows: H
|
|
161
|
-
} = l, Y =
|
|
161
|
+
} = l, Y = ge(l, Re), {
|
|
162
162
|
getRootProps: te,
|
|
163
163
|
getInputProps: oe,
|
|
164
164
|
focused: ne,
|
|
165
165
|
formControlContext: re,
|
|
166
166
|
error: ae,
|
|
167
167
|
disabled: se
|
|
168
|
-
} =
|
|
168
|
+
} = Ne({
|
|
169
169
|
disabled: v,
|
|
170
|
-
defaultValue:
|
|
171
|
-
error:
|
|
172
|
-
onBlur:
|
|
173
|
-
onClick:
|
|
174
|
-
onChange:
|
|
175
|
-
onFocus:
|
|
176
|
-
required:
|
|
177
|
-
value:
|
|
178
|
-
}), W =
|
|
170
|
+
defaultValue: h,
|
|
171
|
+
error: g,
|
|
172
|
+
onBlur: a,
|
|
173
|
+
onClick: k,
|
|
174
|
+
onChange: B,
|
|
175
|
+
onFocus: R,
|
|
176
|
+
required: U,
|
|
177
|
+
value: D
|
|
178
|
+
}), W = _ ? void 0 : j ?? "text", $ = y({}, l, {
|
|
179
179
|
disabled: se,
|
|
180
180
|
error: ae,
|
|
181
181
|
focused: ne,
|
|
182
182
|
formControlContext: re,
|
|
183
|
-
multiline:
|
|
183
|
+
multiline: _,
|
|
184
184
|
type: W
|
|
185
|
-
}), G =
|
|
185
|
+
}), G = Ee($), le = {
|
|
186
186
|
"aria-describedby": x,
|
|
187
|
-
"aria-label":
|
|
188
|
-
"aria-labelledby":
|
|
189
|
-
autoComplete:
|
|
190
|
-
autoFocus:
|
|
191
|
-
id:
|
|
192
|
-
onKeyDown:
|
|
193
|
-
onKeyUp:
|
|
194
|
-
name:
|
|
195
|
-
placeholder:
|
|
196
|
-
readOnly:
|
|
187
|
+
"aria-label": P,
|
|
188
|
+
"aria-labelledby": F,
|
|
189
|
+
autoComplete: N,
|
|
190
|
+
autoFocus: n,
|
|
191
|
+
id: I,
|
|
192
|
+
onKeyDown: C,
|
|
193
|
+
onKeyUp: T,
|
|
194
|
+
name: O,
|
|
195
|
+
placeholder: V,
|
|
196
|
+
readOnly: M,
|
|
197
197
|
type: W
|
|
198
|
-
}, J = (
|
|
198
|
+
}, J = (d = r.root) != null ? d : "div", ie = Q({
|
|
199
199
|
elementType: J,
|
|
200
200
|
getSlotProps: te,
|
|
201
|
-
externalSlotProps:
|
|
201
|
+
externalSlotProps: o.root,
|
|
202
202
|
externalForwardedProps: Y,
|
|
203
203
|
additionalProps: {
|
|
204
|
-
ref:
|
|
204
|
+
ref: p
|
|
205
205
|
},
|
|
206
206
|
ownerState: $,
|
|
207
|
-
className: [G.root,
|
|
208
|
-
}), K =
|
|
207
|
+
className: [G.root, b]
|
|
208
|
+
}), K = _ ? (c = r.textarea) != null ? c : "textarea" : (m = r.input) != null ? m : "input", ue = Q({
|
|
209
209
|
elementType: K,
|
|
210
|
-
getSlotProps: (pe) => oe(
|
|
211
|
-
externalSlotProps:
|
|
212
|
-
additionalProps:
|
|
213
|
-
rows:
|
|
214
|
-
},
|
|
215
|
-
minRows: t ||
|
|
210
|
+
getSlotProps: (pe) => oe(y({}, le, pe)),
|
|
211
|
+
externalSlotProps: o.input,
|
|
212
|
+
additionalProps: y({
|
|
213
|
+
rows: _ ? t : void 0
|
|
214
|
+
}, _ && !be(K) && {
|
|
215
|
+
minRows: t || i,
|
|
216
216
|
maxRows: t || H
|
|
217
217
|
}),
|
|
218
218
|
ownerState: $,
|
|
219
219
|
className: G.input
|
|
220
220
|
});
|
|
221
|
-
return process.env.NODE_ENV !== "production" &&
|
|
222
|
-
children: [
|
|
221
|
+
return process.env.NODE_ENV !== "production" && _ && t && (i || H) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ q(J, y({}, ie, {
|
|
222
|
+
children: [A, /* @__PURE__ */ S(K, y({}, ue)), w]
|
|
223
223
|
}));
|
|
224
224
|
});
|
|
225
225
|
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
@@ -372,137 +372,150 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
|
372
372
|
*/
|
|
373
373
|
value: e.any
|
|
374
374
|
});
|
|
375
|
-
const
|
|
375
|
+
const Fe = (s) => /* @__PURE__ */ f.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", "data-waves-icon": "fa/solid/circle-exclamation", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
|
|
376
376
|
fill: "currentcolor",
|
|
377
377
|
color: "currentcolor",
|
|
378
378
|
width: "1em",
|
|
379
379
|
height: "1em"
|
|
380
|
-
}, ...
|
|
381
|
-
"u-typography-h1": "_u-typography-
|
|
382
|
-
"u-typography-h2": "_u-typography-
|
|
383
|
-
"u-typography-h3": "_u-typography-
|
|
384
|
-
"u-typography-h4": "_u-typography-
|
|
385
|
-
"u-typography-h5": "_u-typography-
|
|
386
|
-
"u-typography-h6": "_u-typography-
|
|
387
|
-
"u-typography-base": "_u-typography-
|
|
388
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
389
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
390
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
391
|
-
"input__input-el": "_input__input-
|
|
392
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
393
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
394
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
395
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
396
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
397
|
-
input__label:
|
|
398
|
-
"input__input-el-wrapper": "_input__input-el-
|
|
399
|
-
"input__left-icon": "_input__left-
|
|
400
|
-
"input__right-icon": "_input__right-
|
|
401
|
-
"input__messages-wrapper": "_input__messages-
|
|
402
|
-
"input__info-message": "_input__info-
|
|
403
|
-
"input__error-message": "_input__error-
|
|
404
|
-
"input__chars-counter": "_input__chars-
|
|
405
|
-
"input--disabled": "_input--
|
|
406
|
-
input:
|
|
407
|
-
"input--focused": "_input--
|
|
408
|
-
"input--error": "_input--
|
|
409
|
-
},
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
a
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
)
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
|
|
454
|
-
{
|
|
455
|
-
id: T,
|
|
456
|
-
type: N,
|
|
457
|
-
disabled: x,
|
|
458
|
-
error: !!s,
|
|
459
|
-
"aria-label": a,
|
|
460
|
-
slotProps: {
|
|
461
|
-
root: (d) => ({
|
|
462
|
-
className: R(u["input__input-el-wrapper"], {
|
|
463
|
-
[u["input--disabled"]]: d.disabled,
|
|
464
|
-
[u["input--focused"]]: d.focused,
|
|
465
|
-
[u["input--error"]]: d.error
|
|
466
|
-
})
|
|
467
|
-
}),
|
|
468
|
-
input: {
|
|
469
|
-
className: R(u["input__input-el"], v),
|
|
470
|
-
maxLength: g,
|
|
471
|
-
onChange: j,
|
|
472
|
-
...k
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
startAdornment: f && /* @__PURE__ */ B("span", { className: u["input__left-icon"], children: f }),
|
|
476
|
-
endAdornment: i && /* @__PURE__ */ B("span", { className: u["input__right-icon"], children: i })
|
|
477
|
-
}
|
|
478
|
-
),
|
|
479
|
-
/* @__PURE__ */ q("div", { className: u["input__messages-wrapper"], children: [
|
|
480
|
-
(s || l) && /* @__PURE__ */ q(
|
|
380
|
+
}, ...s }, /* @__PURE__ */ f.createElement("path", { d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z" })), Ie = "_input__label_6va87_78", Oe = "_input_6va87_57", u = {
|
|
381
|
+
"u-typography-h1": "_u-typography-h1_6va87_1",
|
|
382
|
+
"u-typography-h2": "_u-typography-h2_6va87_8",
|
|
383
|
+
"u-typography-h3": "_u-typography-h3_6va87_15",
|
|
384
|
+
"u-typography-h4": "_u-typography-h4_6va87_22",
|
|
385
|
+
"u-typography-h5": "_u-typography-h5_6va87_29",
|
|
386
|
+
"u-typography-h6": "_u-typography-h6_6va87_36",
|
|
387
|
+
"u-typography-base": "_u-typography-base_6va87_43",
|
|
388
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_6va87_49",
|
|
389
|
+
"u-typography-base--xl": "_u-typography-base--xl_6va87_53",
|
|
390
|
+
"u-typography-base--lg": "_u-typography-base--lg_6va87_57",
|
|
391
|
+
"input__input-el": "_input__input-el_6va87_57",
|
|
392
|
+
"u-typography-base--sm": "_u-typography-base--sm_6va87_61",
|
|
393
|
+
"u-typography-base--bold": "_u-typography-base--bold_6va87_65",
|
|
394
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_6va87_68",
|
|
395
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_6va87_71",
|
|
396
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_6va87_74",
|
|
397
|
+
input__label: Ie,
|
|
398
|
+
"input__input-el-wrapper": "_input__input-el-wrapper_6va87_83",
|
|
399
|
+
"input__left-icon": "_input__left-icon_6va87_101",
|
|
400
|
+
"input__right-icon": "_input__right-icon_6va87_101",
|
|
401
|
+
"input__messages-wrapper": "_input__messages-wrapper_6va87_113",
|
|
402
|
+
"input__info-message": "_input__info-message_6va87_121",
|
|
403
|
+
"input__error-message": "_input__error-message_6va87_121",
|
|
404
|
+
"input__chars-counter": "_input__chars-counter_6va87_132",
|
|
405
|
+
"input--disabled": "_input--disabled_6va87_136",
|
|
406
|
+
input: Oe,
|
|
407
|
+
"input--focused": "_input--focused_6va87_142",
|
|
408
|
+
"input--error": "_input--error_6va87_145"
|
|
409
|
+
}, Me = de(
|
|
410
|
+
({
|
|
411
|
+
label: s,
|
|
412
|
+
infoMessage: l,
|
|
413
|
+
error: p,
|
|
414
|
+
errorMessage: d,
|
|
415
|
+
leftIcon: c,
|
|
416
|
+
rightIcon: m,
|
|
417
|
+
id: x,
|
|
418
|
+
disabled: P,
|
|
419
|
+
type: F = "text",
|
|
420
|
+
maxLength: N,
|
|
421
|
+
hideCharsCounter: n = !1,
|
|
422
|
+
onChange: b,
|
|
423
|
+
classNameWrapper: h,
|
|
424
|
+
classNameLabel: v,
|
|
425
|
+
classNameInput: w,
|
|
426
|
+
classNameInfoMessage: g,
|
|
427
|
+
classNameErrorMessage: I,
|
|
428
|
+
classNameCharsCounter: _,
|
|
429
|
+
"data-testid-wrapper": O,
|
|
430
|
+
"data-testid-label": k,
|
|
431
|
+
"data-testid-input": B,
|
|
432
|
+
"data-testid-infoMessage": C,
|
|
433
|
+
"data-testid-errorMessage": T,
|
|
434
|
+
"data-testid-charsCounter": R,
|
|
435
|
+
...a
|
|
436
|
+
}, V) => {
|
|
437
|
+
const [M, U] = ce(0), A = _e(), D = x || `input_${A}`;
|
|
438
|
+
Object.assign(a, { "data-testid": B });
|
|
439
|
+
const j = (o) => {
|
|
440
|
+
var r, i;
|
|
441
|
+
U((i = (r = o == null ? void 0 : o.target) == null ? void 0 : r.value) == null ? void 0 : i.length), b && b(o);
|
|
442
|
+
}, t = me(() => a.multiline !== !0 ? {
|
|
443
|
+
type: F,
|
|
444
|
+
multiline: a.multiline
|
|
445
|
+
} : {
|
|
446
|
+
type: void 0,
|
|
447
|
+
multiline: a.multiline,
|
|
448
|
+
rows: (a == null ? void 0 : a.rows) || 5,
|
|
449
|
+
minRows: a == null ? void 0 : a.minRows,
|
|
450
|
+
maxRows: a == null ? void 0 : a.maxRows
|
|
451
|
+
}, [a]);
|
|
452
|
+
return /* @__PURE__ */ q("div", { className: E(u.input, h), "data-testid": O, children: [
|
|
453
|
+
s && /* @__PURE__ */ S(
|
|
481
454
|
L,
|
|
482
455
|
{
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
]
|
|
456
|
+
element: "label",
|
|
457
|
+
elementProps: { htmlFor: D },
|
|
458
|
+
className: E(u.input__label, v),
|
|
459
|
+
"data-testid": k,
|
|
460
|
+
children: s
|
|
489
461
|
}
|
|
490
462
|
),
|
|
491
|
-
|
|
492
|
-
|
|
463
|
+
/* @__PURE__ */ S(
|
|
464
|
+
ee,
|
|
493
465
|
{
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
466
|
+
id: D,
|
|
467
|
+
disabled: P,
|
|
468
|
+
error: typeof p == "boolean" ? p : !!d,
|
|
469
|
+
"aria-label": s,
|
|
470
|
+
slotProps: {
|
|
471
|
+
root: (o) => ({
|
|
472
|
+
className: E(u["input__input-el-wrapper"], {
|
|
473
|
+
[u["input--disabled"]]: o.disabled,
|
|
474
|
+
[u["input--focused"]]: o.focused,
|
|
475
|
+
[u["input--error"]]: o.error
|
|
476
|
+
})
|
|
477
|
+
}),
|
|
478
|
+
input: {
|
|
479
|
+
ref: V,
|
|
480
|
+
className: E(u["input__input-el"], w),
|
|
481
|
+
maxLength: N,
|
|
482
|
+
onChange: j,
|
|
483
|
+
...a
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
startAdornment: c && /* @__PURE__ */ S("span", { className: u["input__left-icon"], children: c }),
|
|
487
|
+
endAdornment: m && /* @__PURE__ */ S("span", { className: u["input__right-icon"], children: m }),
|
|
488
|
+
...t
|
|
501
489
|
}
|
|
502
|
-
)
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
490
|
+
),
|
|
491
|
+
/* @__PURE__ */ q("div", { className: u["input__messages-wrapper"], children: [
|
|
492
|
+
(d || l) && /* @__PURE__ */ q(
|
|
493
|
+
L,
|
|
494
|
+
{
|
|
495
|
+
className: d ? E(u["input__error-message"], I) : E(u["input__info-message"], g),
|
|
496
|
+
"data-testid": d ? T : C,
|
|
497
|
+
children: [
|
|
498
|
+
/* @__PURE__ */ S(Fe, {}),
|
|
499
|
+
d || l
|
|
500
|
+
]
|
|
501
|
+
}
|
|
502
|
+
),
|
|
503
|
+
N && !n && /* @__PURE__ */ q(
|
|
504
|
+
L,
|
|
505
|
+
{
|
|
506
|
+
className: E(u["input__chars-counter"], _),
|
|
507
|
+
"data-testid": R,
|
|
508
|
+
children: [
|
|
509
|
+
M,
|
|
510
|
+
" / ",
|
|
511
|
+
N
|
|
512
|
+
]
|
|
513
|
+
}
|
|
514
|
+
)
|
|
515
|
+
] })
|
|
516
|
+
] });
|
|
517
|
+
}
|
|
518
|
+
);
|
|
506
519
|
export {
|
|
507
|
-
|
|
520
|
+
Me as Input
|
|
508
521
|
};
|