import { EventEmitter } from '../../stencil-public-runtime'; import { Placement } from '@floating-ui/dom'; import '@oddbird/popover-polyfill'; interface PopoverElement { showPopover: () => void; hidePopover: () => void; togglePopover: (force?: boolean) => boolean; } export type PostPopoverElement = HTMLElement & PopoverElement; /** * @slot - Default slot for placing content inside the popovercontainer. */ export declare class PostPopovercontainer { private static readonly STATIC_SIDES; private static readonly PROPERTIES_TO_CLEAR; host: HTMLPostPopovercontainerElement; private arrowRef; private eventTarget; private clearAutoUpdate; private toggleTimeoutId; /** * Fires whenever the popovercontainer gets shown or hidden, passing the new state in event.details as a boolean */ postToggle: EventEmitter; /** * Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement. * Popovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted * towards the viewport if they would overlap edge boundaries. */ readonly placement?: Placement; /** * Gap between the edge of the page and the popovercontainer */ readonly edgeGap?: number; /** * Animation style */ readonly animation?: 'pop-in' | null; /** * Whether or not to display a little pointer arrow */ readonly arrow?: boolean; /** * Enables a safespace through which the cursor can be moved without the popover being disabled */ readonly safeSpace?: 'triangle' | 'trapezoid'; /** * Updates cursor position for safe space feature when popover is open. * Sets CSS custom properties for dynamic styling of safe area. * @param event MouseEvent with cursor position */ private mouseTrackingHandler; componentDidLoad(): void; disconnectedCallback(): void; /** * Programmatically display the popovercontainer * @param target An element with [data-popover-target="id"] where the popovercontainer should be shown */ show(target: HTMLElement): Promise; /** * Programmatically hide the popovercontainer */ hide(): Promise; /** * Toggle popovercontainer display * @param target An element with [data-popover-target="id"] where the popovercontainer should be shown * @param force Pass true to always show or false to always hide */ toggle(target: HTMLElement, force?: boolean): Promise; /** * Start or stop auto updates based on popovercontainer events. * Popovercontainers can be closed or opened with other methods than class members, * therefore listening to the toggle event is safer for cleaning up. * @param e ToggleEvent */ private handleToggle; /** * Start listening for DOM updates, scroll events etc. that have * an influence on popovercontainer positioning */ private startAutoupdates; private calculatePosition; private computeMainPosition; private updateSafeSpaceBoundaries; render(): any; } export {};