import React from 'react'; import { PopContentPosition } from './Content'; export interface PopProps { content?: any; trigger?: 'hover' | 'click' | 'focus'; position?: PopContentPosition; delay?: number | number[]; visible?: boolean; defaultVisible?: boolean; disabled?: boolean; withArrow?: boolean; onChange?: (visible: boolean) => void; className?: string; style?: React.CSSProperties; contentClassName?: string; contentStyle?: React.CSSProperties; } export interface PopState { visible?: boolean; delays?: (number | undefined)[]; } export declare class Pop extends React.Component { static defaultProps: PopProps; static getDerivedStateFromProps(props: PopProps): PopState; state: PopState; isHovered: boolean; popRoot: HTMLElement | null; triggerRef: React.RefObject; updateTimer?: number; componentDidUpdate(): void; componentWillUnmount(): void; handleTriggerClick: () => void; handleBodyClick: () => void; handlePopMouseEnter: () => void; handlePopMouseLeave: () => void; handleMouseEnter: () => void; handleFocus: () => void; handleBlur: () => void; /** * 更新 visible * - 如果是受控的,则触发 change 事件,由外部更新 visible * - 如果不是受控的,则直接在组件内部调用 setState 更新 visible */ updateVisible(visible: boolean, force?: boolean): void; getTriggerRef: () => React.RefObject; render(): JSX.Element; } export default Pop;