@pismo/marola 2.1.64 → 2.1.66

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 (114) 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/Icon/types.d.ts +1 -1
  46. package/dist/components/IconButton/IconButton.js +1 -1
  47. package/dist/components/Input/Input.js +335 -320
  48. package/dist/components/InputSearch/InputSearch.d.ts +31 -31
  49. package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -31
  50. package/dist/components/Popover/Popover.d.ts +3 -3
  51. package/dist/components/Popover/Popover.js +2 -2
  52. package/dist/components/Popover/Popover.stories.d.ts +3 -3
  53. package/dist/components/Popover/PopoverBody.d.ts +0 -1
  54. package/dist/components/Popover/PopoverFooter.d.ts +0 -1
  55. package/dist/components/Popover/PopoverHeader.d.ts +0 -1
  56. package/dist/components/RadioButton/RadioButton.d.ts +0 -1
  57. package/dist/components/RadioButton/RadioButton.js +684 -769
  58. package/dist/components/RadioButton/RadioOption.d.ts +0 -1
  59. package/dist/components/RadioButton/RadioOption.js +3 -3
  60. package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
  61. package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
  62. package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
  63. package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
  64. package/dist/components/RowItem/RowItem.js +2 -2
  65. package/dist/components/Select/Select.js +625 -591
  66. package/dist/components/Skeleton/Skeleton.d.ts +0 -1
  67. package/dist/components/Snackbar/Snackbar.js +295 -239
  68. package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
  69. package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
  70. package/dist/components/Table/Table.stories.d.ts +5 -5
  71. package/dist/components/Tabs/Tab.js +107 -98
  72. package/dist/components/Tabs/TabPanel.js +58 -55
  73. package/dist/components/Tabs/Tabs.js +246 -231
  74. package/dist/components/ToastCard/ToastCard.js +31 -31
  75. package/dist/components/Toggle/Toggle.js +147 -137
  76. package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
  77. package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
  78. package/dist/components/ToggleGroup/Toggle.js +2 -2
  79. package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
  80. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  81. package/dist/components/Tooltip/Tooltip.js +266 -325
  82. package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
  83. package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
  84. package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
  85. package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
  86. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
  87. package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
  88. package/dist/getReactElementRef-iorwYm2A.js +19 -0
  89. package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
  90. package/dist/isFocusVisible-CPZqtjv2.js +12 -0
  91. package/dist/main.js +2 -2
  92. package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
  93. package/dist/react-BTbo_5A3.js +526 -0
  94. package/dist/setRef-Bo0HEdBB.js +6 -0
  95. package/dist/useButton-C2E_LFJp.js +90 -0
  96. package/dist/useControlled-BYdyS7Pn.js +31 -0
  97. package/dist/useId-CK6Kn3Tn.js +21 -0
  98. package/dist/useList-BLW78Lq7.js +446 -0
  99. package/dist/utils/draggable.d.ts +2 -2
  100. package/dist/utils/iconsList.js +118 -112
  101. package/package.json +1 -1
  102. package/dist/Button-BrEDdtHO.js +0 -130
  103. package/dist/Popup-Dffqo7wT.js +0 -1246
  104. package/dist/RadioOption-DYovqiwF.js +0 -720
  105. package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
  106. package/dist/exactProp-SYjL19cU.js +0 -13
  107. package/dist/react-BvI-Sw9b.js +0 -509
  108. package/dist/useButton-CezPDte8.js +0 -105
  109. package/dist/useControlled-CCMYYdCM.js +0 -31
  110. package/dist/useId-BW-oWmul.js +0 -19
  111. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  112. package/dist/useList-nqLfZem8.js +0 -435
  113. package/dist/useSlotProps-CYHDC4TN.js +0 -834
  114. package/dist/useTimeout-DxF9kiZL.js +0 -36
