@pismo/marola 1.1.7 → 1.1.10

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 (54) hide show
  1. package/dist/Dialog.module-CE1Q-5tJ.js +1 -2
  2. package/dist/Group-ZXteFV4M.js +1 -2
  3. package/dist/Popover.module-B4boCutS.js +1 -2
  4. package/dist/SelectButton-DbiTJagF.js +1 -2
  5. package/dist/Tabs.module-BNRwj3Z0.js +1 -2
  6. package/dist/Toggle-BuZjueQ7.js +1 -2
  7. package/dist/assets/Calendar.css +1 -1
  8. package/dist/assets/Table.css +1 -1
  9. package/dist/components/Adornment/Adornment.js +1 -2
  10. package/dist/components/Advice/Advice.js +1 -2
  11. package/dist/components/Alert/Alert.js +1 -2
  12. package/dist/components/Autocomplete/Autocomplete.js +1 -2
  13. package/dist/components/Avatar/Avatar.js +1 -2
  14. package/dist/components/Badge/Badge.js +1 -2
  15. package/dist/components/BankCard/BankCard.js +1 -2
  16. package/dist/components/Button/Button.js +1 -2
  17. package/dist/components/Calendar/Calendar.d.ts +2 -1
  18. package/dist/components/Calendar/Calendar.js +58 -38
  19. package/dist/components/Calendar/Calendar.stories.d.ts +2 -1
  20. package/dist/components/Checkbox/Checkbox.js +1 -2
  21. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +1 -1
  22. package/dist/components/Description/Description.js +1 -2
  23. package/dist/components/Dialog/Dialog.d.ts +10 -9
  24. package/dist/components/Dialog/Dialog.js +230 -222
  25. package/dist/components/Dialog/Dialog.stories.d.ts +9 -5
  26. package/dist/components/Dialog/Dialog.test.d.ts +1 -0
  27. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +1 -2
  28. package/dist/components/IconButton/IconButton.js +1 -2
  29. package/dist/components/Input/Input.js +1 -2
  30. package/dist/components/InputSearch/InputSearch.js +1 -2
  31. package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -2
  32. package/dist/components/PageHeader/PageHeader.js +1 -2
  33. package/dist/components/Pagination/Pagination.js +1 -2
  34. package/dist/components/RadioButton/RadioButton.js +1 -2
  35. package/dist/components/ResultWithChips/ResultWithChips.js +1 -2
  36. package/dist/components/Skeleton/Skeleton.js +1 -2
  37. package/dist/components/Snackbar/Snackbar.js +1 -2
  38. package/dist/components/SortTooltip/SortTooltip.js +1 -2
  39. package/dist/components/Stepper/Stepper.js +1 -2
  40. package/dist/components/StepperNavigator/StepperNavigator.js +1 -2
  41. package/dist/components/Table/Table.d.ts +26 -10
  42. package/dist/components/Table/Table.js +136 -95
  43. package/dist/components/Table/Table.stories.d.ts +4 -0
  44. package/dist/components/Table/Table.test.d.ts +1 -0
  45. package/dist/components/Table/_Table.Td.stories.d.ts +1 -1
  46. package/dist/components/Table/_Table.Th.stories.d.ts +1 -1
  47. package/dist/components/Table/_Table.Tr.stories.d.ts +1 -1
  48. package/dist/components/Tag/Tag.js +1 -2
  49. package/dist/components/TextDisplay/TextDisplay.js +1 -2
  50. package/dist/components/Toggle/Toggle.js +1 -2
  51. package/dist/components/Tooltip/Tooltip.js +1 -2
  52. package/dist/components/TransactionRow/TransactionRow.js +1 -2
  53. package/dist/components/Typography/Typography.js +1 -2
  54. package/package.json +1 -1
@@ -1,122 +1,123 @@
1
1
  import { jsxs as $, jsx as S } from "react/jsx-runtime";
2
- import { c as se } from "../../clsx-DB4S2d7J.js";
3
- import ie from "./Actions.js";
2
+ import * as f from "react";
3
+ import { forwardRef as se } from "react";
4
+ import { c as ie } from "../../clsx-DB4S2d7J.js";
5
+ import le from "./Actions.js";
4
6
  import ae from "./Backdrop.js";
5
- import le from "./CloseIconButton.js";
6
- import ce from "./Content.js";
7
+ import ce from "./CloseIconButton.js";
8
+ import de from "./Content.js";
7
9
  import { s as z } from "../../Dialog.module-CE1Q-5tJ.js";
8
10
  import ee from "./DialogTitle.js";
9
- import { u as te, P as i, f as de, b as C, g as ue, a as fe, _ as pe, c as G, d as be, e as he } from "../../useSlotProps-C_I1kEHr.js";
10
- import * as f from "react";
11
- import { o as A, e as ne } from "../../ownerDocument-YGhwAnr1.js";
11
+ import { u as te, P as l, f as ue, b as C, g as fe, a as pe, _ as be, c as G, d as he, e as me } from "../../useSlotProps-C_I1kEHr.js";
12
+ import { o as A, e as oe } from "../../ownerDocument-YGhwAnr1.js";
12
13
  import { u as X } from "../../useEventCallback-BAQJJ3ye.js";
