react-day-picker 8.0.0-beta.32 → 8.0.0-beta.37

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 (417) hide show
  1. package/CHANGELOG.md +41 -3
  2. package/{build → dist}/DayPicker.d.ts +93 -88
  3. package/dist/components/Button/Button.d.ts +7 -0
  4. package/{build → dist}/components/Button/index.d.ts +1 -1
  5. package/dist/components/Caption/Caption.d.ts +20 -0
  6. package/{build → dist}/components/Caption/index.d.ts +1 -1
  7. package/{build → dist}/components/CaptionLabel/CaptionLabel.d.ts +10 -8
  8. package/{build → dist}/components/CaptionLabel/index.d.ts +1 -1
  9. package/{build → dist}/components/Day/Day.d.ts +13 -13
  10. package/dist/components/Day/index.d.ts +1 -0
  11. package/{build → dist}/components/DayContent/DayContent.d.ts +15 -15
  12. package/{build → dist}/components/DayContent/index.d.ts +1 -1
  13. package/{build → dist}/components/Dropdown/Dropdown.d.ts +16 -16
  14. package/{build → dist}/components/Dropdown/index.d.ts +1 -1
  15. package/{build → dist}/components/Footer/Footer.d.ts +3 -3
  16. package/{build → dist}/components/Footer/index.d.ts +1 -1
  17. package/{build → dist}/components/Head/Head.d.ts +5 -5
  18. package/{build → dist}/components/Head/index.d.ts +1 -1
  19. package/{build → dist}/components/Head/utils/getWeekdays.d.ts +6 -6
  20. package/{build → dist}/components/Head/utils/index.d.ts +1 -1
  21. package/dist/components/IconDropdown/IconDropdown.d.ts +6 -0
  22. package/{build → dist}/components/IconDropdown/index.d.ts +1 -1
  23. package/dist/components/IconLeft/IconLeft.d.ts +6 -0
  24. package/{build → dist}/components/IconLeft/index.d.ts +1 -1
  25. package/dist/components/IconRight/IconRight.d.ts +6 -0
  26. package/{build → dist}/components/IconRight/index.d.ts +1 -1
  27. package/dist/components/Month/Month.d.ts +8 -0
  28. package/dist/components/Month/index.d.ts +1 -0
  29. package/{build → dist}/components/MonthsDropdown/MonthsDropdown.d.ts +12 -12
  30. package/{build → dist}/components/MonthsDropdown/index.d.ts +1 -1
  31. package/{build → dist}/components/Navigation/Navigation.d.ts +20 -20
  32. package/{build → dist}/components/Navigation/index.d.ts +1 -1
  33. package/dist/components/Root/Root.d.ts +3 -0
  34. package/{build → dist}/components/Root/index.d.ts +1 -1
  35. package/{build → dist}/components/Row/Row.d.ts +16 -16
  36. package/{build → dist}/components/Row/index.d.ts +1 -1
  37. package/{build → dist}/components/Table/Table.d.ts +10 -12
  38. package/{build → dist}/components/Table/index.d.ts +1 -1
  39. package/{build → dist}/components/Table/utils/getOutsideEndDays.d.ts +3 -3
  40. package/{build → dist}/components/Table/utils/getOutsideStartDays.d.ts +4 -4
  41. package/{build → dist}/components/Table/utils/getWeeks.d.ts +17 -17
  42. package/{build → dist}/components/WeekNumber/WeekNumber.d.ts +15 -15
  43. package/{build → dist}/components/WeekNumber/index.d.ts +1 -1
  44. package/{build → dist}/components/YearsDropdown/YearsDropdown.d.ts +16 -16
  45. package/{build → dist}/components/YearsDropdown/index.d.ts +1 -1
  46. package/dist/contexts/DayPicker/DayPickerContext.d.ts +45 -0
  47. package/{build → dist}/contexts/DayPicker/defaultClassNames.d.ts +5 -5
  48. package/dist/contexts/DayPicker/defaultContextValue.d.ts +6 -0
  49. package/{build → dist}/contexts/DayPicker/formatters/formatCaption.d.ts +7 -7
  50. package/{build → dist}/contexts/DayPicker/formatters/formatDay.d.ts +7 -7
  51. package/{build → dist}/contexts/DayPicker/formatters/formatMonthCaption.d.ts +7 -7
  52. package/{build → dist}/contexts/DayPicker/formatters/formatWeekNumber.d.ts +4 -4
  53. package/{build → dist}/contexts/DayPicker/formatters/formatWeekdayName.d.ts +7 -7
  54. package/{build → dist}/contexts/DayPicker/formatters/formatYearCaption.d.ts +6 -6
  55. package/{build → dist}/contexts/DayPicker/formatters/index.d.ts +6 -6
  56. package/dist/contexts/DayPicker/index.d.ts +2 -0
  57. package/{build → dist}/contexts/DayPicker/labels/index.d.ts +7 -7
  58. package/dist/contexts/DayPicker/labels/labelDay.d.ts +5 -0
  59. package/{build → dist}/contexts/DayPicker/labels/labelMonthDropdown.d.ts +4 -4
  60. package/dist/contexts/DayPicker/labels/labelNext.d.ts +5 -0
  61. package/dist/contexts/DayPicker/labels/labelPrevious.d.ts +5 -0
  62. package/dist/contexts/DayPicker/labels/labelWeekNumber.d.ts +5 -0
  63. package/dist/contexts/DayPicker/labels/labelWeekday.d.ts +5 -0
  64. package/{build → dist}/contexts/DayPicker/labels/labelYearDropdown.d.ts +4 -4
  65. package/{build → dist}/contexts/DayPicker/useDayPicker.d.ts +8 -8
  66. package/dist/contexts/DayPicker/utils/index.d.ts +1 -0
  67. package/{build → dist}/contexts/DayPicker/utils/parseFromToProps.d.ts +6 -9
  68. package/dist/contexts/Focus/FocusContext.d.ts +36 -0
  69. package/dist/contexts/Focus/index.d.ts +2 -0
  70. package/{build/contexts/Focus/useFocus.d.ts → dist/contexts/Focus/useFocusContext.d.ts} +3 -3
  71. package/dist/contexts/Focus/utils/getInitialFocusTarget.d.ts +3 -0
  72. package/dist/contexts/Modifiers/ModifiersContext.d.ts +9 -0
  73. package/dist/contexts/Modifiers/index.d.ts +2 -0
  74. package/dist/contexts/Modifiers/useModifiers.d.ts +6 -0
  75. package/dist/contexts/Modifiers/utils/getActiveModifiers.d.ts +7 -0
  76. package/dist/contexts/Modifiers/utils/getCustomModifiers.d.ts +3 -0
  77. package/dist/contexts/Modifiers/utils/getInternalModifiers.d.ts +6 -0
  78. package/dist/contexts/Modifiers/utils/isDateInRange.d.ts +3 -0
  79. package/dist/contexts/Modifiers/utils/isMatch.d.ts +3 -0
  80. package/dist/contexts/Modifiers/utils/matcherToArray.d.ts +3 -0
  81. package/{build → dist}/contexts/Navigation/NavigationContext.d.ts +28 -20
  82. package/{build → dist}/contexts/Navigation/index.d.ts +2 -3
  83. package/{build → dist}/contexts/Navigation/useNavigation.d.ts +3 -3
  84. package/{build → dist}/contexts/Navigation/useNavigationState.d.ts +7 -7
  85. package/{build → dist}/contexts/Navigation/utils/getDisplayMonths.d.ts +8 -8
  86. package/{build → dist}/contexts/Navigation/utils/getInitialMonth.d.ts +3 -3
  87. package/{build → dist}/contexts/Navigation/utils/getNextMonth.d.ts +18 -18
  88. package/{build → dist}/contexts/Navigation/utils/getPreviousMonth.d.ts +19 -19
  89. package/dist/contexts/RootProvider.d.ts +8 -0
  90. package/dist/contexts/SelectMultiple/SelectMultipleContext.d.ts +35 -0
  91. package/{build → dist}/contexts/SelectMultiple/index.d.ts +2 -3
  92. package/{build → dist}/contexts/SelectMultiple/useSelectMultiple.d.ts +3 -3
  93. package/dist/contexts/SelectRange/SelectRangeContext.d.ts +36 -0
  94. package/{build → dist}/contexts/SelectRange/index.d.ts +2 -3
  95. package/{build → dist}/contexts/SelectRange/useSelectRange.d.ts +3 -3
  96. package/{build → dist}/contexts/SelectRange/utils/addToRange.d.ts +8 -8
  97. package/dist/contexts/SelectSingle/SelectSingleContext.d.ts +30 -0
  98. package/{build → dist}/contexts/SelectSingle/index.d.ts +2 -3
  99. package/{build → dist}/contexts/SelectSingle/useSelectSingle.d.ts +3 -3
  100. package/dist/hooks/useActiveModifiers/index.d.ts +1 -0
  101. package/dist/hooks/useActiveModifiers/useActiveModifiers.d.ts +9 -0
  102. package/{build → dist}/hooks/useControlledValue/index.d.ts +1 -1
  103. package/{build → dist}/hooks/useControlledValue/useControlledValue.d.ts +12 -12
  104. package/dist/hooks/useDayEventHandlers/index.d.ts +1 -0
  105. package/dist/hooks/useDayEventHandlers/useDayEventHandlers.d.ts +28 -0
  106. package/dist/hooks/useDayRender/index.d.ts +1 -0
  107. package/dist/hooks/useDayRender/useDayRender.d.ts +39 -0
  108. package/dist/hooks/useDayRender/utils/getDayClassNames.d.ts +4 -0
  109. package/dist/hooks/useDayRender/utils/getDayStyle.d.ts +5 -0
  110. package/{build → dist}/hooks/useInput/index.d.ts +1 -1
  111. package/dist/hooks/useInput/useInput.d.ts +28 -0
  112. package/{build → dist}/hooks/useInput/utils/isValidDate.d.ts +2 -2
  113. package/dist/hooks/useSelectedDays/index.d.ts +1 -0
  114. package/dist/hooks/useSelectedDays/useSelectedDays.d.ts +8 -0
  115. package/dist/index.d.ts +35 -0
  116. package/dist/index.esm.js +2212 -0
  117. package/dist/index.esm.js.map +1 -0
  118. package/dist/{main.js → index.js} +2115 -1778
  119. package/dist/index.js.map +1 -0
  120. package/dist/react-day-picker.min.js +1 -0
  121. package/{style.css → dist/style.css} +21 -10
  122. package/{style.css.d.ts → dist/style.css.d.ts} +2 -2
  123. package/{build/types/DayPickerProps.d.ts → dist/types/DayPicker.d.ts} +249 -209
  124. package/dist/types/DayPickerCustom.d.ts +9 -0
  125. package/{build/types/DayPickerMultipleProps.d.ts → dist/types/DayPickerMultiple.d.ts} +16 -16
  126. package/{build/types/DayPickerRangeProps.d.ts → dist/types/DayPickerRange.d.ts} +17 -17
  127. package/dist/types/DayPickerSingle.d.ts +14 -0
  128. package/dist/types/EventHandlers.d.ts +51 -0
  129. package/{build → dist}/types/Formatters.d.ts +24 -19
  130. package/dist/types/Labels.d.ts +28 -0
  131. package/dist/types/Matchers.d.ts +34 -0
  132. package/dist/types/Modifiers.d.ts +51 -0
  133. package/{build/types/StyledElement.d.ts → dist/types/Styles.d.ts} +82 -76
  134. package/package.json +39 -25
  135. package/build/DayPicker.js +0 -97
  136. package/build/DayPicker.js.map +0 -1
  137. package/build/_virtual/_tslib.js +0 -50
  138. package/build/_virtual/_tslib.js.map +0 -1
  139. package/build/components/Button/Button.d.ts +0 -7
  140. package/build/components/Button/Button.js +0 -23
  141. package/build/components/Button/Button.js.map +0 -1
  142. package/build/components/Caption/Caption.d.ts +0 -11
  143. package/build/components/Caption/Caption.js +0 -57
  144. package/build/components/Caption/Caption.js.map +0 -1
  145. package/build/components/CaptionLabel/CaptionLabel.js +0 -11
  146. package/build/components/CaptionLabel/CaptionLabel.js.map +0 -1
  147. package/build/components/Day/Day.js +0 -24
  148. package/build/components/Day/Day.js.map +0 -1
  149. package/build/components/Day/hooks/index.d.ts +0 -1
  150. package/build/components/Day/hooks/useDay.d.ts +0 -58
  151. package/build/components/Day/hooks/useDay.js +0 -176
  152. package/build/components/Day/hooks/useDay.js.map +0 -1
  153. package/build/components/Day/hooks/useDayFocus.d.ts +0 -8
  154. package/build/components/Day/hooks/useDayFocus.js +0 -56
  155. package/build/components/Day/hooks/useDayFocus.js.map +0 -1
  156. package/build/components/Day/index.d.ts +0 -2
  157. package/build/components/DayContent/DayContent.js +0 -15
  158. package/build/components/DayContent/DayContent.js.map +0 -1
  159. package/build/components/Dropdown/Dropdown.js +0 -20
  160. package/build/components/Dropdown/Dropdown.js.map +0 -1
  161. package/build/components/Footer/Footer.js +0 -15
  162. package/build/components/Footer/Footer.js.map +0 -1
  163. package/build/components/Head/Head.js +0 -20
  164. package/build/components/Head/Head.js.map +0 -1
  165. package/build/components/Head/utils/getWeekdays.js +0 -18
  166. package/build/components/Head/utils/getWeekdays.js.map +0 -1
  167. package/build/components/IconDropdown/IconDropdown.d.ts +0 -6
  168. package/build/components/IconDropdown/IconDropdown.js +0 -13
  169. package/build/components/IconDropdown/IconDropdown.js.map +0 -1
  170. package/build/components/IconLeft/IconLeft.d.ts +0 -6
  171. package/build/components/IconLeft/IconLeft.js +0 -13
  172. package/build/components/IconLeft/IconLeft.js.map +0 -1
  173. package/build/components/IconRight/IconRight.d.ts +0 -6
  174. package/build/components/IconRight/IconRight.js +0 -13
  175. package/build/components/IconRight/IconRight.js.map +0 -1
  176. package/build/components/MonthsDropdown/MonthsDropdown.js +0 -39
  177. package/build/components/MonthsDropdown/MonthsDropdown.js.map +0 -1
  178. package/build/components/Navigation/Navigation.js +0 -33
  179. package/build/components/Navigation/Navigation.js.map +0 -1
  180. package/build/components/Root/Root.d.ts +0 -6
  181. package/build/components/Root/Root.js +0 -50
  182. package/build/components/Root/Root.js.map +0 -1
  183. package/build/components/Row/Row.js +0 -22
  184. package/build/components/Row/Row.js.map +0 -1
  185. package/build/components/Table/Table.js +0 -18
  186. package/build/components/Table/Table.js.map +0 -1
  187. package/build/components/Table/utils/getOutsideEndDays.js +0 -15
  188. package/build/components/Table/utils/getOutsideEndDays.js.map +0 -1
  189. package/build/components/Table/utils/getOutsideStartDays.js +0 -15
  190. package/build/components/Table/utils/getOutsideStartDays.js.map +0 -1
  191. package/build/components/Table/utils/getWeeks.js +0 -50
  192. package/build/components/Table/utils/getWeeks.js.map +0 -1
  193. package/build/components/WeekNumber/WeekNumber.js +0 -24
  194. package/build/components/WeekNumber/WeekNumber.js.map +0 -1
  195. package/build/components/YearsDropdown/YearsDropdown.js +0 -28
  196. package/build/components/YearsDropdown/YearsDropdown.js.map +0 -1
  197. package/build/components/index.d.ts +0 -18
  198. package/build/contexts/ContextProvider.d.ts +0 -8
  199. package/build/contexts/ContextProvider.js +0 -27
  200. package/build/contexts/ContextProvider.js.map +0 -1
  201. package/build/contexts/DayPicker/DayPickerContext.d.ts +0 -30
  202. package/build/contexts/DayPicker/DayPickerContext.js +0 -14
  203. package/build/contexts/DayPicker/DayPickerContext.js.map +0 -1
  204. package/build/contexts/DayPicker/DayPickerProvider.d.ts +0 -12
  205. package/build/contexts/DayPicker/DayPickerProvider.js +0 -59
  206. package/build/contexts/DayPicker/DayPickerProvider.js.map +0 -1
  207. package/build/contexts/DayPicker/defaultClassNames.js +0 -44
  208. package/build/contexts/DayPicker/defaultClassNames.js.map +0 -1
  209. package/build/contexts/DayPicker/formatters/formatCaption.js +0 -11
  210. package/build/contexts/DayPicker/formatters/formatCaption.js.map +0 -1
  211. package/build/contexts/DayPicker/formatters/formatDay.js +0 -11
  212. package/build/contexts/DayPicker/formatters/formatDay.js.map +0 -1
  213. package/build/contexts/DayPicker/formatters/formatMonthCaption.js +0 -11
  214. package/build/contexts/DayPicker/formatters/formatMonthCaption.js.map +0 -1
  215. package/build/contexts/DayPicker/formatters/formatWeekNumber.js +0 -9
  216. package/build/contexts/DayPicker/formatters/formatWeekNumber.js.map +0 -1
  217. package/build/contexts/DayPicker/formatters/formatWeekdayName.js +0 -11
  218. package/build/contexts/DayPicker/formatters/formatWeekdayName.js.map +0 -1
  219. package/build/contexts/DayPicker/formatters/formatYearCaption.js +0 -11
  220. package/build/contexts/DayPicker/formatters/formatYearCaption.js.map +0 -1
  221. package/build/contexts/DayPicker/formatters/index.js +0 -7
  222. package/build/contexts/DayPicker/formatters/index.js.map +0 -1
  223. package/build/contexts/DayPicker/index.d.ts +0 -1
  224. package/build/contexts/DayPicker/labels/index.js +0 -8
  225. package/build/contexts/DayPicker/labels/index.js.map +0 -1
  226. package/build/contexts/DayPicker/labels/labelDay.d.ts +0 -5
  227. package/build/contexts/DayPicker/labels/labelDay.js +0 -11
  228. package/build/contexts/DayPicker/labels/labelDay.js.map +0 -1
  229. package/build/contexts/DayPicker/labels/labelMonthDropdown.js +0 -9
  230. package/build/contexts/DayPicker/labels/labelMonthDropdown.js.map +0 -1
  231. package/build/contexts/DayPicker/labels/labelNext.d.ts +0 -5
  232. package/build/contexts/DayPicker/labels/labelNext.js +0 -9
  233. package/build/contexts/DayPicker/labels/labelNext.js.map +0 -1
  234. package/build/contexts/DayPicker/labels/labelPrevious.d.ts +0 -5
  235. package/build/contexts/DayPicker/labels/labelPrevious.js +0 -9
  236. package/build/contexts/DayPicker/labels/labelPrevious.js.map +0 -1
  237. package/build/contexts/DayPicker/labels/labelWeekNumber.d.ts +0 -5
  238. package/build/contexts/DayPicker/labels/labelWeekNumber.js +0 -9
  239. package/build/contexts/DayPicker/labels/labelWeekNumber.js.map +0 -1
  240. package/build/contexts/DayPicker/labels/labelWeekday.d.ts +0 -5
  241. package/build/contexts/DayPicker/labels/labelWeekday.js +0 -11
  242. package/build/contexts/DayPicker/labels/labelWeekday.js.map +0 -1
  243. package/build/contexts/DayPicker/labels/labelYearDropdown.js +0 -9
  244. package/build/contexts/DayPicker/labels/labelYearDropdown.js.map +0 -1
  245. package/build/contexts/DayPicker/useDayPicker.js +0 -19
  246. package/build/contexts/DayPicker/useDayPicker.js.map +0 -1
  247. package/build/contexts/DayPicker/utils/index.d.ts +0 -2
  248. package/build/contexts/DayPicker/utils/parseFromToProps.js +0 -29
  249. package/build/contexts/DayPicker/utils/parseFromToProps.js.map +0 -1
  250. package/build/contexts/DayPicker/utils/parseModifierProps.d.ts +0 -9
  251. package/build/contexts/DayPicker/utils/parseModifierProps.js +0 -53
  252. package/build/contexts/DayPicker/utils/parseModifierProps.js.map +0 -1
  253. package/build/contexts/Focus/FocusContext.d.ts +0 -26
  254. package/build/contexts/Focus/FocusContext.js +0 -11
  255. package/build/contexts/Focus/FocusContext.js.map +0 -1
  256. package/build/contexts/Focus/FocusProvider.d.ts +0 -5
  257. package/build/contexts/Focus/FocusProvider.js +0 -66
  258. package/build/contexts/Focus/FocusProvider.js.map +0 -1
  259. package/build/contexts/Focus/index.d.ts +0 -3
  260. package/build/contexts/Focus/useFocus.js +0 -14
  261. package/build/contexts/Focus/useFocus.js.map +0 -1
  262. package/build/contexts/Navigation/NavigationContext.js +0 -11
  263. package/build/contexts/Navigation/NavigationContext.js.map +0 -1
  264. package/build/contexts/Navigation/NavigationProvider.d.ts +0 -5
  265. package/build/contexts/Navigation/NavigationProvider.js +0 -26
  266. package/build/contexts/Navigation/NavigationProvider.js.map +0 -1
  267. package/build/contexts/Navigation/useNavigation.js +0 -14
  268. package/build/contexts/Navigation/useNavigation.js.map +0 -1
  269. package/build/contexts/Navigation/useNavigationState.js +0 -19
  270. package/build/contexts/Navigation/useNavigationState.js.map +0 -1
  271. package/build/contexts/Navigation/utils/getDisplayMonths.js +0 -23
  272. package/build/contexts/Navigation/utils/getDisplayMonths.js.map +0 -1
  273. package/build/contexts/Navigation/utils/getInitialMonth.js +0 -21
  274. package/build/contexts/Navigation/utils/getInitialMonth.js.map +0 -1
  275. package/build/contexts/Navigation/utils/getNextMonth.js +0 -32
  276. package/build/contexts/Navigation/utils/getNextMonth.js.map +0 -1
  277. package/build/contexts/Navigation/utils/getPreviousMonth.js +0 -33
  278. package/build/contexts/Navigation/utils/getPreviousMonth.js.map +0 -1
  279. package/build/contexts/SelectMultiple/SelectMultipleContext.d.ts +0 -20
  280. package/build/contexts/SelectMultiple/SelectMultipleContext.js +0 -12
  281. package/build/contexts/SelectMultiple/SelectMultipleContext.js.map +0 -1
  282. package/build/contexts/SelectMultiple/SelectMultipleProvider.d.ts +0 -9
  283. package/build/contexts/SelectMultiple/SelectMultipleProvider.js +0 -23
  284. package/build/contexts/SelectMultiple/SelectMultipleProvider.js.map +0 -1
  285. package/build/contexts/SelectMultiple/SelectMultipleProviderInternal.d.ts +0 -8
  286. package/build/contexts/SelectMultiple/SelectMultipleProviderInternal.js +0 -61
  287. package/build/contexts/SelectMultiple/SelectMultipleProviderInternal.js.map +0 -1
  288. package/build/contexts/SelectMultiple/useSelectMultiple.js +0 -14
  289. package/build/contexts/SelectMultiple/useSelectMultiple.js.map +0 -1
  290. package/build/contexts/SelectRange/SelectRangeContext.d.ts +0 -21
  291. package/build/contexts/SelectRange/SelectRangeContext.js +0 -12
  292. package/build/contexts/SelectRange/SelectRangeContext.js.map +0 -1
  293. package/build/contexts/SelectRange/SelectRangeProvider.d.ts +0 -9
  294. package/build/contexts/SelectRange/SelectRangeProvider.js +0 -26
  295. package/build/contexts/SelectRange/SelectRangeProvider.js.map +0 -1
  296. package/build/contexts/SelectRange/SelectRangeProviderInternal.d.ts +0 -8
  297. package/build/contexts/SelectRange/SelectRangeProviderInternal.js +0 -99
  298. package/build/contexts/SelectRange/SelectRangeProviderInternal.js.map +0 -1
  299. package/build/contexts/SelectRange/useSelectRange.js +0 -14
  300. package/build/contexts/SelectRange/useSelectRange.js.map +0 -1
  301. package/build/contexts/SelectRange/utils/addToRange.js +0 -39
  302. package/build/contexts/SelectRange/utils/addToRange.js.map +0 -1
  303. package/build/contexts/SelectSingle/SelectSingleContext.d.ts +0 -21
  304. package/build/contexts/SelectSingle/SelectSingleContext.js +0 -12
  305. package/build/contexts/SelectSingle/SelectSingleContext.js.map +0 -1
  306. package/build/contexts/SelectSingle/SelectSingleProvider.d.ts +0 -9
  307. package/build/contexts/SelectSingle/SelectSingleProvider.js +0 -20
  308. package/build/contexts/SelectSingle/SelectSingleProvider.js.map +0 -1
  309. package/build/contexts/SelectSingle/SelectSingleProviderInternal.d.ts +0 -8
  310. package/build/contexts/SelectSingle/SelectSingleProviderInternal.js +0 -27
  311. package/build/contexts/SelectSingle/SelectSingleProviderInternal.js.map +0 -1
  312. package/build/contexts/SelectSingle/useSelectSingle.js +0 -14
  313. package/build/contexts/SelectSingle/useSelectSingle.js.map +0 -1
  314. package/build/contexts/index.d.ts +0 -7
  315. package/build/hooks/index.d.ts +0 -2
  316. package/build/hooks/useControlledValue/useControlledValue.js +0 -19
  317. package/build/hooks/useControlledValue/useControlledValue.js.map +0 -1
  318. package/build/hooks/useInput/useInput.d.ts +0 -49
  319. package/build/hooks/useInput/useInput.js +0 -103
  320. package/build/hooks/useInput/useInput.js.map +0 -1
  321. package/build/hooks/useInput/utils/isValidDate.js +0 -7
  322. package/build/hooks/useInput/utils/isValidDate.js.map +0 -1
  323. package/build/hooks/useModifiers/index.d.ts +0 -1
  324. package/build/hooks/useModifiers/types/UseModifiers.d.ts +0 -10
  325. package/build/hooks/useModifiers/types/index.d.ts +0 -1
  326. package/build/hooks/useModifiers/useModifiers.d.ts +0 -3
  327. package/build/hooks/useModifiers/useModifiers.js +0 -67
  328. package/build/hooks/useModifiers/useModifiers.js.map +0 -1
  329. package/build/hooks/useModifiers/utils/getModifierStatus.d.ts +0 -7
  330. package/build/hooks/useModifiers/utils/getModifierStatus.js +0 -22
  331. package/build/hooks/useModifiers/utils/getModifierStatus.js.map +0 -1
  332. package/build/hooks/useModifiers/utils/isDateInRange.d.ts +0 -3
  333. package/build/hooks/useModifiers/utils/isDateInRange.js +0 -25
  334. package/build/hooks/useModifiers/utils/isDateInRange.js.map +0 -1
  335. package/build/hooks/useModifiers/utils/isMatch.d.ts +0 -5
  336. package/build/hooks/useModifiers/utils/isMatch.js +0 -50
  337. package/build/hooks/useModifiers/utils/isMatch.js.map +0 -1
  338. package/build/main.d.ts +0 -5
  339. package/build/main.js +0 -51
  340. package/build/main.js.map +0 -1
  341. package/build/test/PageObjects.d.ts +0 -40
  342. package/build/test/customRender.d.ts +0 -4
  343. package/build/test/customRenderHook.d.ts +0 -3
  344. package/build/test/index.d.ts +0 -3
  345. package/build/test/setup.d.ts +0 -2
  346. package/build/types/CaptionLayout.d.ts +0 -7
  347. package/build/types/ClassNames.d.ts +0 -3
  348. package/build/types/Components.d.ts +0 -39
  349. package/build/types/CustomModifiers.d.ts +0 -4
  350. package/build/types/DateAfter.d.ts +0 -7
  351. package/build/types/DateBefore.d.ts +0 -7
  352. package/build/types/DateFormatter.d.ts +0 -6
  353. package/build/types/DateInterval.d.ts +0 -8
  354. package/build/types/DateRange.d.ts +0 -8
  355. package/build/types/DayClickEventHandler.d.ts +0 -6
  356. package/build/types/DayFocusEventHandler.d.ts +0 -6
  357. package/build/types/DayKeyboardEventHandler.d.ts +0 -6
  358. package/build/types/DayLabelFormatter.d.ts +0 -7
  359. package/build/types/DayMouseEventHandler.d.ts +0 -6
  360. package/build/types/DayOfWeekMatcher.d.ts +0 -7
  361. package/build/types/DayPickerCustomProps.d.ts +0 -11
  362. package/build/types/DayPickerSingleProps.d.ts +0 -14
  363. package/build/types/DayTouchEventHandler.d.ts +0 -6
  364. package/build/types/InternalModifier.d.ts +0 -2
  365. package/build/types/Labels.d.ts +0 -16
  366. package/build/types/Matcher.d.ts +0 -10
  367. package/build/types/Modifier.d.ts +0 -5
  368. package/build/types/ModifierClassNames.d.ts +0 -5
  369. package/build/types/ModifierStatus.d.ts +0 -5
  370. package/build/types/ModifierStyles.d.ts +0 -4
  371. package/build/types/Modifiers.d.ts +0 -5
  372. package/build/types/MonthChangeEventHandler.d.ts +0 -4
  373. package/build/types/NavButtonLabelFormatter.d.ts +0 -7
  374. package/build/types/SelectMultipleEventHandler.d.ts +0 -12
  375. package/build/types/SelectRangeEventHandler.d.ts +0 -10
  376. package/build/types/SelectSingleEventHandler.d.ts +0 -12
  377. package/build/types/StyledComponentProps.d.ts +0 -10
  378. package/build/types/Styles.d.ts +0 -4
  379. package/build/types/WeekNumberClickEventHandler.d.ts +0 -9
  380. package/build/types/WeekNumberFormatter.d.ts +0 -6
  381. package/build/types/WeekNumberLabelFormatter.d.ts +0 -5
  382. package/build/types/WeekdayLabelFormatter.d.ts +0 -4
  383. package/build/types/index.d.ts +0 -54
  384. package/build/types/isArrayOfDates.d.ts +0 -2
  385. package/build/types/isArrayOfDates.js +0 -9
  386. package/build/types/isArrayOfDates.js.map +0 -1
  387. package/build/types/isDateAfterType.d.ts +0 -3
  388. package/build/types/isDateAfterType.js +0 -7
  389. package/build/types/isDateAfterType.js.map +0 -1
  390. package/build/types/isDateBeforeType.d.ts +0 -3
  391. package/build/types/isDateBeforeType.js +0 -7
  392. package/build/types/isDateBeforeType.js.map +0 -1
  393. package/build/types/isDateInterval.d.ts +0 -3
  394. package/build/types/isDateInterval.js +0 -10
  395. package/build/types/isDateInterval.js.map +0 -1
  396. package/build/types/isDateRange.d.ts +0 -3
  397. package/build/types/isDateRange.js +0 -8
  398. package/build/types/isDateRange.js.map +0 -1
  399. package/build/types/isDateType.d.ts +0 -2
  400. package/build/types/isDateType.js +0 -9
  401. package/build/types/isDateType.js.map +0 -1
  402. package/build/types/isDayOfWeekType.d.ts +0 -3
  403. package/build/types/isDayOfWeekType.js +0 -7
  404. package/build/types/isDayOfWeekType.js.map +0 -1
  405. package/build/types/isDayPickerCustom.d.ts +0 -4
  406. package/build/types/isDayPickerCustom.js +0 -7
  407. package/build/types/isDayPickerCustom.js.map +0 -1
  408. package/build/types/isDayPickerMultiple.d.ts +0 -4
  409. package/build/types/isDayPickerMultiple.js +0 -7
  410. package/build/types/isDayPickerMultiple.js.map +0 -1
  411. package/build/types/isDayPickerRange.d.ts +0 -4
  412. package/build/types/isDayPickerRange.js +0 -7
  413. package/build/types/isDayPickerRange.js.map +0 -1
  414. package/build/types/isDayPickerSingle.d.ts +0 -4
  415. package/build/types/isDayPickerSingle.js +0 -7
  416. package/build/types/isDayPickerSingle.js.map +0 -1
  417. package/dist/main.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -16,11 +16,49 @@ with the previous versions.
