import * as React from "react"; import { Dispatch, SetStateAction } from "react"; import { MonthData } from "../../../util/calendar/CalendarDataFactory"; import { RenderTravelDateContent } from "../types"; /** * The size of the dates. "smaller" to "large" are fixed sizes, 40 to 56px. * * "auto" sizes the dates to their content, for content that needs more room * than a fixed size has, such as a price written out in full. Every date is * as wide as the widest and as high as the highest, and none is smaller than * "medium". Everything else, such as the month header, is "medium". */ export type TravelCalendarSizeVariant = "smaller" | "small" | "medium" | "large" | "auto"; export interface TravelCalendarProps { visibleMonthData: MonthData; onClickDate: (date: Date) => void; visibleMonth: Date; setVisibleMonth: (visibleMonth: Date) => void; isValidDateRange: boolean; setHoverDate: Dispatch>; selectedStartDate: Date | undefined; selectedEndDate: Date | undefined; /** The date that the mouse is hovering over. */ hoverDate: Date | undefined; /** * The other date to show range highlight between, when the user hovers the mouse. * If not set, only hovered date will be highlighted, not range. * */ hoverAnchor: Date | undefined; today: Date; isDateDisabled?: (date: Date) => boolean; /** Also stops keyboard navigation into the previous month. */ prevMonthDisabled?: (visibleMonth: Date) => boolean; /** Also stops keyboard navigation into the next month. */ nextMonthDisabled?: (visibleMonth: Date) => boolean; /** The range field being edited. Its date gets the tab stop. */ activeField?: "startDate" | "endDate"; /** * Renders the content of each date in the calendar, in place of the day * number. The cell around it, with the selection, focus and keyboard * navigation, stays the calendar's. See RenderTravelDateContent. */ renderDateContent?: RenderTravelDateContent; dateTestId?: (date: Date) => string | undefined; calendarId: string; size?: TravelCalendarSizeVariant; multiSelectable: boolean; /** * If "left", only hovering on earlier dates will create a highlight. If undefined, no range will be highlighted. */ hoverHighlightDirection: "left" | "right" | undefined; /** * Accessible name of the calendar grid. Set this when there is no visible * label next to the calendar, such as a text input or a heading. */ ariaLabel?: string; } export declare const TravelCalendar: React.FC;