pixel-react 1.14.17 → 1.14.18

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 (273) hide show
  1. package/README.md +75 -75
  2. package/lib/_virtual/_commonjsHelpers.js +1 -26
  3. package/lib/_virtual/_commonjsHelpers.js.map +1 -1
  4. package/lib/_virtual/index10.js +2 -2
  5. package/lib/_virtual/index9.js +2 -2
  6. package/lib/assets/icons/spinner.svg.js +1 -1
  7. package/lib/assets/icons/spinner.svg.js.map +1 -1
  8. package/lib/components/DatePicker/DatePicker.js +1 -4
  9. package/lib/components/DatePicker/DatePicker.js.map +1 -1
  10. package/lib/index.cjs +2506 -7014
  11. package/lib/index.cjs.map +1 -1
  12. package/lib/index.d.ts +2 -1
  13. package/lib/node_modules/draft-js/lib/AtomicBlockUtils.js +1 -1
  14. package/lib/node_modules/draft-js/lib/BlockMapBuilder.js +1 -1
  15. package/lib/node_modules/draft-js/lib/BlockTree.js +1 -1
  16. package/lib/node_modules/draft-js/lib/CharacterMetadata.js +1 -1
  17. package/lib/node_modules/draft-js/lib/CompositeDraftDecorator.js +1 -1
  18. package/lib/node_modules/draft-js/lib/ContentBlock.js +1 -1
  19. package/lib/node_modules/draft-js/lib/ContentBlockNode.js +1 -1
  20. package/lib/node_modules/draft-js/lib/ContentState.js +1 -1
  21. package/lib/node_modules/draft-js/lib/ContentStateInlineStyle.js +1 -1
  22. package/lib/node_modules/draft-js/lib/DOMObserver.js +1 -1
  23. package/lib/node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js +1 -1
  24. package/lib/node_modules/draft-js/lib/DraftEditorBlockNode.react.js +1 -1
  25. package/lib/node_modules/draft-js/lib/DraftEditorNode.react.js +1 -1
  26. package/lib/node_modules/draft-js/lib/DraftEntity.js +1 -1
  27. package/lib/node_modules/draft-js/lib/DraftEntityInstance.js +1 -1
  28. package/lib/node_modules/draft-js/lib/DraftModifier.js +1 -1
  29. package/lib/node_modules/draft-js/lib/DraftPasteProcessor.js +1 -1
  30. package/lib/node_modules/draft-js/lib/EditorBidiService.js +1 -1
  31. package/lib/node_modules/draft-js/lib/EditorState.js +1 -1
  32. package/lib/node_modules/draft-js/lib/SelectionState.js +1 -1
  33. package/lib/node_modules/draft-js/lib/applyEntityToContentState.js +1 -1
  34. package/lib/node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js +1 -1
  35. package/lib/node_modules/draft-js/lib/convertFromRawToDraftState.js +1 -1
  36. package/lib/node_modules/draft-js/lib/createCharacterList.js +1 -1
  37. package/lib/node_modules/draft-js/lib/decodeInlineStyleRanges.js +1 -1
  38. package/lib/node_modules/draft-js/lib/insertFragmentIntoContentState.js +1 -1
  39. package/lib/node_modules/draft-js/lib/insertTextIntoContentState.js +1 -1
  40. package/lib/node_modules/draft-js/lib/modifyBlockForContentState.js +1 -1
  41. package/lib/node_modules/draft-js/lib/moveBlockInContentState.js +1 -1
  42. package/lib/node_modules/draft-js/lib/randomizeBlockMapKeys.js +1 -1
  43. package/lib/node_modules/draft-js/lib/removeRangeFromContentState.js +1 -1
  44. package/lib/node_modules/draft-js/lib/splitBlockInContentState.js +1 -1
  45. package/lib/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +1 -1
  46. package/lib/node_modules/{draft-js/node_modules/immutable → immutable}/dist/immutable.js +1 -1
  47. package/lib/node_modules/immutable/dist/immutable.js.map +1 -0
  48. package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
  49. package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
  50. package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
  51. package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
  52. package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
  53. package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
  54. package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
  55. package/lib/node_modules/libphonenumber-js/metadata.min.json.js +12 -12
  56. package/lib/node_modules/libphonenumber-js/metadata.min.json.js.map +1 -1
  57. package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  58. package/lib/node_modules/prop-types/index.js +1 -1
  59. package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js +112 -17
  60. package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js.map +1 -1
  61. package/lib/node_modules/react-day-picker/dist/esm/UI.js +31 -9
  62. package/lib/node_modules/react-day-picker/dist/esm/UI.js.map +1 -1
  63. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +9 -6
  64. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js.map +1 -1
  65. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +6 -1
  66. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js.map +1 -1
  67. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +5 -1
  68. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js.map +1 -1
  69. package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js +55 -51
  70. package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js.map +1 -1
  71. package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js +1 -1
  72. package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js.map +1 -1
  73. package/lib/node_modules/react-day-picker/dist/esm/components/Day.js +4 -4
  74. package/lib/node_modules/react-day-picker/dist/esm/components/Day.js.map +1 -1
  75. package/lib/node_modules/react-day-picker/dist/esm/components/DayButton.js +1 -1
  76. package/lib/node_modules/react-day-picker/dist/esm/components/DayButton.js.map +1 -1
  77. package/lib/node_modules/react-day-picker/dist/esm/components/Dropdown.js +1 -1
  78. package/lib/node_modules/react-day-picker/dist/esm/components/Dropdown.js.map +1 -1
  79. package/lib/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +1 -1
  80. package/lib/node_modules/react-day-picker/dist/esm/components/DropdownNav.js.map +1 -1
  81. package/lib/node_modules/react-day-picker/dist/esm/components/Footer.js +1 -1
  82. package/lib/node_modules/react-day-picker/dist/esm/components/Footer.js.map +1 -1
  83. package/lib/node_modules/react-day-picker/dist/esm/components/Month.js +1 -1
  84. package/lib/node_modules/react-day-picker/dist/esm/components/Month.js.map +1 -1
  85. package/lib/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +1 -1
  86. package/lib/node_modules/react-day-picker/dist/esm/components/MonthCaption.js.map +1 -1
  87. package/lib/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +1 -1
  88. package/lib/node_modules/react-day-picker/dist/esm/components/MonthGrid.js.map +1 -1
  89. package/lib/node_modules/react-day-picker/dist/esm/components/Months.js +1 -1
  90. package/lib/node_modules/react-day-picker/dist/esm/components/Months.js.map +1 -1
  91. package/lib/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +1 -1
  92. package/lib/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js.map +1 -1
  93. package/lib/node_modules/react-day-picker/dist/esm/components/Nav.js +16 -6
  94. package/lib/node_modules/react-day-picker/dist/esm/components/Nav.js.map +1 -1
  95. package/lib/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +1 -1
  96. package/lib/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js.map +1 -1
  97. package/lib/node_modules/react-day-picker/dist/esm/components/Option.js +1 -1
  98. package/lib/node_modules/react-day-picker/dist/esm/components/Option.js.map +1 -1
  99. package/lib/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +1 -1
  100. package/lib/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js.map +1 -1
  101. package/lib/node_modules/react-day-picker/dist/esm/components/Root.js +7 -2
  102. package/lib/node_modules/react-day-picker/dist/esm/components/Root.js.map +1 -1
  103. package/lib/node_modules/react-day-picker/dist/esm/components/Select.js +1 -1
  104. package/lib/node_modules/react-day-picker/dist/esm/components/Select.js.map +1 -1
  105. package/lib/node_modules/react-day-picker/dist/esm/components/Week.js +1 -1
  106. package/lib/node_modules/react-day-picker/dist/esm/components/Week.js.map +1 -1
  107. package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +1 -1
  108. package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumber.js.map +1 -1
  109. package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +1 -1
  110. package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js.map +1 -1
  111. package/lib/node_modules/react-day-picker/dist/esm/components/Weekday.js +1 -1
  112. package/lib/node_modules/react-day-picker/dist/esm/components/Weekday.js.map +1 -1
  113. package/lib/node_modules/react-day-picker/dist/esm/components/Weekdays.js +1 -1
  114. package/lib/node_modules/react-day-picker/dist/esm/components/Weekdays.js.map +1 -1
  115. package/lib/node_modules/react-day-picker/dist/esm/components/Weeks.js +1 -1
  116. package/lib/node_modules/react-day-picker/dist/esm/components/Weeks.js.map +1 -1
  117. package/lib/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +1 -1
  118. package/lib/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js.map +1 -1
  119. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +7 -2
  120. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js.map +1 -1
  121. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +7 -2
  122. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatDay.js.map +1 -1
  123. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +6 -2
  124. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js.map +1 -1
  125. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +11 -5
  126. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js.map +1 -1
  127. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +3 -2
  128. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js.map +1 -1
  129. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +7 -2
  130. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js.map +1 -1
  131. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +5 -1
  132. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js.map +1 -1
  133. package/lib/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +46 -19
  134. package/lib/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js.map +1 -1
  135. package/lib/node_modules/react-day-picker/dist/esm/{useGetModifiers.js → helpers/createGetModifiers.js} +13 -7
  136. package/lib/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js.map +1 -0
  137. package/lib/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +7 -1
  138. package/lib/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js.map +1 -1
  139. package/lib/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +8 -1
  140. package/lib/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js.map +1 -1
  141. package/lib/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +12 -0
  142. package/lib/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js.map +1 -1
  143. package/lib/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +10 -0
  144. package/lib/node_modules/react-day-picker/dist/esm/helpers/getComponents.js.map +1 -1
  145. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +11 -2
  146. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js.map +1 -1
  147. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDates.js +13 -2
  148. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDates.js.map +1 -1
  149. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js +4 -1
  150. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js.map +1 -1
  151. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +9 -2
  152. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js.map +1 -1
  153. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +10 -0
  154. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js.map +1 -1
  155. package/lib/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +17 -2
  156. package/lib/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js.map +1 -1
  157. package/lib/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +7 -1
  158. package/lib/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js.map +1 -1
  159. package/lib/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +13 -3
  160. package/lib/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js.map +1 -1
  161. package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +15 -1
  162. package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js.map +1 -1
  163. package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +17 -8
  164. package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonths.js.map +1 -1
  165. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +7 -1
  166. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js.map +1 -1
  167. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +20 -7
  168. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js.map +1 -1
  169. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +13 -6
  170. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js.map +1 -1
  171. package/lib/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +13 -5
  172. package/lib/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js.map +1 -1
  173. package/lib/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +11 -0
  174. package/lib/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js.map +1 -1
  175. package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +9 -6
  176. package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js.map +1 -1
  177. package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +6 -1
  178. package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js.map +1 -1
  179. package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +13 -1
  180. package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js.map +1 -1
  181. package/lib/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +8 -1
  182. package/lib/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js.map +1 -1
  183. package/lib/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +10 -6
  184. package/lib/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js.map +1 -1
  185. package/lib/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +9 -5
  186. package/lib/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js.map +1 -1
  187. package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +7 -3
  188. package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js.map +1 -1
  189. package/lib/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +7 -3
  190. package/lib/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js.map +1 -1
  191. package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +3 -1
  192. package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js.map +1 -1
  193. package/lib/node_modules/react-day-picker/dist/esm/labels/labelNav.js +2 -1
  194. package/lib/node_modules/react-day-picker/dist/esm/labels/labelNav.js.map +1 -1
  195. package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js +5 -3
  196. package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js.map +1 -1
  197. package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +5 -3
  198. package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js.map +1 -1
  199. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +4 -1
  200. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js.map +1 -1
  201. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +3 -1
  202. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js.map +1 -1
  203. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +5 -1
  204. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js.map +1 -1
  205. package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +3 -1
  206. package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js.map +1 -1
  207. package/lib/node_modules/react-day-picker/dist/esm/selection/useMulti.js +9 -0
  208. package/lib/node_modules/react-day-picker/dist/esm/selection/useMulti.js.map +1 -1
  209. package/lib/node_modules/react-day-picker/dist/esm/selection/useRange.js +10 -2
  210. package/lib/node_modules/react-day-picker/dist/esm/selection/useRange.js.map +1 -1
  211. package/lib/node_modules/react-day-picker/dist/esm/selection/useSingle.js +9 -0
  212. package/lib/node_modules/react-day-picker/dist/esm/selection/useSingle.js.map +1 -1
  213. package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js +158 -0
  214. package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js.map +1 -0
  215. package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js +9 -1
  216. package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js.map +1 -1
  217. package/lib/node_modules/react-day-picker/dist/esm/useDayPicker.js +4 -6
  218. package/lib/node_modules/react-day-picker/dist/esm/useDayPicker.js.map +1 -1
  219. package/lib/node_modules/react-day-picker/dist/esm/useFocus.js +14 -1
  220. package/lib/node_modules/react-day-picker/dist/esm/useFocus.js.map +1 -1
  221. package/lib/node_modules/react-day-picker/dist/esm/useSelection.js +10 -0
  222. package/lib/node_modules/react-day-picker/dist/esm/useSelection.js.map +1 -1
  223. package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js +10 -8
  224. package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js.map +1 -1
  225. package/lib/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +5 -15
  226. package/lib/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js.map +1 -1
  227. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +7 -9
  228. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js.map +1 -1
  229. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +5 -14
  230. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js.map +1 -1
  231. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +7 -3
  232. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js.map +1 -1
  233. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +6 -2
  234. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js.map +1 -1
  235. package/lib/node_modules/react-day-picker/dist/esm/utils/typeguards.js +19 -6
  236. package/lib/node_modules/react-day-picker/dist/esm/utils/typeguards.js.map +1 -1
  237. package/lib/node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.js +2 -2
  238. package/lib/node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.js.map +1 -1
  239. package/lib/node_modules/react-hook-form/dist/index.esm.js +1203 -1151
  240. package/lib/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
  241. package/lib/node_modules/{prop-types/node_modules/react-is → react-is}/cjs/react-is.development.js +1 -1
  242. package/lib/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  243. package/lib/node_modules/{prop-types/node_modules/react-is → react-is}/cjs/react-is.production.min.js +1 -1
  244. package/lib/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  245. package/lib/node_modules/{hoist-non-react-statics/node_modules/react-is → react-is}/index.js +1 -1
  246. package/lib/node_modules/react-is/index.js.map +1 -0
  247. package/lib/node_modules/webrtc-adapter/src/js/common_shim.js +1 -1
  248. package/lib/node_modules/webrtc-adapter/src/js/common_shim.js.map +1 -1
  249. package/lib/node_modules/webrtc-adapter/src/js/utils.js +6 -4
  250. package/lib/node_modules/webrtc-adapter/src/js/utils.js.map +1 -1
  251. package/lib/tsconfig.tsbuildinfo +1 -1
  252. package/package.json +106 -106
  253. package/lib/_virtual/immutable.es.js +0 -7
  254. package/lib/_virtual/immutable.es.js.map +0 -1
  255. package/lib/_virtual/index14.js +0 -4
  256. package/lib/_virtual/index14.js.map +0 -1
  257. package/lib/_virtual/react-is.development2.js +0 -4
  258. package/lib/_virtual/react-is.development2.js.map +0 -1
  259. package/lib/_virtual/react-is.production.min2.js +0 -4
  260. package/lib/_virtual/react-is.production.min2.js.map +0 -1
  261. package/lib/node_modules/draft-js/node_modules/immutable/dist/immutable.js.map +0 -1
  262. package/lib/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +0 -175
  263. package/lib/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js.map +0 -1
  264. package/lib/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +0 -125
  265. package/lib/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js.map +0 -1
  266. package/lib/node_modules/hoist-non-react-statics/node_modules/react-is/index.js.map +0 -1
  267. package/lib/node_modules/immutable/dist/immutable.es.js +0 -4829
  268. package/lib/node_modules/immutable/dist/immutable.es.js.map +0 -1
  269. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +0 -1
  270. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +0 -1
  271. package/lib/node_modules/prop-types/node_modules/react-is/index.js +0 -18
  272. package/lib/node_modules/prop-types/node_modules/react-is/index.js.map +0 -1
  273. package/lib/node_modules/react-day-picker/dist/esm/useGetModifiers.js.map +0 -1
