import { ReactNode } from 'react'; /** * Individual dropdown menu item configuration */ export interface DropdownMenuItem { /** Unique identifier for the menu item */ id: string; /** Display text/content for the menu item */ displayText: ReactNode; /** Optional icon to display before the text */ icon?: ReactNode; /** Click handler for the menu item */ onClick?: (value?: unknown) => void; /** Whether the menu item is disabled */ disabled?: boolean; /** Whether the menu item is currently selected */ selected?: boolean; /** Optional value passed to onClick handler */ value?: unknown; /** Whether to show a divider after this item */ divider?: boolean; /** Whether the display text should be bold */ isBold?: boolean; /** * An invalid item appears disabled but remains hoverable for tooltip * Unlike disabled, which prevents hover interactions */ isInvalid?: boolean; /** Tooltip to show for invalid items */ invalidTooltip?: ReactNode; } /** * Dropdown menu header item (non-interactive section label) */ export interface DropdownMenuHeader { /** Unique identifier */ id: string; /** Header display text */ displayText: ReactNode; /** Marks this as a header item */ isHeader: true; } /** * Dropdown menu divider */ export interface DropdownMenuDivider { /** Marks this as a divider */ type: 'divider'; } /** * Union type for all item types */ export type DropdownMenuItemOrDivider = DropdownMenuItem | DropdownMenuHeader | DropdownMenuDivider; /** * Menu type affects hover behavior styling */ export type DropdownMenuType = 'selection' | 'action' | 'display'; /** * Placement options for the dropdown menu */ export type DropdownMenuPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end'; /** * Size variants for the trigger button */ export type DropdownMenuButtonSize = 'xs' | 'sm' | 'md'; /** * Font size variants for menu items */ export type DropdownMenuFontSize = 'xs' | 'sm' | 'md'; /** * Props for the DropdownMenu component */ export interface DropdownMenuProps { /** Array of menu items, headers, and dividers */ items: DropdownMenuItemOrDivider[]; /** Custom trigger element (defaults to vertical dots icon button) */ trigger?: ReactNode; /** Controlled open state */ open?: boolean; /** Callback when open state changes */ onOpenChange?: (open: boolean) => void; /** Menu placement relative to trigger */ placement?: DropdownMenuPlacement; /** Whether the trigger is disabled */ disabled?: boolean; /** Menu type affects hover styling */ type?: DropdownMenuType; /** Optional title shown at top of menu */ title?: string; /** Size of the default trigger button */ buttonSize?: DropdownMenuButtonSize; /** Whether to use inverse (light on dark) styling */ inverse?: boolean; /** Width of the menu list */ menuListWidth?: string; /** Max height of the menu list (for scrolling) */ menuListHeight?: string; /** Height of individual menu items */ menuItemHeight?: string; /** Whether menu should match trigger width */ useContainerWidth?: boolean; /** Tab index for the trigger button */ buttonTabIndex?: number; /** Callback when menu opens */ onOpen?: () => void; /** Callback when menu closes */ onClose?: () => void; /** Additional CSS class */ className?: string; /** Test identifier for automated testing */ dataTestId?: string; /** Data identifier for ib-ui compatibility */ dataId?: string; /** Font size for menu items */ fontSize?: DropdownMenuFontSize; /** ARIA label for the menu */ 'aria-label'?: string; } /** * Type guard to check if item is a divider */ export declare function isDivider(item: DropdownMenuItemOrDivider): item is DropdownMenuDivider; /** * Type guard to check if item is a header */ export declare function isHeader(item: DropdownMenuItemOrDivider): item is DropdownMenuHeader; /** * Type guard to check if item is a regular menu item */ export declare function isMenuItem(item: DropdownMenuItemOrDivider): item is DropdownMenuItem; //# sourceMappingURL=DropdownMenu.types.d.ts.map