import * as React from "react"; import type { MergeElementProps } from "../typings"; interface TextFieldBaseProps { /** * Append to the classNames applied to the component so you can override or * extend the styles. */ className?: string; /** The name of the text field. */ name?: string; /** The `placeholder` property of the text field. */ placeholder?: string; /** * The value of the text field. The DOM API casts this to a string. */ value?: string; /** * The default value. Use when the component is not controlled. */ defaultValue?: string; /** The helper text content. */ helperText?: string; /** The helper icon element placed before the helper text. */ helperIcon?: React.ReactNode; /** * The leading adornment for this component. * * This can be used to add a prefix, an action, or an icon to the leading of your input. */ leadingAdornment?: React.ReactNode; /** * The trailing adornment for this component. * * This can be used to add a suffix, an action, or an icon to the trailing of your input. */ trailingAdornment?: React.ReactNode; /** * If `true`, the text field will be rounded. * @default false */ rounded?: boolean; /** * If `true`, the text field will be readOnly. * @default false */ readOnly?: boolean; /** * If `true`, the text field will be focused. * @default false */ focused?: boolean; /** * If `true`, the text field will be focused on mount. * @default false */ autoFocus?: boolean; /** * If `true`, the text field will fill the entire width of the parent. * @default false */ fluid?: boolean; /** * If `true`, the text field will be disabled. * @default false */ disabled?: boolean; /** * If `true`, the text field will be required. * @default false */ required?: boolean; /** * If `true`, the text field will indicate invalid input. * @default false */ hasError?: boolean; /** * The size of the text field. * @default "medium" */ size?: "large" | "medium" | "small"; /** * The variant of the text field. * @default "outlined" */ variant?: "filled" | "outlined"; /** * The type of the input. * @default "text" */ type?: "text" | "email" | "password" | "number" | "url"; /** The properties applied to the `input` element. */ inputProps?: Omit, "value" | "checked" | "defaultChecked" | "defaultValue" | "onChange" | "onBlur" | "onFocus">; /** * The Callback fires when the state has changed. */ onChange?: (value: string) => void; /** * The Callback fires when the text field has received focus. */ onFocus?: (event: React.FocusEvent) => void; /** * The Callback fires when the text field has lost focus. */ onBlur?: (event: React.FocusEvent) => void; } export declare type TextFieldProps = Omit, "defaultChecked">; declare type Component = { (props: TextFieldProps): React.ReactElement | null; propTypes?: React.WeakValidationMap | undefined; displayName?: string | undefined; }; declare const TextField: Component; export default TextField;