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