import { type FC, type Ref } from 'react'; import { type DateValue } from '@react-aria/datepicker'; import { type TemporalGranularity, type TemporalInputCommonProps, type TemporalInputTimeProps } from '../TemporalCore'; /** * Subset of `@react-aria/datepicker`'s `AriaDateFieldProps` surfaced by DateInput. * * Declared explicitly (not via `Omit`) so the DS public * type doesn't track React-Aria's evolution — props are added here intentionally. */ interface DateInputAriaSubset { value?: DateValue | null; defaultValue?: DateValue | null; onChange?: (value: DateValue | null) => void; minValue?: DateValue; maxValue?: DateValue; placeholderValue?: DateValue; name?: string; autoFocus?: boolean; /** Marks the field as required in assistive tech and HTML form validation. */ isRequired?: boolean; ref?: Ref; } type DateOnlyGranularity = { granularity?: 'day'; showTimeDropdown?: never; timeStep?: never; }; type DateTimeGranularity = { granularity: Exclude; } & TemporalInputTimeProps; export type DateInputProps = TemporalInputCommonProps & DateInputAriaSubset & (DateOnlyGranularity | DateTimeGranularity); export declare const DateInput: FC; export {};