@pismo/marola 2.1.64 → 2.1.65

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 (112) hide show
  1. package/dist/Button-CJaBSdv1.js +135 -0
  2. package/dist/ClassNameConfigurator-CVRWfyIa.js +847 -0
  3. package/dist/{ClickAwayListener-Z08peX_P.js → ClickAwayListener-BnYMO5Ki.js} +26 -33
  4. package/dist/Popup-D267EI4e.js +1338 -0
  5. package/dist/{Portal-DJapUCn6.js → Portal-BrGvxB96.js} +32 -36
  6. package/dist/RadioOption-DyRY8xlF.js +1094 -0
  7. package/dist/{Toggle-DcZTfLrC.js → Toggle-nnDfpqI1.js} +31 -31
  8. package/dist/assets/Checkbox.css +1 -1
  9. package/dist/assets/DropdownMenu.css +1 -1
  10. package/dist/assets/ToastCard.css +1 -1
  11. package/dist/assets/Toggle2.css +1 -1
  12. package/dist/combineHooksSlotProps-j-8UVeYo.js +86 -0
  13. package/dist/components/Alert/Alert.stories.d.ts +6 -6
  14. package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
  15. package/dist/components/Autocomplete/Autocomplete.js +311 -320
  16. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +1 -1
  17. package/dist/components/Avatar/Avatar.stories.d.ts +4 -4
  18. package/dist/components/BankingCard/BankingCard.d.ts +0 -1
  19. package/dist/components/Button/Button.js +1 -1
  20. package/dist/components/Checkbox/Checkbox.js +56 -56
  21. package/dist/components/Checkbox/Checkbox.stories.d.ts +8 -8
  22. package/dist/components/Chip/Chip.js +3 -3
  23. package/dist/components/DatePicker/DatePicker.js +742 -639
  24. package/dist/components/DatePicker/DatePicker.stories.d.ts +8 -8
  25. package/dist/components/DatePicker/dateUtils.d.ts +2 -2
  26. package/dist/components/DatePicker/dateUtils.js +1 -1
  27. package/dist/components/DatePicker/keyboardNavigation.d.ts +1 -1
  28. package/dist/components/DatePicker/renderCalendarDays.js +1 -1
  29. package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
  30. package/dist/components/Dialog/CloseIconButton.js +1 -1
  31. package/dist/components/Dialog/Dialog.js +372 -352
  32. package/dist/components/Dialog/Dialog.stories.d.ts +96 -135
  33. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.d.ts +1 -1
  34. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.js +2 -2
  35. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.stories.d.ts +1 -1
  36. package/dist/components/DoubleInput/DoubleInput.stories.d.ts +1 -1
  37. package/dist/components/Draggable/Draggable.d.ts +0 -1
  38. package/dist/components/Draggable/Draggable.js +1 -1
  39. package/dist/components/Draggable/Draggable.stories.d.ts +2 -3
  40. package/dist/components/Draggable/useDraggable.js +1 -1
  41. package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -1
  42. package/dist/components/DropdownMenu/DropdownMenu.js +39 -34
  43. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +6 -4
  44. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +4 -4
  45. package/dist/components/IconButton/IconButton.js +1 -1
  46. package/dist/components/Input/Input.js +335 -320
  47. package/dist/components/InputSearch/InputSearch.d.ts +31 -31
  48. package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -31
  49. package/dist/components/Popover/Popover.d.ts +3 -3
  50. package/dist/components/Popover/Popover.js +2 -2
  51. package/dist/components/Popover/Popover.stories.d.ts +3 -3
  52. package/dist/components/Popover/PopoverBody.d.ts +0 -1
  53. package/dist/components/Popover/PopoverFooter.d.ts +0 -1
  54. package/dist/components/Popover/PopoverHeader.d.ts +0 -1
  55. package/dist/components/RadioButton/RadioButton.d.ts +0 -1
  56. package/dist/components/RadioButton/RadioButton.js +684 -769
  57. package/dist/components/RadioButton/RadioOption.d.ts +0 -1
  58. package/dist/components/RadioButton/RadioOption.js +3 -3
  59. package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
  60. package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
  61. package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
  62. package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
  63. package/dist/components/RowItem/RowItem.js +2 -2
  64. package/dist/components/Select/Select.js +625 -591
  65. package/dist/components/Skeleton/Skeleton.d.ts +0 -1
  66. package/dist/components/Snackbar/Snackbar.js +295 -239
  67. package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
  68. package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
  69. package/dist/components/Table/Table.stories.d.ts +5 -5
  70. package/dist/components/Tabs/Tab.js +107 -98
  71. package/dist/components/Tabs/TabPanel.js +58 -55
  72. package/dist/components/Tabs/Tabs.js +246 -231
  73. package/dist/components/ToastCard/ToastCard.js +31 -31
  74. package/dist/components/Toggle/Toggle.js +147 -137
  75. package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
  76. package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
  77. package/dist/components/ToggleGroup/Toggle.js +2 -2
  78. package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
  79. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  80. package/dist/components/Tooltip/Tooltip.js +266 -325
  81. package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
  82. package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
  83. package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
  84. package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
  85. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
  86. package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
  87. package/dist/getReactElementRef-iorwYm2A.js +19 -0
  88. package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
  89. package/dist/isFocusVisible-CPZqtjv2.js +12 -0
  90. package/dist/main.js +2 -2
  91. package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
  92. package/dist/react-BTbo_5A3.js +526 -0
  93. package/dist/setRef-Bo0HEdBB.js +6 -0
  94. package/dist/useButton-C2E_LFJp.js +90 -0
  95. package/dist/useControlled-BYdyS7Pn.js +31 -0
  96. package/dist/useId-CK6Kn3Tn.js +21 -0
  97. package/dist/useList-BLW78Lq7.js +446 -0
  98. package/dist/utils/draggable.d.ts +2 -2
  99. package/package.json +1 -1
  100. package/dist/Button-BrEDdtHO.js +0 -130
  101. package/dist/Popup-Dffqo7wT.js +0 -1246
  102. package/dist/RadioOption-DYovqiwF.js +0 -720
  103. package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
  104. package/dist/exactProp-SYjL19cU.js +0 -13
  105. package/dist/react-BvI-Sw9b.js +0 -509
  106. package/dist/useButton-CezPDte8.js +0 -105
  107. package/dist/useControlled-CCMYYdCM.js +0 -31
  108. package/dist/useId-BW-oWmul.js +0 -19
  109. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  110. package/dist/useList-nqLfZem8.js +0 -435
  111. package/dist/useSlotProps-CYHDC4TN.js +0 -834
  112. package/dist/useTimeout-DxF9kiZL.js +0 -36
