@pismo/marola 2.1.59 → 2.1.61

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.
@@ -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 xe, useState as we, useId as Ne, useRef as Ce, useMemo as ue } from "react";
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 U } from "../../clsx-OuTLNxxd.js";
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 Ve, a as Fe, u as Se, f as de, _ as w, b as Oe, c as _e, i as Te, d as Ie, e as Be, P as n } from "../../useSlotProps-CYHDC4TN.js";
9
- import '../../assets/Input.css';function Ue(r) {
10
- let u = "https://mui.com/production-error/?code=" + r;
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
- u += "&args[]=" + encodeURIComponent(arguments[_]);
13
- return "Minified MUI error #" + r + "; visit " + u + " for the full message.";
12
+ i += "&args[]=" + encodeURIComponent(arguments[_]);
13
+ return "Minified MUI error #" + r + "; visit " + i + " for the full message.";
14
14
  }
15
- const be = "Input";
16
- function je(r) {
17
- return Ve(be, r);
15
+ const ge = "Input";
16
+ function Ue(r) {
17
+ return je(ge, r);
18
18
  }
19
- Fe(be, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
20
- const ge = /* @__PURE__ */ E.createContext(void 0);
21
- process.env.NODE_ENV !== "production" && (ge.displayName = "FormControlContext");
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(ge);
23
+ return E.useContext(be);
24
24
  }
25
25
  function ke(r = {}) {
26
26
  const {
27
- defaultValue: u,
27
+ defaultValue: i,
28
28
  disabled: _ = !1,
29
- error: p = !1,
30
- onBlur: b,
29
+ error: c = !1,
30
+ onBlur: g,
31
31
  onChange: h,
32
- onFocus: V,
33
- required: F = !1,
32
+ onFocus: j,
33
+ required: V = !1,
34
34
  value: f,
35
- inputRef: S
35
+ inputRef: F
36
36
  } = r, o = Ae();
37
- let y, s, N, x, C;
37
+ let w, s, C, N, x;
38
38
  if (o) {
39
- var j, i, v;
40
- if (y = void 0, s = (j = o.disabled) != null ? j : !1, N = (i = o.error) != null ? i : !1, x = (v = o.required) != null ? v : !1, C = o.value, process.env.NODE_ENV !== "production") {
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
- y = u, s = _, N = p, x = F, C = f;
46
+ w = i, s = _, C = c, N = V, x = f;
47
47
  const {
48
48
  current: K
49
- } = E.useRef(C != null), q = E.useCallback((e) => {
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 = Se(R, S, q), [O, T] = E.useState(!1);
52
+ }, []), R = E.useRef(null), A = Fe(R, F, q), [S, O] = E.useState(!1);
53
53
  E.useEffect(() => {
54
- !o && s && O && (T(!1), b == null || b());
55
- }, [o, s, O, b]);
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
- T(!0);
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() : T(!1);
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, I;
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." : Ue(17));
74
- o == null || (d = o.onChange) == null || d.call(o, a), (I = e.onChange) == null || I.call(e, a, ...l);
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: N,
82
- focused: O,
81
+ error: C,
82
+ focused: S,
83
83
  formControlContext: o,
84
84
  getInputProps: (e = {}) => {
85
- const l = w({}, {
86
- onBlur: b,
85
+ const l = y({}, {
86
+ onBlur: g,
87
87
  onChange: h,
88
- onFocus: V
89
- }, de(e)), d = w({}, l, {
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 w({}, d, {
95
- "aria-invalid": N || void 0,
96
- defaultValue: y,
97
- value: C,
98
- required: x,
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 = w({}, a, de(e));
106
- return w({}, e, l, {
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: x,
112
- value: C
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: u,
117
+ disabled: i,
118
118
  error: _,
119
- focused: p,
120
- formControlContext: b,
119
+ focused: c,
120
+ formControlContext: g,
121
121
  multiline: h,
122
- startAdornment: V,
123
- endAdornment: F
122
+ startAdornment: j,
123
+ endAdornment: V
124
124
  } = r;
125
- return Ie({
126
- root: ["root", u && "disabled", _ && "error", p && "focused", !!b && "formControl", h && "multiline", !!V && "adornedStart", !!F && "adornedEnd"],
127
- input: ["input", u && "disabled", h && "multiline"]
128
- }, Be(je));
129
- }, he = /* @__PURE__ */ E.forwardRef(function(u, _) {
130
- var p, b, h;
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": V,
133
- "aria-label": F,
132
+ "aria-describedby": j,
133
+ "aria-label": V,
134
134
  "aria-labelledby": f,
135
- autoComplete: S,
135
+ autoComplete: F,
136
136
  autoFocus: o,
137
- className: y,
137
+ className: w,
138
138
  defaultValue: s,
139
- disabled: N,
140
- endAdornment: x,
141
- error: C,
142
- id: j,
143
- multiline: i = !1,
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: O,
150
- onBlur: T,
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: I
162
- } = u, z = Oe(u, Me), {
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: ie
168
+ disabled: ue
169
169
  } = ke({
170
- disabled: N,
170
+ disabled: C,
171
171
  defaultValue: s,
172
- error: C,
173
- onBlur: T,
172
+ error: x,
173
+ onBlur: O,
174
174
  onClick: K,
175
175
  onChange: q,
176
- onFocus: O,
176
+ onFocus: S,
177
177
  required: Y,
178
178
  value: Z
179
- }), ne = i ? void 0 : W ?? "text", Q = w({}, u, {
180
- disabled: ie,
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: i,
184
+ multiline: u,
185
185
  type: ne
186
186
  }), te = He(Q), oe = {
187
- "aria-describedby": V,
188
- "aria-label": F,
187
+ "aria-describedby": j,
188
+ "aria-label": V,
189
189
  "aria-labelledby": f,
190
- autoComplete: S,
190
+ autoComplete: F,
191
191
  autoFocus: o,
192
- id: j,
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 = (p = l.root) != null ? p : "div", t = _e({
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, y]
209
- }), g = i ? (b = l.textarea) != null ? b : "textarea" : (h = l.input) != null ? h : "input", B = _e({
210
- elementType: g,
211
- getSlotProps: (P) => J(w({}, oe, P)),
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: w({
214
- rows: i ? e : void 0
215
- }, i && !Te(g) && {
213
+ additionalProps: y({
214
+ rows: u ? e : void 0
215
+ }, u && !Oe(b) && {
216
216
  minRows: e || d,
217
- maxRows: e || I
217
+ maxRows: e || T
218
218
  }),
219
219
  ownerState: Q,
220
220
  className: te.input
221
221
  });
222
- return process.env.NODE_ENV !== "production" && i && e && (d || I) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ M(X, w({}, t, {
223
- children: [L, /* @__PURE__ */ H(g, w({}, B)), x]
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 = "_input_1cxiy_58", qe = "_input__label_1cxiy_85", m = {
377
- "input__input-el": "_input__input-el_1cxiy_58",
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-wrapper_1cxiy_82",
379
+ "input__messages-wrapper": "_input__messages-wrapper_1u4jg_82",
380
380
  input__label: qe,
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
- }, Je = xe(
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: u,
393
+ infoMessage: i,
394
394
  error: _,
395
- errorMessage: p,
396
- leftIcon: b,
395
+ errorMessage: c,
396
+ leftIcon: g,
397
397
  rightIcon: h,
398
- id: V,
399
- disabled: F,
398
+ id: j,
399
+ disabled: V,
400
400
  type: f = "text",
401
- maxLength: S,
401
+ maxLength: F,
402
402
  allowLeadingZeros: o = !1,
403
- isInteger: y,
403
+ isInteger: w,
404
404
  useCommaInDecimal: s,
405
- allowNegativeNumbers: N = !1,
406
- decimalLength: x = 10,
407
- hideCharsCounter: C = !1,
408
- required: j,
409
- onChange: i,
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: O,
416
- classNameCharsCounter: T,
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] = we(
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
- ), I = Ne(), z = V || `input_${I}`;
428
+ ), T = Ce(), z = j || `input_${T}`;
429
429
  Object.assign(e, { "data-testid": Y });
430
- const G = S && !C, J = Ce(), ae = (t) => {
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 g, B, P, ce;
435
+ var b, I, P, pe;
436
436
  if (f === "number-as-text") {
437
- let c = y ? Re(t.target.value, o) : s ? t.target.value.replace(".", ",") : t.target.value.replace(",", ".");
438
- if (!y && x > 0) {
439
- const pe = String(c), [ye, fe] = pe.split(/,|\./);
440
- pe !== "" && fe && (c = [ye, fe.slice(0, x)].join(s ? "," : "."));
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(c);
443
- const le = !isNaN(Number(String(c).replace(",", "."))), k = String(c).length ? String(c).replace(",", ".") : "";
444
- i == null || i({
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(c).length ? Number(String(c).replace(",", ".")) : NaN
449
+ valueAsNumber: le && String(p).length ? Number(String(p).replace(",", ".")) : NaN
450
450
  }
451
- }), G && d((B = (g = t == null ? void 0 : t.target) == null ? void 0 : g.value) == null ? void 0 : B.length);
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 c = String(t.target.value);
456
- const [le, k] = c.split(".");
457
- c !== "" && (k != null && k.length ? c = [Number(le), k.slice(0, x)].join(".") : c = String(Number(le))), t.target.value = c;
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((ce = (P = t == null ? void 0 : t.target) == null ? void 0 : P.value) == null ? void 0 : ce.length), i && i(t);
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 g;
462
- f === "number-as-text" && (y ? ve(t, N) : Pe(t, N)), (g = e == null ? void 0 : e.onKeyDown) == null || g.call(e, t);
463
- }, ie = (t) => {
464
- var g;
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 B = y ? t.target.value.replace(/(,\.)/gi, "") : t.target.value.replace(",", ".");
467
- let P = String(o ? B : Number(B));
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
- (g = e == null ? void 0 : e.onBlur) == null || g.call(e, t);
471
- }, ne = ue(() => e.multiline !== !0 ? {
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 = ue(() => {
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 = ue(() => {
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: U(m.input, K), "data-testid": D, children: [
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: U(m.input__label, q),
494
+ className: B(m.input__label, q),
495
495
  "data-testid": $,
496
496
  children: [
497
497
  r,
498
- j && /* @__PURE__ */ H("span", { children: "*" })
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: F,
507
- error: typeof _ == "boolean" ? _ : !!p,
506
+ disabled: V,
507
+ error: typeof _ == "boolean" ? _ : !!c,
508
508
  "aria-label": r,
509
509
  slotProps: {
510
510
  root: (t) => ({
511
- className: U(m["input__input-el-wrapper"], {
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: U(m["input__input-el"], R),
520
- maxLength: S,
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: ie,
524
+ onBlur: ue,
525
525
  defaultValue: Q,
526
526
  value: te
527
527
  }
528
528
  },
529
- startAdornment: b && /* @__PURE__ */ H("span", { className: m["input__left-icon"], children: b }),
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
- (p || u) && /* @__PURE__ */ M(
535
+ (c || i) && /* @__PURE__ */ M(
536
536
  se,
537
537
  {
538
- className: p ? U(m["input__error-message"], O) : U(m["input__info-message"], A),
539
- "data-testid": p ? Z : L,
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: p ? "circle-exclamation" : "circle-info" }),
542
- p || u
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: U(m["input__chars-counter"], T),
549
+ className: B(m["input__chars-counter"], O),
550
550
  "data-testid": W,
551
551
  children: [
552
552
  l,
553
553
  " / ",
554
- S
554
+ F
555
555
  ]
556
556
  }
557
557
  )
@@ -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-C7KNiPyJ.js";
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";
@@ -3,7 +3,7 @@ import "react";
3
3
  import "../../clsx-OuTLNxxd.js";
4
4
  import "../Icon/Icon.js";
5
5
  import "../Typography/Typography.js";
6
- import { S } from "../../SelectButton-C7KNiPyJ.js";
6
+ import { S } from "../../SelectButton-CmFJp2dA.js";
7
7
  export {
8
8
  S as SelectButton
9
9
  };
@@ -23,14 +23,16 @@ export type StepperNavigatorProps = {
23
23
  disableNext?: boolean;
24
24
  /** Disables the "finish" button */
25
25
  disableFinish?: boolean;
26
+ /** Show loading spinner in Finish button */
27
+ loading?: boolean;
26
28
  /** Label to be used for the "previous" button */
27
- labelPrevious?: string;
29
+ labelPrevious?: React.ReactNode;
28
30
  /** Label to be used for the "cancel" button */
29
- labelCancel?: string;
31
+ labelCancel?: React.ReactNode;
30
32
  /** Label to be used for the "next" button */
31
- labelNext?: string;
33
+ labelNext?: React.ReactNode;
32
34
  /** Label to be used for the "finish" button */
33
- labelFinish?: string;
35
+ labelFinish?: React.ReactNode;
34
36
  /** Language to be used for the button labels. Default "en" */
35
37
  lang?: StepperNavigatorLang;
36
38
  /** CSS classes to be applied on the container element */
@@ -54,5 +56,5 @@ export type StepperNavigatorProps = {
54
56
  /** Callback to be called when the "finish" button is clicked */
55
57
  onFinish?: () => void;
56
58
  };
57
- export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
59
+ export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, loading, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
58
60
  export {};