import './Dropdown.css'; import React from 'react'; import { ActionTooltipList } from '../ActionTooltip/ActionTooltip'; export type IList = { label: string | React.ReactNode; action?: Function; default?: boolean; searchKey?: string; value?: string | React.ReactNode | Element; textLabel?: string; disable?: boolean; closeDropdownOnSelect?: boolean; actionTooltip?: boolean; actionTooltipProps?: { list: Array; }; allowMultipleSelects?: boolean; isDropDisabled?: boolean; testId?: string; className?: string; /** * @highlightItem * used to active multiple items in dropdown, used when dropdown is variant * Can be enabled by variant.enableHighlightItem from IDropdownOption interface */ highlightItem?: boolean; }; export type IDropdown = { list: Array; lists?: Array>; type: 'click' | 'hover' | 'select'; children?: React.ReactNode | Element; withSearch?: boolean; isSearchDisabled?: boolean; dropDownPosition?: 'top' | 'bottom' | 'left' | 'right'; withArrow?: boolean; className?: string; dropDownType?: 'primary' | 'secondary' | 'tertiary' | 'quaternary'; closeAfterSelect?: boolean; isEllipse?: boolean; isMultiCheck?: boolean; title?: string; searchPlaceholder?: string; onChange?: (data?: any) => void; viewAs?: 'label' | 'value'; highlightActive?: boolean; headerLabel?: string; arrowSecondary?: boolean; emptyPlaceholder?: string; adjustWidthForContent?: boolean; withIcon?: boolean; maxWidth?: string | number; style?: object; testId?: string; onListScroll?: any; portalId?: string; withPortal?: boolean; headerPortalId?: string; ellipseAlignment?: string; dragDropProps?: Object; isDisabled?: boolean; isOpen?: boolean; infoComponent?: any; canCloseOnClickOutside?: boolean; version?: 'v1' | 'v2'; selectedAriaLabel?: string; portalTopOffSet?: number; portalLeftOffSet?: number; portalZindex?: number; prefix?: React.ReactNode; onCloseDropdown?: (data?: boolean) => void; callActionOnMenuVisible?: () => void; isDataLoading?: boolean; /** * @variant * Current variant support is 'group' in click dropdown */ variant?: { /** * @name * group: used to show group of items in dropdown, where we can split the items in group * and in each group one item will be selected */ name?: 'group'; /** * @enableHighlightItem * enable each item to be highlighted in dropdown, * based on client logic will be applied on highlightItem in list item */ enableHighlightItem?: boolean; /** * @dividerItemIndexes * used to split the group items in dropdown, where we can split the items in group */ dividerItemIndexes?: number[]; /** * @onlyDivider * used to split the group items in dropdown, used to show only split items in dropdown */ onlyDivider?: boolean; }; dropdownChevronIcon?: string; }; export declare function useComponentVisible(initialIsVisible: boolean, isOpen?: boolean, canCloseOnClickOutside?: boolean): { ref: any; menuRef: any; headerRef: any; headerEleRef: any; isComponentVisible: boolean; setIsComponentVisible: React.Dispatch>; }; declare const Dropdown: React.FunctionComponent; export default Dropdown;