@pismo/marola 2.1.63 → 2.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button-CJaBSdv1.js +135 -0
- package/dist/ClassNameConfigurator-CVRWfyIa.js +847 -0
- package/dist/{ClickAwayListener-Z08peX_P.js → ClickAwayListener-BnYMO5Ki.js} +26 -33
- package/dist/Popup-D267EI4e.js +1338 -0
- package/dist/{Portal-DJapUCn6.js → Portal-BrGvxB96.js} +32 -36
- package/dist/RadioOption-DyRY8xlF.js +1094 -0
- package/dist/{Toggle-DcZTfLrC.js → Toggle-nnDfpqI1.js} +31 -31
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/DropdownMenu.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/ToastCard.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/combineHooksSlotProps-j-8UVeYo.js +86 -0
- package/dist/components/Alert/Alert.stories.d.ts +6 -6
- package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +311 -320
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts +4 -4
- package/dist/components/BankingCard/BankingCard.d.ts +0 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +56 -56
- package/dist/components/Checkbox/Checkbox.stories.d.ts +8 -8
- package/dist/components/Chip/Chip.js +3 -3
- package/dist/components/DatePicker/DatePicker.js +742 -639
- package/dist/components/DatePicker/DatePicker.stories.d.ts +8 -8
- package/dist/components/DatePicker/dateUtils.d.ts +2 -2
- package/dist/components/DatePicker/dateUtils.js +1 -1
- package/dist/components/DatePicker/keyboardNavigation.d.ts +1 -1
- package/dist/components/DatePicker/renderCalendarDays.js +1 -1
- package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +372 -352
- package/dist/components/Dialog/Dialog.stories.d.ts +96 -135
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.d.ts +1 -1
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.js +2 -2
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.stories.d.ts +1 -1
- package/dist/components/DoubleInput/DoubleInput.stories.d.ts +1 -1
- package/dist/components/Draggable/Draggable.d.ts +0 -1
- package/dist/components/Draggable/Draggable.js +1 -1
- package/dist/components/Draggable/Draggable.stories.d.ts +2 -3
- package/dist/components/Draggable/useDraggable.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +39 -34
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +6 -4
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +4 -4
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.js +361 -340
- package/dist/components/Input/Input.stories.d.ts +2 -0
- package/dist/components/InputSearch/InputSearch.d.ts +31 -30
- package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -30
- package/dist/components/Popover/Popover.d.ts +3 -3
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/components/Popover/PopoverBody.d.ts +0 -1
- package/dist/components/Popover/PopoverFooter.d.ts +0 -1
- package/dist/components/Popover/PopoverHeader.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.js +684 -769
- package/dist/components/RadioButton/RadioOption.d.ts +0 -1
- package/dist/components/RadioButton/RadioOption.js +3 -3
- package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
- package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/Select/Select.js +625 -591
- package/dist/components/Skeleton/Skeleton.d.ts +0 -1
- package/dist/components/Snackbar/Snackbar.js +295 -239
- package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
- package/dist/components/Table/Table.stories.d.ts +5 -5
- package/dist/components/Tabs/Tab.js +107 -98
- package/dist/components/Tabs/TabPanel.js +58 -55
- package/dist/components/Tabs/Tabs.js +246 -231
- package/dist/components/ToastCard/ToastCard.js +31 -31
- package/dist/components/Toggle/Toggle.js +147 -137
- package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +266 -325
- package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
- package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
- package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
- package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
- package/dist/getReactElementRef-iorwYm2A.js +19 -0
- package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
- package/dist/isFocusVisible-CPZqtjv2.js +12 -0
- package/dist/main.js +2 -2
- package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
- package/dist/react-BTbo_5A3.js +526 -0
- package/dist/setRef-Bo0HEdBB.js +6 -0
- package/dist/useButton-C2E_LFJp.js +90 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/useId-CK6Kn3Tn.js +21 -0
- package/dist/useList-BLW78Lq7.js +446 -0
- package/dist/utils/draggable.d.ts +2 -2
- package/package.json +5 -4
- package/dist/Button-BrEDdtHO.js +0 -130
- package/dist/Popup-Dffqo7wT.js +0 -1246
- package/dist/RadioOption-DYovqiwF.js +0 -720
- package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
- package/dist/exactProp-SYjL19cU.js +0 -13
- package/dist/react-BvI-Sw9b.js +0 -509
- package/dist/useButton-CezPDte8.js +0 -105
- package/dist/useControlled-CCMYYdCM.js +0 -31
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-nqLfZem8.js +0 -435
- package/dist/useSlotProps-CYHDC4TN.js +0 -834
- package/dist/useTimeout-DxF9kiZL.js +0 -36
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { c as
|
|
1
|
+
import { jsxs as Y, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { forwardRef as ae } from "react";
|
|
4
|
+
import { c as ce } from "../../clsx-OuTLNxxd.js";
|
|
5
5
|
import le from "./Actions.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import ue from "./Backdrop.js";
|
|
7
|
+
import de from "./CloseIconButton.js";
|
|
8
|
+
import fe from "./Content.js";
|
|
9
9
|
import { s as z } from "../../Dialog.module-DWi17zjS.js";
|
|
10
10
|
import ee from "./DialogTitle.js";
|
|
11
|
-
import { u as te, P as
|
|
12
|
-
import { o as
|
|
11
|
+
import { u as te, P as a, e as pe, g as be, a as me, b as G, c as ge, d as he } from "../../ClassNameConfigurator-CVRWfyIa.js";
|
|
12
|
+
import { o as w, e as ne } from "../../ownerDocument-CU-LCrtd.js";
|
|
13
13
|
import { u as X } from "../../useEventCallback-BAQJJ3ye.js";
|
|
14
|
-
import { P as
|
|
15
|
-
import { e as
|
|
14
|
+
import { P as Ee, H as Te } from "../../Portal-BrGvxB96.js";
|
|
15
|
+
import { g as ye, e as Re } from "../../getReactElementRef-iorwYm2A.js";
|
|
16
16
|
function J(...e) {
|
|
17
|
-
return e.reduce((t,
|
|
18
|
-
t.apply(this, s),
|
|
17
|
+
return e.reduce((t, o) => o == null ? t : function(...s) {
|
|
18
|
+
t.apply(this, s), o.apply(this, s);
|
|
19
19
|
}, () => {
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
22
|
+
function q(e) {
|
|
23
|
+
return w(e).defaultView || window;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const t = e.documentElement.clientWidth;
|
|
27
|
-
return
|
|
25
|
+
function xe(e = window) {
|
|
26
|
+
const t = e.document.documentElement.clientWidth;
|
|
27
|
+
return e.innerWidth - t;
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
function
|
|
29
|
+
const Ne = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
|
|
30
|
+
function ke(e) {
|
|
31
31
|
const t = parseInt(e.getAttribute("tabindex") || "", 10);
|
|
32
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;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Pe(e) {
|
|
35
35
|
if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name)
|
|
36
36
|
return !1;
|
|
37
|
-
const t = (
|
|
38
|
-
let
|
|
39
|
-
return
|
|
37
|
+
const t = (n) => e.ownerDocument.querySelector(`input[type="radio"]${n}`);
|
|
38
|
+
let o = t(`[name="${e.name}"]:checked`);
|
|
39
|
+
return o || (o = t(`[name="${e.name}"]`)), o !== e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" ||
|
|
41
|
+
function Ce(e) {
|
|
42
|
+
return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Pe(e));
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const t = [],
|
|
46
|
-
return Array.from(e.querySelectorAll(
|
|
47
|
-
const r =
|
|
48
|
-
r === -1 || !
|
|
44
|
+
function ve(e) {
|
|
45
|
+
const t = [], o = [];
|
|
46
|
+
return Array.from(e.querySelectorAll(Ne)).forEach((n, s) => {
|
|
47
|
+
const r = ke(n);
|
|
48
|
+
r === -1 || !Ce(n) || (r === 0 ? t.push(n) : o.push({
|
|
49
49
|
documentOrder: s,
|
|
50
50
|
tabIndex: r,
|
|
51
|
-
node:
|
|
51
|
+
node: n
|
|
52
52
|
}));
|
|
53
|
-
}),
|
|
53
|
+
}), o.sort((n, s) => n.tabIndex === s.tabIndex ? n.documentOrder - s.documentOrder : n.tabIndex - s.tabIndex).map((n) => n.node).concat(t);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ie() {
|
|
56
56
|
return !0;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function V(e) {
|
|
59
59
|
const {
|
|
60
60
|
children: t,
|
|
61
|
-
disableAutoFocus:
|
|
62
|
-
disableEnforceFocus:
|
|
61
|
+
disableAutoFocus: o = !1,
|
|
62
|
+
disableEnforceFocus: n = !1,
|
|
63
63
|
disableRestoreFocus: s = !1,
|
|
64
|
-
getTabbable: r =
|
|
65
|
-
isEnabled: i =
|
|
66
|
-
open:
|
|
67
|
-
} = e,
|
|
68
|
-
|
|
69
|
-
!
|
|
70
|
-
}, [
|
|
71
|
-
if (!
|
|
64
|
+
getTabbable: r = ve,
|
|
65
|
+
isEnabled: i = Ie,
|
|
66
|
+
open: l
|
|
67
|
+
} = e, f = p.useRef(!1), T = p.useRef(null), m = p.useRef(null), h = p.useRef(null), y = p.useRef(null), E = p.useRef(!1), u = p.useRef(null), B = te(ye(t), u), A = p.useRef(null);
|
|
68
|
+
p.useEffect(() => {
|
|
69
|
+
!l || !u.current || (E.current = !o);
|
|
70
|
+
}, [o, l]), p.useEffect(() => {
|
|
71
|
+
if (!l || !u.current)
|
|
72
72
|
return;
|
|
73
|
-
const
|
|
74
|
-
return
|
|
75
|
-
`)),
|
|
76
|
-
s || (
|
|
73
|
+
const c = w(u.current);
|
|
74
|
+
return u.current.contains(c.activeElement) || (u.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(`
|
|
75
|
+
`)), u.current.setAttribute("tabIndex", "-1")), E.current && u.current.focus()), () => {
|
|
76
|
+
s || (h.current && h.current.focus && (f.current = !0, h.current.focus()), h.current = null);
|
|
77
77
|
};
|
|
78
|
-
}, [
|
|
79
|
-
if (!
|
|
78
|
+
}, [l]), p.useEffect(() => {
|
|
79
|
+
if (!l || !u.current)
|
|
80
80
|
return;
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
const c = w(u.current), k = (g) => {
|
|
82
|
+
A.current = g, !(n || !i() || g.key !== "Tab") && c.activeElement === u.current && g.shiftKey && (f.current = !0, m.current && m.current.focus());
|
|
83
|
+
}, R = () => {
|
|
84
|
+
var D, P;
|
|
85
|
+
const g = u.current;
|
|
86
|
+
if (g === null)
|
|
86
87
|
return;
|
|
87
|
-
if (!
|
|
88
|
-
|
|
88
|
+
if (!c.hasFocus() || !i() || f.current) {
|
|
89
|
+
f.current = !1;
|
|
89
90
|
return;
|
|
90
91
|
}
|
|
91
|
-
if (
|
|
92
|
+
if (g.contains(c.activeElement) || n && c.activeElement !== T.current && c.activeElement !== m.current)
|
|
92
93
|
return;
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
else if (
|
|
94
|
+
if (c.activeElement !== y.current)
|
|
95
|
+
y.current = null;
|
|
96
|
+
else if (y.current !== null)
|
|
96
97
|
return;
|
|
97
|
-
if (!
|
|
98
|
+
if (!E.current)
|
|
98
99
|
return;
|
|
99
|
-
let
|
|
100
|
-
if ((
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
typeof F != "string" && typeof H != "string" && (D ? H.focus() : F.focus());
|
|
100
|
+
let x = [];
|
|
101
|
+
if ((c.activeElement === T.current || c.activeElement === m.current) && (x = r(u.current)), x.length > 0) {
|
|
102
|
+
const K = !!((D = A.current) != null && D.shiftKey && ((P = A.current) == null ? void 0 : P.key) === "Tab"), M = x[0], L = x[x.length - 1];
|
|
103
|
+
typeof M != "string" && typeof L != "string" && (K ? L.focus() : M.focus());
|
|
104
104
|
} else
|
|
105
|
-
|
|
105
|
+
g.focus();
|
|
106
106
|
};
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
|
|
107
|
+
c.addEventListener("focusin", R), c.addEventListener("keydown", k, !0);
|
|
108
|
+
const O = setInterval(() => {
|
|
109
|
+
c.activeElement && c.activeElement.tagName === "BODY" && R();
|
|
110
110
|
}, 50);
|
|
111
111
|
return () => {
|
|
112
|
-
clearInterval(
|
|
112
|
+
clearInterval(O), c.removeEventListener("focusin", R), c.removeEventListener("keydown", k, !0);
|
|
113
113
|
};
|
|
114
|
-
}, [
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
|
|
114
|
+
}, [o, n, s, i, l, r]);
|
|
115
|
+
const v = (c) => {
|
|
116
|
+
h.current === null && (h.current = c.relatedTarget), E.current = !0, y.current = c.target;
|
|
117
|
+
const k = t.props.onFocus;
|
|
118
|
+
k && k(c);
|
|
119
|
+
}, I = (c) => {
|
|
120
|
+
h.current === null && (h.current = c.relatedTarget), E.current = !0;
|
|
121
121
|
};
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
children: [/* @__PURE__ */
|
|
124
|
-
tabIndex:
|
|
125
|
-
onFocus:
|
|
126
|
-
ref:
|
|
122
|
+
return /* @__PURE__ */ Y(p.Fragment, {
|
|
123
|
+
children: [/* @__PURE__ */ C("div", {
|
|
124
|
+
tabIndex: l ? 0 : -1,
|
|
125
|
+
onFocus: I,
|
|
126
|
+
ref: T,
|
|
127
127
|
"data-testid": "sentinelStart"
|
|
128
|
-
}), /* @__PURE__ */
|
|
129
|
-
ref:
|
|
130
|
-
onFocus:
|
|
131
|
-
}), /* @__PURE__ */
|
|
132
|
-
tabIndex:
|
|
133
|
-
onFocus:
|
|
134
|
-
ref:
|
|
128
|
+
}), /* @__PURE__ */ p.cloneElement(t, {
|
|
129
|
+
ref: B,
|
|
130
|
+
onFocus: v
|
|
131
|
+
}), /* @__PURE__ */ C("div", {
|
|
132
|
+
tabIndex: l ? 0 : -1,
|
|
133
|
+
onFocus: I,
|
|
134
|
+
ref: m,
|
|
135
135
|
"data-testid": "sentinelEnd"
|
|
136
136
|
})]
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
process.env.NODE_ENV !== "production" && (
|
|
139
|
+
process.env.NODE_ENV !== "production" && (V.propTypes = {
|
|
140
140
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
141
141
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
142
142
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -144,7 +144,7 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
|
144
144
|
/**
|
|
145
145
|
* A single child content element.
|
|
146
146
|
*/
|
|
147
|
-
children:
|
|
147
|
+
children: ne,
|
|
148
148
|
/**
|
|
149
149
|
* If `true`, the focus trap will not automatically shift focus to itself when it opens, and
|
|
150
150
|
* replace it to the last focused element when it closes.
|
|
@@ -154,7 +154,7 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
|
154
154
|
* accessible to assistive technologies, like screen readers.
|
|
155
155
|
* @default false
|
|
156
156
|
*/
|
|
157
|
-
disableAutoFocus:
|
|
157
|
+
disableAutoFocus: a.bool,
|
|
158
158
|
/**
|
|
159
159
|
* If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
|
|
160
160
|
*
|
|
@@ -162,19 +162,19 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
|
162
162
|
* accessible to assistive technologies, like screen readers.
|
|
163
163
|
* @default false
|
|
164
164
|
*/
|
|
165
|
-
disableEnforceFocus:
|
|
165
|
+
disableEnforceFocus: a.bool,
|
|
166
166
|
/**
|
|
167
167
|
* If `true`, the focus trap will not restore focus to previously focused element once
|
|
168
168
|
* focus trap is hidden or unmounted.
|
|
169
169
|
* @default false
|
|
170
170
|
*/
|
|
171
|
-
disableRestoreFocus:
|
|
171
|
+
disableRestoreFocus: a.bool,
|
|
172
172
|
/**
|
|
173
173
|
* Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
|
|
174
174
|
* For instance, you can provide the "tabbable" npm dependency.
|
|
175
175
|
* @param {HTMLElement} root
|
|
176
176
|
*/
|
|
177
|
-
getTabbable:
|
|
177
|
+
getTabbable: a.func,
|
|
178
178
|
/**
|
|
179
179
|
* This prop extends the `open` prop.
|
|
180
180
|
* It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
|
|
@@ -184,65 +184,65 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
|
184
184
|
* return true;
|
|
185
185
|
* }
|
|
186
186
|
*/
|
|
187
|
-
isEnabled:
|
|
187
|
+
isEnabled: a.func,
|
|
188
188
|
/**
|
|
189
189
|
* If `true`, focus is locked.
|
|
190
190
|
*/
|
|
191
|
-
open:
|
|
191
|
+
open: a.bool.isRequired
|
|
192
192
|
});
|
|
193
|
-
process.env.NODE_ENV !== "production" && (
|
|
194
|
-
function
|
|
195
|
-
const t =
|
|
196
|
-
return t.body === e ?
|
|
193
|
+
process.env.NODE_ENV !== "production" && (V.propTypes = Re(V.propTypes));
|
|
194
|
+
function Se(e) {
|
|
195
|
+
const t = w(e);
|
|
196
|
+
return t.body === e ? q(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
|
|
197
197
|
}
|
|
198
198
|
function U(e, t) {
|
|
199
199
|
t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
|
|
200
200
|
}
|
|
201
201
|
function Q(e) {
|
|
202
|
-
return parseInt(
|
|
202
|
+
return parseInt(q(e).getComputedStyle(e).paddingRight, 10) || 0;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
const
|
|
206
|
-
return
|
|
204
|
+
function we(e) {
|
|
205
|
+
const o = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].includes(e.tagName), n = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
|
|
206
|
+
return o || n;
|
|
207
207
|
}
|
|
208
|
-
function Z(e, t,
|
|
209
|
-
const r = [t,
|
|
208
|
+
function Z(e, t, o, n, s) {
|
|
209
|
+
const r = [t, o, ...n];
|
|
210
210
|
[].forEach.call(e.children, (i) => {
|
|
211
|
-
const
|
|
212
|
-
|
|
211
|
+
const l = !r.includes(i), f = !we(i);
|
|
212
|
+
l && f && U(i, s);
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
let
|
|
217
|
-
return e.some((
|
|
215
|
+
function $(e, t) {
|
|
216
|
+
let o = -1;
|
|
217
|
+
return e.some((n, s) => t(n) ? (o = s, !0) : !1), o;
|
|
218
218
|
}
|
|
219
219
|
function Fe(e, t) {
|
|
220
|
-
const
|
|
220
|
+
const o = [], n = e.container;
|
|
221
221
|
if (!t.disableScrollLock) {
|
|
222
|
-
if (
|
|
223
|
-
const i =
|
|
224
|
-
|
|
225
|
-
value:
|
|
222
|
+
if (Se(n)) {
|
|
223
|
+
const i = xe(q(n));
|
|
224
|
+
o.push({
|
|
225
|
+
value: n.style.paddingRight,
|
|
226
226
|
property: "padding-right",
|
|
227
|
-
el:
|
|
228
|
-
}),
|
|
229
|
-
const
|
|
230
|
-
[].forEach.call(
|
|
231
|
-
|
|
232
|
-
value:
|
|
227
|
+
el: n
|
|
228
|
+
}), n.style.paddingRight = `${Q(n) + i}px`;
|
|
229
|
+
const l = w(n).querySelectorAll(".mui-fixed");
|
|
230
|
+
[].forEach.call(l, (f) => {
|
|
231
|
+
o.push({
|
|
232
|
+
value: f.style.paddingRight,
|
|
233
233
|
property: "padding-right",
|
|
234
|
-
el:
|
|
235
|
-
}),
|
|
234
|
+
el: f
|
|
235
|
+
}), f.style.paddingRight = `${Q(f) + i}px`;
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
let r;
|
|
239
|
-
if (
|
|
240
|
-
r =
|
|
239
|
+
if (n.parentNode instanceof DocumentFragment)
|
|
240
|
+
r = w(n).body;
|
|
241
241
|
else {
|
|
242
|
-
const i =
|
|
243
|
-
r = (i == null ? void 0 : i.nodeName) === "HTML" &&
|
|
242
|
+
const i = n.parentElement, l = q(n);
|
|
243
|
+
r = (i == null ? void 0 : i.nodeName) === "HTML" && l.getComputedStyle(i).overflowY === "scroll" ? i : n;
|
|
244
244
|
}
|
|
245
|
-
|
|
245
|
+
o.push({
|
|
246
246
|
value: r.style.overflow,
|
|
247
247
|
property: "overflow",
|
|
248
248
|
el: r
|
|
@@ -257,244 +257,264 @@ function Fe(e, t) {
|
|
|
257
257
|
}), r.style.overflow = "hidden";
|
|
258
258
|
}
|
|
259
259
|
return () => {
|
|
260
|
-
|
|
260
|
+
o.forEach(({
|
|
261
261
|
value: r,
|
|
262
262
|
el: i,
|
|
263
|
-
property:
|
|
263
|
+
property: l
|
|
264
264
|
}) => {
|
|
265
|
-
r ? i.style.setProperty(
|
|
265
|
+
r ? i.style.setProperty(l, r) : i.style.removeProperty(l);
|
|
266
266
|
});
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Ae(e) {
|
|
270
270
|
const t = [];
|
|
271
|
-
return [].forEach.call(e.children, (
|
|
272
|
-
|
|
271
|
+
return [].forEach.call(e.children, (o) => {
|
|
272
|
+
o.getAttribute("aria-hidden") === "true" && t.push(o);
|
|
273
273
|
}), t;
|
|
274
274
|
}
|
|
275
|
-
class
|
|
275
|
+
class Oe {
|
|
276
276
|
constructor() {
|
|
277
|
-
this.
|
|
277
|
+
this.modals = [], this.containers = [];
|
|
278
278
|
}
|
|
279
|
-
add(t,
|
|
280
|
-
let
|
|
281
|
-
if (
|
|
282
|
-
return
|
|
283
|
-
|
|
284
|
-
const s =
|
|
285
|
-
Z(
|
|
286
|
-
const r =
|
|
287
|
-
return r !== -1 ? (this.containers[r].modals.push(t),
|
|
279
|
+
add(t, o) {
|
|
280
|
+
let n = this.modals.indexOf(t);
|
|
281
|
+
if (n !== -1)
|
|
282
|
+
return n;
|
|
283
|
+
n = this.modals.length, this.modals.push(t), t.modalRef && U(t.modalRef, !1);
|
|
284
|
+
const s = Ae(o);
|
|
285
|
+
Z(o, t.mount, t.modalRef, s, !0);
|
|
286
|
+
const r = $(this.containers, (i) => i.container === o);
|
|
287
|
+
return r !== -1 ? (this.containers[r].modals.push(t), n) : (this.containers.push({
|
|
288
288
|
modals: [t],
|
|
289
|
-
container:
|
|
289
|
+
container: o,
|
|
290
290
|
restore: null,
|
|
291
291
|
hiddenSiblings: s
|
|
292
|
-
}),
|
|
292
|
+
}), n);
|
|
293
293
|
}
|
|
294
|
-
mount(t,
|
|
295
|
-
const
|
|
296
|
-
s.restore || (s.restore = Fe(s,
|
|
294
|
+
mount(t, o) {
|
|
295
|
+
const n = $(this.containers, (r) => r.modals.includes(t)), s = this.containers[n];
|
|
296
|
+
s.restore || (s.restore = Fe(s, o));
|
|
297
297
|
}
|
|
298
|
-
remove(t,
|
|
299
|
-
const
|
|
300
|
-
if (
|
|
301
|
-
return
|
|
302
|
-
const s =
|
|
303
|
-
if (r.modals.splice(r.modals.indexOf(t), 1), this.modals.splice(
|
|
304
|
-
r.restore && r.restore(), t.modalRef && U(t.modalRef,
|
|
298
|
+
remove(t, o = !0) {
|
|
299
|
+
const n = this.modals.indexOf(t);
|
|
300
|
+
if (n === -1)
|
|
301
|
+
return n;
|
|
302
|
+
const s = $(this.containers, (i) => i.modals.includes(t)), r = this.containers[s];
|
|
303
|
+
if (r.modals.splice(r.modals.indexOf(t), 1), this.modals.splice(n, 1), r.modals.length === 0)
|
|
304
|
+
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);
|
|
305
305
|
else {
|
|
306
306
|
const i = r.modals[r.modals.length - 1];
|
|
307
307
|
i.modalRef && U(i.modalRef, !1);
|
|
308
308
|
}
|
|
309
|
-
return
|
|
309
|
+
return n;
|
|
310
310
|
}
|
|
311
311
|
isTopModal(t) {
|
|
312
312
|
return this.modals.length > 0 && this.modals[this.modals.length - 1] === t;
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function De(e) {
|
|
316
316
|
return typeof e == "function" ? e() : e;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Me(e) {
|
|
319
319
|
return e ? e.props.hasOwnProperty("in") : !1;
|
|
320
320
|
}
|
|
321
|
-
const
|
|
322
|
-
function
|
|
321
|
+
const Le = new Oe();
|
|
322
|
+
function Be(e) {
|
|
323
323
|
const {
|
|
324
324
|
container: t,
|
|
325
|
-
disableEscapeKeyDown:
|
|
326
|
-
disableScrollLock:
|
|
325
|
+
disableEscapeKeyDown: o = !1,
|
|
326
|
+
disableScrollLock: n = !1,
|
|
327
327
|
// @ts-ignore internal logic - Base UI supports the manager as a prop too
|
|
328
|
-
manager: s =
|
|
328
|
+
manager: s = Le,
|
|
329
329
|
closeAfterTransition: r = !1,
|
|
330
330
|
onTransitionEnter: i,
|
|
331
|
-
onTransitionExited:
|
|
332
|
-
children:
|
|
333
|
-
onClose:
|
|
334
|
-
open:
|
|
335
|
-
rootRef:
|
|
336
|
-
} = e,
|
|
337
|
-
let
|
|
338
|
-
(e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (
|
|
339
|
-
const
|
|
340
|
-
s.mount(
|
|
341
|
-
disableScrollLock:
|
|
342
|
-
}),
|
|
343
|
-
},
|
|
344
|
-
const b =
|
|
345
|
-
s.add(
|
|
346
|
-
}),
|
|
347
|
-
|
|
348
|
-
}),
|
|
349
|
-
s.remove(
|
|
350
|
-
}, [
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}, [
|
|
354
|
-
|
|
355
|
-
}, [
|
|
356
|
-
const
|
|
357
|
-
var
|
|
358
|
-
(
|
|
359
|
-
!
|
|
360
|
-
},
|
|
361
|
-
var
|
|
362
|
-
(
|
|
331
|
+
onTransitionExited: l,
|
|
332
|
+
children: f,
|
|
333
|
+
onClose: T,
|
|
334
|
+
open: m,
|
|
335
|
+
rootRef: h
|
|
336
|
+
} = e, y = p.useRef({}), E = p.useRef(null), u = p.useRef(null), B = te(u, h), [A, v] = p.useState(!m), I = Me(f);
|
|
337
|
+
let c = !0;
|
|
338
|
+
(e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (c = !1);
|
|
339
|
+
const k = () => w(E.current), R = () => (y.current.modalRef = u.current, y.current.mount = E.current, y.current), O = () => {
|
|
340
|
+
s.mount(R(), {
|
|
341
|
+
disableScrollLock: n
|
|
342
|
+
}), u.current && (u.current.scrollTop = 0);
|
|
343
|
+
}, g = X(() => {
|
|
344
|
+
const b = De(t) || k().body;
|
|
345
|
+
s.add(R(), b), u.current && O();
|
|
346
|
+
}), x = p.useCallback(() => s.isTopModal(R()), [s]), D = X((b) => {
|
|
347
|
+
E.current = b, b && (m && x() ? O() : u.current && U(u.current, c));
|
|
348
|
+
}), P = p.useCallback(() => {
|
|
349
|
+
s.remove(R(), c);
|
|
350
|
+
}, [c, s]);
|
|
351
|
+
p.useEffect(() => () => {
|
|
352
|
+
P();
|
|
353
|
+
}, [P]), p.useEffect(() => {
|
|
354
|
+
m ? g() : (!I || !r) && P();
|
|
355
|
+
}, [m, P, I, r, g]);
|
|
356
|
+
const K = (b) => (d) => {
|
|
357
|
+
var N;
|
|
358
|
+
(N = b.onKeyDown) == null || N.call(b, d), !(d.key !== "Escape" || d.which === 229 || // Wait until IME is settled.
|
|
359
|
+
!x()) && (o || (d.stopPropagation(), T && T(d, "escapeKeyDown")));
|
|
360
|
+
}, M = (b) => (d) => {
|
|
361
|
+
var N;
|
|
362
|
+
(N = b.onClick) == null || N.call(b, d), d.target === d.currentTarget && T && T(d, "backdropClick");
|
|
363
363
|
};
|
|
364
364
|
return {
|
|
365
365
|
getRootProps: (b = {}) => {
|
|
366
|
-
const
|
|
367
|
-
delete
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
366
|
+
const d = pe(e);
|
|
367
|
+
delete d.onTransitionEnter, delete d.onTransitionExited;
|
|
368
|
+
const N = {
|
|
369
|
+
...d,
|
|
370
|
+
...b
|
|
371
|
+
};
|
|
372
|
+
return {
|
|
373
|
+
/*
|
|
374
|
+
* Marking an element with the role presentation indicates to assistive technology
|
|
375
|
+
* that this element should be ignored; it exists to support the web application and
|
|
376
|
+
* is not meant for humans to interact with directly.
|
|
377
|
+
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
|
|
378
|
+
*/
|
|
379
|
+
role: "presentation",
|
|
380
|
+
...N,
|
|
381
|
+
onKeyDown: K(N),
|
|
382
|
+
ref: B
|
|
383
|
+
};
|
|
375
384
|
},
|
|
376
385
|
getBackdropProps: (b = {}) => {
|
|
377
|
-
const
|
|
378
|
-
return
|
|
379
|
-
"aria-hidden": !0
|
|
380
|
-
|
|
381
|
-
onClick:
|
|
382
|
-
open:
|
|
383
|
-
}
|
|
386
|
+
const d = b;
|
|
387
|
+
return {
|
|
388
|
+
"aria-hidden": !0,
|
|
389
|
+
...d,
|
|
390
|
+
onClick: M(d),
|
|
391
|
+
open: m
|
|
392
|
+
};
|
|
384
393
|
},
|
|
385
394
|
getTransitionProps: () => {
|
|
386
395
|
const b = () => {
|
|
387
|
-
|
|
388
|
-
},
|
|
389
|
-
|
|
396
|
+
v(!1), i && i();
|
|
397
|
+
}, d = () => {
|
|
398
|
+
v(!0), l && l(), r && P();
|
|
390
399
|
};
|
|
391
400
|
return {
|
|
392
|
-
onEnter: J(b,
|
|
393
|
-
onExited: J(
|
|
401
|
+
onEnter: J(b, f == null ? void 0 : f.props.onEnter),
|
|
402
|
+
onExited: J(d, f == null ? void 0 : f.props.onExited)
|
|
394
403
|
};
|
|
395
404
|
},
|
|
396
|
-
rootRef:
|
|
397
|
-
portalRef:
|
|
398
|
-
isTopModal:
|
|
399
|
-
exited:
|
|
400
|
-
hasTransition:
|
|
405
|
+
rootRef: B,
|
|
406
|
+
portalRef: D,
|
|
407
|
+
isTopModal: x,
|
|
408
|
+
exited: A,
|
|
409
|
+
hasTransition: I
|
|
401
410
|
};
|
|
402
411
|
}
|
|
403
|
-
const
|
|
404
|
-
function
|
|
405
|
-
return
|
|
412
|
+
const oe = "Modal";
|
|
413
|
+
function Ke(e) {
|
|
414
|
+
return be(oe, e);
|
|
406
415
|
}
|
|
407
|
-
|
|
408
|
-
const
|
|
416
|
+
me(oe, ["root", "hidden", "backdrop"]);
|
|
417
|
+
const Ue = (e) => {
|
|
409
418
|
const {
|
|
410
419
|
open: t,
|
|
411
|
-
exited:
|
|
420
|
+
exited: o
|
|
412
421
|
} = e;
|
|
413
|
-
return
|
|
414
|
-
root: ["root", !t &&
|
|
422
|
+
return ge({
|
|
423
|
+
root: ["root", !t && o && "hidden"],
|
|
415
424
|
backdrop: ["backdrop"]
|
|
416
|
-
},
|
|
417
|
-
}, re = /* @__PURE__ */
|
|
418
|
-
var o;
|
|
425
|
+
}, he(Ke));
|
|
426
|
+
}, re = /* @__PURE__ */ p.forwardRef(function(t, o) {
|
|
419
427
|
const {
|
|
420
|
-
children:
|
|
421
|
-
closeAfterTransition:
|
|
422
|
-
container:
|
|
423
|
-
disableAutoFocus:
|
|
424
|
-
disableEnforceFocus:
|
|
425
|
-
disableEscapeKeyDown:
|
|
426
|
-
disablePortal:
|
|
428
|
+
children: n,
|
|
429
|
+
closeAfterTransition: s = !1,
|
|
430
|
+
container: r,
|
|
431
|
+
disableAutoFocus: i = !1,
|
|
432
|
+
disableEnforceFocus: l = !1,
|
|
433
|
+
disableEscapeKeyDown: f = !1,
|
|
434
|
+
disablePortal: T = !1,
|
|
427
435
|
disableRestoreFocus: m = !1,
|
|
428
|
-
disableScrollLock:
|
|
429
|
-
hideBackdrop:
|
|
430
|
-
keepMounted:
|
|
431
|
-
onBackdropClick:
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
436
|
+
disableScrollLock: h = !1,
|
|
437
|
+
hideBackdrop: y = !1,
|
|
438
|
+
keepMounted: E = !1,
|
|
439
|
+
onBackdropClick: u,
|
|
440
|
+
onClose: B,
|
|
441
|
+
onKeyDown: A,
|
|
442
|
+
open: v,
|
|
443
|
+
onTransitionEnter: I,
|
|
444
|
+
onTransitionExited: c,
|
|
445
|
+
slotProps: k = {},
|
|
446
|
+
slots: R = {},
|
|
447
|
+
...O
|
|
448
|
+
} = t, g = {
|
|
449
|
+
...t,
|
|
450
|
+
closeAfterTransition: s,
|
|
451
|
+
disableAutoFocus: i,
|
|
452
|
+
disableEnforceFocus: l,
|
|
453
|
+
disableEscapeKeyDown: f,
|
|
454
|
+
disablePortal: T,
|
|
441
455
|
disableRestoreFocus: m,
|
|
442
|
-
disableScrollLock:
|
|
443
|
-
hideBackdrop:
|
|
444
|
-
keepMounted:
|
|
445
|
-
}
|
|
446
|
-
getRootProps:
|
|
447
|
-
getBackdropProps:
|
|
448
|
-
getTransitionProps:
|
|
449
|
-
portalRef:
|
|
450
|
-
isTopModal:
|
|
451
|
-
exited:
|
|
452
|
-
hasTransition:
|
|
453
|
-
} =
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
456
|
+
disableScrollLock: h,
|
|
457
|
+
hideBackdrop: y,
|
|
458
|
+
keepMounted: E
|
|
459
|
+
}, {
|
|
460
|
+
getRootProps: x,
|
|
461
|
+
getBackdropProps: D,
|
|
462
|
+
getTransitionProps: P,
|
|
463
|
+
portalRef: K,
|
|
464
|
+
isTopModal: M,
|
|
465
|
+
exited: L,
|
|
466
|
+
hasTransition: W
|
|
467
|
+
} = Be({
|
|
468
|
+
...g,
|
|
469
|
+
rootRef: o
|
|
470
|
+
}), _ = {
|
|
471
|
+
...g,
|
|
472
|
+
exited: L,
|
|
473
|
+
hasTransition: W
|
|
474
|
+
}, b = Ue(_), d = {};
|
|
475
|
+
if (n.props.tabIndex === void 0 && (d.tabIndex = "-1"), W) {
|
|
460
476
|
const {
|
|
461
|
-
onEnter:
|
|
462
|
-
onExited:
|
|
463
|
-
} =
|
|
464
|
-
|
|
477
|
+
onEnter: S,
|
|
478
|
+
onExited: j
|
|
479
|
+
} = P();
|
|
480
|
+
d.onEnter = S, d.onExited = j;
|
|
465
481
|
}
|
|
466
|
-
const
|
|
467
|
-
elementType:
|
|
468
|
-
externalSlotProps:
|
|
469
|
-
externalForwardedProps:
|
|
470
|
-
getSlotProps:
|
|
471
|
-
className:
|
|
472
|
-
ownerState:
|
|
473
|
-
}),
|
|
474
|
-
elementType:
|
|
475
|
-
externalSlotProps:
|
|
476
|
-
getSlotProps: (
|
|
477
|
-
|
|
478
|
-
|
|
482
|
+
const N = R.root ?? "div", se = G({
|
|
483
|
+
elementType: N,
|
|
484
|
+
externalSlotProps: k.root,
|
|
485
|
+
externalForwardedProps: O,
|
|
486
|
+
getSlotProps: x,
|
|
487
|
+
className: b.root,
|
|
488
|
+
ownerState: _
|
|
489
|
+
}), H = R.backdrop, ie = G({
|
|
490
|
+
elementType: H,
|
|
491
|
+
externalSlotProps: k.backdrop,
|
|
492
|
+
getSlotProps: (S) => D({
|
|
493
|
+
...S,
|
|
494
|
+
onClick: (j) => {
|
|
495
|
+
u && u(j), S != null && S.onClick && S.onClick(j);
|
|
479
496
|
}
|
|
480
|
-
})
|
|
481
|
-
className:
|
|
482
|
-
ownerState:
|
|
497
|
+
}),
|
|
498
|
+
className: b.backdrop,
|
|
499
|
+
ownerState: _
|
|
483
500
|
});
|
|
484
|
-
return !
|
|
485
|
-
ref:
|
|
486
|
-
container:
|
|
487
|
-
disablePortal:
|
|
488
|
-
children: /* @__PURE__ */
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
501
|
+
return !E && !v && (!W || L) ? null : /* @__PURE__ */ C(Ee, {
|
|
502
|
+
ref: K,
|
|
503
|
+
container: r,
|
|
504
|
+
disablePortal: T,
|
|
505
|
+
children: /* @__PURE__ */ Y(N, {
|
|
506
|
+
...se,
|
|
507
|
+
children: [!y && H ? /* @__PURE__ */ C(H, {
|
|
508
|
+
...ie
|
|
509
|
+
}) : null, /* @__PURE__ */ C(V, {
|
|
510
|
+
disableEnforceFocus: l,
|
|
511
|
+
disableAutoFocus: i,
|
|
492
512
|
disableRestoreFocus: m,
|
|
493
|
-
isEnabled:
|
|
494
|
-
open:
|
|
495
|
-
children: /* @__PURE__ */
|
|
513
|
+
isEnabled: M,
|
|
514
|
+
open: v,
|
|
515
|
+
children: /* @__PURE__ */ p.cloneElement(n, d)
|
|
496
516
|
})]
|
|
497
|
-
})
|
|
517
|
+
})
|
|
498
518
|
});
|
|
499
519
|
});
|
|
500
520
|
process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
@@ -505,12 +525,12 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
|
505
525
|
/**
|
|
506
526
|
* A single child content element.
|
|
507
527
|
*/
|
|
508
|
-
children:
|
|
528
|
+
children: ne.isRequired,
|
|
509
529
|
/**
|
|
510
530
|
* When set to true the Modal waits until a nested Transition is completed before closing.
|
|
511
531
|
* @default false
|
|
512
532
|
*/
|
|
513
|
-
closeAfterTransition:
|
|
533
|
+
closeAfterTransition: a.bool,
|
|
514
534
|
/**
|
|
515
535
|
* An HTML element or function that returns one.
|
|
516
536
|
* The `container` will have the portal children appended to it.
|
|
@@ -521,7 +541,7 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
|
521
541
|
* By default, it uses the body of the top-level document object,
|
|
522
542
|
* so it's simply `document.body` most of the time.
|
|
523
543
|
*/
|
|
524
|
-
container:
|
|
544
|
+
container: a.oneOfType([Te, a.func]),
|
|
525
545
|
/**
|
|
526
546
|
* If `true`, the modal will not automatically shift focus to itself when it opens, and
|
|
527
547
|
* replace it to the last focused element when it closes.
|
|
@@ -531,7 +551,7 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
|
531
551
|
* accessible to assistive technologies, like screen readers.
|
|
532
552
|
* @default false
|
|
533
553
|
*/
|
|
534
|
-
disableAutoFocus:
|
|
554
|
+
disableAutoFocus: a.bool,
|
|
535
555
|
/**
|
|
536
556
|
* If `true`, the modal will not prevent focus from leaving the modal while open.
|
|
537
557
|
*
|
|
@@ -539,45 +559,45 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
|
539
559
|
* accessible to assistive technologies, like screen readers.
|
|
540
560
|
* @default false
|
|
541
561
|
*/
|
|
542
|
-
disableEnforceFocus:
|
|
562
|
+
disableEnforceFocus: a.bool,
|
|
543
563
|
/**
|
|
544
564
|
* If `true`, hitting escape will not fire the `onClose` callback.
|
|
545
565
|
* @default false
|
|
546
566
|
*/
|
|
547
|
-
disableEscapeKeyDown:
|
|
567
|
+
disableEscapeKeyDown: a.bool,
|
|
548
568
|
/**
|
|
549
569
|
* The `children` will be under the DOM hierarchy of the parent component.
|
|
550
570
|
* @default false
|
|
551
571
|
*/
|
|
552
|
-
disablePortal:
|
|
572
|
+
disablePortal: a.bool,
|
|
553
573
|
/**
|
|
554
574
|
* If `true`, the modal will not restore focus to previously focused element once
|
|
555
575
|
* modal is hidden or unmounted.
|
|
556
576
|
* @default false
|
|
557
577
|
*/
|
|
558
|
-
disableRestoreFocus:
|
|
578
|
+
disableRestoreFocus: a.bool,
|
|
559
579
|
/**
|
|
560
580
|
* Disable the scroll lock behavior.
|
|
561
581
|
* @default false
|
|
562
582
|
*/
|
|
563
|
-
disableScrollLock:
|
|
583
|
+
disableScrollLock: a.bool,
|
|
564
584
|
/**
|
|
565
585
|
* If `true`, the backdrop is not rendered.
|
|
566
586
|
* @default false
|
|
567
587
|
*/
|
|
568
|
-
hideBackdrop:
|
|
588
|
+
hideBackdrop: a.bool,
|
|
569
589
|
/**
|
|
570
590
|
* Always keep the children in the DOM.
|
|
571
591
|
* This prop can be useful in SEO situation or
|
|
572
592
|
* when you want to maximize the responsiveness of the Modal.
|
|
573
593
|
* @default false
|
|
574
594
|
*/
|
|
575
|
-
keepMounted:
|
|
595
|
+
keepMounted: a.bool,
|
|
576
596
|
/**
|
|
577
597
|
* Callback fired when the backdrop is clicked.
|
|
578
598
|
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
|
579
599
|
*/
|
|
580
|
-
onBackdropClick:
|
|
600
|
+
onBackdropClick: a.func,
|
|
581
601
|
/**
|
|
582
602
|
* Callback fired when the component requests to be closed.
|
|
583
603
|
* The `reason` parameter can optionally be used to control the response to `onClose`.
|
|
@@ -585,71 +605,71 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
|
585
605
|
* @param {object} event The event source of the callback.
|
|
586
606
|
* @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
|
|
587
607
|
*/
|
|
588
|
-
onClose:
|
|
608
|
+
onClose: a.func,
|
|
589
609
|
/**
|
|
590
610
|
* A function called when a transition enters.
|
|
591
611
|
*/
|
|
592
|
-
onTransitionEnter:
|
|
612
|
+
onTransitionEnter: a.func,
|
|
593
613
|
/**
|
|
594
614
|
* A function called when a transition has exited.
|
|
595
615
|
*/
|
|
596
|
-
onTransitionExited:
|
|
616
|
+
onTransitionExited: a.func,
|
|
597
617
|
/**
|
|
598
618
|
* If `true`, the component is shown.
|
|
599
619
|
*/
|
|
600
|
-
open:
|
|
620
|
+
open: a.bool.isRequired,
|
|
601
621
|
/**
|
|
602
622
|
* The props used for each slot inside the Modal.
|
|
603
623
|
* @default {}
|
|
604
624
|
*/
|
|
605
|
-
slotProps:
|
|
606
|
-
backdrop:
|
|
607
|
-
root:
|
|
625
|
+
slotProps: a.shape({
|
|
626
|
+
backdrop: a.oneOfType([a.func, a.object]),
|
|
627
|
+
root: a.oneOfType([a.func, a.object])
|
|
608
628
|
}),
|
|
609
629
|
/**
|
|
610
630
|
* The components used for each slot inside the Modal.
|
|
611
631
|
* Either a string to use a HTML element or a component.
|
|
612
632
|
* @default {}
|
|
613
633
|
*/
|
|
614
|
-
slots:
|
|
615
|
-
backdrop:
|
|
616
|
-
root:
|
|
634
|
+
slots: a.shape({
|
|
635
|
+
backdrop: a.elementType,
|
|
636
|
+
root: a.elementType
|
|
617
637
|
})
|
|
618
638
|
});
|
|
619
|
-
const
|
|
620
|
-
const { children:
|
|
639
|
+
const F = ae((e, t) => {
|
|
640
|
+
const { children: o, dialogTitle: n, dialogSubtitle: s, icon: r, onClose: i = () => {
|
|
621
641
|
} } = e;
|
|
622
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ C(
|
|
623
643
|
re,
|
|
624
644
|
{
|
|
625
645
|
ref: t,
|
|
626
|
-
slots: { backdrop:
|
|
646
|
+
slots: { backdrop: ue },
|
|
627
647
|
...e,
|
|
628
|
-
onClose: (
|
|
629
|
-
i(
|
|
648
|
+
onClose: (l, f) => {
|
|
649
|
+
i(f);
|
|
630
650
|
},
|
|
631
|
-
className:
|
|
651
|
+
className: ce(z.dialog, e.className),
|
|
632
652
|
"aria-labelledby": "alert-dialog-title",
|
|
633
653
|
"aria-describedby": "alert-dialog-description",
|
|
634
|
-
children: /* @__PURE__ */
|
|
635
|
-
!!i && /* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
|
|
654
|
+
children: /* @__PURE__ */ Y("section", { className: z.dialog__panel, children: [
|
|
655
|
+
!!i && /* @__PURE__ */ C(de, { handleOnClose: () => i("closeButtonClick") }),
|
|
656
|
+
/* @__PURE__ */ C(ee, { title: n, subTitle: s, icon: r }),
|
|
657
|
+
o
|
|
638
658
|
] })
|
|
639
659
|
}
|
|
640
660
|
);
|
|
641
661
|
});
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
const
|
|
662
|
+
F.Title = ee;
|
|
663
|
+
F.Title.displayName = "Dialog.Title";
|
|
664
|
+
F.Content = fe;
|
|
665
|
+
F.Content.displayName = "Dialog.Content";
|
|
666
|
+
F.Actions = le;
|
|
667
|
+
F.Actions.displayName = "Dialog.Actions";
|
|
668
|
+
const et = F;
|
|
649
669
|
export {
|
|
650
670
|
le as Actions,
|
|
651
|
-
|
|
652
|
-
|
|
671
|
+
fe as Content,
|
|
672
|
+
et as Dialog,
|
|
653
673
|
ee as DialogTitle,
|
|
654
|
-
|
|
674
|
+
F as default
|
|
655
675
|
};
|