UNPKG

@cavilha/input-autocomplete

Version:

- [Installing](#installing) - [Using](#Using) - [Get Involved](#get-involved) - [License](#license)

54 lines (53 loc) 2.57 kB
import React from 'react'; import { TextInputProps } from '@cavilha/text-input/src/TextInput.types'; import * as S from './InputAutocomplete.styles'; export declare type InputAutocompleteProps = { options?: string[]; onAutocomplete?: (value: string, options: string[]) => string[]; onSearch?: (value: string, options: string[]) => string[]; allowClear?: boolean; onAutocompleteClick?: (value: string, optionValue: string) => string; } & S.Variants & TextInputProps; declare const InputAutocomplete: React.ForwardRefExoticComponent<{ options?: string[] | undefined; onAutocomplete?: ((value: string, options: string[]) => string[]) | undefined; onSearch?: ((value: string, options: string[]) => string[]) | undefined; allowClear?: boolean | undefined; onAutocompleteClick?: ((value: string, optionValue: string) => string) | undefined; } & import("@stitches/react/types/styled-component").TransformProps<{}, { sm: string; md: string; lg: string; }> & Omit<import("@stitches/react/types/styled-component").TransformProps<{ labelIcon?: boolean | "true" | "false" | undefined; iconPosition?: "left" | "right" | undefined; as?: "input" | "textarea" | undefined; isFilled?: boolean | "true" | "false" | undefined; }, { sm: string; md: string; lg: string; }>, "as" | "labelIcon" | "iconPosition"> & { floatingLabel?: boolean | undefined; as: "input" | "textarea"; id?: string | undefined; label?: string | undefined; value?: string | undefined; placeholder?: string | undefined; type?: "number" | "text" | "tel" | "url" | "email" | "password" | undefined; name?: string | undefined; labelIcon?: import("@fortawesome/fontawesome-svg-core").IconProp | undefined; iconPosition?: "left" | "right" | undefined; caption?: string | JSX.Element | JSX.Element[] | undefined; hasError?: boolean | undefined; errorMessage?: string | undefined; disabled?: boolean | undefined; iconOnClick?: (() => void) | undefined; onlyNumbers?: boolean | undefined; onChange?: ((e: React.ChangeEvent<HTMLInputElement>) => void) | undefined; onFocus?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined; onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined; onKeyPress?: ((e: React.KeyboardEvent<HTMLInputElement>) => void) | undefined; solidColor?: boolean | undefined; } & React.RefAttributes<unknown>>; export default InputAutocomplete;