@uva-glass/component-library 1.43.0 → 1.44.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/{MultiSelect-DFMb82q4.js → MultiSelect-B9JaIPXs.js} +17 -12
- package/dist/{MultiSelect-DFMb82q4.js.map → MultiSelect-B9JaIPXs.js.map} +1 -1
- package/dist/assets/MenuLink.css +1 -1
- package/dist/assets/MenuLink2.css +1 -1
- package/dist/assets/Spinner.css +1 -1
- package/dist/components/Drawer/Drawer.js +39 -37
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +18 -18
- package/dist/components/InputField/InputField.stories.js +24 -19
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/MenuButton/MenuButton.d.ts +2 -3
- package/dist/components/MenuButton/MenuButton.js +11 -605
- package/dist/components/MenuButton/MenuButton.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.js +14 -4
- package/dist/components/MenuLink/MenuLink.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.stories.js +5 -4
- package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
- package/dist/components/MenuLink/index.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.js +62 -60
- package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +12 -12
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +7 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +28 -23
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/Spinner/Spinner.js +13 -12
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/index.js +6 -6
- package/dist/index.js +6 -6
- package/package.json +10 -12
- package/dist/MenuLink-yPEEfABB.js +0 -859
- package/dist/MenuLink-yPEEfABB.js.map +0 -1
- package/dist/focusSafely-b94Glb9J.js +0 -402
- package/dist/focusSafely-b94Glb9J.js.map +0 -1
- package/dist/index-HuvfQN5H.js +0 -19071
- package/dist/index-HuvfQN5H.js.map +0 -1
- package/dist/useDialog-DZhIlo2a.js +0 -785
- package/dist/useDialog-DZhIlo2a.js.map +0 -1
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as l, Fragment as a } from "react/jsx-runtime";
|
|
2
2
|
import { c as m } from "./clsx-OuTLNxxd.js";
|
|
3
|
-
import { s as t, M as
|
|
4
|
-
import { Label as
|
|
3
|
+
import { s as t, M as p } from "./MultiSelectItem-CsSIAJRX.js";
|
|
4
|
+
import { Label as u } from "./components/Label/Label.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import
|
|
6
|
+
import "@react-aria/button";
|
|
7
|
+
import { Button as n } from "./components/Button/Button.js";
|
|
8
|
+
import "@react-aria/dialog";
|
|
9
|
+
import "@react-aria/focus";
|
|
10
|
+
import "@react-aria/overlays";
|
|
7
11
|
import "./components/OverlayCloseButton/OverlayCloseButton.js";
|
|
8
12
|
import "./components/GridRow/GridRow.js";
|
|
9
13
|
import "./components/IconButton/IconButton.js";
|
|
10
14
|
import "./components/Input/Input.js";
|
|
11
15
|
import "./components/InputField/InputField.js";
|
|
16
|
+
import "react-router-dom";
|
|
12
17
|
import "./components/SelectListbox/SelectListbox.js";
|
|
13
18
|
import "./components/SelectListbox/SelectProvider.js";
|
|
14
19
|
function d({ label: i, clearTrigger: e, onClear: r }) {
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ l(
|
|
17
|
-
e && /* @__PURE__ */ l(
|
|
20
|
+
return /* @__PURE__ */ o("header", { className: t["multi-select__header"], children: [
|
|
21
|
+
/* @__PURE__ */ l(u, { htmlFor: "multi-select-list", children: i }),
|
|
22
|
+
e && /* @__PURE__ */ l(n, { variant: "blank", onClick: r, children: e })
|
|
18
23
|
] });
|
|
19
24
|
}
|
|
20
|
-
const
|
|
25
|
+
const s = ({ scrollable: i = !0, noBorder: e, header: r, children: c }) => /* @__PURE__ */ o(a, { children: [
|
|
21
26
|
r,
|
|
22
27
|
/* @__PURE__ */ l(
|
|
23
28
|
"div",
|
|
@@ -38,10 +43,10 @@ const o = ({ scrollable: i = !0, noBorder: e, header: r, children: c }) => /* @_
|
|
|
38
43
|
}
|
|
39
44
|
)
|
|
40
45
|
] });
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
s.MultiSelectHeader = d;
|
|
47
|
+
s.MultiSelectItem = p;
|
|
43
48
|
export {
|
|
44
|
-
|
|
49
|
+
s as M,
|
|
45
50
|
d as a
|
|
46
51
|
};
|
|
47
|
-
//# sourceMappingURL=MultiSelect-
|
|
52
|
+
//# sourceMappingURL=MultiSelect-B9JaIPXs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect-
|
|
1
|
+
{"version":3,"file":"MultiSelect-B9JaIPXs.js","sources":["../src/components/MultiSelect/components/MultiSelectHeader.tsx","../src/components/MultiSelect/MultiSelect.tsx"],"sourcesContent":["import styles from 'components/MultiSelect/MultiSelect.module.css';\nimport { Label } from 'components/Label';\nimport { Button } from 'components';\n\nexport interface MultiSelectHeaderProps {\n label: string;\n clearTrigger?: string;\n onClear?: () => void;\n}\n\nexport function MultiSelectHeader({ label, clearTrigger, onClear }: MultiSelectHeaderProps) {\n return (\n <header className={styles['multi-select__header']}>\n <Label htmlFor=\"multi-select-list\">{label}</Label>\n {clearTrigger && (\n <Button variant={'blank'} onClick={onClear}>\n {clearTrigger}\n </Button>\n )}\n </header>\n );\n}\n","import clsx from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './MultiSelect.module.css';\n\nimport { MultiSelectItem } from 'components/MultiSelect/components/MultiSelectItem';\nimport { MultiSelectHeader } from 'components/MultiSelect/components/MultiSelectHeader';\nexport interface MultiSelectProps {\n scrollable?: boolean;\n noBorder?: boolean;\n header?: ReactNode;\n}\n\nexport const MultiSelect = ({ scrollable = true, noBorder, header, children }: PropsWithChildren<MultiSelectProps>) => (\n <>\n {header}\n <div\n className={clsx(styles['multi-select'], {\n [styles['multi-select--no-border']]: noBorder,\n })}\n >\n <ul\n className={clsx(styles['multi-select__list'], {\n [styles['multi-select__list--scrollable']]: scrollable,\n })}\n id=\"multi-select-list\"\n >\n {children}\n </ul>\n </div>\n </>\n);\n\nMultiSelect.MultiSelectHeader = MultiSelectHeader;\nMultiSelect.MultiSelectItem = MultiSelectItem;\n"],"names":["MultiSelectHeader","label","clearTrigger","onClear","jsxs","styles","jsx","Label","Button","MultiSelect","scrollable","noBorder","header","children","Fragment","clsx","MultiSelectItem"],"mappings":";;;;;;;;;;;;;;;;;;AAUO,SAASA,EAAkB,EAAE,OAAAC,GAAO,cAAAC,GAAc,SAAAC,KAAmC;AAC1F,SACG,gBAAAC,EAAA,UAAA,EAAO,WAAWC,EAAO,sBAAsB,GAC9C,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAM,SAAQ,qBAAqB,UAAMN,GAAA;AAAA,IACzCC,KACE,gBAAAI,EAAAE,GAAA,EAAO,SAAS,SAAS,SAASL,GAChC,UACHD,GAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;ACPa,MAAAO,IAAc,CAAC,EAAE,YAAAC,IAAa,IAAM,UAAAC,GAAU,QAAAC,GAAQ,UAAAC,QAE9D,gBAAAT,EAAAU,GAAA,EAAA,UAAA;AAAA,EAAAF;AAAA,EACD,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWS,EAAKV,EAAO,cAAc,GAAG;AAAA,QACtC,CAACA,EAAO,yBAAyB,CAAC,GAAGM;AAAA,MAAA,CACtC;AAAA,MAED,UAAA,gBAAAL;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWS,EAAKV,EAAO,oBAAoB,GAAG;AAAA,YAC5C,CAACA,EAAO,gCAAgC,CAAC,GAAGK;AAAA,UAAA,CAC7C;AAAA,UACD,IAAG;AAAA,UAEF,UAAAG;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF;AAAA,GACF;AAGFJ,EAAY,oBAAoBT;AAChCS,EAAY,kBAAkBO;"}
|
package/dist/assets/MenuLink.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._menu-link_8gjhh_1{border-bottom:.125rem solid transparent;text-decoration:none;transition:var(--transition-colors) var(--default-duration) var(--default-easing-function)}._menu-link_8gjhh_1:hover,._menu-link--active_8gjhh_8{border-bottom-color:inherit;color:unset}._menu-link--active_8gjhh_8{font-weight:var(--semibold)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.navbar{align-items:center;display:flex;gap:1rem}
|
package/dist/assets/Spinner.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes
|
|
1
|
+
@keyframes _spin_jd5vi_11{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._spinner-container_jd5vi_11{align-items:center;display:flex;justify-content:center;padding:2rem}._spinner_jd5vi_11{height:2rem;width:2rem}._spinner_jd5vi_11:after{border:.25rem solid hsl(0deg 0% 0% / 10%);border-radius:50%;content:" ";display:block;height:100%;transform-origin:50% 50%;width:100%}@media (prefers-reduced-motion: no-preference){._spinner_jd5vi_11:after{animation:_spin_jd5vi_11 1s cubic-bezier(.455,.03,.515,.955) infinite;border-left-color:var(--color-black)}}
|
|
@@ -1,60 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { useDialog as y } from "@react-aria/dialog";
|
|
3
|
+
import { FocusScope as C } from "@react-aria/focus";
|
|
4
|
+
import { useModal as D, useOverlay as g, usePreventScroll as N, OverlayContainer as v } from "@react-aria/overlays";
|
|
5
|
+
import { c as P } from "../../clsx-OuTLNxxd.js";
|
|
6
|
+
import { useState as x, useRef as S, useEffect as j } from "react";
|
|
5
7
|
import { Backdrop as k } from "../Backdrop/Backdrop.js";
|
|
6
8
|
import { OverlayCloseButton as B } from "../OverlayCloseButton/OverlayCloseButton.js";
|
|
7
|
-
import '../../assets/Drawer.css';const
|
|
8
|
-
drawer:
|
|
9
|
-
drawer__content:
|
|
10
|
-
drawer__header:
|
|
11
|
-
drawer__footer:
|
|
9
|
+
import '../../assets/Drawer.css';const F = "_drawer_1ytb4_1", R = "_drawer__content_1ytb4_22", T = "_drawer__header_1ytb4_32", E = "_drawer__footer_1ytb4_39", K = "_drawer__heading_1ytb4_26", M = "_drawer__buttons_1ytb4_64", r = {
|
|
10
|
+
drawer: F,
|
|
11
|
+
drawer__content: R,
|
|
12
|
+
drawer__header: T,
|
|
13
|
+
drawer__footer: E,
|
|
12
14
|
drawer__heading: K,
|
|
13
15
|
"drawer--open": "_drawer--open_1ytb4_59",
|
|
14
|
-
drawer__buttons:
|
|
16
|
+
drawer__buttons: M
|
|
15
17
|
}, q = 200;
|
|
16
|
-
function
|
|
18
|
+
function U({
|
|
17
19
|
buttons: s,
|
|
18
20
|
children: n,
|
|
19
|
-
isOpen:
|
|
20
|
-
onClose:
|
|
21
|
-
title:
|
|
21
|
+
isOpen: o,
|
|
22
|
+
onClose: l,
|
|
23
|
+
title: c,
|
|
22
24
|
closeButtonAriaValueText: i = "Close",
|
|
23
|
-
...
|
|
25
|
+
...w
|
|
24
26
|
}) {
|
|
25
|
-
const [
|
|
26
|
-
function
|
|
27
|
-
t(
|
|
28
|
-
|
|
27
|
+
const [m, t] = x(r.drawer), { modalProps: u } = D({ isDisabled: !o }), a = S(null);
|
|
28
|
+
function _() {
|
|
29
|
+
t(r.drawer), globalThis.setTimeout(() => {
|
|
30
|
+
l();
|
|
29
31
|
}, q);
|
|
30
32
|
}
|
|
31
|
-
const { overlayProps:
|
|
32
|
-
{ isDismissable: !0, isKeyboardDismissDisabled: !1, isOpen:
|
|
33
|
-
|
|
34
|
-
), { dialogProps:
|
|
35
|
-
return
|
|
36
|
-
t(
|
|
37
|
-
}, [
|
|
33
|
+
const { overlayProps: f, underlayProps: h } = g(
|
|
34
|
+
{ isDismissable: !0, isKeyboardDismissDisabled: !1, isOpen: o, onClose: _ },
|
|
35
|
+
a
|
|
36
|
+
), { dialogProps: b, titleProps: p } = y({}, a);
|
|
37
|
+
return N({ isDisabled: !o }), j(() => {
|
|
38
|
+
t(P(r.drawer, { [r["drawer--open"]]: o }));
|
|
39
|
+
}, [o]), /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(k, { ...h, children: /* @__PURE__ */ e(C, { contain: !0, restoreFocus: !0, children: /* @__PURE__ */ d(
|
|
38
40
|
"aside",
|
|
39
41
|
{
|
|
40
|
-
...
|
|
41
|
-
...m,
|
|
42
|
-
...p,
|
|
42
|
+
...u,
|
|
43
43
|
...f,
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
...b,
|
|
45
|
+
...w,
|
|
46
|
+
className: m,
|
|
47
|
+
ref: a,
|
|
46
48
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ d("header", { className: r.drawer__header, children: [
|
|
50
|
+
/* @__PURE__ */ e("h1", { className: r.drawer__heading, ...p, children: c }),
|
|
51
|
+
/* @__PURE__ */ e(B, { "aria-label": i, onClick: _ })
|
|
50
52
|
] }),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
s && /* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ e("div", { className: r.drawer__content, children: n }),
|
|
54
|
+
s && /* @__PURE__ */ e("footer", { className: r.drawer__footer, children: /* @__PURE__ */ e("div", { className: r.drawer__buttons, children: s }) })
|
|
53
55
|
]
|
|
54
56
|
}
|
|
55
57
|
) }) }) });
|
|
56
58
|
}
|
|
57
59
|
export {
|
|
58
|
-
|
|
60
|
+
U as Drawer
|
|
59
61
|
};
|
|
60
62
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { useDialog } from '@react-aria/dialog';\nimport { FocusScope } from '@react-aria/focus';\nimport { OverlayContainer, useModal, useOverlay, usePreventScroll } from '@react-aria/overlays';\nimport { clsx } from 'clsx';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './Drawer.module.css';\n\nimport { Backdrop } from 'components/Backdrop/Backdrop';\nimport { OverlayCloseButton } from 'components/OverlayCloseButton';\n\nexport interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {\n buttons?: ReactNode;\n isOpen?: boolean;\n onClose: () => void;\n title: string;\n closeButtonAriaValueText?: string;\n}\n\nconst closingDelay = 200;\n\nexport function Drawer({\n buttons,\n children,\n isOpen,\n onClose,\n title,\n closeButtonAriaValueText = 'Close',\n ...restProps\n}: PropsWithChildren<DrawerProps>) {\n const [containerClassNames, setContainerClassNames] = useState(styles.drawer);\n // Hide content outside the modal from screen readers.\n const { modalProps } = useModal({ isDisabled: !isOpen });\n const contentRef = useRef<HTMLDivElement>(null);\n\n function onCloseDrawer() {\n setContainerClassNames(styles.drawer);\n\n globalThis.setTimeout(() => {\n onClose();\n }, closingDelay);\n }\n\n // Handle interacting outside the dialog and pressing\n // the Escape key to close the modal.\n const { overlayProps, underlayProps } = useOverlay(\n { isDismissable: true, isKeyboardDismissDisabled: false, isOpen, onClose: onCloseDrawer },\n contentRef\n );\n\n // Get props for the dialog and its title\n const { dialogProps, titleProps } = useDialog({}, contentRef);\n\n usePreventScroll({ isDisabled: !isOpen });\n\n useEffect(() => {\n // setting class name after render so that element can slide in after it is mounted and slide out\n // before it is unmounted\n setContainerClassNames(clsx(styles.drawer, { [styles['drawer--open']]: isOpen }));\n }, [isOpen]);\n\n return (\n <OverlayContainer>\n <Backdrop {...underlayProps}>\n <FocusScope contain restoreFocus>\n <aside\n {...modalProps}\n {...overlayProps}\n {...dialogProps}\n {...restProps}\n className={containerClassNames}\n ref={contentRef}\n >\n <header className={styles.drawer__header}>\n <h1 className={styles.drawer__heading} {...titleProps}>\n {title}\n </h1>\n\n <OverlayCloseButton aria-label={closeButtonAriaValueText} onClick={onCloseDrawer} />\n </header>\n\n <div className={styles.drawer__content}>{children}</div>\n\n {buttons && (\n <footer className={styles.drawer__footer}>\n <div className={styles.drawer__buttons}>{buttons}</div>\n </footer>\n )}\n </aside>\n </FocusScope>\n </Backdrop>\n </OverlayContainer>\n );\n}\n"],"names":["closingDelay","Drawer","buttons","children","isOpen","onClose","title","closeButtonAriaValueText","restProps","containerClassNames","setContainerClassNames","useState","styles","modalProps","useModal","contentRef","useRef","onCloseDrawer","overlayProps","underlayProps","useOverlay","dialogProps","titleProps","useDialog","usePreventScroll","useEffect","clsx","jsx","OverlayContainer","Backdrop","FocusScope","jsxs","OverlayCloseButton"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { useDialog } from '@react-aria/dialog';\nimport { FocusScope } from '@react-aria/focus';\nimport { OverlayContainer, useModal, useOverlay, usePreventScroll } from '@react-aria/overlays';\nimport { clsx } from 'clsx';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './Drawer.module.css';\n\nimport { Backdrop } from 'components/Backdrop/Backdrop';\nimport { OverlayCloseButton } from 'components/OverlayCloseButton';\n\nexport interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {\n buttons?: ReactNode;\n isOpen?: boolean;\n onClose: () => void;\n title: string;\n closeButtonAriaValueText?: string;\n}\n\nconst closingDelay = 200;\n\nexport function Drawer({\n buttons,\n children,\n isOpen,\n onClose,\n title,\n closeButtonAriaValueText = 'Close',\n ...restProps\n}: PropsWithChildren<DrawerProps>) {\n const [containerClassNames, setContainerClassNames] = useState(styles.drawer);\n // Hide content outside the modal from screen readers.\n const { modalProps } = useModal({ isDisabled: !isOpen });\n const contentRef = useRef<HTMLDivElement>(null);\n\n function onCloseDrawer() {\n setContainerClassNames(styles.drawer);\n\n globalThis.setTimeout(() => {\n onClose();\n }, closingDelay);\n }\n\n // Handle interacting outside the dialog and pressing\n // the Escape key to close the modal.\n const { overlayProps, underlayProps } = useOverlay(\n { isDismissable: true, isKeyboardDismissDisabled: false, isOpen, onClose: onCloseDrawer },\n contentRef\n );\n\n // Get props for the dialog and its title\n const { dialogProps, titleProps } = useDialog({}, contentRef);\n\n usePreventScroll({ isDisabled: !isOpen });\n\n useEffect(() => {\n // setting class name after render so that element can slide in after it is mounted and slide out\n // before it is unmounted\n setContainerClassNames(clsx(styles.drawer, { [styles['drawer--open']]: isOpen }));\n }, [isOpen]);\n\n return (\n <OverlayContainer>\n <Backdrop {...underlayProps}>\n <FocusScope contain restoreFocus>\n <aside\n {...modalProps}\n {...overlayProps}\n {...dialogProps}\n {...restProps}\n className={containerClassNames}\n ref={contentRef}\n >\n <header className={styles.drawer__header}>\n <h1 className={styles.drawer__heading} {...titleProps}>\n {title}\n </h1>\n\n <OverlayCloseButton aria-label={closeButtonAriaValueText} onClick={onCloseDrawer} />\n </header>\n\n <div className={styles.drawer__content}>{children}</div>\n\n {buttons && (\n <footer className={styles.drawer__footer}>\n <div className={styles.drawer__buttons}>{buttons}</div>\n </footer>\n )}\n </aside>\n </FocusScope>\n </Backdrop>\n </OverlayContainer>\n );\n}\n"],"names":["closingDelay","Drawer","buttons","children","isOpen","onClose","title","closeButtonAriaValueText","restProps","containerClassNames","setContainerClassNames","useState","styles","modalProps","useModal","contentRef","useRef","onCloseDrawer","overlayProps","underlayProps","useOverlay","dialogProps","titleProps","useDialog","usePreventScroll","useEffect","clsx","jsx","OverlayContainer","Backdrop","FocusScope","jsxs","OverlayCloseButton"],"mappings":";;;;;;;;;;;;;;;;GAqBMA,IAAe;AAEd,SAASC,EAAO;AAAA,EACrB,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,GAAGC;AACL,GAAmC;AACjC,QAAM,CAACC,GAAqBC,CAAsB,IAAIC,EAASC,EAAO,MAAM,GAEtE,EAAE,YAAAC,MAAeC,EAAS,EAAE,YAAY,CAACV,GAAQ,GACjDW,IAAaC,EAAuB,IAAI;AAE9C,WAASC,IAAgB;AACvB,IAAAP,EAAuBE,EAAO,MAAM,GAEpC,WAAW,WAAW,MAAM;AAClB,MAAAP;OACPL,CAAY;AAAA,EACjB;AAIM,QAAA,EAAE,cAAAkB,GAAc,eAAAC,EAAA,IAAkBC;AAAA,IACtC,EAAE,eAAe,IAAM,2BAA2B,IAAO,QAAAhB,GAAQ,SAASa,EAAc;AAAA,IACxFF;AAAA,EAAA,GAII,EAAE,aAAAM,GAAa,YAAAC,EAAA,IAAeC,EAAU,CAAA,GAAIR,CAAU;AAE5D,SAAAS,EAAiB,EAAE,YAAY,CAACpB,EAAQ,CAAA,GAExCqB,EAAU,MAAM;AAGS,IAAAf,EAAAgB,EAAKd,EAAO,QAAQ,EAAE,CAACA,EAAO,cAAc,CAAC,GAAGR,EAAQ,CAAA,CAAC;AAAA,EAAA,GAC/E,CAACA,CAAM,CAAC,GAGT,gBAAAuB,EAACC,GACC,EAAA,UAAA,gBAAAD,EAACE,GAAU,EAAA,GAAGV,GACZ,UAAA,gBAAAQ,EAACG,GAAW,EAAA,SAAO,IAAC,cAAY,IAC9B,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGlB;AAAA,MACH,GAAGK;AAAA,MACH,GAAGG;AAAA,MACH,GAAGb;AAAA,MACJ,WAAWC;AAAA,MACX,KAAKM;AAAA,MAEL,UAAA;AAAA,QAAC,gBAAAgB,EAAA,UAAA,EAAO,WAAWnB,EAAO,gBACxB,UAAA;AAAA,UAAA,gBAAAe,EAAC,QAAG,WAAWf,EAAO,iBAAkB,GAAGU,GACxC,UACHhB,GAAA;AAAA,UAEC,gBAAAqB,EAAAK,GAAA,EAAmB,cAAYzB,GAA0B,SAASU,GAAe;AAAA,QAAA,GACpF;AAAA,QAEC,gBAAAU,EAAA,OAAA,EAAI,WAAWf,EAAO,iBAAkB,UAAAT,GAAS;AAAA,QAEjDD,KACC,gBAAAyB,EAAC,UAAO,EAAA,WAAWf,EAAO,gBACxB,UAAC,gBAAAe,EAAA,OAAA,EAAI,WAAWf,EAAO,iBAAkB,UAAAV,EAAQ,CAAA,GACnD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGN,GACF,EACF,CAAA;AAEJ;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { OverlayProvider as m } from "@react-aria/overlays";
|
|
3
3
|
import { f as p } from "../../index-C7tAT8j7.js";
|
|
4
4
|
import { useState as c } from "react";
|
|
5
|
-
import { Drawer as
|
|
5
|
+
import { Drawer as a } from "./Drawer.js";
|
|
6
6
|
import { Button as t } from "../Button/Button.js";
|
|
7
7
|
import { ButtonGroup as u } from "../ButtonGroup/ButtonGroup.js";
|
|
8
|
-
const
|
|
8
|
+
const D = {
|
|
9
9
|
title: "Molecules/Drawer",
|
|
10
|
-
component:
|
|
10
|
+
component: a,
|
|
11
11
|
argTypes: {
|
|
12
12
|
isOpen: {
|
|
13
13
|
table: {
|
|
@@ -20,31 +20,31 @@ const E = {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
},
|
|
24
|
-
const [r,
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */ e(t, { onClick: () =>
|
|
23
|
+
}, i = (l) => {
|
|
24
|
+
const [r, o] = c(!1);
|
|
25
|
+
return /* @__PURE__ */ n(m, { children: [
|
|
26
|
+
/* @__PURE__ */ e(t, { onClick: () => o(!r), variant: "primary", children: "Open drawer" }),
|
|
27
27
|
r && /* @__PURE__ */ e(
|
|
28
|
-
|
|
28
|
+
a,
|
|
29
29
|
{
|
|
30
30
|
...l,
|
|
31
31
|
isOpen: r,
|
|
32
|
-
onClose: () => (p()(),
|
|
32
|
+
onClose: () => (p()(), o(!r)),
|
|
33
33
|
children: "Example Drawer Content"
|
|
34
34
|
}
|
|
35
35
|
)
|
|
36
36
|
] });
|
|
37
|
-
},
|
|
37
|
+
}, s = {
|
|
38
38
|
title: "Example Title",
|
|
39
39
|
closeButtonAriaValueText: "Close"
|
|
40
|
-
}, d =
|
|
40
|
+
}, d = i.bind({});
|
|
41
41
|
d.args = {
|
|
42
|
-
...
|
|
42
|
+
...s
|
|
43
43
|
};
|
|
44
|
-
const f =
|
|
44
|
+
const f = i.bind({});
|
|
45
45
|
f.args = {
|
|
46
|
-
...
|
|
47
|
-
buttons: /* @__PURE__ */
|
|
46
|
+
...s,
|
|
47
|
+
buttons: /* @__PURE__ */ n(u, { children: [
|
|
48
48
|
/* @__PURE__ */ e(t, { variant: "primary", children: "Primary Example Button" }),
|
|
49
49
|
/* @__PURE__ */ e(t, { variant: "secondary", children: "Secondary Example Button" })
|
|
50
50
|
] })
|
|
@@ -52,6 +52,6 @@ f.args = {
|
|
|
52
52
|
export {
|
|
53
53
|
d as DrawerExample,
|
|
54
54
|
f as WithButtons,
|
|
55
|
-
|
|
55
|
+
D as default
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=Drawer.stories.js.map
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as g } from "react";
|
|
3
|
-
import { f as
|
|
4
|
-
import { InputField as
|
|
3
|
+
import { f as a } from "../../index-C7tAT8j7.js";
|
|
4
|
+
import { InputField as p } from "./InputField.js";
|
|
5
5
|
import { Container as u } from "../storyComponents/Container/Container.js";
|
|
6
6
|
import { Icon as f } from "../Icon/Icon.js";
|
|
7
|
+
import "@react-aria/button";
|
|
7
8
|
import "../Button/Button.js";
|
|
9
|
+
import "@react-aria/dialog";
|
|
10
|
+
import "@react-aria/focus";
|
|
11
|
+
import "@react-aria/overlays";
|
|
8
12
|
import "../OverlayCloseButton/OverlayCloseButton.js";
|
|
9
13
|
import "../GridRow/GridRow.js";
|
|
10
14
|
import "../IconButton/IconButton.js";
|
|
11
15
|
import "../Input/Input.js";
|
|
12
|
-
import "
|
|
16
|
+
import "react-router-dom";
|
|
17
|
+
import "../../MultiSelect-B9JaIPXs.js";
|
|
13
18
|
import "../SelectListbox/SelectListbox.js";
|
|
14
19
|
import "../SelectListbox/SelectProvider.js";
|
|
15
20
|
const C = (t) => {
|
|
16
21
|
const r = t.variant ?? [];
|
|
17
22
|
return { ...t, variant: r.toString() };
|
|
18
|
-
},
|
|
23
|
+
}, G = {
|
|
19
24
|
title: "Atoms/InputField",
|
|
20
|
-
component:
|
|
25
|
+
component: p,
|
|
21
26
|
argTypes: {
|
|
22
27
|
variant: {
|
|
23
28
|
options: ["large"],
|
|
@@ -36,44 +41,44 @@ const C = (t) => {
|
|
|
36
41
|
}
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
|
-
},
|
|
40
|
-
const [r,
|
|
41
|
-
|
|
44
|
+
}, e = (t) => {
|
|
45
|
+
const [r, i] = d(""), l = g(null), s = (c) => {
|
|
46
|
+
i(c.target.value), a()("handleChange");
|
|
42
47
|
}, m = () => {
|
|
43
|
-
|
|
48
|
+
i(""), a()("handleClear");
|
|
44
49
|
};
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
50
|
+
return /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(
|
|
51
|
+
p,
|
|
47
52
|
{
|
|
48
53
|
...C(t),
|
|
49
54
|
value: r,
|
|
50
|
-
onChange:
|
|
55
|
+
onChange: s,
|
|
51
56
|
onClear: m,
|
|
52
|
-
ref:
|
|
57
|
+
ref: l
|
|
53
58
|
}
|
|
54
59
|
) });
|
|
55
60
|
}, n = {
|
|
56
61
|
type: "text",
|
|
57
62
|
variant: void 0,
|
|
58
63
|
id: "4f9ca77d"
|
|
59
|
-
}, h =
|
|
64
|
+
}, h = e.bind({});
|
|
60
65
|
h.args = {
|
|
61
66
|
...n
|
|
62
67
|
};
|
|
63
|
-
const v =
|
|
68
|
+
const v = e.bind({});
|
|
64
69
|
v.args = {
|
|
65
70
|
...n,
|
|
66
71
|
clearTrigger: "Clear"
|
|
67
72
|
};
|
|
68
|
-
const I =
|
|
73
|
+
const I = e.bind({});
|
|
69
74
|
I.args = {
|
|
70
75
|
...n,
|
|
71
|
-
clearTrigger: /* @__PURE__ */
|
|
76
|
+
clearTrigger: /* @__PURE__ */ o(f, { name: "Cross" })
|
|
72
77
|
};
|
|
73
78
|
export {
|
|
74
79
|
h as InputFieldExample,
|
|
75
80
|
I as WithIconClearTrigger,
|
|
76
81
|
v as WithStringClearTrigger,
|
|
77
|
-
|
|
82
|
+
G as default
|
|
78
83
|
};
|
|
79
84
|
//# sourceMappingURL=InputField.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon } from 'components';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon } from 'components';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;AAYA,MAAMA,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,YAAY,OAAO;AAAA,IACvC;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAqC,CAACJ,MAAS;AACnD,QAAM,CAACK,GAAYC,CAAa,IAAIC,EAAmC,EAAE,GACnEC,IAAWC,EAAyB,IAAI,GAExCC,IAAe,CAACC,MAAyC;AAC/C,IAAAL,EAAAK,EAAM,OAAO,KAAK,GAChCC,EAAA,EAAK,cAAc;AAAA,EAAA,GAGfC,IAAc,MAAM;AACxB,IAAAP,EAAc,EAAE,GAChBM,EAAA,EAAK,aAAa;AAAA,EAAA;AAGpB,2BACGE,GACC,EAAA,UAAA,gBAAAC;AAAA,IAACZ;AAAA,IAAA;AAAA,MACE,GAAGJ,EAAcC,CAAI;AAAA,MACtB,OAAOK;AAAA,MACP,UAAUK;AAAA,MACV,SAASG;AAAA,MACT,KAAKL;AAAA,IAAA;AAAA,EAET,EAAA,CAAA;AAEJ,GAEMQ,IAAwC;AAAA,EAC5C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AACN,GAEaC,IAAoBb,EAAS,KAAK,EAAE;AACjDa,EAAkB,OAAO;AAAA,EACvB,GAAGD;AACL;AAEO,MAAME,IAAyBd,EAAS,KAAK,EAAE;AACtDc,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,cAAc;AAChB;AAEO,MAAMG,IAAuBf,EAAS,KAAK,EAAE;AACpDe,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,cAAc,gBAAAD,EAACK,GAAK,EAAA,MAAK,QAAQ,CAAA;AACnC;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { PressEvent } from 'react-aria';
|
|
2
1
|
import { AriaButtonProps } from '@react-aria/button';
|
|
3
2
|
import { IconProps } from 'components/Icon';
|
|
4
|
-
import { RefObject } from 'react';
|
|
3
|
+
import { MouseEvent, RefObject } from 'react';
|
|
5
4
|
import { UIButtonVariant } from 'types/UserInterface';
|
|
6
5
|
export interface MenuButtonProps extends AriaButtonProps<'button'> {
|
|
7
6
|
buttonRef: RefObject<HTMLButtonElement>;
|
|
8
7
|
variant: UIButtonVariant;
|
|
9
8
|
iconName?: IconProps['name'];
|
|
10
|
-
onClick?: (event:
|
|
9
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
11
10
|
}
|
|
12
11
|
export declare function MenuButton({ buttonRef, variant, iconName, children, ...restProps }: MenuButtonProps): import("react/jsx-runtime").JSX.Element;
|