@fluentui/react-datepicker-compat 0.0.0-nightly-20230421-0417.1 → 0.0.0

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 (264) hide show
  1. package/CHANGELOG.json +27 -55
  2. package/CHANGELOG.md +16 -18
  3. package/dist/index.d.ts +1160 -0
  4. package/lib/Calendar.js +2 -0
  5. package/lib/Calendar.js.map +1 -0
  6. package/lib/CalendarDay.js +2 -0
  7. package/lib/CalendarDay.js.map +1 -0
  8. package/lib/CalendarDayGrid.js +2 -0
  9. package/lib/CalendarDayGrid.js.map +1 -0
  10. package/lib/CalendarMonth.js +2 -0
  11. package/lib/CalendarMonth.js.map +1 -0
  12. package/lib/CalendarPicker.js +2 -0
  13. package/lib/CalendarPicker.js.map +1 -0
  14. package/lib/CalendarYear.js +2 -0
  15. package/lib/CalendarYear.js.map +1 -0
  16. package/lib/DatePicker.js +2 -0
  17. package/lib/DatePicker.js.map +1 -0
  18. package/lib/components/Calendar/Calendar.js +319 -0
  19. package/lib/components/Calendar/Calendar.js.map +1 -0
  20. package/lib/components/Calendar/Calendar.types.js +15 -0
  21. package/lib/components/Calendar/Calendar.types.js.map +1 -0
  22. package/lib/components/Calendar/defaults.js +3 -0
  23. package/lib/components/Calendar/defaults.js.map +1 -0
  24. package/lib/components/Calendar/index.js +5 -0
  25. package/lib/components/Calendar/index.js.map +1 -0
  26. package/lib/components/Calendar/useCalendarStyles.js +149 -0
  27. package/lib/components/Calendar/useCalendarStyles.js.map +1 -0
  28. package/lib/components/CalendarDay/CalendarDay.js +143 -0
  29. package/lib/components/CalendarDay/CalendarDay.js.map +1 -0
  30. package/lib/components/CalendarDay/CalendarDay.types.js +2 -0
  31. package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -0
  32. package/lib/components/CalendarDay/index.js +4 -0
  33. package/lib/components/CalendarDay/index.js.map +1 -0
  34. package/lib/components/CalendarDay/useCalendarDayStyles.js +180 -0
  35. package/lib/components/CalendarDay/useCalendarDayStyles.js.map +1 -0
  36. package/lib/components/CalendarDayGrid/CalendarDayGrid.js +183 -0
  37. package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
  38. package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +2 -0
  39. package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
  40. package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +193 -0
  41. package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
  42. package/lib/components/CalendarDayGrid/CalendarGridRow.js +40 -0
  43. package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
  44. package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +46 -0
  45. package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
  46. package/lib/components/CalendarDayGrid/index.js +5 -0
  47. package/lib/components/CalendarDayGrid/index.js.map +1 -0
  48. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.js +443 -0
  49. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.js.map +1 -0
  50. package/lib/components/CalendarDayGrid/useWeekCornerStyles.js +98 -0
  51. package/lib/components/CalendarDayGrid/useWeekCornerStyles.js.map +1 -0
  52. package/lib/components/CalendarDayGrid/useWeeks.js +47 -0
  53. package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -0
  54. package/lib/components/CalendarMonth/CalendarMonth.js +282 -0
  55. package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -0
  56. package/lib/components/CalendarMonth/CalendarMonth.types.js +2 -0
  57. package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
  58. package/lib/components/CalendarMonth/index.js +4 -0
  59. package/lib/components/CalendarMonth/index.js.map +1 -0
  60. package/lib/components/CalendarMonth/useCalendarMonthStyles.js +10 -0
  61. package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -0
  62. package/lib/components/CalendarPicker/CalendarPicker.types.js +2 -0
  63. package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
  64. package/lib/components/CalendarPicker/index.js +3 -0
  65. package/lib/components/CalendarPicker/index.js.map +1 -0
  66. package/lib/components/CalendarPicker/useCalendarPickerStyles.js +371 -0
  67. package/lib/components/CalendarPicker/useCalendarPickerStyles.js.map +1 -0
  68. package/lib/components/CalendarYear/CalendarYear.js +350 -0
  69. package/lib/components/CalendarYear/CalendarYear.js.map +1 -0
  70. package/lib/components/CalendarYear/CalendarYear.types.js +2 -0
  71. package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -0
  72. package/lib/components/CalendarYear/index.js +4 -0
  73. package/lib/components/CalendarYear/index.js.map +1 -0
  74. package/lib/components/CalendarYear/useCalendarYearStyles.js +10 -0
  75. package/lib/components/CalendarYear/useCalendarYearStyles.js.map +1 -0
  76. package/lib/components/DatePicker/DatePicker.js +11 -0
  77. package/lib/components/DatePicker/DatePicker.js.map +1 -0
  78. package/lib/components/DatePicker/DatePicker.types.js +2 -0
  79. package/lib/components/DatePicker/DatePicker.types.js.map +1 -0
  80. package/lib/components/DatePicker/defaults.js +15 -0
  81. package/lib/components/DatePicker/defaults.js.map +1 -0
  82. package/lib/components/DatePicker/index.js +7 -0
  83. package/lib/components/DatePicker/index.js.map +1 -0
  84. package/lib/components/DatePicker/renderDatePicker.js +18 -0
  85. package/lib/components/DatePicker/renderDatePicker.js.map +1 -0
  86. package/lib/components/DatePicker/useDatePicker.js +399 -0
  87. package/lib/components/DatePicker/useDatePicker.js.map +1 -0
  88. package/lib/components/DatePicker/useDatePickerStyles.js +38 -0
  89. package/lib/components/DatePicker/useDatePickerStyles.js.map +1 -0
  90. package/lib/index.js +4 -0
  91. package/lib/index.js.map +1 -0
  92. package/lib/utils/animations.js +98 -0
  93. package/lib/utils/animations.js.map +1 -0
  94. package/lib/utils/constants.js +64 -0
  95. package/lib/utils/constants.js.map +1 -0
  96. package/lib/utils/dateFormatting/dateFormatting.defaults.js +58 -0
  97. package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
  98. package/lib/utils/dateFormatting/dateFormatting.types.js +2 -0
  99. package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -0
  100. package/lib/utils/dateFormatting/index.js +3 -0
  101. package/lib/utils/dateFormatting/index.js.map +1 -0
  102. package/lib/utils/dateGrid/dateGrid.types.js +2 -0
  103. package/lib/utils/dateGrid/dateGrid.types.js.map +1 -0
  104. package/lib/utils/dateGrid/findAvailableDate.js +29 -0
  105. package/lib/utils/dateGrid/findAvailableDate.js.map +1 -0
  106. package/lib/utils/dateGrid/getBoundedDateRange.js +18 -0
  107. package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -0
  108. package/lib/utils/dateGrid/getDateRangeTypeToUse.js +18 -0
  109. package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
  110. package/lib/utils/dateGrid/getDayGrid.js +85 -0
  111. package/lib/utils/dateGrid/getDayGrid.js.map +1 -0
  112. package/lib/utils/dateGrid/index.js +6 -0
  113. package/lib/utils/dateGrid/index.js.map +1 -0
  114. package/lib/utils/dateGrid/isAfterMaxDate.js +13 -0
  115. package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -0
  116. package/lib/utils/dateGrid/isBeforeMinDate.js +13 -0
  117. package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -0
  118. package/lib/utils/dateGrid/isContiguous.js +19 -0
  119. package/lib/utils/dateGrid/isContiguous.js.map +1 -0
  120. package/lib/utils/dateGrid/isRestrictedDate.js +21 -0
  121. package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -0
  122. package/lib/utils/dateMath/dateMath.js +358 -0
  123. package/lib/utils/dateMath/dateMath.js.map +1 -0
  124. package/lib/utils/dateMath/index.js +2 -0
  125. package/lib/utils/dateMath/index.js.map +1 -0
  126. package/lib/utils/dom.js +9 -0
  127. package/lib/utils/dom.js.map +1 -0
  128. package/lib/utils/focus.js +28 -0
  129. package/lib/utils/focus.js.map +1 -0
  130. package/lib/utils/index.js +8 -0
  131. package/lib/utils/index.js.map +1 -0
  132. package/lib/utils/usePopupPositioning.js +25 -0
  133. package/lib/utils/usePopupPositioning.js.map +1 -0
  134. package/lib-commonjs/Calendar.js +9 -0
  135. package/lib-commonjs/Calendar.js.map +1 -0
  136. package/lib-commonjs/CalendarDay.js +9 -0
  137. package/lib-commonjs/CalendarDay.js.map +1 -0
  138. package/lib-commonjs/CalendarDayGrid.js +9 -0
  139. package/lib-commonjs/CalendarDayGrid.js.map +1 -0
  140. package/lib-commonjs/CalendarMonth.js +9 -0
  141. package/lib-commonjs/CalendarMonth.js.map +1 -0
  142. package/lib-commonjs/CalendarPicker.js +9 -0
  143. package/lib-commonjs/CalendarPicker.js.map +1 -0
  144. package/lib-commonjs/CalendarYear.js +9 -0
  145. package/lib-commonjs/CalendarYear.js.map +1 -0
  146. package/lib-commonjs/DatePicker.js +9 -0
  147. package/lib-commonjs/DatePicker.js.map +1 -0
  148. package/lib-commonjs/components/Calendar/Calendar.js +306 -0
  149. package/lib-commonjs/components/Calendar/Calendar.js.map +1 -0
  150. package/lib-commonjs/components/Calendar/Calendar.types.js +21 -0
  151. package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -0
  152. package/lib-commonjs/components/Calendar/defaults.js +12 -0
  153. package/lib-commonjs/components/Calendar/defaults.js.map +1 -0
  154. package/lib-commonjs/components/Calendar/index.js +16 -0
  155. package/lib-commonjs/components/Calendar/index.js.map +1 -0
  156. package/lib-commonjs/components/Calendar/useCalendarStyles.js +286 -0
  157. package/lib-commonjs/components/Calendar/useCalendarStyles.js.map +1 -0
  158. package/lib-commonjs/components/CalendarDay/CalendarDay.js +124 -0
  159. package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -0
  160. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +9 -0
  161. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -0
  162. package/lib-commonjs/components/CalendarDay/index.js +11 -0
  163. package/lib-commonjs/components/CalendarDay/index.js.map +1 -0
  164. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.js +356 -0
  165. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.js.map +1 -0
  166. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +181 -0
  167. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
  168. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +9 -0
  169. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
  170. package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +173 -0
  171. package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
  172. package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +35 -0
  173. package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
  174. package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +45 -0
  175. package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
  176. package/lib-commonjs/components/CalendarDayGrid/index.js +21 -0
  177. package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -0
  178. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.js +916 -0
  179. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.js.map +1 -0
  180. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.js +103 -0
  181. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.js.map +1 -0
  182. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +54 -0
  183. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -0
  184. package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +271 -0
  185. package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -0
  186. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +9 -0
  187. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
  188. package/lib-commonjs/components/CalendarMonth/index.js +11 -0
  189. package/lib-commonjs/components/CalendarMonth/index.js.map +1 -0
  190. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +14 -0
  191. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -0
  192. package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +7 -0
  193. package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
  194. package/lib-commonjs/components/CalendarPicker/index.js +10 -0
  195. package/lib-commonjs/components/CalendarPicker/index.js.map +1 -0
  196. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.js +746 -0
  197. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.js.map +1 -0
  198. package/lib-commonjs/components/CalendarYear/CalendarYear.js +307 -0
  199. package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -0
  200. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +9 -0
  201. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -0
  202. package/lib-commonjs/components/CalendarYear/index.js +11 -0
  203. package/lib-commonjs/components/CalendarYear/index.js.map +1 -0
  204. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.js +14 -0
  205. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.js.map +1 -0
  206. package/lib-commonjs/components/DatePicker/DatePicker.js +21 -0
  207. package/lib-commonjs/components/DatePicker/DatePicker.js.map +1 -0
  208. package/lib-commonjs/components/DatePicker/DatePicker.types.js +9 -0
  209. package/lib-commonjs/components/DatePicker/DatePicker.types.js.map +1 -0
  210. package/lib-commonjs/components/DatePicker/defaults.js +30 -0
  211. package/lib-commonjs/components/DatePicker/defaults.js.map +1 -0
  212. package/lib-commonjs/components/DatePicker/index.js +14 -0
  213. package/lib-commonjs/components/DatePicker/index.js.map +1 -0
  214. package/lib-commonjs/components/DatePicker/renderDatePicker.js +20 -0
  215. package/lib-commonjs/components/DatePicker/renderDatePicker.js.map +1 -0
  216. package/lib-commonjs/components/DatePicker/useDatePicker.js +444 -0
  217. package/lib-commonjs/components/DatePicker/useDatePicker.js.map +1 -0
  218. package/lib-commonjs/components/DatePicker/useDatePickerStyles.js +55 -0
  219. package/lib-commonjs/components/DatePicker/useDatePickerStyles.js.map +1 -0
  220. package/lib-commonjs/index.js +50 -0
  221. package/lib-commonjs/index.js.map +1 -0
  222. package/lib-commonjs/utils/animations.js +126 -0
  223. package/lib-commonjs/utils/animations.js.map +1 -0
  224. package/lib-commonjs/utils/constants.js +82 -0
  225. package/lib-commonjs/utils/constants.js.map +1 -0
  226. package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +102 -0
  227. package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
  228. package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js +7 -0
  229. package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -0
  230. package/lib-commonjs/utils/dateFormatting/index.js +10 -0
  231. package/lib-commonjs/utils/dateFormatting/index.js.map +1 -0
  232. package/lib-commonjs/utils/dateGrid/dateGrid.types.js +7 -0
  233. package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -0
  234. package/lib-commonjs/utils/dateGrid/findAvailableDate.js +29 -0
  235. package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -0
  236. package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +23 -0
  237. package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -0
  238. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +20 -0
  239. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
  240. package/lib-commonjs/utils/dateGrid/getDayGrid.js +76 -0
  241. package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -0
  242. package/lib-commonjs/utils/dateGrid/index.js +13 -0
  243. package/lib-commonjs/utils/dateGrid/index.js.map +1 -0
  244. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +15 -0
  245. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -0
  246. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +15 -0
  247. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -0
  248. package/lib-commonjs/utils/dateGrid/isContiguous.js +28 -0
  249. package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -0
  250. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +21 -0
  251. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -0
  252. package/lib-commonjs/utils/dateMath/dateMath.js +274 -0
  253. package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -0
  254. package/lib-commonjs/utils/dateMath/index.js +9 -0
  255. package/lib-commonjs/utils/dateMath/index.js.map +1 -0
  256. package/lib-commonjs/utils/dom.js +18 -0
  257. package/lib-commonjs/utils/dom.js.map +1 -0
  258. package/lib-commonjs/utils/focus.js +31 -0
  259. package/lib-commonjs/utils/focus.js.map +1 -0
  260. package/lib-commonjs/utils/index.js +15 -0
  261. package/lib-commonjs/utils/index.js.map +1 -0
  262. package/lib-commonjs/utils/usePopupPositioning.js +26 -0
  263. package/lib-commonjs/utils/usePopupPositioning.js.map +1 -0
  264. package/package.json +19 -14
