@pismo/marola 2.1.36 → 2.1.37
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/DatePicker.module-BdYkgv4A.js +45 -0
- package/dist/SelectButton-C7KNiPyJ.js +58 -0
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/DoubleInput.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/Toggle.css +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.js +472 -464
- package/dist/components/DatePicker/DatePicker.stories.d.ts +4 -0
- package/dist/components/DatePicker/renderCalendarDays.js +1 -1
- package/dist/components/DatePicker/renderDualCalendarHeader.js +1 -1
- package/dist/components/DatePicker/renderHeader.js +1 -1
- package/dist/components/DatePicker/renderNavigatorInput.js +1 -1
- package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
- package/dist/components/DoubleInput/DoubleInput.js +16 -16
- package/dist/components/DoubleInput/DoubleInput.stories.d.ts +1 -0
- package/dist/components/Input/Input.js +144 -144
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Toggle/Toggle.js +46 -46
- package/dist/components/Toggle/Toggle.stories.d.ts +2 -1
- package/package.json +1 -1
- package/dist/DatePicker.module-gd1PqICl.js +0 -45
- package/dist/SelectButton-k61YYjLu.js +0 -58
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { jsxs as $, jsx as Y } from "react/jsx-runtime";
|
|
2
2
|
import * as F from "react";
|
|
3
|
-
import { forwardRef as ge, useState as he, useId as
|
|
4
|
-
import { formatDecimalValue as
|
|
5
|
-
import { c as
|
|
6
|
-
import { Icon as
|
|
3
|
+
import { forwardRef as ge, useState as he, useId as ye, useMemo as re } from "react";
|
|
4
|
+
import { formatDecimalValue as ce, allowOnlyIntegerNumbers as xe, allowOnlyNumbers as we, parseToInteger as Ne } from "../../utils/inputNumberAsText.js";
|
|
5
|
+
import { c as U } from "../../clsx-OuTLNxxd.js";
|
|
6
|
+
import { Icon as Ce } from "../Icon/Icon.js";
|
|
7
7
|
import { Typography as ie } from "../Typography/Typography.js";
|
|
8
|
-
import { g as ve, a as Pe, u as Re, f as ue, _ as
|
|
9
|
-
import '../../assets/Input.css';function
|
|
8
|
+
import { g as ve, a as Pe, u as Re, f as ue, _ as N, b as Ee, c as pe, i as Ve, d as Fe, e as Se, P as n } from "../../useSlotProps-CYHDC4TN.js";
|
|
9
|
+
import '../../assets/Input.css';function Oe(u) {
|
|
10
10
|
let d = "https://mui.com/production-error/?code=" + u;
|
|
11
11
|
for (let b = 1; b < arguments.length; b += 1)
|
|
12
12
|
d += "&args[]=" + encodeURIComponent(arguments[b]);
|
|
13
13
|
return "Minified MUI error #" + u + "; visit " + d + " for the full message.";
|
|
14
14
|
}
|
|
15
15
|
const fe = "Input";
|
|
16
|
-
function
|
|
16
|
+
function Te(u) {
|
|
17
17
|
return ve(fe, u);
|
|
18
18
|
}
|
|
19
19
|
Pe(fe, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
20
20
|
const me = /* @__PURE__ */ F.createContext(void 0);
|
|
21
21
|
process.env.NODE_ENV !== "production" && (me.displayName = "FormControlContext");
|
|
22
|
-
function
|
|
22
|
+
function Ie() {
|
|
23
23
|
return F.useContext(me);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Be(u = {}) {
|
|
26
26
|
const {
|
|
27
27
|
defaultValue: d,
|
|
28
28
|
disabled: b = !1,
|
|
29
|
-
error:
|
|
29
|
+
error: p = !1,
|
|
30
30
|
onBlur: g,
|
|
31
31
|
onChange: h,
|
|
32
32
|
onFocus: S,
|
|
33
|
-
required:
|
|
33
|
+
required: O = !1,
|
|
34
34
|
value: f,
|
|
35
|
-
inputRef:
|
|
36
|
-
} = u, l =
|
|
37
|
-
let
|
|
35
|
+
inputRef: T
|
|
36
|
+
} = u, l = Ie();
|
|
37
|
+
let y, c, C, x, v;
|
|
38
38
|
if (l) {
|
|
39
|
-
var
|
|
40
|
-
if (
|
|
39
|
+
var j, s, A;
|
|
40
|
+
if (y = void 0, c = (j = l.disabled) != null ? j : !1, C = (s = l.error) != null ? s : !1, x = (A = l.required) != null ? A : !1, v = l.value, process.env.NODE_ENV !== "production") {
|
|
41
41
|
const o = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => u[r] !== void 0);
|
|
42
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(`
|
|
43
43
|
`));
|
|
44
44
|
}
|
|
45
45
|
} else
|
|
46
|
-
|
|
46
|
+
y = d, c = b, C = p, x = O, v = f;
|
|
47
47
|
const {
|
|
48
48
|
current: L
|
|
49
49
|
} = F.useRef(v != null), W = F.useCallback((o) => {
|
|
50
50
|
process.env.NODE_ENV !== "production" && o && o.nodeName !== "INPUT" && !o.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
|
-
}, []), R = F.useRef(null),
|
|
52
|
+
}, []), R = F.useRef(null), k = Re(R, T, W), [I, B] = F.useState(!1);
|
|
53
53
|
F.useEffect(() => {
|
|
54
|
-
!l &&
|
|
55
|
-
}, [l,
|
|
54
|
+
!l && c && I && (B(!1), g == null || g());
|
|
55
|
+
}, [l, c, I, g]);
|
|
56
56
|
const z = (o) => (r) => {
|
|
57
57
|
var a;
|
|
58
58
|
if (l != null && l.disabled) {
|
|
@@ -63,91 +63,91 @@ function Ie(u = {}) {
|
|
|
63
63
|
var m;
|
|
64
64
|
l == null || (m = l.onFocus) == null || m.call(l);
|
|
65
65
|
} else
|
|
66
|
-
|
|
66
|
+
B(!0);
|
|
67
67
|
}, G = (o) => (r) => {
|
|
68
68
|
var a;
|
|
69
|
-
(a = o.onBlur) == null || a.call(o, r), l && l.onBlur ? l.onBlur() :
|
|
69
|
+
(a = o.onBlur) == null || a.call(o, r), l && l.onBlur ? l.onBlur() : B(!1);
|
|
70
70
|
}, J = (o) => (r, ...a) => {
|
|
71
71
|
var m, E;
|
|
72
72
|
if (!L && (r.target || R.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." :
|
|
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." : Oe(17));
|
|
74
74
|
l == null || (m = l.onChange) == null || m.call(l, r), (E = o.onChange) == null || E.call(o, r, ...a);
|
|
75
75
|
}, Q = (o) => (r) => {
|
|
76
76
|
var a;
|
|
77
77
|
R.current && r.currentTarget === r.target && R.current.focus(), (a = o.onClick) == null || a.call(o, r);
|
|
78
78
|
};
|
|
79
79
|
return {
|
|
80
|
-
disabled:
|
|
81
|
-
error:
|
|
82
|
-
focused:
|
|
80
|
+
disabled: c,
|
|
81
|
+
error: C,
|
|
82
|
+
focused: I,
|
|
83
83
|
formControlContext: l,
|
|
84
84
|
getInputProps: (o = {}) => {
|
|
85
|
-
const a =
|
|
85
|
+
const a = N({}, {
|
|
86
86
|
onBlur: g,
|
|
87
87
|
onChange: h,
|
|
88
88
|
onFocus: S
|
|
89
|
-
}, ue(o)), m =
|
|
89
|
+
}, ue(o)), m = N({}, a, {
|
|
90
90
|
onBlur: G(a),
|
|
91
91
|
onChange: J(a),
|
|
92
92
|
onFocus: z(a)
|
|
93
93
|
});
|
|
94
|
-
return
|
|
95
|
-
"aria-invalid":
|
|
96
|
-
defaultValue:
|
|
94
|
+
return N({}, m, {
|
|
95
|
+
"aria-invalid": C || void 0,
|
|
96
|
+
defaultValue: y,
|
|
97
97
|
value: v,
|
|
98
|
-
required:
|
|
99
|
-
disabled:
|
|
98
|
+
required: x,
|
|
99
|
+
disabled: c
|
|
100
100
|
}, o, {
|
|
101
|
-
ref:
|
|
101
|
+
ref: k
|
|
102
102
|
}, m);
|
|
103
103
|
},
|
|
104
104
|
getRootProps: (o = {}) => {
|
|
105
|
-
const r = ue(u, ["onBlur", "onChange", "onFocus"]), a =
|
|
106
|
-
return
|
|
105
|
+
const r = ue(u, ["onBlur", "onChange", "onFocus"]), a = N({}, r, ue(o));
|
|
106
|
+
return N({}, o, a, {
|
|
107
107
|
onClick: Q(a)
|
|
108
108
|
});
|
|
109
109
|
},
|
|
110
|
-
inputRef:
|
|
111
|
-
required:
|
|
110
|
+
inputRef: k,
|
|
111
|
+
required: x,
|
|
112
112
|
value: v
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Ue = ["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"], je = (u) => {
|
|
116
116
|
const {
|
|
117
117
|
disabled: d,
|
|
118
118
|
error: b,
|
|
119
|
-
focused:
|
|
119
|
+
focused: p,
|
|
120
120
|
formControlContext: g,
|
|
121
121
|
multiline: h,
|
|
122
122
|
startAdornment: S,
|
|
123
|
-
endAdornment:
|
|
123
|
+
endAdornment: O
|
|
124
124
|
} = u;
|
|
125
125
|
return Fe({
|
|
126
|
-
root: ["root", d && "disabled", b && "error",
|
|
126
|
+
root: ["root", d && "disabled", b && "error", p && "focused", !!g && "formControl", h && "multiline", !!S && "adornedStart", !!O && "adornedEnd"],
|
|
127
127
|
input: ["input", d && "disabled", h && "multiline"]
|
|
128
|
-
}, Se(
|
|
128
|
+
}, Se(Te));
|
|
129
129
|
}, _e = /* @__PURE__ */ F.forwardRef(function(d, b) {
|
|
130
|
-
var
|
|
130
|
+
var p, g, h;
|
|
131
131
|
const {
|
|
132
132
|
"aria-describedby": S,
|
|
133
|
-
"aria-label":
|
|
133
|
+
"aria-label": O,
|
|
134
134
|
"aria-labelledby": f,
|
|
135
|
-
autoComplete:
|
|
135
|
+
autoComplete: T,
|
|
136
136
|
autoFocus: l,
|
|
137
|
-
className:
|
|
138
|
-
defaultValue:
|
|
139
|
-
disabled:
|
|
140
|
-
endAdornment:
|
|
137
|
+
className: y,
|
|
138
|
+
defaultValue: c,
|
|
139
|
+
disabled: C,
|
|
140
|
+
endAdornment: x,
|
|
141
141
|
error: v,
|
|
142
|
-
id:
|
|
142
|
+
id: j,
|
|
143
143
|
multiline: s = !1,
|
|
144
|
-
name:
|
|
144
|
+
name: A,
|
|
145
145
|
onClick: L,
|
|
146
146
|
onChange: W,
|
|
147
147
|
onKeyDown: R,
|
|
148
|
-
onKeyUp:
|
|
149
|
-
onFocus:
|
|
150
|
-
onBlur:
|
|
148
|
+
onKeyUp: k,
|
|
149
|
+
onFocus: I,
|
|
150
|
+
onBlur: B,
|
|
151
151
|
placeholder: z,
|
|
152
152
|
readOnly: G,
|
|
153
153
|
required: J,
|
|
@@ -159,68 +159,68 @@ const Be = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
|
|
|
159
159
|
slots: a = {},
|
|
160
160
|
minRows: m,
|
|
161
161
|
maxRows: E
|
|
162
|
-
} = d,
|
|
162
|
+
} = d, D = Ee(d, Ue), {
|
|
163
163
|
getRootProps: ee,
|
|
164
164
|
getInputProps: ne,
|
|
165
165
|
focused: te,
|
|
166
166
|
formControlContext: oe,
|
|
167
167
|
error: le,
|
|
168
168
|
disabled: ae
|
|
169
|
-
} =
|
|
170
|
-
disabled:
|
|
171
|
-
defaultValue:
|
|
169
|
+
} = Be({
|
|
170
|
+
disabled: C,
|
|
171
|
+
defaultValue: c,
|
|
172
172
|
error: v,
|
|
173
|
-
onBlur:
|
|
173
|
+
onBlur: B,
|
|
174
174
|
onClick: L,
|
|
175
175
|
onChange: W,
|
|
176
|
-
onFocus:
|
|
176
|
+
onFocus: I,
|
|
177
177
|
required: J,
|
|
178
178
|
value: Z
|
|
179
|
-
}), X = s ? void 0 : e ?? "text",
|
|
179
|
+
}), X = s ? void 0 : e ?? "text", M = N({}, d, {
|
|
180
180
|
disabled: ae,
|
|
181
181
|
error: le,
|
|
182
182
|
focused: te,
|
|
183
183
|
formControlContext: oe,
|
|
184
184
|
multiline: s,
|
|
185
185
|
type: X
|
|
186
|
-
}), t =
|
|
186
|
+
}), t = je(M), w = {
|
|
187
187
|
"aria-describedby": S,
|
|
188
|
-
"aria-label":
|
|
188
|
+
"aria-label": O,
|
|
189
189
|
"aria-labelledby": f,
|
|
190
|
-
autoComplete:
|
|
190
|
+
autoComplete: T,
|
|
191
191
|
autoFocus: l,
|
|
192
|
-
id:
|
|
192
|
+
id: j,
|
|
193
193
|
onKeyDown: R,
|
|
194
|
-
onKeyUp:
|
|
195
|
-
name:
|
|
194
|
+
onKeyUp: k,
|
|
195
|
+
name: A,
|
|
196
196
|
placeholder: z,
|
|
197
197
|
readOnly: G,
|
|
198
198
|
type: X
|
|
199
|
-
}, V = (
|
|
199
|
+
}, V = (p = a.root) != null ? p : "div", P = pe({
|
|
200
200
|
elementType: V,
|
|
201
201
|
getSlotProps: ee,
|
|
202
202
|
externalSlotProps: r.root,
|
|
203
|
-
externalForwardedProps:
|
|
203
|
+
externalForwardedProps: D,
|
|
204
204
|
additionalProps: {
|
|
205
205
|
ref: b
|
|
206
206
|
},
|
|
207
|
-
ownerState:
|
|
208
|
-
className: [t.root,
|
|
209
|
-
}),
|
|
210
|
-
elementType:
|
|
211
|
-
getSlotProps: (
|
|
207
|
+
ownerState: M,
|
|
208
|
+
className: [t.root, y]
|
|
209
|
+
}), H = s ? (g = a.textarea) != null ? g : "textarea" : (h = a.input) != null ? h : "input", i = pe({
|
|
210
|
+
elementType: H,
|
|
211
|
+
getSlotProps: (K) => ne(N({}, w, K)),
|
|
212
212
|
externalSlotProps: r.input,
|
|
213
|
-
additionalProps:
|
|
213
|
+
additionalProps: N({
|
|
214
214
|
rows: s ? o : void 0
|
|
215
|
-
}, s && !Ve(
|
|
215
|
+
}, s && !Ve(H) && {
|
|
216
216
|
minRows: o || m,
|
|
217
217
|
maxRows: o || E
|
|
218
218
|
}),
|
|
219
|
-
ownerState:
|
|
219
|
+
ownerState: M,
|
|
220
220
|
className: t.input
|
|
221
221
|
});
|
|
222
|
-
return process.env.NODE_ENV !== "production" && s && o && (m || E) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ $(V,
|
|
223
|
-
children: [Q, /* @__PURE__ */ Y(
|
|
222
|
+
return process.env.NODE_ENV !== "production" && s && o && (m || E) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ $(V, N({}, P, {
|
|
223
|
+
children: [Q, /* @__PURE__ */ Y(H, N({}, i)), x]
|
|
224
224
|
}));
|
|
225
225
|
});
|
|
226
226
|
process.env.NODE_ENV !== "production" && (_e.propTypes = {
|
|
@@ -373,47 +373,47 @@ process.env.NODE_ENV !== "production" && (_e.propTypes = {
|
|
|
373
373
|
*/
|
|
374
374
|
value: n.any
|
|
375
375
|
});
|
|
376
|
-
const
|
|
377
|
-
"input__input-el": "_input__input-
|
|
378
|
-
input:
|
|
379
|
-
"input__messages-wrapper": "_input__messages-
|
|
380
|
-
input__label:
|
|
381
|
-
"input__input-el-wrapper": "_input__input-el-
|
|
382
|
-
"input__left-icon": "_input__left-
|
|
383
|
-
"input__right-icon": "_input__right-
|
|
384
|
-
"input__info-message": "_input__info-
|
|
385
|
-
"input__error-message": "_input__error-
|
|
386
|
-
"input__chars-counter": "_input__chars-
|
|
387
|
-
"input--disabled": "_input--
|
|
388
|
-
"input--focused": "_input--
|
|
389
|
-
"input--error": "_input--
|
|
376
|
+
const Ae = "_input_1cxiy_58", ke = "_input__label_1cxiy_85", _ = {
|
|
377
|
+
"input__input-el": "_input__input-el_1cxiy_58",
|
|
378
|
+
input: Ae,
|
|
379
|
+
"input__messages-wrapper": "_input__messages-wrapper_1cxiy_82",
|
|
380
|
+
input__label: ke,
|
|
381
|
+
"input__input-el-wrapper": "_input__input-el-wrapper_1cxiy_90",
|
|
382
|
+
"input__left-icon": "_input__left-icon_1cxiy_115",
|
|
383
|
+
"input__right-icon": "_input__right-icon_1cxiy_115",
|
|
384
|
+
"input__info-message": "_input__info-message_1cxiy_141",
|
|
385
|
+
"input__error-message": "_input__error-message_1cxiy_141",
|
|
386
|
+
"input__chars-counter": "_input__chars-counter_1cxiy_152",
|
|
387
|
+
"input--disabled": "_input--disabled_1cxiy_157",
|
|
388
|
+
"input--focused": "_input--focused_1cxiy_163",
|
|
389
|
+
"input--error": "_input--error_1cxiy_166"
|
|
390
390
|
}, Le = ge(
|
|
391
391
|
({
|
|
392
392
|
label: u,
|
|
393
393
|
infoMessage: d,
|
|
394
394
|
error: b,
|
|
395
|
-
errorMessage:
|
|
395
|
+
errorMessage: p,
|
|
396
396
|
leftIcon: g,
|
|
397
397
|
rightIcon: h,
|
|
398
398
|
id: S,
|
|
399
|
-
disabled:
|
|
399
|
+
disabled: O,
|
|
400
400
|
type: f = "text",
|
|
401
|
-
maxLength:
|
|
401
|
+
maxLength: T,
|
|
402
402
|
allowLeadingZeros: l = !1,
|
|
403
|
-
isInteger:
|
|
404
|
-
useCommaInDecimal:
|
|
405
|
-
allowNegativeNumbers:
|
|
406
|
-
decimalLength:
|
|
403
|
+
isInteger: y,
|
|
404
|
+
useCommaInDecimal: c,
|
|
405
|
+
allowNegativeNumbers: C = !1,
|
|
406
|
+
decimalLength: x = 10,
|
|
407
407
|
hideCharsCounter: v = !1,
|
|
408
|
-
required:
|
|
408
|
+
required: j,
|
|
409
409
|
onChange: s,
|
|
410
|
-
classNameWrapper:
|
|
410
|
+
classNameWrapper: A,
|
|
411
411
|
classNameLabel: L,
|
|
412
412
|
classNameInput: W,
|
|
413
413
|
classNameInfoMessage: R,
|
|
414
|
-
classNameErrorMessage:
|
|
415
|
-
classNameCharsCounter:
|
|
416
|
-
"data-testid-wrapper":
|
|
414
|
+
classNameErrorMessage: k,
|
|
415
|
+
classNameCharsCounter: I,
|
|
416
|
+
"data-testid-wrapper": B,
|
|
417
417
|
"data-testid-label": z,
|
|
418
418
|
"data-testid-input": G,
|
|
419
419
|
"data-testid-infoMessage": J,
|
|
@@ -421,48 +421,48 @@ const je = "_input_101pq_57", Ae = "_input__label_101pq_84", _ = {
|
|
|
421
421
|
"data-testid-charsCounter": Z,
|
|
422
422
|
...e
|
|
423
423
|
}, o) => {
|
|
424
|
-
var X,
|
|
424
|
+
var X, M;
|
|
425
425
|
const [r, a] = he(
|
|
426
|
-
((X = e.value) == null ? void 0 : X.length) || ((
|
|
427
|
-
), m =
|
|
426
|
+
((X = e.value) == null ? void 0 : X.length) || ((M = e.defaultValue) == null ? void 0 : M.length) || 0
|
|
427
|
+
), m = ye(), E = S || `input_${m}`;
|
|
428
428
|
Object.assign(e, { "data-testid": G });
|
|
429
|
-
const
|
|
430
|
-
var
|
|
429
|
+
const D = T && !v, ee = (t) => {
|
|
430
|
+
var w, V, P, H;
|
|
431
431
|
if (f === "number-as-text") {
|
|
432
|
-
let i =
|
|
433
|
-
if (!
|
|
432
|
+
let i = y ? Ne(t.target.value, l) : c ? t.target.value.replace(".", ",") : t.target.value.replace(",", ".");
|
|
433
|
+
if (!y && x > 0) {
|
|
434
434
|
const se = String(i), [be, de] = se.split(/,|\./);
|
|
435
|
-
se !== "" && de && (i = [be, de.slice(0,
|
|
435
|
+
se !== "" && de && (i = [be, de.slice(0, x)].join(c ? "," : "."));
|
|
436
436
|
}
|
|
437
437
|
t.target.value = String(i);
|
|
438
|
-
const
|
|
438
|
+
const K = !isNaN(Number(String(i).replace(",", "."))), q = String(i).length ? String(i).replace(",", ".") : "";
|
|
439
439
|
s == null || s({
|
|
440
440
|
...t,
|
|
441
441
|
target: {
|
|
442
442
|
...t.target,
|
|
443
|
-
value:
|
|
444
|
-
valueAsNumber:
|
|
443
|
+
value: q,
|
|
444
|
+
valueAsNumber: K && String(i).length ? Number(String(i).replace(",", ".")) : NaN
|
|
445
445
|
}
|
|
446
|
-
}),
|
|
446
|
+
}), D && a((V = (w = t == null ? void 0 : t.target) == null ? void 0 : w.value) == null ? void 0 : V.length);
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
449
|
if (f === "number") {
|
|
450
450
|
let i = String(t.target.value);
|
|
451
|
-
const [
|
|
452
|
-
i !== "" && (
|
|
451
|
+
const [K, q] = i.split(".");
|
|
452
|
+
i !== "" && (q != null && q.length ? i = [Number(K), q.slice(0, x)].join(".") : i = String(Number(K))), t.target.value = i;
|
|
453
453
|
}
|
|
454
|
-
|
|
454
|
+
D && a((H = (P = t == null ? void 0 : t.target) == null ? void 0 : P.value) == null ? void 0 : H.length), s && s(t);
|
|
455
455
|
}, ne = (t) => {
|
|
456
|
-
var
|
|
457
|
-
f === "number-as-text" && (
|
|
456
|
+
var w;
|
|
457
|
+
f === "number-as-text" && (y ? xe(t, C) : we(t, C)), (w = e == null ? void 0 : e.onKeyDown) == null || w.call(e, t);
|
|
458
458
|
}, te = (t) => {
|
|
459
|
-
var
|
|
459
|
+
var w;
|
|
460
460
|
if (f === "number-as-text" && t.target.value.length) {
|
|
461
|
-
const V =
|
|
461
|
+
const V = y ? t.target.value.replace(/(,\.)/gi, "") : t.target.value.replace(",", ".");
|
|
462
462
|
let P = String(l ? V : Number(V));
|
|
463
|
-
isNaN(Number(P)) && (P = ""), t.target.value =
|
|
463
|
+
isNaN(Number(P)) && (P = ""), t.target.value = c ? P.replace(".", ",") : P;
|
|
464
464
|
}
|
|
465
|
-
(
|
|
465
|
+
(w = e == null ? void 0 : e.onBlur) == null || w.call(e, t);
|
|
466
466
|
}, oe = re(() => e.multiline !== !0 ? {
|
|
467
467
|
type: f === "number-as-text" ? "text" : f,
|
|
468
468
|
multiline: e.multiline
|
|
@@ -472,19 +472,19 @@ const je = "_input_101pq_57", Ae = "_input__label_101pq_84", _ = {
|
|
|
472
472
|
rows: (e == null ? void 0 : e.rows) || 5,
|
|
473
473
|
minRows: e == null ? void 0 : e.minRows,
|
|
474
474
|
maxRows: e == null ? void 0 : e.maxRows
|
|
475
|
-
}, [e]), le = re(() => f === "number-as-text" && (e != null && e.defaultValue) ?
|
|
476
|
-
return /* @__PURE__ */ $("div", { className:
|
|
475
|
+
}, [e]), le = re(() => f === "number-as-text" && (e != null && e.defaultValue) ? ce(e == null ? void 0 : e.defaultValue, c) : e == null ? void 0 : e.defaultValue, [e.defaultValue]), ae = re(() => f === "number-as-text" && (e != null && e.value) ? ce(e == null ? void 0 : e.value, c) : e == null ? void 0 : e.value, [e.value]);
|
|
476
|
+
return /* @__PURE__ */ $("div", { className: U(_.input, A), "data-testid": B, children: [
|
|
477
477
|
u && /* @__PURE__ */ $(
|
|
478
478
|
ie,
|
|
479
479
|
{
|
|
480
480
|
bold: !0,
|
|
481
481
|
element: "label",
|
|
482
482
|
elementProps: { htmlFor: E },
|
|
483
|
-
className:
|
|
483
|
+
className: U(_.input__label, L),
|
|
484
484
|
"data-testid": z,
|
|
485
485
|
children: [
|
|
486
486
|
u,
|
|
487
|
-
|
|
487
|
+
j && /* @__PURE__ */ Y("span", { children: "*" })
|
|
488
488
|
]
|
|
489
489
|
}
|
|
490
490
|
),
|
|
@@ -492,12 +492,12 @@ const je = "_input_101pq_57", Ae = "_input__label_101pq_84", _ = {
|
|
|
492
492
|
_e,
|
|
493
493
|
{
|
|
494
494
|
id: E,
|
|
495
|
-
disabled:
|
|
496
|
-
error: typeof b == "boolean" ? b : !!
|
|
495
|
+
disabled: O,
|
|
496
|
+
error: typeof b == "boolean" ? b : !!p,
|
|
497
497
|
"aria-label": u,
|
|
498
498
|
slotProps: {
|
|
499
499
|
root: (t) => ({
|
|
500
|
-
className:
|
|
500
|
+
className: U(_["input__input-el-wrapper"], {
|
|
501
501
|
[_["input--disabled"]]: t.disabled,
|
|
502
502
|
[_["input--focused"]]: t.focused,
|
|
503
503
|
[_["input--error"]]: t.error
|
|
@@ -505,8 +505,8 @@ const je = "_input_101pq_57", Ae = "_input__label_101pq_84", _ = {
|
|
|
505
505
|
}),
|
|
506
506
|
input: {
|
|
507
507
|
ref: o,
|
|
508
|
-
className:
|
|
509
|
-
maxLength:
|
|
508
|
+
className: U(_["input__input-el"], W),
|
|
509
|
+
maxLength: T,
|
|
510
510
|
onChange: ee,
|
|
511
511
|
...e,
|
|
512
512
|
onKeyDown: ne,
|
|
@@ -521,26 +521,26 @@ const je = "_input_101pq_57", Ae = "_input__label_101pq_84", _ = {
|
|
|
521
521
|
}
|
|
522
522
|
),
|
|
523
523
|
/* @__PURE__ */ $("div", { className: _["input__messages-wrapper"], children: [
|
|
524
|
-
(
|
|
524
|
+
(p || d) && /* @__PURE__ */ $(
|
|
525
525
|
ie,
|
|
526
526
|
{
|
|
527
|
-
className:
|
|
528
|
-
"data-testid":
|
|
527
|
+
className: p ? U(_["input__error-message"], k) : U(_["input__info-message"], R),
|
|
528
|
+
"data-testid": p ? Q : J,
|
|
529
529
|
children: [
|
|
530
|
-
/* @__PURE__ */ Y(
|
|
531
|
-
|
|
530
|
+
/* @__PURE__ */ Y(Ce, { icon: p ? "circle-exclamation" : "circle-info" }),
|
|
531
|
+
p || d
|
|
532
532
|
]
|
|
533
533
|
}
|
|
534
534
|
),
|
|
535
|
-
|
|
535
|
+
D && /* @__PURE__ */ $(
|
|
536
536
|
ie,
|
|
537
537
|
{
|
|
538
|
-
className:
|
|
538
|
+
className: U(_["input__chars-counter"], I),
|
|
539
539
|
"data-testid": Z,
|
|
540
540
|
children: [
|
|
541
541
|
r,
|
|
542
542
|
" / ",
|
|
543
|
-
|
|
543
|
+
T
|
|
544
544
|
]
|
|
545
545
|
}
|
|
546
546
|
)
|
|
@@ -5,7 +5,7 @@ import { c as K } from "../../clsx-OuTLNxxd.js";
|
|
|
5
5
|
import { Checkbox as Qe } from "../Checkbox/Checkbox.js";
|
|
6
6
|
import { Icon as Xe } from "../Icon/Icon.js";
|
|
7
7
|
import { Typography as _e } from "../Typography/Typography.js";
|
|
8
|
-
import { s as y, S as Ye } from "../../SelectButton-
|
|
8
|
+
import { s as y, S as Ye } from "../../SelectButton-C7KNiPyJ.js";
|
|
9
9
|
import { g as we, a as Ie, u as ee, f as se, _ as g, b as Ne, c as re, d as ke, e as Me, P as l } from "../../useSlotProps-CYHDC4TN.js";
|
|
10
10
|
import { P as Ze } from "../../Popup-Dffqo7wT.js";
|
|
11
11
|
import { u as et, c as ae, a as Se, L as Z } from "../../combineHooksSlotProps-BhQ14uyD.js";
|