import { type ReactNode } from 'react'; import type { DefaultProps, LabelRequired } from '../../types'; import { type FieldCounterProps } from '../field'; import { type InputProps } from '../input/input'; import { type TextareaProps } from '../textarea/textarea'; type InputProps_ = Omit; type TextareaProps_ = Omit; type SharedTextfieldProps = { /** * Classname on the wrapper element `Field` */ className?: InputProps['className']; /** * Style on the wrapper element `Field` * @default undefined */ style?: InputProps['style']; /** * Label */ label?: ReactNode; /** * Description */ description?: ReactNode; /** * Prefix */ prefix?: string; /** * Suffix */ suffix?: string; /** * Error message for field */ error?: ReactNode; /** * Uses `Field.Counter` to display a character counter * Pass a number to set a limit, or an object to configure the counter */ counter?: FieldCounterProps | number; } & LabelRequired & Omit; type TextfieldTextareaProps = { /** * Use to render a `Textarea` instead of `Input` for multiline support **/ multiline: true; type?: never; } & TextareaProps_; type TextfieldInputProps = { /** * Use to render a `Textarea` instead of `Input` for multiline support **/ multiline?: false; /** * Supported `input` types * * @default 'text' * */ type?: Exclude; } & InputProps_; export type TextfieldProps = SharedTextfieldProps & (TextfieldTextareaProps | TextfieldInputProps); /** * Composed text input component using `Field` * * `classname` & `style` are passed to the wrapper elements. * * Rest props are passed to the `Input` or `Textarea` component. * @example * */ export declare const Textfield: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=textfield.d.ts.map