react-day-picker 8.0.0-beta.33 → 8.0.0-beta.38

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 (318) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/{build → dist}/DayPicker.d.ts +93 -89
  3. package/dist/components/Button/Button.d.ts +7 -0
  4. package/{build → dist}/components/Button/index.d.ts +1 -1
  5. package/{build → dist}/components/Caption/Caption.d.ts +20 -18
  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/{build → dist}/components/IconDropdown/IconDropdown.d.ts +6 -6
  22. package/{build → dist}/components/IconDropdown/index.d.ts +1 -1
  23. package/{build → dist}/components/IconLeft/IconLeft.d.ts +6 -6
  24. package/{build → dist}/components/IconLeft/index.d.ts +1 -1
  25. package/{build → dist}/components/IconRight/IconRight.d.ts +6 -6
  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 +10 -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 +14 -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/{build → dist}/contexts/DayPicker/labels/labelDay.d.ts +5 -5
  59. package/{build → dist}/contexts/DayPicker/labels/labelMonthDropdown.d.ts +4 -4
  60. package/{build → dist}/contexts/DayPicker/labels/labelNext.d.ts +5 -5
  61. package/{build → dist}/contexts/DayPicker/labels/labelPrevious.d.ts +5 -5
  62. package/{build → dist}/contexts/DayPicker/labels/labelWeekNumber.d.ts +5 -5
  63. package/{build → dist}/contexts/DayPicker/labels/labelWeekday.d.ts +5 -5
  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/{build/hooks/useModifiers → dist/contexts/Modifiers}/utils/isDateInRange.d.ts +3 -3
  79. package/{build/hooks/useModifiers → dist/contexts/Modifiers}/utils/isMatch.d.ts +3 -5
  80. package/dist/contexts/Modifiers/utils/matcherToArray.d.ts +3 -0
  81. package/{build → dist}/contexts/Navigation/NavigationContext.d.ts +28 -24
  82. package/{build → dist}/contexts/Navigation/index.d.ts +2 -2
  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/{build → dist}/contexts/RootProvider.d.ts +8 -8
  90. package/{build → dist}/contexts/SelectMultiple/SelectMultipleContext.d.ts +35 -32
  91. package/{build → dist}/contexts/SelectMultiple/index.d.ts +2 -2
  92. package/{build → dist}/contexts/SelectMultiple/useSelectMultiple.d.ts +3 -3
  93. package/{build → dist}/contexts/SelectRange/SelectRangeContext.d.ts +36 -32
  94. package/{build → dist}/contexts/SelectRange/index.d.ts +2 -2
  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/{build → dist}/contexts/SelectSingle/SelectSingleContext.d.ts +30 -35
  98. package/{build → dist}/contexts/SelectSingle/index.d.ts +2 -2
  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/{build → dist}/hooks/useInput/useInput.d.ts +28 -28
  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 +2213 -0
  117. package/dist/index.esm.js.map +1 -0
  118. package/dist/{main.js → index.js} +2116 -1744
  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 → dist}/types/DayPicker.d.ts +249 -228
  124. package/{build → dist}/types/DayPickerCustom.d.ts +9 -11
  125. package/{build → dist}/types/DayPickerMultiple.d.ts +16 -16
  126. package/{build → dist}/types/DayPickerRange.d.ts +17 -17
  127. package/{build → dist}/types/DayPickerSingle.d.ts +14 -14
  128. package/{build → dist}/types/EventHandlers.d.ts +51 -51
  129. package/{build → dist}/types/Formatters.d.ts +24 -24
  130. package/{build → dist}/types/Labels.d.ts +28 -28
  131. package/{build → dist}/types/Matchers.d.ts +34 -34
  132. package/dist/types/Modifiers.d.ts +51 -0
  133. package/{build → dist}/types/Styles.d.ts +82 -85
  134. package/package.json +42 -29
  135. package/build/DayPicker.js +0 -98
  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.js +0 -57
  143. package/build/components/Caption/Caption.js.map +0 -1
  144. package/build/components/CaptionLabel/CaptionLabel.js +0 -11
  145. package/build/components/CaptionLabel/CaptionLabel.js.map +0 -1
  146. package/build/components/Day/Day.js +0 -24
  147. package/build/components/Day/Day.js.map +0 -1
  148. package/build/components/Day/hooks/index.d.ts +0 -1
  149. package/build/components/Day/hooks/useDay.d.ts +0 -58
  150. package/build/components/Day/hooks/useDay.js +0 -176
  151. package/build/components/Day/hooks/useDay.js.map +0 -1
  152. package/build/components/Day/hooks/useDayFocus.d.ts +0 -8
  153. package/build/components/Day/hooks/useDayFocus.js +0 -56
  154. package/build/components/Day/hooks/useDayFocus.js.map +0 -1
  155. package/build/components/Day/index.d.ts +0 -2
  156. package/build/components/DayContent/DayContent.js +0 -15
  157. package/build/components/DayContent/DayContent.js.map +0 -1
  158. package/build/components/Dropdown/Dropdown.js +0 -20
  159. package/build/components/Dropdown/Dropdown.js.map +0 -1
  160. package/build/components/Footer/Footer.js +0 -15
  161. package/build/components/Footer/Footer.js.map +0 -1
  162. package/build/components/Head/Head.js +0 -20
  163. package/build/components/Head/Head.js.map +0 -1
  164. package/build/components/Head/utils/getWeekdays.js +0 -18
  165. package/build/components/Head/utils/getWeekdays.js.map +0 -1
  166. package/build/components/IconDropdown/IconDropdown.js +0 -13
  167. package/build/components/IconDropdown/IconDropdown.js.map +0 -1
  168. package/build/components/IconLeft/IconLeft.js +0 -13
  169. package/build/components/IconLeft/IconLeft.js.map +0 -1
  170. package/build/components/IconRight/IconRight.js +0 -13
  171. package/build/components/IconRight/IconRight.js.map +0 -1
  172. package/build/components/MonthsDropdown/MonthsDropdown.js +0 -39
  173. package/build/components/MonthsDropdown/MonthsDropdown.js.map +0 -1
  174. package/build/components/Navigation/Navigation.js +0 -33
  175. package/build/components/Navigation/Navigation.js.map +0 -1
  176. package/build/components/Root/Root.d.ts +0 -6
  177. package/build/components/Root/Root.js +0 -49
  178. package/build/components/Root/Root.js.map +0 -1
  179. package/build/components/Row/Row.js +0 -22
  180. package/build/components/Row/Row.js.map +0 -1
  181. package/build/components/Table/Table.js +0 -18
  182. package/build/components/Table/Table.js.map +0 -1
  183. package/build/components/Table/utils/getOutsideEndDays.js +0 -15
  184. package/build/components/Table/utils/getOutsideEndDays.js.map +0 -1
  185. package/build/components/Table/utils/getOutsideStartDays.js +0 -15
  186. package/build/components/Table/utils/getOutsideStartDays.js.map +0 -1
  187. package/build/components/Table/utils/getWeeks.js +0 -50
  188. package/build/components/Table/utils/getWeeks.js.map +0 -1
  189. package/build/components/WeekNumber/WeekNumber.js +0 -24
  190. package/build/components/WeekNumber/WeekNumber.js.map +0 -1
  191. package/build/components/YearsDropdown/YearsDropdown.js +0 -28
  192. package/build/components/YearsDropdown/YearsDropdown.js.map +0 -1
  193. package/build/components/index.d.ts +0 -18
  194. package/build/contexts/DayPicker/DayPickerContext.d.ts +0 -31
  195. package/build/contexts/DayPicker/DayPickerContext.js +0 -14
  196. package/build/contexts/DayPicker/DayPickerContext.js.map +0 -1
  197. package/build/contexts/DayPicker/DayPickerProvider.d.ts +0 -12
  198. package/build/contexts/DayPicker/DayPickerProvider.js +0 -59
  199. package/build/contexts/DayPicker/DayPickerProvider.js.map +0 -1
  200. package/build/contexts/DayPicker/defaultClassNames.js +0 -42
  201. package/build/contexts/DayPicker/defaultClassNames.js.map +0 -1
  202. package/build/contexts/DayPicker/formatters/formatCaption.js +0 -11
  203. package/build/contexts/DayPicker/formatters/formatCaption.js.map +0 -1
  204. package/build/contexts/DayPicker/formatters/formatDay.js +0 -11
  205. package/build/contexts/DayPicker/formatters/formatDay.js.map +0 -1
  206. package/build/contexts/DayPicker/formatters/formatMonthCaption.js +0 -11
  207. package/build/contexts/DayPicker/formatters/formatMonthCaption.js.map +0 -1
  208. package/build/contexts/DayPicker/formatters/formatWeekNumber.js +0 -9
  209. package/build/contexts/DayPicker/formatters/formatWeekNumber.js.map +0 -1
  210. package/build/contexts/DayPicker/formatters/formatWeekdayName.js +0 -11
  211. package/build/contexts/DayPicker/formatters/formatWeekdayName.js.map +0 -1
  212. package/build/contexts/DayPicker/formatters/formatYearCaption.js +0 -11
  213. package/build/contexts/DayPicker/formatters/formatYearCaption.js.map +0 -1
  214. package/build/contexts/DayPicker/formatters/index.js +0 -7
  215. package/build/contexts/DayPicker/formatters/index.js.map +0 -1
  216. package/build/contexts/DayPicker/index.d.ts +0 -1
  217. package/build/contexts/DayPicker/labels/index.js +0 -8
  218. package/build/contexts/DayPicker/labels/index.js.map +0 -1
  219. package/build/contexts/DayPicker/labels/labelDay.js +0 -11
  220. package/build/contexts/DayPicker/labels/labelDay.js.map +0 -1
  221. package/build/contexts/DayPicker/labels/labelMonthDropdown.js +0 -9
  222. package/build/contexts/DayPicker/labels/labelMonthDropdown.js.map +0 -1
  223. package/build/contexts/DayPicker/labels/labelNext.js +0 -9
  224. package/build/contexts/DayPicker/labels/labelNext.js.map +0 -1
  225. package/build/contexts/DayPicker/labels/labelPrevious.js +0 -9
  226. package/build/contexts/DayPicker/labels/labelPrevious.js.map +0 -1
  227. package/build/contexts/DayPicker/labels/labelWeekNumber.js +0 -9
  228. package/build/contexts/DayPicker/labels/labelWeekNumber.js.map +0 -1
  229. package/build/contexts/DayPicker/labels/labelWeekday.js +0 -11
  230. package/build/contexts/DayPicker/labels/labelWeekday.js.map +0 -1
  231. package/build/contexts/DayPicker/labels/labelYearDropdown.js +0 -9
  232. package/build/contexts/DayPicker/labels/labelYearDropdown.js.map +0 -1
  233. package/build/contexts/DayPicker/useDayPicker.js +0 -19
  234. package/build/contexts/DayPicker/useDayPicker.js.map +0 -1
  235. package/build/contexts/DayPicker/utils/index.d.ts +0 -2
  236. package/build/contexts/DayPicker/utils/parseFromToProps.js +0 -29
  237. package/build/contexts/DayPicker/utils/parseFromToProps.js.map +0 -1
  238. package/build/contexts/DayPicker/utils/parseModifierProps.d.ts +0 -9
  239. package/build/contexts/DayPicker/utils/parseModifierProps.js +0 -54
  240. package/build/contexts/DayPicker/utils/parseModifierProps.js.map +0 -1
  241. package/build/contexts/Focus/FocusContext.d.ts +0 -30
  242. package/build/contexts/Focus/FocusContext.js +0 -71
  243. package/build/contexts/Focus/FocusContext.js.map +0 -1
  244. package/build/contexts/Focus/index.d.ts +0 -2
  245. package/build/contexts/Focus/useFocus.js +0 -14
  246. package/build/contexts/Focus/useFocus.js.map +0 -1
  247. package/build/contexts/Navigation/NavigationContext.js +0 -31
  248. package/build/contexts/Navigation/NavigationContext.js.map +0 -1
  249. package/build/contexts/Navigation/useNavigation.js +0 -14
  250. package/build/contexts/Navigation/useNavigation.js.map +0 -1
  251. package/build/contexts/Navigation/useNavigationState.js +0 -19
  252. package/build/contexts/Navigation/useNavigationState.js.map +0 -1
  253. package/build/contexts/Navigation/utils/getDisplayMonths.js +0 -23
  254. package/build/contexts/Navigation/utils/getDisplayMonths.js.map +0 -1
  255. package/build/contexts/Navigation/utils/getInitialMonth.js +0 -21
  256. package/build/contexts/Navigation/utils/getInitialMonth.js.map +0 -1
  257. package/build/contexts/Navigation/utils/getNextMonth.js +0 -32
  258. package/build/contexts/Navigation/utils/getNextMonth.js.map +0 -1
  259. package/build/contexts/Navigation/utils/getPreviousMonth.js +0 -33
  260. package/build/contexts/Navigation/utils/getPreviousMonth.js.map +0 -1
  261. package/build/contexts/RootProvider.js +0 -22
  262. package/build/contexts/RootProvider.js.map +0 -1
  263. package/build/contexts/SelectMultiple/SelectMultipleContext.js +0 -82
  264. package/build/contexts/SelectMultiple/SelectMultipleContext.js.map +0 -1
  265. package/build/contexts/SelectMultiple/useSelectMultiple.js +0 -14
  266. package/build/contexts/SelectMultiple/useSelectMultiple.js.map +0 -1
  267. package/build/contexts/SelectRange/SelectRangeContext.js +0 -123
  268. package/build/contexts/SelectRange/SelectRangeContext.js.map +0 -1
  269. package/build/contexts/SelectRange/useSelectRange.js +0 -14
  270. package/build/contexts/SelectRange/useSelectRange.js.map +0 -1
  271. package/build/contexts/SelectRange/utils/addToRange.js +0 -39
  272. package/build/contexts/SelectRange/utils/addToRange.js.map +0 -1
  273. package/build/contexts/SelectSingle/SelectSingleContext.js +0 -45
  274. package/build/contexts/SelectSingle/SelectSingleContext.js.map +0 -1
  275. package/build/contexts/SelectSingle/useSelectSingle.js +0 -14
  276. package/build/contexts/SelectSingle/useSelectSingle.js.map +0 -1
  277. package/build/contexts/index.d.ts +0 -7
  278. package/build/hooks/index.d.ts +0 -2
  279. package/build/hooks/useControlledValue/useControlledValue.js +0 -19
  280. package/build/hooks/useControlledValue/useControlledValue.js.map +0 -1
  281. package/build/hooks/useInput/useInput.js +0 -101
  282. package/build/hooks/useInput/useInput.js.map +0 -1
  283. package/build/hooks/useInput/utils/isValidDate.js +0 -7
  284. package/build/hooks/useInput/utils/isValidDate.js.map +0 -1
  285. package/build/hooks/useModifiers/index.d.ts +0 -1
  286. package/build/hooks/useModifiers/types/UseModifiers.d.ts +0 -10
  287. package/build/hooks/useModifiers/types/index.d.ts +0 -1
  288. package/build/hooks/useModifiers/useModifiers.d.ts +0 -3
  289. package/build/hooks/useModifiers/useModifiers.js +0 -65
  290. package/build/hooks/useModifiers/useModifiers.js.map +0 -1
  291. package/build/hooks/useModifiers/utils/getModifierStatus.d.ts +0 -7
  292. package/build/hooks/useModifiers/utils/getModifierStatus.js +0 -22
  293. package/build/hooks/useModifiers/utils/getModifierStatus.js.map +0 -1
  294. package/build/hooks/useModifiers/utils/isDateInRange.js +0 -25
  295. package/build/hooks/useModifiers/utils/isDateInRange.js.map +0 -1
  296. package/build/hooks/useModifiers/utils/isMatch.js +0 -52
  297. package/build/hooks/useModifiers/utils/isMatch.js.map +0 -1
  298. package/build/main.d.ts +0 -5
  299. package/build/main.js +0 -40
  300. package/build/main.js.map +0 -1
  301. package/build/test/PageObjects.d.ts +0 -40
  302. package/build/test/customRender.d.ts +0 -4
  303. package/build/test/customRenderHook.d.ts +0 -3
  304. package/build/test/index.d.ts +0 -3
  305. package/build/test/setup.d.ts +0 -2
  306. package/build/types/DayPickerCustom.js +0 -7
  307. package/build/types/DayPickerCustom.js.map +0 -1
  308. package/build/types/DayPickerMultiple.js +0 -7
  309. package/build/types/DayPickerMultiple.js.map +0 -1
  310. package/build/types/DayPickerRange.js +0 -7
  311. package/build/types/DayPickerRange.js.map +0 -1
  312. package/build/types/DayPickerSingle.js +0 -7
  313. package/build/types/DayPickerSingle.js.map +0 -1
  314. package/build/types/Matchers.js +0 -27
  315. package/build/types/Matchers.js.map +0 -1
  316. package/build/types/Modifiers.d.ts +0 -16
  317. package/build/types/index.d.ts +0 -11
  318. package/dist/main.js.map +0 -1
