@fluentui/react-calendar-compat 0.0.0-nightly-20250423-1342.1 → 0.0.0-nightly-20250423-1415.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/CHANGELOG.md +12 -12
  2. package/dist/index.d.ts +1422 -0
  3. package/lib/Calendar.js +1 -0
  4. package/lib/Calendar.js.map +1 -0
  5. package/lib/CalendarDay.js +1 -0
  6. package/lib/CalendarDay.js.map +1 -0
  7. package/lib/CalendarDayGrid.js +1 -0
  8. package/lib/CalendarDayGrid.js.map +1 -0
  9. package/lib/CalendarMonth.js +1 -0
  10. package/lib/CalendarMonth.js.map +1 -0
  11. package/lib/CalendarPicker.js +1 -0
  12. package/lib/CalendarPicker.js.map +1 -0
  13. package/lib/CalendarYear.js +1 -0
  14. package/lib/CalendarYear.js.map +1 -0
  15. package/lib/components/Calendar/Calendar.js +308 -0
  16. package/lib/components/Calendar/Calendar.js.map +1 -0
  17. package/lib/components/Calendar/Calendar.types.js +10 -0
  18. package/lib/components/Calendar/Calendar.types.js.map +1 -0
  19. package/lib/components/Calendar/calendarNavigationIcons.js +7 -0
  20. package/lib/components/Calendar/calendarNavigationIcons.js.map +1 -0
  21. package/lib/components/Calendar/defaults.js +2 -0
  22. package/lib/components/Calendar/defaults.js.map +1 -0
  23. package/lib/components/Calendar/index.js +4 -0
  24. package/lib/components/Calendar/index.js.map +1 -0
  25. package/lib/components/Calendar/useCalendarStyles.styles.js +204 -0
  26. package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -0
  27. package/lib/components/CalendarDay/CalendarDay.js +107 -0
  28. package/lib/components/CalendarDay/CalendarDay.js.map +1 -0
  29. package/lib/components/CalendarDay/CalendarDay.types.js +1 -0
  30. package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -0
  31. package/lib/components/CalendarDay/index.js +2 -0
  32. package/lib/components/CalendarDay/index.js.map +1 -0
  33. package/lib/components/CalendarDay/useCalendarDayStyles.styles.js +227 -0
  34. package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
  35. package/lib/components/CalendarDayGrid/CalendarDayGrid.js +169 -0
  36. package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
  37. package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +1 -0
  38. package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
  39. package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +163 -0
  40. package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
  41. package/lib/components/CalendarDayGrid/CalendarGridRow.js +27 -0
  42. package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
  43. package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +36 -0
  44. package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
  45. package/lib/components/CalendarDayGrid/index.js +2 -0
  46. package/lib/components/CalendarDayGrid/index.js.map +1 -0
  47. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +620 -0
  48. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
  49. package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js +97 -0
  50. package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
  51. package/lib/components/CalendarDayGrid/useWeeks.js +46 -0
  52. package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -0
  53. package/lib/components/CalendarMonth/CalendarMonth.js +261 -0
  54. package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -0
  55. package/lib/components/CalendarMonth/CalendarMonth.types.js +1 -0
  56. package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
  57. package/lib/components/CalendarMonth/index.js +2 -0
  58. package/lib/components/CalendarMonth/index.js.map +1 -0
  59. package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.js +11 -0
  60. package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -0
  61. package/lib/components/CalendarPicker/CalendarPicker.types.js +3 -0
  62. package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
  63. package/lib/components/CalendarPicker/index.js +1 -0
  64. package/lib/components/CalendarPicker/index.js.map +1 -0
  65. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js +462 -0
  66. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
  67. package/lib/components/CalendarYear/CalendarYear.js +298 -0
  68. package/lib/components/CalendarYear/CalendarYear.js.map +1 -0
  69. package/lib/components/CalendarYear/CalendarYear.types.js +1 -0
  70. package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -0
  71. package/lib/components/CalendarYear/index.js +2 -0
  72. package/lib/components/CalendarYear/index.js.map +1 -0
  73. package/lib/components/CalendarYear/useCalendarYearStyles.styles.js +11 -0
  74. package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
  75. package/lib/index.js +7 -0
  76. package/lib/index.js.map +1 -0
  77. package/lib/utils/animations.js +96 -0
  78. package/lib/utils/animations.js.map +1 -0
  79. package/lib/utils/constants.js +62 -0
  80. package/lib/utils/constants.js.map +1 -0
  81. package/lib/utils/dateFormatting/dateFormatting.defaults.js +95 -0
  82. package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
  83. package/lib/utils/dateFormatting/dateFormatting.types.js +1 -0
  84. package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -0
  85. package/lib/utils/dateFormatting/index.js +1 -0
  86. package/lib/utils/dateFormatting/index.js.map +1 -0
  87. package/lib/utils/dateGrid/dateGrid.types.js +1 -0
  88. package/lib/utils/dateGrid/dateGrid.types.js.map +1 -0
  89. package/lib/utils/dateGrid/findAvailableDate.js +22 -0
  90. package/lib/utils/dateGrid/findAvailableDate.js.map +1 -0
  91. package/lib/utils/dateGrid/getBoundedDateRange.js +18 -0
  92. package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -0
  93. package/lib/utils/dateGrid/getDateRangeTypeToUse.js +16 -0
  94. package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
  95. package/lib/utils/dateGrid/getDayGrid.js +72 -0
  96. package/lib/utils/dateGrid/getDayGrid.js.map +1 -0
  97. package/lib/utils/dateGrid/index.js +4 -0
  98. package/lib/utils/dateGrid/index.js.map +1 -0
  99. package/lib/utils/dateGrid/isAfterMaxDate.js +9 -0
  100. package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -0
  101. package/lib/utils/dateGrid/isBeforeMinDate.js +9 -0
  102. package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -0
  103. package/lib/utils/dateGrid/isContiguous.js +18 -0
  104. package/lib/utils/dateGrid/isContiguous.js.map +1 -0
  105. package/lib/utils/dateGrid/isRestrictedDate.js +15 -0
  106. package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -0
  107. package/lib/utils/dateMath/dateMath.js +339 -0
  108. package/lib/utils/dateMath/dateMath.js.map +1 -0
  109. package/lib/utils/dateMath/index.js +1 -0
  110. package/lib/utils/dateMath/index.js.map +1 -0
  111. package/lib/utils/focus.js +24 -0
  112. package/lib/utils/focus.js.map +1 -0
  113. package/lib/utils/index.js +6 -0
  114. package/lib/utils/index.js.map +1 -0
  115. package/lib-commonjs/Calendar.js +28 -0
  116. package/lib-commonjs/Calendar.js.map +1 -0
  117. package/lib-commonjs/CalendarDay.js +22 -0
  118. package/lib-commonjs/CalendarDay.js.map +1 -0
  119. package/lib-commonjs/CalendarDayGrid.js +25 -0
  120. package/lib-commonjs/CalendarDayGrid.js.map +1 -0
  121. package/lib-commonjs/CalendarMonth.js +19 -0
  122. package/lib-commonjs/CalendarMonth.js.map +1 -0
  123. package/lib-commonjs/CalendarPicker.js +19 -0
  124. package/lib-commonjs/CalendarPicker.js.map +1 -0
  125. package/lib-commonjs/CalendarYear.js +19 -0
  126. package/lib-commonjs/CalendarYear.js.map +1 -0
  127. package/lib-commonjs/components/Calendar/Calendar.js +317 -0
  128. package/lib-commonjs/components/Calendar/Calendar.js.map +1 -0
  129. package/lib-commonjs/components/Calendar/Calendar.types.js +21 -0
  130. package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -0
  131. package/lib-commonjs/components/Calendar/calendarNavigationIcons.js +18 -0
  132. package/lib-commonjs/components/Calendar/calendarNavigationIcons.js.map +1 -0
  133. package/lib-commonjs/components/Calendar/defaults.js +12 -0
  134. package/lib-commonjs/components/Calendar/defaults.js.map +1 -0
  135. package/lib-commonjs/components/Calendar/index.js +31 -0
  136. package/lib-commonjs/components/Calendar/index.js.map +1 -0
  137. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +311 -0
  138. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -0
  139. package/lib-commonjs/components/CalendarDay/CalendarDay.js +116 -0
  140. package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -0
  141. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +6 -0
  142. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -0
  143. package/lib-commonjs/components/CalendarDay/index.js +23 -0
  144. package/lib-commonjs/components/CalendarDay/index.js.map +1 -0
  145. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +370 -0
  146. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
  147. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +180 -0
  148. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
  149. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +6 -0
  150. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
  151. package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +172 -0
  152. package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
  153. package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +36 -0
  154. package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
  155. package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +45 -0
  156. package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
  157. package/lib-commonjs/components/CalendarDayGrid/index.js +26 -0
  158. package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -0
  159. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +1121 -0
  160. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
  161. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +105 -0
  162. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
  163. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +55 -0
  164. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -0
  165. package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +270 -0
  166. package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -0
  167. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +6 -0
  168. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
  169. package/lib-commonjs/components/CalendarMonth/index.js +20 -0
  170. package/lib-commonjs/components/CalendarMonth/index.js.map +1 -0
  171. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js +15 -0
  172. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -0
  173. package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +6 -0
  174. package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
  175. package/lib-commonjs/components/CalendarPicker/index.js +19 -0
  176. package/lib-commonjs/components/CalendarPicker/index.js.map +1 -0
  177. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +773 -0
  178. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
  179. package/lib-commonjs/components/CalendarYear/CalendarYear.js +307 -0
  180. package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -0
  181. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +6 -0
  182. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -0
  183. package/lib-commonjs/components/CalendarYear/index.js +20 -0
  184. package/lib-commonjs/components/CalendarYear/index.js.map +1 -0
  185. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +15 -0
  186. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
  187. package/lib-commonjs/index.js +154 -0
  188. package/lib-commonjs/index.js.map +1 -0
  189. package/lib-commonjs/utils/animations.js +153 -0
  190. package/lib-commonjs/utils/animations.js.map +1 -0
  191. package/lib-commonjs/utils/constants.js +92 -0
  192. package/lib-commonjs/utils/constants.js.map +1 -0
  193. package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +116 -0
  194. package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
  195. package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js +4 -0
  196. package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -0
  197. package/lib-commonjs/utils/dateFormatting/index.js +37 -0
  198. package/lib-commonjs/utils/dateFormatting/index.js.map +1 -0
  199. package/lib-commonjs/utils/dateGrid/dateGrid.types.js +4 -0
  200. package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -0
  201. package/lib-commonjs/utils/dateGrid/findAvailableDate.js +29 -0
  202. package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -0
  203. package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +23 -0
  204. package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -0
  205. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +20 -0
  206. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
  207. package/lib-commonjs/utils/dateGrid/getDayGrid.js +77 -0
  208. package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -0
  209. package/lib-commonjs/utils/dateGrid/index.js +28 -0
  210. package/lib-commonjs/utils/dateGrid/index.js.map +1 -0
  211. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +15 -0
  212. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -0
  213. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +15 -0
  214. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -0
  215. package/lib-commonjs/utils/dateGrid/isContiguous.js +28 -0
  216. package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -0
  217. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +21 -0
  218. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -0
  219. package/lib-commonjs/utils/dateMath/dateMath.js +308 -0
  220. package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -0
  221. package/lib-commonjs/utils/dateMath/index.js +67 -0
  222. package/lib-commonjs/utils/dateMath/index.js.map +1 -0
  223. package/lib-commonjs/utils/focus.js +29 -0
  224. package/lib-commonjs/utils/focus.js.map +1 -0
  225. package/lib-commonjs/utils/index.js +174 -0
  226. package/lib-commonjs/utils/index.js.map +1 -0
  227. package/package.json +9 -9
