@onewelcome/react-lib-components 0.1.9-alpha → 0.1.10-alpha

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/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 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 cardBackgroundColor?: string;\n cardBorderRadius?: 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 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: '#e22a1d',\n snackbarBorderRadius: '8px',\n dataGridRowBackgroundColor: 'transparent',\n dataGridRowHoverBackgroundColor: '#f5e6f0',\n cardBackgroundColor: '#fff',\n cardBorderRadius: '8px',\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: '#e22a1d',\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\nconst validVariants = ['h1', 'h2', 'h3', 'h4', 'body', 'body-bold', 'sub-text', 'code'] 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\n/** I couldn't find anything on the internet that indicated that ComponentPropsWithRef can take multiple tags. Since the TagName can be many different things I have to use any here. Using a mix of tags (like the Tags type) will throw an error. */\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 HorizontalPlacment = '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: HorizontalPlacment;\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\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: HorizontalPlacment | 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: HorizontalPlacment | 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 { usePosition, Offset, Placement } 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>;\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 [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 showContextMenu && anchorEl.current !== event.target;\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 setFocusedContextMenuItem(-1);\n 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 ...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=\"menuitem\" className={classes['context-menu-item']}>\n <button\n {...rest}\n ref={innerButtonRef}\n data-focus={hasFocus}\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, { ComponentPropsWithRef, ReactElement, useState } 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 {\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, Ref, useEffect, 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\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\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\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 && wrapperClasses.push(classes['disabled']);\n error && wrapperClasses.push(classes['error']);\n focus && wrapperClasses.push(classes['focus']);\n\n return (\n <div\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 data-suffix className={classes['suffix']}>\n <span>{suffix}</span>\n </div>\n )}\n {error && <Icon className={iconClassNames.join(' ')} icon={Icons.Error} />}\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(!expanded);\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 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 className={classes['custom-select']}\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 ...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 = () => (totalElements ? Math.ceil(totalElements / pageSize) : 0);\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']}\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 <div key={string}>{string.replace('%2', amountOfPages.toString())}&nbsp;</div>;\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 {totalElements && 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 && (\n <div className={classes['page']}>{renderCurrentPageTranslation()}</div>\n )}\n <div className={classes['next']}>\n {((currentPage && currentPage < calculateAmountOfPages()) ||\n (currentPage && !totalElements)) && (\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, { useState } 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<'hidden' | ''>('hidden');\n\n const onTransitionEnd = () => setClassHideOnTransition((prev) => (prev ? '' : 'hidden'));\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}\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 onClick={() => startAnimation()}\n className={classes['close-btn']}\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 } 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 ...rest\n }: Props,\n ref\n ) => {\n return (\n <div\n {...wrapperProps}\n className={`${classes['textarea-wrapper']} ${wrapperProps?.className ?? ''}`}\n >\n <textarea\n {...rest}\n ref={ref}\n rows={rows}\n className={`${error ? classes['error'] : ''} ${classes['textarea']} ${className ?? ''}`}\n disabled={disabled}\n />\n {error && (\n <Icon\n {...errorProps}\n className={`${classes['warning']} ${errorProps?.className ?? ''}`}\n icon={Icons.Error}\n />\n )}\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 ) {\n setFloatingLabelActive(true);\n }\n }, []);\n\n useEffect(() => {\n if ((value?.length && value.length > 0) || hasFocus) {\n setFloatingLabelActive(true);\n } else if (!placeholder && !hasFocus && type !== 'datetime-local' && type !== 'time') {\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 wrapper: React.RefObject<HTMLDivElement>,\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 (wrapper.current && input.current && prefix) {\n if (floatingLabelActive) {\n resetLabelOffset();\n } else {\n const prefixDifference =\n input.current.getBoundingClientRect().left -\n wrapper.current.getBoundingClientRect().left +\n 4;\n\n setLabelOffset({ left: `${prefixDifference}px` });\n }\n }\n }, [wrapper.current, 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 wrapper = useRef<HTMLDivElement>(null);\n const input = useRef<HTMLInputElement>(null);\n const hasValueOrActiveFloatingLabel = !!value || floatingLabelActive;\n const labelClasses = [classes['input-label']];\n const { labelOffset } = useLabelOffset(\n (ref as React.RefObject<HTMLDivElement>) || wrapper,\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 || wrapper}\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 ? 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']} ${hasFocus ? classes['focus'] : ''}`,\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']}\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?.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 ComponentPropsWithRef<'div'> {\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","_useState2","selectedContextMenuItem","setSelectedContextMenuItem","_useState3","focusedContextMenuItem","setFocusedContextMenuItem","shouldClick","_useState4","setShouldClick","childrenCount","count","target","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","dateTypes","Input","_ref$error","name","wrapperProps","labeledBy","prefix","suffix","setFocus","inputClassNames","iconClassNames","wrapperClasses","Select","placeholder","describedBy","_ref$searchPlaceholde","searchPlaceholder","searchInputProps","selectButtonProps","_ref$clearLabel","clearLabel","onChange","onClear","expanded","setExpanded","opacity","setOpacity","setFilter","setDisplay","listPosition","_useState5","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","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","margin","SlideInModal","setClassHideOnTransition","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","_wrapperProps$classNa","_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","input","hasValueOrActiveFloatingLabel","labelOffset","setLabelOffset","prefixDifference","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","paddingLeft","paddingRight","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","inputBorderStyle","inputBackgroundColor","modalShadowColor","modalBackgroundColor","modalHeaderBackgroundColor","snackbarTextColor","snackbarInfoBackgroundColor","snackbarSuccessBackgroundColor","snackbarErrorBackgroundColor","snackbarBorderRadius","dataGridRowBackgroundColor","dataGridRowHoverBackgroundColor","cardBackgroundColor","cardBorderRadius","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":"6iBA6DaA,IC7DTC,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,IAAIT,EAAEJ,EAAEa,IAAIb,EAAEa,GAAGR,GAAGL,EAAEa,GAAGR,GAAGL,EAAEa,GAAGR,GAAGW,SAASZ,EAAEY,IAAI,QAAQf,EAAEgB,WAAW,KAAKhB,EAAEA,EAAEiB,UAAU,IAAId,EAAEe,WAAWf,EAAEe,WAAWC,SAASnB,EAAEG,EAAEiB,YAAYlB,SAASmB,eAAerB,IAAI,SAASe,IAAI,IAAIjB,EAAEI,SAASoB,cAA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kBqQ,EAAa,aAwB/Bf,GAGJc,GACCt1B,EAAAA,QAACR,cAAAsB,GAAO0K,QApBgB,WAC5B6oB,EAAenP,KAmB8BuP,qECxFtB,SAAwCp0B,GAAA,IAAlCm1B,IAAAA,kBACqBpwB,EAAAA,EAAQA,SAAgB,IAArEqwB,EAAPtwB,EAAA,GAA2BuwB,EAA3BvwB,EAAA,GAEA8D,EAAAA,WAAU,WACR0sB,MACC,IAEH,IAAMA,EAAS,WACb,IAAMC,EAAkB51B,EAAAA,QAAMgE,aAAawxB,EAAmB,CAAEzxB,IAAK4J,EAAW,MAEhF+nB,GAAsB,SAAC9tB,GAAD,MAAmBA,GAAAA,OAAAA,GAAWguB,QAWtD,MAAO,CACLH,mBAAAA,EACAE,OAAAA,EACAE,OAXa,SAACC,GACd,IAAMC,EAAwBN,EAAmBlnB,QAC/C,SAACzB,GAAD,OAAeA,IAAcgpB,KAG/BJ,EAAsBK,0BCtBC,WAAA,OAAM9P,EAAAA,WAAWnM"}
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/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 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 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: '#e22a1d',\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: '#e22a1d',\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\nconst validVariants = ['h1', 'h2', 'h3', 'h4', 'body', 'body-bold', 'sub-text', 'code'] 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\n/** I couldn't find anything on the internet that indicated that ComponentPropsWithRef can take multiple tags. Since the TagName can be many different things I have to use any here. Using a mix of tags (like the Tags type) will throw an error. */\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 HorizontalPlacment = '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: HorizontalPlacment;\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\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: HorizontalPlacment | 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: HorizontalPlacment | 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 { usePosition, Offset, Placement } 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>;\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 [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 showContextMenu && anchorEl.current !== event.target;\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 setFocusedContextMenuItem(-1);\n 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 ...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=\"menuitem\" className={classes['context-menu-item']}>\n <button\n {...rest}\n ref={innerButtonRef}\n data-focus={hasFocus}\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, { ComponentPropsWithRef, ReactElement, useState } 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 {\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, Ref, useEffect, 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\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\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\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 && wrapperClasses.push(classes['disabled']);\n error && wrapperClasses.push(classes['error']);\n focus && wrapperClasses.push(classes['focus']);\n\n return (\n <div\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 data-suffix className={classes['suffix']}>\n <span>{suffix}</span>\n </div>\n )}\n {error && <Icon className={iconClassNames.join(' ')} icon={Icons.Error} />}\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(!expanded);\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 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 className={classes['custom-select']}\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 ...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']}\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, { useState } 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<'hidden' | ''>('hidden');\n\n const onTransitionEnd = () => setClassHideOnTransition((prev) => (prev ? '' : 'hidden'));\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}\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 onClick={() => startAnimation()}\n className={classes['close-btn']}\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 } 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 ...rest\n }: Props,\n ref\n ) => {\n return (\n <div\n {...wrapperProps}\n className={`${classes['textarea-wrapper']} ${wrapperProps?.className ?? ''}`}\n >\n <textarea\n {...rest}\n ref={ref}\n rows={rows}\n className={`${error ? classes['error'] : ''} ${classes['textarea']} ${className ?? ''}`}\n disabled={disabled}\n />\n {error && (\n <Icon\n {...errorProps}\n className={`${classes['warning']} ${errorProps?.className ?? ''}`}\n icon={Icons.Error}\n />\n )}\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 ) {\n setFloatingLabelActive(true);\n }\n }, []);\n\n useEffect(() => {\n if ((value?.length && value.length > 0) || hasFocus) {\n setFloatingLabelActive(true);\n } else if (!placeholder && !hasFocus && type !== 'datetime-local' && type !== 'time') {\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 wrapper: React.RefObject<HTMLDivElement>,\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 (wrapper.current && input.current && prefix) {\n if (floatingLabelActive) {\n resetLabelOffset();\n } else {\n const prefixDifference =\n input.current.getBoundingClientRect().left -\n wrapper.current.getBoundingClientRect().left +\n 4;\n\n setLabelOffset({ left: `${prefixDifference}px` });\n }\n }\n }, [wrapper.current, 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 wrapper = useRef<HTMLDivElement>(null);\n const input = useRef<HTMLInputElement>(null);\n const hasValueOrActiveFloatingLabel = !!value || floatingLabelActive;\n const labelClasses = [classes['input-label']];\n const { labelOffset } = useLabelOffset(\n (ref as React.RefObject<HTMLDivElement>) || wrapper,\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 || wrapper}\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 ? 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']} ${hasFocus ? classes['focus'] : ''}`,\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']}\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?.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 ComponentPropsWithRef<'div'> {\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","_useState2","selectedContextMenuItem","setSelectedContextMenuItem","_useState3","focusedContextMenuItem","setFocusedContextMenuItem","shouldClick","_useState4","setShouldClick","childrenCount","count","target","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","dateTypes","Input","_ref$error","name","wrapperProps","labeledBy","prefix","suffix","setFocus","inputClassNames","iconClassNames","wrapperClasses","Select","placeholder","describedBy","_ref$searchPlaceholde","searchPlaceholder","searchInputProps","selectButtonProps","_ref$clearLabel","clearLabel","onChange","onClear","expanded","setExpanded","opacity","setOpacity","setFilter","setDisplay","listPosition","_useState5","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","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","margin","SlideInModal","setClassHideOnTransition","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","_wrapperProps$classNa","_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","input","hasValueOrActiveFloatingLabel","labelOffset","setLabelOffset","prefixDifference","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","paddingLeft","paddingRight","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","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":"6iBA2DaA,IC3DTC,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,IAAIT,EAAEJ,EAAEa,IAAIb,EAAEa,GAAGR,GAAGL,EAAEa,GAAGR,GAAGL,EAAEa,GAAGR,GAAGW,SAASZ,EAAEY,IAAI,QAAQf,EAAEgB,WAAW,KAAKhB,EAAEA,EAAEiB,UAAU,IAAId,EAAEe,WAAWf,EAAEe,WAAWC,SAASnB,EAAEG,EAAEiB,YAAYlB,SAASmB,eAAerB,IAAI,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,s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