@@ -1,17 +1,21 @@
1
1
  import { DateLib } from '../classes/DateLib.js';
2
2
 
3
3
  /**
4
- * The ARIA label for the day button.
4
+ * Generates the ARIA label for a day button.
5
5
  *
6
- * Use the `modifiers` argument to add additional context to the label, e.g.
7
- * when a day is selected or is today.
6
+ * Use the `modifiers` argument to provide additional context for the label,
7
+ * such as indicating if the day is "today" or "selected."
8
8
  *
9
9
  * @defaultValue The formatted date.
10
+ * @param date - The date to format.
11
+ * @param modifiers - The modifiers providing context for the day.
12
+ * @param options - Optional configuration for the date formatting library.
13
+ * @param dateLib - An optional instance of the date formatting library.
14
+ * @returns The ARIA label for the day button.
10
15
  * @group Labels
11
16
  * @see https://daypicker.dev/docs/translation#aria-labels
12
17
  */
13
- function labelDayButton(date, /** The modifiers for the day. */
14
- modifiers, options, dateLib) {
18
+ function labelDayButton(date, modifiers, options, dateLib) {
15
19
  let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
16
20
  if (modifiers.today) label = `Today, ${label}`;
17
21
  if (modifiers.selected) label = `${label}, selected`;
@@ -1 +1 @@
1
- {"version":3,"file":"labelDayButton.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelDayButton.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * The ARIA label for the day button.\n *\n * Use the `modifiers` argument to add additional context to the label, e.g.\n * when a day is selected or is today.\n *\n * @defaultValue The formatted date.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelDayButton(date, \n/** The modifiers for the day. */\nmodifiers, options, dateLib) {\n let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n if (modifiers.today)\n label = `Today, ${label}`;\n if (modifiers.selected)\n label = `${label}, selected`;\n return label;\n}\n/**\n * @ignore\n * @deprecated Use `labelDayButton` instead.\n */\nexport const labelDay = labelDayButton;\n//# sourceMappingURL=labelDayButton.js.map"],"names":["labelDayButton","date","modifiers","options","dateLib","label","DateLib","format","today","selected","labelDay"],"mappings":";;AAGA;;;;;;;;;;AAUM,SAAUA,cAAcA,CAC5BC,IAAU;AAEVC,SAAoB,EACpBC,OAAwB,EACxBC,OAAiB,EAAA;AAEjB,EAAA,IAAIC,KAAK,GAAG,CAACD,OAAO,IAAI,IAAIE,OAAO,CAACH,OAAO,CAAC,EAAEI,MAAM,CAACN,IAAI,EAAE,MAAM,CAAC;EAClE,IAAIC,SAAS,CAACM,KAAK,EAAEH,KAAK,GAAG,CAAA,OAAA,EAAUA,KAAK,CAAE,CAAA;EAC9C,IAAIH,SAAS,CAACO,QAAQ,EAAEJ,KAAK,GAAG,CAAA,EAAGA,KAAK,CAAY,UAAA,CAAA;AACpD,EAAA,OAAOA,KAAK;AACd;AAEA;;;;AAIO,MAAMK,QAAQ,GAAGV;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelDayButton.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelDayButton.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for a day button.\n *\n * Use the `modifiers` argument to provide additional context for the label,\n * such as indicating if the day is \"today\" or \"selected.\"\n *\n * @defaultValue The formatted date.\n * @param date - The date to format.\n * @param modifiers - The modifiers providing context for the day.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the day button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelDayButton(date, modifiers, options, dateLib) {\n let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n if (modifiers.today)\n label = `Today, ${label}`;\n if (modifiers.selected)\n label = `${label}, selected`;\n return label;\n}\n/**\n * @ignore\n * @deprecated Use `labelDayButton` instead.\n */\nexport const labelDay = labelDayButton;\n//# sourceMappingURL=labelDayButton.js.map"],"names":["labelDayButton","date","modifiers","options","dateLib","label","DateLib","format","today","selected","labelDay"],"mappings":";;AAGA;;;;;;;;;;;;;;;AAeM,SAAUA,cAAcA,CAC5BC,IAAU,EACVC,SAAoB,EACpBC,OAAwB,EACxBC,OAAiB,EAAA;AAEjB,EAAA,IAAIC,KAAK,GAAG,CAACD,OAAO,IAAI,IAAIE,OAAO,CAACH,OAAO,CAAC,EAAEI,MAAM,CAACN,IAAI,EAAE,MAAM,CAAC;EAClE,IAAIC,SAAS,CAACM,KAAK,EAAEH,KAAK,GAAG,CAAA,OAAA,EAAUA,KAAK,CAAE,CAAA;EAC9C,IAAIH,SAAS,CAACO,QAAQ,EAAEJ,KAAK,GAAG,CAAA,EAAGA,KAAK,CAAY,UAAA,CAAA;AACpD,EAAA,OAAOA,KAAK;AACd;AAEA;;;;AAIO,MAAMK,QAAQ,GAAGV;;;;","x_google_ignoreList":[0]}
@@ -1,10 +1,14 @@
1
1
  import { DateLib } from '../classes/DateLib.js';