16
16
 
17
17
  See the preview website at https://react-day-picker-next.netlify.app.
18
18
 
19
+ ---
20
+
21
+ ### v8.0.0-beta.37
22
+
23
+ - build: moved to rollupjs
24
+ - feat: new `useDayRender` hook
25
+ - chore: added `DaySelectionMode` enum
26
+ - refactor: `modifiersStatus` is now `ActiveModifiers`
27
+ - refactor: `modifierClassNames` props is now `modifiersClassNames`
28
+ - refactor: `modifierStyles` is now `modifiersStyles`
29
+
30
+ ### v8.0.0-beta.36
31
+
32
+ - feat: added caption ARIA labels. This change introduce `@reach/auto-id` dependency (#1358) (b8bbf419)
33
+ - feat: caption element has now an heading role (uses `h2`) (#1335) (bfb77869)
34
+ - feat: improved focus support (#1343) (9d09587d)
35
+ - feat: added `initialFocus` focus prop (#1351) (8f6d979d)
36
+ - feat: table uses `grid` role (#1337) (4ae64022)
37
+ - chore: added Month component (#1327) (fc9d9136)
38
+ - chore: rename styles and elements (#1336, #1329, #1325)
39
+ - fix: fixed type `useInput`'s `setSelected` (#1344) (c8f64fdf)
40
+ - fix: missing today modifier (#1319) (c4445a4c)
41
+
42
+ ### v8.0.0-beta.35
43
+
44
+ - feat: add extended keyboard navigation (#1300) (2a098719)
45
+ - chore: export missing Button component (5ba65841)
46
+ - chore: rename `handleDayClick` to `onDayClick` (3d1678b2)
47
+ - chore: limit documented exports (c2fbd576)
48
+ - build: fix circular dependency (5cd0c2c8)
49
+
50
+ ### v8.0.0-beta.33
51
+
52
+ - chore: unify context files (#1303) (d66b3981)
53
+ - chore: cleanup useInput types (7faec569)
54
+ - chore: improve internal modifiers typings (#1299) (9ddc64d9)
55
+ - chore: consolidate types (#1297) (e00c59e7)
56
+
19
57
  ### v8.0.0-beta.32
20
58
 
21
- - Fixed previous/next month navigation with RTL direction (68ad0adf7fb6935eb6d9809a6e72646e6194d51e)
22
- - Updated `useInput` API (#1293)
23
- - Removed `defaultSelected` prop (cd4f57906d98eb15b0b5a498112e74c2f6770c45)
59
+ - fix: previous/next month navigation with RTL direction (68ad0adf)
60
+ - chore: updated `useInput` API (#1293)
61
+ - chore: removed `defaultSelected` prop (cd4f5790)
24
62
 
25
63
  ### v8.0.0-beta.31
26
64
 
@@ -1,88 +1,93 @@
1
- /// <reference types="react" />
2
- import { DayPickerCustomProps, DayPickerMultipleProps, DayPickerProps, DayPickerRangeProps, DayPickerSingleProps } from './types';
3
- /**
4
- * DayPicker render a date picker component to let users pick dates from a
5
- * calendar. See http://react-day-picker.js.org for updated documentation and
6
- * examples.
7
- *
8
- * ### Customization
9
- *
10
- * DayPicker offers different customization props. For example,
11
- *
12
- * - show multiple months using `numberOfMonths`
13
- * - display a dropdown to navigate the months via `captionLayout`
14
- * - display the week numbers with `showWeekNumbers`
15
- * - disable or hide days with `disabled` or `hidden`
16
- *
17
- * ### Controlling the months
18
- *
19
- * Change the initially displayed month using the `defaultMonth` prop. The
20
- * displayed months are controlled by DayPicker and stored in its internal
21
- * state. To control the months yourself, use `month` instead of `defaultMonth`
22
- * and use the `onMonthChange` event to set it.
23
- *
24
- * To limit the months the user can navigate to, use
25
- * `fromDate`/`fromMonth`/`fromYear` or `toDate`/`toMonth`/`toYear`.
26
- *
27
- * ### Selection modes
28
- *
29
- * DayPicker supports different selection mode that can be toggled using the
30
- * `mode` prop:
31
- *
32
- * - `mode="single"`: only one day can be selected. Use `required` to make the
33
- * selection required. Use the `onSelect` event handler to get the selected
34
- * days.
35
- * - `mode="multiple"`: users can select one or more days. Limit the amount of
36
- * days that can be selected with the `min` or the `max` props.
37
- * - `mode="range"`: users can select a range of days. Limit the amount of days
38
- * in the range with the `min` or the `max` props.
39
- *
40
- * These selection modes should cover the most common use cases. In case you
41
- * need a more refined way of selecting days, use `mode="custom"`. Use the
42
- * `selected` props and add the day event handlers to add/remove days from the
43
- * selection.
44
- *
45
- * ### Modifiers
46
- *
47
- * A _modifier_ represents different styles or states for the days displayed in
48
- * the calendar (like "selected" or "disabled"). Define custom modifiers using
49
- * the `modifiers` prop.
50
- *
51
- * ### Formatters and custom component
52
- *
53
- * You can customize how the content is displayed in the date picker by using
54
- * either the formatters or replacing the internal components.
55
- *
56
- * For the most common cases you want to use the `formatters` prop to change how
57
- * the content is formatted in the calendar. Use the `components` prop to
58
- * replace the internal components, like the navigation icons.
59
- *
60
- * ### Styling
61
- *
62
- * DayPicker comes with a default, basic style in `react-day-picker/style`
63
- * use it as template for your own style.
64
- *
65
- * If you are using CSS modules, pass the imported styles object the
66
- * `classNames` props.
67
- *
68
- * You can also style the elements via inline-styles using the `styles` prop.
69
- *
70
- * ### Form fields
71
- *
72
- * If you need to bind the date picker to a form field, you can use the
73
- * `useInput` hooks for a basic behavior. See the `useInput` source as an
74
- * example to bind the date picker with form fields.
75
- *
76
- * ### Localization
77
- *
78
- * To localize DayPicker, import the locale from `date-fns` package and use the
79
- * `locale` prop.
80
- *
81
- * For example, to use Spanish locale:
82
- *
83
- * ```
84
- * import es from 'date-fns/locale/es';
85
- * <DayPicker locale={es} />
86
- * ```
87
- */
88
- export declare function DayPicker(props: DayPickerProps | DayPickerSingleProps | DayPickerMultipleProps | DayPickerRangeProps | DayPickerCustomProps): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { DayPickerProps } from './types/DayPicker';
3
+ import { DayPickerCustomProps } from './types/DayPickerCustom';
4
+ import { DayPickerMultipleProps } from './types/DayPickerMultiple';
5
+ import { DayPickerRangeProps } from './types/DayPickerRange';
6
+ import { DayPickerSingleProps } from './types/DayPickerSingle';
7
+ /**
8
+ * DayPicker render a date picker component to let users pick dates from a
9
+ * calendar. See http://react-day-picker.js.org for updated documentation and
10
+ * examples.
11
+ *
12
+ * ### Customization
13
+ *
14
+ * DayPicker offers different customization props. For example,
15
+ *
16
+ * - show multiple months using `numberOfMonths`
17
+ * - display a dropdown to navigate the months via `captionLayout`
18
+ * - display the week numbers with `showWeekNumbers`
19
+ * - disable or hide days with `disabled` or `hidden`
20
+ *
21
+ * ### Controlling the months
22
+ *
23
+ * Change the initially displayed month using the `defaultMonth` prop. The
24
+ * displayed months are controlled by DayPicker and stored in its internal
25
+ * state. To control the months yourself, use `month` instead of `defaultMonth`
26
+ * and use the `onMonthChange` event to set it.
27
+ *
28
+ * To limit the months the user can navigate to, use
29
+ * `fromDate`/`fromMonth`/`fromYear` or `toDate`/`toMonth`/`toYear`.
30
+ *
31
+ * ### Selection modes
32
+ *
33
+ * DayPicker supports different selection mode that can be toggled using the
34
+ * `mode` prop:
35
+ *
36
+ * - `mode="single"`: only one day can be selected. Use `required` to make the
37
+ * selection required. Use the `onSelect` event handler to get the selected
38
+ * days.
39
+ * - `mode="multiple"`: users can select one or more days. Limit the amount of
40
+ * days that can be selected with the `min` or the `max` props.
41
+ * - `mode="range"`: users can select a range of days. Limit the amount of days
42
+ * in the range with the `min` or the `max` props.
43
+ * - `mode="custom"`: implement your own selection mode with `onDayClick`.
44
+ *
45
+ * These selection modes should cover the most common use cases. In case you
46
+ * need a more refined way of selecting days, use `mode="custom"`. Use the
47
+ * `selected` props and add the day event handlers to add/remove days from the
48
+ * selection.
49
+ *
50
+ * ### Modifiers
51
+ *
52
+ * A _modifier_ represents different styles or states for the days displayed in
53
+ * the calendar (like "selected" or "disabled"). Define custom modifiers using
54
+ * the `modifiers` prop.
55
+ *
56
+ * ### Formatters and custom component
57
+ *
58
+ * You can customize how the content is displayed in the date picker by using
59
+ * either the formatters or replacing the internal components.
60
+ *
61
+ * For the most common cases you want to use the `formatters` prop to change how
62
+ * the content is formatted in the calendar. Use the `components` prop to
63
+ * replace the internal components, like the navigation icons.
64
+ *
65
+ * ### Styling
66
+ *
67
+ * DayPicker comes with a default, basic style in `react-day-picker/style` – use
68
+ * it as template for your own style.
69
+ *
70
+ * If you are using CSS modules, pass the imported styles object the
71
+ * `classNames` props.
72
+ *
73
+ * You can also style the elements via inline-styles using the `styles` prop.
74
+ *
75
+ * ### Form fields
76
+ *
77
+ * If you need to bind the date picker to a form field, you can use the
78
+ * `useInput` hooks for a basic behavior. See the `useInput` source as an
79
+ * example to bind the date picker with form fields.
80
+ *
81
+ * ### Localization
82
+ *
83
+ * To localize DayPicker, import the locale from `date-fns` package and use the
84
+ * `locale` prop.
85
+ *
86
+ * For example, to use Spanish locale:
87
+ *
88
+ * ```
89
+ * import es from 'date-fns/locale/es';
90
+ * <DayPicker locale={es} />
91
+ * ```
92
+ */
93
+ export declare function DayPicker(props: DayPickerProps | DayPickerSingleProps | DayPickerMultipleProps | DayPickerRangeProps | DayPickerCustomProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ /** The props for the [[Button]] component. */
3
+ export declare type ButtonProps = React.HTMLProps<HTMLButtonElement>;
4
+ /**
5
+ * Render a button HTML element applying the reset class name.
6
+ */
7
+ export declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "className" | "style" | "disabled" | "hidden" | "selected" | "dir" | "cite" | "data" | "form" | "label" | "slot" | "span" | "summary" | "title" | "pattern" | "children" | "value" | "id" | "aria-label" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- export * from './Button';
1
+ export * from './Button';
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ /** Represent the props of the [[Caption]] component. */
3
+ export interface CaptionProps {
4
+ /** The ID for the heading element. Must be the same as the labelled-by in Table. */
5
+ id?: string;
6
+ /** The month where the caption is displayed. */
7
+ displayMonth: Date;
8
+ }
9
+ /**
10
+ * The layout of the caption:
11
+ *
12
+ * - `dropdown`: display dropdowns for choosing the month and the year.
13
+ * - `buttons`: display previous month / next month buttons.
14
+ */
15
+ export declare type CaptionLayout = 'dropdown' | 'buttons';
16
+ /**
17
+ * Render the caption of a month, which includes title and navigation buttons.
18
+ * The caption has a different layout when setting the [[DayPickerProps.captionLayout]] prop.
19
+ */
20
+ export declare function Caption(props: CaptionProps): JSX.Element;
@@ -1 +1 @@
1
- export * from './Caption';
1
+ export * from './Caption';
@@ -1,8 +1,10 @@
1
- /// <reference types="react" />
2
- /** The props for the [[CaptionLabel]] component. */
3
- export interface CaptionLabelProps {
4
- /** The month where the caption is displayed. */
5
- displayMonth: Date;
6
- }
7
- /** Render the caption for the displayed month. This component is used when `captionLayout="buttons"`. */
8
- export declare function CaptionLabel(props: CaptionLabelProps): JSX.Element;
1
+ /// <reference types="react" />
2
+ /** The props for the [[CaptionLabel]] component. */
3
+ export interface CaptionLabelProps {
4
+ /** The ID for the heading element. Must be the same as the labelled-by in Table. */
5
+ id?: string;
6
+ /** The month where the caption is displayed. */
7
+ displayMonth: Date;
8
+ }
9
+ /** Render the caption for the displayed month. This component is used when `captionLayout="buttons"`. */
10
+ export declare function CaptionLabel(props: CaptionLabelProps): JSX.Element;
@@ -1 +1 @@
1
- export * from './CaptionLabel';
1
+ export * from './CaptionLabel';
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
2
- /** Represent the props used by the [[Day]] component. */
3
- export interface DayProps {
4
- /** The month where the date is displayed. */
5
- displayMonth: Date;
6
- /** The date to render. */
7
- date: Date;
8
- }
9
- /**
10
- * The content of a day cell – as a button or span element according to its
11
- * modifiers.
12
- */
13
- export declare function Day(props: DayProps): JSX.Element;
1
+ /// <reference types="react" />
2
+ /** Represent the props used by the [[Day]] component. */
3
+ export interface DayProps {
4
+ /** The month where the date is displayed. */
5
+ displayMonth: Date;
6
+ /** The date to render. */
7
+ date: Date;
8
+ }
9
+ /**
10
+ * The content of a day cell – as a button or span element according to its
11
+ * modifiers.
12
+ */
13
+ export declare function Day(props: DayProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Day';
@@ -1,15 +1,15 @@
1
- /// <reference types="react" />
2
- import { ModifierStatus } from '../../types';
3
- /** Represent the props for the [[DayContent]] component. */
4
- export interface DayContentProps {
5
- /** The date representing the day. */
6
- date: Date;
7
- /** The month where the day is displayed. */
8
- displayMonth: Date;
9
- /** The modifier status for the date. */
10
- modifiers: ModifierStatus;
11
- }
12
- /**
13
- * Render the content of the day cell.
14
- */
15
- export declare function DayContent(props: DayContentProps): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { ActiveModifiers } from '../../types/Modifiers';
3
+ /** Represent the props for the [[DayContent]] component. */
4
+ export interface DayContentProps {
5
+ /** The date representing the day. */
6
+ date: Date;
7
+ /** The month where the day is displayed. */
8
+ displayMonth: Date;
9
+ /** The active modifiers for the given date. */
10
+ activeModifiers: ActiveModifiers;
11
+ }
12
+ /**
13
+ * Render the content of the day cell.
14
+ */
15
+ export declare function DayContent(props: DayContentProps): JSX.Element;
@@ -1 +1 @@
1
- export * from './DayContent';
1
+ export * from './DayContent';
@@ -1,16 +1,16 @@
1
- import * as React from 'react';
2
- /** The props for the [[Dropdown]] component. */
3
- export interface DropdownProps {
4
- caption?: React.ReactNode;
5
- children?: React.SelectHTMLAttributes<HTMLSelectElement>['children'];
6
- className?: string;
7
- ['aria-label']?: string;
8
- style?: React.CSSProperties;
9
- value?: React.SelectHTMLAttributes<HTMLSelectElement>['value'];
10
- onChange?: React.ChangeEventHandler<HTMLSelectElement>;
11
- }
12
- /**
13
- * Render a styled select component – displaying a caption and a custom
14
- * drop-down icon.
15
- */
16
- export declare function Dropdown(props: DropdownProps): JSX.Element;
1
+ import React from 'react';
2
+ /** The props for the [[Dropdown]] component. */
3
+ export interface DropdownProps {
4
+ caption?: React.ReactNode;
5
+ children?: React.SelectHTMLAttributes<HTMLSelectElement>['children'];
6
+ className?: string;
7
+ ['aria-label']?: string;
8
+ style?: React.CSSProperties;
9
+ value?: string | number;
10
+ onChange?: React.ChangeEventHandler<HTMLSelectElement>;
11
+ }
12
+ /**
13
+ * Render a styled select component – displaying a caption and a custom
14
+ * drop-down icon.
15
+ */
16
+ export declare function Dropdown(props: DropdownProps): JSX.Element;
@@ -1 +1 @@
1
- export * from './Dropdown';
1
+ export * from './Dropdown';
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- /** Render the Footer component (empty as default).*/
3
- export declare function Footer(): JSX.Element;
1
+ /// <reference types="react" />
2
+ /** Render the Footer component (empty as default).*/
3
+ export declare function Footer(): JSX.Element;
@@ -1 +1 @@
1
- export * from './Footer';
1
+ export * from './Footer';
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- /**
3
- * Render the Head component - i.e. the table head with the weekday names.
4
- */
5
- export declare function Head(): JSX.Element;
1
+ /// <reference types="react" />
2
+ /**
3
+ * Render the Head component - i.e. the table head with the weekday names.
4
+ */
5
+ export declare function Head(): JSX.Element;
@@ -1 +1 @@
1
- export * from './Head';
1
+ export * from './Head';
@@ -1,6 +1,6 @@
1
- import { Locale } from 'date-fns';
2
- /**
3
- * Generate a series of 7 days, starting from the week, to use for formatting
4
- * the weekday names (Monday, Tuesday, etc.).
5
- */
6
- export declare function getWeekdays(locale?: Locale): Date[];
1
+ import { Locale } from 'date-fns';
2
+ /**
3
+ * Generate a series of 7 days, starting from the week, to use for formatting
4
+ * the weekday names (Monday, Tuesday, etc.).
5
+ */
6
+ export declare function getWeekdays(locale?: Locale): Date[];
@@ -1 +1 @@
1
- export * from './getWeekdays';
1
+ export * from './getWeekdays';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { StyledComponent } from '../../types/Styles';
3
+ /**
4
+ * Render the icon in the styled drop-down.
5
+ */
6
+ export declare function IconDropdown(props: StyledComponent): JSX.Element;
@@ -1 +1 @@
1
- export * from './IconDropdown';
1
+ export * from './IconDropdown';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { StyledComponent } from '../../types/Styles';
3
+ /**
4
+ * Render the "previous month" button in the navigation.
5
+ */
6
+ export declare function IconLeft(props: StyledComponent): JSX.Element;
@@ -1 +1 @@
1
- export * from './IconLeft';
1
+ export * from './IconLeft';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { StyledComponent } from '../../types/Styles';
3
+ /**
4
+ * Render the "next month" button in the navigation.
5
+ */
6
+ export declare function IconRight(props: StyledComponent): JSX.Element;
@@ -1 +1 @@
1
- export * from './IconRight';
1
+ export * from './IconRight';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ /** The props for the [[Month]] component. */
3
+ export interface MonthProps {
4
+ displayIndex: number;
5
+ displayMonth: Date;
6
+ }
7
+ /** Render a month. */
8
+ export declare function Month(props: MonthProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Month';
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- import { MonthChangeEventHandler } from '../../types';
3
- /** The props for the [[MonthsDropdown]] component. */
4
- export interface MonthsDropdownProps {
5
- /** The month where the dropdown is displayed. */
6
- displayMonth: Date;
7
- onChange: MonthChangeEventHandler;
8
- }
9
- /**
10
- * Render the dropdown to navigate between months.
11
- */
12
- export declare function MonthsDropdown(props: MonthsDropdownProps): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { MonthChangeEventHandler } from '../../types/EventHandlers';
3
+ /** The props for the [[MonthsDropdown]] component. */
4
+ export interface MonthsDropdownProps {
5
+ /** The month where the dropdown is displayed. */
6
+ displayMonth: Date;
7
+ onChange: MonthChangeEventHandler;
8
+ }
9
+ /**
10
+ * Render the dropdown to navigate between months.
11
+ */
12
+ export declare function MonthsDropdown(props: MonthsDropdownProps): JSX.Element;
@@ -1 +1 @@
1
- export * from './MonthsDropdown';
1
+ export * from './MonthsDropdown';
@@ -1,20 +1,20 @@
1
- import * as React from 'react';
2
- /** The props for the [[Navigation]] component. */
3
- export interface NavigationProps {
4
- /** The month where the caption is displayed. */
5
- displayMonth: Date;
6
- /** The previous month. */
7
- previousMonth?: Date;
8
- /** The next month. */
9
- nextMonth?: Date;
10
- /** Hide the previous button. */
11
- hidePrevious: boolean;
12
- /** Hide the next button. */
13
- hideNext: boolean;
14
- /** Event handler when the next button is clicked. */
15
- onNextClick: React.MouseEventHandler<HTMLButtonElement>;
16
- /** Event handler when the previous button is clicked. */
17
- onPreviousClick: React.MouseEventHandler<HTMLButtonElement>;
18
- }
19
- /** A component rendering the navigation buttons or the drop-downs. */
20
- export declare function Navigation(props: NavigationProps): JSX.Element;
1
+ import React from 'react';
2
+ /** The props for the [[Navigation]] component. */
3
+ export interface NavigationProps {
4
+ /** The month where the caption is displayed. */
5
+ displayMonth: Date;
6
+ /** The previous month. */
7
+ previousMonth?: Date;
8
+ /** The next month. */
9
+ nextMonth?: Date;
10
+ /** Hide the previous button. */
11
+ hidePrevious: boolean;
12
+ /** Hide the next button. */
13
+ hideNext: boolean;
14
+ /** Event handler when the next button is clicked. */
15
+ onNextClick: React.MouseEventHandler<HTMLButtonElement>;
16
+ /** Event handler when the previous button is clicked. */
17
+ onPreviousClick: React.MouseEventHandler<HTMLButtonElement>;
18
+ }
19
+ /** A component rendering the navigation buttons or the drop-downs. */
20
+ export declare function Navigation(props: NavigationProps): JSX.Element;
@@ -1 +1 @@
1
- export * from './Navigation';
1
+ export * from './Navigation';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ /** Render the container with the months according to the number of months to display. */
3
+ export declare function Root(): JSX.Element;
@@ -1 +1 @@
1
- export * from './Root';
1
+ export * from './Root';