import React from 'react'; import { CalendarBodyProps } from './CalendarBody'; import { CalendarCellProps } from './CalendarCell'; import { CalendarWeekCellProps } from './CalendarWeekDayCell'; import { CalendarEmptyCellProps } from './CalendarEmptyCell'; import { CalendarWeekRowButtonProps } from './CalendarWeekRowButton'; import { CalendarWeekDayWeekNumberProps } from './CalendarWeekDayWeekNumber'; import { CalendarPaperProps } from './CalendarPaper'; import { CalendarHeaderProps } from './CalendarHeader'; import { CalendarWeekRowProps } from './CalendarWeekRow'; import { CalendarDateContainerProps } from './CalendarDateContainer'; import { CalendarToolbarProps } from './CalendarToolbar'; import { CalendarYearsSelectorProps } from './CalendarYearsSelector'; import { CalendarMonthsSelectorProps } from './CalendarMonthsSelector'; import { CalendarMonthCellProps } from './CalendarMonthCell'; import { CalendarDayBadgeProps } from './CalendarDayBadge'; import { CalendarFooterProps } from './CalendarFooter'; import { CalendarControlButtonProps } from './CalendarControlButton'; import { CalendarHeadingProps } from './CalendarHeading'; import { CalendarSubheadingProps } from './CalendarSubheading'; import { CalendarIconPrevProps } from './CalendarIconPrev'; import { CalendarIconNextProps } from './CalendarIconNext'; import { CalendarWeekDaysBarProps, WeekNameLabelFormat } from './CalendarWeekDaysBar'; import { CalendarValue, WeekDayName } from './use-calendar'; export * from './use-calendar'; export * from './CalendarWeekDaysBar'; export type CalendarView = 'days' | 'months' | 'years' | 'weeks'; export type CalendarOnChange = (dates: CalendarValue) => void; export type CalendarProps = { readonly range?: IsRangeValue; /** * Selected date */ readonly value?: CalendarValue; /** * selected value if your component should not be controlled */ readonly defaultValue?: CalendarValue; /** * It will be called at the moment of selecting the given */ readonly onChange: CalendarOnChange; /** * calendar locale\ * **Default:** `ru-RU` */ readonly locale?: string; /** * array of badges */ readonly badges?: readonly CalendarBadge[]; /** * Minimum date limit\ * **Default:** -100 year */ readonly minDate?: Date; /** * Maximum date limit\ * **Default:** +100 year */ readonly maxDate?: Date; /** * The day the week starts from\ * **Default:** `monday` */ readonly weekStartDay?: WeekDayName; /** * Int weekday format\ * **Default:** `short` */ readonly weekDayLabelFormat?: WeekNameLabelFormat; /** * Display days with leading zero * **Default:** `false` */ readonly displayLeadingZero?: boolean; /** * Mark current day cell\ * **Default:** `true` */ readonly markToday?: boolean; /** * Cell accent color\ * **Default:** `primary` */ readonly accentColor?: 'primary' | 'secondary' | string; /** * Label for the Reset button. If label passed, then button will be rendered */ readonly resetButtonLabel?: string; /** * Label for the Today button. If label passed, then button will be rendered */ readonly todayButtonLabel?: string; /** * Heading */ readonly heading?: React.ReactNode; /** * Subheading */ readonly subheading?: React.ReactNode; /** * Initial name of the view\ * **Default:** `days` */ readonly initialView?: CalendarView; readonly view?: CalendarView; /** * Posibility calendar views list */ readonly views?: readonly CalendarView[]; /** * Custom footer elements */ readonly footer?: React.ReactNode; /** * Overridable components map */ readonly overrides?: CalendarOverrides; }; export interface CalendarOverrides { /** * Element container */ readonly Body?: React.ComponentType>; /** * Day element */ readonly Cell?: React.ComponentType>; /** * Day element */ readonly WeekDayCell?: React.ComponentType>; /** * Number of the week in weeks selector */ readonly WeekDayWeekNumber?: React.ComponentType>; /** * The button to select the week in the `weeks` view */ readonly WeekRowButton?: React.ComponentType>; /** * Empty cell element */ readonly EmptyCell?: React.ComponentType>; /** * Common container element */ readonly Paper?: React.ComponentType>; /** * Header wrapper element */ readonly Header?: React.ComponentType>; /** * Week row container element */ readonly WeekRow?: React.ComponentType>; /** * Days wrapper element */ readonly DateContainer?: React.ComponentType>; /** * Toolbar wrapper element */ readonly Toolbar?: React.ComponentType>; /** * Years list element (year view) */ readonly YearsSelector?: React.ComponentType>; /** * Monthes list element (month view) */ readonly MonthsSelector?: React.ComponentType>; /** * Month cell element in monthes list */ readonly MonthCell?: React.ComponentType>; /** * Badge of the day cell element */ readonly DayBadge?: React.ComponentType>; /** * Footer container element */ readonly Footer?: React.ComponentType>; /** * Common button element */ readonly ControlButton?: React.ComponentType>; /** * Heading element */ readonly Heading?: React.ComponentType>; /** * Subheading element */ readonly Subheading?: React.ComponentType>; /** * Prev icon element in prev month button */ readonly IconPrev?: React.ComponentType>; /** * Next icon element in next month button */ readonly IconNext?: React.ComponentType>; /** * Weeks bar element */ readonly WeekDaysBar?: React.ComponentType>; } export type CalendarBadge = { readonly date: Date; readonly badgeContent: React.ReactNode; readonly accentColor?: 'primary' | 'secondary' | string; }; export type CalendarRef = { readonly setView: (view: CalendarView) => void; readonly setViews: (views: readonly CalendarView[]) => void; readonly getActiveView: () => CalendarView; readonly setValue: (value: CalendarValue) => void; readonly setCalendarDate: (date: Date) => void; readonly getCalendarDate: () => Date; readonly reset: () => void; }; declare const CalendarComponent: React.ForwardRefExoticComponent & React.RefAttributes>>; export { CalendarComponent };