2
2
 
3
3
  /**
4
- * The ARIA label for the month grid, that will be announced when entering the
5
- * grid.
4
+ * Generates the ARIA label for the month grid, which is announced when entering
5
+ * the grid.
6
6
  *
7
- * @defaultValue `LLLL y` (e.g. "November 2022")
7
+ * @defaultValue `LLLL y` (e.g., "November 2022").
8
+ * @param date - The date representing the month.
9
+ * @param options - Optional configuration for the date formatting library.
10
+ * @param dateLib - An optional instance of the date formatting library.
11
+ * @returns The ARIA label for the month grid.
8
12
  * @group Labels
9
13
  * @see https://daypicker.dev/docs/translation#aria-labels
10
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"labelGrid.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelGrid.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * The ARIA label for the month grid, that will be announced when entering the\n * grid.\n *\n * @defaultValue `LLLL y` (e.g. \"November 2022\")\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGrid(date, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(date, \"LLLL y\");\n}\n/**\n * @ignore\n * @deprecated Use {@link labelGrid} instead.\n */\nexport const labelCaption = labelGrid;\n//# sourceMappingURL=labelGrid.js.map"],"names":["labelGrid","date","options","dateLib","DateLib","format","labelCaption"],"mappings":";;AAEA;;;;;;;;AAQM,SAAUA,SAASA,CACvBC,IAAU,EACVC,OAAwB,EACxBC,OAAiB,EAAA;AAEjB,EAAA,OAAO,CAACA,OAAO,IAAI,IAAIC,OAAO,CAACF,OAAO,CAAC,EAAEG,MAAM,CAACJ,IAAI,EAAE,QAAQ,CAAC;AACjE;AAEA;;;;AAIO,MAAMK,YAAY,GAAGN;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelGrid.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelGrid.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for the month grid, which is announced when entering\n * the grid.\n *\n * @defaultValue `LLLL y` (e.g., \"November 2022\").\n * @param date - The date representing the month.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the month grid.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGrid(date, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(date, \"LLLL y\");\n}\n/**\n * @ignore\n * @deprecated Use {@link labelGrid} instead.\n */\nexport const labelCaption = labelGrid;\n//# sourceMappingURL=labelGrid.js.map"],"names":["labelGrid","date","options","dateLib","DateLib","format","labelCaption"],"mappings":";;AAEA;;;;;;;;;;;;AAYM,SAAUA,SAASA,CACvBC,IAAU,EACVC,OAAwB,EACxBC,OAAiB,EAAA;AAEjB,EAAA,OAAO,CAACA,OAAO,IAAI,IAAIC,OAAO,CAACF,OAAO,CAAC,EAAEG,MAAM,CAACJ,IAAI,EAAE,QAAQ,CAAC;AACjE;AAEA;;;;AAIO,MAAMK,YAAY,GAAGN;;;;","x_google_ignoreList":[0]}
@@ -1,13 +1,17 @@
1
1
  import { DateLib } from '../classes/DateLib.js';
2
2
 
3
3
  /**
4
- * The label for the day gridcell when the calendar is not interactive.
4
+ * Generates the label for a day grid cell when the calendar is not interactive.
5
5
  *
6
+ * @param date - The date to format.
7
+ * @param modifiers - Optional modifiers providing context for the day.
8
+ * @param options - Optional configuration for the date formatting library.
9
+ * @param dateLib - An optional instance of the date formatting library.
10
+ * @returns The label for the day grid cell.
6
11
  * @group Labels
7
12
  * @see https://daypicker.dev/docs/translation#aria-labels
8
13
  */
9
- function labelGridcell(date, /** The modifiers for the day. */
10
- modifiers, options, dateLib) {
14
+ function labelGridcell(date, modifiers, options, dateLib) {
11
15
  let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
12
16
  if (modifiers?.today) {
13
17
  label = `Today, ${label}`;
@@ -1 +1 @@
1
- {"version":3,"file":"labelGridcell.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelGridcell.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * The label for the day gridcell when the calendar is not interactive.\n *\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGridcell(date, \n/** The modifiers for the day. */\nmodifiers, options, dateLib) {\n let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n if (modifiers?.today) {\n label = `Today, ${label}`;\n }\n return label;\n}\n//# sourceMappingURL=labelGridcell.js.map"],"names":["labelGridcell","date","modifiers","options","dateLib","label","DateLib","format","today"],"mappings":";;AAGA;;;;;;AAMM,SAAUA,aAAaA,CAC3BC,IAAU;AAEVC,SAAqB,EACrBC,OAAwB,EACxBC,OAAiB,EAAA;AAEjB,EAAA,IAAIC,KAAK,GAAG,CAACD,OAAO,IAAI,IAAIE,OAAO,CAACH,OAAO,CAAC,EAAEI,MAAM,CAACN,IAAI,EAAE,MAAM,CAAC;EAClE,IAAIC,SAAS,EAAEM,KAAK,EAAE;IACpBH,KAAK,GAAG,CAAUA,OAAAA,EAAAA,KAAK,CAAE,CAAA;AAC3B;AACA,EAAA,OAAOA,KAAK;AACd;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelGridcell.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelGridcell.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the label for a day grid cell when the calendar is not interactive.\n *\n * @param date - The date to format.\n * @param modifiers - Optional modifiers providing context for the day.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The label for the day grid cell.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGridcell(date, modifiers, options, dateLib) {\n let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n if (modifiers?.today) {\n label = `Today, ${label}`;\n }\n return label;\n}\n//# sourceMappingURL=labelGridcell.js.map"],"names":["labelGridcell","date","modifiers","options","dateLib","label","DateLib","format","today"],"mappings":";;AAGA;;;;;;;;;;;AAWM,SAAUA,aAAaA,CAC3BC,IAAU,EACVC,SAAqB,EACrBC,OAAwB,EACxBC,OAAiB,EAAA;AAEjB,EAAA,IAAIC,KAAK,GAAG,CAACD,OAAO,IAAI,IAAIE,OAAO,CAACH,OAAO,CAAC,EAAEI,MAAM,CAACN,IAAI,EAAE,MAAM,CAAC;EAClE,IAAIC,SAAS,EAAEM,KAAK,EAAE;IACpBH,KAAK,GAAG,CAAUA,OAAAA,EAAAA,KAAK,CAAE,CAAA;AAC3B;AACA,EAAA,OAAOA,KAAK;AACd;;;;","x_google_ignoreList":[0]}
@@ -1,7 +1,9 @@
1
1
  /**
2
- * The ARIA label for the months dropdown.
2
+ * Generates the ARIA label for the months dropdown.
3
3
  *
4
4
  * @defaultValue `"Choose the Month"`
5
+ * @param options - Optional configuration for the date formatting library.
6
+ * @returns The ARIA label for the months dropdown.
5
7
  * @group Labels
6
8
  * @see https://daypicker.dev/docs/translation#aria-labels
7
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"labelMonthDropdown.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js"],"sourcesContent":["/**\n * The ARIA label for the months dropdown.\n *\n * @defaultValue `\"Choose the Month\"`\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelMonthDropdown(options) {\n return \"Choose the Month\";\n}\n//# sourceMappingURL=labelMonthDropdown.js.map"],"names":["labelMonthDropdown","options"],"mappings":"AAEA;;;;;;;AAOM,SAAUA,kBAAkBA,CAACC,OAAwB,EAAA;AACzD,EAAA,OAAO,kBAAkB;AAC3B;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelMonthDropdown.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js"],"sourcesContent":["/**\n * Generates the ARIA label for the months dropdown.\n *\n * @defaultValue `\"Choose the Month\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the months dropdown.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelMonthDropdown(options) {\n return \"Choose the Month\";\n}\n//# sourceMappingURL=labelMonthDropdown.js.map"],"names":["labelMonthDropdown","options"],"mappings":"AAEA;;;;;;;;;AASM,SAAUA,kBAAkBA,CAACC,OAAwB,EAAA;AACzD,EAAA,OAAO,kBAAkB;AAC3B;;;;","x_google_ignoreList":[0]}
@@ -1,7 +1,8 @@
1
1
  /**
2
- * The ARIA label for the navigation toolbar.
2
+ * Generates the ARIA label for the navigation toolbar.
3
3
  *
4
4
  * @defaultValue `""`
5
+ * @returns The ARIA label for the navigation toolbar.
5
6
  * @group Labels
6
7
  * @see https://daypicker.dev/docs/translation#aria-labels
7
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"labelNav.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelNav.js"],"sourcesContent":["/**\n * The ARIA label for the navigation toolbar.\n *\n * @defaultValue `\"\"`\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNav() {\n return \"\";\n}\n//# sourceMappingURL=labelNav.js.map"],"names":["labelNav"],"mappings":"AAAA;;;;;;;AAOM,SAAUA,QAAQA,GAAA;AACtB,EAAA,OAAO,EAAE;AACX;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelNav.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelNav.js"],"sourcesContent":["/**\n * Generates the ARIA label for the navigation toolbar.\n *\n * @defaultValue `\"\"`\n * @returns The ARIA label for the navigation toolbar.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNav() {\n return \"\";\n}\n//# sourceMappingURL=labelNav.js.map"],"names":["labelNav"],"mappings":"AAAA;;;;;;;;AAQM,SAAUA,QAAQA,GAAA;AACtB,EAAA,OAAO,EAAE;AACX;;;;","x_google_ignoreList":[0]}
@@ -1,12 +1,14 @@
1
1
  /**
2
- * The ARIA label for next month button.
2
+ * Generates the ARIA label for the "next month" button.
3
3
  *
4
4
  * @defaultValue `"Go to the Next Month"`
5
+ * @param month - The date representing the next month, or `undefined` if there
6
+ * is no next month.
7
+ * @returns The ARIA label for the "next month" button.
5
8
  * @group Labels
6
9
  * @see https://daypicker.dev/docs/translation#aria-labels
7
10
  */
8
- function labelNext(/** `undefined` where there's no next month to navigate to. */
9
- month) {
11
+ function labelNext(month) {
10
12
  return "Go to the Next Month";
11
13
  }
12
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"labelNext.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelNext.js"],"sourcesContent":["/**\n * The ARIA label for next month button.\n *\n * @defaultValue `\"Go to the Next Month\"`\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNext(\n/** `undefined` where there's no next month to navigate to. */\nmonth) {\n return \"Go to the Next Month\";\n}\n//# sourceMappingURL=labelNext.js.map"],"names":["labelNext","month"],"mappings":"AAAA;;;;;;;AAOM,SAAUA,SAASA;AAEvBC,KAAuB,EAAA;AAEvB,EAAA,OAAO,sBAAsB;AAC/B;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelNext.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelNext.js"],"sourcesContent":["/**\n * Generates the ARIA label for the \"next month\" button.\n *\n * @defaultValue `\"Go to the Next Month\"`\n * @param month - The date representing the next month, or `undefined` if there\n * is no next month.\n * @returns The ARIA label for the \"next month\" button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNext(month) {\n return \"Go to the Next Month\";\n}\n//# sourceMappingURL=labelNext.js.map"],"names":["labelNext","month"],"mappings":"AAAA;;;;;;;;;;AAUM,SAAUA,SAASA,CAACC,KAAuB,EAAA;AAC/C,EAAA,OAAO,sBAAsB;AAC/B;;;;","x_google_ignoreList":[0]}
@@ -1,12 +1,14 @@
1
1
  /**
2
- * The ARIA label for previous month button.
2
+ * Generates the ARIA label for the "previous month" button.
3
3
  *
4
4
  * @defaultValue `"Go to the Previous Month"`
5
+ * @param month - The date representing the previous month, or `undefined` if
6
+ * there is no previous month.
7
+ * @returns The ARIA label for the "previous month" button.
5
8
  * @group Labels
6
9
  * @see https://daypicker.dev/docs/translation#aria-labels
7
10
  */