@@ -1,229 +1,244 @@
1
- import { jsxs as j, jsx as A } from "react/jsx-runtime";
2
- import * as F from "react";
3
- import { forwardRef as ye, useState as Ce, useId as ve, useRef as xe, useMemo as se } from "react";
4
- import { formatDecimalValue as _e, allowOnlyIntegerNumbers as Pe, allowOnlyNumbers as Re, parseToInteger as Ee } from "../../utils/inputNumberAsText.js";
5
- import { c as U } from "../../clsx-OuTLNxxd.js";
6
- import { Icon as Ve } from "../Icon/Icon.js";
7
- import { Typography as de } from "../Typography/Typography.js";
8
- import { g as Fe, a as Se, u as Oe, f as pe, _ as y, b as Te, c as be, i as Ie, d as Be, e as Ue, P as n } from "../../useSlotProps-CYHDC4TN.js";
9
- import '../../assets/Input.css';function je(r) {
10
- let i = "https://mui.com/production-error/?code=" + r;
11
- for (let f = 1; f < arguments.length; f += 1)
12
- i += "&args[]=" + encodeURIComponent(arguments[f]);
13
- return "Minified MUI error #" + r + "; visit " + i + " for the full message.";
1
+ import { jsxs as T, jsx as I } from "react/jsx-runtime";
2
+ import * as x from "react";
3
+ import { forwardRef as we, useState as ye, useId as Pe, useRef as ve, useMemo as ue } from "react";
4
+ import { formatDecimalValue as _e, allowOnlyIntegerNumbers as Re, allowOnlyNumbers as Ee, parseToInteger as xe } from "../../utils/inputNumberAsText.js";
5
+ import { c as O } from "../../clsx-OuTLNxxd.js";
6
+ import { Icon as Se } from "../Icon/Icon.js";
7
+ import { Typography as se } from "../Typography/Typography.js";
8
+ import { g as Ve, a as Ce, u as Fe, e as pe, b as me, c as Oe, d as Te, P as n } from "../../ClassNameConfigurator-CVRWfyIa.js";
9
+ import '../../assets/Input.css';function Ie(l, ...d) {
10
+ const h = new URL(`https://mui.com/production-error/?code=${l}`);
11
+ return d.forEach((w) => h.searchParams.append("args[]", w)), `Minified MUI error #${l}; visit ${h} for the full message.`;
14
12
  }
15
- const ge = "Input";
16
- function Ae(r) {
17
- return Fe(ge, r);
13
+ function Be(l) {
14
+ return typeof l == "string";
18
15
  }
19
- Se(ge, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
20
- const he = /* @__PURE__ */ F.createContext(void 0);
21
- process.env.NODE_ENV !== "production" && (he.displayName = "FormControlContext");
22
- function ke() {
23
- return F.useContext(he);
16
+ const be = "Input";
17
+ function Ue(l) {
18
+ return Ve(be, l);
24
19
  }
25
- function He(r = {}) {
20
+ Ce(be, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
21
+ const ge = /* @__PURE__ */ x.createContext(void 0);
22
+ process.env.NODE_ENV !== "production" && (ge.displayName = "FormControlContext");
23
+ function je() {
24
+ return x.useContext(ge);
25
+ }
26
+ function ke(l = {}) {
26
27
  const {
27
- defaultValue: i,
28
- disabled: f = !1,
29
- error: C = !1,
28
+ defaultValue: d,
29
+ disabled: h = !1,
30
+ error: w = !1,
30
31
  onBlur: u,
31
- onChange: h,
32
- onFocus: x,
32
+ onChange: y,
33
+ onFocus: v,
33
34
  required: S = !1,
34
- value: k,
35
+ value: B,
35
36
  inputRef: m
36
- } = r, l = ke();
37
- let P, p, _, v, b;
38
- if (l) {
39
- var H, g, N;
40
- if (P = void 0, p = (H = l.disabled) != null ? H : !1, _ = (g = l.error) != null ? g : !1, v = (N = l.required) != null ? N : !1, b = l.value, process.env.NODE_ENV !== "production") {
41
- const o = ["defaultValue", "disabled", "error", "required", "value"].filter((e) => r[e] !== 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(`
37
+ } = l, a = je();
38
+ let R, f, b, p, N;
39
+ if (a) {
40
+ if (R = void 0, f = a.disabled ?? !1, b = a.error ?? !1, p = a.required ?? !1, N = a.value, process.env.NODE_ENV !== "production") {
41
+ const t = ["defaultValue", "disabled", "error", "required", "value"].filter((i) => l[i] !== 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(`
43
43
  `));
44
44
  }
45
45
  } else
46
- P = i, p = f, _ = C, v = S, b = k;
46
+ R = d, f = h, b = w, p = S, N = B;
47
47
  const {
48
- current: R
49
- } = F.useRef(b != null), q = F.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(`
48
+ current: k
49
+ } = x.useRef(N != null), A = x.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(`
51
51
  `));
52
- }, []), E = F.useRef(null), M = Oe(E, m, q), [O, T] = F.useState(!1);
53
- F.useEffect(() => {
54
- !l && p && O && (T(!1), u == null || u());
55
- }, [l, p, O, u]);
56
- const D = (o) => (e) => {
57
- var a;
58
- if (l != null && l.disabled) {
59
- e.stopPropagation();
52
+ }, []), g = x.useRef(null), P = Fe(g, m, A), [V, C] = x.useState(!1);
53
+ x.useEffect(() => {
54
+ !a && f && V && (C(!1), u == null || u());
55
+ }, [a, f, V, u]);
56
+ const M = (t) => (i) => {
57
+ var r, _;
58
+ if (a != null && a.disabled) {
59
+ i.stopPropagation();
60
60
  return;
61
61
  }
62
- if ((a = o.onFocus) == null || a.call(o, e), l && l.onFocus) {
63
- var c;
64
- l == null || (c = l.onFocus) == null || c.call(l);
65
- } else
66
- T(!0);
67
- }, $ = (o) => (e) => {
68
- var a;
69
- (a = o.onBlur) == null || a.call(o, e), l && l.onBlur ? l.onBlur() : T(!1);
70
- }, W = (o) => (e, ...a) => {
71
- var c, V;
72
- if (!R && (e.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." : je(17));
74
- l == null || (c = l.onChange) == null || c.call(l, e), (V = o.onChange) == null || V.call(o, e, ...a);
75
- }, Y = (o) => (e) => {
76
- var a;
77
- E.current && e.currentTarget === e.target && E.current.focus(), (a = o.onClick) == null || a.call(o, e);
62
+ (r = t.onFocus) == null || r.call(t, i), a && a.onFocus ? (_ = a == null ? void 0 : a.onFocus) == null || _.call(a) : C(!0);
63
+ }, q = (t) => (i) => {
64
+ var r;
65
+ (r = t.onBlur) == null || r.call(t, i), a && a.onBlur ? a.onBlur() : C(!1);
66
+ }, D = (t) => (i, ...r) => {
67
+ var _, e;
68
+ if (!k && (i.target || g.current) == null)
69
+ 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." : Ie(17));
70
+ (_ = a == null ? void 0 : a.onChange) == null || _.call(a, i), (e = t.onChange) == null || e.call(t, i, ...r);
71
+ }, K = (t) => (i) => {
72
+ var r;
73
+ g.current && i.currentTarget === i.target && g.current.focus(), (r = t.onClick) == null || r.call(t, i);
78
74
  };
79
75
  return {
80
- disabled: p,
81
- error: _,
82
- focused: O,
83
- formControlContext: l,
84
- getInputProps: (o = {}) => {
85
- const a = y({}, {
86
- onBlur: u,
87
- onChange: h,
88
- onFocus: x
89
- }, pe(o)), c = y({}, a, {
90
- onBlur: $(a),
91
- onChange: W(a),
92
- onFocus: D(a)
93
- });
94
- return y({}, c, {
95
- "aria-invalid": _ || void 0,
96
- defaultValue: P,
97
- value: b,
98
- required: v,
99
- disabled: p
100
- }, o, {
101
- ref: M
102
- }, c);
76
+ disabled: f,
77
+ error: b,
78
+ focused: V,
79
+ formControlContext: a,
80
+ getInputProps: (t = {}) => {
81
+ const r = {
82
+ ...{
83
+ onBlur: u,
84
+ onChange: y,
85
+ onFocus: v
86
+ },
87
+ ...pe(t)
88
+ }, _ = {
89
+ ...r,
90
+ onBlur: q(r),
91
+ onChange: D(r),
92
+ onFocus: M(r)
93
+ };
94
+ return {
95
+ ..._,
96
+ "aria-invalid": b || void 0,
97
+ defaultValue: R,
98
+ value: N,
99
+ required: p,
100
+ disabled: f,
101
+ ...t,
102
+ ref: P,
103
+ ..._
104
+ };
103
105
  },
104
- getRootProps: (o = {}) => {
105
- const e = pe(r, ["onBlur", "onChange", "onFocus"]), a = y({}, e, pe(o));
106
- return y({}, o, a, {
107
- onClick: Y(a)
108
- });
106
+ getRootProps: (t = {}) => {
107
+ const r = {
108
+ ...pe(l, ["onBlur", "onChange", "onFocus"]),
109
+ ...pe(t)
110
+ };
111
+ return {
112
+ ...t,
113
+ ...r,
114
+ onClick: K(r)
115
+ };
109
116
  },
110
- inputRef: M,
111
- required: v,
112
- value: b
117
+ inputRef: P,
118
+ required: p,
119
+ value: N
113
120
  };
114
121
  }
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"], Ke = (r) => {
122
+ const Ae = (l) => {
116
123
  const {
117
- disabled: i,
118
- error: f,
119
- focused: C,
124
+ disabled: d,
125
+ error: h,
126
+ focused: w,
120
127
  formControlContext: u,
121
- multiline: h,
122
- startAdornment: x,
128
+ multiline: y,
129
+ startAdornment: v,
123
130
  endAdornment: S
124
- } = r;
125
- return Be({
126
- root: ["root", i && "disabled", f && "error", C && "focused", !!u && "formControl", h && "multiline", !!x && "adornedStart", !!S && "adornedEnd"],
127
- input: ["input", i && "disabled", h && "multiline"]
128
- }, Ue(Ae));
129
- }, Ne = /* @__PURE__ */ F.forwardRef(function(i, f) {
130
- var C, u, h;
131
+ } = l;
132
+ return Oe({
133
+ root: ["root", d && "disabled", h && "error", w && "focused", !!u && "formControl", y && "multiline", !!v && "adornedStart", !!S && "adornedEnd"],
134
+ input: ["input", d && "disabled", y && "multiline"]
135
+ }, Te(Ue));
136
+ }, he = /* @__PURE__ */ x.forwardRef(function(d, h) {
131
137
  const {
132
- "aria-describedby": x,
133
- "aria-label": S,
134
- "aria-labelledby": k,
135
- autoComplete: m,
136
- autoFocus: l,
137
- className: P,
138
- defaultValue: p,
139
- disabled: _,
140
- endAdornment: v,
141
- error: b,
142
- id: H,
143
- multiline: g = !1,
138
+ "aria-describedby": w,
139
+ "aria-label": u,
140
+ "aria-labelledby": y,
141
+ autoComplete: v,
142
+ autoFocus: S,
143
+ className: B,
144
+ defaultValue: m,
145
+ disabled: a,
146
+ endAdornment: R,
147
+ error: f,
148
+ id: b,
149
+ multiline: p = !1,
144
150
  name: N,
145
- onClick: R,
146
- onChange: q,
147
- onKeyDown: E,
148
- onKeyUp: M,
149
- onFocus: O,
150
- onBlur: T,
151
- placeholder: D,
152
- readOnly: $,
153
- required: W,
154
- startAdornment: Y,
155
- value: X,
156
- type: L,
157
- rows: o,
158
- slotProps: e = {},
159
- slots: a = {},
160
- minRows: c,
161
- maxRows: V
162
- } = i, Z = Te(i, Me), {
163
- getRootProps: ee,
164
- getInputProps: z,
165
- focused: G,
166
- formControlContext: re,
167
- error: ne,
168
- disabled: ue
169
- } = He({
170
- disabled: _,
171
- defaultValue: p,
172
- error: b,
173
- onBlur: T,
174
- onClick: R,
175
- onChange: q,
176
- onFocus: O,
177
- required: W,
178
- value: X
179
- }), te = g ? void 0 : L ?? "text", J = y({}, i, {
180
- disabled: ue,
181
- error: ne,
182
- focused: G,
183
- formControlContext: re,
184
- multiline: g,
185
- type: te
186
- }), oe = Ke(J), ie = {
187
- "aria-describedby": x,
188
- "aria-label": S,
189
- "aria-labelledby": k,
190
- autoComplete: m,
191
- autoFocus: l,
192
- id: H,
193
- onKeyDown: E,
194
- onKeyUp: M,
151
+ onClick: k,
152
+ onChange: A,
153
+ onKeyDown: g,
154
+ onKeyUp: P,
155
+ onFocus: V,
156
+ onBlur: C,
157
+ placeholder: M,
158
+ readOnly: q,
159
+ required: D,
160
+ startAdornment: K,
161
+ value: z,
162
+ type: G,
163
+ rows: t,
164
+ slotProps: i = {},
165
+ slots: r = {},
166
+ minRows: _,
167
+ maxRows: e,
168
+ ...J
169
+ } = d, {
170
+ getRootProps: ae,
171
+ getInputProps: Q,
172
+ focused: re,
173
+ formControlContext: X,
174
+ error: $,
175
+ disabled: W
176
+ } = ke({
177
+ disabled: a,
178
+ defaultValue: m,
179
+ error: f,
180
+ onBlur: C,
181
+ onClick: k,
182
+ onChange: A,
183
+ onFocus: V,
184
+ required: D,
185
+ value: z
186
+ }), Z = p ? void 0 : G ?? "text", U = {
187
+ ...d,
188
+ disabled: W,
189
+ error: $,
190
+ focused: re,
191
+ formControlContext: X,
192
+ multiline: p,
193
+ type: Z
194
+ }, H = Ae(U), ie = {
195
+ "aria-describedby": w,
196
+ "aria-label": u,
197
+ "aria-labelledby": y,
198
+ autoComplete: v,
199
+ autoFocus: S,
200
+ id: b,
201
+ onKeyDown: g,
202
+ onKeyUp: P,
195
203
  name: N,
196
- placeholder: D,
197
- readOnly: $,
198
- type: te
199
- }, Q = (C = a.root) != null ? C : "div", le = be({
200
- elementType: Q,
201
- getSlotProps: ee,
202
- externalSlotProps: e.root,
203
- externalForwardedProps: Z,
204
+ placeholder: M,
205
+ readOnly: q,
206
+ type: Z
207
+ }, ee = r.root ?? "div", le = me({
208
+ elementType: ee,
209
+ getSlotProps: ae,
210
+ externalSlotProps: i.root,
211
+ externalForwardedProps: J,
204
212
  additionalProps: {
205
- ref: f
213
+ ref: h
206
214
  },
207
- ownerState: J,
208
- className: [oe.root, P]
209
- }), t = g ? (u = a.textarea) != null ? u : "textarea" : (h = a.input) != null ? h : "input", w = be({
210
- elementType: t,
211
- getSlotProps: (I) => z(y({}, ie, I)),
212
- externalSlotProps: e.input,
213
- additionalProps: y({
214
- rows: g ? o : void 0
215
- }, g && !Ie(t) && {
216
- minRows: o || c,
217
- maxRows: o || V
215
+ ownerState: U,
216
+ className: [H.root, B]
217
+ }), Y = p ? r.textarea ?? "textarea" : r.input ?? "input", ne = me({
218
+ elementType: Y,
219
+ getSlotProps: (te) => Q({
220
+ ...ie,
221
+ ...te
218
222
  }),
219
- ownerState: J,
220
- className: oe.input
223
+ externalSlotProps: i.input,
224
+ additionalProps: {
225
+ rows: p ? t : void 0,
226
+ ...p && !Be(Y) && {
227
+ minRows: t || _,
228
+ maxRows: t || e
229
+ }
230
+ },
231
+ ownerState: U,
232
+ className: H.input
233
+ });
234
+ return process.env.NODE_ENV !== "production" && p && t && (_ || e) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ T(ee, {
235
+ ...le,
236
+ children: [K, /* @__PURE__ */ I(Y, {
237
+ ...ne
238
+ }), R]
221
239
  });
222
- return process.env.NODE_ENV !== "production" && g && o && (c || V) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ j(Q, y({}, le, {
223
- children: [Y, /* @__PURE__ */ A(t, y({}, w)), v]
224
- }));
225
240
  });
226
- process.env.NODE_ENV !== "production" && (Ne.propTypes = {
241
+ process.env.NODE_ENV !== "production" && (he.propTypes = {
227
242
  // ┌────────────────────────────── Warning ──────────────────────────────┐
228
243
  // │ These PropTypes are generated from the TypeScript type definitions. │
229
244
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -373,13 +388,13 @@ process.env.NODE_ENV !== "production" && (Ne.propTypes = {
373
388
  */
374
389
  value: n.any
375
390
  });
376
- const qe = "_input_14020_58", De = "_input__labelWrapper_14020_85", $e = "_input__label_14020_85", We = "_input__labelHelp_14020_95", s = {
391
+ const Me = "_input_14020_58", qe = "_input__labelWrapper_14020_85", De = "_input__label_14020_85", Ke = "_input__labelHelp_14020_95", s = {
377
392
  "input__input-el": "_input__input-el_14020_58",
378
- input: qe,
393
+ input: Me,
379
394
  "input__messages-wrapper": "_input__messages-wrapper_14020_82",
380
- input__labelWrapper: De,
381
- input__label: $e,
382
- input__labelHelp: We,
395
+ input__labelWrapper: qe,
396
+ input__label: De,
397
+ input__labelHelp: Ke,
383
398
  "input__input-el-wrapper": "_input__input-el-wrapper_14020_100",
384
399
  "input__left-icon": "_input__left-icon_14020_125",
385
400
  "input__right-icon": "_input__right-icon_14020_125",
@@ -389,89 +404,89 @@ const qe = "_input_14020_58", De = "_input__labelWrapper_14020_85", $e = "_input
389
404
  "input--disabled": "_input--disabled_14020_167",
390
405
  "input--focused": "_input--focused_14020_173",
391
406
  "input--error": "_input--error_14020_176"
392
- }, Ze = ye(
407
+ }, Qe = we(
393
408
  ({
394
- label: r,
395
- labelHelp: i,
396
- infoMessage: f,
397
- error: C,
409
+ label: l,
410
+ labelHelp: d,
411
+ infoMessage: h,
412
+ error: w,
398
413
  errorMessage: u,
399
- leftIcon: h,
400
- rightIcon: x,
414
+ leftIcon: y,
415
+ rightIcon: v,
401
416
  id: S,
402
- disabled: k,
417
+ disabled: B,
403
418
  type: m = "text",
404
- maxLength: l,
405
- allowLeadingZeros: P = !1,
406
- isInteger: p,
407
- useCommaInDecimal: _,
408
- allowNegativeNumbers: v = !1,
409
- decimalLength: b = 10,
410
- hideCharsCounter: H = !1,
411
- required: g,
412
- onChange: N,
413
- triggerDelay: R,
414
- classNameWrapper: q,
415
- classNameLabel: E,
419
+ maxLength: a,
420
+ allowLeadingZeros: R = !1,
421
+ isInteger: f,
422
+ useCommaInDecimal: b,
423
+ allowNegativeNumbers: p = !1,
424
+ decimalLength: N = 10,
425
+ hideCharsCounter: k = !1,
426
+ required: A,
427
+ onChange: g,
428
+ triggerDelay: P,
429
+ classNameWrapper: V,
430
+ classNameLabel: C,
416
431
  classNameInput: M,
417
- classNameInfoMessage: O,
418
- classNameErrorMessage: T,
419
- classNameCharsCounter: D,
420
- "data-testid-wrapper": $,
421
- "data-testid-label": W,
422
- "data-testid-input": Y,
423
- "data-testid-infoMessage": X,
424
- "data-testid-errorMessage": L,
425
- "data-testid-charsCounter": o,
432
+ classNameInfoMessage: q,
433
+ classNameErrorMessage: D,
434
+ classNameCharsCounter: K,
435
+ "data-testid-wrapper": z,
436
+ "data-testid-label": G,
437
+ "data-testid-input": t,
438
+ "data-testid-infoMessage": i,
439
+ "data-testid-errorMessage": r,
440
+ "data-testid-charsCounter": _,
426
441
  ...e
427
- }, a) => {
428
- var Q, le;
429
- const [c, V] = Ce(
430
- ((Q = e.value) == null ? void 0 : Q.length) || ((le = e.defaultValue) == null ? void 0 : le.length) || 0
431
- ), Z = ve(), ee = S || `input_${Z}`;
432
- Object.assign(e, { "data-testid": Y });
433
- const z = l && !H, G = xe(), re = (t) => {
434
- G.current && clearTimeout(G.current), G.current = setTimeout(() => {
435
- ne(t);
436
- }, R);
437
- }, ne = (t) => {
438
- var w, I, B, ce;
442
+ }, J) => {
443
+ var ne, te;
444
+ const [ae, Q] = ye(
445
+ ((ne = e.value) == null ? void 0 : ne.length) || ((te = e.defaultValue) == null ? void 0 : te.length) || 0
446
+ ), re = Pe(), X = S || `input_${re.replace(/:/g, "-")}`;
447
+ Object.assign(e, { "data-testid": t });
448
+ const $ = a && !k, W = ve(), Z = (o) => {
449
+ W.current && clearTimeout(W.current), W.current = setTimeout(() => {
450
+ U(o);
451
+ }, P);
452
+ }, U = (o) => {
453
+ var E, L, F, ce;
439
454
  if (m === "number-as-text") {
440
- let d = p ? Ee(t.target.value, P) : _ ? t.target.value.replace(".", ",") : t.target.value.replace(",", ".");
441
- if (!p && b > 0) {
442
- const fe = String(d), [we, me] = fe.split(/,|\./);
443
- fe !== "" && me && (d = [we, me.slice(0, b)].join(_ ? "," : "."));
455
+ let c = f ? xe(o.target.value, R) : b ? o.target.value.replace(".", ",") : o.target.value.replace(",", ".");
456
+ if (!f && N > 0) {
457
+ const de = String(c), [Ne, fe] = de.split(/,|\./);
458
+ de !== "" && fe && (c = [Ne, fe.slice(0, N)].join(b ? "," : "."));
444
459
  }
445
- t.target.value = String(d);
446
- const ae = !isNaN(Number(String(d).replace(",", "."))), K = String(d).length ? String(d).replace(",", ".") : "";
447
- N == null || N({
448
- ...t,
460
+ o.target.value = String(c);
461
+ const oe = !isNaN(Number(String(c).replace(",", "."))), j = String(c).length ? String(c).replace(",", ".") : "";
462
+ g == null || g({
463
+ ...o,
449
464
  target: {
450
- ...t.target,
451
- value: K,
452
- valueAsNumber: ae && String(d).length ? Number(String(d).replace(",", ".")) : NaN
465
+ ...o.target,
466
+ value: j,
467
+ valueAsNumber: oe && String(c).length ? Number(String(c).replace(",", ".")) : NaN
453
468
  }
454
- }), z && V((I = (w = t == null ? void 0 : t.target) == null ? void 0 : w.value) == null ? void 0 : I.length);
469
+ }), $ && Q((L = (E = o == null ? void 0 : o.target) == null ? void 0 : E.value) == null ? void 0 : L.length);
455
470
  return;
456
471
  }
457
472
  if (m === "number") {
458
- let d = String(t.target.value);
459
- const [ae, K] = d.split(".");
460
- d !== "" && (K != null && K.length ? d = [Number(ae), K.slice(0, b)].join(".") : d = String(Number(ae))), t.target.value = d;
473
+ let c = String(o.target.value);
474
+ const [oe, j] = c.split(".");
475
+ c !== "" && (j != null && j.length ? c = [Number(oe), j.slice(0, N)].join(".") : c = String(Number(oe))), o.target.value = c;
461
476
  }
462
- z && V((ce = (B = t == null ? void 0 : t.target) == null ? void 0 : B.value) == null ? void 0 : ce.length), N && N(t);
463
- }, ue = (t) => {
464
- var w;
465
- m === "number-as-text" && (p ? Pe(t, v) : Re(t, v)), (w = e == null ? void 0 : e.onKeyDown) == null || w.call(e, t);
466
- }, te = (t) => {
467
- var w;
468
- if (m === "number-as-text" && t.target.value.length) {
469
- const I = p ? t.target.value.replace(/(,\.)/gi, "") : t.target.value.replace(",", ".");
470
- let B = String(P ? I : Number(I));
471
- isNaN(Number(B)) && (B = ""), t.target.value = _ ? B.replace(".", ",") : B;
477
+ $ && Q((ce = (F = o == null ? void 0 : o.target) == null ? void 0 : F.value) == null ? void 0 : ce.length), g && g(o);
478
+ }, H = (o) => {
479
+ var E;
480
+ m === "number-as-text" && (f ? Re(o, p) : Ee(o, p)), (E = e == null ? void 0 : e.onKeyDown) == null || E.call(e, o);
481
+ }, ie = (o) => {
482
+ var E;
483
+ if (m === "number-as-text" && o.target.value.length) {
484
+ const L = f ? o.target.value.replace(/(,\.)/gi, "") : o.target.value.replace(",", ".");
485
+ let F = String(R ? L : Number(L));
486
+ isNaN(Number(F)) && (F = ""), o.target.value = b ? F.replace(".", ",") : F;
472
487
  }
473
- (w = e == null ? void 0 : e.onBlur) == null || w.call(e, t);
474
- }, J = se(() => e.multiline !== !0 ? {
488
+ (E = e == null ? void 0 : e.onBlur) == null || E.call(e, o);
489
+ }, ee = ue(() => e.multiline !== !0 ? {
475
490
  type: m === "number-as-text" ? "text" : m,
476
491
  multiline: e.multiline
477
492
  } : {
@@ -480,84 +495,84 @@ const qe = "_input_14020_58", De = "_input__labelWrapper_14020_85", $e = "_input
480
495
  rows: (e == null ? void 0 : e.rows) || 5,
481
496
  minRows: e == null ? void 0 : e.minRows,
482
497
  maxRows: e == null ? void 0 : e.maxRows
483
- }, [e]), oe = se(() => {
484
- const t = R ? (e == null ? void 0 : e.value) ?? (e == null ? void 0 : e.defaultValue) : e == null ? void 0 : e.defaultValue;
485
- return m === "number-as-text" && t ? _e(t, _) : t;
486
- }, [e.defaultValue]), ie = se(() => {
487
- if (!R)
488
- return m === "number-as-text" && (e != null && e.value) ? _e(e == null ? void 0 : e.value, _) : e == null ? void 0 : e.value;
498
+ }, [e]), le = ue(() => {
499
+ const o = P ? (e == null ? void 0 : e.value) ?? (e == null ? void 0 : e.defaultValue) : e == null ? void 0 : e.defaultValue;
500
+ return m === "number-as-text" && o ? _e(o, b) : o;
501
+ }, [e.defaultValue]), Y = ue(() => {
502
+ if (!P)
503
+ return m === "number-as-text" && (e != null && e.value) ? _e(e == null ? void 0 : e.value, b) : e == null ? void 0 : e.value;
489
504
  }, [e.value]);
490
- return /* @__PURE__ */ j("div", { className: U(s.input, q), "data-testid": $, children: [
491
- (r || i) && /* @__PURE__ */ j("div", { className: s.input__labelWrapper, children: [
492
- r && /* @__PURE__ */ j(
493
- de,
505
+ return /* @__PURE__ */ T("div", { className: O(s.input, V), "data-testid": z, children: [
506
+ (l || d) && /* @__PURE__ */ T("div", { className: s.input__labelWrapper, children: [
507
+ l && /* @__PURE__ */ T(
508
+ se,
494
509
  {
495
510
  bold: !0,
496
511
  element: "label",
497
- elementProps: { htmlFor: ee },
498
- className: U(s.input__label, E),
499
- "data-testid": W,
512
+ elementProps: { htmlFor: X },
513
+ className: O(s.input__label, C),
514
+ "data-testid": G,
500
515
  children: [
501
- r,
502
- g && /* @__PURE__ */ A("span", { children: "*" })
516
+ l,
517
+ A && /* @__PURE__ */ I("span", { children: "*" })
503
518
  ]
504
519
  }
505
520
  ),
506
- i && /* @__PURE__ */ A("div", { className: s.input__labelHelp, children: i })
521
+ d && /* @__PURE__ */ I("div", { className: s.input__labelHelp, children: d })
507
522
  ] }),
508
- /* @__PURE__ */ A(
509
- Ne,
523
+ /* @__PURE__ */ I(
524
+ he,
510
525
  {
511
- id: ee,
512
- disabled: k,
513
- error: typeof C == "boolean" ? C : !!u,
514
- "aria-label": r,
526
+ id: X,
527
+ disabled: B,
528
+ error: typeof w == "boolean" ? w : !!u,
529
+ "aria-label": l,
515
530
  slotProps: {
516
- root: (t) => ({
517
- className: U(s["input__input-el-wrapper"], {
518
- [s["input--disabled"]]: t.disabled,
519
- [s["input--focused"]]: t.focused,
520
- [s["input--error"]]: t.error
531
+ root: (o) => ({
532
+ className: O(s["input__input-el-wrapper"], {
533
+ [s["input--disabled"]]: o.disabled,
534
+ [s["input--focused"]]: o.focused,
535
+ [s["input--error"]]: o.error
521
536
  })
522
537
  }),
523
538
  input: {
524
- ref: a,
525
- className: U(s["input__input-el"], M),
526
- maxLength: l,
527
- onChange: R ? re : ne,
539
+ ref: J,
540
+ className: O(s["input__input-el"], M),
541
+ maxLength: a,
542
+ onChange: P ? Z : U,
528
543
  ...e,
529
- onKeyDown: ue,
530
- onBlur: te,
531
- defaultValue: oe,
532
- value: ie
544
+ onKeyDown: H,
545
+ onBlur: ie,
546
+ defaultValue: le,
547
+ value: Y
533
548
  }
534
549
  },
535
- startAdornment: h && /* @__PURE__ */ A("span", { className: s["input__left-icon"], children: h }),
536
- endAdornment: x && /* @__PURE__ */ A("span", { className: s["input__right-icon"], children: x }),
537
- ...J
550
+ startAdornment: y && /* @__PURE__ */ I("span", { className: s["input__left-icon"], children: y }),
551
+ endAdornment: v && /* @__PURE__ */ I("span", { className: s["input__right-icon"], children: v }),
552
+ ...ee
538
553
  }
539
554
  ),
540
- /* @__PURE__ */ j("div", { className: s["input__messages-wrapper"], children: [
541
- (u || f) && /* @__PURE__ */ j(
542
- de,
555
+ /* @__PURE__ */ T("div", { className: s["input__messages-wrapper"], children: [
556
+ (u || h) && /* @__PURE__ */ T(
557
+ se,
543
558
  {
544
- className: u ? U(s["input__error-message"], T) : U(s["input__info-message"], O),
545
- "data-testid": u ? L : X,
559
+ className: u ? O(s["input__error-message"], D) : O(s["input__info-message"], q),
560
+ "data-testid": u ? r : i,
546
561
  children: [
547
- /* @__PURE__ */ A(Ve, { icon: u ? "circle-exclamation" : "circle-info" }),
548
- u || f
562
+ /* @__PURE__ */ I(Se, { icon: u ? "circle-exclamation" : "circle-info" }),
563
+ u || h
549
564
  ]
550
565
  }
551
566
  ),
552
- z && /* @__PURE__ */ j(
553
- de,
567
+ $ && /* @__PURE__ */ T(
568
+ se,
554
569
  {
555
- className: U(s["input__chars-counter"], D),
556
- "data-testid": o,
570
+ className: O(s["input__chars-counter"], K),
571
+ "data-testid": _,
557
572
  children: [
558
- c,
573
+ ae,
559
574
  " / ",
560
- l
575
+ a
561
576
  ]
562
577
  }
563
578
  )
@@ -566,5 +581,5 @@ const qe = "_input_14020_58", De = "_input__labelWrapper_14020_85", $e = "_input
566
581
  }
567
582
  );
568
583
  export {
569
- Ze as Input
584
+ Qe as Input
570
585
  };