import { ReactNode } from 'react'; import { Placement } from '@floating-ui/react'; import { default as DropdownCheckboxItem } from './DropdownCheckboxItem'; export interface DropdownApi { visible: boolean; isFocused: string | null; menuRef: React.MutableRefObject; triggerRef: React.MutableRefObject; setVisible: (visible: boolean) => void; openDropdown: () => void; closeDropdown: () => void; } export interface DropdownProps { /** Children Props */ children: ReactNode | ((...props: any) => ReactNode); /** Full width Dropdown */ block?: boolean; /** * Add overflow and maxHeight */ overflow?: boolean; /** * Default placement with FloatingUI */ placement?: Placement; /** * If true, the text will not wrap */ noWrap?: boolean; /** * Extra keydown handler for the Dropdown Trigger. * Useful for a11y keyboard navigation between a Dropdown element and other elements, * for example in the Toolbar component. */ extraTriggerKeyDownHandler?: (event: React.KeyboardEvent) => void; /** * Callback to get notified when dropdown `visible` state changes (opened/closed). */ onToggle?: (visible: boolean) => void; /** * Whether the trigger is hovered or not. */ isTriggerHovered?: boolean; /** * Whether to focus the first element when the dropdown is opened. */ focusOnVisible?: boolean; /** * Whether to open the dropdown on space key press. */ openOnSpace?: boolean; /** * Whether to focus the element on mouse enter. */ focusOnMouseEnter?: boolean; } export type DropdownMenuOptions = { /** * Object type */ type?: undefined; /** * Icon component */ icon: JSX.Element; /** * Label for a11y */ label: string; /** * Action OnClick */ action: (elem: any) => any; } | { /** * Object type */ type: 'divider'; }; declare const Dropdown: import('react').ForwardRefExoticComponent> & { Trigger: import('react').ForwardRefExoticComponent & import('react').RefAttributes>; Menu: import('react').ForwardRefExoticComponent & import('react').RefAttributes>; Item: { ({ type, icon, onClick, children, className, minWidth, disabled, searchValue, ...restProps }: import('./DropdownItem').DropdownItemProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; Separator: { (): import("react/jsx-runtime").JSX.Element; displayName: string; }; CheckboxItem: { ({ children, value, model, onChange, searchValue, }: DropdownCheckboxItem): import("react/jsx-runtime").JSX.Element; displayName: string; }; RadioItem: { ({ children, value, model, onChange, searchValue, }: import('./DropdownRadioItem').DropdownRadioItemProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; MenuGroup: import('react').ForwardRefExoticComponent>; SearchInput: { ({ placeholder, noResultsLabel, onSearch, }: import('./DropdownSearchInput').DropdownSearchInputProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; }; export default Dropdown;