8
- function labelPrevious(/** Undefined where there's no previous month to navigate to. */
9
- month) {
11
+ function labelPrevious(month) {
10
12
  return "Go to the Previous Month";
11
13
  }
12
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"labelPrevious.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelPrevious.js"],"sourcesContent":["/**\n * The ARIA label for previous month button.\n *\n * @defaultValue `\"Go to the Previous Month\"`\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelPrevious(\n/** Undefined where there's no previous month to navigate to. */\nmonth) {\n return \"Go to the Previous Month\";\n}\n//# sourceMappingURL=labelPrevious.js.map"],"names":["labelPrevious","month"],"mappings":"AAAA;;;;;;;AAOM,SAAUA,aAAaA;AAE3BC,KAAuB,EAAA;AAEvB,EAAA,OAAO,0BAA0B;AACnC;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelPrevious.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelPrevious.js"],"sourcesContent":["/**\n * Generates the ARIA label for the \"previous month\" button.\n *\n * @defaultValue `\"Go to the Previous Month\"`\n * @param month - The date representing the previous month, or `undefined` if\n * there is no previous month.\n * @returns The ARIA label for the \"previous month\" button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelPrevious(month) {\n return \"Go to the Previous Month\";\n}\n//# sourceMappingURL=labelPrevious.js.map"],"names":["labelPrevious","month"],"mappings":"AAAA;;;;;;;;;;AAUM,SAAUA,aAAaA,CAACC,KAAuB,EAAA;AACnD,EAAA,OAAO,0BAA0B;AACnC;;;;","x_google_ignoreList":[0]}
@@ -1,7 +1,10 @@
1
1
  /**
2
- * The ARIA label for the week number cell (the first cell in the row).
2
+ * Generates the ARIA label for the week number cell (the first cell in a row).
3
3
  *
4
4
  * @defaultValue `Week ${weekNumber}`
5
+ * @param weekNumber - The number of the week.
6
+ * @param options - Optional configuration for the date formatting library.
7
+ * @returns The ARIA label for the week number cell.
5
8
  * @group Labels
6
9
  * @see https://daypicker.dev/docs/translation#aria-labels
7
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"labelWeekNumber.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js"],"sourcesContent":["/**\n * The ARIA label for the week number cell (the first cell in the row).\n *\n * @defaultValue `Week ${weekNumber}`\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumber(weekNumber, options) {\n return `Week ${weekNumber}`;\n}\n//# sourceMappingURL=labelWeekNumber.js.map"],"names":["labelWeekNumber","weekNumber","options"],"mappings":"AAEA;;;;;;;AAOM,SAAUA,eAAeA,CAC7BC,UAAkB,EAClBC,OAAwB,EAAA;EAExB,OAAO,CAAA,KAAA,EAAQD,UAAU,CAAE,CAAA;AAC7B;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelWeekNumber.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js"],"sourcesContent":["/**\n * Generates the ARIA label for the week number cell (the first cell in a row).\n *\n * @defaultValue `Week ${weekNumber}`\n * @param weekNumber - The number of the week.\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the week number cell.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumber(weekNumber, options) {\n return `Week ${weekNumber}`;\n}\n//# sourceMappingURL=labelWeekNumber.js.map"],"names":["labelWeekNumber","weekNumber","options"],"mappings":"AAEA;;;;;;;;;;AAUM,SAAUA,eAAeA,CAC7BC,UAAkB,EAClBC,OAAwB,EAAA;EAExB,OAAO,CAAA,KAAA,EAAQD,UAAU,CAAE,CAAA;AAC7B;;;;","x_google_ignoreList":[0]}
@@ -1,7 +1,9 @@
1
1
  /**
2
- * The ARIA label for the week number header element.
2
+ * Generates the ARIA label for the week number header element.
3
3
  *
4
4
  * @defaultValue `"Week Number"`
5
+ * @param options - Optional configuration for the date formatting library.
6
+ * @returns The ARIA label for the week number header.
5
7
  * @group Labels
6
8
  * @see https://daypicker.dev/docs/translation#aria-labels
7
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"labelWeekNumberHeader.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js"],"sourcesContent":["/**\n * The ARIA label for the week number header element.\n *\n * @defaultValue `\"Week Number\"`\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumberHeader(options) {\n return \"Week Number\";\n}\n//# sourceMappingURL=labelWeekNumberHeader.js.map"],"names":["labelWeekNumberHeader","options"],"mappings":"AAEA;;;;;;;AAOM,SAAUA,qBAAqBA,CAACC,OAAwB,EAAA;AAC5D,EAAA,OAAO,aAAa;AACtB;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelWeekNumberHeader.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js"],"sourcesContent":["/**\n * Generates the ARIA label for the week number header element.\n *\n * @defaultValue `\"Week Number\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the week number header.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumberHeader(options) {\n return \"Week Number\";\n}\n//# sourceMappingURL=labelWeekNumberHeader.js.map"],"names":["labelWeekNumberHeader","options"],"mappings":"AAEA;;;;;;;;;AASM,SAAUA,qBAAqBA,CAACC,OAAwB,EAAA;AAC5D,EAAA,OAAO,aAAa;AACtB;;;;","x_google_ignoreList":[0]}
@@ -1,9 +1,13 @@
1
1
  import { DateLib } from '../classes/DateLib.js';
2
2
 
3
3
  /**
4
- * The ARIA label for the Weekday column header.
4
+ * Generates the ARIA label for a weekday column header.
5
5
  *
6
6
  * @defaultValue `"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"`
7
+ * @param date - The date representing the weekday.
8
+ * @param options - Optional configuration for the date formatting library.
9
+ * @param dateLib - An optional instance of the date formatting library.
10
+ * @returns The ARIA label for the weekday column header.
7
11
  * @group Labels
8
12
  * @see https://daypicker.dev/docs/translation#aria-labels
9
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"labelWeekday.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelWeekday.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * The ARIA label for the Weekday column header.\n *\n * @defaultValue `\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"`\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekday(date, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(date, \"cccc\");\n}\n//# sourceMappingURL=labelWeekday.js.map"],"names":["labelWeekday","date","options","dateLib","DateLib","format"],"mappings":";;AAEA;;;;;;;AAOM,SAAUA,YAAYA,CAC1BC,IAAU,EACVC,OAAwB,EACxBC,OAAiB,EAAA;AAEjB,EAAA,OAAO,CAACA,OAAO,IAAI,IAAIC,OAAO,CAACF,OAAO,CAAC,EAAEG,MAAM,CAACJ,IAAI,EAAE,MAAM,CAAC;AAC/D;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelWeekday.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelWeekday.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for a weekday column header.\n *\n * @defaultValue `\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"`\n * @param date - The date representing the weekday.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the weekday column header.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekday(date, options, dateLib) {\n return (dateLib ?? new DateLib(options)).format(date, \"cccc\");\n}\n//# sourceMappingURL=labelWeekday.js.map"],"names":["labelWeekday","date","options","dateLib","DateLib","format"],"mappings":";;AAEA;;;;;;;;;;;AAWM,SAAUA,YAAYA,CAC1BC,IAAU,EACVC,OAAwB,EACxBC,OAAiB,EAAA;AAEjB,EAAA,OAAO,CAACA,OAAO,IAAI,IAAIC,OAAO,CAACF,OAAO,CAAC,EAAEG,MAAM,CAACJ,IAAI,EAAE,MAAM,CAAC;AAC/D;;;;","x_google_ignoreList":[0]}
@@ -1,7 +1,9 @@
1
1
  /**
2
- * The ARIA label for the years dropdown.
2
+ * Generates the ARIA label for the years dropdown.
3
3
  *
4
4
  * @defaultValue `"Choose the Year"`
5
+ * @param options - Optional configuration for the date formatting library.
6
+ * @returns The ARIA label for the years dropdown.
5
7
  * @group Labels
6
8
  * @see https://daypicker.dev/docs/translation#aria-labels
7
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"labelYearDropdown.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js"],"sourcesContent":["/**\n * The ARIA label for the years dropdown.\n *\n * @defaultValue `\"Choose the Year\"`\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelYearDropdown(options) {\n return \"Choose the Year\";\n}\n//# sourceMappingURL=labelYearDropdown.js.map"],"names":["labelYearDropdown","options"],"mappings":"AAEA;;;;;;;AAOM,SAAUA,iBAAiBA,CAACC,OAAwB,EAAA;AACxD,EAAA,OAAO,iBAAiB;AAC1B;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"labelYearDropdown.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js"],"sourcesContent":["/**\n * Generates the ARIA label for the years dropdown.\n *\n * @defaultValue `\"Choose the Year\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the years dropdown.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelYearDropdown(options) {\n return \"Choose the Year\";\n}\n//# sourceMappingURL=labelYearDropdown.js.map"],"names":["labelYearDropdown","options"],"mappings":"AAEA;;;;;;;;;AASM,SAAUA,iBAAiBA,CAACC,OAAwB,EAAA;AACxD,EAAA,OAAO,iBAAiB;AAC1B;;;;","x_google_ignoreList":[0]}
@@ -1,5 +1,14 @@
1
1
  import { useControlledValue } from '../helpers/useControlledValue.js';
2
2
 
3
+ /**
4
+ * Hook to manage multiple-date selection in the DayPicker component.
5
+ *
6
+ * @template T - The type of DayPicker props.
7
+ * @param props - The DayPicker props.
8
+ * @param dateLib - The date utility library instance.
9
+ * @returns An object containing the selected dates, a function to select dates,
10
+ * and a function to check if a date is selected.
11
+ */
3
12
  function useMulti(props, dateLib) {
4
13
  const {
5
14
  selected: initiallySelected,
@@ -1 +1 @@
1
- {"version":3,"file":"useMulti.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/selection/useMulti.js"],"sourcesContent":["import { useControlledValue } from \"../helpers/useControlledValue.js\";\nexport function useMulti(props, dateLib) {\n const { selected: initiallySelected, required, onSelect } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const { isSameDay } = dateLib;\n const isSelected = (date) => {\n return selected?.some((d) => isSameDay(d, date)) ?? false;\n };\n const { min, max } = props;\n const select = (triggerDate, modifiers, e) => {\n let newDates = [...(selected ?? [])];\n if (isSelected(triggerDate)) {\n if (selected?.length === min) {\n // Min value reached, do nothing\n return;\n }\n if (required && selected?.length === 1) {\n // Required value already selected do nothing\n return;\n }\n newDates = selected?.filter((d) => !isSameDay(d, triggerDate));\n }\n else {\n if (selected?.length === max) {\n // Max value reached, reset the selection to date\n newDates = [triggerDate];\n }\n else {\n // Add the date to the selection\n newDates = [...newDates, triggerDate];\n }\n }\n if (!onSelect) {\n setSelected(newDates);\n }\n onSelect?.(newDates, triggerDate, modifiers, e);\n return newDates;\n };\n return {\n selected,\n select,\n isSelected\n };\n}\n//# sourceMappingURL=useMulti.js.map"],"names":["useMulti","props","dateLib","selected","initiallySelected","required","onSelect","internallySelected","setSelected","useControlledValue","undefined","isSameDay","isSelected","date","some","d","min","max","select","triggerDate","modifiers","e","newDates","length","filter"],"mappings":";;AAWM,SAAUA,QAAQA,CACtBC,KAAQ,EACRC,OAAgB,EAAA;EAEhB,MAAM;AACJC,IAAAA,QAAQ,EAAEC,iBAAiB;IAC3BC,QAAQ;AACRC,IAAAA;AAAQ,GACT,GAAGL,KAAmB;AAEvB,EAAA,MAAM,CAACM,kBAAkB,EAAEC,WAAW,CAAC,GAAGC,kBAAkB,CAC1DL,iBAAiB,EACjBE,QAAQ,GAAGF,iBAAiB,GAAGM,SAAS,CACzC;AAED,EAAA,MAAMP,QAAQ,GAAG,CAACG,Q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,QAAQ;IACRe,MAAM;AACNN,IAAAA;AACe,GAAA;AACnB;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useMulti.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/selection/useMulti.js"],"sourcesContent":["import { useControlledValue } from \"../helpers/useControlledValue.js\";\n/**\n * Hook to manage multiple-date selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected dates, a function to select dates,\n * and a function to check if a date is selected.\n */\nexport function useMulti(props, dateLib) {\n const { selected: initiallySelected, required, onSelect } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const { isSameDay } = dateLib;\n const isSelected = (date) => {\n return selected?.some((d) => isSameDay(d, date)) ?? false;\n };\n const { min, max } = props;\n const select = (triggerDate, modifiers, e) => {\n let newDates = [...(selected ?? [])];\n if (isSelected(triggerDate)) {\n if (selected?.length === min) {\n // Min value reached, do nothing\n return;\n }\n if (required && selected?.length === 1) {\n // Required value already selected do nothing\n return;\n }\n newDates = selected?.filter((d) => !isSameDay(d, triggerDate));\n }\n else {\n if (selected?.length === max) {\n // Max value reached, reset the selection to date\n newDates = [triggerDate];\n }\n else {\n // Add the date to the selection\n newDates = [...newDates, triggerDate];\n }\n }\n if (!onSelect) {\n setSelected(newDates);\n }\n onSelect?.(newDates, triggerDate, modifiers, e);\n return newDates;\n };\n return {\n selected,\n select,\n isSelected\n };\n}\n//# sourceMappingURL=useMulti.js.map"],"names":["useMulti","props","dateLib","selected","initiallySelected","required","onSelect","internallySelected","setSelected","useControlledValue","undefined","isSameDay","isSelected","date","some","d","min","max","select","triggerDate","modifiers","e","newDates","length","filter"],"mappings":";;AAWA;;;;;;;;;AASM,SAAUA,QAAQA,CACtBC,KAAQ,EACRC,OAAgB,EAAA;EAEhB,MAAM;AACJC,IAAAA,QAAQ,EAAEC,iBA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A,QAAQ,EAAEH,WAAW,CAAC;AACvC;AACF;IACA,IAAI,CAACb,QAAQ,EAAE;MACbE,WAAW,CAACc,QAAQ,CAAC;AACvB;IACAhB,QAAQ,GAAGgB,QAAQ,EAAEH,WAAW,EAAEC,SAAS,EAAEC,CAAC,CAAC;AAC/C,IAAA,OAAOC,QAAQ;GAChB;EAED,OAAO;IACLnB,QAAQ;IACRe,MAAM;AACNN,IAAAA;AACe,GAAA;AACnB;;;;","x_google_ignoreList":[0]}
@@ -1,9 +1,17 @@
1
1
  import { useControlledValue } from '../helpers/useControlledValue.js';
