import * as React from 'react';
import { HTMLAttributes, ReactNode, CSSProperties } from 'react';
import { c as BaseAppearance } from '../../types-961bd33013f0.js';
import '@radix-ui/react-context-menu';
type UnifiedDropdownMode = 'action' | 'checkbox' | 'multi' | 'radio' | 'searchable' | 'single' | 'tree';
type UnifiedDropdownValue = string | string[];
interface UnifiedDropdownOption {
value: string;
label: ReactNode;
textValue?: string;
description?: ReactNode;
icon?: ReactNode;
disabled?: boolean;
danger?: boolean;
group?: string;
children?: readonly UnifiedDropdownOption[];
}
interface UnifiedDropdownGroup {
value?: string;
label?: ReactNode;
options: readonly UnifiedDropdownOption[];
}
interface UnifiedDropdownSlotContext {
option?: UnifiedDropdownOption;
selected?: boolean;
highlighted?: boolean;
}
interface UnifiedDropdownSlots {
option?: (context: UnifiedDropdownSlotContext) => ReactNode;
empty?: () => ReactNode;
loading?: () => ReactNode;
error?: () => ReactNode;
footer?: () => ReactNode;
}
type UnifiedDropdownPlacement = 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
interface UnifiedDropdownClassNames {
root?: string;
trigger?: string;
content?: string;
search?: string;
group?: string;
groupLabel?: string;
item?: string;
itemLabel?: string;
itemDescription?: string;
empty?: string;
}
interface UnifiedDropdownProps extends Omit, 'children' | 'className' | 'defaultValue' | 'onChange' | 'onSelect' | 'style'> {
mode: UnifiedDropdownMode;
options?: readonly UnifiedDropdownOption[];
groups?: readonly UnifiedDropdownGroup[];
value?: UnifiedDropdownValue;
defaultValue?: UnifiedDropdownValue;
placeholder?: ReactNode;
trigger?: ReactNode;
triggerLabel?: ReactNode;
searchPlaceholder?: string;
emptyLabel?: ReactNode;
loadingLabel?: ReactNode;
clearLabel?: ReactNode;
retryLabel?: ReactNode;
loading?: boolean;
error?: ReactNode;
searchable?: boolean;
clearable?: boolean;
maxSelections?: number;
disabled?: boolean;
invalid?: boolean;
open?: boolean;
defaultOpen?: boolean;
placement?: UnifiedDropdownPlacement;
closeOnSelect?: boolean;
portal?: boolean;
size?: 'default' | 'sm';
width?: 'content' | 'responsive' | 'trigger';
appearance?: BaseAppearance;
slots?: UnifiedDropdownSlots;
className?: string;
classNames?: UnifiedDropdownClassNames;
style?: CSSProperties;
onOpenChange?: (open: boolean) => void;
onValueChange?: (value: UnifiedDropdownValue) => void;
onSelect?: (option: UnifiedDropdownOption) => void;
onAction?: (option: UnifiedDropdownOption) => void;
onClear?: () => void;
onRetry?: () => void;
}
declare const UnifiedDropdown: React.ForwardRefExoticComponent>;
export { UnifiedDropdown, type UnifiedDropdownClassNames, type UnifiedDropdownGroup, type UnifiedDropdownMode, type UnifiedDropdownOption, type UnifiedDropdownPlacement, type UnifiedDropdownProps, type UnifiedDropdownSlotContext, type UnifiedDropdownSlots, type UnifiedDropdownValue };