@pismo/marola 2.1.64 → 2.1.65
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-CJaBSdv1.js +135 -0
- package/dist/ClassNameConfigurator-CVRWfyIa.js +847 -0
- package/dist/{ClickAwayListener-Z08peX_P.js → ClickAwayListener-BnYMO5Ki.js} +26 -33
- package/dist/Popup-D267EI4e.js +1338 -0
- package/dist/{Portal-DJapUCn6.js → Portal-BrGvxB96.js} +32 -36
- package/dist/RadioOption-DyRY8xlF.js +1094 -0
- package/dist/{Toggle-DcZTfLrC.js → Toggle-nnDfpqI1.js} +31 -31
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/DropdownMenu.css +1 -1
- package/dist/assets/ToastCard.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/combineHooksSlotProps-j-8UVeYo.js +86 -0
- package/dist/components/Alert/Alert.stories.d.ts +6 -6
- package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +311 -320
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts +4 -4
- package/dist/components/BankingCard/BankingCard.d.ts +0 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +56 -56
- package/dist/components/Checkbox/Checkbox.stories.d.ts +8 -8
- package/dist/components/Chip/Chip.js +3 -3
- package/dist/components/DatePicker/DatePicker.js +742 -639
- package/dist/components/DatePicker/DatePicker.stories.d.ts +8 -8
- package/dist/components/DatePicker/dateUtils.d.ts +2 -2
- package/dist/components/DatePicker/dateUtils.js +1 -1
- package/dist/components/DatePicker/keyboardNavigation.d.ts +1 -1
- package/dist/components/DatePicker/renderCalendarDays.js +1 -1
- package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +372 -352
- package/dist/components/Dialog/Dialog.stories.d.ts +96 -135
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.d.ts +1 -1
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.js +2 -2
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.stories.d.ts +1 -1
- package/dist/components/DoubleInput/DoubleInput.stories.d.ts +1 -1
- package/dist/components/Draggable/Draggable.d.ts +0 -1
- package/dist/components/Draggable/Draggable.js +1 -1
- package/dist/components/Draggable/Draggable.stories.d.ts +2 -3
- package/dist/components/Draggable/useDraggable.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +39 -34
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +6 -4
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +4 -4
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +335 -320
- package/dist/components/InputSearch/InputSearch.d.ts +31 -31
- package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -31
- package/dist/components/Popover/Popover.d.ts +3 -3
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/components/Popover/PopoverBody.d.ts +0 -1
- package/dist/components/Popover/PopoverFooter.d.ts +0 -1
- package/dist/components/Popover/PopoverHeader.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.js +684 -769
- package/dist/components/RadioButton/RadioOption.d.ts +0 -1
- package/dist/components/RadioButton/RadioOption.js +3 -3
- package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
- package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/Select/Select.js +625 -591
- package/dist/components/Skeleton/Skeleton.d.ts +0 -1
- package/dist/components/Snackbar/Snackbar.js +295 -239
- package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
- package/dist/components/Table/Table.stories.d.ts +5 -5
- package/dist/components/Tabs/Tab.js +107 -98
- package/dist/components/Tabs/TabPanel.js +58 -55
- package/dist/components/Tabs/Tabs.js +246 -231
- package/dist/components/ToastCard/ToastCard.js +31 -31
- package/dist/components/Toggle/Toggle.js +147 -137
- package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +266 -325
- package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
- package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
- package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
- package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
- package/dist/getReactElementRef-iorwYm2A.js +19 -0
- package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
- package/dist/isFocusVisible-CPZqtjv2.js +12 -0
- package/dist/main.js +2 -2
- package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
- package/dist/react-BTbo_5A3.js +526 -0
- package/dist/setRef-Bo0HEdBB.js +6 -0
- package/dist/useButton-C2E_LFJp.js +90 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/useId-CK6Kn3Tn.js +21 -0
- package/dist/useList-BLW78Lq7.js +446 -0
- package/dist/utils/draggable.d.ts +2 -2
- package/package.json +1 -1
- package/dist/Button-BrEDdtHO.js +0 -130
- package/dist/Popup-Dffqo7wT.js +0 -1246
- package/dist/RadioOption-DYovqiwF.js +0 -720
- package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
- package/dist/exactProp-SYjL19cU.js +0 -13
- package/dist/react-BvI-Sw9b.js +0 -509
- package/dist/useButton-CezPDte8.js +0 -105
- package/dist/useControlled-CCMYYdCM.js +0 -31
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-nqLfZem8.js +0 -435
- package/dist/useSlotProps-CYHDC4TN.js +0 -834
- package/dist/useTimeout-DxF9kiZL.js +0 -36
|
@@ -1,229 +1,244 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { formatDecimalValue as _e, allowOnlyIntegerNumbers as
|
|
5
|
-
import { c as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Typography as
|
|
8
|
-
import { g as
|
|
9
|
-
import '../../assets/Input.css';function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
i += "&args[]=" + encodeURIComponent(arguments[f]);
|
|
13
|
-
return "Minified MUI error #" + r + "; visit " + i + " for the full message.";
|
|
1
|
+
import { jsxs as T, jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import { forwardRef as we, useState as ye, useId as Pe, useRef as ve, useMemo as ue } from "react";
|
|
4
|
+
import { formatDecimalValue as _e, allowOnlyIntegerNumbers as Re, allowOnlyNumbers as Ee, parseToInteger as xe } from "../../utils/inputNumberAsText.js";
|
|
5
|
+
import { c as O } from "../../clsx-OuTLNxxd.js";
|
|
6
|
+
import { Icon as Se } from "../Icon/Icon.js";
|
|
7
|
+
import { Typography as se } from "../Typography/Typography.js";
|
|
8
|
+
import { g as Ve, a as Ce, u as Fe, e as pe, b as me, c as Oe, d as Te, P as n } from "../../ClassNameConfigurator-CVRWfyIa.js";
|
|
9
|
+
import '../../assets/Input.css';function Ie(l, ...d) {
|
|
10
|
+
const h = new URL(`https://mui.com/production-error/?code=${l}`);
|
|
11
|
+
return d.forEach((w) => h.searchParams.append("args[]", w)), `Minified MUI error #${l}; visit ${h} for the full message.`;
|
|
14
12
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return Fe(ge, r);
|
|
13
|
+
function Be(l) {
|
|
14
|
+
return typeof l == "string";
|
|
18
15
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function ke() {
|
|
23
|
-
return F.useContext(he);
|
|
16
|
+
const be = "Input";
|
|
17
|
+
function Ue(l) {
|
|
18
|
+
return Ve(be, l);
|
|
24
19
|
}
|
|
25
|
-
|
|
20
|
+
Ce(be, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
21
|
+
const ge = /* @__PURE__ */ x.createContext(void 0);
|
|
22
|
+
process.env.NODE_ENV !== "production" && (ge.displayName = "FormControlContext");
|
|
23
|
+
function je() {
|
|
24
|
+
return x.useContext(ge);
|
|
25
|
+
}
|
|
26
|
+
function ke(l = {}) {
|
|
26
27
|
const {
|
|
27
|
-
defaultValue:
|
|
28
|
-
disabled:
|
|
29
|
-
error:
|
|
28
|
+
defaultValue: d,
|
|
29
|
+
disabled: h = !1,
|
|
30
|
+
error: w = !1,
|
|
30
31
|
onBlur: u,
|
|
31
|
-
onChange:
|
|
32
|
-
onFocus:
|
|
32
|
+
onChange: y,
|
|
33
|
+
onFocus: v,
|
|
33
34
|
required: S = !1,
|
|
34
|
-
value:
|
|
35
|
+
value: B,
|
|
35
36
|
inputRef: m
|
|
36
|
-
} =
|
|
37
|
-
let
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
o.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: ${o.join(", ")}`].join(`
|
|
37
|
+
} = l, a = je();
|
|
38
|
+
let R, f, b, p, N;
|
|
39
|
+
if (a) {
|
|
40
|
+
if (R = void 0, f = a.disabled ?? !1, b = a.error ?? !1, p = a.required ?? !1, N = a.value, process.env.NODE_ENV !== "production") {
|
|
41
|
+
const t = ["defaultValue", "disabled", "error", "required", "value"].filter((i) => l[i] !== void 0);
|
|
42
|
+
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(`
|
|
43
43
|
`));
|
|
44
44
|
}
|
|
45
45
|
} else
|
|
46
|
-
|
|
46
|
+
R = d, f = h, b = w, p = S, N = B;
|
|
47
47
|
const {
|
|
48
|
-
current:
|
|
49
|
-
} =
|
|
50
|
-
process.env.NODE_ENV !== "production" &&
|
|
48
|
+
current: k
|
|
49
|
+
} = x.useRef(N != null), A = x.useCallback((t) => {
|
|
50
|
+
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(`
|
|
51
51
|
`));
|
|
52
|
-
}, []),
|
|
53
|
-
|
|
54
|
-
!
|
|
55
|
-
}, [
|
|
56
|
-
const
|
|
57
|
-
var
|
|
58
|
-
if (
|
|
59
|
-
|
|
52
|
+
}, []), g = x.useRef(null), P = Fe(g, m, A), [V, C] = x.useState(!1);
|
|
53
|
+
x.useEffect(() => {
|
|
54
|
+
!a && f && V && (C(!1), u == null || u());
|
|
55
|
+
}, [a, f, V, u]);
|
|
56
|
+
const M = (t) => (i) => {
|
|
57
|
+
var r, _;
|
|
58
|
+
if (a != null && a.disabled) {
|
|
59
|
+
i.stopPropagation();
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
l == null || (c = l.onChange) == null || c.call(l, e), (V = o.onChange) == null || V.call(o, e, ...a);
|
|
75
|
-
}, Y = (o) => (e) => {
|
|
76
|
-
var a;
|
|
77
|
-
E.current && e.currentTarget === e.target && E.current.focus(), (a = o.onClick) == null || a.call(o, e);
|
|
62
|
+
(r = t.onFocus) == null || r.call(t, i), a && a.onFocus ? (_ = a == null ? void 0 : a.onFocus) == null || _.call(a) : C(!0);
|
|
63
|
+
}, q = (t) => (i) => {
|
|
64
|
+
var r;
|
|
65
|
+
(r = t.onBlur) == null || r.call(t, i), a && a.onBlur ? a.onBlur() : C(!1);
|
|
66
|
+
}, D = (t) => (i, ...r) => {
|
|
67
|
+
var _, e;
|
|
68
|
+
if (!k && (i.target || g.current) == null)
|
|
69
|
+
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." : Ie(17));
|
|
70
|
+
(_ = a == null ? void 0 : a.onChange) == null || _.call(a, i), (e = t.onChange) == null || e.call(t, i, ...r);
|
|
71
|
+
}, K = (t) => (i) => {
|
|
72
|
+
var r;
|
|
73
|
+
g.current && i.currentTarget === i.target && g.current.focus(), (r = t.onClick) == null || r.call(t, i);
|
|
78
74
|
};
|
|
79
75
|
return {
|
|
80
|
-
disabled:
|
|
81
|
-
error:
|
|
82
|
-
focused:
|
|
83
|
-
formControlContext:
|
|
84
|
-
getInputProps: (
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
76
|
+
disabled: f,
|
|
77
|
+
error: b,
|
|
78
|
+
focused: V,
|
|
79
|
+
formControlContext: a,
|
|
80
|
+
getInputProps: (t = {}) => {
|
|
81
|
+
const r = {
|
|
82
|
+
...{
|
|
83
|
+
onBlur: u,
|
|
84
|
+
onChange: y,
|
|
85
|
+
onFocus: v
|
|
86
|
+
},
|
|
87
|
+
...pe(t)
|
|
88
|
+
}, _ = {
|
|
89
|
+
...r,
|
|
90
|
+
onBlur: q(r),
|
|
91
|
+
onChange: D(r),
|
|
92
|
+
onFocus: M(r)
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
..._,
|
|
96
|
+
"aria-invalid": b || void 0,
|
|
97
|
+
defaultValue: R,
|
|
98
|
+
value: N,
|
|
99
|
+
required: p,
|
|
100
|
+
disabled: f,
|
|
101
|
+
...t,
|
|
102
|
+
ref: P,
|
|
103
|
+
..._
|
|
104
|
+
};
|
|
103
105
|
},
|
|
104
|
-
getRootProps: (
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
106
|
+
getRootProps: (t = {}) => {
|
|
107
|
+
const r = {
|
|
108
|
+
...pe(l, ["onBlur", "onChange", "onFocus"]),
|
|
109
|
+
...pe(t)
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
...t,
|
|
113
|
+
...r,
|
|
114
|
+
onClick: K(r)
|
|
115
|
+
};
|
|
109
116
|
},
|
|
110
|
-
inputRef:
|
|
111
|
-
required:
|
|
112
|
-
value:
|
|
117
|
+
inputRef: P,
|
|
118
|
+
required: p,
|
|
119
|
+
value: N
|
|
113
120
|
};
|
|
114
121
|
}
|
|
115
|
-
const
|
|
122
|
+
const Ae = (l) => {
|
|
116
123
|
const {
|
|
117
|
-
disabled:
|
|
118
|
-
error:
|
|
119
|
-
focused:
|
|
124
|
+
disabled: d,
|
|
125
|
+
error: h,
|
|
126
|
+
focused: w,
|
|
120
127
|
formControlContext: u,
|
|
121
|
-
multiline:
|
|
122
|
-
startAdornment:
|
|
128
|
+
multiline: y,
|
|
129
|
+
startAdornment: v,
|
|
123
130
|
endAdornment: S
|
|
124
|
-
} =
|
|
125
|
-
return
|
|
126
|
-
root: ["root",
|
|
127
|
-
input: ["input",
|
|
128
|
-
}, Ue
|
|
129
|
-
},
|
|
130
|
-
var C, u, h;
|
|
131
|
+
} = l;
|
|
132
|
+
return Oe({
|
|
133
|
+
root: ["root", d && "disabled", h && "error", w && "focused", !!u && "formControl", y && "multiline", !!v && "adornedStart", !!S && "adornedEnd"],
|
|
134
|
+
input: ["input", d && "disabled", y && "multiline"]
|
|
135
|
+
}, Te(Ue));
|
|
136
|
+
}, he = /* @__PURE__ */ x.forwardRef(function(d, h) {
|
|
131
137
|
const {
|
|
132
|
-
"aria-describedby":
|
|
133
|
-
"aria-label":
|
|
134
|
-
"aria-labelledby":
|
|
135
|
-
autoComplete:
|
|
136
|
-
autoFocus:
|
|
137
|
-
className:
|
|
138
|
-
defaultValue:
|
|
139
|
-
disabled:
|
|
140
|
-
endAdornment:
|
|
141
|
-
error:
|
|
142
|
-
id:
|
|
143
|
-
multiline:
|
|
138
|
+
"aria-describedby": w,
|
|
139
|
+
"aria-label": u,
|
|
140
|
+
"aria-labelledby": y,
|
|
141
|
+
autoComplete: v,
|
|
142
|
+
autoFocus: S,
|
|
143
|
+
className: B,
|
|
144
|
+
defaultValue: m,
|
|
145
|
+
disabled: a,
|
|
146
|
+
endAdornment: R,
|
|
147
|
+
error: f,
|
|
148
|
+
id: b,
|
|
149
|
+
multiline: p = !1,
|
|
144
150
|
name: N,
|
|
145
|
-
onClick:
|
|
146
|
-
onChange:
|
|
147
|
-
onKeyDown:
|
|
148
|
-
onKeyUp:
|
|
149
|
-
onFocus:
|
|
150
|
-
onBlur:
|
|
151
|
-
placeholder:
|
|
152
|
-
readOnly:
|
|
153
|
-
required:
|
|
154
|
-
startAdornment:
|
|
155
|
-
value:
|
|
156
|
-
type:
|
|
157
|
-
rows:
|
|
158
|
-
slotProps:
|
|
159
|
-
slots:
|
|
160
|
-
minRows:
|
|
161
|
-
maxRows:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
"aria-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
151
|
+
onClick: k,
|
|
152
|
+
onChange: A,
|
|
153
|
+
onKeyDown: g,
|
|
154
|
+
onKeyUp: P,
|
|
155
|
+
onFocus: V,
|
|
156
|
+
onBlur: C,
|
|
157
|
+
placeholder: M,
|
|
158
|
+
readOnly: q,
|
|
159
|
+
required: D,
|
|
160
|
+
startAdornment: K,
|
|
161
|
+
value: z,
|
|
162
|
+
type: G,
|
|
163
|
+
rows: t,
|
|
164
|
+
slotProps: i = {},
|
|
165
|
+
slots: r = {},
|
|
166
|
+
minRows: _,
|
|
167
|
+
maxRows: e,
|
|
168
|
+
...J
|
|
169
|
+
} = d, {
|
|
170
|
+
getRootProps: ae,
|
|
171
|
+
getInputProps: Q,
|
|
172
|
+
focused: re,
|
|
173
|
+
formControlContext: X,
|
|
174
|
+
error: $,
|
|
175
|
+
disabled: W
|
|
176
|
+
} = ke({
|
|
177
|
+
disabled: a,
|
|
178
|
+
defaultValue: m,
|
|
179
|
+
error: f,
|
|
180
|
+
onBlur: C,
|
|
181
|
+
onClick: k,
|
|
182
|
+
onChange: A,
|
|
183
|
+
onFocus: V,
|
|
184
|
+
required: D,
|
|
185
|
+
value: z
|
|
186
|
+
}), Z = p ? void 0 : G ?? "text", U = {
|
|
187
|
+
...d,
|
|
188
|
+
disabled: W,
|
|
189
|
+
error: $,
|
|
190
|
+
focused: re,
|
|
191
|
+
formControlContext: X,
|
|
192
|
+
multiline: p,
|
|
193
|
+
type: Z
|
|
194
|
+
}, H = Ae(U), ie = {
|
|
195
|
+
"aria-describedby": w,
|
|
196
|
+
"aria-label": u,
|
|
197
|
+
"aria-labelledby": y,
|
|
198
|
+
autoComplete: v,
|
|
199
|
+
autoFocus: S,
|
|
200
|
+
id: b,
|
|
201
|
+
onKeyDown: g,
|
|
202
|
+
onKeyUp: P,
|
|
195
203
|
name: N,
|
|
196
|
-
placeholder:
|
|
197
|
-
readOnly:
|
|
198
|
-
type:
|
|
199
|
-
},
|
|
200
|
-
elementType:
|
|
201
|
-
getSlotProps:
|
|
202
|
-
externalSlotProps:
|
|
203
|
-
externalForwardedProps:
|
|
204
|
+
placeholder: M,
|
|
205
|
+
readOnly: q,
|
|
206
|
+
type: Z
|
|
207
|
+
}, ee = r.root ?? "div", le = me({
|
|
208
|
+
elementType: ee,
|
|
209
|
+
getSlotProps: ae,
|
|
210
|
+
externalSlotProps: i.root,
|
|
211
|
+
externalForwardedProps: J,
|
|
204
212
|
additionalProps: {
|
|
205
|
-
ref:
|
|
213
|
+
ref: h
|
|
206
214
|
},
|
|
207
|
-
ownerState:
|
|
208
|
-
className: [
|
|
209
|
-
}),
|
|
210
|
-
elementType:
|
|
211
|
-
getSlotProps: (
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
rows: g ? o : void 0
|
|
215
|
-
}, g && !Ie(t) && {
|
|
216
|
-
minRows: o || c,
|
|
217
|
-
maxRows: o || V
|
|
215
|
+
ownerState: U,
|
|
216
|
+
className: [H.root, B]
|
|
217
|
+
}), Y = p ? r.textarea ?? "textarea" : r.input ?? "input", ne = me({
|
|
218
|
+
elementType: Y,
|
|
219
|
+
getSlotProps: (te) => Q({
|
|
220
|
+
...ie,
|
|
221
|
+
...te
|
|
218
222
|
}),
|
|
219
|
-
|
|
220
|
-
|
|
223
|
+
externalSlotProps: i.input,
|
|
224
|
+
additionalProps: {
|
|
225
|
+
rows: p ? t : void 0,
|
|
226
|
+
...p && !Be(Y) && {
|
|
227
|
+
minRows: t || _,
|
|
228
|
+
maxRows: t || e
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
ownerState: U,
|
|
232
|
+
className: H.input
|
|
233
|
+
});
|
|
234
|
+
return process.env.NODE_ENV !== "production" && p && t && (_ || e) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ T(ee, {
|
|
235
|
+
...le,
|
|
236
|
+
children: [K, /* @__PURE__ */ I(Y, {
|
|
237
|
+
...ne
|
|
238
|
+
}), R]
|
|
221
239
|
});
|
|
222
|
-
return process.env.NODE_ENV !== "production" && g && o && (c || V) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ j(Q, y({}, le, {
|
|
223
|
-
children: [Y, /* @__PURE__ */ A(t, y({}, w)), v]
|
|
224
|
-
}));
|
|
225
240
|
});
|
|
226
|
-
process.env.NODE_ENV !== "production" && (
|
|
241
|
+
process.env.NODE_ENV !== "production" && (he.propTypes = {
|
|
227
242
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
228
243
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
229
244
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -373,13 +388,13 @@ process.env.NODE_ENV !== "production" && (Ne.propTypes = {
|
|
|
373
388
|
*/
|
|
374
389
|
value: n.any
|
|
375
390
|
});
|
|
376
|
-
const
|
|
391
|
+
const Me = "_input_14020_58", qe = "_input__labelWrapper_14020_85", De = "_input__label_14020_85", Ke = "_input__labelHelp_14020_95", s = {
|
|
377
392
|
"input__input-el": "_input__input-el_14020_58",
|
|
378
|
-
input:
|
|
393
|
+
input: Me,
|
|
379
394
|
"input__messages-wrapper": "_input__messages-wrapper_14020_82",
|
|
380
|
-
input__labelWrapper:
|
|
381
|
-
input__label:
|
|
382
|
-
input__labelHelp:
|
|
395
|
+
input__labelWrapper: qe,
|
|
396
|
+
input__label: De,
|
|
397
|
+
input__labelHelp: Ke,
|
|
383
398
|
"input__input-el-wrapper": "_input__input-el-wrapper_14020_100",
|
|
384
399
|
"input__left-icon": "_input__left-icon_14020_125",
|
|
385
400
|
"input__right-icon": "_input__right-icon_14020_125",
|
|
@@ -389,89 +404,89 @@ const qe = "_input_14020_58", De = "_input__labelWrapper_14020_85", $e = "_input
|
|
|
389
404
|
"input--disabled": "_input--disabled_14020_167",
|
|
390
405
|
"input--focused": "_input--focused_14020_173",
|
|
391
406
|
"input--error": "_input--error_14020_176"
|
|
392
|
-
},
|
|
407
|
+
}, Qe = we(
|
|
393
408
|
({
|
|
394
|
-
label:
|
|
395
|
-
labelHelp:
|
|
396
|
-
infoMessage:
|
|
397
|
-
error:
|
|
409
|
+
label: l,
|
|
410
|
+
labelHelp: d,
|
|
411
|
+
infoMessage: h,
|
|
412
|
+
error: w,
|
|
398
413
|
errorMessage: u,
|
|
399
|
-
leftIcon:
|
|
400
|
-
rightIcon:
|
|
414
|
+
leftIcon: y,
|
|
415
|
+
rightIcon: v,
|
|
401
416
|
id: S,
|
|
402
|
-
disabled:
|
|
417
|
+
disabled: B,
|
|
403
418
|
type: m = "text",
|
|
404
|
-
maxLength:
|
|
405
|
-
allowLeadingZeros:
|
|
406
|
-
isInteger:
|
|
407
|
-
useCommaInDecimal:
|
|
408
|
-
allowNegativeNumbers:
|
|
409
|
-
decimalLength:
|
|
410
|
-
hideCharsCounter:
|
|
411
|
-
required:
|
|
412
|
-
onChange:
|
|
413
|
-
triggerDelay:
|
|
414
|
-
classNameWrapper:
|
|
415
|
-
classNameLabel:
|
|
419
|
+
maxLength: a,
|
|
420
|
+
allowLeadingZeros: R = !1,
|
|
421
|
+
isInteger: f,
|
|
422
|
+
useCommaInDecimal: b,
|
|
423
|
+
allowNegativeNumbers: p = !1,
|
|
424
|
+
decimalLength: N = 10,
|
|
425
|
+
hideCharsCounter: k = !1,
|
|
426
|
+
required: A,
|
|
427
|
+
onChange: g,
|
|
428
|
+
triggerDelay: P,
|
|
429
|
+
classNameWrapper: V,
|
|
430
|
+
classNameLabel: C,
|
|
416
431
|
classNameInput: M,
|
|
417
|
-
classNameInfoMessage:
|
|
418
|
-
classNameErrorMessage:
|
|
419
|
-
classNameCharsCounter:
|
|
420
|
-
"data-testid-wrapper":
|
|
421
|
-
"data-testid-label":
|
|
422
|
-
"data-testid-input":
|
|
423
|
-
"data-testid-infoMessage":
|
|
424
|
-
"data-testid-errorMessage":
|
|
425
|
-
"data-testid-charsCounter":
|
|
432
|
+
classNameInfoMessage: q,
|
|
433
|
+
classNameErrorMessage: D,
|
|
434
|
+
classNameCharsCounter: K,
|
|
435
|
+
"data-testid-wrapper": z,
|
|
436
|
+
"data-testid-label": G,
|
|
437
|
+
"data-testid-input": t,
|
|
438
|
+
"data-testid-infoMessage": i,
|
|
439
|
+
"data-testid-errorMessage": r,
|
|
440
|
+
"data-testid-charsCounter": _,
|
|
426
441
|
...e
|
|
427
|
-
},
|
|
428
|
-
var
|
|
429
|
-
const [
|
|
430
|
-
((
|
|
431
|
-
),
|
|
432
|
-
Object.assign(e, { "data-testid":
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
},
|
|
437
|
-
},
|
|
438
|
-
var
|
|
442
|
+
}, J) => {
|
|
443
|
+
var ne, te;
|
|
444
|
+
const [ae, Q] = ye(
|
|
445
|
+
((ne = e.value) == null ? void 0 : ne.length) || ((te = e.defaultValue) == null ? void 0 : te.length) || 0
|
|
446
|
+
), re = Pe(), X = S || `input_${re.replace(/:/g, "-")}`;
|
|
447
|
+
Object.assign(e, { "data-testid": t });
|
|
448
|
+
const $ = a && !k, W = ve(), Z = (o) => {
|
|
449
|
+
W.current && clearTimeout(W.current), W.current = setTimeout(() => {
|
|
450
|
+
U(o);
|
|
451
|
+
}, P);
|
|
452
|
+
}, U = (o) => {
|
|
453
|
+
var E, L, F, ce;
|
|
439
454
|
if (m === "number-as-text") {
|
|
440
|
-
let
|
|
441
|
-
if (!
|
|
442
|
-
const
|
|
443
|
-
|
|
455
|
+
let c = f ? xe(o.target.value, R) : b ? o.target.value.replace(".", ",") : o.target.value.replace(",", ".");
|
|
456
|
+
if (!f && N > 0) {
|
|
457
|
+
const de = String(c), [Ne, fe] = de.split(/,|\./);
|
|
458
|
+
de !== "" && fe && (c = [Ne, fe.slice(0, N)].join(b ? "," : "."));
|
|
444
459
|
}
|
|
445
|
-
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
...
|
|
460
|
+
o.target.value = String(c);
|
|
461
|
+
const oe = !isNaN(Number(String(c).replace(",", "."))), j = String(c).length ? String(c).replace(",", ".") : "";
|
|
462
|
+
g == null || g({
|
|
463
|
+
...o,
|
|
449
464
|
target: {
|
|
450
|
-
...
|
|
451
|
-
value:
|
|
452
|
-
valueAsNumber:
|
|
465
|
+
...o.target,
|
|
466
|
+
value: j,
|
|
467
|
+
valueAsNumber: oe && String(c).length ? Number(String(c).replace(",", ".")) : NaN
|
|
453
468
|
}
|
|
454
|
-
}),
|
|
469
|
+
}), $ && Q((L = (E = o == null ? void 0 : o.target) == null ? void 0 : E.value) == null ? void 0 : L.length);
|
|
455
470
|
return;
|
|
456
471
|
}
|
|
457
472
|
if (m === "number") {
|
|
458
|
-
let
|
|
459
|
-
const [
|
|
460
|
-
|
|
473
|
+
let c = String(o.target.value);
|
|
474
|
+
const [oe, j] = c.split(".");
|
|
475
|
+
c !== "" && (j != null && j.length ? c = [Number(oe), j.slice(0, N)].join(".") : c = String(Number(oe))), o.target.value = c;
|
|
461
476
|
}
|
|
462
|
-
|
|
463
|
-
},
|
|
464
|
-
var
|
|
465
|
-
m === "number-as-text" && (
|
|
466
|
-
},
|
|
467
|
-
var
|
|
468
|
-
if (m === "number-as-text" &&
|
|
469
|
-
const
|
|
470
|
-
let
|
|
471
|
-
isNaN(Number(
|
|
477
|
+
$ && Q((ce = (F = o == null ? void 0 : o.target) == null ? void 0 : F.value) == null ? void 0 : ce.length), g && g(o);
|
|
478
|
+
}, H = (o) => {
|
|
479
|
+
var E;
|
|
480
|
+
m === "number-as-text" && (f ? Re(o, p) : Ee(o, p)), (E = e == null ? void 0 : e.onKeyDown) == null || E.call(e, o);
|
|
481
|
+
}, ie = (o) => {
|
|
482
|
+
var E;
|
|
483
|
+
if (m === "number-as-text" && o.target.value.length) {
|
|
484
|
+
const L = f ? o.target.value.replace(/(,\.)/gi, "") : o.target.value.replace(",", ".");
|
|
485
|
+
let F = String(R ? L : Number(L));
|
|
486
|
+
isNaN(Number(F)) && (F = ""), o.target.value = b ? F.replace(".", ",") : F;
|
|
472
487
|
}
|
|
473
|
-
(
|
|
474
|
-
},
|
|
488
|
+
(E = e == null ? void 0 : e.onBlur) == null || E.call(e, o);
|
|
489
|
+
}, ee = ue(() => e.multiline !== !0 ? {
|
|
475
490
|
type: m === "number-as-text" ? "text" : m,
|
|
476
491
|
multiline: e.multiline
|
|
477
492
|
} : {
|
|
@@ -480,84 +495,84 @@ const qe = "_input_14020_58", De = "_input__labelWrapper_14020_85", $e = "_input
|
|
|
480
495
|
rows: (e == null ? void 0 : e.rows) || 5,
|
|
481
496
|
minRows: e == null ? void 0 : e.minRows,
|
|
482
497
|
maxRows: e == null ? void 0 : e.maxRows
|
|
483
|
-
}, [e]),
|
|
484
|
-
const
|
|
485
|
-
return m === "number-as-text" &&
|
|
486
|
-
}, [e.defaultValue]),
|
|
487
|
-
if (!
|
|
488
|
-
return m === "number-as-text" && (e != null && e.value) ? _e(e == null ? void 0 : e.value,
|
|
498
|
+
}, [e]), le = ue(() => {
|
|
499
|
+
const o = P ? (e == null ? void 0 : e.value) ?? (e == null ? void 0 : e.defaultValue) : e == null ? void 0 : e.defaultValue;
|
|
500
|
+
return m === "number-as-text" && o ? _e(o, b) : o;
|
|
501
|
+
}, [e.defaultValue]), Y = ue(() => {
|
|
502
|
+
if (!P)
|
|
503
|
+
return m === "number-as-text" && (e != null && e.value) ? _e(e == null ? void 0 : e.value, b) : e == null ? void 0 : e.value;
|
|
489
504
|
}, [e.value]);
|
|
490
|
-
return /* @__PURE__ */
|
|
491
|
-
(
|
|
492
|
-
|
|
493
|
-
|
|
505
|
+
return /* @__PURE__ */ T("div", { className: O(s.input, V), "data-testid": z, children: [
|
|
506
|
+
(l || d) && /* @__PURE__ */ T("div", { className: s.input__labelWrapper, children: [
|
|
507
|
+
l && /* @__PURE__ */ T(
|
|
508
|
+
se,
|
|
494
509
|
{
|
|
495
510
|
bold: !0,
|
|
496
511
|
element: "label",
|
|
497
|
-
elementProps: { htmlFor:
|
|
498
|
-
className:
|
|
499
|
-
"data-testid":
|
|
512
|
+
elementProps: { htmlFor: X },
|
|
513
|
+
className: O(s.input__label, C),
|
|
514
|
+
"data-testid": G,
|
|
500
515
|
children: [
|
|
501
|
-
|
|
502
|
-
|
|
516
|
+
l,
|
|
517
|
+
A && /* @__PURE__ */ I("span", { children: "*" })
|
|
503
518
|
]
|
|
504
519
|
}
|
|
505
520
|
),
|
|
506
|
-
|
|
521
|
+
d && /* @__PURE__ */ I("div", { className: s.input__labelHelp, children: d })
|
|
507
522
|
] }),
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
|
|
523
|
+
/* @__PURE__ */ I(
|
|
524
|
+
he,
|
|
510
525
|
{
|
|
511
|
-
id:
|
|
512
|
-
disabled:
|
|
513
|
-
error: typeof
|
|
514
|
-
"aria-label":
|
|
526
|
+
id: X,
|
|
527
|
+
disabled: B,
|
|
528
|
+
error: typeof w == "boolean" ? w : !!u,
|
|
529
|
+
"aria-label": l,
|
|
515
530
|
slotProps: {
|
|
516
|
-
root: (
|
|
517
|
-
className:
|
|
518
|
-
[s["input--disabled"]]:
|
|
519
|
-
[s["input--focused"]]:
|
|
520
|
-
[s["input--error"]]:
|
|
531
|
+
root: (o) => ({
|
|
532
|
+
className: O(s["input__input-el-wrapper"], {
|
|
533
|
+
[s["input--disabled"]]: o.disabled,
|
|
534
|
+
[s["input--focused"]]: o.focused,
|
|
535
|
+
[s["input--error"]]: o.error
|
|
521
536
|
})
|
|
522
537
|
}),
|
|
523
538
|
input: {
|
|
524
|
-
ref:
|
|
525
|
-
className:
|
|
526
|
-
maxLength:
|
|
527
|
-
onChange:
|
|
539
|
+
ref: J,
|
|
540
|
+
className: O(s["input__input-el"], M),
|
|
541
|
+
maxLength: a,
|
|
542
|
+
onChange: P ? Z : U,
|
|
528
543
|
...e,
|
|
529
|
-
onKeyDown:
|
|
530
|
-
onBlur:
|
|
531
|
-
defaultValue:
|
|
532
|
-
value:
|
|
544
|
+
onKeyDown: H,
|
|
545
|
+
onBlur: ie,
|
|
546
|
+
defaultValue: le,
|
|
547
|
+
value: Y
|
|
533
548
|
}
|
|
534
549
|
},
|
|
535
|
-
startAdornment:
|
|
536
|
-
endAdornment:
|
|
537
|
-
...
|
|
550
|
+
startAdornment: y && /* @__PURE__ */ I("span", { className: s["input__left-icon"], children: y }),
|
|
551
|
+
endAdornment: v && /* @__PURE__ */ I("span", { className: s["input__right-icon"], children: v }),
|
|
552
|
+
...ee
|
|
538
553
|
}
|
|
539
554
|
),
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
(u ||
|
|
542
|
-
|
|
555
|
+
/* @__PURE__ */ T("div", { className: s["input__messages-wrapper"], children: [
|
|
556
|
+
(u || h) && /* @__PURE__ */ T(
|
|
557
|
+
se,
|
|
543
558
|
{
|
|
544
|
-
className: u ?
|
|
545
|
-
"data-testid": u ?
|
|
559
|
+
className: u ? O(s["input__error-message"], D) : O(s["input__info-message"], q),
|
|
560
|
+
"data-testid": u ? r : i,
|
|
546
561
|
children: [
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
u ||
|
|
562
|
+
/* @__PURE__ */ I(Se, { icon: u ? "circle-exclamation" : "circle-info" }),
|
|
563
|
+
u || h
|
|
549
564
|
]
|
|
550
565
|
}
|
|
551
566
|
),
|
|
552
|
-
|
|
553
|
-
|
|
567
|
+
$ && /* @__PURE__ */ T(
|
|
568
|
+
se,
|
|
554
569
|
{
|
|
555
|
-
className:
|
|
556
|
-
"data-testid":
|
|
570
|
+
className: O(s["input__chars-counter"], K),
|
|
571
|
+
"data-testid": _,
|
|
557
572
|
children: [
|
|
558
|
-
|
|
573
|
+
ae,
|
|
559
574
|
" / ",
|
|
560
|
-
|
|
575
|
+
a
|
|
561
576
|
]
|
|
562
577
|
}
|
|
563
578
|
)
|
|
@@ -566,5 +581,5 @@ const qe = "_input_14020_58", De = "_input__labelWrapper_14020_85", $e = "_input
|
|
|
566
581
|
}
|
|
567
582
|
);
|
|
568
583
|
export {
|
|
569
|
-
|
|
584
|
+
Qe as Input
|
|
570
585
|
};
|