import React from 'react'; import { Modifiers } from 'react-day-picker'; import { SupportedWixLocales } from 'wix-design-systems-locale-utils'; export interface dateIndicationProps { date: Date; isSelected: boolean; } export type LanguageType = SupportedWixLocales; /** * Props for the Calendar component. */ export interface CalendarProps { /** Applies as data-hook HTML attribute that can be used in the tests */ dataHook?: string; /** Focus selected day automatically when component mounts or updates */ autoFocus?: boolean; /** Allows to display multiple months at once. Currently it shows 1 or 2 months only. */ numOfMonths?: 1 | 2; /** A single CSS class name to be appended to the root element. */ className?: string; /** Provides a callback function when day in selected in the calendar */ onChange: (selectedDays: Date, modifiers: Modifiers) => void; /** Defines a callback function that is called with the date of the first day of the month whenever the user selects a month in the calendar */ onMonthChange?: (monthStart: Date) => void; /** Defines a callback function that is called whenever a user presses escape, clicks outside of the element or a date is selected and `shouldCloseOnSelect` is set. Receives an event as a first argument. */ onClose?: (event?: any) => void; /** Specify whether past dates should be selectable or not */ excludePastDates?: boolean; /** * Specify selectable dates: * @param date - a date to check * @returns true if `date` should be selectable, false otherwise */ filterDate?: (date: Date) => boolean; /** Provides a callback function when any key is clicked in the calendar */ onKeyDown?: (event: React.KeyboardEvent) => void; /** Defines the selected date */ value?: Date; /** Displays a selectable yearDropdown */ showYearDropdown?: boolean; /** Displays a selectable monthDropdown */ showMonthDropdown?: boolean; /** Specify whether the calendar closes on day selection */ shouldCloseOnSelect?: boolean; /** Specify date picker instance locale */ locale?: SupportedWixLocales; /** First day of the week, allowing only from 0 to 6 (Sunday to Saturday). The default value is 1 which means Monday. */ firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6; /** Specify whether RTL mode is enabled or not. When true, the keyboard navigation will be changed means pressing on the right arrow will navigate to the previous day, and pressing on the left arrow will navigate to the next day. */ rtl?: boolean; /** * Add an indication under a specific date. * Function returns the indication node of a specific date or null if this day doesn't have an indication. * @param date - a date * @param isSelected - whether this date is the selected date * @returns the indication node of a specific date or null if this day doesn't have an indication. */ dateIndication?: React.FC; /** Sets today's date. The today indication is added automatically according to the user timezone but in some cases, we need the ability to add the today indication based on the business timezone. */ today?: Date; /** Defines a string value that labels the left arrow in calendar header */ leftArrowAriaLabel?: string; /** Identifies the element that labels the left arrow in calendar header */ leftArrowAriaLabelledBy?: string; /** Defines a string value that labels the right arrow in calendar header */ rightArrowAriaLabel?: string; /** Identifies the element that labels the right arrow in calendar header */ rightArrowAriaLabelledBy?: string; /** Defines a string value that labels the months dropdown in calendar header */ monthDropdownAriaLabel?: string; /** Identifies the element that labels the months dropdown in calendar header */ monthDropdownAriaLabelledBy?: string; /** Defines a string value that labels the years dropdown in calendar header */ yearDropdownAriaLabel?: string; /** Identifies the element that labels the years dropdown in calendar header */ yearDropdownAriaLabelledBy?: string; /** Defines calendar size property. It can be either small or medium (default) */ size?: 'small' | 'medium'; /** Use FocusScope to contain focus within calendar */ containFocus?: boolean; /** Use the fixedWeeks prop to display 6 weeks per month. */ fixedWeeks?: boolean; showOutsideDays?: boolean; twoMonths?: boolean; } //# sourceMappingURL=types.d.ts.map