ds-smart-ui
Version:
Smart UI is a React component library that helps you build accessible and responsive web applications.
39 lines (37 loc) • 1.53 kB
TypeScript
import { VariantProps } from 'class-variance-authority';
import { InputHTMLAttributes } from 'react';
import { FormRoundedTypes, FormSizeTypes } from '../../../types/form-types';
declare const autocompleteVariants: (props?: ({
size?: "sm" | "md" | "lg" | null | undefined;
rounded?: "sm" | "md" | "lg" | "none" | "full" | null | undefined;
color?: "dark" | "light" | "primary" | "secondary" | "success" | "danger" | "warning" | "info" | null | undefined;
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
interface Option {
label: string;
value: string;
}
interface AutocompleteProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "color" | "onChange">, VariantProps<typeof autocompleteVariants> {
options: Option[];
label?: string;
value: string;
onChange: (value: string) => void;
enableAdd?: boolean;
enableDelete?: boolean;
onAdd?: (value: string) => void;
onDelete?: (value: string) => void;
size?: FormSizeTypes;
rounded?: FormRoundedTypes;
color?: VariantProps<typeof autocompleteVariants>["color"];
helperText?: string;
placeholder?: string;
error?: boolean;
labelAdd?: string;
labelNotFound?: string;
isLoading?: boolean;
className?: string;
required?: boolean;
disabled?: boolean;
id?: string;
}
declare const Autocomplete: import('react').ForwardRefExoticComponent<AutocompleteProps & import('react').RefAttributes<HTMLInputElement>>;
export default Autocomplete;