13
- import { P as me, H as ge } from "../../Portal-oY3enyAm.js";
14
- import { e as Ee } from "../../index-bQFToy-I.js";
14
+ import { P as ge, H as Ee } from "../../Portal-oY3enyAm.js";
15
+ import { e as Te } from "../../index-bQFToy-I.js";
15
16
  function J(...e) {
16
- return e.reduce((t, o) => o == null ? t : function(...s) {
17
- t.apply(this, s), o.apply(this, s);
17
+ return e.reduce((t, n) => n == null ? t : function(...s) {
18
+ t.apply(this, s), n.apply(this, s);
18
19
  }, () => {
19
20
  });
20
21
  }
21
22
  function Y(e) {
22
23
  return A(e).defaultView || window;
23
24
  }
24
- function Te(e) {
25
+ function ye(e) {
25
26
  const t = e.documentElement.clientWidth;
26
27
  return Math.abs(window.innerWidth - t);
27
28
  }
28
- const ye = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
29
- function xe(e) {
29
+ const xe = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
30
+ function Re(e) {
30
31
  const t = parseInt(e.getAttribute("tabindex") || "", 10);
31
32
  return Number.isNaN(t) ? e.contentEditable === "true" || (e.nodeName === "AUDIO" || e.nodeName === "VIDEO" || e.nodeName === "DETAILS") && e.getAttribute("tabindex") === null ? 0 : e.tabIndex : t;
32
33
  }
33
- function Re(e) {
34
+ function ve(e) {
34
35
  if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name)
35
36
  return !1;
36
- const t = (n) => e.ownerDocument.querySelector(`input[type="radio"]${n}`);
37
- let o = t(`[name="${e.name}"]:checked`);
38
- return o || (o = t(`[name="${e.name}"]`)), o !== e;
39
- }
40
- function ve(e) {
41
- return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Re(e));
37
+ const t = (o) => e.ownerDocument.querySelector(`input[type="radio"]${o}`);
38
+ let n = t(`[name="${e.name}"]:checked`);
39
+ return n || (n = t(`[name="${e.name}"]`)), n !== e;
42
40
  }
43
41
  function ke(e) {
44
- const t = [], o = [];
45
- return Array.from(e.querySelectorAll(ye)).forEach((n, s) => {
46
- const r = xe(n);
47
- r === -1 || !ve(n) || (r === 0 ? t.push(n) : o.push({
42
+ return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || ve(e));
43
+ }
44
+ function Pe(e) {
45
+ const t = [], n = [];
46
+ return Array.from(e.querySelectorAll(xe)).forEach((o, s) => {
47
+ const r = Re(o);
48
+ r === -1 || !ke(o) || (r === 0 ? t.push(o) : n.push({
48
49
  documentOrder: s,
49
50
  tabIndex: r,
50
- node: n
51
+ node: o
51
52
  }));
52
- }), o.sort((n, s) => n.tabIndex === s.tabIndex ? n.documentOrder - s.documentOrder : n.tabIndex - s.tabIndex).map((n) => n.node).concat(t);
53
+ }), n.sort((o, s) => o.tabIndex === s.tabIndex ? o.documentOrder - s.documentOrder : o.tabIndex - s.tabIndex).map((o) => o.node).concat(t);
53
54
  }
54
- function Pe() {
55
+ function Ne() {
55
56
  return !0;
56
57
  }
57
58
  function j(e) {
58
59
  const {
59
60
  children: t,
60
- disableAutoFocus: o = !1,
61
- disableEnforceFocus: n = !1,
61
+ disableAutoFocus: n = !1,
62
+ disableEnforceFocus: o = !1,
62
63
  disableRestoreFocus: s = !1,
63
- getTabbable: r = ke,
64
- isEnabled: a = Pe,
64
+ getTabbable: r = Pe,
65
+ isEnabled: i = Ne,
65
66
  open: c
66
67
  } = e, p = f.useRef(!1), x = f.useRef(null), h = f.useRef(null), m = f.useRef(null), R = f.useRef(null), g = f.useRef(!1), d = f.useRef(null), w = te(t.ref, d), I = f.useRef(null);
67
68
  f.useEffect(() => {
68
- !c || !d.current || (g.current = !o);
69
- }, [o, c]), f.useEffect(() => {
69
+ !c || !d.current || (g.current = !n);
70
+ }, [n, c]), f.useEffect(() => {
70
71
  if (!c || !d.current)
71
72
  return;
72
- const l = A(d.current);
73
- return d.current.contains(l.activeElement) || (d.current.hasAttribute("tabIndex") || (process.env.NODE_ENV !== "production" && console.error(["MUI: The modal content node does not accept focus.", 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
73
+ const a = A(d.current);
74
+ return d.current.contains(a.activeElement) || (d.current.hasAttribute("tabIndex") || (process.env.NODE_ENV !== "production" && console.error(["MUI: The modal content node does not accept focus.", 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
74
75
  `)), d.current.setAttribute("tabIndex", "-1")), g.current && d.current.focus()), () => {
75
76
  s || (m.current && m.current.focus && (p.current = !0, m.current.focus()), m.current = null);
76
77
  };
77
78
  }, [c]), f.useEffect(() => {
78
79
  if (!c || !d.current)
79
80
  return;
80
- const l = A(d.current), v = (E) => {
81
- I.current = E, !(n || !a() || E.key !== "Tab") && l.activeElement === d.current && E.shiftKey && (p.current = !0, h.current && h.current.focus());
81
+ const a = A(d.current), v = (E) => {
82
+ I.current = E, !(o || !i() || E.key !== "Tab") && a.activeElement === d.current && E.shiftKey && (p.current = !0, h.current && h.current.focus());
82
83
  }, k = () => {
83
84
  const E = d.current;
84
85
  if (E === null)
85
86
  return;
86
- if (!l.hasFocus() || !a() || p.current) {
87
+ if (!a.hasFocus() || !i() || p.current) {
87
88
  p.current = !1;
88
89
  return;
89
90
  }
90
- if (E.contains(l.activeElement) || n && l.activeElement !== x.current && l.activeElement !== h.current)
91
+ if (E.contains(a.activeElement) || o && a.activeElement !== x.current && a.activeElement !== h.current)
91
92
  return;
92
- if (l.activeElement !== R.current)
93
+ if (a.activeElement !== R.current)
93
94
  R.current = null;
94
95
  else if (R.current !== null)
95
96
  return;
96
97
  if (!g.current)
97
98
  return;
98
99
  let T = [];
99
- if ((l.activeElement === x.current || l.activeElement === h.current) && (T = r(d.current)), T.length > 0) {
100
- var L, y;
101
- const D = !!((L = I.current) != null && L.shiftKey && ((y = I.current) == null ? void 0 : y.key) === "Tab"), F = T[0], B = T[T.length - 1];
102
- typeof F != "string" && typeof B != "string" && (D ? B.focus() : F.focus());
100
+ if ((a.activeElement === x.current || a.activeElement === h.current) && (T = r(d.current)), T.length > 0) {
101
+ var B, y;
102
+ const D = !!((B = I.current) != null && B.shiftKey && ((y = I.current) == null ? void 0 : y.key) === "Tab"), F = T[0], H = T[T.length - 1];
103
+ typeof F != "string" && typeof H != "string" && (D ? H.focus() : F.focus());
103
104
  } else
104
105
  E.focus();
105
106
  };
106
- l.addEventListener("focusin", k), l.addEventListener("keydown", v, !0);
107
- const M = setInterval(() => {
108
- l.activeElement && l.activeElement.tagName === "BODY" && k();
107
+ a.addEventListener("focusin", k), a.addEventListener("keydown", v, !0);
108
+ const L = setInterval(() => {
109
+ a.activeElement && a.activeElement.tagName === "BODY" && k();
109
110
  }, 50);
110
111
  return () => {
111
- clearInterval(M), l.removeEventListener("focusin", k), l.removeEventListener("keydown", v, !0);
112
+ clearInterval(L), a.removeEventListener("focusin", k), a.removeEventListener("keydown", v, !0);
112
113
  };
113
- }, [o, n, s, a, c, r]);
114
- const O = (l) => {
115
- m.current === null && (m.current = l.relatedTarget), g.current = !0, R.current = l.target;
114
+ }, [n, o, s, i, c, r]);
115
+ const O = (a) => {
116
+ m.current === null && (m.current = a.relatedTarget), g.current = !0, R.current = a.target;
116
117
  const v = t.props.onFocus;
117
- v && v(l);
118
- }, N = (l) => {
119
- m.current === null && (m.current = l.relatedTarget), g.current = !0;
118
+ v && v(a);
119
+ }, N = (a) => {
120
+ m.current === null && (m.current = a.relatedTarget), g.current = !0;
120
121
  };
121
122
  return /* @__PURE__ */ $(f.Fragment, {
122
123
  children: [/* @__PURE__ */ S("div", {
@@ -143,7 +144,7 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
143
144
  /**
144
145
  * A single child content element.
145
146
  */
146
- children: ne,
147
+ children: oe,
147
148
  /**
148
149
  * If `true`, the focus trap will not automatically shift focus to itself when it opens, and
149
150
  * replace it to the last focused element when it closes.
@@ -153,7 +154,7 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
153
154
  * accessible to assistive technologies, like screen readers.
154
155
  * @default false
155
156
  */
156
- disableAutoFocus: i.bool,
157
+ disableAutoFocus: l.bool,
157
158
  /**
158
159
  * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
159
160
  *
@@ -161,19 +162,19 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
161
162
  * accessible to assistive technologies, like screen readers.
162
163
  * @default false
163
164
  */
164
- disableEnforceFocus: i.bool,
165
+ disableEnforceFocus: l.bool,
165
166
  /**
166
167
  * If `true`, the focus trap will not restore focus to previously focused element once
167
168
  * focus trap is hidden or unmounted.
168
169
  * @default false
169
170
  */
170
- disableRestoreFocus: i.bool,
171
+ disableRestoreFocus: l.bool,
171
172
  /**
172
173
  * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
173
174
  * For instance, you can provide the "tabbable" npm dependency.
174
175
  * @param {HTMLElement} root
175
176
  */
176
- getTabbable: i.func,
177
+ getTabbable: l.func,
177
178
  /**
178
179
  * This prop extends the `open` prop.
179
180
  * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
@@ -183,14 +184,14 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
183
184
  * return true;
184
185
  * }
185
186
  */
186
- isEnabled: i.func,
187
+ isEnabled: l.func,
187
188
  /**
188
189
  * If `true`, focus is locked.
189
190
  */
190
- open: i.bool.isRequired
191
+ open: l.bool.isRequired
191
192
  });
192
- process.env.NODE_ENV !== "production" && (j.propTypes = Ee(j.propTypes));
193
- function Ne(e) {
193
+ process.env.NODE_ENV !== "production" && (j.propTypes = Te(j.propTypes));
194
+ function Ce(e) {
194
195
  const t = A(e);
195
196
  return t.body === e ? Y(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
196
197
  }
@@ -200,48 +201,48 @@ function U(e, t) {
200
201
  function Q(e) {
201
202
  return parseInt(Y(e).getComputedStyle(e).paddingRight, 10) || 0;
202
203
  }
203
- function Ce(e) {
204
- const o = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(e.tagName) !== -1, n = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
205
- return o || n;
204
+ function Ie(e) {
205
+ const n = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(e.tagName) !== -1, o = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
206
+ return n || o;
206
207
  }
207
- function Z(e, t, o, n, s) {
208
- const r = [t, o, ...n];
209
- [].forEach.call(e.children, (a) => {
210
- const c = r.indexOf(a) === -1, p = !Ce(a);
211
- c && p && U(a, s);
208
+ function Z(e, t, n, o, s) {
209
+ const r = [t, n, ...o];
210
+ [].forEach.call(e.children, (i) => {
211
+ const c = r.indexOf(i) === -1, p = !Ie(i);
212
+ c && p && U(i, s);
212
213
  });
213
214
  }
214
215
  function V(e, t) {
215
- let o = -1;
216
- return e.some((n, s) => t(n) ? (o = s, !0) : !1), o;
216
+ let n = -1;
217
+ return e.some((o, s) => t(o) ? (n = s, !0) : !1), n;
217
218
  }
218
- function Ie(e, t) {
219
- const o = [], n = e.container;
219
+ function Fe(e, t) {
220
+ const n = [], o = e.container;
220
221
  if (!t.disableScrollLock) {
221
- if (Ne(n)) {
222
- const a = Te(A(n));
223
- o.push({
224
- value: n.style.paddingRight,
222
+ if (Ce(o)) {
223
+ const i = ye(A(o));
224
+ n.push({
225
+ value: o.style.paddingRight,
225
226
  property: "padding-right",
226
- el: n
227
- }), n.style.paddingRight = `${Q(n) + a}px`;
228
- const c = A(n).querySelectorAll(".mui-fixed");
227
+ el: o
228
+ }), o.style.paddingRight = `${Q(o) + i}px`;
229
+ const c = A(o).querySelectorAll(".mui-fixed");
229
230
  [].forEach.call(c, (p) => {
230
- o.push({
231
+ n.push({
231
232
  value: p.style.paddingRight,
232
233
  property: "padding-right",
233
234
  el: p
234
- }), p.style.paddingRight = `${Q(p) + a}px`;
235
+ }), p.style.paddingRight = `${Q(p) + i}px`;
235
236
  });
236
237
  }
237
238
  let r;
238
- if (n.parentNode instanceof DocumentFragment)
239
- r = A(n).body;
239
+ if (o.parentNode instanceof DocumentFragment)
240
+ r = A(o).body;
240
241
  else {
241
- const a = n.parentElement, c = Y(n);
242
- r = (a == null ? void 0 : a.nodeName) === "HTML" && c.getComputedStyle(a).overflowY === "scroll" ? a : n;
242
+ const i = o.parentElement, c = Y(o);
243
+ r = (i == null ? void 0 : i.nodeName) === "HTML" && c.getComputedStyle(i).overflowY === "scroll" ? i : o;
243
244
  }
244
- o.push({
245
+ n.push({
245
246
  value: r.style.overflow,
246
247
  property: "overflow",
247
248
  el: r
@@ -256,97 +257,97 @@ function Ie(e, t) {
256
257
  }), r.style.overflow = "hidden";
257
258
  }
258
259
  return () => {
259
- o.forEach(({
260
+ n.forEach(({
260
261
  value: r,
261
- el: a,
262
+ el: i,
262
263
  property: c
263
264
  }) => {
264
- r ? a.style.setProperty(c, r) : a.style.removeProperty(c);
265
+ r ? i.style.setProperty(c, r) : i.style.removeProperty(c);
265
266
  });
266
267
  };
267
268
  }
268
- function Fe(e) {
269
+ function Se(e) {
269
270
  const t = [];
270
- return [].forEach.call(e.children, (o) => {
271
- o.getAttribute("aria-hidden") === "true" && t.push(o);
271
+ return [].forEach.call(e.children, (n) => {
272
+ n.getAttribute("aria-hidden") === "true" && t.push(n);
272
273
  }), t;
273
274
  }
274
- class Se {
275
+ class Ae {
275
276
  constructor() {
276
277
  this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
277
278
  }
278
- add(t, o) {
279
- let n = this.modals.indexOf(t);
280
- if (n !== -1)
281
- return n;
282
- n = this.modals.length, this.modals.push(t), t.modalRef && U(t.modalRef, !1);
283
- const s = Fe(o);
284
- Z(o, t.mount, t.modalRef, s, !0);
285
- const r = V(this.containers, (a) => a.container === o);
286
- return r !== -1 ? (this.containers[r].modals.push(t), n) : (this.containers.push({
279
+ add(t, n) {
280
+ let o = this.modals.indexOf(t);
281
+ if (o !== -1)
282
+ return o;
283
+ o = this.modals.length, this.modals.push(t), t.modalRef && U(t.modalRef, !1);
284
+ const s = Se(n);
285
+ Z(n, t.mount, t.modalRef, s, !0);
286
+ const r = V(this.containers, (i) => i.container === n);
287
+ return r !== -1 ? (this.containers[r].modals.push(t), o) : (this.containers.push({
287
288
  modals: [t],
288
- container: o,
289
+ container: n,
289
290
  restore: null,
290
291
  hiddenSiblings: s
291
- }), n);
292
+ }), o);
292
293
  }
293
- mount(t, o) {
294
- const n = V(this.containers, (r) => r.modals.indexOf(t) !== -1), s = this.containers[n];
295
- s.restore || (s.restore = Ie(s, o));
294
+ mount(t, n) {
295
+ const o = V(this.containers, (r) => r.modals.indexOf(t) !== -1), s = this.containers[o];
296
+ s.restore || (s.restore = Fe(s, n));
296
297
  }
297
- remove(t, o = !0) {
298
- const n = this.modals.indexOf(t);
299
- if (n === -1)
300
- return n;
301
- const s = V(this.containers, (a) => a.modals.indexOf(t) !== -1), r = this.containers[s];
302
- if (r.modals.splice(r.modals.indexOf(t), 1), this.modals.splice(n, 1), r.modals.length === 0)
303
- r.restore && r.restore(), t.modalRef && U(t.modalRef, o), Z(r.container, t.mount, t.modalRef, r.hiddenSiblings, !1), this.containers.splice(s, 1);
298
+ remove(t, n = !0) {
299
+ const o = this.modals.indexOf(t);
300
+ if (o === -1)
301
+ return o;
302
+ const s = V(this.containers, (i) => i.modals.indexOf(t) !== -1), r = this.containers[s];
303
+ if (r.modals.splice(r.modals.indexOf(t), 1), this.modals.splice(o, 1), r.modals.length === 0)
304
+ r.restore && r.restore(), t.modalRef && U(t.modalRef, n), Z(r.container, t.mount, t.modalRef, r.hiddenSiblings, !1), this.containers.splice(s, 1);
304
305
  else {
305
- const a = r.modals[r.modals.length - 1];
306
- a.modalRef && U(a.modalRef, !1);
306
+ const i = r.modals[r.modals.length - 1];
307
+ i.modalRef && U(i.modalRef, !1);
307
308
  }
308
- return n;
309
+ return o;
309
310
  }
310
311
  isTopModal(t) {
311
312
  return this.modals.length > 0 && this.modals[this.modals.length - 1] === t;
312
313
  }
313
314
  }
314
- function Ae(e) {
315
+ function we(e) {
315
316
  return typeof e == "function" ? e() : e;
316
317
  }
317
- function we(e) {
318
+ function Oe(e) {
318
319
  return e ? e.props.hasOwnProperty("in") : !1;
319
320
  }
320
- const Oe = new Se();
321
- function De(e) {
321
+ const De = new Ae();
322
+ function Me(e) {
322
323
  const {
323
324
  container: t,
324
- disableEscapeKeyDown: o = !1,
325
- disableScrollLock: n = !1,
325
+ disableEscapeKeyDown: n = !1,
326
+ disableScrollLock: o = !1,
326
327
  // @ts-ignore internal logic - Base UI supports the manager as a prop too
327
- manager: s = Oe,
328
+ manager: s = De,
328
329
  closeAfterTransition: r = !1,
329
- onTransitionEnter: a,
330
+ onTransitionEnter: i,
330
331
  onTransitionExited: c,
331
332
  children: p,
332
333
  onClose: x,
333
334
  open: h,
334
335
  rootRef: m
335
- } = e, R = f.useRef({}), g = f.useRef(null), d = f.useRef(null), w = te(d, m), [I, O] = f.useState(!h), N = we(p);
336
- let l = !0;
337
- (e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (l = !1);
338
- const v = () => A(g.current), k = () => (R.current.modalRef = d.current, R.current.mount = g.current, R.current), M = () => {
336
+ } = e, R = f.useRef({}), g = f.useRef(null), d = f.useRef(null), w = te(d, m), [I, O] = f.useState(!h), N = Oe(p);
337
+ let a = !0;
338
+ (e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (a = !1);
339
+ const v = () => A(g.current), k = () => (R.current.modalRef = d.current, R.current.mount = g.current, R.current), L = () => {
339
340
  s.mount(k(), {
340
- disableScrollLock: n
341
+ disableScrollLock: o
341
342
  }), d.current && (d.current.scrollTop = 0);
342
343
  }, E = X(() => {
343
- const b = Ae(t) || v().body;
344
- s.add(k(), b), d.current && M();
345
- }), T = f.useCallback(() => s.isTopModal(k()), [s]), L = X((b) => {
346
- g.current = b, b && (h && T() ? M() : d.current && U(d.current, l));
344
+ const b = we(t) || v().body;
345
+ s.add(k(), b), d.current && L();
346
+ }), T = f.useCallback(() => s.isTopModal(k()), [s]), B = X((b) => {
347
+ g.current = b, b && (h && T() ? L() : d.current && U(d.current, a));
347
348
  }), y = f.useCallback(() => {
348
- s.remove(k(), l);
349
- }, [l, s]);
349
+ s.remove(k(), a);
350
+ }, [a, s]);
350
351
  f.useEffect(() => () => {
351
352
  y();
352
353
  }, [y]), f.useEffect(() => {
@@ -355,14 +356,14 @@ function De(e) {
355
356
  const D = (b) => (u) => {
356
357
  var P;
357
358
  (P = b.onKeyDown) == null || P.call(b, u), !(u.key !== "Escape" || u.which === 229 || // Wait until IME is settled.
358
- !T()) && (o || (u.stopPropagation(), x && x(u, "escapeKeyDown")));
359
+ !T()) && (n || (u.stopPropagation(), x && x(u, "escapeKeyDown")));
359
360
  }, F = (b) => (u) => {
360
361
  var P;
361
362
  (P = b.onClick) == null || P.call(b, u), u.target === u.currentTarget && x && x(u, "backdropClick");
362
363
  };
363
364
  return {
364
365
  getRootProps: (b = {}) => {
365
- const u = de(e);
366
+ const u = ue(e);
366
367
  delete u.onTransitionEnter, delete u.onTransitionExited;
367
368
  const P = C({}, u, b);
368
369
  return C({
@@ -383,7 +384,7 @@ function De(e) {
383
384
  },
384
385
  getTransitionProps: () => {
385
386
  const b = () => {
386
- O(!1), a && a();
387
+ O(!1), i && i();
387
388
  }, u = () => {
388
389
  O(!0), c && c(), r && y();
389
390
  };
@@ -393,32 +394,32 @@ function De(e) {
393
394
  };
394
395
  },
395
396
  rootRef: w,
396
- portalRef: L,
397
+ portalRef: B,
397
398
  isTopModal: T,
398
399
  exited: I,
399
400
  hasTransition: N
400
401
  };
401
402
  }
402
- const oe = "Modal";
403
- function Me(e) {
404
- return ue(oe, e);
403
+ const ne = "Modal";
404
+ function Le(e) {
405
+ return fe(ne, e);
405
406
  }
406
- fe(oe, ["root", "hidden", "backdrop"]);
407
- const Le = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"], Be = (e) => {
407
+ pe(ne, ["root", "hidden", "backdrop"]);
408
+ const Be = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"], He = (e) => {
408
409
  const {
409
410
  open: t,
410
- exited: o
411
+ exited: n
411
412
  } = e;
412
- return be({
413
- root: ["root", !t && o && "hidden"],
413
+ return he({
414
+ root: ["root", !t && n && "hidden"],
414
415
  backdrop: ["backdrop"]
415
- }, he(Me));
416
- }, re = /* @__PURE__ */ f.forwardRef(function(t, o) {
417
- var n;
416
+ }, me(Le));
417
+ }, re = /* @__PURE__ */ f.forwardRef(function(t, n) {
418
+ var o;
418
419
  const {
419
420
  children: s,
420
421
  closeAfterTransition: r = !1,
421
- container: a,
422
+ container: i,
422
423
  disableAutoFocus: c = !1,
423
424
  disableEnforceFocus: p = !1,
424
425
  disableEscapeKeyDown: x = !1,
@@ -431,7 +432,7 @@ const Le = ["children", "closeAfterTransition", "container", "disableAutoFocus",
431
432
  open: I,
432
433
  slotProps: O = {},
433
434
  slots: N = {}
434
- } = t, l = pe(t, Le), v = C({}, t, {
435
+ } = t, a = be(t, Be), v = C({}, t, {
435
436
  closeAfterTransition: r,
436
437
  disableAutoFocus: c,
437
438
  disableEnforceFocus: p,
@@ -443,53 +444,53 @@ const Le = ["children", "closeAfterTransition", "container", "disableAutoFocus",
443
444
  keepMounted: d
444
445
  }), {
445
446
  getRootProps: k,
446
- getBackdropProps: M,
447
+ getBackdropProps: L,
447
448
  getTransitionProps: E,
448
449
  portalRef: T,
449
- isTopModal: L,
450
+ isTopModal: B,
450
451
  exited: y,
451
452
  hasTransition: D
452
- } = De(C({}, v, {
453
- rootRef: o
453
+ } = Me(C({}, v, {
454
+ rootRef: n
454
455
  })), F = C({}, v, {
455
456
  exited: y,
456
457
  hasTransition: D
457
- }), B = Be(F), _ = {};
458
+ }), H = He(F), _ = {};
458
459
  if (s.props.tabIndex === void 0 && (_.tabIndex = "-1"), D) {
459
460
  const {
460
- onEnter: H,
461
+ onEnter: K,
461
462
  onExited: W
462
463
  } = E();
463
- _.onEnter = H, _.onExited = W;
464
+ _.onEnter = K, _.onExited = W;
464
465
  }
465
- const q = (n = N.root) != null ? n : "div", b = G({
466
+ const q = (o = N.root) != null ? o : "div", b = G({
466
467
  elementType: q,
467
468
  externalSlotProps: O.root,
468
- externalForwardedProps: l,
469
+ externalForwardedProps: a,
469
470
  getSlotProps: k,
470
- className: B.root,
471
+ className: H.root,
471
472
  ownerState: F
472
473
  }), u = N.backdrop, P = G({
473
474
  elementType: u,
474
475
  externalSlotProps: O.backdrop,
475
- getSlotProps: (H) => M(C({}, H, {
476
+ getSlotProps: (K) => L(C({}, K, {
476
477
  onClick: (W) => {
477
- w && w(W), H != null && H.onClick && H.onClick(W);
478
+ w && w(W), K != null && K.onClick && K.onClick(W);
478
479
  }
479
480
  })),
480
- className: B.backdrop,
481
+ className: H.backdrop,
481
482
  ownerState: F
482
483
  });
483
- return !d && !I && (!D || y) ? null : /* @__PURE__ */ S(me, {
484
+ return !d && !I && (!D || y) ? null : /* @__PURE__ */ S(ge, {
484
485
  ref: T,
485
- container: a,
486
+ container: i,
486
487
  disablePortal: h,
487
488
  children: /* @__PURE__ */ $(q, C({}, b, {
488
489
  children: [!g && u ? /* @__PURE__ */ S(u, C({}, P)) : null, /* @__PURE__ */ S(j, {
489
490
  disableEnforceFocus: p,
490
491
  disableAutoFocus: c,
491
492
  disableRestoreFocus: m,
492
- isEnabled: L,
493
+ isEnabled: B,
493
494
  open: I,
494
495
  children: /* @__PURE__ */ f.cloneElement(s, _)
495
496
  })]
@@ -504,12 +505,12 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
504
505
  /**
505
506
  * A single child content element.
506
507
  */
507
- children: ne.isRequired,
508
+ children: oe.isRequired,
508
509
  /**
509
510
  * When set to true the Modal waits until a nested Transition is completed before closing.
510
511
  * @default false
511
512
  */
512
- closeAfterTransition: i.bool,
513
+ closeAfterTransition: l.bool,
513
514
  /**
514
515
  * An HTML element or function that returns one.
515
516
  * The `container` will have the portal children appended to it.
@@ -520,7 +521,7 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
520
521
  * By default, it uses the body of the top-level document object,
521
522
  * so it's simply `document.body` most of the time.
522
523
  */
523
- container: i.oneOfType([ge, i.func]),
524
+ container: l.oneOfType([Ee, l.func]),
524
525
  /**
525
526
  * If `true`, the modal will not automatically shift focus to itself when it opens, and
526
527
  * replace it to the last focused element when it closes.
@@ -530,7 +531,7 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
530
531
  * accessible to assistive technologies, like screen readers.
531
532
  * @default false
532
533
  */
533
- disableAutoFocus: i.bool,
534
+ disableAutoFocus: l.bool,
534
535
  /**
535
536
  * If `true`, the modal will not prevent focus from leaving the modal while open.
536
537
  *
@@ -538,45 +539,45 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
538
539
  * accessible to assistive technologies, like screen readers.
539
540
  * @default false
540
541
  */
541
- disableEnforceFocus: i.bool,
542
+ disableEnforceFocus: l.bool,
542
543
  /**
543
544
  * If `true`, hitting escape will not fire the `onClose` callback.
544
545
  * @default false
545
546
  */
546
- disableEscapeKeyDown: i.bool,
547
+ disableEscapeKeyDown: l.bool,
547
548
  /**
548
549
  * The `children` will be under the DOM hierarchy of the parent component.
549
550
  * @default false
550
551
  */
551
- disablePortal: i.bool,
552
+ disablePortal: l.bool,
552
553
  /**
553
554
  * If `true`, the modal will not restore focus to previously focused element once
554
555
  * modal is hidden or unmounted.
555
556
  * @default false
556
557
  */
557
- disableRestoreFocus: i.bool,
558
+ disableRestoreFocus: l.bool,
558
559
  /**
559
560
  * Disable the scroll lock behavior.
560
561
  * @default false
561
562
  */
562
- disableScrollLock: i.bool,
563
+ disableScrollLock: l.bool,
563
564
  /**
564
565
  * If `true`, the backdrop is not rendered.
565
566
  * @default false
566
567
  */
567
- hideBackdrop: i.bool,
568
+ hideBackdrop: l.bool,
568
569
  /**
569
570
  * Always keep the children in the DOM.
570
571
  * This prop can be useful in SEO situation or
571
572
  * when you want to maximize the responsiveness of the Modal.
572
573
  * @default false
573
574
  */
574
- keepMounted: i.bool,
575
+ keepMounted: l.bool,
575
576
  /**
576
577
  * Callback fired when the backdrop is clicked.
577
578
  * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
578
579
  */
579
- onBackdropClick: i.func,
580
+ onBackdropClick: l.func,
580
581
  /**
581
582
  * Callback fired when the component requests to be closed.
582
583
  * The `reason` parameter can optionally be used to control the response to `onClose`.
@@ -584,64 +585,71 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
584
585
  * @param {object} event The event source of the callback.
585
586
  * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
586
587
  */
587
- onClose: i.func,
588
+ onClose: l.func,
588
589
  /**
589
590
  * A function called when a transition enters.
590
591
  */
591
- onTransitionEnter: i.func,
592
+ onTransitionEnter: l.func,
592
593
  /**
593
594
  * A function called when a transition has exited.
594
595
  */
595
- onTransitionExited: i.func,
596
+ onTransitionExited: l.func,
596
597
  /**
597
598
  * If `true`, the component is shown.
598
599
  */
599
- open: i.bool.isRequired,
600
+ open: l.bool.isRequired,
600
601
  /**
601
602
  * The props used for each slot inside the Modal.
602
603
  * @default {}
603
604
  */
604
- slotProps: i.shape({
605
- backdrop: i.oneOfType([i.func, i.object]),
606
- root: i.oneOfType([i.func, i.object])
605
+ slotProps: l.shape({
606
+ backdrop: l.oneOfType([l.func, l.object]),
607
+ root: l.oneOfType([l.func, l.object])
607
608
  }),
608
609
  /**
609
610
  * The components used for each slot inside the Modal.
610
611
  * Either a string to use a HTML element or a component.
611
612
  * @default {}
612
613
  */
613
- slots: i.shape({
614
- backdrop: i.elementType,
615
- root: i.elementType
614
+ slots: l.shape({
615
+ backdrop: l.elementType,
616
+ root: l.elementType
616
617
  })
617
618
  });
618
- const K = ({ children: e, dialogTitle: t, dialogSubtitle: o, icon: n, onClose: s = () => {
619
- }, ...r }) => /* @__PURE__ */ S(
620
- re,
621
- {
622
- onClose: (a, c) => s(c),
623
- slots: { backdrop: ae },
624
- ...r,
625
- className: se(z.dialog, r.className),
626
- "aria-labelledby": "alert-dialog-title",
627
- "aria-describedby": "alert-dialog-description",
628
- children: /* @__PURE__ */ $("section", { className: z.dialog__panel, children: [
629
- !!s && /* @__PURE__ */ S(le, { handleOnClose: () => s("closeButtonClick") }),
630
- /* @__PURE__ */ S(ee, { title: t, subTitle: o, icon: n }),
631
- e
632
- ] })
633
- }
634
- );
635
- K.Title = ee;
636
- K.Title.displayName = "Dialog.Title";
637
- K.Content = ce;
638
- K.Content.displayName = "Dialog.Content";
639
- K.Actions = ie;
640
- K.Actions.displayName = "Dialog.Actions";
619
+ const M = se((e, t) => {
620
+ const { children: n, dialogTitle: o, dialogSubtitle: s, icon: r, onClose: i = () => {
621
+ } } = e;
622
+ return /* @__PURE__ */ S(
623
+ re,
624
+ {
625
+ ref: t,
626
+ slots: { backdrop: ae },
627
+ ...e,
628
+ onClose: (c, p) => {
629
+ i(p);
630
+ },
631
+ className: ie(z.dialog, e.className),
632
+ "aria-labelledby": "alert-dialog-title",
633
+ "aria-describedby": "alert-dialog-description",
634
+ children: /* @__PURE__ */ $("section", { className: z.dialog__panel, children: [
635
+ !!i && /* @__PURE__ */ S(ce, { handleOnClose: () => i("closeButtonClick") }),
636
+ /* @__PURE__ */ S(ee, { title: o, subTitle: s, icon: r }),
637
+ n
638
+ ] })
639
+ }
640
+ );
641
+ });
642
+ M.Title = ee;
643
+ M.Title.displayName = "Dialog.Title";
644
+ M.Content = de;
645
+ M.Content.displayName = "Dialog.Content";
646
+ M.Actions = le;
647
+ M.Actions.displayName = "Dialog.Actions";
648
+ const Ze = M;
641
649
  export {
642
- ie as Actions,
643
- ce as Content,
644
- K as Dialog,
650
+ le as Actions,
651
+ de as Content,
652
+ Ze as Dialog,
645
653
  ee as DialogTitle,
646
- K as default
654
+ M as default
647
655
  };