@@ -1,228 +1,249 @@
1
- /// <reference types="react" />
2
- import { Locale } from 'date-fns';
3
- import { CaptionLabelProps, CaptionLayout, CaptionProps, DayContentProps, DayProps, DropdownProps, RowProps, WeekNumberProps } from '../components';
4
- import { DayClickEventHandler, DayFocusEventHandler, DayKeyboardEventHandler, DayMouseEventHandler, DayTouchEventHandler, MonthChangeEventHandler, WeekNumberClickEventHandler } from './EventHandlers';
5
- import { Formatters } from './Formatters';
6
- import { Labels } from './Labels';
7
- import { Matcher } from './Matchers';
8
- import { CustomModifiers, ModifierClassNames, ModifierStyles } from './Modifiers';
9
- import { ClassNames, StyledComponent, Styles } from './Styles';
10
- /**
11
- * The props for the [[DayPicker]] component.
12
- */
13
- export interface DayPickerProps {
14
- /** CSS class to add to the root UI element. */
15
- className?: string;
16
- /**
17
- * Change the class names.
18
- *
19
- * Use this prop when you need to change the default class names — for example
20
- * when using CSS modules.
21
- */
22
- classNames?: ClassNames;
23
- /**
24
- * Change the class name for the day matching the [[modifiers]].
25
- */
26
- modifierClassNames?: ModifierClassNames;
27
- /**
28
- * Style to apply to the container element.
29
- */
30
- style?: React.CSSProperties;
31
- /**
32
- * Change the inline styles for each UIElement.
33
- */
34
- styles?: Styles;
35
- /**
36
- * Change the inline style for the day matching the [[modifiers]].
37
- */
38
- modifierStyles?: ModifierStyles;
39
- /**
40
- * The initial month to show in the calendar. Default is the current month.
41
- *
42
- * As opposed to [[month]], use this prop to let DayPicker control the current
43
- * month.
44
- */
45
- defaultMonth?: Date;
46
- /**
47
- * The month to display in the calendar.
48
- *
49
- * As opposed to [[defaultMonth]], use this prop with [[onMonthChange]] to
50
- * change the month programmatically.
51
- */
52
- month?: Date;
53
- /**
54
- * Event fired when the user navigates between months.
55
- */
56
- onMonthChange?: MonthChangeEventHandler;
57
- /**
58
- * The number of displayed months. Defaults to `1`.
59
- */
60
- numberOfMonths?: number;
61
- /**
62
- * The earliest day to start the month navigation.
63
- */
64
- fromDate?: Date;
65
- /**
66
- * The latest day to end the month navigation.
67
- */
68
- toDate?: Date;
69
- /**
70
- * The earliest month to start the month navigation.
71
- */
72
- fromMonth?: Date;
73
- /**
74
- * The latest month to end the month navigation.
75
- */
76
- toMonth?: Date;
77
- /**
78
- * The earliest year to start the month navigation.
79
- */
80
- fromYear?: number;
81
- /**
82
- * The latest year to end the month navigation.
83
- */
84
- toYear?: number;
85
- /**
86
- * Disable the navigation between months.
87
- */
88
- disableNavigation?: boolean;
89
- /**
90
- * Paginate the month navigation displaying the [[numberOfMonths]] at time.
91
- */
92
- pagedNavigation?: boolean;
93
- /**
94
- * Render the months in reversed order (when [[numberOfMonths]] is greater
95
- * than `1`) to display the most recent month first.
96
- */
97
- reverseMonths?: boolean;
98
- /**
99
- * Change the layout of the caption:
100
- *
101
- * - `buttons` (default): display prev/right buttons
102
- * - `dropdown`: display drop-downs to change the month and the year
103
- *
104
- * **Note** `dropdown` is valid only when `fromDate/fromMonth/fromYear` and
105
- * `toDate/toMonth/toYear` are set.
106
- */
107
- captionLayout?: CaptionLayout;
108
- /**
109
- * Display six weeks per months, regardless the month’s number of weeks.
110
- * To use this prop, [[showOutsideDays]] must be set. Default to `false`.
111
- */
112
- fixedWeeks?: boolean;
113
- /**
114
- * Hide the month’s head displaying the weekday names.
115
- */
116
- hideHead?: boolean;
117
- /**
118
- * Show the outside days. An outside day is a day falling in the next or the
119
- * previous month. Default is `false`.
120
- */
121
- showOutsideDays?: boolean;
122
- /**
123
- * Show the week numbers column. Default to `false`.
124
- */
125
- showWeekNumber?: boolean;
126
- /**
127
- * A map of components used to create the layout.
128
- */
129
- components?: Partial<Components>;
130
- /** Content to add to the `tfoot` element. */
131
- footer?: React.ReactNode;
132
- /**
133
- * Apply the `disabled` modifier to the matching days.
134
- */
135
- disabled?: Matcher | Matcher[];
136
- /**
137
- * Apply the `hidden` modifier to the matching days. Will hide them from the
138
- * calendar.
139
- */
140
- hidden?: Matcher | Matcher[];
141
- /**
142
- * The today’s date. Default is the current date. This Date will get the
143
- * `today` modifier to style the day.
144
- */
145
- today?: Date;
146
- /**
147
- * Add modifiers to the matching days.
148
- */
149
- modifiers?: CustomModifiers;
150
- /**
151
- * The prefix to add to the modifiers class names. Default is `rdp-day_`.
152
- *
153
- * Each day will get a `${modifierPrefix}${modifier}` class name when matching
154
- * a modifier.
155
- */
156
- modifierPrefix?: string;
157
- /**
158
- * Toggle the controlled selection mode.
159
- *
160
- * As default, no selection mode is set and the days are not interactive.
161
- *
162
- * - `single`: control the selection of single days
163
- * - `multiple`: control the selection of multiple days
164
- * - `range`: control the selection of a range of days
165
- * - `custom`: customize what is selected by using `onDayClick`
166
- */
167
- mode?: 'custom' | 'single' | 'multiple' | 'range';
168
- /**
169
- * The date-fns locale object to localize the user interface. Defaults to
170
- * `en-US`.
171
- */
172
- locale?: Locale;
173
- /**
174
- * A map of labels creators used for the ARIA labels attributes.
175
- */
176
- labels?: Partial<Labels>;
177
- /**
178
- * The text direction of the calendar. Use `ltr` for left-to-right (default)
179
- * or `rtl` for right-to-left.
180
- */
181
- dir?: string;
182
- /**
183
- * A map of formatters to change the default formatting functions.
184
- */
185
- formatters?: Partial<Formatters>;
186
- onDayClick?: DayClickEventHandler;
187
- onDayFocus?: DayFocusEventHandler;
188
- onDayBlur?: DayFocusEventHandler;
189
- onDayMouseEnter?: DayMouseEventHandler;
190
- onDayMouseLeave?: DayMouseEventHandler;
191
- onDayKeyDown?: DayKeyboardEventHandler;
192
- onDayKeyUp?: DayKeyboardEventHandler;
193
- onDayKeyPress?: DayKeyboardEventHandler;
194
- onDayTouchCancel?: DayTouchEventHandler;
195
- onDayTouchEnd?: DayTouchEventHandler;
196
- onDayTouchMove?: DayTouchEventHandler;
197
- onDayTouchStart?: DayTouchEventHandler;
198
- onNextClick?: MonthChangeEventHandler;
199
- onPrevClick?: MonthChangeEventHandler;
200
- onWeekNumberClick?: WeekNumberClickEventHandler;
201
- }
202
- /** A map of the component that can be changed via the `components` prop. */
203
- export interface Components {
204
- /** The component for the caption element. */
205
- Caption: (props: CaptionProps) => JSX.Element | null;
206
- /** The component for the caption element. */
207
- CaptionLabel: (props: CaptionLabelProps) => JSX.Element | null;
208
- /** The component for the day element. This is a button or a span. */
209
- Day: (props: DayProps) => JSX.Element | null;
210
- /** The component for the content of the day element. */
211
- DayContent: (props: DayContentProps) => JSX.Element | null;
212
- /** The component for the drop-down elements. */
213
- Dropdown: (props: DropdownProps) => JSX.Element | null;
214
- /** The component for the table footer. */
215
- Footer: () => JSX.Element | null;
216
- /** The component for the table’s head. */
217
- Head: () => JSX.Element | null;
218
- /** The component for the small icon in the drop-downs. */
219
- IconDropdown: (props: StyledComponent) => JSX.Element | null;
220
- /** The arrow right icon (used for the Navigation buttons). */
221
- IconRight: (props: StyledComponent) => JSX.Element | null;
222
- /** The arrow left icon (used for the Navigation buttons). */
223
- IconLeft: (props: StyledComponent) => JSX.Element | null;
224
- /** The component for the table rows. */
225
- Row: (props: RowProps) => JSX.Element | null;
226
- /** The component for the week number in the table rows. */
227
- WeekNumber: (props: WeekNumberProps) => JSX.Element | null;
228
- }
1
+ /// <reference types="react" />
2
+ import { Locale } from 'date-fns';
3
+ import { CaptionLayout, CaptionProps } from '../components/Caption';
4
+ import { CaptionLabelProps } from '../components/CaptionLabel';
5
+ import { DayProps } from '../components/Day';
6
+ import { DayContentProps } from '../components/DayContent';
7
+ import { DropdownProps } from '../components/Dropdown';
8
+ import { RowProps } from '../components/Row';
9
+ import { WeekNumberProps } from '../components/WeekNumber';
10
+ import { DayClickEventHandler, DayFocusEventHandler, DayKeyboardEventHandler, DayMouseEventHandler, DayTouchEventHandler, MonthChangeEventHandler, WeekNumberClickEventHandler } from './EventHandlers';
11
+ import { Formatters } from './Formatters';
12
+ import { Labels } from './Labels';
13
+ import { Matcher } from './Matchers';
14
+ import { DayModifiers, ModifiersClassNames, ModifiersStyles } from './Modifiers';
15
+ import { ClassNames, StyledComponent, Styles } from './Styles';
16
+ /**
17
+ * Selection modes supported by DayPicker.
18
+ *
19
+ * - `single`: use DayPicker to select single days.
20
+ * - `multiple`: allow selecting multiple days.
21
+ * - `range`: use DayPicker to select a range of days
22
+ * - `custom`: customize what is selected by using `onDayClick`
23
+ */
24
+ export declare type DaySelectionMode = 'custom' | 'single' | 'multiple' | 'range';
25
+ /**
26
+ * The props for the [[DayPicker]] component.
27
+ */
28
+ export interface DayPickerProps {
29
+ /** The CSS class to add to the container element. */
30
+ className?: string;
31
+ /**
32
+ * Change the class names of the HTML elements.
33
+ *
34
+ * Use this prop when you need to change the default class names — for example
35
+ * when using CSS modules.
36
+ */
37
+ classNames?: ClassNames;
38
+ /**
39
+ * Change the class name for the day matching the [[modifiers]].
40
+ */
41
+ modifiersClassNames?: ModifiersClassNames;
42
+ /**
43
+ * Style to apply to the container element.
44
+ */
45
+ style?: React.CSSProperties;
46
+ /**
47
+ * Change the inline styles for each UIElement.
48
+ */
49
+ styles?: Styles;
50
+ /**
51
+ * Change the inline style for the day matching the [[modifiers]].
52
+ */
53
+ modifiersStyles?: ModifiersStyles;
54
+ /**
55
+ * The initial month to show in the calendar. Default is the current month.
56
+ *
57
+ * Use this prop to let DayPicker control the current month. If you need to set the month programmatically, use [[month]] and [[onMonthChange]].
58
+ */
59
+ defaultMonth?: Date;
60
+ /**
61
+ * The month to display in the calendar.
62
+ *
63
+ * As opposed to [[defaultMonth]], use this prop with [[onMonthChange]] to
64
+ * change the month programmatically.
65
+ */
66
+ month?: Date;
67
+ /**
68
+ * Event fired when the user navigates between months.
69
+ */
70
+ onMonthChange?: MonthChangeEventHandler;
71
+ /**
72
+ * The number of displayed months. Defaults to `1`.
73
+ */
74
+ numberOfMonths?: number;
75
+ /**
76
+ * The earliest day to start the month navigation.
77
+ */
78
+ fromDate?: Date;
79
+ /**
80
+ * The latest day to end the month navigation.
81
+ */
82
+ toDate?: Date;
83
+ /**
84
+ * The earliest month to start the month navigation.
85
+ */
86
+ fromMonth?: Date;
87
+ /**
88
+ * The latest month to end the month navigation.
89
+ */
90
+ toMonth?: Date;
91
+ /**
92
+ * The earliest year to start the month navigation.
93
+ */
94
+ fromYear?: number;
95
+ /**
96
+ * The latest year to end the month navigation.
97
+ */
98
+ toYear?: number;
99
+ /**
100
+ * Disable the navigation between months.
101
+ */
102
+ disableNavigation?: boolean;
103
+ /**
104
+ * Paginate the month navigation displaying the [[numberOfMonths]] at time.
105
+ */
106
+ pagedNavigation?: boolean;
107
+ /**
108
+ * Render the months in reversed order (when [[numberOfMonths]] is greater
109
+ * than `1`) to display the most recent month first.
110
+ */
111
+ reverseMonths?: boolean;
112
+ /**
113
+ * Change the layout of the caption:
114
+ *
115
+ * - `buttons` (default): display prev/right buttons
116
+ * - `dropdown`: display drop-downs to change the month and the year
117
+ *
118
+ * **Note:** the `dropdown` layout is available only when `fromDate`,
119
+ * `fromMonth` or`fromYear` and `toDate`, `toMonth` or `toYear` are set.
120
+ */
121
+ captionLayout?: CaptionLayout;
122
+ /**
123
+ * Display six weeks per months, regardless the month’s number of weeks.
124
+ * To use this prop, [[showOutsideDays]] must be set. Default to `false`.
125
+ */
126
+ fixedWeeks?: boolean;
127
+ /**
128
+ * Hide the month’s head displaying the weekday names.
129
+ */
130
+ hideHead?: boolean;
131
+ /**
132
+ * Show the outside days. An outside day is a day falling in the next or the
133
+ * previous month. Default is `false`.
134
+ */
135
+ showOutsideDays?: boolean;
136
+ /**
137
+ * Show the week numbers column. Default to `false`.
138
+ */
139
+ showWeekNumber?: boolean;
140
+ /**
141
+ * A map of components used to create the layout.
142
+ */
143
+ components?: CustomComponents;
144
+ /** Content to add to the `tfoot` element. */
145
+ footer?: React.ReactNode;
146
+ /**
147
+ * When a selection mode is set, DayPicker will focus the first selected day
148
+ * (if set) or the today's date (if not disabled).
149
+ *
150
+ * Use this prop when you need to focus DayPicker after a user actions, for
151
+ * improved accessibility.
152
+ */
153
+ initialFocus?: boolean;
154
+ /**
155
+ * Apply the `disabled` modifier to the matching days.
156
+ */
157
+ disabled?: Matcher | Matcher[];
158
+ /**
159
+ * Apply the `hidden` modifier to the matching days. Will hide them from the
160
+ * calendar.
161
+ */
162
+ hidden?: Matcher | Matcher[];
163
+ /** Apply the `selected` modifier to the matching days. */
164
+ selected?: Matcher | Matcher[];
165
+ /**
166
+ * The today’s date. Default is the current date. This Date will get the
167
+ * `today` modifier to style the day.
168
+ */
169
+ today?: Date;
170
+ /**
171
+ * Add modifiers to the matching days.
172
+ */
173
+ modifiers?: DayModifiers;
174
+ /**
175
+ * The prefix to add to the modifiers class names. Default is `rdp-day_`.
176
+ *
177
+ * Each day will get a `${modifierPrefix}${modifier}` class name when matching
178
+ * a modifier.
179
+ */
180
+ modifierPrefix?: string;
181
+ /**
182
+ * Toggle the selection mode.
183
+ *
184
+ * - `single`: use DayPicker to select single days.
185
+ * - `multiple`: allow selecting multiple days.
186
+ * - `range`: use DayPicker to select a range of days
187
+ * - `custom`: customize what is selected by using `onDayClick`
188
+ */
189
+ mode?: DaySelectionMode;
190
+ /** The date-fns locale object used to localize dates. Defaults to* `en-US`. */
191
+ locale?: Locale;
192
+ /**
193
+ * Labels creators to override the defaults. Use this prop to customize the
194
+ * ARIA labels attributes.
195
+ */
196
+ labels?: Partial<Labels>;
197
+ /**
198
+ * The text direction of the calendar. Use `ltr` for left-to-right (default)
199
+ * or `rtl` for right-to-left.
200
+ */
201
+ dir?: string;
202
+ /**
203
+ * A map of formatters. Use the formatters to override the default formatting
204
+ * functions.
205
+ */
206
+ formatters?: Partial<Formatters>;
207
+ onDayClick?: DayClickEventHandler;
208
+ onDayFocus?: DayFocusEventHandler;
209
+ onDayBlur?: DayFocusEventHandler;
210
+ onDayMouseEnter?: DayMouseEventHandler;
211
+ onDayMouseLeave?: DayMouseEventHandler;
212
+ onDayKeyDown?: DayKeyboardEventHandler;
213
+ onDayKeyUp?: DayKeyboardEventHandler;
214
+ onDayKeyPress?: DayKeyboardEventHandler;
215
+ onDayTouchCancel?: DayTouchEventHandler;
216
+ onDayTouchEnd?: DayTouchEventHandler;
217
+ onDayTouchMove?: DayTouchEventHandler;
218
+ onDayTouchStart?: DayTouchEventHandler;
219
+ onNextClick?: MonthChangeEventHandler;
220
+ onPrevClick?: MonthChangeEventHandler;
221
+ onWeekNumberClick?: WeekNumberClickEventHandler;
222
+ }
223
+ /** A map of the component that can be changed via the `components` prop. */
224
+ export interface CustomComponents {
225
+ /** The component for the caption element. */
226
+ Caption?: (props: CaptionProps) => JSX.Element | null;
227
+ /** The component for the caption element. */
228
+ CaptionLabel?: (props: CaptionLabelProps) => JSX.Element | null;
229
+ /** The component for the day element. This is a button or a span. */
230
+ Day?: (props: DayProps) => JSX.Element | null;
231
+ /** The component for the content of the day element. */
232
+ DayContent?: (props: DayContentProps) => JSX.Element | null;
233
+ /** The component for the drop-down elements. */
234
+ Dropdown?: (props: DropdownProps) => JSX.Element | null;
235
+ /** The component for the table footer. */
236
+ Footer?: () => JSX.Element | null;
237
+ /** The component for the table’s head. */
238
+ Head?: () => JSX.Element | null;
239
+ /** The component for the small icon in the drop-downs. */
240
+ IconDropdown?: (props: StyledComponent) => JSX.Element | null;
241
+ /** The arrow right icon (used for the Navigation buttons). */
242
+ IconRight?: (props: StyledComponent) => JSX.Element | null;
243
+ /** The arrow left icon (used for the Navigation buttons). */
244
+ IconLeft?: (props: StyledComponent) => JSX.Element | null;
245
+ /** The component for the table rows. */
246
+ Row?: (props: RowProps) => JSX.Element | null;
247
+ /** The component for the week number in the table rows. */
248
+ WeekNumber?: (props: WeekNumberProps) => JSX.Element | null;
249
+ }
@@ -1,11 +1,9 @@
1
- import { DayPickerProps } from './DayPicker';
2
- /** The props for the [[DayPicker]] component when using `mode="custom"`. */
3
- export interface DayPickerCustomProps extends DayPickerProps {
4
- mode: 'custom';
5
- /** The selected day(s). */
6
- selected?: unknown;
7
- /** Use `onDayClick` and related event instead. */
8
- onSelect: never;
9
- }
10
- /** Returns true when the props are of type [[DayPickerCustom]]. */
11
- export declare function isDayPickerCustom(props: DayPickerProps): props is DayPickerCustomProps;
1
+ import { DayPickerProps } from './DayPicker';
2
+ /** The props for the [[DayPicker]] component when using `mode="custom"`. */
3
+ export interface DayPickerCustomProps extends DayPickerProps {
4
+ mode: 'custom';
5
+ /** Use `onDayClick` and related events instead. */
6
+ onSelect: never;
7
+ }
8
+ /** Returns true when the props are of type [[DayPickerCustom]]. */
9
+ export declare function isDayPickerCustom(props: DayPickerProps): props is DayPickerCustomProps;
@@ -1,16 +1,16 @@
1
- import { DayPickerProps } from './DayPicker';
2
- import { SelectMultipleEventHandler } from './EventHandlers';
3
- /** The props for the [[DayPicker]] component when using `mode="multiple"`. */
4
- export interface DayPickerMultipleProps extends DayPickerProps {
5
- mode: 'multiple';
6
- /** The selected days. */
7
- selected?: Date[];
8
- /** Event fired when a days added or removed to the selection. */
9
- onSelect?: SelectMultipleEventHandler;
10
- /** The minimum amount of days that can be selected. */
11
- min?: number;
12
- /** The maximum amount of days that can be selected. */
13
- max?: number;
14
- }
15
- /** Returns true when the props are of type [[DayPickerMultiple]]. */
16
- export declare function isDayPickerMultiple(props: DayPickerProps): props is DayPickerMultipleProps;
1
+ import { DayPickerProps } from './DayPicker';
2
+ import { SelectMultipleEventHandler } from './EventHandlers';
3
+ /** The props for the [[DayPicker]] component when using `mode="multiple"`. */
4
+ export interface DayPickerMultipleProps extends DayPickerProps {
5
+ mode: 'multiple';
6
+ /** The selected days. */
7
+ selected?: Date[];
8
+ /** Event fired when a days added or removed to the selection. */
9
+ onSelect?: SelectMultipleEventHandler;
10
+ /** The minimum amount of days that can be selected. */
11
+ min?: number;
12
+ /** The maximum amount of days that can be selected. */
13
+ max?: number;
14
+ }
15
+ /** Returns true when the props are of type [[DayPickerMultiple]]. */
16
+ export declare function isDayPickerMultiple(props: DayPickerProps): props is DayPickerMultipleProps;
@@ -1,17 +1,17 @@
1
- import { DayPickerProps } from './DayPicker';
2
- import { SelectRangeEventHandler } from './EventHandlers';
3
- import { DateRange } from './Matchers';
4
- /** The props for the [[DayPicker]] component when using `mode="range"`. */
5
- export interface DayPickerRangeProps extends DayPickerProps {
6
- mode: 'range';
7
- /** The selected range of days. */
8
- selected?: DateRange;
9
- /** Event fired when a range (or a part of the range) is selected. */
10
- onSelect?: SelectRangeEventHandler;
11
- /** The minimum amount of days that can be selected. */
12
- min?: number;
13
- /** The maximum amount of days that can be selected. */
14
- max?: number;
15
- }
16
- /** Returns true when the props are of type [[DayPickerRange]]. */
17
- export declare function isDayPickerRange(props: DayPickerProps): props is DayPickerRangeProps;
1
+ import { DayPickerProps } from './DayPicker';
2
+ import { SelectRangeEventHandler } from './EventHandlers';
3
+ import { DateRange } from './Matchers';
4
+ /** The props for the [[DayPicker]] component when using `mode="range"`. */
5
+ export interface DayPickerRangeProps extends DayPickerProps {
6
+ mode: 'range';
7
+ /** The selected range of days. */
8
+ selected?: DateRange;
9
+ /** Event fired when a range (or a part of the range) is selected. */
10
+ onSelect?: SelectRangeEventHandler;
11
+ /** The minimum amount of days that can be selected. */
12
+ min?: number;
13
+ /** The maximum amount of days that can be selected. */
14
+ max?: number;
15
+ }
16
+ /** Returns true when the props are of type [[DayPickerRange]]. */
17
+ export declare function isDayPickerRange(props: DayPickerProps): props is DayPickerRangeProps;
@@ -1,14 +1,14 @@
1
- import { DayPickerProps } from './DayPicker';
2
- import { SelectSingleEventHandler } from './EventHandlers';
3
- /** The props for the [[DayPicker]] component when using `mode="single"`. */
4
- export interface DayPickerSingleProps extends DayPickerProps {
5
- mode: 'single';
6
- /** The selected day. */
7
- selected?: Date | undefined;
8
- /** Event fired when a day is selected. */
9
- onSelect?: SelectSingleEventHandler;
10
- /** Make the selection required. */
11
- required?: boolean;
12
- }
13
- /** Returns true when the props are of type [[DayPickerSingle]]. */
14
- export declare function isDayPickerSingle(props: DayPickerProps): props is DayPickerSingleProps;
1
+ import { DayPickerProps } from './DayPicker';
2
+ import { SelectSingleEventHandler } from './EventHandlers';
3
+ /** The props for the [[DayPicker]] component when using `mode="single"`. */
4
+ export interface DayPickerSingleProps extends DayPickerProps {
5
+ mode: 'single';
6
+ /** The selected day. */
7
+ selected?: Date | undefined;
8
+ /** Event fired when a day is selected. */
9
+ onSelect?: SelectSingleEventHandler;
10
+ /** Make the selection required. */
11
+ required?: boolean;
12
+ }
13
+ /** Returns true when the props are of type [[DayPickerSingle]]. */
14
+ export declare function isDayPickerSingle(props: DayPickerProps): props is DayPickerSingleProps;