import { AnchorPosition } from '../../composables/useAnchorPositionPolyfill.js'; import { OpenAlignment } from '../../composables/useOpenAlignment.js'; import { Nullable } from '../../types/utils.js'; export type OnyxBasicPopoverProps = { /** * Aria label for the popover. */ label: string; /** * Indicates whether the element is expanded or collapsed. */ open?: Nullable; /** * How to position the popover around the parent element. */ position?: AnchorPosition | "auto" | "auto-inline"; /** * How to align the popover relative to the parent element (depending on the position). */ alignment?: OpenAlignment | "auto"; /** * If `true`, the popover will match the width of the parent/slot element. */ fitParent?: boolean; /** * Whether the popover is disabled and can not be opened. */ disabled?: boolean; /** * Role for the popover. * This can be used to control the ARIA role for accessibility. * * @default "dialog" */ role?: "menu" | "listbox" | "tree" | "grid" | "dialog"; /** * If true, the popover remains visible within the viewport even if its parent element scrolls out * of view. */ sticky?: boolean; };