@pismo/marola 1.0.0-beta.6 → 1.0.0-beta.62

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 (165) hide show
  1. package/dist/{Button-2b1peDFT.js → Button-BAljjMv3.js} +2 -2
  2. package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-DbEYZpyh.js} +4 -3
  3. package/dist/Dialog.module-W7UCXlf3.js +29 -0
  4. package/dist/Group-DspH8hyO.js +30 -0
  5. package/dist/Popover.module-B4boCutS.js +10 -0
  6. package/dist/{Popup-B6ZSGIEI.js → Popup-Ck3XlWMq.js} +3 -3
  7. package/dist/{Portal-DIeBsWdL.js → Portal-oY3enyAm.js} +2 -2
  8. package/dist/SelectButton-B38avP9u.js +75 -0
  9. package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
  10. package/dist/Toggle-MfR7l8Wn.js +190 -0
  11. package/dist/assets/Adornment.css +1 -0
  12. package/dist/assets/Advice.css +1 -1
  13. package/dist/assets/Autocomplete.css +1 -0
  14. package/dist/assets/Avatar.css +1 -0
  15. package/dist/assets/Button.css +1 -1
  16. package/dist/assets/Checkbox.css +1 -1
  17. package/dist/assets/Description.css +1 -0
  18. package/dist/assets/Dialog.css +1 -1
  19. package/dist/assets/EllipsisTooltip.css +1 -1
  20. package/dist/assets/Group.css +1 -1
  21. package/dist/assets/IconButton.css +1 -1
  22. package/dist/assets/Input.css +1 -1
  23. package/dist/assets/PageHeader.css +1 -1
  24. package/dist/assets/Pagination.css +1 -1
  25. package/dist/assets/Popover.css +1 -0
  26. package/dist/assets/ResultWithChips.css +1 -0
  27. package/dist/assets/SelectButton.css +1 -1
  28. package/dist/assets/Skeleton.css +1 -1
  29. package/dist/assets/Snackbar.css +1 -1
  30. package/dist/assets/SortTooltip.css +1 -1
  31. package/dist/assets/Stepper.css +1 -1
  32. package/dist/assets/StepperNavigator.css +1 -0
  33. package/dist/assets/Table.css +1 -1
  34. package/dist/assets/Tabs.css +1 -1
  35. package/dist/assets/TextDisplay.css +1 -1
  36. package/dist/assets/Toggle.css +1 -1
  37. package/dist/assets/Toggle2.css +1 -1
  38. package/dist/assets/Typography.css +1 -1
  39. package/dist/{combineHooksSlotProps-DVjg9PRh.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
  40. package/dist/components/Adornment/Adornment.d.ts +20 -0
  41. package/dist/components/Adornment/Adornment.js +13 -0
  42. package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
  43. package/dist/components/Adornment/adornment.test.d.ts +1 -0
  44. package/dist/components/Advice/Advice.d.ts +32 -17
  45. package/dist/components/Advice/Advice.js +39 -40
  46. package/dist/components/Advice/Advice.stories.d.ts +4 -3
  47. package/dist/components/Autocomplete/Autocomplete.d.ts +20 -0
  48. package/dist/components/Autocomplete/Autocomplete.js +679 -0
  49. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +23 -0
  50. package/dist/components/Avatar/Avatar.d.ts +15 -0
  51. package/dist/components/Avatar/Avatar.js +51 -0
  52. package/dist/components/Avatar/Avatar.stories.d.ts +25 -0
  53. package/dist/components/Button/Button.d.ts +2 -0
  54. package/dist/components/Button/Button.js +51 -49
  55. package/dist/components/Checkbox/Checkbox.js +52 -52
  56. package/dist/components/Chip/Chip.d.ts +6 -12
  57. package/dist/components/Chip/Chip.js +12 -7
  58. package/dist/components/Chip/Chip.stories.d.ts +5 -14
  59. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +14 -0
  60. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +37 -0
  61. package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +23 -0
  62. package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +1 -0
  63. package/dist/components/Description/Description.d.ts +15 -0
  64. package/dist/components/Description/Description.js +54 -0
  65. package/dist/components/Description/Description.stories.d.ts +18 -0
  66. package/dist/components/Description/Description.test.d.ts +1 -0
  67. package/dist/components/Dialog/Actions.js +1 -1
  68. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  69. package/dist/components/Dialog/Backdrop.js +8 -7
  70. package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
  71. package/dist/components/Dialog/CloseIconButton.js +15 -18
  72. package/dist/components/Dialog/Dialog.d.ts +16 -10
  73. package/dist/components/Dialog/Dialog.js +167 -166
  74. package/dist/components/Dialog/Dialog.stories.d.ts +115 -109
  75. package/dist/components/Dialog/DialogTitle.d.ts +5 -2
  76. package/dist/components/Dialog/DialogTitle.js +22 -16
  77. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
  78. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +2 -1
  79. package/dist/components/Icon/Icon.js +315 -47
  80. package/dist/components/Icon/types.d.ts +1 -1
  81. package/dist/components/IconButton/IconButton.js +42 -42
  82. package/dist/components/Input/Input.d.ts +26 -5
  83. package/dist/components/Input/Input.js +319 -304
  84. package/dist/components/Input/Input.stories.d.ts +2 -21
  85. package/dist/components/InputSearch/InputSearch.d.ts +37 -7
  86. package/dist/components/InputSearch/InputSearch.js +27 -29
  87. package/dist/components/InputSearch/InputSearch.stories.d.ts +15 -3
  88. package/dist/components/PageHeader/PageHeader.d.ts +6 -2
  89. package/dist/components/PageHeader/PageHeader.js +72 -65
  90. package/dist/components/PageHeader/PageHeader.stories.d.ts +3 -1
  91. package/dist/components/PageHeader/PageHeader.test.d.ts +1 -0
  92. package/dist/components/Pagination/Pagination.d.ts +5 -1
  93. package/dist/components/Pagination/Pagination.js +90 -91
  94. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  95. package/dist/components/Popover/Popover.d.ts +32 -0
  96. package/dist/components/Popover/Popover.js +24 -0
  97. package/dist/components/Popover/Popover.stories.d.ts +34 -0
  98. package/dist/components/Popover/PopoverBody.d.ts +6 -0
  99. package/dist/components/Popover/PopoverBody.js +6 -0
  100. package/dist/components/Popover/PopoverFooter.d.ts +6 -0
  101. package/dist/components/Popover/PopoverFooter.js +6 -0
  102. package/dist/components/Popover/PopoverHeader.d.ts +6 -0
  103. package/dist/components/Popover/PopoverHeader.js +6 -0
  104. package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
  105. package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
  106. package/dist/components/RowItem/RowItem.d.ts +25 -0
  107. package/dist/components/RowItem/RowItem.js +23 -0
  108. package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
  109. package/dist/components/RowItem/rowItem.test.d.ts +1 -0
  110. package/dist/components/Select/Select.d.ts +22 -0
  111. package/dist/components/Select/Select.js +476 -413
  112. package/dist/components/Select/SelectButton.d.ts +2 -0
  113. package/dist/components/Select/SelectButton.js +3 -2
  114. package/dist/components/Skeleton/Skeleton.d.ts +3 -1
  115. package/dist/components/Skeleton/Skeleton.js +20 -14
  116. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  117. package/dist/components/Snackbar/Snackbar.js +94 -94
  118. package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
  119. package/dist/components/SortTooltip/SortTooltip.js +46 -46
  120. package/dist/components/Stepper/Stepper.js +35 -35
  121. package/dist/components/StepperNavigator/StepperNavigator.d.ts +58 -0
  122. package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
  123. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -0
  124. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
  125. package/dist/components/Table/Table.d.ts +3 -1
  126. package/dist/components/Table/Table.js +87 -99
  127. package/dist/components/Table/Table.stories.d.ts +1 -1
  128. package/dist/components/Tabs/Tab.d.ts +5 -3
  129. package/dist/components/Tabs/Tab.js +38 -36
  130. package/dist/components/Tabs/TabPanel.d.ts +4 -2
  131. package/dist/components/Tabs/TabPanel.js +51 -40
  132. package/dist/components/Tabs/Tabs.d.ts +6 -4
  133. package/dist/components/Tabs/Tabs.js +131 -128
  134. package/dist/components/TextDisplay/TextDisplay.d.ts +9 -3
  135. package/dist/components/TextDisplay/TextDisplay.js +45 -31
  136. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
  137. package/dist/components/Toggle/Toggle.js +56 -56
  138. package/dist/components/ToggleGroup/Group.d.ts +2 -0
  139. package/dist/components/ToggleGroup/Group.js +4 -2
  140. package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
  141. package/dist/components/ToggleGroup/Toggle.js +9 -5
  142. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  143. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +2 -0
  144. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  145. package/dist/components/Tooltip/Tooltip.js +4 -4
  146. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
  147. package/dist/components/Typography/Typography.js +47 -47
  148. package/dist/{index-CjW42-M-.js → index-bQFToy-I.js} +1 -1
  149. package/dist/main.d.ts +9 -0
  150. package/dist/main.js +91 -76
  151. package/dist/marola.css +1 -1
  152. package/dist/ownerDocument-YGhwAnr1.js +33 -0
  153. package/dist/{useButton-DNk3wrQp.js → useButton-DcihopJG.js} +1 -1
  154. package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
  155. package/dist/useEventCallback-BAQJJ3ye.js +14 -0
  156. package/dist/useId-BW-oWmul.js +19 -0
  157. package/dist/{useList-B0hog_3-.js → useList-B9C55YB7.js} +2 -2
  158. package/dist/{index-CH45lKw7.js → useSlotProps-C_I1kEHr.js} +99 -99
  159. package/package.json +22 -13
  160. package/dist/Dialog.module-DFEmFdYT.js +0 -30
  161. package/dist/Group-B3p31ftp.js +0 -26
  162. package/dist/SelectButton-K3OIfR5m.js +0 -61
  163. package/dist/Toggle-BCgIItCc.js +0 -142
  164. package/dist/useCompoundItem-D1iRfg8D.js +0 -84
  165. package/dist/useEventCallback-xTG9piMa.js +0 -45
@@ -1,228 +1,229 @@
1
1
  import '../../assets/Input.css';
2
- import { jsxs as q, jsx as B } from "react/jsx-runtime";
3
- import * as h from "react";
4
- import { useState as de, useId as ce } from "react";
5
- import { c as R } from "../../clsx-DB4S2d7J.js";
6
- import { Typography as L } from "../Typography/Typography.js";
7
- import { g as _e, a as he, u as me, f as z, b as m, _ as fe, c as Q, i as be, P as e, d as ye, e as ge } from "../../index-CH45lKw7.js";
8
- function ve(a) {
9
- let l = "https://mui.com/production-error/?code=" + a;
10
- for (let s = 1; s < arguments.length; s += 1)
11
- l += "&args[]=" + encodeURIComponent(arguments[s]);
12
- return "Minified MUI error #" + a + "; visit " + l + " for the full message.";
2
+ import { jsxs as K, 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 he } from "react";
5
+ import { c as T } from "../../clsx-DB4S2d7J.js";
6
+ import { Icon as me } from "../Icon/Icon.js";
7
+ import { Typography as G } from "../Typography/Typography.js";
8
+ import { g as fe, a as ye, u as ge, f as J, b as f, _ as be, c as ee, i as Ce, P as e, d as we, e as xe } from "../../useSlotProps-C_I1kEHr.js";
9
+ function Ne(l) {
10
+ let i = "https://mui.com/production-error/?code=" + l;
11
+ for (let d = 1; d < arguments.length; d += 1)
12
+ i += "&args[]=" + encodeURIComponent(arguments[d]);
13
+ return "Minified MUI error #" + l + "; visit " + i + " for the full message.";
13
14
  }
14
- const X = /* @__PURE__ */ h.createContext(void 0);
15
- process.env.NODE_ENV !== "production" && (X.displayName = "FormControlContext");
16
- function Ce() {
17
- return h.useContext(X);
15
+ const ne = "Input";
16
+ function Pe(l) {
17
+ return fe(ne, l);
18
18
  }
19
- const Z = "Input";
20
- function we(a) {
21
- return _e(Z, a);
19
+ ye(ne, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
20
+ const te = /* @__PURE__ */ x.createContext(void 0);
21
+ process.env.NODE_ENV !== "production" && (te.displayName = "FormControlContext");
22
+ function ve() {
23
+ return x.useContext(te);
22
24
  }
23
- he(Z, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
24
- function ke(a = {}) {
25
+ function Re(l = {}) {
25
26
  const {
26
- defaultValue: l,
27
- disabled: s = !1,
28
- error: f = !1,
29
- onBlur: i,
30
- onChange: b,
31
- onFocus: x,
32
- required: N = !1,
33
- value: g,
34
- inputRef: V
35
- } = a, o = Ce();
36
- let P, _, v, C, y;
37
- if (o) {
38
- var F, p, I;
39
- if (P = void 0, _ = (F = o.disabled) != null ? F : !1, v = (p = o.error) != null ? p : !1, C = (I = o.required) != null ? I : !1, y = o.value, process.env.NODE_ENV !== "production") {
40
- const t = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => a[r] !== void 0);
41
- 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(`
27
+ defaultValue: i,
28
+ disabled: d = !1,
29
+ error: u = !1,
30
+ onBlur: c,
31
+ onChange: m,
32
+ onFocus: N,
33
+ required: P = !1,
34
+ value: v,
35
+ inputRef: R
36
+ } = l, t = ve();
37
+ let E, _, g, b, y;
38
+ if (t) {
39
+ var k, h, S;
40
+ if (E = void 0, _ = (k = t.disabled) != null ? k : !1, g = (h = t.error) != null ? h : !1, b = (S = t.required) != null ? S : !1, y = t.value, process.env.NODE_ENV !== "production") {
41
+ const n = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => l[r] !== void 0);
42
+ n.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: ${n.join(", ")}`].join(`
42
43
  `));
43
44
  }
44
45
  } else
45
- P = l, _ = s, v = f, C = N, y = g;
46
+ E = i, _ = d, g = u, b = P, y = v;
46
47
  const {
47
- current: U
48
- } = h.useRef(y != null), M = h.useCallback((t) => {
49
- process.env.NODE_ENV !== "production" && t && t.nodeName !== "INPUT" && !t.focus && console.error(["MUI: You have provided a `slots.input` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
48
+ current: A
49
+ } = x.useRef(y != null), D = x.useCallback((n) => {
50
+ process.env.NODE_ENV !== "production" && n && n.nodeName !== "INPUT" && !n.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
- }, []), w = h.useRef(null), O = me(w, V, M), [k, E] = h.useState(!1);
52
- h.useEffect(() => {
53
- !o && _ && k && (E(!1), i == null || i());
54
- }, [o, _, k, i]);
55
- const A = (t) => (r) => {
56
- var n;
57
- if (o != null && o.disabled) {
52
+ }, []), C = x.useRef(null), B = ge(C, R, D), [F, I] = x.useState(!1);
53
+ x.useEffect(() => {
54
+ !t && _ && F && (I(!1), c == null || c());
55
+ }, [t, _, F, c]);
56
+ const s = (n) => (r) => {
57
+ var o;
58
+ if (t != null && t.disabled) {
58
59
  r.stopPropagation();
59
60
  return;
60
61
  }
61
- if ((n = t.onFocus) == null || n.call(t, r), o && o.onFocus) {
62
- var c;
63
- o == null || (c = o.onFocus) == null || c.call(o);
62
+ if ((o = n.onFocus) == null || o.call(n, r), t && t.onFocus) {
63
+ var a;
64
+ t == null || (a = t.onFocus) == null || a.call(t);
64
65
  } else
65
- E(!0);
66
- }, D = (t) => (r) => {
67
- var n;
68
- (n = t.onBlur) == null || n.call(t, r), o && o.onBlur ? o.onBlur() : E(!1);
69
- }, T = (t) => (r, ...n) => {
70
- var c, H;
71
- if (!U && (r.target || w.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." : ve(17));
73
- o == null || (c = o.onChange) == null || c.call(o, r), (H = t.onChange) == null || H.call(t, r, ...n);
74
- }, j = (t) => (r) => {
75
- var n;
76
- w.current && r.currentTarget === r.target && w.current.focus(), (n = t.onClick) == null || n.call(t, r);
66
+ I(!0);
67
+ }, M = (n) => (r) => {
68
+ var o;
69
+ (o = n.onBlur) == null || o.call(n, r), t && t.onBlur ? t.onBlur() : I(!1);
70
+ }, H = (n) => (r, ...o) => {
71
+ var a, w;
72
+ if (!A && (r.target || C.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." : Ne(17));
74
+ t == null || (a = t.onChange) == null || a.call(t, r), (w = n.onChange) == null || w.call(n, r, ...o);
75
+ }, q = (n) => (r) => {
76
+ var o;
77
+ C.current && r.currentTarget === r.target && C.current.focus(), (o = n.onClick) == null || o.call(n, r);
77
78
  };
78
79
  return {
79
80
  disabled: _,
80
- error: v,
81
- focused: k,
82
- formControlContext: o,
83
- getInputProps: (t = {}) => {
84
- const n = m({}, {
85
- onBlur: i,
86
- onChange: b,
87
- onFocus: x
88
- }, z(t)), c = m({}, n, {
89
- onBlur: D(n),
90
- onChange: T(n),
91
- onFocus: A(n)
81
+ error: g,
82
+ focused: F,
83
+ formControlContext: t,
84
+ getInputProps: (n = {}) => {
85
+ const o = f({}, {
86
+ onBlur: c,
87
+ onChange: m,
88
+ onFocus: N
89
+ }, J(n)), a = f({}, o, {
90
+ onBlur: M(o),
91
+ onChange: H(o),
92
+ onFocus: s(o)
92
93
  });
93
- return m({}, c, {
94
- "aria-invalid": v || void 0,
95
- defaultValue: P,
94
+ return f({}, a, {
95
+ "aria-invalid": g || void 0,
96
+ defaultValue: E,
96
97
  value: y,
97
- required: C,
98
+ required: b,
98
99
  disabled: _
99
- }, t, {
100
- ref: O
101
- }, c);
100
+ }, n, {
101
+ ref: B
102
+ }, a);
102
103
  },
103
- getRootProps: (t = {}) => {
104
- const r = z(a, ["onBlur", "onChange", "onFocus"]), n = m({}, r, z(t));
105
- return m({}, t, n, {
106
- onClick: j(n)
104
+ getRootProps: (n = {}) => {
105
+ const r = J(l, ["onBlur", "onChange", "onFocus"]), o = f({}, r, J(n));
106
+ return f({}, n, o, {
107
+ onClick: q(o)
107
108
  });
108
109
  },
109
- inputRef: O,
110
- required: C,
110
+ inputRef: B,
111
+ required: b,
111
112
  value: y
112
113
  };
113
114
  }
114
- const xe = ["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"], Ne = (a) => {
115
+ 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 = (l) => {
115
116
  const {
116
- disabled: l,
117
- error: s,
118
- focused: f,
119
- formControlContext: i,
120
- multiline: b,
121
- startAdornment: x,
122
- endAdornment: N
123
- } = a;
124
- return ye({
125
- root: ["root", l && "disabled", s && "error", f && "focused", !!i && "formControl", b && "multiline", !!x && "adornedStart", !!N && "adornedEnd"],
126
- input: ["input", l && "disabled", b && "multiline"]
127
- }, ge(we));
128
- }, ee = /* @__PURE__ */ h.forwardRef(function(l, s) {
129
- var f, i, b;
117
+ disabled: i,
118
+ error: d,
119
+ focused: u,
120
+ formControlContext: c,
121
+ multiline: m,
122
+ startAdornment: N,
123
+ endAdornment: P
124
+ } = l;
125
+ return we({
126
+ root: ["root", i && "disabled", d && "error", u && "focused", !!c && "formControl", m && "multiline", !!N && "adornedStart", !!P && "adornedEnd"],
127
+ input: ["input", i && "disabled", m && "multiline"]
128
+ }, xe(Pe));
129
+ }, oe = /* @__PURE__ */ x.forwardRef(function(i, d) {
130
+ var u, c, m;
130
131
  const {
131
- "aria-describedby": x,
132
- "aria-label": N,
133
- "aria-labelledby": g,
134
- autoComplete: V,
135
- autoFocus: o,
136
- className: P,
132
+ "aria-describedby": N,
133
+ "aria-label": P,
134
+ "aria-labelledby": v,
135
+ autoComplete: R,
136
+ autoFocus: t,
137
+ className: E,
137
138
  defaultValue: _,
138
- disabled: v,
139
- endAdornment: C,
139
+ disabled: g,
140
+ endAdornment: b,
140
141
  error: y,
141
- id: F,
142
- multiline: p = !1,
143
- name: I,
144
- onClick: U,
145
- onChange: M,
146
- onKeyDown: w,
147
- onKeyUp: O,
148
- onFocus: k,
149
- onBlur: E,
150
- placeholder: A,
151
- readOnly: D,
152
- required: T,
153
- startAdornment: j,
154
- value: d,
155
- type: S,
156
- rows: t,
142
+ id: k,
143
+ multiline: h = !1,
144
+ name: S,
145
+ onClick: A,
146
+ onChange: D,
147
+ onKeyDown: C,
148
+ onKeyUp: B,
149
+ onFocus: F,
150
+ onBlur: I,
151
+ placeholder: s,
152
+ readOnly: M,
153
+ required: H,
154
+ startAdornment: q,
155
+ value: L,
156
+ type: U,
157
+ rows: n,
157
158
  slotProps: r = {},
158
- slots: n = {},
159
- minRows: c,
160
- maxRows: H
161
- } = l, Y = fe(l, xe), {
162
- getRootProps: te,
163
- getInputProps: oe,
164
- focused: ne,
159
+ slots: o = {},
160
+ minRows: a,
161
+ maxRows: w
162
+ } = i, $ = be(i, Ee), {
163
+ getRootProps: O,
164
+ getInputProps: Y,
165
+ focused: V,
165
166
  formControlContext: re,
166
167
  error: ae,
167
168
  disabled: se
168
- } = ke({
169
- disabled: v,
169
+ } = Re({
170
+ disabled: g,
170
171
  defaultValue: _,
171
172
  error: y,
172
- onBlur: E,
173
- onClick: U,
174
- onChange: M,
175
- onFocus: k,
176
- required: T,
177
- value: d
178
- }), W = p ? void 0 : S ?? "text", $ = m({}, l, {
173
+ onBlur: I,
174
+ onClick: A,
175
+ onChange: D,
176
+ onFocus: F,
177
+ required: H,
178
+ value: L
179
+ }), Q = h ? void 0 : U ?? "text", W = f({}, i, {
179
180
  disabled: se,
180
181
  error: ae,
181
- focused: ne,
182
+ focused: V,
182
183
  formControlContext: re,
183
- multiline: p,
184
- type: W
185
- }), G = Ne($), le = {
186
- "aria-describedby": x,
187
- "aria-label": N,
188
- "aria-labelledby": g,
189
- autoComplete: V,
190
- autoFocus: o,
191
- id: F,
192
- onKeyDown: w,
193
- onKeyUp: O,
194
- name: I,
195
- placeholder: A,
196
- readOnly: D,
197
- type: W
198
- }, J = (f = n.root) != null ? f : "div", ue = Q({
199
- elementType: J,
200
- getSlotProps: te,
184
+ multiline: h,
185
+ type: Q
186
+ }), X = Fe(W), le = {
187
+ "aria-describedby": N,
188
+ "aria-label": P,
189
+ "aria-labelledby": v,
190
+ autoComplete: R,
191
+ autoFocus: t,
192
+ id: k,
193
+ onKeyDown: C,
194
+ onKeyUp: B,
195
+ name: S,
196
+ placeholder: s,
197
+ readOnly: M,
198
+ type: Q
199
+ }, Z = (u = o.root) != null ? u : "div", ie = ee({
200
+ elementType: Z,
201
+ getSlotProps: O,
201
202
  externalSlotProps: r.root,
202
- externalForwardedProps: Y,
203
+ externalForwardedProps: $,
203
204
  additionalProps: {
204
- ref: s
205
+ ref: d
205
206
  },
206
- ownerState: $,
207
- className: [G.root, P]
208
- }), K = p ? (i = n.textarea) != null ? i : "textarea" : (b = n.input) != null ? b : "input", ie = Q({
209
- elementType: K,
210
- getSlotProps: (pe) => oe(m({}, le, pe)),
207
+ ownerState: W,
208
+ className: [X.root, E]
209
+ }), z = h ? (c = o.textarea) != null ? c : "textarea" : (m = o.input) != null ? m : "input", ue = ee({
210
+ elementType: z,
211
+ getSlotProps: (pe) => Y(f({}, le, pe)),
211
212
  externalSlotProps: r.input,
212
- additionalProps: m({
213
- rows: p ? t : void 0
214
- }, p && !be(K) && {
215
- minRows: t || c,
216
- maxRows: t || H
213
+ additionalProps: f({
214
+ rows: h ? n : void 0
215
+ }, h && !Ce(z) && {
216
+ minRows: n || a,
217
+ maxRows: n || w
217
218
  }),
218
- ownerState: $,
219
- className: G.input
219
+ ownerState: W,
220
+ className: X.input
220
221
  });
221
- return process.env.NODE_ENV !== "production" && p && t && (c || H) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ q(J, m({}, ue, {
222
- children: [j, /* @__PURE__ */ B(K, m({}, ie)), C]
222
+ return process.env.NODE_ENV !== "production" && h && n && (a || w) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ K(Z, f({}, ie, {
223
+ children: [q, /* @__PURE__ */ j(z, f({}, ue)), b]
223
224
  }));
224
225
  });
225
- process.env.NODE_ENV !== "production" && (ee.propTypes = {
226
+ process.env.NODE_ENV !== "production" && (oe.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,137 +373,151 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
372
373
  */
373
374
  value: e.any
374
375
  });
375
- const Pe = (a) => /* @__PURE__ */ h.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", "data-waves-icon": "fa/solid/circle-exclamation", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
376
- fill: "currentcolor",
377
- color: "currentcolor",
378
- width: "1em",
379
- height: "1em"
380
- }, ...a }, /* @__PURE__ */ h.createElement("path", { d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z" })), Ee = "_input__label_19vkb_77", Re = "_input_19vkb_56", u = {
381
- "u-typography-h1": "_u-typography-h1_19vkb_1",
382
- "u-typography-h2": "_u-typography-h2_19vkb_8",
383
- "u-typography-h3": "_u-typography-h3_19vkb_15",
384
- "u-typography-h4": "_u-typography-h4_19vkb_22",
385
- "u-typography-h5": "_u-typography-h5_19vkb_29",
386
- "u-typography-h6": "_u-typography-h6_19vkb_36",
387
- "u-typography-base": "_u-typography-base_19vkb_43",
388
- "u-typography-base--xxl": "_u-typography-base--xxl_19vkb_48",
389
- "u-typography-base--xl": "_u-typography-base--xl_19vkb_52",
390
- "u-typography-base--lg": "_u-typography-base--lg_19vkb_56",
391
- "input__input-el": "_input__input-el_19vkb_56",
392
- "u-typography-base--sm": "_u-typography-base--sm_19vkb_60",
393
- "u-typography-base--bold": "_u-typography-base--bold_19vkb_64",
394
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_19vkb_67",
395
- "u-typography-base--underlined": "_u-typography-base--underlined_19vkb_70",
396
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_19vkb_73",
397
- input__label: Ee,
398
- "input__input-el-wrapper": "_input__input-el-wrapper_19vkb_82",
399
- "input__left-icon": "_input__left-icon_19vkb_100",
400
- "input__right-icon": "_input__right-icon_19vkb_100",
401
- "input__messages-wrapper": "_input__messages-wrapper_19vkb_112",
402
- "input__info-message": "_input__info-message_19vkb_120",
403
- "input__error-message": "_input__error-message_19vkb_120",
404
- "input__chars-counter": "_input__chars-counter_19vkb_131",
405
- "input--disabled": "_input--disabled_19vkb_135",
406
- input: Re,
407
- "input--focused": "_input--focused_19vkb_141",
408
- "input--error": "_input--error_19vkb_144"
409
- }, Be = ({
410
- label: a,
411
- infoMessage: l,
412
- errorMessage: s,
413
- leftIcon: f,
414
- rightIcon: i,
415
- id: b,
416
- disabled: x,
417
- type: N = "text",
418
- maxLength: g,
419
- hideCharsCounter: V = !1,
420
- onChange: o,
421
- classNameWrapper: P,
422
- classNameLabel: _,
423
- classNameInput: v,
424
- classNameInfoMessage: C,
425
- classNameErrorMessage: y,
426
- classNameCharsCounter: F,
427
- "data-testid-wrapper": p,
428
- "data-testid-label": I,
429
- "data-testid-input": U,
430
- "data-testid-infoMessage": M,
431
- "data-testid-errorMessage": w,
432
- "data-testid-charsCounter": O,
433
- ...k
434
- }) => {
435
- const [E, A] = de(0), D = ce(), T = b || `input_${D}`;
436
- Object.assign(k, { "data-testid": U });
437
- const j = (d) => {
438
- var S, t;
439
- A((t = (S = d == null ? void 0 : d.target) == null ? void 0 : S.value) == null ? void 0 : t.length), o && o(d);
440
- };
441
- return /* @__PURE__ */ q("div", { className: R(u.input, P), "data-testid": p, children: [
442
- a && /* @__PURE__ */ B(
443
- L,
444
- {
445
- element: "label",
446
- elementProps: { htmlFor: T },
447
- className: R(u.input__label, _),
448
- "data-testid": I,
449
- children: a
450
- }
451
- ),
452
- /* @__PURE__ */ B(
453
- ee,
454
- {
455
- id: T,
456
- type: N,
457
- disabled: x,
458
- error: !!s,
459
- "aria-label": a,
460
- slotProps: {
461
- root: (d) => ({
462
- className: R(u["input__input-el-wrapper"], {
463
- [u["input--disabled"]]: d.disabled,
464
- [u["input--focused"]]: d.focused,
465
- [u["input--error"]]: d.error
466
- })
467
- }),
468
- input: {
469
- className: R(u["input__input-el"], v),
470
- maxLength: g,
471
- onChange: j,
472
- ...k
473
- }
474
- },
475
- startAdornment: f && /* @__PURE__ */ B("span", { className: u["input__left-icon"], children: f }),
476
- endAdornment: i && /* @__PURE__ */ B("span", { className: u["input__right-icon"], children: i })
376
+ const Ie = "_input_3n32h_57", Oe = "_input__label_3n32h_84", p = {
377
+ "u-typography-h1": "_u-typography-h1_3n32h_1",
378
+ "u-typography-h2": "_u-typography-h2_3n32h_8",
379
+ "u-typography-h3": "_u-typography-h3_3n32h_15",
380
+ "u-typography-h4": "_u-typography-h4_3n32h_22",
381
+ "u-typography-h5": "_u-typography-h5_3n32h_29",
382
+ "u-typography-h6": "_u-typography-h6_3n32h_36",
383
+ "u-typography-base": "_u-typography-base_3n32h_43",
384
+ "u-typography-base--xxl": "_u-typography-base--xxl_3n32h_49",
385
+ "u-typography-base--xl": "_u-typography-base--xl_3n32h_53",
386
+ "u-typography-base--lg": "_u-typography-base--lg_3n32h_57",
387
+ "input__input-el": "_input__input-el_3n32h_57",
388
+ "u-typography-base--sm": "_u-typography-base--sm_3n32h_61",
389
+ "u-typography-base--bold": "_u-typography-base--bold_3n32h_65",
390
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_3n32h_68",
391
+ "u-typography-base--underlined": "_u-typography-base--underlined_3n32h_71",
392
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_3n32h_74",
393
+ input: Ie,
394
+ "input__messages-wrapper": "_input__messages-wrapper_3n32h_81",
395
+ input__label: Oe,
396
+ "input__input-el-wrapper": "_input__input-el-wrapper_3n32h_89",
397
+ "input__left-icon": "_input__left-icon_3n32h_108",
398
+ "input__right-icon": "_input__right-icon_3n32h_108",
399
+ "input__info-message": "_input__info-message_3n32h_134",
400
+ "input__error-message": "_input__error-message_3n32h_134",
401
+ "input__chars-counter": "_input__chars-counter_3n32h_145",
402
+ "input--disabled": "_input--disabled_3n32h_150",
403
+ "input--focused": "_input--focused_3n32h_156",
404
+ "input--error": "_input--error_3n32h_159"
405
+ }, je = de(
406
+ ({
407
+ label: l,
408
+ infoMessage: i,
409
+ error: d,
410
+ errorMessage: u,
411
+ leftIcon: c,
412
+ rightIcon: m,
413
+ id: N,
414
+ disabled: P,
415
+ type: v = "text",
416
+ maxLength: R,
417
+ decimalLength: t = 10,
418
+ hideCharsCounter: E = !1,
419
+ onChange: _,
420
+ classNameWrapper: g,
421
+ classNameLabel: b,
422
+ classNameInput: y,
423
+ classNameInfoMessage: k,
424
+ classNameErrorMessage: h,
425
+ classNameCharsCounter: S,
426
+ "data-testid-wrapper": A,
427
+ "data-testid-label": D,
428
+ "data-testid-input": C,
429
+ "data-testid-infoMessage": B,
430
+ "data-testid-errorMessage": F,
431
+ "data-testid-charsCounter": I,
432
+ ...s
433
+ }, M) => {
434
+ const [H, q] = ce(0), L = _e(), U = N || `input_${L}`;
435
+ Object.assign(s, { "data-testid": C });
436
+ const n = R && !E, r = (a) => {
437
+ var w, $;
438
+ if (v === "number") {
439
+ let O = String(a.target.value);
440
+ const [Y, V] = O.split(".");
441
+ O !== "" && (V != null && V.length ? O = [Number(Y), V.slice(0, t)].join(".") : O = String(Number(Y))), a.target.value = O;
477
442
  }
478
- ),
479
- /* @__PURE__ */ q("div", { className: u["input__messages-wrapper"], children: [
480
- (s || l) && /* @__PURE__ */ q(
481
- L,
443
+ n && q(($ = (w = a == null ? void 0 : a.target) == null ? void 0 : w.value) == null ? void 0 : $.length), _ && _(a);
444
+ }, o = he(() => s.multiline !== !0 ? {
445
+ type: v,
446
+ multiline: s.multiline
447
+ } : {
448
+ type: void 0,
449
+ multiline: s.multiline,
450
+ rows: (s == null ? void 0 : s.rows) || 5,
451
+ minRows: s == null ? void 0 : s.minRows,
452
+ maxRows: s == null ? void 0 : s.maxRows
453
+ }, [s]);
454
+ return /* @__PURE__ */ K("div", { className: T(p.input, g), "data-testid": A, children: [
455
+ l && /* @__PURE__ */ j(
456
+ G,
482
457
  {
483
- className: s ? R(u["input__error-message"], y) : R(u["input__info-message"], C),
484
- "data-testid": s ? w : M,
485
- children: [
486
- /* @__PURE__ */ B(Pe, {}),
487
- s || l
488
- ]
458
+ element: "label",
459
+ elementProps: { htmlFor: U },
460
+ className: T(p.input__label, b),
461
+ "data-testid": D,
462
+ children: l
489
463
  }
490
464
  ),
491
- g && !V && /* @__PURE__ */ q(
492
- L,
465
+ /* @__PURE__ */ j(
466
+ oe,
493
467
  {
494
- className: R(u["input__chars-counter"], F),
495
- "data-testid": O,
496
- children: [
497
- E,
498
- " / ",
499
- g
500
- ]
468
+ id: U,
469
+ disabled: P,
470
+ error: typeof d == "boolean" ? d : !!u,
471
+ "aria-label": l,
472
+ slotProps: {
473
+ root: (a) => ({
474
+ className: T(p["input__input-el-wrapper"], {
475
+ [p["input--disabled"]]: a.disabled,
476
+ [p["input--focused"]]: a.focused,
477
+ [p["input--error"]]: a.error
478
+ })
479
+ }),
480
+ input: {
481
+ ref: M,
482
+ className: T(p["input__input-el"], y),
483
+ maxLength: R,
484
+ onChange: r,
485
+ ...s
486
+ }
487
+ },
488
+ startAdornment: c && /* @__PURE__ */ j("span", { className: p["input__left-icon"], children: c }),
489
+ endAdornment: m && /* @__PURE__ */ j("span", { className: p["input__right-icon"], children: m }),
490
+ ...o
501
491
  }
502
- )
503
- ] })
504
- ] });
505
- };
492
+ ),
493
+ /* @__PURE__ */ K("div", { className: p["input__messages-wrapper"], children: [
494
+ (u || i) && /* @__PURE__ */ K(
495
+ G,
496
+ {
497
+ className: u ? T(p["input__error-message"], h) : T(p["input__info-message"], k),
498
+ "data-testid": u ? F : B,
499
+ children: [
500
+ /* @__PURE__ */ j(me, { icon: u ? "circle-exclamation" : "circle-info" }),
501
+ u || i
502
+ ]
503
+ }
504
+ ),
505
+ n && /* @__PURE__ */ K(
506
+ G,
507
+ {
508
+ className: T(p["input__chars-counter"], S),
509
+ "data-testid": I,
510
+ children: [
511
+ H,
512
+ " / ",
513
+ R
514
+ ]
515
+ }
516
+ )
517
+ ] })
518
+ ] });
519
+ }
520
+ );
506
521
  export {
507
- Be as Input
522
+ je as Input
508
523
  };