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

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 (708) hide show
  1. package/CHANGELOG.md +30 -1112
  2. package/LICENSE +1 -1
  3. package/README.md +14 -27
  4. package/build/DayPicker.d.ts +89 -0
  5. package/build/DayPicker.js +98 -0
  6. package/build/DayPicker.js.map +1 -0
  7. package/build/_virtual/_tslib.js +50 -0
  8. package/build/_virtual/_tslib.js.map +1 -0
  9. package/build/components/Button/Button.d.ts +7 -0
  10. package/build/components/Button/Button.js +23 -0
  11. package/build/components/Button/Button.js.map +1 -0
  12. package/build/components/Button/index.d.ts +1 -0
  13. package/build/components/Caption/Caption.d.ts +18 -0
  14. package/build/components/Caption/Caption.js +57 -0
  15. package/build/components/Caption/Caption.js.map +1 -0
  16. package/build/components/Caption/index.d.ts +1 -0
  17. package/build/components/CaptionLabel/CaptionLabel.d.ts +8 -0
  18. package/build/components/CaptionLabel/CaptionLabel.js +11 -0
  19. package/build/components/CaptionLabel/CaptionLabel.js.map +1 -0
  20. package/build/components/CaptionLabel/index.d.ts +1 -0
  21. package/build/components/Day/Day.d.ts +13 -0
  22. package/build/components/Day/Day.js +24 -0
  23. package/build/components/Day/Day.js.map +1 -0
  24. package/build/components/Day/hooks/index.d.ts +1 -0
  25. package/build/components/Day/hooks/useDay.d.ts +58 -0
  26. package/build/components/Day/hooks/useDay.js +176 -0
  27. package/build/components/Day/hooks/useDay.js.map +1 -0
  28. package/build/components/Day/hooks/useDayFocus.d.ts +8 -0
  29. package/build/components/Day/hooks/useDayFocus.js +56 -0
  30. package/build/components/Day/hooks/useDayFocus.js.map +1 -0
  31. package/build/components/Day/index.d.ts +2 -0
  32. package/build/components/DayContent/DayContent.d.ts +15 -0
  33. package/build/components/DayContent/DayContent.js +15 -0
  34. package/build/components/DayContent/DayContent.js.map +1 -0
  35. package/build/components/DayContent/index.d.ts +1 -0
  36. package/build/components/Dropdown/Dropdown.d.ts +16 -0
  37. package/build/components/Dropdown/Dropdown.js +20 -0
  38. package/build/components/Dropdown/Dropdown.js.map +1 -0
  39. package/build/components/Dropdown/index.d.ts +1 -0
  40. package/build/components/Footer/Footer.d.ts +3 -0
  41. package/build/components/Footer/Footer.js +15 -0
  42. package/build/components/Footer/Footer.js.map +1 -0
  43. package/build/components/Footer/index.d.ts +1 -0
  44. package/build/components/Head/Head.d.ts +5 -0
  45. package/build/components/Head/Head.js +20 -0
  46. package/build/components/Head/Head.js.map +1 -0
  47. package/{lib → build}/components/Head/index.d.ts +1 -1
  48. package/build/components/Head/utils/getWeekdays.d.ts +6 -0
  49. package/build/components/Head/utils/getWeekdays.js +18 -0
  50. package/build/components/Head/utils/getWeekdays.js.map +1 -0
  51. package/build/components/Head/utils/index.d.ts +1 -0
  52. package/build/components/IconDropdown/IconDropdown.d.ts +6 -0
  53. package/build/components/IconDropdown/IconDropdown.js +13 -0
  54. package/build/components/IconDropdown/IconDropdown.js.map +1 -0
  55. package/build/components/IconDropdown/index.d.ts +1 -0
  56. package/build/components/IconLeft/IconLeft.d.ts +6 -0
  57. package/build/components/IconLeft/IconLeft.js +13 -0
  58. package/build/components/IconLeft/IconLeft.js.map +1 -0
  59. package/build/components/IconLeft/index.d.ts +1 -0
  60. package/build/components/IconRight/IconRight.d.ts +6 -0
  61. package/build/components/IconRight/IconRight.js +13 -0
  62. package/build/components/IconRight/IconRight.js.map +1 -0
  63. package/build/components/IconRight/index.d.ts +1 -0
  64. package/build/components/MonthsDropdown/MonthsDropdown.d.ts +12 -0
  65. package/build/components/MonthsDropdown/MonthsDropdown.js +39 -0
  66. package/build/components/MonthsDropdown/MonthsDropdown.js.map +1 -0
  67. package/build/components/MonthsDropdown/index.d.ts +1 -0
  68. package/build/components/Navigation/Navigation.d.ts +20 -0
  69. package/build/components/Navigation/Navigation.js +33 -0
  70. package/build/components/Navigation/Navigation.js.map +1 -0
  71. package/build/components/Navigation/index.d.ts +1 -0
  72. package/build/components/Root/Root.d.ts +6 -0
  73. package/build/components/Root/Root.js +49 -0
  74. package/build/components/Root/Root.js.map +1 -0
  75. package/{lib → build}/components/Root/index.d.ts +1 -1
  76. package/build/components/Row/Row.d.ts +16 -0
  77. package/build/components/Row/Row.js +22 -0
  78. package/build/components/Row/Row.js.map +1 -0
  79. package/{lib → build}/components/Row/index.d.ts +1 -1
  80. package/build/components/Table/Table.d.ts +12 -0
  81. package/build/components/Table/Table.js +18 -0
  82. package/build/components/Table/Table.js.map +1 -0
  83. package/{lib → build}/components/Table/index.d.ts +1 -1
  84. package/build/components/Table/utils/getOutsideEndDays.d.ts +3 -0
  85. package/build/components/Table/utils/getOutsideEndDays.js +15 -0
  86. package/build/components/Table/utils/getOutsideEndDays.js.map +1 -0
  87. package/build/components/Table/utils/getOutsideStartDays.d.ts +4 -0
  88. package/build/components/Table/utils/getOutsideStartDays.js +15 -0
  89. package/build/components/Table/utils/getOutsideStartDays.js.map +1 -0
  90. package/build/components/Table/utils/getWeeks.d.ts +17 -0
  91. package/build/components/Table/utils/getWeeks.js +50 -0
  92. package/build/components/Table/utils/getWeeks.js.map +1 -0
  93. package/build/components/WeekNumber/WeekNumber.d.ts +15 -0
  94. package/build/components/WeekNumber/WeekNumber.js +24 -0
  95. package/build/components/WeekNumber/WeekNumber.js.map +1 -0
  96. package/build/components/WeekNumber/index.d.ts +1 -0
  97. package/build/components/YearsDropdown/YearsDropdown.d.ts +16 -0
  98. package/build/components/YearsDropdown/YearsDropdown.js +28 -0
  99. package/build/components/YearsDropdown/YearsDropdown.js.map +1 -0
  100. package/build/components/YearsDropdown/index.d.ts +1 -0
  101. package/build/components/index.d.ts +18 -0
  102. package/build/contexts/DayPicker/DayPickerContext.d.ts +31 -0
  103. package/build/contexts/DayPicker/DayPickerContext.js +14 -0
  104. package/build/contexts/DayPicker/DayPickerContext.js.map +1 -0
  105. package/build/contexts/DayPicker/DayPickerProvider.d.ts +12 -0
  106. package/build/contexts/DayPicker/DayPickerProvider.js +59 -0
  107. package/build/contexts/DayPicker/DayPickerProvider.js.map +1 -0
  108. package/build/contexts/DayPicker/defaultClassNames.d.ts +5 -0
  109. package/build/contexts/DayPicker/defaultClassNames.js +42 -0
  110. package/build/contexts/DayPicker/defaultClassNames.js.map +1 -0
  111. package/build/contexts/DayPicker/formatters/formatCaption.d.ts +7 -0
  112. package/build/contexts/DayPicker/formatters/formatCaption.js +11 -0
  113. package/build/contexts/DayPicker/formatters/formatCaption.js.map +1 -0
  114. package/build/contexts/DayPicker/formatters/formatDay.d.ts +7 -0
  115. package/build/contexts/DayPicker/formatters/formatDay.js +11 -0
  116. package/build/contexts/DayPicker/formatters/formatDay.js.map +1 -0
  117. package/build/contexts/DayPicker/formatters/formatMonthCaption.d.ts +7 -0
  118. package/build/contexts/DayPicker/formatters/formatMonthCaption.js +11 -0
  119. package/build/contexts/DayPicker/formatters/formatMonthCaption.js.map +1 -0
  120. package/build/contexts/DayPicker/formatters/formatWeekNumber.d.ts +4 -0
  121. package/build/contexts/DayPicker/formatters/formatWeekNumber.js +9 -0
  122. package/build/contexts/DayPicker/formatters/formatWeekNumber.js.map +1 -0
  123. package/build/contexts/DayPicker/formatters/formatWeekdayName.d.ts +7 -0
  124. package/build/contexts/DayPicker/formatters/formatWeekdayName.js +11 -0
  125. package/build/contexts/DayPicker/formatters/formatWeekdayName.js.map +1 -0
  126. package/build/contexts/DayPicker/formatters/formatYearCaption.d.ts +6 -0
  127. package/build/contexts/DayPicker/formatters/formatYearCaption.js +11 -0
  128. package/build/contexts/DayPicker/formatters/formatYearCaption.js.map +1 -0
  129. package/build/contexts/DayPicker/formatters/index.d.ts +6 -0
  130. package/build/contexts/DayPicker/formatters/index.js +7 -0
  131. package/build/contexts/DayPicker/formatters/index.js.map +1 -0
  132. package/build/contexts/DayPicker/index.d.ts +1 -0
  133. package/build/contexts/DayPicker/labels/index.d.ts +7 -0
  134. package/build/contexts/DayPicker/labels/index.js +8 -0
  135. package/build/contexts/DayPicker/labels/index.js.map +1 -0
  136. package/build/contexts/DayPicker/labels/labelDay.d.ts +5 -0
  137. package/build/contexts/DayPicker/labels/labelDay.js +11 -0
  138. package/build/contexts/DayPicker/labels/labelDay.js.map +1 -0
  139. package/build/contexts/DayPicker/labels/labelMonthDropdown.d.ts +4 -0
  140. package/build/contexts/DayPicker/labels/labelMonthDropdown.js +9 -0
  141. package/build/contexts/DayPicker/labels/labelMonthDropdown.js.map +1 -0
  142. package/build/contexts/DayPicker/labels/labelNext.d.ts +5 -0
  143. package/build/contexts/DayPicker/labels/labelNext.js +9 -0
  144. package/build/contexts/DayPicker/labels/labelNext.js.map +1 -0
  145. package/build/contexts/DayPicker/labels/labelPrevious.d.ts +5 -0
  146. package/build/contexts/DayPicker/labels/labelPrevious.js +9 -0
  147. package/build/contexts/DayPicker/labels/labelPrevious.js.map +1 -0
  148. package/build/contexts/DayPicker/labels/labelWeekNumber.d.ts +5 -0
  149. package/build/contexts/DayPicker/labels/labelWeekNumber.js +9 -0
  150. package/build/contexts/DayPicker/labels/labelWeekNumber.js.map +1 -0
  151. package/build/contexts/DayPicker/labels/labelWeekday.d.ts +5 -0
  152. package/build/contexts/DayPicker/labels/labelWeekday.js +11 -0
  153. package/build/contexts/DayPicker/labels/labelWeekday.js.map +1 -0
  154. package/build/contexts/DayPicker/labels/labelYearDropdown.d.ts +4 -0
  155. package/build/contexts/DayPicker/labels/labelYearDropdown.js +9 -0
  156. package/build/contexts/DayPicker/labels/labelYearDropdown.js.map +1 -0
  157. package/build/contexts/DayPicker/useDayPicker.d.ts +8 -0
  158. package/build/contexts/DayPicker/useDayPicker.js +19 -0
  159. package/build/contexts/DayPicker/useDayPicker.js.map +1 -0
  160. package/build/contexts/DayPicker/utils/index.d.ts +2 -0
  161. package/build/contexts/DayPicker/utils/parseFromToProps.d.ts +9 -0
  162. package/build/contexts/DayPicker/utils/parseFromToProps.js +29 -0
  163. package/build/contexts/DayPicker/utils/parseFromToProps.js.map +1 -0
  164. package/build/contexts/DayPicker/utils/parseModifierProps.d.ts +9 -0
  165. package/build/contexts/DayPicker/utils/parseModifierProps.js +54 -0
  166. package/build/contexts/DayPicker/utils/parseModifierProps.js.map +1 -0
  167. package/build/contexts/Focus/FocusContext.d.ts +30 -0
  168. package/build/contexts/Focus/FocusContext.js +71 -0
  169. package/build/contexts/Focus/FocusContext.js.map +1 -0
  170. package/build/contexts/Focus/index.d.ts +2 -0
  171. package/build/contexts/Focus/useFocus.d.ts +3 -0
  172. package/build/contexts/Focus/useFocus.js +14 -0
  173. package/build/contexts/Focus/useFocus.js.map +1 -0
  174. package/build/contexts/Navigation/NavigationContext.d.ts +24 -0
  175. package/build/contexts/Navigation/NavigationContext.js +31 -0
  176. package/build/contexts/Navigation/NavigationContext.js.map +1 -0
  177. package/build/contexts/Navigation/index.d.ts +2 -0
  178. package/build/contexts/Navigation/useNavigation.d.ts +3 -0
  179. package/build/contexts/Navigation/useNavigation.js +14 -0
  180. package/build/contexts/Navigation/useNavigation.js.map +1 -0
  181. package/build/contexts/Navigation/useNavigationState.d.ts +7 -0
  182. package/build/contexts/Navigation/useNavigationState.js +19 -0
  183. package/build/contexts/Navigation/useNavigationState.js.map +1 -0
  184. package/build/contexts/Navigation/utils/getDisplayMonths.d.ts +8 -0
  185. package/build/contexts/Navigation/utils/getDisplayMonths.js +23 -0
  186. package/build/contexts/Navigation/utils/getDisplayMonths.js.map +1 -0
  187. package/build/contexts/Navigation/utils/getInitialMonth.d.ts +3 -0
  188. package/build/contexts/Navigation/utils/getInitialMonth.js +21 -0
  189. package/build/contexts/Navigation/utils/getInitialMonth.js.map +1 -0
  190. package/build/contexts/Navigation/utils/getNextMonth.d.ts +18 -0
  191. package/build/contexts/Navigation/utils/getNextMonth.js +32 -0
  192. package/build/contexts/Navigation/utils/getNextMonth.js.map +1 -0
  193. package/build/contexts/Navigation/utils/getPreviousMonth.d.ts +19 -0
  194. package/build/contexts/Navigation/utils/getPreviousMonth.js +33 -0
  195. package/build/contexts/Navigation/utils/getPreviousMonth.js.map +1 -0
  196. package/build/contexts/RootProvider.d.ts +8 -0
  197. package/build/contexts/RootProvider.js +22 -0
  198. package/build/contexts/RootProvider.js.map +1 -0
  199. package/build/contexts/SelectMultiple/SelectMultipleContext.d.ts +32 -0
  200. package/build/contexts/SelectMultiple/SelectMultipleContext.js +82 -0
  201. package/build/contexts/SelectMultiple/SelectMultipleContext.js.map +1 -0
  202. package/build/contexts/SelectMultiple/index.d.ts +2 -0
  203. package/build/contexts/SelectMultiple/useSelectMultiple.d.ts +3 -0
  204. package/build/contexts/SelectMultiple/useSelectMultiple.js +14 -0
  205. package/build/contexts/SelectMultiple/useSelectMultiple.js.map +1 -0
  206. package/build/contexts/SelectRange/SelectRangeContext.d.ts +32 -0
  207. package/build/contexts/SelectRange/SelectRangeContext.js +123 -0
  208. package/build/contexts/SelectRange/SelectRangeContext.js.map +1 -0
  209. package/build/contexts/SelectRange/index.d.ts +2 -0
  210. package/build/contexts/SelectRange/useSelectRange.d.ts +3 -0
  211. package/build/contexts/SelectRange/useSelectRange.js +14 -0
  212. package/build/contexts/SelectRange/useSelectRange.js.map +1 -0
  213. package/{lib/hooks/useRange → build/contexts/SelectRange/utils}/addToRange.d.ts +8 -8
  214. package/build/contexts/SelectRange/utils/addToRange.js +39 -0
  215. package/build/contexts/SelectRange/utils/addToRange.js.map +1 -0
  216. package/build/contexts/SelectSingle/SelectSingleContext.d.ts +35 -0
  217. package/build/contexts/SelectSingle/SelectSingleContext.js +45 -0
  218. package/build/contexts/SelectSingle/SelectSingleContext.js.map +1 -0
  219. package/build/contexts/SelectSingle/index.d.ts +2 -0
  220. package/build/contexts/SelectSingle/useSelectSingle.d.ts +3 -0
  221. package/build/contexts/SelectSingle/useSelectSingle.js +14 -0
  222. package/build/contexts/SelectSingle/useSelectSingle.js.map +1 -0
  223. package/build/contexts/index.d.ts +7 -0
  224. package/build/hooks/index.d.ts +2 -0
  225. package/build/hooks/useControlledValue/index.d.ts +1 -0
  226. package/build/hooks/useControlledValue/useControlledValue.d.ts +12 -0
  227. package/build/hooks/useControlledValue/useControlledValue.js +19 -0
  228. package/build/hooks/useControlledValue/useControlledValue.js.map +1 -0
  229. package/{lib → build}/hooks/useInput/index.d.ts +1 -1
  230. package/build/hooks/useInput/useInput.d.ts +28 -0
  231. package/build/hooks/useInput/useInput.js +101 -0
  232. package/build/hooks/useInput/useInput.js.map +1 -0
  233. package/build/hooks/useInput/utils/isValidDate.d.ts +2 -0
  234. package/build/hooks/useInput/utils/isValidDate.js +7 -0
  235. package/build/hooks/useInput/utils/isValidDate.js.map +1 -0
  236. package/build/hooks/useModifiers/index.d.ts +1 -0
  237. package/build/hooks/useModifiers/types/UseModifiers.d.ts +10 -0
  238. package/build/hooks/useModifiers/types/index.d.ts +1 -0
  239. package/build/hooks/useModifiers/useModifiers.d.ts +3 -0
  240. package/build/hooks/useModifiers/useModifiers.js +65 -0
  241. package/build/hooks/useModifiers/useModifiers.js.map +1 -0
  242. package/build/hooks/useModifiers/utils/getModifierStatus.d.ts +7 -0
  243. package/build/hooks/useModifiers/utils/getModifierStatus.js +22 -0
  244. package/build/hooks/useModifiers/utils/getModifierStatus.js.map +1 -0
  245. package/build/hooks/useModifiers/utils/isDateInRange.d.ts +3 -0
  246. package/build/hooks/useModifiers/utils/isDateInRange.js +25 -0
  247. package/build/hooks/useModifiers/utils/isDateInRange.js.map +1 -0
  248. package/build/hooks/useModifiers/utils/isMatch.d.ts +5 -0
  249. package/build/hooks/useModifiers/utils/isMatch.js +52 -0
  250. package/build/hooks/useModifiers/utils/isMatch.js.map +1 -0
  251. package/{src/index.ts → build/main.d.ts} +5 -3
  252. package/build/main.js +40 -0
  253. package/build/main.js.map +1 -0
  254. package/build/test/PageObjects.d.ts +40 -0
  255. package/build/test/customRender.d.ts +4 -0
  256. package/build/test/customRenderHook.d.ts +3 -0
  257. package/build/test/index.d.ts +3 -0
  258. package/build/test/setup.d.ts +2 -0
  259. package/build/types/DayPicker.d.ts +228 -0
  260. package/build/types/DayPickerCustom.d.ts +11 -0
  261. package/build/types/DayPickerCustom.js +7 -0
  262. package/build/types/DayPickerCustom.js.map +1 -0
  263. package/build/types/DayPickerMultiple.d.ts +16 -0
  264. package/build/types/DayPickerMultiple.js +7 -0
  265. package/build/types/DayPickerMultiple.js.map +1 -0
  266. package/build/types/DayPickerRange.d.ts +17 -0
  267. package/build/types/DayPickerRange.js +7 -0
  268. package/build/types/DayPickerRange.js.map +1 -0
  269. package/build/types/DayPickerSingle.d.ts +14 -0
  270. package/build/types/DayPickerSingle.js +7 -0
  271. package/build/types/DayPickerSingle.js.map +1 -0
  272. package/build/types/EventHandlers.d.ts +51 -0
  273. package/build/types/Formatters.d.ts +24 -0
  274. package/build/types/Labels.d.ts +28 -0
  275. package/build/types/Matchers.d.ts +34 -0
  276. package/build/types/Matchers.js +27 -0
  277. package/build/types/Matchers.js.map +1 -0
  278. package/build/types/Modifiers.d.ts +16 -0
  279. package/build/types/Styles.d.ts +85 -0
  280. package/build/types/index.d.ts +11 -0
  281. package/dist/main.js +1897 -0
  282. package/dist/main.js.map +1 -0
  283. package/package.json +50 -46
  284. package/style.css +299 -0
  285. package/style.css.d.ts +39 -0
  286. package/dist/index.js +0 -2103
  287. package/dist/index.js.map +0 -1
  288. package/dist/index.min.js +0 -2
  289. package/dist/index.min.js.map +0 -1
  290. package/dist/style.css +0 -144
  291. package/lib/components/Caption/Caption.d.ts +0 -3
  292. package/lib/components/Caption/Caption.js +0 -19
  293. package/lib/components/Caption/Caption.js.map +0 -1
  294. package/lib/components/Caption/getCaptionComponent.d.ts +0 -5
  295. package/lib/components/Caption/getCaptionComponent.js +0 -12
  296. package/lib/components/Caption/getCaptionComponent.js.map +0 -1
  297. package/lib/components/Caption/getCaptionComponent.test.d.ts +0 -1
  298. package/lib/components/Caption/getCaptionComponent.test.js +0 -29
  299. package/lib/components/Caption/getCaptionComponent.test.js.map +0 -1
  300. package/lib/components/Caption/index.d.ts +0 -2
  301. package/lib/components/Caption/index.js +0 -3
  302. package/lib/components/Caption/index.js.map +0 -1
  303. package/lib/components/Day/Day.d.ts +0 -3
  304. package/lib/components/Day/Day.js +0 -31
  305. package/lib/components/Day/Day.js.map +0 -1
  306. package/lib/components/Day/getDayComponent.d.ts +0 -6
  307. package/lib/components/Day/getDayComponent.js +0 -29
  308. package/lib/components/Day/getDayComponent.js.map +0 -1
  309. package/lib/components/Day/index.d.ts +0 -3
  310. package/lib/components/Day/index.js +0 -4
  311. package/lib/components/Day/index.js.map +0 -1
  312. package/lib/components/Day/utils/createClassName.d.ts +0 -2
  313. package/lib/components/Day/utils/createClassName.js +0 -19
  314. package/lib/components/Day/utils/createClassName.js.map +0 -1
  315. package/lib/components/Day/utils/createEventHandlers.d.ts +0 -16
  316. package/lib/components/Day/utils/createEventHandlers.js +0 -105
  317. package/lib/components/Day/utils/createEventHandlers.js.map +0 -1
  318. package/lib/components/Day/utils/createStyle.d.ts +0 -3
  319. package/lib/components/Day/utils/createStyle.js +0 -27
  320. package/lib/components/Day/utils/createStyle.js.map +0 -1
  321. package/lib/components/Day/utils/createTabIndex.d.ts +0 -2
  322. package/lib/components/Day/utils/createTabIndex.js +0 -22
  323. package/lib/components/Day/utils/createTabIndex.js.map +0 -1
  324. package/lib/components/Day/utils/findModifiers.d.ts +0 -6
  325. package/lib/components/Day/utils/findModifiers.js +0 -16
  326. package/lib/components/Day/utils/findModifiers.js.map +0 -1
  327. package/lib/components/Day/utils/getModifiers.d.ts +0 -5
  328. package/lib/components/Day/utils/getModifiers.js +0 -43
  329. package/lib/components/Day/utils/getModifiers.js.map +0 -1
  330. package/lib/components/Day/utils/getModifiersFromProps.d.ts +0 -2
  331. package/lib/components/Day/utils/getModifiersFromProps.js +0 -14
  332. package/lib/components/Day/utils/getModifiersFromProps.js.map +0 -1
  333. package/lib/components/Day/utils/getOutsideModifier.d.ts +0 -4
  334. package/lib/components/Day/utils/getOutsideModifier.js +0 -12
  335. package/lib/components/Day/utils/getOutsideModifier.js.map +0 -1
  336. package/lib/components/Day/utils/matchModifier.d.ts +0 -2
  337. package/lib/components/Day/utils/matchModifier.js +0 -80
  338. package/lib/components/Day/utils/matchModifier.js.map +0 -1
  339. package/lib/components/DayPicker/DayPicker.d.ts +0 -21
  340. package/lib/components/DayPicker/DayPicker.js +0 -74
  341. package/lib/components/DayPicker/DayPicker.js.map +0 -1
  342. package/lib/components/DayPicker/defaults/defaultClassNames.d.ts +0 -2
  343. package/lib/components/DayPicker/defaults/defaultClassNames.js +0 -32
  344. package/lib/components/DayPicker/defaults/defaultClassNames.js.map +0 -1
  345. package/lib/components/DayPicker/defaults/defaultLabels.d.ts +0 -2
  346. package/lib/components/DayPicker/defaults/defaultLabels.js +0 -24
  347. package/lib/components/DayPicker/defaults/defaultLabels.js.map +0 -1
  348. package/lib/components/DayPicker/defaults/defaultModifiers.d.ts +0 -2
  349. package/lib/components/DayPicker/defaults/defaultModifiers.js +0 -10
  350. package/lib/components/DayPicker/defaults/defaultModifiers.js.map +0 -1
  351. package/lib/components/DayPicker/defaults/defaultModifiersClassNames.d.ts +0 -2
  352. package/lib/components/DayPicker/defaults/defaultModifiersClassNames.js +0 -9
  353. package/lib/components/DayPicker/defaults/defaultModifiersClassNames.js.map +0 -1
  354. package/lib/components/DayPicker/defaults/defaultProps.d.ts +0 -2
  355. package/lib/components/DayPicker/defaults/defaultProps.js +0 -47
  356. package/lib/components/DayPicker/defaults/defaultProps.js.map +0 -1
  357. package/lib/components/DayPicker/defaults/index.d.ts +0 -5
  358. package/lib/components/DayPicker/defaults/index.js +0 -6
  359. package/lib/components/DayPicker/defaults/index.js.map +0 -1
  360. package/lib/components/DayPicker/index.d.ts +0 -2
  361. package/lib/components/DayPicker/index.js +0 -3
  362. package/lib/components/DayPicker/index.js.map +0 -1
  363. package/lib/components/DayPicker/utils/formatCaption.d.ts +0 -8
  364. package/lib/components/DayPicker/utils/formatCaption.js +0 -9
  365. package/lib/components/DayPicker/utils/formatCaption.js.map +0 -1
  366. package/lib/components/DayPicker/utils/formatDay.d.ts +0 -8
  367. package/lib/components/DayPicker/utils/formatDay.js +0 -9
  368. package/lib/components/DayPicker/utils/formatDay.js.map +0 -1
  369. package/lib/components/DayPicker/utils/formatWeekNumber.d.ts +0 -5
  370. package/lib/components/DayPicker/utils/formatWeekNumber.js +0 -8
  371. package/lib/components/DayPicker/utils/formatWeekNumber.js.map +0 -1
  372. package/lib/components/DayPicker/utils/formatWeekdayName.d.ts +0 -8
  373. package/lib/components/DayPicker/utils/formatWeekdayName.js +0 -10
  374. package/lib/components/DayPicker/utils/formatWeekdayName.js.map +0 -1
  375. package/lib/components/DayPicker/utils/getMonthFromProps.d.ts +0 -2
  376. package/lib/components/DayPicker/utils/getMonthFromProps.js +0 -17
  377. package/lib/components/DayPicker/utils/getMonthFromProps.js.map +0 -1
  378. package/lib/components/Head/Head.d.ts +0 -3
  379. package/lib/components/Head/Head.js +0 -11
  380. package/lib/components/Head/Head.js.map +0 -1
  381. package/lib/components/Head/index.js +0 -2
  382. package/lib/components/Head/index.js.map +0 -1
  383. package/lib/components/Head/utils/getWeekdays.d.ts +0 -6
  384. package/lib/components/Head/utils/getWeekdays.js +0 -15
  385. package/lib/components/Head/utils/getWeekdays.js.map +0 -1
  386. package/lib/components/Navigation/Navigation.d.ts +0 -3
  387. package/lib/components/Navigation/Navigation.js +0 -28
  388. package/lib/components/Navigation/Navigation.js.map +0 -1
  389. package/lib/components/Navigation/getNavigationComponent.d.ts +0 -12
  390. package/lib/components/Navigation/getNavigationComponent.js +0 -50
  391. package/lib/components/Navigation/getNavigationComponent.js.map +0 -1
  392. package/lib/components/Navigation/getNavigationComponent.test.d.ts +0 -0
  393. package/lib/components/Navigation/getNavigationComponent.test.js +0 -11
  394. package/lib/components/Navigation/getNavigationComponent.test.js.map +0 -1
  395. package/lib/components/Navigation/index.d.ts +0 -2
  396. package/lib/components/Navigation/index.js +0 -3
  397. package/lib/components/Navigation/index.js.map +0 -1
  398. package/lib/components/Navigation/utils/getPrevNextMonths.d.ts +0 -5
  399. package/lib/components/Navigation/utils/getPrevNextMonths.js +0 -20
  400. package/lib/components/Navigation/utils/getPrevNextMonths.js.map +0 -1
  401. package/lib/components/Navigation/utils/getPrevNextMonths.test.d.ts +0 -1
  402. package/lib/components/Navigation/utils/getPrevNextMonths.test.js +0 -44
  403. package/lib/components/Navigation/utils/getPrevNextMonths.test.js.map +0 -1
  404. package/lib/components/NextIcon/NextIcon.d.ts +0 -2
  405. package/lib/components/NextIcon/NextIcon.js +0 -6
  406. package/lib/components/NextIcon/NextIcon.js.map +0 -1
  407. package/lib/components/NextIcon/index.d.ts +0 -1
  408. package/lib/components/NextIcon/index.js +0 -2
  409. package/lib/components/NextIcon/index.js.map +0 -1
  410. package/lib/components/PrevIcon/PrevIcon.d.ts +0 -2
  411. package/lib/components/PrevIcon/PrevIcon.js +0 -6
  412. package/lib/components/PrevIcon/PrevIcon.js.map +0 -1
  413. package/lib/components/PrevIcon/index.d.ts +0 -1
  414. package/lib/components/PrevIcon/index.js +0 -2
  415. package/lib/components/PrevIcon/index.js.map +0 -1
  416. package/lib/components/Root/Root.d.ts +0 -3
  417. package/lib/components/Root/Root.js +0 -53
  418. package/lib/components/Root/Root.js.map +0 -1
  419. package/lib/components/Root/index.js +0 -2
  420. package/lib/components/Root/index.js.map +0 -1
  421. package/lib/components/Root/utils/getMonths.d.ts +0 -6
  422. package/lib/components/Root/utils/getMonths.js +0 -29
  423. package/lib/components/Root/utils/getMonths.js.map +0 -1
  424. package/lib/components/Root/utils/getMonths.test.d.ts +0 -1
  425. package/lib/components/Root/utils/getMonths.test.js +0 -41
  426. package/lib/components/Root/utils/getMonths.test.js.map +0 -1
  427. package/lib/components/Row/Row.d.ts +0 -3
  428. package/lib/components/Row/Row.js +0 -12
  429. package/lib/components/Row/Row.js.map +0 -1
  430. package/lib/components/Row/index.js +0 -2
  431. package/lib/components/Row/index.js.map +0 -1
  432. package/lib/components/Table/Table.d.ts +0 -3
  433. package/lib/components/Table/Table.js +0 -15
  434. package/lib/components/Table/Table.js.map +0 -1
  435. package/lib/components/Table/index.js +0 -2
  436. package/lib/components/Table/index.js.map +0 -1
  437. package/lib/components/Table/utils/getOutsideEndDays.d.ts +0 -2
  438. package/lib/components/Table/utils/getOutsideEndDays.js +0 -13
  439. package/lib/components/Table/utils/getOutsideEndDays.js.map +0 -1
  440. package/lib/components/Table/utils/getOutsideStartDays.d.ts +0 -2
  441. package/lib/components/Table/utils/getOutsideStartDays.js +0 -13
  442. package/lib/components/Table/utils/getOutsideStartDays.js.map +0 -1
  443. package/lib/components/Table/utils/getWeeks.d.ts +0 -13
  444. package/lib/components/Table/utils/getWeeks.js +0 -55
  445. package/lib/components/Table/utils/getWeeks.js.map +0 -1
  446. package/lib/components/index.d.ts +0 -10
  447. package/lib/components/index.js +0 -11
  448. package/lib/components/index.js.map +0 -1
  449. package/lib/hooks/index.d.ts +0 -2
  450. package/lib/hooks/index.js +0 -3
  451. package/lib/hooks/index.js.map +0 -1
  452. package/lib/hooks/useInput/index.js +0 -2
  453. package/lib/hooks/useInput/index.js.map +0 -1
  454. package/lib/hooks/useInput/useInput.d.ts +0 -22
  455. package/lib/hooks/useInput/useInput.js +0 -109
  456. package/lib/hooks/useInput/useInput.js.map +0 -1
  457. package/lib/hooks/useRange/addToRange.js +0 -25
  458. package/lib/hooks/useRange/addToRange.js.map +0 -1
  459. package/lib/hooks/useRange/index.d.ts +0 -2
  460. package/lib/hooks/useRange/index.js +0 -3
  461. package/lib/hooks/useRange/index.js.map +0 -1
  462. package/lib/hooks/useRange/useRange.d.ts +0 -14
  463. package/lib/hooks/useRange/useRange.js +0 -30
  464. package/lib/hooks/useRange/useRange.js.map +0 -1
  465. package/lib/index.d.ts +0 -3
  466. package/lib/index.js +0 -4
  467. package/lib/index.js.map +0 -1
  468. package/lib/types/CaptionProps.d.ts +0 -5
  469. package/lib/types/CaptionProps.js +0 -2
  470. package/lib/types/CaptionProps.js.map +0 -1
  471. package/lib/types/CustomizableComponents.d.ts +0 -12
  472. package/lib/types/CustomizableComponents.js +0 -2
  473. package/lib/types/CustomizableComponents.js.map +0 -1
  474. package/lib/types/DateFormatter.d.ts +0 -4
  475. package/lib/types/DateFormatter.js +0 -2
  476. package/lib/types/DateFormatter.js.map +0 -1
  477. package/lib/types/DayClickEventHandler.d.ts +0 -3
  478. package/lib/types/DayClickEventHandler.js +0 -2
  479. package/lib/types/DayClickEventHandler.js.map +0 -1
  480. package/lib/types/DayFocusEventHandler.d.ts +0 -3
  481. package/lib/types/DayFocusEventHandler.js +0 -2
  482. package/lib/types/DayFocusEventHandler.js.map +0 -1
  483. package/lib/types/DayKeyboardEventHandler.d.ts +0 -3
  484. package/lib/types/DayKeyboardEventHandler.js +0 -2
  485. package/lib/types/DayKeyboardEventHandler.js.map +0 -1
  486. package/lib/types/DayLabelFormatter.d.ts +0 -5
  487. package/lib/types/DayLabelFormatter.js +0 -2
  488. package/lib/types/DayLabelFormatter.js.map +0 -1
  489. package/lib/types/DayMouseEventHandler.d.ts +0 -3
  490. package/lib/types/DayMouseEventHandler.js +0 -2
  491. package/lib/types/DayMouseEventHandler.js.map +0 -1
  492. package/lib/types/DayPickerClassNames.d.ts +0 -4
  493. package/lib/types/DayPickerClassNames.js +0 -2
  494. package/lib/types/DayPickerClassNames.js.map +0 -1
  495. package/lib/types/DayPickerComponentProps.d.ts +0 -410
  496. package/lib/types/DayPickerComponentProps.js +0 -2
  497. package/lib/types/DayPickerComponentProps.js.map +0 -1
  498. package/lib/types/DayPickerProps.d.ts +0 -42
  499. package/lib/types/DayPickerProps.js +0 -2
  500. package/lib/types/DayPickerProps.js.map +0 -1
  501. package/lib/types/DayPickerStyles.d.ts +0 -5
  502. package/lib/types/DayPickerStyles.js +0 -2
  503. package/lib/types/DayPickerStyles.js.map +0 -1
  504. package/lib/types/DayProps.d.ts +0 -9
  505. package/lib/types/DayProps.js +0 -2
  506. package/lib/types/DayProps.js.map +0 -1
  507. package/lib/types/DayTouchEventHandler.d.ts +0 -3
  508. package/lib/types/DayTouchEventHandler.js +0 -2
  509. package/lib/types/DayTouchEventHandler.js.map +0 -1
  510. package/lib/types/DaysRange.d.ts +0 -4
  511. package/lib/types/DaysRange.js +0 -2
  512. package/lib/types/DaysRange.js.map +0 -1
  513. package/lib/types/DefaultModifier.d.ts +0 -1
  514. package/lib/types/DefaultModifier.js +0 -2
  515. package/lib/types/DefaultModifier.js.map +0 -1
  516. package/lib/types/HeadProps.d.ts +0 -5
  517. package/lib/types/HeadProps.js +0 -2
  518. package/lib/types/HeadProps.js.map +0 -1
  519. package/lib/types/LabelsFormatters.d.ts +0 -11
  520. package/lib/types/LabelsFormatters.js +0 -2
  521. package/lib/types/LabelsFormatters.js.map +0 -1
  522. package/lib/types/MatchAfter.d.ts +0 -6
  523. package/lib/types/MatchAfter.js +0 -2
  524. package/lib/types/MatchAfter.js.map +0 -1
  525. package/lib/types/MatchBefore.d.ts +0 -4
  526. package/lib/types/MatchBefore.js +0 -2
  527. package/lib/types/MatchBefore.js.map +0 -1
  528. package/lib/types/MatchDate.d.ts +0 -2
  529. package/lib/types/MatchDate.js +0 -2
  530. package/lib/types/MatchDate.js.map +0 -1
  531. package/lib/types/MatchDaysOfWeek.d.ts +0 -7
  532. package/lib/types/MatchDaysOfWeek.js +0 -2
  533. package/lib/types/MatchDaysOfWeek.js.map +0 -1
  534. package/lib/types/MatchFromTo.d.ts +0 -7
  535. package/lib/types/MatchFromTo.js +0 -2
  536. package/lib/types/MatchFromTo.js.map +0 -1
  537. package/lib/types/Matcher.d.ts +0 -10
  538. package/lib/types/Matcher.js +0 -2
  539. package/lib/types/Matcher.js.map +0 -1
  540. package/lib/types/Modifier.d.ts +0 -5
  541. package/lib/types/Modifier.js +0 -2
  542. package/lib/types/Modifier.js.map +0 -1
  543. package/lib/types/ModifiersClassNames.d.ts +0 -7
  544. package/lib/types/ModifiersClassNames.js +0 -2
  545. package/lib/types/ModifiersClassNames.js.map +0 -1
  546. package/lib/types/ModifiersMatchers.d.ts +0 -18
  547. package/lib/types/ModifiersMatchers.js +0 -2
  548. package/lib/types/ModifiersMatchers.js.map +0 -1
  549. package/lib/types/ModifiersStatus.d.ts +0 -19
  550. package/lib/types/ModifiersStatus.js +0 -2
  551. package/lib/types/ModifiersStatus.js.map +0 -1
  552. package/lib/types/ModifiersStyles.d.ts +0 -8
  553. package/lib/types/ModifiersStyles.js +0 -2
  554. package/lib/types/ModifiersStyles.js.map +0 -1
  555. package/lib/types/MonthChangeEventHandler.d.ts +0 -2
  556. package/lib/types/MonthChangeEventHandler.js +0 -2
  557. package/lib/types/MonthChangeEventHandler.js.map +0 -1
  558. package/lib/types/MonthKeyDownEventHandler.d.ts +0 -2
  559. package/lib/types/MonthKeyDownEventHandler.js +0 -2
  560. package/lib/types/MonthKeyDownEventHandler.js.map +0 -1
  561. package/lib/types/NavButtonLabelFormatter.d.ts +0 -5
  562. package/lib/types/NavButtonLabelFormatter.js +0 -2
  563. package/lib/types/NavButtonLabelFormatter.js.map +0 -1
  564. package/lib/types/NavigationProps.d.ts +0 -4
  565. package/lib/types/NavigationProps.js +0 -2
  566. package/lib/types/NavigationProps.js.map +0 -1
  567. package/lib/types/RootProps.d.ts +0 -4
  568. package/lib/types/RootProps.js +0 -2
  569. package/lib/types/RootProps.js.map +0 -1
  570. package/lib/types/RowProps.d.ts +0 -7
  571. package/lib/types/RowProps.js +0 -2
  572. package/lib/types/RowProps.js.map +0 -1
  573. package/lib/types/TableProps.d.ts +0 -5
  574. package/lib/types/TableProps.js +0 -2
  575. package/lib/types/TableProps.js.map +0 -1
  576. package/lib/types/UIElement.d.ts +0 -27
  577. package/lib/types/UIElement.js +0 -2
  578. package/lib/types/UIElement.js.map +0 -1
  579. package/lib/types/UseInput.d.ts +0 -8
  580. package/lib/types/UseInput.js +0 -2
  581. package/lib/types/UseInput.js.map +0 -1
  582. package/lib/types/UseInputOptions.d.ts +0 -5
  583. package/lib/types/UseInputOptions.js +0 -2
  584. package/lib/types/UseInputOptions.js.map +0 -1
  585. package/lib/types/WeekNumberFormatter.d.ts +0 -4
  586. package/lib/types/WeekNumberFormatter.js +0 -2
  587. package/lib/types/WeekNumberFormatter.js.map +0 -1
  588. package/lib/types/WeekNumberLabelFormatter.d.ts +0 -5
  589. package/lib/types/WeekNumberLabelFormatter.js +0 -2
  590. package/lib/types/WeekNumberLabelFormatter.js.map +0 -1
  591. package/lib/types/WeekNumberProps.d.ts +0 -6
  592. package/lib/types/WeekNumberProps.js +0 -2
  593. package/lib/types/WeekNumberProps.js.map +0 -1
  594. package/lib/types/WeekdayFormatter.d.ts +0 -4
  595. package/lib/types/WeekdayFormatter.js +0 -2
  596. package/lib/types/WeekdayFormatter.js.map +0 -1
  597. package/lib/types/WeekdayLabelFormatter.d.ts +0 -5
  598. package/lib/types/WeekdayLabelFormatter.js +0 -2
  599. package/lib/types/WeekdayLabelFormatter.js.map +0 -1
  600. package/lib/types/index.d.ts +0 -43
  601. package/lib/types/index.js +0 -44
  602. package/lib/types/index.js.map +0 -1
  603. package/src/components/Caption/Caption.tsx +0 -12
  604. package/src/components/Caption/getCaptionComponent.test.ts +0 -23
  605. package/src/components/Caption/getCaptionComponent.ts +0 -16
  606. package/src/components/Caption/index.ts +0 -2
  607. package/src/components/Day/Day.tsx +0 -32
  608. package/src/components/Day/getDayComponent.ts +0 -39
  609. package/src/components/Day/index.ts +0 -3
  610. package/src/components/Day/utils/createClassName.ts +0 -25
  611. package/src/components/Day/utils/createEventHandlers.ts +0 -111
  612. package/src/components/Day/utils/createStyle.ts +0 -21
  613. package/src/components/Day/utils/createTabIndex.ts +0 -27
  614. package/src/components/Day/utils/findModifiers.ts +0 -25
  615. package/src/components/Day/utils/getModifiers.ts +0 -47
  616. package/src/components/Day/utils/getModifiersFromProps.ts +0 -17
  617. package/src/components/Day/utils/getOutsideModifier.ts +0 -13
  618. package/src/components/Day/utils/matchModifier.ts +0 -84
  619. package/src/components/DayPicker/DayPicker.tsx +0 -81
  620. package/src/components/DayPicker/defaults/defaultClassNames.ts +0 -39
  621. package/src/components/DayPicker/defaults/defaultLabels.ts +0 -24
  622. package/src/components/DayPicker/defaults/defaultModifiers.ts +0 -11
  623. package/src/components/DayPicker/defaults/defaultModifiersClassNames.ts +0 -10
  624. package/src/components/DayPicker/defaults/defaultProps.ts +0 -49
  625. package/src/components/DayPicker/defaults/index.ts +0 -5
  626. package/src/components/DayPicker/index.ts +0 -2
  627. package/src/components/DayPicker/utils/formatCaption.ts +0 -12
  628. package/src/components/DayPicker/utils/formatDay.ts +0 -12
  629. package/src/components/DayPicker/utils/formatWeekNumber.ts +0 -7
  630. package/src/components/DayPicker/utils/formatWeekdayName.ts +0 -13
  631. package/src/components/DayPicker/utils/getMonthFromProps.tsx +0 -24
  632. package/src/components/Head/Head.tsx +0 -39
  633. package/src/components/Head/index.ts +0 -1
  634. package/src/components/Head/utils/getWeekdays.ts +0 -15
  635. package/src/components/Navigation/Navigation.tsx +0 -30
  636. package/src/components/Navigation/getNavigationComponent.test.ts +0 -10
  637. package/src/components/Navigation/getNavigationComponent.ts +0 -67
  638. package/src/components/Navigation/index.ts +0 -2
  639. package/src/components/Navigation/utils/getPrevNextMonths.test.ts +0 -51
  640. package/src/components/Navigation/utils/getPrevNextMonths.ts +0 -27
  641. package/src/components/NextIcon/NextIcon.tsx +0 -13
  642. package/src/components/NextIcon/index.ts +0 -1
  643. package/src/components/PrevIcon/PrevIcon.tsx +0 -13
  644. package/src/components/PrevIcon/index.ts +0 -1
  645. package/src/components/Root/Root.tsx +0 -83
  646. package/src/components/Root/index.ts +0 -1
  647. package/src/components/Root/utils/getMonths.test.ts +0 -45
  648. package/src/components/Root/utils/getMonths.ts +0 -33
  649. package/src/components/Row/Row.tsx +0 -48
  650. package/src/components/Row/index.ts +0 -1
  651. package/src/components/Table/Table.tsx +0 -37
  652. package/src/components/Table/index.ts +0 -1
  653. package/src/components/Table/utils/getOutsideEndDays.ts +0 -18
  654. package/src/components/Table/utils/getOutsideStartDays.ts +0 -18
  655. package/src/components/Table/utils/getWeeks.ts +0 -83
  656. package/src/components/index.ts +0 -10
  657. package/src/hooks/index.ts +0 -2
  658. package/src/hooks/useInput/index.ts +0 -1
  659. package/src/hooks/useInput/useInput.ts +0 -122
  660. package/src/hooks/useRange/addToRange.ts +0 -27
  661. package/src/hooks/useRange/index.ts +0 -2
  662. package/src/hooks/useRange/useRange.ts +0 -35
  663. package/src/style.css +0 -144
  664. package/src/types/CaptionProps.ts +0 -6
  665. package/src/types/CustomizableComponents.ts +0 -13
  666. package/src/types/DateFormatter.ts +0 -6
  667. package/src/types/DayClickEventHandler.ts +0 -7
  668. package/src/types/DayFocusEventHandler.ts +0 -7
  669. package/src/types/DayKeyboardEventHandler.ts +0 -7
  670. package/src/types/DayLabelFormatter.ts +0 -10
  671. package/src/types/DayMouseEventHandler.ts +0 -7
  672. package/src/types/DayPickerClassNames.ts +0 -5
  673. package/src/types/DayPickerComponentProps.ts +0 -437
  674. package/src/types/DayPickerProps.ts +0 -48
  675. package/src/types/DayPickerStyles.ts +0 -5
  676. package/src/types/DayProps.ts +0 -10
  677. package/src/types/DayTouchEventHandler.ts +0 -7
  678. package/src/types/DaysRange.ts +0 -1
  679. package/src/types/DefaultModifier.ts +0 -8
  680. package/src/types/HeadProps.ts +0 -6
  681. package/src/types/LabelsFormatters.ts +0 -17
  682. package/src/types/MatchAfter.ts +0 -4
  683. package/src/types/MatchBefore.ts +0 -2
  684. package/src/types/MatchDate.ts +0 -2
  685. package/src/types/MatchDaysOfWeek.ts +0 -5
  686. package/src/types/MatchFromTo.ts +0 -4
  687. package/src/types/Matcher.ts +0 -18
  688. package/src/types/Modifier.ts +0 -6
  689. package/src/types/ModifiersClassNames.ts +0 -8
  690. package/src/types/ModifiersMatchers.ts +0 -19
  691. package/src/types/ModifiersStatus.ts +0 -20
  692. package/src/types/ModifiersStyles.ts +0 -8
  693. package/src/types/MonthChangeEventHandler.ts +0 -4
  694. package/src/types/MonthKeyDownEventHandler.ts +0 -4
  695. package/src/types/NavButtonLabelFormatter.ts +0 -9
  696. package/src/types/NavigationProps.ts +0 -5
  697. package/src/types/RootProps.ts +0 -5
  698. package/src/types/RowProps.ts +0 -9
  699. package/src/types/TableProps.ts +0 -6
  700. package/src/types/UIElement.ts +0 -33
  701. package/src/types/UseInput.ts +0 -9
  702. package/src/types/UseInputOptions.ts +0 -6
  703. package/src/types/WeekNumberFormatter.ts +0 -6
  704. package/src/types/WeekNumberLabelFormatter.ts +0 -9
  705. package/src/types/WeekNumberProps.ts +0 -7
  706. package/src/types/WeekdayFormatter.ts +0 -7
  707. package/src/types/WeekdayLabelFormatter.ts +0 -9
  708. package/src/types/index.ts +0 -43
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014-2021 Giampaolo Bellavite <io@gpbl.dev>
3
+ Copyright (c) 2014-2021 Giampaolo Bellavite <io@gpbl.dev> and contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,42 +1,29 @@
1
- # DayPicker
1
+ # React DayPicker (beta)
2
2
 
