@maxio-com/react-ui-components 9.35.0 → 9.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/skills/maxio-react/references/components-icon.md +21 -1
- package/dist/temporary-typings/src/components/Icon/Icon.d.ts.map +1 -1
- package/dist/temporary-typings/src/components/Icon/constants.d.ts +2 -1
- package/dist/temporary-typings/src/components/Icon/constants.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components/Icon/constants.ts","../src/components/Icon/Icon.tsx","../src/components/ActionList/components/ActionItem.tsx","../src/components/ActionList/utils.ts","../src/components/ActionList/ActionList.tsx","../src/components/Link/Link.tsx","../src/components/LoadingSpinner/LoadingSpinner.tsx","../src/components/Buttons/Button/Button.tsx","../src/components/Buttons/IconButton/IconButton.tsx","../src/utils/testId.ts","../src/components/Notifications/Alert/Alert.tsx","../src/components/ActionMenu/contexts/MenuContext.tsx","../src/components/ActionMenu/hooks/useMenu.ts","../src/components/ActionMenu/components/Menu/Menu.tsx","../src/components/Breadcrumbs/BreadcrumbsItem.tsx","../src/components/Breadcrumbs/constants.ts","../src/components/Tooltip/Tooltip.tsx","../src/components/Tooltip/constants.ts","../src/hooks/useOverlayTrigger/utils/composeInteractions.ts","../src/hooks/useOverlayTrigger/useOverlayTrigger.ts","../src/hooks/useHover/useHover.ts","../src/hooks/useWindowSize/useWindowSize.ts","../src/hooks/useElementResizeObserver/useElementResizeObserver.ts","../src/components/OverlayTrigger/constants.ts","../src/components/OverlayTrigger/portalContainer.ts","../src/components/OverlayTrigger/OverlayTrigger.tsx","../src/components/TooltipTrigger/constants.ts","../src/components/TooltipTrigger/TooltipTrigger.tsx","../src/components/TooltipTrigger/utils.ts","../src/components/CopyToClipboard/CopyToClipboard.tsx","../src/components/DataTable/hooks/useColumns.tsx","../src/components/DataTable/components/Table/Table.tsx","../src/components/DataTable/components/TableHead/TableHead.tsx","../src/components/DataTable/components/TableBody/TableBody.tsx","../src/components/DataTable/components/HeaderCell/HeaderCell.tsx","../src/components/DataTable/utils/rowReordering.ts","../src/components/DataTable/hooks/useRowReordering.tsx","../src/components/DataTable/components/TableRow/TableRow.tsx","../src/components/forms/Checkbox/contexts/CheckboxGroupContext.tsx","../src/components/forms/Checkbox/Checkbox/InnerCheckbox/InnerCheckbox.tsx","../src/components/forms/Checkbox/Checkbox/Checkbox.tsx","../src/components/forms/FormHelperText/FormHelperText.tsx","../src/components/forms/FormErrorMessage/FormErrorMessage.tsx","../src/components/DataTable/components/HeaderControls/HeaderControls.tsx","../src/components/Popover/Popover.tsx","../src/components/DataTable/components/RowControls/RowControls.tsx","../src/components/DataTable/components/RowActions/RowActions.tsx","../src/components/DataTable/components/TableCell/TableCell.tsx","../src/components/DataTable/components/RowRenderer/RowRenderer.tsx","../src/components/DataTable/utils/rowReorderAvailability.ts","../src/components/DataTable/DataTable.tsx","../src/components/Typography/Body/Body.tsx","../src/components/Typography/Heading/Heading.tsx","../src/components/Dialog/closeTestIdContext.ts","../src/components/Dialog/Dialog.tsx","../src/hooks/useIsOverflowing/useIsOverflowing.ts","../src/components/Drawer/Drawer.tsx","../src/components/Flex/Flex.tsx","../src/components/ListBox/ListBox.tsx","../src/components/forms/ComboBox/ComboBox.tsx","../src/components/forms/Radio/contexts/RadioGroupContext.tsx","../src/components/forms/SearchField/SearchField.tsx","../src/components/forms/TextField/TextField.tsx","../src/components/forms/NumberField/NumberField.tsx","../src/components/forms/TextArea/TextArea.tsx","../src/components/forms/TextInput/TextInput.tsx","../src/components/forms/Select/Select.tsx","../src/components/forms/DateField/DateInput.tsx","../src/components/Calendar/CalendarTitle.tsx","../src/components/Calendar/Calendar.tsx","../src/components/forms/DatePresets/DatePresets.tsx","../src/components/forms/DatePresets/utils.ts","../src/components/RangeCalendar/RangeCalendar.tsx","../src/components/forms/DateRangePicker/utils.ts","../src/components/SegmentedControl/SegmentedControl.tsx","../src/components/SideNav/SectionName/SectionName.tsx","../src/components/SideNav/SectionName/constants.ts","../src/components/SideNav/contexts/utils.ts","../src/components/SideNav/contexts/SideNavContext.tsx","../src/components/SideNav/SideNavSwitcher/SideNavSwitcher.tsx","../src/components/SideNav/SideNavItems/SideNavItem/SingleItem/SingleItem.tsx","../src/components/SideNav/SideNavItems/SideNavItem/SideNavItem.tsx","../src/components/SideNav/SideNavItems/SideNavItems.tsx","../src/components/SideNav/SideNavTopItem/SideNavTopItem.tsx","../src/components/SideNav/SideNav.tsx","../src/components/Tabs/Tab/Tab.tsx","../src/components/Tabs/contexts/TabsContext.tsx","../src/components/Tabs/TabPanel/TabPanel.tsx","../src/components/Card/Card.tsx","../src/components/Logo/logo.svg","../src/components/Logo/Logo.tsx","../src/components/Notifications/Toast/Toast/Toast.tsx","../src/components/Notifications/Toast/ToastRegion/ToastRegion.tsx","../src/components/Notifications/Toast/GlobalToastProvider/GlobalToastProvider.tsx","../src/components/Toggle/Toggle.tsx","../src/components/Chip/DismissButton/DismissButton.tsx","../src/patterns/AuthLayout/AuthLayout.tsx","../src/components/Avatar/Avatar.tsx","../src/components/Notifications/Banner/Banner.tsx","../src/components/Breadcrumbs/Breadcrumbs.tsx","../src/components/forms/Checkbox/CheckboxGroup/CheckboxGroup.tsx","../src/components/Chip/Chip.tsx","../src/components/Typography/Code/Code.tsx","../src/components/CopyToClipboard/useCopyToClipboard.ts","../src/components/forms/DateField/DateField.tsx","../src/components/forms/DatePicker/DatePicker.tsx","../src/components/forms/DateRangePicker/DateRangePicker.tsx","../src/components/Typography/Display/Display.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/EnvironmentBar/EnvironmentBar.tsx","../src/components/Grid/Grid.tsx","../src/components/Typography/Label/Label.tsx","../src/components/ActionMenu/components/MenuButton/MenuButton.tsx","../src/components/ActionMenu/components/MenuList/MenuList.tsx","../src/components/Modal/Modal.tsx","../src/components/Pagination/Pagination.tsx","../src/components/Pagination/constants.ts","../src/components/ProgressBar/ProgressBar.tsx","../src/components/forms/Radio/Radio.tsx","../src/components/forms/Radio/RadioGroup.tsx","../src/components/Tabs/TabList/TabList.tsx","../src/components/Tabs/TabList/useTabOverflow.ts","../src/components/Tabs/TabList/utils.ts","../src/components/Tabs/TabPanels/TabPanels.tsx","../src/components/Tabs/Tabs/Tabs.tsx","../src/components/Tag/Tag.tsx","../src/components/Tile/Tile.tsx","../src/components/Notifications/Toast/ToastProvider/ToastProvider.tsx","../src/components/TopBar/TopBar.tsx"],"sourcesContent":["export const ICONS = [\n 'address-card',\n 'arrow-down',\n 'arrow-down-left',\n 'arrow-down-left-long',\n 'arrow-down-long',\n 'arrow-down-right',\n 'arrow-down-right-long',\n 'arrow-down-up',\n 'arrow-left',\n 'arrow-left-long',\n 'arrow-left-right',\n 'arrow-right',\n 'arrow-right-long',\n 'arrow-turn-down-right',\n 'arrow-up',\n 'arrow-up-left',\n 'arrow-up-left-long',\n 'arrow-up-long',\n 'arrow-up-right',\n 'arrow-up-right-long',\n 'bank',\n 'bar-chart',\n 'briefcase',\n 'building',\n 'business-intelligence',\n 'calendar',\n 'caret-down',\n 'caret-left',\n 'caret-right',\n 'caret-up',\n 'chat',\n 'check',\n 'check-box',\n 'check-box-checked',\n 'check-box-checked-fill',\n 'check-box-indeterminate-fill',\n 'check-circle',\n 'check-circle-fill',\n 'chevron-down',\n 'chevron-left',\n 'chevron-right',\n 'chevron-up',\n 'chevron-up-down',\n 'circle',\n 'circle-half-stroke-small',\n 'circle-small-dash',\n 'circle-small-fill',\n 'circle-small-stroke',\n 'clipboard',\n 'cog',\n 'copy-file',\n 'credit-card',\n 'cross',\n 'cross-circle',\n 'cross-circle-fill',\n 'dashboard',\n 'diamond-small-fill',\n 'document',\n 'document-blank',\n 'dollar',\n 'dot-circle-fill',\n 'dot-fill',\n 'error',\n 'error-fill',\n 'error-small-fill',\n 'graph',\n 'home',\n 'info-circle',\n 'info-circle-fill',\n 'line-vertical',\n 'list',\n 'login',\n 'logout',\n 'megaphone',\n 'menu',\n 'menu-chevron-left',\n 'menu-chevron-right',\n 'notification',\n 'notification-unread',\n 'pen',\n 'plus',\n 'plus-circle',\n 'plus-circle-fill',\n 'question-circle',\n 'question-circle-fill',\n 'recently-viewed',\n 'search',\n 'square-small-fill',\n 'trash',\n 'triangle-small-fill',\n 'user',\n 'warning-circle',\n 'warning-circle-fill',\n] as const;\n\nexport const NON_KIT_ICONS_LIST = ['cloud', 'globe', 'life-ring', 'sidebar'];\n\nexport const BRAND_ICONS = [\n 'anrok',\n 'dropbox',\n 'hubspot',\n 'numeral',\n 'oracle',\n 'quotapath',\n 'sage',\n 'sphere',\n 'taxjar',\n] as const;\n\nexport const BRAND_ICONS_DUOTONE = [\n 'avalara',\n 'pipedrive',\n 'quickbooks',\n 'salesforce',\n 'xero',\n] as const;\n\nexport const ICON_COLORS = [\n 'primary',\n 'secondary',\n 'info',\n 'inverse',\n 'neutral',\n 'disabled',\n 'highlight',\n 'danger',\n 'success',\n 'warning',\n 'on-bg-fill-disabled',\n];\n","import React from 'react';\nimport cx from 'classnames';\nimport { ICONS, BRAND_ICONS, BRAND_ICONS_DUOTONE } from './constants';\nimport { IconProps, IconVariant } from './Icon.types';\n\nconst Icon = ({\n variant,\n color,\n className,\n size,\n 'data-testid': testId,\n}: IconProps) => {\n const isInList = (variant: string, list: readonly IconVariant[]) =>\n list.includes(variant);\n\n const isInKit = isInList(variant, ICONS) || isInList(variant, BRAND_ICONS);\n const duotoneIcon = isInList(variant, BRAND_ICONS_DUOTONE);\n\n const iconClass = cx(\n {\n 'fa-kit': isInKit,\n 'fa-kit-duotone': duotoneIcon,\n 'fa-sharp fa-regular': !isInKit && !duotoneIcon,\n [`fa-${variant}`]: true,\n [`fa-${size}`]: size,\n [`maxio-icon--${color}`]:\n color &&\n !isInList(variant, BRAND_ICONS) &&\n !isInList(variant, BRAND_ICONS_DUOTONE),\n },\n className\n );\n\n return <i className={iconClass} data-testid={testId} />;\n};\n\nexport default Icon;\n","import cx from 'classnames';\nimport React, { useEffect, useRef } from 'react';\nimport { useId } from 'react-aria';\n\nimport Icon from '../../Icon';\nimport { ActionItemProps } from '../types';\n\nconst ActionItem = ({\n item,\n isSelected,\n truncateLabel = false,\n role = 'option',\n small = false,\n}: ActionItemProps) => {\n const ref = useRef<HTMLAnchorElement>(null);\n\n const isMounted = useRef(false);\n\n const id = useId();\n\n useEffect(() => {\n if (isSelected && isMounted.current) {\n ref.current?.focus();\n }\n }, [isSelected]);\n\n useEffect(() => {\n isMounted.current = true;\n }, []);\n\n if (item.type === 'divider') {\n return (\n <div\n className=\"maxio-action-list__divider\"\n role=\"separator\"\n aria-hidden=\"true\"\n />\n );\n }\n const {\n leadingIconName,\n leadingIconClassName,\n trailingIconName,\n label,\n description,\n link,\n } = item;\n const labelClass = cx('maxio-action-list__label', {\n 'maxio-truncate': truncateLabel,\n });\n return (\n <a\n aria-labelledby={id}\n {...link}\n className={cx('maxio-action-list__content', link.className, {\n 'maxio-action-list__content--size-small': small,\n })}\n tabIndex={isSelected ? 0 : -1}\n ref={ref}\n role={role}\n >\n {leadingIconName && (\n <Icon\n variant={leadingIconName}\n className={cx(\n 'maxio-action-list__leading-icon',\n leadingIconClassName\n )}\n />\n )}\n <span className={labelClass} id={id}>\n {label}\n </span>\n {description && (\n <span className=\"maxio-action-list__description\">{description}</span>\n )}\n {trailingIconName && (\n <Icon\n variant={trailingIconName}\n className=\"maxio-action-list__trailing-icon\"\n />\n )}\n </a>\n );\n};\n\nexport default ActionItem;\n","import { ActionListItem } from './types';\n\nexport const findNextIdx = (idx: number, items: ActionListItem[]): number => {\n const nextIdx = items.findIndex((item, itemIdx) => {\n return item.type !== 'divider' && itemIdx > idx;\n });\n return nextIdx === -1 ? idx : nextIdx;\n};\n\nexport const findPrevIdx = (\n idx: number,\n items: ActionListItem[],\n originalIdx?: number\n): number => {\n if (idx === 0) {\n return idx;\n }\n if (idx === 1 && items[idx - 1].type === 'divider') {\n return originalIdx || idx;\n }\n if (items[idx - 1].type === 'divider') {\n return findPrevIdx(idx - 1, items, originalIdx || idx);\n }\n return idx - 1;\n};\n","import React, { useState } from 'react';\nimport cx from 'classnames';\n\nimport { ActionItem } from './components';\nimport { ActionListProps } from './types';\nimport { findNextIdx, findPrevIdx } from './utils';\n\nconst ActionList = ({\n items,\n isShadowed = true,\n itemProps = {},\n className,\n truncateLabels = false,\n small = false,\n ...props\n}: ActionListProps) => {\n const listClass = cx('maxio-action-list', className, {\n 'maxio-action-list--shadow': isShadowed,\n });\n\n const [selectedIdx, setSelectedIdx] = useState(() =>\n items.findIndex((item) => item.type !== 'divider')\n );\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.code === 'Space' || e.code === 'Enter') {\n const currentItem = items[selectedIdx];\n if (currentItem && currentItem.type !== 'divider') {\n window.open(currentItem.link.href, currentItem.link.target || '_self');\n }\n }\n if (e.code === 'ArrowUp') {\n e.preventDefault();\n setSelectedIdx((prev) => findPrevIdx(prev, items));\n }\n if (e.code === 'ArrowDown') {\n e.preventDefault();\n setSelectedIdx((prev) => findNextIdx(prev, items));\n }\n };\n\n if (items.length === 0) {\n return null;\n }\n\n return (\n <div\n className={listClass}\n onKeyDown={handleKeyDown}\n role=\"listbox\"\n {...props}\n >\n {items.map((item, idx) => (\n <ActionItem\n item={item}\n truncateLabel={truncateLabels}\n key={`listbox-${item.id}`}\n isSelected={idx === selectedIdx}\n small={small}\n {...itemProps}\n />\n ))}\n </div>\n );\n};\n\nexport default ActionList;\n","import React from 'react';\nimport cx from 'classnames';\n\nimport { LinkProps } from './types';\nimport Icon from '../Icon';\n\nconst Link: React.FC<LinkProps> = ({\n className,\n children,\n disabled,\n external,\n icon,\n size = 'sm',\n underline,\n variant,\n ...rest\n}) => {\n const classNames = cx(\n 'maxio-link',\n {\n [`maxio-link--${size}`]: size,\n 'maxio-link--disabled': disabled,\n [`maxio-link--${variant}`]: variant,\n 'maxio-link--underline': underline,\n },\n className\n );\n\n const target = external ? '_blank' : '_self';\n\n return (\n <a className={classNames} target={target} {...rest}>\n {children}\n {icon && <Icon variant={icon} className=\"maxio-link__icon\" />}\n </a>\n );\n};\n\nexport default Link;\n","import React from 'react';\nimport cx from 'classnames';\nimport { LoadingSpinnerProps } from './types';\n\nconst LoadingSpinner = ({\n size = 'md',\n white = false,\n className,\n 'data-testid': testId,\n}: LoadingSpinnerProps) => {\n const loadingSpinnerClasses = cx(\n 'maxio-loading-spinner',\n className,\n `maxio-loading-spinner--${size}`,\n { [`maxio-loading-spinner--white`]: white }\n );\n return (\n <div\n className={loadingSpinnerClasses}\n role=\"status\"\n aria-label=\"loading\"\n data-testid={testId}\n />\n );\n};\n\nexport default LoadingSpinner;\n","import React, {\n ReactElement,\n Ref,\n isValidElement,\n cloneElement,\n forwardRef,\n} from 'react';\nimport { useLink } from 'react-aria';\nimport { useObjectRef } from '@react-aria/utils';\nimport cx from 'classnames';\nimport { useButton } from 'react-aria';\nimport { ButtonProps, InternalButtonProps, InternalLinkProps } from './types';\nimport LoadingSpinner from '../../LoadingSpinner';\n\nconst isLinkProps = (props: ButtonProps): props is InternalLinkProps => {\n return 'href' in props;\n};\n\nconst InternalLink = forwardRef<HTMLAnchorElement, InternalLinkProps>(\n (\n {\n fullWidth = false,\n leadingElement,\n trailingElement,\n icon,\n variant = 'primary',\n size,\n ...props\n },\n forwardedRef\n ) => {\n const ref = useObjectRef(forwardedRef);\n\n const { linkProps } = useLink({ ...props }, ref);\n\n const buttonClasses = cx('maxio-button', props.className, {\n [`maxio-button--${size}`]: size,\n [`maxio-button--${variant}`]: variant,\n [`maxio-button--full-width`]: fullWidth,\n });\n\n return (\n <a {...linkProps} ref={ref} className={buttonClasses} href={props.href}>\n {leadingElement &&\n cloneElement(leadingElement as ReactElement, {\n ...(isValidElement(leadingElement) && {\n className: 'maxio-button__leading-element',\n }),\n })}\n {props.children}\n {(trailingElement || icon) &&\n cloneElement((trailingElement || icon) as ReactElement, {\n ...(isValidElement(trailingElement || icon) && {\n className: 'maxio-button__trailing-element',\n }),\n })}\n </a>\n );\n }\n);\n\nconst InternalButton = forwardRef<HTMLButtonElement, InternalButtonProps>(\n (\n {\n disabled,\n loading = false,\n fullWidth = false,\n leadingElement,\n trailingElement,\n icon,\n variant = 'primary',\n size,\n ...props\n },\n forwardedRef\n ) => {\n const ref = useObjectRef(forwardedRef);\n\n const { buttonProps } = useButton(\n {\n ...props,\n isDisabled: disabled,\n formAction:\n typeof props.formAction === 'string' ? props.formAction : undefined,\n },\n ref\n );\n\n const isLoadingSpinnerWhite = ['primary', 'danger'].includes(variant);\n\n const buttonClasses = cx('maxio-button', props.className, {\n [`maxio-button--${size}`]: size,\n [`maxio-button--${variant}`]: variant,\n [`maxio-button--loading`]: loading,\n [`maxio-button--full-width`]: fullWidth,\n });\n\n return (\n <button {...buttonProps} className={buttonClasses} ref={ref}>\n {leadingElement &&\n cloneElement(leadingElement as ReactElement, {\n ...(isValidElement(leadingElement) && {\n className: 'maxio-button__leading-element',\n }),\n })}\n {props.children}\n {!loading &&\n (trailingElement || icon) &&\n cloneElement((trailingElement || icon) as ReactElement, {\n ...(isValidElement(trailingElement || icon) && {\n className: 'maxio-button__trailing-element',\n }),\n })}\n {loading && (\n <LoadingSpinner\n className=\"maxio-button__trailing-element\"\n size=\"md\"\n white={isLoadingSpinnerWhite}\n />\n )}\n </button>\n );\n }\n);\n\nconst Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n (props, ref) => {\n if (isLinkProps(props)) {\n return <InternalLink {...props} ref={ref as Ref<HTMLAnchorElement>} />;\n }\n\n return <InternalButton {...props} ref={ref as Ref<HTMLButtonElement>} />;\n }\n);\n\nexport default Button;\n","import React from 'react';\nimport { IconButtonProps } from './types';\nimport Button from '../Button/Button';\nimport cx from 'classnames';\n\nconst IconButton = ({\n 'aria-label': ariaLabel,\n className,\n ...props\n}: IconButtonProps) => {\n return (\n <Button\n aria-label={ariaLabel}\n className={cx('maxio-button--icon', className)}\n {...props}\n >\n {null}\n </Button>\n );\n};\n\nexport default IconButton;\n","export type TestIdProps = {\n /**\n * Test ID set on the component's root element. Components with internal\n * parts derive their IDs from it (e.g. `<id>.row.<rowId>`).\n */\n 'data-testid'?: string;\n};\n\n/**\n * Builds a derived test ID by joining the base ID and the given parts with dots.\n * Returns `undefined` when there's no base ID, so nothing is rendered.\n */\nexport const childTestId = (\n base: string | undefined,\n ...parts: Array<string | number>\n) => (base ? [base, ...parts].join('.') : undefined);\n","import React from 'react';\nimport { AlertProps } from './Alert.types';\nimport classNames from 'classnames';\n\nimport { IconVariant } from '../../Icon/Icon.types';\n\nimport Icon from '../../Icon/Icon';\nimport Link from '../../Link/Link';\nimport IconButton from '../../Buttons/IconButton';\nimport { childTestId } from '../../../utils/testId';\n\nconst Alert = ({\n children,\n title,\n linkText,\n linkExternal,\n href,\n display = 'inline',\n sentiment = 'info',\n onDismiss,\n className,\n 'data-testid': testId,\n}: AlertProps) => {\n if (!children && !title) {\n console.warn(\n 'Alert component requires either children or title prop to be rendered'\n );\n return null;\n }\n\n const alertClasses = classNames(\n 'maxio-alert',\n {\n [`maxio-alert--${sentiment}`]: sentiment !== 'info' && sentiment,\n },\n className\n );\n\n const iconMap: Record<string, IconVariant> = {\n success: 'check-circle-fill',\n warning: 'warning-circle-fill',\n danger: 'error-fill',\n info: 'info-circle-fill',\n };\n\n const icon = iconMap[sentiment];\n\n const contentWrapper = classNames('maxio-alert__content', {\n 'maxio-alert__content--block': display === 'block',\n });\n\n return (\n <div className={alertClasses} data-testid={testId}>\n <Icon variant={icon} className=\"maxio-alert__icon\" aria-hidden=\"true\" />\n <section className=\"maxio-alert__container\">\n <div className={contentWrapper}>\n {title && <span className=\"maxio-alert__title\">{title}</span>}\n {children && <span className=\"maxio-alert__message\">{children}</span>}\n {linkText && href && (\n <Link\n className=\"maxio-alert__link\"\n href={href}\n variant=\"high-contrast\"\n underline\n {...(linkExternal ? { external: true } : {})}\n >\n {linkText}\n </Link>\n )}\n </div>\n </section>\n {onDismiss && (\n <IconButton\n icon={<Icon variant=\"cross\" />}\n aria-label=\"Dismiss Notification\"\n variant=\"ghost\"\n onClick={onDismiss}\n className=\"maxio-alert__dismiss\"\n data-testid={childTestId(testId, 'dismiss')}\n />\n )}\n </div>\n );\n};\n\nexport default Alert;\n","import React, { createContext, useState, ReactNode, useId } from 'react';\n\nexport interface IMenuContext {\n isOpen: boolean;\n onClose: () => void;\n onOpen: () => void;\n onToggle: () => void;\n controlsId: string;\n buttonId: string;\n testId?: string;\n}\n\nexport const MenuContext = createContext({} as IMenuContext);\n\nexport const MenuProvider = ({\n children,\n testId,\n}: {\n children: ReactNode;\n testId?: string;\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n\n const controlsId = useId();\n const buttonId = useId();\n\n const onOpen = () => setIsOpen(true);\n\n const onClose = () => setIsOpen(false);\n\n const onToggle = () => setIsOpen((prev) => !prev);\n\n return (\n <MenuContext.Provider\n value={{\n controlsId,\n buttonId,\n isOpen,\n onClose,\n onOpen,\n onToggle,\n testId,\n }}\n >\n {children}\n </MenuContext.Provider>\n );\n};\n","import { useContext } from 'react';\nimport { MenuContext } from '../contexts';\n\nexport function useMenu() {\n const context = useContext(MenuContext);\n\n if (\n !context ||\n (typeof context === 'object' && Object.keys(context).length === 0)\n ) {\n throw new Error('useMenu hook must be used within a MenuProvider');\n }\n return context;\n}\n","import React, { ReactNode } from 'react';\nimport { MenuProvider } from '../../contexts/MenuContext';\nimport { useMenu } from '../../hooks';\nimport type { TestIdProps } from '../../../../utils/testId';\n\ninterface MenuProps extends TestIdProps {\n children:\n | ReactNode\n | (({\n isOpen,\n onClose,\n }: {\n isOpen: boolean;\n onClose: () => void;\n }) => ReactNode);\n}\n\nexport const MenuWrapper = ({ children }: MenuProps) => {\n const { isOpen, onToggle, onClose, testId } = useMenu();\n\n return (\n <details\n open={isOpen}\n onToggle={onToggle}\n className=\"maxio-action-menu\"\n data-testid={testId}\n >\n {typeof children === 'function'\n ? children({ isOpen, onClose })\n : children}\n </details>\n );\n};\n\nconst Menu = ({ children, 'data-testid': testId }: MenuProps) => {\n return (\n <MenuProvider testId={testId}>\n <MenuWrapper>{children}</MenuWrapper>\n </MenuProvider>\n );\n};\n\nexport default Menu;\n","import React from 'react';\nimport cx from 'classnames';\n\nimport { BreadcrumbsItemProps } from './types';\nimport Link from '../Link/Link';\n\nconst BreadcrumbsItem: React.FC<BreadcrumbsItemProps> = ({\n children,\n className,\n href,\n ...rest\n}) => {\n const content = href ? (\n <Link size=\"sm\" href={href}>\n {children}\n </Link>\n ) : (\n children\n );\n\n return (\n <li className={cx('maxio-breadcrumbs__item', className)} {...rest}>\n {content}\n </li>\n );\n};\n\nexport default BreadcrumbsItem;\n","export const ERROR_MESSAGES = {\n NO_ITEMS: 'Breadcrumbs requires at least one BreadcrumbsItem as children',\n LAST_ITEM_WITH_HREF:\n 'Last BreadcrumbsItem should not have \"href\" prop. It is the current page.',\n ONLY_BREADCRUMBS_ITEM: 'Breadcrumbs only accepts BreadcrumbsItem as children',\n};\n","import React, { FC } from 'react';\nimport cx from 'classnames';\n\nimport { TOOLTIP_DEFAULT_MAX_WIDTH } from './constants';\nimport type { ArrowPosition } from './types';\n\nexport type TooltipProps = {\n /**\n * React children nodes\n */\n children: React.ReactNode;\n /**\n * Tooltip component size variant\n */\n size?: 'regular' | 'small';\n /**\n * Arrow placement\n */\n arrowPosition?: ArrowPosition;\n /**\n * Maximum tooltip container width in pixels\n */\n maxWidth?: number | 'none';\n /**\n * Test ID set on the tooltip element\n * @default 'tooltip'\n */\n 'data-testid'?: string;\n};\n\nconst Tooltip: FC<TooltipProps> = ({\n children,\n arrowPosition,\n size = 'regular',\n maxWidth = TOOLTIP_DEFAULT_MAX_WIDTH,\n 'data-testid': testId = 'tooltip',\n}) => (\n <div\n data-testid={testId}\n className={cx('maxio-tooltip', `maxio-tooltip--${size}`, {\n [`maxio-tooltip--arrow-${arrowPosition}`]: arrowPosition,\n })}\n >\n <div className=\"maxio-tooltip__content\" style={{ maxWidth }}>\n {children}\n </div>\n </div>\n);\n\nexport default Tooltip;\n","export const TOOLTIP_DEFAULT_MAX_WIDTH = 160;\n","import {\n useHover,\n useDismiss,\n useClick,\n useFocus,\n FloatingContext,\n ReferenceType,\n} from '@floating-ui/react-dom-interactions';\n\nimport type { Interactions } from '../types';\n\nconst HOVER_DELAY = 100;\n\nconst useHoverWithDelay = (context: FloatingContext<ReferenceType>) =>\n useHover(context, { delay: HOVER_DELAY });\n\nconst INTERACTIONS_HANDLERS: Record<\n Interactions,\n (context: FloatingContext<ReferenceType>) => any\n> = {\n click: useClick,\n hover: useHoverWithDelay,\n focus: useFocus,\n dismiss: useDismiss,\n};\n\nexport const composeInteractions = (\n context: FloatingContext<ReferenceType>,\n interactions: Interactions[]\n) =>\n interactions.map((interaction) =>\n INTERACTIONS_HANDLERS[interaction](context)\n );\n","import React, { useEffect, useRef, useState } from 'react';\nimport {\n useFloating,\n useInteractions,\n useRole,\n offset,\n shift,\n limitShift,\n hide,\n autoUpdate,\n} from '@floating-ui/react-dom-interactions';\n\nimport { composeInteractions } from './utils';\nimport type { Placement, Interactions, OverlayAriaRole } from './types';\n\nconst VIEWPORT_PADDING = 8;\n\ntype OverlayTriggerSettings = {\n /**\n * Floating element placement\n */\n placement?: Placement;\n /**\n * Float element active by default\n */\n isInitiallyActive?: boolean;\n /**\n * Definition of interactions that manages displaying of overlay element\n */\n interactions?: Interactions[];\n /**\n * Floating element offset in pixels\n */\n floatingElementOffset?: number;\n /**\n * Defines relevant context for screen reader with ARIA attribute\n */\n role: OverlayAriaRole;\n /**\n * Overlay visibility state\n */\n isActive?: boolean;\n /**\n * Overlay state change event handler\n */\n onOverlayUpdate: (isActive: boolean) => void;\n /**\n * Milliseconds after the overlay is automatically deactivated\n */\n autoHideMs?: number;\n /**\n * CSS positioning strategy of the floating element\n */\n strategy?: 'absolute' | 'fixed';\n /**\n * Shift the floating element along its placement axis to keep it inside\n * the viewport, and hide it once its trigger is scrolled out of view. The\n * applied shift is exposed as `--maxio-overlay-shift-x` and\n * `--maxio-overlay-shift-y` so arrows can keep pointing at the trigger.\n */\n shiftIntoView?: boolean;\n};\n\nexport const useOverlayTrigger = ({\n placement = 'top',\n isActive = false,\n interactions = ['hover'],\n floatingElementOffset = 0,\n onOverlayUpdate,\n autoHideMs,\n strategy: positionStrategy = 'absolute',\n shiftIntoView = false,\n}: OverlayTriggerSettings) => {\n const hideTrigger = useRef<number | null>(null);\n\n // floating-ui keeps the last computed data after an overlay closes, and skips\n // updates that deep-equal it. Tagging the data with a per-open cycle number\n // forces a fresh result on every reopen and tells which open a hide flag\n // belongs to, so a stale flag is never applied.\n const [openCycle, setOpenCycle] = useState(0);\n const [wasActive, setWasActive] = useState(isActive);\n if (isActive !== wasActive) {\n setWasActive(isActive);\n if (isActive) setOpenCycle((cycle) => cycle + 1);\n }\n\n const {\n strategy,\n x,\n y,\n context,\n floating,\n reference,\n refs: floatingRefs,\n middlewareData,\n } = useFloating({\n placement,\n strategy: positionStrategy,\n open: isActive,\n onOpenChange: (open) => onOverlayUpdate(open),\n middleware: [\n offset(floatingElementOffset),\n ...(shiftIntoView\n ? [\n shift({ padding: VIEWPORT_PADDING, limiter: limitShift() }),\n hide(),\n {\n name: 'openCycle',\n options: openCycle,\n fn: () => ({ data: { cycle: openCycle } }),\n },\n ]\n : []),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n ...composeInteractions(context, interactions),\n useRole(context, { role: 'tooltip' }),\n ]);\n\n useEffect(() => {\n if (hideTrigger.current) clearTimeout(hideTrigger.current);\n if (isActive && autoHideMs) {\n hideTrigger.current = window.setTimeout(\n () => onOverlayUpdate(false),\n autoHideMs\n );\n }\n }, [isActive, autoHideMs]);\n\n // Not tied to isActive, so an overlay closed while hidden stays hidden\n // through its exit animation.\n const hasCurrentCycleData = middlewareData.openCycle?.cycle === openCycle;\n const isReferenceHidden =\n hasCurrentCycleData && !!middlewareData.hide?.referenceHidden;\n // Until this open's first position resolves, top/left still belong to the\n // previous open, so keep the overlay invisible (but not inert) for that frame.\n const isPositionPending = shiftIntoView && isActive && !hasCurrentCycleData;\n\n // Set on every overlay, not only shifted ones: custom properties inherit, so\n // a tooltip nested in a shifted overlay would otherwise offset its arrow too.\n const floatingElementCSSPosition = {\n position: strategy,\n top: y ?? 0,\n left: x ?? 0,\n '--maxio-overlay-shift-x': `${middlewareData.shift?.x ?? 0}px`,\n '--maxio-overlay-shift-y': `${middlewareData.shift?.y ?? 0}px`,\n ...((isReferenceHidden || isPositionPending) && { visibility: 'hidden' }),\n } as React.CSSProperties;\n\n return {\n isActive,\n refs: {\n floating,\n reference,\n floatingElement: floatingRefs.floating,\n },\n isReferenceHidden,\n floatingElementCSSPosition,\n getReferenceProps,\n getFloatingProps,\n };\n};\n","import { RefObject, useEffect, useRef, useState } from 'react';\n\nexport default function useHover<T extends HTMLElement = HTMLElement>(\n ref: RefObject<T | null>,\n mouseLeaveDelay: number = 0\n) {\n const mouseEnterTime = useRef(new Date().getTime());\n const mouseLeaveTime = useRef(new Date().getTime());\n\n const [isHovered, setIsHovered] = useState(false);\n\n useEffect(() => {\n const handleMouseEnter = () => {\n mouseEnterTime.current = new Date().getTime();\n setIsHovered(true);\n };\n\n const handleMouseLeave = () => {\n mouseLeaveTime.current = new Date().getTime();\n\n window.setTimeout(() => {\n if (mouseEnterTime.current - mouseLeaveTime.current <= 0) {\n setIsHovered(false);\n }\n }, mouseLeaveDelay);\n };\n\n const current = ref && ref.current;\n\n if (current) {\n current.addEventListener('mouseenter', handleMouseEnter);\n current.addEventListener('mouseleave', handleMouseLeave);\n }\n\n return () => {\n if (current) {\n current.removeEventListener('mouseenter', handleMouseEnter);\n current.removeEventListener('mouseleave', handleMouseLeave);\n }\n };\n }, [ref]);\n\n return isHovered;\n}\n","import { useEffect, useRef, useState } from 'react';\n\nexport default function useWindowSize(debounce: number = 500) {\n const [windowSize, setWindowSize] = useState(() => {\n if (typeof window === 'undefined') {\n return { windowWitdh: 0, windowHeight: 0 };\n }\n\n const { innerWidth, innerHeight } = window;\n return { windowWitdh: innerWidth, windowHeight: innerHeight };\n });\n\n const timeout = useRef<number | null>(null);\n\n useEffect(() => {\n if (typeof window === 'undefined') {\n return;\n }\n\n const handleResize = () => {\n const { innerWidth, innerHeight } = window;\n window.clearTimeout(timeout.current ?? undefined);\n timeout.current = window.setTimeout(() => {\n setWindowSize({ windowWitdh: innerWidth, windowHeight: innerHeight });\n }, debounce);\n };\n\n window.addEventListener('resize', handleResize);\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, [debounce]);\n\n return windowSize;\n}\n","import { RefObject, useLayoutEffect, useState } from 'react';\nimport { useResizeObserver } from '@react-aria/utils';\n\nexport default function useElementResizeObserver<\n T extends HTMLElement = HTMLElement,\n>(ref: RefObject<T | null>): number {\n const [width, setWidth] = useState(() => ref.current?.clientWidth ?? 0);\n\n // react-aria-components briefly re-parents collection-managed subtrees\n // while building their internal Collection, which can fire a transient\n // ResizeObserver callback reporting 0 for an element that already has a\n // real, non-zero width. Ignore that spurious drop so it doesn't\n // permanently overwrite a correct measurement.\n const onResize = () => {\n const next = ref.current?.clientWidth ?? 0;\n setWidth((prev) => (next === 0 && prev > 0 ? prev : next));\n };\n\n useLayoutEffect(onResize, [ref]);\n useResizeObserver({ ref, onResize });\n\n return width;\n}\n","export const PORTAL_ID = 'maxio-ui-portal';\n","import { PORTAL_ID } from './constants';\n\nconst DIALOG_SELECTOR = '[role=\"dialog\"], [role=\"alertdialog\"], dialog';\nconst OVERLAY_CLASS = 'maxio-overlay-trigger__overlay';\n\n// Dialogs keep the overlay above their content: inside react-aria's modal\n// subtree, and inside a native <dialog>'s top layer. Any other ancestor would\n// put it in that ancestor's stacking order, where later positioned content can\n// cover it, so outside a dialog every overlay shares one body-level node. It is\n// created once and never removed, because overlays mounted later keep using it\n// after the first one unmounts.\nexport const portalContainerFor = (trigger: HTMLElement): HTMLElement => {\n const dialog = trigger.closest<HTMLElement>(DIALOG_SELECTOR);\n if (dialog) return dialog;\n\n let sharedNode = document.getElementById(PORTAL_ID);\n if (!sharedNode) {\n sharedNode = document.createElement('div');\n sharedNode.id = PORTAL_ID;\n document.body.appendChild(sharedNode);\n }\n return sharedNode;\n};\n\nconst portalListeners = new Set<() => void>();\nlet portalObserver: MutationObserver | null = null;\n\nconst isRelevantChange = (record: MutationRecord) =>\n record.type === 'childList'\n ? Array.from(record.removedNodes).some(\n (node) => (node as HTMLElement).id === PORTAL_ID\n )\n : !(record.target as HTMLElement).classList?.contains(OVERLAY_CLASS);\n\n// One observer for every open portaled overlay. It reports theme changes and\n// the shared node being removed from <body>; writes to an overlay's own\n// data-maxio-mode are skipped, since they only echo a change already handled.\n// Only those are watched: if a dialog or theme wrapper is inserted around an\n// open overlay's trigger, the overlay picks it up the next time it opens.\n// The shared node is only seen leaving as a direct child of <body>, and only\n// while an overlay is open: a removal during the exit animation, or a dialog\n// container moved or re-mounted while its overlay is open, is not detected.\nexport const subscribeToPortalChanges = (listener: () => void) => {\n portalListeners.add(listener);\n if (!portalObserver) {\n portalObserver = new MutationObserver((records) => {\n if (records.some(isRelevantChange)) {\n portalListeners.forEach((notify) => notify());\n }\n });\n portalObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-maxio-mode'],\n subtree: true,\n });\n portalObserver.observe(document.body, { childList: true });\n }\n\n return () => {\n portalListeners.delete(listener);\n if (portalListeners.size === 0) {\n portalObserver?.disconnect();\n portalObserver = null;\n }\n };\n};\n","import React, {\n FC,\n useCallback,\n useEffect,\n useLayoutEffect,\n useReducer,\n useRef,\n useState,\n} from 'react';\nimport { motion, AnimatePresence, MotionProps } from 'framer-motion';\nimport cx from 'classnames';\nimport { FloatingPortal } from '@floating-ui/react-dom-interactions';\n\nimport {\n useOverlayTrigger,\n Placement,\n Interactions,\n OverlayAriaRole,\n} from '../../hooks';\n\nimport {\n portalContainerFor,\n subscribeToPortalChanges,\n} from './portalContainer';\n\n// `.maxio-overlay-trigger__overlay--portaled` sets the same layer, but the\n// stylesheet ships separately on the CDN. The inline fallback keeps portaled\n// overlays stacked when that stylesheet is older than this package; consumers\n// can still move the layer through the `--maxio-z-dropdown` token.\n// TODO: remove in the next major version, together with its assertion in\n// OverlayTrigger.test.tsx, so the class above is the only source of the layer.\n// Until then the inline value wins over the class, so per-overlay overrides\n// need the `--maxio-z-dropdown` token.\nconst PORTALED_Z_INDEX = 'var(--maxio-z-dropdown, 50)';\n\nconst FOCUSABLE_SELECTOR =\n 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"]):not(:disabled)';\n\nexport type OverlayTriggerProps = {\n /**\n * React children nodes\n */\n children: React.ReactNode;\n /**\n * Overlay element placement\n */\n placement?: Placement;\n /**\n * Render floating element in portal container\n */\n usePortal?: boolean;\n /**\n * Definition of interactions that manages displaying of overlay element\n */\n interactions?: Interactions[];\n /**\n * Floating element renderer\n */\n renderOverlay: () => React.ReactNode;\n /**\n * Defines relevant context for screen reader with ARIA attribute\n */\n role?: OverlayAriaRole;\n /**\n * Floating element offset in pixels\n */\n floatingElementOffset?: number;\n /**\n * Overlay visibility state\n */\n isActive?: boolean;\n /**\n * Overlay state change event handler\n */\n onOverlayUpdate: (isActive: boolean) => void;\n /**\n * Motion settings used for animation\n */\n motionSettings?: MotionProps;\n /**\n * Milliseconds after the overlay is automatically deactivated\n */\n autoHideMs?: number;\n /**\n * Class name for the main container\n */\n className?: string;\n /**\n * Test ID set on the main container\n * @default 'overlay-trigger'\n */\n 'data-testid'?: string;\n};\n\nconst OverlayTrigger: FC<OverlayTriggerProps> = ({\n children,\n usePortal = false,\n isActive = false,\n placement = 'top',\n interactions = ['hover'],\n role = 'tooltip',\n renderOverlay,\n floatingElementOffset,\n motionSettings = {},\n autoHideMs,\n onOverlayUpdate,\n className,\n 'data-testid': testId = 'overlay-trigger',\n}) => {\n const {\n getReferenceProps,\n getFloatingProps,\n refs: { floating, reference, floatingElement: floatingElementRef },\n isReferenceHidden,\n floatingElementCSSPosition,\n } = useOverlayTrigger({\n role,\n isActive,\n onOverlayUpdate,\n autoHideMs,\n floatingElementOffset,\n interactions,\n placement,\n // A fixed overlay is not clipped by the overflow of the containers it\n // was portaled out of.\n strategy: usePortal ? 'fixed' : 'absolute',\n // Out of its container, the overlay is only bounded by the viewport.\n shiftIntoView: usePortal,\n });\n\n // State rather than a ref, so render never reads a ref. It is set in the same\n // commit as floating-ui's own reference state, so it adds no extra render.\n const [trigger, setTrigger] = useState<HTMLElement | null>(null);\n const setReference = useCallback(\n (node: HTMLElement | null) => {\n reference(node);\n setTrigger(node);\n },\n [reference]\n );\n\n // A hidden overlay is inert, so focus inside it would drop to <body>. Hand it\n // back to whatever had focus when the overlay opened, or else to the trigger.\n const focusBeforeOpen = useRef<HTMLElement | null>(null);\n useLayoutEffect(() => {\n if (isActive) {\n focusBeforeOpen.current = document.activeElement as HTMLElement | null;\n }\n }, [isActive]);\n useLayoutEffect(() => {\n const overlay = floatingElementRef.current;\n if (!isReferenceHidden || !overlay?.contains(document.activeElement)) {\n return;\n }\n\n // The opener is only trusted when it is part of the trigger: a hover-opened\n // overlay may have stored focus from anywhere on the page. If a candidate\n // cannot take focus (disabled, inert or hidden), try the next one.\n const opener = focusBeforeOpen.current;\n const candidates = [\n ...(opener && trigger?.contains(opener) ? [opener] : []),\n ...Array.from(\n trigger?.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR) ?? []\n ),\n ];\n candidates.some((candidate) => {\n candidate.focus({ preventScroll: true });\n return document.activeElement === candidate;\n });\n }, [isReferenceHidden, floatingElementRef, trigger]);\n\n const [portalRevision, refreshPortal] = useReducer(\n (count: number) => count + 1,\n 0\n );\n useEffect(() => {\n if (!usePortal || !isActive) return undefined;\n return subscribeToPortalChanges(refreshPortal);\n }, [usePortal, isActive]);\n\n // The portal mounts on the first open, once the trigger is in the DOM, and\n // unmounts after the exit animation, so closed triggers keep no idle portal.\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(\n null\n );\n const isPortalContainerConnected = portalContainer?.isConnected ?? true;\n useLayoutEffect(() => {\n if (!usePortal || !isActive || !trigger) return;\n\n const container = portalContainerFor(trigger);\n if (container !== portalContainer) setPortalContainer(container);\n }, [\n usePortal,\n isActive,\n trigger,\n portalContainer,\n isPortalContainerConnected,\n portalRevision,\n ]);\n\n const portalThemeMode = usePortal\n ? (trigger?.closest('[data-maxio-mode]')?.getAttribute('data-maxio-mode') ??\n undefined)\n : undefined;\n const floatingElement = (\n <AnimatePresence\n onExitComplete={usePortal ? () => setPortalContainer(null) : undefined}\n >\n {isActive && (\n <motion.div\n ref={floating}\n className={cx('maxio-overlay-trigger__overlay', {\n 'maxio-overlay-trigger__overlay--portaled': usePortal,\n })}\n style={\n usePortal\n ? { ...floatingElementCSSPosition, zIndex: PORTALED_Z_INDEX }\n : floatingElementCSSPosition\n }\n inert={isReferenceHidden || undefined}\n data-maxio-mode={portalThemeMode}\n {...motionSettings}\n {...getFloatingProps()}\n >\n {renderOverlay()}\n </motion.div>\n )}\n </AnimatePresence>\n );\n\n return (\n <>\n <div\n ref={setReference}\n className={cx('maxio-inline-flex', className)}\n {...getReferenceProps()}\n data-testid={testId}\n >\n {children}\n </div>\n {usePortal\n ? portalContainer && (\n <FloatingPortal root={portalContainer}>\n {floatingElement}\n </FloatingPortal>\n )\n : floatingElement}\n </>\n );\n};\n\nexport default OverlayTrigger;\n","import { Placement } from '../../hooks';\nimport { ArrowPosition } from '../Tooltip';\n\nexport const TOOLTIP_OFFSET = 5;\nexport const TOOLTIP_TRANSFORM_BUFFER = '10px';\n\nexport const ARROW_DIRECTION_LOOKUP: Record<Placement, ArrowPosition> = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n 'top-start': 'bottom-left',\n 'top-end': 'bottom-right',\n 'right-start': 'left-top',\n 'right-end': 'left-bottom',\n 'bottom-start': 'top-left',\n 'bottom-end': 'top-right',\n 'left-start': 'right-top',\n 'left-end': 'right-bottom',\n};\n","import React, {\n FC,\n useState,\n useCallback,\n useMemo,\n useRef,\n useEffect,\n} from 'react';\n\nimport Tooltip, { TooltipProps, TOOLTIP_DEFAULT_MAX_WIDTH } from '../Tooltip';\nimport OverlayTrigger, { OverlayTriggerProps } from '../OverlayTrigger';\n\nimport { TOOLTIP_OFFSET, ARROW_DIRECTION_LOOKUP } from './constants';\nimport { createTooltipAnimation } from './utils';\nimport { childTestId } from '../../utils/testId';\n\nexport type TooltipTriggerProps = {\n /**\n * React children nodes\n */\n children: React.ReactNode;\n /**\n * Tooltip visibility state - use with useExternalState property\n */\n isVisible?: boolean;\n /**\n * Tooltip visibility state\n */\n onVisibilityUpdate?: (isVisible: boolean) => void;\n /**\n * Tooltip content renderer\n */\n renderContent: () => React.ReactNode;\n /**\n * Floating element offset\n */\n floatingElementOffset?: number;\n} & Pick<\n OverlayTriggerProps,\n | 'placement'\n | 'interactions'\n | 'usePortal'\n | 'autoHideMs'\n | 'className'\n | 'data-testid'\n> &\n Pick<TooltipProps, 'size' | 'maxWidth'>;\n\nconst DEBOUNCE_MS = 50;\n\nconst TooltipTrigger: FC<TooltipTriggerProps> = ({\n children,\n interactions = ['hover'],\n placement = 'right',\n maxWidth = TOOLTIP_DEFAULT_MAX_WIDTH,\n size = 'regular',\n renderContent,\n autoHideMs,\n isVisible,\n usePortal,\n className,\n onVisibilityUpdate,\n floatingElementOffset = TOOLTIP_OFFSET,\n 'data-testid': testId,\n}) => {\n const [isActive, setActive] = useState(false);\n const useExternalState = isVisible !== undefined;\n const debounceTimeoutRef = useRef<number | null>(null);\n\n const updateTooltipVisibility = useCallback(\n (isOpen: boolean) => {\n if (debounceTimeoutRef.current) {\n clearTimeout(debounceTimeoutRef.current);\n }\n debounceTimeoutRef.current = window.setTimeout(() => {\n if (!useExternalState) {\n setActive(isOpen);\n }\n if (onVisibilityUpdate) onVisibilityUpdate(isOpen);\n }, DEBOUNCE_MS);\n },\n [useExternalState, onVisibilityUpdate]\n );\n\n const tooltipMotion = useMemo(\n () => createTooltipAnimation(placement),\n [placement]\n );\n\n useEffect(() => {\n return () => {\n if (debounceTimeoutRef.current) {\n clearTimeout(debounceTimeoutRef.current);\n }\n };\n }, []);\n\n return (\n <OverlayTrigger\n role=\"tooltip\"\n className={className}\n floatingElementOffset={floatingElementOffset}\n motionSettings={tooltipMotion}\n isActive={useExternalState ? isVisible : isActive}\n onOverlayUpdate={updateTooltipVisibility}\n autoHideMs={autoHideMs}\n usePortal={usePortal}\n placement={placement}\n interactions={interactions}\n data-testid={testId}\n renderOverlay={() => (\n <Tooltip\n size={size}\n arrowPosition={ARROW_DIRECTION_LOOKUP[placement]}\n maxWidth={maxWidth}\n data-testid={childTestId(testId, 'tooltip')}\n >\n {renderContent()}\n </Tooltip>\n )}\n >\n {children}\n </OverlayTrigger>\n );\n};\n\nexport default TooltipTrigger;\n","import { MotionProps } from 'framer-motion';\nimport { Placement } from '../../hooks';\nimport { TOOLTIP_TRANSFORM_BUFFER } from './constants';\n\nexport const createTooltipAnimation = (placement: Placement): MotionProps => {\n const axisLetter =\n placement.startsWith('top') || placement.startsWith('bottom') ? 'Y' : 'X';\n const axisDirection =\n placement.startsWith('bottom') || placement.startsWith('right') ? '-' : '';\n\n const transformStart = `translate${axisLetter}(${axisDirection}${TOOLTIP_TRANSFORM_BUFFER})`;\n const transformEnd = `translate${axisLetter}(0px)`;\n\n const basicAnimationProps: MotionProps = {\n initial: { opacity: 0, visibility: 'hidden', transform: transformStart },\n animate: { opacity: 1, visibility: 'visible', transform: transformEnd },\n exit: { opacity: 0, visibility: 'hidden', transform: transformStart },\n transition: { ease: [0.4, 0, 0.5, 1], duration: 0.2 },\n };\n\n return basicAnimationProps;\n};\n","import React from 'react';\nimport cx from 'classnames';\nimport { VisuallyHidden } from 'react-aria';\nimport { IconButton } from '../Buttons';\nimport Icon, { IconVariant } from '../Icon';\nimport TooltipTrigger from '../TooltipTrigger';\nimport { CopyToClipboardProps } from './CopyToClipboard.types';\nimport { useCopyToClipboard, CopyFeedbackState } from './useCopyToClipboard';\n\nconst DEFAULT_RESET_MS = 2000;\n\nconst SUBTLE_CLASS = 'maxio-copy-to-clipboard--subtle';\nconst XS_CLASS = 'maxio-copy-to-clipboard--xs';\n\nconst FEEDBACK_ICON: Record<CopyFeedbackState, IconVariant> = {\n idle: 'copy-file',\n copied: 'check',\n error: 'error',\n};\n\nconst CopyToClipboard = ({\n value,\n copyLabel = 'Copy',\n copiedLabel = 'Copied!',\n copyErrorLabel = 'Copy failed',\n size = 'md',\n variant = 'ghost',\n disabled,\n resetAfterMs = DEFAULT_RESET_MS,\n tooltipPlacement = 'top',\n usePortal = true,\n onCopy,\n onCopyError,\n onClick,\n className,\n ...rest\n}: CopyToClipboardProps) => {\n const { feedbackState, feedbackLabel, announcement, handleCopy } =\n useCopyToClipboard(value, {\n copyLabel,\n copiedLabel,\n copyErrorLabel,\n resetAfterMs,\n onCopy,\n onCopyError,\n onClick,\n });\n\n return (\n <>\n <TooltipTrigger\n interactions={['hover', 'focus']}\n placement={tooltipPlacement}\n size=\"small\"\n usePortal={usePortal}\n renderContent={() => feedbackLabel}\n >\n <IconButton\n {...rest}\n aria-label={copyLabel}\n className={cx(className, {\n [SUBTLE_CLASS]: variant === 'subtle',\n [XS_CLASS]: size === 'xs',\n })}\n variant={variant === 'subtle' ? 'ghost' : variant}\n // xs is not a shared IconButton size; the scoped class above sizes\n // it, so no size class is emitted for the component to fight with.\n size={size === 'xs' ? undefined : size}\n disabled={disabled}\n onClick={handleCopy}\n trailingElement={<Icon variant={FEEDBACK_ICON[feedbackState]} />}\n />\n </TooltipTrigger>\n <VisuallyHidden>\n <span role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {announcement && (\n <span key={announcement.id}>{announcement.message}</span>\n )}\n </span>\n </VisuallyHidden>\n </>\n );\n};\n\nexport default CopyToClipboard;\n","import {\n ColumnDef,\n DisplayColumnDef,\n Header,\n Row,\n RowData,\n Table,\n} from '@tanstack/react-table';\nimport React from 'react';\nimport { FC, useMemo } from 'react';\n\nconst DEFAULT_ACTIONS_COLUMN_SIZE = 40;\nconst COMBINED_CONTROLS_COLUMN_SIZE = 72;\n\ntype UseColumnsOptions<TData> = {\n columns: ColumnDef<TData>[];\n enableExpanding?: boolean;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n actions?: (row: Row<TData>, table: Table<TData>) => React.ReactNode;\n actionsColumnSize?: number;\n HeaderControls: FC<{\n table: Table<TData>;\n header: Header<TData, unknown>;\n enableExpanding?: boolean;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n }>;\n RowControls: FC<{\n table: Table<TData>;\n row: Row<TData>;\n enableExpanding?: boolean;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n }>;\n RowActions?: FC<{\n children: React.ReactNode;\n }>;\n};\n\nexport const ROW_CONTROLS_ID = 'row-controls';\nexport const ROW_ACTIONS_ID = 'row-actions';\n\nconst useColumns = <TData extends RowData>({\n columns: originalColumns,\n HeaderControls,\n RowControls,\n RowActions,\n actions,\n actionsColumnSize,\n enableExpanding,\n enableRowSelection,\n enableRowReordering,\n}: UseColumnsOptions<TData>) => {\n const columns = useMemo(() => {\n const headerControls: DisplayColumnDef<TData> = {\n id: ROW_CONTROLS_ID,\n size:\n enableRowSelection && enableRowReordering\n ? COMBINED_CONTROLS_COLUMN_SIZE\n : DEFAULT_ACTIONS_COLUMN_SIZE,\n header: (props) => (\n <HeaderControls\n {...props}\n enableExpanding={enableExpanding}\n enableRowSelection={enableRowSelection}\n enableRowReordering={enableRowReordering}\n />\n ),\n cell: (props) => (\n <RowControls\n {...props}\n enableExpanding={enableExpanding}\n enableRowSelection={enableRowSelection}\n enableRowReordering={enableRowReordering}\n />\n ),\n meta: {\n controls: true,\n width: `${\n enableRowSelection && enableRowReordering\n ? COMBINED_CONTROLS_COLUMN_SIZE\n : DEFAULT_ACTIONS_COLUMN_SIZE\n }px`,\n },\n };\n\n const rowActions: DisplayColumnDef<TData> | null =\n actions && RowActions\n ? {\n id: ROW_ACTIONS_ID,\n size: actionsColumnSize ?? DEFAULT_ACTIONS_COLUMN_SIZE,\n header: '',\n cell: (props) => (\n <RowActions>{actions(props.row, props.table)}</RowActions>\n ),\n meta: { actions: true },\n }\n : null;\n\n let cols = [...originalColumns];\n if (enableRowSelection || enableRowReordering) {\n cols = [headerControls, ...cols];\n }\n if (rowActions) {\n cols = [...cols, rowActions];\n }\n return cols;\n }, [\n actions,\n actionsColumnSize,\n RowActions,\n enableExpanding,\n enableRowSelection,\n enableRowReordering,\n originalColumns,\n HeaderControls,\n RowControls,\n ]);\n\n return columns;\n};\n\nexport default useColumns;\n","import React, { useState } from 'react';\nimport cx from 'classnames';\nimport { TableProps } from './Table.types';\n\nconst Table = ({\n children,\n pattern,\n size,\n isExpandable,\n isUsingCustomRow,\n 'data-testid': testId,\n}: TableProps) => {\n const [showLeftShadow, setShowLeftShadow] = useState(false);\n const [showRightShadow, setShowRightShadow] = useState(false);\n\n const customPattern = pattern && isUsingCustomRow && isExpandable;\n const tableClasses = cx('maxio-data-table', {\n 'maxio-data-table--pattern': pattern && !customPattern,\n 'maxio-data-table--expanded-child-pattern': customPattern,\n 'maxio-data-table--with-custom-row': isUsingCustomRow,\n [`maxio-data-table--${size}`]: size,\n 'maxio-data-table--with-pinned-left-border': showLeftShadow,\n 'maxio-data-table--with-pinned-right-border': showRightShadow,\n });\n\n const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {\n const target = e.target as HTMLDivElement;\n setShowLeftShadow(target.scrollLeft > 0);\n setShowRightShadow(\n target.scrollWidth - target.clientWidth - target.scrollLeft > 0\n );\n };\n\n return (\n <div\n className=\"maxio-data-table-wrapper\"\n onScroll={handleScroll}\n data-testid={testId}\n >\n <table className={tableClasses}>{children}</table>\n </div>\n );\n};\n\nexport default Table;\n","import React from 'react';\nimport { TableHeadProps } from './TableHead.types';\n\nconst TableHead = ({ children }: TableHeadProps) => {\n return <thead>{children}</thead>;\n};\n\nexport default TableHead;\n","import React from 'react';\nimport { TableBodyProps } from './TableBody.types';\n\nconst TableBody = ({ children }: TableBodyProps) => {\n return <tbody>{children}</tbody>;\n};\n\nexport default TableBody;\n","import React from 'react';\nimport cx from 'classnames';\nimport { RowData } from '@tanstack/react-table';\nimport { HeaderCellProps } from './HeaderCell.types';\nimport Icon from '../../../Icon';\nimport IconButton from '../../../Buttons/IconButton';\nimport { ROW_CONTROLS_ID } from '../../hooks/useColumns';\n\nconst getSortingIcon = (isSorted: boolean, isSortedAsc: boolean) => {\n if (isSorted && isSortedAsc) {\n return 'arrow-up';\n } else if (isSorted && !isSortedAsc) {\n return 'arrow-down';\n }\n\n return 'arrow-down-up';\n};\n\nconst HeaderCell = <TData extends RowData, TValue>({\n children,\n table,\n header,\n className,\n enableExpanding,\n ...props\n}: HeaderCellProps<TData, TValue>) => {\n const column = header?.column;\n\n const columnCanSort = column?.getCanSort?.();\n const toggleSortingHandler = column?.getToggleSortingHandler?.();\n const isPlaceholder = header?.isPlaceholder;\n\n const align = column?.columnDef?.meta?.align;\n const width = column?.columnDef?.meta?.width;\n const controls = column?.columnDef?.meta?.controls;\n const actions = column?.columnDef?.meta?.actions;\n\n const columnPinned = column?.getIsPinned();\n const isColumnSorted = column?.getIsSorted();\n const isSortedAsc = isColumnSorted === 'asc';\n\n const headerCellClasses = cx('maxio-data-table__cell', className, {\n [`maxio-data-table__cell--pinned-${columnPinned}`]: columnPinned,\n 'maxio-data-table__cell--sortable': columnCanSort,\n 'maxio-data-table__cell--active': isColumnSorted,\n [`maxio-data-table__cell--${align}`]: align,\n [`maxio-data-table__cell--controls`]: controls,\n [`maxio-data-table__cell--actions`]: actions,\n });\n\n const pinnedStyle =\n columnPinned === 'left'\n ? { left: column?.getStart('left') }\n : columnPinned === 'right'\n ? { right: column?.getAfter('right') }\n : {};\n\n const style = { ...(width ? { width } : {}), ...pinnedStyle };\n const sortingIcon = getSortingIcon(!!isColumnSorted, isSortedAsc);\n\n // Row Expansion\n const toggleExpandedHandler = table?.getToggleAllRowsExpandedHandler();\n const isAllExpanded = table?.getIsAllRowsExpanded?.();\n const expandColumnIndex =\n header?.headerGroup.headers[0].id === ROW_CONTROLS_ID ? 1 : 0;\n const isExpandColumn = enableExpanding && header?.index === expandColumnIndex;\n\n if (isPlaceholder) {\n return null;\n }\n\n return (\n <th\n scope=\"col\"\n role=\"columnheader\"\n aria-sort={\n isColumnSorted ? (isSortedAsc ? 'ascending' : 'descending') : 'none'\n }\n className={headerCellClasses}\n onClick={toggleSortingHandler}\n colSpan={header?.colSpan}\n style={style}\n {...props}\n >\n <div className=\"maxio-data-table__cell-flex\">\n {enableExpanding === true && isExpandColumn && (\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n icon={\n <Icon\n size=\"xs\"\n variant={isAllExpanded ? 'chevron-down' : 'chevron-right'}\n />\n }\n onClick={toggleExpandedHandler}\n aria-label={isAllExpanded ? 'Collapse all rows' : 'Expand all rows'}\n data-open={isAllExpanded}\n className=\"maxio-data-table__expand-button\"\n />\n )}\n {children}\n {columnCanSort && (\n <Icon variant={sortingIcon} className=\"maxio-data-table__sort-icon\" />\n )}\n </div>\n </th>\n );\n};\n\nexport default HeaderCell;\n","import { RowData } from '@tanstack/react-table';\nimport {\n RowReorderLocation,\n RowReorderMode,\n RowReorderPosition,\n} from '../DataTable.types';\n\nexport type ReorderableRow<TData extends RowData> = {\n depth: number;\n id: string;\n index: number;\n original: TData;\n parentId?: string;\n};\n\nexport type TreeReorderResult<TData extends RowData> = {\n data: TData[];\n source: RowReorderLocation;\n destination: RowReorderLocation;\n};\n\ntype TreeNode<TData> = TData & { subRows?: TData[] };\n\nconst getSubRows = <TData extends RowData>(item: TData) =>\n (item as TreeNode<TData>).subRows ?? [];\n\nconst withSubRows = <TData extends RowData>(item: TData, subRows: TData[]) =>\n Object.assign({}, item, { subRows }) as TData;\n\nexport const isRowReorderAllowed = <TData extends RowData>(\n row: ReorderableRow<TData>,\n targetRow: ReorderableRow<TData>,\n position: RowReorderPosition,\n mode: RowReorderMode\n) => {\n if (mode === 'all') {\n return true;\n }\n\n if (mode === 'siblings') {\n return (\n position !== 'inside' &&\n (row.parentId ?? null) === (targetRow.parentId ?? null)\n );\n }\n\n return position === 'inside'\n ? row.depth === targetRow.depth + 1\n : row.depth === targetRow.depth;\n};\n\nconst findPath = <TData extends RowData>(\n items: TData[],\n item: TData,\n parentPath: number[] = []\n): number[] | null => {\n for (let index = 0; index < items.length; index += 1) {\n const current = items[index];\n const path = [...parentPath, index];\n\n if (current === item) {\n return path;\n }\n\n const childPath = findPath(getSubRows(current), item, path);\n if (childPath) {\n return childPath;\n }\n }\n\n return null;\n};\n\nconst isPathPrefix = (parent: number[], child: number[]) =>\n parent.length < child.length &&\n parent.every((segment, index) => child[index] === segment);\n\nconst adjustPathAfterRemoval = (targetPath: number[], sourcePath: number[]) => {\n const adjusted = [...targetPath];\n const sourceIndexDepth = sourcePath.length - 1;\n const sharesSourceParent =\n sourceIndexDepth >= 0 &&\n targetPath.length > sourceIndexDepth &&\n sourcePath\n .slice(0, sourceIndexDepth)\n .every((segment, index) => targetPath[index] === segment);\n\n if (\n sharesSourceParent &&\n sourcePath[sourceIndexDepth] < targetPath[sourceIndexDepth]\n ) {\n adjusted[sourceIndexDepth] -= 1;\n }\n\n return adjusted;\n};\n\nconst removeAtPath = <TData extends RowData>(\n items: TData[],\n path: number[]\n): { data: TData[]; item: TData } | null => {\n const [index, ...childPath] = path;\n const item = items[index];\n if (!item) {\n return null;\n }\n\n const data = [...items];\n if (childPath.length === 0) {\n data.splice(index, 1);\n return { data, item };\n }\n\n const childResult = removeAtPath(getSubRows(item), childPath);\n if (!childResult) {\n return null;\n }\n\n data[index] = withSubRows(item, childResult.data);\n return { data, item: childResult.item };\n};\n\nconst insertAtPath = <TData extends RowData>(\n items: TData[],\n parentPath: number[],\n index: number,\n item: TData\n): TData[] | null => {\n const data = [...items];\n if (parentPath.length === 0) {\n data.splice(index, 0, item);\n return data;\n }\n\n const [parentIndex, ...childPath] = parentPath;\n const parent = items[parentIndex];\n if (!parent) {\n return null;\n }\n\n const children = insertAtPath(getSubRows(parent), childPath, index, item);\n if (!children) {\n return null;\n }\n\n data[parentIndex] = withSubRows(parent, children);\n return data;\n};\n\nexport const reorderTree = <TData extends RowData>(\n data: TData[],\n row: ReorderableRow<TData>,\n targetRow: ReorderableRow<TData>,\n position: RowReorderPosition,\n mode: RowReorderMode\n): TreeReorderResult<TData> | null => {\n if (\n row.id === targetRow.id ||\n !isRowReorderAllowed(row, targetRow, position, mode)\n ) {\n return null;\n }\n\n const sourcePath = findPath(data, row.original);\n const targetPath = findPath(data, targetRow.original);\n if (!sourcePath || !targetPath || isPathPrefix(sourcePath, targetPath)) {\n return null;\n }\n\n const removal = removeAtPath(data, sourcePath);\n if (!removal) {\n return null;\n }\n\n const adjustedTargetPath = adjustPathAfterRemoval(targetPath, sourcePath);\n const targetIndex = adjustedTargetPath[adjustedTargetPath.length - 1];\n if (targetIndex === undefined) {\n return null;\n }\n\n const parentPath =\n position === 'inside'\n ? adjustedTargetPath\n : adjustedTargetPath.slice(0, -1);\n const targetItem = getItemAtPath(removal.data, adjustedTargetPath);\n if (!targetItem) {\n return null;\n }\n const destinationIndex =\n position === 'inside'\n ? getSubRows(targetItem).length\n : targetIndex + (position === 'after' ? 1 : 0);\n const destination: RowReorderLocation = {\n parentRowId:\n position === 'inside' ? targetRow.id : (targetRow.parentId ?? null),\n index: destinationIndex,\n };\n const source: RowReorderLocation = {\n parentRowId: row.parentId ?? null,\n index: row.index,\n };\n\n if (\n source.parentRowId === destination.parentRowId &&\n source.index === destination.index\n ) {\n return null;\n }\n\n const reordered = insertAtPath(\n removal.data,\n parentPath,\n destinationIndex,\n removal.item\n );\n return reordered ? { data: reordered, source, destination } : null;\n};\n\nconst getItemAtPath = <TData extends RowData>(\n items: TData[],\n path: number[]\n): TData | undefined => {\n let currentItems = items;\n let current: TData | undefined;\n\n for (const index of path) {\n current = currentItems[index];\n if (!current) {\n return undefined;\n }\n currentItems = getSubRows(current);\n }\n\n return current;\n};\n","import React, {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Row, RowData, Table } from '@tanstack/react-table';\nimport {\n draggable,\n dropTargetForElements,\n monitorForElements,\n type ElementDropTargetGetFeedbackArgs,\n} from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport {\n attachInstruction,\n extractInstruction,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';\nimport {\n RowReorderEvent,\n RowReorderMode,\n RowReorderPosition,\n} from '../DataTable.types';\nimport { RowReorderAvailability } from '../utils/rowReorderAvailability';\nimport { reorderTree } from '../utils/rowReordering';\n\nconst ROW_DRAG_TYPE = 'maxio-data-table-row';\nconst INDENT_PER_LEVEL = 24;\nconst AUTO_EXPAND_DELAY = 500;\n\ntype DragData = {\n type: typeof ROW_DRAG_TYPE;\n instanceId: string;\n rowId: string;\n};\n\ntype ReorderTarget = {\n rowId: string;\n position: RowReorderPosition;\n};\n\ntype RowReorderAction = {\n id: string;\n label: string;\n target: ReorderTarget;\n};\n\ntype RowReorderContextValue<TData extends RowData> = {\n activeTarget: ReorderTarget | null;\n availability: RowReorderAvailability;\n draggingRowId: string | null;\n getActions: (row: Row<TData>) => RowReorderAction[];\n getLabel: (row: Row<TData>) => string;\n hasActions: (row: Row<TData>) => boolean;\n moveRow: (rowId: string, target: ReorderTarget) => boolean;\n registerHandle: (row: Row<TData>, element: HTMLButtonElement) => () => void;\n registerRow: (row: Row<TData>, element: HTMLTableRowElement) => () => void;\n};\n\nconst RowReorderContext = createContext<unknown>(null);\n\nexport const useRowReorderContext = <TData extends RowData>() =>\n useContext(RowReorderContext) as RowReorderContextValue<TData> | null;\n\ntype RowReorderProviderProps<TData extends RowData> = {\n availability: RowReorderAvailability;\n children: React.ReactNode;\n data: TData[];\n enableExpanding: boolean;\n getRowReorderLabel?: (row: Row<TData>) => string;\n onRowReorder: (event: RowReorderEvent<TData>) => void;\n rowReorderMode: RowReorderMode;\n table: Table<TData>;\n};\n\nconst isDragData = (\n data: Record<string, unknown>\n): data is Record<string, unknown> & DragData =>\n data.type === ROW_DRAG_TYPE &&\n typeof data.instanceId === 'string' &&\n typeof data.rowId === 'string';\n\nconst instructionToPosition = (\n data: Record<string | symbol, unknown>\n): RowReorderPosition | null => {\n const instruction = extractInstruction(data);\n if (!instruction || instruction.type === 'instruction-blocked') {\n return null;\n }\n\n if (instruction.type === 'reorder-above') {\n return 'before';\n }\n if (instruction.type === 'reorder-below') {\n return 'after';\n }\n if (instruction.type === 'make-child') {\n return 'inside';\n }\n return null;\n};\n\nconst getTargetFromData = (\n data: Record<string | symbol, unknown>\n): ReorderTarget | null => {\n const position = instructionToPosition(data);\n return typeof data.rowId === 'string' && position\n ? { rowId: data.rowId, position }\n : null;\n};\n\nconst destinationDescription = (label: string, position: RowReorderPosition) =>\n position === 'inside' ? `inside ${label}` : `${position} ${label}`;\n\nconst RowReorderProvider = <TData extends RowData>({\n availability,\n children,\n data,\n enableExpanding,\n getRowReorderLabel,\n onRowReorder,\n rowReorderMode,\n table,\n}: RowReorderProviderProps<TData>) => {\n const generatedId = useId();\n const instanceId = `maxio-data-table-${generatedId}`;\n const [announcement, setAnnouncement] = useState('');\n const [activeTarget, setActiveTarget] = useState<ReorderTarget | null>(null);\n const [draggingRowId, setDraggingRowId] = useState<string | null>(null);\n const activeTargetRef = useRef<ReorderTarget | null>(null);\n\n const getRow = useCallback(\n (rowId: string) => table.getCoreRowModel().rowsById[rowId],\n [table]\n );\n const getLabel = useCallback(\n (row: Row<TData>) => getRowReorderLabel?.(row) ?? row.id,\n [getRowReorderLabel]\n );\n\n const getMove = useCallback(\n (sourceRowId: string, target: ReorderTarget) => {\n const row = getRow(sourceRowId);\n const targetRow = getRow(target.rowId);\n if (!row || !targetRow) {\n return null;\n }\n const result = reorderTree(\n data,\n row,\n targetRow,\n target.position,\n rowReorderMode\n );\n if (\n result &&\n !enableExpanding &&\n result.destination.parentRowId !== null &&\n result.destination.parentRowId !== result.source.parentRowId\n ) {\n return null;\n }\n return result;\n },\n [data, enableExpanding, getRow, rowReorderMode]\n );\n\n const updateActiveTarget = useCallback((target: ReorderTarget | null) => {\n activeTargetRef.current = target;\n setActiveTarget(target);\n }, []);\n\n const commitMove = useCallback(\n (sourceRowId: string, target: ReorderTarget) => {\n const row = getRow(sourceRowId);\n const targetRow = getRow(target.rowId);\n const result = getMove(sourceRowId, target);\n if (!row || !targetRow || !result) {\n setAnnouncement('That row cannot be moved to this position.');\n return false;\n }\n\n onRowReorder({\n ...result,\n row,\n rowId: row.id,\n targetRow,\n targetRowId: targetRow.id,\n position: target.position,\n });\n setAnnouncement(\n `${getLabel(row)} moved ${destinationDescription(\n getLabel(targetRow),\n target.position\n )}.`\n );\n return true;\n },\n [getLabel, getMove, getRow, onRowReorder]\n );\n\n const getDropData = useCallback(\n (\n row: Row<TData>,\n { input, element, source }: ElementDropTargetGetFeedbackArgs\n ) => {\n const baseData = { rowId: row.id, instanceId };\n const dataWithInstruction = attachInstruction(baseData, {\n element,\n input,\n currentLevel: row.depth,\n indentPerLevel: INDENT_PER_LEVEL,\n mode: 'standard',\n });\n const target = getTargetFromData(dataWithInstruction);\n const isValid =\n isDragData(source.data) &&\n source.data.instanceId === instanceId &&\n Boolean(target && getMove(source.data.rowId, target));\n\n return { ...dataWithInstruction, isValid };\n },\n [getMove, instanceId]\n );\n\n const registerRow = useCallback(\n (row: Row<TData>, element: HTMLTableRowElement) => {\n if (!availability.available) {\n return () => undefined;\n }\n\n const setTargetFromPayload = (data: Record<string | symbol, unknown>) => {\n const target = data.isValid ? getTargetFromData(data) : null;\n updateActiveTarget(target);\n };\n\n return dropTargetForElements({\n element,\n canDrop: ({ source }) =>\n isDragData(source.data) &&\n source.data.instanceId === instanceId &&\n source.data.rowId !== row.id &&\n !row\n .getParentRows()\n .some((parent) => parent.id === source.data.rowId),\n getData: (args) => getDropData(row, args),\n onDragEnter: ({ self }) => setTargetFromPayload(self.data),\n onDrag: ({ self }) => setTargetFromPayload(self.data),\n onDragLeave: () => {\n if (activeTargetRef.current?.rowId === row.id) {\n updateActiveTarget(null);\n }\n },\n });\n },\n [availability, getDropData, instanceId, updateActiveTarget]\n );\n\n const registerHandle = useCallback(\n (row: Row<TData>, element: HTMLButtonElement) => {\n const rowElement = element.closest('tr');\n if (!availability.available || !(rowElement instanceof HTMLElement)) {\n return () => undefined;\n }\n\n return draggable({\n element: rowElement,\n dragHandle: element,\n getInitialData: (): DragData => ({\n type: ROW_DRAG_TYPE,\n instanceId,\n rowId: row.id,\n }),\n onGenerateDragPreview: ({ nativeSetDragImage }) => {\n setCustomNativeDragPreview({\n nativeSetDragImage,\n render: ({ container }) => {\n const preview = document.createElement('div');\n preview.className = 'maxio-data-table__drag-preview';\n preview.textContent = getLabel(row);\n preview.setAttribute('aria-hidden', 'true');\n container.append(preview);\n\n return () => preview.remove();\n },\n });\n },\n });\n },\n [availability, getLabel, instanceId]\n );\n\n useEffect(() => {\n if (!availability.available) {\n return;\n }\n\n return monitorForElements({\n canMonitor: ({ source }) =>\n isDragData(source.data) && source.data.instanceId === instanceId,\n onDragStart: ({ source }) => {\n if (!isDragData(source.data)) {\n return;\n }\n const row = getRow(source.data.rowId);\n setDraggingRowId(source.data.rowId);\n if (row) {\n setAnnouncement(`${getLabel(row)} grabbed. Choose a destination.`);\n }\n },\n onDrop: ({ source, location }) => {\n if (isDragData(source.data)) {\n const targetData = location.current.dropTargets[0]?.data;\n const target =\n targetData?.isValid === true ? getTargetFromData(targetData) : null;\n if (target) {\n commitMove(source.data.rowId, target);\n } else {\n setAnnouncement('Row move cancelled.');\n }\n }\n setDraggingRowId(null);\n updateActiveTarget(null);\n },\n });\n }, [\n commitMove,\n availability,\n getLabel,\n getRow,\n instanceId,\n updateActiveTarget,\n ]);\n\n useEffect(() => {\n if (activeTarget?.position !== 'inside') {\n return;\n }\n\n const row = getRow(activeTarget.rowId);\n if (!row?.getCanExpand() || row.getIsExpanded()) {\n return;\n }\n\n const timeout = window.setTimeout(\n () => row.toggleExpanded(true),\n AUTO_EXPAND_DELAY\n );\n return () => window.clearTimeout(timeout);\n }, [activeTarget, getRow]);\n\n const getActions = useCallback(\n (row: Row<TData>) => {\n if (!availability.available) {\n return [];\n }\n\n const parent = row.parentId ? getRow(row.parentId) : null;\n const siblings = parent?.subRows ?? table.getCoreRowModel().rows;\n const index = siblings.findIndex((sibling) => sibling.id === row.id);\n if (index === -1) {\n return [];\n }\n\n const previousSibling = siblings[index - 1];\n const nextSibling = siblings[index + 1];\n const firstSibling = siblings[0];\n const lastSibling = siblings[siblings.length - 1];\n const candidates: RowReorderAction[] = [];\n\n if (index > 1 && firstSibling) {\n candidates.push({\n id: 'top',\n label: 'Move to top',\n target: { rowId: firstSibling.id, position: 'before' },\n });\n }\n if (previousSibling) {\n candidates.push({\n id: 'up',\n label: 'Move up',\n target: { rowId: previousSibling.id, position: 'before' },\n });\n }\n if (nextSibling) {\n candidates.push({\n id: 'down',\n label: 'Move down',\n target: { rowId: nextSibling.id, position: 'after' },\n });\n }\n if (index < siblings.length - 2 && lastSibling) {\n candidates.push({\n id: 'bottom',\n label: 'Move to bottom',\n target: { rowId: lastSibling.id, position: 'after' },\n });\n }\n\n if (parent) {\n let rootAncestor = parent;\n while (rootAncestor.parentId) {\n const nextAncestor = getRow(rootAncestor.parentId);\n if (!nextAncestor) {\n break;\n }\n rootAncestor = nextAncestor;\n }\n candidates.push({\n id: 'move-to-root',\n label: 'Move to root',\n target: { rowId: rootAncestor.id, position: 'after' },\n });\n }\n\n table.getCoreRowModel().flatRows.forEach((targetRow) => {\n if (targetRow.id !== row.parentId) {\n candidates.push({\n id: `move-to:${targetRow.id}`,\n label: `Move to ${getLabel(targetRow)}`,\n target: { rowId: targetRow.id, position: 'inside' },\n });\n }\n });\n\n return candidates.filter((action) =>\n Boolean(getMove(row.id, action.target))\n );\n },\n [availability, getLabel, getMove, getRow, table]\n );\n\n const hasActions = useCallback(\n (row: Row<TData>) => {\n if (!availability.available) {\n return false;\n }\n\n const parent = row.parentId ? getRow(row.parentId) : null;\n const siblings = parent?.subRows ?? table.getCoreRowModel().rows;\n if (siblings.length > 1) {\n return true;\n }\n\n if (rowReorderMode === 'siblings') {\n return false;\n }\n if (rowReorderMode === 'all') {\n return Boolean(parent);\n }\n if (!enableExpanding || row.depth === 0) {\n return false;\n }\n\n return table\n .getCoreRowModel()\n .flatRows.some(\n (targetRow) =>\n targetRow.depth === row.depth - 1 && targetRow.id !== row.parentId\n );\n },\n [availability, enableExpanding, getRow, rowReorderMode, table]\n );\n\n const value = useMemo<RowReorderContextValue<TData>>(\n () => ({\n activeTarget,\n availability,\n draggingRowId,\n getActions,\n getLabel,\n hasActions,\n moveRow: commitMove,\n registerHandle,\n registerRow,\n }),\n [\n activeTarget,\n availability,\n commitMove,\n draggingRowId,\n getActions,\n getLabel,\n hasActions,\n registerHandle,\n registerRow,\n ]\n );\n\n return (\n <RowReorderContext.Provider value={value}>\n {children}\n <span\n className=\"maxio-data-table__live-region\"\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {announcement}\n </span>\n </RowReorderContext.Provider>\n );\n};\n\nexport default RowReorderProvider;\n","import React from 'react';\nimport cx from 'classnames';\nimport { TableRowProps } from './TableRow.types';\nimport { RowData } from '@tanstack/react-table';\nimport { mergeProps, useFocusRing, usePress } from 'react-aria';\nimport { useRowReorderContext } from '../../hooks/useRowReordering';\n\nconst interactiveElementSelector =\n 'a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions';\n\nconst isInteractiveTarget = (target: EventTarget | null) =>\n target instanceof Element &&\n Boolean(target.closest(interactiveElementSelector));\n\nconst TableRow = <TData extends RowData>({\n children,\n row,\n isChild,\n isHeader,\n className,\n onRowAction,\n ...props\n}: TableRowProps<TData>) => {\n const isSelected = row?.getIsSelected?.();\n const isExpanded = row?.getCanExpand?.() && row?.getIsExpanded?.();\n const isActionable = Boolean(row && onRowAction && !isHeader && !isChild);\n const rowRef = React.useRef<HTMLTableRowElement>(null);\n const reorderContext = useRowReorderContext<TData>();\n const registerRow = reorderContext?.registerRow;\n const originalTargetRef = React.useRef<EventTarget | null>(null);\n const captureOriginalTarget = (\n event: React.SyntheticEvent<HTMLTableRowElement>\n ) => {\n originalTargetRef.current = event.target;\n };\n const { pressProps } = usePress({\n isDisabled: !isActionable,\n onPress: (event) => {\n const target = originalTargetRef.current ?? event.target;\n originalTargetRef.current = null;\n\n if (row && onRowAction && !isInteractiveTarget(target)) {\n onRowAction(row);\n }\n },\n });\n const { focusProps, isFocused } = useFocusRing();\n\n const tableRowClasses = cx(\n {\n 'maxio-data-table__row': !isHeader,\n 'maxio-data-table__header-row': isHeader,\n 'maxio-data-table__row--active': isSelected || isFocused,\n 'maxio-data-table__row--expanded': isExpanded,\n 'maxio-data-table__row--expanded-child': isChild,\n 'maxio-data-table__row--actionable': isActionable,\n 'maxio-data-table__row--dragging':\n Boolean(row) && reorderContext?.draggingRowId === row?.id,\n [`maxio-data-table__row--drop-${reorderContext?.activeTarget?.position}`]:\n Boolean(row) && reorderContext?.activeTarget?.rowId === row?.id,\n },\n className\n );\n\n React.useEffect(() => {\n if (!row || !registerRow || !rowRef.current || isHeader || isChild) {\n return;\n }\n return registerRow(row, rowRef.current);\n }, [isChild, isHeader, registerRow, row]);\n\n const rowProps = isActionable\n ? mergeProps(\n {\n onClickCapture: captureOriginalTarget,\n onKeyDownCapture: captureOriginalTarget,\n tabIndex: 0,\n },\n pressProps,\n focusProps,\n props\n )\n : props;\n\n return (\n <tr\n {...rowProps}\n ref={rowRef}\n className={tableRowClasses}\n tabIndex={isActionable ? rowProps.tabIndex : props.tabIndex}\n >\n {children}\n </tr>\n );\n};\n\nexport default TableRow;\n","import { CheckboxGroupState } from '@react-stately/checkbox';\nimport { createContext, useContext } from 'react';\n\nexport const CheckboxGroupContext = createContext({} as CheckboxGroupState);\nexport const useCheckboxGroup = () => useContext(CheckboxGroupContext);\n","import React, { forwardRef, InputHTMLAttributes } from 'react';\nimport cx from 'classnames';\nimport { CheckboxProps } from '../types';\n\ninterface InnerCheckboxProps extends CheckboxProps {\n inputProps: InputHTMLAttributes<HTMLInputElement>;\n invalid: boolean;\n}\n\nconst InnerCheckbox = forwardRef<HTMLInputElement, InnerCheckboxProps>(\n (\n {\n checked,\n disabled,\n invalid,\n indeterminate,\n className,\n inputProps,\n error,\n label,\n },\n ref\n ) => {\n const containerClassNames = cx(\n 'maxio-checkbox',\n {\n 'maxio-checkbox--checked': checked,\n 'maxio-checkbox--disabled': disabled,\n 'maxio-checkbox--error': invalid,\n 'maxio-checkbox--indeterminate': indeterminate,\n },\n className\n );\n\n return (\n <label className={containerClassNames}>\n <input\n type=\"checkbox\"\n role=\"checkbox\"\n className=\"maxio-checkbox__input\"\n ref={ref}\n {...inputProps}\n />\n <span className=\"maxio-checkbox__control\">\n {error && <span className=\"maxio-checkbox__control-error\" />}\n </span>\n {label && <span className=\"maxio-checkbox__label\">{label}</span>}\n </label>\n );\n }\n);\nInnerCheckbox.displayName = 'InnerCheckbox';\n\nexport default InnerCheckbox;\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport React, { useRef } from 'react';\nimport { useCheckbox, useCheckboxGroupItem } from 'react-aria';\nimport { useToggleState } from '@react-stately/toggle';\nimport { useCheckboxGroup } from '../contexts';\nimport { CheckboxProps } from './types';\nimport InnerCheckbox from './InnerCheckbox';\n\nconst Checkbox = ({\n label,\n error = false,\n className,\n indeterminate,\n value = '',\n disabled,\n readOnly,\n defaultChecked,\n checked,\n ...props\n}: CheckboxProps) => {\n const ref = useRef(null);\n const state = useCheckboxGroup();\n\n const { inputProps, isDisabled, isInvalid, isSelected } =\n state && Object.keys(state).length > 0\n ? useCheckboxGroupItem(\n {\n value,\n 'aria-label': label ?? props['aria-label'],\n isDisabled: disabled,\n isInvalid: error,\n isIndeterminate: indeterminate,\n isReadOnly: readOnly,\n ...props,\n },\n state,\n ref\n )\n : useCheckbox(\n {\n 'aria-label': label ?? props['aria-label'],\n isDisabled: disabled,\n isInvalid: error,\n isIndeterminate: indeterminate,\n isReadOnly: readOnly,\n value,\n ...props,\n },\n useToggleState({\n ...props,\n isSelected: checked,\n defaultSelected: defaultChecked,\n }),\n ref\n );\n\n return (\n <InnerCheckbox\n inputProps={inputProps}\n checked={isSelected}\n disabled={isDisabled}\n invalid={isInvalid}\n indeterminate={indeterminate}\n className={className}\n error={error}\n label={label}\n ref={ref}\n {...props}\n />\n );\n};\n\nexport default Checkbox;\n","import React from 'react';\nimport cx from 'classnames';\n\nconst FormHelperText = ({\n children,\n className,\n ...props\n}: React.HtmlHTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cx('maxio-form-helper-text', className)} {...props}>\n {children}\n </div>\n );\n};\n\nexport default FormHelperText;\n","import React from 'react';\nimport cx from 'classnames';\nimport Icon from '../../Icon';\n\ntype FormErrorMessageProps = React.HtmlHTMLAttributes<HTMLDivElement>;\n\nconst FormErrorMessage = ({\n children,\n className,\n ...props\n}: FormErrorMessageProps) => {\n return (\n <div className={cx('maxio-form-error', className)} {...props}>\n <Icon variant=\"warning-circle-fill\" className=\"maxio-form-error__icon\" />\n <div className=\"maxio-form-error__text\">{children}</div>\n </div>\n );\n};\n\nexport default FormErrorMessage;\n","import React from 'react';\nimport { Checkbox } from '../../../forms/Checkbox';\nimport { Row, RowData, Table } from '@tanstack/react-table';\n\nexport type HeaderControlsProps<TData> = {\n table: Table<TData>;\n enableExpanding?: boolean;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n};\n\nconst HeaderControls = <TData extends RowData>({\n table,\n enableRowSelection,\n enableRowReordering,\n}: HeaderControlsProps<TData>) => {\n // Row Selection\n const toggleSelectAll = table?.getToggleAllPageRowsSelectedHandler?.();\n const handleToggleSelectAll = (\n input: boolean | React.ChangeEvent<HTMLInputElement>\n ) => {\n toggleSelectAll(\n typeof input === 'boolean' ? { target: { checked: input } } : input\n );\n };\n\n const isAllPageRowsSelected =\n table?.getIsAllPageRowsSelected?.() || table?.getIsAllRowsSelected?.();\n const isSomePageRowsSelected = table?.getIsSomePageRowsSelected?.();\n\n if (!enableRowSelection) {\n return null;\n }\n\n return (\n <>\n {enableRowReordering && (\n <span\n className=\"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon\"\n aria-hidden=\"true\"\n style={{ visibility: 'hidden' }}\n />\n )}\n <Checkbox\n aria-label=\"Select all rows\"\n onChange={handleToggleSelectAll}\n checked={isAllPageRowsSelected}\n indeterminate={isAllPageRowsSelected ? false : isSomePageRowsSelected}\n />\n </>\n );\n};\n\nexport default HeaderControls;\n","import React from 'react';\nimport { Popover as AriaPopover, OverlayArrow } from 'react-aria-components';\nimport cx from 'classnames';\n\nimport type { PopoverProps } from './types';\n\nconst Popover = ({\n className,\n hideArrow = false,\n children,\n offset = 4,\n ...props\n}: PopoverProps) => {\n return (\n <AriaPopover\n {...props}\n className={cx('maxio-popover', className)}\n offset={offset}\n >\n <>\n {!hideArrow && (\n <OverlayArrow className=\"maxio-popover__arrow\">\n <svg width={12} height={12} viewBox=\"0 0 12 12\" aria-hidden>\n <path d=\"M0 0 L6 6 L12 0\" />\n </svg>\n </OverlayArrow>\n )}\n {children}\n </>\n </AriaPopover>\n );\n};\n\nexport default Popover;\n","import React from 'react';\nimport { Checkbox } from '../../../forms/Checkbox';\nimport { Row, RowData, Table } from '@tanstack/react-table';\nimport {\n Button,\n Menu,\n MenuItem,\n MenuTrigger,\n Tooltip,\n TooltipTrigger,\n} from 'react-aria-components';\nimport { Popover } from '../../../Popover';\nimport { useRowReorderContext } from '../../hooks/useRowReordering';\n\nexport type RowControlsProps<TData> = {\n table: Table<TData>;\n row: Row<TData>;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n};\n\ntype RowReorderHandleProps<TData extends RowData> = {\n row: Row<TData>;\n};\n\nconst RowReorderHandle = <TData extends RowData>({\n row,\n}: RowReorderHandleProps<TData>) => {\n const context = useRowReorderContext<TData>();\n const registerHandle = context?.registerHandle;\n const getActions = context?.getActions;\n const hasActions = context?.hasActions;\n const ref = React.useRef<HTMLButtonElement>(null);\n const [isMenuOpen, setIsMenuOpen] = React.useState(false);\n const isDragging = context?.draggingRowId === row.id;\n const label = context?.getLabel(row) ?? row.id;\n const hasAvailableActions = React.useMemo(\n () => hasActions?.(row) ?? false,\n [hasActions, row]\n );\n const actions = React.useMemo(\n () => (isMenuOpen ? (getActions?.(row) ?? []) : []),\n [getActions, isMenuOpen, row]\n );\n const unavailableMessage =\n (context && !context.availability.available\n ? context.availability.message\n : undefined) ??\n (!hasAvailableActions ? `No moves are available for ${label}.` : undefined);\n\n React.useEffect(() => {\n if (!registerHandle || !ref.current || unavailableMessage) {\n return;\n }\n return registerHandle(row, ref.current);\n }, [registerHandle, row, unavailableMessage]);\n\n React.useEffect(() => {\n if (unavailableMessage) {\n setIsMenuOpen(false);\n }\n }, [unavailableMessage]);\n\n const handle = (\n <Button\n ref={ref}\n type=\"button\"\n className=\"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon maxio-data-table__drag-handle\"\n aria-label={`Reorder ${label}`}\n aria-pressed={isDragging}\n aria-disabled={unavailableMessage ? true : undefined}\n onPress={() => {\n if (!unavailableMessage) {\n setIsMenuOpen(true);\n }\n }}\n >\n <i\n className={`fa-sharp fa-solid fa-grip-dots-vertical ${unavailableMessage ? 'maxio-icon--disabled' : 'maxio-icon--secondary'}`}\n />\n </Button>\n );\n\n if (unavailableMessage) {\n return (\n <TooltipTrigger delay={0} closeDelay={0}>\n {handle}\n <Tooltip\n placement=\"bottom start\"\n offset={8}\n className=\"maxio-tooltip maxio-tooltip--arrow-top-left\"\n >\n <div className=\"maxio-tooltip__content\">{unavailableMessage}</div>\n </Tooltip>\n </TooltipTrigger>\n );\n }\n\n return (\n // Long-press defers menu opening so pointer dragging can start first.\n <MenuTrigger\n trigger=\"longPress\"\n isOpen={isMenuOpen}\n onOpenChange={setIsMenuOpen}\n >\n {handle}\n <Popover placement=\"bottom start\" hideArrow>\n <Menu\n autoFocus=\"first\"\n className=\"maxio-data-table__reorder-menu\"\n items={actions}\n onAction={(key) => {\n const action = actions.find((item) => item.id === key);\n if (!action) {\n return;\n }\n context?.moveRow(row.id, action.target);\n requestAnimationFrame(() => ref.current?.focus());\n }}\n >\n {(action) => (\n <MenuItem\n id={action.id}\n textValue={action.label}\n className=\"maxio-data-table__reorder-menu-item\"\n >\n {action.label}\n </MenuItem>\n )}\n </Menu>\n </Popover>\n </MenuTrigger>\n );\n};\n\nconst RowControls = <TData extends RowData>({\n row,\n enableRowSelection,\n enableRowReordering,\n}: RowControlsProps<TData>) => {\n // Row Selection\n const toggleSelectHandler = row?.getToggleSelectedHandler?.();\n const isSelected = row?.getIsSelected?.() || row?.getIsAllSubRowsSelected?.();\n const isSomeSubRowsSelected = row?.getIsSomeSelected?.();\n const id = row.id || row.index;\n\n return (\n <>\n {enableRowReordering && <RowReorderHandle row={row} />}\n {enableRowSelection && (\n <Checkbox\n aria-label={`Select row ${id}`}\n onChange={toggleSelectHandler}\n checked={isSelected}\n indeterminate={isSomeSubRowsSelected}\n />\n )}\n </>\n );\n};\n\nexport default RowControls;\n","import React from 'react';\n\nexport type RowActionsProps = {\n children: React.ReactNode;\n};\n\nconst RowActions = ({ children }: RowActionsProps) => {\n return <div className=\"maxio-data-table__cell-flex\">{children}</div>;\n};\n\nexport default RowActions;\n","import React from 'react';\nimport cx from 'classnames';\nimport { Cell, Row, RowData, Table } from '@tanstack/react-table';\n\ntype TableCellProps<\n TData extends RowData,\n TValue,\n> = React.TdHTMLAttributes<HTMLTableCellElement> & {\n table?: Table<TData>;\n row?: Row<TData>;\n cell?: Cell<TData, TValue>;\n children?: React.ReactNode;\n};\n\nconst TableCell = <TData extends RowData, TValue>({\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n row,\n cell,\n children,\n className,\n ...props\n}: TableCellProps<TData, TValue>) => {\n const column = cell?.column;\n const align = column?.columnDef?.meta?.align;\n const controls = column?.columnDef?.meta?.controls;\n const actions = column?.columnDef?.meta?.actions;\n const columnPinned = column?.getIsPinned();\n\n const cellClasses = cx('maxio-data-table__cell', className, {\n [`maxio-data-table__cell--pinned-${columnPinned}`]: columnPinned,\n [`maxio-data-table__cell--${align}`]: align,\n [`maxio-data-table__cell--controls`]: controls,\n [`maxio-data-table__cell--actions`]: actions,\n });\n\n const pinnedStyle =\n columnPinned === 'left'\n ? { left: column?.getStart('left') }\n : columnPinned === 'right'\n ? { right: column?.getAfter('right') }\n : {};\n\n return (\n <td className={cellClasses} style={pinnedStyle} {...props}>\n {children}\n </td>\n );\n};\n\nexport default TableCell;\n","import React from 'react';\nimport { Row, RowData, flexRender } from '@tanstack/react-table';\nimport { ROW_ACTIONS_ID, ROW_CONTROLS_ID } from '../../hooks/useColumns';\nimport TableRow from '../TableRow';\nimport TableCell from '../TableCell';\nimport IconButton from '../../../Buttons/IconButton';\nimport Icon from '../../../Icon';\nimport { childTestId } from '../../../../utils/testId';\n\ntype RowRendererProps<TData> = {\n row: Row<TData>;\n SubRowComponent?: (row: Row<TData>) => React.ReactNode;\n pattern?: boolean;\n enableExpanding?: boolean | 'rowsOnly';\n onRowAction?: (row: Row<TData>) => void;\n testId?: string;\n};\n\nconst RowRenderer = <TData extends RowData>({\n row,\n SubRowComponent,\n pattern,\n enableExpanding,\n onRowAction,\n testId,\n}: RowRendererProps<TData>) => {\n // if there is a subRowComponent and the parent row is expanded, render the custom row\n const shouldRenderCustomRow =\n SubRowComponent &&\n row.getParentRow() &&\n row.getParentRow()!.getIsExpanded();\n\n // if the first cell is the row controls, we need to add spacing on the left\n const shouldShowControlsSpacing =\n shouldRenderCustomRow &&\n row.getVisibleCells()[0].column.columnDef.id === ROW_CONTROLS_ID;\n\n // if the last cell is the row actions, we need to add spacing on the right (be aware if the id is different this won't work)\n const shouldShowActionsSpacing =\n shouldRenderCustomRow &&\n row.getVisibleCells()[row.getVisibleCells().length - 1].column.columnDef\n .id === ROW_ACTIONS_ID;\n\n const subtractedColumns = [\n shouldShowActionsSpacing,\n shouldShowControlsSpacing,\n ].filter(Boolean).length;\n\n const customRowColspan = row.getVisibleCells().length - subtractedColumns;\n\n const rowIndex = row.getParentRow()?.index ?? row.index;\n // apply pattern if pattern is enabled and even row (allow parent and child rows have the same pattern for custom rows only)\n const patternApplied =\n pattern && SubRowComponent && rowIndex % 2 === 1\n ? 'maxio-data-table__row--with-pattern'\n : undefined;\n\n // Row Expansion\n const rowCanExpand = row.getCanExpand?.();\n const toggleExpandedHandler = row?.getToggleExpandedHandler?.();\n const isExpanded = row?.getIsExpanded?.();\n const padding = rowCanExpand && enableExpanding ? 0 : 1.75;\n const expandColumnIndex =\n row.getVisibleCells()[0].column.columnDef.id === ROW_CONTROLS_ID ? 1 : 0;\n const rowHeaderCell = row.getVisibleCells().find(({ column }) => {\n const { actions, controls } = column.columnDef.meta ?? {};\n\n return !actions && !controls;\n });\n const actionableRowLabelledBy =\n onRowAction && rowHeaderCell ? rowHeaderCell.id : undefined;\n\n return (\n <React.Fragment key={row.id}>\n {shouldRenderCustomRow ? (\n <TableRow\n key={`${row.id}-sub`}\n row={row}\n isChild\n className={patternApplied}\n data-testid={childTestId(testId, 'row', row.id)}\n >\n {shouldShowControlsSpacing && (\n <TableCell className=\"maxio-data-table__cell--pinned-left\" />\n )}\n\n <TableCell colSpan={customRowColspan}>\n {SubRowComponent(row)}\n </TableCell>\n\n {shouldShowActionsSpacing && (\n <TableCell className=\"maxio-data-table__cell--pinned-right\" />\n )}\n </TableRow>\n ) : (\n <TableRow\n key={`${row.id}-parent`}\n row={row}\n className={patternApplied}\n onRowAction={onRowAction}\n aria-labelledby={actionableRowLabelledBy}\n data-testid={childTestId(testId, 'row', row.id)}\n >\n {row.getVisibleCells().map((cell) => {\n const isExpandColumn =\n enableExpanding && cell.column.getIndex() === expandColumnIndex;\n return (\n <TableCell\n key={cell.id}\n row={row}\n cell={cell}\n id={cell.id}\n data-testid={childTestId(\n testId,\n 'cell',\n row.id,\n cell.column.id\n )}\n >\n <div\n className=\"maxio-data-table__cell-flex\"\n style={\n enableExpanding && isExpandColumn\n ? {\n paddingLeft: `${row?.depth + padding}rem`,\n }\n : undefined\n }\n >\n {enableExpanding && rowCanExpand && isExpandColumn && (\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n icon={\n <Icon\n size=\"xs\"\n variant={\n isExpanded ? 'chevron-down' : 'chevron-right'\n }\n />\n }\n onClick={toggleExpandedHandler}\n aria-label={isExpanded ? 'Collapse row' : 'Expand row'}\n data-open={isExpanded}\n className=\"maxio-data-table__expand-button\"\n />\n )}\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </div>\n </TableCell>\n );\n })}\n </TableRow>\n )}\n </React.Fragment>\n );\n};\n\nexport default RowRenderer;\n","export type RowReorderUnavailableReason =\n 'filtering' | 'grouping' | 'pagination';\n\nexport type RowReorderAvailability =\n | { available: true }\n | {\n available: false;\n reason: RowReorderUnavailableReason;\n message: string;\n };\n\ntype GetRowReorderAvailabilityOptions = {\n columnFilters: readonly unknown[];\n globalFilter: unknown;\n grouping: readonly unknown[];\n hasPagination: boolean;\n};\n\nconst AVAILABLE: RowReorderAvailability = { available: true };\n\nconst UNAVAILABLE: Record<RowReorderUnavailableReason, RowReorderAvailability> =\n {\n filtering: {\n available: false,\n reason: 'filtering',\n message: 'Reordering is unavailable while the table is filtered.',\n },\n grouping: {\n available: false,\n reason: 'grouping',\n message: 'Reordering is unavailable while the table is grouped.',\n },\n pagination: {\n available: false,\n reason: 'pagination',\n message: 'Reordering is unavailable while the table is paginated.',\n },\n };\n\nexport const getRowReorderAvailability = ({\n columnFilters,\n globalFilter,\n grouping,\n hasPagination,\n}: GetRowReorderAvailabilityOptions): RowReorderAvailability => {\n if (\n columnFilters.length > 0 ||\n (globalFilter != null && globalFilter !== '')\n ) {\n return UNAVAILABLE.filtering;\n }\n if (grouping.length > 0) {\n return UNAVAILABLE.grouping;\n }\n if (hasPagination) {\n return UNAVAILABLE.pagination;\n }\n return AVAILABLE;\n};\n","import React, { useEffect } from 'react';\nimport { DataTableProps, type SortingState } from './DataTable.types';\nimport Table from './components/Table';\nimport TableHead from './components/TableHead';\nimport TableBody from './components/TableBody';\nimport HeaderCell from './components/HeaderCell';\nimport TableRow from './components/TableRow';\n\nimport {\n useReactTable,\n flexRender,\n getExpandedRowModel,\n getCoreRowModel,\n RowData,\n getSortedRowModel,\n} from '@tanstack/react-table';\nimport HeaderControls from './components/HeaderControls';\nimport RowControls from './components/RowControls';\nimport RowActions from './components/RowActions';\nimport useColumns, {\n ROW_ACTIONS_ID,\n ROW_CONTROLS_ID,\n} from './hooks/useColumns';\nimport RowRenderer from './components/RowRenderer';\nimport RowReorderProvider from './hooks/useRowReordering';\nimport { getRowReorderAvailability } from './utils/rowReorderAvailability';\nimport { childTestId } from '../../utils/testId';\n\n// row-controls/row-actions are always pinned internally;\n// strip any user-provided pinning that references them so ids don't get duplicated\nconst excludeBuiltinIds = (ids: string[] = []) =>\n ids.filter((id) => id !== ROW_CONTROLS_ID && id !== ROW_ACTIONS_ID);\n\nconst EMPTY_SORTING_STATE: SortingState = [];\n\nconst getDefaultSubRows = <TData extends RowData>(row: TData) =>\n (row as TData & { subRows?: TData[] }).subRows;\n\nconst DataTable = <TData extends RowData>({\n pattern,\n size = 'md',\n SubRowComponent,\n onExpand,\n onSelect,\n onSort,\n enableSorting = false,\n enableRowSelection = false,\n enableExpanding,\n columns: originalColumns,\n actions,\n actionsColumnSize,\n onRowAction,\n enableRowReordering = false,\n getRowReorderLabel,\n onRowReorder,\n rowReorderMode = 'siblings',\n getRowId,\n getSubRows,\n state: userState,\n 'data-testid': testId,\n ...props\n}: DataTableProps<TData>) => {\n const effectiveSubRowComponent = enableRowReordering\n ? undefined\n : SubRowComponent;\n const effectiveEnableSorting = enableRowReordering ? false : enableSorting;\n\n const columns = useColumns<TData>({\n columns: originalColumns,\n HeaderControls,\n RowControls,\n RowActions,\n actions,\n actionsColumnSize,\n enableRowSelection,\n enableRowReordering,\n enableExpanding: Boolean(enableExpanding),\n });\n\n const tableInstance = useReactTable<TData>({\n state: {\n ...userState,\n ...(enableRowReordering && { sorting: EMPTY_SORTING_STATE }),\n // row controls (built in) and actions (created by user), when active, are always pinned;\n // user-defined pinned columns are appended around them\n columnPinning: {\n left: [\n ...(enableRowSelection || enableRowReordering\n ? [ROW_CONTROLS_ID]\n : []),\n ...excludeBuiltinIds(userState?.columnPinning?.left),\n ],\n right: [\n ...excludeBuiltinIds(userState?.columnPinning?.right),\n ...(actions ? [ROW_ACTIONS_ID] : []),\n ],\n },\n },\n getCoreRowModel: getCoreRowModel(),\n\n // by default, row selection is disabled, you need manually to toggle it\n enableRowSelection,\n\n // by default, expanding is disabled, you need manually to toggle it\n enableExpanding: Boolean(enableExpanding),\n ...(!props.manualExpanding && {\n getExpandedRowModel: getExpandedRowModel(),\n }),\n // if manualSorting is not enabled then go with default sorting strategy\n ...(!props.manualSorting &&\n !enableRowReordering && { getSortedRowModel: getSortedRowModel() }),\n\n columns,\n getRowId,\n // pass any remaining configuration options to the table instance\n ...props,\n // Reordering writes nested data through `subRows`, so its row model must use the same shape.\n getSubRows: enableRowReordering\n ? getDefaultSubRows\n : (getSubRows ?? getDefaultSubRows),\n // Manual row order takes precedence over every sorting configuration.\n enableSorting: effectiveEnableSorting,\n ...(enableRowReordering && { getSortedRowModel: undefined }),\n });\n\n const isExpandable = tableInstance.getCanSomeRowsExpand();\n const state = tableInstance.getState();\n\n const rowReorderAvailability = getRowReorderAvailability({\n columnFilters: state.columnFilters,\n globalFilter: state.globalFilter,\n grouping: state.grouping,\n hasPagination: Boolean(\n props.getPaginationRowModel || props.manualPagination\n ),\n });\n\n useEffect(() => {\n onExpand?.(state.expanded);\n }, [onExpand, state.expanded]);\n\n useEffect(() => {\n onSelect?.(state.rowSelection);\n }, [onSelect, state.rowSelection]);\n\n useEffect(() => {\n if (!enableRowReordering) {\n onSort?.(state.sorting);\n }\n }, [enableRowReordering, onSort, state.sorting]);\n\n const table = (\n <Table\n pattern={pattern}\n size={size}\n isExpandable={isExpandable}\n isUsingCustomRow={Boolean(effectiveSubRowComponent)}\n data-testid={testId}\n >\n <TableHead>\n {tableInstance.getHeaderGroups().map((headerGroup) => (\n <TableRow key={headerGroup.id} table={tableInstance} isHeader>\n {headerGroup.headers.map((header) => (\n <HeaderCell\n key={header.id}\n table={tableInstance}\n header={header}\n enableExpanding={enableExpanding}\n data-testid={childTestId(testId, 'header', header.column.id)}\n >\n {flexRender(\n header.column.columnDef.header,\n header.getContext()\n )}\n </HeaderCell>\n ))}\n </TableRow>\n ))}\n </TableHead>\n <TableBody>\n {tableInstance.getRowModel().rows.map((row) => (\n <RowRenderer\n key={row.id}\n row={row}\n pattern={pattern}\n SubRowComponent={effectiveSubRowComponent}\n enableExpanding={enableExpanding}\n onRowAction={onRowAction}\n testId={testId}\n />\n ))}\n </TableBody>\n </Table>\n );\n\n if (!enableRowReordering || !getRowId || !onRowReorder) {\n return table;\n }\n\n return (\n <RowReorderProvider\n availability={rowReorderAvailability}\n data={props.data}\n enableExpanding={Boolean(enableExpanding)}\n getRowReorderLabel={getRowReorderLabel}\n onRowReorder={onRowReorder}\n rowReorderMode={rowReorderMode}\n table={tableInstance}\n >\n {table}\n </RowReorderProvider>\n );\n};\n\nexport default DataTable;\n","import React, { ElementType } from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type BodyProps = BaseTypographyProps & {\n /**\n * The component to render as (e.g. `span or div`)\n */\n as?: ElementType;\n /**\n * Defines the size of the body text.\n */\n size?: 'xs' | 'sm' | 'md' | 'lg';\n /**\n * Set the body to compact mode - lower line height\n */\n compact?: boolean;\n};\n\nconst Body = ({\n as = 'div',\n children,\n compact = false,\n size = 'md',\n className,\n ...rest\n}: BodyProps) => {\n const AsComponent = as;\n\n const classNames = cx(\n {\n [`maxio-body-${size}`]: !compact,\n [`maxio-body-${size}-compact`]: compact,\n },\n className\n );\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Body;\n","import React from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type HeadingProps = BaseTypographyProps & {\n /**\n * Defines the size of the heading text\n */\n size?: 'sm' | 'md' | 'lg';\n};\n\nconst headingsSizeMap = {\n sm: 'h3',\n md: 'h2',\n lg: 'h1',\n} as const;\n\nconst Heading = ({\n children,\n size = 'sm',\n className,\n ...rest\n}: HeadingProps) => {\n const AsComponent = headingsSizeMap[size];\n\n const classNames = cx(`maxio-heading-${size}`, className);\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Heading;\n","import { createContext } from 'react';\n\n// Lets an overlay that renders its own Dialog (the deprecated Drawer props) give the close\n// button its `<id>.close` test ID while keeping its own ID on the panel, not on the Dialog.\nexport const DialogCloseTestIdContext = createContext<string | undefined>(\n undefined\n);\n","import React, { useContext, useId, useRef } from 'react';\nimport type { ReactNode } from 'react';\nimport cx from 'classnames';\nimport { Dialog as AriaDialog } from 'react-aria-components';\n\nimport { useIsOverflowing } from '../../hooks/useIsOverflowing';\nimport { childTestId } from '../../utils/testId';\nimport { IconButton } from '../Buttons';\nimport Icon from '../Icon';\nimport { Heading } from '../Typography';\n\nimport { DialogCloseTestIdContext } from './closeTestIdContext';\nimport type { DialogProps } from './types';\n\nconst hasContent = (node: ReactNode) =>\n node !== null && node !== undefined && node !== false && node !== '';\n\n/**\n * Dialog is the accessible content of an overlay: title, optional\n * description, body and footer. Render it inside a `Modal` or a `Popover`.\n */\nconst Dialog = ({\n title,\n description,\n children,\n footer,\n role = 'dialog',\n showCloseButton = role !== 'alertdialog',\n className,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n 'data-testid': testId,\n ...props\n}: DialogProps) => {\n const inheritedCloseTestId = useContext(DialogCloseTestIdContext);\n const closeTestId = childTestId(testId, 'close') ?? inheritedCloseTestId;\n const titleId = useId();\n const descriptionId = useId();\n const labelledBy = ariaLabelledBy ?? (ariaLabel ? undefined : titleId);\n const describedBy =\n [ariaDescribedBy, hasContent(description) ? descriptionId : undefined]\n .filter(Boolean)\n .join(' ') || undefined;\n const bodyRef = useRef<HTMLDivElement>(null);\n const bodyContentRef = useRef<HTMLDivElement>(null);\n const isBodyOverflowing = useIsOverflowing(bodyRef, bodyContentRef);\n\n return (\n <AriaDialog\n {...props}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n className={cx('maxio-dialog', className)}\n data-testid={testId}\n >\n {({ close }) => {\n const footerContent =\n typeof footer === 'function' ? footer({ close }) : footer;\n\n return (\n <>\n <div className=\"maxio-dialog__header\">\n <div className=\"maxio-dialog__title-group\">\n <Heading id={titleId} size=\"md\" className=\"maxio-dialog__title\">\n {title}\n </Heading>\n {hasContent(description) && (\n <p id={descriptionId} className=\"maxio-dialog__description\">\n {description}\n </p>\n )}\n </div>\n {showCloseButton && (\n <IconButton\n aria-label=\"Close\"\n onClick={close}\n icon={<Icon variant=\"cross\" />}\n variant=\"ghost\"\n size=\"sm\"\n className=\"maxio-dialog__close\"\n data-testid={closeTestId}\n />\n )}\n </div>\n <div\n ref={bodyRef}\n className=\"maxio-dialog__body\"\n {...(isBodyOverflowing && {\n tabIndex: 0,\n role: 'region',\n 'aria-labelledby': titleId,\n })}\n >\n <div ref={bodyContentRef}>\n {typeof children === 'function'\n ? children({ close })\n : children}\n </div>\n </div>\n {hasContent(footerContent) && (\n <div className=\"maxio-dialog__footer\">{footerContent}</div>\n )}\n </>\n );\n }}\n </AriaDialog>\n );\n};\n\nexport default Dialog;\n","import { RefObject, useCallback, useLayoutEffect, useState } from 'react';\nimport { useResizeObserver } from '@react-aria/utils';\n\n// The content is observed too: once the scroll container hits its max height,\n// content can grow without the container itself changing size.\nexport default function useIsOverflowing(\n scrollRef: RefObject<HTMLElement | null>,\n contentRef: RefObject<HTMLElement | null>\n): boolean {\n const [isOverflowing, setIsOverflowing] = useState(false);\n\n const onResize = useCallback(() => {\n const element = scrollRef.current;\n setIsOverflowing(!!element && element.scrollHeight > element.clientHeight);\n }, [scrollRef]);\n\n useLayoutEffect(onResize, [onResize]);\n useResizeObserver({ ref: scrollRef, onResize });\n useResizeObserver({ ref: contentRef, onResize });\n\n return isOverflowing;\n}\n","import React, { useEffect } from 'react';\nimport cx from 'classnames';\nimport { Modal as AriaModal, ModalOverlay } from 'react-aria-components';\n\nimport { Dialog } from '../Dialog';\nimport { DialogCloseTestIdContext } from '../Dialog/closeTestIdContext';\n\nimport type { DrawerProps } from './types';\nimport { childTestId } from '../../utils/testId';\n\nlet hasWarnedLegacyProps = false;\n\n/**\n * Drawer is a panel that slides in from an edge of the page and blocks the\n * rest of it until dismissed. Put a `Dialog` inside it for the title, body\n * and footer.\n */\nconst Drawer = ({\n placement = 'right',\n backdrop = 'dim',\n size = 'md',\n isDismissable = true,\n className,\n style,\n title,\n description,\n footer,\n open,\n isOpen,\n children,\n 'data-testid': testId,\n ...props\n}: DrawerProps) => {\n const usesLegacyContent = [title, description, footer].some(\n (prop) => prop !== undefined\n );\n const usesLegacyOpen = open !== undefined && isOpen === undefined;\n\n useEffect(() => {\n if ((usesLegacyContent || usesLegacyOpen) && !hasWarnedLegacyProps) {\n hasWarnedLegacyProps = true;\n console.warn(\n 'Drawer: the `title`, `description`, `footer` and `open` props are deprecated and will be removed in the next major. Pass a `Dialog` as children and use `isOpen` instead.'\n );\n }\n }, [usesLegacyContent, usesLegacyOpen]);\n\n return (\n <ModalOverlay\n {...props}\n isOpen={isOpen ?? open}\n isDismissable={isDismissable}\n className={cx('maxio-drawer__backdrop', {\n 'maxio-drawer__backdrop--dim': backdrop === 'dim',\n })}\n >\n <AriaModal\n className={cx('maxio-drawer', className)}\n style={style}\n data-placement={placement}\n data-size={size}\n data-testid={testId}\n >\n {usesLegacyContent ? (\n <DialogCloseTestIdContext.Provider\n value={childTestId(testId, 'close')}\n >\n <Dialog title={title} description={description} footer={footer}>\n {children}\n </Dialog>\n </DialogCloseTestIdContext.Provider>\n ) : (\n children\n )}\n </AriaModal>\n </ModalOverlay>\n );\n};\n\nexport default Drawer;\n","import React from 'react';\nimport cx from 'classnames';\nimport { FlexProps } from './types';\n\nconst Flex = ({\n basis,\n flex,\n flexDirection,\n wrap,\n grow,\n shrink,\n gap,\n gapX,\n gapY,\n className,\n children,\n alignItems,\n justifyContent,\n ...props\n}: FlexProps) => {\n const flexClasses = cx(\n 'maxio-flex',\n {\n [`maxio-flex-${flex}`]: flex,\n [`maxio-basis-${basis}`]: basis !== undefined,\n [`maxio-flex-${flexDirection}`]: flexDirection,\n [`maxio-flex-${wrap}`]: wrap,\n 'maxio-grow': grow,\n 'maxio-grow-0': grow === false,\n 'maxio-shrink': shrink,\n 'maxio-shrink-0': shrink === false,\n [`maxio-gap-${gap}`]: gap !== undefined,\n [`maxio-gap-x-${gapX}`]: gapX !== undefined,\n [`maxio-gap-y-${gapY}`]: gapY !== undefined,\n [`maxio-items-${alignItems}`]: alignItems,\n [`maxio-justify-${justifyContent}`]: justifyContent,\n },\n className\n );\n\n return (\n <div className={flexClasses} {...props}>\n {children}\n </div>\n );\n};\n\nexport default Flex;\n","import React from 'react';\nimport cx from 'classnames';\nimport Body from '../Typography/Body';\nimport LoadingSpinner from '../LoadingSpinner';\nimport Icon from '../Icon';\nimport Button from '../Buttons/Button/Button';\nimport {\n Collection,\n Header as AriaHeader,\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n ListBoxLoadMoreItem as AriaListBoxLoadMoreItem,\n ListBoxSection as AriaListBoxSection,\n composeRenderProps,\n} from 'react-aria-components';\n\nimport type {\n ListBoxHeaderProps,\n ListBoxItemProps,\n ListBoxProps,\n ListBoxSectionProps,\n} from './types';\n\n/** Root component for rendering an accessible list box with support for single and multiple selection. */\nconst ListBoxRoot = <T extends object>({\n className,\n children,\n items,\n render,\n renderEmptyState,\n isLoading = false,\n onLoadMore,\n scrollOffset,\n showSelectAll = false,\n ...props\n}: ListBoxProps<T>) => (\n <AriaListBox\n {...props}\n items={items}\n renderEmptyState={isLoading ? undefined : renderEmptyState}\n className={composeRenderProps(className, (className) =>\n cx('maxio-listbox', className)\n )}\n render={(listBoxProps, renderProps) => {\n const { selectionManager } = renderProps.state;\n const listBox = render ? (\n render(listBoxProps, renderProps)\n ) : (\n <div {...listBoxProps} />\n );\n\n if (selectionManager.selectionMode !== 'multiple' || !showSelectAll) {\n return listBox;\n }\n\n const selectableKeys = [...selectionManager.collection.getKeys()].filter(\n (key) => {\n const item = selectionManager.collection.getItem(key);\n\n return item?.type === 'item' && selectionManager.canSelectItem(key);\n }\n );\n\n if (selectableKeys.length === 0) {\n return listBox;\n }\n\n const isSelectAll = selectionManager.isSelectAll;\n const isClearDisabled =\n isSelectAll && selectionManager.disallowEmptySelection;\n\n return (\n <div>\n <div className=\"maxio-listbox__select-all\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n trailingElement={<Icon variant={isSelectAll ? 'check' : ''} />}\n fullWidth\n aria-pressed={isSelectAll}\n disabled={isClearDisabled}\n onClick={() => selectionManager.toggleSelectAll()}\n >\n Select all\n </Button>\n </div>\n {listBox}\n </div>\n );\n }}\n >\n {onLoadMore || isLoading ? (\n <>\n <Collection items={items} dependencies={props.dependencies}>\n {children}\n </Collection>\n <AriaListBoxLoadMoreItem\n className=\"maxio-listbox__load-more\"\n isLoading={isLoading}\n onLoadMore={isLoading ? undefined : onLoadMore}\n scrollOffset={scrollOffset}\n >\n <LoadingSpinner />\n </AriaListBoxLoadMoreItem>\n </>\n ) : (\n children\n )}\n </AriaListBox>\n);\n\nListBoxRoot.displayName = 'ListBox';\n\n/** Item component for rendering individual options within a ListBox. Automatically renders a checkmark when selected. */\nconst ListBoxItem = ({ className, ...props }: ListBoxItemProps) => {\n const textValue =\n props.textValue ||\n (typeof props.children === 'string' ? props.children : undefined);\n\n return (\n <AriaListBoxItem\n {...props}\n textValue={textValue}\n className={cx('maxio-listbox__item', className)}\n >\n {composeRenderProps(props.children, (children, { isSelected }) => (\n <>\n <div className=\"maxio-listbox__content\">\n {typeof children === 'string' ? (\n <Body size=\"sm\">{children}</Body>\n ) : (\n children\n )}\n </div>\n {isSelected && <Icon variant=\"check\" />}\n </>\n ))}\n </AriaListBoxItem>\n );\n};\n\nListBoxItem.displayName = 'ListBox.Item';\n\n/** Section component for grouping related items within a ListBox. Typically paired with ListBox.Header. */\nconst ListBoxSection = ({ className, ...props }: ListBoxSectionProps) => (\n <AriaListBoxSection\n {...props}\n className={cx('maxio-listbox__section', className)}\n />\n);\n\nListBoxSection.displayName = 'ListBox.Section';\n\n/** Header component for adding labels or titles to a ListBox.Section. */\nconst ListBoxHeader = ({ className, ...props }: ListBoxHeaderProps) => (\n <AriaHeader {...props} className={cx('maxio-listbox__header', className)} />\n);\n\nListBoxHeader.displayName = 'ListBox.Header';\n\nexport type ListBoxComponent = typeof ListBoxRoot & {\n Item: typeof ListBoxItem;\n Section: typeof ListBoxSection;\n Header: typeof ListBoxHeader;\n};\n\nconst ListBox = Object.assign(ListBoxRoot, {\n Item: ListBoxItem,\n Section: ListBoxSection,\n Header: ListBoxHeader,\n}) as ListBoxComponent;\n\nexport default ListBox;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n Button as AriaButton,\n ComboBox as AriaComboBox,\n FieldError,\n Input,\n Label,\n Text,\n} from 'react-aria-components';\n\nimport Icon from '../../Icon';\nimport { ListBox } from '../../ListBox';\nimport { Popover } from '../../Popover';\nimport type { ListBoxProps } from '../../ListBox/types';\nimport type { ComboBoxProps, ComboBoxSelectionMode } from './types';\n\nconst ComboBoxRoot = <\n T extends object = object,\n M extends ComboBoxSelectionMode = 'single',\n>({\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n leadingElement = null,\n fullWidth,\n className,\n placeholder,\n renderEmptyState,\n isLoading = false,\n onLoadMore,\n scrollOffset,\n allowsEmptyCollection = Boolean(isLoading || onLoadMore || renderEmptyState),\n selectionMode,\n children,\n ...props\n}: ComboBoxProps<T, M>) => {\n const triggerRef = React.useRef<HTMLDivElement>(null);\n const inputRef = React.useRef<HTMLInputElement>(null);\n const [popoverStyle, setPopoverStyle] = React.useState<React.CSSProperties>();\n const [popoverCrossOffset, setPopoverCrossOffset] = React.useState(0);\n const hasErrorMessage = !!errorMessage;\n const invalid = isInvalid || hasErrorMessage;\n const listBoxChildren = children as ListBoxProps<T>['children'];\n\n const updatePopoverPosition = React.useCallback(() => {\n const trigger = triggerRef.current;\n\n if (!trigger) {\n return;\n }\n\n const input = inputRef.current;\n const offset = input\n ? input.getBoundingClientRect().left -\n trigger.getBoundingClientRect().left\n : 0;\n\n setPopoverCrossOffset((currentOffset) =>\n currentOffset === -offset ? currentOffset : -offset\n );\n\n setPopoverStyle((currentStyle) => {\n const width = trigger.offsetWidth;\n const nextWidth = `${width}px`;\n\n if (\n currentStyle?.['--trigger-width' as keyof React.CSSProperties] ===\n nextWidth\n ) {\n return currentStyle;\n }\n\n return {\n '--trigger-width': nextWidth,\n } as React.CSSProperties;\n });\n }, []);\n\n React.useEffect(() => {\n const trigger = triggerRef.current;\n\n if (!trigger) {\n return undefined;\n }\n\n updatePopoverPosition();\n\n if (typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const observer = new ResizeObserver(updatePopoverPosition);\n\n observer.observe(trigger);\n\n return () => observer.disconnect();\n }, [updatePopoverPosition]);\n\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': isDisabled,\n 'maxio-text-field--error': invalid,\n 'maxio-text-field--readonly': isReadOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaComboBox\n {...props}\n isDisabled={isDisabled}\n isInvalid={invalid}\n isReadOnly={isReadOnly}\n selectionMode={selectionMode}\n allowsEmptyCollection={allowsEmptyCollection}\n className={containerClass}\n >\n {label && <Label className=\"maxio-text-field__label\">{label}</Label>}\n <div ref={triggerRef} className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n <Input\n ref={inputRef}\n className=\"maxio-text-field__input\"\n placeholder={placeholder}\n />\n <div className=\"maxio-text-field__trailing-element\">\n <AriaButton\n className={cx(\n 'maxio-button',\n 'maxio-button--ghost',\n 'maxio-button--icon',\n `maxio-button--sm`\n )}\n >\n <Icon variant=\"chevron-up-down\" />\n </AriaButton>\n </div>\n </div>\n {description && !hasErrorMessage && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n {(validation) => (\n <>\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">\n {typeof errorMessage === 'function'\n ? errorMessage(validation)\n : errorMessage}\n </div>\n </>\n )}\n </FieldError>\n )}\n <Popover\n hideArrow\n className=\"maxio-combobox__popover\"\n crossOffset={popoverCrossOffset}\n style={popoverStyle}\n >\n <ListBox\n items={props.items ?? props.defaultItems}\n renderEmptyState={renderEmptyState}\n isLoading={isLoading}\n onLoadMore={onLoadMore}\n scrollOffset={scrollOffset}\n >\n {listBoxChildren}\n </ListBox>\n </Popover>\n </AriaComboBox>\n );\n};\n\nComboBoxRoot.displayName = 'ComboBox';\n\nconst ComboBoxItem: typeof ListBox.Item = (props) => (\n <ListBox.Item {...props} />\n);\n\nComboBoxItem.displayName = 'ComboBox.Item';\n\nconst ComboBoxSection: typeof ListBox.Section = (props) => (\n <ListBox.Section {...props} />\n);\n\nComboBoxSection.displayName = 'ComboBox.Section';\n\nconst ComboBoxHeader: typeof ListBox.Header = (props) => (\n <ListBox.Header {...props} />\n);\n\nComboBoxHeader.displayName = 'ComboBox.Header';\n\ntype ComboBoxComponent = (<\n T extends object = object,\n M extends ComboBoxSelectionMode = 'single',\n>(\n props: ComboBoxProps<T, M>\n) => React.ReactElement) & {\n Item: typeof ListBox.Item;\n Section: typeof ListBox.Section;\n Header: typeof ListBox.Header;\n};\n\nconst ComboBox = Object.assign(ComboBoxRoot, {\n Item: ComboBoxItem,\n Section: ComboBoxSection,\n Header: ComboBoxHeader,\n}) as ComboBoxComponent;\n\nexport default ComboBox;\n","import { RadioGroupState } from '@react-stately/radio';\nimport { createContext, useContext } from 'react';\n\nexport const RadioContext = createContext({} as RadioGroupState);\nexport const useRadioState = () => useContext(RadioContext);\n","import React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport {\n Button as AriaButton,\n FieldError,\n Input,\n Label,\n SearchField as AriaSearchField,\n Text,\n} from 'react-aria-components';\nimport Icon from '../../Icon';\nimport { SearchFieldProps } from './types';\n\nconst SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n (\n {\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n leadingElement = <Icon variant=\"search\" />,\n clearButtonLabel = 'Clear search',\n fullWidth,\n className,\n ...props\n },\n ref\n ) => {\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': isDisabled,\n 'maxio-text-field--error': isInvalid,\n 'maxio-text-field--readonly': isReadOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaSearchField\n {...props}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={isInvalid}\n className={containerClass}\n >\n {label && <Label className=\"maxio-text-field__label\">{label}</Label>}\n <div className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n\n <Input ref={ref} className=\"maxio-text-field__input\" />\n\n <div className=\"maxio-text-field__trailing-element maxio-search-field__clear-button\">\n <AriaButton\n aria-label={clearButtonLabel}\n className=\"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost\"\n >\n <Icon\n variant=\"cross\"\n className=\"maxio-button__trailing-element\"\n />\n </AriaButton>\n </div>\n </div>\n {description && !(isInvalid && errorMessage) && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">{errorMessage}</div>\n </FieldError>\n )}\n </AriaSearchField>\n );\n }\n);\n\nSearchField.displayName = 'SearchField';\n\nexport default SearchField;\n","import React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport {\n FieldError,\n Input,\n Label,\n Text,\n TextField as AriaTextField,\n} from 'react-aria-components';\nimport Icon from '../../Icon';\nimport { TextFieldProps } from './types';\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n leadingElement = null,\n trailingElement = null,\n fullWidth,\n className,\n ...props\n },\n ref\n ) => {\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': isDisabled,\n 'maxio-text-field--error': isInvalid,\n 'maxio-text-field--readonly': isReadOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaTextField\n {...props}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={isInvalid}\n className={containerClass}\n >\n {label && <Label className=\"maxio-text-field__label\">{label}</Label>}\n <div className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n\n <Input ref={ref} className=\"maxio-text-field__input\" />\n {trailingElement && (\n <div className=\"maxio-text-field__trailing-element\">\n {trailingElement}\n </div>\n )}\n </div>\n {description && !(isInvalid && errorMessage) && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">{errorMessage}</div>\n </FieldError>\n )}\n </AriaTextField>\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport default TextField;\n","import React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport {\n Button as AriaButton,\n FieldError,\n Input,\n Label,\n NumberField as AriaNumberField,\n Text,\n Separator,\n} from 'react-aria-components';\nimport Icon from '../../Icon';\nimport { NumberFieldProps } from './types';\n\nconst NumberField = forwardRef<HTMLInputElement, NumberFieldProps>(\n (\n {\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n leadingElement = null,\n trailingElement = null,\n showStepper = false,\n fullWidth,\n className,\n ...props\n },\n ref\n ) => {\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': isDisabled,\n 'maxio-text-field--error': isInvalid,\n 'maxio-text-field--readonly': isReadOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaNumberField\n {...props}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={isInvalid}\n className={containerClass}\n >\n {label && <Label className=\"maxio-text-field__label\">{label}</Label>}\n <div className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n\n <Input ref={ref} className=\"maxio-text-field__input\" />\n\n {trailingElement && (\n <div className=\"maxio-text-field__trailing-element\">\n {trailingElement}\n </div>\n )}\n\n {showStepper && (\n <div className=\"maxio-text-field__trailing-element maxio-number-field__stepper\">\n <AriaButton\n slot=\"decrement\"\n aria-label=\"Decrement\"\n className=\"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost\"\n >\n <Icon\n variant=\"minus\"\n size=\"xs\"\n className=\"maxio-button__trailing-element\"\n />\n </AriaButton>\n <Separator\n orientation=\"vertical\"\n className=\"maxio-number-field__stepper-separator\"\n />\n <AriaButton\n slot=\"increment\"\n aria-label=\"Increment\"\n className=\"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost\"\n >\n <Icon\n variant=\"plus\"\n size=\"xs\"\n className=\"maxio-button__trailing-element\"\n />\n </AriaButton>\n </div>\n )}\n </div>\n {description && !(isInvalid && errorMessage) && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">{errorMessage}</div>\n </FieldError>\n )}\n </AriaNumberField>\n );\n }\n);\n\nNumberField.displayName = 'NumberField';\n\nexport default NumberField;\n","import React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport {\n FieldError,\n Label,\n Text,\n TextArea as AriaTextArea,\n TextField as AriaTextField,\n} from 'react-aria-components';\nimport Icon from '../../Icon';\nimport { TextAreaProps } from './types';\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n fullWidth,\n className,\n ...props\n },\n ref\n ) => {\n const containerClass = cx(\n 'maxio-text-area',\n `maxio-text-area--${size}`,\n {\n 'maxio-text-area--disabled': isDisabled,\n 'maxio-text-area--error': isInvalid,\n 'maxio-text-area--readonly': isReadOnly,\n 'maxio-text-area--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaTextField\n {...props}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={isInvalid}\n className={containerClass}\n >\n {label && <Label className=\"maxio-form-label\">{label}</Label>}\n <AriaTextArea ref={ref} className=\"maxio-text-area__input\" />\n {description && !(isInvalid && errorMessage) && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">{errorMessage}</div>\n </FieldError>\n )}\n </AriaTextField>\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport default TextArea;\n","import React, {\n forwardRef,\n InputHTMLAttributes,\n ReactNode,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport cx from 'classnames';\nimport { useTextField } from 'react-aria';\nimport FormErrorMessage from '../FormErrorMessage';\n\n/**\n * @deprecated Use TextField instead.\n */\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'autoCapitalize' | 'onChange'\n> {\n /**\n * Label for the text input\n */\n label?: string;\n /**\n * Size of the text input\n */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n /**\n * Ensures the input spans the full width of its parent\n */\n fullWidth?: boolean;\n /**\n * Disable the text input\n */\n disabled?: boolean;\n /**\n * Invalid state of the text input\n */\n invalid?: boolean;\n /*\n * Read only state of the text input\n */\n readOnly?: boolean;\n /**\n * Helper text for the text input. It will not be visible if there is an error message.\n */\n helperText?: string;\n /**\n * Error message for the text input\n */\n errorMessage?: string;\n /**\n * Leading element for the text input\n */\n leadingElement?: ReactNode;\n /**\n * Trailing element for the text input\n */\n trailingElement?: ReactNode;\n /**\n * Callback function for the text input change\n */\n onChange: (value: string) => void;\n /**\n * Show error message\n */\n showErrorMessage?: boolean;\n}\n\n/**\n * @deprecated Use TextField instead.\n */\nconst TextInput = forwardRef(\n (\n {\n disabled = false,\n invalid = false,\n readOnly = false,\n size = 'md',\n label,\n helperText,\n showErrorMessage = true,\n errorMessage,\n leadingElement = null,\n trailingElement = null,\n fullWidth,\n className,\n ...props\n }: TextInputProps,\n ref\n ) => {\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => inputRef.current);\n\n useEffect(() => {\n console.warn('TextInput is deprecated. Please use TextField instead.');\n }, []);\n\n const { spellCheck, ...restProps } = props;\n const ariaProps = {\n ...restProps,\n label,\n description: helperText,\n errorMessage: errorMessage,\n defaultValue: props.defaultValue?.toString(),\n value: props.value?.toString(),\n isDisabled: disabled,\n isReadOnly: readOnly,\n isInvalid: invalid,\n };\n\n const { labelProps, inputProps, descriptionProps, errorMessageProps } =\n useTextField(ariaProps, inputRef);\n\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': disabled,\n 'maxio-text-field--error': invalid,\n 'maxio-text-field--readonly': readOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n const showError = invalid && errorMessage && showErrorMessage;\n\n return (\n <div className={containerClass}>\n {label && (\n <label className=\"maxio-text-field__label\" {...labelProps}>\n {label}\n </label>\n )}\n <div className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n\n <input\n ref={inputRef}\n type=\"text\"\n className=\"maxio-text-field__input\"\n {...inputProps}\n spellCheck={spellCheck}\n />\n {trailingElement && (\n <div className=\"maxio-text-field__trailing-element\">\n {trailingElement}\n </div>\n )}\n </div>\n {helperText && !showError && (\n <div className=\"maxio-form-helper-text\" {...descriptionProps}>\n {helperText}\n </div>\n )}\n {showError && (\n <FormErrorMessage {...errorMessageProps}>\n {errorMessage}\n </FormErrorMessage>\n )}\n </div>\n );\n }\n);\n\nTextInput.displayName = 'TextInput';\n\nexport default TextInput;\n","import React from 'react';\nimport cx from 'classnames';\nimport Icon from '../../Icon';\nimport { SelectProps } from './types';\nimport { useId } from 'react-aria';\nimport FormErrorMessage from '../FormErrorMessage';\n\nconst Select = ({\n options,\n label,\n size = 'md',\n inline = false,\n disabled = false,\n helperText,\n errorMessage,\n fullWidth = false,\n ...props\n}: SelectProps) => {\n const containerClass = cx('maxio-select', `maxio-select--${size}`, {\n 'maxio-select--disabled': disabled,\n 'maxio-select--inline': inline,\n 'maxio-select--error': !!errorMessage,\n 'maxio-select--full-width': fullWidth,\n });\n\n const id = useId();\n\n return (\n <div className={containerClass}>\n {label && (\n <label htmlFor={id} className=\"maxio-select__label\">\n {label}\n </label>\n )}\n <div className=\"maxio-select__input-container\">\n <select\n id={id}\n className=\"maxio-select__input\"\n disabled={disabled}\n {...props}\n >\n {options.map((opt) => (\n <option\n key={`option-${opt.value}`}\n value={opt.value}\n disabled={opt.disabled}\n >\n {opt.label}\n </option>\n ))}\n </select>\n <Icon variant=\"chevron-up-down\" />\n </div>\n {!!errorMessage && <FormErrorMessage>{errorMessage}</FormErrorMessage>}\n {helperText && !errorMessage && (\n <div className=\"maxio-form-helper-text\">{helperText}</div>\n )}\n </div>\n );\n};\n\nexport default Select;\n","import React from 'react';\nimport { DateInput as AriaDateInput, DateSegment } from 'react-aria-components';\n\nconst DateInput = ({\n slot,\n displayValue,\n}: {\n slot?: 'start' | 'end';\n displayValue?: string;\n}) => {\n const input = (\n <AriaDateInput slot={slot} className=\"maxio-date-field__input\">\n {(segment) => (\n <DateSegment segment={segment} className=\"maxio-date-field__segment\" />\n )}\n </AriaDateInput>\n );\n if (displayValue == null) return input;\n\n return (\n <div className=\"maxio-date-field__endpoint\">\n <div hidden>{input}</div>\n <span className=\"maxio-date-field__endpoint-value\">{displayValue}</span>\n </div>\n );\n};\nexport default DateInput;\n","import React, { useContext } from 'react';\nimport {\n endOfMonth,\n startOfMonth,\n toCalendarDate,\n type CalendarDate,\n} from '@internationalized/date';\nimport {\n CalendarMonthPicker,\n CalendarStateContext,\n CalendarYearPicker,\n Heading,\n RangeCalendarStateContext,\n type CalendarMonthPickerProps,\n} from 'react-aria-components';\nimport { Flex } from '../Flex';\nimport Select from '../forms/Select';\nimport type { CalendarNavigation } from './types';\n\n// Read the merged calendar state so disabled and bounds set through\n// CalendarContext apply to the pickers too.\nconst useCalendarState = () => {\n const calendarState = useContext(CalendarStateContext);\n const rangeCalendarState = useContext(RangeCalendarStateContext);\n return (calendarState ?? rangeCalendarState)!;\n};\n\ntype PickerSelectProps = Parameters<CalendarMonthPickerProps['children']>[0] & {\n isItemDisabled?: (date: CalendarDate) => boolean;\n};\n\nconst PickerSelect = ({\n items,\n value,\n onChange,\n isItemDisabled,\n ...props\n}: PickerSelectProps) => {\n const { isDisabled } = useCalendarState();\n\n return (\n <Select\n {...props}\n disabled={isDisabled}\n value={String(value)}\n onChange={(event) => onChange(Number(event.target.value))}\n options={items.map(({ id, date, formatted }) => ({\n value: String(id),\n label: formatted,\n disabled: isItemDisabled?.(date),\n }))}\n />\n );\n};\n\n// The year picker already limits its items to the bounds, but the month\n// picker lists every month of the focused year.\nconst MonthPicker = () => {\n const { minValue, maxValue } = useCalendarState();\n const isMonthDisabled = (date: CalendarDate) =>\n (!!minValue && endOfMonth(date).compare(toCalendarDate(minValue)) < 0) ||\n (!!maxValue && startOfMonth(date).compare(toCalendarDate(maxValue)) > 0);\n\n return (\n <CalendarMonthPicker>\n {(pickerProps) => (\n <PickerSelect {...pickerProps} isItemDisabled={isMonthDisabled} />\n )}\n </CalendarMonthPicker>\n );\n};\n\n/** Header title shared by Calendar and RangeCalendar: a heading, or month and year pickers. */\nconst CalendarTitle = ({ navigation }: { navigation: CalendarNavigation }) =>\n navigation === 'month' ? (\n <Heading className=\"maxio-calendar__heading\" />\n ) : (\n <Flex grow alignItems=\"center\" gap={1}>\n <MonthPicker />\n <CalendarYearPicker>\n {(pickerProps) => <PickerSelect {...pickerProps} />}\n </CalendarYearPicker>\n </Flex>\n );\n\nexport default CalendarTitle;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n Calendar as AriaCalendar,\n Button,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n Text,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport Icon from '../Icon';\nimport CalendarTitle from './CalendarTitle';\nimport type { CalendarProps } from './types';\n\nconst Calendar = <T extends DateValue>({\n className,\n errorMessage,\n navigation = 'month',\n ...props\n}: CalendarProps<T>) => {\n return (\n <AriaCalendar\n {...props}\n visibleDuration={{ months: 1 }}\n className={composeRenderProps(className, (className) =>\n cx('maxio-calendar', className)\n )}\n >\n <header className=\"maxio-calendar__header\">\n <CalendarTitle navigation={navigation} />\n <Button\n slot=\"previous\"\n className=\"maxio-button maxio-button--ghost maxio-button--icon\"\n >\n <Icon variant=\"chevron-left\" />\n </Button>\n <Button\n slot=\"next\"\n className=\"maxio-button maxio-button--ghost maxio-button--icon\"\n >\n <Icon variant=\"chevron-right\" />\n </Button>\n </header>\n <CalendarGrid className=\"maxio-calendar__grid\">\n <CalendarGridHeader>\n {(day) => (\n <CalendarHeaderCell className=\"maxio-calendar__weekday\">\n {day}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => (\n <CalendarCell date={date} className=\"maxio-calendar__cell\" />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n {errorMessage && (\n <Text slot=\"errorMessage\" className=\"maxio-calendar__error\">\n {errorMessage}\n </Text>\n )}\n </AriaCalendar>\n );\n};\n\nexport default Calendar;\n","import React from 'react';\nimport { Button, Group } from 'react-aria-components';\nimport type { DatePresetsProps } from './types';\n\nconst DatePresets = <T,>({\n presets,\n label = 'Presets',\n isDisabled,\n isPresetDisabled,\n onSelect,\n}: DatePresetsProps<T>) => {\n if (!presets?.length) return null;\n\n return (\n <Group aria-label={label} className=\"maxio-date-field__presets\">\n {presets.map((preset, index) => (\n <Button\n key={index}\n className=\"maxio-button maxio-button--ghost\"\n isDisabled={\n isDisabled ||\n preset.isDisabled ||\n (preset.value !== null && isPresetDisabled(preset.value))\n }\n onPress={() => onSelect(preset.value)}\n >\n {preset.label}\n </Button>\n ))}\n </Group>\n );\n};\n\nexport default DatePresets;\n","import { toCalendarDate } from '@internationalized/date';\nimport type { DateValue, DateRangePickerProps } from 'react-aria-components';\n\ntype Constraints = {\n minValue?: DateValue | null;\n maxValue?: DateValue | null;\n isDateUnavailable?: (date: DateValue) => boolean;\n allowsNonContiguousRanges?: boolean;\n};\n\nexport const isPresetDateDisabled = (\n date: DateValue,\n props: Constraints\n): boolean =>\n !!(\n (props.minValue && date.compare(props.minValue) < 0) ||\n (props.maxValue && date.compare(props.maxValue) > 0) ||\n props.isDateUnavailable?.(date)\n );\n\nexport const isPresetRangeDisabled = (\n range: { start: DateValue | null; end: DateValue | null },\n props: Omit<Constraints, 'isDateUnavailable'> &\n Pick<DateRangePickerProps<DateValue>, 'isDateUnavailable'>\n): boolean => {\n const anchor = range.start ? toCalendarDate(range.start) : null;\n const constraints = {\n ...props,\n isDateUnavailable: (date: DateValue) =>\n props.isDateUnavailable?.(date, anchor) ?? false,\n };\n if (\n (range.start != null &&\n range.end != null &&\n range.start.compare(range.end) > 0) ||\n (range.start != null &&\n isPresetDateDisabled(range.start, {\n ...props,\n isDateUnavailable: (date) =>\n props.isDateUnavailable?.(date, null) ?? false,\n })) ||\n (range.end != null && isPresetDateDisabled(range.end, constraints))\n )\n return true;\n if (\n range.start &&\n range.end &&\n props.isDateUnavailable &&\n !props.allowsNonContiguousRanges\n ) {\n const end = toCalendarDate(range.end);\n for (\n let day = toCalendarDate(range.start).add({ days: 1 });\n day.compare(end) < 0;\n day = day.add({ days: 1 })\n ) {\n if (props.isDateUnavailable(day, anchor)) return true;\n }\n }\n return false;\n};\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n RangeCalendar as AriaRangeCalendar,\n Button,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n Text,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport Icon from '../Icon';\nimport CalendarTitle from '../Calendar/CalendarTitle';\nimport { useLocale } from 'react-aria-components';\nimport type { RangeCalendarProps } from './types';\n\nconst RangeCalendar = <T extends DateValue>({\n className,\n errorMessage,\n navigation = 'month',\n ...props\n}: RangeCalendarProps<T>) => {\n const { direction } = useLocale();\n return (\n <AriaRangeCalendar\n {...props}\n visibleDuration={{ months: 1 }}\n className={composeRenderProps(className, (className) =>\n cx('maxio-calendar', 'maxio-calendar--range', className)\n )}\n >\n <header className=\"maxio-calendar__header\">\n <CalendarTitle navigation={navigation} />\n <Button\n slot=\"previous\"\n className=\"maxio-button maxio-button--ghost maxio-button--icon\"\n >\n <Icon\n variant={direction === 'rtl' ? 'chevron-right' : 'chevron-left'}\n />\n </Button>\n <Button\n slot=\"next\"\n className=\"maxio-button maxio-button--ghost maxio-button--icon\"\n >\n <Icon\n variant={direction === 'rtl' ? 'chevron-left' : 'chevron-right'}\n />\n </Button>\n </header>\n <CalendarGrid className=\"maxio-calendar__grid\">\n <CalendarGridHeader>\n {(day) => (\n <CalendarHeaderCell className=\"maxio-calendar__weekday\">\n {day}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => (\n <CalendarCell date={date} className=\"maxio-calendar__cell\" />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n {errorMessage && (\n <Text slot=\"errorMessage\" className=\"maxio-calendar__error\">\n {errorMessage}\n </Text>\n )}\n </AriaRangeCalendar>\n );\n};\n\nexport default RangeCalendar;\n","import type {\n DateRangePickerRenderProps,\n DateValue,\n} from 'react-aria-components';\nimport type { DateRangePreset } from './types';\n\ntype RangeState = DateRangePickerRenderProps['state'];\ntype PresetValue = DateRangePreset['value'];\n\nconst datesMatch = (\n a: DateValue | null | undefined,\n b: DateValue | null | undefined\n) => (a == null ? b == null : b != null && a.compare(b) === 0);\n\nexport const getPresetLabel = (\n value: RangeState['value'],\n presets?: readonly DateRangePreset[]\n): string | undefined => {\n if (value?.start != null && value?.end != null) return undefined;\n\n return presets?.find(\n (preset) =>\n datesMatch(preset.value?.start, value?.start) &&\n datesMatch(preset.value?.end, value?.end)\n )?.label;\n};\n\nexport const selectRangePreset = (\n state: RangeState,\n value: PresetValue\n): void => {\n if (value && (value.start == null || value.end == null)) {\n // React Aria stores incomplete endpoints separately from its complete value.\n // Clear the previous range before restoring the supplied endpoint(s).\n state.setValue(null);\n state.setDateTime('start', value.start);\n state.setDateTime('end', value.end);\n } else if (value?.start && value.end) {\n state.setValue({ start: value.start, end: value.end });\n } else {\n state.setValue(null);\n }\n state.setOpen(false);\n};\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n ToggleButton as AriaToggleButton,\n ToggleButtonGroup as AriaToggleButtonGroup,\n SelectionIndicator,\n composeRenderProps,\n} from 'react-aria-components';\n\nimport type { SegmentedControlItemProps, SegmentedControlProps } from './types';\n\nconst SegmentedControlRoot = ({\n className,\n size = 'md',\n fullWidth = false,\n selectionMode = 'single',\n orientation = 'horizontal',\n disallowEmptySelection = true,\n ...props\n}: SegmentedControlProps) => (\n <AriaToggleButtonGroup\n {...props}\n selectionMode={selectionMode}\n orientation={orientation}\n disallowEmptySelection={disallowEmptySelection}\n className={composeRenderProps(className, (className) =>\n cx(\n 'maxio-segmented-control',\n `maxio-segmented-control--${size}`,\n {\n 'maxio-segmented-control--full-width': fullWidth,\n },\n className\n )\n )}\n />\n);\n\nSegmentedControlRoot.displayName = 'SegmentedControl';\n\nconst SegmentedControlItem = ({\n className,\n children,\n ...props\n}: SegmentedControlItemProps) => (\n <AriaToggleButton\n {...props}\n className={composeRenderProps(className, (className) =>\n cx('maxio-segmented-control__item', className)\n )}\n >\n {composeRenderProps(children, (children) => (\n <>\n <SelectionIndicator\n className=\"maxio-segmented-control__selection-indicator\"\n data-selected\n />\n {children}\n </>\n ))}\n </AriaToggleButton>\n);\n\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\ntype SegmentedControlComponent = ((\n props: SegmentedControlProps\n) => React.ReactElement) & {\n Item: typeof SegmentedControlItem;\n};\n\nconst SegmentedControl = Object.assign(SegmentedControlRoot, {\n Item: SegmentedControlItem,\n}) as SegmentedControlComponent;\n\nexport default SegmentedControl;\n","import React from 'react';\nimport Icon, { IconVariant } from '../../Icon';\nimport TooltipTrigger from '../../TooltipTrigger';\nimport { TOOLTIP_OFFSET } from './constants';\n\ninterface SectionNameProps {\n children: React.ReactNode;\n type?: 'menu' | 'link';\n leadingIcon?: IconVariant | null;\n trailingIcon?: IconVariant;\n isTooltipVisible?: boolean;\n leadingIconClassName?: string;\n}\n\nconst SectionName = ({\n leadingIcon,\n trailingIcon,\n type = 'menu',\n children,\n leadingIconClassName,\n isTooltipVisible = false,\n}: SectionNameProps) => (\n <>\n {leadingIcon && (\n <TooltipTrigger\n usePortal\n isVisible={isTooltipVisible}\n renderContent={() => children}\n floatingElementOffset={TOOLTIP_OFFSET}\n >\n <span className=\"maxio-side-nav__icon\">\n <Icon variant={leadingIcon} className={leadingIconClassName} />\n </span>\n </TooltipTrigger>\n )}\n <span\n className={`maxio-side-nav__${type}-title`}\n data-testid=\"maxio-sidebar-section-name\"\n >\n {children}\n </span>\n {trailingIcon && (\n <span className=\"maxio-side-nav__menu-chevron\">\n <Icon variant={trailingIcon} />\n </span>\n )}\n </>\n);\n\nexport default SectionName;\n","export const TOOLTIP_OFFSET = 12;\n","import { Section, SectionGroup, SectionHeading } from './types';\n\nconst isRegularSection = (\n section: Section | SectionHeading\n): section is Section => section.type !== 'heading';\n\nconst findCurrentSection = (sectionGroups: SectionGroup[]) => {\n const flatSections = sectionGroups.flat();\n const filteredSections = flatSections.filter(isRegularSection);\n return filteredSections\n .map((section) => section.items)\n .flat()\n .find((item) => item?.isCurrent);\n};\n\nconst prepareSections = (sectionGroups: SectionGroup[]) => {\n const currentSection = findCurrentSection(sectionGroups);\n if (currentSection) {\n return sectionGroups.map((sections) => {\n return sections.map((section) => {\n if (\n isRegularSection(section) &&\n section.items?.includes(currentSection)\n ) {\n return {\n ...section,\n isOpen: true,\n };\n }\n return section;\n });\n });\n }\n return sectionGroups;\n};\n\nexport { prepareSections, isRegularSection };\n","import React, {\n createContext,\n useState,\n useEffect,\n useContext,\n useRef,\n} from 'react';\nimport type { SideNavContext as Context, SideNavProviderProps } from './types';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { isRegularSection, prepareSections } from './utils';\n\nconst SideNavContext = createContext({} as Context);\n\nexport const useSideNav = () => useContext(SideNavContext);\n\nexport const SideNavProvider = ({\n children,\n isOpen: controlledIsOpen,\n onChange,\n withIcons = true,\n sections: sectionGroups,\n shouldToggleSidebar = true,\n topDropdownItems,\n collapseBreakpoint = 800,\n}: SideNavProviderProps) => {\n const isMounted = useRef(false);\n\n const [isOpen, setIsOpen] = useState(() => {\n if (!shouldToggleSidebar) return true;\n\n if (typeof controlledIsOpen === 'boolean') {\n return controlledIsOpen;\n }\n\n if (typeof window !== 'undefined') {\n return window.innerWidth > collapseBreakpoint;\n }\n\n return true;\n });\n\n const [sections, setSections] = useState(() => {\n return prepareSections(sectionGroups);\n });\n\n const { windowWitdh } = useWindowSize(200);\n\n useEffect(() => {\n if (isMounted.current) {\n onChange?.(isOpen);\n }\n }, [isOpen, onChange]);\n\n useEffect(() => {\n isMounted.current = true;\n }, []);\n\n useEffect(() => {\n handleWindowWidthChange(windowWitdh);\n }, [windowWitdh]);\n\n useEffect(() => {\n if (typeof controlledIsOpen === 'boolean') {\n setIsOpen(controlledIsOpen);\n }\n }, [controlledIsOpen]);\n\n const onOpen = () => {\n setIsOpen(true);\n };\n const onClose = () => {\n setIsOpen(false);\n };\n\n const onSectionOpen = (sectionName: string) => {\n setSections((sectionGroups) =>\n sectionGroups.map((sections) => {\n return sections.map((section) => {\n if (isRegularSection(section)) {\n return {\n ...section,\n isOpen: section?.name === sectionName ? !section.isOpen : false,\n };\n }\n return section;\n });\n })\n );\n };\n\n return (\n <SideNavContext.Provider\n value={{\n sections,\n topDropdownItems,\n onSectionOpen,\n isOpen,\n onOpen,\n onClose,\n withIcons,\n shouldToggleSidebar,\n }}\n >\n {children}\n </SideNavContext.Provider>\n );\n\n function handleWindowWidthChange(windowWidth: number) {\n if (!shouldToggleSidebar) return;\n if (windowWidth < collapseBreakpoint && isOpen) {\n onClose();\n }\n }\n};\n","import React, { useMemo, useRef } from 'react';\nimport SectionName from '../SectionName';\nimport ActionList, { ActionListItem } from '../../ActionList';\nimport { useSideNav } from '../contexts/SideNavContext';\nimport { useHover } from '../../../hooks/useHover';\nimport { SideNavTopDropdownItem } from '../contexts/types';\n\nconst SideNavSwitcher = () => {\n const { onOpen, topDropdownItems, isOpen } = useSideNav();\n const { mainItem, otherItems, actions } = topDropdownItems;\n\n const ref = useRef<HTMLElement | null>(null);\n const isItemHovered = useHover(ref);\n\n const itemMap = ({\n id,\n title,\n icon,\n iconClass,\n url,\n ...link\n }: SideNavTopDropdownItem): ActionListItem => ({\n id: id,\n label: title,\n leadingIconName: icon,\n leadingIconClassName: iconClass,\n link: {\n href: url,\n ...link,\n },\n });\n const { items, itemsCount } = useMemo(() => {\n const divider: ActionListItem = { type: 'divider', id: 'item-divider' };\n\n const isActionListItem = (\n item: ActionListItem | null\n ): item is ActionListItem => item != null;\n\n return {\n itemsCount: otherItems.length + actions.length,\n items: [\n ...otherItems.map(itemMap),\n otherItems?.length > 0 && actions?.length > 0 ? divider : null,\n ...actions.map(itemMap),\n ].filter(isActionListItem),\n };\n }, [actions, otherItems]);\n\n return (\n <>\n {itemsCount === 0 ? (\n <a\n className=\"maxio-side-nav__menu-button maxio-side-nav__menu-button--large\"\n href={mainItem.url}\n onClick={onOpen}\n >\n <span className=\"maxio-side-nav__menu-title\">{mainItem.title}</span>\n </a>\n ) : (\n <details className=\"maxio-action-menu maxio-side-nav--action-menu\">\n <summary\n onClick={onOpen}\n className=\"maxio-side-nav__menu-button\"\n aria-haspopup=\"true\"\n ref={ref}\n >\n {mainItem.url ? (\n <>\n <SectionName\n type=\"menu\"\n isTooltipVisible={!isOpen && isItemHovered}\n leadingIcon={mainItem.icon}\n trailingIcon=\"chevron-up-down\"\n leadingIconClassName={mainItem.iconClass}\n >\n {mainItem.title}\n </SectionName>\n </>\n ) : (\n <SectionName type=\"menu\" trailingIcon=\"chevron-up-down\">\n {mainItem.title}\n </SectionName>\n )}\n </summary>\n <ActionList\n truncateLabels\n className=\"maxio-action-menu__content\"\n aria-label=\"Action list\"\n items={items}\n small\n />\n </details>\n )}\n </>\n );\n};\n\nexport default SideNavSwitcher;\n","import React, { useRef } from 'react';\nimport { Link } from 'react-aria-components';\nimport { Section } from '../../../contexts/types';\nimport SectionName from '../../../SectionName';\nimport { useHover } from '../../../../../hooks/useHover';\nimport { useSideNav } from '../../../contexts/SideNavContext';\n\nconst SingleItem = ({ section }: { section: Section }) => {\n const { isOpen, withIcons } = useSideNav();\n const ref = useRef<HTMLAnchorElement>(null);\n const isHovered = useHover(ref);\n\n return (\n <li\n className=\"maxio-side-nav__item\"\n data-key={section.key}\n data-testid={section.testId ?? 'maxio-sidebar-section'}\n >\n <Link\n className=\"maxio-side-nav__link\"\n aria-current={section.isCurrent ? 'page' : undefined}\n href={section.href}\n render={section.render}\n ref={ref}\n >\n <SectionName\n isTooltipVisible={isHovered && !isOpen}\n type=\"menu\"\n leadingIcon={withIcons ? section.icon : undefined}\n >\n {section.name}\n </SectionName>\n </Link>\n </li>\n );\n};\n\nexport default SingleItem;\n","import React, { useRef } from 'react';\nimport cx from 'classnames';\nimport { Link } from 'react-aria-components';\nimport SectionName from '../../SectionName/SectionName';\nimport { useSideNav } from '../../contexts/SideNavContext';\nimport { Section, SectionHeading } from '../../contexts/types';\nimport SingleItem from './SingleItem/SingleItem';\nimport useHover from '../../../../hooks/useHover/useHover';\nimport { isRegularSection } from '../../contexts/utils';\n\nconst SideNavItem = ({ section }: { section: Section | SectionHeading }) => {\n const {\n onOpen,\n onSectionOpen,\n isOpen: isSideNavOpen,\n withIcons,\n } = useSideNav();\n const buttonRef = useRef<HTMLButtonElement>(null);\n const isButtonHovered = useHover(buttonRef);\n\n if (!isRegularSection(section)) {\n return <li className=\"maxio-side-nav__item-header\">{section.title}</li>;\n }\n\n const onSectionClick = () => {\n onSectionOpen(section.name);\n onOpen();\n };\n\n if (section.Component) {\n return <section.Component section={section} />;\n }\n\n if (section.href) return <SingleItem section={section} />;\n\n return (\n <li\n className={cx('maxio-side-nav__item', {\n 'maxio-side-nav__item--icon': withIcons,\n })}\n data-testid={section.testId ?? 'maxio-sidebar-section'}\n >\n <button\n className=\"maxio-side-nav__menu-button\"\n ref={buttonRef}\n aria-expanded={section.isOpen ? 'true' : 'false'}\n type=\"button\"\n onClick={onSectionClick}\n >\n <SectionName\n type=\"menu\"\n isTooltipVisible={!isSideNavOpen && isButtonHovered}\n leadingIcon={withIcons ? section.icon : undefined}\n trailingIcon={section.items?.length ? 'chevron-down' : undefined}\n >\n {section.name}\n </SectionName>\n </button>\n <ul className=\"maxio-side-nav__menu\">\n {section.items?.map((item) => (\n <li\n key={`section-sub-item-${item.name}`}\n className=\"maxio-side-nav__item\"\n data-testid={item.testId ?? 'maxio-section-item'}\n >\n <Link\n className=\"maxio-side-nav__link\"\n href={item.href}\n render={item.render}\n aria-current={item.isCurrent ? 'page' : undefined}\n >\n <span className=\"maxio-side-nav__link-title\">{item.name}</span>\n </Link>\n </li>\n ))}\n </ul>\n </li>\n );\n};\n\nexport default SideNavItem;\n","import React from 'react';\nimport SideNavItem from './SideNavItem/SideNavItem';\nimport { useSideNav } from '../contexts/SideNavContext';\n\nconst SideNavItems = () => {\n const { sections: sectionGroups } = useSideNav();\n return (\n <>\n {sectionGroups.map((sections, idx) => (\n <ul\n role=\"list\"\n className=\"maxio-side-nav__items\"\n key={`section-list-${idx}`}\n >\n {sections.map((s, sIdx) => (\n <SideNavItem\n key={`section-list-item-${s.type}-${idx}-${sIdx}`}\n section={s}\n />\n ))}\n </ul>\n ))}\n </>\n );\n};\n\nexport default SideNavItems;\n","import React from 'react';\nimport { useSideNav } from '../contexts';\nimport Icon from '../../Icon';\n\nconst SideNavTopItem = () => {\n const { isOpen, onOpen, onClose, shouldToggleSidebar } = useSideNav();\n return (\n <div className=\"maxio-side-nav__logo-container\">\n <a className=\"maxio-side-nav__brand\" href=\"/\" aria-label=\"Maxio\" />\n {shouldToggleSidebar && (\n <button\n className=\"maxio-side-nav__menu-toggle\"\n aria-label={isOpen ? 'Collapse navigation' : 'Expand navigation'}\n aria-expanded={isOpen}\n onClick={isOpen ? onClose : onOpen}\n >\n <Icon variant=\"sidebar\" />\n </button>\n )}\n </div>\n );\n};\n\nexport default SideNavTopItem;\n","import React from 'react';\nimport cx from 'classnames';\nimport SideNavSwitcher from './SideNavSwitcher/SideNavSwitcher';\nimport SideNavItems from './SideNavItems/SideNavItems';\nimport { SideNavProvider, useSideNav } from './contexts/SideNavContext';\nimport { SideNavProviderProps } from './contexts/types';\nimport SideNavTopItem from './SideNavTopItem';\n\nconst SideNav = () => {\n const { isOpen } = useSideNav();\n return (\n <nav\n className={cx('maxio-side-nav', {\n 'maxio-side-nav--collapsed': !isOpen,\n })}\n >\n <SideNavTopItem />\n <SideNavSwitcher />\n <div className=\"maxio-side-nav__items-container\">\n <SideNavItems />\n </div>\n </nav>\n );\n};\n\nexport type SideNavWrapperProps = Omit<SideNavProviderProps, 'children'>;\n\nconst SideNavWrapper = ({\n withIcons = true,\n shouldToggleSidebar = false,\n topDropdownItems,\n sections = [],\n collapseBreakpoint = 800,\n isOpen,\n onChange,\n}: SideNavWrapperProps) => {\n return (\n <SideNavProvider\n isOpen={isOpen}\n onChange={onChange}\n collapseBreakpoint={collapseBreakpoint}\n withIcons={withIcons}\n shouldToggleSidebar={shouldToggleSidebar}\n topDropdownItems={topDropdownItems}\n sections={sections}\n >\n <SideNav />\n </SideNavProvider>\n );\n};\n\nexport default SideNavWrapper;\n","import React from 'react';\nimport cx from 'classnames';\nimport { Tab as AriaTab } from 'react-aria-components';\nimport { TabProps } from './types';\n\nconst Tab = ({\n disabled = false,\n value = 0,\n className,\n id: legacyId,\n isCurrent,\n ...props\n}: TabProps) => {\n void legacyId;\n void isCurrent;\n\n const isIcon = props.type === 'icon';\n\n const tabClassName = ({ isSelected }: { isSelected: boolean }) =>\n cx('maxio-tabs__tab', className, {\n 'maxio-tabs__tab--active': isSelected,\n 'maxio-tabs__tab--disabled': disabled,\n 'maxio-tabs__tab--icon': isIcon,\n });\n\n if (props.type === 'icon') {\n const { icon, ...restProps } = props;\n return (\n <AriaTab\n id={value}\n isDisabled={disabled}\n {...restProps}\n className={tabClassName}\n >\n <div className=\"maxio-tabs__tab-content\">{icon}</div>\n </AriaTab>\n );\n }\n\n const { children, rightIcon, ...restProps } = props;\n\n return (\n <AriaTab\n id={value}\n isDisabled={disabled}\n {...restProps}\n className={tabClassName}\n >\n <div className=\"maxio-tabs__tab-content\">\n {children}\n {rightIcon || null}\n </div>\n </AriaTab>\n );\n};\n\nexport default Tab;\n","import React, { createContext, useContext } from 'react';\nimport type { TabsContext, TabsProviderProps } from './types';\n\nconst Context = createContext({\n variant: 'line',\n withDivider: false,\n} as TabsContext);\n\nexport const useTabs = () => useContext(Context);\n\ntype TabsProviderComponentProps = Pick<\n TabsProviderProps,\n 'children' | 'variant' | 'withDivider'\n>;\n\nexport const TabsProvider = ({\n children,\n variant = 'line',\n withDivider = false,\n}: TabsProviderComponentProps) => {\n return (\n <Context.Provider value={{ variant, withDivider }}>\n {children}\n </Context.Provider>\n );\n};\n","import { ReactNode } from 'react';\nimport React from 'react';\nimport cx from 'classnames';\nimport { TabPanel as AriaTabPanel } from 'react-aria-components';\nimport type { TestIdProps } from '../../../utils/testId';\n\nexport interface TabPanelProps\n extends\n Omit<React.HtmlHTMLAttributes<HTMLDivElement>, 'children' | 'id'>,\n TestIdProps {\n children: ReactNode;\n value?: number;\n /**\n * @deprecated React Aria now owns tab panel IDs. This prop is accepted for\n * one compatibility cycle but is ignored internally.\n */\n id?: string;\n}\n\nconst TabPanel = ({\n children,\n value,\n className,\n id: legacyId,\n ...props\n}: TabPanelProps) => {\n void legacyId;\n\n return (\n <AriaTabPanel\n id={value}\n className={cx('maxio-tabs__panel', className)}\n {...props}\n >\n {children}\n </AriaTabPanel>\n );\n};\n\nexport default TabPanel;\n","import React from 'react';\nimport cx from 'classnames';\nimport type { CardProps } from './types';\nexport type { CardProps, CardVariant } from './types';\n\nconst CardHeader = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cx('maxio-card__header', className)} {...props}>\n {children}\n </div>\n );\n};\n\nCardHeader.displayName = 'Card.Header';\n\nconst CardBody = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cx('maxio-card__body', className)} {...props}>\n {children}\n </div>\n );\n};\n\nCardBody.displayName = 'Card.Body';\n\nconst CardFooter = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cx('maxio-card__footer', className)} {...props}>\n {children}\n </div>\n );\n};\n\nCardFooter.displayName = 'Card.Footer';\n\nconst CardRoot = ({\n children,\n className,\n variant = 'primary',\n ...props\n}: CardProps) => {\n return (\n <div\n className={cx('maxio-card', `maxio-card--${variant}`, className)}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nCardRoot.displayName = 'Card';\n\ntype CardComponent = typeof CardRoot & {\n Header: typeof CardHeader;\n Body: typeof CardBody;\n Footer: typeof CardFooter;\n};\n\nconst Card = Object.assign(CardRoot, {\n Header: CardHeader,\n Body: CardBody,\n Footer: CardFooter,\n}) as CardComponent;\n\nexport default Card;\n","<svg\n id=\"logo-svg\"\n data-name=\"Maxio Logo SVG\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1036 240\"\n>\n <path d=\"M59.32,11.3L70.64,0h0s40.74,40.35,40.74,40.35v70.99H40.89L0,70.52l11.15-11.14,36.2,36.15h30.07l3.07-3.39L29.58,40.99l10.99-10.97,51.24,50.83,3.72-3.38v-30.34L59.32,11.3Z\" />\n <path d=\"M180.68,11.3L169.36,0h0s-40.73,40.35-40.73,40.35v70.99h70.48l40.89-40.83-11.15-11.14-36.2,36.15h-30.06l-3.07-3.39,50.91-51.15-10.99-10.97-51.24,50.83-3.72-3.38v-30.34l36.2-35.83Z\" />\n <path d=\"M59.32,228.7l11.31,11.29h0s40.74-40.35,40.74-40.35v-70.99H40.89L0,169.48l11.15,11.14,36.2-36.15h30.07l3.07,3.39-50.92,51.15,10.99,10.97,51.24-50.83,3.72,3.38v30.34l-36.2,35.83Z\" />\n <path d=\"M180.68,228.7l-11.32,11.29-40.73-40.35v-70.99h70.48l40.89,40.83-11.15,11.14-36.2-36.15h-30.06l-3.07,3.39,50.91,51.15-10.99,10.97-51.24-50.83-3.72,3.38v30.34l36.2,35.83Z\" />\n <path d=\"M1015.27,139.55c0-29.94-23.74-53.46-52.11-53.46-28.37,0-52.11,23.52-52.11,53.46s23.74,53.46,52.11,53.46,52.11-23.52,52.11-53.46ZM1035.59,140.5c-.5,40.27-32.73,72.76-72.43,72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71,72.44-73.71h.94c39.57.52,71.5,33.32,71.5,73.71v.95Z\" />\n <path fill-rule=\"evenodd\" d=\"M870.39,24h-20.33v20.33h20.33v-20.33ZM870.39,64.67h-20.33v148.59h20.33V64.67Z\" />\n <path fill-rule=\"evenodd\" d=\"M850.05,24h20.33v20.33h-20.33v-20.33Z\" />\n <path fill-rule=\"evenodd\" d=\"M695.01,82.85l50.83,56.28v6.53l-50.28,55.67,15.23,13.2,49.22-54.49h4.71l49.22,54.49,15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15,55.52h-3.96l-50.15-55.52-15.23,13.2Z\" />\n <path fill-rule=\"evenodd\" d=\"M660.49,78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13,0-52.44,18.93-58.09,44.86l-.28,1.27,19.33,3.72.31-1.14c2.39-8.91,6.66-16.54,13.04-21.94,6.36-5.39,14.91-8.63,26.02-8.63s19.12,3.25,24.76,8.96c5.64,5.72,8.73,14.06,8.73,24.53v6.11l-36.67,7.59-3.26.68c-16.14,3.47-29.79,7.84-39.59,14.45-10.54,7.11-16.64,16.83-16.64,30.62,0,12.51,4.51,22.62,12.5,29.59,7.96,6.95,19.25,10.67,32.63,10.67,22.27,0,41.87-12.03,51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58ZM620.4,146.77c-12.86,2.77-23.05,5.42-30.03,9.63-3.46,2.09-6.08,4.54-7.84,7.54-1.76,3-2.71,6.62-2.71,11.15,0,6.38,2.1,12.12,6.32,16.27,4.22,4.14,10.7,6.82,19.7,6.82,26.85,0,47.46-20.48,47.46-51.36v-7.2l-32.9,7.14Z\" />\n <path d=\"M434.8,188.74h4.54l61.73-164.33.15-.41h35.57v189.35h-20.89V55.37h-4.33l-59.7,157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98h-20.88V24h35.57l63.23,164.74Z\" />\n</svg>\n","import React from 'react';\nimport cx from 'classnames';\nimport LogoSvg from './logo.svg';\nimport { LogoProps } from './Logo.types';\n\nconst Logo = (props: LogoProps) => {\n const {\n size = 'sm',\n className,\n variant = 'lockup',\n alt = 'maxio logo',\n 'data-testid': testId,\n } = props;\n const logoAsMark = variant === 'mark';\n const isCustomSize = typeof size === 'number';\n\n return (\n <LogoSvg\n role=\"img\"\n viewBox={logoAsMark ? '0 0 240 240' : '0 0 1036 240'}\n aria-label={alt}\n data-testid={testId}\n height={isCustomSize ? size : undefined}\n className={cx(\n 'maxio-logo',\n !isCustomSize && `maxio-logo--${size}`,\n logoAsMark && 'maxio-logo--mark',\n className\n )}\n />\n );\n};\n\nexport default Logo;\n","import React, { useRef } from 'react';\nimport { ToastProps } from './Toast.types';\nimport { useToast } from '@react-aria/toast';\nimport classNames from 'classnames';\n\nimport Link from '../../../Link';\nimport IconButton from '../../../Buttons/IconButton';\nimport Icon from '../../../Icon';\nimport { IconVariant } from '../../../Icon/Icon.types';\nimport { childTestId } from '../../../../utils/testId';\n\nconst Toast = ({ state, ...props }: ToastProps) => {\n const ref = useRef(null);\n const { toastProps, contentProps, titleProps, closeButtonProps } = useToast(\n props,\n state,\n ref\n );\n const {\n closable = true,\n underline = true,\n external = false,\n testId,\n } = props.toast.content;\n\n const toastClasses = classNames('maxio-toast', {\n [`maxio-toast--${props.toast.content.sentiment}`]:\n props.toast.content.sentiment,\n });\n\n const iconMap: Record<string, IconVariant> = {\n default: 'info-circle-fill',\n success: 'check-circle-fill',\n warning: 'warning-circle-fill',\n danger: 'error-fill',\n info: 'info-circle-fill',\n };\n\n const icon = iconMap[props.toast.content.sentiment || 'default'];\n\n return (\n <div\n className={toastClasses}\n data-maxio-mode=\"dark\"\n {...toastProps}\n ref={ref}\n data-testid={testId}\n >\n <Icon variant={icon} className=\"maxio-toast__icon\" />\n <div className=\"maxio-toast__container\" {...contentProps}>\n <div className=\"maxio-toast__content\" {...titleProps}>\n {props.toast.content.title && (\n <span className=\"maxio-toast__title\">\n {props.toast.content.title}\n </span>\n )}\n {props.toast.content.message && (\n <span className=\"maxio-toast__message\">\n {props.toast.content.message}\n </span>\n )}\n {props.toast.content.link?.text && props.toast.content.link?.href && (\n <Link\n href={props.toast.content.link.href}\n underline={underline}\n external={external}\n >\n {props.toast.content.link.text}\n </Link>\n )}\n </div>\n </div>\n {closable && (\n <IconButton\n variant=\"ghost\"\n icon={<Icon variant=\"cross\" />}\n aria-label=\"Dismiss Notification\"\n className=\"maxio-toast__dismiss\"\n {...closeButtonProps}\n data-testid={childTestId(testId, 'dismiss')}\n />\n )}\n </div>\n );\n};\n\nexport default Toast;\n","import React from 'react';\nimport { useToastRegion } from '@react-aria/toast';\nimport { ToastRegionProps } from './ToastRegion.types';\n\nimport Toast from '../Toast/Toast';\n\nconst ToastRegion = ({ state, ...props }: ToastRegionProps) => {\n const ref = React.useRef(null);\n const { regionProps } = useToastRegion(props, state, ref);\n\n return (\n <div\n {...regionProps}\n ref={ref}\n className={props.className}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '10px',\n }}\n >\n {state.visibleToasts.map((toast) => (\n <Toast key={toast.key} toast={toast} state={state} />\n ))}\n </div>\n );\n};\n\nexport default ToastRegion;\n","import React, { createContext, useContext, useCallback, useMemo } from 'react';\nimport {\n useToastQueue,\n ToastQueue as ReactAriaToastQueue,\n} from '@react-stately/toast';\nimport { GlobalToastProviderProps, ToastContextValue } from './types';\nimport ToastRegion from '../ToastRegion';\nimport { ToastContent } from '../Toast/Toast.types';\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\nexport const GlobalToastProvider = ({\n children,\n toastQueue,\n ...props\n}: GlobalToastProviderProps) => {\n const state = useToastQueue(toastQueue);\n\n const removeAllToasts = useCallback(() => {\n state.visibleToasts.forEach((toast) => {\n toastQueue.close(toast.key);\n });\n }, [state.visibleToasts, toastQueue]);\n\n const contextValue = useMemo(\n () => ({\n addToast: toastQueue.add.bind(toastQueue),\n removeToast: toastQueue.clear.bind(toastQueue),\n removeAllToasts: removeAllToasts,\n state,\n }),\n [toastQueue, removeAllToasts, state]\n );\n\n return (\n <ToastContext.Provider value={contextValue}>\n {children}\n {state.visibleToasts.length > 0 && (\n <ToastRegion {...props} state={state} />\n )}\n </ToastContext.Provider>\n );\n};\n\n// Hook for programmatic toast access\nexport const useToast = () => {\n const context = useContext(ToastContext);\n\n if (!context) {\n throw new Error(\n 'useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.'\n );\n }\n\n return context;\n};\n\n// Custom ToastQueue to fix type issues\nexport class ToastQueue extends ReactAriaToastQueue<ToastContent> {}\n","import React, { useId, useCallback } from 'react';\nimport cx from 'classnames';\n\nexport type ToggleProps = {\n /**\n * The state of the toggle\n */\n checked?: boolean;\n /**\n * The state for uncontrolled toggle.\n */\n defaultChecked?: boolean;\n /**\n * The onChange function\n */\n onChange?: (\n value: boolean,\n event?:\n | React.ChangeEvent<HTMLInputElement>\n | React.KeyboardEvent<HTMLInputElement>\n ) => void;\n /**\n * Is the toggle disabled\n */\n disabled?: boolean;\n /**\n * Toggle name\n */\n name?: string;\n /**\n * Toggle label\n */\n valueDescription?: string;\n /**\n * Toggle label position\n */\n valueDescriptionPosition?: 'left' | 'right';\n /**\n * Class name for the main container\n */\n className?: string;\n /**\n * Toggle id - if id not provided then it will be generated automatically\n */\n id?: string;\n /**\n * Aria label for the toggle - should be provided if no valueDescription is provided\n */\n 'aria-label'?: string;\n /**\n * Test ID set on the root element\n * @default 'toggle-container'\n */\n 'data-testid'?: string;\n};\nconst Toggle = ({\n defaultChecked,\n checked,\n onChange,\n disabled,\n valueDescription,\n valueDescriptionPosition,\n className,\n name,\n id,\n 'data-testid': testId = 'toggle-container',\n ...props\n}: ToggleProps) => {\n const generatedId = useId();\n const isUncontrolled = typeof defaultChecked === 'boolean';\n\n const toggleId = id || generatedId;\n const flexDirection =\n valueDescriptionPosition === 'left' ? 'row' : 'row-reverse';\n const isDescriptionRendered = valueDescription && valueDescriptionPosition;\n\n const handleKeyboardInteractions = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n e.preventDefault();\n const currentValue = e.currentTarget.checked;\n if (isUncontrolled) {\n e.currentTarget.checked = !currentValue;\n }\n\n if (onChange) onChange(!currentValue, e);\n }\n },\n [isUncontrolled, onChange]\n );\n\n const label =\n props['aria-label'] ||\n (isDescriptionRendered ? undefined : valueDescription);\n\n return (\n <div\n className={cx('maxio-toggle', className, {\n 'maxio-toggle--disabled': disabled,\n })}\n style={{\n display: 'inline-flex',\n flexDirection,\n }}\n data-testid={testId}\n >\n {isDescriptionRendered ? (\n <label className=\"maxio-toggle__label\" htmlFor={toggleId}>\n {valueDescription}\n </label>\n ) : null}\n\n <div className=\"maxio-toggle__container\">\n <input\n type=\"checkbox\"\n defaultChecked={defaultChecked}\n checked={checked}\n onChange={(e) => {\n if (onChange) {\n onChange(e.target.checked, e);\n }\n }}\n onKeyDown={handleKeyboardInteractions}\n disabled={disabled}\n className=\"maxio-toggle__checkbox\"\n id={toggleId}\n name={name}\n aria-label={label}\n />\n <div\n className=\"maxio-toggle__track\"\n role=\"switch\"\n aria-checked={checked}\n aria-hidden=\"true\"\n >\n <div className=\"maxio-toggle__handle\"></div>\n <span className=\"maxio-toggle__icon\">\n <i className=\"maxio-toggle__icon-on\"></i>\n </span>\n <span className=\"maxio-toggle__icon\">\n <i className=\"maxio-toggle__icon-off\"></i>\n </span>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Toggle;\n","import React, { useRef } from 'react';\nimport { AriaButtonProps } from 'react-aria';\nimport { useButton } from 'react-aria';\nimport Icon from '../../Icon';\n\nconst DismissButton = ({ ...props }: AriaButtonProps) => {\n const ref = useRef(null);\n const { buttonProps } = useButton(props, ref);\n\n return (\n <button {...buttonProps} className=\"maxio-chip__dismiss-button\">\n <Icon variant=\"cross-circle-fill\" className=\"maxio-chip__icon\" />\n </button>\n );\n};\n\nexport default DismissButton;\n","import React from 'react';\nimport cx from 'classnames';\nimport { AuthLayoutProps, Sentiment } from './AuthLayout.types';\nimport { Body, Heading } from '../../components/Typography';\nimport { Flex } from '../../components/Flex';\nimport { Alert } from '../../components/Notifications/Alert';\nimport Logo from '../../components/Logo/Logo';\nimport Card from '../../components/Card/Card';\n\nconst borderColor: Record<Sentiment, string> = {\n success: 'maxio-auth-layout__heading--success',\n danger: 'maxio-auth-layout__heading--danger',\n};\n\nconst AuthLayout = ({\n children,\n heading,\n description,\n sentiment = 'success',\n leadingElement = null,\n alert,\n topAddon = null,\n footer,\n}: AuthLayoutProps) => {\n return (\n <div className=\"maxio-auth-layout\">\n <Flex alignItems=\"center\" justifyContent=\"between\">\n <Logo size=\"md\" />\n {topAddon}\n </Flex>\n {alert && (\n <Alert display=\"block\" title={alert.title} sentiment={alert.sentiment}>\n {alert.children}\n </Alert>\n )}\n <Card variant=\"secondary\">\n <Card.Body>\n <Flex flexDirection=\"col\" gap={6}>\n <Flex flexDirection=\"col\" gap={2}>\n <Flex alignItems=\"center\" gap={2}>\n {leadingElement}\n <Heading\n size=\"lg\"\n className={cx(\n 'maxio-auth-layout__heading',\n borderColor[sentiment]\n )}\n >\n {heading}\n </Heading>\n </Flex>\n {description && (\n <Flex style={{ color: 'var(--maxio-color-text-tertiary)' }}>\n <Body size=\"sm\" className=\"maxio-auth-layout__description\">\n {description}\n </Body>\n </Flex>\n )}\n </Flex>\n {children}\n </Flex>\n </Card.Body>\n {footer && <Card.Footer>{footer}</Card.Footer>}\n </Card>\n </div>\n );\n};\n\nexport default AuthLayout;\n","import React from 'react';\nimport cx from 'classnames';\n\nimport { AvatarProps } from './Avatar.types';\n\nconst Avatar = ({\n className,\n src,\n alt = 'avatar',\n 'data-testid': testId,\n}: AvatarProps) => {\n return (\n <img\n className={cx('maxio-avatar', className)}\n alt={alt}\n src={src}\n data-testid={testId}\n />\n );\n};\n\nexport default Avatar;\n","import React from 'react';\nimport classNames from 'classnames';\nimport { BannerProps } from './Banner.types';\n\nimport { IconVariant } from '../../Icon/Icon.types';\n\nimport Icon from '../../Icon/Icon';\nimport Link from '../../Link/Link';\nimport IconButton from '../../Buttons/IconButton';\nimport { childTestId } from '../../../utils/testId';\n\nconst Banner = ({\n children,\n title,\n linkText,\n linkExternal,\n href,\n display = 'inline',\n sentiment = 'info',\n onDismiss,\n className,\n 'data-testid': testId,\n}: BannerProps) => {\n if (!children && !title) {\n console.warn(\n 'Banner component requires either children or title prop to be rendered'\n );\n return null;\n }\n\n const bannerClasses = classNames('maxio-banner', {\n [`maxio-banner--${sentiment}`]: sentiment !== 'info' && sentiment,\n className,\n });\n\n const iconMap: Record<string, IconVariant> = {\n success: 'check-circle-fill',\n warning: 'warning-circle-fill',\n danger: 'error-fill',\n info: 'info-circle-fill',\n };\n\n const icon = iconMap[sentiment];\n\n const contentWrapper = classNames('maxio-banner__content', {\n 'maxio-banner__content--block': display === 'block',\n });\n\n return (\n <div className={bannerClasses} aria-live=\"assertive\" data-testid={testId}>\n <Icon variant={icon} className=\"maxio-banner__icon\" aria-hidden=\"true\" />\n <section className=\"maxio-banner__container\">\n <div className={contentWrapper}>\n {title && <span className=\"maxio-banner__title\">{title}</span>}\n {children && (\n <span className=\"maxio-banner__message\">{children}</span>\n )}\n {linkText && href && (\n <Link\n href={href}\n {...(sentiment !== 'warning' && { variant: 'inverse' })}\n underline\n {...(linkExternal ? { external: true } : {})}\n >\n {linkText}\n </Link>\n )}\n </div>\n </section>\n {onDismiss && (\n <IconButton\n icon={<Icon variant=\"cross\" />}\n aria-label=\"Dismiss Notification\"\n variant=\"ghost\"\n onClick={onDismiss}\n className=\"maxio-banner__dismiss\"\n data-testid={childTestId(testId, 'dismiss')}\n />\n )}\n </div>\n );\n};\n\nexport default Banner;\n","import React, { Children, isValidElement, cloneElement } from 'react';\nimport cx from 'classnames';\n\nimport { BreadcrumbsItemProps, BreadcrumbsProps } from './types';\nimport BreadcrumbsItem from './BreadcrumbsItem';\nimport { ERROR_MESSAGES } from './constants';\n\nconst Breadcrumbs: React.FC<BreadcrumbsProps> = ({\n className,\n children,\n ...rest\n}) => {\n const childrenCount = Children.count(children);\n if (childrenCount === 0) {\n throw new Error(ERROR_MESSAGES.NO_ITEMS);\n }\n\n const content = Children.map(children, (child, index: number) => {\n if (\n isValidElement<BreadcrumbsItemProps>(child) &&\n child.type === BreadcrumbsItem\n ) {\n if (index === childrenCount - 1 && child.props.href) {\n throw new Error(ERROR_MESSAGES.LAST_ITEM_WITH_HREF);\n }\n return cloneElement(child, {\n 'aria-current': index === childrenCount - 1 ? 'page' : undefined,\n });\n }\n throw new Error(ERROR_MESSAGES.ONLY_BREADCRUMBS_ITEM);\n });\n\n return (\n <nav aria-label=\"Breadcrumb\" {...rest}>\n <ol className={cx('maxio-breadcrumbs', className)}>{content}</ol>\n </nav>\n );\n};\n\nexport default Breadcrumbs;\n","import React, { ReactNode } from 'react';\nimport cx from 'classnames';\nimport { AriaCheckboxGroupProps, useCheckboxGroup } from 'react-aria';\nimport { useCheckboxGroupState } from '@react-stately/checkbox';\nimport { CheckboxGroupContext } from '../contexts';\nimport FormHelperText from '../../FormHelperText';\nimport FormErrorMessage from '../../FormErrorMessage';\n\nexport interface CheckboxGroupProps extends Pick<\n AriaCheckboxGroupProps,\n | 'aria-describedby'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-label'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onFocus'\n | 'onChange'\n | 'onFocusChange'\n | 'value'\n | 'defaultValue'\n | 'label'\n> {\n children: ReactNode;\n className?: string;\n disabled?: boolean;\n errorMessage?: string;\n helperText?: string;\n name: string;\n}\n\nconst CheckboxGroup = ({\n helperText,\n className,\n errorMessage,\n children,\n disabled,\n label,\n defaultValue,\n name,\n ...props\n}: CheckboxGroupProps) => {\n const state = useCheckboxGroupState({\n defaultValue,\n name,\n errorMessage,\n description: helperText,\n label,\n isDisabled: disabled,\n isInvalid: !!errorMessage,\n ...props,\n });\n const {\n groupProps,\n labelProps,\n descriptionProps,\n errorMessageProps,\n isInvalid,\n } = useCheckboxGroup(\n {\n 'aria-label': (label ?? props['aria-label'])?.toString(),\n isDisabled: disabled,\n isInvalid: !!errorMessage,\n ...props,\n },\n state\n );\n\n const containerClassNames = cx(\n 'maxio-checkbox-group',\n {\n 'maxio-checkbox-group--disabled': disabled,\n },\n className\n );\n\n const showHelperText = helperText && !errorMessage;\n\n return (\n <div className={containerClassNames} {...groupProps}>\n {label && (\n <label className=\"maxio-checkbox-group__label\" {...labelProps}>\n {label}\n </label>\n )}\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n\n {showHelperText && (\n <FormHelperText {...descriptionProps}>{helperText}</FormHelperText>\n )}\n {errorMessage && isInvalid && (\n <FormErrorMessage {...errorMessageProps}>\n {errorMessage}\n </FormErrorMessage>\n )}\n </div>\n );\n};\n\nexport default CheckboxGroup;\n","import React, { useRef } from 'react';\nimport { useToggleButton } from 'react-aria';\nimport { useToggleState } from '@react-stately/toggle';\nimport classNames from 'classnames';\nimport { ChipProps } from './Chip.types';\nimport Icon from '../Icon';\nimport DismissButton from './DismissButton/DismissButton';\n\nconst Chip = ({\n label,\n onDismiss,\n dismissLabel,\n leadingIcon,\n trailingIcon,\n title,\n ...props\n}: ChipProps) => {\n const ref = useRef(null);\n const state = useToggleState(props);\n const { buttonProps } = useToggleButton(props, state, ref);\n\n const chipClasses = classNames('maxio-chip', {\n 'maxio-chip--selected': state?.isSelected,\n });\n\n const buttonClasses = classNames('maxio-chip__button', {\n 'maxio-chip--dismissible': onDismiss,\n });\n\n return (\n <div className={chipClasses}>\n <button\n className={buttonClasses}\n ref={ref}\n {...buttonProps}\n title={title}\n >\n {leadingIcon && (\n <Icon variant={leadingIcon} className=\"maxio-chip__icon\" />\n )}\n <span className=\"maxio-chip__label\">{label}</span>\n {trailingIcon && !onDismiss && (\n <Icon variant={trailingIcon} className=\"maxio-chip__icon\" />\n )}\n </button>\n {onDismiss && (\n <DismissButton onPress={onDismiss} aria-label={dismissLabel} />\n )}\n </div>\n );\n};\n\nexport default Chip;\n","import React, { ElementType } from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type CodeProps = BaseTypographyProps & {\n /**\n * The component to render as (e.g. `span or div`)\n */\n as?: ElementType;\n};\n\nconst Code = ({ as = 'div', children, className, ...rest }: CodeProps) => {\n const AsComponent = as;\n\n const classNames = cx('maxio-code', className);\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Code;\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\n\nexport type CopyFeedbackState = 'idle' | 'copied' | 'error';\n\ntype ResolvedFeedbackState = Exclude<CopyFeedbackState, 'idle'>;\n\n/**\n * `announceId` exists so a repeat of the same message remounts the live region\n * node, which is what makes a screen reader read identical text twice in a row.\n */\ntype Feedback = {\n state: ResolvedFeedbackState;\n value: string;\n announceId: number;\n};\n\ntype UseCopyToClipboardOptions = {\n copyLabel: string;\n copiedLabel: string;\n copyErrorLabel: string;\n resetAfterMs: number;\n onCopy?: (value: string) => void;\n onCopyError?: (error: unknown) => void;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\n/**\n * Owns the clipboard write, the transient copied/error feedback and the timers\n * and staleness guards around them. Kept free of any rendering concern so the\n * behaviour can be tested and reused without mounting a button or a tooltip.\n */\nexport const useCopyToClipboard = (\n value: string,\n {\n copyLabel,\n copiedLabel,\n copyErrorLabel,\n resetAfterMs,\n onCopy,\n onCopyError,\n onClick,\n }: UseCopyToClipboardOptions\n) => {\n const [feedback, setFeedback] = useState<Feedback | null>(null);\n const resetTimeoutRef = useRef<number | null>(null);\n const announceIdRef = useRef(0);\n\n // Three independent reasons to discard a resolved clipboard write, kept as\n // three separate refs so each guard says what it is actually protecting.\n const isMountedRef = useRef(true);\n const activeCopyIdRef = useRef(0);\n const latestValueRef = useRef(value);\n\n const clearFeedbackTimers = useCallback(() => {\n if (resetTimeoutRef.current !== null) {\n clearTimeout(resetTimeoutRef.current);\n resetTimeoutRef.current = null;\n }\n }, []);\n\n const resetFeedback = useCallback(() => {\n clearFeedbackTimers();\n setFeedback(null);\n }, [clearFeedbackTimers]);\n\n const showFeedback = useCallback(\n (nextState: ResolvedFeedbackState, feedbackValue: string) => {\n clearFeedbackTimers();\n setFeedback({\n state: nextState,\n value: feedbackValue,\n announceId: ++announceIdRef.current,\n });\n resetTimeoutRef.current = window.setTimeout(resetFeedback, resetAfterMs);\n },\n [clearFeedbackTimers, resetAfterMs, resetFeedback]\n );\n\n useEffect(() => {\n latestValueRef.current = value;\n resetFeedback();\n }, [resetFeedback, value]);\n\n useEffect(() => {\n // Re-set on mount, not just at declaration: StrictMode runs the cleanup and\n // then mounts again, which would otherwise leave this false forever.\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n clearFeedbackTimers();\n };\n }, [clearFeedbackTimers]);\n\n const handleCopy = useCallback(\n async (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n const copyId = ++activeCopyIdRef.current;\n const requestedValue = value;\n\n const isStale = () =>\n !isMountedRef.current ||\n copyId !== activeCopyIdRef.current ||\n requestedValue !== latestValueRef.current;\n\n try {\n await navigator.clipboard.writeText(requestedValue);\n } catch (error) {\n if (!isStale()) {\n showFeedback('error', requestedValue);\n }\n onCopyError?.(error);\n return;\n }\n\n if (!isStale()) {\n showFeedback('copied', requestedValue);\n }\n onCopy?.(requestedValue);\n },\n [onClick, onCopy, onCopyError, showFeedback, value]\n );\n\n const feedbackState: CopyFeedbackState =\n feedback?.value === value ? feedback.state : 'idle';\n\n const feedbackLabel = {\n idle: copyLabel,\n copied: copiedLabel,\n error: copyErrorLabel,\n }[feedbackState];\n\n return {\n feedbackState,\n feedbackLabel,\n /** Non-null only while there is something to announce. */\n announcement:\n feedbackState === 'idle' || !feedback\n ? null\n : { id: feedback.announceId, message: feedbackLabel },\n handleCopy,\n };\n};\n\nexport default useCopyToClipboard;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n DateField as AriaDateField,\n Label,\n Text,\n FieldError,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport DateInput from './DateInput';\nimport type { DateFieldProps } from './types';\n\n/** DateField provides localized, individually editable date and time segments for keyboard entry. */\nconst DateField = <T extends DateValue>({\n label,\n description,\n errorMessage,\n className,\n ...props\n}: DateFieldProps<T>) => (\n <AriaDateField\n {...props}\n className={composeRenderProps(className, (className, state) =>\n cx(\n 'maxio-text-field',\n 'maxio-date-field',\n {\n 'maxio-text-field--disabled': state.isDisabled,\n 'maxio-text-field--error': state.isInvalid,\n 'maxio-text-field--readonly': state.isReadOnly,\n },\n className\n )\n )}\n >\n {label != null && (\n <Label className=\"maxio-text-field__label\">{label}</Label>\n )}\n <div className=\"maxio-text-field__items\">\n <div className=\"maxio-text-field__input\">\n <DateInput />\n </div>\n </div>\n {description != null && (\n <Text slot=\"description\" className=\"maxio-form-helper-text\">\n {description}\n </Text>\n )}\n <FieldError className=\"maxio-form-error\">{errorMessage}</FieldError>\n </AriaDateField>\n);\nexport default DateField;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n DatePicker as AriaDatePicker,\n Label,\n Text,\n FieldError,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport { Group, Button, Dialog } from 'react-aria-components';\nimport { Popover } from '../../Popover';\nimport Icon from '../../Icon';\nimport { Calendar } from '../../Calendar';\nimport DatePresets from '../DatePresets';\nimport DateInput from '../DateField/DateInput';\nimport { isPresetDateDisabled } from '../DatePresets/utils';\nimport type { DatePickerProps } from './types';\n\n/** DatePicker combines localized date entry with a calendar popover for selecting one date. */\nconst DatePicker = <T extends DateValue>({\n label,\n description,\n errorMessage,\n className,\n presets,\n presetsLabel,\n navigation,\n ...props\n}: DatePickerProps<T>) => {\n const nullPresetLabel = presets?.find(\n (preset) => preset.value === null\n )?.label;\n return (\n <AriaDatePicker\n {...props}\n className={composeRenderProps(className, (className, state) =>\n cx(\n 'maxio-text-field',\n 'maxio-date-field',\n {\n 'maxio-text-field--disabled': state.isDisabled,\n 'maxio-text-field--error': state.isInvalid,\n 'maxio-text-field--readonly': state.isReadOnly,\n },\n className\n )\n )}\n >\n {({ state, isDisabled, isReadOnly }) => (\n <>\n {label != null && (\n <Label className=\"maxio-text-field__label\">{label}</Label>\n )}\n <Group className=\"maxio-text-field__items\">\n <div className=\"maxio-text-field__input\">\n <DateInput\n displayValue={\n state.value === null ? nullPresetLabel : undefined\n }\n />\n </div>\n <div className=\"maxio-text-field__trailing-element\">\n <Button className=\"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon\">\n <Icon variant=\"calendar\" />\n </Button>\n </div>\n </Group>\n {description != null && (\n <Text slot=\"description\" className=\"maxio-form-helper-text\">\n {description}\n </Text>\n )}\n <FieldError className=\"maxio-form-error\">{errorMessage}</FieldError>\n <Popover hideArrow className=\"maxio-date-field__popover\">\n <Dialog className=\"maxio-date-field__dialog\">\n <Calendar navigation={navigation} />\n <DatePresets\n presets={presets}\n label={presetsLabel}\n isDisabled={isDisabled || isReadOnly}\n isPresetDisabled={(value) => isPresetDateDisabled(value, props)}\n onSelect={(value) => {\n state.setValue(value);\n state.setOpen(false);\n }}\n />\n </Dialog>\n </Popover>\n </>\n )}\n </AriaDatePicker>\n );\n};\nexport default DatePicker;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n DateRangePicker as AriaDateRangePicker,\n Label,\n Text,\n Group,\n Button,\n Dialog,\n FieldError,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport { Popover } from '../../Popover';\nimport Icon from '../../Icon';\nimport { RangeCalendar } from '../../RangeCalendar';\nimport DatePresets from '../DatePresets';\nimport DateInput from '../DateField/DateInput';\nimport { isPresetRangeDisabled } from '../DatePresets/utils';\nimport type { DateRangePickerProps } from './types';\nimport { getPresetLabel, selectRangePreset } from './utils';\n\n/** DateRangePicker combines two localized date inputs with a calendar popover for selecting a date range. */\nconst DateRangePicker = <T extends DateValue>({\n label,\n description,\n errorMessage,\n className,\n presets,\n presetsLabel,\n navigation,\n ...props\n}: DateRangePickerProps<T>) => (\n <AriaDateRangePicker\n {...props}\n className={composeRenderProps(className, (className, state) =>\n cx(\n 'maxio-text-field',\n 'maxio-date-field',\n {\n 'maxio-text-field--disabled': state.isDisabled,\n 'maxio-text-field--error': state.isInvalid,\n 'maxio-text-field--readonly': state.isReadOnly,\n },\n className\n )\n )}\n >\n {({ state, isDisabled, isReadOnly }) => {\n const presetLabel = getPresetLabel(state.value, presets);\n return (\n <>\n {label != null && (\n <Label className=\"maxio-text-field__label\">{label}</Label>\n )}\n <Group className=\"maxio-text-field__items\">\n <div className=\"maxio-text-field__input\">\n <DateInput\n slot=\"start\"\n displayValue={\n state.value?.start == null ? presetLabel : undefined\n }\n />\n <span aria-hidden=\"true\" className=\"maxio-body-sm\">\n →\n </span>\n <DateInput\n slot=\"end\"\n displayValue={\n state.value?.end == null ? presetLabel : undefined\n }\n />\n </div>\n <div className=\"maxio-text-field__trailing-element\">\n <Button className=\"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon\">\n <Icon variant=\"calendar\" />\n </Button>\n </div>\n </Group>\n {description != null && (\n <Text slot=\"description\" className=\"maxio-form-helper-text\">\n {description}\n </Text>\n )}\n <FieldError className=\"maxio-form-error\">{errorMessage}</FieldError>\n <Popover hideArrow className=\"maxio-date-field__popover\">\n <Dialog className=\"maxio-date-field__dialog\">\n <RangeCalendar navigation={navigation} />\n <DatePresets\n presets={presets}\n label={presetsLabel}\n isDisabled={isDisabled || isReadOnly}\n isPresetDisabled={(value) =>\n isPresetRangeDisabled(value, props)\n }\n onSelect={(value) => selectRangePreset(state, value)}\n />\n </Dialog>\n </Popover>\n </>\n );\n }}\n </AriaDateRangePicker>\n);\nexport default DateRangePicker;\n","import React, { ElementType } from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type DisplayProps = BaseTypographyProps & {\n /**\n * The component to render as (e.g. `span or div`)\n */\n as?: ElementType;\n /**\n * Defines the size of the display text\n */\n size?: 'sm' | 'md' | 'lg';\n};\n\nconst Display = ({\n as = 'div',\n children,\n size = 'md',\n className,\n ...rest\n}: DisplayProps) => {\n const AsComponent = as;\n\n const classNames = cx(`maxio-display-${size}`, className);\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Display;\n","import React from 'react';\nimport cx from 'classnames';\nimport { Body } from '../Typography';\nimport { Flex } from '../Flex';\nimport { EmptyStateProps } from './EmptyState.types';\n\nconst NO_DATA_MESSAGE = 'There is no data to display yet.';\nconst NO_RESULTS_MESSAGE =\n \"We couldn't find any items matching your criteria. Try adjusting your search or filters to see more results.\";\n\nconst EmptyState = ({\n hasActiveFilters = false,\n title,\n headingLevel = 'h2',\n description,\n actions,\n className,\n ...rest\n}: EmptyStateProps) => {\n const rootClasses = cx('maxio-empty-state', className);\n // Heading couples its size to the rendered element (`lg` is always `h1`), but\n // EmptyState sits inside a page section, so the level has to be set separately\n // from the visual size to keep the page outline intact.\n const HeadingTag = headingLevel;\n // The built-in copy is a fallback, not a default: it only fills in when the\n // consumer supplied neither a title nor a description. A provided description\n // always renders, with or without a title.\n const usesFallbackMessage = !title && !description;\n const message = usesFallbackMessage\n ? hasActiveFilters\n ? NO_RESULTS_MESSAGE\n : NO_DATA_MESSAGE\n : description;\n\n return (\n <div className={rootClasses} {...rest}>\n <Flex\n flexDirection=\"col\"\n alignItems=\"center\"\n gap={4}\n className=\"maxio-empty-state__content\"\n >\n <Flex\n flexDirection=\"col\"\n alignItems=\"center\"\n gap={2}\n className=\"maxio-empty-state__copy\"\n >\n {title && (\n <HeadingTag className=\"maxio-heading-lg\">{title}</HeadingTag>\n )}\n {message && (\n <Body size=\"sm\" className=\"maxio-empty-state__description\">\n {message}\n </Body>\n )}\n </Flex>\n {actions && (\n <Flex alignItems=\"center\" gap={2}>\n {actions}\n </Flex>\n )}\n </Flex>\n </div>\n );\n};\n\nexport default EmptyState;\n","import React from 'react';\nimport cx from 'classnames';\n\nimport Icon from '../Icon';\nimport { EnvironmentBarProps } from './EnvironmentBar.types';\n\n/**\n * Persistent environment context across the top of the window. Static text, so it is\n * not a live region; a labeled region, so screen-reader users can reach it from the\n * landmarks list.\n */\nconst EnvironmentBar = ({\n children,\n icon = 'cube',\n className,\n 'data-testid': testId,\n}: EnvironmentBarProps) => (\n <div\n className={cx('maxio-environment-bar', className)}\n role=\"region\"\n aria-label=\"Environment\"\n data-testid={testId}\n >\n {icon !== null && (\n <span className=\"maxio-environment-bar__icon\" aria-hidden=\"true\">\n <Icon variant={icon} />\n </span>\n )}\n <span className=\"maxio-environment-bar__text\">{children}</span>\n </div>\n);\n\nexport default EnvironmentBar;\n","import React from 'react';\nimport cx from 'classnames';\nimport { GridProps } from './types';\n\nconst Grid = ({\n children,\n templateColumns,\n templateRows,\n autoColumns,\n autoRows,\n inline,\n column,\n columnStart,\n columnEnd,\n row,\n rowStart,\n rowEnd,\n gap,\n gapX,\n gapY,\n className,\n justifyContent,\n alignItems,\n ...props\n}: GridProps) => {\n const gridClasses = cx(className, {\n 'maxio-grid': !inline,\n 'maxio-inline-grid': inline,\n [`maxio-grid-cols-${templateColumns}`]: templateColumns,\n [`maxio-grid-rows-${templateRows}`]: templateRows,\n [`maxio-auto-cols-${autoColumns}`]: autoColumns,\n [`maxio-auto-rows-${autoRows}`]: autoRows,\n [`maxio-col-${column === 'auto' ? 'auto' : `span-${column}`}`]: column,\n [`maxio-col-start-${columnStart}`]: columnStart,\n [`maxio-col-end-${columnEnd}`]: columnEnd,\n [`maxio-row-${row === 'auto' ? 'auto' : `span-${row}`}`]: row,\n [`maxio-row-start-${rowStart}`]: rowStart,\n [`maxio-row-end-${rowEnd}`]: rowEnd,\n [`maxio-gap-${gap}`]: gap !== undefined,\n [`maxio-gap-x-${gapX}`]: gapX !== undefined,\n [`maxio-gap-y-${gapY}`]: gapY !== undefined,\n [`maxio-justify-${justifyContent}`]: justifyContent,\n [`maxio-items-${alignItems}`]: alignItems,\n });\n\n return (\n <div className={gridClasses || undefined} {...props}>\n {children}\n </div>\n );\n};\n\nexport default Grid;\n","import React, { ElementType } from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type LabelProps = BaseTypographyProps & {\n /**\n * The component to render as (e.g. `span or div`)\n */\n as?: ElementType;\n /**\n * Defines the size of the label text\n */\n size?: 'xs' | 'sm';\n};\n\nconst Label = ({\n as = 'div',\n children,\n size = 'sm',\n className,\n ...rest\n}: LabelProps) => {\n const AsComponent = as;\n\n const classNames = cx(`maxio-label-${size}`, className);\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Label;\n","import React from 'react';\nimport { MenuButtonProps } from './types';\nimport cx from 'classnames';\n\nimport Icon from '../../../Icon';\nimport { useMenu } from '../../hooks';\nimport { childTestId } from '../../../../utils/testId';\n\nconst MenuButton = ({\n children,\n iconName = 'chevron-down',\n 'aria-label': ariaLabel,\n size = 'md',\n variant = 'secondary',\n 'data-testid': ownTestId,\n}: MenuButtonProps) => {\n const iconClassName = cx({\n 'maxio-action-menu__chevron': iconName === 'chevron-down',\n });\n\n const buttonClasses = cx(\n 'maxio-button',\n `maxio-button--${variant}`,\n `maxio-button--${size}`,\n {\n 'maxio-button--icon': iconName && !children,\n }\n );\n\n const { isOpen, buttonId, controlsId, testId } = useMenu();\n\n return (\n <summary\n className={buttonClasses}\n aria-haspopup=\"true\"\n aria-label={ariaLabel}\n aria-expanded={isOpen}\n aria-controls={controlsId}\n id={buttonId}\n data-testid={ownTestId ?? childTestId(testId, 'trigger')}\n >\n {children && <span>{children}</span>}\n {iconName && (\n <Icon\n variant={iconName}\n className={`${iconClassName} maxio-button__trailing-element`}\n />\n )}\n </summary>\n );\n};\n\nexport default MenuButton;\n","import React from 'react';\nimport cx from 'classnames';\nimport ActionList, { ActionListItem } from '../../../ActionList';\nimport { useMenu } from '../../hooks';\nimport { childTestId, type TestIdProps } from '../../../../utils/testId';\n\ninterface MenuListProps extends TestIdProps {\n items: ActionListItem[];\n alignItemsEnd?: boolean;\n}\n\nconst MenuList = ({\n items,\n alignItemsEnd = false,\n 'data-testid': ownTestId,\n}: MenuListProps) => {\n const itemsWrapperClass = cx('maxio-action-menu__content', {\n 'maxio-action-menu__content--align-end': alignItemsEnd,\n });\n const { controlsId, buttonId, testId } = useMenu();\n\n return (\n <div\n className={itemsWrapperClass}\n role=\"presentation\"\n data-testid={ownTestId ?? childTestId(testId, 'list')}\n >\n <ActionList\n role=\"menu\"\n itemProps={{\n role: 'menuitem',\n }}\n id={controlsId}\n aria-labelledby={buttonId}\n items={items}\n />\n </div>\n );\n};\n\nexport default MenuList;\n","import React from 'react';\nimport cx from 'classnames';\nimport { Modal as AriaModal, ModalOverlay } from 'react-aria-components';\n\nimport type { ModalProps } from './types';\n\n/**\n * Modal is a centered overlay that blocks the rest of the page until it is\n * dismissed. Put a `Dialog` inside it for the title, body and footer.\n */\nconst Modal = ({\n size = 'lg',\n isDismissable = true,\n className,\n style,\n children,\n ...props\n}: ModalProps) => (\n <ModalOverlay\n {...props}\n isDismissable={isDismissable}\n className=\"maxio-modal__backdrop\"\n >\n <AriaModal\n className={cx('maxio-modal', className)}\n style={style}\n data-size={size}\n >\n {children}\n </AriaModal>\n </ModalOverlay>\n);\n\nexport default Modal;\n","import React, { useState, useEffect } from 'react';\nimport { PaginationProps } from './Pagination.types';\nimport { DEFAULT_ITEMS_PER_PAGE } from './constants';\nimport IconButton from '../Buttons/IconButton';\nimport Icon from '../Icon/Icon';\nimport TooltipTrigger from '../TooltipTrigger';\nimport { Select, TextInput } from '../forms';\nimport { childTestId } from '../../utils/testId';\n\nconst Pagination = ({\n size = 'md',\n onChange,\n totalItems = 0,\n itemsPerPage: itemsPerPageProp = DEFAULT_ITEMS_PER_PAGE,\n currentPage: currentPageProp = 1,\n pageSizeOptions,\n manualPageInput = false,\n 'data-testid': testId,\n}: PaginationProps) => {\n const [currentPage, setCurrentPage] = useState(currentPageProp);\n const [itemsPerPage, setItemsPerPage] = useState(itemsPerPageProp);\n const [inputValue, setInputValue] = useState(currentPageProp.toString());\n\n // Sync inputValue when currentPage changes\n useEffect(() => {\n setInputValue(currentPage.toString());\n }, [currentPage]);\n\n const totalPages = Math.ceil(totalItems / itemsPerPage);\n const hasNext = currentPage < totalPages;\n const hasPrevious = currentPage > 1;\n\n const firstItem = itemsPerPage * (currentPage - 1) + 1;\n const lastItem = Math.min(itemsPerPage * currentPage, totalItems);\n\n const itemsPerPageDropdown = pageSizeOptions.map((option) => ({\n label: option.toString(),\n value: option.toString(),\n }));\n\n const totalPagesDropdown = Array.from(\n { length: totalPages },\n (_, i) => i + 1\n ).map((page) => ({\n label: page.toString(),\n value: page.toString(),\n }));\n\n const handleItemsPerPage = (selectedValue: number) => {\n setItemsPerPage(selectedValue);\n setCurrentPage(1);\n onChange?.({\n currentPage: 1,\n itemsPerPage: selectedValue,\n });\n };\n\n const handlePageSelection = (selectedValue: number) => {\n setCurrentPage(selectedValue);\n onChange?.({\n currentPage: selectedValue,\n itemsPerPage: itemsPerPage,\n });\n };\n\n const validateAndUpdatePage = (value: string) => {\n const numValue = parseInt(value, 10);\n\n if (isNaN(numValue)) {\n setInputValue(currentPage.toString());\n return;\n }\n\n const clampedValue = Math.max(1, Math.min(numValue, totalPages));\n\n setInputValue(clampedValue.toString());\n handlePageSelection(clampedValue);\n };\n\n const handlePageInputBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n validateAndUpdatePage(e.target.value);\n };\n\n const handlePageInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n validateAndUpdatePage(e.currentTarget.value);\n e.currentTarget.blur();\n }\n };\n\n const handlePageInputChange = (value: string) => {\n setInputValue(value);\n };\n\n return (\n <div className=\"maxio-pagination\" data-testid={testId}>\n <div className=\"maxio-pagination__items-per-page\">\n <label\n htmlFor=\"items-per-page-large\"\n className=\"maxio-pagination__label\"\n >\n Items per page\n </label>\n <Select\n inline\n size={size}\n options={itemsPerPageDropdown}\n onChange={(e) => handleItemsPerPage(Number(e.target.value))}\n value={itemsPerPage}\n id=\"items-per-page-large\"\n />\n </div>\n <div className=\"maxio-pagination__total-items\">\n <span>\n {firstItem}–{lastItem} of {totalItems} items\n </span>\n </div>\n <div className=\"maxio-pagination__current-page\">\n {manualPageInput ? (\n <TextInput\n className=\"maxio-pagination__page-input\"\n value={inputValue}\n min={1}\n max={totalPages}\n onChange={(value) => handlePageInputChange(value)}\n onBlur={handlePageInputBlur}\n onKeyDown={handlePageInputKeyDown}\n aria-label=\"Page number\"\n size={size}\n type=\"number\"\n onWheel={(e) => e.preventDefault()}\n />\n ) : (\n <Select\n inline\n size={size}\n aria-label=\"Select page\"\n onChange={(e) => handlePageSelection(Number(e.target.value))}\n value={currentPage}\n options={totalPagesDropdown}\n id=\"page-index-large\"\n />\n )}\n <div className=\"maxio-pagination__label\">of {totalPages} pages</div>\n </div>\n <div className=\"maxio-pagination__controls\">\n <TooltipTrigger\n onVisibilityUpdate={() => {}}\n renderContent={() => 'Previous'}\n floatingElementOffset={9}\n placement=\"top\"\n size=\"small\"\n >\n <IconButton\n icon={<Icon variant=\"chevron-left\" />}\n size={size}\n variant=\"ghost\"\n onClick={() => handlePageSelection(currentPage - 1)}\n aria-label=\"Previous\"\n disabled={!hasPrevious}\n data-testid={childTestId(testId, 'prev')}\n />\n </TooltipTrigger>\n <TooltipTrigger\n onVisibilityUpdate={() => {}}\n renderContent={() => 'Next'}\n floatingElementOffset={9}\n placement=\"top\"\n size=\"small\"\n >\n <IconButton\n icon={<Icon variant=\"chevron-right\" />}\n size={size}\n variant=\"ghost\"\n onClick={() => handlePageSelection(currentPage + 1)}\n aria-label=\"Next\"\n disabled={!hasNext}\n data-testid={childTestId(testId, 'next')}\n />\n </TooltipTrigger>\n </div>\n </div>\n );\n};\n\nexport default Pagination;\n","export const DEFAULT_ITEMS_PER_PAGE = 30;\n","import React from 'react';\nimport cx from 'classnames';\nimport { useId, useProgressBar } from 'react-aria';\nimport type { TestIdProps } from '../../utils/testId';\n\nexport interface ProgressBarProps extends TestIdProps {\n /**\n * Label for the progress bar\n */\n label: string;\n /**\n * Helper text for the progress bar\n */\n helperText?: string;\n /**\n * Defines the size of the progress bar\n */\n size?: 'md' | 'lg';\n /**\n * Defines the status of the progress bar\n */\n status?: 'success' | 'error';\n /**\n * Defines the position applied to the label and helper text\n */\n variant?: 'default' | 'inline' | 'indent';\n /**\n * Defines the current value of the progress bar.\n * If `undefined` the progress bar will be indeterminate.\n */\n value?: number;\n /**\n * Defines the maximum value of the progress bar\n */\n maxValue?: number;\n}\n\nconst ProgressBar = ({\n label,\n helperText,\n size = 'md',\n variant = 'default',\n status,\n value,\n maxValue = 100,\n 'data-testid': testId,\n}: ProgressBarProps) => {\n const labelId = useId();\n const helperTextId = useId();\n const showIcon = status && !!label && !!value && !(variant === 'inline');\n const showHelperText = helperText && !(variant === 'inline');\n const showInlineHelperText = helperText && variant === 'inline';\n\n const { progressBarProps, labelProps } = useProgressBar({\n maxValue,\n value,\n label,\n });\n\n const conatinerClass = cx('maxio-progress-bar', {\n 'maxio-progress-bar--lg': size === 'lg',\n 'maxio-progress-bar--success':\n value && !(variant === 'inline') && status === 'success',\n 'maxio-progress-bar--error':\n value && !(variant === 'inline') && status === 'error',\n 'maxio-progress-bar--indent': variant === 'indent',\n 'maxio-progress-bar--inline': variant === 'inline',\n 'maxio-progress-bar--indeterminate': value === undefined,\n });\n\n return (\n <div className={conatinerClass} {...progressBarProps} data-testid={testId}>\n <div id={labelId} className=\"maxio-progress-bar__label\" {...labelProps}>\n {label}\n </div>\n {showInlineHelperText && (\n <div id={helperTextId} className=\"maxio-progress-bar__helper-text\">\n {helperText}\n </div>\n )}\n <div className=\"maxio-progress-bar__track\">\n <div\n className=\"maxio-progress-bar__progress\"\n style={{ '--tw-scale-x': `${value}%` } as React.CSSProperties}\n />\n </div>\n {showIcon && <div className={`maxio-progress-bar__${status}-icon`} />}\n {showHelperText && (\n <div id={helperTextId} className=\"maxio-progress-bar__helper-text\">\n {helperText}\n </div>\n )}\n </div>\n );\n};\n\nexport default ProgressBar;\n","import React, { useRef } from 'react';\nimport cx from 'classnames';\nimport { useRadio } from 'react-aria';\nimport { useRadioState } from './contexts';\n\ninterface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {\n /**\n * Label for the radio\n */\n label: string;\n /**\n * Indent the radio\n */\n indent?: boolean;\n /**\n * Disable the radio\n */\n disabled?: boolean;\n /**\n * Invalid state of the radio\n */\n invalid?: boolean;\n}\n\nconst Radio = ({\n indent = false,\n disabled = false,\n invalid = false,\n label,\n ...props\n}: RadioProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const state = useRadioState();\n\n const { inputProps, isDisabled } = useRadio(\n {\n ...props,\n value: (props.value || '').toString(),\n 'aria-label': props['aria-label'] || label,\n isDisabled: disabled,\n },\n state,\n inputRef\n );\n\n const labelClass = cx('maxio-radio', {\n 'maxio-radio--indent': indent,\n 'maxio-radio--disabled': isDisabled || state.isDisabled,\n 'maxio-radio--error': invalid || state.isInvalid,\n });\n\n return (\n <label className={labelClass}>\n <input\n ref={inputRef}\n role=\"radio\"\n type=\"radio\"\n className=\"maxio-radio__input\"\n {...inputProps}\n name={state.name || inputProps.name}\n />\n <span className=\"maxio-radio__control\" />\n <span className=\"maxio-radio__label\">{label}</span>\n </label>\n );\n};\n\nexport default Radio;\n","import React from 'react';\nimport { useRadioGroup, AriaRadioGroupProps } from 'react-aria';\nimport FormErrorMessage from '../FormErrorMessage';\nimport FormHelperText from '../FormHelperText';\nimport { useRadioGroupState } from '@react-stately/radio';\nimport { RadioContext } from './contexts';\n\ntype RadioGroupProps = Pick<\n AriaRadioGroupProps,\n | 'aria-describedby'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-label'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onFocus'\n | 'onChange'\n | 'onFocusChange'\n | 'value'\n | 'defaultValue'\n> & {\n /**\n * Label for the radio group\n */\n label?: string;\n /**\n * Name for the radio group\n */\n name: string;\n /**\n * Error message for the radio group\n */\n errorMessage?: string;\n /**\n * Helper text for the radio group\n */\n helperText?: string;\n /**\n * Children of the radio group\n */\n children: React.ReactNode;\n /**\n * Disable the radio group\n */\n disabled?: boolean;\n /**\n * Invalid state of the radio group\n */\n invalid?: boolean;\n /**\n * Default value for the radio group\n */\n defaultValue?: string;\n};\n\nconst RadioGroup = ({\n children,\n label,\n errorMessage,\n helperText,\n disabled = false,\n invalid = false,\n name,\n defaultValue,\n ...props\n}: RadioGroupProps) => {\n const state = useRadioGroupState({\n isDisabled: disabled,\n isInvalid: invalid,\n description: helperText,\n name,\n label,\n errorMessage,\n defaultValue,\n ...props,\n });\n const { radioGroupProps, labelProps, descriptionProps, errorMessageProps } =\n useRadioGroup(\n { 'aria-label': props['aria-label'] || label, ...props },\n state\n );\n\n return (\n <>\n <div className=\"maxio-radio-group\" {...radioGroupProps}>\n {label && (\n <label className=\"maxio-radio-group__label\" {...labelProps}>\n {label}\n </label>\n )}\n <RadioContext.Provider value={state}>{children}</RadioContext.Provider>\n {invalid && errorMessage && (\n <FormErrorMessage {...errorMessageProps}>\n {errorMessage}\n </FormErrorMessage>\n )}\n {helperText && !invalid && (\n <FormHelperText {...descriptionProps}>{helperText}</FormHelperText>\n )}\n </div>\n </>\n );\n};\n\nexport default RadioGroup;\n","import React, {\n Children,\n ReactElement,\n ReactNode,\n cloneElement,\n isValidElement,\n useContext,\n useId,\n useState,\n} from 'react';\nimport cx from 'classnames';\nimport {\n Button,\n Menu,\n MenuItem,\n MenuTrigger,\n TabList as AriaTabList,\n TabListStateContext,\n} from 'react-aria-components';\nimport Tab from '../Tab';\nimport type { TabProps } from '../Tab/types';\nimport { useTabs } from '../contexts';\nimport { useTabOverflow } from './useTabOverflow';\nimport Icon from '../../Icon';\nimport { Popover } from '../../Popover';\n\nconst escapeCssIdentifier = (value: string) => {\n if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') {\n return CSS.escape(value);\n }\n\n return value.replace(/[^a-zA-Z0-9_-]/g, '\\\\$&');\n};\n\ninterface TabListProps extends React.HtmlHTMLAttributes<HTMLDivElement> {\n ariaLabel: string;\n children: ReactNode;\n /**\n * When set to `auto`, tabs that don't fit the available width collapse\n * into a \"More\" menu instead of overflowing/wrapping.\n * @default 'none'\n */\n overflow?: 'auto' | 'none';\n /**\n * Accessible label for the \"More\" menu trigger when `overflow=\"auto\"`.\n * @default 'More'\n */\n moreLabel?: string;\n}\n\nconst TabList = ({\n children,\n className,\n ariaLabel,\n overflow = 'none',\n moreLabel = 'More',\n ...props\n}: TabListProps) => {\n const { variant, withDivider } = useTabs();\n const state = useContext(TabListStateContext);\n const listId = useId();\n const [isMoreOpen, setIsMoreOpen] = useState(false);\n\n const tabsClass = cx('maxio-tabs', className, {\n 'maxio-tabs--contained': variant === 'contained',\n 'maxio-tabs--divider': withDivider,\n });\n\n const childrenArray = Children.map(children, (child) => child) as\n ReactElement<TabProps>[] | undefined;\n\n (childrenArray ?? []).forEach((child) => {\n if (!isValidElement(child) || child.type !== Tab) {\n throw new Error('You can only pass <Tab /> component as children');\n }\n });\n\n const overflowEnabled = overflow === 'auto' && !!childrenArray?.length;\n\n const { ref, moreButtonRef, overflowIndexes, handleKeyDownCapture } =\n useTabOverflow({ overflowEnabled, childrenArray });\n\n const moreTriggerContent = (\n <span className=\"maxio-tabs__tab-content\">\n {moreLabel}\n <Icon variant=\"chevron-down\" className=\"maxio-tabs__more__chevron\" />\n </span>\n );\n\n const hiddenTabSelectors = overflowIndexes.map(\n (idx) =>\n `#${escapeCssIdentifier(listId)} [role=\"tablist\"] > .maxio-tabs__tab:nth-child(${idx + 1})`\n );\n\n return (\n <div\n id={listId}\n className={tabsClass}\n ref={ref}\n onKeyDownCapture={handleKeyDownCapture}\n >\n {/* Visibility for overflowed tabs is driven by this position-based CSS\n rule instead of a `hidden`/style prop on each <Tab>: react-aria-\n components' Tabs collection captures each item's props once and\n reuses that snapshot on later re-renders, so a prop injected via\n cloneElement here would never reflect a later overflow\n recalculation. `id` is set on this plain div (not `<AriaTabList>`,\n which silently namespaces/rewrites any `id` prop it's given), and\n this div re-renders normally on every recalculation. */}\n {hiddenTabSelectors.length > 0 && (\n <style>{`${hiddenTabSelectors.join(', ')} { display: none; }`}</style>\n )}\n {/* `maxio-contents` keeps this element out of the flex layout so\n `.maxio-tabs__tab` elements stay direct flex children of the\n `.maxio-tabs` container above, while still giving react-aria a\n real tablist element to manage roving tabindex/keyboard nav on. */}\n <AriaTabList aria-label={ariaLabel} className=\"maxio-contents\" {...props}>\n {(childrenArray ?? []).map((child, idx) =>\n cloneElement(child, { key: idx, value: idx })\n )}\n </AriaTabList>\n {overflowEnabled && overflowIndexes.length > 0 && (\n <MenuTrigger isOpen={isMoreOpen} onOpenChange={setIsMoreOpen}>\n <Button\n ref={moreButtonRef}\n className=\"maxio-tabs__tab maxio-tabs__more__trigger\"\n aria-label={moreLabel}\n >\n {moreTriggerContent}\n </Button>\n {isMoreOpen && (\n <Popover\n hideArrow\n placement=\"bottom end\"\n className=\"maxio-tabs__more__menu\"\n >\n <Menu\n aria-label={`${moreLabel} tabs`}\n onAction={(key) => {\n state?.setSelectedKey(key);\n // The selected tab is promoted out of the overflow menu and\n // into the visible row (see `calculateOverflow`'s\n // `currentIndex` handling), so focus should land on it there\n // instead of MenuTrigger's default of returning focus to the\n // \"More\" button.\n requestAnimationFrame(() => {\n ref.current\n ?.querySelector<HTMLElement>(\n `[role=\"tab\"][data-key=\"${key}\"]`\n )\n ?.focus();\n });\n }}\n >\n {overflowIndexes.map((idx) => {\n const child = (childrenArray as ReactElement<TabProps>[])[\n idx\n ];\n const {\n disabled,\n type,\n 'aria-label': ariaLabelProp,\n 'aria-labelledby': ariaLabelledByProp,\n } = child.props;\n const content =\n type === 'icon' ? child.props.icon : child.props.children;\n return (\n <MenuItem\n key={idx}\n id={idx}\n isDisabled={!!disabled}\n aria-label={ariaLabelProp}\n aria-labelledby={ariaLabelledByProp}\n className=\"maxio-tabs__more__item\"\n >\n {content}\n </MenuItem>\n );\n })}\n </Menu>\n </Popover>\n )}\n </MenuTrigger>\n )}\n </div>\n );\n};\n\nexport default TabList;\n","import {\n KeyboardEvent,\n ReactElement,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { TabListStateContext } from 'react-aria-components';\nimport type { TabProps } from '../Tab/types';\nimport { useElementResizeObserver } from '../../../hooks';\nimport { calculateOverflow, promoteIntoVisible } from './utils';\n\ninterface UseTabOverflowParams {\n overflowEnabled: boolean;\n childrenArray: ReactElement<TabProps>[] | undefined;\n}\n\nexport const getNavigableVisibleIndexes = (\n visibleIndexes: number[],\n childrenArray: ReactElement<TabProps>[] | undefined\n) => visibleIndexes.filter((idx) => !childrenArray?.[idx]?.props.disabled);\n\nexport const useTabOverflow = ({\n overflowEnabled,\n childrenArray,\n}: UseTabOverflowParams) => {\n const ref = useRef<HTMLDivElement>(null);\n const moreButtonRef = useRef<HTMLButtonElement>(null);\n const promotedIndexRef = useRef<number | null>(null);\n const [measurements, setMeasurements] = useState<{\n tabWidths: number[];\n moreButtonWidth: number;\n } | null>(null);\n\n const containerWidth = useElementResizeObserver(ref);\n const state = useContext(TabListStateContext);\n const currentIndex =\n state?.selectedKey != null ? Number(state.selectedKey) : null;\n\n const [visibleIndexes, setVisibleIndexes] = useState<number[]>([]);\n\n // Recompute the packing from scratch whenever the available space or the\n // tab widths change (resize, tabs added/removed) — this is the only case\n // where fully redoing the layout makes sense, since the previous manual\n // promotions below may no longer even apply.\n useLayoutEffect(() => {\n if (!overflowEnabled || !measurements) {\n setVisibleIndexes((childrenArray ?? []).map((_, idx) => idx));\n return;\n }\n\n const { visibleIndexes: recalculated } = calculateOverflow(\n measurements.tabWidths,\n containerWidth,\n measurements.moreButtonWidth,\n promotedIndexRef.current ?? currentIndex\n );\n if (recalculated.length === (childrenArray ?? []).length) {\n promotedIndexRef.current = null;\n }\n setVisibleIndexes(recalculated);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [overflowEnabled, measurements, containerWidth]);\n\n // Between resizes, keep whatever's already visible in view. Only promote\n // the newly active tab if it isn't part of that set yet, instead of\n // recalculating the \"natural\" packing from scratch — otherwise a tab the\n // user just navigated to out of the \"More\" menu would get silently\n // demoted back into it the moment selection moves to a tab that happened\n // to fit from the start.\n useLayoutEffect(() => {\n if (!overflowEnabled || !measurements || currentIndex === null) {\n return;\n }\n\n setVisibleIndexes((prev) => {\n if (!prev.includes(currentIndex)) {\n promotedIndexRef.current = currentIndex;\n }\n\n return promoteIntoVisible(\n prev,\n measurements.tabWidths,\n containerWidth,\n measurements.moreButtonWidth,\n currentIndex\n );\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentIndex]);\n\n const overflowIndexes = overflowEnabled\n ? (childrenArray ?? [])\n .map((_, idx) => idx)\n .filter((idx) => !visibleIndexes.includes(idx))\n : [];\n const navigableVisibleIndexes = getNavigableVisibleIndexes(\n visibleIndexes,\n childrenArray\n );\n\n useLayoutEffect(() => {\n if (!overflowEnabled || !ref.current) {\n setMeasurements((prev) => (prev === null ? prev : null));\n return;\n }\n\n const tabElements = Array.from(\n ref.current.querySelectorAll<HTMLElement>('[role=\"tab\"]')\n );\n const measuredMoreButtonWidth =\n moreButtonRef.current?.getBoundingClientRect().width ?? 0;\n\n setMeasurements((prev) => {\n const tabWidths = (childrenArray ?? []).map((_, idx) => {\n const measuredWidth =\n tabElements[idx]?.getBoundingClientRect().width ?? 0;\n return measuredWidth > 0 ? measuredWidth : (prev?.tabWidths[idx] ?? 0);\n });\n const moreButtonWidth =\n measuredMoreButtonWidth > 0\n ? measuredMoreButtonWidth\n : (prev?.moreButtonWidth ?? 0);\n\n const widthsUnchanged =\n prev?.tabWidths.length === tabWidths.length &&\n prev.tabWidths.every((width, idx) => width === tabWidths[idx]);\n if (prev && widthsUnchanged && prev.moreButtonWidth === moreButtonWidth) {\n return prev;\n }\n\n return { tabWidths, moreButtonWidth };\n });\n }, [childrenArray, overflowEnabled]);\n\n const focusTabAt = (idx: number) => {\n if (idx === undefined) {\n return;\n }\n\n state?.selectionManager.setFocused(true);\n state?.selectionManager.setFocusedKey(idx);\n state?.setSelectedKey(idx);\n\n ref.current\n ?.querySelector<HTMLElement>(`[role=\"tab\"][data-key=\"${idx}\"]`)\n ?.focus();\n };\n\n // Overflowed tabs stay mounted (hidden via the CSS rule in TabList) so\n // their widths remain stable to measure. That means react-aria's own\n // ArrowLeft/Right/Home/End handling — which walks its Tab collection by\n // key order, oblivious to our CSS-driven hiding — would happily move\n // focus (and, since activation is automatic, selection) onto a tab the\n // user can't see. Marking overflowed tabs `isDisabled` to make react-aria\n // skip them itself isn't an option either: react-aria-components' Tabs\n // collection snapshots each item's props once and never re-reads them, so\n // a tab promoted out of overflow later would be stuck disabled. So we\n // take over navigation entirely whenever there's anything hidden to skip,\n // restricting movement to `visibleIndexes` and the \"More\" button.\n const handleKeyDownCapture = (e: KeyboardEvent<HTMLDivElement>) => {\n if (overflowIndexes.length === 0) {\n return;\n }\n\n const isOnMoreButton = document.activeElement === moreButtonRef.current;\n const focusedKey = state?.selectionManager.focusedKey;\n const visiblePos = isOnMoreButton\n ? -1\n : navigableVisibleIndexes.indexOf(Number(focusedKey));\n\n if (!isOnMoreButton && visiblePos === -1) {\n return;\n }\n\n switch (e.key) {\n case 'ArrowRight':\n if (isOnMoreButton) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n if (visiblePos < navigableVisibleIndexes.length - 1) {\n focusTabAt(navigableVisibleIndexes[visiblePos + 1]);\n } else {\n moreButtonRef.current?.focus();\n }\n return;\n\n case 'ArrowLeft':\n e.preventDefault();\n e.stopPropagation();\n if (isOnMoreButton) {\n focusTabAt(\n navigableVisibleIndexes[navigableVisibleIndexes.length - 1]\n );\n } else if (visiblePos > 0) {\n focusTabAt(navigableVisibleIndexes[visiblePos - 1]);\n }\n return;\n\n case 'Home':\n if (isOnMoreButton) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n focusTabAt(navigableVisibleIndexes[0]);\n return;\n\n case 'End':\n if (isOnMoreButton) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n focusTabAt(navigableVisibleIndexes[navigableVisibleIndexes.length - 1]);\n return;\n\n default:\n }\n };\n\n return {\n ref,\n moreButtonRef,\n visibleIndexes,\n overflowIndexes,\n handleKeyDownCapture,\n };\n};\n","export interface OverflowResult {\n visibleIndexes: number[];\n overflowIndexes: number[];\n}\n\nexport const calculateOverflow = (\n tabWidths: number[],\n containerWidth: number,\n moreButtonWidth: number,\n currentIndex: number | null\n): OverflowResult => {\n const allIndexes = tabWidths.map((_, idx) => idx);\n const totalWidth = tabWidths.reduce((sum, width) => sum + width, 0);\n\n if (totalWidth <= containerWidth) {\n return { visibleIndexes: allIndexes, overflowIndexes: [] };\n }\n\n const visibleIndexes: number[] = [];\n let usedWidth = moreButtonWidth;\n\n for (const idx of allIndexes) {\n if (usedWidth + tabWidths[idx] > containerWidth) {\n break;\n }\n usedWidth += tabWidths[idx];\n visibleIndexes.push(idx);\n }\n\n if (currentIndex !== null && !visibleIndexes.includes(currentIndex)) {\n usedWidth += tabWidths[currentIndex];\n while (usedWidth > containerWidth && visibleIndexes.length > 0) {\n const demotedIdx = visibleIndexes.pop() as number;\n usedWidth -= tabWidths[demotedIdx];\n }\n visibleIndexes.push(currentIndex);\n }\n\n visibleIndexes.sort((a, b) => a - b);\n const overflowIndexes = allIndexes.filter(\n (idx) => !visibleIndexes.includes(idx)\n );\n\n return { visibleIndexes, overflowIndexes };\n};\n\n/**\n * Adds `currentIndex` to an already-visible set of tabs, demoting the\n * fewest tabs necessary (starting from the one furthest along, i.e.\n * closest to the \"More\" button) to make it fit. Unlike `calculateOverflow`,\n * this doesn't recompute the natural packing from scratch, so any tab the\n * user previously navigated to stays visible instead of being displaced the\n * moment selection moves to a tab that was visible all along.\n */\nexport const promoteIntoVisible = (\n visibleIndexes: number[],\n tabWidths: number[],\n containerWidth: number,\n moreButtonWidth: number,\n currentIndex: number\n): number[] => {\n if (visibleIndexes.includes(currentIndex)) {\n return visibleIndexes;\n }\n\n const promoted = [...visibleIndexes, currentIndex].sort((a, b) => a - b);\n let usedWidth =\n moreButtonWidth + promoted.reduce((sum, idx) => sum + tabWidths[idx], 0);\n\n while (usedWidth > containerWidth && promoted.length > 1) {\n const lastPos = promoted.length - 1;\n const demotedAt =\n promoted[lastPos] === currentIndex ? lastPos - 1 : lastPos;\n const [demotedIdx] = promoted.splice(demotedAt, 1);\n usedWidth -= tabWidths[demotedIdx];\n }\n\n return promoted;\n};\n","import React, {\n Children,\n ReactElement,\n cloneElement,\n isValidElement,\n} from 'react';\nimport { TabPanels as AriaTabPanels } from 'react-aria-components';\nimport TabPanel, { TabPanelProps } from '../TabPanel/TabPanel';\n\ninterface TabPanelsProps {\n children: React.ReactNode;\n}\n\nconst TabPanels = ({ children }: TabPanelsProps) => {\n const childrenArray = Children.map(children, (child, idx) => {\n if (!isValidElement(child) || child.type !== TabPanel) {\n throw new Error('You can only pass <TabPanel /> component as children');\n }\n return cloneElement(child as ReactElement<TabPanelProps>, {\n key: idx,\n value: idx,\n });\n });\n\n return (\n <AriaTabPanels className=\"maxio-tabs__panels\">\n {childrenArray}\n </AriaTabPanels>\n );\n};\n\nexport default TabPanels;\n","import React from 'react';\nimport { Tabs as AriaTabs } from 'react-aria-components';\nimport { TabsProvider } from '../contexts/TabsContext';\nimport type { TabsProviderProps } from '../contexts/types';\n\ntype TabsProps = TabsProviderProps;\n\nconst Tabs = ({\n children,\n variant = 'line',\n withDivider = false,\n defaultIndex = 0,\n index,\n onChange,\n 'data-testid': testId,\n}: TabsProps) => {\n return (\n <AriaTabs\n className=\"maxio-tabs-container\"\n selectedKey={index}\n defaultSelectedKey={defaultIndex}\n onSelectionChange={(key) => onChange?.(Number(key))}\n data-testid={testId}\n >\n <TabsProvider variant={variant} withDivider={withDivider}>\n {children}\n </TabsProvider>\n </AriaTabs>\n );\n};\n\nexport default Tabs;\n","import React from 'react';\nimport cx from 'classnames';\nimport { TagProps } from './Tag.types';\nimport Icon from '../Icon';\n\nconst Tag = ({\n children,\n size,\n sentiment,\n kind = 'primary',\n leadingIcon,\n trailingIcon,\n 'data-testid': testId,\n}: TagProps) => {\n const tagClasses = cx(\n 'maxio-tag',\n `maxio-tag--${kind}`,\n !!sentiment && `maxio-tag--${sentiment}`,\n !!size && `maxio-tag--${size}`\n );\n\n return (\n <div className={tagClasses} data-testid={testId}>\n {leadingIcon && (\n <Icon variant={leadingIcon} className=\"maxio-tag__icon\" />\n )}\n <span className=\"maxio-tag__label\">{children}</span>\n {trailingIcon && (\n <Icon variant={trailingIcon} className=\"maxio-tag__icon\" />\n )}\n </div>\n );\n};\n\nexport default Tag;\n","import React, { MouseEventHandler } from 'react';\nimport cx from 'classnames';\nimport type { TestIdProps } from '../../utils/testId';\n\ntype TileProps = {\n disabled?: boolean;\n href?: string;\n target?: 'string';\n onClick?: () => void;\n} & React.HTMLAttributes<HTMLDivElement> &\n TestIdProps;\n\nconst Tile = ({\n children,\n className,\n href,\n onClick,\n target,\n disabled,\n 'data-testid': testId,\n}: TileProps) => {\n const isClickable = href || onClick;\n\n if (!isClickable) {\n return (\n <div className=\"maxio-tile\" data-testid={testId}>\n {children}\n </div>\n );\n }\n\n const handleClick: MouseEventHandler<HTMLAnchorElement> = (e) => {\n if (disabled && href) {\n e.preventDefault();\n }\n\n if (!disabled && onClick) {\n onClick();\n }\n };\n\n const tileClasses = cx('maxio-tile', className, {\n 'maxio-tile--clickable': isClickable,\n 'maxio-tile--disabled': disabled,\n });\n\n return (\n <a\n className={tileClasses}\n href={href}\n target={target}\n onClick={handleClick}\n data-testid={testId}\n >\n {children}\n </a>\n );\n};\n\nexport default Tile;\n","import React from 'react';\nimport { useToastState } from '@react-stately/toast';\nimport { ToastProviderProps } from './ToastProvider.types';\nimport { ToastContent } from '../Toast/Toast.types';\nimport ToastRegion from '../ToastRegion';\n\n// Legacy ToastProvider (will be deprecated)\nconst ToastProvider = ({ children, ...props }: ToastProviderProps) => {\n const { maxVisibleToasts = 5, ...rest } = props;\n\n const state = useToastState<ToastContent>({\n maxVisibleToasts,\n ...rest,\n });\n\n React.useEffect(() => {\n console.warn(\n 'ToastProvider is deprecated. Please use the global toast API instead.'\n );\n }, []);\n\n return (\n <>\n {children(state)}\n {state.visibleToasts.length > 0 && (\n <ToastRegion {...props} state={state} />\n )}\n </>\n );\n};\n\nexport default ToastProvider;\n","import React from 'react';\nimport { TopBarProps } from './types';\nimport { Flex } from '../Flex';\nimport { IconButton } from '../Buttons';\nimport Icon from '../Icon';\n\nexport const TopBar = ({\n children,\n actions,\n sideNavIsClosed,\n openSideNav,\n 'data-testid': testId,\n}: TopBarProps) => {\n return (\n <nav className=\"maxio-top-bar\" data-testid={testId}>\n {sideNavIsClosed && (\n <IconButton\n aria-label=\"Open Side Navigation\"\n variant=\"ghost\"\n icon={<Icon variant=\"sidebar\" />}\n onClick={openSideNav}\n />\n )}\n <Flex grow justifyContent=\"end\">\n {children}\n </Flex>\n {actions}\n </nav>\n );\n};\nexport default TopBar;\n"],"names":["ICONS","BRAND_ICONS","BRAND_ICONS_DUOTONE","Icon","variant","color","className","size","testId","isInList","list","includes","isInKit","duotoneIcon","iconClass","cx","React","createElement","ActionItem","item","isSelected","truncateLabel","role","small","ref","useRef","isMounted","id","useId","useEffect","current","focus","type","leadingIconName","leadingIconClassName","trailingIconName","label","description","link","labelClass","_extends","tabIndex","findPrevIdx","idx","items","originalIdx","ActionList","isShadowed","itemProps","truncateLabels","props","listClass","selectedIdx","setSelectedIdx","useState","findIndex","length","onKeyDown","e","code","currentItem","window","open","href","target","preventDefault","prev","findNextIdx","nextIdx","itemIdx","map","key","Link","children","disabled","external","icon","underline","rest","classNames","LoadingSpinner","white","loadingSpinnerClasses","InternalLink","forwardRef","fullWidth","leadingElement","trailingElement","forwardedRef","useObjectRef","linkProps","useLink","buttonClasses","cloneElement","isValidElement","InternalButton","loading","buttonProps","useButton","isDisabled","formAction","undefined","isLoadingSpinnerWhite","Button","isLinkProps","IconButton","ariaLabel","childTestId","base","parts","join","Alert","title","linkText","linkExternal","display","sentiment","onDismiss","console","warn","alertClasses","success","warning","danger","info","contentWrapper","onClick","MenuContext","createContext","MenuProvider","isOpen","setIsOpen","controlsId","buttonId","Provider","value","onClose","onOpen","onToggle","useMenu","context","useContext","Object","keys","Error","MenuWrapper","BreadcrumbsItem","content","ERROR_MESSAGES","Tooltip","arrowPosition","maxWidth","style","INTERACTIONS_HANDLERS","click","useClick","hover","useHover","delay","useFocus","dismiss","useDismiss","composeInteractions","interactions","interaction","useOverlayTrigger","placement","isActive","floatingElementOffset","onOverlayUpdate","autoHideMs","strategy","positionStrategy","shiftIntoView","hideTrigger","openCycle","setOpenCycle","wasActive","setWasActive","cycle","x","y","floating","reference","refs","floatingRefs","middlewareData","useFloating","onOpenChange","middleware","offset","shift","padding","limiter","limitShift","hide","name","options","fn","data","whileElementsMounted","autoUpdate","getReferenceProps","getFloatingProps","useInteractions","useRole","clearTimeout","setTimeout","hasCurrentCycleData","isReferenceHidden","referenceHidden","isPositionPending","floatingElementCSSPosition","position","top","left","visibility","floatingElement","mouseLeaveDelay","mouseEnterTime","Date","getTime","mouseLeaveTime","isHovered","setIsHovered","handleMouseEnter","handleMouseLeave","addEventListener","removeEventListener","useWindowSize","debounce","windowSize","setWindowSize","windowWitdh","windowHeight","innerWidth","innerHeight","timeout","handleResize","useElementResizeObserver","width","setWidth","clientWidth","onResize","next","useLayoutEffect","useResizeObserver","PORTAL_ID","portalListeners","Set","portalObserver","isRelevantChange","record","Array","from","removedNodes","some","node","classList","contains","OverlayTrigger","usePortal","renderOverlay","motionSettings","floatingElementRef","trigger","setTrigger","setReference","useCallback","focusBeforeOpen","document","activeElement","overlay","opener","querySelectorAll","candidate","preventScroll","portalRevision","refreshPortal","useReducer","count","listener","add","MutationObserver","records","forEach","notify","observe","documentElement","attributes","attributeFilter","subtree","body","childList","delete","disconnect","portalContainer","setPortalContainer","isPortalContainerConnected","isConnected","container","dialog","closest","sharedNode","getElementById","appendChild","portalContainerFor","portalThemeMode","getAttribute","AnimatePresence","onExitComplete","motion","div","zIndex","inert","Fragment","FloatingPortal","root","ARROW_DIRECTION_LOOKUP","right","bottom","TooltipTrigger","renderContent","isVisible","onVisibilityUpdate","setActive","useExternalState","debounceTimeoutRef","updateTooltipVisibility","tooltipMotion","useMemo","axisLetter","startsWith","transformStart","initial","opacity","transform","animate","exit","transition","ease","duration","createTooltipAnimation","SUBTLE_CLASS","XS_CLASS","FEEDBACK_ICON","idle","copied","error","ROW_CONTROLS_ID","ROW_ACTIONS_ID","Table","pattern","isExpandable","isUsingCustomRow","showLeftShadow","setShowLeftShadow","showRightShadow","setShowRightShadow","customPattern","tableClasses","onScroll","scrollLeft","scrollWidth","TableHead","TableBody","HeaderCell","table","header","enableExpanding","column","columnCanSort","getCanSort","toggleSortingHandler","getToggleSortingHandler","isPlaceholder","align","columnDef","meta","controls","actions","columnPinned","getIsPinned","isColumnSorted","getIsSorted","isSortedAsc","headerCellClasses","getStart","getAfter","sortingIcon","getSortingIcon","isSorted","toggleExpandedHandler","getToggleAllRowsExpandedHandler","isAllExpanded","getIsAllRowsExpanded","expandColumnIndex","headerGroup","headers","isExpandColumn","index","scope","colSpan","getSubRows","subRows","withSubRows","assign","findPath","parentPath","path","childPath","removeAtPath","splice","childResult","insertAtPath","parentIndex","parent","getItemAtPath","currentItems","ROW_DRAG_TYPE","RowReorderContext","useRowReorderContext","isDragData","instanceId","rowId","getTargetFromData","instruction","extractInstruction","instructionToPosition","RowReorderProvider","availability","getRowReorderLabel","onRowReorder","rowReorderMode","announcement","setAnnouncement","activeTarget","setActiveTarget","draggingRowId","setDraggingRowId","activeTargetRef","getRow","getCoreRowModel","rowsById","getLabel","row","getMove","sourceRowId","targetRow","result","reorderTree","mode","isRowReorderAllowed","parentId","depth","sourcePath","original","targetPath","child","every","segment","isPathPrefix","removal","adjustedTargetPath","adjustPathAfterRemoval","adjusted","sourceIndexDepth","slice","targetIndex","targetItem","destinationIndex","destination","parentRowId","source","reordered","updateActiveTarget","commitMove","targetRowId","destinationDescription","getDropData","input","element","baseData","dataWithInstruction","attachInstruction","currentLevel","indentPerLevel","isValid","Boolean","registerRow","available","setTargetFromPayload","dropTargetForElements","canDrop","getParentRows","getData","args","onDragEnter","self","onDrag","onDragLeave","registerHandle","rowElement","HTMLElement","draggable","dragHandle","getInitialData","onGenerateDragPreview","nativeSetDragImage","setCustomNativeDragPreview","render","preview","textContent","setAttribute","append","remove","monitorForElements","canMonitor","onDragStart","onDrop","location","targetData","dropTargets","getCanExpand","getIsExpanded","toggleExpanded","getActions","siblings","rows","sibling","previousSibling","nextSibling","firstSibling","lastSibling","candidates","push","rootAncestor","nextAncestor","flatRows","filter","action","hasActions","moveRow","TableRow","isChild","isHeader","onRowAction","getIsSelected","isExpanded","isActionable","rowRef","reorderContext","originalTargetRef","captureOriginalTarget","event","pressProps","usePress","onPress","Element","isInteractiveTarget","focusProps","isFocused","useFocusRing","tableRowClasses","rowProps","mergeProps","onClickCapture","onKeyDownCapture","CheckboxGroupContext","InnerCheckbox","checked","invalid","indeterminate","inputProps","containerClassNames","displayName","Checkbox","readOnly","defaultChecked","state","isInvalid","useCheckboxGroupItem","isIndeterminate","isReadOnly","useCheckbox","useToggleState","defaultSelected","FormHelperText","FormErrorMessage","HeaderControls","enableRowSelection","enableRowReordering","toggleSelectAll","getToggleAllPageRowsSelectedHandler","isAllPageRowsSelected","getIsAllPageRowsSelected","getIsAllRowsSelected","isSomePageRowsSelected","getIsSomePageRowsSelected","onChange","Popover","hideArrow","AriaPopover","OverlayArrow","height","viewBox","d","RowReorderHandle","isMenuOpen","setIsMenuOpen","isDragging","hasAvailableActions","unavailableMessage","message","handle","closeDelay","MenuTrigger","Menu","autoFocus","onAction","find","requestAnimationFrame","MenuItem","textValue","RowControls","toggleSelectHandler","getToggleSelectedHandler","getIsAllSubRowsSelected","isSomeSubRowsSelected","getIsSomeSelected","RowActions","TableCell","cell","cellClasses","pinnedStyle","RowRenderer","SubRowComponent","shouldRenderCustomRow","getParentRow","shouldShowControlsSpacing","getVisibleCells","shouldShowActionsSpacing","subtractedColumns","customRowColspan","rowIndex","patternApplied","rowCanExpand","getToggleExpandedHandler","rowHeaderCell","actionableRowLabelledBy","getIndex","paddingLeft","flexRender","getContext","AVAILABLE","UNAVAILABLE","reason","excludeBuiltinIds","ids","EMPTY_SORTING_STATE","getDefaultSubRows","Body","as","compact","AsComponent","headingsSizeMap","sm","md","lg","Heading","DialogCloseTestIdContext","hasContent","Dialog","footer","showCloseButton","ariaLabelledBy","ariaDescribedBy","inheritedCloseTestId","closeTestId","titleId","descriptionId","labelledBy","describedBy","bodyRef","bodyContentRef","isBodyOverflowing","scrollRef","contentRef","isOverflowing","setIsOverflowing","scrollHeight","clientHeight","useIsOverflowing","AriaDialog","close","footerContent","hasWarnedLegacyProps","Flex","basis","flex","flexDirection","wrap","grow","shrink","gap","gapX","gapY","alignItems","justifyContent","flexClasses","ListBoxRoot","renderEmptyState","isLoading","onLoadMore","scrollOffset","showSelectAll","AriaListBox","composeRenderProps","listBoxProps","renderProps","selectionManager","listBox","selectionMode","collection","getKeys","getItem","canSelectItem","isSelectAll","isClearDisabled","disallowEmptySelection","Collection","dependencies","AriaListBoxLoadMoreItem","ListBoxItem","AriaListBoxItem","ListBoxSection","AriaListBoxSection","ListBoxHeader","AriaHeader","ListBox","Item","Section","Header","ComboBoxRoot","errorMessage","placeholder","allowsEmptyCollection","triggerRef","inputRef","popoverStyle","setPopoverStyle","popoverCrossOffset","setPopoverCrossOffset","hasErrorMessage","listBoxChildren","updatePopoverPosition","getBoundingClientRect","currentOffset","currentStyle","nextWidth","offsetWidth","ResizeObserver","observer","containerClass","AriaComboBox","Label","Input","AriaButton","Text","slot","elementType","FieldError","validation","crossOffset","defaultItems","ComboBoxItem","ComboBoxSection","ComboBoxHeader","ComboBox","RadioContext","SearchField","clearButtonLabel","AriaSearchField","TextField","AriaTextField","NumberField","showStepper","AriaNumberField","Separator","orientation","TextArea","AriaTextArea","TextInput","helperText","showErrorMessage","useImperativeHandle","spellCheck","restProps","ariaProps","defaultValue","toString","labelProps","descriptionProps","errorMessageProps","useTextField","showError","Select","inline","htmlFor","opt","DateInput","displayValue","AriaDateInput","DateSegment","hidden","useCalendarState","calendarState","CalendarStateContext","rangeCalendarState","RangeCalendarStateContext","PickerSelect","isItemDisabled","String","Number","date","formatted","MonthPicker","minValue","maxValue","isMonthDisabled","endOfMonth","compare","toCalendarDate","startOfMonth","CalendarMonthPicker","pickerProps","CalendarTitle","navigation","CalendarYearPicker","Calendar","AriaCalendar","visibleDuration","months","CalendarGrid","CalendarGridHeader","day","CalendarHeaderCell","CalendarGridBody","CalendarCell","DatePresets","presets","isPresetDisabled","onSelect","Group","preset","isPresetDateDisabled","isDateUnavailable","RangeCalendar","direction","useLocale","AriaRangeCalendar","datesMatch","a","b","SegmentedControlRoot","AriaToggleButtonGroup","SegmentedControlItem","AriaToggleButton","SelectionIndicator","SegmentedControl","SectionName","leadingIcon","trailingIcon","isTooltipVisible","isRegularSection","section","prepareSections","sectionGroups","currentSection","flat","isCurrent","findCurrentSection","sections","SideNavContext","useSideNav","SideNavProvider","controlledIsOpen","withIcons","shouldToggleSidebar","topDropdownItems","collapseBreakpoint","setSections","windowWidth","handleWindowWidthChange","onSectionOpen","sectionName","SideNavSwitcher","mainItem","otherItems","isItemHovered","itemMap","url","itemsCount","SingleItem","SideNavItem","isSideNavOpen","buttonRef","isButtonHovered","Component","onSectionClick","SideNavItems","s","sIdx","SideNavTopItem","SideNav","Tab","legacyId","isIcon","tabClassName","AriaTab","rightIcon","Context","withDivider","TabsProvider","TabPanel","AriaTabPanel","CardHeader","CardBody","CardFooter","CardRoot","Card","Footer","_path","_path2","_path3","_path4","bind","n","arguments","t","r","hasOwnProperty","call","apply","SvgLogo","xmlns","fillRule","Logo","alt","logoAsMark","isCustomSize","LogoSvg","Toast","toastProps","contentProps","titleProps","closeButtonProps","useToast","closable","toast","toastClasses","default","text","ToastRegion","regionProps","useToastRegion","visibleToasts","ToastContext","ToastQueue","ReactAriaToastQueue","DismissButton","borderColor","AuthLayout","heading","alert","topAddon","Avatar","src","Banner","bannerClasses","Breadcrumbs","childrenCount","Children","CheckboxGroup","useCheckboxGroupState","groupProps","useCheckboxGroup","showHelperText","Chip","dismissLabel","useToggleButton","chipClasses","Code","CopyToClipboard","copyLabel","copiedLabel","copyErrorLabel","resetAfterMs","tooltipPlacement","onCopy","onCopyError","feedbackState","feedbackLabel","handleCopy","useCopyToClipboard","feedback","setFeedback","resetTimeoutRef","announceIdRef","isMountedRef","activeCopyIdRef","latestValueRef","clearFeedbackTimers","resetFeedback","showFeedback","nextState","feedbackValue","announceId","async","copyId","requestedValue","isStale","navigator","clipboard","writeText","VisuallyHidden","DataTable","onExpand","onSort","enableSorting","columns","originalColumns","actionsColumnSize","getRowId","userState","effectiveSubRowComponent","effectiveEnableSorting","useColumns","headerControls","rowActions","cols","tableInstance","useReactTable","sorting","columnPinning","manualExpanding","getExpandedRowModel","manualSorting","getSortedRowModel","getCanSomeRowsExpand","getState","rowReorderAvailability","getRowReorderAvailability","columnFilters","globalFilter","grouping","hasPagination","getPaginationRowModel","manualPagination","expanded","rowSelection","getHeaderGroups","getRowModel","DateField","AriaDateField","DatePicker","presetsLabel","nullPresetLabel","AriaDatePicker","setValue","setOpen","DateRangePicker","AriaDateRangePicker","presetLabel","getPresetLabel","start","end","isPresetRangeDisabled","range","anchor","constraints","allowsNonContiguousRanges","days","selectRangePreset","setDateTime","Display","Drawer","backdrop","isDismissable","usesLegacyContent","prop","usesLegacyOpen","ModalOverlay","AriaModal","EmptyState","hasActiveFilters","headingLevel","rootClasses","HeadingTag","EnvironmentBar","GlobalToastProvider","toastQueue","useToastQueue","removeAllToasts","contextValue","addToast","removeToast","clear","Grid","templateColumns","templateRows","autoColumns","autoRows","columnStart","columnEnd","rowStart","rowEnd","gridClasses","MenuButton","iconName","ownTestId","iconClassName","MenuList","alignItemsEnd","itemsWrapperClass","Modal","Pagination","totalItems","itemsPerPage","itemsPerPageProp","currentPage","currentPageProp","pageSizeOptions","manualPageInput","setCurrentPage","setItemsPerPage","inputValue","setInputValue","totalPages","Math","ceil","hasNext","hasPrevious","firstItem","lastItem","min","itemsPerPageDropdown","option","totalPagesDropdown","_","i","page","handlePageSelection","selectedValue","validateAndUpdatePage","numValue","parseInt","isNaN","clampedValue","max","handleItemsPerPage","handlePageInputChange","onBlur","currentTarget","blur","onWheel","ProgressBar","status","labelId","helperTextId","showIcon","showInlineHelperText","progressBarProps","useProgressBar","conatinerClass","Radio","indent","useRadio","RadioGroup","useRadioGroupState","radioGroupProps","useRadioGroup","SideNavWrapper","TabList","overflow","moreLabel","TabListStateContext","listId","isMoreOpen","setIsMoreOpen","tabsClass","childrenArray","overflowEnabled","moreButtonRef","overflowIndexes","handleKeyDownCapture","useTabOverflow","promotedIndexRef","measurements","setMeasurements","containerWidth","currentIndex","selectedKey","visibleIndexes","setVisibleIndexes","recalculated","calculateOverflow","tabWidths","moreButtonWidth","allIndexes","reduce","sum","usedWidth","pop","sort","promoteIntoVisible","promoted","lastPos","demotedAt","demotedIdx","navigableVisibleIndexes","getNavigableVisibleIndexes","tabElements","measuredMoreButtonWidth","measuredWidth","widthsUnchanged","focusTabAt","setFocused","setFocusedKey","setSelectedKey","querySelector","isOnMoreButton","focusedKey","visiblePos","indexOf","stopPropagation","moreTriggerContent","hiddenTabSelectors","CSS","escape","replace","AriaTabList","ariaLabelProp","ariaLabelledByProp","TabPanels","AriaTabPanels","Tabs","defaultIndex","AriaTabs","defaultSelectedKey","onSelectionChange","Tag","kind","tagClasses","Tile","isClickable","tileClasses","ToastProvider","maxVisibleToasts","useToastState","Toggle","valueDescription","valueDescriptionPosition","generatedId","isUncontrolled","toggleId","isDescriptionRendered","handleKeyboardInteractions","currentValue","TopBar","sideNavIsClosed","openSideNav"],"mappings":"8oCAAO,MAAMA,EAAQ,CACnB,eACA,aACA,kBACA,uBACA,kBACA,mBACA,wBACA,gBACA,aACA,kBACA,mBACA,cACA,mBACA,wBACA,WACA,gBACA,qBACA,gBACA,iBACA,sBACA,OACA,YACA,YACA,WACA,wBACA,WACA,aACA,aACA,cACA,WACA,OACA,QACA,YACA,oBACA,yBACA,+BACA,eACA,oBACA,eACA,eACA,gBACA,aACA,kBACA,SACA,2BACA,oBACA,oBACA,sBACA,YACA,MACA,YACA,cACA,QACA,eACA,oBACA,YACA,qBACA,WACA,iBACA,SACA,kBACA,WACA,QACA,aACA,mBACA,QACA,OACA,cACA,mBACA,gBACA,OACA,QACA,SACA,YACA,OACA,oBACA,qBACA,eACA,sBACA,MACA,OACA,cACA,mBACA,kBACA,uBACA,kBACA,SACA,oBACA,QACA,sBACA,OACA,iBACA,uBAKWC,EAAc,CACzB,QACA,UACA,UACA,UACA,SACA,YACA,OACA,SACA,UAGWC,EAAsB,CACjC,UACA,YACA,aACA,aACA,QC9GIC,EAAOA,EACXC,UACAC,QACAC,YACAC,O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E,KAAM5D,EAAAC,cAACd,EAAI,CAACC,QAAQ,YACpB0H,QAASynC,IAGbvuC,EAAAC,cAACwqB,GAAI,CAACK,MAAI,EAACM,eAAe,OACvB3nB,GAEFmT,sGnCmBiBikB,KACtB,MAAMjzB,EAAUC,EAAAA,WAAW0zB,IAE3B,IAAK3zB,EACH,MAAM,IAAII,MACR,oIAIJ,OAAOJ"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Icon/constants.ts","../src/components/Icon/Icon.tsx","../src/components/ActionList/components/ActionItem.tsx","../src/components/ActionList/utils.ts","../src/components/ActionList/ActionList.tsx","../src/components/Link/Link.tsx","../src/components/LoadingSpinner/LoadingSpinner.tsx","../src/components/Buttons/Button/Button.tsx","../src/components/Buttons/IconButton/IconButton.tsx","../src/utils/testId.ts","../src/components/Notifications/Alert/Alert.tsx","../src/components/ActionMenu/contexts/MenuContext.tsx","../src/components/ActionMenu/hooks/useMenu.ts","../src/components/ActionMenu/components/Menu/Menu.tsx","../src/components/Breadcrumbs/BreadcrumbsItem.tsx","../src/components/Breadcrumbs/constants.ts","../src/components/Tooltip/Tooltip.tsx","../src/components/Tooltip/constants.ts","../src/hooks/useOverlayTrigger/utils/composeInteractions.ts","../src/hooks/useOverlayTrigger/useOverlayTrigger.ts","../src/hooks/useHover/useHover.ts","../src/hooks/useWindowSize/useWindowSize.ts","../src/hooks/useElementResizeObserver/useElementResizeObserver.ts","../src/components/OverlayTrigger/constants.ts","../src/components/OverlayTrigger/portalContainer.ts","../src/components/OverlayTrigger/OverlayTrigger.tsx","../src/components/TooltipTrigger/constants.ts","../src/components/TooltipTrigger/TooltipTrigger.tsx","../src/components/TooltipTrigger/utils.ts","../src/components/CopyToClipboard/CopyToClipboard.tsx","../src/components/DataTable/hooks/useColumns.tsx","../src/components/DataTable/components/Table/Table.tsx","../src/components/DataTable/components/TableHead/TableHead.tsx","../src/components/DataTable/components/TableBody/TableBody.tsx","../src/components/DataTable/components/HeaderCell/HeaderCell.tsx","../src/components/DataTable/utils/rowReordering.ts","../src/components/DataTable/hooks/useRowReordering.tsx","../src/components/DataTable/components/TableRow/TableRow.tsx","../src/components/forms/Checkbox/contexts/CheckboxGroupContext.tsx","../src/components/forms/Checkbox/Checkbox/InnerCheckbox/InnerCheckbox.tsx","../src/components/forms/Checkbox/Checkbox/Checkbox.tsx","../src/components/forms/FormHelperText/FormHelperText.tsx","../src/components/forms/FormErrorMessage/FormErrorMessage.tsx","../src/components/DataTable/components/HeaderControls/HeaderControls.tsx","../src/components/Popover/Popover.tsx","../src/components/DataTable/components/RowControls/RowControls.tsx","../src/components/DataTable/components/RowActions/RowActions.tsx","../src/components/DataTable/components/TableCell/TableCell.tsx","../src/components/DataTable/components/RowRenderer/RowRenderer.tsx","../src/components/DataTable/utils/rowReorderAvailability.ts","../src/components/DataTable/DataTable.tsx","../src/components/Typography/Body/Body.tsx","../src/components/Typography/Heading/Heading.tsx","../src/components/Dialog/closeTestIdContext.ts","../src/components/Dialog/Dialog.tsx","../src/hooks/useIsOverflowing/useIsOverflowing.ts","../src/components/Drawer/Drawer.tsx","../src/components/Flex/Flex.tsx","../src/components/ListBox/ListBox.tsx","../src/components/forms/ComboBox/ComboBox.tsx","../src/components/forms/Radio/contexts/RadioGroupContext.tsx","../src/components/forms/SearchField/SearchField.tsx","../src/components/forms/TextField/TextField.tsx","../src/components/forms/NumberField/NumberField.tsx","../src/components/forms/TextArea/TextArea.tsx","../src/components/forms/TextInput/TextInput.tsx","../src/components/forms/Select/Select.tsx","../src/components/forms/DateField/DateInput.tsx","../src/components/Calendar/CalendarTitle.tsx","../src/components/Calendar/Calendar.tsx","../src/components/forms/DatePresets/DatePresets.tsx","../src/components/forms/DatePresets/utils.ts","../src/components/RangeCalendar/RangeCalendar.tsx","../src/components/forms/DateRangePicker/utils.ts","../src/components/SegmentedControl/SegmentedControl.tsx","../src/components/SideNav/SectionName/SectionName.tsx","../src/components/SideNav/SectionName/constants.ts","../src/components/SideNav/contexts/utils.ts","../src/components/SideNav/contexts/SideNavContext.tsx","../src/components/SideNav/SideNavSwitcher/SideNavSwitcher.tsx","../src/components/SideNav/SideNavItems/SideNavItem/SingleItem/SingleItem.tsx","../src/components/SideNav/SideNavItems/SideNavItem/SideNavItem.tsx","../src/components/SideNav/SideNavItems/SideNavItems.tsx","../src/components/SideNav/SideNavTopItem/SideNavTopItem.tsx","../src/components/SideNav/SideNav.tsx","../src/components/Tabs/Tab/Tab.tsx","../src/components/Tabs/contexts/TabsContext.tsx","../src/components/Tabs/TabPanel/TabPanel.tsx","../src/components/Card/Card.tsx","../src/components/Logo/logo.svg","../src/components/Logo/Logo.tsx","../src/components/Notifications/Toast/Toast/Toast.tsx","../src/components/Notifications/Toast/ToastRegion/ToastRegion.tsx","../src/components/Notifications/Toast/GlobalToastProvider/GlobalToastProvider.tsx","../src/components/Toggle/Toggle.tsx","../src/components/Chip/DismissButton/DismissButton.tsx","../src/patterns/AuthLayout/AuthLayout.tsx","../src/components/Avatar/Avatar.tsx","../src/components/Notifications/Banner/Banner.tsx","../src/components/Breadcrumbs/Breadcrumbs.tsx","../src/components/forms/Checkbox/CheckboxGroup/CheckboxGroup.tsx","../src/components/Chip/Chip.tsx","../src/components/Typography/Code/Code.tsx","../src/components/CopyToClipboard/useCopyToClipboard.ts","../src/components/forms/DateField/DateField.tsx","../src/components/forms/DatePicker/DatePicker.tsx","../src/components/forms/DateRangePicker/DateRangePicker.tsx","../src/components/Typography/Display/Display.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/EnvironmentBar/EnvironmentBar.tsx","../src/components/Grid/Grid.tsx","../src/components/Typography/Label/Label.tsx","../src/components/ActionMenu/components/MenuButton/MenuButton.tsx","../src/components/ActionMenu/components/MenuList/MenuList.tsx","../src/components/Modal/Modal.tsx","../src/components/Pagination/Pagination.tsx","../src/components/Pagination/constants.ts","../src/components/ProgressBar/ProgressBar.tsx","../src/components/forms/Radio/Radio.tsx","../src/components/forms/Radio/RadioGroup.tsx","../src/components/Tabs/TabList/TabList.tsx","../src/components/Tabs/TabList/useTabOverflow.ts","../src/components/Tabs/TabList/utils.ts","../src/components/Tabs/TabPanels/TabPanels.tsx","../src/components/Tabs/Tabs/Tabs.tsx","../src/components/Tag/Tag.tsx","../src/components/Tile/Tile.tsx","../src/components/Notifications/Toast/ToastProvider/ToastProvider.tsx","../src/components/TopBar/TopBar.tsx"],"sourcesContent":["export const ICONS = [\n 'address-card',\n 'arrow-down',\n 'arrow-down-left',\n 'arrow-down-left-long',\n 'arrow-down-long',\n 'arrow-down-right',\n 'arrow-down-right-long',\n 'arrow-down-up',\n 'arrow-left',\n 'arrow-left-long',\n 'arrow-left-right',\n 'arrow-right',\n 'arrow-right-long',\n 'arrow-turn-down-right',\n 'arrow-up',\n 'arrow-up-left',\n 'arrow-up-left-long',\n 'arrow-up-long',\n 'arrow-up-right',\n 'arrow-up-right-long',\n 'bank',\n 'bar-chart',\n 'briefcase',\n 'building',\n 'business-intelligence',\n 'calendar',\n 'caret-down',\n 'caret-left',\n 'caret-right',\n 'caret-up',\n 'chat',\n 'check',\n 'check-box',\n 'check-box-checked',\n 'check-box-checked-fill',\n 'check-box-indeterminate-fill',\n 'check-circle',\n 'check-circle-fill',\n 'chevron-down',\n 'chevron-left',\n 'chevron-right',\n 'chevron-up',\n 'chevron-up-down',\n 'circle',\n 'circle-half-stroke-small',\n 'circle-small-dash',\n 'circle-small-fill',\n 'circle-small-stroke',\n 'clipboard',\n 'cog',\n 'copy-file',\n 'credit-card',\n 'cross',\n 'cross-circle',\n 'cross-circle-fill',\n 'dashboard',\n 'diamond-small-fill',\n 'document',\n 'document-blank',\n 'dollar',\n 'dot-circle-fill',\n 'dot-fill',\n 'error',\n 'error-fill',\n 'error-small-fill',\n 'graph',\n 'home',\n 'info-circle',\n 'info-circle-fill',\n 'line-vertical',\n 'list',\n 'login',\n 'logout',\n 'megaphone',\n 'menu',\n 'menu-chevron-left',\n 'menu-chevron-right',\n 'notification',\n 'notification-unread',\n 'pen',\n 'plus',\n 'plus-circle',\n 'plus-circle-fill',\n 'question-circle',\n 'question-circle-fill',\n 'recently-viewed',\n 'search',\n 'square-small-fill',\n 'trash',\n 'triangle-small-fill',\n 'user',\n 'warning-circle',\n 'warning-circle-fill',\n] as const;\n\nexport const NON_KIT_ICONS_LIST = ['cloud', 'globe', 'life-ring', 'sidebar'];\n\nexport const BRAND_ICONS = [\n 'anrok',\n 'dropbox',\n 'hubspot',\n 'numeral',\n 'oracle',\n 'quotapath',\n 'sage',\n 'sphere',\n 'taxjar',\n] as const;\n\nexport const BRAND_ICONS_DUOTONE = [\n 'avalara',\n 'pipedrive',\n 'salesforce',\n 'xero',\n] as const;\n\n/**\n * Brand icons drawn from the brand owner's own file instead of a Font Awesome\n * kit glyph, because the owner requires their asset unaltered. Each one maps\n * to a `maxio-brand-icon--{name}` class in ui-components.\n *\n * QuickBooks: Intuit's round mark (PMD-2996, same as Maxio Core in PMD-1892).\n */\nexport const BRAND_ICONS_IMAGE = ['quickbooks'] as const;\n\nexport const ICON_COLORS = [\n 'primary',\n 'secondary',\n 'info',\n 'inverse',\n 'neutral',\n 'disabled',\n 'highlight',\n 'danger',\n 'success',\n 'warning',\n 'on-bg-fill-disabled',\n];\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n ICONS,\n BRAND_ICONS,\n BRAND_ICONS_DUOTONE,\n BRAND_ICONS_IMAGE,\n} from './constants';\nimport { IconProps, IconVariant } from './Icon.types';\n\nconst Icon = ({\n variant,\n color,\n className,\n size,\n 'data-testid': testId,\n}: IconProps) => {\n const isInList = (variant: string, list: readonly IconVariant[]) =>\n list.includes(variant);\n\n if (isInList(variant, BRAND_ICONS_IMAGE)) {\n // The brand owner's file, never recolored, so `color` does not apply.\n return (\n <i\n className={cx(\n 'maxio-brand-icon',\n `maxio-brand-icon--${variant}`,\n { [`fa-${size}`]: size },\n className\n )}\n data-testid={testId}\n />\n );\n }\n\n const isInKit = isInList(variant, ICONS) || isInList(variant, BRAND_ICONS);\n const duotoneIcon = isInList(variant, BRAND_ICONS_DUOTONE);\n\n const iconClass = cx(\n {\n 'fa-kit': isInKit,\n 'fa-kit-duotone': duotoneIcon,\n 'fa-sharp fa-regular': !isInKit && !duotoneIcon,\n [`fa-${variant}`]: true,\n [`fa-${size}`]: size,\n [`maxio-icon--${color}`]:\n color &&\n !isInList(variant, BRAND_ICONS) &&\n !isInList(variant, BRAND_ICONS_DUOTONE),\n },\n className\n );\n\n return <i className={iconClass} data-testid={testId} />;\n};\n\nexport default Icon;\n","import cx from 'classnames';\nimport React, { useEffect, useRef } from 'react';\nimport { useId } from 'react-aria';\n\nimport Icon from '../../Icon';\nimport { ActionItemProps } from '../types';\n\nconst ActionItem = ({\n item,\n isSelected,\n truncateLabel = false,\n role = 'option',\n small = false,\n}: ActionItemProps) => {\n const ref = useRef<HTMLAnchorElement>(null);\n\n const isMounted = useRef(false);\n\n const id = useId();\n\n useEffect(() => {\n if (isSelected && isMounted.current) {\n ref.current?.focus();\n }\n }, [isSelected]);\n\n useEffect(() => {\n isMounted.current = true;\n }, []);\n\n if (item.type === 'divider') {\n return (\n <div\n className=\"maxio-action-list__divider\"\n role=\"separator\"\n aria-hidden=\"true\"\n />\n );\n }\n const {\n leadingIconName,\n leadingIconClassName,\n trailingIconName,\n label,\n description,\n link,\n } = item;\n const labelClass = cx('maxio-action-list__label', {\n 'maxio-truncate': truncateLabel,\n });\n return (\n <a\n aria-labelledby={id}\n {...link}\n className={cx('maxio-action-list__content', link.className, {\n 'maxio-action-list__content--size-small': small,\n })}\n tabIndex={isSelected ? 0 : -1}\n ref={ref}\n role={role}\n >\n {leadingIconName && (\n <Icon\n variant={leadingIconName}\n className={cx(\n 'maxio-action-list__leading-icon',\n leadingIconClassName\n )}\n />\n )}\n <span className={labelClass} id={id}>\n {label}\n </span>\n {description && (\n <span className=\"maxio-action-list__description\">{description}</span>\n )}\n {trailingIconName && (\n <Icon\n variant={trailingIconName}\n className=\"maxio-action-list__trailing-icon\"\n />\n )}\n </a>\n );\n};\n\nexport default ActionItem;\n","import { ActionListItem } from './types';\n\nexport const findNextIdx = (idx: number, items: ActionListItem[]): number => {\n const nextIdx = items.findIndex((item, itemIdx) => {\n return item.type !== 'divider' && itemIdx > idx;\n });\n return nextIdx === -1 ? idx : nextIdx;\n};\n\nexport const findPrevIdx = (\n idx: number,\n items: ActionListItem[],\n originalIdx?: number\n): number => {\n if (idx === 0) {\n return idx;\n }\n if (idx === 1 && items[idx - 1].type === 'divider') {\n return originalIdx || idx;\n }\n if (items[idx - 1].type === 'divider') {\n return findPrevIdx(idx - 1, items, originalIdx || idx);\n }\n return idx - 1;\n};\n","import React, { useState } from 'react';\nimport cx from 'classnames';\n\nimport { ActionItem } from './components';\nimport { ActionListProps } from './types';\nimport { findNextIdx, findPrevIdx } from './utils';\n\nconst ActionList = ({\n items,\n isShadowed = true,\n itemProps = {},\n className,\n truncateLabels = false,\n small = false,\n ...props\n}: ActionListProps) => {\n const listClass = cx('maxio-action-list', className, {\n 'maxio-action-list--shadow': isShadowed,\n });\n\n const [selectedIdx, setSelectedIdx] = useState(() =>\n items.findIndex((item) => item.type !== 'divider')\n );\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.code === 'Space' || e.code === 'Enter') {\n const currentItem = items[selectedIdx];\n if (currentItem && currentItem.type !== 'divider') {\n window.open(currentItem.link.href, currentItem.link.target || '_self');\n }\n }\n if (e.code === 'ArrowUp') {\n e.preventDefault();\n setSelectedIdx((prev) => findPrevIdx(prev, items));\n }\n if (e.code === 'ArrowDown') {\n e.preventDefault();\n setSelectedIdx((prev) => findNextIdx(prev, items));\n }\n };\n\n if (items.length === 0) {\n return null;\n }\n\n return (\n <div\n className={listClass}\n onKeyDown={handleKeyDown}\n role=\"listbox\"\n {...props}\n >\n {items.map((item, idx) => (\n <ActionItem\n item={item}\n truncateLabel={truncateLabels}\n key={`listbox-${item.id}`}\n isSelected={idx === selectedIdx}\n small={small}\n {...itemProps}\n />\n ))}\n </div>\n );\n};\n\nexport default ActionList;\n","import React from 'react';\nimport cx from 'classnames';\n\nimport { LinkProps } from './types';\nimport Icon from '../Icon';\n\nconst Link: React.FC<LinkProps> = ({\n className,\n children,\n disabled,\n external,\n icon,\n size = 'sm',\n underline,\n variant,\n ...rest\n}) => {\n const classNames = cx(\n 'maxio-link',\n {\n [`maxio-link--${size}`]: size,\n 'maxio-link--disabled': disabled,\n [`maxio-link--${variant}`]: variant,\n 'maxio-link--underline': underline,\n },\n className\n );\n\n const target = external ? '_blank' : '_self';\n\n return (\n <a className={classNames} target={target} {...rest}>\n {children}\n {icon && <Icon variant={icon} className=\"maxio-link__icon\" />}\n </a>\n );\n};\n\nexport default Link;\n","import React from 'react';\nimport cx from 'classnames';\nimport { LoadingSpinnerProps } from './types';\n\nconst LoadingSpinner = ({\n size = 'md',\n white = false,\n className,\n 'data-testid': testId,\n}: LoadingSpinnerProps) => {\n const loadingSpinnerClasses = cx(\n 'maxio-loading-spinner',\n className,\n `maxio-loading-spinner--${size}`,\n { [`maxio-loading-spinner--white`]: white }\n );\n return (\n <div\n className={loadingSpinnerClasses}\n role=\"status\"\n aria-label=\"loading\"\n data-testid={testId}\n />\n );\n};\n\nexport default LoadingSpinner;\n","import React, {\n ReactElement,\n Ref,\n isValidElement,\n cloneElement,\n forwardRef,\n} from 'react';\nimport { useLink } from 'react-aria';\nimport { useObjectRef } from '@react-aria/utils';\nimport cx from 'classnames';\nimport { useButton } from 'react-aria';\nimport { ButtonProps, InternalButtonProps, InternalLinkProps } from './types';\nimport LoadingSpinner from '../../LoadingSpinner';\n\nconst isLinkProps = (props: ButtonProps): props is InternalLinkProps => {\n return 'href' in props;\n};\n\nconst InternalLink = forwardRef<HTMLAnchorElement, InternalLinkProps>(\n (\n {\n fullWidth = false,\n leadingElement,\n trailingElement,\n icon,\n variant = 'primary',\n size,\n ...props\n },\n forwardedRef\n ) => {\n const ref = useObjectRef(forwardedRef);\n\n const { linkProps } = useLink({ ...props }, ref);\n\n const buttonClasses = cx('maxio-button', props.className, {\n [`maxio-button--${size}`]: size,\n [`maxio-button--${variant}`]: variant,\n [`maxio-button--full-width`]: fullWidth,\n });\n\n return (\n <a {...linkProps} ref={ref} className={buttonClasses} href={props.href}>\n {leadingElement &&\n cloneElement(leadingElement as ReactElement, {\n ...(isValidElement(leadingElement) && {\n className: 'maxio-button__leading-element',\n }),\n })}\n {props.children}\n {(trailingElement || icon) &&\n cloneElement((trailingElement || icon) as ReactElement, {\n ...(isValidElement(trailingElement || icon) && {\n className: 'maxio-button__trailing-element',\n }),\n })}\n </a>\n );\n }\n);\n\nconst InternalButton = forwardRef<HTMLButtonElement, InternalButtonProps>(\n (\n {\n disabled,\n loading = false,\n fullWidth = false,\n leadingElement,\n trailingElement,\n icon,\n variant = 'primary',\n size,\n ...props\n },\n forwardedRef\n ) => {\n const ref = useObjectRef(forwardedRef);\n\n const { buttonProps } = useButton(\n {\n ...props,\n isDisabled: disabled,\n formAction:\n typeof props.formAction === 'string' ? props.formAction : undefined,\n },\n ref\n );\n\n const isLoadingSpinnerWhite = ['primary', 'danger'].includes(variant);\n\n const buttonClasses = cx('maxio-button', props.className, {\n [`maxio-button--${size}`]: size,\n [`maxio-button--${variant}`]: variant,\n [`maxio-button--loading`]: loading,\n [`maxio-button--full-width`]: fullWidth,\n });\n\n return (\n <button {...buttonProps} className={buttonClasses} ref={ref}>\n {leadingElement &&\n cloneElement(leadingElement as ReactElement, {\n ...(isValidElement(leadingElement) && {\n className: 'maxio-button__leading-element',\n }),\n })}\n {props.children}\n {!loading &&\n (trailingElement || icon) &&\n cloneElement((trailingElement || icon) as ReactElement, {\n ...(isValidElement(trailingElement || icon) && {\n className: 'maxio-button__trailing-element',\n }),\n })}\n {loading && (\n <LoadingSpinner\n className=\"maxio-button__trailing-element\"\n size=\"md\"\n white={isLoadingSpinnerWhite}\n />\n )}\n </button>\n );\n }\n);\n\nconst Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n (props, ref) => {\n if (isLinkProps(props)) {\n return <InternalLink {...props} ref={ref as Ref<HTMLAnchorElement>} />;\n }\n\n return <InternalButton {...props} ref={ref as Ref<HTMLButtonElement>} />;\n }\n);\n\nexport default Button;\n","import React from 'react';\nimport { IconButtonProps } from './types';\nimport Button from '../Button/Button';\nimport cx from 'classnames';\n\nconst IconButton = ({\n 'aria-label': ariaLabel,\n className,\n ...props\n}: IconButtonProps) => {\n return (\n <Button\n aria-label={ariaLabel}\n className={cx('maxio-button--icon', className)}\n {...props}\n >\n {null}\n </Button>\n );\n};\n\nexport default IconButton;\n","export type TestIdProps = {\n /**\n * Test ID set on the component's root element. Components with internal\n * parts derive their IDs from it (e.g. `<id>.row.<rowId>`).\n */\n 'data-testid'?: string;\n};\n\n/**\n * Builds a derived test ID by joining the base ID and the given parts with dots.\n * Returns `undefined` when there's no base ID, so nothing is rendered.\n */\nexport const childTestId = (\n base: string | undefined,\n ...parts: Array<string | number>\n) => (base ? [base, ...parts].join('.') : undefined);\n","import React from 'react';\nimport { AlertProps } from './Alert.types';\nimport classNames from 'classnames';\n\nimport { IconVariant } from '../../Icon/Icon.types';\n\nimport Icon from '../../Icon/Icon';\nimport Link from '../../Link/Link';\nimport IconButton from '../../Buttons/IconButton';\nimport { childTestId } from '../../../utils/testId';\n\nconst Alert = ({\n children,\n title,\n linkText,\n linkExternal,\n href,\n display = 'inline',\n sentiment = 'info',\n onDismiss,\n className,\n 'data-testid': testId,\n}: AlertProps) => {\n if (!children && !title) {\n console.warn(\n 'Alert component requires either children or title prop to be rendered'\n );\n return null;\n }\n\n const alertClasses = classNames(\n 'maxio-alert',\n {\n [`maxio-alert--${sentiment}`]: sentiment !== 'info' && sentiment,\n },\n className\n );\n\n const iconMap: Record<string, IconVariant> = {\n success: 'check-circle-fill',\n warning: 'warning-circle-fill',\n danger: 'error-fill',\n info: 'info-circle-fill',\n };\n\n const icon = iconMap[sentiment];\n\n const contentWrapper = classNames('maxio-alert__content', {\n 'maxio-alert__content--block': display === 'block',\n });\n\n return (\n <div className={alertClasses} data-testid={testId}>\n <Icon variant={icon} className=\"maxio-alert__icon\" aria-hidden=\"true\" />\n <section className=\"maxio-alert__container\">\n <div className={contentWrapper}>\n {title && <span className=\"maxio-alert__title\">{title}</span>}\n {children && <span className=\"maxio-alert__message\">{children}</span>}\n {linkText && href && (\n <Link\n className=\"maxio-alert__link\"\n href={href}\n variant=\"high-contrast\"\n underline\n {...(linkExternal ? { external: true } : {})}\n >\n {linkText}\n </Link>\n )}\n </div>\n </section>\n {onDismiss && (\n <IconButton\n icon={<Icon variant=\"cross\" />}\n aria-label=\"Dismiss Notification\"\n variant=\"ghost\"\n onClick={onDismiss}\n className=\"maxio-alert__dismiss\"\n data-testid={childTestId(testId, 'dismiss')}\n />\n )}\n </div>\n );\n};\n\nexport default Alert;\n","import React, { createContext, useState, ReactNode, useId } from 'react';\n\nexport interface IMenuContext {\n isOpen: boolean;\n onClose: () => void;\n onOpen: () => void;\n onToggle: () => void;\n controlsId: string;\n buttonId: string;\n testId?: string;\n}\n\nexport const MenuContext = createContext({} as IMenuContext);\n\nexport const MenuProvider = ({\n children,\n testId,\n}: {\n children: ReactNode;\n testId?: string;\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n\n const controlsId = useId();\n const buttonId = useId();\n\n const onOpen = () => setIsOpen(true);\n\n const onClose = () => setIsOpen(false);\n\n const onToggle = () => setIsOpen((prev) => !prev);\n\n return (\n <MenuContext.Provider\n value={{\n controlsId,\n buttonId,\n isOpen,\n onClose,\n onOpen,\n onToggle,\n testId,\n }}\n >\n {children}\n </MenuContext.Provider>\n );\n};\n","import { useContext } from 'react';\nimport { MenuContext } from '../contexts';\n\nexport function useMenu() {\n const context = useContext(MenuContext);\n\n if (\n !context ||\n (typeof context === 'object' && Object.keys(context).length === 0)\n ) {\n throw new Error('useMenu hook must be used within a MenuProvider');\n }\n return context;\n}\n","import React, { ReactNode } from 'react';\nimport { MenuProvider } from '../../contexts/MenuContext';\nimport { useMenu } from '../../hooks';\nimport type { TestIdProps } from '../../../../utils/testId';\n\ninterface MenuProps extends TestIdProps {\n children:\n | ReactNode\n | (({\n isOpen,\n onClose,\n }: {\n isOpen: boolean;\n onClose: () => void;\n }) => ReactNode);\n}\n\nexport const MenuWrapper = ({ children }: MenuProps) => {\n const { isOpen, onToggle, onClose, testId } = useMenu();\n\n return (\n <details\n open={isOpen}\n onToggle={onToggle}\n className=\"maxio-action-menu\"\n data-testid={testId}\n >\n {typeof children === 'function'\n ? children({ isOpen, onClose })\n : children}\n </details>\n );\n};\n\nconst Menu = ({ children, 'data-testid': testId }: MenuProps) => {\n return (\n <MenuProvider testId={testId}>\n <MenuWrapper>{children}</MenuWrapper>\n </MenuProvider>\n );\n};\n\nexport default Menu;\n","import React from 'react';\nimport cx from 'classnames';\n\nimport { BreadcrumbsItemProps } from './types';\nimport Link from '../Link/Link';\n\nconst BreadcrumbsItem: React.FC<BreadcrumbsItemProps> = ({\n children,\n className,\n href,\n ...rest\n}) => {\n const content = href ? (\n <Link size=\"sm\" href={href}>\n {children}\n </Link>\n ) : (\n children\n );\n\n return (\n <li className={cx('maxio-breadcrumbs__item', className)} {...rest}>\n {content}\n </li>\n );\n};\n\nexport default BreadcrumbsItem;\n","export const ERROR_MESSAGES = {\n NO_ITEMS: 'Breadcrumbs requires at least one BreadcrumbsItem as children',\n LAST_ITEM_WITH_HREF:\n 'Last BreadcrumbsItem should not have \"href\" prop. It is the current page.',\n ONLY_BREADCRUMBS_ITEM: 'Breadcrumbs only accepts BreadcrumbsItem as children',\n};\n","import React, { FC } from 'react';\nimport cx from 'classnames';\n\nimport { TOOLTIP_DEFAULT_MAX_WIDTH } from './constants';\nimport type { ArrowPosition } from './types';\n\nexport type TooltipProps = {\n /**\n * React children nodes\n */\n children: React.ReactNode;\n /**\n * Tooltip component size variant\n */\n size?: 'regular' | 'small';\n /**\n * Arrow placement\n */\n arrowPosition?: ArrowPosition;\n /**\n * Maximum tooltip container width in pixels\n */\n maxWidth?: number | 'none';\n /**\n * Test ID set on the tooltip element\n * @default 'tooltip'\n */\n 'data-testid'?: string;\n};\n\nconst Tooltip: FC<TooltipProps> = ({\n children,\n arrowPosition,\n size = 'regular',\n maxWidth = TOOLTIP_DEFAULT_MAX_WIDTH,\n 'data-testid': testId = 'tooltip',\n}) => (\n <div\n data-testid={testId}\n className={cx('maxio-tooltip', `maxio-tooltip--${size}`, {\n [`maxio-tooltip--arrow-${arrowPosition}`]: arrowPosition,\n })}\n >\n <div className=\"maxio-tooltip__content\" style={{ maxWidth }}>\n {children}\n </div>\n </div>\n);\n\nexport default Tooltip;\n","export const TOOLTIP_DEFAULT_MAX_WIDTH = 160;\n","import {\n useHover,\n useDismiss,\n useClick,\n useFocus,\n FloatingContext,\n ReferenceType,\n} from '@floating-ui/react-dom-interactions';\n\nimport type { Interactions } from '../types';\n\nconst HOVER_DELAY = 100;\n\nconst useHoverWithDelay = (context: FloatingContext<ReferenceType>) =>\n useHover(context, { delay: HOVER_DELAY });\n\nconst INTERACTIONS_HANDLERS: Record<\n Interactions,\n (context: FloatingContext<ReferenceType>) => any\n> = {\n click: useClick,\n hover: useHoverWithDelay,\n focus: useFocus,\n dismiss: useDismiss,\n};\n\nexport const composeInteractions = (\n context: FloatingContext<ReferenceType>,\n interactions: Interactions[]\n) =>\n interactions.map((interaction) =>\n INTERACTIONS_HANDLERS[interaction](context)\n );\n","import React, { useEffect, useRef, useState } from 'react';\nimport {\n useFloating,\n useInteractions,\n useRole,\n offset,\n shift,\n limitShift,\n hide,\n autoUpdate,\n} from '@floating-ui/react-dom-interactions';\n\nimport { composeInteractions } from './utils';\nimport type { Placement, Interactions, OverlayAriaRole } from './types';\n\nconst VIEWPORT_PADDING = 8;\n\ntype OverlayTriggerSettings = {\n /**\n * Floating element placement\n */\n placement?: Placement;\n /**\n * Float element active by default\n */\n isInitiallyActive?: boolean;\n /**\n * Definition of interactions that manages displaying of overlay element\n */\n interactions?: Interactions[];\n /**\n * Floating element offset in pixels\n */\n floatingElementOffset?: number;\n /**\n * Defines relevant context for screen reader with ARIA attribute\n */\n role: OverlayAriaRole;\n /**\n * Overlay visibility state\n */\n isActive?: boolean;\n /**\n * Overlay state change event handler\n */\n onOverlayUpdate: (isActive: boolean) => void;\n /**\n * Milliseconds after the overlay is automatically deactivated\n */\n autoHideMs?: number;\n /**\n * CSS positioning strategy of the floating element\n */\n strategy?: 'absolute' | 'fixed';\n /**\n * Shift the floating element along its placement axis to keep it inside\n * the viewport, and hide it once its trigger is scrolled out of view. The\n * applied shift is exposed as `--maxio-overlay-shift-x` and\n * `--maxio-overlay-shift-y` so arrows can keep pointing at the trigger.\n */\n shiftIntoView?: boolean;\n};\n\nexport const useOverlayTrigger = ({\n placement = 'top',\n isActive = false,\n interactions = ['hover'],\n floatingElementOffset = 0,\n onOverlayUpdate,\n autoHideMs,\n strategy: positionStrategy = 'absolute',\n shiftIntoView = false,\n}: OverlayTriggerSettings) => {\n const hideTrigger = useRef<number | null>(null);\n\n // floating-ui keeps the last computed data after an overlay closes, and skips\n // updates that deep-equal it. Tagging the data with a per-open cycle number\n // forces a fresh result on every reopen and tells which open a hide flag\n // belongs to, so a stale flag is never applied.\n const [openCycle, setOpenCycle] = useState(0);\n const [wasActive, setWasActive] = useState(isActive);\n if (isActive !== wasActive) {\n setWasActive(isActive);\n if (isActive) setOpenCycle((cycle) => cycle + 1);\n }\n\n const {\n strategy,\n x,\n y,\n context,\n floating,\n reference,\n refs: floatingRefs,\n middlewareData,\n } = useFloating({\n placement,\n strategy: positionStrategy,\n open: isActive,\n onOpenChange: (open) => onOverlayUpdate(open),\n middleware: [\n offset(floatingElementOffset),\n ...(shiftIntoView\n ? [\n shift({ padding: VIEWPORT_PADDING, limiter: limitShift() }),\n hide(),\n {\n name: 'openCycle',\n options: openCycle,\n fn: () => ({ data: { cycle: openCycle } }),\n },\n ]\n : []),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n ...composeInteractions(context, interactions),\n useRole(context, { role: 'tooltip' }),\n ]);\n\n useEffect(() => {\n if (hideTrigger.current) clearTimeout(hideTrigger.current);\n if (isActive && autoHideMs) {\n hideTrigger.current = window.setTimeout(\n () => onOverlayUpdate(false),\n autoHideMs\n );\n }\n }, [isActive, autoHideMs]);\n\n // Not tied to isActive, so an overlay closed while hidden stays hidden\n // through its exit animation.\n const hasCurrentCycleData = middlewareData.openCycle?.cycle === openCycle;\n const isReferenceHidden =\n hasCurrentCycleData && !!middlewareData.hide?.referenceHidden;\n // Until this open's first position resolves, top/left still belong to the\n // previous open, so keep the overlay invisible (but not inert) for that frame.\n const isPositionPending = shiftIntoView && isActive && !hasCurrentCycleData;\n\n // Set on every overlay, not only shifted ones: custom properties inherit, so\n // a tooltip nested in a shifted overlay would otherwise offset its arrow too.\n const floatingElementCSSPosition = {\n position: strategy,\n top: y ?? 0,\n left: x ?? 0,\n '--maxio-overlay-shift-x': `${middlewareData.shift?.x ?? 0}px`,\n '--maxio-overlay-shift-y': `${middlewareData.shift?.y ?? 0}px`,\n ...((isReferenceHidden || isPositionPending) && { visibility: 'hidden' }),\n } as React.CSSProperties;\n\n return {\n isActive,\n refs: {\n floating,\n reference,\n floatingElement: floatingRefs.floating,\n },\n isReferenceHidden,\n floatingElementCSSPosition,\n getReferenceProps,\n getFloatingProps,\n };\n};\n","import { RefObject, useEffect, useRef, useState } from 'react';\n\nexport default function useHover<T extends HTMLElement = HTMLElement>(\n ref: RefObject<T | null>,\n mouseLeaveDelay: number = 0\n) {\n const mouseEnterTime = useRef(new Date().getTime());\n const mouseLeaveTime = useRef(new Date().getTime());\n\n const [isHovered, setIsHovered] = useState(false);\n\n useEffect(() => {\n const handleMouseEnter = () => {\n mouseEnterTime.current = new Date().getTime();\n setIsHovered(true);\n };\n\n const handleMouseLeave = () => {\n mouseLeaveTime.current = new Date().getTime();\n\n window.setTimeout(() => {\n if (mouseEnterTime.current - mouseLeaveTime.current <= 0) {\n setIsHovered(false);\n }\n }, mouseLeaveDelay);\n };\n\n const current = ref && ref.current;\n\n if (current) {\n current.addEventListener('mouseenter', handleMouseEnter);\n current.addEventListener('mouseleave', handleMouseLeave);\n }\n\n return () => {\n if (current) {\n current.removeEventListener('mouseenter', handleMouseEnter);\n current.removeEventListener('mouseleave', handleMouseLeave);\n }\n };\n }, [ref]);\n\n return isHovered;\n}\n","import { useEffect, useRef, useState } from 'react';\n\nexport default function useWindowSize(debounce: number = 500) {\n const [windowSize, setWindowSize] = useState(() => {\n if (typeof window === 'undefined') {\n return { windowWitdh: 0, windowHeight: 0 };\n }\n\n const { innerWidth, innerHeight } = window;\n return { windowWitdh: innerWidth, windowHeight: innerHeight };\n });\n\n const timeout = useRef<number | null>(null);\n\n useEffect(() => {\n if (typeof window === 'undefined') {\n return;\n }\n\n const handleResize = () => {\n const { innerWidth, innerHeight } = window;\n window.clearTimeout(timeout.current ?? undefined);\n timeout.current = window.setTimeout(() => {\n setWindowSize({ windowWitdh: innerWidth, windowHeight: innerHeight });\n }, debounce);\n };\n\n window.addEventListener('resize', handleResize);\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, [debounce]);\n\n return windowSize;\n}\n","import { RefObject, useLayoutEffect, useState } from 'react';\nimport { useResizeObserver } from '@react-aria/utils';\n\nexport default function useElementResizeObserver<\n T extends HTMLElement = HTMLElement,\n>(ref: RefObject<T | null>): number {\n const [width, setWidth] = useState(() => ref.current?.clientWidth ?? 0);\n\n // react-aria-components briefly re-parents collection-managed subtrees\n // while building their internal Collection, which can fire a transient\n // ResizeObserver callback reporting 0 for an element that already has a\n // real, non-zero width. Ignore that spurious drop so it doesn't\n // permanently overwrite a correct measurement.\n const onResize = () => {\n const next = ref.current?.clientWidth ?? 0;\n setWidth((prev) => (next === 0 && prev > 0 ? prev : next));\n };\n\n useLayoutEffect(onResize, [ref]);\n useResizeObserver({ ref, onResize });\n\n return width;\n}\n","export const PORTAL_ID = 'maxio-ui-portal';\n","import { PORTAL_ID } from './constants';\n\nconst DIALOG_SELECTOR = '[role=\"dialog\"], [role=\"alertdialog\"], dialog';\nconst OVERLAY_CLASS = 'maxio-overlay-trigger__overlay';\n\n// Dialogs keep the overlay above their content: inside react-aria's modal\n// subtree, and inside a native <dialog>'s top layer. Any other ancestor would\n// put it in that ancestor's stacking order, where later positioned content can\n// cover it, so outside a dialog every overlay shares one body-level node. It is\n// created once and never removed, because overlays mounted later keep using it\n// after the first one unmounts.\nexport const portalContainerFor = (trigger: HTMLElement): HTMLElement => {\n const dialog = trigger.closest<HTMLElement>(DIALOG_SELECTOR);\n if (dialog) return dialog;\n\n let sharedNode = document.getElementById(PORTAL_ID);\n if (!sharedNode) {\n sharedNode = document.createElement('div');\n sharedNode.id = PORTAL_ID;\n document.body.appendChild(sharedNode);\n }\n return sharedNode;\n};\n\nconst portalListeners = new Set<() => void>();\nlet portalObserver: MutationObserver | null = null;\n\nconst isRelevantChange = (record: MutationRecord) =>\n record.type === 'childList'\n ? Array.from(record.removedNodes).some(\n (node) => (node as HTMLElement).id === PORTAL_ID\n )\n : !(record.target as HTMLElement).classList?.contains(OVERLAY_CLASS);\n\n// One observer for every open portaled overlay. It reports theme changes and\n// the shared node being removed from <body>; writes to an overlay's own\n// data-maxio-mode are skipped, since they only echo a change already handled.\n// Only those are watched: if a dialog or theme wrapper is inserted around an\n// open overlay's trigger, the overlay picks it up the next time it opens.\n// The shared node is only seen leaving as a direct child of <body>, and only\n// while an overlay is open: a removal during the exit animation, or a dialog\n// container moved or re-mounted while its overlay is open, is not detected.\nexport const subscribeToPortalChanges = (listener: () => void) => {\n portalListeners.add(listener);\n if (!portalObserver) {\n portalObserver = new MutationObserver((records) => {\n if (records.some(isRelevantChange)) {\n portalListeners.forEach((notify) => notify());\n }\n });\n portalObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-maxio-mode'],\n subtree: true,\n });\n portalObserver.observe(document.body, { childList: true });\n }\n\n return () => {\n portalListeners.delete(listener);\n if (portalListeners.size === 0) {\n portalObserver?.disconnect();\n portalObserver = null;\n }\n };\n};\n","import React, {\n FC,\n useCallback,\n useEffect,\n useLayoutEffect,\n useReducer,\n useRef,\n useState,\n} from 'react';\nimport { motion, AnimatePresence, MotionProps } from 'framer-motion';\nimport cx from 'classnames';\nimport { FloatingPortal } from '@floating-ui/react-dom-interactions';\n\nimport {\n useOverlayTrigger,\n Placement,\n Interactions,\n OverlayAriaRole,\n} from '../../hooks';\n\nimport {\n portalContainerFor,\n subscribeToPortalChanges,\n} from './portalContainer';\n\n// `.maxio-overlay-trigger__overlay--portaled` sets the same layer, but the\n// stylesheet ships separately on the CDN. The inline fallback keeps portaled\n// overlays stacked when that stylesheet is older than this package; consumers\n// can still move the layer through the `--maxio-z-dropdown` token.\n// TODO: remove in the next major version, together with its assertion in\n// OverlayTrigger.test.tsx, so the class above is the only source of the layer.\n// Until then the inline value wins over the class, so per-overlay overrides\n// need the `--maxio-z-dropdown` token.\nconst PORTALED_Z_INDEX = 'var(--maxio-z-dropdown, 50)';\n\nconst FOCUSABLE_SELECTOR =\n 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"]):not(:disabled)';\n\nexport type OverlayTriggerProps = {\n /**\n * React children nodes\n */\n children: React.ReactNode;\n /**\n * Overlay element placement\n */\n placement?: Placement;\n /**\n * Render floating element in portal container\n */\n usePortal?: boolean;\n /**\n * Definition of interactions that manages displaying of overlay element\n */\n interactions?: Interactions[];\n /**\n * Floating element renderer\n */\n renderOverlay: () => React.ReactNode;\n /**\n * Defines relevant context for screen reader with ARIA attribute\n */\n role?: OverlayAriaRole;\n /**\n * Floating element offset in pixels\n */\n floatingElementOffset?: number;\n /**\n * Overlay visibility state\n */\n isActive?: boolean;\n /**\n * Overlay state change event handler\n */\n onOverlayUpdate: (isActive: boolean) => void;\n /**\n * Motion settings used for animation\n */\n motionSettings?: MotionProps;\n /**\n * Milliseconds after the overlay is automatically deactivated\n */\n autoHideMs?: number;\n /**\n * Class name for the main container\n */\n className?: string;\n /**\n * Test ID set on the main container\n * @default 'overlay-trigger'\n */\n 'data-testid'?: string;\n};\n\nconst OverlayTrigger: FC<OverlayTriggerProps> = ({\n children,\n usePortal = false,\n isActive = false,\n placement = 'top',\n interactions = ['hover'],\n role = 'tooltip',\n renderOverlay,\n floatingElementOffset,\n motionSettings = {},\n autoHideMs,\n onOverlayUpdate,\n className,\n 'data-testid': testId = 'overlay-trigger',\n}) => {\n const {\n getReferenceProps,\n getFloatingProps,\n refs: { floating, reference, floatingElement: floatingElementRef },\n isReferenceHidden,\n floatingElementCSSPosition,\n } = useOverlayTrigger({\n role,\n isActive,\n onOverlayUpdate,\n autoHideMs,\n floatingElementOffset,\n interactions,\n placement,\n // A fixed overlay is not clipped by the overflow of the containers it\n // was portaled out of.\n strategy: usePortal ? 'fixed' : 'absolute',\n // Out of its container, the overlay is only bounded by the viewport.\n shiftIntoView: usePortal,\n });\n\n // State rather than a ref, so render never reads a ref. It is set in the same\n // commit as floating-ui's own reference state, so it adds no extra render.\n const [trigger, setTrigger] = useState<HTMLElement | null>(null);\n const setReference = useCallback(\n (node: HTMLElement | null) => {\n reference(node);\n setTrigger(node);\n },\n [reference]\n );\n\n // A hidden overlay is inert, so focus inside it would drop to <body>. Hand it\n // back to whatever had focus when the overlay opened, or else to the trigger.\n const focusBeforeOpen = useRef<HTMLElement | null>(null);\n useLayoutEffect(() => {\n if (isActive) {\n focusBeforeOpen.current = document.activeElement as HTMLElement | null;\n }\n }, [isActive]);\n useLayoutEffect(() => {\n const overlay = floatingElementRef.current;\n if (!isReferenceHidden || !overlay?.contains(document.activeElement)) {\n return;\n }\n\n // The opener is only trusted when it is part of the trigger: a hover-opened\n // overlay may have stored focus from anywhere on the page. If a candidate\n // cannot take focus (disabled, inert or hidden), try the next one.\n const opener = focusBeforeOpen.current;\n const candidates = [\n ...(opener && trigger?.contains(opener) ? [opener] : []),\n ...Array.from(\n trigger?.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR) ?? []\n ),\n ];\n candidates.some((candidate) => {\n candidate.focus({ preventScroll: true });\n return document.activeElement === candidate;\n });\n }, [isReferenceHidden, floatingElementRef, trigger]);\n\n const [portalRevision, refreshPortal] = useReducer(\n (count: number) => count + 1,\n 0\n );\n useEffect(() => {\n if (!usePortal || !isActive) return undefined;\n return subscribeToPortalChanges(refreshPortal);\n }, [usePortal, isActive]);\n\n // The portal mounts on the first open, once the trigger is in the DOM, and\n // unmounts after the exit animation, so closed triggers keep no idle portal.\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(\n null\n );\n const isPortalContainerConnected = portalContainer?.isConnected ?? true;\n useLayoutEffect(() => {\n if (!usePortal || !isActive || !trigger) return;\n\n const container = portalContainerFor(trigger);\n if (container !== portalContainer) setPortalContainer(container);\n }, [\n usePortal,\n isActive,\n trigger,\n portalContainer,\n isPortalContainerConnected,\n portalRevision,\n ]);\n\n const portalThemeMode = usePortal\n ? (trigger?.closest('[data-maxio-mode]')?.getAttribute('data-maxio-mode') ??\n undefined)\n : undefined;\n const floatingElement = (\n <AnimatePresence\n onExitComplete={usePortal ? () => setPortalContainer(null) : undefined}\n >\n {isActive && (\n <motion.div\n ref={floating}\n className={cx('maxio-overlay-trigger__overlay', {\n 'maxio-overlay-trigger__overlay--portaled': usePortal,\n })}\n style={\n usePortal\n ? { ...floatingElementCSSPosition, zIndex: PORTALED_Z_INDEX }\n : floatingElementCSSPosition\n }\n inert={isReferenceHidden || undefined}\n data-maxio-mode={portalThemeMode}\n {...motionSettings}\n {...getFloatingProps()}\n >\n {renderOverlay()}\n </motion.div>\n )}\n </AnimatePresence>\n );\n\n return (\n <>\n <div\n ref={setReference}\n className={cx('maxio-inline-flex', className)}\n {...getReferenceProps()}\n data-testid={testId}\n >\n {children}\n </div>\n {usePortal\n ? portalContainer && (\n <FloatingPortal root={portalContainer}>\n {floatingElement}\n </FloatingPortal>\n )\n : floatingElement}\n </>\n );\n};\n\nexport default OverlayTrigger;\n","import { Placement } from '../../hooks';\nimport { ArrowPosition } from '../Tooltip';\n\nexport const TOOLTIP_OFFSET = 5;\nexport const TOOLTIP_TRANSFORM_BUFFER = '10px';\n\nexport const ARROW_DIRECTION_LOOKUP: Record<Placement, ArrowPosition> = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n 'top-start': 'bottom-left',\n 'top-end': 'bottom-right',\n 'right-start': 'left-top',\n 'right-end': 'left-bottom',\n 'bottom-start': 'top-left',\n 'bottom-end': 'top-right',\n 'left-start': 'right-top',\n 'left-end': 'right-bottom',\n};\n","import React, {\n FC,\n useState,\n useCallback,\n useMemo,\n useRef,\n useEffect,\n} from 'react';\n\nimport Tooltip, { TooltipProps, TOOLTIP_DEFAULT_MAX_WIDTH } from '../Tooltip';\nimport OverlayTrigger, { OverlayTriggerProps } from '../OverlayTrigger';\n\nimport { TOOLTIP_OFFSET, ARROW_DIRECTION_LOOKUP } from './constants';\nimport { createTooltipAnimation } from './utils';\nimport { childTestId } from '../../utils/testId';\n\nexport type TooltipTriggerProps = {\n /**\n * React children nodes\n */\n children: React.ReactNode;\n /**\n * Tooltip visibility state - use with useExternalState property\n */\n isVisible?: boolean;\n /**\n * Tooltip visibility state\n */\n onVisibilityUpdate?: (isVisible: boolean) => void;\n /**\n * Tooltip content renderer\n */\n renderContent: () => React.ReactNode;\n /**\n * Floating element offset\n */\n floatingElementOffset?: number;\n} & Pick<\n OverlayTriggerProps,\n | 'placement'\n | 'interactions'\n | 'usePortal'\n | 'autoHideMs'\n | 'className'\n | 'data-testid'\n> &\n Pick<TooltipProps, 'size' | 'maxWidth'>;\n\nconst DEBOUNCE_MS = 50;\n\nconst TooltipTrigger: FC<TooltipTriggerProps> = ({\n children,\n interactions = ['hover'],\n placement = 'right',\n maxWidth = TOOLTIP_DEFAULT_MAX_WIDTH,\n size = 'regular',\n renderContent,\n autoHideMs,\n isVisible,\n usePortal,\n className,\n onVisibilityUpdate,\n floatingElementOffset = TOOLTIP_OFFSET,\n 'data-testid': testId,\n}) => {\n const [isActive, setActive] = useState(false);\n const useExternalState = isVisible !== undefined;\n const debounceTimeoutRef = useRef<number | null>(null);\n\n const updateTooltipVisibility = useCallback(\n (isOpen: boolean) => {\n if (debounceTimeoutRef.current) {\n clearTimeout(debounceTimeoutRef.current);\n }\n debounceTimeoutRef.current = window.setTimeout(() => {\n if (!useExternalState) {\n setActive(isOpen);\n }\n if (onVisibilityUpdate) onVisibilityUpdate(isOpen);\n }, DEBOUNCE_MS);\n },\n [useExternalState, onVisibilityUpdate]\n );\n\n const tooltipMotion = useMemo(\n () => createTooltipAnimation(placement),\n [placement]\n );\n\n useEffect(() => {\n return () => {\n if (debounceTimeoutRef.current) {\n clearTimeout(debounceTimeoutRef.current);\n }\n };\n }, []);\n\n return (\n <OverlayTrigger\n role=\"tooltip\"\n className={className}\n floatingElementOffset={floatingElementOffset}\n motionSettings={tooltipMotion}\n isActive={useExternalState ? isVisible : isActive}\n onOverlayUpdate={updateTooltipVisibility}\n autoHideMs={autoHideMs}\n usePortal={usePortal}\n placement={placement}\n interactions={interactions}\n data-testid={testId}\n renderOverlay={() => (\n <Tooltip\n size={size}\n arrowPosition={ARROW_DIRECTION_LOOKUP[placement]}\n maxWidth={maxWidth}\n data-testid={childTestId(testId, 'tooltip')}\n >\n {renderContent()}\n </Tooltip>\n )}\n >\n {children}\n </OverlayTrigger>\n );\n};\n\nexport default TooltipTrigger;\n","import { MotionProps } from 'framer-motion';\nimport { Placement } from '../../hooks';\nimport { TOOLTIP_TRANSFORM_BUFFER } from './constants';\n\nexport const createTooltipAnimation = (placement: Placement): MotionProps => {\n const axisLetter =\n placement.startsWith('top') || placement.startsWith('bottom') ? 'Y' : 'X';\n const axisDirection =\n placement.startsWith('bottom') || placement.startsWith('right') ? '-' : '';\n\n const transformStart = `translate${axisLetter}(${axisDirection}${TOOLTIP_TRANSFORM_BUFFER})`;\n const transformEnd = `translate${axisLetter}(0px)`;\n\n const basicAnimationProps: MotionProps = {\n initial: { opacity: 0, visibility: 'hidden', transform: transformStart },\n animate: { opacity: 1, visibility: 'visible', transform: transformEnd },\n exit: { opacity: 0, visibility: 'hidden', transform: transformStart },\n transition: { ease: [0.4, 0, 0.5, 1], duration: 0.2 },\n };\n\n return basicAnimationProps;\n};\n","import React from 'react';\nimport cx from 'classnames';\nimport { VisuallyHidden } from 'react-aria';\nimport { IconButton } from '../Buttons';\nimport Icon, { IconVariant } from '../Icon';\nimport TooltipTrigger from '../TooltipTrigger';\nimport { CopyToClipboardProps } from './CopyToClipboard.types';\nimport { useCopyToClipboard, CopyFeedbackState } from './useCopyToClipboard';\n\nconst DEFAULT_RESET_MS = 2000;\n\nconst SUBTLE_CLASS = 'maxio-copy-to-clipboard--subtle';\nconst XS_CLASS = 'maxio-copy-to-clipboard--xs';\n\nconst FEEDBACK_ICON: Record<CopyFeedbackState, IconVariant> = {\n idle: 'copy-file',\n copied: 'check',\n error: 'error',\n};\n\nconst CopyToClipboard = ({\n value,\n copyLabel = 'Copy',\n copiedLabel = 'Copied!',\n copyErrorLabel = 'Copy failed',\n size = 'md',\n variant = 'ghost',\n disabled,\n resetAfterMs = DEFAULT_RESET_MS,\n tooltipPlacement = 'top',\n usePortal = true,\n onCopy,\n onCopyError,\n onClick,\n className,\n ...rest\n}: CopyToClipboardProps) => {\n const { feedbackState, feedbackLabel, announcement, handleCopy } =\n useCopyToClipboard(value, {\n copyLabel,\n copiedLabel,\n copyErrorLabel,\n resetAfterMs,\n onCopy,\n onCopyError,\n onClick,\n });\n\n return (\n <>\n <TooltipTrigger\n interactions={['hover', 'focus']}\n placement={tooltipPlacement}\n size=\"small\"\n usePortal={usePortal}\n renderContent={() => feedbackLabel}\n >\n <IconButton\n {...rest}\n aria-label={copyLabel}\n className={cx(className, {\n [SUBTLE_CLASS]: variant === 'subtle',\n [XS_CLASS]: size === 'xs',\n })}\n variant={variant === 'subtle' ? 'ghost' : variant}\n // xs is not a shared IconButton size; the scoped class above sizes\n // it, so no size class is emitted for the component to fight with.\n size={size === 'xs' ? undefined : size}\n disabled={disabled}\n onClick={handleCopy}\n trailingElement={<Icon variant={FEEDBACK_ICON[feedbackState]} />}\n />\n </TooltipTrigger>\n <VisuallyHidden>\n <span role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {announcement && (\n <span key={announcement.id}>{announcement.message}</span>\n )}\n </span>\n </VisuallyHidden>\n </>\n );\n};\n\nexport default CopyToClipboard;\n","import {\n ColumnDef,\n DisplayColumnDef,\n Header,\n Row,\n RowData,\n Table,\n} from '@tanstack/react-table';\nimport React from 'react';\nimport { FC, useMemo } from 'react';\n\nconst DEFAULT_ACTIONS_COLUMN_SIZE = 40;\nconst COMBINED_CONTROLS_COLUMN_SIZE = 72;\n\ntype UseColumnsOptions<TData> = {\n columns: ColumnDef<TData>[];\n enableExpanding?: boolean;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n actions?: (row: Row<TData>, table: Table<TData>) => React.ReactNode;\n actionsColumnSize?: number;\n HeaderControls: FC<{\n table: Table<TData>;\n header: Header<TData, unknown>;\n enableExpanding?: boolean;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n }>;\n RowControls: FC<{\n table: Table<TData>;\n row: Row<TData>;\n enableExpanding?: boolean;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n }>;\n RowActions?: FC<{\n children: React.ReactNode;\n }>;\n};\n\nexport const ROW_CONTROLS_ID = 'row-controls';\nexport const ROW_ACTIONS_ID = 'row-actions';\n\nconst useColumns = <TData extends RowData>({\n columns: originalColumns,\n HeaderControls,\n RowControls,\n RowActions,\n actions,\n actionsColumnSize,\n enableExpanding,\n enableRowSelection,\n enableRowReordering,\n}: UseColumnsOptions<TData>) => {\n const columns = useMemo(() => {\n const headerControls: DisplayColumnDef<TData> = {\n id: ROW_CONTROLS_ID,\n size:\n enableRowSelection && enableRowReordering\n ? COMBINED_CONTROLS_COLUMN_SIZE\n : DEFAULT_ACTIONS_COLUMN_SIZE,\n header: (props) => (\n <HeaderControls\n {...props}\n enableExpanding={enableExpanding}\n enableRowSelection={enableRowSelection}\n enableRowReordering={enableRowReordering}\n />\n ),\n cell: (props) => (\n <RowControls\n {...props}\n enableExpanding={enableExpanding}\n enableRowSelection={enableRowSelection}\n enableRowReordering={enableRowReordering}\n />\n ),\n meta: {\n controls: true,\n width: `${\n enableRowSelection && enableRowReordering\n ? COMBINED_CONTROLS_COLUMN_SIZE\n : DEFAULT_ACTIONS_COLUMN_SIZE\n }px`,\n },\n };\n\n const rowActions: DisplayColumnDef<TData> | null =\n actions && RowActions\n ? {\n id: ROW_ACTIONS_ID,\n size: actionsColumnSize ?? DEFAULT_ACTIONS_COLUMN_SIZE,\n header: '',\n cell: (props) => (\n <RowActions>{actions(props.row, props.table)}</RowActions>\n ),\n meta: { actions: true },\n }\n : null;\n\n let cols = [...originalColumns];\n if (enableRowSelection || enableRowReordering) {\n cols = [headerControls, ...cols];\n }\n if (rowActions) {\n cols = [...cols, rowActions];\n }\n return cols;\n }, [\n actions,\n actionsColumnSize,\n RowActions,\n enableExpanding,\n enableRowSelection,\n enableRowReordering,\n originalColumns,\n HeaderControls,\n RowControls,\n ]);\n\n return columns;\n};\n\nexport default useColumns;\n","import React, { useState } from 'react';\nimport cx from 'classnames';\nimport { TableProps } from './Table.types';\n\nconst Table = ({\n children,\n pattern,\n size,\n isExpandable,\n isUsingCustomRow,\n 'data-testid': testId,\n}: TableProps) => {\n const [showLeftShadow, setShowLeftShadow] = useState(false);\n const [showRightShadow, setShowRightShadow] = useState(false);\n\n const customPattern = pattern && isUsingCustomRow && isExpandable;\n const tableClasses = cx('maxio-data-table', {\n 'maxio-data-table--pattern': pattern && !customPattern,\n 'maxio-data-table--expanded-child-pattern': customPattern,\n 'maxio-data-table--with-custom-row': isUsingCustomRow,\n [`maxio-data-table--${size}`]: size,\n 'maxio-data-table--with-pinned-left-border': showLeftShadow,\n 'maxio-data-table--with-pinned-right-border': showRightShadow,\n });\n\n const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {\n const target = e.target as HTMLDivElement;\n setShowLeftShadow(target.scrollLeft > 0);\n setShowRightShadow(\n target.scrollWidth - target.clientWidth - target.scrollLeft > 0\n );\n };\n\n return (\n <div\n className=\"maxio-data-table-wrapper\"\n onScroll={handleScroll}\n data-testid={testId}\n >\n <table className={tableClasses}>{children}</table>\n </div>\n );\n};\n\nexport default Table;\n","import React from 'react';\nimport { TableHeadProps } from './TableHead.types';\n\nconst TableHead = ({ children }: TableHeadProps) => {\n return <thead>{children}</thead>;\n};\n\nexport default TableHead;\n","import React from 'react';\nimport { TableBodyProps } from './TableBody.types';\n\nconst TableBody = ({ children }: TableBodyProps) => {\n return <tbody>{children}</tbody>;\n};\n\nexport default TableBody;\n","import React from 'react';\nimport cx from 'classnames';\nimport { RowData } from '@tanstack/react-table';\nimport { HeaderCellProps } from './HeaderCell.types';\nimport Icon from '../../../Icon';\nimport IconButton from '../../../Buttons/IconButton';\nimport { ROW_CONTROLS_ID } from '../../hooks/useColumns';\n\nconst getSortingIcon = (isSorted: boolean, isSortedAsc: boolean) => {\n if (isSorted && isSortedAsc) {\n return 'arrow-up';\n } else if (isSorted && !isSortedAsc) {\n return 'arrow-down';\n }\n\n return 'arrow-down-up';\n};\n\nconst HeaderCell = <TData extends RowData, TValue>({\n children,\n table,\n header,\n className,\n enableExpanding,\n ...props\n}: HeaderCellProps<TData, TValue>) => {\n const column = header?.column;\n\n const columnCanSort = column?.getCanSort?.();\n const toggleSortingHandler = column?.getToggleSortingHandler?.();\n const isPlaceholder = header?.isPlaceholder;\n\n const align = column?.columnDef?.meta?.align;\n const width = column?.columnDef?.meta?.width;\n const controls = column?.columnDef?.meta?.controls;\n const actions = column?.columnDef?.meta?.actions;\n\n const columnPinned = column?.getIsPinned();\n const isColumnSorted = column?.getIsSorted();\n const isSortedAsc = isColumnSorted === 'asc';\n\n const headerCellClasses = cx('maxio-data-table__cell', className, {\n [`maxio-data-table__cell--pinned-${columnPinned}`]: columnPinned,\n 'maxio-data-table__cell--sortable': columnCanSort,\n 'maxio-data-table__cell--active': isColumnSorted,\n [`maxio-data-table__cell--${align}`]: align,\n [`maxio-data-table__cell--controls`]: controls,\n [`maxio-data-table__cell--actions`]: actions,\n });\n\n const pinnedStyle =\n columnPinned === 'left'\n ? { left: column?.getStart('left') }\n : columnPinned === 'right'\n ? { right: column?.getAfter('right') }\n : {};\n\n const style = { ...(width ? { width } : {}), ...pinnedStyle };\n const sortingIcon = getSortingIcon(!!isColumnSorted, isSortedAsc);\n\n // Row Expansion\n const toggleExpandedHandler = table?.getToggleAllRowsExpandedHandler();\n const isAllExpanded = table?.getIsAllRowsExpanded?.();\n const expandColumnIndex =\n header?.headerGroup.headers[0].id === ROW_CONTROLS_ID ? 1 : 0;\n const isExpandColumn = enableExpanding && header?.index === expandColumnIndex;\n\n if (isPlaceholder) {\n return null;\n }\n\n return (\n <th\n scope=\"col\"\n role=\"columnheader\"\n aria-sort={\n isColumnSorted ? (isSortedAsc ? 'ascending' : 'descending') : 'none'\n }\n className={headerCellClasses}\n onClick={toggleSortingHandler}\n colSpan={header?.colSpan}\n style={style}\n {...props}\n >\n <div className=\"maxio-data-table__cell-flex\">\n {enableExpanding === true && isExpandColumn && (\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n icon={\n <Icon\n size=\"xs\"\n variant={isAllExpanded ? 'chevron-down' : 'chevron-right'}\n />\n }\n onClick={toggleExpandedHandler}\n aria-label={isAllExpanded ? 'Collapse all rows' : 'Expand all rows'}\n data-open={isAllExpanded}\n className=\"maxio-data-table__expand-button\"\n />\n )}\n {children}\n {columnCanSort && (\n <Icon variant={sortingIcon} className=\"maxio-data-table__sort-icon\" />\n )}\n </div>\n </th>\n );\n};\n\nexport default HeaderCell;\n","import { RowData } from '@tanstack/react-table';\nimport {\n RowReorderLocation,\n RowReorderMode,\n RowReorderPosition,\n} from '../DataTable.types';\n\nexport type ReorderableRow<TData extends RowData> = {\n depth: number;\n id: string;\n index: number;\n original: TData;\n parentId?: string;\n};\n\nexport type TreeReorderResult<TData extends RowData> = {\n data: TData[];\n source: RowReorderLocation;\n destination: RowReorderLocation;\n};\n\ntype TreeNode<TData> = TData & { subRows?: TData[] };\n\nconst getSubRows = <TData extends RowData>(item: TData) =>\n (item as TreeNode<TData>).subRows ?? [];\n\nconst withSubRows = <TData extends RowData>(item: TData, subRows: TData[]) =>\n Object.assign({}, item, { subRows }) as TData;\n\nexport const isRowReorderAllowed = <TData extends RowData>(\n row: ReorderableRow<TData>,\n targetRow: ReorderableRow<TData>,\n position: RowReorderPosition,\n mode: RowReorderMode\n) => {\n if (mode === 'all') {\n return true;\n }\n\n if (mode === 'siblings') {\n return (\n position !== 'inside' &&\n (row.parentId ?? null) === (targetRow.parentId ?? null)\n );\n }\n\n return position === 'inside'\n ? row.depth === targetRow.depth + 1\n : row.depth === targetRow.depth;\n};\n\nconst findPath = <TData extends RowData>(\n items: TData[],\n item: TData,\n parentPath: number[] = []\n): number[] | null => {\n for (let index = 0; index < items.length; index += 1) {\n const current = items[index];\n const path = [...parentPath, index];\n\n if (current === item) {\n return path;\n }\n\n const childPath = findPath(getSubRows(current), item, path);\n if (childPath) {\n return childPath;\n }\n }\n\n return null;\n};\n\nconst isPathPrefix = (parent: number[], child: number[]) =>\n parent.length < child.length &&\n parent.every((segment, index) => child[index] === segment);\n\nconst adjustPathAfterRemoval = (targetPath: number[], sourcePath: number[]) => {\n const adjusted = [...targetPath];\n const sourceIndexDepth = sourcePath.length - 1;\n const sharesSourceParent =\n sourceIndexDepth >= 0 &&\n targetPath.length > sourceIndexDepth &&\n sourcePath\n .slice(0, sourceIndexDepth)\n .every((segment, index) => targetPath[index] === segment);\n\n if (\n sharesSourceParent &&\n sourcePath[sourceIndexDepth] < targetPath[sourceIndexDepth]\n ) {\n adjusted[sourceIndexDepth] -= 1;\n }\n\n return adjusted;\n};\n\nconst removeAtPath = <TData extends RowData>(\n items: TData[],\n path: number[]\n): { data: TData[]; item: TData } | null => {\n const [index, ...childPath] = path;\n const item = items[index];\n if (!item) {\n return null;\n }\n\n const data = [...items];\n if (childPath.length === 0) {\n data.splice(index, 1);\n return { data, item };\n }\n\n const childResult = removeAtPath(getSubRows(item), childPath);\n if (!childResult) {\n return null;\n }\n\n data[index] = withSubRows(item, childResult.data);\n return { data, item: childResult.item };\n};\n\nconst insertAtPath = <TData extends RowData>(\n items: TData[],\n parentPath: number[],\n index: number,\n item: TData\n): TData[] | null => {\n const data = [...items];\n if (parentPath.length === 0) {\n data.splice(index, 0, item);\n return data;\n }\n\n const [parentIndex, ...childPath] = parentPath;\n const parent = items[parentIndex];\n if (!parent) {\n return null;\n }\n\n const children = insertAtPath(getSubRows(parent), childPath, index, item);\n if (!children) {\n return null;\n }\n\n data[parentIndex] = withSubRows(parent, children);\n return data;\n};\n\nexport const reorderTree = <TData extends RowData>(\n data: TData[],\n row: ReorderableRow<TData>,\n targetRow: ReorderableRow<TData>,\n position: RowReorderPosition,\n mode: RowReorderMode\n): TreeReorderResult<TData> | null => {\n if (\n row.id === targetRow.id ||\n !isRowReorderAllowed(row, targetRow, position, mode)\n ) {\n return null;\n }\n\n const sourcePath = findPath(data, row.original);\n const targetPath = findPath(data, targetRow.original);\n if (!sourcePath || !targetPath || isPathPrefix(sourcePath, targetPath)) {\n return null;\n }\n\n const removal = removeAtPath(data, sourcePath);\n if (!removal) {\n return null;\n }\n\n const adjustedTargetPath = adjustPathAfterRemoval(targetPath, sourcePath);\n const targetIndex = adjustedTargetPath[adjustedTargetPath.length - 1];\n if (targetIndex === undefined) {\n return null;\n }\n\n const parentPath =\n position === 'inside'\n ? adjustedTargetPath\n : adjustedTargetPath.slice(0, -1);\n const targetItem = getItemAtPath(removal.data, adjustedTargetPath);\n if (!targetItem) {\n return null;\n }\n const destinationIndex =\n position === 'inside'\n ? getSubRows(targetItem).length\n : targetIndex + (position === 'after' ? 1 : 0);\n const destination: RowReorderLocation = {\n parentRowId:\n position === 'inside' ? targetRow.id : (targetRow.parentId ?? null),\n index: destinationIndex,\n };\n const source: RowReorderLocation = {\n parentRowId: row.parentId ?? null,\n index: row.index,\n };\n\n if (\n source.parentRowId === destination.parentRowId &&\n source.index === destination.index\n ) {\n return null;\n }\n\n const reordered = insertAtPath(\n removal.data,\n parentPath,\n destinationIndex,\n removal.item\n );\n return reordered ? { data: reordered, source, destination } : null;\n};\n\nconst getItemAtPath = <TData extends RowData>(\n items: TData[],\n path: number[]\n): TData | undefined => {\n let currentItems = items;\n let current: TData | undefined;\n\n for (const index of path) {\n current = currentItems[index];\n if (!current) {\n return undefined;\n }\n currentItems = getSubRows(current);\n }\n\n return current;\n};\n","import React, {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Row, RowData, Table } from '@tanstack/react-table';\nimport {\n draggable,\n dropTargetForElements,\n monitorForElements,\n type ElementDropTargetGetFeedbackArgs,\n} from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport {\n attachInstruction,\n extractInstruction,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';\nimport {\n RowReorderEvent,\n RowReorderMode,\n RowReorderPosition,\n} from '../DataTable.types';\nimport { RowReorderAvailability } from '../utils/rowReorderAvailability';\nimport { reorderTree } from '../utils/rowReordering';\n\nconst ROW_DRAG_TYPE = 'maxio-data-table-row';\nconst INDENT_PER_LEVEL = 24;\nconst AUTO_EXPAND_DELAY = 500;\n\ntype DragData = {\n type: typeof ROW_DRAG_TYPE;\n instanceId: string;\n rowId: string;\n};\n\ntype ReorderTarget = {\n rowId: string;\n position: RowReorderPosition;\n};\n\ntype RowReorderAction = {\n id: string;\n label: string;\n target: ReorderTarget;\n};\n\ntype RowReorderContextValue<TData extends RowData> = {\n activeTarget: ReorderTarget | null;\n availability: RowReorderAvailability;\n draggingRowId: string | null;\n getActions: (row: Row<TData>) => RowReorderAction[];\n getLabel: (row: Row<TData>) => string;\n hasActions: (row: Row<TData>) => boolean;\n moveRow: (rowId: string, target: ReorderTarget) => boolean;\n registerHandle: (row: Row<TData>, element: HTMLButtonElement) => () => void;\n registerRow: (row: Row<TData>, element: HTMLTableRowElement) => () => void;\n};\n\nconst RowReorderContext = createContext<unknown>(null);\n\nexport const useRowReorderContext = <TData extends RowData>() =>\n useContext(RowReorderContext) as RowReorderContextValue<TData> | null;\n\ntype RowReorderProviderProps<TData extends RowData> = {\n availability: RowReorderAvailability;\n children: React.ReactNode;\n data: TData[];\n enableExpanding: boolean;\n getRowReorderLabel?: (row: Row<TData>) => string;\n onRowReorder: (event: RowReorderEvent<TData>) => void;\n rowReorderMode: RowReorderMode;\n table: Table<TData>;\n};\n\nconst isDragData = (\n data: Record<string, unknown>\n): data is Record<string, unknown> & DragData =>\n data.type === ROW_DRAG_TYPE &&\n typeof data.instanceId === 'string' &&\n typeof data.rowId === 'string';\n\nconst instructionToPosition = (\n data: Record<string | symbol, unknown>\n): RowReorderPosition | null => {\n const instruction = extractInstruction(data);\n if (!instruction || instruction.type === 'instruction-blocked') {\n return null;\n }\n\n if (instruction.type === 'reorder-above') {\n return 'before';\n }\n if (instruction.type === 'reorder-below') {\n return 'after';\n }\n if (instruction.type === 'make-child') {\n return 'inside';\n }\n return null;\n};\n\nconst getTargetFromData = (\n data: Record<string | symbol, unknown>\n): ReorderTarget | null => {\n const position = instructionToPosition(data);\n return typeof data.rowId === 'string' && position\n ? { rowId: data.rowId, position }\n : null;\n};\n\nconst destinationDescription = (label: string, position: RowReorderPosition) =>\n position === 'inside' ? `inside ${label}` : `${position} ${label}`;\n\nconst RowReorderProvider = <TData extends RowData>({\n availability,\n children,\n data,\n enableExpanding,\n getRowReorderLabel,\n onRowReorder,\n rowReorderMode,\n table,\n}: RowReorderProviderProps<TData>) => {\n const generatedId = useId();\n const instanceId = `maxio-data-table-${generatedId}`;\n const [announcement, setAnnouncement] = useState('');\n const [activeTarget, setActiveTarget] = useState<ReorderTarget | null>(null);\n const [draggingRowId, setDraggingRowId] = useState<string | null>(null);\n const activeTargetRef = useRef<ReorderTarget | null>(null);\n\n const getRow = useCallback(\n (rowId: string) => table.getCoreRowModel().rowsById[rowId],\n [table]\n );\n const getLabel = useCallback(\n (row: Row<TData>) => getRowReorderLabel?.(row) ?? row.id,\n [getRowReorderLabel]\n );\n\n const getMove = useCallback(\n (sourceRowId: string, target: ReorderTarget) => {\n const row = getRow(sourceRowId);\n const targetRow = getRow(target.rowId);\n if (!row || !targetRow) {\n return null;\n }\n const result = reorderTree(\n data,\n row,\n targetRow,\n target.position,\n rowReorderMode\n );\n if (\n result &&\n !enableExpanding &&\n result.destination.parentRowId !== null &&\n result.destination.parentRowId !== result.source.parentRowId\n ) {\n return null;\n }\n return result;\n },\n [data, enableExpanding, getRow, rowReorderMode]\n );\n\n const updateActiveTarget = useCallback((target: ReorderTarget | null) => {\n activeTargetRef.current = target;\n setActiveTarget(target);\n }, []);\n\n const commitMove = useCallback(\n (sourceRowId: string, target: ReorderTarget) => {\n const row = getRow(sourceRowId);\n const targetRow = getRow(target.rowId);\n const result = getMove(sourceRowId, target);\n if (!row || !targetRow || !result) {\n setAnnouncement('That row cannot be moved to this position.');\n return false;\n }\n\n onRowReorder({\n ...result,\n row,\n rowId: row.id,\n targetRow,\n targetRowId: targetRow.id,\n position: target.position,\n });\n setAnnouncement(\n `${getLabel(row)} moved ${destinationDescription(\n getLabel(targetRow),\n target.position\n )}.`\n );\n return true;\n },\n [getLabel, getMove, getRow, onRowReorder]\n );\n\n const getDropData = useCallback(\n (\n row: Row<TData>,\n { input, element, source }: ElementDropTargetGetFeedbackArgs\n ) => {\n const baseData = { rowId: row.id, instanceId };\n const dataWithInstruction = attachInstruction(baseData, {\n element,\n input,\n currentLevel: row.depth,\n indentPerLevel: INDENT_PER_LEVEL,\n mode: 'standard',\n });\n const target = getTargetFromData(dataWithInstruction);\n const isValid =\n isDragData(source.data) &&\n source.data.instanceId === instanceId &&\n Boolean(target && getMove(source.data.rowId, target));\n\n return { ...dataWithInstruction, isValid };\n },\n [getMove, instanceId]\n );\n\n const registerRow = useCallback(\n (row: Row<TData>, element: HTMLTableRowElement) => {\n if (!availability.available) {\n return () => undefined;\n }\n\n const setTargetFromPayload = (data: Record<string | symbol, unknown>) => {\n const target = data.isValid ? getTargetFromData(data) : null;\n updateActiveTarget(target);\n };\n\n return dropTargetForElements({\n element,\n canDrop: ({ source }) =>\n isDragData(source.data) &&\n source.data.instanceId === instanceId &&\n source.data.rowId !== row.id &&\n !row\n .getParentRows()\n .some((parent) => parent.id === source.data.rowId),\n getData: (args) => getDropData(row, args),\n onDragEnter: ({ self }) => setTargetFromPayload(self.data),\n onDrag: ({ self }) => setTargetFromPayload(self.data),\n onDragLeave: () => {\n if (activeTargetRef.current?.rowId === row.id) {\n updateActiveTarget(null);\n }\n },\n });\n },\n [availability, getDropData, instanceId, updateActiveTarget]\n );\n\n const registerHandle = useCallback(\n (row: Row<TData>, element: HTMLButtonElement) => {\n const rowElement = element.closest('tr');\n if (!availability.available || !(rowElement instanceof HTMLElement)) {\n return () => undefined;\n }\n\n return draggable({\n element: rowElement,\n dragHandle: element,\n getInitialData: (): DragData => ({\n type: ROW_DRAG_TYPE,\n instanceId,\n rowId: row.id,\n }),\n onGenerateDragPreview: ({ nativeSetDragImage }) => {\n setCustomNativeDragPreview({\n nativeSetDragImage,\n render: ({ container }) => {\n const preview = document.createElement('div');\n preview.className = 'maxio-data-table__drag-preview';\n preview.textContent = getLabel(row);\n preview.setAttribute('aria-hidden', 'true');\n container.append(preview);\n\n return () => preview.remove();\n },\n });\n },\n });\n },\n [availability, getLabel, instanceId]\n );\n\n useEffect(() => {\n if (!availability.available) {\n return;\n }\n\n return monitorForElements({\n canMonitor: ({ source }) =>\n isDragData(source.data) && source.data.instanceId === instanceId,\n onDragStart: ({ source }) => {\n if (!isDragData(source.data)) {\n return;\n }\n const row = getRow(source.data.rowId);\n setDraggingRowId(source.data.rowId);\n if (row) {\n setAnnouncement(`${getLabel(row)} grabbed. Choose a destination.`);\n }\n },\n onDrop: ({ source, location }) => {\n if (isDragData(source.data)) {\n const targetData = location.current.dropTargets[0]?.data;\n const target =\n targetData?.isValid === true ? getTargetFromData(targetData) : null;\n if (target) {\n commitMove(source.data.rowId, target);\n } else {\n setAnnouncement('Row move cancelled.');\n }\n }\n setDraggingRowId(null);\n updateActiveTarget(null);\n },\n });\n }, [\n commitMove,\n availability,\n getLabel,\n getRow,\n instanceId,\n updateActiveTarget,\n ]);\n\n useEffect(() => {\n if (activeTarget?.position !== 'inside') {\n return;\n }\n\n const row = getRow(activeTarget.rowId);\n if (!row?.getCanExpand() || row.getIsExpanded()) {\n return;\n }\n\n const timeout = window.setTimeout(\n () => row.toggleExpanded(true),\n AUTO_EXPAND_DELAY\n );\n return () => window.clearTimeout(timeout);\n }, [activeTarget, getRow]);\n\n const getActions = useCallback(\n (row: Row<TData>) => {\n if (!availability.available) {\n return [];\n }\n\n const parent = row.parentId ? getRow(row.parentId) : null;\n const siblings = parent?.subRows ?? table.getCoreRowModel().rows;\n const index = siblings.findIndex((sibling) => sibling.id === row.id);\n if (index === -1) {\n return [];\n }\n\n const previousSibling = siblings[index - 1];\n const nextSibling = siblings[index + 1];\n const firstSibling = siblings[0];\n const lastSibling = siblings[siblings.length - 1];\n const candidates: RowReorderAction[] = [];\n\n if (index > 1 && firstSibling) {\n candidates.push({\n id: 'top',\n label: 'Move to top',\n target: { rowId: firstSibling.id, position: 'before' },\n });\n }\n if (previousSibling) {\n candidates.push({\n id: 'up',\n label: 'Move up',\n target: { rowId: previousSibling.id, position: 'before' },\n });\n }\n if (nextSibling) {\n candidates.push({\n id: 'down',\n label: 'Move down',\n target: { rowId: nextSibling.id, position: 'after' },\n });\n }\n if (index < siblings.length - 2 && lastSibling) {\n candidates.push({\n id: 'bottom',\n label: 'Move to bottom',\n target: { rowId: lastSibling.id, position: 'after' },\n });\n }\n\n if (parent) {\n let rootAncestor = parent;\n while (rootAncestor.parentId) {\n const nextAncestor = getRow(rootAncestor.parentId);\n if (!nextAncestor) {\n break;\n }\n rootAncestor = nextAncestor;\n }\n candidates.push({\n id: 'move-to-root',\n label: 'Move to root',\n target: { rowId: rootAncestor.id, position: 'after' },\n });\n }\n\n table.getCoreRowModel().flatRows.forEach((targetRow) => {\n if (targetRow.id !== row.parentId) {\n candidates.push({\n id: `move-to:${targetRow.id}`,\n label: `Move to ${getLabel(targetRow)}`,\n target: { rowId: targetRow.id, position: 'inside' },\n });\n }\n });\n\n return candidates.filter((action) =>\n Boolean(getMove(row.id, action.target))\n );\n },\n [availability, getLabel, getMove, getRow, table]\n );\n\n const hasActions = useCallback(\n (row: Row<TData>) => {\n if (!availability.available) {\n return false;\n }\n\n const parent = row.parentId ? getRow(row.parentId) : null;\n const siblings = parent?.subRows ?? table.getCoreRowModel().rows;\n if (siblings.length > 1) {\n return true;\n }\n\n if (rowReorderMode === 'siblings') {\n return false;\n }\n if (rowReorderMode === 'all') {\n return Boolean(parent);\n }\n if (!enableExpanding || row.depth === 0) {\n return false;\n }\n\n return table\n .getCoreRowModel()\n .flatRows.some(\n (targetRow) =>\n targetRow.depth === row.depth - 1 && targetRow.id !== row.parentId\n );\n },\n [availability, enableExpanding, getRow, rowReorderMode, table]\n );\n\n const value = useMemo<RowReorderContextValue<TData>>(\n () => ({\n activeTarget,\n availability,\n draggingRowId,\n getActions,\n getLabel,\n hasActions,\n moveRow: commitMove,\n registerHandle,\n registerRow,\n }),\n [\n activeTarget,\n availability,\n commitMove,\n draggingRowId,\n getActions,\n getLabel,\n hasActions,\n registerHandle,\n registerRow,\n ]\n );\n\n return (\n <RowReorderContext.Provider value={value}>\n {children}\n <span\n className=\"maxio-data-table__live-region\"\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {announcement}\n </span>\n </RowReorderContext.Provider>\n );\n};\n\nexport default RowReorderProvider;\n","import React from 'react';\nimport cx from 'classnames';\nimport { TableRowProps } from './TableRow.types';\nimport { RowData } from '@tanstack/react-table';\nimport { mergeProps, useFocusRing, usePress } from 'react-aria';\nimport { useRowReorderContext } from '../../hooks/useRowReordering';\n\nconst interactiveElementSelector =\n 'a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions';\n\nconst isInteractiveTarget = (target: EventTarget | null) =>\n target instanceof Element &&\n Boolean(target.closest(interactiveElementSelector));\n\nconst TableRow = <TData extends RowData>({\n children,\n row,\n isChild,\n isHeader,\n className,\n onRowAction,\n ...props\n}: TableRowProps<TData>) => {\n const isSelected = row?.getIsSelected?.();\n const isExpanded = row?.getCanExpand?.() && row?.getIsExpanded?.();\n const isActionable = Boolean(row && onRowAction && !isHeader && !isChild);\n const rowRef = React.useRef<HTMLTableRowElement>(null);\n const reorderContext = useRowReorderContext<TData>();\n const registerRow = reorderContext?.registerRow;\n const originalTargetRef = React.useRef<EventTarget | null>(null);\n const captureOriginalTarget = (\n event: React.SyntheticEvent<HTMLTableRowElement>\n ) => {\n originalTargetRef.current = event.target;\n };\n const { pressProps } = usePress({\n isDisabled: !isActionable,\n onPress: (event) => {\n const target = originalTargetRef.current ?? event.target;\n originalTargetRef.current = null;\n\n if (row && onRowAction && !isInteractiveTarget(target)) {\n onRowAction(row);\n }\n },\n });\n const { focusProps, isFocused } = useFocusRing();\n\n const tableRowClasses = cx(\n {\n 'maxio-data-table__row': !isHeader,\n 'maxio-data-table__header-row': isHeader,\n 'maxio-data-table__row--active': isSelected || isFocused,\n 'maxio-data-table__row--expanded': isExpanded,\n 'maxio-data-table__row--expanded-child': isChild,\n 'maxio-data-table__row--actionable': isActionable,\n 'maxio-data-table__row--dragging':\n Boolean(row) && reorderContext?.draggingRowId === row?.id,\n [`maxio-data-table__row--drop-${reorderContext?.activeTarget?.position}`]:\n Boolean(row) && reorderContext?.activeTarget?.rowId === row?.id,\n },\n className\n );\n\n React.useEffect(() => {\n if (!row || !registerRow || !rowRef.current || isHeader || isChild) {\n return;\n }\n return registerRow(row, rowRef.current);\n }, [isChild, isHeader, registerRow, row]);\n\n const rowProps = isActionable\n ? mergeProps(\n {\n onClickCapture: captureOriginalTarget,\n onKeyDownCapture: captureOriginalTarget,\n tabIndex: 0,\n },\n pressProps,\n focusProps,\n props\n )\n : props;\n\n return (\n <tr\n {...rowProps}\n ref={rowRef}\n className={tableRowClasses}\n tabIndex={isActionable ? rowProps.tabIndex : props.tabIndex}\n >\n {children}\n </tr>\n );\n};\n\nexport default TableRow;\n","import { CheckboxGroupState } from '@react-stately/checkbox';\nimport { createContext, useContext } from 'react';\n\nexport const CheckboxGroupContext = createContext({} as CheckboxGroupState);\nexport const useCheckboxGroup = () => useContext(CheckboxGroupContext);\n","import React, { forwardRef, InputHTMLAttributes } from 'react';\nimport cx from 'classnames';\nimport { CheckboxProps } from '../types';\n\ninterface InnerCheckboxProps extends CheckboxProps {\n inputProps: InputHTMLAttributes<HTMLInputElement>;\n invalid: boolean;\n}\n\nconst InnerCheckbox = forwardRef<HTMLInputElement, InnerCheckboxProps>(\n (\n {\n checked,\n disabled,\n invalid,\n indeterminate,\n className,\n inputProps,\n error,\n label,\n },\n ref\n ) => {\n const containerClassNames = cx(\n 'maxio-checkbox',\n {\n 'maxio-checkbox--checked': checked,\n 'maxio-checkbox--disabled': disabled,\n 'maxio-checkbox--error': invalid,\n 'maxio-checkbox--indeterminate': indeterminate,\n },\n className\n );\n\n return (\n <label className={containerClassNames}>\n <input\n type=\"checkbox\"\n role=\"checkbox\"\n className=\"maxio-checkbox__input\"\n ref={ref}\n {...inputProps}\n />\n <span className=\"maxio-checkbox__control\">\n {error && <span className=\"maxio-checkbox__control-error\" />}\n </span>\n {label && <span className=\"maxio-checkbox__label\">{label}</span>}\n </label>\n );\n }\n);\nInnerCheckbox.displayName = 'InnerCheckbox';\n\nexport default InnerCheckbox;\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport React, { useRef } from 'react';\nimport { useCheckbox, useCheckboxGroupItem } from 'react-aria';\nimport { useToggleState } from '@react-stately/toggle';\nimport { useCheckboxGroup } from '../contexts';\nimport { CheckboxProps } from './types';\nimport InnerCheckbox from './InnerCheckbox';\n\nconst Checkbox = ({\n label,\n error = false,\n className,\n indeterminate,\n value = '',\n disabled,\n readOnly,\n defaultChecked,\n checked,\n ...props\n}: CheckboxProps) => {\n const ref = useRef(null);\n const state = useCheckboxGroup();\n\n const { inputProps, isDisabled, isInvalid, isSelected } =\n state && Object.keys(state).length > 0\n ? useCheckboxGroupItem(\n {\n value,\n 'aria-label': label ?? props['aria-label'],\n isDisabled: disabled,\n isInvalid: error,\n isIndeterminate: indeterminate,\n isReadOnly: readOnly,\n ...props,\n },\n state,\n ref\n )\n : useCheckbox(\n {\n 'aria-label': label ?? props['aria-label'],\n isDisabled: disabled,\n isInvalid: error,\n isIndeterminate: indeterminate,\n isReadOnly: readOnly,\n value,\n ...props,\n },\n useToggleState({\n ...props,\n isSelected: checked,\n defaultSelected: defaultChecked,\n }),\n ref\n );\n\n return (\n <InnerCheckbox\n inputProps={inputProps}\n checked={isSelected}\n disabled={isDisabled}\n invalid={isInvalid}\n indeterminate={indeterminate}\n className={className}\n error={error}\n label={label}\n ref={ref}\n {...props}\n />\n );\n};\n\nexport default Checkbox;\n","import React from 'react';\nimport cx from 'classnames';\n\nconst FormHelperText = ({\n children,\n className,\n ...props\n}: React.HtmlHTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cx('maxio-form-helper-text', className)} {...props}>\n {children}\n </div>\n );\n};\n\nexport default FormHelperText;\n","import React from 'react';\nimport cx from 'classnames';\nimport Icon from '../../Icon';\n\ntype FormErrorMessageProps = React.HtmlHTMLAttributes<HTMLDivElement>;\n\nconst FormErrorMessage = ({\n children,\n className,\n ...props\n}: FormErrorMessageProps) => {\n return (\n <div className={cx('maxio-form-error', className)} {...props}>\n <Icon variant=\"warning-circle-fill\" className=\"maxio-form-error__icon\" />\n <div className=\"maxio-form-error__text\">{children}</div>\n </div>\n );\n};\n\nexport default FormErrorMessage;\n","import React from 'react';\nimport { Checkbox } from '../../../forms/Checkbox';\nimport { Row, RowData, Table } from '@tanstack/react-table';\n\nexport type HeaderControlsProps<TData> = {\n table: Table<TData>;\n enableExpanding?: boolean;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n};\n\nconst HeaderControls = <TData extends RowData>({\n table,\n enableRowSelection,\n enableRowReordering,\n}: HeaderControlsProps<TData>) => {\n // Row Selection\n const toggleSelectAll = table?.getToggleAllPageRowsSelectedHandler?.();\n const handleToggleSelectAll = (\n input: boolean | React.ChangeEvent<HTMLInputElement>\n ) => {\n toggleSelectAll(\n typeof input === 'boolean' ? { target: { checked: input } } : input\n );\n };\n\n const isAllPageRowsSelected =\n table?.getIsAllPageRowsSelected?.() || table?.getIsAllRowsSelected?.();\n const isSomePageRowsSelected = table?.getIsSomePageRowsSelected?.();\n\n if (!enableRowSelection) {\n return null;\n }\n\n return (\n <>\n {enableRowReordering && (\n <span\n className=\"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon\"\n aria-hidden=\"true\"\n style={{ visibility: 'hidden' }}\n />\n )}\n <Checkbox\n aria-label=\"Select all rows\"\n onChange={handleToggleSelectAll}\n checked={isAllPageRowsSelected}\n indeterminate={isAllPageRowsSelected ? false : isSomePageRowsSelected}\n />\n </>\n );\n};\n\nexport default HeaderControls;\n","import React from 'react';\nimport { Popover as AriaPopover, OverlayArrow } from 'react-aria-components';\nimport cx from 'classnames';\n\nimport type { PopoverProps } from './types';\n\nconst Popover = ({\n className,\n hideArrow = false,\n children,\n offset = 4,\n ...props\n}: PopoverProps) => {\n return (\n <AriaPopover\n {...props}\n className={cx('maxio-popover', className)}\n offset={offset}\n >\n <>\n {!hideArrow && (\n <OverlayArrow className=\"maxio-popover__arrow\">\n <svg width={12} height={12} viewBox=\"0 0 12 12\" aria-hidden>\n <path d=\"M0 0 L6 6 L12 0\" />\n </svg>\n </OverlayArrow>\n )}\n {children}\n </>\n </AriaPopover>\n );\n};\n\nexport default Popover;\n","import React from 'react';\nimport { Checkbox } from '../../../forms/Checkbox';\nimport { Row, RowData, Table } from '@tanstack/react-table';\nimport {\n Button,\n Menu,\n MenuItem,\n MenuTrigger,\n Tooltip,\n TooltipTrigger,\n} from 'react-aria-components';\nimport { Popover } from '../../../Popover';\nimport { useRowReorderContext } from '../../hooks/useRowReordering';\n\nexport type RowControlsProps<TData> = {\n table: Table<TData>;\n row: Row<TData>;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableRowReordering?: boolean;\n};\n\ntype RowReorderHandleProps<TData extends RowData> = {\n row: Row<TData>;\n};\n\nconst RowReorderHandle = <TData extends RowData>({\n row,\n}: RowReorderHandleProps<TData>) => {\n const context = useRowReorderContext<TData>();\n const registerHandle = context?.registerHandle;\n const getActions = context?.getActions;\n const hasActions = context?.hasActions;\n const ref = React.useRef<HTMLButtonElement>(null);\n const [isMenuOpen, setIsMenuOpen] = React.useState(false);\n const isDragging = context?.draggingRowId === row.id;\n const label = context?.getLabel(row) ?? row.id;\n const hasAvailableActions = React.useMemo(\n () => hasActions?.(row) ?? false,\n [hasActions, row]\n );\n const actions = React.useMemo(\n () => (isMenuOpen ? (getActions?.(row) ?? []) : []),\n [getActions, isMenuOpen, row]\n );\n const unavailableMessage =\n (context && !context.availability.available\n ? context.availability.message\n : undefined) ??\n (!hasAvailableActions ? `No moves are available for ${label}.` : undefined);\n\n React.useEffect(() => {\n if (!registerHandle || !ref.current || unavailableMessage) {\n return;\n }\n return registerHandle(row, ref.current);\n }, [registerHandle, row, unavailableMessage]);\n\n React.useEffect(() => {\n if (unavailableMessage) {\n setIsMenuOpen(false);\n }\n }, [unavailableMessage]);\n\n const handle = (\n <Button\n ref={ref}\n type=\"button\"\n className=\"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon maxio-data-table__drag-handle\"\n aria-label={`Reorder ${label}`}\n aria-pressed={isDragging}\n aria-disabled={unavailableMessage ? true : undefined}\n onPress={() => {\n if (!unavailableMessage) {\n setIsMenuOpen(true);\n }\n }}\n >\n <i\n className={`fa-sharp fa-solid fa-grip-dots-vertical ${unavailableMessage ? 'maxio-icon--disabled' : 'maxio-icon--secondary'}`}\n />\n </Button>\n );\n\n if (unavailableMessage) {\n return (\n <TooltipTrigger delay={0} closeDelay={0}>\n {handle}\n <Tooltip\n placement=\"bottom start\"\n offset={8}\n className=\"maxio-tooltip maxio-tooltip--arrow-top-left\"\n >\n <div className=\"maxio-tooltip__content\">{unavailableMessage}</div>\n </Tooltip>\n </TooltipTrigger>\n );\n }\n\n return (\n // Long-press defers menu opening so pointer dragging can start first.\n <MenuTrigger\n trigger=\"longPress\"\n isOpen={isMenuOpen}\n onOpenChange={setIsMenuOpen}\n >\n {handle}\n <Popover placement=\"bottom start\" hideArrow>\n <Menu\n autoFocus=\"first\"\n className=\"maxio-data-table__reorder-menu\"\n items={actions}\n onAction={(key) => {\n const action = actions.find((item) => item.id === key);\n if (!action) {\n return;\n }\n context?.moveRow(row.id, action.target);\n requestAnimationFrame(() => ref.current?.focus());\n }}\n >\n {(action) => (\n <MenuItem\n id={action.id}\n textValue={action.label}\n className=\"maxio-data-table__reorder-menu-item\"\n >\n {action.label}\n </MenuItem>\n )}\n </Menu>\n </Popover>\n </MenuTrigger>\n );\n};\n\nconst RowControls = <TData extends RowData>({\n row,\n enableRowSelection,\n enableRowReordering,\n}: RowControlsProps<TData>) => {\n // Row Selection\n const toggleSelectHandler = row?.getToggleSelectedHandler?.();\n const isSelected = row?.getIsSelected?.() || row?.getIsAllSubRowsSelected?.();\n const isSomeSubRowsSelected = row?.getIsSomeSelected?.();\n const id = row.id || row.index;\n\n return (\n <>\n {enableRowReordering && <RowReorderHandle row={row} />}\n {enableRowSelection && (\n <Checkbox\n aria-label={`Select row ${id}`}\n onChange={toggleSelectHandler}\n checked={isSelected}\n indeterminate={isSomeSubRowsSelected}\n />\n )}\n </>\n );\n};\n\nexport default RowControls;\n","import React from 'react';\n\nexport type RowActionsProps = {\n children: React.ReactNode;\n};\n\nconst RowActions = ({ children }: RowActionsProps) => {\n return <div className=\"maxio-data-table__cell-flex\">{children}</div>;\n};\n\nexport default RowActions;\n","import React from 'react';\nimport cx from 'classnames';\nimport { Cell, Row, RowData, Table } from '@tanstack/react-table';\n\ntype TableCellProps<\n TData extends RowData,\n TValue,\n> = React.TdHTMLAttributes<HTMLTableCellElement> & {\n table?: Table<TData>;\n row?: Row<TData>;\n cell?: Cell<TData, TValue>;\n children?: React.ReactNode;\n};\n\nconst TableCell = <TData extends RowData, TValue>({\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n row,\n cell,\n children,\n className,\n ...props\n}: TableCellProps<TData, TValue>) => {\n const column = cell?.column;\n const align = column?.columnDef?.meta?.align;\n const controls = column?.columnDef?.meta?.controls;\n const actions = column?.columnDef?.meta?.actions;\n const columnPinned = column?.getIsPinned();\n\n const cellClasses = cx('maxio-data-table__cell', className, {\n [`maxio-data-table__cell--pinned-${columnPinned}`]: columnPinned,\n [`maxio-data-table__cell--${align}`]: align,\n [`maxio-data-table__cell--controls`]: controls,\n [`maxio-data-table__cell--actions`]: actions,\n });\n\n const pinnedStyle =\n columnPinned === 'left'\n ? { left: column?.getStart('left') }\n : columnPinned === 'right'\n ? { right: column?.getAfter('right') }\n : {};\n\n return (\n <td className={cellClasses} style={pinnedStyle} {...props}>\n {children}\n </td>\n );\n};\n\nexport default TableCell;\n","import React from 'react';\nimport { Row, RowData, flexRender } from '@tanstack/react-table';\nimport { ROW_ACTIONS_ID, ROW_CONTROLS_ID } from '../../hooks/useColumns';\nimport TableRow from '../TableRow';\nimport TableCell from '../TableCell';\nimport IconButton from '../../../Buttons/IconButton';\nimport Icon from '../../../Icon';\nimport { childTestId } from '../../../../utils/testId';\n\ntype RowRendererProps<TData> = {\n row: Row<TData>;\n SubRowComponent?: (row: Row<TData>) => React.ReactNode;\n pattern?: boolean;\n enableExpanding?: boolean | 'rowsOnly';\n onRowAction?: (row: Row<TData>) => void;\n testId?: string;\n};\n\nconst RowRenderer = <TData extends RowData>({\n row,\n SubRowComponent,\n pattern,\n enableExpanding,\n onRowAction,\n testId,\n}: RowRendererProps<TData>) => {\n // if there is a subRowComponent and the parent row is expanded, render the custom row\n const shouldRenderCustomRow =\n SubRowComponent &&\n row.getParentRow() &&\n row.getParentRow()!.getIsExpanded();\n\n // if the first cell is the row controls, we need to add spacing on the left\n const shouldShowControlsSpacing =\n shouldRenderCustomRow &&\n row.getVisibleCells()[0].column.columnDef.id === ROW_CONTROLS_ID;\n\n // if the last cell is the row actions, we need to add spacing on the right (be aware if the id is different this won't work)\n const shouldShowActionsSpacing =\n shouldRenderCustomRow &&\n row.getVisibleCells()[row.getVisibleCells().length - 1].column.columnDef\n .id === ROW_ACTIONS_ID;\n\n const subtractedColumns = [\n shouldShowActionsSpacing,\n shouldShowControlsSpacing,\n ].filter(Boolean).length;\n\n const customRowColspan = row.getVisibleCells().length - subtractedColumns;\n\n const rowIndex = row.getParentRow()?.index ?? row.index;\n // apply pattern if pattern is enabled and even row (allow parent and child rows have the same pattern for custom rows only)\n const patternApplied =\n pattern && SubRowComponent && rowIndex % 2 === 1\n ? 'maxio-data-table__row--with-pattern'\n : undefined;\n\n // Row Expansion\n const rowCanExpand = row.getCanExpand?.();\n const toggleExpandedHandler = row?.getToggleExpandedHandler?.();\n const isExpanded = row?.getIsExpanded?.();\n const padding = rowCanExpand && enableExpanding ? 0 : 1.75;\n const expandColumnIndex =\n row.getVisibleCells()[0].column.columnDef.id === ROW_CONTROLS_ID ? 1 : 0;\n const rowHeaderCell = row.getVisibleCells().find(({ column }) => {\n const { actions, controls } = column.columnDef.meta ?? {};\n\n return !actions && !controls;\n });\n const actionableRowLabelledBy =\n onRowAction && rowHeaderCell ? rowHeaderCell.id : undefined;\n\n return (\n <React.Fragment key={row.id}>\n {shouldRenderCustomRow ? (\n <TableRow\n key={`${row.id}-sub`}\n row={row}\n isChild\n className={patternApplied}\n data-testid={childTestId(testId, 'row', row.id)}\n >\n {shouldShowControlsSpacing && (\n <TableCell className=\"maxio-data-table__cell--pinned-left\" />\n )}\n\n <TableCell colSpan={customRowColspan}>\n {SubRowComponent(row)}\n </TableCell>\n\n {shouldShowActionsSpacing && (\n <TableCell className=\"maxio-data-table__cell--pinned-right\" />\n )}\n </TableRow>\n ) : (\n <TableRow\n key={`${row.id}-parent`}\n row={row}\n className={patternApplied}\n onRowAction={onRowAction}\n aria-labelledby={actionableRowLabelledBy}\n data-testid={childTestId(testId, 'row', row.id)}\n >\n {row.getVisibleCells().map((cell) => {\n const isExpandColumn =\n enableExpanding && cell.column.getIndex() === expandColumnIndex;\n return (\n <TableCell\n key={cell.id}\n row={row}\n cell={cell}\n id={cell.id}\n data-testid={childTestId(\n testId,\n 'cell',\n row.id,\n cell.column.id\n )}\n >\n <div\n className=\"maxio-data-table__cell-flex\"\n style={\n enableExpanding && isExpandColumn\n ? {\n paddingLeft: `${row?.depth + padding}rem`,\n }\n : undefined\n }\n >\n {enableExpanding && rowCanExpand && isExpandColumn && (\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n icon={\n <Icon\n size=\"xs\"\n variant={\n isExpanded ? 'chevron-down' : 'chevron-right'\n }\n />\n }\n onClick={toggleExpandedHandler}\n aria-label={isExpanded ? 'Collapse row' : 'Expand row'}\n data-open={isExpanded}\n className=\"maxio-data-table__expand-button\"\n />\n )}\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </div>\n </TableCell>\n );\n })}\n </TableRow>\n )}\n </React.Fragment>\n );\n};\n\nexport default RowRenderer;\n","export type RowReorderUnavailableReason =\n 'filtering' | 'grouping' | 'pagination';\n\nexport type RowReorderAvailability =\n | { available: true }\n | {\n available: false;\n reason: RowReorderUnavailableReason;\n message: string;\n };\n\ntype GetRowReorderAvailabilityOptions = {\n columnFilters: readonly unknown[];\n globalFilter: unknown;\n grouping: readonly unknown[];\n hasPagination: boolean;\n};\n\nconst AVAILABLE: RowReorderAvailability = { available: true };\n\nconst UNAVAILABLE: Record<RowReorderUnavailableReason, RowReorderAvailability> =\n {\n filtering: {\n available: false,\n reason: 'filtering',\n message: 'Reordering is unavailable while the table is filtered.',\n },\n grouping: {\n available: false,\n reason: 'grouping',\n message: 'Reordering is unavailable while the table is grouped.',\n },\n pagination: {\n available: false,\n reason: 'pagination',\n message: 'Reordering is unavailable while the table is paginated.',\n },\n };\n\nexport const getRowReorderAvailability = ({\n columnFilters,\n globalFilter,\n grouping,\n hasPagination,\n}: GetRowReorderAvailabilityOptions): RowReorderAvailability => {\n if (\n columnFilters.length > 0 ||\n (globalFilter != null && globalFilter !== '')\n ) {\n return UNAVAILABLE.filtering;\n }\n if (grouping.length > 0) {\n return UNAVAILABLE.grouping;\n }\n if (hasPagination) {\n return UNAVAILABLE.pagination;\n }\n return AVAILABLE;\n};\n","import React, { useEffect } from 'react';\nimport { DataTableProps, type SortingState } from './DataTable.types';\nimport Table from './components/Table';\nimport TableHead from './components/TableHead';\nimport TableBody from './components/TableBody';\nimport HeaderCell from './components/HeaderCell';\nimport TableRow from './components/TableRow';\n\nimport {\n useReactTable,\n flexRender,\n getExpandedRowModel,\n getCoreRowModel,\n RowData,\n getSortedRowModel,\n} from '@tanstack/react-table';\nimport HeaderControls from './components/HeaderControls';\nimport RowControls from './components/RowControls';\nimport RowActions from './components/RowActions';\nimport useColumns, {\n ROW_ACTIONS_ID,\n ROW_CONTROLS_ID,\n} from './hooks/useColumns';\nimport RowRenderer from './components/RowRenderer';\nimport RowReorderProvider from './hooks/useRowReordering';\nimport { getRowReorderAvailability } from './utils/rowReorderAvailability';\nimport { childTestId } from '../../utils/testId';\n\n// row-controls/row-actions are always pinned internally;\n// strip any user-provided pinning that references them so ids don't get duplicated\nconst excludeBuiltinIds = (ids: string[] = []) =>\n ids.filter((id) => id !== ROW_CONTROLS_ID && id !== ROW_ACTIONS_ID);\n\nconst EMPTY_SORTING_STATE: SortingState = [];\n\nconst getDefaultSubRows = <TData extends RowData>(row: TData) =>\n (row as TData & { subRows?: TData[] }).subRows;\n\nconst DataTable = <TData extends RowData>({\n pattern,\n size = 'md',\n SubRowComponent,\n onExpand,\n onSelect,\n onSort,\n enableSorting = false,\n enableRowSelection = false,\n enableExpanding,\n columns: originalColumns,\n actions,\n actionsColumnSize,\n onRowAction,\n enableRowReordering = false,\n getRowReorderLabel,\n onRowReorder,\n rowReorderMode = 'siblings',\n getRowId,\n getSubRows,\n state: userState,\n 'data-testid': testId,\n ...props\n}: DataTableProps<TData>) => {\n const effectiveSubRowComponent = enableRowReordering\n ? undefined\n : SubRowComponent;\n const effectiveEnableSorting = enableRowReordering ? false : enableSorting;\n\n const columns = useColumns<TData>({\n columns: originalColumns,\n HeaderControls,\n RowControls,\n RowActions,\n actions,\n actionsColumnSize,\n enableRowSelection,\n enableRowReordering,\n enableExpanding: Boolean(enableExpanding),\n });\n\n const tableInstance = useReactTable<TData>({\n state: {\n ...userState,\n ...(enableRowReordering && { sorting: EMPTY_SORTING_STATE }),\n // row controls (built in) and actions (created by user), when active, are always pinned;\n // user-defined pinned columns are appended around them\n columnPinning: {\n left: [\n ...(enableRowSelection || enableRowReordering\n ? [ROW_CONTROLS_ID]\n : []),\n ...excludeBuiltinIds(userState?.columnPinning?.left),\n ],\n right: [\n ...excludeBuiltinIds(userState?.columnPinning?.right),\n ...(actions ? [ROW_ACTIONS_ID] : []),\n ],\n },\n },\n getCoreRowModel: getCoreRowModel(),\n\n // by default, row selection is disabled, you need manually to toggle it\n enableRowSelection,\n\n // by default, expanding is disabled, you need manually to toggle it\n enableExpanding: Boolean(enableExpanding),\n ...(!props.manualExpanding && {\n getExpandedRowModel: getExpandedRowModel(),\n }),\n // if manualSorting is not enabled then go with default sorting strategy\n ...(!props.manualSorting &&\n !enableRowReordering && { getSortedRowModel: getSortedRowModel() }),\n\n columns,\n getRowId,\n // pass any remaining configuration options to the table instance\n ...props,\n // Reordering writes nested data through `subRows`, so its row model must use the same shape.\n getSubRows: enableRowReordering\n ? getDefaultSubRows\n : (getSubRows ?? getDefaultSubRows),\n // Manual row order takes precedence over every sorting configuration.\n enableSorting: effectiveEnableSorting,\n ...(enableRowReordering && { getSortedRowModel: undefined }),\n });\n\n const isExpandable = tableInstance.getCanSomeRowsExpand();\n const state = tableInstance.getState();\n\n const rowReorderAvailability = getRowReorderAvailability({\n columnFilters: state.columnFilters,\n globalFilter: state.globalFilter,\n grouping: state.grouping,\n hasPagination: Boolean(\n props.getPaginationRowModel || props.manualPagination\n ),\n });\n\n useEffect(() => {\n onExpand?.(state.expanded);\n }, [onExpand, state.expanded]);\n\n useEffect(() => {\n onSelect?.(state.rowSelection);\n }, [onSelect, state.rowSelection]);\n\n useEffect(() => {\n if (!enableRowReordering) {\n onSort?.(state.sorting);\n }\n }, [enableRowReordering, onSort, state.sorting]);\n\n const table = (\n <Table\n pattern={pattern}\n size={size}\n isExpandable={isExpandable}\n isUsingCustomRow={Boolean(effectiveSubRowComponent)}\n data-testid={testId}\n >\n <TableHead>\n {tableInstance.getHeaderGroups().map((headerGroup) => (\n <TableRow key={headerGroup.id} table={tableInstance} isHeader>\n {headerGroup.headers.map((header) => (\n <HeaderCell\n key={header.id}\n table={tableInstance}\n header={header}\n enableExpanding={enableExpanding}\n data-testid={childTestId(testId, 'header', header.column.id)}\n >\n {flexRender(\n header.column.columnDef.header,\n header.getContext()\n )}\n </HeaderCell>\n ))}\n </TableRow>\n ))}\n </TableHead>\n <TableBody>\n {tableInstance.getRowModel().rows.map((row) => (\n <RowRenderer\n key={row.id}\n row={row}\n pattern={pattern}\n SubRowComponent={effectiveSubRowComponent}\n enableExpanding={enableExpanding}\n onRowAction={onRowAction}\n testId={testId}\n />\n ))}\n </TableBody>\n </Table>\n );\n\n if (!enableRowReordering || !getRowId || !onRowReorder) {\n return table;\n }\n\n return (\n <RowReorderProvider\n availability={rowReorderAvailability}\n data={props.data}\n enableExpanding={Boolean(enableExpanding)}\n getRowReorderLabel={getRowReorderLabel}\n onRowReorder={onRowReorder}\n rowReorderMode={rowReorderMode}\n table={tableInstance}\n >\n {table}\n </RowReorderProvider>\n );\n};\n\nexport default DataTable;\n","import React, { ElementType } from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type BodyProps = BaseTypographyProps & {\n /**\n * The component to render as (e.g. `span or div`)\n */\n as?: ElementType;\n /**\n * Defines the size of the body text.\n */\n size?: 'xs' | 'sm' | 'md' | 'lg';\n /**\n * Set the body to compact mode - lower line height\n */\n compact?: boolean;\n};\n\nconst Body = ({\n as = 'div',\n children,\n compact = false,\n size = 'md',\n className,\n ...rest\n}: BodyProps) => {\n const AsComponent = as;\n\n const classNames = cx(\n {\n [`maxio-body-${size}`]: !compact,\n [`maxio-body-${size}-compact`]: compact,\n },\n className\n );\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Body;\n","import React from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type HeadingProps = BaseTypographyProps & {\n /**\n * Defines the size of the heading text\n */\n size?: 'sm' | 'md' | 'lg';\n};\n\nconst headingsSizeMap = {\n sm: 'h3',\n md: 'h2',\n lg: 'h1',\n} as const;\n\nconst Heading = ({\n children,\n size = 'sm',\n className,\n ...rest\n}: HeadingProps) => {\n const AsComponent = headingsSizeMap[size];\n\n const classNames = cx(`maxio-heading-${size}`, className);\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Heading;\n","import { createContext } from 'react';\n\n// Lets an overlay that renders its own Dialog (the deprecated Drawer props) give the close\n// button its `<id>.close` test ID while keeping its own ID on the panel, not on the Dialog.\nexport const DialogCloseTestIdContext = createContext<string | undefined>(\n undefined\n);\n","import React, { useContext, useId, useRef } from 'react';\nimport type { ReactNode } from 'react';\nimport cx from 'classnames';\nimport { Dialog as AriaDialog } from 'react-aria-components';\n\nimport { useIsOverflowing } from '../../hooks/useIsOverflowing';\nimport { childTestId } from '../../utils/testId';\nimport { IconButton } from '../Buttons';\nimport Icon from '../Icon';\nimport { Heading } from '../Typography';\n\nimport { DialogCloseTestIdContext } from './closeTestIdContext';\nimport type { DialogProps } from './types';\n\nconst hasContent = (node: ReactNode) =>\n node !== null && node !== undefined && node !== false && node !== '';\n\n/**\n * Dialog is the accessible content of an overlay: title, optional\n * description, body and footer. Render it inside a `Modal` or a `Popover`.\n */\nconst Dialog = ({\n title,\n description,\n children,\n footer,\n role = 'dialog',\n showCloseButton = role !== 'alertdialog',\n className,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n 'data-testid': testId,\n ...props\n}: DialogProps) => {\n const inheritedCloseTestId = useContext(DialogCloseTestIdContext);\n const closeTestId = childTestId(testId, 'close') ?? inheritedCloseTestId;\n const titleId = useId();\n const descriptionId = useId();\n const labelledBy = ariaLabelledBy ?? (ariaLabel ? undefined : titleId);\n const describedBy =\n [ariaDescribedBy, hasContent(description) ? descriptionId : undefined]\n .filter(Boolean)\n .join(' ') || undefined;\n const bodyRef = useRef<HTMLDivElement>(null);\n const bodyContentRef = useRef<HTMLDivElement>(null);\n const isBodyOverflowing = useIsOverflowing(bodyRef, bodyContentRef);\n\n return (\n <AriaDialog\n {...props}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n className={cx('maxio-dialog', className)}\n data-testid={testId}\n >\n {({ close }) => {\n const footerContent =\n typeof footer === 'function' ? footer({ close }) : footer;\n\n return (\n <>\n <div className=\"maxio-dialog__header\">\n <div className=\"maxio-dialog__title-group\">\n <Heading id={titleId} size=\"md\" className=\"maxio-dialog__title\">\n {title}\n </Heading>\n {hasContent(description) && (\n <p id={descriptionId} className=\"maxio-dialog__description\">\n {description}\n </p>\n )}\n </div>\n {showCloseButton && (\n <IconButton\n aria-label=\"Close\"\n onClick={close}\n icon={<Icon variant=\"cross\" />}\n variant=\"ghost\"\n size=\"sm\"\n className=\"maxio-dialog__close\"\n data-testid={closeTestId}\n />\n )}\n </div>\n <div\n ref={bodyRef}\n className=\"maxio-dialog__body\"\n {...(isBodyOverflowing && {\n tabIndex: 0,\n role: 'region',\n 'aria-labelledby': titleId,\n })}\n >\n <div ref={bodyContentRef}>\n {typeof children === 'function'\n ? children({ close })\n : children}\n </div>\n </div>\n {hasContent(footerContent) && (\n <div className=\"maxio-dialog__footer\">{footerContent}</div>\n )}\n </>\n );\n }}\n </AriaDialog>\n );\n};\n\nexport default Dialog;\n","import { RefObject, useCallback, useLayoutEffect, useState } from 'react';\nimport { useResizeObserver } from '@react-aria/utils';\n\n// The content is observed too: once the scroll container hits its max height,\n// content can grow without the container itself changing size.\nexport default function useIsOverflowing(\n scrollRef: RefObject<HTMLElement | null>,\n contentRef: RefObject<HTMLElement | null>\n): boolean {\n const [isOverflowing, setIsOverflowing] = useState(false);\n\n const onResize = useCallback(() => {\n const element = scrollRef.current;\n setIsOverflowing(!!element && element.scrollHeight > element.clientHeight);\n }, [scrollRef]);\n\n useLayoutEffect(onResize, [onResize]);\n useResizeObserver({ ref: scrollRef, onResize });\n useResizeObserver({ ref: contentRef, onResize });\n\n return isOverflowing;\n}\n","import React, { useEffect } from 'react';\nimport cx from 'classnames';\nimport { Modal as AriaModal, ModalOverlay } from 'react-aria-components';\n\nimport { Dialog } from '../Dialog';\nimport { DialogCloseTestIdContext } from '../Dialog/closeTestIdContext';\n\nimport type { DrawerProps } from './types';\nimport { childTestId } from '../../utils/testId';\n\nlet hasWarnedLegacyProps = false;\n\n/**\n * Drawer is a panel that slides in from an edge of the page and blocks the\n * rest of it until dismissed. Put a `Dialog` inside it for the title, body\n * and footer.\n */\nconst Drawer = ({\n placement = 'right',\n backdrop = 'dim',\n size = 'md',\n isDismissable = true,\n className,\n style,\n title,\n description,\n footer,\n open,\n isOpen,\n children,\n 'data-testid': testId,\n ...props\n}: DrawerProps) => {\n const usesLegacyContent = [title, description, footer].some(\n (prop) => prop !== undefined\n );\n const usesLegacyOpen = open !== undefined && isOpen === undefined;\n\n useEffect(() => {\n if ((usesLegacyContent || usesLegacyOpen) && !hasWarnedLegacyProps) {\n hasWarnedLegacyProps = true;\n console.warn(\n 'Drawer: the `title`, `description`, `footer` and `open` props are deprecated and will be removed in the next major. Pass a `Dialog` as children and use `isOpen` instead.'\n );\n }\n }, [usesLegacyContent, usesLegacyOpen]);\n\n return (\n <ModalOverlay\n {...props}\n isOpen={isOpen ?? open}\n isDismissable={isDismissable}\n className={cx('maxio-drawer__backdrop', {\n 'maxio-drawer__backdrop--dim': backdrop === 'dim',\n })}\n >\n <AriaModal\n className={cx('maxio-drawer', className)}\n style={style}\n data-placement={placement}\n data-size={size}\n data-testid={testId}\n >\n {usesLegacyContent ? (\n <DialogCloseTestIdContext.Provider\n value={childTestId(testId, 'close')}\n >\n <Dialog title={title} description={description} footer={footer}>\n {children}\n </Dialog>\n </DialogCloseTestIdContext.Provider>\n ) : (\n children\n )}\n </AriaModal>\n </ModalOverlay>\n );\n};\n\nexport default Drawer;\n","import React from 'react';\nimport cx from 'classnames';\nimport { FlexProps } from './types';\n\nconst Flex = ({\n basis,\n flex,\n flexDirection,\n wrap,\n grow,\n shrink,\n gap,\n gapX,\n gapY,\n className,\n children,\n alignItems,\n justifyContent,\n ...props\n}: FlexProps) => {\n const flexClasses = cx(\n 'maxio-flex',\n {\n [`maxio-flex-${flex}`]: flex,\n [`maxio-basis-${basis}`]: basis !== undefined,\n [`maxio-flex-${flexDirection}`]: flexDirection,\n [`maxio-flex-${wrap}`]: wrap,\n 'maxio-grow': grow,\n 'maxio-grow-0': grow === false,\n 'maxio-shrink': shrink,\n 'maxio-shrink-0': shrink === false,\n [`maxio-gap-${gap}`]: gap !== undefined,\n [`maxio-gap-x-${gapX}`]: gapX !== undefined,\n [`maxio-gap-y-${gapY}`]: gapY !== undefined,\n [`maxio-items-${alignItems}`]: alignItems,\n [`maxio-justify-${justifyContent}`]: justifyContent,\n },\n className\n );\n\n return (\n <div className={flexClasses} {...props}>\n {children}\n </div>\n );\n};\n\nexport default Flex;\n","import React from 'react';\nimport cx from 'classnames';\nimport Body from '../Typography/Body';\nimport LoadingSpinner from '../LoadingSpinner';\nimport Icon from '../Icon';\nimport Button from '../Buttons/Button/Button';\nimport {\n Collection,\n Header as AriaHeader,\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n ListBoxLoadMoreItem as AriaListBoxLoadMoreItem,\n ListBoxSection as AriaListBoxSection,\n composeRenderProps,\n} from 'react-aria-components';\n\nimport type {\n ListBoxHeaderProps,\n ListBoxItemProps,\n ListBoxProps,\n ListBoxSectionProps,\n} from './types';\n\n/** Root component for rendering an accessible list box with support for single and multiple selection. */\nconst ListBoxRoot = <T extends object>({\n className,\n children,\n items,\n render,\n renderEmptyState,\n isLoading = false,\n onLoadMore,\n scrollOffset,\n showSelectAll = false,\n ...props\n}: ListBoxProps<T>) => (\n <AriaListBox\n {...props}\n items={items}\n renderEmptyState={isLoading ? undefined : renderEmptyState}\n className={composeRenderProps(className, (className) =>\n cx('maxio-listbox', className)\n )}\n render={(listBoxProps, renderProps) => {\n const { selectionManager } = renderProps.state;\n const listBox = render ? (\n render(listBoxProps, renderProps)\n ) : (\n <div {...listBoxProps} />\n );\n\n if (selectionManager.selectionMode !== 'multiple' || !showSelectAll) {\n return listBox;\n }\n\n const selectableKeys = [...selectionManager.collection.getKeys()].filter(\n (key) => {\n const item = selectionManager.collection.getItem(key);\n\n return item?.type === 'item' && selectionManager.canSelectItem(key);\n }\n );\n\n if (selectableKeys.length === 0) {\n return listBox;\n }\n\n const isSelectAll = selectionManager.isSelectAll;\n const isClearDisabled =\n isSelectAll && selectionManager.disallowEmptySelection;\n\n return (\n <div>\n <div className=\"maxio-listbox__select-all\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n trailingElement={<Icon variant={isSelectAll ? 'check' : ''} />}\n fullWidth\n aria-pressed={isSelectAll}\n disabled={isClearDisabled}\n onClick={() => selectionManager.toggleSelectAll()}\n >\n Select all\n </Button>\n </div>\n {listBox}\n </div>\n );\n }}\n >\n {onLoadMore || isLoading ? (\n <>\n <Collection items={items} dependencies={props.dependencies}>\n {children}\n </Collection>\n <AriaListBoxLoadMoreItem\n className=\"maxio-listbox__load-more\"\n isLoading={isLoading}\n onLoadMore={isLoading ? undefined : onLoadMore}\n scrollOffset={scrollOffset}\n >\n <LoadingSpinner />\n </AriaListBoxLoadMoreItem>\n </>\n ) : (\n children\n )}\n </AriaListBox>\n);\n\nListBoxRoot.displayName = 'ListBox';\n\n/** Item component for rendering individual options within a ListBox. Automatically renders a checkmark when selected. */\nconst ListBoxItem = ({ className, ...props }: ListBoxItemProps) => {\n const textValue =\n props.textValue ||\n (typeof props.children === 'string' ? props.children : undefined);\n\n return (\n <AriaListBoxItem\n {...props}\n textValue={textValue}\n className={cx('maxio-listbox__item', className)}\n >\n {composeRenderProps(props.children, (children, { isSelected }) => (\n <>\n <div className=\"maxio-listbox__content\">\n {typeof children === 'string' ? (\n <Body size=\"sm\">{children}</Body>\n ) : (\n children\n )}\n </div>\n {isSelected && <Icon variant=\"check\" />}\n </>\n ))}\n </AriaListBoxItem>\n );\n};\n\nListBoxItem.displayName = 'ListBox.Item';\n\n/** Section component for grouping related items within a ListBox. Typically paired with ListBox.Header. */\nconst ListBoxSection = ({ className, ...props }: ListBoxSectionProps) => (\n <AriaListBoxSection\n {...props}\n className={cx('maxio-listbox__section', className)}\n />\n);\n\nListBoxSection.displayName = 'ListBox.Section';\n\n/** Header component for adding labels or titles to a ListBox.Section. */\nconst ListBoxHeader = ({ className, ...props }: ListBoxHeaderProps) => (\n <AriaHeader {...props} className={cx('maxio-listbox__header', className)} />\n);\n\nListBoxHeader.displayName = 'ListBox.Header';\n\nexport type ListBoxComponent = typeof ListBoxRoot & {\n Item: typeof ListBoxItem;\n Section: typeof ListBoxSection;\n Header: typeof ListBoxHeader;\n};\n\nconst ListBox = Object.assign(ListBoxRoot, {\n Item: ListBoxItem,\n Section: ListBoxSection,\n Header: ListBoxHeader,\n}) as ListBoxComponent;\n\nexport default ListBox;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n Button as AriaButton,\n ComboBox as AriaComboBox,\n FieldError,\n Input,\n Label,\n Text,\n} from 'react-aria-components';\n\nimport Icon from '../../Icon';\nimport { ListBox } from '../../ListBox';\nimport { Popover } from '../../Popover';\nimport type { ListBoxProps } from '../../ListBox/types';\nimport type { ComboBoxProps, ComboBoxSelectionMode } from './types';\n\nconst ComboBoxRoot = <\n T extends object = object,\n M extends ComboBoxSelectionMode = 'single',\n>({\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n leadingElement = null,\n fullWidth,\n className,\n placeholder,\n renderEmptyState,\n isLoading = false,\n onLoadMore,\n scrollOffset,\n allowsEmptyCollection = Boolean(isLoading || onLoadMore || renderEmptyState),\n selectionMode,\n children,\n ...props\n}: ComboBoxProps<T, M>) => {\n const triggerRef = React.useRef<HTMLDivElement>(null);\n const inputRef = React.useRef<HTMLInputElement>(null);\n const [popoverStyle, setPopoverStyle] = React.useState<React.CSSProperties>();\n const [popoverCrossOffset, setPopoverCrossOffset] = React.useState(0);\n const hasErrorMessage = !!errorMessage;\n const invalid = isInvalid || hasErrorMessage;\n const listBoxChildren = children as ListBoxProps<T>['children'];\n\n const updatePopoverPosition = React.useCallback(() => {\n const trigger = triggerRef.current;\n\n if (!trigger) {\n return;\n }\n\n const input = inputRef.current;\n const offset = input\n ? input.getBoundingClientRect().left -\n trigger.getBoundingClientRect().left\n : 0;\n\n setPopoverCrossOffset((currentOffset) =>\n currentOffset === -offset ? currentOffset : -offset\n );\n\n setPopoverStyle((currentStyle) => {\n const width = trigger.offsetWidth;\n const nextWidth = `${width}px`;\n\n if (\n currentStyle?.['--trigger-width' as keyof React.CSSProperties] ===\n nextWidth\n ) {\n return currentStyle;\n }\n\n return {\n '--trigger-width': nextWidth,\n } as React.CSSProperties;\n });\n }, []);\n\n React.useEffect(() => {\n const trigger = triggerRef.current;\n\n if (!trigger) {\n return undefined;\n }\n\n updatePopoverPosition();\n\n if (typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const observer = new ResizeObserver(updatePopoverPosition);\n\n observer.observe(trigger);\n\n return () => observer.disconnect();\n }, [updatePopoverPosition]);\n\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': isDisabled,\n 'maxio-text-field--error': invalid,\n 'maxio-text-field--readonly': isReadOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaComboBox\n {...props}\n isDisabled={isDisabled}\n isInvalid={invalid}\n isReadOnly={isReadOnly}\n selectionMode={selectionMode}\n allowsEmptyCollection={allowsEmptyCollection}\n className={containerClass}\n >\n {label && <Label className=\"maxio-text-field__label\">{label}</Label>}\n <div ref={triggerRef} className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n <Input\n ref={inputRef}\n className=\"maxio-text-field__input\"\n placeholder={placeholder}\n />\n <div className=\"maxio-text-field__trailing-element\">\n <AriaButton\n className={cx(\n 'maxio-button',\n 'maxio-button--ghost',\n 'maxio-button--icon',\n `maxio-button--sm`\n )}\n >\n <Icon variant=\"chevron-up-down\" />\n </AriaButton>\n </div>\n </div>\n {description && !hasErrorMessage && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n {(validation) => (\n <>\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">\n {typeof errorMessage === 'function'\n ? errorMessage(validation)\n : errorMessage}\n </div>\n </>\n )}\n </FieldError>\n )}\n <Popover\n hideArrow\n className=\"maxio-combobox__popover\"\n crossOffset={popoverCrossOffset}\n style={popoverStyle}\n >\n <ListBox\n items={props.items ?? props.defaultItems}\n renderEmptyState={renderEmptyState}\n isLoading={isLoading}\n onLoadMore={onLoadMore}\n scrollOffset={scrollOffset}\n >\n {listBoxChildren}\n </ListBox>\n </Popover>\n </AriaComboBox>\n );\n};\n\nComboBoxRoot.displayName = 'ComboBox';\n\nconst ComboBoxItem: typeof ListBox.Item = (props) => (\n <ListBox.Item {...props} />\n);\n\nComboBoxItem.displayName = 'ComboBox.Item';\n\nconst ComboBoxSection: typeof ListBox.Section = (props) => (\n <ListBox.Section {...props} />\n);\n\nComboBoxSection.displayName = 'ComboBox.Section';\n\nconst ComboBoxHeader: typeof ListBox.Header = (props) => (\n <ListBox.Header {...props} />\n);\n\nComboBoxHeader.displayName = 'ComboBox.Header';\n\ntype ComboBoxComponent = (<\n T extends object = object,\n M extends ComboBoxSelectionMode = 'single',\n>(\n props: ComboBoxProps<T, M>\n) => React.ReactElement) & {\n Item: typeof ListBox.Item;\n Section: typeof ListBox.Section;\n Header: typeof ListBox.Header;\n};\n\nconst ComboBox = Object.assign(ComboBoxRoot, {\n Item: ComboBoxItem,\n Section: ComboBoxSection,\n Header: ComboBoxHeader,\n}) as ComboBoxComponent;\n\nexport default ComboBox;\n","import { RadioGroupState } from '@react-stately/radio';\nimport { createContext, useContext } from 'react';\n\nexport const RadioContext = createContext({} as RadioGroupState);\nexport const useRadioState = () => useContext(RadioContext);\n","import React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport {\n Button as AriaButton,\n FieldError,\n Input,\n Label,\n SearchField as AriaSearchField,\n Text,\n} from 'react-aria-components';\nimport Icon from '../../Icon';\nimport { SearchFieldProps } from './types';\n\nconst SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n (\n {\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n leadingElement = <Icon variant=\"search\" />,\n clearButtonLabel = 'Clear search',\n fullWidth,\n className,\n ...props\n },\n ref\n ) => {\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': isDisabled,\n 'maxio-text-field--error': isInvalid,\n 'maxio-text-field--readonly': isReadOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaSearchField\n {...props}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={isInvalid}\n className={containerClass}\n >\n {label && <Label className=\"maxio-text-field__label\">{label}</Label>}\n <div className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n\n <Input ref={ref} className=\"maxio-text-field__input\" />\n\n <div className=\"maxio-text-field__trailing-element maxio-search-field__clear-button\">\n <AriaButton\n aria-label={clearButtonLabel}\n className=\"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost\"\n >\n <Icon\n variant=\"cross\"\n className=\"maxio-button__trailing-element\"\n />\n </AriaButton>\n </div>\n </div>\n {description && !(isInvalid && errorMessage) && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">{errorMessage}</div>\n </FieldError>\n )}\n </AriaSearchField>\n );\n }\n);\n\nSearchField.displayName = 'SearchField';\n\nexport default SearchField;\n","import React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport {\n FieldError,\n Input,\n Label,\n Text,\n TextField as AriaTextField,\n} from 'react-aria-components';\nimport Icon from '../../Icon';\nimport { TextFieldProps } from './types';\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n leadingElement = null,\n trailingElement = null,\n fullWidth,\n className,\n ...props\n },\n ref\n ) => {\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': isDisabled,\n 'maxio-text-field--error': isInvalid,\n 'maxio-text-field--readonly': isReadOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaTextField\n {...props}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={isInvalid}\n className={containerClass}\n >\n {label && <Label className=\"maxio-text-field__label\">{label}</Label>}\n <div className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n\n <Input ref={ref} className=\"maxio-text-field__input\" />\n {trailingElement && (\n <div className=\"maxio-text-field__trailing-element\">\n {trailingElement}\n </div>\n )}\n </div>\n {description && !(isInvalid && errorMessage) && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">{errorMessage}</div>\n </FieldError>\n )}\n </AriaTextField>\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport default TextField;\n","import React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport {\n Button as AriaButton,\n FieldError,\n Input,\n Label,\n NumberField as AriaNumberField,\n Text,\n Separator,\n} from 'react-aria-components';\nimport Icon from '../../Icon';\nimport { NumberFieldProps } from './types';\n\nconst NumberField = forwardRef<HTMLInputElement, NumberFieldProps>(\n (\n {\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n leadingElement = null,\n trailingElement = null,\n showStepper = false,\n fullWidth,\n className,\n ...props\n },\n ref\n ) => {\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': isDisabled,\n 'maxio-text-field--error': isInvalid,\n 'maxio-text-field--readonly': isReadOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaNumberField\n {...props}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={isInvalid}\n className={containerClass}\n >\n {label && <Label className=\"maxio-text-field__label\">{label}</Label>}\n <div className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n\n <Input ref={ref} className=\"maxio-text-field__input\" />\n\n {trailingElement && (\n <div className=\"maxio-text-field__trailing-element\">\n {trailingElement}\n </div>\n )}\n\n {showStepper && (\n <div className=\"maxio-text-field__trailing-element maxio-number-field__stepper\">\n <AriaButton\n slot=\"decrement\"\n aria-label=\"Decrement\"\n className=\"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost\"\n >\n <Icon\n variant=\"minus\"\n size=\"xs\"\n className=\"maxio-button__trailing-element\"\n />\n </AriaButton>\n <Separator\n orientation=\"vertical\"\n className=\"maxio-number-field__stepper-separator\"\n />\n <AriaButton\n slot=\"increment\"\n aria-label=\"Increment\"\n className=\"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost\"\n >\n <Icon\n variant=\"plus\"\n size=\"xs\"\n className=\"maxio-button__trailing-element\"\n />\n </AriaButton>\n </div>\n )}\n </div>\n {description && !(isInvalid && errorMessage) && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">{errorMessage}</div>\n </FieldError>\n )}\n </AriaNumberField>\n );\n }\n);\n\nNumberField.displayName = 'NumberField';\n\nexport default NumberField;\n","import React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport {\n FieldError,\n Label,\n Text,\n TextArea as AriaTextArea,\n TextField as AriaTextField,\n} from 'react-aria-components';\nimport Icon from '../../Icon';\nimport { TextAreaProps } from './types';\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n isDisabled = false,\n isInvalid = false,\n isReadOnly = false,\n size = 'md',\n label,\n description,\n errorMessage,\n fullWidth,\n className,\n ...props\n },\n ref\n ) => {\n const containerClass = cx(\n 'maxio-text-area',\n `maxio-text-area--${size}`,\n {\n 'maxio-text-area--disabled': isDisabled,\n 'maxio-text-area--error': isInvalid,\n 'maxio-text-area--readonly': isReadOnly,\n 'maxio-text-area--full-width': fullWidth,\n },\n className\n );\n\n return (\n <AriaTextField\n {...props}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={isInvalid}\n className={containerClass}\n >\n {label && <Label className=\"maxio-form-label\">{label}</Label>}\n <AriaTextArea ref={ref} className=\"maxio-text-area__input\" />\n {description && !(isInvalid && errorMessage) && (\n <Text\n slot=\"description\"\n elementType=\"div\"\n className=\"maxio-form-helper-text\"\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <FieldError className=\"maxio-form-error\">\n <Icon\n variant=\"warning-circle-fill\"\n className=\"maxio-form-error__icon\"\n />\n <div className=\"maxio-form-error__text\">{errorMessage}</div>\n </FieldError>\n )}\n </AriaTextField>\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport default TextArea;\n","import React, {\n forwardRef,\n InputHTMLAttributes,\n ReactNode,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport cx from 'classnames';\nimport { useTextField } from 'react-aria';\nimport FormErrorMessage from '../FormErrorMessage';\n\n/**\n * @deprecated Use TextField instead.\n */\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'autoCapitalize' | 'onChange'\n> {\n /**\n * Label for the text input\n */\n label?: string;\n /**\n * Size of the text input\n */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n /**\n * Ensures the input spans the full width of its parent\n */\n fullWidth?: boolean;\n /**\n * Disable the text input\n */\n disabled?: boolean;\n /**\n * Invalid state of the text input\n */\n invalid?: boolean;\n /*\n * Read only state of the text input\n */\n readOnly?: boolean;\n /**\n * Helper text for the text input. It will not be visible if there is an error message.\n */\n helperText?: string;\n /**\n * Error message for the text input\n */\n errorMessage?: string;\n /**\n * Leading element for the text input\n */\n leadingElement?: ReactNode;\n /**\n * Trailing element for the text input\n */\n trailingElement?: ReactNode;\n /**\n * Callback function for the text input change\n */\n onChange: (value: string) => void;\n /**\n * Show error message\n */\n showErrorMessage?: boolean;\n}\n\n/**\n * @deprecated Use TextField instead.\n */\nconst TextInput = forwardRef(\n (\n {\n disabled = false,\n invalid = false,\n readOnly = false,\n size = 'md',\n label,\n helperText,\n showErrorMessage = true,\n errorMessage,\n leadingElement = null,\n trailingElement = null,\n fullWidth,\n className,\n ...props\n }: TextInputProps,\n ref\n ) => {\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => inputRef.current);\n\n useEffect(() => {\n console.warn('TextInput is deprecated. Please use TextField instead.');\n }, []);\n\n const { spellCheck, ...restProps } = props;\n const ariaProps = {\n ...restProps,\n label,\n description: helperText,\n errorMessage: errorMessage,\n defaultValue: props.defaultValue?.toString(),\n value: props.value?.toString(),\n isDisabled: disabled,\n isReadOnly: readOnly,\n isInvalid: invalid,\n };\n\n const { labelProps, inputProps, descriptionProps, errorMessageProps } =\n useTextField(ariaProps, inputRef);\n\n const containerClass = cx(\n 'maxio-text-field',\n `maxio-text-field--${size}`,\n {\n 'maxio-text-field--disabled': disabled,\n 'maxio-text-field--error': invalid,\n 'maxio-text-field--readonly': readOnly,\n 'maxio-text-field--full-width': fullWidth,\n },\n className\n );\n\n const showError = invalid && errorMessage && showErrorMessage;\n\n return (\n <div className={containerClass}>\n {label && (\n <label className=\"maxio-text-field__label\" {...labelProps}>\n {label}\n </label>\n )}\n <div className=\"maxio-text-field__items\">\n {leadingElement && (\n <div className=\"maxio-text-field__leading-element\">\n {leadingElement}\n </div>\n )}\n\n <input\n ref={inputRef}\n type=\"text\"\n className=\"maxio-text-field__input\"\n {...inputProps}\n spellCheck={spellCheck}\n />\n {trailingElement && (\n <div className=\"maxio-text-field__trailing-element\">\n {trailingElement}\n </div>\n )}\n </div>\n {helperText && !showError && (\n <div className=\"maxio-form-helper-text\" {...descriptionProps}>\n {helperText}\n </div>\n )}\n {showError && (\n <FormErrorMessage {...errorMessageProps}>\n {errorMessage}\n </FormErrorMessage>\n )}\n </div>\n );\n }\n);\n\nTextInput.displayName = 'TextInput';\n\nexport default TextInput;\n","import React from 'react';\nimport cx from 'classnames';\nimport Icon from '../../Icon';\nimport { SelectProps } from './types';\nimport { useId } from 'react-aria';\nimport FormErrorMessage from '../FormErrorMessage';\n\nconst Select = ({\n options,\n label,\n size = 'md',\n inline = false,\n disabled = false,\n helperText,\n errorMessage,\n fullWidth = false,\n ...props\n}: SelectProps) => {\n const containerClass = cx('maxio-select', `maxio-select--${size}`, {\n 'maxio-select--disabled': disabled,\n 'maxio-select--inline': inline,\n 'maxio-select--error': !!errorMessage,\n 'maxio-select--full-width': fullWidth,\n });\n\n const id = useId();\n\n return (\n <div className={containerClass}>\n {label && (\n <label htmlFor={id} className=\"maxio-select__label\">\n {label}\n </label>\n )}\n <div className=\"maxio-select__input-container\">\n <select\n id={id}\n className=\"maxio-select__input\"\n disabled={disabled}\n {...props}\n >\n {options.map((opt) => (\n <option\n key={`option-${opt.value}`}\n value={opt.value}\n disabled={opt.disabled}\n >\n {opt.label}\n </option>\n ))}\n </select>\n <Icon variant=\"chevron-up-down\" />\n </div>\n {!!errorMessage && <FormErrorMessage>{errorMessage}</FormErrorMessage>}\n {helperText && !errorMessage && (\n <div className=\"maxio-form-helper-text\">{helperText}</div>\n )}\n </div>\n );\n};\n\nexport default Select;\n","import React from 'react';\nimport { DateInput as AriaDateInput, DateSegment } from 'react-aria-components';\n\nconst DateInput = ({\n slot,\n displayValue,\n}: {\n slot?: 'start' | 'end';\n displayValue?: string;\n}) => {\n const input = (\n <AriaDateInput slot={slot} className=\"maxio-date-field__input\">\n {(segment) => (\n <DateSegment segment={segment} className=\"maxio-date-field__segment\" />\n )}\n </AriaDateInput>\n );\n if (displayValue == null) return input;\n\n return (\n <div className=\"maxio-date-field__endpoint\">\n <div hidden>{input}</div>\n <span className=\"maxio-date-field__endpoint-value\">{displayValue}</span>\n </div>\n );\n};\nexport default DateInput;\n","import React, { useContext } from 'react';\nimport {\n endOfMonth,\n startOfMonth,\n toCalendarDate,\n type CalendarDate,\n} from '@internationalized/date';\nimport {\n CalendarMonthPicker,\n CalendarStateContext,\n CalendarYearPicker,\n Heading,\n RangeCalendarStateContext,\n type CalendarMonthPickerProps,\n} from 'react-aria-components';\nimport { Flex } from '../Flex';\nimport Select from '../forms/Select';\nimport type { CalendarNavigation } from './types';\n\n// Read the merged calendar state so disabled and bounds set through\n// CalendarContext apply to the pickers too.\nconst useCalendarState = () => {\n const calendarState = useContext(CalendarStateContext);\n const rangeCalendarState = useContext(RangeCalendarStateContext);\n return (calendarState ?? rangeCalendarState)!;\n};\n\ntype PickerSelectProps = Parameters<CalendarMonthPickerProps['children']>[0] & {\n isItemDisabled?: (date: CalendarDate) => boolean;\n};\n\nconst PickerSelect = ({\n items,\n value,\n onChange,\n isItemDisabled,\n ...props\n}: PickerSelectProps) => {\n const { isDisabled } = useCalendarState();\n\n return (\n <Select\n {...props}\n disabled={isDisabled}\n value={String(value)}\n onChange={(event) => onChange(Number(event.target.value))}\n options={items.map(({ id, date, formatted }) => ({\n value: String(id),\n label: formatted,\n disabled: isItemDisabled?.(date),\n }))}\n />\n );\n};\n\n// The year picker already limits its items to the bounds, but the month\n// picker lists every month of the focused year.\nconst MonthPicker = () => {\n const { minValue, maxValue } = useCalendarState();\n const isMonthDisabled = (date: CalendarDate) =>\n (!!minValue && endOfMonth(date).compare(toCalendarDate(minValue)) < 0) ||\n (!!maxValue && startOfMonth(date).compare(toCalendarDate(maxValue)) > 0);\n\n return (\n <CalendarMonthPicker>\n {(pickerProps) => (\n <PickerSelect {...pickerProps} isItemDisabled={isMonthDisabled} />\n )}\n </CalendarMonthPicker>\n );\n};\n\n/** Header title shared by Calendar and RangeCalendar: a heading, or month and year pickers. */\nconst CalendarTitle = ({ navigation }: { navigation: CalendarNavigation }) =>\n navigation === 'month' ? (\n <Heading className=\"maxio-calendar__heading\" />\n ) : (\n <Flex grow alignItems=\"center\" gap={1}>\n <MonthPicker />\n <CalendarYearPicker>\n {(pickerProps) => <PickerSelect {...pickerProps} />}\n </CalendarYearPicker>\n </Flex>\n );\n\nexport default CalendarTitle;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n Calendar as AriaCalendar,\n Button,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n Text,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport Icon from '../Icon';\nimport CalendarTitle from './CalendarTitle';\nimport type { CalendarProps } from './types';\n\nconst Calendar = <T extends DateValue>({\n className,\n errorMessage,\n navigation = 'month',\n ...props\n}: CalendarProps<T>) => {\n return (\n <AriaCalendar\n {...props}\n visibleDuration={{ months: 1 }}\n className={composeRenderProps(className, (className) =>\n cx('maxio-calendar', className)\n )}\n >\n <header className=\"maxio-calendar__header\">\n <CalendarTitle navigation={navigation} />\n <Button\n slot=\"previous\"\n className=\"maxio-button maxio-button--ghost maxio-button--icon\"\n >\n <Icon variant=\"chevron-left\" />\n </Button>\n <Button\n slot=\"next\"\n className=\"maxio-button maxio-button--ghost maxio-button--icon\"\n >\n <Icon variant=\"chevron-right\" />\n </Button>\n </header>\n <CalendarGrid className=\"maxio-calendar__grid\">\n <CalendarGridHeader>\n {(day) => (\n <CalendarHeaderCell className=\"maxio-calendar__weekday\">\n {day}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => (\n <CalendarCell date={date} className=\"maxio-calendar__cell\" />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n {errorMessage && (\n <Text slot=\"errorMessage\" className=\"maxio-calendar__error\">\n {errorMessage}\n </Text>\n )}\n </AriaCalendar>\n );\n};\n\nexport default Calendar;\n","import React from 'react';\nimport { Button, Group } from 'react-aria-components';\nimport type { DatePresetsProps } from './types';\n\nconst DatePresets = <T,>({\n presets,\n label = 'Presets',\n isDisabled,\n isPresetDisabled,\n onSelect,\n}: DatePresetsProps<T>) => {\n if (!presets?.length) return null;\n\n return (\n <Group aria-label={label} className=\"maxio-date-field__presets\">\n {presets.map((preset, index) => (\n <Button\n key={index}\n className=\"maxio-button maxio-button--ghost\"\n isDisabled={\n isDisabled ||\n preset.isDisabled ||\n (preset.value !== null && isPresetDisabled(preset.value))\n }\n onPress={() => onSelect(preset.value)}\n >\n {preset.label}\n </Button>\n ))}\n </Group>\n );\n};\n\nexport default DatePresets;\n","import { toCalendarDate } from '@internationalized/date';\nimport type { DateValue, DateRangePickerProps } from 'react-aria-components';\n\ntype Constraints = {\n minValue?: DateValue | null;\n maxValue?: DateValue | null;\n isDateUnavailable?: (date: DateValue) => boolean;\n allowsNonContiguousRanges?: boolean;\n};\n\nexport const isPresetDateDisabled = (\n date: DateValue,\n props: Constraints\n): boolean =>\n !!(\n (props.minValue && date.compare(props.minValue) < 0) ||\n (props.maxValue && date.compare(props.maxValue) > 0) ||\n props.isDateUnavailable?.(date)\n );\n\nexport const isPresetRangeDisabled = (\n range: { start: DateValue | null; end: DateValue | null },\n props: Omit<Constraints, 'isDateUnavailable'> &\n Pick<DateRangePickerProps<DateValue>, 'isDateUnavailable'>\n): boolean => {\n const anchor = range.start ? toCalendarDate(range.start) : null;\n const constraints = {\n ...props,\n isDateUnavailable: (date: DateValue) =>\n props.isDateUnavailable?.(date, anchor) ?? false,\n };\n if (\n (range.start != null &&\n range.end != null &&\n range.start.compare(range.end) > 0) ||\n (range.start != null &&\n isPresetDateDisabled(range.start, {\n ...props,\n isDateUnavailable: (date) =>\n props.isDateUnavailable?.(date, null) ?? false,\n })) ||\n (range.end != null && isPresetDateDisabled(range.end, constraints))\n )\n return true;\n if (\n range.start &&\n range.end &&\n props.isDateUnavailable &&\n !props.allowsNonContiguousRanges\n ) {\n const end = toCalendarDate(range.end);\n for (\n let day = toCalendarDate(range.start).add({ days: 1 });\n day.compare(end) < 0;\n day = day.add({ days: 1 })\n ) {\n if (props.isDateUnavailable(day, anchor)) return true;\n }\n }\n return false;\n};\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n RangeCalendar as AriaRangeCalendar,\n Button,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n Text,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport Icon from '../Icon';\nimport CalendarTitle from '../Calendar/CalendarTitle';\nimport { useLocale } from 'react-aria-components';\nimport type { RangeCalendarProps } from './types';\n\nconst RangeCalendar = <T extends DateValue>({\n className,\n errorMessage,\n navigation = 'month',\n ...props\n}: RangeCalendarProps<T>) => {\n const { direction } = useLocale();\n return (\n <AriaRangeCalendar\n {...props}\n visibleDuration={{ months: 1 }}\n className={composeRenderProps(className, (className) =>\n cx('maxio-calendar', 'maxio-calendar--range', className)\n )}\n >\n <header className=\"maxio-calendar__header\">\n <CalendarTitle navigation={navigation} />\n <Button\n slot=\"previous\"\n className=\"maxio-button maxio-button--ghost maxio-button--icon\"\n >\n <Icon\n variant={direction === 'rtl' ? 'chevron-right' : 'chevron-left'}\n />\n </Button>\n <Button\n slot=\"next\"\n className=\"maxio-button maxio-button--ghost maxio-button--icon\"\n >\n <Icon\n variant={direction === 'rtl' ? 'chevron-left' : 'chevron-right'}\n />\n </Button>\n </header>\n <CalendarGrid className=\"maxio-calendar__grid\">\n <CalendarGridHeader>\n {(day) => (\n <CalendarHeaderCell className=\"maxio-calendar__weekday\">\n {day}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => (\n <CalendarCell date={date} className=\"maxio-calendar__cell\" />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n {errorMessage && (\n <Text slot=\"errorMessage\" className=\"maxio-calendar__error\">\n {errorMessage}\n </Text>\n )}\n </AriaRangeCalendar>\n );\n};\n\nexport default RangeCalendar;\n","import type {\n DateRangePickerRenderProps,\n DateValue,\n} from 'react-aria-components';\nimport type { DateRangePreset } from './types';\n\ntype RangeState = DateRangePickerRenderProps['state'];\ntype PresetValue = DateRangePreset['value'];\n\nconst datesMatch = (\n a: DateValue | null | undefined,\n b: DateValue | null | undefined\n) => (a == null ? b == null : b != null && a.compare(b) === 0);\n\nexport const getPresetLabel = (\n value: RangeState['value'],\n presets?: readonly DateRangePreset[]\n): string | undefined => {\n if (value?.start != null && value?.end != null) return undefined;\n\n return presets?.find(\n (preset) =>\n datesMatch(preset.value?.start, value?.start) &&\n datesMatch(preset.value?.end, value?.end)\n )?.label;\n};\n\nexport const selectRangePreset = (\n state: RangeState,\n value: PresetValue\n): void => {\n if (value && (value.start == null || value.end == null)) {\n // React Aria stores incomplete endpoints separately from its complete value.\n // Clear the previous range before restoring the supplied endpoint(s).\n state.setValue(null);\n state.setDateTime('start', value.start);\n state.setDateTime('end', value.end);\n } else if (value?.start && value.end) {\n state.setValue({ start: value.start, end: value.end });\n } else {\n state.setValue(null);\n }\n state.setOpen(false);\n};\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n ToggleButton as AriaToggleButton,\n ToggleButtonGroup as AriaToggleButtonGroup,\n SelectionIndicator,\n composeRenderProps,\n} from 'react-aria-components';\n\nimport type { SegmentedControlItemProps, SegmentedControlProps } from './types';\n\nconst SegmentedControlRoot = ({\n className,\n size = 'md',\n fullWidth = false,\n selectionMode = 'single',\n orientation = 'horizontal',\n disallowEmptySelection = true,\n ...props\n}: SegmentedControlProps) => (\n <AriaToggleButtonGroup\n {...props}\n selectionMode={selectionMode}\n orientation={orientation}\n disallowEmptySelection={disallowEmptySelection}\n className={composeRenderProps(className, (className) =>\n cx(\n 'maxio-segmented-control',\n `maxio-segmented-control--${size}`,\n {\n 'maxio-segmented-control--full-width': fullWidth,\n },\n className\n )\n )}\n />\n);\n\nSegmentedControlRoot.displayName = 'SegmentedControl';\n\nconst SegmentedControlItem = ({\n className,\n children,\n ...props\n}: SegmentedControlItemProps) => (\n <AriaToggleButton\n {...props}\n className={composeRenderProps(className, (className) =>\n cx('maxio-segmented-control__item', className)\n )}\n >\n {composeRenderProps(children, (children) => (\n <>\n <SelectionIndicator\n className=\"maxio-segmented-control__selection-indicator\"\n data-selected\n />\n {children}\n </>\n ))}\n </AriaToggleButton>\n);\n\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\ntype SegmentedControlComponent = ((\n props: SegmentedControlProps\n) => React.ReactElement) & {\n Item: typeof SegmentedControlItem;\n};\n\nconst SegmentedControl = Object.assign(SegmentedControlRoot, {\n Item: SegmentedControlItem,\n}) as SegmentedControlComponent;\n\nexport default SegmentedControl;\n","import React from 'react';\nimport Icon, { IconVariant } from '../../Icon';\nimport TooltipTrigger from '../../TooltipTrigger';\nimport { TOOLTIP_OFFSET } from './constants';\n\ninterface SectionNameProps {\n children: React.ReactNode;\n type?: 'menu' | 'link';\n leadingIcon?: IconVariant | null;\n trailingIcon?: IconVariant;\n isTooltipVisible?: boolean;\n leadingIconClassName?: string;\n}\n\nconst SectionName = ({\n leadingIcon,\n trailingIcon,\n type = 'menu',\n children,\n leadingIconClassName,\n isTooltipVisible = false,\n}: SectionNameProps) => (\n <>\n {leadingIcon && (\n <TooltipTrigger\n usePortal\n isVisible={isTooltipVisible}\n renderContent={() => children}\n floatingElementOffset={TOOLTIP_OFFSET}\n >\n <span className=\"maxio-side-nav__icon\">\n <Icon variant={leadingIcon} className={leadingIconClassName} />\n </span>\n </TooltipTrigger>\n )}\n <span\n className={`maxio-side-nav__${type}-title`}\n data-testid=\"maxio-sidebar-section-name\"\n >\n {children}\n </span>\n {trailingIcon && (\n <span className=\"maxio-side-nav__menu-chevron\">\n <Icon variant={trailingIcon} />\n </span>\n )}\n </>\n);\n\nexport default SectionName;\n","export const TOOLTIP_OFFSET = 12;\n","import { Section, SectionGroup, SectionHeading } from './types';\n\nconst isRegularSection = (\n section: Section | SectionHeading\n): section is Section => section.type !== 'heading';\n\nconst findCurrentSection = (sectionGroups: SectionGroup[]) => {\n const flatSections = sectionGroups.flat();\n const filteredSections = flatSections.filter(isRegularSection);\n return filteredSections\n .map((section) => section.items)\n .flat()\n .find((item) => item?.isCurrent);\n};\n\nconst prepareSections = (sectionGroups: SectionGroup[]) => {\n const currentSection = findCurrentSection(sectionGroups);\n if (currentSection) {\n return sectionGroups.map((sections) => {\n return sections.map((section) => {\n if (\n isRegularSection(section) &&\n section.items?.includes(currentSection)\n ) {\n return {\n ...section,\n isOpen: true,\n };\n }\n return section;\n });\n });\n }\n return sectionGroups;\n};\n\nexport { prepareSections, isRegularSection };\n","import React, {\n createContext,\n useState,\n useEffect,\n useContext,\n useRef,\n} from 'react';\nimport type { SideNavContext as Context, SideNavProviderProps } from './types';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { isRegularSection, prepareSections } from './utils';\n\nconst SideNavContext = createContext({} as Context);\n\nexport const useSideNav = () => useContext(SideNavContext);\n\nexport const SideNavProvider = ({\n children,\n isOpen: controlledIsOpen,\n onChange,\n withIcons = true,\n sections: sectionGroups,\n shouldToggleSidebar = true,\n topDropdownItems,\n collapseBreakpoint = 800,\n}: SideNavProviderProps) => {\n const isMounted = useRef(false);\n\n const [isOpen, setIsOpen] = useState(() => {\n if (!shouldToggleSidebar) return true;\n\n if (typeof controlledIsOpen === 'boolean') {\n return controlledIsOpen;\n }\n\n if (typeof window !== 'undefined') {\n return window.innerWidth > collapseBreakpoint;\n }\n\n return true;\n });\n\n const [sections, setSections] = useState(() => {\n return prepareSections(sectionGroups);\n });\n\n const { windowWitdh } = useWindowSize(200);\n\n useEffect(() => {\n if (isMounted.current) {\n onChange?.(isOpen);\n }\n }, [isOpen, onChange]);\n\n useEffect(() => {\n isMounted.current = true;\n }, []);\n\n useEffect(() => {\n handleWindowWidthChange(windowWitdh);\n }, [windowWitdh]);\n\n useEffect(() => {\n if (typeof controlledIsOpen === 'boolean') {\n setIsOpen(controlledIsOpen);\n }\n }, [controlledIsOpen]);\n\n const onOpen = () => {\n setIsOpen(true);\n };\n const onClose = () => {\n setIsOpen(false);\n };\n\n const onSectionOpen = (sectionName: string) => {\n setSections((sectionGroups) =>\n sectionGroups.map((sections) => {\n return sections.map((section) => {\n if (isRegularSection(section)) {\n return {\n ...section,\n isOpen: section?.name === sectionName ? !section.isOpen : false,\n };\n }\n return section;\n });\n })\n );\n };\n\n return (\n <SideNavContext.Provider\n value={{\n sections,\n topDropdownItems,\n onSectionOpen,\n isOpen,\n onOpen,\n onClose,\n withIcons,\n shouldToggleSidebar,\n }}\n >\n {children}\n </SideNavContext.Provider>\n );\n\n function handleWindowWidthChange(windowWidth: number) {\n if (!shouldToggleSidebar) return;\n if (windowWidth < collapseBreakpoint && isOpen) {\n onClose();\n }\n }\n};\n","import React, { useMemo, useRef } from 'react';\nimport SectionName from '../SectionName';\nimport ActionList, { ActionListItem } from '../../ActionList';\nimport { useSideNav } from '../contexts/SideNavContext';\nimport { useHover } from '../../../hooks/useHover';\nimport { SideNavTopDropdownItem } from '../contexts/types';\n\nconst SideNavSwitcher = () => {\n const { onOpen, topDropdownItems, isOpen } = useSideNav();\n const { mainItem, otherItems, actions } = topDropdownItems;\n\n const ref = useRef<HTMLElement | null>(null);\n const isItemHovered = useHover(ref);\n\n const itemMap = ({\n id,\n title,\n icon,\n iconClass,\n url,\n ...link\n }: SideNavTopDropdownItem): ActionListItem => ({\n id: id,\n label: title,\n leadingIconName: icon,\n leadingIconClassName: iconClass,\n link: {\n href: url,\n ...link,\n },\n });\n const { items, itemsCount } = useMemo(() => {\n const divider: ActionListItem = { type: 'divider', id: 'item-divider' };\n\n const isActionListItem = (\n item: ActionListItem | null\n ): item is ActionListItem => item != null;\n\n return {\n itemsCount: otherItems.length + actions.length,\n items: [\n ...otherItems.map(itemMap),\n otherItems?.length > 0 && actions?.length > 0 ? divider : null,\n ...actions.map(itemMap),\n ].filter(isActionListItem),\n };\n }, [actions, otherItems]);\n\n return (\n <>\n {itemsCount === 0 ? (\n <a\n className=\"maxio-side-nav__menu-button maxio-side-nav__menu-button--large\"\n href={mainItem.url}\n onClick={onOpen}\n >\n <span className=\"maxio-side-nav__menu-title\">{mainItem.title}</span>\n </a>\n ) : (\n <details className=\"maxio-action-menu maxio-side-nav--action-menu\">\n <summary\n onClick={onOpen}\n className=\"maxio-side-nav__menu-button\"\n aria-haspopup=\"true\"\n ref={ref}\n >\n {mainItem.url ? (\n <>\n <SectionName\n type=\"menu\"\n isTooltipVisible={!isOpen && isItemHovered}\n leadingIcon={mainItem.icon}\n trailingIcon=\"chevron-up-down\"\n leadingIconClassName={mainItem.iconClass}\n >\n {mainItem.title}\n </SectionName>\n </>\n ) : (\n <SectionName type=\"menu\" trailingIcon=\"chevron-up-down\">\n {mainItem.title}\n </SectionName>\n )}\n </summary>\n <ActionList\n truncateLabels\n className=\"maxio-action-menu__content\"\n aria-label=\"Action list\"\n items={items}\n small\n />\n </details>\n )}\n </>\n );\n};\n\nexport default SideNavSwitcher;\n","import React, { useRef } from 'react';\nimport { Link } from 'react-aria-components';\nimport { Section } from '../../../contexts/types';\nimport SectionName from '../../../SectionName';\nimport { useHover } from '../../../../../hooks/useHover';\nimport { useSideNav } from '../../../contexts/SideNavContext';\n\nconst SingleItem = ({ section }: { section: Section }) => {\n const { isOpen, withIcons } = useSideNav();\n const ref = useRef<HTMLAnchorElement>(null);\n const isHovered = useHover(ref);\n\n return (\n <li\n className=\"maxio-side-nav__item\"\n data-key={section.key}\n data-testid={section.testId ?? 'maxio-sidebar-section'}\n >\n <Link\n className=\"maxio-side-nav__link\"\n aria-current={section.isCurrent ? 'page' : undefined}\n href={section.href}\n render={section.render}\n ref={ref}\n >\n <SectionName\n isTooltipVisible={isHovered && !isOpen}\n type=\"menu\"\n leadingIcon={withIcons ? section.icon : undefined}\n >\n {section.name}\n </SectionName>\n </Link>\n </li>\n );\n};\n\nexport default SingleItem;\n","import React, { useRef } from 'react';\nimport cx from 'classnames';\nimport { Link } from 'react-aria-components';\nimport SectionName from '../../SectionName/SectionName';\nimport { useSideNav } from '../../contexts/SideNavContext';\nimport { Section, SectionHeading } from '../../contexts/types';\nimport SingleItem from './SingleItem/SingleItem';\nimport useHover from '../../../../hooks/useHover/useHover';\nimport { isRegularSection } from '../../contexts/utils';\n\nconst SideNavItem = ({ section }: { section: Section | SectionHeading }) => {\n const {\n onOpen,\n onSectionOpen,\n isOpen: isSideNavOpen,\n withIcons,\n } = useSideNav();\n const buttonRef = useRef<HTMLButtonElement>(null);\n const isButtonHovered = useHover(buttonRef);\n\n if (!isRegularSection(section)) {\n return <li className=\"maxio-side-nav__item-header\">{section.title}</li>;\n }\n\n const onSectionClick = () => {\n onSectionOpen(section.name);\n onOpen();\n };\n\n if (section.Component) {\n return <section.Component section={section} />;\n }\n\n if (section.href) return <SingleItem section={section} />;\n\n return (\n <li\n className={cx('maxio-side-nav__item', {\n 'maxio-side-nav__item--icon': withIcons,\n })}\n data-testid={section.testId ?? 'maxio-sidebar-section'}\n >\n <button\n className=\"maxio-side-nav__menu-button\"\n ref={buttonRef}\n aria-expanded={section.isOpen ? 'true' : 'false'}\n type=\"button\"\n onClick={onSectionClick}\n >\n <SectionName\n type=\"menu\"\n isTooltipVisible={!isSideNavOpen && isButtonHovered}\n leadingIcon={withIcons ? section.icon : undefined}\n trailingIcon={section.items?.length ? 'chevron-down' : undefined}\n >\n {section.name}\n </SectionName>\n </button>\n <ul className=\"maxio-side-nav__menu\">\n {section.items?.map((item) => (\n <li\n key={`section-sub-item-${item.name}`}\n className=\"maxio-side-nav__item\"\n data-testid={item.testId ?? 'maxio-section-item'}\n >\n <Link\n className=\"maxio-side-nav__link\"\n href={item.href}\n render={item.render}\n aria-current={item.isCurrent ? 'page' : undefined}\n >\n <span className=\"maxio-side-nav__link-title\">{item.name}</span>\n </Link>\n </li>\n ))}\n </ul>\n </li>\n );\n};\n\nexport default SideNavItem;\n","import React from 'react';\nimport SideNavItem from './SideNavItem/SideNavItem';\nimport { useSideNav } from '../contexts/SideNavContext';\n\nconst SideNavItems = () => {\n const { sections: sectionGroups } = useSideNav();\n return (\n <>\n {sectionGroups.map((sections, idx) => (\n <ul\n role=\"list\"\n className=\"maxio-side-nav__items\"\n key={`section-list-${idx}`}\n >\n {sections.map((s, sIdx) => (\n <SideNavItem\n key={`section-list-item-${s.type}-${idx}-${sIdx}`}\n section={s}\n />\n ))}\n </ul>\n ))}\n </>\n );\n};\n\nexport default SideNavItems;\n","import React from 'react';\nimport { useSideNav } from '../contexts';\nimport Icon from '../../Icon';\n\nconst SideNavTopItem = () => {\n const { isOpen, onOpen, onClose, shouldToggleSidebar } = useSideNav();\n return (\n <div className=\"maxio-side-nav__logo-container\">\n <a className=\"maxio-side-nav__brand\" href=\"/\" aria-label=\"Maxio\" />\n {shouldToggleSidebar && (\n <button\n className=\"maxio-side-nav__menu-toggle\"\n aria-label={isOpen ? 'Collapse navigation' : 'Expand navigation'}\n aria-expanded={isOpen}\n onClick={isOpen ? onClose : onOpen}\n >\n <Icon variant=\"sidebar\" />\n </button>\n )}\n </div>\n );\n};\n\nexport default SideNavTopItem;\n","import React from 'react';\nimport cx from 'classnames';\nimport SideNavSwitcher from './SideNavSwitcher/SideNavSwitcher';\nimport SideNavItems from './SideNavItems/SideNavItems';\nimport { SideNavProvider, useSideNav } from './contexts/SideNavContext';\nimport { SideNavProviderProps } from './contexts/types';\nimport SideNavTopItem from './SideNavTopItem';\n\nconst SideNav = () => {\n const { isOpen } = useSideNav();\n return (\n <nav\n className={cx('maxio-side-nav', {\n 'maxio-side-nav--collapsed': !isOpen,\n })}\n >\n <SideNavTopItem />\n <SideNavSwitcher />\n <div className=\"maxio-side-nav__items-container\">\n <SideNavItems />\n </div>\n </nav>\n );\n};\n\nexport type SideNavWrapperProps = Omit<SideNavProviderProps, 'children'>;\n\nconst SideNavWrapper = ({\n withIcons = true,\n shouldToggleSidebar = false,\n topDropdownItems,\n sections = [],\n collapseBreakpoint = 800,\n isOpen,\n onChange,\n}: SideNavWrapperProps) => {\n return (\n <SideNavProvider\n isOpen={isOpen}\n onChange={onChange}\n collapseBreakpoint={collapseBreakpoint}\n withIcons={withIcons}\n shouldToggleSidebar={shouldToggleSidebar}\n topDropdownItems={topDropdownItems}\n sections={sections}\n >\n <SideNav />\n </SideNavProvider>\n );\n};\n\nexport default SideNavWrapper;\n","import React from 'react';\nimport cx from 'classnames';\nimport { Tab as AriaTab } from 'react-aria-components';\nimport { TabProps } from './types';\n\nconst Tab = ({\n disabled = false,\n value = 0,\n className,\n id: legacyId,\n isCurrent,\n ...props\n}: TabProps) => {\n void legacyId;\n void isCurrent;\n\n const isIcon = props.type === 'icon';\n\n const tabClassName = ({ isSelected }: { isSelected: boolean }) =>\n cx('maxio-tabs__tab', className, {\n 'maxio-tabs__tab--active': isSelected,\n 'maxio-tabs__tab--disabled': disabled,\n 'maxio-tabs__tab--icon': isIcon,\n });\n\n if (props.type === 'icon') {\n const { icon, ...restProps } = props;\n return (\n <AriaTab\n id={value}\n isDisabled={disabled}\n {...restProps}\n className={tabClassName}\n >\n <div className=\"maxio-tabs__tab-content\">{icon}</div>\n </AriaTab>\n );\n }\n\n const { children, rightIcon, ...restProps } = props;\n\n return (\n <AriaTab\n id={value}\n isDisabled={disabled}\n {...restProps}\n className={tabClassName}\n >\n <div className=\"maxio-tabs__tab-content\">\n {children}\n {rightIcon || null}\n </div>\n </AriaTab>\n );\n};\n\nexport default Tab;\n","import React, { createContext, useContext } from 'react';\nimport type { TabsContext, TabsProviderProps } from './types';\n\nconst Context = createContext({\n variant: 'line',\n withDivider: false,\n} as TabsContext);\n\nexport const useTabs = () => useContext(Context);\n\ntype TabsProviderComponentProps = Pick<\n TabsProviderProps,\n 'children' | 'variant' | 'withDivider'\n>;\n\nexport const TabsProvider = ({\n children,\n variant = 'line',\n withDivider = false,\n}: TabsProviderComponentProps) => {\n return (\n <Context.Provider value={{ variant, withDivider }}>\n {children}\n </Context.Provider>\n );\n};\n","import { ReactNode } from 'react';\nimport React from 'react';\nimport cx from 'classnames';\nimport { TabPanel as AriaTabPanel } from 'react-aria-components';\nimport type { TestIdProps } from '../../../utils/testId';\n\nexport interface TabPanelProps\n extends\n Omit<React.HtmlHTMLAttributes<HTMLDivElement>, 'children' | 'id'>,\n TestIdProps {\n children: ReactNode;\n value?: number;\n /**\n * @deprecated React Aria now owns tab panel IDs. This prop is accepted for\n * one compatibility cycle but is ignored internally.\n */\n id?: string;\n}\n\nconst TabPanel = ({\n children,\n value,\n className,\n id: legacyId,\n ...props\n}: TabPanelProps) => {\n void legacyId;\n\n return (\n <AriaTabPanel\n id={value}\n className={cx('maxio-tabs__panel', className)}\n {...props}\n >\n {children}\n </AriaTabPanel>\n );\n};\n\nexport default TabPanel;\n","import React from 'react';\nimport cx from 'classnames';\nimport type { CardProps } from './types';\nexport type { CardProps, CardVariant } from './types';\n\nconst CardHeader = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cx('maxio-card__header', className)} {...props}>\n {children}\n </div>\n );\n};\n\nCardHeader.displayName = 'Card.Header';\n\nconst CardBody = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cx('maxio-card__body', className)} {...props}>\n {children}\n </div>\n );\n};\n\nCardBody.displayName = 'Card.Body';\n\nconst CardFooter = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cx('maxio-card__footer', className)} {...props}>\n {children}\n </div>\n );\n};\n\nCardFooter.displayName = 'Card.Footer';\n\nconst CardRoot = ({\n children,\n className,\n variant = 'primary',\n ...props\n}: CardProps) => {\n return (\n <div\n className={cx('maxio-card', `maxio-card--${variant}`, className)}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nCardRoot.displayName = 'Card';\n\ntype CardComponent = typeof CardRoot & {\n Header: typeof CardHeader;\n Body: typeof CardBody;\n Footer: typeof CardFooter;\n};\n\nconst Card = Object.assign(CardRoot, {\n Header: CardHeader,\n Body: CardBody,\n Footer: CardFooter,\n}) as CardComponent;\n\nexport default Card;\n","<svg\n id=\"logo-svg\"\n data-name=\"Maxio Logo SVG\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1036 240\"\n>\n <path d=\"M59.32,11.3L70.64,0h0s40.74,40.35,40.74,40.35v70.99H40.89L0,70.52l11.15-11.14,36.2,36.15h30.07l3.07-3.39L29.58,40.99l10.99-10.97,51.24,50.83,3.72-3.38v-30.34L59.32,11.3Z\" />\n <path d=\"M180.68,11.3L169.36,0h0s-40.73,40.35-40.73,40.35v70.99h70.48l40.89-40.83-11.15-11.14-36.2,36.15h-30.06l-3.07-3.39,50.91-51.15-10.99-10.97-51.24,50.83-3.72-3.38v-30.34l36.2-35.83Z\" />\n <path d=\"M59.32,228.7l11.31,11.29h0s40.74-40.35,40.74-40.35v-70.99H40.89L0,169.48l11.15,11.14,36.2-36.15h30.07l3.07,3.39-50.92,51.15,10.99,10.97,51.24-50.83,3.72,3.38v30.34l-36.2,35.83Z\" />\n <path d=\"M180.68,228.7l-11.32,11.29-40.73-40.35v-70.99h70.48l40.89,40.83-11.15,11.14-36.2-36.15h-30.06l-3.07,3.39,50.91,51.15-10.99,10.97-51.24-50.83-3.72,3.38v30.34l36.2,35.83Z\" />\n <path d=\"M1015.27,139.55c0-29.94-23.74-53.46-52.11-53.46-28.37,0-52.11,23.52-52.11,53.46s23.74,53.46,52.11,53.46,52.11-23.52,52.11-53.46ZM1035.59,140.5c-.5,40.27-32.73,72.76-72.43,72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71,72.44-73.71h.94c39.57.52,71.5,33.32,71.5,73.71v.95Z\" />\n <path fill-rule=\"evenodd\" d=\"M870.39,24h-20.33v20.33h20.33v-20.33ZM870.39,64.67h-20.33v148.59h20.33V64.67Z\" />\n <path fill-rule=\"evenodd\" d=\"M850.05,24h20.33v20.33h-20.33v-20.33Z\" />\n <path fill-rule=\"evenodd\" d=\"M695.01,82.85l50.83,56.28v6.53l-50.28,55.67,15.23,13.2,49.22-54.49h4.71l49.22,54.49,15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15,55.52h-3.96l-50.15-55.52-15.23,13.2Z\" />\n <path fill-rule=\"evenodd\" d=\"M660.49,78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13,0-52.44,18.93-58.09,44.86l-.28,1.27,19.33,3.72.31-1.14c2.39-8.91,6.66-16.54,13.04-21.94,6.36-5.39,14.91-8.63,26.02-8.63s19.12,3.25,24.76,8.96c5.64,5.72,8.73,14.06,8.73,24.53v6.11l-36.67,7.59-3.26.68c-16.14,3.47-29.79,7.84-39.59,14.45-10.54,7.11-16.64,16.83-16.64,30.62,0,12.51,4.51,22.62,12.5,29.59,7.96,6.95,19.25,10.67,32.63,10.67,22.27,0,41.87-12.03,51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58ZM620.4,146.77c-12.86,2.77-23.05,5.42-30.03,9.63-3.46,2.09-6.08,4.54-7.84,7.54-1.76,3-2.71,6.62-2.71,11.15,0,6.38,2.1,12.12,6.32,16.27,4.22,4.14,10.7,6.82,19.7,6.82,26.85,0,47.46-20.48,47.46-51.36v-7.2l-32.9,7.14Z\" />\n <path d=\"M434.8,188.74h4.54l61.73-164.33.15-.41h35.57v189.35h-20.89V55.37h-4.33l-59.7,157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98h-20.88V24h35.57l63.23,164.74Z\" />\n</svg>\n","import React from 'react';\nimport cx from 'classnames';\nimport LogoSvg from './logo.svg';\nimport { LogoProps } from './Logo.types';\n\nconst Logo = (props: LogoProps) => {\n const {\n size = 'sm',\n className,\n variant = 'lockup',\n alt = 'maxio logo',\n 'data-testid': testId,\n } = props;\n const logoAsMark = variant === 'mark';\n const isCustomSize = typeof size === 'number';\n\n return (\n <LogoSvg\n role=\"img\"\n viewBox={logoAsMark ? '0 0 240 240' : '0 0 1036 240'}\n aria-label={alt}\n data-testid={testId}\n height={isCustomSize ? size : undefined}\n className={cx(\n 'maxio-logo',\n !isCustomSize && `maxio-logo--${size}`,\n logoAsMark && 'maxio-logo--mark',\n className\n )}\n />\n );\n};\n\nexport default Logo;\n","import React, { useRef } from 'react';\nimport { ToastProps } from './Toast.types';\nimport { useToast } from '@react-aria/toast';\nimport classNames from 'classnames';\n\nimport Link from '../../../Link';\nimport IconButton from '../../../Buttons/IconButton';\nimport Icon from '../../../Icon';\nimport { IconVariant } from '../../../Icon/Icon.types';\nimport { childTestId } from '../../../../utils/testId';\n\nconst Toast = ({ state, ...props }: ToastProps) => {\n const ref = useRef(null);\n const { toastProps, contentProps, titleProps, closeButtonProps } = useToast(\n props,\n state,\n ref\n );\n const {\n closable = true,\n underline = true,\n external = false,\n testId,\n } = props.toast.content;\n\n const toastClasses = classNames('maxio-toast', {\n [`maxio-toast--${props.toast.content.sentiment}`]:\n props.toast.content.sentiment,\n });\n\n const iconMap: Record<string, IconVariant> = {\n default: 'info-circle-fill',\n success: 'check-circle-fill',\n warning: 'warning-circle-fill',\n danger: 'error-fill',\n info: 'info-circle-fill',\n };\n\n const icon = iconMap[props.toast.content.sentiment || 'default'];\n\n return (\n <div\n className={toastClasses}\n data-maxio-mode=\"dark\"\n {...toastProps}\n ref={ref}\n data-testid={testId}\n >\n <Icon variant={icon} className=\"maxio-toast__icon\" />\n <div className=\"maxio-toast__container\" {...contentProps}>\n <div className=\"maxio-toast__content\" {...titleProps}>\n {props.toast.content.title && (\n <span className=\"maxio-toast__title\">\n {props.toast.content.title}\n </span>\n )}\n {props.toast.content.message && (\n <span className=\"maxio-toast__message\">\n {props.toast.content.message}\n </span>\n )}\n {props.toast.content.link?.text && props.toast.content.link?.href && (\n <Link\n href={props.toast.content.link.href}\n underline={underline}\n external={external}\n >\n {props.toast.content.link.text}\n </Link>\n )}\n </div>\n </div>\n {closable && (\n <IconButton\n variant=\"ghost\"\n icon={<Icon variant=\"cross\" />}\n aria-label=\"Dismiss Notification\"\n className=\"maxio-toast__dismiss\"\n {...closeButtonProps}\n data-testid={childTestId(testId, 'dismiss')}\n />\n )}\n </div>\n );\n};\n\nexport default Toast;\n","import React from 'react';\nimport { useToastRegion } from '@react-aria/toast';\nimport { ToastRegionProps } from './ToastRegion.types';\n\nimport Toast from '../Toast/Toast';\n\nconst ToastRegion = ({ state, ...props }: ToastRegionProps) => {\n const ref = React.useRef(null);\n const { regionProps } = useToastRegion(props, state, ref);\n\n return (\n <div\n {...regionProps}\n ref={ref}\n className={props.className}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '10px',\n }}\n >\n {state.visibleToasts.map((toast) => (\n <Toast key={toast.key} toast={toast} state={state} />\n ))}\n </div>\n );\n};\n\nexport default ToastRegion;\n","import React, { createContext, useContext, useCallback, useMemo } from 'react';\nimport {\n useToastQueue,\n ToastQueue as ReactAriaToastQueue,\n} from '@react-stately/toast';\nimport { GlobalToastProviderProps, ToastContextValue } from './types';\nimport ToastRegion from '../ToastRegion';\nimport { ToastContent } from '../Toast/Toast.types';\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\nexport const GlobalToastProvider = ({\n children,\n toastQueue,\n ...props\n}: GlobalToastProviderProps) => {\n const state = useToastQueue(toastQueue);\n\n const removeAllToasts = useCallback(() => {\n state.visibleToasts.forEach((toast) => {\n toastQueue.close(toast.key);\n });\n }, [state.visibleToasts, toastQueue]);\n\n const contextValue = useMemo(\n () => ({\n addToast: toastQueue.add.bind(toastQueue),\n removeToast: toastQueue.clear.bind(toastQueue),\n removeAllToasts: removeAllToasts,\n state,\n }),\n [toastQueue, removeAllToasts, state]\n );\n\n return (\n <ToastContext.Provider value={contextValue}>\n {children}\n {state.visibleToasts.length > 0 && (\n <ToastRegion {...props} state={state} />\n )}\n </ToastContext.Provider>\n );\n};\n\n// Hook for programmatic toast access\nexport const useToast = () => {\n const context = useContext(ToastContext);\n\n if (!context) {\n throw new Error(\n 'useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.'\n );\n }\n\n return context;\n};\n\n// Custom ToastQueue to fix type issues\nexport class ToastQueue extends ReactAriaToastQueue<ToastContent> {}\n","import React, { useId, useCallback } from 'react';\nimport cx from 'classnames';\n\nexport type ToggleProps = {\n /**\n * The state of the toggle\n */\n checked?: boolean;\n /**\n * The state for uncontrolled toggle.\n */\n defaultChecked?: boolean;\n /**\n * The onChange function\n */\n onChange?: (\n value: boolean,\n event?:\n | React.ChangeEvent<HTMLInputElement>\n | React.KeyboardEvent<HTMLInputElement>\n ) => void;\n /**\n * Is the toggle disabled\n */\n disabled?: boolean;\n /**\n * Toggle name\n */\n name?: string;\n /**\n * Toggle label\n */\n valueDescription?: string;\n /**\n * Toggle label position\n */\n valueDescriptionPosition?: 'left' | 'right';\n /**\n * Class name for the main container\n */\n className?: string;\n /**\n * Toggle id - if id not provided then it will be generated automatically\n */\n id?: string;\n /**\n * Aria label for the toggle - should be provided if no valueDescription is provided\n */\n 'aria-label'?: string;\n /**\n * Test ID set on the root element\n * @default 'toggle-container'\n */\n 'data-testid'?: string;\n};\nconst Toggle = ({\n defaultChecked,\n checked,\n onChange,\n disabled,\n valueDescription,\n valueDescriptionPosition,\n className,\n name,\n id,\n 'data-testid': testId = 'toggle-container',\n ...props\n}: ToggleProps) => {\n const generatedId = useId();\n const isUncontrolled = typeof defaultChecked === 'boolean';\n\n const toggleId = id || generatedId;\n const flexDirection =\n valueDescriptionPosition === 'left' ? 'row' : 'row-reverse';\n const isDescriptionRendered = valueDescription && valueDescriptionPosition;\n\n const handleKeyboardInteractions = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n e.preventDefault();\n const currentValue = e.currentTarget.checked;\n if (isUncontrolled) {\n e.currentTarget.checked = !currentValue;\n }\n\n if (onChange) onChange(!currentValue, e);\n }\n },\n [isUncontrolled, onChange]\n );\n\n const label =\n props['aria-label'] ||\n (isDescriptionRendered ? undefined : valueDescription);\n\n return (\n <div\n className={cx('maxio-toggle', className, {\n 'maxio-toggle--disabled': disabled,\n })}\n style={{\n display: 'inline-flex',\n flexDirection,\n }}\n data-testid={testId}\n >\n {isDescriptionRendered ? (\n <label className=\"maxio-toggle__label\" htmlFor={toggleId}>\n {valueDescription}\n </label>\n ) : null}\n\n <div className=\"maxio-toggle__container\">\n <input\n type=\"checkbox\"\n defaultChecked={defaultChecked}\n checked={checked}\n onChange={(e) => {\n if (onChange) {\n onChange(e.target.checked, e);\n }\n }}\n onKeyDown={handleKeyboardInteractions}\n disabled={disabled}\n className=\"maxio-toggle__checkbox\"\n id={toggleId}\n name={name}\n aria-label={label}\n />\n <div\n className=\"maxio-toggle__track\"\n role=\"switch\"\n aria-checked={checked}\n aria-hidden=\"true\"\n >\n <div className=\"maxio-toggle__handle\"></div>\n <span className=\"maxio-toggle__icon\">\n <i className=\"maxio-toggle__icon-on\"></i>\n </span>\n <span className=\"maxio-toggle__icon\">\n <i className=\"maxio-toggle__icon-off\"></i>\n </span>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Toggle;\n","import React, { useRef } from 'react';\nimport { AriaButtonProps } from 'react-aria';\nimport { useButton } from 'react-aria';\nimport Icon from '../../Icon';\n\nconst DismissButton = ({ ...props }: AriaButtonProps) => {\n const ref = useRef(null);\n const { buttonProps } = useButton(props, ref);\n\n return (\n <button {...buttonProps} className=\"maxio-chip__dismiss-button\">\n <Icon variant=\"cross-circle-fill\" className=\"maxio-chip__icon\" />\n </button>\n );\n};\n\nexport default DismissButton;\n","import React from 'react';\nimport cx from 'classnames';\nimport { AuthLayoutProps, Sentiment } from './AuthLayout.types';\nimport { Body, Heading } from '../../components/Typography';\nimport { Flex } from '../../components/Flex';\nimport { Alert } from '../../components/Notifications/Alert';\nimport Logo from '../../components/Logo/Logo';\nimport Card from '../../components/Card/Card';\n\nconst borderColor: Record<Sentiment, string> = {\n success: 'maxio-auth-layout__heading--success',\n danger: 'maxio-auth-layout__heading--danger',\n};\n\nconst AuthLayout = ({\n children,\n heading,\n description,\n sentiment = 'success',\n leadingElement = null,\n alert,\n topAddon = null,\n footer,\n}: AuthLayoutProps) => {\n return (\n <div className=\"maxio-auth-layout\">\n <Flex alignItems=\"center\" justifyContent=\"between\">\n <Logo size=\"md\" />\n {topAddon}\n </Flex>\n {alert && (\n <Alert display=\"block\" title={alert.title} sentiment={alert.sentiment}>\n {alert.children}\n </Alert>\n )}\n <Card variant=\"secondary\">\n <Card.Body>\n <Flex flexDirection=\"col\" gap={6}>\n <Flex flexDirection=\"col\" gap={2}>\n <Flex alignItems=\"center\" gap={2}>\n {leadingElement}\n <Heading\n size=\"lg\"\n className={cx(\n 'maxio-auth-layout__heading',\n borderColor[sentiment]\n )}\n >\n {heading}\n </Heading>\n </Flex>\n {description && (\n <Flex style={{ color: 'var(--maxio-color-text-tertiary)' }}>\n <Body size=\"sm\" className=\"maxio-auth-layout__description\">\n {description}\n </Body>\n </Flex>\n )}\n </Flex>\n {children}\n </Flex>\n </Card.Body>\n {footer && <Card.Footer>{footer}</Card.Footer>}\n </Card>\n </div>\n );\n};\n\nexport default AuthLayout;\n","import React from 'react';\nimport cx from 'classnames';\n\nimport { AvatarProps } from './Avatar.types';\n\nconst Avatar = ({\n className,\n src,\n alt = 'avatar',\n 'data-testid': testId,\n}: AvatarProps) => {\n return (\n <img\n className={cx('maxio-avatar', className)}\n alt={alt}\n src={src}\n data-testid={testId}\n />\n );\n};\n\nexport default Avatar;\n","import React from 'react';\nimport classNames from 'classnames';\nimport { BannerProps } from './Banner.types';\n\nimport { IconVariant } from '../../Icon/Icon.types';\n\nimport Icon from '../../Icon/Icon';\nimport Link from '../../Link/Link';\nimport IconButton from '../../Buttons/IconButton';\nimport { childTestId } from '../../../utils/testId';\n\nconst Banner = ({\n children,\n title,\n linkText,\n linkExternal,\n href,\n display = 'inline',\n sentiment = 'info',\n onDismiss,\n className,\n 'data-testid': testId,\n}: BannerProps) => {\n if (!children && !title) {\n console.warn(\n 'Banner component requires either children or title prop to be rendered'\n );\n return null;\n }\n\n const bannerClasses = classNames('maxio-banner', {\n [`maxio-banner--${sentiment}`]: sentiment !== 'info' && sentiment,\n className,\n });\n\n const iconMap: Record<string, IconVariant> = {\n success: 'check-circle-fill',\n warning: 'warning-circle-fill',\n danger: 'error-fill',\n info: 'info-circle-fill',\n };\n\n const icon = iconMap[sentiment];\n\n const contentWrapper = classNames('maxio-banner__content', {\n 'maxio-banner__content--block': display === 'block',\n });\n\n return (\n <div className={bannerClasses} aria-live=\"assertive\" data-testid={testId}>\n <Icon variant={icon} className=\"maxio-banner__icon\" aria-hidden=\"true\" />\n <section className=\"maxio-banner__container\">\n <div className={contentWrapper}>\n {title && <span className=\"maxio-banner__title\">{title}</span>}\n {children && (\n <span className=\"maxio-banner__message\">{children}</span>\n )}\n {linkText && href && (\n <Link\n href={href}\n {...(sentiment !== 'warning' && { variant: 'inverse' })}\n underline\n {...(linkExternal ? { external: true } : {})}\n >\n {linkText}\n </Link>\n )}\n </div>\n </section>\n {onDismiss && (\n <IconButton\n icon={<Icon variant=\"cross\" />}\n aria-label=\"Dismiss Notification\"\n variant=\"ghost\"\n onClick={onDismiss}\n className=\"maxio-banner__dismiss\"\n data-testid={childTestId(testId, 'dismiss')}\n />\n )}\n </div>\n );\n};\n\nexport default Banner;\n","import React, { Children, isValidElement, cloneElement } from 'react';\nimport cx from 'classnames';\n\nimport { BreadcrumbsItemProps, BreadcrumbsProps } from './types';\nimport BreadcrumbsItem from './BreadcrumbsItem';\nimport { ERROR_MESSAGES } from './constants';\n\nconst Breadcrumbs: React.FC<BreadcrumbsProps> = ({\n className,\n children,\n ...rest\n}) => {\n const childrenCount = Children.count(children);\n if (childrenCount === 0) {\n throw new Error(ERROR_MESSAGES.NO_ITEMS);\n }\n\n const content = Children.map(children, (child, index: number) => {\n if (\n isValidElement<BreadcrumbsItemProps>(child) &&\n child.type === BreadcrumbsItem\n ) {\n if (index === childrenCount - 1 && child.props.href) {\n throw new Error(ERROR_MESSAGES.LAST_ITEM_WITH_HREF);\n }\n return cloneElement(child, {\n 'aria-current': index === childrenCount - 1 ? 'page' : undefined,\n });\n }\n throw new Error(ERROR_MESSAGES.ONLY_BREADCRUMBS_ITEM);\n });\n\n return (\n <nav aria-label=\"Breadcrumb\" {...rest}>\n <ol className={cx('maxio-breadcrumbs', className)}>{content}</ol>\n </nav>\n );\n};\n\nexport default Breadcrumbs;\n","import React, { ReactNode } from 'react';\nimport cx from 'classnames';\nimport { AriaCheckboxGroupProps, useCheckboxGroup } from 'react-aria';\nimport { useCheckboxGroupState } from '@react-stately/checkbox';\nimport { CheckboxGroupContext } from '../contexts';\nimport FormHelperText from '../../FormHelperText';\nimport FormErrorMessage from '../../FormErrorMessage';\n\nexport interface CheckboxGroupProps extends Pick<\n AriaCheckboxGroupProps,\n | 'aria-describedby'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-label'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onFocus'\n | 'onChange'\n | 'onFocusChange'\n | 'value'\n | 'defaultValue'\n | 'label'\n> {\n children: ReactNode;\n className?: string;\n disabled?: boolean;\n errorMessage?: string;\n helperText?: string;\n name: string;\n}\n\nconst CheckboxGroup = ({\n helperText,\n className,\n errorMessage,\n children,\n disabled,\n label,\n defaultValue,\n name,\n ...props\n}: CheckboxGroupProps) => {\n const state = useCheckboxGroupState({\n defaultValue,\n name,\n errorMessage,\n description: helperText,\n label,\n isDisabled: disabled,\n isInvalid: !!errorMessage,\n ...props,\n });\n const {\n groupProps,\n labelProps,\n descriptionProps,\n errorMessageProps,\n isInvalid,\n } = useCheckboxGroup(\n {\n 'aria-label': (label ?? props['aria-label'])?.toString(),\n isDisabled: disabled,\n isInvalid: !!errorMessage,\n ...props,\n },\n state\n );\n\n const containerClassNames = cx(\n 'maxio-checkbox-group',\n {\n 'maxio-checkbox-group--disabled': disabled,\n },\n className\n );\n\n const showHelperText = helperText && !errorMessage;\n\n return (\n <div className={containerClassNames} {...groupProps}>\n {label && (\n <label className=\"maxio-checkbox-group__label\" {...labelProps}>\n {label}\n </label>\n )}\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n\n {showHelperText && (\n <FormHelperText {...descriptionProps}>{helperText}</FormHelperText>\n )}\n {errorMessage && isInvalid && (\n <FormErrorMessage {...errorMessageProps}>\n {errorMessage}\n </FormErrorMessage>\n )}\n </div>\n );\n};\n\nexport default CheckboxGroup;\n","import React, { useRef } from 'react';\nimport { useToggleButton } from 'react-aria';\nimport { useToggleState } from '@react-stately/toggle';\nimport classNames from 'classnames';\nimport { ChipProps } from './Chip.types';\nimport Icon from '../Icon';\nimport DismissButton from './DismissButton/DismissButton';\n\nconst Chip = ({\n label,\n onDismiss,\n dismissLabel,\n leadingIcon,\n trailingIcon,\n title,\n ...props\n}: ChipProps) => {\n const ref = useRef(null);\n const state = useToggleState(props);\n const { buttonProps } = useToggleButton(props, state, ref);\n\n const chipClasses = classNames('maxio-chip', {\n 'maxio-chip--selected': state?.isSelected,\n });\n\n const buttonClasses = classNames('maxio-chip__button', {\n 'maxio-chip--dismissible': onDismiss,\n });\n\n return (\n <div className={chipClasses}>\n <button\n className={buttonClasses}\n ref={ref}\n {...buttonProps}\n title={title}\n >\n {leadingIcon && (\n <Icon variant={leadingIcon} className=\"maxio-chip__icon\" />\n )}\n <span className=\"maxio-chip__label\">{label}</span>\n {trailingIcon && !onDismiss && (\n <Icon variant={trailingIcon} className=\"maxio-chip__icon\" />\n )}\n </button>\n {onDismiss && (\n <DismissButton onPress={onDismiss} aria-label={dismissLabel} />\n )}\n </div>\n );\n};\n\nexport default Chip;\n","import React, { ElementType } from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type CodeProps = BaseTypographyProps & {\n /**\n * The component to render as (e.g. `span or div`)\n */\n as?: ElementType;\n};\n\nconst Code = ({ as = 'div', children, className, ...rest }: CodeProps) => {\n const AsComponent = as;\n\n const classNames = cx('maxio-code', className);\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Code;\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\n\nexport type CopyFeedbackState = 'idle' | 'copied' | 'error';\n\ntype ResolvedFeedbackState = Exclude<CopyFeedbackState, 'idle'>;\n\n/**\n * `announceId` exists so a repeat of the same message remounts the live region\n * node, which is what makes a screen reader read identical text twice in a row.\n */\ntype Feedback = {\n state: ResolvedFeedbackState;\n value: string;\n announceId: number;\n};\n\ntype UseCopyToClipboardOptions = {\n copyLabel: string;\n copiedLabel: string;\n copyErrorLabel: string;\n resetAfterMs: number;\n onCopy?: (value: string) => void;\n onCopyError?: (error: unknown) => void;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\n/**\n * Owns the clipboard write, the transient copied/error feedback and the timers\n * and staleness guards around them. Kept free of any rendering concern so the\n * behaviour can be tested and reused without mounting a button or a tooltip.\n */\nexport const useCopyToClipboard = (\n value: string,\n {\n copyLabel,\n copiedLabel,\n copyErrorLabel,\n resetAfterMs,\n onCopy,\n onCopyError,\n onClick,\n }: UseCopyToClipboardOptions\n) => {\n const [feedback, setFeedback] = useState<Feedback | null>(null);\n const resetTimeoutRef = useRef<number | null>(null);\n const announceIdRef = useRef(0);\n\n // Three independent reasons to discard a resolved clipboard write, kept as\n // three separate refs so each guard says what it is actually protecting.\n const isMountedRef = useRef(true);\n const activeCopyIdRef = useRef(0);\n const latestValueRef = useRef(value);\n\n const clearFeedbackTimers = useCallback(() => {\n if (resetTimeoutRef.current !== null) {\n clearTimeout(resetTimeoutRef.current);\n resetTimeoutRef.current = null;\n }\n }, []);\n\n const resetFeedback = useCallback(() => {\n clearFeedbackTimers();\n setFeedback(null);\n }, [clearFeedbackTimers]);\n\n const showFeedback = useCallback(\n (nextState: ResolvedFeedbackState, feedbackValue: string) => {\n clearFeedbackTimers();\n setFeedback({\n state: nextState,\n value: feedbackValue,\n announceId: ++announceIdRef.current,\n });\n resetTimeoutRef.current = window.setTimeout(resetFeedback, resetAfterMs);\n },\n [clearFeedbackTimers, resetAfterMs, resetFeedback]\n );\n\n useEffect(() => {\n latestValueRef.current = value;\n resetFeedback();\n }, [resetFeedback, value]);\n\n useEffect(() => {\n // Re-set on mount, not just at declaration: StrictMode runs the cleanup and\n // then mounts again, which would otherwise leave this false forever.\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n clearFeedbackTimers();\n };\n }, [clearFeedbackTimers]);\n\n const handleCopy = useCallback(\n async (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n const copyId = ++activeCopyIdRef.current;\n const requestedValue = value;\n\n const isStale = () =>\n !isMountedRef.current ||\n copyId !== activeCopyIdRef.current ||\n requestedValue !== latestValueRef.current;\n\n try {\n await navigator.clipboard.writeText(requestedValue);\n } catch (error) {\n if (!isStale()) {\n showFeedback('error', requestedValue);\n }\n onCopyError?.(error);\n return;\n }\n\n if (!isStale()) {\n showFeedback('copied', requestedValue);\n }\n onCopy?.(requestedValue);\n },\n [onClick, onCopy, onCopyError, showFeedback, value]\n );\n\n const feedbackState: CopyFeedbackState =\n feedback?.value === value ? feedback.state : 'idle';\n\n const feedbackLabel = {\n idle: copyLabel,\n copied: copiedLabel,\n error: copyErrorLabel,\n }[feedbackState];\n\n return {\n feedbackState,\n feedbackLabel,\n /** Non-null only while there is something to announce. */\n announcement:\n feedbackState === 'idle' || !feedback\n ? null\n : { id: feedback.announceId, message: feedbackLabel },\n handleCopy,\n };\n};\n\nexport default useCopyToClipboard;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n DateField as AriaDateField,\n Label,\n Text,\n FieldError,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport DateInput from './DateInput';\nimport type { DateFieldProps } from './types';\n\n/** DateField provides localized, individually editable date and time segments for keyboard entry. */\nconst DateField = <T extends DateValue>({\n label,\n description,\n errorMessage,\n className,\n ...props\n}: DateFieldProps<T>) => (\n <AriaDateField\n {...props}\n className={composeRenderProps(className, (className, state) =>\n cx(\n 'maxio-text-field',\n 'maxio-date-field',\n {\n 'maxio-text-field--disabled': state.isDisabled,\n 'maxio-text-field--error': state.isInvalid,\n 'maxio-text-field--readonly': state.isReadOnly,\n },\n className\n )\n )}\n >\n {label != null && (\n <Label className=\"maxio-text-field__label\">{label}</Label>\n )}\n <div className=\"maxio-text-field__items\">\n <div className=\"maxio-text-field__input\">\n <DateInput />\n </div>\n </div>\n {description != null && (\n <Text slot=\"description\" className=\"maxio-form-helper-text\">\n {description}\n </Text>\n )}\n <FieldError className=\"maxio-form-error\">{errorMessage}</FieldError>\n </AriaDateField>\n);\nexport default DateField;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n DatePicker as AriaDatePicker,\n Label,\n Text,\n FieldError,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport { Group, Button, Dialog } from 'react-aria-components';\nimport { Popover } from '../../Popover';\nimport Icon from '../../Icon';\nimport { Calendar } from '../../Calendar';\nimport DatePresets from '../DatePresets';\nimport DateInput from '../DateField/DateInput';\nimport { isPresetDateDisabled } from '../DatePresets/utils';\nimport type { DatePickerProps } from './types';\n\n/** DatePicker combines localized date entry with a calendar popover for selecting one date. */\nconst DatePicker = <T extends DateValue>({\n label,\n description,\n errorMessage,\n className,\n presets,\n presetsLabel,\n navigation,\n ...props\n}: DatePickerProps<T>) => {\n const nullPresetLabel = presets?.find(\n (preset) => preset.value === null\n )?.label;\n return (\n <AriaDatePicker\n {...props}\n className={composeRenderProps(className, (className, state) =>\n cx(\n 'maxio-text-field',\n 'maxio-date-field',\n {\n 'maxio-text-field--disabled': state.isDisabled,\n 'maxio-text-field--error': state.isInvalid,\n 'maxio-text-field--readonly': state.isReadOnly,\n },\n className\n )\n )}\n >\n {({ state, isDisabled, isReadOnly }) => (\n <>\n {label != null && (\n <Label className=\"maxio-text-field__label\">{label}</Label>\n )}\n <Group className=\"maxio-text-field__items\">\n <div className=\"maxio-text-field__input\">\n <DateInput\n displayValue={\n state.value === null ? nullPresetLabel : undefined\n }\n />\n </div>\n <div className=\"maxio-text-field__trailing-element\">\n <Button className=\"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon\">\n <Icon variant=\"calendar\" />\n </Button>\n </div>\n </Group>\n {description != null && (\n <Text slot=\"description\" className=\"maxio-form-helper-text\">\n {description}\n </Text>\n )}\n <FieldError className=\"maxio-form-error\">{errorMessage}</FieldError>\n <Popover hideArrow className=\"maxio-date-field__popover\">\n <Dialog className=\"maxio-date-field__dialog\">\n <Calendar navigation={navigation} />\n <DatePresets\n presets={presets}\n label={presetsLabel}\n isDisabled={isDisabled || isReadOnly}\n isPresetDisabled={(value) => isPresetDateDisabled(value, props)}\n onSelect={(value) => {\n state.setValue(value);\n state.setOpen(false);\n }}\n />\n </Dialog>\n </Popover>\n </>\n )}\n </AriaDatePicker>\n );\n};\nexport default DatePicker;\n","import React from 'react';\nimport cx from 'classnames';\nimport {\n DateRangePicker as AriaDateRangePicker,\n Label,\n Text,\n Group,\n Button,\n Dialog,\n FieldError,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport { Popover } from '../../Popover';\nimport Icon from '../../Icon';\nimport { RangeCalendar } from '../../RangeCalendar';\nimport DatePresets from '../DatePresets';\nimport DateInput from '../DateField/DateInput';\nimport { isPresetRangeDisabled } from '../DatePresets/utils';\nimport type { DateRangePickerProps } from './types';\nimport { getPresetLabel, selectRangePreset } from './utils';\n\n/** DateRangePicker combines two localized date inputs with a calendar popover for selecting a date range. */\nconst DateRangePicker = <T extends DateValue>({\n label,\n description,\n errorMessage,\n className,\n presets,\n presetsLabel,\n navigation,\n ...props\n}: DateRangePickerProps<T>) => (\n <AriaDateRangePicker\n {...props}\n className={composeRenderProps(className, (className, state) =>\n cx(\n 'maxio-text-field',\n 'maxio-date-field',\n {\n 'maxio-text-field--disabled': state.isDisabled,\n 'maxio-text-field--error': state.isInvalid,\n 'maxio-text-field--readonly': state.isReadOnly,\n },\n className\n )\n )}\n >\n {({ state, isDisabled, isReadOnly }) => {\n const presetLabel = getPresetLabel(state.value, presets);\n return (\n <>\n {label != null && (\n <Label className=\"maxio-text-field__label\">{label}</Label>\n )}\n <Group className=\"maxio-text-field__items\">\n <div className=\"maxio-text-field__input\">\n <DateInput\n slot=\"start\"\n displayValue={\n state.value?.start == null ? presetLabel : undefined\n }\n />\n <span aria-hidden=\"true\" className=\"maxio-body-sm\">\n →\n </span>\n <DateInput\n slot=\"end\"\n displayValue={\n state.value?.end == null ? presetLabel : undefined\n }\n />\n </div>\n <div className=\"maxio-text-field__trailing-element\">\n <Button className=\"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon\">\n <Icon variant=\"calendar\" />\n </Button>\n </div>\n </Group>\n {description != null && (\n <Text slot=\"description\" className=\"maxio-form-helper-text\">\n {description}\n </Text>\n )}\n <FieldError className=\"maxio-form-error\">{errorMessage}</FieldError>\n <Popover hideArrow className=\"maxio-date-field__popover\">\n <Dialog className=\"maxio-date-field__dialog\">\n <RangeCalendar navigation={navigation} />\n <DatePresets\n presets={presets}\n label={presetsLabel}\n isDisabled={isDisabled || isReadOnly}\n isPresetDisabled={(value) =>\n isPresetRangeDisabled(value, props)\n }\n onSelect={(value) => selectRangePreset(state, value)}\n />\n </Dialog>\n </Popover>\n </>\n );\n }}\n </AriaDateRangePicker>\n);\nexport default DateRangePicker;\n","import React, { ElementType } from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type DisplayProps = BaseTypographyProps & {\n /**\n * The component to render as (e.g. `span or div`)\n */\n as?: ElementType;\n /**\n * Defines the size of the display text\n */\n size?: 'sm' | 'md' | 'lg';\n};\n\nconst Display = ({\n as = 'div',\n children,\n size = 'md',\n className,\n ...rest\n}: DisplayProps) => {\n const AsComponent = as;\n\n const classNames = cx(`maxio-display-${size}`, className);\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Display;\n","import React from 'react';\nimport cx from 'classnames';\nimport { Body } from '../Typography';\nimport { Flex } from '../Flex';\nimport { EmptyStateProps } from './EmptyState.types';\n\nconst NO_DATA_MESSAGE = 'There is no data to display yet.';\nconst NO_RESULTS_MESSAGE =\n \"We couldn't find any items matching your criteria. Try adjusting your search or filters to see more results.\";\n\nconst EmptyState = ({\n hasActiveFilters = false,\n title,\n headingLevel = 'h2',\n description,\n actions,\n className,\n ...rest\n}: EmptyStateProps) => {\n const rootClasses = cx('maxio-empty-state', className);\n // Heading couples its size to the rendered element (`lg` is always `h1`), but\n // EmptyState sits inside a page section, so the level has to be set separately\n // from the visual size to keep the page outline intact.\n const HeadingTag = headingLevel;\n // The built-in copy is a fallback, not a default: it only fills in when the\n // consumer supplied neither a title nor a description. A provided description\n // always renders, with or without a title.\n const usesFallbackMessage = !title && !description;\n const message = usesFallbackMessage\n ? hasActiveFilters\n ? NO_RESULTS_MESSAGE\n : NO_DATA_MESSAGE\n : description;\n\n return (\n <div className={rootClasses} {...rest}>\n <Flex\n flexDirection=\"col\"\n alignItems=\"center\"\n gap={4}\n className=\"maxio-empty-state__content\"\n >\n <Flex\n flexDirection=\"col\"\n alignItems=\"center\"\n gap={2}\n className=\"maxio-empty-state__copy\"\n >\n {title && (\n <HeadingTag className=\"maxio-heading-lg\">{title}</HeadingTag>\n )}\n {message && (\n <Body size=\"sm\" className=\"maxio-empty-state__description\">\n {message}\n </Body>\n )}\n </Flex>\n {actions && (\n <Flex alignItems=\"center\" gap={2}>\n {actions}\n </Flex>\n )}\n </Flex>\n </div>\n );\n};\n\nexport default EmptyState;\n","import React from 'react';\nimport cx from 'classnames';\n\nimport Icon from '../Icon';\nimport { EnvironmentBarProps } from './EnvironmentBar.types';\n\n/**\n * Persistent environment context across the top of the window. Static text, so it is\n * not a live region; a labeled region, so screen-reader users can reach it from the\n * landmarks list.\n */\nconst EnvironmentBar = ({\n children,\n icon = 'cube',\n className,\n 'data-testid': testId,\n}: EnvironmentBarProps) => (\n <div\n className={cx('maxio-environment-bar', className)}\n role=\"region\"\n aria-label=\"Environment\"\n data-testid={testId}\n >\n {icon !== null && (\n <span className=\"maxio-environment-bar__icon\" aria-hidden=\"true\">\n <Icon variant={icon} />\n </span>\n )}\n <span className=\"maxio-environment-bar__text\">{children}</span>\n </div>\n);\n\nexport default EnvironmentBar;\n","import React from 'react';\nimport cx from 'classnames';\nimport { GridProps } from './types';\n\nconst Grid = ({\n children,\n templateColumns,\n templateRows,\n autoColumns,\n autoRows,\n inline,\n column,\n columnStart,\n columnEnd,\n row,\n rowStart,\n rowEnd,\n gap,\n gapX,\n gapY,\n className,\n justifyContent,\n alignItems,\n ...props\n}: GridProps) => {\n const gridClasses = cx(className, {\n 'maxio-grid': !inline,\n 'maxio-inline-grid': inline,\n [`maxio-grid-cols-${templateColumns}`]: templateColumns,\n [`maxio-grid-rows-${templateRows}`]: templateRows,\n [`maxio-auto-cols-${autoColumns}`]: autoColumns,\n [`maxio-auto-rows-${autoRows}`]: autoRows,\n [`maxio-col-${column === 'auto' ? 'auto' : `span-${column}`}`]: column,\n [`maxio-col-start-${columnStart}`]: columnStart,\n [`maxio-col-end-${columnEnd}`]: columnEnd,\n [`maxio-row-${row === 'auto' ? 'auto' : `span-${row}`}`]: row,\n [`maxio-row-start-${rowStart}`]: rowStart,\n [`maxio-row-end-${rowEnd}`]: rowEnd,\n [`maxio-gap-${gap}`]: gap !== undefined,\n [`maxio-gap-x-${gapX}`]: gapX !== undefined,\n [`maxio-gap-y-${gapY}`]: gapY !== undefined,\n [`maxio-justify-${justifyContent}`]: justifyContent,\n [`maxio-items-${alignItems}`]: alignItems,\n });\n\n return (\n <div className={gridClasses || undefined} {...props}>\n {children}\n </div>\n );\n};\n\nexport default Grid;\n","import React, { ElementType } from 'react';\nimport cx from 'classnames';\nimport { BaseTypographyProps } from '../types';\n\nexport type LabelProps = BaseTypographyProps & {\n /**\n * The component to render as (e.g. `span or div`)\n */\n as?: ElementType;\n /**\n * Defines the size of the label text\n */\n size?: 'xs' | 'sm';\n};\n\nconst Label = ({\n as = 'div',\n children,\n size = 'sm',\n className,\n ...rest\n}: LabelProps) => {\n const AsComponent = as;\n\n const classNames = cx(`maxio-label-${size}`, className);\n\n return (\n <AsComponent className={classNames} {...rest}>\n {children}\n </AsComponent>\n );\n};\n\nexport default Label;\n","import React from 'react';\nimport { MenuButtonProps } from './types';\nimport cx from 'classnames';\n\nimport Icon from '../../../Icon';\nimport { useMenu } from '../../hooks';\nimport { childTestId } from '../../../../utils/testId';\n\nconst MenuButton = ({\n children,\n iconName = 'chevron-down',\n 'aria-label': ariaLabel,\n size = 'md',\n variant = 'secondary',\n 'data-testid': ownTestId,\n}: MenuButtonProps) => {\n const iconClassName = cx({\n 'maxio-action-menu__chevron': iconName === 'chevron-down',\n });\n\n const buttonClasses = cx(\n 'maxio-button',\n `maxio-button--${variant}`,\n `maxio-button--${size}`,\n {\n 'maxio-button--icon': iconName && !children,\n }\n );\n\n const { isOpen, buttonId, controlsId, testId } = useMenu();\n\n return (\n <summary\n className={buttonClasses}\n aria-haspopup=\"true\"\n aria-label={ariaLabel}\n aria-expanded={isOpen}\n aria-controls={controlsId}\n id={buttonId}\n data-testid={ownTestId ?? childTestId(testId, 'trigger')}\n >\n {children && <span>{children}</span>}\n {iconName && (\n <Icon\n variant={iconName}\n className={`${iconClassName} maxio-button__trailing-element`}\n />\n )}\n </summary>\n );\n};\n\nexport default MenuButton;\n","import React from 'react';\nimport cx from 'classnames';\nimport ActionList, { ActionListItem } from '../../../ActionList';\nimport { useMenu } from '../../hooks';\nimport { childTestId, type TestIdProps } from '../../../../utils/testId';\n\ninterface MenuListProps extends TestIdProps {\n items: ActionListItem[];\n alignItemsEnd?: boolean;\n}\n\nconst MenuList = ({\n items,\n alignItemsEnd = false,\n 'data-testid': ownTestId,\n}: MenuListProps) => {\n const itemsWrapperClass = cx('maxio-action-menu__content', {\n 'maxio-action-menu__content--align-end': alignItemsEnd,\n });\n const { controlsId, buttonId, testId } = useMenu();\n\n return (\n <div\n className={itemsWrapperClass}\n role=\"presentation\"\n data-testid={ownTestId ?? childTestId(testId, 'list')}\n >\n <ActionList\n role=\"menu\"\n itemProps={{\n role: 'menuitem',\n }}\n id={controlsId}\n aria-labelledby={buttonId}\n items={items}\n />\n </div>\n );\n};\n\nexport default MenuList;\n","import React from 'react';\nimport cx from 'classnames';\nimport { Modal as AriaModal, ModalOverlay } from 'react-aria-components';\n\nimport type { ModalProps } from './types';\n\n/**\n * Modal is a centered overlay that blocks the rest of the page until it is\n * dismissed. Put a `Dialog` inside it for the title, body and footer.\n */\nconst Modal = ({\n size = 'lg',\n isDismissable = true,\n className,\n style,\n children,\n ...props\n}: ModalProps) => (\n <ModalOverlay\n {...props}\n isDismissable={isDismissable}\n className=\"maxio-modal__backdrop\"\n >\n <AriaModal\n className={cx('maxio-modal', className)}\n style={style}\n data-size={size}\n >\n {children}\n </AriaModal>\n </ModalOverlay>\n);\n\nexport default Modal;\n","import React, { useState, useEffect } from 'react';\nimport { PaginationProps } from './Pagination.types';\nimport { DEFAULT_ITEMS_PER_PAGE } from './constants';\nimport IconButton from '../Buttons/IconButton';\nimport Icon from '../Icon/Icon';\nimport TooltipTrigger from '../TooltipTrigger';\nimport { Select, TextInput } from '../forms';\nimport { childTestId } from '../../utils/testId';\n\nconst Pagination = ({\n size = 'md',\n onChange,\n totalItems = 0,\n itemsPerPage: itemsPerPageProp = DEFAULT_ITEMS_PER_PAGE,\n currentPage: currentPageProp = 1,\n pageSizeOptions,\n manualPageInput = false,\n 'data-testid': testId,\n}: PaginationProps) => {\n const [currentPage, setCurrentPage] = useState(currentPageProp);\n const [itemsPerPage, setItemsPerPage] = useState(itemsPerPageProp);\n const [inputValue, setInputValue] = useState(currentPageProp.toString());\n\n // Sync inputValue when currentPage changes\n useEffect(() => {\n setInputValue(currentPage.toString());\n }, [currentPage]);\n\n const totalPages = Math.ceil(totalItems / itemsPerPage);\n const hasNext = currentPage < totalPages;\n const hasPrevious = currentPage > 1;\n\n const firstItem = itemsPerPage * (currentPage - 1) + 1;\n const lastItem = Math.min(itemsPerPage * currentPage, totalItems);\n\n const itemsPerPageDropdown = pageSizeOptions.map((option) => ({\n label: option.toString(),\n value: option.toString(),\n }));\n\n const totalPagesDropdown = Array.from(\n { length: totalPages },\n (_, i) => i + 1\n ).map((page) => ({\n label: page.toString(),\n value: page.toString(),\n }));\n\n const handleItemsPerPage = (selectedValue: number) => {\n setItemsPerPage(selectedValue);\n setCurrentPage(1);\n onChange?.({\n currentPage: 1,\n itemsPerPage: selectedValue,\n });\n };\n\n const handlePageSelection = (selectedValue: number) => {\n setCurrentPage(selectedValue);\n onChange?.({\n currentPage: selectedValue,\n itemsPerPage: itemsPerPage,\n });\n };\n\n const validateAndUpdatePage = (value: string) => {\n const numValue = parseInt(value, 10);\n\n if (isNaN(numValue)) {\n setInputValue(currentPage.toString());\n return;\n }\n\n const clampedValue = Math.max(1, Math.min(numValue, totalPages));\n\n setInputValue(clampedValue.toString());\n handlePageSelection(clampedValue);\n };\n\n const handlePageInputBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n validateAndUpdatePage(e.target.value);\n };\n\n const handlePageInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n validateAndUpdatePage(e.currentTarget.value);\n e.currentTarget.blur();\n }\n };\n\n const handlePageInputChange = (value: string) => {\n setInputValue(value);\n };\n\n return (\n <div className=\"maxio-pagination\" data-testid={testId}>\n <div className=\"maxio-pagination__items-per-page\">\n <label\n htmlFor=\"items-per-page-large\"\n className=\"maxio-pagination__label\"\n >\n Items per page\n </label>\n <Select\n inline\n size={size}\n options={itemsPerPageDropdown}\n onChange={(e) => handleItemsPerPage(Number(e.target.value))}\n value={itemsPerPage}\n id=\"items-per-page-large\"\n />\n </div>\n <div className=\"maxio-pagination__total-items\">\n <span>\n {firstItem}–{lastItem} of {totalItems} items\n </span>\n </div>\n <div className=\"maxio-pagination__current-page\">\n {manualPageInput ? (\n <TextInput\n className=\"maxio-pagination__page-input\"\n value={inputValue}\n min={1}\n max={totalPages}\n onChange={(value) => handlePageInputChange(value)}\n onBlur={handlePageInputBlur}\n onKeyDown={handlePageInputKeyDown}\n aria-label=\"Page number\"\n size={size}\n type=\"number\"\n onWheel={(e) => e.preventDefault()}\n />\n ) : (\n <Select\n inline\n size={size}\n aria-label=\"Select page\"\n onChange={(e) => handlePageSelection(Number(e.target.value))}\n value={currentPage}\n options={totalPagesDropdown}\n id=\"page-index-large\"\n />\n )}\n <div className=\"maxio-pagination__label\">of {totalPages} pages</div>\n </div>\n <div className=\"maxio-pagination__controls\">\n <TooltipTrigger\n onVisibilityUpdate={() => {}}\n renderContent={() => 'Previous'}\n floatingElementOffset={9}\n placement=\"top\"\n size=\"small\"\n >\n <IconButton\n icon={<Icon variant=\"chevron-left\" />}\n size={size}\n variant=\"ghost\"\n onClick={() => handlePageSelection(currentPage - 1)}\n aria-label=\"Previous\"\n disabled={!hasPrevious}\n data-testid={childTestId(testId, 'prev')}\n />\n </TooltipTrigger>\n <TooltipTrigger\n onVisibilityUpdate={() => {}}\n renderContent={() => 'Next'}\n floatingElementOffset={9}\n placement=\"top\"\n size=\"small\"\n >\n <IconButton\n icon={<Icon variant=\"chevron-right\" />}\n size={size}\n variant=\"ghost\"\n onClick={() => handlePageSelection(currentPage + 1)}\n aria-label=\"Next\"\n disabled={!hasNext}\n data-testid={childTestId(testId, 'next')}\n />\n </TooltipTrigger>\n </div>\n </div>\n );\n};\n\nexport default Pagination;\n","export const DEFAULT_ITEMS_PER_PAGE = 30;\n","import React from 'react';\nimport cx from 'classnames';\nimport { useId, useProgressBar } from 'react-aria';\nimport type { TestIdProps } from '../../utils/testId';\n\nexport interface ProgressBarProps extends TestIdProps {\n /**\n * Label for the progress bar\n */\n label: string;\n /**\n * Helper text for the progress bar\n */\n helperText?: string;\n /**\n * Defines the size of the progress bar\n */\n size?: 'md' | 'lg';\n /**\n * Defines the status of the progress bar\n */\n status?: 'success' | 'error';\n /**\n * Defines the position applied to the label and helper text\n */\n variant?: 'default' | 'inline' | 'indent';\n /**\n * Defines the current value of the progress bar.\n * If `undefined` the progress bar will be indeterminate.\n */\n value?: number;\n /**\n * Defines the maximum value of the progress bar\n */\n maxValue?: number;\n}\n\nconst ProgressBar = ({\n label,\n helperText,\n size = 'md',\n variant = 'default',\n status,\n value,\n maxValue = 100,\n 'data-testid': testId,\n}: ProgressBarProps) => {\n const labelId = useId();\n const helperTextId = useId();\n const showIcon = status && !!label && !!value && !(variant === 'inline');\n const showHelperText = helperText && !(variant === 'inline');\n const showInlineHelperText = helperText && variant === 'inline';\n\n const { progressBarProps, labelProps } = useProgressBar({\n maxValue,\n value,\n label,\n });\n\n const conatinerClass = cx('maxio-progress-bar', {\n 'maxio-progress-bar--lg': size === 'lg',\n 'maxio-progress-bar--success':\n value && !(variant === 'inline') && status === 'success',\n 'maxio-progress-bar--error':\n value && !(variant === 'inline') && status === 'error',\n 'maxio-progress-bar--indent': variant === 'indent',\n 'maxio-progress-bar--inline': variant === 'inline',\n 'maxio-progress-bar--indeterminate': value === undefined,\n });\n\n return (\n <div className={conatinerClass} {...progressBarProps} data-testid={testId}>\n <div id={labelId} className=\"maxio-progress-bar__label\" {...labelProps}>\n {label}\n </div>\n {showInlineHelperText && (\n <div id={helperTextId} className=\"maxio-progress-bar__helper-text\">\n {helperText}\n </div>\n )}\n <div className=\"maxio-progress-bar__track\">\n <div\n className=\"maxio-progress-bar__progress\"\n style={{ '--tw-scale-x': `${value}%` } as React.CSSProperties}\n />\n </div>\n {showIcon && <div className={`maxio-progress-bar__${status}-icon`} />}\n {showHelperText && (\n <div id={helperTextId} className=\"maxio-progress-bar__helper-text\">\n {helperText}\n </div>\n )}\n </div>\n );\n};\n\nexport default ProgressBar;\n","import React, { useRef } from 'react';\nimport cx from 'classnames';\nimport { useRadio } from 'react-aria';\nimport { useRadioState } from './contexts';\n\ninterface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {\n /**\n * Label for the radio\n */\n label: string;\n /**\n * Indent the radio\n */\n indent?: boolean;\n /**\n * Disable the radio\n */\n disabled?: boolean;\n /**\n * Invalid state of the radio\n */\n invalid?: boolean;\n}\n\nconst Radio = ({\n indent = false,\n disabled = false,\n invalid = false,\n label,\n ...props\n}: RadioProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const state = useRadioState();\n\n const { inputProps, isDisabled } = useRadio(\n {\n ...props,\n value: (props.value || '').toString(),\n 'aria-label': props['aria-label'] || label,\n isDisabled: disabled,\n },\n state,\n inputRef\n );\n\n const labelClass = cx('maxio-radio', {\n 'maxio-radio--indent': indent,\n 'maxio-radio--disabled': isDisabled || state.isDisabled,\n 'maxio-radio--error': invalid || state.isInvalid,\n });\n\n return (\n <label className={labelClass}>\n <input\n ref={inputRef}\n role=\"radio\"\n type=\"radio\"\n className=\"maxio-radio__input\"\n {...inputProps}\n name={state.name || inputProps.name}\n />\n <span className=\"maxio-radio__control\" />\n <span className=\"maxio-radio__label\">{label}</span>\n </label>\n );\n};\n\nexport default Radio;\n","import React from 'react';\nimport { useRadioGroup, AriaRadioGroupProps } from 'react-aria';\nimport FormErrorMessage from '../FormErrorMessage';\nimport FormHelperText from '../FormHelperText';\nimport { useRadioGroupState } from '@react-stately/radio';\nimport { RadioContext } from './contexts';\n\ntype RadioGroupProps = Pick<\n AriaRadioGroupProps,\n | 'aria-describedby'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-label'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onFocus'\n | 'onChange'\n | 'onFocusChange'\n | 'value'\n | 'defaultValue'\n> & {\n /**\n * Label for the radio group\n */\n label?: string;\n /**\n * Name for the radio group\n */\n name: string;\n /**\n * Error message for the radio group\n */\n errorMessage?: string;\n /**\n * Helper text for the radio group\n */\n helperText?: string;\n /**\n * Children of the radio group\n */\n children: React.ReactNode;\n /**\n * Disable the radio group\n */\n disabled?: boolean;\n /**\n * Invalid state of the radio group\n */\n invalid?: boolean;\n /**\n * Default value for the radio group\n */\n defaultValue?: string;\n};\n\nconst RadioGroup = ({\n children,\n label,\n errorMessage,\n helperText,\n disabled = false,\n invalid = false,\n name,\n defaultValue,\n ...props\n}: RadioGroupProps) => {\n const state = useRadioGroupState({\n isDisabled: disabled,\n isInvalid: invalid,\n description: helperText,\n name,\n label,\n errorMessage,\n defaultValue,\n ...props,\n });\n const { radioGroupProps, labelProps, descriptionProps, errorMessageProps } =\n useRadioGroup(\n { 'aria-label': props['aria-label'] || label, ...props },\n state\n );\n\n return (\n <>\n <div className=\"maxio-radio-group\" {...radioGroupProps}>\n {label && (\n <label className=\"maxio-radio-group__label\" {...labelProps}>\n {label}\n </label>\n )}\n <RadioContext.Provider value={state}>{children}</RadioContext.Provider>\n {invalid && errorMessage && (\n <FormErrorMessage {...errorMessageProps}>\n {errorMessage}\n </FormErrorMessage>\n )}\n {helperText && !invalid && (\n <FormHelperText {...descriptionProps}>{helperText}</FormHelperText>\n )}\n </div>\n </>\n );\n};\n\nexport default RadioGroup;\n","import React, {\n Children,\n ReactElement,\n ReactNode,\n cloneElement,\n isValidElement,\n useContext,\n useId,\n useState,\n} from 'react';\nimport cx from 'classnames';\nimport {\n Button,\n Menu,\n MenuItem,\n MenuTrigger,\n TabList as AriaTabList,\n TabListStateContext,\n} from 'react-aria-components';\nimport Tab from '../Tab';\nimport type { TabProps } from '../Tab/types';\nimport { useTabs } from '../contexts';\nimport { useTabOverflow } from './useTabOverflow';\nimport Icon from '../../Icon';\nimport { Popover } from '../../Popover';\n\nconst escapeCssIdentifier = (value: string) => {\n if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') {\n return CSS.escape(value);\n }\n\n return value.replace(/[^a-zA-Z0-9_-]/g, '\\\\$&');\n};\n\ninterface TabListProps extends React.HtmlHTMLAttributes<HTMLDivElement> {\n ariaLabel: string;\n children: ReactNode;\n /**\n * When set to `auto`, tabs that don't fit the available width collapse\n * into a \"More\" menu instead of overflowing/wrapping.\n * @default 'none'\n */\n overflow?: 'auto' | 'none';\n /**\n * Accessible label for the \"More\" menu trigger when `overflow=\"auto\"`.\n * @default 'More'\n */\n moreLabel?: string;\n}\n\nconst TabList = ({\n children,\n className,\n ariaLabel,\n overflow = 'none',\n moreLabel = 'More',\n ...props\n}: TabListProps) => {\n const { variant, withDivider } = useTabs();\n const state = useContext(TabListStateContext);\n const listId = useId();\n const [isMoreOpen, setIsMoreOpen] = useState(false);\n\n const tabsClass = cx('maxio-tabs', className, {\n 'maxio-tabs--contained': variant === 'contained',\n 'maxio-tabs--divider': withDivider,\n });\n\n const childrenArray = Children.map(children, (child) => child) as\n ReactElement<TabProps>[] | undefined;\n\n (childrenArray ?? []).forEach((child) => {\n if (!isValidElement(child) || child.type !== Tab) {\n throw new Error('You can only pass <Tab /> component as children');\n }\n });\n\n const overflowEnabled = overflow === 'auto' && !!childrenArray?.length;\n\n const { ref, moreButtonRef, overflowIndexes, handleKeyDownCapture } =\n useTabOverflow({ overflowEnabled, childrenArray });\n\n const moreTriggerContent = (\n <span className=\"maxio-tabs__tab-content\">\n {moreLabel}\n <Icon variant=\"chevron-down\" className=\"maxio-tabs__more__chevron\" />\n </span>\n );\n\n const hiddenTabSelectors = overflowIndexes.map(\n (idx) =>\n `#${escapeCssIdentifier(listId)} [role=\"tablist\"] > .maxio-tabs__tab:nth-child(${idx + 1})`\n );\n\n return (\n <div\n id={listId}\n className={tabsClass}\n ref={ref}\n onKeyDownCapture={handleKeyDownCapture}\n >\n {/* Visibility for overflowed tabs is driven by this position-based CSS\n rule instead of a `hidden`/style prop on each <Tab>: react-aria-\n components' Tabs collection captures each item's props once and\n reuses that snapshot on later re-renders, so a prop injected via\n cloneElement here would never reflect a later overflow\n recalculation. `id` is set on this plain div (not `<AriaTabList>`,\n which silently namespaces/rewrites any `id` prop it's given), and\n this div re-renders normally on every recalculation. */}\n {hiddenTabSelectors.length > 0 && (\n <style>{`${hiddenTabSelectors.join(', ')} { display: none; }`}</style>\n )}\n {/* `maxio-contents` keeps this element out of the flex layout so\n `.maxio-tabs__tab` elements stay direct flex children of the\n `.maxio-tabs` container above, while still giving react-aria a\n real tablist element to manage roving tabindex/keyboard nav on. */}\n <AriaTabList aria-label={ariaLabel} className=\"maxio-contents\" {...props}>\n {(childrenArray ?? []).map((child, idx) =>\n cloneElement(child, { key: idx, value: idx })\n )}\n </AriaTabList>\n {overflowEnabled && overflowIndexes.length > 0 && (\n <MenuTrigger isOpen={isMoreOpen} onOpenChange={setIsMoreOpen}>\n <Button\n ref={moreButtonRef}\n className=\"maxio-tabs__tab maxio-tabs__more__trigger\"\n aria-label={moreLabel}\n >\n {moreTriggerContent}\n </Button>\n {isMoreOpen && (\n <Popover\n hideArrow\n placement=\"bottom end\"\n className=\"maxio-tabs__more__menu\"\n >\n <Menu\n aria-label={`${moreLabel} tabs`}\n onAction={(key) => {\n state?.setSelectedKey(key);\n // The selected tab is promoted out of the overflow menu and\n // into the visible row (see `calculateOverflow`'s\n // `currentIndex` handling), so focus should land on it there\n // instead of MenuTrigger's default of returning focus to the\n // \"More\" button.\n requestAnimationFrame(() => {\n ref.current\n ?.querySelector<HTMLElement>(\n `[role=\"tab\"][data-key=\"${key}\"]`\n )\n ?.focus();\n });\n }}\n >\n {overflowIndexes.map((idx) => {\n const child = (childrenArray as ReactElement<TabProps>[])[\n idx\n ];\n const {\n disabled,\n type,\n 'aria-label': ariaLabelProp,\n 'aria-labelledby': ariaLabelledByProp,\n } = child.props;\n const content =\n type === 'icon' ? child.props.icon : child.props.children;\n return (\n <MenuItem\n key={idx}\n id={idx}\n isDisabled={!!disabled}\n aria-label={ariaLabelProp}\n aria-labelledby={ariaLabelledByProp}\n className=\"maxio-tabs__more__item\"\n >\n {content}\n </MenuItem>\n );\n })}\n </Menu>\n </Popover>\n )}\n </MenuTrigger>\n )}\n </div>\n );\n};\n\nexport default TabList;\n","import {\n KeyboardEvent,\n ReactElement,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { TabListStateContext } from 'react-aria-components';\nimport type { TabProps } from '../Tab/types';\nimport { useElementResizeObserver } from '../../../hooks';\nimport { calculateOverflow, promoteIntoVisible } from './utils';\n\ninterface UseTabOverflowParams {\n overflowEnabled: boolean;\n childrenArray: ReactElement<TabProps>[] | undefined;\n}\n\nexport const getNavigableVisibleIndexes = (\n visibleIndexes: number[],\n childrenArray: ReactElement<TabProps>[] | undefined\n) => visibleIndexes.filter((idx) => !childrenArray?.[idx]?.props.disabled);\n\nexport const useTabOverflow = ({\n overflowEnabled,\n childrenArray,\n}: UseTabOverflowParams) => {\n const ref = useRef<HTMLDivElement>(null);\n const moreButtonRef = useRef<HTMLButtonElement>(null);\n const promotedIndexRef = useRef<number | null>(null);\n const [measurements, setMeasurements] = useState<{\n tabWidths: number[];\n moreButtonWidth: number;\n } | null>(null);\n\n const containerWidth = useElementResizeObserver(ref);\n const state = useContext(TabListStateContext);\n const currentIndex =\n state?.selectedKey != null ? Number(state.selectedKey) : null;\n\n const [visibleIndexes, setVisibleIndexes] = useState<number[]>([]);\n\n // Recompute the packing from scratch whenever the available space or the\n // tab widths change (resize, tabs added/removed) — this is the only case\n // where fully redoing the layout makes sense, since the previous manual\n // promotions below may no longer even apply.\n useLayoutEffect(() => {\n if (!overflowEnabled || !measurements) {\n setVisibleIndexes((childrenArray ?? []).map((_, idx) => idx));\n return;\n }\n\n const { visibleIndexes: recalculated } = calculateOverflow(\n measurements.tabWidths,\n containerWidth,\n measurements.moreButtonWidth,\n promotedIndexRef.current ?? currentIndex\n );\n if (recalculated.length === (childrenArray ?? []).length) {\n promotedIndexRef.current = null;\n }\n setVisibleIndexes(recalculated);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [overflowEnabled, measurements, containerWidth]);\n\n // Between resizes, keep whatever's already visible in view. Only promote\n // the newly active tab if it isn't part of that set yet, instead of\n // recalculating the \"natural\" packing from scratch — otherwise a tab the\n // user just navigated to out of the \"More\" menu would get silently\n // demoted back into it the moment selection moves to a tab that happened\n // to fit from the start.\n useLayoutEffect(() => {\n if (!overflowEnabled || !measurements || currentIndex === null) {\n return;\n }\n\n setVisibleIndexes((prev) => {\n if (!prev.includes(currentIndex)) {\n promotedIndexRef.current = currentIndex;\n }\n\n return promoteIntoVisible(\n prev,\n measurements.tabWidths,\n containerWidth,\n measurements.moreButtonWidth,\n currentIndex\n );\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentIndex]);\n\n const overflowIndexes = overflowEnabled\n ? (childrenArray ?? [])\n .map((_, idx) => idx)\n .filter((idx) => !visibleIndexes.includes(idx))\n : [];\n const navigableVisibleIndexes = getNavigableVisibleIndexes(\n visibleIndexes,\n childrenArray\n );\n\n useLayoutEffect(() => {\n if (!overflowEnabled || !ref.current) {\n setMeasurements((prev) => (prev === null ? prev : null));\n return;\n }\n\n const tabElements = Array.from(\n ref.current.querySelectorAll<HTMLElement>('[role=\"tab\"]')\n );\n const measuredMoreButtonWidth =\n moreButtonRef.current?.getBoundingClientRect().width ?? 0;\n\n setMeasurements((prev) => {\n const tabWidths = (childrenArray ?? []).map((_, idx) => {\n const measuredWidth =\n tabElements[idx]?.getBoundingClientRect().width ?? 0;\n return measuredWidth > 0 ? measuredWidth : (prev?.tabWidths[idx] ?? 0);\n });\n const moreButtonWidth =\n measuredMoreButtonWidth > 0\n ? measuredMoreButtonWidth\n : (prev?.moreButtonWidth ?? 0);\n\n const widthsUnchanged =\n prev?.tabWidths.length === tabWidths.length &&\n prev.tabWidths.every((width, idx) => width === tabWidths[idx]);\n if (prev && widthsUnchanged && prev.moreButtonWidth === moreButtonWidth) {\n return prev;\n }\n\n return { tabWidths, moreButtonWidth };\n });\n }, [childrenArray, overflowEnabled]);\n\n const focusTabAt = (idx: number) => {\n if (idx === undefined) {\n return;\n }\n\n state?.selectionManager.setFocused(true);\n state?.selectionManager.setFocusedKey(idx);\n state?.setSelectedKey(idx);\n\n ref.current\n ?.querySelector<HTMLElement>(`[role=\"tab\"][data-key=\"${idx}\"]`)\n ?.focus();\n };\n\n // Overflowed tabs stay mounted (hidden via the CSS rule in TabList) so\n // their widths remain stable to measure. That means react-aria's own\n // ArrowLeft/Right/Home/End handling — which walks its Tab collection by\n // key order, oblivious to our CSS-driven hiding — would happily move\n // focus (and, since activation is automatic, selection) onto a tab the\n // user can't see. Marking overflowed tabs `isDisabled` to make react-aria\n // skip them itself isn't an option either: react-aria-components' Tabs\n // collection snapshots each item's props once and never re-reads them, so\n // a tab promoted out of overflow later would be stuck disabled. So we\n // take over navigation entirely whenever there's anything hidden to skip,\n // restricting movement to `visibleIndexes` and the \"More\" button.\n const handleKeyDownCapture = (e: KeyboardEvent<HTMLDivElement>) => {\n if (overflowIndexes.length === 0) {\n return;\n }\n\n const isOnMoreButton = document.activeElement === moreButtonRef.current;\n const focusedKey = state?.selectionManager.focusedKey;\n const visiblePos = isOnMoreButton\n ? -1\n : navigableVisibleIndexes.indexOf(Number(focusedKey));\n\n if (!isOnMoreButton && visiblePos === -1) {\n return;\n }\n\n switch (e.key) {\n case 'ArrowRight':\n if (isOnMoreButton) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n if (visiblePos < navigableVisibleIndexes.length - 1) {\n focusTabAt(navigableVisibleIndexes[visiblePos + 1]);\n } else {\n moreButtonRef.current?.focus();\n }\n return;\n\n case 'ArrowLeft':\n e.preventDefault();\n e.stopPropagation();\n if (isOnMoreButton) {\n focusTabAt(\n navigableVisibleIndexes[navigableVisibleIndexes.length - 1]\n );\n } else if (visiblePos > 0) {\n focusTabAt(navigableVisibleIndexes[visiblePos - 1]);\n }\n return;\n\n case 'Home':\n if (isOnMoreButton) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n focusTabAt(navigableVisibleIndexes[0]);\n return;\n\n case 'End':\n if (isOnMoreButton) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n focusTabAt(navigableVisibleIndexes[navigableVisibleIndexes.length - 1]);\n return;\n\n default:\n }\n };\n\n return {\n ref,\n moreButtonRef,\n visibleIndexes,\n overflowIndexes,\n handleKeyDownCapture,\n };\n};\n","export interface OverflowResult {\n visibleIndexes: number[];\n overflowIndexes: number[];\n}\n\nexport const calculateOverflow = (\n tabWidths: number[],\n containerWidth: number,\n moreButtonWidth: number,\n currentIndex: number | null\n): OverflowResult => {\n const allIndexes = tabWidths.map((_, idx) => idx);\n const totalWidth = tabWidths.reduce((sum, width) => sum + width, 0);\n\n if (totalWidth <= containerWidth) {\n return { visibleIndexes: allIndexes, overflowIndexes: [] };\n }\n\n const visibleIndexes: number[] = [];\n let usedWidth = moreButtonWidth;\n\n for (const idx of allIndexes) {\n if (usedWidth + tabWidths[idx] > containerWidth) {\n break;\n }\n usedWidth += tabWidths[idx];\n visibleIndexes.push(idx);\n }\n\n if (currentIndex !== null && !visibleIndexes.includes(currentIndex)) {\n usedWidth += tabWidths[currentIndex];\n while (usedWidth > containerWidth && visibleIndexes.length > 0) {\n const demotedIdx = visibleIndexes.pop() as number;\n usedWidth -= tabWidths[demotedIdx];\n }\n visibleIndexes.push(currentIndex);\n }\n\n visibleIndexes.sort((a, b) => a - b);\n const overflowIndexes = allIndexes.filter(\n (idx) => !visibleIndexes.includes(idx)\n );\n\n return { visibleIndexes, overflowIndexes };\n};\n\n/**\n * Adds `currentIndex` to an already-visible set of tabs, demoting the\n * fewest tabs necessary (starting from the one furthest along, i.e.\n * closest to the \"More\" button) to make it fit. Unlike `calculateOverflow`,\n * this doesn't recompute the natural packing from scratch, so any tab the\n * user previously navigated to stays visible instead of being displaced the\n * moment selection moves to a tab that was visible all along.\n */\nexport const promoteIntoVisible = (\n visibleIndexes: number[],\n tabWidths: number[],\n containerWidth: number,\n moreButtonWidth: number,\n currentIndex: number\n): number[] => {\n if (visibleIndexes.includes(currentIndex)) {\n return visibleIndexes;\n }\n\n const promoted = [...visibleIndexes, currentIndex].sort((a, b) => a - b);\n let usedWidth =\n moreButtonWidth + promoted.reduce((sum, idx) => sum + tabWidths[idx], 0);\n\n while (usedWidth > containerWidth && promoted.length > 1) {\n const lastPos = promoted.length - 1;\n const demotedAt =\n promoted[lastPos] === currentIndex ? lastPos - 1 : lastPos;\n const [demotedIdx] = promoted.splice(demotedAt, 1);\n usedWidth -= tabWidths[demotedIdx];\n }\n\n return promoted;\n};\n","import React, {\n Children,\n ReactElement,\n cloneElement,\n isValidElement,\n} from 'react';\nimport { TabPanels as AriaTabPanels } from 'react-aria-components';\nimport TabPanel, { TabPanelProps } from '../TabPanel/TabPanel';\n\ninterface TabPanelsProps {\n children: React.ReactNode;\n}\n\nconst TabPanels = ({ children }: TabPanelsProps) => {\n const childrenArray = Children.map(children, (child, idx) => {\n if (!isValidElement(child) || child.type !== TabPanel) {\n throw new Error('You can only pass <TabPanel /> component as children');\n }\n return cloneElement(child as ReactElement<TabPanelProps>, {\n key: idx,\n value: idx,\n });\n });\n\n return (\n <AriaTabPanels className=\"maxio-tabs__panels\">\n {childrenArray}\n </AriaTabPanels>\n );\n};\n\nexport default TabPanels;\n","import React from 'react';\nimport { Tabs as AriaTabs } from 'react-aria-components';\nimport { TabsProvider } from '../contexts/TabsContext';\nimport type { TabsProviderProps } from '../contexts/types';\n\ntype TabsProps = TabsProviderProps;\n\nconst Tabs = ({\n children,\n variant = 'line',\n withDivider = false,\n defaultIndex = 0,\n index,\n onChange,\n 'data-testid': testId,\n}: TabsProps) => {\n return (\n <AriaTabs\n className=\"maxio-tabs-container\"\n selectedKey={index}\n defaultSelectedKey={defaultIndex}\n onSelectionChange={(key) => onChange?.(Number(key))}\n data-testid={testId}\n >\n <TabsProvider variant={variant} withDivider={withDivider}>\n {children}\n </TabsProvider>\n </AriaTabs>\n );\n};\n\nexport default Tabs;\n","import React from 'react';\nimport cx from 'classnames';\nimport { TagProps } from './Tag.types';\nimport Icon from '../Icon';\n\nconst Tag = ({\n children,\n size,\n sentiment,\n kind = 'primary',\n leadingIcon,\n trailingIcon,\n 'data-testid': testId,\n}: TagProps) => {\n const tagClasses = cx(\n 'maxio-tag',\n `maxio-tag--${kind}`,\n !!sentiment && `maxio-tag--${sentiment}`,\n !!size && `maxio-tag--${size}`\n );\n\n return (\n <div className={tagClasses} data-testid={testId}>\n {leadingIcon && (\n <Icon variant={leadingIcon} className=\"maxio-tag__icon\" />\n )}\n <span className=\"maxio-tag__label\">{children}</span>\n {trailingIcon && (\n <Icon variant={trailingIcon} className=\"maxio-tag__icon\" />\n )}\n </div>\n );\n};\n\nexport default Tag;\n","import React, { MouseEventHandler } from 'react';\nimport cx from 'classnames';\nimport type { TestIdProps } from '../../utils/testId';\n\ntype TileProps = {\n disabled?: boolean;\n href?: string;\n target?: 'string';\n onClick?: () => void;\n} & React.HTMLAttributes<HTMLDivElement> &\n TestIdProps;\n\nconst Tile = ({\n children,\n className,\n href,\n onClick,\n target,\n disabled,\n 'data-testid': testId,\n}: TileProps) => {\n const isClickable = href || onClick;\n\n if (!isClickable) {\n return (\n <div className=\"maxio-tile\" data-testid={testId}>\n {children}\n </div>\n );\n }\n\n const handleClick: MouseEventHandler<HTMLAnchorElement> = (e) => {\n if (disabled && href) {\n e.preventDefault();\n }\n\n if (!disabled && onClick) {\n onClick();\n }\n };\n\n const tileClasses = cx('maxio-tile', className, {\n 'maxio-tile--clickable': isClickable,\n 'maxio-tile--disabled': disabled,\n });\n\n return (\n <a\n className={tileClasses}\n href={href}\n target={target}\n onClick={handleClick}\n data-testid={testId}\n >\n {children}\n </a>\n );\n};\n\nexport default Tile;\n","import React from 'react';\nimport { useToastState } from '@react-stately/toast';\nimport { ToastProviderProps } from './ToastProvider.types';\nimport { ToastContent } from '../Toast/Toast.types';\nimport ToastRegion from '../ToastRegion';\n\n// Legacy ToastProvider (will be deprecated)\nconst ToastProvider = ({ children, ...props }: ToastProviderProps) => {\n const { maxVisibleToasts = 5, ...rest } = props;\n\n const state = useToastState<ToastContent>({\n maxVisibleToasts,\n ...rest,\n });\n\n React.useEffect(() => {\n console.warn(\n 'ToastProvider is deprecated. Please use the global toast API instead.'\n );\n }, []);\n\n return (\n <>\n {children(state)}\n {state.visibleToasts.length > 0 && (\n <ToastRegion {...props} state={state} />\n )}\n </>\n );\n};\n\nexport default ToastProvider;\n","import React from 'react';\nimport { TopBarProps } from './types';\nimport { Flex } from '../Flex';\nimport { IconButton } from '../Buttons';\nimport Icon from '../Icon';\n\nexport const TopBar = ({\n children,\n actions,\n sideNavIsClosed,\n openSideNav,\n 'data-testid': testId,\n}: TopBarProps) => {\n return (\n <nav className=\"maxio-top-bar\" data-testid={testId}>\n {sideNavIsClosed && (\n <IconButton\n aria-label=\"Open Side Navigation\"\n variant=\"ghost\"\n icon={<Icon variant=\"sidebar\" />}\n onClick={openSideNav}\n />\n )}\n <Flex grow justifyContent=\"end\">\n {children}\n </Flex>\n {actions}\n </nav>\n );\n};\nexport default TopBar;\n"],"names":["ICONS","BRAND_ICONS","BRAND_ICONS_DUOTONE","BRAND_ICONS_IMAGE","Icon","variant","color","className","size","testId","isInList","list","includes","React","createElement","cx","isInKit","duotoneIcon","iconClass","ActionItem","item","isSelected","truncateLabel","role","small","ref","useRef","isMounted","id","useId","useEffect","current","focus","type","leadingIconName","leadingIconClassName","trailingIconName","label","description","link","labelClass","_extends","tabIndex","findPrevIdx","idx","items","originalIdx","ActionList","isShadowed","itemProps","truncateLabels","props","listClass","selectedIdx","setSelectedIdx","useState","findIndex","length","onKeyDown","e","code","currentItem","window","open","href","target","preventDefault","prev","findNextIdx","nextIdx","itemIdx","map","key","Link","children","disabled","external","icon","underline","rest","classNames","LoadingSpinner","white","loadingSpinnerClasses","InternalLink","forwardRef","fullWidth","leadingElement","trailingElement","forwardedRef","useObjectRef","linkProps","useLink","buttonClasses","cloneElement","isValidElement","InternalButton","loading","buttonProps","useButton","isDisabled","formAction","undefined","isLoadingSpinnerWhite","Button","isLinkProps","IconButton","ariaLabel","childTestId","base","parts","join","Alert","title","linkText","linkExternal","display","sentiment","onDismiss","console","warn","alertClasses","success","warning","danger","info","contentWrapper","onClick","MenuContext","createContext","MenuProvider","isOpen","setIsOpen","controlsId","buttonId","Provider","value","onClose","onOpen","onToggle","useMenu","context","useContext","Object","keys","Error","MenuWrapper","BreadcrumbsItem","content","ERROR_MESSAGES","Tooltip","arrowPosition","maxWidth","style","INTERACTIONS_HANDLERS","click","useClick","hover","useHover","delay","useFocus","dismiss","useDismiss","composeInteractions","interactions","interaction","useOverlayTrigger","placement","isActive","floatingElementOffset","onOverlayUpdate","autoHideMs","strategy","positionStrategy","shiftIntoView","hideTrigger","openCycle","setOpenCycle","wasActive","setWasActive","cycle","x","y","floating","reference","refs","floatingRefs","middlewareData","useFloating","onOpenChange","middleware","offset","shift","padding","limiter","limitShift","hide","name","options","fn","data","whileElementsMounted","autoUpdate","getReferenceProps","getFloatingProps","useInteractions","useRole","clearTimeout","setTimeout","hasCurrentCycleData","isReferenceHidden","referenceHidden","isPositionPending","floatingElementCSSPosition","position","top","left","visibility","floatingElement","mouseLeaveDelay","mouseEnterTime","Date","getTime","mouseLeaveTime","isHovered","setIsHovered","handleMouseEnter","handleMouseLeave","addEventListener","removeEventListener","useWindowSize","debounce","windowSize","setWindowSize","windowWitdh","windowHeight","innerWidth","innerHeight","timeout","handleResize","useElementResizeObserver","width","setWidth","clientWidth","onResize","next","useLayoutEffect","useResizeObserver","PORTAL_ID","portalListeners","Set","portalObserver","isRelevantChange","record","Array","from","removedNodes","some","node","classList","contains","OverlayTrigger","usePortal","renderOverlay","motionSettings","floatingElementRef","trigger","setTrigger","setReference","useCallback","focusBeforeOpen","document","activeElement","overlay","opener","querySelectorAll","candidate","preventScroll","portalRevision","refreshPortal","useReducer","count","listener","add","MutationObserver","records","forEach","notify","observe","documentElement","attributes","attributeFilter","subtree","body","childList","delete","disconnect","portalContainer","setPortalContainer","isPortalContainerConnected","isConnected","container","dialog","closest","sharedNode","getElementById","appendChild","portalContainerFor","portalThemeMode","getAttribute","AnimatePresence","onExitComplete","motion","div","zIndex","inert","Fragment","FloatingPortal","root","ARROW_DIRECTION_LOOKUP","right","bottom","TooltipTrigger","renderContent","isVisible","onVisibilityUpdate","setActive","useExternalState","debounceTimeoutRef","updateTooltipVisibility","tooltipMotion","useMemo","axisLetter","startsWith","transformStart","initial","opacity","transform","animate","exit","transition","ease","duration","createTooltipAnimation","SUBTLE_CLASS","XS_CLASS","FEEDBACK_ICON","idle","copied","error","ROW_CONTROLS_ID","ROW_ACTIONS_ID","Table","pattern","isExpandable","isUsingCustomRow","showLeftShadow","setShowLeftShadow","showRightShadow","setShowRightShadow","customPattern","tableClasses","onScroll","scrollLeft","scrollWidth","TableHead","TableBody","HeaderCell","table","header","enableExpanding","column","columnCanSort","getCanSort","toggleSortingHandler","getToggleSortingHandler","isPlaceholder","align","columnDef","meta","controls","actions","columnPinned","getIsPinned","isColumnSorted","getIsSorted","isSortedAsc","headerCellClasses","getStart","getAfter","sortingIcon","getSortingIcon","isSorted","toggleExpandedHandler","getToggleAllRowsExpandedHandler","isAllExpanded","getIsAllRowsExpanded","expandColumnIndex","headerGroup","headers","isExpandColumn","index","scope","colSpan","getSubRows","subRows","withSubRows","assign","findPath","parentPath","path","childPath","removeAtPath","splice","childResult","insertAtPath","parentIndex","parent","getItemAtPath","currentItems","ROW_DRAG_TYPE","RowReorderContext","useRowReorderContext","isDragData","instanceId","rowId","getTargetFromData","instruction","extractInstruction","instructionToPosition","RowReorderProvider","availability","getRowReorderLabel","onRowReorder","rowReorderMode","announcement","setAnnouncement","activeTarget","setActiveTarget","draggingRowId","setDraggingRowId","activeTargetRef","getRow","getCoreRowModel","rowsById","getLabel","row","getMove","sourceRowId","targetRow","result","reorderTree","mode","isRowReorderAllowed","parentId","depth","sourcePath","original","targetPath","child","every","segment","isPathPrefix","removal","adjustedTargetPath","adjustPathAfterRemoval","adjusted","sourceIndexDepth","slice","targetIndex","targetItem","destinationIndex","destination","parentRowId","source","reordered","updateActiveTarget","commitMove","targetRowId","destinationDescription","getDropData","input","element","baseData","dataWithInstruction","attachInstruction","currentLevel","indentPerLevel","isValid","Boolean","registerRow","available","setTargetFromPayload","dropTargetForElements","canDrop","getParentRows","getData","args","onDragEnter","self","onDrag","onDragLeave","registerHandle","rowElement","HTMLElement","draggable","dragHandle","getInitialData","onGenerateDragPreview","nativeSetDragImage","setCustomNativeDragPreview","render","preview","textContent","setAttribute","append","remove","monitorForElements","canMonitor","onDragStart","onDrop","location","targetData","dropTargets","getCanExpand","getIsExpanded","toggleExpanded","getActions","siblings","rows","sibling","previousSibling","nextSibling","firstSibling","lastSibling","candidates","push","rootAncestor","nextAncestor","flatRows","filter","action","hasActions","moveRow","TableRow","isChild","isHeader","onRowAction","getIsSelected","isExpanded","isActionable","rowRef","reorderContext","originalTargetRef","captureOriginalTarget","event","pressProps","usePress","onPress","Element","isInteractiveTarget","focusProps","isFocused","useFocusRing","tableRowClasses","rowProps","mergeProps","onClickCapture","onKeyDownCapture","CheckboxGroupContext","InnerCheckbox","checked","invalid","indeterminate","inputProps","containerClassNames","displayName","Checkbox","readOnly","defaultChecked","state","isInvalid","useCheckboxGroupItem","isIndeterminate","isReadOnly","useCheckbox","useToggleState","defaultSelected","FormHelperText","FormErrorMessage","HeaderControls","enableRowSelection","enableRowReordering","toggleSelectAll","getToggleAllPageRowsSelectedHandler","isAllPageRowsSelected","getIsAllPageRowsSelected","getIsAllRowsSelected","isSomePageRowsSelected","getIsSomePageRowsSelected","onChange","Popover","hideArrow","AriaPopover","OverlayArrow","height","viewBox","d","RowReorderHandle","isMenuOpen","setIsMenuOpen","isDragging","hasAvailableActions","unavailableMessage","message","handle","closeDelay","MenuTrigger","Menu","autoFocus","onAction","find","requestAnimationFrame","MenuItem","textValue","RowControls","toggleSelectHandler","getToggleSelectedHandler","getIsAllSubRowsSelected","isSomeSubRowsSelected","getIsSomeSelected","RowActions","TableCell","cell","cellClasses","pinnedStyle","RowRenderer","SubRowComponent","shouldRenderCustomRow","getParentRow","shouldShowControlsSpacing","getVisibleCells","shouldShowActionsSpacing","subtractedColumns","customRowColspan","rowIndex","patternApplied","rowCanExpand","getToggleExpandedHandler","rowHeaderCell","actionableRowLabelledBy","getIndex","paddingLeft","flexRender","getContext","AVAILABLE","UNAVAILABLE","reason","excludeBuiltinIds","ids","EMPTY_SORTING_STATE","getDefaultSubRows","Body","as","compact","AsComponent","headingsSizeMap","sm","md","lg","Heading","DialogCloseTestIdContext","hasContent","Dialog","footer","showCloseButton","ariaLabelledBy","ariaDescribedBy","inheritedCloseTestId","closeTestId","titleId","descriptionId","labelledBy","describedBy","bodyRef","bodyContentRef","isBodyOverflowing","scrollRef","contentRef","isOverflowing","setIsOverflowing","scrollHeight","clientHeight","useIsOverflowing","AriaDialog","close","footerContent","hasWarnedLegacyProps","Flex","basis","flex","flexDirection","wrap","grow","shrink","gap","gapX","gapY","alignItems","justifyContent","flexClasses","ListBoxRoot","renderEmptyState","isLoading","onLoadMore","scrollOffset","showSelectAll","AriaListBox","composeRenderProps","listBoxProps","renderProps","selectionManager","listBox","selectionMode","collection","getKeys","getItem","canSelectItem","isSelectAll","isClearDisabled","disallowEmptySelection","Collection","dependencies","AriaListBoxLoadMoreItem","ListBoxItem","AriaListBoxItem","ListBoxSection","AriaListBoxSection","ListBoxHeader","AriaHeader","ListBox","Item","Section","Header","ComboBoxRoot","errorMessage","placeholder","allowsEmptyCollection","triggerRef","inputRef","popoverStyle","setPopoverStyle","popoverCrossOffset","setPopoverCrossOffset","hasErrorMessage","listBoxChildren","updatePopoverPosition","getBoundingClientRect","currentOffset","currentStyle","nextWidth","offsetWidth","ResizeObserver","observer","containerClass","AriaComboBox","Label","Input","AriaButton","Text","slot","elementType","FieldError","validation","crossOffset","defaultItems","ComboBoxItem","ComboBoxSection","ComboBoxHeader","ComboBox","RadioContext","SearchField","clearButtonLabel","AriaSearchField","TextField","AriaTextField","NumberField","showStepper","AriaNumberField","Separator","orientation","TextArea","AriaTextArea","TextInput","helperText","showErrorMessage","useImperativeHandle","spellCheck","restProps","ariaProps","defaultValue","toString","labelProps","descriptionProps","errorMessageProps","useTextField","showError","Select","inline","htmlFor","opt","DateInput","displayValue","AriaDateInput","DateSegment","hidden","useCalendarState","calendarState","CalendarStateContext","rangeCalendarState","RangeCalendarStateContext","PickerSelect","isItemDisabled","String","Number","date","formatted","MonthPicker","minValue","maxValue","isMonthDisabled","endOfMonth","compare","toCalendarDate","startOfMonth","CalendarMonthPicker","pickerProps","CalendarTitle","navigation","CalendarYearPicker","Calendar","AriaCalendar","visibleDuration","months","CalendarGrid","CalendarGridHeader","day","CalendarHeaderCell","CalendarGridBody","CalendarCell","DatePresets","presets","isPresetDisabled","onSelect","Group","preset","isPresetDateDisabled","isDateUnavailable","RangeCalendar","direction","useLocale","AriaRangeCalendar","datesMatch","a","b","SegmentedControlRoot","AriaToggleButtonGroup","SegmentedControlItem","AriaToggleButton","SelectionIndicator","SegmentedControl","SectionName","leadingIcon","trailingIcon","isTooltipVisible","isRegularSection","section","prepareSections","sectionGroups","currentSection","flat","isCurrent","findCurrentSection","sections","SideNavContext","useSideNav","SideNavProvider","controlledIsOpen","withIcons","shouldToggleSidebar","topDropdownItems","collapseBreakpoint","setSections","windowWidth","handleWindowWidthChange","onSectionOpen","sectionName","SideNavSwitcher","mainItem","otherItems","isItemHovered","itemMap","url","itemsCount","SingleItem","SideNavItem","isSideNavOpen","buttonRef","isButtonHovered","Component","onSectionClick","SideNavItems","s","sIdx","SideNavTopItem","SideNav","Tab","legacyId","isIcon","tabClassName","AriaTab","rightIcon","Context","withDivider","TabsProvider","TabPanel","AriaTabPanel","CardHeader","CardBody","CardFooter","CardRoot","Card","Footer","_path","_path2","_path3","_path4","bind","n","arguments","t","r","hasOwnProperty","call","apply","SvgLogo","xmlns","fillRule","Logo","alt","logoAsMark","isCustomSize","LogoSvg","Toast","toastProps","contentProps","titleProps","closeButtonProps","useToast","closable","toast","toastClasses","default","text","ToastRegion","regionProps","useToastRegion","visibleToasts","ToastContext","ToastQueue","ReactAriaToastQueue","DismissButton","borderColor","AuthLayout","heading","alert","topAddon","Avatar","src","Banner","bannerClasses","Breadcrumbs","childrenCount","Children","CheckboxGroup","useCheckboxGroupState","groupProps","useCheckboxGroup","showHelperText","Chip","dismissLabel","useToggleButton","chipClasses","Code","CopyToClipboard","copyLabel","copiedLabel","copyErrorLabel","resetAfterMs","tooltipPlacement","onCopy","onCopyError","feedbackState","feedbackLabel","handleCopy","useCopyToClipboard","feedback","setFeedback","resetTimeoutRef","announceIdRef","isMountedRef","activeCopyIdRef","latestValueRef","clearFeedbackTimers","resetFeedback","showFeedback","nextState","feedbackValue","announceId","async","copyId","requestedValue","isStale","navigator","clipboard","writeText","VisuallyHidden","DataTable","onExpand","onSort","enableSorting","columns","originalColumns","actionsColumnSize","getRowId","userState","effectiveSubRowComponent","effectiveEnableSorting","useColumns","headerControls","rowActions","cols","tableInstance","useReactTable","sorting","columnPinning","manualExpanding","getExpandedRowModel","manualSorting","getSortedRowModel","getCanSomeRowsExpand","getState","rowReorderAvailability","getRowReorderAvailability","columnFilters","globalFilter","grouping","hasPagination","getPaginationRowModel","manualPagination","expanded","rowSelection","getHeaderGroups","getRowModel","DateField","AriaDateField","DatePicker","presetsLabel","nullPresetLabel","AriaDatePicker","setValue","setOpen","DateRangePicker","AriaDateRangePicker","presetLabel","getPresetLabel","start","end","isPresetRangeDisabled","range","anchor","constraints","allowsNonContiguousRanges","days","selectRangePreset","setDateTime","Display","Drawer","backdrop","isDismissable","usesLegacyContent","prop","usesLegacyOpen","ModalOverlay","AriaModal","EmptyState","hasActiveFilters","headingLevel","rootClasses","HeadingTag","EnvironmentBar","GlobalToastProvider","toastQueue","useToastQueue","removeAllToasts","contextValue","addToast","removeToast","clear","Grid","templateColumns","templateRows","autoColumns","autoRows","columnStart","columnEnd","rowStart","rowEnd","gridClasses","MenuButton","iconName","ownTestId","iconClassName","MenuList","alignItemsEnd","itemsWrapperClass","Modal","Pagination","totalItems","itemsPerPage","itemsPerPageProp","currentPage","currentPageProp","pageSizeOptions","manualPageInput","setCurrentPage","setItemsPerPage","inputValue","setInputValue","totalPages","Math","ceil","hasNext","hasPrevious","firstItem","lastItem","min","itemsPerPageDropdown","option","totalPagesDropdown","_","i","page","handlePageSelection","selectedValue","validateAndUpdatePage","numValue","parseInt","isNaN","clampedValue","max","handleItemsPerPage","handlePageInputChange","onBlur","currentTarget","blur","onWheel","ProgressBar","status","labelId","helperTextId","showIcon","showInlineHelperText","progressBarProps","useProgressBar","conatinerClass","Radio","indent","useRadio","RadioGroup","useRadioGroupState","radioGroupProps","useRadioGroup","SideNavWrapper","TabList","overflow","moreLabel","TabListStateContext","listId","isMoreOpen","setIsMoreOpen","tabsClass","childrenArray","overflowEnabled","moreButtonRef","overflowIndexes","handleKeyDownCapture","useTabOverflow","promotedIndexRef","measurements","setMeasurements","containerWidth","currentIndex","selectedKey","visibleIndexes","setVisibleIndexes","recalculated","calculateOverflow","tabWidths","moreButtonWidth","allIndexes","reduce","sum","usedWidth","pop","sort","promoteIntoVisible","promoted","lastPos","demotedAt","demotedIdx","navigableVisibleIndexes","getNavigableVisibleIndexes","tabElements","measuredMoreButtonWidth","measuredWidth","widthsUnchanged","focusTabAt","setFocused","setFocusedKey","setSelectedKey","querySelector","isOnMoreButton","focusedKey","visiblePos","indexOf","stopPropagation","moreTriggerContent","hiddenTabSelectors","CSS","escape","replace","AriaTabList","ariaLabelProp","ariaLabelledByProp","TabPanels","AriaTabPanels","Tabs","defaultIndex","AriaTabs","defaultSelectedKey","onSelectionChange","Tag","kind","tagClasses","Tile","isClickable","tileClasses","ToastProvider","maxVisibleToasts","useToastState","Toggle","valueDescription","valueDescriptionPosition","generatedId","isUncontrolled","toggleId","isDescriptionRendered","handleKeyboardInteractions","currentValue","TopBar","sideNavIsClosed","openSideNav"],"mappings":"8oCAAO,MAAMA,EAAQ,CACnB,eACA,aACA,kBACA,uBACA,kBACA,mBACA,wBACA,gBACA,aACA,kBACA,mBACA,cACA,mBACA,wBACA,WACA,gBACA,qBACA,gBACA,iBACA,sBACA,OACA,YACA,YACA,WACA,wBACA,WACA,aACA,aACA,cACA,WACA,OACA,QACA,YACA,oBACA,yBACA,+BACA,eACA,oBACA,eACA,eACA,gBACA,aACA,kBACA,SACA,2BACA,oBACA,oBACA,sBACA,YACA,MACA,YACA,cACA,QACA,eACA,oBACA,YACA,qBACA,WACA,iBACA,SACA,kBACA,WACA,QACA,aACA,mBACA,QACA,OACA,cACA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