UNPKG

@ozen-ui/kit

Version:

React component library

71 lines (70 loc) 3.87 kB
import type { AutocompleteDefaultOption, AutocompletePropGetOptionDisabled, AutocompletePropGetOptionKey, AutocompletePropGetOptionLabel, AutocompleteProps } from './types'; export declare const defaultGetOptionKey: AutocompletePropGetOptionKey<AutocompleteDefaultOption>; export declare const defaultGetOptionLabel: AutocompletePropGetOptionLabel<AutocompleteDefaultOption>; export declare const defaultGetOptionDisabled: AutocompletePropGetOptionDisabled<AutocompleteDefaultOption>; export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTION>): { options: OPTION[]; size?: import("../../types/FormElementSizeVariant").FormElementSizeVariant; value?: import("./types").AutocompletePropValue<OPTION>; defaultValue?: import("./types").AutocompletePropValue<OPTION>; open?: boolean; defaultOpen?: boolean; onChange?: ((e: import("react").SyntheticEvent | KeyboardEvent, value: OPTION | null) => void) | undefined; inputValue?: string; onInputChange?: (e: import("react").ChangeEvent<HTMLInputElement> | null, value: string) => void; renderInput?: import("./types").AutocompleteRenderInput; renderOption?: import("./types").AutocompletePropRenderOption<OPTION> | undefined; getOptionLabel?: AutocompletePropGetOptionLabel<OPTION> | undefined; getOptionKey?: AutocompletePropGetOptionKey<OPTION> | undefined; getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION> | undefined; disableCloseOnSelect?: boolean; allowCustomValue?: boolean; loading?: boolean; noOptionsText?: import("react").ReactNode; clearText?: string; openText?: string; closeText?: string; loadingText?: import("react").ReactNode; onClose?: () => void; onOpen?: () => void; disableClearButton?: boolean; searchFunction?: import("./types").AutocompleteSearchFunction<OPTION> | undefined; disableShowEmptyOptionsList?: boolean; disableShowChevron?: boolean; dataListProps?: Partial<Omit<import("../DataList").DataListProps, "onSelect" | "open" | "multiple" | "onClose" | "selected" | "anchorRef">>; ref?: import("react").Ref<HTMLDivElement>; } & { error?: boolean | undefined; label?: string | undefined; style?: import("react").CSSProperties | undefined; autoFocus?: boolean | undefined; className?: string | undefined; onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined; disabled?: boolean | undefined; placeholder?: string | undefined; required?: boolean | undefined; fullWidth?: boolean | undefined; hint?: string | null | undefined; disableStroke?: boolean | undefined; renderLeft?: import("../FieldIcon").FieldIconProps["icon"]; renderRight?: import("../FieldIcon").FieldIconProps["icon"]; inputProps?: import("../FieldInput").FieldInputProps | undefined; bodyProps?: import("react").ComponentPropsWithRef<"label"> | undefined; hintProps?: Omit<import("../FieldHint").FieldHintProps, "children"> | undefined; } & (OPTION extends { label: AutocompleteDefaultOption["label"]; } ? object : { getOptionLabel?: AutocompletePropGetOptionLabel<OPTION> | undefined; }) & (OPTION extends { id: AutocompleteDefaultOption["id"]; } ? object : { getOptionKey?: AutocompletePropGetOptionKey<OPTION> | undefined; }) & (OPTION extends { disabled: AutocompleteDefaultOption["disabled"]; } ? object : { getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION> | undefined; }) & { getOptionLabel: AutocompletePropGetOptionLabel<AutocompleteDefaultOption> | AutocompletePropGetOptionLabel<OPTION>; getOptionKey: AutocompletePropGetOptionKey<AutocompleteDefaultOption> | AutocompletePropGetOptionKey<OPTION>; getOptionDisabled: AutocompletePropGetOptionDisabled<AutocompleteDefaultOption> | AutocompletePropGetOptionDisabled<OPTION>; };