@pismo/marola 1.1.1 → 1.1.3

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.
Files changed (66) hide show
  1. package/dist/Dialog.module-CE1Q-5tJ.js +29 -0
  2. package/dist/Group-ZXteFV4M.js +2 -1
  3. package/dist/Popover.module-B4boCutS.js +2 -1
  4. package/dist/SelectButton-DbiTJagF.js +75 -0
  5. package/dist/Tabs.module-BNRwj3Z0.js +2 -1
  6. package/dist/Toggle-BuZjueQ7.js +2 -1
  7. package/dist/assets/Dialog.css +1 -1
  8. package/dist/assets/Input.css +1 -1
  9. package/dist/assets/SelectButton.css +1 -1
  10. package/dist/components/Adornment/Adornment.js +2 -1
  11. package/dist/components/Advice/Advice.js +2 -1
  12. package/dist/components/Alert/Alert.js +2 -1
  13. package/dist/components/Autocomplete/Autocomplete.js +2 -1
  14. package/dist/components/Avatar/Avatar.js +2 -1
  15. package/dist/components/BankCard/BankCard.js +2 -1
  16. package/dist/components/Button/Button.js +2 -1
  17. package/dist/components/Calendar/Calendar.js +2 -1
  18. package/dist/components/Checkbox/Checkbox.js +2 -1
  19. package/dist/components/Chip/Chip.stories.d.ts +1 -1
  20. package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +1 -1
  21. package/dist/components/Description/Description.js +2 -1
  22. package/dist/components/Dialog/Actions.js +1 -1
  23. package/dist/components/Dialog/Backdrop.js +1 -1
  24. package/dist/components/Dialog/CloseIconButton.js +1 -1
  25. package/dist/components/Dialog/Dialog.js +1 -1
  26. package/dist/components/Dialog/Dialog.stories.d.ts +1 -1
  27. package/dist/components/Dialog/DialogTitle.js +1 -1
  28. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +2 -1
  29. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -1
  30. package/dist/components/IconButton/IconButton.js +2 -1
  31. package/dist/components/Input/Input.js +266 -260
  32. package/dist/components/Input/Input.stories.d.ts +1 -0
  33. package/dist/components/Input/Input.test.d.ts +1 -0
  34. package/dist/components/InputSearch/InputSearch.js +2 -1
  35. package/dist/components/LoadingSpinner/LoadingSpinner.js +2 -1
  36. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
  37. package/dist/components/PageHeader/PageHeader.js +2 -1
  38. package/dist/components/Pagination/Pagination.js +2 -1
  39. package/dist/components/Popover/Popover.stories.d.ts +1 -1
  40. package/dist/components/RadioButton/RadioButton.js +2 -1
  41. package/dist/components/ResultWithChips/ResultWithChips.js +2 -1
  42. package/dist/components/Select/Select.d.ts +1 -0
  43. package/dist/components/Select/Select.js +266 -261
  44. package/dist/components/Select/Select.test.d.ts +1 -0
  45. package/dist/components/Select/SelectButton.js +1 -1
  46. package/dist/components/Skeleton/Skeleton.js +2 -1
  47. package/dist/components/Snackbar/Snackbar.js +2 -1
  48. package/dist/components/Snackbar/Snackbar.stories.d.ts +1 -1
  49. package/dist/components/SortTooltip/SortTooltip.js +2 -1
  50. package/dist/components/Stepper/Stepper.js +2 -1
  51. package/dist/components/StepperNavigator/StepperNavigator.js +2 -1
  52. package/dist/components/Table/Table.js +2 -1
  53. package/dist/components/Tag/Tag.js +2 -1
  54. package/dist/components/TextDisplay/TextDisplay.js +2 -1
  55. package/dist/components/Toggle/Toggle.js +2 -1
  56. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  57. package/dist/components/Tooltip/Tooltip.js +2 -1
  58. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  59. package/dist/components/TransactionRow/TransactionRow.js +2 -1
  60. package/dist/components/Typography/Typography.js +2 -1
  61. package/dist/components/Typography/Typography.stories.d.ts +1 -1
  62. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
  63. package/dist/marola.css +1 -1
  64. package/package.json +1 -1
  65. package/dist/Dialog.module-BlXtafuW.js +0 -28
  66. package/dist/SelectButton-B38avP9u.js +0 -74
