@rws-aoa/react-library 6.0.1 → 7.0.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/_constants.js.map +1 -1
- package/dist/chunks/FieldError.CCQnjdMd.js +161 -0
- package/dist/chunks/{FieldError.B8t3zEhf.js.map → FieldError.CCQnjdMd.js.map} +1 -1
- package/dist/chunks/compiler-runtime.hDcrsMwn.js +55 -0
- package/dist/chunks/compiler-runtime.hDcrsMwn.js.map +1 -0
- package/dist/components/atoms/_menu/menu-item/MenuItem.d.ts +2 -2
- package/dist/components/atoms/_menu/menu-item/MenuItem.d.ts.map +1 -1
- package/dist/components/atoms/_menu/menu-item/MenuItem.js +73 -128
- package/dist/components/atoms/_menu/menu-item/MenuItem.js.map +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.d.ts +1 -2
- package/dist/components/atoms/_menu/user-menu/UserMenu.d.ts.map +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.js +72 -72
- package/dist/components/atoms/_menu/user-menu/UserMenu.js.map +1 -1
- package/dist/components/atoms/button/Button.d.ts +2 -2
- package/dist/components/atoms/button/Button.d.ts.map +1 -1
- package/dist/components/atoms/button/Button.js +120 -133
- package/dist/components/atoms/button/Button.js.map +1 -1
- package/dist/components/atoms/icon-button/IconButton.d.ts +6 -1
- package/dist/components/atoms/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/icon-button/IconButton.js +50 -50
- package/dist/components/atoms/icon-button/IconButton.js.map +1 -1
- package/dist/components/atoms/input/Input.d.ts +1 -2
- package/dist/components/atoms/input/Input.d.ts.map +1 -1
- package/dist/components/atoms/input/Input.js +51 -56
- package/dist/components/atoms/input/Input.js.map +1 -1
- package/dist/components/atoms/logo/Logo.d.ts +2 -2
- package/dist/components/atoms/logo/Logo.d.ts.map +1 -1
- package/dist/components/atoms/logo/Logo.js +298 -457
- package/dist/components/atoms/logo/Logo.js.map +1 -1
- package/dist/components/atoms/no-permission/NoPermission.d.ts +1 -1
- package/dist/components/atoms/no-permission/NoPermission.d.ts.map +1 -1
- package/dist/components/atoms/no-permission/NoPermission.js +20 -23
- package/dist/components/atoms/no-permission/NoPermission.js.map +1 -1
- package/dist/components/atoms/notification/Notification.d.ts +1 -2
- package/dist/components/atoms/notification/Notification.d.ts.map +1 -1
- package/dist/components/atoms/notification/Notification.js +29 -41
- package/dist/components/atoms/notification/Notification.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Error.d.ts +1 -1
- package/dist/components/atoms/notification/_icons/Error.d.ts.map +1 -1
- package/dist/components/atoms/notification/_icons/Error.js +25 -32
- package/dist/components/atoms/notification/_icons/Error.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Info.d.ts +1 -1
- package/dist/components/atoms/notification/_icons/Info.d.ts.map +1 -1
- package/dist/components/atoms/notification/_icons/Info.js +26 -39
- package/dist/components/atoms/notification/_icons/Info.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Success.d.ts +1 -1
- package/dist/components/atoms/notification/_icons/Success.d.ts.map +1 -1
- package/dist/components/atoms/notification/_icons/Success.js +26 -39
- package/dist/components/atoms/notification/_icons/Success.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Warning.js +23 -38
- package/dist/components/atoms/notification/_icons/Warning.js.map +1 -1
- package/dist/components/atoms/section-header/SectionHeader.d.ts +1 -1
- package/dist/components/atoms/section-header/SectionHeader.d.ts.map +1 -1
- package/dist/components/atoms/section-header/SectionHeader.js +37 -64
- package/dist/components/atoms/section-header/SectionHeader.js.map +1 -1
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.d.ts +1 -2
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js +23 -35
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.d.ts +1 -2
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.d.ts.map +1 -1
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.js +19 -29
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.js.map +1 -1
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.d.ts +1 -2
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.d.ts.map +1 -1
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.js +26 -29
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.js.map +1 -1
- package/dist/components/atoms/table/Table.d.ts +1 -0
- package/dist/components/atoms/table/Table.d.ts.map +1 -1
- package/dist/components/atoms/table/Table.js +173 -202
- package/dist/components/atoms/table/Table.js.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.js +1434 -1523
- package/dist/components/atoms/table/_QuickSearchToolbar.js.map +1 -1
- package/dist/components/atoms/tooltip/Tooltip.js +16 -27
- package/dist/components/atoms/tooltip/Tooltip.js.map +1 -1
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.d.ts +1 -2
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.d.ts.map +1 -1
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.js +16 -7
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.js.map +1 -1
- package/dist/components/molecules/field-error/FieldError.js +3 -2
- package/dist/components/molecules/field-error/FieldError.js.map +1 -1
- package/dist/components/molecules/file-dropzone/FileDropzone.d.ts.map +1 -1
- package/dist/components/molecules/file-dropzone/FileDropzone.js +90 -79
- package/dist/components/molecules/file-dropzone/FileDropzone.js.map +1 -1
- package/dist/components/molecules/file-table/FileTable.js +4 -14
- package/dist/components/molecules/file-table/FileTable.js.map +1 -1
- package/dist/components/molecules/form-error/FormError.js +3 -2
- package/dist/components/molecules/form-error/FormError.js.map +1 -1
- package/dist/components/molecules/form-modal/FormModal.js +3 -2
- package/dist/components/molecules/form-modal/FormModal.js.map +1 -1
- package/dist/components/molecules/modal/Modal.d.ts +1 -1
- package/dist/components/molecules/modal/Modal.d.ts.map +1 -1
- package/dist/components/molecules/modal/Modal.js +50 -68
- package/dist/components/molecules/modal/Modal.js.map +1 -1
- package/dist/components/molecules/modal-close-button/ModalCloseButton.d.ts +1 -1
- package/dist/components/molecules/modal-close-button/ModalCloseButton.d.ts.map +1 -1
- package/dist/components/molecules/modal-close-button/ModalCloseButton.js +20 -19
- package/dist/components/molecules/modal-close-button/ModalCloseButton.js.map +1 -1
- package/dist/components/molecules/navigation-bar/NavigationBar.d.ts +1 -2
- package/dist/components/molecules/navigation-bar/NavigationBar.d.ts.map +1 -1
- package/dist/components/molecules/navigation-bar/NavigationBar.js +96 -97
- package/dist/components/molecules/navigation-bar/NavigationBar.js.map +1 -1
- package/dist/components/molecules/upload-button/UploadButton.js +36 -33
- package/dist/components/molecules/upload-button/UploadButton.js.map +1 -1
- package/dist/components/organisms/content-page/ContentPage.d.ts +1 -1
- package/dist/components/organisms/content-page/ContentPage.d.ts.map +1 -1
- package/dist/components/organisms/content-page/ContentPage.js +22 -11
- package/dist/components/organisms/content-page/ContentPage.js.map +1 -1
- package/dist/contexts/TanstackFormContext.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +14 -14
- package/dist/chunks/FieldError.B8t3zEhf.js +0 -143
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../../src/components/molecules/modal/Modal.tsx"],"sourcesContent":["import {\n Dialog,\n DialogContent,\n DialogTitle,\n type DialogContentProps,\n type DialogProps,\n type DialogTitleProps\n} from '@mui/material';\nimport { merge } from 'lodash';\nimport {
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../../../src/components/molecules/modal/Modal.tsx"],"sourcesContent":["import {\n Dialog,\n DialogContent,\n DialogTitle,\n type DialogContentProps,\n type DialogProps,\n type DialogTitleProps\n} from '@mui/material';\nimport { merge } from 'lodash';\nimport type { ReactNode } from 'react';\nimport { AoaModalCloseButton, type AoaModalCloseButtonProps } from '../modal-close-button/ModalCloseButton';\n\nexport interface AoaModalQAs {\n /**\n * Data-qa tag applied to the content\n */\n content?: string;\n /**\n * Data-qa tag applied to the main modal\n */\n modal?: string;\n /**\n * Data-qa tag applied to the title\n */\n title?: string;\n}\n\nexport interface AoaModalProps {\n /**\n * Any other props passed to the {@link DialogContent}\n */\n readonly DialogContentProps?: DialogContentProps;\n /**\n * Any other props passed to the {@link Dialog}\n */\n readonly DialogProps?: Omit<DialogProps, 'open'>;\n /**\n * Any other props passed to the {@link DialogTitle}\n */\n readonly DialogTitleProps?: DialogTitleProps;\n /**\n * Optional for adding dialog actions below the content\n */\n readonly dialogActions?: ReactNode;\n /**\n * The content to show in the modal\n */\n readonly dialogContent: ReactNode;\n /**\n * Object of data-qa tags to pass to the modal\n */\n readonly modalQas?: AoaModalQAs;\n /**\n * Whether the modal should be opened or not\n */\n readonly open: boolean;\n /**\n * Title for the modal\n */\n readonly topic: string;\n}\n\n/**\n * Constructs a modal using pre-defined Rijkswaterstaat styling\n *\n * @param props - Props to pass to the modal - {@link ModalProps}\n * @example\n * ```jsx\n * <AoaModal\n * topic='topic'\n * modalQas={{\n * modal: 'modal',\n * content: 'content',\n * title: 'title',\n * }}\n * dialogContent={<div>SAMPLE</div>}\n * open={true}\n * />\n * ```\n */\nexport function AoaModal({\n DialogProps,\n DialogTitleProps,\n DialogContentProps,\n modalQas,\n open,\n topic,\n dialogContent,\n dialogActions,\n closeAction\n}: AoaModalCloseButtonProps & AoaModalProps) {\n return (\n <Dialog\n {...DialogProps}\n data-qa={modalQas?.modal ?? 'modal'}\n open={Boolean(open)}\n sx={merge(\n {\n '> div > div': {\n borderRadius: 0,\n minWidth: '45vw'\n }\n },\n DialogProps?.sx\n )}\n >\n <DialogTitle\n {...DialogTitleProps}\n data-qa={modalQas?.title ?? 'modal-title'}\n sx={merge(\n {\n padding: '3rem 3rem 1rem',\n color: 'var(--color-rijks-logoblue)',\n fontSize: '1.1rem',\n fontWeight: 'bolder'\n },\n DialogTitleProps?.sx\n )}\n >\n {topic}\n </DialogTitle>\n <AoaModalCloseButton closeAction={closeAction} />\n <DialogContent\n {...DialogContentProps}\n data-qa={modalQas?.content ?? 'modal-content'}\n sx={merge(\n {\n padding: '0 3rem 2rem'\n },\n DialogContentProps?.sx\n )}\n >\n {dialogContent}\n </DialogContent>\n {dialogActions}\n </Dialog>\n );\n}\n"],"names":["AoaModal","t0","$","_c","DialogProps","DialogTitleProps","DialogContentProps","modalQas","open","topic","dialogContent","dialogActions","closeAction","t1","modal","t2","Boolean","t3","sx","merge","borderRadius","minWidth","t4","title","t5","padding","color","fontSize","fontWeight","t6","jsx","DialogTitle","t7","AoaModalCloseButton","t8","content","t9","t10","DialogContent","t11","Dialog"],"mappings":";;;;;AAgFO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GAAkB;AAAA,IAAAC,aAAAA;AAAAA,IAAAC,kBAAAA;AAAAA,IAAAC,oBAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,MAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,eAAAA;AAAAA,IAAAC,eAAAA;AAAAA,IAAAC,aAAAA;AAAAA,EAAAA,IAAAX,GAcVY,IAAAN,GAAQO,SAAW,SACtBC,IAAAC,EAAQR;AAAK,MAAAS;AAAA,EAAAf,EAAA,CAAA,MAAAE,GAAAc,MACfD,IAAAE,EAAAA,MAAA;AAAA,IAAA,eAAA;AAAA,MAAAC,cAAA;AAAA,MAAAC,UAIY;AAAA,IAAA;AAAA,EAAM,GAGpBjB,GAAWc,EACb,GAAChB,EAAA,CAAA,IAAAE,GAAAc,IAAAhB,OAAAe,KAAAA,IAAAf,EAAA,CAAA;AAIU,QAAAoB,IAAAf,GAAQgB,SAAW;AAAa,MAAAC;AAAA,EAAAtB,EAAA,CAAA,MAAAG,GAAAa,MACrCM,IA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,EAAA,EAAA;AAAA,MAAAqC;AAAA,SAAArC,EAAA,EAAA,MAAAE,KAAAF,EAAA,EAAA,MAAAS,KAAAT,EAAA,EAAA,MAAAW,KAAAX,EAAA,EAAA,MAAAmC,KAAAnC,EAAA,EAAA,MAAAa,KAAAb,EAAA,EAAA,MAAAe,KAAAf,EAAA,EAAA,MAAA2B,KAAA3B,UAAA8B,KAzClBO,sBAACC,KAAM,GACDpC,GACK,WAAAS,GACH,MAAAE,GACF,IAAAE,GAUJY,UAAAA;AAAAA,IAAAA;AAAAA,IAeAG;AAAAA,IACAK;AAAAA,IAYC1B;AAAAA,EAAAA,GACH,GAAST,QAAAE,GAAAF,QAAAS,GAAAT,QAAAW,GAAAX,QAAAmC,GAAAnC,QAAAa,GAAAb,QAAAe,GAAAf,QAAA2B,GAAA3B,QAAA8B,GAAA9B,QAAAqC,KAAAA,IAAArC,EAAA,EAAA,GA3CTqC;AA2CS;"}
|
|
@@ -4,5 +4,5 @@ export interface AoaModalCloseButtonProps {
|
|
|
4
4
|
*/
|
|
5
5
|
closeAction(this: void): void;
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
7
|
+
export declare function AoaModalCloseButton({ closeAction }: AoaModalCloseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=ModalCloseButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalCloseButton.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/modal-close-button/ModalCloseButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModalCloseButton.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/modal-close-button/ModalCloseButton.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,WAAW,EAAE,EAAE,wBAAwB,2CAc5E"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AoaIconButton as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
));
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { Close as s } from "@mui/icons-material";
|
|
4
|
+
import { AoaIconButton as m } from "../../atoms/icon-button/IconButton.js";
|
|
5
|
+
function b(r) {
|
|
6
|
+
const o = c.c(4), {
|
|
7
|
+
closeAction: i
|
|
8
|
+
} = r;
|
|
9
|
+
let t;
|
|
10
|
+
o[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ n(s, {}), o[0] = t) : t = o[0];
|
|
11
|
+
let e;
|
|
12
|
+
o[1] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
13
|
+
position: "absolute",
|
|
14
|
+
right: 8,
|
|
15
|
+
top: 8
|
|
16
|
+
}, o[1] = e) : e = o[1];
|
|
17
|
+
let l;
|
|
18
|
+
return o[2] !== i ? (l = /* @__PURE__ */ n(m, { icon: t, inline: !0, label: "Modaal sluiten", onClick: i, sx: e }), o[2] = i, o[3] = l) : l = o[3], l;
|
|
19
|
+
}
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
b as AoaModalCloseButton
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=ModalCloseButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalCloseButton.js","sources":["../../../../src/components/molecules/modal-close-button/ModalCloseButton.tsx"],"sourcesContent":["import { Close as CloseIcon } from '@mui/icons-material';\nimport {
|
|
1
|
+
{"version":3,"file":"ModalCloseButton.js","sources":["../../../../src/components/molecules/modal-close-button/ModalCloseButton.tsx"],"sourcesContent":["import { Close as CloseIcon } from '@mui/icons-material';\nimport { AoaIconButton } from '../../atoms/icon-button/IconButton';\n\nexport interface AoaModalCloseButtonProps {\n /**\n * The action to trigger to close this modal\n */\n closeAction(this: void): void;\n}\n\nexport function AoaModalCloseButton({ closeAction }: AoaModalCloseButtonProps) {\n return (\n <AoaIconButton\n icon={<CloseIcon />}\n inline\n label='Modaal sluiten'\n onClick={closeAction}\n sx={{\n position: 'absolute',\n right: 8,\n top: 8\n }}\n />\n );\n}\n"],"names":["AoaModalCloseButton","t0","$","_c","closeAction","t1","Symbol","for","CloseIcon","t2","position","right","top","t3","jsx","AoaIconButton"],"mappings":";;;;AAUO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,CAAA,GAA6B;AAAA,IAAAC,aAAAA;AAAAA,EAAAA,IAAAH;AAAyC,MAAAI;AAAA,EAAAH,EAAA,CAAA,MAAAI,OAAAC,IAAA,2BAAA,KAGjEF,sBAACG,GAAA,EAAS,GAAGN,OAAAG,KAAAA,IAAAH,EAAA,CAAA;AAAA,MAAAO;AAAA,EAAAP,EAAA,CAAA,MAAAI,OAAAC,IAAA,2BAAA,KAIfE,IAAA;AAAA,IAAAC,UACQ;AAAA,IAAUC,OAAA;AAAA,IAAAC,KAAA;AAAA,EAAA,GAGrBV,OAAAO,KAAAA,IAAAP,EAAA,CAAA;AAAA,MAAAW;AAAA,SAAAX,SAAAE,KATHS,IAAA,gBAAAC,EAACC,GAAA,EACO,MAAAV,GACN,QAAA,IACM,OAAA,kBACGD,SAAAA,GACL,IAAAK,EAAAA,CAIH,GACDP,OAAAE,GAAAF,OAAAW,KAAAA,IAAAX,EAAA,CAAA,GAVFW;AAUE;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { AoaPage } from '../../atoms/_menu/menu-item/MenuItem';
|
|
3
2
|
import { AoaSetting } from '../../atoms/_menu/user-menu/UserMenu';
|
|
4
3
|
export interface AoaNavigationBarProps {
|
|
@@ -50,5 +49,5 @@ export interface AoaNavigationBarProps {
|
|
|
50
49
|
* />
|
|
51
50
|
* ```
|
|
52
51
|
*/
|
|
53
|
-
export declare
|
|
52
|
+
export declare function AoaNavigationBar(props: AoaNavigationBarProps): import("react/jsx-runtime").JSX.Element;
|
|
54
53
|
//# sourceMappingURL=NavigationBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationBar.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/navigation-bar/NavigationBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavigationBar.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/navigation-bar/NavigationBar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAEpF,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAiG5D"}
|
|
@@ -1,101 +1,100 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, [e]),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
"::-webkit-scrollbar-thumb:vertical:active": {
|
|
66
|
-
background: "rgba(100, 100, 100, .61)",
|
|
67
|
-
WebkitBorderRadius: "100px"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
tabIndex: 0,
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ o(
|
|
73
|
-
l,
|
|
74
|
-
{
|
|
75
|
-
index: 0,
|
|
76
|
-
page: { label: r.name, to: r.homePath ?? "/" },
|
|
77
|
-
selectedPage: e,
|
|
78
|
-
setSelectedPage: a
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ o(d, { sx: { flexGrow: 1, display: "flex", height: "100%" }, children: r.pages.map((t, i) => /* @__PURE__ */ o(
|
|
82
|
-
l,
|
|
83
|
-
{
|
|
84
|
-
index: i + 1,
|
|
85
|
-
page: t,
|
|
86
|
-
selectedPage: e,
|
|
87
|
-
setSelectedPage: a
|
|
88
|
-
},
|
|
89
|
-
i
|
|
90
|
-
)) }),
|
|
91
|
-
/* @__PURE__ */ o(h, { settings: r.settings, username: r.username })
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
)
|
|
1
|
+
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { c as B } from "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { Box as R, AppBar as W, Toolbar as A } from "@mui/material";
|
|
4
|
+
import { l as I } from "../../../chunks/lodash.CA_K01A9.js";
|
|
5
|
+
import { useState as M, useEffect as S } from "react";
|
|
6
|
+
import { FontNormalSxProps as P } from "../../../_constants.js";
|
|
7
|
+
import { AoaMenuItem as p } from "../../atoms/_menu/menu-item/MenuItem.js";
|
|
8
|
+
import { AoaUserMenu as T } from "../../atoms/_menu/user-menu/UserMenu.js";
|
|
9
|
+
function U(t) {
|
|
10
|
+
const e = B.c(28), [o, k] = M(0);
|
|
11
|
+
let m, b;
|
|
12
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
|
|
13
|
+
const r = window.sessionStorage.getItem("activeMenuTab");
|
|
14
|
+
r && k(JSON.parse(r));
|
|
15
|
+
}, b = [], e[0] = m, e[1] = b) : (m = e[0], b = e[1]), S(m, b);
|
|
16
|
+
let f, d;
|
|
17
|
+
e[2] !== o ? (f = () => {
|
|
18
|
+
window.sessionStorage.setItem("activeMenuTab", o.toString());
|
|
19
|
+
}, d = [o], e[2] = o, e[3] = f, e[4] = d) : (f = e[3], d = e[4]), S(f, d);
|
|
20
|
+
let g;
|
|
21
|
+
e[5] === Symbol.for("react.memo_cache_sentinel") ? (g = I.merge({
|
|
22
|
+
color: "var(--color-text)",
|
|
23
|
+
backgroundColor: "var(--color-rijks-yellow)",
|
|
24
|
+
height: "70px",
|
|
25
|
+
boxShadow: "none"
|
|
26
|
+
}, P), e[5] = g) : g = e[5];
|
|
27
|
+
let u;
|
|
28
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
29
|
+
height: "100%",
|
|
30
|
+
overflowX: "scroll",
|
|
31
|
+
scrollbarWidth: "thin",
|
|
32
|
+
scrollbarColor: "#c5c5c5 #f6f6f6",
|
|
33
|
+
"::-webkit-scrollbar": {
|
|
34
|
+
overflow: "visible",
|
|
35
|
+
borderRadius: "4px",
|
|
36
|
+
width: "6px",
|
|
37
|
+
height: "6px",
|
|
38
|
+
WebkitBorderRadius: "4px"
|
|
39
|
+
},
|
|
40
|
+
"::-webkit-scrollbar:hover": {
|
|
41
|
+
background: "#c5c5c5;"
|
|
42
|
+
},
|
|
43
|
+
"::-webkit-scrollbar-corner": {
|
|
44
|
+
background: "rgba(0,0,0,0.5)"
|
|
45
|
+
},
|
|
46
|
+
"::-webkit-scrollbar-track": {
|
|
47
|
+
opacity: 0,
|
|
48
|
+
transition: "all 0.5s",
|
|
49
|
+
WebkitTransition: "all .5s"
|
|
50
|
+
},
|
|
51
|
+
"::-webkit-scrollbar-thumb": {
|
|
52
|
+
overflow: "visible",
|
|
53
|
+
backgroundColor: "#c5c5c5;",
|
|
54
|
+
borderRadius: "4px",
|
|
55
|
+
border: "3px solid #f6f6f6"
|
|
56
|
+
},
|
|
57
|
+
"::-webkit-scrollbar-thumb:vertical": {
|
|
58
|
+
background: "rgba(100, 100, 100, .5)",
|
|
59
|
+
WebkitBorderRadius: "100px"
|
|
60
|
+
},
|
|
61
|
+
"::-webkit-scrollbar-thumb:vertical:active": {
|
|
62
|
+
background: "rgba(100, 100, 100, .61)",
|
|
63
|
+
WebkitBorderRadius: "100px"
|
|
95
64
|
}
|
|
96
|
-
);
|
|
97
|
-
|
|
65
|
+
}, e[6] = u) : u = e[6];
|
|
66
|
+
const w = t.homePath ?? "/";
|
|
67
|
+
let l;
|
|
68
|
+
e[7] !== t.name || e[8] !== w ? (l = {
|
|
69
|
+
label: t.name,
|
|
70
|
+
to: w
|
|
71
|
+
}, e[7] = t.name, e[8] = w, e[9] = l) : l = e[9];
|
|
72
|
+
let i;
|
|
73
|
+
e[10] !== o || e[11] !== l ? (i = /* @__PURE__ */ n(p, { index: 0, page: l, selectedPage: o, setSelectedPage: k }), e[10] = o, e[11] = l, e[12] = i) : i = e[12];
|
|
74
|
+
let h;
|
|
75
|
+
e[13] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
76
|
+
flexGrow: 1,
|
|
77
|
+
display: "flex",
|
|
78
|
+
height: "100%"
|
|
79
|
+
}, e[13] = h) : h = e[13];
|
|
80
|
+
let a;
|
|
81
|
+
if (e[14] !== t.pages || e[15] !== o) {
|
|
82
|
+
let r;
|
|
83
|
+
e[17] !== o ? (r = (_, v) => /* @__PURE__ */ n(p, { index: v + 1, page: _, selectedPage: o, setSelectedPage: k }, v), e[17] = o, e[18] = r) : r = e[18], a = t.pages.map(r), e[14] = t.pages, e[15] = o, e[16] = a;
|
|
84
|
+
} else
|
|
85
|
+
a = e[16];
|
|
86
|
+
let s;
|
|
87
|
+
e[19] !== a ? (s = /* @__PURE__ */ n(R, { sx: h, children: a }), e[19] = a, e[20] = s) : s = e[20];
|
|
88
|
+
let c;
|
|
89
|
+
e[21] !== t.settings || e[22] !== t.username ? (c = /* @__PURE__ */ n(T, { settings: t.settings, username: t.username }), e[21] = t.settings, e[22] = t.username, e[23] = c) : c = e[23];
|
|
90
|
+
let x;
|
|
91
|
+
return e[24] !== s || e[25] !== c || e[26] !== i ? (x = /* @__PURE__ */ n(W, { position: "static", sx: g, children: /* @__PURE__ */ y(A, { role: "menu", sx: u, tabIndex: 0, children: [
|
|
92
|
+
i,
|
|
93
|
+
s,
|
|
94
|
+
c
|
|
95
|
+
] }) }), e[24] = s, e[25] = c, e[26] = i, e[27] = x) : x = e[27], x;
|
|
96
|
+
}
|
|
98
97
|
export {
|
|
99
|
-
|
|
98
|
+
U as AoaNavigationBar
|
|
100
99
|
};
|
|
101
100
|
//# sourceMappingURL=NavigationBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationBar.js","sources":["../../../../src/components/molecules/navigation-bar/NavigationBar.tsx"],"sourcesContent":["import { AppBar, Box, Toolbar } from '@mui/material';\nimport { merge } from 'lodash';\nimport {
|
|
1
|
+
{"version":3,"file":"NavigationBar.js","sources":["../../../../src/components/molecules/navigation-bar/NavigationBar.tsx"],"sourcesContent":["import { AppBar, Box, Toolbar } from '@mui/material';\nimport { merge } from 'lodash';\nimport { useEffect, useState } from 'react';\nimport { FontNormalSxProps } from '../../../_constants';\nimport { AoaMenuItem, type AoaPage } from '../../atoms/_menu/menu-item/MenuItem';\nimport { AoaUserMenu, type AoaSetting } from '../../atoms/_menu/user-menu/UserMenu';\n\nexport interface AoaNavigationBarProps {\n /**\n * If your home page is not on the root url, use this prop to set the home path\n */\n readonly homePath?: string;\n /**\n * The name of the application that will be used for the Home tab\n */\n readonly name: string;\n /**\n * A list of all the pages and optional subpages to be shown in the menu\n */\n readonly pages: AoaPage[];\n /**\n * A list of all the settings to be shown in the menu\n */\n readonly settings: AoaSetting[];\n /**\n * Optional username to be displayed next to the settings menu\n */\n readonly username?: string;\n}\n\n/**\n * Constructs a navigation bar using pre-defined Rijks styling\n *\n * @param props - Props to pass to the navigation bar\n * @example\n * ```jsx\n * <AoaNavigationBar\n * name=\"Demo App\"\n * pages={\n * [\n * {\n * label: \"Products\",\n * to: \"/products\",\n * subItems: [\n * {\n * label: \"Books\",\n * to: \"/books\",\n * icon: <BookIcon />\n * }\n * ]\n * }\n * ]\n * }\n * settings={[{ label: \"Logout\", onClick: () => console.log(\"Logout\") }]}\n * />\n * ```\n */\n\nexport function AoaNavigationBar(props: AoaNavigationBarProps) {\n const [selectedPage, setSelectedPage] = useState<number>(0);\n\n useEffect(() => {\n const sessionStorage = window.sessionStorage.getItem('activeMenuTab');\n if (sessionStorage) {\n setSelectedPage(JSON.parse(sessionStorage));\n }\n }, []);\n\n useEffect(() => {\n window.sessionStorage.setItem('activeMenuTab', selectedPage.toString());\n }, [selectedPage]);\n\n return (\n <AppBar\n position='static'\n sx={merge(\n {\n color: 'var(--color-text)',\n backgroundColor: 'var(--color-rijks-yellow)',\n height: '70px',\n boxShadow: 'none'\n },\n FontNormalSxProps\n )}\n >\n <Toolbar\n role='menu'\n sx={{\n height: '100%',\n overflowX: 'scroll',\n scrollbarWidth: 'thin',\n scrollbarColor: '#c5c5c5 #f6f6f6',\n\n '::-webkit-scrollbar': {\n overflow: 'visible',\n borderRadius: '4px',\n width: '6px',\n height: '6px',\n WebkitBorderRadius: '4px'\n },\n\n '::-webkit-scrollbar:hover': {\n background: '#c5c5c5;'\n },\n\n '::-webkit-scrollbar-corner': {\n background: 'rgba(0,0,0,0.5)'\n },\n\n '::-webkit-scrollbar-track': {\n opacity: 0,\n transition: 'all 0.5s',\n WebkitTransition: 'all .5s'\n },\n\n '::-webkit-scrollbar-thumb': {\n overflow: 'visible',\n backgroundColor: '#c5c5c5;',\n borderRadius: '4px',\n border: '3px solid #f6f6f6'\n },\n\n '::-webkit-scrollbar-thumb:vertical': {\n background: 'rgba(100, 100, 100, .5)',\n WebkitBorderRadius: '100px'\n },\n\n '::-webkit-scrollbar-thumb:vertical:active': {\n background: 'rgba(100, 100, 100, .61)',\n WebkitBorderRadius: '100px'\n }\n }}\n tabIndex={0}\n >\n <AoaMenuItem\n index={0}\n page={{ label: props.name, to: props.homePath ?? '/' }}\n selectedPage={selectedPage}\n setSelectedPage={setSelectedPage}\n />\n <Box sx={{ flexGrow: 1, display: 'flex', height: '100%' }}>\n {props.pages.map((page, index) => (\n <AoaMenuItem\n index={index + 1}\n key={index}\n page={page}\n selectedPage={selectedPage}\n setSelectedPage={setSelectedPage}\n />\n ))}\n </Box>\n <AoaUserMenu settings={props.settings} username={props.username} />\n </Toolbar>\n </AppBar>\n );\n}\n"],"names":["AoaNavigationBar","props","$","_c","selectedPage","setSelectedPage","useState","t0","t1","Symbol","for","sessionStorage","window","getItem","JSON","parse","useEffect","t2","t3","setItem","toString","t4","merge","color","backgroundColor","height","boxShadow","FontNormalSxProps","t5","overflowX","scrollbarWidth","scrollbarColor","overflow","borderRadius","width","WebkitBorderRadius","background","opacity","transition","WebkitTransition","border","t6","homePath","t7","name","label","to","t8","AoaMenuItem","t9","flexGrow","display","t10","pages","t11","page","index","jsx","map","Box","t12","settings","username","AoaUserMenu","t13","AppBar","jsxs","Toolbar"],"mappings":";;;;;;;;AA0DO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL,CAAAC,GAAAC,CAAA,IAAwCC,GAAkB;AAAE,MAAAC,GAAAC;AAAA,EAAAN,EAAA,CAAA,MAAAO,OAAAC,IAAA,2BAAA,KAElDH,IAAAA,MAAA;AACR,UAAAI,IAAuBC,OAAAD,eAAAE,QAA8B,eAAe;AAAE,IAClEF,KACFN,EAAgBS,KAAAC,MAAWJ,CAAc,CAAC;AAAA,EAAC,GAE5CH,IAAA,CAAA,GAAEN,OAAAK,GAAAL,OAAAM,MAAAD,IAAAL,EAAA,CAAA,GAAAM,IAAAN,EAAA,CAAA,IALLc,EAAUT,GAKPC,CAAE;AAAC,MAAAS,GAAAC;AAAA,EAAAhB,SAAAE,KAEIa,IAAAA,MAAA;AACRL,WAAAD,eAAAQ,QAA8B,iBAAiBf,EAAYgB,UAAW;AAAA,EAAA,GACrEF,KAACd,CAAY,GAACF,OAAAE,GAAAF,OAAAe,GAAAf,OAAAgB,MAAAD,IAAAf,EAAA,CAAA,GAAAgB,IAAAhB,EAAA,CAAA,IAFjBc,EAAUC,GAEPC,CAAc;AAAC,MAAAG;AAAA,EAAAnB,EAAA,CAAA,MAAAO,OAAAC,IAAA,2BAAA,KAKVW,IAAAC,EAAAA,MAAA;AAAA,IAAAC,OAEO;AAAA,IAAmBC,iBACT;AAAA,IAA2BC,QACpC;AAAA,IAAMC,WACH;AAAA,EAAA,GAAMC,CAGrB,GAACzB,OAAAmB,KAAAA,IAAAnB,EA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D,KAAA1D,EAAA,EAAA,MAAA6C,KA9EvEiB,IAAA,gBAAAP,EAACQ,GAAA,EACU,UAAA,UACL,IAAA5C,GAUJ,UAAA,gBAAA6C,EAACC,GAAA,EACM,MAAA,QACD,IAAAvC,GA6CM,aAEVmB,UAAAA;AAAAA,IAAAA;AAAAA,IAMAO;AAAAA,IAWAM;AAAAA,EAAAA,EAAAA,CACF,EAAA,CACF,GAAS1D,QAAAoD,GAAApD,QAAA0D,GAAA1D,QAAA6C,GAAA7C,QAAA8D,KAAAA,IAAA9D,EAAA,EAAA,GAhFT8D;AAgFS;"}
|
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
);
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { c as U } from "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { CircularProgress as k } from "@mui/material";
|
|
4
|
+
import { l as B } from "../../../chunks/lodash.CA_K01A9.js";
|
|
5
|
+
import { AoaButton as C } from "../../atoms/button/Button.js";
|
|
6
|
+
function P(b) {
|
|
7
|
+
const e = U.c(30);
|
|
8
|
+
let l, o, i, s, t, r, a, n, m, d;
|
|
9
|
+
e[0] !== b ? ({
|
|
10
|
+
isUploading: t,
|
|
11
|
+
isDisabled: i,
|
|
12
|
+
children: l,
|
|
13
|
+
sx: m,
|
|
14
|
+
isNeverDisabled: s,
|
|
15
|
+
type: d,
|
|
16
|
+
files: o,
|
|
17
|
+
setIsUploading: n,
|
|
18
|
+
onClick: r,
|
|
19
|
+
...a
|
|
20
|
+
} = b, e[0] = b, e[1] = l, e[2] = o, e[3] = i, e[4] = s, e[5] = t, e[6] = r, e[7] = a, e[8] = n, e[9] = m, e[10] = d) : (l = e[1], o = e[2], i = e[3], s = e[4], t = e[5], r = e[6], a = e[7], n = e[8], m = e[9], d = e[10]);
|
|
21
|
+
let p;
|
|
22
|
+
e[11] !== o || e[12] !== i || e[13] !== s || e[14] !== t ? (p = s ? !1 : !!i || t || Object.keys(o ?? []).length < 1, e[11] = o, e[12] = i, e[13] = s, e[14] = t, e[15] = p) : p = e[15];
|
|
23
|
+
let g;
|
|
24
|
+
e[16] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ h(k, { "aria-label": "Uploading...", size: 20 }), e[16] = g) : g = e[16];
|
|
25
|
+
let c;
|
|
26
|
+
e[17] !== r || e[18] !== n ? (c = (y) => {
|
|
27
|
+
n(!0), r?.(y);
|
|
28
|
+
}, e[17] = r, e[18] = n, e[19] = c) : c = e[19];
|
|
29
|
+
let f;
|
|
30
|
+
e[20] !== m ? (f = B.merge({
|
|
31
|
+
marginRight: 0
|
|
32
|
+
}, m), e[20] = m, e[21] = f) : f = e[21];
|
|
33
|
+
const x = d ?? "primary";
|
|
34
|
+
let u;
|
|
35
|
+
return e[22] !== l || e[23] !== t || e[24] !== a || e[25] !== p || e[26] !== c || e[27] !== f || e[28] !== x ? (u = /* @__PURE__ */ h(C, { ...a, disabled: p, loading: t, loadingIndicator: g, loadingPosition: "start", onClick: c, sx: f, type: x, children: l }), e[22] = l, e[23] = t, e[24] = a, e[25] = p, e[26] = c, e[27] = f, e[28] = x, e[29] = u) : u = e[29], u;
|
|
33
36
|
}
|
|
34
37
|
export {
|
|
35
|
-
|
|
38
|
+
P as AoaUploadButton
|
|
36
39
|
};
|
|
37
40
|
//# sourceMappingURL=UploadButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadButton.js","sources":["../../../../src/components/molecules/upload-button/UploadButton.tsx"],"sourcesContent":["import { CircularProgress } from '@mui/material';\nimport { merge } from 'lodash';\nimport type { PropsWithChildren } from 'react';\nimport { AoaButton, type AoaButtonProps } from '../../atoms/button/Button';\n\nexport interface AoaUploadButtonProps<TData> extends Omit<AoaButtonProps, 'disabled' | 'startIcon' | 'type'> {\n /**\n * The files that should be checked, required if {@link AoaUploadButtonProps.noFilesAllowed} is `false`\n */\n readonly files?: TData[];\n /**\n * Whether the button should be disabled\n */\n readonly isDisabled?: boolean;\n /**\n * Whether the button should never be disabled.\n * - If `true` the button never goes into a `disabled` state, regardless of other conditions\n * - If `false` the button will be disabled if there are no files provided\n * (through {@link AoaUploadButtonProps.files | `files`}), or the upload progress is running\n */\n readonly isNeverDisabled?: boolean;\n\n /**\n * Whether the upload process is running. This controls whether a spinner is shown and the button is disabled\n */\n readonly isUploading: boolean;\n /**\n * The action to change {@link AoaUploadButtonProps.isUploading | `isUploading`} to `true`\n *\n * @param newState - The new state of the `isUploading` flag\n */\n setIsUploading(this: void, newState: boolean): void;\n\n /**\n * The type of the button. This _cannot_ be a `text` style button like the base {@link AoaButton}\n */\n readonly type?: 'primary' | 'secondary';\n}\n\nexport function AoaUploadButton<TData>({\n isUploading,\n isDisabled,\n children,\n sx,\n isNeverDisabled,\n type,\n files,\n setIsUploading,\n onClick,\n ...props\n}: PropsWithChildren<AoaUploadButtonProps<TData>>) {\n return (\n <AoaButton\n {...props}\n disabled={isNeverDisabled ? false : Boolean(isDisabled) || isUploading || Object.keys(files ?? []).length < 1}\n loading={isUploading}\n loadingIndicator={<CircularProgress aria-label='Uploading...' size={20} />}\n loadingPosition='start'\n onClick={(event) => {\n setIsUploading(true);\n onClick?.(event);\n }}\n sx={merge({ marginRight: 0 }, sx)}\n type={type ?? 'primary'}\n >\n {children}\n </AoaButton>\n );\n}\n"],"names":["AoaUploadButton","
|
|
1
|
+
{"version":3,"file":"UploadButton.js","sources":["../../../../src/components/molecules/upload-button/UploadButton.tsx"],"sourcesContent":["import { CircularProgress } from '@mui/material';\nimport { merge } from 'lodash';\nimport type { PropsWithChildren } from 'react';\nimport { AoaButton, type AoaButtonProps } from '../../atoms/button/Button';\n\nexport interface AoaUploadButtonProps<TData> extends Omit<AoaButtonProps, 'disabled' | 'startIcon' | 'type'> {\n /**\n * The files that should be checked, required if {@link AoaUploadButtonProps.noFilesAllowed} is `false`\n */\n readonly files?: TData[];\n /**\n * Whether the button should be disabled\n */\n readonly isDisabled?: boolean;\n /**\n * Whether the button should never be disabled.\n * - If `true` the button never goes into a `disabled` state, regardless of other conditions\n * - If `false` the button will be disabled if there are no files provided\n * (through {@link AoaUploadButtonProps.files | `files`}), or the upload progress is running\n */\n readonly isNeverDisabled?: boolean;\n\n /**\n * Whether the upload process is running. This controls whether a spinner is shown and the button is disabled\n */\n readonly isUploading: boolean;\n /**\n * The action to change {@link AoaUploadButtonProps.isUploading | `isUploading`} to `true`\n *\n * @param newState - The new state of the `isUploading` flag\n */\n setIsUploading(this: void, newState: boolean): void;\n\n /**\n * The type of the button. This _cannot_ be a `text` style button like the base {@link AoaButton}\n */\n readonly type?: 'primary' | 'secondary';\n}\n\nexport function AoaUploadButton<TData>({\n isUploading,\n isDisabled,\n children,\n sx,\n isNeverDisabled,\n type,\n files,\n setIsUploading,\n onClick,\n ...props\n}: PropsWithChildren<AoaUploadButtonProps<TData>>) {\n return (\n <AoaButton\n {...props}\n disabled={isNeverDisabled ? false : Boolean(isDisabled) || isUploading || Object.keys(files ?? []).length < 1}\n loading={isUploading}\n loadingIndicator={<CircularProgress aria-label='Uploading...' size={20} />}\n loadingPosition='start'\n onClick={(event) => {\n setIsUploading(true);\n onClick?.(event);\n }}\n sx={merge({ marginRight: 0 }, sx)}\n type={type ?? 'primary'}\n >\n {children}\n </AoaButton>\n );\n}\n"],"names":["AoaUploadButton","t0","$","_c","children","files","isDisabled","isNeverDisabled","isUploading","onClick","props","setIsUploading","sx","type","t1","Boolean","Object","keys","length","t2","Symbol","for","jsx","CircularProgress","t3","event","t4","merge","marginRight","t5","t6","AoaButton"],"mappings":";;;;;AAuCO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA;AAAA,MAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC;AAAA,EAAAX,SAAAD,KAAgC;AAAA,IAAAO,aAAAA;AAAAA,IAAAF,YAAAA;AAAAA,IAAAF,UAAAA;AAAAA,IAAAQ,IAAAA;AAAAA,IAAAL,iBAAAA;AAAAA,IAAAM,MAAAA;AAAAA,IAAAR,OAAAA;AAAAA,IAAAM,gBAAAA;AAAAA,IAAAF,SAAAA;AAAAA,IAAA,GAAAC;AAAAA,EAAAA,IAAAT,GAWUC,OAAAD,GAAAC,OAAAE,GAAAF,OAAAG,GAAAH,OAAAI,GAAAJ,OAAAK,GAAAL,OAAAM,GAAAN,OAAAO,GAAAP,OAAAQ,GAAAR,OAAAS,GAAAT,OAAAU,GAAAV,QAAAW,MAAAT,IAAAF,EAAA,CAAA,GAAAG,IAAAH,EAAA,CAAA,GAAAI,IAAAJ,EAAA,CAAA,GAAAK,IAAAL,EAAA,CAAA,GAAAM,IAAAN,EAAA,CAAA,GAAAO,IAAAP,EAAA,CAAA,GAAAQ,IAAAR,EAAA,CAAA,GAAAS,IAAAT,EAAA,CAAA,GAAAU,IAAAV,EAAA,CAAA,GAAAW,IAAAX,EAAA,EAAA;AAAA,MAAAY;AAAA,EAAAZ,EAAA,EAAA,MAAAG,KAAAH,EAAA,EAAA,MAAAI,KAAAJ,EAAA,EAAA,MAAAK,KAAAL,UAAAM,KAIjCM,IAAAP,IAAe,KAAWQ,EAAQT,KAAeE,KAAeQ,OAAAC,KAAYZ,OAAW,EAACa,SAAA,GAAWhB,QAAAG,GAAAH,QAAAI,GAAAJ,QAAAK,GAAAL,QA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ectionHeaderProps={{ title: "This is a title" }}>I am a child!</AoaContentPage>
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export declare
|
|
19
|
+
export declare function AoaContentPage({ children, sectionHeaderProps, ...props }: PropsWithChildren<AoaContentPageProps>): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
//# sourceMappingURL=ContentPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPage.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/content-page/ContentPage.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContentPage.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/content-page/ContentPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAExG,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;CACpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,2CAShH"}
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AoaSectionHeader as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as c, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { Container as p, Box as d } from "@mui/material";
|
|
4
|
+
import { AoaSectionHeader as f } from "../../atoms/section-header/SectionHeader.js";
|
|
5
|
+
function j(n) {
|
|
6
|
+
const e = m.c(10);
|
|
7
|
+
let t, i, o;
|
|
8
|
+
e[0] !== n ? ({
|
|
9
|
+
children: t,
|
|
10
|
+
sectionHeaderProps: o,
|
|
11
|
+
...i
|
|
12
|
+
} = n, e[0] = n, e[1] = t, e[2] = i, e[3] = o) : (t = e[1], i = e[2], o = e[3]);
|
|
13
|
+
const l = i["data-qa"];
|
|
14
|
+
let r;
|
|
15
|
+
e[4] !== o ? (r = /* @__PURE__ */ c(f, { ...o }), e[4] = o, e[5] = r) : r = e[5];
|
|
16
|
+
let a;
|
|
17
|
+
return e[6] !== t || e[7] !== l || e[8] !== r ? (a = /* @__PURE__ */ c(p, { maxWidth: "xl", children: /* @__PURE__ */ s(d, { "data-qa": l, marginTop: "calc(8 * 4px)", children: [
|
|
18
|
+
r,
|
|
19
|
+
t
|
|
20
|
+
] }) }), e[6] = t, e[7] = l, e[8] = r, e[9] = a) : a = e[9], a;
|
|
21
|
+
}
|
|
11
22
|
export {
|
|
12
|
-
|
|
23
|
+
j as AoaContentPage
|
|
13
24
|
};
|
|
14
25
|
//# sourceMappingURL=ContentPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPage.js","sources":["../../../../src/components/organisms/content-page/ContentPage.tsx"],"sourcesContent":["import { Box, Container } from '@mui/material';\nimport {
|
|
1
|
+
{"version":3,"file":"ContentPage.js","sources":["../../../../src/components/organisms/content-page/ContentPage.tsx"],"sourcesContent":["import { Box, Container } from '@mui/material';\nimport type { PropsWithChildren } from 'react';\nimport { AoaSectionHeader, type AoaSectionHeaderProps } from '../../atoms/section-header/SectionHeader';\n\nexport interface AoaContentPageProps {\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n readonly sectionHeaderProps: AoaSectionHeaderProps;\n}\n\n/**\n * Constructs a basic page with a section header using pre-defined Rijks styling\n *\n * @param props - Props to pass to the content page\n * @example\n * ```jsx\n * <AoaContentPage sectionHeaderProps={{ title: \"This is a title\" }}>I am a child!</AoaContentPage>\n * ```\n */\nexport function AoaContentPage({ children, sectionHeaderProps, ...props }: PropsWithChildren<AoaContentPageProps>) {\n return (\n <Container maxWidth='xl'>\n <Box data-qa={props['data-qa']} marginTop='calc(8 * 4px)'>\n <AoaSectionHeader {...sectionHeaderProps} />\n {children}\n </Box>\n </Container>\n );\n}\n"],"names":["AoaContentPage","t0","$","_c","children","props","sectionHeaderProps","t1","t2","jsx","AoaSectionHeader","t3","Container","Box"],"mappings":";;;;AAqBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA;AAAA,MAAAC,GAAAC,GAAAC;AAAA,EAAAJ,SAAAD,KAAwB;AAAA,IAAAG,UAAAA;AAAAA,IAAAE,oBAAAA;AAAAA,IAAA,GAAAD;AAAAA,EAAAA,IAAAJ,GAAkFC,OAAAD,GAAAC,OAAAE,GAAAF,OAAAG,GAAAH,OAAAI,MAAAF,IAAAF,EAAA,CAAA,GAAAG,IAAAH,EAAA,CAAA,GAAAI,IAAAJ,EAAA,CAAA;AAG7F,QAAAK,IAAAF,EAAM,SAAS;AAAC,MAAAG;AAAA,EAAAN,SAAAI,KAC5BE,IAAA,gBAAAC,EAACC,GAAA,EAAgB,GAAKJ,EAAAA,CAAkB,GAAIJ,OAAAI,GAAAJ,OAAAM,KAAAA,IAAAN,EAAA,CAAA;AAAA,MAAAS;AAAA,SAAAT,EAAA,CAAA,MAAAE,KAAAF,SAAAK,KAAAL,EAAA,CAAA,MAAAM,KAFhDG,IAAA,gBAAAF,EAACG,KAAmB,UAAA,MAClB,4BAACC,GAAA,EAAa,WAAAN,GAA4B,WAAA,iBACxCC,UAAAA;AAAAA,IAAAA;AAAAA,IACCJ;AAAAA,EAAAA,EAAAA,CACH,EAAA,CACF,GAAYF,OAAAE,GAAAF,OAAAK,GAAAL,OAAAM,GAAAN,OAAAS,KAAAA,IAAAT,EAAA,CAAA,GALZS;AAKY;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@tanstack/react-form";
|
|
2
|
-
import { c as t, d as s, u as r, e as m, f as F, w as x } from "../chunks/FieldError.
|
|
2
|
+
import { c as t, d as s, u as r, e as m, f as F, w as x } from "../chunks/FieldError.CCQnjdMd.js";
|
|
3
3
|
export {
|
|
4
4
|
t as aoaFieldContext,
|
|
5
5
|
s as aoaFormContext,
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { AoaSwitchButton as b } from "./components/atoms/selection-buttons/switc
|
|
|
11
11
|
import { AoaTable as T } from "./components/atoms/table/Table.js";
|
|
12
12
|
import { AoaTooltip as w } from "./components/atoms/tooltip/Tooltip.js";
|
|
13
13
|
import { AoaZeroWidthSpace as N } from "./components/atoms/zero-width-space/ZeroWidthSpace.js";
|
|
14
|
-
import { A as E, a as I, b as P, c as k, d as v, u as z, e as D, f as H, w as L } from "./chunks/FieldError.
|
|
14
|
+
import { A as E, a as I, b as P, c as k, d as v, u as z, e as D, f as H, w as L } from "./chunks/FieldError.CCQnjdMd.js";
|
|
15
15
|
import { AoaFileDropzone as U } from "./components/molecules/file-dropzone/FileDropzone.js";
|
|
16
16
|
import { AoaFileTable as Z } from "./components/molecules/file-table/FileTable.js";
|
|
17
17
|
import { AoaModalCloseButton as q } from "./components/molecules/modal-close-button/ModalCloseButton.js";
|