import * as React from 'react'; import { SlotComponentProps } from '@mui/base/utils'; import TextField from '@mui/material/TextField'; import { DateValidationError, FieldSection } from '../models'; import { UseFieldInternalProps } from '../internals/hooks/useField'; import { DefaultizedProps, MakeOptional } from '../internals/models/helpers'; import { BaseDateValidationProps, DayValidationProps, MonthValidationProps, YearValidationProps } from '../internals/models/validation'; import { FieldsTextFieldProps } from '../internals/models/fields'; import { SlotsAndSlotProps } from '../internals/utils/slots-migration'; export interface UseDateFieldParams { props: UseDateFieldComponentProps; inputRef?: React.Ref; } export interface UseDateFieldProps extends MakeOptional, 'format'>, DayValidationProps, MonthValidationProps, YearValidationProps, BaseDateValidationProps { } export type UseDateFieldDefaultizedProps = DefaultizedProps, keyof BaseDateValidationProps | 'format'>; export type UseDateFieldComponentProps = Omit> & UseDateFieldProps; export interface DateFieldProps extends UseDateFieldComponentProps, SlotsAndSlotProps> { } export type DateFieldOwnerState = DateFieldProps; export interface DateFieldSlotsComponent { /** * Form control with an input to render the value. * Receives the same props as `@mui/material/TextField`. * @default TextField from '@mui/material' */ TextField?: React.ElementType; } export interface DateFieldSlotsComponentsProps { textField?: SlotComponentProps>; }