import React from 'react'; import { ViewStyle, StyleProp } from 'react-native'; import { SizeValue } from '../../core/theme/types'; import type { DisclaimerSupport } from '../_internal/Disclaimer'; export type CalendarLevel = 'month' | 'year' | 'decade'; export type CalendarType = 'single' | 'multiple' | 'range'; export type CalendarValue = Date | Date[] | [Date | null, Date | null] | null; export interface CalendarProps extends DisclaimerSupport { level?: CalendarLevel; defaultLevel?: CalendarLevel; onLevelChange?: (level: CalendarLevel) => void; date?: Date; defaultDate?: Date; onDateChange?: (date: Date) => void; value?: CalendarValue; onChange?: (value: CalendarValue) => void; type?: CalendarType; minDate?: Date; maxDate?: Date; excludeDate?: (date: Date) => boolean; locale?: string; firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6; weekendDays?: number[]; withCellSpacing?: boolean; hideOutsideDates?: boolean; hideWeekdays?: boolean; highlightToday?: boolean; numberOfMonths?: number; getDayProps?: (date: Date) => Partial; renderDay?: (date: Date) => React.ReactNode; size?: SizeValue; /** Stretch to fill the container instead of sizing to the day grid. Default `false`. */ fullWidth?: boolean; static?: boolean; } export interface MiniCalendarProps { value?: Date | null; onChange?: (date: Date | null) => void; defaultValue?: Date | null; numberOfDays?: number; defaultDate?: Date; minDate?: Date; maxDate?: Date; nextControlProps?: any; previousControlProps?: any; getDayProps?: (date: Date) => Partial; renderDay?: (date: Date) => React.ReactNode; locale?: string; size?: SizeValue; } export type { MonthPickerProps } from '../MonthPicker/types'; export type { YearPickerProps } from '../YearPicker/types'; export interface MonthProps { month: Date; value?: CalendarValue; onChange?: (value: CalendarValue) => void; type?: CalendarType; hoveredDate?: Date | null; onDayHover?: (date: Date) => void; onDayHoverEnd?: () => void; minDate?: Date; maxDate?: Date; excludeDate?: (date: Date) => boolean; firstDayOfWeek?: number; weekendDays?: number[]; hideOutsideDates?: boolean; hideWeekdays?: boolean; highlightToday?: boolean; withCellSpacing?: boolean; getDayProps?: (date: Date) => Partial; renderDay?: (date: Date) => React.ReactNode; size?: SizeValue; locale?: string; } export interface DayProps { date: Date; selected?: boolean; inRange?: boolean; firstInRange?: boolean; lastInRange?: boolean; previewed?: boolean; previewedInRange?: boolean; previewedFirstInRange?: boolean; previewedLastInRange?: boolean; weekend?: boolean; outside?: boolean; today?: boolean; disabled?: boolean; onPress?: () => void; onMouseEnter?: () => void; onMouseLeave?: () => void; size?: SizeValue; style?: StyleProp; children?: React.ReactNode; [key: string]: any; }