@@ -1,131 +1,178 @@
1
- import { jsx as h, jsxs as Y } from "react/jsx-runtime";
2
- import * as N from "react";
3
- import S, { useState as V, useRef as X } from "react";
4
- import { c as R } from "../../clsx-OuTLNxxd.js";
5
- import { Icon as K } from "../Icon/Icon.js";
6
- import { Text as $ } from "../Typography/Typography.js";
7
- import { g as z, a as J, _ as D, f as H, b as j, c as U, d as Q, e as Z, P as n } from "../../useSlotProps-CYHDC4TN.js";
8
- import { u as ee } from "../../useTimeout-DxF9kiZL.js";
9
- import { u as I } from "../../useEventCallback-BAQJJ3ye.js";
10
- import { C as B } from "../../ClickAwayListener-Z08peX_P.js";
11
- import { R as P } from "../../index-1UpBa69h.js";
12
- import '../../assets/Snackbar.css';const W = "Snackbar";
13
- function te(u) {
14
- return z(W, u);
1
+ import '../../assets/Snackbar.css';var $ = Object.defineProperty;
2
+ var Z = (a, s, i) => s in a ? $(a, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[s] = i;
3
+ var D = (a, s, i) => Z(a, typeof s != "symbol" ? s + "" : s, i);
4
+ import { jsx as h, jsxs as J } from "react/jsx-runtime";
5
+ import * as w from "react";
6
+ import S, { useState as Q, useRef as ee } from "react";
7
+ import { c as C } from "../../clsx-OuTLNxxd.js";
8
+ import { Icon as te } from "../Icon/Icon.js";
9
+ import { Text as ne } from "../Typography/Typography.js";
10
+ import { g as re, a as oe, e as q, b as B, c as se, d as ie, P as t } from "../../ClassNameConfigurator-CVRWfyIa.js";
11
+ import { u as F } from "../../useEventCallback-BAQJJ3ye.js";
12
+ import { C as G } from "../../ClickAwayListener-BnYMO5Ki.js";
13
+ import { R as P } from "../../index-ew-96uBP.js";
14
+ const W = {};
15
+ function ae(a, s) {
16
+ const i = w.useRef(W);
17
+ return i.current === W && (i.current = a(s)), i;
15
18
  }
16
- J(W, ["root"]);
17
- function ne(u = {}) {
19
+ const ue = [];
20
+ function ce(a) {
21
+ w.useEffect(a, ue);
22
+ }
23
+ class I {
24
+ constructor() {
25
+ D(this, "currentId", null);
26
+ D(this, "clear", () => {
27
+ this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
28
+ });
29
+ D(this, "disposeEffect", () => this.clear);
30
+ }
31
+ static create() {
32
+ return new I();
33
+ }
34
+ /**
35
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
36
+ */
37
+ start(s, i) {
38
+ this.clear(), this.currentId = setTimeout(() => {
39
+ this.currentId = null, i();
40
+ }, s);
41
+ }
42
+ }
43
+ function le() {
44
+ const a = ae(I.create).current;
45
+ return ce(a.disposeEffect), a;
46
+ }
47
+ const V = "Snackbar";
48
+ function de(a) {
49
+ return re(V, a);
50
+ }
51
+ oe(V, ["root"]);
52
+ function fe(a = {}) {
18
53
  const {
19
54
  autoHideDuration: s = null,
20
55
  disableWindowBlurListener: i = !1,
21
56
  onClose: r,
22
- open: t,
57
+ open: n,
23
58
  resumeHideDuration: e
24
- } = u, o = ee();
25
- N.useEffect(() => {
26
- if (!t)
59
+ } = a, o = le();
60
+ w.useEffect(() => {
61
+ if (!n)
27
62
  return;
28
63
  function c(l) {
29
- l.defaultPrevented || (l.key === "Escape" || l.key === "Esc") && (r == null || r(l, "escapeKeyDown"));
64
+ l.defaultPrevented || l.key === "Escape" && (r == null || r(l, "escapeKeyDown"));
30
65
  }
31
66
  return document.addEventListener("keydown", c), () => {
32
67
  document.removeEventListener("keydown", c);
33
68
  };
34
- }, [t, r]);
35
- const a = I((c, l) => {
69
+ }, [n, r]);
70
+ const u = F((c, l) => {
36
71
  r == null || r(c, l);
37
- }), d = I((c) => {
72
+ }), d = F((c) => {
38
73
  !r || c == null || o.start(c, () => {
39
- a(null, "timeout");
74
+ u(null, "timeout");
40
75
  });
41
76
  });
42
- N.useEffect(() => (t && d(s), o.clear), [t, s, d, o]);
43
- const m = (c) => {
77
+ w.useEffect(() => (n && d(s), o.clear), [n, s, d, o]);
78
+ const E = (c) => {
44
79
  r == null || r(c, "clickaway");
45
- }, p = o.clear, E = N.useCallback(() => {
80
+ }, p = o.clear, m = w.useCallback(() => {
46
81
  s != null && d(e ?? s * 0.5);
47
82
  }, [s, e, d]), b = (c) => (l) => {
48
83
  const f = c.onBlur;
49
- f == null || f(l), E();
50
- }, g = (c) => (l) => {
84
+ f == null || f(l), m();
85
+ }, N = (c) => (l) => {
51
86
  const f = c.onFocus;
52
87
  f == null || f(l), p();
53
- }, w = (c) => (l) => {
88
+ }, v = (c) => (l) => {
54
89
  const f = c.onMouseEnter;
55
90
  f == null || f(l), p();
56
- }, O = (c) => (l) => {
91
+ }, _ = (c) => (l) => {
57
92
  const f = c.onMouseLeave;
58
- f == null || f(l), E();
93
+ f == null || f(l), m();
59
94
  };
60
- return N.useEffect(() => {
61
- if (!i && t)
62
- return window.addEventListener("focus", E), window.addEventListener("blur", p), () => {
63
- window.removeEventListener("focus", E), window.removeEventListener("blur", p);
95
+ return w.useEffect(() => {
96
+ if (!i && n)
97
+ return window.addEventListener("focus", m), window.addEventListener("blur", p), () => {
98
+ window.removeEventListener("focus", m), window.removeEventListener("blur", p);
64
99
  };
65
- }, [i, t, E, p]), {
100
+ }, [i, n, m, p]), {
66
101
  getRootProps: (c = {}) => {
67
- const l = D({}, H(u), H(c));
68
- return D({
102
+ const l = {
103
+ ...q(a),
104
+ ...q(c)
105
+ };
106
+ return {
69
107
  // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
70
108
  // See https://github.com/mui/material-ui/issues/29080
71
- role: "presentation"
72
- }, c, l, {
109
+ role: "presentation",
110
+ ...c,
111
+ ...l,
73
112
  onBlur: b(l),
74
- onFocus: g(l),
75
- onMouseEnter: w(l),
76
- onMouseLeave: O(l)
77
- });
113
+ onFocus: N(l),
114
+ onMouseEnter: v(l),
115
+ onMouseLeave: _(l)
116
+ };
78
117
  },
79
- onClickAway: m
118
+ onClickAway: E
80
119
  };
81
120
  }
82
- const oe = ["autoHideDuration", "children", "disableWindowBlurListener", "exited", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "slotProps", "slots"], re = () => Q({
121
+ const pe = () => se({
83
122
  root: ["root"]
84
- }, Z(te)), q = /* @__PURE__ */ N.forwardRef(function(s, i) {
123
+ }, ie(de)), X = /* @__PURE__ */ w.forwardRef(function(s, i) {
85
124
  const {
86
125
  autoHideDuration: r = null,
87
- children: t,
126
+ children: n,
88
127
  disableWindowBlurListener: e = !1,
89
128
  exited: o = !0,
90
- onClose: a,
91
- open: d,
92
- resumeHideDuration: m,
93
- slotProps: p = {},
94
- slots: E = {}
95
- } = s, b = j(s, oe), g = re(), {
96
- getRootProps: w,
97
- onClickAway: O
98
- } = ne(D({}, s, {
129
+ onBlur: u,
130
+ onClose: d,
131
+ onFocus: E,
132
+ onMouseEnter: p,
133
+ onMouseLeave: m,
134
+ open: b,
135
+ resumeHideDuration: N,
136
+ slotProps: v = {},
137
+ slots: _ = {},
138
+ ...A
139
+ } = s, c = pe(), {
140
+ getRootProps: l,
141
+ onClickAway: f
142
+ } = fe({
143
+ ...s,
99
144
  autoHideDuration: r,
100
145
  disableWindowBlurListener: e,
101
- onClose: a,
102
- open: d,
103
- resumeHideDuration: m
104
- })), L = s, c = E.root || "div", l = U({
105
- elementType: c,
106
- getSlotProps: w,
107
- externalForwardedProps: b,
108
- externalSlotProps: p.root,
146
+ onClose: d,
147
+ open: b,
148
+ resumeHideDuration: N
149
+ }), U = s, H = _.root || "div", K = B({
150
+ elementType: H,
151
+ getSlotProps: l,
152
+ externalForwardedProps: A,
153
+ externalSlotProps: v.root,
109
154
  additionalProps: {
110
155
  ref: i
111
156
  },
112
- ownerState: L,
113
- className: g.root
114
- }), f = U({
115
- elementType: B,
116
- externalSlotProps: p.clickAwayListener,
157
+ ownerState: U,
158
+ className: c.root
159
+ }), j = B({
160
+ elementType: G,
161
+ externalSlotProps: v.clickAwayListener,
117
162
  additionalProps: {
118
- onClickAway: O
163
+ onClickAway: f
119
164
  },
120
- ownerState: L
165
+ ownerState: U
166
+ });
167
+ return delete j.ownerState, !b && o ? null : /* @__PURE__ */ h(G, {
168
+ ...j,
169
+ children: /* @__PURE__ */ h(H, {
170
+ ...K,
171
+ children: n
172
+ })
121
173
  });
122
- return delete f.ownerState, !d && o ? null : /* @__PURE__ */ h(B, D({}, f, {
123
- children: /* @__PURE__ */ h(c, D({}, l, {
124
- children: t
125
- }))
126
- }));
127
174
  });
128
- process.env.NODE_ENV !== "production" && (q.propTypes = {
175
+ process.env.NODE_ENV !== "production" && (X.propTypes = {
129
176
  // ┌────────────────────────────── Warning ──────────────────────────────┐
130
177
  // │ These PropTypes are generated from the TypeScript type definitions. │
131
178
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -137,21 +184,21 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
137
184
  * the `null` value.
138
185
  * @default null
139
186
  */
140
- autoHideDuration: n.number,
187
+ autoHideDuration: t.number,
141
188
  /**
142
189
  * @ignore
143
190
  */
144
- children: n.node,
191
+ children: t.node,
145
192
  /**
146
193
  * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.
147
194
  * @default false
148
195
  */
149
- disableWindowBlurListener: n.bool,
196
+ disableWindowBlurListener: t.bool,
150
197
  /**
151
198
  * The prop used to handle exited transition and unmount the component.
152
199
  * @default true
153
200
  */
154
- exited: n.bool,
201
+ exited: t.bool,
155
202
  /**
156
203
  * Callback fired when the component requests to be closed.
157
204
  * Typically `onClose` is used to set state in the parent component,
@@ -162,201 +209,210 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
162
209
  * @param {React.SyntheticEvent<any> | Event} event The event source of the callback.
163
210
  * @param {string} reason Can be: `"timeout"` (`autoHideDuration` expired), `"clickaway"`, or `"escapeKeyDown"`.
164
211
  */
165
- onClose: n.func,
212
+ onClose: t.func,
166
213
  /**
167
214
  * If `true`, the component is shown.
168
215
  */
169
- open: n.bool,
216
+ open: t.bool,
170
217
  /**
171
218
  * The number of milliseconds to wait before dismissing after user interaction.
172
219
  * If `autoHideDuration` prop isn't specified, it does nothing.
173
220
  * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,
174
221
  * we default to `autoHideDuration / 2` ms.
175
222
  */
176
- resumeHideDuration: n.number,
223
+ resumeHideDuration: t.number,
177
224
  /**
178
225
  * The props used for each slot inside the Snackbar.
179
226
  * @default {}
180
227
  */
181
- slotProps: n.shape({
182
- clickAwayListener: n.oneOfType([n.func, n.shape({
183
- children: n.element.isRequired,
184
- disableReactTree: n.bool,
185
- mouseEvent: n.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
186
- onClickAway: n.func,
187
- touchEvent: n.oneOf(["onTouchEnd", "onTouchStart", !1])
228
+ slotProps: t.shape({
229
+ clickAwayListener: t.oneOfType([t.func, t.shape({
230
+ children: t.element.isRequired,
231
+ disableReactTree: t.bool,
232
+ mouseEvent: t.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
233
+ onClickAway: t.func,
234
+ touchEvent: t.oneOf(["onTouchEnd", "onTouchStart", !1])
188
235
  })]),
189
- root: n.oneOfType([n.func, n.object])
236
+ root: t.oneOfType([t.func, t.object])
190
237
  }),
191
238
  /**
192
239
  * The components used for each slot inside the Snackbar.
193
240
  * Either a string to use a HTML element or a component.
194
241
  * @default {}
195
242
  */
196
- slots: n.shape({
197
- root: n.elementType
243
+ slots: t.shape({
244
+ root: t.elementType
198
245
  })
199
246
  });
200
- function M(u, s) {
201
- return M = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, t) {
202
- return r.__proto__ = t, r;
203
- }, M(u, s);
247
+ function Ee(a, s) {
248
+ if (a == null) return {};
249
+ var i = {};
250
+ for (var r in a) if ({}.hasOwnProperty.call(a, r)) {
251
+ if (s.indexOf(r) !== -1) continue;
252
+ i[r] = a[r];
253
+ }
254
+ return i;
255
+ }
256
+ function L(a, s) {
257
+ return L = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
258
+ return i.__proto__ = r, i;
259
+ }, L(a, s);
204
260
  }
205
- function se(u, s) {
206
- u.prototype = Object.create(s.prototype), u.prototype.constructor = u, M(u, s);
261
+ function me(a, s) {
262
+ a.prototype = Object.create(s.prototype), a.prototype.constructor = a, L(a, s);
207
263
  }
208
- const F = {
264
+ const Y = {
209
265
  disabled: !1
210
266
  };
211
- var ae = process.env.NODE_ENV !== "production" ? n.oneOfType([n.number, n.shape({
212
- enter: n.number,
213
- exit: n.number,
214
- appear: n.number
267
+ var he = process.env.NODE_ENV !== "production" ? t.oneOfType([t.number, t.shape({
268
+ enter: t.number,
269
+ exit: t.number,
270
+ appear: t.number
215
271
  }).isRequired]) : null;
216
- process.env.NODE_ENV !== "production" && n.oneOfType([n.string, n.shape({
217
- enter: n.string,
218
- exit: n.string,
219
- active: n.string
220
- }), n.shape({
221
- enter: n.string,
222
- enterDone: n.string,
223
- enterActive: n.string,
224
- exit: n.string,
225
- exitDone: n.string,
226
- exitActive: n.string
272
+ process.env.NODE_ENV !== "production" && t.oneOfType([t.string, t.shape({
273
+ enter: t.string,
274
+ exit: t.string,
275
+ active: t.string
276
+ }), t.shape({
277
+ enter: t.string,
278
+ enterDone: t.string,
279
+ enterActive: t.string,
280
+ exit: t.string,
281
+ exitDone: t.string,
282
+ exitActive: t.string
227
283
  })]);
228
- const G = S.createContext(null);
229
- var ie = function(s) {
284
+ const z = S.createContext(null);
285
+ var xe = function(s) {
230
286
  return s.scrollTop;
231
- }, C = "unmounted", v = "exited", k = "entering", y = "entered", A = "exiting", x = /* @__PURE__ */ function(u) {
232
- se(s, u);
233
- function s(r, t) {
287
+ }, R = "unmounted", k = "exited", T = "entering", O = "entered", M = "exiting", x = /* @__PURE__ */ (function(a) {
288
+ me(s, a);
289
+ function s(r, n) {
234
290
  var e;
235
- e = u.call(this, r, t) || this;
236
- var o = t, a = o && !o.isMounting ? r.enter : r.appear, d;
237
- return e.appearStatus = null, r.in ? a ? (d = v, e.appearStatus = k) : d = y : r.unmountOnExit || r.mountOnEnter ? d = C : d = v, e.state = {
291
+ e = a.call(this, r, n) || this;
292
+ var o = n, u = o && !o.isMounting ? r.enter : r.appear, d;
293
+ return e.appearStatus = null, r.in ? u ? (d = k, e.appearStatus = T) : d = O : r.unmountOnExit || r.mountOnEnter ? d = R : d = k, e.state = {
238
294
  status: d
239
295
  }, e.nextCallback = null, e;
240
296
  }
241
- s.getDerivedStateFromProps = function(t, e) {
242
- var o = t.in;
243
- return o && e.status === C ? {
244
- status: v
297
+ s.getDerivedStateFromProps = function(n, e) {
298
+ var o = n.in;
299
+ return o && e.status === R ? {
300
+ status: k
245
301
  } : null;
246
302
  };
247
303
  var i = s.prototype;
248
304
  return i.componentDidMount = function() {
249
305
  this.updateStatus(!0, this.appearStatus);
250
- }, i.componentDidUpdate = function(t) {
306
+ }, i.componentDidUpdate = function(n) {
251
307
  var e = null;
252
- if (t !== this.props) {
308
+ if (n !== this.props) {
253
309
  var o = this.state.status;
254
- this.props.in ? o !== k && o !== y && (e = k) : (o === k || o === y) && (e = A);
310
+ this.props.in ? o !== T && o !== O && (e = T) : (o === T || o === O) && (e = M);
255
311
  }
256
312
  this.updateStatus(!1, e);
257
313
  }, i.componentWillUnmount = function() {
258
314
  this.cancelNextCallback();
259
315
  }, i.getTimeouts = function() {
260
- var t = this.props.timeout, e, o, a;
261
- return e = o = a = t, t != null && typeof t != "number" && (e = t.exit, o = t.enter, a = t.appear !== void 0 ? t.appear : o), {
316
+ var n = this.props.timeout, e, o, u;
317
+ return e = o = u = n, n != null && typeof n != "number" && (e = n.exit, o = n.enter, u = n.appear !== void 0 ? n.appear : o), {
262
318
  exit: e,
263
319
  enter: o,
264
- appear: a
320
+ appear: u
265
321
  };
266
- }, i.updateStatus = function(t, e) {
267
- if (t === void 0 && (t = !1), e !== null)
268
- if (this.cancelNextCallback(), e === k) {
322
+ }, i.updateStatus = function(n, e) {
323
+ if (n === void 0 && (n = !1), e !== null)
324
+ if (this.cancelNextCallback(), e === T) {
269
325
  if (this.props.unmountOnExit || this.props.mountOnEnter) {
270
326
  var o = this.props.nodeRef ? this.props.nodeRef.current : P.findDOMNode(this);
271
- o && ie(o);
327
+ o && xe(o);
272
328
  }
273
- this.performEnter(t);
329
+ this.performEnter(n);
274
330
  } else
275
331
  this.performExit();
276
- else this.props.unmountOnExit && this.state.status === v && this.setState({
277
- status: C
332
+ else this.props.unmountOnExit && this.state.status === k && this.setState({
333
+ status: R
278
334
  });
279
- }, i.performEnter = function(t) {
280
- var e = this, o = this.props.enter, a = this.context ? this.context.isMounting : t, d = this.props.nodeRef ? [a] : [P.findDOMNode(this), a], m = d[0], p = d[1], E = this.getTimeouts(), b = a ? E.appear : E.enter;
281
- if (!t && !o || F.disabled) {
335
+ }, i.performEnter = function(n) {
336
+ var e = this, o = this.props.enter, u = this.context ? this.context.isMounting : n, d = this.props.nodeRef ? [u] : [P.findDOMNode(this), u], E = d[0], p = d[1], m = this.getTimeouts(), b = u ? m.appear : m.enter;
337
+ if (!n && !o || Y.disabled) {
282
338
  this.safeSetState({
283
- status: y
339
+ status: O
284
340
  }, function() {
285
- e.props.onEntered(m);
341
+ e.props.onEntered(E);
286
342
  });
287
343
  return;
288
344
  }
289
- this.props.onEnter(m, p), this.safeSetState({
290
- status: k
345
+ this.props.onEnter(E, p), this.safeSetState({
346
+ status: T
291
347
  }, function() {
292
- e.props.onEntering(m, p), e.onTransitionEnd(b, function() {
348
+ e.props.onEntering(E, p), e.onTransitionEnd(b, function() {
293
349
  e.safeSetState({
294
- status: y
350
+ status: O
295
351
  }, function() {
296
- e.props.onEntered(m, p);
352
+ e.props.onEntered(E, p);
297
353
  });
298
354
  });
299
355
  });
300
356
  }, i.performExit = function() {
301
- var t = this, e = this.props.exit, o = this.getTimeouts(), a = this.props.nodeRef ? void 0 : P.findDOMNode(this);
302
- if (!e || F.disabled) {
357
+ var n = this, e = this.props.exit, o = this.getTimeouts(), u = this.props.nodeRef ? void 0 : P.findDOMNode(this);
358
+ if (!e || Y.disabled) {
303
359
  this.safeSetState({
304
- status: v
360
+ status: k
305
361
  }, function() {
306
- t.props.onExited(a);
362
+ n.props.onExited(u);
307
363
  });
308
364
  return;
309
365
  }
310
- this.props.onExit(a), this.safeSetState({
311
- status: A
366
+ this.props.onExit(u), this.safeSetState({
367
+ status: M
312
368
  }, function() {
313
- t.props.onExiting(a), t.onTransitionEnd(o.exit, function() {
314
- t.safeSetState({
315
- status: v
369
+ n.props.onExiting(u), n.onTransitionEnd(o.exit, function() {
370
+ n.safeSetState({
371
+ status: k
316
372
  }, function() {
317
- t.props.onExited(a);
373
+ n.props.onExited(u);
318
374
  });
319
375
  });
320
376
  });
321
377
  }, i.cancelNextCallback = function() {
322
378
  this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
323
- }, i.safeSetState = function(t, e) {
324
- e = this.setNextCallback(e), this.setState(t, e);
325
- }, i.setNextCallback = function(t) {
379
+ }, i.safeSetState = function(n, e) {
380
+ e = this.setNextCallback(e), this.setState(n, e);
381
+ }, i.setNextCallback = function(n) {
326
382
  var e = this, o = !0;
327
- return this.nextCallback = function(a) {
328
- o && (o = !1, e.nextCallback = null, t(a));
383
+ return this.nextCallback = function(u) {
384
+ o && (o = !1, e.nextCallback = null, n(u));
329
385
  }, this.nextCallback.cancel = function() {
330
386
  o = !1;
331
387
  }, this.nextCallback;
332
- }, i.onTransitionEnd = function(t, e) {
388
+ }, i.onTransitionEnd = function(n, e) {
333
389
  this.setNextCallback(e);
334
- var o = this.props.nodeRef ? this.props.nodeRef.current : P.findDOMNode(this), a = t == null && !this.props.addEndListener;
335
- if (!o || a) {
390
+ var o = this.props.nodeRef ? this.props.nodeRef.current : P.findDOMNode(this), u = n == null && !this.props.addEndListener;
391
+ if (!o || u) {
336
392
  setTimeout(this.nextCallback, 0);
337
393
  return;
338
394
  }
339
395
  if (this.props.addEndListener) {
340
- var d = this.props.nodeRef ? [this.nextCallback] : [o, this.nextCallback], m = d[0], p = d[1];
341
- this.props.addEndListener(m, p);
396
+ var d = this.props.nodeRef ? [this.nextCallback] : [o, this.nextCallback], E = d[0], p = d[1];
397
+ this.props.addEndListener(E, p);
342
398
  }
343
- t != null && setTimeout(this.nextCallback, t);
399
+ n != null && setTimeout(this.nextCallback, n);
344
400
  }, i.render = function() {
345
- var t = this.state.status;
346
- if (t === C)
401
+ var n = this.state.status;
402
+ if (n === R)
347
403
  return null;
348
404
  var e = this.props, o = e.children;
349
405
  e.in, e.mountOnEnter, e.unmountOnExit, e.appear, e.enter, e.exit, e.timeout, e.addEndListener, e.onEnter, e.onEntering, e.onEntered, e.onExit, e.onExiting, e.onExited, e.nodeRef;
350
- var a = j(e, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
406
+ var u = Ee(e, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
351
407
  return (
352
408
  // allows for nested Transitions
353
- /* @__PURE__ */ S.createElement(G.Provider, {
409
+ /* @__PURE__ */ S.createElement(z.Provider, {
354
410
  value: null
355
- }, typeof o == "function" ? o(t, a) : S.cloneElement(S.Children.only(o), a))
411
+ }, typeof o == "function" ? o(n, u) : S.cloneElement(S.Children.only(o), u))
356
412
  );
357
413
  }, s;
358
- }(S.Component);
359
- x.contextType = G;
414
+ })(S.Component);
415
+ x.contextType = z;
360
416
  x.propTypes = process.env.NODE_ENV !== "production" ? {
361
417
  /**
362
418
  * A React reference to DOM element that need to transition:
@@ -369,10 +425,10 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
369
425
  * (see
370
426
  * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
371
427
  */
372
- nodeRef: n.shape({
373
- current: typeof Element > "u" ? n.any : function(u, s, i, r, t, e) {
374
- var o = u[s];
375
- return n.instanceOf(o && "ownerDocument" in o ? o.ownerDocument.defaultView.Element : Element)(u, s, i, r, t, e);
428
+ nodeRef: t.shape({
429
+ current: typeof Element > "u" ? t.any : function(a, s, i, r, n, e) {
430
+ var o = a[s];
431
+ return t.instanceOf(o && "ownerDocument" in o ? o.ownerDocument.defaultView.Element : Element)(a, s, i, r, n, e);
376
432
  }
377
433
  }),
378
434
  /**
@@ -389,23 +445,23 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
389
445
  * </Transition>
390
446
  * ```
391
447
  */
392
- children: n.oneOfType([n.func.isRequired, n.element.isRequired]).isRequired,
448
+ children: t.oneOfType([t.func.isRequired, t.element.isRequired]).isRequired,
393
449
  /**
394
450
  * Show the component; triggers the enter or exit states
395
451
  */
396
- in: n.bool,
452
+ in: t.bool,
397
453
  /**
398
454
  * By default the child component is mounted immediately along with
399
455
  * the parent `Transition` component. If you want to "lazy mount" the component on the
400
456
  * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
401
457
  * mounted, even on "exited", unless you also specify `unmountOnExit`.
402
458
  */
403
- mountOnEnter: n.bool,
459
+ mountOnEnter: t.bool,
404
460
  /**
405
461
  * By default the child component stays mounted after it reaches the `'exited'` state.
406
462
  * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
407
463
  */
408
- unmountOnExit: n.bool,
464
+ unmountOnExit: t.bool,
409
465
  /**
410
466
  * By default the child component does not perform the enter transition when
411
467
  * it first mounts, regardless of the value of `in`. If you want this
@@ -417,15 +473,15 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
417
473
  * > additional `.appear-*` classes, that way you can choose to style it
418
474
  * > differently.
419
475
  */
420
- appear: n.bool,
476
+ appear: t.bool,
421
477
  /**
422
478
  * Enable or disable enter transitions.
423
479
  */
424
- enter: n.bool,
480
+ enter: t.bool,
425
481
  /**
426
482
  * Enable or disable exit transitions.
427
483
  */
428
- exit: n.bool,
484
+ exit: t.bool,
429
485
  /**
430
486
  * The duration of the transition, in milliseconds.
431
487
  * Required unless `addEndListener` is provided.
@@ -453,11 +509,11 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
453
509
  * @type {number | { enter?: number, exit?: number, appear?: number }}
454
510
  */
455
511
  timeout: function(s) {
456
- var i = ae;
512
+ var i = he;
457
513
  s.addEndListener || (i = i.isRequired);
458
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), e = 1; e < r; e++)
459
- t[e - 1] = arguments[e];
460
- return i.apply(void 0, [s].concat(t));
514
+ for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), e = 1; e < r; e++)
515
+ n[e - 1] = arguments[e];
516
+ return i.apply(void 0, [s].concat(n));
461
517
  },
462
518
  /**
463
519
  * Add a custom transition end trigger. Called with the transitioning
@@ -473,7 +529,7 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
473
529
  * }}
474
530
  * ```
475
531
  */
476
- addEndListener: n.func,
532
+ addEndListener: t.func,
477
533
  /**
478
534
  * Callback fired before the "entering" status is applied. An extra parameter
479
535
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -482,7 +538,7 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
482
538
  *
483
539
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
484
540
  */
485
- onEnter: n.func,
541
+ onEnter: t.func,
486
542
  /**
487
543
  * Callback fired after the "entering" status is applied. An extra parameter
488
544
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -491,7 +547,7 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
491
547
  *
492
548
  * @type Function(node: HtmlElement, isAppearing: bool)
493
549
  */
494
- onEntering: n.func,
550
+ onEntering: t.func,
495
551
  /**
496
552
  * Callback fired after the "entered" status is applied. An extra parameter
497
553
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -500,7 +556,7 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
500
556
  *
501
557
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
502
558
  */
503
- onEntered: n.func,
559
+ onEntered: t.func,
504
560
  /**
505
561
  * Callback fired before the "exiting" status is applied.
506
562
  *
@@ -508,7 +564,7 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
508
564
  *
509
565
  * @type Function(node: HtmlElement) -> void
510
566
  */
511
- onExit: n.func,
567
+ onExit: t.func,
512
568
  /**
513
569
  * Callback fired after the "exiting" status is applied.
514
570
  *
@@ -516,7 +572,7 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
516
572
  *
517
573
  * @type Function(node: HtmlElement) -> void
518
574
  */
519
- onExiting: n.func,
575
+ onExiting: t.func,
520
576
  /**
521
577
  * Callback fired after the "exited" status is applied.
522
578
  *
@@ -524,9 +580,9 @@ x.propTypes = process.env.NODE_ENV !== "production" ? {
524
580
  *
525
581
  * @type Function(node: HtmlElement) -> void
526
582
  */
527
- onExited: n.func
583
+ onExited: t.func
528
584
  } : {};
529
- function _() {
585
+ function y() {
530
586
  }
531
587
  x.defaultProps = {
532
588
  in: !1,
@@ -535,20 +591,20 @@ x.defaultProps = {
535
591
  appear: !1,
536
592
  enter: !0,
537
593
  exit: !0,
538
- onEnter: _,
539
- onEntering: _,
540
- onEntered: _,
541
- onExit: _,
542
- onExiting: _,
543
- onExited: _
594
+ onEnter: y,
595
+ onEntering: y,
596
+ onEntered: y,
597
+ onExit: y,
598
+ onExiting: y,
599
+ onExited: y
544
600
  };
545
- x.UNMOUNTED = C;
546
- x.EXITED = v;
547
- x.ENTERING = k;
548
- x.ENTERED = y;
549
- x.EXITING = A;
550
- const ue = "_snackbar_14f4w_2", ce = "_bottomToTop_14f4w_1", T = {
551
- snackbar: ue,
601
+ x.UNMOUNTED = R;
602
+ x.EXITED = k;
603
+ x.ENTERING = T;
604
+ x.ENTERED = O;
605
+ x.EXITING = M;
606
+ const be = "_snackbar_14f4w_2", ve = "_bottomToTop_14f4w_1", g = {
607
+ snackbar: be,
552
608
  "snackbar__snackbar-el-wrapper": "_snackbar__snackbar-el-wrapper_14f4w_15",
553
609
  "snackbar--content": "_snackbar--content_14f4w_20",
554
610
  "snackbar--message": "_snackbar--message_14f4w_33",
@@ -556,36 +612,36 @@ const ue = "_snackbar_14f4w_2", ce = "_bottomToTop_14f4w_1", T = {
556
612
  "snackbar--error": "_snackbar--error_14f4w_41",
557
613
  "snackbar--warning": "_snackbar--warning_14f4w_45",
558
614
  "snackbar--action": "_snackbar--action_14f4w_49",
559
- bottomToTop: ce
560
- }, ke = ({
561
- snackbarMessage: u,
615
+ bottomToTop: ve
616
+ }, De = ({
617
+ snackbarMessage: a,
562
618
  variant: s,
563
619
  autoHideDuration: i = 5e3,
564
620
  open: r = !0,
565
- onClose: t,
621
+ onClose: n,
566
622
  onClosed: e,
567
623
  classNameWrapper: o,
568
- "data-testid": a
624
+ "data-testid": u
569
625
  }) => {
570
- const [d, m] = V(!0), p = X(null), E = {
626
+ const [d, E] = Q(!0), p = ee(null), m = {
571
627
  entering: "translateY(0)",
572
628
  entered: "translateY(0)",
573
629
  exiting: "translateY(80px)",
574
630
  exited: "translateY(80px)",
575
631
  unmounted: "translateY(80px)"
576
632
  }, b = () => {
577
- m(!1);
578
- }, g = () => {
579
- m(!0);
633
+ E(!1);
634
+ }, N = () => {
635
+ E(!0);
580
636
  };
581
- return /* @__PURE__ */ h("div", { className: R(T.snackbar, o), children: /* @__PURE__ */ h(
582
- q,
637
+ return /* @__PURE__ */ h("div", { className: C(g.snackbar, o), children: /* @__PURE__ */ h(
638
+ X,
583
639
  {
584
640
  autoHideDuration: i,
585
641
  open: r,
586
- onClose: (w, O) => O !== "clickaway" && (t == null ? void 0 : t()),
642
+ onClose: (v, _) => _ !== "clickaway" && (n == null ? void 0 : n()),
587
643
  exited: d,
588
- className: R(T["snackbar__snackbar-el-wrapper"]),
644
+ className: C(g["snackbar__snackbar-el-wrapper"]),
589
645
  children: /* @__PURE__ */ h(
590
646
  x,
591
647
  {
@@ -594,22 +650,22 @@ const ue = "_snackbar_14f4w_2", ce = "_bottomToTop_14f4w_1", T = {
594
650
  appear: !0,
595
651
  unmountOnExit: !0,
596
652
  onEnter: b,
597
- onExited: g,
653
+ onExited: N,
598
654
  onExit: e,
599
655
  nodeRef: p,
600
- children: (w) => /* @__PURE__ */ Y(
656
+ children: (v) => /* @__PURE__ */ J(
601
657
  "div",
602
658
  {
603
- className: R(T["snackbar--content"], T[`snackbar--${s}`]),
659
+ className: C(g["snackbar--content"], g[`snackbar--${s}`]),
604
660
  style: {
605
- transform: E[w],
661
+ transform: m[v],
606
662
  transition: "transform 300ms ease"
607
663
  },
608
664
  ref: p,
609
- "data-testid": a,
665
+ "data-testid": u,
610
666
  children: [
611
- /* @__PURE__ */ h("div", { className: T["snackbar--message"], children: /* @__PURE__ */ h($, { variant: "base-lg", bold: !0, color: "var(--colors-neutral-text-color-text)", children: u }) }),
612
- /* @__PURE__ */ h("button", { type: "button", className: R(T["snackbar--action"]), onClick: t, children: /* @__PURE__ */ h(K, { icon: "circle-xmark", color: "var(--colors-neutral-text-color-text)", size: "1.5rem" }) })
667
+ /* @__PURE__ */ h("div", { className: g["snackbar--message"], children: /* @__PURE__ */ h(ne, { variant: "base-lg", bold: !0, color: "var(--colors-neutral-text-color-text)", children: a }) }),
668
+ /* @__PURE__ */ h("button", { type: "button", className: C(g["snackbar--action"]), onClick: n, children: /* @__PURE__ */ h(te, { icon: "circle-xmark", color: "var(--colors-neutral-text-color-text)", size: "1.5rem" }) })
613
669
  ]
614
670
  }
615
671
  )
@@ -619,5 +675,5 @@ const ue = "_snackbar_14f4w_2", ce = "_bottomToTop_14f4w_1", T = {
619
675
  ) });
620
676
  };
621
677
  export {
622
- ke as Snackbar
678
+ De as Snackbar
623
679
  };