@pismo/marola 2.1.22 → 2.1.23

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