{"version":3,"file":"Popover.types.mjs","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,UAAU;CACX,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ComponentProps, CSSProperties, ReactNode } from 'react';\n\n/**\n * Popover - placement of the floating element relative to the reference element.\n * Mirrors the placements supported by `react-popper` (`Auto` enables both\n * `flip` and `preventOverflow` automatically).\n */\nexport const PopoverPosition = {\n  Auto: 'auto',\n  Top: 'top',\n  TopStart: 'top-start',\n  TopEnd: 'top-end',\n  Right: 'right',\n  RightStart: 'right-start',\n  RightEnd: 'right-end',\n  Bottom: 'bottom',\n  BottomStart: 'bottom-start',\n  BottomEnd: 'bottom-end',\n  Left: 'left',\n  LeftStart: 'left-start',\n  LeftEnd: 'left-end',\n} as const;\nexport type PopoverPosition =\n  (typeof PopoverPosition)[keyof typeof PopoverPosition];\n\n/**\n * Popover - ARIA role for the floating element.\n * Use `Dialog` when the contents are interactive, `Tooltip` for purely\n * informational content.\n */\nexport const PopoverRole = {\n  Tooltip: 'tooltip',\n  Dialog: 'dialog',\n} as const;\nexport type PopoverRole = (typeof PopoverRole)[keyof typeof PopoverRole];\n\nexport type PopoverProps = Omit<ComponentProps<'div'>, 'role'> & {\n  /**\n   * The contents of the Popover.\n   */\n  children?: ReactNode;\n  /**\n   * Additional class names to merge onto the Popover root.\n   */\n  className?: string;\n  /**\n   * Inline styles applied to the Popover root. Merged after the styles\n   * computed by `react-popper`.\n   */\n  style?: CSSProperties;\n  /**\n   * Placement relative to `referenceElement`. When `PopoverPosition.Auto`,\n   * `flip` and `preventOverflow` are forced on regardless of their props.\n   *\n   * @default PopoverPosition.Auto\n   */\n  position?: PopoverPosition;\n  /**\n   * ARIA role applied to the Popover root.\n   *\n   * @default PopoverRole.Tooltip\n   */\n  role?: PopoverRole;\n  /**\n   * Render an arrow pointing at the reference element.\n   *\n   * @default false\n   */\n  hasArrow?: boolean;\n  /**\n   * Props forwarded to the arrow element. `ref`, `style`, and `children` are\n   * reserved for internal use (popper positioning, rotation styles, and the\n   * arrow visual) and cannot be overridden.\n   */\n  arrowProps?: Omit<ComponentProps<'div'>, 'ref' | 'style' | 'children'>;\n  /**\n   * Match the popover width to the reference element's `clientWidth`.\n   *\n   * @default false\n   */\n  matchWidth?: boolean;\n  /**\n   * Keep the Popover within the viewport. Forced on when\n   * `position === PopoverPosition.Auto`.\n   *\n   * @default false\n   */\n  preventOverflow?: boolean;\n  /**\n   * Allow flipping to the opposite side when there is not enough space.\n   * Forced on when `position === PopoverPosition.Auto`.\n   *\n   * @default false\n   */\n  flip?: boolean;\n  /**\n   * Hide the Popover when the reference element is scrolled out of view.\n   *\n   * @default true\n   */\n  referenceHidden?: boolean;\n  /**\n   * The element the Popover is positioned against.\n   */\n  referenceElement?: HTMLElement | null;\n  /**\n   * Whether the Popover is open. Nothing is rendered when `false`.\n   */\n  isOpen?: boolean;\n  /**\n   * `[skidding, distance]` offset (in px) applied to the Popover.\n   *\n   * @default [0, 8]\n   */\n  offset?: [number, number];\n  /**\n   * Render the Popover into `document.body` via `createPortal`.\n   *\n   * @default false\n   */\n  isPortal?: boolean;\n  /**\n   * Called when the user presses the Escape key while the Popover is open.\n   */\n  onPressEscKey?: () => void;\n  /**\n   * Called when the user clicks outside the Popover and the reference element\n   * while the Popover is open.\n   */\n  onClickOutside?: () => void;\n};\n"]}