import * as React from 'react'; import { Component } from 'react'; import noop from 'zent/es/utils/noop'; import PopoverContent from './Content'; import PopoverTrigger from './trigger/Trigger'; import { IPopoverContext } from './PopoverContext'; import { PositionFunction } from './position-function'; export interface IPopoverProps { position: PositionFunction; cushion?: number; display?: string; onShow?: () => void; onClose?: () => void; onBeforeShow?: (callback?: () => void, escape?: () => void) => void; onBeforeClose?: (callback?: () => void, escape?: () => void) => void; containerSelector?: string; visible?: boolean; onVisibleChange?: (visible: boolean) => void; onPositionUpdated?: () => void; onPositionReady?: () => void; className?: string; wrapperClassName?: string; width?: number | string; prefix?: string; } export interface IPopoverState { visible?: boolean; } export declare class Popover extends Component { static defaultProps: { prefix: string; className: string; wrapperClassName: string; display: string; onBeforeClose: typeof noop; onBeforeShow: typeof noop; onClose: typeof noop; onShow: typeof noop; cushion: number; containerSelector: string; onPositionUpdated: typeof noop; onPositionReady: typeof noop; }; static contextType: React.Context; static Content: typeof PopoverContent; static Trigger: { Click: typeof import("./trigger/ClickTrigger").default; Hover: typeof import("./trigger/HoverTrigger").default; Focus: typeof import("./trigger/FocusTrigger").default; Base: typeof PopoverTrigger; }; static Position: { create: typeof import("./placement/create").default; Arrow: { create: typeof import("./arrow-position/create").default; ArrowBottomLeftPosition: PositionFunction; ArrowBottomRightPosition: PositionFunction; ArrowLeftTopPosition: PositionFunction; ArrowLeftBottomPosition: PositionFunction; ArrowRightTopPosition: PositionFunction; ArrowRightBottomPosition: PositionFunction; ArrowTopLeftPosition: PositionFunction; ArrowTopRightPosition: PositionFunction; }; BottomLeft: PositionFunction; BottomCenter: PositionFunction; BottomRight: PositionFunction; LeftTop: PositionFunction; LeftCenter: PositionFunction; LeftBottom: PositionFunction; RightTop: PositionFunction; RightCenter: PositionFunction; RightBottom: PositionFunction; TopLeft: PositionFunction; TopCenter: PositionFunction; TopRight: PositionFunction; AutoBottomLeft: PositionFunction; AutoBottomRight: PositionFunction; AutoBottomCenter: PositionFunction; AutoTopLeft: PositionFunction; AutoTopRight: PositionFunction; AutoTopCenter: PositionFunction; }; static withPopover: (Comp: React.ComponentType) => React.ComponentType>; registerDescendant: (popover: Popover) => void; unregisterDescendant: (popover: Popover) => void; getPopoverContext: () => IPopoverContext; context: IPopoverContext; id: string; isUnmounted: boolean; descendants: Popover[]; pendingOnBeforeHook: boolean; triggerNode: HTMLElement | null; triggerInstance: PopoverTrigger; contentInstance: PopoverContent; isOutsideSelf: (el: HTMLElement) => boolean | null; constructor(props: any); isVisibilityControlled(props?: IPopoverProps): boolean; getVisible: (props?: IPopoverProps, state?: IPopoverState) => boolean; setVisible: (visible: boolean, props?: IPopoverProps, state?: IPopoverState) => void; getPopoverNode: () => Element; onTriggerRefChange: (triggerInstance: any, nodeFilter: any) => void; onContentRefChange: (contentInstance: any) => void; getTriggerNode: () => HTMLElement; adjustPosition(): void; onPositionUpdated: () => void; open: () => void; close: () => void; injectIsOutsideSelf: (impl: any) => void; isOutsideStacked: (node: any) => boolean; validateChildren(): { trigger: any; content: any; }; safeSetState(updater: any, callback?: () => void): void; componentDidMount(): void; componentDidUpdate(prevProps: any, prevState: any): void; componentWillUnmount(): void; render(): JSX.Element; } export default Popover;