@@ -0,0 +1,1160 @@
1
+ /// <reference types="react" />
2
+
3
+ import type { ComponentProps } from '@fluentui/react-utilities';
4
+ import type { ComponentState } from '@fluentui/react-utilities';
5
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
6
+ import { Input } from '@fluentui/react-input';
7
+ import type { PositioningProps } from '@fluentui/react-positioning';
8
+ import * as React_2 from 'react';
9
+ import type { Slot } from '@fluentui/react-utilities';
10
+ import type { SlotClassNames } from '@fluentui/react-utilities';
11
+
12
+ /**
13
+ * Returns a date offset from the given date by the specified number of days.
14
+ * @param date - The origin date
15
+ * @param days - The number of days to offset. 'days' can be negative.
16
+ * @returns A new Date object offset from the origin date by the given number of days
17
+ */
18
+ export declare function addDays(date: Date, days: number): Date;
19
+
20
+ /**
21
+ * Returns a date offset from the given date by the specified number of months.
22
+ * The method tries to preserve the day-of-month; however, if the new month does not have enough days
23
+ * to contain the original day-of-month, we'll use the last day of the new month.
24
+ * @param date - The origin date
25
+ * @param months - The number of months to offset. 'months' can be negative.
26
+ * @returns A new Date object offset from the origin date by the given number of months
27
+ */
28
+ export declare function addMonths(date: Date, months: number): Date;
29
+
30
+ /**
31
+ * Returns a date offset from the given date by the specified number of weeks.
32
+ * @param date - The origin date
33
+ * @param weeks - The number of weeks to offset. 'weeks' can be negative.
34
+ * @returns A new Date object offset from the origin date by the given number of weeks
35
+ */
36
+ export declare function addWeeks(date: Date, weeks: number): Date;
37
+
38
+ /**
39
+ * Returns a date offset from the given date by the specified number of years.
40
+ * The method tries to preserve the day-of-month; however, if the new month does not have enough days
41
+ * to contain the original day-of-month, we'll use the last day of the new month.
42
+ * @param date - The origin date
43
+ * @param years - The number of years to offset. 'years' can be negative.
44
+ * @returns A new Date object offset from the origin date by the given number of years
45
+ */
46
+ export declare function addYears(date: Date, years: number): Date;
47
+
48
+ export declare enum AnimationDirection {
49
+ /**
50
+ * Grid will transition out and in horizontally
51
+ */
52
+ Horizontal = 0,
53
+ /**
54
+ * Grid will transition out and in vertically
55
+ */
56
+ Vertical = 1
57
+ }
58
+
59
+ /**
60
+ * @internal
61
+ */
62
+ declare interface CalendarDayGridProps extends DayGridOptions {
63
+ /**
64
+ * Optional callback to access the ICalendarDayGrid interface. Use this instead of ref for accessing
65
+ * the public methods and properties of the component.
66
+ */
67
+ componentRef?: React_2.RefObject<ICalendarDayGrid>;
68
+ /**
69
+ * Additional CSS class(es) to apply to the CalendarDayGrid.
70
+ */
71
+ className?: string;
72
+ /**
73
+ * Localized strings to use in the CalendarDayGrid
74
+ */
75
+ strings: CalendarStrings;
76
+ /**
77
+ * The currently selected date
78
+ */
79
+ selectedDate: Date;
80
+ /**
81
+ * The currently navigated date
82
+ */
83
+ navigatedDate: Date;
84
+ /**
85
+ * Callback issued when a date is selected
86
+ * @param date - The date the user selected
87
+ * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
88
+ * for the component.
89
+ */
90
+ onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
91
+ /**
92
+ * Callback issued when a date in the calendar is navigated
93
+ * @param date - The date that is navigated to
94
+ * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
95
+ */
96
+ onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
97
+ /**
98
+ * Callback issued when calendar day is closed
99
+ */
100
+ onDismiss?: () => void;
101
+ /**
102
+ * The first day of the week for your locale.
103
+ * @default DayOfWeek.Sunday
104
+ */
105
+ firstDayOfWeek: DayOfWeek;
106
+ /**
107
+ * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
108
+ * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
109
+ * @default FirstWeekOfYear.FirstDay
110
+ */
111
+ firstWeekOfYear: FirstWeekOfYear;
112
+ /**
113
+ * The date range type indicating how many days should be selected as the user
114
+ * selects days
115
+ * @default DateRangeType.Day
116
+ */
117
+ dateRangeType: DateRangeType;
118
+ /**
119
+ * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day
120
+ * views.
121
+ * @default 1
122
+ */
123
+ daysToSelectInDayView?: number;
124
+ /**
125
+ * Value of today. If unspecified, current time in client machine will be used.
126
+ */
127
+ today?: Date;
128
+ /**
129
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
130
+ * @default false
131
+ */
132
+ showWeekNumbers?: boolean;
133
+ /**
134
+ * Apply additional formatting to dates, for example localized date formatting.
135
+ */
136
+ dateTimeFormatter: DateFormatting;
137
+ /**
138
+ * Ref callback for individual days. Allows for customization of the styling, properties, or listeners of the
139
+ * specific day.
140
+ */
141
+ customDayCellRef?: (element: HTMLElement, date: Date, classNames: CalendarDayGridStyles) => void;
142
+ /**
143
+ * How many weeks to show by default. If not provided, will show enough weeks to display the current
144
+ * month, between 4 and 6 depending
145
+ * @default undefined
146
+ */
147
+ weeksToShow?: number;
148
+ /**
149
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
150
+ */
151
+ minDate?: Date;
152
+ /**
153
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
154
+ */
155
+ maxDate?: Date;
156
+ /**
157
+ * If set the Calendar will not allow selection of dates in this array.
158
+ */
159
+ restrictedDates?: Date[];
160
+ /**
161
+ * The days that are selectable when `dateRangeType` is WorkWeek.
162
+ * If `dateRangeType` is not WorkWeek this property does nothing.
163
+ * @default [Monday,Tuesday,Wednesday,Thursday,Friday]
164
+ */
165
+ workWeekDays?: DayOfWeek[];
166
+ /**
167
+ * Whether the close button should be shown or not
168
+ * @default false
169
+ */
170
+ showCloseButton?: boolean;
171
+ /**
172
+ * Allows all dates and buttons to be focused, including disabled ones
173
+ * @default false
174
+ */
175
+ allFocusable?: boolean;
176
+ /**
177
+ * The ID of the control that labels this one
178
+ */
179
+ labelledBy?: string;
180
+ /**
181
+ * Whether to show days outside the selected month with lighter styles
182
+ * @default true
183
+ */
184
+ lightenDaysOutsideNavigatedMonth?: boolean;
185
+ /**
186
+ * The cardinal directions for animation to occur during transitions, either horizontal or veritcal
187
+ */
188
+ animationDirection?: AnimationDirection;
189
+ /**
190
+ * Optional callback function to mark specific days with a small symbol. Fires when the date range changes,
191
+ * gives the starting and ending displayed dates and expects the list of which days in between should be
192
+ * marked.
193
+ */
194
+ getMarkedDays?: (startingDate: Date, endingDate: Date) => Date[];
195
+ }
196
+
197
+ /**
198
+ * @internal
199
+ */
200
+ declare interface CalendarDayGridStyles {
201
+ /**
202
+ * The style for the root div
203
+ */
204
+ wrapper?: string;
205
+ /**
206
+ * The style for the table containing the grid
207
+ */
208
+ table?: string;
209
+ /**
210
+ * The style to apply to the grid cells for days
211
+ */
212
+ dayCell?: string;
213
+ /**
214
+ * The style to apply to grid cells for days in the selected range
215
+ */
216
+ daySelected?: string;
217
+ /**
218
+ * The style to apply to row around weeks
219
+ */
220
+ weekRow?: string;
221
+ /**
222
+ * The style to apply to the column headers above the weeks
223
+ */
224
+ weekDayLabelCell?: string;
225
+ /**
226
+ * The style to apply to grid cells for week numbers
227
+ */
228
+ weekNumberCell?: string;
229
+ /**
230
+ * The style to apply to individual days that are outside the min/max date range
231
+ */
232
+ dayOutsideBounds?: string;
233
+ /**
234
+ * The style to apply to individual days that are outside the current month
235
+ */
236
+ dayOutsideNavigatedMonth?: string;
237
+ /**
238
+ * The style to apply to the button element within the day cells
239
+ */
240
+ dayButton?: string;
241
+ /**
242
+ * The style to apply to the individual button element that matches the "today" parameter
243
+ */
244
+ dayIsToday?: string;
245
+ /**
246
+ * The style applied to the first placeholder week used during transitions
247
+ */
248
+ firstTransitionWeek?: string;
249
+ /**
250
+ * The style applied to the last placeholder week used during transitions
251
+ */
252
+ lastTransitionWeek?: string;
253
+ /**
254
+ * The style applied to the marker on days to mark as important
255
+ */
256
+ dayMarker?: string;
257
+ }
258
+
259
+ export declare interface CalendarDayProps extends CalendarDayGridProps {
260
+ /**
261
+ * Optional callback to access the ICalendarDay interface. Use this instead of ref for accessing
262
+ * the public methods and properties of the component.
263
+ */
264
+ componentRef?: React_2.RefObject<ICalendarDay>;
265
+ /**
266
+ * Additional CSS class(es) to apply to the CalendarDay.
267
+ */
268
+ className?: string;
269
+ /**
270
+ * Localized strings to use in the Calendar
271
+ */
272
+ strings: CalendarStrings;
273
+ /**
274
+ * The currently navigated date
275
+ */
276
+ navigatedDate: Date;
277
+ /**
278
+ * Callback issued when a date in the calendar is navigated
279
+ * @param date - The date that is navigated to
280
+ * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
281
+ */
282
+ onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
283
+ /**
284
+ * Callback issued when calendar day is closed
285
+ */
286
+ onDismiss?: () => void;
287
+ /**
288
+ * Callback function when the header is selected
289
+ */
290
+ onHeaderSelect?: () => void;
291
+ /**
292
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
293
+ * @default false
294
+ */
295
+ showWeekNumbers?: boolean;
296
+ /**
297
+ * Apply additional formatting to dates, for example localized date formatting.
298
+ */
299
+ dateTimeFormatter: DateFormatting;
300
+ /**
301
+ * Whether the calendar should show 6 weeks by default.
302
+ * @default false
303
+ */
304
+ showSixWeeksByDefault?: boolean;
305
+ /**
306
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
307
+ */
308
+ minDate?: Date;
309
+ /**
310
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
311
+ */
312
+ maxDate?: Date;
313
+ /**
314
+ * If set the Calendar will not allow selection of dates in this array.
315
+ */
316
+ restrictedDates?: Date[];
317
+ /**
318
+ * Whether the close button should be shown or not
319
+ * @default false
320
+ */
321
+ showCloseButton?: boolean;
322
+ /**
323
+ * Allows all dates and buttons to be focused, including disabled ones
324
+ * @default false
325
+ */
326
+ allFocusable?: boolean;
327
+ }
328
+
329
+ export declare interface CalendarMonthProps {
330
+ /**
331
+ * Optional callback to access the ICalendarMonth interface. Use this instead of ref for accessing
332
+ * the public methods and properties of the component.
333
+ */
334
+ componentRef?: React_2.RefObject<ICalendarMonth>;
335
+ /**
336
+ * Localized strings to use in the Calendar
337
+ */
338
+ strings: CalendarStrings;
339
+ /**
340
+ * The currently selected date
341
+ */
342
+ selectedDate: Date;
343
+ /**
344
+ * The currently navigated date
345
+ */
346
+ navigatedDate: Date;
347
+ /**
348
+ * Callback issued when a month is selected
349
+ * @param date - The date the user selected
350
+ * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
351
+ * for the component.
352
+ */
353
+ onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
354
+ /**
355
+ * Callback issued when the year is navigated
356
+ * @param date - The date that is navigated to
357
+ * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
358
+ */
359
+ onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
360
+ /**
361
+ * Value of today. If unspecified, current time in client machine will be used.
362
+ */
363
+ today?: Date;
364
+ /**
365
+ * Callback function when the header is selected
366
+ */
367
+ onHeaderSelect?: () => void;
368
+ /**
369
+ * Apply additional formatting to dates, for example localized date formatting.
370
+ */
371
+ dateTimeFormatter?: DateFormatting;
372
+ /**
373
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
374
+ */
375
+ minDate?: Date;
376
+ /**
377
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
378
+ */
379
+ maxDate?: Date;
380
+ /**
381
+ * Whether the month picker should highlight the current month
382
+ * @default false
383
+ */
384
+ highlightCurrentMonth?: boolean;
385
+ /**
386
+ * Whether the month picker should highlight the selected month
387
+ * @default false
388
+ */
389
+ highlightSelectedMonth?: boolean;
390
+ /**
391
+ * Allows all dates and buttons to be focused, including disabled ones
392
+ * @default false
393
+ */
394
+ allFocusable?: boolean;
395
+ /**
396
+ * Additional CSS class(es) to apply to the CalendarMonth.
397
+ */
398
+ className?: string;
399
+ /**
400
+ * Whether the year picker is hidden
401
+ * @default false
402
+ */
403
+ yearPickerHidden?: boolean;
404
+ /**
405
+ * The cardinal directions for animation to occur during transitions, either horizontal or veritcal
406
+ */
407
+ animationDirection?: AnimationDirection;
408
+ }
409
+
410
+ export declare interface CalendarProps extends React_2.RefAttributes<HTMLDivElement> {
411
+ /**
412
+ * Optional callback to access the ICalendar interface. Use this instead of ref for accessing
413
+ * the public methods and properties of the component.
414
+ */
415
+ componentRef?: React_2.RefObject<ICalendar>;
416
+ /**
417
+ * Customized props for the calendar day
418
+ */
419
+ calendarDayProps?: Partial<CalendarDayProps>;
420
+ /**
421
+ * Customized props for the calendar month
422
+ */
423
+ calendarMonthProps?: Partial<CalendarMonthProps>;
424
+ /**
425
+ * Optional class name to add to the root element.
426
+ */
427
+ className?: string;
428
+ /**
429
+ * Callback for when a date is selected
430
+ * @param date - The date the user selected
431
+ * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
432
+ * for the component.
433
+ */
434
+ onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
435
+ /**
436
+ * Callback for when calendar is closed
437
+ */
438
+ onDismiss?: () => void;
439
+ /**
440
+ * ID for the calendar
441
+ */
442
+ id?: string;
443
+ /**
444
+ * Default value of the Calendar, if any
445
+ */
446
+ value?: Date;
447
+ /**
448
+ * Value of today. If unspecified, current time in client machine will be used.
449
+ */
450
+ today?: Date;
451
+ /**
452
+ * The date range type indicating how many days should be selected as the user
453
+ * selects days
454
+ * @default DateRangeType.Day
455
+ */
456
+ dateRangeType?: DateRangeType;
457
+ /**
458
+ * The first day of the week for your locale.
459
+ * @default DayOfWeek.Sunday
460
+ */
461
+ firstDayOfWeek?: DayOfWeek;
462
+ /**
463
+ * Defines when the first week of the year should start.
464
+ * @default FirstWeekOfYear.FirstDay
465
+ */
466
+ firstWeekOfYear?: FirstWeekOfYear;
467
+ /**
468
+ * Whether the month picker is shown beside the day picker or hidden.
469
+ * @default true
470
+ */
471
+ isMonthPickerVisible?: boolean;
472
+ /**
473
+ * Whether the day picker is shown beside the month picker or hidden.
474
+ * @default true
475
+ */
476
+ isDayPickerVisible?: boolean;
477
+ /**
478
+ * Show month picker on top of date picker when visible.
479
+ * @default false
480
+ */
481
+ showMonthPickerAsOverlay?: boolean;
482
+ /**
483
+ * Whether the "Go to today" link should be shown or not
484
+ */
485
+ showGoToToday?: boolean;
486
+ /**
487
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
488
+ * @default false
489
+ */
490
+ showWeekNumbers?: boolean;
491
+ /**
492
+ * Localized strings to use in the Calendar
493
+ */
494
+ strings?: CalendarStrings;
495
+ /**
496
+ * Apply additional formatting to dates, for example localized date formatting.
497
+ */
498
+ dateTimeFormatter?: DateFormatting;
499
+ /**
500
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
501
+ */
502
+ minDate?: Date;
503
+ /**
504
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
505
+ */
506
+ maxDate?: Date;
507
+ /**
508
+ * If set the Calendar will not allow selection of dates in this array.
509
+ */
510
+ restrictedDates?: Date[];
511
+ /**
512
+ * Whether the calendar should show 6 weeks by default.
513
+ * @default false
514
+ */
515
+ showSixWeeksByDefault?: boolean;
516
+ /**
517
+ * The days that are selectable when `dateRangeType` is `WorkWeek`.
518
+ * If `dateRangeType` is not `WorkWeek` this property does nothing.
519
+ * @default [Monday,Tuesday,Wednesday,Thursday,Friday]
520
+ */
521
+ workWeekDays?: DayOfWeek[];
522
+ /**
523
+ * Whether the month picker should highlight the current month
524
+ * @default false
525
+ */
526
+ highlightCurrentMonth?: boolean;
527
+ /**
528
+ * Whether the month picker should highlight the selected month
529
+ * @default false
530
+ */
531
+ highlightSelectedMonth?: boolean;
532
+ /**
533
+ * Whether the close button should be shown or not
534
+ * @default false
535
+ */
536
+ showCloseButton?: boolean;
537
+ /**
538
+ * Allows all dates and buttons to be focused, including disabled ones
539
+ * @default false
540
+ */
541
+ allFocusable?: boolean;
542
+ }
543
+
544
+ export declare interface CalendarStrings extends DateGridStrings {
545
+ /**
546
+ * String to render for button to direct the user to today's date.
547
+ */
548
+ goToToday: string;
549
+ /**
550
+ * Aria-label for the "previous month" button in day picker.
551
+ */
552
+ prevMonthAriaLabel?: string;
553
+ /**
554
+ * Aria-label for the "next month" button in day picker.
555
+ */
556
+ nextMonthAriaLabel?: string;
557
+ /**
558
+ * Aria-label for the "previous year" button in month picker.
559
+ */
560
+ prevYearAriaLabel?: string;
561
+ /**
562
+ * Aria-label for the "next year" button in month picker.
563
+ */
564
+ nextYearAriaLabel?: string;
565
+ /**
566
+ * Aria-label for the "previous year range" button in year picker.
567
+ */
568
+ prevYearRangeAriaLabel?: string;
569
+ /**
570
+ * Aria-label for the "next year range" button in year picker.
571
+ */
572
+ nextYearRangeAriaLabel?: string;
573
+ /**
574
+ * Aria-label format string for the header button in the month picker. Should have 1 string param, e.g. "`{0}`,
575
+ * select to change the year". This aria-label will only be applied if the year picker is enabled; otherwise
576
+ * the label will default to the header string, e.g. "2019".
577
+ */
578
+ monthPickerHeaderAriaLabel?: string;
579
+ /**
580
+ * Aria-label format string for the header button in the year picker.
581
+ * Should have 1 string param, e.g. "`{0}`, select to change the month"
582
+ */
583
+ yearPickerHeaderAriaLabel?: string;
584
+ /**
585
+ * Aria-label for the "close" button.
586
+ */
587
+ closeButtonAriaLabel?: string;
588
+ /**
589
+ * Aria-label format string for the week number header. Should have 1 string param, e.g. "week number `{0}`"
590
+ */
591
+ weekNumberFormatString?: string;
592
+ /**
593
+ * Aria-label format string for the currently selected date. Should have 1 string param, e.g. "Selected date `{0}`"
594
+ */
595
+ selectedDateFormatString?: string;
596
+ /**
597
+ * Aria-label format string for today's date. Should have 1 string param, e.g. "Today's date `{0}`"
598
+ */
599
+ todayDateFormatString?: string;
600
+ /**
601
+ * Aria-label for when a date is marked
602
+ */
603
+ dayMarkedAriaLabel?: string;
604
+ }
605
+
606
+ /**
607
+ * Compare the date parts of two dates
608
+ * @param date1 - The first date to compare
609
+ * @param date2 - The second date to compare
610
+ * @returns A negative value if date1 is earlier than date2, 0 if the dates are equal, or a positive value
611
+ * if date1 is later than date2.
612
+ */
613
+ export declare function compareDatePart(date1: Date, date2: Date): Number;
614
+
615
+ /**
616
+ * Compares two dates, and returns true if the two dates (not accounting for time-of-day) are equal.
617
+ * @returns True if the two dates represent the same date (regardless of time-of-day), false otherwise.
618
+ */
619
+ export declare function compareDates(date1: Date, date2: Date): boolean;
620
+
621
+ export declare interface DateFormatting {
622
+ /**
623
+ * Get a localized string for a day.
624
+ */
625
+ formatDay: (date: Date) => string;
626
+ /**
627
+ * Get a localized string for a month.
628
+ */
629
+ formatMonth: (date: Date, strings: DateGridStrings) => string;
630
+ /**
631
+ * Get a localized string for a year.
632
+ */
633
+ formatYear: (date: Date) => string;
634
+ /**
635
+ * Get a localized string for a month, day, and year.
636
+ */
637
+ formatMonthDayYear: (date: Date, strings: DateGridStrings) => string;
638
+ /**
639
+ * Get a localized string for a month and year.
640
+ */
641
+ formatMonthYear: (date: Date, strings: DateGridStrings) => string;
642
+ }
643
+
644
+ export declare interface DateGridStrings {
645
+ /**
646
+ * An array of strings for the full names of months.
647
+ * The array is 0-based, so months[0] should be the full name of January.
648
+ */
649
+ months: string[];
650
+ /**
651
+ * An array of strings for the short names of months.
652
+ * The array is 0-based, so shortMonths[0] should be the short name of January.
653
+ */
654
+ shortMonths: string[];
655
+ /**
656
+ * An array of strings for the full names of days of the week.
657
+ * The array is 0-based, so days[0] should be the full name of Sunday.
658
+ */
659
+ days: string[];
660
+ /**
661
+ * An array of strings for the initials of the days of the week.
662
+ * The array is 0-based, so days[0] should be the initial of Sunday.
663
+ */
664
+ shortDays: string[];
665
+ }
666
+
667
+ export declare const DatePicker: ForwardRefComponent<DatePickerProps>;
668
+
669
+ export declare const datePickerClassNames: SlotClassNames<DatePickerSlots>;
670
+
671
+ /**
672
+ * Data passed to the `onValidationError` callback.
673
+ */
674
+ export declare type DatePickerErrorData = {
675
+ /** The error found when validating the input. */
676
+ error: 'invalid-input' | 'out-of-bounds' | 'required-input';
677
+ };
678
+
679
+ export declare type DatePickerProps = Omit<ComponentProps<Partial<DatePickerSlots>>, 'defaultValue' | 'value'> & {
680
+ /**
681
+ * Optional callback to access the IDatePicker interface. Use this instead of ref for accessing
682
+ * the public methods and properties of the component.
683
+ */
684
+ componentRef?: React_2.RefObject<IDatePicker>;
685
+ /**
686
+ * Callback issued when a date is selected
687
+ */
688
+ onSelectDate?: (date: Date | null | undefined) => void;
689
+ /**
690
+ * Whether the DatePicker is a required field or not. When using `<Field>`, this prop is automatically set.
691
+ * @default false
692
+ */
693
+ required?: boolean;
694
+ /**
695
+ * Disabled state of the DatePicker.
696
+ * @default false
697
+ */
698
+ disabled?: boolean;
699
+ /**
700
+ * Whether or not the Input of the DatePicker is underlined.
701
+ * @default false
702
+ */
703
+ underlined?: boolean;
704
+ /**
705
+ * Whether the month picker is shown beside the day picker or hidden.
706
+ * @default true
707
+ */
708
+ isMonthPickerVisible?: boolean;
709
+ /**
710
+ * Show month picker on top of date picker when visible.
711
+ * @default false
712
+ */
713
+ showMonthPickerAsOverlay?: boolean;
714
+ /**
715
+ * Whether the DatePicker allows input a date string directly or not
716
+ * @default false
717
+ */
718
+ allowTextInput?: boolean;
719
+ /**
720
+ * Whether the DatePicker should open automatically when the control is focused
721
+ * WARNING: setting this to false creates an accessibility violation and is not recommended
722
+ * @default true
723
+ */
724
+ disableAutoFocus?: boolean;
725
+ /**
726
+ * Whether the DatePicker should open when the input is clicked
727
+ * @default true
728
+ */
729
+ openOnClick?: boolean;
730
+ /**
731
+ * Whether the DatePicker should be open by default
732
+ *
733
+ * @default false
734
+ */
735
+ defaultOpen?: boolean;
736
+ /**
737
+ * Whether the DatePicker is open or not
738
+ *
739
+ * @default false
740
+ */
741
+ open?: boolean;
742
+ /**
743
+ * Callback to run when the DatePicker's open state changes
744
+ */
745
+ onOpenChange?: (open: boolean) => void;
746
+ /**
747
+ * Callback to run when the DatePicker encounters an error when validating the input
748
+ */
749
+ onValidationError?: (data: DatePickerErrorData) => void;
750
+ /**
751
+ * Whether the DatePicker should render the popup as inline or in a portal
752
+ *
753
+ * @default false
754
+ */
755
+ inlinePopup?: boolean;
756
+ /**
757
+ * Configure the positioning of the DatePicker dialog
758
+ *
759
+ * @default below
760
+ */
761
+ positioning?: PositioningProps;
762
+ /**
763
+ * Placeholder text for the DatePicker
764
+ */
765
+ placeholder?: string;
766
+ /**
767
+ * Value of today. If unspecified, current time in client machine will be used.
768
+ */
769
+ today?: Date;
770
+ /**
771
+ * Default value of the DatePicker, if any
772
+ */
773
+ value?: Date;
774
+ /**
775
+ * Optional method to format the chosen date to a string to display in the DatePicker
776
+ * @default date.toString()
777
+ */
778
+ formatDate?: (date?: Date) => string;
779
+ /**
780
+ * Optional method to parse the text input value to date, it is only useful when allowTextInput is set to true
781
+ * @default new Date(Date.parse(dateStr))
782
+ */
783
+ parseDateFromString?: (dateStr: string) => Date | null;
784
+ /**
785
+ * The first day of the week for your locale.
786
+ * @default DayOfWeek.Sunday
787
+ */
788
+ firstDayOfWeek?: DayOfWeek;
789
+ /**
790
+ * Localized strings to use in the Calendar
791
+ */
792
+ strings?: CalendarStrings;
793
+ /**
794
+ * Whether the month picker should highlight the current month
795
+ * @default false
796
+ */
797
+ highlightCurrentMonth?: boolean;
798
+ /**
799
+ * Whether the month picker should highlight the selected month
800
+ * @default false
801
+ */
802
+ highlightSelectedMonth?: boolean;
803
+ /**
804
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
805
+ * @default false
806
+ */
807
+ showWeekNumbers?: boolean;
808
+ /**
809
+ * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
810
+ * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
811
+ * @default FirstWeekOfYear.FirstFullWeek
812
+ */
813
+ firstWeekOfYear?: FirstWeekOfYear;
814
+ /**
815
+ * Whether the "Go to today" link should be shown or not
816
+ */
817
+ showGoToToday?: boolean;
818
+ /**
819
+ * Determines if the DatePicker has a border.
820
+ * @default false
821
+ */
822
+ borderless?: boolean;
823
+ /**
824
+ * Apply additional formatting to dates, for example localized date formatting.
825
+ */
826
+ dateTimeFormatter?: DateFormatting;
827
+ /**
828
+ * The minimum allowable date.
829
+ */
830
+ minDate?: Date;
831
+ /**
832
+ * The maximum allowable date.
833
+ */
834
+ maxDate?: Date;
835
+ /**
836
+ * The initially highlighted date.
837
+ */
838
+ initialPickerDate?: Date;
839
+ /**
840
+ * Allows all elements to be focused, including disabled ones
841
+ * @default false
842
+ */
843
+ allFocusable?: boolean;
844
+ /**
845
+ * Whether the CalendarDay close button should be shown or not.
846
+ */
847
+ showCloseButton?: boolean;
848
+ };
849
+
850
+ declare type DatePickerSlots = {
851
+ root: NonNullable<Slot<typeof Input>>;
852
+ calendar: NonNullable<Slot<Partial<CalendarProps>>>;
853
+ popupSurface?: Slot<'div'>;
854
+ };
855
+
856
+ /**
857
+ * State used in rendering DatePicker.
858
+ */
859
+ declare type DatePickerState = ComponentState<DatePickerSlots> & {
860
+ disabled: boolean;
861
+ inlinePopup: boolean;
862
+ };
863
+
864
+ /**
865
+ * The supported date range types
866
+ */
867
+ export declare enum DateRangeType {
868
+ Day = 0,
869
+ Week = 1,
870
+ Month = 2,
871
+ WorkWeek = 3
872
+ }
873
+
874
+ declare interface DayGridOptions extends RestrictedDatesOptions {
875
+ /**
876
+ * The first day of the week for your locale.
877
+ */
878
+ firstDayOfWeek: DayOfWeek;
879
+ /**
880
+ * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
881
+ * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
882
+ */
883
+ firstWeekOfYear: FirstWeekOfYear;
884
+ /**
885
+ * The date range type indicating how many days should be selected as the user
886
+ * selects days
887
+ */
888
+ dateRangeType: DateRangeType;
889
+ /**
890
+ * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day
891
+ * views.
892
+ */
893
+ daysToSelectInDayView?: number;
894
+ /**
895
+ * Value of today. If unspecified, current time in client machine will be used.
896
+ */
897
+ today?: Date;
898
+ /**
899
+ * Whether the calendar should show the week number (weeks 1 to 53) before each week row
900
+ */
901
+ showWeekNumbers?: boolean;
902
+ /**
903
+ * The days that are selectable when `dateRangeType` is WorkWeek.
904
+ * If `dateRangeType` is not WorkWeek this property does nothing.
905
+ */
906
+ workWeekDays?: DayOfWeek[];
907
+ /**
908
+ * Which days in the generated grid should be marked.
909
+ */
910
+ markedDays?: Date[];
911
+ /**
912
+ * The currently selected date
913
+ */
914
+ selectedDate: Date;
915
+ /**
916
+ * The currently navigated date
917
+ */
918
+ navigatedDate: Date;
919
+ /**
920
+ * How many weeks to show by default. If not provided, will show enough weeks to display the current
921
+ * month, between 4 and 6 depending
922
+ */
923
+ weeksToShow?: number;
924
+ }
925
+
926
+ /**
927
+ * The days of the week
928
+ */
929
+ export declare enum DayOfWeek {
930
+ Sunday = 0,
931
+ Monday = 1,
932
+ Tuesday = 2,
933
+ Wednesday = 3,
934
+ Thursday = 4,
935
+ Friday = 5,
936
+ Saturday = 6
937
+ }
938
+
939
+ export declare const DAYS_IN_WEEK = 7;
940
+
941
+ export declare const defaultDatePickerErrorStrings: Record<DatePickerErrorData['error'], string>;
942
+
943
+ export declare const defaultDatePickerStrings: CalendarStrings;
944
+
945
+ /**
946
+ * First week of the year settings types
947
+ */
948
+ export declare enum FirstWeekOfYear {
949
+ FirstDay = 0,
950
+ FirstFullWeek = 1,
951
+ FirstFourDayWeek = 2
952
+ }
953
+
954
+ /**
955
+ * Helper function to assist in date comparisons
956
+ */
957
+ export declare function getDatePartHashValue(date: Date): number;
958
+
959
+ /**
960
+ * Gets the date range array including the specified date. The date range array is calculated as the list
961
+ * of dates accounting for the specified first day of the week and date range type.
962
+ * @param date - The input date
963
+ * @param dateRangeType - The desired date range type, i.e., day, week, month, etc.
964
+ * @param firstDayOfWeek - The first day of the week.
965
+ * @param workWeekDays - The allowed days in work week. If not provided, assumes all days are allowed.
966
+ * @param daysToSelectInDayView - The number of days to include when using dateRangeType === DateRangeType.Day
967
+ * for multiday view. Defaults to 1
968
+ * @returns An array of dates representing the date range containing the specified date.
969
+ */
970
+ export declare function getDateRangeArray(date: Date, dateRangeType: DateRangeType, firstDayOfWeek: DayOfWeek, workWeekDays?: DayOfWeek[], daysToSelectInDayView?: number): Date[];
971
+
972
+ /**
973
+ * Gets the date for the last day of the week based on the given date assuming
974
+ * the specified first day of the week.
975
+ * @param date - The date to find the beginning of the week date for.
976
+ * @returns A new date object representing the first day of the week containing the input date.
977
+ */
978
+ export declare function getEndDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
979
+
980
+ /**
981
+ * Returns a date that is the last day of the month of the provided date.
982
+ * @param date - The origin date
983
+ * @returns A new Date object with the day set to the last day of the month.
984
+ */
985
+ export declare function getMonthEnd(date: Date): Date;
986
+
987
+ /**
988
+ * Returns a date that is the first day of the month of the provided date.
989
+ * @param date - The origin date
990
+ * @returns A new Date object with the day set to the first day of the month.
991
+ */
992
+ export declare function getMonthStart(date: Date): Date;
993
+
994
+ /**
995
+ * Gets the date for the first day of the week based on the given date assuming
996
+ * the specified first day of the week.
997
+ * @param date - The date to find the beginning of the week date for.
998
+ * @returns A new date object representing the first day of the week containing the input date.
999
+ */
1000
+ export declare function getStartDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
1001
+
1002
+ /**
1003
+ * Returns the week number for a date.
1004
+ * Week numbers are 1 - 52 (53) in a year
1005
+ * @param date - A date to find the week number for.
1006
+ * @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)
1007
+ * @param firstWeekOfYear - The first week of the year (1-2)
1008
+ * @returns The week's number in the year.
1009
+ */
1010
+ export declare function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear): number;
1011
+
1012
+ /**
1013
+ * Returns the week number for a date.
1014
+ * Week numbers are 1 - 52 (53) in a year
1015
+ * @param navigatedDate - A date to find the week number for.
1016
+ * @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)
1017
+ * @param firstWeekOfYear - The first week of the year (1-2)
1018
+ * @returns The weeks number array for the current month.
1019
+ */
1020
+ export declare function getWeekNumbersInMonth(weeksInMonth: number, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear, navigatedDate: Date): number[];
1021
+
1022
+ /**
1023
+ * Returns a date that is the last day of the year of the provided date.
1024
+ * @param date - The origin date
1025
+ * @returns A new Date object with the day set to the last day of the year.
1026
+ */
1027
+ export declare function getYearEnd(date: Date): Date;
1028
+
1029
+ /**
1030
+ * Returns a date that is the first day of the year of the provided date.
1031
+ * @param date - The origin date
1032
+ * @returns A new Date object with the day set to the first day of the year.
1033
+ */
1034
+ export declare function getYearStart(date: Date): Date;
1035
+
1036
+ export declare interface ICalendar {
1037
+ /** Sets focus to the selected date. */
1038
+ focus: () => void;
1039
+ }
1040
+
1041
+ export declare interface ICalendarDay {
1042
+ focus(): void;
1043
+ }
1044
+
1045
+ /**
1046
+ * @internal
1047
+ */
1048
+ declare interface ICalendarDayGrid {
1049
+ focus(): void;
1050
+ }
1051
+
1052
+ export declare interface ICalendarMonth {
1053
+ focus(): void;
1054
+ }
1055
+
1056
+ export declare interface IDatePicker {
1057
+ /** Sets focus to the input */
1058
+ focus(): void;
1059
+ /** Reset the state of the picker to the default */
1060
+ reset(): void;
1061
+ /** Open the datepicker popup */
1062
+ showDatePickerPopup(): void;
1063
+ }
1064
+
1065
+ /**
1066
+ * Checks whether the specified date is in the given date range.
1067
+ * @param date - The origin date
1068
+ * @param dateRange - An array of dates to do the lookup on
1069
+ * @returns True if the date matches one of the dates in the specified array, false otherwise.
1070
+ */
1071
+ export declare function isInDateRangeArray(date: Date, dateRange: Date[]): boolean;
1072
+
1073
+ /**
1074
+ * The months
1075
+ */
1076
+ export declare enum MonthOfYear {
1077
+ January = 0,
1078
+ February = 1,
1079
+ March = 2,
1080
+ April = 3,
1081
+ May = 4,
1082
+ June = 5,
1083
+ July = 6,
1084
+ August = 7,
1085
+ September = 8,
1086
+ October = 9,
1087
+ November = 10,
1088
+ December = 11
1089
+ }
1090
+
1091
+ /**
1092
+ * Render the final JSX of DatePicker
1093
+ */
1094
+ export declare const renderDatePicker_unstable: (state: DatePickerState) => JSX.Element;
1095
+
1096
+ declare interface RestrictedDatesOptions {
1097
+ /**
1098
+ * If set the Calendar will not allow navigation to or selection of a date earlier than this value.
1099
+ */
1100
+ minDate?: Date;
1101
+ /**
1102
+ * If set the Calendar will not allow navigation to or selection of a date later than this value.
1103
+ */
1104
+ maxDate?: Date;
1105
+ /**
1106
+ * If set the Calendar will not allow selection of dates in this array.
1107
+ */
1108
+ restrictedDates?: Date[];
1109
+ }
1110
+
1111
+ /**
1112
+ * Returns a date that is a copy of the given date, aside from the month changing to the given month.
1113
+ * The method tries to preserve the day-of-month; however, if the new month does not have enough days
1114
+ * to contain the original day-of-month, we'll use the last day of the new month.
1115
+ * @param date - The origin date
1116
+ * @param month - The 0-based index of the month to set on the date.
1117
+ * @returns A new Date object with the given month set.
1118
+ */
1119
+ export declare function setMonth(date: Date, month: number): Date;
1120
+
1121
+ export declare const TimeConstants: {
1122
+ MillisecondsInOneDay: number;
1123
+ MillisecondsIn1Sec: number;
1124
+ MillisecondsIn1Min: number;
1125
+ MillisecondsIn30Mins: number;
1126
+ MillisecondsIn1Hour: number;
1127
+ MinutesInOneDay: number;
1128
+ MinutesInOneHour: number;
1129
+ DaysInOneWeek: number;
1130
+ MonthInOneYear: number;
1131
+ HoursInOneDay: number;
1132
+ SecondsInOneMinute: number;
1133
+ OffsetTo24HourFormat: number;
1134
+ /**
1135
+ * Matches a time string. Groups:
1136
+ * 1. hours (with or without leading 0)
1137
+ * 2. minutes
1138
+ * 3. seconds (optional)
1139
+ * 4. meridiem (am/pm, case-insensitive, optional)
1140
+ */
1141
+ TimeFormatRegex: RegExp;
1142
+ };
1143
+
1144
+ /**
1145
+ * Create the state required to render DatePicker.
1146
+ *
1147
+ * The returned state can be modified with hooks such as useDatePickerStyles_unstable,
1148
+ * before being passed to renderDatePicker_unstable.
1149
+ *
1150
+ * @param props - props from this instance of DatePicker
1151
+ * @param ref - reference to root Input slot
1152
+ */
1153
+ export declare const useDatePicker_unstable: (props: DatePickerProps, ref: React_2.Ref<HTMLElement>) => DatePickerState;
1154
+
1155
+ /**
1156
+ * Apply styling to the DatePicker slots based on the state
1157
+ */
1158
+ export declare const useDatePickerStyles_unstable: (state: DatePickerState) => DatePickerState;
1159
+
1160
+ export { }