@@ -0,0 +1,1422 @@
1
+ /// <reference types="react" />
2
+
3
+ import * as React_2 from 'react';
4
+ import type { SlotClassNames } from '@fluentui/react-utilities';
5
+
6
+ /**
7
+ * Returns a date offset from the given date by the specified number of days.
8
+ * @param date - The origin date
9
+ * @param days - The number of days to offset. 'days' can be negative.
10
+ * @returns A new Date object offset from the origin date by the given number of days
11
+ */
12
+ export declare function addDays(date: Date, days: number): Date;
13
+
14
+ /**
15
+ * Returns a date offset from the given date by the specified number of months.
16
+ * The method tries to preserve the day-of-month; however, if the new month does not have enough days
17
+ * to contain the original day-of-month, we'll use the last day of the new month.
18
+ * @param date - The origin date
19
+ * @param months - The number of months to offset. 'months' can be negative.
20
+ * @returns A new Date object offset from the origin date by the given number of months
21
+ */
22
+ export declare function addMonths(date: Date, months: number): Date;
23
+
24
+ /**
25
+ * Returns a date offset from the given date by the specified number of weeks.
26
+ * @param date - The origin date
27
+ * @param weeks - The number of weeks to offset. 'weeks' can be negative.
28
+ * @returns A new Date object offset from the origin date by the given number of weeks
29
+ */
30
+ export declare function addWeeks(date: Date, weeks: number): Date;
31
+
32
+ /**
33
+ * Returns a date offset from the given date by the specified number of years.
34
+ * The method tries to preserve the day-of-month; however, if the new month does not have enough days
35
+ * to contain the original day-of-month, we'll use the last day of the new month.
36
+ * @param date - The origin date
37
+ * @param years - The number of years to offset. 'years' can be negative.
38
+ * @returns A new Date object offset from the origin date by the given number of years
39
+ */
40
+ export declare function addYears(date: Date, years: number): Date;
41
+
42
+ export declare enum AnimationDirection {
43
+ /**
44
+ * Grid will transition out and in horizontally
45
+ */
46
+ Horizontal = 0,
47
+ /**
48
+ * Grid will transition out and in vertically
49
+ */
50
+ Vertical = 1
51
+ }
52
+
53
+ /**
54
+ * @internal
55
+ */
56
+ export declare const Calendar: React_2.FunctionComponent<CalendarProps>;
57
+
58
+ /**
59
+ * @internal
60
+ */
61
+ export declare const calendarClassNames: SlotClassNames<CalendarStyles>;
62
+
63
+ /**
64
+ * @internal
65
+ */
66
+ export declare const CalendarDay: React_2.FunctionComponent<CalendarDayProps>;
67
+
68
+ /**
69
+ * @internal
70
+ */
71
+ export declare const calendarDayClassNames: SlotClassNames<CalendarDayStyles>;
72
+
73
+ export declare const CalendarDayGrid: React_2.FunctionComponent<CalendarDayGridProps>;
74
+
75
+ /**
76
+ * @internal
77
+ */
78
+ export declare const calendarDayGridClassNames: SlotClassNames<CalendarDayGridStyles>;
79
+
80
+ /**
81
+ * @internal
82
+ */
83
+ export declare interface CalendarDayGridProps extends DayGridOptions {
84
+ /**
85
+ * Optional callback to access the ICalendarDayGrid interface. Use this instead of ref for accessing
86
+ * the public methods and properties of the component.
87
+ */
88
+ componentRef?: React_2.RefObject<ICalendarDayGrid>;
89
+ /**
90
+ * Additional CSS class(es) to apply to the CalendarDayGrid.
91
+ */
92
+ className?: string;
93
+ /**
94
+ * Localized strings to use in the CalendarDayGrid
95
+ */
96
+ strings: CalendarStrings;
97
+ /**
98
+ * The currently selected date
99
+ */
100
+ selectedDate: Date;
101
+ /**
102
+ * The currently navigated date
103
+ */
104
+ navigatedDate: Date;
105
+ /**
106
+ * Callback issued when a date is selected
107
+ * @param date - The date the user selected
108
+ * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
109
+ * for the component.
110
+ */
111
+ onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
112
+ /**
113
+ * Callback issued when a date in the calendar is navigated
114
+ * @param date - The date that is navigated to
115
+ * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
116
+ */
117
+ onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
118
+ /**
119
+ * Callback issued when calendar day is closed
120
+ */
121
+ onDismiss?: () => void;
122
+ /**
123
+ * The first day of the week for your locale.
124
+ * @default DayOfWeek.Sunday
125
+ */
126
+ firstDayOfWeek: DayOfWeek;
127
+ /**
128
+ * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
129
+ * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
130
+ * @default FirstWeekOfYear.FirstDay
131
+ */
132
+ firstWeekOfYear: FirstWeekOfYear;
133
+ /**
134
+ * The date range type indicating how many days should be selected as the user
135
+ * selects days
136
+ * @default DateRangeType.Day
137
+ */
138
+ dateRangeType: DateRangeType;
139
+ /**
140
+ * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day
141
+ * views.
142
+ * @default 1
143
+ */
144
+ daysToSelectInDayView?: number;
145
+ /**
146
+ * Value of today. If unspecified, current time in client machine will be used.
147
+ */
148
+ today?: Date;
149
+ /**
150
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
151
+ * @default false
152
+ */
153
+ showWeekNumbers?: boolean;
154
+ /**
155
+ * Apply additional formatting to dates, for example localized date formatting.
156
+ */
157
+ dateTimeFormatter: DateFormatting;
158
+ /**
159
+ * Ref callback for individual days. Allows for customization of the styling, properties, or listeners of the
160
+ * specific day.
161
+ */
162
+ customDayCellRef?: (element: HTMLElement, date: Date, classNames: CalendarDayGridStyles) => void;
163
+ /**
164
+ * How many weeks to show by default. If not provided, will show enough weeks to display the current
165
+ * month, between 4 and 6 depending
166
+ * @default undefined
167
+ */
168
+ weeksToShow?: number;
169
+ /**
170
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
171
+ */
172
+ minDate?: Date;
173
+ /**
174
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
175
+ */
176
+ maxDate?: Date;
177
+ /**
178
+ * If set the Calendar will not allow selection of dates in this array.
179
+ */
180
+ restrictedDates?: Date[];
181
+ /**
182
+ * The days that are selectable when `dateRangeType` is WorkWeek.
183
+ * If `dateRangeType` is not WorkWeek this property does nothing.
184
+ * @default [Monday,Tuesday,Wednesday,Thursday,Friday]
185
+ */
186
+ workWeekDays?: DayOfWeek[];
187
+ /**
188
+ * Whether the close button should be shown or not
189
+ * @default false
190
+ */
191
+ showCloseButton?: boolean;
192
+ /**
193
+ * Allows all dates and buttons to be focused, including disabled ones
194
+ * @default false
195
+ */
196
+ allFocusable?: boolean;
197
+ /**
198
+ * Label string for the grid
199
+ */
200
+ gridLabel?: string;
201
+ /**
202
+ * The ID of the control that labels this one
203
+ */
204
+ labelledBy?: string;
205
+ /**
206
+ * Whether to show days outside the selected month with lighter styles
207
+ * @default true
208
+ */
209
+ lightenDaysOutsideNavigatedMonth?: boolean;
210
+ /**
211
+ * The cardinal directions for animation to occur during transitions, either horizontal or veritcal
212
+ */
213
+ animationDirection?: AnimationDirection;
214
+ /**
215
+ * Optional callback function to mark specific days with a small symbol. Fires when the date range changes,
216
+ * gives the starting and ending displayed dates and expects the list of which days in between should be
217
+ * marked.
218
+ */
219
+ getMarkedDays?: (startingDate: Date, endingDate: Date) => Date[];
220
+ }
221
+
222
+ /**
223
+ * @internal
224
+ */
225
+ export declare interface CalendarDayGridStyleProps {
226
+ /**
227
+ * Accept custom classNames
228
+ */
229
+ className?: string;
230
+ /**
231
+ * The date range type
232
+ */
233
+ dateRangeType?: DateRangeType;
234
+ /**
235
+ * Whether week numbers are being shown
236
+ */
237
+ showWeekNumbers?: boolean;
238
+ /**
239
+ * Whether to show days outside the selected month with lighter styles
240
+ */
241
+ lightenDaysOutsideNavigatedMonth?: boolean;
242
+ /**
243
+ * Whether grid entering animation should be forwards or backwards
244
+ */
245
+ animateBackwards?: boolean;
246
+ /**
247
+ * The cardinal directions for animation to occur during transitions, either horizontal or vertical
248
+ */
249
+ animationDirection?: AnimationDirection;
250
+ }
251
+
252
+ /**
253
+ * @internal
254
+ */
255
+ export declare interface CalendarDayGridStyles {
256
+ /**
257
+ * The style for the root div
258
+ */
259
+ wrapper?: string;
260
+ /**
261
+ * The style for the table containing the grid
262
+ */
263
+ table?: string;
264
+ /**
265
+ * The style to apply to the grid cells for days
266
+ */
267
+ dayCell?: string;
268
+ /**
269
+ * The style to apply to grid cells for days in the selected range
270
+ */
271
+ daySelected?: string;
272
+ /**
273
+ * The classname applied when a single day is selected
274
+ */
275
+ daySingleSelected?: string;
276
+ /**
277
+ * The style to apply to row around weeks
278
+ */
279
+ weekRow?: string;
280
+ /**
281
+ * The style to apply to the column headers above the weeks
282
+ */
283
+ weekDayLabelCell?: string;
284
+ /**
285
+ * The style to apply to grid cells for week numbers
286
+ */
287
+ weekNumberCell?: string;
288
+ /**
289
+ * The style to apply to individual days that are outside the min/max date range
290
+ */
291
+ dayOutsideBounds?: string;
292
+ /**
293
+ * The style to apply to individual days that are outside the current month
294
+ */
295
+ dayOutsideNavigatedMonth?: string;
296
+ /**
297
+ * The style to apply to the button element within the day cells
298
+ */
299
+ dayButton?: string;
300
+ /**
301
+ * The style to apply to the individual button element that matches the "today" parameter
302
+ */
303
+ dayIsToday?: string;
304
+ /**
305
+ * The style applied to the first placeholder week used during transitions
306
+ */
307
+ firstTransitionWeek?: string;
308
+ /**
309
+ * The style applied to the last placeholder week used during transitions
310
+ */
311
+ lastTransitionWeek?: string;
312
+ /**
313
+ * The style applied to the marker on days to mark as important
314
+ */
315
+ dayMarker?: string;
316
+ /**
317
+ * The classname applied to the day "today" span
318
+ */
319
+ dayTodayMarker?: string;
320
+ }
321
+
322
+ export declare interface CalendarDayProps extends CalendarDayGridProps {
323
+ /**
324
+ * Optional callback to access the ICalendarDay interface. Use this instead of ref for accessing
325
+ * the public methods and properties of the component.
326
+ */
327
+ componentRef?: React_2.RefObject<ICalendarDay>;
328
+ /**
329
+ * Additional CSS class(es) to apply to the CalendarDay.
330
+ */
331
+ className?: string;
332
+ /**
333
+ * Localized strings to use in the Calendar
334
+ */
335
+ strings: CalendarStrings;
336
+ /**
337
+ * The currently navigated date
338
+ */
339
+ navigatedDate: Date;
340
+ /**
341
+ * Callback issued when a date in the calendar is navigated
342
+ * @param date - The date that is navigated to
343
+ * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
344
+ */
345
+ onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
346
+ /**
347
+ * Callback issued when calendar day is closed
348
+ */
349
+ onDismiss?: () => void;
350
+ /**
351
+ * Callback function when the header is selected
352
+ */
353
+ onHeaderSelect?: () => void;
354
+ /**
355
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
356
+ * @default false
357
+ */
358
+ showWeekNumbers?: boolean;
359
+ /**
360
+ * Apply additional formatting to dates, for example localized date formatting.
361
+ */
362
+ dateTimeFormatter: DateFormatting;
363
+ /**
364
+ * Whether the calendar should show 6 weeks by default.
365
+ * @default false
366
+ */
367
+ showSixWeeksByDefault?: boolean;
368
+ /**
369
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
370
+ */
371
+ minDate?: Date;
372
+ /**
373
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
374
+ */
375
+ maxDate?: Date;
376
+ /**
377
+ * If set the Calendar will not allow selection of dates in this array.
378
+ */
379
+ restrictedDates?: Date[];
380
+ /**
381
+ * Whether the close button should be shown or not
382
+ * @default false
383
+ */
384
+ showCloseButton?: boolean;
385
+ /**
386
+ * Allows all dates and buttons to be focused, including disabled ones
387
+ * @default false
388
+ */
389
+ allFocusable?: boolean;
390
+ /**
391
+ * Custom navigation icons.
392
+ */
393
+ navigationIcons: CalendarNavigationIcons;
394
+ }
395
+
396
+ /**
397
+ * @internal
398
+ */
399
+ export declare interface CalendarDayStyleProps extends CalendarDayGridStyleProps {
400
+ /**
401
+ * Accept custom classNames
402
+ */
403
+ className?: string;
404
+ /**
405
+ * Whether the header is clickable
406
+ */
407
+ headerIsClickable?: boolean;
408
+ /**
409
+ * Whether week numbers are being shown
410
+ */
411
+ showWeekNumbers?: boolean;
412
+ }
413
+
414
+ /**
415
+ * @internal
416
+ */
417
+ export declare interface CalendarDayStyles {
418
+ /**
419
+ * Style for the root element.
420
+ */
421
+ root: string;
422
+ /**
423
+ * The style for the header button and forward/back navigation button container
424
+ */
425
+ header: string;
426
+ /**
427
+ * The style for the title text inside the header
428
+ */
429
+ monthAndYear: string;
430
+ /**
431
+ * The style for the wrapper around forward/back/close buttons
432
+ */
433
+ monthComponents: string;
434
+ /**
435
+ * The style for the forward/back/close buttons
436
+ */
437
+ headerIconButton: string;
438
+ /**
439
+ * The style to apply for disabled elements
440
+ */
441
+ disabledStyle: string;
442
+ }
443
+
444
+ /**
445
+ * @internal
446
+ */
447
+ export declare const CalendarMonth: React_2.FunctionComponent<CalendarMonthProps>;
448
+
449
+ export declare interface CalendarMonthProps {
450
+ /**
451
+ * Optional callback to access the ICalendarMonth interface. Use this instead of ref for accessing
452
+ * the public methods and properties of the component.
453
+ */
454
+ componentRef?: React_2.RefObject<ICalendarMonth>;
455
+ /**
456
+ * Localized strings to use in the Calendar
457
+ */
458
+ strings: CalendarStrings;
459
+ /**
460
+ * The currently selected date
461
+ */
462
+ selectedDate: Date;
463
+ /**
464
+ * The currently navigated date
465
+ */
466
+ navigatedDate: Date;
467
+ /**
468
+ * Callback issued when a month is selected
469
+ * @param date - The date the user selected
470
+ * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
471
+ * for the component.
472
+ */
473
+ onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
474
+ /**
475
+ * Callback issued when the year is navigated
476
+ * @param date - The date that is navigated to
477
+ * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
478
+ */
479
+ onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
480
+ /**
481
+ * Value of today. If unspecified, current time in client machine will be used.
482
+ */
483
+ today?: Date;
484
+ /**
485
+ * Callback function when the header is selected
486
+ */
487
+ onHeaderSelect?: () => void;
488
+ /**
489
+ * Apply additional formatting to dates, for example localized date formatting.
490
+ */
491
+ dateTimeFormatter?: DateFormatting;
492
+ /**
493
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
494
+ */
495
+ minDate?: Date;
496
+ /**
497
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
498
+ */
499
+ maxDate?: Date;
500
+ /**
501
+ * Whether the month picker should highlight the current month
502
+ * @default false
503
+ */
504
+ highlightCurrentMonth?: boolean;
505
+ /**
506
+ * Whether the month picker should highlight the selected month
507
+ * @default false
508
+ */
509
+ highlightSelectedMonth?: boolean;
510
+ /**
511
+ * Allows all dates and buttons to be focused, including disabled ones
512
+ * @default false
513
+ */
514
+ allFocusable?: boolean;
515
+ /**
516
+ * Additional CSS class(es) to apply to the CalendarMonth.
517
+ */
518
+ className?: string;
519
+ /**
520
+ * Whether the year picker is hidden
521
+ * @default false
522
+ */
523
+ yearPickerHidden?: boolean;
524
+ /**
525
+ * The cardinal directions for animation to occur during transitions, either horizontal or veritcal
526
+ */
527
+ animationDirection?: AnimationDirection;
528
+ /**
529
+ * Custom navigation icons.
530
+ */
531
+ navigationIcons: CalendarNavigationIcons;
532
+ }
533
+
534
+ /**
535
+ * @internal
536
+ */
537
+ export declare interface CalendarMonthStyleProps extends CalendarPickerStyleProps {
538
+ }
539
+
540
+ /**
541
+ * @internal
542
+ */
543
+ export declare interface CalendarMonthStyles extends CalendarPickerStyles {
544
+ }
545
+
546
+ declare type CalendarNavigationIcons = {
547
+ /**
548
+ * Icon to use for up arrow navigation. Default comes from \@fluentui\/react-icons
549
+ * @default ArrowUpRegular
550
+ */
551
+ upNavigation?: JSX.Element;
552
+ /**
553
+ * Icon to use for down arrow navigation. Default comes from \@fluentui\/react-icons
554
+ * @default ArrowDownRegular
555
+ */
556
+ downNavigation?: JSX.Element;
557
+ /**
558
+ * Icon to use for the dismiss button. Default comes from \@fluentui\/react-icons
559
+ * @default DismissRegular
560
+ */
561
+ dismiss?: JSX.Element;
562
+ };
563
+
564
+ /**
565
+ * @internal
566
+ */
567
+ export declare const calendarPickerClassNames: SlotClassNames<CalendarPickerStyles>;
568
+
569
+ /**
570
+ * @internal
571
+ */
572
+ export declare interface CalendarPickerStyleProps {
573
+ /**
574
+ * Accept custom classNames
575
+ */
576
+ className?: string;
577
+ /**
578
+ * Whether the header can be clicked
579
+ */
580
+ hasHeaderClickCallback?: boolean;
581
+ /**
582
+ * Whether the picker should highlight the current item
583
+ */
584
+ highlightCurrent?: boolean;
585
+ /**
586
+ * Whether the picker should highlight the selected item
587
+ */
588
+ highlightSelected?: boolean;
589
+ /**
590
+ * The cardinal directions for animation to occur during transitions, either horizontal or veritcal
591
+ */
592
+ animationDirection?: AnimationDirection;
593
+ /**
594
+ * Whether grid entering animation should be forwards or backwards
595
+ */
596
+ animateBackwards?: boolean;
597
+ }
598
+
599
+ /**
600
+ * @internal
601
+ */
602
+ export declare interface CalendarPickerStyles {
603
+ /**
604
+ * Style for the root element.
605
+ */
606
+ root: string;
607
+ headerContainer: string;
608
+ currentItemButton: string;
609
+ navigationButtonsContainer: string;
610
+ navigationButton: string;
611
+ gridContainer: string;
612
+ buttonRow: string;
613
+ itemButton: string;
614
+ current: string;
615
+ selected: string;
616
+ disabled: string;
617
+ }
618
+
619
+ export declare interface CalendarProps extends React_2.RefAttributes<HTMLDivElement> {
620
+ /**
621
+ * Optional callback to access the ICalendar interface. Use this instead of ref for accessing
622
+ * the public methods and properties of the component.
623
+ */
624
+ componentRef?: React_2.RefObject<ICalendar>;
625
+ /**
626
+ * Customized props for the calendar day
627
+ */
628
+ calendarDayProps?: Partial<CalendarDayProps>;
629
+ /**
630
+ * Customized props for the calendar month
631
+ */
632
+ calendarMonthProps?: Partial<CalendarMonthProps>;
633
+ /**
634
+ * Optional class name to add to the root element.
635
+ */
636
+ className?: string;
637
+ /**
638
+ * Callback for when a date is selected
639
+ * @param date - The date the user selected
640
+ * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
641
+ * for the component.
642
+ */
643
+ onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
644
+ /**
645
+ * Callback for when calendar is closed
646
+ */
647
+ onDismiss?: () => void;
648
+ /**
649
+ * ID for the calendar
650
+ */
651
+ id?: string;
652
+ /**
653
+ * Default value of the Calendar, if any
654
+ */
655
+ value?: Date;
656
+ /**
657
+ * Value of today. If unspecified, current time in client machine will be used.
658
+ */
659
+ today?: Date;
660
+ /**
661
+ * The date range type indicating how many days should be selected as the user
662
+ * selects days
663
+ * @default DateRangeType.Day
664
+ */
665
+ dateRangeType?: DateRangeType;
666
+ /**
667
+ * The first day of the week for your locale.
668
+ * @default DayOfWeek.Sunday
669
+ */
670
+ firstDayOfWeek?: DayOfWeek;
671
+ /**
672
+ * Defines when the first week of the year should start.
673
+ * @default FirstWeekOfYear.FirstDay
674
+ */
675
+ firstWeekOfYear?: FirstWeekOfYear;
676
+ /**
677
+ * Whether the month picker is shown beside the day picker or hidden.
678
+ * @default true
679
+ */
680
+ isMonthPickerVisible?: boolean;
681
+ /**
682
+ * Whether the day picker is shown beside the month picker or hidden.
683
+ * @default true
684
+ */
685
+ isDayPickerVisible?: boolean;
686
+ /**
687
+ * Show month picker on top of date picker when visible.
688
+ * @default false
689
+ */
690
+ showMonthPickerAsOverlay?: boolean;
691
+ /**
692
+ * Whether the "Go to today" link should be shown or not
693
+ */
694
+ showGoToToday?: boolean;
695
+ /**
696
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
697
+ * @default false
698
+ */
699
+ showWeekNumbers?: boolean;
700
+ /**
701
+ * Localized strings to use in the Calendar
702
+ */
703
+ strings?: CalendarStrings;
704
+ /**
705
+ * Apply additional formatting to dates, for example localized date formatting.
706
+ */
707
+ dateTimeFormatter?: DateFormatting;
708
+ /**
709
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
710
+ */
711
+ minDate?: Date;
712
+ /**
713
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
714
+ */
715
+ maxDate?: Date;
716
+ /**
717
+ * If set the Calendar will not allow selection of dates in this array.
718
+ */
719
+ restrictedDates?: Date[];
720
+ /**
721
+ * Whether the calendar should show 6 weeks by default.
722
+ * @default false
723
+ */
724
+ showSixWeeksByDefault?: boolean;
725
+ /**
726
+ * The days that are selectable when `dateRangeType` is `WorkWeek`.
727
+ * If `dateRangeType` is not `WorkWeek` this property does nothing.
728
+ * @default [Monday,Tuesday,Wednesday,Thursday,Friday]
729
+ */
730
+ workWeekDays?: DayOfWeek[];
731
+ /**
732
+ * Whether the month picker should highlight the current month
733
+ * @default false
734
+ */
735
+ highlightCurrentMonth?: boolean;
736
+ /**
737
+ * Whether the month picker should highlight the selected month
738
+ * @default false
739
+ */
740
+ highlightSelectedMonth?: boolean;
741
+ /**
742
+ * Whether the close button should be shown or not
743
+ * @default false
744
+ */
745
+ showCloseButton?: boolean;
746
+ /**
747
+ * Allows all dates and buttons to be focused, including disabled ones
748
+ * @default false
749
+ */
750
+ allFocusable?: boolean;
751
+ }
752
+
753
+ export declare interface CalendarStrings extends DateGridStrings {
754
+ /**
755
+ * String to render for button to direct the user to today's date.
756
+ */
757
+ goToToday: string;
758
+ /**
759
+ * Aria-label for the "previous month" button in day picker.
760
+ */
761
+ prevMonthAriaLabel?: string;
762
+ /**
763
+ * Aria-label for the "next month" button in day picker.
764
+ */
765
+ nextMonthAriaLabel?: string;
766
+ /**
767
+ * Aria-label for the "previous year" button in month picker.
768
+ */
769
+ prevYearAriaLabel?: string;
770
+ /**
771
+ * Aria-label for the "next year" button in month picker.
772
+ */
773
+ nextYearAriaLabel?: string;
774
+ /**
775
+ * Aria-label for the "previous year range" button in year picker.
776
+ */
777
+ prevYearRangeAriaLabel?: string;
778
+ /**
779
+ * Aria-label for the "next year range" button in year picker.
780
+ */
781
+ nextYearRangeAriaLabel?: string;
782
+ /**
783
+ * Aria-label format string for the header button in the month picker. Should have 1 string param, e.g. "`{0}`,
784
+ * select to change the year". This aria-label will only be applied if the year picker is enabled; otherwise
785
+ * the label will default to the header string, e.g. "2019".
786
+ */
787
+ monthPickerHeaderAriaLabel?: string;
788
+ /**
789
+ * Aria-label format string for the header button in the year picker.
790
+ * Should have 1 string param, e.g. "`{0}`, select to change the month"
791
+ */
792
+ yearPickerHeaderAriaLabel?: string;
793
+ /**
794
+ * Aria-label for the "close" button.
795
+ */
796
+ closeButtonAriaLabel?: string;
797
+ /**
798
+ * Aria-label format string for the week number header. Should have 1 string param, e.g. "week number `{0}`"
799
+ */
800
+ weekNumberFormatString?: string;
801
+ /**
802
+ * Aria-label format string for the currently selected date. Should have 1 string param, e.g. "Selected date `{0}`"
803
+ */
804
+ selectedDateFormatString?: string;
805
+ /**
806
+ * Aria-label format string for today's date. Should have 1 string param, e.g. "Today's date `{0}`"
807
+ */
808
+ todayDateFormatString?: string;
809
+ /**
810
+ * Aria-label for when a date is marked
811
+ */
812
+ dayMarkedAriaLabel?: string;
813
+ }
814
+
815
+ /**
816
+ * @internal
817
+ */
818
+ export declare interface CalendarStyleProps {
819
+ /**
820
+ * Custom CSS class for the calendar.
821
+ */
822
+ className?: string;
823
+ /**
824
+ * Whether the month picker is visible
825
+ */
826
+ isMonthPickerVisible?: boolean;
827
+ /**
828
+ * Whether the day picker is visible
829
+ */
830
+ isDayPickerVisible?: boolean;
831
+ /**
832
+ * Whether only month picker is shown
833
+ */
834
+ monthPickerOnly?: boolean;
835
+ /**
836
+ * Whether the month picker is overlaid on the day picker
837
+ */
838
+ showMonthPickerAsOverlay?: boolean;
839
+ /**
840
+ * @deprecated Use `overlaidWithButton`
841
+ */
842
+ overlayedWithButton?: boolean;
843
+ /**
844
+ * Whether the month and day picker are overlaid and the 'go to today' button is shown
845
+ */
846
+ overlaidWithButton?: boolean;
847
+ /**
848
+ * Whether the go to today button is shown
849
+ */
850
+ showGoToToday?: boolean;
851
+ /**
852
+ * Whether the week numbers are shown
853
+ */
854
+ showWeekNumbers?: boolean;
855
+ }
856
+
857
+ /**
858
+ * @internal
859
+ */
860
+ export declare interface CalendarStyles {
861
+ /**
862
+ * Style for the root element.
863
+ */
864
+ root: string;
865
+ divider: string;
866
+ goTodayButton: string;
867
+ monthPickerWrapper: string;
868
+ liveRegion: string;
869
+ }
870
+
871
+ /**
872
+ * @internal
873
+ */
874
+ export declare const CalendarYear: React_2.FunctionComponent<CalendarYearProps>;
875
+
876
+ /**
877
+ * @internal
878
+ */
879
+ export declare interface CalendarYearHeaderProps extends CalendarYearProps, CalendarYearRange {
880
+ /**
881
+ * Callback action when the 'previous' navigation button is selected
882
+ */
883
+ onSelectPrev?: () => void;
884
+ /**
885
+ * Callback action when the 'next' navigation button is selected
886
+ */
887
+ onSelectNext?: () => void;
888
+ /**
889
+ * Whether title entering animation should be forwards or backwards
890
+ */
891
+ animateBackwards?: boolean;
892
+ }
893
+
894
+ /**
895
+ * @internal
896
+ */
897
+ export declare interface CalendarYearProps {
898
+ /**
899
+ * Optional callback to access the ICalendarYear interface. Use this instead of ref for accessing
900
+ * the public methods and properties of the component.
901
+ */
902
+ componentRef?: React_2.RefObject<ICalendarYear>;
903
+ /**
904
+ * Localized strings to use in the Calendar
905
+ */
906
+ strings?: CalendarYearStrings;
907
+ /**
908
+ * The currently selected year
909
+ */
910
+ selectedYear?: number;
911
+ /**
912
+ * The currently navigated year
913
+ */
914
+ navigatedYear?: number;
915
+ /**
916
+ * Callback action when a year is selected
917
+ * @param year - The year the user selected
918
+ */
919
+ onSelectYear?: (year: number) => void;
920
+ /**
921
+ * Callback action when the header is selected
922
+ */
923
+ onHeaderSelect?: (focus: boolean) => void;
924
+ /**
925
+ * If set the Calendar will not allow navigation to or selection of a year earlier than this value.
926
+ */
927
+ minYear?: number;
928
+ /**
929
+ * If set the Calendar will not allow navigation to or selection of a year later than this value.
930
+ */
931
+ maxYear?: number;
932
+ /**
933
+ * Whether the year picker should highlight the current year
934
+ * @default false
935
+ */
936
+ highlightCurrentYear?: boolean;
937
+ /**
938
+ * Whether the year picker should highlight the selected year
939
+ * @default false
940
+ */
941
+ highlightSelectedYear?: boolean;
942
+ /**
943
+ * Accept custom classNames
944
+ */
945
+ className?: string;
946
+ /**
947
+ * Custom renderer for the title
948
+ */
949
+ onRenderTitle?: (props: CalendarYearHeaderProps) => React_2.ReactNode;
950
+ /**
951
+ * Custom renderer for the year
952
+ */
953
+ onRenderYear?: (year: number) => React_2.ReactNode;
954
+ /**
955
+ * The cardinal directions for animation to occur during transitions, either horizontal or veritcal
956
+ */
957
+ animationDirection?: AnimationDirection;
958
+ /**
959
+ * Custom navigation icons.
960
+ */
961
+ navigationIcons: CalendarNavigationIcons;
962
+ }
963
+
964
+ /**
965
+ * @internal
966
+ */
967
+ export declare interface CalendarYearRange {
968
+ fromYear: number;
969
+ toYear: number;
970
+ }
971
+
972
+ /**
973
+ * @internal
974
+ */
975
+ export declare interface CalendarYearRangeToString {
976
+ (range: CalendarYearRange): string;
977
+ }
978
+
979
+ /**
980
+ * @internal
981
+ */
982
+ export declare interface CalendarYearStrings {
983
+ rangeAriaLabel?: string | CalendarYearRangeToString;
984
+ prevRangeAriaLabel?: string | CalendarYearRangeToString;
985
+ nextRangeAriaLabel?: string | CalendarYearRangeToString;
986
+ headerAriaLabelFormatString?: string;
987
+ }
988
+
989
+ /**
990
+ * @internal
991
+ */
992
+ export declare interface CalendarYearStyleProps extends CalendarPickerStyleProps {
993
+ }
994
+
995
+ /**
996
+ * @internal
997
+ */
998
+ export declare interface CalendarYearStyles extends CalendarPickerStyles {
999
+ }
1000
+
1001
+ /**
1002
+ * Compare the date parts of two dates
1003
+ * @param date1 - The first date to compare
1004
+ * @param date2 - The second date to compare
1005
+ * @returns A negative value if date1 is earlier than date2, 0 if the dates are equal, or a positive value
1006
+ * if date1 is later than date2.
1007
+ */
1008
+ export declare function compareDatePart(date1: Date, date2: Date): number;
1009
+
1010
+ /**
1011
+ * Compares two dates, and returns true if the two dates (not accounting for time-of-day) are equal.
1012
+ * @returns True if the two dates represent the same date (regardless of time-of-day), false otherwise.
1013
+ */
1014
+ export declare function compareDates(date1: Date, date2: Date): boolean;
1015
+
1016
+ export declare interface DateFormatting {
1017
+ /**
1018
+ * Get a localized string for a day.
1019
+ */
1020
+ formatDay: (date: Date) => string;
1021
+ /**
1022
+ * Get a localized string for a month.
1023
+ */
1024
+ formatMonth: (date: Date, strings: DateGridStrings) => string;
1025
+ /**
1026
+ * Get a localized string for a year.
1027
+ */
1028
+ formatYear: (date: Date) => string;
1029
+ /**
1030
+ * Get a localized string for a month, day, and year.
1031
+ */
1032
+ formatMonthDayYear: (date: Date, strings: DateGridStrings) => string;
1033
+ /**
1034
+ * Get a localized string for a month and year.
1035
+ */
1036
+ formatMonthYear: (date: Date, strings: DateGridStrings) => string;
1037
+ }
1038
+
1039
+ export declare interface DateGridStrings {
1040
+ /**
1041
+ * An array of strings for the full names of months.
1042
+ * The array is 0-based, so months[0] should be the full name of January.
1043
+ */
1044
+ months: string[];
1045
+ /**
1046
+ * An array of strings for the short names of months.
1047
+ * The array is 0-based, so shortMonths[0] should be the short name of January.
1048
+ */
1049
+ shortMonths: string[];
1050
+ /**
1051
+ * An array of strings for the full names of days of the week.
1052
+ * The array is 0-based, so days[0] should be the full name of Sunday.
1053
+ */
1054
+ days: string[];
1055
+ /**
1056
+ * An array of strings for the initials of the days of the week.
1057
+ * The array is 0-based, so days[0] should be the initial of Sunday.
1058
+ */
1059
+ shortDays: string[];
1060
+ }
1061
+
1062
+ /**
1063
+ * The supported date range types
1064
+ */
1065
+ export declare enum DateRangeType {
1066
+ Day = 0,
1067
+ Week = 1,
1068
+ Month = 2,
1069
+ WorkWeek = 3
1070
+ }
1071
+
1072
+ declare interface Day {
1073
+ /** `Date.toString()` value of current date */
1074
+ key: string;
1075
+ /** `Date.getDate()` value of current date */
1076
+ date: string;
1077
+ /** `Date` object of current date */
1078
+ originalDate: Date;
1079
+ /** Is current date is in the same month as "today" date */
1080
+ isInMonth: boolean;
1081
+ /** Is current date is "today" date */
1082
+ isToday: boolean;
1083
+ /** Is current date is selected in range */
1084
+ isSelected: boolean;
1085
+ /** Is current date is selected */
1086
+ isSingleSelected: boolean;
1087
+ /** Is current date within restriction boundaries */
1088
+ isInBounds: boolean;
1089
+ /** Is current date marked */
1090
+ isMarked: boolean;
1091
+ }
1092
+
1093
+ declare interface DayGridOptions extends RestrictedDatesOptions {
1094
+ /**
1095
+ * The first day of the week for your locale.
1096
+ */
1097
+ firstDayOfWeek: DayOfWeek;
1098
+ /**
1099
+ * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
1100
+ * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
1101
+ */
1102
+ firstWeekOfYear: FirstWeekOfYear;
1103
+ /**
1104
+ * The date range type indicating how many days should be selected as the user
1105
+ * selects days
1106
+ */
1107
+ dateRangeType: DateRangeType;
1108
+ /**
1109
+ * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day
1110
+ * views.
1111
+ */
1112
+ daysToSelectInDayView?: number;
1113
+ /**
1114
+ * Value of today. If unspecified, current time in client machine will be used.
1115
+ */
1116
+ today?: Date;
1117
+ /**
1118
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
1119
+ */
1120
+ showWeekNumbers?: boolean;
1121
+ /**
1122
+ * The days that are selectable when `dateRangeType` is WorkWeek.
1123
+ * If `dateRangeType` is not WorkWeek this property does nothing.
1124
+ */
1125
+ workWeekDays?: DayOfWeek[];
1126
+ /**
1127
+ * Which days in the generated grid should be marked.
1128
+ */
1129
+ markedDays?: Date[];
1130
+ /**
1131
+ * The currently selected date
1132
+ */
1133
+ selectedDate: Date;
1134
+ /**
1135
+ * The currently navigated date
1136
+ */
1137
+ navigatedDate: Date;
1138
+ /**
1139
+ * How many weeks to show by default. If not provided, will show enough weeks to display the current
1140
+ * month, between 4 and 6 depending
1141
+ */
1142
+ weeksToShow?: number;
1143
+ }
1144
+
1145
+ export declare interface DayInfo extends Day {
1146
+ onSelected: () => void;
1147
+ setRef(element: HTMLElement | null): void;
1148
+ }
1149
+
1150
+ /**
1151
+ * The days of the week
1152
+ */
1153
+ export declare enum DayOfWeek {
1154
+ Sunday = 0,
1155
+ Monday = 1,
1156
+ Tuesday = 2,
1157
+ Wednesday = 3,
1158
+ Thursday = 4,
1159
+ Friday = 5,
1160
+ Saturday = 6
1161
+ }
1162
+
1163
+ export declare const DAYS_IN_WEEK = 7;
1164
+
1165
+ export declare const DEFAULT_CALENDAR_STRINGS: CalendarStrings;
1166
+
1167
+ export declare const DEFAULT_DATE_FORMATTING: DateFormatting;
1168
+
1169
+ export declare const DEFAULT_DATE_GRID_STRINGS: DateGridStrings;
1170
+
1171
+ export declare const defaultCalendarStrings: CalendarStrings;
1172
+
1173
+ /**
1174
+ * @internal
1175
+ */
1176
+ export declare const extraCalendarDayGridClassNames: {
1177
+ hoverStyle: string;
1178
+ pressedStyle: string;
1179
+ };
1180
+
1181
+ /**
1182
+ * First week of the year settings types
1183
+ */
1184
+ export declare enum FirstWeekOfYear {
1185
+ FirstDay = 0,
1186
+ FirstFullWeek = 1,
1187
+ FirstFourDayWeek = 2
1188
+ }
1189
+
1190
+ /**
1191
+ * Helper function to assist in date comparisons
1192
+ */
1193
+ export declare function getDatePartHashValue(date: Date): number;
1194
+
1195
+ /**
1196
+ * Gets the date range array including the specified date. The date range array is calculated as the list
1197
+ * of dates accounting for the specified first day of the week and date range type.
1198
+ * @param date - The input date
1199
+ * @param dateRangeType - The desired date range type, i.e., day, week, month, etc.
1200
+ * @param firstDayOfWeek - The first day of the week.
1201
+ * @param workWeekDays - The allowed days in work week. If not provided, assumes all days are allowed.
1202
+ * @param daysToSelectInDayView - The number of days to include when using dateRangeType === DateRangeType.Day
1203
+ * for multiday view. Defaults to 1
1204
+ * @returns An array of dates representing the date range containing the specified date.
1205
+ */
1206
+ export declare function getDateRangeArray(date: Date, dateRangeType: DateRangeType, firstDayOfWeek: DayOfWeek, workWeekDays?: DayOfWeek[], daysToSelectInDayView?: number): Date[];
1207
+
1208
+ /**
1209
+ * Gets the date for the last day of the week based on the given date assuming
1210
+ * the specified first day of the week.
1211
+ * @param date - The date to find the beginning of the week date for.
1212
+ * @returns A new date object representing the first day of the week containing the input date.
1213
+ */
1214
+ export declare function getEndDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
1215
+
1216
+ /**
1217
+ * Returns a date that is the last day of the month of the provided date.
1218
+ * @param date - The origin date
1219
+ * @returns A new Date object with the day set to the last day of the month.
1220
+ */
1221
+ export declare function getMonthEnd(date: Date): Date;
1222
+
1223
+ /**
1224
+ * Returns a date that is the first day of the month of the provided date.
1225
+ * @param date - The origin date
1226
+ * @returns A new Date object with the day set to the first day of the month.
1227
+ */
1228
+ export declare function getMonthStart(date: Date): Date;
1229
+
1230
+ /**
1231
+ * Gets the date for the first day of the week based on the given date assuming
1232
+ * the specified first day of the week.
1233
+ * @param date - The date to find the beginning of the week date for.
1234
+ * @returns A new date object representing the first day of the week containing the input date.
1235
+ */
1236
+ export declare function getStartDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
1237
+
1238
+ /**
1239
+ * Returns the week number for a date.
1240
+ * Week numbers are 1 - 52 (53) in a year
1241
+ * @param date - A date to find the week number for.
1242
+ * @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)
1243
+ * @param firstWeekOfYear - The first week of the year (1-2)
1244
+ * @returns The week's number in the year.
1245
+ */
1246
+ export declare function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear): number;
1247
+
1248
+ /**
1249
+ * Returns the week number for a date.
1250
+ * Week numbers are 1 - 52 (53) in a year
1251
+ * @param navigatedDate - A date to find the week number for.
1252
+ * @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)
1253
+ * @param firstWeekOfYear - The first week of the year (1-2)
1254
+ * @returns The weeks number array for the current month.
1255
+ */
1256
+ export declare function getWeekNumbersInMonth(weeksInMonth: number, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear, navigatedDate: Date): number[];
1257
+
1258
+ /**
1259
+ * Returns a date that is the last day of the year of the provided date.
1260
+ * @param date - The origin date
1261
+ * @returns A new Date object with the day set to the last day of the year.
1262
+ */
1263
+ export declare function getYearEnd(date: Date): Date;
1264
+
1265
+ /**
1266
+ * Returns a date that is the first day of the year of the provided date.
1267
+ * @param date - The origin date
1268
+ * @returns A new Date object with the day set to the first day of the year.
1269
+ */
1270
+ export declare function getYearStart(date: Date): Date;
1271
+
1272
+ export declare interface ICalendar {
1273
+ /** Sets focus to the selected date. */
1274
+ focus: () => void;
1275
+ }
1276
+
1277
+ export declare interface ICalendarDay {
1278
+ focus(): void;
1279
+ }
1280
+
1281
+ /**
1282
+ * @internal
1283
+ */
1284
+ export declare interface ICalendarDayGrid {
1285
+ focus(): void;
1286
+ }
1287
+
1288
+ export declare interface ICalendarMonth {
1289
+ focus(): void;
1290
+ }
1291
+
1292
+ /**
1293
+ * @internal
1294
+ */
1295
+ export declare interface ICalendarYear {
1296
+ focus(): void;
1297
+ }
1298
+
1299
+ /**
1300
+ * Checks whether the specified date is in the given date range.
1301
+ * @param date - The origin date
1302
+ * @param dateRange - An array of dates to do the lookup on
1303
+ * @returns True if the date matches one of the dates in the specified array, false otherwise.
1304
+ */
1305
+ export declare function isInDateRangeArray(date: Date, dateRange: Date[]): boolean;
1306
+
1307
+ /**
1308
+ * The months
1309
+ */
1310
+ export declare enum MonthOfYear {
1311
+ January = 0,
1312
+ February = 1,
1313
+ March = 2,
1314
+ April = 3,
1315
+ May = 4,
1316
+ June = 5,
1317
+ July = 6,
1318
+ August = 7,
1319
+ September = 8,
1320
+ October = 9,
1321
+ November = 10,
1322
+ December = 11
1323
+ }
1324
+
1325
+ declare interface RestrictedDatesOptions {
1326
+ /**
1327
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
1328
+ */
1329
+ minDate?: Date;
1330
+ /**
1331
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
1332
+ */
1333
+ maxDate?: Date;
1334
+ /**
1335
+ * If set the Calendar will not allow selection of dates in this array.
1336
+ */
1337
+ restrictedDates?: Date[];
1338
+ }
1339
+
1340
+ /**
1341
+ * Returns a date that is a copy of the given date, aside from the month changing to the given month.
1342
+ * The method tries to preserve the day-of-month; however, if the new month does not have enough days
1343
+ * to contain the original day-of-month, we'll use the last day of the new month.
1344
+ * @param date - The origin date
1345
+ * @param month - The 0-based index of the month to set on the date.
1346
+ * @returns A new Date object with the given month set.
1347
+ */
1348
+ export declare function setMonth(date: Date, month: number): Date;
1349
+
1350
+ export declare const TimeConstants: {
1351
+ MillisecondsInOneDay: number;
1352
+ MillisecondsIn1Sec: number;
1353
+ MillisecondsIn1Min: number;
1354
+ MillisecondsIn30Mins: number;
1355
+ MillisecondsIn1Hour: number;
1356
+ MinutesInOneDay: number;
1357
+ MinutesInOneHour: number;
1358
+ DaysInOneWeek: number;
1359
+ MonthInOneYear: number;
1360
+ HoursInOneDay: number;
1361
+ SecondsInOneMinute: number;
1362
+ OffsetTo24HourFormat: number;
1363
+ /**
1364
+ * Matches a time string. Groups:
1365
+ * 1. hours (with or without leading 0)
1366
+ * 2. minutes
1367
+ * 3. seconds (optional)
1368
+ * 4. meridiem (am/pm, case-insensitive, optional)
1369
+ */
1370
+ TimeFormatRegex: RegExp;
1371
+ };
1372
+
1373
+ /**
1374
+ * @internal
1375
+ *
1376
+ * Apply styling to the CalendarDayGrid slots based on the state
1377
+ */
1378
+ export declare const useCalendarDayGridStyles_unstable: (props: CalendarDayGridStyleProps) => CalendarDayGridStyles;
1379
+
1380
+ /**
1381
+ * @internal
1382
+ *
1383
+ * Apply styling to the CalendarDay slots based on the state
1384
+ */
1385
+ export declare const useCalendarDayStyles_unstable: (props: CalendarDayStyleProps) => CalendarDayStyles;
1386
+
1387
+ /**
1388
+ * @internal
1389
+ *
1390
+ * Apply styling to the CalendarMonth slots based on the state
1391
+ */
1392
+ export declare const useCalendarMonthStyles_unstable: (props: CalendarMonthStyleProps) => CalendarMonthStyles;
1393
+
1394
+ /**
1395
+ * @internal
1396
+ *
1397
+ * Apply styling to the CalendarPicker slots based on the state
1398
+ */
1399
+ export declare const useCalendarPickerStyles_unstable: (props: CalendarPickerStyleProps) => CalendarPickerStyles;
1400
+
1401
+ /**
1402
+ * @internal
1403
+ *
1404
+ * Apply styling to the Calendar slots based on the state
1405
+ */
1406
+ export declare const useCalendarStyles_unstable: (props: CalendarStyleProps) => CalendarStyles;
1407
+
1408
+ /**
1409
+ * @internal
1410
+ *
1411
+ * Apply styling to the CalendarYear slots based on the state
1412
+ */
1413
+ export declare const useCalendarYearStyles_unstable: (props: CalendarYearStyleProps) => CalendarYearStyles;
1414
+
1415
+ /**
1416
+ * @internal
1417
+ */
1418
+ export declare interface WeekCorners {
1419
+ [key: string]: string;
1420
+ }
1421
+
1422
+ export { }