{"version":3,"file":"index.umd.cjs","sources":["../src/utils/ExitListener/useExitListener.tsx","../src/utils/Overlay/OverlayContext.ts","../src/utils/useId.ts","../src/utils/useUnmount.ts","../src/utils/Portal/Portal.ts","../src/utils/Overlay/OverlayPortal/OverlayPortal.tsx","../src/layers/Backdrop/Backdrop.tsx","../src/layers/Backdrop/BackdropTheme.tsx","../src/utils/Overlay/GlobalOverlay/GlobalOverlay.tsx","../src/utils/Overlay/OverlayTrigger.tsx","../src/utils/Position/usePosition.tsx","../src/utils/Overlay/ConnectedOverlay/ConnectedOverlayContent.tsx","../src/utils/Overlay/ConnectedOverlay/ConnectedOverlay.tsx","../src/utils/Overlay/useOverlay.tsx","../src/elements/Button/ButtonTheme.ts","../src/elements/Button/ButtonGroupContext.ts","../src/elements/Button/Button.tsx","../src/elements/Button/ButtonGroup.tsx","../src/elements/Chip/Chip.tsx","../src/form/Calendar/utils.ts","../src/form/Calendar/CalendarDays/CalendarDays.tsx","../src/form/Calendar/CalendarMonths/CalendarMonths.tsx","../src/form/Calendar/CalendarYears/CalendarYears.tsx","../src/layout/Divider/Divider.tsx","../src/layout/Divider/DividerTheme.ts","../src/typography/TypographyTheme.ts","../src/typography/H1.tsx","../src/typography/H2.tsx","../src/typography/H3.tsx","../src/typography/H4.tsx","../src/typography/H5.tsx","../src/typography/H6.tsx","../src/typography/P.tsx","../src/typography/BlockQuote.tsx","../src/typography/Lead.tsx","../src/typography/Large.tsx","../src/typography/Small.tsx","../src/typography/Muted.tsx","../src/form/Calendar/CalendarTimes/TimeColumn.tsx","../src/layout/Collapse/Collapse.tsx","../src/layout/Collapse/CollapseTheme.ts","../src/layout/Motion/MotionGroup.tsx","../src/layout/Motion/MotionItem.tsx","../src/layout/List/List.tsx","../src/layout/List/ListItem/ListItem.tsx","../src/layout/List/ListHeader/ListHeader.tsx","../src/layout/List/ListTheme.ts","../src/layout/Field/Field.tsx","../src/layout/Field/FieldTheme.ts","../src/layout/Card/CardTheme.tsx","../src/layout/Card/Card.tsx","../src/elements/Arrow/Arrow.tsx","../src/elements/Arrow/ArrowTheme.ts","../src/layout/Tree/TreeContext.ts","../src/layout/Tree/Tree.tsx","../src/layout/Tree/TreeNode.tsx","../src/layout/Tree/TreeTheme.ts","../src/utils/Theme/helpers/isObject.ts","../src/utils/Theme/helpers/cloneDeep.ts","../src/utils/Theme/helpers/mergeDeep.ts","../src/utils/Theme/helpers/cn.ts","../src/utils/Theme/helpers/tokenUtils.ts","../src/utils/Theme/helpers/mergeThemeClasses.ts","../src/utils/Theme/ThemeProvider.tsx","../src/utils/Theme/hooks/useTheme.ts","../src/utils/Theme/hooks/useComponentTheme.ts","../src/data/Ellipsis/Ellipsis.tsx","../src/data/Ellipsis/EllipsisTheme.ts","../src/data/InfinityList/useInfinityList.ts","../src/data/InfinityList/InfinityList.tsx","../src/layout/Tree/JsonTree/JsonTreeNode.tsx","../src/layout/Tree/JsonTree/utils.ts","../src/layout/Tree/JsonTree/JsonTree.tsx","../src/layout/Tree/JsonTree/JsonTreeTheme.ts","../src/layout/Tabs/TabPanel.tsx","../src/layout/Tabs/Tab.tsx","../src/layout/Tabs/TabList.tsx","../src/layout/Tabs/Tabs.tsx","../src/layout/Tabs/TabsTheme.ts","../src/layout/Breadcrumbs/Breadcrumbs.tsx","../src/layout/Breadcrumbs/BreadcrumbsTheme.ts","../src/layout/Breadcrumbs/BreadcrumbItem.tsx","../src/layout/Breadcrumbs/BreadcrumbLink.tsx","../src/layout/Breadcrumbs/BreadcrumbList.tsx","../src/layout/Breadcrumbs/BreadcrumbSeparator.tsx","../src/layout/Breadcrumbs/BreadcrumbPage.tsx","../src/layout/Stepper/Step.tsx","../src/layout/Stepper/Stepper.tsx","../src/layout/Stepper/StepperTheme.tsx","../src/form/Calendar/CalendarTimes/CalendarTimes.tsx","../src/form/Calendar/CalendarPresets/CalendarPresets.tsx","../src/form/Calendar/CalendarPresets/default-options.ts","../src/form/Calendar/Calendar.tsx","../src/form/Calendar/CalendarRange.tsx","../src/form/Calendar/CalendarTheme.ts","../src/form/Calendar/CalendarRangeTheme.ts","../src/form/Checkbox/CheckboxLabel.tsx","../src/form/Checkbox/Checkbox.tsx","../src/form/Checkbox/CheckboxTheme.ts","../src/form/Input/Input.tsx","../src/form/Input/InlineInput/InlineInput.tsx","../src/form/Input/DebouncedInput/DebouncedInput.tsx","../src/form/Input/InputTheme.ts","../src/form/Radio/RadioGroupContext.ts","../src/form/Radio/Radio.tsx","../src/form/Radio/RadioGroup.tsx","../src/form/Radio/RadioTheme.ts","../src/form/Range/RangeTooltip.tsx","../src/form/Range/RangeDouble.tsx","../src/form/Range/RangeSingle.tsx","../src/form/Range/RangeTheme.ts","../src/form/Select/icons/DownArrowIcon.tsx","../src/form/Select/icons/CloseIcon.tsx","../src/elements/Loader/DotsLoader.tsx","../src/form/Select/icons/RefreshIcon.tsx","../src/form/Select/SelectInput/SelectInputChip.tsx","../src/form/Select/SelectInput/SelectInput.tsx","../src/form/Select/SelectInput/SelectInputTheme.ts","../src/data/HighlightedText/utils.ts","../src/data/HighlightedText/HighlightedText.tsx","../src/form/Select/icons/CheckIcon.tsx","../src/form/Select/SelectMenu/SelectMenu.tsx","../src/form/Select/SelectMenu/SelectMenuTheme.ts","../src/form/Select/utils/grouping.ts","../src/form/Select/SelectOption.tsx","../src/form/Select/utils/options.ts","../src/form/Select/utils/useWidth.ts","../src/form/Select/utils/keyboard.ts","../src/form/Select/utils/filter.ts","../src/form/Select/Select.tsx","../src/form/Select/SelectTheme.ts","../src/form/Textarea/Textarea.tsx","../src/form/Textarea/TextareaTheme.ts","../src/form/Toggle/Toggle.tsx","../src/form/Toggle/ToggleTheme.ts","../src/elements/IconButton/IconButton.tsx","../src/layers/Menu/Menu.tsx","../src/layers/Menu/useMenu.tsx","../src/layers/Menu/NestedMenu.tsx","../src/layers/Menu/MenuTheme.tsx","../src/assets/icons/calendar.svg?react","../src/form/DateInput/DateInput.tsx","../src/form/DateInput/DateInputTheme.ts","../src/elements/Chip/DeletableChip.tsx","../src/elements/Chip/ChipTheme.ts","../src/elements/Loader/DotsLoaderTheme.ts","../src/elements/Avatar/Avatar.tsx","../src/elements/Avatar/AvatarTheme.ts","../src/data/Pluralize/utils.ts","../src/data/Pluralize/Pluralize.tsx","../src/data/DataSize/utils.ts","../src/data/DataSize/DataSize.tsx","../src/data/Redact/utils.ts","../src/data/Redact/Redact.tsx","../src/data/Redact/RedactTheme.ts","../src/data/Duration/utils.ts","../src/data/Duration/Duration.tsx","../src/data/DateFormat/relative.ts","../src/data/DateFormat/formatting.ts","../src/data/DateFormat/DateFormat.tsx","../src/data/DateFormat/DateFormatTheme.ts","../src/data/Sort/DownArrowIcon.tsx","../src/data/Sort/utils.ts","../src/data/Sort/Sort.tsx","../src/data/Sort/SortTheme.ts","../src/data/Pager/assets/arrow-end.svg?react","../src/data/Pager/assets/arrow-next.svg?react","../src/data/Pager/assets/arrow-previous.svg?react","../src/data/Pager/assets/arrow-start.svg?react","../src/data/Pager/utils.ts","../src/data/Pager/Pager.tsx","../src/data/Pager/PagerTheme.ts","../src/elements/AvatarGroup/AvatarGroup.tsx","../src/elements/AvatarGroup/AvatarGroupTheme.ts","../src/elements/Kbd/utils.ts","../src/elements/Kbd/Kbd.tsx","../src/elements/Kbd/KbdTheme.ts","../src/elements/Badge/Badge.tsx","../src/elements/Badge/BadgeTheme.ts","../src/elements/CommandPalette/CommandPaletteInput/SearchIcon.tsx","../src/elements/CommandPalette/CommandPaletteInput/CommandPaletteInput.tsx","../src/elements/CommandPalette/CommandPaletteInput/CommandPaletteInputTheme.ts","../src/elements/CommandPalette/useFlattenedTree.ts","../src/elements/CommandPalette/CommandPalette.tsx","../src/elements/CommandPalette/CommandPaletteItem/CommandPaletteItem.tsx","../src/elements/CommandPalette/CommandPaletteItem/CommandPaletteItemTheme.ts","../src/elements/CommandPalette/CommandPaletteSection/CommandPaletteSection.tsx","../src/elements/CommandPalette/CommandPaletteSection/CommandPaletteSectionTheme.ts","../src/elements/CommandPalette/CommandPaletteTheme.ts","../src/elements/Skeleton/Skeleton.tsx","../src/elements/Skeleton/SkeletonTheme.ts","../src/elements/Navigation/NavigationBar.tsx","../src/elements/Navigation/NavigationButton.tsx","../src/elements/Navigation/NavigationTheme.tsx","../src/layers/Tooltip/useTooltipState.ts","../src/layers/Tooltip/Tooltip.tsx","../src/layers/Tooltip/TooltipTheme.ts","../src/layers/Popover/Popover.tsx","../src/layers/Popover/PopoverTheme.ts","../src/layers/Dialog/DialogContext.tsx","../src/layers/Dialog/DialogHeader.tsx","../src/layers/Dialog/Dialog.tsx","../src/layers/Dialog/useDialog.tsx","../src/layers/Dialog/DialogContent.tsx","../src/layers/Dialog/DialogFooter.tsx","../src/layers/Dialog/DialogTheme.tsx","../src/layers/Drawer/variants.ts","../src/layers/Drawer/DrawerContext.tsx","../src/layers/Drawer/DrawerHeader.tsx","../src/layers/Drawer/Drawer.tsx","../src/layers/Drawer/useDrawer.tsx","../src/layers/Drawer/DrawerContent.tsx","../src/layers/Drawer/DrawerFooter.tsx","../src/layers/Drawer/DrawerTheme.ts","../src/layers/ContextMenu/ContextMenu.tsx","../src/layers/ContextMenu/ContextMenuTheme.ts","../src/layers/Notification/Notification.tsx","../src/layers/Notification/NotificationsContext.tsx","../src/assets/icons/info.svg?react","../src/assets/icons/check_circle.svg?react","../src/assets/icons/warning.svg?react","../src/assets/icons/error_circle.svg?react","../src/layers/Notification/Notifications.tsx","../src/layers/Notification/useNotification.ts","../src/layers/Notification/NotificationTheme.ts","../src/layers/Callout/Callout.tsx","../src/layers/Callout/CalloutTheme.ts","../src/layers/Callout/SuccessCallout.tsx","../src/layers/Callout/ErrorCallout.tsx","../src/layers/Callout/WarningCallout.tsx","../src/layers/Callout/InfoCallout.tsx","../src/layers/ConfirmDialog/ConfirmDialogContext.tsx","../src/layers/ConfirmDialog/ConfirmDialog.tsx","../src/layers/ConfirmDialog/ConfirmDialogActions.tsx","../src/layers/ConfirmDialog/useConfirmDialog.tsx","../src/utils/Theme/themes/theme.ts","../src/utils/Theme/themes/extendTheme.ts","../src/utils/Theme/themes/extendCoponentTheme.ts","../src/utils/Theme/themes/extractTheme.ts","../src/utils/Theme/blocks/ColorBlocks.tsx","../src/utils/Theme/blocks/TypographyBlocks.tsx","../src/utils/Theme/blocks/SpacingBlocks.tsx","../src/utils/Theme/blocks/PaletteBlocks.tsx","../src/utils/Theme/blocks/BorderBlocks.tsx","../src/utils/Theme/blocks/ShadowBlocks.tsx","../src/utils/Theme/blocks/ComponentBlocks.tsx","../src/utils/Theme/blocks/IconBlocks.tsx","../src/utils/CloneElement.tsx","../src/utils/useUserSelect.ts","../src/utils/useCursor.ts","../src/utils/stringToColor.ts","../src/utils/slots.ts","../src/utils/isPromiseLike.ts"],"sourcesContent":["import { MutableRefObject, RefObject, useEffect } from 'react';\n\ninterface ExitListenerOptions {\n  /**\n   * A ref object pointing to the target element that the hook should\n   * observe for click outside and escape key events.\n   */\n  ref: RefObject<HTMLElement | null> | MutableRefObject<HTMLElement>;\n\n  /**\n   * An optional boolean to enable or disable the event listeners.\n   * When set to true (default), the event listeners are active.\n   * @default true\n   */\n  open?: boolean;\n\n  /**\n   * An optional callback function that is called when a click\n   * event occurs outside the target element.\n   */\n  onClickOutside?: (event: MouseEvent) => void;\n\n  /**\n   * An optional callback function that is called\n   * when the 'Escape' key is pressed.\n   */\n  onEscape?: (event: KeyboardEvent) => void;\n}\n\n/**\n * Hook to listen for click outside and escape key events.\n */\nexport const useExitListener = ({\n  ref,\n  open = true,\n  onClickOutside,\n  onEscape\n}: ExitListenerOptions) => {\n  useEffect(() => {\n    if (!open) {\n      return;\n    }\n\n    const handleClick = (event: MouseEvent | TouchEvent) => {\n      if (ref.current && !ref.current.contains(event.target as Node)) {\n        onClickOutside?.(event as MouseEvent);\n      }\n    };\n\n    const handleKey = (event: KeyboardEvent) => {\n      if (event.code === 'Escape') {\n        onEscape?.(event);\n      }\n    };\n\n    if (onClickOutside) {\n      document.addEventListener('mousedown', handleClick);\n      document.addEventListener('touchstart', handleClick);\n    }\n\n    if (onEscape) {\n      document.addEventListener('keydown', handleKey);\n    }\n\n    return () => {\n      if (onClickOutside) {\n        document.removeEventListener('mousedown', handleClick);\n        document.removeEventListener('touchstart', handleClick);\n      }\n\n      if (onEscape) {\n        document.removeEventListener('keydown', handleKey);\n      }\n    };\n  }, [ref, onClickOutside, onEscape, open]);\n};\n","import { createContext } from 'react';\n\nexport interface OverlayContextValue {\n  /**\n   * Closes current overlay.\n   */\n  close(): void;\n}\n\nexport const OverlayContext = createContext<OverlayContextValue>({\n  close: () => undefined\n});\n","import { useState } from 'react';\n\nlet id = 0;\nconst genId = () => `ref-${++id}`;\n\n/**\n * Auto-generate a id.\n * Inspired by: https://github.com/reach/reach-ui/blob/master/packages/auto-id/src/index.ts\n */\nexport const useId = (idFromProps?: string | null) => {\n  const [id] = useState(idFromProps || genId());\n  return `${id}`;\n};\n","import { useLayoutEffect, useRef } from 'react';\n\n/**\n * Hook to run a function when the component unmounts.\n *\n * @param fn The function to run when the component unmounts.\n */\nexport const useUnmount = fn => {\n  const fnRef = useRef(fn);\n  fnRef.current = fn;\n  useLayoutEffect(() => () => fnRef.current(), []);\n};\n","import React, { CSSProperties } from 'react';\nimport {\n  useImperativeHandle,\n  forwardRef,\n  FC,\n  PropsWithChildren,\n  useLayoutEffect,\n  useRef,\n  useEffect,\n  LegacyRef\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUnmount } from '@/utils/useUnmount';\n\nexport interface PortalProps extends PropsWithChildren {\n  /**\n   * Element to create for the portal.\n   * @default 'div'\n   */\n  element?: string;\n\n  /**\n   * Class name to apply to the portal element.\n   */\n  className?: string;\n\n  /**\n   * Style to apply to the portal element.\n   */\n  style?: CSSProperties;\n\n  /**\n   * Callback for portal mounts.\n   */\n  onMount?: () => void;\n\n  /**\n   * Callback for portal unmounts.\n   */\n  onUnmount?: () => void;\n}\n\nexport interface PortalRef {\n  /**\n   * Reference to the portal element.\n   */\n  ref?: LegacyRef<HTMLElement>;\n}\n\nexport const Portal: FC<PortalProps & PortalRef> = forwardRef<\n  HTMLElement,\n  PortalProps\n>(\n  (\n    { children, className, style, element = 'div', onMount, onUnmount },\n    ref\n  ) => {\n    const elementRef = useRef<HTMLElement | null>(null);\n    const mounted = useRef<boolean>(false);\n\n    useEffect(() => {\n      if (className && elementRef.current) {\n        elementRef.current.setAttribute('class', `${className} rdk-portal`);\n      }\n      if (style && elementRef.current) {\n        Object.keys(style)?.forEach((key: string) =>\n          elementRef.current.style?.setProperty(key, style[key])\n        );\n      }\n      // eslint-disable-next-line react-hooks/exhaustive-deps\n    }, [className, style, elementRef.current]);\n\n    useLayoutEffect(() => {\n      // Create ref to created element once, on mount\n      elementRef.current = document.createElement(element);\n      onMount?.();\n    }, []);\n\n    useUnmount(() => {\n      onUnmount?.();\n      const ref = elementRef.current;\n      if (ref && document.body.contains(ref)) {\n        document.body.removeChild(ref);\n      }\n    });\n\n    useImperativeHandle(ref, () => elementRef.current!);\n\n    if (!elementRef.current) {\n      return null;\n    }\n\n    if (!mounted.current) {\n      mounted.current = true;\n      elementRef.current.classList.add('rdk-portal');\n      document.body.appendChild(elementRef.current);\n    }\n\n    return createPortal(children, elementRef.current) as React.JSX.Element;\n  }\n);\n","import React, {\n  CSSProperties,\n  FC,\n  forwardRef,\n  LegacyRef,\n  useImperativeHandle,\n  useRef,\n  useState\n} from 'react';\nimport { useId } from '@/utils/useId';\nimport { Portal } from '@/utils/Portal';\n\n// NOTE: This should not be used by external consumers.\nexport const portals: string[] = [];\n\nconst START_INDEX = 990;\n\nexport interface OverlayPortalRef {\n  /**\n   * Reference to the overlay portal element.\n   */\n  ref?: LegacyRef<HTMLElement>;\n}\n\n/**\n * Represents an event that occurs when an overlay portal is mounted.\n */\nexport interface OverlayPortalMountEvent {\n  /**\n   * The index of the overlay.\n   */\n  overlayIndex: number;\n\n  /**\n   * The index of the portal.\n   */\n  portalIndex: number;\n\n  /**\n   * The ID of the portal.\n   */\n  portalId: string;\n\n  /**\n   * The index of the backdrop.\n   */\n  backdropIndex: number;\n}\n\nexport interface OverlayPortalProps {\n  /**\n   * If true, the overlay portal will be appended to the body.\n   * @default true\n   */\n  appendToBody?: boolean;\n\n  /**\n   * The class name of the overlay portal.\n   */\n  className?: string;\n\n  /**\n   * The style of the overlay portal.\n   */\n  style?: CSSProperties;\n\n  /**\n   * The id of the overlay portal.\n   */\n  id?: string;\n\n  /**\n   * A function that returns the children of the overlay portal. It receives an object of type OverlayPortalMountEvent as an argument.\n   */\n  children: (props: OverlayPortalMountEvent) => any;\n\n  /**\n   * A function that is called when the overlay portal mounts. It receives an object of type OverlayPortalMountEvent as an argument.\n   */\n  onMount?: (event: OverlayPortalMountEvent) => void;\n\n  /**\n   * A function that is called when the overlay portal unmounts.\n   */\n  onUnmount?: () => void;\n}\n\nexport const OverlayPortal: FC<OverlayPortalProps & OverlayPortalRef> =\n  forwardRef(\n    (\n      {\n        className,\n        children,\n        onMount,\n        onUnmount,\n        appendToBody = true,\n        id,\n        style\n      },\n      ref\n    ) => {\n      let portalId = useId(id);\n\n      const [portalIndex, setPortalIndex] = useState<number | null>(null);\n      const [overlayIndex, setOverlayIndex] = useState<number | null>(null);\n      const portalRef = useRef<any | null>(null);\n\n      useImperativeHandle(ref, () => portalRef.current);\n\n      return (\n        <Portal\n          className={className}\n          ref={portalRef}\n          style={style}\n          onMount={() => {\n            portals.push(portalId);\n\n            let pidx = portals.indexOf(portalId);\n            setPortalIndex(pidx);\n\n            const overlayIdx = START_INDEX + pidx * 2 + 1;\n            setOverlayIndex(overlayIdx);\n\n            onMount?.({\n              portalId,\n              overlayIndex: overlayIdx,\n              portalIndex: pidx,\n              backdropIndex: overlayIdx\n            });\n          }}\n          onUnmount={() => {\n            onUnmount?.();\n            portals.splice(portals.indexOf(portalId), 1);\n            setPortalIndex(null);\n            setOverlayIndex(null);\n          }}\n        >\n          {children({\n            overlayIndex: overlayIndex as number,\n            portalIndex: portalIndex as number,\n            backdropIndex: overlayIndex as number,\n            portalId\n          })}\n        </Portal>\n      );\n    }\n  );\n","import React, { FC, MouseEvent } from 'react';\nimport { motion } from 'motion/react';\nimport { cn, useComponentTheme } from '@/utils';\n\nimport { BackdropTheme } from './BackdropTheme';\n\nexport interface BackdropProps {\n  /**\n   * The z-index of the backdrop.\n   * @default 998\n   */\n  zIndex?: number;\n\n  /**\n   * The index of the portal.\n   * @default 0\n   */\n  portalIndex?: number;\n\n  /**\n   * Additional class names to apply to the backdrop.\n   */\n  className?: string;\n\n  /**\n   * Theme for the Backdrop.\n   */\n  theme?: BackdropTheme;\n\n  /**\n   * Callback for when the backdrop is clicked.\n   */\n  onClick?: (event: MouseEvent) => void;\n}\n\nexport const Backdrop: FC<BackdropProps> = ({\n  zIndex = 998,\n  portalIndex = 0,\n  className,\n  theme: customTheme,\n  onClick\n}) => {\n  const theme = useComponentTheme<BackdropTheme>('backdrop', customTheme);\n\n  return (\n    <motion.div\n      className={cn(theme.base, className)}\n      initial={{ opacity: 0 }}\n      animate={{ opacity: theme.opacity - (portalIndex as number) / 10 }}\n      exit={{ opacity: 0 }}\n      style={{ zIndex }}\n      onClick={onClick}\n    />\n  );\n};\n","export interface BackdropTheme {\n  /** CSS class applied to the backdrop element. */\n  base: string;\n  /** Opacity value applied to the backdrop. */\n  opacity: number;\n}\n\nexport const backdropTheme: BackdropTheme = {\n  base: 'fixed top-0 left-0 w-full h-full opacity-0 select-none bg-black',\n  opacity: 0.8\n};\n","import React, { FC, Fragment, useCallback, useEffect, useRef } from 'react';\nimport {\n  disableBodyScroll,\n  clearAllBodyScrollLocks\n} from 'body-scroll-lock-upgrade';\nimport { OverlayContext } from '@/utils/Overlay/OverlayContext';\nimport { AnimatePresence } from 'motion/react';\nimport { OverlayPortal } from '@/utils/Overlay/OverlayPortal';\nimport { useExitListener } from '@/utils/ExitListener';\nimport { Backdrop } from '@/layers/Backdrop';\n\nexport interface GlobalOverlayProps {\n  /**\n   * The children to be rendered within the global overlay.\n   */\n  children?: any;\n\n  /**\n   * If true, the global overlay is open.\n   */\n  open: boolean;\n\n  /**\n   * If true, the global overlay will close when the backdrop is clicked.\n   * @default true\n   */\n  closeOnBackdropClick?: boolean;\n\n  /**\n   * If true, the global overlay will have a backdrop.\n   * @default true\n   */\n  hasBackdrop?: boolean;\n\n  /**\n   * The CSS class name to be applied to the backdrop of the global overlay.\n   */\n  backdropClassName?: string;\n\n  /**\n   * If true, the global overlay will close when the escape key is pressed.\n   * @default true\n   */\n  closeOnEscape?: boolean;\n\n  /**\n   * A function that is called when the global overlay is closed.\n   */\n  onClose?: () => void;\n}\n\nexport const GlobalOverlay: FC<GlobalOverlayProps> = ({\n  open,\n  hasBackdrop = true,\n  closeOnEscape = true,\n  closeOnBackdropClick = true,\n  backdropClassName,\n  children,\n  onClose\n}) => {\n  const overlayRef = useRef<any | null>(null);\n\n  const onBackdropClick = useCallback(() => {\n    if (closeOnBackdropClick) {\n      onClose?.();\n    }\n  }, [closeOnBackdropClick, onClose]);\n\n  useExitListener({\n    ref: overlayRef,\n    open,\n    onEscape: () => closeOnEscape && onClose?.()\n  });\n\n  useEffect(() => {\n    if (open && overlayRef.current !== undefined) {\n      disableBodyScroll(overlayRef.current, {\n        // allowTouchMove determines which elements to allow touchmove events for iOS\n        // Reference: https://github.com/rick-liruixin/body-scroll-lock-upgrade?tab=readme-ov-file#allowtouchmove\n        // NOTE: allowTouchMove is typed wrong: https://github.com/rick-liruixin/body-scroll-lock-upgrade/issues/21\n        allowTouchMove: (el: HTMLElement) => {\n          while (el && el !== document.body) {\n            if (el.getAttribute('body-scroll-lock-ignore') !== null) {\n              return true;\n            }\n            if (el.parentElement !== null) {\n              el = el.parentElement;\n            }\n          }\n          return false;\n        }\n      });\n    } else {\n      clearAllBodyScrollLocks();\n    }\n\n    return () => {\n      clearAllBodyScrollLocks();\n    };\n  }, [children, open]);\n\n  return (\n    <OverlayContext.Provider value={{ close: () => onClose?.() }}>\n      <AnimatePresence>\n        {open && (\n          <OverlayPortal ref={overlayRef}>\n            {({ overlayIndex, portalIndex }) => (\n              <Fragment>\n                {hasBackdrop && (\n                  <Backdrop\n                    zIndex={overlayIndex as number}\n                    portalIndex={portalIndex as number}\n                    onClick={onBackdropClick}\n                    className={backdropClassName}\n                  />\n                )}\n                <div body-scroll-lock-ignore=\"true\">\n                  {children({ overlayIndex, portalIndex })}\n                </div>\n              </Fragment>\n            )}\n          </OverlayPortal>\n        )}\n      </AnimatePresence>\n    </OverlayContext.Provider>\n  );\n};\n","import React, { useCallback, forwardRef, FC, LegacyRef } from 'react';\n\nexport type TriggerTypes = 'hover' | 'click' | 'contextmenu' | 'focus' | 'key';\n\nexport interface OverlayTriggerEvent {\n  /**\n   * The type of event that triggered the overlay.\n   */\n  type: TriggerTypes;\n\n  /**\n   * The native event that triggered the overlay.\n   */\n  nativeEvent: any;\n}\n\nexport interface OverlayTriggerProps {\n  /**\n   * The children to be rendered within the overlay trigger.\n   */\n  children?: any;\n\n  /**\n   * The CSS class name to be applied to the overlay trigger.\n   */\n  className?: string;\n\n  /**\n   * The type of element that will be used as the overlay trigger.\n   * @default 'span'\n   */\n  elementType?: any;\n\n  /**\n   * The type(s) of event(s) that will trigger the overlay.\n   * Can be a single trigger type or an array of trigger types.\n   */\n  trigger: TriggerTypes | TriggerTypes[];\n\n  /**\n   * A function that is called when the overlay is opened.\n   * It receives an object of type OverlayTriggerEvent as an argument.\n   * @default () => undefined\n   */\n  onOpen?: (event: OverlayTriggerEvent) => void;\n\n  /**\n   * A function that is called when the overlay is closed.\n   * It receives an object of type OverlayTriggerEvent as an argument.\n   * @default () => undefined\n   */\n  onClose?: (event: OverlayTriggerEvent) => void;\n}\n\nexport const OverlayTrigger: FC<\n  OverlayTriggerProps & {\n    ref: LegacyRef<HTMLSpanElement>;\n  }\n> = forwardRef(\n  (\n    {\n      children,\n      className,\n      elementType = 'span',\n      trigger = ['click'],\n      onOpen = () => undefined,\n      onClose = () => undefined\n    },\n    ref\n  ) => {\n    const hasTrigger = useCallback(\n      (type: TriggerTypes) => {\n        if (Array.isArray(trigger)) {\n          return trigger.includes(type);\n        } else {\n          return type === trigger;\n        }\n      },\n      [trigger]\n    );\n\n    const onFocus = useCallback(\n      event => {\n        if (hasTrigger('focus')) {\n          onOpen({ type: 'focus', nativeEvent: event });\n        }\n      },\n      [onOpen, hasTrigger]\n    );\n\n    const onBlur = useCallback(\n      event => {\n        if (hasTrigger('focus')) {\n          onClose({ type: 'focus', nativeEvent: event });\n        }\n      },\n      [onClose, hasTrigger]\n    );\n\n    const onMouseEnter = useCallback(\n      event => {\n        if (hasTrigger('hover')) {\n          onOpen({ type: 'hover', nativeEvent: event });\n        }\n      },\n      [onOpen, hasTrigger]\n    );\n\n    const onMouseLeave = useCallback(\n      event => {\n        if (hasTrigger('hover')) {\n          onClose({ type: 'hover', nativeEvent: event });\n        }\n      },\n      [onClose, hasTrigger]\n    );\n\n    const onClick = useCallback(\n      event => {\n        if (hasTrigger('click')) {\n          onOpen({ type: 'click', nativeEvent: event });\n        }\n\n        // Kill the tooltip on click if its not a click listener\n        if (!hasTrigger('click')) {\n          onClose({ type: 'hover', nativeEvent: event });\n        }\n      },\n      [onOpen, onClose, hasTrigger]\n    );\n\n    const onContextMenu = useCallback(\n      event => {\n        if (hasTrigger('contextmenu')) {\n          event.preventDefault();\n          onOpen({ type: 'contextmenu', nativeEvent: event });\n        }\n      },\n      [hasTrigger, onOpen]\n    );\n\n    const tabIndex = hasTrigger('focus') ? -1 : undefined;\n    const Component = elementType;\n\n    return (\n      <Component\n        ref={ref}\n        tabIndex={tabIndex}\n        onMouseEnter={onMouseEnter}\n        onMouseLeave={onMouseLeave}\n        onFocus={onFocus}\n        onBlur={onBlur}\n        onClick={onClick}\n        onContextMenu={onContextMenu}\n        className={className}\n      >\n        {children}\n      </Component>\n    );\n  }\n);\n","import {\n  useLayoutEffect,\n  RefObject,\n  useCallback,\n  useEffect,\n  useMemo\n} from 'react';\nimport {\n  useFloating,\n  Placement as FloatingUIPlacement,\n  Middleware,\n  flip,\n  limitShift,\n  shift,\n  autoUpdate\n} from '@floating-ui/react';\n\nexport type Placement = FloatingUIPlacement;\nexport type Modifiers = Middleware[];\n\nexport type ReferenceProp =\n  | ReferenceObject\n  | HTMLElement\n  | RefObject<HTMLElement>;\n\nexport interface ReferenceObject {\n  /** The top offset of the reference, in pixels. */\n  top: number;\n  /** The left offset of the reference, in pixels. */\n  left: number;\n  /** The height of the reference, in pixels. */\n  height: number;\n  /** The width of the reference, in pixels. */\n  width: number;\n}\n\nexport interface PositionOptions {\n  /**\n   * Element or virtual reference object to position against.\n   */\n  reference?: Element | ReferenceObject;\n  /**\n   * The floating element being positioned relative to the reference.\n   */\n  floating?: HTMLElement;\n  /**\n   * Preferred placement of the floating element relative to the reference.\n   * @default 'top'\n   */\n  placement?: Placement;\n  /**\n   * Floating UI middleware applied when computing the position.\n   * @default [flip(), shift({ limiter: limitShift() })]\n   */\n  modifiers?: Modifiers;\n  /**\n   * Track the cursor position as the reference instead of an element.\n   */\n  followCursor?: boolean;\n}\n/**\n * Hook for positioning an element relative to another.\n */\nexport const usePosition = ({\n  reference,\n  floating,\n  followCursor,\n  placement = 'top',\n  modifiers = [flip(), shift({ limiter: limitShift() })]\n}: PositionOptions = {}) => {\n  const isVirtualElement = useMemo(\n    () => !(reference as Element)?.nodeType,\n    [reference]\n  );\n\n  const { refs, floatingStyles, update } = useFloating({\n    open: true,\n    placement,\n    middleware: modifiers,\n    elements: {\n      reference: isVirtualElement ? null : (reference as Element),\n      floating: floating\n    },\n    whileElementsMounted: autoUpdate\n  });\n\n  useEffect(() => {\n    if (isVirtualElement && reference && !followCursor) {\n      const refObject = reference as ReferenceObject;\n      refs.setPositionReference({\n        getBoundingClientRect() {\n          return {\n            width: refObject.width,\n            height: refObject.height,\n            x: refObject.left,\n            y: refObject.top,\n            left: refObject.left,\n            top: refObject.top,\n            right: refObject.left + refObject.width,\n            bottom: refObject.top + refObject.height\n          };\n        }\n      });\n    }\n  }, [reference, refs, isVirtualElement, followCursor]);\n\n  const onMouseMove = useCallback(\n    ({ clientX, clientY }: MouseEvent) => {\n      // Virtual reference object for cursor position.\n      refs.setPositionReference({\n        getBoundingClientRect() {\n          return {\n            width: 0,\n            height: 0,\n            x: clientX,\n            y: clientY,\n            left: clientX,\n            top: clientY,\n            right: clientX,\n            bottom: clientY\n          };\n        }\n      });\n    },\n    [refs]\n  );\n\n  useLayoutEffect(() => {\n    if (followCursor) {\n      window.addEventListener('mousemove', onMouseMove);\n    }\n\n    return () => {\n      window.removeEventListener('mousemove', onMouseMove);\n    };\n  }, [followCursor, onMouseMove]);\n\n  return {\n    refs,\n    anchorRef: refs.reference,\n    floatingRef: refs.floating,\n    floatingStyles,\n    update\n  };\n};\n","import React, {\n  FC,\n  forwardRef,\n  useImperativeHandle,\n  RefObject,\n  useState,\n  useCallback,\n  LegacyRef\n} from 'react';\nimport { useExitListener } from '@/utils/ExitListener';\nimport { Modifiers, Placement, usePosition } from '@/utils/Position';\nimport { OverlayPortal, portals } from '@/utils/Overlay/OverlayPortal';\nimport { useId } from '@/utils/useId';\n\nexport interface ConnectedOverlayContentRef {\n  /** Recalculates and updates the overlay's position. */\n  updatePosition: () => void;\n}\n\nexport interface ConnectedOverlayContentProps {\n  /**\n   * Modifiers to adjust the behavior of the overlay content.\n   */\n  modifiers?: Modifiers;\n\n  /**\n   * If true, the overlay content will follow the cursor.\n   */\n  followCursor?: boolean;\n\n  /**\n   * The CSS class name to be applied to the portal of the overlay content.\n   */\n  portalClassName?: string;\n\n  /**\n   * The placement of the overlay content relative to the trigger.\n   * @default 'bottom'\n   */\n  placement?: Placement;\n\n  /**\n   * A reference to the trigger element.\n   */\n  triggerRef: any;\n\n  /**\n   * The children to be rendered within the overlay content.\n   */\n  children: any;\n\n  /**\n   * If true, the overlay content will close when a click is detected on the body.\n   * @default true\n   */\n  closeOnBodyClick?: boolean;\n\n  /**\n   * If true, the overlay content will close when the escape key is pressed.\n   * @default true\n   */\n  closeOnEscape?: boolean;\n\n  /**\n   * The type of element that will be used as the overlay content.\n   */\n  elementType?: any;\n\n  /**\n   * If true, the overlay content will be appended to the body.\n   * @default true\n   */\n  appendToBody?: boolean;\n\n  /**\n   * A function that is called when the overlay content is closed. It receives an optional event object as an argument.\n   */\n  onClose?: (event?: any) => void;\n}\n\nexport const ConnectedOverlayContent: FC<\n  ConnectedOverlayContentProps & {\n    ref?: LegacyRef<ConnectedOverlayContentRef>;\n  }\n> = forwardRef(\n  (\n    {\n      triggerRef,\n      children,\n      portalClassName,\n      closeOnBodyClick = true,\n      closeOnEscape = true,\n      elementType,\n      appendToBody = true,\n      followCursor,\n      modifiers,\n      placement = 'bottom',\n      onClose\n    },\n    ref\n  ) => {\n    const id = useId();\n    const [overlayIndex, setOverlayIndex] = useState<number | null>(null);\n    const { refs, floatingStyles, update } = usePosition({\n      reference: triggerRef.current ?? triggerRef,\n      followCursor,\n      modifiers,\n      placement\n    });\n\n    useImperativeHandle(ref, () => ({\n      updatePosition: () => {\n        update();\n      }\n    }));\n\n    const onClickOutside = useCallback(\n      (event: any) => {\n        if (closeOnBodyClick) {\n          // don't fire if i click the clicker\n          let ref: HTMLElement | null = null;\n          if ((triggerRef as RefObject<HTMLElement>).current) {\n            ref = (triggerRef as RefObject<HTMLElement>).current as HTMLElement;\n          } else if ((triggerRef as HTMLElement).contains !== undefined) {\n            ref = triggerRef as HTMLElement;\n          }\n\n          // Handle parent click containers\n          const container = event.target.closest('.rdk-portal');\n\n          // Only close the last one\n          const isLast = portals.indexOf(id) === portals.length - 1;\n\n          if (!ref?.contains(event.target) && (isLast || !container)) {\n            onClose?.(event);\n          }\n        }\n      },\n      // eslint-disable-next-line react-hooks/exhaustive-deps\n      [closeOnBodyClick, onClose]\n    );\n\n    const onEscape = useCallback(() => {\n      if (closeOnEscape) {\n        onClose?.();\n      }\n    }, [closeOnEscape, onClose]);\n\n    useExitListener({\n      open: true,\n      ref: refs.floating,\n      onClickOutside,\n      onEscape\n    });\n\n    return (\n      <OverlayPortal\n        id={id}\n        ref={refs.setFloating}\n        style={{ ...floatingStyles, zIndex: overlayIndex }}\n        className={portalClassName}\n        appendToBody={appendToBody}\n        onMount={event => setOverlayIndex(event.overlayIndex)}\n        onUnmount={() => setOverlayIndex(null)}\n      >\n        {children}\n      </OverlayPortal>\n    );\n  }\n);\n","import React, {\n  FC,\n  useRef,\n  useEffect,\n  Fragment,\n  forwardRef,\n  LegacyRef,\n  useImperativeHandle,\n  useMemo\n} from 'react';\nimport { TriggerTypes, OverlayTrigger } from '@/utils/Overlay/OverlayTrigger';\nimport { Modifiers, Placement, ReferenceProp } from '@/utils/Position';\nimport { AnimatePresence } from 'motion/react';\nimport { OverlayContext } from '@/utils/Overlay/OverlayContext';\nimport {\n  ConnectedOverlayContent,\n  ConnectedOverlayContentRef\n} from './ConnectedOverlayContent';\n\nexport interface OverlayEvent {\n  /**\n   * Type of the event.\n   */\n  type: TriggerTypes;\n\n  /**\n   * Native event object.\n   */\n  nativeEvent: any;\n}\n\nexport interface ConnectedOverlayProps {\n  /**\n   * Whether the overlay should be visible.\n   */\n  open: boolean;\n\n  /**\n   * Reference of the overlay to align to.\n   */\n  reference?: ReferenceProp;\n\n  /**\n   * The content of the overlay.\n   */\n  children?: any;\n\n  /**\n   * Content to render in the overlay.\n   */\n  content: any;\n\n  /**\n   * Type of trigger to open the overlay.\n   * @default 'click'\n   */\n  trigger?: TriggerTypes[] | TriggerTypes;\n\n  /**\n   * Trigger element to open the overlay.\n   */\n  triggerElement?: any;\n\n  /**\n   * Trigger classname.\n   */\n  triggerClassName?: string;\n\n  /**\n   * Portal classname.\n   */\n  portalClassName?: string;\n\n  /**\n   * Close when the body is clicked or not.\n   * @default true\n   */\n  closeOnBodyClick?: boolean;\n\n  /**\n   * Close when escape is pressed or not.\n   * @default true\n   */\n  closeOnEscape?: boolean;\n\n  /**\n   * Append the overlay to the body. Almost always want this.\n   * @default true\n   */\n  appendToBody?: boolean;\n\n  /**\n   * Overlay element type.\n   */\n  elementType?: string;\n\n  /**\n   * Position modifiers.\n   */\n  modifiers?: Modifiers;\n\n  /**\n   * Overlay should follow cursor or not.\n   */\n  followCursor?: boolean;\n\n  /**\n   * Placement of the overlay.\n   * @default 'bottom'\n   */\n  placement?: Placement;\n\n  /**\n   * Event called when the overlay is opened.\n   */\n  onOpen?: (event?: any) => void;\n\n  /**\n   * Event called when the overlay is closed.\n   */\n  onClose?: (event?: any) => void;\n}\n\nexport const ConnectedOverlay: FC<\n  ConnectedOverlayProps & {\n    ref?: LegacyRef<ConnectedOverlayContentRef>;\n  }\n> = forwardRef(\n  (\n    {\n      reference,\n      children,\n      open,\n      content,\n      triggerElement,\n      triggerClassName,\n      trigger = 'click' as TriggerTypes,\n      onOpen,\n      onClose,\n      ...rest\n    },\n    ref\n  ) => {\n    const mounted = useRef<boolean>(false);\n    const overlayTriggerRef = useRef<any | null>(null);\n    const contentRef = useRef<any | null>(null);\n    const triggerRef = reference || overlayTriggerRef;\n\n    useImperativeHandle(ref, () => ({\n      updatePosition: () => {\n        contentRef.current?.updatePosition();\n      }\n    }));\n\n    useEffect(() => {\n      if (mounted.current) {\n        if (!open) {\n          onClose?.();\n        } else {\n          onOpen?.();\n        }\n      }\n    }, [open]);\n\n    useEffect(() => {\n      if (!mounted.current) {\n        mounted.current = true;\n      }\n    });\n\n    const providerValue = useMemo(\n      () => ({\n        close: () => onClose?.()\n      }),\n      [onClose]\n    );\n\n    return (\n      <OverlayContext.Provider value={providerValue}>\n        {children && (\n          <Fragment>\n            {trigger ? (\n              <OverlayTrigger\n                elementType={triggerElement}\n                ref={overlayTriggerRef}\n                className={triggerClassName}\n                trigger={trigger}\n                onOpen={onOpen}\n                onClose={onClose}\n              >\n                {children}\n              </OverlayTrigger>\n            ) : (\n              children\n            )}\n          </Fragment>\n        )}\n        <AnimatePresence>\n          {open && (\n            <ConnectedOverlayContent\n              {...rest}\n              ref={contentRef}\n              triggerRef={triggerRef}\n              onClose={onClose}\n            >\n              {content}\n            </ConnectedOverlayContent>\n          )}\n        </AnimatePresence>\n      </OverlayContext.Provider>\n    );\n  }\n);\n","import { useContext } from 'react';\nimport { OverlayContext } from './OverlayContext';\n\n/**\n * Hook for using the Overlay's context.\n */\nexport const useOverlay = () => {\n  const context = useContext(OverlayContext);\n\n  if (context === undefined) {\n    throw new Error(\n      '`useOverlay` hook can only be used inside a overlay component.'\n    );\n  }\n\n  return context;\n};\n","export interface ButtonTheme {\n  /** CSS class applied to the root button element. */\n  base: string;\n  /** CSS class applied when the button is disabled. */\n  disabled: string;\n  /** CSS class applied when the button spans the full width of its container. */\n  fullWidth: string;\n  /** CSS class applied when the button is part of a button group. */\n  group: string;\n  /** CSS class applied to text buttons within a button group. */\n  groupText: string;\n  /** Class names for the button's start and end adornment slots. */\n  adornment: {\n    base: string;\n    start: string;\n    end: string;\n    sizes: {\n      small: string;\n      medium: string;\n      large: string;\n      [key: string]: string;\n    };\n  };\n  /** Class names for each visual button variant. */\n  variants: {\n    filled: string;\n    outline: string;\n    text: string;\n    [key: string]: string;\n  };\n  /** Class names for each button color, broken down by variant. */\n  colors: {\n    default: {\n      filled: string;\n      outline: string;\n      text: string;\n      [key: string]: string;\n    };\n    primary: {\n      filled: string;\n      outline: string;\n      text: string;\n      [key: string]: string;\n    };\n    secondary: {\n      filled: string;\n      outline: string;\n      text: string;\n      [key: string]: string;\n    };\n    success: {\n      filled: string;\n      outline: string;\n      text: string;\n      [key: string]: string;\n    };\n    warning: {\n      filled: string;\n      outline: string;\n      text: string;\n      [key: string]: string;\n    };\n    error: {\n      filled: string;\n      outline: string;\n      text: string;\n      [key: string]: string;\n    };\n    [key: string]: {\n      filled: string;\n      outline: string;\n      text: string;\n      [key: string]: string;\n    };\n  };\n  /** Class names for each button size. */\n  sizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n  /** Class names for icon-only buttons at each size. */\n  iconSizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n}\n\nconst baseTheme: Partial<ButtonTheme> = {\n  base: 'inline-flex whitespace-no-wrap select-none items-center justify-center px-2.5 py-1 rounded-xs font-sans cursor-pointer',\n  disabled: 'disabled:cursor-not-allowed',\n  fullWidth: 'flex w-full',\n  group:\n    'rounded-none first:rounded-s last:rounded-e border-s-0 first:border-s',\n  groupText:\n    'border border-y-transparent border-l-transparent last:border-r-transparent hover:bg-initial',\n  adornment: {\n    base: 'flex',\n    start: 'pr-1',\n    end: 'pl-1',\n    sizes: {\n      small: '[&>svg]:w-3 [&>svg]:h-3',\n      medium: '[&>svg]:w-4 [&>svg]:h-4',\n      large: '[&>svg]:w-5 [&>svg]:h-5'\n    }\n  },\n  sizes: {\n    small: 'text-sm px-2 py-1 leading-[normal]',\n    medium: 'text-base px-4 py-2 leading-[normal]',\n    large: 'text-xl px-5 py-2.5 leading-[normal]'\n  },\n  iconSizes: {\n    small: 'px-2 py-1',\n    medium: 'px-4 py-2',\n    large: 'px-5 py-2.5'\n  }\n};\n\nexport const buttonTheme: ButtonTheme = {\n  base: [baseTheme.base, 'text-text-primary font-semibold'].join(' '),\n  disabled: [\n    baseTheme.disabled,\n    'data-[variant=filled]:disabled:bg-gray-600 disabled:text-gray-400 border-gray-500'\n  ].join(' '),\n  fullWidth: baseTheme.fullWidth,\n  group: baseTheme.group,\n  groupText: baseTheme.groupText,\n  adornment: baseTheme.adornment,\n  sizes: baseTheme.sizes,\n  iconSizes: baseTheme.iconSizes,\n  variants: {\n    filled:\n      'bg-secondary hover:bg-border-secondary-hover border-secondary light:text-gray-100',\n    outline: 'border-grey border',\n    text: 'border-0'\n  },\n  colors: {\n    default: {\n      filled: 'bg-gray-800 hover:bg-gray-700 border-gray-800',\n      outline: 'border-secondary border',\n      text: 'text-text-primary'\n    },\n    primary: {\n      filled:\n        'bg-primary hover:bg-primary-hover border-primary text-text-primary',\n      outline: 'border border-primary',\n      text: 'text-primary hover:text-primary-hover'\n    },\n    secondary: {\n      filled: 'bg-secondary hover:bg-secondary-hover text-text-primary!',\n      outline: 'border border-secondary',\n      text: 'text-secondary hover:text-secondary-hover'\n    },\n    success: {\n      filled:\n        'bg-success hover:bg-success-hover border-success text-text-primary',\n      outline: 'border border-success',\n      text: 'text-success hover:text-success-hover'\n    },\n    warning: {\n      filled:\n        'bg-warning hover:bg-warning-hover border-warning text-text-primary',\n      outline: 'border border-warning',\n      text: 'text-warning hover:text-warning-hover'\n    },\n    error: {\n      filled: 'bg-error hover:bg-error-hover border-error text-text-primary',\n      outline: 'border border-error',\n      text: 'text-error hover:text-error-hover'\n    }\n  }\n};\n","import { ReactNode, createContext } from 'react';\n\nexport interface ButtonGroupContextProps {\n  /**\n   * Style variant of the buttons.\n   */\n  variant?: 'filled' | 'outline' | 'text' | string;\n\n  /**\n   * The size variation of the buttons.\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n}\n\nexport const ButtonGroupContext = createContext<ButtonGroupContextProps>({\n  variant: null,\n  size: null\n});\n","import React, { FC, forwardRef, LegacyRef, useContext } from 'react';\nimport { motion } from 'motion/react';\nimport { ButtonGroupContext } from './ButtonGroupContext';\nimport { cn, useComponentTheme } from '@/utils';\nimport { ButtonTheme } from './ButtonTheme';\n\nexport interface ButtonProps extends Omit<\n  React.ButtonHTMLAttributes<HTMLButtonElement>,\n  'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'\n> {\n  /**\n   * Color variation of the button.\n   * @default 'default'\n   */\n  color?:\n    | 'default'\n    | 'primary'\n    | 'secondary'\n    | 'error'\n    | 'success'\n    | 'warning'\n    | string;\n\n  /**\n   * Style variant of the button.\n   * @default 'filled'\n   */\n  variant?: 'filled' | 'outline' | 'text' | string;\n\n  /**\n   * The size variation of the button.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * If true, the button will take up the full width of its container.\n   */\n  fullWidth?: boolean;\n\n  /**\n   * If true, the margins of the button will be disabled.\n   */\n  disableMargins?: boolean;\n\n  /**\n   * If true, the padding of the button will be disabled.\n   */\n  disablePadding?: boolean;\n\n  /**\n   * If true, the animation of the button will be disabled.\n   */\n  disableAnimation?: boolean;\n\n  /**\n   * Element to display before the Button content.\n   */\n  start?: React.ReactNode;\n\n  /**\n   * Element to display after the Button content.\n   */\n  end?: React.ReactNode;\n\n  /**\n   * Theme for the Button.\n   */\n  theme?: ButtonTheme;\n}\n\nexport interface ButtonRef {\n  /**\n   * The ref to the button element.\n   */\n  ref?: LegacyRef<HTMLButtonElement>;\n}\n\nexport const Button: FC<ButtonProps & ButtonRef> = forwardRef(\n  (\n    {\n      color = 'default',\n      variant = 'filled',\n      children,\n      fullWidth,\n      size = 'medium',\n      disableAnimation,\n      className,\n      disableMargins,\n      disablePadding,\n      disabled,\n      start,\n      end,\n      theme: customTheme,\n      type = 'button',\n      ...rest\n    }: ButtonProps,\n    ref\n  ) => {\n    const theme = useComponentTheme('button', customTheme);\n\n    const { variant: groupVariant, size: groupSize } =\n      useContext(ButtonGroupContext);\n\n    const isGroup = !!groupVariant && !!groupSize;\n\n    return (\n      <motion.button\n        {...rest}\n        type={type}\n        disabled={disabled}\n        ref={ref}\n        whileTap={{ scale: disabled || disableAnimation ? 1 : 0.9 }}\n        data-variant={groupVariant || variant}\n        className={cn(\n          theme.base,\n          theme.disabled,\n          fullWidth && theme.fullWidth,\n          theme.variants[groupVariant || variant],\n          theme.colors[color][groupVariant || variant],\n          theme.sizes[groupSize || size],\n          isGroup && theme.group,\n          isGroup && groupVariant === 'text' && theme.groupText,\n          disableMargins && 'm-0',\n          disablePadding && 'p-0',\n          className\n        )}\n      >\n        {start && (\n          <div\n            className={cn(\n              theme.adornment.base,\n              theme.adornment.start,\n              theme.adornment.sizes[size]\n            )}\n          >\n            {start}\n          </div>\n        )}\n        {children}\n        {end && (\n          <div\n            className={cn(\n              theme.adornment.base,\n              theme.adornment.end,\n              theme.adornment.sizes[size]\n            )}\n          >\n            {end}\n          </div>\n        )}\n      </motion.button>\n    );\n  }\n);\n","import React, { FC, useMemo } from 'react';\nimport {\n  ButtonGroupContext,\n  ButtonGroupContextProps\n} from './ButtonGroupContext';\n\nexport interface ButtonGroupProps extends ButtonGroupContextProps {\n  /**\n   * The Buttons to display in the group.\n   */\n  children: any;\n\n  /**\n   * Additional CSS classes to apply to the Button group\n   */\n  className?: string;\n}\n\nexport const ButtonGroup: FC<ButtonGroupProps> = ({\n  children,\n  className,\n  variant,\n  size\n}) => {\n  const values: ButtonGroupContextProps = useMemo(\n    () => ({\n      variant: variant || 'filled',\n      size: size || 'medium'\n    }),\n    [size, variant]\n  );\n\n  return (\n    <ButtonGroupContext.Provider value={values}>\n      <div className={className}>{children}</div>\n    </ButtonGroupContext.Provider>\n  );\n};\n","import React, { FC, forwardRef, LegacyRef, ReactElement } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { ChipTheme } from './ChipTheme';\n\nexport interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {\n  /**\n   * Color variant for the chip.\n   * @default 'default'\n   */\n  color?:\n    | 'default'\n    | 'primary'\n    | 'secondary'\n    | 'error'\n    | 'success'\n    | 'warning'\n    | 'info'\n    | string;\n\n  /**\n   * Size variant for the chip.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Style variant for the chip.\n   * @default 'filled'\n   */\n  variant?: 'filled' | 'outline' | string;\n\n  /**\n   * Whether the chip is selected.\n   */\n  selected?: boolean;\n\n  /**\n   * Whether the chip is disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * Whether to disable the margins.\n   */\n  disableMargins?: boolean;\n\n  /**\n   * Content to display before the chip label.\n   */\n  start?: ReactElement | string;\n\n  /**\n   * Content to display after the chip label.\n   */\n  end?: ReactElement | string;\n\n  /**\n   * Theme for the Chip.\n   */\n  theme?: ChipTheme;\n}\n\nexport interface ChipRef {\n  /**\n   * Reference to the root element.\n   */\n  ref?: LegacyRef<HTMLDivElement>;\n}\n\nexport const Chip: FC<ChipProps & ChipRef> = forwardRef(\n  (\n    {\n      children,\n      color = 'default',\n      variant = 'filled',\n      size = 'medium',\n      selected,\n      disabled,\n      className,\n      disableMargins,\n      start,\n      end,\n      onClick,\n      theme: customTheme,\n      ...rest\n    },\n    ref\n  ) => {\n    const theme = useComponentTheme('chip', customTheme);\n\n    return (\n      <div\n        {...rest}\n        ref={ref}\n        tabIndex={onClick ? 0 : -1}\n        role={onClick ? 'button' : undefined}\n        onClick={!disabled ? onClick : undefined}\n        onKeyDown={\n          onClick && !disabled\n            ? e => {\n                if (e.key === 'Enter' || e.key === ' ') {\n                  e.preventDefault();\n                  onClick(e as unknown as React.MouseEvent<HTMLDivElement>);\n                }\n              }\n            : undefined\n        }\n        className={cn(\n          theme.base,\n          theme.variants[variant],\n          theme.colors[color]?.base,\n          theme.colors[color]?.variants?.[variant],\n          theme.sizes[size],\n          theme.focus,\n          !!onClick && !disabled && theme.colors[color]?.selectable?.base,\n          !!onClick &&\n            !disabled &&\n            theme.colors[color]?.selectable?.variants?.[variant]?.base,\n          selected &&\n            theme.colors[color]?.selectable?.variants?.[variant]?.selected,\n          disableMargins && 'm-0',\n          'transition-colors duration-300 ease [&>svg]:transition-[fill] [&>svg]:will-change-[fill]',\n          className,\n          disabled && theme.disabled\n        )}\n        aria-disabled={disabled}\n      >\n        {start && (\n          <div\n            className={cn(\n              theme.adornment.base,\n              theme.adornment.start,\n              theme.adornment.sizes[size]\n            )}\n          >\n            {start}\n          </div>\n        )}\n        <div className={theme.label}>{children}</div>\n        {end && (\n          <div\n            className={cn(\n              theme.adornment.base,\n              theme.adornment.end,\n              theme.adornment.sizes[size]\n            )}\n          >\n            {end}\n          </div>\n        )}\n      </div>\n    );\n  }\n);\n","import {\n  addDays,\n  format,\n  getDay,\n  getDaysInMonth,\n  getDate,\n  getISODay,\n  isAfter,\n  isBefore,\n  isValid,\n  isSameDay,\n  isSameMonth,\n  startOfMonth,\n  min,\n  max,\n  subDays,\n  isWithinInterval,\n  endOfDay,\n  startOfDay,\n  getHours,\n  getMinutes,\n  getSeconds,\n  setMinutes,\n  setHours,\n  setSeconds,\n  differenceInSeconds,\n  differenceInMinutes\n} from 'date-fns';\n\n/**\n * Get the month names for a given locale and format.\n *\n * Reference: https://www.abeautifulsite.net/posts/getting-localized-month-and-day-names-in-the-browser/\n */\nexport function getMonthNames(\n  locale?: string,\n  format: 'long' | 'numeric' | '2-digit' | 'short' | 'narrow' = 'short'\n) {\n  if (!locale && typeof window !== 'undefined') {\n    locale = navigator.language;\n  }\n\n  const formatter = new Intl.DateTimeFormat(locale, {\n    month: format,\n    timeZone: 'UTC'\n  });\n\n  const months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(month => {\n    const mm = month < 10 ? `0${month}` : month;\n    return new Date(`2017-${mm}-01T00:00:00+00:00`);\n  });\n\n  return months.map(date => formatter.format(date));\n}\n\nexport const monthNames = getMonthNames();\n\nexport function getDayLabels(locale?: string) {\n  return Array.from({ length: 7 }, (_, i) => {\n    if (!locale && typeof window !== 'undefined') {\n      locale = navigator.language;\n    }\n\n    return new Intl.DateTimeFormat(locale, {\n      weekday: 'short'\n    }).format(new Date(1970, 0, 4 + i)); // 1970/01/04 is a Sunday\n  });\n}\n\nexport const daysOfWeek = getDayLabels();\n\nexport interface Day {\n  /** The full Date object for the day. */\n  date: Date;\n  /** The numeric day of the month (1-31). */\n  dayOfMonth: number;\n  /** Whether the day falls on a weekend (Saturday or Sunday). */\n  isWeekendDay: boolean;\n  /** Whether the day belongs to the previous month. */\n  isPreviousMonth: boolean;\n  /** Whether the day belongs to the next month. */\n  isNextMonth: boolean;\n  /** Whether the day is today. */\n  isToday: boolean;\n  /** The day formatted as a string using the configured format. */\n  formattedDate: string;\n}\n\nexport interface DayOptions {\n  /** Date format string used to format the day. */\n  format: string;\n}\n\nexport function getWeeks(\n  date: Date,\n  options: DayOptions = { format: 'MM/dd/yyyy' }\n): Day[][] {\n  if (!date) {\n    throw new Error('A date is required');\n  } else if (!isValid(date)) {\n    console.warn('Invalid date - setting to today', date);\n    date = new Date();\n  }\n\n  const daysInMonth = getDaysInMonth(date);\n  let day = startOfMonth(date);\n  let offset = getDay(day);\n  const numOfWeeks = Math.ceil((daysInMonth + offset) / 7);\n\n  // @ts-ignore\n  const weeks: Day[][] = Array.apply(null, {\n    length: numOfWeeks\n  }).map(() => []);\n\n  const current = new Date();\n\n  const [firstWeek] = weeks;\n  for (let i = offset; i > 0; i--) {\n    const offsetDay = subDays(day, i);\n    firstWeek.push({\n      date: offsetDay,\n      dayOfMonth: getDate(offsetDay),\n      isWeekendDay: getISODay(offsetDay) > 5,\n      isPreviousMonth: true,\n      isNextMonth: false,\n      isToday: false,\n      formattedDate: format(offsetDay, options.format)\n    });\n  }\n\n  for (let i = 0, week = weeks[i]; i < numOfWeeks; i++, week = weeks[i]) {\n    for (let dayOfWeek = offset; dayOfWeek < 7; dayOfWeek++) {\n      week.push({\n        date: day,\n        dayOfMonth: getDate(day),\n        isPreviousMonth: false,\n        isToday: isSameDay(day, current),\n        isNextMonth: !isSameMonth(day, date),\n        isWeekendDay: getISODay(day) > 5,\n        formattedDate: format(day, options.format)\n      });\n      day = addDays(day, 1);\n    }\n    offset = 0;\n  }\n\n  return weeks;\n}\n\n/**\n * Get attributes for the day:\n * - isActive: if the day is within the selected range\n * - isRangeStart: if the day is the start of the range\n * - isRangeEnd: if the day is the end of the range\n *\n * \"Range\" here refers to a selection OR a selected date to hovered date.\n */\nexport function getDayAttributes(\n  day: Date,\n  current:\n    | Date\n    | [Date, Date]\n    | [Date, undefined]\n    | [undefined, undefined]\n    | undefined,\n  hover: Date,\n  isRange: boolean\n) {\n  let isActive = false;\n  let isRangeStart = false;\n  let isRangeEnd = false;\n\n  const isInRange = (date: Date, range: [Date, Date]) => {\n    const startDate = min(range);\n    const endDate = max(range);\n\n    return isWithinInterval(date, { start: startDate, end: endDate });\n  };\n\n  const isSelectionStarted = Array.isArray(current) && isValid(current[0]);\n  const isSelectionComplete = isSelectionStarted && isValid(current[1]);\n\n  if (!isRange && isValid(current)) {\n    // if not a range\n    isActive = isSameDay(day, current as Date);\n  } else if (!isSelectionStarted) {\n    // if selection has not started\n    isActive = isSameDay(day, hover);\n    isRangeStart = isActive;\n    isRangeEnd = isActive;\n  } else if (isSelectionComplete) {\n    // if a range has been selected\n    const activeRange: [Date, Date] = [\n      startOfDay(current[0]),\n      endOfDay(current[1])\n    ];\n    isActive = isInRange(day, activeRange);\n    isRangeStart = isSameDay(day, current[0]);\n    isRangeEnd = isSameDay(day, current[1]);\n  } else {\n    // if in the process of selecting a range\n    const activeRange: [Date, Date] = [\n      startOfDay(current[0]),\n      endOfDay(hover ?? current[0])\n    ];\n    isActive = isInRange(day, activeRange);\n    isRangeStart = isSameDay(day, min(activeRange));\n    isRangeEnd = isSameDay(day, max(activeRange));\n  }\n\n  return { isActive, isRangeStart, isRangeEnd };\n}\n\n/**\n * Get whether the space below the current day is empty or not\n */\nexport function isNextWeekEmpty(\n  day: Date,\n  range: [Date, Date],\n  hideNextMonth: boolean\n) {\n  const nextWeek = addDays(day, 7);\n  const nextWeekInRange =\n    isBefore(nextWeek, max(range)) || isSameDay(nextWeek, max(range));\n\n  return !(nextWeekInRange && (isSameMonth(day, nextWeek) || !hideNextMonth));\n}\n\n/**\n * Get whether the space above the current day is empty or not\n */\nexport function isPreviousWeekEmpty(\n  day: Date,\n  range: [Date, Date],\n  hidePrevMonth: boolean\n) {\n  const prevWeek = addDays(day, -7);\n  const prevWeekInRange =\n    isAfter(prevWeek, min(range)) || isSameDay(prevWeek, min(range));\n\n  return !(prevWeekInRange && (isSameMonth(day, prevWeek) || !hidePrevMonth));\n}\n\n/**\n * Update the time or date based on the current date and the range start.\n *\n * @param currentDate - The current date or range.\n * @param newDate - The new date to update.\n * @param isRange - Whether the current date is a range.\n * @param rangeStart - Whether the current date is the start of the range.\n * @returns The updated date.\n */\nexport function updateDateTime(\n  currentDate: Date | [Date, Date],\n  newDate: Date,\n  isRange = false,\n  rangeStart = false\n): Date {\n  let finalDate = newDate;\n  if (currentDate) {\n    const hasTime =\n      getHours(newDate) !== 0 ||\n      getMinutes(newDate) !== 0 ||\n      getSeconds(newDate) !== 0;\n\n    if (!hasTime) {\n      if (!isRange) {\n        // For single date, inherit time from previous value\n        const originalTimeSource = Array.isArray(currentDate)\n          ? (currentDate[0] ?? new Date())\n          : (currentDate ?? new Date());\n        finalDate = setSeconds(\n          setMinutes(\n            setHours(newDate, getHours(originalTimeSource)),\n            getMinutes(originalTimeSource)\n          ),\n          getSeconds(originalTimeSource)\n        );\n      } else {\n        // For range, only inherit time for first date\n        if (!rangeStart) {\n          const originalTimeSource = Array.isArray(currentDate)\n            ? (currentDate[0] ?? new Date())\n            : (currentDate ?? new Date());\n          finalDate = setSeconds(\n            setMinutes(\n              setHours(newDate, getHours(originalTimeSource)),\n              getMinutes(originalTimeSource)\n            ),\n            getSeconds(originalTimeSource)\n          );\n        } else {\n          // Reset time to start of day for second date\n          finalDate = setSeconds(setMinutes(setHours(newDate, 0), 0), 0);\n        }\n      }\n    }\n  }\n\n  return finalDate;\n}\n\n/**\n * Check if a preset is active\n * @param presetValue - The preset value to check\n * @param value - The value to check against\n * @returns True if the preset is active, false otherwise\n */\nexport const isPresetActive = (\n  presetValue: Date | [Date, Date],\n  value: Date | [Date, Date],\n  includeTime = false\n): boolean => {\n  if (!value) return false;\n\n  if (Array.isArray(presetValue) && Array.isArray(value)) {\n    if (includeTime) {\n      const startMinutesDiff = Math.abs(\n        differenceInMinutes(presetValue[0], value[0])\n      );\n      const endMinutesDiff = Math.abs(\n        differenceInMinutes(presetValue[1], value[1])\n      );\n\n      return startMinutesDiff === 0 && endMinutesDiff === 0;\n    }\n\n    return (\n      isSameDay(presetValue[0], value[0]) && isSameDay(presetValue[1], value[1])\n    );\n  }\n\n  if (!Array.isArray(presetValue) && !Array.isArray(value)) {\n    if (includeTime) {\n      return Math.abs(differenceInSeconds(presetValue, value)) === 0;\n    }\n\n    return isSameDay(presetValue, value);\n  }\n\n  return false;\n};\n","import React, { FC, useCallback, useMemo, useState } from 'react';\nimport { endOfDay, isAfter, isBefore, isToday, startOfDay } from 'date-fns';\nimport { Button } from '@/elements';\nimport {\n  daysOfWeek,\n  getDayAttributes,\n  getWeeks,\n  isNextWeekEmpty,\n  isPreviousWeekEmpty\n} from '@/form/Calendar/utils';\nimport {\n  AnimatePresence,\n  motion,\n  MotionNodeAnimationOptions\n} from 'motion/react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { CalendarTheme } from '@/form/Calendar/CalendarTheme';\n\nexport interface CalendarDaysProps {\n  /**\n   * The currently displayed month of the calendar.\n   */\n  value?: Date;\n\n  /**\n   * The currently selected date(s).\n   */\n  current?:\n    | Date\n    | [Date, Date]\n    | [Date, undefined]\n    | [undefined, undefined]\n    | undefined;\n\n  /**\n   * The currently hovered date.\n   * @default null\n   */\n  hover?: Date | null;\n\n  /**\n   * The minimum selectable date for the calendar, as a Date object.\n   */\n  min?: Date;\n\n  /**\n   * The maximum selectable date for the calendar, as a Date object or the string 'now'.\n   */\n  max?: Date | 'now';\n\n  /**\n   * Whether the calendar is disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * Whether to display days of previous month.\n   */\n  hidePrevMonthDays?: boolean;\n\n  /**\n   * Whether to display days of next month.\n   */\n  hideNextMonthDays?: boolean;\n\n  /**\n   * Whether to display day of week labels.\n   */\n  showDayOfWeek?: boolean;\n\n  /**\n   * Whether to show the time picker.\n   */\n  showTime?: boolean;\n\n  /**\n   * Whether to highlight the today.\n   */\n  showToday?: boolean;\n\n  /**\n   * Customize the labels for the days of the week.\n   * @default daysOfWeek\n   */\n  dayOfWeekLabels?: string[];\n\n  /**\n   * Whether the calendar is a range picker.\n   */\n  isRange?: boolean;\n\n  /**\n   * Range of selected dates\n   */\n  range?: [Date, Date] | [Date, undefined] | [undefined, undefined];\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * X-axis block animation\n   * @default 0\n   */\n  xAnimation?: string | number;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * Whether to animate the calendar.\n   */\n  animated?: boolean;\n\n  /**\n   * Animation configuration for the calendar days.\n   */\n  animation?: MotionNodeAnimationOptions;\n\n  /**\n   * A callback function that is called when a day is selected.\n   */\n  onChange: (date: Date) => void;\n\n  /**\n   * A callback function that is called when a day is hovered.\n   */\n  onHover?: (date: Date | null) => void;\n\n  /**\n   * Theme for the CalendarDays.\n   */\n  theme?: CalendarTheme;\n}\n\nexport const CalendarDays: FC<CalendarDaysProps> = ({\n  value,\n  current,\n  hover = null,\n  isRange,\n  disabled,\n  min: minLimit,\n  max,\n  animated,\n  xAnimation = 0,\n  animation,\n  showDayOfWeek,\n  showToday,\n  showTime,\n  dayOfWeekLabels = daysOfWeek,\n  hidePrevMonthDays,\n  hideNextMonthDays,\n  onChange,\n  onHover,\n  theme: customTheme\n}) => {\n  const { days }: CalendarTheme = useComponentTheme('calendar', customTheme);\n\n  const [hoveringDate, setHoveringDate] = useState<Date | null>(hover);\n  const weeks = useMemo(() => getWeeks(value), [value]);\n  const maxLimit = useMemo(() => (max === 'now' ? new Date() : max), [max]);\n\n  const dayChangeHandler = useCallback(\n    (dayDate: Date) => {\n      if (showTime && !isRange && current) {\n        const currentDate = current as Date;\n        let newDate = new Date(dayDate);\n        // Update the time of the new date based on the time of the current date.\n        newDate.setHours(currentDate.getHours());\n        newDate.setMinutes(currentDate.getMinutes());\n        newDate.setSeconds(currentDate.getSeconds());\n        if (isAfter(newDate, maxLimit)) {\n          newDate = maxLimit;\n        } else if (isBefore(newDate, minLimit)) {\n          newDate = minLimit;\n        }\n        onChange(newDate);\n      } else {\n        onChange(dayDate);\n      }\n    },\n    [showTime, isRange, current, maxLimit, minLimit, onChange]\n  );\n\n  const renderDay = useCallback(\n    day => {\n      // Determine if the day should be shown or not\n      if (\n        (day.isPreviousMonth && hidePrevMonthDays) ||\n        (day.isNextMonth && hideNextMonthDays)\n      ) {\n        return <div key={day.dayOfMonth} />;\n      }\n\n      const handleHover = (value: Date | null) => {\n        if (onHover) {\n          onHover(value);\n        } else {\n          setHoveringDate(value);\n        }\n      };\n\n      // Determine if the day is disabled\n      const isDisabled =\n        disabled ||\n        (minLimit && isBefore(startOfDay(day.date), startOfDay(minLimit))) ||\n        (maxLimit && isAfter(endOfDay(day.date), endOfDay(maxLimit)));\n\n      // Determine if date is in selected (or to be selected) range\n      const currentHover = hover || hoveringDate;\n      const { isActive, isRangeStart, isRangeEnd } = getDayAttributes(\n        day.date,\n        current,\n        currentHover,\n        isRange\n      );\n\n      // Determine styling of range start and end dates -\n      // this is used to correctly round the corners of the range\n      // depending on the current selection and whether corner connects\n      // with the above or below day.\n      const currentRange: [Date, Date] = Array.isArray(current)\n        ? [current[0], current[1] ?? currentHover]\n        : [current ?? hoveringDate, current ?? hoveringDate];\n      const isRangeMiddle = isRange && isActive && !isRangeStart && !isRangeEnd;\n      const rangeConnectsBottom =\n        isRangeStart &&\n        isNextWeekEmpty(day.date, currentRange, hideNextMonthDays);\n\n      const rangeConnectsTop =\n        isRangeEnd &&\n        isPreviousWeekEmpty(day.date, currentRange, hidePrevMonthDays);\n\n      // Determine the color variant of the button\n      const colorVariant = isActive ? 'primary' : 'default';\n\n      // Determine the button variant\n      const buttonVariant = isActive ? 'filled' : 'text';\n\n      return (\n        <Button\n          key={day.formattedDate}\n          className={cn(days.day, {\n            [days.outside]:\n              !isActive && (day.isNextMonth || day.isPreviousMonth),\n            [days.today]: showToday && isToday(day.date),\n            [days.selected]: isActive,\n            [days.hover]: day.date === currentHover,\n            [days.range]: isRangeMiddle,\n            [days.startRangeDate]: isRange && isRangeStart && !isRangeEnd,\n            [days.cornerStartDateBottom]:\n              isRange && isActive && !rangeConnectsBottom,\n            [days.endRangeDate]: isRange && isRangeEnd && !isRangeStart,\n            [days.cornerEndDateTop]: isRange && isActive && !rangeConnectsTop\n          })}\n          onMouseEnter={() => handleHover(day.date)}\n          onMouseLeave={() => handleHover(null)}\n          variant={buttonVariant}\n          color={colorVariant}\n          disableMargins\n          disabled={isDisabled}\n          title={day.formattedDate}\n          onClick={() => dayChangeHandler(day.date)}\n        >\n          {day.dayOfMonth}\n        </Button>\n      );\n    },\n    [\n      disabled,\n      minLimit,\n      maxLimit,\n      current,\n      hover,\n      isRange,\n      dayChangeHandler,\n      onHover,\n      hoveringDate,\n      days,\n      hideNextMonthDays,\n      hidePrevMonthDays,\n      showToday\n    ]\n  );\n\n  return (\n    <AnimatePresence mode=\"popLayout\">\n      <motion.div\n        key={value.toString()}\n        {...(animation\n          ? animation\n          : {\n              initial: { opacity: 0, x: xAnimation },\n              animate: { opacity: 1, x: 0 },\n              transition: {\n                x: { type: animated ? 'keyframes' : false },\n                opacity: { duration: 0.2, type: animated ? 'tween' : false }\n              }\n            })}\n      >\n        {showDayOfWeek && (\n          <div className={days.header}>\n            {dayOfWeekLabels.map(day => (\n              <div key={`day-${day}`} className={days.dayOfWeek}>\n                {day.substring(0, 2)}\n              </div>\n            ))}\n          </div>\n        )}\n        {weeks.map((week, i) => (\n          <div key={`week-${i}`} className={days.week}>\n            {week.map(renderDay)}\n          </div>\n        ))}\n      </motion.div>\n    </AnimatePresence>\n  );\n};\n","import React, { FC } from 'react';\nimport { Button } from '@/elements';\nimport { monthNames } from '@/form/Calendar/utils';\nimport { cn, useComponentTheme } from '@/utils';\nimport { CalendarTheme } from '@/form/Calendar/CalendarTheme';\n\nexport interface CalendarMonthsProps {\n  /**\n   * The currently displayed month of the calendar.\n   */\n  value: number;\n\n  /**\n   * A callback function that is called when a day is selected.\n   */\n  onChange: (month: number) => void;\n\n  /**\n   * Theme for the CalendarMonths.\n   */\n  theme?: CalendarTheme;\n}\n\nexport const CalendarMonths: FC<CalendarMonthsProps> = ({\n  value,\n  onChange,\n  theme: customTheme\n}) => {\n  const { months }: CalendarTheme = useComponentTheme('calendar', customTheme);\n\n  return (\n    <div className={months.root}>\n      {monthNames.map((month, i) => (\n        <Button\n          key={month}\n          className={cn(months.month, { [months.selected]: value === i })}\n          color={value === i ? 'primary' : 'default'}\n          variant={value === i ? 'filled' : 'text'}\n          disableMargins\n          title={month}\n          onClick={() => onChange(i)}\n        >\n          {month}\n        </Button>\n      ))}\n    </div>\n  );\n};\n","import React, { FC, useMemo } from 'react';\nimport {\n  AnimatePresence,\n  motion,\n  MotionNodeAnimationOptions\n} from 'motion/react';\nimport { Button } from '@/elements';\nimport { cn, useComponentTheme } from '@/utils';\nimport { CalendarTheme } from '@/form/Calendar/CalendarTheme';\n\nexport interface CalendarYearsProps {\n  /**\n   * The start date of the decade to display.\n   */\n  decadeStart: Date;\n\n  /**\n   * The end date of the decade to display.\n   */\n  decadeEnd: Date;\n\n  /**\n   * The currently selected year.\n   */\n  value: number;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * X-axis block animation\n   * @default 0\n   */\n  xAnimation?: string | number;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * Whether to animate the calendar.\n   */\n  animated?: boolean;\n\n  /**\n   * Animation configuration for the calendar years.\n   */\n  animation?: MotionNodeAnimationOptions;\n\n  /**\n   * A callback function that is called when a year is selected.\n   */\n  onChange: (year: number) => void;\n\n  /**\n   * Theme for the CalendarYears.\n   */\n  theme?: CalendarTheme;\n}\n\nexport const CalendarYears: FC<CalendarYearsProps> = ({\n  decadeStart,\n  decadeEnd,\n  value,\n  animated,\n  xAnimation = 0,\n  animation,\n  onChange,\n  theme: customTheme\n}) => {\n  const { years }: CalendarTheme = useComponentTheme('calendar', customTheme);\n\n  const yearDates = useMemo(() => {\n    const arr = [];\n    const start = decadeStart.getFullYear();\n    const end = decadeEnd.getFullYear();\n\n    for (let i = start - 1; i < end + 2; i++) {\n      arr.push(i);\n    }\n\n    return arr;\n  }, [decadeEnd, decadeStart]);\n\n  return (\n    <AnimatePresence mode=\"popLayout\">\n      <motion.div\n        className={years.root}\n        key={`${decadeStart.toString()}-${decadeEnd.toString()}`}\n        {...(animation\n          ? animation\n          : {\n              initial: { opacity: 0, x: xAnimation },\n              animate: { opacity: 1, x: 0 },\n              transition: {\n                x: { type: animated ? 'keyframes' : false },\n                opacity: { duration: 0.2, type: animated ? 'tween' : false }\n              }\n            })}\n      >\n        {yearDates.map(year => (\n          <Button\n            key={year}\n            className={cn(years.year, { [years.selected]: value === year })}\n            color={value === year ? 'primary' : 'default'}\n            variant={value === year ? 'filled' : 'text'}\n            disableMargins\n            title={year}\n            onClick={() => onChange(year)}\n          >\n            {year}\n          </Button>\n        ))}\n      </motion.div>\n    </AnimatePresence>\n  );\n};\n","import React, { FC } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { DividerTheme } from './DividerTheme';\n\nexport interface DividerProps {\n  /**\n   * Classname to apply to the divider.\n   */\n  className?: string;\n\n  /**\n   * Disable the margins of the divider.\n   * The default margin is: `--spacings-md`.\n   * @default false\n   */\n  disableMargins?: boolean;\n\n  /**\n   * Orientation of the divider.\n   * @default 'horizontal'\n   */\n  orientation?: 'horizontal' | 'vertical';\n\n  /**\n   * Additional style attributes. Recommend to use css classes over this.\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * Theme for the Divider.\n   */\n  theme?: DividerTheme;\n\n  /**\n   * Variant of the divider.\n   * @default 'primary'\n   */\n  variant?: 'primary' | 'secondary';\n}\n\nexport const Divider: FC<DividerProps> = ({\n  className,\n  disableMargins = false,\n  orientation = 'horizontal',\n  variant = 'primary',\n  theme: customTheme,\n  ...rest\n}) => {\n  const theme: DividerTheme = useComponentTheme('divider', customTheme);\n\n  return (\n    <hr\n      {...rest}\n      className={cn(\n        theme.base,\n        theme.variant[variant],\n        theme.orientation[orientation],\n        disableMargins && theme.disableMargins,\n        className\n      )}\n    />\n  );\n};\n","export interface DividerTheme {\n  /** CSS class applied to the root divider element. */\n  base?: string;\n  /** Class names for each divider orientation. */\n  orientation?: {\n    vertical?: string;\n    horizontal?: string;\n  };\n  /** Class names for each divider variant. */\n  variant?: {\n    primary?: string;\n    secondary?: string;\n  };\n  /** CSS class applied when divider margins are disabled. */\n  disableMargins?: string;\n}\n\nconst baseTheme: DividerTheme = {\n  base: 'border-none',\n  orientation: {\n    horizontal: 'h-px w-full my-2.5',\n    vertical: 'w-px h-full mx-2.5'\n  },\n  variant: {\n    primary: 'bg-surface',\n    secondary: 'bg-linear-to-r from-transparent to-transparent via-blue-500'\n  },\n  disableMargins: 'my-0 mx-0'\n};\n\nexport const dividerTheme = {\n  ...baseTheme\n};\n","export interface TypographyTheme {\n  /** CSS class applied to the H1 heading element. */\n  h1: string;\n  /** CSS class applied to the H2 heading element. */\n  h2: string;\n  /** CSS class applied to the H3 heading element. */\n  h3: string;\n  /** CSS class applied to the H4 heading element. */\n  h4: string;\n  /** CSS class applied to the H5 heading element. */\n  h5: string;\n  /** CSS class applied to the H6 heading element. */\n  h6: string;\n  /** CSS class applied to the paragraph element. */\n  p: string;\n  /** CSS class applied to the blockquote element. */\n  blockquote: string;\n  /** CSS class applied to the Lead text element. */\n  lead: string;\n  /** CSS class applied to the Large text element. */\n  large: string;\n  /** CSS class applied to the Small text element. */\n  small: string;\n  /** CSS class applied to the Muted text element. */\n  muted: string;\n}\n\nexport const typographyTheme: TypographyTheme = {\n  h1: 'scroll-m-20 text-4xl font-extrabold tracking-tight text-balance',\n  h2: 'scroll-m-20 border-b border-surface pb-2 text-3xl font-semibold tracking-tight first:mt-0',\n  h3: 'scroll-m-20 text-2xl font-semibold tracking-tight',\n  h4: 'scroll-m-20 text-xl font-semibold tracking-tight',\n  h5: 'scroll-m-20 text-lg font-semibold tracking-tight',\n  h6: 'scroll-m-20 text-base font-semibold tracking-tight',\n  p: 'leading-7 [&:not(:first-child)]:mt-6',\n  blockquote: 'mt-6 border-l-2 border-surface pl-6 italic',\n  lead: 'text-xl text-text-secondary',\n  large: 'text-lg font-semibold',\n  small: 'text-sm leading-none font-medium',\n  muted: 'text-sm text-text-secondary'\n};\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface H1Props extends React.HTMLAttributes<HTMLHeadingElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const H1 = forwardRef<HTMLHeadingElement, H1Props>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <h1 ref={ref} className={cn(theme.h1, className)} {...rest}>\n        {children}\n      </h1>\n    );\n  }\n);\n\nH1.displayName = 'H1';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface H2Props extends React.HTMLAttributes<HTMLHeadingElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const H2 = forwardRef<HTMLHeadingElement, H2Props>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <h2 ref={ref} className={cn(theme.h2, className)} {...rest}>\n        {children}\n      </h2>\n    );\n  }\n);\n\nH2.displayName = 'H2';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface H3Props extends React.HTMLAttributes<HTMLHeadingElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const H3 = forwardRef<HTMLHeadingElement, H3Props>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <h3 ref={ref} className={cn(theme.h3, className)} {...rest}>\n        {children}\n      </h3>\n    );\n  }\n);\n\nH3.displayName = 'H3';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface H4Props extends React.HTMLAttributes<HTMLHeadingElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const H4 = forwardRef<HTMLHeadingElement, H4Props>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <h4 ref={ref} className={cn(theme.h4, className)} {...rest}>\n        {children}\n      </h4>\n    );\n  }\n);\n\nH4.displayName = 'H4';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface H5Props extends React.HTMLAttributes<HTMLHeadingElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const H5 = forwardRef<HTMLHeadingElement, H5Props>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <h5 ref={ref} className={cn(theme.h5, className)} {...rest}>\n        {children}\n      </h5>\n    );\n  }\n);\n\nH5.displayName = 'H5';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface H6Props extends React.HTMLAttributes<HTMLHeadingElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const H6 = forwardRef<HTMLHeadingElement, H6Props>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <h6 ref={ref} className={cn(theme.h6, className)} {...rest}>\n        {children}\n      </h6>\n    );\n  }\n);\n\nH6.displayName = 'H6';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface PProps extends React.HTMLAttributes<HTMLParagraphElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const P = forwardRef<HTMLParagraphElement, PProps>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <p ref={ref} className={cn(theme.p, className)} {...rest}>\n        {children}\n      </p>\n    );\n  }\n);\n\nP.displayName = 'P';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface BlockQuoteProps extends React.BlockquoteHTMLAttributes<HTMLQuoteElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const BlockQuote = forwardRef<HTMLQuoteElement, BlockQuoteProps>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <blockquote\n        ref={ref}\n        className={cn(theme.blockquote, className)}\n        {...rest}\n      >\n        {children}\n      </blockquote>\n    );\n  }\n);\n\nBlockQuote.displayName = 'BlockQuote';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface LeadProps extends React.HTMLAttributes<HTMLParagraphElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const Lead = forwardRef<HTMLParagraphElement, LeadProps>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <p ref={ref} className={cn(theme.lead, className)} {...rest}>\n        {children}\n      </p>\n    );\n  }\n);\n\nLead.displayName = 'Lead';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface LargeProps extends React.HTMLAttributes<HTMLDivElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const Large = forwardRef<HTMLDivElement, LargeProps>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <div ref={ref} className={cn(theme.large, className)} {...rest}>\n        {children}\n      </div>\n    );\n  }\n);\n\nLarge.displayName = 'Large';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface SmallProps extends React.HTMLAttributes<HTMLElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const Small = forwardRef<HTMLElement, SmallProps>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <small ref={ref} className={cn(theme.small, className)} {...rest}>\n        {children}\n      </small>\n    );\n  }\n);\n\nSmall.displayName = 'Small';\n","import React, { forwardRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TypographyTheme } from './TypographyTheme';\n\nexport interface MutedProps extends React.HTMLAttributes<HTMLParagraphElement> {\n  /**\n   * Theme for Typography.\n   */\n  theme?: TypographyTheme;\n}\n\nexport const Muted = forwardRef<HTMLParagraphElement, MutedProps>(\n  ({ className, theme: customTheme, children, ...rest }, ref) => {\n    const theme: TypographyTheme = useComponentTheme('typography', customTheme);\n\n    return (\n      <p ref={ref} className={cn(theme.muted, className)} {...rest}>\n        {children}\n      </p>\n    );\n  }\n);\n\nMuted.displayName = 'Muted';\n","import React, { FC, useCallback, useEffect, useRef } from 'react';\nimport type { CalendarTheme } from '@/form/Calendar/CalendarTheme';\nimport { cn } from '@/utils';\n\nimport type { AmPm } from './CalendarTimes';\n\ninterface TimeColumnProps {\n  /**\n   * Array of time options to display in the column\n   */\n  options: number[] | AmPm[];\n\n  /**\n   * Currently selected time value\n   */\n  value?: number | AmPm;\n\n  /**\n   * Minimum allowed time value\n   */\n  min?: number;\n\n  /**\n   * Maximum allowed time value\n   */\n  max?: number;\n\n  /**\n   * Theme configuration for the time column styling\n   */\n  theme: CalendarTheme['time'];\n\n  /**\n   * Whether to use 12-hour cycle for the time picker.\n   * @default false\n   */\n  is12HourCycle?: boolean;\n\n  /**\n   * Whether the selected value is PM\n   * @default false\n   */\n  isPM?: boolean;\n\n  /**\n   * Callback fired when a time option is selected\n   */\n  onSelect: (value: number | AmPm) => void;\n}\n\nexport const TimeColumn: FC<TimeColumnProps> = ({\n  options,\n  value,\n  min,\n  max,\n  theme,\n  isPM = false,\n  is12HourCycle = false,\n  onSelect\n}) => {\n  const containerRef = useRef<HTMLUListElement | null>(null);\n  const selectedRef = useRef<HTMLLIElement | null>(null);\n\n  const isOptionDisabled = useCallback(\n    (option: number | AmPm) => {\n      if (typeof option === 'number') {\n        if (options.length === 12 && is12HourCycle) {\n          if (isPM) {\n            const pmOption = option < 12 ? option + 12 : option;\n            return pmOption < min || pmOption > max;\n          } else {\n            return option < min || option > max;\n          }\n        }\n\n        return option < min || option > max;\n      } else {\n        if ((option === 'AM' && min >= 12) || (option === 'PM' && max < 12)) {\n          return true;\n        }\n\n        return false;\n      }\n    },\n    [options.length, is12HourCycle, isPM, min, max]\n  );\n\n  useEffect(() => {\n    if (containerRef.current && selectedRef.current) {\n      const container = containerRef.current;\n      const selected = selectedRef.current;\n\n      const containerHeight = container.clientHeight;\n      const itemOffsetTop = selected.offsetTop;\n      const itemHeight = selected.offsetHeight;\n      let scrollTop = 0;\n      if (is12HourCycle) {\n        scrollTop = itemOffsetTop;\n      } else {\n        // Calculate scrollTop so that the selected item is centered\n        scrollTop = itemOffsetTop - containerHeight / 2 + itemHeight / 2;\n      }\n\n      container.scrollTo({\n        top: scrollTop,\n        behavior: 'smooth'\n      });\n    }\n  }, [value, is12HourCycle]);\n\n  return (\n    <div className={theme.items.container}>\n      <ul\n        ref={containerRef}\n        className={theme.items.list}\n        style={{\n          paddingBottom:\n            is12HourCycle && containerRef.current\n              ? containerRef.current?.clientHeight - 24\n              : undefined\n        }}\n      >\n        {options.map(option => (\n          <li\n            key={option}\n            ref={value === option ? selectedRef : null}\n            className={cn(theme.items.item.base, {\n              [theme.items.item.selected]: value === option,\n              [theme.items.item.disabled]: isOptionDisabled(option)\n            })}\n            onClick={() => {\n              if (isOptionDisabled(option)) {\n                return;\n              }\n\n              onSelect(option);\n            }}\n            role=\"option\"\n            aria-disabled={isOptionDisabled(option)}\n            aria-selected={value === option}\n          >\n            {typeof option === 'number'\n              ? option.toString().padStart(2, '0')\n              : option}\n          </li>\n        ))}\n      </ul>\n    </div>\n  );\n};\n","import React, { FC } from 'react';\nimport {\n  motion,\n  AnimatePresence,\n  MotionNodeAnimationOptions\n} from 'motion/react';\nimport { CollapseTheme } from './CollapseTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nconst VARIANTS = {\n  open: { opacity: 1, height: 'auto' },\n  collapsed: { opacity: 0, height: 0 }\n};\n\nconst TRANSITION = {\n  duration: 0.5,\n  ease: [0.04, 0.62, 0.23, 0.98],\n  when: 'beforeChildren'\n};\n\nexport interface CollapseProps extends Omit<\n  Partial<HTMLDivElement>,\n  'children'\n> {\n  /**\n   * Whether the collapse is expanded or not.\n   */\n  expanded?: boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * Whether the collapse is animated or not.\n   * @default true\n   */\n  animated?: boolean;\n\n  /**\n   * Animation configuration for the collapse.\n   */\n  animation?: MotionNodeAnimationOptions;\n\n  /**\n   * Children to render.\n   */\n  children?: React.ReactNode | (() => React.ReactNode);\n\n  /**\n   * Theme for the Collapse.\n   */\n  theme?: CollapseTheme;\n}\n\nexport const Collapse: FC<CollapseProps> = ({\n  children,\n  expanded,\n  className,\n  animated = true,\n  animation,\n  theme: customTheme,\n  ...rest\n}) => {\n  const theme: CollapseTheme = useComponentTheme('collapse', customTheme);\n\n  return (\n    <AnimatePresence initial={false}>\n      {expanded && (\n        <motion.section\n          {...(rest as any)}\n          className={cn(theme.base, className)}\n          key=\"content\"\n          {...(animation\n            ? animation\n            : {\n                initial: 'collapsed',\n                animate: 'open',\n                exit: 'collapsed',\n                variants: VARIANTS,\n                transition: animated ? TRANSITION : { duration: 0 }\n              })}\n        >\n          {typeof children === 'function' ? children() : children}\n        </motion.section>\n      )}\n    </AnimatePresence>\n  );\n};\n","export interface CollapseTheme {\n  /** CSS class applied to the root collapse container. */\n  base: string;\n}\n\nconst baseTheme: CollapseTheme = {\n  base: 'will-change-[height,opacity] overflow-hidden'\n};\n\nexport const collapseTheme: CollapseTheme = {\n  ...baseTheme\n};\n","import React, { FC, ReactNode } from 'react';\nimport { HTMLMotionProps, motion } from 'motion/react';\n\nexport const groupVariants = {\n  initial: {\n    transition: {\n      staggerChildren: 0.05,\n      staggerDirection: -1 as any\n    }\n  },\n  animate: {\n    transition: {\n      staggerChildren: 0.07,\n      delayChildren: 0.2\n    }\n  }\n};\n\nexport interface MotionGroupProps extends HTMLMotionProps<'div'> {\n  /**\n   * The content of group.\n   */\n  children: ReactNode;\n}\n\nexport const MotionGroup: FC<MotionGroupProps> = ({ children, ...rest }) => (\n  <motion.div\n    variants={groupVariants}\n    initial=\"initial\"\n    animate=\"animate\"\n    {...rest}\n  >\n    {children}\n  </motion.div>\n);\n","import React, { FC, ReactNode } from 'react';\nimport { HTMLMotionProps, motion } from 'motion/react';\n\nexport const verticalVariant = {\n  initial: {\n    y: -20,\n    opacity: 0,\n    transition: {\n      when: 'beforeChildren'\n    }\n  },\n  animate: {\n    y: 0,\n    opacity: 1,\n    transition: {\n      when: 'beforeChildren'\n    }\n  },\n  exit: {\n    y: -20,\n    opacity: 0\n  }\n};\n\nconst horizontalVariants = {\n  initial: {\n    x: '-100%',\n    opacity: 0,\n    transition: {\n      when: 'beforeChildren',\n      x: { stiffness: 10 }\n    }\n  },\n  animate: {\n    x: '0%',\n    opacity: 1,\n    transition: {\n      x: { stiffness: 10, velocity: -100 },\n      when: 'beforeChildren',\n      opacity: { duration: 1 }\n    }\n  },\n  exit: {\n    x: '-100%',\n    opacity: 0,\n    transition: {\n      x: { stiffness: 10 }\n    }\n  }\n};\n\nexport interface MotionItemProps extends HTMLMotionProps<'div'> {\n  /**\n   * Direction of the motion.\n   * @default 'vertical'\n   */\n  direction?: 'horizontal' | 'vertical';\n\n  /**\n   * Children to render.\n   */\n  children: ReactNode;\n}\n\nexport const MotionItem: FC<MotionItemProps> = ({\n  children,\n  direction = 'vertical',\n  ...rest\n}) => (\n  <motion.div\n    variants={direction === 'vertical' ? verticalVariant : horizontalVariants}\n    {...rest}\n  >\n    {children}\n  </motion.div>\n);\n","import React, { FC, forwardRef, InputHTMLAttributes, LegacyRef } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { ListTheme } from './ListTheme';\n\nexport type ListProps = InputHTMLAttributes<HTMLDivElement> & {\n  /**\n   * Theme for the List.\n   */\n  theme?: ListTheme;\n};\n\nexport interface ListRef {\n  /**\n   * Reference to the list element.\n   */\n  ref?: LegacyRef<HTMLDivElement>;\n}\n\nexport const List: FC<ListProps & ListRef> = forwardRef<\n  HTMLDivElement,\n  ListProps\n>(({ className, children, theme: customTheme, ...rest }, ref) => {\n  const theme: ListTheme = useComponentTheme('list', customTheme);\n  return (\n    <div {...rest} ref={ref} role=\"list\" className={cn(theme.base, className)}>\n      {children}\n    </div>\n  );\n});\n","import React, { FC, InputHTMLAttributes, LegacyRef, forwardRef } from 'react';\nimport { ListTheme } from '@/layout/List/ListTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface ListItemProps extends InputHTMLAttributes<HTMLDivElement> {\n  /**\n   * Whether the item is active or not.\n   */\n  active?: boolean;\n\n  /**\n   * Whether the item is disabled or not.\n   */\n  disabled?: boolean;\n\n  /**\n   * Disable the padding ( including gutters ).\n   */\n  disablePadding?: boolean;\n\n  /**\n   * Disable the gutters ( left + right padding ).\n   */\n  disableGutters?: boolean;\n\n  /**\n   * Whether the item data is dense and reduce the padding.\n   */\n  dense?: boolean;\n\n  /**\n   * Class name for the content element.\n   */\n  contentClassName?: string;\n\n  /**\n   * A start component for the list item.\n   */\n  start?: React.ReactNode;\n\n  /**\n   * A end component for the list item.\n   */\n  end?: React.ReactNode;\n\n  /**\n   * Theme for the List.\n   */\n  theme?: ListTheme;\n}\n\nexport interface ListItemRef {\n  /**\n   * Reference to the list item element.\n   */\n  ref?: LegacyRef<HTMLDivElement>;\n}\n\nexport const ListItem: FC<ListItemProps & ListItemRef> = forwardRef<\n  HTMLDivElement,\n  ListItemProps\n>(\n  (\n    {\n      className,\n      contentClassName,\n      children,\n      active,\n      disabled,\n      disablePadding,\n      disableGutters,\n      start,\n      end,\n      dense,\n      onClick,\n      theme: customTheme,\n      ...rest\n    },\n    ref\n  ) => {\n    const theme: ListTheme = useComponentTheme('list', customTheme);\n\n    return (\n      <div\n        {...rest}\n        ref={ref}\n        role={onClick ? 'button' : 'listitem'}\n        tabIndex={onClick ? 0 : undefined}\n        onClick={e => !disabled && onClick?.(e)}\n        className={cn(\n          theme.listItem.base,\n          dense && theme.listItem.dense.base,\n          disabled && theme.listItem.disabled,\n          active && theme.listItem.active,\n          onClick && !disabled && theme.listItem.clickable,\n          disablePadding && theme.listItem.disablePadding,\n          disableGutters && theme.listItem.disableGutters,\n          className\n        )}\n      >\n        {start && (\n          <div\n            className={cn(\n              theme.listItem.adornment.base,\n              theme.listItem.adornment.start,\n              { [theme.listItem.dense.start]: dense }\n            )}\n          >\n            {start}\n          </div>\n        )}\n        <div\n          className={cn(\n            theme.listItem.content,\n            {\n              [theme.listItem.dense.content]: dense\n            },\n            contentClassName\n          )}\n        >\n          {children}\n        </div>\n        {end && (\n          <div\n            className={cn(\n              theme.listItem.adornment.base,\n              theme.listItem.adornment.end,\n              { [theme.listItem.dense.end]: dense }\n            )}\n          >\n            {end}\n          </div>\n        )}\n      </div>\n    );\n  }\n);\n","import React, { FC, InputHTMLAttributes } from 'react';\nimport { ListTheme } from '@/layout/List/ListTheme';\nimport { cn, useComponentTheme } from '@/utils';\nimport { Small } from '@/typography';\n\nexport type ListHeaderProps = InputHTMLAttributes<HTMLDivElement> & {\n  /**\n   * Theme for the List.\n   */\n  theme?: ListTheme;\n};\n\nexport const ListHeader: FC<ListHeaderProps> = ({\n  className,\n  children,\n  theme: customTheme,\n  ...rest\n}) => {\n  const theme: ListTheme = useComponentTheme('list', customTheme);\n  return (\n    <Small {...(rest as any)} className={cn(theme.header, className)}>\n      {children}\n    </Small>\n  );\n};\n","export interface ListTheme {\n  /** CSS class applied to the root list container. */\n  base: string;\n  /** CSS class applied to the list header. */\n  header: string;\n  /** Class names applied to each list item. */\n  listItem: {\n    base: string;\n    disabled: string;\n    active: string;\n    clickable: string;\n    disablePadding: string;\n    disableGutters: string;\n    dense: {\n      base: string;\n      content: string;\n      start: string;\n      end: string;\n    };\n    adornment: {\n      base: string;\n      start: string;\n      end: string;\n      svg: string;\n    };\n    content: string;\n  };\n}\n\nconst baseTheme: ListTheme = {\n  base: 'flex flex-col',\n  header: 'pl-2 pr-2 text-sm font-semibold mb-0.5',\n  listItem: {\n    base: 'items-center flex p-2.5 relative rounded-none',\n    disabled: 'cursor-not-allowed pointer-events-none',\n    active: '',\n    clickable:\n      'cursor-pointer transition-color duration-300 ease-linear transition-bg duration-300 ease-linear hover:color-inherit hover:bg-transparent',\n    disablePadding: 'p-0',\n    disableGutters: 'pl-0 pr-0',\n    dense: {\n      base: 'p-1',\n      content: '',\n      start: 'pr-[calc(5/2)]',\n      end: 'pl-[calc(5/2)]'\n    },\n    adornment: {\n      base: 'items-center flex',\n      start: 'pr-1',\n      end: 'pl-1',\n      svg: 'fill-current'\n    },\n    content: 'overflow-wrap break-word word-wrap break-all flex-1'\n  }\n};\n\nexport const listTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'text-text-primary'].join(' '),\n  header: [baseTheme.header, 'text-text-primary'].join(' '),\n  listItem: {\n    ...baseTheme.listItem,\n    base: [\n      baseTheme.listItem.base,\n      'hover:bg-panel-accent hover:text-mystic light:hover:bg-vulcan/5 light:hover:text-text-secondary [&:has(h3)]:hover:bg-transparent'\n    ].join(' '),\n    active: [\n      baseTheme.listItem.active,\n      'text-primary-active hover:text-mystic'\n    ].join(' '),\n    disabled: [\n      baseTheme.listItem.disabled,\n      'opacity-40 text-text-secondary'\n    ].join(' ')\n  }\n};\n","import React, { FC, ReactNode } from 'react';\nimport { FieldTheme } from './FieldTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface FieldProps extends React.HTMLAttributes<HTMLElement> {\n  /**\n   * Label to display on the field.\n   */\n  label?: React.ReactNode | string;\n\n  /**\n   * Disable field bottom margin.\n   */\n  disableMargin?: boolean;\n\n  /**\n   * Whether to show the required indicator next to the label.\n   */\n  required?: boolean;\n\n  /**\n   * Content to render as the required indicator. Defaults to `*`.\n   * The indicator is decorative (`aria-hidden`); set `required`/`aria-required`\n   * on the input control for screen readers.\n   */\n  requiredIndicator?: ReactNode;\n\n  /**\n   * Visually-hidden text announced by assistive tech alongside the required\n   * indicator. Defaults to `'required'`. Pass `''` to opt out (e.g. when the\n   * input already carries `aria-required`), or a localized string.\n   */\n  requiredAnnouncement?: string;\n\n  /**\n   * Sets the label's `htmlFor`. Pair with a matching `id` on the child form\n   * control to associate them. When omitted, no `htmlFor` is rendered.\n   */\n  htmlFor?: string;\n\n  /**\n   * Children to render.\n   */\n  children?: ReactNode;\n\n  /**\n   * Additional classname to apply to the label.\n   */\n  labelClassName?: string;\n\n  /**\n   * Additional classname to apply to the field.\n   */\n  className?: string;\n\n  /**\n   * Direction of the field.\n   * @default 'vertical'\n   */\n  direction?: 'vertical' | 'horizontal';\n\n  /**\n   * Alignment of the label.\n   * @default 'start'\n   */\n  alignment?: 'start' | 'center' | 'end';\n\n  /**\n   * Event when the label is clicked.\n   */\n  onTitleClick?: (\n    event: React.MouseEvent<HTMLLabelElement, MouseEvent>\n  ) => void;\n\n  /**\n   * Hint text displayed below the input. Hidden when error message is shown.\n   */\n  hint?: React.ReactNode;\n\n  /**\n   * Error state or message. When `true`, applies error styling.\n   * When a string or ReactNode, renders the error message below the input.\n   */\n  error?: boolean | React.ReactNode;\n\n  /**\n   * Theme for the Field.\n   */\n  theme?: FieldTheme;\n}\n\nexport const Field: FC<FieldProps> = ({\n  label,\n  children,\n  disableMargin,\n  labelClassName,\n  className,\n  required,\n  requiredIndicator = '*',\n  requiredAnnouncement = 'required',\n  htmlFor,\n  direction = 'vertical',\n  alignment = 'start',\n  onTitleClick,\n  hint,\n  error,\n  theme: customTheme,\n  ...rest\n}) => {\n  const theme: FieldTheme = useComponentTheme('field', customTheme);\n  const hasErrorMessage = error != null && error !== false && error !== true;\n\n  return (\n    <section\n      {...rest}\n      className={cn(\n        theme.base,\n        disableMargin && theme.disableMargin,\n        direction === 'horizontal' && theme.horizontal.base,\n        direction === 'vertical' && theme.vertical.base,\n        alignment === 'end' && theme.endAlign,\n        alignment === 'center' && theme.centerAlign,\n        error && theme.errorState,\n        className\n      )}\n    >\n      {label && (\n        <label\n          htmlFor={htmlFor}\n          className={cn(\n            theme.label,\n            direction === 'horizontal' && theme.horizontal.label,\n            direction === 'vertical' && theme.vertical.label,\n            labelClassName\n          )}\n          onClick={onTitleClick}\n        >\n          {label}\n          {required && (\n            <>\n              <span className={theme.requiredIndicator} aria-hidden=\"true\">\n                {requiredIndicator}\n              </span>\n              {requiredAnnouncement && (\n                <span className=\"sr-only\">{requiredAnnouncement}</span>\n              )}\n            </>\n          )}\n        </label>\n      )}\n      <div\n        className={cn(direction === 'horizontal' && theme.horizontal.content)}\n      >\n        {children}\n        {hasErrorMessage ? (\n          <span className={theme.error} role=\"alert\">\n            {error}\n          </span>\n        ) : (\n          hint && <span className={theme.hint}>{hint}</span>\n        )}\n      </div>\n    </section>\n  );\n};\n","export interface FieldTheme {\n  /** CSS class applied to the root field container. */\n  base: string;\n  /** CSS class applied when the field bottom margin is disabled. */\n  disableMargin: string;\n  /** CSS class applied to the field label. */\n  label: string;\n  /** CSS class applied to the required indicator. */\n  requiredIndicator: string;\n  /** CSS class applied when label alignment is centered. */\n  centerAlign: string;\n  /** CSS class applied when label alignment is end. */\n  endAlign: string;\n  /** Class names applied when the field is laid out horizontally. */\n  horizontal: {\n    base: string;\n    label: string;\n    content: string;\n  };\n  /** Class names applied when the field is laid out vertically. */\n  vertical: {\n    base: string;\n    label: string;\n  };\n  /** CSS class applied to the hint text. */\n  hint: string;\n  /** CSS class applied to the error message. */\n  error: string;\n  /** CSS class applied to the field when in an error state. */\n  errorState: string;\n}\n\nconst baseTheme: FieldTheme = {\n  base: 'mb-2.5',\n  disableMargin: 'mb-0',\n  label: 'text-sm',\n  requiredIndicator: 'ml-0.5',\n  centerAlign: 'items-center',\n  endAlign: 'items-end',\n  horizontal: {\n    base: 'flex flex-row items-baseline',\n    label: 'mr-0.5 whitespace-nowrap',\n    content: 'flex-1 min-w-0'\n  },\n  vertical: {\n    base: 'block',\n    label: 'block mb-0.5'\n  },\n  hint: 'text-xs text-text-secondary mt-1',\n  error: 'text-xs text-error mt-1',\n  errorState: ''\n};\n\nexport const fieldTheme: FieldTheme = {\n  ...baseTheme\n};\n","export interface CardTheme {\n  /** CSS class applied to the root card container. */\n  base: string;\n  /** CSS class applied when padding is disabled. */\n  disablePadding: string;\n  /** CSS class applied to the card header. */\n  header: string;\n  /** CSS class applied to the header text. */\n  headerText: string;\n  /** CSS class applied to the card content area. */\n  content: string;\n}\n\nconst baseTheme: CardTheme = {\n  base: 'relative flex flex-col p-7 rounded-xs',\n  disablePadding: 'p-0',\n  header: 'flex items-center',\n  headerText: 'text-sm font-medium mt-0 mb-1',\n  content: 'flex-1'\n};\n\nexport const cardTheme: CardTheme = {\n  ...baseTheme,\n  base: [\n    baseTheme.base,\n    'bg-panel border border-panel-accent text-text-primary'\n  ].join(' ')\n};\n","import React, { forwardRef, LegacyRef, FC, PropsWithChildren } from 'react';\nimport { CardTheme } from './CardTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface CardProps extends React.DOMAttributes<any> {\n  /**\n   * Disable the padding of the card.\n   */\n  disablePadding?: boolean;\n\n  /**\n   * Additional classname to apply to the card.\n   */\n  className?: string;\n\n  /**\n   * Header classname to apply.\n   */\n  headerClassName?: string;\n\n  /**\n   * Content classname to apply.\n   */\n  contentClassName?: string;\n\n  /**\n   * Additional style attributes. Recommend to use css classes over this.\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * Header element or text to show.\n   */\n  header?: string | React.JSX.Element | React.JSX.Element[];\n\n  /**\n   * Theme for the Card.\n   */\n  theme?: CardTheme;\n}\n\nexport type CardRefProps = CardProps &\n  PropsWithChildren & { ref?: LegacyRef<HTMLDivElement> };\n\nexport const Card: FC<CardRefProps> = forwardRef(\n  (\n    {\n      children,\n      disablePadding,\n      className,\n      header,\n      headerClassName,\n      contentClassName,\n      theme: customTheme,\n      ...rest\n    }: CardProps,\n    ref\n  ) => {\n    const theme: CardTheme = useComponentTheme('card', customTheme);\n\n    return (\n      <section\n        {...rest}\n        ref={ref}\n        className={cn(\n          theme.base,\n          disablePadding && theme.disablePadding,\n          className\n        )}\n      >\n        {header && (\n          <header className={cn(theme.header, headerClassName)}>\n            {header && typeof header === 'string' ? (\n              <h3 className={theme.headerText}>{header}</h3>\n            ) : (\n              header\n            )}\n          </header>\n        )}\n        <div className={cn(theme.content, contentClassName)}>{children}</div>\n      </section>\n    );\n  }\n);\n","import React, { FC } from 'react';\nimport { ArrowTheme } from './ArrowTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface ArrowProps {\n  /**\n   * CSS Classname to apply to the arrow\n   */\n  className?: string;\n\n  /**\n   * The direction of the arrow\n   * @default 'down'\n   */\n  direction?: 'up' | 'right' | 'down' | 'left';\n\n  /**\n   * Theme for the Arrow.\n   */\n  theme?: ArrowTheme;\n}\n\nexport const Arrow: FC<ArrowProps> = ({\n  direction = 'down',\n  className,\n  theme: customTheme\n}) => {\n  const theme: ArrowTheme = useComponentTheme('arrow', customTheme);\n\n  return (\n    <svg\n      className={cn(theme.base, theme[direction], className)}\n      xmlns=\"http://www.w3.org/2000/svg\"\n      x=\"0px\"\n      y=\"0px\"\n      width=\"50\"\n      height=\"50\"\n      viewBox=\"0 0 32 32\"\n      fill=\"currentColor\"\n    >\n      <path d=\"M 4.21875 10.78125 L 2.78125 12.21875 L 15.28125 24.71875 L 16 25.40625 L 16.71875 24.71875 L 29.21875 12.21875 L 27.78125 10.78125 L 16 22.5625 Z\" />\n    </svg>\n  );\n};\n","export interface ArrowTheme {\n  /** CSS class applied to the root arrow element. */\n  base: string;\n  /** CSS class applied when the arrow points up. */\n  up: string;\n  /** CSS class applied when the arrow points down. */\n  down: string;\n  /** CSS class applied when the arrow points right. */\n  right: string;\n  /** CSS class applied when the arrow points left. */\n  left: string;\n}\n\nconst baseTheme: ArrowTheme = {\n  base: '',\n  up: 'rotate-180',\n  down: '',\n  left: 'rotate-90',\n  right: '-rotate-90'\n};\n\nexport const arrowTheme: ArrowTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'text-text-primary'].join(' ')\n};\n","import { ReactNode, createContext, useContext } from 'react';\n\nexport interface TreeContextProps {\n  /**\n   * A custom icon to be used for collapsed nodes.\n   */\n  collapsedIcon?: any;\n\n  /**\n   * A custom icon to be used for expanded nodes.\n   */\n  expandedIcon?: any;\n}\n\nexport const TreeContext = createContext<TreeContextProps>({\n  collapsedIcon: null,\n  expandedIcon: null\n});\n","import React, { FC, PropsWithChildren, useMemo } from 'react';\nimport { Arrow } from '@/elements/Arrow';\nimport { TreeContext, TreeContextProps } from './TreeContext';\nimport { TreeTheme } from './TreeTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport type TreeProps = {\n  /**\n   * CSS Classname to apply to the tree\n   */\n  className?: string;\n\n  /**\n   * Extra style attributes to apply to the tree\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * Theme for the Tree\n   */\n  theme?: TreeTheme;\n} & TreeContextProps &\n  PropsWithChildren;\n\nexport const Tree: FC<TreeProps> = ({\n  children,\n  className,\n  expandedIcon,\n  collapsedIcon,\n  theme: customTheme,\n  ...rest\n}) => {\n  const theme: TreeTheme = useComponentTheme('tree', customTheme);\n\n  expandedIcon = expandedIcon ?? (\n    <Arrow direction=\"down\" className={theme.arrow} />\n  );\n  collapsedIcon = collapsedIcon ?? (\n    <Arrow direction=\"right\" className={theme.arrow} />\n  );\n\n  const values = useMemo(\n    () => ({\n      expandedIcon,\n      collapsedIcon\n    }),\n    [collapsedIcon, expandedIcon]\n  );\n\n  return (\n    <TreeContext.Provider value={values}>\n      <div className={cn(theme.tree, className)} {...rest}>\n        <ul className={theme.base}>{children}</ul>\n      </div>\n    </TreeContext.Provider>\n  );\n};\n","import React, {\n  Children,\n  ReactNode,\n  FC,\n  useState,\n  useEffect,\n  useCallback,\n  useContext,\n  PropsWithChildren\n} from 'react';\nimport { Button } from '@/elements/Button';\nimport { Collapse } from '@/layout/Collapse';\nimport { TreeContext } from './TreeContext';\nimport { TreeTheme } from './TreeTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface TreeNodeProps extends PropsWithChildren {\n  /**\n   * Label to display for the node\n   */\n  label?: ReactNode | string;\n\n  /**\n   * CSS Classname to apply to the node\n   */\n  className?: string;\n\n  /**\n   * Whether the node is expanded or not\n   */\n  expanded?: boolean;\n\n  /**\n   * Whether the node is disabled or not\n   */\n  disabled?: boolean;\n\n  /**\n   * Theme for the Tree\n   */\n  theme?: TreeTheme;\n\n  /**\n   * Event fired when the node is expanded\n   */\n  onExpand?: () => void;\n\n  /**\n   * Event fired when the node is collapsed\n   */\n  onCollapse?: () => void;\n}\n\nexport const TreeNode: FC<TreeNodeProps> = ({\n  children,\n  className,\n  label,\n  disabled,\n  expanded: expandedProp,\n  onExpand,\n  onCollapse,\n  theme: customTheme\n}) => {\n  const { expandedIcon, collapsedIcon } = useContext(TreeContext);\n  const [expanded, setExpanded] = useState<boolean>(expandedProp as boolean);\n\n  // Note: Need to use `toArray` vs `count` since it doesn't count non-rendered children\n  const hasChildren = children && Children.toArray(children).length > 0;\n\n  useEffect(() => {\n    setExpanded(expandedProp as boolean);\n  }, [expandedProp]);\n\n  const onButtonClick = useCallback(() => {\n    const newState = !expanded;\n    setExpanded(newState);\n\n    if (newState) {\n      onExpand?.();\n    } else {\n      onCollapse?.();\n    }\n  }, [expanded, onCollapse, onExpand]);\n\n  const theme: TreeTheme = useComponentTheme('tree', customTheme);\n\n  return (\n    <li className={cn(theme.node.base, className)}>\n      <div className={theme.nodeBlock}>\n        {hasChildren && (\n          <Button\n            size=\"small\"\n            disabled={disabled}\n            variant=\"text\"\n            title={expanded ? 'Collapse' : 'Expand'}\n            className={cn(\n              theme.node.button.base,\n              disabled && theme.node.disabled\n            )}\n            onClick={onButtonClick}\n          >\n            {expanded ? expandedIcon : collapsedIcon}\n          </Button>\n        )}\n        <span\n          className={cn(\n            theme.node.label,\n            !hasChildren && theme.node.leaf,\n            disabled && theme.node.disabled\n          )}\n        >\n          {label}\n        </span>\n      </div>\n      {hasChildren && (\n        <Collapse expanded={expanded}>\n          {() => <ul className={theme.subtree}>{children}</ul>}\n        </Collapse>\n      )}\n    </li>\n  );\n};\n","export interface TreeTheme {\n  /** CSS class applied to the root tree container. */\n  base: string;\n  /** CSS class applied to the tree element. */\n  tree: string;\n  /** CSS class applied to the expand/collapse arrow icon. */\n  arrow: string;\n  /** Class names applied to each tree node and its parts. */\n  node: {\n    base: string;\n    collapsed: string;\n    disabled: string;\n    leaf: string;\n    label: string;\n    button: {\n      base: string;\n      icon: string;\n    };\n  };\n  /** CSS class applied to the block wrapping a node and its toggle. */\n  nodeBlock: string;\n  /** CSS class applied to a nested subtree under a node. */\n  subtree: string;\n}\n\nconst baseTheme: TreeTheme = {\n  base: 'relative m-0 p-0 list-none',\n  tree: 'border pt-1 pb-1 px-3 border-solid border-transparent',\n  arrow: 'w-3 h-3',\n  node: {\n    base: 'pt-0.5 m-0 list-style-none first:pt-0 last:pb-0',\n    collapsed: '-rotate-90',\n    disabled: 'opacity-60',\n    leaf: 'pl-4',\n    label: '',\n    button: {\n      base: 'min-w-[auto] min-h-[auto] w-auto h-auto transition-transform duration-100 ease-in-out ml-0 mr-1 my-0 p-0',\n      icon: 'align-middle block h-2 w-2 m-0.5'\n    }\n  },\n  nodeBlock: 'flex items-center',\n  subtree: 'relative ml-5 mr-0 mt-1 mb-0 p-0'\n};\n\nexport const treeTheme: TreeTheme = {\n  ...baseTheme,\n  arrow: [baseTheme.arrow, 'fill-text-primary'].join(' '),\n  node: {\n    ...baseTheme.node,\n    base: [baseTheme.node.base, 'text-text-primary'].join(' '),\n    button: {\n      ...baseTheme.node.button,\n      icon: [baseTheme.node.button.icon, 'fill-text-primary'].join(' ')\n    }\n  }\n};\n","/**\n * Check if provided parameter is plain object\n * @param item\n * @returns boolean\n */\nexport function isObject(item: unknown): item is Record<string, unknown> {\n  return (\n    item !== null && typeof item === 'object' && item.constructor === Object\n  );\n}\n","import { isObject } from './isObject';\n\n/**\n * Deep clone an object.\n */\nexport function cloneDeep<T>(source: T): T {\n  if (!isObject(source)) {\n    return source;\n  }\n\n  const output: Record<string, unknown> = {};\n\n  for (const key in source) {\n    output[key] = cloneDeep(source[key]);\n  }\n\n  return output as T;\n}\n","import { cloneDeep } from './cloneDeep';\nimport { isObject } from './isObject';\n\ntype MergeFunction = (objValue: any, srcValue: any, key: string) => any;\n\n/**\n * Deep-merges `source` into `target`, returning a new object.\n *\n * - When `mergeFunction` is provided, it is invoked first for every key. If\n *   it returns a non-`undefined` value, that value is used; returning\n *   `undefined` falls back to default merging.\n * - Default merging: plain objects on both sides are merged recursively;\n *   everything else (primitives, arrays, mismatched types) is taken from source.\n */\nexport function mergeDeep<T extends object, S extends object>(\n  target: T,\n  source: S,\n  mergeFunction?: MergeFunction\n): T & S {\n  if (!isObject(target) || !isObject(source)) {\n    return cloneDeep({ ...target, ...source }) as T & S;\n  }\n\n  const output: Record<string, unknown> = { ...target };\n\n  for (const key in source) {\n    const targetValue = (target as Record<string, unknown>)[key];\n    const sourceValue = source[key];\n\n    if (mergeFunction) {\n      const merged = mergeFunction(targetValue, sourceValue, key);\n      if (merged !== undefined) {\n        output[key] = merged;\n        continue;\n      }\n    }\n\n    if (isObject(targetValue) && isObject(sourceValue)) {\n      output[key] = mergeDeep(targetValue, sourceValue, mergeFunction);\n    } else if (isObject(sourceValue)) {\n      output[key] = cloneDeep(sourceValue);\n    } else {\n      output[key] = sourceValue;\n    }\n  }\n\n  return output as T & S;\n}\n","import classNames from 'classnames';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Classnames and tailwind merge helper function.\n */\nexport function cn(...args: classNames.ArgumentArray) {\n  return twMerge(classNames(args));\n}\n","/**\n * Gets the theme name from the document element.\n * @returns The theme name.\n */\nexport const getThemeName = (): string => {\n  const themeClassname = Array.from(document.documentElement.classList).find(\n    className => className.startsWith('theme-')\n  );\n  return themeClassname ? themeClassname.replace('theme-', '') : 'dark';\n};\n\n/**\n * Observes class attribute changes on the document element to detect theme switching.\n * @param callback - Function called with the new theme (\"light\" or \"dark\") whenever the theme changes.\n * @returns The MutationObserver instance (can be disconnected later via observer.disconnect()).\n */\nexport const observeThemeSwitcher = (\n  callback: (theme: string) => void\n): MutationObserver => {\n  const targetElement = document.documentElement;\n\n  if (!targetElement) {\n    throw new Error('Document element not found');\n  }\n\n  const observer = new MutationObserver(mutations => {\n    mutations.forEach(mutation => {\n      if (\n        mutation.type === 'attributes' &&\n        mutation.attributeName === 'class'\n      ) {\n        const theme = getThemeName();\n        callback(theme);\n      }\n    });\n  });\n\n  observer.observe(targetElement, {\n    attributes: true,\n    attributeFilter: ['class']\n  });\n\n  return observer;\n};\n\n/**\n * Extracts the variables from a CSS rule.\n * @param rule - The CSS rule to extract the variables from.\n * @param computedStyles - The computed styles of the document.\n * @returns The variables extracted from the CSS rule.\n */\nconst extractVariablesFromRule = (\n  rule: CSSStyleRule,\n  computedStyles: CSSStyleDeclaration\n) => {\n  const variables: string[] = Array.from(rule.style).filter(prop =>\n    prop.startsWith('--')\n  );\n  return variables.reduce(\n    (acc, variable) => {\n      acc[variable] = computedStyles.getPropertyValue(variable).trim();\n      return acc;\n    },\n    {} as Record<string, string>\n  );\n};\n\n/**\n * Gets the theme variables from the document.\n * @returns The theme variables.\n */\nexport const getThemeVariables = (): Record<string, string> => {\n  const computedStyles = getComputedStyle(document.documentElement);\n\n  function getMatchingStyleRules(cssRules: CSSRuleList): CSSStyleRule[] {\n    return Array.from(cssRules).reduce((acc, rule) => {\n      if (\n        rule instanceof CSSStyleRule &&\n        (rule.selectorText === ':root, :host' ||\n          rule.selectorText === ':root' ||\n          rule.selectorText === ':host')\n      ) {\n        acc.push(rule);\n      }\n      if ('cssRules' in rule && (rule.cssRules as CSSRuleList).length > 0) {\n        acc.push(...getMatchingStyleRules(rule.cssRules as CSSRuleList));\n      }\n      return acc;\n    }, [] as CSSStyleRule[]);\n  }\n\n  const cssRules: CSSStyleRule[] = Array.from(document.styleSheets).flatMap(\n    (styleSheet: CSSStyleSheet) => {\n      try {\n        return getMatchingStyleRules(styleSheet.cssRules);\n      } catch (error) {\n        // In case of cross-origin issues, ignore this stylesheet\n        return [];\n      }\n    }\n  );\n  const selectorVariablesMap: Record<string, Record<string, string>> = {};\n  cssRules.forEach((rule, index) => {\n    const variableMap = extractVariablesFromRule(rule, computedStyles);\n    selectorVariablesMap[`${rule.selectorText}-${index}`] = variableMap;\n  });\n\n  const variables = Object.entries(selectorVariablesMap)\n    .map(([, tokens]) => tokens)\n    .reduce((acc, item) => ({ ...acc, ...item }), {});\n\n  return variables;\n};\n\n/**\n * Gets the theme variable from the document.\n * @param variable - The variable to get the value of.\n * @returns The value of the variable.\n */\nexport const getThemeVariable = (variable: string): string => {\n  const computedStyles = getComputedStyle(document.documentElement);\n\n  return computedStyles.getPropertyValue(variable).trim();\n};\n","import { cn } from './cn';\n\n/**\n * Customizer for extendTheme that merges class strings instead of replacing them.\n * Pass as the third argument to extendTheme to append/override specific Tailwind\n * classes rather than wholesale replacing a theme property.\n *\n * @example\n * extendTheme(theme, customTheme, mergeThemeClasses)\n */\nexport function mergeThemeClasses(\n  source: any,\n  target: any\n): string | undefined {\n  if (typeof source === 'string' && typeof target === 'string') {\n    return cn(source, target);\n  }\n  return undefined;\n}\n","'use client';\n\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useEffect,\n  useState\n} from 'react';\nimport { getThemeVariables, mergeDeep, observeThemeSwitcher } from './helpers';\nimport { ReablocksTheme, theme as defaultTheme } from './themes/theme';\n\nexport interface ThemeContextProps {\n  /** The active Reablocks theme. */\n  theme: ReablocksTheme;\n  /** Map of CSS custom property tokens resolved from the current theme. */\n  tokens: Record<string, string>;\n  /** Replaces the active theme with the provided one. */\n  updateTheme: (newTheme: ReablocksTheme) => void;\n  /** Replaces the active token map with the provided one. */\n  updateTokens: (newTokens: Record<string, string>) => void;\n}\n\nexport const ThemeContext = createContext<ThemeContextProps>(null);\n\ninterface ThemeProviderProps extends PropsWithChildren {\n  theme: ReablocksTheme;\n}\n\nexport const ThemeProvider: FC<ThemeProviderProps> = ({ children, theme }) => {\n  const [activeTheme, setActiveTheme] = useState(theme);\n  const [tokens, setTokens] = useState<Record<string, string>>({});\n\n  useEffect(() => {\n    if (theme) {\n      setActiveTheme(mergeDeep(defaultTheme, theme));\n    }\n    setTokens(getThemeVariables());\n\n    const themeObserver = observeThemeSwitcher(() =>\n      setTokens(getThemeVariables())\n    );\n\n    return () => themeObserver.disconnect();\n  }, [theme]);\n\n  const updateTheme = (newTheme: ReablocksTheme) => {\n    setActiveTheme({ ...activeTheme, ...newTheme });\n  };\n\n  return (\n    <ThemeContext.Provider\n      value={{\n        theme: activeTheme,\n        updateTheme,\n        tokens,\n        updateTokens: setTokens\n      }}\n    >\n      {children}\n    </ThemeContext.Provider>\n  );\n};\n","import { useContext } from 'react';\nimport { ThemeContext, ThemeContextProps } from '@/utils/Theme/ThemeProvider';\n\n/**\n * Hook to get the theme context.\n * @returns ThemeContextProps\n */\nexport const useTheme = (): ThemeContextProps | null => {\n  const context = useContext(ThemeContext);\n\n  if (!context) {\n    return null;\n  }\n\n  return context;\n};\n","import { useTheme } from './useTheme';\nimport { ReablocksTheme } from '@/utils/Theme/themes/theme';\n\n/**\n * Hook to get the theme for a specific component.\n * @param component\n * @param customTheme\n * @returns theme object\n */\nexport const useComponentTheme = <T extends any>(\n  component: string,\n  customTheme?: T\n): T => {\n  const context = useTheme();\n\n  if (customTheme) {\n    return customTheme;\n  }\n\n  if (!context) {\n    throw new Error('useTheme must be used within a ThemeProvider');\n  }\n\n  const componentTheme = context.theme.components[component];\n  if (!componentTheme) {\n    throw new Error(`Component ${component} does not exist in theme`);\n  }\n\n  return componentTheme;\n};\n","import React, {\n  FC,\n  useState,\n  useRef,\n  useEffect,\n  useCallback,\n  useMemo\n} from 'react';\nimport ellipsize from 'ellipsize';\nimport { EllipsisTheme } from './EllipsisTheme';\nimport { useComponentTheme } from '@/utils';\n\nexport interface EllipsisProps {\n  /**\n   * The value to ellipsis.\n   */\n  value: string;\n\n  /**\n   * Whether you can expand or not. Default: true.\n   * @default true\n   */\n  expandable?: boolean;\n\n  /**\n   * Limit of characters to show. Default: 256.\n   * @default 256\n   */\n  limit?: number;\n\n  /**\n   * The title text to show on the hover.\n   */\n  title?: string | false;\n\n  /**\n   * Remove line breaks or not.\n   * @default true\n   */\n  removeLinebreaks?: boolean;\n\n  /**\n   * Class name for the container.\n   */\n  className?: string;\n\n  /**\n   * Theme for the Ellipsis.\n   */\n  theme?: EllipsisTheme;\n\n  /**\n   * Number of lines to show before truncation. If set, overrides the character limit.\n   */\n  lines?: number;\n\n  /**\n   * Custom text for the expand button. Default: \"...\"\n   * @default '...'\n   */\n  moreText?: string;\n\n  /**\n   * Custom text for the collapse button. Default: \"Show less\"\n   * @default 'Show less'\n   */\n  lessText?: string;\n}\n\nexport const Ellipsis: FC<EllipsisProps> = ({\n  value,\n  className,\n  title,\n  removeLinebreaks = true,\n  expandable = true,\n  limit = 256,\n  lines,\n  moreText = '...',\n  lessText = 'Show less',\n  theme: customTheme\n}) => {\n  const [expanded, setExpanded] = useState<boolean>(false);\n  const [isTruncated, setIsTruncated] = useState<boolean>(false);\n  const [isMeasured, setIsMeasured] = useState<boolean>(false);\n  const [truncatedText, setTruncatedText] = useState<string>(value);\n  const contentRef = useRef<HTMLDivElement>(null);\n  const theme: EllipsisTheme = useComponentTheme('ellipsis', customTheme);\n\n  const substr = useMemo(() => {\n    const formatted = removeLinebreaks\n      ? value.replace(/(\\r\\n|\\n|\\r)/gm, ' ')\n      : value;\n    return ellipsize(formatted, limit, { ellipse: expandable ? '' : '...' });\n  }, [expandable, limit, value, removeLinebreaks]);\n\n  const measureText = useCallback(() => {\n    if (lines === undefined) {\n      if (substr.length !== value.length) {\n        setTruncatedText(substr);\n        setIsTruncated(true);\n      }\n      setIsMeasured(true);\n      return;\n    }\n\n    if (!contentRef.current) {\n      return;\n    }\n\n    const content = contentRef.current;\n    const lineHeight = parseInt(window.getComputedStyle(content).lineHeight);\n    const maxHeight = lines ? lineHeight * lines : content.clientHeight;\n\n    content.style.maxHeight = `${maxHeight}px`;\n    content.style.overflow = 'hidden';\n\n    let truncated = value;\n    content.textContent = truncated + moreText;\n\n    if (content.scrollHeight > maxHeight) {\n      setIsTruncated(true);\n      while (content.scrollHeight > maxHeight && truncated.length > 0) {\n        truncated = truncated.slice(0, -1).trim();\n        content.textContent = truncated + moreText;\n      }\n      setTruncatedText(truncated);\n    } else {\n      setIsTruncated(false);\n      setTruncatedText(value);\n    }\n\n    content.style.maxHeight = '';\n    content.style.overflow = '';\n    setIsMeasured(true);\n  }, [lines, value, moreText, substr]);\n\n  useEffect(() => {\n    // NOTE: The contentRef is used to measure the text. It must be a child of the parent element\n    // and positioned as a block element (div). The contentRef is not used to render the text due\n    // to the way wrapping works in CSS.\n    measureText();\n    if (lines !== undefined && typeof window !== 'undefined') {\n      window.addEventListener('resize', measureText);\n      return () => window.removeEventListener('resize', measureText);\n    }\n  }, [measureText, lines]);\n\n  const toggleExpand = (event: React.MouseEvent) => {\n    event.stopPropagation();\n    setExpanded(!expanded);\n  };\n\n  return (\n    <div className={className}>\n      {!isMeasured && lines !== undefined && (\n        <div ref={contentRef} className=\"invisible\">\n          {value}\n        </div>\n      )}\n      {isMeasured && (\n        <>\n          <span title={title !== false ? title || value : undefined}>\n            {expanded ? value : truncatedText}\n          </span>\n          {expandable && isTruncated && (\n            <>\n              {expanded ? ' ' : ''}\n              <button\n                type=\"button\"\n                title={\n                  expanded\n                    ? 'Click to show less'\n                    : 'Click to view rest of content'\n                }\n                className={theme.dots}\n                onClick={toggleExpand}\n              >\n                {expanded ? lessText : moreText}\n              </button>\n            </>\n          )}\n        </>\n      )}\n    </div>\n  );\n};\n","export interface EllipsisTheme {\n  /** CSS class applied to the ellipsis dots toggle element. */\n  dots: string;\n}\n\nconst baseTheme: EllipsisTheme = {\n  dots: 'cursor-pointer opacity-50 text-[unset] p-0 border-[none] outline-hidden'\n};\n\nexport const ellipsisTheme: EllipsisTheme = {\n  ...baseTheme\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\n\nexport interface InfinityListInputs {\n  /**\n   * The array of items to page on.\n   */\n  items: any[];\n\n  /**\n   * The page size. Combined with the threshold, this will determine the page size.\n   * @default 10\n   */\n  size?: number;\n\n  /**\n   * The fuzzy threshold to use when calculating the next page size.\n   * @default 3\n   */\n  threshold?: number;\n\n  /**\n   * The numer of items to show in the next page. If undefined, will use the size.\n   * If you want to show all items, pass infinity.\n   */\n  nextSize?: number;\n}\n\nexport const useInfinityList = ({\n  items,\n  threshold = 3,\n  size = 10,\n  nextSize\n}: InfinityListInputs) => {\n  const [index, setIndex] = useState<number>(0);\n  const data = useMemo(() => [...items].slice(0, index), [index, items]);\n  const hasMore = index < items.length;\n  const remaining = items.length - index;\n\n  const showNext = useCallback(\n    (amount?: number) => {\n      if (hasMore) {\n        const nextAmount =\n          nextSize === Infinity ? remaining : nextSize || amount || size;\n        const newIndex = Math.min(items.length, index + nextAmount);\n        setIndex(newIndex);\n      }\n    },\n    [hasMore, index, size, items, remaining, nextSize]\n  );\n\n  useEffect(() => {\n    const len = items?.length || 0;\n    const endIdx =\n      len <= size + threshold ? size + threshold : Math.min(len, size);\n\n    setIndex(endIdx);\n  }, [items.length, size, threshold]);\n\n  return {\n    data,\n    hasMore,\n    remaining,\n    showNext\n  };\n};\n","import React, { FC, Children, Fragment } from 'react';\nimport { useInfinityList, InfinityListInputs } from './useInfinityList';\n\nexport interface InfinityListProps extends Omit<InfinityListInputs, 'items'> {\n  /**\n   * The children to filter.\n   */\n  children: any;\n\n  /**\n   * CSS Classname to apply to the button.\n   */\n  buttonClassName?: string;\n}\n\nexport const InfinityList: FC<InfinityListProps> = ({\n  children,\n  size = 10,\n  threshold = 3,\n  nextSize,\n  buttonClassName\n}) => {\n  const arr = Children.toArray(children);\n  const { data, hasMore, remaining, showNext } = useInfinityList({\n    items: arr,\n    size,\n    threshold,\n    nextSize\n  });\n\n  return (\n    <>\n      {data.map((child, i) => (\n        <Fragment key={i}>{child}</Fragment>\n      ))}\n      {hasMore && (\n        <button\n          className={buttonClassName}\n          onClick={event => {\n            event.stopPropagation();\n            showNext();\n          }}\n        >\n          Show {Math.min(size, remaining)} more\n        </button>\n      )}\n    </>\n  );\n};\n","import React, { FC, useCallback, useMemo } from 'react';\nimport { TreeNode } from '@/layout/Tree/TreeNode';\nimport { JsonTreeData } from './utils';\nimport { useComponentTheme } from '@/utils/Theme/hooks';\nimport { JsonTreeTheme } from './JsonTreeTheme';\nimport { cn } from '@/utils';\nimport { Ellipsis } from '@/data/Ellipsis';\nimport { useInfinityList } from '@/data/InfinityList';\n\nexport interface JsonTreeNodeProps {\n  /**\n   * The data to be rendered as a JSON tree.\n   */\n  data?: JsonTreeData;\n\n  /**\n   * The CSS class name to be applied to the JSON tree node.\n   */\n  className?: string;\n\n  /**\n   * If true, the count of child nodes will be shown next to each node.\n   */\n  showCount?: boolean;\n\n  /**\n   * If true, empty nodes will be shown in the JSON tree.\n   */\n  showEmpty?: boolean;\n\n  /**\n   * The depth of the JSON tree node. This is typically used for indentation purposes.\n   */\n  depth?: number;\n\n  /**\n   * If true, all nodes in the JSON tree will be expanded by default.\n   */\n  showAll?: boolean;\n\n  /**\n   * The limit for the number of nodes to show when `showAll` is false.\n   */\n  showAllLimit?: number;\n\n  /**\n   * The depth at which the JSON tree nodes should be expanded by default.\n   */\n  expandDepth?: number;\n\n  /**\n   * Theme for the Json Tree\n   */\n  theme?: JsonTreeTheme;\n\n  /**\n   * If true, long text in nodes will be truncated and replaced with an ellipsis.\n   */\n  ellipsisText?: boolean;\n\n  /**\n   * The maximum length of text in a node before it is truncated and replaced with an ellipsis.\n   */\n  ellipsisTextLength?: number;\n}\n\nexport const JsonTreeNode: FC<JsonTreeNodeProps> = ({\n  depth,\n  data,\n  expandDepth,\n  className,\n  showCount,\n  showEmpty,\n  showAll,\n  showAllLimit,\n  ellipsisText,\n  ellipsisTextLength,\n  theme: customTheme\n}) => {\n  const theme = useComponentTheme('jsonTree', customTheme);\n  const type = data.type;\n  const isList = type === 'array' || type === 'object';\n  const {\n    data: listData,\n    hasMore,\n    showNext\n  } = useInfinityList({\n    items: isList ? data.data : [],\n    size: showAll ? Infinity : showAllLimit,\n    threshold: 3,\n    nextSize: Infinity\n  });\n\n  const renderExpandableNode = useCallback(() => {\n    const label = type === 'array' ? 'items' : 'keys';\n    const symbol = type === 'array' ? '[]' : '{}';\n\n    return (\n      <>\n        <span className={cn(theme.node.label)}>{data.label}</span>\n        <span className={cn(theme.node.symbol)}>{symbol}</span>\n        {showCount && (\n          <span className={cn(theme.node.count)}>\n            {`(${data.data.length.toLocaleString()} ${label})`}\n          </span>\n        )}\n      </>\n    );\n  }, [data, theme, type, showCount]);\n\n  const renderPrimativeNode = useCallback(() => {\n    const ellipsis = type === 'string' && ellipsisText;\n    const showDelimeter = data.label !== null && data.label !== undefined;\n    const isEmpty = data.data === null || data.data === undefined;\n    const isEmptyString = data.data === '';\n    let valueLabel = data.data?.toString();\n    if (showEmpty) {\n      if (isEmptyString) {\n        valueLabel = '\"\"';\n      } else if (isEmpty) {\n        valueLabel = 'null';\n      }\n    }\n\n    if (!showEmpty && (isEmpty || isEmptyString)) {\n      return null;\n    }\n\n    return (\n      <>\n        <span className={cn(theme.node.label)}>{data.label}</span>\n        {showDelimeter && <span className={cn(theme.node.delimiter)}>:</span>}\n        <span className={cn(theme.node.value)}>\n          {ellipsis && !isEmptyString ? (\n            <Ellipsis\n              value={data.data}\n              limit={ellipsisTextLength}\n              className=\"inline\"\n            />\n          ) : (\n            valueLabel\n          )}\n        </span>\n      </>\n    );\n  }, [data, showEmpty, ellipsisText, ellipsisTextLength, theme, type]);\n\n  const isNestedData = useMemo(\n    () => data.type === 'array' || data.type === 'object',\n    [data.type]\n  );\n  const isNestedDataEmpty = useMemo(() => {\n    if (isNestedData) {\n      return data.type === 'array'\n        ? data.data.length === 0\n        : Object.keys(data.data).length === 0;\n    }\n\n    return false;\n  }, [data.data, data.type, isNestedData]);\n\n  if (!showEmpty && isNestedDataEmpty) {\n    return null;\n  }\n\n  return (\n    <TreeNode\n      className={className}\n      expanded={depth < expandDepth}\n      label={\n        <>\n          {type === 'array' || type === 'object'\n            ? renderExpandableNode()\n            : renderPrimativeNode()}\n        </>\n      }\n    >\n      {isNestedData && !isNestedDataEmpty && (\n        <>\n          {listData.map(item => (\n            <JsonTreeNode\n              key={item.id}\n              data={item}\n              depth={depth + 1}\n              expandDepth={expandDepth}\n              ellipsisText={ellipsisText}\n              ellipsisTextLength={ellipsisTextLength}\n              showCount={showCount}\n              showEmpty={showEmpty}\n              showAll={showAll}\n              showAllLimit={showAllLimit}\n            />\n          ))}\n        </>\n      )}\n      {isList && hasMore && (\n        <span className={cn(theme.pager)} onClick={() => showNext()}>\n          Show all\n        </span>\n      )}\n    </TreeNode>\n  );\n};\n","function getDataType(data: any) {\n  if (data === null || data === undefined) {\n    return 'nil';\n  }\n\n  if (data instanceof Date) {\n    return 'date';\n  }\n\n  if (Array.isArray(data)) {\n    return 'array';\n  }\n\n  if (data != null && data.constructor.name === 'Object') {\n    return 'object';\n  }\n\n  if (typeof data === 'string') {\n    return 'string';\n  }\n\n  if (typeof data === 'number') {\n    return 'number';\n  }\n\n  if (typeof data === 'boolean') {\n    return 'boolean';\n  }\n\n  return 'unknown';\n}\n\nexport interface ParseJsonInputs {\n  /**\n   * The JSON data to parse into a tree structure.\n   */\n  data: any;\n  /**\n   * Identifier for the current node, used as a key prefix for descendants.\n   * @default 'root'\n   */\n  id?: string;\n  /**\n   * Display label for the current node.\n   */\n  label?: string;\n  /**\n   * Index of the current node within its parent (used for array items).\n   */\n  index?: number;\n  /**\n   * Whether to include nodes with empty values in the parsed tree.\n   * @default true\n   */\n  showEmpty?: boolean;\n}\n\nexport interface JsonTreeData {\n  /** Data type of the node (e.g. `object`, `array`, `string`, `number`). */\n  type: string;\n  /** Unique identifier for the node, derived from its path. */\n  id: string;\n  /** Parsed data for the node; an array of child nodes for objects/arrays or the raw value otherwise. */\n  data: any;\n  /** Display label for the node. */\n  label: string;\n  /** Index of the node within its parent (used for array items). */\n  index?: number;\n}\n\nexport function parseJsonTree({\n  id = 'root',\n  data,\n  index,\n  label,\n  showEmpty = true\n}: ParseJsonInputs): JsonTreeData {\n  const type = getDataType(data);\n\n  if (type === 'object') {\n    const keys = Object.keys(data);\n    const result = keys.reduce((parsedItems, key, idx) => {\n      const value = data[key];\n      const childParsed = parseJsonTree({\n        data: value,\n        id: `${id}.${key}`,\n        index: idx,\n        label: key,\n        showEmpty\n      });\n\n      if (showEmpty || (!showEmpty && childParsed !== null)) {\n        parsedItems.push(childParsed);\n      }\n\n      return parsedItems;\n    }, []);\n\n    let labelValue = index !== undefined ? `${index}` : 'root';\n    if (label !== undefined) {\n      labelValue = label;\n    }\n\n    return {\n      type,\n      id,\n      data: result,\n      label: labelValue,\n      index\n    };\n  } else if (type === 'array') {\n    const result = data.map((item, idx) =>\n      parseJsonTree({\n        data: item,\n        id: `${id}[${idx}]`,\n        index: idx,\n        showEmpty\n      })\n    );\n\n    return {\n      type,\n      id,\n      data: result,\n      label,\n      index\n    };\n  } else {\n    return {\n      type,\n      id,\n      data,\n      label,\n      index\n    };\n  }\n}\n","import React, { FC, useMemo } from 'react';\nimport { Tree } from '@/layout/Tree/Tree';\nimport { JsonTreeNode } from './JsonTreeNode';\nimport { parseJsonTree } from './utils';\n\nexport interface JsonTreeProps {\n  /**\n   * The data to be rendered as a JSON tree.\n   */\n  data: { [key: string]: any };\n\n  /**\n   * If true, all nodes in the JSON tree will be expanded by default.\n   * @default false\n   */\n  showAll?: boolean;\n\n  /**\n   * The limit for the number of nodes to show when `showAll` is false.\n   * @default 10\n   */\n  showAllLimit?: number;\n\n  /**\n   * If true, the count of child nodes will be shown next to each node.\n   * @default true\n   */\n  showCount?: boolean;\n\n  /**\n   * If true, empty nodes will be shown in the JSON tree.\n   * @default true\n   */\n  showEmpty?: boolean;\n\n  /**\n   * If true, long text in nodes will be truncated and replaced with an ellipsis.\n   * @default true\n   */\n  ellipsisText?: boolean;\n\n  /**\n   * The maximum length of text in a node before it is truncated and replaced with an ellipsis.\n   * @default 150\n   */\n  ellipsisTextLength?: number;\n\n  /**\n   * The depth at which the JSON tree nodes should be expanded by default.\n   * @default 2\n   */\n  expandDepth?: number;\n\n  /**\n   * If true, the JSON tree will be rendered with a root node.\n   * @default true\n   */\n  root?: boolean;\n\n  /**\n   * The CSS class name to be applied to the JSON tree.\n   */\n  className?: string;\n}\n\nexport const JsonTree: FC<JsonTreeProps> = ({\n  data,\n  className,\n  expandDepth = 2,\n  showEmpty = true,\n  showCount = true,\n  showAll = false,\n  showAllLimit = 10,\n  ellipsisText = true,\n  ellipsisTextLength = 150,\n  root = true,\n  ...rest\n}) => {\n  const tree = parseJsonTree({ data, showEmpty });\n\n  return (\n    <div tabIndex={-1}>\n      <Tree className={className} {...rest}>\n        {root && (\n          <JsonTreeNode\n            key={`node-${tree.id}`}\n            depth={1}\n            data={tree}\n            showEmpty={showEmpty}\n            showCount={showCount}\n            expandDepth={expandDepth}\n            ellipsisText={ellipsisText}\n            ellipsisTextLength={ellipsisTextLength}\n            showAll={showAll}\n            showAllLimit={showAllLimit}\n          />\n        )}\n        {!root &&\n          tree?.data?.map(item => (\n            <JsonTreeNode\n              key={`node-${item.id}`}\n              depth={1}\n              data={item}\n              showEmpty={showEmpty}\n              showCount={showCount}\n              expandDepth={expandDepth}\n              ellipsisText={ellipsisText}\n              ellipsisTextLength={ellipsisTextLength}\n              showAll={showAll}\n              showAllLimit={showAllLimit}\n            />\n          ))}\n      </Tree>\n    </div>\n  );\n};\n","export interface JsonTreeTheme {\n  /** Class names applied to each JSON tree node and its parts. */\n  node: {\n    label: string;\n    value: string;\n    delimiter: string;\n    symbol: string;\n    count: string;\n  };\n  /** CSS class applied to the pager used for paginated nodes. */\n  pager: string;\n}\n\nexport const jsonTreeTheme: JsonTreeTheme = {\n  node: {\n    label: 'font-mono text-anakiwa light:text-blue-500',\n    delimiter: 'pr-1',\n    symbol: 'px-1 opacity-50 font-mono',\n    value: '',\n    count: 'opacity-50'\n  },\n  pager: 'opacity-50 cursor-pointer pl-4'\n};\n","import React, { FC, PropsWithChildren } from 'react';\nimport { TabsTheme } from './TabsTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface TabPanelProps extends PropsWithChildren {\n  /**\n   * The class name to be added to the tab panel.\n   */\n  className?: string;\n\n  /**\n   * Theme for the Tabs.\n   */\n  theme?: TabsTheme;\n}\n\nexport const TabPanel: FC<TabPanelProps> = ({\n  children,\n  className,\n  theme: customTheme\n}) => {\n  const theme: TabsTheme = useComponentTheme('tabs', customTheme);\n  return (\n    <section role=\"tabpanel\" className={cn(theme.panel, className)}>\n      {children}\n    </section>\n  );\n};\n","import React, { FC, PropsWithChildren, ReactElement } from 'react';\nimport { Button } from '@/elements/Button';\nimport { TabsTheme } from './TabsTheme';\nimport { useComponentTheme, cn } from '@/utils';\nimport { motion } from 'motion/react';\n\nexport interface TabProps extends PropsWithChildren {\n  /**\n   * The id of the tab list.\n   * @private\n   */\n  id?: string;\n\n  /**\n   * The class name to be added to the tab container.\n   */\n  containerClassName?: string;\n\n  /**\n   * The class name to be added to the tab.\n   */\n  className?: string;\n\n  /**\n   * The disabled state of the tab.\n   *\n   * @private\n   */\n  disabled?: boolean;\n\n  /**\n   * The selected state of the tab.\n   *\n   * @private\n   */\n  selected?: boolean;\n\n  /**\n   * The callback to be called when the tab is selected.\n   *\n   * @private\n   */\n  onSelect?: () => void;\n\n  /**\n   * Element to display before the Button content.\n   */\n  start?: ReactElement;\n\n  /**\n   * Element to display after the Button content.\n   */\n  end?: ReactElement;\n\n  /**\n   * The size of the tabs.\n   *\n   * @private\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Theme for the Tabs.\n   */\n  theme?: TabsTheme;\n}\n\nexport const Tab: FC<TabProps> = ({\n  children,\n  id,\n  selected,\n  containerClassName,\n  className,\n  disabled,\n  start,\n  end,\n  onSelect,\n  size = 'medium',\n  theme: customTheme\n}) => {\n  const theme: TabsTheme = useComponentTheme('tabs', customTheme);\n\n  return (\n    <span className={cn(theme.list.tab.base, containerClassName)}>\n      <Button\n        start={start}\n        end={end}\n        className={cn(\n          theme.list.tab.button,\n          className,\n          {\n            [theme.list.tab.disabled]: disabled,\n            [theme.list.tab.selected]: selected\n          },\n          theme.list.tab.size?.[size]\n        )}\n        disabled={disabled}\n        role=\"tab\"\n        variant=\"text\"\n        aria-selected={selected ? 'true' : 'false'}\n        aria-disabled={disabled ? 'true' : 'false'}\n        onClick={() => {\n          if (!disabled && onSelect) {\n            onSelect();\n          }\n        }}\n      >\n        {children}\n      </Button>\n      {selected && (\n        <motion.div\n          className={cn(\n            theme.list.indicator?.base,\n            theme.list.indicator?.size?.[size]\n          )}\n          layoutId={`${id}-tabs-underline`}\n        />\n      )}\n    </span>\n  );\n};\n","import React, { FC, PropsWithChildren, Children } from 'react';\nimport { Tab } from './Tab';\nimport { cn, useComponentTheme } from '@/utils';\nimport { TabsTheme } from './TabsTheme';\n\nexport interface TabListProps extends PropsWithChildren {\n  /**\n   * The id of the tab list.\n   * @private\n   */\n  id?: string;\n\n  /**\n   * The class name to be added to the tab list.\n   */\n  className?: string;\n\n  /**\n   * The active index of the tabs.\n   * @private\n   */\n  selectedIndex?: number;\n\n  /**\n   * The direction of the tabs. Default is 'ltr'.\n   * @private\n   */\n  direction?: 'ltr' | 'rtl';\n\n  /**\n   * The callback to be called when a tab is selected.\n   * @private\n   */\n  onSelect?: (index: number) => void;\n\n  /**\n   * The variant of the tabs.\n   * @private\n   * @default 'primary'\n   */\n  variant?: 'primary' | 'secondary';\n\n  /**\n   * The size of the tabs.\n   * @private\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Theme for the Tabs.\n   */\n  theme?: TabsTheme;\n}\n\nexport const TabList: FC<TabListProps> = ({\n  id,\n  children,\n  direction,\n  className,\n  selectedIndex,\n  onSelect,\n  variant = 'primary',\n  size = 'medium',\n  theme: customTheme\n}) => {\n  const theme: TabsTheme = useComponentTheme('tabs', customTheme);\n\n  const childs = Children.toArray(children)\n    .filter((child: any) => child.type?.name === Tab.name)\n    .map((child: any) => child.props);\n\n  return (\n    <nav\n      role=\"tablist\"\n      className={cn(theme.list.base, className, {\n        'justify-end': direction === 'rtl'\n      })}\n    >\n      {childs.map(({ children, ...rest }, index) => (\n        <Tab\n          key={index}\n          {...rest}\n          id={id}\n          selected={index === selectedIndex}\n          onSelect={() => onSelect(index)}\n          size={size}\n        >\n          {children}\n        </Tab>\n      ))}\n      <hr\n        aria-hidden=\"true\"\n        className={cn(theme.list.divider, theme.list.variant[variant].divider)}\n      />\n    </nav>\n  );\n};\n","import React, {\n  Children,\n  FC,\n  Fragment,\n  PropsWithChildren,\n  useEffect,\n  useMemo,\n  useState\n} from 'react';\nimport { cn, useId } from '@/utils';\nimport { AnimatePresence } from 'motion/react';\nimport { useComponentTheme } from '@/utils/Theme/hooks';\nimport { TabsTheme } from './TabsTheme';\nimport { TabPanel } from './TabPanel';\nimport { TabList } from './TabList';\n\nexport interface TabsProps extends PropsWithChildren {\n  /**\n   * The class name to be added to the tabs.\n   */\n  className?: string;\n\n  /**\n   * The active index of the tabs.\n   */\n  selectedIndex?: number;\n\n  /**\n   * The default index of the tabs. Default is 0.\n   * @default 0\n   */\n  defaultIndex?: number;\n\n  /**\n   * The direction of the tabs. Default is 'ltr'.\n   * @default 'ltr'\n   */\n  direction?: 'ltr' | 'rtl';\n\n  /**\n   * The style to be added to the tabs.\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * The variant of the tabs.\n   * @default 'primary'\n   */\n  variant?: 'primary' | 'secondary';\n\n  /**\n   * The size of the tabs.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * The callback to be called when a tab is selected.\n   */\n  onSelect?: (index: number) => void;\n\n  /**\n   * Theme for the Tabs.\n   */\n  theme?: TabsTheme;\n}\n\nexport const Tabs: FC<TabsProps> = ({\n  children,\n  className,\n  style,\n  variant = 'primary',\n  size = 'medium',\n  direction = 'ltr',\n  defaultIndex = 0,\n  selectedIndex,\n  onSelect,\n  theme: customTheme\n}) => {\n  const id = useId();\n  const theme: TabsTheme = useComponentTheme('tabs', customTheme);\n  const [internalActive, setInternalActive] = useState<number>(\n    selectedIndex || defaultIndex\n  );\n\n  useEffect(() => {\n    // Handle controlled scenarios\n    if (selectedIndex !== undefined) {\n      setInternalActive(selectedIndex);\n    }\n  }, [selectedIndex]);\n\n  const [tabList, panels] = useMemo(() => {\n    const childs = Children.toArray(children);\n\n    const [tabList] = childs\n      .filter((child: any) => child.type?.name === TabList.name)\n      .map((child: any) => child.props);\n\n    const panels = childs\n      .filter((child: any) => child.type?.name === TabPanel.name)\n      .map((child: any) => child.props);\n\n    return [tabList, panels];\n  }, [children]);\n\n  return (\n    <div className={cn(theme.base, className)} style={style}>\n      <TabList\n        {...tabList}\n        variant={variant}\n        size={size}\n        direction={direction}\n        id={id}\n        selectedIndex={internalActive}\n        theme={theme}\n        onSelect={idx => {\n          setInternalActive(idx);\n          onSelect?.(idx);\n        }}\n      />\n      <AnimatePresence>\n        {panels.map(({ children, ...rest }, index) => (\n          <Fragment key={index}>\n            {internalActive === index && (\n              <TabPanel {...rest}>{children}</TabPanel>\n            )}\n          </Fragment>\n        ))}\n      </AnimatePresence>\n    </div>\n  );\n};\n","export interface TabsTheme {\n  /** CSS class applied to the root tabs container. */\n  base: string;\n  /** Class names applied to the tabs list and its inner elements. */\n  list: {\n    base: string;\n    indicator: {\n      base: string;\n      size: {\n        small: string;\n        medium: string;\n        large: string;\n        [key: string]: string;\n      };\n    };\n    divider: string;\n    variant: {\n      primary: {\n        divider: string;\n      };\n      secondary: {\n        divider: string;\n      };\n    };\n    tab: {\n      base: string;\n      button: string;\n      selected: string;\n      disabled: string;\n      size: {\n        small: string;\n        medium: string;\n        large: string;\n        [key: string]: string;\n      };\n    };\n  };\n  /** CSS class applied to the tab panel content area. */\n  panel: string;\n}\n\nconst baseTheme: TabsTheme = {\n  base: 'flex flex-col',\n  list: {\n    base: 'flex text-center flex-wrap -mb-px',\n    indicator: {\n      base: 'bg-primary absolute bottom-0 left-0 right-0',\n      size: {\n        small: 'h-0.5',\n        medium: 'h-0.5',\n        large: 'h-1'\n      }\n    },\n    divider: 'w-full h-px border-0',\n    variant: {\n      primary: {\n        divider: 'bg-surface'\n      },\n      secondary: {\n        divider: 'bg-linear-to-r from-transparent to-transparent via-primary'\n      }\n    },\n    tab: {\n      base: 'relative',\n      button:\n        'transition-colors text-text-secondary font-bold hover:text-primary-hover',\n      selected: 'text-text-primary',\n      disabled: 'cursor-not-allowed opacity-40',\n      size: {\n        small: 'pb-1 text-sm',\n        medium: 'pb-2 text-lg',\n        large: 'pb-4 text-xl'\n      }\n    }\n  },\n  panel: 'mt-2'\n};\n\nexport const tabsTheme = baseTheme;\n","import { cn, useComponentTheme } from '@/utils';\nimport React, { FC } from 'react';\nimport { BreadcrumbsTheme } from './BreadcrumbsTheme';\n\nexport interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {\n  /** Theme for the Breadcrumbs. */\n  theme?: BreadcrumbsTheme;\n}\n\nexport const Breadcrumbs: FC<BreadcrumbsProps> = ({\n  theme: customTheme,\n  className,\n  ...rest\n}) => {\n  const theme = useComponentTheme('breadcrumbs', customTheme);\n\n  return (\n    <nav\n      className={cn(theme.base, className)}\n      aria-label={rest?.['aria-label'] ?? 'breadcrumbs'}\n      {...rest}\n    />\n  );\n};\n","export interface BreadcrumbsTheme {\n  /** CSS class applied to the root breadcrumbs container. */\n  base: string;\n  /** CSS class applied to the separator between breadcrumb items. */\n  separator: string;\n  /** CSS class applied to the breadcrumb list element. */\n  list: string;\n  /** CSS class applied to each breadcrumb link. */\n  link: string;\n  /** CSS class applied to the active (current) page item. */\n  activePage: string;\n}\n\nexport const breadcrumbsTheme: BreadcrumbsTheme = {\n  base: '',\n  separator: '[&>svg]:size-3.5',\n  list: 'flex gap-2 items-center',\n  link: 'hover:text-text-primary text-text-secondary transition-colors',\n  activePage: 'text-primary pointer-events-none'\n};\n","import React, { FC } from 'react';\nimport { cn } from '@/utils';\n\nexport const BreadcrumbItem: FC<React.LiHTMLAttributes<HTMLLIElement>> = ({\n  className,\n  ...rest\n}) => <li className={cn('flex gap-2 items-center', className)} {...rest} />;\n","import React, { FC } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { BreadcrumbsTheme } from './BreadcrumbsTheme';\n\nexport interface BreadcrumbLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n  /** Theme for the Breadcrumbs. */\n  theme?: BreadcrumbsTheme;\n}\n\nexport const BreadcrumbLink: FC<BreadcrumbLinkProps> = ({\n  className,\n  theme: customTheme,\n  href,\n  ...rest\n}) => {\n  const theme = useComponentTheme('breadcrumbs', customTheme);\n\n  return <a className={cn(theme.link, className)} href={href} {...rest} />;\n};\n","import React, { FC } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { BreadcrumbsTheme } from './BreadcrumbsTheme';\n\nexport interface BreadcrumbListProps extends React.OlHTMLAttributes<HTMLOListElement> {\n  /** Theme for the Breadcrumbs. */\n  theme?: BreadcrumbsTheme;\n}\n\nexport const BreadcrumbList: FC<BreadcrumbListProps> = ({\n  className,\n  theme: customTheme,\n  ...rest\n}) => {\n  const theme = useComponentTheme('breadcrumbs', customTheme);\n\n  return <ol className={cn(theme.list, className)} {...rest} />;\n};\n","import { Arrow } from '@/elements';\nimport { cn, useComponentTheme } from '@/utils';\nimport React, { FC } from 'react';\nimport { BreadcrumbsTheme } from './BreadcrumbsTheme';\n\nexport interface BreadcrumbSeparatorProps extends React.LiHTMLAttributes<HTMLLIElement> {\n  /** Theme for the Breadcrumbs. */\n  theme?: BreadcrumbsTheme;\n}\n\nexport const BreadcrumbSeparator: FC<BreadcrumbSeparatorProps> = ({\n  children = <Arrow direction=\"right\" />,\n  className,\n  theme: customTheme,\n  ...rest\n}) => {\n  const theme = useComponentTheme('breadcrumbs', customTheme);\n\n  return (\n    <li\n      role=\"presentation\"\n      aria-hidden={true}\n      className={cn(theme.separator, className)}\n      {...rest}\n    >\n      {children}\n    </li>\n  );\n};\n","import { cn, useComponentTheme } from '@/utils';\nimport React, { FC } from 'react';\nimport { BreadcrumbsTheme } from './BreadcrumbsTheme';\n\nexport interface BreadcrumbPageProps extends React.HTMLAttributes<HTMLSpanElement> {\n  /** Theme for the Breadcrumbs. */\n  theme?: BreadcrumbsTheme;\n}\n\nexport const BreadcrumbPage: FC<BreadcrumbPageProps> = ({\n  theme: customTheme,\n  className,\n  ...rest\n}) => {\n  const theme = useComponentTheme('breadcrumbs', customTheme);\n\n  return (\n    <span\n      role=\"link\"\n      aria-disabled=\"true\"\n      aria-current=\"page\"\n      className={cn(theme.activePage, className)}\n      {...rest}\n    />\n  );\n};\n","import React, { FC, PropsWithChildren } from 'react';\n\nexport interface StepProps extends PropsWithChildren {\n  /**\n   * Optional Text of the marker\n   */\n  label?: string;\n\n  /**\n   * CSS Classname to applied to the Step\n   */\n  className?: string;\n}\n\nexport const Step: FC<StepProps> = ({ children, className }) => (\n  <div className={className}>{children}</div>\n);\n","import { MotionGroup, MotionItem } from '@/layout';\nimport { StepperTheme } from './StepperTheme';\nimport { cn, useComponentTheme } from '@/utils';\nimport React, { Children, FC, Fragment, PropsWithChildren } from 'react';\nimport { MotionNodeAnimationOptions } from 'motion';\n\nimport { Step, StepProps } from './Step';\n\nexport interface StepperProps extends PropsWithChildren {\n  /**\n   * CSS Classname to applied to the Stepper\n   */\n  className?: string;\n\n  /**\n   * Currently active step\n   * @default 0\n   */\n  activeStep?: number;\n\n  /**\n   * Theme for the Stepper.\n   */\n  theme?: StepperTheme;\n\n  /**\n   * Style of the stepper. Default is dots but it can be numbered too.\n   * @default 'default'\n   */\n  variant?: 'default' | 'numbered';\n\n  /**\n   * Display link after last step\n   */\n  continuous?: boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * Animate items appearance\n   */\n  animated?: boolean;\n\n  /**\n   * Animation configuration for the Stepper.\n   */\n  animation?: MotionNodeAnimationOptions;\n}\n\nexport const Stepper: FC<StepperProps> = ({\n  className,\n  activeStep = 0,\n  children,\n  variant = 'default',\n  continuous,\n  animated,\n  animation,\n  theme: customTheme\n}) => {\n  const theme: StepperTheme = useComponentTheme('stepper', customTheme);\n\n  const childrenStepProps = Children.toArray(children)\n    .filter((child: any) => child.type?.name === Step.name)\n    .map((child: any) => child.props);\n\n  const totalSteps = childrenStepProps.length - 1;\n\n  return (\n    <MotionGroup\n      className={cn(theme.base, className)}\n      {...(animation\n        ? animation\n        : {\n            initial: animated ? 'initial' : null,\n            animate: animated ? 'animate' : null\n          })}\n    >\n      {childrenStepProps.map((props: StepProps, index) => (\n        <Fragment key={index}>\n          <div\n            className={cn(theme.step.base, {\n              'border-transparent': index === totalSteps && !continuous,\n              [theme.step.active]: index < activeStep - 1\n            })}\n          >\n            <MotionItem>\n              <div className={theme.step.marker.container}>\n                {/* Numbered marker */}\n                {variant === 'numbered' && (\n                  <div\n                    className={cn(theme.step.marker.label.base, {\n                      [theme.step.marker.label.active]: index < activeStep\n                    })}\n                  >\n                    {index + 1}\n                  </div>\n                )}\n                {/* Labeled marker */}\n                {variant !== 'numbered' && props.label && (\n                  <div\n                    className={cn(theme.step.marker.label.base, {\n                      [theme.step.marker.label.active]: index < activeStep\n                    })}\n                  >\n                    <div\n                      className={cn(theme.step.marker.base, {\n                        [theme.step.marker.active]: index < activeStep\n                      })}\n                    />\n                    {props.label}\n                  </div>\n                )}\n                {/* Dot marker */}\n                {variant !== 'numbered' && !props.label && (\n                  <div\n                    className={cn(theme.step.marker.base, {\n                      [theme.step.marker.active]: index < activeStep\n                    })}\n                  />\n                )}\n              </div>\n            </MotionItem>\n          </div>\n          <MotionItem>\n            <Step\n              className={cn(theme.step.content, props.className)}\n              {...props}\n            />\n          </MotionItem>\n        </Fragment>\n      ))}\n    </MotionGroup>\n  );\n};\n","export interface StepperTheme {\n  /** CSS class applied to the root stepper container. */\n  base: string;\n  /** Class names applied to each step. */\n  step: {\n    base: string;\n    marker: {\n      container: string;\n      base: string;\n      active: string;\n      label: {\n        base: string;\n        active: string;\n      };\n    };\n    active: string;\n    content: string;\n  };\n}\n\nexport const stepperTheme: StepperTheme = {\n  base: 'grid grid-cols-[min-content_1fr] gap-x-3',\n  step: {\n    base: 'border-l border-solid border-panel-accent translate-x-1/2',\n    marker: {\n      base: 'rounded-full w-[9px] h-[9px] bg-surface',\n      container:\n        'w-max pt-1 pb-0.5 backdrop-blur-md -translate-x-[calc(50%+0.5px)]',\n      active: 'bg-info',\n      label: {\n        base: 'flex flex-row items-center gap-1 border border-solid border-surface px-3 py-1 rounded-[20px]',\n        active: 'border-info bg-info-background'\n      }\n    },\n    active: 'border-primary',\n    content: 'pb-6'\n  }\n};\n","import React, { FC, useCallback, useMemo, useState } from 'react';\nimport { AnimatePresence, motion } from 'motion/react';\nimport {\n  getHours,\n  getMinutes,\n  getSeconds,\n  isAfter,\n  isBefore,\n  isSameDay,\n  isSameHour,\n  setHours,\n  setMinutes,\n  setSeconds\n} from 'date-fns';\nimport { TimeColumn } from './TimeColumn';\nimport type { CalendarTheme } from '@/form/Calendar/CalendarTheme';\nimport { Divider } from '@/layout';\nimport { cn } from '@/utils';\n\nexport type AmPm = 'AM' | 'PM';\n\nexport interface CalendarTimesProps {\n  /**\n   * The current date time value.\n   */\n  value: Date;\n\n  /**\n   * The minimum selectable date for the calendar.\n   */\n  min?: Date;\n\n  /**\n   * The maximum selectable date for the calendar.\n   */\n  max?: Date;\n\n  /**\n   * Callback fired when the time changes.\n   */\n  onChange: (newDate: Date) => void;\n\n  /**\n   * Theme for the Calendar Time section.\n   */\n  theme?: CalendarTheme['time'];\n\n  /**\n   * Whether day of week labels are shown in the calendar\n   * @default false\n   */\n  showDayOfWeek?: boolean;\n\n  /**\n   * Whether to use 12-hour cycle for the time picker.\n   * @default false\n   */\n  is12HourCycle?: boolean;\n}\n\nconst HOURS_24 = Array.from({ length: 24 }, (_, i) => i);\nconst HOURS_12 = [12, ...Array.from({ length: 11 }, (_, i) => i + 1)];\nconst MINUTES = Array.from({ length: 60 }, (_, i) => i);\nconst SECONDS = Array.from({ length: 60 }, (_, i) => i);\n\nexport const CalendarTimes: FC<CalendarTimesProps> = ({\n  value,\n  min,\n  max,\n  onChange,\n  theme: timeTheme,\n  showDayOfWeek = false,\n  is12HourCycle = false\n}) => {\n  // If the value is not a valid date, set it to midnight of the current date.\n  // This allow to use the current date for the time picker.\n  const safeDate = useMemo(() => {\n    if (!value || isNaN(value.getTime())) {\n      const midnight = new Date().setHours(0, 0, 0, 0);\n      return midnight;\n    }\n\n    return value;\n  }, [value]);\n\n  const onChangeHandler = useCallback(\n    (newDate: Date) => {\n      if (isAfter(newDate, max)) {\n        newDate = max;\n      } else if (isBefore(newDate, min)) {\n        newDate = min;\n      }\n      onChange(newDate);\n    },\n    [onChange, max, min]\n  );\n\n  const handleHourChange = useCallback(\n    (hour: number) => {\n      let newDate = setHours(safeDate, hour);\n      if (is12HourCycle) {\n        const isPM = getHours(safeDate) >= 12;\n        if (hour === 12) {\n          newDate = setHours(newDate, 0);\n        } else if (isPM) {\n          newDate = setHours(newDate, getHours(newDate) + 12);\n        }\n      }\n      onChangeHandler(newDate);\n    },\n    [is12HourCycle, safeDate, onChangeHandler]\n  );\n\n  const handleMinuteChange = useCallback(\n    (minute: number) => {\n      const newDate = setMinutes(safeDate, minute);\n      onChangeHandler(newDate);\n    },\n    [onChangeHandler, safeDate]\n  );\n\n  const handleSecondChange = useCallback(\n    (second: number) => {\n      const newDate = setSeconds(safeDate, second);\n      onChangeHandler(newDate);\n    },\n    [onChangeHandler, safeDate]\n  );\n\n  const handleAmPmChange = useCallback(\n    (amPm: AmPm) => {\n      const currentAmPm = getHours(safeDate) >= 12 ? 'PM' : 'AM';\n      // If the current AM/PM is the same as the selected AM/PM, do nothing\n      if (currentAmPm === amPm) {\n        return;\n      }\n\n      let date = new Date(safeDate);\n      if (!value) {\n        date = setHours(safeDate, amPm === 'AM' ? 0 : 12);\n      } else {\n        const hours = getHours(value);\n        date = setHours(value, amPm === 'AM' ? hours - 12 : hours + 12);\n      }\n      onChangeHandler(date);\n    },\n    [onChangeHandler, safeDate, value]\n  );\n\n  const isSameDayWithMax = useMemo(() => isSameDay(value, max), [value, max]);\n  const isSameDayWithMin = useMemo(() => isSameDay(value, min), [value, min]);\n  const isSameHoursWithMin = useMemo(\n    () => isSameHour(value, min),\n    [value, min]\n  );\n  const isSameHoursWithMax = useMemo(\n    () => isSameHour(value, max),\n    [value, max]\n  );\n\n  const hours = useMemo(() => {\n    if (!value) return undefined;\n    let dayHours = getHours(safeDate);\n\n    return is12HourCycle ? dayHours % 12 || 12 : dayHours;\n  }, [value, safeDate, is12HourCycle]);\n\n  const minutes = useMemo(\n    () => (value ? getMinutes(safeDate) : undefined),\n    [value, safeDate]\n  );\n\n  const seconds = useMemo(\n    () => (value ? getSeconds(safeDate) : undefined),\n    [value, safeDate]\n  );\n\n  const amPm = useMemo(() => {\n    if (!value || !is12HourCycle) return undefined;\n    return getHours(safeDate) < 12 ? 'AM' : 'PM';\n  }, [value, safeDate, is12HourCycle]);\n\n  return (\n    <AnimatePresence>\n      <motion.div\n        initial={{ opacity: 0, x: 10, width: 0 }}\n        animate={{ opacity: 1, x: 0, width: 'auto' }}\n        exit={{ opacity: 0, x: 10, width: 0 }}\n        transition={{\n          type: 'spring',\n          stiffness: 500,\n          damping: 40,\n          duration: 0.2\n        }}\n        className={cn(timeTheme?.wrapper)}\n      >\n        <Divider orientation=\"vertical\" className={timeTheme?.dividerLeft} />\n        <div className={timeTheme.base}>\n          <Divider orientation=\"horizontal\" className={timeTheme?.dividerTop} />\n          <div\n            className={cn(timeTheme?.items.wrapper, {\n              'h-54': showDayOfWeek\n            })}\n          >\n            <TimeColumn\n              theme={timeTheme}\n              options={is12HourCycle ? HOURS_12 : HOURS_24}\n              min={isSameDayWithMin ? getHours(min) : undefined}\n              max={isSameDayWithMax ? getHours(max) : undefined}\n              value={hours}\n              isPM={amPm === 'PM'}\n              is12HourCycle={is12HourCycle}\n              onSelect={handleHourChange}\n            />\n            <Divider\n              orientation=\"vertical\"\n              className={timeTheme?.items.divider}\n            />\n            <TimeColumn\n              theme={timeTheme}\n              options={MINUTES}\n              min={\n                isSameDayWithMin && isSameHoursWithMin\n                  ? getMinutes(min)\n                  : undefined\n              }\n              max={\n                isSameDayWithMax && isSameHoursWithMax\n                  ? getMinutes(max)\n                  : undefined\n              }\n              value={minutes}\n              isPM={amPm === 'PM'}\n              is12HourCycle={is12HourCycle}\n              onSelect={handleMinuteChange}\n            />\n            <Divider\n              orientation=\"vertical\"\n              className={timeTheme?.items.divider}\n            />\n            <TimeColumn\n              theme={timeTheme}\n              options={SECONDS}\n              min={\n                isSameDayWithMin && isSameHoursWithMin\n                  ? getSeconds(min)\n                  : undefined\n              }\n              max={\n                isSameDayWithMax && isSameHoursWithMax\n                  ? getSeconds(max)\n                  : undefined\n              }\n              value={seconds}\n              isPM={amPm === 'PM'}\n              is12HourCycle={is12HourCycle}\n              onSelect={handleSecondChange}\n            />\n            {is12HourCycle && (\n              <>\n                <Divider\n                  orientation=\"vertical\"\n                  className={timeTheme?.items.divider}\n                />\n                <TimeColumn\n                  theme={timeTheme}\n                  options={['AM', 'PM']}\n                  min={isSameDayWithMin ? getHours(min) : undefined}\n                  max={isSameDayWithMax ? getHours(max) : undefined}\n                  value={amPm}\n                  isPM={amPm === 'PM'}\n                  onSelect={handleAmPmChange}\n                />\n              </>\n            )}\n          </div>\n        </div>\n      </motion.div>\n    </AnimatePresence>\n  );\n};\n","import React, { FC, Fragment } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { CalendarTheme } from '@/form/Calendar/CalendarTheme';\nimport { List, ListHeader, ListItem } from '@/layout';\nimport { isPresetActive } from '@/form/Calendar/utils';\n\nconst DEFAULT_GROUP_NAME = 'Other';\n\nexport interface PresetOption {\n  /** Display label for the preset option. */\n  label: string;\n  /** Date value or range, or a function that returns one. */\n  value: Date | [Date, Date] | (() => Date | [Date, Date]);\n  /** Optional group name used to organize presets. */\n  group?: string;\n}\n\ninterface CalendarPresetsProps {\n  /**\n   * Preset options to show\n   */\n  options: PresetOption[];\n\n  /**\n   * Whether to show time presets\n   */\n  showTime?: boolean;\n\n  /**\n   * Callback function for when a preset is selected\n   */\n  onChange: (value: Date | [Date, Date]) => void;\n\n  /**\n   * Theme for the preset panel\n   */\n  theme?: CalendarTheme;\n\n  /**\n   * Currently selected value\n   */\n  value?: Date | [Date, Date];\n\n  /**\n   * Optional className for the component\n   */\n  className?: string;\n}\n\nexport const CalendarPresets: FC<CalendarPresetsProps> = ({\n  options,\n  showTime,\n  theme: customTheme,\n  value,\n  className,\n  onChange\n}) => {\n  const { presets: presetsTheme } = useComponentTheme<CalendarTheme>(\n    'calendar',\n    customTheme\n  );\n\n  const groupedPresets = options.reduce(\n    (acc, preset) => {\n      const group = preset.group || DEFAULT_GROUP_NAME;\n      if (!acc[group]) {\n        acc[group] = [];\n      }\n      acc[group].push(preset);\n\n      return acc;\n    },\n    {} as Record<string, PresetOption[]>\n  );\n\n  return (\n    <List className={cn(presetsTheme?.base, className)}>\n      {Object.entries(groupedPresets).map(([group, options]) => (\n        <Fragment key={group}>\n          {group !== DEFAULT_GROUP_NAME && (\n            <ListHeader className={presetsTheme?.group}>{group}</ListHeader>\n          )}\n          {options.map(preset => {\n            const presetValue =\n              typeof preset.value === 'function'\n                ? preset.value()\n                : preset.value;\n            const active = isPresetActive(presetValue, value, showTime);\n\n            return (\n              <ListItem\n                key={preset.label}\n                dense\n                className={cn(presetsTheme?.item?.base, {\n                  [presetsTheme?.item?.active]: active\n                })}\n                onClick={() => onChange(presetValue)}\n                active={active}\n              >\n                {preset.label}\n              </ListItem>\n            );\n          })}\n        </Fragment>\n      ))}\n    </List>\n  );\n};\n","import {\n  setHours,\n  setMinutes,\n  setSeconds,\n  addDays,\n  startOfDay,\n  subDays,\n  endOfDay,\n  startOfWeek,\n  subWeeks,\n  endOfWeek,\n  startOfMonth,\n  subMonths,\n  endOfMonth,\n  startOfYear,\n  subYears,\n  endOfYear,\n  addWeeks,\n  addMonths,\n  addYears\n} from 'date-fns';\nimport { PresetOption } from './CalendarPresets';\n\nexport const TIME_PRESETS: PresetOption[] = [\n  {\n    label: 'Start of Day (12:00 AM)',\n    value: setHours(setMinutes(setSeconds(new Date(), 0), 0), 0),\n    group: 'Today'\n  },\n  {\n    label: 'Morning (9:00 AM)',\n    value: setHours(setMinutes(setSeconds(new Date(), 0), 0), 9),\n    group: 'Today'\n  },\n  {\n    label: 'Noon (12:00 PM)',\n    value: setHours(setMinutes(setSeconds(new Date(), 0), 0), 12),\n    group: 'Today'\n  },\n  {\n    label: 'Afternoon (3:00 PM)',\n    value: setHours(setMinutes(setSeconds(new Date(), 0), 0), 15),\n    group: 'Today'\n  },\n  {\n    label: 'Evening (6:00 PM)',\n    value: setHours(setMinutes(setSeconds(new Date(), 0), 0), 18),\n    group: 'Today'\n  },\n  {\n    label: 'Night (9:00 PM)',\n    value: setHours(setMinutes(setSeconds(new Date(), 0), 0), 21),\n    group: 'Today'\n  },\n  {\n    label: 'Tomorrow Morning',\n    value: setHours(setMinutes(setSeconds(addDays(new Date(), 1), 0), 0), 9),\n    group: 'Tomorrow'\n  },\n  {\n    label: 'Tomorrow Noon',\n    value: setHours(setMinutes(setSeconds(addDays(new Date(), 1), 0), 0), 12),\n    group: 'Tomorrow'\n  },\n  {\n    label: 'Tomorrow Evening',\n    value: setHours(setMinutes(setSeconds(addDays(new Date(), 1), 0), 0), 18),\n    group: 'Tomorrow'\n  }\n];\n\nexport const PAST_PRESETS: PresetOption[] = [\n  {\n    label: 'Yesterday',\n    value: subDays(new Date(), 1),\n    group: 'Recent'\n  },\n  {\n    label: '2 Days Ago',\n    value: subDays(new Date(), 2),\n    group: 'Recent'\n  },\n  {\n    label: '3 Days Ago',\n    value: subDays(new Date(), 3),\n    group: 'Recent'\n  },\n  {\n    label: 'Last Week',\n    value: subWeeks(new Date(), 1),\n    group: 'Recent'\n  },\n  {\n    label: '2 Weeks Ago',\n    value: subWeeks(new Date(), 2),\n    group: 'Recent'\n  },\n  {\n    label: '3 Weeks Ago',\n    value: subWeeks(new Date(), 3),\n    group: 'Recent'\n  },\n  {\n    label: 'Last Month',\n    value: subMonths(new Date(), 1),\n    group: 'Past'\n  },\n  {\n    label: '2 Months Ago',\n    value: subMonths(new Date(), 2),\n    group: 'Past'\n  },\n  {\n    label: '3 Months Ago',\n    value: subMonths(new Date(), 3),\n    group: 'Past'\n  },\n  {\n    label: '6 Months Ago',\n    value: subMonths(new Date(), 6),\n    group: 'Past'\n  },\n  {\n    label: 'Last Year',\n    value: subYears(new Date(), 1),\n    group: 'Past'\n  },\n  {\n    label: '2 Years Ago',\n    value: subYears(new Date(), 2),\n    group: 'Past'\n  },\n  {\n    label: '3 Years Ago',\n    value: subYears(new Date(), 3),\n    group: 'Past'\n  }\n];\n\nexport const FUTURE_PRESETS: PresetOption[] = [\n  {\n    label: 'Tomorrow',\n    value: addDays(new Date(), 1),\n    group: 'Soon'\n  },\n  {\n    label: 'In 2 Days',\n    value: addDays(new Date(), 2),\n    group: 'Soon'\n  },\n  {\n    label: 'In 3 Days',\n    value: addDays(new Date(), 3),\n    group: 'Soon'\n  },\n  {\n    label: 'Next Week',\n    value: addWeeks(new Date(), 1),\n    group: 'Soon'\n  },\n  {\n    label: 'In 2 Weeks',\n    value: addWeeks(new Date(), 2),\n    group: 'Soon'\n  },\n  {\n    label: 'In 3 Weeks',\n    value: addWeeks(new Date(), 3),\n    group: 'Soon'\n  },\n  {\n    label: 'Next Month',\n    value: addMonths(new Date(), 1),\n    group: 'Future'\n  },\n  {\n    label: 'In 2 Months',\n    value: addMonths(new Date(), 2),\n    group: 'Future'\n  },\n  {\n    label: 'In 3 Months',\n    value: addMonths(new Date(), 3),\n    group: 'Future'\n  },\n  {\n    label: 'In 6 Months',\n    value: addMonths(new Date(), 6),\n    group: 'Future'\n  },\n  {\n    label: 'Next Year',\n    value: addYears(new Date(), 1),\n    group: 'Future'\n  },\n  {\n    label: 'In 2 Years',\n    value: addYears(new Date(), 2),\n    group: 'Future'\n  },\n  {\n    label: 'In 3 Years',\n    value: addYears(new Date(), 3),\n    group: 'Future'\n  }\n];\n\nexport const COMBINED_PRESETS: PresetOption[] = [\n  {\n    label: 'Today',\n    value: new Date(),\n    group: 'Current'\n  },\n  {\n    label: 'Yesterday',\n    value: subDays(new Date(), 1),\n    group: 'Past'\n  },\n  {\n    label: 'Tomorrow',\n    value: addDays(new Date(), 1),\n    group: 'Future'\n  },\n  {\n    label: 'Start of Week',\n    value: startOfWeek(new Date()),\n    group: 'Current'\n  },\n  {\n    label: 'End of Week',\n    value: endOfWeek(new Date()),\n    group: 'Current'\n  },\n  {\n    label: 'Start of Month',\n    value: startOfMonth(new Date()),\n    group: 'Current'\n  },\n  {\n    label: 'End of Month',\n    value: endOfMonth(new Date()),\n    group: 'Current'\n  }\n];\n\nexport const PAST_RANGE_PRESETS: PresetOption[] = [\n  {\n    label: 'Yesterday',\n    value: [\n      startOfDay(subDays(new Date(), 1)),\n      endOfDay(subDays(new Date(), 1))\n    ]\n  },\n  {\n    label: 'Last 3 Days',\n    value: [startOfDay(subDays(new Date(), 2)), endOfDay(new Date())]\n  },\n  {\n    label: 'Last 7 Days',\n    value: [startOfDay(subDays(new Date(), 6)), endOfDay(new Date())]\n  },\n  {\n    label: 'Last 14 Days',\n    value: [startOfDay(subDays(new Date(), 13)), endOfDay(new Date())]\n  },\n  {\n    label: 'Last 30 Days',\n    value: [startOfDay(subDays(new Date(), 29)), endOfDay(new Date())]\n  },\n  {\n    label: 'Previous Week',\n    value: [\n      startOfWeek(subWeeks(new Date(), 1)),\n      endOfWeek(subWeeks(new Date(), 1))\n    ]\n  },\n  {\n    label: 'Last Week',\n    value: [subWeeks(new Date(), 1), new Date()]\n  },\n  {\n    label: 'Previous Month',\n    value: [\n      startOfMonth(subMonths(new Date(), 1)),\n      endOfMonth(subMonths(new Date(), 1))\n    ]\n  },\n  {\n    label: 'Last Month',\n    value: [subMonths(new Date(), 1), new Date()]\n  },\n  {\n    label: 'Previous Year',\n    value: [\n      startOfYear(subYears(new Date(), 1)),\n      endOfYear(subYears(new Date(), 1))\n    ]\n  },\n  {\n    label: 'Last Year',\n    value: [subYears(new Date(), 1), new Date()]\n  }\n];\n\nexport const FUTURE_RANGE_PRESETS: PresetOption[] = [\n  {\n    label: 'Tomorrow',\n    value: [\n      startOfDay(addDays(new Date(), 1)),\n      endOfDay(addDays(new Date(), 1))\n    ]\n  },\n  {\n    label: 'Next 3 Days',\n    value: [startOfDay(new Date()), endOfDay(addDays(new Date(), 2))]\n  },\n  {\n    label: 'Next 7 Days',\n    value: [startOfDay(new Date()), endOfDay(addDays(new Date(), 6))]\n  },\n  {\n    label: 'Next 14 Days',\n    value: [startOfDay(new Date()), endOfDay(addDays(new Date(), 13))]\n  },\n  {\n    label: 'Next 30 Days',\n    value: [startOfDay(new Date()), endOfDay(addDays(new Date(), 29))]\n  },\n  {\n    label: 'Next Week',\n    value: [new Date(), addWeeks(new Date(), 1)]\n  },\n  {\n    label: 'Upcoming Week',\n    value: [\n      startOfWeek(addWeeks(new Date(), 1)),\n      endOfWeek(addWeeks(new Date(), 1))\n    ]\n  },\n  {\n    label: 'Next Month',\n    value: [new Date(), addMonths(new Date(), 1)]\n  },\n  {\n    label: 'Upcoming Month',\n    value: [\n      startOfMonth(addMonths(new Date(), 1)),\n      endOfMonth(addMonths(new Date(), 1))\n    ]\n  },\n  {\n    label: 'Next Year',\n    value: [new Date(), addYears(new Date(), 1)]\n  },\n  {\n    label: 'Upcoming Year',\n    value: [\n      startOfYear(addYears(new Date(), 1)),\n      endOfYear(addYears(new Date(), 1))\n    ]\n  }\n];\n","import {\n  AnimatePresence,\n  motion,\n  MotionNodeAnimationOptions\n} from 'motion/react';\nimport React, { FC, useCallback, useMemo, useState } from 'react';\nimport { Button } from '@/elements/Button';\nimport {\n  add,\n  addYears,\n  endOfDecade,\n  getMonth,\n  getYear,\n  min as minDate,\n  max as maxDate,\n  setMonth,\n  setYear,\n  startOfDecade,\n  sub,\n  subYears,\n  format,\n  setSeconds,\n  setMinutes,\n  setHours,\n  getMinutes,\n  getSeconds,\n  getHours\n} from 'date-fns';\nimport { CalendarDays } from './CalendarDays';\nimport { CalendarMonths } from './CalendarMonths';\nimport { CalendarYears } from './CalendarYears';\nimport { cn, useComponentTheme } from '@/utils';\nimport { CalendarTheme } from './CalendarTheme';\nimport { Divider } from '@/layout/Divider';\nimport { H4 } from '@/typography';\nimport { CalendarTimes } from './CalendarTimes';\nimport { updateDateTime } from './utils';\nimport { CalendarPresets, PresetOption } from './CalendarPresets';\n\nexport type CalendarViewType = 'days' | 'months' | 'years';\n\nexport interface CalendarProps {\n  /**\n   * The selected date(s) for the calendar.\n   */\n  value?:\n    | Date\n    | [Date, Date]\n    | [Date, undefined]\n    | [undefined, undefined]\n    | undefined;\n\n  /**\n   * The minimum selectable date for the calendar.\n   */\n  min?: Date;\n\n  /**\n   * The maximum selectable date for the calendar.\n   * Can also be set to 'now' to use the current date.\n   */\n  max?: Date | 'now';\n\n  /**\n   * Whether the calendar is disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * Whether the calendar is a range picker.\n   */\n  isRange?: boolean;\n\n  /**\n   * The text or icon to use for next.\n   * @default '›'\n   */\n  nextArrow?: React.ReactNode | string;\n\n  /**\n   * The text or icon to use for previous.\n   * @default '‹'\n   */\n  previousArrow?: React.ReactNode | string;\n\n  /**\n   * Whether to display day of week labels\n   */\n  showDayOfWeek?: boolean;\n\n  /**\n   * Whether to highlight the today.\n   */\n  showToday?: boolean;\n\n  /**\n   * Whether to show the time picker.\n   * @default false\n   */\n  showTime?: boolean;\n\n  /**\n   * Whether to use 12-hour cycle for the time picker.\n   * @default false\n   */\n  is12HourCycle?: boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * Whether to animate the calendar.\n   * @default true\n   */\n  animated?: boolean;\n\n  /**\n   * Animation configuration for the calendar days.\n   */\n  animation?: MotionNodeAnimationOptions;\n\n  /**\n   * Animation configuration for the calendar changing view.\n   */\n  animationViewChange?: MotionNodeAnimationOptions;\n\n  /**\n   * Preset configuration for the calendar.\n   */\n  preset?: PresetOption[];\n\n  /**\n   * A callback function that is called when the selected date(s) change.\n   */\n  onChange?: (value: Date | [Date, Date]) => void;\n\n  /**\n   * A callback function that is called when the calendar view changes.\n   */\n  onViewChange?: (view: CalendarViewType) => void;\n\n  /**\n   * Theme for the Calendar.\n   */\n  theme?: CalendarTheme;\n}\n\nexport const Calendar: FC<CalendarProps> = ({\n  min,\n  max,\n  value,\n  disabled,\n  isRange,\n  previousArrow = '‹',\n  nextArrow = '›',\n  showDayOfWeek,\n  showToday,\n  showTime = false,\n  is12HourCycle = false,\n  animated = true,\n  animation,\n  animationViewChange,\n  preset,\n  onChange,\n  onViewChange,\n  theme: customTheme\n}) => {\n  const theme: CalendarTheme = useComponentTheme('calendar', customTheme);\n\n  const date = useMemo(\n    () => (Array.isArray(value) ? value[0] : (value ?? new Date())),\n    [value]\n  );\n  const rangeStart = useMemo(\n    () => (isRange && Array.isArray(value) ? value?.[0] : undefined),\n    [isRange, value]\n  );\n  const rangeEnd = useMemo(\n    () => (isRange && Array.isArray(value) ? value?.[1] : undefined),\n    [isRange, value]\n  );\n\n  const [viewValue, setViewValue] = useState<Date>(date);\n  const [monthValue, setMonthValue] = useState<number>(getMonth(date));\n  const [yearValue, setYearValue] = useState<number>(getYear(date));\n  const [decadeStart, setDecadeStart] = useState<Date>(startOfDecade(date));\n  const [decadeEnd, setDecadeEnd] = useState<Date>(endOfDecade(date));\n  const [view, setView] = useState<CalendarViewType>('days');\n  const [scrollDirection, setScrollDirection] = useState<\n    'forward' | 'back' | null\n  >(null);\n\n  const previousClickHandler = useCallback(() => {\n    setScrollDirection('back');\n    if (view === 'days') {\n      setViewValue(sub(viewValue, { months: 1 }));\n    } else if (view === 'months') {\n      setYearValue(yearValue - 1);\n    } else {\n      setDecadeStart(subYears(decadeStart, 10));\n      setDecadeEnd(subYears(decadeEnd, 10));\n    }\n  }, [decadeEnd, decadeStart, view, viewValue, yearValue]);\n\n  const nextClickHandler = useCallback(() => {\n    setScrollDirection('forward');\n    if (view === 'days') {\n      setViewValue(add(viewValue, { months: 1 }));\n    } else if (view === 'months') {\n      setYearValue(yearValue + 1);\n    } else {\n      setDecadeStart(addYears(decadeStart, 10));\n      setDecadeEnd(addYears(decadeEnd, 10));\n    }\n  }, [decadeEnd, decadeStart, view, viewValue, yearValue]);\n\n  const headerClickHandler = useCallback(() => {\n    const newView = view === 'days' ? 'months' : 'years';\n    setScrollDirection(null);\n    setView(newView);\n    onViewChange?.(newView);\n  }, [onViewChange, view]);\n\n  const dateChangeHandler = useCallback(\n    (newDate: Date) => {\n      let finalDate = newDate;\n      if (showTime && value) {\n        finalDate = updateDateTime(\n          value,\n          newDate,\n          isRange,\n          Boolean(rangeStart)\n        );\n      }\n\n      if (!isRange) {\n        onChange?.(finalDate);\n      } else if (!rangeStart) {\n        onChange?.([finalDate, undefined]);\n      } else if (!rangeEnd) {\n        const range = [rangeStart, finalDate];\n        const sortedRange: [Date, Date] = [minDate(range), maxDate(range)];\n        onChange?.(sortedRange);\n      } else {\n        onChange?.([finalDate, undefined]);\n      }\n    },\n    [isRange, onChange, rangeEnd, rangeStart, showTime, value]\n  );\n\n  const monthsChangeHandler = useCallback(\n    month => {\n      setViewValue(setMonth(setYear(min || new Date(), yearValue), month));\n      setMonthValue(month);\n      setView('days');\n      onViewChange?.('days');\n    },\n    [min, yearValue, onViewChange]\n  );\n\n  const yearChangeHandler = useCallback(\n    year => {\n      setViewValue(setYear(min || new Date(), year));\n      setYearValue(year);\n      setView('months');\n      onViewChange?.('months');\n    },\n    [min, onViewChange]\n  );\n\n  const handleTimeChange = useCallback(\n    (newTimeDate: Date) => {\n      if (!isRange) {\n        onChange?.(newTimeDate);\n      } else {\n        if (rangeEnd) {\n          const newRangeEnd = setSeconds(\n            setMinutes(\n              setHours(rangeEnd, getHours(newTimeDate)),\n              getMinutes(newTimeDate)\n            ),\n            getSeconds(newTimeDate)\n          );\n          onChange?.([rangeStart!, newRangeEnd]);\n        } else {\n          const newRangeStart = newTimeDate;\n          onChange?.([newRangeStart, rangeEnd]);\n        }\n      }\n    },\n    [isRange, onChange, rangeStart, rangeEnd]\n  );\n\n  const xAnimation = useMemo(() => {\n    switch (scrollDirection) {\n      case 'forward':\n        return '100%';\n      case 'back':\n        return '-100%';\n      default:\n        return 0;\n    }\n  }, [scrollDirection]);\n\n  const handlePresetChange = useCallback(\n    (newValue: Date | [Date, Date]) => {\n      const targetDate = Array.isArray(newValue) ? newValue[0] : newValue;\n      if (targetDate) {\n        setViewValue(targetDate);\n        setMonthValue(getMonth(targetDate));\n        setYearValue(getYear(targetDate));\n        setView('days');\n        setScrollDirection(null);\n      }\n      onChange?.(newValue);\n    },\n    [onChange]\n  );\n\n  return (\n    <div className={cn(theme.base)}>\n      <div className=\"relative flex\">\n        {preset && (\n          <>\n            <div\n              className={cn('flex items-center gap-1', theme.presets.wrapper)}\n            >\n              <CalendarPresets\n                options={preset}\n                value={value as Date | [Date, Date]}\n                onChange={handlePresetChange}\n              />\n              <Divider\n                orientation=\"vertical\"\n                className={theme.presets.divider}\n              />\n            </div>\n          </>\n        )}\n\n        <div className=\"flex-1\">\n          <header className={cn(theme.header.base)}>\n            <Button\n              variant=\"text\"\n              disabled={disabled}\n              onClick={previousClickHandler}\n              className={theme.header.prev}\n              disablePadding\n              aria-label=\"Previous\"\n            >\n              {previousArrow}\n            </Button>\n            <Button\n              disabled={disabled}\n              variant=\"text\"\n              onClick={headerClickHandler}\n              className={theme.header.mid}\n              disablePadding\n              fullWidth\n            >\n              <H4 className={theme.title}>\n                {view === 'days' && format(viewValue, 'MMMM')}\n                {view === 'months' && <>{yearValue}</>}\n                {view === 'years' && (\n                  <>\n                    {decadeStart.getFullYear()}-{decadeEnd.getFullYear()}\n                  </>\n                )}\n              </H4>\n            </Button>\n            <Button\n              variant=\"text\"\n              disabled={disabled}\n              onClick={nextClickHandler}\n              className={theme.header.next}\n              disablePadding\n              aria-label=\"Next\"\n            >\n              {nextArrow}\n            </Button>\n          </header>\n          <Divider />\n          <AnimatePresence initial={false} mode=\"wait\">\n            <motion.div\n              className={cn(theme.content)}\n              key={view}\n              {...(animationViewChange\n                ? animationViewChange\n                : {\n                    initial: { scale: 0, opacity: 0 },\n                    animate: { scale: 1, opacity: 1 },\n                    exit: { scale: 0, opacity: 1 },\n                    transition: {\n                      x: { type: animated ? 'keyframes' : false },\n                      opacity: {\n                        duration: 0.2,\n                        type: animated ? 'tween' : false\n                      },\n                      scale: { type: animated ? 'tween' : false }\n                    }\n                  })}\n            >\n              {view === 'days' && (\n                <CalendarDays\n                  value={viewValue}\n                  min={min}\n                  max={max}\n                  disabled={disabled}\n                  isRange={isRange}\n                  current={isRange ? [rangeStart, rangeEnd] : value}\n                  showDayOfWeek={showDayOfWeek}\n                  showToday={showToday}\n                  showTime={showTime}\n                  xAnimation={xAnimation}\n                  animated={animated}\n                  animation={animation}\n                  onChange={dateChangeHandler}\n                />\n              )}\n              {view === 'months' && (\n                <CalendarMonths\n                  value={monthValue}\n                  onChange={monthsChangeHandler}\n                />\n              )}\n              {view === 'years' && (\n                <CalendarYears\n                  decadeStart={decadeStart}\n                  decadeEnd={decadeEnd}\n                  animated={animated}\n                  animation={animation}\n                  value={yearValue}\n                  xAnimation={xAnimation}\n                  onChange={yearChangeHandler}\n                />\n              )}\n            </motion.div>\n          </AnimatePresence>\n        </div>\n\n        {showTime && (\n          <CalendarTimes\n            value={\n              isRange ? (rangeEnd ? rangeEnd : value?.[0]) : (value as Date)\n            }\n            min={min}\n            max={max === 'now' ? new Date() : max}\n            theme={theme.time}\n            is12HourCycle={is12HourCycle}\n            showDayOfWeek={showDayOfWeek}\n            onChange={handleTimeChange}\n          />\n        )}\n      </div>\n    </div>\n  );\n};\n","import React, { FC, Fragment, useCallback, useMemo, useState } from 'react';\nimport {\n  add,\n  addMonths,\n  min as minDate,\n  max as maxDate,\n  sub,\n  format\n} from 'date-fns';\nimport { AnimatePresence, motion } from 'motion/react';\nimport { Button } from '@/elements';\nimport { CalendarProps } from './Calendar';\nimport { CalendarDays } from './CalendarDays';\nimport { Divider } from '@/layout';\nimport { H4 } from '@/typography';\nimport { useComponentTheme } from '@/utils';\nimport { CalendarRangeTheme } from './CalendarRangeTheme';\nimport { CalendarPresets, PresetOption } from './CalendarPresets';\n\nexport interface CalendarRangeProps extends Omit<\n  CalendarProps,\n  'value' | 'isRange' | 'onViewChange' | 'theme' | 'showTime'\n> {\n  /**\n   * The selected date(s) for the calendar.\n   */\n  value?:\n    | [Date, Date]\n    | [undefined, undefined]\n    | [Date | undefined]\n    | undefined;\n\n  /**\n   * The number of calendar months to display.\n   * @default 2\n   */\n  monthsToDisplay?: number;\n\n  /**\n   * Defaults view to show past or future months if multiple months shown.\n   * @default 'future'\n   */\n  direction?: 'past' | 'future';\n\n  /**\n   * The text or icon to use for next year.\n   * @default '»'\n   */\n  nextYearArrow?: React.ReactNode | string;\n\n  /**\n   * The text or icon to use for previous year.\n   * @default '«'\n   */\n  previousYearArrow?: React.ReactNode | string;\n\n  /**\n   * The format of the date displayed in the calendar header.\n   * @default 'MMMM'\n   */\n  headerDateFormat?: string;\n\n  /**\n   * Theme for the CalendarRange.\n   */\n  theme?: CalendarRangeTheme;\n\n  /**\n   * Preset options for the calendar.\n   */\n  preset?: PresetOption[];\n}\n\nexport const CalendarRange: FC<CalendarRangeProps> = ({\n  min,\n  max,\n  value,\n  disabled,\n  previousArrow = '‹',\n  previousYearArrow = '«',\n  nextArrow = '›',\n  nextYearArrow = '»',\n  showDayOfWeek,\n  animated = true,\n  onChange,\n  monthsToDisplay = 2,\n  direction = 'future',\n  headerDateFormat = 'MMMM',\n  theme: customTheme,\n  preset,\n  ...rest\n}) => {\n  const theme: CalendarRangeTheme = useComponentTheme(\n    'calendarRange',\n    customTheme\n  );\n  const date = useMemo(\n    () => (Array.isArray(value) ? value[0] : new Date()),\n    [value]\n  );\n  const rangeStart = useMemo(() => (value ? value[0] : undefined), [value]);\n  const rangeEnd = useMemo(() => (value ? value[1] : undefined), [value]);\n\n  const [viewValue, setViewValue] = useState<Date>(date || new Date());\n  const [scrollDirection, setScrollDirection] = useState<\n    'forward' | 'back' | null\n  >(null);\n  const [hoveringDate, setHoveringDate] = useState<Date | null>(null);\n\n  const displayMonths = Array.from(Array(monthsToDisplay).keys());\n  const showPast = direction === 'past';\n  if (direction === 'past') {\n    displayMonths.reverse();\n  }\n\n  const dateChangeHandler = useCallback(\n    (date: Date) => {\n      if (!rangeStart) {\n        onChange?.([date, undefined]);\n      } else if (!rangeEnd) {\n        const range = [rangeStart, date];\n        onChange?.([minDate(range), maxDate(range)]);\n      } else {\n        onChange?.([date, undefined]);\n      }\n    },\n    [onChange, rangeEnd, rangeStart]\n  );\n\n  const previousClickHandler = useCallback(() => {\n    setScrollDirection('back');\n    setViewValue(sub(viewValue, { months: 1 }));\n  }, [viewValue]);\n\n  const previousYearClickHandler = useCallback(() => {\n    setScrollDirection('back');\n    setViewValue(sub(viewValue, { years: 1 }));\n  }, [viewValue]);\n\n  const nextClickHandler = useCallback(() => {\n    setScrollDirection('forward');\n    setViewValue(add(viewValue, { months: 1 }));\n  }, [viewValue]);\n\n  const nextYearClickHandler = useCallback(() => {\n    setScrollDirection('forward');\n    setViewValue(add(viewValue, { years: 1 }));\n  }, [viewValue]);\n\n  const xAnimation = useMemo(() => {\n    switch (scrollDirection) {\n      case 'forward':\n        return '100%';\n      case 'back':\n        return '-100%';\n      default:\n        return 0;\n    }\n  }, [scrollDirection]);\n\n  const handlePresetChange = useCallback(\n    (newValue: [Date, Date]) => {\n      setScrollDirection(null);\n      setViewValue(newValue[1]);\n      onChange?.(newValue);\n    },\n    [onChange]\n  );\n\n  return (\n    <div className={theme.base}>\n      <div className=\"relative flex\">\n        {preset && (\n          <div className={`flex items-center gap-1 ${theme.presets.wrapper}`}>\n            <CalendarPresets\n              options={preset}\n              showTime={false}\n              className=\"min-w-[100px] w-auto flex-shrink-0\"\n              value={\n                value && value.length >= 2\n                  ? [value[0] as Date, value[1] as Date]\n                  : undefined\n              }\n              onChange={handlePresetChange}\n            />\n            <Divider orientation=\"vertical\" className={theme.presets.divider} />\n          </div>\n        )}\n        <div className=\"flex-1\">\n          <header className={theme.header.base}>\n            <div className=\"flex items-center gap-2.5\">\n              <Button\n                variant=\"text\"\n                disabled={disabled}\n                onClick={previousYearClickHandler}\n                className={theme.header.prev}\n                disablePadding\n                aria-label=\"Previous year\"\n              >\n                {previousYearArrow}\n              </Button>\n              <Button\n                variant=\"text\"\n                disabled={disabled}\n                onClick={previousClickHandler}\n                className={theme.header.prev}\n                disablePadding\n                aria-label=\"Previous month\"\n              >\n                {previousArrow}\n              </Button>\n            </div>\n            <H4 className={theme.title}>\n              {displayMonths.map(i => (\n                <span\n                  key={addMonths(viewValue, showPast ? -i : i).toDateString()}\n                >\n                  {format(\n                    addMonths(viewValue, showPast ? -i : i),\n                    headerDateFormat\n                  )}\n                </span>\n              ))}\n            </H4>\n            <div className=\"flex items-center gap-2.5\">\n              <Button\n                variant=\"text\"\n                disabled={disabled}\n                onClick={nextClickHandler}\n                className={theme.header.next}\n                disablePadding\n                aria-label=\"Next month\"\n              >\n                {nextArrow}\n              </Button>\n              <Button\n                variant=\"text\"\n                disabled={disabled}\n                onClick={nextYearClickHandler}\n                className={theme.header.next}\n                disablePadding\n                aria-label=\"Next year\"\n              >\n                {nextYearArrow}\n              </Button>\n            </div>\n          </header>\n          <Divider />\n          <AnimatePresence initial={false} mode=\"wait\">\n            <motion.div\n              initial={{ scale: 0, opacity: 0 }}\n              animate={{ scale: 1, opacity: 1 }}\n              exit={{ scale: 0, opacity: 1 }}\n              transition={{\n                x: { type: animated ? 'keyframes' : false },\n                opacity: { duration: 0.2, type: animated ? 'tween' : false },\n                scale: { type: animated ? 'tween' : false }\n              }}\n            >\n              <div className={theme.content}>\n                {displayMonths.map((offset, idx) => (\n                  <Fragment key={`calendar-${offset}`}>\n                    <CalendarDays\n                      value={addMonths(viewValue, showPast ? -offset : offset)}\n                      min={min}\n                      max={max}\n                      disabled={disabled}\n                      current={[rangeStart, rangeEnd]}\n                      showDayOfWeek={showDayOfWeek}\n                      xAnimation={xAnimation}\n                      animated={animated}\n                      hover={hoveringDate}\n                      onHover={setHoveringDate}\n                      hidePrevMonthDays={idx > 0}\n                      hideNextMonthDays={idx < monthsToDisplay - 1}\n                      onChange={dateChangeHandler}\n                      isRange\n                      {...rest}\n                    />\n                  </Fragment>\n                ))}\n              </div>\n            </motion.div>\n          </AnimatePresence>\n        </div>\n      </div>\n    </div>\n  );\n};\n","export interface CalendarTheme {\n  /** CSS class applied to the root calendar container. */\n  base: string;\n  /** Class names for the calendar header (navigation and title). */\n  header: {\n    base: string;\n    prev: string;\n    mid: string;\n    next: string;\n  };\n  /** CSS class applied to the calendar title. */\n  title: string;\n  /** CSS class applied to the main calendar content area. */\n  content: string;\n  /** Class names for day cells and related elements (header, week rows, range styling). */\n  days: {\n    header: string;\n    dayOfWeek: string;\n    week: string;\n    day: string;\n    outside: string;\n    startRangeDate: string;\n    cornerStartDateBottom: string;\n    endRangeDate: string;\n    cornerEndDateTop: string;\n    range: string;\n    selected: string;\n    hover: string;\n    today: string;\n  };\n  /** Class names for the months view. */\n  months: {\n    root: string;\n    month: string;\n    selected: string;\n  };\n  /** Class names for the years view. */\n  years: {\n    root: string;\n    year: string;\n    selected: string;\n  };\n  /** Class names for the time picker section. */\n  time?: {\n    base: string;\n    wrapper: string;\n    dividerTop: string;\n    dividerLeft: string;\n    header: string;\n    column: {\n      base: string;\n      wrapper: string;\n      label: string;\n      list: string;\n      scrollbar: string;\n    };\n    items: {\n      wrapper: string;\n      container: string;\n      list: string;\n      divider: string;\n      item: {\n        base: string;\n        selected: string;\n        disabled: string;\n      };\n    };\n  };\n  /** Class names for the preset options section. */\n  presets?: {\n    wrapper: string;\n    divider: string;\n    base: string;\n    group: string;\n    item: {\n      base: string;\n      active: string;\n    };\n  };\n}\n\nconst baseTheme: CalendarTheme = {\n  base: 'relative overflow-hidden',\n  header: {\n    base: 'flex text-center justify-between mb-2 items-center',\n    prev: 'text-xl leading-4',\n    mid: '',\n    next: 'text-xl leading-4'\n  },\n  title: 'text-base font-semibold leading-[normal]',\n  content: 'flex',\n\n  days: {\n    header: 'text-center grid grid-cols-7 mb-1 pt-2 font-medium',\n    dayOfWeek: 'text-center font-medium',\n    week: 'grid grid-cols-7',\n    day: 'font-normal flex p-2 border',\n    outside: '',\n    startRangeDate: 'rounded-tl-md rounded-tr-none rounded-br-none',\n    cornerStartDateBottom: 'rounded-bl-none',\n    endRangeDate: 'rounded-br-md rounded-bl-none rounded-tl-none',\n    cornerEndDateTop: 'rounded-tr-none',\n    range: 'rounded-none',\n    selected: '',\n    hover: 'rounded-sm',\n    today: 'rounded-sm border'\n  },\n\n  months: {\n    root: 'grid grid-cols-4 gap-2',\n    month: 'p-1.5',\n    selected: ''\n  },\n\n  years: {\n    root: 'grid grid-cols-4 gap-2',\n    year: 'p-1.5',\n    selected: ''\n  },\n\n  time: {\n    base: 'flex flex-col h-full gap-0',\n    wrapper: 'mt-4 bg-panel z-10 flex flex-row',\n    dividerTop: 'w-full',\n    dividerLeft: 'h-auto mt-2.5 mx-1 bg-surface z-10',\n    header: 'flex gap-4 px-0.5 pb-2.5 mb-2',\n    column: {\n      base: 'w-6',\n      wrapper: 'overflow-y-auto h-52',\n      label: 'text-center text-xs text-gray-500',\n      list: 'p-0 m-0 list-none',\n      scrollbar:\n        'scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600 scrollbar-track-transparent hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500'\n    },\n    items: {\n      wrapper: 'flex flex-row flex-auto gap-0.25 pt-1 h-46',\n      container: 'h-full',\n      list: 'relative h-full p-0 m-0 list-none overflow-y-auto [&::-webkit-scrollbar]:hidden scrollbar-none touch-pan-y',\n      divider: 'mx-0',\n      item: {\n        base: 'py-0.5 px-1.5 text-center select-none cursor-pointer rounded transition-colors duration-150',\n        selected: '',\n        disabled: 'cursor-not-allowed'\n      }\n    }\n  },\n  presets: {\n    wrapper: 'bg-panel z-10',\n    divider: 'mx-1 h-[calc(100%-26px)] self-end',\n    base: 'relative h-59 max-w-52 pr-1 overflow-y-auto [&::-webkit-scrollbar]:hidden scrollbar-none touch-pan-y space-y-0',\n    group: 'text-sm font-medium my-1 !pr-0 !pl-0',\n    item: {\n      base: 'text-sm p-1.5 my-0.5 duration-0',\n      active: ''\n    }\n  }\n};\n\nexport const calendarTheme: CalendarTheme = {\n  ...baseTheme,\n  header: {\n    ...baseTheme.header,\n    base: [baseTheme.header.base, 'text-text-secondary'].join(' ')\n  },\n  days: {\n    ...baseTheme.days,\n    day: [\n      baseTheme.days.day,\n      'border-transparent text-text-secondary opacity-90 hover:bg-primary-hover hover:disabled:bg-transparent! hover:text-black disabled:text-text-secondary/60'\n    ].join(' '),\n    header: [baseTheme.days.header, 'text-text-secondary'].join(' '),\n    outside: [baseTheme.days.outside, 'opacity-40 text-text-secondary'].join(\n      ' '\n    ),\n    selected: [\n      baseTheme.days.selected,\n      'text-black border-transparent light:text-white light:border-transparent opacity-100'\n    ].join(' '),\n    hover: [\n      baseTheme.days.hover,\n      'bg-primary-active text-black border-transparent light:text-white opacity-100'\n    ].join(' '),\n    today: [baseTheme.days.today, 'border-panel-accent text-text-primary'].join(\n      ' '\n    )\n  },\n  months: {\n    ...baseTheme.months,\n    month: [\n      baseTheme.months.month,\n      'hover:bg-primary-hover hover:text-black border-transparent text-text-secondary light:hover:text-white'\n    ].join(' '),\n    selected: [\n      baseTheme.years.selected,\n      'border-transparent text-black light:text-white'\n    ].join(' ')\n  },\n  years: {\n    ...baseTheme.years,\n    year: [\n      baseTheme.years.year,\n      'hover:bg-primary-hover hover:text-black border-transparent text-text-secondary light:hover:text-white'\n    ].join(' '),\n    selected: [\n      baseTheme.years.selected,\n      'border-transparent text-black light:text-white'\n    ].join(' ')\n  },\n  time: {\n    ...baseTheme.time,\n    wrapper: [baseTheme.time.wrapper, 'border-panel-border'].join(' '),\n    items: {\n      ...baseTheme.time.items,\n      item: {\n        ...baseTheme.time.items.item,\n        base: [\n          baseTheme.time.items.item.base,\n          'text-text-secondary hover:bg-primary-hover hover:text-black'\n        ].join(' '),\n        selected: [\n          baseTheme.time.items.item.selected,\n          'bg-blue-500 text-white dark:bg-blue-600 dark:text-white'\n        ].join(' '),\n        disabled: [baseTheme.time.items.item.disabled, 'opacity-50'].join(' ')\n      }\n    }\n  },\n  presets: {\n    ...baseTheme.presets,\n    group: [baseTheme.presets.group, '!text-gray-500 dark:text-gray-400'].join(\n      ' '\n    ),\n    item: {\n      ...baseTheme.presets.item,\n      base: [\n        baseTheme.presets.item.base,\n        'hover:text-black dark:hover:bg-primary-hover hover:rounded-sm'\n      ].join(' '),\n      active: [\n        baseTheme.presets.item.active,\n        'bg-primary text-black rounded-sm'\n      ].join(' ')\n    }\n  }\n};\n","import { CalendarTheme, calendarTheme } from './CalendarTheme';\n\nexport interface CalendarRangeTheme extends Omit<\n  CalendarTheme,\n  'months' | 'years'\n> {}\n\nconst baseTheme: Partial<CalendarRangeTheme> = {\n  base: 'relative overflow-hidden',\n  header: {\n    base: 'flex text-center justify-between mb-2 items-center',\n    prev: '',\n    mid: '',\n    next: ''\n  },\n  title: 'font-semibold flex grow justify-around',\n  content: 'flex gap-4'\n};\n\nexport const calendarRangeTheme: CalendarRangeTheme = {\n  base: baseTheme.base,\n  header: baseTheme.header,\n  title: baseTheme.title,\n  content: baseTheme.content,\n  days: calendarTheme.days,\n  presets: {\n    ...calendarTheme.presets,\n    divider: 'mx-1 h-[calc(100%-30px)] self-end'\n  }\n};\n","import React, { FC, ReactNode } from 'react';\nimport { cn } from '@/utils';\nimport { CheckboxTheme } from './CheckboxTheme';\n\ninterface CheckboxLabelProps {\n  id?: string;\n  label: string | ReactNode;\n  size: 'small' | 'medium' | 'large' | string;\n  disabled?: boolean;\n  checked?: boolean;\n  onChange?: () => void;\n  labelClassName?: string;\n  theme: CheckboxTheme;\n}\n\nexport const CheckboxLabel: FC<CheckboxLabelProps> = ({\n  id,\n  label,\n  size,\n  disabled,\n  checked,\n  onChange,\n  labelClassName,\n  theme\n}) => (\n  <span\n    id={id}\n    className={cn(\n      theme.label.base,\n      theme.label.sizes[size],\n      checked && theme.label.checked,\n      disabled && theme.label.disabled,\n      !disabled && onChange && theme.label.clickable,\n      labelClassName\n    )}\n    onClick={() => {\n      if (!disabled && onChange) {\n        onChange();\n      }\n    }}\n  >\n    {label}\n  </span>\n);\n","import { cn, useComponentTheme, useId } from '@/utils';\nimport { motion, useMotionValue, useTransform } from 'motion/react';\nimport React, {\n  FC,\n  forwardRef,\n  LegacyRef,\n  ReactNode,\n  useCallback,\n  useEffect,\n  useState\n} from 'react';\nimport { CheckboxLabel } from './CheckboxLabel';\nimport { CheckboxTheme } from './CheckboxTheme';\n\nexport interface CheckboxProps {\n  /**\n   * Whether the checkbox is checked or not.\n   * @default false\n   */\n  checked?: boolean;\n\n  /**\n   * Whether the checkbox is in an intermediate state or not.\n   * @default false\n   */\n  intermediate?: boolean;\n\n  /**\n   * Label for the checkbox.\n   */\n  label?: string | ReactNode;\n\n  /**\n   * Label position of checkbox.\n   * @default 'end'\n   */\n  labelPosition?: 'start' | 'end';\n\n  /**\n   * Whether the checkbox is disabled or not.\n   */\n  disabled?: boolean;\n\n  /**\n   * Size of the checkbox.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Additional class names to apply to the checkbox.\n   */\n  className?: string;\n\n  /**\n   * Additional class names to apply to the container.\n   */\n  containerClassName?: string;\n\n  /**\n   * Additional class names to apply to the label.\n   */\n  labelClassName?: string;\n\n  /**\n   * Custom svg path for border.\n   * @default 'M 1 0 L 16 0 C 16.552 0 17 0.448 17 1 L 17 15 C 17 15.552 16.552 16 16 16 L 1 16 C 0.448 16 0 15.552 0 15 L 0 1 C 0 0.448 0.448 0 1 0 Z'\n   */\n  borderPath?: string;\n\n  /**\n   * Custom svg path for checked state.\n   * @default 'M 4 8 L 8 12 L 12 4'\n   */\n  checkedPath?: string;\n\n  /**\n   * Custom svg path for intermediate state.\n   * @default 'M 5.36396 8.17792 L 10.6044 8.17792'\n   */\n  intermediatePath?: string;\n\n  /**\n   * Event handler for when the checkbox is changed.\n   */\n  onChange?: (value: boolean) => void;\n\n  /**\n   * Event handler for when the checkbox is blurred.\n   */\n  onBlur?: (event: React.FocusEvent<HTMLDivElement>) => void;\n\n  /**\n   * Theme for the Checkbox.\n   */\n  theme?: CheckboxTheme;\n}\n\nexport interface CheckboxRef {\n  /**\n   * The ref to the checkbox element.\n   */\n  ref?: LegacyRef<HTMLDivElement>;\n}\n\nexport const Checkbox: FC<CheckboxProps & CheckboxRef> = forwardRef(\n  (\n    {\n      checked = false,\n      intermediate = false,\n      label,\n      disabled,\n      size = 'medium',\n      labelPosition = 'end',\n      onChange,\n      onBlur,\n      className,\n      containerClassName,\n      labelClassName,\n      borderPath = 'M 1 0 L 16 0 C 16.552 0 17 0.448 17 1 L 17 15 C 17 15.552 16.552 16 16 16 L 1 16 C 0.448 16 0 15.552 0 15 L 0 1 C 0 0.448 0.448 0 1 0 Z',\n      checkedPath = 'M 4 8 L 8 12 L 12 4',\n      intermediatePath = 'M 5.36396 8.17792 L 10.6044 8.17792',\n      theme: customTheme,\n      ...rest\n    },\n    ref\n  ) => {\n    const theme: CheckboxTheme = useComponentTheme('checkbox', customTheme);\n    const labelId = useId();\n    const pathLength = useMotionValue(0);\n    const opacity = useTransform(pathLength, [0.05, 0.15], [0, 1]);\n\n    // If the checkbox is inside a dialog, the animation will not work.\n    // This is a workaround to force the animation to work by triggering\n    // a re-render once after initial mount\n    const [_, setForceAnimation] = useState<boolean>(false);\n    useEffect(() => {\n      if (checked || intermediate) {\n        setForceAnimation(true);\n      }\n    }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n    const checkVariants = {\n      pressed: (isChecked: boolean) => ({ pathLength: isChecked ? 0.85 : 0.3 }),\n      checked: { pathLength: 1 },\n      unchecked: { pathLength: 0 }\n    };\n\n    const handleOnChange = useCallback(() => {\n      if (!disabled && onChange) {\n        onChange(!checked);\n      }\n    }, [disabled, onChange, checked]);\n\n    return (\n      <div className={cn(theme.base, containerClassName, checked && 'checked')}>\n        {labelPosition === 'start' && label && (\n          <CheckboxLabel\n            id={labelId}\n            label={label}\n            size={size}\n            checked={checked}\n            disabled={disabled}\n            onChange={handleOnChange}\n            labelClassName={cn('mr-2.5', labelClassName)}\n            theme={theme}\n          />\n        )}\n        <motion.div\n          {...rest}\n          ref={ref}\n          role=\"checkbox\"\n          aria-checked={intermediate ? 'mixed' : checked}\n          aria-disabled={disabled || undefined}\n          aria-labelledby={label ? labelId : undefined}\n          tabIndex={disabled ? -1 : 0}\n          className={cn(\n            theme.checkbox.base,\n            checked && theme.checkbox.checked,\n            disabled && theme.checkbox.disabled,\n            theme.sizes[size],\n            className\n          )}\n          onClick={e => {\n            if (!disabled && onChange) {\n              e.stopPropagation();\n              onChange(!checked);\n            }\n          }}\n          onBlur={onBlur}\n          onKeyDown={event => {\n            if (!disabled && onChange && event.code === 'Space') {\n              onChange(!checked);\n            }\n          }}\n        >\n          <motion.svg\n            animate={checked ? 'checked' : 'unchecked'}\n            whileHover={!disabled ? 'hover' : undefined}\n            whileTap={!disabled ? 'pressed' : undefined}\n            viewBox=\"0 0 16 16\"\n            width={16}\n            height={16}\n          >\n            <motion.path\n              className={cn(\n                theme.border.base,\n                checked && theme.border.checked,\n                disabled && theme.border.disabled\n              )}\n              d={borderPath}\n              variants={theme.boxVariants}\n            />\n            {intermediate ? (\n              <motion.path\n                d={intermediatePath}\n                fill=\"transparent\"\n                strokeWidth=\"1\"\n                className={theme.check.base}\n                variants={checkVariants}\n                style={{ pathLength, opacity }}\n                custom={checked}\n              />\n            ) : (\n              <motion.path\n                d={checkedPath}\n                fill=\"transparent\"\n                strokeWidth=\"1\"\n                className={cn(\n                  theme.check.base,\n                  disabled && theme.check.disabled,\n                  checked && theme.check.checked\n                )}\n                variants={checkVariants}\n                style={{ pathLength, opacity }}\n                custom={checked}\n              />\n            )}\n          </motion.svg>\n        </motion.div>\n        {labelPosition === 'end' && label && (\n          <CheckboxLabel\n            id={labelId}\n            label={label}\n            size={size}\n            checked={checked}\n            disabled={disabled}\n            onChange={handleOnChange}\n            labelClassName={cn('ml-2.5', labelClassName)}\n            theme={theme}\n          />\n        )}\n      </div>\n    );\n  }\n);\n","export interface CheckboxTheme {\n  /** CSS class applied to the root checkbox container. */\n  base: string;\n  /** Class names for the checkbox label in its various states and sizes. */\n  label: {\n    base: string;\n    clickable: string;\n    disabled: string;\n    checked: string;\n    sizes: {\n      small: string;\n      medium: string;\n      large: string;\n      [key: string]: string;\n    };\n  };\n  /** Class names for the checkbox border in its various states. */\n  border: {\n    base: string;\n    disabled: string;\n    checked: string;\n  };\n  /** Class names for the check icon in its various states. */\n  check: {\n    base: string;\n    disabled: string;\n    checked: string;\n  };\n  /** Class names for the checkbox box element in its various states. */\n  checkbox: {\n    base: string;\n    disabled: string;\n    checked: string;\n  };\n  /** Class names for each size variant of the checkbox. */\n  sizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n  /** Motion variants used to animate the checkbox box in different states. */\n  boxVariants: {\n    hover: {\n      strokeWidth: number;\n      stroke: string;\n      fill: string;\n    };\n    pressed: {\n      scale: number;\n    };\n    checked: {\n      stroke: string;\n      fill: string;\n    };\n    unchecked: {\n      stroke: string;\n      fill: string;\n    };\n  };\n}\n\nconst baseTheme: Partial<CheckboxTheme> = {\n  base: 'inline-flex items-center w-full group/checkbox',\n  label: {\n    base: 'dark:text-gray-400 light:text-gray-700 ml-2.5 w-full',\n    checked: 'checked dark:text-gray-100 light:text-gray-900',\n    disabled: 'cursor-not-allowed dark:text-gray-600 light:text-gray-400',\n    clickable: 'cursor-pointer',\n    sizes: {\n      small: 'text-sm',\n      medium: 'text-base',\n      large: 'text-lg'\n    }\n  },\n  check: {\n    base: 'stroke-white',\n    checked: '',\n    disabled: 'cursor-not-allowed'\n  },\n  border: {\n    base: 'stroke-gray-400 light:stroke-gray-700',\n    checked: 'stroke-blue-500',\n    disabled: 'cursor-not-allowed stroke-gray-500'\n  },\n  checkbox: {\n    base: 'fill-transparent flex items-center justify-center cursor-pointer focus-visible:outline-hidden',\n    checked: 'fill-blue-500 checked',\n    disabled: 'fill-transparent disabled'\n  },\n  sizes: {\n    small: '[&>svg]:w-3 [&>svg]:h-3',\n    medium: '[&>svg]:w-4 [&>svg]:h-4',\n    large: '[&>svg]:w-5 [&>svg]:h-5'\n  }\n};\nexport const checkboxTheme: CheckboxTheme = {\n  ...baseTheme,\n  checkbox: {\n    ...baseTheme.checkbox,\n    base: [\n      baseTheme.checkbox.base,\n      'border border-surface',\n      '[&.checked.disabled]:fill-gray-400'\n    ].join(' '),\n    checked: [\n      baseTheme.checkbox.checked,\n      'group-hover/checkbox:fill-blue-400',\n      'light:group-hover/checkbox:fill-blue-600',\n      'light:group-hover/checkbox:[&.disabled]:fill-gray-400'\n    ].join(' '),\n    disabled: [\n      baseTheme.checkbox.disabled,\n      'group-hover/checkbox:transparent',\n      'light:group-hover/checkbox:transparent'\n    ].join(' ')\n  },\n  check: {\n    ...baseTheme.check,\n    base: [\n      baseTheme.check.base,\n      'group-hover/checkbox:stroke-black light:group-hover/checkbox:stroke-white'\n    ].join(' '),\n    disabled: [\n      baseTheme.check.disabled,\n      'stroke-black light:stroke-white group-hover/checkbox:stroke-black '\n    ].join(' ')\n  },\n  border: {\n    ...baseTheme.border,\n    base: [\n      baseTheme.border.base,\n      'dark:group-hover/checkbox:stroke-blue-300',\n      'light:group-hover/checkbox:stroke-blue-600'\n    ].join(' '),\n    disabled: [\n      baseTheme.border.disabled,\n      'dark:group-hover/checkbox:stroke-gray-500',\n      'light:group-hover/checkbox:stroke-gray-400'\n    ].join(' ')\n  },\n  label: {\n    ...baseTheme.label,\n    base: [\n      baseTheme.label.base,\n      'text-text-primary dark:group-hover/checkbox:text-blue-300 light:group-hover/checkbox:text-blue-400'\n    ].join(' '),\n    checked: [\n      baseTheme.label.checked,\n      'group-hover/checkbox:text-gray-100'\n    ].join(' '),\n    disabled: [\n      baseTheme.label.disabled,\n      'light:group-hover/checkbox:text-gray-400',\n      'dark:group-hover/checkbox:text-gray-600'\n    ].join(' ')\n  },\n  boxVariants: {\n    hover: {\n      strokeWidth: 1\n    },\n    pressed: { scale: 0.95 }\n  }\n} as CheckboxTheme;\n","import React, {\n  forwardRef,\n  RefObject,\n  useImperativeHandle,\n  useLayoutEffect,\n  useRef,\n  useState\n} from 'react';\nimport { InputTheme } from './InputTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface InputProps extends Omit<\n  React.InputHTMLAttributes<HTMLInputElement>,\n  'size'\n> {\n  /**\n   * If true, the input will take up the full width of its container.\n   */\n  fullWidth?: boolean;\n\n  /**\n   * If true, the input will be focused during the first mount.\n   */\n  selectOnFocus?: boolean;\n\n  /**\n   * If true, the input will show an error state.\n   */\n  error?: boolean;\n\n  /**\n   * Additional classname for the input container element.\n   */\n  containerClassname?: string;\n\n  /**\n   * Size of the input.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Content to display before the input.\n   */\n  start?: React.ReactNode | string;\n\n  /**\n   * Content to display after the input.\n   */\n  end?: React.ReactNode | string;\n\n  /**\n   * Shortcut for the onChange value event.\n   */\n  onValueChange?: (value: string) => void;\n\n  /**\n   * Theme for the Input.\n   */\n  theme?: InputTheme;\n}\n\nexport interface InputRef {\n  /**\n   * Reference to the input element.\n   */\n  inputRef?: RefObject<HTMLInputElement>;\n\n  /**\n   * Reference to the container element.\n   */\n  containerRef?: RefObject<HTMLDivElement>;\n\n  /**\n   * Method to blur the input.\n   */\n  blur?: () => void;\n\n  /**\n   * Method to focus the input.\n   */\n  focus?: () => void;\n\n  /**\n   * Method to select the input.\n   */\n  select?: () => void;\n}\n\nexport const Input = forwardRef<InputRef, InputProps>(\n  (\n    {\n      className,\n      containerClassname,\n      error,\n      fullWidth,\n      selectOnFocus,\n      start,\n      end,\n      autoFocus,\n      disabled,\n      value,\n      size = 'medium',\n      onFocus,\n      onChange,\n      onValueChange,\n      onBlur,\n      theme: customTheme,\n      ...rest\n    },\n    ref\n  ) => {\n    const containerRef = useRef<HTMLDivElement | null>(null);\n    const inputRef = useRef<HTMLInputElement | null>(null);\n    const [focused, setFocused] = useState(false);\n\n    useImperativeHandle(ref, () => ({\n      inputRef,\n      containerRef,\n      blur: () => inputRef.current?.blur(),\n      focus: () => inputRef.current?.focus(),\n      select: () => inputRef.current?.select()\n    }));\n\n    useLayoutEffect(() => {\n      if (autoFocus) {\n        // Small timeout for page loading\n        requestAnimationFrame(() => inputRef.current?.focus());\n      }\n    }, [autoFocus]);\n\n    const theme: InputTheme = useComponentTheme('input', customTheme);\n\n    return (\n      <div\n        className={cn(\n          theme.base,\n          focused && theme.focused,\n          fullWidth && theme.fullWidth,\n          error && theme.error,\n          theme.sizes[size],\n          disabled && theme.disabled,\n          containerClassname\n        )}\n        ref={containerRef}\n      >\n        {start && (\n          <div className={cn(theme.adornment.base, theme.adornment.start)}>\n            {start}\n          </div>\n        )}\n        <input\n          {...rest}\n          ref={inputRef}\n          value={value}\n          disabled={disabled}\n          aria-invalid={error || undefined}\n          className={cn(theme.input, className)}\n          onFocus={event => {\n            if (selectOnFocus) {\n              event.target.select();\n            }\n            setFocused(true);\n            onFocus?.(event);\n          }}\n          onBlur={event => {\n            onBlur?.(event);\n            setFocused(false);\n          }}\n          onChange={event => {\n            onValueChange?.(event.target.value);\n            onChange?.(event);\n          }}\n        />\n        {end && (\n          <div className={cn(theme.adornment.base, theme.adornment.end)}>\n            {end}\n          </div>\n        )}\n      </div>\n    );\n  }\n);\n","import React, {\n  forwardRef,\n  Ref,\n  InputHTMLAttributes,\n  FC,\n  LegacyRef\n} from 'react';\nimport { InputTheme } from '@/form/Input/InputTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface InlineInputProps\n  extends InputHTMLAttributes<HTMLInputElement> {\n  /**\n   * Additional className for the input container\n   */\n  className?: string;\n\n  /**\n   * Additional width for input element\n   */\n  extraWidth?: number | string;\n\n  /**\n   * Additional className for the input element\n   */\n  inputClassName?: string;\n\n  /**\n   * Theme for the InlineInput.\n   */\n  theme?: InputTheme;\n}\n\nexport interface InlineInputRef {\n  /**\n   * Reference to the input element.\n   */\n  ref?: LegacyRef<HTMLInputElement>;\n}\n\nexport const InlineInput: FC<InlineInputProps & InlineInputRef> = forwardRef<\n  HTMLInputElement,\n  InlineInputProps\n>(\n  (\n    {\n      inputClassName,\n      className,\n      placeholder,\n      value,\n      theme: customTheme,\n      ...props\n    },\n    ref: Ref<HTMLInputElement>\n  ) => {\n    const theme: InputTheme = useComponentTheme('input', customTheme);\n\n    return (\n      <div className={cn('inline-grid', className)}>\n        <span className=\"invisible\" style={{ gridArea: ' 1 / 1 ' }}>\n          {!value && '\\u00A0'}\n          {typeof value === 'string'\n            ? !value\n              ? placeholder?.replace(/ /g, '\\u00A0')\n              : value?.replace(/ /g, '\\u00A0')\n            : value}\n        </span>\n        <input\n          {...props}\n          size={1}\n          ref={ref}\n          style={{ gridArea: ' 1 / 1 ' }}\n          type=\"text\"\n          placeholder={placeholder}\n          value={value}\n          className={cn(\n            'border-none bg-transparent focus:outline-hidden',\n            theme.inline,\n            inputClassName\n          )}\n        />\n      </div>\n    );\n  }\n);\n","import React, { FC, forwardRef, Ref, useEffect, useRef, useState } from 'react';\nimport { Input, InputProps, InputRef } from '@/form/Input/Input';\n\nexport interface DebouncedInputProps extends InputProps {\n  /**\n   * The debounce time in milliseconds. Defaults to 100.\n   * @default 100\n   */\n  debounce?: number;\n}\n\nexport const DebouncedInput = forwardRef<InputRef, DebouncedInputProps>(\n  (\n    { debounce = 100, value, onChange, onValueChange, ...rest },\n    ref: Ref<InputRef>\n  ) => {\n    const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n    const [internalValue, setInternalValue] = useState<\n      string | number | readonly string[]\n    >(value);\n\n    useEffect(() => {\n      setInternalValue(value);\n    }, [value]);\n\n    return (\n      <Input\n        {...rest}\n        ref={ref}\n        value={internalValue}\n        onKeyDown={(event: any) => {\n          // if user hits enter, no need to debounce\n          if (event.key === 'Enter') {\n            onValueChange?.(event.target.value);\n            onChange?.(event as any);\n          }\n        }}\n        onChange={event => {\n          setInternalValue(event.target.value);\n\n          if (debounce) {\n            clearTimeout(timeoutRef.current);\n            timeoutRef.current = setTimeout(() => {\n              onValueChange?.(event.target.value);\n              onChange?.(event);\n            }, debounce);\n          } else {\n            onValueChange?.(event.target.value);\n            onChange?.(event);\n          }\n        }}\n      />\n    );\n  }\n);\n","export interface InputTheme {\n  /** CSS class applied to the root input wrapper. */\n  base: string;\n  /** CSS class applied to the inner input element. */\n  input: string;\n  /** CSS class applied when the input is rendered inline (no border/background). */\n  inline: string;\n  /** CSS class applied when the input is disabled. */\n  disabled: string;\n  /** CSS class applied when the input is focused. */\n  focused: string;\n  /** CSS class applied when the input should fill its container width. */\n  fullWidth: string;\n  /** CSS class applied when the input is in an error state. */\n  error: string;\n  /** Class names for each size variant of the input. */\n  sizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n  /** Class names for start and end input adornments. */\n  adornment: {\n    base: string;\n    start: string;\n    end: string;\n  };\n}\n\nconst baseTheme: InputTheme = {\n  base: 'flex relative flex-row items-center flex-nowrap box-border transition-colors rounded-xs',\n  focused: '',\n  input:\n    'flex-1 font-normal font-sans bg-transparent border-0 p-0 m-0 disabled:pointer-events-none outline-hidden px-0.5 disabled:cursor-not-allowed disabled:text-disabled',\n  inline: 'bg-transparent border-0 outline-hidden',\n  disabled: 'text-waterloo cursor-not-allowed',\n  fullWidth: 'w-full',\n  error: 'border-error',\n  sizes: {\n    small: '[&>input]:text-sm p-1 text-sm',\n    medium: '[&>input]:text-base px-2.5 py-1.5 text-base',\n    large: '[&>input]:text-lg p-5 text-lg'\n  },\n  adornment: {\n    base: 'flex items-center justify-center [&>svg]:w-4 [&>svg]:h-4 [&>svg]:current-color',\n    start: 'pr-1.5',\n    end: 'pl-1.5'\n  }\n};\n\nexport const inputTheme: InputTheme = {\n  ...baseTheme,\n  base: [\n    baseTheme.base,\n    'bg-panel border border-panel-accent text-text-primary hover:border-panel-accent light:hover:border-panel-accent',\n    'hover:after:bg-[radial-gradient(circle,_#105EFF_0%,_#105EFF_36%,_#242433_100%)] light:hover:after:bg-[radial-gradient(circle,_#105EFF_0%,_#105EFF_36%,_#E6E6F0_100%)]',\n    'hover:after:content-[\"\"] hover:after:absolute hover:after:mx-1 hover:after:h-px after:z-2 hover:after:rounded-sm hover:after:-bottom-[1px] hover:after:inset-x-0.5'\n  ].join(' '),\n  focused: [\n    baseTheme.focused,\n    'focus-within:after:bg-[radial-gradient(circle,_#93B6FF_0%,_#105EFF_36%,_#3D3D4D_90%,_#242433_100%)] light:focus-within:after:bg-[radial-gradient(circle,_#105EFF_10%,_#93B6FF_36%,_#E6E6F0_90%)]',\n    'focus-within:after:content-[\"\"] focus-within:after:absolute focus-within:after:mx-0 focus-within:after:h-px after:z-2 focus-within:after:rounded-sm focus-within:after:-bottom-[1px] focus-within:after:inset-x-0.5'\n  ].join(' '),\n  input: [baseTheme.input, 'placeholder-accent'].join(' '),\n  disabled: [\n    baseTheme.disabled,\n    'disabled-within:bg-dark-disabled disabled-within:after:content-none'\n  ].join(' '),\n  adornment: {\n    ...baseTheme.adornment,\n    base: [baseTheme.adornment.base, 'text-text-primary'].join(' ')\n  }\n};\n","import { ReactNode, createContext } from 'react';\n\nexport interface RadioGroupContextProps {\n  /**\n   * Event handler for when the radio selection is changed.\n   */\n  onChange: (value: any) => void;\n\n  /**\n   * Default value of the Radio Button which is checked\n   */\n  selectedValue: any;\n}\n\nexport const RadioGroupContext = createContext<RadioGroupContextProps>({\n  onChange: null,\n  selectedValue: null\n});\n","import React, {\n  FC,\n  forwardRef,\n  LegacyRef,\n  ReactNode,\n  useContext,\n  useMemo\n} from 'react';\nimport { motion } from 'motion/react';\nimport { RadioGroupContext } from './RadioGroupContext';\nimport { cn, useComponentTheme, useId } from '@/utils';\nimport { RadioTheme } from './RadioTheme';\n\nexport interface RadioProps {\n  /**\n   * Whether the radio is checked or not.\n   * Required only if `Radio` is used independently outside a `RadioGroup`.\n   * If `Radio` is used inside a `RadioGroup` then the value is internally set depending upon if the `value` is same as the selected value.\n   */\n  checked?: boolean;\n\n  /**\n   * Label for the radio.\n   */\n  label?: string | ReactNode;\n\n  /**\n   * Whether the radio is disabled or not.\n   */\n  disabled?: boolean;\n\n  /**\n   * Additional class names to apply to the radio.\n   */\n  className?: string;\n\n  /**\n   * Size of the radio.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Event handler for when the radio is changed.\n   */\n  onChange?: (value: boolean) => void;\n\n  /**\n   * Event handler for when the radio is blurred.\n   */\n  onBlur?: (event: React.FocusEvent<HTMLDivElement>) => void;\n\n  /**\n   * Value passed to the form when used inside a `RadioGroup`.\n   * Required when `Radio` is used within a `RadioGroup`\n   */\n  value?: any;\n\n  /**\n   * Theme for the Radio.\n   */\n  theme?: RadioTheme;\n}\n\nconst VARIANTS = {\n  check: { opacity: 1, scale: 1 },\n  uncheck: { opacity: 0, scale: 0 }\n};\n\nexport interface RadioRef {\n  /**\n   * Reference to the radio element.\n   */\n  ref?: LegacyRef<HTMLDivElement>;\n}\n\nexport const Radio: FC<RadioProps & RadioRef> = forwardRef(\n  (\n    {\n      checked: isRadioChecked,\n      label,\n      disabled,\n      onChange,\n      onBlur,\n      className,\n      size = 'medium',\n      value,\n      theme: customTheme,\n      ...rest\n    },\n    ref\n  ) => {\n    const { onChange: onGroupValueChange, selectedValue } =\n      useContext(RadioGroupContext);\n    const checked = useMemo(() => {\n      if (selectedValue === null) {\n        return isRadioChecked;\n      } else {\n        return selectedValue === value;\n      }\n    }, [isRadioChecked, selectedValue, value]);\n\n    const onValueChange = (checked: boolean) => {\n      onGroupValueChange?.(value);\n      onChange?.(checked);\n    };\n\n    const theme: RadioTheme = useComponentTheme('radio', customTheme);\n    const labelId = useId();\n\n    return (\n      <div className={cn(theme.base, className)}>\n        <div\n          {...rest}\n          ref={ref}\n          role=\"radio\"\n          aria-checked={checked}\n          aria-disabled={disabled || undefined}\n          aria-labelledby={label ? labelId : undefined}\n          tabIndex={disabled ? -1 : 0}\n          className={cn(theme.radio.base, theme.sizes[size], {\n            [theme.radio.checked]: checked,\n            [theme.radio.disabled]: disabled\n          })}\n          onClick={() => {\n            if (!disabled) {\n              onValueChange(!checked);\n            }\n          }}\n          onBlur={onBlur}\n          onKeyDown={event => {\n            if (!disabled && event.code === 'Space') {\n              onValueChange(!checked);\n            }\n          }}\n        >\n          <motion.div\n            className={cn(theme.indicator.base, theme.indicator.sizes[size], {\n              [theme.indicator.disabled]: disabled\n            })}\n            initial={!disabled ? { opacity: 0, scale: 0.5 } : {}}\n            variants={VARIANTS}\n            animate={checked ? 'check' : 'uncheck'}\n            transition={{ duration: 0.15 }}\n          />\n        </div>\n        {label && (\n          <span\n            id={labelId}\n            className={cn(theme.label.base, {\n              [theme.label.checked]: checked,\n              [theme.label.disabled]: disabled,\n              [theme.label.clickable]: !disabled\n            })}\n            onClick={() => {\n              if (!disabled) {\n                onValueChange(!checked);\n              }\n            }}\n          >\n            {label}\n          </span>\n        )}\n      </div>\n    );\n  }\n);\n","import React, { FC, useCallback, useMemo, useState } from 'react';\nimport { RadioGroupContext, RadioGroupContextProps } from './RadioGroupContext';\n\nexport interface RadioGroupProps extends RadioGroupContextProps {\n  /**\n   * The Radio Buttons to display in the group.\n   */\n  children: any;\n\n  /**\n   * Additional CSS classes to apply to the Radio group\n   */\n  className?: string;\n}\n\nexport const RadioGroup: FC<RadioGroupProps> = ({\n  children,\n  className,\n  onChange,\n  selectedValue: defaultValue\n}) => {\n  const [selectedValue, setSelectedValue] = useState<any>(defaultValue);\n\n  const handleValueChange = useCallback(\n    value => {\n      setSelectedValue(value);\n      onChange(value);\n    },\n    [onChange]\n  );\n\n  const values: RadioGroupContextProps = useMemo(\n    () => ({\n      onChange: handleValueChange,\n      selectedValue: selectedValue\n    }),\n    [handleValueChange, selectedValue]\n  );\n\n  return (\n    <RadioGroupContext.Provider value={values}>\n      {children}\n    </RadioGroupContext.Provider>\n  );\n};\n","export interface RadioTheme {\n  /** CSS class applied to the root radio container. */\n  base: string;\n  /** Class names for the radio circle in its various states. */\n  radio: {\n    base: string;\n    disabled: string;\n    checked: string;\n  };\n  /** Class names for the inner indicator dot, including size variants. */\n  indicator: {\n    base: string;\n    disabled: string;\n    sizes: {\n      small: string;\n      medium: string;\n      large: string;\n      [key: string]: string;\n    };\n  };\n  /** Class names for the radio label in its various states. */\n  label: {\n    base: string;\n    clickable: string;\n    checked: string;\n    disabled: string;\n  };\n  /** Class names for each size variant of the radio. */\n  sizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n}\n\nconst baseTheme: RadioTheme = {\n  base: 'box-border leading-none group/radio',\n  radio: {\n    base: 'will-change-[border-color] inline-flex justify-center items-center box-border align-middle rounded-[100%] bg-transparent border cursor-pointer',\n    disabled: 'cursor-not-allowed',\n    checked: ''\n  },\n  indicator: {\n    base: 'rounded-[100%]',\n    disabled: 'cursor-not-allowed',\n    sizes: {\n      small: 'w-2 h-2',\n      medium: 'w-2.5 h-2.5',\n      large: 'w-3.5 h-3.5'\n    }\n  },\n  label: {\n    base: 'w-full align-middle ml-2.5',\n    clickable: 'cursor-pointer hover:text-blue-300',\n    disabled: 'cursor-not-allowed',\n    checked: ''\n  },\n  sizes: {\n    small: 'w-3 h-3',\n    medium: 'w-4 h-4',\n    large: 'w-5 h-5'\n  }\n};\n\nexport const radioTheme: RadioTheme = {\n  ...baseTheme,\n  label: {\n    ...baseTheme.label,\n    base: [baseTheme.label.base, 'text-text-secondary'].join(' '),\n    checked: [baseTheme.label.checked, 'text-text-primary'].join(' '),\n    disabled: [baseTheme.label.disabled, 'text-secondary-inactive/40!'].join(\n      ' '\n    )\n  },\n  radio: {\n    ...baseTheme.radio,\n    base: [\n      baseTheme.radio.base,\n      'border-surface group-hover/radio:border-primary-hover hover:border-primary-hover'\n    ].join(' '),\n    checked: [\n      baseTheme.radio.checked,\n      'border-primary-active group-hover/radio:border-primary-hover'\n    ].join(' '),\n    disabled: [baseTheme.radio.disabled, 'border-secondary-inactive!'].join(' ')\n  },\n  indicator: {\n    ...baseTheme.indicator,\n    base: [\n      baseTheme.indicator.base,\n      'bg-primary group-hover/radio:bg-primary-hover'\n    ].join(' '),\n    disabled: [baseTheme.indicator.disabled, 'bg-secondary-inactive!'].join(' ')\n  }\n};\n","import React, { FC } from 'react';\nimport { AnimatePresence, motion } from 'motion/react';\nimport { RangeTheme } from './RangeTheme';\nimport { useComponentTheme } from '@/utils';\n\nexport interface RangeProps<Value> {\n  /**\n   * Whether the range is disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * Additional class name to apply to the range\n   */\n  className?: string;\n\n  /**\n   * Additional class name to apply to the handle\n   */\n  handleClassName?: string;\n\n  /**\n   * The minimum value of the range\n   */\n  min: number;\n\n  /**\n   * The maximum value of the range\n   */\n  max: number;\n\n  /**\n   * The value will be a multiple of step\n   * The default is 1\n   * @default 1\n   */\n  step?: number;\n\n  /**\n   * The value of the range\n   */\n  value: Value;\n\n  /**\n   * When to display the current value\n   * @default 'hover'\n   */\n  valueDisplay?: 'always' | 'hover';\n\n  /**\n   * Format the value to display\n   * @default value => value.toLocaleString()\n   */\n  valueFormat?: (value: number) => string;\n\n  /**\n   * Additional css styles to apply to the range\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * Event fired when the range value changes\n   */\n  onChange?: (value: Value) => void;\n\n  /**\n   * Theme for the range\n   */\n  theme?: RangeTheme;\n}\n\nexport interface RangeTooltipProps {\n  /** Content rendered inside the tooltip. */\n  children?: React.ReactNode;\n  /** Whether the tooltip is visible. */\n  visible: boolean;\n}\n\nexport const RangeTooltip: FC<RangeTooltipProps> = ({ children, visible }) => {\n  const theme: RangeTheme = useComponentTheme('range');\n\n  return (\n    <AnimatePresence>\n      {visible && (\n        <motion.div\n          className={theme.tooltip}\n          initial={{\n            opacity: 0,\n            scale: 0.3,\n            translateX: '-50%'\n          }}\n          animate={{\n            opacity: 1,\n            scale: 1\n          }}\n          exit={{ opacity: 0, scale: 0.3 }}\n        >\n          {children}\n        </motion.div>\n      )}\n    </AnimatePresence>\n  );\n};\n","import React, {\n  useCallback,\n  useEffect,\n  useRef,\n  useState,\n  FC,\n  useMemo,\n  useLayoutEffect\n} from 'react';\nimport { motion, useMotionValue } from 'motion/react';\nimport { RangeProps, RangeTooltip } from './RangeTooltip';\nimport { cn, useComponentTheme } from '@/utils';\nimport { RangeTheme } from './RangeTheme';\n\nexport const RangeDouble: FC<RangeProps<[number, number]>> = ({\n  disabled,\n  style,\n  className,\n  handleClassName,\n  min,\n  max,\n  value,\n  valueDisplay = 'hover',\n  valueFormat = value => value.toLocaleString(),\n  onChange,\n  theme: customTheme,\n  step = 1\n}) => {\n  const minValueBetween = step;\n  const [minValue, maxValue] = value;\n  const initialMinValue = Math.max(minValue, min);\n  const initalMaxValue = Math.min(\n    maxValue < initialMinValue + minValueBetween\n      ? initialMinValue + minValueBetween\n      : maxValue,\n    max\n  );\n\n  const [currentMin, setCurrentMin] = useState(initialMinValue);\n  const [currentMax, setCurrentMax] = useState(initalMaxValue);\n\n  const range = useRef<HTMLDivElement | null>(null);\n  const [rangeWidth, setRangeWidth] = useState(0);\n  const [rangeLeft, setRangeLeft] = useState(0);\n\n  const minX = useMotionValue(0);\n  const maxX = useMotionValue(0);\n\n  const fractionDigits = useMemo(\n    () => step.toString()?.[1]?.length || 0,\n    [step]\n  );\n\n  const getValue = (xPosition: number): number => {\n    const draggedWidth = xPosition - rangeLeft;\n    const draggedWidthPercentage = (draggedWidth * 100) / rangeWidth;\n\n    const scaledStep = (step / (max - min)) * 100;\n    const scaledValue =\n      Math.round(draggedWidthPercentage / scaledStep) * scaledStep;\n    const scaledValueWithStep = (scaledValue / 100) * (max - min) + min;\n    const rawValue = Math.round(scaledValueWithStep / step) * step;\n    // Fix floating point precision. Example 3.50000000000000004\n    const newValue =\n      fractionDigits > 0 ? +rawValue.toFixed(fractionDigits) : rawValue;\n\n    return Math.max(min, Math.min(newValue, max));\n  };\n\n  const getPosition = useCallback(\n    (value: number): number => ((value - min) / (max - min)) * rangeWidth,\n    [min, max, rangeWidth]\n  );\n\n  const minSpaceBetween = getPosition(min + minValueBetween);\n\n  const updateCurrentMin = useCallback(\n    (newMin: number, notifyChange = false) => {\n      newMin = Math.max(newMin, min);\n      if (newMin <= currentMax - minValueBetween) {\n        setCurrentMin(newMin);\n        minX.set(getPosition(newMin));\n        notifyChange && onChange?.([newMin, currentMax]);\n      }\n    },\n    [currentMax, min, minX, getPosition, onChange, minValueBetween]\n  );\n\n  const updateCurrentMax = useCallback(\n    (newMax: number, notifyChange = false) => {\n      newMax = Math.min(newMax, max);\n      if (newMax >= currentMin + minValueBetween) {\n        setCurrentMax(newMax);\n        maxX.set(getPosition(newMax));\n        notifyChange && onChange?.([currentMin, newMax]);\n      }\n    },\n    [currentMin, max, maxX, getPosition, onChange, minValueBetween]\n  );\n\n  useLayoutEffect(() => {\n    const updateRange = () => {\n      const rect = range.current.getBoundingClientRect();\n      setRangeWidth(rect.width);\n      setRangeLeft(rect.left);\n      minX.set(getPosition(currentMin));\n      maxX.set(getPosition(currentMax));\n    };\n\n    // the callback inside requestAnimationFrame is ran when the browser is ready to accept the next repaint\n    // this fixes issues setting range width when the slider is placed in an animated parent element like a popup\n    requestAnimationFrame(updateRange);\n\n    // Add window resize event listener to recalculate dimensions when window size changes\n    window.addEventListener('resize', updateRange);\n\n    // Clean up the event listener when component unmounts\n    return () => {\n      window.removeEventListener('resize', updateRange);\n    };\n  }, [currentMin, minX, currentMax, maxX, getPosition]);\n\n  useEffect(() => {\n    setCurrentMin(initialMinValue);\n    setCurrentMax(initalMaxValue);\n  }, [initalMaxValue, initialMinValue]);\n\n  const [draggingMin, setDraggingMin] = useState(false);\n  const [focusedMin, setFocusedMin] = useState(false);\n  const [hoveringMin, setHoveringMin] = useState(false);\n  const minTooltipVisible = draggingMin || focusedMin || hoveringMin;\n  const minPercentage = ((currentMin - min) / (max - min)) * 100;\n\n  const [draggingMax, setDraggingMax] = useState(false);\n  const [focusedMax, setFocusedMax] = useState(false);\n  const [hoveringMax, setHoveringMax] = useState(false);\n  const maxTooltipVisible = draggingMax || focusedMax || hoveringMax;\n  const maxPercentage = ((currentMax - min) / (max - min)) * 100;\n\n  const theme: RangeTheme = useComponentTheme('range', customTheme);\n\n  return (\n    <div\n      style={style}\n      ref={range}\n      className={cn(theme.base, disabled && theme.disabled, className)}\n    >\n      <motion.div\n        className={cn(theme.drag, handleClassName)}\n        drag={!disabled ? 'x' : null}\n        dragMomentum={false}\n        style={{ x: minX }}\n        onMouseEnter={() => setHoveringMin(true)}\n        onMouseLeave={() => setHoveringMin(false)}\n        onDragStart={() => setDraggingMin(true)}\n        onDrag={(e: MouseEvent) => updateCurrentMin(getValue(e.clientX))}\n        onDragEnd={(e: MouseEvent) => {\n          updateCurrentMin(getValue(e.clientX), true);\n          setDraggingMin(false);\n        }}\n        dragConstraints={{\n          left: 0,\n          right: maxX.get() - minSpaceBetween\n        }}\n        dragElastic={false}\n      >\n        <div\n          className={cn(\n            theme.inputWrapper.base,\n            disabled && theme.inputWrapper.disabled\n          )}\n        >\n          <input\n            type=\"range\"\n            className={theme.input}\n            min={min}\n            max={max}\n            value={currentMin}\n            onChange={e => updateCurrentMin(e.target.valueAsNumber)}\n            onBlur={() => setFocusedMin(false)}\n            onFocus={() => setFocusedMin(true)}\n            disabled={disabled}\n          />\n        </div>\n        {valueDisplay === 'hover' ? (\n          <RangeTooltip visible={minTooltipVisible}>\n            {valueFormat(currentMin)}\n          </RangeTooltip>\n        ) : (\n          valueFormat(currentMin)\n        )}\n      </motion.div>\n      <motion.div\n        className={cn(theme.drag)}\n        drag={!disabled ? 'x' : null}\n        dragMomentum={false}\n        style={{ x: maxX }}\n        onMouseEnter={() => setHoveringMax(true)}\n        onMouseLeave={() => setHoveringMax(false)}\n        onDragStart={() => setDraggingMax(true)}\n        onDrag={(e: MouseEvent) => updateCurrentMax(getValue(e.clientX))}\n        onDragEnd={(e: MouseEvent) => {\n          updateCurrentMax(getValue(e.clientX), true);\n          setDraggingMax(false);\n        }}\n        dragConstraints={{\n          left: minX.get() + minSpaceBetween,\n          right: rangeWidth\n        }}\n        dragElastic={false}\n      >\n        <div\n          className={cn(\n            theme.inputWrapper.base,\n            disabled && theme.inputWrapper.disabled\n          )}\n        >\n          <input\n            type=\"range\"\n            className={theme.input}\n            min={min}\n            max={max}\n            value={currentMax}\n            onChange={e => updateCurrentMax(e.target.valueAsNumber)}\n            onBlur={() => setFocusedMax(false)}\n            onFocus={() => setFocusedMax(true)}\n            disabled={disabled}\n          />\n        </div>\n        {valueDisplay === 'hover' ? (\n          <RangeTooltip visible={maxTooltipVisible}>\n            {valueFormat(currentMax)}\n          </RangeTooltip>\n        ) : (\n          valueFormat(currentMax)\n        )}\n      </motion.div>\n      <div\n        className={cn(theme.rangeHighlight.base, {\n          [theme.rangeHighlight.disabled]: disabled\n        })}\n        style={{\n          width: `${maxPercentage - minPercentage}%`,\n          marginLeft: `${minPercentage}%`\n        }}\n      />\n    </div>\n  );\n};\n","import React, {\n  useCallback,\n  useEffect,\n  useRef,\n  useState,\n  FC,\n  useMemo\n} from 'react';\nimport { motion, useMotionValue } from 'motion/react';\nimport { RangeProps, RangeTooltip } from './RangeTooltip';\nimport { cn, useComponentTheme } from '@/utils';\nimport { RangeTheme } from './RangeTheme';\n\nexport interface RangeSingleProps extends RangeProps<number> {\n  /**\n   * Display the highlight when true\n   * @default false\n   */\n  showHighlight?: boolean;\n}\n\nexport const RangeSingle: FC<RangeSingleProps> = ({\n  disabled,\n  style,\n  handleClassName,\n  onChange,\n  className,\n  min,\n  max,\n  value,\n  valueDisplay = 'hover',\n  valueFormat = value => value.toLocaleString(),\n  step = 1,\n  showHighlight = false,\n  theme: customTheme\n}) => {\n  const [currentValue, setCurrentValue] = useState<number>(value);\n\n  const range = useRef<HTMLDivElement | null>(null);\n  const [rangeWidth, setRangeWidth] = useState(0);\n  const [rangeLeft, setRangeLeft] = useState<number>(0);\n\n  const valueX = useMotionValue(0);\n\n  const fractionDigits = useMemo(\n    () => step.toString()?.[1]?.length || 0,\n    [step]\n  );\n\n  const getValue = (xPosition: number): number => {\n    const draggedWidth = xPosition - rangeLeft;\n    const draggedWidthPercentage = (draggedWidth * 100) / rangeWidth;\n    const scaledStep = (step / (max - min)) * 100;\n    const scaledValue =\n      Math.round(draggedWidthPercentage / scaledStep) * scaledStep;\n    const rawValue = min + ((max - min) * scaledValue) / 100;\n    // Fix floating point precision. Example 3.50000000000000004\n    const newValue =\n      fractionDigits > 0 ? +rawValue.toFixed(fractionDigits) : rawValue;\n\n    return Math.max(min, Math.min(newValue, max));\n  };\n\n  const getPosition = useCallback(\n    (value: number): number => ((value - min) / (max - min)) * rangeWidth,\n    [min, max, rangeWidth]\n  );\n\n  const updateCurrentValue = useCallback(\n    (newValue: number) => {\n      newValue = Math.max(newValue, min);\n      newValue = Math.min(newValue, max);\n      setCurrentValue(newValue);\n      valueX.set(getPosition(newValue));\n      onChange?.(newValue);\n    },\n    [min, max, valueX, getPosition, onChange]\n  );\n\n  useEffect(() => {\n    setRangeWidth(range.current.offsetWidth);\n    setRangeLeft(range.current?.getBoundingClientRect()?.left || 0);\n    valueX.set(getPosition(currentValue));\n  }, [range, currentValue, valueX, getPosition]);\n\n  const [dragging, setDragging] = useState(false);\n  const [hovering, setHovering] = useState(false);\n  const [focused, setFocused] = useState(false);\n  const tooltipVisible = dragging || focused || hovering;\n  const maxPercentage = ((currentValue - min) / (max - min)) * 100;\n\n  const theme: RangeTheme = useComponentTheme('range', customTheme);\n\n  return (\n    <div\n      ref={range}\n      style={style}\n      className={cn(theme.base, disabled && theme.disabled, className)}\n    >\n      <motion.div\n        className={cn(theme.drag, handleClassName)}\n        drag={!disabled ? 'x' : null}\n        dragMomentum={false}\n        style={{ x: valueX }}\n        onMouseEnter={() => setHovering(true)}\n        onMouseLeave={() => setHovering(false)}\n        onDragStart={() => setDragging(true)}\n        onDrag={(e: MouseEvent) => updateCurrentValue(getValue(e.clientX))}\n        onDragEnd={(e: MouseEvent) => {\n          updateCurrentValue(getValue(e.clientX));\n          setDragging(false);\n        }}\n        dragConstraints={{\n          left: 0,\n          right: rangeWidth\n        }}\n      >\n        <div\n          className={cn(\n            theme.inputWrapper.base,\n            disabled && theme.inputWrapper.disabled\n          )}\n        >\n          <input\n            type=\"range\"\n            className={theme.input}\n            min={min}\n            max={max}\n            step={0.5}\n            value={currentValue}\n            disabled={disabled}\n            onChange={e => updateCurrentValue(e.target.valueAsNumber)}\n            onBlur={() => setFocused(false)}\n            onFocus={() => setFocused(true)}\n          />\n        </div>\n        {valueDisplay === 'hover' ? (\n          <RangeTooltip visible={tooltipVisible}>\n            {valueFormat(currentValue)}\n          </RangeTooltip>\n        ) : (\n          valueFormat(currentValue)\n        )}\n      </motion.div>\n      {showHighlight && (\n        <div\n          className={cn(theme.rangeHighlight.base, {\n            [theme.rangeHighlight.disabled]: disabled\n          })}\n          style={{\n            width: `${maxPercentage}%`\n          }}\n        />\n      )}\n    </div>\n  );\n};\n","export interface RangeTheme {\n  /** CSS class applied to the root range track container. */\n  base: string;\n  /** CSS class applied to the draggable thumb handle. */\n  drag: string;\n  /** Class names for the highlighted (selected) portion of the range. */\n  rangeHighlight: {\n    base: string;\n    disabled: string;\n  };\n  /** CSS class applied when the range is disabled. */\n  disabled: string;\n  /** Class names for the input wrapper element. */\n  inputWrapper: {\n    base: string;\n    disabled: string;\n  };\n  /** CSS class applied to the hidden input element used for keyboard controls. */\n  input: string;\n  /** CSS class applied to the value tooltip shown above the handle. */\n  tooltip: string;\n}\n\nconst baseTheme: RangeTheme = {\n  base: 'relative box-border w-full h-0.5',\n  drag: 'absolute w-4 h-4 -left-2 -top-2 rounded-full',\n  inputWrapper: {\n    base: 'cursor-pointer inline-block relative h-full w-full rounded-full',\n    disabled: 'cursor-not-allowed'\n  },\n  rangeHighlight: {\n    base: 'pointer-events-none h-0.5',\n    disabled: 'cursor-not-allowed'\n  },\n  disabled: 'cursor-not-allowed',\n  input: 'absolute left-[-9999px]', // The hidden input used for keyboard controls\n  tooltip:\n    'absolute top-[-45px] whitespace-nowrap text-center left-2/4 rounded-lg p-2.5'\n};\n\nexport const rangeTheme: RangeTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'bg-surface light:bg-gray-200'].join(' '),\n  inputWrapper: {\n    ...baseTheme.inputWrapper,\n    base: [\n      baseTheme.inputWrapper.base,\n      'bg-primary-active hover:bg-primary-hover shadow-[0px_4px_4px_0px_rgba(0,0,0,0.20)]'\n    ].join(' '),\n    disabled: [\n      baseTheme.inputWrapper.disabled,\n      'bg-secondary-inactive hover:bg-secondary-inactive'\n    ].join(' ')\n  },\n  rangeHighlight: {\n    base: [baseTheme.rangeHighlight.base, 'bg-primary-active'].join(' '),\n    disabled: [baseTheme.rangeHighlight.disabled, 'bg-secondary-inactive'].join(\n      ' '\n    )\n  },\n  tooltip: [baseTheme.tooltip, 'text-text-primary bg-surface'].join(' ')\n};\n","import React, { FC } from 'react';\n\nexport const DownArrowIcon: FC = () => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    x=\"0px\"\n    y=\"0px\"\n    width=\"16\"\n    height=\"16\"\n    viewBox=\"0 0 16 16\"\n  >\n    <path\n      d=\"M11.06 5.53003L8 8.58336L4.94 5.53003L4 6.47003L8 10.47L12 6.47003L11.06 5.53003Z\"\n      fill=\"currentColor\"\n    />\n  </svg>\n);\n","import React, { FC } from 'react';\n\nexport type CloseIconProps = {\n  height?: number;\n  width?: number;\n};\n\nexport const CloseIcon: FC<CloseIconProps> = ({ height = 16, width = 16 }) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    x=\"0px\"\n    y=\"0px\"\n    width={width}\n    height={height}\n    viewBox=\"0 0 16 16\"\n    fill=\"currentColor\"\n  >\n    <path\n      d=\"M12.6667 4.27331L11.7267 3.33331L8.00004 7.05998L4.27337 3.33331L3.33337 4.27331L7.06004 7.99998L3.33337 11.7266L4.27337 12.6666L8.00004 8.93998L11.7267 12.6666L12.6667 11.7266L8.94004 7.99998L12.6667 4.27331Z\"\n      fill=\"currentColor\"\n    ></path>\n  </svg>\n);\n","import React, { FC } from 'react';\nimport { motion } from 'motion/react';\nimport { DotsLoaderTheme } from './DotsLoaderTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface DotsLoaderProps {\n  /**\n   * Additional class names for the loader.\n   */\n  className?: string;\n\n  /**\n   * The speed of the animation.\n   * @default 0.2\n   */\n  speed?: number;\n\n  /**\n   * The size of the loader.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Theme for the DotsLoader.\n   */\n  theme?: DotsLoaderTheme;\n}\n\nexport const DotsLoader: FC<DotsLoaderProps> = ({\n  className,\n  size = 'medium',\n  speed = 0.2,\n  theme: customTheme\n}) => {\n  const theme: DotsLoaderTheme = useComponentTheme('dotsLoader', customTheme);\n\n  return (\n    <motion.div className={cn(theme.base, className)}>\n      {[...Array(3)].map((_, i) => (\n        <motion.div\n          key={i}\n          className={cn(theme.dot, theme.sizes[size])}\n          animate={{\n            opacity: [0, 1, 0],\n            scale: [1, 2, 2, 1, 1]\n          }}\n          transition={{\n            duration: speed * 4,\n            ease: 'easeInOut',\n            times: [0, 0.2, 0.5, 0.8, 1],\n            repeat: Infinity,\n            repeatDelay: speed,\n            delay: speed * i\n          }}\n        />\n      ))}\n    </motion.div>\n  );\n};\n","import React, { FC } from 'react';\n\nexport const RefreshIcon: FC = () => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 32 32\"\n    width=\"64px\"\n    height=\"64px\"\n  >\n    <path\n      d=\"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z\"\n      fill=\"currentColor\"\n    />\n  </svg>\n);\n","import React, { FC } from 'react';\nimport { SelectOptionProps } from '@/form/Select/SelectOption';\nimport ellipsize from 'ellipsize';\nimport { CloseIcon } from '@/form/Select/icons';\nimport { cn, useComponentTheme } from '@/utils';\nimport { SelectTheme } from '@/form/Select/SelectTheme';\n\nexport interface SelectInputChipProps {\n  /**\n   * The option to render as a chip.\n   */\n  option?: SelectOptionProps;\n\n  /**\n   * The maximum length of the chip.\n   * @default 20\n   */\n  maxLength?: number;\n\n  /**\n   * Additional class names to apply to the chip.\n   */\n  className?: string;\n\n  /**\n   * Whether the chip is disabled or not.\n   */\n  disabled?: boolean;\n\n  /**\n   * Whether the chip is clearable or not.\n   */\n  clearable?: boolean;\n\n  /**\n   * Theme for the Select.\n   */\n  theme?: SelectTheme;\n\n  /**\n   * The close icon for the chip.\n   * @default <CloseIcon />\n   */\n  closeIcon?: React.ReactNode;\n\n  /**\n   * Callback for when a key is pressed on the chip.\n   */\n  onTagKeyDown?: (\n    event: React.KeyboardEvent<HTMLSpanElement>,\n    option: SelectOptionProps\n  ) => void;\n\n  /**\n   * Callback for when the selected option changes.\n   */\n  onSelectedChange?: (option: SelectOptionProps) => void;\n}\n\nexport const SelectInputChip: FC<SelectInputChipProps> = ({\n  option,\n  disabled,\n  clearable,\n  className,\n  maxLength = 20,\n  closeIcon = <CloseIcon />,\n  onTagKeyDown,\n  onSelectedChange,\n  theme: customTheme\n}) => {\n  const origLabel = option.inputLabel || option.children;\n  const label =\n    typeof origLabel === 'string' ? ellipsize(origLabel, maxLength) : origLabel;\n\n  const { selectInput: theme }: SelectTheme = useComponentTheme(\n    'select',\n    customTheme\n  );\n\n  return (\n    <span\n      className={cn(\n        theme.chip.base,\n        theme.chip.hover,\n        theme.chip.focused,\n        theme.chip.disabled,\n        className,\n        'select-input-chip'\n      )}\n      title={origLabel as string}\n      tabIndex={-1}\n      onKeyDown={event => onTagKeyDown(event, option)}\n    >\n      {label}\n      {!disabled && clearable && (\n        <button\n          type=\"button\"\n          onClick={() => onSelectedChange(option)}\n          className={cn(theme.chip.removeButton)}\n        >\n          {closeIcon}\n        </button>\n      )}\n    </span>\n  );\n};\n","import React, {\n  FC,\n  ReactElement,\n  Ref,\n  RefObject,\n  useCallback,\n  useImperativeHandle,\n  useMemo,\n  useRef\n} from 'react';\nimport { SelectOptionProps, SelectValue } from '@/form/Select/SelectOption';\nimport { InlineInput } from '@/form/Input';\nimport { DownArrowIcon } from '@/form/Select/icons/DownArrowIcon';\nimport { CloseIcon } from '@/form/Select/icons/CloseIcon';\nimport { DotsLoader } from '@/elements/Loader/DotsLoader';\nimport { RefreshIcon } from '@/form/Select/icons/RefreshIcon';\nimport { SelectInputChip, SelectInputChipProps } from './SelectInputChip';\nimport { cn, useComponentTheme } from '@/utils';\nimport { SelectTheme } from '@/form/Select/SelectTheme';\nimport { CloneElement } from '@/utils';\n\nexport interface SelectInputProps {\n  /**\n   * The id of the select input.\n   */\n  id?: string;\n\n  /**\n   * The name of the select input.\n   */\n  name?: string;\n\n  /**\n   * If true, the select input is required.\n   */\n  required?: boolean;\n\n  /**\n   * The options for the select input.\n   */\n  options?: SelectOptionProps[];\n\n  /**\n   * If true, the select input is disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * If true, the select input menu is open.\n   */\n  menuOpen?: boolean;\n\n  /**\n   * The input text of the select input.\n   */\n  inputText?: string;\n\n  /**\n   * If true, the select input will close on select.\n   */\n  closeOnSelect?: boolean;\n\n  /**\n   * The selected option of the select input.\n   */\n  selectedOption?: SelectOptionProps | SelectOptionProps[];\n\n  /**\n   * If true, the select input will auto focus.\n   */\n  autoFocus?: boolean;\n\n  /**\n   * The class name of the select input.\n   */\n  className?: string;\n\n  /**\n   * The active class name of the select input.\n   */\n  activeClassName?: string;\n\n  /**\n   * If true, the select input is createable.\n   */\n  createable?: boolean;\n\n  /**\n   * If true, the select input is filterable.\n   */\n  filterable?: boolean | 'async';\n\n  /**\n   * If true, the select input allows multiple selection.\n   */\n  multiple?: boolean;\n\n  /**\n   * If true, the select input is loading.\n   */\n  loading?: boolean;\n\n  /**\n   * The reference of the select input.\n   */\n  reference?: Ref<SelectInputRef>;\n\n  /**\n   * The placeholder of the select input.\n   */\n  placeholder?: string;\n\n  /**\n   * If true, the select input has an error.\n   */\n  error?: boolean;\n\n  /**\n   * If true, the select input is clearable.\n   */\n  clearable?: boolean;\n\n  /**\n   * If true, the select input is refreshable.\n   */\n  refreshable?: boolean;\n\n  /**\n   * If true, the select input menu is disabled.\n   */\n  menuDisabled?: boolean;\n\n  /**\n   * The size of the select input.\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * The theme of the select input.\n   */\n  theme?: SelectTheme;\n\n  /**\n   * The close icon of the select input.\n   * @default <CloseIcon />\n   */\n  closeIcon?: React.ReactNode;\n\n  /**\n   * The refresh icon of the select input.\n   * @default <RefreshIcon />\n   */\n  refreshIcon?: React.ReactNode;\n\n  /**\n   * The expand icon of the select input.\n   * @default <DownArrowIcon />\n   */\n  expandIcon?: React.ReactNode;\n\n  /**\n   * The loading icon of the select input.\n   * @default <DotsLoader size=\"small\" />\n   */\n  loadingIcon?: React.ReactNode;\n\n  /**\n   * Content to display before the select input.\n   */\n  start?: React.ReactNode;\n\n  /**\n   * Content to display after the select input (before the action buttons).\n   */\n  end?: React.ReactNode;\n\n  /**\n   * The chip of the select input.\n   * @default <SelectInputChip />\n   */\n  chip?: ReactElement<SelectInputChipProps, typeof SelectInputChip>;\n\n  /**\n   * The function to handle selected change.\n   */\n  onSelectedChange?: (option: SelectValue) => void;\n\n  /**\n   * The function to handle expand click.\n   */\n  onExpandClick?: (event: React.MouseEvent<Element>) => void;\n\n  /**\n   * The function to handle key down.\n   */\n  onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\n  /**\n   * The function to handle key up.\n   */\n  onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\n  /**\n   * The function to handle focus.\n   */\n  onFocus?: (\n    event: React.FocusEvent<HTMLInputElement> | React.MouseEvent<HTMLDivElement>\n  ) => void;\n\n  /**\n   * The function to handle blur.\n   */\n  onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\n  /**\n   * The function to handle input change.\n   */\n  onInputChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n\n  /**\n   * The function to handle input paste event.\n   */\n  onPaste?: (event: React.ClipboardEvent<HTMLInputElement>) => void;\n\n  /**\n   * The function to handle refresh.\n   */\n  onRefresh?: () => void;\n\n  /**\n   * The function to handle clear event.\n   */\n  onClear?: () => void;\n}\n\nexport interface SelectInputRef {\n  /**\n   * The reference of the input element.\n   */\n  inputRef?: RefObject<HTMLInputElement>;\n\n  /**\n   * The reference of the container element.\n   */\n  containerRef?: RefObject<HTMLDivElement>;\n\n  /**\n   * Focuses the input element.\n   */\n  focus: () => void;\n}\n\nconst horiztonalArrowKeys = ['ArrowLeft', 'ArrowRight'];\nconst verticalArrowKeys = ['ArrowUp', 'ArrowDown'];\nconst actionKeys = [...verticalArrowKeys, 'Enter', 'Escape'];\n\nexport const SelectInput: FC<SelectInputProps> = ({\n  reference,\n  autoFocus,\n  selectedOption,\n  disabled,\n  placeholder,\n  filterable,\n  id,\n  name,\n  className,\n  activeClassName,\n  inputText,\n  required,\n  loading,\n  clearable,\n  multiple,\n  refreshable,\n  error,\n  menuDisabled,\n  menuOpen,\n  size,\n  refreshIcon = <RefreshIcon />,\n  closeIcon = <CloseIcon />,\n  expandIcon = <DownArrowIcon />,\n  loadingIcon = <DotsLoader size=\"small\" />,\n  start,\n  end,\n  closeOnSelect,\n  onSelectedChange,\n  onKeyDown,\n  onKeyUp,\n  onExpandClick,\n  onInputChange,\n  onFocus,\n  onBlur,\n  onRefresh,\n  onPaste,\n  onClear,\n  chip = <SelectInputChip />,\n  theme: customTheme\n}) => {\n  const { selectInput: theme }: SelectTheme = useComponentTheme(\n    'select',\n    customTheme\n  );\n  const containerRef = useRef<HTMLDivElement | null>(null);\n  const inputRef = useRef<any | null>(null);\n\n  const hasValue =\n    (multiple && (selectedOption as SelectOptionProps[])?.length > 0) ||\n    (!multiple && selectedOption);\n\n  const placeholderText = hasValue ? '' : placeholder;\n  const showClear = clearable && !disabled && hasValue;\n\n  useImperativeHandle(reference, () => ({\n    containerRef,\n    inputRef,\n    focus: () => focusInput()\n  }));\n\n  const inputTextValue = useMemo(() => {\n    if (!inputText && hasValue) {\n      if (!Array.isArray(selectedOption)) {\n        const singleOption = selectedOption as SelectOptionProps;\n        if (!singleOption.inputLabel) {\n          return singleOption.children as string;\n        }\n      }\n      return '';\n    }\n\n    return inputText;\n  }, [hasValue, inputText, selectedOption]);\n\n  const onClearValues = useCallback(\n    (event: React.MouseEvent<HTMLButtonElement>) => {\n      // Stop propogation to prevent closing the menu\n      if (closeOnSelect) {\n        event.stopPropagation();\n      }\n      onSelectedChange(null);\n      onClear?.();\n    },\n    [onSelectedChange, closeOnSelect, onClear]\n  );\n\n  const focusInput = useCallback(() => {\n    const input = inputRef.current;\n    if (input) {\n      if (input.value) {\n        const len = input.value.length;\n        // Handle dom settle\n        setTimeout(() => input.setSelectionRange(len, len));\n        input.focus();\n      } else {\n        input.focus();\n      }\n    }\n  }, []);\n\n  const onInputFocus = useCallback(\n    (\n      event:\n        | React.FocusEvent<HTMLInputElement>\n        | React.MouseEvent<HTMLDivElement>\n    ) => {\n      // On initial focus, move focus to the last character of the value\n      if (!multiple && filterable && selectedOption) {\n        // We are handling the selection ourself\n        event.preventDefault();\n\n        // Stop parent container click event from double firing\n        event.stopPropagation();\n\n        focusInput();\n      }\n\n      onFocus?.(event);\n    },\n    [filterable, focusInput, multiple, onFocus, selectedOption]\n  );\n\n  const onContainerClick = useCallback(\n    (event: React.MouseEvent<HTMLDivElement>) => {\n      if (!disabled) {\n        focusInput();\n      }\n    },\n    [disabled, focusInput]\n  );\n\n  const removeLastValue = useCallback(() => {\n    if (multiple) {\n      const selectedOptions = selectedOption as SelectOptionProps[];\n      onSelectedChange(selectedOptions[selectedOptions.length - 1]);\n    } else {\n      onSelectedChange(null);\n    }\n  }, [multiple, onSelectedChange, selectedOption]);\n\n  const onInputKeyDown = useCallback(\n    (event: React.KeyboardEvent<HTMLInputElement>) => {\n      const key = event.key;\n\n      const isActionKey = actionKeys.includes(key);\n      if (isActionKey) {\n        event.preventDefault();\n        event.stopPropagation();\n      }\n\n      if (clearable && key === 'Backspace' && hasValue) {\n        if (!multiple || (multiple && !inputText)) {\n          event.preventDefault();\n          event.stopPropagation();\n          removeLastValue();\n        }\n      }\n\n      onKeyDown?.(event);\n    },\n    [clearable, hasValue, inputText, multiple, onKeyDown, removeLastValue]\n  );\n\n  const onInputKeyUp = useCallback(\n    (event: React.KeyboardEvent<HTMLInputElement>) => {\n      const key = event.key;\n      const isActionKey = actionKeys.includes(key);\n      const isHorzKey = horiztonalArrowKeys.includes(key);\n\n      if ((!filterable && !isActionKey) || isHorzKey) {\n        event.preventDefault();\n        event.stopPropagation();\n      } else {\n        onKeyUp?.(event);\n      }\n    },\n    [filterable, onKeyUp]\n  );\n\n  const onChange = useCallback(\n    (event: React.ChangeEvent<HTMLInputElement>) => {\n      if (filterable) {\n        onInputChange(event);\n      }\n    },\n    [filterable, onInputChange]\n  );\n\n  const onTagKeyDown = useCallback(\n    (\n      event: React.KeyboardEvent<HTMLSpanElement>,\n      option: SelectOptionProps\n    ) => {\n      const key = event.key;\n      if (key === 'Backspace' && !disabled && clearable) {\n        onSelectedChange(option);\n      }\n    },\n    [clearable, disabled, onSelectedChange]\n  );\n\n  const renderSelectedValue = useCallback(() => {\n    if (multiple) {\n      const multipleOptions = selectedOption as SelectOptionProps[];\n      if (multipleOptions?.length) {\n        return (\n          <div\n            className={cn(theme.selectedValue, 'select-input-value', {\n              [theme.multiple?.selectedValue]: multiple\n            })}\n          >\n            {multipleOptions.map(option => (\n              <CloneElement<SelectInputChipProps>\n                element={chip}\n                key={option.value}\n                option={option}\n                clearable={clearable}\n                disabled={disabled}\n                closeIcon={closeIcon}\n                onSelectedChange={onSelectedChange}\n                onTagKeyDown={onTagKeyDown}\n              />\n            ))}\n          </div>\n        );\n      }\n    } else {\n      const singleOption = selectedOption as SelectOptionProps;\n      if (singleOption?.inputLabel && !inputText) {\n        return (\n          <div\n            className={cn(\n              theme.selectedValue,\n              theme.single?.selectedValue,\n              'select-input-value'\n            )}\n          >\n            {singleOption?.inputLabel}\n          </div>\n        );\n      }\n    }\n\n    return null;\n  }, [\n    chip,\n    clearable,\n    closeIcon,\n    disabled,\n    inputText,\n    multiple,\n    onSelectedChange,\n    onTagKeyDown,\n    selectedOption,\n    theme.multiple,\n    theme.selectedValue,\n    theme.single\n  ]);\n\n  return (\n    <div className={cn(theme.container)}>\n      <div\n        ref={containerRef}\n        className={cn(\n          theme.base,\n          theme.size[size],\n          {\n            [theme.disabled]: disabled,\n            [theme.unfilterable]: !filterable,\n            [theme.error]: error\n          },\n          ...(menuOpen ? [activeClassName, theme.open] : []),\n          className\n        )}\n        onClick={onContainerClick}\n      >\n        <div\n          className={cn(theme.inputContainer, {\n            [theme.multiple?.inputContainer]: multiple,\n            [theme.single?.inputContainer]: !multiple\n          })}\n          onClick={onInputFocus}\n        >\n          {start && <div className={theme.adornment.start}>{start}</div>}\n          {renderSelectedValue()}\n          <InlineInput\n            ref={inputRef}\n            id={id}\n            name={name}\n            role=\"combobox\"\n            aria-expanded={menuOpen}\n            aria-haspopup=\"listbox\"\n            aria-autocomplete=\"list\"\n            aria-controls={menuOpen ? `${id}-menu` : undefined}\n            disabled={disabled}\n            required={required}\n            autoFocus={autoFocus}\n            placeholder={placeholderText}\n            inputClassName={cn(\n              theme.input,\n              theme.placeholder,\n              'select-input-input'\n            )}\n            value={inputTextValue}\n            autoCorrect=\"off\"\n            spellCheck=\"false\"\n            autoComplete=\"off\"\n            onKeyDown={onInputKeyDown}\n            onKeyUp={onInputKeyUp}\n            onChange={onChange}\n            onFocus={onInputFocus}\n            onBlur={onBlur}\n            onPaste={onPaste}\n          />\n        </div>\n        {end && <div className={theme.adornment.end}>{end}</div>}\n        <div className={theme.actions?.container}>\n          {refreshable && !loading && (\n            <button\n              type=\"button\"\n              title=\"Refresh Options\"\n              disabled={disabled}\n              className={cn(\n                theme.actions?.button,\n                theme.actions?.refresh,\n                'select-input-refresh'\n              )}\n              onClick={onRefresh}\n            >\n              {refreshIcon}\n            </button>\n          )}\n          {loading && (\n            <div className={theme.actions?.loader}>{loadingIcon}</div>\n          )}\n          {showClear && (\n            <button\n              type=\"button\"\n              title=\"Clear selection\"\n              disabled={disabled}\n              className={cn(\n                theme.actions?.button,\n                theme.actions?.close,\n                'select-input-clear'\n              )}\n              onClick={onClearValues}\n            >\n              {closeIcon}\n            </button>\n          )}\n          {!menuDisabled && (\n            <button\n              type=\"button\"\n              title=\"Toggle options menu\"\n              disabled={disabled}\n              className={cn(\n                theme.actions?.button,\n                theme.actions?.expand,\n                'select-input-toggle'\n              )}\n              onClick={onExpandClick}\n              tabIndex={-1}\n            >\n              {expandIcon}\n            </button>\n          )}\n        </div>\n      </div>\n    </div>\n  );\n};\n","export interface SelectInputTheme {\n  /** CSS class applied to the outer container element. */\n  container: string;\n  /** CSS class applied to the root select input. */\n  base: string;\n  /** CSS class applied to the input container wrapping the input element. */\n  inputContainer: string;\n  /** CSS class applied to the inner input element. */\n  input: string;\n  /** CSS class applied to the placeholder text. */\n  placeholder: string;\n  /** CSS class applied to the displayed selected value. */\n  selectedValue: string;\n  /** Class names for the action buttons (refresh, loader, close, expand). */\n  actions: {\n    container: string;\n    button: string;\n    refresh: string;\n    loader: string;\n    close: string;\n    expand: string;\n  };\n  /** CSS class applied when the select input is disabled. */\n  disabled: string;\n  /** CSS class applied when the select is not filterable. */\n  unfilterable: string;\n  /** CSS class applied when the select input is in an error state. */\n  error: string;\n  /** Class names applied when the select is in single-select mode. */\n  single: {\n    selectedValue: string;\n    inputContainer: string;\n    input: string;\n  };\n  /** Class names applied when the select is in multi-select mode. */\n  multiple: {\n    selectedValue: string;\n    inputContainer: string;\n  };\n  /** Class names for start and end adornments. */\n  adornment: {\n    start: string;\n    end: string;\n  };\n  /** CSS class applied when the select menu is open. */\n  open: string;\n  /** Class names for chips shown for selected options. */\n  chip: {\n    base: string;\n    hover: string;\n    focused: string;\n    disabled: string;\n    removeButton: string;\n  };\n  /** Class names for each size variant of the select input. */\n  size: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n}\n\nconst baseTheme: SelectInputTheme = {\n  base: 'flex flex-nowrap items-center box-border border rounded-sm',\n  container: 'relative',\n  inputContainer:\n    'flex-wrap flex items-center overflow-hidden flex-1 max-w-full [&>div]:max-w-full [&_.invisible]:text-ellipsis [&_.invisible]:overflow-hidden',\n  input:\n    'p-0 bg-transparent text-ellipsis align-middle max-w-full read-only:cursor-not-allowed focus:outline-hidden disabled:text-disabled',\n  placeholder: '',\n  selectedValue: 'overflow-hidden whitespace-nowrap text-ellipsis',\n  actions: {\n    container: 'flex items-center justify-center',\n    button: 'disabled:cursor-not-allowed',\n    refresh: 'mr-1.5 [&>svg]:w-4 [&>svg]:h-4 [&>svg]:fill-text-secondary',\n    loader: 'mr-2.5',\n    close: 'mr-1.5 [&>svg]:w-4 [&>svg]:h-4 [&>svg]:fill-text-secondary',\n    expand: '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:fill-text-secondary'\n  },\n  disabled: 'cursor-not-allowed text-disabled hover:after:content-none',\n  unfilterable: 'caret-transparent',\n  error: 'border border-solid',\n  adornment: {\n    start: 'flex items-center mr-1.5',\n    end: 'flex items-center ml-1.5'\n  },\n  open: 'rounded-sm rounded-ee-none rounded-es-none',\n  single: {\n    selectedValue: 'overflow-hidden whitespace-nowrap text-ellipsis max-w-full',\n    inputContainer: 'flex-nowrap',\n    input: 'max-w-full'\n  },\n  multiple: {\n    selectedValue: 'contents',\n    inputContainer: 'flex-wrap'\n  },\n  chip: {\n    base: 'cursor-pointer flex text-sm leading-none box-border mr-1 px-1 py-1 rounded-sm border-solid border-transparent',\n    hover: '',\n    focused: 'focused:border-transparent focused:outline-none',\n    disabled: 'disabled:cursor-not-allowed',\n    removeButton:\n      'cursor-pointer leading-0 ml-1 p-0 border-0 [&>svg]:w-3 [&>svg]:h-3 [&>svg]:align-baseline [&>svg]:pointer-events-none'\n  },\n  size: {\n    small: 'py-1 px-2 text-sm min-h-8',\n    medium: 'py-2 px-3 text-base min-h-[35px]',\n    large: 'py-2 px-3 text-lg min-h-[42px]'\n  }\n};\n\nexport const selectInputTheme: SelectInputTheme = {\n  ...baseTheme,\n  base: [\n    baseTheme.base,\n    'bg-panel text-text-primary border-panel-accent border-solid hover:border-panel-accent light:hover:border-panel-accent',\n    'hover:after:bg-[radial-gradient(circle,_#105EFF_0%,_#105EFF_36%,_#242433_100%)] light:hover:after:bg-[radial-gradient(circle,_#105EFF_0%,_#105EFF_36%,_#E6E6F0_100%)]',\n    'focus-within:after:bg-[radial-gradient(circle,_#93B6FF_0%,_#105EFF_36%,_#3D3D4D_90%,_#242433_100%)] light:focus-within:after:bg-[radial-gradient(circle,_#105EFF_10%,_#93B6FF_36%,_#E6E6F0_90%)]',\n    'hover:after:content-[\"\"] hover:after:absolute hover:after:mx-1 hover:after:h-px after:z-2 hover:after:rounded-sm hover:after:-bottom-[0px] hover:after:inset-x-0.5',\n    'focus-within:after:content-[\"\"] focus-within:after:absolute focus-within:after:mx-0 focus-within:after:h-px after:z-2 focus-within:after:rounded-sm focus-within:after:-bottom-[0px] focus-within:after:inset-x-0.5'\n  ].join(' '),\n  placeholder: [\n    baseTheme.placeholder,\n    'placeholder:text-secondary-content'\n  ].join(' '),\n  disabled: [\n    baseTheme.disabled,\n    'text-text-secondary/40 border-surface light:hover:border-surface'\n  ].join(' '),\n  error: [baseTheme.error, 'border-error light:border-error/20'].join(' '),\n  actions: {\n    ...baseTheme.actions,\n    button: [baseTheme.actions.button, 'hover:cursor-pointer'].join(' ')\n  },\n  chip: {\n    ...baseTheme.chip,\n    base: [\n      baseTheme.chip.base,\n      '[&>svg]:fill-text-primary [&>svg]:disabled:fill-text-secondary/40'\n    ].join(' '),\n    hover: [baseTheme.chip.hover, 'hover:brightness-150'].join(' '),\n    focused: [baseTheme.chip.focused, 'border-panel-accent'].join(' '),\n    removeButton: [\n      baseTheme.chip.removeButton,\n      '[&>svg]:fill-text-primary [&>svg]:disabled:fill-text-secondary/40'\n    ].join(' ')\n  }\n};\n","export interface HighlightChunk {\n  /** A contiguous segment of the original text. */\n  text: string;\n  /** Whether this segment is a case-insensitive match of the keyword. */\n  highlight: boolean;\n}\n\n/**\n * Splits `text` into ordered chunks covering the full string, flagging every\n * non-overlapping, case-insensitive occurrence of `keyword` as highlighted.\n *\n * The keyword is matched as a literal substring (no regex), so characters like\n * `(` or `.` are treated literally. Matches advance by `keyword.length`,\n * mirroring the 'g' flag semantics used by react-highlight-words.\n */\nexport const highlightChunks = (\n  text: string,\n  keyword: string\n): HighlightChunk[] => {\n  if (!keyword || !text) {\n    return [{ text, highlight: false }];\n  }\n\n  const chunks: HighlightChunk[] = [];\n  const haystack = text.toLowerCase();\n  const needle = keyword.toLowerCase();\n\n  let lastIndex = 0;\n  let matchIndex = haystack.indexOf(needle, lastIndex);\n\n  while (matchIndex !== -1) {\n    if (matchIndex > lastIndex) {\n      chunks.push({\n        text: text.slice(lastIndex, matchIndex),\n        highlight: false\n      });\n    }\n\n    chunks.push({\n      text: text.slice(matchIndex, matchIndex + needle.length),\n      highlight: true\n    });\n\n    lastIndex = matchIndex + needle.length;\n    matchIndex = haystack.indexOf(needle, lastIndex);\n  }\n\n  if (lastIndex < text.length) {\n    chunks.push({ text: text.slice(lastIndex), highlight: false });\n  }\n\n  return chunks;\n};\n","import React, { FC, Fragment, memo, ReactNode } from 'react';\nimport { highlightChunks } from './utils';\n\nexport interface HighlightedTextProps {\n  /**\n   * The keyword to highlight within the text.\n   */\n  search?: string;\n\n  /**\n   * The content to highlight. Only string or number children are\n   * highlighted; other nodes render unchanged.\n   */\n  children?: string | number | ReactNode;\n}\n\n/**\n * Renders text with every case-insensitive occurrence of `search` wrapped\n * in a `<mark>` element. Non-text children are rendered as-is.\n *\n * Memoized so unchanged items skip re-rendering when used in lists.\n */\nexport const HighlightedText: FC<HighlightedTextProps> = memo(\n  ({ search, children }) =>\n    typeof children === 'string' || typeof children === 'number' ? (\n      <span>\n        {highlightChunks(String(children), search ?? '').map((chunk, i) =>\n          chunk.highlight ? (\n            <mark key={i}>{chunk.text}</mark>\n          ) : (\n            <Fragment key={i}>{chunk.text}</Fragment>\n          )\n        )}\n      </span>\n    ) : (\n      <>{children}</>\n    )\n);\n\nHighlightedText.displayName = 'HighlightedText';\n","import React, { FC } from 'react';\n\nexport type CheckIconProps = {\n  className?: string;\n};\n\nexport const CheckIcon: FC<CheckIconProps> = ({ className }) => (\n  <svg\n    width=\"16\"\n    height=\"16\"\n    viewBox=\"0 0 16 16\"\n    fill=\"none\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    className={className}\n  >\n    <g>\n      <path\n        d=\"M5.86339 10.5831L3.08339 7.80312L2.13672 8.74312L5.86339 12.4698L13.8634 4.46979L12.9234 3.52979L5.86339 10.5831Z\"\n        fill=\"currentColor\"\n      />\n    </g>\n  </svg>\n);\n","import React, { FC, Fragment, ReactElement, useCallback } from 'react';\nimport { motion } from 'motion/react';\nimport { SelectOptionProps, SelectValue } from '@/form/Select/SelectOption';\nimport { GroupOptions, GroupOption } from '@/form/Select/utils';\nimport { HighlightedText } from '@/data/HighlightedText';\nimport { List, ListItem } from '@/layout';\nimport { cn, useComponentTheme } from '@/utils';\nimport { SelectTheme } from '@/form/Select/SelectTheme';\nimport { CheckIcon } from '@/form/Select/icons/CheckIcon';\n\nexport interface RenderCreateOptionArgs {\n  /** The current input text used to create a new option. */\n  text: string;\n  /** Callback invoked to create the new option. */\n  onCreate: () => void;\n}\n\nexport interface SelectMenuProps {\n  /**\n   * The id of the select.\n   */\n  id?: string;\n\n  /**\n   * Options passed to the select.\n   */\n  options?: SelectOptionProps[];\n\n  /**\n   * The selected option(s).\n   */\n  selectedOption?: SelectOptionProps | SelectOptionProps[];\n\n  /**\n   * Additional CSS styles to apply to the select menu.\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * Whether the menu is disabled or not.\n   */\n  disabled?: boolean;\n\n  /**\n   * The groups of options.\n   */\n  groups?: GroupOptions;\n\n  /**\n   * Whether users can create options or not.\n   */\n  createable?: boolean;\n\n  /**\n   * Function to render the create option.\n   */\n  renderCreateOption?: ({\n    text,\n    onCreate\n  }: RenderCreateOptionArgs) => ReactElement;\n\n  /**\n   * Additional class names to apply to the select menu.\n   */\n  className?: string;\n\n  /**\n   * Whether the menu can select multiples or not.\n   */\n  multiple?: boolean;\n\n  /**\n   * Internal active index of the keyboard position.\n   */\n  index?: number;\n\n  /**\n   * The input's search text to use for highlighting.\n   */\n  inputSearchText?: string;\n\n  /**\n   * Whether users can filter the options or not.\n   */\n  filterable?: boolean | 'async';\n\n  /**\n   * Whether the component is loading or not.\n   */\n  loading?: boolean;\n\n  /**\n   * The size of the select menu.\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Icon displayed for checked elements of the list\n   */\n  checkIcon?: any;\n\n  /**\n   * Event fired when the selected option(s) change.\n   */\n  onSelectedChange?: (option: SelectValue) => void;\n\n  /**\n   * The theme for the Select.\n   */\n  theme?: SelectTheme;\n}\n\nexport const SelectMenu: FC<SelectMenuProps> = ({\n  id,\n  style,\n  disabled,\n  createable,\n  renderCreateOption,\n  selectedOption,\n  options,\n  loading,\n  className,\n  index,\n  filterable,\n  groups,\n  multiple,\n  inputSearchText,\n  size,\n  checkIcon,\n  onSelectedChange,\n  theme: customTheme\n}) => {\n  const trimmedText = (inputSearchText ?? '').trim();\n\n  const checkOptionSelected = useCallback(\n    (option: SelectOptionProps) => {\n      if (multiple) {\n        if (Array.isArray(selectedOption)) {\n          return selectedOption.find(o => o.value === option.value);\n        }\n\n        return false;\n      }\n\n      return (selectedOption as SelectOptionProps)?.value === option.value;\n    },\n    [selectedOption, multiple]\n  );\n\n  const { selectMenu: theme }: SelectTheme = useComponentTheme(\n    'select',\n    customTheme\n  );\n\n  const onCreateOption = useCallback(() => {\n    onSelectedChange({\n      value: trimmedText.toLowerCase(),\n      children: trimmedText.toLowerCase()\n    });\n  }, [onSelectedChange, trimmedText]);\n\n  const renderListItems = useCallback(\n    (items: SelectOptionProps[], group?: GroupOption) =>\n      items.map((o, i) => (\n        <ListItem\n          key={`${group?.name}-${o.value}`}\n          className={cn(\n            theme.option?.base,\n            theme.option?.hover,\n            theme.size?.[size],\n            {\n              [theme.option?.selected]: checkOptionSelected(o),\n              [theme.option?.active]: index === i + (group?.offset || 0),\n              [theme.option?.disabled]: disabled || o.disabled\n            }\n          )}\n          contentClassName={theme.option.content}\n          onClick={event => {\n            event.preventDefault();\n            event.stopPropagation();\n            onSelectedChange(o);\n          }}\n          disabled={o.disabled}\n        >\n          {o.menuLabel ? (\n            o.menuLabel\n          ) : (\n            <HighlightedText search={inputSearchText}>\n              {o.children}\n            </HighlightedText>\n          )}\n          {Boolean(multiple && checkOptionSelected(o)) &&\n            (checkIcon ?? <CheckIcon className={theme.option.checkIcon} />)}\n        </ListItem>\n      )),\n    [\n      checkIcon,\n      checkOptionSelected,\n      disabled,\n      index,\n      inputSearchText,\n      size,\n      multiple,\n      onSelectedChange,\n      theme.option,\n      theme.size\n    ]\n  );\n\n  return (\n    <motion.div\n      style={style}\n      className={cn(theme.base, className, 'select-menu')}\n      initial={{\n        opacity: 0,\n        y: -20,\n        pointerEvents: 'none'\n      }}\n      animate={{\n        opacity: 1,\n        y: 0,\n        pointerEvents: 'auto',\n        transition: {\n          when: 'beforeChildren'\n        }\n      }}\n      exit={{\n        y: -14,\n        opacity: 0,\n        pointerEvents: 'none',\n        transition: { duration: 0.3, ease: 'anticipate' }\n      }}\n    >\n      <List role=\"listbox\" id={id}>\n        {options?.length === 0 &&\n          createable &&\n          trimmedText &&\n          !loading &&\n          (renderCreateOption ? (\n            renderCreateOption({\n              text: trimmedText,\n              onCreate: onCreateOption\n            })\n          ) : (\n            <ListItem\n              className=\"select-menu-create-option\"\n              onClick={event => {\n                event.preventDefault();\n                event.stopPropagation();\n                onCreateOption();\n              }}\n            >\n              Create option &quot;{trimmedText.toLowerCase()}&quot;\n            </ListItem>\n          ))}\n        {options?.length === 0 &&\n          !createable &&\n          filterable === true &&\n          trimmedText &&\n          !loading && (\n            <ListItem className=\"select-menu-empty-search\">\n              No option(s) for &quot;{trimmedText}&quot;\n            </ListItem>\n          )}\n        {options?.length === 0 &&\n          !createable &&\n          filterable === true &&\n          !trimmedText &&\n          !loading && (\n            <ListItem className=\"select-menu-empty\">\n              No option(s) available\n            </ListItem>\n          )}\n        {groups.hasGroups\n          ? groups.groups.map(g => (\n              <Fragment key={g.name}>\n                {g.name === 'undefined' ? (\n                  renderListItems(g.items, g)\n                ) : (\n                  <ListItem\n                    className={cn(theme.groupItem.base, 'select-menu-group')}\n                  >\n                    <h3\n                      className={cn(\n                        theme.groupItem.title,\n                        theme.groupItem.size[size],\n                        'select-menu-group-header'\n                      )}\n                    >\n                      {g.name}\n                    </h3>\n                    <List>{renderListItems(g.items, g)}</List>\n                  </ListItem>\n                )}\n              </Fragment>\n            ))\n          : renderListItems(options)}\n      </List>\n    </motion.div>\n  );\n};\n","export interface SelectMenuTheme {\n  /** CSS class applied to the root select menu container. */\n  base: string;\n  /** Class names for group items, including title and size variants. */\n  groupItem: {\n    base: string;\n    title: string;\n    size: {\n      small: string;\n      medium: string;\n      large: string;\n      [key: string]: string;\n    };\n  };\n  /** Class names for option items in their various states. */\n  option: {\n    base: string;\n    hover: string;\n    selected: string;\n    active: string;\n    disabled: string;\n    checkIcon: string;\n    content: string;\n  };\n  /** Class names for each size variant of the menu. */\n  size: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n}\n\nconst baseTheme: SelectMenuTheme = {\n  base: 'border border-solid rounded-b-md text-center will-change-[transform,opacity] min-w-[112px] max-h-[300px] overflow-y-auto text-left box-border',\n  groupItem: {\n    base: 'p-0 border-0 first:pt-2 last:pb-2',\n    title: 'font-bold uppercase m-0 px-1.5 py-2.5',\n    size: {\n      small: 'px-2.5 text-sm',\n      medium: 'px-3 text-sm',\n      large: 'px-3.5 text-base'\n    }\n  },\n  option: {\n    base: 'flex-1 whitespace-break-spaces break-words py-1.5 px-2.5',\n    hover: '',\n    selected: '',\n    active: '',\n    disabled: '',\n    checkIcon: 'ml-1',\n    content: 'flex flex-row justify-between'\n  },\n  size: {\n    small: 'px-2.5 py-1.5 text-sm',\n    medium: 'px-4 py-2 text-base',\n    large: 'px-5 py-3 text-lg'\n  }\n};\n\nexport const selectMenuTheme: SelectMenuTheme = {\n  ...baseTheme,\n  base: [\n    baseTheme.base,\n    'bg-panel text-text-primary border-panel-accent border-t-transparent'\n  ].join(' '),\n  groupItem: {\n    ...baseTheme.groupItem,\n    title: [baseTheme.groupItem.title, 'text-text-primary'].join(' ')\n  },\n  option: {\n    ...baseTheme.option,\n    base: [baseTheme.option.base, 'text-text-secondary '].join(' '),\n    hover: [\n      baseTheme.option.hover,\n      'hover:bg-vulcan hover:text-mystic light:hover:bg-vulcan/5 light:hover:text-text-secondary'\n    ].join(' '),\n    active: [baseTheme.option.active, 'bg-vulcan hover:text-mystic'].join(' '),\n    selected: [baseTheme.option.selected, 'text-primary-active'].join(' ')\n  }\n};\n","import { SelectOptionProps } from '@/form/Select/SelectOption';\n\nexport interface GroupOptions {\n  /** The list of computed groups for the provided options. */\n  groups: GroupOption[];\n  /** The total number of items across all groups. */\n  itemsCount: number;\n  /** Whether the options resulted in any groups being created. */\n  hasGroups: boolean;\n}\n\nexport interface GroupOption {\n  /** The starting index of the group within the flattened option list. */\n  offset: number;\n  /** The position index of this group. */\n  index: number;\n  /** The option items belonging to this group. */\n  items: SelectOptionProps[];\n  /** The name of the group. */\n  name: string;\n}\n\nexport function getGroups(options: SelectOptionProps[]): GroupOptions {\n  if (!options?.length) {\n    return {\n      groups: [],\n      itemsCount: 0,\n      hasGroups: false\n    };\n  }\n\n  const groupsMap = options.reduce((acc, option) => {\n    if (!acc[option.group]) {\n      acc[option.group] = [];\n    }\n    acc[option.group].push(option);\n    return acc;\n  }, {});\n\n  const groupNames = Object.keys(groupsMap);\n\n  if (groupNames.length === 1 && groupNames[0] === 'undefined') {\n    return {\n      groups: [],\n      itemsCount: options.length,\n      hasGroups: false\n    };\n  }\n\n  let index = 0;\n  const groups = groupNames.map((key, i) => ({\n    offset: 0,\n    index: i,\n    items: groupsMap[key],\n    name: key\n  }));\n\n  for (const group of groups) {\n    group.offset = index;\n\n    for (const _item of group.items) {\n      index++;\n    }\n  }\n\n  return {\n    groups,\n    itemsCount:\n      groups?.length !== 0\n        ? groups.reduce((acc, g) => acc + g.items.length, 0)\n        : options.length,\n    hasGroups: groups?.length !== 0\n  };\n}\n","import { FC, ReactNode } from 'react';\n\nexport type SelectValue = SelectOptionProps | SelectOptionProps[] | null;\n\nexport interface SelectOptionProps {\n  /**\n   * Value of the option. Usually a string value.\n   */\n  value: any;\n\n  /**\n   * Default label of the option.\n   */\n  children?: ReactNode | string;\n\n  /**\n   * Custom input label.\n   */\n  inputLabel?: ReactNode | string;\n\n  /**\n   * Optional group for the option.\n   */\n  group?: string;\n\n  /**\n   * Optional menu label.\n   */\n  menuLabel?: ReactNode | string;\n\n  /**\n   * Whether the option is selected.\n   */\n  selected?: boolean;\n\n  /**\n   * Whether the option is disabled.\n   */\n  disabled?: boolean;\n}\n\nexport const SelectOption: FC<SelectOptionProps> = ({ children }) =>\n  children as any;\n","import { Children } from 'react';\nimport { SelectOption } from '@/form/Select/SelectOption';\n\nexport function createOptions(children) {\n  const arr = Children.toArray(children);\n  return arr\n    .filter((child: any) => child.type?.name === SelectOption.name)\n    .map((child: any) => child.props);\n}\n","import {\n  RefObject,\n  useCallback,\n  useEffect,\n  useLayoutEffect,\n  useState\n} from 'react';\nimport { ConnectedOverlayContentRef } from '@/utils/Overlay';\n\nexport const useWidth = (\n  ref: RefObject<HTMLDivElement>,\n  overlayRef: RefObject<ConnectedOverlayContentRef>\n) => {\n  const [menuWidth, setMenuWidth] = useState<number>(0);\n\n  const updateWidthInternal = useCallback(() => {\n    if (ref?.current) {\n      const { width } = ref.current.getBoundingClientRect();\n      if (width !== menuWidth) {\n        setMenuWidth(width);\n        return true;\n      }\n    }\n  }, [ref, menuWidth]);\n\n  useEffect(() => {\n    updateWidthInternal();\n  }, [updateWidthInternal]);\n\n  useLayoutEffect(() => {\n    if (!ref?.current) {\n      return;\n    }\n    const resizeObserver = new ResizeObserver(() => {\n      const { width } = ref.current.getBoundingClientRect();\n      setMenuWidth(width);\n    });\n    resizeObserver.observe(ref.current);\n\n    return () => resizeObserver.disconnect();\n  }, [ref]);\n\n  const updateWidth = useCallback(() => {\n    if (updateWidthInternal()) {\n      // trigger event so position is updated\n      overlayRef.current?.updatePosition();\n    }\n  }, [updateWidthInternal, overlayRef]);\n\n  return [menuWidth, updateWidth] as [number, () => void];\n};\n","export const keyNameToCode = {\n  Backspace: 8,\n  Tab: 9,\n  Enter: 13,\n  Shift: 16,\n  Ctrl: 17,\n  Alt: 18,\n  'Pause/Break': 19,\n  'Caps Lock': 20,\n  Esc: 27,\n  Space: 32,\n  'Page Up': 33,\n  'Page Down': 34,\n  End: 35,\n  Home: 36,\n  Left: 37,\n  Up: 38,\n  Right: 39,\n  Down: 40,\n  Insert: 45,\n  Delete: 46,\n  '0': 48,\n  '1': 49,\n  '2': 50,\n  '3': 51,\n  '4': 52,\n  '5': 53,\n  '6': 54,\n  '7': 55,\n  '8': 56,\n  '9': 57,\n  A: 65,\n  B: 66,\n  C: 67,\n  D: 68,\n  E: 69,\n  F: 70,\n  G: 71,\n  H: 72,\n  I: 73,\n  J: 74,\n  K: 75,\n  L: 76,\n  M: 77,\n  N: 78,\n  O: 79,\n  P: 80,\n  Q: 81,\n  R: 82,\n  S: 83,\n  T: 84,\n  U: 85,\n  V: 86,\n  W: 87,\n  X: 88,\n  Y: 89,\n  Z: 90,\n  Windows: 91,\n  'Right Click': 93,\n  'Numpad 0': 96,\n  'Numpad 1': 97,\n  'Numpad 2': 98,\n  'Numpad 3': 99,\n  'Numpad 4': 100,\n  'Numpad 5': 101,\n  'Numpad 6': 102,\n  'Numpad 7': 103,\n  'Numpad 8': 104,\n  'Numpad 9': 105,\n  'Numpad *': 106,\n  'Numpad +': 107,\n  'Numpad -': 109,\n  'Numpad .': 110,\n  'Numpad /': 111,\n  F1: 112,\n  F2: 113,\n  F3: 114,\n  F4: 115,\n  F5: 116,\n  F6: 117,\n  F7: 118,\n  F8: 119,\n  F9: 120,\n  F10: 121,\n  F11: 122,\n  F12: 123,\n  'Num Lock': 144,\n  'Scroll Lock': 145,\n  'My Computer': 182,\n  'My Calculator': 183,\n  ';': 186,\n  '=': 187,\n  ',': 188,\n  '-': 189,\n  '.': 190,\n  '/': 191,\n  '`': 192,\n  '[': 219,\n  '\\\\': 220,\n  ']': 221,\n  '\\'': 222\n};\n","import type { SelectOptionProps } from '@/form/Select/SelectOption';\n\nexport const filterOptionsByKeyword = (\n  options: SelectOptionProps[],\n  keyword: string\n): SelectOptionProps[] => {\n  if (!keyword) return options;\n  const q = keyword.toLowerCase();\n  return options.filter(o => {\n    const childText =\n      typeof o.children === 'string' || typeof o.children === 'number'\n        ? String(o.children)\n        : '';\n    return (\n      childText.toLowerCase().includes(q) ||\n      (o.group ?? '').toLowerCase().includes(q)\n    );\n  });\n};\n","import React, {\n  FC,\n  ReactElement,\n  useCallback,\n  useEffect,\n  useLayoutEffect,\n  useMemo,\n  useRef,\n  useState\n} from 'react';\nimport {\n  ConnectedOverlay,\n  ConnectedOverlayContentRef,\n  Placement\n} from '@/utils';\nimport { CloneElement, useId } from '@/utils';\nimport { SelectInput, SelectInputProps, SelectInputRef } from './SelectInput';\nimport { SelectMenu, SelectMenuProps } from './SelectMenu';\nimport { SelectOptionProps, SelectValue } from './SelectOption';\nimport {\n  createOptions,\n  filterOptionsByKeyword,\n  getGroups,\n  useWidth,\n  keyNameToCode\n} from './utils';\nimport isEqual from 'react-fast-compare';\n\nexport interface SelectProps {\n  /**\n   * The id of the select.\n   */\n  id?: string;\n\n  /**\n   * The form name of the select.\n   */\n  name?: string;\n\n  /**\n   * Additional CSS style attributes to apply to the select.\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * Additional class names to apply to the select.\n   */\n  className?: string;\n\n  /**\n   * Additional class names to apply to the select container.\n   */\n  containerClassName?: string;\n\n  /**\n   * Additional class names to apply to the select when the\n   * menu is open\n   */\n  activeClassName?: string;\n\n  /**\n   * Set the select to disabled state.\n   */\n  disabled?: boolean;\n\n  /**\n   * Auto focus the select on render.\n   */\n  autoFocus?: boolean;\n\n  /**\n   * Close the select after you select an option.\n   * @default true\n   */\n  closeOnSelect?: boolean;\n\n  /**\n   * The value of the select.\n   */\n  value?: string | string[];\n\n  /**\n   * The deafult value of the input filter.\n   */\n  defaultFilterValue?: string;\n\n  /**\n   * Whether the select is required or not.\n   */\n  required?: boolean;\n\n  /**\n   * Whether the select is multi or single select.\n   */\n  multiple?: boolean;\n\n  /**\n   * Default placeholder text.\n   */\n  placeholder?: string;\n\n  /**\n   * Whether you can filter the select options.\n   * @default true\n   */\n  filterable?: boolean | 'async';\n\n  /**\n   * Whether you can clear the select after selection.\n   * @default true\n   */\n  clearable?: boolean;\n\n  /**\n   * Whether you can use the Tab key to select the current active option.\n   */\n  tabToSelect?: boolean;\n\n  /**\n   * Whether the select is in loading state or not.\n   */\n  loading?: boolean;\n\n  /**\n   * Whether you can refresh the async values or not.\n   * @default false\n   */\n  refreshable?: boolean;\n\n  /**\n   * Whether you can create new options or not.\n   */\n  createable?: boolean;\n\n  /**\n   * Select options when paste text inside input.\n   */\n  selectOnPaste?: boolean;\n\n  /**\n   * The list of KeyCodes for creating select values.\n   * The default is ['Enter']\n   * Typical options would be: ['Enter', 'Tab', 'Space', 'Comma']\n   * @default ['Enter']\n   */\n  selectOnKeys?: string[];\n\n  /**\n   * The options of the select.\n   */\n  children?: any;\n\n  /**\n   * Whether the select has an error state or not.\n   */\n  error?: boolean;\n\n  /**\n   * The placement options for the menu.\n   * @default 'bottom-start'\n   */\n  menuPlacement?: Placement;\n\n  /**\n   * Whether the menu is disabled or not.\n   * @default false\n   */\n  menuDisabled?: boolean;\n\n  /**\n   * The size of the select.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Whether to clear the input on blur.\n   * @default true\n   */\n  clearOnBlur?: boolean;\n\n  /**\n   * When the input receives a key down event.\n   */\n  onInputKeydown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\n  /**\n   * When the input receives a key up event.\n   */\n  onInputKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\n  /**\n   * When the select was focused.\n   */\n  onFocus?: (\n    event: React.FocusEvent<HTMLInputElement> | React.MouseEvent<HTMLDivElement>\n  ) => void;\n\n  /**\n   * When the select was blurred.\n   */\n  onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\n  /**\n   * When the select input value changed.\n   */\n  onInputChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n\n  /**\n   * When the user manually refreshed the options.\n   */\n  onRefresh?: () => void;\n\n  /**\n   * When the user clears the select input.\n   */\n  onClear?: () => void;\n\n  /**\n   * When the value changes.\n   */\n  onChange?: (value) => void;\n\n  /**\n   * When a new option is added or removed.\n   */\n  onOptionsChange?: (options: SelectOptionProps[]) => void;\n\n  /**\n   * Content to display before the select input.\n   */\n  start?: React.ReactNode;\n\n  /**\n   * Content to display after the select input (before the action buttons).\n   */\n  end?: React.ReactNode;\n\n  /**\n   * Input override component.\n   * @default <SelectInput />\n   */\n  input?: ReactElement<SelectInputProps, typeof SelectInput>;\n\n  /**\n   * Menu component override.\n   * @default <SelectMenu />\n   */\n  menu?: ReactElement<SelectMenuProps, typeof SelectMenu>;\n\n  /**\n   * When menu is opened\n   */\n  onOpenMenu?: () => void;\n\n  /**\n   * When menu is closed\n   */\n  onCloseMenu?: () => void;\n}\n\nexport const Select: FC<SelectProps> = ({\n  id,\n  name,\n  autoFocus,\n  clearable = true,\n  tabToSelect,\n  filterable = true,\n  menuPlacement = 'bottom-start',\n  closeOnSelect = true,\n  menuDisabled = false,\n  refreshable = false,\n  placeholder,\n  disabled,\n  createable,\n  selectOnPaste,\n  selectOnKeys = ['Enter'],\n  loading,\n  multiple,\n  error,\n  className,\n  containerClassName,\n  activeClassName,\n  children,\n  value,\n  defaultFilterValue,\n  required,\n  clearOnBlur = true,\n  size = 'medium',\n  start,\n  end,\n  input = <SelectInput />,\n  menu = <SelectMenu />,\n  onRefresh,\n  onChange,\n  onClear,\n  onBlur: onInputBlur,\n  onFocus: onInputFocus,\n  onInputKeydown,\n  onInputKeyUp,\n  onOptionsChange,\n  onInputChange,\n  onOpenMenu,\n  onCloseMenu\n}) => {\n  const overlayRef = useRef<ConnectedOverlayContentRef | null>(null);\n  const inputRef = useRef<SelectInputRef | null>(null);\n  const [internalValue, setInternalValue] = useState<string | string[] | null>(\n    value\n  );\n  const [open, setOpen] = useState<boolean>(false);\n  const [index, setIndex] = useState<number>(-1);\n  const internalId = useId(id);\n  const [menuWidth, updateMenuWidth] = useWidth(\n    inputRef.current?.containerRef,\n    overlayRef\n  );\n  const [options, setOptions] = useState<SelectOptionProps[]>(\n    createOptions(children)\n  );\n\n  useEffect(() => {\n    const opts = createOptions(children);\n    if (!isEqual(opts, options)) {\n      setOptions(opts);\n    }\n  }, [children, options]);\n\n  const [keyword, setKeyword] = useState('');\n  const search = setKeyword;\n  const resetSearch = useCallback(() => setKeyword(''), []);\n\n  const filteredResult = useMemo(\n    () => (menuDisabled ? options : filterOptionsByKeyword(options, keyword)),\n    [options, keyword, menuDisabled]\n  );\n\n  const result = filterable === 'async' ? options : filteredResult;\n\n  // If a keyword is used to filter options, automatically\n  // highlight the first option for easy selection\n  useEffect(() => {\n    if (keyword && keyword.length > 0) {\n      if (index === -1 || !result[index]) {\n        setIndex(0);\n      }\n    }\n  }, [keyword, index, setIndex, result]);\n\n  useEffect(() => {\n    // Run only on initial render\n    if (!value && defaultFilterValue) {\n      search(defaultFilterValue);\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  const groups = useMemo(() => getGroups(result), [result]);\n\n  const selectedOption: SelectValue = useMemo(() => {\n    if (multiple) {\n      if (internalValue || internalValue === '') {\n        return options.filter(o =>\n          (internalValue as string[]).includes(o.value)\n        );\n      }\n\n      return [];\n    } else if (internalValue || internalValue === '') {\n      return options.find(o => o.value === internalValue);\n    }\n\n    return null;\n  }, [options, multiple, internalValue]);\n\n  useLayoutEffect(() => {\n    updateMenuWidth();\n    overlayRef?.current?.updatePosition();\n  }, [internalValue, updateMenuWidth]);\n\n  useEffect(() => {\n    // This is needed to allow a select to have a\n    // starting variable that is set from state\n    if (!isEqual(value, internalValue)) {\n      setInternalValue(value);\n    }\n  }, [value, internalValue]);\n\n  useEffect(() => {\n    if (internalValue && createable) {\n      if (multiple) {\n        for (const v of internalValue) {\n          const newOptions = [];\n\n          const has = options.find(o => o.value === v);\n          if (!has) {\n            newOptions.push({\n              children: v,\n              value: v\n            });\n          }\n\n          if (newOptions.length) {\n            const updatedOptions = [...options, ...newOptions];\n\n            onOptionsChange?.(updatedOptions);\n          }\n        }\n      } else {\n        const has = options.find(o => o.value === internalValue);\n        if (!has) {\n          const updatedOptions = [\n            ...options,\n            {\n              children: internalValue,\n              value: internalValue\n            }\n          ];\n\n          onOptionsChange?.(updatedOptions);\n        }\n      }\n    }\n  }, [createable, internalValue, multiple, options, onOptionsChange]);\n\n  const resetInput = useCallback(() => {\n    if (clearOnBlur) {\n      setIndex(-1);\n      resetSearch();\n    }\n  }, [clearOnBlur, resetSearch]);\n\n  const resetSelect = useCallback(() => {\n    setOpen(false);\n    resetInput();\n  }, [resetInput]);\n\n  const onArrowUpKeyUp = useCallback(\n    (event: React.KeyboardEvent<HTMLInputElement>) => {\n      event.preventDefault();\n      setIndex(Math.max(index - 1, -1));\n    },\n    [index]\n  );\n\n  const onArrowDownKeyUp = useCallback(\n    (event: React.KeyboardEvent<HTMLInputElement>) => {\n      event.preventDefault();\n      setIndex(Math.min(index + 1, groups.itemsCount - 1));\n    },\n    [groups.itemsCount, index]\n  );\n\n  const onInputFocused = useCallback(\n    (\n      event:\n        | React.FocusEvent<HTMLInputElement>\n        | React.MouseEvent<HTMLDivElement>\n    ) => {\n      if (!disabled && !menuDisabled) {\n        setOpen(true);\n      }\n\n      onInputFocus?.(event);\n    },\n    [disabled, menuDisabled, onInputFocus]\n  );\n\n  const onInputExpanded = useCallback(\n    (event: React.MouseEvent<Element>) => {\n      event.stopPropagation();\n\n      if (!disabled && !menuDisabled) {\n        setOpen(!open);\n      }\n    },\n    [disabled, menuDisabled, open]\n  );\n\n  const onInputChanged = useCallback(\n    (event: React.ChangeEvent<HTMLInputElement>) => {\n      const value = event.target.value;\n      search(value);\n      onInputChange?.(event);\n    },\n    [onInputChange, search]\n  );\n\n  const toggleSelectedMultiOption = useCallback(\n    (selections: SelectOptionProps | SelectOptionProps[]) => {\n      const newOptions: SelectOptionProps[] = [];\n      let newSelectedOptions = selectedOption as SelectOptionProps[];\n\n      if (!selections) {\n        newSelectedOptions = [];\n      } else {\n        if (!Array.isArray(selections)) {\n          selections = [selections];\n        }\n\n        for (const next of selections) {\n          const hasOption = options.find(o => o.value === next.value);\n          const has = (internalValue || []).includes(next.value);\n          if (has) {\n            newSelectedOptions = newSelectedOptions.filter(\n              o => o.value !== next.value\n            );\n          } else {\n            newSelectedOptions = [...newSelectedOptions, next];\n          }\n\n          if (!hasOption && createable) {\n            newOptions.push(next);\n          }\n        }\n      }\n\n      return {\n        newValue: newSelectedOptions.map(o => o.value),\n        newSelectedOptions,\n        newOptions\n      };\n    },\n    [createable, internalValue, options, selectedOption]\n  );\n\n  const toggleSelectedOption = useCallback(\n    (option: SelectValue) => {\n      let newValue: string | string[] | null;\n\n      if (multiple) {\n        const result = toggleSelectedMultiOption(option);\n        newValue = result.newValue;\n        if (result.newOptions?.length) {\n          onOptionsChange?.([...options, ...result.newOptions]);\n        }\n\n        if (closeOnSelect) {\n          setOpen(false);\n        }\n      } else {\n        const singleOption = option as SelectOptionProps;\n        const hasOption = options.find(o => o.value === singleOption?.value);\n        newValue = singleOption?.value;\n        const hasValue = newValue !== undefined && newValue !== null;\n\n        if (createable && !hasOption && hasValue) {\n          onOptionsChange?.([...options, singleOption]);\n        }\n\n        if (closeOnSelect && hasOption) {\n          setOpen(false);\n        }\n      }\n\n      setInternalValue(newValue);\n\n      // keep current index if allowing multiple selections\n      // unless a search keyword was used to select\n      if (!multiple || keyword) {\n        resetInput();\n      }\n      onChange?.(newValue);\n    },\n    [\n      keyword,\n      closeOnSelect,\n      createable,\n      multiple,\n      onChange,\n      onOptionsChange,\n      options,\n      resetInput,\n      toggleSelectedMultiOption\n    ]\n  );\n\n  const onAddSelection = useCallback(\n    (event: React.KeyboardEvent<HTMLInputElement>) => {\n      const inputElement = event.target as HTMLInputElement;\n      let inputValue = inputElement.value.trim();\n      // Remove the last character if it is a valuesSplitterKeyCode\n      inputValue =\n        inputValue.charAt(inputValue.length - 1) === event.key\n          ? inputValue.slice(0, -1)\n          : inputValue;\n\n      if (index === -1 && createable && !inputValue) {\n        return;\n      }\n\n      if (index > -1 || createable) {\n        let newSelection;\n\n        const hasSelection = index > -1 && result[index];\n        if (createable && !hasSelection) {\n          newSelection = {\n            value: inputValue,\n            children: inputValue\n          };\n        } else {\n          newSelection = result[index];\n        }\n        // Add new item if menu not disabled or item not presents in the list otherwise just clear input\n        if (\n          newSelection &&\n          (!menuDisabled || !value?.includes(newSelection.value))\n        ) {\n          toggleSelectedOption(newSelection);\n        } else if (menuDisabled && value?.includes(newSelection.value)) {\n          resetInput();\n        }\n      }\n    },\n    [\n      createable,\n      index,\n      menuDisabled,\n      resetInput,\n      result,\n      toggleSelectedOption,\n      value\n    ]\n  );\n\n  const onTabKeyDown = useCallback(\n    (event: React.KeyboardEvent<HTMLInputElement>) => {\n      const inputElement = event.target as HTMLInputElement;\n      const inputValue = inputElement.value.trim();\n\n      if (event.shiftKey) {\n        setOpen(false);\n        return;\n      }\n\n      if (index > -1 || (createable && inputValue)) {\n        onAddSelection(event);\n      }\n\n      if (multiple) {\n        event.preventDefault();\n      } else {\n        setOpen(false);\n      }\n    },\n    [index, onAddSelection, setOpen, multiple, createable]\n  );\n\n  const onInputKeyedUp = useCallback(\n    (event: React.KeyboardEvent<HTMLInputElement>) => {\n      const key = event.code;\n\n      if (key === 'ArrowUp') {\n        onArrowUpKeyUp(event);\n      } else if (key === 'ArrowDown') {\n        onArrowDownKeyUp(event);\n      } else if (key === 'Escape') {\n        resetSelect();\n      } else if (selectOnKeys?.includes(key)) {\n        onAddSelection(event);\n      }\n\n      onInputKeyUp?.(event);\n    },\n    [\n      selectOnKeys,\n      onInputKeyUp,\n      onArrowUpKeyUp,\n      onArrowDownKeyUp,\n      resetSelect,\n      onAddSelection\n    ]\n  );\n\n  const onInputKeyedDown = useCallback(\n    (event: React.KeyboardEvent<HTMLInputElement>) => {\n      const key = event.key;\n      if (key === 'Tab') {\n        if (tabToSelect) {\n          onTabKeyDown(event);\n        } else {\n          setOpen(false);\n        }\n      }\n\n      onInputKeydown?.(event);\n    },\n    [onInputKeydown, onTabKeyDown, tabToSelect]\n  );\n\n  const onInputBlured = useCallback(\n    (event: React.FocusEvent<HTMLInputElement>) => {\n      const inputElement = event.target as HTMLInputElement;\n      const inputValue = inputElement.value.trim();\n      if (menuDisabled && createable && inputValue) {\n        const newSelection = {\n          value: inputValue,\n          children: inputValue\n        };\n\n        toggleSelectedOption(newSelection);\n      }\n\n      onInputBlur?.(event);\n    },\n    [createable, menuDisabled, onInputBlur, toggleSelectedOption]\n  );\n\n  const onPasteHandler = useCallback(\n    (e: React.ClipboardEvent<HTMLInputElement>) => {\n      if (selectOnPaste) {\n        const inputElement = e.target as HTMLInputElement;\n        const inputValue = inputElement.value;\n        const clipboardValue = e.clipboardData.getData('Text');\n        const value = `${inputValue}${clipboardValue}`.trim();\n\n        if (multiple) {\n          const separators = selectOnKeys?.map(key =>\n            String.fromCharCode(keyNameToCode[key])\n          );\n          const expression = `[${separators}]`;\n          const regex = new RegExp(expression, 'g');\n          const items = value\n            .split(regex)\n            .filter(item => !internalValue?.includes(item));\n          const result = toggleSelectedMultiOption(\n            items.map(item => ({ value: item, children: item }))\n          );\n          const optionsToSelect = createable\n            ? result.newOptions\n            : result.newSelectedOptions;\n          if (result.newOptions?.length) {\n            onOptionsChange?.([...options, ...optionsToSelect]);\n          }\n          setInternalValue(result.newValue);\n          onChange?.(result.newValue);\n        } else {\n          toggleSelectedOption({ value: value, children: value });\n          setInternalValue(value);\n          onChange?.(value);\n        }\n\n        resetInput();\n        e.preventDefault();\n      }\n    },\n    [\n      createable,\n      selectOnPaste,\n      multiple,\n      onChange,\n      onOptionsChange,\n      options,\n      resetInput,\n      selectOnKeys,\n      toggleSelectedMultiOption,\n      toggleSelectedOption\n    ]\n  );\n\n  const onClearHandler = useCallback(() => {\n    resetSearch();\n    onClear?.();\n  }, [onClear, resetSearch]);\n\n  const onMenuSelectedChange = useCallback(\n    (option: SelectValue) => {\n      toggleSelectedOption(option);\n\n      if (closeOnSelect) {\n        setOpen(false);\n      } else {\n        inputRef.current?.focus();\n      }\n    },\n    [closeOnSelect, toggleSelectedOption]\n  );\n\n  const onOverlayClose = useCallback(() => {\n    const inputValue = keyword.trim();\n    if (createable && inputValue) {\n      const newSelection = {\n        value: inputValue,\n        children: inputValue\n      };\n\n      toggleSelectedOption(newSelection);\n    }\n\n    resetSelect();\n    onCloseMenu?.();\n  }, [createable, keyword, onCloseMenu, resetSelect, toggleSelectedOption]);\n\n  return (\n    <ConnectedOverlay\n      open={open}\n      closeOnBodyClick={true}\n      closeOnEscape={true}\n      appendToBody={true}\n      placement={menuPlacement}\n      reference={inputRef?.current?.containerRef}\n      ref={overlayRef}\n      onClose={onOverlayClose}\n      onOpen={onOpenMenu}\n      triggerClassName={containerClassName}\n      content={() => (\n        <CloneElement<SelectMenuProps>\n          element={menu}\n          id={`${internalId}-menu`}\n          style={{ width: menuWidth }}\n          selectedOption={selectedOption}\n          createable={createable}\n          disabled={disabled}\n          options={result}\n          groups={groups}\n          index={index}\n          multiple={multiple}\n          inputSearchText={keyword}\n          loading={loading}\n          filterable={filterable}\n          size={size}\n          onSelectedChange={onMenuSelectedChange}\n        />\n      )}\n    >\n      <CloneElement<SelectInputProps>\n        element={input}\n        id={`${internalId}-input`}\n        name={name}\n        disabled={disabled}\n        reference={inputRef}\n        menuOpen={open}\n        autoFocus={autoFocus}\n        options={options}\n        error={error}\n        closeOnSelect={closeOnSelect}\n        inputText={keyword}\n        start={start}\n        end={end}\n        multiple={multiple}\n        createable={createable}\n        filterable={filterable}\n        refreshable={refreshable}\n        className={className}\n        activeClassName={activeClassName}\n        required={required}\n        loading={loading}\n        placeholder={placeholder}\n        selectedOption={selectedOption}\n        clearable={clearable}\n        menuDisabled={menuDisabled}\n        size={size}\n        onSelectedChange={toggleSelectedOption}\n        onExpandClick={onInputExpanded}\n        onKeyDown={onInputKeyedDown}\n        onKeyUp={onInputKeyedUp}\n        onInputChange={onInputChanged}\n        onBlur={onInputBlured}\n        onFocus={onInputFocused}\n        onRefresh={onRefresh}\n        onPaste={onPasteHandler}\n        onClear={onClearHandler}\n      />\n    </ConnectedOverlay>\n  );\n};\n","import { selectInputTheme, SelectInputTheme } from './SelectInput';\nimport { selectMenuTheme, SelectMenuTheme } from './SelectMenu';\n\nexport interface SelectTheme {\n  /** Theme applied to the select input element. */\n  selectInput: SelectInputTheme;\n  /** Theme applied to the select dropdown menu. */\n  selectMenu: SelectMenuTheme;\n}\n\nexport const selectTheme: SelectTheme = {\n  selectInput: selectInputTheme,\n  selectMenu: selectMenuTheme\n};\n","import React, {\n  forwardRef,\n  RefObject,\n  useImperativeHandle,\n  useLayoutEffect,\n  useRef\n} from 'react';\nimport TextareaAutosize, {\n  TextareaAutosizeProps\n} from 'react-textarea-autosize';\nimport { TextareaTheme } from './TextareaTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface TextareaProps extends TextareaAutosizeProps {\n  /**\n   * Additional classname for the input container element.\n   */\n  containerClassName?: string;\n\n  /**\n   * Mark field as errored\n   */\n  error?: boolean;\n\n  /**\n   * If true, the field will take up the full width of its container.\n   */\n  fullWidth?: boolean;\n\n  /**\n   * Size of the field.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * Theme for the Textarea.\n   */\n  theme?: TextareaTheme;\n}\n\nexport interface TextAreaRef {\n  /**\n   * Reference to the input element.\n   */\n  inputRef?: RefObject<HTMLTextAreaElement>;\n\n  /**\n   * Reference to the container element.\n   */\n  containerRef?: RefObject<HTMLDivElement>;\n\n  /**\n   * Method to blur the input element.\n   */\n  blur?: () => void;\n\n  /**\n   * Method to focus the input element.\n   */\n  focus?: () => void;\n}\n\nexport const Textarea = forwardRef<TextAreaRef, TextareaProps>(\n  (\n    {\n      fullWidth,\n      size = 'medium',\n      containerClassName,\n      className,\n      error,\n      autoFocus,\n      theme: customTheme,\n      ...rest\n    },\n    inputRef\n  ) => {\n    const containerRef = useRef<HTMLDivElement | null>(null);\n    const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n\n    useImperativeHandle(inputRef, () => ({\n      textareaRef,\n      containerRef,\n      blur: () => textareaRef.current?.blur(),\n      focus: () => textareaRef.current?.focus()\n    }));\n\n    useLayoutEffect(() => {\n      if (autoFocus) {\n        // Small timeout for page loading\n        requestAnimationFrame(() => textareaRef.current?.focus());\n      }\n    }, [autoFocus]);\n\n    const theme: TextareaTheme = useComponentTheme('textarea', customTheme);\n\n    return (\n      <div\n        className={cn(\n          theme.base,\n          fullWidth && theme.fullWidth,\n          error && theme.error,\n          containerClassName\n        )}\n        ref={containerRef}\n      >\n        <TextareaAutosize\n          ref={textareaRef}\n          aria-invalid={error || undefined}\n          className={cn(\n            theme.input,\n            fullWidth && theme.fullWidth,\n            rest.disabled && theme.disabled,\n            theme.sizes[size],\n            className\n          )}\n          autoFocus={autoFocus}\n          {...rest}\n        />\n      </div>\n    );\n  }\n);\n","import { inputTheme } from '@/form/Input/InputTheme';\n\nexport interface TextareaTheme {\n  /** CSS class applied to the root textarea wrapper. */\n  base: string;\n  /** CSS class applied to the inner textarea element. */\n  input: string;\n  /** CSS class applied when the textarea should fill its container width. */\n  fullWidth: string;\n  /** CSS class applied when the textarea is in an error state. */\n  error: string;\n  /** CSS class applied when the textarea is disabled. */\n  disabled: string;\n  /** Class names for each size variant of the textarea. */\n  sizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n}\n\nconst baseTheme: Partial<TextareaTheme> = {\n  input: 'resize-none read-only:cursor-not-allowed'\n};\n\nexport const textareaTheme: TextareaTheme = {\n  ...baseTheme,\n  base: [\n    baseTheme.base,\n    inputTheme.base,\n    'disabled-within:hover:after:content-none'\n  ].join(' '),\n  input: [baseTheme.input, inputTheme.input].join(' '),\n  disabled: [baseTheme.disabled, inputTheme.disabled].join(' '),\n  fullWidth: inputTheme.fullWidth,\n  error: inputTheme.error,\n  sizes: inputTheme.sizes\n} as TextareaTheme;\n","import React, { FC, forwardRef, LegacyRef } from 'react';\nimport { motion, MotionNodeAnimationOptions } from 'motion/react';\nimport { ToggleTheme } from './ToggleTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface ToggleProps {\n  /**\n   * Whether the toggle is checked or not.\n   */\n  checked: boolean;\n\n  /**\n   * Whether the toggle is disabled or not.\n   */\n  disabled?: boolean;\n\n  /**\n   * Whether to animate the toggle.\n   * @default true\n   */\n  animated?: boolean;\n\n  /**\n   * Animation configuration for the toggle.\n   */\n  animation?: MotionNodeAnimationOptions;\n\n  /**\n   * Additional class names to apply to the toggle.\n   */\n  className?: string;\n\n  /**\n   * The size of the toggle.\n   * @default 'medium'\n   */\n  size?: 'small' | 'medium' | 'large' | string;\n\n  /**\n   * When the toggle is changed.\n   */\n  onChange?: (value: boolean) => void;\n\n  /**\n   * When the toggle was blurred.\n   */\n  onBlur?: (event: React.FocusEvent<HTMLDivElement>) => void;\n\n  /**\n   * Theme for the Toggle.\n   */\n  theme?: ToggleTheme;\n}\n\nexport interface ToggleRef {\n  /**\n   * Reference to the toggle element.\n   */\n  ref?: LegacyRef<HTMLDivElement>;\n}\n\nexport const Toggle: FC<ToggleProps & ToggleRef> = forwardRef<\n  HTMLDivElement,\n  ToggleProps\n>(\n  (\n    {\n      checked,\n      disabled,\n      onChange,\n      onBlur,\n      className,\n      size = 'medium',\n      animated = true,\n      animation,\n      theme: customTheme,\n      ...rest\n    },\n    ref\n  ) => {\n    const theme: ToggleTheme = useComponentTheme('toggle', customTheme);\n\n    return (\n      <div\n        {...rest}\n        ref={ref}\n        tabIndex={disabled ? -1 : 0}\n        role=\"switch\"\n        aria-checked={checked}\n        aria-disabled={disabled || undefined}\n        className={cn(\n          theme.base,\n          theme.sizes[size],\n          {\n            [theme.checked]: checked,\n            [theme.disabled]: disabled,\n            [theme.disabledAndChecked]: disabled && checked\n          },\n          className\n        )}\n        onClick={() => {\n          if (!disabled && onChange) {\n            onChange(!checked);\n          }\n        }}\n        onBlur={onBlur}\n        onKeyDown={event => {\n          if (!disabled && onChange && event.code === 'Space') {\n            onChange(!checked);\n          }\n        }}\n      >\n        <motion.div\n          className={cn(theme.handle.base, theme.handle.sizes[size], {\n            [theme.handle.disabled]: disabled,\n            [theme.handle.disabledAndChecked]: disabled && checked\n          })}\n          layout\n          {...(animation\n            ? animation\n            : {\n                transition: {\n                  type: 'spring',\n                  stiffness: 700,\n                  damping: 30,\n                  duration: animated ? 0.3 : 0\n                }\n              })}\n        />\n      </div>\n    );\n  }\n);\n","export interface ToggleTheme {\n  /** CSS class applied to the root toggle container. */\n  base: string;\n  /** CSS class applied when the toggle is disabled. */\n  disabled: string;\n  /** CSS class applied when the toggle is checked. */\n  checked: string;\n  /** CSS class applied when the toggle is both disabled and checked. */\n  disabledAndChecked: string;\n  /** Class names for the toggle handle, including size and state variants. */\n  handle: {\n    base: string;\n    sizes: {\n      small: string;\n      medium: string;\n      large: string;\n      [key: string]: string;\n    };\n    disabled: string;\n    disabledAndChecked: string;\n  };\n  /** Class names for each size variant of the toggle. */\n  sizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n}\n\nconst baseTheme: ToggleTheme = {\n  base: 'flex items-center justify-start cursor-pointer bg-surface box-border border border-panel-accent rounded-full hover:bg-primary-hover transition-[background-color] ease-in-out duration-300',\n  disabled: 'cursor-not-allowed bg-transparent hover:bg-transparent',\n  checked: 'justify-end bg-primary',\n  disabledAndChecked:\n    'bg-secondary-inactive hover:bg-secondary-inactive light:bg-gray-400 light:hover:bg-gray-400',\n  handle: {\n    base: 'rounded-full bg-panel',\n    sizes: {\n      small: 'w-3 h-full',\n      medium: 'w-5 h-full',\n      large: 'w-6 h-full'\n    },\n    disabled: 'bg-secondary-inactive light:bg-gray-400',\n    disabledAndChecked: 'bg-black light:bg-white'\n  },\n  sizes: {\n    small: 'w-8 h-4 p-px',\n    medium: 'w-12 h-6 p-px',\n    large: 'w-16 h-7 p-px'\n  }\n};\n\nexport const toggleTheme = baseTheme;\n","import React, { FC, forwardRef, Ref } from 'react';\nimport { Button, ButtonProps, ButtonRef } from '@/elements/Button';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface IconButtonProps extends Omit<\n  ButtonProps,\n  'fullWidth' | 'start' | 'end'\n> {}\n\nexport const IconButton: FC<IconButtonProps & ButtonRef> = forwardRef(\n  (\n    {\n      children,\n      className,\n      size = 'medium',\n      theme: customTheme,\n      ...rest\n    }: IconButtonProps,\n    ref: Ref<HTMLButtonElement>\n  ) => {\n    const theme = useComponentTheme('button', customTheme);\n\n    return (\n      <Button\n        className={cn(theme.iconSizes[size], className)}\n        size={size}\n        {...rest}\n        ref={ref}\n      >\n        {children}\n      </Button>\n    );\n  }\n);\n","import React, { FC, forwardRef, LegacyRef, useMemo } from 'react';\nimport FocusTrap from 'focus-trap-react';\nimport { MiddlewareState, size } from '@floating-ui/react';\nimport { ConnectedOverlay, OverlayEvent } from '@/utils/Overlay';\nimport { Modifiers, Placement } from '@/utils/Position';\nimport { useId } from '@/utils';\nimport { motion, MotionNodeAnimationOptions } from 'motion/react';\nimport { MenuTheme } from './MenuTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface MenuProps {\n  /**\n   * Whether to append the menu to the body or not.\n   * @default true\n   */\n  appendToBody?: boolean;\n\n  /**\n   * Autofocus the menu on open or not.\n   * @default true\n   */\n  autofocus?: boolean;\n\n  /**\n   * The menu contents.\n   */\n  children: any | (() => any);\n\n  /**\n   * CSS class applied to menu element.\n   */\n  className?: string;\n\n  /**\n   * Close the menu on click or not.\n   * @default true\n   */\n  closeOnBodyClick?: boolean;\n\n  /**\n   * Close the menu on escape.\n   * @default true\n   */\n  closeOnEscape?: boolean;\n\n  /**\n   * floating-ui placement type.\n   * @default 'bottom-start'\n   */\n  placement?: Placement;\n\n  /**\n   * Reference element for the menu position.\n   */\n  reference?: any;\n\n  /**\n   * CSS Properties for the menu.\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * Whether to show the menu or not.\n   * @default false\n   */\n  open?: boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * Whether to animate the menu.\n   * @default true\n   */\n  animated?: boolean;\n\n  /**\n   * Animation configuration for the collapse.\n   */\n  animation?: MotionNodeAnimationOptions;\n\n  /**\n   * Max height of the menu.\n   * @default 'max-height: calc(100vh - 48px)'\n   */\n  maxHeight?: string;\n\n  /**\n   * floating-ui Position modifiers.\n   */\n  modifiers?: Modifiers;\n\n  /**\n   * Whether the menu should be the same width as the reference element\n   */\n  autoWidth?: boolean;\n\n  /**\n   * Min width of the menu.\n   */\n  minWidth?: number;\n\n  /**\n   * Max width of the menu.\n   */\n  maxWidth?: number;\n\n  /**\n   * Menu was closed.\n   */\n  onClose?: (event: OverlayEvent) => void;\n\n  /**\n   * Mouse enter event.\n   */\n  onMouseEnter?: (event) => void;\n\n  /**\n   * Mouse leave event.\n   */\n  onMouseLeave?: (event) => void;\n\n  /**\n   * Theme for the Menu.\n   */\n  theme?: MenuTheme;\n}\n\nexport interface MenuRef {\n  /**\n   * Reference to the menu element.\n   */\n  ref?: LegacyRef<HTMLDivElement>;\n}\n\nexport const Menu: FC<MenuProps & MenuRef> = forwardRef<\n  HTMLDivElement,\n  MenuProps\n>(\n  (\n    {\n      reference,\n      children,\n      style,\n      className,\n      placement = 'bottom-start',\n      closeOnEscape = true,\n      open = false,\n      appendToBody = true,\n      closeOnBodyClick = true,\n      maxHeight = 'max-height: calc(100vh - 48px)',\n      autofocus = true,\n      animated = true,\n      animation,\n      modifiers,\n      autoWidth,\n      minWidth,\n      maxWidth,\n      onClose,\n      onMouseEnter,\n      onMouseLeave,\n      theme: customTheme\n    },\n    ref\n  ) => {\n    const id = useId();\n\n    const internalModifiers = useMemo(() => {\n      if (autoWidth) {\n        const sameWidth = {\n          name: 'sameWidth',\n          fn: (state: MiddlewareState) => {\n            const { width } = state.rects.reference;\n            let menuWidth = width;\n\n            if (maxWidth && menuWidth > maxWidth) {\n              menuWidth = maxWidth;\n            } else if (minWidth && menuWidth < minWidth) {\n              menuWidth = minWidth;\n            }\n\n            return { data: { menuWidth } };\n          }\n        };\n\n        const sizeModifier = size({\n          apply({ middlewareData, elements }) {\n            elements.floating.style.width = `${middlewareData?.sameWidth?.menuWidth ?? 0}px`;\n          }\n        });\n\n        return modifiers\n          ? [...(modifiers ?? []), sameWidth, sizeModifier]\n          : [sameWidth, sizeModifier];\n      } else {\n        // Reset width to auto when autoWidth is false\n        const autoWidth = size({\n          apply({ elements }) {\n            elements.floating.style.width = 'auto';\n          }\n        });\n\n        return [...(modifiers ?? []), autoWidth];\n      }\n    }, [modifiers, autoWidth, minWidth, maxWidth]);\n\n    const theme: MenuTheme = useComponentTheme('menu', customTheme);\n\n    return (\n      <ConnectedOverlay\n        open={open}\n        closeOnBodyClick={closeOnBodyClick}\n        appendToBody={appendToBody}\n        reference={reference}\n        placement={placement}\n        modifiers={internalModifiers}\n        closeOnEscape={closeOnEscape}\n        content={() => (\n          <motion.div\n            ref={ref}\n            {...(animation\n              ? animation\n              : {\n                  transition: { duration: animated ? 0.3 : 0 },\n                  initial: { opacity: 0, y: -10 },\n                  animate: { opacity: 1, y: 0 },\n                  exit: { opacity: 0, y: -10 }\n                })}\n            className={cn(theme.base, className)}\n            style={style}\n            onMouseEnter={onMouseEnter}\n            onMouseLeave={onMouseLeave}\n          >\n            {autofocus ? (\n              <FocusTrap\n                focusTrapOptions={{\n                  escapeDeactivates: true,\n                  clickOutsideDeactivates: true,\n                  fallbackFocus: `#${id}`\n                }}\n              >\n                <div\n                  id={id}\n                  className={theme.inner}\n                  tabIndex={-1}\n                  style={{ maxHeight }}\n                >\n                  {typeof children === 'function' ? children() : children}\n                </div>\n              </FocusTrap>\n            ) : (\n              <div className={theme.inner} style={{ maxHeight }}>\n                {typeof children === 'function' ? children() : children}\n              </div>\n            )}\n          </motion.div>\n        )}\n        onClose={onClose}\n      />\n    );\n  }\n);\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { Menu, MenuProps } from './Menu';\n\ntype MenuOptions =\n  | {\n      open?: boolean;\n      onClose?: () => void;\n    }\n  | undefined;\n\nexport const useMenu = (prop?: MenuOptions) => {\n  const { open, onClose } = prop || {};\n  const [internalOpen, setInternalOpen] = useState<boolean>(open);\n  const ref = useRef<any | null>(null);\n\n  useEffect(() => {\n    setInternalOpen(open);\n  }, [open]);\n\n  const onCloseInternal = useCallback(() => {\n    setInternalOpen(false);\n    onClose?.();\n  }, [onClose]);\n\n  const onToggleOpen = useCallback(() => {\n    setInternalOpen(!internalOpen);\n  }, [internalOpen]);\n\n  const Component = useCallback(\n    (props: MenuProps) => (\n      <Menu\n        {...props}\n        open={internalOpen}\n        reference={ref}\n        onClose={onCloseInternal}\n      />\n    ),\n    [internalOpen, onCloseInternal]\n  );\n\n  return {\n    isOpen: internalOpen,\n    setOpen: setInternalOpen,\n    toggleOpen: onToggleOpen,\n    Menu: Component,\n    ref\n  };\n};\n","import React, {\n  forwardRef,\n  Fragment,\n  useCallback,\n  useImperativeHandle,\n  useRef,\n  useState\n} from 'react';\nimport { OverlayEvent } from '@/utils/Overlay';\nimport { Placement } from '@/utils/Position';\nimport { Menu } from './Menu';\nimport classNames from 'classnames';\nimport { MotionNodeAnimationOptions } from 'motion';\n\nexport interface NestedMenuRef {\n  /**\n   * Close the menu.\n   */\n  close: () => void;\n}\n\nexport interface NestedMenuProps {\n  /**\n   * Menu contents.\n   */\n  children: any;\n\n  /**\n   * Label element for the menu item.\n   */\n  label: any;\n\n  /**\n   * floating-ui placement type.\n   * @default 'right-start'\n   */\n  placement?: Placement;\n\n  /**\n   * CSS class applied to label element.\n   */\n  className?: string;\n\n  /**\n   * CSS Properties for the label element.\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * CSS class applied to label element.\n   */\n  menuClassName?: string;\n\n  /**\n   * CSS class applied to label element when active.\n   */\n  activeClassName?: string;\n\n  /**\n   * CSS Properties for the label element.\n   */\n  menuStyle?: React.CSSProperties;\n\n  /**\n   * Delay before showing tooltip.\n   * @default 0\n   */\n  enterDelay?: number;\n\n  /**\n   * Delay before closing tooltip.\n   * @default 100\n   */\n  leaveDelay?: number;\n\n  /**\n   * Close the menu on click or not.\n   * @default true\n   */\n  closeOnBodyClick?: boolean;\n\n  /**\n   * Close the menu on escape.\n   * @default true\n   */\n  closeOnEscape?: boolean;\n\n  /**\n   * Max height of the menu.\n   */\n  maxHeight?: string;\n\n  /**\n   * Autofocus the menu on open or not.\n   * @default true\n   */\n  autofocus?: boolean;\n\n  /**\n   * Animation configuration for the menu.\n   */\n  animation?: MotionNodeAnimationOptions;\n\n  /**\n   * Nested Menu was closed.\n   */\n  onClose?: (event: OverlayEvent) => void;\n}\n\nexport const NestedMenu = forwardRef<NestedMenuRef, NestedMenuProps>(\n  (\n    {\n      label,\n      children,\n      style,\n      placement = 'right-start',\n      menuClassName,\n      menuStyle,\n      enterDelay = 0,\n      autofocus = true,\n      leaveDelay = 100,\n      className,\n      maxHeight,\n      activeClassName,\n      closeOnBodyClick = true,\n      closeOnEscape = true,\n      animation,\n      onClose\n    },\n    ref\n  ) => {\n    const [active, setActive] = useState<boolean>(false);\n    const itemRef = useRef<HTMLDivElement | null>(null);\n    const menuRef = useRef<HTMLDivElement | null>(null);\n    const menuEntered = useRef<boolean>(false);\n    const enterTimeoutRef = useRef<any | null>(null);\n    const leaveTimeoutRef = useRef<any | null>(null);\n\n    const onMouseEnterItem = useCallback(() => {\n      clearTimeout(enterTimeoutRef.current);\n      clearTimeout(leaveTimeoutRef.current);\n      enterTimeoutRef.current = setTimeout(() => setActive(true), enterDelay);\n    }, [enterDelay]);\n\n    const onClickItem = useCallback(() => {\n      clearTimeout(enterTimeoutRef.current);\n      clearTimeout(leaveTimeoutRef.current);\n      setActive(!active);\n    }, [active]);\n\n    const onMouseLeaveItem = useCallback(() => {\n      leaveTimeoutRef.current = setTimeout(() => {\n        if (!menuEntered.current) {\n          setActive(false);\n        }\n      }, leaveDelay);\n    }, [leaveDelay]);\n\n    const onMouseEnterMenu = useCallback(event => {\n      clearTimeout(enterTimeoutRef.current);\n      clearTimeout(leaveTimeoutRef.current);\n      menuEntered.current = true;\n    }, []);\n\n    const onMouseLeaveMenu = useCallback(\n      event => {\n        clearTimeout(enterTimeoutRef.current);\n        clearTimeout(leaveTimeoutRef.current);\n        menuEntered.current = false;\n\n        leaveTimeoutRef.current = setTimeout(() => {\n          if (!itemRef.current?.contains(event.target)) {\n            setActive(false);\n          }\n        }, leaveDelay);\n      },\n      [leaveDelay]\n    );\n\n    const onNestedMenuClose = useCallback(\n      event => {\n        setActive(false);\n        onClose?.(event);\n      },\n      [onClose]\n    );\n\n    /**\n     * Expose the close ability to the outside\n     */\n    useImperativeHandle(ref, () => ({\n      close: () => {\n        setActive(false);\n      }\n    }));\n\n    return (\n      <Fragment>\n        <div\n          className={classNames(className, { [activeClassName]: active })}\n          style={style}\n          ref={itemRef}\n          onClick={onClickItem}\n          onMouseEnter={onMouseEnterItem}\n          onMouseLeave={onMouseLeaveItem}\n        >\n          {label}\n        </div>\n        <Menu\n          className={menuClassName}\n          autofocus={autofocus}\n          style={menuStyle}\n          reference={itemRef}\n          closeOnBodyClick={closeOnBodyClick}\n          closeOnEscape={closeOnEscape}\n          open={active}\n          placement={placement}\n          maxHeight={maxHeight}\n          animation={animation}\n          ref={menuRef}\n          onMouseEnter={onMouseEnterMenu}\n          onMouseLeave={onMouseLeaveMenu}\n          onClose={onNestedMenuClose}\n        >\n          {children}\n        </Menu>\n      </Fragment>\n    );\n  }\n);\n","export interface MenuTheme {\n  /** CSS class applied to the root menu container. */\n  base: string;\n  /** CSS class applied to the inner menu wrapper. */\n  inner: string;\n}\n\nconst baseTheme: MenuTheme = {\n  base: 'relative min-w-[112px] max-w-[500px] p-px',\n  inner: 'focus:outline-hidden'\n};\n\nexport const menuTheme: MenuTheme = {\n  ...baseTheme,\n  inner: [baseTheme.inner, 'text-text-primary bg-panel'].join(' ')\n};\n","import * as React from \"react\";\nconst SvgCalendar = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"calendar\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M12.6667 2.66671H12V1.33337H10.6667V2.66671H5.33333V1.33337H4V2.66671H3.33333C2.59333 2.66671 2.00667 3.26671 2.00667 4.00004L2 13.3334C2 14.0667 2.59333 14.6667 3.33333 14.6667H12.6667C13.4 14.6667 14 14.0667 14 13.3334V4.00004C14 3.26671 13.4 2.66671 12.6667 2.66671ZM12.6667 13.3334H3.33333V6.66671H12.6667V13.3334ZM12.6667 5.33337H3.33333V4.00004H12.6667V5.33337ZM6 9.33337H4.66667V8.00004H6V9.33337ZM8.66667 9.33337H7.33333V8.00004H8.66667V9.33337ZM11.3333 9.33337H10V8.00004H11.3333V9.33337ZM6 12H4.66667V10.6667H6V12ZM8.66667 12H7.33333V10.6667H8.66667V12ZM11.3333 12H10V10.6667H11.3333V12Z\", fill: \"currentColor\" })));\nexport default SvgCalendar;\n","import React, {\n  ChangeEvent,\n  FocusEvent,\n  FC,\n  ReactElement,\n  useCallback,\n  useEffect,\n  useRef,\n  useState\n} from 'react';\nimport { format as formatDate, isValid, parse } from 'date-fns';\n\nimport { IconButton } from '@/elements/IconButton';\nimport { Menu } from '@/layers/Menu';\nimport { Card } from '@/layout/Card';\nimport { Placement } from '@/utils/Position';\nimport { Calendar, PresetOption } from '@/form/Calendar';\nimport { Input, InputProps, InputRef } from '@/form/Input';\n\nimport CalendarIcon from '@/assets/icons/calendar.svg?react';\nimport { List, ListItem } from '@/layout';\nimport { cn, useComponentTheme } from '@/utils';\nimport { isPresetActive } from '@/form/Calendar/utils';\nimport { DateInputTheme } from './DateInputTheme';\n\nexport type DateInputProps = Omit<InputProps, 'value' | 'onChange'> & {\n  /**\n   * The format in which the date should be displayed.\n   * @type {string}\n   * @default 'MM/dd/yyyy'\n   */\n  format?: string;\n\n  /**\n   * Calendar placement type.\n   * @default 'bottom-start'\n   */\n  placement?: Placement;\n\n  /**\n   * Open calendar on field focus\n   * @default true\n   */\n  openOnFocus?: boolean;\n\n  /**\n   * Preset to show in quick filter.\n   * @default []\n   */\n  preset?: PresetOption[];\n\n  /**\n   * Custom theme for the date input.\n   */\n  theme?: DateInputTheme;\n\n  /**\n   * Name of the option to open the calendar.\n   */\n  openCalendarOptionName?: string;\n\n  /**\n   * Icon to show in open calendar button.\n   * @default <CalendarIcon />\n   */\n  icon?: ReactElement;\n} & (\n    | {\n        isRange?: true;\n        value: [Date, Date];\n        onChange: (value: [Date, Date]) => void;\n      }\n    | {\n        isRange?: false;\n        value: Date;\n        onChange: (value: Date) => void;\n      }\n  );\nexport const DateInput: FC<DateInputProps> = ({\n  disabled,\n  value,\n  format = 'MM/dd/yyyy',\n  placement = 'bottom-start',\n  isRange,\n  icon = <CalendarIcon />,\n  openOnFocus = true,\n  preset = [],\n  theme: customTheme,\n  openCalendarOptionName,\n  onChange,\n  onFocus,\n  ...rest\n}) => {\n  const [open, setOpen] = useState<boolean>(false);\n  const [isCalendarView, setCalendarView] = useState<boolean>(!preset.length);\n  const ref = useRef<InputRef>(null);\n  const [inputValue, setInputValue] = useState<string>('');\n  const theme = useComponentTheme('dateInput', customTheme);\n\n  const changeHandler = useCallback(\n    (value: Date | [Date, Date]) => {\n      if (isRange) {\n        onChange(value as [Date, Date]);\n\n        if (value[0] && value[1]) {\n          setOpen(false);\n        }\n      } else {\n        setOpen(false);\n        // @ts-expect-error because isRange optional\n        onChange(value);\n      }\n    },\n    [isRange, onChange]\n  );\n\n  const inputChangeHandler = useCallback(\n    (event: ChangeEvent<HTMLInputElement>) => {\n      const dateStr = event.target.value;\n\n      setInputValue(dateStr);\n\n      if (isRange) {\n        const [startStr, endStr] = dateStr.split('-');\n        const startDate = parse(startStr, format, new Date());\n        const endDate = parse(endStr, format, new Date());\n\n        if (\n          isValid(startDate) &&\n          isValid(endDate) &&\n          formatDate(startDate, format) === startStr &&\n          formatDate(endDate, format) === endStr\n        ) {\n          onChange?.([startDate, endDate]);\n        }\n      } else {\n        const date = parse(dateStr, format, new Date());\n\n        if (isValid(date) && formatDate(date, format) === dateStr) {\n          // @ts-expect-error because isRange optional\n          onChange?.(date);\n        }\n      }\n    },\n    [format, isRange, onChange]\n  );\n\n  const focusHandler = useCallback(\n    (e: FocusEvent<HTMLInputElement>) => {\n      if (openOnFocus) {\n        setOpen(true);\n      }\n      onFocus?.(e);\n    },\n    [onFocus, openOnFocus]\n  );\n\n  const closeHandler = useCallback(() => {\n    setOpen(false);\n    setCalendarView(!preset.length);\n  }, [preset.length]);\n\n  useEffect(() => {\n    if (value) {\n      if (isRange) {\n        const [start, end] = value;\n        setInputValue(\n          `${start ? formatDate(start, format) : ''}-${end ? formatDate(end, format) : ''}`\n        );\n      } else if (!isRange) {\n        setInputValue(formatDate(value as Date, format));\n      }\n    }\n  }, [format, isRange, value]);\n\n  return (\n    <>\n      <Input\n        ref={ref}\n        disabled={disabled}\n        theme={theme.input}\n        end={\n          <IconButton\n            className=\"px-0\"\n            variant=\"text\"\n            aria-label=\"Open calendar\"\n            onClick={() => setOpen(true)}\n          >\n            {icon}\n          </IconButton>\n        }\n        placeholder={\n          isRange\n            ? `${format.toUpperCase()} - ${format.toUpperCase()}`\n            : format.toUpperCase()\n        }\n        {...rest}\n        value={inputValue}\n        onChange={inputChangeHandler}\n        onFocus={focusHandler}\n      />\n      <Menu\n        open={open}\n        onClose={closeHandler}\n        reference={ref?.current?.containerRef}\n        placement={placement}\n        autoWidth={!isCalendarView}\n      >\n        {() =>\n          isCalendarView ? (\n            <Card>\n              <Calendar\n                disabled={disabled}\n                value={value}\n                isRange={isRange}\n                showDayOfWeek\n                onChange={changeHandler}\n                theme={theme.calendar}\n              />\n            </Card>\n          ) : (\n            <List className={theme.preset.list}>\n              {preset.map(preset => {\n                const presetValue =\n                  typeof preset.value === 'function'\n                    ? preset.value()\n                    : preset.value;\n                const active = isPresetActive(presetValue, value);\n\n                return (\n                  <ListItem\n                    key={preset.label}\n                    active={active}\n                    className={cn(theme.preset.option.base, {\n                      [theme.preset.option.active]: active\n                    })}\n                    onClick={() => changeHandler(presetValue)}\n                  >\n                    {preset.label}\n                  </ListItem>\n                );\n              })}\n              <ListItem\n                className={theme.preset.option.base}\n                onClick={() => setCalendarView(true)}\n              >\n                {openCalendarOptionName ??\n                  (isRange ? 'Custom Dates' : 'Custom Date')}\n              </ListItem>\n            </List>\n          )\n        }\n      </Menu>\n    </>\n  );\n};\n","import { calendarTheme, CalendarTheme } from '@/form/Calendar';\nimport { inputTheme, InputTheme } from '@/form/Input';\n\nexport interface DateInputTheme {\n  /** Theme applied to the underlying input element. */\n  input: InputTheme;\n  /** Theme applied to the calendar popover. */\n  calendar: CalendarTheme;\n  /** Class names for the preset list and its options. */\n  preset: {\n    list: string;\n    option: {\n      base: string;\n      active: string;\n    };\n  };\n}\n\nexport const dateInputTheme: DateInputTheme = {\n  input: inputTheme,\n  calendar: calendarTheme,\n  preset: {\n    list: 'w-full border border-panel-accent',\n    option: {\n      base: 'hover:bg-vulcan hover:text-mystic light:hover:bg-vulcan/5 light:hover:text-text-secondary',\n      active: 'bg-vulcan hover:text-mystic'\n    }\n  }\n};\n","import React, { FC, forwardRef, ReactElement } from 'react';\nimport { Button } from '@/elements/Button';\nimport { Chip, ChipProps, ChipRef } from './Chip';\nimport { CloseIcon } from '@/form';\nimport { ChipTheme } from './ChipTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface DeletableChipProps extends Omit<ChipProps, 'end'> {\n  /**\n   * Customize delete icon.\n   * @default <CloseIcon height={12} width={12} />\n   */\n  deleteIcon?: ReactElement;\n\n  /**\n   * Callback if the chip is deletable.\n   */\n  onDelete?: () => void;\n\n  /**\n   * Theme for the Deletable Chip.\n   */\n  theme?: ChipTheme;\n}\n\nexport const DeletableChip: FC<DeletableChipProps & ChipRef> = forwardRef(\n  (\n    {\n      children,\n      disabled,\n      deleteIcon = <CloseIcon height={12} width={12} />,\n      onDelete,\n      size = 'medium',\n      color = 'default',\n      theme: customTheme,\n      variant = 'filled',\n      ...rest\n    },\n    ref\n  ) => {\n    const theme: ChipTheme = useComponentTheme('chip', customTheme);\n\n    return (\n      <Chip\n        ref={ref}\n        size={size}\n        disabled={disabled}\n        color={color}\n        end={\n          <Button\n            tabIndex={0}\n            variant=\"text\"\n            size={size}\n            className={cn(theme.deleteButton.base, theme.deleteButton[size])}\n            onClick={event => {\n              if (!disabled) {\n                event.stopPropagation();\n                onDelete?.();\n              }\n            }}\n            disabled={disabled}\n            disableMargins\n            disablePadding\n          >\n            {deleteIcon}\n          </Button>\n        }\n        variant={variant}\n        theme={theme}\n        {...rest}\n      >\n        {children}\n      </Chip>\n    );\n  }\n);\n","interface ThemeColor {\n  base?: string;\n  variants?: {\n    filled?: string;\n    outline?: string;\n    [key: string]: string;\n  };\n  selectable?: {\n    base?: string;\n    variants?: {\n      filled?: {\n        base?: string;\n        selected?: string;\n      };\n      outline?: {\n        base?: string;\n        selected?: string;\n      };\n      [key: string]: {\n        base?: string;\n        selected?: string;\n      };\n    };\n  };\n}\n\nexport interface ChipTheme {\n  /** CSS class applied to the root chip element. */\n  base: string;\n  /** CSS class applied to the chip's label text. */\n  label: string;\n  /** Class names for the chip's start and end adornment slots. */\n  adornment: {\n    base: string;\n    start: string;\n    end: string;\n    sizes: {\n      small: string;\n      medium: string;\n      large: string;\n      [key: string]: string;\n    };\n  };\n  /** Class names for each visual chip variant. */\n  variants: {\n    filled: string;\n    outline: string;\n    [key: string]: string;\n  };\n  /** Class names for each chip color, including selectable states. */\n  colors: {\n    default?: ThemeColor;\n    primary?: ThemeColor;\n    secondary?: ThemeColor;\n    success?: ThemeColor;\n    warning?: ThemeColor;\n    error?: ThemeColor;\n    info?: ThemeColor;\n    [key: string]: ThemeColor;\n  };\n  /** Class names for each chip size. */\n  sizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n  /** CSS class applied to the chip when focused. */\n  focus: string;\n  /** Class names for the chip's delete button at each size. */\n  deleteButton: {\n    base: string;\n    sizes: {\n      small: string;\n      medium: string;\n      large: string;\n      [key: string]: string;\n    };\n  };\n  /** CSS class applied when the chip is disabled. */\n  disabled: string;\n}\n\nconst baseTheme: Partial<ChipTheme> = {\n  base: `\n  inline-flex whitespace-no-wrap select-none items-center justify-center px-2.5 py-0.5\n  rounded-xs leading-none text-white transition-colors\n  duration-300 ease [&>svg]:transition-[fill] [&>svg]:will-change-[fill] font-medium\n  `,\n  label: 'flex items-center',\n  colors: {\n    default: {\n      selectable: {\n        base: 'hover:cursor-pointer'\n      }\n    },\n    primary: {\n      selectable: {\n        base: 'hover:cursor-pointer'\n      }\n    },\n    secondary: {\n      selectable: {\n        base: 'hover:cursor-pointer'\n      }\n    },\n    success: {\n      selectable: {\n        base: 'hover:cursor-pointer'\n      }\n    },\n    warning: {\n      selectable: {\n        base: 'hover:cursor-pointer'\n      }\n    },\n    error: {\n      selectable: {\n        base: 'hover:cursor-pointer'\n      }\n    },\n    info: {\n      selectable: {\n        base: 'hover:cursor-pointer'\n      }\n    }\n  },\n  adornment: {\n    base: 'flex items-center justify-center',\n    start: 'mr-1',\n    end: 'ml-1',\n    sizes: {\n      small: '[&>svg]:w-3 [&>svg]:h-3',\n      medium: '[&>svg]:w-4 [&>svg]:h-4',\n      large: '[&>svg]:w-5 [&>svg]:h-5'\n    }\n  },\n  sizes: {\n    small: 'text-[10px] leading-[inherit] px-1 py-0.5',\n    medium: 'text-sm leading-[inherit] px-2 py-0.5',\n    large: 'text-base leading-[inherit] px-3 py-0.5'\n  },\n  focus:\n    'focus-visible:outline-dashed focus-visible:outline-1 focus-visible:outline-offset-2',\n  deleteButton: {\n    base: 'text-inherit',\n    sizes: {\n      small: 'leading-[10px] max-h-2.5',\n      medium: 'leading-3 max-h-3',\n      large: 'leading-[14px] max-h-3.5'\n    }\n  },\n  disabled: 'opacity-50 cursor-not-allowed'\n};\n\nexport const chipTheme: ChipTheme = {\n  base: baseTheme.base,\n  label: baseTheme.label,\n  adornment: baseTheme.adornment,\n  sizes: baseTheme.sizes,\n  focus: baseTheme.focus,\n  variants: {\n    filled: 'border border-transparent box-border',\n    outline: 'bg-transparent border hover:bg-transparent'\n  },\n  colors: {\n    default: {\n      variants: {\n        filled: 'bg-panel border-panel text-text-primary',\n        outline: 'text-text-primary dark:border-gray-100 light:border-gray-900'\n      },\n      selectable: {\n        base: `${baseTheme.colors.default.selectable.base}`,\n        variants: {\n          filled: {\n            base: 'hover:bg-primary-hover hover:border-primary-hover hover:text-panel',\n            selected: 'bg-primary text-panel'\n          },\n          outline: {\n            base: 'hover:text-primary-hover hover:border-panel-accent',\n            selected: 'border-panel-accent text-primary'\n          }\n        }\n      }\n    },\n    primary: {\n      variants: {\n        outline: 'text-primary border-panel-accent',\n        filled: 'bg-primary border-primary text-panel'\n      },\n      selectable: {\n        base: `${baseTheme.colors.primary.selectable.base}`,\n        variants: {\n          filled: {\n            base: 'hover:bg-primary-hover hover:border-primary-hover hover:text-panel',\n            selected: 'bg-primary-hover'\n          },\n          outline: {\n            base: 'hover:text-primary-hover hover:border-primary',\n            selected: 'border-primary'\n          }\n        }\n      }\n    },\n    secondary: {\n      variants: {\n        filled: 'bg-secondary border-secondary text-text-primary',\n        outline: 'text-secondary border-panel-accent'\n      },\n      selectable: {\n        base: `${baseTheme.colors.secondary.selectable.base}`,\n        variants: {\n          filled: {\n            base: 'hover:bg-secondary-hover hover:border-secondary-hover hover:text-panel',\n            selected: 'bg-secondary-hover text-panel'\n          },\n          outline: {\n            base: 'hover:text-secondary-hover hover:border-secondary',\n            selected: 'border-secondary'\n          }\n        }\n      }\n    },\n    success: {\n      variants: {\n        filled: 'bg-success border-success text-panel',\n        outline: 'text-success border-panel-accent'\n      },\n      selectable: {\n        base: `${baseTheme.colors.success.selectable.base}`,\n        variants: {\n          filled: {\n            base: 'hover:bg-success-hover hover:border-success-hover',\n            selected: 'bg-success-hover'\n          },\n          outline: {\n            base: 'hover:text-success-hover hover:border-success',\n            selected: 'border-success'\n          }\n        }\n      }\n    },\n    warning: {\n      variants: {\n        filled: 'bg-warning border-warning text-panel',\n        outline: 'text-warning border-panel-accent'\n      },\n      selectable: {\n        base: `${baseTheme.colors.warning.selectable.base}`,\n        variants: {\n          filled: {\n            base: 'hover:bg-warning-hover hover:border-warning-hover hover:text-panel',\n            selected: 'bg-warning-hover'\n          },\n          outline: {\n            base: 'hover:text-warning-hover hover:border-warning',\n            selected: 'border-warning'\n          }\n        }\n      }\n    },\n    error: {\n      variants: {\n        filled: 'bg-error border-error text-panel',\n        outline: 'text-error border-panel-accent'\n      },\n      selectable: {\n        base: `${baseTheme.colors.error.selectable.base}`,\n        variants: {\n          filled: {\n            base: 'hover:bg-error-hover hover:border-error-hover hover:text-panel',\n            selected: 'bg-error-hover'\n          },\n          outline: {\n            base: 'hover:text-error-hover hover:border-error',\n            selected: 'border-error'\n          }\n        }\n      }\n    },\n    info: {\n      variants: {\n        filled: 'bg-info border-info text-panel',\n        outline: 'text-info border-panel-accent'\n      },\n      selectable: {\n        base: `${baseTheme.colors.info.selectable.base}`,\n        variants: {\n          filled: {\n            base: 'hover:bg-info-hover hover:border-info-hover hover:text-panel',\n            selected: 'bg-info-hover'\n          },\n          outline: {\n            base: 'hover:text-info-hover hover:border-info',\n            selected: 'border-info'\n          }\n        }\n      }\n    }\n  },\n  deleteButton: baseTheme.deleteButton,\n  disabled: baseTheme.disabled\n};\n","export interface DotsLoaderTheme {\n  /** CSS class applied to the root loader container. */\n  base: string;\n  /** CSS class applied to each individual dot. */\n  dot: string;\n  /** Class names for each loader size. */\n  sizes: {\n    small: string;\n    medium: string;\n    large: string;\n    [key: string]: string;\n  };\n}\n\nconst baseTheme: DotsLoaderTheme = {\n  base: 'flex',\n  dot: 'rounded-[50%]',\n  sizes: {\n    small: 'w-1 h-1 m-1',\n    medium: 'w-1.5 h-1.5 m-1.5',\n    large: 'w-2 h-2 m-2'\n  }\n};\n\nexport const dotsLoaderTheme: DotsLoaderTheme = {\n  ...baseTheme,\n  dot: [baseTheme.dot, 'light:bg-gray-900 dark:bg-gray-100'].join(' ')\n};\n","import React, { FC, LegacyRef, forwardRef, useMemo } from 'react';\nimport getInitials from 'name-initials';\nimport { cn, useComponentTheme, generateColor } from '@/utils';\nimport { AvatarTheme } from './AvatarTheme';\n\nexport interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {\n  /**\n   * The name of the person.\n   */\n  name?: string;\n\n  /**\n   * The URL of the avatar image.\n   */\n  src?: string;\n\n  /**\n   * The size of the avatar.\n   * @default 24\n   */\n  size?: number;\n\n  /**\n   * Style variant for the avatar.\n   * @default 'filled'\n   */\n  variant?: 'filled' | 'outline';\n\n  /**\n   * Whether the avatar is rounded.\n   * @default true\n   */\n  rounded?: boolean;\n\n  /**\n   * Color override for the avatar.\n   */\n  color?: string;\n\n  /**\n   * Custom color options for the color generator.\n   */\n  colorOptions?: {\n    saturation: number;\n    lightness: number;\n    alpha: number;\n  };\n\n  /**\n   * Theme for the Avatar.\n   */\n  theme?: AvatarTheme;\n}\n\nexport interface AvatarRef {\n  /**\n   * Reference to the root div element.\n   */\n  ref?: LegacyRef<HTMLDivElement>;\n}\n\nexport const Avatar: FC<AvatarProps> & AvatarRef = forwardRef<\n  HTMLDivElement,\n  AvatarProps\n>(\n  (\n    {\n      name,\n      src,\n      color,\n      size = 24,\n      variant = 'filled',\n      rounded = true,\n      className,\n      colorOptions,\n      theme: customTheme,\n      ...rest\n    },\n    ref\n  ) => {\n    const fontSize = size * 0.4;\n\n    const initials = useMemo(() => getInitials(name || ''), [name]);\n\n    const backgroundColor = useMemo(() => {\n      if (src) {\n        return 'transparent';\n      }\n\n      if (color) {\n        return color;\n      }\n\n      return generateColor(name || '', colorOptions);\n    }, [color, name, src, colorOptions]);\n\n    const theme: AvatarTheme = useComponentTheme('avatar', customTheme);\n\n    return (\n      <div\n        {...rest}\n        className={cn(theme.base, rounded && theme.rounded, className)}\n        style={{\n          width: `${size}px`,\n          height: `${size}px`,\n          fontSize: `${fontSize}px`,\n          backgroundImage: src ? `url(${src})` : 'none',\n          backgroundColor,\n          ...(variant === 'outline' && {\n            backgroundColor: 'transparent',\n            border: `solid 1px ${backgroundColor}`,\n            color: backgroundColor\n          })\n        }}\n        ref={ref}\n      >\n        {!src && name && <span>{initials}</span>}\n      </div>\n    );\n  }\n);\n","export interface AvatarTheme {\n  /** CSS class applied to the root avatar element. */\n  base: string;\n  /** CSS class applied when the avatar is rounded. */\n  rounded: string;\n}\n\nconst baseTheme: AvatarTheme = {\n  base: 'flex justify-center items-center bg-cover bg-center font-bold',\n  rounded: 'rounded-[50%]'\n};\n\nexport const avatarTheme: AvatarTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'text-white'].join(' ')\n};\n","import pluralizeLib from 'pluralize';\n\nexport interface PluralizeInputs {\n  /**\n   * Count of items.\n   */\n  count: number;\n\n  /**\n   * Singular form of the word.\n   */\n  singular: string;\n\n  /**\n   * Plural form of the word. Not required.\n   */\n  plural?: string;\n\n  /**\n   * Zero state of the word. Not required.\n   */\n  zero?: string;\n\n  /**\n   * Show count in addition to word.\n   * @default true\n   */\n  showCount?: boolean;\n}\n\nexport const pluralize = ({\n  count,\n  zero,\n  singular,\n  plural,\n  showCount\n}: PluralizeInputs) => {\n  if (count === 0 && zero) {\n    return zero;\n  }\n\n  let returnedString = singular;\n  if (count !== 1) {\n    returnedString = plural || pluralizeLib(singular, count);\n  }\n\n  return showCount\n    ? `${count.toLocaleString()} ${returnedString}`\n    : returnedString;\n};\n","import React, { FC, useMemo } from 'react';\nimport { pluralize, PluralizeInputs } from './utils';\n\nexport interface PluralizeProps extends PluralizeInputs {\n  /**\n   * CSS classname for the span element.\n   */\n  className?: string;\n}\n\nexport const Pluralize: FC<PluralizeProps> = ({\n  count = 0,\n  singular,\n  className,\n  showCount = true,\n  plural,\n  zero\n}) => {\n  const text = useMemo(\n    () => pluralize({ count, singular, showCount, plural, zero }),\n    [count, singular, showCount, plural, zero]\n  );\n\n  return <span className={className}>{text}</span>;\n};\n","import humanFormat from 'human-format';\n\nexport type FormatSizeTypes = number | string | null | undefined;\n\n/**\n * Given a size, format it to a human readable string.\n *\n * @param size the size to format\n * @param emptyValue what to show when empty\n * @param scale the scale to format on\n * @param decimals number of decimal places\n * @returns formatted string\n */\nexport function formatSize(\n  size: FormatSizeTypes,\n  emptyValue = 'N/A',\n  scale = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'],\n  decimals = 2\n) {\n  let newSize = size;\n  var binaryScale = humanFormat.Scale.create(scale, 1024);\n\n  if (typeof size === 'string') {\n    newSize = parseFloat(size as string);\n  } else if (size === null || size === undefined) {\n    return [emptyValue];\n  }\n\n  return humanFormat(newSize as number, {\n    scale: binaryScale,\n    decimals\n  });\n}\n","import React, { FC } from 'react';\nimport { formatSize, FormatSizeTypes } from './utils';\n\nexport interface DataSizeProps {\n  /**\n   * The size value to render.\n   */\n  value: FormatSizeTypes;\n\n  /**\n   * If the value is undefined/null it will return this value.\n   */\n  emptyValue?: string;\n\n  /**\n   * Customize scale for displaying units.\n   */\n  scale?: string[];\n\n  /**\n   * The number of decimals to be set.\n   */\n  decimals?: number;\n}\n\nexport const DataSize: FC<DataSizeProps> = ({\n  value,\n  emptyValue,\n  scale,\n  decimals\n}) => <>{formatSize(value, emptyValue, scale, decimals)}</>;\n","/**\n * Masks a value by keeping the first and last characters and replacing the\n * middle with a repeated character.\n *\n * Behavior:\n * - Falsy values (undefined/null/'') return ''.\n * - Values with a length of 2 or less are returned unchanged.\n * - When `compactLength` is greater than 0, the middle is replaced with\n *   `character` repeated `compactLength` times, regardless of the value's\n *   length — long values stay compact and don't reveal their true length.\n * - When `compactLength` is 0, the middle is masked at the value's true length\n *   (length - 2 characters).\n */\nexport function maskValue(\n  value: string | undefined,\n  compactLength: number,\n  character: string\n): string {\n  if (!value) {\n    return '';\n  }\n\n  const str = String(value);\n\n  if (str.length <= 2) {\n    return str;\n  }\n\n  const middleLength = compactLength > 0 ? compactLength : str.length - 2;\n\n  return str[0] + character.repeat(middleLength) + str[str.length - 1];\n}\n","import React, { FC, useMemo, useState } from 'react';\nimport { RedactTheme } from './RedactTheme';\nimport { maskValue } from './utils';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface RedactProps {\n  /**\n   * Classname of the element.\n   */\n  className?: string;\n\n  /**\n   * Whether you can toggle the text or not.\n   * @default true\n   */\n  allowToggle?: boolean;\n\n  /**\n   * Number of mask characters shown between the first and last characters,\n   * regardless of the value's length (e.g. `compactLength: 8` renders\n   * `m********d`). When 0, the middle is masked at its true length.\n   * @default 8\n   */\n  compactLength?: number;\n\n  /**\n   * The character to replace the text with.\n   * @default '*'\n   */\n  character?: string;\n\n  /**\n   * Text to show upon hover.\n   * @default 'Click to toggle sensitive content'\n   */\n  tooltipText?: string;\n\n  /**\n   * Value to conceal.\n   */\n  value?: string;\n\n  /**\n   * The theme for the Redact.\n   */\n  theme?: RedactTheme;\n}\n\nexport const Redact: FC<RedactProps> = ({\n  allowToggle = true,\n  compactLength = 8,\n  tooltipText = 'Click to toggle sensitive content',\n  className,\n  character = '*',\n  value,\n  theme: customTheme\n}) => {\n  const [visible, setVisible] = useState<boolean>(false);\n  const masked = useMemo(\n    () => maskValue(value, compactLength, character),\n    [value, character, compactLength]\n  );\n\n  const theme: RedactTheme = useComponentTheme('redact', customTheme);\n\n  return (\n    <span\n      title={allowToggle ? tooltipText : undefined}\n      role=\"button\"\n      className={cn(theme.base, allowToggle && theme.interactive, className)}\n      onClick={() => allowToggle && setVisible(!visible)}\n    >\n      {visible ? value : masked}\n    </span>\n  );\n};\n","export interface RedactTheme {\n  /** CSS class applied to the root element. */\n  base: string;\n  /** CSS class applied when the redacted value is interactive (clickable to reveal). */\n  interactive: string;\n}\n\nconst baseTheme: RedactTheme = {\n  base: 'cursor-text',\n  interactive: 'cursor-pointer hover:underline'\n};\n\nexport const redactTheme: RedactTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'text-text-primary'].join(' ')\n};\n","import humanFormat from 'human-format';\nimport pluralize from 'pluralize';\n\nexport type DurationFormatTypes = number | string | null | undefined;\n\nconst timeScale = new humanFormat.Scale({\n  ms: 1,\n  s: 1 * 1000,\n  min: 60 * 1000,\n  hr: 3600 * 1000,\n  day: 86400 * 1000,\n  month: 2592000 * 1000\n});\n\nexport function formatDuration(\n  time: DurationFormatTypes,\n  emptyValue = 'N/A',\n  zeroValue = '0 ms'\n) {\n  let newTime = time;\n\n  // Try and tease out the different formats users might pass\n  if (typeof time === 'string') {\n    newTime = parseFloat(time as string);\n  } else if (time === null || time === undefined) {\n    return [emptyValue];\n  }\n\n  // Let's get the format and tease out the different values\n  const humanized = humanFormat(newTime as number, { scale: timeScale });\n  const [valueStr, unitStr] = humanized.split(' ');\n\n  const value = parseFloat(valueStr);\n  if (value === 0) {\n    return zeroValue;\n  } else if (value === 1) {\n    return humanized;\n  }\n\n  if (\n    unitStr === null ||\n    unitStr === undefined ||\n    value === null ||\n    value === undefined\n  ) {\n    return [emptyValue];\n  }\n\n  return `${value} ${pluralize(unitStr, value)}`;\n}\n","import React, { FC } from 'react';\nimport { formatDuration, DurationFormatTypes } from './utils';\n\nexport interface DurationProps {\n  /**\n   * Size to pass to the formatter.\n   */\n  value: DurationFormatTypes;\n\n  /**\n   * If the value is undefined/null it will return this value.\n   * @default 'N/A'\n   */\n  emptyValue?: string;\n\n  /**\n   * If the value is 0 it will return this value. Default to '0 ms'\n   * @default '0 ms'\n   */\n  zeroValue?: string;\n}\n\nexport const Duration: FC<DurationProps> = ({\n  value,\n  emptyValue = 'N/A',\n  zeroValue = '0 ms'\n}) => <>{formatDuration(value, emptyValue, zeroValue)}</>;\n","import { differenceInSeconds, formatDistance } from 'date-fns';\n\nexport function getDifference(date: Date) {\n  return differenceInSeconds(new Date(), date);\n}\n\nexport interface FormatRelativeOptions {\n  /** Whether to append a suffix (e.g. \"ago\", \"in\") to the relative time string. */\n  addSuffix?: boolean;\n  /** Whether to include seconds in the relative time string. */\n  includeSeconds?: boolean;\n}\n\nexport function formatRelative(date: Date, options?: FormatRelativeOptions) {\n  // Reference: https://gist.github.com/johndavedecano/0630b27d2c0a9d717ae6fe918edcf534\n  const diff = getDifference(date);\n\n  if (diff < 30) {\n    return 'now';\n  } else {\n    return formatDistance(date, new Date(), options);\n  }\n}\n\nexport function getInterval(date: Date) {\n  const diff = getDifference(date);\n\n  if (diff < 3600) {\n    return 60000;\n  } else if (diff >= 3600 && diff <= 86400) {\n    return 3600000;\n  } else {\n    return 0;\n  }\n}\n","import { isValid, format as dateFnsFormat } from 'date-fns';\nimport { formatRelative } from './relative';\n\nexport interface SafeFormatOptions {\n  /** The date-fns format string used to format the absolute date. */\n  format: string;\n  /** Whether to include seconds when computing the relative time string. */\n  includeSeconds?: boolean;\n  /** Whether to append a suffix (e.g. \"ago\", \"in\") to the relative time string. */\n  addSuffix?: boolean;\n}\n\nexport function safeFormat(\n  date: Date | string | number | null | undefined,\n  options: SafeFormatOptions\n) {\n  let relative;\n  let formatted;\n  let dateObj;\n\n  if (date) {\n    dateObj = new Date(date);\n\n    // If we have a valid date, now lets do magic\n    if (isValid(dateObj)) {\n      const { format, includeSeconds, addSuffix } = options;\n      formatted = dateFnsFormat(dateObj, format);\n      relative = formatRelative(dateObj, { includeSeconds, addSuffix });\n    }\n  }\n\n  return {\n    dateObj,\n    formatted,\n    relative\n  };\n}\n","import React, {\n  FC,\n  useState,\n  useCallback,\n  useEffect,\n  useRef,\n  useMemo\n} from 'react';\nimport { formatRelative, getInterval } from './relative';\nimport { safeFormat } from './formatting';\nimport { DateFormatTheme } from './DateFormatTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface DateFormatProps {\n  /**\n   * Allow the user to toggle between relative and absolute time.\n   * @default false\n   */\n  allowToggle?: boolean;\n\n  /**\n   * The cache key to use for storing the user's preference.\n   */\n  cacheKey?: string;\n\n  /**\n   * The date to format.\n   */\n  date?: Date | null | number | string;\n\n  /**\n   * The format to use.\n   * @default 'MM/dd/yy hh:mm:ss a'\n   */\n  format?: string;\n\n  /**\n   * Whether to use relative time.\n   */\n  fromNow?: boolean;\n\n  /**\n   * Whether to add a suffix to the relative time.\n   * @default true\n   */\n  addSuffix?: boolean;\n\n  /**\n   * Additional CSS class names to use.\n   */\n  className?: string;\n\n  /**\n   * Whether to include seconds in the relative time.\n   * @default false\n   */\n  includeSeconds?: boolean;\n\n  /**\n   * The message to display when the date is empty. Default is \"N/A\".\n   * @default 'N/A'\n   */\n  emptyMessage?: string;\n\n  /**\n   * Theme for the DateFormat.\n   */\n  theme?: DateFormatTheme;\n}\n\nexport const DateFormat: FC<DateFormatProps> = ({\n  allowToggle = false,\n  cacheKey,\n  className,\n  format = 'MM/dd/yy hh:mm:ss a',\n  emptyMessage = 'N/A',\n  includeSeconds = false,\n  addSuffix = true,\n  fromNow,\n  date,\n  theme: customTheme\n}) => {\n  const [cache, setCache] = useState<string | null>(\n    typeof window !== 'undefined'\n      ? (window.localStorage.getItem(`DATES_${cacheKey}`) ?? null)\n      : null\n  );\n\n  useEffect(() => {\n    if (cacheKey && typeof window !== 'undefined') {\n      window.localStorage.setItem(`DATES_${cacheKey}`, cache);\n    }\n  }, [cache, cacheKey]);\n\n  let should = fromNow;\n  if (cacheKey && cache) {\n    should = cache === 'true';\n  }\n\n  const [isRelative, setIsRelative] = useState<boolean>(should);\n  const timeout = useRef<any | null>(null);\n  const { dateObj, formatted, relative } = useMemo(\n    () => safeFormat(date, { format, includeSeconds, addSuffix }),\n    [addSuffix, date, format, includeSeconds]\n  );\n  const [curRelative, setCurRelative] = useState<string>(relative);\n\n  const onToggle = useCallback(\n    event => {\n      if (allowToggle) {\n        event.preventDefault();\n        event.stopPropagation();\n\n        const next = !isRelative;\n        setIsRelative(next);\n\n        if (cacheKey) {\n          setCache(`${next}`);\n        }\n      }\n    },\n    [allowToggle, cacheKey, isRelative, setCache]\n  );\n\n  const updateTime = useCallback(() => {\n    if (isRelative) {\n      clearTimeout(timeout.current);\n\n      const interval = getInterval(dateObj);\n      if (interval > 0) {\n        timeout.current = setTimeout(() => {\n          setCurRelative(\n            formatRelative(dateObj, { includeSeconds, addSuffix })\n          );\n\n          updateTime();\n        }, interval);\n      }\n    }\n  }, [isRelative, dateObj, includeSeconds, addSuffix]);\n\n  useEffect(() => {\n    updateTime();\n\n    const cur = timeout.current;\n    return () => clearTimeout(cur);\n  });\n\n  const theme = useComponentTheme<DateFormatTheme>('dateFormat', customTheme);\n\n  if (!date) {\n    return <>{emptyMessage}</>;\n  }\n\n  return (\n    <time\n      title={allowToggle ? 'Toggle relative / absolute time' : undefined}\n      role=\"button\"\n      className={cn(theme.base, allowToggle && theme.interactive, className)}\n      onClick={onToggle}\n    >\n      {isRelative ? curRelative : formatted}\n    </time>\n  );\n};\n","export interface DateFormatTheme {\n  /** CSS class applied to the root element. */\n  base: string;\n  /** CSS class applied when the date is interactive (clickable to toggle relative/absolute formatting). */\n  interactive: string;\n}\n\nconst baseTheme: DateFormatTheme = {\n  base: 'cursor-text',\n  interactive: 'cursor-pointer hover:underline'\n};\n\nexport const dateFormatTheme: DateFormatTheme = {\n  ...baseTheme\n};\n","import React, { FC } from 'react';\n\ninterface DownArrowIconProps {\n  className?: string;\n}\n\nexport const DownArrowIcon: FC<DownArrowIconProps> = ({ className }) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    x=\"0px\"\n    y=\"0px\"\n    width=\"50\"\n    height=\"50\"\n    viewBox=\"0 0 32 32\"\n    className={className}\n  >\n    <path d=\"M 4.21875 10.78125 L 2.78125 12.21875 L 15.28125 24.71875 L 16 25.40625 L 16.71875 24.71875 L 29.21875 12.21875 L 27.78125 10.78125 L 16 22.5625 Z\"></path>\n  </svg>\n);\n","export type SortDirection = 'asc' | 'desc' | null;\n\nexport interface SortValue {\n  /**\n   * The field to sort by.\n   */\n  field: string;\n\n  /**\n   * The direction to sort by.\n   */\n  direction: SortDirection;\n}\n\n/**\n * @param direction Current sort direction\n *\n * @param defaultDirection Inital sort direction in case currently unsorted\n *\n * @param canBeNull If next direction can be null (unsorted)\n */\nexport function getNextDirection(\n  direction?: SortDirection | null,\n  defaultDirection: NonNullable<SortDirection> = 'asc',\n  canBeNull: boolean = true\n) {\n  if (!direction) {\n    return defaultDirection;\n  } else if (direction === 'asc') {\n    return 'desc';\n  } else if (direction === 'desc') {\n    return canBeNull ? null : 'asc';\n  }\n}\n","import React, { FC, PropsWithChildren, useCallback } from 'react';\nimport { AnimatePresence, motion } from 'motion/react';\nimport { DownArrowIcon } from './DownArrowIcon';\nimport { getNextDirection, SortDirection } from './utils';\nimport { SortTheme } from './SortTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface SortProps extends PropsWithChildren {\n  /**\n   * Additional css classnames to apply\n   */\n  className?: string;\n\n  /**\n   * Additional css classnames to apply to the icon\n   */\n  iconClassName?: string;\n\n  /**\n   * Whether the sort is disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * The current sort direction\n   */\n  direction?: SortDirection;\n\n  /**\n   * The callback to call when the sort is toggled\n   */\n  onSort?: (direction: SortDirection) => void;\n\n  /**\n   * The icon to display\n   * @default DownArrowIcon\n   */\n  icon?: React.ComponentType<{ className?: string }>;\n\n  /**\n   * The neutral icon to display.\n   */\n  neutralIcon?: React.ComponentType<{ className?: string }>;\n\n  /**\n   * Additional css classnames to apply to the neutral icon.\n   */\n  neutralIconClassName?: string;\n\n  /**\n   * Theme for the Sort.\n   */\n  theme?: SortTheme;\n}\n\nexport const Sort: FC<SortProps> = ({\n  className,\n  disabled,\n  direction,\n  iconClassName,\n  icon: Icon = DownArrowIcon,\n  neutralIcon: NeutralIcon,\n  neutralIconClassName,\n  children,\n  onSort,\n  theme: customTheme\n}) => {\n  const onSortClick = useCallback(() => {\n    if (!disabled) {\n      onSort?.(getNextDirection(direction));\n    }\n  }, [disabled, direction, onSort]);\n\n  const onKeydown = useCallback(\n    (event: React.KeyboardEvent<HTMLDivElement>) => {\n      if (!disabled && (event.key === 'Enter' || event.key === 'Space')) {\n        onSort?.(getNextDirection(direction));\n      }\n    },\n    [disabled, direction, onSort]\n  );\n\n  const theme: SortTheme = useComponentTheme('sort', customTheme);\n\n  return (\n    <div\n      className={cn(\n        theme.base,\n        disabled && theme.disabled,\n        disabled &&\n          direction !== undefined &&\n          direction !== null &&\n          theme.hasValue\n      )}\n      role=\"button\"\n      tabIndex={-1}\n      aria-label=\"Toggle sort direction\"\n      onClick={onSortClick}\n      onKeyDown={onKeydown}\n    >\n      {children}\n      <AnimatePresence initial={false} mode=\"wait\">\n        {direction === 'asc' && (\n          <motion.div\n            key=\"asc\"\n            initial={{ opacity: 0, y: -10 }}\n            animate={{ opacity: 1, y: 0 }}\n            exit={{ opacity: 0, y: 10, transition: { duration: 0.05 } }}\n          >\n            <Icon\n              className={cn(\n                theme.icon.base,\n                theme.icon.ascending,\n                iconClassName\n              )}\n            />\n          </motion.div>\n        )}\n        {direction === 'desc' && (\n          <motion.div\n            key=\"desc\"\n            initial={{ opacity: 0, y: -10 }}\n            animate={{ opacity: 1, y: 0 }}\n            exit={{ opacity: 0, y: 10, transition: { duration: 0.05 } }}\n          >\n            <Icon className={cn(theme.icon.base, iconClassName)} />\n          </motion.div>\n        )}\n        {!!NeutralIcon && !direction && (\n          <motion.div\n            key=\"neutral\"\n            initial={{ opacity: 0, y: -10 }}\n            animate={{ opacity: 1, y: 0 }}\n            exit={{ opacity: 0, y: 10, transition: { duration: 0.05 } }}\n          >\n            <NeutralIcon\n              className={cn(theme.icon.base, neutralIconClassName)}\n            />\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </div>\n  );\n};\n","export interface SortTheme {\n  /** CSS class applied to the root sort control. */\n  base: string;\n  /** CSS class applied when the sort control is disabled. */\n  disabled: string;\n  /** CSS class applied when the sort control has an active value. */\n  hasValue: string;\n  /** Class names applied to the sort direction icon. */\n  icon: {\n    base: string;\n    ascending: string;\n  };\n}\n\nconst baseTheme: SortTheme = {\n  base: 'cursor-pointer select-none flex items-center relative',\n  disabled: 'cursor-[initial]',\n  hasValue: 'cursor-not-allowed',\n  icon: {\n    base: 'w-4 h-4 align-middle mx-1.5 fill-current',\n    ascending: 'rotate-180'\n  }\n};\n\nexport const sortTheme: SortTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'text-text-primary'].join(' ')\n};\n","import * as React from \"react\";\nconst SvgArrowEnd = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\", width: \"32px\", height: \"32px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 9.4140625 4 L 8 5.4140625 L 18.585938 16 L 8 26.585938 L 9.4140625 28 L 21 16.414062 L 21 28 L 23 28 L 23 4 L 21 4 L 21 15.585938 L 9.4140625 4 z\" }));\nexport default SvgArrowEnd;\n","import * as React from \"react\";\nconst SvgArrowNext = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\", width: \"32px\", height: \"32px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 12.96875 4.28125 L 11.53125 5.71875 L 21.8125 16 L 11.53125 26.28125 L 12.96875 27.71875 L 23.96875 16.71875 L 24.65625 16 L 23.96875 15.28125 Z\" }));\nexport default SvgArrowNext;\n","import * as React from \"react\";\nconst SvgArrowPrevious = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\", width: \"32px\", height: \"32px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 19.03125 4.28125 L 8.03125 15.28125 L 7.34375 16 L 8.03125 16.71875 L 19.03125 27.71875 L 20.46875 26.28125 L 10.1875 16 L 20.46875 5.71875 Z\" }));\nexport default SvgArrowPrevious;\n","import * as React from \"react\";\nconst SvgArrowStart = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\", width: \"32px\", height: \"32px\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 9 4 L 9 28 L 11 28 L 11 16.414062 L 22.585938 28 L 24 26.585938 L 13.414062 16 L 24 5.4140625 L 22.585938 4 L 11 15.585938 L 11 4 L 9 4 z\" }));\nexport default SvgArrowStart;\n","const PAGE_COUNT = 6;\nexport const FUZZY_RANGE = 3;\n\n/**\n * Get the range of pages to show in the pager.\n */\nexport function getPageRange(page: number, totalPages: number) {\n  let startPage = Math.max(page - FUZZY_RANGE, 0);\n  let endPage = Math.min(page + FUZZY_RANGE, totalPages);\n\n  if (startPage === 0 && endPage !== totalPages) {\n    endPage = startPage + PAGE_COUNT;\n  } else if (endPage === totalPages && startPage !== 0) {\n    startPage = endPage - PAGE_COUNT;\n  }\n\n  return [startPage, endPage];\n}\n\nexport function getItemsRange(\n  page: number,\n  perPage: number,\n  totalItems: number\n) {\n  const startItem = page * perPage + 1;\n  const endOfPage = (page + 1) * perPage;\n  const endItem = Math.min(endOfPage, totalItems);\n\n  return [startItem, endItem];\n}\n","import React, { FC, Fragment, ReactNode, useCallback } from 'react';\nimport { Button } from '@/elements';\nimport { Small } from '@/typography';\nimport { Pluralize } from '@/data/Pluralize';\nimport EndArrow from './assets/arrow-end.svg?react';\nimport NextArrow from './assets/arrow-next.svg?react';\nimport PreviousArrow from './assets/arrow-previous.svg?react';\nimport StartArrow from './assets/arrow-start.svg?react';\nimport { FUZZY_RANGE, getItemsRange, getPageRange } from './utils';\nimport { cn, useComponentTheme } from '@/utils';\nimport { PagerTheme } from './PagerTheme';\n\nexport interface PagerProps {\n  /**\n   * The class name to add to the pager.\n   */\n  className?: string;\n\n  /**\n   * The class name to add to the page buttons.\n   */\n  pageClassName?: string;\n\n  /**\n   * The class name for the active page button.\n   */\n  activePageClassName?: string;\n\n  /**\n   * The class name to add to the pages container.\n   */\n  pagesContainerClassName?: string;\n\n  /**\n   * The current page number.\n   */\n  page: number;\n\n  /**\n   * The number of items per page.\n   */\n  size: number;\n\n  /**\n   * The total number of items.\n   */\n  total: number;\n\n  /**\n   * The React node or string to use for the previous arrow.\n   * @default <PreviousArrow />\n   */\n  previousArrow?: ReactNode | string;\n\n  /**\n   * The React node or string to use for the next arrow.\n   * @default <NextArrow />\n   */\n  nextArrow?: ReactNode | string;\n\n  /**\n   * The React node or string to use for the start arrow.\n   * @default <StartArrow />\n   */\n  startArrow?: ReactNode | string;\n\n  /**\n   * The React node or string to use for the end arrow.\n   * @default <EndArrow />\n   */\n  endArrow?: ReactNode | string;\n\n  /**\n   * A callback function that is called when the page changes.\n   */\n  onPageChange?: (page: number) => void;\n\n  /**\n   * The type of table data for the pager to display.\n   * @default 'pages'\n   */\n  displayMode?: 'pages' | 'items' | 'all';\n\n  /**\n   * The theme for the Pager.\n   */\n  theme?: PagerTheme;\n}\n\nexport const Pager: FC<PagerProps> = ({\n  className,\n  pageClassName,\n  activePageClassName,\n  pagesContainerClassName,\n  page,\n  size,\n  total,\n  startArrow = <StartArrow />,\n  endArrow = <EndArrow />,\n  previousArrow = <PreviousArrow />,\n  nextArrow = <NextArrow />,\n  onPageChange,\n  displayMode = 'pages',\n  theme: customTheme\n}) => {\n  const pageCount = Math.ceil(total / size);\n  const canPrevious = page !== 0;\n  const canNext = page < pageCount - 1;\n  const [startPage, endPage] = getPageRange(page, pageCount - 1);\n  const [startItem, endItem] = getItemsRange(page, size, total);\n  const theme = useComponentTheme('pager', customTheme);\n\n  const previousPage = useCallback(() => {\n    if (canPrevious) {\n      onPageChange?.(page - 1);\n    } else {\n      onPageChange?.(0);\n    }\n  }, [canPrevious, page, onPageChange]);\n\n  const nextPage = useCallback(() => {\n    if (canNext) {\n      onPageChange?.(page + 1);\n    } else {\n      onPageChange?.(pageCount - 1);\n    }\n  }, [canNext, page, onPageChange, pageCount]);\n\n  return (\n    <div className={cn(theme.base, className)}>\n      {(displayMode === 'items' || displayMode === 'all') && (\n        <div className={theme.pagerDisplayItems}>\n          {pageCount === 1 && total > 0 && (\n            <Small>\n              Showing {total === 1 ? total : `all ${total.toLocaleString()}`}{' '}\n              <Pluralize count={total} singular=\"item\" showCount={false} />\n            </Small>\n          )}\n          {pageCount > 1 && (\n            <div className={theme.itemsDisplay}>\n              <Small>\n                <span className={theme.showPageRange}>\n                  {startItem.toLocaleString()}-{endItem.toLocaleString()}\n                </span>{' '}\n                of{' '}\n                <span className={theme.totalCount}>\n                  {total.toLocaleString()}\n                </span>{' '}\n                <Pluralize count={total} singular=\"item\" showCount={false} />\n              </Small>\n            </div>\n          )}\n        </div>\n      )}\n      {startArrow && (\n        <Button\n          className={cn(theme.control, theme.firstPage)}\n          variant=\"text\"\n          size=\"small\"\n          disablePadding\n          title=\"First Page\"\n          onClick={() => onPageChange?.(0)}\n          disabled={!canPrevious}\n        >\n          {startArrow}\n        </Button>\n      )}\n      <Button\n        className={cn(theme.control, theme.prevPage)}\n        variant=\"text\"\n        size=\"small\"\n        disablePadding\n        title=\"Previous page\"\n        onClick={previousPage}\n        disabled={!canPrevious}\n      >\n        {previousArrow}\n      </Button>\n      {(displayMode === 'pages' || displayMode === 'all') && (\n        <div className={cn(theme.pages.base, pagesContainerClassName)}>\n          {startPage >= 2 && (\n            <div className={cn(theme.ellipsis)}>&nbsp;...</div>\n          )}\n          {[...Array(pageCount)].map((_, i) => (\n            <Fragment key={i}>\n              {i >= startPage && i <= endPage && (\n                <Button\n                  variant=\"text\"\n                  size=\"small\"\n                  disabled={page === i}\n                  title={`Page ${(i + 1).toLocaleString()}`}\n                  className={cn(\n                    theme.pages.page.base,\n                    page === i &&\n                      (activePageClassName || theme.pages.page.active),\n                    pageClassName\n                  )}\n                  onClick={() => onPageChange?.(i)}\n                >\n                  {(i + 1).toLocaleString()}\n                </Button>\n              )}\n            </Fragment>\n          ))}\n          {endPage <= pageCount - FUZZY_RANGE && (\n            <div className={cn(theme.ellipsis)}>...&nbsp;</div>\n          )}\n        </div>\n      )}\n      <Button\n        className={cn(theme.control, theme.nextPage)}\n        variant=\"text\"\n        title=\"Next Page\"\n        size=\"small\"\n        disablePadding\n        onClick={nextPage}\n        disabled={!canNext}\n      >\n        {nextArrow}\n      </Button>\n      {endArrow && (\n        <Button\n          className={cn(theme.control, theme.lastPage)}\n          size=\"small\"\n          title=\"Last Page\"\n          disablePadding\n          variant=\"text\"\n          onClick={() => onPageChange?.(pageCount - 1)}\n          disabled={!canNext}\n        >\n          {endArrow}\n        </Button>\n      )}\n    </div>\n  );\n};\n","export interface PagerTheme {\n  /** CSS class applied to the root pager container. */\n  base: string;\n  /** Class names applied to the pages list and individual page buttons. */\n  pages: {\n    base: string;\n    page: {\n      base: string;\n      active: string;\n    };\n  };\n  /** CSS class applied to the ellipsis indicator shown between page ranges. */\n  ellipsis: string;\n  /** CSS class applied to the wrapper around the page-range and total-count display. */\n  pagerDisplayItems: string;\n  /** CSS class applied to the items-per-page display element. */\n  itemsDisplay: string;\n  /** CSS class applied to the current page-range label. */\n  showPageRange: string;\n  /** CSS class applied to the total count label. */\n  totalCount: string;\n  /** CSS class applied to each pager navigation control button. */\n  control: string;\n  /** CSS class applied to the first-page control button. */\n  firstPage: string;\n  /** CSS class applied to the previous-page control button. */\n  prevPage: string;\n  /** CSS class applied to the last-page control button. */\n  lastPage: string;\n  /** CSS class applied to the next-page control button. */\n  nextPage: string;\n}\n\nconst baseTheme: PagerTheme = {\n  base: 'items-center flex user-select-none',\n  pages: {\n    base: 'inline-flex',\n    page: {\n      base: 'py-1',\n      active: 'font-bold'\n    }\n  },\n  ellipsis: 'cursor-pointer',\n  pagerDisplayItems: 'mr-1.5',\n  itemsDisplay: 'flex items-center gap-1',\n  showPageRange: '',\n  totalCount: '',\n  control: '[&>svg]:w-5 [&>svg]:h-5',\n  firstPage: '',\n  prevPage: '',\n  lastPage: '',\n  nextPage: ''\n};\n\nexport const pagerTheme: PagerTheme = {\n  ...(baseTheme as PagerTheme),\n  pages: {\n    ...baseTheme.pages,\n    page: {\n      base: [baseTheme.pages.page.base, 'text-slate-500'].join(' '),\n      active: [baseTheme.pages.page.active, 'text-text-primary!'].join(' ')\n    }\n  },\n  control: [\n    baseTheme.control,\n    'text-slate-200 light:text-slate-400 disabled:light:text-slate-300'\n  ].join(' '),\n  pagerDisplayItems: [baseTheme.pagerDisplayItems, 'text-slate-500'].join(' ')\n};\n","import React, { Children, forwardRef, Ref } from 'react';\nimport { useInfinityList } from '@/data';\nimport { AvatarGroupTheme } from './AvatarGroupTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {\n  /**\n   * The avatars to display in the group.\n   */\n  children: React.ReactNode;\n\n  /**\n   * Additional CSS classes to apply to the avatar group\n   */\n  className?: string;\n\n  /**\n   * The maximum number of avatars to show before +x more\n   * @default 10\n   */\n  size?: number;\n\n  /**\n   * Theme for the AvatarGroup\n   */\n  theme?: AvatarGroupTheme;\n}\n\nexport const AvatarGroup = forwardRef<HTMLDivElement, AvatarGroupProps>(\n  (\n    {\n      children,\n      className,\n      size = 10,\n      theme: customTheme,\n      ...rest\n    }: AvatarGroupProps,\n    ref: Ref<HTMLDivElement>\n  ) => {\n    const childrenArray = Children.toArray(children);\n\n    const { data, hasMore, remaining } = useInfinityList({\n      items: childrenArray,\n      size\n    });\n\n    const theme: AvatarGroupTheme = useComponentTheme(\n      'avatarGroup',\n      customTheme\n    );\n\n    return (\n      <div {...rest} ref={ref} className={cn(theme.base, className)}>\n        {data.map((child, index) => (\n          <div key={index} className={theme.avatar}>\n            {child}\n          </div>\n        ))}\n        {hasMore && <span className={theme.overflow}>+{remaining} more</span>}\n      </div>\n    );\n  }\n);\n","export interface AvatarGroupTheme {\n  /** CSS class applied to the root avatar group container. */\n  base: string;\n  /** CSS class applied to each avatar within the group. */\n  avatar: string;\n  /** CSS class applied to the overflow indicator showing remaining avatars. */\n  overflow: string;\n}\n\nconst baseTheme: AvatarGroupTheme = {\n  base: 'flex items-center',\n  avatar: '-ml-2.5',\n  overflow: 'ml-[5px]'\n};\n\nexport const avatarGroupTheme: AvatarGroupTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'text-text-primary'].join(' ')\n};\n","let isMac: boolean = false;\ntry {\n  if (typeof window !== 'undefined') {\n    isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;\n  }\n} catch (e) {\n  // ignore\n}\n\nexport const MODIFIER_KEY = isMac ? '⌘' : 'CTRL';\n\nexport function getHotkeyText(hotkey: string) {\n  return hotkey\n    .replace('modifier', MODIFIER_KEY)\n    .replace('mod', MODIFIER_KEY)\n    .replace('meta', MODIFIER_KEY)\n    .replace('shift', '⇧')\n    .replace('plus', '+')\n    .replace('minus', '-');\n}\n","import React, { FC } from 'react';\nimport { Chip, ChipProps } from '@/elements/Chip';\nimport { getHotkeyText } from './utils';\nimport { cn, useComponentTheme } from '@/utils';\nimport { KbdTheme } from './KbdTheme';\n\nexport interface KbdProps extends Omit<ChipProps, 'children' | 'theme'> {\n  /**\n   * Keycode for the Kbd.\n   */\n  keycode: string;\n\n  /**\n   * Theme for the Kbd.\n   */\n  theme?: KbdTheme;\n}\n\nexport const Kbd: FC<KbdProps> = ({\n  className,\n  keycode,\n  theme: customTheme,\n  ...rest\n}) => {\n  const split = keycode.split('+').map(getHotkeyText);\n  const theme: KbdTheme = useComponentTheme('kbd');\n\n  return (\n    <span className={theme.base}>\n      {split?.map((key, index) => (\n        <Chip key={index} {...rest} className={cn(theme.chip, className)}>\n          <kbd>{key}</kbd>\n        </Chip>\n      ))}\n    </span>\n  );\n};\n","export interface KbdTheme {\n  /** CSS class applied to the root keyboard shortcut container. */\n  base: string;\n  /** CSS class applied to each key chip within the shortcut. */\n  chip: string;\n}\n\nconst baseTheme: KbdTheme = {\n  base: 'inline-flex gap-1 items-center',\n  chip: 'whitespace-nowrap rounded-sm font-mono'\n};\n\nexport const kbdTheme: KbdTheme = {\n  ...baseTheme\n};\n","import React, { FC, forwardRef, LegacyRef } from 'react';\nimport { motion } from 'motion/react';\nimport { BadgeTheme } from './BadgeTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport type BadgeColor = 'default' | 'primary' | 'secondary' | 'error';\n\nexport type BadgePlacement =\n  | 'top-start'\n  | 'top-end'\n  | 'bottom-end'\n  | 'bottom-start';\n\nexport interface BadgeProps extends Omit<\n  React.HTMLAttributes<HTMLSpanElement>,\n  'content'\n> {\n  /**\n   * The content of the badge.\n   */\n  content?: string | React.JSX.Element;\n\n  /**\n   * The color of the badge.\n   * @default 'default'\n   */\n  color?: BadgeColor | string;\n\n  /**\n   * Whether to disable the margins.\n   */\n  disableMargins?: boolean;\n\n  /**\n   * Whether the badge is hidden or not.\n   */\n  hidden?: boolean;\n\n  /**\n   * The placement of the badge.\n   * @default 'top-end'\n   */\n  placement?: BadgePlacement;\n\n  /**\n   * Theme for the Budge.\n   */\n  theme?: BadgeTheme;\n}\n\nexport interface BadgeRef {\n  /**\n   * Reference to the HTML span element.\n   */\n  ref?: LegacyRef<HTMLSpanElement>;\n}\n\nexport const Badge: FC<BadgeProps & BadgeRef> = forwardRef(\n  (\n    {\n      children,\n      color = 'default',\n      className,\n      disableMargins,\n      content,\n      hidden,\n      placement = 'top-end',\n      theme: customTheme,\n      ...rest\n    }: BadgeProps,\n    ref\n  ) => {\n    const theme: BadgeTheme = useComponentTheme('badge', customTheme);\n\n    return (\n      <span className={cn(theme.base, disableMargins && theme.disableMargins)}>\n        {children}\n        {!hidden && (\n          <motion.span\n            initial={{ opacity: 0, scale: 1 }}\n            animate={{ opacity: 1, scale: 1 }}\n            aria-hidden=\"true\"\n          >\n            <span\n              {...rest}\n              ref={ref}\n              className={cn(\n                theme.badge,\n                theme.position,\n                theme.colors[color],\n                theme.positions[placement],\n                className\n              )}\n            >\n              {content}\n            </span>\n          </motion.span>\n        )}\n      </span>\n    );\n  }\n);\n","export interface BadgeTheme {\n  /** CSS class applied to the root badge wrapper element. */\n  base: string;\n  /** CSS class applied when the badge margins are disabled. */\n  disableMargins: string;\n  /** CSS class applied to the badge indicator element. */\n  badge: string;\n  /** CSS class applied for the default badge position. */\n  position: string;\n  /** Class names for each badge color variant. */\n  colors: {\n    default: string;\n    primary: string;\n    secondary: string;\n    error: string;\n    [key: string]: string;\n  };\n  /** Class names for each badge position relative to its anchor. */\n  positions: {\n    'top-start': string;\n    'top-end': string;\n    'bottom-start': string;\n    'bottom-end': string;\n  };\n}\n\nconst baseTheme: Partial<BadgeTheme> = {\n  base: 'relative inline-flex align-middle shrink-0 mx-2 my-0',\n  disableMargins: 'm-0',\n  badge: `flex flex-row flex-wrap justify-center content-center items-center absolute box-border\n   leading-none text-sm p-1.5 w-[18px] h-[18px] z-1 rounded-[50%] pointer-events-none `,\n  position: 'translate-x-2/4 -translate-y-2/4 origin-[100%_0%] right-0 top-0',\n  positions: {\n    'top-start':\n      'top-0 left-0 -translate-x-2/4 -translate-y-2/4 origin-[0%_0%]',\n    'top-end':\n      'top-0 right-0 translate-x-2/4 -translate-y-2/4 origin-[100%_0%]',\n    'bottom-start':\n      'bottom-0 left-0 -translate-x-2/4 translate-y-2/4 origin-[0%_100%]',\n    'bottom-end':\n      'bottom-0 right-0 translate-x-2/4 translate-y-2/4 origin-[100%_100%]'\n  }\n};\n\nexport const badgeTheme: BadgeTheme = {\n  base: baseTheme.base,\n  disableMargins: baseTheme.disableMargins,\n  badge: baseTheme.badge,\n  position: baseTheme.position,\n  positions: baseTheme.positions,\n  colors: {\n    default: 'bg-white text-black',\n    primary: 'bg-primary text-text-primary',\n    secondary: 'bg-secondary text-text-primary',\n    error: 'bg-error text-text-primary'\n  }\n};\n","import React, { FC } from 'react';\n\nexport const SearchIcon: FC = () => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"1.5\"\n    stroke=\"currentColor\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z\"\n    ></path>\n  </svg>\n);\n","import React, {\n  FC,\n  KeyboardEvent,\n  FocusEvent,\n  ReactNode,\n  useEffect,\n  useLayoutEffect,\n  useRef\n} from 'react';\nimport { SearchIcon } from './SearchIcon';\nimport { HotkeyIem } from '@/elements/CommandPalette/useFlattenedTree';\nimport { CommandPaletteTheme } from '@/elements/CommandPalette/CommandPaletteTheme';\nimport { useComponentTheme } from '@/utils';\nimport type { HandlerInterface, Key } from 'ctrl-keys';\nimport { keys } from 'ctrl-keys';\n\nexport interface CommandPaletteInputProps {\n  /**\n   * The value of the input.\n   */\n  value: string;\n\n  /**\n   * Placeholder text.\n   */\n  placeholder?: string;\n\n  /**\n   * Autofocus or not.\n   */\n  autoFocus?: boolean;\n\n  /**\n   * Icon to show in the search input.\n   * @default <SearchIcon />\n   */\n  icon?: ReactNode;\n\n  /**\n   * Hotkeys set by CommandPalette from useFlattenedTree.\n   */\n  hotkeys: HotkeyIem[];\n\n  /**\n   * When the search input value changes.\n   */\n  onChange: (value: string) => void;\n\n  /**\n   * When a user presses a key.\n   */\n  onKeyPress: (event: KeyboardEvent<HTMLInputElement>) => void;\n\n  /**\n   * When the input loses focus.\n   */\n  onBlur: (event: FocusEvent<HTMLInputElement>) => void;\n\n  /**\n   * When a hotkey was triggered. Used internally.\n   */\n  onHotkey: (hotkey: HotkeyIem) => void;\n\n  /**\n   * Theme for the Command Palette.\n   */\n  theme?: CommandPaletteTheme;\n}\n\nexport const CommandPaletteInput: FC<CommandPaletteInputProps> = ({\n  value,\n  autoFocus,\n  icon = <SearchIcon />,\n  hotkeys,\n  placeholder,\n  onHotkey,\n  onBlur,\n  onChange,\n  onKeyPress,\n  theme: customTheme\n}) => {\n  const inputRef = useRef<HTMLInputElement | null>(null);\n  const handlerRef = useRef<HandlerInterface>(keys());\n  const keyMapRef = useRef<Map<string, any>>(new Map());\n\n  useLayoutEffect(() => {\n    if (autoFocus) {\n      // Small timeout for page loading\n      requestAnimationFrame(() => inputRef.current?.focus());\n    }\n  }, [autoFocus]);\n\n  useEffect(() => {\n    if (typeof window !== 'undefined') {\n      const handler = handlerRef.current;\n      const keyMap = keyMapRef.current;\n\n      for (const hotkey of hotkeys) {\n        const callback = () => onHotkey(hotkey);\n        handler.add(hotkey.hotkey as Key, callback);\n        keyMap.set(hotkey.hotkey, callback);\n      }\n\n      window.addEventListener('keydown', handler.handle);\n\n      return () => {\n        [...keyMap].forEach(([key, cb]) => handler.remove(key as Key, cb));\n        window.removeEventListener('keydown', handler.handle);\n        keyMapRef.current = new Map();\n      };\n    }\n  }, [onHotkey, hotkeys]);\n\n  const { input: inputTheme }: CommandPaletteTheme = useComponentTheme(\n    'commandPalette',\n    customTheme\n  );\n\n  return (\n    <div className={inputTheme.base}>\n      {icon && <span className={inputTheme.icon}>{icon}</span>}\n      <input\n        className={inputTheme.input}\n        ref={inputRef}\n        type=\"text\"\n        value={value}\n        placeholder={placeholder}\n        autoCorrect=\"off\"\n        spellCheck=\"false\"\n        autoComplete=\"off\"\n        onChange={e => onChange(e.target.value)}\n        onKeyDown={onKeyPress}\n        onBlur={onBlur}\n      />\n    </div>\n  );\n};\n","export interface CommandPaletteInputTheme {\n  /** CSS class applied to the root input container. */\n  base: string;\n  /** CSS class applied to the underlying input element. */\n  input: string;\n  /** CSS class applied to the search icon. */\n  icon: string;\n}\n\nconst baseTheme: CommandPaletteInputTheme = {\n  base: 'flex w-full items-center border-b-2',\n  input:\n    'flex-1 border-0 box-border p-2.5 focus-within:outline-hidden focus-visible:outline-hidden',\n  icon: 'w-4 h-4 ml-2.5'\n};\n\nexport const commandPaletteInputTheme: CommandPaletteInputTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'bg-panel border-bottom border-panel-accent'].join(\n    ' '\n  ),\n  input: [\n    baseTheme.input,\n    'bg-panel text-text-primary placeholder:placeholder-accent'\n  ].join(' ')\n};\n","import {\n  Children,\n  cloneElement,\n  isValidElement,\n  ReactNode,\n  RefObject,\n  useRef,\n  useState,\n  useEffect\n} from 'react';\n\nexport const DATA_ATTRIBUTE_INDEX = 'keyboard_index';\n\nexport interface FocusableElement {\n  /** Ref pointing to the focusable DOM element. */\n  ref: RefObject<HTMLElement>;\n  /** Handler invoked when the element is clicked. */\n  onClick: (() => void) | undefined;\n}\n\nexport interface HotkeyIem {\n  /** Keyboard shortcut associated with the item. */\n  hotkey: string;\n  /** Index of the item in the flattened tree. */\n  index: number;\n}\n\nexport const useFlattenedTree = (\n  children: ReactNode,\n  selectedIndex: number,\n  onSelectedIndexChange: (index: number) => void\n) => {\n  const itemsRef = useRef<HTMLElement[]>([]);\n  const hotkeyRef = useRef<HotkeyIem[]>([]);\n  const [flattenedTree, setFlattenedTree] = useState<ReactNode[]>([]);\n\n  function flattenChildren(nodes: ReactNode) {\n    const result: ReactNode[] = [];\n\n    Children.forEach(nodes, (child: ReactNode, index) => {\n      if (isValidElement(child)) {\n        const childProps = child.props as Record<string, any>;\n        const childType = child.type as any;\n\n        if (childType.displayName === 'CommandPaletteSection') {\n          result.push(\n            cloneElement(child as any, {\n              children: flattenChildren(childProps.children),\n              index\n            })\n          );\n        } else if (childType.displayName === 'CommandPaletteItem') {\n          const index = itemsRef.current.length;\n\n          if (childProps.hotkey) {\n            hotkeyRef.current.push({\n              hotkey: childProps.hotkey,\n              index\n            });\n          }\n\n          const clone = cloneElement(child as any, {\n            // NOTE: This isn't working for some reason\n            ref: (ref: HTMLElement | null) => (itemsRef.current[index] = ref),\n            active: index === selectedIndex,\n            onClick: () => onSelectedIndexChange?.(index),\n            [DATA_ATTRIBUTE_INDEX]: index\n          });\n\n          // NOTE: This is a temp hack\n          itemsRef.current[index] = clone as any;\n\n          result.push(clone);\n        } else {\n          result.push(child);\n        }\n      }\n    });\n\n    return result;\n  }\n\n  useEffect(() => {\n    itemsRef.current = [];\n    hotkeyRef.current = [];\n    setFlattenedTree(flattenChildren(children));\n  }, [children, selectedIndex]);\n\n  return {\n    flattenedTree,\n    hotkeys: hotkeyRef.current,\n    itemsRef\n  };\n};\n","import React, {\n  FC,\n  useState,\n  PropsWithChildren,\n  useEffect,\n  KeyboardEvent,\n  Children,\n  useRef,\n  ReactNode\n} from 'react';\nimport { CommandPaletteInput } from './CommandPaletteInput';\nimport {\n  DATA_ATTRIBUTE_INDEX,\n  HotkeyIem,\n  useFlattenedTree\n} from './useFlattenedTree';\nimport { List, ListItem } from '@/layout/List';\nimport { Card } from '@/layout/Card';\nimport { MotionGroup } from '@/layout/Motion';\nimport { useComponentTheme } from '@/utils';\nimport { CommandPaletteTheme } from './CommandPaletteTheme';\n\nexport interface CommandPaletteProps extends PropsWithChildren {\n  /**\n   * Search input value.\n   */\n  search?: string;\n\n  /**\n   * Placeholder text.\n   */\n  placeholder?: string;\n\n  /**\n   * Selected Index.\n   */\n  selected?: number;\n\n  /**\n   * Autofocus or not.\n   * @default true\n   */\n  autoFocus?: boolean;\n\n  /**\n   * Empty message to show when there are no items.\n   */\n  emptyMessage?: string;\n\n  /**\n   * Icon to show in the search input.\n   */\n  inputIcon?: ReactNode;\n\n  /**\n   * When the search input value changes.\n   */\n  onSearchChange?: (value: string) => void;\n\n  /**\n   * When a user picks something from the list.\n   */\n  onSelectedIndexChange?: (value: number) => void;\n\n  /**\n   * When a hotkey was triggered.\n   */\n  onHotkey?: (hotkey: HotkeyIem) => void;\n\n  /**\n   * Theme for the CommandPalette.\n   */\n  theme?: CommandPaletteTheme;\n}\n\nexport const CommandPalette: FC<CommandPaletteProps> = ({\n  search,\n  placeholder,\n  children,\n  inputIcon,\n  autoFocus = true,\n  emptyMessage,\n  onHotkey,\n  onSelectedIndexChange,\n  onSearchChange,\n  theme: customTheme\n}) => {\n  const [selectedIndex, setSelectedIndex] = useState<number>(-1);\n  const [filterText, setFilterText] = useState<string>(search);\n  const { flattenedTree, itemsRef, hotkeys } = useFlattenedTree(\n    children,\n    selectedIndex,\n    onSelectedIndexChange\n  );\n  const hasChildren = Children.count(children) > 0;\n  const elementRef = useRef<HTMLDivElement | null>(null);\n\n  const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n    if (event.key === 'ArrowUp') {\n      setSelectedIndex(prev => Math.max(prev - 1, -1));\n    } else if (event.key === 'ArrowDown') {\n      setSelectedIndex(prev => Math.min(prev + 1, itemsRef.current.length - 1));\n    } else if (event.key === 'Enter' && itemsRef.current[selectedIndex]) {\n      onSelectedIndexChange?.(selectedIndex);\n      setSelectedIndex(-1);\n    }\n  };\n\n  useEffect(() => {\n    if (selectedIndex > -1) {\n      elementRef.current\n        .querySelector(`[${DATA_ATTRIBUTE_INDEX}=\"${selectedIndex}\"]`)\n        ?.scrollIntoView();\n    }\n  }, [selectedIndex, flattenedTree]);\n\n  const theme: CommandPaletteTheme = useComponentTheme(\n    'commandPalette',\n    customTheme\n  );\n\n  return (\n    <Card className={theme.base} disablePadding ref={elementRef}>\n      <CommandPaletteInput\n        value={filterText}\n        placeholder={placeholder}\n        autoFocus={autoFocus}\n        icon={inputIcon}\n        hotkeys={hotkeys}\n        onHotkey={onHotkey}\n        onChange={val => {\n          setFilterText(val);\n          onSearchChange?.(val);\n        }}\n        onKeyPress={handleKeyDown}\n        onBlur={() => setSelectedIndex(-1)}\n      />\n      <MotionGroup>\n        {hasChildren && (\n          <Card className={theme.inner} disablePadding>\n            <List>{flattenedTree}</List>\n          </Card>\n        )}\n        {!hasChildren && emptyMessage && (\n          <List className={theme.emptyContainer}>\n            <ListItem>{emptyMessage}</ListItem>\n          </List>\n        )}\n      </MotionGroup>\n    </Card>\n  );\n};\n","import React, { forwardRef } from 'react';\nimport { ListItem, ListItemProps } from '@/layout';\nimport { MotionItem } from '@/layout';\nimport { Kbd } from '@/elements/Kbd';\nimport { cn, useComponentTheme } from '@/utils';\nimport { CommandPaletteTheme } from '@/elements/CommandPalette/CommandPaletteTheme';\n\nexport interface CommandPaletteItemProps extends Omit<ListItemProps, 'theme'> {\n  /**\n   * Keyboard shortcut displayed alongside the item.\n   */\n  hotkey?: string;\n\n  /**\n   * Theme for the CommandPalette.\n   */\n  theme?: CommandPaletteTheme;\n}\n\nexport const CommandPaletteItem = forwardRef<\n  HTMLDivElement,\n  CommandPaletteItemProps\n>(\n  (\n    {\n      children,\n      active,\n      className,\n      end,\n      hotkey,\n      onClick,\n      theme: customTheme,\n      ...rest\n    },\n    ref\n  ) => {\n    const { item: itemTheme }: CommandPaletteTheme = useComponentTheme(\n      'commandPalette',\n      customTheme\n    );\n\n    return (\n      <MotionItem layout>\n        <ListItem\n          {...rest}\n          ref={ref}\n          className={cn(\n            itemTheme.base,\n            active && itemTheme.active,\n            onClick && itemTheme.clickable\n          )}\n          end={\n            <>\n              {hotkey && <Kbd keycode={hotkey} size=\"small\" />}\n              {end}\n            </>\n          }\n        >\n          {children}\n        </ListItem>\n      </MotionItem>\n    );\n  }\n);\n\nCommandPaletteItem.displayName = 'CommandPaletteItem';\n","export interface CommandPaletteItemTheme {\n  /** CSS class applied to the root command palette item. */\n  base: string;\n  /** CSS class applied when the item is active or highlighted. */\n  active: string;\n  /** CSS class applied when the item is clickable. */\n  clickable: string;\n}\n\nconst baseTheme: CommandPaletteItemTheme = {\n  base: 'transition-colors ease-in-out duration-200',\n  active: '',\n  clickable: 'cursor-pointer'\n};\n\nexport const commandPaletteItemTheme: CommandPaletteItemTheme = {\n  ...baseTheme,\n  active: [baseTheme.active, 'bg-primary text-text-primary'].join(' '),\n  clickable: [\n    baseTheme.clickable,\n    'hover:bg-primary-hover/70 dark:hover:bg-primary-hover dark:hover:text-white'\n  ].join(' ')\n};\n","import React, { PropsWithChildren, forwardRef } from 'react';\nimport { List, ListHeader } from '@/layout';\nimport { MotionGroup, MotionItem } from '@/layout';\nimport { cn, useComponentTheme } from '@/utils';\nimport { CommandPaletteTheme } from '@/elements/CommandPalette/CommandPaletteTheme';\n\nexport interface CommandPaletteSectionProps extends PropsWithChildren {\n  /**\n   * Section title.\n   */\n  title?: string;\n\n  /**\n   * Additional class name.\n   */\n  className?: string;\n\n  /**\n   * Section stack index. Set internally.\n   */\n  index?: number;\n\n  /**\n   * Theme for the CommandPalette.\n   */\n  theme?: CommandPaletteTheme;\n}\n\nexport const CommandPaletteSection = forwardRef<\n  HTMLDivElement,\n  CommandPaletteSectionProps\n>(({ children, className, title, index, theme: customTheme, ...rest }, ref) => {\n  const { section: sectionTheme }: CommandPaletteTheme = useComponentTheme(\n    'commandPalette',\n    customTheme\n  );\n\n  return (\n    <MotionItem layout>\n      <List\n        ref={ref}\n        {...rest}\n        className={cn(\n          sectionTheme.base,\n          index === 0 && sectionTheme.first,\n          className\n        )}\n      >\n        {title && <ListHeader>{title}</ListHeader>}\n        <MotionGroup>{children}</MotionGroup>\n      </List>\n    </MotionItem>\n  );\n});\n\nCommandPaletteSection.displayName = 'CommandPaletteSection';\n","export interface CommandPaletteSectionTheme {\n  /** CSS class applied to the root section container. */\n  base: string;\n  /** CSS class applied to the first section in the palette. */\n  first: string;\n}\n\nconst baseTheme: CommandPaletteSectionTheme = {\n  base: '',\n  first: 'pt-2.5'\n};\n\nexport const commandPaletteSectionTheme: CommandPaletteSectionTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'bg-panel'].join(' ')\n};\n","import {\n  CommandPaletteInputTheme,\n  commandPaletteInputTheme\n} from './CommandPaletteInput';\nimport {\n  CommandPaletteItemTheme,\n  commandPaletteItemTheme\n} from './CommandPaletteItem';\nimport {\n  CommandPaletteSectionTheme,\n  commandPaletteSectionTheme\n} from './CommandPaletteSection';\n\nexport interface CommandPaletteTheme {\n  /** CSS class applied to the root command palette container. */\n  base: string;\n  /** CSS class applied to the inner scrollable area. */\n  inner: string;\n  /** CSS class applied to the empty state container when no results are present. */\n  emptyContainer: string;\n  /** Theme for the command palette input. */\n  input: CommandPaletteInputTheme;\n  /** Theme for individual command palette items. */\n  item: CommandPaletteItemTheme;\n  /** Theme for command palette sections. */\n  section: CommandPaletteSectionTheme;\n}\n\nconst baseTheme: Partial<CommandPaletteTheme> = {\n  base: 'w-full border',\n  inner: 'max-h-[80vh] overflow-y-auto'\n};\n\nexport const commandPaletteTheme: CommandPaletteTheme = {\n  base: [baseTheme.base, 'border-panel-accent'].join(' '),\n  inner: [baseTheme.inner, 'bg-panel border-0'].join(' '),\n  emptyContainer: 'bg-panel',\n  input: commandPaletteInputTheme,\n  item: commandPaletteItemTheme,\n  section: commandPaletteSectionTheme\n};\n","import React, { FC } from 'react';\nimport { SkeletonTheme } from './SkeletonTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n  /**\n   * Additional CSS class names to apply to the skeleton.\n   */\n  className?: string;\n\n  /**\n   * Inline styles to apply to the skeleton.\n   */\n  style?: React.CSSProperties;\n\n  /**\n   * Whether to show animated shimmer effect.\n   * @default false\n   */\n  animated?: boolean;\n\n  /**\n   * Predefined variant for the skeleton.\n   * - text: Single line of text (h-4 w-full)\n   * - rounded: Circular shape for avatars (rounded-full w-10 h-10)\n   * - rectangle: Wide rectangular shape (h-24 w-full)\n   * - square: Square shape (w-24 h-24)\n   */\n  variant?: 'text' | 'rounded' | 'rectangle' | 'square' | string;\n\n  /**\n   * Theme for the Skeleton.\n   */\n  theme?: SkeletonTheme;\n}\n\nexport const Skeleton: FC<SkeletonProps> = ({\n  className,\n  style,\n  animated = false,\n  variant,\n  theme: customTheme,\n  ...rest\n}) => {\n  const theme: SkeletonTheme = useComponentTheme('skeleton', customTheme);\n\n  return (\n    <div\n      className={cn(\n        theme.base,\n        animated && theme.animated,\n        variant && theme.variants[variant],\n        className\n      )}\n      style={style}\n      aria-busy=\"true\"\n      aria-live=\"polite\"\n      {...rest}\n    />\n  );\n};\n","export interface SkeletonTheme {\n  /** CSS class applied to the root skeleton element. */\n  base: string;\n  /** CSS class applied when the skeleton has its loading animation enabled. */\n  animated: string;\n  /** Class names for each skeleton shape variant. */\n  variants: {\n    text: string;\n    rounded: string;\n    rectangle: string;\n    square: string;\n    [key: string]: string;\n  };\n}\n\nconst baseTheme: SkeletonTheme = {\n  base: 'rounded-md',\n  animated: '',\n  variants: {\n    text: 'h-4 w-full',\n    rounded: 'rounded-full w-10 h-10',\n    rectangle: 'h-24 w-full',\n    square: 'w-24 h-24'\n  }\n};\n\nexport const skeletonTheme: SkeletonTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'light:bg-gray-200 dark:bg-gray-700'].join(' '),\n  animated:\n    'animate-[pulse_1.5s_ease-in-out_infinite] light:bg-gradient-to-r light:from-gray-200 light:via-gray-300 light:to-gray-200 dark:bg-gradient-to-r dark:from-gray-700 dark:via-gray-600 dark:to-gray-700 bg-[length:200%_100%]',\n  variants: baseTheme.variants\n};\n","import type { FC, PropsWithChildren, ReactNode } from 'react';\nimport React from 'react';\n\nimport { cn, useComponentTheme } from '@/utils';\n\nimport type {\n  NavigationBarDirectionTheme,\n  NavigationTheme\n} from './NavigationTheme';\n\nexport interface NavigationBarProps extends PropsWithChildren {\n  /**\n   * Custom class names for the navigation bar and its sections.\n   */\n  className?: string;\n\n  /**\n   * Custom class names for the top section of the navigation bar.\n   */\n  classNameStart?: string;\n\n  /**\n   * Custom class names for the navigation section.\n   */\n  classNameNavigation?: string;\n\n  /**\n   * Custom class names for the bottom section of the navigation bar.\n   */\n  classNameEnd?: string;\n\n  /**\n   * Direction of the navigation bar layout.\n   * @default 'vertical'\n   */\n  direction?: keyof NavigationBarDirectionTheme;\n\n  /**\n   * Content to be displayed at the start of the navigation bar.\n   */\n  start?: ReactNode;\n\n  /**\n   * Content to be displayed at the end of the navigation bar.\n   */\n  end?: ReactNode;\n\n  /**\n   * Theme overrides for the navigation bar.\n   */\n  theme?: NavigationTheme;\n}\n\nexport const NavigationBar: FC<NavigationBarProps> = ({\n  className,\n  classNameStart,\n  classNameNavigation,\n  classNameEnd,\n  direction = 'vertical',\n  start,\n  end,\n  children,\n  theme\n}) => {\n  const navigationTheme: NavigationTheme = useComponentTheme(\n    'navigation',\n    theme\n  );\n\n  return (\n    <nav\n      role=\"navigation\"\n      className={cn(\n        navigationTheme.bar.base,\n        className,\n        navigationTheme.bar.direction?.[direction]\n      )}\n    >\n      <div className={cn(navigationTheme.bar.start, classNameStart)}>\n        {start}\n      </div>\n      <div\n        className={cn(\n          navigationTheme.bar.navigation,\n          classNameNavigation,\n          navigationTheme.bar.direction?.[direction]\n        )}\n      >\n        {children}\n      </div>\n      <div className={cn(navigationTheme.bar.end, classNameEnd)}>{end}</div>\n    </nav>\n  );\n};\n","import { motion } from 'motion/react';\nimport type { FC, PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport { cn, useComponentTheme } from '@/utils';\n\nimport type {\n  NavigationButtonVariantTheme,\n  NavigationTheme\n} from './NavigationTheme';\n\ninterface NavigationButtonProps extends PropsWithChildren {\n  /**\n   * Custom class names for the navigation button.\n   */\n  className?: string;\n\n  /**\n   * Variant of the navigation button.\n   * @default 'ghost'\n   */\n  variant?: keyof NavigationButtonVariantTheme;\n\n  /**\n   * Indicates if the button is active.\n   */\n  active?: boolean;\n\n  /**\n   * Custom theme for the navigation button.\n   */\n  theme?: NavigationTheme;\n\n  /**\n   * Disables the button, preventing interaction.\n   */\n  disabled?: boolean;\n\n  /**\n   * If false, the animation of the button will be disabled.\n   * @default true\n   */\n  animated?: boolean;\n\n  /**\n   * Unique identifier for the animation layout.\n   */\n  animationLayoutId?: string;\n\n  /**\n   * Callback function to handle click events on the button.\n   */\n  onClick?: () => void;\n}\n\nexport const NavigationButton: FC<NavigationButtonProps> = ({\n  className,\n  active,\n  children,\n  theme,\n  disabled,\n  animated = true,\n  variant = 'ghost',\n  animationLayoutId,\n  onClick\n}) => {\n  const navigationTheme: NavigationTheme = useComponentTheme(\n    'navigation',\n    theme\n  );\n\n  return (\n    <div className={navigationTheme.button.base}>\n      {active && (\n        <motion.div\n          layoutId={\n            !animated ? undefined : (animationLayoutId ?? 'selected-nav-button')\n          }\n          className={navigationTheme.button.variant?.[variant]?.selection}\n        />\n      )}\n      <motion.button\n        disabled={disabled}\n        whileTap={{ scale: disabled || !animated || active ? 1 : 0.9 }}\n        className={cn(\n          navigationTheme.button?.variant?.[variant]?.content,\n          { [navigationTheme.button?.variant?.[variant]?.active]: active },\n          { [navigationTheme.button?.variant?.[variant]?.disabled]: disabled },\n          className\n        )}\n        onClick={onClick}\n      >\n        {children}\n      </motion.button>\n    </div>\n  );\n};\n","export interface NavigationButtonVariantConfigTheme {\n  /** CSS class applied to the button's content wrapper. */\n  content: string;\n  /** CSS class applied when the button is active. */\n  active: string;\n  /** CSS class applied to the button's selection indicator. */\n  selection: string;\n  /** CSS class applied when the button is disabled. */\n  disabled: string;\n}\n\nexport interface NavigationBarDirectionTheme {\n  /** CSS class applied when the navigation bar is laid out horizontally. */\n  horizontal: string;\n  /** CSS class applied when the navigation bar is laid out vertically. */\n  vertical: string;\n}\n\nexport interface NavigationButtonVariantTheme {\n  /** Configuration for the ghost button variant. */\n  ghost: NavigationButtonVariantConfigTheme;\n  /** Configuration for the underline button variant. */\n  underline: NavigationButtonVariantConfigTheme;\n  /** Configuration for any additional custom button variant. */\n  [key: string]: NavigationButtonVariantConfigTheme;\n}\n\nexport interface NavigationTheme {\n  /** Class names for the navigation bar layout slots. */\n  bar: {\n    base: string;\n    direction: NavigationBarDirectionTheme;\n    start: string;\n    navigation: string;\n    end: string;\n  };\n  /** Class names and variant configuration for navigation buttons. */\n  button: {\n    base: string;\n    variant: NavigationButtonVariantTheme;\n  };\n}\n\nexport const navigationTheme: NavigationTheme = {\n  bar: {\n    base: 'flex h-full w-full p-4 border-r gap-4 bg-panel border-panel-accent',\n    direction: {\n      vertical: 'flex-col',\n      horizontal: 'flex-row border-none pb-0'\n    },\n    start: 'pt-4',\n    navigation: 'flex-1 flex flex-col gap-2',\n    end: ''\n  },\n  button: {\n    base: 'group relative',\n    variant: {\n      ghost: {\n        content:\n          'w-full h-full outline-none relative z-10 p-4 rounded-md border border-transparent text-text-secondary hover:text-text-primary hover:bg-panel-accent transition-colors ease-out duration-300',\n        active:\n          'text-text-primary hover:text-text-primary focus-visible:text-text-primary',\n        selection:\n          'absolute z-1 top-0 left-0 w-full h-full rounded-md border border-panel-accent bg-panel-accent hover:border-panel-accent hover:bg-panel-accent focus-visible:border-panel-accent focus-visible:bg-panel-accent',\n        disabled:\n          'opacity-40 cursor-not-allowed font-normal text-text-secondary bg-transparent border-transparent hover:text-text-secondary hover:bg-transparent hover:border-transparent'\n      },\n      underline: {\n        content:\n          'relative z-10 p-4 pb-8 outline-none text-text-secondary hover:text-text-primary focus-visible:text-text-primary transition-colors ease-out duration-300',\n        active:\n          'font-semibold text-text-primary hover:text-text-primary focus-visible:text-text-primary',\n        selection: 'absolute z-1 bottom-0 w-full h-0.5 rounded-md bg-primary',\n        disabled:\n          'opacity-40 cursor-not-allowed font-normal text-text-secondary bg-transparent border-transparent hover:text-text-secondary hover:bg-transparent hover:border-transparent'\n      }\n    }\n  }\n};\n","import { useEffect, useState } from 'react';\n\n/**\n * Creates a global state singleton.\n */\nconst createStateHook = () => {\n  let tooltips: ((setter: boolean, isPopover?: boolean) => boolean)[] = [];\n\n  function addTooltip(newTip: any) {\n    tooltips = [...tooltips, newTip];\n  }\n\n  function deactivateTooltip(tooltip, isPopover?: boolean) {\n    const idx = tooltips.indexOf(tooltip);\n    if (idx > -1) {\n      const tip = tooltips[idx];\n      const shouldRemove = tip(false, isPopover);\n      if (shouldRemove) {\n        tooltips.splice(idx, 1);\n      }\n    }\n  }\n\n  function deactivateAllTooltips(isPopover?: boolean) {\n    const newTooltips = [];\n\n    tooltips.forEach(ref => {\n      const shouldRemvoe = ref(false, isPopover);\n\n      if (!shouldRemvoe) {\n        newTooltips.push(ref);\n      }\n    });\n\n    tooltips = [...newTooltips];\n  }\n\n  return () => {\n    const [state, setState] = useState<any[]>([]);\n\n    useEffect(() => {\n      setState(tooltips);\n    }, []);\n\n    return {\n      tooltips: state,\n      deactivateAllTooltips,\n      deactivateTooltip,\n      addTooltip\n    };\n  };\n};\n\nexport const useTooltipState = createStateHook();\n","import React, {\n  FC,\n  useState,\n  useRef,\n  useEffect,\n  useMemo,\n  useCallback,\n  ReactNode\n} from 'react';\nimport { ConnectedOverlay, TriggerTypes } from '@/utils/Overlay';\nimport { Modifiers, Placement, ReferenceObject } from '@/utils/Position';\nimport { motion, MotionNodeAnimationOptions } from 'motion/react';\nimport {\n  arrow as arrowMiddleware,\n  offset,\n  flip,\n  shift,\n  limitShift\n} from '@floating-ui/react';\nimport { useTooltipState } from './useTooltipState';\nimport { TooltipTheme } from './TooltipTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nconst ARROW_STATIC_SIDE: Record<string, string> = {\n  top: 'bottom',\n  right: 'left',\n  bottom: 'top',\n  left: 'right'\n};\n\nexport interface TooltipProps {\n  /**\n   * Content to wrap.\n   */\n  children?: ReactNode;\n\n  /**\n   * Close on any click.\n   * @default false\n   */\n  closeOnClick?: boolean;\n\n  /**\n   * Close when the body is clicked.\n   * @default true\n   */\n  closeOnBodyClick?: boolean;\n\n  /**\n   * Close when escape key is triggered.\n   * @default true\n   */\n  closeOnEscape?: boolean;\n\n  /**\n   * Content for the tooltip.\n   */\n  content?: any;\n\n  /**\n   * Reference of the tooltip to align to.\n   */\n  reference?: ReferenceObject | HTMLElement | any;\n\n  /**\n   * floating-ui placement.\n   * @default 'top'\n   */\n  placement?: Placement;\n\n  /**\n   * Delay before showing tooltip.\n   * @default 0\n   */\n  enterDelay?: number;\n\n  /**\n   * Delay before closing tooltip.\n   * @default 200\n   */\n  leaveDelay?: number;\n\n  /**\n   * floating-ui modifiers.\n   */\n  modifiers?: Modifiers;\n\n  /**\n   * External setter for visibility.\n   * @default false\n   */\n  visible?: boolean;\n\n  /**\n   * Additional CSS classnames.\n   */\n  className?: string;\n\n  /**\n   * CSS Classname for the tooltip container ( ie. the thing that the tooltip is bound to ).\n   */\n  triggerClassName?: string;\n\n  /**\n   * How the tooltip will be triggered.\n   * @default 'hover'\n   */\n  trigger?: TriggerTypes[] | TriggerTypes;\n\n  /**\n   * Whether the tooltip is disabled.\n   * @default false\n   */\n  disabled?: boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   * Whether the tooltip is animated.\n   * @default true\n   */\n  animated?: boolean;\n\n  /**\n   * Animation configuration for the tooltip.\n   */\n  animation?: MotionNodeAnimationOptions;\n\n  /**\n   * Whether the tooltip should move with the cursor or not.\n   * @default false\n   */\n  followCursor?: boolean;\n\n  /**\n   * Add pointer events or not. Usually not for tooltips.\n   * @default 'none'\n   */\n  pointerEvents?: string;\n\n  /**\n   * Arrow pointing from the tooltip to the trigger element.\n   * Pass `true` to render the default arrow, or a ReactNode to render a custom arrow.\n   */\n  arrow?: boolean | ReactNode;\n\n  /**\n   * Differentiator for popovers to be handled separate from tooltips\n   */\n  isPopover?: boolean;\n\n  /**\n   * Tooltip was opened.\n   */\n  onOpen?(): void;\n\n  /**\n   * Tooltip was closed.\n   */\n  onClose?(): void;\n\n  /**\n   * Theme for the tooltip.\n   */\n  theme?: TooltipTheme;\n}\n\nexport const Tooltip: FC<TooltipProps> = ({\n  className,\n  children,\n  content,\n  triggerClassName,\n  disabled = false,\n  enterDelay = 0,\n  leaveDelay = 200,\n  placement = 'top',\n  trigger = 'hover',\n  animated = true,\n  animation,\n  visible = false,\n  followCursor = false,\n  closeOnClick = false,\n  closeOnEscape = true,\n  closeOnBodyClick = true,\n  pointerEvents = 'none',\n  arrow,\n  modifiers,\n  isPopover,\n  onOpen,\n  onClose,\n  theme: customTheme,\n  ...rest\n}) => {\n  const { addTooltip, deactivateTooltip, deactivateAllTooltips } =\n    useTooltipState();\n\n  const [internalVisible, setInternalVisible] = useState<boolean>(visible);\n  const timeout = useRef<any | null>(null);\n  const mounted = useRef<boolean>(false);\n  const arrowRef = useRef<HTMLDivElement | null>(null);\n  const arrowDataRef = useRef<{\n    x?: number;\n    y?: number;\n    placement: string;\n  } | null>(null);\n\n  const showArrow = !!arrow;\n\n  const effectiveModifiers = useMemo(() => {\n    if (!showArrow) return modifiers;\n    const base = modifiers || [flip(), shift({ limiter: limitShift() })];\n    return [\n      offset(8),\n      ...base,\n      arrowMiddleware({ element: arrowRef, padding: 8 }),\n      {\n        name: 'arrowCapture',\n        fn(state: any) {\n          arrowDataRef.current = {\n            x: state.middlewareData.arrow?.x,\n            y: state.middlewareData.arrow?.y,\n            placement: state.placement\n          };\n          return {};\n        }\n      }\n    ];\n  }, [showArrow, modifiers]);\n\n  const ref = useRef<(setter: boolean, isPop?: boolean) => boolean>(\n    (vis, isPop) => {\n      // Since Popovers use the Tooltip component and they share state, need to differentiate between\n      // Popovers and Tooltips so one does not deactivate the other\n      if (isPop === isPopover) {\n        setInternalVisible(vis);\n      }\n\n      // Return whether the ref's state was updated\n      return isPop === isPopover;\n    }\n  );\n\n  useEffect(() => {\n    // componentDidUpdateLogic style logic\n    if (!mounted.current) {\n      mounted.current = true;\n    } else {\n      setInternalVisible(visible);\n    }\n\n    const curRef = ref.current;\n    const timer = timeout.current;\n    return () => {\n      clearTimeout(timer);\n      deactivateTooltip(curRef, isPopover);\n    };\n  }, [deactivateTooltip, isPopover, visible]);\n\n  const theme: TooltipTheme = useComponentTheme('tooltip', customTheme);\n\n  const renderArrow = useCallback(() => {\n    if (!showArrow) {\n      return null;\n    }\n\n    const data = arrowDataRef.current;\n    const side = data?.placement?.split('-')[0] ?? placement.split('-')[0];\n    const staticSide = ARROW_STATIC_SIDE[side];\n    const arrowSize =\n      arrowRef.current?.offsetWidth ?? arrowRef.current?.offsetHeight ?? 8;\n    const isDefault = arrow === true;\n\n    return (\n      <div\n        ref={arrowRef}\n        className={isDefault ? theme.arrow : undefined}\n        style={{\n          position: 'absolute',\n          visibility: data ? 'visible' : 'hidden',\n          left: data?.x != null ? data.x : '',\n          top: data?.y != null ? data.y : '',\n          [staticSide]: -arrowSize / 2\n        }}\n      >\n        {isDefault ? null : arrow}\n      </div>\n    );\n  }, [showArrow, arrow, placement, theme.arrow]);\n\n  return (\n    <ConnectedOverlay\n      {...rest}\n      placement={placement}\n      trigger={trigger}\n      followCursor={followCursor}\n      triggerClassName={triggerClassName}\n      portalClassName={pointerEvents === 'none' && theme.disablePointer}\n      open={internalVisible}\n      closeOnBodyClick={closeOnBodyClick}\n      closeOnEscape={closeOnEscape}\n      modifiers={effectiveModifiers}\n      content={() => {\n        const contentChildren =\n          typeof content === 'function' ? content() : content;\n\n        if (!contentChildren) {\n          return null;\n        }\n\n        return (\n          <motion.div\n            role={isPopover ? undefined : 'tooltip'}\n            className={cn(theme.base, showArrow && 'relative', className)}\n            {...(animation\n              ? animation\n              : {\n                  transition: { duration: animated ? 0.3 : 0 },\n                  initial: {\n                    opacity: 0,\n                    scale: 0.3,\n                    transition: {\n                      when: 'beforeChildren',\n                      duration: animated ? 0.3 : 0\n                    }\n                  },\n                  animate: {\n                    opacity: 1,\n                    scale: 1,\n                    transition: {\n                      when: 'beforeChildren',\n                      duration: animated ? 0.3 : 0\n                    }\n                  },\n                  exit: {\n                    opacity: 0,\n                    scale: 0.3,\n                    transition: {\n                      when: 'beforeChildren',\n                      duration: animated ? 0.3 : 0\n                    }\n                  }\n                })}\n            onClick={() => {\n              if (closeOnClick) {\n                deactivateAllTooltips(isPopover);\n              }\n            }}\n          >\n            {contentChildren}\n            {renderArrow()}\n          </motion.div>\n        );\n      }}\n      onOpen={() => {\n        if (!internalVisible) {\n          clearTimeout(timeout.current);\n          timeout.current = setTimeout(() => {\n            if (!disabled) {\n              deactivateAllTooltips(isPopover);\n              setInternalVisible(true);\n              addTooltip(ref.current);\n              onOpen?.();\n            }\n          }, enterDelay);\n        }\n      }}\n      onClose={e => {\n        if (\n          e?.nativeEvent?.type !== 'click' ||\n          (e?.nativeEvent?.type === 'click' && closeOnClick)\n        ) {\n          clearTimeout(timeout.current);\n          timeout.current = setTimeout(() => {\n            deactivateTooltip(ref.current, isPopover);\n            onClose?.();\n          }, leaveDelay);\n        }\n      }}\n    >\n      {children}\n    </ConnectedOverlay>\n  );\n};\n","export interface TooltipTheme {\n  /** CSS class applied to the root tooltip container. */\n  base: string;\n  /** CSS class applied to disable pointer events on the tooltip. */\n  disablePointer: string;\n  /** CSS class applied to the tooltip arrow. */\n  arrow?: string;\n}\n\nconst baseTheme: TooltipTheme = {\n  base: 'whitespace-nowrap text-center will-change-[transform,opacity] p-1.5 rounded-sm',\n  disablePointer: 'pointer-events-none',\n  arrow: 'w-2 h-2 rotate-45 bg-inherit'\n};\n\nexport const tooltipTheme: TooltipTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'bg-panel-accent text-text-primary'].join(' ')\n};\n","import React, { FC } from 'react';\nimport { TooltipProps, Tooltip } from '@/layers/Tooltip';\nimport FocusTrap from 'focus-trap-react';\nimport { useId } from '@/utils';\nimport { PopoverTheme } from './PopoverTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\ntype FocusTargetValueOrFalse = HTMLElement | SVGElement | string | false;\n\ntype FocusTargetOrFalse =\n  | FocusTargetValueOrFalse\n  | (() => FocusTargetValueOrFalse);\n\nexport interface PopoverProps extends Partial<Omit<TooltipProps, 'theme'>> {\n  /**\n   * Disable default padding on popover.\n   */\n  disablePadding?: boolean;\n\n  /**\n   * Popover css styles.\n   */\n  popoverStyle?: React.StyleHTMLAttributes<any>;\n\n  /**\n   * Popover classname.\n   */\n  popoverClassName?: string;\n\n  /**\n   * Theme for the Popover.\n   */\n  theme?: PopoverTheme;\n\n  /**\n   * Popover has a focus trap that by default focuses the first element in the tab order.\n   * With this option you can specify a different element to receive that initial focus, or use false for no initially focused element.\n   */\n  autoFocus?: FocusTargetOrFalse | undefined | (() => void);\n}\n\nexport const Popover: FC<PopoverProps> = ({\n  closeOnEscape = true,\n  closeOnBodyClick = true,\n  trigger = 'click',\n  leaveDelay = 200,\n  children,\n  content,\n  className,\n  disablePadding,\n  popoverStyle,\n  popoverClassName,\n  theme: customTheme,\n  autoFocus,\n  ...rest\n}) => {\n  const id = useId();\n  const theme: PopoverTheme = useComponentTheme('popover', customTheme);\n\n  return (\n    <Tooltip\n      {...rest}\n      trigger={trigger}\n      pointerEvents=\"initial\"\n      leaveDelay={leaveDelay}\n      isPopover\n      className={cn(\n        theme.base,\n        disablePadding && theme.disablePadding,\n        className\n      )}\n      content={() => {\n        const isContentFunction = typeof content === 'function';\n        const children = isContentFunction ? content() : content;\n        if (!children) {\n          return null;\n        }\n\n        return (\n          <FocusTrap\n            focusTrapOptions={{\n              escapeDeactivates: true,\n              clickOutsideDeactivates: true,\n              fallbackFocus: `#${id}`,\n              initialFocus: autoFocus\n            }}\n          >\n            <div\n              id={id}\n              tabIndex={-1}\n              style={popoverStyle}\n              className={popoverClassName}\n            >\n              {children}\n            </div>\n          </FocusTrap>\n        );\n      }}\n    >\n      {children}\n    </Tooltip>\n  );\n};\n","export interface PopoverTheme {\n  /** CSS class applied to the root popover container. */\n  base: string;\n  /** CSS class applied when padding is disabled. */\n  disablePadding: string;\n}\n\nconst baseTheme: PopoverTheme = {\n  base: 'whitespace-nowrap text-center will-change-[transform,opacity] p-1.5 rounded-sm',\n  disablePadding: 'p-0'\n};\n\nexport const popoverTheme: PopoverTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'bg-panel text-text-primary'].join(' ')\n};\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\nexport interface DialogContextValue {\n  /**\n   * Callback to close the dialog.\n   */\n  onClose?: () => void;\n\n  /**\n   * Whether to show the close button.\n   */\n  showCloseButton?: boolean;\n\n  /**\n   * Whether padding is disabled.\n   */\n  disablePadding?: boolean;\n\n  /**\n   * ID for the heading element, used for aria-labelledby.\n   */\n  headingId?: string;\n}\n\nexport const DialogContext = createContext<DialogContextValue | null>(null);\n\n/**\n * Hook to access the Dialog context.\n * Must be used within a Dialog component.\n */\nexport const useDialogContext = () => {\n  const context = useContext(DialogContext);\n  if (!context) {\n    throw new Error(\n      'Dialog compound components must be used within a Dialog component'\n    );\n  }\n  return context;\n};\n","'use client';\n\nimport React, { ReactNode, forwardRef, HTMLAttributes } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { DialogTheme } from './DialogTheme';\nimport { useDialogContext } from './DialogContext';\n\nexport interface DialogHeaderProps extends HTMLAttributes<HTMLElement> {\n  /**\n   * The content of the dialog header.\n   */\n  children?: ReactNode;\n\n  /**\n   * The CSS class name for the root element of the component.\n   */\n  className?: string;\n\n  /**\n   * Whether to show the close button in the dialog header.\n   * When used in context, defaults to Dialog's showCloseButton prop.\n   */\n  showCloseButton?: boolean;\n\n  /**\n   * Whether to disable padding for the dialog header.\n   * When used in context, inherits from Dialog's disablePadding prop.\n   */\n  disablePadding?: boolean;\n\n  /**\n   * Callback when the close button is clicked.\n   * When used in context, defaults to Dialog's onClose prop.\n   */\n  onClose?: () => void;\n\n  /**\n   * Theme for the Dialog Header.\n   */\n  theme?: DialogTheme;\n}\n\nexport const DialogHeader = forwardRef<HTMLElement, DialogHeaderProps>(\n  (\n    {\n      children,\n      className,\n      showCloseButton: showCloseButtonProp,\n      disablePadding: disablePaddingProp,\n      onClose: onCloseProp,\n      theme: customTheme,\n      ...props\n    },\n    ref\n  ) => {\n    const theme = useComponentTheme<DialogTheme>('dialog', customTheme);\n    const context = useDialogContext();\n\n    // Use props if provided, otherwise fall back to context values\n    const showCloseButton =\n      showCloseButtonProp ?? context?.showCloseButton ?? true;\n    const disablePadding =\n      disablePaddingProp ?? context?.disablePadding ?? false;\n    const onClose = onCloseProp ?? context?.onClose;\n    const headingId = context?.headingId;\n\n    return (\n      <header\n        ref={ref}\n        className={cn(theme.header.base, disablePadding && 'p-0', className)}\n        {...props}\n      >\n        <div id={headingId} className=\"flex-1\">\n          {typeof children === 'string' ? (\n            <h1 className={theme.header.text}>{children}</h1>\n          ) : (\n            children\n          )}\n        </div>\n        {showCloseButton && onClose && (\n          <button\n            type=\"button\"\n            className={theme.header.closeButton}\n            onClick={onClose}\n            aria-label=\"Close\"\n          >\n            ✕\n          </button>\n        )}\n      </header>\n    );\n  }\n);\n\n// Mark this component as a Dialog slot for detection\nDialogHeader.displayName = 'DialogHeader';\n","'use client';\n\nimport React, { FC, ReactElement, ReactNode, useMemo } from 'react';\nimport { GlobalOverlay, GlobalOverlayProps } from '@/utils/Overlay';\nimport {\n  useId,\n  CloneElement,\n  cn,\n  hasSlotComponents,\n  extractSlots\n} from '@/utils';\nimport FocusTrap from 'focus-trap-react';\nimport {\n  motion,\n  MotionNodeAnimationOptions,\n  MotionProps,\n  TargetAndTransition,\n  Transition,\n  VariantLabels\n} from 'motion/react';\nimport { DialogHeader, DialogHeaderProps } from './DialogHeader';\nimport { DialogContext, DialogContextValue } from './DialogContext';\nimport { useComponentTheme } from '@/utils';\nimport { DialogTheme } from './DialogTheme';\nimport { DialogContent } from './DialogContent';\nimport { DialogFooter } from './DialogFooter';\n\nexport interface DialogProps\n  extends Omit<GlobalOverlayProps, 'children'>, Omit<MotionProps, 'children'> {\n  /**\n   * The CSS class name for the root element of the component.\n   */\n  className?: string;\n\n  /**\n   * The CSS class name for the inner content element of the component.\n   */\n  innerClassName?: string;\n\n  /**\n   * The CSS class name for the content of the component.\n   */\n  contentClassName?: string;\n\n  /**\n   * The size of the dialog. Can be a string or a number.\n   * @default '50%'\n   */\n  size?: string | number;\n\n  /**\n   * Whether to show the close button in the dialog header.\n   * @default true\n   */\n  showCloseButton?: boolean;\n\n  /**\n   * The content of the dialog.\n   * Supports slot-based approach with DialogHeader, DialogContent, and DialogFooter.\n   */\n  children?: ReactNode | (() => ReactNode);\n\n  /**\n   * Whether to disable padding for the dialog content.\n   * @default false\n   */\n  disablePadding?: boolean;\n\n  /**\n   * The footer of the dialog.\n   * @deprecated Use DialogFooter slot component instead.\n   * @example\n   * // Instead of:\n   * <Dialog footer={<Button>Save</Button>}>...</Dialog>\n   *\n   * // Use:\n   * <Dialog>\n   *   <DialogContent>...</DialogContent>\n   *   <DialogFooter><Button>Save</Button></DialogFooter>\n   * </Dialog>\n   */\n  footer?: ReactNode;\n\n  /**\n   * The header of the dialog.\n   * @deprecated Use DialogHeader slot component instead.\n   * @example\n   * // Instead of:\n   * <Dialog header=\"My Title\">...</Dialog>\n   *\n   * // Use:\n   * <Dialog>\n   *   <DialogHeader>My Title</DialogHeader>\n   *   <DialogContent>...</DialogContent>\n   * </Dialog>\n   */\n  header?: ReactNode;\n\n  /**\n   * The React element for the dialog header.\n   * @deprecated Use DialogHeader slot component instead.\n   * @default <DialogHeader />\n   */\n  headerElement?: ReactElement<DialogHeaderProps, typeof DialogHeader> | null;\n\n  /**\n   * Theme for the Dialog.\n   */\n  theme?: DialogTheme;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   */\n  initial?: TargetAndTransition | VariantLabels | boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   */\n  animate?: TargetAndTransition | VariantLabels | boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   */\n  exit?: TargetAndTransition | VariantLabels;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   */\n  transition?: Transition;\n\n  /**\n   * Animation configuration for the dialog.\n   */\n  animation?: MotionNodeAnimationOptions;\n}\n\n// Slot component display names for detection\nconst DIALOG_SLOT_NAMES = ['DialogHeader', 'DialogContent', 'DialogFooter'];\n\nconst DIALOG_SLOT_MAP = {\n  DialogHeader: 'header',\n  DialogContent: 'content',\n  DialogFooter: 'footer'\n} as const;\n\ntype DialogSlots = {\n  header: ReactNode;\n  content: ReactNode;\n  footer: ReactNode;\n};\n\nexport const Dialog: FC<DialogProps> = ({\n  children,\n  open,\n  className,\n  innerClassName,\n  contentClassName,\n  header,\n  headerElement = <DialogHeader />,\n  footer,\n  onClose,\n  size = '50%',\n  disablePadding = false,\n  hasBackdrop = true,\n  showCloseButton = true,\n  closeOnBackdropClick = true,\n  closeOnEscape = true,\n  animation,\n  theme: customTheme,\n  ...rest\n}) => {\n  const id = useId();\n  const theme: DialogTheme = useComponentTheme('dialog', customTheme);\n\n  // Resolve children if it's a function\n  const resolvedChildren =\n    typeof children === 'function' ? children() : children;\n\n  // Detect if using slot-based approach\n  const useSlots = useMemo(\n    () => hasSlotComponents(resolvedChildren, DIALOG_SLOT_NAMES),\n    [resolvedChildren]\n  );\n\n  // Extract slots if using slot-based approach\n  const slots = useMemo(\n    () =>\n      useSlots\n        ? extractSlots<DialogSlots>(resolvedChildren, DIALOG_SLOT_MAP)\n        : null,\n    [useSlots, resolvedChildren]\n  );\n\n  const headingId = `${id}-heading`;\n\n  // Context value for slot components\n  const contextValue: DialogContextValue = useMemo(\n    () => ({\n      onClose,\n      showCloseButton,\n      disablePadding,\n      headingId\n    }),\n    [onClose, showCloseButton, disablePadding, headingId]\n  );\n\n  // Render slot-based content\n  const renderSlotContent = () => (\n    <>\n      {slots?.header}\n      {slots?.content}\n      {slots?.other.length > 0 && slots.other}\n      {slots?.footer}\n    </>\n  );\n\n  // Render legacy props-based content\n  const renderLegacyContent = () => (\n    <>\n      {(header !== undefined || headerElement) && (\n        <CloneElement<DialogHeaderProps>\n          element={headerElement}\n          showCloseButton={showCloseButton}\n          disablePadding={disablePadding}\n          onClose={onClose}\n        >\n          {header}\n        </CloneElement>\n      )}\n      <section\n        id={`${id}-content`}\n        className={cn(theme.content, contentClassName, {\n          'p-[20px]': header === undefined,\n          'pt-0 pb-0 pl-0 pr-0': disablePadding\n        })}\n      >\n        {resolvedChildren}\n      </section>\n      {footer && <footer className={theme.footer}>{footer}</footer>}\n    </>\n  );\n\n  return (\n    <GlobalOverlay\n      open={open}\n      hasBackdrop={hasBackdrop}\n      closeOnEscape={closeOnEscape}\n      closeOnBackdropClick={closeOnBackdropClick}\n      onClose={onClose}\n    >\n      {({ overlayIndex }) => (\n        <FocusTrap\n          focusTrapOptions={{\n            clickOutsideDeactivates: true,\n            escapeDeactivates: true,\n            fallbackFocus: `#${id}-content`\n          }}\n        >\n          <div id={id} tabIndex={-1}>\n            <motion.div\n              role=\"dialog\"\n              aria-modal=\"true\"\n              aria-labelledby={headingId}\n              initial={{ opacity: 0, y: '-20%' }}\n              animate={{ opacity: 1, y: 0 }}\n              exit={{ opacity: 0, y: '20%' }}\n              transition={{ duration: 0.5, ease: [0.04, 0.62, 0.23, 0.98] }}\n              style={{ zIndex: overlayIndex }}\n              className={cn(theme.base, className)}\n              {...(animation ? animation : rest)}\n            >\n              <div\n                className={cn(theme.inner, innerClassName)}\n                style={{ width: size }}\n              >\n                <DialogContext.Provider value={contextValue}>\n                  {useSlots ? renderSlotContent() : renderLegacyContent()}\n                </DialogContext.Provider>\n              </div>\n            </motion.div>\n          </div>\n        </FocusTrap>\n      )}\n    </GlobalOverlay>\n  );\n};\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { Dialog, DialogProps } from './Dialog';\n\ntype DialogOptions =\n  | {\n      open?: boolean;\n      onClose?: () => void;\n    }\n  | undefined;\n\nexport const useDialog = (prop?: DialogOptions) => {\n  const { open, onClose } = prop || {};\n  const [internalOpen, setInternalOpen] = useState<boolean>(open);\n\n  useEffect(() => {\n    setInternalOpen(open);\n  }, [open]);\n\n  const onCloseInternal = useCallback(() => {\n    setInternalOpen(false);\n    onClose?.();\n  }, [onClose]);\n\n  const onToggleOpen = () => {\n    setInternalOpen(!open);\n  };\n\n  const Component = useCallback(\n    (props: Partial<DialogProps>) => (\n      <Dialog {...props} open={internalOpen} onClose={onCloseInternal} />\n    ),\n    [internalOpen, onCloseInternal]\n  );\n\n  return {\n    isOpen: internalOpen,\n    setOpen: setInternalOpen,\n    toggleOpen: onToggleOpen,\n    Dialog: Component\n  };\n};\n","'use client';\n\nimport React, { ReactNode, forwardRef, HTMLAttributes } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { DialogTheme } from './DialogTheme';\nimport { useDialogContext } from './DialogContext';\n\nexport interface DialogContentProps extends HTMLAttributes<HTMLDivElement> {\n  /**\n   * The content to display in the dialog body.\n   */\n  children?: ReactNode;\n\n  /**\n   * Additional CSS class name for the content container.\n   */\n  className?: string;\n\n  /**\n   * Whether to disable padding for the content.\n   * When used in context, inherits from Dialog's disablePadding prop.\n   */\n  disablePadding?: boolean;\n\n  /**\n   * Theme for the Dialog Content.\n   */\n  theme?: DialogTheme;\n}\n\nexport const DialogContent = forwardRef<HTMLDivElement, DialogContentProps>(\n  (\n    {\n      children,\n      className,\n      disablePadding: disablePaddingProp,\n      theme: customTheme,\n      ...props\n    },\n    ref\n  ) => {\n    const theme = useComponentTheme<DialogTheme>('dialog', customTheme);\n    const context = useDialogContext();\n\n    // Use prop if provided, otherwise use context value\n    const disablePadding =\n      disablePaddingProp ?? context?.disablePadding ?? false;\n\n    return (\n      <div\n        ref={ref}\n        className={cn(theme.content, disablePadding && 'p-0', className)}\n        {...props}\n      >\n        {children}\n      </div>\n    );\n  }\n);\n\n// Mark this component as a Dialog slot for detection\nDialogContent.displayName = 'DialogContent';\n","'use client';\n\nimport React, { ReactNode, forwardRef, HTMLAttributes } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { DialogTheme } from './DialogTheme';\n\nexport interface DialogFooterProps extends HTMLAttributes<HTMLElement> {\n  /**\n   * The content to display in the dialog footer.\n   */\n  children?: ReactNode;\n\n  /**\n   * Additional CSS class name for the footer container.\n   */\n  className?: string;\n\n  /**\n   * Theme for the Dialog Footer.\n   */\n  theme?: DialogTheme;\n}\n\nexport const DialogFooter = forwardRef<HTMLElement, DialogFooterProps>(\n  ({ children, className, theme: customTheme, ...props }, ref) => {\n    const theme = useComponentTheme<DialogTheme>('dialog', customTheme);\n\n    return (\n      <footer ref={ref} className={cn(theme.footer, className)} {...props}>\n        {children}\n      </footer>\n    );\n  }\n);\n\n// Mark this component as a Dialog slot for detection\nDialogFooter.displayName = 'DialogFooter';\n","export interface DialogTheme {\n  /** CSS class applied to the root dialog container. */\n  base: string;\n  /** CSS class applied to the dialog's inner panel. */\n  inner: string;\n  /** CSS class applied to the dialog content area. */\n  content: string;\n  /** CSS class applied to the dialog footer. */\n  footer: string;\n  /** CSS classes applied to the dialog header and its parts. */\n  header: {\n    base: string;\n    text: string;\n    closeButton: string;\n  };\n}\n\nconst baseTheme: DialogTheme = {\n  base: 'justify-center items-center flex pointer-events-none top-0 left-0 w-full h-full fixed will-change-transform will-change-opacity',\n  inner:\n    'flex flex-col box-border outline-0 pointer-events-auto overflow-auto max-w-[80vw] max-h-[80vh]',\n  content: 'p-[20px] flex-auto overflow-auto',\n  footer: 'flex p-[20px] pb-[10px]',\n  header: {\n    base: 'flex justify-between pt-[20px] px-[20px] pb-[10px]',\n    text: 'flex-1 m-0 p-0 inline-flex text-3xl font-bold',\n    closeButton:\n      'p-0 m-0 ml-[15px] opacity-80 h-auto w-auto inline-flex bg-none border-none cursor-pointer items-center text-[16px] focus:outline-hidden'\n  }\n};\n\nexport const dialogTheme: DialogTheme = {\n  ...baseTheme,\n  inner: [\n    baseTheme.inner,\n    'bg-panel text-text-primary border border-panel-accent rounded-sm shadow-2xl'\n  ].join(' '),\n  header: {\n    ...baseTheme.header,\n    closeButton: [baseTheme.header.closeButton, 'text-text-primary'].join(' ')\n  }\n};\n","export const variants = {\n  start: {\n    initial: {\n      x: '-100%'\n    },\n    animate: {\n      x: '0%'\n    }\n  },\n  end: {\n    initial: {\n      x: '100%'\n    },\n    animate: {\n      x: '0%'\n    }\n  },\n  top: {\n    initial: {\n      y: '-100%'\n    },\n    animate: {\n      y: '0%'\n    }\n  },\n  bottom: {\n    initial: {\n      y: '100%'\n    },\n    animate: {\n      y: '0%'\n    }\n  }\n};\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\nexport interface DrawerContextValue {\n  /**\n   * Callback to close the drawer.\n   */\n  onClose?: () => void;\n\n  /**\n   * Whether to show the close button.\n   */\n  showCloseButton?: boolean;\n\n  /**\n   * Whether padding is disabled.\n   */\n  disablePadding?: boolean;\n\n  /**\n   * ID for the heading element, used for aria-labelledby.\n   */\n  headingId?: string;\n}\n\nexport const DrawerContext = createContext<DrawerContextValue | null>(null);\n\n/**\n * Hook to access the Drawer context.\n * Must be used within a Drawer component.\n */\nexport const useDrawerContext = () => {\n  const context = useContext(DrawerContext);\n  if (!context) {\n    throw new Error(\n      'Drawer compound components must be used within a Drawer component'\n    );\n  }\n  return context;\n};\n","'use client';\n\nimport React, { ReactNode, forwardRef, HTMLAttributes } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { DrawerTheme } from './DrawerTheme';\nimport { useDrawerContext } from './DrawerContext';\n\nexport interface DrawerHeaderProps extends HTMLAttributes<HTMLElement> {\n  /**\n   * The content of the drawer header.\n   */\n  children?: ReactNode;\n\n  /**\n   * The CSS class name for the root element of the component.\n   */\n  className?: string;\n\n  /**\n   * Whether to show the close button in the drawer header.\n   * When used in context, defaults to Drawer's showCloseButton prop.\n   */\n  showCloseButton?: boolean;\n\n  /**\n   * Callback when the close button is clicked.\n   * When used in context, defaults to Drawer's onClose prop.\n   */\n  onClose?: () => void;\n\n  /**\n   * Theme for the Drawer Header.\n   */\n  theme?: DrawerTheme;\n}\n\nexport const DrawerHeader = forwardRef<HTMLElement, DrawerHeaderProps>(\n  (\n    {\n      children,\n      className,\n      showCloseButton: showCloseButtonProp,\n      onClose: onCloseProp,\n      theme: customTheme,\n      ...props\n    },\n    ref\n  ) => {\n    const theme: DrawerTheme = useComponentTheme('drawer', customTheme);\n    const context = useDrawerContext();\n\n    // Use props if provided, otherwise fall back to context values\n    const showCloseButton =\n      showCloseButtonProp ?? context?.showCloseButton ?? true;\n    const onClose = onCloseProp ?? context?.onClose;\n    const headingId = context?.headingId;\n\n    return (\n      <header ref={ref} className={cn(theme.header.base, className)} {...props}>\n        <div id={headingId} className=\"flex-1\">\n          {typeof children === 'string' ? (\n            <h1 className={theme.header.text}>{children}</h1>\n          ) : (\n            children\n          )}\n        </div>\n        {showCloseButton && onClose && (\n          <button\n            type=\"button\"\n            className={theme.closeButton.base}\n            onClick={onClose}\n            aria-label=\"Close\"\n          >\n            ✕\n          </button>\n        )}\n      </header>\n    );\n  }\n);\n\n// Mark this component as a Drawer slot for detection\nDrawerHeader.displayName = 'DrawerHeader';\n","'use client';\n\nimport React, { FC, ReactElement, ReactNode, useMemo } from 'react';\nimport FocusTrap from 'focus-trap-react';\nimport {\n  useId,\n  CloneElement,\n  hasSlotComponents,\n  extractSlots,\n  useComponentTheme,\n  cn\n} from '@/utils';\nimport { GlobalOverlay, GlobalOverlayProps } from '@/utils/Overlay';\nimport {\n  motion,\n  MotionNodeAnimationOptions,\n  MotionProps,\n  TargetAndTransition,\n  Transition,\n  VariantLabels\n} from 'motion/react';\nimport { variants } from './variants';\nimport { DrawerHeader, DrawerHeaderProps } from './DrawerHeader';\nimport { DrawerContext, DrawerContextValue } from './DrawerContext';\nimport { DrawerTheme } from './DrawerTheme';\nimport { DrawerFooter } from './DrawerFooter';\nimport { DrawerContent } from './DrawerContent';\n\nexport interface DrawerProps\n  extends Omit<GlobalOverlayProps, 'children'>, MotionProps {\n  /**\n   * Position of the drawer.\n   * @default 'end'\n   */\n  position?: 'start' | 'end' | 'top' | 'bottom';\n\n  /**\n   * Size of the drawer.\n   * @default '80%'\n   */\n  size?: string | number;\n\n  /**\n   * CSS class name for the drawer.\n   */\n  className?: string;\n\n  /**\n   * CSS class name for the content of the drawer.\n   */\n  contentClassName?: string;\n\n  /**\n   * CSS class name for the backdrop of the drawer.\n   */\n  backdropClassName?: string;\n\n  /**\n   * Whether to disable padding for the drawer content.\n   * @default false\n   */\n  disablePadding?: boolean;\n\n  /**\n   * The header of the drawer.\n   * @deprecated Use DrawerHeader slot component instead.\n   * @example\n   * // Instead of:\n   * <Drawer header=\"My Title\">...</Drawer>\n   *\n   * // Use:\n   * <Drawer>\n   *   <DrawerHeader>My Title</DrawerHeader>\n   *   <DrawerContent>...</DrawerContent>\n   * </Drawer>\n   */\n  header?: ReactNode;\n\n  /**\n   * Whether to show the close button.\n   * @default true\n   */\n  showCloseButton?: boolean;\n\n  /**\n   * The content of the drawer.\n   * Supports slot-based approach with DrawerHeader, DrawerContent, and DrawerFooter.\n   */\n  children?: ReactNode;\n\n  /**\n   * The React element for the drawer header.\n   * @deprecated Use DrawerHeader slot component instead.\n   * @default <DrawerHeader />\n   */\n  headerElement?: ReactElement<DrawerHeaderProps, typeof DrawerHeader> | null;\n\n  /**\n   * Theme for the Drawer.\n   */\n  theme?: DrawerTheme;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   */\n  initial?: TargetAndTransition | VariantLabels | boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   */\n  animate?: TargetAndTransition | VariantLabels | boolean;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   */\n  exit?: TargetAndTransition | VariantLabels;\n\n  /**\n   * @deprecated Use animation configuration instead.\n   */\n  transition?: Transition;\n\n  /**\n   * Animation configuration for the drawer.\n   */\n  animation?: MotionNodeAnimationOptions;\n}\n\n// Slot component display names for detection\nconst DRAWER_SLOT_NAMES = ['DrawerHeader', 'DrawerContent', 'DrawerFooter'];\nconst DRAWER_SLOT_MAP = {\n  DrawerHeader: 'header',\n  DrawerContent: 'content',\n  DrawerFooter: 'footer'\n} as const;\n\ntype DrawerSlots = {\n  header: ReactNode;\n  content: ReactNode;\n  footer: ReactNode;\n};\n\nexport const Drawer: FC<Partial<DrawerProps>> = ({\n  className,\n  contentClassName,\n  headerElement = <DrawerHeader />,\n  children,\n  open,\n  backdropClassName,\n  header,\n  position = 'end',\n  size = '80%',\n  hasBackdrop = true,\n  closeOnEscape = true,\n  closeOnBackdropClick = true,\n  disablePadding = false,\n  showCloseButton = true,\n  onClose,\n  theme: customTheme,\n  animation,\n  ...rest\n}) => {\n  const id = useId();\n  const variant = variants[position];\n\n  const style = {\n    width: position === 'start' || position === 'end' ? size : 'auto',\n    height: position === 'top' || position === 'bottom' ? size : 'auto'\n  };\n\n  const theme: DrawerTheme = useComponentTheme('drawer', customTheme);\n\n  // Detect if using slot-based approach\n  const useSlots = useMemo(\n    () => hasSlotComponents(children, DRAWER_SLOT_NAMES),\n    [children]\n  );\n\n  // Extract slots if using slot-based approach\n  const slots = useMemo(\n    () =>\n      useSlots\n        ? extractSlots<DrawerSlots>(\n            children,\n            DRAWER_SLOT_MAP as Record<string, keyof DrawerSlots>\n          )\n        : null,\n    [useSlots, children]\n  );\n\n  const headingId = `${id}-heading`;\n\n  // Context value for slot components\n  const contextValue: DrawerContextValue = useMemo(\n    () => ({\n      onClose,\n      showCloseButton,\n      disablePadding,\n      headingId\n    }),\n    [onClose, showCloseButton, disablePadding, headingId]\n  );\n\n  // Render slot-based content\n  const renderSlotContent = () => (\n    <>\n      {slots?.header}\n      {slots?.content}\n      {slots?.other.length > 0 && slots.other}\n      {slots?.footer}\n    </>\n  );\n\n  // Render legacy props-based content\n  const renderLegacyContent = () => (\n    <>\n      {(header !== undefined || headerElement) && (\n        <CloneElement<DrawerHeaderProps>\n          element={headerElement}\n          showCloseButton={showCloseButton}\n          onClose={onClose}\n        >\n          {header}\n        </CloneElement>\n      )}\n      {!header && !headerElement && showCloseButton && (\n        <button\n          type=\"button\"\n          className={cn(theme.closeButton.base, theme.closeButton.headerless)}\n          onClick={onClose}\n          aria-label=\"Close\"\n        >\n          ✕\n        </button>\n      )}\n      <div className={cn(theme.content, contentClassName)}>\n        {typeof children === 'function'\n          ? (children as () => ReactNode)()\n          : children}\n      </div>\n    </>\n  );\n\n  return (\n    <GlobalOverlay\n      open={open}\n      hasBackdrop={hasBackdrop}\n      closeOnEscape={closeOnEscape}\n      closeOnBackdropClick={closeOnBackdropClick}\n      onClose={onClose}\n      backdropClassName={backdropClassName}\n    >\n      {({ overlayIndex }) => (\n        <FocusTrap\n          focusTrapOptions={{\n            clickOutsideDeactivates: true,\n            escapeDeactivates: true,\n            fallbackFocus: `#${id}`\n          }}\n        >\n          <div id={id} tabIndex={-1}>\n            <motion.div\n              role=\"dialog\"\n              aria-modal=\"true\"\n              aria-labelledby={headingId}\n              initial=\"initial\"\n              animate=\"animate\"\n              exit=\"initial\"\n              variants={variant}\n              transition={{\n                duration: 0.5,\n                ease: [0.04, 0.62, 0.23, 0.98],\n                when: 'beforeChildren'\n              }}\n              style={{ ...style, zIndex: overlayIndex }}\n              className={cn(\n                theme.base,\n                theme.positions[position],\n                disablePadding && theme.disablePadding,\n                useSlots && 'flex flex-col',\n                className\n              )}\n              {...(animation ? animation : rest)}\n              onAnimationComplete={() => {\n                // Force a resize event to recalculate the children\n                // This is required for child components that are animated\n                // like the RangeDouble component\n                window.dispatchEvent(new Event('resize'));\n              }}\n            >\n              <DrawerContext.Provider value={contextValue}>\n                {useSlots ? renderSlotContent() : renderLegacyContent()}\n              </DrawerContext.Provider>\n            </motion.div>\n          </div>\n        </FocusTrap>\n      )}\n    </GlobalOverlay>\n  );\n};\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { Drawer, DrawerProps } from './Drawer';\n\ntype DrawerOptions =\n  | {\n      open?: boolean;\n      onClose?: () => void;\n    }\n  | undefined;\n\nexport const useDrawer = (prop?: DrawerOptions) => {\n  const { open, onClose } = prop || {};\n  const [internalOpen, setInternalOpen] = useState<boolean>(open);\n\n  useEffect(() => {\n    setInternalOpen(open);\n  }, [open]);\n\n  const onCloseInternal = useCallback(() => {\n    setInternalOpen(false);\n    onClose?.();\n  }, [onClose]);\n\n  const onToggleOpen = () => {\n    setInternalOpen(!internalOpen);\n  };\n\n  const Component = useCallback(\n    (props: Partial<DrawerProps>) => (\n      <Drawer {...props} open={internalOpen} onClose={onCloseInternal} />\n    ),\n    [internalOpen, onCloseInternal]\n  );\n\n  return {\n    isOpen: internalOpen,\n    setOpen: setInternalOpen,\n    toggleOpen: onToggleOpen,\n    Drawer: Component\n  };\n};\n","'use client';\n\nimport React, { ReactNode, forwardRef, HTMLAttributes } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { DrawerTheme } from './DrawerTheme';\nimport { useDrawerContext } from './DrawerContext';\n\nexport interface DrawerContentProps extends HTMLAttributes<HTMLDivElement> {\n  /**\n   * The content to display in the drawer body.\n   */\n  children?: ReactNode;\n\n  /**\n   * Additional CSS class name for the content container.\n   */\n  className?: string;\n\n  /**\n   * Whether to disable padding for the content.\n   * When used in context, inherits from Drawer's disablePadding prop.\n   */\n  disablePadding?: boolean;\n\n  /**\n   * Theme for the Drawer Content.\n   */\n  theme?: DrawerTheme;\n}\n\nexport const DrawerContent = forwardRef<HTMLDivElement, DrawerContentProps>(\n  (\n    {\n      children,\n      className,\n      disablePadding: disablePaddingProp,\n      theme: customTheme,\n      ...props\n    },\n    ref\n  ) => {\n    const theme = useComponentTheme<DrawerTheme>('drawer', customTheme);\n    const context = useDrawerContext();\n\n    // Use prop if provided, otherwise use context value\n    const disablePadding =\n      disablePaddingProp ?? context?.disablePadding ?? false;\n\n    return (\n      <div\n        ref={ref}\n        className={cn(theme.content, disablePadding && 'p-0', className)}\n        {...props}\n      >\n        {children}\n      </div>\n    );\n  }\n);\n\n// Mark this component as a Drawer slot for detection\nDrawerContent.displayName = 'DrawerContent';\n","'use client';\n\nimport React, { ReactNode, forwardRef, HTMLAttributes } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { DrawerTheme } from './DrawerTheme';\n\nexport interface DrawerFooterProps extends HTMLAttributes<HTMLElement> {\n  /**\n   * The content to display in the drawer footer.\n   */\n  children?: ReactNode;\n\n  /**\n   * Additional CSS class name for the footer container.\n   */\n  className?: string;\n\n  /**\n   * Theme for the Drawer Footer.\n   */\n  theme?: DrawerTheme;\n}\n\nexport const DrawerFooter = forwardRef<HTMLElement, DrawerFooterProps>(\n  ({ children, className, theme: customTheme, ...props }, ref) => {\n    const theme = useComponentTheme<DrawerTheme>('drawer', customTheme);\n\n    return (\n      <footer ref={ref} className={cn(theme.footer, className)} {...props}>\n        {children}\n      </footer>\n    );\n  }\n);\n\n// Mark this component as a Drawer slot for detection\nDrawerFooter.displayName = 'DrawerFooter';\n","export interface DrawerTheme {\n  /** CSS class applied to the root drawer container. */\n  base: string;\n  /** CSS classes applied to the drawer header and its text. */\n  header: {\n    base: string;\n    text: string;\n  };\n  /** CSS class applied to the drawer content area. */\n  content: string;\n  /** CSS class applied to the drawer footer. */\n  footer: string;\n  /** CSS class applied when padding is disabled. */\n  disablePadding: string;\n  /** CSS classes applied to the drawer close button. */\n  closeButton: {\n    base: string;\n    headerless: string;\n  };\n  /** CSS classes applied for each drawer position. */\n  positions: {\n    top: string;\n    end: string;\n    bottom: string;\n    start: string;\n  };\n}\n\nconst baseTheme: DrawerTheme = {\n  base: 'fixed overflow-y-auto overflow-x-hidden',\n  header: {\n    base: 'flex items-center justify-between px-8 py-5 text-3xl font-bold',\n    text: 'flex-1 m-0'\n  },\n  content: 'px-8 py-5 flex-1 overflow-auto',\n  footer: 'flex px-8 py-5 mt-auto',\n  disablePadding: 'p-0',\n  closeButton: {\n    base: 'opacity-80 h-auto w-auto min-w-[auto] min-h-[auto] cursor-pointer text-base p-0 border-0 focus:outline-hidden',\n    headerless: 'absolute right-5 top-5'\n  },\n  positions: {\n    top: 'w-full inset-x-0 top-0',\n    end: 'h-full inset-y-0 right-0',\n    bottom: 'w-full inset-x-0 bottom-0',\n    start: 'h-full inset-y-0 left-0'\n  }\n};\n\nexport const drawerTheme: DrawerTheme = {\n  ...baseTheme,\n  base: [baseTheme.base, 'bg-panel text-text-primary'].join(' ')\n};\n","import React, { FC, ReactNode, useState, useCallback, useEffect } from 'react';\nimport { motion } from 'motion/react';\nimport { ConnectedOverlay, ConnectedOverlayProps } from '@/utils';\nimport { useId } from '@/utils';\nimport FocusTrap from 'focus-trap-react';\nimport creteGlobalStateHook from 'create-global-state-hook';\nimport { ContextMenuTheme } from './ContextMenuTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nconst useGlobalMenuState = creteGlobalStateHook<any[]>([]);\n\nexport interface ContextMenuContentProps {\n  /** Closes the current context menu. */\n  close: () => void;\n  /** Closes all open context menus. */\n  closeAll: () => void;\n}\n\nexport interface ContextMenuProps extends Omit<ConnectedOverlayProps, 'open'> {\n  /**\n   * Child element to trigger the context menu.\n   */\n  children: ReactNode;\n\n  /**\n   * Content to show in the context menu.\n   */\n  content: any | ((args: any) => ReactNode);\n\n  /**\n   * Whether the context menu is disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * Whether the context menu should autofocus on open.\n   * @default true\n   */\n  autofocus?: boolean;\n\n  /**\n   * Whether the context menu should close on click.\n   * @default true\n   */\n  autoClose?: boolean;\n\n  /**\n   * Class name to apply to the trigger element.\n   */\n  triggerClassName?: string;\n\n  /**\n   * Class name to apply to the trigger when the context menu is open.\n   */\n  triggerOpenClassName?: string;\n\n  /**\n   * Theme for the Context Menu.\n   */\n  theme?: ContextMenuTheme;\n}\n\nexport const ContextMenu: FC<ContextMenuProps> = ({\n  children,\n  content,\n  disabled,\n  triggerClassName,\n  triggerOpenClassName,\n  autofocus = true,\n  autoClose = true,\n  theme: customTheme,\n  closeOnEscape = true,\n  closeOnBodyClick = true,\n  ...rest\n}) => {\n  const id = useId();\n  const [menus, setMenus] = useGlobalMenuState();\n  const [open, setOpen] = useState<boolean>(false);\n\n  const onOpen = useCallback(() => {\n    if (!disabled) {\n      menus.forEach(m => m(false));\n      setOpen(true);\n      setMenus([setOpen]);\n    }\n  }, [disabled, setOpen, setMenus, menus]);\n\n  const closeAll = useCallback(() => {\n    setOpen(false);\n    setMenus([]);\n  }, [setOpen, setMenus]);\n\n  const close = useCallback(() => {\n    setOpen(false);\n    setMenus(menus.filter(m => m !== setOpen));\n  }, [menus, setMenus]);\n\n  const onClose = useCallback(() => {\n    closeAll();\n  }, [closeAll]);\n\n  useEffect(() => {\n    if (open) {\n      closeAll();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [closeAll]);\n  const theme: ContextMenuTheme = useComponentTheme('contextMenu', customTheme);\n\n  return (\n    <ConnectedOverlay\n      placement=\"bottom-start\"\n      triggerElement=\"span\"\n      closeOnEscape={closeOnEscape}\n      closeOnBodyClick={closeOnBodyClick}\n      {...rest}\n      triggerClassName={cn(\n        triggerClassName,\n        !disabled && theme.enabled,\n        open && triggerOpenClassName\n      )}\n      trigger=\"contextmenu\"\n      open={open}\n      content={() => (\n        <motion.div\n          initial={{ opacity: 0, y: -25 }}\n          animate={{ opacity: 1, y: 0 }}\n          exit={{ opacity: 0, y: -25 }}\n          onClick={() => autoClose && onClose?.()}\n        >\n          {autofocus ? (\n            <FocusTrap\n              focusTrapOptions={{\n                escapeDeactivates: true,\n                clickOutsideDeactivates: true,\n                fallbackFocus: `#${id}`\n              }}\n            >\n              <div id={id} tabIndex={-1}>\n                {typeof content === 'function'\n                  ? content({ closeAll, close })\n                  : content}\n              </div>\n            </FocusTrap>\n          ) : (\n            <>\n              {typeof content === 'function'\n                ? content({ closeAll, close })\n                : content}\n            </>\n          )}\n        </motion.div>\n      )}\n      onOpen={onOpen}\n      onClose={onClose}\n    >\n      {children}\n    </ConnectedOverlay>\n  );\n};\n","export interface ContextMenuTheme {\n  /** CSS class applied to the trigger when the context menu is enabled. */\n  enabled: string;\n}\n\nconst baseTheme: ContextMenuTheme = {\n  enabled: 'cursor-context-menu'\n};\n\nexport const contextMenuTheme: ContextMenuTheme = {\n  ...baseTheme\n};\n","import React, { FC, ReactNode, useCallback, useEffect, useRef } from 'react';\nimport { NotificationOptions } from './NotificationsContext';\nimport { motion } from 'motion/react';\nimport { NotificationTheme } from './NotificationTheme';\nimport { cn, useComponentTheme } from '@/utils';\n\nexport interface NotificationProps extends NotificationOptions {\n  /**\n   * Unique identifier for the notification.\n   */\n  id: number;\n\n  /**\n   * Component to render as the notification.\n   */\n  component?: ReactNode;\n\n  /**\n   * Callback to close the notification.\n   */\n  onClose: (id: number) => void;\n\n  /**\n   * Theme for the Notification.\n   */\n  theme?: NotificationTheme;\n}\n\nexport const Notification: FC<NotificationProps> = ({\n  id,\n  title,\n  showClose,\n  body,\n  timeout,\n  className,\n  variant,\n  icon,\n  action,\n  component,\n  onClose,\n  theme: customTheme\n}) => {\n  const timeoutRef = useRef<any | null>(null);\n\n  const clearTimer = useCallback(() => clearTimeout(timeoutRef.current), []);\n\n  const startTimer = useCallback(() => {\n    clearTimer();\n    timeoutRef.current = setTimeout(() => onClose?.(id), timeout);\n  }, [id, timeout, onClose, clearTimer]);\n\n  useEffect(() => {\n    startTimer();\n    return () => clearTimer();\n  }, [clearTimer, startTimer]);\n\n  const theme: NotificationTheme = useComponentTheme(\n    'notification',\n    customTheme\n  );\n\n  return (\n    <motion.div\n      layout\n      initial={{ opacity: 0, y: 50, scale: 0.5 }}\n      animate={{ opacity: 1, y: 0, scale: 1 }}\n      exit={{ opacity: 0, scale: 0.5, transition: { duration: 0.2 } }}\n      onMouseEnter={clearTimer}\n      onMouseLeave={startTimer}\n    >\n      {component}\n      {!component && (\n        <div\n          role=\"alert\"\n          aria-live=\"assertive\"\n          className={cn(\n            theme.notification?.base,\n            theme.notification?.variants?.[variant]?.base,\n            className\n          )}\n        >\n          <div className={theme.notification?.content}>\n            {title && (\n              <div className={theme.notification.header}>\n                {icon && (\n                  <div\n                    className={theme.notification?.variants?.[variant]?.icon}\n                  >\n                    {icon}\n                  </div>\n                )}\n                {title}\n              </div>\n            )}\n            {body && (\n              <div className={theme.notification.body}>\n                {typeof body === 'string' ? (\n                  <span dangerouslySetInnerHTML={{ __html: body } as any} />\n                ) : (\n                  body\n                )}\n              </div>\n            )}\n          </div>\n          {action && <div className={theme.notification.action}>{action}</div>}\n          <div className={theme.notification?.closeContainer}>\n            {showClose && (\n              <button\n                type=\"button\"\n                className={theme.notification?.closeButton}\n                onClick={() => onClose?.(id)}\n                aria-label=\"Close\"\n              >\n                ✕\n              </button>\n            )}\n          </div>\n        </div>\n      )}\n    </motion.div>\n  );\n};\n","import React, { createContext } from 'react';\n\nexport type NotificationVariants =\n  | 'default'\n  | 'success'\n  | 'warning'\n  | 'error'\n  | 'info';\n\nexport interface NotificationOptions {\n  /** Title of the notification. */\n  title?: string | React.JSX.Element | React.JSX.Element[];\n  /** Body content of the notification. */\n  body?: string | React.JSX.Element | React.JSX.Element[];\n  /** Time in milliseconds before the notification auto-dismisses. */\n  timeout?: number;\n  /** Whether to show the close button. */\n  showClose?: boolean;\n  /** Variant style of the notification. */\n  variant?: NotificationVariants;\n  /** Additional class name applied to the notification. */\n  className?: string;\n  /** Icon displayed in the notification. */\n  icon?: string | React.JSX.Element | React.JSX.Element[];\n  /** Action content displayed in the notification. */\n  action?: string | React.JSX.Element | React.JSX.Element[];\n}\n\nexport interface NotificationsContextValue {\n  /**\n   * Create a new notification.\n   */\n  notify(title: string, options?: NotificationOptions): void;\n\n  /**\n   * Create a new error notification.\n   */\n  notifyError(title: string, options?: NotificationOptions): void;\n\n  /**\n   * Create a warning notification.\n   */\n  notifyWarning(title: string, options?: NotificationOptions): void;\n\n  /**\n   * Create a success notification.\n   */\n  notifySuccess(title: string, options?: NotificationOptions): void;\n\n  /**\n   * Create an info notification.\n   */\n  notifyInfo(title: string, options?: NotificationOptions): void;\n\n  /**\n   * Clear a specific notification.\n   */\n  clearNotification(id: number): void;\n\n  /**\n   * Clear all notifications.\n   */\n  clearAllNotifications(): void;\n}\n\nexport const NotificationsContext = createContext<NotificationsContextValue>({\n  notify: () => undefined,\n  notifyError: () => undefined,\n  notifyWarning: () => undefined,\n  notifySuccess: () => undefined,\n  notifyInfo: () => undefined,\n  clearNotification: () => undefined,\n  clearAllNotifications: () => undefined\n});\n","import * as React from \"react\";\nconst SvgInfo = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_241_649)\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M7.33331 4.66671H8.66665V6.00004H7.33331V4.66671ZM7.33331 7.33337H8.66665V11.3334H7.33331V7.33337ZM7.99998 1.33337C4.31998 1.33337 1.33331 4.32004 1.33331 8.00004C1.33331 11.68 4.31998 14.6667 7.99998 14.6667C11.68 14.6667 14.6666 11.68 14.6666 8.00004C14.6666 4.32004 11.68 1.33337 7.99998 1.33337ZM7.99998 13.3334C5.05998 13.3334 2.66665 10.94 2.66665 8.00004C2.66665 5.06004 5.05998 2.66671 7.99998 2.66671C10.94 2.66671 13.3333 5.06004 13.3333 8.00004C13.3333 10.94 10.94 13.3334 7.99998 13.3334Z\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_241_649\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 16, height: 16, fill: \"white\" }))));\nexport default SvgInfo;\n","import * as React from \"react\";\nconst SvgCheckCircle = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M7.99998 1.33337C4.31998 1.33337 1.33331 4.32004 1.33331 8.00004C1.33331 11.68 4.31998 14.6667 7.99998 14.6667C11.68 14.6667 14.6666 11.68 14.6666 8.00004C14.6666 4.32004 11.68 1.33337 7.99998 1.33337ZM7.99998 13.3334C5.05998 13.3334 2.66665 10.94 2.66665 8.00004C2.66665 5.06004 5.05998 2.66671 7.99998 2.66671C10.94 2.66671 13.3333 5.06004 13.3333 8.00004C13.3333 10.94 10.94 13.3334 7.99998 13.3334ZM11.06 5.05337L6.66665 9.44671L4.93998 7.72671L3.99998 8.66671L6.66665 11.3334L12 6.00004L11.06 5.05337Z\" }));\nexport default SvgCheckCircle;\n","import * as React from \"react\";\nconst SvgWarning = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8.00002 4.32663L13.02 13H2.98002L8.00002 4.32663ZM8.00002 1.66663L0.666687 14.3333H15.3334L8.00002 1.66663ZM8.66669 11H7.33335V12.3333H8.66669V11ZM8.66669 6.99996H7.33335V9.66663H8.66669V6.99996Z\" }));\nexport default SvgWarning;\n","import * as React from \"react\";\nconst SvgErrorCircle = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M9.72665 5.33337L7.99998 7.06004L6.27331 5.33337L5.33331 6.27337L7.05998 8.00004L5.33331 9.72671L6.27331 10.6667L7.99998 8.94004L9.72665 10.6667L10.6666 9.72671L8.93998 8.00004L10.6666 6.27337L9.72665 5.33337ZM7.99998 1.33337C4.31331 1.33337 1.33331 4.31337 1.33331 8.00004C1.33331 11.6867 4.31331 14.6667 7.99998 14.6667C11.6866 14.6667 14.6666 11.6867 14.6666 8.00004C14.6666 4.31337 11.6866 1.33337 7.99998 1.33337ZM7.99998 13.3334C5.05998 13.3334 2.66665 10.94 2.66665 8.00004C2.66665 5.06004 5.05998 2.66671 7.99998 2.66671C10.94 2.66671 13.3333 5.06004 13.3333 8.00004C13.3333 10.94 10.94 13.3334 7.99998 13.3334Z\" }));\nexport default SvgErrorCircle;\n","import React, {\n  Fragment,\n  FC,\n  ReactNode,\n  useState,\n  useCallback,\n  useMemo,\n  JSXElementConstructor\n} from 'react';\nimport { AnimatePresence, motion } from 'motion/react';\nimport { Notification } from './Notification';\nimport {\n  NotificationOptions,\n  NotificationsContext,\n  NotificationVariants\n} from './NotificationsContext';\nimport { NotificationTheme } from './NotificationTheme';\nimport { cn, useComponentTheme } from '@/utils';\nimport InfoIcon from '@/assets/icons/info.svg?react';\nimport CheckCircleIcon from '@/assets/icons/check_circle.svg?react';\nimport WarningIcon from '@/assets/icons/warning.svg?react';\nimport ErrorCircleIcon from '@/assets/icons/error_circle.svg?react';\n\nexport interface NotificationComponentProps {\n  /** Message text to display in the notification. */\n  message: string;\n  /** Variant style of the notification. */\n  variant: NotificationVariants;\n  /** Called when the notification is closed. */\n  onClose?: () => void;\n}\n\nexport interface NotificationsProps {\n  /**\n   * @default 10\n   */\n  limit?: number;\n  /**\n   * @default 4000\n   */\n  timeout?: number;\n  /**\n   * @default true\n   */\n  showClose?: boolean;\n  /**\n   * @default true\n   */\n  preventFlooding?: boolean;\n  /** Children rendered inside the notifications provider. */\n  children?: ReactNode;\n  /** Additional class name applied to each notification. */\n  className?: string;\n  /** Custom notification components keyed by variant. */\n  components?: {\n    [variant in NotificationVariants]?: JSXElementConstructor<NotificationComponentProps>;\n  };\n  /**\n   * @default {\n   *   default: <InfoIcon />,\n   *   success: <CheckCircleIcon />,\n   *   warning: <WarningIcon />,\n   *   error: <ErrorCircleIcon />,\n   *   info: <InfoIcon />\n   * }\n   */\n  icons?: {\n    [variant in NotificationVariants]?:\n      | string\n      | React.JSX.Element\n      | React.JSX.Element[];\n  };\n  /** Theme for the notifications. */\n  theme?: NotificationTheme;\n}\n\n// Hacky way to track unique versions of a notification\nlet nextId = 0;\n\nexport const Notifications: FC<NotificationsProps> = ({\n  children,\n  limit = 10,\n  timeout = 4000,\n  showClose = true,\n  className,\n  preventFlooding = true,\n  components,\n  icons = {\n    default: <InfoIcon />,\n    success: <CheckCircleIcon />,\n    warning: <WarningIcon />,\n    error: <ErrorCircleIcon />,\n    info: <InfoIcon />\n  },\n  theme: customTheme\n}) => {\n  const [notifications, setNotifications] = useState<any[]>([]);\n\n  const clearNotification = useCallback(\n    (id: number) => setNotifications(notifications.filter(n => n.id !== id)),\n    [notifications]\n  );\n\n  const clearAllNotifications = useCallback(() => setNotifications([]), []);\n\n  const notify = useCallback(\n    (title: string, options: NotificationOptions = {}) => {\n      setNotifications(notifications => {\n        // If we are flooded with the same message over and over,\n        // don't add more of the same type. Mainly used for error use cases.\n        if (preventFlooding && notifications.find(n => n.title === title)) {\n          return notifications;\n        }\n\n        const id = nextId++;\n\n        const obj = {\n          title,\n          id,\n          variant: 'default',\n          timeout,\n          icon: icons?.default,\n          showClose,\n          ...options\n        };\n\n        const sorted = [obj, ...notifications];\n\n        // Clear old notifications if we hit limit\n        if (sorted.length > limit) {\n          sorted.pop();\n        }\n\n        return sorted;\n      });\n    },\n    [icons?.default, limit, preventFlooding, showClose, timeout]\n  );\n\n  const notifyError = useCallback(\n    (title: string, options: NotificationOptions = {}) =>\n      notify(title, {\n        variant: 'error',\n        icon: icons?.error,\n        ...options\n      }),\n    [icons?.error, notify]\n  );\n\n  const notifyWarning = useCallback(\n    (title: string, options: NotificationOptions = {}) =>\n      notify(title, { variant: 'warning', icon: icons?.warning, ...options }),\n    [icons?.warning, notify]\n  );\n\n  const notifySuccess = useCallback(\n    (title: string, options: NotificationOptions = {}) =>\n      notify(title, {\n        variant: 'success',\n        icon: icons?.success,\n        ...options\n      }),\n    [icons?.success, notify]\n  );\n\n  const notifyInfo = useCallback(\n    (title: string, options: NotificationOptions = {}) =>\n      notify(title, { variant: 'info', icon: icons?.info, ...options }),\n    [icons?.info, notify]\n  );\n\n  const values = useMemo(\n    () => ({\n      notify,\n      notifyError,\n      notifyWarning,\n      notifySuccess,\n      notifyInfo,\n      clearNotification,\n      clearAllNotifications\n    }),\n    [\n      clearNotification,\n      clearAllNotifications,\n      notify,\n      notifyError,\n      notifySuccess,\n      notifyWarning,\n      notifyInfo\n    ]\n  );\n\n  const theme: NotificationTheme = useComponentTheme(\n    'notification',\n    customTheme\n  );\n\n  return (\n    <Fragment>\n      <NotificationsContext.Provider value={values}>\n        {children}\n      </NotificationsContext.Provider>\n      <div className={theme.container}>\n        <div className={theme.positions}>\n          <AnimatePresence>\n            {!!notifications.length && (\n              <motion.div\n                initial={{ opacity: 0 }}\n                animate={{ opacity: 1 }}\n                exit={{ opacity: 0 }}\n              >\n                {notifications.map(n => {\n                  if (components?.[n.variant]) {\n                    const CustomNotification = components?.[n.variant];\n                    return (\n                      <Notification\n                        {...n}\n                        component={\n                          <CustomNotification\n                            message={n.title}\n                            variant={n.variant}\n                            onClose={() => clearNotification(n.id)}\n                          />\n                        }\n                        showClose={false}\n                        key={n.id}\n                        onClose={clearNotification}\n                      />\n                    );\n                  }\n\n                  return (\n                    <Notification\n                      {...n}\n                      key={n.id}\n                      className={cn(className, n.className)}\n                      onClose={clearNotification}\n                    />\n                  );\n                })}\n              </motion.div>\n            )}\n          </AnimatePresence>\n        </div>\n      </div>\n    </Fragment>\n  );\n};\n","import { useContext } from 'react';\nimport { NotificationsContext } from './NotificationsContext';\n\nexport const useNotification = () => {\n  const context = useContext(NotificationsContext);\n\n  if (context === undefined) {\n    throw new Error(\n      '`useNotification` hook must be used within a `NotificationsContext` component'\n    );\n  }\n\n  return context;\n};\n","export interface NotificationTheme {\n  /** CSS class applied to the notifications container. */\n  container: string;\n  /** CSS class controlling notification stack positioning. */\n  positions: string;\n  /** CSS classes applied to an individual notification and its parts. */\n  notification: {\n    base: string;\n    variants: {\n      success: {\n        base: string;\n        icon?: string;\n      };\n      error: {\n        base: string;\n        icon?: string;\n      };\n      warning: {\n        base: string;\n        icon?: string;\n      };\n      info: {\n        base: string;\n        icon?: string;\n      };\n    };\n    header: string;\n    content: string;\n    body: string;\n    closeContainer: string;\n    action: string;\n    closeButton: string;\n  };\n}\n\nconst baseTheme: NotificationTheme = {\n  container: '',\n  positions:\n    'fixed z-9998 h-auto -translate-x-2/4 mb-1 px-24 py-0 left-2/4 bottom-0',\n  notification: {\n    base: 'flex relative text-base min-w-[400px] rounded-xs mb-2.5 py-2 px-4',\n    variants: {\n      success: {\n        base: 'bg-success-background border border-success',\n        icon: 'text-success h-4 w-4'\n      },\n      error: {\n        base: 'bg-error-background border border-error',\n        icon: 'text-error h-4 w-4'\n      },\n      warning: {\n        base: 'bg-warning-background border border-warning',\n        icon: 'text-warning h-4 w-4'\n      },\n      info: {\n        base: 'bg-info-background border border-info',\n        icon: 'text-info h-4 w-4'\n      }\n    },\n    content: 'inline-flex items-start flex-1 flex-col justify-center',\n    header: 'text-base flex gap-2 items-center',\n    closeContainer: 'inline-flex items-center',\n    action: 'ml-auto mr-2 items-center flex',\n    closeButton:\n      'cursor-pointer text-sm font-semibold m-0 border-0 text-text-primary hover:text-text-primary/70',\n    body: 'opacity-70 text-sm mt-1'\n  }\n};\n\nexport const notificationTheme: NotificationTheme = {\n  ...baseTheme,\n  notification: {\n    ...baseTheme.notification,\n    base: [\n      baseTheme.notification.base,\n      'bg-panel text-text-primary border-panel-accent border'\n    ].join(' ')\n  }\n};\n","import React, { FC, ReactNode } from 'react';\nimport { cn, useComponentTheme } from '@/utils';\nimport { CalloutTheme } from './CalloutTheme';\n\nexport interface CalloutProps {\n  /**\n   * The text of the callout.\n   */\n  text: string | ReactNode;\n\n  /**\n   * The icon of the callout.\n   */\n  icon?: ReactNode;\n\n  /**\n   * The variant of the callout.\n   * @default 'default'\n   */\n  variant?: 'default' | 'success' | 'error' | 'warning' | 'info';\n\n  /**\n   * The theme of the callout.\n   */\n  theme?: CalloutTheme;\n}\n\nexport const Callout: FC<CalloutProps> = ({\n  text,\n  icon,\n  variant = 'default',\n  theme: customTheme\n}) => {\n  const theme = useComponentTheme('callout', customTheme);\n\n  return (\n    <div className={cn(theme.base.common, theme.base.variant[variant])}>\n      {icon && (\n        <div className={cn(theme.icon.common, theme.icon.variant[variant])}>\n          {icon}\n        </div>\n      )}\n      <div className={theme.text}>{text}</div>\n    </div>\n  );\n};\n","export interface CalloutTheme {\n  /** CSS classes applied to the root callout container, including per-variant styles. */\n  base: {\n    common: string;\n    variant: {\n      default: string;\n      success: string;\n      error: string;\n      warning: string;\n      info: string;\n      [key: string]: string;\n    };\n  };\n  /** CSS classes applied to the callout icon, including per-variant styles. */\n  icon: {\n    common: string;\n    variant: {\n      default: string;\n      success: string;\n      error: string;\n      warning: string;\n      info: string;\n      [key: string]: string;\n    };\n  };\n  /** CSS class applied to the callout text content. */\n  text: string;\n}\n\nexport const calloutTheme: CalloutTheme = {\n  base: {\n    common: 'flex items-center gap-2.5 px-4 py-3 border-b',\n    variant: {\n      default: 'bg-panel-background border-panel-accent',\n      success: 'bg-success-background border-success',\n      error: 'bg-error-background border-error',\n      warning: 'bg-warning-background border-warning',\n      info: 'bg-info-background border-info'\n    }\n  },\n  icon: {\n    common: '',\n    variant: {\n      default: '',\n      success: 'text-success',\n      error: 'text-error',\n      warning: 'text-warning',\n      info: 'text-info'\n    }\n  },\n  text: 'text-base'\n};\n","import React, { FC } from 'react';\nimport { Callout, CalloutProps } from './Callout';\n\nimport CheckCircleIcon from '@/assets/icons/check_circle.svg?react';\n\nexport const SuccessCallout: FC<CalloutProps> = ({ icon, ...rest }) => (\n  <Callout icon={icon ?? <CheckCircleIcon />} variant=\"success\" {...rest} />\n);\n","import React, { FC } from 'react';\nimport { Callout, CalloutProps } from './Callout';\n\nimport ErrorCircleIcon from '@/assets/icons/error_circle.svg?react';\n\nexport const ErrorCallout: FC<CalloutProps> = ({ icon, ...rest }) => (\n  <Callout icon={icon ?? <ErrorCircleIcon />} variant=\"error\" {...rest} />\n);\n","import React, { FC } from 'react';\nimport { Callout, CalloutProps } from './Callout';\n\nimport WarningIcon from '@/assets/icons/warning.svg?react';\n\nexport const WarningCallout: FC<CalloutProps> = ({ icon, ...rest }) => (\n  <Callout icon={icon ?? <WarningIcon />} variant=\"warning\" {...rest} />\n);\n","import React, { FC } from 'react';\nimport { Callout, CalloutProps } from './Callout';\n\nimport InfoIcon from '@/assets/icons/info.svg?react';\n\nexport const InfoCallout: FC<CalloutProps> = ({ icon, ...rest }) => (\n  <Callout icon={icon ?? <InfoIcon />} variant=\"info\" {...rest} />\n);\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\nexport interface ConfirmDialogContextValue {\n  /**\n   * Whether the confirm action is currently pending.\n   */\n  isLoading: boolean;\n\n  /**\n   * Wrapped confirm handler. Awaits the user's `onConfirm` and toggles\n   * the loading state automatically when it returns a Promise. Returns a\n   * Promise so callers can await completion.\n   */\n  onConfirm: () => void | Promise<void>;\n\n  /**\n   * Wrapped cancel handler. Suppressed while the confirm action is pending.\n   */\n  onCancel: () => void;\n\n  /**\n   * The visual variant of the dialog.\n   */\n  variant: 'default' | 'destructive';\n\n  /**\n   * Whether the confirm button should be disabled (separate from loading).\n   */\n  confirmDisabled: boolean;\n\n  /**\n   * The label for the confirm button.\n   */\n  confirmLabel: string;\n\n  /**\n   * The label for the cancel button.\n   */\n  cancelLabel: string;\n}\n\nexport const ConfirmDialogContext =\n  createContext<ConfirmDialogContextValue | null>(null);\n\n/**\n * Hook to access the ConfirmDialog context.\n * Must be used within a ConfirmDialog component.\n */\nexport const useConfirmDialogContext = () => {\n  const context = useContext(ConfirmDialogContext);\n  if (!context) {\n    throw new Error(\n      'ConfirmDialog compound components must be used within a ConfirmDialog component'\n    );\n  }\n  return context;\n};\n","// ConfirmDialog.tsx\nimport React, {\n  ReactElement,\n  ReactNode,\n  useCallback,\n  useMemo,\n  useRef,\n  useState\n} from 'react';\nimport {\n  Dialog,\n  DialogContent,\n  DialogFooter,\n  DialogHeader\n} from '@/layers/Dialog';\nimport { Button } from '@/elements/Button';\nimport { DotsLoader } from '@/elements/Loader';\nimport { hasSlotComponents, isPromiseLike } from '@/utils';\nimport {\n  ConfirmDialogContext,\n  ConfirmDialogContextValue\n} from './ConfirmDialogContext';\nimport { ConfirmDialogActionsProps } from './ConfirmDialogActions';\n\nexport interface ConfirmDialogProps {\n  /**\n   * Whether the dialog is open or not\n   */\n  open: boolean;\n\n  /**\n   * The header of the dialog\n   */\n  header: string | ReactNode;\n\n  /**\n   * The content of the dialog\n   */\n  content: string | ReactNode;\n\n  /**\n   * The label for the confirm button\n   * @default 'Confirm'\n   */\n  confirmLabel?: string;\n\n  /**\n   * The label for the cancel button\n   * @default 'Cancel'\n   */\n  cancelLabel?: string;\n\n  /**\n   * Callback when the confirm button is clicked. May return a Promise;\n   * while it is pending the dialog shows a loading state and disables\n   * its action buttons.\n   */\n  onConfirm?: () => void | Promise<void>;\n\n  /**\n   * Callback when the cancel button is clicked\n   */\n  onCancel?: () => void;\n\n  /**\n   * The visual variant of the dialog. Use `destructive` for actions like delete.\n   * @default 'default'\n   */\n  variant?: 'default' | 'destructive';\n\n  /**\n   * Controlled loading state for the confirm action. When provided, takes\n   * precedence over the dialog's internal async tracking — use this when\n   * the loading state lives outside the dialog (e.g. driven by a mutation\n   * hook). When omitted, the dialog automatically enters the loading state\n   * if `onConfirm` returns a Promise.\n   */\n  loading?: boolean;\n\n  /**\n   * Whether the confirm button is disabled.\n   */\n  confirmDisabled?: boolean;\n\n  /**\n   * Optional slot children. Pass a `<ConfirmDialogActions>` element to\n   * replace the default Confirm/Cancel buttons. Action children can read\n   * the managed state via `useConfirmDialogContext()`. Other React nodes\n   * are not rendered — use `header`/`content` props for those.\n   */\n  children?: ReactElement<ConfirmDialogActionsProps>;\n}\n\nconst VARIANT_COLORS: Record<\n  NonNullable<ConfirmDialogProps['variant']>,\n  'primary' | 'error'\n> = {\n  default: 'primary',\n  destructive: 'error'\n};\n\nconst CONFIRM_DIALOG_SLOT_NAMES = ['ConfirmDialogActions'];\n\nexport const ConfirmDialog: React.FC<ConfirmDialogProps> = ({\n  open,\n  header,\n  content,\n  confirmLabel = 'Confirm',\n  cancelLabel = 'Cancel',\n  onConfirm,\n  onCancel,\n  variant = 'default',\n  loading,\n  confirmDisabled = false,\n  children\n}) => {\n  const [internalLoading, setInternalLoading] = useState(false);\n  const isLoading = loading ?? internalLoading;\n\n  // Ref mirrors isLoading so the re-entry guard sees the latest value\n  // without forcing handleConfirm to re-create on every state change.\n  const isLoadingRef = useRef(isLoading);\n  isLoadingRef.current = isLoading;\n\n  const handleConfirm = useCallback(async () => {\n    if (isLoadingRef.current || !onConfirm) {\n      return;\n    }\n\n    const result = onConfirm();\n    if (isPromiseLike(result)) {\n      const manageInternal = loading === undefined;\n      if (manageInternal) {\n        setInternalLoading(true);\n      }\n      try {\n        await result;\n      } finally {\n        if (manageInternal) {\n          setInternalLoading(false);\n        }\n      }\n    }\n  }, [onConfirm, loading]);\n\n  const handleCancel = useCallback(() => {\n    if (isLoading) {\n      return;\n    }\n    onCancel?.();\n  }, [isLoading, onCancel]);\n\n  const contextValue = useMemo<ConfirmDialogContextValue>(\n    () => ({\n      isLoading,\n      onConfirm: handleConfirm,\n      onCancel: handleCancel,\n      variant,\n      confirmDisabled,\n      confirmLabel,\n      cancelLabel\n    }),\n    [\n      isLoading,\n      handleConfirm,\n      handleCancel,\n      variant,\n      confirmDisabled,\n      confirmLabel,\n      cancelLabel\n    ]\n  );\n\n  const hasActionsSlot = useMemo(\n    () => hasSlotComponents(children, CONFIRM_DIALOG_SLOT_NAMES),\n    [children]\n  );\n\n  return (\n    <Dialog open={open} onClose={handleCancel}>\n      <DialogHeader>{header}</DialogHeader>\n      <DialogContent>{content}</DialogContent>\n      <ConfirmDialogContext.Provider value={contextValue}>\n        {hasActionsSlot ? (\n          children\n        ) : (\n          <DialogFooter className=\"flex justify-end space-x-4\">\n            <Button\n              className=\"px-4 py-2\"\n              onClick={handleConfirm}\n              color={VARIANT_COLORS[variant]}\n              disabled={confirmDisabled || isLoading}\n              start={isLoading && <DotsLoader size=\"small\" />}\n              aria-label={confirmLabel}\n              aria-busy={isLoading}\n            >\n              {!isLoading && confirmLabel}\n            </Button>\n            <Button\n              className=\"px-4 py-2\"\n              onClick={handleCancel}\n              disabled={isLoading}\n            >\n              {cancelLabel}\n            </Button>\n          </DialogFooter>\n        )}\n      </ConfirmDialogContext.Provider>\n    </Dialog>\n  );\n};\n","'use client';\n\nimport React, { forwardRef, HTMLAttributes, ReactNode } from 'react';\nimport { DialogFooter } from '@/layers/Dialog';\nimport { cn } from '@/utils';\n\nexport interface ConfirmDialogActionsProps extends Omit<\n  HTMLAttributes<HTMLElement>,\n  'children'\n> {\n  /**\n   * The action buttons. Read managed state (isLoading, onConfirm, etc.)\n   * inside any child via `useConfirmDialogContext()`.\n   */\n  children?: ReactNode;\n\n  /**\n   * Additional CSS class name for the footer container.\n   */\n  className?: string;\n}\n\nexport const ConfirmDialogActions = forwardRef<\n  HTMLElement,\n  ConfirmDialogActionsProps\n>(({ children, className, ...props }, ref) => (\n  <DialogFooter\n    ref={ref}\n    className={cn('flex justify-end space-x-4', className)}\n    {...props}\n  >\n    {children}\n  </DialogFooter>\n));\n\n// Mark this component as a ConfirmDialog slot for detection\nConfirmDialogActions.displayName = 'ConfirmDialogActions';\n","import React, { useState, useCallback, ReactNode } from 'react';\nimport { ConfirmDialog, ConfirmDialogProps } from './ConfirmDialog';\n\nexport type OpenConfirmDialogProps = Omit<ConfirmDialogProps, 'open'>;\n\nexport const useConfirmDialog = () => {\n  const [isOpen, setIsOpen] = useState(false);\n  const [dialogProps, setDialogProps] = useState<OpenConfirmDialogProps | null>(\n    null\n  );\n\n  const closeDialog = useCallback(() => {\n    setIsOpen(false);\n    setDialogProps(null);\n  }, []);\n\n  const openDialog = useCallback(\n    (props: OpenConfirmDialogProps) => {\n      setDialogProps({\n        ...props,\n        onCancel: props.onCancel || closeDialog\n      });\n      setIsOpen(true);\n    },\n    [closeDialog]\n  );\n\n  const DialogComponent = useCallback(() => {\n    if (!dialogProps) {\n      return null;\n    }\n\n    return <ConfirmDialog open={isOpen} {...dialogProps} />;\n  }, [isOpen, dialogProps]);\n\n  return {\n    isOpen,\n    openDialog,\n    closeDialog,\n    DialogComponent\n  };\n};\n","import {\n  buttonTheme,\n  ButtonTheme,\n  CommandPaletteTheme,\n  commandPaletteTheme,\n  AvatarTheme,\n  avatarTheme,\n  KbdTheme,\n  kbdTheme,\n  AvatarGroupTheme,\n  avatarGroupTheme,\n  BadgeTheme,\n  badgeTheme,\n  DotsLoaderTheme,\n  dotsLoaderTheme,\n  ArrowTheme,\n  arrowTheme,\n  chipTheme,\n  ChipTheme,\n  SkeletonTheme,\n  skeletonTheme,\n  NavigationTheme,\n  navigationTheme\n} from '@/elements';\n\nimport {\n  CheckboxTheme,\n  checkboxTheme,\n  inputTheme,\n  radioTheme,\n  rangeTheme,\n  selectTheme,\n  textareaTheme,\n  toggleTheme,\n  InputTheme,\n  RadioTheme,\n  RangeTheme,\n  SelectTheme,\n  TextareaTheme,\n  ToggleTheme,\n  CalendarTheme,\n  calendarTheme,\n  CalendarRangeTheme,\n  calendarRangeTheme,\n  DateInputTheme,\n  dateInputTheme\n} from '@/form';\n\nimport {\n  ContextMenuTheme,\n  contextMenuTheme,\n  dialogTheme,\n  drawerTheme,\n  menuTheme,\n  notificationTheme,\n  popoverTheme,\n  tooltipTheme,\n  DialogTheme,\n  DrawerTheme,\n  MenuTheme,\n  NotificationTheme,\n  PopoverTheme,\n  TooltipTheme,\n  CalloutTheme,\n  calloutTheme,\n  BackdropTheme,\n  backdropTheme\n} from '@/layers';\n\nimport {\n  FieldTheme,\n  CollapseTheme,\n  fieldTheme,\n  collapseTheme,\n  dividerTheme,\n  treeTheme,\n  DividerTheme,\n  TabsTheme,\n  tabsTheme,\n  TreeTheme,\n  CardTheme,\n  cardTheme,\n  listTheme,\n  ListTheme,\n  JsonTreeTheme,\n  jsonTreeTheme,\n  breadcrumbsTheme,\n  BreadcrumbsTheme,\n  StepperTheme,\n  stepperTheme\n} from '@/layout';\n\nimport {\n  ellipsisTheme,\n  EllipsisTheme,\n  PagerTheme,\n  pagerTheme,\n  RedactTheme,\n  redactTheme,\n  SortTheme,\n  sortTheme,\n  DateFormatTheme,\n  dateFormatTheme\n} from '@/data';\n\nimport { TypographyTheme, typographyTheme } from '@/typography';\n\nexport interface ReablocksTheme {\n  /** Theme overrides applied to each Reablocks component. */\n  components: {\n    /** Theme applied to the Avatar component. */\n    avatar: AvatarTheme;\n    /** Theme applied to the AvatarGroup component. */\n    avatarGroup: AvatarGroupTheme;\n    /** Theme applied to the Arrow component. */\n    arrow: ArrowTheme;\n    /** Theme applied to the Badge component. */\n    badge: BadgeTheme;\n    /** Theme applied to the Button component. */\n    button: ButtonTheme;\n    /** Theme applied to the Field component. */\n    field: FieldTheme;\n    /** Theme applied to the Chip component. */\n    chip: ChipTheme;\n    /** Theme applied to the ContextMenu component. */\n    contextMenu: ContextMenuTheme;\n    /** Theme applied to the Checkbox component. */\n    checkbox: CheckboxTheme;\n    /** Theme applied to the DateFormat component. */\n    dateFormat: DateFormatTheme;\n    /** Theme applied to the Dialog component. */\n    dialog: DialogTheme;\n    /** Theme applied to the Divider component. */\n    divider: DividerTheme;\n    /** Theme applied to the DotsLoader component. */\n    dotsLoader: DotsLoaderTheme;\n    /** Theme applied to the Drawer component. */\n    drawer: DrawerTheme;\n    /** Theme applied to the Ellipsis component. */\n    ellipsis: EllipsisTheme;\n    /** Theme applied to the Select component. */\n    select: SelectTheme;\n    /** Theme applied to the List component. */\n    list: ListTheme;\n    /** Theme applied to the Menu component. */\n    menu: MenuTheme;\n    /** Theme applied to the Sort component. */\n    sort: SortTheme;\n    /** Theme applied to the Card component. */\n    card: CardTheme;\n    /** Theme applied to the Kbd component. */\n    kbd: KbdTheme;\n    /** Theme applied to the Notification component. */\n    notification: NotificationTheme;\n    /** Theme applied to the Navigation component. */\n    navigation: NavigationTheme;\n    /** Theme applied to the Input component. */\n    input: InputTheme;\n    /** Theme applied to the DateInput component. */\n    dateInput: DateInputTheme;\n    /** Theme applied to the Calendar component. */\n    calendar: CalendarTheme;\n    /** Theme applied to the CalendarRange component. */\n    calendarRange: CalendarRangeTheme;\n    /** Theme applied to the CommandPalette component. */\n    commandPalette: CommandPaletteTheme;\n    /** Theme applied to the Collapse component. */\n    collapse: CollapseTheme;\n    /** Theme applied to the Textarea component. */\n    textarea: TextareaTheme;\n    /** Theme applied to the Radio component. */\n    radio: RadioTheme;\n    /** Theme applied to the Range component. */\n    range: RangeTheme;\n    /** Theme applied to the Redact component. */\n    redact: RedactTheme;\n    /** Theme applied to the Toggle component. */\n    toggle: ToggleTheme;\n    /** Theme applied to the Tooltip component. */\n    tooltip: TooltipTheme;\n    /** Theme applied to the Tree component. */\n    tree: TreeTheme;\n    /** Theme applied to the JsonTree component. */\n    jsonTree: JsonTreeTheme;\n    /** Theme applied to the Popover component. */\n    popover: PopoverTheme;\n    /** Theme applied to the Pager component. */\n    pager: PagerTheme;\n    /** Theme applied to the Tabs component. */\n    tabs: TabsTheme;\n    /** Theme applied to the Breadcrumbs component. */\n    breadcrumbs: BreadcrumbsTheme;\n    /** Theme applied to the Stepper component. */\n    stepper: StepperTheme;\n    /** Theme applied to the Callout component. */\n    callout: CalloutTheme;\n    /** Theme applied to the Backdrop component. */\n    backdrop: BackdropTheme;\n    /** Theme applied to the Skeleton component. */\n    skeleton: SkeletonTheme;\n    /** Theme applied to the typography components. */\n    typography: TypographyTheme;\n  };\n}\n\nexport const theme: ReablocksTheme = {\n  components: {\n    avatar: avatarTheme,\n    avatarGroup: avatarGroupTheme,\n    arrow: arrowTheme,\n    badge: badgeTheme,\n    button: buttonTheme,\n    field: fieldTheme,\n    chip: chipTheme,\n    contextMenu: contextMenuTheme,\n    checkbox: checkboxTheme,\n    dateFormat: dateFormatTheme,\n    dialog: dialogTheme,\n    divider: dividerTheme,\n    dotsLoader: dotsLoaderTheme,\n    drawer: drawerTheme,\n    ellipsis: ellipsisTheme,\n    select: selectTheme,\n    list: listTheme,\n    menu: menuTheme,\n    sort: sortTheme,\n    card: cardTheme,\n    kbd: kbdTheme,\n    notification: notificationTheme,\n    navigation: navigationTheme,\n    input: inputTheme,\n    dateInput: dateInputTheme,\n    calendar: calendarTheme,\n    calendarRange: calendarRangeTheme,\n    commandPalette: commandPaletteTheme,\n    collapse: collapseTheme,\n    textarea: textareaTheme,\n    radio: radioTheme,\n    range: rangeTheme,\n    redact: redactTheme,\n    toggle: toggleTheme,\n    tooltip: tooltipTheme,\n    tree: treeTheme,\n    popover: popoverTheme,\n    pager: pagerTheme,\n    tabs: tabsTheme,\n    jsonTree: jsonTreeTheme,\n    breadcrumbs: breadcrumbsTheme,\n    stepper: stepperTheme,\n    callout: calloutTheme,\n    backdrop: backdropTheme,\n    skeleton: skeletonTheme,\n    typography: typographyTheme\n  }\n};\n","import { DeepPartial } from '@/utils';\nimport { ReablocksTheme } from './theme';\nimport { mergeDeep } from '@/utils/Theme/helpers';\n\nexport type PartialReablocksTheme = DeepPartial<ReablocksTheme>;\n\n/**\n * Performs a merge deep on the theme.\n */\nexport const extendTheme = (\n  defaultTheme: ReablocksTheme,\n  theme: PartialReablocksTheme,\n  mergeFunction?: (objValue: any, srcValue: any, key: string) => string\n) => mergeDeep(defaultTheme, theme, mergeFunction);\n","import { DeepPartial } from '@/utils';\nimport { mergeDeep } from '@/utils/Theme/helpers';\n\n/**\n * Performs a merge deep on the component theme.\n */\nexport const extendComponentTheme = <T extends Object>(\n  defaultTheme: T,\n  theme: DeepPartial<T>,\n  mergeFunction?: (objValue: any, srcValue: any, key: string) => string\n) => mergeDeep(defaultTheme, theme, mergeFunction);\n","/**\n * Filter variables by prefix.\n * @param config - The config to filter.\n * @param prefix - The prefix to filter by.\n * @param excludePrefixes - The prefixes to exclude.\n * @returns The filtered variables.\n */\nconst filterVariablesByPrefix = (\n  config: Record<string, string>,\n  prefix: string,\n  excludePrefixes?: string[]\n) =>\n  Object.keys(config).reduce(\n    (filteredColors, tokenKey) => {\n      if (\n        tokenKey.startsWith(prefix) &&\n        !excludePrefixes?.some(excludePrefix =>\n          tokenKey.startsWith(excludePrefix)\n        )\n      ) {\n        filteredColors[tokenKey] = config[tokenKey];\n      }\n      return filteredColors;\n    },\n    {} as Record<string, string>\n  );\n\n/**\n * Given a theme, extract the things we need for the theme builder.\n */\nexport function extractTheme(config: Record<string, string>) {\n  const colors = filterVariablesByPrefix(config, '--color');\n  const borderRadius = filterVariablesByPrefix(config, '--radius');\n  const boxShadow = filterVariablesByPrefix(config, '--shadow');\n  const fontSize = filterVariablesByPrefix(config, '--text', [\n    '--text-primary',\n    '--text-secondary'\n  ]);\n  const spacing = filterVariablesByPrefix(config, '--spacing');\n  const fontFamily = filterVariablesByPrefix(config, '--font', [\n    '--font-weight'\n  ]);\n  const fontWeight = filterVariablesByPrefix(config, '--font-weight');\n\n  return {\n    colors,\n    borderRadius,\n    boxShadow,\n    spacing,\n    fontFamily,\n    fontSize,\n    fontWeight\n  };\n}\n","import React, { FC, useMemo } from 'react';\nimport chroma from 'chroma-js';\n\nexport interface ColorBlockProps {\n  /** Display name of the color. */\n  name: string;\n  /** CSS color value for the swatch. */\n  color: string;\n  /** Additional class names applied to the block. */\n  className?: string;\n}\n\nexport const ColorBlock: FC<ColorBlockProps> = ({ name, color, className }) => (\n  <div\n    key={name}\n    style={{\n      border: 'solid 1px --border-color',\n      borderRadius: '4px',\n      overflow: 'hidden'\n    }}\n    className={className}\n  >\n    <div\n      style={{\n        padding: '20px',\n        background: color,\n        color: '#161616',\n        borderBottom: 'solid 1px var(--border-color)'\n      }}\n    />\n    <div\n      style={{\n        padding: '6px',\n        fontSize: '12px'\n      }}\n    >\n      <div>\n        <code\n          style={{ cursor: 'pointer' }}\n          title={`Double click to copy ${name} to your clipboard`}\n          onDoubleClick={() => navigator.clipboard.writeText(name)}\n        >\n          {name}\n        </code>\n      </div>\n      <div>\n        <code\n          style={{ cursor: 'pointer' }}\n          title={`Double click to copy ${color} to your clipboard`}\n          onDoubleClick={() => navigator.clipboard.writeText(color)}\n        >\n          {color}\n        </code>\n      </div>\n    </div>\n  </div>\n);\n\ninterface ColorPaletteBlockProps {\n  name: string;\n  color: string;\n  className?: string;\n  /**\n   * @default true\n   */\n  showName?: boolean;\n}\n\nexport const ColorPaletteBlock: FC<ColorPaletteBlockProps> = ({\n  name,\n  color,\n  className,\n  showName = true\n}) => {\n  let fontColor = 'var(--body-color)';\n  if (!name.includes('overlay')) {\n    const isOklch = color.trim().startsWith('oklch(');\n    const oklchColor = isOklch\n      ? color\n          .replace('oklch(', '')\n          .replace(')', '')\n          .split(' ')\n          .map(i => parseFloat(i))\n      : null;\n    const valid = isOklch ? chroma.oklch(oklchColor) : chroma.valid(color);\n\n    if (valid) {\n      const colorInstance = isOklch ? chroma.oklch(oklchColor) : chroma(color);\n      fontColor =\n        colorInstance.luminance() >= 0.3\n          ? colorInstance.darken(100).css()\n          : colorInstance.brighten(100).css();\n    }\n  }\n\n  return (\n    <div\n      key={name}\n      className={className}\n      style={{\n        borderRight: 'solid 1px var(--border-color)'\n      }}\n    >\n      <div\n        style={{\n          padding: '6px',\n          background: color,\n          height: '100%',\n          minHeight: 50\n        }}\n      >\n        {showName && (\n          <div>\n            <code\n              style={{ cursor: 'pointer', color: fontColor, fontSize: '12px' }}\n              title={`Double click to copy ${name} to your clipboard`}\n              onDoubleClick={() => navigator.clipboard.writeText(name)}\n            >\n              {name}\n            </code>\n          </div>\n        )}\n        <div>\n          <code\n            style={{ cursor: 'pointer', color: fontColor, fontSize: '12px' }}\n            title={`Double click to copy ${color} to your clipboard`}\n            onDoubleClick={() => navigator.clipboard.writeText(color)}\n          >\n            {color}\n          </code>\n        </div>\n      </div>\n    </div>\n  );\n};\n\nexport interface ColorPaletteBlocksProps {\n  /** Display name of the palette. */\n  name: string;\n  /** Single color value or a map of color names to values for the palette. */\n  colors: string | Record<string, string>;\n  /** Additional class names applied to the palette block. */\n  className?: string;\n  /** Optional CSS custom property token associated with the palette. */\n  token?: string | null;\n  /**\n   * @default true\n   */\n  showNames?: boolean;\n}\n\nconst extractColorName = (colorToken: string): string => {\n  const withoutPrefix = colorToken.replace('--color-', '');\n  return withoutPrefix.replace(/-\\d+$/, '');\n};\n\nexport const ColorPaletteBlocks: FC<ColorPaletteBlocksProps> = ({\n  name,\n  colors,\n  className,\n  showNames = true\n}) => (\n  <div\n    className={className}\n    style={{\n      marginBottom: '24px'\n    }}\n  >\n    <h3 style={{ fontWeight: 500, margin: 0 }}>{name}</h3>\n    <div\n      style={{\n        display: 'grid',\n        overflow: 'hidden',\n        borderRadius: '6px',\n        border: 'solid 1px var(--border-color)',\n        gridTemplateColumns: 'repeat(auto-fit, minmax(100px, 1fr))'\n      }}\n    >\n      {typeof colors === 'string' && (\n        <ColorBlock name={`${name}`} color={colors} />\n      )}\n      {typeof colors === 'object' && (\n        <>\n          {Object.keys(colors).map(color => (\n            <ColorPaletteBlock\n              key={color}\n              name={color.replace('--color-', '')}\n              color={colors[color]}\n              showName={showNames}\n            />\n          ))}\n        </>\n      )}\n      {typeof colors === 'function' && (\n        <ColorBlock name={`${name}`} color={(colors as any)({})} />\n      )}\n    </div>\n  </div>\n);\n\nexport const ColorBlocks = ({ colors }: { colors: Record<string, string> }) => {\n  const groupedColors = useMemo((): Record<string, Record<string, string>> => {\n    const groups = Object.keys(colors).reduce(\n      (acc, token) => {\n        const match = token.match(/^--(?:color-)?([^-]+)(?:-|$)/);\n        const groupName = match ? match[1] : token;\n        if (!acc[groupName]) {\n          acc[groupName] = {};\n        }\n        acc[groupName][token] = colors[token];\n        return acc;\n      },\n      {} as Record<string, Record<string, string>>\n    );\n\n    const sortedGroupNames = Object.keys(groups).sort(\n      (a, b) => Object.keys(groups[a]).length - Object.keys(groups[b]).length\n    );\n\n    return sortedGroupNames.reduce(\n      (sorted, groupName) => {\n        sorted[groupName] = groups[groupName];\n        return sorted;\n      },\n      {} as Record<string, Record<string, string>>\n    );\n  }, [colors]);\n\n  return (\n    <div\n      style={{\n        padding: '6px 12px',\n        color: 'var(--body-color)',\n        width: '100%'\n      }}\n    >\n      {groupedColors ? (\n        <>\n          {Object.keys(groupedColors).map(key => (\n            <ColorPaletteBlocks\n              key={key}\n              name={extractColorName(key)}\n              colors={groupedColors[key]}\n            />\n          ))}\n        </>\n      ) : (\n        <p>⚠️ No colors defined</p>\n      )}\n    </div>\n  );\n};\n","import React, { FC } from 'react';\nimport {\n  H1,\n  H2,\n  H3,\n  H4,\n  H5,\n  H6,\n  P,\n  BlockQuote,\n  Lead,\n  Large,\n  Small,\n  Muted\n} from '@/typography';\n\nexport interface TypographyLetterBlockProps {\n  /** Font family to preview. */\n  fontFamily: string;\n  /** Additional class names applied to the block. */\n  className?: string;\n}\n\nexport const TypographyLetterBlock: FC<TypographyLetterBlockProps> = ({\n  fontFamily,\n  className\n}) => (\n  <div\n    className={className}\n    style={{\n      fontFamily,\n      display: 'flex',\n      alignItems: 'center',\n      marginLeft: '20px'\n    }}\n  >\n    <div style={{ fontSize: 128 }}>Aa</div>\n    <div\n      style={{\n        marginLeft: '20px',\n        paddingLeft: '20px',\n        fontSize: 22,\n        borderLeft: 'solid 1px var(--border-color)'\n      }}\n    >\n      <h2 style={{ margin: 0 }}>{fontFamily}</h2>\n      <div>ABCDEFGHIJKLMNOPQRSTUVWXYZ</div>\n      <div>abcdefghijklmnopqrstuvwxyz</div>\n      <div>{'1234567890 /&*()?<>+-=$@%!\"[]{}'}</div>\n    </div>\n  </div>\n);\n\nexport interface TypographySizeBlockProps {\n  /** Map of size tokens to their font-size values. */\n  sizes: any;\n  /** Additional class names applied to the block. */\n  className?: string;\n}\n\nexport const TypographySizeBlock: FC<TypographySizeBlockProps> = ({\n  sizes,\n  className\n}) => (\n  <div className={className}>\n    {Object.keys(sizes)\n      .filter(size => !size.endsWith('--line-height'))\n      .map(size => (\n        <div\n          key={size}\n          style={{\n            fontSize: sizes[size],\n            lineHeight: sizes[`${size}-line-height`],\n            display: 'flex',\n            alignItems: 'center',\n            margin: '20px'\n          }}\n        >\n          <div\n            style={{\n              fontSize: 16,\n              minWidth: 110,\n              marginRight: '6px',\n              color: 'var(--body-color)'\n            }}\n          >\n            <code\n              style={{ cursor: 'pointer', fontSize: 14 }}\n              onDoubleClick={() => navigator.clipboard.writeText(size)}\n            >\n              {size.replace('--', '')}\n            </code>\n            <br />\n            <small>\n              <code\n                style={{ cursor: 'pointer' }}\n                onDoubleClick={() =>\n                  navigator.clipboard.writeText(sizes[size][0])\n                }\n              >\n                {sizes[size]}\n              </code>\n            </small>\n          </div>\n          The quick brown fox jumps over the lazy dog.\n        </div>\n      ))}\n  </div>\n);\n\nexport interface TypographyWeightBlockProps {\n  /** Map of weight tokens to their font-weight values. */\n  weights: any;\n  /** Additional class names applied to the block. */\n  className?: string;\n}\n\nexport const TypographyWeightBlock: FC<TypographyWeightBlockProps> = ({\n  weights,\n  className\n}) => (\n  <div\n    className={className}\n    style={{\n      padding: '6px',\n      borderRadius: '6px',\n      border: 'solid 1px var(--border-color)'\n    }}\n  >\n    {Object.keys(weights).map((weight, i) => (\n      <div\n        key={i}\n        style={{\n          display: 'flex',\n          alignItems: 'center',\n          marginBottom: '16px'\n        }}\n      >\n        <code style={{ width: '25%', minWidth: 200 }}>\n          <span\n            style={{ fontSize: '16px', cursor: 'pointer' }}\n            onDoubleClick={() =>\n              navigator.clipboard.writeText(`font-${weight}`)\n            }\n          >\n            {weight.replace('--', '').replace('-weight', '')}\n          </span>\n          <br />\n          <div\n            style={{ fontSize: '14px', cursor: 'pointer' }}\n            onDoubleClick={() => navigator.clipboard.writeText(weights[weight])}\n          >\n            {weights[weight]}\n          </div>\n        </code>\n        <div style={{ fontWeight: weights[weight] }}>\n          The quick brown fox jumps over the lazy dog.\n        </div>\n      </div>\n    ))}\n  </div>\n);\n\nexport const TypographyComponentsBlock: FC = () => (\n  <div style={{ maxWidth: '720px' }}>\n    <h2 style={{ fontSize: '20px', fontWeight: '500', marginBottom: '16px' }}>\n      Components\n    </h2>\n    <div\n      style={{\n        padding: '24px',\n        borderRadius: '8px',\n        border: 'solid 1px var(--border-color)',\n        marginBottom: '24px'\n      }}\n    >\n      <H1>H1: The quick brown fox</H1>\n      <Muted>text-4xl font-extrabold tracking-tight text-balance</Muted>\n      <div style={{ height: '16px' }} />\n      <H2 className=\"border-0\">H2: The quick brown fox</H2>\n      <Muted>border-b pb-2 text-3xl font-semibold tracking-tight</Muted>\n      <div style={{ height: '16px' }} />\n      <H3>H3: The quick brown fox</H3>\n      <Muted>text-2xl font-semibold tracking-tight</Muted>\n      <div style={{ height: '16px' }} />\n      <H4>H4: The quick brown fox</H4>\n      <H5>H5: The quick brown fox</H5>\n      <H6>H6: The quick brown fox</H6>\n      <Muted>text-xl font-semibold tracking-tight</Muted>\n    </div>\n    <div\n      style={{\n        padding: '24px',\n        borderRadius: '8px',\n        border: 'solid 1px var(--border-color)',\n        marginBottom: '24px'\n      }}\n    >\n      <P>\n        The king, seeing how much happier his subjects were, realized the error\n        of his ways and repealed the joke tax. Jokester began sneaking into the\n        castle in the middle of the night and telling jokes to the king.\n      </P>\n      <P>\n        The people of the kingdom once again could freely exchange jokes and\n        laughter, and the land was filled with joy and mirth once more.\n      </P>\n    </div>\n    <div\n      style={{\n        padding: '24px',\n        borderRadius: '8px',\n        border: 'solid 1px var(--border-color)',\n        marginBottom: '24px'\n      }}\n    >\n      <BlockQuote>\n        {\n          '\"After all,\" he said, \"everyone enjoys a good joke, so it\\'s only fair that they should pay for the privilege.\"'\n        }\n      </BlockQuote>\n    </div>\n    <div\n      style={{\n        display: 'flex',\n        flexDirection: 'column',\n        gap: '16px'\n      }}\n    >\n      <div\n        style={{\n          padding: '24px',\n          borderRadius: '8px',\n          border: 'solid 1px var(--border-color)'\n        }}\n      >\n        <Large>Large Text</Large>\n        <Muted>text-lg font-semibold</Muted>\n      </div>\n      <div\n        style={{\n          padding: '24px',\n          borderRadius: '8px',\n          border: 'solid 1px var(--border-color)'\n        }}\n      >\n        <Lead>Lead text for introductions and summaries.</Lead>\n        <Muted>text-xl text-text-secondary</Muted>\n      </div>\n      <div\n        style={{\n          padding: '24px',\n          borderRadius: '8px',\n          border: 'solid 1px var(--border-color)'\n        }}\n      >\n        <Small>Small Text</Small>\n        <Muted>text-sm leading-none font-medium</Muted>\n      </div>\n      <div\n        style={{\n          padding: '24px',\n          borderRadius: '8px',\n          border: 'solid 1px var(--border-color)'\n        }}\n      >\n        <Muted>Muted text for secondary information.</Muted>\n      </div>\n    </div>\n  </div>\n);\n\nexport const TypographyBlocks = ({\n  families,\n  sizes,\n  weights\n}: {\n  families: Record<string, string>;\n  sizes: Record<string, string>;\n  weights: Record<string, string>;\n}) => (\n  <div\n    style={{\n      color: 'var(--body-color)',\n      width: '100%'\n    }}\n  >\n    <h1 style={{ fontSize: '28px', fontWeight: 'bold', marginBottom: '8px' }}>\n      Typography\n    </h1>\n    <TypographyComponentsBlock />\n    <br />\n    <h2 style={{ fontSize: '20px', fontWeight: '500' }}>Font Families</h2>\n    <br />\n    {Object.keys(families).map(family => (\n      <div\n        key={family}\n        style={{\n          marginBottom: '24px'\n        }}\n      >\n        <h3 style={{ fontWeight: 600, fontSize: '20px' }}>\n          <small>\n            <code>{family.replace('--font-', '')}</code>\n          </small>\n          <br />\n        </h3>\n        <div\n          style={{\n            padding: '10px',\n            borderRadius: '8px',\n            border: 'solid 1px var(--border-color)'\n          }}\n        >\n          <TypographyLetterBlock fontFamily={families[family]} />\n          <hr\n            style={{\n              background: 'none',\n              border: 'none',\n              borderTop: 'solid 1px var(--border-color)'\n            }}\n          />\n          <TypographySizeBlock sizes={sizes} />\n        </div>\n      </div>\n    ))}\n    {weights && (\n      <>\n        <h2>Font Weights</h2>\n        <TypographyWeightBlock weights={weights} />\n      </>\n    )}\n  </div>\n);\n","import React from 'react';\n\nexport const SpacingBlocks = ({ spacings }) => {\n  const steps = Array.from({ length: 20 }, (_, index) => index + 1);\n  steps.unshift(0.5);\n  steps.push(...[24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96]);\n  const value = parseFloat(spacings['--spacing']);\n  const unit = spacings['--spacing']?.replace(value, '');\n\n  return (\n    <div\n      style={{\n        padding: '6px 12px',\n        color: 'var(--body-color)',\n        width: '100%'\n      }}\n    >\n      {spacings ? (\n        <>\n          {steps.map(step => (\n            <div\n              key={step}\n              style={{\n                marginBottom: '16px',\n                padding: '20px',\n                display: 'flex',\n                alignItems: 'center',\n                borderRadius: '4px',\n                border: 'solid 1px var(--border-color)'\n              }}\n            >\n              <h3 style={{ fontWeight: 500, marginRight: 50 }}>\n                <code\n                  style={{ cursor: 'pointer' }}\n                  title={`Double click to copy ${step} to your clipboard`}\n                  onDoubleClick={() =>\n                    navigator.clipboard.writeText(step.toString())\n                  }\n                >\n                  {step}\n                </code>\n                <br />\n                <small\n                  style={{ cursor: 'pointer' }}\n                  onDoubleClick={() =>\n                    navigator.clipboard.writeText(value * step + unit)\n                  }\n                >\n                  {value * step}\n                  {unit}\n                </small>\n              </h3>\n              <div\n                style={{\n                  justifyContent: 'end',\n                  display: 'flex',\n                  flex: 1\n                }}\n              >\n                <div\n                  style={{\n                    padding: value * step + unit,\n                    border: 'solid 1px blue'\n                  }}\n                >\n                  Content\n                </div>\n              </div>\n            </div>\n          ))}\n        </>\n      ) : (\n        <p>⚠️ No spacings defined</p>\n      )}\n    </div>\n  );\n};\n","import React, { FC } from 'react';\nimport { ColorBlock } from './ColorBlocks';\n\nexport interface PaletteBlocksProps {\n  /** Map of palette names to their color values. */\n  palettes: Record<string, string>;\n}\n\nexport const PaletteBlocks: FC<PaletteBlocksProps> = ({ palettes }) => (\n  <div\n    style={{\n      padding: '4px 8px',\n      color: 'var(--body-color)',\n      width: '100%'\n    }}\n  >\n    {Object.keys(palettes).map(key => (\n      <div key={key}>\n        <h3 style={{ fontWeight: 500, fontSize: '24px', margin: 0 }}>{key}</h3>\n        <div\n          style={{\n            marginBottom: '20px',\n            display: 'grid',\n            gap: 12,\n            gridTemplateColumns: 'repeat(auto-fit, minmax(100px, 1fr))',\n            borderRadius: '4px'\n          }}\n        >\n          {Object.keys(palettes[key]).map(item => (\n            <ColorBlock\n              key={`${key}-${item}`}\n              name={`${key}-${item}`}\n              color={palettes![key][item]}\n              className=\"rounded-sm border border-slate-500\"\n            />\n          ))}\n        </div>\n      </div>\n    ))}\n  </div>\n);\n","import React from 'react';\n\nexport const BorderBlocks = ({ borders }) => (\n  <div\n    style={{\n      padding: '2px 4px',\n      color: 'var(--body-color)',\n      width: '100%'\n    }}\n  >\n    {borders ? (\n      <>\n        {Object.keys(borders).map(key => (\n          <div\n            key={key}\n            style={{\n              marginBottom: '20px',\n              padding: '16px',\n              display: 'flex',\n              alignItems: 'center',\n              borderRadius: '4px',\n              border: 'solid 1px var(--border-color)'\n            }}\n          >\n            <h3\n              style={{\n                fontWeight: 500,\n                marginRight: '20px',\n                maxWidth: 300\n              }}\n            >\n              <span\n                style={{ cursor: 'pointer' }}\n                title={'Double click to copy class name to your clipboard'}\n                onDoubleClick={() =>\n                  navigator.clipboard.writeText(key.replace('--', ''))\n                }\n              >\n                {key.replace('--', '')}\n              </span>\n              <br />\n              <small\n                style={{ cursor: 'pointer' }}\n                onDoubleClick={() =>\n                  navigator.clipboard.writeText(borders[key])\n                }\n              >\n                <code>{borders[key]}</code>\n              </small>\n            </h3>\n            <div\n              style={{\n                justifyContent: 'end',\n                display: 'flex',\n                flex: 1\n              }}\n            >\n              <div\n                style={{\n                  padding: '12px',\n                  borderRadius: borders[key],\n                  border: 'solid 1px blue'\n                }}\n              >\n                Content\n              </div>\n            </div>\n          </div>\n        ))}\n      </>\n    ) : (\n      <p>⚠️ No borders defined</p>\n    )}\n  </div>\n);\n","import React from 'react';\n\nexport const ShadowBlocks = ({ shadows }) => (\n  <div\n    style={{\n      padding: '4px 8px',\n      color: 'var(--body-color)',\n      width: '100%'\n    }}\n  >\n    {shadows ? (\n      <>\n        {Object.keys(shadows).map(key => (\n          <div\n            key={key}\n            style={{\n              marginBottom: '20px',\n              padding: '16px 20px',\n              display: 'flex',\n              alignItems: 'center',\n              borderRadius: '6px',\n              border: 'solid 1px var(--border-color)'\n            }}\n          >\n            <h3 style={{ fontWeight: 500, marginRight: 50, maxWidth: 300 }}>\n              <span\n                style={{ cursor: 'pointer' }}\n                title={'Double click to copy class name to your clipboard'}\n                onDoubleClick={() =>\n                  navigator.clipboard.writeText(key.replace('--', ''))\n                }\n              >\n                {key.replace('--', '')}\n              </span>\n              <br />\n              <small>\n                <code\n                  style={{ cursor: 'pointer' }}\n                  onDoubleClick={() =>\n                    navigator.clipboard.writeText(shadows[key])\n                  }\n                >\n                  {shadows[key]}\n                </code>\n              </small>\n            </h3>\n            <div\n              style={{\n                justifyContent: 'end',\n                display: 'flex',\n                flex: 1\n              }}\n            >\n              <div\n                style={{\n                  backgroundColor: '#191919',\n                  padding: '12px',\n                  fontSize: '16px',\n                  boxShadow: shadows[key]\n                }}\n              >\n                Content\n              </div>\n            </div>\n          </div>\n        ))}\n      </>\n    ) : (\n      <p>⚠️ No shadows defined</p>\n    )}\n  </div>\n);\n","import React from 'react';\nimport { ReablocksTheme } from '@/utils/Theme/themes';\nimport { JsonTree } from '@/layout/Tree';\nimport { Button } from '@/elements';\nimport { Notifications, NotificationsContext } from '@/layers';\n\nexport const ComponentBlocks = ({\n  components\n}: {\n  components: ReablocksTheme['components'];\n}) => (\n  <Notifications>\n    <NotificationsContext.Consumer>\n      {({ notifySuccess }) => (\n        <div\n          style={{\n            padding: '4px 8px',\n            color: 'var(--body-color)',\n            width: '100%'\n          }}\n        >\n          {components ? (\n            <>\n              {Object.keys(components).map(key => (\n                <div key={key} className=\"mb-3 relative\">\n                  <h3\n                    style={{\n                      fontSize: '24px',\n                      fontWeight: 500,\n                      marginRight: 50,\n                      marginBottom: '4px',\n                      maxWidth: 300,\n                      textTransform: 'capitalize'\n                    }}\n                  >\n                    {key}\n                  </h3>\n                  <JsonTree\n                    className=\"border border-gray-700 rounded-sm p-3\"\n                    expandDepth={Infinity}\n                    data={components[key]}\n                  />\n                  <Button\n                    size=\"small\"\n                    color=\"secondary\"\n                    variant=\"outline\"\n                    className=\"absolute right-0 bottom-0 text-xs\"\n                    onClick={async () => {\n                      try {\n                        await navigator.clipboard.writeText(\n                          JSON.stringify(components[key], null, 2)\n                        );\n                        notifySuccess('Content copied to clipboard');\n                      } catch (err) {\n                        console.error('Failed to copy: ', err);\n                      }\n                    }}\n                  >\n                    Copy Code\n                  </Button>\n                </div>\n              ))}\n            </>\n          ) : (\n            <p>⚠️ No components(s) defined</p>\n          )}\n        </div>\n      )}\n    </NotificationsContext.Consumer>\n  </Notifications>\n);\n","import React, { FC, Suspense } from 'react';\n\nexport interface IconBlockProps {\n  /** Display name of the icon. */\n  name: string;\n  /** React component used to render the icon. */\n  component?: any;\n  /** Image source URL used to render the icon when no component is provided. */\n  src?: any;\n  /** Additional class names applied to the block. */\n  className?: string;\n}\n\nexport const IconBlock: FC<IconBlockProps> = ({\n  name,\n  src,\n  className,\n  component: Component\n}) => (\n  <div\n    className={className}\n    style={{\n      display: 'flex',\n      flexDirection: 'column',\n      justifyContent: 'center',\n      alignItems: 'center',\n      padding: 'var(--spacing-md)',\n      fontFamily: 'var(--font-family)',\n      background: 'var(--icon-block-background)',\n      color: 'var(--icon-block-color)',\n      textAlign: 'center',\n      fontSize: '12px',\n      borderRadius: 'var(--border-radius-md)',\n      height: 75\n    }}\n  >\n    <Suspense fallback={null}>\n      {src ? (\n        <img\n          src={src}\n          style={{ width: 25, height: 25, marginBottom: 'var(--spacing-md)' }}\n        />\n      ) : (\n        <Component\n          style={{ width: 25, height: 25, marginBottom: 'var(--spacing-md)' }}\n        />\n      )}\n      <div>{name}</div>\n    </Suspense>\n  </div>\n);\n\nexport interface IconBlocksProps {\n  /** Collection of icons to display in the grid. */\n  icons: IconBlockProps[];\n  /** Additional class names applied to the grid. */\n  className?: string;\n}\n\nexport const IconBlocks: FC<IconBlocksProps> = ({ icons, className }) => (\n  <div\n    style={{\n      display: 'grid',\n      gridGap: 'var(--spacing-lg)',\n      gridTemplateColumns: 'repeat(auto-fill, minmax(120px, 1fr))',\n      justifyItems: 'stretch'\n    }}\n    className={className}\n  >\n    {icons.map(key => (\n      <IconBlock key={key.name} {...key} />\n    ))}\n  </div>\n);\n","import { cloneElement, useMemo } from 'react';\nimport classNames from 'classnames';\n\ninterface CloneElementProps {\n  element: any;\n  children?: any;\n  childRef?: any;\n}\n\n/**\n * CloneElement is a wrapper component for createElement function.\n * This allows you to describe your cloning element declaratively\n * which is a more natural API for React.\n */\nexport function CloneElement<T = any>({\n  children,\n  element,\n  childRef,\n  ...rest\n}: CloneElementProps & Partial<T>) {\n  const getProjectedProps = useMemo(\n    () => props => {\n      const childProps = element.props;\n\n      return Object.keys(props).reduce((acc, key) => {\n        const prop = props[key];\n        const childProp = childProps[key];\n\n        if (typeof prop === 'function' && typeof childProp === 'function') {\n          acc[key] = (...args) => {\n            prop(...args);\n            return childProp(...args);\n          };\n        } else if (key === 'className') {\n          acc[key] = classNames(prop, childProp);\n        } else {\n          acc[key] = prop;\n        }\n\n        return acc;\n      }, {});\n    },\n    [rest]\n  );\n\n  if (element === null) {\n    return children;\n  }\n\n  // Tricky logic around functional vs class components\n  const ref = childRef\n    ? node => {\n        if (typeof childRef === 'function') {\n          childRef(node);\n        } else if (ref) {\n          childRef.current = node;\n        }\n      }\n    : undefined;\n\n  const newProps = getProjectedProps(rest);\n  return cloneElement(element, {\n    ...element.props,\n    ...newProps,\n    children,\n    ref\n  });\n}\n","import { useEffect } from 'react';\n\n/**\n * Hook to disable user selection on the body.\n */\nexport function useUserSelect(active: boolean) {\n  useEffect(() => {\n    if (active) {\n      document.body.style.userSelect = 'none';\n      return () => void (document.body.style.userSelect = 'initial');\n    }\n  }, [active]);\n}\n","import { useEffect } from 'react';\n\n/**\n * Hook for setting body cursors.\n *\n * Credits: https://github.com/pmndrs/drei#usecursor\n */\nexport function useCursor(\n  hovered: boolean,\n  onPointerOver = 'pointer',\n  onPointerOut = 'auto'\n) {\n  useEffect(() => {\n    if (hovered) {\n      document.body.style.cursor = onPointerOver;\n      return () => void (document.body.style.cursor = onPointerOut);\n    }\n  }, [hovered, onPointerOut, onPointerOver]);\n}\n","/**\n * Options for color generation from string\n */\nexport interface ColorOptions {\n  /**\n   * Saturation value (0-100), defaults to 65\n   * @default 65\n   */\n  saturation?: number;\n  /**\n   * Lightness value (0-100), defaults to 50\n   * @default 50\n   */\n  lightness?: number;\n  /**\n   * Alpha value (0-100), defaults to 100 (opaque)\n   * @default 100\n   */\n  alpha?: number;\n}\n\n/**\n * Simple hash function to generate a consistent number from a string\n * This is a variant of the DJB2 hash algorithm\n */\nfunction hashString(str: string): number {\n  let hash = 5381;\n  for (let i = 0; i < str.length; i++) {\n    hash = (hash * 33) ^ str.charCodeAt(i);\n  }\n  return hash >>> 0; // Convert to unsigned 32-bit integer\n}\n\n/**\n * Generates a consistent color from a string input\n * @param input - The string to generate a color from\n * @param options - Optional color customization options\n * @returns HSL or HSLA color string\n */\nexport function generateColor(input: string, options?: ColorOptions): string {\n  const saturation = options?.saturation ?? 65;\n  const lightness = options?.lightness ?? 50;\n  const alpha = options?.alpha ?? 100;\n\n  // Generate a hash from the input string\n  const hash = hashString(input);\n\n  // Use the hash to generate a hue value (0-360)\n  const hue = hash % 360;\n\n  // Return HSL or HSLA format\n  if (alpha === 100) {\n    return `hsl(${hue}, ${saturation}%, ${lightness}%)`;\n  } else {\n    const alphaDecimal = alpha / 100;\n    return `hsla(${hue}, ${saturation}%, ${lightness}%, ${alphaDecimal})`;\n  }\n}\n","import { Children, isValidElement, ReactNode } from 'react';\n\n/**\n * Check if children contain any components with matching display names\n */\nexport function hasSlotComponents(\n  children: ReactNode,\n  slotNames: string[]\n): boolean {\n  let hasSlots = false;\n\n  Children.forEach(children, child => {\n    if (isValidElement(child)) {\n      const displayName =\n        (child.type as any)?.displayName || (child.type as any)?.name || '';\n      if (slotNames.includes(displayName)) {\n        hasSlots = true;\n      }\n    }\n  });\n\n  return hasSlots;\n}\n\n/**\n * Extract slot components from children by display name\n */\nexport function extractSlots<T extends Record<string, ReactNode>>(\n  children: ReactNode,\n  slotNameToKey: Record<string, keyof T>\n): T & { other: ReactNode[] } {\n  const slots: Record<string, ReactNode> = {};\n  const other: ReactNode[] = [];\n\n  // Initialize all slots to null\n  Object.values(slotNameToKey).forEach(key => {\n    slots[key as string] = null;\n  });\n\n  Children.forEach(children, child => {\n    if (isValidElement(child)) {\n      const displayName =\n        (child.type as any)?.displayName || (child.type as any)?.name || '';\n\n      const slotKey = slotNameToKey[displayName];\n      if (slotKey) {\n        slots[slotKey as string] = child;\n      } else {\n        other.push(child);\n      }\n    } else if (child != null) {\n      other.push(child);\n    }\n  });\n\n  return { ...slots, other } as T & { other: ReactNode[] };\n}\n","/**\n * Type guard for promise-like values. Returns true for native Promises\n * and any value exposing a callable `.then` method. Use this instead of\n * `instanceof Promise` so cross-realm promises and non-native promise\n * libraries (e.g. Bluebird) are also detected.\n */\nexport function isPromiseLike(value: unknown): value is PromiseLike<unknown> {\n  return typeof (value as { then?: unknown } | null)?.then === 'function';\n}\n"],"names":["useEffect","createContext","id","useState","useRef","useLayoutEffect","forwardRef","ref","useImperativeHandle","createPortal","jsx","theme","motion","useCallback","disableBodyScroll","clearAllBodyScrollLocks","AnimatePresence","jsxs","Fragment","flip","shift","limitShift","useMemo","useFloating","autoUpdate","useContext","baseTheme","format","isValid","getDaysInMonth","startOfMonth","getDay","subDays","getDate","getISODay","isSameDay","isSameMonth","addDays","min","max","isWithinInterval","startOfDay","endOfDay","isBefore","isAfter","getHours","getMinutes","getSeconds","setSeconds","setMinutes","setHours","differenceInMinutes","differenceInSeconds","value","isToday","VARIANTS","createElement","Children","twMerge","cssRules","defaultTheme","children","tabList","panels","amPm","hours","isSameHour","options","subWeeks","subMonths","subYears","addWeeks","addMonths","addYears","startOfWeek","endOfWeek","endOfMonth","startOfYear","endOfYear","getMonth","getYear","startOfDecade","endOfDecade","sub","add","minDate","maxDate","setMonth","setYear","date","useMotionValue","useTransform","checked","DownArrowIcon","memo","result","size","autoWidth","React","CalendarIcon","parse","formatDate","preset","pluralize","formatDistance","dateFnsFormat","StartArrow","EndArrow","PreviousArrow","NextArrow","keys","inputTheme","isValidElement","cloneElement","index","navigationTheme","offset","arrowMiddleware","InfoIcon","CheckCircleIcon","WarningIcon","ErrorCircleIcon","notifications","Suspense"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCO,QAAM,kBAAkB,CAAC;AAAA,IAC9B;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,EACF,MAA2B;AACzBA,UAAAA,UAAU,MAAM;AACd,UAAI,CAAC,MAAM;AACT;AAAA,MACF;AAEA,YAAM,cAAc,CAAC,UAAmC;AACtD,YAAI,IAAI,WAAW,CAAC,IAAI,QAAQ,SAAS,MAAM,MAAc,GAAG;AAC9D,2BAAiB,KAAmB;AAAA,QACtC;AAAA,MACF;AAEA,YAAM,YAAY,CAAC,UAAyB;AAC1C,YAAI,MAAM,SAAS,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