3
- DayPicker is a reusable date picker component for [React](https://reactjs.org).
3
+ DayPicker is a date picker component for [React](https://reactjs.org).
4
4
 
5
5
  ```bash
6
6
  $ npm install react-day-picker@next
7
7
  ```
8
8
 
9
- ### v8 is in beta
9
+ ### Beta version ⚠️
10
10
 
11
- ⚠️ This branch is for the next major version 8 – which is currently in development
12
- and not ready for production. For the stable version see the [**v7
13
- branch**](https://github.com/gpbl/react-day-picker/tree/v7).
11
+ The [**master branch**](https://github.com/gpbl/react-day-picker/tree/master) is for the next major version 8 – which is currently in development
12
+ and not ready for production. For the stable version see the [**v7 branch**](https://github.com/gpbl/react-day-picker/tree/v7).
14
13
 
15
14
  ## Main features
16
15
 
17
- - depends on [date-fns](http://date-fns.org) as date library
18
- - not opinionated, extensible user interface
19
- - support for
20
- [ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA)
21
- - localizable
22
- - incomplete "Main features" list
16
+ - ☀️ select days, ranges or whatever
17
+ - 🗓 create multiple calendars
18
+ - ♿️ complete [ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) support
19
+ - ➡️ keyboard navigation
20
+ - 🌎 localizable in any language
21
+ - 🎨 easy to style and customize
22
+ - 🤖 native Typescript support
23
+ - 📄 easy integration with input elements
24
+ - 🧘‍♀️ using [date-fns](http://date-fns.org) as date library
23
25
 
24
26
  ## Documentation
25
27
 
26
28
  - [v7 website (current version)](http://react-day-picker.js.org)
27
29
  - [v8 website (beta)](http://react-day-picker-next.netlify.app)
28
-
29
- ## Example
30
-
31
- ```jsx showOutput
32
- function Example() {
33
- const [selected, setSelected] = useState();
34
-
35
- const handleDayClick = (day, { selected }) => {
36
- if (!selected) setSelected(day);
37
- else setSelected();
38
- };
39
-
40
- return <DayPicker selected={selected} onDayClick={handleDayClick} />;
41
- }
42
- ```
@@ -0,0 +1,89 @@
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
+ * - `mode="custom"`: implement your own selection mode with `onDayClick`.
40
+ *
41
+ * These selection modes should cover the most common use cases. In case you
42
+ * need a more refined way of selecting days, use `mode="custom"`. Use the
43
+ * `selected` props and add the day event handlers to add/remove days from the
44
+ * selection.
45
+ *
46
+ * ### Modifiers
47
+ *
48
+ * A _modifier_ represents different styles or states for the days displayed in
49
+ * the calendar (like "selected" or "disabled"). Define custom modifiers using
50
+ * the `modifiers` prop.
51
+ *
52
+ * ### Formatters and custom component
53
+ *
54
+ * You can customize how the content is displayed in the date picker by using
55
+ * either the formatters or replacing the internal components.
56
+ *
57
+ * For the most common cases you want to use the `formatters` prop to change how
58
+ * the content is formatted in the calendar. Use the `components` prop to
59
+ * replace the internal components, like the navigation icons.
60
+ *
61
+ * ### Styling
62
+ *
63
+ * DayPicker comes with a default, basic style in `react-day-picker/style` – use
64
+ * it as template for your own style.
65
+ *
66
+ * If you are using CSS modules, pass the imported styles object the
67
+ * `classNames` props.
68
+ *
69
+ * You can also style the elements via inline-styles using the `styles` prop.
70
+ *
71
+ * ### Form fields
72
+ *
73
+ * If you need to bind the date picker to a form field, you can use the
74
+ * `useInput` hooks for a basic behavior. See the `useInput` source as an
75
+ * example to bind the date picker with form fields.
76
+ *
77
+ * ### Localization
78
+ *
79
+ * To localize DayPicker, import the locale from `date-fns` package and use the
80
+ * `locale` prop.
81
+ *
82
+ * For example, to use Spanish locale:
83
+ *
84
+ * ```
85
+ * import es from 'date-fns/locale/es';
86
+ * <DayPicker locale={es} />
87
+ * ```
88
+ */
89
+ export declare function DayPicker(props: DayPickerProps | DayPickerSingleProps | DayPickerMultipleProps | DayPickerRangeProps | DayPickerCustomProps): JSX.Element;
@@ -0,0 +1,98 @@
1
+ import { __assign } from './_virtual/_tslib.js';
2
+ import React from 'react';
3
+ import { Root } from './components/Root/Root.js';
4
+ import { RootProvider } from './contexts/RootProvider.js';
5
+
6
+ /**
7
+ * DayPicker render a date picker component to let users pick dates from a
8
+ * calendar. See http://react-day-picker.js.org for updated documentation and
9
+ * examples.
10
+ *
11
+ * ### Customization
12
+ *
13
+ * DayPicker offers different customization props. For example,
14
+ *
15
+ * - show multiple months using `numberOfMonths`
16
+ * - display a dropdown to navigate the months via `captionLayout`
17
+ * - display the week numbers with `showWeekNumbers`
18
+ * - disable or hide days with `disabled` or `hidden`
19
+ *
20
+ * ### Controlling the months
21
+ *
22
+ * Change the initially displayed month using the `defaultMonth` prop. The
23
+ * displayed months are controlled by DayPicker and stored in its internal
24
+ * state. To control the months yourself, use `month` instead of `defaultMonth`
25
+ * and use the `onMonthChange` event to set it.
26
+ *
27
+ * To limit the months the user can navigate to, use
28
+ * `fromDate`/`fromMonth`/`fromYear` or `toDate`/`toMonth`/`toYear`.
29
+ *
30
+ * ### Selection modes
31
+ *
32
+ * DayPicker supports different selection mode that can be toggled using the
33
+ * `mode` prop:
34
+ *
35
+ * - `mode="single"`: only one day can be selected. Use `required` to make the
36
+ * selection required. Use the `onSelect` event handler to get the selected
37
+ * days.
38
+ * - `mode="multiple"`: users can select one or more days. Limit the amount of
39
+ * days that can be selected with the `min` or the `max` props.
40
+ * - `mode="range"`: users can select a range of days. Limit the amount of days
41
+ * in the range with the `min` or the `max` props.
42
+ * - `mode="custom"`: implement your own selection mode with `onDayClick`.
43
+ *
44
+ * These selection modes should cover the most common use cases. In case you
45
+ * need a more refined way of selecting days, use `mode="custom"`. Use the
46
+ * `selected` props and add the day event handlers to add/remove days from the
47
+ * selection.
48
+ *
49
+ * ### Modifiers
50
+ *
51
+ * A _modifier_ represents different styles or states for the days displayed in
52
+ * the calendar (like "selected" or "disabled"). Define custom modifiers using
53
+ * the `modifiers` prop.
54
+ *
55
+ * ### Formatters and custom component
56
+ *
57
+ * You can customize how the content is displayed in the date picker by using
58
+ * either the formatters or replacing the internal components.
59
+ *
60
+ * For the most common cases you want to use the `formatters` prop to change how
61
+ * the content is formatted in the calendar. Use the `components` prop to
62
+ * replace the internal components, like the navigation icons.
63
+ *
64
+ * ### Styling
65
+ *
66
+ * DayPicker comes with a default, basic style in `react-day-picker/style` – use
67
+ * it as template for your own style.
68
+ *
69
+ * If you are using CSS modules, pass the imported styles object the
70
+ * `classNames` props.
71
+ *
72
+ * You can also style the elements via inline-styles using the `styles` prop.
73
+ *
74
+ * ### Form fields
75
+ *
76
+ * If you need to bind the date picker to a form field, you can use the
77
+ * `useInput` hooks for a basic behavior. See the `useInput` source as an
78
+ * example to bind the date picker with form fields.
79
+ *
80
+ * ### Localization
81
+ *
82
+ * To localize DayPicker, import the locale from `date-fns` package and use the
83
+ * `locale` prop.
84
+ *
85
+ * For example, to use Spanish locale:
86
+ *
87
+ * ```
88
+ * import es from 'date-fns/locale/es';
89
+ * <DayPicker locale={es} />
90
+ * ```
91
+ */
92
+ function DayPicker(props) {
93
+ return (React.createElement(RootProvider, __assign({}, props),
94
+ React.createElement(Root, null)));
95
+ }
96
+
97
+ export { DayPicker };
98
+ //# sourceMappingURL=DayPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DayPicker.js","sources":["../src/DayPicker.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n DayPickerCustomProps,\n DayPickerMultipleProps,\n DayPickerProps,\n DayPickerRangeProps,\n DayPickerSingleProps\n} from './types';\n\nimport { Root } from './components/Root';\nimport { RootProvider } from './contexts/RootProvider';\n\n/**\n * DayPicker render a date picker component to let users pick dates from a\n * calendar. See http://react-day-picker.js.org for updated documentation and\n * examples.\n *\n * ### Customization\n *\n * DayPicker offers different customization props. For example,\n *\n * - show multiple months using `numberOfMonths`\n * - display a dropdown to navigate the months via `captionLayout`\n * - display the week numbers with `showWeekNumbers`\n * - disable or hide days with `disabled` or `hidden`\n *\n * ### Controlling the months\n *\n * Change the initially displayed month using the `defaultMonth` prop. The\n * displayed months are controlled by DayPicker and stored in its internal\n * state. To control the months yourself, use `month` instead of `defaultMonth`\n * and use the `onMonthChange` event to set it.\n *\n * To limit the months the user can navigate to, use\n * `fromDate`/`fromMonth`/`fromYear` or `toDate`/`toMonth`/`toYear`.\n *\n * ### Selection modes\n *\n * DayPicker supports different selection mode that can be toggled using the\n * `mode` prop:\n *\n * - `mode=\"single\"`: only one day can be selected. Use `required` to make the\n * selection required. Use the `onSelect` event handler to get the selected\n * days.\n * - `mode=\"multiple\"`: users can select one or more days. Limit the amount of\n * days that can be selected with the `min` or the `max` props.\n * - `mode=\"range\"`: users can select a range of days. Limit the amount of days\n * in the range with the `min` or the `max` props.\n * - `mode=\"custom\"`: implement your own selection mode with `onDayClick`.\n *\n * These selection modes should cover the most common use cases. In case you\n * need a more refined way of selecting days, use `mode=\"custom\"`. Use the\n * `selected` props and add the day event handlers to add/remove days from the\n * selection.\n *\n * ### Modifiers\n *\n * A _modifier_ represents different styles or states for the days displayed in\n * the calendar (like \"selected\" or \"disabled\"). Define custom modifiers using\n * the `modifiers` prop.\n *\n * ### Formatters and custom component\n *\n * You can customize how the content is displayed in the date picker by using\n * either the formatters or replacing the internal components.\n *\n * For the most common cases you want to use the `formatters` prop to change how\n * the content is formatted in the calendar. Use the `components` prop to\n * replace the internal components, like the navigation icons.\n *\n * ### Styling\n *\n * DayPicker comes with a default, basic style in `react-day-picker/style` – use\n * it as template for your own style.\n *\n * If you are using CSS modules, pass the imported styles object the\n * `classNames` props.\n *\n * You can also style the elements via inline-styles using the `styles` prop.\n *\n * ### Form fields\n *\n * If you need to bind the date picker to a form field, you can use the\n * `useInput` hooks for a basic behavior. See the `useInput` source as an\n * example to bind the date picker with form fields.\n *\n * ### Localization\n *\n * To localize DayPicker, import the locale from `date-fns` package and use the\n * `locale` prop.\n *\n * For example, to use Spanish locale:\n *\n * ```\n * import es from 'date-fns/locale/es';\n * <DayPicker locale={es} />\n * ```\n */\nexport function DayPicker(\n props:\n | DayPickerProps\n | DayPickerSingleProps\n | DayPickerMultipleProps\n | DayPickerRangeProps\n | DayPickerCustomProps\n): JSX.Element {\n return (\n <RootProvider {...props}>\n <Root />\n </RootProvider>\n );\n}\n"],"names":[],"mappings":";;;;;AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAsFgB,SAAS,CACvB,KAKwB;IAExB,QACE,oBAAC,YAAY,eAAK,KAAK;QACrB,oBAAC,IAAI,OAAG,CACK,EACf;AACJ;;;;"}
@@ -0,0 +1,50 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+
16
+ var __assign = function() {
17
+ __assign = Object.assign || function __assign(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
21
+ }
22
+ return t;
23
+ };
24
+ return __assign.apply(this, arguments);
25
+ };
26
+
27
+ function __rest(s, e) {
28
+ var t = {};
29
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
+ t[p] = s[p];
31
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
+ t[p[i]] = s[p[i]];
35
+ }
36
+ return t;
37
+ }
38
+
39
+ function __spreadArray(to, from, pack) {
40
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
41
+ if (ar || !(i in from)) {
42
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
43
+ ar[i] = from[i];
44
+ }
45
+ }
46
+ return to.concat(ar || Array.prototype.slice.call(from));
47
+ }
48
+
49
+ export { __assign, __rest, __spreadArray };
50
+ //# sourceMappingURL=_tslib.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "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-label" | "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" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "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>>;
@@ -0,0 +1,23 @@
1
+ import { __assign } from '../../_virtual/_tslib.js';
2
+ import React from 'react';
3
+ import { useDayPicker } from '../../contexts/DayPicker/useDayPicker.js';
4
+
5
+ /**
6
+ * Render a button HTML element applying the reset class name.
7
+ */
8
+ var Button = React.forwardRef(function (props, ref) {
9
+ var _a = useDayPicker(), classNames = _a.classNames, styles = _a.styles;
10
+ var classNamesArr = [classNames.button_reset, classNames.button];
11
+ if (props.className) {
12
+ classNamesArr.push(props.className);
13
+ }
14
+ var className = classNamesArr.join(' ');
15
+ var style = __assign(__assign({}, styles.button_reset), styles.button);
16
+ if (props.style) {
17
+ Object.assign(style, props.style);
18
+ }
19
+ return (React.createElement("button", __assign({}, props, { ref: ref, type: "button", className: className, style: style })));
20
+ });
21
+
22
+ export { Button };
23
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import React from 'react';\n\nimport { useDayPicker } from '../../contexts/DayPicker';\n\n/** The props for the [[Button]] component. */\nexport type ButtonProps = React.HTMLProps<HTMLButtonElement>;\n\n/**\n * Render a button HTML element applying the reset class name.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref) => {\n const { classNames, styles } = useDayPicker();\n\n const classNamesArr = [classNames.button_reset, classNames.button];\n if (props.className) {\n classNamesArr.push(props.className);\n }\n const className = classNamesArr.join(' ');\n\n const style = { ...styles.button_reset, ...styles.button };\n if (props.style) {\n Object.assign(style, props.style);\n }\n\n return (\n <button\n {...props}\n ref={ref}\n type=\"button\"\n className={className}\n style={style}\n />\n );\n }\n);\n"],"names":[],"mappings":";;;;AAOA;;;IAGa,MAAM,GAAG,KAAK,CAAC,UAAU,CACpC,UAAC,KAAK,EAAE,GAAG;IACH,IAAA,KAAyB,YAAY,EAAE,EAArC,UAAU,gBAAA,EAAE,MAAM,YAAmB,CAAC;IAE9C,IAAM,aAAa,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACnE,IAAI,KAAK,CAAC,SAAS,EAAE;QACnB,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;KACrC;IACD,IAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE1C,IAAM,KAAK,yBAAQ,MAAM,CAAC,YAAY,GAAK,MAAM,CAAC,MAAM,CAAE,CAAC;IAC3D,IAAI,KAAK,CAAC,KAAK,EAAE;QACf,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;KACnC;IAED,QACE,2CACM,KAAK,IACT,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,IACZ,EACF;AACJ,CAAC;;;;"}
@@ -0,0 +1 @@
1
+ export * from './Button';
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ /** Represent the props of the [[Caption]] component. */
3
+ export interface CaptionProps {
4
+ /** The month where the caption is displayed. */
5
+ displayMonth: Date;
6
+ }
7
+ /**
8
+ * The layout of the caption:
9
+ *
10
+ * - `dropdown` - display a month / year dropdown
11
+ * - `buttons` - display previous / next month button.
12
+ */
13
+ export declare type CaptionLayout = 'dropdown' | 'buttons';
14
+ /**
15
+ * Render the caption of a month, which includes title and navigation buttons.
16
+ * The caption has a different layout when setting the `numberOfMonths` prop.
17
+ */
18
+ export declare function Caption(props: CaptionProps): JSX.Element;
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import { isSameMonth } from 'date-fns';
3
+ import { useDayPicker } from '../../contexts/DayPicker/useDayPicker.js';
4
+ import '../../contexts/Navigation/NavigationContext.js';
5
+ import { useNavigation } from '../../contexts/Navigation/useNavigation.js';
6
+ import { MonthsDropdown } from '../MonthsDropdown/MonthsDropdown.js';
7
+ import { Navigation } from '../Navigation/Navigation.js';
8
+ import { YearsDropdown } from '../YearsDropdown/YearsDropdown.js';
9
+
10
+ /**
11
+ * Render the caption of a month, which includes title and navigation buttons.
12
+ * The caption has a different layout when setting the `numberOfMonths` prop.
13
+ */
14
+ function Caption(props) {
15
+ var _a;
16
+ var displayMonth = props.displayMonth;
17
+ var context = useDayPicker();
18
+ var classNames = context.classNames, numberOfMonths = context.numberOfMonths, disableNavigation = context.disableNavigation, styles = context.styles, captionLayout = context.captionLayout, onMonthChange = context.onMonthChange, dir = context.dir, CaptionLabel = context.components.CaptionLabel;
19
+ var _b = useNavigation(), previousMonth = _b.previousMonth, nextMonth = _b.nextMonth, goToMonth = _b.goToMonth, displayMonths = _b.displayMonths;
20
+ var handlePreviousClick = function (e) {
21
+ if (!previousMonth)
22
+ return;
23
+ goToMonth(previousMonth);
24
+ onMonthChange === null || onMonthChange === void 0 ? void 0 : onMonthChange(previousMonth);
25
+ };
26
+ var handleNextClick = function (e) {
27
+ if (!nextMonth)
28
+ return;
29
+ goToMonth(nextMonth);
30
+ onMonthChange === null || onMonthChange === void 0 ? void 0 : onMonthChange(nextMonth);
31
+ };
32
+ var handleMonthChange = function (newMonth) {
33
+ goToMonth(newMonth);
34
+ onMonthChange === null || onMonthChange === void 0 ? void 0 : onMonthChange(newMonth);
35
+ };
36
+ var displayIndex = displayMonths.findIndex(function (month) {
37
+ return isSameMonth(displayMonth, month);
38
+ });
39
+ var isFirst = displayIndex === 0;
40
+ var isLast = displayIndex === displayMonths.length - 1;
41
+ if (dir === 'rtl') {
42
+ _a = [isFirst, isLast], isLast = _a[0], isFirst = _a[1];
43
+ }
44
+ var captionLabel = React.createElement(CaptionLabel, { displayMonth: displayMonth });
45
+ var hideNext = numberOfMonths > 1 && (isFirst || !isLast);
46
+ var hidePrevious = numberOfMonths > 1 && (isLast || !isFirst);
47
+ return (React.createElement("div", { className: classNames.caption, style: styles.caption },
48
+ disableNavigation && captionLabel,
49
+ !disableNavigation && (React.createElement(React.Fragment, null, captionLayout === 'dropdown' ? (React.createElement("div", { className: classNames.caption_dropdowns, style: styles.caption_dropdowns },
50
+ React.createElement(MonthsDropdown, { onChange: handleMonthChange, displayMonth: displayMonth }),
51
+ React.createElement(YearsDropdown, { onChange: handleMonthChange, displayMonth: displayMonth }))) : (React.createElement(React.Fragment, null,
52
+ React.createElement(CaptionLabel, { displayMonth: displayMonth }),
53
+ React.createElement(Navigation, { displayMonth: displayMonth, hideNext: hideNext, hidePrevious: hidePrevious, nextMonth: nextMonth, previousMonth: previousMonth, onPreviousClick: handlePreviousClick, onNextClick: handleNextClick })))))));
54
+ }
55
+
56
+ export { Caption };
57
+ //# sourceMappingURL=Caption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Caption.js","sources":["../../../src/components/Caption/Caption.tsx"],"sourcesContent":["import React from 'react';\n\nimport { isSameMonth } from 'date-fns';\n\nimport { useDayPicker } from '../../contexts/DayPicker';\nimport { useNavigation } from '../../contexts/Navigation';\nimport { MonthsDropdown } from '../MonthsDropdown';\nimport { Navigation } from '../Navigation';\nimport { YearsDropdown } from '../YearsDropdown';\nimport { MonthChangeEventHandler } from '../../types/EventHandlers';\n\n/** Represent the props of the [[Caption]] component. */\nexport interface CaptionProps {\n /** The month where the caption is displayed. */\n displayMonth: Date;\n}\n\n/**\n * The layout of the caption:\n *\n * - `dropdown` - display a month / year dropdown\n * - `buttons` - display previous / next month button.\n */\nexport type CaptionLayout = 'dropdown' | 'buttons';\n\n/**\n * Render the caption of a month, which includes title and navigation buttons.\n * The caption has a different layout when setting the `numberOfMonths` prop.\n */\nexport function Caption(props: CaptionProps): JSX.Element {\n const { displayMonth } = props;\n const context = useDayPicker();\n const {\n classNames,\n numberOfMonths,\n disableNavigation,\n styles,\n captionLayout,\n onMonthChange,\n dir,\n components: { CaptionLabel }\n } = context;\n\n const { previousMonth, nextMonth, goToMonth, displayMonths } =\n useNavigation();\n\n const handlePreviousClick: React.MouseEventHandler = (e) => {\n if (!previousMonth) return;\n goToMonth(previousMonth);\n onMonthChange?.(previousMonth);\n };\n\n const handleNextClick: React.MouseEventHandler = (e) => {\n if (!nextMonth) return;\n goToMonth(nextMonth);\n onMonthChange?.(nextMonth);\n };\n\n const handleMonthChange: MonthChangeEventHandler = (newMonth) => {\n goToMonth(newMonth);\n onMonthChange?.(newMonth);\n };\n\n const displayIndex = displayMonths.findIndex((month) =>\n isSameMonth(displayMonth, month)\n );\n let isFirst = displayIndex === 0;\n let isLast = displayIndex === displayMonths.length - 1;\n if (dir === 'rtl') {\n [isLast, isFirst] = [isFirst, isLast];\n }\n\n const captionLabel = <CaptionLabel displayMonth={displayMonth} />;\n const hideNext = numberOfMonths > 1 && (isFirst || !isLast);\n const hidePrevious = numberOfMonths > 1 && (isLast || !isFirst);\n\n return (\n <div className={classNames.caption} style={styles.caption}>\n {disableNavigation && captionLabel}\n {!disableNavigation && (\n <>\n {captionLayout === 'dropdown' ? (\n <div\n className={classNames.caption_dropdowns}\n style={styles.caption_dropdowns}\n >\n <MonthsDropdown\n onChange={handleMonthChange}\n displayMonth={displayMonth}\n />\n <YearsDropdown\n onChange={handleMonthChange}\n displayMonth={displayMonth}\n />\n </div>\n ) : (\n <>\n <CaptionLabel displayMonth={displayMonth} />\n <Navigation\n displayMonth={displayMonth}\n hideNext={hideNext}\n hidePrevious={hidePrevious}\n nextMonth={nextMonth}\n previousMonth={previousMonth}\n onPreviousClick={handlePreviousClick}\n onNextClick={handleNextClick}\n />\n </>\n )}\n </>\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAyBA;;;;SAIgB,OAAO,CAAC,KAAmB;;IACjC,IAAA,YAAY,GAAK,KAAK,aAAV,CAAW;IAC/B,IAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAE7B,IAAA,UAAU,GAQR,OAAO,WARC,EACV,cAAc,GAOZ,OAAO,eAPK,EACd,iBAAiB,GAMf,OAAO,kBANQ,EACjB,MAAM,GAKJ,OAAO,OALH,EACN,aAAa,GAIX,OAAO,cAJI,EACb,aAAa,GAGX,OAAO,cAHI,EACb,GAAG,GAED,OAAO,IAFN,EACW,YAAY,GACxB,OAAO,wBADiB,CAChB;IAEN,IAAA,KACJ,aAAa,EAAE,EADT,aAAa,mBAAA,EAAE,SAAS,eAAA,EAAE,SAAS,eAAA,EAAE,aAAa,mBACzC,CAAC;IAElB,IAAM,mBAAmB,GAA4B,UAAC,CAAC;QACrD,IAAI,CAAC,aAAa;YAAE,OAAO;QAC3B,SAAS,CAAC,aAAa,CAAC,CAAC;QACzB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,aAAa,CAAC,CAAC;KAChC,CAAC;IAEF,IAAM,eAAe,GAA4B,UAAC,CAAC;QACjD,IAAI,CAAC,SAAS;YAAE,OAAO;QACvB,SAAS,CAAC,SAAS,CAAC,CAAC;QACrB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,SAAS,CAAC,CAAC;KAC5B,CAAC;IAEF,IAAM,iBAAiB,GAA4B,UAAC,QAAQ;QAC1D,SAAS,CAAC,QAAQ,CAAC,CAAC;QACpB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,QAAQ,CAAC,CAAC;KAC3B,CAAC;IAEF,IAAM,YAAY,GAAG,aAAa,CAAC,SAAS,CAAC,UAAC,KAAK;QACjD,OAAA,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC;KAAA,CACjC,CAAC;IACF,IAAI,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC;IACjC,IAAI,MAAM,GAAG,YAAY,KAAK,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvD,IAAI,GAAG,KAAK,KAAK,EAAE;QACjB,KAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,EAApC,MAAM,QAAA,EAAE,OAAO,QAAA,CAAsB;KACvC;IAED,IAAM,YAAY,GAAG,oBAAC,YAAY,IAAC,YAAY,EAAE,YAAY,GAAI,CAAC;IAClE,IAAM,QAAQ,GAAG,cAAc,GAAG,CAAC,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5D,IAAM,YAAY,GAAG,cAAc,GAAG,CAAC,KAAK,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC;IAEhE,QACE,6BAAK,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO;QACtD,iBAAiB,IAAI,YAAY;QACjC,CAAC,iBAAiB,KACjB,0CACG,aAAa,KAAK,UAAU,IAC3B,6BACE,SAAS,EAAE,UAAU,CAAC,iBAAiB,EACvC,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAE/B,oBAAC,cAAc,IACb,QAAQ,EAAE,iBAAiB,EAC3B,YAAY,EAAE,YAAY,GAC1B;YACF,oBAAC,aAAa,IACZ,QAAQ,EAAE,iBAAiB,EAC3B,YAAY,EAAE,YAAY,GAC1B,CACE,KAEN;YACE,oBAAC,YAAY,IAAC,YAAY,EAAE,YAAY,GAAI;YAC5C,oBAAC,UAAU,IACT,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,mBAAmB,EACpC,WAAW,EAAE,eAAe,GAC5B,CACD,CACJ,CACA,CACJ,CACG,EACN;AACJ;;;;"}
@@ -0,0 +1 @@
1
+ export * from './Caption';
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { useDayPicker } from '../../contexts/DayPicker/useDayPicker.js';
3
+
4
+ /** Render the caption for the displayed month. This component is used when `captionLayout="buttons"`. */
5
+ function CaptionLabel(props) {
6
+ var _a = useDayPicker(), locale = _a.locale, classNames = _a.classNames, styles = _a.styles, formatCaption = _a.formatters.formatCaption;
7
+ return (React.createElement("div", { key: "caption", className: classNames.caption_label, style: styles.caption_label, "aria-live": "polite", "aria-atomic": "true" }, formatCaption(props.displayMonth, { locale: locale })));
8
+ }
9
+
10
+ export { CaptionLabel };
11
+ //# sourceMappingURL=CaptionLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CaptionLabel.js","sources":["../../../src/components/CaptionLabel/CaptionLabel.tsx"],"sourcesContent":["import React from 'react';\n\nimport { useDayPicker } from '../../contexts/DayPicker';\n\n/** The props for the [[CaptionLabel]] component. */\nexport interface CaptionLabelProps {\n /** The month where the caption is displayed. */\n displayMonth: Date;\n}\n\n/** Render the caption for the displayed month. This component is used when `captionLayout=\"buttons\"`. */\nexport function CaptionLabel(props: CaptionLabelProps): JSX.Element {\n const {\n locale,\n classNames,\n styles,\n formatters: { formatCaption }\n } = useDayPicker();\n return (\n <div\n key=\"caption\"\n className={classNames.caption_label}\n style={styles.caption_label}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {formatCaption(props.displayMonth, { locale })}\n </div>\n );\n}\n"],"names":[],"mappings":";;;AAUA;SACgB,YAAY,CAAC,KAAwB;IAC7C,IAAA,KAKF,YAAY,EAAE,EAJhB,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,MAAM,YAAA,EACQ,aAAa,8BACX,CAAC;IACnB,QACE,6BACE,GAAG,EAAC,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,aAAa,EACnC,KAAK,EAAE,MAAM,CAAC,aAAa,eACjB,QAAQ,iBACN,MAAM,IAEjB,aAAa,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAC1C,EACN;AACJ;;;;"}
@@ -0,0 +1 @@
1
+ export * from './CaptionLabel';
@@ -0,0 +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;
@@ -0,0 +1,24 @@
1
+ import { __assign } from '../../_virtual/_tslib.js';
2
+ import React from 'react';
3
+ import { Button } from '../Button/Button.js';
4
+ import { useDay } from './hooks/useDay.js';
5
+
6
+ /**
7
+ * The content of a day cell – as a button or span element according to its
8
+ * modifiers.
9
+ */
10
+ function Day(props) {
11
+ var buttonRef = React.useRef(null);
12
+ var day = useDay(props.date, props.displayMonth, buttonRef);
13
+ var buttonProps = day.buttonProps, nonInteractiveProps = day.nonInteractiveProps;
14
+ if (!buttonProps && !nonInteractiveProps) {
15
+ return React.createElement(React.Fragment, null);
16
+ }
17
+ if (nonInteractiveProps) {
18
+ return React.createElement("div", __assign({}, nonInteractiveProps));
19
+ }
20
+ return React.createElement(Button, __assign({ ref: buttonRef }, buttonProps));
21
+ }
22
+
23
+ export { Day };
24
+ //# sourceMappingURL=Day.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Day.js","sources":["../../../src/components/Day/Day.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '../Button';\n\nimport { useDay } from './hooks/useDay';\n\n/** Represent the props used by the [[Day]] component. */\nexport interface DayProps {\n /** The month where the date is displayed. */\n displayMonth: Date;\n /** The date to render. */\n date: Date;\n}\n\n/**\n * The content of a day cell – as a button or span element according to its\n * modifiers.\n */\nexport function Day(props: DayProps): JSX.Element {\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n\n const day = useDay(props.date, props.displayMonth, buttonRef);\n const { buttonProps, nonInteractiveProps } = day;\n\n if (!buttonProps && !nonInteractiveProps) {\n return <></>;\n }\n if (nonInteractiveProps) {\n return <div {...nonInteractiveProps} />;\n }\n return <Button ref={buttonRef} {...buttonProps} />;\n}\n"],"names":[],"mappings":";;;;;AAcA;;;;SAIgB,GAAG,CAAC,KAAe;IACjC,IAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAoB,IAAI,CAAC,CAAC;IAExD,IAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACtD,IAAA,WAAW,GAA0B,GAAG,YAA7B,EAAE,mBAAmB,GAAK,GAAG,oBAAR,CAAS;IAEjD,IAAI,CAAC,WAAW,IAAI,CAAC,mBAAmB,EAAE;QACxC,OAAO,yCAAK,CAAC;KACd;IACD,IAAI,mBAAmB,EAAE;QACvB,OAAO,wCAAS,mBAAmB,EAAI,CAAC;KACzC;IACD,OAAO,oBAAC,MAAM,aAAC,GAAG,EAAE,SAAS,IAAM,WAAW,EAAI,CAAC;AACrD;;;;"}
@@ -0,0 +1 @@
1
+ export * from './useDay';
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { DateRange, ModifierStatus, StyledComponent } from '../../../types';
3
+ import { SelectMultipleContextValue } from '../../../contexts/SelectMultiple';
4
+ import { SelectRangeContextValue } from '../../../contexts/SelectRange';
5
+ import { SelectSingleContextValue } from '../../../contexts/SelectSingle';
6
+ export declare type UseDay = {
7
+ /** Whether the date is outside the display month/ */
8
+ isOutside: boolean;
9
+ /** The modifiers for the given date. */
10
+ modifiers: ModifierStatus;
11
+ /** The days in DayPicker currently selected. */
12
+ selected: Date | Date[] | DateRange | undefined;
13
+ /**
14
+ * The props for rendering the day as interactive element.
15
+ *
16
+ * When `undefined`, DayPicker should render a non interactive element with non-interactive
17
+ * props.
18
+ */
19
+ buttonProps?: Omit<React.HTMLProps<HTMLButtonElement>, 'ref'>;
20
+ /**
21
+ * The props for rendering the day as not interactive element.
22
+ *
23
+ * When both this value and `buttonProps` are `undefined`, DayPicker should not render anything.
24
+ */
25
+ nonInteractiveProps?: StyledComponent;
26
+ single: SelectSingleContextValue;
27
+ multiple: SelectMultipleContextValue;
28
+ range: SelectRangeContextValue;
29
+ };
30
+ /**
31
+ * This hook returns details about the content to render in the day cell.
32
+ *
33
+ *
34
+ * When a day cell is rendered in the table, DayPicker can either:
35
+ *
36
+ * - render nothing: when the day is outside the month or has matched the
37
+ * "hidden" modifier.
38
+ * - render a button. When a selection mode is set, DayPicker renders a button
39
+ * to allow the focus and the selection. In case of `custom` selection
40
+ * mode, DayPicker expects a `onDayClick` prop to render a button.
41
+ * - render a non-interactive element: when no selection mode is set, the day
42
+ * cell shouldn’t respond to any interaction. DayPicker should render a `div`
43
+ * or a `span`.
44
+ *
45
+ * ### Usage
46
+ *
47
+ * Use this hook to customize the behavior of the [[Day]] component. Create a
48
+ * new `Day` component using this hook and pass it to the `components` prop.
49
+ * The source of [[Day]] can be a good starting point.
50
+ *
51
+ * */
52
+ export declare function useDay(
53
+ /** The day rendered in the month. */
54
+ date: Date,
55
+ /** The month where the date is displayed. DayPicker renders days outside the display month when `showOutsideDays` is true. */
56
+ displayMonth: Date,
57
+ /** A ref to the button element. */
58
+ buttonRef: React.RefObject<HTMLButtonElement>): UseDay;