@uva-glass/component-library 1.38.0 → 1.40.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-DzmKC6A7.js → MenuLink-CSnr2Az4.js} +3 -3
- package/dist/{MenuLink-DzmKC6A7.js.map → MenuLink-CSnr2Az4.js.map} +1 -1
- 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 -1
- package/dist/assets/StatusPill.css +1 -1
- 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/Button/Button.js +14 -21
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.stories.js +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.js +2 -2
- package/dist/components/Icon/icons/index.d.ts +12 -0
- package/dist/components/Icon/icons/index.js +60 -56
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +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.js +1 -1
- package/dist/components/MenuLink/index.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.js +2 -2
- 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.js +1 -1
- package/dist/components/Periods/Periods.d.ts +2 -2
- package/dist/components/Periods/Periods.js +27 -19
- package/dist/components/Periods/Periods.js.map +1 -1
- package/dist/components/Periods/Periods.stories.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/SelectListbox/SelectListBox.stories.js +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/index.d.ts +3 -0
- package/dist/components/index.js +71 -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-CPfft0rG.js → index-0Faxlks_.js} +12 -11
- package/dist/index-0Faxlks_.js.map +1 -0
- package/dist/{index-DDSOrTSz.js → index-HuvfQN5H.js} +3 -3
- package/dist/{index-DDSOrTSz.js.map → index-HuvfQN5H.js.map} +1 -1
- package/dist/index.js +71 -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 +24 -21
- package/dist/MultiSelectItem-CwKowz2B.js +0 -24
- package/dist/MultiSelectItem-CwKowz2B.js.map +0 -1
- package/dist/index-CPfft0rG.js.map +0 -1
- package/dist/useDialog-udvbFTBT.js +0 -1133
- package/dist/useDialog-udvbFTBT.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './Accordion';
|
|
2
|
+
export * from './ActionList';
|
|
2
3
|
export * from './AppStatusBar';
|
|
3
4
|
export * from './Attention';
|
|
4
5
|
export * from './Backdrop';
|
|
@@ -6,6 +7,7 @@ export * from './Button';
|
|
|
6
7
|
export * from './ButtonGroup';
|
|
7
8
|
export * from './Card';
|
|
8
9
|
export * from './Checkbox';
|
|
10
|
+
export * from './CourseCard';
|
|
9
11
|
export * from './Drawer';
|
|
10
12
|
export * from './FieldHint';
|
|
11
13
|
export * from './Fieldset';
|
|
@@ -18,6 +20,7 @@ export * from './InfoMessage';
|
|
|
18
20
|
export * from './Input';
|
|
19
21
|
export * from './InputField';
|
|
20
22
|
export * from './Label';
|
|
23
|
+
export * from './MenuButton';
|
|
21
24
|
export * from './MenuLink';
|
|
22
25
|
export * from './MetaDataList';
|
|
23
26
|
export * from './ModalDialog';
|
package/dist/components/index.js
CHANGED
|
@@ -1,74 +1,80 @@
|
|
|
1
1
|
import { Accordion as t } from "./Accordion/Accordion.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { ActionList as p } from "./ActionList/ActionList.js";
|
|
3
|
+
import { AppStatusBar as f } from "./AppStatusBar/AppStatusBar.js";
|
|
4
|
+
import { Attention as i } from "./Attention/Attention.js";
|
|
5
|
+
import { Backdrop as a } from "./Backdrop/Backdrop.js";
|
|
6
|
+
import { Button as u } from "./Button/Button.js";
|
|
6
7
|
import { ButtonGroup as d } from "./ButtonGroup/ButtonGroup.js";
|
|
7
|
-
import { Card as
|
|
8
|
+
import { Card as B } from "./Card/Card.js";
|
|
8
9
|
import { Checkbox as S } from "./Checkbox/Checkbox.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
10
|
+
import { CourseCard as L } from "./CourseCard/CourseCard.js";
|
|
11
|
+
import { Drawer as I } from "./Drawer/Drawer.js";
|
|
12
|
+
import { FieldHint as P } from "./FieldHint/FieldHint.js";
|
|
13
|
+
import { Fieldset as g } from "./Fieldset/Fieldset.js";
|
|
14
|
+
import { FormField as D } from "./FormField/FormField.js";
|
|
15
|
+
import { GridRow as v } from "./GridRow/GridRow.js";
|
|
16
|
+
import { HorizontalList as G } from "./HorizontalList/HorizontalList.js";
|
|
17
|
+
import { Icon as h } from "./Icon/Icon.js";
|
|
18
|
+
import { IconButton as z } from "./IconButton/IconButton.js";
|
|
19
|
+
import { InfoMessage as O } from "./InfoMessage/InfoMessage.js";
|
|
20
|
+
import { Input as j } from "./Input/Input.js";
|
|
21
|
+
import { InputField as E } from "./InputField/InputField.js";
|
|
22
|
+
import { Label as K } from "./Label/Label.js";
|
|
23
|
+
import { MenuButton as U } from "./MenuButton/MenuButton.js";
|
|
24
|
+
import { M as W } from "../MenuLink-CSnr2Az4.js";
|
|
25
|
+
import { MetaDataList as Y } from "./MetaDataList/MetaDataList.js";
|
|
26
|
+
import { ModalDialog as _ } from "./ModalDialog/ModalDialog.js";
|
|
27
|
+
import { M as oo } from "../MultiSelect-Blc_VDxu.js";
|
|
28
|
+
import { OverlayCloseButton as to } from "./OverlayCloseButton/OverlayCloseButton.js";
|
|
29
|
+
import { Periods as po } from "./Periods/Periods.js";
|
|
30
|
+
import { ProgrammeCard as fo } from "./ProgrammeCard/ProgrammeCard.js";
|
|
31
|
+
import { RadioButton as io } from "./RadioButton/RadioButton.js";
|
|
32
|
+
import { Repeater as ao } from "./Repeater/Repeater.js";
|
|
33
|
+
import { SectionNotification as uo } from "./SectionNotification/SectionNotification.js";
|
|
34
|
+
import { SelectListbox as co } from "./SelectListbox/SelectListbox.js";
|
|
35
|
+
import { SelectProvider as Mo, useSelect as So } from "./SelectListbox/SelectProvider.js";
|
|
36
|
+
import { Spinner as Lo } from "./Spinner/Spinner.js";
|
|
37
|
+
import { StatusPill as Io } from "./StatusPill/StatusPill.js";
|
|
38
|
+
import { Tooltip as Po } from "./Tooltip/Tooltip.js";
|
|
36
39
|
export {
|
|
37
40
|
t as Accordion,
|
|
38
|
-
p as
|
|
39
|
-
f as
|
|
40
|
-
i as
|
|
41
|
-
|
|
41
|
+
p as ActionList,
|
|
42
|
+
f as AppStatusBar,
|
|
43
|
+
i as Attention,
|
|
44
|
+
a as Backdrop,
|
|
45
|
+
u as Button,
|
|
42
46
|
d as ButtonGroup,
|
|
43
|
-
|
|
47
|
+
B as Card,
|
|
44
48
|
S as Checkbox,
|
|
45
|
-
|
|
46
|
-
I as
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
49
|
+
L as CourseCard,
|
|
50
|
+
I as Drawer,
|
|
51
|
+
P as FieldHint,
|
|
52
|
+
g as Fieldset,
|
|
53
|
+
D as FormField,
|
|
54
|
+
v as GridRow,
|
|
55
|
+
G as HorizontalList,
|
|
56
|
+
h as Icon,
|
|
57
|
+
z as IconButton,
|
|
58
|
+
O as InfoMessage,
|
|
59
|
+
j as Input,
|
|
60
|
+
E as InputField,
|
|
61
|
+
K as Label,
|
|
62
|
+
U as MenuButton,
|
|
63
|
+
W as MenuLink,
|
|
64
|
+
Y as MetaDataList,
|
|
65
|
+
_ as ModalDialog,
|
|
66
|
+
oo as MultiSelect,
|
|
67
|
+
to as OverlayCloseButton,
|
|
68
|
+
po as Periods,
|
|
69
|
+
fo as ProgrammeCard,
|
|
70
|
+
io as RadioButton,
|
|
71
|
+
ao as Repeater,
|
|
72
|
+
uo as SectionNotification,
|
|
73
|
+
co as SelectListbox,
|
|
74
|
+
Mo as SelectProvider,
|
|
75
|
+
Lo as Spinner,
|
|
76
|
+
Io as StatusPill,
|
|
77
|
+
Po as Tooltip,
|
|
78
|
+
So as useSelect
|
|
73
79
|
};
|
|
74
80
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsxs as i, Fragment as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../../assets/Container.css';const
|
|
4
|
-
container:
|
|
5
|
-
"container--padded": "_container--
|
|
6
|
-
"container--small": "_container--
|
|
7
|
-
"container--medium": "_container--
|
|
8
|
-
"container--large": "_container--
|
|
9
|
-
"container--hidden": "_container--
|
|
10
|
-
"container--centered-content": "_container--centered-
|
|
1
|
+
import { jsxs as i, Fragment as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as l } from "../../../clsx-OuTLNxxd.js";
|
|
3
|
+
import '../../../assets/Container.css';const m = "_container_e202h_1", n = {
|
|
4
|
+
container: m,
|
|
5
|
+
"container--padded": "_container--padded_e202h_8",
|
|
6
|
+
"container--small": "_container--small_e202h_12",
|
|
7
|
+
"container--medium": "_container--medium_e202h_17",
|
|
8
|
+
"container--large": "_container--large_e202h_22",
|
|
9
|
+
"container--hidden": "_container--hidden_e202h_27",
|
|
10
|
+
"container--centered-content": "_container--centered-content_e202h_31"
|
|
11
11
|
}, u = ({
|
|
12
12
|
children: a,
|
|
13
13
|
size: e = "medium",
|
|
14
14
|
centerContent: o = !1,
|
|
15
15
|
visible: c = !0,
|
|
16
16
|
padded: t = !0
|
|
17
|
-
}) => /* @__PURE__ */ i(
|
|
17
|
+
}) => /* @__PURE__ */ i(d, { children: [
|
|
18
18
|
/* @__PURE__ */ r("label", { htmlFor: "container", children: t ? "Storybook container with 1rem padding" : "Storybook container" }),
|
|
19
19
|
/* @__PURE__ */ r(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
22
|
id: "container",
|
|
23
|
-
className:
|
|
23
|
+
className: l(n.container, {
|
|
24
24
|
[n["container--small"]]: e === "small",
|
|
25
25
|
[n["container--medium"]]: e === "medium",
|
|
26
26
|
[n["container--large"]]: e === "large",
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import u, { useRef as $, useCallback as y, useState as T, useContext as k, useEffect as q } from "react";
|
|
2
|
+
const b = typeof document < "u" ? u.useLayoutEffect : () => {
|
|
3
|
+
};
|
|
4
|
+
function L(e) {
|
|
5
|
+
const t = $(null);
|
|
6
|
+
return b(() => {
|
|
7
|
+
t.current = e;
|
|
8
|
+
}, [
|
|
9
|
+
e
|
|
10
|
+
]), y((...n) => {
|
|
11
|
+
const r = t.current;
|
|
12
|
+
return r == null ? void 0 : r(...n);
|
|
13
|
+
}, []);
|
|
14
|
+
}
|
|
15
|
+
function B(e) {
|
|
16
|
+
let [t, n] = T(e), r = $(null), o = L(() => {
|
|
17
|
+
if (!r.current) return;
|
|
18
|
+
let a = r.current.next();
|
|
19
|
+
if (a.done) {
|
|
20
|
+
r.current = null;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
t === a.value ? o() : n(a.value);
|
|
24
|
+
});
|
|
25
|
+
b(() => {
|
|
26
|
+
r.current && o();
|
|
27
|
+
});
|
|
28
|
+
let c = L((a) => {
|
|
29
|
+
r.current = a(t), o();
|
|
30
|
+
});
|
|
31
|
+
return [
|
|
32
|
+
t,
|
|
33
|
+
c
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
const w = {
|
|
37
|
+
prefix: String(Math.round(Math.random() * 1e10)),
|
|
38
|
+
current: 0
|
|
39
|
+
}, z = /* @__PURE__ */ u.createContext(w), G = /* @__PURE__ */ u.createContext(!1);
|
|
40
|
+
let J = !!(typeof window < "u" && window.document && window.document.createElement), x = /* @__PURE__ */ new WeakMap();
|
|
41
|
+
function Q(e = !1) {
|
|
42
|
+
let t = k(z), n = $(null);
|
|
43
|
+
if (n.current === null && !e) {
|
|
44
|
+
var r, o;
|
|
45
|
+
let c = (o = u.__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;
|
|
46
|
+
if (c) {
|
|
47
|
+
let a = x.get(c);
|
|
48
|
+
a == null ? x.set(c, {
|
|
49
|
+
id: t.current,
|
|
50
|
+
state: c.memoizedState
|
|
51
|
+
}) : c.memoizedState !== a.state && (t.current = a.id, x.delete(c));
|
|
52
|
+
}
|
|
53
|
+
n.current = ++t.current;
|
|
54
|
+
}
|
|
55
|
+
return n.current;
|
|
56
|
+
}
|
|
57
|
+
function X(e) {
|
|
58
|
+
let t = k(z);
|
|
59
|
+
t === w && !J && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
60
|
+
let n = Q(!!e), r = t === w && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
|
|
61
|
+
return e || `${r}-${n}`;
|
|
62
|
+
}
|
|
63
|
+
function Z(e) {
|
|
64
|
+
let t = u.useId(), [n] = T(ee()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${w.prefix}`;
|
|
65
|
+
return e || `${r}-${t}`;
|
|
66
|
+
}
|
|
67
|
+
const U = typeof u.useId == "function" ? Z : X;
|
|
68
|
+
function Y() {
|
|
69
|
+
return !1;
|
|
70
|
+
}
|
|
71
|
+
function R() {
|
|
72
|
+
return !0;
|
|
73
|
+
}
|
|
74
|
+
function _(e) {
|
|
75
|
+
return () => {
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function ee() {
|
|
79
|
+
return typeof u.useSyncExternalStore == "function" ? u.useSyncExternalStore(_, Y, R) : k(G);
|
|
80
|
+
}
|
|
81
|
+
let te = !!(typeof window < "u" && window.document && window.document.createElement), g = /* @__PURE__ */ new Map();
|
|
82
|
+
function re(e) {
|
|
83
|
+
let [t, n] = T(e), r = $(null), o = U(t), c = y((a) => {
|
|
84
|
+
r.current = a;
|
|
85
|
+
}, []);
|
|
86
|
+
return te && g.set(o, c), b(() => {
|
|
87
|
+
let a = o;
|
|
88
|
+
return () => {
|
|
89
|
+
g.delete(a);
|
|
90
|
+
};
|
|
91
|
+
}, [
|
|
92
|
+
o
|
|
93
|
+
]), q(() => {
|
|
94
|
+
let a = r.current;
|
|
95
|
+
a && (r.current = null, n(a));
|
|
96
|
+
}), o;
|
|
97
|
+
}
|
|
98
|
+
function ye(e, t) {
|
|
99
|
+
if (e === t) return e;
|
|
100
|
+
let n = g.get(e);
|
|
101
|
+
if (n)
|
|
102
|
+
return n(t), t;
|
|
103
|
+
let r = g.get(t);
|
|
104
|
+
return r ? (r(e), e) : t;
|
|
105
|
+
}
|
|
106
|
+
function Ee(e = []) {
|
|
107
|
+
let t = re(), [n, r] = B(t), o = y(() => {
|
|
108
|
+
r(function* () {
|
|
109
|
+
yield t, yield document.getElementById(t) ? t : void 0;
|
|
110
|
+
});
|
|
111
|
+
}, [
|
|
112
|
+
t,
|
|
113
|
+
r
|
|
114
|
+
]);
|
|
115
|
+
return b(o, [
|
|
116
|
+
t,
|
|
117
|
+
o,
|
|
118
|
+
...e
|
|
119
|
+
]), n;
|
|
120
|
+
}
|
|
121
|
+
function xe(...e) {
|
|
122
|
+
return (...t) => {
|
|
123
|
+
for (let n of e) typeof n == "function" && n(...t);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
const p = (e) => {
|
|
127
|
+
var t;
|
|
128
|
+
return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
|
|
129
|
+
}, S = (e) => e && "window" in e && e.window === e ? e : p(e).defaultView || window, ne = /* @__PURE__ */ new Set([
|
|
130
|
+
"id"
|
|
131
|
+
]), oe = /* @__PURE__ */ new Set([
|
|
132
|
+
"aria-label",
|
|
133
|
+
"aria-labelledby",
|
|
134
|
+
"aria-describedby",
|
|
135
|
+
"aria-details"
|
|
136
|
+
]), ae = /* @__PURE__ */ new Set([
|
|
137
|
+
"href",
|
|
138
|
+
"hrefLang",
|
|
139
|
+
"target",
|
|
140
|
+
"rel",
|
|
141
|
+
"download",
|
|
142
|
+
"ping",
|
|
143
|
+
"referrerPolicy"
|
|
144
|
+
]), ce = /^(data-.*)$/;
|
|
145
|
+
function Le(e, t = {}) {
|
|
146
|
+
let { labelable: n, isLink: r, propNames: o } = t, c = {};
|
|
147
|
+
for (const a in e) Object.prototype.hasOwnProperty.call(e, a) && (ne.has(a) || n && oe.has(a) || r && ae.has(a) || o != null && o.has(a) || ce.test(a)) && (c[a] = e[a]);
|
|
148
|
+
return c;
|
|
149
|
+
}
|
|
150
|
+
function F(e) {
|
|
151
|
+
if (ie()) e.focus({
|
|
152
|
+
preventScroll: !0
|
|
153
|
+
});
|
|
154
|
+
else {
|
|
155
|
+
let t = ue(e);
|
|
156
|
+
e.focus(), se(t);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
let m = null;
|
|
160
|
+
function ie() {
|
|
161
|
+
if (m == null) {
|
|
162
|
+
m = !1;
|
|
163
|
+
try {
|
|
164
|
+
document.createElement("div").focus({
|
|
165
|
+
get preventScroll() {
|
|
166
|
+
return m = !0, !0;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
} catch {
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return m;
|
|
173
|
+
}
|
|
174
|
+
function ue(e) {
|
|
175
|
+
let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
|
|
176
|
+
for (; t instanceof HTMLElement && t !== r; )
|
|
177
|
+
(t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
|
|
178
|
+
element: t,
|
|
179
|
+
scrollTop: t.scrollTop,
|
|
180
|
+
scrollLeft: t.scrollLeft
|
|
181
|
+
}), t = t.parentNode;
|
|
182
|
+
return r instanceof HTMLElement && n.push({
|
|
183
|
+
element: r,
|
|
184
|
+
scrollTop: r.scrollTop,
|
|
185
|
+
scrollLeft: r.scrollLeft
|
|
186
|
+
}), n;
|
|
187
|
+
}
|
|
188
|
+
function se(e) {
|
|
189
|
+
for (let { element: t, scrollTop: n, scrollLeft: r } of e)
|
|
190
|
+
t.scrollTop = n, t.scrollLeft = r;
|
|
191
|
+
}
|
|
192
|
+
function E(e) {
|
|
193
|
+
var t;
|
|
194
|
+
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);
|
|
195
|
+
}
|
|
196
|
+
function C(e) {
|
|
197
|
+
var t;
|
|
198
|
+
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;
|
|
199
|
+
}
|
|
200
|
+
function s(e) {
|
|
201
|
+
let t = null;
|
|
202
|
+
return () => (t == null && (t = e()), t);
|
|
203
|
+
}
|
|
204
|
+
const I = s(function() {
|
|
205
|
+
return C(/^Mac/i);
|
|
206
|
+
}), de = s(function() {
|
|
207
|
+
return C(/^iPhone/i);
|
|
208
|
+
}), le = s(function() {
|
|
209
|
+
return C(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
210
|
+
I() && navigator.maxTouchPoints > 1;
|
|
211
|
+
}), Se = s(function() {
|
|
212
|
+
return de() || le();
|
|
213
|
+
}), Pe = s(function() {
|
|
214
|
+
return E(/AppleWebKit/i) && !fe();
|
|
215
|
+
}), fe = s(function() {
|
|
216
|
+
return E(/Chrome/i);
|
|
217
|
+
}), K = s(function() {
|
|
218
|
+
return E(/Android/i);
|
|
219
|
+
}), Me = s(function() {
|
|
220
|
+
return E(/Firefox/i);
|
|
221
|
+
});
|
|
222
|
+
let l = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Set();
|
|
223
|
+
function V() {
|
|
224
|
+
if (typeof window > "u") return;
|
|
225
|
+
function e(r) {
|
|
226
|
+
return "propertyName" in r;
|
|
227
|
+
}
|
|
228
|
+
let t = (r) => {
|
|
229
|
+
if (!e(r) || !r.target) return;
|
|
230
|
+
let o = l.get(r.target);
|
|
231
|
+
o || (o = /* @__PURE__ */ new Set(), l.set(r.target, o), r.target.addEventListener("transitioncancel", n, {
|
|
232
|
+
once: !0
|
|
233
|
+
})), o.add(r.propertyName);
|
|
234
|
+
}, n = (r) => {
|
|
235
|
+
if (!e(r) || !r.target) return;
|
|
236
|
+
let o = l.get(r.target);
|
|
237
|
+
if (o && (o.delete(r.propertyName), o.size === 0 && (r.target.removeEventListener("transitioncancel", n), l.delete(r.target)), l.size === 0)) {
|
|
238
|
+
for (let c of P) c();
|
|
239
|
+
P.clear();
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", n);
|
|
243
|
+
}
|
|
244
|
+
typeof document < "u" && (document.readyState !== "loading" ? V() : document.addEventListener("DOMContentLoaded", V));
|
|
245
|
+
function $e(e) {
|
|
246
|
+
requestAnimationFrame(() => {
|
|
247
|
+
l.size === 0 ? e() : P.add(e);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
function be(e) {
|
|
251
|
+
return e.mozInputSource === 0 && e.isTrusted ? !0 : K() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
252
|
+
}
|
|
253
|
+
function Te(e) {
|
|
254
|
+
return !K() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
|
|
255
|
+
}
|
|
256
|
+
class pe {
|
|
257
|
+
isDefaultPrevented() {
|
|
258
|
+
return this.nativeEvent.defaultPrevented;
|
|
259
|
+
}
|
|
260
|
+
preventDefault() {
|
|
261
|
+
this.defaultPrevented = !0, this.nativeEvent.preventDefault();
|
|
262
|
+
}
|
|
263
|
+
stopPropagation() {
|
|
264
|
+
this.nativeEvent.stopPropagation(), this.isPropagationStopped = () => !0;
|
|
265
|
+
}
|
|
266
|
+
isPropagationStopped() {
|
|
267
|
+
return !1;
|
|
268
|
+
}
|
|
269
|
+
persist() {
|
|
270
|
+
}
|
|
271
|
+
constructor(t, n) {
|
|
272
|
+
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;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function ke(e) {
|
|
276
|
+
let t = $({
|
|
277
|
+
isFocused: !1,
|
|
278
|
+
observer: null
|
|
279
|
+
});
|
|
280
|
+
b(() => {
|
|
281
|
+
const r = t.current;
|
|
282
|
+
return () => {
|
|
283
|
+
r.observer && (r.observer.disconnect(), r.observer = null);
|
|
284
|
+
};
|
|
285
|
+
}, []);
|
|
286
|
+
let n = L((r) => {
|
|
287
|
+
e == null || e(r);
|
|
288
|
+
});
|
|
289
|
+
return y((r) => {
|
|
290
|
+
if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
|
|
291
|
+
t.current.isFocused = !0;
|
|
292
|
+
let o = r.target, c = (a) => {
|
|
293
|
+
t.current.isFocused = !1, o.disabled && n(new pe("blur", a)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
|
294
|
+
};
|
|
295
|
+
o.addEventListener("focusout", c, {
|
|
296
|
+
once: !0
|
|
297
|
+
}), t.current.observer = new MutationObserver(() => {
|
|
298
|
+
if (t.current.isFocused && o.disabled) {
|
|
299
|
+
var a;
|
|
300
|
+
(a = t.current.observer) === null || a === void 0 || a.disconnect();
|
|
301
|
+
let D = o === document.activeElement ? null : document.activeElement;
|
|
302
|
+
o.dispatchEvent(new FocusEvent("blur", {
|
|
303
|
+
relatedTarget: D
|
|
304
|
+
})), o.dispatchEvent(new FocusEvent("focusout", {
|
|
305
|
+
bubbles: !0,
|
|
306
|
+
relatedTarget: D
|
|
307
|
+
}));
|
|
308
|
+
}
|
|
309
|
+
}), t.current.observer.observe(o, {
|
|
310
|
+
attributes: !0,
|
|
311
|
+
attributeFilter: [
|
|
312
|
+
"disabled"
|
|
313
|
+
]
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}, [
|
|
317
|
+
n
|
|
318
|
+
]);
|
|
319
|
+
}
|
|
320
|
+
let v = null, ve = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map(), d = !1, M = !1;
|
|
321
|
+
function H(e, t) {
|
|
322
|
+
for (let n of ve) n(e, t);
|
|
323
|
+
}
|
|
324
|
+
function me(e) {
|
|
325
|
+
return !(e.metaKey || !I() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
326
|
+
}
|
|
327
|
+
function h(e) {
|
|
328
|
+
d = !0, me(e) && (v = "keyboard", H("keyboard", e));
|
|
329
|
+
}
|
|
330
|
+
function i(e) {
|
|
331
|
+
v = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (d = !0, H("pointer", e));
|
|
332
|
+
}
|
|
333
|
+
function N(e) {
|
|
334
|
+
be(e) && (d = !0, v = "virtual");
|
|
335
|
+
}
|
|
336
|
+
function W(e) {
|
|
337
|
+
e.target === window || e.target === document || (!d && !M && (v = "virtual", H("virtual", e)), d = !1, M = !1);
|
|
338
|
+
}
|
|
339
|
+
function A() {
|
|
340
|
+
d = !1, M = !0;
|
|
341
|
+
}
|
|
342
|
+
function j(e) {
|
|
343
|
+
if (typeof window > "u" || f.get(S(e))) return;
|
|
344
|
+
const t = S(e), n = p(e);
|
|
345
|
+
let r = t.HTMLElement.prototype.focus;
|
|
346
|
+
t.HTMLElement.prototype.focus = function() {
|
|
347
|
+
d = !0, r.apply(this, arguments);
|
|
348
|
+
}, n.addEventListener("keydown", h, !0), n.addEventListener("keyup", h, !0), n.addEventListener("click", N, !0), t.addEventListener("focus", W, !0), t.addEventListener("blur", A, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", i, !0), n.addEventListener("pointermove", i, !0), n.addEventListener("pointerup", i, !0)) : (n.addEventListener("mousedown", i, !0), n.addEventListener("mousemove", i, !0), n.addEventListener("mouseup", i, !0)), t.addEventListener("beforeunload", () => {
|
|
349
|
+
O(e);
|
|
350
|
+
}, {
|
|
351
|
+
once: !0
|
|
352
|
+
}), f.set(t, {
|
|
353
|
+
focus: r
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
const O = (e, t) => {
|
|
357
|
+
const n = S(e), r = p(e);
|
|
358
|
+
t && r.removeEventListener("DOMContentLoaded", t), f.has(n) && (n.HTMLElement.prototype.focus = f.get(n).focus, r.removeEventListener("keydown", h, !0), r.removeEventListener("keyup", h, !0), r.removeEventListener("click", N, !0), n.removeEventListener("focus", W, !0), n.removeEventListener("blur", A, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", i, !0), r.removeEventListener("pointermove", i, !0), r.removeEventListener("pointerup", i, !0)) : (r.removeEventListener("mousedown", i, !0), r.removeEventListener("mousemove", i, !0), r.removeEventListener("mouseup", i, !0)), f.delete(n));
|
|
359
|
+
};
|
|
360
|
+
function we(e) {
|
|
361
|
+
const t = p(e);
|
|
362
|
+
let n;
|
|
363
|
+
return t.readyState !== "loading" ? j(e) : (n = () => {
|
|
364
|
+
j(e);
|
|
365
|
+
}, t.addEventListener("DOMContentLoaded", n)), () => O(e, n);
|
|
366
|
+
}
|
|
367
|
+
typeof document < "u" && we();
|
|
368
|
+
function ge() {
|
|
369
|
+
return v;
|
|
370
|
+
}
|
|
371
|
+
function Ce(e) {
|
|
372
|
+
const t = p(e);
|
|
373
|
+
if (ge() === "virtual") {
|
|
374
|
+
let n = t.activeElement;
|
|
375
|
+
$e(() => {
|
|
376
|
+
t.activeElement === n && e.isConnected && F(e);
|
|
377
|
+
});
|
|
378
|
+
} else F(e);
|
|
379
|
+
}
|
|
380
|
+
export {
|
|
381
|
+
ke as $,
|
|
382
|
+
L as a,
|
|
383
|
+
p as b,
|
|
384
|
+
S as c,
|
|
385
|
+
b as d,
|
|
386
|
+
Ce as e,
|
|
387
|
+
Se as f,
|
|
388
|
+
xe as g,
|
|
389
|
+
ee as h,
|
|
390
|
+
Ee as i,
|
|
391
|
+
Le as j,
|
|
392
|
+
ye as k,
|
|
393
|
+
Me as l,
|
|
394
|
+
I as m,
|
|
395
|
+
Pe as n,
|
|
396
|
+
le as o,
|
|
397
|
+
F as p,
|
|
398
|
+
$e as q,
|
|
399
|
+
Te as r,
|
|
400
|
+
be as s
|
|
401
|
+
};
|
|
402
|
+
//# sourceMappingURL=focusSafely-b94Glb9J.js.map
|