import type { ReactElement } from "react"; import React from "react"; import type { XOR } from "ts-xor"; import type { DatePickerActivatorProps } from "./DatePickerActivator"; import type { DayOfWeek } from "../sharedHelpers/types"; interface BaseDatePickerProps { /** * The maximum selectable date. */ readonly maxDate?: Date; /** * The minimum selectable date. */ readonly minDate?: Date; /** * The selected Date object */ readonly selected?: Date; /** * Determines if the focus moves to the selected date (if any) or back to * the activator */ readonly smartAutofocus?: boolean; /** * Dates on the calendar to highlight */ readonly highlightDates?: Date[]; /** * Sets which day is considered the first day of the week. * 0 = Sunday, 1 = Monday, etc. * * @default 0 */ readonly firstDayOfWeek?: DayOfWeek; /** * Change handler that will return the date selected. */ onChange(val: Date): void; /** * Change handler when the selected month changes */ onMonthChange?(val: Date): void; /** * Callback when the calendar open state changes */ onOpenChange?(open: boolean): void; } interface DatePickerModalProps extends BaseDatePickerProps { /** * Use a custom activator to trigger the DatePicker */ readonly activator?: ReactElement | ((props: DatePickerActivatorProps) => ReactElement); /** * Stops the user from interaction */ readonly disabled?: boolean; /** * Whether the datepicker should take up a whole block */ readonly fullWidth?: boolean; /** * Whether or not you can select a date */ readonly readonly?: boolean; } interface DatePickerInlineProps extends BaseDatePickerProps { /** * Determines if the DatePicker should be shown without needing to trigger the Activator. */ readonly inline?: boolean; } type DatePickerProps = XOR; export declare function DatePicker({ onChange, onMonthChange, onOpenChange, activator, inline, selected, readonly, disabled, fullWidth, smartAutofocus, maxDate, minDate, highlightDates, firstDayOfWeek, }: DatePickerProps): React.JSX.Element; export {};