import * as React from 'react'; import { OverrideProps } from '@mui/types'; import { FormHelperTextProps } from '../FormHelperText'; import { InputProps } from '../Input'; import { CreateSlotsAndSlotProps, SlotCommonProps } from '../types/slot'; import { FormLabelProps } from '../FormLabel/FormLabel.types'; import { FormControlProps } from '../FormControl'; import { CommonUsedInputKeys } from '../Input/Input.types'; import TextareaProps, { CommonUsedTextareaKeys } from '../Textarea/Textarea.types'; export interface TextFieldPropsColorOverrides { } type InputRootKeys = 'autoComplete' | 'autoFocus' | 'disabled' | 'error' | 'showErrorIcon' | 'required' | 'readOnly' | 'maxLength' | 'fullWidth' | 'placeholder' | 'defaultValue' | 'value' | 'type' | 'size' | 'startDecorator' | 'endDecorator'; type TextareaRootKeys = 'autoComplete' | 'autoFocus' | 'disabled' | 'error' | 'required' | 'readOnly' | 'maxLength' | 'fullWidth' | 'placeholder' | 'defaultValue' | 'value' | 'maxRows' | 'minRows' | 'size' | 'startDecorator' | 'endDecorator'; export interface TextFieldSlots { /** * The component that renders the root. * @default 'div' */ root?: React.ElementType; /** * The component that renders the label. * @default 'label' */ label?: React.ElementType; /** * The component that renders the input/textarea container. * @default 'div' */ input?: React.ElementType; /** * The component that renders the inner html input/textarea. * @default multiline ? 'textarea' : 'input' */ htmlInput?: React.ElementType; /** * The component that renders the helper text. * @default 'div' */ helperText?: React.ElementType; /** * The component that renders the counter text. * @default 'div' */ counterText?: React.ElementType; } export type HTMLInputExtraProps = Omit, CommonUsedInputKeys> & Record; export type HTMLTextareaExtraProps = Omit, CommonUsedTextareaKeys> & Record; export type TextFieldSlotsAndSlotProps = CreateSlotsAndSlotProps; export interface TextFieldTypeMap

{ props: P & TextFieldSlotsAndSlotProps & Pick & Pick & { /** * The id of the `input` element. * Use this prop to make `label` and `helperText` accessible for screen readers. */ id?: string; /** * The label content. */ label?: React.ReactNode; /** * Name attribute of the `input` element. */ name?: string; /** * The helper text content. */ helperText?: React.ReactNode; /** * If `true`, a `textarea` element is rendered instead of an `input`. * @default false */ multiline?: boolean; /** * Callback fired when the `input` is blurred. * * Notice that the first argument (event) might be undefined. */ onBlur?: React.FocusEventHandler; /** * Callback fired when the value is changed. * * @param {React.ChangeEvent} event The event source of the callback. * You can pull out the new value by accessing `event.target.value` (string). */ onChange?: React.ChangeEventHandler; onFocus?: React.FocusEventHandler; onKeyDown?: React.KeyboardEventHandler; onKeyUp?: React.KeyboardEventHandler; }; defaultComponent: D; } export type TextFieldProps = OverrideProps, D>; export interface TextFieldOwnerState extends TextFieldProps { showSupportText?: boolean; } export {};