import React from 'react'; import type { LangProps, TPAComponentProps } from '../../types'; import { ErrorMessageWrapperProps } from '../internal/ErrorMessageWrapper'; import type { AppendTo, Placement } from '../internal/WixUiCoreComponents/components/CorePopover'; export declare enum DropdownAlignment { center = "center" } export declare enum DropdownTheme { Line = "line", Box = "box" } export interface DropdownProps extends TPAComponentProps, LangProps { options: DropdownOptionProps[]; optionsContainerId?: string; onChange?(selectedOption: DropdownOptionProps): void; onExpandedChange?(isExpanded: boolean): void; /** Use for a Controlled input. Must provide onChange handler. */ selectedId?: string; /** Use for an Uncontrolled input. */ initialSelectedId?: string; placeholder?: string; disabled?: boolean; readOnly?: boolean; error?: boolean; /** Appearance of error message. TextOnly | BackgroundAndBorder */ errorAppearance?: ErrorMessageWrapperProps['errorAppearance']; errorMessage?: string; /** Placement for Popover. Optional. */ errorTooltipPlacement?: Placement; theme?: DropdownTheme; label?: string; alignment?: DropdownAlignment; placement?: Placement; 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-required'?: boolean; /** Whether to display an asterisk, applicable only when aria-required is true */ showAsterisk?: boolean; mobileNativeSelect?: boolean; forceContentElementVisibility?: boolean; upgrade?: boolean; flip?: boolean; fixed?: boolean; /** Element to append the Popover to */ appendTo?: AppendTo; name?: string; optionsContainerZIndex?: number; optionsContainerClass?: string; 'aria-describedby'?: string; /** Custom aria label for loading spinner */ 'loading-aria-label'?: string; /** * popovers content is set to minimum width of trigger element, * but it can expand up to the value of maxWidth. */ dynamicWidth?: boolean; newErrorMessage?: boolean; outerBorder?: boolean; /** Provide custom ID for a11y wiring when using custom label. */ dropdownId?: string; isLoading?: boolean; } export interface DropdownDefaultProps { placeholder: string; options: DropdownOptionProps[]; placement: Placement; upgrade: boolean; mobileNativeSelect: boolean; theme: DropdownTheme; } export interface DropdownState { selectedOption: DropdownOptionProps; ariaActivedescendant: string | null; isOpen: boolean; isErrorTooltipShown: boolean; focused: boolean; } export declare enum DropdownOptionTextOverflow { ellipsis = "ellipsis", wrap = "wrap" } export interface DropdownOptionProps { id?: string; value?: string; subtitle?: React.ReactNode; isSelectable?: boolean; isDisabled?: boolean; isSectionTitle?: boolean; icon?: React.ReactElement; suffix?: React.ReactElement; divider?: boolean; unavailable?: boolean; indentIcon?: boolean; /** * Defines how the dropdown option should wrap when it does not fit. */ textOverflow?: DropdownOptionTextOverflow; isFocused?: boolean; descendantId?: string; } export interface DropdownNativeSelectProps extends TPAComponentProps { onSelect(selectedOption: DropdownOptionProps): void; selectedOption: DropdownOptionProps; options: DropdownOptionProps[]; placeholder: string; disabled: boolean; error?: boolean; errorMessage?: string; 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-required'?: boolean; id?: string; name?: string; errorComponent: any; readOnly: boolean; newErrorMessage?: boolean; innerRef?: React.RefObject; isLoading?: boolean; 'loading-aria-label'?: string; } export interface DropdownBaseProps { selectedOption: DropdownOptionProps; placeholder: string; disabled: boolean; error: boolean; readOnly: boolean; isExpanded: boolean; 'aria-activedescendant'?: string; 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-describedby'?: string; 'aria-required'?: boolean; 'aria-controls'?: string; id?: string; upgrade: boolean; rtl: boolean; isLoading?: boolean; 'loading-aria-label'?: string; } export interface DropdownInputHandle { focus(options?: FocusOptions): void; } //# sourceMappingURL=types.d.ts.map