@rws-aoa/react-library 3.6.4 → 3.6.6
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/components/atoms/_menu/menu-item/MenuItem.d.ts.map +1 -1
- package/dist/components/atoms/_menu/menu-item/MenuItem.js +32 -26
- package/dist/components/atoms/_menu/menu-item/MenuItem.js.map +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.d.ts +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.d.ts.map +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.js +15 -14
- package/dist/components/atoms/_menu/user-menu/UserMenu.js.map +1 -1
- package/dist/components/atoms/button/Button.d.ts +4 -4
- package/dist/components/atoms/button/Button.d.ts.map +1 -1
- package/dist/components/atoms/button/Button.js +121 -119
- package/dist/components/atoms/button/Button.js.map +1 -1
- package/dist/components/atoms/icon-button/IconButton.d.ts +1 -1
- package/dist/components/atoms/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/icon-button/IconButton.js +6 -4
- package/dist/components/atoms/icon-button/IconButton.js.map +1 -1
- package/dist/components/atoms/input/Input.d.ts +2 -2
- 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.js.map +1 -1
- package/dist/components/atoms/no-permission/NoPermission.d.ts +1 -1
- package/dist/components/atoms/no-permission/NoPermission.js.map +1 -1
- package/dist/components/atoms/notification/Notification.d.ts +2 -2
- package/dist/components/atoms/notification/Notification.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Error.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Info.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Success.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Warning.js.map +1 -1
- package/dist/components/atoms/section-header/SectionHeader.d.ts +2 -2
- package/dist/components/atoms/section-header/SectionHeader.d.ts.map +1 -1
- package/dist/components/atoms/section-header/SectionHeader.js +57 -35
- package/dist/components/atoms/section-header/SectionHeader.js.map +1 -1
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.d.ts +2 -2
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js +3 -3
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.d.ts +1 -1
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.d.ts.map +1 -1
- 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 -1
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.d.ts.map +1 -1
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.js.map +1 -1
- package/dist/components/atoms/table/Table.d.ts +4 -4
- package/dist/components/atoms/table/Table.d.ts.map +1 -1
- package/dist/components/atoms/table/Table.js +31 -31
- package/dist/components/atoms/table/Table.js.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts +2 -2
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.js +8 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.js.map +1 -1
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.js.map +1 -1
- package/dist/components/molecules/file-dropzone/FileDropzone.d.ts.map +1 -1
- package/dist/components/molecules/file-dropzone/FileDropzone.js +24 -13
- package/dist/components/molecules/file-dropzone/FileDropzone.js.map +1 -1
- package/dist/components/molecules/file-table/FileTable.d.ts +4 -4
- package/dist/components/molecules/file-table/FileTable.js +17 -17
- package/dist/components/molecules/file-table/FileTable.js.map +1 -1
- package/dist/components/molecules/form-error/FormError.d.ts +2 -2
- package/dist/components/molecules/form-error/FormError.js.map +1 -1
- package/dist/components/molecules/form-modal/FormModal.d.ts +2 -2
- package/dist/components/molecules/form-modal/FormModal.d.ts.map +1 -1
- package/dist/components/molecules/form-modal/FormModal.js +10 -1
- 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.map +1 -1
- package/dist/components/molecules/modal-close-button/ModalCloseButton.js.map +1 -1
- package/dist/components/molecules/navigation-bar/NavigationBar.d.ts.map +1 -1
- package/dist/components/molecules/navigation-bar/NavigationBar.js +27 -16
- package/dist/components/molecules/navigation-bar/NavigationBar.js.map +1 -1
- package/dist/components/molecules/upload-button/UploadButton.d.ts +2 -2
- package/dist/components/molecules/upload-button/UploadButton.js +18 -18
- 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 +6 -4
- package/dist/components/organisms/content-page/ContentPage.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +41 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../src/components/atoms/button/Button.tsx"],"sourcesContent":["import { ChevronRight } from
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../src/components/atoms/button/Button.tsx"],"sourcesContent":["import { ChevronRight } from '@mui/icons-material';\nimport { Button as MUIButton, type ButtonTypeMap, type ButtonProps as MUIButtonProps } from '@mui/material';\nimport merge from 'lodash.merge';\nimport { memo, type ButtonHTMLAttributes, type ReactNode } 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 const AoaButton = memo(\n ({ type, startIcon, 'data-qa': dataQa, children, buttonType, ...props }: AoaButtonProps): ReactNode => {\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 '&.MuiButton-contained': {\n '&.MuiButton-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 '&.MuiButton-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 '&.Mui-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 '&.MuiButton-outlined': {\n background: 'none',\n border: '1px solid var(--color-primary)',\n boxSizing: 'border-box',\n\n '&.MuiButton-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 '&.MuiButton-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 '&.MuiButton-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 '&.MuiButton-colorPrimary': {\n color: 'var(--color-primary)',\n\n ':hover': {\n backgroundColor: 'var(--color-rijks-skyblue-light)'\n }\n },\n\n '&.MuiButton-colorError': {\n color: 'var(--color-error)',\n\n ':hover': {\n backgroundColor: 'var(--color-rijks-red-1-light)'\n }\n },\n\n '.MuiButton-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 '.MuiButton-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);\n"],"names":["AoaButton","memo","type","startIcon","dataQa","children","buttonType","props","variant","jsx","MUIButton","ChevronRight","merge","FontNormalSxProps"],"mappings":";;;;;;AA+BO,MAAMA,IAAYC;AAAA,EACvB,CAAC,EAAE,MAAAC,GAAM,WAAAC,GAAW,WAAWC,GAAQ,UAAAC,GAAU,YAAAC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AO;AAAA,gBACP,aAAa;AAAA,gBAEb,2BAA2B;AAAA,kBACzB,aAAa;AAAA,kBACb,OAAO;AAAA,gBAAA;AAAA,cAEX;AAAA,cAEA,0BAA0B;AAAA,gBACxB,OAAO;AAAA,gBACP,aAAa;AAAA,gBAEb,2BAA2B;AAAA,kBACzB,aAAa;AAAA,kBACb,OAAO;AAAA,gBAAA;AAAA,cAEX;AAAA,cAEA,aAAa;AAAA,gBACX,iBAAiB;AAAA,gBACjB,aAAa;AAAA,gBACb,OAAO;AAAA,cAAA;AAAA,YAEX;AAAA;AAAA,YAGA,oBAAoB;AAAA,cAClB,YAAY;AAAA,cACZ,aAAa;AAAA,cACb,SAAS;AAAA,cACT,eAAe;AAAA,cACf,YAAY;AAAA,cACZ,UAAU;AAAA,cACV,eAAe;AAAA,cAEf,4BAA4B;AAAA,gBAC1B,OAAO;AAAA,gBAEP,UAAU;AAAA,kBACR,iBAAiB;AAAA,gBAAA;AAAA,cAErB;AAAA,cAEA,0BAA0B;AAAA,gBACxB,OAAO;AAAA,gBAEP,UAAU;AAAA,kBACR,iBAAiB;AAAA,gBAAA;AAAA,cAErB;AAAA,cAEA,sBAAsB;AAAA,gBACpB,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR,eAAe;AAAA,cACjB;AAAA,cAEA,aAAa;AAAA,gBACX,iBAAiB;AAAA,gBACjB,OAAO;AAAA,gBAEP,sBAAsB;AAAA,kBACpB,MAAM;AAAA,gBAAA;AAAA,cACR;AAAA,YACF;AAAA,UAEJ;AAAA,UACAL,EAAM;AAAA,UACNM;AAAA,QACF;AAAA,QACA,MAAMP;AAAA,QACN,SAAAE;AAAA,QAEC,UAAAH;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/icon-button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,OAAO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H,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC3C;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;GAQG;AAEH,eAAO,MAAM,aAAa,8CAAgB,kBAAkB,KAAG,SAAS,CAqDtE,CAAC"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { IconButton as a, Tooltip as l } from "@mui/material";
|
|
3
3
|
import { m as i } from "../../../chunks/index.DJYQ_-zP.js";
|
|
4
|
-
import { memo as
|
|
5
|
-
const
|
|
4
|
+
import { memo as t } from "react";
|
|
5
|
+
const s = t((o) => {
|
|
6
6
|
const e = /* @__PURE__ */ r(
|
|
7
7
|
a,
|
|
8
8
|
{
|
|
9
|
+
"aria-label": o.label,
|
|
9
10
|
"data-qa": o["data-qa"],
|
|
10
11
|
disableFocusRipple: !0,
|
|
11
12
|
disableRipple: !0,
|
|
12
13
|
disableTouchRipple: !0,
|
|
13
14
|
disabled: o.disabled,
|
|
14
15
|
onClick: o.onClick,
|
|
16
|
+
role: "button",
|
|
15
17
|
sx: i(
|
|
16
18
|
{
|
|
17
19
|
color: "var(--color-primary)",
|
|
@@ -41,9 +43,9 @@ const b = d((o) => {
|
|
|
41
43
|
children: o.icon
|
|
42
44
|
}
|
|
43
45
|
);
|
|
44
|
-
return /* @__PURE__ */ r(l, { title: o.label, children: o.disabled ? /* @__PURE__ */ r("span", { "data-testid": "disabled-span-wrapper", children: e }) : e });
|
|
46
|
+
return /* @__PURE__ */ r(l, { title: o.label, children: o.disabled ? /* @__PURE__ */ r("span", { "aria-label": o.label, "data-testid": "disabled-span-wrapper", role: "tooltip", children: e }) : e });
|
|
45
47
|
});
|
|
46
48
|
export {
|
|
47
|
-
|
|
49
|
+
s as AoaIconButton
|
|
48
50
|
};
|
|
49
51
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/atoms/icon-button/IconButton.tsx"],"sourcesContent":["import { IconButton as MUIIconButton, Tooltip, type SxProps } from
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/atoms/icon-button/IconButton.tsx"],"sourcesContent":["import { IconButton as MUIIconButton, Tooltip, type SxProps } from '@mui/material';\nimport merge from 'lodash.merge';\nimport { memo, type ReactNode } from 'react';\n\nexport interface AoaIconButtonProps {\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * Whether this button should be disabled\n */\n readonly disabled?: boolean;\n /**\n * The icon to be displayed as a button\n */\n readonly icon: JSX.Element;\n /**\n * Whether this button is being used inline\n */\n readonly inline?: boolean;\n /**\n * The label that is shown on hover\n */\n readonly label: string;\n /**\n * The action that should be triggered when clicking the button\n */\n onClick(this: void, ..._args: any[]): void;\n /**\n * Material UI's property to apply styling\n */\n readonly sx?: SxProps;\n}\n\n/**\n * Constructs an icon button using pre-defined Rijks styling\n *\n * @param props - Props to pass to the icon button\n * @example\n * ```jsx\n * <AoaIconButton onClick={() => console.log()} label='Order a burger' icon={<Fastfood />} />\n * ```\n */\n\nexport const AoaIconButton = memo((props: AoaIconButtonProps): ReactNode => {\n const Button = (\n <MUIIconButton\n aria-label={props.label}\n data-qa={props['data-qa']}\n disableFocusRipple\n disableRipple\n disableTouchRipple\n disabled={props.disabled}\n onClick={props.onClick}\n role='button'\n sx={merge(\n {\n color: 'var(--color-primary)',\n border: '1px solid var(--color-primary)',\n borderRadius: 0,\n ':hover, :active, :focus': {\n color: 'var(--color-primary-hover)',\n borderColor: 'var(--color-primary-hover)'\n },\n ':disabled': {\n backgroundColor: 'transparent',\n borderColor: 'var(--color-text-disabled)',\n color: 'var(--color-text-disabled)'\n },\n ':focus': {\n outline: '2px dashed var(--color-text)',\n outlineOffset: 3,\n boxShadow: 'none'\n },\n ...(props.inline && {\n border: 'none',\n padding: 0\n })\n },\n props.sx\n )}\n >\n {props.icon}\n </MUIIconButton>\n );\n\n return (\n <Tooltip title={props.label}>\n {props.disabled ? (\n <span aria-label={props.label} data-testid='disabled-span-wrapper' role='tooltip'>\n {Button}\n </span>\n ) : (\n Button\n )}\n </Tooltip>\n );\n});\n"],"names":["AoaIconButton","memo","props","Button","jsx","MUIIconButton","merge","Tooltip"],"mappings":";;;;AA6Ca,MAAAA,IAAgBC,EAAK,CAACC,MAAyC;AAC1E,QAAMC,IACJ,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,cAAYH,EAAM;AAAA,MAClB,WAASA,EAAM,SAAS;AAAA,MACxB,oBAAkB;AAAA,MAClB,eAAa;AAAA,MACb,oBAAkB;AAAA,MAClB,UAAUA,EAAM;AAAA,MAChB,SAASA,EAAM;AAAA,MACf,MAAK;AAAA,MACL,IAAII;AAAA,QACF;AAAA,UACE,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,cAAc;AAAA,UACd,2BAA2B;AAAA,YACzB,OAAO;AAAA,YACP,aAAa;AAAA,UACf;AAAA,UACA,aAAa;AAAA,YACX,iBAAiB;AAAA,YACjB,aAAa;AAAA,YACb,OAAO;AAAA,UACT;AAAA,UACA,UAAU;AAAA,YACR,SAAS;AAAA,YACT,eAAe;AAAA,YACf,WAAW;AAAA,UACb;AAAA,UACA,GAAIJ,EAAM,UAAU;AAAA,YAClB,QAAQ;AAAA,YACR,SAAS;AAAA,UAAA;AAAA,QAEb;AAAA,QACAA,EAAM;AAAA,MACR;AAAA,MAEC,UAAMA,EAAA;AAAA,IAAA;AAAA,EACT;AAGF,2BACGK,GAAQ,EAAA,OAAOL,EAAM,OACnB,UAAAA,EAAM,WACJ,gBAAAE,EAAA,QAAA,EAAK,cAAYF,EAAM,OAAO,eAAY,yBAAwB,MAAK,WACrE,UAAAC,GACH,IAEAA,EAEJ,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TextFieldProps } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
export interface AoaInputProps extends Omit<TextFieldProps,
|
|
3
|
+
export interface AoaInputProps extends Omit<TextFieldProps, 'variant'> {
|
|
4
4
|
/**
|
|
5
5
|
* Data-qa tag for E2E test purposes
|
|
6
6
|
*/
|
|
7
|
-
readonly
|
|
7
|
+
readonly 'data-qa'?: string;
|
|
8
8
|
/**
|
|
9
9
|
* Whether this input field is optional
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../src/components/atoms/input/Input.tsx"],"sourcesContent":["import { TextField, type TextFieldProps } from
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../src/components/atoms/input/Input.tsx"],"sourcesContent":["import { TextField, type TextFieldProps } from '@mui/material';\nimport merge from 'lodash.merge';\nimport { memo, type ReactNode } from 'react';\nimport { FontNormalSxProps } from '../../../_constants';\n\nexport interface AoaInputProps extends Omit<TextFieldProps, 'variant'> {\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * Whether this input field is optional\n */\n readonly optional?: boolean;\n}\n\n/**\n * Constructs an input field using pre-defined Rijks styling\n *\n * @param props - Props to pass to the input field\n * @example\n * ```jsx\n * <AoaInput label=\"User name\" value={value} onChange={() => handleOnChange} />\n * ```\n */\nexport const AoaInput = memo(({ optional, ...props }: AoaInputProps): ReactNode => {\n return (\n <TextField\n {...props}\n InputLabelProps={{ shrink: false, ...props.InputLabelProps }}\n required={!optional}\n sx={merge(\n {\n '.MuiInputBase-root': {\n ...FontNormalSxProps,\n marginTop: '35px',\n\n '&.MuiInputBase-multiline': {\n padding: 0\n },\n\n ':not(.Mui-error)::after': {\n borderColor: 'var(--color-rijks-skyblue)'\n },\n\n '.MuiInputBase-input': {\n padding: '17px 12px 16px',\n\n ':disabled': {\n backgroundColor: 'var(--color-disabled)',\n borderColor: 'var(--color-disabled)'\n }\n }\n },\n\n '.MuiInputLabel-root': {\n ...FontNormalSxProps,\n marginLeft: '-14px',\n marginTop: '-10px',\n\n ':disabled': {\n color: 'var(--color-text-disabled)'\n },\n\n ':focus:not(.Mui-error)': {\n color: 'var(--color-rijks-skyblue)'\n },\n\n ':not(.Mui-required)::after': {\n content: '\"(optioneel)\"',\n marginLeft: '5px',\n fontSize: 'calc(var(--font-size-text) * 0.75)'\n },\n\n '&.Mui-error': {\n ...FontNormalSxProps,\n fontWeight: 'bold'\n },\n\n '&.Mui-disabled': {\n color: 'var(--color-text-disabled)'\n }\n }\n },\n props.sx\n )}\n variant='outlined'\n />\n );\n});\n"],"names":["AoaInput","memo","optional","props","jsx","TextField","merge","FontNormalSxProps"],"mappings":";;;;;AAyBO,MAAMA,IAAWC,EAAK,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAEzC,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACE,GAAGF;AAAA,IACJ,iBAAiB,EAAE,QAAQ,IAAO,GAAGA,EAAM,gBAAgB;AAAA,IAC3D,UAAU,CAACD;AAAA,IACX,IAAII;AAAA,MACF;AAAA,QACE,sBAAsB;AAAA,UACpB,GAAGC;AAAA,UACH,WAAW;AAAA,UAEX,4BAA4B;AAAA,YAC1B,SAAS;AAAA,UACX;AAAA,UAEA,2BAA2B;AAAA,YACzB,aAAa;AAAA,UACf;AAAA,UAEA,uBAAuB;AAAA,YACrB,SAAS;AAAA,YAET,aAAa;AAAA,cACX,iBAAiB;AAAA,cACjB,aAAa;AAAA,YAAA;AAAA,UACf;AAAA,QAEJ;AAAA,QAEA,uBAAuB;AAAA,UACrB,GAAGA;AAAA,UACH,YAAY;AAAA,UACZ,WAAW;AAAA,UAEX,aAAa;AAAA,YACX,OAAO;AAAA,UACT;AAAA,UAEA,0BAA0B;AAAA,YACxB,OAAO;AAAA,UACT;AAAA,UAEA,8BAA8B;AAAA,YAC5B,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,UACZ;AAAA,UAEA,eAAe;AAAA,YACb,GAAGA;AAAA,YACH,YAAY;AAAA,UACd;AAAA,UAEA,kBAAkB;AAAA,YAChB,OAAO;AAAA,UAAA;AAAA,QACT;AAAA,MAEJ;AAAA,MACAJ,EAAM;AAAA,IACR;AAAA,IACA,SAAQ;AAAA,EAAA;AACV,CAEH;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BoxProps, SxProps } from '@mui/material';
|
|
2
2
|
import { ElementType, ReactNode } from 'react';
|
|
3
|
-
export interface AoaLogoProps extends BoxProps<ElementType<any,
|
|
3
|
+
export interface AoaLogoProps extends BoxProps<ElementType<any, 'svg'>> {
|
|
4
4
|
/**
|
|
5
5
|
* Data-qa tag to apply to the search bar and input element
|
|
6
6
|
*/
|
|
7
|
-
readonly
|
|
7
|
+
readonly 'data-qa'?: string;
|
|
8
8
|
/**
|
|
9
9
|
* Any additional CSSProperties to pass to the component
|
|
10
10
|
*/
|