packages/react-components/react-calendar-compat/library/etc/react-calendar-compat.api.md
Do not edit this file. It is a report generated by API Extractor.
import type { JSXElement } from '@fluentui/react-utilities';
import * as React_2 from 'react';
import type { SlotClassNames } from '@fluentui/react-utilities';
// @public
export function addDays(date: Date, days: number): Date;
// @public
export function addMonths(date: Date, months: number): Date;
// @public
export function addWeeks(date: Date, weeks: number): Date;
// @public
export function addYears(date: Date, years: number): Date;
// @public (undocumented)
export enum AnimationDirection {
Horizontal = 0,
Vertical = 1
}
// @internal (undocumented)
export const Calendar: React_2.FunctionComponent<CalendarProps>;
// @internal (undocumented)
export const calendarClassNames: SlotClassNames<CalendarStyles>;
// @internal (undocumented)
export const CalendarDay: React_2.FunctionComponent<CalendarDayProps>;
// @internal (undocumented)
export const calendarDayClassNames: SlotClassNames<CalendarDayStyles>;
// Warning: (ae-incompatible-release-tags) The symbol "CalendarDayGrid" is marked as @public, but its signature references "CalendarDayGridProps" which is marked as @internal
//
// @public (undocumented)
export const CalendarDayGrid: React_2.FunctionComponent<CalendarDayGridProps>;
// @internal (undocumented)
export const calendarDayGridClassNames: SlotClassNames<CalendarDayGridStyles>;
// @internal (undocumented)
export interface CalendarDayGridProps extends DayGridOptions {
allFocusable?: boolean;
animationDirection?: AnimationDirection;
className?: string;
componentRef?: React_2.RefObject<ICalendarDayGrid | null>;
customDayCellRef?: (element: HTMLElement, date: Date, classNames: CalendarDayGridStyles) => void;
dateRangeType: DateRangeType;
dateTimeFormatter: DateFormatting;
daysToSelectInDayView?: number;
firstDayOfWeek: DayOfWeek;
firstWeekOfYear: FirstWeekOfYear;
getMarkedDays?: (startingDate: Date, endingDate: Date) => Date[];
gridLabel?: string;
labelledBy?: string;
lightenDaysOutsideNavigatedMonth?: boolean;
maxDate?: Date;
minDate?: Date;
navigatedDate: Date;
onDismiss?: () => void;
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
restrictedDates?: Date[];
selectedDate: Date;
showCloseButton?: boolean;
showWeekNumbers?: boolean;
strings: CalendarStrings;
today?: Date;
weeksToShow?: number;
workWeekDays?: DayOfWeek[];
}
// @internal (undocumented)
export interface CalendarDayGridStyleProps {
animateBackwards?: boolean;
animationDirection?: AnimationDirection;
className?: string;
dateRangeType?: DateRangeType;
lightenDaysOutsideNavigatedMonth?: boolean;
showWeekNumbers?: boolean;
}
// @internal (undocumented)
export interface CalendarDayGridStyles {
dayButton?: string;
dayCell?: string;
dayIsToday?: string;
dayMarker?: string;
dayOutsideBounds?: string;
dayOutsideNavigatedMonth?: string;
daySelected?: string;
daySingleSelected?: string;
dayTodayMarker?: string;
firstTransitionWeek?: string;
lastTransitionWeek?: string;
table?: string;
weekDayLabelCell?: string;
weekNumberCell?: string;
weekRow?: string;
wrapper?: string;
}
// Warning: (ae-incompatible-release-tags) The symbol "CalendarDayProps" is marked as @public, but its signature references "CalendarDayGridProps" which is marked as @internal
//
// @public (undocumented)
export interface CalendarDayProps extends CalendarDayGridProps {
allFocusable?: boolean;
className?: string;
componentRef?: React_2.RefObject<ICalendarDay | null>;
dateTimeFormatter: DateFormatting;
maxDate?: Date;
minDate?: Date;
navigatedDate: Date;
navigationIcons: CalendarNavigationIcons;
onDismiss?: () => void;
onHeaderSelect?: () => void;
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
restrictedDates?: Date[];
showCloseButton?: boolean;
showSixWeeksByDefault?: boolean;
showWeekNumbers?: boolean;
strings: CalendarStrings;
}
// @internal (undocumented)
export interface CalendarDayStyleProps extends CalendarDayGridStyleProps {
className?: string;
headerIsClickable?: boolean;
showWeekNumbers?: boolean;
}
// @internal (undocumented)
export interface CalendarDayStyles {
disabledStyle: string;
header: string;
headerIconButton: string;
monthAndYear: string;
monthComponents: string;
root: string;
}
// @internal (undocumented)
export const CalendarMonth: React_2.FunctionComponent<CalendarMonthProps>;
// @public (undocumented)
export interface CalendarMonthProps {
allFocusable?: boolean;
animationDirection?: AnimationDirection;
className?: string;
componentRef?: React_2.RefObject<ICalendarMonth | null>;
dateTimeFormatter?: DateFormatting;
highlightCurrentMonth?: boolean;
highlightSelectedMonth?: boolean;
maxDate?: Date;
minDate?: Date;
navigatedDate: Date;
navigationIcons: CalendarNavigationIcons;
onHeaderSelect?: () => void;
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
selectedDate: Date;
strings: CalendarStrings;
today?: Date;
yearPickerHidden?: boolean;
}
// @internal (undocumented)
export interface CalendarMonthStyleProps extends CalendarPickerStyleProps {
}
// @internal (undocumented)
export interface CalendarMonthStyles extends CalendarPickerStyles {
}
// @internal (undocumented)
export const calendarPickerClassNames: SlotClassNames<CalendarPickerStyles>;
// @internal (undocumented)
export interface CalendarPickerStyleProps {
animateBackwards?: boolean;
animationDirection?: AnimationDirection;
className?: string;
hasHeaderClickCallback?: boolean;
highlightCurrent?: boolean;
highlightSelected?: boolean;
}
// @internal (undocumented)
export interface CalendarPickerStyles {
// (undocumented)
buttonRow: string;
// (undocumented)
current: string;
// (undocumented)
currentItemButton: string;
// (undocumented)
disabled: string;
// (undocumented)
gridContainer: string;
// (undocumented)
headerContainer: string;
// (undocumented)
itemButton: string;
// (undocumented)
navigationButton: string;
// (undocumented)
navigationButtonsContainer: string;
root: string;
// (undocumented)
selected: string;
}
// @public (undocumented)
export interface CalendarProps extends React_2.RefAttributes<HTMLDivElement> {
allFocusable?: boolean;
calendarDayProps?: Partial<CalendarDayProps>;
calendarMonthProps?: Partial<CalendarMonthProps>;
className?: string;
componentRef?: React_2.RefObject<ICalendar | null>;
dateRangeType?: DateRangeType;
dateTimeFormatter?: DateFormatting;
firstDayOfWeek?: DayOfWeek;
firstWeekOfYear?: FirstWeekOfYear;
highlightCurrentMonth?: boolean;
highlightSelectedMonth?: boolean;
id?: string;
isDayPickerVisible?: boolean;
isMonthPickerVisible?: boolean;
maxDate?: Date;
minDate?: Date;
onDismiss?: () => void;
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
restrictedDates?: Date[];
showCloseButton?: boolean;
showGoToToday?: boolean;
showMonthPickerAsOverlay?: boolean;
showSixWeeksByDefault?: boolean;
showWeekNumbers?: boolean;
strings?: CalendarStrings;
today?: Date;
value?: Date;
workWeekDays?: DayOfWeek[];
}
// @public (undocumented)
export interface CalendarStrings extends DateGridStrings {
closeButtonAriaLabel?: string;
dayMarkedAriaLabel?: string;
goToToday: string;
monthPickerHeaderAriaLabel?: string;
nextMonthAriaLabel?: string;
nextYearAriaLabel?: string;
nextYearRangeAriaLabel?: string;
prevMonthAriaLabel?: string;
prevYearAriaLabel?: string;
prevYearRangeAriaLabel?: string;
selectedDateFormatString?: string;
todayDateFormatString?: string;
weekNumberFormatString?: string;
yearPickerHeaderAriaLabel?: string;
}
// @internal (undocumented)
export interface CalendarStyleProps {
className?: string;
isDayPickerVisible?: boolean;
isMonthPickerVisible?: boolean;
monthPickerOnly?: boolean;
overlaidWithButton?: boolean;
// @deprecated (undocumented)
overlayedWithButton?: boolean;
showGoToToday?: boolean;
showMonthPickerAsOverlay?: boolean;
showWeekNumbers?: boolean;
}
// @internal (undocumented)
export interface CalendarStyles {
// (undocumented)
divider: string;
// (undocumented)
goTodayButton: string;
// (undocumented)
liveRegion: string;
// (undocumented)
monthPickerWrapper: string;
root: string;
}
// @internal (undocumented)
export const CalendarYear: React_2.FunctionComponent<CalendarYearProps>;
// @internal (undocumented)
export interface CalendarYearHeaderProps extends CalendarYearProps, CalendarYearRange {
animateBackwards?: boolean;
onSelectNext?: () => void;
onSelectPrev?: () => void;
}
// @internal (undocumented)
export interface CalendarYearProps {
animationDirection?: AnimationDirection;
className?: string;
componentRef?: React_2.RefObject<ICalendarYear | null>;
highlightCurrentYear?: boolean;
highlightSelectedYear?: boolean;
maxYear?: number;
minYear?: number;
navigatedYear?: number;
navigationIcons: CalendarNavigationIcons;
onHeaderSelect?: (focus: boolean) => void;
onNavigateDate?: (year: number) => void;
onRenderTitle?: (props: CalendarYearHeaderProps) => React_2.ReactNode;
onRenderYear?: (year: number) => React_2.ReactNode;
onSelectYear?: (year: number) => void;
selectedYear?: number;
strings?: CalendarYearStrings;
}
// @internal (undocumented)
export interface CalendarYearRange {
// (undocumented)
fromYear: number;
// (undocumented)
toYear: number;
}
// @internal (undocumented)
export interface CalendarYearRangeToString {
// (undocumented)
(range: CalendarYearRange): string;
}
// @internal (undocumented)
export interface CalendarYearStrings {
// (undocumented)
headerAriaLabelFormatString?: string;
// (undocumented)
nextRangeAriaLabel?: string | CalendarYearRangeToString;
// (undocumented)
prevRangeAriaLabel?: string | CalendarYearRangeToString;
// (undocumented)
rangeAriaLabel?: string | CalendarYearRangeToString;
}
// @internal (undocumented)
export interface CalendarYearStyleProps extends CalendarPickerStyleProps {
}
// @internal (undocumented)
export interface CalendarYearStyles extends CalendarPickerStyles {
}
// @public
export function compareDatePart(date1: Date, date2: Date): number;
// @public
export function compareDates(date1: Date, date2: Date): boolean;
// @public (undocumented)
export interface DateFormatting {
formatDay: (date: Date) => string;
formatMonth: (date: Date, strings: DateGridStrings) => string;
formatMonthDayYear: (date: Date, strings: DateGridStrings) => string;
formatMonthYear: (date: Date, strings: DateGridStrings) => string;
formatYear: (date: Date) => string;
}
// @public (undocumented)
export interface DateGridStrings {
days: string[];
months: string[];
shortDays: string[];
shortMonths: string[];
}
// @public
export enum DateRangeType {
// (undocumented)
Day = 0,
// (undocumented)
Month = 2,
// (undocumented)
Week = 1,
// (undocumented)
WorkWeek = 3
}
// @public (undocumented)
export interface DayInfo extends Day {
// (undocumented)
onSelected: () => void;
// (undocumented)
setRef(element: HTMLElement | null): void;
}
// @public
export enum DayOfWeek {
// (undocumented)
Friday = 5,
// (undocumented)
Monday = 1,
// (undocumented)
Saturday = 6,
// (undocumented)
Sunday = 0,
// (undocumented)
Thursday = 4,
// (undocumented)
Tuesday = 2,
// (undocumented)
Wednesday = 3
}
// @public (undocumented)
export const DAYS_IN_WEEK = 7;
// @public (undocumented)
export const DEFAULT_CALENDAR_STRINGS: CalendarStrings;
// @public (undocumented)
export const DEFAULT_DATE_FORMATTING: DateFormatting;
// @public (undocumented)
export const DEFAULT_DATE_GRID_STRINGS: DateGridStrings;
// @public (undocumented)
export const defaultCalendarStrings: CalendarStrings;
// @internal (undocumented)
export const extraCalendarDayGridClassNames: {
hoverStyle: string;
pressedStyle: string;
};
// @public
export enum FirstWeekOfYear {
// (undocumented)
FirstDay = 0,
// (undocumented)
FirstFourDayWeek = 2,
// (undocumented)
FirstFullWeek = 1
}
// @public
export function getDatePartHashValue(date: Date): number;
// @public
export function getDateRangeArray(date: Date, dateRangeType: DateRangeType, firstDayOfWeek: DayOfWeek, workWeekDays?: DayOfWeek[], daysToSelectInDayView?: number): Date[];
// @public
export function getEndDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
// @public
export function getMonthEnd(date: Date): Date;
// @public
export function getMonthStart(date: Date): Date;
// @public
export function getStartDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
// @public
export function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear): number;
// @public
export function getWeekNumbersInMonth(weeksInMonth: number, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear, navigatedDate: Date): number[];
// @public
export function getYearEnd(date: Date): Date;
// @public
export function getYearStart(date: Date): Date;
// @public (undocumented)
export interface ICalendar {
focus: () => void;
}
// @public (undocumented)
export interface ICalendarDay {
// (undocumented)
focus(): void;
}
// @internal (undocumented)
export interface ICalendarDayGrid {
// (undocumented)
focus(): void;
}
// @public (undocumented)
export interface ICalendarMonth {
// (undocumented)
focus(): void;
}
// @internal (undocumented)
export interface ICalendarYear {
// (undocumented)
focus(): void;
}
// @public
export function isInDateRangeArray(date: Date, dateRange: Date[]): boolean;
// @public
export enum MonthOfYear {
// (undocumented)
April = 3,
// (undocumented)
August = 7,
// (undocumented)
December = 11,
// (undocumented)
February = 1,
// (undocumented)
January = 0,
// (undocumented)
July = 6,
// (undocumented)
June = 5,
// (undocumented)
March = 2,
// (undocumented)
May = 4,
// (undocumented)
November = 10,
// (undocumented)
October = 9,
// (undocumented)
September = 8
}
// @public
export function setMonth(date: Date, month: number): Date;
// @public (undocumented)
export const TimeConstants: {
MillisecondsInOneDay: number;
MillisecondsIn1Sec: number;
MillisecondsIn1Min: number;
MillisecondsIn30Mins: number;
MillisecondsIn1Hour: number;
MinutesInOneDay: number;
MinutesInOneHour: number;
DaysInOneWeek: number;
MonthInOneYear: number;
HoursInOneDay: number;
SecondsInOneMinute: number;
OffsetTo24HourFormat: number;
TimeFormatRegex: RegExp;
};
// @internal
export const useCalendarDayGridStyles_unstable: (props: CalendarDayGridStyleProps) => CalendarDayGridStyles;
// @internal
export const useCalendarDayStyles_unstable: (props: CalendarDayStyleProps) => CalendarDayStyles;
// @internal
export const useCalendarMonthStyles_unstable: (props: CalendarMonthStyleProps) => CalendarMonthStyles;
// @internal
export const useCalendarPickerStyles_unstable: (props: CalendarPickerStyleProps) => CalendarPickerStyles;
// @internal
export const useCalendarStyles_unstable: (props: CalendarStyleProps) => CalendarStyles;
// @internal
export const useCalendarYearStyles_unstable: (props: CalendarYearStyleProps) => CalendarYearStyles;
// @internal (undocumented)
export interface WeekCorners {
// (undocumented)
[key: string]: string;
}
// (No @packageDocumentation comment for this package)