@rws-aoa/react-library 6.0.1 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +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 +21 -21
- package/dist/chunks/FieldError.B8t3zEhf.js +0 -143
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Link as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
boxShadow: `
|
|
1
|
+
import { jsx as g, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import { c as T } from "../../../../chunks/compiler-runtime.hDcrsMwn.js";
|
|
3
|
+
import { Typography as j, Avatar as w, MenuItem as C, Link as I, Popper as U, Box as W } from "@mui/material";
|
|
4
|
+
import { Link as $ } from "@tanstack/react-router";
|
|
5
|
+
import { l as B } from "../../../../chunks/lodash.CA_K01A9.js";
|
|
6
|
+
import { useState as E } from "react";
|
|
7
|
+
import { FontNormalSxProps as L } from "../../../../_constants.js";
|
|
8
|
+
function J(n) {
|
|
9
|
+
const e = T.c(24), [_, k] = E(null), [s, y] = E(!1);
|
|
10
|
+
let m;
|
|
11
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = function(t) {
|
|
12
|
+
y(!0), k(t.currentTarget);
|
|
13
|
+
}, e[0] = m) : m = e[0];
|
|
14
|
+
const R = m;
|
|
15
|
+
let c;
|
|
16
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (c = function() {
|
|
17
|
+
y(!1), k(null);
|
|
18
|
+
}, e[1] = c) : c = e[1];
|
|
19
|
+
const A = c;
|
|
20
|
+
let p;
|
|
21
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (p = {
|
|
22
|
+
flexGrow: 0,
|
|
23
|
+
minWidth: "fit-content"
|
|
24
|
+
}, e[2] = p) : p = e[2];
|
|
25
|
+
let r;
|
|
26
|
+
e[3] !== n.username ? (r = n.username && /* @__PURE__ */ g(j, { component: "span", sx: B.merge({
|
|
27
|
+
marginRight: "16px"
|
|
28
|
+
}, L), children: n.username }), e[3] = n.username, e[4] = r) : r = e[4];
|
|
29
|
+
const S = s ? "usermenu" : void 0, v = s ? "true" : void 0;
|
|
30
|
+
let f, u;
|
|
31
|
+
e[5] === Symbol.for("react.memo_cache_sentinel") ? (f = (o) => R(o), u = () => A(), e[5] = f, e[6] = u) : (f = e[5], u = e[6]);
|
|
32
|
+
let d, x;
|
|
33
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
34
|
+
padding: 0,
|
|
35
|
+
":hover": {
|
|
36
|
+
backgroundColor: "transparent"
|
|
37
|
+
}
|
|
38
|
+
}, x = /* @__PURE__ */ g(w, {}), e[7] = d, e[8] = x) : (d = e[7], x = e[8]);
|
|
39
|
+
let h;
|
|
40
|
+
e[9] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
41
|
+
backgroundColor: "var(--color-bg-light)",
|
|
42
|
+
padding: "4px 0",
|
|
43
|
+
borderRadius: "6px",
|
|
44
|
+
marginTop: "8px",
|
|
45
|
+
minWidth: "120px",
|
|
46
|
+
color: "var(--color-text)",
|
|
47
|
+
boxShadow: `
|
|
49
48
|
rgb(255 255 255) 0 0 0 0,
|
|
50
49
|
rgb(0 0 0 / 5%) 0 0 0 1px,
|
|
51
50
|
rgb(0 0 0 / 10%) 0 10px 15px -3px,
|
|
52
51
|
rgb(0 0 0 / 5%) 0 4px 6px -2px
|
|
53
52
|
`
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
});
|
|
53
|
+
}, e[9] = h) : h = e[9];
|
|
54
|
+
let l;
|
|
55
|
+
if (e[10] !== n.settings) {
|
|
56
|
+
let o;
|
|
57
|
+
e[12] === Symbol.for("react.memo_cache_sentinel") ? (o = (t, O) => /* @__PURE__ */ g(C, { component: t.to ? $ : I, disableRipple: !0, divider: t.divider ?? !1, onClick: (P) => {
|
|
58
|
+
P.stopPropagation(), t.onClick && t.onClick(), y(!1);
|
|
59
|
+
}, sx: {
|
|
60
|
+
...L
|
|
61
|
+
}, to: t.to, children: t.label }, O), e[12] = o) : o = e[12], l = n.settings.map(o), e[10] = n.settings, e[11] = l;
|
|
62
|
+
} else
|
|
63
|
+
l = e[11];
|
|
64
|
+
let a;
|
|
65
|
+
e[13] !== _ || e[14] !== s || e[15] !== l ? (a = /* @__PURE__ */ g(U, { anchorEl: _, id: "usermenu", open: s, placement: "bottom-end", sx: h, children: l }), e[13] = _, e[14] = s, e[15] = l, e[16] = a) : a = e[16];
|
|
66
|
+
let i;
|
|
67
|
+
e[17] !== a || e[18] !== S || e[19] !== v ? (i = /* @__PURE__ */ M(C, { "aria-controls": S, "aria-expanded": v, "aria-haspopup": "true", "aria-label": "User menu", onMouseEnter: f, onMouseLeave: u, sx: d, children: [
|
|
68
|
+
x,
|
|
69
|
+
a
|
|
70
|
+
] }), e[17] = a, e[18] = S, e[19] = v, e[20] = i) : i = e[20];
|
|
71
|
+
let b;
|
|
72
|
+
return e[21] !== i || e[22] !== r ? (b = /* @__PURE__ */ M(W, { alignItems: "center", display: "flex", role: "menu", sx: p, children: [
|
|
73
|
+
r,
|
|
74
|
+
i
|
|
75
|
+
] }), e[21] = i, e[22] = r, e[23] = b) : b = e[23], b;
|
|
76
|
+
}
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
J as AoaUserMenu
|
|
79
79
|
};
|
|
80
80
|
//# sourceMappingURL=UserMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMenu.js","sources":["../../../../../src/components/atoms/_menu/user-menu/UserMenu.tsx"],"sourcesContent":["import { Avatar, Box, Link as MUILink, MenuItem as MUIMenuItem, Popper, Typography } from '@mui/material';\nimport { Link } from '@tanstack/react-router';\nimport { merge } from 'lodash';\nimport {
|
|
1
|
+
{"version":3,"file":"UserMenu.js","sources":["../../../../../src/components/atoms/_menu/user-menu/UserMenu.tsx"],"sourcesContent":["import { Avatar, Box, Link as MUILink, MenuItem as MUIMenuItem, Popper, Typography } from '@mui/material';\nimport { Link } from '@tanstack/react-router';\nimport { merge } from 'lodash';\nimport { useState, type MouseEvent } from 'react';\nimport { FontNormalSxProps } from '../../../../_constants';\n\ntype Action =\n /**\n * The path that the menu item links to on click\n */\n | { onClick?: never; to: string }\n /**\n * The onClick function for situations where you don't want to navigate to another page (e.g. logout)\n */\n | { onClick(): void; to?: never };\n\nexport type AoaSetting = Action & {\n /**\n * Optional divider to be shown below menu item\n */\n divider?: boolean;\n /**\n * The label of the menu item\n */\n label: string;\n};\n\ninterface UserMenuProps {\n /**\n * A list of the user menu items\n */\n readonly settings: AoaSetting[];\n /**\n * Username to be displayed on the left of the settings menu icon\n */\n readonly username?: string;\n}\n\n/**\n * Constructs a user menu using pre-defined Rijks styling\n *\n * @param props - Props to pass to the user menu\n * @example\n * ```jsx\n * <AoaUserMenu\n * settings={[\n * { label: \"Logout\", onClick: () => console.log(\"Logout\") }\n * ]}\n * />\n * ```\n */\n\nexport function AoaUserMenu(props: UserMenuProps) {\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);\n const [open, setOpen] = useState(false);\n\n function handleMenuOpen(event: MouseEvent<HTMLLIElement, globalThis.MouseEvent>) {\n setOpen(true);\n setAnchorEl(event.currentTarget);\n }\n\n function handleMenuClose() {\n setOpen(false);\n setAnchorEl(null);\n }\n\n return (\n <Box alignItems='center' display='flex' role='menu' sx={{ flexGrow: 0, minWidth: 'fit-content' }}>\n {props.username && (\n <Typography component='span' sx={merge({ marginRight: '16px' }, FontNormalSxProps)}>\n {props.username}\n </Typography>\n )}\n <MUIMenuItem\n aria-controls={open ? 'usermenu' : undefined}\n aria-expanded={open ? 'true' : undefined}\n aria-haspopup='true'\n aria-label='User menu'\n onMouseEnter={(event) => handleMenuOpen(event)}\n onMouseLeave={() => handleMenuClose()}\n sx={{\n padding: 0,\n\n ':hover': {\n backgroundColor: 'transparent'\n }\n }}\n >\n <Avatar />\n <Popper\n anchorEl={anchorEl}\n id='usermenu'\n open={open}\n placement='bottom-end'\n sx={{\n backgroundColor: 'var(--color-bg-light)',\n padding: '4px 0',\n borderRadius: '6px',\n marginTop: '8px',\n minWidth: '120px',\n color: 'var(--color-text)',\n boxShadow: `\n rgb(255 255 255) 0 0 0 0,\n rgb(0 0 0 / 5%) 0 0 0 1px,\n rgb(0 0 0 / 10%) 0 10px 15px -3px,\n rgb(0 0 0 / 5%) 0 4px 6px -2px\n `\n }}\n >\n {props.settings.map((setting, index) => (\n <MUIMenuItem\n component={setting.to ? Link : MUILink}\n disableRipple\n divider={setting.divider ?? false}\n key={index}\n onClick={(event: MouseEvent<HTMLAnchorElement, globalThis.MouseEvent>) => {\n event.stopPropagation();\n if (setting.onClick) {\n setting.onClick();\n }\n\n setOpen(false);\n }}\n sx={{ ...FontNormalSxProps }}\n to={setting.to}\n >\n {setting.label}\n </MUIMenuItem>\n ))}\n </Popper>\n </MUIMenuItem>\n </Box>\n );\n}\n"],"names":["AoaUserMenu","props","$","_c","anchorEl","setAnchorEl","useState","open","setOpen","t0","Symbol","for","event","currentTarget","handleMenuOpen","t1","handleMenuClose","t2","flexGrow","minWidth","t3","username","jsx","Typography","merge","marginRight","FontNormalSxProps","t4","undefined","t5","t6","t7","event_0","t8","t9","padding","backgroundColor","Avatar","t10","borderRadius","marginTop","color","boxShadow","t11","settings","t12","setting","index","MUIMenuItem","to","Link","MUILink","divider","event_1","stopPropagation","onClick","label","map","Popper","t13","jsxs","t14","Box"],"mappings":";;;;;;;AAoDO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA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
3
3
|
interface CommonProps {
|
|
4
4
|
/**
|
|
5
5
|
* Data-qa tag for E2E test purposes
|
|
@@ -22,6 +22,6 @@ export type AoaButtonProps = Omit<MUIButtonProps<ButtonTypeMap['defaultComponent
|
|
|
22
22
|
* <AoaButton onClick={() => console.log()} type='primary'>button</AoaButton>
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
export declare
|
|
25
|
+
export declare function AoaButton({ type, startIcon, 'data-qa': dataQa, children, buttonType, ...props }: AoaButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export {};
|
|
27
27
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,eAAe,CAAC;AAEvB,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGlD,UAAU,WAAW;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;CACxC;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC,EAAE,SAAS,CAAC,GAAG;IAC7G,QAAQ,CAAC,UAAU,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;CACvE,CAAC;AAEF;;;;;;;;GAQG;AAEH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CA8J/G"}
|
|
@@ -2,140 +2,127 @@ import { jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { ChevronRight as d } from "@mui/icons-material";
|
|
3
3
|
import { Button as v, buttonClasses as r } from "@mui/material";
|
|
4
4
|
import { l as s } from "../../../chunks/lodash.CA_K01A9.js";
|
|
5
|
-
import {
|
|
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
|
-
|
|
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
|
-
color: "var(--color-text-disabled)"
|
|
61
|
-
},
|
|
62
|
-
":hover, :active, :focus": {
|
|
63
|
-
color: "var(--color-text-light)"
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
// Styles that apply to outlined (type === secondary)
|
|
67
|
-
[`&.${r.outlined}`]: {
|
|
68
|
-
background: "none",
|
|
69
|
-
border: "1px solid var(--color-primary)",
|
|
70
|
-
boxSizing: "border-box",
|
|
71
|
-
[`&.${r.colorPrimary}`]: {
|
|
72
|
-
color: "var(--color-primary)",
|
|
73
|
-
borderColor: "var(--color-primary)",
|
|
74
|
-
":hover, :active, :focus": {
|
|
75
|
-
borderColor: "var(--color-primary-hover)",
|
|
76
|
-
color: "var(--color-primary-hover)"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
[`&.${r.colorError}`]: {
|
|
80
|
-
color: "var(--color-error)",
|
|
81
|
-
borderColor: "var(--color-error)",
|
|
82
|
-
":hover, :active, :focus": {
|
|
83
|
-
borderColor: "var(--color-error-hover)",
|
|
84
|
-
color: "var(--color-error-hover)"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
":disabled": {
|
|
88
|
-
backgroundColor: "transparent",
|
|
89
|
-
borderColor: "var(--color-text-disabled)",
|
|
90
|
-
color: "var(--color-text-disabled)"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
// Styles that apply to text (type === text)
|
|
94
|
-
[`&.${r.text}`]: {
|
|
95
|
-
background: "none",
|
|
96
|
-
borderColor: "transparent",
|
|
97
|
-
display: "inline-block",
|
|
98
|
-
textTransform: "uppercase",
|
|
99
|
-
fontWeight: "bold",
|
|
100
|
-
fontSize: "1.075rem",
|
|
101
|
-
verticalAlign: "middle",
|
|
102
|
-
[`&.${r.colorPrimary}`]: {
|
|
103
|
-
color: "var(--color-primary)",
|
|
104
|
-
":hover": {
|
|
105
|
-
backgroundColor: "var(--color-rijks-skyblue-light)"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
[`&.${r.colorError}`]: {
|
|
109
|
-
color: "var(--color-error)",
|
|
110
|
-
":hover": {
|
|
111
|
-
backgroundColor: "var(--color-rijks-red-1-light)"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
[`&.${r.endIcon}`]: {
|
|
115
|
-
width: "1rem",
|
|
116
|
-
height: "1rem",
|
|
117
|
-
verticalAlign: "text-top"
|
|
118
|
-
},
|
|
119
|
-
":disabled": {
|
|
120
|
-
backgroundColor: "transparent",
|
|
121
|
-
color: "var(--color-text-disabled)",
|
|
122
|
-
[`&.${r.endIcon}`]: {
|
|
123
|
-
fill: "var(--color-text-disabled)"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
l.sx,
|
|
129
|
-
x
|
|
130
|
-
),
|
|
131
|
-
type: n,
|
|
132
|
-
variant: e,
|
|
133
|
-
children: c
|
|
5
|
+
import { FontNormalSxProps as b } from "../../../_constants.js";
|
|
6
|
+
function g({
|
|
7
|
+
type: o,
|
|
8
|
+
startIcon: t,
|
|
9
|
+
"data-qa": i,
|
|
10
|
+
children: c,
|
|
11
|
+
buttonType: n,
|
|
12
|
+
...l
|
|
13
|
+
}) {
|
|
14
|
+
let e = "contained";
|
|
15
|
+
return o === "text" && (e = "text"), o === "secondary" && (e = "outlined"), /* @__PURE__ */ a(v, { ...l, "data-qa": i, disableElevation: !0, endIcon: o === "text" && /* @__PURE__ */ a(d, {}), startIcon: o !== "text" && t, sx: s.merge({
|
|
16
|
+
// Styles that apply to all button types and colors
|
|
17
|
+
appearance: "none",
|
|
18
|
+
border: "1px solid",
|
|
19
|
+
borderRadius: 0,
|
|
20
|
+
boxSizing: "border-box",
|
|
21
|
+
color: "var(--color-text-light)",
|
|
22
|
+
cursor: "pointer",
|
|
23
|
+
display: "inline-flex",
|
|
24
|
+
lineHeight: "var(--font-lineheight-text)",
|
|
25
|
+
minHeight: 20,
|
|
26
|
+
padding: "12px 16px",
|
|
27
|
+
position: "relative",
|
|
28
|
+
textDecoration: "none",
|
|
29
|
+
textShadow: "none",
|
|
30
|
+
textTransform: "none",
|
|
31
|
+
verticalAlign: "middle",
|
|
32
|
+
":focus": {
|
|
33
|
+
outline: "2px dashed var(--color-text)",
|
|
34
|
+
outlineOffset: "3px",
|
|
35
|
+
boxShadow: "none"
|
|
36
|
+
},
|
|
37
|
+
// Styles that apply to contained (type === primary)
|
|
38
|
+
[`&.${r.contained}`]: {
|
|
39
|
+
[`&.${r.colorPrimary}`]: {
|
|
40
|
+
backgroundColor: "var(--color-primary)",
|
|
41
|
+
borderColor: "var(--color-primary)",
|
|
42
|
+
":hover, :active, :focus": {
|
|
43
|
+
backgroundColor: "var(--color-primary-hover)"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
[`&.${r.colorError}`]: {
|
|
47
|
+
backgroundColor: "var(--color-error)",
|
|
48
|
+
borderColor: "var(--color-error)",
|
|
49
|
+
":hover, :active, :focus": {
|
|
50
|
+
backgroundColor: "var(--color-error-hover)"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
[`&.${r.disabled}`]: {
|
|
54
|
+
backgroundColor: "var(--color-disabled)",
|
|
55
|
+
borderColor: "var(--color-disabled)",
|
|
56
|
+
color: "var(--color-text-disabled)"
|
|
57
|
+
},
|
|
58
|
+
":hover, :active, :focus": {
|
|
59
|
+
color: "var(--color-text-light)"
|
|
134
60
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
61
|
+
},
|
|
62
|
+
// Styles that apply to outlined (type === secondary)
|
|
63
|
+
[`&.${r.outlined}`]: {
|
|
64
|
+
background: "none",
|
|
65
|
+
border: "1px solid var(--color-primary)",
|
|
66
|
+
boxSizing: "border-box",
|
|
67
|
+
[`&.${r.colorPrimary}`]: {
|
|
68
|
+
color: "var(--color-primary)",
|
|
69
|
+
borderColor: "var(--color-primary)",
|
|
70
|
+
":hover, :active, :focus": {
|
|
71
|
+
borderColor: "var(--color-primary-hover)",
|
|
72
|
+
color: "var(--color-primary-hover)"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
[`&.${r.colorError}`]: {
|
|
76
|
+
color: "var(--color-error)",
|
|
77
|
+
borderColor: "var(--color-error)",
|
|
78
|
+
":hover, :active, :focus": {
|
|
79
|
+
borderColor: "var(--color-error-hover)",
|
|
80
|
+
color: "var(--color-error-hover)"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
":disabled": {
|
|
84
|
+
backgroundColor: "transparent",
|
|
85
|
+
borderColor: "var(--color-text-disabled)",
|
|
86
|
+
color: "var(--color-text-disabled)"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
// Styles that apply to text (type === text)
|
|
90
|
+
[`&.${r.text}`]: {
|
|
91
|
+
background: "none",
|
|
92
|
+
borderColor: "transparent",
|
|
93
|
+
display: "inline-block",
|
|
94
|
+
textTransform: "uppercase",
|
|
95
|
+
fontWeight: "bold",
|
|
96
|
+
fontSize: "1.075rem",
|
|
97
|
+
verticalAlign: "middle",
|
|
98
|
+
[`&.${r.colorPrimary}`]: {
|
|
99
|
+
color: "var(--color-primary)",
|
|
100
|
+
":hover": {
|
|
101
|
+
backgroundColor: "var(--color-rijks-skyblue-light)"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
[`&.${r.colorError}`]: {
|
|
105
|
+
color: "var(--color-error)",
|
|
106
|
+
":hover": {
|
|
107
|
+
backgroundColor: "var(--color-rijks-red-1-light)"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
[`&.${r.endIcon}`]: {
|
|
111
|
+
width: "1rem",
|
|
112
|
+
height: "1rem",
|
|
113
|
+
verticalAlign: "text-top"
|
|
114
|
+
},
|
|
115
|
+
":disabled": {
|
|
116
|
+
backgroundColor: "transparent",
|
|
117
|
+
color: "var(--color-text-disabled)",
|
|
118
|
+
[`&.${r.endIcon}`]: {
|
|
119
|
+
fill: "var(--color-text-disabled)"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}, l.sx, b), type: n, variant: e, children: c });
|
|
124
|
+
}
|
|
138
125
|
export {
|
|
139
|
-
|
|
126
|
+
g as AoaButton
|
|
140
127
|
};
|
|
141
128
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../src/components/atoms/button/Button.tsx"],"sourcesContent":["import { ChevronRight } from '@mui/icons-material';\nimport {\n Button as MUIButton,\n buttonClasses,\n type ButtonTypeMap,\n type ButtonProps as MUIButtonProps\n} from '@mui/material';\nimport { merge } from 'lodash';\nimport {
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../src/components/atoms/button/Button.tsx"],"sourcesContent":["import { ChevronRight } from '@mui/icons-material';\nimport {\n Button as MUIButton,\n buttonClasses,\n type ButtonTypeMap,\n type ButtonProps as MUIButtonProps\n} from '@mui/material';\nimport { merge } from 'lodash';\nimport type { ButtonHTMLAttributes } from 'react';\nimport { FontNormalSxProps } from '../../../_constants';\n\ninterface CommonProps {\n /**\n * Data-qa tag for E2E test purposes\n */\n 'data-qa'?: string;\n /**\n * Defines the colour and style of the button\n */\n type: 'primary' | 'secondary' | 'text';\n}\n\nexport type AoaButtonProps = Omit<MUIButtonProps<ButtonTypeMap['defaultComponent'], CommonProps>, 'variant'> & {\n readonly buttonType?: ButtonHTMLAttributes<HTMLButtonElement>['type'];\n};\n\n/**\n * Constructs a button using pre-defined Rijks styling\n *\n * @param props - Props to pass to the button\n * @example\n * ```jsx\n * <AoaButton onClick={() => console.log()} type='primary'>button</AoaButton>\n * ```\n */\n\nexport function AoaButton({ type, startIcon, 'data-qa': dataQa, children, buttonType, ...props }: AoaButtonProps) {\n let variant: 'contained' | 'outlined' | 'text' = 'contained';\n\n if (type === 'text') {\n variant = 'text';\n }\n\n if (type === 'secondary') {\n variant = 'outlined';\n }\n\n return (\n <MUIButton\n {...props}\n data-qa={dataQa}\n disableElevation\n endIcon={type === 'text' && <ChevronRight />}\n startIcon={type !== 'text' && startIcon}\n sx={merge(\n {\n // Styles that apply to all button types and colors\n appearance: 'none',\n border: '1px solid',\n borderRadius: 0,\n boxSizing: 'border-box',\n color: 'var(--color-text-light)',\n cursor: 'pointer',\n display: 'inline-flex',\n lineHeight: 'var(--font-lineheight-text)',\n minHeight: 20,\n padding: '12px 16px',\n position: 'relative',\n textDecoration: 'none',\n textShadow: 'none',\n textTransform: 'none',\n verticalAlign: 'middle',\n\n ':focus': {\n outline: '2px dashed var(--color-text)',\n outlineOffset: '3px',\n boxShadow: 'none'\n },\n\n // Styles that apply to contained (type === primary)\n [`&.${buttonClasses.contained}`]: {\n [`&.${buttonClasses.colorPrimary}`]: {\n backgroundColor: 'var(--color-primary)',\n borderColor: 'var(--color-primary)',\n\n ':hover, :active, :focus': {\n backgroundColor: 'var(--color-primary-hover)'\n }\n },\n\n [`&.${buttonClasses.colorError}`]: {\n backgroundColor: 'var(--color-error)',\n borderColor: 'var(--color-error)',\n\n ':hover, :active, :focus': {\n backgroundColor: 'var(--color-error-hover)'\n }\n },\n\n [`&.${buttonClasses.disabled}`]: {\n backgroundColor: 'var(--color-disabled)',\n borderColor: 'var(--color-disabled)',\n color: 'var(--color-text-disabled)'\n },\n\n ':hover, :active, :focus': {\n color: 'var(--color-text-light)'\n }\n },\n\n // Styles that apply to outlined (type === secondary)\n [`&.${buttonClasses.outlined}`]: {\n background: 'none',\n border: '1px solid var(--color-primary)',\n boxSizing: 'border-box',\n\n [`&.${buttonClasses.colorPrimary}`]: {\n color: 'var(--color-primary)',\n borderColor: 'var(--color-primary)',\n\n ':hover, :active, :focus': {\n borderColor: 'var(--color-primary-hover)',\n color: 'var(--color-primary-hover)'\n }\n },\n\n [`&.${buttonClasses.colorError}`]: {\n color: 'var(--color-error)',\n borderColor: 'var(--color-error)',\n\n ':hover, :active, :focus': {\n borderColor: 'var(--color-error-hover)',\n color: 'var(--color-error-hover)'\n }\n },\n\n ':disabled': {\n backgroundColor: 'transparent',\n borderColor: 'var(--color-text-disabled)',\n color: 'var(--color-text-disabled)'\n }\n },\n\n // Styles that apply to text (type === text)\n [`&.${buttonClasses.text}`]: {\n background: 'none',\n borderColor: 'transparent',\n display: 'inline-block',\n textTransform: 'uppercase',\n fontWeight: 'bold',\n fontSize: '1.075rem',\n verticalAlign: 'middle',\n\n [`&.${buttonClasses.colorPrimary}`]: {\n color: 'var(--color-primary)',\n\n ':hover': {\n backgroundColor: 'var(--color-rijks-skyblue-light)'\n }\n },\n\n [`&.${buttonClasses.colorError}`]: {\n color: 'var(--color-error)',\n\n ':hover': {\n backgroundColor: 'var(--color-rijks-red-1-light)'\n }\n },\n\n [`&.${buttonClasses.endIcon}`]: {\n width: '1rem',\n height: '1rem',\n verticalAlign: 'text-top'\n },\n\n ':disabled': {\n backgroundColor: 'transparent',\n color: 'var(--color-text-disabled)',\n\n [`&.${buttonClasses.endIcon}`]: {\n fill: 'var(--color-text-disabled)'\n }\n }\n }\n },\n props.sx,\n FontNormalSxProps\n )}\n type={buttonType}\n variant={variant}\n >\n {children}\n </MUIButton>\n );\n}\n"],"names":["AoaButton","type","startIcon","dataQa","children","buttonType","props","variant","MUIButton","jsx","ChevronRight","merge","appearance","border","borderRadius","boxSizing","color","cursor","display","lineHeight","minHeight","padding","position","textDecoration","textShadow","textTransform","verticalAlign","outline","outlineOffset","boxShadow","buttonClasses","contained","colorPrimary","backgroundColor","borderColor","colorError","disabled","outlined","background","text","fontWeight","fontSize","endIcon","width","height","fill","sx","FontNormalSxProps"],"mappings":";;;;;AAoCO,SAASA,EAAU;AAAA,EAAEC,MAAAA;AAAAA,EAAMC,WAAAA;AAAAA,EAAW,WAAWC;AAAAA,EAAQC,UAAAA;AAAAA,EAAUC,YAAAA;AAAAA,EAAY,GAAGC;AAAsB,GAAG;AAChH,MAAIC,IAA6C;AAEjD,SAAIN,MAAS,WACXM,IAAU,SAGRN,MAAS,gBACXM,IAAU,+BAITC,GAAA,KACKF,GACJ,WAASH,GACT,kBAAgB,IAChB,SAASF,MAAS,UAAU,gBAAAQ,EAACC,KAAY,GACzC,WAAWT,MAAS,UAAUC,GAC9B,IAAIS,QACF;AAAA;AAAA,IAEEC,YAAY;AAAA,IACZC,QAAQ;AAAA,IACRC,cAAc;AAAA,IACdC,WAAW;AAAA,IACXC,OAAO;AAAA,IACPC,QAAQ;AAAA,IACRC,SAAS;AAAA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AAAA,MACT;AAAA,MAGF,aAAa;AAAA,QACXiB,iBAAiB;AAAA,QACjBC,aAAa;AAAA,QACblB,OAAO;AAAA,MAAA;AAAA,IACT;AAAA;AAAA,IAIF,CAAC,KAAKc,EAAcS,IAAI,EAAE,GAAG;AAAA,MAC3BD,YAAY;AAAA,MACZJ,aAAa;AAAA,MACbhB,SAAS;AAAA,MACTO,eAAe;AAAA,MACfe,YAAY;AAAA,MACZC,UAAU;AAAA,MACVf,eAAe;AAAA,MAEf,CAAC,KAAKI,EAAcE,YAAY,EAAE,GAAG;AAAA,QACnChB,OAAO;AAAA,QAEP,UAAU;AAAA,UACRiB,iBAAiB;AAAA,QAAA;AAAA,MACnB;AAAA,MAGF,CAAC,KAAKH,EAAcK,UAAU,EAAE,GAAG;AAAA,QACjCnB,OAAO;AAAA,QAEP,UAAU;AAAA,UACRiB,iBAAiB;AAAA,QAAA;AAAA,MACnB;AAAA,MAGF,CAAC,KAAKH,EAAcY,OAAO,EAAE,GAAG;AAAA,QAC9BC,OAAO;AAAA,QACPC,QAAQ;AAAA,QACRlB,eAAe;AAAA,MAAA;AAAA,MAGjB,aAAa;AAAA,QACXO,iBAAiB;AAAA,QACjBjB,OAAO;AAAA,QAEP,CAAC,KAAKc,EAAcY,OAAO,EAAE,GAAG;AAAA,UAC9BG,MAAM;AAAA,QAAA;AAAA,MACR;AAAA,IACF;AAAA,EACF,GAEFvC,EAAMwC,IACNC,CACF,GACA,MAAM1C,GACN,SAAAE,GAECH,UAAAA,GACH;AAEJ;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
|
+
import { JSX, Ref } from 'react';
|
|
2
3
|
export interface AoaIconButtonProps {
|
|
3
4
|
/**
|
|
4
5
|
* Data-qa tag for E2E test purposes
|
|
@@ -24,6 +25,10 @@ export interface AoaIconButtonProps {
|
|
|
24
25
|
* The action that should be triggered when clicking the button
|
|
25
26
|
*/
|
|
26
27
|
onClick(this: void, ..._args: any[]): void;
|
|
28
|
+
/**
|
|
29
|
+
* The ref to the button element
|
|
30
|
+
*/
|
|
31
|
+
readonly ref?: Ref<HTMLButtonElement> | undefined;
|
|
27
32
|
/**
|
|
28
33
|
* Material UI's property to apply styling
|
|
29
34
|
*/
|
|
@@ -38,5 +43,5 @@ export interface AoaIconButtonProps {
|
|
|
38
43
|
* <AoaIconButton onClick={() => console.log()} label='Order a burger' icon={<Fastfood />} />
|
|
39
44
|
* ```
|
|
40
45
|
*/
|
|
41
|
-
export declare
|
|
46
|
+
export declare function AoaIconButton({ ref, ...props }: AoaIconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
42
47
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/icon-button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/icon-button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC3C;;OAEG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC;IAClD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAsDlE"}
|