import { Emitter, RefObject } from '@mantou/gem/lib/decorators'; import { GemElement, TemplateResult } from '@mantou/gem/lib/element'; import { StyleObject } from '@mantou/gem/lib/utils'; import './reflect'; export declare type PopoverState = { open: boolean; left: number; right: number; top: number; bottom: number; style: StyleObject; position: Position; }; declare type Position = 'top' | 'bottom' | 'right' | 'left' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'; declare type GhostStyle = { '--bg': string; '--color': string; }; declare type Option = { delay?: number; unreachable?: boolean; content?: string | TemplateResult; position?: Position; ghostStyle?: GhostStyle; trigger?: 'click' | 'hover'; }; declare type CloseCallback = { (): void; instance: DuoyunPopoverElement; }; /** * @customElement dy-popover * @attr debug * @attr position * @attr trigger */ export declare class DuoyunPopoverElement extends GemElement { #private; debug: boolean; unreachable: boolean; trigger: 'click' | 'hover'; position: Position | 'auto'; content?: string | TemplateResult; popoverRef: RefObject; slotRef: RefObject; open: Emitter; close: Emitter; static open(e: Element, option: Option): CloseCallback; static open(x: number, y: number, option: Option): CloseCallback; static open(xywh: number[], option: Option): CloseCallback; ghostStyle: GhostStyle; state: PopoverState; constructor({ delay, content, position, ghostStyle, trigger, unreachable }?: Option); get popoverElement(): DuoyunPopoverGhostElement | undefined; mounted: () => void; render: () => TemplateResult; } export declare const Popover: typeof DuoyunPopoverElement; /** * @customElement dy-popover-ghost */ export declare class DuoyunPopoverGhostElement extends GemElement { #private; close: Emitter; mounted: () => () => void; } export {}; //# sourceMappingURL=popover.d.ts.map