2
- import { addToRange } from '../utils/addToRange.js';
3
- import '../classes/DateLib.js';
4
2
  import { rangeIncludesDate } from '../utils/rangeIncludesDate.js';
3
+ import { addToRange } from '../utils/addToRange.js';
5
4
  import { rangeContainsModifiers } from '../utils/rangeContainsModifiers.js';
6
5
 
6
+ /**
7
+ * Hook to manage range selection in the DayPicker component.
8
+ *
9
+ * @template T - The type of DayPicker props.
10
+ * @param props - The DayPicker props.
11
+ * @param dateLib - The date utility library instance.
12
+ * @returns An object containing the selected range, a function to select a
13
+ * range, and a function to check if a date is within the range.
14
+ */
7
15
  function useRange(props, dateLib) {
8
16
  const {
9
17
  disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"useRange.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/selection/useRange.js"],"sourcesContent":["import { useControlledValue } from \"../helpers/useControlledValue.js\";\nimport { addToRange, rangeContainsModifiers } from \"../utils/index.js\";\nimport { rangeIncludesDate } from \"../utils/rangeIncludesDate.js\";\nexport function useRange(props, dateLib) {\n const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);\n const select = (triggerDate, modifiers, e) => {\n const { min, max } = props;\n const newRange = triggerDate\n ? addToRange(triggerDate, selected, min, max, required, dateLib)\n : undefined;\n if (excludeDisabled && disabled && newRange?.from && newRange.to) {\n if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {\n // if a disabled days is found, the range is reset\n newRange.from = triggerDate;\n newRange.to = undefined;\n }\n }\n if (!onSelect) {\n setSelected(newRange);\n }\n onSelect?.(newRange, triggerDate, modifiers, e);\n return newRange;\n };\n return {\n selected,\n select,\n isSelected\n };\n}\n//# sourceMappingURL=useRange.js.map"],"names":["useRange","props","dateLib","disabled","excludeDisabled","selected","initiallySelected","required","onSelect","internallySelected","setSelected","useControlledValue","undefined","isSelected","date","rangeIncludesDate","select","triggerDate","modifiers","e","min","max","newRange","addToRange","from","to","rangeContainsModifiers"],"mappings":";;;;;;AAaM,SAAUA,QAAQA,CACtBC,KAAQ,EACRC,OAAgB,EAAA;EAEhB,MAAM;IACJC,QAAQ;IACRC,eAAe;AACfC,IAAAA,QAAQ,EAAEC,iBAAiB;IAC3BC,QAAQ;AACRC,IAAAA;AAAQ,GACT,GAAGP,KAAmB;AAEvB,EAAA,MAAM,CAACQ,kBAAkB,EAAEC,WAAW,CAAC,GAAGC,kBAAkB,CAC1DL,iBAAiB,EACjBE,QAAQ,GAAGF,iBAAiB,GAAGM,SAAS,CACzC;AAED,EAAA,MAAMP,QAAQ,GAAG,CAACG,QAAQ,GAAGC,kBAAkB,GAAGH,iBAAiB;AAEnE,EAAA,MAAMO,UAAU,GAAIC,IAAU,IAC5BT,QAAQ,IAAIU,iBAAiB,CAACV,QAAQ,EAAES,IAAI,EAAE,KAAK,EAAEZ,OAAO,CAAC;EAE/D,MAAMc,MAAM,GAAGA,CACbC,WAAiB,EACjBC,SAAoB,EACpBC,CAAyC,KACvC;IACF,MAAM;MAAEC,GAAG;AAAEC,MAAAA;AAAG,KAAE,GAAGpB,KAAmB;AACxC,IAAA,MAAMqB,QAAQ,GAAGL,WAAW,GACxBM,UAAU,CAACN,WAAW,EAAEZ,QAAQ,EAAEe,GAAG,EAAEC,GAAG,EAAEd,QAAQ,EAAEL,OAAO,CAAC,GAC9DU,SAAS;IAEb,IAAIR,eAAe,IAAID,QAAQ,IAAImB,QAAQ,EAAEE,IAAI,IAAIF,QAAQ,CAACG,EAAE,EAAE;AAChE,MAAA,IACEC,sBAAsB,CACpB;QAAEF,IAAI,EAAEF,QAAQ,CAACE,IAAI;QAAEC,EAAE,EAAEH,QAAQ,CAACG;AAAE,OAAE,EACxCtB,QAAQ,EACRD,OAAO,CACR,EACD;AACA;QACAoB,QAAQ,CAACE,IAAI,GAAGP,WAAW;QAC3BK,QAAQ,CAACG,EAAE,GAAGb,SAAS;AACzB;AACF;IAEA,IAAI,CAACJ,QAAQ,EAAE;MACbE,WAAW,CAACY,QAAQ,CAAC;AACvB;IACAd,QAAQ,GAAGc,QAAQ,EAAEL,WAAW,EAAEC,SAAS,EAAEC,CAAC,CAAC;AAE/C,IAAA,OAAOG,QAAQ;GAChB;EAED,OAAO;IACLjB,QAAQ;IACRW,MAAM;AACNH,IAAAA;AACe,GAAA;AACnB;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useRange.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/selection/useRange.js"],"sourcesContent":["import { useControlledValue } from \"../helpers/useControlledValue.js\";\nimport { addToRange, rangeContainsModifiers } from \"../utils/index.js\";\nimport { rangeIncludesDate } from \"../utils/rangeIncludesDate.js\";\n/**\n * Hook to manage range selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected range, a function to select a\n * range, and a function to check if a date is within the range.\n */\nexport function useRange(props, dateLib) {\n const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);\n const select = (triggerDate, modifiers, e) => {\n const { min, max } = props;\n const newRange = triggerDate\n ? addToRange(triggerDate, selected, min, max, required, dateLib)\n : undefined;\n if (excludeDisabled && disabled && newRange?.from && newRange.to) {\n if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {\n // if a disabled days is found, the range is reset\n newRange.from = triggerDate;\n newRange.to = undefined;\n }\n }\n if (!onSelect) {\n setSelected(newRange);\n }\n onSelect?.(newRange, triggerDate, modifiers, e);\n return newRange;\n };\n return {\n selected,\n select,\n isSelected\n };\n}\n//# sourceMappingURL=useRange.js.map"],"names":["useRange","props","dateLib","disabled","excludeDisabled","selected","initiallySelected","required","onSelect","internallySelected","setSelected","useControlledValue","undefined","isSelected","date","rangeIncludesDate","select","triggerDate","modifiers","e","min","max","newRange","addToRange","from","to","rangeContainsModifiers"],"mappings":";;;;;AAaA;;;;;;;;;AASM,SAAUA,QAAQA,CACtBC,KAAQ,EACRC,OAAgB,EAAA;EAEhB,MAAM;IACJC,QAAQ;IACRC,eAAe;AACfC,IAAAA,QAAQ,EAAEC,iBAAiB;IAC3BC,QAAQ;AACRC,IAAAA;AAAQ,GACT,GAAGP,KAAmB;AAEvB,EAAA,MAAM,CAACQ,kBAAkB,EAAEC,WAAW,CAAC,GAAGC,kBAAkB,CAC1DL,iBAAiB,EACjBE,QAAQ,GAAGF,iBAAiB,GAAGM,SAAS,CACzC;AAED,EAAA,MAAMP,QAAQ,GAAG,CAACG,QAAQ,GAAGC,kBAAkB,GAAGH,iBAAiB;AAEnE,EAAA,MAAMO,UAAU,GAAIC,IAAU,IAC5BT,QAAQ,IAAIU,iBAAiB,CAACV,QAAQ,EAAES,IAAI,EAAE,KAAK,EAAEZ,OAAO,CAAC;EAE/D,MAAMc,MAAM,GAAGA,CACbC,WAAiB,EACjBC,SAAoB,EACpBC,CAAyC,KACvC;IACF,MAAM;MAAEC,GAAG;AAAEC,MAAAA;AAAG,KAAE,GAAGpB,KAAmB;AACxC,IAAA,MAAMqB,QAAQ,GAAGL,WAAW,GACxBM,UAAU,CAACN,WAAW,EAAEZ,QAAQ,EAAEe,GAAG,EAAEC,GAAG,EAAEd,QAAQ,EAAEL,OAAO,CAAC,GAC9DU,SAAS;IAEb,IAAIR,eAAe,IAAID,QAAQ,IAAImB,QAAQ,EAAEE,IAAI,IAAIF,QAAQ,CAACG,EAAE,EAAE;AAChE,MAAA,IACEC,sBAAsB,CACpB;QAAEF,IAAI,EAAEF,QAAQ,CAACE,IAAI;QAAEC,EAAE,EAAEH,QAAQ,CAACG;AAAE,OAAE,EACxCtB,QAAQ,EACRD,OAAO,CACR,EACD;AACA;QACAoB,QAAQ,CAACE,IAAI,GAAGP,WAAW;QAC3BK,QAAQ,CAACG,EAAE,GAAGb,SAAS;AACzB;AACF;IAEA,IAAI,CAACJ,QAAQ,EAAE;MACbE,WAAW,CAACY,QAAQ,CAAC;AACvB;IACAd,QAAQ,GAAGc,QAAQ,EAAEL,WAAW,EAAEC,SAAS,EAAEC,CAAC,CAAC;AAE/C,IAAA,OAAOG,QAAQ;GAChB;EAED,OAAO;IACLjB,QAAQ;IACRW,MAAM;AACNH,IAAAA;AACe,GAAA;AACnB;;;;","x_google_ignoreList":[0]}
