@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.
Files changed (155) hide show
  1. package/dist/Button.module-DfLXeuUK.js +14 -0
  2. package/dist/Button.module-DfLXeuUK.js.map +1 -0
  3. package/dist/{MenuLink-DoSTuelN.js → MenuLink-CSnr2Az4.js} +6 -6
  4. package/dist/MenuLink-CSnr2Az4.js.map +1 -0
  5. package/dist/{MultiSelect-Drcfmp0z.js → MultiSelect-Blc_VDxu.js} +2 -2
  6. package/dist/{MultiSelect-Drcfmp0z.js.map → MultiSelect-Blc_VDxu.js.map} +1 -1
  7. package/dist/MultiSelectItem-CPf7drsR.js +24 -0
  8. package/dist/MultiSelectItem-CPf7drsR.js.map +1 -0
  9. package/dist/assets/ActionList.css +1 -0
  10. package/dist/assets/Button.css +1 -1
  11. package/dist/assets/Container.css +1 -1
  12. package/dist/assets/CourseCard.css +1 -0
  13. package/dist/assets/CourseCardHeader.css +1 -0
  14. package/dist/assets/CourseCardOffering.css +1 -0
  15. package/dist/assets/MultiSelectItem.css +1 -1
  16. package/dist/assets/Periods.css +1 -0
  17. package/dist/assets/StatusPill.css +1 -1
  18. package/dist/components/Accordion/Accordion.stories.d.ts +2 -2
  19. package/dist/components/ActionList/ActionList.d.ts +12 -0
  20. package/dist/components/ActionList/ActionList.js +76 -0
  21. package/dist/components/ActionList/ActionList.js.map +1 -0
  22. package/dist/components/ActionList/ActionList.stories.d.ts +6 -0
  23. package/dist/components/ActionList/ActionList.stories.js +29 -0
  24. package/dist/components/ActionList/ActionList.stories.js.map +1 -0
  25. package/dist/components/ActionList/index.d.ts +1 -0
  26. package/dist/components/ActionList/index.js +5 -0
  27. package/dist/components/ActionList/index.js.map +1 -0
  28. package/dist/components/AppStatusBar/AppStatusBar.stories.d.ts +1 -1
  29. package/dist/components/Attention/Attention.stories.d.ts +1 -1
  30. package/dist/components/Backdrop/Backdrop.stories.d.ts +1 -1
  31. package/dist/components/Button/Button.js +14 -21
  32. package/dist/components/Button/Button.js.map +1 -1
  33. package/dist/components/Button/Button.stories.d.ts +2 -2
  34. package/dist/components/Button/Button.stories.js +1 -1
  35. package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +1 -1
  36. package/dist/components/Card/Card.stories.d.ts +3 -3
  37. package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -1
  38. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  39. package/dist/components/CourseCard/CourseCard.d.ts +33 -0
  40. package/dist/components/CourseCard/CourseCard.js +50 -0
  41. package/dist/components/CourseCard/CourseCard.js.map +1 -0
  42. package/dist/components/CourseCard/CourseCard.stories.d.ts +7 -0
  43. package/dist/components/CourseCard/CourseCard.stories.js +461 -0
  44. package/dist/components/CourseCard/CourseCard.stories.js.map +1 -0
  45. package/dist/components/CourseCard/CourseCardHeader/CourseCardHeader.d.ts +13 -0
  46. package/dist/components/CourseCard/CourseCardHeader/CourseCardHeader.js +39 -0
  47. package/dist/components/CourseCard/CourseCardHeader/CourseCardHeader.js.map +1 -0
  48. package/dist/components/CourseCard/CourseCardHeader/index.d.ts +1 -0
  49. package/dist/components/CourseCard/CourseCardHeader/index.js +5 -0
  50. package/dist/components/CourseCard/CourseCardHeader/index.js.map +1 -0
  51. package/dist/components/CourseCard/CourseCardOffering/CourseCardOffering.d.ts +8 -0
  52. package/dist/components/CourseCard/CourseCardOffering/CourseCardOffering.js +24 -0
  53. package/dist/components/CourseCard/CourseCardOffering/CourseCardOffering.js.map +1 -0
  54. package/dist/components/CourseCard/CourseCardOffering/index.d.ts +1 -0
  55. package/dist/components/CourseCard/CourseCardOffering/index.js +5 -0
  56. package/dist/components/CourseCard/CourseCardOffering/index.js.map +1 -0
  57. package/dist/components/CourseCard/index.d.ts +1 -0
  58. package/dist/components/CourseCard/index.js +5 -0
  59. package/dist/components/CourseCard/index.js.map +1 -0
  60. package/dist/components/CourseCard/mockdata.d.ts +23 -0
  61. package/dist/components/Drawer/Drawer.js +1 -1
  62. package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
  63. package/dist/components/Drawer/Drawer.stories.js +2 -2
  64. package/dist/components/FieldHint/FieldHint.stories.d.ts +2 -2
  65. package/dist/components/Fieldset/Fieldset.stories.d.ts +2 -2
  66. package/dist/components/FormField/FormField.stories.d.ts +1 -1
  67. package/dist/components/GridRow/GridRow.stories.d.ts +2 -2
  68. package/dist/components/HorizontalList/HorizontalList.stories.d.ts +1 -1
  69. package/dist/components/Icon/Icon.stories.d.ts +1 -1
  70. package/dist/components/Icon/icons/index.d.ts +6 -0
  71. package/dist/components/Icon/icons/index.js +40 -38
  72. package/dist/components/Icon/icons/index.js.map +1 -1
  73. package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
  74. package/dist/components/IconButton/IconButton.stories.js +1 -1
  75. package/dist/components/InfoMessage/InfoMessage.stories.d.ts +1 -1
  76. package/dist/components/Input/Input.stories.d.ts +4 -4
  77. package/dist/components/InputField/InputField.stories.d.ts +3 -3
  78. package/dist/components/InputField/InputField.stories.js +2 -2
  79. package/dist/components/Label/Label.stories.d.ts +2 -2
  80. package/dist/components/MenuButton/MenuButton.d.ts +13 -0
  81. package/dist/components/MenuButton/MenuButton.js +621 -0
  82. package/dist/components/MenuButton/MenuButton.js.map +1 -0
  83. package/dist/components/MenuButton/MenuButton.stories.d.ts +8 -0
  84. package/dist/components/MenuButton/MenuButton.stories.js +58 -0
  85. package/dist/components/MenuButton/MenuButton.stories.js.map +1 -0
  86. package/dist/components/MenuButton/index.d.ts +1 -0
  87. package/dist/components/MenuButton/index.js +5 -0
  88. package/dist/components/MenuButton/index.js.map +1 -0
  89. package/dist/components/MenuLink/MenuLink.js +1 -1
  90. package/dist/components/MenuLink/MenuLink.stories.d.ts +1 -1
  91. package/dist/components/MenuLink/MenuLink.stories.js +1 -1
  92. package/dist/components/MenuLink/index.js +1 -1
  93. package/dist/components/MetaDataList/MetaDataList.stories.d.ts +1 -1
  94. package/dist/components/ModalDialog/ModalDialog.js +1 -1
  95. package/dist/components/ModalDialog/ModalDialog.stories.d.ts +2 -2
  96. package/dist/components/ModalDialog/ModalDialog.stories.js +2 -2
  97. package/dist/components/MultiSelect/MultiSelect.js +2 -2
  98. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +3 -3
  99. package/dist/components/MultiSelect/MultiSelect.stories.js +25 -24
  100. package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
  101. package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
  102. package/dist/components/MultiSelect/components/MultiSelectItem.d.ts +2 -1
  103. package/dist/components/MultiSelect/components/MultiSelectItem.js +1 -1
  104. package/dist/components/MultiSelect/index.js +1 -1
  105. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.d.ts +1 -1
  106. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  107. package/dist/components/Periods/Periods.d.ts +13 -0
  108. package/dist/components/Periods/Periods.js +35 -0
  109. package/dist/components/Periods/Periods.js.map +1 -0
  110. package/dist/components/Periods/Periods.stories.d.ts +6 -0
  111. package/dist/components/Periods/Periods.stories.js +54 -0
  112. package/dist/components/Periods/Periods.stories.js.map +1 -0
  113. package/dist/components/Periods/index.d.ts +1 -0
  114. package/dist/components/Periods/index.js +5 -0
  115. package/dist/components/Periods/index.js.map +1 -0
  116. package/dist/components/ProgrammeCard/ProgrammeCard.stories.d.ts +3 -3
  117. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
  118. package/dist/components/RadioButton/RadioButton.stories.d.ts +1 -1
  119. package/dist/components/Repeater/Repeater.stories.d.ts +1 -1
  120. package/dist/components/SectionNotification/SectionNotification.stories.d.ts +1 -1
  121. package/dist/components/SelectListbox/SelectListBox.stories.d.ts +2 -2
  122. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  123. package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
  124. package/dist/components/StatusPill/StatusPill.d.ts +1 -1
  125. package/dist/components/StatusPill/StatusPill.js +8 -7
  126. package/dist/components/StatusPill/StatusPill.js.map +1 -1
  127. package/dist/components/StatusPill/StatusPill.stories.d.ts +1 -1
  128. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  129. package/dist/components/index.d.ts +4 -0
  130. package/dist/components/index.js +73 -65
  131. package/dist/components/index.js.map +1 -1
  132. package/dist/components/storyComponents/Container/Container.js +12 -12
  133. package/dist/focusSafely-b94Glb9J.js +402 -0
  134. package/dist/focusSafely-b94Glb9J.js.map +1 -0
  135. package/dist/index-0Faxlks_.js +25525 -0
  136. package/dist/index-0Faxlks_.js.map +1 -0
  137. package/dist/{index-BNwc4sai.js → index-HuvfQN5H.js} +427 -425
  138. package/dist/{index-BNwc4sai.js.map → index-HuvfQN5H.js.map} +1 -1
  139. package/dist/index.js +73 -65
  140. package/dist/index.js.map +1 -1
  141. package/dist/types/UserInterface.d.ts +4 -0
  142. package/dist/types/UserInterface.js +2 -0
  143. package/dist/types/UserInterface.js.map +1 -0
  144. package/dist/useDialog-DZhIlo2a.js +785 -0
  145. package/dist/useDialog-DZhIlo2a.js.map +1 -0
  146. package/package.json +30 -27
  147. package/dist/MenuLink-DoSTuelN.js.map +0 -1
  148. package/dist/MultiSelectItem-CwKowz2B.js +0 -24
  149. package/dist/MultiSelectItem-CwKowz2B.js.map +0 -1
  150. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
  151. package/dist/_commonjsHelpers-DaMA6jEr.js.map +0 -1
  152. package/dist/index-Do6xof80.js +0 -14702
  153. package/dist/index-Do6xof80.js.map +0 -1
  154. package/dist/useDialog-D4QXqVAd.js +0 -1133
  155. package/dist/useDialog-D4QXqVAd.js.map +0 -1
