import { EventEmitter } from '../../stencil-public-runtime'; import { PopoverDismissMode, PopoverVertical, PopoverHorizontal } from './exports'; import { PopoverTriggerAction } from '../popover-trigger/exports'; export declare class Popover { host: HTMLRPopoverElement; /** * Defines initial state of the popover visibility. * @default false */ open?: boolean; /** * Defines the behavior of the popover's dismissing. * - `auto`: The popover can be dismissed by clicking outside or pressing Esc. * - `manual`: The popover requires explicit user action to close. * @default "auto" */ dismissMode: PopoverDismissMode; /** * Defines `aria-label` content for the dismiss button. * Used for accessibility when dismiss button is present. */ dismissAriaLabel?: string; /** * Defines the action that will be triggered when the trigger is clicked. * - `toggle`: Toggle the popover open/closed state * - `show`: Only show the popover * - `hide`: Only hide the popover * @default "toggle" */ triggerAction: PopoverTriggerAction; /** * Defines `aria-label` content for the popover trigger. * Used for accessibility to describe the trigger button. */ triggerAriaLabel?: string; /** * Defines preferred placement vertically relative to the trigger. * - `top`: Position above the trigger * - `bottom`: Position below the trigger * - `middle`: Position to the side of the trigger * @default "bottom" */ vertical: PopoverVertical; /** * Defines preferred placement horizontally relative to the trigger. * - `left`: Align to the left of the trigger * - `center`: Center align with the trigger * - `right`: Align to the right of the trigger * @default "center" */ horizontal: PopoverHorizontal; /** The current state of the popover's position */ positionState: any; /** Indicates if popover is shown */ isOpen: boolean; /** Emits when open state changes */ popoverOpenChange: EventEmitter<{ open: boolean; }>; /** Emits when popover is hidden */ hidePopover: EventEmitter; /** Emits when popover is shown */ showPopover: EventEmitter; /** Emits when popover focus is set */ focusPopover: EventEmitter; /** * Method to show the popover. * Opens the popover, positions it correctly, and sets focus to appropriate element. * @returns Promise that resolves when the popover is shown */ show(): Promise; /** * Method to hide the popover. * Closes the popover and emits hide event. * @returns Promise that resolves when the popover is hidden */ hide(): Promise; /** * Toggle popover visibility. * Shows the popover if hidden, hides it if shown. * @returns Promise that resolves when the toggle action is complete */ toggle(): Promise; /** * Set focus inside the popover to the most appropriate element. * Priority order: * 1. Dismiss button (if present) * 2. Action element (if present) * 3. Content element (if present) * 4. Host element as fallback * @returns Promise that resolves to the popover instance for chaining */ setFocus(): Promise; private _getFocusable; private _focusOnElement; /** * Remove focus from all focusable elements within the popover. * Calls setBlur on all child components and the host element. * @returns Promise that resolves to the popover instance for chaining */ setBlur(): Promise; handleOpenChange(): void; watchOpen(): void; handlePreferredPositionChange(): void; onKeyup(event: any): this; onResize(): void; onScroll(): void; private get hasDismiss(); private get triggerRect(); private get boardRect(); get activeElement(): Element; private get headlineSlotContent(); private readonly uniqueId; private triggerElement; private dismissElement; private boardElement; /** * Gets the actual interactive element (button/link) from within r-button or r-icon-button shadow DOM, * or returns the element itself if it's already interactive */ private getInteractiveElement; /** Position logic */ private renderPosition; private onToggle; private onClickDismiss; private setTriggerInitialAttributes; private updateTriggerAttributes; componentDidLoad(): void; private onKeyDown; render(): any; }