/// export type DateValue = Date; export type View = 'month' | 'day'; export type CalendarSlot = 'root' | 'day' | 'calendarHeader' | 'viewContainer' | 'viewTable' | 'switchViewButton' | 'weekHeaderContainer' | 'dayPickerContainer'; export interface CalendarProps { value?: [DateValue, DateValue | undefined]; defaultValue?: [DateValue, DateValue | undefined]; onChange?: (date: [DateValue, DateValue | undefined]) => void; locale?: string; view?: View; views?: View[]; onViewChange?: (view: View) => void; onMonthChange?: (newMonth: DateValue) => void; slots?: Partial>; rangeSelection?: boolean; minDate?: DateValue; maxDate?: DateValue; disableFuture?: boolean; disablePast?: boolean; /** * Disable specific date. * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * @param date * @returns If `true` the date will be disabled */ shouldDisableDate?: (date: DateValue) => boolean; /** * Number of months to display side by side. Defaults to 1. */ numberOfMonths?: number; } export interface CalendarOwnerState extends CalendarProps { viewMonth: Date; direction: number; /** Shared hover day state for multi-month coordination */ hoverDay?: Date | null; onHoverDayChange?: (day: Date | null) => void; /** Shared hover month state for multi-month coordination */ hoverMonth?: Date | null; onHoverMonthChange?: (month: Date | null) => void; }