@maxio-com/react-ui-components 9.26.0 → 9.27.0

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.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/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/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/Heading/Heading.tsx","../src/components/Typography/Body/Body.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/TextField/TextField.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/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/Drawer/Drawer.tsx","../src/components/EmptyState/EmptyState.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/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 = ({ variant, color, className, size }: 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} />;\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}: 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 className={loadingSpinnerClasses} role=\"status\" aria-label=\"loading\" />\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","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';\n\nconst Alert = ({\n children,\n title,\n linkText,\n linkExternal,\n href,\n display = 'inline',\n sentiment = 'info',\n onDismiss,\n className,\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}>\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 />\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}\n\nexport const MenuContext = createContext({} as IMenuContext);\n\nexport const MenuProvider = ({ children }: { children: ReactNode }) => {\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={{ controlsId, buttonId, isOpen, onClose, onOpen, onToggle }}\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';\n\ninterface MenuProps {\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 } = useMenu();\n\n return (\n <details open={isOpen} onToggle={onToggle} className=\"maxio-action-menu\">\n {typeof children === 'function'\n ? children({ isOpen, onClose })\n : children}\n </details>\n );\n};\n\nconst Menu = ({ children }: MenuProps) => {\n return (\n <MenuProvider>\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\nconst Tooltip: FC<TooltipProps> = ({\n children,\n arrowPosition,\n size = 'regular',\n maxWidth = TOOLTIP_DEFAULT_MAX_WIDTH,\n}) => (\n <div\n data-testid=\"tooltip\"\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 { useEffect, useRef } from 'react';\nimport {\n useFloating,\n useInteractions,\n useRole,\n offset,\n autoUpdate,\n} from '@floating-ui/react-dom-interactions';\n\nimport { composeInteractions } from './utils';\nimport type { Placement, Interactions, OverlayAriaRole } from './types';\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\nexport const useOverlayTrigger = ({\n placement = 'top',\n isActive = false,\n interactions = ['hover'],\n floatingElementOffset = 0,\n onOverlayUpdate,\n autoHideMs,\n}: OverlayTriggerSettings) => {\n const hideTrigger = useRef<number | null>(null);\n\n const { strategy, x, y, context, floating, reference } = useFloating({\n placement,\n open: isActive,\n onOpenChange: (open) => onOverlayUpdate(open),\n middleware: [offset(floatingElementOffset)],\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 const floatingElementCSSPosition = {\n position: strategy,\n top: y ?? 0,\n left: x ?? 0,\n };\n\n return {\n isActive,\n refs: {\n floating,\n reference,\n },\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 React, { FC } 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 { PORTAL_ID } from './constants';\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\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}) => {\n const {\n getReferenceProps,\n getFloatingProps,\n refs: { floating, reference },\n floatingElementCSSPosition,\n } = useOverlayTrigger({\n role,\n isActive,\n onOverlayUpdate,\n autoHideMs,\n floatingElementOffset,\n interactions,\n placement,\n });\n\n const floatingElement = (\n <AnimatePresence>\n {isActive && (\n <motion.div\n ref={floating}\n style={floatingElementCSSPosition}\n {...motionSettings}\n {...getFloatingProps()}\n >\n {renderOverlay()}\n </motion.div>\n )}\n </AnimatePresence>\n );\n\n return (\n <>\n <div\n ref={reference}\n className={cx('maxio-inline-flex', className)}\n {...getReferenceProps()}\n data-testid=\"overlay-trigger\"\n >\n {children}\n </div>\n {usePortal ? (\n <FloatingPortal id={PORTAL_ID}>{floatingElement}</FloatingPortal>\n ) : (\n floatingElement\n )}\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';\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' | 'interactions' | 'usePortal' | 'autoHideMs' | 'className'\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}) => {\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 renderOverlay={() => (\n <Tooltip\n size={size}\n arrowPosition={ARROW_DIRECTION_LOOKUP[placement]}\n maxWidth={maxWidth}\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 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 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}: 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 className=\"maxio-data-table-wrapper\" onScroll={handleScroll}>\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 {\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 });\n },\n [availability, 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';\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};\n\nconst RowRenderer = <TData extends RowData>({\n row,\n SubRowComponent,\n pattern,\n enableExpanding,\n onRowAction,\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 >\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 >\n {row.getVisibleCells().map((cell) => {\n const isExpandColumn =\n enableExpanding && cell.column.getIndex() === expandColumnIndex;\n return (\n <TableCell key={cell.id} row={row} cell={cell} id={cell.id}>\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'\n | 'grouping'\n | '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';\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 ...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 >\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 >\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 />\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 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 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 { 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 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 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 renderEmptyState={renderEmptyState}>{listBoxChildren}</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 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 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\n 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 from 'react';\nimport cx from 'classnames';\nimport {\n Calendar as AriaCalendar,\n Button,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n Heading,\n Text,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport Icon from '../Icon';\nimport type { CalendarProps } from './types';\n\nconst Calendar = <T extends DateValue>({\n className,\n errorMessage,\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 <Heading className=\"maxio-calendar__heading\" />\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 Heading,\n Text,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport Icon from '../Icon';\nimport { useLocale } from 'react-aria-components';\nimport type { RangeCalendarProps } from './types';\n\nconst RangeCalendar = <T extends DateValue>({\n className,\n errorMessage,\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 <Heading className=\"maxio-calendar__heading\" />\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 { 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=\"maxio-sidebar-section\"\n >\n <a\n className=\"maxio-side-nav__link\"\n aria-current={section.isCurrent ? 'page' : undefined}\n role=\"button\"\n href={section.href}\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 </a>\n </li>\n );\n};\n\nexport default SingleItem;\n","import React, { useRef } from 'react';\nimport cx from 'classnames';\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=\"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=\"maxio-section-item\"\n >\n <a\n className=\"maxio-side-nav__link\"\n href={item.href}\n aria-current={item.isCurrent ? 'page' : undefined}\n >\n <span className=\"maxio-side-nav__link-title\">{item.name}</span>\n </a>\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 { 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=\"toggle sidebar\"\n onClick={onClose}\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';\n\nexport interface TabPanelProps\n extends Omit<React.HtmlHTMLAttributes<HTMLDivElement>, 'children' | 'id'> {\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 } = 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 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';\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 } = 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 >\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 />\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};\nconst Toggle = ({\n defaultChecked,\n checked,\n onChange,\n disabled,\n valueDescription,\n valueDescriptionPosition,\n className,\n name,\n id,\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=\"toggle-container\"\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 = ({ className, src, alt = 'avatar' }: AvatarProps) => {\n return <img className={cx('maxio-avatar', className)} alt={alt} src={src} />;\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';\n\nconst Banner = ({\n children,\n title,\n linkText,\n linkExternal,\n href,\n display = 'inline',\n sentiment = 'info',\n onDismiss,\n className,\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\">\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 />\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\n 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 ...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 />\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 ...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 &rarr;\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 />\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 { ModalOverlay, Modal, Dialog } from 'react-aria-components';\n\nimport { IconButton } from '../Buttons';\nimport Icon from '../Icon';\nimport Heading from '../Typography/Heading';\n\nimport type { DrawerProps } from './types';\n\nconst Drawer = ({\n open,\n onOpenChange,\n placement = 'right',\n backdrop = 'dim',\n size = 'md',\n className,\n title,\n description,\n children,\n footer,\n}: DrawerProps) => {\n const titleId = React.useId();\n\n const panelDataProps = {\n 'data-placement': placement,\n 'data-size': size,\n };\n\n return (\n <ModalOverlay\n isOpen={open}\n onOpenChange={onOpenChange}\n isDismissable\n className={cx('maxio-drawer__backdrop', {\n 'maxio-drawer__backdrop--dim': backdrop === 'dim',\n })}\n >\n <Modal className={cx('maxio-drawer', className)} {...panelDataProps}>\n <Dialog className=\"maxio-drawer__dialog\" aria-labelledby={titleId}>\n {({ close }) => (\n <>\n <div className=\"maxio-drawer__header\">\n <div className=\"maxio-drawer__title-group\">\n <Heading\n id={titleId}\n size=\"md\"\n className=\"maxio-drawer__title\"\n >\n {title}\n </Heading>\n {description && (\n <p className=\"maxio-drawer__description\">{description}</p>\n )}\n </div>\n <IconButton\n aria-label=\"Close\"\n onClick={close}\n icon={<Icon variant=\"cross\" />}\n variant=\"ghost\"\n size=\"sm\"\n className=\"maxio-drawer__close\"\n />\n </div>\n <div className=\"maxio-drawer__body\">{children}</div>\n {footer != null && (\n <div className=\"maxio-drawer__footer\">{footer}</div>\n )}\n </>\n )}\n </Dialog>\n </Modal>\n </ModalOverlay>\n );\n};\n\nexport default Drawer;\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';\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';\n\nconst MenuButton = ({\n children,\n iconName = 'chevron-down',\n 'aria-label': ariaLabel,\n size = 'md',\n variant = 'secondary',\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 } = 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 >\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';\n\ninterface MenuListProps {\n items: ActionListItem[];\n alignItemsEnd?: boolean;\n}\n\nconst MenuList = ({ items, alignItemsEnd = false }: MenuListProps) => {\n const itemsWrapperClass = cx('maxio-action-menu__content', {\n 'maxio-action-menu__content--align-end': alignItemsEnd,\n });\n const { controlsId, buttonId } = useMenu();\n\n return (\n <div className={itemsWrapperClass} role=\"presentation\">\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, { 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';\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}: 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\">\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 />\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 />\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';\n\nexport interface ProgressBarProps {\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}: 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}>\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>[]\n | 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}: TabsProps) => {\n return (\n <AriaTabs\n className=\"maxio-tabs-container\"\n selectedKey={index}\n defaultSelectedKey={defaultIndex}\n onSelectionChange={(key) => onChange?.(Number(key))}\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}: 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}>\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';\n\ntype TileProps = {\n disabled?: boolean;\n href?: string;\n target?: 'string';\n onClick?: () => void;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst Tile = ({\n children,\n className,\n href,\n onClick,\n target,\n disabled,\n}: TileProps) => {\n const isClickable = href || onClick;\n\n if (!isClickable) {\n return <div className=\"maxio-tile\">{children}</div>;\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 >\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}: TopBarProps) => {\n return (\n <nav className=\"maxio-top-bar\">\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","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","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","hideTrigger","strategy","x","y","floating","reference","useFloating","onOpenChange","middleware","offset","whileElementsMounted","autoUpdate","getReferenceProps","getFloatingProps","useInteractions","useRole","clearTimeout","setTimeout","refs","floatingElementCSSPosition","position","top","left","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","OverlayTrigger","usePortal","renderOverlay","motionSettings","floatingElement","AnimatePresence","motion","div","Fragment","FloatingPortal","ARROW_DIRECTION_LOOKUP","right","bottom","TooltipTrigger","renderContent","isVisible","onVisibilityUpdate","setActive","useExternalState","debounceTimeoutRef","updateTooltipVisibility","useCallback","tooltipMotion","useMemo","axisLetter","startsWith","transformStart","initial","opacity","visibility","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","data","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","some","getData","args","onDragEnter","self","onDrag","onDragLeave","registerHandle","rowElement","closest","HTMLElement","draggable","dragHandle","getInitialData","monitorForElements","canMonitor","onDragStart","onDrop","location","targetData","dropTargets","getCanExpand","getIsExpanded","toggleExpanded","getActions","siblings","rows","sibling","previousSibling","nextSibling","firstSibling","lastSibling","candidates","push","rootAncestor","nextAncestor","flatRows","forEach","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","trigger","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","padding","rowHeaderCell","actionableRowLabelledBy","getIndex","paddingLeft","flexRender","getContext","AVAILABLE","UNAVAILABLE","reason","excludeBuiltinIds","ids","EMPTY_SORTING_STATE","getDefaultSubRows","headingsSizeMap","sm","md","lg","Heading","AsComponent","Body","as","compact","Flex","basis","flex","flexDirection","wrap","grow","shrink","gap","gapX","gapY","alignItems","justifyContent","flexClasses","ListBoxRoot","render","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","triggerRef","inputRef","popoverStyle","setPopoverStyle","popoverCrossOffset","setPopoverCrossOffset","hasErrorMessage","listBoxChildren","updatePopoverPosition","getBoundingClientRect","currentOffset","currentStyle","nextWidth","offsetWidth","ResizeObserver","observer","observe","disconnect","containerClass","AriaComboBox","Label","Input","AriaButton","Text","slot","elementType","FieldError","validation","crossOffset","ComboBoxItem","ComboBoxSection","ComboBoxHeader","ComboBox","RadioContext","TextField","AriaTextField","TextArea","AriaTextArea","TextInput","helperText","showErrorMessage","useImperativeHandle","spellCheck","restProps","ariaProps","defaultValue","toString","labelProps","descriptionProps","errorMessageProps","useTextField","showError","Select","options","inline","htmlFor","opt","DateInput","displayValue","AriaDateInput","DateSegment","hidden","Calendar","AriaCalendar","visibleDuration","months","CalendarGrid","CalendarGridHeader","day","CalendarHeaderCell","CalendarGridBody","date","CalendarCell","DatePresets","presets","isPresetDisabled","onSelect","Group","preset","isPresetDateDisabled","minValue","compare","maxValue","isDateUnavailable","RangeCalendar","direction","useLocale","AriaRangeCalendar","datesMatch","a","b","SegmentedControlRoot","orientation","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","name","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","footer","Avatar","src","Banner","bannerClasses","Breadcrumbs","childrenCount","Children","count","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","Dialog","setValue","setOpen","DateRangePicker","AriaDateRangePicker","presetLabel","getPresetLabel","start","end","isPresetRangeDisabled","range","anchor","toCalendarDate","constraints","allowsNonContiguousRanges","add","days","selectRangePreset","setDateTime","Display","Drawer","backdrop","titleId","panelDataProps","ModalOverlay","isDismissable","Modal","close","EmptyState","hasActiveFilters","headingLevel","rootClasses","HeadingTag","GlobalToastProvider","toastQueue","useToastQueue","removeAllToasts","contextValue","addToast","removeToast","clear","Grid","templateColumns","templateRows","autoColumns","autoRows","columnStart","columnEnd","rowStart","rowEnd","gridClasses","MenuButton","iconName","iconClassName","MenuList","alignItemsEnd","itemsWrapperClass","Pagination","totalItems","itemsPerPage","itemsPerPageProp","currentPage","currentPageProp","pageSizeOptions","manualPageInput","setCurrentPage","setItemsPerPage","inputValue","setInputValue","totalPages","Math","ceil","hasNext","hasPrevious","firstItem","lastItem","min","itemsPerPageDropdown","option","totalPagesDropdown","Array","from","_","i","page","handlePageSelection","selectedValue","validateAndUpdatePage","numValue","parseInt","isNaN","clampedValue","max","handleItemsPerPage","Number","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","querySelectorAll","measuredMoreButtonWidth","measuredWidth","widthsUnchanged","focusTabAt","setFocused","setFocusedKey","setSelectedKey","querySelector","isOnMoreButton","document","activeElement","focusedKey","visiblePos","indexOf","stopPropagation","moreTriggerContent","hiddenTabSelectors","CSS","escape","replace","join","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":"wjCAAO,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,EAAGC,UAASC,QAAOC,YAAWC,WACzC,MAAMC,EAAWA,CAACJ,EAAiBK,IACjCA,EAAKC,SAASN,GAEVO,EAAUH,EAASJ,EAASJ,IAAUQ,EAASJ,EAASH,GACxDW,EAAcJ,EAASJ,EAASF,GAEhCW,EAAYC,EAChB,CACE,SAAUH,EACV,iBAAkBC,EAClB,uBAAwBD,IAAYC,EACpC,CAAC,MAAMR,MAAY,EACnB,CAAC,MAAMG,KAASA,EAChB,CAAC,eAAeF,KACdA,IACCG,EAASJ,EAASH,KAClBO,EAASJ,EAASF,IAEvBI,G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C,cAAA,MAAA,CACEV,UAAWQ,EAAG,eAAgBR,EAAW,CACvC,yBAA0BmE,IAE5B0E,MAAO,CACLrC,QAAS,cACTwd,iBAEF,cAAY,oBAEXuiB,EACC9lC,EAAAC,cAAA,QAAA,CAAOV,UAAU,sBAAsBsqB,QAASgc,GAC7CJ,GAED,KAEJzlC,EAAAC,cAAA,MAAA,CAAKV,UAAU,2BACbS,EAAAC,cAAA,QAAA,CACEe,KAAK,WACLsc,eAAgBA,EAChBR,QAASA,EACT6B,SAAWjc,IACLic,GACFA,EAASjc,EAAEM,OAAO8Z,QAASpa,IAG/BD,UAAWsjC,EACXriC,SAAUA,EACVnE,UAAU,yBACVoB,GAAIklC,EACJ3X,KAAMA,EACN,aAAY9sB,IAEdpB,EAAAC,cAAA,MAAA,CACEV,UAAU,sBACVe,KAAK,SACL,eAAcwc,EACd,cAAY,QAEZ9c,EAAAC,cAAA,MAAA,CAAKV,UAAU,yBACfS,EAAAC,cAAA,OAAA,CAAMV,UAAU,sBACdS,EAAAC,cAAA,IAAA,CAAGV,UAAU,2BAEfS,EAAAC,cAAA,OAAA,CAAMV,UAAU,sBACdS,EAAAC,cAAA,IAAA,CAAGV,UAAU,0FiChIH0mC,EACpBxiC,WACA4N,UACA60B,kBACAC,iBAGEnmC,EAAAC,cAAA,MAAA,CAAKV,UAAU,iBACZ2mC,GACClmC,EAAAC,cAACwF,EAAU,CACT,aAAW,uBACXpG,QAAQ,QACRuE,KAAM5D,EAAAC,cAACb,EAAI,CAACC,QAAQ,YACpBqH,QAASy/B,IAGbnmC,EAAAC,cAACmjB,GAAI,CAACK,MAAI,EAACM,eAAe,OACvBtgB,GAEF4N,sGlCoBiB2gB,KACtB,MAAMxqB,EAAUC,EAAAA,WAAWirB,IAE3B,IAAKlrB,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/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/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/Heading/Heading.tsx","../src/components/Typography/Body/Body.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/TextField/TextField.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/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/Drawer/Drawer.tsx","../src/components/EmptyState/EmptyState.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/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 = ({ variant, color, className, size }: 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} />;\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}: 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 className={loadingSpinnerClasses} role=\"status\" aria-label=\"loading\" />\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","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';\n\nconst Alert = ({\n children,\n title,\n linkText,\n linkExternal,\n href,\n display = 'inline',\n sentiment = 'info',\n onDismiss,\n className,\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}>\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 />\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}\n\nexport const MenuContext = createContext({} as IMenuContext);\n\nexport const MenuProvider = ({ children }: { children: ReactNode }) => {\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={{ controlsId, buttonId, isOpen, onClose, onOpen, onToggle }}\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';\n\ninterface MenuProps {\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 } = useMenu();\n\n return (\n <details open={isOpen} onToggle={onToggle} className=\"maxio-action-menu\">\n {typeof children === 'function'\n ? children({ isOpen, onClose })\n : children}\n </details>\n );\n};\n\nconst Menu = ({ children }: MenuProps) => {\n return (\n <MenuProvider>\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\nconst Tooltip: FC<TooltipProps> = ({\n children,\n arrowPosition,\n size = 'regular',\n maxWidth = TOOLTIP_DEFAULT_MAX_WIDTH,\n}) => (\n <div\n data-testid=\"tooltip\"\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 { useEffect, useRef } from 'react';\nimport {\n useFloating,\n useInteractions,\n useRole,\n offset,\n autoUpdate,\n} from '@floating-ui/react-dom-interactions';\n\nimport { composeInteractions } from './utils';\nimport type { Placement, Interactions, OverlayAriaRole } from './types';\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\nexport const useOverlayTrigger = ({\n placement = 'top',\n isActive = false,\n interactions = ['hover'],\n floatingElementOffset = 0,\n onOverlayUpdate,\n autoHideMs,\n}: OverlayTriggerSettings) => {\n const hideTrigger = useRef<number | null>(null);\n\n const { strategy, x, y, context, floating, reference } = useFloating({\n placement,\n open: isActive,\n onOpenChange: (open) => onOverlayUpdate(open),\n middleware: [offset(floatingElementOffset)],\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 const floatingElementCSSPosition = {\n position: strategy,\n top: y ?? 0,\n left: x ?? 0,\n };\n\n return {\n isActive,\n refs: {\n floating,\n reference,\n },\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 React, { FC } 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 { PORTAL_ID } from './constants';\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\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}) => {\n const {\n getReferenceProps,\n getFloatingProps,\n refs: { floating, reference },\n floatingElementCSSPosition,\n } = useOverlayTrigger({\n role,\n isActive,\n onOverlayUpdate,\n autoHideMs,\n floatingElementOffset,\n interactions,\n placement,\n });\n\n const floatingElement = (\n <AnimatePresence>\n {isActive && (\n <motion.div\n ref={floating}\n style={floatingElementCSSPosition}\n {...motionSettings}\n {...getFloatingProps()}\n >\n {renderOverlay()}\n </motion.div>\n )}\n </AnimatePresence>\n );\n\n return (\n <>\n <div\n ref={reference}\n className={cx('maxio-inline-flex', className)}\n {...getReferenceProps()}\n data-testid=\"overlay-trigger\"\n >\n {children}\n </div>\n {usePortal ? (\n <FloatingPortal id={PORTAL_ID}>{floatingElement}</FloatingPortal>\n ) : (\n floatingElement\n )}\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';\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' | 'interactions' | 'usePortal' | 'autoHideMs' | 'className'\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}) => {\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 renderOverlay={() => (\n <Tooltip\n size={size}\n arrowPosition={ARROW_DIRECTION_LOOKUP[placement]}\n maxWidth={maxWidth}\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 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 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}: 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 className=\"maxio-data-table-wrapper\" onScroll={handleScroll}>\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 {\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 });\n },\n [availability, 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';\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};\n\nconst RowRenderer = <TData extends RowData>({\n row,\n SubRowComponent,\n pattern,\n enableExpanding,\n onRowAction,\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 >\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 >\n {row.getVisibleCells().map((cell) => {\n const isExpandColumn =\n enableExpanding && cell.column.getIndex() === expandColumnIndex;\n return (\n <TableCell key={cell.id} row={row} cell={cell} id={cell.id}>\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'\n | 'grouping'\n | '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';\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 ...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 >\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 >\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 />\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 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 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 { 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 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 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\n 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 from 'react';\nimport cx from 'classnames';\nimport {\n Calendar as AriaCalendar,\n Button,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n Heading,\n Text,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport Icon from '../Icon';\nimport type { CalendarProps } from './types';\n\nconst Calendar = <T extends DateValue>({\n className,\n errorMessage,\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 <Heading className=\"maxio-calendar__heading\" />\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 Heading,\n Text,\n composeRenderProps,\n type DateValue,\n} from 'react-aria-components';\nimport Icon from '../Icon';\nimport { useLocale } from 'react-aria-components';\nimport type { RangeCalendarProps } from './types';\n\nconst RangeCalendar = <T extends DateValue>({\n className,\n errorMessage,\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 <Heading className=\"maxio-calendar__heading\" />\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 { 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=\"maxio-sidebar-section\"\n >\n <a\n className=\"maxio-side-nav__link\"\n aria-current={section.isCurrent ? 'page' : undefined}\n role=\"button\"\n href={section.href}\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 </a>\n </li>\n );\n};\n\nexport default SingleItem;\n","import React, { useRef } from 'react';\nimport cx from 'classnames';\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=\"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=\"maxio-section-item\"\n >\n <a\n className=\"maxio-side-nav__link\"\n href={item.href}\n aria-current={item.isCurrent ? 'page' : undefined}\n >\n <span className=\"maxio-side-nav__link-title\">{item.name}</span>\n </a>\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 { 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=\"toggle sidebar\"\n onClick={onClose}\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';\n\nexport interface TabPanelProps\n extends Omit<React.HtmlHTMLAttributes<HTMLDivElement>, 'children' | 'id'> {\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 } = 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 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';\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 } = 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 >\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 />\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};\nconst Toggle = ({\n defaultChecked,\n checked,\n onChange,\n disabled,\n valueDescription,\n valueDescriptionPosition,\n className,\n name,\n id,\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=\"toggle-container\"\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 = ({ className, src, alt = 'avatar' }: AvatarProps) => {\n return <img className={cx('maxio-avatar', className)} alt={alt} src={src} />;\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';\n\nconst Banner = ({\n children,\n title,\n linkText,\n linkExternal,\n href,\n display = 'inline',\n sentiment = 'info',\n onDismiss,\n className,\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\">\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 />\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\n 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 ...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 />\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 ...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 &rarr;\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 />\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 { ModalOverlay, Modal, Dialog } from 'react-aria-components';\n\nimport { IconButton } from '../Buttons';\nimport Icon from '../Icon';\nimport Heading from '../Typography/Heading';\n\nimport type { DrawerProps } from './types';\n\nconst Drawer = ({\n open,\n onOpenChange,\n placement = 'right',\n backdrop = 'dim',\n size = 'md',\n className,\n title,\n description,\n children,\n footer,\n}: DrawerProps) => {\n const titleId = React.useId();\n\n const panelDataProps = {\n 'data-placement': placement,\n 'data-size': size,\n };\n\n return (\n <ModalOverlay\n isOpen={open}\n onOpenChange={onOpenChange}\n isDismissable\n className={cx('maxio-drawer__backdrop', {\n 'maxio-drawer__backdrop--dim': backdrop === 'dim',\n })}\n >\n <Modal className={cx('maxio-drawer', className)} {...panelDataProps}>\n <Dialog className=\"maxio-drawer__dialog\" aria-labelledby={titleId}>\n {({ close }) => (\n <>\n <div className=\"maxio-drawer__header\">\n <div className=\"maxio-drawer__title-group\">\n <Heading\n id={titleId}\n size=\"md\"\n className=\"maxio-drawer__title\"\n >\n {title}\n </Heading>\n {description && (\n <p className=\"maxio-drawer__description\">{description}</p>\n )}\n </div>\n <IconButton\n aria-label=\"Close\"\n onClick={close}\n icon={<Icon variant=\"cross\" />}\n variant=\"ghost\"\n size=\"sm\"\n className=\"maxio-drawer__close\"\n />\n </div>\n <div className=\"maxio-drawer__body\">{children}</div>\n {footer != null && (\n <div className=\"maxio-drawer__footer\">{footer}</div>\n )}\n </>\n )}\n </Dialog>\n </Modal>\n </ModalOverlay>\n );\n};\n\nexport default Drawer;\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';\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';\n\nconst MenuButton = ({\n children,\n iconName = 'chevron-down',\n 'aria-label': ariaLabel,\n size = 'md',\n variant = 'secondary',\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 } = 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 >\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';\n\ninterface MenuListProps {\n items: ActionListItem[];\n alignItemsEnd?: boolean;\n}\n\nconst MenuList = ({ items, alignItemsEnd = false }: MenuListProps) => {\n const itemsWrapperClass = cx('maxio-action-menu__content', {\n 'maxio-action-menu__content--align-end': alignItemsEnd,\n });\n const { controlsId, buttonId } = useMenu();\n\n return (\n <div className={itemsWrapperClass} role=\"presentation\">\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, { 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';\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}: 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\">\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 />\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 />\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';\n\nexport interface ProgressBarProps {\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}: 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}>\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>[]\n | 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}: TabsProps) => {\n return (\n <AriaTabs\n className=\"maxio-tabs-container\"\n selectedKey={index}\n defaultSelectedKey={defaultIndex}\n onSelectionChange={(key) => onChange?.(Number(key))}\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}: 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}>\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';\n\ntype TileProps = {\n disabled?: boolean;\n href?: string;\n target?: 'string';\n onClick?: () => void;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst Tile = ({\n children,\n className,\n href,\n onClick,\n target,\n disabled,\n}: TileProps) => {\n const isClickable = href || onClick;\n\n if (!isClickable) {\n return <div className=\"maxio-tile\">{children}</div>;\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 >\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}: TopBarProps) => {\n return (\n <nav className=\"maxio-top-bar\">\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","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","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","hideTrigger","strategy","x","y","floating","reference","useFloating","onOpenChange","middleware","offset","whileElementsMounted","autoUpdate","getReferenceProps","getFloatingProps","useInteractions","useRole","clearTimeout","setTimeout","refs","floatingElementCSSPosition","position","top","left","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","OverlayTrigger","usePortal","renderOverlay","motionSettings","floatingElement","AnimatePresence","motion","div","Fragment","FloatingPortal","ARROW_DIRECTION_LOOKUP","right","bottom","TooltipTrigger","renderContent","isVisible","onVisibilityUpdate","setActive","useExternalState","debounceTimeoutRef","updateTooltipVisibility","useCallback","tooltipMotion","useMemo","axisLetter","startsWith","transformStart","initial","opacity","visibility","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","data","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","some","getData","args","onDragEnter","self","onDrag","onDragLeave","registerHandle","rowElement","closest","HTMLElement","draggable","dragHandle","getInitialData","monitorForElements","canMonitor","onDragStart","onDrop","location","targetData","dropTargets","getCanExpand","getIsExpanded","toggleExpanded","getActions","siblings","rows","sibling","previousSibling","nextSibling","firstSibling","lastSibling","candidates","push","rootAncestor","nextAncestor","flatRows","forEach","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","trigger","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","padding","rowHeaderCell","actionableRowLabelledBy","getIndex","paddingLeft","flexRender","getContext","AVAILABLE","UNAVAILABLE","reason","excludeBuiltinIds","ids","EMPTY_SORTING_STATE","getDefaultSubRows","headingsSizeMap","sm","md","lg","Heading","AsComponent","Body","as","compact","Flex","basis","flex","flexDirection","wrap","grow","shrink","gap","gapX","gapY","alignItems","justifyContent","flexClasses","ListBoxRoot","render","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","observe","disconnect","containerClass","AriaComboBox","Label","Input","AriaButton","Text","slot","elementType","FieldError","validation","crossOffset","defaultItems","ComboBoxItem","ComboBoxSection","ComboBoxHeader","ComboBox","RadioContext","TextField","AriaTextField","TextArea","AriaTextArea","TextInput","helperText","showErrorMessage","useImperativeHandle","spellCheck","restProps","ariaProps","defaultValue","toString","labelProps","descriptionProps","errorMessageProps","useTextField","showError","Select","options","inline","htmlFor","opt","DateInput","displayValue","AriaDateInput","DateSegment","hidden","Calendar","AriaCalendar","visibleDuration","months","CalendarGrid","CalendarGridHeader","day","CalendarHeaderCell","CalendarGridBody","date","CalendarCell","DatePresets","presets","isPresetDisabled","onSelect","Group","preset","isPresetDateDisabled","minValue","compare","maxValue","isDateUnavailable","RangeCalendar","direction","useLocale","AriaRangeCalendar","datesMatch","a","b","SegmentedControlRoot","orientation","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","name","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","footer","Avatar","src","Banner","bannerClasses","Breadcrumbs","childrenCount","Children","count","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","Dialog","setValue","setOpen","DateRangePicker","AriaDateRangePicker","presetLabel","getPresetLabel","start","end","isPresetRangeDisabled","range","anchor","toCalendarDate","constraints","allowsNonContiguousRanges","add","days","selectRangePreset","setDateTime","Display","Drawer","backdrop","titleId","panelDataProps","ModalOverlay","isDismissable","Modal","close","EmptyState","hasActiveFilters","headingLevel","rootClasses","HeadingTag","GlobalToastProvider","toastQueue","useToastQueue","removeAllToasts","contextValue","addToast","removeToast","clear","Grid","templateColumns","templateRows","autoColumns","autoRows","columnStart","columnEnd","rowStart","rowEnd","gridClasses","MenuButton","iconName","iconClassName","MenuList","alignItemsEnd","itemsWrapperClass","Pagination","totalItems","itemsPerPage","itemsPerPageProp","currentPage","currentPageProp","pageSizeOptions","manualPageInput","setCurrentPage","setItemsPerPage","inputValue","setInputValue","totalPages","Math","ceil","hasNext","hasPrevious","firstItem","lastItem","min","itemsPerPageDropdown","option","totalPagesDropdown","Array","from","_","i","page","handlePageSelection","selectedValue","validateAndUpdatePage","numValue","parseInt","isNaN","clampedValue","max","handleItemsPerPage","Number","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","querySelectorAll","measuredMoreButtonWidth","measuredWidth","widthsUnchanged","focusTabAt","setFocused","setFocusedKey","setSelectedKey","querySelector","isOnMoreButton","document","activeElement","focusedKey","visiblePos","indexOf","stopPropagation","moreTriggerContent","hiddenTabSelectors","CSS","escape","replace","join","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":"wjCAAO,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,EAAGC,UAASC,QAAOC,YAAWC,WACzC,MAAMC,EAAWA,CAACJ,EAAiBK,IACjCA,EAAKC,SAASN,GAEVO,EAAUH,EAASJ,EAASJ,IAAUQ,EAASJ,EAASH,GACxDW,EAAcJ,EAASJ,EAASF,GAEhCW,EAAYC,EAChB,CACE,SAAUH,EACV,iBAAkBC,EAClB,uBAAwBD,IAAYC,EACpC,CAAC,MAAMR,MAAY,EACnB,CAAC,MAAMG,KAASA,EAChB,CAAC,eAAeF,KACdA,IACCG,EAASJ,EAASH,KAClBO,EAASJ,EAASF,IAEvBI,GAGF,OAAOS,EAAAC,cAAA,IA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