@pismo/marola 1.0.0-beta.50 → 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.
|
@@ -19,6 +19,8 @@ export type SingleInputProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
19
19
|
rightIcon?: ReactNode;
|
|
20
20
|
/** Input type. Default: text */
|
|
21
21
|
type?: CustomInputTypeAttribute;
|
|
22
|
+
/** Decimal length when the input type is 'number' */
|
|
23
|
+
decimalLength?: number;
|
|
22
24
|
/** Hide the chars counter */
|
|
23
25
|
hideCharsCounter?: boolean;
|
|
24
26
|
/** CSS classes to be applied on the container element */
|
|
@@ -1,229 +1,229 @@
|
|
|
1
1
|
import '../../assets/Input.css';
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as K, jsx as j } from "react/jsx-runtime";
|
|
3
3
|
import * as x from "react";
|
|
4
4
|
import { forwardRef as de, useState as ce, useId as _e, useMemo as he } from "react";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as T } from "../../clsx-DB4S2d7J.js";
|
|
6
6
|
import { Icon as me } from "../Icon/Icon.js";
|
|
7
|
-
import { Typography as
|
|
8
|
-
import { g as fe, a as ye, u as ge, f as
|
|
9
|
-
function
|
|
10
|
-
let
|
|
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
11
|
for (let d = 1; d < arguments.length; d += 1)
|
|
12
|
-
|
|
13
|
-
return "Minified MUI error #" +
|
|
12
|
+
i += "&args[]=" + encodeURIComponent(arguments[d]);
|
|
13
|
+
return "Minified MUI error #" + l + "; visit " + i + " for the full message.";
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
return fe(
|
|
15
|
+
const ne = "Input";
|
|
16
|
+
function Pe(l) {
|
|
17
|
+
return fe(ne, l);
|
|
18
18
|
}
|
|
19
|
-
ye(
|
|
20
|
-
const
|
|
21
|
-
process.env.NODE_ENV !== "production" && (
|
|
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
22
|
function ve() {
|
|
23
|
-
return x.useContext(
|
|
23
|
+
return x.useContext(te);
|
|
24
24
|
}
|
|
25
|
-
function Re(
|
|
25
|
+
function Re(l = {}) {
|
|
26
26
|
const {
|
|
27
|
-
defaultValue:
|
|
27
|
+
defaultValue: i,
|
|
28
28
|
disabled: d = !1,
|
|
29
29
|
error: u = !1,
|
|
30
30
|
onBlur: c,
|
|
31
|
-
onChange:
|
|
32
|
-
onFocus:
|
|
33
|
-
required:
|
|
34
|
-
value:
|
|
35
|
-
inputRef:
|
|
36
|
-
} =
|
|
37
|
-
let
|
|
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
38
|
if (t) {
|
|
39
|
-
var
|
|
40
|
-
if (
|
|
41
|
-
const n = ["defaultValue", "disabled", "error", "required", "value"].filter((
|
|
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
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(`
|
|
43
43
|
`));
|
|
44
44
|
}
|
|
45
45
|
} else
|
|
46
|
-
|
|
46
|
+
E = i, _ = d, g = u, b = P, y = v;
|
|
47
47
|
const {
|
|
48
|
-
current:
|
|
49
|
-
} = x.useRef(y != null),
|
|
48
|
+
current: A
|
|
49
|
+
} = x.useRef(y != null), D = x.useCallback((n) => {
|
|
50
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(`
|
|
51
51
|
`));
|
|
52
|
-
}, []),
|
|
52
|
+
}, []), C = x.useRef(null), B = ge(C, R, D), [F, I] = x.useState(!1);
|
|
53
53
|
x.useEffect(() => {
|
|
54
|
-
!t &&
|
|
55
|
-
}, [t,
|
|
56
|
-
const
|
|
57
|
-
var
|
|
54
|
+
!t && _ && F && (I(!1), c == null || c());
|
|
55
|
+
}, [t, _, F, c]);
|
|
56
|
+
const s = (n) => (r) => {
|
|
57
|
+
var o;
|
|
58
58
|
if (t != null && t.disabled) {
|
|
59
|
-
|
|
59
|
+
r.stopPropagation();
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
if ((
|
|
63
|
-
var
|
|
64
|
-
t == null || (
|
|
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);
|
|
65
65
|
} else
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
var
|
|
69
|
-
(
|
|
70
|
-
},
|
|
71
|
-
var
|
|
72
|
-
if (!
|
|
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." :
|
|
74
|
-
t == null || (
|
|
75
|
-
},
|
|
76
|
-
var
|
|
77
|
-
|
|
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);
|
|
78
78
|
};
|
|
79
79
|
return {
|
|
80
|
-
disabled:
|
|
81
|
-
error:
|
|
82
|
-
focused:
|
|
80
|
+
disabled: _,
|
|
81
|
+
error: g,
|
|
82
|
+
focused: F,
|
|
83
83
|
formControlContext: t,
|
|
84
84
|
getInputProps: (n = {}) => {
|
|
85
|
-
const
|
|
85
|
+
const o = f({}, {
|
|
86
86
|
onBlur: c,
|
|
87
|
-
onChange:
|
|
88
|
-
onFocus:
|
|
89
|
-
},
|
|
90
|
-
onBlur:
|
|
91
|
-
onChange:
|
|
92
|
-
onFocus:
|
|
87
|
+
onChange: m,
|
|
88
|
+
onFocus: N
|
|
89
|
+
}, J(n)), a = f({}, o, {
|
|
90
|
+
onBlur: M(o),
|
|
91
|
+
onChange: H(o),
|
|
92
|
+
onFocus: s(o)
|
|
93
93
|
});
|
|
94
|
-
return f({},
|
|
95
|
-
"aria-invalid":
|
|
96
|
-
defaultValue:
|
|
94
|
+
return f({}, a, {
|
|
95
|
+
"aria-invalid": g || void 0,
|
|
96
|
+
defaultValue: E,
|
|
97
97
|
value: y,
|
|
98
|
-
required:
|
|
99
|
-
disabled:
|
|
98
|
+
required: b,
|
|
99
|
+
disabled: _
|
|
100
100
|
}, n, {
|
|
101
|
-
ref:
|
|
102
|
-
},
|
|
101
|
+
ref: B
|
|
102
|
+
}, a);
|
|
103
103
|
},
|
|
104
104
|
getRootProps: (n = {}) => {
|
|
105
|
-
const
|
|
106
|
-
return f({}, n,
|
|
107
|
-
onClick:
|
|
105
|
+
const r = J(l, ["onBlur", "onChange", "onFocus"]), o = f({}, r, J(n));
|
|
106
|
+
return f({}, n, o, {
|
|
107
|
+
onClick: q(o)
|
|
108
108
|
});
|
|
109
109
|
},
|
|
110
|
-
inputRef:
|
|
111
|
-
required:
|
|
110
|
+
inputRef: B,
|
|
111
|
+
required: b,
|
|
112
112
|
value: y
|
|
113
113
|
};
|
|
114
114
|
}
|
|
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 = (
|
|
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) => {
|
|
116
116
|
const {
|
|
117
|
-
disabled:
|
|
117
|
+
disabled: i,
|
|
118
118
|
error: d,
|
|
119
119
|
focused: u,
|
|
120
120
|
formControlContext: c,
|
|
121
|
-
multiline:
|
|
122
|
-
startAdornment:
|
|
123
|
-
endAdornment:
|
|
124
|
-
} =
|
|
121
|
+
multiline: m,
|
|
122
|
+
startAdornment: N,
|
|
123
|
+
endAdornment: P
|
|
124
|
+
} = l;
|
|
125
125
|
return we({
|
|
126
|
-
root: ["root",
|
|
127
|
-
input: ["input",
|
|
128
|
-
}, xe(
|
|
129
|
-
},
|
|
130
|
-
var u, c,
|
|
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;
|
|
131
131
|
const {
|
|
132
|
-
"aria-describedby":
|
|
133
|
-
"aria-label":
|
|
134
|
-
"aria-labelledby":
|
|
135
|
-
autoComplete:
|
|
132
|
+
"aria-describedby": N,
|
|
133
|
+
"aria-label": P,
|
|
134
|
+
"aria-labelledby": v,
|
|
135
|
+
autoComplete: R,
|
|
136
136
|
autoFocus: t,
|
|
137
|
-
className:
|
|
138
|
-
defaultValue:
|
|
139
|
-
disabled:
|
|
140
|
-
endAdornment:
|
|
137
|
+
className: E,
|
|
138
|
+
defaultValue: _,
|
|
139
|
+
disabled: g,
|
|
140
|
+
endAdornment: b,
|
|
141
141
|
error: y,
|
|
142
|
-
id:
|
|
143
|
-
multiline:
|
|
144
|
-
name:
|
|
145
|
-
onClick:
|
|
146
|
-
onChange:
|
|
147
|
-
onKeyDown:
|
|
148
|
-
onKeyUp:
|
|
149
|
-
onFocus:
|
|
150
|
-
onBlur:
|
|
151
|
-
placeholder:
|
|
152
|
-
readOnly:
|
|
153
|
-
required:
|
|
154
|
-
startAdornment:
|
|
155
|
-
value:
|
|
156
|
-
type:
|
|
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
157
|
rows: n,
|
|
158
|
-
slotProps:
|
|
159
|
-
slots:
|
|
160
|
-
minRows:
|
|
161
|
-
maxRows:
|
|
162
|
-
} =
|
|
163
|
-
getRootProps:
|
|
164
|
-
getInputProps:
|
|
165
|
-
focused:
|
|
158
|
+
slotProps: r = {},
|
|
159
|
+
slots: o = {},
|
|
160
|
+
minRows: a,
|
|
161
|
+
maxRows: w
|
|
162
|
+
} = i, $ = be(i, Ee), {
|
|
163
|
+
getRootProps: O,
|
|
164
|
+
getInputProps: Y,
|
|
165
|
+
focused: V,
|
|
166
166
|
formControlContext: re,
|
|
167
167
|
error: ae,
|
|
168
168
|
disabled: se
|
|
169
169
|
} = Re({
|
|
170
|
-
disabled:
|
|
171
|
-
defaultValue:
|
|
170
|
+
disabled: g,
|
|
171
|
+
defaultValue: _,
|
|
172
172
|
error: y,
|
|
173
|
-
onBlur:
|
|
174
|
-
onClick:
|
|
175
|
-
onChange:
|
|
176
|
-
onFocus:
|
|
177
|
-
required:
|
|
178
|
-
value:
|
|
179
|
-
}),
|
|
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, {
|
|
180
180
|
disabled: se,
|
|
181
181
|
error: ae,
|
|
182
|
-
focused:
|
|
182
|
+
focused: V,
|
|
183
183
|
formControlContext: re,
|
|
184
|
-
multiline:
|
|
185
|
-
type:
|
|
186
|
-
}),
|
|
187
|
-
"aria-describedby":
|
|
188
|
-
"aria-label":
|
|
189
|
-
"aria-labelledby":
|
|
190
|
-
autoComplete:
|
|
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
191
|
autoFocus: t,
|
|
192
|
-
id:
|
|
193
|
-
onKeyDown:
|
|
194
|
-
onKeyUp:
|
|
195
|
-
name:
|
|
196
|
-
placeholder:
|
|
197
|
-
readOnly:
|
|
198
|
-
type:
|
|
199
|
-
},
|
|
200
|
-
elementType:
|
|
201
|
-
getSlotProps:
|
|
202
|
-
externalSlotProps:
|
|
203
|
-
externalForwardedProps:
|
|
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,
|
|
202
|
+
externalSlotProps: r.root,
|
|
203
|
+
externalForwardedProps: $,
|
|
204
204
|
additionalProps: {
|
|
205
205
|
ref: d
|
|
206
206
|
},
|
|
207
|
-
ownerState:
|
|
208
|
-
className: [
|
|
209
|
-
}),
|
|
210
|
-
elementType:
|
|
211
|
-
getSlotProps: (pe) =>
|
|
212
|
-
externalSlotProps:
|
|
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)),
|
|
212
|
+
externalSlotProps: r.input,
|
|
213
213
|
additionalProps: f({
|
|
214
|
-
rows:
|
|
215
|
-
},
|
|
216
|
-
minRows: n ||
|
|
217
|
-
maxRows: n ||
|
|
214
|
+
rows: h ? n : void 0
|
|
215
|
+
}, h && !Ce(z) && {
|
|
216
|
+
minRows: n || a,
|
|
217
|
+
maxRows: n || w
|
|
218
218
|
}),
|
|
219
|
-
ownerState:
|
|
220
|
-
className:
|
|
219
|
+
ownerState: W,
|
|
220
|
+
className: X.input
|
|
221
221
|
});
|
|
222
|
-
return process.env.NODE_ENV !== "production" &&
|
|
223
|
-
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]
|
|
224
224
|
}));
|
|
225
225
|
});
|
|
226
|
-
process.env.NODE_ENV !== "production" && (
|
|
226
|
+
process.env.NODE_ENV !== "production" && (oe.propTypes = {
|
|
227
227
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
228
228
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
229
229
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -402,109 +402,115 @@ const Ie = "_input_3n32h_57", Oe = "_input__label_3n32h_84", p = {
|
|
|
402
402
|
"input--disabled": "_input--disabled_3n32h_150",
|
|
403
403
|
"input--focused": "_input--focused_3n32h_156",
|
|
404
404
|
"input--error": "_input--error_3n32h_159"
|
|
405
|
-
},
|
|
405
|
+
}, je = de(
|
|
406
406
|
({
|
|
407
|
-
label:
|
|
408
|
-
infoMessage:
|
|
407
|
+
label: l,
|
|
408
|
+
infoMessage: i,
|
|
409
409
|
error: d,
|
|
410
410
|
errorMessage: u,
|
|
411
411
|
leftIcon: c,
|
|
412
|
-
rightIcon:
|
|
413
|
-
id:
|
|
414
|
-
disabled:
|
|
415
|
-
type:
|
|
416
|
-
maxLength:
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
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,
|
|
420
421
|
classNameLabel: b,
|
|
421
|
-
classNameInput:
|
|
422
|
-
classNameInfoMessage:
|
|
423
|
-
classNameErrorMessage:
|
|
424
|
-
classNameCharsCounter:
|
|
425
|
-
"data-testid-wrapper":
|
|
426
|
-
"data-testid-label":
|
|
427
|
-
"data-testid-input":
|
|
428
|
-
"data-testid-infoMessage":
|
|
429
|
-
"data-testid-errorMessage":
|
|
430
|
-
"data-testid-charsCounter":
|
|
431
|
-
...
|
|
432
|
-
},
|
|
433
|
-
const [
|
|
434
|
-
Object.assign(
|
|
435
|
-
const
|
|
436
|
-
var
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
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;
|
|
442
|
+
}
|
|
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
|
|
441
447
|
} : {
|
|
442
448
|
type: void 0,
|
|
443
|
-
multiline:
|
|
444
|
-
rows: (
|
|
445
|
-
minRows:
|
|
446
|
-
maxRows:
|
|
447
|
-
}, [
|
|
448
|
-
return /* @__PURE__ */
|
|
449
|
-
|
|
450
|
-
|
|
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,
|
|
451
457
|
{
|
|
452
458
|
element: "label",
|
|
453
|
-
elementProps: { htmlFor:
|
|
454
|
-
className:
|
|
455
|
-
"data-testid":
|
|
456
|
-
children:
|
|
459
|
+
elementProps: { htmlFor: U },
|
|
460
|
+
className: T(p.input__label, b),
|
|
461
|
+
"data-testid": D,
|
|
462
|
+
children: l
|
|
457
463
|
}
|
|
458
464
|
),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
|
|
465
|
+
/* @__PURE__ */ j(
|
|
466
|
+
oe,
|
|
461
467
|
{
|
|
462
|
-
id:
|
|
463
|
-
disabled:
|
|
468
|
+
id: U,
|
|
469
|
+
disabled: P,
|
|
464
470
|
error: typeof d == "boolean" ? d : !!u,
|
|
465
|
-
"aria-label":
|
|
471
|
+
"aria-label": l,
|
|
466
472
|
slotProps: {
|
|
467
|
-
root: (
|
|
468
|
-
className:
|
|
469
|
-
[p["input--disabled"]]:
|
|
470
|
-
[p["input--focused"]]:
|
|
471
|
-
[p["input--error"]]:
|
|
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
|
|
472
478
|
})
|
|
473
479
|
}),
|
|
474
480
|
input: {
|
|
475
|
-
ref:
|
|
476
|
-
className:
|
|
477
|
-
maxLength:
|
|
478
|
-
onChange:
|
|
479
|
-
...
|
|
481
|
+
ref: M,
|
|
482
|
+
className: T(p["input__input-el"], y),
|
|
483
|
+
maxLength: R,
|
|
484
|
+
onChange: r,
|
|
485
|
+
...s
|
|
480
486
|
}
|
|
481
487
|
},
|
|
482
|
-
startAdornment: c && /* @__PURE__ */
|
|
483
|
-
endAdornment:
|
|
484
|
-
...
|
|
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
|
|
485
491
|
}
|
|
486
492
|
),
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
(u ||
|
|
489
|
-
|
|
493
|
+
/* @__PURE__ */ K("div", { className: p["input__messages-wrapper"], children: [
|
|
494
|
+
(u || i) && /* @__PURE__ */ K(
|
|
495
|
+
G,
|
|
490
496
|
{
|
|
491
|
-
className: u ?
|
|
492
|
-
"data-testid": u ?
|
|
497
|
+
className: u ? T(p["input__error-message"], h) : T(p["input__info-message"], k),
|
|
498
|
+
"data-testid": u ? F : B,
|
|
493
499
|
children: [
|
|
494
|
-
/* @__PURE__ */
|
|
495
|
-
u ||
|
|
500
|
+
/* @__PURE__ */ j(me, { icon: u ? "circle-exclamation" : "circle-info" }),
|
|
501
|
+
u || i
|
|
496
502
|
]
|
|
497
503
|
}
|
|
498
504
|
),
|
|
499
|
-
|
|
500
|
-
|
|
505
|
+
n && /* @__PURE__ */ K(
|
|
506
|
+
G,
|
|
501
507
|
{
|
|
502
|
-
className:
|
|
503
|
-
"data-testid":
|
|
508
|
+
className: T(p["input__chars-counter"], S),
|
|
509
|
+
"data-testid": I,
|
|
504
510
|
children: [
|
|
505
|
-
|
|
511
|
+
H,
|
|
506
512
|
" / ",
|
|
507
|
-
|
|
513
|
+
R
|
|
508
514
|
]
|
|
509
515
|
}
|
|
510
516
|
)
|
|
@@ -513,5 +519,5 @@ const Ie = "_input_3n32h_57", Oe = "_input__label_3n32h_84", p = {
|
|
|
513
519
|
}
|
|
514
520
|
);
|
|
515
521
|
export {
|
|
516
|
-
|
|
522
|
+
je as Input
|
|
517
523
|
};
|
|
@@ -13,6 +13,7 @@ export declare const InputSearch: import('react').ForwardRefExoticComponent<(Omi
|
|
|
13
13
|
leftIcon?: import('react').ReactNode;
|
|
14
14
|
rightIcon?: import('react').ReactNode;
|
|
15
15
|
type?: ("number" | "url" | "file" | "color" | "search" | (string & {}) | "button" | "time" | "image" | "text" | "reset" | "tel" | "email" | "date" | "hidden" | "range" | "datetime-local" | "month" | "password" | "week") | undefined;
|
|
16
|
+
decimalLength?: number | undefined;
|
|
16
17
|
hideCharsCounter?: boolean | undefined;
|
|
17
18
|
classNameWrapper?: string | undefined;
|
|
18
19
|
classNameLabel?: string | undefined;
|
|
@@ -14,6 +14,7 @@ declare const meta: {
|
|
|
14
14
|
leftIcon?: import('react').ReactNode;
|
|
15
15
|
rightIcon?: import('react').ReactNode;
|
|
16
16
|
type?: ("number" | "url" | "file" | "color" | "search" | (string & {}) | "button" | "time" | "image" | "text" | "reset" | "tel" | "email" | "date" | "hidden" | "range" | "datetime-local" | "month" | "password" | "week") | undefined;
|
|
17
|
+
decimalLength?: number | undefined;
|
|
17
18
|
hideCharsCounter?: boolean | undefined;
|
|
18
19
|
classNameWrapper?: string | undefined;
|
|
19
20
|
classNameLabel?: string | undefined;
|