import React from 'react'; import { InputLabelProps } from '../InputLabel'; export declare const sizeClasses: { default: string; small: string; large: string; xlarge: string; }; export declare const variantControlClasses: { default: string; secondary: string; }; export declare const variantValueClasses: { default: string; secondary: string; }; export declare const variantSelectedClasses: { default: string; secondary: string; }; export declare const variantDisabledClasses: { default: string; secondary: string; }; export declare const varianErrorClasses: { default: string; secondary: string; }; export interface CustomOptionProps { value: string | number; label: string; icon?: string | undefined; isDisabled?: boolean | undefined; } export interface CustomGroupedOptionsProps { label: string; options: CustomOptionProps[]; } export declare type DropdownVariant = 'default' | 'secondary'; export declare const Dropdown: React.MemoExoticComponent>>; export interface DropdownProps { /** * Options displayed inside dropdown * */ options: CustomOptionProps[] | CustomGroupedOptionsProps[]; placeholder?: string; onChange?: (option: CustomOptionProps) => void; onBlur?: (event: React.FocusEvent) => void; /** * Changes the size of dropdown * @default default * */ size?: keyof typeof sizeClasses; /** * Changes the size of dropdown * @default default * */ variant?: DropdownVariant; /** * Keep marked the selected option on clicked * @default false * */ markSelectedOption?: boolean; /** * A fixed value doenst change and keep selected * */ fixedValue?: CustomOptionProps; /** * Makes the field writeable and return the matched options * @default false * */ isSearchable?: boolean; /** * Disable entire dropdown * @default false * */ disabled?: boolean; /** * The string showed if the options are empty or search result is empty * @default "Vazio" * */ emptyMessage?: string; /** * Must show group length on the group heading * */ showGroupLength?: boolean; /** * Help text * */ label?: string; labelComplement?: InputLabelProps['labelComplement']; /** Should display the label above the dropdown * @default '' * */ helpText?: string; /** Should display error state and the message * @default '' * */ errorMessage?: string; /** * Requires at least one option marked on dropdown * @default false * */ required?: boolean; /** * Initial default value for the dropdown * */ defaultValue?: CustomOptionProps; /** * Max height for the options menu container * */ maxMenuHeight?: number; /** * The CSS position value of the menu, when "fixed" extra layout management is required * @default 'absolute' * */ menuPosition?: 'fixed' | 'absolute'; /** * Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control. * @default 'auto' * */ menuPlacement?: 'top' | 'bottom' | 'auto'; /** * Width of menu containing the options * @default '100%' * */ menuWidth?: string; /** * Can align the menu in different positions if the menuWidth is bigger than the width of select * */ menuHorizontalPlacement?: 'left' | 'right'; id?: string; name?: string; }