import React, { ReactNode } from 'react'; import type { ReferenceChildrenProps } from 'react-popper'; import { Theme } from '@rescui/ui-contexts'; import type { Placement } from '@popperjs/core'; import { DropdownMaxWidth, DropdownMinWidth } from './custom-modifiers'; export declare type DropdownTrigger = ((props: ReferenceChildrenProps) => JSX.Element) | JSX.Element; export interface DropdownProps { trigger: DropdownTrigger; isOpen: boolean; onRequestClose?: () => void; theme?: Theme; maxHeight?: number; /** Least possible maxHeight value, even if there is less space let on the screen. It's not the same thing as minHeight because actual height still depends on dropdown content which can be smaller. Eg. leastMaxHeight equals to item height at DropdownMenu */ leastMaxHeight?: number; /** * See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width). * `trigger` is a special value that substitutes with trigger's width calculated on every dropdown position update * @type 'trigger' | MinWidthProperty; * */ minWidth?: DropdownMinWidth; /** * See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width). * `trigger` is a special value that substitutes with trigger's width calculated on every dropdown position update * @type 'trigger' | MaxWidthProperty; * */ maxWidth?: DropdownMaxWidth; className?: string; mode?: 'classic' | 'rock'; placement?: Placement; /** @ignore */ cancelCloseAnimation?: boolean; children?: ReactNode; closeOnEsc?: boolean; closeOnTab?: boolean; disableFocusLock?: boolean; /** Render dropdown inside trigger function or wrapper. May be useful when the trigger placed in the fixed layout. */ renderInTrigger?: boolean; } export interface DropdownImperativeHandle { scheduleUpdate: () => void; } export declare const Dropdown: React.ForwardRefExoticComponent>; export default Dropdown;