import React from 'react'; import { DropdownOption } from './dropdown-list'; import { Position, Size } from '../../utils/positioning-utils'; import type { WithNullableEventHandlers } from '../../types'; declare type Props = WithNullableEventHandlers<{ containerClassNames?: string; content?: any; /** * NOTE: will react to hover/click events on this node to open dropdown. */ triggerNode: any; options?: Array; title?: string; className?: string | null; footerTitle?: any; /** * NOTE: if provided, then dropdown will be positioned around this particular HTML element. For example: * * * * * } * /> * * if not provided, triggerNode will be used as an anchor node. */ anchorNode?: HTMLElement; portalNode?: HTMLElement; showArrow?: boolean; onFooterClick?: () => void; onVisibilityChange?: (visibility: boolean) => void; } & Partial>; declare type DefaultProps = { arrowPosition: 'start' | 'center' | 'end'; triggerEvents: Array | string; position: Position; visible: boolean; disabled: boolean; name: string; scroll: boolean; theme: 'dark' | 'light'; }; declare type State = { isDropdownVisible: boolean; overriddenPosition: Position | null | undefined; dropdownStyle: any; arrowOffset: number | null | undefined; }; export default class Dropdown extends React.PureComponent { _dropdownPortalRef: HTMLDivElement | null | undefined; _triggerNodeRef: HTMLDivElement | null | undefined; static displayName: string; static defaultProps: DefaultProps; constructor(props: any, context: any); state: State; componentDidMount(): void; componentWillReceiveProps(nextProps: Props): void; componentDidUpdate(prevProps: Props, prevState: State): void; _getState: (props: Props) => State; /** * NOTE: triggerEvents can be either a string or an array. * The component will react to hover events if: * 1) this.props.triggerEvents === 'hover' * or * 2) this.props.triggerEvents is an array of string and one of them is 'hover' */ _isHoverEnabled: () => boolean; _isOnClickEnabled(props?: Props): boolean; _createEventHandlers(): {}; _getAnchorRect: (props: Props) => ClientRect; _getContentSize: () => Size; _updateArrowCssVariable: (position: Position) => void; _setDropdownPortalRef(node: HTMLDivElement): void; _setTriggerNodeRef(node: HTMLDivElement): void; _handleDropdown: () => void; _handleWindowResize: () => void; _handleMouseEnter: () => void; _handleMouseLeave: () => void; render(): JSX.Element; } export {};