import React, { ElementType } from 'react'; import { OverrideProps } from '@mui/types'; import { TextFieldProps } from '../../TextField'; import { PickerRangeValue } from '../utils/dateRangeUtils'; import { BaseDateValidationProps, DayValidationProps } from '../models/validation'; import { BasePickerInputProps } from '../DatePicker/shared'; /** * Props exported by DateRangeField for use by parent components */ export interface ExportedDateRangeFieldProps { /** * The separator between start and end dates in the field. * @default ' – ' */ separator?: React.ReactNode; /** * If `true`, the field allows clearing the range. * @default true */ clearable?: boolean; } /** * Slots for DateRangeField component */ export interface DateRangeFieldSlots { /** * The component that renders the root field. * @default TextField */ root?: React.ElementType; } /** * Slot props for DateRangeField component */ export interface DateRangeFieldSlotProps { root?: Omit; input?: React.ComponentProps<'input'>; } /** * Component props for DateRangeField */ export interface DateRangeFieldComponentProps extends ExportedDateRangeFieldProps, Required, DayValidationProps, BasePickerInputProps { /** * Label for the start date field. * @default 'Start date' */ startLabel?: string; /** * Label for the end date field. * @default 'End date' */ endLabel?: string; } /** * Type map for DateRangeField */ export interface DateRangeFieldTypeMap

{ props: P & DateRangeFieldComponentProps & Omit & { /** * The slots for customizing the component appearance. */ slots?: DateRangeFieldSlots; /** * The props used for each slot. */ slotProps?: DateRangeFieldSlotProps; }; defaultComponent: D; } /** * Props for DateRangeField */ export type DateRangeFieldProps = OverrideProps, D> & { component?: D; }; /** * Owner state for DateRangeField */ export type DateRangeFieldOwnerState = DateRangeFieldProps;