@uva-glass/component-library 3.11.0 → 3.11.1

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 (43) hide show
  1. package/dist/assets/MultiSelectBox.css +1 -1
  2. package/dist/client-EQRlhXX7.js +25200 -0
  3. package/dist/client-EQRlhXX7.js.map +1 -0
  4. package/dist/components/Accordion/Accordion.test.js +2 -2
  5. package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
  6. package/dist/components/ActionList/ActionList.test.js +2 -2
  7. package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
  8. package/dist/components/Attention/Attention.test.js +1 -1
  9. package/dist/components/Backdrop/Backdrop.test.js +1 -1
  10. package/dist/components/Buttons/Button.test.js +1 -1
  11. package/dist/components/Buttons/LinkButton.test.js +1 -1
  12. package/dist/components/Buttons/MenuButton.d.ts +1 -3
  13. package/dist/components/Buttons/MenuButton.js.map +1 -1
  14. package/dist/components/Buttons/MenuButton.test.js +1 -1
  15. package/dist/components/Card/Card.test.js +1 -1
  16. package/dist/components/Checkbox/Checkbox.test.js +1 -1
  17. package/dist/components/CheckboxButton/CheckboxButton.test.js +1 -1
  18. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
  19. package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
  20. package/dist/components/Label/Label.test.js +1 -1
  21. package/dist/components/MultiSelectBox/MultiSelectBox.js +67 -67
  22. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
  23. package/dist/components/PageOverlay/PageOverlay.stories.js +35 -35
  24. package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
  25. package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
  26. package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
  27. package/dist/components/TextArea/TextArea.test.js +1 -1
  28. package/dist/components/Timeline/Timeline.test.js +1 -1
  29. package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
  30. package/dist/{index-xaEX581l.js → index-CUap8sKR.js} +2 -2
  31. package/dist/{index-xaEX581l.js.map → index-CUap8sKR.js.map} +1 -1
  32. package/dist/{react-18-CcyoHPTJ.js → react-18-dpbWrd2-.js} +2 -2
  33. package/dist/{react-18-CcyoHPTJ.js.map → react-18-dpbWrd2-.js.map} +1 -1
  34. package/dist/{react.esm-PmLHNn73.js → react.esm-CsMDid07.js} +3 -3
  35. package/dist/{react.esm-PmLHNn73.js.map → react.esm-CsMDid07.js.map} +1 -1
  36. package/dist/storybook__react.d.js +2 -2
  37. package/dist/test-utils-ea_YDVtd.js +74 -0
  38. package/dist/test-utils-ea_YDVtd.js.map +1 -0
  39. package/package.json +14 -14
  40. package/dist/client-CTOhtEms.js +0 -33
  41. package/dist/client-CTOhtEms.js.map +0 -1
  42. package/dist/test-utils-grX3FDss.js +0 -1148
  43. package/dist/test-utils-grX3FDss.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as n, s as a } from "../../react.esm-PmLHNn73.js";
4
- import { u as e } from "../../index-xaEX581l.js";
3
+ import { r as n, s as a } from "../../react.esm-CsMDid07.js";
4
+ import { u as e } from "../../index-CUap8sKR.js";
5
5
  import { Accordion as i } from "./Accordion.js";
