@pismo/marola 1.0.0-beta.5 → 1.0.0-beta.51
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-DspH8hyO.js +30 -0
- package/dist/Popover.module-B4boCutS.js +10 -0
- package/dist/{Popup-B6ZSGIEI.js → Popup-Ck3XlWMq.js} +3 -3
- package/dist/{Portal-DIeBsWdL.js → Portal-oY3enyAm.js} +2 -2
- package/dist/SelectButton-B38avP9u.js +75 -0
- package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
- package/dist/Toggle-CzkXi3_R.js +189 -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/Popover.css +1 -0
- 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 +10 -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 +177 -52
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +42 -42
- package/dist/components/Input/Input.d.ts +26 -5
- package/dist/components/Input/Input.js +319 -304
- package/dist/components/Input/Input.stories.d.ts +2 -21
- package/dist/components/InputSearch/InputSearch.d.ts +37 -7
- package/dist/components/InputSearch/InputSearch.js +27 -29
- package/dist/components/InputSearch/InputSearch.stories.d.ts +15 -3
- 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/Popover/Popover.d.ts +32 -0
- package/dist/components/Popover/Popover.js +24 -0
- package/dist/components/Popover/Popover.stories.d.ts +34 -0
- package/dist/components/Popover/PopoverBody.d.ts +6 -0
- package/dist/components/Popover/PopoverBody.js +6 -0
- package/dist/components/Popover/PopoverFooter.d.ts +6 -0
- package/dist/components/Popover/PopoverFooter.js +6 -0
- package/dist/components/Popover/PopoverHeader.d.ts +6 -0
- package/dist/components/Popover/PopoverHeader.js +6 -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 +22 -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 +21 -0
- package/dist/components/Select/Select.js +476 -413
- package/dist/components/Select/SelectButton.d.ts +2 -0
- package/dist/components/Select/SelectButton.js +3 -2
- 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 +58 -0
- package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -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.d.ts +2 -0
- package/dist/components/ToggleGroup/Group.js +4 -2
- package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
- package/dist/components/ToggleGroup/Toggle.js +8 -5
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +3 -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 +6 -0
- package/dist/main.js +87 -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,228 +1,229 @@
|
|
|
1
1
|
import '../../assets/Input.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { jsxs as K, jsx as j } from "react/jsx-runtime";
|
|
3
|
+
import * as x from "react";
|
|
4
|
+
import { forwardRef as de, useState as ce, useId as _e, useMemo as he } from "react";
|
|
5
|
+
import { c as T } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
import { Icon as me } from "../Icon/Icon.js";
|
|
7
|
+
import { Typography as G } from "../Typography/Typography.js";
|
|
8
|
+
import { g as fe, a as ye, u as ge, f as J, b as f, _ as be, c as ee, i as Ce, P as e, d as we, e as xe } from "../../useSlotProps-C_I1kEHr.js";
|
|
9
|
+
function Ne(l) {
|
|
10
|
+
let i = "https://mui.com/production-error/?code=" + l;
|
|
11
|
+
for (let d = 1; d < arguments.length; d += 1)
|
|
12
|
+
i += "&args[]=" + encodeURIComponent(arguments[d]);
|
|
13
|
+
return "Minified MUI error #" + l + "; visit " + i + " for the full message.";
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return h.useContext(X);
|
|
15
|
+
const ne = "Input";
|
|
16
|
+
function Pe(l) {
|
|
17
|
+
return fe(ne, l);
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
ye(ne, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
20
|
+
const te = /* @__PURE__ */ x.createContext(void 0);
|
|
21
|
+
process.env.NODE_ENV !== "production" && (te.displayName = "FormControlContext");
|
|
22
|
+
function ve() {
|
|
23
|
+
return x.useContext(te);
|
|
22
24
|
}
|
|
23
|
-
|
|
24
|
-
function ke(a = {}) {
|
|
25
|
+
function Re(l = {}) {
|
|
25
26
|
const {
|
|
26
|
-
defaultValue:
|
|
27
|
-
disabled:
|
|
28
|
-
error:
|
|
29
|
-
onBlur:
|
|
30
|
-
onChange:
|
|
31
|
-
onFocus:
|
|
32
|
-
required:
|
|
33
|
-
value:
|
|
34
|
-
inputRef:
|
|
35
|
-
} =
|
|
36
|
-
let
|
|
37
|
-
if (
|
|
38
|
-
var
|
|
39
|
-
if (
|
|
40
|
-
const
|
|
41
|
-
|
|
27
|
+
defaultValue: i,
|
|
28
|
+
disabled: d = !1,
|
|
29
|
+
error: u = !1,
|
|
30
|
+
onBlur: c,
|
|
31
|
+
onChange: m,
|
|
32
|
+
onFocus: N,
|
|
33
|
+
required: P = !1,
|
|
34
|
+
value: v,
|
|
35
|
+
inputRef: R
|
|
36
|
+
} = l, t = ve();
|
|
37
|
+
let E, _, g, b, y;
|
|
38
|
+
if (t) {
|
|
39
|
+
var k, h, S;
|
|
40
|
+
if (E = void 0, _ = (k = t.disabled) != null ? k : !1, g = (h = t.error) != null ? h : !1, b = (S = t.required) != null ? S : !1, y = t.value, process.env.NODE_ENV !== "production") {
|
|
41
|
+
const n = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => l[r] !== void 0);
|
|
42
|
+
n.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: ${n.join(", ")}`].join(`
|
|
42
43
|
`));
|
|
43
44
|
}
|
|
44
45
|
} else
|
|
45
|
-
|
|
46
|
+
E = i, _ = d, g = u, b = P, y = v;
|
|
46
47
|
const {
|
|
47
|
-
current:
|
|
48
|
-
} =
|
|
49
|
-
process.env.NODE_ENV !== "production" &&
|
|
48
|
+
current: A
|
|
49
|
+
} = x.useRef(y != null), D = x.useCallback((n) => {
|
|
50
|
+
process.env.NODE_ENV !== "production" && n && n.nodeName !== "INPUT" && !n.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
51
|
`));
|
|
51
|
-
}, []),
|
|
52
|
-
|
|
53
|
-
!
|
|
54
|
-
}, [
|
|
55
|
-
const
|
|
56
|
-
var
|
|
57
|
-
if (
|
|
52
|
+
}, []), C = x.useRef(null), B = ge(C, R, D), [F, I] = x.useState(!1);
|
|
53
|
+
x.useEffect(() => {
|
|
54
|
+
!t && _ && F && (I(!1), c == null || c());
|
|
55
|
+
}, [t, _, F, c]);
|
|
56
|
+
const s = (n) => (r) => {
|
|
57
|
+
var o;
|
|
58
|
+
if (t != null && t.disabled) {
|
|
58
59
|
r.stopPropagation();
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
|
-
if ((
|
|
62
|
-
var
|
|
63
|
-
|
|
62
|
+
if ((o = n.onFocus) == null || o.call(n, r), t && t.onFocus) {
|
|
63
|
+
var a;
|
|
64
|
+
t == null || (a = t.onFocus) == null || a.call(t);
|
|
64
65
|
} 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
|
-
|
|
66
|
+
I(!0);
|
|
67
|
+
}, M = (n) => (r) => {
|
|
68
|
+
var o;
|
|
69
|
+
(o = n.onBlur) == null || o.call(n, r), t && t.onBlur ? t.onBlur() : I(!1);
|
|
70
|
+
}, H = (n) => (r, ...o) => {
|
|
71
|
+
var a, w;
|
|
72
|
+
if (!A && (r.target || C.current) == null)
|
|
73
|
+
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." : Ne(17));
|
|
74
|
+
t == null || (a = t.onChange) == null || a.call(t, r), (w = n.onChange) == null || w.call(n, r, ...o);
|
|
75
|
+
}, q = (n) => (r) => {
|
|
76
|
+
var o;
|
|
77
|
+
C.current && r.currentTarget === r.target && C.current.focus(), (o = n.onClick) == null || o.call(n, r);
|
|
77
78
|
};
|
|
78
79
|
return {
|
|
79
80
|
disabled: _,
|
|
80
|
-
error:
|
|
81
|
-
focused:
|
|
82
|
-
formControlContext:
|
|
83
|
-
getInputProps: (
|
|
84
|
-
const
|
|
85
|
-
onBlur:
|
|
86
|
-
onChange:
|
|
87
|
-
onFocus:
|
|
88
|
-
},
|
|
89
|
-
onBlur:
|
|
90
|
-
onChange:
|
|
91
|
-
onFocus:
|
|
81
|
+
error: g,
|
|
82
|
+
focused: F,
|
|
83
|
+
formControlContext: t,
|
|
84
|
+
getInputProps: (n = {}) => {
|
|
85
|
+
const o = f({}, {
|
|
86
|
+
onBlur: c,
|
|
87
|
+
onChange: m,
|
|
88
|
+
onFocus: N
|
|
89
|
+
}, J(n)), a = f({}, o, {
|
|
90
|
+
onBlur: M(o),
|
|
91
|
+
onChange: H(o),
|
|
92
|
+
onFocus: s(o)
|
|
92
93
|
});
|
|
93
|
-
return
|
|
94
|
-
"aria-invalid":
|
|
95
|
-
defaultValue:
|
|
94
|
+
return f({}, a, {
|
|
95
|
+
"aria-invalid": g || void 0,
|
|
96
|
+
defaultValue: E,
|
|
96
97
|
value: y,
|
|
97
|
-
required:
|
|
98
|
+
required: b,
|
|
98
99
|
disabled: _
|
|
99
|
-
},
|
|
100
|
-
ref:
|
|
101
|
-
},
|
|
100
|
+
}, n, {
|
|
101
|
+
ref: B
|
|
102
|
+
}, a);
|
|
102
103
|
},
|
|
103
|
-
getRootProps: (
|
|
104
|
-
const r =
|
|
105
|
-
return
|
|
106
|
-
onClick:
|
|
104
|
+
getRootProps: (n = {}) => {
|
|
105
|
+
const r = J(l, ["onBlur", "onChange", "onFocus"]), o = f({}, r, J(n));
|
|
106
|
+
return f({}, n, o, {
|
|
107
|
+
onClick: q(o)
|
|
107
108
|
});
|
|
108
109
|
},
|
|
109
|
-
inputRef:
|
|
110
|
-
required:
|
|
110
|
+
inputRef: B,
|
|
111
|
+
required: b,
|
|
111
112
|
value: y
|
|
112
113
|
};
|
|
113
114
|
}
|
|
114
|
-
const
|
|
115
|
+
const Ee = ["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"], Fe = (l) => {
|
|
115
116
|
const {
|
|
116
|
-
disabled:
|
|
117
|
-
error:
|
|
118
|
-
focused:
|
|
119
|
-
formControlContext:
|
|
120
|
-
multiline:
|
|
121
|
-
startAdornment:
|
|
122
|
-
endAdornment:
|
|
123
|
-
} =
|
|
124
|
-
return
|
|
125
|
-
root: ["root",
|
|
126
|
-
input: ["input",
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
var
|
|
117
|
+
disabled: i,
|
|
118
|
+
error: d,
|
|
119
|
+
focused: u,
|
|
120
|
+
formControlContext: c,
|
|
121
|
+
multiline: m,
|
|
122
|
+
startAdornment: N,
|
|
123
|
+
endAdornment: P
|
|
124
|
+
} = l;
|
|
125
|
+
return we({
|
|
126
|
+
root: ["root", i && "disabled", d && "error", u && "focused", !!c && "formControl", m && "multiline", !!N && "adornedStart", !!P && "adornedEnd"],
|
|
127
|
+
input: ["input", i && "disabled", m && "multiline"]
|
|
128
|
+
}, xe(Pe));
|
|
129
|
+
}, oe = /* @__PURE__ */ x.forwardRef(function(i, d) {
|
|
130
|
+
var u, c, m;
|
|
130
131
|
const {
|
|
131
|
-
"aria-describedby":
|
|
132
|
-
"aria-label":
|
|
133
|
-
"aria-labelledby":
|
|
134
|
-
autoComplete:
|
|
135
|
-
autoFocus:
|
|
136
|
-
className:
|
|
132
|
+
"aria-describedby": N,
|
|
133
|
+
"aria-label": P,
|
|
134
|
+
"aria-labelledby": v,
|
|
135
|
+
autoComplete: R,
|
|
136
|
+
autoFocus: t,
|
|
137
|
+
className: E,
|
|
137
138
|
defaultValue: _,
|
|
138
|
-
disabled:
|
|
139
|
-
endAdornment:
|
|
139
|
+
disabled: g,
|
|
140
|
+
endAdornment: b,
|
|
140
141
|
error: y,
|
|
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:
|
|
156
|
-
rows:
|
|
142
|
+
id: k,
|
|
143
|
+
multiline: h = !1,
|
|
144
|
+
name: S,
|
|
145
|
+
onClick: A,
|
|
146
|
+
onChange: D,
|
|
147
|
+
onKeyDown: C,
|
|
148
|
+
onKeyUp: B,
|
|
149
|
+
onFocus: F,
|
|
150
|
+
onBlur: I,
|
|
151
|
+
placeholder: s,
|
|
152
|
+
readOnly: M,
|
|
153
|
+
required: H,
|
|
154
|
+
startAdornment: q,
|
|
155
|
+
value: L,
|
|
156
|
+
type: U,
|
|
157
|
+
rows: n,
|
|
157
158
|
slotProps: r = {},
|
|
158
|
-
slots:
|
|
159
|
-
minRows:
|
|
160
|
-
maxRows:
|
|
161
|
-
} =
|
|
162
|
-
getRootProps:
|
|
163
|
-
getInputProps:
|
|
164
|
-
focused:
|
|
159
|
+
slots: o = {},
|
|
160
|
+
minRows: a,
|
|
161
|
+
maxRows: w
|
|
162
|
+
} = i, $ = be(i, Ee), {
|
|
163
|
+
getRootProps: O,
|
|
164
|
+
getInputProps: Y,
|
|
165
|
+
focused: V,
|
|
165
166
|
formControlContext: re,
|
|
166
167
|
error: ae,
|
|
167
168
|
disabled: se
|
|
168
|
-
} =
|
|
169
|
-
disabled:
|
|
169
|
+
} = Re({
|
|
170
|
+
disabled: g,
|
|
170
171
|
defaultValue: _,
|
|
171
172
|
error: y,
|
|
172
|
-
onBlur:
|
|
173
|
-
onClick:
|
|
174
|
-
onChange:
|
|
175
|
-
onFocus:
|
|
176
|
-
required:
|
|
177
|
-
value:
|
|
178
|
-
}),
|
|
173
|
+
onBlur: I,
|
|
174
|
+
onClick: A,
|
|
175
|
+
onChange: D,
|
|
176
|
+
onFocus: F,
|
|
177
|
+
required: H,
|
|
178
|
+
value: L
|
|
179
|
+
}), Q = h ? void 0 : U ?? "text", W = f({}, i, {
|
|
179
180
|
disabled: se,
|
|
180
181
|
error: ae,
|
|
181
|
-
focused:
|
|
182
|
+
focused: V,
|
|
182
183
|
formControlContext: re,
|
|
183
|
-
multiline:
|
|
184
|
-
type:
|
|
185
|
-
}),
|
|
186
|
-
"aria-describedby":
|
|
187
|
-
"aria-label":
|
|
188
|
-
"aria-labelledby":
|
|
189
|
-
autoComplete:
|
|
190
|
-
autoFocus:
|
|
191
|
-
id:
|
|
192
|
-
onKeyDown:
|
|
193
|
-
onKeyUp:
|
|
194
|
-
name:
|
|
195
|
-
placeholder:
|
|
196
|
-
readOnly:
|
|
197
|
-
type:
|
|
198
|
-
},
|
|
199
|
-
elementType:
|
|
200
|
-
getSlotProps:
|
|
184
|
+
multiline: h,
|
|
185
|
+
type: Q
|
|
186
|
+
}), X = Fe(W), le = {
|
|
187
|
+
"aria-describedby": N,
|
|
188
|
+
"aria-label": P,
|
|
189
|
+
"aria-labelledby": v,
|
|
190
|
+
autoComplete: R,
|
|
191
|
+
autoFocus: t,
|
|
192
|
+
id: k,
|
|
193
|
+
onKeyDown: C,
|
|
194
|
+
onKeyUp: B,
|
|
195
|
+
name: S,
|
|
196
|
+
placeholder: s,
|
|
197
|
+
readOnly: M,
|
|
198
|
+
type: Q
|
|
199
|
+
}, Z = (u = o.root) != null ? u : "div", ie = ee({
|
|
200
|
+
elementType: Z,
|
|
201
|
+
getSlotProps: O,
|
|
201
202
|
externalSlotProps: r.root,
|
|
202
|
-
externalForwardedProps:
|
|
203
|
+
externalForwardedProps: $,
|
|
203
204
|
additionalProps: {
|
|
204
|
-
ref:
|
|
205
|
+
ref: d
|
|
205
206
|
},
|
|
206
|
-
ownerState:
|
|
207
|
-
className: [
|
|
208
|
-
}),
|
|
209
|
-
elementType:
|
|
210
|
-
getSlotProps: (pe) =>
|
|
207
|
+
ownerState: W,
|
|
208
|
+
className: [X.root, E]
|
|
209
|
+
}), z = h ? (c = o.textarea) != null ? c : "textarea" : (m = o.input) != null ? m : "input", ue = ee({
|
|
210
|
+
elementType: z,
|
|
211
|
+
getSlotProps: (pe) => Y(f({}, le, pe)),
|
|
211
212
|
externalSlotProps: r.input,
|
|
212
|
-
additionalProps:
|
|
213
|
-
rows:
|
|
214
|
-
},
|
|
215
|
-
minRows:
|
|
216
|
-
maxRows:
|
|
213
|
+
additionalProps: f({
|
|
214
|
+
rows: h ? n : void 0
|
|
215
|
+
}, h && !Ce(z) && {
|
|
216
|
+
minRows: n || a,
|
|
217
|
+
maxRows: n || w
|
|
217
218
|
}),
|
|
218
|
-
ownerState:
|
|
219
|
-
className:
|
|
219
|
+
ownerState: W,
|
|
220
|
+
className: X.input
|
|
220
221
|
});
|
|
221
|
-
return process.env.NODE_ENV !== "production" &&
|
|
222
|
-
children: [
|
|
222
|
+
return process.env.NODE_ENV !== "production" && h && n && (a || w) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ K(Z, f({}, ie, {
|
|
223
|
+
children: [q, /* @__PURE__ */ j(z, f({}, ue)), b]
|
|
223
224
|
}));
|
|
224
225
|
});
|
|
225
|
-
process.env.NODE_ENV !== "production" && (
|
|
226
|
+
process.env.NODE_ENV !== "production" && (oe.propTypes = {
|
|
226
227
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
227
228
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
228
229
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -372,137 +373,151 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
|
372
373
|
*/
|
|
373
374
|
value: e.any
|
|
374
375
|
});
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
"u-typography-
|
|
382
|
-
"u-typography-
|
|
383
|
-
"u-typography-
|
|
384
|
-
"u-typography-
|
|
385
|
-
"u-typography-
|
|
386
|
-
"
|
|
387
|
-
"u-typography-base": "_u-typography-
|
|
388
|
-
"u-typography-base--
|
|
389
|
-
"u-typography-base--
|
|
390
|
-
"u-typography-base--
|
|
391
|
-
"
|
|
392
|
-
|
|
393
|
-
"
|
|
394
|
-
|
|
395
|
-
"
|
|
396
|
-
"
|
|
397
|
-
|
|
398
|
-
"
|
|
399
|
-
"
|
|
400
|
-
"
|
|
401
|
-
"
|
|
402
|
-
"
|
|
403
|
-
"
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
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
|
-
return /* @__PURE__ */ q("div", { className: R(u.input, P), "data-testid": p, children: [
|
|
442
|
-
a && /* @__PURE__ */ B(
|
|
443
|
-
L,
|
|
444
|
-
{
|
|
445
|
-
element: "label",
|
|
446
|
-
elementProps: { htmlFor: T },
|
|
447
|
-
className: R(u.input__label, _),
|
|
448
|
-
"data-testid": I,
|
|
449
|
-
children: a
|
|
450
|
-
}
|
|
451
|
-
),
|
|
452
|
-
/* @__PURE__ */ B(
|
|
453
|
-
ee,
|
|
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 })
|
|
376
|
+
const Ie = "_input_3n32h_57", Oe = "_input__label_3n32h_84", p = {
|
|
377
|
+
"u-typography-h1": "_u-typography-h1_3n32h_1",
|
|
378
|
+
"u-typography-h2": "_u-typography-h2_3n32h_8",
|
|
379
|
+
"u-typography-h3": "_u-typography-h3_3n32h_15",
|
|
380
|
+
"u-typography-h4": "_u-typography-h4_3n32h_22",
|
|
381
|
+
"u-typography-h5": "_u-typography-h5_3n32h_29",
|
|
382
|
+
"u-typography-h6": "_u-typography-h6_3n32h_36",
|
|
383
|
+
"u-typography-base": "_u-typography-base_3n32h_43",
|
|
384
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_3n32h_49",
|
|
385
|
+
"u-typography-base--xl": "_u-typography-base--xl_3n32h_53",
|
|
386
|
+
"u-typography-base--lg": "_u-typography-base--lg_3n32h_57",
|
|
387
|
+
"input__input-el": "_input__input-el_3n32h_57",
|
|
388
|
+
"u-typography-base--sm": "_u-typography-base--sm_3n32h_61",
|
|
389
|
+
"u-typography-base--bold": "_u-typography-base--bold_3n32h_65",
|
|
390
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_3n32h_68",
|
|
391
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_3n32h_71",
|
|
392
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_3n32h_74",
|
|
393
|
+
input: Ie,
|
|
394
|
+
"input__messages-wrapper": "_input__messages-wrapper_3n32h_81",
|
|
395
|
+
input__label: Oe,
|
|
396
|
+
"input__input-el-wrapper": "_input__input-el-wrapper_3n32h_89",
|
|
397
|
+
"input__left-icon": "_input__left-icon_3n32h_108",
|
|
398
|
+
"input__right-icon": "_input__right-icon_3n32h_108",
|
|
399
|
+
"input__info-message": "_input__info-message_3n32h_134",
|
|
400
|
+
"input__error-message": "_input__error-message_3n32h_134",
|
|
401
|
+
"input__chars-counter": "_input__chars-counter_3n32h_145",
|
|
402
|
+
"input--disabled": "_input--disabled_3n32h_150",
|
|
403
|
+
"input--focused": "_input--focused_3n32h_156",
|
|
404
|
+
"input--error": "_input--error_3n32h_159"
|
|
405
|
+
}, je = de(
|
|
406
|
+
({
|
|
407
|
+
label: l,
|
|
408
|
+
infoMessage: i,
|
|
409
|
+
error: d,
|
|
410
|
+
errorMessage: u,
|
|
411
|
+
leftIcon: c,
|
|
412
|
+
rightIcon: m,
|
|
413
|
+
id: N,
|
|
414
|
+
disabled: P,
|
|
415
|
+
type: v = "text",
|
|
416
|
+
maxLength: R,
|
|
417
|
+
decimalLength: t = 10,
|
|
418
|
+
hideCharsCounter: E = !1,
|
|
419
|
+
onChange: _,
|
|
420
|
+
classNameWrapper: g,
|
|
421
|
+
classNameLabel: b,
|
|
422
|
+
classNameInput: y,
|
|
423
|
+
classNameInfoMessage: k,
|
|
424
|
+
classNameErrorMessage: h,
|
|
425
|
+
classNameCharsCounter: S,
|
|
426
|
+
"data-testid-wrapper": A,
|
|
427
|
+
"data-testid-label": D,
|
|
428
|
+
"data-testid-input": C,
|
|
429
|
+
"data-testid-infoMessage": B,
|
|
430
|
+
"data-testid-errorMessage": F,
|
|
431
|
+
"data-testid-charsCounter": I,
|
|
432
|
+
...s
|
|
433
|
+
}, M) => {
|
|
434
|
+
const [H, q] = ce(0), L = _e(), U = N || `input_${L}`;
|
|
435
|
+
Object.assign(s, { "data-testid": C });
|
|
436
|
+
const n = R && !E, r = (a) => {
|
|
437
|
+
var w, $;
|
|
438
|
+
if (v === "number") {
|
|
439
|
+
let O = String(a.target.value);
|
|
440
|
+
const [Y, V] = O.split(".");
|
|
441
|
+
O !== "" && (V != null && V.length ? O = [Number(Y), V.slice(0, t)].join(".") : O = String(Number(Y))), a.target.value = O;
|
|
477
442
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
443
|
+
n && q(($ = (w = a == null ? void 0 : a.target) == null ? void 0 : w.value) == null ? void 0 : $.length), _ && _(a);
|
|
444
|
+
}, o = he(() => s.multiline !== !0 ? {
|
|
445
|
+
type: v,
|
|
446
|
+
multiline: s.multiline
|
|
447
|
+
} : {
|
|
448
|
+
type: void 0,
|
|
449
|
+
multiline: s.multiline,
|
|
450
|
+
rows: (s == null ? void 0 : s.rows) || 5,
|
|
451
|
+
minRows: s == null ? void 0 : s.minRows,
|
|
452
|
+
maxRows: s == null ? void 0 : s.maxRows
|
|
453
|
+
}, [s]);
|
|
454
|
+
return /* @__PURE__ */ K("div", { className: T(p.input, g), "data-testid": A, children: [
|
|
455
|
+
l && /* @__PURE__ */ j(
|
|
456
|
+
G,
|
|
482
457
|
{
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
]
|
|
458
|
+
element: "label",
|
|
459
|
+
elementProps: { htmlFor: U },
|
|
460
|
+
className: T(p.input__label, b),
|
|
461
|
+
"data-testid": D,
|
|
462
|
+
children: l
|
|
489
463
|
}
|
|
490
464
|
),
|
|
491
|
-
|
|
492
|
-
|
|
465
|
+
/* @__PURE__ */ j(
|
|
466
|
+
oe,
|
|
493
467
|
{
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
468
|
+
id: U,
|
|
469
|
+
disabled: P,
|
|
470
|
+
error: typeof d == "boolean" ? d : !!u,
|
|
471
|
+
"aria-label": l,
|
|
472
|
+
slotProps: {
|
|
473
|
+
root: (a) => ({
|
|
474
|
+
className: T(p["input__input-el-wrapper"], {
|
|
475
|
+
[p["input--disabled"]]: a.disabled,
|
|
476
|
+
[p["input--focused"]]: a.focused,
|
|
477
|
+
[p["input--error"]]: a.error
|
|
478
|
+
})
|
|
479
|
+
}),
|
|
480
|
+
input: {
|
|
481
|
+
ref: M,
|
|
482
|
+
className: T(p["input__input-el"], y),
|
|
483
|
+
maxLength: R,
|
|
484
|
+
onChange: r,
|
|
485
|
+
...s
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
startAdornment: c && /* @__PURE__ */ j("span", { className: p["input__left-icon"], children: c }),
|
|
489
|
+
endAdornment: m && /* @__PURE__ */ j("span", { className: p["input__right-icon"], children: m }),
|
|
490
|
+
...o
|
|
501
491
|
}
|
|
502
|
-
)
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
492
|
+
),
|
|
493
|
+
/* @__PURE__ */ K("div", { className: p["input__messages-wrapper"], children: [
|
|
494
|
+
(u || i) && /* @__PURE__ */ K(
|
|
495
|
+
G,
|
|
496
|
+
{
|
|
497
|
+
className: u ? T(p["input__error-message"], h) : T(p["input__info-message"], k),
|
|
498
|
+
"data-testid": u ? F : B,
|
|
499
|
+
children: [
|
|
500
|
+
/* @__PURE__ */ j(me, { icon: u ? "circle-exclamation" : "circle-info" }),
|
|
501
|
+
u || i
|
|
502
|
+
]
|
|
503
|
+
}
|
|
504
|
+
),
|
|
505
|
+
n && /* @__PURE__ */ K(
|
|
506
|
+
G,
|
|
507
|
+
{
|
|
508
|
+
className: T(p["input__chars-counter"], S),
|
|
509
|
+
"data-testid": I,
|
|
510
|
+
children: [
|
|
511
|
+
H,
|
|
512
|
+
" / ",
|
|
513
|
+
R
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
)
|
|
517
|
+
] })
|
|
518
|
+
] });
|
|
519
|
+
}
|
|
520
|
+
);
|
|
506
521
|
export {
|
|
507
|
-
|
|
522
|
+
je as Input
|
|
508
523
|
};
|