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

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 (163) 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-2kIaSHMl.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/Dialog.css +1 -1
  18. package/dist/assets/EllipsisTooltip.css +1 -1
  19. package/dist/assets/Group.css +1 -1
  20. package/dist/assets/IconButton.css +1 -1
  21. package/dist/assets/Input.css +1 -1
  22. package/dist/assets/PageHeader.css +1 -1
  23. package/dist/assets/Pagination.css +1 -1
  24. package/dist/assets/Popover.css +1 -0
  25. package/dist/assets/ResultWithChips.css +1 -0
  26. package/dist/assets/SelectButton.css +1 -1
  27. package/dist/assets/Skeleton.css +1 -1
  28. package/dist/assets/Snackbar.css +1 -1
  29. package/dist/assets/SortTooltip.css +1 -1
  30. package/dist/assets/Stepper.css +1 -1
  31. package/dist/assets/StepperNavigator.css +1 -0
  32. package/dist/assets/Table.css +1 -1
  33. package/dist/assets/Tabs.css +1 -1
  34. package/dist/assets/TextDisplay.css +1 -1
  35. package/dist/assets/Toggle.css +1 -1
  36. package/dist/assets/Toggle2.css +1 -1
  37. package/dist/assets/Typography.css +1 -1
  38. package/dist/{combineHooksSlotProps-DVjg9PRh.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
  39. package/dist/components/Adornment/Adornment.d.ts +20 -0
  40. package/dist/components/Adornment/Adornment.js +13 -0
  41. package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
  42. package/dist/components/Adornment/adornment.test.d.ts +1 -0
  43. package/dist/components/Advice/Advice.d.ts +32 -17
  44. package/dist/components/Advice/Advice.js +39 -40
  45. package/dist/components/Advice/Advice.stories.d.ts +4 -3
  46. package/dist/components/Autocomplete/Autocomplete.d.ts +20 -0
  47. package/dist/components/Autocomplete/Autocomplete.js +679 -0
  48. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +23 -0
  49. package/dist/components/Avatar/Avatar.d.ts +15 -0
  50. package/dist/components/Avatar/Avatar.js +51 -0
  51. package/dist/components/Avatar/Avatar.stories.d.ts +25 -0
  52. package/dist/components/Button/Button.d.ts +2 -0
  53. package/dist/components/Button/Button.js +51 -49
  54. package/dist/components/Checkbox/Checkbox.js +52 -52
  55. package/dist/components/Chip/Chip.d.ts +6 -12
  56. package/dist/components/Chip/Chip.js +11 -6
  57. package/dist/components/Chip/Chip.stories.d.ts +6 -15
  58. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +14 -0
  59. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +37 -0
  60. package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +23 -0
  61. package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +1 -0
  62. package/dist/components/Dialog/Actions.js +1 -1
  63. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  64. package/dist/components/Dialog/Backdrop.js +8 -7
  65. package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
  66. package/dist/components/Dialog/CloseIconButton.js +15 -18
  67. package/dist/components/Dialog/Dialog.d.ts +16 -10
  68. package/dist/components/Dialog/Dialog.js +167 -166
  69. package/dist/components/Dialog/Dialog.stories.d.ts +116 -110
  70. package/dist/components/Dialog/DialogTitle.d.ts +5 -2
  71. package/dist/components/Dialog/DialogTitle.js +22 -16
  72. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
  73. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +3 -2
  74. package/dist/components/Icon/Icon.js +315 -47
  75. package/dist/components/Icon/types.d.ts +1 -1
  76. package/dist/components/IconButton/IconButton.js +42 -42
  77. package/dist/components/Input/Input.d.ts +26 -5
  78. package/dist/components/Input/Input.js +319 -304
  79. package/dist/components/Input/Input.stories.d.ts +2 -21
  80. package/dist/components/InputSearch/InputSearch.d.ts +37 -7
  81. package/dist/components/InputSearch/InputSearch.js +27 -29
  82. package/dist/components/InputSearch/InputSearch.stories.d.ts +15 -3
  83. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
  84. package/dist/components/PageHeader/PageHeader.d.ts +6 -2
  85. package/dist/components/PageHeader/PageHeader.js +72 -65
  86. package/dist/components/PageHeader/PageHeader.stories.d.ts +3 -1
  87. package/dist/components/PageHeader/PageHeader.test.d.ts +1 -0
  88. package/dist/components/Pagination/Pagination.d.ts +5 -1
  89. package/dist/components/Pagination/Pagination.js +90 -91
  90. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  91. package/dist/components/Popover/Popover.d.ts +32 -0
  92. package/dist/components/Popover/Popover.js +24 -0
  93. package/dist/components/Popover/Popover.stories.d.ts +34 -0
  94. package/dist/components/Popover/PopoverBody.d.ts +6 -0
  95. package/dist/components/Popover/PopoverBody.js +6 -0
  96. package/dist/components/Popover/PopoverFooter.d.ts +6 -0
  97. package/dist/components/Popover/PopoverFooter.js +6 -0
  98. package/dist/components/Popover/PopoverHeader.d.ts +6 -0
  99. package/dist/components/Popover/PopoverHeader.js +6 -0
  100. package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
  101. package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
  102. package/dist/components/RowItem/RowItem.d.ts +25 -0
  103. package/dist/components/RowItem/RowItem.js +23 -0
  104. package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
  105. package/dist/components/RowItem/rowItem.test.d.ts +1 -0
  106. package/dist/components/Select/Select.d.ts +21 -0
  107. package/dist/components/Select/Select.js +476 -413
  108. package/dist/components/Select/SelectButton.d.ts +2 -0
  109. package/dist/components/Select/SelectButton.js +3 -2
  110. package/dist/components/Skeleton/Skeleton.d.ts +3 -1
  111. package/dist/components/Skeleton/Skeleton.js +20 -14
  112. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  113. package/dist/components/Snackbar/Snackbar.js +94 -94
  114. package/dist/components/Snackbar/Snackbar.stories.d.ts +4 -4
  115. package/dist/components/SortTooltip/SortTooltip.js +46 -46
  116. package/dist/components/Stepper/Stepper.js +35 -35
  117. package/dist/components/StepperNavigator/StepperNavigator.d.ts +58 -0
  118. package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
  119. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -0
  120. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
  121. package/dist/components/Table/Table.d.ts +3 -1
  122. package/dist/components/Table/Table.js +87 -99
  123. package/dist/components/Table/Table.stories.d.ts +1 -1
  124. package/dist/components/Tabs/Tab.d.ts +5 -3
  125. package/dist/components/Tabs/Tab.js +38 -36
  126. package/dist/components/Tabs/TabPanel.d.ts +4 -2
  127. package/dist/components/Tabs/TabPanel.js +51 -40
  128. package/dist/components/Tabs/Tabs.d.ts +6 -4
  129. package/dist/components/Tabs/Tabs.js +131 -128
  130. package/dist/components/TextDisplay/TextDisplay.d.ts +9 -3
  131. package/dist/components/TextDisplay/TextDisplay.js +45 -31
  132. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
  133. package/dist/components/Toggle/Toggle.js +56 -56
  134. package/dist/components/ToggleGroup/Group.d.ts +2 -0
  135. package/dist/components/ToggleGroup/Group.js +4 -2
  136. package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
  137. package/dist/components/ToggleGroup/Toggle.js +9 -5
  138. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  139. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +3 -1
  140. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  141. package/dist/components/Tooltip/Tooltip.js +4 -4
  142. package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -1
  143. package/dist/components/Typography/Typography.js +47 -47
  144. package/dist/components/Typography/Typography.stories.d.ts +1 -1
  145. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
  146. package/dist/{index-CjW42-M-.js → index-bQFToy-I.js} +1 -1
  147. package/dist/main.d.ts +8 -0
  148. package/dist/main.js +90 -76
  149. package/dist/marola.css +1 -1
  150. package/dist/ownerDocument-YGhwAnr1.js +33 -0
  151. package/dist/{useButton-DNk3wrQp.js → useButton-DcihopJG.js} +1 -1
  152. package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
  153. package/dist/useEventCallback-BAQJJ3ye.js +14 -0
  154. package/dist/useId-BW-oWmul.js +19 -0
  155. package/dist/{useList-B0hog_3-.js → useList-B9C55YB7.js} +2 -2
  156. package/dist/{index-CH45lKw7.js → useSlotProps-C_I1kEHr.js} +99 -99
  157. package/package.json +21 -12
  158. package/dist/Dialog.module-DFEmFdYT.js +0 -30
  159. package/dist/Group-B3p31ftp.js +0 -26
  160. package/dist/SelectButton-K3OIfR5m.js +0 -61
  161. package/dist/Toggle-BCgIItCc.js +0 -142
  162. package/dist/useCompoundItem-D1iRfg8D.js +0 -84
  163. package/dist/useEventCallback-xTG9piMa.js +0 -45
@@ -1,84 +1,86 @@
1
1
  import { jsxs as $, jsx as S } from "react/jsx-runtime";
2
- import { default as $e } from "./Actions.js";
3
- import oe from "./Backdrop.js";
4
- import re from "./CloseIconButton.js";
5
- import { default as ze } from "./Content.js";
6
- import { s as q } from "../../Dialog.module-DFEmFdYT.js";
7
- import se from "./DialogTitle.js";
8
- import { u as Z, P as i, f as ie, b as C, g as ae, a as le, _ as ce, c as z, d as de, e as ue } from "../../index-CH45lKw7.js";
2
+ import { c as se } from "../../clsx-DB4S2d7J.js";
3
+ import ie from "./Actions.js";
4
+ import ae from "./Backdrop.js";
5
+ import le from "./CloseIconButton.js";
6
+ import ce from "./Content.js";
7
+ import { s as z } from "../../Dialog.module-W7UCXlf3.js";
8
+ 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";
9
10
  import * as f from "react";
10
- import { o as w, e as ee, u as G } from "../../useEventCallback-xTG9piMa.js";
11
- import { P as fe, H as pe } from "../../Portal-DIeBsWdL.js";
12
- import { e as be } from "../../index-CjW42-M-.js";
13
- function X(...e) {
11
+ import { o as A, e as ne } from "../../ownerDocument-YGhwAnr1.js";
12
+ 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";
15
+ function J(...e) {
14
16
  return e.reduce((t, o) => o == null ? t : function(...s) {
15
17
  t.apply(this, s), o.apply(this, s);
16
18
  }, () => {
17
19
  });
18
20
  }
19
21
  function Y(e) {
20
- return w(e).defaultView || window;
22
+ return A(e).defaultView || window;
21
23
  }
22
- function he(e) {
24
+ function Te(e) {
23
25
  const t = e.documentElement.clientWidth;
24
26
  return Math.abs(window.innerWidth - t);
25
27
  }
26
- const me = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
27
- function ge(e) {
28
+ const ye = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
29
+ function xe(e) {
28
30
  const t = parseInt(e.getAttribute("tabindex") || "", 10);
29
31
  return Number.isNaN(t) ? e.contentEditable === "true" || (e.nodeName === "AUDIO" || e.nodeName === "VIDEO" || e.nodeName === "DETAILS") && e.getAttribute("tabindex") === null ? 0 : e.tabIndex : t;
30
32
  }
31
- function Ee(e) {
33
+ function Re(e) {
32
34
  if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name)
33
35
  return !1;
34
36
  const t = (n) => e.ownerDocument.querySelector(`input[type="radio"]${n}`);
35
37
  let o = t(`[name="${e.name}"]:checked`);
36
38
  return o || (o = t(`[name="${e.name}"]`)), o !== e;
37
39
  }
38
- function Te(e) {
39
- return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Ee(e));
40
+ function ve(e) {
41
+ return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Re(e));
40
42
  }
41
- function ye(e) {
43
+ function ke(e) {
42
44
  const t = [], o = [];
43
- return Array.from(e.querySelectorAll(me)).forEach((n, s) => {
44
- const r = ge(n);
45
- r === -1 || !Te(n) || (r === 0 ? t.push(n) : o.push({
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({
46
48
  documentOrder: s,
47
49
  tabIndex: r,
48
50
  node: n
49
51
  }));
50
52
  }), o.sort((n, s) => n.tabIndex === s.tabIndex ? n.documentOrder - s.documentOrder : n.tabIndex - s.tabIndex).map((n) => n.node).concat(t);
51
53
  }
52
- function xe() {
54
+ function Pe() {
53
55
  return !0;
54
56
  }
55
- function W(e) {
57
+ function j(e) {
56
58
  const {
57
59
  children: t,
58
60
  disableAutoFocus: o = !1,
59
61
  disableEnforceFocus: n = !1,
60
62
  disableRestoreFocus: s = !1,
61
- getTabbable: r = ye,
62
- isEnabled: a = xe,
63
- open: d
64
- } = 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), c = f.useRef(null), O = Z(t.ref, c), I = f.useRef(null);
63
+ getTabbable: r = ke,
64
+ isEnabled: a = Pe,
65
+ open: c
66
+ } = 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);
65
67
  f.useEffect(() => {
66
- !d || !c.current || (g.current = !o);
67
- }, [o, d]), f.useEffect(() => {
68
- if (!d || !c.current)
68
+ !c || !d.current || (g.current = !o);
69
+ }, [o, c]), f.useEffect(() => {
70
+ if (!c || !d.current)
69
71
  return;
70
- const l = w(c.current);
71
- return c.current.contains(l.activeElement) || (c.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(`
72
- `)), c.current.setAttribute("tabIndex", "-1")), g.current && c.current.focus()), () => {
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(`
74
+ `)), d.current.setAttribute("tabIndex", "-1")), g.current && d.current.focus()), () => {
73
75
  s || (m.current && m.current.focus && (p.current = !0, m.current.focus()), m.current = null);
74
76
  };
75
- }, [d]), f.useEffect(() => {
76
- if (!d || !c.current)
77
+ }, [c]), f.useEffect(() => {
78
+ if (!c || !d.current)
77
79
  return;
78
- const l = w(c.current), v = (E) => {
79
- I.current = E, !(n || !a() || E.key !== "Tab") && l.activeElement === c.current && E.shiftKey && (p.current = !0, h.current && h.current.focus());
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());
80
82
  }, k = () => {
81
- const E = c.current;
83
+ const E = d.current;
82
84
  if (E === null)
83
85
  return;
84
86
  if (!l.hasFocus() || !a() || p.current) {
@@ -94,22 +96,22 @@ function W(e) {
94
96
  if (!g.current)
95
97
  return;
96
98
  let T = [];
97
- if ((l.activeElement === x.current || l.activeElement === h.current) && (T = r(c.current)), T.length > 0) {
99
+ if ((l.activeElement === x.current || l.activeElement === h.current) && (T = r(d.current)), T.length > 0) {
98
100
  var L, y;
99
- const M = !!((L = I.current) != null && L.shiftKey && ((y = I.current) == null ? void 0 : y.key) === "Tab"), F = T[0], H = T[T.length - 1];
100
- typeof F != "string" && typeof H != "string" && (M ? H.focus() : F.focus());
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());
101
103
  } else
102
104
  E.focus();
103
105
  };
104
106
  l.addEventListener("focusin", k), l.addEventListener("keydown", v, !0);
105
- const D = setInterval(() => {
107
+ const M = setInterval(() => {
106
108
  l.activeElement && l.activeElement.tagName === "BODY" && k();
107
109
  }, 50);
108
110
  return () => {
109
- clearInterval(D), l.removeEventListener("focusin", k), l.removeEventListener("keydown", v, !0);
111
+ clearInterval(M), l.removeEventListener("focusin", k), l.removeEventListener("keydown", v, !0);
110
112
  };
111
- }, [o, n, s, a, d, r]);
112
- const A = (l) => {
113
+ }, [o, n, s, a, c, r]);
114
+ const O = (l) => {
113
115
  m.current === null && (m.current = l.relatedTarget), g.current = !0, R.current = l.target;
114
116
  const v = t.props.onFocus;
115
117
  v && v(l);
@@ -118,22 +120,22 @@ function W(e) {
118
120
  };
119
121
  return /* @__PURE__ */ $(f.Fragment, {
120
122
  children: [/* @__PURE__ */ S("div", {
121
- tabIndex: d ? 0 : -1,
123
+ tabIndex: c ? 0 : -1,
122
124
  onFocus: N,
123
125
  ref: x,
124
126
  "data-testid": "sentinelStart"
125
127
  }), /* @__PURE__ */ f.cloneElement(t, {
126
- ref: O,
127
- onFocus: A
128
+ ref: w,
129
+ onFocus: O
128
130
  }), /* @__PURE__ */ S("div", {
129
- tabIndex: d ? 0 : -1,
131
+ tabIndex: c ? 0 : -1,
130
132
  onFocus: N,
131
133
  ref: h,
132
134
  "data-testid": "sentinelEnd"
133
135
  })]
134
136
  });
135
137
  }
136
- process.env.NODE_ENV !== "production" && (W.propTypes = {
138
+ process.env.NODE_ENV !== "production" && (j.propTypes = {
137
139
  // ┌────────────────────────────── Warning ──────────────────────────────┐
138
140
  // │ These PropTypes are generated from the TypeScript type definitions. │
139
141
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -141,7 +143,7 @@ process.env.NODE_ENV !== "production" && (W.propTypes = {
141
143
  /**
142
144
  * A single child content element.
143
145
  */
144
- children: ee,
146
+ children: ne,
145
147
  /**
146
148
  * If `true`, the focus trap will not automatically shift focus to itself when it opens, and
147
149
  * replace it to the last focused element when it closes.
@@ -187,57 +189,57 @@ process.env.NODE_ENV !== "production" && (W.propTypes = {
187
189
  */
188
190
  open: i.bool.isRequired
189
191
  });
190
- process.env.NODE_ENV !== "production" && (W.propTypes = be(W.propTypes));
191
- function Re(e) {
192
- const t = w(e);
192
+ process.env.NODE_ENV !== "production" && (j.propTypes = Ee(j.propTypes));
193
+ function Ne(e) {
194
+ const t = A(e);
193
195
  return t.body === e ? Y(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
194
196
  }
195
- function K(e, t) {
197
+ function U(e, t) {
196
198
  t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
197
199
  }
198
- function J(e) {
200
+ function Q(e) {
199
201
  return parseInt(Y(e).getComputedStyle(e).paddingRight, 10) || 0;
200
202
  }
201
- function ve(e) {
203
+ function Ce(e) {
202
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";
203
205
  return o || n;
204
206
  }
205
- function Q(e, t, o, n, s) {
207
+ function Z(e, t, o, n, s) {
206
208
  const r = [t, o, ...n];
207
209
  [].forEach.call(e.children, (a) => {
208
- const d = r.indexOf(a) === -1, p = !ve(a);
209
- d && p && K(a, s);
210
+ const c = r.indexOf(a) === -1, p = !Ce(a);
211
+ c && p && U(a, s);
210
212
  });
211
213
  }
212
214
  function V(e, t) {
213
215
  let o = -1;
214
216
  return e.some((n, s) => t(n) ? (o = s, !0) : !1), o;
215
217
  }
216
- function ke(e, t) {
218
+ function Ie(e, t) {
217
219
  const o = [], n = e.container;
218
220
  if (!t.disableScrollLock) {
219
- if (Re(n)) {
220
- const a = he(w(n));
221
+ if (Ne(n)) {
222
+ const a = Te(A(n));
221
223
  o.push({
222
224
  value: n.style.paddingRight,
223
225
  property: "padding-right",
224
226
  el: n
225
- }), n.style.paddingRight = `${J(n) + a}px`;
226
- const d = w(n).querySelectorAll(".mui-fixed");
227
- [].forEach.call(d, (p) => {
227
+ }), n.style.paddingRight = `${Q(n) + a}px`;
228
+ const c = A(n).querySelectorAll(".mui-fixed");
229
+ [].forEach.call(c, (p) => {
228
230
  o.push({
229
231
  value: p.style.paddingRight,
230
232
  property: "padding-right",
231
233
  el: p
232
- }), p.style.paddingRight = `${J(p) + a}px`;
234
+ }), p.style.paddingRight = `${Q(p) + a}px`;
233
235
  });
234
236
  }
235
237
  let r;
236
238
  if (n.parentNode instanceof DocumentFragment)
237
- r = w(n).body;
239
+ r = A(n).body;
238
240
  else {
239
- const a = n.parentElement, d = Y(n);
240
- r = (a == null ? void 0 : a.nodeName) === "HTML" && d.getComputedStyle(a).overflowY === "scroll" ? a : n;
241
+ const a = n.parentElement, c = Y(n);
242
+ r = (a == null ? void 0 : a.nodeName) === "HTML" && c.getComputedStyle(a).overflowY === "scroll" ? a : n;
241
243
  }
242
244
  o.push({
243
245
  value: r.style.overflow,
@@ -257,19 +259,19 @@ function ke(e, t) {
257
259
  o.forEach(({
258
260
  value: r,
259
261
  el: a,
260
- property: d
262
+ property: c
261
263
  }) => {
262
- r ? a.style.setProperty(d, r) : a.style.removeProperty(d);
264
+ r ? a.style.setProperty(c, r) : a.style.removeProperty(c);
263
265
  });
264
266
  };
265
267
  }
266
- function Pe(e) {
268
+ function Fe(e) {
267
269
  const t = [];
268
270
  return [].forEach.call(e.children, (o) => {
269
271
  o.getAttribute("aria-hidden") === "true" && t.push(o);
270
272
  }), t;
271
273
  }
272
- class Ne {
274
+ class Se {
273
275
  constructor() {
274
276
  this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
275
277
  }
@@ -277,9 +279,9 @@ class Ne {
277
279
  let n = this.modals.indexOf(t);
278
280
  if (n !== -1)
279
281
  return n;
280
- n = this.modals.length, this.modals.push(t), t.modalRef && K(t.modalRef, !1);
281
- const s = Pe(o);
282
- Q(o, t.mount, t.modalRef, s, !0);
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);
283
285
  const r = V(this.containers, (a) => a.container === o);
284
286
  return r !== -1 ? (this.containers[r].modals.push(t), n) : (this.containers.push({
285
287
  modals: [t],
@@ -290,7 +292,7 @@ class Ne {
290
292
  }
291
293
  mount(t, o) {
292
294
  const n = V(this.containers, (r) => r.modals.indexOf(t) !== -1), s = this.containers[n];
293
- s.restore || (s.restore = ke(s, o));
295
+ s.restore || (s.restore = Ie(s, o));
294
296
  }
295
297
  remove(t, o = !0) {
296
298
  const n = this.modals.indexOf(t);
@@ -298,10 +300,10 @@ class Ne {
298
300
  return n;
299
301
  const s = V(this.containers, (a) => a.modals.indexOf(t) !== -1), r = this.containers[s];
300
302
  if (r.modals.splice(r.modals.indexOf(t), 1), this.modals.splice(n, 1), r.modals.length === 0)
301
- r.restore && r.restore(), t.modalRef && K(t.modalRef, o), Q(r.container, t.mount, t.modalRef, r.hiddenSiblings, !1), this.containers.splice(s, 1);
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);
302
304
  else {
303
305
  const a = r.modals[r.modals.length - 1];
304
- a.modalRef && K(a.modalRef, !1);
306
+ a.modalRef && U(a.modalRef, !1);
305
307
  }
306
308
  return n;
307
309
  }
@@ -309,39 +311,39 @@ class Ne {
309
311
  return this.modals.length > 0 && this.modals[this.modals.length - 1] === t;
310
312
  }
311
313
  }
312
- function Ce(e) {
314
+ function Ae(e) {
313
315
  return typeof e == "function" ? e() : e;
314
316
  }
315
- function Ie(e) {
317
+ function we(e) {
316
318
  return e ? e.props.hasOwnProperty("in") : !1;
317
319
  }
318
- const Fe = new Ne();
319
- function Se(e) {
320
+ const Oe = new Se();
321
+ function De(e) {
320
322
  const {
321
323
  container: t,
322
324
  disableEscapeKeyDown: o = !1,
323
325
  disableScrollLock: n = !1,
324
326
  // @ts-ignore internal logic - Base UI supports the manager as a prop too
325
- manager: s = Fe,
327
+ manager: s = Oe,
326
328
  closeAfterTransition: r = !1,
327
329
  onTransitionEnter: a,
328
- onTransitionExited: d,
330
+ onTransitionExited: c,
329
331
  children: p,
330
332
  onClose: x,
331
333
  open: h,
332
334
  rootRef: m
333
- } = e, R = f.useRef({}), g = f.useRef(null), c = f.useRef(null), O = Z(c, m), [I, A] = f.useState(!h), N = Ie(p);
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);
334
336
  let l = !0;
335
337
  (e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (l = !1);
336
- const v = () => w(g.current), k = () => (R.current.modalRef = c.current, R.current.mount = g.current, R.current), D = () => {
338
+ const v = () => A(g.current), k = () => (R.current.modalRef = d.current, R.current.mount = g.current, R.current), M = () => {
337
339
  s.mount(k(), {
338
340
  disableScrollLock: n
339
- }), c.current && (c.current.scrollTop = 0);
340
- }, E = G(() => {
341
- const b = Ce(t) || v().body;
342
- s.add(k(), b), c.current && D();
343
- }), T = f.useCallback(() => s.isTopModal(k()), [s]), L = G((b) => {
344
- g.current = b, b && (h && T() ? D() : c.current && K(c.current, l));
341
+ }), d.current && (d.current.scrollTop = 0);
342
+ }, 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));
345
347
  }), y = f.useCallback(() => {
346
348
  s.remove(k(), l);
347
349
  }, [l, s]);
@@ -350,7 +352,7 @@ function Se(e) {
350
352
  }, [y]), f.useEffect(() => {
351
353
  h ? E() : (!N || !r) && y();
352
354
  }, [h, y, N, r, E]);
353
- const M = (b) => (u) => {
355
+ const D = (b) => (u) => {
354
356
  var P;
355
357
  (P = b.onKeyDown) == null || P.call(b, u), !(u.key !== "Escape" || u.which === 229 || // Wait until IME is settled.
356
358
  !T()) && (o || (u.stopPropagation(), x && x(u, "escapeKeyDown")));
@@ -360,14 +362,14 @@ function Se(e) {
360
362
  };
361
363
  return {
362
364
  getRootProps: (b = {}) => {
363
- const u = ie(e);
365
+ const u = de(e);
364
366
  delete u.onTransitionEnter, delete u.onTransitionExited;
365
367
  const P = C({}, u, b);
366
368
  return C({
367
369
  role: "presentation"
368
370
  }, P, {
369
- onKeyDown: M(P),
370
- ref: O
371
+ onKeyDown: D(P),
372
+ ref: w
371
373
  });
372
374
  },
373
375
  getBackdropProps: (b = {}) => {
@@ -381,111 +383,111 @@ function Se(e) {
381
383
  },
382
384
  getTransitionProps: () => {
383
385
  const b = () => {
384
- A(!1), a && a();
386
+ O(!1), a && a();
385
387
  }, u = () => {
386
- A(!0), d && d(), r && y();
388
+ O(!0), c && c(), r && y();
387
389
  };
388
390
  return {
389
- onEnter: X(b, p == null ? void 0 : p.props.onEnter),
390
- onExited: X(u, p == null ? void 0 : p.props.onExited)
391
+ onEnter: J(b, p == null ? void 0 : p.props.onEnter),
392
+ onExited: J(u, p == null ? void 0 : p.props.onExited)
391
393
  };
392
394
  },
393
- rootRef: O,
395
+ rootRef: w,
394
396
  portalRef: L,
395
397
  isTopModal: T,
396
398
  exited: I,
397
399
  hasTransition: N
398
400
  };
399
401
  }
400
- const te = "Modal";
401
- function we(e) {
402
- return ae(te, e);
402
+ const oe = "Modal";
403
+ function Me(e) {
404
+ return ue(oe, e);
403
405
  }
404
- le(te, ["root", "hidden", "backdrop"]);
405
- const Oe = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"], Ae = (e) => {
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) => {
406
408
  const {
407
409
  open: t,
408
410
  exited: o
409
411
  } = e;
410
- return de({
412
+ return be({
411
413
  root: ["root", !t && o && "hidden"],
412
414
  backdrop: ["backdrop"]
413
- }, ue(we));
414
- }, ne = /* @__PURE__ */ f.forwardRef(function(t, o) {
415
+ }, he(Me));
416
+ }, re = /* @__PURE__ */ f.forwardRef(function(t, o) {
415
417
  var n;
416
418
  const {
417
419
  children: s,
418
420
  closeAfterTransition: r = !1,
419
421
  container: a,
420
- disableAutoFocus: d = !1,
422
+ disableAutoFocus: c = !1,
421
423
  disableEnforceFocus: p = !1,
422
424
  disableEscapeKeyDown: x = !1,
423
425
  disablePortal: h = !1,
424
426
  disableRestoreFocus: m = !1,
425
427
  disableScrollLock: R = !1,
426
428
  hideBackdrop: g = !1,
427
- keepMounted: c = !1,
428
- onBackdropClick: O,
429
+ keepMounted: d = !1,
430
+ onBackdropClick: w,
429
431
  open: I,
430
- slotProps: A = {},
432
+ slotProps: O = {},
431
433
  slots: N = {}
432
- } = t, l = ce(t, Oe), v = C({}, t, {
434
+ } = t, l = pe(t, Le), v = C({}, t, {
433
435
  closeAfterTransition: r,
434
- disableAutoFocus: d,
436
+ disableAutoFocus: c,
435
437
  disableEnforceFocus: p,
436
438
  disableEscapeKeyDown: x,
437
439
  disablePortal: h,
438
440
  disableRestoreFocus: m,
439
441
  disableScrollLock: R,
440
442
  hideBackdrop: g,
441
- keepMounted: c
443
+ keepMounted: d
442
444
  }), {
443
445
  getRootProps: k,
444
- getBackdropProps: D,
446
+ getBackdropProps: M,
445
447
  getTransitionProps: E,
446
448
  portalRef: T,
447
449
  isTopModal: L,
448
450
  exited: y,
449
- hasTransition: M
450
- } = Se(C({}, v, {
451
+ hasTransition: D
452
+ } = De(C({}, v, {
451
453
  rootRef: o
452
454
  })), F = C({}, v, {
453
455
  exited: y,
454
- hasTransition: M
455
- }), H = Ae(F), _ = {};
456
- if (s.props.tabIndex === void 0 && (_.tabIndex = "-1"), M) {
456
+ hasTransition: D
457
+ }), B = Be(F), _ = {};
458
+ if (s.props.tabIndex === void 0 && (_.tabIndex = "-1"), D) {
457
459
  const {
458
- onEnter: B,
459
- onExited: U
460
+ onEnter: H,
461
+ onExited: W
460
462
  } = E();
461
- _.onEnter = B, _.onExited = U;
463
+ _.onEnter = H, _.onExited = W;
462
464
  }
463
- const j = (n = N.root) != null ? n : "div", b = z({
464
- elementType: j,
465
- externalSlotProps: A.root,
465
+ const q = (n = N.root) != null ? n : "div", b = G({
466
+ elementType: q,
467
+ externalSlotProps: O.root,
466
468
  externalForwardedProps: l,
467
469
  getSlotProps: k,
468
- className: H.root,
470
+ className: B.root,
469
471
  ownerState: F
470
- }), u = N.backdrop, P = z({
472
+ }), u = N.backdrop, P = G({
471
473
  elementType: u,
472
- externalSlotProps: A.backdrop,
473
- getSlotProps: (B) => D(C({}, B, {
474
- onClick: (U) => {
475
- O && O(U), B != null && B.onClick && B.onClick(U);
474
+ externalSlotProps: O.backdrop,
475
+ getSlotProps: (H) => M(C({}, H, {
476
+ onClick: (W) => {
477
+ w && w(W), H != null && H.onClick && H.onClick(W);
476
478
  }
477
479
  })),
478
- className: H.backdrop,
480
+ className: B.backdrop,
479
481
  ownerState: F
480
482
  });
481
- return !c && !I && (!M || y) ? null : /* @__PURE__ */ S(fe, {
483
+ return !d && !I && (!D || y) ? null : /* @__PURE__ */ S(me, {
482
484
  ref: T,
483
485
  container: a,
484
486
  disablePortal: h,
485
- children: /* @__PURE__ */ $(j, C({}, b, {
486
- children: [!g && u ? /* @__PURE__ */ S(u, C({}, P)) : null, /* @__PURE__ */ S(W, {
487
+ children: /* @__PURE__ */ $(q, C({}, b, {
488
+ children: [!g && u ? /* @__PURE__ */ S(u, C({}, P)) : null, /* @__PURE__ */ S(j, {
487
489
  disableEnforceFocus: p,
488
- disableAutoFocus: d,
490
+ disableAutoFocus: c,
489
491
  disableRestoreFocus: m,
490
492
  isEnabled: L,
491
493
  open: I,
@@ -494,7 +496,7 @@ const Oe = ["children", "closeAfterTransition", "container", "disableAutoFocus",
494
496
  }))
495
497
  });
496
498
  });
497
- process.env.NODE_ENV !== "production" && (ne.propTypes = {
499
+ process.env.NODE_ENV !== "production" && (re.propTypes = {
498
500
  // ┌────────────────────────────── Warning ──────────────────────────────┐
499
501
  // │ These PropTypes are generated from the TypeScript type definitions. │
500
502
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -502,7 +504,7 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
502
504
  /**
503
505
  * A single child content element.
504
506
  */
505
- children: ee.isRequired,
507
+ children: ne.isRequired,
506
508
  /**
507
509
  * When set to true the Modal waits until a nested Transition is completed before closing.
508
510
  * @default false
@@ -518,7 +520,7 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
518
520
  * By default, it uses the body of the top-level document object,
519
521
  * so it's simply `document.body` most of the time.
520
522
  */
521
- container: i.oneOfType([pe, i.func]),
523
+ container: i.oneOfType([ge, i.func]),
522
524
  /**
523
525
  * If `true`, the modal will not automatically shift focus to itself when it opens, and
524
526
  * replace it to the last focused element when it closes.
@@ -613,34 +615,33 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
613
615
  root: i.elementType
614
616
  })
615
617
  });
616
- const je = ({
617
- children: e,
618
- dialogTitle: t,
619
- dialogSubtitle: o,
620
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
621
- isLoading: n = !1,
622
- onClose: s,
623
- ...r
624
- }) => /* @__PURE__ */ S(
625
- ne,
618
+ const K = ({ children: e, dialogTitle: t, dialogSubtitle: o, icon: n, onClose: s = () => {
619
+ }, ...r }) => /* @__PURE__ */ S(
620
+ re,
626
621
  {
627
- onClose: s,
628
- slots: { backdrop: oe },
622
+ onClose: (a, c) => s(c),
623
+ slots: { backdrop: ae },
629
624
  ...r,
630
- className: q.dialog,
625
+ className: se(z.dialog, r.className),
631
626
  "aria-labelledby": "alert-dialog-title",
632
627
  "aria-describedby": "alert-dialog-description",
633
- children: /* @__PURE__ */ $("section", { className: q.dialog__panel, children: [
634
- !!s && /* @__PURE__ */ S(re, { handleOnClose: s, className: q.dialog__close }),
635
- /* @__PURE__ */ S(se, { title: t, subTitle: o }),
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 }),
636
631
  e
637
632
  ] })
638
633
  }
639
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";
640
641
  export {
641
- $e as Actions,
642
- ze as Content,
643
- je as Dialog,
644
- se as DialogTitle,
645
- je as default
642
+ ie as Actions,
643
+ ce as Content,
644
+ K as Dialog,
645
+ ee as DialogTitle,
646
+ K as default
646
647
  };