6
6
  describe("Accordion", () => {
7
7
  it("should render", () => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as c, s as e, f as s, w as d } from "../../react.esm-PmLHNn73.js";
4
- import { u as r } from "../../index-xaEX581l.js";
3
+ import { r as c, s as e, f as s, w as d } from "../../react.esm-CsMDid07.js";
4
+ import { u as r } from "../../index-CUap8sKR.js";
5
5
  import { AccordionCard as a } from "./AccordionCard.js";
6
6
  describe("AccordionCard", () => {
7
7
  it("should render", () => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as n, s as t, w as a } from "../../react.esm-PmLHNn73.js";
4
- import { u as l } from "../../index-xaEX581l.js";
3
+ import { r as n, s as t, w as a } from "../../react.esm-CsMDid07.js";
4
+ import { u as l } from "../../index-CUap8sKR.js";
5
5
  import { ActionList as o } from "./ActionList.js";
6
6
  const T = jest.fn(), c = [
7
7
  /* @__PURE__ */ i("button", { type: "button", onClick: T, children: "Test Action 1" }, "1"),
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r, s as t } from "../../react.esm-PmLHNn73.js";
3
+ import { r, s as t } from "../../react.esm-CsMDid07.js";
4
4
  import { AppStatusBar as s } from "./AppStatusBar.js";
5
5
  describe("AppStatusBar", () => {
6
6
  it("should render", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as t, s as r } from "../../react.esm-PmLHNn73.js";
3
+ import { r as t, s as r } from "../../react.esm-CsMDid07.js";
4
4
  import { Attention as n } from "./Attention.js";
5
5
  describe("Attention", () => {
6
6
  it("should render (variant primary)", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as e, s as o } from "../../react.esm-PmLHNn73.js";
3
+ import { r as e, s as o } from "../../react.esm-CsMDid07.js";
4
4
  import { Backdrop as t } from "./Backdrop.js";
5
5
  describe("Backdrop", () => {
6
6
  it("should render", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as n, s as t, f as c } from "../../react.esm-PmLHNn73.js";
3
+ import { r as n, s as t, f as c } from "../../react.esm-CsMDid07.js";
4
4
  import { Button as o } from "./Button.js";
5
5
  const s = jest.fn();
6
6
  describe("Button", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as n, s as t, f as c } from "../../react.esm-PmLHNn73.js";
3
+ import { r as n, s as t, f as c } from "../../react.esm-CsMDid07.js";
4
4
  import { BrowserRouter as u, Routes as a, Route as d } from "react-router";
5
5
  import { LinkButton as o } from "./LinkButton.js";
6
6
  const r = ({ children: i }) => /* @__PURE__ */ s(u, { children: [
@@ -1,6 +1,6 @@
1
1
  import { AriaButtonProps } from '@react-aria/button';
2
2
  import { IconProps } from 'components/Icon';
3
- import { MouseEvent, RefObject } from 'react';
3
+ import { RefObject } from 'react';
4
4
  import { UIButtonVariant } from 'types/UserInterface';
5
5
  export interface MenuButtonProps extends AriaButtonProps<'button'> {
6
6
  buttonRef: RefObject<HTMLButtonElement>;
@@ -8,8 +8,6 @@ export interface MenuButtonProps extends AriaButtonProps<'button'> {
8
8
  variant: UIButtonVariant;
9
9
  /** The icon to show. */
10
10
  iconName?: IconProps['name'];
11
- /** The callback function that is invoked when the button is clicked. */
12
- onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
13
11
  }
14
12
  /** Represents a button that is used to open a menu. */
15
13
  export declare function MenuButton({ buttonRef, variant, iconName, children, ...restProps }: MenuButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.js","sources":["../../../src/components/Buttons/MenuButton.tsx"],"sourcesContent":["import { useButton } from '@react-aria/button';\nimport { clsx } from 'clsx';\n\nimport type { AriaButtonProps } from '@react-aria/button';\nimport type { IconProps } from 'components/Icon';\nimport type { MouseEvent, RefObject } from 'react';\nimport type { UIButtonVariant } from 'types/UserInterface';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/Buttons/Button.module.css';\n\nexport interface MenuButtonProps extends AriaButtonProps<'button'> {\n buttonRef: RefObject<HTMLButtonElement>;\n /** The variant of the button. */\n variant: UIButtonVariant;\n /** The icon to show. */\n iconName?: IconProps['name'];\n /** The callback function that is invoked when the button is clicked. */\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n}\n\n/** Represents a button that is used to open a menu. */\nexport function MenuButton({ buttonRef, variant, iconName, children, ...restProps }: MenuButtonProps) {\n const { buttonProps } = useButton(restProps, buttonRef);\n\n return (\n <button {...buttonProps} ref={buttonRef} className={clsx(styles['button'], styles[`button--${variant}`])}>\n {children}\n {iconName && <Icon name={iconName} />}\n </button>\n );\n}\n"],"names":["MenuButton","buttonRef","variant","iconName","children","restProps","buttonProps","useButton","clsx","styles","jsx","Icon"],"mappings":";;;;;AAsBgB,SAAAA,EAAW,EAAE,WAAAC,GAAW,SAAAC,GAAS,UAAAC,GAAU,UAAAC,GAAU,GAAGC,KAA8B;AACpG,QAAM,EAAE,aAAAC,EAAgB,IAAAC,EAAUF,GAAWJ,CAAS;AAEtD,2BACG,UAAQ,EAAA,GAAGK,GAAa,KAAKL,GAAW,WAAWO,EAAKC,EAAO,QAAWA,EAAO,WAAWP,CAAO,EAAE,CAAC,GACpG,UAAA;AAAA,IAAAE;AAAA,IACAD,KAAY,gBAAAO,EAACC,GAAK,EAAA,MAAMR,EAAU,CAAA;AAAA,EAAA,GACrC;AAEJ;"}
1
+ {"version":3,"file":"MenuButton.js","sources":["../../../src/components/Buttons/MenuButton.tsx"],"sourcesContent":["import { useButton } from '@react-aria/button';\nimport { clsx } from 'clsx';\n\nimport type { AriaButtonProps } from '@react-aria/button';\nimport type { IconProps } from 'components/Icon';\nimport type { RefObject } from 'react';\nimport type { UIButtonVariant } from 'types/UserInterface';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/Buttons/Button.module.css';\n\nexport interface MenuButtonProps extends AriaButtonProps<'button'> {\n buttonRef: RefObject<HTMLButtonElement>;\n /** The variant of the button. */\n variant: UIButtonVariant;\n /** The icon to show. */\n iconName?: IconProps['name'];\n}\n\n/** Represents a button that is used to open a menu. */\nexport function MenuButton({ buttonRef, variant, iconName, children, ...restProps }: MenuButtonProps) {\n const { buttonProps } = useButton(restProps, buttonRef);\n\n return (\n <button {...buttonProps} ref={buttonRef} className={clsx(styles['button'], styles[`button--${variant}`])}>\n {children}\n {iconName && <Icon name={iconName} />}\n </button>\n );\n}\n"],"names":["MenuButton","buttonRef","variant","iconName","children","restProps","buttonProps","useButton","clsx","styles","jsx","Icon"],"mappings":";;;;;AAoBgB,SAAAA,EAAW,EAAE,WAAAC,GAAW,SAAAC,GAAS,UAAAC,GAAU,UAAAC,GAAU,GAAGC,KAA8B;AACpG,QAAM,EAAE,aAAAC,EAAgB,IAAAC,EAAUF,GAAWJ,CAAS;AAEtD,2BACG,UAAQ,EAAA,GAAGK,GAAa,KAAKL,GAAW,WAAWO,EAAKC,EAAO,QAAWA,EAAO,WAAWP,CAAO,EAAE,CAAC,GACpG,UAAA;AAAA,IAAAE;AAAA,IACAD,KAAY,gBAAAO,EAACC,GAAK,EAAA,MAAMR,EAAU,CAAA;AAAA,EAAA,GACrC;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as u, s as e, f as c } from "../../react.esm-PmLHNn73.js";
3
+ import { r as u, s as e, f as c } from "../../react.esm-CsMDid07.js";
4
4
  import { createRef as s } from "react";
5
5
  import { MenuButton as r } from "./MenuButton.js";
6
6
  const n = jest.fn();
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r, s as d } from "../../react.esm-PmLHNn73.js";
3
+ import { r, s as d } from "../../react.esm-CsMDid07.js";
4
4
  import { Card as o } from "./Card.js";
5
5
  describe("Card", () => {
6
6
  it("should render", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as o, s as t } from "../../react.esm-PmLHNn73.js";
3
+ import { r as o, s as t } from "../../react.esm-CsMDid07.js";
4
4
  import { Checkbox as h } from "./Checkbox.js";
5
5
  describe("Checkbox", () => {
6
6
  it("should render", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as n, s as t } from "../../react.esm-PmLHNn73.js";
3
+ import { r as n, s as t } from "../../react.esm-CsMDid07.js";
4
4
  import { CheckboxButton as a } from "./CheckboxButton.js";
5
5
  const c = jest.fn();
6
6
  describe("CheckboxButton", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as c, s as e } from "../../react.esm-PmLHNn73.js";
3
+ import { r as c, s as e } from "../../react.esm-CsMDid07.js";
4
4
  import { CheckboxButtonBar as a } from "./CheckboxButtonBar.js";
5
5
  const n = jest.fn(), x = [
6
6
  {
@@ -1,6 +1,6 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as s, s as e, f as r } from "../../react.esm-PmLHNn73.js";
3
+ import { r as s, s as e, f as r } from "../../react.esm-CsMDid07.js";
4
4
  import { FeedbackBar as c } from "./FeedbackBar.js";
5
5
  describe("FeedbackBar", () => {
6
6
  it("should render with children text", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as t, s as l } from "../../react.esm-PmLHNn73.js";
3
+ import { r as t, s as l } from "../../react.esm-CsMDid07.js";
4
4
  import { Label as r } from "./Label.js";
5
5
  describe("Label", () => {
6
6
  it("should render", () => {
@@ -1,31 +1,31 @@
1
1
  import { jsxs as f, jsx as b } from "react/jsx-runtime";
2
- import { useRef as k, useId as P, useState as g, useCallback as w, useLayoutEffect as R, useEffect as h } from "react";
3
- import { c as v } from "../../clsx-OuTLNxxd.js";
2
+ import { useRef as h, useId as P, useState as g, useCallback as w, useLayoutEffect as R, useEffect as v } from "react";
3
+ import { c as I } from "../../clsx-OuTLNxxd.js";
4
4
  import { Icon as H } from "../Icon/Icon.js";
5
5
  import { Checkbox as M } from "../Checkbox/Checkbox.js";
6
- import '../../assets/MultiSelectBox.css';const i = {
7
- "multi-select-box-wrapper": "_multi-select-box-wrapper_5k31m_1",
8
- "multi-select-box-trigger": "_multi-select-box-trigger_5k31m_5",
9
- "multi-select-box-trigger-label": "_multi-select-box-trigger-label_5k31m_32",
10
- "multi-select-box-trigger-icon": "_multi-select-box-trigger-icon_5k31m_41",
11
- "multi-select-box-trigger-icon--open": "_multi-select-box-trigger-icon--open_5k31m_46",
12
- "multi-select-box-listbox--wrapper": "_multi-select-box-listbox--wrapper_5k31m_50",
13
- "multi-select-box-listbox--wrapper-above": "_multi-select-box-listbox--wrapper-above_5k31m_63",
14
- "multi-select-box-listbox--wrapper-open": "_multi-select-box-listbox--wrapper-open_5k31m_68",
15
- "multi-select-box-listbox": "_multi-select-box-listbox_5k31m_50",
16
- "multi-select-box-listbox-option": "_multi-select-box-listbox-option_5k31m_87",
17
- "multi-select-box-listbox-option--active": "_multi-select-box-listbox-option--active_5k31m_98",
18
- "multi-select-box-listbox-option-content": "_multi-select-box-listbox-option-content_5k31m_109",
19
- "multi-select-box-listbox-option--disabled": "_multi-select-box-listbox-option--disabled_5k31m_122"
6
+ import '../../assets/MultiSelectBox.css';const r = {
7
+ "multi-select-box-wrapper": "_multi-select-box-wrapper_r576s_1",
8
+ "multi-select-box-trigger": "_multi-select-box-trigger_r576s_5",
9
+ "multi-select-box-trigger-label": "_multi-select-box-trigger-label_r576s_32",
10
+ "multi-select-box-trigger-icon": "_multi-select-box-trigger-icon_r576s_41",
11
+ "multi-select-box-trigger-icon--open": "_multi-select-box-trigger-icon--open_r576s_46",
12
+ "multi-select-box-listbox--wrapper": "_multi-select-box-listbox--wrapper_r576s_50",
13
+ "multi-select-box-listbox--wrapper-above": "_multi-select-box-listbox--wrapper-above_r576s_63",
14
+ "multi-select-box-listbox--wrapper-open": "_multi-select-box-listbox--wrapper-open_r576s_68",
15
+ "multi-select-box-listbox": "_multi-select-box-listbox_r576s_50",
16
+ "multi-select-box-listbox-option": "_multi-select-box-listbox-option_r576s_87",
17
+ "multi-select-box-listbox-option--active": "_multi-select-box-listbox-option--active_r576s_98",
18
+ "multi-select-box-listbox-option-content": "_multi-select-box-listbox-option-content_r576s_109",
19
+ "multi-select-box-listbox-option--disabled": "_multi-select-box-listbox-option--disabled_r576s_123"
20
20
  }, U = ({
21
21
  selectData: c,
22
22
  onChange: _,
23
- labelSuffix: I = "geselecteerd",
23
+ labelSuffix: k = "geselecteerd",
24
24
  disabled: A = !1
25
25
  }) => {
26
- const m = k(null), y = k(P()), [n, E] = g([]), [N, S] = g(0), [s, a] = g(!1), [p, x] = g(-1), u = k(null), [B, L] = g("below"), d = w((e) => {
26
+ const p = h(null), y = h(P()), [n, E] = g([]), [N, S] = g(0), [l, a] = g(!1), [m, x] = g(-1), u = h(null), [B, L] = g("below"), d = w((e) => {
27
27
  const t = e.target;
28
- !t || !u.current || !m.current || u.current.contains(t) || m.current.contains(t) || a(!1);
28
+ !t || !u.current || !p.current || u.current.contains(t) || p.current.contains(t) || a(!1);
29
29
  }, []), C = w(
30
30
  (e) => {
31
31
  switch (e.key) {
@@ -33,40 +33,40 @@ import '../../assets/MultiSelectBox.css';const i = {
33
33
  e.preventDefault(), a(!0);
34
34
  break;
35
35
  case "Escape":
36
- s && (e.stopPropagation(), a(!1));
36
+ l && (e.stopPropagation(), a(!1));
37
37
  break;
38
38
  }
39
39
  },
40
- [s]
40
+ [l]
41
41
  ), D = w(
42
42
  (e) => {
43
- if (s)
43
+ if (l)
44
44
  switch (e.key) {
45
45
  case "ArrowDown":
46
46
  e.preventDefault(), x((t) => {
47
47
  var o;
48
- let l = t;
48
+ let s = t;
49
49
  do
50
- l = l < c.length - 1 ? l + 1 : 0;
51
- while ((o = c[l]) != null && o.disabled);
52
- return l;
50
+ s = s < c.length - 1 ? s + 1 : 0;
51
+ while ((o = c[s]) != null && o.disabled);
52
+ return s;
53
53
  });
54
54
  break;
55
55
  case "ArrowUp":
56
56
  e.preventDefault(), x((t) => {
57
57
  var o;
58
- let l = t;
58
+ let s = t;
59
59
  do
60
- l = l <= 0 ? c.length - 1 : l - 1;
61
- while ((o = c[l]) != null && o.disabled);
62
- return l;
60
+ s = s <= 0 ? c.length - 1 : s - 1;
61
+ while ((o = c[s]) != null && o.disabled);
62
+ return s;
63
63
  });
64
64
  break;
65
65
  case "Enter": {
66
66
  e.preventDefault();
67
- const t = c[p];
67
+ const t = c[m];
68
68
  if (!t || t.disabled) break;
69
- const o = n.some((r) => r.value === t.value) ? n.filter((r) => r.value !== t.value) : [...n, t];
69
+ const o = n.some((i) => i.value === t.value) ? n.filter((i) => i.value !== t.value) : [...n, t];
70
70
  E(o), S(o.length), _(o);
71
71
  break;
72
72
  }
@@ -78,61 +78,61 @@ import '../../assets/MultiSelectBox.css';const i = {
78
78
  break;
79
79
  }
80
80
  },
81
- [p, s, c, n, _]
81
+ [m, l, c, n, _]
82
82
  ), K = w(
83
83
  (e) => {
84
- const { checked: t, value: l } = e.target;
84
+ const { checked: t, value: s } = e.target;
85
85
  let o = [...n];
86
86
  if (t) {
87
- const r = c.find((O) => O.value === l);
88
- r && o.push(r);
87
+ const i = c.find((O) => O.value === s);
88
+ i && o.push(i);
89
89
  } else
90
- o = o.filter((r) => r.value !== l);
90
+ o = o.filter((i) => i.value !== s);
91
91
  E(o), S(o.length), _(o);
92
92
  },
93
93
  [c, n, _]
94
94
  );
95
95
  return R(() => {
96
- if (s && m.current && u.current) {
97
- const e = m.current.getBoundingClientRect(), t = u.current.offsetHeight;
96
+ if (l && p.current && u.current) {
97
+ const e = p.current.getBoundingClientRect(), t = u.current.offsetHeight;
98
98
  window.innerHeight - e.bottom < t ? L("above") : L("below");
99
99
  }
100
- }, [s]), h(() => {
101
- s && x(0);
102
- }, [s]), h(() => {
100
+ }, [l]), v(() => {
101
+ l && x(0);
102
+ }, [l]), v(() => {
103
103
  var t;
104
- const e = (t = u.current) == null ? void 0 : t.children[p];
104
+ const e = (t = u.current) == null ? void 0 : t.children[m];
105
105
  e == null || e.focus();
106
- }, [p]), h(() => {
107
- if (s)
106
+ }, [m]), v(() => {
107
+ if (l)
108
108
  return document.addEventListener("click", d, !0), document.addEventListener("scroll", d, !0), () => {
109
109
  document.removeEventListener("click", d, !0), document.removeEventListener("scroll", d, !0);
110
110
  };
111
- }, [d, s]), /* @__PURE__ */ f("div", { className: i["multi-select-box-wrapper"], children: [
111
+ }, [d, l]), /* @__PURE__ */ f("div", { className: r["multi-select-box-wrapper"], children: [
112
112
  /* @__PURE__ */ f(
113
113
  "button",
114
114
  {
115
- className: i["multi-select-box-trigger"],
115
+ className: r["multi-select-box-trigger"],
116
116
  type: "button",
117
117
  onClick: () => a((e) => !e),
118
118
  onKeyDown: C,
119
- "aria-expanded": s,
119
+ "aria-expanded": l,
120
120
  "aria-haspopup": "listbox",
121
- "aria-label": `${N} ${I}`,
121
+ "aria-label": `${N} ${k}`,
122
122
  disabled: A,
123
- ...s && { "aria-controls": y.current },
124
- ref: m,
123
+ ...l && { "aria-controls": y.current },
124
+ ref: p,
125
125
  children: [
126
- /* @__PURE__ */ f("span", { className: i["multi-select-box-trigger-label"], children: [
126
+ /* @__PURE__ */ f("span", { className: r["multi-select-box-trigger-label"], children: [
127
127
  N,
128
128
  " ",
129
- I
129
+ k
130
130
  ] }),
131
131
  /* @__PURE__ */ b(
132
132
  H,
133
133
  {
134
- className: v(i["multi-select-box-trigger-icon"], {
135
- [i["multi-select-box-trigger-icon--open"]]: s
134
+ className: I(r["multi-select-box-trigger-icon"], {
135
+ [r["multi-select-box-trigger-icon--open"]]: l
136
136
  }),
137
137
  name: "CheveronDown",
138
138
  size: 16
@@ -145,26 +145,26 @@ import '../../assets/MultiSelectBox.css';const i = {
145
145
  "div",
146
146
  {
147
147
  id: y.current,
148
- className: v(
149
- i["multi-select-box-listbox--wrapper"],
150
- s && i["multi-select-box-listbox--wrapper-open"],
151
- B === "above" && i["multi-select-box-listbox--wrapper-above"]
148
+ className: I(
149
+ r["multi-select-box-listbox--wrapper"],
150
+ l && r["multi-select-box-listbox--wrapper-open"],
151
+ B === "above" && r["multi-select-box-listbox--wrapper-above"]
152
152
  ),
153
153
  role: "listbox",
154
- children: /* @__PURE__ */ b("ul", { className: i["multi-select-box-listbox"], ref: u, children: c.map(({ label: e, value: t, disabled: l }, o) => /* @__PURE__ */ b(
154
+ children: /* @__PURE__ */ b("ul", { className: r["multi-select-box-listbox"], ref: u, children: c.map(({ label: e, value: t, disabled: s }, o) => /* @__PURE__ */ b(
155
155
  "li",
156
156
  {
157
- className: v(i["multi-select-box-listbox-option"], {
158
- [i["multi-select-box-listbox-option--active"]]: o === p,
159
- [i["multi-select-box-listbox-option--disabled"]]: l
157
+ className: I(r["multi-select-box-listbox-option"], {
158
+ [r["multi-select-box-listbox-option--active"]]: o === m,
159
+ [r["multi-select-box-listbox-option--disabled"]]: s
160
160
  }),
161
161
  role: "option",
162
162
  onKeyDown: D,
163
163
  onMouseOver: () => x(o),
164
164
  onFocus: () => x(o),
165
165
  tabIndex: 0,
166
- "aria-selected": n.some((r) => r.value === t),
167
- children: /* @__PURE__ */ f("label", { htmlFor: e, className: i["multi-select-box-listbox-option-content"], tabIndex: -1, children: [
166
+ "aria-selected": n.some((i) => i.value === t),
167
+ children: /* @__PURE__ */ f("label", { htmlFor: e, className: r["multi-select-box-listbox-option-content"], tabIndex: -1, children: [
168
168
  /* @__PURE__ */ b(
169
169
  M,
170
170
  {
@@ -172,8 +172,8 @@ import '../../assets/MultiSelectBox.css';const i = {
172
172
  onChange: K,
173
173
  value: t,
174
174
  tabIndex: -1,
175
- disabled: l,
176
- checked: n.some((r) => r.value === t)
175
+ disabled: s,
176
+ checked: n.some((i) => i.value === t)
177
177
  }
178
178
  ),
179
179
  /* @__PURE__ */ b("span", { children: e })
@@ -1,6 +1,6 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import "../../index-BqLi4tOb.js";
3
- import { r as a, s as t, f as l } from "../../react.esm-PmLHNn73.js";
3
+ import { r as a, s as t, f as l } from "../../react.esm-CsMDid07.js";
4
4
  import { MultiSelectBox as c } from "./MultiSelectBox.js";
5
5
  const i = jest.fn(), s = [
6
6
  { label: "Option 1", value: "1" },
@@ -1,51 +1,51 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import { OverlayProvider as P } from "@react-aria/overlays";
3
- import { useState as N, useRef as V, useEffect as j, useCallback as f } from "react";
3
+ import { useState as A, useRef as V, useEffect as j, useCallback as b } from "react";
4
4
  import { PageOverlay as v } from "./PageOverlay.js";
5
- import { Button as l } from "../Buttons/Button.js";
5
+ import { Button as r } from "../Buttons/Button.js";
6
6
  import "../Buttons/LinkButton.js";
7
7
  import "@react-aria/button";
8
8
  import { ButtonGroup as O } from "../ButtonGroup/ButtonGroup.js";
9
9
  import { InputField as M } from "../InputField/InputField.js";
10
- import { GridRow as b } from "../GridRow/GridRow.js";
10
+ import { GridRow as f } from "../GridRow/GridRow.js";
11
11
  import { Repeater as T } from "../Repeater/Repeater.js";
12
12
  function I(t, s, i) {
13
- let [n, c] = N(t || s), m = V(t !== void 0), a = t !== void 0;
13
+ let [n, c] = A(t || s), m = V(t !== void 0), a = t !== void 0;
14
14
  j(() => {
15
15
  let u = m.current;
16
- u !== a && console.warn(`WARN: A component changed from ${u ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}.`), m.current = a;
16
+ u !== a && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${u ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}.`), m.current = a;
17
17
  }, [
18
18
  a
19
19
  ]);
20
- let r = a ? t : n, y = f((u, ...h) => {
20
+ let l = a ? t : n, y = b((u, ...h) => {
21
21
  let q = (d, ...p) => {
22
- i && (Object.is(r, d) || i(d, ...p)), a || (r = d);
22
+ i && (Object.is(l, d) || i(d, ...p)), a || (l = d);
23
23
  };
24
- typeof u == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), c((p, ...A) => {
25
- let C = u(a ? r : p, ...A);
24
+ typeof u == "function" ? (process.env.NODE_ENV !== "production" && console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), c((p, ...N) => {
25
+ let C = u(a ? l : p, ...N);
26
26
  return q(C, ...h), a ? p : C;
27
27
  })) : (a || c(u), q(u, ...h));
28
28
  }, [
29
29
  a,
30
- r,
30
+ l,
31
31
  i
32
32
  ]);
33
33
  return [
34
- r,
34
+ l,
35
35
  y
36
36
  ];
37
37
  }
38
38
  function S(t) {
39
39
  let [s, i] = I(t.isOpen, t.defaultOpen || !1, t.onOpenChange);
40
- const n = f(() => {
40
+ const n = b(() => {
41
41
  i(!0);
42
42
  }, [
43
43
  i
44
- ]), c = f(() => {
44
+ ]), c = b(() => {
45
45
  i(!1);
46
46
  }, [
47
47
  i
48
- ]), m = f(() => {
48
+ ]), m = b(() => {
49
49
  i(!s);
50
50
  }, [
51
51
  i,
@@ -62,7 +62,7 @@ function S(t) {
62
62
  const k = `
63
63
  <PageOverlay isOpen={isOpen} title={title} onClose={onCloseFunction}
64
64
  onSubmit={onSubmitFunction} buttons={buttons}> {children} </PageOverlay>
65
- `, Y = {
65
+ `, Q = {
66
66
  title: "Molecules/PageOverlay",
67
67
  component: v,
68
68
  argTypes: {
@@ -97,15 +97,15 @@ const k = `
97
97
  }, x = (t) => {
98
98
  const { open: s, close: i, isOpen: n } = S({});
99
99
  return /* @__PURE__ */ o(P, { children: [
100
- /* @__PURE__ */ e(l, { variant: "primary", onClick: () => s(), children: "Open PageOverlay" }),
100
+ /* @__PURE__ */ e(r, { variant: "primary", onClick: () => s(), children: "Open PageOverlay" }),
101
101
  /* @__PURE__ */ e(
102
102
  v,
103
103
  {
104
104
  ...t,
105
105
  isOpen: n,
106
106
  buttons: /* @__PURE__ */ o(O, { reversed: !0, children: [
107
- /* @__PURE__ */ e(l, { variant: "primary", onClick: () => i(), children: "OK" }),
108
- /* @__PURE__ */ e(l, { variant: "secondary", onClick: () => i(), children: "Cancel" })
107
+ /* @__PURE__ */ e(r, { variant: "primary", onClick: () => i(), children: "OK" }),
108
+ /* @__PURE__ */ e(r, { variant: "secondary", onClick: () => i(), children: "Cancel" })
109
109
  ] }),
110
110
  onClose: () => i(),
111
111
  children: "Your content goes here"
@@ -116,34 +116,34 @@ const k = `
116
116
  title: "Example Title",
117
117
  closeButtonAriaValueText: "Close",
118
118
  noValidate: !1
119
- }, $ = x.bind({});
120
- $.args = {
119
+ }, E = x.bind({});
120
+ E.args = {
121
121
  ...g
122
122
  };
123
- const F = x.bind({});
124
- F.args = {
123
+ const $ = x.bind({});
124
+ $.args = {
125
125
  ...g,
126
126
  isLoading: !0,
127
127
  spinnerAriaValueText: "Loading"
128
128
  };
129
- const L = (t) => {
129
+ const D = (t) => {
130
130
  const { open: s, close: i, isOpen: n } = S({});
131
131
  return /* @__PURE__ */ o(P, { children: [
132
- /* @__PURE__ */ e(l, { variant: "primary", onClick: () => s(), children: "Open PageOverlay" }),
132
+ /* @__PURE__ */ e(r, { variant: "primary", onClick: () => s(), children: "Open PageOverlay" }),
133
133
  /* @__PURE__ */ e(
134
134
  v,
135
135
  {
136
136
  ...t,
137
137
  isOpen: n,
138
- buttons: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(b.Column, { size: "8", mediumSize: "9", startPositon: "2", mediumStartPosition: "3", children: /* @__PURE__ */ o(O, { reversed: !0, children: [
139
- /* @__PURE__ */ e(l, { variant: "primary", onClick: () => i(), children: "OK" }),
140
- /* @__PURE__ */ e(l, { variant: "secondary", onClick: () => i(), children: "Cancel" })
138
+ buttons: /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f.Column, { size: "8", mediumSize: "9", startPositon: "2", mediumStartPosition: "3", children: /* @__PURE__ */ o(O, { reversed: !0, children: [
139
+ /* @__PURE__ */ e(r, { variant: "primary", onClick: () => i(), children: "OK" }),
140
+ /* @__PURE__ */ e(r, { variant: "secondary", onClick: () => i(), children: "Cancel" })
141
141
  ] }) }) }),
142
142
  onClose: () => i(),
143
- children: /* @__PURE__ */ e(b, { marginTop: "100", children: /* @__PURE__ */ e(b.Column, { size: "8", mediumSize: "9", startPositon: "2", mediumStartPosition: "3", children: /* @__PURE__ */ o(T, { gap: "100", children: [
143
+ children: /* @__PURE__ */ e(f, { marginTop: "100", children: /* @__PURE__ */ e(f.Column, { size: "8", mediumSize: "9", startPositon: "2", mediumStartPosition: "3", children: /* @__PURE__ */ o(T, { gap: "100", children: [
144
144
  /* @__PURE__ */ e("div", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac dui et nibh eleifend ultricies a id nulla. Pellentesque eleifend sem a tellus dictum tempus. Proin non leo id risus placerat vulputate at ac erat. Ut fringilla imperdiet sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Gijs molestie ante ac magna ornare rhoncus non at quam. Mauris elementum luctus euismod. Pellentesque molestie malesuada purus, sed egestas lacus interdum sit amet. Morbi blandit lacus sit amet dictum pulvinar. Ut semper nunc ac enim imperdiet, non interdum diam gravida. In nunc tortor, mollis ac molestie dignissim, elementum sed quam. Suspendisse mollis venenatis Laura, pellentesque vestibulum elit consequat et. Aliquam fringilla tellus id libero tempus, sit amet suscipit augue tristique. Quisque cursus neque vel justo tristique, eget semper turpis elementum. Etiam venenatis mattis sapien ac mattis. Mauris vitae ultrices erat." }),
145
145
  /* @__PURE__ */ e("div", { children: "Aliquam facilisis massa sed justo rhoncus bibendum. Sed lobortis urna orci, vitae porta leo placerat nec. Nam porta porttitor ornare. Suspendisse vehicula nunc nec egestas finibus. Aliquam non luctus risus. Pien ac diam tincidunt, bibendum sem eget, sollicitudin neque. Curabitur mauris risus, feugiat ac euismod non, vulputate ac justo. Curabitur pretium vehicula augue, blandit porta odio rutrum sit amet. Proin semper enim ut sapien tempor, a ornare ipsum faucibus." }),
146
- /* @__PURE__ */ e(l, { variant: "primary", children: "Test Button" }),
146
+ /* @__PURE__ */ e(r, { variant: "primary", children: "Test Button" }),
147
147
  /* @__PURE__ */ e("div", { children: "Cras bibendum arcu vitae nulla venenatis, at cursus urna dapibus. In hac habitasse platea dictumst. In porttitor at lectus nec rhoncus. In hac habitasse platea dictumst. Sed nec lectus neque. Aliquam erat volutpat. Morbi elit orci, ultricies a porttitor eget, eleifend eu metus. Maarten sollicitudin vitae massa a tempor. Aliquam dignissim metus id sem sollicitudin, eget lacinia nulla imperdiet. Nullam nec vestibulum eros, ut aliquam libero. Nulla hendrerit cursus ante id auctor. Curabitur condimentum malesuada maximus. Aliquam felis diam, gravida nec eleifend quis, placerat et orci." }),
148
148
  /* @__PURE__ */ e("div", { children: "Nulla leo ligula, hendrerit vel egestas in, suscipit vitae erat. Vivamus interdum quam lacinia, egestas felis non, volutpat velit. Vestibulum orci diam, tincidunt ac mattis quis, ornare posuere magna. Aliquam erat volutpat. Maecenas facilisis lacus id ante efficitur, non dignissim lorem suscipit. Praesent at posuere velit. Nulla imperdiet, dui rhoncus volutpat feugiat, eros mauris cursus justo, a tincidunt ipsum ipsum eu nisl. Nulla eu dui Thierry. Aliquam vitae risus ut velit fringilla sodales nec id lacus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse ullamcorper purus quis nunc placerat, vel bibendum urna mollis. Nulla facilisi. Phasellus sed erat nec ex ullamcorper viverra. Phasellus convallis nibh sed dolor vulputate convallis. Phasellus ac posuere sapien, et elementum ipsum." }),
149
149
  /* @__PURE__ */ e(M, { id: "test-input", placeholder: "Test Input" }),
@@ -154,14 +154,14 @@ const L = (t) => {
154
154
  }
155
155
  )
156
156
  ] });
157
- }, R = L.bind({});
158
- R.args = {
157
+ }, F = D.bind({});
158
+ F.args = {
159
159
  ...g
160
160
  };
161
161
  export {
162
- F as Loading,
163
- $ as PageOverlayExample,
164
- R as WithLongComplexContent,
165
- Y as default
162
+ $ as Loading,
163
+ E as PageOverlayExample,
164
+ F as WithLongComplexContent,
165
+ Q as default
166
166
  };
167
167
  //# sourceMappingURL=PageOverlay.stories.js.map