@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
|
@@ -10,34 +10,23 @@ function g({
|
|
|
10
10
|
children: s,
|
|
11
11
|
...o
|
|
12
12
|
}) {
|
|
13
|
-
return /* @__PURE__ */ r(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
lineHeight: 1.5,
|
|
27
|
-
backgroundColor: "#FFFFFF",
|
|
28
|
-
borderRadius: 0,
|
|
29
|
-
boxShadow: "0 1px 3px 0 rgb(0 0 0 / 20%), 0 1px 1px 0 rgb(0 0 0 / 14%), 0 2px 1px -1px rgb(0 0 0 / 12%) !important",
|
|
30
|
-
color: "var(--color-text)"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
o.slotProps
|
|
36
|
-
),
|
|
37
|
-
title: /* @__PURE__ */ r(x, { "data-qa": t, sx: { p: 1 }, children: p }),
|
|
38
|
-
children: s
|
|
13
|
+
return /* @__PURE__ */ r(i, { ...o, classes: {
|
|
14
|
+
popper: a
|
|
15
|
+
}, describeChild: !0, enterDelay: l ?? 300, placement: e ?? "top", slotProps: m.merge({
|
|
16
|
+
popper: {
|
|
17
|
+
sx: {
|
|
18
|
+
[`& .${d.tooltip}`]: {
|
|
19
|
+
lineHeight: 1.5,
|
|
20
|
+
backgroundColor: "#FFFFFF",
|
|
21
|
+
borderRadius: 0,
|
|
22
|
+
boxShadow: "0 1px 3px 0 rgb(0 0 0 / 20%), 0 1px 1px 0 rgb(0 0 0 / 14%), 0 2px 1px -1px rgb(0 0 0 / 12%) !important",
|
|
23
|
+
color: "var(--color-text)"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
39
26
|
}
|
|
40
|
-
)
|
|
27
|
+
}, o.slotProps), title: /* @__PURE__ */ r(x, { "data-qa": t, sx: {
|
|
28
|
+
p: 1
|
|
29
|
+
}, children: p }), children: s });
|
|
41
30
|
}
|
|
42
31
|
export {
|
|
43
32
|
g as AoaTooltip
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/atoms/tooltip/Tooltip.tsx"],"sourcesContent":["import { Box, Tooltip, tooltipClasses, type TooltipProps } from '@mui/material';\nimport { merge } from 'lodash';\n\nexport interface AoaTooltipProps extends TooltipProps {\n /**\n * Data-qa tag to apply to the tooltip\n */\n readonly 'data-qa'?: string;\n}\n\n/**\n * Constructs a tooltip using pre-defined Rijks styling\n *\n * @param props - Props to pass to the {@link Tooltip}\n */\nexport function AoaTooltip({\n 'data-qa': qaTag,\n title,\n placement,\n enterDelay,\n className,\n children,\n ...props\n}: AoaTooltipProps) {\n return (\n <Tooltip\n {...props}\n classes={{ popper: className }}\n describeChild\n enterDelay={enterDelay ?? 300}\n placement={placement ?? 'top'}\n slotProps={merge(\n {\n popper: {\n sx: {\n [`& .${tooltipClasses.tooltip}`]: {\n lineHeight: 1.5,\n backgroundColor: '#FFFFFF',\n borderRadius: 0,\n boxShadow:\n '0 1px 3px 0 rgb(0 0 0 / 20%), 0 1px 1px 0 rgb(0 0 0 / 14%), 0 2px 1px -1px rgb(0 0 0 / 12%) !important',\n color: 'var(--color-text)'\n }\n }\n }\n },\n props.slotProps\n )}\n title={\n <Box data-qa={qaTag} sx={{ p: 1 }}>\n {title}\n </Box>\n }\n >\n {children}\n </Tooltip>\n );\n}\n"],"names":["AoaTooltip","qaTag","title","placement","enterDelay","className","children","props","jsx","Tooltip","merge","tooltipClasses","Box"],"mappings":";;;AAeO,SAASA,EAAW;AAAA,EACzB,WAAWC;
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/atoms/tooltip/Tooltip.tsx"],"sourcesContent":["import { Box, Tooltip, tooltipClasses, type TooltipProps } from '@mui/material';\nimport { merge } from 'lodash';\n\nexport interface AoaTooltipProps extends TooltipProps {\n /**\n * Data-qa tag to apply to the tooltip\n */\n readonly 'data-qa'?: string;\n}\n\n/**\n * Constructs a tooltip using pre-defined Rijks styling\n *\n * @param props - Props to pass to the {@link Tooltip}\n */\nexport function AoaTooltip({\n 'data-qa': qaTag,\n title,\n placement,\n enterDelay,\n className,\n children,\n ...props\n}: AoaTooltipProps) {\n return (\n <Tooltip\n {...props}\n classes={{ popper: className }}\n describeChild\n enterDelay={enterDelay ?? 300}\n placement={placement ?? 'top'}\n slotProps={merge(\n {\n popper: {\n sx: {\n [`& .${tooltipClasses.tooltip}`]: {\n lineHeight: 1.5,\n backgroundColor: '#FFFFFF',\n borderRadius: 0,\n boxShadow:\n '0 1px 3px 0 rgb(0 0 0 / 20%), 0 1px 1px 0 rgb(0 0 0 / 14%), 0 2px 1px -1px rgb(0 0 0 / 12%) !important',\n color: 'var(--color-text)'\n }\n }\n }\n },\n props.slotProps\n )}\n title={\n <Box data-qa={qaTag} sx={{ p: 1 }}>\n {title}\n </Box>\n }\n >\n {children}\n </Tooltip>\n );\n}\n"],"names":["AoaTooltip","qaTag","title","placement","enterDelay","className","children","props","jsx","Tooltip","popper","merge","sx","tooltipClasses","tooltip","lineHeight","backgroundColor","borderRadius","boxShadow","color","slotProps","Box","p"],"mappings":";;;AAeO,SAASA,EAAW;AAAA,EACzB,WAAWC;AAAAA,EACXC,OAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,YAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACA,GAAGC;AACY,GAAG;AAClB,SACE,gBAAAC,EAACC,GAAA,EACC,GAAIF,GACJ,SAAS;AAAA,IAAEG,QAAQL;AAAAA,EAAAA,GACnB,eAAa,IACb,YAAYD,KAAc,KAC1B,WAAWD,KAAa,OACxB,WAAWQ,QACT;AAAA,IACED,QAAQ;AAAA,MACNE,IAAI;AAAA,QACF,CAAC,MAAMC,EAAeC,OAAO,EAAE,GAAG;AAAA,UAChCC,YAAY;AAAA,UACZC,iBAAiB;AAAA,UACjBC,cAAc;AAAA,UACdC,WACE;AAAA,UACFC,OAAO;AAAA,QAAA;AAAA,MACT;AAAA,IACF;AAAA,EACF,GAEFZ,EAAMa,SACR,GACA,OACE,gBAAAZ,EAACa,GAAA,EAAI,WAASpB,GAAO,IAAI;AAAA,IAAEqB,GAAG;AAAA,EAAA,GAC3BpB,UAAAA,GACH,GAGDI,UAAAA,EAAAA,CACH;AAEJ;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TypographyProps } from '@mui/material';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
2
|
/**
|
|
4
3
|
* Inserts a Zero Width Space as a React component
|
|
5
4
|
*
|
|
@@ -9,5 +8,5 @@ import { ReactNode } from 'react';
|
|
|
9
8
|
* <AoaZeroWidthSpace />
|
|
10
9
|
* ```
|
|
11
10
|
*/
|
|
12
|
-
export declare
|
|
11
|
+
export declare function AoaZeroWidthSpace({ variant, style, ...props }: TypographyProps): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
//# sourceMappingURL=ZeroWidthSpace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZeroWidthSpace.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/zero-width-space/ZeroWidthSpace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ZeroWidthSpace.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/zero-width-space/ZeroWidthSpace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAEjE;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAM9E"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { Typography as l } from "@mui/material";
|
|
4
|
+
function h(p) {
|
|
5
|
+
const t = c.c(8);
|
|
6
|
+
let o, r, e;
|
|
7
|
+
t[0] !== p ? ({
|
|
8
|
+
variant: e,
|
|
9
|
+
style: r,
|
|
10
|
+
...o
|
|
11
|
+
} = p, t[0] = p, t[1] = o, t[2] = r, t[3] = e) : (o = t[1], r = t[2], e = t[3]);
|
|
12
|
+
const n = e ?? "caption";
|
|
13
|
+
let i;
|
|
14
|
+
return t[4] !== o || t[5] !== r || t[6] !== n ? (i = /* @__PURE__ */ a(l, { ...o, style: r, variant: n, children: "" }), t[4] = o, t[5] = r, t[6] = n, t[7] = i) : i = t[7], i;
|
|
15
|
+
}
|
|
7
16
|
export {
|
|
8
|
-
|
|
17
|
+
h as AoaZeroWidthSpace
|
|
9
18
|
};
|
|
10
19
|
//# sourceMappingURL=ZeroWidthSpace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZeroWidthSpace.js","sources":["../../../../src/components/atoms/zero-width-space/ZeroWidthSpace.tsx"],"sourcesContent":["import { Typography, type TypographyProps } from '@mui/material';\
|
|
1
|
+
{"version":3,"file":"ZeroWidthSpace.js","sources":["../../../../src/components/atoms/zero-width-space/ZeroWidthSpace.tsx"],"sourcesContent":["import { Typography, type TypographyProps } from '@mui/material';\n\n/**\n * Inserts a Zero Width Space as a React component\n *\n * @param props - Props to pass to the Zero-Width Space component\n * @example\n * ```jsx\n * <AoaZeroWidthSpace />\n * ```\n */\nexport function AoaZeroWidthSpace({ variant, style, ...props }: TypographyProps) {\n return (\n <Typography {...props} style={style} variant={variant ?? 'caption'}>\n ​\n </Typography>\n );\n}\n"],"names":["AoaZeroWidthSpace","t0","$","_c","props","style","variant","t1","t2","Typography"],"mappings":";;;AAWO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,CAAA;AAAA,MAAAC,GAAAC,GAAAC;AAAA,EAAAJ,SAAAD,KAA2B;AAAA,IAAAK,SAAAA;AAAAA,IAAAD,OAAAA;AAAAA,IAAA,GAAAD;AAAAA,EAAAA,IAAAH,GAA6CC,OAAAD,GAAAC,OAAAE,GAAAF,OAAAG,GAAAH,OAAAI,MAAAF,IAAAF,EAAA,CAAA,GAAAG,IAAAH,EAAA,CAAA,GAAAI,IAAAJ,EAAA,CAAA;AAE7B,QAAAK,IAAAD,KAAW;AAAS,MAAAE;AAAA,SAAAN,EAAA,CAAA,MAAAE,KAAAF,SAAAG,KAAAH,EAAA,CAAA,MAAAK,KAAlEC,sBAACC,GAAA,EAAU,GAAKL,GAAcC,OAAAA,GAAgB,SAAAE,GAAsB,UAAA,KAEpE,GAAaL,OAAAE,GAAAF,OAAAG,GAAAH,OAAAK,GAAAL,OAAAM,KAAAA,IAAAN,EAAA,CAAA,GAFbM;AAEa;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { A as t } from "../../../chunks/FieldError.CCQnjdMd.js";
|
|
3
4
|
import "../../atoms/notification/Notification.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
t as AoaFieldError
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=FieldError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldError.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldError.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDropzone.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/file-dropzone/FileDropzone.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"FileDropzone.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/file-dropzone/FileDropzone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAe,KAAK,MAAM,EAAsC,MAAM,gBAAgB,CAAC;AAI9F,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB,CAAC,MAAM,SAAS,MAAM,EAAE,KAAK,SAAS,eAAe,CAAC,MAAM,CAAC;IAChG;;OAEG;IACH,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB;;;;;OAKG;IACH,mBAAmB,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC;;OAEG;IACH,iBAAiB,CAAC,CAAC,YAAY,EAAE,IAAI,GAAG,MAAM,CAAC;IAC/C;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;CAClC;AAED,wBAAgB,eAAe,CAAC,MAAM,SAAS,MAAM,EAAE,KAAK,SAAS,eAAe,CAAC,MAAM,CAAC,EAC1F,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,2CAiGxE"}
|
|
@@ -1,87 +1,98 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useDropzone as
|
|
5
|
-
import { toast as
|
|
6
|
-
import { isExtensionAllowed as
|
|
7
|
-
function
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { jsx as v, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { c as P } from "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { Box as w } from "@mui/material";
|
|
4
|
+
import { useDropzone as A } from "react-dropzone";
|
|
5
|
+
import { toast as E } from "react-toastify";
|
|
6
|
+
import { isExtensionAllowed as I } from "../../../_constants.js";
|
|
7
|
+
function G(i) {
|
|
8
|
+
const e = P.c(30);
|
|
9
|
+
let d;
|
|
10
|
+
e[0] !== i.maxUploadFiles || e[1] !== i.maxUploadSizeExceededWarning ? (d = function() {
|
|
11
|
+
E(i.maxUploadSizeExceededWarning ?? `U heeft meer dan ${i.maxUploadFiles} bestand(en) geselecteerd. Dit is niet toegestaan.`, {
|
|
12
|
+
type: "warning"
|
|
13
|
+
});
|
|
14
|
+
}, e[0] = i.maxUploadFiles, e[1] = i.maxUploadSizeExceededWarning, e[2] = d) : d = e[2];
|
|
15
|
+
const s = d;
|
|
16
|
+
let f;
|
|
17
|
+
e[3] !== i || e[4] !== s ? (f = function(F, C) {
|
|
18
|
+
C.length > 0 && (C.every(V) ? s() : E(i.extensionWarning, {
|
|
19
|
+
type: "warning"
|
|
20
|
+
}));
|
|
21
|
+
const o = [...i.currentFiles];
|
|
22
|
+
for (const r of F) {
|
|
23
|
+
const S = o.findIndex((_) => _.file.name === r.name);
|
|
24
|
+
S === -1 ? o.push({
|
|
25
|
+
file: r,
|
|
26
|
+
...i.perFileProperties?.(r)
|
|
27
|
+
}) : o.splice(S, 1, {
|
|
28
|
+
file: r,
|
|
29
|
+
...i.perFileProperties?.(r)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
i.maxUploadFiles && o.length > i.maxUploadFiles ? s() : i.storeFiles(o);
|
|
33
|
+
}, e[3] = i, e[4] = s, e[5] = f) : f = e[5];
|
|
34
|
+
const h = f;
|
|
35
|
+
let c;
|
|
36
|
+
e[6] !== i ? (c = function(F) {
|
|
37
|
+
return i.customFileValidator?.(F) ? {
|
|
32
38
|
code: "custom-validator",
|
|
33
|
-
message:
|
|
34
|
-
} :
|
|
39
|
+
message: i.extensionWarning
|
|
40
|
+
} : I(i.extensionRegex, F.name) ? null : {
|
|
35
41
|
code: "name-not-ok",
|
|
36
|
-
message:
|
|
42
|
+
message: i.extensionWarning
|
|
37
43
|
};
|
|
38
|
-
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{
|
|
60
|
-
...g(),
|
|
61
|
-
"aria-label": "File drop",
|
|
62
|
-
"data-qa": e.dataQas?.input ?? "file-drop-input",
|
|
63
|
-
"data-testid": "file-drop-input"
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ r(
|
|
67
|
-
d,
|
|
68
|
-
{
|
|
69
|
-
sx: {
|
|
70
|
-
backgroundColor: "var(--color-rijks-grey-2)",
|
|
71
|
-
borderWidth: 1,
|
|
72
|
-
borderStyle: "dashed",
|
|
73
|
-
borderColor: "black",
|
|
74
|
-
marginBottom: 0.5,
|
|
75
|
-
textAlign: "center"
|
|
76
|
-
},
|
|
77
|
-
children: e.fileDropChildren
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
]
|
|
44
|
+
}, e[6] = i, e[7] = c) : c = e[7];
|
|
45
|
+
const U = c;
|
|
46
|
+
let m;
|
|
47
|
+
e[8] !== U || e[9] !== h || e[10] !== i.extensions || e[11] !== i.isDisabled || e[12] !== i.maxUploadFiles ? (m = {
|
|
48
|
+
onDrop: h,
|
|
49
|
+
disabled: i.isDisabled,
|
|
50
|
+
accept: i.extensions,
|
|
51
|
+
maxFiles: i.maxUploadFiles,
|
|
52
|
+
validator: U
|
|
53
|
+
}, e[8] = U, e[9] = h, e[10] = i.extensions, e[11] = i.isDisabled, e[12] = i.maxUploadFiles, e[13] = m) : m = e[13];
|
|
54
|
+
const {
|
|
55
|
+
getRootProps: b,
|
|
56
|
+
getInputProps: D
|
|
57
|
+
} = A(m);
|
|
58
|
+
let t;
|
|
59
|
+
e[14] !== b ? (t = b(), e[14] = b, e[15] = t) : t = e[15];
|
|
60
|
+
const y = i.dataQas?.root ?? "file-dropzone-root";
|
|
61
|
+
let x;
|
|
62
|
+
e[16] === Symbol.for("react.memo_cache_sentinel") ? (x = {
|
|
63
|
+
"&:focus": {
|
|
64
|
+
outline: "none"
|
|
81
65
|
}
|
|
82
|
-
);
|
|
66
|
+
}, e[16] = x) : x = e[16];
|
|
67
|
+
let n;
|
|
68
|
+
e[17] !== D ? (n = D(), e[17] = D, e[18] = n) : n = e[18];
|
|
69
|
+
const W = i.dataQas?.input ?? "file-drop-input";
|
|
70
|
+
let l;
|
|
71
|
+
e[19] !== n || e[20] !== W ? (l = /* @__PURE__ */ v("input", { ...n, "aria-label": "File drop", "data-qa": W, "data-testid": "file-drop-input" }), e[19] = n, e[20] = W, e[21] = l) : l = e[21];
|
|
72
|
+
let u;
|
|
73
|
+
e[22] === Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
74
|
+
backgroundColor: "var(--color-rijks-grey-2)",
|
|
75
|
+
borderWidth: 1,
|
|
76
|
+
borderStyle: "dashed",
|
|
77
|
+
borderColor: "black",
|
|
78
|
+
marginBottom: 0.5,
|
|
79
|
+
textAlign: "center"
|
|
80
|
+
}, e[22] = u) : u = e[22];
|
|
81
|
+
let a;
|
|
82
|
+
e[23] !== i.fileDropChildren ? (a = /* @__PURE__ */ v(w, { sx: u, children: i.fileDropChildren }), e[23] = i.fileDropChildren, e[24] = a) : a = e[24];
|
|
83
|
+
let g;
|
|
84
|
+
return e[25] !== a || e[26] !== t || e[27] !== y || e[28] !== l ? (g = /* @__PURE__ */ k(w, { ...t, "data-qa": y, sx: x, children: [
|
|
85
|
+
l,
|
|
86
|
+
a
|
|
87
|
+
] }), e[25] = a, e[26] = t, e[27] = y, e[28] = l, e[29] = g) : g = e[29], g;
|
|
88
|
+
}
|
|
89
|
+
function V(i) {
|
|
90
|
+
return i.errors.every(j);
|
|
91
|
+
}
|
|
92
|
+
function j(i) {
|
|
93
|
+
return i.code === "too-many-files";
|
|
83
94
|
}
|
|
84
95
|
export {
|
|
85
|
-
|
|
96
|
+
G as AoaFileDropzone
|
|
86
97
|
};
|
|
87
98
|
//# sourceMappingURL=FileDropzone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDropzone.js","sources":["../../../../src/components/molecules/file-dropzone/FileDropzone.tsx"],"sourcesContent":["import { Box } from '@mui/material';\nimport {
|
|
1
|
+
{"version":3,"file":"FileDropzone.js","sources":["../../../../src/components/molecules/file-dropzone/FileDropzone.tsx"],"sourcesContent":["import { Box } from '@mui/material';\nimport type { PropsWithChildren, ReactNode } from 'react';\nimport { useDropzone, type Accept, type FileError, type FileRejection } from 'react-dropzone';\nimport { toast } from 'react-toastify';\nimport { isExtensionAllowed } from '../../../_constants';\n\nexport type AoaDropableFile<TProps extends object> = TProps & {\n /**\n * The file that was dropped\n */\n file: File;\n};\n\nexport interface AoaFileDropzoneDataQas {\n /**\n * The data-qa tag for the input\n */\n input: string;\n /**\n * The data-qa tag for the root element\n */\n root: string;\n}\n\nexport interface AoaFileDropzoneProps<TProps extends object, TFile extends AoaDropableFile<TProps>> {\n /**\n * The current set of files that are already dropped, coming from Redux or Zustand\n */\n currentFiles: TFile[];\n /**\n * A custom function that can perform extra checks when validating files.\n * This should return `true` if the file should be rejected or `false` if it should be accepted\n *\n * @param file - The file to be validated\n */\n customFileValidator?(file: File): boolean;\n /**\n * data-qa tags for testing\n */\n dataQas?: AoaFileDropzoneDataQas;\n /**\n * The regular expression that validates if the dropped file should be accepted or rejected\n */\n extensionRegex: RegExp;\n /**\n * The toast warning message to be shown when a file is rejection\n */\n extensionWarning: string;\n /**\n * The extension map to be passed to the dropzone component\n */\n extensions: Accept;\n /**\n * The children to show inside the box where files can be dropped\n */\n fileDropChildren?: ReactNode;\n /**\n * Whether the dropzone should be disabled or not\n */\n isDisabled?: boolean;\n /**\n * A maximum count of files that should be accepted, if exceeded no save action will be performed\n */\n maxUploadFiles?: number;\n /**\n * The toast warning message to be shown when the files to be uploaded exceeds the maximum,\n * required if {@link AoaFileDropzoneProps.maxUploadFiles | maxUploadFiles} is specified.\n */\n maxUploadSizeExceededWarning?: string;\n /**\n * Additional properties to set for every file that is to be saved\n */\n perFileProperties?(acceptedFile: File): TProps;\n /**\n * The function to overwrite the files in the client store.\n * This should overwrite all files, not merge with current, which is handled in this component\n *\n * @param files - The new set of files to be stored\n */\n storeFiles(files: TFile[]): void;\n}\n\nexport function AoaFileDropzone<TProps extends object, TFile extends AoaDropableFile<TProps>>(\n props: Readonly<PropsWithChildren<AoaFileDropzoneProps<TProps, TFile>>>\n) {\n function showMaxUploadFilesWarning() {\n toast(\n props.maxUploadSizeExceededWarning ??\n `U heeft meer dan ${props.maxUploadFiles} bestand(en) geselecteerd. Dit is niet toegestaan.`,\n {\n type: 'warning'\n }\n );\n }\n\n function handleDrop(acceptedFiles: File[], fileRejections: FileRejection[]) {\n if (fileRejections.length > 0) {\n if (fileRejections.every((file) => file.errors.every((error) => error.code === 'too-many-files'))) {\n showMaxUploadFilesWarning();\n } else {\n toast(props.extensionWarning, { type: 'warning' });\n }\n }\n\n const filesClone = [...props.currentFiles];\n for (const acceptedFile of acceptedFiles) {\n const existingFileIndex = filesClone.findIndex((file) => file.file.name === acceptedFile.name);\n if (existingFileIndex === -1) {\n filesClone.push({ file: acceptedFile, ...props.perFileProperties?.(acceptedFile) } as TFile & TProps);\n } else {\n filesClone.splice(existingFileIndex, 1, {\n file: acceptedFile,\n ...props.perFileProperties?.(acceptedFile)\n } as TFile & TProps);\n }\n }\n\n if (props.maxUploadFiles && filesClone.length > props.maxUploadFiles) {\n showMaxUploadFilesWarning();\n } else {\n props.storeFiles(filesClone);\n }\n }\n\n function fileValidator(file: File): FileError | null {\n if (props.customFileValidator?.(file)) {\n return {\n code: 'custom-validator',\n message: props.extensionWarning\n };\n }\n\n if (isExtensionAllowed(props.extensionRegex, file.name)) {\n return null;\n }\n\n return {\n code: 'name-not-ok',\n message: props.extensionWarning\n };\n }\n\n const { getRootProps, getInputProps } = useDropzone({\n onDrop: handleDrop,\n disabled: props.isDisabled,\n accept: props.extensions,\n maxFiles: props.maxUploadFiles,\n validator: fileValidator\n });\n\n return (\n <Box\n {...getRootProps()}\n data-qa={props.dataQas?.root ?? 'file-dropzone-root'}\n sx={{\n '&:focus': {\n outline: 'none'\n }\n }}\n >\n <input\n {...getInputProps()}\n aria-label='File drop'\n data-qa={props.dataQas?.input ?? 'file-drop-input'}\n data-testid='file-drop-input'\n />\n <Box\n sx={{\n backgroundColor: 'var(--color-rijks-grey-2)',\n borderWidth: 1,\n borderStyle: 'dashed',\n borderColor: 'black',\n marginBottom: 0.5,\n textAlign: 'center'\n }}\n >\n {props.fileDropChildren}\n </Box>\n </Box>\n );\n}\n"],"names":["AoaFileDropzone","props","$","_c","t0","maxUploadFiles","maxUploadSizeExceededWarning","toast","type","showMaxUploadFilesWarning","t1","acceptedFiles","fileRejections","length","every","_temp2","extensionWarning","filesClone","currentFiles","acceptedFile","existingFileIndex","findIndex","file_0","file","name","push","perFileProperties","splice","storeFiles","handleDrop","t2","file_1","customFileValidator","code","message","isExtensionAllowed","extensionRegex","fileValidator","t3","extensions","isDisabled","onDrop","disabled","accept","maxFiles","validator","getRootProps","getInputProps","useDropzone","t4","t5","dataQas","root","t6","Symbol","for","outline","t7","t8","input","t9","t10","backgroundColor","borderWidth","borderStyle","borderColor","marginBottom","textAlign","t11","fileDropChildren","Box","t12","errors","_temp","error"],"mappings":"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"}
|
|
@@ -7,20 +7,10 @@ function d({
|
|
|
7
7
|
dataGridOverridableProps: r,
|
|
8
8
|
"data-qa": e
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */ n(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
data: {
|
|
15
|
-
rows: o ?? [],
|
|
16
|
-
rowCount: o?.length ?? 0
|
|
17
|
-
},
|
|
18
|
-
"data-qa": e,
|
|
19
|
-
dataGridOverridableProps: r,
|
|
20
|
-
initialSort: t,
|
|
21
|
-
mode: "client"
|
|
22
|
-
}
|
|
23
|
-
);
|
|
10
|
+
return /* @__PURE__ */ n(i, { columns: a, data: {
|
|
11
|
+
rows: o ?? [],
|
|
12
|
+
rowCount: o?.length ?? 0
|
|
13
|
+
}, "data-qa": e, dataGridOverridableProps: r, initialSort: t, mode: "client" });
|
|
24
14
|
}
|
|
25
15
|
export {
|
|
26
16
|
d as AoaFileTable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileTable.js","sources":["../../../../src/components/molecules/file-table/FileTable.tsx"],"sourcesContent":["import type { DataGridProps, GridColDef, GridValidRowModel } from '@mui/x-data-grid';\nimport { AoaTable } from '../../atoms/table/Table';\n\nexport interface AoaFileTableProps<T extends GridValidRowModel = any> {\n /**\n * The column structure to display the data\n */\n columns: GridColDef<T>[];\n /**\n * The TableData object to be displayed in the table\n */\n data: T[];\n /**\n * Data-qa tag for E2E test purposes\n */\n 'data-qa'?: string;\n /**\n * Overwrite a safe selection of the {@link DataGrid} properties\n */\n dataGridOverridableProps?: Pick<DataGridProps<T>, 'getRowId' | 'ignoreDiacritics'>;\n /**\n * Sets the initial sortModel in case the required sorting differs from the back-end's default sorting\n */\n initialSort?: {\n field: string;\n sort: 'asc' | 'desc';\n };\n}\n\nexport function AoaFileTable<T extends object = any>({\n data,\n columns,\n initialSort,\n dataGridOverridableProps,\n 'data-qa': dataQa\n}: Readonly<AoaFileTableProps<T>>) {\n return (\n <AoaTable<T>\n columns={columns}\n data={{\n rows: data ?? [],\n rowCount: data?.length ?? 0\n }}\n data-qa={dataQa}\n dataGridOverridableProps={dataGridOverridableProps}\n initialSort={initialSort}\n mode='client'\n />\n );\n}\n"],"names":["AoaFileTable","data","columns","initialSort","dataGridOverridableProps","dataQa","jsx","AoaTable"],"mappings":";;AA6BO,SAASA,EAAqC;AAAA,
|
|
1
|
+
{"version":3,"file":"FileTable.js","sources":["../../../../src/components/molecules/file-table/FileTable.tsx"],"sourcesContent":["import type { DataGridProps, GridColDef, GridValidRowModel } from '@mui/x-data-grid';\nimport { AoaTable } from '../../atoms/table/Table';\n\nexport interface AoaFileTableProps<T extends GridValidRowModel = any> {\n /**\n * The column structure to display the data\n */\n columns: GridColDef<T>[];\n /**\n * The TableData object to be displayed in the table\n */\n data: T[];\n /**\n * Data-qa tag for E2E test purposes\n */\n 'data-qa'?: string;\n /**\n * Overwrite a safe selection of the {@link DataGrid} properties\n */\n dataGridOverridableProps?: Pick<DataGridProps<T>, 'getRowId' | 'ignoreDiacritics'>;\n /**\n * Sets the initial sortModel in case the required sorting differs from the back-end's default sorting\n */\n initialSort?: {\n field: string;\n sort: 'asc' | 'desc';\n };\n}\n\nexport function AoaFileTable<T extends object = any>({\n data,\n columns,\n initialSort,\n dataGridOverridableProps,\n 'data-qa': dataQa\n}: Readonly<AoaFileTableProps<T>>) {\n return (\n <AoaTable<T>\n columns={columns}\n data={{\n rows: data ?? [],\n rowCount: data?.length ?? 0\n }}\n data-qa={dataQa}\n dataGridOverridableProps={dataGridOverridableProps}\n initialSort={initialSort}\n mode='client'\n />\n );\n}\n"],"names":["AoaFileTable","data","columns","initialSort","dataGridOverridableProps","dataQa","jsx","AoaTable","rows","rowCount","length"],"mappings":";;AA6BO,SAASA,EAAqC;AAAA,EACnDC,MAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,0BAAAA;AAAAA,EACA,WAAWC;AACmB,GAAG;AACjC,SACE,gBAAAC,EAACC,GAAA,EACC,SAAAL,GACA,MAAM;AAAA,IACJM,MAAMP,KAAQ,CAAA;AAAA,IACdQ,UAAUR,GAAMS,UAAU;AAAA,EAAA,GAE5B,WAASL,GACT,0BAAAD,GACA,aAAAD,GACA,MAAK,UAAQ;AAGnB;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { a } from "../../../chunks/FieldError.CCQnjdMd.js";
|
|
3
4
|
import "../../atoms/notification/Notification.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
a as AoaFormError
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=FormError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormError.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormError.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
+
import "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
2
3
|
import "@mui/material";
|
|
3
4
|
import "../../../chunks/lodash.CA_K01A9.js";
|
|
4
|
-
import { b } from "../../../chunks/FieldError.
|
|
5
|
+
import { b as d } from "../../../chunks/FieldError.CCQnjdMd.js";
|
|
5
6
|
import "../../atoms/button/Button.js";
|
|
6
7
|
import "../modal-close-button/ModalCloseButton.js";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
d as AoaFormModal
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=FormModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -67,5 +67,5 @@ export interface AoaModalProps {
|
|
|
67
67
|
* />
|
|
68
68
|
* ```
|
|
69
69
|
*/
|
|
70
|
-
export declare
|
|
70
|
+
export declare function AoaModal({ DialogProps, DialogTitleProps, DialogContentProps, modalQas, open, topic, dialogContent, dialogActions, closeAction }: AoaModalCloseButtonProps & AoaModalProps): import("react/jsx-runtime").JSX.Element;
|
|
71
71
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAE5G,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACjD;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACjD;;OAEG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACZ,EAAE,wBAAwB,GAAG,aAAa,2CA+C1C"}
|
|
@@ -1,73 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { AoaModalCloseButton as
|
|
6
|
-
|
|
7
|
-
({
|
|
1
|
+
import { jsx as A, jsxs as q } from "react/jsx-runtime";
|
|
2
|
+
import { c as P } from "../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { DialogTitle as B, DialogContent as E, Dialog as M } from "@mui/material";
|
|
4
|
+
import { l as C } from "../../../chunks/lodash.CA_K01A9.js";
|
|
5
|
+
import { AoaModalCloseButton as R } from "../modal-close-button/ModalCloseButton.js";
|
|
6
|
+
function Q(b) {
|
|
7
|
+
const o = P.c(27), {
|
|
8
8
|
DialogProps: t,
|
|
9
|
-
DialogTitleProps:
|
|
10
|
-
DialogContentProps:
|
|
11
|
-
modalQas:
|
|
12
|
-
open:
|
|
13
|
-
topic:
|
|
14
|
-
dialogContent:
|
|
15
|
-
dialogActions:
|
|
16
|
-
closeAction:
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
sx: r.merge(
|
|
24
|
-
{
|
|
25
|
-
"> div > div": {
|
|
26
|
-
borderRadius: 0,
|
|
27
|
-
minWidth: "45vw"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
t?.sx
|
|
31
|
-
),
|
|
32
|
-
children: [
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
f,
|
|
35
|
-
{
|
|
36
|
-
...m,
|
|
37
|
-
"data-qa": o?.title ?? "modal-title",
|
|
38
|
-
sx: r.merge(
|
|
39
|
-
{
|
|
40
|
-
padding: "3rem 3rem 1rem",
|
|
41
|
-
color: "var(--color-rijks-logoblue)",
|
|
42
|
-
fontSize: "1.1rem",
|
|
43
|
-
fontWeight: "bolder"
|
|
44
|
-
},
|
|
45
|
-
m?.sx
|
|
46
|
-
),
|
|
47
|
-
children: i
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
/* @__PURE__ */ e(h, { closeAction: s }),
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
g,
|
|
53
|
-
{
|
|
54
|
-
...d,
|
|
55
|
-
"data-qa": o?.content ?? "modal-content",
|
|
56
|
-
sx: r.merge(
|
|
57
|
-
{
|
|
58
|
-
padding: "0 3rem 2rem"
|
|
59
|
-
},
|
|
60
|
-
d?.sx
|
|
61
|
-
),
|
|
62
|
-
children: l
|
|
63
|
-
}
|
|
64
|
-
),
|
|
65
|
-
n
|
|
66
|
-
]
|
|
9
|
+
DialogTitleProps: e,
|
|
10
|
+
DialogContentProps: l,
|
|
11
|
+
modalQas: c,
|
|
12
|
+
open: j,
|
|
13
|
+
topic: p,
|
|
14
|
+
dialogContent: x,
|
|
15
|
+
dialogActions: f,
|
|
16
|
+
closeAction: g
|
|
17
|
+
} = b, h = c?.modal ?? "modal", u = !!j;
|
|
18
|
+
let i;
|
|
19
|
+
o[0] !== t?.sx ? (i = C.merge({
|
|
20
|
+
"> div > div": {
|
|
21
|
+
borderRadius: 0,
|
|
22
|
+
minWidth: "45vw"
|
|
67
23
|
}
|
|
68
|
-
)
|
|
69
|
-
|
|
24
|
+
}, t?.sx), o[0] = t?.sx, o[1] = i) : i = o[1];
|
|
25
|
+
const D = c?.title ?? "modal-title";
|
|
26
|
+
let s;
|
|
27
|
+
o[2] !== e?.sx ? (s = C.merge({
|
|
28
|
+
padding: "3rem 3rem 1rem",
|
|
29
|
+
color: "var(--color-rijks-logoblue)",
|
|
30
|
+
fontSize: "1.1rem",
|
|
31
|
+
fontWeight: "bolder"
|
|
32
|
+
}, e?.sx), o[2] = e?.sx, o[3] = s) : s = o[3];
|
|
33
|
+
let r;
|
|
34
|
+
o[4] !== e || o[5] !== D || o[6] !== s || o[7] !== p ? (r = /* @__PURE__ */ A(B, { ...e, "data-qa": D, sx: s, children: p }), o[4] = e, o[5] = D, o[6] = s, o[7] = p, o[8] = r) : r = o[8];
|
|
35
|
+
let a;
|
|
36
|
+
o[9] !== g ? (a = /* @__PURE__ */ A(R, { closeAction: g }), o[9] = g, o[10] = a) : a = o[10];
|
|
37
|
+
const v = c?.content ?? "modal-content";
|
|
38
|
+
let n;
|
|
39
|
+
o[11] !== l?.sx ? (n = C.merge({
|
|
40
|
+
padding: "0 3rem 2rem"
|
|
41
|
+
}, l?.sx), o[11] = l?.sx, o[12] = n) : n = o[12];
|
|
42
|
+
let m;
|
|
43
|
+
o[13] !== l || o[14] !== x || o[15] !== v || o[16] !== n ? (m = /* @__PURE__ */ A(E, { ...l, "data-qa": v, sx: n, children: x }), o[13] = l, o[14] = x, o[15] = v, o[16] = n, o[17] = m) : m = o[17];
|
|
44
|
+
let d;
|
|
45
|
+
return o[18] !== t || o[19] !== f || o[20] !== h || o[21] !== m || o[22] !== u || o[23] !== i || o[24] !== r || o[25] !== a ? (d = /* @__PURE__ */ q(M, { ...t, "data-qa": h, open: u, sx: i, children: [
|
|
46
|
+
r,
|
|
47
|
+
a,
|
|
48
|
+
m,
|
|
49
|
+
f
|
|
50
|
+
] }), o[18] = t, o[19] = f, o[20] = h, o[21] = m, o[22] = u, o[23] = i, o[24] = r, o[25] = a, o[26] = d) : d = o[26], d;
|
|
51
|
+
}
|
|
70
52
|
export {
|
|
71
|
-
|
|
53
|
+
Q as AoaModal
|
|
72
54
|
};
|
|
73
55
|
//# sourceMappingURL=Modal.js.map
|