import { Placement } from '@floating-ui/dom'; import { Ref } from 'lit/directives/ref.js'; import { TestableLitElement } from '../../utils/components/testable-lit-element/testable-lit-element.ts'; import { PropertyValues } from 'lit'; export type NJC_POPOVER_SIZE = 'small' | 'medium' | 'large'; export declare class NjcPopover extends TestableLitElement { /** * @property {string} referenceId * @description The id of the reference element that is used to trigger the popover */ referenceId: string; /** * @property {string} title * @description The title for the popover */ title: string; /** * @property {Placement} placement * @description The placement of the popover relative to the reference element */ placement: Placement | undefined; /** * @property {number} xOffset * @description X offset of the popover's position */ xOffset: number; /** * @property {number} yOffset * @description Y offset of the popover's position */ yOffset: number; /** * @property {string} iconName * @description The name of the icon to use in the content of the popover */ iconName: string | undefined; /** * @property {string} errorText * @description The error text that is shown in the footer of the popover */ errorText: string | undefined; /** * @property {NJC_POPOVER_SIZE} size * @description The size of the popover */ size: NJC_POPOVER_SIZE; /** * @property {string} showOnHover * @description If true, the popover will show on hover of the reference element. If false, * the popover will be shown on click of the reference element. */ showOnHover: boolean; _popoverRef: Ref; _cleanup: (() => void) | undefined; private _forceOpen; private _open; private _mousedInsidePopover; protected _placement: Placement; popoverId: string; get isOpen(): boolean; firstUpdated(): void; protected updated(_changedProperties: PropertyValues): void; get referenceElement(): HTMLElement; private _addShowOnHoverEvents; private _addShowOnClickEvents; private _hasPopoverAsParent; elementListeners: WeakMap; addTrackedEventListener(element: HTMLElement | Document, eventType: string, listener: Function, options?: AddEventListenerOptions): void; removeAllTrackedEventListeners(element: HTMLElement | Document): void; _handleMouseLeave(e: MouseEvent, referenceElement: HTMLElement, popoverElement: HTMLElement): void; _isMouseInside(e: MouseEvent, rect: DOMRect, padding?: number): boolean; showPopover(triggeredByKeyboard?: boolean): void; hidePopover(): void; protected _getKeyboardFocusableElements(): HTMLElement[]; protected _focusFirstElement(useVisibleFocus?: boolean): void; /** * Override this function to use floating UI autoUpdate and computePosition */ protected assignPosition(): void; disconnectedCallback(): void; }