import React, { FC, CSSProperties, Ref, ReactNode } from 'react'; import { FormElementProps } from './FormElement'; import { DropdownMenuProps } from './DropdownMenu'; import { Bivariant } from './typeUtils'; /** * */ type PicklistValue = string | number; type PicklistValueType = Multi extends true ? Array : Multi extends false | undefined ? PicklistValue | null : Array | string | number | null; /** * */ export type PicklistProps = { id?: string; className?: string; label?: string; required?: boolean; multiSelect?: MultiSelect; error?: FormElementProps['error']; cols?: number; name?: string; value?: PicklistValueType; defaultValue?: PicklistValueType; selectedText?: string; optionsSelectedText?: string; opened?: boolean; defaultOpened?: boolean; disabled?: boolean; menuSize?: DropdownMenuProps['size']; menuStyle?: CSSProperties; tooltip?: ReactNode; tooltipIcon?: string; elementRef?: Ref; buttonRef?: Ref; dropdownRef?: Ref; onValueChange?: Bivariant<(newValue: PicklistValueType, prevValue: PicklistValueType) => void>; onSelect?: Bivariant<(value: PicklistValue) => void>; onKeyDown?: (e: React.KeyboardEvent) => void; onBlur?: () => void; onComplete?: () => void; children?: React.ReactNode; }; /** * */ export declare const Picklist: ((props: PicklistProps) => ReturnType) & { isFormElement: boolean; }; /** * */ export type PicklistItemProps = { label?: React.ReactNode; value?: string | number; selected?: boolean; disabled?: boolean; icon?: string; iconRight?: string; divider?: 'top' | 'bottom'; onClick?: (e: React.SyntheticEvent) => void; children?: React.ReactNode; }; /** * */ export declare const PicklistItem: FC; export {};