import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime'; /** * @component BcmPopover * @description A flexible popover component that displays contextual information or content relative to a target element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different sizes, trigger types (click, hover, focus), placements, and comprehensive event system. * * @example Basic Click Popover * * Click Me * Header * This is a simple popover content. * * * @example Hover Popover with Delays * * Hover Me * * * @example Programmatic Control * * Toggle Me * Controlled popover * * * * @slot - Default slot for the target element that triggers the popover * @slot header - Slot for custom header content * @slot content - Slot for custom popover content * * @csspart popover - The root popover container element, stylable for the entire popover * @csspart header - The header section of the popover, stylable for the title area * @csspart content - The content section of the popover, stylable for the main content area * @csspart arrow - The arrow element of the popover, stylable for the positioning arrow */ export declare class Popover implements ComponentInterface { host: HTMLElement; private triggerRef?; private popoverRef?; private arrowRef?; private cleanupAutoUpdate?; private showTimeout?; private hideTimeout?; private popoverId; /** * @prop {('small' | 'medium' | 'large')} size - Defines the size of the popover. * Controls the text size and padding of the popover content. * Default: 'medium' */ size: 'small' | 'medium' | 'large'; /** * @prop {('top' | 'right' | 'bottom' | 'left')} placement - Defines the position of the popover relative to the target element. * Determines where the popover appears around the trigger element. * Default: 'top' */ placement: 'top' | 'right' | 'bottom' | 'left'; /** * @prop {('click' | 'hover' | 'hover focus')} trigger - Defines the interaction type to show/hide the popover. * 'click' toggles on click, 'hover' shows on mouse enter and hides on mouse leave, 'hover focus' combines both. * Default: 'click' */ trigger: 'click' | 'hover' | 'hover focus'; /** * @prop {number} showDelay - Delay in milliseconds before showing the popover. * Useful to prevent popovers from appearing on quick mouse movements. * Default: 0 */ showDelay: number; /** * @prop {number} hideDelay - Delay in milliseconds before hiding the popover. * Provides a grace period for mouse movements. * Default: 0 */ hideDelay: number; /** * @prop {boolean} open - Controls the open state of the popover. * Can be set programmatically or toggled by user interaction. * Default: false */ open: boolean; /** * @prop {boolean} closeOnOutsideClick - Whether to close the popover when clicking outside. * Default: true */ closeOnOutsideClick: boolean; /** * @prop {boolean} closeOnEscape - Whether to close the popover when pressing Escape key. * Default: true */ closeOnEscape: boolean; /** * @prop {string} headerText - Custom text for the popover header. * Used as fallback content if the 'header' slot is not provided. */ headerText?: string; /** * @prop {string} message - Custom text for the popover content. * Used as fallback content if the 'content' slot is not provided. */ message?: string; /** * @prop {boolean} arrow - Whether to show an arrow pointing to the trigger element. * Default: true */ arrow: boolean; isOpen: boolean; /** * @event bcmBeforeOpen - Emitted before the popover opens. * Useful for performing actions before the popover becomes visible. */ bcmBeforeOpen: EventEmitter; /** * @event bcmOpen - Emitted when the popover is opened. * Useful for tracking when the popover becomes visible. */ bcmOpen: EventEmitter; /** * @event bcmBeforeClose - Emitted before the popover closes. * Useful for performing actions before the popover is hidden. */ bcmBeforeClose: EventEmitter; /** * @event bcmClose - Emitted when the popover is closed. * Useful for tracking when the popover is hidden. */ bcmClose: EventEmitter; handleOpenChange(newValue: boolean): void; private showInternal; private hideInternal; /** * Programmatically shows the popover. * Respects the showDelay prop. */ show(): Promise; /** * Programmatically hides the popover. * Respects the hideDelay prop. */ hide(): Promise; /** * Toggles the popover visibility. */ toggle(): Promise; private clearTimeouts; private startAutoUpdate; private stopAutoUpdate; private handleSlotChange; private setupTriggerListeners; private removeTriggerListeners; private handleMouseEnter; private handleMouseLeave; private handlePopoverMouseEnter; private handlePopoverMouseLeave; private handleTriggerClick; private handleFocus; private handleBlur; private setupAriaAttributes; handleKeyDown(event: KeyboardEvent): void; private handleOutsideClick; private addOutsideClickListener; private removeOutsideClickListener; private handleToggle; componentDidLoad(): void; disconnectedCallback(): void; private updatePosition; private popoverClass; render(): any; }