import * as React from 'react'; import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom'; export declare enum DropdownDropDirection { down = "down", left = "left", right = "right", up = "up" } export declare enum DropdownAlignment { start = "start", end = "end" } export interface DropdownApi { closeDropdownManually(event: React.SyntheticEvent): void; openDropdownManually(event: React.SyntheticEvent): void; } export interface DropdownProps extends React.HTMLAttributes { /** * Index of the item that will active/selected. If none is provided, no item will appear active * @default -1 */ activeIndex?: number; /** * Alignment of the dropdown content * @default DropdownAlignment.start * @deprecated = true */ alignment?: DropdownAlignment; /** * The ref object that allows Dropdown manipulation. * Actions available: * closeDropdownManually(event: React.SyntheticEvent): void - Closes the dropdown manually. * openDropdownManually(event: React.SyntheticEvent): void - Opens the dropdown manually. */ apiRef?: React.MutableRefObject; /** * Position of the dropdown content * @default DropdownDropDirection.down * @deprecated = true */ dropDirection?: DropdownDropDirection; /** * If true, the component will have inverse styling to better appear on a dark background * @default false */ isInverse?: boolean; /** * Max-height of dropdown content * @default 250px */ maxHeight?: string | number; /** * Function called when closing the dropdown menu */ onClose?: (event: React.SyntheticEvent) => void; /** * Function called when opening the dropdown menu */ onOpen?: () => void; /** * @internal */ testId?: string; /** * Width of menu * @default Width of longest menu item */ width?: string | number; } interface DropdownContextInterface { activeItemIndex?: number; alignment?: DropdownAlignment; closeDropdown?: (event: React.SyntheticEvent | React.KeyboardEvent) => void; dropdownButtonId?: React.MutableRefObject; dropDirection?: DropdownDropDirection; floatingStyles?: React.CSSProperties; focusedItem?: Element | null; handleDropdownBlur?: (event: React.FocusEvent) => void; itemRefArray?: React.MutableRefObject[]>; isFixedWidth?: boolean; isInverse?: boolean; isOpen?: boolean; maxHeight?: string; menuRef?: any; openDropdown?: () => void; registerDropdownMenuItem: (itemRefArray: React.MutableRefObject[]>, itemRef: React.MutableRefObject) => void; setActiveItemIndex?: React.Dispatch>; setFocusedItem?: React.Dispatch>; setIsOpen: React.Dispatch>; setFloating?: (node: ReferenceType) => void; setReference?: (node: ReferenceType) => void; toggleRef?: any; leftButtonRef?: React.MutableRefObject; width?: string; } export declare const DropdownContext: React.Context; export declare const useDropdownContext: () => DropdownContextInterface; export declare const Dropdown: React.ForwardRefExoticComponent>; export {};