@onewelcome/react-lib-components 0.2.4 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"react-lib-components.cjs.production.min.js","sources":["../src/_BaseStyling_/BaseStyling.tsx","../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../src/Button/BaseButton.tsx","../src/Button/Button.tsx","../src/Icon/Icon.tsx","../src/hooks/useSpacing.ts","../src/Typography/Typography.tsx","../src/Breadcrumbs/Breadcrumbs.tsx","../src/hooks/usePosition.ts","../src/Popover/Popover.tsx","../src/hooks/useBodyClick.ts","../src/ContextMenu/ContextMenu.tsx","../src/ContextMenu/ContextMenuItem.tsx","../src/Link/Link.tsx","../src/Button/IconButton.tsx","../src/util/helper.tsx","../src/Tabs/TabButton.tsx","../src/Tabs/TabPanel.tsx","../src/TextEllipsis/TextEllipsis.tsx","../src/Tiles/Tile.tsx","../src/Tiles/Tiles.tsx","../src/Tooltip/Tooltip.tsx","../src/Skeleton/Skeleton.tsx","../src/StatusIndicator/StatusIndicator.tsx","../src/Form/Input/Input.tsx","../src/Form/Select/Select.tsx","../src/Form/Select/Option.tsx","../src/Pagination/Pagination.tsx","../src/Form/Label/Label.tsx","../src/Notifications/BaseModal/BaseModalContext.ts","../src/Notifications/BaseModal/BaseModal.tsx","../src/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx","../src/Notifications/BaseModal/BaseModalContent/BaseModalContent.tsx","../src/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx","../src/Notifications/Dialog/DialogActions/DialogActions.tsx","../src/Notifications/Dialog/DialogTitle/DialogTitle.tsx","../src/Notifications/Dialog/Dialog.tsx","../src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx","../src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx","../src/Notifications/SlideInModal/SlideInModal.tsx","../src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx","../src/hooks/useAnimation.ts","../src/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx","../src/hooks/useFormSelector.ts","../src/Form/FormHelperText/FormHelperText.tsx","../src/Form/FormSelectorWrapper/FormSelectorWrapper.tsx","../src/Form/Checkbox/Checkbox.tsx","../src/Form/Radio/Radio.tsx","../src/Form/Textarea/Textarea.tsx","../src/Form/Toggle/Toggle.tsx","../src/Form/FormControl/FormControl.tsx","../src/Form/FormGroup/FormGroup.tsx","../src/Form/Wrapper/Wrapper/Wrapper.tsx","../src/hooks/useWrapper.ts","../src/Form/Wrapper/InputWrapper/InputWrapper.tsx","../src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx","../src/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx","../src/Form/Fieldset/Fieldset.tsx","../src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx","../src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx","../src/Wizard/wizardStateReducer.ts","../src/Wizard/WizardStateProvider.tsx","../src/Wizard/Wizard.tsx","../src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx","../src/Wizard/WizardSteps/WizardSteps.tsx","../src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx","../src/DataGrid/DataGridHeader/DataGridHeader.tsx","../src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx","../src/DataGrid/DataGridActions/DataGridActions.tsx","../src/DataGrid/DataGridBody/DataGridCell.tsx","../src/DataGrid/DataGridBody/DataGridRow.tsx","../src/DataGrid/DataGridBody/DataGridBody.tsx","../src/DataGrid/DataGrid.tsx","../src/Notifications/DiscardChangesModal/DiscardChangesModal.tsx","../src/Form/Form.tsx","../src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx","../src/Tabs/Tab.tsx","../src/Tabs/Tabs.tsx","../src/Wizard/WizardActions/WizardActions.tsx","../src/hooks/useRepeater.ts","../src/Notifications/Snackbar/useSnackbar.ts"],"sourcesContent":["import React, { Fragment, HTMLAttributes, ReactChild, useEffect, useState } from \"react\";\n\ninterface CSSProperties {\n colorFocus?: string;\n colorPrimary?: string;\n colorSecondary?: string;\n colorTertiary?: string;\n defaultLineHeight?: string;\n buttonBorderRadius?: string;\n buttonBorderWidth?: string;\n buttonFontSize?: string;\n buttonBorderStyle?: string;\n buttonFillTextColor?: string;\n buttonFillBackgroundColor?: string;\n buttonOutlineHoverTextColor?: string;\n inputBorderColor?: string;\n inputBorderRadius?: string;\n inputBorderWidth?: string;\n inputBorderWidthFocus?: string;\n inputBorderStyle?: string;\n inputBackgroundColor?: string;\n modalShadowColor?: string;\n modalBackgroundColor?: string;\n modalHeaderBackgroundColor?: string;\n snackbarTextColor?: string;\n snackbarInfoBackgroundColor?: string;\n snackbarSuccessBackgroundColor?: string;\n snackbarErrorBackgroundColor?: string;\n snackbarBorderRadius?: string;\n dataGridRowBackgroundColor?: string;\n dataGridRowHoverBackgroundColor?: string;\n tabsBackgroundColor?: string;\n tabBorderWidth?: string;\n tabBorderStyle?: string;\n tablistBorderWidth?: string;\n tablistBorderStyle?: string;\n tablistBorderColor?: string;\n tabTextColor?: string;\n default?: string;\n success?: string;\n error?: string;\n disabled?: string;\n greyedOut?: string;\n warning?: string;\n fontFamily?: string;\n fontFamilyCode?: string;\n fontSize?: string;\n fontSizeH1?: string;\n fontSizeH2?: string;\n fontSizeH3?: string;\n fontSizeH4?: string;\n fontSizeSub?: string;\n fontSizeCode?: string;\n}\n\nexport interface Props extends HTMLAttributes<HTMLDivElement> {\n children?: ReactChild;\n properties?: CSSProperties;\n}\n\nexport const BaseStyling = ({ children, properties = {} }: Props) => {\n const defaultProperties: CSSProperties = {\n colorFocus: \"#0085f2\",\n colorPrimary: \"#9e006b\",\n colorSecondary: \"#003b5e\",\n colorTertiary: \"#ff1e4e\",\n defaultLineHeight: \"26px\",\n buttonBorderRadius: \"20px\",\n buttonBorderWidth: \"2px\",\n buttonFontSize: \"1rem\",\n buttonBorderStyle: \"solid\",\n buttonFillTextColor: \"#fff\",\n buttonFillBackgroundColor: \"#fff\",\n buttonOutlineHoverTextColor: \"#fff\",\n inputBorderColor: \"#e9e9eb\",\n inputBorderRadius: \"8px\",\n inputBorderWidth: \"1px\",\n inputBorderWidthFocus: \"2px\",\n inputBorderStyle: \"solid\",\n inputBackgroundColor: \"#fff\",\n modalShadowColor: \"rgba(0, 0, 0, 0.16)\",\n modalBackgroundColor: \"#f5f8f8\",\n modalHeaderBackgroundColor: \"#fff\",\n snackbarTextColor: \"#fff\",\n snackbarInfoBackgroundColor: \"#003b5e\",\n snackbarSuccessBackgroundColor: \"#008a28\",\n snackbarErrorBackgroundColor: \"#d9291c\",\n snackbarBorderRadius: \"8px\",\n dataGridRowBackgroundColor: \"transparent\",\n dataGridRowHoverBackgroundColor: \"#f5e6f0\",\n tabsBackgroundColor: \"#FFF\",\n tabBorderWidth: \"2px\",\n tabBorderStyle: \"solid\",\n tablistBorderWidth: \"1px\",\n tablistBorderStyle: \"solid\",\n tablistBorderColor: \"#C3C3C7\",\n tabTextColor: \"#0f0f1e\",\n default: \"#0f0f1e\",\n success: \"#008a28\",\n error: \"#d9291c\",\n disabled: \"#e9e9eb\",\n greyedOut: \"#6f6f76\",\n warning: \"#ff6105\",\n fontFamily: \"'Red Hat Display', sans-serif\",\n fontFamilyCode: \"'Red Hat Mono', sans-serif\",\n fontSize: \"1rem\",\n fontSizeH1: \"2.5rem\",\n fontSizeH2: \"1.625rem\",\n fontSizeH3: \"1.5rem\",\n fontSizeH4: \"1.25rem\",\n fontSizeSub: \".75rem\",\n fontSizeCode: \"1rem\"\n };\n\n /** We need a loading state, because otherwise you see the colors flash from the default to the possible overridden ones. */\n const [isLoading, setIsLoading] = useState(true);\n\n /** Set the actual CSS properties on the HTML :root object */\n const setCSSProperties = (CSSPropertiesObject: CSSProperties) => {\n for (const [key, value] of Object.entries(CSSPropertiesObject)) {\n const formattedPropertyName = key.replace(/([A-Z])/g, val => `-${val.toLowerCase()}`);\n document.documentElement.style.setProperty(`--${formattedPropertyName}`, value);\n }\n };\n\n /** Check if the properties prop object is filled with anything. If it is, we want to shallow merge it with the default BaseStyling. */\n useEffect(() => {\n if (Object.keys(properties).length !== 0) {\n const mergedState = { ...defaultProperties, ...properties };\n setCSSProperties(mergedState);\n } else {\n setCSSProperties(defaultProperties);\n }\n setIsLoading(false);\n }, [properties]);\n\n /** Only render if we're not loading */\n return !isLoading ? <Fragment>{children}</Fragment> : null;\n};\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./BaseButton.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"button\"> {\n type?: \"submit\" | \"button\" | \"reset\";\n disabled?: boolean;\n color?: \"primary\" | \"secondary\" | \"tertiary\" | \"default\";\n}\n\nexport const BaseButton = React.forwardRef<HTMLButtonElement, Props>(\n ({ children, type = \"button\", className, ...rest }, ref) => {\n const validTypes = [\"submit\", \"button\", \"reset\"];\n\n if (!validTypes.includes(type))\n throw new Error(\n `You have entered an invalid button type. Expected 'submit', 'button' or 'reset' got ${type}`\n );\n\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n className={`${classes.button} ${className ? className : \"\"}`}\n >\n {children}\n </button>\n );\n }\n);\n","import React from \"react\";\nimport { BaseButton, Props as BaseButtonProps } from \"./BaseButton\";\nimport classes from \"./Button.module.scss\";\n\nexport interface Props extends BaseButtonProps {\n startIcon?: React.ReactNode | false;\n endIcon?: React.ReactNode | false;\n children?: React.ReactNode;\n variant?: \"text\" | \"fill\" | \"outline\";\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, Props>(\n (\n {\n children,\n variant = \"fill\",\n color = \"primary\",\n startIcon = false,\n endIcon = false,\n className,\n ...rest\n },\n ref\n ) => {\n const additionalClasses = [];\n\n if (startIcon || endIcon) {\n additionalClasses.push(classes[\"has-icon\"]);\n }\n\n if (startIcon) {\n additionalClasses.push(classes[\"start-icon\"]);\n }\n\n if (endIcon) {\n additionalClasses.push(classes[\"end-icon\"]);\n }\n\n if (className) {\n additionalClasses.push(className);\n }\n\n return (\n <BaseButton\n {...rest}\n ref={ref}\n className={`${classes[color]} ${classes[variant]} ${additionalClasses.join(\" \")}`}\n >\n {startIcon && <i>{startIcon}&nbsp;</i>}\n <span>{children}</span>\n {endIcon && <i>&nbsp;{endIcon}</i>}\n </BaseButton>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./Icon.module.scss\";\n\nexport enum Icons {\n Bell = \"bell\",\n BellAlt = \"bell-alt\",\n Bookmark = \"bookmark\",\n BookmarkAlt = \"bookmark-alt\",\n Build = \"build\",\n Calendar = \"calendar\",\n Change = \"change\",\n Checkmark = \"checkmark\",\n CheckmarkCircle = \"checkmark-circle\",\n CheckmarkCircleAlt = \"checkmark-circle-alt\",\n CheckmarkCircleBreakout = \"checkmark-circle-breakout\",\n CheckmarkSquare = \"checkmark-square\",\n ChevronUp = \"chevron-up\",\n ChevronDown = \"chevron-down\",\n ChevronLeft = \"chevron-left\",\n ChevronRight = \"chevron-right\",\n Circle = \"circle\",\n Clock = \"clock\",\n Copy = \"copy\",\n Edit = \"edit\",\n Ellipsis = \"ellipsis\",\n EllipsisAlt = \"ellipsis-alt\",\n Equal = \"equal\",\n Error = \"error-circle\",\n Eye = \"eye\",\n Filter = \"filter\",\n FilterAlt = \"filter-alt\",\n FilterAltArrow = \"filter-alt-arrow\",\n FilterAltTimes = \"filter-alt-times\",\n Forbidden = \"forbidden\",\n Fullscreen = \"fullscreen\",\n FullscreenExit = \"fullscreen-exit\",\n Gearwheel = \"gearwheel\",\n Grid = \"grid\",\n Hamburger = \"hamburger\",\n Heart = \"heart\",\n Image = \"image\",\n InfoBell = \"info-bell\",\n InfoCircle = \"info-circle\",\n Link = \"link\",\n MinusSquare = \"minus-square\",\n NavigationFirst = \"navigation-first\",\n NavigationLast = \"navigation-last\",\n Plus = \"plus\",\n Radio = \"radio\",\n Refresh = \"refresh\",\n Search = \"search\",\n Share = \"share\",\n Square = \"square\",\n Star = \"star\",\n StarAlt = \"star-alt\",\n TableSearch = \"table-search\",\n Times = \"times\",\n TimesCircle = \"times-circle\",\n TimesCircleAlt = \"times-circle-alt\",\n TimesThin = \"times-thin\",\n Trash = \"trash\",\n TriangleDown = \"triangle-down\",\n TriangleDownCircle = \"triangle-down-circle\",\n TriangleLeft = \"triangle-left\",\n TriangleRight = \"triangle-right\",\n TriangleUp = \"triangle-up\",\n Undo = \"undo\",\n Warning = \"warning\"\n}\n\ntype Tag = \"span\" | \"div\" | \"i\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n icon: Icons;\n color?: string;\n size?: string;\n tag?: Tag;\n}\n\nexport const Icon = React.forwardRef<HTMLDivElement, Props>(\n ({ icon, color, className, style, size, tag = \"span\", ...rest }: Props, ref) => {\n const Component = tag;\n\n return (\n <Component\n {...rest}\n ref={ref}\n style={{ color: color, ...style, fontSize: size }}\n data-icon\n aria-hidden=\"true\"\n className={`${classes[\"icon\"]} ${classes[\"icon-\" + icon]} ${className ? className : \"\"}`}\n />\n );\n }\n);\n","import { CSSProperties } from \"react\";\n\nexport type SpacingMultiplier = 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\ntype SpacingMultiplierStringOrNumber = `${SpacingMultiplier}` | SpacingMultiplier;\ntype MultiValueSpacingMultiplier =\n | `${SpacingMultiplier} ${SpacingMultiplier} ${SpacingMultiplier} ${SpacingMultiplier}`\n | `${SpacingMultiplier} ${SpacingMultiplier} ${SpacingMultiplier}`\n | `${SpacingMultiplier} ${SpacingMultiplier}`\n | SpacingMultiplierStringOrNumber;\n\nexport interface Spacing {\n padding?: MultiValueSpacingMultiplier;\n paddingTop?: SpacingMultiplierStringOrNumber;\n paddingBottom?: SpacingMultiplierStringOrNumber;\n paddingLeft?: SpacingMultiplierStringOrNumber;\n paddingRight?: SpacingMultiplierStringOrNumber;\n margin?: MultiValueSpacingMultiplier;\n marginTop?: SpacingMultiplierStringOrNumber;\n marginBottom?: SpacingMultiplierStringOrNumber;\n marginLeft?: SpacingMultiplierStringOrNumber;\n marginRight?: SpacingMultiplierStringOrNumber;\n}\n\nconst defaultFactor = 0.25;\nconst defaultUnit = \"rem\";\nconst spacingNumberRegex = /(\\d+\\.?\\d*)+/g;\n\nexport const useSpacing = (\n spacingProps?: Spacing,\n style?: CSSProperties\n): CSSProperties | undefined => {\n if (spacingProps) {\n return Object.entries(spacingProps).reduce<CSSProperties>((prev, [spacing, multiplier]) => {\n const matches = String(multiplier).matchAll(spacingNumberRegex);\n const cssSpacingValue = Array.from(matches)\n .map(([multiplierValue]) => `${Number(multiplierValue) * defaultFactor}${defaultUnit}`)\n .join(\" \");\n return { ...prev, [spacing]: cssSpacingValue };\n }, style ?? {});\n }\n return style;\n};\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport classes from \"./Typography.module.scss\";\nimport { Spacing, useSpacing } from \"../hooks/useSpacing\";\n\nexport const validVariants = [\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"body\",\n \"body-bold\",\n \"sub-text\",\n \"code\"\n] as const;\nexport type Variant = typeof validVariants[number];\n\ntype Tags =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"p\"\n | \"div\"\n | \"code\"\n | \"span\"\n | \"sup\"\n | \"sub\"\n | \"strong\"\n | \"em\"\n | \"small\"\n | \"mark\"\n | \"del\"\n | \"ins\"\n | \"blockquote\";\n\nexport interface Props extends ComponentPropsWithRef<any> {\n children: ReactNode;\n variant: Variant;\n tag?: Tags;\n spacing?: Spacing;\n}\n\nexport const Typography = React.forwardRef<any, Props>(\n ({ children, variant, tag, style, spacing, className = \"\", ...rest }: Props, ref) => {\n if (!validVariants.includes(variant)) {\n throw new Error(\n `You entered an invalid variant. You can choose from: ${validVariants}, you entered: ${variant}`\n );\n }\n\n const styleWithSpacing = useSpacing(spacing, style);\n\n if (!tag) {\n switch (variant) {\n case \"h1\":\n case \"h2\":\n case \"h3\":\n case \"h4\":\n case \"code\":\n tag = variant;\n break;\n case \"body\":\n tag = \"p\";\n break;\n case \"body-bold\":\n tag = \"p\";\n break;\n case \"sub-text\":\n tag = \"span\";\n break;\n default:\n tag = \"div\";\n break;\n }\n }\n\n let TagName = tag;\n\n return (\n <TagName\n {...rest}\n ref={ref}\n style={styleWithSpacing}\n className={`${classes[\"typography_style_\" + variant]} ${className}`}\n >\n {children}\n </TagName>\n );\n }\n);\n","import React, { ComponentPropsWithRef, Fragment, ReactElement } from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport { Link, Props as LinkProps } from \"../Link/Link\";\nimport { Typography } from \"../Typography/Typography\";\nimport classes from \"./Breadcrumbs.module.scss\";\n\ntype ChildrenType = ReactElement<LinkProps, typeof Link>;\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: ChildrenType | ChildrenType[];\n \"aria-label\": string;\n}\n\nexport const Breadcrumbs = React.forwardRef<HTMLDivElement, Props>(\n ({ children, \"aria-label\": ariaLabel, className = \"\", ...rest }: Props, ref) => {\n const items = React.Children.map(children, (child, index) => {\n const isLastElement = Array.isArray(children) ? index === children.length - 1 : true;\n if (isLastElement) {\n return (\n <Typography\n key={child.key}\n variant=\"body\"\n tag=\"span\"\n className={classes[\"last\"]}\n aria-current=\"page\"\n >\n {child.props.children}\n </Typography>\n );\n } else {\n return (\n <Fragment key={child.key}>\n {React.cloneElement(child)}\n <Icon icon={Icons.ChevronRight} className={classes[\"icon\"]} />\n </Fragment>\n );\n }\n });\n return (\n <nav\n {...rest}\n ref={ref}\n aria-label={ariaLabel}\n className={`${classes[\"breadcrumbs\"]} ${className}`}\n >\n {items}\n </nav>\n );\n }\n);\n","import React, { useState } from \"react\";\n\nexport interface ConfigObject {\n relativeElement: RefElement;\n elementToBePositioned: RefElement;\n transformOrigin?: Placement;\n placement?: Placement;\n offset?: Offset;\n}\n\nexport type HorizontalPlacement = \"left\" | \"center\" | \"centerh\" | \"right\";\nexport type VerticalPlacement = \"top\" | \"center\" | \"centerv\" | \"bottom\";\n\ntype Axis = \"vertical\" | \"horizontal\";\ntype RefElement = React.RefObject<HTMLOrSVGElement> | undefined;\n\ninterface DomRectObject {\n top: number;\n right: number;\n bottom: number;\n left: number;\n center: number;\n centerh: number;\n centerv: number;\n width: number;\n height: number;\n x: number;\n y: number;\n}\n\nexport interface Placement {\n horizontal: HorizontalPlacement;\n vertical: VerticalPlacement;\n}\n\nexport interface Offset {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\nexport interface Position {\n top: PositionType;\n right: PositionType;\n bottom: PositionType;\n left: PositionType;\n}\n\ninterface Dimensions {\n height: number;\n width: number;\n}\n\ntype PositionType = number | \"initial\";\n\nconst defaultConfigObject: ConfigObject = {\n relativeElement: undefined,\n elementToBePositioned: undefined,\n transformOrigin: {\n horizontal: \"left\",\n vertical: \"top\"\n },\n placement: {\n horizontal: \"left\",\n vertical: \"top\"\n },\n offset: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }\n};\n\n/* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain*/\nexport const usePosition = (providedConfigObject: ConfigObject = defaultConfigObject) => {\n const configObject = { ...defaultConfigObject, ...providedConfigObject };\n\n if (configObject.transformOrigin === undefined) {\n configObject.transformOrigin = defaultConfigObject.transformOrigin;\n }\n\n if (configObject.placement === undefined) {\n configObject.placement = defaultConfigObject.placement;\n }\n\n if (configObject.offset === undefined) {\n configObject.offset = defaultConfigObject.offset;\n }\n\n const [position, setPosition] = useState<Position>({\n left: 0,\n top: 0,\n right: \"initial\",\n bottom: \"initial\"\n });\n\n const _fixPossibleViewportOverflow = (\n value: number,\n transformOrigin: Placement,\n requestedReturnValue: Axis,\n elDimensions: Dimensions\n ) => {\n let returnValue = value;\n\n if (\n (transformOrigin[requestedReturnValue] === \"left\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"top\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"center\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"bottom\" && returnValue < 0)\n ) {\n returnValue = 0;\n }\n\n if (\n (transformOrigin[requestedReturnValue] === \"left\" &&\n returnValue > window.innerWidth - elDimensions.width) ||\n (transformOrigin[requestedReturnValue] === \"center\" &&\n requestedReturnValue === \"horizontal\" &&\n returnValue > window.innerWidth - elDimensions.width)\n ) {\n returnValue = window.innerWidth - elDimensions.width;\n }\n\n if (\n (transformOrigin[requestedReturnValue] === \"top\" &&\n returnValue > window.innerHeight - elDimensions.height) ||\n (transformOrigin[requestedReturnValue] === \"center\" &&\n requestedReturnValue === \"vertical\" &&\n returnValue > window.innerHeight - elDimensions.height)\n ) {\n returnValue = window.innerHeight - elDimensions.height;\n }\n\n if (\n transformOrigin[requestedReturnValue] === \"right\" &&\n returnValue > window.innerWidth - elDimensions.width\n ) {\n returnValue = window.innerWidth - elDimensions.width;\n }\n\n if (\n transformOrigin[requestedReturnValue] === \"bottom\" &&\n returnValue > window.innerHeight - elDimensions.height\n ) {\n returnValue = window.innerHeight - elDimensions.height;\n }\n\n return returnValue;\n };\n\n const _applyOffsetToPlacementValue = (\n value: number,\n requestedReturnValue: Axis,\n transformOrigin: Placement\n ) => {\n let returnValue = value;\n if (\n (requestedReturnValue === \"horizontal\" && configObject.offset?.left !== 0) ||\n (requestedReturnValue === \"horizontal\" && configObject.offset?.right !== 0)\n ) {\n if (\n transformOrigin[requestedReturnValue] === \"left\" ||\n transformOrigin[requestedReturnValue] === \"center\"\n ) {\n returnValue += configObject.offset?.left!;\n returnValue -= configObject.offset?.right!;\n }\n\n if (transformOrigin[requestedReturnValue] === \"right\") {\n returnValue -= configObject.offset?.left!;\n returnValue += configObject.offset?.right!;\n }\n }\n\n if (\n (requestedReturnValue === \"vertical\" && configObject.offset?.top !== 0) ||\n (requestedReturnValue === \"vertical\" && configObject.offset?.bottom !== 0)\n ) {\n if (\n transformOrigin[requestedReturnValue] === \"top\" ||\n transformOrigin[requestedReturnValue] === \"center\"\n ) {\n returnValue += configObject.offset?.top!;\n returnValue -= configObject.offset?.bottom!;\n }\n\n if (transformOrigin[requestedReturnValue] === \"bottom\") {\n returnValue -= configObject.offset?.top!;\n returnValue += configObject.offset?.bottom!;\n }\n }\n\n return returnValue;\n };\n\n const _calculateInitialPlacementValue = (\n transformOrigin: Placement,\n requestedReturnValue: Axis,\n relEl: DomRectObject,\n placementOriginDefinition: HorizontalPlacement | VerticalPlacement,\n elDimensions: Dimensions\n ) => {\n let value = 0;\n\n if (\n transformOrigin[requestedReturnValue] === \"left\" ||\n transformOrigin[requestedReturnValue] === \"top\"\n ) {\n value = relEl[placementOriginDefinition];\n } else if (transformOrigin[requestedReturnValue] === \"center\") {\n value =\n relEl[placementOriginDefinition] -\n elDimensions[requestedReturnValue === \"horizontal\" ? \"width\" : \"height\"] / 2;\n } else if (\n transformOrigin[requestedReturnValue] === \"right\" ||\n transformOrigin[requestedReturnValue] === \"bottom\"\n ) {\n value =\n window[requestedReturnValue === \"horizontal\" ? \"innerWidth\" : \"innerHeight\"] -\n relEl[placementOriginDefinition];\n }\n\n return value;\n };\n\n /**\n *\n * @param requestedReturnValue whether the requested return value is for the horizontal or vertical axis\n * @returns either the horizontally centered placement definition (centerh) or the vertically centered one (centerv)\n */\n const _determineCenteredPlacementOrigin = (requestedReturnValue: Axis) => {\n if (requestedReturnValue === \"horizontal\") {\n return \"centerh\";\n } else if (requestedReturnValue === \"vertical\") {\n return \"centerv\";\n }\n throw new Error(\n `the requested return value isn't \"vertical\" or \"horizontal\" ${requestedReturnValue} was given.`\n );\n };\n\n const _calculatePlacementValue = (\n transformOrigin: Placement,\n placement: HorizontalPlacement | VerticalPlacement,\n requestedReturnValue: Axis,\n relEl: DomRectObject,\n elDimensions: Dimensions\n ): number => {\n const placementOriginDefinition =\n placement === \"center\" ? _determineCenteredPlacementOrigin(requestedReturnValue) : placement;\n\n const value = _calculateInitialPlacementValue(\n transformOrigin,\n requestedReturnValue,\n relEl,\n placementOriginDefinition,\n elDimensions\n );\n\n const valueWithOffset = _applyOffsetToPlacementValue(\n value,\n requestedReturnValue,\n transformOrigin\n );\n\n const valueCorrectionForViewportOverflow = _fixPossibleViewportOverflow(\n valueWithOffset,\n transformOrigin,\n requestedReturnValue,\n elDimensions\n );\n\n return valueCorrectionForViewportOverflow;\n };\n\n const _calculatePlacement = (relEl: DomRectObject, elDimensions: Dimensions, axis: Axis) => {\n const placementValue = _calculatePlacementValue(\n configObject.transformOrigin!,\n configObject.placement![axis]!,\n axis,\n relEl,\n elDimensions\n );\n\n let direction = \"left\";\n let oppositeDirection = \"right\";\n\n if (axis === \"horizontal\" && configObject.transformOrigin?.horizontal === \"right\") {\n direction = \"right\";\n oppositeDirection = \"left\";\n } else if (axis === \"horizontal\") {\n direction = \"left\";\n oppositeDirection = \"right\";\n }\n\n if (axis === \"vertical\" && configObject.transformOrigin?.vertical === \"bottom\") {\n direction = \"bottom\";\n oppositeDirection = \"top\";\n } else if (axis === \"vertical\") {\n direction = \"top\";\n oppositeDirection = \"bottom\";\n }\n\n setPosition(prevState => ({\n ...prevState,\n [direction]: placementValue,\n [oppositeDirection]: \"initial\"\n }));\n };\n\n const calculatePosition = () => {\n if (!configObject.relativeElement?.current) return;\n const relativeElRect = (configObject.relativeElement!\n .current as HTMLElement)!.getBoundingClientRect();\n const elementToBePositionedDimensions: Dimensions = {\n height: (configObject.elementToBePositioned!.current as HTMLElement).offsetHeight,\n width: (configObject.elementToBePositioned!.current as HTMLElement).offsetWidth\n };\n\n /** We want to add a center (horizontal and vertical) property to the DOMRect object. Since it's a special object we can't modify so we clone it and add it. */\n const clonedRelEl = {\n top: relativeElRect.top,\n right: relativeElRect.right,\n bottom: relativeElRect.bottom,\n center: 0,\n centerv: relativeElRect.top + relativeElRect.height / 2,\n centerh: relativeElRect.left + relativeElRect.width / 2,\n left: relativeElRect.left,\n width: relativeElRect.width,\n height: relativeElRect.height,\n x: relativeElRect.x,\n y: relativeElRect.y\n };\n\n _calculatePlacement(clonedRelEl, elementToBePositionedDimensions, \"horizontal\");\n _calculatePlacement(clonedRelEl, elementToBePositionedDimensions, \"vertical\");\n };\n\n return {\n top: position.top,\n bottom: position.bottom,\n left: position.left,\n right: position.right,\n calculatePosition\n };\n};\n","import React, { ComponentPropsWithRef, ReactNode, RefObject, useEffect, useRef } from \"react\";\nimport { Offset, Placement, usePosition } from \"../hooks/usePosition\";\nimport classes from \"./Popover.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactNode;\n show?: boolean;\n anchorEl?: RefObject<HTMLOrSVGElement>; //eslint-disable-line no-undef\n placement?: Placement;\n offset?: Offset;\n transformOrigin?: Placement;\n}\n\nexport const Popover = React.forwardRef<HTMLDivElement, Props>(\n ({ children, className, show, placement, offset, transformOrigin, anchorEl, ...rest }, ref) => {\n const elToBePositioned = useRef<HTMLDivElement>(null);\n\n if (show === undefined) {\n throw new Error('Please make sure to define the \"show\" property on your Popover component');\n }\n\n const { top, left, right, bottom, calculatePosition } = usePosition({\n elementToBePositioned: elToBePositioned,\n relativeElement: anchorEl,\n offset: offset,\n placement: placement,\n transformOrigin: transformOrigin\n });\n\n useEffect(() => {\n calculatePosition();\n }, [show]);\n\n return (\n <div ref={ref} {...rest}>\n <div\n ref={elToBePositioned}\n className={`${classes.popover} ${className ?? \"\"} ${show ? classes.show : \"\"}`}\n style={{ top: top, left: left, right: right, bottom: bottom }}\n >\n {children}\n </div>\n </div>\n );\n }\n);\n","import { useEffect } from \"react\";\n\nexport const useBodyClick = (\n checkFunction: (event: MouseEvent) => boolean,\n callbackFunction: (...args: unknown[]) => unknown,\n dependingStateVariable: React.ComponentState | React.ComponentState[]\n) => {\n function bodyClickListener(event: MouseEvent) {\n if (checkFunction(event)) {\n callbackFunction();\n }\n }\n useEffect(() => {\n window.addEventListener(\"click\", bodyClickListener);\n\n return () => {\n window.removeEventListener(\"click\", bodyClickListener);\n };\n }, [dependingStateVariable]);\n};\n","import React, {\n ComponentPropsWithRef,\n ReactElement,\n ReactNode,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { Props as ButtonProps } from \"../Button/Button\";\nimport { Props as IconButtonProps } from \"../Button/IconButton\";\nimport { Popover } from \"../Popover/Popover\";\nimport { Placement, Offset } from \"../hooks/usePosition\";\nimport classes from \"./ContextMenu.module.scss\";\nimport { useBodyClick } from \"../hooks/useBodyClick\";\nimport { createPortal } from \"react-dom\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n trigger: ReactElement<ButtonProps> | ReactElement<IconButtonProps>;\n children: ReactNode;\n placement?: Placement;\n transformOrigin?: Placement;\n offset?: Offset;\n id: string;\n show?: boolean;\n domRoot?: HTMLElement;\n onShow?: () => void;\n onClose?: () => void;\n}\n\nexport const ContextMenu = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n trigger,\n children,\n id,\n show = false,\n onShow,\n onClose,\n placement = { horizontal: \"right\", vertical: \"top\" },\n offset = { top: 0, bottom: 0, left: 0, right: 0 },\n transformOrigin = { horizontal: \"left\", vertical: \"top\" },\n domRoot = document.body,\n ...rest\n }: Props,\n ref\n ) => {\n const anchorEl = useRef<HTMLButtonElement>(null);\n const [showContextMenu, setShowContextMenu] = useState(show);\n const [hasBeenClosed, setHasBeenClosed] = useState(false);\n const [selectedContextMenuItem, setSelectedContextMenuItem] = useState(-1);\n const [focusedContextMenuItem, setFocusedContextMenuItem] = useState(-1);\n const [shouldClick, setShouldClick] =\n useState(\n false\n ); /** We need this, because whenever we use the arrow keys to select the contextmenu item, and we focus the currently selected item it fires the \"click\" listener in ContextMenuItem component. Instead, we only want this to fire if we press \"enter\" or \"spacebar\" so we set this to true whenever that is the case, and back to false when it has been executed. */\n const [childrenCount] = useState(React.Children.count(children));\n\n if (!id) {\n throw new Error(\"You need to provide an ID to the context menu\");\n }\n\n const onArrowNavigation = (event: React.KeyboardEvent) => {\n if (focusedContextMenuItem === -1 && selectedContextMenuItem !== -1) {\n setFocusedContextMenuItem(selectedContextMenuItem);\n }\n\n const codesToPrevenDefault = [\n \"ArrowDown\",\n \"ArrowUp\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Enter\",\n \"Space\",\n \"Escape\",\n \"End\",\n \"Home\"\n ];\n\n if (codesToPrevenDefault.includes(event.code)) {\n event.preventDefault();\n }\n\n switch (event.code) {\n case \"ArrowDown\":\n if (!showContextMenu) {\n setShowContextMenu(true);\n return;\n }\n setFocusedContextMenuItem(prevState => {\n return prevState + 1 > childrenCount - 1 ? 0 : prevState + 1;\n });\n return;\n case \"ArrowUp\":\n setFocusedContextMenuItem(prevState => {\n return prevState - 1 < 0 ? childrenCount - 1 : prevState - 1;\n });\n return;\n case \"Enter\":\n case \"Space\":\n if (!showContextMenu) {\n setShowContextMenu(true);\n return;\n }\n\n setShouldClick(true);\n setSelectedContextMenuItem(focusedContextMenuItem);\n setShowContextMenu(false);\n return;\n case \"Tab\":\n case \"Escape\":\n setShowContextMenu(false);\n return;\n case \"End\":\n setFocusedContextMenuItem(childrenCount - 1);\n return;\n case \"Home\":\n setFocusedContextMenuItem(0);\n return;\n }\n };\n\n useBodyClick(\n event => {\n return (\n showContextMenu &&\n anchorEl.current !== event.target &&\n anchorEl.current !== (event.target as HTMLElement).parentElement\n );\n },\n () => {\n setShowContextMenu(false);\n },\n showContextMenu\n );\n\n useEffect(() => {\n if (showContextMenu === true) {\n onShow && onShow();\n } else {\n onClose && onClose();\n !hasBeenClosed && setHasBeenClosed(true);\n setFocusedContextMenuItem(-1);\n hasBeenClosed && anchorEl.current && anchorEl.current.focus();\n }\n }, [showContextMenu]);\n\n const renderTrigger = () =>\n React.cloneElement(trigger, {\n id: id,\n \"aria-haspopup\": \"true\",\n \"aria-controls\": `${id}-menu`,\n \"aria-expanded\": showContextMenu,\n onClick: () => setShowContextMenu(!showContextMenu),\n tabIndex: 0,\n ref: anchorEl\n });\n\n const renderChildren = () => {\n return React.Children.map(children, (child, index) => {\n return React.cloneElement(child as ReactElement, {\n onFocusChange: (childIndex: number) => setFocusedContextMenuItem(childIndex),\n onSelectedChange: (childIndex: number) => {\n setSelectedContextMenuItem(childIndex);\n setShouldClick(false);\n },\n childIndex: index,\n hasFocus: focusedContextMenuItem === index,\n isSelected: selectedContextMenuItem === index,\n contextMenuOpened: showContextMenu,\n shouldClick: shouldClick\n });\n });\n };\n\n return (\n <div {...rest} ref={ref} onKeyDown={onArrowNavigation} className={classes[\"context-menu\"]}>\n {renderTrigger()}\n {createPortal(\n <Popover\n placement={placement}\n transformOrigin={transformOrigin}\n offset={offset}\n anchorEl={anchorEl}\n show={showContextMenu}\n >\n <ul className={classes[\"menu\"]} id={`${id}-menu`} aria-describedby={id} role=\"menu\">\n {renderChildren()}\n </ul>\n </Popover>,\n domRoot\n )}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, createRef, RefObject, useEffect } from \"react\";\nimport classes from \"./ContextMenuItem.module.scss\";\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"button\">, \"onClick\"> {\n children?: string;\n hasFocus?: boolean;\n isSelected?: boolean;\n childIndex?: number;\n shouldClick?: boolean;\n contextMenuOpened?: boolean;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onFocusChange?: (childIndex: number) => void;\n onSelectedChange?: (childIndex: number) => void;\n}\n\nexport const ContextMenuItem = React.forwardRef<HTMLButtonElement, Props>(\n (\n {\n children,\n onClick,\n onFocusChange,\n onSelectedChange,\n hasFocus,\n isSelected,\n childIndex,\n contextMenuOpened,\n shouldClick,\n className,\n ...rest\n }: Props,\n ref\n ) => {\n let innerButtonRef = (ref as RefObject<HTMLButtonElement>) || createRef<HTMLButtonElement>();\n\n useEffect(() => {\n if (isSelected && innerButtonRef.current && shouldClick) {\n innerButtonRef.current.click();\n }\n }, [isSelected, shouldClick]);\n\n useEffect(() => {\n if (innerButtonRef.current && hasFocus && contextMenuOpened) {\n onFocusChange && childIndex && onFocusChange(childIndex);\n innerButtonRef.current.focus();\n }\n }, [hasFocus, innerButtonRef, contextMenuOpened]);\n\n return (\n <li role=\"none\" className={`${classes[\"context-menu-item\"]} ${className ?? \"\"}`}>\n <button\n role=\"menuitem\"\n {...rest}\n ref={innerButtonRef}\n data-focus={hasFocus}\n tabIndex={-1}\n onClick={event => {\n onClick && onClick(event);\n onSelectedChange && childIndex && onSelectedChange(childIndex);\n }}\n >\n {children}\n </button>\n </li>\n );\n }\n);\n","import React, {\n ComponentPropsWithRef,\n ForwardRefExoticComponent,\n ReactNode,\n RefAttributes\n} from \"react\";\nimport classes from \"./Link.module.scss\";\nimport { LinkProps } from \"./types\";\n\nexport type AnchorType = \"external\" | \"internal\" | \"download\";\n\nexport interface Props extends ComponentPropsWithRef<\"a\"> {\n children?: ReactNode;\n color?: \"primary\" | \"secondary\" | \"tertiary\";\n display?: \"link\" | \"button\";\n buttonVariant?: \"outline\" | \"text\" | \"fill\";\n type?: AnchorType;\n to: string;\n disabled?: boolean;\n component?: ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>;\n}\n\nexport const Link = React.forwardRef<HTMLAnchorElement, Props>(\n (\n {\n children,\n className,\n disabled = false,\n to,\n color = \"primary\",\n type = \"internal\",\n display = \"link\",\n buttonVariant = \"fill\",\n component,\n ...rest\n }: Props,\n ref\n ) => {\n const determineTarget = () => {\n if (rest.target) {\n return rest.target;\n }\n\n if (type === \"external\") {\n return \"_blank\";\n }\n\n return \"\";\n };\n\n const classNames = [classes[color]];\n display === \"link\" && classNames.push(classes[\"link\"]);\n display === \"button\" && classNames.push(classes[\"button\"], classes[buttonVariant]);\n disabled && classNames.push(classes[\"disabled\"]);\n className && classNames.push(className);\n\n if (component) {\n return React.createElement(component, {\n ...rest,\n ref: ref,\n to: to,\n className: classNames.join(\" \"),\n \"aria-disabled\": disabled,\n style: {\n ...rest.style\n },\n children: children\n });\n }\n\n return (\n <a\n {...rest}\n ref={ref}\n download={type === \"download\"}\n rel={type === \"external\" ? \"noopener noreferer\" : undefined}\n href={!disabled ? to : undefined}\n className={classNames.join(\" \")}\n aria-disabled={disabled}\n target={determineTarget()}\n style={{\n ...rest.style\n }}\n >\n {children}\n </a>\n );\n }\n);\n","import React, { Fragment } from \"react\";\nimport { BaseButton, Props as BaseButtonProps } from \"./BaseButton\";\nimport classes from \"./IconButton.module.scss\";\nimport readyclasses from \"../readyclasses.module.scss\";\n\nexport interface Props extends BaseButtonProps {\n children?: React.ReactNode;\n iconSize?: \"s\" | \"m\" | \"l\";\n variant?: \"text\" | \"fill\" | \"outline\";\n className?: string;\n title?: string;\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, Props>(\n (\n { children, color = \"primary\", variant = \"text\", iconSize = \"m\", title, className, ...rest },\n ref\n ) => {\n if (!title) {\n console.error(\"Please make sure to specify a 'title' prop to your IconButton component! \");\n }\n\n const iconButtonClasses = [\n classes[\"icon-button\"],\n classes[variant],\n classes[color],\n classes[\"button-\" + iconSize]\n ];\n\n if (className) {\n iconButtonClasses.push(className);\n }\n\n return (\n <BaseButton {...rest} ref={ref} className={iconButtonClasses.join(\" \")}>\n <Fragment>\n {children}\n <span className={readyclasses[\"sr-only\"]}>{title}</span>\n </Fragment>\n </BaseButton>\n );\n }\n);\n","type KeyValuePair = { [key: string]: unknown };\n\nexport const generateID = (length = 15, stringToWeaveIn?: string) => {\n /** We will make sure to mesh the generate id and name property together to basically create a unique ID */\n let hashCharacters = [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"0\",\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\",\n \"K\",\n \"L\",\n \"M\",\n \"N\",\n \"O\",\n \"P\",\n \"Q\",\n \"R\",\n \"S\",\n \"T\",\n \"U\",\n \"V\",\n \"W\",\n \"X\",\n \"Y\",\n \"Z\",\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\",\n \"g\",\n \"h\",\n \"i\",\n \"j\",\n \"k\",\n \"l\",\n \"m\",\n \"n\",\n \"o\",\n \"p\",\n \"q\",\n \"r\",\n \"s\",\n \"t\",\n \"u\",\n \"v\",\n \"w\",\n \"x\",\n \"y\",\n \"z\"\n ];\n\n let id = \"\";\n\n /** Generate an id of x characters in length */\n for (let i = 0; i < length && id.length < length; i++) {\n let stringCharacter =\n stringToWeaveIn && stringToWeaveIn[i] !== undefined && !/\\s/.test(stringToWeaveIn[i])\n ? stringToWeaveIn[i]\n : \"\";\n id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];\n }\n\n return id.slice(0, length);\n};\n\nexport const filterProps = (props: any, regexPattern: RegExp, returnFiltered: boolean = true) => {\n if (returnFiltered) {\n return Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n } else {\n return Object.entries(props)\n .filter(([key]) => !regexPattern.test(key))\n .reduce(\n (prevObj, currKeyValPair) => ({ ...prevObj, [currKeyValPair[0]]: currKeyValPair[1] }),\n {}\n );\n }\n};\n","import React, { ComponentPropsWithRef, useEffect } from \"react\";\nimport classes from \"./TabButton.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"button\"> {\n children?: string;\n selected?: boolean;\n focussed?: boolean;\n tabId?: string;\n tabPanelId?: string;\n onTabButtonClick?: () => void;\n}\n\nexport const TabButton = React.forwardRef<HTMLButtonElement, Props>(\n (\n {\n children,\n selected = false,\n focussed = false,\n tabId,\n tabPanelId,\n className,\n onTabButtonClick,\n ...rest\n }: Props,\n ref\n ) => {\n useEffect(() => {\n if (focussed && ref) {\n (ref as React.MutableRefObject<HTMLButtonElement>).current.focus();\n }\n }, [focussed]);\n\n const classNames = [classes[\"tabbutton\"]];\n\n selected && classNames.push(classes[\"selected\"]);\n focussed && !selected && classNames.push(classes[\"focussed\"]);\n className && classNames.push(className);\n\n return (\n <button\n {...rest}\n aria-selected={selected}\n key={tabId}\n className={classNames.join(\" \")}\n ref={ref}\n role=\"tab\"\n tabIndex={selected ? 0 : -1}\n type=\"button\"\n aria-controls={tabPanelId}\n id={tabId}\n onClick={onTabButtonClick}\n >\n <span aria-hidden=\"true\">{children}</span>\n {children}\n </button>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./TabPanel.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: React.ReactNode;\n tabId: string;\n tabPanelId: string;\n selected?: boolean;\n}\n\nexport const TabPanel = React.forwardRef<HTMLDivElement, Props>(\n ({ children, tabId, tabPanelId, selected = false, className, ...rest }: Props, ref) => (\n <div\n {...rest}\n ref={ref}\n aria-labelledby={tabId}\n className={`${classes[\"tabpanel\"]} ${selected ? classes[\"selected\"] : \"\"} ${className ?? \"\"}`}\n id={tabPanelId}\n role=\"tabpanel\"\n tabIndex={0}\n hidden={!selected || undefined}\n aria-hidden={!selected}\n >\n {children}\n </div>\n )\n);\n","import React, { useRef, MouseEventHandler, useState, ComponentPropsWithRef } from \"react\";\nimport { Popover } from \"../Popover/Popover\";\nimport classes from \"./TextEllipsis.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: string;\n popoverClassName?: string;\n}\n\nexport const TextEllipsis = React.forwardRef<HTMLDivElement, Props>(\n ({ children, popoverClassName, className, ...rest }: Props, ref) => {\n const [showPopover, setShowPopover] = useState(false);\n const textContainer = useRef<HTMLDivElement>(null);\n\n const ellipsisVisible = () => {\n if (\n textContainer.current &&\n textContainer.current.offsetWidth < textContainer.current.scrollWidth\n ) {\n return true;\n }\n return false;\n };\n\n const onMouseEnter: MouseEventHandler<HTMLDivElement> = () => {\n ellipsisVisible() && setShowPopover(true);\n };\n\n const onMouseLeave: MouseEventHandler<HTMLDivElement> = () => {\n ellipsisVisible() && setShowPopover(false);\n };\n\n return (\n <div\n {...rest}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n className={`${classes[\"text-ellipsis\"]} ${className ?? \"\"}`}\n ref={ref || textContainer}\n >\n {children}\n <Popover\n aria-hidden={true}\n data-hidden={!showPopover}\n show={showPopover}\n role=\"tooltip\"\n anchorEl={textContainer}\n className={`${classes.popover} ${popoverClassName ?? \"\"}`}\n >\n {children}\n </Popover>\n </div>\n );\n }\n);\n","import React, {\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n ReactElement,\n useState\n} from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport classes from \"./Tile.module.scss\";\nimport readyClasses from \"../readyclasses.module.scss\";\n\nimport { Props as ContextMenuProps } from \"../ContextMenu/ContextMenu\";\nimport { generateID } from \"../util/helper\";\nimport { Props as IconButtonProps } from \"../Button/IconButton\";\n\ninterface ImageProps extends ComponentPropsWithoutRef<\"img\"> {\n src: string;\n}\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n title: string;\n imageProps?: ImageProps;\n enabled?: boolean;\n loading?: boolean;\n tileAction?: ReactElement<ContextMenuProps> | ReactElement<IconButtonProps>;\n}\n\nexport const Tile = React.forwardRef<HTMLDivElement, Props>(\n ({ title, imageProps, enabled, className, loading, tileAction, ...rest }: Props, ref) => {\n const [tileDescriptionID] = useState(generateID(20));\n\n if (!title) {\n throw new Error(\"Please make sure to pass a title prop to your Tile component.\");\n }\n\n const statusMessage = () => {\n if (enabled) {\n return \"Status: enabled\";\n }\n\n return \"Status: disabled\";\n };\n\n return (\n <article\n {...rest}\n tabIndex={0}\n aria-labelledby={tileDescriptionID}\n ref={ref}\n className={`${classes[\"tile\"]} ${loading ? classes[\"loading\"] : \"\"}`}\n >\n <header style={{ justifyContent: enabled === undefined ? \"flex-end\" : \"space-between\" }}>\n {enabled === true && (\n <Icon\n color=\"var(--success)\"\n icon={Icons.Checkmark}\n className={`${classes[\"icon\"]} ${className ?? \"\"}`}\n />\n )}\n {enabled === false && (\n <Icon\n color=\"var(--greyed-out)\"\n icon={Icons.Forbidden}\n className={`${classes[\"icon\"]} ${className ?? \"\"}`}\n />\n )}\n {enabled !== undefined && (\n <span id={tileDescriptionID} className={readyClasses[\"sr-only\"]}>\n {`${title}. ${statusMessage()}`}\n </span>\n )}\n {tileAction ?? null}\n </header>\n <div className={classes[\"content\"]}>\n {imageProps && imageProps.src.length > 0 && (\n <figure className={classes[\"image\"]}>\n {!loading && <img {...imageProps} alt=\"\" />}\n </figure>\n )}\n {(!imageProps || imageProps.src.length === 0) && (\n <Icon className={classes[\"placeholder\"]} icon={Icons.Image} />\n )}\n <span className={classes[\"title\"]}>{title}</span>\n </div>\n </article>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport classes from \"./Tiles.module.scss\";\nimport { Tile } from \"./Tile\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: ReactNode;\n loading?: boolean;\n}\n\nexport const Tiles = React.forwardRef<HTMLDivElement, Props>(\n ({ children, className, loading = false, ...rest }: Props, ref) => {\n const renderChildren = () => {\n if (loading) {\n return [\n <Tile\n key=\"placeholder1\"\n title=\"placeholder\"\n imageProps={{ src: \"placeholder\" }}\n loading={true}\n />,\n <Tile\n key=\"placeholder2\"\n title=\"placeholder\"\n imageProps={{ src: \"placeholder\" }}\n loading={true}\n />,\n <Tile\n key=\"placeholder3\"\n title=\"placeholder\"\n imageProps={{ src: \"placeholder\" }}\n loading={true}\n />\n ];\n }\n\n return children;\n };\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${classes[\"tiles\"]} ${className ?? \"\"}`}\n aria-live=\"polite\"\n aria-busy={loading}\n >\n {renderChildren()}\n </div>\n );\n }\n);\n","import React, {\n ComponentPropsWithRef,\n ReactNode,\n useEffect,\n useLayoutEffect,\n useRef,\n useState\n} from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport classes from \"./Tooltip.module.scss\";\nimport { generateID } from \"../util/helper\";\nimport { Offset, Placement, usePosition } from \"../hooks/usePosition\";\nimport { createPortal } from \"react-dom\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n label: string | ReactNode;\n children: string;\n placement?: Placement;\n offset?: Offset;\n transformOrigin?: Placement;\n domRoot?: HTMLElement;\n}\n\ninterface DefaultPosition {\n placement: Placement;\n offset: Offset;\n transformOrigin: Placement;\n}\n\nconst defaultPosition: DefaultPosition = {\n placement: { horizontal: \"right\", vertical: \"center\" },\n offset: { left: 16, right: 0, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"center\" }\n};\n\nexport const Tooltip = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n className,\n placement = defaultPosition.placement,\n offset = defaultPosition.offset,\n transformOrigin = defaultPosition.transformOrigin,\n domRoot = document.body,\n label,\n ...rest\n }: Props,\n ref\n ) => {\n const [identifier] = useState(generateID());\n const [visible, setVisible] = useState(false);\n\n const relativeElement = useRef<HTMLDivElement>(null);\n const elementToBePositioned = useRef<HTMLDivElement>(null);\n\n const { top, bottom, right, left, calculatePosition } = usePosition({\n relativeElement: relativeElement,\n elementToBePositioned: elementToBePositioned,\n placement: placement,\n offset: offset,\n transformOrigin: transformOrigin\n });\n\n useEffect(() => {\n if (!visible) return;\n\n function escapePressHandler(event: KeyboardEvent) {\n if (event.key === \"Escape\") {\n setVisible(false);\n }\n }\n\n document.addEventListener(\"keyup\", escapePressHandler);\n\n return () => {\n document.removeEventListener(\"keyup\", escapePressHandler);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n calculatePosition();\n }, [visible]);\n\n const renderChildren = () => {\n if (React.isValidElement(label)) {\n return React.cloneElement(label, {\n onFocus: () => setVisible(true),\n onBlur: () => setVisible(false),\n \"aria-describedby\": identifier,\n tabIndex: 0,\n className: classes[\"label\"]\n });\n }\n\n return (\n <span\n className={classes[\"label\"]}\n tabIndex={0}\n onFocus={() => setVisible(true)}\n onBlur={() => setVisible(false)}\n aria-describedby={identifier}\n >\n {label}\n </span>\n );\n };\n\n return (\n <div {...rest} ref={ref} className={`${classes.wrapper} ${className ?? \"\"}`}>\n {renderChildren()}\n <div className={`${classes[\"tooltip-wrapper\"]}`}>\n <Icon\n ref={relativeElement}\n tag=\"div\"\n onMouseEnter={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n icon={Icons.InfoCircle}\n className={classes.icon}\n />\n {createPortal(\n <div\n ref={elementToBePositioned}\n style={{\n ...rest.style,\n top: top,\n left: left,\n right: right,\n bottom: bottom\n }}\n aria-hidden={!visible}\n id={identifier}\n className={`${classes.tooltip} ${visible ? classes.visible : \"\"}`}\n >\n {children}\n </div>,\n domRoot\n )}\n </div>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./Skeleton.module.scss\";\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"children\"> {\n variant?: \"circular\" | \"rectangle\" | \"text\";\n height?: number | string;\n width?: number | string;\n}\n\nexport const Skeleton = React.forwardRef<HTMLDivElement, Props>(\n ({ variant = \"text\", height, width, className, style, ...rest }: Props, ref) => {\n const classNames = [classes[\"skeleton\"]];\n !height && classNames.push(classes[\"no-height\"]);\n variant === \"text\" && classNames.push(classes[\"text\"]);\n variant === \"circular\" && classNames.push(classes[\"circular\"]);\n className && classNames.push(className);\n\n return (\n <span\n {...rest}\n aria-busy=\"true\"\n aria-hidden=\"true\"\n ref={ref}\n style={{ ...style, width, height }}\n className={classNames.join(\" \")}\n ></span>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport { Typography, Props as TypographyProps } from \"../Typography/Typography\";\nimport classes from \"./StatusIndicator.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactNode;\n status: \"active\" | \"error\" | \"neutral\" | \"warning\";\n badgeProps?: ComponentPropsWithRef<\"div\">;\n typographyProps?: TypographyProps;\n}\n\nexport const StatusIndicator = React.forwardRef<HTMLDivElement, Props>(\n ({ children, status, badgeProps, typographyProps, ...rest }: Props, ref) => {\n return (\n <div {...rest} className={classes[\"status-indicator\"]} ref={ref}>\n <div\n className={`${classes[\"status-badge\"]} ${classes[status]} ${badgeProps?.className ?? \"\"}`}\n />\n <Typography {...typographyProps} spacing={{ margin: \"0\" }} variant=\"body\" tag=\"div\">\n {typographyProps?.children || children}\n </Typography>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, Ref, useEffect, useRef, useState } from \"react\";\nimport classes from \"./Input.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { FormElement } from \"../form.interfaces\";\n\nconst dateTypes = [\"date\", \"time\", \"datetime-local\"] as const;\n\nexport type Type =\n | \"text\"\n | \"email\"\n | \"file\"\n | \"number\"\n | \"password\"\n | \"search\"\n | \"tel\"\n | \"url\"\n | \"hidden\"\n | typeof dateTypes[number];\n\nexport interface Props extends ComponentPropsWithRef<\"input\">, FormElement {\n wrapperProps?: ComponentPropsWithRef<\"div\">;\n labeledBy?: string;\n type: Type;\n suffix?: string;\n prefix?: string;\n}\n\nconst useErrorOffset = (\n suffix: React.RefObject<HTMLDivElement>,\n errorIcon: React.RefObject<HTMLDivElement>,\n inputWrapper: React.RefObject<HTMLDivElement>,\n error: boolean,\n type: Type,\n suffixContent: string = \"\"\n) => {\n const [errorOffset, setErrorOffset] = useState({});\n const [defaultErrorOffset, setDefaultErrorOffset] = useState<number | null>(null);\n\n const getErrorIconOffset = () => parseFloat(getComputedStyle(errorIcon.current!).right);\n const getInputPaddingRight = (input: HTMLDivElement) =>\n (dateTypes as ReadonlyArray<string>).includes(type)\n ? 0\n : parseFloat(getComputedStyle(input).paddingRight);\n\n useEffect(() => {\n if (errorIcon.current && inputWrapper.current) {\n let defaultOffset = defaultErrorOffset;\n if (!defaultOffset) {\n defaultOffset = getErrorIconOffset();\n setDefaultErrorOffset(defaultOffset);\n }\n\n if (suffix.current && suffixContent) {\n const inputPaddingRight = getInputPaddingRight(inputWrapper.current);\n const prefixDifference = suffix.current.offsetWidth + inputPaddingRight + defaultOffset;\n setErrorOffset({ right: `${prefixDifference}px` });\n } else {\n setErrorOffset({ right: `${defaultOffset}px` });\n }\n }\n }, [suffix.current, errorIcon.current, inputWrapper.current, error, type, suffixContent]);\n\n return { errorOffset };\n};\n\nexport const Input = React.forwardRef(\n (\n {\n error = false,\n className,\n name,\n style,\n wrapperProps,\n type,\n labeledBy,\n prefix,\n suffix,\n disabled,\n onFocus,\n onBlur,\n ...rest\n }: Props,\n ref: Ref<HTMLInputElement>\n ) => {\n const [focus, setFocus] = useState(false);\n const inputWrapperRef = useRef<HTMLDivElement>(null);\n const errorIconRef = useRef<HTMLDivElement>(null);\n const suffixRef = useRef<HTMLDivElement>(null);\n const { errorOffset } = useErrorOffset(\n suffixRef,\n errorIconRef,\n inputWrapperRef,\n error,\n type,\n suffix\n );\n\n useEffect(() => {\n if (name === undefined) {\n throw new Error(\"Please give your <Input /> component a 'name' attribute\");\n }\n }, []);\n\n const inputClassNames = [classes[\"input\"]];\n\n (dateTypes as ReadonlyArray<string>).includes(type) &&\n inputClassNames.push(classes[\"remove-extra-indent\"]);\n className && inputClassNames.push(className);\n\n const iconClassNames = [classes[\"warning\"]];\n (dateTypes as ReadonlyArray<string>).includes(type) &&\n iconClassNames.push(classes[\"extra-indent\"]);\n\n const wrapperClasses = [classes[\"input-wrapper\"]];\n const outlineClasses = [classes[\"outline\"]];\n\n wrapperProps?.className && wrapperClasses.push(wrapperProps.className);\n type === \"hidden\" && wrapperClasses.push(readyclasses[\"hidden\"]);\n prefix && wrapperClasses.push(classes[\"prefix\"]);\n suffix && wrapperClasses.push(classes[\"suffix\"]);\n disabled &&\n wrapperClasses.push(classes[\"disabled\"]) &&\n outlineClasses.push(classes[\"disabled\"]);\n error && wrapperClasses.push(classes[\"error\"]) && outlineClasses.push(classes[\"error\"]);\n focus && wrapperClasses.push(classes[\"focus\"]) && outlineClasses.push(classes[\"focus\"]);\n\n return (\n <div\n ref={inputWrapperRef}\n {...wrapperProps}\n style={{ ...style }}\n className={`${classes[\"input-wrapper\"]} ${wrapperClasses.join(\" \")}`}\n >\n {prefix && (\n <div data-prefix className={classes[\"prefix\"]}>\n <span>{prefix}</span>\n </div>\n )}\n <input\n {...rest}\n ref={ref}\n onFocus={event => {\n setFocus(true);\n onFocus && onFocus(event);\n }}\n onBlur={event => {\n setFocus(false);\n onBlur && onBlur(event);\n }}\n aria-labelledby={labeledBy}\n type={type}\n name={name}\n disabled={disabled}\n className={inputClassNames.join(\" \")}\n />\n {suffix && (\n <div ref={suffixRef} data-suffix className={classes[\"suffix\"]}>\n <span>{suffix}</span>\n </div>\n )}\n {error && (\n <Icon\n style={errorOffset}\n ref={errorIconRef}\n className={iconClassNames.join(\" \")}\n icon={Icons.Error}\n />\n )}\n <span className={outlineClasses.join(\" \")}></span>\n </div>\n );\n }\n);\n","import classes from \"./Select.module.scss\";\n\nimport React, {\n ComponentPropsWithRef,\n createRef,\n Fragment,\n ReactElement,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { Input, Props as InputProps } from \"../Input/Input\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { FormElement } from \"../form.interfaces\";\nimport { useBodyClick } from \"../../hooks/useBodyClick\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { filterProps } from \"../../util/helper\";\n\ntype PartialInputProps = Partial<InputProps>;\n\nexport interface Props extends ComponentPropsWithRef<\"select\">, FormElement {\n children: ReactElement[];\n name?: string;\n labeledBy?: string;\n describedBy?: string;\n placeholder?: string;\n searchPlaceholder?: string;\n searchInputProps?: PartialInputProps;\n selectButtonProps?: ComponentPropsWithRef<\"button\">;\n className?: string;\n value: string;\n clearLabel?: string;\n onChange?: (event: React.ChangeEvent<HTMLSelectElement>, child?: ReactElement) => void;\n onClear?: (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\ntype Position = {\n top: 0 | \"initial\";\n bottom: 0 | \"initial\";\n};\n\n/** Amount of items to be rendered before a search input is rendered */\nconst renderSearchCondition = 10;\n\nexport const Select = React.forwardRef<HTMLSelectElement, Props>(\n (\n {\n children,\n name,\n disabled = false,\n labeledBy,\n placeholder,\n describedBy,\n searchPlaceholder = \"Search item\",\n searchInputProps,\n selectButtonProps,\n className,\n error = false,\n value,\n clearLabel = \"Clear selection\",\n onChange,\n onClear,\n ...rest\n }: Props,\n ref\n ) => {\n const [expanded, setExpanded] = useState(false);\n const [opacity, setOpacity] = useState(0); // We set opacity because other wise if we calculate the max height you see the list full height for a split second and then it shortens.\n const [filter, setFilter] = useState(\"\");\n const [display, setDisplay] = useState(\"\");\n const [listPosition, setListPosition] = useState<Partial<Position>>({});\n const [optionsListMaxHeight, setOptionsListMaxHeight] = useState(\"none\");\n const containerReference = useRef<HTMLDivElement>(null);\n const optionListReference = useRef<HTMLDivElement>(null);\n const [isSearching, setIsSearching] = useState(false);\n const [focusedSelectItem, setFocusedSelectItem] = useState(-1);\n const [shouldClick, setShouldClick] =\n useState(\n false\n ); /** We need this, because whenever we use the arrow keys to select the select item, and we focus the currently selected item it fires the \"click\" listener in Option component. Instead, we only want this to fire if we press \"enter\" or \"spacebar\" so we set this to true whenever that is the case, and back to false when it has been executed. */\n const [childrenCount] = useState(React.Children.count(children));\n\n const nativeSelect = (ref as React.RefObject<HTMLSelectElement>) || createRef();\n const searchInputRef = useRef<HTMLInputElement>(null);\n\n const onArrowNavigation = (event: React.KeyboardEvent) => {\n const codesToPreventDefault = [\n \"ArrowDown\",\n \"ArrowUp\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Space\",\n \"Escape\",\n \"End\",\n \"Home\"\n ];\n\n const codesToPreventDefaultWhenSearching = [\"ArrowDown\", \"ArrowUp\", \"Enter\", \"Escape\"];\n\n /** If the select is expanded, we also want to control the Tab key */\n if (expanded) {\n codesToPreventDefault.push(\"Tab\");\n }\n\n /** We will handle the way certain key strokes affect the Select, unless we're searching */\n if (codesToPreventDefault.includes(event.code) && !isSearching) {\n event.preventDefault();\n }\n\n if (isSearching && codesToPreventDefaultWhenSearching.includes(event.code)) {\n event.preventDefault();\n }\n\n if (isSearching) {\n switch (event.code) {\n case \"ArrowDown\":\n case \"Enter\":\n setIsSearching(false);\n setFocusedSelectItem(0);\n return;\n case \"ArrowUp\":\n setIsSearching(false);\n setFocusedSelectItem(childrenCount - 1);\n return;\n case \"Escape\":\n case \"Tab\":\n setIsSearching(false);\n setExpanded(false);\n containerReference.current &&\n containerReference.current.querySelector(\"button\")!.focus();\n }\n } else {\n switch (event.code) {\n case \"ArrowDown\":\n if (!expanded) {\n setExpanded(true);\n return;\n }\n setFocusedSelectItem(prevState => {\n return prevState + 1 > childrenCount - 1 ? 0 : prevState + 1;\n });\n return;\n case \"ArrowUp\":\n setFocusedSelectItem(prevState => {\n return prevState - 1 < 0 ? childrenCount - 1 : prevState - 1;\n });\n return;\n case \"Space\":\n if (!expanded) {\n setExpanded(true);\n return;\n }\n\n setShouldClick(true);\n setExpanded(false);\n containerReference.current &&\n containerReference.current.querySelector(\"button\")!.focus();\n return;\n case \"Tab\":\n if (childrenCount >= renderSearchCondition && expanded) {\n setIsSearching(true);\n searchInputRef.current && searchInputRef.current.focus();\n return;\n }\n setExpanded(false);\n\n return;\n case \"Escape\":\n if (expanded) {\n setExpanded(false);\n containerReference.current &&\n containerReference.current.querySelector(\"button\")!.focus();\n }\n return;\n case \"End\":\n setFocusedSelectItem(childrenCount - 1);\n return;\n case \"Home\":\n setFocusedSelectItem(0);\n return;\n }\n }\n };\n\n const syncDisplayValue = (val: string) => {\n React.Children.forEach(children, child => {\n if (child.props.value === val) {\n setDisplay(child.props.children);\n }\n });\n };\n\n const rePositionList = () => {\n if (!expanded || !optionListReference.current || !containerReference.current) {\n return;\n }\n\n // Check whether there is more space above or below the select\n // Check space between the bottom of select and top of viewport\n const spaceOnTopOfSelect = containerReference.current.getBoundingClientRect().bottom;\n\n // Check space between the top of the select and bottom of viewport\n const spaceOnBottomOfSelect =\n window.innerHeight - containerReference.current.getBoundingClientRect().top;\n\n // Set position as if there's more space on the bottom\n let position: Position = { top: 0, bottom: \"initial\" };\n\n // Set the position of the select\n if (spaceOnTopOfSelect > spaceOnBottomOfSelect) {\n position = { top: \"initial\", bottom: 0 };\n }\n\n setListPosition(position);\n\n // Calculate the potential max height of the options list\n calculateOptionListMaxHeight(position);\n };\n\n const calculateOptionListMaxHeight = (position: Position) => {\n // Calculate max height if there's more space below the select\n const listHeight = optionListReference.current!.getBoundingClientRect().height;\n const transformOrigin = position.top !== \"initial\" ? \"top\" : \"bottom\";\n\n const availableSpace =\n transformOrigin === \"top\"\n ? window.innerHeight -\n containerReference.current!.getBoundingClientRect()[transformOrigin] -\n 16\n : containerReference.current!.getBoundingClientRect()[transformOrigin] - 16;\n\n if (availableSpace < listHeight) {\n setOptionsListMaxHeight(`${availableSpace}px`);\n setOpacity(100);\n return;\n }\n\n setOptionsListMaxHeight(\"none\");\n setOpacity(100);\n };\n\n const onOptionChangeHandler = (optionRef: React.RefObject<HTMLLIElement>) => {\n if (nativeSelect.current && optionRef.current) {\n nativeSelect.current.value = optionRef.current.getAttribute(\"data-value\")!;\n nativeSelect.current.dispatchEvent(new Event(\"change\", { bubbles: true }));\n }\n\n setExpanded(false);\n\n containerReference.current && containerReference.current.querySelector(\"button\")!.focus();\n };\n\n /**\n * @description We have to modify the children (Option component) to have a additional props that allows us to keep track of which one is selected and focused at all times and if a filter is active.\n * The `children` prop can be either a single object (1 child) or an array of multiple children.\n */\n const renderOptions = () => {\n if (isSearching || filter !== \"\") {\n const filteredChildren = React.Children.toArray(children).filter(\n child =>\n (child as ReactElement).props.children.toLowerCase().match(filter.toLowerCase()) !==\n null\n );\n\n return _internalRenderChildren(filteredChildren as ReactElement[]);\n }\n\n return _internalRenderChildren(children);\n\n function _internalRenderChildren(internalChildren: ReactElement[]) {\n return React.Children.map(internalChildren, (child, index) => {\n return React.cloneElement(child, {\n onFocusChange: (childIndex: number) => setFocusedSelectItem(childIndex),\n onOptionSelect: (optionRef: React.RefObject<HTMLLIElement>) => {\n onOptionChangeHandler(optionRef);\n setShouldClick(false);\n },\n isSelected: child.props.value === value,\n isSearching: isSearching,\n selectOpened: expanded,\n childIndex: index,\n hasFocus: focusedSelectItem === index,\n shouldClick: shouldClick\n });\n });\n }\n };\n\n const renderSearch = () => (\n <Input\n {...searchInputProps}\n autoFocus\n ref={searchInputRef}\n onFocus={() => setIsSearching(true)}\n onBlur={() => setIsSearching(false)}\n onChange={filterResults}\n className={classes[\"select-search\"]}\n wrapperProps={{\n className: `${classes[\"select-search-wrapper\"]} ${searchInputProps?.wrapperProps?.className}`\n }}\n type=\"text\"\n name=\"search-option\"\n placeholder={searchPlaceholder}\n />\n );\n\n const filterResults = (event: React.ChangeEvent<HTMLInputElement>) => {\n setFilter(event.currentTarget.value);\n };\n\n const statusIcon = () => {\n if (error) {\n return <Icon className={classes[\"warning\"]} icon={Icons.Warning} />;\n }\n\n if (value?.length !== 0 && onClear) {\n return (\n <div\n aria-hidden={false}\n role=\"button\"\n tabIndex={0}\n data-clear\n onClick={(e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n e.preventDefault();\n e.stopPropagation();\n onClear(e);\n }}\n onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.code === \"Enter\" || e.code === \"Space\") {\n e.preventDefault();\n e.stopPropagation();\n onClear(e);\n containerReference.current &&\n containerReference.current.querySelector(\"button\")!.focus();\n }\n }}\n >\n <span className={readyclasses[\"sr-only\"]}>{clearLabel}</span>\n <Icon tag=\"span\" icon={Icons.TimesThin} />\n </div>\n );\n }\n return null;\n };\n\n const nativeOnChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n onChange && onChange(event);\n };\n\n useEffect(() => {\n syncDisplayValue(value);\n }, [value]);\n\n useEffect(() => {\n rePositionList();\n }, [expanded]);\n\n useBodyClick(\n (event: MouseEvent) => !(event.target as Element).closest(\".custom-select\") && expanded,\n () => {\n setExpanded(false);\n setListPosition({ top: 0, bottom: \"initial\" });\n setOpacity(0);\n },\n expanded\n );\n\n const additionalClasses = [];\n expanded && additionalClasses.push(classes.expanded);\n error && additionalClasses.push(classes.error);\n disabled && additionalClasses.push(classes.disabled);\n className && additionalClasses.push(className);\n\n /** The native select is purely for external form libraries. We use it to emit an onChange with native select event object so they know exactly what's happening. */\n return (\n <Fragment>\n <select\n {...filterProps(rest, /^data-/, false)}\n tabIndex={-1}\n aria-hidden=\"true\"\n ref={nativeSelect}\n name={name}\n onChange={nativeOnChangeHandler}\n className={readyclasses[\"sr-only\"]}\n >\n <option value=\"\"></option>\n {React.Children.map(children, child => (\n <option value={child.props.value}></option>\n ))}\n </select>\n <div\n {...filterProps(rest, /^data-/)}\n ref={containerReference}\n onKeyDown={onArrowNavigation}\n className={`custom-select ${classes.select} ${additionalClasses.join(\" \")} ${\n className ?? \"\"\n }`}\n >\n <button\n {...selectButtonProps}\n onClick={() => {\n setExpanded(!expanded);\n }}\n type=\"button\"\n name={name}\n className={`${classes[\"custom-select\"]} ${additionalClasses.join(\" \")} `}\n disabled={disabled}\n aria-disabled={disabled}\n aria-invalid={error}\n aria-expanded={expanded}\n aria-haspopup=\"listbox\"\n aria-labelledby={labeledBy}\n aria-describedby={describedBy}\n >\n <div data-display className={classes[\"selected\"]}>\n {!value && placeholder && (\n <span className={classes[\"placeholder\"]}>{placeholder}</span>\n )}\n {value?.length > 0 && <span data-display-inner>{display}</span>}\n </div>\n <div className={classes[\"status\"]}>\n {statusIcon()}\n <Icon className={classes[\"triangle-down\"]} icon={Icons.TriangleDown} />\n </div>\n </button>\n <div\n ref={optionListReference}\n className={`list-wrapper ${classes[\"list-wrapper\"]}`}\n style={{\n display: expanded ? \"block\" : \"none\",\n opacity: opacity,\n maxHeight: optionsListMaxHeight,\n pointerEvents: expanded ? \"auto\" : \"none\",\n ...listPosition\n }}\n >\n {Array.isArray(children) && children.length > renderSearchCondition && renderSearch()}\n <ul role=\"listbox\">{renderOptions()}</ul>\n </div>\n </div>\n </Fragment>\n );\n }\n);\n","import React, { ComponentPropsWithRef, createRef, RefObject, useEffect } from \"react\";\nimport classes from \"./Select.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"li\"> {\n children: string;\n value: string;\n disabled?: boolean;\n isSelected?: boolean;\n selectOpened?: boolean;\n hasFocus?: boolean;\n shouldClick?: boolean;\n isSearching?: boolean;\n label?: string;\n childIndex?: number;\n onOptionSelect?: (ref: React.RefObject<HTMLLIElement>) => void;\n onFocusChange?: (childIndex: number) => void;\n}\n\nexport const Option = React.forwardRef<HTMLLIElement, Props>(\n (\n {\n children,\n className,\n isSelected = false,\n shouldClick,\n hasFocus,\n selectOpened,\n isSearching,\n childIndex,\n onOptionSelect,\n onFocusChange,\n disabled,\n value,\n ...rest\n }: Props,\n ref\n ) => {\n let innerOptionRef = (ref as RefObject<HTMLLIElement>) || createRef<HTMLLIElement>();\n\n useEffect(() => {\n if (isSelected && innerOptionRef.current && shouldClick) {\n innerOptionRef.current.click();\n }\n }, [isSelected, shouldClick]);\n\n useEffect(() => {\n if (innerOptionRef.current && hasFocus && selectOpened && !isSearching) {\n onFocusChange && childIndex && onFocusChange(childIndex);\n innerOptionRef.current.focus();\n }\n }, [hasFocus, innerOptionRef, selectOpened, isSearching]);\n\n const onSelectHandler = () => {\n if (onOptionSelect) onOptionSelect(innerOptionRef);\n };\n\n return (\n <li\n {...rest}\n ref={innerOptionRef}\n data-value={value}\n className={`${isSelected ? classes[\"selected-option\"] : \"\"} ${\n disabled ? classes.disabled : \"\"\n } ${className ?? \"\"}`}\n onClick={onSelectHandler}\n onKeyDownCapture={event => {\n if (event.code === \"Enter\") {\n event.stopPropagation();\n event.preventDefault();\n\n onSelectHandler();\n }\n }}\n aria-selected={isSelected}\n role=\"option\"\n tabIndex={disabled ? -1 : 0}\n >\n {children}\n </li>\n );\n }\n);\n","import React, { ComponentPropsWithRef, Fragment, useState } from \"react\";\nimport classes from \"./Pagination.module.scss\";\nimport readyclasses from \"../readyclasses.module.scss\";\nimport { IconButton } from \"../Button/IconButton\";\nimport { Icons, Icon } from \"../Icon/Icon\";\nimport { Input } from \"../Form/Input/Input\";\nimport { Select } from \"../Form/Select/Select\";\nimport { Option } from \"../Form/Select/Option\";\nimport { Label } from \"../Form/Label/Label\";\n\nexport type PaginationTranslations = {\n totalItems: string;\n itemsPerPage: string;\n itemsPerPageLabel: string;\n currentPage: string;\n currentPageLabel: string;\n};\n\nexport type PageChangeLabels = \"next\" | \"previous\" | \"first\" | \"last\";\n\nenum DefaultTranslations {\n totalItems = \"Total items\",\n itemsPerPage = \"Items per page\",\n currentPage = \"Page %1 of %2\",\n itemsPerPageLabel = \"Select how many items per page you want to see.\",\n currentPageLabel = \"What page you are currently on.\"\n}\n\nexport type PageSize = 10 | 25 | 50;\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"translate\"> {\n currentPage?: number;\n totalElements?: number;\n pageSize?: PageSize;\n translate?: PaginationTranslations;\n onPageChange: (pageToGoTo: number) => void;\n onPageSizeChange: (pageSize: PageSize) => void;\n}\n\nexport const Pagination = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n totalElements,\n pageSize = 10,\n translate = DefaultTranslations,\n currentPage,\n className,\n onPageChange,\n onPageSizeChange,\n ...rest\n }: Props,\n ref\n ) => {\n /** We use an internal state variable, because we don't want to fire onCurrentPageChange whenever onChange fires on the input. Rather, only when the Enter key is pressed. */\n const [internalCurrentPage, setInternalCurrentPage] = useState(currentPage?.toString() || \"1\");\n const calculateAmountOfPages = () => {\n if (!totalElements) return 1;\n\n if (Math.ceil(totalElements / pageSize) < 1) {\n return 1;\n }\n\n return Math.ceil(totalElements / pageSize);\n };\n\n const onEnterListener = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.code === \"Enter\") {\n onPageChange(Number(internalCurrentPage));\n }\n };\n\n const renderCurrentPageTranslation = () => {\n const amountOfPages = calculateAmountOfPages();\n\n if (amountOfPages) {\n const splitCurrentPageTranslation = translate.currentPage.split(\" \");\n\n return splitCurrentPageTranslation.map(string => {\n if (string.includes(\"%1\")) {\n return (\n <Fragment key={string}>\n <Label\n id=\"current-value-input-label\"\n htmlFor=\"current-value-input\"\n className={`${readyclasses[\"sr-only\"]} ${classes[\"current-value-input-label\"]}`}\n >\n {translate.currentPageLabel}\n </Label>\n <Input\n aria-labelledby=\"current-value-input-label\"\n key=\"input\"\n id=\"current-value-input\"\n type=\"text\"\n size={currentPage?.toString().length}\n max={calculateAmountOfPages()}\n wrapperProps={{ className: classes[\"current-value-input\"] }}\n onKeyUp={onEnterListener}\n onBlur={(event: React.ChangeEvent<HTMLInputElement>) =>\n onPageChange(Number(event.target.value))\n }\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setInternalCurrentPage(e.target.value)\n }\n name=\"current-value-input\"\n value={internalCurrentPage}\n className={`${classes[\"form-element\"]} ${classes[\"current-page-input\"]}`}\n />\n </Fragment>\n );\n }\n\n if (string.includes(\"%2\")) {\n return (\n <div key={string}>\n <strong>{string.replace(\"%2\", amountOfPages.toString())}</strong>&nbsp;\n </div>\n );\n }\n\n return <div key={string}>{string}&nbsp;</div>;\n });\n }\n\n return null;\n };\n\n const onPageSizeChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const pageSizeNumber = Number(event.target.value) as PageSize;\n onPageSizeChange(pageSizeNumber);\n };\n\n const onPageChangeHandler = (pageToGoTo: number) => {\n onPageChange(pageToGoTo);\n };\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${classes[\"pagination-wrapper\"]} ${className ? className : \"\"}`}\n >\n {totalElements && (\n <div className={classes[\"total\"]}>\n <span tabIndex={0}>\n {translate.totalItems}: <span>{totalElements}</span>\n </span>\n </div>\n )}\n <div className={classes[\"pagination\"]}>\n {pageSize && (\n <div className={classes[\"per-page\"]}>\n <Label id=\"page-size-select-label\">{translate.itemsPerPage}</Label>\n <Select\n labeledBy=\"page-size-select-label\"\n className={`${classes[\"form-element\"]} ${classes[\"page-size-select\"]}`}\n value={pageSize.toString()}\n onChange={onPageSizeChangeHandler}\n >\n <Option value=\"10\">10</Option>\n <Option value=\"25\">25</Option>\n <Option value=\"50\">50</Option>\n </Select>\n </div>\n )}\n <Fragment>\n {!!((currentPage && currentPage > 2) || (currentPage && currentPage > 1)) && (\n <div className={classes[\"previous\"]}>\n {currentPage > 2 && (\n <IconButton\n title=\"first\"\n onClick={() => onPageChangeHandler(0)}\n data-paginate=\"first\"\n >\n <Icon icon={Icons.NavigationFirst} />\n </IconButton>\n )}\n {currentPage > 1 && (\n <IconButton\n title=\"previous\"\n onClick={() => onPageChangeHandler(currentPage - 1)}\n data-paginate=\"previous\"\n >\n <Icon icon={Icons.ChevronLeft} />\n </IconButton>\n )}\n </div>\n )}\n {totalElements && !!calculateAmountOfPages() && (\n <div className={classes[\"page\"]}>{renderCurrentPageTranslation()}</div>\n )}\n <div className={classes[\"next\"]}>\n {!!(\n (currentPage !== undefined && currentPage < calculateAmountOfPages()!) ||\n (currentPage !== undefined && !totalElements)\n ) && (\n <IconButton\n title=\"next\"\n onClick={() => onPageChangeHandler(currentPage + 1)}\n data-paginate=\"next\"\n >\n <Icon icon={Icons.ChevronRight} />\n </IconButton>\n )}\n {!!(currentPage && totalElements && currentPage < calculateAmountOfPages()! - 1) && (\n <IconButton\n title=\"last\"\n onClick={() => onPageChangeHandler(totalElements / pageSize)}\n data-paginate=\"last\"\n >\n <Icon icon={Icons.NavigationLast} />\n </IconButton>\n )}\n </div>\n </Fragment>\n </div>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport classes from \"./Label.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"label\"> {\n children?: ReactNode;\n}\n\nexport const Label = React.forwardRef<HTMLLabelElement, Props>(\n ({ children, className, hidden = false, ...rest }: Props, ref) => {\n return (\n <label\n {...rest}\n ref={ref}\n className={`${hidden ? readyclasses[\"sr-only\"] : \"\"} ${classes[\"label\"]} ${\n className ?? \"\"\n }`}\n >\n {children}\n </label>\n );\n }\n);\n","export const labelId = (id: string) => `${id}-label`;\nexport const descriptionId = (id: string) => `${id}-description`;\n","import React, { ComponentPropsWithRef, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport classes from \"./BaseModal.module.scss\";\nimport { labelId, descriptionId } from \"./BaseModalContext\";\n\nconst SCROLL_PROPERTY_NAME = \"overflow\";\nconst SCROLL_PROPERTY_VALUE = \"hidden\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n children: React.ReactNode;\n open: boolean;\n onClose?: (event?: React.MouseEvent<HTMLElement>) => unknown;\n className?: string;\n containerProps?: ComponentPropsWithRef<\"div\">;\n backdropProps?: ComponentPropsWithRef<\"div\">;\n labelledby?: string;\n describedby?: string;\n disableEscapeKeyDown?: boolean;\n disableBackdrop?: boolean;\n forceContainerOpen?: boolean;\n zIndex?: number;\n domRoot?: HTMLElement;\n}\n\nexport const useSetBodyScroll = (open: boolean) => {\n const hideBodyScroll = () => {\n document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;\n };\n\n const showBodyScroll = () => {\n const allModalsClosed =\n document.querySelectorAll(\"[role=dialog][data-hidden=false]\").length === 0;\n if (allModalsClosed) {\n document.body.style.removeProperty(SCROLL_PROPERTY_NAME);\n }\n };\n\n useEffect(() => {\n if (open) {\n hideBodyScroll();\n } else {\n showBodyScroll();\n }\n }, [open]);\n};\n\nexport const BaseModal = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n id,\n children,\n open,\n onClose,\n className = \"\",\n containerProps,\n backdropProps,\n labelledby,\n describedby,\n disableEscapeKeyDown = false,\n disableBackdrop = false,\n forceContainerOpen = false,\n zIndex,\n domRoot = document.body,\n ...rest\n }: Props,\n ref\n ) => {\n useSetBodyScroll(open);\n\n const handleEscKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disableEscapeKeyDown && event.key === \"Escape\") {\n event.stopPropagation();\n onClose && onClose();\n }\n };\n\n const handleBackdropClick = () => !disableBackdrop && onClose && onClose();\n\n return createPortal(\n <div\n {...rest}\n ref={ref}\n id={id}\n className={`${classes[\"modal\"]} ${open ? classes[\"visible\"] : \"\"} ${className}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={labelledby || labelId(id)}\n aria-describedby={describedby || descriptionId(id)}\n aria-hidden={!open}\n tabIndex={-1}\n data-hidden={!open}\n onKeyDown={handleEscKeyPress}\n style={{ zIndex }}\n >\n <div\n {...backdropProps}\n className={`${classes[\"backdrop\"]} ${backdropProps?.className ?? \"\"}`}\n onClick={handleBackdropClick}\n ></div>\n {forceContainerOpen ? (\n <div\n {...containerProps}\n aria-hidden={!open}\n hidden={!open}\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {children}\n </div>\n ) : (\n open && (\n <div\n {...containerProps}\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {children}\n </div>\n )\n )}\n </div>,\n domRoot\n );\n }\n);\n","import React, { createContext } from \"react\";\nimport { SnackbarOptionsProps } from \"../interfaces\";\n\ninterface SnackbarContextProps {\n enqueueSnackbar: (title: string, content?: string, options?: SnackbarOptionsProps) => void;\n enqueueSuccessSnackbar: (title: string, content?: string, options?: SnackbarOptionsProps) => void;\n enqueueErrorSnackbar: (title: string, content?: string, options?: SnackbarOptionsProps) => void;\n}\n\nconst SnackbarContext = createContext<SnackbarContextProps>({\n enqueueSnackbar: () => null,\n enqueueSuccessSnackbar: () => null,\n enqueueErrorSnackbar: () => null\n});\n\ninterface Props {\n initialState: SnackbarContextProps;\n children?: React.ReactNode;\n}\n\nconst SnackbarContextProvider = ({ children, initialState }: Props) => {\n return <SnackbarContext.Provider value={initialState}>{children}</SnackbarContext.Provider>;\n};\n\nexport { SnackbarContextProvider, SnackbarContext, SnackbarContextProps };\n","import React, { ComponentPropsWithRef, createRef, useEffect } from \"react\";\nimport classes from \"./BaseModalContent.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id?: string;\n children: React.ReactNode;\n className?: string;\n disableAutoFocus?: boolean;\n}\n\nexport const BaseModalContent = React.forwardRef<HTMLDivElement, Props>(\n ({ id, children, className = \"\", disableAutoFocus = false, ...rest }: Props, ref) => {\n const contentRef = createRef<HTMLDivElement>();\n\n useEffect(() => {\n if (!disableAutoFocus && ref) {\n (ref as React.RefObject<HTMLDivElement>).current?.focus();\n } else if (!disableAutoFocus) {\n contentRef.current?.focus();\n }\n }, []);\n\n /**tabIndex is set to be able to do focus on that element which we need for catching keyDown events */\n return (\n <div\n {...rest}\n ref={ref || contentRef}\n id={id}\n className={`${classes[\"content\"]} ${className}`}\n tabIndex={-1}\n >\n {children}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./BaseModalActions.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"footer\"> {\n children?: React.ReactNode;\n}\n\nexport const BaseModalActions = React.forwardRef<HTMLElement, Props>(\n ({ children, className = \"\", ...rest }: Props, ref) => {\n return (\n <footer {...rest} ref={ref} className={`${classes[\"actions\"]} ${className}`}>\n {children}\n </footer>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport {\n BaseModalActions,\n Props as BaseModalActionsProps\n} from \"../../BaseModal/BaseModalActions/BaseModalActions\";\nimport classes from \"./DialogActions.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<any>, BaseModalActionsProps {\n align: \"left\" | \"right\";\n}\n\nexport const DialogActions = React.forwardRef<HTMLElement, Props>(\n ({ children, align, ...rest }: Props, ref) => {\n return (\n <BaseModalActions\n {...rest}\n ref={ref}\n className={`${classes[\"actions\"]}${align === \"left\" ? \" \" + classes[\"left\"] : \"\"}`}\n >\n {children}\n </BaseModalActions>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport classes from \"./DialogTitle.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n title: string;\n}\n\nexport const DialogTitle = React.forwardRef<HTMLDivElement, Props>(\n ({ id, title, ...rest }: Props, ref) => {\n return (\n <div {...rest} ref={ref} className={classes[\"header\"]}>\n <Typography id={id} className={classes[\"title\"]} tag=\"h1\" variant=\"h4\">\n {title}\n </Typography>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useState } from \"react\";\nimport { BaseModal } from \"../BaseModal/BaseModal\";\nimport { BaseModalContent } from \"../BaseModal/BaseModalContent/BaseModalContent\";\nimport { DialogActions } from \"./DialogActions/DialogActions\";\nimport classes from \"./Dialog.module.scss\";\nimport { DialogTitle } from \"./DialogTitle/DialogTitle\";\nimport { Button, Props as ButtonProps } from \"../../Button/Button\";\nimport { labelId, descriptionId } from \"../BaseModal/BaseModalContext\";\nimport { generateID } from \"../../util/helper\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id?: string;\n open: boolean;\n children: React.ReactNode;\n alignActions: \"left\" | \"right\";\n onClose: () => void;\n title: string;\n primaryAction: Action;\n secondaryAction?: Action;\n zIndex?: number;\n disableEscapeKeyDown?: boolean;\n}\n\nexport interface Action extends Omit<ButtonProps, \"variant\" | \"ref\"> {\n label: string;\n onClick: (event?: React.MouseEvent<HTMLButtonElement>) => unknown;\n}\n\nexport const Dialog = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n id,\n open,\n children,\n alignActions,\n onClose,\n title,\n primaryAction,\n secondaryAction,\n zIndex,\n disableEscapeKeyDown = true,\n ...rest\n }: Props,\n ref\n ) => {\n const [dialogId] = useState(id ?? generateID(20));\n const { label: primaryLabel, ...restOfPrimaryAction } = primaryAction;\n const PrimaryButton = (\n <Button key=\"primary\" {...restOfPrimaryAction}>\n {primaryLabel}\n </Button>\n );\n const TertiaryButton =\n secondaryAction &&\n (function () {\n const { label: secondaryLabel, ...restOfSecondaryAction } = secondaryAction;\n return (\n <Button key=\"tertiary\" variant=\"text\" {...restOfSecondaryAction}>\n {secondaryLabel}\n </Button>\n );\n })();\n\n const onHiddenInputKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n /** It has to be here because then we will need to check if user doesn't click tab to select action button and want to do another action then primary one? */\n if (event.key === \"Enter\") {\n primaryAction.onClick();\n }\n };\n\n return (\n <BaseModal\n {...rest}\n ref={ref}\n id={dialogId}\n className={classes[\"dialog\"]}\n containerProps={{ className: classes[\"container\"] }}\n open={open}\n disableBackdrop\n onClose={onClose}\n zIndex={zIndex}\n disableEscapeKeyDown={disableEscapeKeyDown}\n >\n <DialogTitle id={labelId(dialogId)} title={title} />\n <BaseModalContent\n id={descriptionId(dialogId)}\n className={classes[\"content\"]}\n disableAutoFocus\n >\n {children}\n </BaseModalContent>\n <DialogActions align={alignActions}>\n {alignActions === \"left\"\n ? [PrimaryButton, TertiaryButton]\n : [TertiaryButton, PrimaryButton]}\n </DialogActions>\n <input\n autoFocus\n aria-hidden={true}\n style={{\n position: \"absolute\",\n width: 0,\n height: 0,\n opacity: 0\n }}\n maxLength={0}\n tabIndex={-1}\n onKeyPress={onHiddenInputKeyPress}\n />\n </BaseModal>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./BaseModalHeader.module.scss\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Typography } from \"../../../Typography/Typography\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n title: string;\n children?: React.ReactNode;\n onClose: (event: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport const BaseModalHeader = React.forwardRef<HTMLDivElement, Props>(\n ({ id, title, children, onClose, ...rest }: Props, ref) => {\n return (\n <div {...rest} ref={ref} className={classes[\"header\"]}>\n <div className={classes[\"headline\"]}>\n <Typography id={id} className={classes[\"title\"]} tag=\"h1\" variant=\"h4\">\n {title}\n </Typography>\n <IconButton onClick={onClose} className={classes[\"closeBtn\"]} title=\"close modal\">\n <Icon icon={Icons.Times} />\n </IconButton>\n </div>\n {children}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { Dialog } from \"../../Dialog/Dialog\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport { DataAttributeKey } from \"../../../interfaces\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n open: boolean;\n discardChangesButtonLabel: string;\n keepEditingButtonLabel: string;\n contentLabel: string;\n titleLabel: string;\n [dataAttribute: DataAttributeKey]: any;\n onKeepEditing: () => void;\n onDiscardChanges: () => void;\n}\n\nexport const DiscardChangesDialog = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n open,\n onKeepEditing,\n onDiscardChanges,\n discardChangesButtonLabel,\n keepEditingButtonLabel,\n contentLabel,\n titleLabel,\n ...rest\n }: Props,\n ref\n ) => {\n return (\n <Dialog\n {...rest}\n ref={ref}\n open={open}\n alignActions=\"left\"\n title={titleLabel}\n onClose={onKeepEditing}\n primaryAction={{\n label: discardChangesButtonLabel,\n onClick: onDiscardChanges\n }}\n secondaryAction={{\n label: keepEditingButtonLabel,\n onClick: onKeepEditing\n }}\n disableEscapeKeyDown={false}\n >\n <Typography variant=\"body\" spacing={{ margin: 0 }}>\n {contentLabel}\n </Typography>\n </Dialog>\n );\n }\n);\n","import React, { TransitionEventHandler, useState, useRef } from \"react\";\nimport { Props as ModalProps, Modal } from \"../Modal/Modal\";\nimport classes from \"./SlideInModal.module.scss\";\n\nexport const SlideInModal = React.forwardRef<HTMLDivElement, ModalProps>(\n ({ children, id, open, ...rest }: ModalProps, ref) => {\n const [classHideOnTransition, setClassHideOnTransition] = useState<string>(\"hidden\");\n const containerRef = useRef(null);\n\n const onTransitionEnd: TransitionEventHandler<HTMLDivElement> = e => {\n if (e.target === containerRef.current) {\n setClassHideOnTransition(prev => (prev ? \"\" : \"hidden\"));\n }\n };\n\n return (\n <Modal\n {...rest}\n id={id}\n open={open}\n className={`${classes[\"slide-in-modal\"]} ${open ? classes[\"visible\"] : \"\"} ${\n !open ? classes[classHideOnTransition] : \"\"\n }`}\n containerProps={{ className: classes[\"container\"] }}\n backdropProps={{ className: classes[\"backdrop-slide\"] }}\n forceContainerOpen\n onTransitionEnd={onTransitionEnd}\n ref={ref || containerRef}\n >\n {children}\n </Modal>\n );\n }\n);\n\nexport { Props } from \"../Modal/Modal\";\n","import React from \"react\";\nimport classes from \"./SnackbarContainer.module.scss\";\n\nexport interface Placement {\n vertical: \"top\" | \"bottom\";\n horizontal: \"start\" | \"center\" | \"end\";\n}\n\nexport interface Props {\n placement: Placement;\n children?: React.ReactNode;\n zIndex?: number;\n className?: string;\n}\n\nexport const SnackbarContainer = ({ placement, children, zIndex, className, ...rest }: Props) => {\n return (\n <div\n {...rest}\n style={{ zIndex }}\n className={`${classes[\"snackbars\"]} ${classes[placement.horizontal]} ${\n classes[placement.vertical]\n } ${className ?? \"\"}`}\n >\n {children}\n </div>\n );\n};\n","import { useEffect, useRef, useState } from \"react\";\n\nexport const useAnimation = <RefElement extends HTMLElement>(callback: () => void) => {\n const animatedObjectRef = useRef<RefElement>(null);\n /** We need to store flag that says us when to call the callback */\n const [animationStarted, setAnimationStarted] = useState(false);\n\n const onAnimationEnd = () => animationStarted && callback();\n\n useEffect(() => {\n animatedObjectRef.current?.addEventListener(\"animationend\", onAnimationEnd);\n return () => animatedObjectRef.current?.removeEventListener(\"animationend\", onAnimationEnd);\n }, [animationStarted]);\n\n return {\n ref: animatedObjectRef,\n animationStarted,\n startAnimation: () => setAnimationStarted(true)\n };\n};\n","import React, { useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Variant, Actions } from \"../interfaces\";\nimport classes from \"./SnackbarItem.module.scss\";\nimport readyclasses from \"../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\n\nconst textColor = \"var(--snackbar-text-color)\";\n\nexport interface Props {\n id: string;\n title: string;\n duration: number;\n variant: Variant;\n onClose: (key: string) => void;\n closeButtonTitle: string;\n content?: string;\n actions?: Actions;\n}\n\nexport const SnackbarItem = ({\n id,\n title,\n duration,\n variant,\n content,\n actions = [],\n onClose,\n closeButtonTitle\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout>>();\n const onAnimationEnd = () => onClose(id);\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n\n useEffect(() => {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onMouseEnter = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onMouseLeave = () => {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.Error;\n }\n return variant === \"success\" ? Icons.CheckmarkCircleBreakout : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map((actionProp, index) => (\n <button\n key={index}\n {...actionProp}\n onClick={e => {\n onClose(id);\n actionProp.onClick && actionProp.onClick(e);\n }}\n children={actionProp.label}\n className={classes[\"action-button\"]}\n ></button>\n ));\n\n return (\n <div\n ref={ref}\n className={`${classes[\"snackbar\"]} ${classes[variant]} ${\n animationStarted ? readyclasses[\"slide-out\"] : readyclasses[\"slide-in\"]\n }`}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"container\"]}>\n <div className={classes[\"headline\"]}>\n <Typography className={classes[\"title\"]} variant=\"h4\" tag=\"span\">\n {title}\n </Typography>\n <IconButton\n id={classes[\"close-btn\"]}\n onClick={() => startAnimation()}\n title={closeButtonTitle}\n >\n <Icon icon={Icons.Times} color={textColor} />\n </IconButton>\n </div>\n {!!content && (\n <Typography className={classes[\"content\"]} variant=\"body\">\n {content}\n </Typography>\n )}\n {actionButtons.length > 0 && <div className={classes[\"actions\"]}>{actionButtons}</div>}\n </div>\n </div>\n );\n};\n","import { useEffect, useState } from \"react\";\nimport { generateID } from \"../util/helper\";\n\nexport interface ConfigObject {\n name: string | undefined;\n errorMessage?: string;\n error?: boolean;\n parentErrorId?: string;\n helperText?: string;\n parentHelperId?: string;\n}\n\nexport const useFormSelector = (configObject: ConfigObject) => {\n const [identifier] = useState(generateID(15, configObject.name));\n const [describedBy, setDescribedBy] = useState(\"\");\n const [errorId] = useState(generateID(15, configObject.errorMessage));\n\n useEffect(() => {\n if (configObject.error && configObject.parentErrorId) {\n setDescribedBy(configObject.parentErrorId);\n }\n\n if (\n (!configObject.error && configObject.helperText) ||\n (!configObject.parentErrorId && !configObject.errorMessage && configObject.helperText)\n ) {\n setDescribedBy(`${identifier}`);\n }\n\n if (\n (!configObject.error && !configObject.helperText && configObject.parentHelperId) ||\n (!configObject.parentErrorId && !configObject.errorMessage && configObject.parentHelperId)\n ) {\n setDescribedBy(`${configObject.parentHelperId}`);\n }\n\n if (configObject.errorMessage && !configObject.parentErrorId && configObject.error) {\n setDescribedBy(errorId);\n }\n }, [identifier, configObject.error, configObject.parentErrorId]);\n\n return {\n describedBy,\n errorId,\n identifier\n };\n};\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport classes from \"./FormHelperText.module.scss\";\nimport { Typography } from \"../../Typography/Typography\";\nimport { FormElement } from \"../form.interfaces\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormElement {\n children?: ReactNode;\n}\n\nexport const FormHelperText = React.forwardRef<HTMLDivElement, Props>(\n ({ children, error, className, ...rest }: Props, ref) => {\n return (\n <Typography\n {...rest}\n ref={ref}\n variant=\"sub-text\"\n tag=\"div\"\n className={`${classes[\"form-helper-text\"]} ${error ? classes.error : \"\"} ${\n className ?? \"\"\n }`}\n >\n {children}\n </Typography>\n );\n }\n);\n","import React, { ComponentPropsWithRef, createRef, ReactNode } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { KeyValuePair } from \"../../interfaces\";\nimport { FormSelector } from \"../form.interfaces\";\nimport { FormHelperText, Props as FormHelperTextProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./FormSelectorWrapper.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormSelector {\n children?: ReactNode;\n nestedChildren?: ReactNode;\n containerProps?: ComponentPropsWithRef<\"div\"> & KeyValuePair;\n helperProps?: FormHelperTextProps;\n disabled?: boolean;\n errorId?: string;\n identifier?: string;\n}\n\nexport const FormSelectorWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n className,\n nestedChildren,\n containerProps,\n helperProps,\n error,\n disabled,\n helperText,\n errorMessage,\n parentErrorId,\n errorId,\n identifier,\n ...rest\n }: Props,\n ref\n ) => {\n const helperRef = helperProps?.ref || createRef();\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${error ? classes[\"error\"] : \"\"} ${disabled ? classes[\"disabled\"] : \"\"} ${\n className ?? \"\"\n }`}\n >\n <div {...containerProps}>{children}</div>\n {(helperText || (helperProps && helperProps.children)) &&\n (!error || parentErrorId || !errorMessage) && (\n <FormHelperText\n {...helperProps}\n ref={helperRef}\n id={`${identifier}`}\n className={`${classes[\"helper-text\"]} ${helperProps?.className ?? \"\"} ${\n error ? classes[\"error\"] : \"\"\n }`}\n >\n {(helperProps && helperProps.children) || helperText}\n </FormHelperText>\n )}\n {errorMessage && !parentErrorId && error && (\n <span className={classes[\"error-message\"]}>\n <Icon className={classes[\"error-icon\"]} icon={Icons.Error} />\n <span id={errorId}>{errorMessage}</span>\n </span>\n )}\n {nestedChildren}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement, ReactNode, useEffect } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Props as FormHelperTextProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./Checkbox.module.scss\";\nimport { useFormSelector } from \"../../hooks/useFormSelector\";\nimport {\n FormSelectorWrapper,\n Props as FormSelectorWrapperProps\n} from \"../FormSelectorWrapper/FormSelectorWrapper\";\nimport { FormSelector } from \"../form.interfaces\";\n\nconst isToggle = (children: ReactNode) => (children as ReactElement)?.props?.[\"data-toggle\"];\n\nexport interface Props extends ComponentPropsWithRef<\"input\">, FormSelector {\n children: ReactNode;\n label?: string;\n indeterminate?: boolean;\n helperProps?: FormHelperTextProps;\n formSelectorWrapperProps?: FormSelectorWrapperProps;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const Checkbox = React.forwardRef<HTMLInputElement, Props>(\n (\n {\n children,\n name,\n helperText,\n helperProps,\n indeterminate,\n parentErrorId,\n errorMessage,\n disabled,\n label,\n parentHelperId,\n className,\n error,\n checked = false,\n formSelectorWrapperProps,\n onChange,\n ...rest\n }: Props,\n ref\n ) => {\n const { errorId, identifier, describedBy } = useFormSelector({\n name,\n helperText,\n parentErrorId,\n errorMessage,\n error,\n parentHelperId\n });\n\n useEffect(() => {\n if (!name) {\n throw new Error(\"Please pass a 'name' prop to your <Checkbox> component.\");\n }\n\n if (typeof children === \"object\" && !isToggle(children) && indeterminate === undefined) {\n throw new Error(\n \"If you have nested checkboxes you have to manage the indeterminate state by passing a boolean to the `indeterminate` prop.\"\n );\n }\n }, []);\n\n const determineLabel = () => {\n if (label) {\n return label;\n } else if (children === undefined) {\n throw new Error(\n \"Please make sure to pass either a string or more Checkbox components as a child of your Checkbox component.\"\n );\n }\n\n if (typeof children === \"string\") {\n return children;\n }\n\n throw new Error(\n \"If you pass Checkboxes as a child component (to create nested checkbox tree) you need to pass a label to the parent checkbox.\"\n );\n };\n\n const renderNestedCheckboxes = () => (\n <ul className={classes[\"checkbox-list\"]}>\n {React.Children.map(children as ReactElement[], child => {\n return (\n <li>\n <Checkbox\n {...child.props}\n parentHelperId={parentHelperId}\n parentErrorId={parentErrorId}\n error={error}\n disabled={child.props.disabled ? child.props.disabled : disabled}\n >\n {child.props.children}\n </Checkbox>\n </li>\n );\n })}\n </ul>\n );\n\n const onChangeHandler = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (disabled) {\n return;\n }\n onChange && onChange(event);\n };\n\n const renderToggle = () => React.Children.toArray(children).filter(isToggle);\n\n const iconClasses = [classes[\"input\"], disabled ? classes[\"disabled\"] : \"\"];\n\n /** Default return value is the default checkbox */\n return (\n <FormSelectorWrapper\n {...formSelectorWrapperProps}\n className={`${classes[\"checkbox-wrapper\"]} ${className ? className : \"\"}`}\n containerProps={{ className: classes[\"checkbox-container\"] }}\n helperText={helperText}\n helperProps={helperProps}\n parentErrorId={parentErrorId}\n errorId={errorId}\n errorMessage={errorMessage}\n error={error}\n disabled={disabled}\n identifier={identifier}\n nestedChildren={\n typeof children === \"object\" && !isToggle(children) && renderNestedCheckboxes()\n }\n >\n <input\n {...rest}\n ref={ref}\n disabled={disabled}\n className={`${classes[\"native-input\"]} ${error ? classes[\"error\"] : \"\"}`}\n checked={checked}\n onChange={onChangeHandler}\n aria-invalid={error as boolean}\n aria-checked={indeterminate ? \"mixed\" : checked}\n aria-describedby={describedBy}\n id={`${identifier}-checkbox`}\n name={name}\n type=\"checkbox\"\n />\n {renderToggle()}\n\n {indeterminate && <Icon className={iconClasses.join(\" \")} icon={Icons.MinusSquare} />}\n {checked && !indeterminate && (\n <Icon className={iconClasses.join(\" \")} icon={Icons.CheckmarkSquare} />\n )}\n {!checked && !indeterminate && (\n <Icon className={iconClasses.join(\" \")} icon={Icons.Square} />\n )}\n <label htmlFor={`${identifier}-checkbox`}>{determineLabel()}</label>\n </FormSelectorWrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Props as HelperProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./Radio.module.scss\";\nimport { useFormSelector } from \"../../hooks/useFormSelector\";\nimport { FormSelector } from \"../form.interfaces\";\nimport {\n FormSelectorWrapper,\n Props as FormSelectorWrapperProps\n} from \"../FormSelectorWrapper/FormSelectorWrapper\";\n\nexport interface Props extends ComponentPropsWithRef<\"input\">, FormSelector {\n children: string;\n value: string;\n formSelectorWrapperProps?: FormSelectorWrapperProps;\n helperProps?: HelperProps;\n}\n\nexport const Radio = React.forwardRef<HTMLInputElement, Props>(\n (\n {\n children,\n disabled,\n className,\n value,\n name,\n helperText,\n parentErrorId,\n parentHelperId,\n error,\n errorMessage,\n checked = false,\n formSelectorWrapperProps,\n helperProps,\n onChange,\n ...rest\n }: Props,\n ref\n ) => {\n const { errorId, identifier, describedBy } = useFormSelector({\n name,\n helperText,\n parentErrorId,\n errorMessage,\n error,\n parentHelperId\n });\n\n const onChangeHandler = (event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent) => {\n if (disabled) {\n return;\n }\n /** We have to clone the native event we got here and change the \"target\" property to the value. Otherwise, this regular event has \"on\" as it's event.target.value, which is useless. */\n const nativeEvent: any = event.nativeEvent || event;\n const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n\n Object.defineProperty(clonedEvent, \"target\", {\n writable: true,\n value: { value: value }\n });\n\n onChange && onChange(clonedEvent);\n };\n\n /** Default return value is the default radio */\n return (\n <FormSelectorWrapper\n {...formSelectorWrapperProps}\n className={`${classes[\"radio-wrapper\"]} ${className ?? \"\"}`}\n containerProps={{ className: classes[\"radio-container\"] }}\n helperText={helperText}\n helperProps={helperProps}\n parentErrorId={parentErrorId}\n errorId={errorId}\n errorMessage={errorMessage}\n error={error}\n disabled={disabled}\n identifier={identifier}\n >\n <input\n {...rest}\n ref={ref}\n disabled={disabled}\n tabIndex={0}\n className={`${classes[\"native-input\"]} ${error ? classes[\"error\"] : \"\"}`}\n onChange={onChangeHandler}\n checked={checked}\n aria-invalid={error ? true : false}\n aria-checked={checked}\n aria-describedby={describedBy}\n name={name}\n value={value}\n id={`${identifier}-radio`}\n type=\"radio\"\n />\n\n {checked && (\n <Icon\n className={`${classes[\"input\"]} ${disabled ? classes[\"disabled\"] : \"\"}`}\n icon={Icons.Radio}\n />\n )}\n {!checked && (\n <Icon\n className={`${classes[\"input\"]} ${disabled ? classes[\"disabled\"] : \"\"}`}\n icon={Icons.Circle}\n />\n )}\n\n <label onClick={onChangeHandler} htmlFor={`${identifier}-radio`}>\n {children}\n </label>\n </FormSelectorWrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useState } from \"react\";\nimport { Icon, Props as IconProps, Icons } from \"../../Icon/Icon\";\nimport classes from \"./Textarea.module.scss\";\nimport { FormElement } from \"../form.interfaces\";\n\ninterface IconPropsPartial extends Omit<Partial<IconProps>, \"ref\"> {}\n\nexport interface Props extends ComponentPropsWithRef<\"textarea\">, FormElement {\n wrapperProps?: ComponentPropsWithRef<\"div\">;\n errorProps?: IconPropsPartial;\n}\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, Props>(\n (\n {\n error = false,\n disabled = false,\n className,\n rows = 4,\n wrapperProps,\n errorProps,\n onFocus,\n onBlur,\n ...rest\n }: Props,\n ref\n ) => {\n const [focus, setFocus] = useState(false);\n\n const wrapperClasses = [classes[\"textarea-wrapper\"]];\n const outlineClasses = [classes[\"outline\"]];\n\n wrapperProps?.className && wrapperClasses.push(wrapperProps.className);\n disabled &&\n wrapperClasses.push(classes[\"disabled\"]) &&\n outlineClasses.push(classes[\"disabled\"]);\n error && wrapperClasses.push(classes[\"error\"]) && outlineClasses.push(classes[\"error\"]);\n focus && wrapperClasses.push(classes[\"focus\"]) && outlineClasses.push(classes[\"focus\"]);\n\n return (\n <div {...wrapperProps} className={wrapperClasses.join(\" \")}>\n <textarea\n {...rest}\n ref={ref}\n rows={rows}\n className={`${error ? classes[\"error\"] : \"\"} ${classes[\"textarea\"]} ${className ?? \"\"}`}\n disabled={disabled}\n onFocus={event => {\n setFocus(true);\n onFocus && onFocus(event);\n }}\n onBlur={event => {\n setFocus(false);\n onBlur && onBlur(event);\n }}\n />\n {error && (\n <Icon\n {...errorProps}\n className={`${classes[\"warning\"]} ${errorProps?.className ?? \"\"}`}\n icon={Icons.Error}\n />\n )}\n <span className={outlineClasses.join(\" \")}></span>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { Checkbox, Props as CheckboxProps } from \"../Checkbox/Checkbox\";\nimport classes from \"./Toggle.module.scss\";\n\nexport interface Props\n extends ComponentPropsWithRef<\"input\">,\n Omit<CheckboxProps, \"indeterminate\" | \"errorMessage\" | \"error\" | \"children\" | \"label\"> {\n children: string;\n}\n\nexport const Toggle = React.forwardRef<HTMLInputElement, Props>(\n ({ children, checked, disabled, helperProps, ...rest }: Props, ref) => (\n <div className={classes[\"toggle-wrapper\"]}>\n <Checkbox\n {...rest}\n ref={ref}\n checked={checked}\n className={classes[\"checkbox\"]}\n helperProps={{ className: classes[\"toggle-helper\"], ...helperProps }}\n disabled={disabled}\n label={children}\n >\n <span\n data-toggle\n aria-hidden=\"true\"\n className={`${classes[\"toggle\"]} ${checked ? classes[\"checked\"] : \"\"} ${\n disabled ? classes[\"disabled\"] : \"\"\n } `}\n ></span>\n </Checkbox>\n </div>\n )\n);\n","import React, { ComponentPropsWithRef, ReactElement } from \"react\";\nimport classes from \"./FormControl.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactElement | ReactElement[];\n grid?: 1 | 2 | 3;\n align?: \"top\" | \"start\" | \"middle\" | \"center\" | \"bottom\" | \"end\" | \"stretch\";\n error?: boolean;\n disabled?: boolean;\n}\n\nexport const FormControl = React.forwardRef<HTMLDivElement, Props>(\n ({ children, disabled, error, className, grid, align = \"center\", ...rest }: Props, ref) => {\n const renderChildren = () =>\n React.Children.map(children, child => {\n if (!child) {\n return null;\n }\n\n const childElement = React.cloneElement(child, {\n disabled: child.props.disabled !== undefined ? child.props.disabled : disabled,\n error: child.props.error !== undefined ? child.props.error : error\n });\n\n if (grid && grid > 1) {\n return (\n <div className={`${classes[\"col-\" + grid]} ${classes.column}`}>{childElement}</div>\n );\n }\n\n return childElement;\n });\n\n return (\n <div\n {...rest}\n ref={ref}\n data-formcontrol\n className={`${classes[\"form-control\"]} ${className ? className : \"\"} ${\n grid && grid > 1 ? `${classes.grid} ${classes[\"grid-\" + grid]}` : \"\"\n } ${classes[align]}`}\n >\n {renderChildren()}\n </div>\n );\n }\n);\n","/** The empty className property on FormHelperText is on purpose! We want to basically \"filter\" out the className from helperProps because we're adding this to the surrounding div. This makes it so also the errormessage receives this styling. */\n\nimport React, { ComponentPropsWithRef, ReactChild } from \"react\";\nimport classes from \"./FormGroup.module.scss\";\nimport { FormHelperText, Props as HelperProps } from \"../FormHelperText/FormHelperText\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: ReactChild[] | ReactChild;\n error?: boolean;\n errorMessageIcon?: Icons;\n errorMessageIconPosition?: \"before\" | \"after\";\n errorMessage?: string;\n errorId?: string;\n helperIndent?: number;\n helperText?: string;\n helperId?: string;\n helperProps?: HelperProps;\n disabled?: boolean;\n}\n\nexport const FormGroup = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n className,\n error,\n errorMessage,\n errorId,\n errorMessageIcon,\n errorMessageIconPosition = \"before\",\n helperText,\n helperId,\n helperProps,\n helperIndent,\n ...rest\n }: Props,\n ref\n ) => {\n return (\n <div\n {...rest}\n ref={ref}\n className={`${classes[\"form-group\"]} ${error ? classes.error : \"\"} ${className ?? \"\"}`}\n >\n {children}\n\n {(helperText || (errorMessage && error)) && (\n <div\n style={{ marginLeft: `${helperIndent}px` }}\n className={`${classes[\"default-helper\"]} ${\n helperProps?.className ? helperProps.className : \"\"\n }`}\n >\n {helperText && !error && (\n <FormHelperText {...helperProps} className={\"\"} id={helperId}>\n {(helperProps && helperProps.children) || helperText}\n </FormHelperText>\n )}\n {error && errorMessage && (\n <span className={classes[\"error-message\"]}>\n <span className={classes.message} id={errorId}>\n {errorMessageIcon && errorMessageIconPosition === \"before\" && (\n <Icon\n className={`${classes[\"error-icon\"]} ${classes[\"error-icon-before\"]}`}\n icon={errorMessageIcon}\n />\n )}\n {errorMessage}\n {errorMessageIcon && errorMessageIconPosition === \"after\" && (\n <Icon\n className={`${classes[\"error-icon\"]} ${classes[\"error-icon-after\"]}`}\n icon={errorMessageIcon}\n />\n )}\n </span>\n </span>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement } from \"react\";\nimport { FormGroup, Props as FormGroupProps } from \"../../FormGroup/FormGroup\";\nimport { Label, Props as LabelProps } from \"../../Label/Label\";\nimport classes from \"./Wrapper.module.scss\";\nimport { Props as HelperProps } from \"../../FormHelperText/FormHelperText\";\nimport { FormElement } from \"../../form.interfaces\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormGroupProps {\n children: ReactElement | ReactElement[];\n floatingLabelActive?: boolean;\n floatingLabel?: boolean;\n helperIndent?: number;\n label?: string;\n labelProps?: LabelProps;\n name: string;\n /** This does NOT add validation! It simply adds an asterix on the Label! */\n required?: boolean;\n innerClassName?: string;\n}\n\n/** For components that extend this component we create an interface (InputWrapper, SelectWrapper, etc.) */\nexport interface WrapperProps extends FormElement {\n errorMessage?: string;\n helperText?: string;\n helperProps?: HelperProps;\n label?: string;\n name: string;\n required?: boolean;\n disabled?: boolean;\n}\n\nexport const Wrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n className,\n error,\n errorMessage,\n errorId,\n errorMessageIcon,\n errorMessageIconPosition,\n helperText,\n helperId,\n floatingLabel = true,\n floatingLabelActive,\n required,\n helperProps,\n helperIndent,\n labelProps,\n label,\n disabled,\n name,\n innerClassName,\n ...rest\n }: Props,\n ref\n ) => {\n const renderChildren = () =>\n React.Children.map(children, child =>\n React.cloneElement(child, {\n disabled\n })\n );\n\n const labelClasses = [];\n\n floatingLabel && labelClasses.push(classes[\"floating-label\"]);\n floatingLabel && floatingLabelActive && labelClasses.push(classes[\"floating-label-active\"]);\n labelProps?.className && labelClasses.push(labelProps.className);\n required && labelClasses.push(classes[\"required\"]);\n error && labelClasses.push(classes[\"error\"]);\n\n return (\n <div {...rest} ref={ref} className={`${classes.wrapper} ${className ? className : \"\"}`}>\n <FormGroup\n error={error}\n errorMessage={errorMessage}\n errorId={errorId}\n errorMessageIcon={errorMessageIcon}\n errorMessageIconPosition={errorMessageIconPosition}\n helperText={helperText}\n helperId={helperId}\n helperProps={helperProps}\n helperIndent={helperIndent}\n >\n <div\n className={`${floatingLabel ? classes[\"floating-wrapper\"] : \"\"} ${\n innerClassName ? innerClassName : \"\"\n }`}\n >\n {label && (\n <Label\n {...labelProps}\n className={`${classes.label} ${labelClasses.join(\" \")}`}\n htmlFor={name}\n >\n {label}\n </Label>\n )}\n {renderChildren()}\n </div>\n </FormGroup>\n </div>\n );\n }\n);\n","import { useEffect, useState } from \"react\";\nimport { generateID } from \"../util/helper\";\nimport { Type as InputTypes } from \"../Form/Input/Input\";\n\nexport const useWrapper = (value?: string, placeholder?: string, type?: InputTypes) => {\n const [helperId] = useState(generateID(20));\n const [errorId] = useState(generateID(20));\n const [labelId] = useState(generateID(20));\n const [floatingLabelActive, setFloatingLabelActive] = useState(false);\n const [hasFocus, setHasFocus] = useState(false);\n\n useEffect(() => {\n if (\n (value?.length && value.length > 0) ||\n placeholder ||\n type === \"datetime-local\" ||\n type === \"time\" ||\n type === \"date\"\n ) {\n setFloatingLabelActive(true);\n }\n }, []);\n\n useEffect(() => {\n if ((value?.length && value.length > 0) || hasFocus) {\n setFloatingLabelActive(true);\n } else if (\n !placeholder &&\n !hasFocus &&\n type !== \"datetime-local\" &&\n type !== \"time\" &&\n type !== \"date\"\n ) {\n setFloatingLabelActive(false);\n }\n }, [value, placeholder, type, hasFocus]);\n\n return {\n helperId,\n errorId,\n labelId,\n floatingLabelActive,\n setFloatingLabelActive,\n hasFocus,\n setHasFocus\n };\n};\n","import React, { ComponentPropsWithRef, useEffect, useRef, useState } from \"react\";\nimport { Input, Type, Props as InputProps } from \"../../Input/Input\";\nimport classes from \"./InputWrapper.module.scss\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\n\ninterface PartialInputProps extends Partial<InputProps> {}\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, WrapperProps {\n label: string;\n type: Type;\n name: string;\n inputProps?: PartialInputProps;\n value: string;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n}\n\nconst useLabelOffset = (\n input: React.RefObject<HTMLInputElement>,\n floatingLabelActive: boolean,\n prefix?: string\n) => {\n const [labelOffset, setLabelOffset] = useState({});\n\n const resetLabelOffset = () => setLabelOffset({ left: undefined });\n\n useEffect(() => {\n if (input.current && prefix) {\n if (floatingLabelActive) {\n resetLabelOffset();\n } else {\n const spacingBetweenPrefixAndInput = 4;\n const prefixDifference =\n getComputedStyle(input.current).paddingLeft + spacingBetweenPrefixAndInput;\n setLabelOffset({ left: `${prefixDifference}px` });\n }\n }\n }, [input.current, prefix, floatingLabelActive]);\n\n return { labelOffset };\n};\n\nexport const InputWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n type,\n name,\n inputProps,\n helperText,\n helperProps,\n value,\n className,\n error,\n onChange,\n onBlur,\n onFocus,\n ...rest\n }: Props,\n ref\n ) => {\n const {\n errorId,\n floatingLabelActive,\n setFloatingLabelActive,\n hasFocus,\n setHasFocus,\n helperId,\n labelId\n } = useWrapper(value, inputProps?.placeholder, type);\n const { prefix, suffix } = inputProps || {};\n const input = useRef<HTMLInputElement>(null);\n const hasValueOrActiveFloatingLabel = !!value || floatingLabelActive;\n const labelClasses = [classes[\"input-label\"]];\n const { labelOffset } = useLabelOffset(\n (inputProps && (inputProps.ref as React.RefObject<HTMLInputElement>)) || input,\n floatingLabelActive,\n prefix\n );\n\n hasFocus && labelClasses.push(classes[\"focus\"]);\n\n return (\n <Wrapper\n {...rest}\n ref={ref}\n name={name}\n className={`${classes[\"input-wrapper\"]} ${className ?? \"\"}`}\n labelProps={{\n id: labelId,\n className: labelClasses.join(\" \"),\n style: { ...labelOffset }\n }}\n floatingLabelActive={floatingLabelActive}\n errorId={errorId}\n error={error}\n helperId={helperId}\n helperText={helperText}\n helperProps={{\n ...helperProps,\n className: `${classes[\"input-wrapper-helper\"]} ${helperProps?.className ?? \"\"} `\n }}\n helperIndent={20}\n >\n <Input\n {...inputProps}\n prefix={hasValueOrActiveFloatingLabel ? prefix : \"\"}\n suffix={hasValueOrActiveFloatingLabel ? suffix : \"\"}\n wrapperProps={{\n className: `${floatingLabelActive ? classes[\"floating-label-active\"] : \"\"} ${\n inputProps?.wrapperProps?.className ?? \"\"\n }`\n }}\n ref={(inputProps && inputProps.ref) || input}\n aria-labelledby={labelId}\n aria-describedby={error ? errorId : helperId}\n onChange={onChange}\n onFocus={e => {\n onFocus && onFocus(e);\n setHasFocus(true);\n setFloatingLabelActive(true);\n }}\n onBlur={e => {\n onBlur && onBlur(e);\n setHasFocus(false);\n e.target.value ||\n e.target.placeholder ||\n inputProps?.placeholder?.length ||\n type === \"datetime-local\" ||\n type === \"time\" ||\n type === \"date\"\n ? setFloatingLabelActive(true)\n : setFloatingLabelActive(false);\n }}\n className={`${floatingLabelActive ? classes[\"floating-label\"] : \"\"} ${\n inputProps?.className ?? \"\"\n }`}\n name={name}\n error={error}\n id={name}\n value={value}\n type={type}\n />\n </Wrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactChild, ReactElement } from \"react\";\nimport classes from \"./SelectWrapper.module.scss\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { Select, Props as SelectProps } from \"../../Select/Select\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\n\ninterface PartialSelectProps extends Partial<SelectProps> {}\n\nexport interface Props\n extends Omit<ComponentPropsWithRef<\"div\">, \"onChange\">,\n Omit<WrapperProps, \"onChange\" | \"error\"> {\n children: ReactChild | ReactChild[];\n placeholder?: string;\n value: string;\n error?: boolean;\n selectProps?: PartialSelectProps;\n onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;\n onClear?: (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const SelectWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n error,\n value,\n placeholder,\n selectProps,\n helperProps,\n onChange,\n onClear,\n ...rest\n }: Props,\n ref\n ) => {\n const { errorId, floatingLabelActive, helperId, labelId } = useWrapper(value, placeholder);\n\n return (\n <Wrapper\n {...rest}\n ref={ref}\n floatingLabelActive={floatingLabelActive}\n errorId={errorId}\n helperId={helperId}\n labelProps={{ id: labelId, className: classes[\"select-label\"] }}\n helperProps={{\n ...helperProps,\n className: `${classes[\"select-helper-text\"]} ${helperProps?.className ?? \"\"}`\n }}\n error={error}\n >\n <Select\n {...selectProps}\n value={value}\n labeledBy={labelId}\n error={error}\n describedBy={error ? errorId : helperId}\n onChange={onChange}\n onClear={e => {\n onClear && onClear(e);\n }}\n placeholder={placeholder}\n className={`${floatingLabelActive ? classes[\"floating-label-active\"] : \"\"} ${\n selectProps?.className ?? \"\"\n }`}\n >\n {children as ReactElement[]}\n </Select>\n </Wrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useState } from \"react\";\nimport classes from \"./TextareaWrapper.module.scss\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { Textarea, Props as TextareaProps } from \"../../Textarea/Textarea\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\n\nexport interface Props\n extends Omit<\n ComponentPropsWithRef<\"div\">,\n \"onFocus\" | \"onChange\" | \"onBlur\" | \"onMouseEnter\" | \"onMouseLeave\"\n >,\n Omit<WrapperProps, \"onFocus\" | \"onChange\" | \"onBlur\" | \"onMouseEnter\" | \"onMouseLeave\"> {\n placeholder?: string;\n textareaProps?: TextareaProps;\n value: string;\n onFocus?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;\n onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;\n onMouseEnter?: (event: React.MouseEvent<HTMLTextAreaElement>) => void;\n onMouseLeave?: (event: React.MouseEvent<HTMLTextAreaElement>) => void;\n}\n\nexport const TextareaWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n name,\n error,\n value,\n label,\n placeholder,\n textareaProps,\n helperProps,\n onChange,\n onFocus,\n onBlur,\n onMouseEnter,\n onMouseLeave,\n disabled,\n ...rest\n }: Props,\n ref\n ) => {\n const {\n errorId,\n floatingLabelActive,\n setFloatingLabelActive,\n hasFocus,\n setHasFocus,\n helperId,\n labelId\n } = useWrapper(value, placeholder);\n const [hover, setHover] = useState(false);\n\n const optionalClasses: string[] = [];\n\n hasFocus && optionalClasses.push(classes[\"focus\"]);\n hover && optionalClasses.push(classes[\"hover\"]);\n disabled && optionalClasses.push(classes[\"disabled\"]);\n error && optionalClasses.push(classes[\"error\"]);\n\n return (\n <Wrapper\n {...rest}\n ref={ref}\n disabled={disabled}\n labelProps={{\n id: labelId,\n className: `${classes[\"textarea-label\"]} ${optionalClasses.join(\" \")}`\n }}\n name={name}\n label={label}\n helperId={helperId}\n helperProps={{\n ...helperProps,\n className: classes[\"textarea-helper-text\"]\n }}\n error={error}\n floatingLabelActive={floatingLabelActive}\n errorId={errorId}\n >\n <Textarea\n {...textareaProps}\n error={error}\n aria-labelledby={label && labelId}\n aria-describedby={error ? errorId : helperId}\n placeholder={placeholder}\n name={name}\n id={name}\n value={value}\n onChange={onChange}\n onFocus={e => {\n onFocus && onFocus(e);\n setHasFocus(true);\n setFloatingLabelActive(true);\n }}\n onBlur={e => {\n onBlur && onBlur(e);\n setHasFocus(false);\n e.target.value || e.target.placeholder || textareaProps?.placeholder?.length\n ? setFloatingLabelActive(true)\n : setFloatingLabelActive(false);\n }}\n onMouseEnter={e => {\n onMouseEnter && onMouseEnter(e);\n setHover(true);\n }}\n onMouseLeave={e => {\n onMouseLeave && onMouseLeave(e);\n setHover(false);\n }}\n className={`${classes[\"textarea\"]} ${error ? classes[\"error\"] : \"\"}`}\n wrapperProps={{\n className: `${classes[\"textarea-wrapper\"]}} ${optionalClasses.join(\" \")}`\n }}\n errorProps={{ className: classes[\"error-icon\"] }}\n />\n </Wrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactNode, ReactElement } from \"react\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport classes from \"./Fieldset.module.scss\";\nimport { Typography, Variant } from \"../../Typography/Typography\";\nimport { Input } from \"../Input/Input\";\nimport { Select } from \"../Select/Select\";\nimport { Radio } from \"../Radio/Radio\";\nimport { Checkbox } from \"../Checkbox/Checkbox\";\nimport { Textarea } from \"../Textarea/Textarea\";\nimport { Toggle } from \"../Toggle/Toggle\";\nimport { Label } from \"../Label/Label\";\nimport { FormControl } from \"../FormControl/FormControl\";\nimport { FormSelectorWrapper } from \"../FormSelectorWrapper/FormSelectorWrapper\";\nimport { FormHelperText } from \"../FormHelperText/FormHelperText\";\nimport { InputWrapper } from \"../Wrapper/InputWrapper/InputWrapper\";\nimport { SelectWrapper } from \"../Wrapper/SelectWrapper/SelectWrapper\";\nimport { TextareaWrapper } from \"../Wrapper/TextareaWrapper/TextareaWrapper\";\n\nexport interface Props extends ComponentPropsWithRef<\"fieldset\"> {\n children?: ReactElement | ReactElement[];\n legend: string;\n legendStyle?: Variant;\n hideLegend?: boolean;\n background?: string;\n noPadding?: boolean;\n noBackground?: boolean;\n required?: boolean;\n error?: boolean;\n disablePropagation?: boolean;\n}\n\nexport const Fieldset = React.forwardRef<HTMLFieldSetElement, Props>(\n (\n {\n children,\n className,\n legend,\n legendStyle = \"body\",\n hideLegend = false,\n noBackground,\n background = noBackground ? \"\" : \"#FFF\",\n noPadding = false,\n disabled = false,\n required = false,\n error = false,\n disablePropagation = false,\n ...rest\n }: Props,\n ref\n ) => {\n const renderChildren = () => {\n if (!children) return;\n\n /* All right, so the issue is that whenever we try to add disabled and error to a component that doesn't accept it, \n React will throw an error. However, it might occur that we want a component inside of Fieldset because of aesthetic purposes \n (fieldset applies a sort of container with white background and if we want to display it inside of this container... then yea).\n So instead we supply an array of components that we want to add the disabled and error prop to and check if child.type equals one of these. */\n const allowedComponents: ReactNode[] = [\n Input,\n Select,\n Radio,\n Checkbox,\n Textarea,\n Toggle,\n Label,\n FormControl,\n FormSelectorWrapper,\n FormHelperText,\n InputWrapper,\n SelectWrapper,\n TextareaWrapper\n ];\n\n return React.Children.map(children, (child: ReactElement) => {\n if (allowedComponents.includes(child.type) && !disablePropagation) {\n return React.cloneElement(child, {\n disabled: child.props.disabled ?? disabled,\n error: child.props.error ?? error\n });\n }\n\n return child;\n });\n };\n\n return (\n <fieldset\n {...rest}\n ref={ref}\n disabled={disabled}\n style={{ backgroundColor: background, ...rest.style }}\n className={`${classes.fieldset} ${noPadding ? classes[\"no-padding\"] : \"\"} ${\n className ?? \"\"\n }`}\n >\n {legend && <legend className={readyclasses[\"sr-only\"]}>{legend}</legend>}\n {legend && !hideLegend && (\n <Typography\n variant={legendStyle}\n tag=\"span\"\n aria-hidden=\"true\"\n className={`${classes[\"legend\"]} ${required ? classes[\"required\"] : \"\"} ${\n error ? classes[\"error\"] : \"\"\n }`}\n >\n {legend}\n </Typography>\n )}\n {renderChildren()}\n </fieldset>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement, useEffect } from \"react\";\nimport classes from \"./RadioWrapper.module.scss\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\nimport { Icons } from \"../../../Icon/Icon\";\nimport { Fieldset, Props as FieldsetProps } from \"../../../Form/Fieldset/Fieldset\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, WrapperProps {\n children: ReactElement | ReactElement[];\n fieldsetProps: FieldsetProps;\n value: string;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const RadioWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n error,\n name,\n helperText,\n helperProps,\n fieldsetProps,\n value,\n onChange,\n disabled,\n ...rest\n }: Props,\n ref\n ) => {\n const { errorId, helperId } = useWrapper(value);\n\n useEffect(() => {\n if (fieldsetProps.legend === undefined) {\n console.error(\n `You should give your Fieldset component a legend prop so a legend element is rendered. This error was thrown in RadioWrapper. You can add this legend prop through the fieldsetProps prop by passing an object (fieldsetProps={{ legend: \"legend here\" }})`\n );\n }\n }, []);\n\n const renderChildren = () =>\n React.Children.map(children, child =>\n React.cloneElement(child, {\n parentErrorId: errorId,\n error: error,\n checked: child.props.value === value,\n name: name,\n parentHelperId: helperText ? helperId : false,\n onChange: onChange,\n disabled: child.props.disabled !== undefined ? child.props.disabled : disabled\n })\n );\n\n return (\n <Fieldset {...fieldsetProps} error={error} disabled={disabled}>\n <Wrapper\n {...rest}\n ref={ref}\n disabled={disabled}\n name={name}\n helperId={helperId}\n helperText={helperText}\n helperProps={{\n ...helperProps,\n className: `${classes[\"radio-wrapper-helper\"]} ${\n error ? classes[\"radio-wrapper-error\"] : \"\"\n } ${helperProps?.className ?? \"\"}`\n }}\n error={error}\n errorId={errorId}\n errorMessageIcon={Icons.Error}\n floatingLabel={false}\n >\n {renderChildren()}\n </Wrapper>\n </Fieldset>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement, useEffect } from \"react\";\nimport classes from \"./CheckboxWrapper.module.scss\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { Icons } from \"../../../Icon/Icon\";\nimport { Fieldset, Props as FieldsetProps } from \"../../../Form/Fieldset/Fieldset\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, WrapperProps {\n children: ReactElement[] | ReactElement;\n fieldsetProps: FieldsetProps;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const CheckboxWrapper = React.forwardRef<HTMLDivElement, Props>(\n ({ children, error = false, helperText, helperProps, fieldsetProps, ...rest }: Props, ref) => {\n const { errorId, helperId } = useWrapper();\n\n useEffect(() => {\n if (fieldsetProps.legend === undefined) {\n console.error(\n `You should give your Fieldset component a legend prop so a legend element is rendered. This error was thrown in CheckboxWrapper. You can add this legend prop through the fieldsetProps prop by passing an object (fieldsetProps={{ legend: \"legend here\" }})`\n );\n }\n }, []);\n\n const renderChildren = () =>\n React.Children.map(children, child =>\n React.cloneElement(child, {\n parentErrorId: errorId,\n error: error,\n parentHelperId: helperText ? helperId : false,\n disabled: rest.disabled\n })\n );\n\n return (\n <Fieldset {...fieldsetProps} error={error} required={rest.required}>\n <Wrapper\n {...rest}\n ref={ref}\n label=\"\"\n helperId={helperId}\n helperText={helperText}\n helperProps={{\n ...helperProps,\n className: `${classes[\"checkbox-wrapper-helper\"]} ${\n error ? classes[\"checkbox-wrapper-error\"] : \"\"\n } ${helperProps?.className ?? \"\"}`\n }}\n error={error}\n errorMessageIcon={Icons.Error}\n errorId={errorId}\n >\n {renderChildren()}\n </Wrapper>\n </Fieldset>\n );\n }\n);\n","import { Reducer } from \"react\";\nimport { Step } from \"./BaseWizardSteps/BaseWizardSteps\";\nimport { WizardMode } from \"./Wizard\";\n\ntype WizardStateType = {\n steps: Step[];\n currentStepNo: number;\n mode: WizardMode;\n stepScreenReaderLabel: string;\n};\n\ninterface SetWizardStateAction {\n type: \"SET_STATE\";\n payload: {\n steps: Step[];\n mode: WizardMode;\n stepScreenReaderLabel: string;\n };\n}\n\ninterface ChangeCurrentStepNoAction {\n type: \"CHANGE_CURRENT_STEP_NO\";\n payload: number;\n}\n\nconst setWizardState = (\n steps: Step[],\n mode: WizardMode,\n stepScreenReaderLabel: string\n): SetWizardStateAction => {\n return { type: \"SET_STATE\", payload: { steps, mode, stepScreenReaderLabel } };\n};\n\nconst changeCurrentStepNo = (currentStepNo: number): ChangeCurrentStepNoAction => {\n return { type: \"CHANGE_CURRENT_STEP_NO\", payload: currentStepNo };\n};\n\ntype WizardActions = SetWizardStateAction | ChangeCurrentStepNoAction;\n\nconst reducer: Reducer<WizardStateType, WizardActions> = (state, action) => {\n switch (action.type) {\n case \"SET_STATE\":\n return { ...state, ...action.payload };\n case \"CHANGE_CURRENT_STEP_NO\":\n return { ...state, currentStepNo: action.payload };\n default:\n return state;\n }\n};\n\nexport { setWizardState, changeCurrentStepNo, reducer, WizardActions, WizardStateType };\n","import React, { createContext, Dispatch, useReducer } from \"react\";\nimport { WizardActions, WizardStateType, reducer } from \"./wizardStateReducer\";\n\nconst WizardStateContext = createContext<{\n state: WizardStateType;\n dispatch: Dispatch<WizardActions>;\n}>({\n state: {} as WizardStateType,\n dispatch: () => null\n});\n\nexport interface Props {\n initialState: WizardStateType;\n children?: React.ReactNode;\n}\n\nconst WizardStateProvider = ({ children, initialState }: Props) => {\n const [state, dispatch] = useReducer(reducer, initialState);\n return (\n <WizardStateContext.Provider value={{ state, dispatch }}>\n {children}\n </WizardStateContext.Provider>\n );\n};\n\nexport { WizardStateProvider, WizardStateContext };\n","import React, { Fragment, useContext, useEffect } from \"react\";\nimport { Step } from \"./BaseWizardSteps/BaseWizardSteps\";\nimport { WizardStateContext, WizardStateProvider } from \"./WizardStateProvider\";\nimport { setWizardState } from \"./wizardStateReducer\";\n\nexport type WizardMode = \"add\" | \"edit\";\n\nexport interface Props {\n steps: Step[];\n mode: WizardMode;\n initialStepNo?: number;\n onStepChange: (stepNo: number) => void;\n stepScreenReaderLabel: string;\n children: React.ReactNode;\n}\n\nconst useSetWizardState = (steps: Step[], mode: WizardMode, stepScreenReaderLabel: string) => {\n const { dispatch } = useContext(WizardStateContext);\n\n useEffect(() => {\n dispatch(setWizardState(steps, mode, stepScreenReaderLabel));\n }, [steps, mode, stepScreenReaderLabel]);\n};\n\nconst useStepChanging = (onStepChange: (stepNo: number) => void) => {\n const {\n state: { currentStepNo }\n } = useContext(WizardStateContext);\n\n useEffect(() => {\n onStepChange(currentStepNo);\n }, [currentStepNo]);\n};\n\nconst WizardContent = ({ steps, mode, stepScreenReaderLabel, onStepChange, children }: Props) => {\n useSetWizardState(steps, mode, stepScreenReaderLabel);\n useStepChanging(onStepChange);\n\n return <Fragment>{children}</Fragment>;\n};\n\nexport const Wizard = (props: Props) => {\n const { steps, initialStepNo: currentStepNo = 0, mode, stepScreenReaderLabel } = props;\n return (\n <WizardStateProvider initialState={{ steps, currentStepNo, mode, stepScreenReaderLabel }}>\n <WizardContent {...props} />\n </WizardStateProvider>\n );\n};\n","import React, { ComponentPropsWithRef, Fragment } from \"react\";\nimport classes from \"./BaseWizardSteps.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\n\ntype StepState = \"finished\" | \"current\" | \"future\";\n\nexport interface Step {\n label: string;\n disabled?: boolean;\n}\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"onClick\"> {\n steps: Step[];\n currentStepNo: number;\n onClick?: (stepNo: number) => void;\n futureStepsClickable?: boolean;\n stepScreenReaderLabel: string;\n}\n\nexport const BaseWizardSteps = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n steps,\n currentStepNo,\n onClick,\n futureStepsClickable = false,\n stepScreenReaderLabel,\n ...rest\n }: Props,\n ref\n ) => {\n const getStepState = (stepNo: number): StepState => {\n if (currentStepNo === stepNo) {\n return \"current\";\n } else if (stepNo < currentStepNo) {\n return \"finished\";\n }\n return \"future\";\n };\n\n const getStepContent = (stepState: StepState, index: number, disabled?: boolean) => {\n const stepNumberString = String(index + 1);\n if (stepState === \"finished\") {\n return disabled ? null : <Icon className={classes[\"checkmark\"]} icon={Icons.Checkmark} />;\n } else {\n return (\n <Fragment>\n <span className={readyclasses[\"sr-only\"]}>{stepScreenReaderLabel} </span>\n {stepNumberString}\n </Fragment>\n );\n }\n };\n\n const generatedSteps = steps.map((step, index) => {\n const stepState = getStepState(index);\n const disabledStyleClassName = step.disabled ? classes[\"disabled\"] : \"\";\n const clickableClassName = futureStepsClickable ? classes[\"clickable\"] : \"\";\n\n return (\n <button\n key={step.label.toLowerCase().replace(/\\s/, \"-\")}\n disabled={\n step.disabled ||\n (stepState === \"future\" && !futureStepsClickable) ||\n stepState === \"current\"\n }\n aria-current={stepState === \"current\" ? \"step\" : undefined}\n onClick={() => onClick && onClick(index)}\n className={`${classes[\"wizard-element\"]} ${classes[stepState]} ${clickableClassName} ${disabledStyleClassName}`}\n >\n <div className={classes[\"number-wrapper\"]}>\n <span className={classes[\"number\"]}>\n {getStepContent(stepState, index, step.disabled)}\n </span>\n </div>\n <div className={classes[\"two-line-text-overflow\"]}>\n <span className={classes[\"label\"]}>{step.label}</span>\n </div>\n </button>\n );\n });\n\n return (\n <div {...rest} ref={ref} className={classes[\"wizard\"]}>\n {generatedSteps}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useContext } from \"react\";\nimport { WizardStateContext } from \"../WizardStateProvider\";\nimport { BaseWizardSteps } from \"../BaseWizardSteps/BaseWizardSteps\";\nimport { changeCurrentStepNo } from \"../wizardStateReducer\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n onStepClick: (currentStepNo: number, selectedStepNo: number) => boolean;\n}\n\nexport const WizardSteps = React.forwardRef<HTMLDivElement, Props>(\n ({ onStepClick, ...rest }: Props, ref) => {\n const {\n state: { currentStepNo, mode, stepScreenReaderLabel, steps },\n dispatch\n } = useContext(WizardStateContext);\n\n const onClick = (selectedStepNo: number) => {\n onStepClick(currentStepNo, selectedStepNo) && dispatch(changeCurrentStepNo(selectedStepNo));\n };\n\n return (\n <BaseWizardSteps\n {...rest}\n ref={ref}\n onClick={onClick}\n steps={steps}\n currentStepNo={currentStepNo}\n stepScreenReaderLabel={stepScreenReaderLabel}\n futureStepsClickable={mode === \"edit\"}\n />\n );\n }\n);\n","import React, { ComponentPropsWithRef, Fragment } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { ColumnName, Direction } from \"../datagrid.interfaces\";\nimport classes from \"./DataGridHeaderCell.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"th\"> {\n headline: string;\n name: ColumnName;\n disableSorting?: boolean;\n activeSortDirection?: Direction;\n onSort?: (name: ColumnName) => void;\n}\n\nconst ariaSortMapping = {\n ASC: \"ascending\",\n DESC: \"descending\"\n} as const;\n\nexport const DataGridHeaderCell = React.forwardRef<HTMLTableCellElement, Props>(\n ({ headline, name, disableSorting, activeSortDirection, onSort, ...rest }: Props, ref) => {\n const onCellClick = () => {\n onSort && onSort(name);\n };\n\n const sortingIndicator = () => {\n const getSortingIndicatorClasses = (direction: Direction) => {\n const sortingIndicatorClasses = [classes[\"indicator\"]];\n activeSortDirection &&\n sortingIndicatorClasses.push(\n activeSortDirection === direction ? classes[\"active\"] : classes[\"hidden\"]\n );\n return sortingIndicatorClasses;\n };\n\n return (\n <Fragment>\n <Icon className={getSortingIndicatorClasses(\"ASC\").join(\" \")} icon={Icons.TriangleUp} />\n <Icon\n className={getSortingIndicatorClasses(\"DESC\").join(\" \")}\n icon={Icons.TriangleDown}\n />\n </Fragment>\n );\n };\n\n const innerContent = (\n <Fragment>\n <span className={classes[\"headline\"]}>{headline}</span>\n {!disableSorting && (\n <div className={classes[\"sorting-indicator-container\"]}>{sortingIndicator()}</div>\n )}\n </Fragment>\n );\n\n return (\n <th\n {...rest}\n ref={ref}\n className={classes[\"header-cell\"]}\n aria-sort={activeSortDirection && ariaSortMapping[activeSortDirection]}\n >\n {disableSorting ? (\n <div key={name}>{innerContent}</div>\n ) : (\n <button key={name} onClick={onCellClick}>\n {innerContent}\n </button>\n )}\n </th>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useEffect, useState } from \"react\";\nimport { ColumnName, Direction, HeaderCell, OnSortFunction, Sort } from \"../datagrid.interfaces\";\nimport { DataGridHeaderCell } from \"./DataGridHeaderCell\";\nimport classes from \"./DataGridHeader.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"thead\"> {\n headers: HeaderCell[];\n initialSort?: Sort;\n onSort?: OnSortFunction;\n disableContextMenuColumn?: boolean;\n enableMultiSorting?: boolean;\n spacing?: React.CSSProperties;\n}\n\nconst sortingStates = [undefined, \"ASC\", \"DESC\"] as (Direction | undefined)[];\n\nexport const DataGridHeader = React.forwardRef<HTMLTableSectionElement, Props>(\n (\n {\n initialSort,\n onSort,\n headers,\n disableContextMenuColumn,\n enableMultiSorting,\n spacing,\n ...rest\n }: Props,\n ref\n ) => {\n const [sortList, setSortList] = useState(initialSort || []);\n\n useEffect(() => {\n setSortList(initialSort || []);\n }, [initialSort]);\n\n const calculateNextSortState = (direction?: Direction) => {\n const currentDirectionIdx = sortingStates.findIndex(item => item === direction);\n return sortingStates[currentDirectionIdx + (1 % sortingStates.length)];\n };\n\n /**\n * The sortList contains sorting columns objects. The order of those objects determinates priorities of sorting.\n * Last modified sorting column has the highest priority.\n */\n const updateSortList = (name: ColumnName): Sort => {\n const current = sortList.find(item => item.name === name);\n const restSortList = enableMultiSorting ? sortList.filter(item => item.name !== name) : [];\n const newSortDirection = calculateNextSortState(current?.direction);\n return newSortDirection\n ? [{ name, direction: newSortDirection }, ...restSortList]\n : restSortList;\n };\n\n const wrapOnSort = (name: ColumnName) => {\n const newSort = updateSortList(name);\n onSort && onSort(newSort);\n setSortList(newSort);\n };\n\n const headerCells = headers.map((header, index) => {\n if (header.hidden) {\n return null;\n }\n\n let headerStyle: React.CSSProperties = {};\n\n if (index === 0) {\n headerStyle.paddingLeft = spacing?.paddingLeft;\n }\n if (index === headers.length - 1 && disableContextMenuColumn) {\n headerStyle.paddingRight = spacing?.paddingRight;\n }\n\n const sort = sortList.find(item => item.name === header.name);\n return (\n <DataGridHeaderCell\n key={header.name}\n name={header.name}\n headline={header.headline}\n disableSorting={header.disableSorting || !onSort}\n onSort={wrapOnSort}\n activeSortDirection={sort?.direction}\n style={headerStyle}\n />\n );\n });\n\n return (\n <thead {...rest} ref={ref} className={classes[\"thead\"]}>\n <tr className={classes[\"row\"]}>\n {headerCells}\n {!disableContextMenuColumn && (\n <td\n style={{ paddingRight: spacing?.paddingRight }}\n aria-label=\"context menu\"\n className={classes[\"context-menu\"]}\n ></td>\n )}\n </tr>\n </thead>\n );\n }\n);\n","import React, { Fragment, useState } from \"react\";\nimport { IconButton } from \"../../Button/IconButton\";\nimport { Toggle } from \"../../Form/Toggle/Toggle\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Popover, Props as PopoverProps } from \"../../Popover/Popover\";\nimport { Typography } from \"../../Typography/Typography\";\nimport { generateID } from \"../../util/helper\";\nimport { ColumnName, HeaderCell } from \"../datagrid.interfaces\";\nimport classes from \"./DataGridColumnsToggle.module.scss\";\nimport { createPortal } from \"react-dom\";\n\nexport interface Props extends PopoverProps {\n open: boolean;\n headers: HeaderCell[];\n titleLabel?: string;\n closeButtonTitle?: string;\n onClose: () => void;\n onToggleClicked: (colName: ColumnName) => void;\n domRoot?: HTMLElement;\n}\n\nexport const DataGridColumnsToggle = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n open,\n headers,\n titleLabel = \"Show columns\",\n closeButtonTitle = \"Close show columns dialog\",\n onClose,\n onToggleClicked,\n className,\n domRoot = document.body,\n ...rest\n }: Props,\n ref\n ) => {\n const [id] = useState(generateID());\n const labelledId = id + \"_header\";\n\n const toggles = headers.map(item => (\n <Toggle\n key={item.name}\n name={item.name}\n checked={!item.hidden}\n onChange={() => onToggleClicked(item.name)}\n >\n {item.headline}\n </Toggle>\n ));\n\n const handleBackdropClick = () => onClose();\n\n return (\n <Popover\n {...rest}\n ref={ref}\n className={`${classes[\"popover\"]} ${className}`}\n show={open}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={labelledId}\n >\n {open &&\n createPortal(\n <div className={classes[\"backdrop\"]} onClick={handleBackdropClick}></div>,\n domRoot\n )}\n {open && (\n <Fragment>\n <div className={classes[\"header\"]}>\n <Typography id={labelledId} className={classes[\"title\"]} tag=\"span\" variant=\"h4\">\n {titleLabel}\n </Typography>\n <IconButton\n onClick={onClose}\n className={`${classes[\"close-btn\"]}`}\n title={closeButtonTitle}\n >\n <Icon icon={Icons.Times} />\n </IconButton>\n </div>\n <div className={classes[\"content\"]}>{toggles}</div>\n </Fragment>\n )}\n </Popover>\n );\n }\n);\n","import React, { ComponentPropsWithRef, Fragment, useRef, useState } from \"react\";\nimport { Button, Props as ButtonProps } from \"../../Button/Button\";\nimport { IconButton } from \"../../Button/IconButton\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { HeaderCell, ColumnName } from \"../datagrid.interfaces\";\nimport classes from \"./DataGridActions.module.scss\";\nimport { DataGridColumnsToggle } from \"./DataGridColumnsToggle\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n enableAddBtn?: boolean;\n enableColumnsBtn?: boolean;\n enableSearchBtn?: boolean;\n addBtnProps?: ButtonProps;\n columnsBtnProps?: ButtonProps;\n searchBtnProps?: ButtonProps;\n headers: HeaderCell[];\n onColumnToggled: (colName: ColumnName) => void;\n}\n\nexport const DataGridActions = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n className,\n enableAddBtn,\n enableColumnsBtn,\n enableSearchBtn,\n addBtnProps = {},\n columnsBtnProps = {},\n searchBtnProps = {},\n headers,\n onColumnToggled,\n ...rest\n }: Props,\n ref\n ) => {\n const isHidden = !(enableAddBtn || enableColumnsBtn || enableSearchBtn);\n const [showColsPopover, setShowColsPopover] = useState(false);\n const showColumnBtn = useRef<HTMLButtonElement>(null);\n\n return isHidden ? null : (\n <div {...rest} ref={ref} className={`${classes[\"actions\"]} ${className ?? \"\"}`}>\n <div className={classes[\"left-actions\"]}>\n {enableAddBtn && (\n <Button\n color=\"primary\"\n startIcon={<Icon icon={Icons.Plus} />}\n title=\"Add item\"\n type=\"button\"\n variant=\"outline\"\n children=\"Add item\"\n {...addBtnProps}\n />\n )}\n </div>\n <div className={classes[\"right-actions\"]}>\n {enableColumnsBtn && (\n <Fragment>\n <Button\n startIcon={<Icon icon={Icons.Change} />}\n title=\"Show/hide columns\"\n variant=\"text\"\n children=\"Columns\"\n {...columnsBtnProps}\n className={`${classes[\"desktop\"]} ${columnsBtnProps?.className ?? \"\"}`}\n ref={showColumnBtn}\n onClick={() => setShowColsPopover(true)}\n />\n <IconButton\n title=\"Show/hide columns\"\n {...columnsBtnProps}\n onClick={() => setShowColsPopover(true)}\n className={`${classes[\"mobile\"]} ${columnsBtnProps?.className ?? \"\"}`}\n >\n <Icon icon={Icons.Change} />\n </IconButton>\n <DataGridColumnsToggle\n aria-hidden={!showColsPopover}\n open={showColsPopover}\n headers={headers}\n onClose={() => setShowColsPopover(false)}\n onToggleClicked={onColumnToggled}\n anchorEl={showColumnBtn}\n />\n </Fragment>\n )}\n {enableSearchBtn && (\n <Fragment>\n <Button\n startIcon={<Icon icon={Icons.TableSearch} />}\n title=\"Search\"\n variant=\"text\"\n children=\"Search\"\n {...searchBtnProps}\n className={`${classes[\"desktop\"]} ${searchBtnProps?.className ?? \"\"}`}\n />\n <IconButton\n title=\"Search\"\n {...searchBtnProps}\n className={`${classes[\"mobile\"]} ${columnsBtnProps?.className ?? \"\"}`}\n >\n <Icon icon={Icons.TableSearch} />\n </IconButton>\n </Fragment>\n )}\n </div>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactChild } from \"react\";\nimport { Typography } from \"../../Typography/Typography\";\nimport classes from \"./DataGridCell.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"td\"> {\n children?: ReactChild;\n isLoading?: boolean;\n spacing?: React.CSSProperties;\n cellIndex?: number;\n columnLength?: number;\n disableContextMenuColumn?: boolean;\n}\n\nexport const DataGridCell = React.forwardRef<HTMLTableCellElement, Props>(\n (\n {\n children,\n className,\n isLoading,\n spacing,\n cellIndex,\n columnLength,\n disableContextMenuColumn,\n ...rest\n }: Props,\n ref\n ) => {\n let cellStyle: React.CSSProperties = {};\n\n if (cellIndex === 0) {\n cellStyle.paddingLeft = spacing?.paddingLeft;\n }\n if (\n (cellIndex === columnLength && !disableContextMenuColumn) ||\n (columnLength && cellIndex === columnLength - 1 && disableContextMenuColumn)\n ) {\n cellStyle.paddingRight = spacing?.paddingRight;\n }\n\n return (\n <td\n {...rest}\n ref={ref}\n style={{ ...rest.style, ...cellStyle }}\n className={`${classes[\"cell\"]} ${className ?? \"\"}`}\n >\n {isLoading && (\n <div className={classes[\"loading\"]} aria-busy=\"true\" aria-live=\"polite\"></div>\n )}\n {!isLoading && (\n <Typography variant=\"body\" tag=\"span\">\n {children}\n </Typography>\n )}\n </td>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { HeaderCell } from \"../datagrid.interfaces\";\nimport classes from \"./DataGridRow.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"tr\"> {\n headers?: HeaderCell[];\n isLoading?: boolean;\n spacing?: React.CSSProperties;\n disableContextMenuColumn?: boolean;\n}\n\nexport const DataGridRow = React.forwardRef<HTMLTableRowElement, Props>(\n (\n { children, className, headers, isLoading, spacing, disableContextMenuColumn, ...rest }: Props,\n ref\n ) => {\n const visibleCells = React.Children.map(children as React.ReactElement[], (child, index) => {\n if (child) {\n const cellWithSpacing = React.cloneElement(child, {\n spacing: spacing,\n cellIndex: index,\n columnLength: headers?.length,\n disableContextMenuColumn\n });\n\n const visible = headers && headers.length > index ? !headers[index].hidden : true;\n return visible && cellWithSpacing;\n }\n return null;\n });\n\n const classNames = [classes[\"row\"]];\n className && classNames.push(className);\n isLoading && classNames.push(classes[\"loading\"]);\n\n return (\n <tr {...rest} ref={ref} className={classNames.join(\" \")}>\n {visibleCells}\n </tr>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement, Ref } from \"react\";\nimport { HeaderCell } from \"../datagrid.interfaces\";\nimport { DataGridCell } from \"./DataGridCell\";\nimport { DataGridRow } from \"./DataGridRow\";\nimport classes from \"./DataGridBody.module.scss\";\nimport { Typography } from \"../../Typography/Typography\";\n\nexport interface Props<T> extends ComponentPropsWithRef<\"tbody\"> {\n children: ({ item, index }: { item: T; index: number }) => ReactElement;\n data?: T[];\n headers: HeaderCell[];\n isLoading?: boolean;\n disableContextMenuColumn?: boolean;\n emptyLabel?: string;\n spacing?: React.CSSProperties;\n}\n\nconst skeletonLoadingRows = 9;\n\nconst DataGridBodyInner = <T extends {}>(\n {\n children,\n data,\n headers,\n isLoading,\n disableContextMenuColumn,\n emptyLabel,\n spacing,\n ...rest\n }: Props<T>,\n ref: Ref<HTMLTableSectionElement>\n) => {\n const renderContent = () => {\n const visibleColumns = headers.filter(header => !header.hidden).length;\n if (isLoading) {\n return Array.from(Array(skeletonLoadingRows)).map((_, rowIdx) => (\n <DataGridRow key={rowIdx} isLoading>\n {Array.from(Array(visibleColumns)).map((__, colIdx) => (\n <DataGridCell key={colIdx} isLoading></DataGridCell>\n ))}\n {!disableContextMenuColumn && <DataGridCell></DataGridCell>}\n </DataGridRow>\n ));\n }\n\n const emptyData = !data || data.length === 0;\n if (emptyData) {\n return (\n <tr>\n <td\n className={classes[\"empty\"]}\n colSpan={visibleColumns + (disableContextMenuColumn ? 0 : 1)}\n >\n <Typography variant=\"body\" spacing={{ margin: 0 }}>\n {emptyLabel}\n </Typography>\n </td>\n </tr>\n );\n }\n\n return data?.map((item, index) => {\n return React.cloneElement(children({ item, index }), {\n headers,\n spacing,\n disableContextMenuColumn\n });\n });\n };\n\n return (\n <tbody {...rest} ref={ref}>\n {renderContent()}\n </tbody>\n );\n};\n\nexport const DataGridBody = React.forwardRef(DataGridBodyInner) as <T extends {}>(\n p: Props<T> & { ref?: Ref<HTMLTableSectionElement> }\n) => ReactElement;\n","import React, { ComponentPropsWithRef, ReactElement, Ref, useEffect, useState } from \"react\";\nimport { Props as ButtonProps } from \"../Button/Button\";\nimport classes from \"./DataGrid.module.scss\";\nimport { DataGridHeader } from \"./DataGridHeader/DataGridHeader\";\nimport { DataGridActions } from \"./DataGridActions/DataGridActions\";\nimport { DataGridBody } from \"./DataGridBody/DataGridBody\";\nimport { ColumnName, HeaderCell, OnSortFunction, Sort } from \"./datagrid.interfaces\";\nimport { Pagination, Props as PaginationProps } from \"../Pagination/Pagination\";\nimport { Spacing, useSpacing } from \"../hooks/useSpacing\";\n\nexport interface Props<T> extends Omit<ComponentPropsWithRef<\"div\">, \"children\"> {\n children: ({ item, index }: { item: T; index: number }) => ReactElement;\n data?: T[];\n initialSort?: Sort;\n onSort?: OnSortFunction;\n headers: HeaderCell[];\n actions?: {\n enableAddBtn?: boolean;\n enableColumnsBtn?: boolean;\n enableSearchBtn?: boolean;\n addBtnProps?: ButtonProps;\n columnsBtnProps?: ButtonProps;\n searchBtnProps?: ButtonProps;\n };\n emptyLabel?: string;\n paginationProps?: PaginationProps;\n disableContextMenuColumn?: boolean;\n isLoading?: boolean;\n enableMultiSorting?: boolean;\n spacing?: Spacing;\n}\n\nconst DataGridInner = <T extends {}>(\n {\n children,\n data,\n initialSort,\n onSort,\n headers,\n actions = {},\n paginationProps,\n disableContextMenuColumn,\n isLoading,\n enableMultiSorting,\n emptyLabel,\n spacing,\n style,\n ...rest\n }: Props<T>,\n ref: Ref<HTMLDivElement>\n) => {\n if (!headers) {\n throw new Error(\"Headers definition has to be provided\");\n }\n if (!children) {\n throw new Error(\"DataGridBody should be provieded with a template how to render rows\");\n }\n\n const [internalHeaders, setInternalHeaders] = useState(headers);\n const styleWithSpacing = useSpacing(spacing, style);\n\n useEffect(() => setInternalHeaders(headers), [headers]);\n\n const onColumnToggled = (colName: ColumnName) => {\n setInternalHeaders(\n internalHeaders.map(item =>\n item.name !== colName ? item : { ...item, hidden: !item.hidden }\n )\n );\n };\n\n if (styleWithSpacing?.padding) {\n const splitPaddings = styleWithSpacing.padding.toString().split(\" \");\n\n let paddingLeftIndex: number = 0;\n\n if (splitPaddings.length >= 2) {\n paddingLeftIndex = 1;\n }\n if (splitPaddings.length === 4) {\n paddingLeftIndex = 3;\n }\n\n Object.defineProperties(styleWithSpacing, {\n paddingTop: {\n value: splitPaddings[0]\n },\n paddingRight: {\n value: splitPaddings[splitPaddings.length - 1 > 0 ? 1 : 0]\n },\n paddingBottom: {\n value: splitPaddings[splitPaddings.length / 3 >= 1 ? 2 : 0]\n },\n paddingLeft: {\n value: splitPaddings[paddingLeftIndex]\n }\n });\n }\n\n return (\n <div\n {...rest}\n className={classes[\"grid-wrapper\"]}\n ref={ref}\n style={{\n paddingTop: styleWithSpacing?.paddingTop,\n paddingBottom: styleWithSpacing?.paddingBottom\n }}\n >\n <DataGridActions\n {...actions}\n style={{\n paddingLeft: styleWithSpacing?.paddingLeft,\n paddingRight: styleWithSpacing?.paddingRight\n }}\n headers={internalHeaders}\n onColumnToggled={onColumnToggled}\n />\n <div className={classes[\"table-wrapper\"]}>\n <table className={classes[\"table\"]}>\n <DataGridHeader\n headers={internalHeaders}\n initialSort={initialSort}\n onSort={onSort}\n disableContextMenuColumn={disableContextMenuColumn}\n enableMultiSorting={enableMultiSorting}\n spacing={styleWithSpacing}\n />\n <DataGridBody\n children={children}\n data={data}\n headers={internalHeaders}\n isLoading={isLoading}\n disableContextMenuColumn={disableContextMenuColumn}\n emptyLabel={emptyLabel}\n spacing={styleWithSpacing}\n />\n </table>\n </div>\n {paginationProps && !isLoading && (\n <Pagination\n {...paginationProps}\n style={{\n ...paginationProps.style,\n paddingLeft: styleWithSpacing?.paddingLeft,\n paddingRight: styleWithSpacing?.paddingRight\n }}\n className={`${classes[\"pagination\"]} ${paginationProps.className ?? \"\"}`}\n />\n )}\n </div>\n );\n};\n\nexport const DataGrid = React.forwardRef(DataGridInner) as <T extends {}>(\n p: Props<T> & { ref?: Ref<HTMLDivElement> }\n) => ReactElement;\n","import React, { Fragment, useState } from \"react\";\nimport { Modal, Props as ModalProps } from \"../Modal/Modal\";\nimport { ModalHeader, Props as ModalHeaderProps } from \"../Modal/ModalHeader/ModalHeader\";\nimport {\n DiscardChangesDialog,\n Props as DiscardChangesDialogProps\n} from \"./DiscardChangesDialog/DiscardChangesDialog\";\n\nexport interface Props extends Omit<ModalProps, \"onClose\"> {\n hasUnsavedChanges: () => boolean;\n onClose: (event?: React.MouseEvent<HTMLElement>) => unknown;\n headerProps: Omit<ModalHeaderProps, \"onClose\" | \"id\">;\n discardChangedDialogProps: Omit<\n DiscardChangesDialogProps,\n \"open\" | \"onKeepEditing\" | \"onDiscardChanges\"\n >;\n modalRef?: React.RefObject<HTMLDivElement>;\n dialogRef?: React.RefObject<HTMLDivElement>;\n}\n\nexport const DiscardChangesModal = ({\n id,\n children,\n headerProps,\n discardChangedDialogProps,\n modalRef,\n dialogRef,\n onClose,\n hasUnsavedChanges,\n ...rest\n}: Props) => {\n const [openDiscardChangesDialog, setOpenDiscardChangesDialog] = useState(false);\n\n const onCloseWrapper = () =>\n hasUnsavedChanges() ? setOpenDiscardChangesDialog(true) : onClose();\n\n const onDialogKeepEditing = () => {\n setOpenDiscardChangesDialog(false);\n };\n\n const onDialogDiscardChanges = () => {\n setOpenDiscardChangesDialog(false);\n onClose();\n };\n\n return (\n <Fragment>\n <Modal id={id} ref={modalRef} onClose={onCloseWrapper} {...rest}>\n <ModalHeader {...headerProps} id={`${id}-label`} onClose={onCloseWrapper} />\n {children}\n </Modal>\n <DiscardChangesDialog\n {...discardChangedDialogProps}\n ref={dialogRef}\n open={openDiscardChangesDialog}\n onKeepEditing={onDialogKeepEditing}\n onDiscardChanges={onDialogDiscardChanges}\n />\n </Fragment>\n );\n};\n","import React, { HTMLProps, ReactNode } from \"react\";\nimport classes from \"./Form.module.scss\";\n\nexport interface Props extends HTMLProps<HTMLFormElement> {\n children?: ReactNode;\n}\n\nexport const Form = ({ children, className, ...rest }: Props) => {\n return (\n <form className={`${classes.form} ${className ?? \"\"}`} {...rest}>\n {children}\n </form>\n );\n};\n","import React, { ReactNode, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { SnackbarContextProvider } from \"./SnackbarStateProvider\";\nimport { Actions, SnackbarOptionsProps, Variant } from \"../interfaces\";\nimport { Placement, SnackbarContainer } from \"../SnackbarContainer/SnackbarContainer\";\nimport { generateID } from \"../../../util/helper\";\nimport { SnackbarItem } from \"../SnackbarItem/SnackbarItem\";\n\n/** Short msg is when only title is provided. Long one when content or/and actions are provided (or type is error). */\ninterface Duration {\n long: number;\n short: number;\n}\n\nexport interface Props {\n closeButtonTitle: string;\n children?: ReactNode;\n placement?: Placement;\n stackSize?: number;\n domRoot?: HTMLElement;\n autoHideDuration?: Duration;\n className?: string;\n}\n\ninterface Item {\n id: string;\n title: string;\n duration: number;\n variant: Variant;\n content?: string;\n actions?: Actions;\n}\n\nexport const SnackbarProvider = (\n {\n closeButtonTitle,\n placement = { vertical: \"bottom\", horizontal: \"center\" },\n autoHideDuration = { long: 8000, short: 4000 },\n stackSize = 3,\n domRoot = document.body,\n children,\n className\n }: Props = { closeButtonTitle: \"\" }\n) => {\n const [snackbars, setSnackbars] = useState<Item[]>([]);\n\n const addSnackbar = (item: Item) => {\n setSnackbars(items => [...items, item]);\n };\n\n const getDuration = (variant: Variant, actions?: Actions, content?: string) => {\n const hasError = variant === \"error\";\n const hasContentOrActions = content || actions;\n if (hasError || hasContentOrActions) {\n return autoHideDuration.long;\n }\n return autoHideDuration.short;\n };\n\n const enqueueSnackbar = (\n title: string,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const {\n variant = \"info\",\n actions,\n duration = getDuration(variant, actions, content)\n } = options;\n const item: Item = {\n title,\n content,\n variant,\n actions,\n duration,\n id: generateID(15, title)\n };\n addSnackbar(item);\n };\n\n const enqueueSuccessSnackbar = (\n title: string,\n content?: string,\n options?: SnackbarOptionsProps\n ): void => {\n enqueueSnackbar(title, content, { ...options, variant: \"success\" });\n };\n\n const enqueueErrorSnackbar = (\n title: string,\n content?: string,\n options?: SnackbarOptionsProps\n ): void => {\n enqueueSnackbar(title, content, { ...options, variant: \"error\" });\n };\n\n const onItemClosed = (id: string) => {\n setSnackbars(items => [...items].filter(item => item.id !== id));\n };\n\n const snackbarList = snackbars.map((item, index) =>\n index < stackSize ? (\n <SnackbarItem\n {...item}\n key={item.id}\n onClose={onItemClosed}\n closeButtonTitle={closeButtonTitle}\n />\n ) : null\n );\n\n const snackbarPortal = createPortal(\n <SnackbarContainer placement={placement} className={className}>\n {snackbarList}\n </SnackbarContainer>,\n domRoot\n );\n\n return (\n <SnackbarContextProvider\n initialState={{ enqueueSnackbar, enqueueSuccessSnackbar, enqueueErrorSnackbar }}\n >\n {children}\n {snackbarPortal}\n </SnackbarContextProvider>\n );\n};\n","import React from \"react\";\n\nexport interface Props {\n title: string;\n children?: React.ReactNode;\n selected?: boolean;\n focussed?: boolean;\n buttonRef?: React.RefObject<HTMLButtonElement>;\n panelRef?: React.RefObject<HTMLDivElement>;\n onTabButtonClick?: () => void;\n}\n\nexport const Tab = (args: Props) => {\n return (\n <div {...args}>{`A <Tab /> component should only be used inside the <Tabs /> component.`}</div>\n );\n};\n","import React, {\n ComponentPropsWithRef,\n createRef,\n MutableRefObject,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { generateID } from \"../util/helper\";\nimport { Props as TabProps } from \"./Tab\";\nimport { TabButton } from \"./TabButton\";\nimport { TabPanel } from \"./TabPanel\";\nimport classes from \"./Tabs.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: React.ReactElement<TabProps> | React.ReactElement<TabProps>[];\n selected?: number;\n \"aria-label\"?: string;\n onTabChange?: (index: number) => void;\n}\n\nexport const Tabs = ({\n children,\n selected = 0,\n \"aria-label\": ariaLabel,\n onTabChange,\n className,\n ...rest\n}: Props) => {\n const indicatorRef = useRef<HTMLDivElement>(null);\n const [indicatorPosition, setIndicatorPosition] = useState({ left: 0, top: 0 });\n const [indicatorWidth, setIndicatorWidth] = useState(0);\n\n const [max] = useState(React.Children.count(children) - 1);\n const min = 0;\n\n const [selectedTab, setSelectedTab] = useState(Math.min(max, Math.max(min, selected)));\n const [focussedTab, setFocussedTab] = useState(-1);\n const [tabIds] = useState([...Array(max)].map(() => generateID()));\n const [tabPanelIds] = useState([...Array(max)].map(() => generateID()));\n\n useEffect(() => {\n setSelectedTab(Math.min(max, Math.max(min, selected)));\n setFocussedTab(-1);\n }, [selected]);\n\n useEffect(() => {\n calculateIndicatorPosition();\n }, [selectedTab]);\n\n const calculateIndicatorPosition = () => {\n const selectedTabButton = (\n tabButtons[selectedTab].ref as MutableRefObject<HTMLButtonElement | null>\n ).current as HTMLButtonElement;\n\n setIndicatorPosition({\n left: selectedTabButton.offsetLeft,\n top:\n selectedTabButton.offsetTop +\n selectedTabButton.offsetHeight -\n indicatorRef.current!.offsetHeight\n });\n setIndicatorWidth(selectedTabButton.offsetWidth);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n // do not show focus unless we came here before\n let currentFocussedTab = focussedTab === -1 ? selectedTab : focussedTab;\n\n switch (e.code) {\n case \"ArrowLeft\":\n setFocussedTab(currentFocussedTab === min ? max : currentFocussedTab - 1);\n break;\n case \"ArrowRight\":\n setFocussedTab(currentFocussedTab === max ? min : currentFocussedTab + 1);\n break;\n case \"Home\":\n setFocussedTab(min);\n break;\n case \"End\":\n setFocussedTab(max);\n break;\n case \"Space\":\n case \"Enter\":\n activateTab(currentFocussedTab);\n break;\n }\n };\n\n const handleBlur = () => {\n setFocussedTab(selectedTab);\n };\n\n const activateTab = (index: number) => {\n setSelectedTab(index);\n setFocussedTab(index);\n onTabChange && onTabChange(index);\n };\n\n const tabButtons = React.Children.map(children, (child, index) =>\n React.createElement(TabButton, {\n ref: child.props.buttonRef || createRef<HTMLButtonElement>(),\n key: generateID(),\n tabId: tabIds[index],\n tabPanelId: tabPanelIds[index],\n selected: selectedTab === index,\n focussed: focussedTab === index,\n onTabButtonClick: () => activateTab(index),\n children: child.props.title\n })\n );\n\n const tabPanels = React.Children.map(children, (child, index) =>\n React.createElement(TabPanel, {\n ref: child.props.panelRef || createRef<HTMLDivElement>(),\n key: generateID(),\n selected: selectedTab === index,\n tabId: tabIds[index],\n tabPanelId: tabPanelIds[index],\n children: child.props.children\n })\n );\n\n return (\n <div {...rest} className={`${classes[\"tabs\"]} ${className ?? \"\"}`}>\n <div\n role=\"tablist\"\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n aria-label={ariaLabel}\n className={classes[\"tablist\"]}\n >\n <div className={classes[\"tabdivider\"]} />\n {tabButtons}\n <div\n className={classes[\"indicator\"]}\n ref={indicatorRef}\n aria-hidden=\"true\"\n tabIndex={-1}\n style={{\n width: indicatorWidth,\n ...indicatorPosition\n }}\n />\n </div>\n <div className={classes[\"tabpanels\"]}>{tabPanels}</div>\n </div>\n );\n};\n","import React, { Fragment, useContext, useMemo } from \"react\";\nimport { Button } from \"../../Button/Button\";\nimport { Step } from \"../BaseWizardSteps/BaseWizardSteps\";\nimport { WizardMode } from \"../Wizard\";\nimport { WizardStateContext } from \"../WizardStateProvider\";\nimport { changeCurrentStepNo } from \"../wizardStateReducer\";\n\nexport interface Props extends React.HTMLProps<HTMLDivElement> {\n cancelButtonLabel: string;\n previousButtonLabel: string;\n nextButtonLabel: string;\n saveAndCloseButtonLabel: string;\n onCancel: () => void;\n onNext: (currentStepNo: number) => boolean;\n onPrevious?: () => void;\n onSaveAndClose: (currentStepNo: number) => void;\n}\n\nconst calculateNextStepNo = (steps: Step[], currentStepNo: number) => () =>\n steps.findIndex((step, stepNo) => stepNo > currentStepNo && !step.disabled);\n\nconst calculatePrevStepNo = (steps: Step[], currentStepNo: number) => () => {\n const reversedCurrentStepNo = steps.length - 1 - currentStepNo;\n const reversedPrevStepNo = [...steps]\n .reverse()\n .findIndex((step, stepNo) => stepNo > reversedCurrentStepNo && !step.disabled);\n if (reversedPrevStepNo > 0) {\n return steps.length - 1 - reversedPrevStepNo;\n }\n return -1;\n};\n\nconst useNextStepNo = (mode: WizardMode, currentStepNo: number, steps: Step[]) =>\n useMemo(calculateNextStepNo(steps, currentStepNo), [mode, currentStepNo, steps]);\n\nconst usePreviousStepNo = (mode: WizardMode, currentStepNo: number, steps: Step[]) =>\n useMemo(calculatePrevStepNo(steps, currentStepNo), [mode, currentStepNo, steps]);\n\nexport const WizardActions = ({\n onCancel,\n onNext,\n onPrevious,\n onSaveAndClose,\n cancelButtonLabel,\n previousButtonLabel,\n nextButtonLabel,\n saveAndCloseButtonLabel\n}: Props) => {\n const {\n state: { mode, steps, currentStepNo },\n dispatch\n } = useContext(WizardStateContext);\n const nextStepNo = useNextStepNo(mode, currentStepNo, steps);\n const hasNextStep = nextStepNo !== -1;\n const previousStepNo = usePreviousStepNo(mode, currentStepNo, steps);\n const hasPreviousStep = previousStepNo !== -1;\n const isLastStepOrEditMode = !hasNextStep || mode === \"edit\";\n\n const changeStepNo = (direction: \"forward\" | \"backward\") => {\n if (direction === \"forward\") {\n hasNextStep && dispatch(changeCurrentStepNo(nextStepNo));\n } else {\n hasPreviousStep && dispatch(changeCurrentStepNo(previousStepNo));\n }\n };\n\n const onNextWrapper = () => {\n onNext(currentStepNo) && changeStepNo(\"forward\");\n };\n\n const onPreviousWrapper = () => {\n onPrevious && onPrevious();\n changeStepNo(\"backward\");\n };\n\n const onSaveAndCloseWrapper = () => {\n onSaveAndClose(currentStepNo);\n };\n\n return (\n <Fragment>\n <Button variant=\"text\" onClick={onCancel}>\n {cancelButtonLabel}\n </Button>\n {hasPreviousStep && (\n <Button variant=\"outline\" onClick={onPreviousWrapper}>\n {previousButtonLabel}\n </Button>\n )}\n {hasNextStep && (\n <Button variant={mode === \"edit\" ? \"outline\" : \"fill\"} onClick={onNextWrapper}>\n {nextButtonLabel}\n </Button>\n )}\n {isLastStepOrEditMode && (\n <Button onClick={onSaveAndCloseWrapper}>{saveAndCloseButtonLabel}</Button>\n )}\n </Fragment>\n );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { generateID } from \"../util/helper\";\n\ninterface Arguments {\n componentToRepeat: React.ReactElement;\n}\n\nexport const useRepeater = <T>({ componentToRepeat }: Arguments) => {\n const [repeatedComponents, setRepeatedComponents] = useState<JSX.Element[]>([]);\n\n useEffect(() => {\n repeat();\n }, []);\n\n const repeat = () => {\n const clonedComponent = React.cloneElement(componentToRepeat, { key: generateID(20) });\n\n setRepeatedComponents(prevState => [...prevState, clonedComponent]);\n };\n\n const remove = (componentToRemove: React.ReactElement<T>) => {\n const newRepeatedComponents = repeatedComponents.filter(\n component => component !== componentToRemove\n );\n\n setRepeatedComponents(newRepeatedComponents);\n };\n\n return {\n repeatedComponents,\n repeat,\n remove\n };\n};\n","import { useContext } from \"react\";\nimport { SnackbarContext } from \"./SnackbarProvider/SnackbarStateProvider\";\n\nexport const useSnackbar = () => useContext(SnackbarContext);\n"],"names":["BaseStyling","e","t","n","r","document","a","s","prepend","d","singleTag","i","container","querySelector","getElementsByTagName","u","indexOf","push","c","charCodeAt","substring","styleSheet","cssText","appendChild","createTextNode","createElement","setAttribute","attributes","Object","keys","length","insertAdjacentElement","BaseButton","React","forwardRef","ref","children","_ref$type","_ref","type","className","rest","_objectWithoutPropertiesLoose","_excluded","includes","Error","classes","Button","_ref$variant","variant","_ref$color","color","_ref$startIcon","startIcon","_ref$endIcon","endIcon","additionalClasses","join","Icons","Icon","icon","style","size","_ref$tag","tag","_extends","fontSize","spacingNumberRegex","useSpacing","spacingProps","entries","reduce","prev","_extends2","spacing","matches","String","matchAll","cssSpacingValue","Array","from","map","_ref2","Number","validVariants","Typography","_ref$className","styleWithSpacing","Breadcrumbs","ariaLabel","items","Children","child","index","isArray","Fragment","key","cloneElement","ChevronRight","props","defaultConfigObject","relativeElement","undefined","elementToBePositioned","transformOrigin","horizontal","vertical","placement","offset","top","right","bottom","left","usePosition","providedConfigObject","configObject","_useState","useState","position","setPosition","_calculatePlacement","relEl","elDimensions","axis","_configObject$transfo","_configObject$transfo2","placementValue","requestedReturnValue","placementOriginDefinition","_determineCenteredPlacementOrigin","value","window","_calculateInitialPlacementValue","valueWithOffset","_configObject$offset","_configObject$offset2","_configObject$offset7","_configObject$offset8","_configObject$offset3","_configObject$offset4","_configObject$offset5","_configObject$offset6","_configObject$offset9","_configObject$offset10","_configObject$offset11","_configObject$offset12","returnValue","_applyOffsetToPlacementValue","valueCorrectionForViewportOverflow","innerWidth","width","innerHeight","height","_fixPossibleViewportOverflow","_calculatePlacementValue","direction","oppositeDirection","prevState","calculatePosition","_configObject$relativ","current","relativeElRect","getBoundingClientRect","elementToBePositionedDimensions","offsetHeight","offsetWidth","clonedRelEl","center","centerv","centerh","x","y","Popover","show","anchorEl","elToBePositioned","useRef","_usePosition","useEffect","useBodyClick","checkFunction","callbackFunction","dependingStateVariable","bodyClickListener","event","addEventListener","removeEventListener","ContextMenu","trigger","id","_ref$show","onShow","onClose","_ref$placement","_ref$offset","_ref$transformOrigin","_ref$domRoot","domRoot","body","showContextMenu","setShowContextMenu","hasBeenClosed","_useState2","setHasBeenClosed","_useState3","selectedContextMenuItem","setSelectedContextMenuItem","_useState4","focusedContextMenuItem","setFocusedContextMenuItem","shouldClick","_useState5","setShouldClick","childrenCount","count","target","parentElement","focus","onKeyDown","code","preventDefault","onClick","tabIndex","createPortal","role","onFocusChange","childIndex","onSelectedChange","hasFocus","isSelected","contextMenuOpened","ContextMenuItem","innerButtonRef","createRef","click","Link","_ref$disabled","disabled","to","_ref$display","display","_ref$buttonVariant","buttonVariant","component","classNames","download","rel","href","IconButton","_ref$iconSize","iconSize","title","console","error","iconButtonClasses","readyclasses","generateID","stringToWeaveIn","hashCharacters","test","Math","floor","random","slice","filterProps","regexPattern","returnFiltered","acc","filter","prevObj","currKeyValPair","TabButton","_ref$selected","selected","_ref$focussed","focussed","tabId","tabPanelId","onTabButtonClick","TabPanel","hidden","TextEllipsis","popoverClassName","showPopover","setShowPopover","textContainer","ellipsisVisible","scrollWidth","onMouseEnter","onMouseLeave","Tile","imageProps","enabled","loading","tileAction","tileDescriptionID","justifyContent","Checkmark","Forbidden","readyClasses","src","alt","Image","Tiles","_ref$loading","defaultPosition","Tooltip","label","identifier","visible","setVisible","escapePressHandler","useLayoutEffect","isValidElement","onFocus","onBlur","InfoCircle","Skeleton","StatusIndicator","_badgeProps$className","status","badgeProps","typographyProps","margin","dateTypes","Input","_ref$error","name","wrapperProps","labeledBy","prefix","suffix","setFocus","inputWrapperRef","errorIconRef","suffixRef","errorOffset","errorIcon","inputWrapper","suffixContent","setErrorOffset","defaultErrorOffset","setDefaultErrorOffset","defaultOffset","parseFloat","getComputedStyle","inputPaddingRight","input","paddingRight","useErrorOffset","inputClassNames","iconClassNames","wrapperClasses","outlineClasses","Select","placeholder","describedBy","_ref$searchPlaceholde","searchPlaceholder","searchInputProps","selectButtonProps","_ref$clearLabel","clearLabel","onChange","onClear","expanded","setExpanded","opacity","setOpacity","setFilter","setDisplay","listPosition","setListPosition","optionsListMaxHeight","_useState6","setOptionsListMaxHeight","containerReference","optionListReference","isSearching","_useState7","setIsSearching","_useState8","focusedSelectItem","setFocusedSelectItem","_useState9","nativeSelect","searchInputRef","val","forEach","listHeight","availableSpace","calculateOptionListMaxHeight","rePositionList","closest","_searchInputProps$wra","internalChildren","codesToPreventDefault","Warning","stopPropagation","TimesThin","TriangleDown","maxHeight","pointerEvents","autoFocus","currentTarget","toArray","toLowerCase","match","onOptionSelect","optionRef","getAttribute","dispatchEvent","Event","bubbles","onOptionChangeHandler","selectOpened","Option","_ref$isSelected","innerOptionRef","onSelectHandler","onKeyDownCapture","DefaultTranslations","Label","_ref$hidden","Pagination","amountOfPages","totalElements","_ref$pageSize","pageSize","_ref$translate","translate","currentPage","onPageChange","onPageSizeChange","toString","internalCurrentPage","setInternalCurrentPage","calculateAmountOfPages","ceil","onEnterListener","onPageChangeHandler","pageToGoTo","totalItems","itemsPerPage","pageSizeNumber","NavigationFirst","ChevronLeft","split","string","htmlFor","currentPageLabel","max","onKeyUp","replace","NavigationLast","labelId","descriptionId","BaseModal","_backdropProps$classN","_containerProps$class","_containerProps$class2","open","containerProps","backdropProps","labelledby","describedby","_ref$disableEscapeKey","disableEscapeKeyDown","_ref$disableBackdrop","disableBackdrop","_ref$forceContainerOp","forceContainerOpen","zIndex","querySelectorAll","removeProperty","useSetBodyScroll","SnackbarContext","createContext","enqueueSnackbar","enqueueSuccessSnackbar","enqueueErrorSnackbar","SnackbarContextProvider","Provider","initialState","BaseModalContent","_ref$disableAutoFocus","disableAutoFocus","contentRef","_ref$current","_contentRef$current","BaseModalActions","DialogActions","align","DialogTitle","Dialog","secondaryLabel","restOfSecondaryAction","alignActions","primaryAction","secondaryAction","dialogId","primaryLabel","restOfPrimaryAction","_excluded2","PrimaryButton","TertiaryButton","_excluded3","maxLength","onKeyPress","BaseModalHeader","Times","DiscardChangesDialog","onKeepEditing","onDiscardChanges","discardChangesButtonLabel","keepEditingButtonLabel","contentLabel","titleLabel","SlideInModal","classHideOnTransition","setClassHideOnTransition","containerRef","Modal","onTransitionEnd","SnackbarContainer","SnackbarItem","duration","content","_ref$actions","actions","closeButtonTitle","timerHandler","useAnimation","callback","animatedObjectRef","animationStarted","setAnimationStarted","onAnimationEnd","_animatedObjectRef$cu","_animatedObjectRef$cu2","startAnimation","setTimeout","clearTimeout","actionButtons","actionProp","CheckmarkCircleBreakout","useFormSelector","setDescribedBy","errorId","errorMessage","parentErrorId","helperText","parentHelperId","FormHelperText","FormSelectorWrapper","_helperProps$classNam","nestedChildren","helperProps","helperRef","isToggle","_children$props","Checkbox","indeterminate","_ref$checked","checked","formSelectorWrapperProps","_useFormSelector","iconClasses","MinusSquare","CheckmarkSquare","Square","determineLabel","Radio","onChangeHandler","nativeEvent","clonedEvent","constructor","defineProperty","writable","Circle","Textarea","_errorProps$className","_ref$rows","rows","errorProps","Toggle","FormControl","grid","_ref$align","childElement","column","FormGroup","errorMessageIcon","_ref$errorMessageIcon","errorMessageIconPosition","helperId","helperIndent","marginLeft","message","Wrapper","_ref$floatingLabel","floatingLabel","floatingLabelActive","required","labelProps","innerClassName","labelClasses","wrapper","useWrapper","setFloatingLabelActive","setHasFocus","InputWrapper","_inputProps$wrapperPr","_inputProps$wrapperPr2","_inputProps$className","inputProps","hasValueOrActiveFloatingLabel","labelOffset","setLabelOffset","prefixDifference","paddingLeft","useLabelOffset","_inputProps$placehold","SelectWrapper","_selectProps$classNam","selectProps","_useWrapper","TextareaWrapper","textareaProps","hover","setHover","optionalClasses","_textareaProps$placeh","Fieldset","legend","_ref$legendStyle","legendStyle","_ref$hideLegend","hideLegend","_ref$background","background","noBackground","_ref$noPadding","noPadding","_ref$required","_ref$disablePropagati","disablePropagation","backgroundColor","allowedComponents","_child$props$disabled","_child$props$error","renderChildren","RadioWrapper","fieldsetProps","CheckboxWrapper","changeCurrentStepNo","currentStepNo","payload","reducer","state","action","WizardStateContext","dispatch","WizardStateProvider","_useReducer","useReducer","WizardContent","steps","mode","stepScreenReaderLabel","onStepChange","useContext","setWizardState","useStepChanging","BaseWizardSteps","_ref$futureStepsClick","futureStepsClickable","generatedSteps","step","stepNo","stepState","disabledStyleClassName","clickableClassName","stepNumberString","getStepContent","WizardSteps","onStepClick","_useContext$state","_useContext","selectedStepNo","ariaSortMapping","ASC","DESC","DataGridHeaderCell","getSortingIndicatorClasses","headline","disableSorting","activeSortDirection","onSort","innerContent","sortingIndicatorClasses","TriangleUp","sortingStates","DataGridHeader","initialSort","headers","disableContextMenuColumn","enableMultiSorting","sortList","setSortList","wrapOnSort","newSort","currentDirectionIdx","find","item","restSortList","newSortDirection","findIndex","concat","updateSortList","headerCells","header","headerStyle","sort","DataGridColumnsToggle","_ref$titleLabel","_ref$closeButtonTitle","onToggleClicked","labelledId","toggles","DataGridActions","_columnsBtnProps$clas","_columnsBtnProps$clas2","_searchBtnProps$class","_columnsBtnProps$clas3","enableAddBtn","enableColumnsBtn","enableSearchBtn","_ref$addBtnProps","addBtnProps","_ref$columnsBtnProps","columnsBtnProps","_ref$searchBtnProps","searchBtnProps","onColumnToggled","isHidden","showColsPopover","setShowColsPopover","showColumnBtn","Plus","Change","TableSearch","DataGridCell","isLoading","cellIndex","columnLength","cellStyle","DataGridRow","visibleCells","cellWithSpacing","DataGridBodyInner","visibleColumns","data","emptyLabel","_","rowIdx","__","colIdx","colSpan","DataGridBody","DataGridInner","_paginationProps$clas","paginationProps","internalHeaders","setInternalHeaders","padding","splitPaddings","paddingLeftIndex","defineProperties","paddingTop","paddingBottom","colName","DataGrid","_ref$properties","properties","defaultProperties","colorFocus","colorPrimary","colorSecondary","colorTertiary","defaultLineHeight","buttonBorderRadius","buttonBorderWidth","buttonFontSize","buttonBorderStyle","buttonFillTextColor","buttonFillBackgroundColor","buttonOutlineHoverTextColor","inputBorderColor","inputBorderRadius","inputBorderWidth","inputBorderWidthFocus","inputBorderStyle","inputBackgroundColor","modalShadowColor","modalBackgroundColor","modalHeaderBackgroundColor","snackbarTextColor","snackbarInfoBackgroundColor","snackbarSuccessBackgroundColor","snackbarErrorBackgroundColor","snackbarBorderRadius","dataGridRowBackgroundColor","dataGridRowHoverBackgroundColor","tabsBackgroundColor","tabBorderWidth","tabBorderStyle","tablistBorderWidth","tablistBorderStyle","tablistBorderColor","tabTextColor","default","success","greyedOut","warning","fontFamily","fontFamilyCode","fontSizeH1","fontSizeH2","fontSizeH3","fontSizeH4","fontSizeSub","fontSizeCode","setIsLoading","setCSSProperties","CSSPropertiesObject","_i","_Object$entries","_Object$entries$_i","formattedPropertyName","documentElement","setProperty","mergedState","headerProps","discardChangedDialogProps","modalRef","dialogRef","hasUnsavedChanges","openDiscardChangesDialog","setOpenDiscardChangesDialog","onCloseWrapper","ModalHeader","_temp","_ref$autoHideDuration","autoHideDuration","long","short","_ref$stackSize","stackSize","setSnackbars","options","_options$variant","_options$duration","getDuration","onItemClosed","snackbarList","snackbarPortal","args","onTabChange","indicatorRef","indicatorPosition","setIndicatorPosition","indicatorWidth","setIndicatorWidth","min","selectedTab","setSelectedTab","focussedTab","setFocussedTab","tabIds","tabPanelIds","calculateIndicatorPosition","selectedTabButton","tabButtons","offsetLeft","offsetTop","activateTab","buttonRef","tabPanels","panelRef","currentFocussedTab","initialStepNo","_props$initialStepNo","onCancel","onNext","onPrevious","onSaveAndClose","cancelButtonLabel","previousButtonLabel","nextButtonLabel","saveAndCloseButtonLabel","nextStepNo","useMemo","calculateNextStepNo","useNextStepNo","hasNextStep","previousStepNo","reversedCurrentStepNo","reversedPrevStepNo","reverse","calculatePrevStepNo","usePreviousStepNo","hasPreviousStep","isLastStepOrEditMode","changeStepNo","componentToRepeat","repeatedComponents","setRepeatedComponents","repeat","clonedComponent","remove","componentToRemove","newRepeatedComponents"],"mappings":"6iBA4DaA,IC5DTC,EAAE,GAAGC,EAAE,GAAG,SAASC,EAAEA,EAAEC,GAAG,GAAGD,GAAG,oBAAoBE,SAAS,CAAC,IAAIC,EAAEC,GAAE,IAAKH,EAAEI,QAAQ,UAAU,SAASC,GAAE,IAAKL,EAAEM,UAAUC,EAAE,iBAAiBP,EAAEQ,UAAUP,SAASQ,cAAcT,EAAEQ,WAAWP,SAASS,qBAAqB,QAAQ,GAAG,GAAGL,EAAE,CAAC,IAAIM,EAAEd,EAAEe,QAAQL,IAAI,IAAII,IAAIA,EAAEd,EAAEgB,KAAKN,GAAG,EAAET,EAAEa,GAAG,CAAE,GAAET,EAAEJ,EAAEa,IAAIb,EAAEa,GAAGR,GAAGL,EAAEa,GAAGR,GAAGL,EAAEa,GAAGR,GAAGW,GAAG,MAAMZ,EAAEY,IAAI,QAAQf,EAAEgB,WAAW,KAAKhB,EAAEA,EAAEiB,UAAU,IAAId,EAAEe,WAAWf,EAA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A,QAAAR,cAACsB,EAAM,CAACE,QAAkB,SAAT2mB,EAAkB,UAAY,OAAQ/b,QAxBvC,WACpBiqB,EAAO9O,IAAkBkQ,EAAa,aAwB/Bf,GAGJc,GACCh3B,EAAAA,QAACR,cAAAsB,GAAO8K,QApBgB,WAC5BmqB,EAAehP,KAmB8BoP,GAIhD,kEC5F0B,SAAwC91B,GAAA,IAAlC62B,IAAAA,kBACqB9xB,EAAAA,EAAQA,SAAgB,IAArE+xB,EAAPhyB,EAAA,GAA2BiyB,EAA3BjyB,EAAA,GAEA8D,EAAAA,WAAU,WACRouB,GADO,GAEN,IAEH,IAAMA,EAAS,WACb,IAAMC,EAAkBt3B,EAAAA,QAAMgE,aAAakzB,EAAmB,CAAEnzB,IAAKgK,EAAW,MAEhFqpB,GAAsB,SAAAxvB,GAAS,MAAQA,GAAAA,OAAAA,GAAW0vB,GAAnB,KAWjC,MAAO,CACLH,mBAAAA,EACAE,OAAAA,EACAE,OAXa,SAACC,GACd,IAAMC,EAAwBN,EAAmBxoB,QAC/C,SAAAzB,GAAS,OAAIA,IAAcsqB,CAAlB,IAGXJ,EAAsBK,IAQzB,sBC9B0B,WAAA,OAAM3P,EAAAA,WAAWnM,GAAjB"}
1
+ {"version":3,"file":"react-lib-components.cjs.production.min.js","sources":["../src/_BaseStyling_/BaseStyling.tsx","../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../src/Button/BaseButton.tsx","../src/Button/Button.tsx","../src/Icon/Icon.tsx","../src/hooks/useSpacing.ts","../src/Typography/Typography.tsx","../src/Breadcrumbs/Breadcrumbs.tsx","../src/hooks/usePosition.ts","../src/Popover/Popover.tsx","../src/hooks/useBodyClick.ts","../src/ContextMenu/ContextMenu.tsx","../src/ContextMenu/ContextMenuItem.tsx","../src/Link/Link.tsx","../src/Button/IconButton.tsx","../src/util/helper.tsx","../src/Tabs/TabButton.tsx","../src/Tabs/TabPanel.tsx","../src/TextEllipsis/TextEllipsis.tsx","../src/Tiles/Tile.tsx","../src/Tiles/Tiles.tsx","../src/Tooltip/Tooltip.tsx","../src/Skeleton/Skeleton.tsx","../src/StatusIndicator/StatusIndicator.tsx","../src/Form/Input/Input.tsx","../src/Form/Select/Select.tsx","../src/Form/Select/Option.tsx","../src/Pagination/Pagination.tsx","../src/Form/Label/Label.tsx","../src/Notifications/BaseModal/BaseModalContext.ts","../src/Notifications/BaseModal/BaseModal.tsx","../src/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx","../src/Notifications/BaseModal/BaseModalContent/BaseModalContent.tsx","../src/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx","../src/Notifications/Dialog/DialogActions/DialogActions.tsx","../src/Notifications/Dialog/DialogTitle/DialogTitle.tsx","../src/Notifications/Dialog/Dialog.tsx","../src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx","../src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx","../src/Notifications/SlideInModal/SlideInModal.tsx","../src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx","../src/hooks/useAnimation.ts","../src/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx","../src/hooks/useFormSelector.ts","../src/Form/FormHelperText/FormHelperText.tsx","../src/Form/FormSelectorWrapper/FormSelectorWrapper.tsx","../src/Form/Checkbox/Checkbox.tsx","../src/Form/Radio/Radio.tsx","../src/Form/Textarea/Textarea.tsx","../src/Form/Toggle/Toggle.tsx","../src/Form/FormControl/FormControl.tsx","../src/Form/FormGroup/FormGroup.tsx","../src/Form/Wrapper/Wrapper/Wrapper.tsx","../src/hooks/useWrapper.ts","../src/Form/Wrapper/InputWrapper/InputWrapper.tsx","../src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx","../src/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx","../src/Form/Fieldset/Fieldset.tsx","../src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx","../src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx","../src/Wizard/wizardStateReducer.ts","../src/Wizard/WizardStateProvider.tsx","../src/Wizard/Wizard.tsx","../src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx","../src/Wizard/WizardSteps/WizardSteps.tsx","../src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx","../src/DataGrid/DataGridHeader/DataGridHeader.tsx","../src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx","../src/DataGrid/DataGridActions/DataGridActions.tsx","../src/DataGrid/DataGridBody/DataGridCell.tsx","../src/DataGrid/DataGridBody/DataGridRow.tsx","../src/DataGrid/DataGridBody/DataGridBody.tsx","../src/DataGrid/DataGrid.tsx","../src/Notifications/DiscardChangesModal/DiscardChangesModal.tsx","../src/Form/Form.tsx","../src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx","../src/Tabs/Tab.tsx","../src/Tabs/Tabs.tsx","../src/Wizard/WizardActions/WizardActions.tsx","../src/hooks/useRepeater.ts","../src/Notifications/Snackbar/useSnackbar.ts"],"sourcesContent":["import React, { Fragment, HTMLAttributes, ReactChild, useEffect, useState } from \"react\";\n\ninterface CSSProperties {\n colorFocus?: string;\n colorPrimary?: string;\n colorSecondary?: string;\n colorTertiary?: string;\n defaultLineHeight?: string;\n buttonBorderRadius?: string;\n buttonBorderWidth?: string;\n buttonFontSize?: string;\n buttonBorderStyle?: string;\n buttonFillTextColor?: string;\n buttonFillBackgroundColor?: string;\n buttonOutlineHoverTextColor?: string;\n inputBorderColor?: string;\n inputBorderRadius?: string;\n inputBorderWidth?: string;\n inputBorderWidthFocus?: string;\n inputBorderStyle?: string;\n inputBackgroundColor?: string;\n modalShadowColor?: string;\n modalBackgroundColor?: string;\n modalHeaderBackgroundColor?: string;\n snackbarTextColor?: string;\n snackbarInfoBackgroundColor?: string;\n snackbarSuccessBackgroundColor?: string;\n snackbarErrorBackgroundColor?: string;\n snackbarBorderRadius?: string;\n dataGridRowBackgroundColor?: string;\n dataGridRowHoverBackgroundColor?: string;\n tabsBackgroundColor?: string;\n tabBorderWidth?: string;\n tabBorderStyle?: string;\n tablistBorderWidth?: string;\n tablistBorderStyle?: string;\n tablistBorderColor?: string;\n tabTextColor?: string;\n default?: string;\n success?: string;\n error?: string;\n disabled?: string;\n greyedOut?: string;\n warning?: string;\n fontFamily?: string;\n fontFamilyCode?: string;\n fontSize?: string;\n fontSizeH1?: string;\n fontSizeH2?: string;\n fontSizeH3?: string;\n fontSizeH4?: string;\n fontSizeSub?: string;\n fontSizeCode?: string;\n}\n\nexport interface Props extends HTMLAttributes<HTMLDivElement> {\n children?: ReactChild;\n properties?: CSSProperties;\n}\n\nexport const BaseStyling = ({ children, properties = {} }: Props) => {\n const defaultProperties: CSSProperties = {\n colorFocus: \"#0085f2\",\n colorPrimary: \"#9e006b\",\n colorSecondary: \"#003b5e\",\n colorTertiary: \"#ff1e4e\",\n defaultLineHeight: \"26px\",\n buttonBorderRadius: \"20px\",\n buttonBorderWidth: \"2px\",\n buttonFontSize: \"1rem\",\n buttonBorderStyle: \"solid\",\n buttonFillTextColor: \"#fff\",\n buttonFillBackgroundColor: \"#fff\",\n buttonOutlineHoverTextColor: \"#fff\",\n inputBorderColor: \"#e9e9eb\",\n inputBorderRadius: \"8px\",\n inputBorderWidth: \"1px\",\n inputBorderWidthFocus: \"2px\",\n inputBorderStyle: \"solid\",\n inputBackgroundColor: \"#fff\",\n modalShadowColor: \"rgba(0, 0, 0, 0.16)\",\n modalBackgroundColor: \"#f5f8f8\",\n modalHeaderBackgroundColor: \"#fff\",\n snackbarTextColor: \"#fff\",\n snackbarInfoBackgroundColor: \"#003b5e\",\n snackbarSuccessBackgroundColor: \"#008a28\",\n snackbarErrorBackgroundColor: \"#d9291c\",\n snackbarBorderRadius: \"8px\",\n dataGridRowBackgroundColor: \"transparent\",\n dataGridRowHoverBackgroundColor: \"#f5e6f0\",\n tabsBackgroundColor: \"#FFF\",\n tabBorderWidth: \"2px\",\n tabBorderStyle: \"solid\",\n tablistBorderWidth: \"1px\",\n tablistBorderStyle: \"solid\",\n tablistBorderColor: \"#C3C3C7\",\n tabTextColor: \"#0f0f1e\",\n default: \"#0f0f1e\",\n success: \"#008a28\",\n error: \"#d9291c\",\n disabled: \"#e9e9eb\",\n greyedOut: \"#6f6f76\",\n warning: \"#ff6105\",\n fontFamily: \"'Red Hat Display', sans-serif\",\n fontFamilyCode: \"'Red Hat Mono', sans-serif\",\n fontSize: \"1rem\",\n fontSizeH1: \"2.5rem\",\n fontSizeH2: \"1.625rem\",\n fontSizeH3: \"1.5rem\",\n fontSizeH4: \"1.25rem\",\n fontSizeSub: \".75rem\",\n fontSizeCode: \"1rem\"\n };\n\n /** We need a loading state, because otherwise you see the colors flash from the default to the possible overridden ones. */\n const [isLoading, setIsLoading] = useState(true);\n\n /** Set the actual CSS properties on the HTML :root object */\n const setCSSProperties = (CSSPropertiesObject: CSSProperties) => {\n for (const [key, value] of Object.entries(CSSPropertiesObject)) {\n const formattedPropertyName = key.replace(/([A-Z])/g, val => `-${val.toLowerCase()}`);\n document.documentElement.style.setProperty(`--${formattedPropertyName}`, value);\n }\n };\n\n /** Check if the properties prop object is filled with anything. If it is, we want to shallow merge it with the default BaseStyling. */\n useEffect(() => {\n if (Object.keys(properties).length !== 0) {\n const mergedState = { ...defaultProperties, ...properties };\n setCSSProperties(mergedState);\n } else {\n setCSSProperties(defaultProperties);\n }\n setIsLoading(false);\n }, [properties]);\n\n /** Only render if we're not loading */\n return !isLoading ? <Fragment>{children}</Fragment> : null;\n};\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./BaseButton.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"button\"> {\n type?: \"submit\" | \"button\" | \"reset\";\n disabled?: boolean;\n color?: \"primary\" | \"secondary\" | \"tertiary\" | \"default\";\n}\n\nexport const BaseButton = React.forwardRef<HTMLButtonElement, Props>(\n ({ children, type = \"button\", className, ...rest }, ref) => {\n const validTypes = [\"submit\", \"button\", \"reset\"];\n\n if (!validTypes.includes(type))\n throw new Error(\n `You have entered an invalid button type. Expected 'submit', 'button' or 'reset' got ${type}`\n );\n\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n className={`${classes.button} ${className ? className : \"\"}`}\n >\n {children}\n </button>\n );\n }\n);\n","import React from \"react\";\nimport { BaseButton, Props as BaseButtonProps } from \"./BaseButton\";\nimport classes from \"./Button.module.scss\";\n\nexport interface Props extends BaseButtonProps {\n startIcon?: React.ReactNode | false;\n endIcon?: React.ReactNode | false;\n children?: React.ReactNode;\n variant?: \"text\" | \"fill\" | \"outline\";\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, Props>(\n (\n {\n children,\n variant = \"fill\",\n color = \"primary\",\n startIcon = false,\n endIcon = false,\n className,\n ...rest\n },\n ref\n ) => {\n const additionalClasses = [];\n\n if (startIcon || endIcon) {\n additionalClasses.push(classes[\"has-icon\"]);\n }\n\n if (startIcon) {\n additionalClasses.push(classes[\"start-icon\"]);\n }\n\n if (endIcon) {\n additionalClasses.push(classes[\"end-icon\"]);\n }\n\n if (className) {\n additionalClasses.push(className);\n }\n\n return (\n <BaseButton\n {...rest}\n ref={ref}\n className={`${classes[color]} ${classes[variant]} ${additionalClasses.join(\" \")}`}\n >\n {startIcon && <i>{startIcon}&nbsp;</i>}\n <span>{children}</span>\n {endIcon && <i>&nbsp;{endIcon}</i>}\n </BaseButton>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./Icon.module.scss\";\n\nexport enum Icons {\n Bell = \"bell\",\n BellAlt = \"bell-alt\",\n Bookmark = \"bookmark\",\n BookmarkAlt = \"bookmark-alt\",\n Build = \"build\",\n Calendar = \"calendar\",\n Change = \"change\",\n Checkmark = \"checkmark\",\n CheckmarkCircle = \"checkmark-circle\",\n CheckmarkCircleAlt = \"checkmark-circle-alt\",\n CheckmarkCircleBreakout = \"checkmark-circle-breakout\",\n CheckmarkSquare = \"checkmark-square\",\n ChevronUp = \"chevron-up\",\n ChevronDown = \"chevron-down\",\n ChevronLeft = \"chevron-left\",\n ChevronRight = \"chevron-right\",\n Circle = \"circle\",\n Clock = \"clock\",\n Copy = \"copy\",\n Edit = \"edit\",\n Ellipsis = \"ellipsis\",\n EllipsisAlt = \"ellipsis-alt\",\n Equal = \"equal\",\n Error = \"error-circle\",\n Eye = \"eye\",\n Filter = \"filter\",\n FilterAlt = \"filter-alt\",\n FilterAltArrow = \"filter-alt-arrow\",\n FilterAltTimes = \"filter-alt-times\",\n Forbidden = \"forbidden\",\n Fullscreen = \"fullscreen\",\n FullscreenExit = \"fullscreen-exit\",\n Gearwheel = \"gearwheel\",\n Grid = \"grid\",\n Hamburger = \"hamburger\",\n Heart = \"heart\",\n Image = \"image\",\n InfoBell = \"info-bell\",\n InfoCircle = \"info-circle\",\n Link = \"link\",\n MinusSquare = \"minus-square\",\n NavigationFirst = \"navigation-first\",\n NavigationLast = \"navigation-last\",\n Plus = \"plus\",\n Radio = \"radio\",\n Refresh = \"refresh\",\n Search = \"search\",\n Share = \"share\",\n Square = \"square\",\n Star = \"star\",\n StarAlt = \"star-alt\",\n TableSearch = \"table-search\",\n Times = \"times\",\n TimesCircle = \"times-circle\",\n TimesCircleAlt = \"times-circle-alt\",\n TimesThin = \"times-thin\",\n Trash = \"trash\",\n TriangleDown = \"triangle-down\",\n TriangleDownCircle = \"triangle-down-circle\",\n TriangleLeft = \"triangle-left\",\n TriangleRight = \"triangle-right\",\n TriangleUp = \"triangle-up\",\n Undo = \"undo\",\n Warning = \"warning\"\n}\n\ntype Tag = \"span\" | \"div\" | \"i\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n icon: Icons;\n color?: string;\n size?: string;\n tag?: Tag;\n}\n\nexport const Icon = React.forwardRef<HTMLDivElement, Props>(\n ({ icon, color, className, style, size, tag = \"span\", ...rest }: Props, ref) => {\n const Component = tag;\n\n return (\n <Component\n {...rest}\n ref={ref}\n style={{ color: color, ...style, fontSize: size }}\n data-icon\n aria-hidden=\"true\"\n className={`${classes[\"icon\"]} ${classes[\"icon-\" + icon]} ${className ? className : \"\"}`}\n />\n );\n }\n);\n","import { CSSProperties } from \"react\";\n\nexport type SpacingMultiplier = 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\ntype SpacingMultiplierStringOrNumber = `${SpacingMultiplier}` | SpacingMultiplier;\ntype MultiValueSpacingMultiplier =\n | `${SpacingMultiplier} ${SpacingMultiplier} ${SpacingMultiplier} ${SpacingMultiplier}`\n | `${SpacingMultiplier} ${SpacingMultiplier} ${SpacingMultiplier}`\n | `${SpacingMultiplier} ${SpacingMultiplier}`\n | SpacingMultiplierStringOrNumber;\n\nexport interface Spacing {\n padding?: MultiValueSpacingMultiplier;\n paddingTop?: SpacingMultiplierStringOrNumber;\n paddingBottom?: SpacingMultiplierStringOrNumber;\n paddingLeft?: SpacingMultiplierStringOrNumber;\n paddingRight?: SpacingMultiplierStringOrNumber;\n margin?: MultiValueSpacingMultiplier;\n marginTop?: SpacingMultiplierStringOrNumber;\n marginBottom?: SpacingMultiplierStringOrNumber;\n marginLeft?: SpacingMultiplierStringOrNumber;\n marginRight?: SpacingMultiplierStringOrNumber;\n}\n\nconst defaultFactor = 0.25;\nconst defaultUnit = \"rem\";\nconst spacingNumberRegex = /(\\d+\\.?\\d*)+/g;\n\nexport const useSpacing = (\n spacingProps?: Spacing,\n style?: CSSProperties\n): CSSProperties | undefined => {\n if (spacingProps) {\n return Object.entries(spacingProps).reduce<CSSProperties>((prev, [spacing, multiplier]) => {\n const matches = String(multiplier).matchAll(spacingNumberRegex);\n const cssSpacingValue = Array.from(matches)\n .map(([multiplierValue]) => `${Number(multiplierValue) * defaultFactor}${defaultUnit}`)\n .join(\" \");\n return { ...prev, [spacing]: cssSpacingValue };\n }, style ?? {});\n }\n return style;\n};\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport classes from \"./Typography.module.scss\";\nimport { Spacing, useSpacing } from \"../hooks/useSpacing\";\n\nexport const validVariants = [\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"body\",\n \"body-bold\",\n \"sub-text\",\n \"code\"\n] as const;\nexport type Variant = typeof validVariants[number];\n\ntype Tags =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"p\"\n | \"div\"\n | \"code\"\n | \"span\"\n | \"sup\"\n | \"sub\"\n | \"strong\"\n | \"em\"\n | \"small\"\n | \"mark\"\n | \"del\"\n | \"ins\"\n | \"blockquote\";\n\nexport interface Props extends ComponentPropsWithRef<any> {\n children: ReactNode;\n variant: Variant;\n tag?: Tags;\n spacing?: Spacing;\n}\n\nexport const Typography = React.forwardRef<any, Props>(\n ({ children, variant, tag, style, spacing, className = \"\", ...rest }: Props, ref) => {\n if (!validVariants.includes(variant)) {\n throw new Error(\n `You entered an invalid variant. You can choose from: ${validVariants}, you entered: ${variant}`\n );\n }\n\n const styleWithSpacing = useSpacing(spacing, style);\n\n if (!tag) {\n switch (variant) {\n case \"h1\":\n case \"h2\":\n case \"h3\":\n case \"h4\":\n case \"code\":\n tag = variant;\n break;\n case \"body\":\n tag = \"p\";\n break;\n case \"body-bold\":\n tag = \"p\";\n break;\n case \"sub-text\":\n tag = \"span\";\n break;\n default:\n tag = \"div\";\n break;\n }\n }\n\n let TagName = tag;\n\n return (\n <TagName\n {...rest}\n ref={ref}\n style={styleWithSpacing}\n className={`${classes[\"typography_style_\" + variant]} ${className}`}\n >\n {children}\n </TagName>\n );\n }\n);\n","import React, { ComponentPropsWithRef, Fragment, ReactElement } from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport { Link, Props as LinkProps } from \"../Link/Link\";\nimport { Typography } from \"../Typography/Typography\";\nimport classes from \"./Breadcrumbs.module.scss\";\n\ntype ChildrenType = ReactElement<LinkProps, typeof Link>;\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: ChildrenType | ChildrenType[];\n \"aria-label\": string;\n}\n\nexport const Breadcrumbs = React.forwardRef<HTMLDivElement, Props>(\n ({ children, \"aria-label\": ariaLabel, className = \"\", ...rest }: Props, ref) => {\n const items = React.Children.map(children, (child, index) => {\n const isLastElement = Array.isArray(children) ? index === children.length - 1 : true;\n if (isLastElement) {\n return (\n <Typography\n key={child.key}\n variant=\"body\"\n tag=\"span\"\n className={classes[\"last\"]}\n aria-current=\"page\"\n >\n {child.props.children}\n </Typography>\n );\n } else {\n return (\n <Fragment key={child.key}>\n {React.cloneElement(child)}\n <Icon icon={Icons.ChevronRight} className={classes[\"icon\"]} />\n </Fragment>\n );\n }\n });\n return (\n <nav\n {...rest}\n ref={ref}\n aria-label={ariaLabel}\n className={`${classes[\"breadcrumbs\"]} ${className}`}\n >\n {items}\n </nav>\n );\n }\n);\n","import React, { useState } from \"react\";\n\nexport interface ConfigObject {\n relativeElement: RefElement;\n elementToBePositioned: RefElement;\n transformOrigin?: Placement;\n placement?: Placement;\n offset?: Offset;\n}\n\nexport type HorizontalPlacement = \"left\" | \"center\" | \"centerh\" | \"right\";\nexport type VerticalPlacement = \"top\" | \"center\" | \"centerv\" | \"bottom\";\n\ntype Axis = \"vertical\" | \"horizontal\";\ntype RefElement = React.RefObject<HTMLOrSVGElement> | undefined;\n\ninterface DomRectObject {\n top: number;\n right: number;\n bottom: number;\n left: number;\n center: number;\n centerh: number;\n centerv: number;\n width: number;\n height: number;\n x: number;\n y: number;\n}\n\nexport interface Placement {\n horizontal: HorizontalPlacement;\n vertical: VerticalPlacement;\n}\n\nexport interface Offset {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\nexport interface Position {\n top: PositionType;\n right: PositionType;\n bottom: PositionType;\n left: PositionType;\n}\n\ninterface Dimensions {\n height: number;\n width: number;\n}\n\ntype PositionType = number | \"initial\";\n\nconst defaultConfigObject: ConfigObject = {\n relativeElement: undefined,\n elementToBePositioned: undefined,\n transformOrigin: {\n horizontal: \"left\",\n vertical: \"top\"\n },\n placement: {\n horizontal: \"left\",\n vertical: \"top\"\n },\n offset: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }\n};\n\n/* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain*/\nexport const usePosition = (providedConfigObject: ConfigObject = defaultConfigObject) => {\n const configObject = { ...defaultConfigObject, ...providedConfigObject };\n\n if (configObject.transformOrigin === undefined) {\n configObject.transformOrigin = defaultConfigObject.transformOrigin;\n }\n\n if (configObject.placement === undefined) {\n configObject.placement = defaultConfigObject.placement;\n }\n\n if (configObject.offset === undefined) {\n configObject.offset = defaultConfigObject.offset;\n }\n\n const [position, setPosition] = useState<Position>({\n left: 0,\n top: 0,\n right: \"initial\",\n bottom: \"initial\"\n });\n\n const _fixPossibleViewportOverflow = (\n value: number,\n transformOrigin: Placement,\n requestedReturnValue: Axis,\n elDimensions: Dimensions\n ) => {\n let returnValue = value;\n\n if (\n (transformOrigin[requestedReturnValue] === \"left\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"top\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"center\" && returnValue < 0) ||\n (transformOrigin[requestedReturnValue] === \"bottom\" && returnValue < 0)\n ) {\n returnValue = 0;\n }\n\n if (\n (transformOrigin[requestedReturnValue] === \"left\" &&\n returnValue > window.innerWidth - elDimensions.width) ||\n (transformOrigin[requestedReturnValue] === \"center\" &&\n requestedReturnValue === \"horizontal\" &&\n returnValue > window.innerWidth - elDimensions.width)\n ) {\n returnValue = window.innerWidth - elDimensions.width;\n }\n\n if (\n (transformOrigin[requestedReturnValue] === \"top\" &&\n returnValue > window.innerHeight - elDimensions.height) ||\n (transformOrigin[requestedReturnValue] === \"center\" &&\n requestedReturnValue === \"vertical\" &&\n returnValue > window.innerHeight - elDimensions.height)\n ) {\n returnValue = window.innerHeight - elDimensions.height;\n }\n\n if (\n transformOrigin[requestedReturnValue] === \"right\" &&\n returnValue > window.innerWidth - elDimensions.width\n ) {\n returnValue = window.innerWidth - elDimensions.width;\n }\n\n if (\n transformOrigin[requestedReturnValue] === \"bottom\" &&\n returnValue > window.innerHeight - elDimensions.height\n ) {\n returnValue = window.innerHeight - elDimensions.height;\n }\n\n return returnValue;\n };\n\n const _applyOffsetToPlacementValue = (\n value: number,\n requestedReturnValue: Axis,\n transformOrigin: Placement\n ) => {\n let returnValue = value;\n if (\n (requestedReturnValue === \"horizontal\" && configObject.offset?.left !== 0) ||\n (requestedReturnValue === \"horizontal\" && configObject.offset?.right !== 0)\n ) {\n if (\n transformOrigin[requestedReturnValue] === \"left\" ||\n transformOrigin[requestedReturnValue] === \"center\"\n ) {\n returnValue += configObject.offset?.left!;\n returnValue -= configObject.offset?.right!;\n }\n\n if (transformOrigin[requestedReturnValue] === \"right\") {\n returnValue -= configObject.offset?.left!;\n returnValue += configObject.offset?.right!;\n }\n }\n\n if (\n (requestedReturnValue === \"vertical\" && configObject.offset?.top !== 0) ||\n (requestedReturnValue === \"vertical\" && configObject.offset?.bottom !== 0)\n ) {\n if (\n transformOrigin[requestedReturnValue] === \"top\" ||\n transformOrigin[requestedReturnValue] === \"center\"\n ) {\n returnValue += configObject.offset?.top!;\n returnValue -= configObject.offset?.bottom!;\n }\n\n if (transformOrigin[requestedReturnValue] === \"bottom\") {\n returnValue -= configObject.offset?.top!;\n returnValue += configObject.offset?.bottom!;\n }\n }\n\n return returnValue;\n };\n\n const _calculateInitialPlacementValue = (\n transformOrigin: Placement,\n requestedReturnValue: Axis,\n relEl: DomRectObject,\n placementOriginDefinition: HorizontalPlacement | VerticalPlacement,\n elDimensions: Dimensions\n ) => {\n let value = 0;\n\n if (\n transformOrigin[requestedReturnValue] === \"left\" ||\n transformOrigin[requestedReturnValue] === \"top\"\n ) {\n value = relEl[placementOriginDefinition];\n } else if (transformOrigin[requestedReturnValue] === \"center\") {\n value =\n relEl[placementOriginDefinition] -\n elDimensions[requestedReturnValue === \"horizontal\" ? \"width\" : \"height\"] / 2;\n } else if (\n transformOrigin[requestedReturnValue] === \"right\" ||\n transformOrigin[requestedReturnValue] === \"bottom\"\n ) {\n value =\n window[requestedReturnValue === \"horizontal\" ? \"innerWidth\" : \"innerHeight\"] -\n relEl[placementOriginDefinition];\n }\n\n return value;\n };\n\n /**\n *\n * @param requestedReturnValue whether the requested return value is for the horizontal or vertical axis\n * @returns either the horizontally centered placement definition (centerh) or the vertically centered one (centerv)\n */\n const _determineCenteredPlacementOrigin = (requestedReturnValue: Axis) => {\n if (requestedReturnValue === \"horizontal\") {\n return \"centerh\";\n } else if (requestedReturnValue === \"vertical\") {\n return \"centerv\";\n }\n throw new Error(\n `the requested return value isn't \"vertical\" or \"horizontal\" ${requestedReturnValue} was given.`\n );\n };\n\n const _calculatePlacementValue = (\n transformOrigin: Placement,\n placement: HorizontalPlacement | VerticalPlacement,\n requestedReturnValue: Axis,\n relEl: DomRectObject,\n elDimensions: Dimensions\n ): number => {\n const placementOriginDefinition =\n placement === \"center\" ? _determineCenteredPlacementOrigin(requestedReturnValue) : placement;\n\n const value = _calculateInitialPlacementValue(\n transformOrigin,\n requestedReturnValue,\n relEl,\n placementOriginDefinition,\n elDimensions\n );\n\n const valueWithOffset = _applyOffsetToPlacementValue(\n value,\n requestedReturnValue,\n transformOrigin\n );\n\n const valueCorrectionForViewportOverflow = _fixPossibleViewportOverflow(\n valueWithOffset,\n transformOrigin,\n requestedReturnValue,\n elDimensions\n );\n\n return valueCorrectionForViewportOverflow;\n };\n\n const _calculatePlacement = (relEl: DomRectObject, elDimensions: Dimensions, axis: Axis) => {\n const placementValue = _calculatePlacementValue(\n configObject.transformOrigin!,\n configObject.placement![axis]!,\n axis,\n relEl,\n elDimensions\n );\n\n let direction = \"left\";\n let oppositeDirection = \"right\";\n\n if (axis === \"horizontal\" && configObject.transformOrigin?.horizontal === \"right\") {\n direction = \"right\";\n oppositeDirection = \"left\";\n } else if (axis === \"horizontal\") {\n direction = \"left\";\n oppositeDirection = \"right\";\n }\n\n if (axis === \"vertical\" && configObject.transformOrigin?.vertical === \"bottom\") {\n direction = \"bottom\";\n oppositeDirection = \"top\";\n } else if (axis === \"vertical\") {\n direction = \"top\";\n oppositeDirection = \"bottom\";\n }\n\n setPosition(prevState => ({\n ...prevState,\n [direction]: placementValue,\n [oppositeDirection]: \"initial\"\n }));\n };\n\n const calculatePosition = () => {\n if (!configObject.relativeElement?.current) return;\n const relativeElRect = (configObject.relativeElement!\n .current as HTMLElement)!.getBoundingClientRect();\n const elementToBePositionedDimensions: Dimensions = {\n height: (configObject.elementToBePositioned!.current as HTMLElement).offsetHeight,\n width: (configObject.elementToBePositioned!.current as HTMLElement).offsetWidth\n };\n\n /** We want to add a center (horizontal and vertical) property to the DOMRect object. Since it's a special object we can't modify so we clone it and add it. */\n const clonedRelEl = {\n top: relativeElRect.top,\n right: relativeElRect.right,\n bottom: relativeElRect.bottom,\n center: 0,\n centerv: relativeElRect.top + relativeElRect.height / 2,\n centerh: relativeElRect.left + relativeElRect.width / 2,\n left: relativeElRect.left,\n width: relativeElRect.width,\n height: relativeElRect.height,\n x: relativeElRect.x,\n y: relativeElRect.y\n };\n\n _calculatePlacement(clonedRelEl, elementToBePositionedDimensions, \"horizontal\");\n _calculatePlacement(clonedRelEl, elementToBePositionedDimensions, \"vertical\");\n };\n\n return {\n top: position.top,\n bottom: position.bottom,\n left: position.left,\n right: position.right,\n calculatePosition\n };\n};\n","import React, { ComponentPropsWithRef, ReactNode, RefObject, useEffect, useRef } from \"react\";\nimport { Offset, Placement, usePosition } from \"../hooks/usePosition\";\nimport classes from \"./Popover.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactNode;\n show?: boolean;\n anchorEl?: RefObject<HTMLOrSVGElement>; //eslint-disable-line no-undef\n placement?: Placement;\n offset?: Offset;\n transformOrigin?: Placement;\n}\n\nexport const Popover = React.forwardRef<HTMLDivElement, Props>(\n ({ children, className, show, placement, offset, transformOrigin, anchorEl, ...rest }, ref) => {\n const elToBePositioned = useRef<HTMLDivElement>(null);\n\n if (show === undefined) {\n throw new Error('Please make sure to define the \"show\" property on your Popover component');\n }\n\n const { top, left, right, bottom, calculatePosition } = usePosition({\n elementToBePositioned: elToBePositioned,\n relativeElement: anchorEl,\n offset: offset,\n placement: placement,\n transformOrigin: transformOrigin\n });\n\n useEffect(() => {\n calculatePosition();\n }, [show]);\n\n return (\n <div ref={ref} {...rest}>\n <div\n ref={elToBePositioned}\n className={`${classes.popover} ${className ?? \"\"} ${show ? classes.show : \"\"}`}\n style={{ top: top, left: left, right: right, bottom: bottom }}\n >\n {children}\n </div>\n </div>\n );\n }\n);\n","import { useEffect } from \"react\";\n\nexport const useBodyClick = (\n checkFunction: (event: MouseEvent) => boolean,\n callbackFunction: (...args: unknown[]) => unknown,\n dependingStateVariable: React.ComponentState | React.ComponentState[]\n) => {\n function bodyClickListener(event: MouseEvent) {\n if (checkFunction(event)) {\n callbackFunction();\n }\n }\n useEffect(() => {\n window.addEventListener(\"click\", bodyClickListener);\n\n return () => {\n window.removeEventListener(\"click\", bodyClickListener);\n };\n }, [dependingStateVariable]);\n};\n","import React, {\n ComponentPropsWithRef,\n ReactElement,\n ReactNode,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { Props as ButtonProps } from \"../Button/Button\";\nimport { Props as IconButtonProps } from \"../Button/IconButton\";\nimport { Popover } from \"../Popover/Popover\";\nimport { Placement, Offset } from \"../hooks/usePosition\";\nimport classes from \"./ContextMenu.module.scss\";\nimport { useBodyClick } from \"../hooks/useBodyClick\";\nimport { createPortal } from \"react-dom\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n trigger: ReactElement<ButtonProps> | ReactElement<IconButtonProps>;\n decorativeElement?: ReactNode;\n children: ReactNode;\n placement?: Placement;\n transformOrigin?: Placement;\n offset?: Offset;\n id: string;\n show?: boolean;\n domRoot?: HTMLElement;\n onShow?: () => void;\n onClose?: () => void;\n}\n\nexport const ContextMenu = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n trigger,\n children,\n decorativeElement,\n id,\n show = false,\n onShow,\n onClose,\n placement = { horizontal: \"right\", vertical: \"top\" },\n offset = { top: 0, bottom: 0, left: 0, right: 0 },\n transformOrigin = { horizontal: \"left\", vertical: \"top\" },\n domRoot = document.body,\n ...rest\n }: Props,\n ref\n ) => {\n const anchorEl = useRef<HTMLButtonElement>(null);\n const [showContextMenu, setShowContextMenu] = useState(show);\n const [hasBeenClosed, setHasBeenClosed] = useState(false);\n const [selectedContextMenuItem, setSelectedContextMenuItem] = useState(-1);\n const [focusedContextMenuItem, setFocusedContextMenuItem] = useState(-1);\n const [shouldClick, setShouldClick] =\n useState(\n false\n ); /** We need this, because whenever we use the arrow keys to select the contextmenu item, and we focus the currently selected item it fires the \"click\" listener in ContextMenuItem component. Instead, we only want this to fire if we press \"enter\" or \"spacebar\" so we set this to true whenever that is the case, and back to false when it has been executed. */\n const [childrenCount] = useState(React.Children.count(children));\n\n if (!id) {\n throw new Error(\"You need to provide an ID to the context menu\");\n }\n\n const onArrowNavigation = (event: React.KeyboardEvent) => {\n if (focusedContextMenuItem === -1 && selectedContextMenuItem !== -1) {\n setFocusedContextMenuItem(selectedContextMenuItem);\n }\n\n const codesToPrevenDefault = [\n \"ArrowDown\",\n \"ArrowUp\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Enter\",\n \"Space\",\n \"Escape\",\n \"End\",\n \"Home\"\n ];\n\n if (codesToPrevenDefault.includes(event.code)) {\n event.preventDefault();\n }\n\n switch (event.code) {\n case \"ArrowDown\":\n if (!showContextMenu) {\n setShowContextMenu(true);\n return;\n }\n setFocusedContextMenuItem(prevState => {\n return prevState + 1 > childrenCount - 1 ? 0 : prevState + 1;\n });\n return;\n case \"ArrowUp\":\n setFocusedContextMenuItem(prevState => {\n return prevState - 1 < 0 ? childrenCount - 1 : prevState - 1;\n });\n return;\n case \"Enter\":\n case \"Space\":\n if (!showContextMenu) {\n setShowContextMenu(true);\n return;\n }\n\n setShouldClick(true);\n setSelectedContextMenuItem(focusedContextMenuItem);\n setShowContextMenu(false);\n return;\n case \"Tab\":\n case \"Escape\":\n setShowContextMenu(false);\n return;\n case \"End\":\n setFocusedContextMenuItem(childrenCount - 1);\n return;\n case \"Home\":\n setFocusedContextMenuItem(0);\n return;\n }\n };\n\n useBodyClick(\n event => {\n return (\n showContextMenu &&\n anchorEl.current !== event.target &&\n anchorEl.current !== (event.target as HTMLElement).parentElement\n );\n },\n () => {\n setShowContextMenu(false);\n },\n showContextMenu\n );\n\n useEffect(() => {\n if (showContextMenu === true) {\n onShow && onShow();\n } else {\n onClose && onClose();\n !hasBeenClosed && setHasBeenClosed(true);\n setFocusedContextMenuItem(-1);\n hasBeenClosed && anchorEl.current && anchorEl.current.focus();\n }\n }, [showContextMenu]);\n\n const renderTrigger = () =>\n React.cloneElement(trigger, {\n id: id,\n \"aria-haspopup\": \"true\",\n \"aria-controls\": `${id}-menu`,\n \"aria-expanded\": showContextMenu,\n onClick: () => setShowContextMenu(!showContextMenu),\n tabIndex: 0,\n ref: anchorEl\n });\n\n const renderChildren = () => {\n return React.Children.map(children, (child, index) => {\n return React.cloneElement(child as ReactElement, {\n onFocusChange: (childIndex: number) => setFocusedContextMenuItem(childIndex),\n onSelectedChange: (childIndex: number) => {\n setSelectedContextMenuItem(childIndex);\n setShouldClick(false);\n },\n childIndex: index,\n hasFocus: focusedContextMenuItem === index,\n isSelected: selectedContextMenuItem === index,\n contextMenuOpened: showContextMenu,\n shouldClick: shouldClick\n });\n });\n };\n\n return (\n <div {...rest} ref={ref} onKeyDown={onArrowNavigation} className={classes[\"context-menu\"]}>\n {renderTrigger()}\n {createPortal(\n <Popover\n placement={placement}\n transformOrigin={transformOrigin}\n offset={offset}\n anchorEl={anchorEl}\n show={showContextMenu}\n >\n {decorativeElement && (\n <div className={classes[\"decorative-element\"]}>{decorativeElement}</div>\n )}\n <ul\n className={`${classes[\"menu\"]} ${decorativeElement ? classes[\"no-margin-top\"] : \"\"}`}\n id={`${id}-menu`}\n aria-describedby={id}\n role=\"menu\"\n >\n {renderChildren()}\n </ul>\n </Popover>,\n domRoot\n )}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, createRef, RefObject, useEffect } from \"react\";\nimport classes from \"./ContextMenuItem.module.scss\";\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"button\">, \"onClick\"> {\n children?: string;\n hasFocus?: boolean;\n isSelected?: boolean;\n childIndex?: number;\n shouldClick?: boolean;\n contextMenuOpened?: boolean;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onFocusChange?: (childIndex: number) => void;\n onSelectedChange?: (childIndex: number) => void;\n}\n\nexport const ContextMenuItem = React.forwardRef<HTMLButtonElement, Props>(\n (\n {\n children,\n onClick,\n onFocusChange,\n onSelectedChange,\n hasFocus,\n isSelected,\n childIndex,\n contextMenuOpened,\n shouldClick,\n className,\n ...rest\n }: Props,\n ref\n ) => {\n let innerButtonRef = (ref as RefObject<HTMLButtonElement>) || createRef<HTMLButtonElement>();\n\n useEffect(() => {\n if (isSelected && innerButtonRef.current && shouldClick) {\n innerButtonRef.current.click();\n }\n }, [isSelected, shouldClick]);\n\n useEffect(() => {\n if (innerButtonRef.current && hasFocus && contextMenuOpened) {\n onFocusChange && childIndex && onFocusChange(childIndex);\n innerButtonRef.current.focus();\n }\n }, [hasFocus, innerButtonRef, contextMenuOpened]);\n\n return (\n <li role=\"none\" className={`${classes[\"context-menu-item\"]} ${className ?? \"\"}`}>\n <button\n role=\"menuitem\"\n {...rest}\n ref={innerButtonRef}\n data-focus={hasFocus}\n tabIndex={-1}\n onClick={event => {\n onClick && onClick(event);\n onSelectedChange && childIndex && onSelectedChange(childIndex);\n }}\n >\n {children}\n </button>\n </li>\n );\n }\n);\n","import React, {\n ComponentPropsWithRef,\n ForwardRefExoticComponent,\n ReactNode,\n RefAttributes\n} from \"react\";\nimport classes from \"./Link.module.scss\";\nimport { LinkProps } from \"./types\";\n\nexport type AnchorType = \"external\" | \"internal\" | \"download\";\n\nexport interface Props extends ComponentPropsWithRef<\"a\"> {\n children?: ReactNode;\n color?: \"primary\" | \"secondary\" | \"tertiary\";\n display?: \"link\" | \"button\";\n buttonVariant?: \"outline\" | \"text\" | \"fill\";\n type?: AnchorType;\n to: string;\n disabled?: boolean;\n component?: ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>;\n}\n\nexport const Link = React.forwardRef<HTMLAnchorElement, Props>(\n (\n {\n children,\n className,\n disabled = false,\n to,\n color = \"primary\",\n type = \"internal\",\n display = \"link\",\n buttonVariant = \"fill\",\n component,\n ...rest\n }: Props,\n ref\n ) => {\n const determineTarget = () => {\n if (rest.target) {\n return rest.target;\n }\n\n if (type === \"external\") {\n return \"_blank\";\n }\n\n return \"\";\n };\n\n const classNames = [classes[color]];\n display === \"link\" && classNames.push(classes[\"link\"]);\n display === \"button\" && classNames.push(classes[\"button\"], classes[buttonVariant]);\n disabled && classNames.push(classes[\"disabled\"]);\n className && classNames.push(className);\n\n if (component) {\n return React.createElement(component, {\n ...rest,\n ref: ref,\n to: to,\n className: classNames.join(\" \"),\n \"aria-disabled\": disabled,\n style: {\n ...rest.style\n },\n children: children\n });\n }\n\n return (\n <a\n {...rest}\n ref={ref}\n download={type === \"download\"}\n rel={type === \"external\" ? \"noopener noreferer\" : undefined}\n href={!disabled ? to : undefined}\n className={classNames.join(\" \")}\n aria-disabled={disabled}\n target={determineTarget()}\n style={{\n ...rest.style\n }}\n >\n {children}\n </a>\n );\n }\n);\n","import React, { Fragment } from \"react\";\nimport { BaseButton, Props as BaseButtonProps } from \"./BaseButton\";\nimport classes from \"./IconButton.module.scss\";\nimport readyclasses from \"../readyclasses.module.scss\";\n\nexport interface Props extends BaseButtonProps {\n children?: React.ReactNode;\n iconSize?: \"s\" | \"m\" | \"l\";\n variant?: \"text\" | \"fill\" | \"outline\";\n className?: string;\n title?: string;\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, Props>(\n (\n { children, color = \"primary\", variant = \"text\", iconSize = \"m\", title, className, ...rest },\n ref\n ) => {\n if (!title) {\n console.error(\"Please make sure to specify a 'title' prop to your IconButton component! \");\n }\n\n const iconButtonClasses = [\n classes[\"icon-button\"],\n classes[variant],\n classes[color],\n classes[\"button-\" + iconSize]\n ];\n\n if (className) {\n iconButtonClasses.push(className);\n }\n\n return (\n <BaseButton {...rest} ref={ref} className={iconButtonClasses.join(\" \")}>\n <Fragment>\n {children}\n <span className={readyclasses[\"sr-only\"]}>{title}</span>\n </Fragment>\n </BaseButton>\n );\n }\n);\n","type KeyValuePair = { [key: string]: unknown };\n\nexport const generateID = (length = 15, stringToWeaveIn?: string) => {\n /** We will make sure to mesh the generate id and name property together to basically create a unique ID */\n let hashCharacters = [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"0\",\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\",\n \"K\",\n \"L\",\n \"M\",\n \"N\",\n \"O\",\n \"P\",\n \"Q\",\n \"R\",\n \"S\",\n \"T\",\n \"U\",\n \"V\",\n \"W\",\n \"X\",\n \"Y\",\n \"Z\",\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\",\n \"g\",\n \"h\",\n \"i\",\n \"j\",\n \"k\",\n \"l\",\n \"m\",\n \"n\",\n \"o\",\n \"p\",\n \"q\",\n \"r\",\n \"s\",\n \"t\",\n \"u\",\n \"v\",\n \"w\",\n \"x\",\n \"y\",\n \"z\"\n ];\n\n let id = \"\";\n\n /** Generate an id of x characters in length */\n for (let i = 0; i < length && id.length < length; i++) {\n let stringCharacter =\n stringToWeaveIn && stringToWeaveIn[i] !== undefined && !/\\s/.test(stringToWeaveIn[i])\n ? stringToWeaveIn[i]\n : \"\";\n id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];\n }\n\n return id.slice(0, length);\n};\n\nexport const filterProps = (props: any, regexPattern: RegExp, returnFiltered: boolean = true) => {\n if (returnFiltered) {\n return Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n } else {\n return Object.entries(props)\n .filter(([key]) => !regexPattern.test(key))\n .reduce(\n (prevObj, currKeyValPair) => ({ ...prevObj, [currKeyValPair[0]]: currKeyValPair[1] }),\n {}\n );\n }\n};\n","import React, { ComponentPropsWithRef, useEffect } from \"react\";\nimport classes from \"./TabButton.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"button\"> {\n children?: string;\n selected?: boolean;\n focussed?: boolean;\n tabId?: string;\n tabPanelId?: string;\n onTabButtonClick?: () => void;\n}\n\nexport const TabButton = React.forwardRef<HTMLButtonElement, Props>(\n (\n {\n children,\n selected = false,\n focussed = false,\n tabId,\n tabPanelId,\n className,\n onTabButtonClick,\n ...rest\n }: Props,\n ref\n ) => {\n useEffect(() => {\n if (focussed && ref) {\n (ref as React.MutableRefObject<HTMLButtonElement>).current.focus();\n }\n }, [focussed]);\n\n const classNames = [classes[\"tabbutton\"]];\n\n selected && classNames.push(classes[\"selected\"]);\n focussed && !selected && classNames.push(classes[\"focussed\"]);\n className && classNames.push(className);\n\n return (\n <button\n {...rest}\n aria-selected={selected}\n key={tabId}\n className={classNames.join(\" \")}\n ref={ref}\n role=\"tab\"\n tabIndex={selected ? 0 : -1}\n type=\"button\"\n aria-controls={tabPanelId}\n id={tabId}\n onClick={onTabButtonClick}\n >\n <span aria-hidden=\"true\">{children}</span>\n {children}\n </button>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./TabPanel.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: React.ReactNode;\n tabId: string;\n tabPanelId: string;\n selected?: boolean;\n}\n\nexport const TabPanel = React.forwardRef<HTMLDivElement, Props>(\n ({ children, tabId, tabPanelId, selected = false, className, ...rest }: Props, ref) => (\n <div\n {...rest}\n ref={ref}\n aria-labelledby={tabId}\n className={`${classes[\"tabpanel\"]} ${selected ? classes[\"selected\"] : \"\"} ${className ?? \"\"}`}\n id={tabPanelId}\n role=\"tabpanel\"\n tabIndex={0}\n hidden={!selected || undefined}\n aria-hidden={!selected}\n >\n {children}\n </div>\n )\n);\n","import React, { useRef, MouseEventHandler, useState, ComponentPropsWithRef } from \"react\";\nimport { Popover } from \"../Popover/Popover\";\nimport classes from \"./TextEllipsis.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: string;\n popoverClassName?: string;\n}\n\nexport const TextEllipsis = React.forwardRef<HTMLDivElement, Props>(\n ({ children, popoverClassName, className, ...rest }: Props, ref) => {\n const [showPopover, setShowPopover] = useState(false);\n const textContainer = useRef<HTMLDivElement>(null);\n\n const ellipsisVisible = () => {\n if (\n textContainer.current &&\n textContainer.current.offsetWidth < textContainer.current.scrollWidth\n ) {\n return true;\n }\n return false;\n };\n\n const onMouseEnter: MouseEventHandler<HTMLDivElement> = () => {\n ellipsisVisible() && setShowPopover(true);\n };\n\n const onMouseLeave: MouseEventHandler<HTMLDivElement> = () => {\n ellipsisVisible() && setShowPopover(false);\n };\n\n return (\n <div\n {...rest}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n className={`${classes[\"text-ellipsis\"]} ${className ?? \"\"}`}\n ref={ref || textContainer}\n >\n {children}\n <Popover\n aria-hidden={true}\n data-hidden={!showPopover}\n show={showPopover}\n role=\"tooltip\"\n anchorEl={textContainer}\n className={`${classes.popover} ${popoverClassName ?? \"\"}`}\n >\n {children}\n </Popover>\n </div>\n );\n }\n);\n","import React, {\n ComponentPropsWithoutRef,\n ComponentPropsWithRef,\n ReactElement,\n useState\n} from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport classes from \"./Tile.module.scss\";\nimport readyClasses from \"../readyclasses.module.scss\";\n\nimport { Props as ContextMenuProps } from \"../ContextMenu/ContextMenu\";\nimport { generateID } from \"../util/helper\";\nimport { Props as IconButtonProps } from \"../Button/IconButton\";\n\ninterface ImageProps extends ComponentPropsWithoutRef<\"img\"> {\n src: string;\n}\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n title: string;\n imageProps?: ImageProps;\n enabled?: boolean;\n loading?: boolean;\n tileAction?: ReactElement<ContextMenuProps> | ReactElement<IconButtonProps>;\n}\n\nexport const Tile = React.forwardRef<HTMLDivElement, Props>(\n ({ title, imageProps, enabled, className, loading, tileAction, ...rest }: Props, ref) => {\n const [tileDescriptionID] = useState(generateID(20));\n\n if (!title) {\n throw new Error(\"Please make sure to pass a title prop to your Tile component.\");\n }\n\n const statusMessage = () => {\n if (enabled) {\n return \"Status: enabled\";\n }\n\n return \"Status: disabled\";\n };\n\n return (\n <article\n {...rest}\n tabIndex={0}\n aria-labelledby={tileDescriptionID}\n ref={ref}\n className={`${classes[\"tile\"]} ${loading ? classes[\"loading\"] : \"\"}`}\n >\n <header style={{ justifyContent: enabled === undefined ? \"flex-end\" : \"space-between\" }}>\n {enabled === true && (\n <Icon\n color=\"var(--success)\"\n icon={Icons.Checkmark}\n className={`${classes[\"icon\"]} ${className ?? \"\"}`}\n />\n )}\n {enabled === false && (\n <Icon\n color=\"var(--greyed-out)\"\n icon={Icons.Forbidden}\n className={`${classes[\"icon\"]} ${className ?? \"\"}`}\n />\n )}\n {enabled !== undefined && (\n <span id={tileDescriptionID} className={readyClasses[\"sr-only\"]}>\n {`${title}. ${statusMessage()}`}\n </span>\n )}\n {tileAction ?? null}\n </header>\n <div className={classes[\"content\"]}>\n {imageProps && imageProps.src.length > 0 && (\n <figure className={classes[\"image\"]}>\n {!loading && <img {...imageProps} alt=\"\" />}\n </figure>\n )}\n {(!imageProps || imageProps.src.length === 0) && (\n <Icon className={classes[\"placeholder\"]} icon={Icons.Image} />\n )}\n <span className={classes[\"title\"]}>{title}</span>\n </div>\n </article>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport classes from \"./Tiles.module.scss\";\nimport { Tile } from \"./Tile\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: ReactNode;\n loading?: boolean;\n}\n\nexport const Tiles = React.forwardRef<HTMLDivElement, Props>(\n ({ children, className, loading = false, ...rest }: Props, ref) => {\n const renderChildren = () => {\n if (loading) {\n return [\n <Tile\n key=\"placeholder1\"\n title=\"placeholder\"\n imageProps={{ src: \"placeholder\" }}\n loading={true}\n />,\n <Tile\n key=\"placeholder2\"\n title=\"placeholder\"\n imageProps={{ src: \"placeholder\" }}\n loading={true}\n />,\n <Tile\n key=\"placeholder3\"\n title=\"placeholder\"\n imageProps={{ src: \"placeholder\" }}\n loading={true}\n />\n ];\n }\n\n return children;\n };\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${classes[\"tiles\"]} ${className ?? \"\"}`}\n aria-live=\"polite\"\n aria-busy={loading}\n >\n {renderChildren()}\n </div>\n );\n }\n);\n","import React, {\n ComponentPropsWithRef,\n ReactNode,\n useEffect,\n useLayoutEffect,\n useRef,\n useState\n} from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport classes from \"./Tooltip.module.scss\";\nimport { generateID } from \"../util/helper\";\nimport { Offset, Placement, usePosition } from \"../hooks/usePosition\";\nimport { createPortal } from \"react-dom\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n label: string | ReactNode;\n children: string;\n placement?: Placement;\n offset?: Offset;\n transformOrigin?: Placement;\n domRoot?: HTMLElement;\n}\n\ninterface DefaultPosition {\n placement: Placement;\n offset: Offset;\n transformOrigin: Placement;\n}\n\nconst defaultPosition: DefaultPosition = {\n placement: { horizontal: \"right\", vertical: \"center\" },\n offset: { left: 16, right: 0, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"center\" }\n};\n\nexport const Tooltip = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n className,\n placement = defaultPosition.placement,\n offset = defaultPosition.offset,\n transformOrigin = defaultPosition.transformOrigin,\n domRoot = document.body,\n label,\n ...rest\n }: Props,\n ref\n ) => {\n const [identifier] = useState(generateID());\n const [visible, setVisible] = useState(false);\n\n const relativeElement = useRef<HTMLDivElement>(null);\n const elementToBePositioned = useRef<HTMLDivElement>(null);\n\n const { top, bottom, right, left, calculatePosition } = usePosition({\n relativeElement: relativeElement,\n elementToBePositioned: elementToBePositioned,\n placement: placement,\n offset: offset,\n transformOrigin: transformOrigin\n });\n\n useEffect(() => {\n if (!visible) return;\n\n function escapePressHandler(event: KeyboardEvent) {\n if (event.key === \"Escape\") {\n setVisible(false);\n }\n }\n\n document.addEventListener(\"keyup\", escapePressHandler);\n\n return () => {\n document.removeEventListener(\"keyup\", escapePressHandler);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n calculatePosition();\n }, [visible]);\n\n const renderChildren = () => {\n if (React.isValidElement(label)) {\n return React.cloneElement(label, {\n onFocus: () => setVisible(true),\n onBlur: () => setVisible(false),\n \"aria-describedby\": identifier,\n tabIndex: 0,\n className: classes[\"label\"]\n });\n }\n\n return (\n <span\n className={classes[\"label\"]}\n tabIndex={0}\n onFocus={() => setVisible(true)}\n onBlur={() => setVisible(false)}\n aria-describedby={identifier}\n >\n {label}\n </span>\n );\n };\n\n return (\n <div {...rest} ref={ref} className={`${classes.wrapper} ${className ?? \"\"}`}>\n {renderChildren()}\n <div className={`${classes[\"tooltip-wrapper\"]}`}>\n <Icon\n ref={relativeElement}\n tag=\"div\"\n onMouseEnter={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n icon={Icons.InfoCircle}\n className={classes.icon}\n />\n {createPortal(\n <div\n ref={elementToBePositioned}\n style={{\n ...rest.style,\n top: top,\n left: left,\n right: right,\n bottom: bottom\n }}\n aria-hidden={!visible}\n id={identifier}\n className={`${classes.tooltip} ${visible ? classes.visible : \"\"}`}\n >\n {children}\n </div>,\n domRoot\n )}\n </div>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./Skeleton.module.scss\";\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"children\"> {\n variant?: \"circular\" | \"rectangle\" | \"text\";\n height?: number | string;\n width?: number | string;\n}\n\nexport const Skeleton = React.forwardRef<HTMLDivElement, Props>(\n ({ variant = \"text\", height, width, className, style, ...rest }: Props, ref) => {\n const classNames = [classes[\"skeleton\"]];\n !height && classNames.push(classes[\"no-height\"]);\n variant === \"text\" && classNames.push(classes[\"text\"]);\n variant === \"circular\" && classNames.push(classes[\"circular\"]);\n className && classNames.push(className);\n\n return (\n <span\n {...rest}\n aria-busy=\"true\"\n aria-hidden=\"true\"\n ref={ref}\n style={{ ...style, width, height }}\n className={classNames.join(\" \")}\n ></span>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport { Typography, Props as TypographyProps } from \"../Typography/Typography\";\nimport classes from \"./StatusIndicator.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactNode;\n status: \"active\" | \"error\" | \"neutral\" | \"warning\";\n badgeProps?: ComponentPropsWithRef<\"div\">;\n typographyProps?: TypographyProps;\n}\n\nexport const StatusIndicator = React.forwardRef<HTMLDivElement, Props>(\n ({ children, status, badgeProps, typographyProps, ...rest }: Props, ref) => {\n return (\n <div {...rest} className={classes[\"status-indicator\"]} ref={ref}>\n <div\n className={`${classes[\"status-badge\"]} ${classes[status]} ${badgeProps?.className ?? \"\"}`}\n />\n <Typography {...typographyProps} spacing={{ margin: \"0\" }} variant=\"body\" tag=\"div\">\n {typographyProps?.children || children}\n </Typography>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, Ref, useEffect, useRef, useState } from \"react\";\nimport classes from \"./Input.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { FormElement } from \"../form.interfaces\";\n\nconst dateTypes = [\"date\", \"time\", \"datetime-local\"] as const;\n\nexport type Type =\n | \"text\"\n | \"email\"\n | \"file\"\n | \"number\"\n | \"password\"\n | \"search\"\n | \"tel\"\n | \"url\"\n | \"hidden\"\n | typeof dateTypes[number];\n\nexport interface Props extends ComponentPropsWithRef<\"input\">, FormElement {\n wrapperProps?: ComponentPropsWithRef<\"div\">;\n labeledBy?: string;\n type: Type;\n suffix?: string;\n prefix?: string;\n}\n\nconst useErrorOffset = (\n suffix: React.RefObject<HTMLDivElement>,\n errorIcon: React.RefObject<HTMLDivElement>,\n inputWrapper: React.RefObject<HTMLDivElement>,\n error: boolean,\n type: Type,\n suffixContent: string = \"\"\n) => {\n const [errorOffset, setErrorOffset] = useState({});\n const [defaultErrorOffset, setDefaultErrorOffset] = useState<number | null>(null);\n\n const getErrorIconOffset = () => parseFloat(getComputedStyle(errorIcon.current!).right);\n const getInputPaddingRight = (input: HTMLDivElement) =>\n (dateTypes as ReadonlyArray<string>).includes(type)\n ? 0\n : parseFloat(getComputedStyle(input).paddingRight);\n\n useEffect(() => {\n if (errorIcon.current && inputWrapper.current) {\n let defaultOffset = defaultErrorOffset;\n if (!defaultOffset) {\n defaultOffset = getErrorIconOffset();\n setDefaultErrorOffset(defaultOffset);\n }\n\n if (suffix.current && suffixContent) {\n const inputPaddingRight = getInputPaddingRight(inputWrapper.current);\n const prefixDifference = suffix.current.offsetWidth + inputPaddingRight + defaultOffset;\n setErrorOffset({ right: `${prefixDifference}px` });\n } else {\n setErrorOffset({ right: `${defaultOffset}px` });\n }\n }\n }, [suffix.current, errorIcon.current, inputWrapper.current, error, type, suffixContent]);\n\n return { errorOffset };\n};\n\nexport const Input = React.forwardRef(\n (\n {\n error = false,\n className,\n name,\n style,\n wrapperProps,\n type,\n labeledBy,\n prefix,\n suffix,\n disabled,\n onFocus,\n onBlur,\n ...rest\n }: Props,\n ref: Ref<HTMLInputElement>\n ) => {\n const [focus, setFocus] = useState(false);\n const inputWrapperRef = useRef<HTMLDivElement>(null);\n const errorIconRef = useRef<HTMLDivElement>(null);\n const suffixRef = useRef<HTMLDivElement>(null);\n const { errorOffset } = useErrorOffset(\n suffixRef,\n errorIconRef,\n inputWrapperRef,\n error,\n type,\n suffix\n );\n\n useEffect(() => {\n if (name === undefined) {\n throw new Error(\"Please give your <Input /> component a 'name' attribute\");\n }\n }, []);\n\n const inputClassNames = [classes[\"input\"]];\n\n (dateTypes as ReadonlyArray<string>).includes(type) &&\n inputClassNames.push(classes[\"remove-extra-indent\"]);\n className && inputClassNames.push(className);\n\n const iconClassNames = [classes[\"warning\"]];\n (dateTypes as ReadonlyArray<string>).includes(type) &&\n iconClassNames.push(classes[\"extra-indent\"]);\n\n const wrapperClasses = [classes[\"input-wrapper\"]];\n const outlineClasses = [classes[\"outline\"]];\n\n wrapperProps?.className && wrapperClasses.push(wrapperProps.className);\n type === \"hidden\" && wrapperClasses.push(readyclasses[\"hidden\"]);\n prefix && wrapperClasses.push(classes[\"prefix\"]);\n suffix && wrapperClasses.push(classes[\"suffix\"]);\n disabled &&\n wrapperClasses.push(classes[\"disabled\"]) &&\n outlineClasses.push(classes[\"disabled\"]);\n error && wrapperClasses.push(classes[\"error\"]) && outlineClasses.push(classes[\"error\"]);\n focus && wrapperClasses.push(classes[\"focus\"]) && outlineClasses.push(classes[\"focus\"]);\n\n return (\n <div\n ref={inputWrapperRef}\n {...wrapperProps}\n style={{ ...style }}\n className={`${classes[\"input-wrapper\"]} ${wrapperClasses.join(\" \")}`}\n >\n {prefix && (\n <div data-prefix className={classes[\"prefix\"]}>\n <span>{prefix}</span>\n </div>\n )}\n <input\n {...rest}\n ref={ref}\n onFocus={event => {\n setFocus(true);\n onFocus && onFocus(event);\n }}\n onBlur={event => {\n setFocus(false);\n onBlur && onBlur(event);\n }}\n aria-labelledby={labeledBy}\n type={type}\n name={name}\n disabled={disabled}\n className={inputClassNames.join(\" \")}\n />\n {suffix && (\n <div ref={suffixRef} data-suffix className={classes[\"suffix\"]}>\n <span>{suffix}</span>\n </div>\n )}\n {error && (\n <Icon\n style={errorOffset}\n ref={errorIconRef}\n className={iconClassNames.join(\" \")}\n icon={Icons.Error}\n />\n )}\n <span className={outlineClasses.join(\" \")}></span>\n </div>\n );\n }\n);\n","import classes from \"./Select.module.scss\";\n\nimport React, {\n ComponentPropsWithRef,\n createRef,\n Fragment,\n ReactElement,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { Input, Props as InputProps } from \"../Input/Input\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { FormElement } from \"../form.interfaces\";\nimport { useBodyClick } from \"../../hooks/useBodyClick\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { filterProps } from \"../../util/helper\";\n\ntype PartialInputProps = Partial<InputProps>;\n\nexport interface Props extends ComponentPropsWithRef<\"select\">, FormElement {\n children: ReactElement[];\n name?: string;\n labeledBy?: string;\n describedBy?: string;\n placeholder?: string;\n searchPlaceholder?: string;\n searchInputProps?: PartialInputProps;\n selectButtonProps?: ComponentPropsWithRef<\"button\">;\n className?: string;\n value: string;\n clearLabel?: string;\n onChange?: (event: React.ChangeEvent<HTMLSelectElement>, child?: ReactElement) => void;\n onClear?: (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\ntype Position = {\n top: 0 | \"initial\";\n bottom: 0 | \"initial\";\n};\n\n/** Amount of items to be rendered before a search input is rendered */\nconst renderSearchCondition = 10;\n\nexport const Select = React.forwardRef<HTMLSelectElement, Props>(\n (\n {\n children,\n name,\n disabled = false,\n labeledBy,\n placeholder,\n describedBy,\n searchPlaceholder = \"Search item\",\n searchInputProps,\n selectButtonProps,\n className,\n error = false,\n value,\n clearLabel = \"Clear selection\",\n onChange,\n onClear,\n ...rest\n }: Props,\n ref\n ) => {\n const [expanded, setExpanded] = useState(false);\n const [opacity, setOpacity] = useState(0); // We set opacity because other wise if we calculate the max height you see the list full height for a split second and then it shortens.\n const [filter, setFilter] = useState(\"\");\n const [display, setDisplay] = useState(\"\");\n const [listPosition, setListPosition] = useState<Partial<Position>>({});\n const [optionsListMaxHeight, setOptionsListMaxHeight] = useState(\"none\");\n const containerReference = useRef<HTMLDivElement>(null);\n const optionListReference = useRef<HTMLDivElement>(null);\n const [isSearching, setIsSearching] = useState(false);\n const [focusedSelectItem, setFocusedSelectItem] = useState(-1);\n const [shouldClick, setShouldClick] =\n useState(\n false\n ); /** We need this, because whenever we use the arrow keys to select the select item, and we focus the currently selected item it fires the \"click\" listener in Option component. Instead, we only want this to fire if we press \"enter\" or \"spacebar\" so we set this to true whenever that is the case, and back to false when it has been executed. */\n const [childrenCount] = useState(React.Children.count(children));\n\n const nativeSelect = (ref as React.RefObject<HTMLSelectElement>) || createRef();\n const searchInputRef = useRef<HTMLInputElement>(null);\n\n const onArrowNavigation = (event: React.KeyboardEvent) => {\n const codesToPreventDefault = [\n \"ArrowDown\",\n \"ArrowUp\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Space\",\n \"Escape\",\n \"End\",\n \"Home\"\n ];\n\n const codesToPreventDefaultWhenSearching = [\"ArrowDown\", \"ArrowUp\", \"Enter\", \"Escape\"];\n\n /** If the select is expanded, we also want to control the Tab key */\n if (expanded) {\n codesToPreventDefault.push(\"Tab\");\n }\n\n /** We will handle the way certain key strokes affect the Select, unless we're searching */\n if (codesToPreventDefault.includes(event.code) && !isSearching) {\n event.preventDefault();\n }\n\n if (isSearching && codesToPreventDefaultWhenSearching.includes(event.code)) {\n event.preventDefault();\n }\n\n if (isSearching) {\n switch (event.code) {\n case \"ArrowDown\":\n case \"Enter\":\n setIsSearching(false);\n setFocusedSelectItem(0);\n return;\n case \"ArrowUp\":\n setIsSearching(false);\n setFocusedSelectItem(childrenCount - 1);\n return;\n case \"Escape\":\n case \"Tab\":\n setIsSearching(false);\n setExpanded(false);\n containerReference.current &&\n containerReference.current.querySelector(\"button\")!.focus();\n }\n } else {\n switch (event.code) {\n case \"ArrowDown\":\n if (!expanded) {\n setExpanded(true);\n return;\n }\n setFocusedSelectItem(prevState => {\n return prevState + 1 > childrenCount - 1 ? 0 : prevState + 1;\n });\n return;\n case \"ArrowUp\":\n setFocusedSelectItem(prevState => {\n return prevState - 1 < 0 ? childrenCount - 1 : prevState - 1;\n });\n return;\n case \"Space\":\n if (!expanded) {\n setExpanded(true);\n return;\n }\n\n setShouldClick(true);\n setExpanded(false);\n containerReference.current &&\n containerReference.current.querySelector(\"button\")!.focus();\n return;\n case \"Tab\":\n if (childrenCount >= renderSearchCondition && expanded) {\n setIsSearching(true);\n searchInputRef.current && searchInputRef.current.focus();\n return;\n }\n setExpanded(false);\n\n return;\n case \"Escape\":\n if (expanded) {\n setExpanded(false);\n containerReference.current &&\n containerReference.current.querySelector(\"button\")!.focus();\n }\n return;\n case \"End\":\n setFocusedSelectItem(childrenCount - 1);\n return;\n case \"Home\":\n setFocusedSelectItem(0);\n return;\n }\n }\n };\n\n const syncDisplayValue = (val: string) => {\n React.Children.forEach(children, child => {\n if (child.props.value === val) {\n setDisplay(child.props.children);\n }\n });\n };\n\n const rePositionList = () => {\n if (!expanded || !optionListReference.current || !containerReference.current) {\n return;\n }\n\n // Check whether there is more space above or below the select\n // Check space between the bottom of select and top of viewport\n const spaceOnTopOfSelect = containerReference.current.getBoundingClientRect().bottom;\n\n // Check space between the top of the select and bottom of viewport\n const spaceOnBottomOfSelect =\n window.innerHeight - containerReference.current.getBoundingClientRect().top;\n\n // Set position as if there's more space on the bottom\n let position: Position = { top: 0, bottom: \"initial\" };\n\n // Set the position of the select\n if (spaceOnTopOfSelect > spaceOnBottomOfSelect) {\n position = { top: \"initial\", bottom: 0 };\n }\n\n setListPosition(position);\n\n // Calculate the potential max height of the options list\n calculateOptionListMaxHeight(position);\n };\n\n const calculateOptionListMaxHeight = (position: Position) => {\n // Calculate max height if there's more space below the select\n const listHeight = optionListReference.current!.getBoundingClientRect().height;\n const transformOrigin = position.top !== \"initial\" ? \"top\" : \"bottom\";\n\n const availableSpace =\n transformOrigin === \"top\"\n ? window.innerHeight -\n containerReference.current!.getBoundingClientRect()[transformOrigin] -\n 16\n : containerReference.current!.getBoundingClientRect()[transformOrigin] - 16;\n\n if (availableSpace < listHeight) {\n setOptionsListMaxHeight(`${availableSpace}px`);\n setOpacity(100);\n return;\n }\n\n setOptionsListMaxHeight(\"none\");\n setOpacity(100);\n };\n\n const onOptionChangeHandler = (optionRef: React.RefObject<HTMLLIElement>) => {\n if (nativeSelect.current && optionRef.current) {\n nativeSelect.current.value = optionRef.current.getAttribute(\"data-value\")!;\n nativeSelect.current.dispatchEvent(new Event(\"change\", { bubbles: true }));\n }\n\n setExpanded(false);\n\n containerReference.current && containerReference.current.querySelector(\"button\")!.focus();\n };\n\n /**\n * @description We have to modify the children (Option component) to have a additional props that allows us to keep track of which one is selected and focused at all times and if a filter is active.\n * The `children` prop can be either a single object (1 child) or an array of multiple children.\n */\n const renderOptions = () => {\n if (isSearching || filter !== \"\") {\n const filteredChildren = React.Children.toArray(children).filter(\n child =>\n (child as ReactElement).props.children.toLowerCase().match(filter.toLowerCase()) !==\n null\n );\n\n return _internalRenderChildren(filteredChildren as ReactElement[]);\n }\n\n return _internalRenderChildren(children);\n\n function _internalRenderChildren(internalChildren: ReactElement[]) {\n return React.Children.map(internalChildren, (child, index) => {\n return React.cloneElement(child, {\n onFocusChange: (childIndex: number) => setFocusedSelectItem(childIndex),\n onOptionSelect: (optionRef: React.RefObject<HTMLLIElement>) => {\n onOptionChangeHandler(optionRef);\n setShouldClick(false);\n },\n isSelected: child.props.value === value,\n isSearching: isSearching,\n selectOpened: expanded,\n childIndex: index,\n hasFocus: focusedSelectItem === index,\n shouldClick: shouldClick\n });\n });\n }\n };\n\n const renderSearch = () => (\n <Input\n {...searchInputProps}\n autoFocus\n ref={searchInputRef}\n onFocus={() => setIsSearching(true)}\n onBlur={() => setIsSearching(false)}\n onChange={filterResults}\n className={classes[\"select-search\"]}\n wrapperProps={{\n className: `${classes[\"select-search-wrapper\"]} ${searchInputProps?.wrapperProps?.className}`\n }}\n type=\"text\"\n name=\"search-option\"\n placeholder={searchPlaceholder}\n />\n );\n\n const filterResults = (event: React.ChangeEvent<HTMLInputElement>) => {\n setFilter(event.currentTarget.value);\n };\n\n const statusIcon = () => {\n if (error) {\n return <Icon className={classes[\"warning\"]} icon={Icons.Warning} />;\n }\n\n if (value?.length !== 0 && onClear) {\n return (\n <div\n aria-hidden={false}\n role=\"button\"\n tabIndex={0}\n data-clear\n onClick={(e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n e.preventDefault();\n e.stopPropagation();\n onClear(e);\n }}\n onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.code === \"Enter\" || e.code === \"Space\") {\n e.preventDefault();\n e.stopPropagation();\n onClear(e);\n containerReference.current &&\n containerReference.current.querySelector(\"button\")!.focus();\n }\n }}\n >\n <span className={readyclasses[\"sr-only\"]}>{clearLabel}</span>\n <Icon tag=\"span\" icon={Icons.TimesThin} />\n </div>\n );\n }\n return null;\n };\n\n const nativeOnChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n onChange && onChange(event);\n };\n\n useEffect(() => {\n syncDisplayValue(value);\n }, [value]);\n\n useEffect(() => {\n rePositionList();\n }, [expanded]);\n\n useBodyClick(\n (event: MouseEvent) => !(event.target as Element).closest(\".custom-select\") && expanded,\n () => {\n setExpanded(false);\n setListPosition({ top: 0, bottom: \"initial\" });\n setOpacity(0);\n },\n expanded\n );\n\n const additionalClasses = [];\n expanded && additionalClasses.push(classes.expanded);\n error && additionalClasses.push(classes.error);\n disabled && additionalClasses.push(classes.disabled);\n className && additionalClasses.push(className);\n\n /** The native select is purely for external form libraries. We use it to emit an onChange with native select event object so they know exactly what's happening. */\n return (\n <Fragment>\n <select\n {...filterProps(rest, /^data-/, false)}\n tabIndex={-1}\n aria-hidden=\"true\"\n ref={nativeSelect}\n name={name}\n onChange={nativeOnChangeHandler}\n className={readyclasses[\"sr-only\"]}\n >\n <option value=\"\"></option>\n {React.Children.map(children, child => (\n <option value={child.props.value}></option>\n ))}\n </select>\n <div\n {...filterProps(rest, /^data-/)}\n ref={containerReference}\n onKeyDown={onArrowNavigation}\n className={`custom-select ${classes.select} ${additionalClasses.join(\" \")} ${\n className ?? \"\"\n }`}\n >\n <button\n {...selectButtonProps}\n onClick={() => {\n setExpanded(!expanded);\n }}\n type=\"button\"\n name={name}\n className={`${classes[\"custom-select\"]} ${additionalClasses.join(\" \")} `}\n disabled={disabled}\n aria-disabled={disabled}\n aria-invalid={error}\n aria-expanded={expanded}\n aria-haspopup=\"listbox\"\n aria-labelledby={labeledBy}\n aria-describedby={describedBy}\n >\n <div data-display className={classes[\"selected\"]}>\n {!value && placeholder && (\n <span className={classes[\"placeholder\"]}>{placeholder}</span>\n )}\n {value?.length > 0 && <span data-display-inner>{display}</span>}\n </div>\n <div className={classes[\"status\"]}>\n {statusIcon()}\n <Icon className={classes[\"triangle-down\"]} icon={Icons.TriangleDown} />\n </div>\n </button>\n <div\n ref={optionListReference}\n className={`list-wrapper ${classes[\"list-wrapper\"]}`}\n style={{\n display: expanded ? \"block\" : \"none\",\n opacity: opacity,\n maxHeight: optionsListMaxHeight,\n pointerEvents: expanded ? \"auto\" : \"none\",\n ...listPosition\n }}\n >\n {Array.isArray(children) && children.length > renderSearchCondition && renderSearch()}\n <ul role=\"listbox\">{renderOptions()}</ul>\n </div>\n </div>\n </Fragment>\n );\n }\n);\n","import React, { ComponentPropsWithRef, createRef, RefObject, useEffect } from \"react\";\nimport classes from \"./Select.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"li\"> {\n children: string;\n value: string;\n disabled?: boolean;\n isSelected?: boolean;\n selectOpened?: boolean;\n hasFocus?: boolean;\n shouldClick?: boolean;\n isSearching?: boolean;\n label?: string;\n childIndex?: number;\n onOptionSelect?: (ref: React.RefObject<HTMLLIElement>) => void;\n onFocusChange?: (childIndex: number) => void;\n}\n\nexport const Option = React.forwardRef<HTMLLIElement, Props>(\n (\n {\n children,\n className,\n isSelected = false,\n shouldClick,\n hasFocus,\n selectOpened,\n isSearching,\n childIndex,\n onOptionSelect,\n onFocusChange,\n disabled,\n value,\n ...rest\n }: Props,\n ref\n ) => {\n let innerOptionRef = (ref as RefObject<HTMLLIElement>) || createRef<HTMLLIElement>();\n\n useEffect(() => {\n if (isSelected && innerOptionRef.current && shouldClick) {\n innerOptionRef.current.click();\n }\n }, [isSelected, shouldClick]);\n\n useEffect(() => {\n if (innerOptionRef.current && hasFocus && selectOpened && !isSearching) {\n onFocusChange && childIndex && onFocusChange(childIndex);\n innerOptionRef.current.focus();\n }\n }, [hasFocus, innerOptionRef, selectOpened, isSearching]);\n\n const onSelectHandler = () => {\n if (onOptionSelect) onOptionSelect(innerOptionRef);\n };\n\n return (\n <li\n {...rest}\n ref={innerOptionRef}\n data-value={value}\n className={`${isSelected ? classes[\"selected-option\"] : \"\"} ${\n disabled ? classes.disabled : \"\"\n } ${className ?? \"\"}`}\n onClick={onSelectHandler}\n onKeyDownCapture={event => {\n if (event.code === \"Enter\") {\n event.stopPropagation();\n event.preventDefault();\n\n onSelectHandler();\n }\n }}\n aria-selected={isSelected}\n role=\"option\"\n tabIndex={disabled ? -1 : 0}\n >\n {children}\n </li>\n );\n }\n);\n","import React, { ComponentPropsWithRef, Fragment, useState } from \"react\";\nimport classes from \"./Pagination.module.scss\";\nimport readyclasses from \"../readyclasses.module.scss\";\nimport { IconButton } from \"../Button/IconButton\";\nimport { Icons, Icon } from \"../Icon/Icon\";\nimport { Input } from \"../Form/Input/Input\";\nimport { Select } from \"../Form/Select/Select\";\nimport { Option } from \"../Form/Select/Option\";\nimport { Label } from \"../Form/Label/Label\";\n\nexport type PaginationTranslations = {\n totalItems: string;\n itemsPerPage: string;\n itemsPerPageLabel: string;\n currentPage: string;\n currentPageLabel: string;\n};\n\nexport type PageChangeLabels = \"next\" | \"previous\" | \"first\" | \"last\";\n\nenum DefaultTranslations {\n totalItems = \"Total items\",\n itemsPerPage = \"Items per page\",\n currentPage = \"Page %1 of %2\",\n itemsPerPageLabel = \"Select how many items per page you want to see.\",\n currentPageLabel = \"What page you are currently on.\"\n}\n\nexport type PageSize = 10 | 25 | 50;\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"translate\"> {\n currentPage?: number;\n totalElements?: number;\n pageSize?: PageSize;\n translate?: PaginationTranslations;\n onPageChange: (pageToGoTo: number) => void;\n onPageSizeChange: (pageSize: PageSize) => void;\n}\n\nexport const Pagination = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n totalElements,\n pageSize = 10,\n translate = DefaultTranslations,\n currentPage,\n className,\n onPageChange,\n onPageSizeChange,\n ...rest\n }: Props,\n ref\n ) => {\n /** We use an internal state variable, because we don't want to fire onCurrentPageChange whenever onChange fires on the input. Rather, only when the Enter key is pressed. */\n const [internalCurrentPage, setInternalCurrentPage] = useState(currentPage?.toString() || \"1\");\n const calculateAmountOfPages = () => {\n if (!totalElements) return 1;\n\n if (Math.ceil(totalElements / pageSize) < 1) {\n return 1;\n }\n\n return Math.ceil(totalElements / pageSize);\n };\n\n const onEnterListener = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.code === \"Enter\") {\n onPageChange(Number(internalCurrentPage));\n }\n };\n\n const renderCurrentPageTranslation = () => {\n const amountOfPages = calculateAmountOfPages();\n\n if (amountOfPages) {\n const splitCurrentPageTranslation = translate.currentPage.split(\" \");\n\n return splitCurrentPageTranslation.map(string => {\n if (string.includes(\"%1\")) {\n return (\n <Fragment key={string}>\n <Label\n id=\"current-value-input-label\"\n htmlFor=\"current-value-input\"\n className={`${readyclasses[\"sr-only\"]} ${classes[\"current-value-input-label\"]}`}\n >\n {translate.currentPageLabel}\n </Label>\n <Input\n aria-labelledby=\"current-value-input-label\"\n key=\"input\"\n id=\"current-value-input\"\n type=\"text\"\n size={currentPage?.toString().length}\n max={calculateAmountOfPages()}\n wrapperProps={{ className: classes[\"current-value-input\"] }}\n onKeyUp={onEnterListener}\n onBlur={(event: React.ChangeEvent<HTMLInputElement>) =>\n onPageChange(Number(event.target.value))\n }\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setInternalCurrentPage(e.target.value)\n }\n name=\"current-value-input\"\n value={internalCurrentPage}\n className={`${classes[\"form-element\"]} ${classes[\"current-page-input\"]}`}\n />\n </Fragment>\n );\n }\n\n if (string.includes(\"%2\")) {\n return (\n <div key={string}>\n <strong>{string.replace(\"%2\", amountOfPages.toString())}</strong>&nbsp;\n </div>\n );\n }\n\n return <div key={string}>{string}&nbsp;</div>;\n });\n }\n\n return null;\n };\n\n const onPageSizeChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const pageSizeNumber = Number(event.target.value) as PageSize;\n onPageSizeChange(pageSizeNumber);\n };\n\n const onPageChangeHandler = (pageToGoTo: number) => {\n onPageChange(pageToGoTo);\n };\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${classes[\"pagination-wrapper\"]} ${className ? className : \"\"}`}\n >\n {totalElements && (\n <div className={classes[\"total\"]}>\n <span tabIndex={0}>\n {translate.totalItems}: <span>{totalElements}</span>\n </span>\n </div>\n )}\n <div className={classes[\"pagination\"]}>\n {pageSize && (\n <div className={classes[\"per-page\"]}>\n <Label id=\"page-size-select-label\">{translate.itemsPerPage}</Label>\n <Select\n labeledBy=\"page-size-select-label\"\n className={`${classes[\"form-element\"]} ${classes[\"page-size-select\"]}`}\n value={pageSize.toString()}\n onChange={onPageSizeChangeHandler}\n >\n <Option value=\"10\">10</Option>\n <Option value=\"25\">25</Option>\n <Option value=\"50\">50</Option>\n </Select>\n </div>\n )}\n <Fragment>\n {!!((currentPage && currentPage > 2) || (currentPage && currentPage > 1)) && (\n <div className={classes[\"previous\"]}>\n {currentPage > 2 && (\n <IconButton\n title=\"first\"\n onClick={() => onPageChangeHandler(0)}\n data-paginate=\"first\"\n >\n <Icon icon={Icons.NavigationFirst} />\n </IconButton>\n )}\n {currentPage > 1 && (\n <IconButton\n title=\"previous\"\n onClick={() => onPageChangeHandler(currentPage - 1)}\n data-paginate=\"previous\"\n >\n <Icon icon={Icons.ChevronLeft} />\n </IconButton>\n )}\n </div>\n )}\n {totalElements && !!calculateAmountOfPages() && (\n <div className={classes[\"page\"]}>{renderCurrentPageTranslation()}</div>\n )}\n <div className={classes[\"next\"]}>\n {!!(\n (currentPage !== undefined && currentPage < calculateAmountOfPages()!) ||\n (currentPage !== undefined && !totalElements)\n ) && (\n <IconButton\n title=\"next\"\n onClick={() => onPageChangeHandler(currentPage + 1)}\n data-paginate=\"next\"\n >\n <Icon icon={Icons.ChevronRight} />\n </IconButton>\n )}\n {!!(currentPage && totalElements && currentPage < calculateAmountOfPages()! - 1) && (\n <IconButton\n title=\"last\"\n onClick={() => onPageChangeHandler(totalElements / pageSize)}\n data-paginate=\"last\"\n >\n <Icon icon={Icons.NavigationLast} />\n </IconButton>\n )}\n </div>\n </Fragment>\n </div>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport classes from \"./Label.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"label\"> {\n children?: ReactNode;\n}\n\nexport const Label = React.forwardRef<HTMLLabelElement, Props>(\n ({ children, className, hidden = false, ...rest }: Props, ref) => {\n return (\n <label\n {...rest}\n ref={ref}\n className={`${hidden ? readyclasses[\"sr-only\"] : \"\"} ${classes[\"label\"]} ${\n className ?? \"\"\n }`}\n >\n {children}\n </label>\n );\n }\n);\n","export const labelId = (id: string) => `${id}-label`;\nexport const descriptionId = (id: string) => `${id}-description`;\n","import React, { ComponentPropsWithRef, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport classes from \"./BaseModal.module.scss\";\nimport { labelId, descriptionId } from \"./BaseModalContext\";\n\nconst SCROLL_PROPERTY_NAME = \"overflow\";\nconst SCROLL_PROPERTY_VALUE = \"hidden\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n children: React.ReactNode;\n open: boolean;\n onClose?: (event?: React.MouseEvent<HTMLElement>) => unknown;\n className?: string;\n containerProps?: ComponentPropsWithRef<\"div\">;\n backdropProps?: ComponentPropsWithRef<\"div\">;\n labelledby?: string;\n describedby?: string;\n disableEscapeKeyDown?: boolean;\n disableBackdrop?: boolean;\n forceContainerOpen?: boolean;\n zIndex?: number;\n domRoot?: HTMLElement;\n}\n\nexport const useSetBodyScroll = (open: boolean) => {\n const hideBodyScroll = () => {\n document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;\n };\n\n const showBodyScroll = () => {\n const allModalsClosed =\n document.querySelectorAll(\"[role=dialog][data-hidden=false]\").length === 0;\n if (allModalsClosed) {\n document.body.style.removeProperty(SCROLL_PROPERTY_NAME);\n }\n };\n\n useEffect(() => {\n if (open) {\n hideBodyScroll();\n } else {\n showBodyScroll();\n }\n }, [open]);\n};\n\nexport const BaseModal = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n id,\n children,\n open,\n onClose,\n className = \"\",\n containerProps,\n backdropProps,\n labelledby,\n describedby,\n disableEscapeKeyDown = false,\n disableBackdrop = false,\n forceContainerOpen = false,\n zIndex,\n domRoot = document.body,\n ...rest\n }: Props,\n ref\n ) => {\n useSetBodyScroll(open);\n\n const handleEscKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disableEscapeKeyDown && event.key === \"Escape\") {\n event.stopPropagation();\n onClose && onClose();\n }\n };\n\n const handleBackdropClick = () => !disableBackdrop && onClose && onClose();\n\n return createPortal(\n <div\n {...rest}\n ref={ref}\n id={id}\n className={`${classes[\"modal\"]} ${open ? classes[\"visible\"] : \"\"} ${className}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={labelledby || labelId(id)}\n aria-describedby={describedby || descriptionId(id)}\n aria-hidden={!open}\n tabIndex={-1}\n data-hidden={!open}\n onKeyDown={handleEscKeyPress}\n style={{ zIndex }}\n >\n <div\n {...backdropProps}\n className={`${classes[\"backdrop\"]} ${backdropProps?.className ?? \"\"}`}\n onClick={handleBackdropClick}\n ></div>\n {forceContainerOpen ? (\n <div\n {...containerProps}\n aria-hidden={!open}\n hidden={!open}\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {children}\n </div>\n ) : (\n open && (\n <div\n {...containerProps}\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {children}\n </div>\n )\n )}\n </div>,\n domRoot\n );\n }\n);\n","import React, { createContext } from \"react\";\nimport { SnackbarOptionsProps } from \"../interfaces\";\n\ninterface SnackbarContextProps {\n enqueueSnackbar: (title: string, content?: string, options?: SnackbarOptionsProps) => void;\n enqueueSuccessSnackbar: (title: string, content?: string, options?: SnackbarOptionsProps) => void;\n enqueueErrorSnackbar: (title: string, content?: string, options?: SnackbarOptionsProps) => void;\n}\n\nconst SnackbarContext = createContext<SnackbarContextProps>({\n enqueueSnackbar: () => null,\n enqueueSuccessSnackbar: () => null,\n enqueueErrorSnackbar: () => null\n});\n\ninterface Props {\n initialState: SnackbarContextProps;\n children?: React.ReactNode;\n}\n\nconst SnackbarContextProvider = ({ children, initialState }: Props) => {\n return <SnackbarContext.Provider value={initialState}>{children}</SnackbarContext.Provider>;\n};\n\nexport { SnackbarContextProvider, SnackbarContext, SnackbarContextProps };\n","import React, { ComponentPropsWithRef, createRef, useEffect } from \"react\";\nimport classes from \"./BaseModalContent.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id?: string;\n children: React.ReactNode;\n className?: string;\n disableAutoFocus?: boolean;\n}\n\nexport const BaseModalContent = React.forwardRef<HTMLDivElement, Props>(\n ({ id, children, className = \"\", disableAutoFocus = false, ...rest }: Props, ref) => {\n const contentRef = createRef<HTMLDivElement>();\n\n useEffect(() => {\n if (!disableAutoFocus && ref) {\n (ref as React.RefObject<HTMLDivElement>).current?.focus();\n } else if (!disableAutoFocus) {\n contentRef.current?.focus();\n }\n }, []);\n\n /**tabIndex is set to be able to do focus on that element which we need for catching keyDown events */\n return (\n <div\n {...rest}\n ref={ref || contentRef}\n id={id}\n className={`${classes[\"content\"]} ${className}`}\n tabIndex={-1}\n >\n {children}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./BaseModalActions.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"footer\"> {\n children?: React.ReactNode;\n}\n\nexport const BaseModalActions = React.forwardRef<HTMLElement, Props>(\n ({ children, className = \"\", ...rest }: Props, ref) => {\n return (\n <footer {...rest} ref={ref} className={`${classes[\"actions\"]} ${className}`}>\n {children}\n </footer>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport {\n BaseModalActions,\n Props as BaseModalActionsProps\n} from \"../../BaseModal/BaseModalActions/BaseModalActions\";\nimport classes from \"./DialogActions.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<any>, BaseModalActionsProps {\n align: \"left\" | \"right\";\n}\n\nexport const DialogActions = React.forwardRef<HTMLElement, Props>(\n ({ children, align, ...rest }: Props, ref) => {\n return (\n <BaseModalActions\n {...rest}\n ref={ref}\n className={`${classes[\"actions\"]}${align === \"left\" ? \" \" + classes[\"left\"] : \"\"}`}\n >\n {children}\n </BaseModalActions>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport classes from \"./DialogTitle.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n title: string;\n}\n\nexport const DialogTitle = React.forwardRef<HTMLDivElement, Props>(\n ({ id, title, ...rest }: Props, ref) => {\n return (\n <div {...rest} ref={ref} className={classes[\"header\"]}>\n <Typography id={id} className={classes[\"title\"]} tag=\"h1\" variant=\"h4\">\n {title}\n </Typography>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useState } from \"react\";\nimport { BaseModal } from \"../BaseModal/BaseModal\";\nimport { BaseModalContent } from \"../BaseModal/BaseModalContent/BaseModalContent\";\nimport { DialogActions } from \"./DialogActions/DialogActions\";\nimport classes from \"./Dialog.module.scss\";\nimport { DialogTitle } from \"./DialogTitle/DialogTitle\";\nimport { Button, Props as ButtonProps } from \"../../Button/Button\";\nimport { labelId, descriptionId } from \"../BaseModal/BaseModalContext\";\nimport { generateID } from \"../../util/helper\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id?: string;\n open: boolean;\n children: React.ReactNode;\n alignActions: \"left\" | \"right\";\n onClose: () => void;\n title: string;\n primaryAction: Action;\n secondaryAction?: Action;\n zIndex?: number;\n disableEscapeKeyDown?: boolean;\n}\n\nexport interface Action extends Omit<ButtonProps, \"variant\" | \"ref\"> {\n label: string;\n onClick: (event?: React.MouseEvent<HTMLButtonElement>) => unknown;\n}\n\nexport const Dialog = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n id,\n open,\n children,\n alignActions,\n onClose,\n title,\n primaryAction,\n secondaryAction,\n zIndex,\n disableEscapeKeyDown = true,\n ...rest\n }: Props,\n ref\n ) => {\n const [dialogId] = useState(id ?? generateID(20));\n const { label: primaryLabel, ...restOfPrimaryAction } = primaryAction;\n const PrimaryButton = (\n <Button key=\"primary\" {...restOfPrimaryAction}>\n {primaryLabel}\n </Button>\n );\n const TertiaryButton =\n secondaryAction &&\n (function () {\n const { label: secondaryLabel, ...restOfSecondaryAction } = secondaryAction;\n return (\n <Button key=\"tertiary\" variant=\"text\" {...restOfSecondaryAction}>\n {secondaryLabel}\n </Button>\n );\n })();\n\n const onHiddenInputKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n /** It has to be here because then we will need to check if user doesn't click tab to select action button and want to do another action then primary one? */\n if (event.key === \"Enter\") {\n primaryAction.onClick();\n }\n };\n\n return (\n <BaseModal\n {...rest}\n ref={ref}\n id={dialogId}\n className={classes[\"dialog\"]}\n containerProps={{ className: classes[\"container\"] }}\n open={open}\n disableBackdrop\n onClose={onClose}\n zIndex={zIndex}\n disableEscapeKeyDown={disableEscapeKeyDown}\n >\n <DialogTitle id={labelId(dialogId)} title={title} />\n <BaseModalContent\n id={descriptionId(dialogId)}\n className={classes[\"content\"]}\n disableAutoFocus\n >\n {children}\n </BaseModalContent>\n <DialogActions align={alignActions}>\n {alignActions === \"left\"\n ? [PrimaryButton, TertiaryButton]\n : [TertiaryButton, PrimaryButton]}\n </DialogActions>\n <input\n autoFocus\n aria-hidden={true}\n style={{\n position: \"absolute\",\n width: 0,\n height: 0,\n opacity: 0\n }}\n maxLength={0}\n tabIndex={-1}\n onKeyPress={onHiddenInputKeyPress}\n />\n </BaseModal>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport classes from \"./BaseModalHeader.module.scss\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Typography } from \"../../../Typography/Typography\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n title: string;\n children?: React.ReactNode;\n onClose: (event: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport const BaseModalHeader = React.forwardRef<HTMLDivElement, Props>(\n ({ id, title, children, onClose, ...rest }: Props, ref) => {\n return (\n <div {...rest} ref={ref} className={classes[\"header\"]}>\n <div className={classes[\"headline\"]}>\n <Typography id={id} className={classes[\"title\"]} tag=\"h1\" variant=\"h4\">\n {title}\n </Typography>\n <IconButton onClick={onClose} className={classes[\"closeBtn\"]} title=\"close modal\">\n <Icon icon={Icons.Times} />\n </IconButton>\n </div>\n {children}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { Dialog } from \"../../Dialog/Dialog\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport { DataAttributeKey } from \"../../../interfaces\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n open: boolean;\n discardChangesButtonLabel: string;\n keepEditingButtonLabel: string;\n contentLabel: string;\n titleLabel: string;\n [dataAttribute: DataAttributeKey]: any;\n onKeepEditing: () => void;\n onDiscardChanges: () => void;\n}\n\nexport const DiscardChangesDialog = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n open,\n onKeepEditing,\n onDiscardChanges,\n discardChangesButtonLabel,\n keepEditingButtonLabel,\n contentLabel,\n titleLabel,\n ...rest\n }: Props,\n ref\n ) => {\n return (\n <Dialog\n {...rest}\n ref={ref}\n open={open}\n alignActions=\"left\"\n title={titleLabel}\n onClose={onKeepEditing}\n primaryAction={{\n label: discardChangesButtonLabel,\n onClick: onDiscardChanges\n }}\n secondaryAction={{\n label: keepEditingButtonLabel,\n onClick: onKeepEditing\n }}\n disableEscapeKeyDown={false}\n >\n <Typography variant=\"body\" spacing={{ margin: 0 }}>\n {contentLabel}\n </Typography>\n </Dialog>\n );\n }\n);\n","import React, { TransitionEventHandler, useState, useRef } from \"react\";\nimport { Props as ModalProps, Modal } from \"../Modal/Modal\";\nimport classes from \"./SlideInModal.module.scss\";\n\nexport const SlideInModal = React.forwardRef<HTMLDivElement, ModalProps>(\n ({ children, id, open, ...rest }: ModalProps, ref) => {\n const [classHideOnTransition, setClassHideOnTransition] = useState<string>(\"hidden\");\n const containerRef = useRef(null);\n\n const onTransitionEnd: TransitionEventHandler<HTMLDivElement> = e => {\n if (e.target === containerRef.current) {\n setClassHideOnTransition(prev => (prev ? \"\" : \"hidden\"));\n }\n };\n\n return (\n <Modal\n {...rest}\n id={id}\n open={open}\n className={`${classes[\"slide-in-modal\"]} ${open ? classes[\"visible\"] : \"\"} ${\n !open ? classes[classHideOnTransition] : \"\"\n }`}\n containerProps={{ className: classes[\"container\"] }}\n backdropProps={{ className: classes[\"backdrop-slide\"] }}\n forceContainerOpen\n onTransitionEnd={onTransitionEnd}\n ref={ref || containerRef}\n >\n {children}\n </Modal>\n );\n }\n);\n\nexport { Props } from \"../Modal/Modal\";\n","import React from \"react\";\nimport classes from \"./SnackbarContainer.module.scss\";\n\nexport interface Placement {\n vertical: \"top\" | \"bottom\";\n horizontal: \"start\" | \"center\" | \"end\";\n}\n\nexport interface Props {\n placement: Placement;\n children?: React.ReactNode;\n zIndex?: number;\n className?: string;\n}\n\nexport const SnackbarContainer = ({ placement, children, zIndex, className, ...rest }: Props) => {\n return (\n <div\n {...rest}\n style={{ zIndex }}\n className={`${classes[\"snackbars\"]} ${classes[placement.horizontal]} ${\n classes[placement.vertical]\n } ${className ?? \"\"}`}\n >\n {children}\n </div>\n );\n};\n","import { useEffect, useRef, useState } from \"react\";\n\nexport const useAnimation = <RefElement extends HTMLElement>(callback: () => void) => {\n const animatedObjectRef = useRef<RefElement>(null);\n /** We need to store flag that says us when to call the callback */\n const [animationStarted, setAnimationStarted] = useState(false);\n\n const onAnimationEnd = () => animationStarted && callback();\n\n useEffect(() => {\n animatedObjectRef.current?.addEventListener(\"animationend\", onAnimationEnd);\n return () => animatedObjectRef.current?.removeEventListener(\"animationend\", onAnimationEnd);\n }, [animationStarted]);\n\n return {\n ref: animatedObjectRef,\n animationStarted,\n startAnimation: () => setAnimationStarted(true)\n };\n};\n","import React, { useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Variant, Actions } from \"../interfaces\";\nimport classes from \"./SnackbarItem.module.scss\";\nimport readyclasses from \"../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\n\nconst textColor = \"var(--snackbar-text-color)\";\n\nexport interface Props {\n id: string;\n title: string;\n duration: number;\n variant: Variant;\n onClose: (key: string) => void;\n closeButtonTitle: string;\n content?: string;\n actions?: Actions;\n}\n\nexport const SnackbarItem = ({\n id,\n title,\n duration,\n variant,\n content,\n actions = [],\n onClose,\n closeButtonTitle\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout>>();\n const onAnimationEnd = () => onClose(id);\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n\n useEffect(() => {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onMouseEnter = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onMouseLeave = () => {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.Error;\n }\n return variant === \"success\" ? Icons.CheckmarkCircleBreakout : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map((actionProp, index) => (\n <button\n key={index}\n {...actionProp}\n onClick={e => {\n onClose(id);\n actionProp.onClick && actionProp.onClick(e);\n }}\n children={actionProp.label}\n className={classes[\"action-button\"]}\n ></button>\n ));\n\n return (\n <div\n ref={ref}\n className={`${classes[\"snackbar\"]} ${classes[variant]} ${\n animationStarted ? readyclasses[\"slide-out\"] : readyclasses[\"slide-in\"]\n }`}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"container\"]}>\n <div className={classes[\"headline\"]}>\n <Typography className={classes[\"title\"]} variant=\"h4\" tag=\"span\">\n {title}\n </Typography>\n <IconButton\n id={classes[\"close-btn\"]}\n onClick={() => startAnimation()}\n title={closeButtonTitle}\n >\n <Icon icon={Icons.Times} color={textColor} />\n </IconButton>\n </div>\n {!!content && (\n <Typography className={classes[\"content\"]} variant=\"body\">\n {content}\n </Typography>\n )}\n {actionButtons.length > 0 && <div className={classes[\"actions\"]}>{actionButtons}</div>}\n </div>\n </div>\n );\n};\n","import { useEffect, useState } from \"react\";\nimport { generateID } from \"../util/helper\";\n\nexport interface ConfigObject {\n name: string | undefined;\n errorMessage?: string;\n error?: boolean;\n parentErrorId?: string;\n helperText?: string;\n parentHelperId?: string;\n}\n\nexport const useFormSelector = (configObject: ConfigObject) => {\n const [identifier] = useState(generateID(15, configObject.name));\n const [describedBy, setDescribedBy] = useState(\"\");\n const [errorId] = useState(generateID(15, configObject.errorMessage));\n\n useEffect(() => {\n if (configObject.error && configObject.parentErrorId) {\n setDescribedBy(configObject.parentErrorId);\n }\n\n if (\n (!configObject.error && configObject.helperText) ||\n (!configObject.parentErrorId && !configObject.errorMessage && configObject.helperText)\n ) {\n setDescribedBy(`${identifier}`);\n }\n\n if (\n (!configObject.error && !configObject.helperText && configObject.parentHelperId) ||\n (!configObject.parentErrorId && !configObject.errorMessage && configObject.parentHelperId)\n ) {\n setDescribedBy(`${configObject.parentHelperId}`);\n }\n\n if (configObject.errorMessage && !configObject.parentErrorId && configObject.error) {\n setDescribedBy(errorId);\n }\n }, [identifier, configObject.error, configObject.parentErrorId]);\n\n return {\n describedBy,\n errorId,\n identifier\n };\n};\n","import React, { ComponentPropsWithRef, ReactNode } from \"react\";\nimport classes from \"./FormHelperText.module.scss\";\nimport { Typography } from \"../../Typography/Typography\";\nimport { FormElement } from \"../form.interfaces\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormElement {\n children?: ReactNode;\n}\n\nexport const FormHelperText = React.forwardRef<HTMLDivElement, Props>(\n ({ children, error, className, ...rest }: Props, ref) => {\n return (\n <Typography\n {...rest}\n ref={ref}\n variant=\"sub-text\"\n tag=\"div\"\n className={`${classes[\"form-helper-text\"]} ${error ? classes.error : \"\"} ${\n className ?? \"\"\n }`}\n >\n {children}\n </Typography>\n );\n }\n);\n","import React, { ComponentPropsWithRef, createRef, ReactNode } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { KeyValuePair } from \"../../interfaces\";\nimport { FormSelector } from \"../form.interfaces\";\nimport { FormHelperText, Props as FormHelperTextProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./FormSelectorWrapper.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormSelector {\n children?: ReactNode;\n nestedChildren?: ReactNode;\n containerProps?: ComponentPropsWithRef<\"div\"> & KeyValuePair;\n helperProps?: FormHelperTextProps;\n disabled?: boolean;\n errorId?: string;\n identifier?: string;\n}\n\nexport const FormSelectorWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n className,\n nestedChildren,\n containerProps,\n helperProps,\n error,\n disabled,\n helperText,\n errorMessage,\n parentErrorId,\n errorId,\n identifier,\n ...rest\n }: Props,\n ref\n ) => {\n const helperRef = helperProps?.ref || createRef();\n\n return (\n <div\n {...rest}\n ref={ref}\n className={`${error ? classes[\"error\"] : \"\"} ${disabled ? classes[\"disabled\"] : \"\"} ${\n className ?? \"\"\n }`}\n >\n <div {...containerProps}>{children}</div>\n {(helperText || (helperProps && helperProps.children)) &&\n (!error || parentErrorId || !errorMessage) && (\n <FormHelperText\n {...helperProps}\n ref={helperRef}\n id={`${identifier}`}\n className={`${classes[\"helper-text\"]} ${helperProps?.className ?? \"\"} ${\n error ? classes[\"error\"] : \"\"\n }`}\n >\n {(helperProps && helperProps.children) || helperText}\n </FormHelperText>\n )}\n {errorMessage && !parentErrorId && error && (\n <span className={classes[\"error-message\"]}>\n <Icon className={classes[\"error-icon\"]} icon={Icons.Error} />\n <span id={errorId}>{errorMessage}</span>\n </span>\n )}\n {nestedChildren}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement, ReactNode, useEffect } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Props as FormHelperTextProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./Checkbox.module.scss\";\nimport { useFormSelector } from \"../../hooks/useFormSelector\";\nimport {\n FormSelectorWrapper,\n Props as FormSelectorWrapperProps\n} from \"../FormSelectorWrapper/FormSelectorWrapper\";\nimport { FormSelector } from \"../form.interfaces\";\n\nconst isToggle = (children: ReactNode) => (children as ReactElement)?.props?.[\"data-toggle\"];\n\nexport interface Props extends ComponentPropsWithRef<\"input\">, FormSelector {\n children: ReactNode;\n label?: string;\n indeterminate?: boolean;\n helperProps?: FormHelperTextProps;\n formSelectorWrapperProps?: FormSelectorWrapperProps;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const Checkbox = React.forwardRef<HTMLInputElement, Props>(\n (\n {\n children,\n name,\n helperText,\n helperProps,\n indeterminate,\n parentErrorId,\n errorMessage,\n disabled,\n label,\n parentHelperId,\n className,\n error,\n checked = false,\n formSelectorWrapperProps,\n onChange,\n ...rest\n }: Props,\n ref\n ) => {\n const { errorId, identifier, describedBy } = useFormSelector({\n name,\n helperText,\n parentErrorId,\n errorMessage,\n error,\n parentHelperId\n });\n\n useEffect(() => {\n if (!name) {\n throw new Error(\"Please pass a 'name' prop to your <Checkbox> component.\");\n }\n\n if (typeof children === \"object\" && !isToggle(children) && indeterminate === undefined) {\n throw new Error(\n \"If you have nested checkboxes you have to manage the indeterminate state by passing a boolean to the `indeterminate` prop.\"\n );\n }\n }, []);\n\n const determineLabel = () => {\n if (label) {\n return label;\n } else if (children === undefined) {\n throw new Error(\n \"Please make sure to pass either a string or more Checkbox components as a child of your Checkbox component.\"\n );\n }\n\n if (typeof children === \"string\") {\n return children;\n }\n\n throw new Error(\n \"If you pass Checkboxes as a child component (to create nested checkbox tree) you need to pass a label to the parent checkbox.\"\n );\n };\n\n const renderNestedCheckboxes = () => (\n <ul className={classes[\"checkbox-list\"]}>\n {React.Children.map(children as ReactElement[], child => {\n return (\n <li>\n <Checkbox\n {...child.props}\n parentHelperId={parentHelperId}\n parentErrorId={parentErrorId}\n error={error}\n disabled={child.props.disabled ? child.props.disabled : disabled}\n >\n {child.props.children}\n </Checkbox>\n </li>\n );\n })}\n </ul>\n );\n\n const onChangeHandler = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (disabled) {\n return;\n }\n onChange && onChange(event);\n };\n\n const renderToggle = () => React.Children.toArray(children).filter(isToggle);\n\n const iconClasses = [classes[\"input\"], disabled ? classes[\"disabled\"] : \"\"];\n\n /** Default return value is the default checkbox */\n return (\n <FormSelectorWrapper\n {...formSelectorWrapperProps}\n className={`${classes[\"checkbox-wrapper\"]} ${className ? className : \"\"}`}\n containerProps={{ className: classes[\"checkbox-container\"] }}\n helperText={helperText}\n helperProps={helperProps}\n parentErrorId={parentErrorId}\n errorId={errorId}\n errorMessage={errorMessage}\n error={error}\n disabled={disabled}\n identifier={identifier}\n nestedChildren={\n typeof children === \"object\" && !isToggle(children) && renderNestedCheckboxes()\n }\n >\n <input\n {...rest}\n ref={ref}\n disabled={disabled}\n className={`${classes[\"native-input\"]} ${error ? classes[\"error\"] : \"\"}`}\n checked={checked}\n onChange={onChangeHandler}\n aria-invalid={error as boolean}\n aria-checked={indeterminate ? \"mixed\" : checked}\n aria-describedby={describedBy}\n id={`${identifier}-checkbox`}\n name={name}\n type=\"checkbox\"\n />\n {renderToggle()}\n\n {indeterminate && <Icon className={iconClasses.join(\" \")} icon={Icons.MinusSquare} />}\n {checked && !indeterminate && (\n <Icon className={iconClasses.join(\" \")} icon={Icons.CheckmarkSquare} />\n )}\n {!checked && !indeterminate && (\n <Icon className={iconClasses.join(\" \")} icon={Icons.Square} />\n )}\n <label htmlFor={`${identifier}-checkbox`}>{determineLabel()}</label>\n </FormSelectorWrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Props as HelperProps } from \"../FormHelperText/FormHelperText\";\nimport classes from \"./Radio.module.scss\";\nimport { useFormSelector } from \"../../hooks/useFormSelector\";\nimport { FormSelector } from \"../form.interfaces\";\nimport {\n FormSelectorWrapper,\n Props as FormSelectorWrapperProps\n} from \"../FormSelectorWrapper/FormSelectorWrapper\";\n\nexport interface Props extends ComponentPropsWithRef<\"input\">, FormSelector {\n children: string;\n value: string;\n formSelectorWrapperProps?: FormSelectorWrapperProps;\n helperProps?: HelperProps;\n}\n\nexport const Radio = React.forwardRef<HTMLInputElement, Props>(\n (\n {\n children,\n disabled,\n className,\n value,\n name,\n helperText,\n parentErrorId,\n parentHelperId,\n error,\n errorMessage,\n checked = false,\n formSelectorWrapperProps,\n helperProps,\n onChange,\n ...rest\n }: Props,\n ref\n ) => {\n const { errorId, identifier, describedBy } = useFormSelector({\n name,\n helperText,\n parentErrorId,\n errorMessage,\n error,\n parentHelperId\n });\n\n const onChangeHandler = (event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent) => {\n if (disabled) {\n return;\n }\n /** We have to clone the native event we got here and change the \"target\" property to the value. Otherwise, this regular event has \"on\" as it's event.target.value, which is useless. */\n const nativeEvent: any = event.nativeEvent || event;\n const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n\n Object.defineProperty(clonedEvent, \"target\", {\n writable: true,\n value: { value: value }\n });\n\n onChange && onChange(clonedEvent);\n };\n\n /** Default return value is the default radio */\n return (\n <FormSelectorWrapper\n {...formSelectorWrapperProps}\n className={`${classes[\"radio-wrapper\"]} ${className ?? \"\"}`}\n containerProps={{ className: classes[\"radio-container\"] }}\n helperText={helperText}\n helperProps={helperProps}\n parentErrorId={parentErrorId}\n errorId={errorId}\n errorMessage={errorMessage}\n error={error}\n disabled={disabled}\n identifier={identifier}\n >\n <input\n {...rest}\n ref={ref}\n disabled={disabled}\n tabIndex={0}\n className={`${classes[\"native-input\"]} ${error ? classes[\"error\"] : \"\"}`}\n onChange={onChangeHandler}\n checked={checked}\n aria-invalid={error ? true : false}\n aria-checked={checked}\n aria-describedby={describedBy}\n name={name}\n value={value}\n id={`${identifier}-radio`}\n type=\"radio\"\n />\n\n {checked && (\n <Icon\n className={`${classes[\"input\"]} ${disabled ? classes[\"disabled\"] : \"\"}`}\n icon={Icons.Radio}\n />\n )}\n {!checked && (\n <Icon\n className={`${classes[\"input\"]} ${disabled ? classes[\"disabled\"] : \"\"}`}\n icon={Icons.Circle}\n />\n )}\n\n <label onClick={onChangeHandler} htmlFor={`${identifier}-radio`}>\n {children}\n </label>\n </FormSelectorWrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useState } from \"react\";\nimport { Icon, Props as IconProps, Icons } from \"../../Icon/Icon\";\nimport classes from \"./Textarea.module.scss\";\nimport { FormElement } from \"../form.interfaces\";\n\ninterface IconPropsPartial extends Omit<Partial<IconProps>, \"ref\"> {}\n\nexport interface Props extends ComponentPropsWithRef<\"textarea\">, FormElement {\n wrapperProps?: ComponentPropsWithRef<\"div\">;\n errorProps?: IconPropsPartial;\n}\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, Props>(\n (\n {\n error = false,\n disabled = false,\n className,\n rows = 4,\n wrapperProps,\n errorProps,\n onFocus,\n onBlur,\n ...rest\n }: Props,\n ref\n ) => {\n const [focus, setFocus] = useState(false);\n\n const wrapperClasses = [classes[\"textarea-wrapper\"]];\n const outlineClasses = [classes[\"outline\"]];\n\n wrapperProps?.className && wrapperClasses.push(wrapperProps.className);\n disabled &&\n wrapperClasses.push(classes[\"disabled\"]) &&\n outlineClasses.push(classes[\"disabled\"]);\n error && wrapperClasses.push(classes[\"error\"]) && outlineClasses.push(classes[\"error\"]);\n focus && wrapperClasses.push(classes[\"focus\"]) && outlineClasses.push(classes[\"focus\"]);\n\n return (\n <div {...wrapperProps} className={wrapperClasses.join(\" \")}>\n <textarea\n {...rest}\n ref={ref}\n rows={rows}\n className={`${error ? classes[\"error\"] : \"\"} ${classes[\"textarea\"]} ${className ?? \"\"}`}\n disabled={disabled}\n onFocus={event => {\n setFocus(true);\n onFocus && onFocus(event);\n }}\n onBlur={event => {\n setFocus(false);\n onBlur && onBlur(event);\n }}\n />\n {error && (\n <Icon\n {...errorProps}\n className={`${classes[\"warning\"]} ${errorProps?.className ?? \"\"}`}\n icon={Icons.Error}\n />\n )}\n <span className={outlineClasses.join(\" \")}></span>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { Checkbox, Props as CheckboxProps } from \"../Checkbox/Checkbox\";\nimport classes from \"./Toggle.module.scss\";\n\nexport interface Props\n extends ComponentPropsWithRef<\"input\">,\n Omit<CheckboxProps, \"indeterminate\" | \"errorMessage\" | \"error\" | \"children\" | \"label\"> {\n children: string;\n}\n\nexport const Toggle = React.forwardRef<HTMLInputElement, Props>(\n ({ children, checked, disabled, helperProps, ...rest }: Props, ref) => (\n <div className={classes[\"toggle-wrapper\"]}>\n <Checkbox\n {...rest}\n ref={ref}\n checked={checked}\n className={classes[\"checkbox\"]}\n helperProps={{ className: classes[\"toggle-helper\"], ...helperProps }}\n disabled={disabled}\n label={children}\n >\n <span\n data-toggle\n aria-hidden=\"true\"\n className={`${classes[\"toggle\"]} ${checked ? classes[\"checked\"] : \"\"} ${\n disabled ? classes[\"disabled\"] : \"\"\n } `}\n ></span>\n </Checkbox>\n </div>\n )\n);\n","import React, { ComponentPropsWithRef, ReactElement } from \"react\";\nimport classes from \"./FormControl.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactElement | ReactElement[];\n grid?: 1 | 2 | 3;\n align?: \"top\" | \"start\" | \"middle\" | \"center\" | \"bottom\" | \"end\" | \"stretch\";\n error?: boolean;\n disabled?: boolean;\n}\n\nexport const FormControl = React.forwardRef<HTMLDivElement, Props>(\n ({ children, disabled, error, className, grid, align = \"center\", ...rest }: Props, ref) => {\n const renderChildren = () =>\n React.Children.map(children, child => {\n if (!child) {\n return null;\n }\n\n const childElement = React.cloneElement(child, {\n disabled: child.props.disabled !== undefined ? child.props.disabled : disabled,\n error: child.props.error !== undefined ? child.props.error : error\n });\n\n if (grid && grid > 1) {\n return (\n <div className={`${classes[\"col-\" + grid]} ${classes.column}`}>{childElement}</div>\n );\n }\n\n return childElement;\n });\n\n return (\n <div\n {...rest}\n ref={ref}\n data-formcontrol\n className={`${classes[\"form-control\"]} ${className ? className : \"\"} ${\n grid && grid > 1 ? `${classes.grid} ${classes[\"grid-\" + grid]}` : \"\"\n } ${classes[align]}`}\n >\n {renderChildren()}\n </div>\n );\n }\n);\n","/** The empty className property on FormHelperText is on purpose! We want to basically \"filter\" out the className from helperProps because we're adding this to the surrounding div. This makes it so also the errormessage receives this styling. */\n\nimport React, { ComponentPropsWithRef, ReactChild } from \"react\";\nimport classes from \"./FormGroup.module.scss\";\nimport { FormHelperText, Props as HelperProps } from \"../FormHelperText/FormHelperText\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: ReactChild[] | ReactChild;\n error?: boolean;\n errorMessageIcon?: Icons;\n errorMessageIconPosition?: \"before\" | \"after\";\n errorMessage?: string;\n errorId?: string;\n helperIndent?: number;\n helperText?: string;\n helperId?: string;\n helperProps?: HelperProps;\n disabled?: boolean;\n}\n\nexport const FormGroup = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n className,\n error,\n errorMessage,\n errorId,\n errorMessageIcon,\n errorMessageIconPosition = \"before\",\n helperText,\n helperId,\n helperProps,\n helperIndent,\n ...rest\n }: Props,\n ref\n ) => {\n return (\n <div\n {...rest}\n ref={ref}\n className={`${classes[\"form-group\"]} ${error ? classes.error : \"\"} ${className ?? \"\"}`}\n >\n {children}\n\n {(helperText || (errorMessage && error)) && (\n <div\n style={{ marginLeft: `${helperIndent}px` }}\n className={`${classes[\"default-helper\"]} ${\n helperProps?.className ? helperProps.className : \"\"\n }`}\n >\n {helperText && !error && (\n <FormHelperText {...helperProps} className={\"\"} id={helperId}>\n {(helperProps && helperProps.children) || helperText}\n </FormHelperText>\n )}\n {error && errorMessage && (\n <span className={classes[\"error-message\"]}>\n <span className={classes.message} id={errorId}>\n {errorMessageIcon && errorMessageIconPosition === \"before\" && (\n <Icon\n className={`${classes[\"error-icon\"]} ${classes[\"error-icon-before\"]}`}\n icon={errorMessageIcon}\n />\n )}\n {errorMessage}\n {errorMessageIcon && errorMessageIconPosition === \"after\" && (\n <Icon\n className={`${classes[\"error-icon\"]} ${classes[\"error-icon-after\"]}`}\n icon={errorMessageIcon}\n />\n )}\n </span>\n </span>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement } from \"react\";\nimport { FormGroup, Props as FormGroupProps } from \"../../FormGroup/FormGroup\";\nimport { Label, Props as LabelProps } from \"../../Label/Label\";\nimport classes from \"./Wrapper.module.scss\";\nimport { Props as HelperProps } from \"../../FormHelperText/FormHelperText\";\nimport { FormElement } from \"../../form.interfaces\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, FormGroupProps {\n children: ReactElement | ReactElement[];\n floatingLabelActive?: boolean;\n floatingLabel?: boolean;\n helperIndent?: number;\n label?: string;\n labelProps?: LabelProps;\n name: string;\n /** This does NOT add validation! It simply adds an asterix on the Label! */\n required?: boolean;\n innerClassName?: string;\n}\n\n/** For components that extend this component we create an interface (InputWrapper, SelectWrapper, etc.) */\nexport interface WrapperProps extends FormElement {\n errorMessage?: string;\n helperText?: string;\n helperProps?: HelperProps;\n label?: string;\n name: string;\n required?: boolean;\n disabled?: boolean;\n}\n\nexport const Wrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n className,\n error,\n errorMessage,\n errorId,\n errorMessageIcon,\n errorMessageIconPosition,\n helperText,\n helperId,\n floatingLabel = true,\n floatingLabelActive,\n required,\n helperProps,\n helperIndent,\n labelProps,\n label,\n disabled,\n name,\n innerClassName,\n ...rest\n }: Props,\n ref\n ) => {\n const renderChildren = () =>\n React.Children.map(children, child =>\n React.cloneElement(child, {\n disabled\n })\n );\n\n const labelClasses = [];\n\n floatingLabel && labelClasses.push(classes[\"floating-label\"]);\n floatingLabel && floatingLabelActive && labelClasses.push(classes[\"floating-label-active\"]);\n labelProps?.className && labelClasses.push(labelProps.className);\n required && labelClasses.push(classes[\"required\"]);\n error && labelClasses.push(classes[\"error\"]);\n\n return (\n <div {...rest} ref={ref} className={`${classes.wrapper} ${className ? className : \"\"}`}>\n <FormGroup\n error={error}\n errorMessage={errorMessage}\n errorId={errorId}\n errorMessageIcon={errorMessageIcon}\n errorMessageIconPosition={errorMessageIconPosition}\n helperText={helperText}\n helperId={helperId}\n helperProps={helperProps}\n helperIndent={helperIndent}\n >\n <div\n className={`${floatingLabel ? classes[\"floating-wrapper\"] : \"\"} ${\n innerClassName ? innerClassName : \"\"\n }`}\n >\n {label && (\n <Label\n {...labelProps}\n className={`${classes.label} ${labelClasses.join(\" \")}`}\n htmlFor={name}\n >\n {label}\n </Label>\n )}\n {renderChildren()}\n </div>\n </FormGroup>\n </div>\n );\n }\n);\n","import { useEffect, useState } from \"react\";\nimport { generateID } from \"../util/helper\";\nimport { Type as InputTypes } from \"../Form/Input/Input\";\n\nexport const useWrapper = (value?: string, placeholder?: string, type?: InputTypes) => {\n const [helperId] = useState(generateID(20));\n const [errorId] = useState(generateID(20));\n const [labelId] = useState(generateID(20));\n const [floatingLabelActive, setFloatingLabelActive] = useState(false);\n const [hasFocus, setHasFocus] = useState(false);\n\n useEffect(() => {\n if (\n (value?.length && value.length > 0) ||\n placeholder ||\n type === \"datetime-local\" ||\n type === \"time\" ||\n type === \"date\"\n ) {\n setFloatingLabelActive(true);\n }\n }, []);\n\n useEffect(() => {\n if ((value?.length && value.length > 0) || hasFocus) {\n setFloatingLabelActive(true);\n } else if (\n !placeholder &&\n !hasFocus &&\n type !== \"datetime-local\" &&\n type !== \"time\" &&\n type !== \"date\"\n ) {\n setFloatingLabelActive(false);\n }\n }, [value, placeholder, type, hasFocus]);\n\n return {\n helperId,\n errorId,\n labelId,\n floatingLabelActive,\n setFloatingLabelActive,\n hasFocus,\n setHasFocus\n };\n};\n","import React, { ComponentPropsWithRef, useEffect, useRef, useState } from \"react\";\nimport { Input, Type, Props as InputProps } from \"../../Input/Input\";\nimport classes from \"./InputWrapper.module.scss\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\n\ninterface PartialInputProps extends Partial<InputProps> {}\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, WrapperProps {\n label: string;\n type: Type;\n name: string;\n inputProps?: PartialInputProps;\n value: string;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n}\n\nconst useLabelOffset = (\n input: React.RefObject<HTMLInputElement>,\n floatingLabelActive: boolean,\n prefix?: string\n) => {\n const [labelOffset, setLabelOffset] = useState({});\n\n const resetLabelOffset = () => setLabelOffset({ left: undefined });\n\n useEffect(() => {\n if (input.current && prefix) {\n if (floatingLabelActive) {\n resetLabelOffset();\n } else {\n const spacingBetweenPrefixAndInput = 4;\n const prefixDifference =\n getComputedStyle(input.current).paddingLeft + spacingBetweenPrefixAndInput;\n setLabelOffset({ left: `${prefixDifference}px` });\n }\n }\n }, [input.current, prefix, floatingLabelActive]);\n\n return { labelOffset };\n};\n\nexport const InputWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n type,\n name,\n inputProps,\n helperText,\n helperProps,\n value,\n className,\n error,\n onChange,\n onBlur,\n onFocus,\n ...rest\n }: Props,\n ref\n ) => {\n const {\n errorId,\n floatingLabelActive,\n setFloatingLabelActive,\n hasFocus,\n setHasFocus,\n helperId,\n labelId\n } = useWrapper(value, inputProps?.placeholder, type);\n const { prefix, suffix } = inputProps || {};\n const input = useRef<HTMLInputElement>(null);\n const hasValueOrActiveFloatingLabel = !!value || floatingLabelActive;\n const labelClasses = [classes[\"input-label\"]];\n const { labelOffset } = useLabelOffset(\n (inputProps && (inputProps.ref as React.RefObject<HTMLInputElement>)) || input,\n floatingLabelActive,\n prefix\n );\n\n hasFocus && labelClasses.push(classes[\"focus\"]);\n\n return (\n <Wrapper\n {...rest}\n ref={ref}\n name={name}\n className={`${classes[\"input-wrapper\"]} ${className ?? \"\"}`}\n labelProps={{\n id: labelId,\n className: labelClasses.join(\" \"),\n style: { ...labelOffset }\n }}\n floatingLabelActive={floatingLabelActive}\n errorId={errorId}\n error={error}\n helperId={helperId}\n helperText={helperText}\n helperProps={{\n ...helperProps,\n className: `${classes[\"input-wrapper-helper\"]} ${helperProps?.className ?? \"\"} `\n }}\n helperIndent={20}\n >\n <Input\n {...inputProps}\n prefix={hasValueOrActiveFloatingLabel ? prefix : \"\"}\n suffix={hasValueOrActiveFloatingLabel ? suffix : \"\"}\n wrapperProps={{\n className: `${floatingLabelActive ? classes[\"floating-label-active\"] : \"\"} ${\n inputProps?.wrapperProps?.className ?? \"\"\n }`\n }}\n ref={(inputProps && inputProps.ref) || input}\n aria-labelledby={labelId}\n aria-describedby={error ? errorId : helperId}\n onChange={onChange}\n onFocus={e => {\n onFocus && onFocus(e);\n setHasFocus(true);\n setFloatingLabelActive(true);\n }}\n onBlur={e => {\n onBlur && onBlur(e);\n setHasFocus(false);\n e.target.value ||\n e.target.placeholder ||\n inputProps?.placeholder?.length ||\n type === \"datetime-local\" ||\n type === \"time\" ||\n type === \"date\"\n ? setFloatingLabelActive(true)\n : setFloatingLabelActive(false);\n }}\n className={`${floatingLabelActive ? classes[\"floating-label\"] : \"\"} ${\n inputProps?.className ?? \"\"\n }`}\n name={name}\n error={error}\n id={name}\n value={value}\n type={type}\n />\n </Wrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactChild, ReactElement } from \"react\";\nimport classes from \"./SelectWrapper.module.scss\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { Select, Props as SelectProps } from \"../../Select/Select\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\n\ninterface PartialSelectProps extends Partial<SelectProps> {}\n\nexport interface Props\n extends Omit<ComponentPropsWithRef<\"div\">, \"onChange\">,\n Omit<WrapperProps, \"onChange\" | \"error\"> {\n children: ReactChild | ReactChild[];\n placeholder?: string;\n value: string;\n error?: boolean;\n selectProps?: PartialSelectProps;\n onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;\n onClear?: (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const SelectWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n error,\n value,\n placeholder,\n selectProps,\n helperProps,\n onChange,\n onClear,\n ...rest\n }: Props,\n ref\n ) => {\n const { errorId, floatingLabelActive, helperId, labelId } = useWrapper(value, placeholder);\n\n return (\n <Wrapper\n {...rest}\n ref={ref}\n floatingLabelActive={floatingLabelActive}\n errorId={errorId}\n helperId={helperId}\n labelProps={{ id: labelId, className: classes[\"select-label\"] }}\n helperProps={{\n ...helperProps,\n className: `${classes[\"select-helper-text\"]} ${helperProps?.className ?? \"\"}`\n }}\n error={error}\n >\n <Select\n {...selectProps}\n value={value}\n labeledBy={labelId}\n error={error}\n describedBy={error ? errorId : helperId}\n onChange={onChange}\n onClear={e => {\n onClear && onClear(e);\n }}\n placeholder={placeholder}\n className={`${floatingLabelActive ? classes[\"floating-label-active\"] : \"\"} ${\n selectProps?.className ?? \"\"\n }`}\n >\n {children as ReactElement[]}\n </Select>\n </Wrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useState } from \"react\";\nimport classes from \"./TextareaWrapper.module.scss\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { Textarea, Props as TextareaProps } from \"../../Textarea/Textarea\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\n\nexport interface Props\n extends Omit<\n ComponentPropsWithRef<\"div\">,\n \"onFocus\" | \"onChange\" | \"onBlur\" | \"onMouseEnter\" | \"onMouseLeave\"\n >,\n Omit<WrapperProps, \"onFocus\" | \"onChange\" | \"onBlur\" | \"onMouseEnter\" | \"onMouseLeave\"> {\n placeholder?: string;\n textareaProps?: TextareaProps;\n value: string;\n onFocus?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;\n onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;\n onMouseEnter?: (event: React.MouseEvent<HTMLTextAreaElement>) => void;\n onMouseLeave?: (event: React.MouseEvent<HTMLTextAreaElement>) => void;\n}\n\nexport const TextareaWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n name,\n error,\n value,\n label,\n placeholder,\n textareaProps,\n helperProps,\n onChange,\n onFocus,\n onBlur,\n onMouseEnter,\n onMouseLeave,\n disabled,\n ...rest\n }: Props,\n ref\n ) => {\n const {\n errorId,\n floatingLabelActive,\n setFloatingLabelActive,\n hasFocus,\n setHasFocus,\n helperId,\n labelId\n } = useWrapper(value, placeholder);\n const [hover, setHover] = useState(false);\n\n const optionalClasses: string[] = [];\n\n hasFocus && optionalClasses.push(classes[\"focus\"]);\n hover && optionalClasses.push(classes[\"hover\"]);\n disabled && optionalClasses.push(classes[\"disabled\"]);\n error && optionalClasses.push(classes[\"error\"]);\n\n return (\n <Wrapper\n {...rest}\n ref={ref}\n disabled={disabled}\n labelProps={{\n id: labelId,\n className: `${classes[\"textarea-label\"]} ${optionalClasses.join(\" \")}`\n }}\n name={name}\n label={label}\n helperId={helperId}\n helperProps={{\n ...helperProps,\n className: classes[\"textarea-helper-text\"]\n }}\n error={error}\n floatingLabelActive={floatingLabelActive}\n errorId={errorId}\n >\n <Textarea\n {...textareaProps}\n error={error}\n aria-labelledby={label && labelId}\n aria-describedby={error ? errorId : helperId}\n placeholder={placeholder}\n name={name}\n id={name}\n value={value}\n onChange={onChange}\n onFocus={e => {\n onFocus && onFocus(e);\n setHasFocus(true);\n setFloatingLabelActive(true);\n }}\n onBlur={e => {\n onBlur && onBlur(e);\n setHasFocus(false);\n e.target.value || e.target.placeholder || textareaProps?.placeholder?.length\n ? setFloatingLabelActive(true)\n : setFloatingLabelActive(false);\n }}\n onMouseEnter={e => {\n onMouseEnter && onMouseEnter(e);\n setHover(true);\n }}\n onMouseLeave={e => {\n onMouseLeave && onMouseLeave(e);\n setHover(false);\n }}\n className={`${classes[\"textarea\"]} ${error ? classes[\"error\"] : \"\"}`}\n wrapperProps={{\n className: `${classes[\"textarea-wrapper\"]}} ${optionalClasses.join(\" \")}`\n }}\n errorProps={{ className: classes[\"error-icon\"] }}\n />\n </Wrapper>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactNode, ReactElement } from \"react\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport classes from \"./Fieldset.module.scss\";\nimport { Typography, Variant } from \"../../Typography/Typography\";\nimport { Input } from \"../Input/Input\";\nimport { Select } from \"../Select/Select\";\nimport { Radio } from \"../Radio/Radio\";\nimport { Checkbox } from \"../Checkbox/Checkbox\";\nimport { Textarea } from \"../Textarea/Textarea\";\nimport { Toggle } from \"../Toggle/Toggle\";\nimport { Label } from \"../Label/Label\";\nimport { FormControl } from \"../FormControl/FormControl\";\nimport { FormSelectorWrapper } from \"../FormSelectorWrapper/FormSelectorWrapper\";\nimport { FormHelperText } from \"../FormHelperText/FormHelperText\";\nimport { InputWrapper } from \"../Wrapper/InputWrapper/InputWrapper\";\nimport { SelectWrapper } from \"../Wrapper/SelectWrapper/SelectWrapper\";\nimport { TextareaWrapper } from \"../Wrapper/TextareaWrapper/TextareaWrapper\";\n\nexport interface Props extends ComponentPropsWithRef<\"fieldset\"> {\n children?: ReactElement | ReactElement[];\n legend: string;\n legendStyle?: Variant;\n hideLegend?: boolean;\n background?: string;\n noPadding?: boolean;\n noBackground?: boolean;\n required?: boolean;\n error?: boolean;\n disablePropagation?: boolean;\n}\n\nexport const Fieldset = React.forwardRef<HTMLFieldSetElement, Props>(\n (\n {\n children,\n className,\n legend,\n legendStyle = \"body\",\n hideLegend = false,\n noBackground,\n background = noBackground ? \"\" : \"#FFF\",\n noPadding = false,\n disabled = false,\n required = false,\n error = false,\n disablePropagation = false,\n ...rest\n }: Props,\n ref\n ) => {\n const renderChildren = () => {\n if (!children) return;\n\n /* All right, so the issue is that whenever we try to add disabled and error to a component that doesn't accept it, \n React will throw an error. However, it might occur that we want a component inside of Fieldset because of aesthetic purposes \n (fieldset applies a sort of container with white background and if we want to display it inside of this container... then yea).\n So instead we supply an array of components that we want to add the disabled and error prop to and check if child.type equals one of these. */\n const allowedComponents: ReactNode[] = [\n Input,\n Select,\n Radio,\n Checkbox,\n Textarea,\n Toggle,\n Label,\n FormControl,\n FormSelectorWrapper,\n FormHelperText,\n InputWrapper,\n SelectWrapper,\n TextareaWrapper\n ];\n\n return React.Children.map(children, (child: ReactElement) => {\n if (allowedComponents.includes(child.type) && !disablePropagation) {\n return React.cloneElement(child, {\n disabled: child.props.disabled ?? disabled,\n error: child.props.error ?? error\n });\n }\n\n return child;\n });\n };\n\n return (\n <fieldset\n {...rest}\n ref={ref}\n disabled={disabled}\n style={{ backgroundColor: background, ...rest.style }}\n className={`${classes.fieldset} ${noPadding ? classes[\"no-padding\"] : \"\"} ${\n className ?? \"\"\n }`}\n >\n {legend && <legend className={readyclasses[\"sr-only\"]}>{legend}</legend>}\n {legend && !hideLegend && (\n <Typography\n variant={legendStyle}\n tag=\"span\"\n aria-hidden=\"true\"\n className={`${classes[\"legend\"]} ${required ? classes[\"required\"] : \"\"} ${\n error ? classes[\"error\"] : \"\"\n }`}\n >\n {legend}\n </Typography>\n )}\n {renderChildren()}\n </fieldset>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement, useEffect } from \"react\";\nimport classes from \"./RadioWrapper.module.scss\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\nimport { Icons } from \"../../../Icon/Icon\";\nimport { Fieldset, Props as FieldsetProps } from \"../../../Form/Fieldset/Fieldset\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, WrapperProps {\n children: ReactElement | ReactElement[];\n fieldsetProps: FieldsetProps;\n value: string;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const RadioWrapper = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n children,\n error,\n name,\n helperText,\n helperProps,\n fieldsetProps,\n value,\n onChange,\n disabled,\n ...rest\n }: Props,\n ref\n ) => {\n const { errorId, helperId } = useWrapper(value);\n\n useEffect(() => {\n if (fieldsetProps.legend === undefined) {\n console.error(\n `You should give your Fieldset component a legend prop so a legend element is rendered. This error was thrown in RadioWrapper. You can add this legend prop through the fieldsetProps prop by passing an object (fieldsetProps={{ legend: \"legend here\" }})`\n );\n }\n }, []);\n\n const renderChildren = () =>\n React.Children.map(children, child =>\n React.cloneElement(child, {\n parentErrorId: errorId,\n error: error,\n checked: child.props.value === value,\n name: name,\n parentHelperId: helperText ? helperId : false,\n onChange: onChange,\n disabled: child.props.disabled !== undefined ? child.props.disabled : disabled\n })\n );\n\n return (\n <Fieldset {...fieldsetProps} error={error} disabled={disabled}>\n <Wrapper\n {...rest}\n ref={ref}\n disabled={disabled}\n name={name}\n helperId={helperId}\n helperText={helperText}\n helperProps={{\n ...helperProps,\n className: `${classes[\"radio-wrapper-helper\"]} ${\n error ? classes[\"radio-wrapper-error\"] : \"\"\n } ${helperProps?.className ?? \"\"}`\n }}\n error={error}\n errorId={errorId}\n errorMessageIcon={Icons.Error}\n floatingLabel={false}\n >\n {renderChildren()}\n </Wrapper>\n </Fieldset>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement, useEffect } from \"react\";\nimport classes from \"./CheckboxWrapper.module.scss\";\nimport { useWrapper } from \"../../../hooks/useWrapper\";\nimport { Wrapper, WrapperProps } from \"../Wrapper/Wrapper\";\nimport { Icons } from \"../../../Icon/Icon\";\nimport { Fieldset, Props as FieldsetProps } from \"../../../Form/Fieldset/Fieldset\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\">, WrapperProps {\n children: ReactElement[] | ReactElement;\n fieldsetProps: FieldsetProps;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const CheckboxWrapper = React.forwardRef<HTMLDivElement, Props>(\n ({ children, error = false, helperText, helperProps, fieldsetProps, ...rest }: Props, ref) => {\n const { errorId, helperId } = useWrapper();\n\n useEffect(() => {\n if (fieldsetProps.legend === undefined) {\n console.error(\n `You should give your Fieldset component a legend prop so a legend element is rendered. This error was thrown in CheckboxWrapper. You can add this legend prop through the fieldsetProps prop by passing an object (fieldsetProps={{ legend: \"legend here\" }})`\n );\n }\n }, []);\n\n const renderChildren = () =>\n React.Children.map(children, child =>\n React.cloneElement(child, {\n parentErrorId: errorId,\n error: error,\n parentHelperId: helperText ? helperId : false,\n disabled: rest.disabled\n })\n );\n\n return (\n <Fieldset {...fieldsetProps} error={error} required={rest.required}>\n <Wrapper\n {...rest}\n ref={ref}\n label=\"\"\n helperId={helperId}\n helperText={helperText}\n helperProps={{\n ...helperProps,\n className: `${classes[\"checkbox-wrapper-helper\"]} ${\n error ? classes[\"checkbox-wrapper-error\"] : \"\"\n } ${helperProps?.className ?? \"\"}`\n }}\n error={error}\n errorMessageIcon={Icons.Error}\n errorId={errorId}\n >\n {renderChildren()}\n </Wrapper>\n </Fieldset>\n );\n }\n);\n","import { Reducer } from \"react\";\nimport { Step } from \"./BaseWizardSteps/BaseWizardSteps\";\nimport { WizardMode } from \"./Wizard\";\n\ntype WizardStateType = {\n steps: Step[];\n currentStepNo: number;\n mode: WizardMode;\n stepScreenReaderLabel: string;\n};\n\ninterface SetWizardStateAction {\n type: \"SET_STATE\";\n payload: {\n steps: Step[];\n mode: WizardMode;\n stepScreenReaderLabel: string;\n };\n}\n\ninterface ChangeCurrentStepNoAction {\n type: \"CHANGE_CURRENT_STEP_NO\";\n payload: number;\n}\n\nconst setWizardState = (\n steps: Step[],\n mode: WizardMode,\n stepScreenReaderLabel: string\n): SetWizardStateAction => {\n return { type: \"SET_STATE\", payload: { steps, mode, stepScreenReaderLabel } };\n};\n\nconst changeCurrentStepNo = (currentStepNo: number): ChangeCurrentStepNoAction => {\n return { type: \"CHANGE_CURRENT_STEP_NO\", payload: currentStepNo };\n};\n\ntype WizardActions = SetWizardStateAction | ChangeCurrentStepNoAction;\n\nconst reducer: Reducer<WizardStateType, WizardActions> = (state, action) => {\n switch (action.type) {\n case \"SET_STATE\":\n return { ...state, ...action.payload };\n case \"CHANGE_CURRENT_STEP_NO\":\n return { ...state, currentStepNo: action.payload };\n default:\n return state;\n }\n};\n\nexport { setWizardState, changeCurrentStepNo, reducer, WizardActions, WizardStateType };\n","import React, { createContext, Dispatch, useReducer } from \"react\";\nimport { WizardActions, WizardStateType, reducer } from \"./wizardStateReducer\";\n\nconst WizardStateContext = createContext<{\n state: WizardStateType;\n dispatch: Dispatch<WizardActions>;\n}>({\n state: {} as WizardStateType,\n dispatch: () => null\n});\n\nexport interface Props {\n initialState: WizardStateType;\n children?: React.ReactNode;\n}\n\nconst WizardStateProvider = ({ children, initialState }: Props) => {\n const [state, dispatch] = useReducer(reducer, initialState);\n return (\n <WizardStateContext.Provider value={{ state, dispatch }}>\n {children}\n </WizardStateContext.Provider>\n );\n};\n\nexport { WizardStateProvider, WizardStateContext };\n","import React, { Fragment, useContext, useEffect } from \"react\";\nimport { Step } from \"./BaseWizardSteps/BaseWizardSteps\";\nimport { WizardStateContext, WizardStateProvider } from \"./WizardStateProvider\";\nimport { setWizardState } from \"./wizardStateReducer\";\n\nexport type WizardMode = \"add\" | \"edit\";\n\nexport interface Props {\n steps: Step[];\n mode: WizardMode;\n initialStepNo?: number;\n onStepChange: (stepNo: number) => void;\n stepScreenReaderLabel: string;\n children: React.ReactNode;\n}\n\nconst useSetWizardState = (steps: Step[], mode: WizardMode, stepScreenReaderLabel: string) => {\n const { dispatch } = useContext(WizardStateContext);\n\n useEffect(() => {\n dispatch(setWizardState(steps, mode, stepScreenReaderLabel));\n }, [steps, mode, stepScreenReaderLabel]);\n};\n\nconst useStepChanging = (onStepChange: (stepNo: number) => void) => {\n const {\n state: { currentStepNo }\n } = useContext(WizardStateContext);\n\n useEffect(() => {\n onStepChange(currentStepNo);\n }, [currentStepNo]);\n};\n\nconst WizardContent = ({ steps, mode, stepScreenReaderLabel, onStepChange, children }: Props) => {\n useSetWizardState(steps, mode, stepScreenReaderLabel);\n useStepChanging(onStepChange);\n\n return <Fragment>{children}</Fragment>;\n};\n\nexport const Wizard = (props: Props) => {\n const { steps, initialStepNo: currentStepNo = 0, mode, stepScreenReaderLabel } = props;\n return (\n <WizardStateProvider initialState={{ steps, currentStepNo, mode, stepScreenReaderLabel }}>\n <WizardContent {...props} />\n </WizardStateProvider>\n );\n};\n","import React, { ComponentPropsWithRef, Fragment } from \"react\";\nimport classes from \"./BaseWizardSteps.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\n\ntype StepState = \"finished\" | \"current\" | \"future\";\n\nexport interface Step {\n label: string;\n disabled?: boolean;\n}\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"onClick\"> {\n steps: Step[];\n currentStepNo: number;\n onClick?: (stepNo: number) => void;\n futureStepsClickable?: boolean;\n stepScreenReaderLabel: string;\n}\n\nexport const BaseWizardSteps = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n steps,\n currentStepNo,\n onClick,\n futureStepsClickable = false,\n stepScreenReaderLabel,\n ...rest\n }: Props,\n ref\n ) => {\n const getStepState = (stepNo: number): StepState => {\n if (currentStepNo === stepNo) {\n return \"current\";\n } else if (stepNo < currentStepNo) {\n return \"finished\";\n }\n return \"future\";\n };\n\n const getStepContent = (stepState: StepState, index: number, disabled?: boolean) => {\n const stepNumberString = String(index + 1);\n if (stepState === \"finished\") {\n return disabled ? null : <Icon className={classes[\"checkmark\"]} icon={Icons.Checkmark} />;\n } else {\n return (\n <Fragment>\n <span className={readyclasses[\"sr-only\"]}>{stepScreenReaderLabel} </span>\n {stepNumberString}\n </Fragment>\n );\n }\n };\n\n const generatedSteps = steps.map((step, index) => {\n const stepState = getStepState(index);\n const disabledStyleClassName = step.disabled ? classes[\"disabled\"] : \"\";\n const clickableClassName = futureStepsClickable ? classes[\"clickable\"] : \"\";\n\n return (\n <button\n key={step.label.toLowerCase().replace(/\\s/, \"-\")}\n disabled={\n step.disabled ||\n (stepState === \"future\" && !futureStepsClickable) ||\n stepState === \"current\"\n }\n aria-current={stepState === \"current\" ? \"step\" : undefined}\n onClick={() => onClick && onClick(index)}\n className={`${classes[\"wizard-element\"]} ${classes[stepState]} ${clickableClassName} ${disabledStyleClassName}`}\n >\n <div className={classes[\"number-wrapper\"]}>\n <span className={classes[\"number\"]}>\n {getStepContent(stepState, index, step.disabled)}\n </span>\n </div>\n <div className={classes[\"two-line-text-overflow\"]}>\n <span className={classes[\"label\"]}>{step.label}</span>\n </div>\n </button>\n );\n });\n\n return (\n <div {...rest} ref={ref} className={classes[\"wizard\"]}>\n {generatedSteps}\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useContext } from \"react\";\nimport { WizardStateContext } from \"../WizardStateProvider\";\nimport { BaseWizardSteps } from \"../BaseWizardSteps/BaseWizardSteps\";\nimport { changeCurrentStepNo } from \"../wizardStateReducer\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n onStepClick: (currentStepNo: number, selectedStepNo: number) => boolean;\n}\n\nexport const WizardSteps = React.forwardRef<HTMLDivElement, Props>(\n ({ onStepClick, ...rest }: Props, ref) => {\n const {\n state: { currentStepNo, mode, stepScreenReaderLabel, steps },\n dispatch\n } = useContext(WizardStateContext);\n\n const onClick = (selectedStepNo: number) => {\n onStepClick(currentStepNo, selectedStepNo) && dispatch(changeCurrentStepNo(selectedStepNo));\n };\n\n return (\n <BaseWizardSteps\n {...rest}\n ref={ref}\n onClick={onClick}\n steps={steps}\n currentStepNo={currentStepNo}\n stepScreenReaderLabel={stepScreenReaderLabel}\n futureStepsClickable={mode === \"edit\"}\n />\n );\n }\n);\n","import React, { ComponentPropsWithRef, Fragment } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { ColumnName, Direction } from \"../datagrid.interfaces\";\nimport classes from \"./DataGridHeaderCell.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"th\"> {\n headline: string;\n name: ColumnName;\n disableSorting?: boolean;\n activeSortDirection?: Direction;\n onSort?: (name: ColumnName) => void;\n}\n\nconst ariaSortMapping = {\n ASC: \"ascending\",\n DESC: \"descending\"\n} as const;\n\nexport const DataGridHeaderCell = React.forwardRef<HTMLTableCellElement, Props>(\n ({ headline, name, disableSorting, activeSortDirection, onSort, ...rest }: Props, ref) => {\n const onCellClick = () => {\n onSort && onSort(name);\n };\n\n const sortingIndicator = () => {\n const getSortingIndicatorClasses = (direction: Direction) => {\n const sortingIndicatorClasses = [classes[\"indicator\"]];\n activeSortDirection &&\n sortingIndicatorClasses.push(\n activeSortDirection === direction ? classes[\"active\"] : classes[\"hidden\"]\n );\n return sortingIndicatorClasses;\n };\n\n return (\n <Fragment>\n <Icon className={getSortingIndicatorClasses(\"ASC\").join(\" \")} icon={Icons.TriangleUp} />\n <Icon\n className={getSortingIndicatorClasses(\"DESC\").join(\" \")}\n icon={Icons.TriangleDown}\n />\n </Fragment>\n );\n };\n\n const innerContent = (\n <Fragment>\n <span className={classes[\"headline\"]}>{headline}</span>\n {!disableSorting && (\n <div className={classes[\"sorting-indicator-container\"]}>{sortingIndicator()}</div>\n )}\n </Fragment>\n );\n\n return (\n <th\n {...rest}\n ref={ref}\n className={classes[\"header-cell\"]}\n aria-sort={activeSortDirection && ariaSortMapping[activeSortDirection]}\n >\n {disableSorting ? (\n <div key={name}>{innerContent}</div>\n ) : (\n <button key={name} onClick={onCellClick}>\n {innerContent}\n </button>\n )}\n </th>\n );\n }\n);\n","import React, { ComponentPropsWithRef, useEffect, useState } from \"react\";\nimport { ColumnName, Direction, HeaderCell, OnSortFunction, Sort } from \"../datagrid.interfaces\";\nimport { DataGridHeaderCell } from \"./DataGridHeaderCell\";\nimport classes from \"./DataGridHeader.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"thead\"> {\n headers: HeaderCell[];\n initialSort?: Sort;\n onSort?: OnSortFunction;\n disableContextMenuColumn?: boolean;\n enableMultiSorting?: boolean;\n spacing?: React.CSSProperties;\n}\n\nconst sortingStates = [undefined, \"ASC\", \"DESC\"] as (Direction | undefined)[];\n\nexport const DataGridHeader = React.forwardRef<HTMLTableSectionElement, Props>(\n (\n {\n initialSort,\n onSort,\n headers,\n disableContextMenuColumn,\n enableMultiSorting,\n spacing,\n ...rest\n }: Props,\n ref\n ) => {\n const [sortList, setSortList] = useState(initialSort || []);\n\n useEffect(() => {\n setSortList(initialSort || []);\n }, [initialSort]);\n\n const calculateNextSortState = (direction?: Direction) => {\n const currentDirectionIdx = sortingStates.findIndex(item => item === direction);\n return sortingStates[currentDirectionIdx + (1 % sortingStates.length)];\n };\n\n /**\n * The sortList contains sorting columns objects. The order of those objects determinates priorities of sorting.\n * Last modified sorting column has the highest priority.\n */\n const updateSortList = (name: ColumnName): Sort => {\n const current = sortList.find(item => item.name === name);\n const restSortList = enableMultiSorting ? sortList.filter(item => item.name !== name) : [];\n const newSortDirection = calculateNextSortState(current?.direction);\n return newSortDirection\n ? [{ name, direction: newSortDirection }, ...restSortList]\n : restSortList;\n };\n\n const wrapOnSort = (name: ColumnName) => {\n const newSort = updateSortList(name);\n onSort && onSort(newSort);\n setSortList(newSort);\n };\n\n const headerCells = headers.map((header, index) => {\n if (header.hidden) {\n return null;\n }\n\n let headerStyle: React.CSSProperties = {};\n\n if (index === 0) {\n headerStyle.paddingLeft = spacing?.paddingLeft;\n }\n if (index === headers.length - 1 && disableContextMenuColumn) {\n headerStyle.paddingRight = spacing?.paddingRight;\n }\n\n const sort = sortList.find(item => item.name === header.name);\n return (\n <DataGridHeaderCell\n key={header.name}\n name={header.name}\n headline={header.headline}\n disableSorting={header.disableSorting || !onSort}\n onSort={wrapOnSort}\n activeSortDirection={sort?.direction}\n style={headerStyle}\n />\n );\n });\n\n return (\n <thead {...rest} ref={ref} className={classes[\"thead\"]}>\n <tr className={classes[\"row\"]}>\n {headerCells}\n {!disableContextMenuColumn && (\n <td\n style={{ paddingRight: spacing?.paddingRight }}\n aria-label=\"context menu\"\n className={classes[\"context-menu\"]}\n ></td>\n )}\n </tr>\n </thead>\n );\n }\n);\n","import React, { Fragment, useState } from \"react\";\nimport { IconButton } from \"../../Button/IconButton\";\nimport { Toggle } from \"../../Form/Toggle/Toggle\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Popover, Props as PopoverProps } from \"../../Popover/Popover\";\nimport { Typography } from \"../../Typography/Typography\";\nimport { generateID } from \"../../util/helper\";\nimport { ColumnName, HeaderCell } from \"../datagrid.interfaces\";\nimport classes from \"./DataGridColumnsToggle.module.scss\";\nimport { createPortal } from \"react-dom\";\n\nexport interface Props extends PopoverProps {\n open: boolean;\n headers: HeaderCell[];\n titleLabel?: string;\n closeButtonTitle?: string;\n onClose: () => void;\n onToggleClicked: (colName: ColumnName) => void;\n domRoot?: HTMLElement;\n}\n\nexport const DataGridColumnsToggle = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n open,\n headers,\n titleLabel = \"Show columns\",\n closeButtonTitle = \"Close show columns dialog\",\n onClose,\n onToggleClicked,\n className,\n domRoot = document.body,\n ...rest\n }: Props,\n ref\n ) => {\n const [id] = useState(generateID());\n const labelledId = id + \"_header\";\n\n const toggles = headers.map(item => (\n <Toggle\n key={item.name}\n name={item.name}\n checked={!item.hidden}\n onChange={() => onToggleClicked(item.name)}\n >\n {item.headline}\n </Toggle>\n ));\n\n const handleBackdropClick = () => onClose();\n\n return (\n <Popover\n {...rest}\n ref={ref}\n className={`${classes[\"popover\"]} ${className}`}\n show={open}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={labelledId}\n >\n {open &&\n createPortal(\n <div className={classes[\"backdrop\"]} onClick={handleBackdropClick}></div>,\n domRoot\n )}\n {open && (\n <Fragment>\n <div className={classes[\"header\"]}>\n <Typography id={labelledId} className={classes[\"title\"]} tag=\"span\" variant=\"h4\">\n {titleLabel}\n </Typography>\n <IconButton\n onClick={onClose}\n className={`${classes[\"close-btn\"]}`}\n title={closeButtonTitle}\n >\n <Icon icon={Icons.Times} />\n </IconButton>\n </div>\n <div className={classes[\"content\"]}>{toggles}</div>\n </Fragment>\n )}\n </Popover>\n );\n }\n);\n","import React, { ComponentPropsWithRef, Fragment, useRef, useState } from \"react\";\nimport { Button, Props as ButtonProps } from \"../../Button/Button\";\nimport { IconButton } from \"../../Button/IconButton\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { HeaderCell, ColumnName } from \"../datagrid.interfaces\";\nimport classes from \"./DataGridActions.module.scss\";\nimport { DataGridColumnsToggle } from \"./DataGridColumnsToggle\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n enableAddBtn?: boolean;\n enableColumnsBtn?: boolean;\n enableSearchBtn?: boolean;\n addBtnProps?: ButtonProps;\n columnsBtnProps?: ButtonProps;\n searchBtnProps?: ButtonProps;\n headers: HeaderCell[];\n onColumnToggled: (colName: ColumnName) => void;\n}\n\nexport const DataGridActions = React.forwardRef<HTMLDivElement, Props>(\n (\n {\n className,\n enableAddBtn,\n enableColumnsBtn,\n enableSearchBtn,\n addBtnProps = {},\n columnsBtnProps = {},\n searchBtnProps = {},\n headers,\n onColumnToggled,\n ...rest\n }: Props,\n ref\n ) => {\n const isHidden = !(enableAddBtn || enableColumnsBtn || enableSearchBtn);\n const [showColsPopover, setShowColsPopover] = useState(false);\n const showColumnBtn = useRef<HTMLButtonElement>(null);\n\n return isHidden ? null : (\n <div {...rest} ref={ref} className={`${classes[\"actions\"]} ${className ?? \"\"}`}>\n <div className={classes[\"left-actions\"]}>\n {enableAddBtn && (\n <Button\n color=\"primary\"\n startIcon={<Icon icon={Icons.Plus} />}\n title=\"Add item\"\n type=\"button\"\n variant=\"outline\"\n children=\"Add item\"\n {...addBtnProps}\n />\n )}\n </div>\n <div className={classes[\"right-actions\"]}>\n {enableColumnsBtn && (\n <Fragment>\n <Button\n startIcon={<Icon icon={Icons.Change} />}\n title=\"Show/hide columns\"\n variant=\"text\"\n children=\"Columns\"\n {...columnsBtnProps}\n className={`${classes[\"desktop\"]} ${columnsBtnProps?.className ?? \"\"}`}\n ref={showColumnBtn}\n onClick={() => setShowColsPopover(true)}\n />\n <IconButton\n title=\"Show/hide columns\"\n {...columnsBtnProps}\n onClick={() => setShowColsPopover(true)}\n className={`${classes[\"mobile\"]} ${columnsBtnProps?.className ?? \"\"}`}\n >\n <Icon icon={Icons.Change} />\n </IconButton>\n <DataGridColumnsToggle\n aria-hidden={!showColsPopover}\n open={showColsPopover}\n headers={headers}\n onClose={() => setShowColsPopover(false)}\n onToggleClicked={onColumnToggled}\n anchorEl={showColumnBtn}\n />\n </Fragment>\n )}\n {enableSearchBtn && (\n <Fragment>\n <Button\n startIcon={<Icon icon={Icons.TableSearch} />}\n title=\"Search\"\n variant=\"text\"\n children=\"Search\"\n {...searchBtnProps}\n className={`${classes[\"desktop\"]} ${searchBtnProps?.className ?? \"\"}`}\n />\n <IconButton\n title=\"Search\"\n {...searchBtnProps}\n className={`${classes[\"mobile\"]} ${columnsBtnProps?.className ?? \"\"}`}\n >\n <Icon icon={Icons.TableSearch} />\n </IconButton>\n </Fragment>\n )}\n </div>\n </div>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactChild } from \"react\";\nimport { Typography } from \"../../Typography/Typography\";\nimport classes from \"./DataGridCell.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"td\"> {\n children?: ReactChild;\n isLoading?: boolean;\n spacing?: React.CSSProperties;\n cellIndex?: number;\n columnLength?: number;\n disableContextMenuColumn?: boolean;\n}\n\nexport const DataGridCell = React.forwardRef<HTMLTableCellElement, Props>(\n (\n {\n children,\n className,\n isLoading,\n spacing,\n cellIndex,\n columnLength,\n disableContextMenuColumn,\n ...rest\n }: Props,\n ref\n ) => {\n let cellStyle: React.CSSProperties = {};\n\n if (cellIndex === 0) {\n cellStyle.paddingLeft = spacing?.paddingLeft;\n }\n if (\n (cellIndex === columnLength && !disableContextMenuColumn) ||\n (columnLength && cellIndex === columnLength - 1 && disableContextMenuColumn)\n ) {\n cellStyle.paddingRight = spacing?.paddingRight;\n }\n\n return (\n <td\n {...rest}\n ref={ref}\n style={{ ...rest.style, ...cellStyle }}\n className={`${classes[\"cell\"]} ${className ?? \"\"}`}\n >\n {isLoading && (\n <div className={classes[\"loading\"]} aria-busy=\"true\" aria-live=\"polite\"></div>\n )}\n {!isLoading && (\n <Typography variant=\"body\" tag=\"span\">\n {children}\n </Typography>\n )}\n </td>\n );\n }\n);\n","import React, { ComponentPropsWithRef } from \"react\";\nimport { HeaderCell } from \"../datagrid.interfaces\";\nimport classes from \"./DataGridRow.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"tr\"> {\n headers?: HeaderCell[];\n isLoading?: boolean;\n spacing?: React.CSSProperties;\n disableContextMenuColumn?: boolean;\n}\n\nexport const DataGridRow = React.forwardRef<HTMLTableRowElement, Props>(\n (\n { children, className, headers, isLoading, spacing, disableContextMenuColumn, ...rest }: Props,\n ref\n ) => {\n const visibleCells = React.Children.map(children as React.ReactElement[], (child, index) => {\n if (child) {\n const cellWithSpacing = React.cloneElement(child, {\n spacing: spacing,\n cellIndex: index,\n columnLength: headers?.length,\n disableContextMenuColumn\n });\n\n const visible = headers && headers.length > index ? !headers[index].hidden : true;\n return visible && cellWithSpacing;\n }\n return null;\n });\n\n const classNames = [classes[\"row\"]];\n className && classNames.push(className);\n isLoading && classNames.push(classes[\"loading\"]);\n\n return (\n <tr {...rest} ref={ref} className={classNames.join(\" \")}>\n {visibleCells}\n </tr>\n );\n }\n);\n","import React, { ComponentPropsWithRef, ReactElement, Ref } from \"react\";\nimport { HeaderCell } from \"../datagrid.interfaces\";\nimport { DataGridCell } from \"./DataGridCell\";\nimport { DataGridRow } from \"./DataGridRow\";\nimport classes from \"./DataGridBody.module.scss\";\nimport { Typography } from \"../../Typography/Typography\";\n\nexport interface Props<T> extends ComponentPropsWithRef<\"tbody\"> {\n children: ({ item, index }: { item: T; index: number }) => ReactElement;\n data?: T[];\n headers: HeaderCell[];\n isLoading?: boolean;\n disableContextMenuColumn?: boolean;\n emptyLabel?: string;\n spacing?: React.CSSProperties;\n}\n\nconst skeletonLoadingRows = 9;\n\nconst DataGridBodyInner = <T extends {}>(\n {\n children,\n data,\n headers,\n isLoading,\n disableContextMenuColumn,\n emptyLabel,\n spacing,\n ...rest\n }: Props<T>,\n ref: Ref<HTMLTableSectionElement>\n) => {\n const renderContent = () => {\n const visibleColumns = headers.filter(header => !header.hidden).length;\n if (isLoading) {\n return Array.from(Array(skeletonLoadingRows)).map((_, rowIdx) => (\n <DataGridRow key={rowIdx} isLoading>\n {Array.from(Array(visibleColumns)).map((__, colIdx) => (\n <DataGridCell key={colIdx} isLoading></DataGridCell>\n ))}\n {!disableContextMenuColumn && <DataGridCell></DataGridCell>}\n </DataGridRow>\n ));\n }\n\n const emptyData = !data || data.length === 0;\n if (emptyData) {\n return (\n <tr>\n <td\n className={classes[\"empty\"]}\n colSpan={visibleColumns + (disableContextMenuColumn ? 0 : 1)}\n >\n <Typography variant=\"body\" spacing={{ margin: 0 }}>\n {emptyLabel}\n </Typography>\n </td>\n </tr>\n );\n }\n\n return data?.map((item, index) => {\n return React.cloneElement(children({ item, index }), {\n headers,\n spacing,\n disableContextMenuColumn\n });\n });\n };\n\n return (\n <tbody {...rest} ref={ref}>\n {renderContent()}\n </tbody>\n );\n};\n\nexport const DataGridBody = React.forwardRef(DataGridBodyInner) as <T extends {}>(\n p: Props<T> & { ref?: Ref<HTMLTableSectionElement> }\n) => ReactElement;\n","import React, { ComponentPropsWithRef, ReactElement, Ref, useEffect, useState } from \"react\";\nimport { Props as ButtonProps } from \"../Button/Button\";\nimport classes from \"./DataGrid.module.scss\";\nimport { DataGridHeader } from \"./DataGridHeader/DataGridHeader\";\nimport { DataGridActions } from \"./DataGridActions/DataGridActions\";\nimport { DataGridBody } from \"./DataGridBody/DataGridBody\";\nimport { ColumnName, HeaderCell, OnSortFunction, Sort } from \"./datagrid.interfaces\";\nimport { Pagination, Props as PaginationProps } from \"../Pagination/Pagination\";\nimport { Spacing, useSpacing } from \"../hooks/useSpacing\";\n\nexport interface Props<T> extends Omit<ComponentPropsWithRef<\"div\">, \"children\"> {\n children: ({ item, index }: { item: T; index: number }) => ReactElement;\n data?: T[];\n initialSort?: Sort;\n onSort?: OnSortFunction;\n headers: HeaderCell[];\n actions?: {\n enableAddBtn?: boolean;\n enableColumnsBtn?: boolean;\n enableSearchBtn?: boolean;\n addBtnProps?: ButtonProps;\n columnsBtnProps?: ButtonProps;\n searchBtnProps?: ButtonProps;\n };\n emptyLabel?: string;\n paginationProps?: PaginationProps;\n disableContextMenuColumn?: boolean;\n isLoading?: boolean;\n enableMultiSorting?: boolean;\n spacing?: Spacing;\n}\n\nconst DataGridInner = <T extends {}>(\n {\n children,\n data,\n initialSort,\n onSort,\n headers,\n actions = {},\n paginationProps,\n disableContextMenuColumn,\n isLoading,\n enableMultiSorting,\n emptyLabel,\n spacing,\n style,\n ...rest\n }: Props<T>,\n ref: Ref<HTMLDivElement>\n) => {\n if (!headers) {\n throw new Error(\"Headers definition has to be provided\");\n }\n if (!children) {\n throw new Error(\"DataGridBody should be provieded with a template how to render rows\");\n }\n\n const [internalHeaders, setInternalHeaders] = useState(headers);\n const styleWithSpacing = useSpacing(spacing, style);\n\n useEffect(() => setInternalHeaders(headers), [headers]);\n\n const onColumnToggled = (colName: ColumnName) => {\n setInternalHeaders(\n internalHeaders.map(item =>\n item.name !== colName ? item : { ...item, hidden: !item.hidden }\n )\n );\n };\n\n if (styleWithSpacing?.padding) {\n const splitPaddings = styleWithSpacing.padding.toString().split(\" \");\n\n let paddingLeftIndex: number = 0;\n\n if (splitPaddings.length >= 2) {\n paddingLeftIndex = 1;\n }\n if (splitPaddings.length === 4) {\n paddingLeftIndex = 3;\n }\n\n Object.defineProperties(styleWithSpacing, {\n paddingTop: {\n value: splitPaddings[0]\n },\n paddingRight: {\n value: splitPaddings[splitPaddings.length - 1 > 0 ? 1 : 0]\n },\n paddingBottom: {\n value: splitPaddings[splitPaddings.length / 3 >= 1 ? 2 : 0]\n },\n paddingLeft: {\n value: splitPaddings[paddingLeftIndex]\n }\n });\n }\n\n return (\n <div\n {...rest}\n className={classes[\"grid-wrapper\"]}\n ref={ref}\n style={{\n paddingTop: styleWithSpacing?.paddingTop,\n paddingBottom: styleWithSpacing?.paddingBottom\n }}\n >\n <DataGridActions\n {...actions}\n style={{\n paddingLeft: styleWithSpacing?.paddingLeft,\n paddingRight: styleWithSpacing?.paddingRight\n }}\n headers={internalHeaders}\n onColumnToggled={onColumnToggled}\n />\n <div className={classes[\"table-wrapper\"]}>\n <table className={classes[\"table\"]}>\n <DataGridHeader\n headers={internalHeaders}\n initialSort={initialSort}\n onSort={onSort}\n disableContextMenuColumn={disableContextMenuColumn}\n enableMultiSorting={enableMultiSorting}\n spacing={styleWithSpacing}\n />\n <DataGridBody\n children={children}\n data={data}\n headers={internalHeaders}\n isLoading={isLoading}\n disableContextMenuColumn={disableContextMenuColumn}\n emptyLabel={emptyLabel}\n spacing={styleWithSpacing}\n />\n </table>\n </div>\n {paginationProps && !isLoading && (\n <Pagination\n {...paginationProps}\n style={{\n ...paginationProps.style,\n paddingLeft: styleWithSpacing?.paddingLeft,\n paddingRight: styleWithSpacing?.paddingRight\n }}\n className={`${classes[\"pagination\"]} ${paginationProps.className ?? \"\"}`}\n />\n )}\n </div>\n );\n};\n\nexport const DataGrid = React.forwardRef(DataGridInner) as <T extends {}>(\n p: Props<T> & { ref?: Ref<HTMLDivElement> }\n) => ReactElement;\n","import React, { Fragment, useState } from \"react\";\nimport { Modal, Props as ModalProps } from \"../Modal/Modal\";\nimport { ModalHeader, Props as ModalHeaderProps } from \"../Modal/ModalHeader/ModalHeader\";\nimport {\n DiscardChangesDialog,\n Props as DiscardChangesDialogProps\n} from \"./DiscardChangesDialog/DiscardChangesDialog\";\n\nexport interface Props extends Omit<ModalProps, \"onClose\"> {\n hasUnsavedChanges: () => boolean;\n onClose: (event?: React.MouseEvent<HTMLElement>) => unknown;\n headerProps: Omit<ModalHeaderProps, \"onClose\" | \"id\">;\n discardChangedDialogProps: Omit<\n DiscardChangesDialogProps,\n \"open\" | \"onKeepEditing\" | \"onDiscardChanges\"\n >;\n modalRef?: React.RefObject<HTMLDivElement>;\n dialogRef?: React.RefObject<HTMLDivElement>;\n}\n\nexport const DiscardChangesModal = ({\n id,\n children,\n headerProps,\n discardChangedDialogProps,\n modalRef,\n dialogRef,\n onClose,\n hasUnsavedChanges,\n ...rest\n}: Props) => {\n const [openDiscardChangesDialog, setOpenDiscardChangesDialog] = useState(false);\n\n const onCloseWrapper = () =>\n hasUnsavedChanges() ? setOpenDiscardChangesDialog(true) : onClose();\n\n const onDialogKeepEditing = () => {\n setOpenDiscardChangesDialog(false);\n };\n\n const onDialogDiscardChanges = () => {\n setOpenDiscardChangesDialog(false);\n onClose();\n };\n\n return (\n <Fragment>\n <Modal id={id} ref={modalRef} onClose={onCloseWrapper} {...rest}>\n <ModalHeader {...headerProps} id={`${id}-label`} onClose={onCloseWrapper} />\n {children}\n </Modal>\n <DiscardChangesDialog\n {...discardChangedDialogProps}\n ref={dialogRef}\n open={openDiscardChangesDialog}\n onKeepEditing={onDialogKeepEditing}\n onDiscardChanges={onDialogDiscardChanges}\n />\n </Fragment>\n );\n};\n","import React, { HTMLProps, ReactNode } from \"react\";\nimport classes from \"./Form.module.scss\";\n\nexport interface Props extends HTMLProps<HTMLFormElement> {\n children?: ReactNode;\n}\n\nexport const Form = ({ children, className, ...rest }: Props) => {\n return (\n <form className={`${classes.form} ${className ?? \"\"}`} {...rest}>\n {children}\n </form>\n );\n};\n","import React, { ReactNode, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { SnackbarContextProvider } from \"./SnackbarStateProvider\";\nimport { Actions, SnackbarOptionsProps, Variant } from \"../interfaces\";\nimport { Placement, SnackbarContainer } from \"../SnackbarContainer/SnackbarContainer\";\nimport { generateID } from \"../../../util/helper\";\nimport { SnackbarItem } from \"../SnackbarItem/SnackbarItem\";\n\n/** Short msg is when only title is provided. Long one when content or/and actions are provided (or type is error). */\ninterface Duration {\n long: number;\n short: number;\n}\n\nexport interface Props {\n closeButtonTitle: string;\n children?: ReactNode;\n placement?: Placement;\n stackSize?: number;\n domRoot?: HTMLElement;\n autoHideDuration?: Duration;\n className?: string;\n}\n\ninterface Item {\n id: string;\n title: string;\n duration: number;\n variant: Variant;\n content?: string;\n actions?: Actions;\n onClose?: () => void;\n}\n\nexport const SnackbarProvider = (\n {\n closeButtonTitle,\n placement = { vertical: \"bottom\", horizontal: \"center\" },\n autoHideDuration = { long: 8000, short: 4000 },\n stackSize = 3,\n domRoot = document.body,\n children,\n className\n }: Props = { closeButtonTitle: \"\" }\n) => {\n const [snackbars, setSnackbars] = useState<Item[]>([]);\n\n const addSnackbar = (item: Item) => {\n setSnackbars(items => [...items, item]);\n };\n\n const getDuration = (variant: Variant, actions?: Actions, content?: string) => {\n const hasError = variant === \"error\";\n const hasContentOrActions = content || actions;\n if (hasError || hasContentOrActions) {\n return autoHideDuration.long;\n }\n return autoHideDuration.short;\n };\n\n const enqueueSnackbar = (\n title: string,\n content?: string,\n options: SnackbarOptionsProps = {}\n ): void => {\n const {\n variant = \"info\",\n actions,\n duration = getDuration(variant, actions, content),\n onClose\n } = options;\n const item: Item = {\n title,\n content,\n variant,\n actions,\n duration,\n id: generateID(15, title),\n onClose\n };\n addSnackbar(item);\n };\n\n const enqueueSuccessSnackbar = (\n title: string,\n content?: string,\n options?: SnackbarOptionsProps\n ): void => {\n enqueueSnackbar(title, content, { ...options, variant: \"success\" });\n };\n\n const enqueueErrorSnackbar = (\n title: string,\n content?: string,\n options?: SnackbarOptionsProps\n ): void => {\n enqueueSnackbar(title, content, { ...options, variant: \"error\" });\n };\n\n const onItemClosed = (id: string) => {\n setSnackbars(items => [...items].filter(item => item.id !== id));\n };\n\n const snackbarList = snackbars.map((item, index) =>\n index < stackSize ? (\n <SnackbarItem\n {...item}\n key={item.id}\n onClose={() => {\n onItemClosed(item.id);\n item.onClose && item.onClose();\n }}\n closeButtonTitle={closeButtonTitle}\n />\n ) : null\n );\n\n const snackbarPortal = createPortal(\n <SnackbarContainer placement={placement} className={className}>\n {snackbarList}\n </SnackbarContainer>,\n domRoot\n );\n\n return (\n <SnackbarContextProvider\n initialState={{ enqueueSnackbar, enqueueSuccessSnackbar, enqueueErrorSnackbar }}\n >\n {children}\n {snackbarPortal}\n </SnackbarContextProvider>\n );\n};\n","import React from \"react\";\n\nexport interface Props {\n title: string;\n children?: React.ReactNode;\n selected?: boolean;\n focussed?: boolean;\n buttonRef?: React.RefObject<HTMLButtonElement>;\n panelRef?: React.RefObject<HTMLDivElement>;\n onTabButtonClick?: () => void;\n}\n\nexport const Tab = (args: Props) => {\n return (\n <div {...args}>{`A <Tab /> component should only be used inside the <Tabs /> component.`}</div>\n );\n};\n","import React, {\n ComponentPropsWithRef,\n createRef,\n MutableRefObject,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { generateID } from \"../util/helper\";\nimport { Props as TabProps } from \"./Tab\";\nimport { TabButton } from \"./TabButton\";\nimport { TabPanel } from \"./TabPanel\";\nimport classes from \"./Tabs.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children: React.ReactElement<TabProps> | React.ReactElement<TabProps>[];\n selected?: number;\n \"aria-label\"?: string;\n onTabChange?: (index: number) => void;\n}\n\nexport const Tabs = ({\n children,\n selected = 0,\n \"aria-label\": ariaLabel,\n onTabChange,\n className,\n ...rest\n}: Props) => {\n const indicatorRef = useRef<HTMLDivElement>(null);\n const [indicatorPosition, setIndicatorPosition] = useState({ left: 0, top: 0 });\n const [indicatorWidth, setIndicatorWidth] = useState(0);\n\n const [max] = useState(React.Children.count(children) - 1);\n const min = 0;\n\n const [selectedTab, setSelectedTab] = useState(Math.min(max, Math.max(min, selected)));\n const [focussedTab, setFocussedTab] = useState(-1);\n const [tabIds] = useState([...Array(max)].map(() => generateID()));\n const [tabPanelIds] = useState([...Array(max)].map(() => generateID()));\n\n useEffect(() => {\n setSelectedTab(Math.min(max, Math.max(min, selected)));\n setFocussedTab(-1);\n }, [selected]);\n\n useEffect(() => {\n calculateIndicatorPosition();\n }, [selectedTab]);\n\n const calculateIndicatorPosition = () => {\n const selectedTabButton = (\n tabButtons[selectedTab].ref as MutableRefObject<HTMLButtonElement | null>\n ).current as HTMLButtonElement;\n\n setIndicatorPosition({\n left: selectedTabButton.offsetLeft,\n top:\n selectedTabButton.offsetTop +\n selectedTabButton.offsetHeight -\n indicatorRef.current!.offsetHeight\n });\n setIndicatorWidth(selectedTabButton.offsetWidth);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n // do not show focus unless we came here before\n let currentFocussedTab = focussedTab === -1 ? selectedTab : focussedTab;\n\n switch (e.code) {\n case \"ArrowLeft\":\n setFocussedTab(currentFocussedTab === min ? max : currentFocussedTab - 1);\n break;\n case \"ArrowRight\":\n setFocussedTab(currentFocussedTab === max ? min : currentFocussedTab + 1);\n break;\n case \"Home\":\n setFocussedTab(min);\n break;\n case \"End\":\n setFocussedTab(max);\n break;\n case \"Space\":\n case \"Enter\":\n activateTab(currentFocussedTab);\n break;\n }\n };\n\n const handleBlur = () => {\n setFocussedTab(selectedTab);\n };\n\n const activateTab = (index: number) => {\n setSelectedTab(index);\n setFocussedTab(index);\n onTabChange && onTabChange(index);\n };\n\n const tabButtons = React.Children.map(children, (child, index) =>\n React.createElement(TabButton, {\n ref: child.props.buttonRef || createRef<HTMLButtonElement>(),\n key: generateID(),\n tabId: tabIds[index],\n tabPanelId: tabPanelIds[index],\n selected: selectedTab === index,\n focussed: focussedTab === index,\n onTabButtonClick: () => activateTab(index),\n children: child.props.title\n })\n );\n\n const tabPanels = React.Children.map(children, (child, index) =>\n React.createElement(TabPanel, {\n ref: child.props.panelRef || createRef<HTMLDivElement>(),\n key: generateID(),\n selected: selectedTab === index,\n tabId: tabIds[index],\n tabPanelId: tabPanelIds[index],\n children: child.props.children\n })\n );\n\n return (\n <div {...rest} className={`${classes[\"tabs\"]} ${className ?? \"\"}`}>\n <div\n role=\"tablist\"\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n aria-label={ariaLabel}\n className={classes[\"tablist\"]}\n >\n <div className={classes[\"tabdivider\"]} />\n {tabButtons}\n <div\n className={classes[\"indicator\"]}\n ref={indicatorRef}\n aria-hidden=\"true\"\n tabIndex={-1}\n style={{\n width: indicatorWidth,\n ...indicatorPosition\n }}\n />\n </div>\n <div className={classes[\"tabpanels\"]}>{tabPanels}</div>\n </div>\n );\n};\n","import React, { Fragment, useContext, useMemo } from \"react\";\nimport { Button } from \"../../Button/Button\";\nimport { Step } from \"../BaseWizardSteps/BaseWizardSteps\";\nimport { WizardMode } from \"../Wizard\";\nimport { WizardStateContext } from \"../WizardStateProvider\";\nimport { changeCurrentStepNo } from \"../wizardStateReducer\";\n\nexport interface Props extends React.HTMLProps<HTMLDivElement> {\n cancelButtonLabel: string;\n previousButtonLabel: string;\n nextButtonLabel: string;\n saveAndCloseButtonLabel: string;\n onCancel: () => void;\n onNext: (currentStepNo: number) => boolean;\n onPrevious?: () => void;\n onSaveAndClose: (currentStepNo: number) => void;\n}\n\nconst calculateNextStepNo = (steps: Step[], currentStepNo: number) => () =>\n steps.findIndex((step, stepNo) => stepNo > currentStepNo && !step.disabled);\n\nconst calculatePrevStepNo = (steps: Step[], currentStepNo: number) => () => {\n const reversedCurrentStepNo = steps.length - 1 - currentStepNo;\n const reversedPrevStepNo = [...steps]\n .reverse()\n .findIndex((step, stepNo) => stepNo > reversedCurrentStepNo && !step.disabled);\n if (reversedPrevStepNo > 0) {\n return steps.length - 1 - reversedPrevStepNo;\n }\n return -1;\n};\n\nconst useNextStepNo = (mode: WizardMode, currentStepNo: number, steps: Step[]) =>\n useMemo(calculateNextStepNo(steps, currentStepNo), [mode, currentStepNo, steps]);\n\nconst usePreviousStepNo = (mode: WizardMode, currentStepNo: number, steps: Step[]) =>\n useMemo(calculatePrevStepNo(steps, currentStepNo), [mode, currentStepNo, steps]);\n\nexport const WizardActions = ({\n onCancel,\n onNext,\n onPrevious,\n onSaveAndClose,\n cancelButtonLabel,\n previousButtonLabel,\n nextButtonLabel,\n saveAndCloseButtonLabel\n}: Props) => {\n const {\n state: { mode, steps, currentStepNo },\n dispatch\n } = useContext(WizardStateContext);\n const nextStepNo = useNextStepNo(mode, currentStepNo, steps);\n const hasNextStep = nextStepNo !== -1;\n const previousStepNo = usePreviousStepNo(mode, currentStepNo, steps);\n const hasPreviousStep = previousStepNo !== -1;\n const isLastStepOrEditMode = !hasNextStep || mode === \"edit\";\n\n const changeStepNo = (direction: \"forward\" | \"backward\") => {\n if (direction === \"forward\") {\n hasNextStep && dispatch(changeCurrentStepNo(nextStepNo));\n } else {\n hasPreviousStep && dispatch(changeCurrentStepNo(previousStepNo));\n }\n };\n\n const onNextWrapper = () => {\n onNext(currentStepNo) && changeStepNo(\"forward\");\n };\n\n const onPreviousWrapper = () => {\n onPrevious && onPrevious();\n changeStepNo(\"backward\");\n };\n\n const onSaveAndCloseWrapper = () => {\n onSaveAndClose(currentStepNo);\n };\n\n return (\n <Fragment>\n <Button variant=\"text\" onClick={onCancel}>\n {cancelButtonLabel}\n </Button>\n {hasPreviousStep && (\n <Button variant=\"outline\" onClick={onPreviousWrapper}>\n {previousButtonLabel}\n </Button>\n )}\n {hasNextStep && (\n <Button variant={mode === \"edit\" ? \"outline\" : \"fill\"} onClick={onNextWrapper}>\n {nextButtonLabel}\n </Button>\n )}\n {isLastStepOrEditMode && (\n <Button onClick={onSaveAndCloseWrapper}>{saveAndCloseButtonLabel}</Button>\n )}\n </Fragment>\n );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { generateID } from \"../util/helper\";\n\ninterface Arguments {\n componentToRepeat: React.ReactElement;\n}\n\nexport const useRepeater = <T>({ componentToRepeat }: Arguments) => {\n const [repeatedComponents, setRepeatedComponents] = useState<JSX.Element[]>([]);\n\n useEffect(() => {\n repeat();\n }, []);\n\n const repeat = () => {\n const clonedComponent = React.cloneElement(componentToRepeat, { key: generateID(20) });\n\n setRepeatedComponents(prevState => [...prevState, clonedComponent]);\n };\n\n const remove = (componentToRemove: React.ReactElement<T>) => {\n const newRepeatedComponents = repeatedComponents.filter(\n component => component !== componentToRemove\n );\n\n setRepeatedComponents(newRepeatedComponents);\n };\n\n return {\n repeatedComponents,\n repeat,\n remove\n };\n};\n","import { useContext } from \"react\";\nimport { SnackbarContext } from \"./SnackbarProvider/SnackbarStateProvider\";\n\nexport const useSnackbar = () => useContext(SnackbarContext);\n"],"names":["BaseStyling","e","t","n","r","document","a","s","prepend","d","singleTag","i","container","querySelector","getElementsByTagName","u","indexOf","push","c","charCodeAt","substring","styleSheet","cssText","appendChild","createTextNode","createElement","setAttribute","attributes","Object","keys","length","insertAdjacentElement","BaseButton","React","forwardRef","ref","children","_ref$type","_ref","type","className","rest","_objectWithoutPropertiesLoose","_excluded","includes","Error","classes","Button","_ref$variant","variant","_ref$color","color","_ref$startIcon","startIcon","_ref$endIcon","endIcon","additionalClasses","join","Icons","Icon","icon","style","size","_ref$tag","tag","_extends","fontSize","spacingNumberRegex","useSpacing","spacingProps","entries","reduce","prev","_extends2","spacing","matches","String","matchAll","cssSpacingValue","Array","from","map","_ref2","Number","validVariants","Typography","_ref$className","styleWithSpacing","Breadcrumbs","ariaLabel","items","Children","child","index","isArray","Fragment","key","cloneElement","ChevronRight","props","defaultConfigObject","relativeElement","undefined","elementToBePositioned","transformOrigin","horizontal","vertical","placement","offset","top","right","bottom","left","usePosition","providedConfigObject","configObject","_useState","useState","position","setPosition","_calculatePlacement","relEl","elDimensions","axis","_configObject$transfo","_configObject$transfo2","placementValue","requestedReturnValue","placementOriginDefinition","_determineCenteredPlacementOrigin","value","window","_calculateInitialPlacementValue","valueWithOffset","_configObject$offset","_configObject$offset2","_configObject$offset7","_configObject$offset8","_configObject$offset3","_configObject$offset4","_configObject$offset5","_configObject$offset6","_configObject$offset9","_configObject$offset10","_configObject$offset11","_configObject$offset12","returnValue","_applyOffsetToPlacementValue","valueCorrectionForViewportOverflow","innerWidth","width","innerHeight","height","_fixPossibleViewportOverflow","_calculatePlacementValue","direction","oppositeDirection","prevState","calculatePosition","_configObject$relativ","current","relativeElRect","getBoundingClientRect","elementToBePositionedDimensions","offsetHeight","offsetWidth","clonedRelEl","center","centerv","centerh","x","y","Popover","show","anchorEl","elToBePositioned","useRef","_usePosition","useEffect","useBodyClick","checkFunction","callbackFunction","dependingStateVariable","bodyClickListener","event","addEventListener","removeEventListener","ContextMenu","trigger","decorativeElement","id","_ref$show","onShow","onClose","_ref$placement","_ref$offset","_ref$transformOrigin","_ref$domRoot","domRoot","body","showContextMenu","setShowContextMenu","hasBeenClosed","_useState2","setHasBeenClosed","_useState3","selectedContextMenuItem","setSelectedContextMenuItem","_useState4","focusedContextMenuItem","setFocusedContextMenuItem","shouldClick","_useState5","setShouldClick","childrenCount","count","target","parentElement","focus","onKeyDown","code","preventDefault","onClick","tabIndex","createPortal","role","onFocusChange","childIndex","onSelectedChange","hasFocus","isSelected","contextMenuOpened","ContextMenuItem","innerButtonRef","createRef","click","Link","_ref$disabled","disabled","to","_ref$display","display","_ref$buttonVariant","buttonVariant","component","classNames","download","rel","href","IconButton","_ref$iconSize","iconSize","title","console","error","iconButtonClasses","readyclasses","generateID","stringToWeaveIn","hashCharacters","test","Math","floor","random","slice","filterProps","regexPattern","returnFiltered","acc","filter","prevObj","currKeyValPair","TabButton","_ref$selected","selected","_ref$focussed","focussed","tabId","tabPanelId","onTabButtonClick","TabPanel","hidden","TextEllipsis","popoverClassName","showPopover","setShowPopover","textContainer","ellipsisVisible","scrollWidth","onMouseEnter","onMouseLeave","Tile","imageProps","enabled","loading","tileAction","tileDescriptionID","justifyContent","Checkmark","Forbidden","readyClasses","src","alt","Image","Tiles","_ref$loading","defaultPosition","Tooltip","label","identifier","visible","setVisible","escapePressHandler","useLayoutEffect","isValidElement","onFocus","onBlur","InfoCircle","Skeleton","StatusIndicator","_badgeProps$className","status","badgeProps","typographyProps","margin","dateTypes","Input","_ref$error","name","wrapperProps","labeledBy","prefix","suffix","setFocus","inputWrapperRef","errorIconRef","suffixRef","errorOffset","errorIcon","inputWrapper","suffixContent","setErrorOffset","defaultErrorOffset","setDefaultErrorOffset","defaultOffset","parseFloat","getComputedStyle","inputPaddingRight","input","paddingRight","useErrorOffset","inputClassNames","iconClassNames","wrapperClasses","outlineClasses","Select","placeholder","describedBy","_ref$searchPlaceholde","searchPlaceholder","searchInputProps","selectButtonProps","_ref$clearLabel","clearLabel","onChange","onClear","expanded","setExpanded","opacity","setOpacity","setFilter","setDisplay","listPosition","setListPosition","optionsListMaxHeight","_useState6","setOptionsListMaxHeight","containerReference","optionListReference","isSearching","_useState7","setIsSearching","_useState8","focusedSelectItem","setFocusedSelectItem","_useState9","nativeSelect","searchInputRef","val","forEach","listHeight","availableSpace","calculateOptionListMaxHeight","rePositionList","closest","_searchInputProps$wra","internalChildren","codesToPreventDefault","Warning","stopPropagation","TimesThin","TriangleDown","maxHeight","pointerEvents","autoFocus","currentTarget","toArray","toLowerCase","match","onOptionSelect","optionRef","getAttribute","dispatchEvent","Event","bubbles","onOptionChangeHandler","selectOpened","Option","_ref$isSelected","innerOptionRef","onSelectHandler","onKeyDownCapture","DefaultTranslations","Label","_ref$hidden","Pagination","amountOfPages","totalElements","_ref$pageSize","pageSize","_ref$translate","translate","currentPage","onPageChange","onPageSizeChange","toString","internalCurrentPage","setInternalCurrentPage","calculateAmountOfPages","ceil","onEnterListener","onPageChangeHandler","pageToGoTo","totalItems","itemsPerPage","pageSizeNumber","NavigationFirst","ChevronLeft","split","string","htmlFor","currentPageLabel","max","onKeyUp","replace","NavigationLast","labelId","descriptionId","BaseModal","_backdropProps$classN","_containerProps$class","_containerProps$class2","open","containerProps","backdropProps","labelledby","describedby","_ref$disableEscapeKey","disableEscapeKeyDown","_ref$disableBackdrop","disableBackdrop","_ref$forceContainerOp","forceContainerOpen","zIndex","querySelectorAll","removeProperty","useSetBodyScroll","SnackbarContext","createContext","enqueueSnackbar","enqueueSuccessSnackbar","enqueueErrorSnackbar","SnackbarContextProvider","Provider","initialState","BaseModalContent","_ref$disableAutoFocus","disableAutoFocus","contentRef","_ref$current","_contentRef$current","BaseModalActions","DialogActions","align","DialogTitle","Dialog","secondaryLabel","restOfSecondaryAction","alignActions","primaryAction","secondaryAction","dialogId","primaryLabel","restOfPrimaryAction","_excluded2","PrimaryButton","TertiaryButton","_excluded3","maxLength","onKeyPress","BaseModalHeader","Times","DiscardChangesDialog","onKeepEditing","onDiscardChanges","discardChangesButtonLabel","keepEditingButtonLabel","contentLabel","titleLabel","SlideInModal","classHideOnTransition","setClassHideOnTransition","containerRef","Modal","onTransitionEnd","SnackbarContainer","SnackbarItem","duration","content","_ref$actions","actions","closeButtonTitle","timerHandler","useAnimation","callback","animatedObjectRef","animationStarted","setAnimationStarted","onAnimationEnd","_animatedObjectRef$cu","_animatedObjectRef$cu2","startAnimation","setTimeout","clearTimeout","actionButtons","actionProp","CheckmarkCircleBreakout","useFormSelector","setDescribedBy","errorId","errorMessage","parentErrorId","helperText","parentHelperId","FormHelperText","FormSelectorWrapper","_helperProps$classNam","nestedChildren","helperProps","helperRef","isToggle","_children$props","Checkbox","indeterminate","_ref$checked","checked","formSelectorWrapperProps","_useFormSelector","iconClasses","MinusSquare","CheckmarkSquare","Square","determineLabel","Radio","onChangeHandler","nativeEvent","clonedEvent","constructor","defineProperty","writable","Circle","Textarea","_errorProps$className","_ref$rows","rows","errorProps","Toggle","FormControl","grid","_ref$align","childElement","column","FormGroup","errorMessageIcon","_ref$errorMessageIcon","errorMessageIconPosition","helperId","helperIndent","marginLeft","message","Wrapper","_ref$floatingLabel","floatingLabel","floatingLabelActive","required","labelProps","innerClassName","labelClasses","wrapper","useWrapper","setFloatingLabelActive","setHasFocus","InputWrapper","_inputProps$wrapperPr","_inputProps$wrapperPr2","_inputProps$className","inputProps","hasValueOrActiveFloatingLabel","labelOffset","setLabelOffset","prefixDifference","paddingLeft","useLabelOffset","_inputProps$placehold","SelectWrapper","_selectProps$classNam","selectProps","_useWrapper","TextareaWrapper","textareaProps","hover","setHover","optionalClasses","_textareaProps$placeh","Fieldset","legend","_ref$legendStyle","legendStyle","_ref$hideLegend","hideLegend","_ref$background","background","noBackground","_ref$noPadding","noPadding","_ref$required","_ref$disablePropagati","disablePropagation","backgroundColor","allowedComponents","_child$props$disabled","_child$props$error","renderChildren","RadioWrapper","fieldsetProps","CheckboxWrapper","changeCurrentStepNo","currentStepNo","payload","reducer","state","action","WizardStateContext","dispatch","WizardStateProvider","_useReducer","useReducer","WizardContent","steps","mode","stepScreenReaderLabel","onStepChange","useContext","setWizardState","useStepChanging","BaseWizardSteps","_ref$futureStepsClick","futureStepsClickable","generatedSteps","step","stepNo","stepState","disabledStyleClassName","clickableClassName","stepNumberString","getStepContent","WizardSteps","onStepClick","_useContext$state","_useContext","selectedStepNo","ariaSortMapping","ASC","DESC","DataGridHeaderCell","getSortingIndicatorClasses","headline","disableSorting","activeSortDirection","onSort","innerContent","sortingIndicatorClasses","TriangleUp","sortingStates","DataGridHeader","initialSort","headers","disableContextMenuColumn","enableMultiSorting","sortList","setSortList","wrapOnSort","newSort","currentDirectionIdx","find","item","restSortList","newSortDirection","findIndex","concat","updateSortList","headerCells","header","headerStyle","sort","DataGridColumnsToggle","_ref$titleLabel","_ref$closeButtonTitle","onToggleClicked","labelledId","toggles","DataGridActions","_columnsBtnProps$clas","_columnsBtnProps$clas2","_searchBtnProps$class","_columnsBtnProps$clas3","enableAddBtn","enableColumnsBtn","enableSearchBtn","_ref$addBtnProps","addBtnProps","_ref$columnsBtnProps","columnsBtnProps","_ref$searchBtnProps","searchBtnProps","onColumnToggled","isHidden","showColsPopover","setShowColsPopover","showColumnBtn","Plus","Change","TableSearch","DataGridCell","isLoading","cellIndex","columnLength","cellStyle","DataGridRow","visibleCells","cellWithSpacing","DataGridBodyInner","visibleColumns","data","emptyLabel","_","rowIdx","__","colIdx","colSpan","DataGridBody","DataGridInner","_paginationProps$clas","paginationProps","internalHeaders","setInternalHeaders","padding","splitPaddings","paddingLeftIndex","defineProperties","paddingTop","paddingBottom","colName","DataGrid","_ref$properties","properties","defaultProperties","colorFocus","colorPrimary","colorSecondary","colorTertiary","defaultLineHeight","buttonBorderRadius","buttonBorderWidth","buttonFontSize","buttonBorderStyle","buttonFillTextColor","buttonFillBackgroundColor","buttonOutlineHoverTextColor","inputBorderColor","inputBorderRadius","inputBorderWidth","inputBorderWidthFocus","inputBorderStyle","inputBackgroundColor","modalShadowColor","modalBackgroundColor","modalHeaderBackgroundColor","snackbarTextColor","snackbarInfoBackgroundColor","snackbarSuccessBackgroundColor","snackbarErrorBackgroundColor","snackbarBorderRadius","dataGridRowBackgroundColor","dataGridRowHoverBackgroundColor","tabsBackgroundColor","tabBorderWidth","tabBorderStyle","tablistBorderWidth","tablistBorderStyle","tablistBorderColor","tabTextColor","default","success","greyedOut","warning","fontFamily","fontFamilyCode","fontSizeH1","fontSizeH2","fontSizeH3","fontSizeH4","fontSizeSub","fontSizeCode","setIsLoading","setCSSProperties","CSSPropertiesObject","_i","_Object$entries","_Object$entries$_i","formattedPropertyName","documentElement","setProperty","mergedState","headerProps","discardChangedDialogProps","modalRef","dialogRef","hasUnsavedChanges","openDiscardChangesDialog","setOpenDiscardChangesDialog","onCloseWrapper","ModalHeader","_temp","_ref$autoHideDuration","autoHideDuration","long","short","_ref$stackSize","stackSize","setSnackbars","options","_options","_options$variant","_options$duration","getDuration","snackbarList","snackbarPortal","args","onTabChange","indicatorRef","indicatorPosition","setIndicatorPosition","indicatorWidth","setIndicatorWidth","min","selectedTab","setSelectedTab","focussedTab","setFocussedTab","tabIds","tabPanelIds","calculateIndicatorPosition","selectedTabButton","tabButtons","offsetLeft","offsetTop","activateTab","buttonRef","tabPanels","panelRef","currentFocussedTab","initialStepNo","_props$initialStepNo","onCancel","onNext","onPrevious","onSaveAndClose","cancelButtonLabel","previousButtonLabel","nextButtonLabel","saveAndCloseButtonLabel","nextStepNo","useMemo","calculateNextStepNo","useNextStepNo","hasNextStep","previousStepNo","reversedCurrentStepNo","reversedPrevStepNo","reverse","calculatePrevStepNo","usePreviousStepNo","hasPreviousStep","isLastStepOrEditMode","changeStepNo","componentToRepeat","repeatedComponents","setRepeatedComponents","repeat","clonedComponent","remove","componentToRemove","newRepeatedComponents"],"mappings":"6iBA4DaA,IC5DTC,EAAE,GAAGC,EAAE,GAAG,SAASC,EAAEA,EAAEC,GAAG,GAAGD,GAAG,oBAAoBE,SAAS,CAAC,IAAIC,EAAEC,GAAE,IAAKH,EAAEI,QAAQ,UAAU,SAASC,GAAE,IAAKL,EAAEM,UAAUC,EAAE,iBAAiBP,EAAEQ,UAAUP,SAASQ,cAAcT,EAAEQ,WAAWP,SAASS,qBAAqB,QAAQ,GAAG,GAAGL,EAAE,CAAC,IAAIM,EAAEd,EAAEe,QAAQL,IAAI,IAAII,IAAIA,EAAEd,EAAEgB,KAAKN,GAAG,EAAET,EAAEa,GAAG,CAAE,GAAET,EAAEJ,EAAEa,IAAIb,EAAEa,GAAGR,GAAGL,EAAEa,GAAGR,GAAGL,EAAEa,GAAGR,GAAGW,GAAG,MAAMZ,EAAEY,IAAI,QAAQf,EAAEgB,WAAW,KAAKhB,EAAEA,EAAEiB,UAAU,IAAId,EAAEe,WAAWf,EAAEe,WAAWC,SAASnB,EAAEG,EAAEiB,YAAYlB,SAASmB,eAAerB,GAAG,CAAC,SAASe,IAAI,IAAIjB,EAAEI,SAASoB,cAAc,SAAS,GAAGxB,EAAEyB,aAAa,OAAO,YAAYtB,EAAEuB,WAAW,IAAI,IAAIzB,EAAE0B,OAAOC,KAAKzB,EAAEuB,YAAYxB,EAAE,EAAEA,EAAED,EAAE4B,OAAO3B,IAAIF,EAAEyB,aAAaxB,EAAEC,GAAGC,EAAEuB,WAAWzB,EAAEC,KAAkD,OAAOQ,EAAEoB,sBAAhD,YAAYxB,EAAE,aAAa,YAA6CN,GAAGA,CAAC,CAAC,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