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