@@ -1,72 +1,80 @@
1
1
  import { Accordion as t } from "./Accordion/Accordion.js";
2
- import { AppStatusBar as p } from "./AppStatusBar/AppStatusBar.js";
3
- import { Attention as f } from "./Attention/Attention.js";
4
- import { Backdrop as i } from "./Backdrop/Backdrop.js";
5
- import { Button as n } from "./Button/Button.js";
6
- import { ButtonGroup as u } from "./ButtonGroup/ButtonGroup.js";
7
- import { Card as d } from "./Card/Card.js";
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";
7
+ import { ButtonGroup as d } from "./ButtonGroup/ButtonGroup.js";
8
+ import { Card as B } from "./Card/Card.js";
8
9
  import { Checkbox as S } from "./Checkbox/Checkbox.js";
9
- import { Drawer as M } from "./Drawer/Drawer.js";
10
- import { FieldHint as I } from "./FieldHint/FieldHint.js";
11
- import { Fieldset as C } from "./Fieldset/Fieldset.js";
12
- import { FormField as g } from "./FormField/FormField.js";
13
- import { GridRow as A } from "./GridRow/GridRow.js";
14
- import { HorizontalList as P } from "./HorizontalList/HorizontalList.js";
15
- import { Icon as v } from "./Icon/Icon.js";
16
- import { IconButton as G } from "./IconButton/IconButton.js";
17
- import { InfoMessage as h } from "./InfoMessage/InfoMessage.js";
18
- import { Input as z } from "./Input/Input.js";
19
- import { InputField as O } from "./InputField/InputField.js";
20
- import { Label as j } from "./Label/Label.js";
21
- import { M as E } from "../MenuLink-DoSTuelN.js";
22
- import { MetaDataList as K } from "./MetaDataList/MetaDataList.js";
23
- import { ModalDialog as U } from "./ModalDialog/ModalDialog.js";
24
- import { M as W } from "../MultiSelect-Drcfmp0z.js";
25
- import { OverlayCloseButton as Y } from "./OverlayCloseButton/OverlayCloseButton.js";
26
- import { ProgrammeCard as _ } from "./ProgrammeCard/ProgrammeCard.js";
27
- import { RadioButton as oo } from "./RadioButton/RadioButton.js";
28
- import { Repeater as to } from "./Repeater/Repeater.js";
29
- import { SectionNotification as po } from "./SectionNotification/SectionNotification.js";
30
- import { SelectListbox as fo } from "./SelectListbox/SelectListbox.js";
31
- import { SelectProvider as io, useSelect as ao } from "./SelectListbox/SelectProvider.js";
32
- import { Spinner as lo } from "./Spinner/Spinner.js";
33
- import { StatusPill as co } from "./StatusPill/StatusPill.js";
34
- import { Tooltip as So } from "./Tooltip/Tooltip.js";
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";
35
39
  export {
36
40
  t as Accordion,
37
- p as AppStatusBar,
38
- f as Attention,
39
- i as Backdrop,
40
- n as Button,
41
- u as ButtonGroup,
42
- d as Card,
41
+ p as ActionList,
42
+ f as AppStatusBar,
43
+ i as Attention,
44
+ a as Backdrop,
45
+ u as Button,
46
+ d as ButtonGroup,
47
+ B as Card,
43
48
  S as Checkbox,
44
- M as Drawer,
45
- I as FieldHint,
46
- C as Fieldset,
47
- g as FormField,
48
- A as GridRow,
49
- P as HorizontalList,
50
- v as Icon,
51
- G as IconButton,
52
- h as InfoMessage,
53
- z as Input,
54
- O as InputField,
55
- j as Label,
56
- E as MenuLink,
57
- K as MetaDataList,
58
- U as ModalDialog,
59
- W as MultiSelect,
60
- Y as OverlayCloseButton,
61
- _ as ProgrammeCard,
62
- oo as RadioButton,
63
- to as Repeater,
64
- po as SectionNotification,
65
- fo as SelectListbox,
66
- io as SelectProvider,
67
- lo as Spinner,
68
- co as StatusPill,
69
- So as Tooltip,
70
- ao as useSelect
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
71
79
  };
72
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 m, jsx as r } from "react/jsx-runtime";
2
- import { c as d } from "../../../clsx-OuTLNxxd.js";
3
- import '../../../assets/Container.css';const l = "_container_11my7_1", n = {
4
- container: l,
5
- "container--padded": "_container--padded_11my7_7",
6
- "container--small": "_container--small_11my7_11",
7
- "container--medium": "_container--medium_11my7_16",
8
- "container--large": "_container--large_11my7_21",
9
- "container--hidden": "_container--hidden_11my7_26",
10
- "container--centered-content": "_container--centered-content_11my7_30"
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(m, { children: [
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: d(n.container, {
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