@@ -1,5 +1,14 @@
1
1
  import { useControlledValue } from '../helpers/useControlledValue.js';
2
2
 
3
+ /**
4
+ * Hook to manage single-date selection in the DayPicker component.
5
+ *
6
+ * @template T - The type of DayPicker props.
7
+ * @param props - The DayPicker props.
8
+ * @param dateLib - The date utility library instance.
9
+ * @returns An object containing the selected date, a function to select a date,
10
+ * and a function to check if a date is selected.
11
+ */
3
12
  function useSingle(props, dateLib) {
4
13
  const {
5
14
  selected: initiallySelected,
@@ -1 +1 @@
1
- {"version":3,"file":"useSingle.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/selection/useSingle.js"],"sourcesContent":["import { useControlledValue } from \"../helpers/useControlledValue.js\";\nexport function useSingle(props, dateLib) {\n const { selected: initiallySelected, required, onSelect } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const { isSameDay } = dateLib;\n const isSelected = (compareDate) => {\n return selected ? isSameDay(selected, compareDate) : false;\n };\n const select = (triggerDate, modifiers, e) => {\n let newDate = triggerDate;\n if (!required && selected && selected && isSameDay(triggerDate, selected)) {\n // If the date is the same, clear the selection.\n newDate = undefined;\n }\n if (!onSelect) {\n setSelected(newDate);\n }\n if (required) {\n onSelect?.(newDate, triggerDate, modifiers, e);\n }\n else {\n onSelect?.(newDate, triggerDate, modifiers, e);\n }\n return newDate;\n };\n return {\n selected,\n select,\n isSelected\n };\n}\n//# sourceMappingURL=useSingle.js.map"],"names":["useSingle","props","dateLib","selected","initiallySelected","required","onSelect","internallySelected","setSelected","useControlledValue","undefined","isSameDay","isSelected","compareDate","select","triggerDate","modifiers","e","newDate"],"mappings":";;AAmBM,SAAUA,SAASA,CACvBC,KAAqB,EACrBC,OAAgB,EAAA;EAEhB,MAAM;AACJC,IAAAA,QAAQ,EAAEC,iBAAiB;IAC3BC,QAAQ;AACRC,IAAAA;AAAQ,GACT,GAAGL,KAAoB;AAExB,EAAA,MAAM,CAACM,kBAAkB,EAAEC,WAAW,CAAC,GAAGC,kBAAkB,CAC1DL,iBAAiB,EACjBE,QAAQ,GAAGF,iBAAiB,GAAGM,SAAS,CACzC;AAED,EAAA,MAAMP,QAAQ,GAAG,CAACG,QAAQ,GAAGC,kBAAkB,GAAGH,iBAAiB;EAEnE,MAAM;AAAEO,IAAAA;AAAS,GAAE,GAAGT,OAAO;EAE7B,MAAMU,UAAU,GAAIC,WAAiB,IAAI;IACvC,OAAOV,QAAQ,GAAGQ,SAAS,CAACR,QAAQ,EAAEU,WAAW,CAAC,GAAG,KAAK;GAC3D;EAED,MAAMC,MAAM,GAAGA,CACbC,WAAiB,EACjBC,SAAoB,EACpBC,CAAyC,KACvC;IACF,IAAIC,OAAO,GAAqBH,WAAW;AAC3C,IAAA,IAAI,CAACV,QAAQ,IAAIF,QAAQ,IAAIA,QAAQ,IAAIQ,SAAS,CAACI,WAAW,EAAEZ,QAAQ,CAAC,EAAE;AACzE;AACAe,MAAAA,OAAO,GAAGR,SAAS;AACrB;IACA,IAAI,CAACJ,QAAQ,EAAE;MACbE,WAAW,CAACU,OAAO,CAAC;AACtB;AACA,IAAA,IAAIb,QAAQ,EAAE;MACZC,QAAQ,GAAGY,OAAe,EAAEH,WAAW,EAAEC,SAAS,EAAEC,CAAC,CAAC;AACxD,KAAC,MAAM;MACLX,QAAQ,GAAGY,OAAO,EAAEH,WAAW,EAAEC,SAAS,EAAEC,CAAC,CAAC;AAChD;AACA,IAAA,OAAOC,OAAO;GACf;EAED,OAAO;IACLf,QAAQ;IACRW,MAAM;AACNF,IAAAA;AACe,GAAA;AACnB;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useSingle.js","sources":["../../../../../../node_modules/react-day-picker/dist/esm/selection/useSingle.js"],"sourcesContent":["import { useControlledValue } from \"../helpers/useControlledValue.js\";\n/**\n * Hook to manage single-date selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected date, a function to select a date,\n * and a function to check if a date is selected.\n */\nexport function useSingle(props, dateLib) {\n const { selected: initiallySelected, required, onSelect } = props;\n const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n const selected = !onSelect ? internallySelected : initiallySelected;\n const { isSameDay } = dateLib;\n const isSelected = (compareDate) => {\n return selected ? isSameDay(selected, compareDate) : false;\n };\n const select = (triggerDate, modifiers, e) => {\n let newDate = triggerDate;\n if (!required && selected && selected && isSameDay(triggerDate, selected)) {\n // If the date is the same, clear the selection.\n newDate = undefined;\n }\n if (!onSelect) {\n setSelected(newDate);\n }\n if (required) {\n onSelect?.(newDate, triggerDate, modifiers, e);\n }\n else {\n onSelect?.(newDate, triggerDate, modifiers, e);\n }\n return newDate;\n };\n return {\n selected,\n select,\n isSelected\n };\n}\n//# sourceMappingURL=useSingle.js.map"],"names":["useSingle","props","dateLib","selected","initiallySelected","required","onSelect","internallySelected","setSelected","useControlledValue","undefined","isSameDay","isSelected","compareDate","select","triggerDate","modifiers","e","newDate"],"mappings":";;AAmBA;;;;;;;;;AASM,SAAUA,SAASA,CACvBC,KAAqB,EACrBC,OAAgB,EAAA;EAEhB,MAAM;AACJC,IAAAA,QAAQ,EAAEC,iBAAiB;IAC3BC,QAAQ;AACRC,IAAAA;AAAQ,GACT,GAAGL,KAAoB;AAExB,EAAA,MAAM,CAACM,kBAAkB,EAAEC,WAAW,CAAC,GAAGC,kBAAkB,CAC1DL,iBAAiB,EACjBE,QAAQ,GAAGF,iBAAiB,GAAGM,SAAS,CACzC;AAED,EAAA,MAAMP,QAAQ,GAAG,CAACG,QAAQ,GAAGC,kBAAkB,GAAGH,iBAAiB;EAEnE,MAAM;AAAEO,IAAAA;AAAS,GAAE,GAAGT,OAAO;EAE7B,MAAMU,UAAU,GAAIC,WAAiB,IAAI;IACvC,OAAOV,QAAQ,GAAGQ,SAAS,CAACR,QAAQ,EAAEU,WAAW,CAAC,GAAG,KAAK;GAC3D;EAED,MAAMC,MAAM,GAAGA,CACbC,WAAiB,EACjBC,SAAoB,EACpBC,CAAyC,KACvC;IACF,IAAIC,OAAO,GAAqBH,WAAW;AAC3C,IAAA,IAAI,CAACV,QAAQ,IAAIF,QAAQ,IAAIA,QAAQ,IAAIQ,SAAS,CAACI,WAAW,EAAEZ,QAAQ,CAAC,EAAE;AACzE;AACAe,MAAAA,OAAO,GAAGR,SAAS;AACrB;IACA,IAAI,CAACJ,QAAQ,EAAE;MACbE,WAAW,CAACU,OAAO,CAAC;AACtB;AACA,IAAA,IAAIb,QAAQ,EAAE;MACZC,QAAQ,GAAGY,OAAe,EAAEH,WAAW,EAAEC,SAAS,EAAEC,CAAC,CAAC;AACxD,KAAC,MAAM;MACLX,QAAQ,GAAGY,OAAO,EAAEH,WAAW,EAAEC,SAAS,EAAEC,CAAC,CAAC;AAChD;AACA,IAAA,OAAOC,OAAO;GACf;EAED,OAAO;IACLf,QAAQ;IACRW,MAAM;AACNF,IAAAA;AACe,GAAA;AACnB;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,158 @@
1
+ import { useRef, useLayoutEffect } from 'react';
2
+ import { Animation } from './UI.js';
3
+
4
+ const asHtmlElement = element => {
5
+ if (element instanceof HTMLElement) return element;
6
+ return null;
7
+ };
8
+ const queryMonthEls = element => [...(element.querySelectorAll("[data-animated-month]") ?? [])];
9
+ const queryMonthEl = element => asHtmlElement(element.querySelector("[data-animated-month]"));
10
+ const queryCaptionEl = element => asHtmlElement(element.querySelector("[data-animated-caption]"));
11
+ const queryWeeksEl = element => asHtmlElement(element.querySelector("[data-animated-weeks]"));
12
+ const queryNavEl = element => asHtmlElement(element.querySelector("[data-animated-nav]"));
13
+ const queryWeekdaysEl = element => asHtmlElement(element.querySelector("[data-animated-weekdays]"));
14
+ /**
15
+ * Handles animations for transitioning between months in the DayPicker
16
+ * component.
17
+ *
18
+ * @private
19
+ * @param rootElRef - A reference to the root element of the DayPicker
20
+ * component.
21
+ * @param enabled - Whether animations are enabled.
22
+ * @param options - Configuration options for the animation, including class
23
+ * names, months, focused day, and the date utility library.
24
+ */
25
+ function useAnimation(rootElRef, enabled, {
26
+ classNames,
27
+ months,
28
+ focused,
29
+ dateLib
30
+ }) {
31
+ const previousRootElSnapshotRef = useRef(null);
32
+ const previousMonthsRef = useRef(months);
33
+ const animatingRef = useRef(false);
34
+ useLayoutEffect(() => {
35
+ // get previous months before updating the previous months ref
36
+ const previousMonths = previousMonthsRef.current;
37
+ // update previous months ref for next effect trigger
38
+ previousMonthsRef.current = months;
39
+ if (!enabled || !rootElRef.current ||
40
+ // safety check because the ref can be set to anything by consumers
41
+ !(rootElRef.current instanceof HTMLElement) ||
42
+ // validation required for the animation to work as expected
43
+ months.length === 0 || previousMonths.length === 0 || months.length !== previousMonths.length) {
44
+ return;
45
+ }
46
+ const isSameMonth = dateLib.isSameMonth(months[0].date, previousMonths[0].date);
47
+ const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);
48
+ const captionAnimationClass = isAfterPreviousMonth ? classNames[Animation.caption_after_enter] : classNames[Animation.caption_before_enter];
49
+ const weeksAnimationClass = isAfterPreviousMonth ? classNames[Animation.weeks_after_enter] : classNames[Animation.weeks_before_enter];
50
+ // get previous root element snapshot before updating the snapshot ref
51
+ const previousRootElSnapshot = previousRootElSnapshotRef.current;
52
+ // update snapshot for next effect trigger
53
+ const rootElSnapshot = rootElRef.current.cloneNode(true);
54
+ if (rootElSnapshot instanceof HTMLElement) {
55
+ // if this effect is triggered while animating, we need to clean up the new root snapshot
56
+ // to put it in the same state as when not animating, to correctly animate the next month change
57
+ const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);
58
+ currentMonthElsSnapshot.forEach(currentMonthElSnapshot => {
59
+ if (!(currentMonthElSnapshot instanceof HTMLElement)) return;
60
+ // remove the old month snapshots from the new root snapshot
61
+ const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);
62
+ if (previousMonthElSnapshot && currentMonthElSnapshot.contains(previousMonthElSnapshot)) {
63
+ currentMonthElSnapshot.removeChild(previousMonthElSnapshot);
64
+ }
65
+ // remove animation classes from the new month snapshots
66
+ const captionEl = queryCaptionEl(currentMonthElSnapshot);
67
+ if (captionEl) {
68
+ captionEl.classList.remove(captionAnimationClass);
69
+ }
70
+ const weeksEl = queryWeeksEl(currentMonthElSnapshot);
71
+ if (weeksEl) {
72
+ weeksEl.classList.remove(weeksAnimationClass);
73
+ }
74
+ });
75
+ previousRootElSnapshotRef.current = rootElSnapshot;
76
+ } else {
77
+ previousRootElSnapshotRef.current = null;
78
+ }
79
+ if (animatingRef.current || isSameMonth ||
80
+ // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
81
+ focused) {
82
+ return;
83
+ }
84
+ const previousMonthEls = previousRootElSnapshot instanceof HTMLElement ? queryMonthEls(previousRootElSnapshot) : [];
85
+ const currentMonthEls = queryMonthEls(rootElRef.current);
86
+ if (currentMonthEls && currentMonthEls.every(el => el instanceof HTMLElement) && previousMonthEls && previousMonthEls.every(el => el instanceof HTMLElement)) {
87
+ animatingRef.current = true;
88
+ // set isolation to isolate to isolate the stacking context during animation
89
+ rootElRef.current.style.isolation = "isolate";
90
+ // set z-index to 1 to ensure the nav is clickable over the other elements being animated
91
+ const navEl = queryNavEl(rootElRef.current);
92
+ if (navEl) {
93
+ navEl.style.zIndex = "1";
94
+ }
95
+ currentMonthEls.forEach((currentMonthEl, index) => {
96
+ const previousMonthEl = previousMonthEls[index];
97
+ if (!previousMonthEl) {
98
+ return;
99
+ }
100
+ // animate new displayed month
101
+ currentMonthEl.style.position = "relative";
102
+ currentMonthEl.style.overflow = "hidden";
103
+ const captionEl = queryCaptionEl(currentMonthEl);
104
+ if (captionEl) {
105
+ captionEl.classList.add(captionAnimationClass);
106
+ }
107
+ const weeksEl = queryWeeksEl(currentMonthEl);
108
+ if (weeksEl) {
109
+ weeksEl.classList.add(weeksAnimationClass);
110
+ }
111
+ // animate new displayed month end
112
+ const cleanUp = () => {
113
+ animatingRef.current = false;
114
+ if (rootElRef.current) {
115
+ rootElRef.current.style.isolation = "";
116
+ }
117
+ if (navEl) {
118
+ navEl.style.zIndex = "";
119
+ }
120
+ if (captionEl) {
121
+ captionEl.classList.remove(captionAnimationClass);
122
+ }
123
+ if (weeksEl) {
124
+ weeksEl.classList.remove(weeksAnimationClass);
125
+ }
126
+ currentMonthEl.style.position = "";
127
+ currentMonthEl.style.overflow = "";
128
+ if (currentMonthEl.contains(previousMonthEl)) {
129
+ currentMonthEl.removeChild(previousMonthEl);
130
+ }
131
+ };
132
+ // animate old displayed month
133
+ previousMonthEl.style.pointerEvents = "none";
134
+ previousMonthEl.style.position = "absolute";
135
+ previousMonthEl.style.overflow = "hidden";
136
+ previousMonthEl.setAttribute("aria-hidden", "true");
137
+ // hide the weekdays container of the old month and only the new one
138
+ const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);
139
+ if (previousWeekdaysEl) {
140
+ previousWeekdaysEl.style.opacity = "0";
141
+ }
142
+ const previousCaptionEl = queryCaptionEl(previousMonthEl);
143
+ if (previousCaptionEl) {
144
+ previousCaptionEl.classList.add(isAfterPreviousMonth ? classNames[Animation.caption_before_exit] : classNames[Animation.caption_after_exit]);
145
+ previousCaptionEl.addEventListener("animationend", cleanUp);
146
+ }
147
+ const previousWeeksEl = queryWeeksEl(previousMonthEl);
148
+ if (previousWeeksEl) {
149
+ previousWeeksEl.classList.add(isAfterPreviousMonth ? classNames[Animation.weeks_before_exit] : classNames[Animation.weeks_after_exit]);
150
+ }
151
+ currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);
152
+ });
153
+ }
154
+ });
155
+ }
156
+
157
+ export { useAnimation };
158
+ //# sourceMappingURL=useAnimation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAnimation.js","sources":["../../../../../node_modules/react-day-picker/dist/esm/useAnimation.js"],"sourcesContent":["import { useLayoutEffect, useRef } from \"react\";\nimport { Animation } from \"./UI.js\";\nconst asHtmlElement = (element) => {\n if (element instanceof HTMLElement)\n return element;\n return null;\n};\nconst queryMonthEls = (element) => [\n ...(element.querySelectorAll(\"[data-animated-month]\") ?? [])\n];\nconst queryMonthEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-month]\"));\nconst queryCaptionEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-caption]\"));\nconst queryWeeksEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weeks]\"));\nconst queryNavEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-nav]\"));\nconst queryWeekdaysEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weekdays]\"));\n/**\n * Handles animations for transitioning between months in the DayPicker\n * component.\n *\n * @private\n * @param rootElRef - A reference to the root element of the DayPicker\n * component.\n * @param enabled - Whether animations are enabled.\n * @param options - Configuration options for the animation, including class\n * names, months, focused day, and the date utility library.\n */\nexport function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib }) {\n const previousRootElSnapshotRef = useRef(null);\n const previousMonthsRef = useRef(months);\n const animatingRef = useRef(false);\n useLayoutEffect(() => {\n // get previous months before updating the previous months ref\n const previousMonths = previousMonthsRef.current;\n // update previous months ref for next effect trigger\n previousMonthsRef.current = months;\n if (!enabled ||\n !rootElRef.current ||\n // safety check because the ref can be set to anything by consumers\n !(rootElRef.current instanceof HTMLElement) ||\n // validation required for the animation to work as expected\n months.length === 0 ||\n previousMonths.length === 0 ||\n months.length !== previousMonths.length) {\n return;\n }\n const isSameMonth = dateLib.isSameMonth(months[0].date, previousMonths[0].date);\n const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);\n const captionAnimationClass = isAfterPreviousMonth\n ? classNames[Animation.caption_after_enter]\n : classNames[Animation.caption_before_enter];\n const weeksAnimationClass = isAfterPreviousMonth\n ? classNames[Animation.weeks_after_enter]\n : classNames[Animation.weeks_before_enter];\n // get previous root element snapshot before updating the snapshot ref\n const previousRootElSnapshot = previousRootElSnapshotRef.current;\n // update snapshot for next effect trigger\n const rootElSnapshot = rootElRef.current.cloneNode(true);\n if (rootElSnapshot instanceof HTMLElement) {\n // if this effect is triggered while animating, we need to clean up the new root snapshot\n // to put it in the same state as when not animating, to correctly animate the next month change\n const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);\n currentMonthElsSnapshot.forEach((currentMonthElSnapshot) => {\n if (!(currentMonthElSnapshot instanceof HTMLElement))\n return;\n // remove the old month snapshots from the new root snapshot\n const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);\n if (previousMonthElSnapshot &&\n currentMonthElSnapshot.contains(previousMonthElSnapshot)) {\n currentMonthElSnapshot.removeChild(previousMonthElSnapshot);\n }\n // remove animation classes from the new month snapshots\n const captionEl = queryCaptionEl(currentMonthElSnapshot);\n if (captionEl) {\n captionEl.classList.remove(captionAnimationClass);\n }\n const weeksEl = queryWeeksEl(currentMonthElSnapshot);\n if (weeksEl) {\n weeksEl.classList.remove(weeksAnimationClass);\n }\n });\n previousRootElSnapshotRef.current = rootElSnapshot;\n }\n else {\n previousRootElSnapshotRef.current = null;\n }\n if (animatingRef.current ||\n isSameMonth ||\n // skip animation if a day is focused because it can cause issues to the animation and is better for a11y\n focused) {\n return;\n }\n const previousMonthEls = previousRootElSnapshot instanceof HTMLElement\n ? queryMonthEls(previousRootElSnapshot)\n : [];\n const currentMonthEls = queryMonthEls(rootElRef.current);\n if (currentMonthEls &&\n currentMonthEls.every((el) => el instanceof HTMLElement) &&\n previousMonthEls &&\n previousMonthEls.every((el) => el instanceof HTMLElement)) {\n animatingRef.current = true;\n const cleanUpFunctions = [];\n // set isolation to isolate to isolate the stacking context during animation\n rootElRef.current.style.isolation = \"isolate\";\n // set z-index to 1 to ensure the nav is clickable over the other elements being animated\n const navEl = queryNavEl(rootElRef.current);\n if (navEl) {\n navEl.style.zIndex = \"1\";\n }\n currentMonthEls.forEach((currentMonthEl, index) => {\n const previousMonthEl = previousMonthEls[index];\n if (!previousMonthEl) {\n return;\n }\n // animate new displayed month\n currentMonthEl.style.position = \"relative\";\n currentMonthEl.style.overflow = \"hidden\";\n const captionEl = queryCaptionEl(currentMonthEl);\n if (captionEl) {\n captionEl.classList.add(captionAnimationClass);\n }\n const weeksEl = queryWeeksEl(currentMonthEl);\n if (weeksEl) {\n weeksEl.classList.add(weeksAnimationClass);\n }\n // animate new displayed month end\n const cleanUp = () => {\n animatingRef.current = false;\n if (rootElRef.current) {\n rootElRef.current.style.isolation = \"\";\n }\n if (navEl) {\n navEl.style.zIndex = \"\";\n }\n if (captionEl) {\n captionEl.classList.remove(captionAnimationClass);\n }\n if (weeksEl) {\n weeksEl.classList.remove(weeksAnimationClass);\n }\n currentMonthEl.style.position = \"\";\n currentMonthEl.style.overflow = \"\";\n if (currentMonthEl.contains(previousMonthEl)) {\n currentMonthEl.removeChild(previousMonthEl);\n }\n };\n cleanUpFunctions.push(cleanUp);\n // animate old displayed month\n previousMonthEl.style.pointerEvents = \"none\";\n previousMonthEl.style.position = \"absolute\";\n previousMonthEl.style.overflow = \"hidden\";\n previousMonthEl.setAttribute(\"aria-hidden\", \"true\");\n // hide the weekdays container of the old month and only the new one\n const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);\n if (previousWeekdaysEl) {\n previousWeekdaysEl.style.opacity = \"0\";\n }\n const previousCaptionEl = queryCaptionEl(previousMonthEl);\n if (previousCaptionEl) {\n previousCaptionEl.classList.add(isAfterPreviousMonth\n ? classNames[Animation.caption_before_exit]\n : classNames[Animation.caption_after_exit]);\n previousCaptionEl.addEventListener(\"animationend\", cleanUp);\n }\n const previousWeeksEl = queryWeeksEl(previousMonthEl);\n if (previousWeeksEl) {\n previousWeeksEl.classList.add(isAfterPreviousMonth\n ? classNames[Animation.weeks_before_exit]\n : classNames[Animation.weeks_after_exit]);\n }\n currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);\n });\n }\n });\n}\n//# sourceMappingURL=useAnimation.js.map"],"names":["asHtmlElement","element","HTMLElement","queryMonthEls","querySelectorAll","queryMonthEl","querySelector","queryCaptionEl","queryWeeksEl","queryNavEl","queryWeekdaysEl","useAnimation","rootElRef","enabled","classNames","months","focused","dateLib","previousRootElSnapshotRef","useRef","previousMonthsRef","animatingRef","useLayoutEffect","previousMonths","current","length","isSameMonth","date","isAfterPreviousMonth","isAfter","captionAnimationClass","Animation","caption_after_enter","caption_before_enter","weeksAnimationClass","weeks_after_enter","weeks_before_enter","previousRootElSnapshot","rootElSnapshot","cloneNode","currentMonthElsSnapshot","forEach","currentMonthElSnapshot","previousMonthElSnapshot","contains","removeChild","captionEl","classList","remove","weeksEl","previousMonthEls","currentMonthEls","every","el","style","isolation","navEl","zIndex","currentMonthEl","index","previousMonthEl","position","overflow","add","cleanUp","pointerEvents","setAttribute","previousWeekdaysEl","opacity","previousCaptionEl","caption_before_exit","caption_after_exit","addEventListener","previousWeeks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iB,SAAS,CAAC2C,iBAAiB,CAAC,GACvC5D,UAAU,CAACiB,SAAS,CAAC4C,gBAAgB,CAAC,CAC3C;AACH;QAEAjB,cAAc,CAACkB,YAAY,CAAChB,eAAe,EAAEF,cAAc,CAACmB,UAAU,CAAC;AACzE,OAAC,CAAC;AACJ;AACF,GAAC,CAAC;AACJ;;;;","x_google_ignoreList":[0]}
@@ -10,7 +10,15 @@ import { getPreviousMonth } from './helpers/getPreviousMonth.js';
10
10
  import { getWeeks } from './helpers/getWeeks.js';
11
11
  import { useControlledValue } from './helpers/useControlledValue.js';
12
12
 
13
- /** @private */
13
+ /**
14
+ * Provides the calendar object to work with the calendar in custom components.
15
+ *
16
+ * @private
17
+ * @param props - The DayPicker props related to calendar configuration.
18
+ * @param dateLib - The date utility library instance.
19
+ * @returns The calendar object containing displayed days, weeks, months, and
20
+ * navigation methods.
21
+ */
14
22
  function useCalendar(props, dateLib) {
15
23
  const [navStart, navEnd] = getNavMonths(props, dateLib);
16
24
  const {