@@ -1,228 +1,229 @@
1
- import { jsxs as K, jsx as A } from "react/jsx-runtime";
2
- import * as N from "react";
3
- import { forwardRef as de, useState as ce, useId as _e, useMemo as ye } from "react";
4
- import { c as k } from "../../clsx-DB4S2d7J.js";
5
- import { Icon as me } from "../Icon/Icon.js";
6
- import { Typography as Q } from "../Typography/Typography.js";
7
- import { g as fe, a as he, u as ge, f as X, b as h, _ as be, c as oe, i as xe, P as e, d as Ce, e as we } from "../../useSlotProps-C_I1kEHr.js";
8
- import '../../assets/Input.css';function Ne(s) {
1
+ import '../../assets/Input.css';
2
+ import { jsxs as U, jsx as j } from "react/jsx-runtime";
3
+ import * as x from "react";
4
+ import { forwardRef as de, useState as ce, useId as _e, useMemo as me } from "react";
5
+ import { c as T } from "../../clsx-DB4S2d7J.js";
6
+ import { Icon as fe } from "../Icon/Icon.js";
7
+ import { Typography as X } from "../Typography/Typography.js";
8
+ import { g as he, a as ye, u as ge, f as Z, b as y, _ as be, c as ne, i as Ce, P as e, d as we, e as qe } from "../../useSlotProps-C_I1kEHr.js";
9
+ function xe(s) {
9
10
  let l = "https://mui.com/production-error/?code=" + s;
10
- for (let c = 1; c < arguments.length; c += 1)
11
- l += "&args[]=" + encodeURIComponent(arguments[c]);
11
+ for (let d = 1; d < arguments.length; d += 1)
12
+ l += "&args[]=" + encodeURIComponent(arguments[d]);
12
13
  return "Minified MUI error #" + s + "; visit " + l + " for the full message.";
13
14
  }
14
- const ne = "Input";
15
- function ve(s) {
16
- return fe(ne, s);
15
+ const re = "Input";
16
+ function Ne(s) {
17
+ return he(re, s);
17
18
  }
18
- he(ne, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
19
- const re = /* @__PURE__ */ N.createContext(void 0);
20
- process.env.NODE_ENV !== "production" && (re.displayName = "FormControlContext");
21
- function Pe() {
22
- return N.useContext(re);
19
+ ye(re, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
20
+ const ae = /* @__PURE__ */ x.createContext(void 0);
21
+ process.env.NODE_ENV !== "production" && (ae.displayName = "FormControlContext");
22
+ function ve() {
23
+ return x.useContext(ae);
23
24
  }
24
- function Re(s = {}) {
25
+ function Pe(s = {}) {
25
26
  const {
26
27
  defaultValue: l,
27
- disabled: c = !1,
28
- error: i = !1,
29
- onBlur: _,
28
+ disabled: d = !1,
29
+ error: u = !1,
30
+ onBlur: c,
30
31
  onChange: f,
31
- onFocus: v,
32
- required: P = !1,
33
- value: R,
34
- inputRef: E
35
- } = s, o = Pe();
36
- let F, y, b, x, g;
32
+ onFocus: N,
33
+ required: v = !1,
34
+ value: P,
35
+ inputRef: R
36
+ } = s, o = ve();
37
+ let E, h, g, C, b;
37
38
  if (o) {
38
- var S, m, V;
39
- if (F = void 0, y = (S = o.disabled) != null ? S : !1, b = (m = o.error) != null ? m : !1, x = (V = o.required) != null ? V : !1, g = o.value, process.env.NODE_ENV !== "production") {
39
+ var k, m, S;
40
+ if (E = void 0, h = (k = o.disabled) != null ? k : !1, g = (m = o.error) != null ? m : !1, C = (S = o.required) != null ? S : !1, b = o.value, process.env.NODE_ENV !== "production") {
40
41
  const t = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => s[r] !== void 0);
41
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(`
42
43
  `));
43
44
  }
44
45
  } else
45
- F = l, y = c, b = i, x = P, g = R;
46
+ E = l, h = d, g = u, C = v, b = P;
46
47
  const {
47
- current: D
48
- } = N.useRef(g != null), M = N.useCallback((t) => {
48
+ current: A
49
+ } = x.useRef(b != null), D = x.useCallback((t) => {
49
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(`
50
51
  `));
51
- }, []), C = N.useRef(null), B = ge(C, E, M), [I, O] = N.useState(!1);
52
- N.useEffect(() => {
53
- !o && y && I && (O(!1), _ == null || _());
54
- }, [o, y, I, _]);
55
- const a = (t) => (r) => {
52
+ }, []), w = x.useRef(null), V = ge(w, R, D), [F, I] = x.useState(!1);
53
+ x.useEffect(() => {
54
+ !o && h && F && (I(!1), c == null || c());
55
+ }, [o, h, F, c]);
56
+ const M = (t) => (r) => {
56
57
  var n;
57
58
  if (o != null && o.disabled) {
58
59
  r.stopPropagation();
59
60
  return;
60
61
  }
61
62
  if ((n = t.onFocus) == null || n.call(t, r), o && o.onFocus) {
62
- var u;
63
- o == null || (u = o.onFocus) == null || u.call(o);
63
+ var i;
64
+ o == null || (i = o.onFocus) == null || i.call(o);
64
65
  } else
65
- O(!0);
66
- }, H = (t) => (r) => {
66
+ I(!0);
67
+ }, a = (t) => (r) => {
67
68
  var n;
68
- (n = t.onBlur) == null || n.call(t, r), o && o.onBlur ? o.onBlur() : O(!1);
69
- }, q = (t) => (r, ...n) => {
70
- var u, w;
71
- if (!D && (r.target || C.current) == null)
72
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : Ne(17));
73
- o == null || (u = o.onChange) == null || u.call(o, r), (w = t.onChange) == null || w.call(t, r, ...n);
69
+ (n = t.onBlur) == null || n.call(t, r), o && o.onBlur ? o.onBlur() : I(!1);
70
+ }, H = (t) => (r, ...n) => {
71
+ var i, q;
72
+ if (!A && (r.target || w.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." : xe(17));
74
+ o == null || (i = o.onChange) == null || i.call(o, r), (q = t.onChange) == null || q.call(t, r, ...n);
74
75
  }, $ = (t) => (r) => {
75
76
  var n;
76
- C.current && r.currentTarget === r.target && C.current.focus(), (n = t.onClick) == null || n.call(t, r);
77
+ w.current && r.currentTarget === r.target && w.current.focus(), (n = t.onClick) == null || n.call(t, r);
77
78
  };
78
79
  return {
79
- disabled: y,
80
- error: b,
81
- focused: I,
80
+ disabled: h,
81
+ error: g,
82
+ focused: F,
82
83
  formControlContext: o,
83
84
  getInputProps: (t = {}) => {
84
- const n = h({}, {
85
- onBlur: _,
85
+ const n = y({}, {
86
+ onBlur: c,
86
87
  onChange: f,
87
- onFocus: v
88
- }, X(t)), u = h({}, n, {
89
- onBlur: H(n),
90
- onChange: q(n),
91
- onFocus: a(n)
88
+ onFocus: N
89
+ }, Z(t)), i = y({}, n, {
90
+ onBlur: a(n),
91
+ onChange: H(n),
92
+ onFocus: M(n)
92
93
  });
93
- return h({}, u, {
94
- "aria-invalid": b || void 0,
95
- defaultValue: F,
96
- value: g,
97
- required: x,
98
- disabled: y
94
+ return y({}, i, {
95
+ "aria-invalid": g || void 0,
96
+ defaultValue: E,
97
+ value: b,
98
+ required: C,
99
+ disabled: h
99
100
  }, t, {
100
- ref: B
101
- }, u);
101
+ ref: V
102
+ }, i);
102
103
  },
103
104
  getRootProps: (t = {}) => {
104
- const r = X(s, ["onBlur", "onChange", "onFocus"]), n = h({}, r, X(t));
105
- return h({}, t, n, {
105
+ const r = Z(s, ["onBlur", "onChange", "onFocus"]), n = y({}, r, Z(t));
106
+ return y({}, t, n, {
106
107
  onClick: $(n)
107
108
  });
108
109
  },
109
- inputRef: B,
110
- required: x,
111
- value: g
110
+ inputRef: V,
111
+ required: C,
112
+ value: b
112
113
  };
113
114
  }
114
- const Ee = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "endAdornment", "error", "id", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "startAdornment", "value", "type", "rows", "slotProps", "slots", "minRows", "maxRows"], Fe = (s) => {
115
+ const Re = ["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"], Ee = (s) => {
115
116
  const {
116
117
  disabled: l,
117
- error: c,
118
- focused: i,
119
- formControlContext: _,
118
+ error: d,
119
+ focused: u,
120
+ formControlContext: c,
120
121
  multiline: f,
121
- startAdornment: v,
122
- endAdornment: P
122
+ startAdornment: N,
123
+ endAdornment: v
123
124
  } = s;
124
- return Ce({
125
- root: ["root", l && "disabled", c && "error", i && "focused", !!_ && "formControl", f && "multiline", !!v && "adornedStart", !!P && "adornedEnd"],
125
+ return we({
126
+ root: ["root", l && "disabled", d && "error", u && "focused", !!c && "formControl", f && "multiline", !!N && "adornedStart", !!v && "adornedEnd"],
126
127
  input: ["input", l && "disabled", f && "multiline"]
127
- }, we(ve));
128
- }, ae = /* @__PURE__ */ N.forwardRef(function(l, c) {
129
- var i, _, f;
128
+ }, qe(Ne));
129
+ }, se = /* @__PURE__ */ x.forwardRef(function(l, d) {
130
+ var u, c, f;
130
131
  const {
131
- "aria-describedby": v,
132
- "aria-label": P,
133
- "aria-labelledby": R,
134
- autoComplete: E,
132
+ "aria-describedby": N,
133
+ "aria-label": v,
134
+ "aria-labelledby": P,
135
+ autoComplete: R,
135
136
  autoFocus: o,
136
- className: F,
137
- defaultValue: y,
138
- disabled: b,
139
- endAdornment: x,
140
- error: g,
141
- id: S,
137
+ className: E,
138
+ defaultValue: h,
139
+ disabled: g,
140
+ endAdornment: C,
141
+ error: b,
142
+ id: k,
142
143
  multiline: m = !1,
143
- name: V,
144
- onClick: D,
145
- onChange: M,
146
- onKeyDown: C,
147
- onKeyUp: B,
148
- onFocus: I,
149
- onBlur: O,
150
- placeholder: a,
151
- readOnly: H,
152
- required: q,
144
+ name: S,
145
+ onClick: A,
146
+ onChange: D,
147
+ onKeyDown: w,
148
+ onKeyUp: V,
149
+ onFocus: F,
150
+ onBlur: I,
151
+ placeholder: M,
152
+ readOnly: a,
153
+ required: H,
153
154
  startAdornment: $,
154
- value: L,
155
- type: U,
155
+ value: Y,
156
+ type: K,
156
157
  rows: t,
157
158
  slotProps: r = {},
158
159
  slots: n = {},
159
- minRows: u,
160
- maxRows: w
161
- } = l, p = be(l, Ee), {
162
- getRootProps: Y,
160
+ minRows: i,
161
+ maxRows: q
162
+ } = l, L = be(l, Re), {
163
+ getRootProps: _,
163
164
  getInputProps: W,
164
- focused: T,
165
- formControlContext: z,
166
- error: j,
167
- disabled: se
168
- } = Re({
169
- disabled: b,
170
- defaultValue: y,
171
- error: g,
172
- onBlur: O,
173
- onClick: D,
174
- onChange: M,
175
- onFocus: I,
176
- required: q,
177
- value: L
178
- }), Z = m ? void 0 : U ?? "text", G = h({}, l, {
179
- disabled: se,
180
- error: j,
181
- focused: T,
182
- formControlContext: z,
165
+ focused: z,
166
+ formControlContext: O,
167
+ error: G,
168
+ disabled: B
169
+ } = Pe({
170
+ disabled: g,
171
+ defaultValue: h,
172
+ error: b,
173
+ onBlur: I,
174
+ onClick: A,
175
+ onChange: D,
176
+ onFocus: F,
177
+ required: H,
178
+ value: Y
179
+ }), ee = m ? void 0 : K ?? "text", J = y({}, l, {
180
+ disabled: B,
181
+ error: G,
182
+ focused: z,
183
+ formControlContext: O,
183
184
  multiline: m,
184
- type: Z
185
- }), ee = Fe(G), le = {
186
- "aria-describedby": v,
187
- "aria-label": P,
188
- "aria-labelledby": R,
189
- autoComplete: E,
185
+ type: ee
186
+ }), te = Ee(J), le = {
187
+ "aria-describedby": N,
188
+ "aria-label": v,
189
+ "aria-labelledby": P,
190
+ autoComplete: R,
190
191
  autoFocus: o,
191
- id: S,
192
- onKeyDown: C,
193
- onKeyUp: B,
194
- name: V,
195
- placeholder: a,
196
- readOnly: H,
197
- type: Z
198
- }, te = (i = n.root) != null ? i : "div", ue = oe({
199
- elementType: te,
200
- getSlotProps: Y,
192
+ id: k,
193
+ onKeyDown: w,
194
+ onKeyUp: V,
195
+ name: S,
196
+ placeholder: M,
197
+ readOnly: a,
198
+ type: ee
199
+ }, oe = (u = n.root) != null ? u : "div", ue = ne({
200
+ elementType: oe,
201
+ getSlotProps: _,
201
202
  externalSlotProps: r.root,
202
- externalForwardedProps: p,
203
+ externalForwardedProps: L,
203
204
  additionalProps: {
204
- ref: c
205
+ ref: d
205
206
  },
206
- ownerState: G,
207
- className: [ee.root, F]
208
- }), J = m ? (_ = n.textarea) != null ? _ : "textarea" : (f = n.input) != null ? f : "input", ie = oe({
209
- elementType: J,
210
- getSlotProps: (pe) => W(h({}, le, pe)),
207
+ ownerState: J,
208
+ className: [te.root, E]
209
+ }), Q = m ? (c = n.textarea) != null ? c : "textarea" : (f = n.input) != null ? f : "input", ie = ne({
210
+ elementType: Q,
211
+ getSlotProps: (pe) => W(y({}, le, pe)),
211
212
  externalSlotProps: r.input,
212
- additionalProps: h({
213
+ additionalProps: y({
213
214
  rows: m ? t : void 0
214
- }, m && !xe(J) && {
215
- minRows: t || u,
216
- maxRows: t || w
215
+ }, m && !Ce(Q) && {
216
+ minRows: t || i,
217
+ maxRows: t || q
217
218
  }),
218
- ownerState: G,
219
- className: ee.input
219
+ ownerState: J,
220
+ className: te.input
220
221
  });
221
- return process.env.NODE_ENV !== "production" && m && t && (u || w) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ K(te, h({}, ue, {
222
- children: [$, /* @__PURE__ */ A(J, h({}, ie)), x]
222
+ return process.env.NODE_ENV !== "production" && m && t && (i || q) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ U(oe, y({}, ue, {
223
+ children: [$, /* @__PURE__ */ j(Q, y({}, ie)), C]
223
224
  }));
224
225
  });
225
- process.env.NODE_ENV !== "production" && (ae.propTypes = {
226
+ process.env.NODE_ENV !== "production" && (se.propTypes = {
226
227
  // ┌────────────────────────────── Warning ──────────────────────────────┐
227
228
  // │ These PropTypes are generated from the TypeScript type definitions. │
228
229
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -372,79 +373,80 @@ process.env.NODE_ENV !== "production" && (ae.propTypes = {
372
373
  */
373
374
  value: e.any
374
375
  });
375
- const Ie = "_input_y5x3p_57", Oe = "_input__label_y5x3p_84", d = {
376
- "u-typography-h1": "_u-typography-h1_y5x3p_1",
377
- "u-typography-h2": "_u-typography-h2_y5x3p_8",
378
- "u-typography-h3": "_u-typography-h3_y5x3p_15",
379
- "u-typography-h4": "_u-typography-h4_y5x3p_22",
380
- "u-typography-h5": "_u-typography-h5_y5x3p_29",
381
- "u-typography-h6": "_u-typography-h6_y5x3p_36",
382
- "u-typography-base": "_u-typography-base_y5x3p_43",
383
- "u-typography-base--xxl": "_u-typography-base--xxl_y5x3p_49",
384
- "u-typography-base--xl": "_u-typography-base--xl_y5x3p_53",
385
- "u-typography-base--lg": "_u-typography-base--lg_y5x3p_57",
386
- "input__input-el": "_input__input-el_y5x3p_57",
387
- "u-typography-base--sm": "_u-typography-base--sm_y5x3p_61",
388
- "u-typography-base--bold": "_u-typography-base--bold_y5x3p_65",
389
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_y5x3p_68",
390
- "u-typography-base--underlined": "_u-typography-base--underlined_y5x3p_71",
391
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_y5x3p_74",
392
- input: Ie,
393
- "input__messages-wrapper": "_input__messages-wrapper_y5x3p_81",
394
- input__label: Oe,
395
- "input__input-el-wrapper": "_input__input-el-wrapper_y5x3p_89",
396
- "input__left-icon": "_input__left-icon_y5x3p_111",
397
- "input__right-icon": "_input__right-icon_y5x3p_111",
398
- "input__info-message": "_input__info-message_y5x3p_137",
399
- "input__error-message": "_input__error-message_y5x3p_137",
400
- "input__chars-counter": "_input__chars-counter_y5x3p_148",
401
- "input--disabled": "_input--disabled_y5x3p_153",
402
- "input--focused": "_input--focused_y5x3p_159",
403
- "input--error": "_input--error_y5x3p_162"
404
- }, je = de(
376
+ const Fe = "_input_101pq_57", Ie = "_input__label_101pq_84", p = {
377
+ "u-typography-h1": "_u-typography-h1_101pq_1",
378
+ "u-typography-h2": "_u-typography-h2_101pq_8",
379
+ "u-typography-h3": "_u-typography-h3_101pq_15",
380
+ "u-typography-h4": "_u-typography-h4_101pq_22",
381
+ "u-typography-h5": "_u-typography-h5_101pq_29",
382
+ "u-typography-h6": "_u-typography-h6_101pq_36",
383
+ "u-typography-base": "_u-typography-base_101pq_43",
384
+ "u-typography-base--xxl": "_u-typography-base--xxl_101pq_49",
385
+ "u-typography-base--xl": "_u-typography-base--xl_101pq_53",
386
+ "u-typography-base--lg": "_u-typography-base--lg_101pq_57",
387
+ "input__input-el": "_input__input-el_101pq_57",
388
+ "u-typography-base--sm": "_u-typography-base--sm_101pq_61",
389
+ "u-typography-base--bold": "_u-typography-base--bold_101pq_65",
390
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_101pq_68",
391
+ "u-typography-base--underlined": "_u-typography-base--underlined_101pq_71",
392
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_101pq_74",
393
+ input: Fe,
394
+ "input__messages-wrapper": "_input__messages-wrapper_101pq_81",
395
+ input__label: Ie,
396
+ "input__input-el-wrapper": "_input__input-el-wrapper_101pq_89",
397
+ "input__left-icon": "_input__left-icon_101pq_111",
398
+ "input__right-icon": "_input__right-icon_101pq_111",
399
+ "input__info-message": "_input__info-message_101pq_137",
400
+ "input__error-message": "_input__error-message_101pq_137",
401
+ "input__chars-counter": "_input__chars-counter_101pq_148",
402
+ "input--disabled": "_input--disabled_101pq_153",
403
+ "input--focused": "_input--focused_101pq_159",
404
+ "input--error": "_input--error_101pq_162"
405
+ }, Ue = de(
405
406
  ({
406
407
  label: s,
407
408
  infoMessage: l,
408
- error: c,
409
- errorMessage: i,
410
- leftIcon: _,
409
+ error: d,
410
+ errorMessage: u,
411
+ leftIcon: c,
411
412
  rightIcon: f,
412
- id: v,
413
- disabled: P,
414
- type: R = "text",
415
- maxLength: E,
413
+ id: N,
414
+ disabled: v,
415
+ type: P = "text",
416
+ maxLength: R,
416
417
  decimalLength: o = 10,
417
- hideCharsCounter: F = !1,
418
- onChange: y,
419
- classNameWrapper: b,
420
- classNameLabel: x,
421
- classNameInput: g,
422
- classNameInfoMessage: S,
423
- classNameErrorMessage: m,
424
- classNameCharsCounter: V,
418
+ hideCharsCounter: E = !1,
419
+ required: h,
420
+ onChange: g,
421
+ classNameWrapper: C,
422
+ classNameLabel: b,
423
+ classNameInput: k,
424
+ classNameInfoMessage: m,
425
+ classNameErrorMessage: S,
426
+ classNameCharsCounter: A,
425
427
  "data-testid-wrapper": D,
426
- "data-testid-label": M,
427
- "data-testid-input": C,
428
- "data-testid-infoMessage": B,
428
+ "data-testid-label": w,
429
+ "data-testid-input": V,
430
+ "data-testid-infoMessage": F,
429
431
  "data-testid-errorMessage": I,
430
- "data-testid-charsCounter": O,
432
+ "data-testid-charsCounter": M,
431
433
  ...a
432
434
  }, H) => {
433
- var u, w;
434
- const [q, $] = ce(
435
- ((u = a.value) == null ? void 0 : u.length) || ((w = a.defaultValue) == null ? void 0 : w.length) || 0
436
- ), L = _e(), U = v || `input_${L}`;
437
- Object.assign(a, { "data-testid": C });
438
- const t = E && !F, r = (p) => {
439
- var Y, W;
440
- if (R === "number") {
441
- let T = String(p.target.value);
442
- const [z, j] = T.split(".");
443
- T !== "" && (j != null && j.length ? T = [Number(z), j.slice(0, o)].join(".") : T = String(Number(z))), p.target.value = T;
435
+ var q, L;
436
+ const [$, Y] = ce(
437
+ ((q = a.value) == null ? void 0 : q.length) || ((L = a.defaultValue) == null ? void 0 : L.length) || 0
438
+ ), K = _e(), t = N || `input_${K}`;
439
+ Object.assign(a, { "data-testid": V });
440
+ const r = R && !E, n = (_) => {
441
+ var W, z;
442
+ if (P === "number") {
443
+ let O = String(_.target.value);
444
+ const [G, B] = O.split(".");
445
+ O !== "" && (B != null && B.length ? O = [Number(G), B.slice(0, o)].join(".") : O = String(Number(G))), _.target.value = O;
444
446
  }
445
- t && $((W = (Y = p == null ? void 0 : p.target) == null ? void 0 : Y.value) == null ? void 0 : W.length), y && y(p);
446
- }, n = ye(() => a.multiline !== !0 ? {
447
- type: R,
447
+ r && Y((z = (W = _ == null ? void 0 : _.target) == null ? void 0 : W.value) == null ? void 0 : z.length), g && g(_);
448
+ }, i = me(() => a.multiline !== !0 ? {
449
+ type: P,
448
450
  multiline: a.multiline
449
451
  } : {
450
452
  type: void 0,
@@ -453,66 +455,70 @@ const Ie = "_input_y5x3p_57", Oe = "_input__label_y5x3p_84", d = {
453
455
  minRows: a == null ? void 0 : a.minRows,
454
456
  maxRows: a == null ? void 0 : a.maxRows
455
457
  }, [a]);
456
- return /* @__PURE__ */ K("div", { className: k(d.input, b), "data-testid": D, children: [
457
- s && /* @__PURE__ */ A(
458
- Q,
458
+ return /* @__PURE__ */ U("div", { className: T(p.input, C), "data-testid": D, children: [
459
+ s && /* @__PURE__ */ U(
460
+ X,
459
461
  {
462
+ bold: !0,
460
463
  element: "label",
461
- elementProps: { htmlFor: U },
462
- className: k(d.input__label, x),
463
- "data-testid": M,
464
- children: s
464
+ elementProps: { htmlFor: t },
465
+ className: T(p.input__label, b),
466
+ "data-testid": w,
467
+ children: [
468
+ s,
469
+ h && /* @__PURE__ */ j("span", { children: "*" })
470
+ ]
465
471
  }
466
472
  ),
467
- /* @__PURE__ */ A(
468
- ae,
473
+ /* @__PURE__ */ j(
474
+ se,
469
475
  {
470
- id: U,
471
- disabled: P,
472
- error: typeof c == "boolean" ? c : !!i,
476
+ id: t,
477
+ disabled: v,
478
+ error: typeof d == "boolean" ? d : !!u,
473
479
  "aria-label": s,
474
480
  slotProps: {
475
- root: (p) => ({
476
- className: k(d["input__input-el-wrapper"], {
477
- [d["input--disabled"]]: p.disabled,
478
- [d["input--focused"]]: p.focused,
479
- [d["input--error"]]: p.error
481
+ root: (_) => ({
482
+ className: T(p["input__input-el-wrapper"], {
483
+ [p["input--disabled"]]: _.disabled,
484
+ [p["input--focused"]]: _.focused,
485
+ [p["input--error"]]: _.error
480
486
  })
481
487
  }),
482
488
  input: {
483
489
  ref: H,
484
- className: k(d["input__input-el"], g),
485
- maxLength: E,
486
- onChange: r,
490
+ className: T(p["input__input-el"], k),
491
+ maxLength: R,
492
+ onChange: n,
487
493
  ...a
488
494
  }
489
495
  },
490
- startAdornment: _ && /* @__PURE__ */ A("span", { className: d["input__left-icon"], children: _ }),
491
- endAdornment: f && /* @__PURE__ */ A("span", { className: d["input__right-icon"], children: f }),
492
- ...n
496
+ startAdornment: c && /* @__PURE__ */ j("span", { className: p["input__left-icon"], children: c }),
497
+ endAdornment: f && /* @__PURE__ */ j("span", { className: p["input__right-icon"], children: f }),
498
+ ...i
493
499
  }
494
500
  ),
495
- /* @__PURE__ */ K("div", { className: d["input__messages-wrapper"], children: [
496
- (i || l) && /* @__PURE__ */ K(
497
- Q,
501
+ /* @__PURE__ */ U("div", { className: p["input__messages-wrapper"], children: [
502
+ (u || l) && /* @__PURE__ */ U(
503
+ X,
498
504
  {
499
- className: i ? k(d["input__error-message"], m) : k(d["input__info-message"], S),
500
- "data-testid": i ? I : B,
505
+ className: u ? T(p["input__error-message"], S) : T(p["input__info-message"], m),
506
+ "data-testid": u ? I : F,
501
507
  children: [
502
- /* @__PURE__ */ A(me, { icon: i ? "circle-exclamation" : "circle-info" }),
503
- i || l
508
+ /* @__PURE__ */ j(fe, { icon: u ? "circle-exclamation" : "circle-info" }),
509
+ u || l
504
510
  ]
505
511
  }
506
512
  ),
507
- t && /* @__PURE__ */ K(
508
- Q,
513
+ r && /* @__PURE__ */ U(
514
+ X,
509
515
  {
510
- className: k(d["input__chars-counter"], V),
511
- "data-testid": O,
516
+ className: T(p["input__chars-counter"], A),
517
+ "data-testid": M,
512
518
  children: [
513
- q,
519
+ $,
514
520
  " / ",
515
- E
521
+ R
516
522
  ]
517
523
  }
518
524
  )
@@ -521,5 +527,5 @@ const Ie = "_input_y5x3p_57", Oe = "_input__label_y5x3p_84", d = {
521
527
  }
522
528
  );
523
529
  export {
524
- je as Input
530
+ Ue as Input
525
531
  };