@uva-glass/component-library 1.37.1 → 1.39.0
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.module-DfLXeuUK.js +14 -0
- package/dist/Button.module-DfLXeuUK.js.map +1 -0
- package/dist/{MenuLink-DoSTuelN.js → MenuLink-CSnr2Az4.js} +6 -6
- package/dist/MenuLink-CSnr2Az4.js.map +1 -0
- package/dist/{MultiSelect-Drcfmp0z.js → MultiSelect-Blc_VDxu.js} +2 -2
- package/dist/{MultiSelect-Drcfmp0z.js.map → MultiSelect-Blc_VDxu.js.map} +1 -1
- package/dist/MultiSelectItem-CPf7drsR.js +24 -0
- package/dist/MultiSelectItem-CPf7drsR.js.map +1 -0
- package/dist/assets/ActionList.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Container.css +1 -1
- package/dist/assets/CourseCard.css +1 -0
- package/dist/assets/CourseCardHeader.css +1 -0
- package/dist/assets/CourseCardOffering.css +1 -0
- package/dist/assets/MultiSelectItem.css +1 -1
- package/dist/assets/Periods.css +1 -0
- package/dist/assets/StatusPill.css +1 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +2 -2
- package/dist/components/ActionList/ActionList.d.ts +12 -0
- package/dist/components/ActionList/ActionList.js +76 -0
- package/dist/components/ActionList/ActionList.js.map +1 -0
- package/dist/components/ActionList/ActionList.stories.d.ts +6 -0
- package/dist/components/ActionList/ActionList.stories.js +29 -0
- package/dist/components/ActionList/ActionList.stories.js.map +1 -0
- package/dist/components/ActionList/index.d.ts +1 -0
- package/dist/components/ActionList/index.js +5 -0
- package/dist/components/ActionList/index.js.map +1 -0
- package/dist/components/AppStatusBar/AppStatusBar.stories.d.ts +1 -1
- package/dist/components/Attention/Attention.stories.d.ts +1 -1
- package/dist/components/Backdrop/Backdrop.stories.d.ts +1 -1
- package/dist/components/Button/Button.js +14 -21
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.stories.d.ts +2 -2
- package/dist/components/Button/Button.stories.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +1 -1
- package/dist/components/Card/Card.stories.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/CourseCard/CourseCard.d.ts +33 -0
- package/dist/components/CourseCard/CourseCard.js +50 -0
- package/dist/components/CourseCard/CourseCard.js.map +1 -0
- package/dist/components/CourseCard/CourseCard.stories.d.ts +7 -0
- package/dist/components/CourseCard/CourseCard.stories.js +461 -0
- package/dist/components/CourseCard/CourseCard.stories.js.map +1 -0
- package/dist/components/CourseCard/CourseCardHeader/CourseCardHeader.d.ts +13 -0
- package/dist/components/CourseCard/CourseCardHeader/CourseCardHeader.js +39 -0
- package/dist/components/CourseCard/CourseCardHeader/CourseCardHeader.js.map +1 -0
- package/dist/components/CourseCard/CourseCardHeader/index.d.ts +1 -0
- package/dist/components/CourseCard/CourseCardHeader/index.js +5 -0
- package/dist/components/CourseCard/CourseCardHeader/index.js.map +1 -0
- package/dist/components/CourseCard/CourseCardOffering/CourseCardOffering.d.ts +8 -0
- package/dist/components/CourseCard/CourseCardOffering/CourseCardOffering.js +24 -0
- package/dist/components/CourseCard/CourseCardOffering/CourseCardOffering.js.map +1 -0
- package/dist/components/CourseCard/CourseCardOffering/index.d.ts +1 -0
- package/dist/components/CourseCard/CourseCardOffering/index.js +5 -0
- package/dist/components/CourseCard/CourseCardOffering/index.js.map +1 -0
- package/dist/components/CourseCard/index.d.ts +1 -0
- package/dist/components/CourseCard/index.js +5 -0
- package/dist/components/CourseCard/index.js.map +1 -0
- package/dist/components/CourseCard/mockdata.d.ts +23 -0
- package/dist/components/Drawer/Drawer.js +1 -1
- package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/components/Drawer/Drawer.stories.js +2 -2
- package/dist/components/FieldHint/FieldHint.stories.d.ts +2 -2
- package/dist/components/Fieldset/Fieldset.stories.d.ts +2 -2
- package/dist/components/FormField/FormField.stories.d.ts +1 -1
- package/dist/components/GridRow/GridRow.stories.d.ts +2 -2
- package/dist/components/HorizontalList/HorizontalList.stories.d.ts +1 -1
- package/dist/components/Icon/Icon.stories.d.ts +1 -1
- package/dist/components/Icon/icons/index.d.ts +6 -0
- package/dist/components/Icon/icons/index.js +40 -38
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InfoMessage/InfoMessage.stories.d.ts +1 -1
- package/dist/components/Input/Input.stories.d.ts +4 -4
- package/dist/components/InputField/InputField.stories.d.ts +3 -3
- package/dist/components/InputField/InputField.stories.js +2 -2
- package/dist/components/Label/Label.stories.d.ts +2 -2
- package/dist/components/MenuButton/MenuButton.d.ts +13 -0
- package/dist/components/MenuButton/MenuButton.js +621 -0
- package/dist/components/MenuButton/MenuButton.js.map +1 -0
- package/dist/components/MenuButton/MenuButton.stories.d.ts +8 -0
- package/dist/components/MenuButton/MenuButton.stories.js +58 -0
- package/dist/components/MenuButton/MenuButton.stories.js.map +1 -0
- package/dist/components/MenuButton/index.d.ts +1 -0
- package/dist/components/MenuButton/index.js +5 -0
- package/dist/components/MenuButton/index.js.map +1 -0
- package/dist/components/MenuLink/MenuLink.js +1 -1
- package/dist/components/MenuLink/MenuLink.stories.d.ts +1 -1
- package/dist/components/MenuLink/MenuLink.stories.js +1 -1
- package/dist/components/MenuLink/index.js +1 -1
- package/dist/components/MetaDataList/MetaDataList.stories.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.d.ts +2 -2
- package/dist/components/ModalDialog/ModalDialog.stories.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +3 -3
- package/dist/components/MultiSelect/MultiSelect.stories.js +25 -24
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectItem.d.ts +2 -1
- package/dist/components/MultiSelect/components/MultiSelectItem.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.d.ts +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/Periods/Periods.d.ts +13 -0
- package/dist/components/Periods/Periods.js +35 -0
- package/dist/components/Periods/Periods.js.map +1 -0
- package/dist/components/Periods/Periods.stories.d.ts +6 -0
- package/dist/components/Periods/Periods.stories.js +54 -0
- package/dist/components/Periods/Periods.stories.js.map +1 -0
- package/dist/components/Periods/index.d.ts +1 -0
- package/dist/components/Periods/index.js +5 -0
- package/dist/components/Periods/index.js.map +1 -0
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.d.ts +3 -3
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RadioButton/RadioButton.stories.d.ts +1 -1
- package/dist/components/Repeater/Repeater.stories.d.ts +1 -1
- package/dist/components/SectionNotification/SectionNotification.stories.d.ts +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.d.ts +2 -2
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
- package/dist/components/StatusPill/StatusPill.d.ts +1 -1
- package/dist/components/StatusPill/StatusPill.js +8 -7
- package/dist/components/StatusPill/StatusPill.js.map +1 -1
- package/dist/components/StatusPill/StatusPill.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +73 -65
- package/dist/components/index.js.map +1 -1
- package/dist/components/storyComponents/Container/Container.js +12 -12
- package/dist/focusSafely-b94Glb9J.js +402 -0
- package/dist/focusSafely-b94Glb9J.js.map +1 -0
- package/dist/index-0Faxlks_.js +25525 -0
- package/dist/index-0Faxlks_.js.map +1 -0
- package/dist/{index-BNwc4sai.js → index-HuvfQN5H.js} +427 -425
- package/dist/{index-BNwc4sai.js.map → index-HuvfQN5H.js.map} +1 -1
- package/dist/index.js +73 -65
- package/dist/index.js.map +1 -1
- package/dist/types/UserInterface.d.ts +4 -0
- package/dist/types/UserInterface.js +2 -0
- package/dist/types/UserInterface.js.map +1 -0
- package/dist/useDialog-DZhIlo2a.js +785 -0
- package/dist/useDialog-DZhIlo2a.js.map +1 -0
- package/package.json +30 -27
- package/dist/MenuLink-DoSTuelN.js.map +0 -1
- package/dist/MultiSelectItem-CwKowz2B.js +0 -24
- package/dist/MultiSelectItem-CwKowz2B.js.map +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +0 -1
- package/dist/index-Do6xof80.js +0 -14702
- package/dist/index-Do6xof80.js.map +0 -1
- package/dist/useDialog-D4QXqVAd.js +0 -1133
- package/dist/useDialog-D4QXqVAd.js.map +0 -1
|
@@ -1,1133 +0,0 @@
|
|
|
1
|
-
import p, { useRef as g, useCallback as F, useState as Y, useContext as L, useEffect as P, useMemo as B } from "react";
|
|
2
|
-
import { $ as Ne } from "./index-BNwc4sai.js";
|
|
3
|
-
const h = typeof document < "u" ? p.useLayoutEffect : () => {
|
|
4
|
-
};
|
|
5
|
-
function A(e) {
|
|
6
|
-
const t = g(null);
|
|
7
|
-
return h(() => {
|
|
8
|
-
t.current = e;
|
|
9
|
-
}, [
|
|
10
|
-
e
|
|
11
|
-
]), F((...n) => {
|
|
12
|
-
const r = t.current;
|
|
13
|
-
return r == null ? void 0 : r(...n);
|
|
14
|
-
}, []);
|
|
15
|
-
}
|
|
16
|
-
function Me(e) {
|
|
17
|
-
let [t, n] = Y(e), r = g(null), o = A(() => {
|
|
18
|
-
if (!r.current) return;
|
|
19
|
-
let i = r.current.next();
|
|
20
|
-
if (i.done) {
|
|
21
|
-
r.current = null;
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
t === i.value ? o() : n(i.value);
|
|
25
|
-
});
|
|
26
|
-
h(() => {
|
|
27
|
-
r.current && o();
|
|
28
|
-
});
|
|
29
|
-
let a = A((i) => {
|
|
30
|
-
r.current = i(t), o();
|
|
31
|
-
});
|
|
32
|
-
return [
|
|
33
|
-
t,
|
|
34
|
-
a
|
|
35
|
-
];
|
|
36
|
-
}
|
|
37
|
-
const V = {
|
|
38
|
-
prefix: String(Math.round(Math.random() * 1e10)),
|
|
39
|
-
current: 0
|
|
40
|
-
}, me = /* @__PURE__ */ p.createContext(V), Pe = /* @__PURE__ */ p.createContext(!1);
|
|
41
|
-
let Ce = !!(typeof window < "u" && window.document && window.document.createElement), Q = /* @__PURE__ */ new WeakMap();
|
|
42
|
-
function De(e = !1) {
|
|
43
|
-
let t = L(me), n = g(null);
|
|
44
|
-
if (n.current === null && !e) {
|
|
45
|
-
var r, o;
|
|
46
|
-
let a = (o = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || o === void 0 || (r = o.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
|
|
47
|
-
if (a) {
|
|
48
|
-
let i = Q.get(a);
|
|
49
|
-
i == null ? Q.set(a, {
|
|
50
|
-
id: t.current,
|
|
51
|
-
state: a.memoizedState
|
|
52
|
-
}) : a.memoizedState !== i.state && (t.current = i.id, Q.delete(a));
|
|
53
|
-
}
|
|
54
|
-
n.current = ++t.current;
|
|
55
|
-
}
|
|
56
|
-
return n.current;
|
|
57
|
-
}
|
|
58
|
-
function Fe(e) {
|
|
59
|
-
let t = L(me);
|
|
60
|
-
t === V && !Ce && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
61
|
-
let n = De(!!e), r = t === V && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
|
|
62
|
-
return e || `${r}-${n}`;
|
|
63
|
-
}
|
|
64
|
-
function ke(e) {
|
|
65
|
-
let t = p.useId(), [n] = Y(he()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${V.prefix}`;
|
|
66
|
-
return e || `${r}-${t}`;
|
|
67
|
-
}
|
|
68
|
-
const Oe = typeof p.useId == "function" ? ke : Fe;
|
|
69
|
-
function We() {
|
|
70
|
-
return !1;
|
|
71
|
-
}
|
|
72
|
-
function Ae() {
|
|
73
|
-
return !0;
|
|
74
|
-
}
|
|
75
|
-
function Ie(e) {
|
|
76
|
-
return () => {
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function he() {
|
|
80
|
-
return typeof p.useSyncExternalStore == "function" ? p.useSyncExternalStore(Ie, We, Ae) : L(Pe);
|
|
81
|
-
}
|
|
82
|
-
let He = !!(typeof window < "u" && window.document && window.document.createElement), ce = /* @__PURE__ */ new Map();
|
|
83
|
-
function Ke(e) {
|
|
84
|
-
let [t, n] = Y(e), r = g(null), o = Oe(t), a = F((i) => {
|
|
85
|
-
r.current = i;
|
|
86
|
-
}, []);
|
|
87
|
-
return He && ce.set(o, a), h(() => {
|
|
88
|
-
let i = o;
|
|
89
|
-
return () => {
|
|
90
|
-
ce.delete(i);
|
|
91
|
-
};
|
|
92
|
-
}, [
|
|
93
|
-
o
|
|
94
|
-
]), P(() => {
|
|
95
|
-
let i = r.current;
|
|
96
|
-
i && (r.current = null, n(i));
|
|
97
|
-
}), o;
|
|
98
|
-
}
|
|
99
|
-
function Re(e = []) {
|
|
100
|
-
let t = Ke(), [n, r] = Me(t), o = F(() => {
|
|
101
|
-
r(function* () {
|
|
102
|
-
yield t, yield document.getElementById(t) ? t : void 0;
|
|
103
|
-
});
|
|
104
|
-
}, [
|
|
105
|
-
t,
|
|
106
|
-
r
|
|
107
|
-
]);
|
|
108
|
-
return h(o, [
|
|
109
|
-
t,
|
|
110
|
-
o,
|
|
111
|
-
...e
|
|
112
|
-
]), n;
|
|
113
|
-
}
|
|
114
|
-
function ee(...e) {
|
|
115
|
-
return (...t) => {
|
|
116
|
-
for (let n of e) typeof n == "function" && n(...t);
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
const E = (e) => {
|
|
120
|
-
var t;
|
|
121
|
-
return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
|
|
122
|
-
}, j = (e) => e && "window" in e && e.window === e ? e : E(e).defaultView || window, Be = /* @__PURE__ */ new Set([
|
|
123
|
-
"id"
|
|
124
|
-
]), Ve = /* @__PURE__ */ new Set([
|
|
125
|
-
"aria-label",
|
|
126
|
-
"aria-labelledby",
|
|
127
|
-
"aria-describedby",
|
|
128
|
-
"aria-details"
|
|
129
|
-
]), je = /* @__PURE__ */ new Set([
|
|
130
|
-
"href",
|
|
131
|
-
"hrefLang",
|
|
132
|
-
"target",
|
|
133
|
-
"rel",
|
|
134
|
-
"download",
|
|
135
|
-
"ping",
|
|
136
|
-
"referrerPolicy"
|
|
137
|
-
]), ze = /^(data-.*)$/;
|
|
138
|
-
function qe(e, t = {}) {
|
|
139
|
-
let { labelable: n, isLink: r, propNames: o } = t, a = {};
|
|
140
|
-
for (const i in e) Object.prototype.hasOwnProperty.call(e, i) && (Be.has(i) || n && Ve.has(i) || r && je.has(i) || o != null && o.has(i) || ze.test(i)) && (a[i] = e[i]);
|
|
141
|
-
return a;
|
|
142
|
-
}
|
|
143
|
-
function de(e) {
|
|
144
|
-
if (Ge()) e.focus({
|
|
145
|
-
preventScroll: !0
|
|
146
|
-
});
|
|
147
|
-
else {
|
|
148
|
-
let t = Ue(e);
|
|
149
|
-
e.focus(), Xe(t);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
let H = null;
|
|
153
|
-
function Ge() {
|
|
154
|
-
if (H == null) {
|
|
155
|
-
H = !1;
|
|
156
|
-
try {
|
|
157
|
-
document.createElement("div").focus({
|
|
158
|
-
get preventScroll() {
|
|
159
|
-
return H = !0, !0;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
} catch {
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return H;
|
|
166
|
-
}
|
|
167
|
-
function Ue(e) {
|
|
168
|
-
let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
|
|
169
|
-
for (; t instanceof HTMLElement && t !== r; )
|
|
170
|
-
(t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
|
|
171
|
-
element: t,
|
|
172
|
-
scrollTop: t.scrollTop,
|
|
173
|
-
scrollLeft: t.scrollLeft
|
|
174
|
-
}), t = t.parentNode;
|
|
175
|
-
return r instanceof HTMLElement && n.push({
|
|
176
|
-
element: r,
|
|
177
|
-
scrollTop: r.scrollTop,
|
|
178
|
-
scrollLeft: r.scrollLeft
|
|
179
|
-
}), n;
|
|
180
|
-
}
|
|
181
|
-
function Xe(e) {
|
|
182
|
-
for (let { element: t, scrollTop: n, scrollLeft: r } of e)
|
|
183
|
-
t.scrollTop = n, t.scrollLeft = r;
|
|
184
|
-
}
|
|
185
|
-
function Ye(e) {
|
|
186
|
-
var t;
|
|
187
|
-
return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((n) => e.test(n.brand))) || e.test(window.navigator.userAgent);
|
|
188
|
-
}
|
|
189
|
-
function ie(e) {
|
|
190
|
-
var t;
|
|
191
|
-
return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
|
|
192
|
-
}
|
|
193
|
-
function Ee() {
|
|
194
|
-
return ie(/^Mac/i);
|
|
195
|
-
}
|
|
196
|
-
function Je() {
|
|
197
|
-
return ie(/^iPhone/i);
|
|
198
|
-
}
|
|
199
|
-
function Qe() {
|
|
200
|
-
return ie(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
201
|
-
Ee() && navigator.maxTouchPoints > 1;
|
|
202
|
-
}
|
|
203
|
-
function Ze() {
|
|
204
|
-
return Je() || Qe();
|
|
205
|
-
}
|
|
206
|
-
function _e() {
|
|
207
|
-
return Ye(/Android/i);
|
|
208
|
-
}
|
|
209
|
-
let C = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Set();
|
|
210
|
-
function se() {
|
|
211
|
-
if (typeof window > "u") return;
|
|
212
|
-
function e(r) {
|
|
213
|
-
return "propertyName" in r;
|
|
214
|
-
}
|
|
215
|
-
let t = (r) => {
|
|
216
|
-
if (!e(r) || !r.target) return;
|
|
217
|
-
let o = C.get(r.target);
|
|
218
|
-
o || (o = /* @__PURE__ */ new Set(), C.set(r.target, o), r.target.addEventListener("transitioncancel", n, {
|
|
219
|
-
once: !0
|
|
220
|
-
})), o.add(r.propertyName);
|
|
221
|
-
}, n = (r) => {
|
|
222
|
-
if (!e(r) || !r.target) return;
|
|
223
|
-
let o = C.get(r.target);
|
|
224
|
-
if (o && (o.delete(r.propertyName), o.size === 0 && (r.target.removeEventListener("transitioncancel", n), C.delete(r.target)), C.size === 0)) {
|
|
225
|
-
for (let a of te) a();
|
|
226
|
-
te.clear();
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", n);
|
|
230
|
-
}
|
|
231
|
-
typeof document < "u" && (document.readyState !== "loading" ? se() : document.addEventListener("DOMContentLoaded", se));
|
|
232
|
-
function et(e) {
|
|
233
|
-
requestAnimationFrame(() => {
|
|
234
|
-
C.size === 0 ? e() : te.add(e);
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
function fe(e, t) {
|
|
238
|
-
let n = window.getComputedStyle(e), r = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
|
|
239
|
-
return r && t && (r = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), r;
|
|
240
|
-
}
|
|
241
|
-
function we(e, t) {
|
|
242
|
-
let n = e;
|
|
243
|
-
for (fe(n, t) && (n = n.parentElement); n && !fe(n, t); ) n = n.parentElement;
|
|
244
|
-
return n || document.scrollingElement || document.documentElement;
|
|
245
|
-
}
|
|
246
|
-
function tt(e) {
|
|
247
|
-
return e.mozInputSource === 0 && e.isTrusted ? !0 : _e() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
248
|
-
}
|
|
249
|
-
class nt {
|
|
250
|
-
isDefaultPrevented() {
|
|
251
|
-
return this.nativeEvent.defaultPrevented;
|
|
252
|
-
}
|
|
253
|
-
preventDefault() {
|
|
254
|
-
this.defaultPrevented = !0, this.nativeEvent.preventDefault();
|
|
255
|
-
}
|
|
256
|
-
stopPropagation() {
|
|
257
|
-
this.nativeEvent.stopPropagation(), this.isPropagationStopped = () => !0;
|
|
258
|
-
}
|
|
259
|
-
isPropagationStopped() {
|
|
260
|
-
return !1;
|
|
261
|
-
}
|
|
262
|
-
persist() {
|
|
263
|
-
}
|
|
264
|
-
constructor(t, n) {
|
|
265
|
-
this.nativeEvent = n, this.target = n.target, this.currentTarget = n.currentTarget, this.relatedTarget = n.relatedTarget, this.bubbles = n.bubbles, this.cancelable = n.cancelable, this.defaultPrevented = n.defaultPrevented, this.eventPhase = n.eventPhase, this.isTrusted = n.isTrusted, this.timeStamp = n.timeStamp, this.type = t;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
function rt(e) {
|
|
269
|
-
let t = g({
|
|
270
|
-
isFocused: !1,
|
|
271
|
-
observer: null
|
|
272
|
-
});
|
|
273
|
-
h(() => {
|
|
274
|
-
const r = t.current;
|
|
275
|
-
return () => {
|
|
276
|
-
r.observer && (r.observer.disconnect(), r.observer = null);
|
|
277
|
-
};
|
|
278
|
-
}, []);
|
|
279
|
-
let n = A((r) => {
|
|
280
|
-
e == null || e(r);
|
|
281
|
-
});
|
|
282
|
-
return F((r) => {
|
|
283
|
-
if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
|
|
284
|
-
t.current.isFocused = !0;
|
|
285
|
-
let o = r.target, a = (i) => {
|
|
286
|
-
t.current.isFocused = !1, o.disabled && n(new nt("blur", i)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
|
287
|
-
};
|
|
288
|
-
o.addEventListener("focusout", a, {
|
|
289
|
-
once: !0
|
|
290
|
-
}), t.current.observer = new MutationObserver(() => {
|
|
291
|
-
if (t.current.isFocused && o.disabled) {
|
|
292
|
-
var i;
|
|
293
|
-
(i = t.current.observer) === null || i === void 0 || i.disconnect();
|
|
294
|
-
let l = o === document.activeElement ? null : document.activeElement;
|
|
295
|
-
o.dispatchEvent(new FocusEvent("blur", {
|
|
296
|
-
relatedTarget: l
|
|
297
|
-
})), o.dispatchEvent(new FocusEvent("focusout", {
|
|
298
|
-
bubbles: !0,
|
|
299
|
-
relatedTarget: l
|
|
300
|
-
}));
|
|
301
|
-
}
|
|
302
|
-
}), t.current.observer.observe(o, {
|
|
303
|
-
attributes: !0,
|
|
304
|
-
attributeFilter: [
|
|
305
|
-
"disabled"
|
|
306
|
-
]
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
}, [
|
|
310
|
-
n
|
|
311
|
-
]);
|
|
312
|
-
}
|
|
313
|
-
let I = null, ot = /* @__PURE__ */ new Set(), W = /* @__PURE__ */ new Map(), M = !1, ne = !1;
|
|
314
|
-
function ae(e, t) {
|
|
315
|
-
for (let n of ot) n(e, t);
|
|
316
|
-
}
|
|
317
|
-
function it(e) {
|
|
318
|
-
return !(e.metaKey || !Ee() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
319
|
-
}
|
|
320
|
-
function z(e) {
|
|
321
|
-
M = !0, it(e) && (I = "keyboard", ae("keyboard", e));
|
|
322
|
-
}
|
|
323
|
-
function y(e) {
|
|
324
|
-
I = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (M = !0, ae("pointer", e));
|
|
325
|
-
}
|
|
326
|
-
function ge(e) {
|
|
327
|
-
tt(e) && (M = !0, I = "virtual");
|
|
328
|
-
}
|
|
329
|
-
function ye(e) {
|
|
330
|
-
e.target === window || e.target === document || (!M && !ne && (I = "virtual", ae("virtual", e)), M = !1, ne = !1);
|
|
331
|
-
}
|
|
332
|
-
function Te() {
|
|
333
|
-
M = !1, ne = !0;
|
|
334
|
-
}
|
|
335
|
-
function ve(e) {
|
|
336
|
-
if (typeof window > "u" || W.get(j(e))) return;
|
|
337
|
-
const t = j(e), n = E(e);
|
|
338
|
-
let r = t.HTMLElement.prototype.focus;
|
|
339
|
-
t.HTMLElement.prototype.focus = function() {
|
|
340
|
-
M = !0, r.apply(this, arguments);
|
|
341
|
-
}, n.addEventListener("keydown", z, !0), n.addEventListener("keyup", z, !0), n.addEventListener("click", ge, !0), t.addEventListener("focus", ye, !0), t.addEventListener("blur", Te, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", y, !0), n.addEventListener("pointermove", y, !0), n.addEventListener("pointerup", y, !0)) : (n.addEventListener("mousedown", y, !0), n.addEventListener("mousemove", y, !0), n.addEventListener("mouseup", y, !0)), t.addEventListener("beforeunload", () => {
|
|
342
|
-
xe(e);
|
|
343
|
-
}, {
|
|
344
|
-
once: !0
|
|
345
|
-
}), W.set(t, {
|
|
346
|
-
focus: r
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
const xe = (e, t) => {
|
|
350
|
-
const n = j(e), r = E(e);
|
|
351
|
-
t && r.removeEventListener("DOMContentLoaded", t), W.has(n) && (n.HTMLElement.prototype.focus = W.get(n).focus, r.removeEventListener("keydown", z, !0), r.removeEventListener("keyup", z, !0), r.removeEventListener("click", ge, !0), n.removeEventListener("focus", ye, !0), n.removeEventListener("blur", Te, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", y, !0), r.removeEventListener("pointermove", y, !0), r.removeEventListener("pointerup", y, !0)) : (r.removeEventListener("mousedown", y, !0), r.removeEventListener("mousemove", y, !0), r.removeEventListener("mouseup", y, !0)), W.delete(n));
|
|
352
|
-
};
|
|
353
|
-
function at(e) {
|
|
354
|
-
const t = E(e);
|
|
355
|
-
let n;
|
|
356
|
-
return t.readyState !== "loading" ? ve(e) : (n = () => {
|
|
357
|
-
ve(e);
|
|
358
|
-
}, t.addEventListener("DOMContentLoaded", n)), () => xe(e, n);
|
|
359
|
-
}
|
|
360
|
-
typeof document < "u" && at();
|
|
361
|
-
function lt() {
|
|
362
|
-
return I;
|
|
363
|
-
}
|
|
364
|
-
function ut(e) {
|
|
365
|
-
let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, a = g({
|
|
366
|
-
isFocusWithin: !1
|
|
367
|
-
}), i = F((u) => {
|
|
368
|
-
a.current.isFocusWithin && !u.currentTarget.contains(u.relatedTarget) && (a.current.isFocusWithin = !1, n && n(u), o && o(!1));
|
|
369
|
-
}, [
|
|
370
|
-
n,
|
|
371
|
-
o,
|
|
372
|
-
a
|
|
373
|
-
]), l = rt(i), d = F((u) => {
|
|
374
|
-
!a.current.isFocusWithin && document.activeElement === u.target && (r && r(u), o && o(!0), a.current.isFocusWithin = !0, l(u));
|
|
375
|
-
}, [
|
|
376
|
-
r,
|
|
377
|
-
o,
|
|
378
|
-
l
|
|
379
|
-
]);
|
|
380
|
-
return t ? {
|
|
381
|
-
focusWithinProps: {
|
|
382
|
-
// These should not have been null, that would conflict in mergeProps
|
|
383
|
-
onFocus: void 0,
|
|
384
|
-
onBlur: void 0
|
|
385
|
-
}
|
|
386
|
-
} : {
|
|
387
|
-
focusWithinProps: {
|
|
388
|
-
onFocus: d,
|
|
389
|
-
onBlur: i
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
function ct(e) {
|
|
394
|
-
let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: o } = e, a = g({
|
|
395
|
-
isPointerDown: !1,
|
|
396
|
-
ignoreEmulatedMouseEvents: !1
|
|
397
|
-
}), i = A((d) => {
|
|
398
|
-
n && K(d, t) && (o && o(d), a.current.isPointerDown = !0);
|
|
399
|
-
}), l = A((d) => {
|
|
400
|
-
n && n(d);
|
|
401
|
-
});
|
|
402
|
-
P(() => {
|
|
403
|
-
let d = a.current;
|
|
404
|
-
if (r) return;
|
|
405
|
-
const u = t.current, c = E(u);
|
|
406
|
-
if (typeof PointerEvent < "u") {
|
|
407
|
-
let s = ($) => {
|
|
408
|
-
d.isPointerDown && K($, t) && l($), d.isPointerDown = !1;
|
|
409
|
-
};
|
|
410
|
-
return c.addEventListener("pointerdown", i, !0), c.addEventListener("pointerup", s, !0), () => {
|
|
411
|
-
c.removeEventListener("pointerdown", i, !0), c.removeEventListener("pointerup", s, !0);
|
|
412
|
-
};
|
|
413
|
-
} else {
|
|
414
|
-
let s = (v) => {
|
|
415
|
-
d.ignoreEmulatedMouseEvents ? d.ignoreEmulatedMouseEvents = !1 : d.isPointerDown && K(v, t) && l(v), d.isPointerDown = !1;
|
|
416
|
-
}, $ = (v) => {
|
|
417
|
-
d.ignoreEmulatedMouseEvents = !0, d.isPointerDown && K(v, t) && l(v), d.isPointerDown = !1;
|
|
418
|
-
};
|
|
419
|
-
return c.addEventListener("mousedown", i, !0), c.addEventListener("mouseup", s, !0), c.addEventListener("touchstart", i, !0), c.addEventListener("touchend", $, !0), () => {
|
|
420
|
-
c.removeEventListener("mousedown", i, !0), c.removeEventListener("mouseup", s, !0), c.removeEventListener("touchstart", i, !0), c.removeEventListener("touchend", $, !0);
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
}, [
|
|
424
|
-
t,
|
|
425
|
-
r,
|
|
426
|
-
i,
|
|
427
|
-
l
|
|
428
|
-
]);
|
|
429
|
-
}
|
|
430
|
-
function K(e, t) {
|
|
431
|
-
if (e.button > 0) return !1;
|
|
432
|
-
if (e.target) {
|
|
433
|
-
const n = e.target.ownerDocument;
|
|
434
|
-
if (!n || !n.documentElement.contains(e.target) || e.target.closest("[data-react-aria-top-layer]")) return !1;
|
|
435
|
-
}
|
|
436
|
-
return t.current && !t.current.contains(e.target);
|
|
437
|
-
}
|
|
438
|
-
function re(e) {
|
|
439
|
-
const t = E(e);
|
|
440
|
-
if (lt() === "virtual") {
|
|
441
|
-
let n = t.activeElement;
|
|
442
|
-
et(() => {
|
|
443
|
-
t.activeElement === n && e.isConnected && de(e);
|
|
444
|
-
});
|
|
445
|
-
} else de(e);
|
|
446
|
-
}
|
|
447
|
-
function dt(e) {
|
|
448
|
-
const t = j(e);
|
|
449
|
-
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
|
|
450
|
-
let { display: n, visibility: r } = e.style, o = n !== "none" && r !== "hidden" && r !== "collapse";
|
|
451
|
-
if (o) {
|
|
452
|
-
const { getComputedStyle: a } = e.ownerDocument.defaultView;
|
|
453
|
-
let { display: i, visibility: l } = a(e);
|
|
454
|
-
o = i !== "none" && l !== "hidden" && l !== "collapse";
|
|
455
|
-
}
|
|
456
|
-
return o;
|
|
457
|
-
}
|
|
458
|
-
function st(e, t) {
|
|
459
|
-
return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
|
460
|
-
!e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
|
|
461
|
-
}
|
|
462
|
-
function Se(e, t) {
|
|
463
|
-
return e.nodeName !== "#comment" && dt(e) && st(e, t) && (!e.parentElement || Se(e.parentElement, e));
|
|
464
|
-
}
|
|
465
|
-
const $e = /* @__PURE__ */ p.createContext(null);
|
|
466
|
-
let b = null;
|
|
467
|
-
function Ft(e) {
|
|
468
|
-
let { children: t, contain: n, restoreFocus: r, autoFocus: o } = e, a = g(null), i = g(null), l = g([]), { parentNode: d } = L($e) || {}, u = B(() => new oe({
|
|
469
|
-
scopeRef: l
|
|
470
|
-
}), [
|
|
471
|
-
l
|
|
472
|
-
]);
|
|
473
|
-
h(() => {
|
|
474
|
-
let $ = d || m.root;
|
|
475
|
-
if (m.getTreeNode($.scopeRef) && b && !G(b, $.scopeRef)) {
|
|
476
|
-
let v = m.getTreeNode(b);
|
|
477
|
-
v && ($ = v);
|
|
478
|
-
}
|
|
479
|
-
$.addChild(u), m.addNode(u);
|
|
480
|
-
}, [
|
|
481
|
-
u,
|
|
482
|
-
d
|
|
483
|
-
]), h(() => {
|
|
484
|
-
let $ = m.getTreeNode(l);
|
|
485
|
-
$ && ($.contain = !!n);
|
|
486
|
-
}, [
|
|
487
|
-
n
|
|
488
|
-
]), h(() => {
|
|
489
|
-
var $;
|
|
490
|
-
let v = ($ = a.current) === null || $ === void 0 ? void 0 : $.nextSibling, f = [];
|
|
491
|
-
for (; v && v !== i.current; )
|
|
492
|
-
f.push(v), v = v.nextSibling;
|
|
493
|
-
l.current = f;
|
|
494
|
-
}, [
|
|
495
|
-
t
|
|
496
|
-
]), ht(l, r, n), bt(l, n), wt(l, r, n), mt(l, o), P(() => {
|
|
497
|
-
const $ = E(l.current ? l.current[0] : void 0).activeElement;
|
|
498
|
-
let v = null;
|
|
499
|
-
if (w($, l.current)) {
|
|
500
|
-
for (let f of m.traverse()) f.scopeRef && w($, f.scopeRef.current) && (v = f);
|
|
501
|
-
v === m.getTreeNode(l) && (b = v.scopeRef);
|
|
502
|
-
}
|
|
503
|
-
}, [
|
|
504
|
-
l
|
|
505
|
-
]), h(() => () => {
|
|
506
|
-
var $, v, f;
|
|
507
|
-
let J = (f = (v = m.getTreeNode(l)) === null || v === void 0 || ($ = v.parent) === null || $ === void 0 ? void 0 : $.scopeRef) !== null && f !== void 0 ? f : null;
|
|
508
|
-
(l === b || G(l, b)) && (!J || m.getTreeNode(J)) && (b = J), m.removeTreeNode(l);
|
|
509
|
-
}, [
|
|
510
|
-
l
|
|
511
|
-
]);
|
|
512
|
-
let c = B(() => ft(l), []), s = B(() => ({
|
|
513
|
-
focusManager: c,
|
|
514
|
-
parentNode: u
|
|
515
|
-
}), [
|
|
516
|
-
u,
|
|
517
|
-
c
|
|
518
|
-
]);
|
|
519
|
-
return /* @__PURE__ */ p.createElement($e.Provider, {
|
|
520
|
-
value: s
|
|
521
|
-
}, /* @__PURE__ */ p.createElement("span", {
|
|
522
|
-
"data-focus-scope-start": !0,
|
|
523
|
-
hidden: !0,
|
|
524
|
-
ref: a
|
|
525
|
-
}), t, /* @__PURE__ */ p.createElement("span", {
|
|
526
|
-
"data-focus-scope-end": !0,
|
|
527
|
-
hidden: !0,
|
|
528
|
-
ref: i
|
|
529
|
-
}));
|
|
530
|
-
}
|
|
531
|
-
function ft(e) {
|
|
532
|
-
return {
|
|
533
|
-
focusNext(t = {}) {
|
|
534
|
-
let n = e.current, { from: r, tabbable: o, wrap: a, accept: i } = t, l = r || E(n[0]).activeElement, d = n[0].previousElementSibling, u = N(n), c = S(u, {
|
|
535
|
-
tabbable: o,
|
|
536
|
-
accept: i
|
|
537
|
-
}, n);
|
|
538
|
-
c.currentNode = w(l, n) ? l : d;
|
|
539
|
-
let s = c.nextNode();
|
|
540
|
-
return !s && a && (c.currentNode = d, s = c.nextNode()), s && x(s, !0), s;
|
|
541
|
-
},
|
|
542
|
-
focusPrevious(t = {}) {
|
|
543
|
-
let n = e.current, { from: r, tabbable: o, wrap: a, accept: i } = t, l = r || E(n[0]).activeElement, d = n[n.length - 1].nextElementSibling, u = N(n), c = S(u, {
|
|
544
|
-
tabbable: o,
|
|
545
|
-
accept: i
|
|
546
|
-
}, n);
|
|
547
|
-
c.currentNode = w(l, n) ? l : d;
|
|
548
|
-
let s = c.previousNode();
|
|
549
|
-
return !s && a && (c.currentNode = d, s = c.previousNode()), s && x(s, !0), s;
|
|
550
|
-
},
|
|
551
|
-
focusFirst(t = {}) {
|
|
552
|
-
let n = e.current, { tabbable: r, accept: o } = t, a = N(n), i = S(a, {
|
|
553
|
-
tabbable: r,
|
|
554
|
-
accept: o
|
|
555
|
-
}, n);
|
|
556
|
-
i.currentNode = n[0].previousElementSibling;
|
|
557
|
-
let l = i.nextNode();
|
|
558
|
-
return l && x(l, !0), l;
|
|
559
|
-
},
|
|
560
|
-
focusLast(t = {}) {
|
|
561
|
-
let n = e.current, { tabbable: r, accept: o } = t, a = N(n), i = S(a, {
|
|
562
|
-
tabbable: r,
|
|
563
|
-
accept: o
|
|
564
|
-
}, n);
|
|
565
|
-
i.currentNode = n[n.length - 1].nextElementSibling;
|
|
566
|
-
let l = i.previousNode();
|
|
567
|
-
return l && x(l, !0), l;
|
|
568
|
-
}
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
const le = [
|
|
572
|
-
"input:not([disabled]):not([type=hidden])",
|
|
573
|
-
"select:not([disabled])",
|
|
574
|
-
"textarea:not([disabled])",
|
|
575
|
-
"button:not([disabled])",
|
|
576
|
-
"a[href]",
|
|
577
|
-
"area[href]",
|
|
578
|
-
"summary",
|
|
579
|
-
"iframe",
|
|
580
|
-
"object",
|
|
581
|
-
"embed",
|
|
582
|
-
"audio[controls]",
|
|
583
|
-
"video[controls]",
|
|
584
|
-
"[contenteditable]"
|
|
585
|
-
], vt = le.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
586
|
-
le.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
587
|
-
const $t = le.join(':not([hidden]):not([tabindex="-1"]),');
|
|
588
|
-
function N(e) {
|
|
589
|
-
return e[0].parentElement;
|
|
590
|
-
}
|
|
591
|
-
function O(e) {
|
|
592
|
-
let t = m.getTreeNode(b);
|
|
593
|
-
for (; t && t.scopeRef !== e; ) {
|
|
594
|
-
if (t.contain) return !1;
|
|
595
|
-
t = t.parent;
|
|
596
|
-
}
|
|
597
|
-
return !0;
|
|
598
|
-
}
|
|
599
|
-
function bt(e, t) {
|
|
600
|
-
let n = g(), r = g();
|
|
601
|
-
h(() => {
|
|
602
|
-
let o = e.current;
|
|
603
|
-
if (!t) {
|
|
604
|
-
r.current && (cancelAnimationFrame(r.current), r.current = void 0);
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
const a = E(o ? o[0] : void 0);
|
|
608
|
-
let i = (u) => {
|
|
609
|
-
if (u.key !== "Tab" || u.altKey || u.ctrlKey || u.metaKey || !O(e) || u.isComposing) return;
|
|
610
|
-
let c = a.activeElement, s = e.current;
|
|
611
|
-
if (!s || !w(c, s)) return;
|
|
612
|
-
let $ = N(s), v = S($, {
|
|
613
|
-
tabbable: !0
|
|
614
|
-
}, s);
|
|
615
|
-
if (!c) return;
|
|
616
|
-
v.currentNode = c;
|
|
617
|
-
let f = u.shiftKey ? v.previousNode() : v.nextNode();
|
|
618
|
-
f || (v.currentNode = u.shiftKey ? s[s.length - 1].nextElementSibling : s[0].previousElementSibling, f = u.shiftKey ? v.previousNode() : v.nextNode()), u.preventDefault(), f && x(f, !0);
|
|
619
|
-
}, l = (u) => {
|
|
620
|
-
(!b || G(b, e)) && w(u.target, e.current) ? (b = e, n.current = u.target) : O(e) && !q(u.target, e) ? n.current ? n.current.focus() : b && b.current && U(b.current) : O(e) && (n.current = u.target);
|
|
621
|
-
}, d = (u) => {
|
|
622
|
-
r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
623
|
-
if (a.activeElement && O(e) && !q(a.activeElement, e))
|
|
624
|
-
if (b = e, a.body.contains(u.target)) {
|
|
625
|
-
var c;
|
|
626
|
-
n.current = u.target, (c = n.current) === null || c === void 0 || c.focus();
|
|
627
|
-
} else b.current && U(b.current);
|
|
628
|
-
});
|
|
629
|
-
};
|
|
630
|
-
return a.addEventListener("keydown", i, !1), a.addEventListener("focusin", l, !1), o == null || o.forEach((u) => u.addEventListener("focusin", l, !1)), o == null || o.forEach((u) => u.addEventListener("focusout", d, !1)), () => {
|
|
631
|
-
a.removeEventListener("keydown", i, !1), a.removeEventListener("focusin", l, !1), o == null || o.forEach((u) => u.removeEventListener("focusin", l, !1)), o == null || o.forEach((u) => u.removeEventListener("focusout", d, !1));
|
|
632
|
-
};
|
|
633
|
-
}, [
|
|
634
|
-
e,
|
|
635
|
-
t
|
|
636
|
-
]), h(() => () => {
|
|
637
|
-
r.current && cancelAnimationFrame(r.current);
|
|
638
|
-
}, [
|
|
639
|
-
r
|
|
640
|
-
]);
|
|
641
|
-
}
|
|
642
|
-
function Le(e) {
|
|
643
|
-
return q(e);
|
|
644
|
-
}
|
|
645
|
-
function w(e, t) {
|
|
646
|
-
return !e || !t ? !1 : t.some((n) => n.contains(e));
|
|
647
|
-
}
|
|
648
|
-
function q(e, t = null) {
|
|
649
|
-
if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
|
|
650
|
-
for (let { scopeRef: n } of m.traverse(m.getTreeNode(t)))
|
|
651
|
-
if (n && w(e, n.current)) return !0;
|
|
652
|
-
return !1;
|
|
653
|
-
}
|
|
654
|
-
function pt(e) {
|
|
655
|
-
return q(e, b);
|
|
656
|
-
}
|
|
657
|
-
function G(e, t) {
|
|
658
|
-
var n;
|
|
659
|
-
let r = (n = m.getTreeNode(t)) === null || n === void 0 ? void 0 : n.parent;
|
|
660
|
-
for (; r; ) {
|
|
661
|
-
if (r.scopeRef === e) return !0;
|
|
662
|
-
r = r.parent;
|
|
663
|
-
}
|
|
664
|
-
return !1;
|
|
665
|
-
}
|
|
666
|
-
function x(e, t = !1) {
|
|
667
|
-
if (e != null && !t) try {
|
|
668
|
-
re(e);
|
|
669
|
-
} catch {
|
|
670
|
-
}
|
|
671
|
-
else if (e != null) try {
|
|
672
|
-
e.focus();
|
|
673
|
-
} catch {
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
function U(e, t = !0) {
|
|
677
|
-
let n = e[0].previousElementSibling, r = N(e), o = S(r, {
|
|
678
|
-
tabbable: t
|
|
679
|
-
}, e);
|
|
680
|
-
o.currentNode = n;
|
|
681
|
-
let a = o.nextNode();
|
|
682
|
-
t && !a && (r = N(e), o = S(r, {
|
|
683
|
-
tabbable: !1
|
|
684
|
-
}, e), o.currentNode = n, a = o.nextNode()), x(a);
|
|
685
|
-
}
|
|
686
|
-
function mt(e, t) {
|
|
687
|
-
const n = p.useRef(t);
|
|
688
|
-
P(() => {
|
|
689
|
-
if (n.current) {
|
|
690
|
-
b = e;
|
|
691
|
-
const r = E(e.current ? e.current[0] : void 0);
|
|
692
|
-
!w(r.activeElement, b.current) && e.current && U(e.current);
|
|
693
|
-
}
|
|
694
|
-
n.current = !1;
|
|
695
|
-
}, [
|
|
696
|
-
e
|
|
697
|
-
]);
|
|
698
|
-
}
|
|
699
|
-
function ht(e, t, n) {
|
|
700
|
-
h(() => {
|
|
701
|
-
if (t || n) return;
|
|
702
|
-
let r = e.current;
|
|
703
|
-
const o = E(r ? r[0] : void 0);
|
|
704
|
-
let a = (i) => {
|
|
705
|
-
let l = i.target;
|
|
706
|
-
w(l, e.current) ? b = e : Le(l) || (b = null);
|
|
707
|
-
};
|
|
708
|
-
return o.addEventListener("focusin", a, !1), r == null || r.forEach((i) => i.addEventListener("focusin", a, !1)), () => {
|
|
709
|
-
o.removeEventListener("focusin", a, !1), r == null || r.forEach((i) => i.removeEventListener("focusin", a, !1));
|
|
710
|
-
};
|
|
711
|
-
}, [
|
|
712
|
-
e,
|
|
713
|
-
t,
|
|
714
|
-
n
|
|
715
|
-
]);
|
|
716
|
-
}
|
|
717
|
-
function Et(e) {
|
|
718
|
-
let t = m.getTreeNode(b);
|
|
719
|
-
for (; t && t.scopeRef !== e; ) {
|
|
720
|
-
if (t.nodeToRestore) return !1;
|
|
721
|
-
t = t.parent;
|
|
722
|
-
}
|
|
723
|
-
return (t == null ? void 0 : t.scopeRef) === e;
|
|
724
|
-
}
|
|
725
|
-
function wt(e, t, n) {
|
|
726
|
-
const r = g(typeof document < "u" ? E(e.current ? e.current[0] : void 0).activeElement : null);
|
|
727
|
-
h(() => {
|
|
728
|
-
let o = e.current;
|
|
729
|
-
const a = E(o ? o[0] : void 0);
|
|
730
|
-
if (!t || n) return;
|
|
731
|
-
let i = () => {
|
|
732
|
-
(!b || G(b, e)) && w(a.activeElement, e.current) && (b = e);
|
|
733
|
-
};
|
|
734
|
-
return a.addEventListener("focusin", i, !1), o == null || o.forEach((l) => l.addEventListener("focusin", i, !1)), () => {
|
|
735
|
-
a.removeEventListener("focusin", i, !1), o == null || o.forEach((l) => l.removeEventListener("focusin", i, !1));
|
|
736
|
-
};
|
|
737
|
-
}, [
|
|
738
|
-
e,
|
|
739
|
-
n
|
|
740
|
-
]), h(() => {
|
|
741
|
-
const o = E(e.current ? e.current[0] : void 0);
|
|
742
|
-
if (!t) return;
|
|
743
|
-
let a = (i) => {
|
|
744
|
-
if (i.key !== "Tab" || i.altKey || i.ctrlKey || i.metaKey || !O(e) || i.isComposing) return;
|
|
745
|
-
let l = o.activeElement;
|
|
746
|
-
if (!w(l, e.current)) return;
|
|
747
|
-
let d = m.getTreeNode(e);
|
|
748
|
-
if (!d) return;
|
|
749
|
-
let u = d.nodeToRestore, c = S(o.body, {
|
|
750
|
-
tabbable: !0
|
|
751
|
-
});
|
|
752
|
-
c.currentNode = l;
|
|
753
|
-
let s = i.shiftKey ? c.previousNode() : c.nextNode();
|
|
754
|
-
if ((!u || !o.body.contains(u) || u === o.body) && (u = void 0, d.nodeToRestore = void 0), (!s || !w(s, e.current)) && u) {
|
|
755
|
-
c.currentNode = u;
|
|
756
|
-
do
|
|
757
|
-
s = i.shiftKey ? c.previousNode() : c.nextNode();
|
|
758
|
-
while (w(s, e.current));
|
|
759
|
-
i.preventDefault(), i.stopPropagation(), s ? x(s, !0) : Le(u) ? x(u, !0) : l.blur();
|
|
760
|
-
}
|
|
761
|
-
};
|
|
762
|
-
return n || o.addEventListener("keydown", a, !0), () => {
|
|
763
|
-
n || o.removeEventListener("keydown", a, !0);
|
|
764
|
-
};
|
|
765
|
-
}, [
|
|
766
|
-
e,
|
|
767
|
-
t,
|
|
768
|
-
n
|
|
769
|
-
]), h(() => {
|
|
770
|
-
const o = E(e.current ? e.current[0] : void 0);
|
|
771
|
-
if (!t) return;
|
|
772
|
-
let a = m.getTreeNode(e);
|
|
773
|
-
if (a) {
|
|
774
|
-
var i;
|
|
775
|
-
return a.nodeToRestore = (i = r.current) !== null && i !== void 0 ? i : void 0, () => {
|
|
776
|
-
let l = m.getTreeNode(e);
|
|
777
|
-
if (!l) return;
|
|
778
|
-
let d = l.nodeToRestore;
|
|
779
|
-
if (t && d && // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
780
|
-
(w(o.activeElement, e.current) || o.activeElement === o.body && Et(e))) {
|
|
781
|
-
let u = m.clone();
|
|
782
|
-
requestAnimationFrame(() => {
|
|
783
|
-
if (o.activeElement === o.body) {
|
|
784
|
-
let c = u.getTreeNode(e);
|
|
785
|
-
for (; c; ) {
|
|
786
|
-
if (c.nodeToRestore && c.nodeToRestore.isConnected) {
|
|
787
|
-
x(c.nodeToRestore);
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
c = c.parent;
|
|
791
|
-
}
|
|
792
|
-
for (c = u.getTreeNode(e); c; ) {
|
|
793
|
-
if (c.scopeRef && c.scopeRef.current && m.getTreeNode(c.scopeRef)) {
|
|
794
|
-
U(c.scopeRef.current, !0);
|
|
795
|
-
return;
|
|
796
|
-
}
|
|
797
|
-
c = c.parent;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
});
|
|
801
|
-
}
|
|
802
|
-
};
|
|
803
|
-
}
|
|
804
|
-
}, [
|
|
805
|
-
e,
|
|
806
|
-
t
|
|
807
|
-
]);
|
|
808
|
-
}
|
|
809
|
-
function S(e, t, n) {
|
|
810
|
-
let r = t != null && t.tabbable ? $t : vt, o = E(e).createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
811
|
-
acceptNode(a) {
|
|
812
|
-
var i;
|
|
813
|
-
return !(t == null || (i = t.from) === null || i === void 0) && i.contains(a) ? NodeFilter.FILTER_REJECT : a.matches(r) && Se(a) && (!n || w(a, n)) && (!(t != null && t.accept) || t.accept(a)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
return t != null && t.from && (o.currentNode = t.from), o;
|
|
817
|
-
}
|
|
818
|
-
class ue {
|
|
819
|
-
get size() {
|
|
820
|
-
return this.fastMap.size;
|
|
821
|
-
}
|
|
822
|
-
getTreeNode(t) {
|
|
823
|
-
return this.fastMap.get(t);
|
|
824
|
-
}
|
|
825
|
-
addTreeNode(t, n, r) {
|
|
826
|
-
let o = this.fastMap.get(n ?? null);
|
|
827
|
-
if (!o) return;
|
|
828
|
-
let a = new oe({
|
|
829
|
-
scopeRef: t
|
|
830
|
-
});
|
|
831
|
-
o.addChild(a), a.parent = o, this.fastMap.set(t, a), r && (a.nodeToRestore = r);
|
|
832
|
-
}
|
|
833
|
-
addNode(t) {
|
|
834
|
-
this.fastMap.set(t.scopeRef, t);
|
|
835
|
-
}
|
|
836
|
-
removeTreeNode(t) {
|
|
837
|
-
if (t === null) return;
|
|
838
|
-
let n = this.fastMap.get(t);
|
|
839
|
-
if (!n) return;
|
|
840
|
-
let r = n.parent;
|
|
841
|
-
for (let a of this.traverse()) a !== n && n.nodeToRestore && a.nodeToRestore && n.scopeRef && n.scopeRef.current && w(a.nodeToRestore, n.scopeRef.current) && (a.nodeToRestore = n.nodeToRestore);
|
|
842
|
-
let o = n.children;
|
|
843
|
-
r && (r.removeChild(n), o.size > 0 && o.forEach((a) => r && r.addChild(a))), this.fastMap.delete(n.scopeRef);
|
|
844
|
-
}
|
|
845
|
-
// Pre Order Depth First
|
|
846
|
-
*traverse(t = this.root) {
|
|
847
|
-
if (t.scopeRef != null && (yield t), t.children.size > 0) for (let n of t.children) yield* this.traverse(n);
|
|
848
|
-
}
|
|
849
|
-
clone() {
|
|
850
|
-
var t;
|
|
851
|
-
let n = new ue();
|
|
852
|
-
var r;
|
|
853
|
-
for (let o of this.traverse()) n.addTreeNode(o.scopeRef, (r = (t = o.parent) === null || t === void 0 ? void 0 : t.scopeRef) !== null && r !== void 0 ? r : null, o.nodeToRestore);
|
|
854
|
-
return n;
|
|
855
|
-
}
|
|
856
|
-
constructor() {
|
|
857
|
-
this.fastMap = /* @__PURE__ */ new Map(), this.root = new oe({
|
|
858
|
-
scopeRef: null
|
|
859
|
-
}), this.fastMap.set(null, this.root);
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
class oe {
|
|
863
|
-
addChild(t) {
|
|
864
|
-
this.children.add(t), t.parent = this;
|
|
865
|
-
}
|
|
866
|
-
removeChild(t) {
|
|
867
|
-
this.children.delete(t), t.parent = void 0;
|
|
868
|
-
}
|
|
869
|
-
constructor(t) {
|
|
870
|
-
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = t.scopeRef;
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
let m = new ue();
|
|
874
|
-
const T = [];
|
|
875
|
-
function kt(e, t) {
|
|
876
|
-
let { onClose: n, shouldCloseOnBlur: r, isOpen: o, isDismissable: a = !1, isKeyboardDismissDisabled: i = !1, shouldCloseOnInteractOutside: l } = e;
|
|
877
|
-
P(() => (o && T.push(t), () => {
|
|
878
|
-
let f = T.indexOf(t);
|
|
879
|
-
f >= 0 && T.splice(f, 1);
|
|
880
|
-
}), [
|
|
881
|
-
o,
|
|
882
|
-
t
|
|
883
|
-
]);
|
|
884
|
-
let d = () => {
|
|
885
|
-
T[T.length - 1] === t && n && n();
|
|
886
|
-
}, u = (f) => {
|
|
887
|
-
(!l || l(f.target)) && T[T.length - 1] === t && (f.stopPropagation(), f.preventDefault());
|
|
888
|
-
}, c = (f) => {
|
|
889
|
-
(!l || l(f.target)) && (T[T.length - 1] === t && (f.stopPropagation(), f.preventDefault()), d());
|
|
890
|
-
}, s = (f) => {
|
|
891
|
-
f.key === "Escape" && !i && !f.nativeEvent.isComposing && (f.stopPropagation(), f.preventDefault(), d());
|
|
892
|
-
};
|
|
893
|
-
ct({
|
|
894
|
-
ref: t,
|
|
895
|
-
onInteractOutside: a && o ? c : null,
|
|
896
|
-
onInteractOutsideStart: u
|
|
897
|
-
});
|
|
898
|
-
let { focusWithinProps: $ } = ut({
|
|
899
|
-
isDisabled: !r,
|
|
900
|
-
onBlurWithin: (f) => {
|
|
901
|
-
!f.relatedTarget || pt(f.relatedTarget) || (!l || l(f.relatedTarget)) && n();
|
|
902
|
-
}
|
|
903
|
-
}), v = (f) => {
|
|
904
|
-
f.target === f.currentTarget && f.preventDefault();
|
|
905
|
-
};
|
|
906
|
-
return {
|
|
907
|
-
overlayProps: {
|
|
908
|
-
onKeyDown: s,
|
|
909
|
-
...$
|
|
910
|
-
},
|
|
911
|
-
underlayProps: {
|
|
912
|
-
onPointerDown: v
|
|
913
|
-
}
|
|
914
|
-
};
|
|
915
|
-
}
|
|
916
|
-
const Z = typeof document < "u" && window.visualViewport, gt = /* @__PURE__ */ new Set([
|
|
917
|
-
"checkbox",
|
|
918
|
-
"radio",
|
|
919
|
-
"range",
|
|
920
|
-
"color",
|
|
921
|
-
"file",
|
|
922
|
-
"image",
|
|
923
|
-
"button",
|
|
924
|
-
"submit",
|
|
925
|
-
"reset"
|
|
926
|
-
]);
|
|
927
|
-
let R = 0, _;
|
|
928
|
-
function Ot(e = {}) {
|
|
929
|
-
let { isDisabled: t } = e;
|
|
930
|
-
h(() => {
|
|
931
|
-
if (!t)
|
|
932
|
-
return R++, R === 1 && (Ze() ? _ = Tt() : _ = yt()), () => {
|
|
933
|
-
R--, R === 0 && _();
|
|
934
|
-
};
|
|
935
|
-
}, [
|
|
936
|
-
t
|
|
937
|
-
]);
|
|
938
|
-
}
|
|
939
|
-
function yt() {
|
|
940
|
-
return ee(D(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), D(document.documentElement, "overflow", "hidden"));
|
|
941
|
-
}
|
|
942
|
-
function Tt() {
|
|
943
|
-
let e, t, n = (u) => {
|
|
944
|
-
e = we(u.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = D(e, "overscrollBehavior", "contain"));
|
|
945
|
-
}, r = (u) => {
|
|
946
|
-
if (!e || e === document.documentElement || e === document.body) {
|
|
947
|
-
u.preventDefault();
|
|
948
|
-
return;
|
|
949
|
-
}
|
|
950
|
-
e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && u.preventDefault();
|
|
951
|
-
}, o = (u) => {
|
|
952
|
-
let c = u.target;
|
|
953
|
-
pe(c) && c !== document.activeElement && (u.preventDefault(), l(), c.style.transform = "translateY(-2000px)", c.focus(), requestAnimationFrame(() => {
|
|
954
|
-
c.style.transform = "";
|
|
955
|
-
})), t && t();
|
|
956
|
-
}, a = (u) => {
|
|
957
|
-
let c = u.target;
|
|
958
|
-
pe(c) && (l(), c.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
959
|
-
c.style.transform = "", Z && (Z.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
960
|
-
be(c);
|
|
961
|
-
}) : Z.addEventListener("resize", () => be(c), {
|
|
962
|
-
once: !0
|
|
963
|
-
}));
|
|
964
|
-
}));
|
|
965
|
-
}, i = null, l = () => {
|
|
966
|
-
if (i) return;
|
|
967
|
-
let u = () => {
|
|
968
|
-
window.scrollTo(0, 0);
|
|
969
|
-
}, c = window.pageXOffset, s = window.pageYOffset;
|
|
970
|
-
i = ee(k(window, "scroll", u), D(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), D(document.documentElement, "overflow", "hidden"), D(document.body, "marginTop", `-${s}px`), () => {
|
|
971
|
-
window.scrollTo(c, s);
|
|
972
|
-
}), window.scrollTo(0, 0);
|
|
973
|
-
}, d = ee(k(document, "touchstart", n, {
|
|
974
|
-
passive: !1,
|
|
975
|
-
capture: !0
|
|
976
|
-
}), k(document, "touchmove", r, {
|
|
977
|
-
passive: !1,
|
|
978
|
-
capture: !0
|
|
979
|
-
}), k(document, "touchend", o, {
|
|
980
|
-
passive: !1,
|
|
981
|
-
capture: !0
|
|
982
|
-
}), k(document, "focus", a, !0));
|
|
983
|
-
return () => {
|
|
984
|
-
t == null || t(), i == null || i(), d();
|
|
985
|
-
};
|
|
986
|
-
}
|
|
987
|
-
function D(e, t, n) {
|
|
988
|
-
let r = e.style[t];
|
|
989
|
-
return e.style[t] = n, () => {
|
|
990
|
-
e.style[t] = r;
|
|
991
|
-
};
|
|
992
|
-
}
|
|
993
|
-
function k(e, t, n, r) {
|
|
994
|
-
return e.addEventListener(t, n, r), () => {
|
|
995
|
-
e.removeEventListener(t, n, r);
|
|
996
|
-
};
|
|
997
|
-
}
|
|
998
|
-
function be(e) {
|
|
999
|
-
let t = document.scrollingElement || document.documentElement;
|
|
1000
|
-
for (; e && e !== t; ) {
|
|
1001
|
-
let n = we(e);
|
|
1002
|
-
if (n !== document.documentElement && n !== document.body && n !== e) {
|
|
1003
|
-
let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top;
|
|
1004
|
-
o > r + e.clientHeight && (n.scrollTop += o - r);
|
|
1005
|
-
}
|
|
1006
|
-
e = n.parentElement;
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
function pe(e) {
|
|
1010
|
-
return e instanceof HTMLInputElement && !gt.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1011
|
-
}
|
|
1012
|
-
const X = /* @__PURE__ */ p.createContext(null);
|
|
1013
|
-
function xt(e) {
|
|
1014
|
-
let { children: t } = e, n = L(X), [r, o] = Y(0), a = B(() => ({
|
|
1015
|
-
parent: n,
|
|
1016
|
-
modalCount: r,
|
|
1017
|
-
addModal() {
|
|
1018
|
-
o((i) => i + 1), n && n.addModal();
|
|
1019
|
-
},
|
|
1020
|
-
removeModal() {
|
|
1021
|
-
o((i) => i - 1), n && n.removeModal();
|
|
1022
|
-
}
|
|
1023
|
-
}), [
|
|
1024
|
-
n,
|
|
1025
|
-
r
|
|
1026
|
-
]);
|
|
1027
|
-
return /* @__PURE__ */ p.createElement(X.Provider, {
|
|
1028
|
-
value: a
|
|
1029
|
-
}, t);
|
|
1030
|
-
}
|
|
1031
|
-
function St() {
|
|
1032
|
-
let e = L(X);
|
|
1033
|
-
return {
|
|
1034
|
-
modalProviderProps: {
|
|
1035
|
-
"aria-hidden": e && e.modalCount > 0 ? !0 : null
|
|
1036
|
-
}
|
|
1037
|
-
};
|
|
1038
|
-
}
|
|
1039
|
-
function Lt(e) {
|
|
1040
|
-
let { modalProviderProps: t } = St();
|
|
1041
|
-
return /* @__PURE__ */ p.createElement("div", {
|
|
1042
|
-
"data-overlay-container": !0,
|
|
1043
|
-
...e,
|
|
1044
|
-
...t
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
function Nt(e) {
|
|
1048
|
-
return /* @__PURE__ */ p.createElement(xt, null, /* @__PURE__ */ p.createElement(Lt, e));
|
|
1049
|
-
}
|
|
1050
|
-
function Wt(e) {
|
|
1051
|
-
let t = he(), { portalContainer: n = t ? null : document.body, ...r } = e;
|
|
1052
|
-
if (p.useEffect(() => {
|
|
1053
|
-
if (n != null && n.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
|
|
1054
|
-
}, [
|
|
1055
|
-
n
|
|
1056
|
-
]), !n) return null;
|
|
1057
|
-
let o = /* @__PURE__ */ p.createElement(Nt, r);
|
|
1058
|
-
return /* @__PURE__ */ Ne.createPortal(o, n);
|
|
1059
|
-
}
|
|
1060
|
-
function At(e) {
|
|
1061
|
-
let t = L(X);
|
|
1062
|
-
if (!t) throw new Error("Modal is not contained within a provider");
|
|
1063
|
-
return P(() => {
|
|
1064
|
-
if (!(e != null && e.isDisabled || !t || !t.parent))
|
|
1065
|
-
return t.parent.addModal(), () => {
|
|
1066
|
-
t && t.parent && t.parent.removeModal();
|
|
1067
|
-
};
|
|
1068
|
-
}, [
|
|
1069
|
-
t,
|
|
1070
|
-
t.parent,
|
|
1071
|
-
e == null ? void 0 : e.isDisabled
|
|
1072
|
-
]), {
|
|
1073
|
-
modalProps: {
|
|
1074
|
-
"data-ismodal": !(e != null && e.isDisabled)
|
|
1075
|
-
}
|
|
1076
|
-
};
|
|
1077
|
-
}
|
|
1078
|
-
const Mt = /* @__PURE__ */ p.createContext(null);
|
|
1079
|
-
function Pt() {
|
|
1080
|
-
let e = L(Mt), t = e == null ? void 0 : e.setContain;
|
|
1081
|
-
h(() => {
|
|
1082
|
-
t == null || t(!0);
|
|
1083
|
-
}, [
|
|
1084
|
-
t
|
|
1085
|
-
]);
|
|
1086
|
-
}
|
|
1087
|
-
function It(e, t) {
|
|
1088
|
-
let { role: n = "dialog" } = e, r = Re();
|
|
1089
|
-
r = e["aria-label"] ? void 0 : r;
|
|
1090
|
-
let o = g(!1);
|
|
1091
|
-
return P(() => {
|
|
1092
|
-
if (t.current && !t.current.contains(document.activeElement)) {
|
|
1093
|
-
re(t.current);
|
|
1094
|
-
let a = setTimeout(() => {
|
|
1095
|
-
document.activeElement === t.current && (o.current = !0, t.current && (t.current.blur(), re(t.current)), o.current = !1);
|
|
1096
|
-
}, 500);
|
|
1097
|
-
return () => {
|
|
1098
|
-
clearTimeout(a);
|
|
1099
|
-
};
|
|
1100
|
-
}
|
|
1101
|
-
}, [
|
|
1102
|
-
t
|
|
1103
|
-
]), Pt(), {
|
|
1104
|
-
dialogProps: {
|
|
1105
|
-
...qe(e, {
|
|
1106
|
-
labelable: !0
|
|
1107
|
-
}),
|
|
1108
|
-
role: n,
|
|
1109
|
-
tabIndex: -1,
|
|
1110
|
-
"aria-labelledby": e["aria-labelledby"] || r,
|
|
1111
|
-
// Prevent blur events from reaching useOverlay, which may cause
|
|
1112
|
-
// popovers to close. Since focus is contained within the dialog,
|
|
1113
|
-
// we don't want this to occur due to the above useEffect.
|
|
1114
|
-
onBlur: (a) => {
|
|
1115
|
-
o.current && a.stopPropagation();
|
|
1116
|
-
}
|
|
1117
|
-
},
|
|
1118
|
-
titleProps: {
|
|
1119
|
-
id: r
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
export {
|
|
1124
|
-
xt as $,
|
|
1125
|
-
Nt as a,
|
|
1126
|
-
At as b,
|
|
1127
|
-
kt as c,
|
|
1128
|
-
It as d,
|
|
1129
|
-
Ot as e,
|
|
1130
|
-
Wt as f,
|
|
1131
|
-
Ft as g
|
|
1132
|
-
};
|
|
1133
|
-
//# sourceMappingURL=useDialog-D4QXqVAd.js.map
|