@oracle/oraclejet-preact 20.0.0 → 20.0.2

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 (262) hide show
  1. package/amd/BaseCardView-16fda4c3.js +2 -0
  2. package/amd/{BaseCardView-b8119561.js.map → BaseCardView-16fda4c3.js.map} +1 -1
  3. package/amd/BaseTabBarItem-d7c2922b.js +2 -0
  4. package/amd/BaseTabBarItem-d7c2922b.js.map +1 -0
  5. package/amd/CardFlexView-d3eb7373.js +2 -0
  6. package/amd/{CardFlexView-aa2f3de8.js.map → CardFlexView-d3eb7373.js.map} +1 -1
  7. package/amd/CardGridView-842f70cd.js +2 -0
  8. package/amd/{CardGridView-85f90c75.js.map → CardGridView-842f70cd.js.map} +1 -1
  9. package/amd/CheckboxSetContext-2e486ea8.js +2 -0
  10. package/{cjs/CheckboxSetContext-c62db26d.js.map → amd/CheckboxSetContext-2e486ea8.js.map} +1 -1
  11. package/amd/{CollapsibleNavigationList-f0072c90.js → CollapsibleNavigationList-fdeccbfb.js} +2 -2
  12. package/amd/{CollapsibleNavigationList-f0072c90.js.map → CollapsibleNavigationList-fdeccbfb.js.map} +1 -1
  13. package/amd/{DatePicker-88c5bbcd.js → DatePicker-bf521b1c.js} +2 -2
  14. package/amd/{DatePicker-88c5bbcd.js.map → DatePicker-bf521b1c.js.map} +1 -1
  15. package/amd/ExpandableList-a9a86ad8.js +2 -0
  16. package/amd/{ExpandableList-233c279e.js.map → ExpandableList-a9a86ad8.js.map} +1 -1
  17. package/amd/{FlatTreeView-9ecf2be6.js → FlatTreeView-15edd439.js} +2 -2
  18. package/amd/{FlatTreeView-9ecf2be6.js.map → FlatTreeView-15edd439.js.map} +1 -1
  19. package/amd/{InlineSelectSingle-f4438110.js → InlineSelectSingle-7c1cc5b5.js} +2 -2
  20. package/amd/{InlineSelectSingle-f4438110.js.map → InlineSelectSingle-7c1cc5b5.js.map} +1 -1
  21. package/amd/InputDatePicker-7227a858.js +2 -0
  22. package/amd/{InputDatePicker-48633486.js.map → InputDatePicker-7227a858.js.map} +1 -1
  23. package/amd/ListView-6d21e8f9.js +2 -0
  24. package/amd/{ListView-2678b2af.js.map → ListView-6d21e8f9.js.map} +1 -1
  25. package/amd/{MonthView-ea883c49.js → MonthView-96fafba4.js} +2 -2
  26. package/amd/{MonthView-ea883c49.js.map → MonthView-96fafba4.js.map} +1 -1
  27. package/amd/{OverflowTabBar-b142f8d4.js → OverflowTabBar-5ff68da7.js} +2 -2
  28. package/amd/{OverflowTabBar-b142f8d4.js.map → OverflowTabBar-5ff68da7.js.map} +1 -1
  29. package/amd/{OverflowTabBarItem-49a82149.js → OverflowTabBarItem-926b0c8a.js} +2 -2
  30. package/amd/{OverflowTabBarItem-49a82149.js.map → OverflowTabBarItem-926b0c8a.js.map} +1 -1
  31. package/amd/PRIVATE_BaseCardView.js +1 -1
  32. package/amd/PRIVATE_CollapsibleNavigationList.js +1 -1
  33. package/amd/PRIVATE_MonthView.js +1 -1
  34. package/amd/PRIVATE_MonthYearGridView.js +1 -1
  35. package/amd/PRIVATE_SelectCommon.js +1 -1
  36. package/amd/PRIVATE_StyledDatePickerButton.js +1 -1
  37. package/amd/PRIVATE_TableList.js +1 -1
  38. package/amd/{RemovableTabBarItem-e1bee7fa.js → RemovableTabBarItem-9ae273fe.js} +2 -2
  39. package/amd/{RemovableTabBarItem-e1bee7fa.js.map → RemovableTabBarItem-9ae273fe.js.map} +1 -1
  40. package/amd/ReorderableTabBar-0c69bfd4.js +2 -0
  41. package/amd/{ReorderableTabBar-46683bcb.js.map → ReorderableTabBar-0c69bfd4.js.map} +1 -1
  42. package/amd/{SelectMobileFieldInput-83f56b22.js → SelectMobileFieldInput-d499ef86.js} +2 -2
  43. package/amd/{SelectMobileFieldInput-83f56b22.js.map → SelectMobileFieldInput-d499ef86.js.map} +1 -1
  44. package/amd/{SelectMultiple-cb5fdd20.js → SelectMultiple-cc9bffc6.js} +2 -2
  45. package/amd/{SelectMultiple-cb5fdd20.js.map → SelectMultiple-cc9bffc6.js.map} +1 -1
  46. package/amd/{SelectSingle-02e85b6e.js → SelectSingle-2bb35b67.js} +2 -2
  47. package/amd/{SelectSingle-02e85b6e.js.map → SelectSingle-2bb35b67.js.map} +1 -1
  48. package/amd/StyledDatePickerButton-bceb62e1.js +2 -0
  49. package/amd/StyledDatePickerButton-bceb62e1.js.map +1 -0
  50. package/amd/StyledDatePickerButtonStyles.styles.css +17 -0
  51. package/amd/TabBar-de723fbc.js +2 -0
  52. package/amd/{TabBar-fcebb560.js.map → TabBar-de723fbc.js.map} +1 -1
  53. package/amd/TabBarItem-a39c5de3.js +2 -0
  54. package/amd/{TabBarItem-224bc6b3.js.map → TabBarItem-a39c5de3.js.map} +1 -1
  55. package/amd/TabBarLinkItem-944b1e8d.js +2 -0
  56. package/amd/{TabBarLinkItem-57587dbd.js.map → TabBarLinkItem-944b1e8d.js.map} +1 -1
  57. package/amd/TabBarMixed-cfd346bf.js +2 -0
  58. package/amd/{TabBarMixed-8cc4b4ed.js.map → TabBarMixed-cfd346bf.js.map} +1 -1
  59. package/amd/Theme-redwood/theme.css +201 -201
  60. package/amd/Theme-stable/theme.css +218 -218
  61. package/amd/UNSAFE_CardFlexView.js +1 -1
  62. package/amd/UNSAFE_CardGridView.js +1 -1
  63. package/amd/UNSAFE_CheckboxItem.js +1 -1
  64. package/amd/UNSAFE_CheckboxItem.js.map +1 -1
  65. package/amd/UNSAFE_CheckboxSet.js +1 -1
  66. package/amd/UNSAFE_CheckboxSet.js.map +1 -1
  67. package/amd/UNSAFE_DatePicker.js +1 -1
  68. package/amd/UNSAFE_ExpandableList.js +1 -1
  69. package/amd/UNSAFE_FlatTreeView.js +1 -1
  70. package/amd/UNSAFE_InlineSelectSingle.js +1 -1
  71. package/amd/UNSAFE_InputDatePicker.js +1 -1
  72. package/amd/UNSAFE_ListView.js +1 -1
  73. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  74. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  75. package/amd/UNSAFE_RichCheckboxSet.js +1 -1
  76. package/amd/UNSAFE_RichCheckboxSet.js.map +1 -1
  77. package/amd/UNSAFE_RichSelectionItem.js +1 -1
  78. package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
  79. package/amd/UNSAFE_SelectMultiple.js +1 -1
  80. package/amd/UNSAFE_SelectSingle.js +1 -1
  81. package/amd/UNSAFE_TabBar.js +1 -1
  82. package/amd/UNSAFE_TabBarCommon.js +1 -1
  83. package/amd/UNSAFE_TabBarMixed.js +1 -1
  84. package/amd/UNSAFE_VirtualizedListView.js +1 -1
  85. package/amd/VirtualizedListView-1ae7151d.js +2 -0
  86. package/amd/{VirtualizedListView-a0f338c2.js.map → VirtualizedListView-1ae7151d.js.map} +1 -1
  87. package/amd/{YearsGridView-4aa7bc66.js → YearsGridView-561c3074.js} +2 -2
  88. package/amd/{YearsGridView-4aa7bc66.js.map → YearsGridView-561c3074.js.map} +1 -1
  89. package/amd/{useDisplayValue-e70c76d8.js → useDisplayValue-0e90bf4c.js} +2 -2
  90. package/amd/{useDisplayValue-e70c76d8.js.map → useDisplayValue-0e90bf4c.js.map} +1 -1
  91. package/amd/useSelectCommon-a02ddf3c.js +2 -0
  92. package/amd/useSelectCommon-a02ddf3c.js.map +1 -0
  93. package/cjs/{Chart-13a198f3.js → Chart-966da017.js} +2 -2
  94. package/cjs/{Chart-13a198f3.js.map → Chart-966da017.js.map} +1 -1
  95. package/cjs/CheckboxSet-6865f4fd.js +55 -0
  96. package/{amd/CheckboxSet-f000e5c2.js.map → cjs/CheckboxSet-6865f4fd.js.map} +1 -1
  97. package/cjs/{ColorPalette-9f041744.js → ColorPalette-b14114d8.js} +2 -2
  98. package/cjs/{ColorPalette-9f041744.js.map → ColorPalette-b14114d8.js.map} +1 -1
  99. package/cjs/{ColorPicker-9af6707c.js → ColorPicker-8f0b6000.js} +2 -2
  100. package/cjs/{ColorPicker-9af6707c.js.map → ColorPicker-8f0b6000.js.map} +1 -1
  101. package/cjs/{DatePicker-48c602ff.js → DatePicker-b60f8a7e.js} +3 -3
  102. package/cjs/{DatePicker-48c602ff.js.map → DatePicker-b60f8a7e.js.map} +1 -1
  103. package/cjs/{MonthView-59452edc.js → MonthView-a2661a58.js} +2 -2
  104. package/cjs/{MonthView-59452edc.js.map → MonthView-a2661a58.js.map} +1 -1
  105. package/cjs/{OverflowTabBarItem-2c967a89.js → OverflowTabBarItem-abcd2327.js} +6 -3
  106. package/cjs/OverflowTabBarItem-abcd2327.js.map +1 -0
  107. package/cjs/PRIVATE_Chart.js +4 -4
  108. package/cjs/PRIVATE_MonthView.js +2 -3
  109. package/cjs/PRIVATE_MonthView.js.map +1 -1
  110. package/cjs/PRIVATE_MonthYearGridView.js +2 -3
  111. package/cjs/PRIVATE_MonthYearGridView.js.map +1 -1
  112. package/cjs/PRIVATE_SelectCommon.js +2 -2
  113. package/cjs/PRIVATE_StyledDatePickerButton.js +1 -2
  114. package/cjs/PRIVATE_StyledDatePickerButton.js.map +1 -1
  115. package/cjs/SegmentStyles.styles.css +12 -9
  116. package/cjs/SegmentStyles.styles2.css +9 -12
  117. package/cjs/{SelectMobileFieldInput-111a95a5.js → SelectMobileFieldInput-cbf57541.js} +2 -2
  118. package/cjs/{SelectMobileFieldInput-111a95a5.js.map → SelectMobileFieldInput-cbf57541.js.map} +1 -1
  119. package/cjs/{StyledDatePickerButton-cf4e4dc0.js → StyledDatePickerButton-becd2a7d.js} +2 -8
  120. package/cjs/StyledDatePickerButton-becd2a7d.js.map +1 -0
  121. package/cjs/StyledDatePickerButtonStyles.styles.css +17 -0
  122. package/cjs/{TabBarLinkItem-42785eb3.js → TabBarLinkItem-b0c4b100.js} +2 -2
  123. package/cjs/{TabBarLinkItem-42785eb3.js.map → TabBarLinkItem-b0c4b100.js.map} +1 -1
  124. package/cjs/Theme-redwood/theme.css +117 -117
  125. package/cjs/Theme-stable/theme.css +224 -224
  126. package/cjs/UNSAFE_BarChart.js +4 -4
  127. package/cjs/UNSAFE_CheckboxItem.js +117 -56
  128. package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
  129. package/cjs/UNSAFE_CheckboxSet.js +21 -50
  130. package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
  131. package/cjs/UNSAFE_ColorPalette.js +80 -80
  132. package/cjs/UNSAFE_ColorPicker.js +60 -60
  133. package/cjs/UNSAFE_ComboChart.js +4 -4
  134. package/cjs/UNSAFE_DatePicker.js +4 -4
  135. package/cjs/UNSAFE_InlineSelectSingle.js +2 -2
  136. package/cjs/UNSAFE_InputColor.js +11 -11
  137. package/cjs/UNSAFE_InputDatePicker.js +96 -96
  138. package/cjs/UNSAFE_LineAreaChart.js +4 -4
  139. package/cjs/UNSAFE_OverflowTabBar.js +2 -2
  140. package/cjs/UNSAFE_RichCheckboxSet.js +46 -42
  141. package/cjs/UNSAFE_RichCheckboxSet.js.map +1 -1
  142. package/cjs/UNSAFE_RichSelectionItem.js +154 -91
  143. package/cjs/UNSAFE_RichSelectionItem.js.map +1 -1
  144. package/cjs/UNSAFE_ScatterChart.js +4 -4
  145. package/cjs/UNSAFE_SelectMultiple.js +2 -2
  146. package/cjs/UNSAFE_SelectSingle.js +3 -3
  147. package/cjs/UNSAFE_TabBar.js +2 -2
  148. package/cjs/UNSAFE_TabBarCommon.js +4 -4
  149. package/cjs/UNSAFE_TabBarMixed.js +3 -3
  150. package/cjs/{YearsGridView-b56f7f42.js → YearsGridView-d0d4e8e1.js} +2 -2
  151. package/cjs/{YearsGridView-b56f7f42.js.map → YearsGridView-d0d4e8e1.js.map} +1 -1
  152. package/cjs/{useDisplayValue-60dbe1c3.js → useDisplayValue-4ace417c.js} +2 -2
  153. package/cjs/{useDisplayValue-60dbe1c3.js.map → useDisplayValue-4ace417c.js.map} +1 -1
  154. package/cjs/{useSelectCommon-b0d7feb3.js → useSelectCommon-27afecfa.js} +8 -3
  155. package/cjs/useSelectCommon-27afecfa.js.map +1 -0
  156. package/es/{BaseCardView-85b9a71e.js → BaseCardView-b3d8bae0.js} +4 -1
  157. package/es/{BaseCardView-85b9a71e.js.map → BaseCardView-b3d8bae0.js.map} +1 -1
  158. package/es/{DatePicker-2ab05fbe.js → DatePicker-7287f0f9.js} +3 -3
  159. package/es/{DatePicker-2ab05fbe.js.map → DatePicker-7287f0f9.js.map} +1 -1
  160. package/es/{MonthView-097171eb.js → MonthView-4b2b483a.js} +2 -2
  161. package/es/{MonthView-097171eb.js.map → MonthView-4b2b483a.js.map} +1 -1
  162. package/es/{NavigationListItem-dbd29973.js → NavigationListItem-340ab770.js} +19 -1
  163. package/es/{NavigationListItem-dbd29973.js.map → NavigationListItem-340ab770.js.map} +1 -1
  164. package/es/{OverflowTabBarItem-6966fbc7.js → OverflowTabBarItem-aa0ce915.js} +7 -4
  165. package/es/OverflowTabBarItem-aa0ce915.js.map +1 -0
  166. package/es/PRIVATE_BaseCardView.js +1 -1
  167. package/es/PRIVATE_CollapsibleNavigationList.js +25 -25
  168. package/es/PRIVATE_MonthView.js +2 -3
  169. package/es/PRIVATE_MonthView.js.map +1 -1
  170. package/es/PRIVATE_MonthYearGridView.js +2 -3
  171. package/es/PRIVATE_MonthYearGridView.js.map +1 -1
  172. package/es/PRIVATE_SelectCommon.js +2 -2
  173. package/es/PRIVATE_StyledDatePickerButton.js +1 -2
  174. package/es/PRIVATE_StyledDatePickerButton.js.map +1 -1
  175. package/es/PRIVATE_TableList.js +4 -4
  176. package/es/RadioIconVariants.styles.css +3 -3
  177. package/es/RadioIconVariants.styles2.css +3 -3
  178. package/es/SegmentStyles.styles.css +9 -12
  179. package/es/SegmentStyles.styles2.css +12 -9
  180. package/es/{SelectMobileFieldInput-0a7c968c.js → SelectMobileFieldInput-345c4d45.js} +2 -2
  181. package/es/{SelectMobileFieldInput-0a7c968c.js.map → SelectMobileFieldInput-345c4d45.js.map} +1 -1
  182. package/es/{StyledDatePickerButton-f3971567.js → StyledDatePickerButton-78f2f6e8.js} +2 -8
  183. package/es/StyledDatePickerButton-78f2f6e8.js.map +1 -0
  184. package/es/StyledDatePickerButtonStyles.styles.css +17 -0
  185. package/es/{TabBar-10488830.js → TabBar-67ca442c.js} +3 -1
  186. package/es/{TabBar-10488830.js.map → TabBar-67ca442c.js.map} +1 -1
  187. package/es/{TabBarLinkItem-a9c1072b.js → TabBarLinkItem-e7be54fa.js} +2 -2
  188. package/es/{TabBarLinkItem-a9c1072b.js.map → TabBarLinkItem-e7be54fa.js.map} +1 -1
  189. package/es/Theme-redwood/theme.css +442 -442
  190. package/es/Theme-stable/theme.css +507 -507
  191. package/es/TrainVariants.styles.css +6 -6
  192. package/es/TrainVariants.styles2.css +6 -6
  193. package/es/UNSAFE_CardFlexView.js +1 -1
  194. package/es/UNSAFE_CardGridView.js +1 -1
  195. package/es/UNSAFE_DatePicker.js +4 -4
  196. package/es/UNSAFE_FlatTreeView.js +14 -14
  197. package/es/UNSAFE_InlineSelectSingle.js +2 -2
  198. package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
  199. package/es/UNSAFE_InputDateMask.js +1 -1
  200. package/es/UNSAFE_InputDatePicker.js +5 -5
  201. package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
  202. package/es/UNSAFE_InputTimeMask.js +1 -1
  203. package/es/UNSAFE_ListView.js +53 -53
  204. package/es/UNSAFE_NavigationList.js +13 -13
  205. package/es/UNSAFE_OverflowTabBar.js +13 -13
  206. package/es/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js +1 -1
  207. package/es/UNSAFE_RadioItem/themes/redwood/RadioIconVariants.css.js +1 -1
  208. package/es/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js +1 -1
  209. package/es/UNSAFE_RadioItem/themes/stable/RadioIconVariants.css.js +1 -1
  210. package/es/UNSAFE_RadioItem.js +1 -1
  211. package/es/UNSAFE_ReorderableTabBar.js +12 -12
  212. package/es/UNSAFE_RichSelectionItem.js +1 -1
  213. package/es/UNSAFE_SelectMultiple.js +2 -2
  214. package/es/UNSAFE_SelectSingle.js +3 -3
  215. package/es/UNSAFE_TabBar.js +13 -13
  216. package/es/UNSAFE_TabBarCommon.js +5 -5
  217. package/es/UNSAFE_TabBarMixed.js +12 -12
  218. package/es/UNSAFE_TextArea.js +226 -106
  219. package/es/UNSAFE_TextArea.js.map +1 -1
  220. package/es/UNSAFE_TextAreaAutosize.js +1 -1
  221. package/es/UNSAFE_Train/themes/redwood/TrainTheme.js +1 -1
  222. package/es/UNSAFE_Train/themes/redwood/TrainVariants.css.js +1 -1
  223. package/es/UNSAFE_Train/themes/stable/TrainTheme.js +1 -1
  224. package/es/UNSAFE_Train/themes/stable/TrainVariants.css.js +1 -1
  225. package/es/UNSAFE_Train.js +1 -1
  226. package/es/{YearsGridView-cac4710a.js → YearsGridView-6c18094a.js} +2 -2
  227. package/es/{YearsGridView-cac4710a.js.map → YearsGridView-6c18094a.js.map} +1 -1
  228. package/es/{useDisplayValue-5bbf2830.js → useDisplayValue-65bbc74e.js} +2 -2
  229. package/es/{useDisplayValue-5bbf2830.js.map → useDisplayValue-65bbc74e.js.map} +1 -1
  230. package/es/{useSelectCommon-309d0f07.js → useSelectCommon-a3c69d60.js} +8 -3
  231. package/es/useSelectCommon-a3c69d60.js.map +1 -0
  232. package/es/useTextAreaAltEnter-ac460f4c.js +61 -0
  233. package/es/useTextAreaAltEnter-ac460f4c.js.map +1 -0
  234. package/package.json +2 -2
  235. package/amd/BaseCardView-b8119561.js +0 -2
  236. package/amd/BaseTabBarItem-03c91d3f.js +0 -2
  237. package/amd/BaseTabBarItem-03c91d3f.js.map +0 -1
  238. package/amd/CardFlexView-aa2f3de8.js +0 -2
  239. package/amd/CardGridView-85f90c75.js +0 -2
  240. package/amd/CheckboxSet-f000e5c2.js +0 -2
  241. package/amd/ExpandableList-233c279e.js +0 -2
  242. package/amd/InputDatePicker-48633486.js +0 -2
  243. package/amd/ListView-2678b2af.js +0 -2
  244. package/amd/ReorderableTabBar-46683bcb.js +0 -2
  245. package/amd/StyledDatePickerButton-b664f4f0.js +0 -2
  246. package/amd/StyledDatePickerButton-b664f4f0.js.map +0 -1
  247. package/amd/TabBar-fcebb560.js +0 -2
  248. package/amd/TabBarItem-224bc6b3.js +0 -2
  249. package/amd/TabBarLinkItem-57587dbd.js +0 -2
  250. package/amd/TabBarMixed-8cc4b4ed.js +0 -2
  251. package/amd/VirtualizedListView-a0f338c2.js +0 -2
  252. package/amd/useSelectCommon-28307b63.js +0 -2
  253. package/amd/useSelectCommon-28307b63.js.map +0 -1
  254. package/cjs/CheckboxSetContext-c62db26d.js +0 -12
  255. package/cjs/OverflowTabBarItem-2c967a89.js.map +0 -1
  256. package/cjs/StyledDatePickerButton-cf4e4dc0.js.map +0 -1
  257. package/cjs/useSelectCommon-b0d7feb3.js.map +0 -1
  258. package/es/OverflowTabBarItem-6966fbc7.js.map +0 -1
  259. package/es/StyledDatePickerButton-f3971567.js.map +0 -1
  260. package/es/TextArea-93ce78a7.js +0 -225
  261. package/es/TextArea-93ce78a7.js.map +0 -1
  262. package/es/useSelectCommon-309d0f07.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker-2ab05fbe.js","sources":["../../src/UNSAFE_DatePicker/useDatePickerState.ts","../../src/UNSAFE_DatePicker/useDatePicker.ts","../../src/UNSAFE_DatePicker/TodayButton.tsx","../../src/UNSAFE_DatePicker/DatePicker.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport {\n addToCalendarDate,\n addToMonth,\n addToYear,\n compareDates,\n getDaysInMonth\n} from '#utils/UNSAFE_calendarDateUtils';\nimport { useMemo, useReducer, useRef } from 'preact/compat';\n\n// This is the type of the state that is returned from the useDatePickerState reducer.\n// This is a single state that will handle the different views of the DatePicker, the\n// MonthView, the MonthGridView, and the YearGridView. Initially we have implemented\n// the state for the MonthView.\ntype DatePickerState = {\n /**\n * Specifies the current view the DatePicker is showing.\n */\n currentView: 'monthView' | 'monthsGridView' | 'yearsGridView';\n\n /**\n * The focusableDate is the one day in the MonthView that has tabIndex: 0 on it.\n * If nothing is selected, the DatePicker initially renders\n * with Today as the focusableDate. The focusableDate doesn't have focus until the user tabs in\n * to the Month View.\n * When the user navigates the days with the arrow keys,\n * the focusableDate changes along with the focusedDate, and they will be the same date.\n * This is a 'roving' index.\n * The focusableDate is never undefined.\n * <p>\n * If the user keyboards to the next month (Fn+Down Arrow on a Mac),\n * then the focusableDate and the focusedDate of the next month\n * is the same day number, or as close as possible to stay in the same month. For example,\n * if the focusedDate and focusableDate is April 2, 2024, the focusedDate and focusableDate for the next month is May 2, 2024.\n * If the focusedDate and focusableDate is February 28, 2024, the focusedDate and focusableDate for the next month is March 28, 2024.\n * If the focusedDate and focusableDate is January 31, 2024, the focusedDate and focusableDate for the next month is February 29, 2024 (2024 is a leap year).\n * </p>\n * <p>\n * If the user clicks the Next Month button in the DatePicker's header, then\n * there is no date that has focus, so the focusedDate is undefined.\n * The focusableDate will be set.\n * For example,\n * if the focusableDate is April 2, 2024, the focusableDate for the next month is May 2, 2024.\n * If the focusableDate is February 28, 2024, the focusableDate for the next month is March 28, 2024.\n * If the focusableDate is January 31, 2024, the focusableDate for the next month is February 29, 2024 (2024 is a leap year).\n *\n * </p>\n */\n focusableDate: CalendarDateRequired;\n\n /**\n * The focusableMonth is the one month in the MonthsGridView that has tabIndex: 0 on it.\n * If nothing is selected, the DatePicker initially renders with Today's month as the\n * focusableMonth. The focusableMonth doesn't have focus until the user tabs in\n * to the Months Grid View.\n *\n * When the user navigates the month with the arrow keys, the focusableMonth changes\n * along with the focusedMonth, and they will be the same date. This is a 'roving' index.\n *\n * The focusableMonth is never undefined.\n */\n focusableMonth: CalendarDateRequired['month'];\n\n /**\n * The focusableYear is the one month in the YearsGridView that has tabIndex: 0 on it.\n * If nothing is selected, the DatePicker initially renders with Today's month as the\n * focusableYear. The focusableYear doesn't have focus until the user tabs in\n * to the Months Grid View.\n *\n * When the user navigates the month with the arrow keys, the focusableYear changes\n * along with the focusedYear, and they will be the same date. This is a 'roving' index.\n *\n * The focusableYear is never undefined.\n */\n focusableYear: CalendarDateRequired['year'];\n\n /**\n * A boolean to indicate if the focus is in the view.\n */\n isViewFocused: boolean;\n\n /**\n * Specifies whether to hide the previous navigation button is hidden from the header.\n */\n isPreviousNavigationButtonHidden: boolean;\n\n /**\n * Specifies whether to hide the today navigation button is hidden from the header.\n */\n isTodayNavigationButtonHidden: boolean;\n\n /**\n * Specifies whether to hide the next navigation button is hidden from the header.\n */\n isNextNavigationButtonHidden: boolean;\n};\n\nconst datePickerResetActionTypes = ['reset'] as const;\n\nconst datePickerViewActionTypes = [\n 'monthView',\n 'monthsGridView',\n 'yearsGridView',\n 'viewBlur'\n] as const;\n\nconst monthViewActionTypes = [\n 'dayFocused',\n 'daySelected',\n 'goToToday',\n 'previousDay',\n 'nextDay',\n 'previousWeek',\n 'nextWeek',\n 'previousMonth',\n 'previousMonthAndFocus',\n 'nextMonth',\n 'nextMonthAndFocus',\n 'previousYear',\n 'nextYear',\n 'firstDayOfMonth',\n 'lastDayOfMonth'\n] as const;\n\nconst monthsGridViewActionTypes = [\n 'previousMonthInGridView',\n 'nextMonthInGridView',\n 'previousMonthRowInGridView',\n 'nextMonthRowInGridView',\n 'monthFocused',\n 'monthSelected'\n] as const;\n\nconst yearsGridViewActionTypes = [\n 'previousYearInGridView',\n 'nextYearInGridView',\n 'previousYearRowInGridView',\n 'nextYearRowInGridView',\n 'previousDecade',\n 'previousDecadeAndFocus',\n 'nextDecade',\n 'nextDecadeAndFocus',\n 'yearFocused',\n 'yearSelected'\n] as const;\n\ntype DatePickerViewActionTypes = (typeof datePickerViewActionTypes)[number];\ntype DatePickerResetActionTypes = (typeof datePickerResetActionTypes)[number];\ntype MonthViewActionTypes = (typeof monthViewActionTypes)[number];\ntype MonthsGridViewActionTypes = (typeof monthsGridViewActionTypes)[number];\ntype YearsGridViewActionTypes = (typeof yearsGridViewActionTypes)[number];\n\n// This is the type of the actions that the hook returns.\ntype DatePickerStateAction = ReturnType<typeof useDatePickerState>['actions'];\n\n// Type for the action of the datePickerReducer.\ntype DatePickerViewAction = {\n [Type in DatePickerViewActionTypes]: { type: Type; payload?: undefined };\n}[DatePickerViewActionTypes];\n\ntype DatePickerResetAction = {\n [Type in DatePickerResetActionTypes]: { type: Type; payload: DatePickerState };\n}[DatePickerResetActionTypes];\n\ntype MonthViewAction = {\n [Type in MonthViewActionTypes]: { type: Type; payload: CalendarDateRequired };\n}[MonthViewActionTypes];\n\ntype MonthsGridViewAction = {\n [Type in MonthsGridViewActionTypes]: { type: Type; payload: Pick<CalendarDateRequired, 'month'> };\n}[MonthsGridViewActionTypes];\n\ntype YearsGridViewAction = {\n [Type in YearsGridViewActionTypes]: { type: Type; payload: Pick<CalendarDateRequired, 'year'> };\n}[YearsGridViewActionTypes];\n\ntype DatePickerReducerAction =\n | DatePickerResetAction\n | DatePickerViewAction\n | MonthViewAction\n | MonthsGridViewAction\n | YearsGridViewAction;\n\n// A reducer is a plain old function you write that takes the current state,\n// and the action to be processed, and returns the state as it should be, based on that action occurring.\n// The reducer, not the sender, determines how a given report (action) affects the state.\nconst datePickerReducer = (\n state: DatePickerState,\n action: DatePickerReducerAction\n): DatePickerState => {\n // On mount, the reducer is initialized with initial state derived from the DatePicker's value.\n // If that value is changed programmatically afterwards, the only way to push that update\n // into the reducer is to define a \"reset\" action.\n if (action.type === 'reset') {\n return action.payload!;\n }\n\n switch (action.type) {\n case 'monthView': {\n return {\n ...state,\n currentView: 'monthView',\n isViewFocused: false,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: false\n };\n }\n case 'monthsGridView': {\n return {\n ...state,\n currentView: 'monthsGridView',\n focusableMonth: state.focusableDate.month,\n isViewFocused: false,\n isNextNavigationButtonHidden: true,\n isPreviousNavigationButtonHidden: true,\n isTodayNavigationButtonHidden: true\n };\n }\n case 'yearsGridView': {\n return {\n ...state,\n currentView: 'yearsGridView',\n focusableYear: state.focusableDate.year,\n isViewFocused: false,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: true\n };\n }\n case 'viewBlur': {\n return state.isViewFocused ? { ...state, isViewFocused: false } : state;\n }\n case 'dayFocused':\n case 'daySelected': {\n return { ...state, isViewFocused: true, focusableDate: action.payload };\n }\n case 'goToToday': {\n // User clicked on the 'Today' icon, which means they want to navigate to show the month of Today\n // payload is Today's date. We also set the focus to Today.\n return { ...state, isViewFocused: true, focusableDate: action.payload };\n }\n case 'previousDay': {\n const previousDay = addToCalendarDate(action.payload, { days: -1 });\n return { ...state, isViewFocused: true, focusableDate: previousDay };\n }\n case 'nextDay': {\n const nextDay = addToCalendarDate(action.payload, { days: 1 });\n return { ...state, isViewFocused: true, focusableDate: nextDay };\n }\n case 'previousWeek': {\n const previousDay = addToCalendarDate(action.payload, { days: -7 });\n return { ...state, isViewFocused: true, focusableDate: previousDay };\n }\n case 'nextWeek': {\n const nextDay = addToCalendarDate(action.payload, { days: 7 });\n return { ...state, isViewFocused: true, focusableDate: nextDay };\n }\n case 'previousMonth':\n case 'previousMonthAndFocus': {\n // PageUp moves focus to the previous month.\n // We also get here if the DatePicker while in month view header's Previous navigation button is pressed.\n const prevMonth = addToCalendarDate(action.payload, { months: -1 });\n return {\n ...state,\n isViewFocused: action.type === 'previousMonthAndFocus',\n focusableDate: prevMonth\n };\n }\n case 'nextMonth':\n case 'nextMonthAndFocus': {\n // Shift PageDown moves focus to the next month. TODO: Confirm this works on a Windows machine.\n // Shift Fn Arrow Down works on my Mac.\n // We also get here if the DatePicker while in month view header's Next navigation button is pressed.\n const nextMonth = addToCalendarDate(action.payload, { months: 1 });\n return {\n ...state,\n isViewFocused: action.type === 'nextMonthAndFocus',\n focusableDate: nextMonth\n };\n }\n case 'previousYear': {\n // Shift Page Up moves focus to the previous year. TODO: Confirm this works on a Windows machine.\n const previousYear = addToCalendarDate(action.payload, { years: -1 });\n return { ...state, isViewFocused: true, focusableDate: previousYear };\n }\n case 'nextYear': {\n const nextYear = addToCalendarDate(action.payload, { years: 1 });\n return { ...state, isViewFocused: true, focusableDate: nextYear };\n }\n case 'firstDayOfMonth': {\n // Home moves focus to the first day of the month (Fn+LeftArrow on a mouse.)\n const currentDate = action.payload;\n const firstDayOfMonthDate = {\n year: currentDate.year,\n month: currentDate.month,\n day: 1\n } as CalendarDateRequired;\n return { ...state, isViewFocused: true, focusableDate: firstDayOfMonthDate };\n }\n case 'lastDayOfMonth': {\n // End moves focus to the last day of the month\n const currentDate = action.payload;\n const lastDay = getDaysInMonth(currentDate.month, currentDate.year);\n const lastDayOfMonthDate = {\n year: currentDate.year,\n month: currentDate.month,\n day: lastDay\n } as CalendarDateRequired;\n return { ...state, isViewFocused: true, focusableDate: lastDayOfMonthDate };\n }\n\n case 'previousMonthInGridView': {\n const previousMonth = addToMonth(action.payload.month, -1);\n return { ...state, focusableMonth: previousMonth, isViewFocused: true };\n }\n case 'previousMonthRowInGridView': {\n const previousMonth = addToMonth(action.payload.month, -4);\n return { ...state, focusableMonth: previousMonth, isViewFocused: true };\n }\n case 'nextMonthInGridView': {\n const nextMonth = addToMonth(action.payload.month, 1);\n return { ...state, focusableMonth: nextMonth, isViewFocused: true };\n }\n case 'nextMonthRowInGridView': {\n const nextMonth = addToMonth(action.payload.month, 4);\n return { ...state, focusableMonth: nextMonth, isViewFocused: true };\n }\n case 'monthFocused': {\n return { ...state, focusableMonth: action.payload.month, isViewFocused: true };\n }\n case 'monthSelected': {\n const monthSteps = action.payload.month - state.focusableDate.month;\n const goToDate = addToCalendarDate(state.focusableDate, { months: monthSteps });\n return {\n ...state,\n currentView: 'monthView',\n focusableDate: goToDate,\n isViewFocused: true,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: false\n };\n }\n\n case 'previousYearInGridView': {\n const previousYear = addToYear(action.payload.year, -1);\n return { ...state, focusableYear: previousYear, isViewFocused: true };\n }\n case 'previousYearRowInGridView': {\n const previousYear = addToYear(action.payload.year, -4);\n return { ...state, focusableYear: previousYear, isViewFocused: true };\n }\n case 'previousDecade':\n case 'previousDecadeAndFocus': {\n const previousYear = addToYear(action.payload.year, -10);\n return {\n ...state,\n focusableYear: previousYear,\n isViewFocused: action.type === 'previousDecadeAndFocus'\n };\n }\n case 'nextYearInGridView': {\n const nextYear = addToYear(action.payload.year, 1);\n return { ...state, focusableYear: nextYear, isViewFocused: true };\n }\n case 'nextYearRowInGridView': {\n const nextYear = addToYear(action.payload.year, 4);\n return { ...state, focusableYear: nextYear, isViewFocused: true };\n }\n case 'nextDecade':\n case 'nextDecadeAndFocus': {\n const nextYear = addToYear(action.payload.year, 10);\n return {\n ...state,\n focusableYear: nextYear,\n isViewFocused: action.type === 'nextDecadeAndFocus'\n };\n }\n case 'yearFocused': {\n return { ...state, focusableYear: action.payload.year, isViewFocused: true };\n }\n case 'yearSelected': {\n const yearSteps = action.payload.year - state.focusableDate.year;\n const goToDate = addToCalendarDate(state.focusableDate, { years: yearSteps });\n return {\n ...state,\n currentView: 'monthView',\n focusableDate: goToDate,\n isViewFocused: true,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: false\n };\n }\n default:\n return state;\n }\n};\n\ntype Props = {\n /**\n * This becomes the state's focusableDate.\n */\n initialFocusableDate: CalendarDateRequired;\n};\n\n/**\n * useDatePickerState takes an object with the initialFocusableDate and\n * determines the initial state; i.e., focusableDate and focusedDate. It returns the state\n * and actions a user can take on the DatePicker that will update the state. The actions are functions\n * that call dispatch with the type and payload.\n * @param param0\n * @returns\n */\nconst useDatePickerState = ({ initialFocusableDate }: Props) => {\n // Create the initial state to pass to our reducer.\n const initialState: DatePickerState = {\n currentView: 'monthView',\n focusableDate: initialFocusableDate,\n focusableMonth: initialFocusableDate.month,\n focusableYear: initialFocusableDate.year,\n isViewFocused: false,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: false\n };\n\n const [state, dispatch] = useReducer(datePickerReducer, initialState);\n\n // initialFocusableDate is the controlled value passed from the parent.\n const lastValueFromParentRef = useRef<CalendarDateRequired>(initialFocusableDate);\n\n // If a new value is being pushed from the parent, and that value differs from\n // the current focusableDate of the reducer, then this is a programmatic update\n // and we need to call 'reset' to update the reducer state. Otherwise, the only\n // time the reducer state is updated from the value is on mount.\n if (compareDates(lastValueFromParentRef.current, initialFocusableDate) !== 0) {\n lastValueFromParentRef.current = initialFocusableDate;\n if (compareDates(initialFocusableDate, state.focusableDate) !== 0) {\n dispatch({ type: 'reset', payload: initialState });\n }\n }\n\n // Using an action creator like this is nice because now each time we want to add an action,\n // we don't have to remember the action constant to use or how the payload should be structured. (from the redux doc)\n\n // memoize the actions object since we pass this around to our components.\n const actions = useMemo(() => {\n const actionsObject: {\n [Type in\n | DatePickerViewActionTypes\n | MonthViewActionTypes\n | MonthsGridViewActionTypes\n | YearsGridViewActionTypes]: (\n payload: Extract<DatePickerReducerAction, { type: Type }>['payload']\n ) => void;\n } = {} as any;\n\n datePickerViewActionTypes.forEach((type) => {\n actionsObject[type] = () => dispatch({ type });\n });\n\n monthViewActionTypes.forEach((type) => {\n actionsObject[type] = (\n payload: Extract<DatePickerReducerAction, { type: MonthViewActionTypes }>['payload']\n ) => dispatch({ type, payload });\n });\n\n monthsGridViewActionTypes.forEach((type) => {\n actionsObject[type] = (\n payload: Extract<DatePickerReducerAction, { type: MonthsGridViewActionTypes }>['payload']\n ) => dispatch({ type, payload });\n });\n\n yearsGridViewActionTypes.forEach((type) => {\n actionsObject[type] = (\n payload: Extract<DatePickerReducerAction, { type: YearsGridViewActionTypes }>['payload']\n ) => dispatch({ type, payload });\n });\n\n return actionsObject;\n }, [dispatch]);\n\n return { state, actions };\n};\n\nexport { useDatePickerState };\nexport type {\n DatePickerState,\n DatePickerStateAction,\n DatePickerViewActionTypes,\n MonthViewActionTypes,\n MonthsGridViewActionTypes,\n YearsGridViewActionTypes\n};\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport type { MonthView } from '#PRIVATE_MonthView';\nimport type { MonthsGridView, YearsGridView } from '#PRIVATE_MonthYearGridView';\nimport { useFocusWithin } from '#hooks/UNSAFE_useFocusWithin';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport {\n constrainCalendarDate,\n getCalendarDateToday,\n isCalendarDateBefore,\n type CalendarDateRequired\n} from '#utils/UNSAFE_calendarDateUtils';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { ComponentProps, RefObject, useCallback, useMemo } from 'preact/compat';\nimport { useDatePickerState } from './useDatePickerState';\nimport { useHiddenTestMethod } from '#hooks/UNSAFE_useHiddenTestMethod';\n\n/**\n * A map that specifies the selection of the header toggle button based on the\n * view we are in.\n */\nconst headerToggleSelection = {\n monthView: 'none',\n monthsGridView: 'month',\n yearsGridView: 'year'\n} as const;\n\ntype MonthViewProps = ComponentProps<typeof MonthView>;\ntype MonthsGridViewProps = ComponentProps<typeof MonthsGridView>;\ntype YearsGridViewProps = ComponentProps<typeof YearsGridView>;\n\ntype UseDatePickerProps = {\n isReadonly?: boolean;\n max?: CalendarDateRequired;\n min?: CalendarDateRequired;\n rootRef: RefObject<HTMLDivElement>;\n todayTimeZone?: Intl.DateTimeFormatOptions['timeZone'];\n value?: CalendarDateRequired;\n onCommit: (detail: ValueUpdateDetail<CalendarDateRequired>) => void;\n};\n\n/**\n * A custom hook that adds functionality to the DatePicker component.\n */\nexport const useDatePicker = ({\n isReadonly,\n max,\n min,\n rootRef,\n todayTimeZone,\n value,\n onCommit\n}: UseDatePickerProps) => {\n // Check for errors first\n if (min && max && isCalendarDateBefore(max, min)) {\n throw new Error('DatePicker: min must be equal or less than max.');\n }\n\n const todaysDate = getCalendarDateToday(todayTimeZone);\n\n // We need to make sure that this initialFocusableDate is within the min/max range.\n // When there is no min or max set, we draw the month of the value if value is set, otherwise we draw today's month.\n // If the initialFocusableDate is not within the min/max range, then we constrain the calendar date by changing the month to draw\n // so that the initialFocusableDate is the min date if the initialFocusableDate is < min or the max month if the initialFocusableDate is > max.\n const initialFocusableDate = useMemo(\n () => constrainCalendarDate(value ?? todaysDate, min, max),\n [value, todaysDate, min, max]\n );\n\n const { state, actions } = useDatePickerState({ initialFocusableDate });\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const accessibleLabels = {\n next: translations.datePicker_next(),\n previous: translations.datePicker_prev(),\n goToToday: translations.datePicker_goToToday(),\n today: translations.datePicker_today()\n };\n\n // JET-73420, JET-62113: Create a changeValue method that can be called by a test adapter to\n // simulate a user changing the value. This method calls the onCommit callback, just like what\n // would happen if a user (or test) made a change through the UI.\n const changeValue = useCallback(\n (newValue: CalendarDateRequired) => {\n // We always want this method available on the DOM element so that a test can call it,\n // but we only want it to change the value when the component is enabled because that's\n // the only time the user could change the value through the UI. Note that newValue\n // cannot be undefined (meaning you cannot clear the value) because there is no way to\n // do that through the UI.\n if (!isReadonly) {\n onCommit({ value: newValue, previousValue: value });\n return Promise.resolve();\n }\n return Promise.reject('Component is readonly');\n },\n [isReadonly, onCommit, value]\n );\n\n // Expose _changeValue as a hidden method on the root DOM.\n useHiddenTestMethod({\n elementRef: rootRef,\n method: changeValue,\n name: '_changeValue'\n });\n\n const handlers = {\n /**\n * Handler for DatePickerHeader.onMonthToggle.\n * This is used for toggling between the MonthView and\n * MonthsGridView.\n */\n handleMonthToggle: useCallback(() => {\n if (state.currentView !== 'monthsGridView') {\n actions.monthsGridView(undefined);\n } else {\n actions.monthView(undefined);\n }\n }, [actions, state.currentView]),\n\n /**\n * Handler for DatePickerHeader.onYearToggle.\n * This is used for toggling between the MonthView and\n * YearsGridView.\n */\n handleYearToggle: useCallback(() => {\n if (state.currentView !== 'yearsGridView') {\n actions.yearsGridView(undefined);\n } else {\n actions.monthView(undefined);\n }\n }, [actions, state.currentView]),\n\n /**\n * Handler for DatePickerHeader.onTodayNavigation.\n * This is used for navigating to today in the MonthView.\n */\n handleTodayNavigation: useCallback(() => {\n actions.goToToday(todaysDate);\n }, [actions, todaysDate]),\n\n /**\n * Handler for DatePickerHeader.onPreviousNavigation.\n * This is used for navigating to the previous month in MonthView\n * and previous decade in YearsGridView.\n */\n handlePreviousNavigation: useCallback(() => {\n if (state.currentView === 'monthView') {\n return actions.previousMonth(state.focusableDate);\n }\n\n if (state.currentView === 'yearsGridView') {\n return actions.previousDecade({ year: state.focusableYear });\n }\n }, [actions, state.currentView, state.focusableDate, state.focusableYear]),\n\n /**\n * Handler for DatePickerHeader.onNextNavigation.\n * This is used for navigating to the next month in MonthView\n * and next decade in YearsGridView.\n */\n handleNextNavigation: useCallback(() => {\n if (state.currentView === 'monthView') {\n return actions.nextMonth(state.focusableDate);\n }\n\n if (state.currentView === 'yearsGridView') {\n return actions.nextDecade({ year: state.focusableYear });\n }\n }, [actions, state.currentView, state.focusableDate, state.focusableYear]),\n\n /**\n * Handler for MonthView.onAction.\n * This is used for selecting a date in MonthView.\n */\n handleMonthViewAction: useCallback<MonthViewProps['onAction']>(\n (payload) => {\n if (payload.date === undefined || isReadonly) return;\n actions.daySelected(payload.date);\n // We purposely send onCommit even if the value is the same.\n // The InputDatePicker closes the datepicker when the user commits,\n // even if it is the already selected date.\n onCommit?.({ previousValue: value, value: payload.date });\n },\n [actions, isReadonly, onCommit, value]\n ),\n\n /**\n * Handler for MonthView.onNavigation.\n * This is used for navigating in the MonthView like moving around the\n * dates in the month and going to the prev/next month/year.\n */\n handleMonthViewNavigation: useCallback<MonthViewProps['onNavigation']>(\n (detail) => {\n switch (detail.direction) {\n case 'previousMonth':\n return actions.previousMonthAndFocus(detail.date);\n case 'nextMonth':\n return actions.nextMonthAndFocus(detail.date);\n case 'today':\n return actions.goToToday(todaysDate);\n default:\n return actions[detail.direction](detail.date);\n }\n },\n [actions, todaysDate]\n ),\n\n /**\n * Handler for MonthsGridView.onAction.\n * This is used for selecting a month in MonthsGridView and navigating to\n * the selected month in MonthView.\n */\n handleMonthsGridViewAction: useCallback<MonthsGridViewProps['onAction']>(\n (detail) => {\n actions.monthSelected(detail);\n },\n [actions]\n ),\n\n /**\n * Handler for MonthsGridView.onNavigation.\n * This is used for navigating through the MonthsGridView.\n */\n handleMonthsGridViewNavigation: useCallback<MonthsGridViewProps['onNavigation']>(\n (detail) => {\n switch (detail.direction) {\n case 'down':\n return actions.nextMonthRowInGridView({ month: detail.month });\n case 'next':\n return actions.nextMonthInGridView({ month: detail.month });\n case 'previous':\n return actions.previousMonthInGridView({ month: detail.month });\n case 'up':\n return actions.previousMonthRowInGridView({ month: detail.month });\n }\n },\n [actions]\n ),\n\n /**\n * Handler for YearsGridView.onAction.\n * This is used for selecting a year in YearsGridView and navigating to\n * the selected year in MonthView.\n */\n handleYearsGridViewAction: useCallback<YearsGridViewProps['onAction']>(\n (detail) => {\n actions.yearSelected(detail);\n },\n [actions]\n ),\n\n /**\n * Handler for YearsGridView.onNavigation.\n * This is used for navigating through the YearsGridView.\n */\n handleYearsGridViewNavigation: useCallback<YearsGridViewProps['onNavigation']>(\n (detail) => {\n switch (detail.direction) {\n case 'down':\n return actions.nextYearRowInGridView({ year: detail.year });\n case 'next':\n return actions.nextYearInGridView({ year: detail.year });\n case 'nextDecade':\n return actions.nextDecadeAndFocus({ year: detail.year });\n case 'previous':\n return actions.previousYearInGridView({ year: detail.year });\n case 'previousDecade':\n return actions.previousDecadeAndFocus({ year: detail.year });\n case 'up':\n return actions.previousYearRowInGridView({ year: detail.year });\n }\n },\n [actions]\n )\n };\n\n const { focusProps } = useFocusWithin({\n // If we blur out of the MonthView, make sure the isViewFocused state is false.\n // This is used for the case where you are on the Today month,\n // and you press on Go to Today, focus moves to the day cell that is today,\n // then tab back twice to Go to Today button and press it again and focus should move again to the day cell that is today.\n // JET-66580 today button stays highlighted and arrow keys do not work\n // We do not set isViewFocused onFocusWithin. Doing so causes a different issue. JET-73067 Input Date Picker/DatePicker - REFLOW - can not set value on the first click\n onBlurWithin: useCallback(() => actions.viewBlur(undefined), [actions])\n });\n\n return {\n accessibleLabels,\n actions,\n handlers,\n state,\n todaysDate,\n toggleSelection: headerToggleSelection[state.currentView],\n viewContainerProps: { ...focusProps }\n };\n};\n","import { Flex } from '#UNSAFE_Flex';\nimport type { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { Button } from '#UNSAFE_Button';\nimport { ComponentProps } from 'preact/compat';\n\ntype ButtonOnAction = NonNullable<ComponentProps<typeof Button>['onAction']>;\n\ntype Props = TestIdProps & {\n /**\n * Accessible label for the today navigation button that is in the footer of the DatePicker\n * in small screens.\n *\n * Use this property to provide a screen reader aria-label for the\n * footer today navigation button.\n */\n todayNavigationAriaLabel: string;\n\n /**\n * Label for the today navigation button that is in the footer of the DatePicker in small screens.\n * Use this property to provide a label for the footer today navigation button.\n */\n todayNavigationLabel: string;\n\n /**\n * A callback function to be called when the today button is clicked. Only\n * applicable when `isTodayNavigationButtonHidden` is set to `false`.\n */\n onTodayNavigationAction?: ButtonOnAction;\n};\n\n/**\n * A Today button. The DatePicker puts this in its footer on small screens.\n * When a user presses the button, the DatePicker navigates to Today and sets focus on Today.\n */\nexport const TodayButton = ({\n onTodayNavigationAction,\n testId,\n todayNavigationAriaLabel,\n todayNavigationLabel\n}: Props) => {\n return (\n <Flex direction=\"column\">\n <Button\n testId={testId}\n label={todayNavigationLabel}\n aria-label={todayNavigationAriaLabel}\n size=\"sm\"\n onAction={onTodayNavigationAction}\n />\n </Flex>\n );\n};\n","import { useRef } from 'preact/hooks';\nimport { DatePickerHeader } from '#PRIVATE_DatePickerHeader';\nimport { MonthView } from '#PRIVATE_MonthView';\nimport { MonthsGridView, YearsGridView } from '#PRIVATE_MonthYearGridView';\nimport { Flex } from '#UNSAFE_Flex';\nimport { useTestId, type TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { type CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { useDatePicker } from './useDatePicker';\nimport { useBreakpointValues } from '#hooks/UNSAFE_useBreakpointValues';\nimport { TodayButton } from './TodayButton';\nimport { datePickerPropVars } from './themes/DatePickerContract.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { DatePickerRedwoodTheme } from './themes/redwood/DatePickerTheme';\nimport { Size } from '#utils/UNSAFE_size';\n\nexport type DayFormatOptions = {\n state: 'enabled' | 'disabled' | 'restricted';\n};\n\ntype Props = TestIdProps & {\n /**\n * A function that receives a date and returns an object specifying how to format the provided date.\n * This function is called for each date that is rendered and this can be used to control how individual\n * dates are rendered - disabled, restricted, or enabled.\n * @param date The date to format\n * @returns The format options\n */\n dayFormatter?: (date: CalendarDateRequired) => DayFormatOptions;\n\n /**\n * The daysOutsideMonth property affects the day cells that are outside of the current month.\n * If set to 'hidden', then the days outside of the current month will be hidden.\n * If set to 'selectable', then the days outside of the current month will be visible and selectable.\n * This defaults to 'hidden'.\n */\n daysOutsideMonth?: 'hidden' | 'selectable';\n\n /**\n * When property is set to \"auto\", the date picker will automatically adjust to the height of the rows of weeks.\n * This is mainly to be used in conjunction with InputDatePicker.\n * <p>If not specified, defaults to the theme specified height.<br/>\n */\n height?: 'auto';\n\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n\n /**\n * The monthAndYearPicker property can be used to specify whether or not the DatePicker should show the\n * Months Grid View and Years Grid View.\n */\n monthAndYearPicker?: 'on' | 'off';\n\n /**\n * The maximum selectable date. The max must be equal or greater than the min if they are both specified or an error is thrown.\n */\n max?: CalendarDateRequired;\n\n /**\n * Specifies the component style maxWidth.\n * <p>If not specified, defaults to the theme specified maxWidth.<br/>\n * This attribute accepts values of type:<br/>\n * 0 | `${number}${CssUnits}` | `${number}x` | `--${string}` | `var($string})` | `${number}%`</p>\n * <p>When this component is used in composition and the component should take up 100% of the parent container's\n * width, set maxWidth to '100%'.<br/>\n * Because there is a theme default value for maxWidth, when setting the width property to achieve a fixed width,\n * set the maxWidth property to the same value.</p>\n */\n maxWidth?: Size;\n\n /**\n * The minimum selectable date. The min must be equal or less than the max if they are both specified or an error is thrown.\n */\n min?: CalendarDateRequired;\n\n /**\n * The todayTimeZone property is used to compute what the highlighted today cell is for the DatePicker.\n * This defaults to the user's system timezone.\n * <p>\n * The only reason an application would set the todayTimeZone property is if they want the\n * highlighted today cell to be in a different timezone than the user's system's timezone,\n * like if the user has a preferred timezone that is not where they are physically working.\n * </p>\n */\n todayTimeZone?: Intl.DateTimeFormatOptions['timeZone'];\n\n /**\n * Specifies how to render the 'Go to today' button.\n * <ul>\n * <li>'visible' - set this property to 'visible' to show the 'Go to today' button.</li>\n * <li>'hidden' - set this property to 'hidden' to hide the 'Go to today' button.</li>\n * </ul>\n */\n todayButton?: 'visible' | 'hidden';\n\n /**\n * The value of the DatePicker. The value property is the date that looks selected in the DatePicker.\n * If the value is undefined, no day will look selected.\n * <p>\n * The DatePicker initially opens to the selected date if there is one and it is within the min/max range.\n * If there is no value, the DatePicker initially opens to today's month.\n * </p>\n */\n value?: CalendarDateRequired;\n\n /**\n * Specifies the component style width.\n * <p>If not specified, defaults to '100%'.</p>\n * <p>This attribute accepts values of type:</p>\n * <p>0 | `${number}${CssUnits}` | `${number}x` | `--${string}` | `var($string})` | `${number}%`</p>\n * <br/>\n * <p>Because there is a theme default value for maxWidth, when setting the width property to achieve a fixed width,\n * set the maxWidth property to the same value.</p>\n */\n width?: Size;\n\n /**\n * Callback invoked when the user selects a date in the DatePicker. This callback is called even when the previous\n * value and the value are the same, that is, when the user selects an already selected date.\n * The app needs to handle this to write back the controlled 'value' property, or else no date will be shown\n * to be selected.\n * If the app is using a DatePicker to control another component, like as a way to navigate an Event Calendar,\n * then they would listen to the onCommit to get the value of the selected date.\n */\n onCommit: (detail: ValueUpdateDetail<CalendarDateRequired>) => void;\n\n /**\n * Whether week of the year will be shown in the DatePicker. The default calculation follows the\n * rule for ISO 8601 as follows: The first week of the year is defined as the week that contains\n * the first Thursday. Therefore, if January 1st falls on a Friday, it is considered part of the last week\n * of the previous year. Conversely, if December 31st falls on a Wednesday, it is part of week 1 of the following year.\n */\n weekDisplay?: 'none' | 'number';\n};\n\n/**\n * A DatePicker is a calendar interface that allows users to select a single date.\n */\nexport const DatePicker = ({\n dayFormatter,\n daysOutsideMonth,\n height,\n isReadonly = false,\n monthAndYearPicker = 'on',\n max,\n maxWidth,\n min,\n value,\n testId,\n todayTimeZone,\n todayButton = 'visible',\n weekDisplay = 'none',\n width,\n onCommit\n}: Props) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const { accessibleLabels, handlers, state, todaysDate, toggleSelection, viewContainerProps } =\n useDatePicker({\n isReadonly,\n max,\n min,\n rootRef,\n todayTimeZone,\n value,\n onCommit\n });\n const { month, year } = state.focusableDate;\n const isMonthYearPickerEnabled = monthAndYearPicker === 'on' && !isReadonly;\n // When the screen is < 360px, we hide the DatePickerHeader's today button and show a Today button\n // on the bottom of the DatePicker instead.\n // NOTE: I cannot use xs, sm here since useBreakpointValues's types do not allow it.\n const shouldShowTodayFooterButton = useBreakpointValues(\n {\n sm: true,\n md: false\n },\n { sm: '0px', md: '360px' }\n );\n\n const showTodayFooterButton =\n !state.isTodayNavigationButtonHidden &&\n shouldShowTodayFooterButton &&\n todayButton === 'visible';\n\n // we need to render the baseTheme on the root dom element so that the CSS vars in datePickerPropVars will be defined.\n const { classes } = useComponentTheme(DatePickerRedwoodTheme);\n\n const testIdProps = useTestId(testId);\n\n return (\n <div class={classes} ref={rootRef} {...testIdProps}>\n <Flex\n direction=\"column\"\n gap={\n state.currentView === 'monthView'\n ? datePickerPropVars.calendarGridRowGap\n : datePickerPropVars.monthYearGridRowGap\n }\n height={\n height === 'auto'\n ? undefined\n : showTodayFooterButton\n ? datePickerPropVars.todayFooterButtonHeight\n : datePickerPropVars.height\n }\n maxWidth={maxWidth !== undefined ? maxWidth : datePickerPropVars.maxWidth}\n width={width !== undefined ? width : datePickerPropVars.width}>\n <DatePickerHeader\n testId={testId ? testId + '_header' : undefined}\n month={month}\n year={year}\n isPreviousNavigationButtonHidden={state.isPreviousNavigationButtonHidden}\n isTodayNavigationButtonHidden={\n todayButton === 'hidden' ||\n state.isTodayNavigationButtonHidden ||\n shouldShowTodayFooterButton\n }\n isNextNavigationButtonHidden={state.isNextNavigationButtonHidden}\n monthYearHeader={isMonthYearPickerEnabled ? 'independentButtons' : 'text'}\n toggleSelection={isMonthYearPickerEnabled ? toggleSelection : undefined}\n previousNavigationAccessibleLabel={accessibleLabels.previous}\n todayNavigationAccessibleLabel={accessibleLabels.goToToday}\n nextNavigationAccessibleLabel={accessibleLabels.next}\n onTodayNavigationAction={handlers.handleTodayNavigation}\n onPreviousNavigationAction={handlers.handlePreviousNavigation}\n onNextNavigationAction={handlers.handleNextNavigation}\n onMonthToggle={isMonthYearPickerEnabled ? handlers.handleMonthToggle : undefined}\n onYearToggle={isMonthYearPickerEnabled ? handlers.handleYearToggle : undefined}\n />\n <div {...viewContainerProps}>\n {state.currentView === 'monthView' && (\n <MonthView\n dayFormatter={dayFormatter}\n daysOutsideMonth={daysOutsideMonth}\n isReadonly={isReadonly}\n max={max}\n min={min}\n selectedDate={value}\n focusableDate={state.focusableDate}\n isFocused={state.isViewFocused}\n testId={testId ? testId + '_monthView' : undefined}\n todaysDate={todaysDate}\n onNavigation={handlers.handleMonthViewNavigation}\n onAction={handlers.handleMonthViewAction}\n weekDisplay={weekDisplay}\n />\n )}\n {state.currentView === 'monthsGridView' && (\n <MonthsGridView\n currentMonth={todaysDate.month}\n focusableMonth={state.focusableMonth}\n isFocused={state.isViewFocused}\n selectedMonth={month}\n testId={testId ? testId + '_monthsGridView' : undefined}\n onAction={handlers.handleMonthsGridViewAction}\n onNavigation={handlers.handleMonthsGridViewNavigation}\n />\n )}\n {state.currentView === 'yearsGridView' && (\n <YearsGridView\n currentYear={todaysDate.year}\n focusableYear={state.focusableYear}\n isFocused={state.isViewFocused}\n selectedYear={year}\n testId={testId ? testId + '_yearsGridView' : undefined}\n onAction={handlers.handleYearsGridViewAction}\n onNavigation={handlers.handleYearsGridViewNavigation}\n />\n )}\n </div>\n {showTodayFooterButton && (\n <div>\n <TodayButton\n testId={testId ? testId + '_footerTodayButton' : undefined}\n todayNavigationLabel={accessibleLabels.today}\n todayNavigationAriaLabel={accessibleLabels.goToToday}\n onTodayNavigationAction={handlers.handleTodayNavigation}\n />\n </div>\n )}\n </Flex>\n </div>\n );\n};\n"],"names":["_jsx","useRef","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AAqGH,MAAM,yBAAyB,GAAG;IAChC,WAAW;IACX,gBAAgB;IAChB,eAAe;IACf,UAAU;CACF,CAAC;AAEX,MAAM,oBAAoB,GAAG;IAC3B,YAAY;IACZ,aAAa;IACb,WAAW;IACX,aAAa;IACb,SAAS;IACT,cAAc;IACd,UAAU;IACV,eAAe;IACf,uBAAuB;IACvB,WAAW;IACX,mBAAmB;IACnB,cAAc;IACd,UAAU;IACV,iBAAiB;IACjB,gBAAgB;CACR,CAAC;AAEX,MAAM,yBAAyB,GAAG;IAChC,yBAAyB;IACzB,qBAAqB;IACrB,4BAA4B;IAC5B,wBAAwB;IACxB,cAAc;IACd,eAAe;CACP,CAAC;AAEX,MAAM,wBAAwB,GAAG;IAC/B,wBAAwB;IACxB,oBAAoB;IACpB,2BAA2B;IAC3B,uBAAuB;IACvB,gBAAgB;IAChB,wBAAwB;IACxB,YAAY;IACZ,oBAAoB;IACpB,aAAa;IACb,cAAc;CACN,CAAC;AAuCX;AACA;AACA;AACA,MAAM,iBAAiB,GAAG,CAC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ACE,CACP,CACI,EAAA,CAAA,EAAA,CACH,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"DatePicker-7287f0f9.js","sources":["../../src/UNSAFE_DatePicker/useDatePickerState.ts","../../src/UNSAFE_DatePicker/useDatePicker.ts","../../src/UNSAFE_DatePicker/TodayButton.tsx","../../src/UNSAFE_DatePicker/DatePicker.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport {\n addToCalendarDate,\n addToMonth,\n addToYear,\n compareDates,\n getDaysInMonth\n} from '#utils/UNSAFE_calendarDateUtils';\nimport { useMemo, useReducer, useRef } from 'preact/compat';\n\n// This is the type of the state that is returned from the useDatePickerState reducer.\n// This is a single state that will handle the different views of the DatePicker, the\n// MonthView, the MonthGridView, and the YearGridView. Initially we have implemented\n// the state for the MonthView.\ntype DatePickerState = {\n /**\n * Specifies the current view the DatePicker is showing.\n */\n currentView: 'monthView' | 'monthsGridView' | 'yearsGridView';\n\n /**\n * The focusableDate is the one day in the MonthView that has tabIndex: 0 on it.\n * If nothing is selected, the DatePicker initially renders\n * with Today as the focusableDate. The focusableDate doesn't have focus until the user tabs in\n * to the Month View.\n * When the user navigates the days with the arrow keys,\n * the focusableDate changes along with the focusedDate, and they will be the same date.\n * This is a 'roving' index.\n * The focusableDate is never undefined.\n * <p>\n * If the user keyboards to the next month (Fn+Down Arrow on a Mac),\n * then the focusableDate and the focusedDate of the next month\n * is the same day number, or as close as possible to stay in the same month. For example,\n * if the focusedDate and focusableDate is April 2, 2024, the focusedDate and focusableDate for the next month is May 2, 2024.\n * If the focusedDate and focusableDate is February 28, 2024, the focusedDate and focusableDate for the next month is March 28, 2024.\n * If the focusedDate and focusableDate is January 31, 2024, the focusedDate and focusableDate for the next month is February 29, 2024 (2024 is a leap year).\n * </p>\n * <p>\n * If the user clicks the Next Month button in the DatePicker's header, then\n * there is no date that has focus, so the focusedDate is undefined.\n * The focusableDate will be set.\n * For example,\n * if the focusableDate is April 2, 2024, the focusableDate for the next month is May 2, 2024.\n * If the focusableDate is February 28, 2024, the focusableDate for the next month is March 28, 2024.\n * If the focusableDate is January 31, 2024, the focusableDate for the next month is February 29, 2024 (2024 is a leap year).\n *\n * </p>\n */\n focusableDate: CalendarDateRequired;\n\n /**\n * The focusableMonth is the one month in the MonthsGridView that has tabIndex: 0 on it.\n * If nothing is selected, the DatePicker initially renders with Today's month as the\n * focusableMonth. The focusableMonth doesn't have focus until the user tabs in\n * to the Months Grid View.\n *\n * When the user navigates the month with the arrow keys, the focusableMonth changes\n * along with the focusedMonth, and they will be the same date. This is a 'roving' index.\n *\n * The focusableMonth is never undefined.\n */\n focusableMonth: CalendarDateRequired['month'];\n\n /**\n * The focusableYear is the one month in the YearsGridView that has tabIndex: 0 on it.\n * If nothing is selected, the DatePicker initially renders with Today's month as the\n * focusableYear. The focusableYear doesn't have focus until the user tabs in\n * to the Months Grid View.\n *\n * When the user navigates the month with the arrow keys, the focusableYear changes\n * along with the focusedYear, and they will be the same date. This is a 'roving' index.\n *\n * The focusableYear is never undefined.\n */\n focusableYear: CalendarDateRequired['year'];\n\n /**\n * A boolean to indicate if the focus is in the view.\n */\n isViewFocused: boolean;\n\n /**\n * Specifies whether to hide the previous navigation button is hidden from the header.\n */\n isPreviousNavigationButtonHidden: boolean;\n\n /**\n * Specifies whether to hide the today navigation button is hidden from the header.\n */\n isTodayNavigationButtonHidden: boolean;\n\n /**\n * Specifies whether to hide the next navigation button is hidden from the header.\n */\n isNextNavigationButtonHidden: boolean;\n};\n\nconst datePickerResetActionTypes = ['reset'] as const;\n\nconst datePickerViewActionTypes = [\n 'monthView',\n 'monthsGridView',\n 'yearsGridView',\n 'viewBlur'\n] as const;\n\nconst monthViewActionTypes = [\n 'dayFocused',\n 'daySelected',\n 'goToToday',\n 'previousDay',\n 'nextDay',\n 'previousWeek',\n 'nextWeek',\n 'previousMonth',\n 'previousMonthAndFocus',\n 'nextMonth',\n 'nextMonthAndFocus',\n 'previousYear',\n 'nextYear',\n 'firstDayOfMonth',\n 'lastDayOfMonth'\n] as const;\n\nconst monthsGridViewActionTypes = [\n 'previousMonthInGridView',\n 'nextMonthInGridView',\n 'previousMonthRowInGridView',\n 'nextMonthRowInGridView',\n 'monthFocused',\n 'monthSelected'\n] as const;\n\nconst yearsGridViewActionTypes = [\n 'previousYearInGridView',\n 'nextYearInGridView',\n 'previousYearRowInGridView',\n 'nextYearRowInGridView',\n 'previousDecade',\n 'previousDecadeAndFocus',\n 'nextDecade',\n 'nextDecadeAndFocus',\n 'yearFocused',\n 'yearSelected'\n] as const;\n\ntype DatePickerViewActionTypes = (typeof datePickerViewActionTypes)[number];\ntype DatePickerResetActionTypes = (typeof datePickerResetActionTypes)[number];\ntype MonthViewActionTypes = (typeof monthViewActionTypes)[number];\ntype MonthsGridViewActionTypes = (typeof monthsGridViewActionTypes)[number];\ntype YearsGridViewActionTypes = (typeof yearsGridViewActionTypes)[number];\n\n// This is the type of the actions that the hook returns.\ntype DatePickerStateAction = ReturnType<typeof useDatePickerState>['actions'];\n\n// Type for the action of the datePickerReducer.\ntype DatePickerViewAction = {\n [Type in DatePickerViewActionTypes]: { type: Type; payload?: undefined };\n}[DatePickerViewActionTypes];\n\ntype DatePickerResetAction = {\n [Type in DatePickerResetActionTypes]: { type: Type; payload: DatePickerState };\n}[DatePickerResetActionTypes];\n\ntype MonthViewAction = {\n [Type in MonthViewActionTypes]: { type: Type; payload: CalendarDateRequired };\n}[MonthViewActionTypes];\n\ntype MonthsGridViewAction = {\n [Type in MonthsGridViewActionTypes]: { type: Type; payload: Pick<CalendarDateRequired, 'month'> };\n}[MonthsGridViewActionTypes];\n\ntype YearsGridViewAction = {\n [Type in YearsGridViewActionTypes]: { type: Type; payload: Pick<CalendarDateRequired, 'year'> };\n}[YearsGridViewActionTypes];\n\ntype DatePickerReducerAction =\n | DatePickerResetAction\n | DatePickerViewAction\n | MonthViewAction\n | MonthsGridViewAction\n | YearsGridViewAction;\n\n// A reducer is a plain old function you write that takes the current state,\n// and the action to be processed, and returns the state as it should be, based on that action occurring.\n// The reducer, not the sender, determines how a given report (action) affects the state.\nconst datePickerReducer = (\n state: DatePickerState,\n action: DatePickerReducerAction\n): DatePickerState => {\n // On mount, the reducer is initialized with initial state derived from the DatePicker's value.\n // If that value is changed programmatically afterwards, the only way to push that update\n // into the reducer is to define a \"reset\" action.\n if (action.type === 'reset') {\n return action.payload!;\n }\n\n switch (action.type) {\n case 'monthView': {\n return {\n ...state,\n currentView: 'monthView',\n isViewFocused: false,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: false\n };\n }\n case 'monthsGridView': {\n return {\n ...state,\n currentView: 'monthsGridView',\n focusableMonth: state.focusableDate.month,\n isViewFocused: false,\n isNextNavigationButtonHidden: true,\n isPreviousNavigationButtonHidden: true,\n isTodayNavigationButtonHidden: true\n };\n }\n case 'yearsGridView': {\n return {\n ...state,\n currentView: 'yearsGridView',\n focusableYear: state.focusableDate.year,\n isViewFocused: false,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: true\n };\n }\n case 'viewBlur': {\n return state.isViewFocused ? { ...state, isViewFocused: false } : state;\n }\n case 'dayFocused':\n case 'daySelected': {\n return { ...state, isViewFocused: true, focusableDate: action.payload };\n }\n case 'goToToday': {\n // User clicked on the 'Today' icon, which means they want to navigate to show the month of Today\n // payload is Today's date. We also set the focus to Today.\n return { ...state, isViewFocused: true, focusableDate: action.payload };\n }\n case 'previousDay': {\n const previousDay = addToCalendarDate(action.payload, { days: -1 });\n return { ...state, isViewFocused: true, focusableDate: previousDay };\n }\n case 'nextDay': {\n const nextDay = addToCalendarDate(action.payload, { days: 1 });\n return { ...state, isViewFocused: true, focusableDate: nextDay };\n }\n case 'previousWeek': {\n const previousDay = addToCalendarDate(action.payload, { days: -7 });\n return { ...state, isViewFocused: true, focusableDate: previousDay };\n }\n case 'nextWeek': {\n const nextDay = addToCalendarDate(action.payload, { days: 7 });\n return { ...state, isViewFocused: true, focusableDate: nextDay };\n }\n case 'previousMonth':\n case 'previousMonthAndFocus': {\n // PageUp moves focus to the previous month.\n // We also get here if the DatePicker while in month view header's Previous navigation button is pressed.\n const prevMonth = addToCalendarDate(action.payload, { months: -1 });\n return {\n ...state,\n isViewFocused: action.type === 'previousMonthAndFocus',\n focusableDate: prevMonth\n };\n }\n case 'nextMonth':\n case 'nextMonthAndFocus': {\n // Shift PageDown moves focus to the next month. TODO: Confirm this works on a Windows machine.\n // Shift Fn Arrow Down works on my Mac.\n // We also get here if the DatePicker while in month view header's Next navigation button is pressed.\n const nextMonth = addToCalendarDate(action.payload, { months: 1 });\n return {\n ...state,\n isViewFocused: action.type === 'nextMonthAndFocus',\n focusableDate: nextMonth\n };\n }\n case 'previousYear': {\n // Shift Page Up moves focus to the previous year. TODO: Confirm this works on a Windows machine.\n const previousYear = addToCalendarDate(action.payload, { years: -1 });\n return { ...state, isViewFocused: true, focusableDate: previousYear };\n }\n case 'nextYear': {\n const nextYear = addToCalendarDate(action.payload, { years: 1 });\n return { ...state, isViewFocused: true, focusableDate: nextYear };\n }\n case 'firstDayOfMonth': {\n // Home moves focus to the first day of the month (Fn+LeftArrow on a mouse.)\n const currentDate = action.payload;\n const firstDayOfMonthDate = {\n year: currentDate.year,\n month: currentDate.month,\n day: 1\n } as CalendarDateRequired;\n return { ...state, isViewFocused: true, focusableDate: firstDayOfMonthDate };\n }\n case 'lastDayOfMonth': {\n // End moves focus to the last day of the month\n const currentDate = action.payload;\n const lastDay = getDaysInMonth(currentDate.month, currentDate.year);\n const lastDayOfMonthDate = {\n year: currentDate.year,\n month: currentDate.month,\n day: lastDay\n } as CalendarDateRequired;\n return { ...state, isViewFocused: true, focusableDate: lastDayOfMonthDate };\n }\n\n case 'previousMonthInGridView': {\n const previousMonth = addToMonth(action.payload.month, -1);\n return { ...state, focusableMonth: previousMonth, isViewFocused: true };\n }\n case 'previousMonthRowInGridView': {\n const previousMonth = addToMonth(action.payload.month, -4);\n return { ...state, focusableMonth: previousMonth, isViewFocused: true };\n }\n case 'nextMonthInGridView': {\n const nextMonth = addToMonth(action.payload.month, 1);\n return { ...state, focusableMonth: nextMonth, isViewFocused: true };\n }\n case 'nextMonthRowInGridView': {\n const nextMonth = addToMonth(action.payload.month, 4);\n return { ...state, focusableMonth: nextMonth, isViewFocused: true };\n }\n case 'monthFocused': {\n return { ...state, focusableMonth: action.payload.month, isViewFocused: true };\n }\n case 'monthSelected': {\n const monthSteps = action.payload.month - state.focusableDate.month;\n const goToDate = addToCalendarDate(state.focusableDate, { months: monthSteps });\n return {\n ...state,\n currentView: 'monthView',\n focusableDate: goToDate,\n isViewFocused: true,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: false\n };\n }\n\n case 'previousYearInGridView': {\n const previousYear = addToYear(action.payload.year, -1);\n return { ...state, focusableYear: previousYear, isViewFocused: true };\n }\n case 'previousYearRowInGridView': {\n const previousYear = addToYear(action.payload.year, -4);\n return { ...state, focusableYear: previousYear, isViewFocused: true };\n }\n case 'previousDecade':\n case 'previousDecadeAndFocus': {\n const previousYear = addToYear(action.payload.year, -10);\n return {\n ...state,\n focusableYear: previousYear,\n isViewFocused: action.type === 'previousDecadeAndFocus'\n };\n }\n case 'nextYearInGridView': {\n const nextYear = addToYear(action.payload.year, 1);\n return { ...state, focusableYear: nextYear, isViewFocused: true };\n }\n case 'nextYearRowInGridView': {\n const nextYear = addToYear(action.payload.year, 4);\n return { ...state, focusableYear: nextYear, isViewFocused: true };\n }\n case 'nextDecade':\n case 'nextDecadeAndFocus': {\n const nextYear = addToYear(action.payload.year, 10);\n return {\n ...state,\n focusableYear: nextYear,\n isViewFocused: action.type === 'nextDecadeAndFocus'\n };\n }\n case 'yearFocused': {\n return { ...state, focusableYear: action.payload.year, isViewFocused: true };\n }\n case 'yearSelected': {\n const yearSteps = action.payload.year - state.focusableDate.year;\n const goToDate = addToCalendarDate(state.focusableDate, { years: yearSteps });\n return {\n ...state,\n currentView: 'monthView',\n focusableDate: goToDate,\n isViewFocused: true,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: false\n };\n }\n default:\n return state;\n }\n};\n\ntype Props = {\n /**\n * This becomes the state's focusableDate.\n */\n initialFocusableDate: CalendarDateRequired;\n};\n\n/**\n * useDatePickerState takes an object with the initialFocusableDate and\n * determines the initial state; i.e., focusableDate and focusedDate. It returns the state\n * and actions a user can take on the DatePicker that will update the state. The actions are functions\n * that call dispatch with the type and payload.\n * @param param0\n * @returns\n */\nconst useDatePickerState = ({ initialFocusableDate }: Props) => {\n // Create the initial state to pass to our reducer.\n const initialState: DatePickerState = {\n currentView: 'monthView',\n focusableDate: initialFocusableDate,\n focusableMonth: initialFocusableDate.month,\n focusableYear: initialFocusableDate.year,\n isViewFocused: false,\n isNextNavigationButtonHidden: false,\n isPreviousNavigationButtonHidden: false,\n isTodayNavigationButtonHidden: false\n };\n\n const [state, dispatch] = useReducer(datePickerReducer, initialState);\n\n // initialFocusableDate is the controlled value passed from the parent.\n const lastValueFromParentRef = useRef<CalendarDateRequired>(initialFocusableDate);\n\n // If a new value is being pushed from the parent, and that value differs from\n // the current focusableDate of the reducer, then this is a programmatic update\n // and we need to call 'reset' to update the reducer state. Otherwise, the only\n // time the reducer state is updated from the value is on mount.\n if (compareDates(lastValueFromParentRef.current, initialFocusableDate) !== 0) {\n lastValueFromParentRef.current = initialFocusableDate;\n if (compareDates(initialFocusableDate, state.focusableDate) !== 0) {\n dispatch({ type: 'reset', payload: initialState });\n }\n }\n\n // Using an action creator like this is nice because now each time we want to add an action,\n // we don't have to remember the action constant to use or how the payload should be structured. (from the redux doc)\n\n // memoize the actions object since we pass this around to our components.\n const actions = useMemo(() => {\n const actionsObject: {\n [Type in\n | DatePickerViewActionTypes\n | MonthViewActionTypes\n | MonthsGridViewActionTypes\n | YearsGridViewActionTypes]: (\n payload: Extract<DatePickerReducerAction, { type: Type }>['payload']\n ) => void;\n } = {} as any;\n\n datePickerViewActionTypes.forEach((type) => {\n actionsObject[type] = () => dispatch({ type });\n });\n\n monthViewActionTypes.forEach((type) => {\n actionsObject[type] = (\n payload: Extract<DatePickerReducerAction, { type: MonthViewActionTypes }>['payload']\n ) => dispatch({ type, payload });\n });\n\n monthsGridViewActionTypes.forEach((type) => {\n actionsObject[type] = (\n payload: Extract<DatePickerReducerAction, { type: MonthsGridViewActionTypes }>['payload']\n ) => dispatch({ type, payload });\n });\n\n yearsGridViewActionTypes.forEach((type) => {\n actionsObject[type] = (\n payload: Extract<DatePickerReducerAction, { type: YearsGridViewActionTypes }>['payload']\n ) => dispatch({ type, payload });\n });\n\n return actionsObject;\n }, [dispatch]);\n\n return { state, actions };\n};\n\nexport { useDatePickerState };\nexport type {\n DatePickerState,\n DatePickerStateAction,\n DatePickerViewActionTypes,\n MonthViewActionTypes,\n MonthsGridViewActionTypes,\n YearsGridViewActionTypes\n};\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport type { MonthView } from '#PRIVATE_MonthView';\nimport type { MonthsGridView, YearsGridView } from '#PRIVATE_MonthYearGridView';\nimport { useFocusWithin } from '#hooks/UNSAFE_useFocusWithin';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport {\n constrainCalendarDate,\n getCalendarDateToday,\n isCalendarDateBefore,\n type CalendarDateRequired\n} from '#utils/UNSAFE_calendarDateUtils';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { ComponentProps, RefObject, useCallback, useMemo } from 'preact/compat';\nimport { useDatePickerState } from './useDatePickerState';\nimport { useHiddenTestMethod } from '#hooks/UNSAFE_useHiddenTestMethod';\n\n/**\n * A map that specifies the selection of the header toggle button based on the\n * view we are in.\n */\nconst headerToggleSelection = {\n monthView: 'none',\n monthsGridView: 'month',\n yearsGridView: 'year'\n} as const;\n\ntype MonthViewProps = ComponentProps<typeof MonthView>;\ntype MonthsGridViewProps = ComponentProps<typeof MonthsGridView>;\ntype YearsGridViewProps = ComponentProps<typeof YearsGridView>;\n\ntype UseDatePickerProps = {\n isReadonly?: boolean;\n max?: CalendarDateRequired;\n min?: CalendarDateRequired;\n rootRef: RefObject<HTMLDivElement>;\n todayTimeZone?: Intl.DateTimeFormatOptions['timeZone'];\n value?: CalendarDateRequired;\n onCommit: (detail: ValueUpdateDetail<CalendarDateRequired>) => void;\n};\n\n/**\n * A custom hook that adds functionality to the DatePicker component.\n */\nexport const useDatePicker = ({\n isReadonly,\n max,\n min,\n rootRef,\n todayTimeZone,\n value,\n onCommit\n}: UseDatePickerProps) => {\n // Check for errors first\n if (min && max && isCalendarDateBefore(max, min)) {\n throw new Error('DatePicker: min must be equal or less than max.');\n }\n\n const todaysDate = getCalendarDateToday(todayTimeZone);\n\n // We need to make sure that this initialFocusableDate is within the min/max range.\n // When there is no min or max set, we draw the month of the value if value is set, otherwise we draw today's month.\n // If the initialFocusableDate is not within the min/max range, then we constrain the calendar date by changing the month to draw\n // so that the initialFocusableDate is the min date if the initialFocusableDate is < min or the max month if the initialFocusableDate is > max.\n const initialFocusableDate = useMemo(\n () => constrainCalendarDate(value ?? todaysDate, min, max),\n [value, todaysDate, min, max]\n );\n\n const { state, actions } = useDatePickerState({ initialFocusableDate });\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const accessibleLabels = {\n next: translations.datePicker_next(),\n previous: translations.datePicker_prev(),\n goToToday: translations.datePicker_goToToday(),\n today: translations.datePicker_today()\n };\n\n // JET-73420, JET-62113: Create a changeValue method that can be called by a test adapter to\n // simulate a user changing the value. This method calls the onCommit callback, just like what\n // would happen if a user (or test) made a change through the UI.\n const changeValue = useCallback(\n (newValue: CalendarDateRequired) => {\n // We always want this method available on the DOM element so that a test can call it,\n // but we only want it to change the value when the component is enabled because that's\n // the only time the user could change the value through the UI. Note that newValue\n // cannot be undefined (meaning you cannot clear the value) because there is no way to\n // do that through the UI.\n if (!isReadonly) {\n onCommit({ value: newValue, previousValue: value });\n return Promise.resolve();\n }\n return Promise.reject('Component is readonly');\n },\n [isReadonly, onCommit, value]\n );\n\n // Expose _changeValue as a hidden method on the root DOM.\n useHiddenTestMethod({\n elementRef: rootRef,\n method: changeValue,\n name: '_changeValue'\n });\n\n const handlers = {\n /**\n * Handler for DatePickerHeader.onMonthToggle.\n * This is used for toggling between the MonthView and\n * MonthsGridView.\n */\n handleMonthToggle: useCallback(() => {\n if (state.currentView !== 'monthsGridView') {\n actions.monthsGridView(undefined);\n } else {\n actions.monthView(undefined);\n }\n }, [actions, state.currentView]),\n\n /**\n * Handler for DatePickerHeader.onYearToggle.\n * This is used for toggling between the MonthView and\n * YearsGridView.\n */\n handleYearToggle: useCallback(() => {\n if (state.currentView !== 'yearsGridView') {\n actions.yearsGridView(undefined);\n } else {\n actions.monthView(undefined);\n }\n }, [actions, state.currentView]),\n\n /**\n * Handler for DatePickerHeader.onTodayNavigation.\n * This is used for navigating to today in the MonthView.\n */\n handleTodayNavigation: useCallback(() => {\n actions.goToToday(todaysDate);\n }, [actions, todaysDate]),\n\n /**\n * Handler for DatePickerHeader.onPreviousNavigation.\n * This is used for navigating to the previous month in MonthView\n * and previous decade in YearsGridView.\n */\n handlePreviousNavigation: useCallback(() => {\n if (state.currentView === 'monthView') {\n return actions.previousMonth(state.focusableDate);\n }\n\n if (state.currentView === 'yearsGridView') {\n return actions.previousDecade({ year: state.focusableYear });\n }\n }, [actions, state.currentView, state.focusableDate, state.focusableYear]),\n\n /**\n * Handler for DatePickerHeader.onNextNavigation.\n * This is used for navigating to the next month in MonthView\n * and next decade in YearsGridView.\n */\n handleNextNavigation: useCallback(() => {\n if (state.currentView === 'monthView') {\n return actions.nextMonth(state.focusableDate);\n }\n\n if (state.currentView === 'yearsGridView') {\n return actions.nextDecade({ year: state.focusableYear });\n }\n }, [actions, state.currentView, state.focusableDate, state.focusableYear]),\n\n /**\n * Handler for MonthView.onAction.\n * This is used for selecting a date in MonthView.\n */\n handleMonthViewAction: useCallback<MonthViewProps['onAction']>(\n (payload) => {\n if (payload.date === undefined || isReadonly) return;\n actions.daySelected(payload.date);\n // We purposely send onCommit even if the value is the same.\n // The InputDatePicker closes the datepicker when the user commits,\n // even if it is the already selected date.\n onCommit?.({ previousValue: value, value: payload.date });\n },\n [actions, isReadonly, onCommit, value]\n ),\n\n /**\n * Handler for MonthView.onNavigation.\n * This is used for navigating in the MonthView like moving around the\n * dates in the month and going to the prev/next month/year.\n */\n handleMonthViewNavigation: useCallback<MonthViewProps['onNavigation']>(\n (detail) => {\n switch (detail.direction) {\n case 'previousMonth':\n return actions.previousMonthAndFocus(detail.date);\n case 'nextMonth':\n return actions.nextMonthAndFocus(detail.date);\n case 'today':\n return actions.goToToday(todaysDate);\n default:\n return actions[detail.direction](detail.date);\n }\n },\n [actions, todaysDate]\n ),\n\n /**\n * Handler for MonthsGridView.onAction.\n * This is used for selecting a month in MonthsGridView and navigating to\n * the selected month in MonthView.\n */\n handleMonthsGridViewAction: useCallback<MonthsGridViewProps['onAction']>(\n (detail) => {\n actions.monthSelected(detail);\n },\n [actions]\n ),\n\n /**\n * Handler for MonthsGridView.onNavigation.\n * This is used for navigating through the MonthsGridView.\n */\n handleMonthsGridViewNavigation: useCallback<MonthsGridViewProps['onNavigation']>(\n (detail) => {\n switch (detail.direction) {\n case 'down':\n return actions.nextMonthRowInGridView({ month: detail.month });\n case 'next':\n return actions.nextMonthInGridView({ month: detail.month });\n case 'previous':\n return actions.previousMonthInGridView({ month: detail.month });\n case 'up':\n return actions.previousMonthRowInGridView({ month: detail.month });\n }\n },\n [actions]\n ),\n\n /**\n * Handler for YearsGridView.onAction.\n * This is used for selecting a year in YearsGridView and navigating to\n * the selected year in MonthView.\n */\n handleYearsGridViewAction: useCallback<YearsGridViewProps['onAction']>(\n (detail) => {\n actions.yearSelected(detail);\n },\n [actions]\n ),\n\n /**\n * Handler for YearsGridView.onNavigation.\n * This is used for navigating through the YearsGridView.\n */\n handleYearsGridViewNavigation: useCallback<YearsGridViewProps['onNavigation']>(\n (detail) => {\n switch (detail.direction) {\n case 'down':\n return actions.nextYearRowInGridView({ year: detail.year });\n case 'next':\n return actions.nextYearInGridView({ year: detail.year });\n case 'nextDecade':\n return actions.nextDecadeAndFocus({ year: detail.year });\n case 'previous':\n return actions.previousYearInGridView({ year: detail.year });\n case 'previousDecade':\n return actions.previousDecadeAndFocus({ year: detail.year });\n case 'up':\n return actions.previousYearRowInGridView({ year: detail.year });\n }\n },\n [actions]\n )\n };\n\n const { focusProps } = useFocusWithin({\n // If we blur out of the MonthView, make sure the isViewFocused state is false.\n // This is used for the case where you are on the Today month,\n // and you press on Go to Today, focus moves to the day cell that is today,\n // then tab back twice to Go to Today button and press it again and focus should move again to the day cell that is today.\n // JET-66580 today button stays highlighted and arrow keys do not work\n // We do not set isViewFocused onFocusWithin. Doing so causes a different issue. JET-73067 Input Date Picker/DatePicker - REFLOW - can not set value on the first click\n onBlurWithin: useCallback(() => actions.viewBlur(undefined), [actions])\n });\n\n return {\n accessibleLabels,\n actions,\n handlers,\n state,\n todaysDate,\n toggleSelection: headerToggleSelection[state.currentView],\n viewContainerProps: { ...focusProps }\n };\n};\n","import { Flex } from '#UNSAFE_Flex';\nimport type { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { Button } from '#UNSAFE_Button';\nimport { ComponentProps } from 'preact/compat';\n\ntype ButtonOnAction = NonNullable<ComponentProps<typeof Button>['onAction']>;\n\ntype Props = TestIdProps & {\n /**\n * Accessible label for the today navigation button that is in the footer of the DatePicker\n * in small screens.\n *\n * Use this property to provide a screen reader aria-label for the\n * footer today navigation button.\n */\n todayNavigationAriaLabel: string;\n\n /**\n * Label for the today navigation button that is in the footer of the DatePicker in small screens.\n * Use this property to provide a label for the footer today navigation button.\n */\n todayNavigationLabel: string;\n\n /**\n * A callback function to be called when the today button is clicked. Only\n * applicable when `isTodayNavigationButtonHidden` is set to `false`.\n */\n onTodayNavigationAction?: ButtonOnAction;\n};\n\n/**\n * A Today button. The DatePicker puts this in its footer on small screens.\n * When a user presses the button, the DatePicker navigates to Today and sets focus on Today.\n */\nexport const TodayButton = ({\n onTodayNavigationAction,\n testId,\n todayNavigationAriaLabel,\n todayNavigationLabel\n}: Props) => {\n return (\n <Flex direction=\"column\">\n <Button\n testId={testId}\n label={todayNavigationLabel}\n aria-label={todayNavigationAriaLabel}\n size=\"sm\"\n onAction={onTodayNavigationAction}\n />\n </Flex>\n );\n};\n","import { useRef } from 'preact/hooks';\nimport { DatePickerHeader } from '#PRIVATE_DatePickerHeader';\nimport { MonthView } from '#PRIVATE_MonthView';\nimport { MonthsGridView, YearsGridView } from '#PRIVATE_MonthYearGridView';\nimport { Flex } from '#UNSAFE_Flex';\nimport { useTestId, type TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { type CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { useDatePicker } from './useDatePicker';\nimport { useBreakpointValues } from '#hooks/UNSAFE_useBreakpointValues';\nimport { TodayButton } from './TodayButton';\nimport { datePickerPropVars } from './themes/DatePickerContract.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { DatePickerRedwoodTheme } from './themes/redwood/DatePickerTheme';\nimport { Size } from '#utils/UNSAFE_size';\n\nexport type DayFormatOptions = {\n state: 'enabled' | 'disabled' | 'restricted';\n};\n\ntype Props = TestIdProps & {\n /**\n * A function that receives a date and returns an object specifying how to format the provided date.\n * This function is called for each date that is rendered and this can be used to control how individual\n * dates are rendered - disabled, restricted, or enabled.\n * @param date The date to format\n * @returns The format options\n */\n dayFormatter?: (date: CalendarDateRequired) => DayFormatOptions;\n\n /**\n * The daysOutsideMonth property affects the day cells that are outside of the current month.\n * If set to 'hidden', then the days outside of the current month will be hidden.\n * If set to 'selectable', then the days outside of the current month will be visible and selectable.\n * This defaults to 'hidden'.\n */\n daysOutsideMonth?: 'hidden' | 'selectable';\n\n /**\n * When property is set to \"auto\", the date picker will automatically adjust to the height of the rows of weeks.\n * This is mainly to be used in conjunction with InputDatePicker.\n * <p>If not specified, defaults to the theme specified height.<br/>\n */\n height?: 'auto';\n\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n\n /**\n * The monthAndYearPicker property can be used to specify whether or not the DatePicker should show the\n * Months Grid View and Years Grid View.\n */\n monthAndYearPicker?: 'on' | 'off';\n\n /**\n * The maximum selectable date. The max must be equal or greater than the min if they are both specified or an error is thrown.\n */\n max?: CalendarDateRequired;\n\n /**\n * Specifies the component style maxWidth.\n * <p>If not specified, defaults to the theme specified maxWidth.<br/>\n * This attribute accepts values of type:<br/>\n * 0 | `${number}${CssUnits}` | `${number}x` | `--${string}` | `var($string})` | `${number}%`</p>\n * <p>When this component is used in composition and the component should take up 100% of the parent container's\n * width, set maxWidth to '100%'.<br/>\n * Because there is a theme default value for maxWidth, when setting the width property to achieve a fixed width,\n * set the maxWidth property to the same value.</p>\n */\n maxWidth?: Size;\n\n /**\n * The minimum selectable date. The min must be equal or less than the max if they are both specified or an error is thrown.\n */\n min?: CalendarDateRequired;\n\n /**\n * The todayTimeZone property is used to compute what the highlighted today cell is for the DatePicker.\n * This defaults to the user's system timezone.\n * <p>\n * The only reason an application would set the todayTimeZone property is if they want the\n * highlighted today cell to be in a different timezone than the user's system's timezone,\n * like if the user has a preferred timezone that is not where they are physically working.\n * </p>\n */\n todayTimeZone?: Intl.DateTimeFormatOptions['timeZone'];\n\n /**\n * Specifies how to render the 'Go to today' button.\n * <ul>\n * <li>'visible' - set this property to 'visible' to show the 'Go to today' button.</li>\n * <li>'hidden' - set this property to 'hidden' to hide the 'Go to today' button.</li>\n * </ul>\n */\n todayButton?: 'visible' | 'hidden';\n\n /**\n * The value of the DatePicker. The value property is the date that looks selected in the DatePicker.\n * If the value is undefined, no day will look selected.\n * <p>\n * The DatePicker initially opens to the selected date if there is one and it is within the min/max range.\n * If there is no value, the DatePicker initially opens to today's month.\n * </p>\n */\n value?: CalendarDateRequired;\n\n /**\n * Specifies the component style width.\n * <p>If not specified, defaults to '100%'.</p>\n * <p>This attribute accepts values of type:</p>\n * <p>0 | `${number}${CssUnits}` | `${number}x` | `--${string}` | `var($string})` | `${number}%`</p>\n * <br/>\n * <p>Because there is a theme default value for maxWidth, when setting the width property to achieve a fixed width,\n * set the maxWidth property to the same value.</p>\n */\n width?: Size;\n\n /**\n * Callback invoked when the user selects a date in the DatePicker. This callback is called even when the previous\n * value and the value are the same, that is, when the user selects an already selected date.\n * The app needs to handle this to write back the controlled 'value' property, or else no date will be shown\n * to be selected.\n * If the app is using a DatePicker to control another component, like as a way to navigate an Event Calendar,\n * then they would listen to the onCommit to get the value of the selected date.\n */\n onCommit: (detail: ValueUpdateDetail<CalendarDateRequired>) => void;\n\n /**\n * Whether week of the year will be shown in the DatePicker. The default calculation follows the\n * rule for ISO 8601 as follows: The first week of the year is defined as the week that contains\n * the first Thursday. Therefore, if January 1st falls on a Friday, it is considered part of the last week\n * of the previous year. Conversely, if December 31st falls on a Wednesday, it is part of week 1 of the following year.\n */\n weekDisplay?: 'none' | 'number';\n};\n\n/**\n * A DatePicker is a calendar interface that allows users to select a single date.\n */\nexport const DatePicker = ({\n dayFormatter,\n daysOutsideMonth,\n height,\n isReadonly = false,\n monthAndYearPicker = 'on',\n max,\n maxWidth,\n min,\n value,\n testId,\n todayTimeZone,\n todayButton = 'visible',\n weekDisplay = 'none',\n width,\n onCommit\n}: Props) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const { accessibleLabels, handlers, state, todaysDate, toggleSelection, viewContainerProps } =\n useDatePicker({\n isReadonly,\n max,\n min,\n rootRef,\n todayTimeZone,\n value,\n onCommit\n });\n const { month, year } = state.focusableDate;\n const isMonthYearPickerEnabled = monthAndYearPicker === 'on' && !isReadonly;\n // When the screen is < 360px, we hide the DatePickerHeader's today button and show a Today button\n // on the bottom of the DatePicker instead.\n // NOTE: I cannot use xs, sm here since useBreakpointValues's types do not allow it.\n const shouldShowTodayFooterButton = useBreakpointValues(\n {\n sm: true,\n md: false\n },\n { sm: '0px', md: '360px' }\n );\n\n const showTodayFooterButton =\n !state.isTodayNavigationButtonHidden &&\n shouldShowTodayFooterButton &&\n todayButton === 'visible';\n\n // we need to render the baseTheme on the root dom element so that the CSS vars in datePickerPropVars will be defined.\n const { classes } = useComponentTheme(DatePickerRedwoodTheme);\n\n const testIdProps = useTestId(testId);\n\n return (\n <div class={classes} ref={rootRef} {...testIdProps}>\n <Flex\n direction=\"column\"\n gap={\n state.currentView === 'monthView'\n ? datePickerPropVars.calendarGridRowGap\n : datePickerPropVars.monthYearGridRowGap\n }\n height={\n height === 'auto'\n ? undefined\n : showTodayFooterButton\n ? datePickerPropVars.todayFooterButtonHeight\n : datePickerPropVars.height\n }\n maxWidth={maxWidth !== undefined ? maxWidth : datePickerPropVars.maxWidth}\n width={width !== undefined ? width : datePickerPropVars.width}>\n <DatePickerHeader\n testId={testId ? testId + '_header' : undefined}\n month={month}\n year={year}\n isPreviousNavigationButtonHidden={state.isPreviousNavigationButtonHidden}\n isTodayNavigationButtonHidden={\n todayButton === 'hidden' ||\n state.isTodayNavigationButtonHidden ||\n shouldShowTodayFooterButton\n }\n isNextNavigationButtonHidden={state.isNextNavigationButtonHidden}\n monthYearHeader={isMonthYearPickerEnabled ? 'independentButtons' : 'text'}\n toggleSelection={isMonthYearPickerEnabled ? toggleSelection : undefined}\n previousNavigationAccessibleLabel={accessibleLabels.previous}\n todayNavigationAccessibleLabel={accessibleLabels.goToToday}\n nextNavigationAccessibleLabel={accessibleLabels.next}\n onTodayNavigationAction={handlers.handleTodayNavigation}\n onPreviousNavigationAction={handlers.handlePreviousNavigation}\n onNextNavigationAction={handlers.handleNextNavigation}\n onMonthToggle={isMonthYearPickerEnabled ? handlers.handleMonthToggle : undefined}\n onYearToggle={isMonthYearPickerEnabled ? handlers.handleYearToggle : undefined}\n />\n <div {...viewContainerProps}>\n {state.currentView === 'monthView' && (\n <MonthView\n dayFormatter={dayFormatter}\n daysOutsideMonth={daysOutsideMonth}\n isReadonly={isReadonly}\n max={max}\n min={min}\n selectedDate={value}\n focusableDate={state.focusableDate}\n isFocused={state.isViewFocused}\n testId={testId ? testId + '_monthView' : undefined}\n todaysDate={todaysDate}\n onNavigation={handlers.handleMonthViewNavigation}\n onAction={handlers.handleMonthViewAction}\n weekDisplay={weekDisplay}\n />\n )}\n {state.currentView === 'monthsGridView' && (\n <MonthsGridView\n currentMonth={todaysDate.month}\n focusableMonth={state.focusableMonth}\n isFocused={state.isViewFocused}\n selectedMonth={month}\n testId={testId ? testId + '_monthsGridView' : undefined}\n onAction={handlers.handleMonthsGridViewAction}\n onNavigation={handlers.handleMonthsGridViewNavigation}\n />\n )}\n {state.currentView === 'yearsGridView' && (\n <YearsGridView\n currentYear={todaysDate.year}\n focusableYear={state.focusableYear}\n isFocused={state.isViewFocused}\n selectedYear={year}\n testId={testId ? testId + '_yearsGridView' : undefined}\n onAction={handlers.handleYearsGridViewAction}\n onNavigation={handlers.handleYearsGridViewNavigation}\n />\n )}\n </div>\n {showTodayFooterButton && (\n <div>\n <TodayButton\n testId={testId ? testId + '_footerTodayButton' : undefined}\n todayNavigationLabel={accessibleLabels.today}\n todayNavigationAriaLabel={accessibleLabels.goToToday}\n onTodayNavigationAction={handlers.handleTodayNavigation}\n />\n </div>\n )}\n </Flex>\n </div>\n );\n};\n"],"names":["_jsx","useRef","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AAqGH,MAAM,yBAAyB,GA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GAAA,CAAC,aAAa,EAAA,EACZ,WAAW,EAAE,UAAU,CAAC,IAAI,EAC5B,aAAa,EAAE,KAAK,CAAC,aAAa,EAClC,SAAS,EAAE,KAAK,CAAC,aAAa,EAC9B,YAAY,EAAE,IAAI,EAClB,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,SAAS,EACtD,QAAQ,EAAE,QAAQ,CAAC,yBAAyB,EAC5C,YAAY,EAAE,QAAQ,CAAC,6BAA6B,GACpD,CACH,CAAA,EAAA,CACG,EACL,qBAAqB,KACpBA,GAAA,CAAA,KAAA,EAAA,EAAA,QAAA,EACEA,IAAC,WAAW,EAAA,EACV,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,oBAAoB,GAAG,SAAS,EAC1D,oBAAoB,EAAE,gBAAgB,CAAC,KAAK,EAC5C,wBAAwB,EAAE,gBAAgB,CAAC,SAAS,EACpD,uBAAuB,EAAE,QAAQ,CAAC,qBAAqB,EACvD,CAAA,EAAA,CACE,CACP,CACI,EAAA,CAAA,EAAA,CACH,EACN;AACJ;;;;"}
@@ -5,7 +5,7 @@ import { a as getFormatParse } from './getFormatParse-6d6fdd4d.js';
5
5
  import { w as warn } from './logger-c92f309c.js';
6
6
  import { d as getIsoDateStr, t as toJSDate, e as toJSDateUTC, b as checkNoCalendarExtension, f as formatFullCalendarDate, i as isDateOutOfRange } from './calendarDateUtils-30611c35.js';
7
7
  import { useMemo } from 'preact/hooks';
8
- import { S as StyledDatePickerButton } from './StyledDatePickerButton-f3971567.js';
8
+ import { S as StyledDatePickerButton } from './StyledDatePickerButton-78f2f6e8.js';
9
9
  import { useCallback } from 'preact/compat';
10
10
  import { u as useTranslationBundle } from './useTranslationBundle-4822502f.js';
11
11
  import { u as useFocusableCell, a as useCellNavigation } from './useCellNavigation-0565b6dd.js';
@@ -205,4 +205,4 @@ function isOutOfMonth(date1, currentMonthDate) {
205
205
  }
206
206
 
207
207
  export { MonthView as M };
208
- //# sourceMappingURL=MonthView-097171eb.js.map
208
+ //# sourceMappingURL=MonthView-4b2b483a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MonthView-097171eb.js","sources":["../../src/PRIVATE_MonthView/useDayCell.ts","../../src/PRIVATE_MonthView/DayCell.tsx","../../src/PRIVATE_MonthView/WeekNumberCell.tsx","../../src/PRIVATE_MonthView/MonthView.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport { DateISOStr } from '#UNSAFE_IntlDateTime';\nimport { FormatterFunc } from '#UNSAFE_IntlFormatParse';\nimport { getIsoDateStr, toJSDate } from '#utils/UNSAFE_calendarDateUtils';\nimport { ComponentProps, useCallback } from 'preact/compat';\n\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { useFocusableCell } from '#UNSAFE_DatePicker/useFocusableCell';\nimport { useCellNavigation } from '#UNSAFE_DatePicker/useCellNavigation';\nimport { StyledDatePickerButton } from '#PRIVATE_StyledDatePickerButton';\n\ntype NavigationDirections =\n | 'previousDay'\n | 'nextDay'\n | 'previousWeek'\n | 'nextWeek'\n | 'previousMonth'\n | 'nextMonth'\n | 'previousYear'\n | 'nextYear'\n | 'firstDayOfMonth'\n | 'lastDayOfMonth'\n | 'today';\n\nexport type DayFormatOptions = {\n state: 'enabled' | 'disabled' | 'restricted';\n};\n\n// These are the properties the useDayCell hook takes.\nexport type UseDayCellProps = {\n /**\n * Date of the day cell. This will be formatted as a full date and put in the aria-label.\n */\n date: CalendarDateRequired;\n /**\n * A function used to format the day cell date as a full date.\n */\n dateFormatter: FormatterFunc<DateISOStr>;\n /**\n * A function that receives a date and returns an object specifying how to format the provided date.\n * This function is called for each date that is rendered and this can be used to control how individual\n * dates are rendered - disabled, restricted, or enabled.\n * @param date The date to format\n * @returns The format options\n */\n dayFormatter?: (date: CalendarDateRequired) => DayFormatOptions;\n /**\n * Whether the day cell is in an adjacent month, not the current month.\n */\n isAdjacentMonth: boolean;\n /**\n * Whether the day cell is disabled, like if it is out of the min/max range.\n */\n isDisabled?: boolean;\n /**\n * Whether the day cell is focusable, meaning it will have tabIndex 0.\n */\n isFocusable: boolean;\n /**\n * Whether the day cell has focus.\n */\n isFocused: boolean;\n /**\n * Whether the day cell is hidden. For example, days outside of the current month are hidden by default.\n */\n isHidden: boolean;\n /**\n * Whether the day cell is readonly. It is not activeable.\n */\n isReadonly: boolean;\n /**\n * Whether the day cell looks selected.\n */\n isSelected: boolean;\n /**\n * Whether the day cell's date is today.\n */\n isToday: boolean;\n /**\n * A callback that will be invoked when the user selects the date by clicking on a day cell or selecting the enter or space key on a day cell.\n * @param payload The payload containing the date represented by this cell.\n */\n onAction: (payload: { date: CalendarDateRequired }) => void;\n\n /**\n * A callback that will be invoked when the user navigates.\n */\n onNavigation: (detail: { direction: NavigationDirections; date: CalendarDateRequired }) => void;\n};\n\n/**\n * The useDayCell hook returns properties for an individual DayCell. The properties returned should be spread on the StyledDatePickerButton.\n * These include the event handlers for keydown and click.\n */\nexport const useDayCell = ({\n date,\n dayFormatter = defaultDayFormatter,\n dateFormatter,\n isAdjacentMonth,\n isDisabled,\n isFocusable,\n isFocused,\n isHidden,\n isReadonly,\n isSelected,\n isToday,\n onAction,\n onNavigation\n}: UseDayCellProps) => {\n // apply day formatting\n const { state } = dayFormatter(date);\n const isDisabledFormat = state === 'disabled';\n const isRestrictedFormat = state === 'restricted';\n\n // Focus the day cell with isFocused true when the state updates.\n const buttonProps = useFocusableCell({ isFocusable, isFocused });\n // Override onAction to not call it if disabled, readonly or restricted\n const handleAction: UseDayCellProps['onAction'] = useCallback(\n (payload) => {\n if (isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat) return;\n onAction(payload);\n },\n [isDisabled, isDisabledFormat, isReadonly, isRestrictedFormat, onAction]\n );\n const buttonEventHandlers = useCellNavigation({\n navigationMap: {\n ArrowLeft: { ltr: 'previousDay', rtl: 'nextDay' },\n ArrowRight: { ltr: 'nextDay', rtl: 'previousDay' },\n ArrowDown: 'nextWeek',\n ArrowUp: 'previousWeek',\n PageDown: 'nextMonth',\n PageUp: 'previousMonth',\n Home: 'firstDayOfMonth',\n End: 'lastDayOfMonth',\n ShiftPageDown: 'nextYear',\n ShiftPageUp: 'previousYear',\n CtrlAltT: 'today'\n },\n payload: { date },\n onAction: handleAction,\n onNavigation\n });\n\n // For accessibility, we want a full date.\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const today = translations.datePicker_today();\n const selected = translations.datePicker_selected();\n const restricted = translations.datePicker_restricted();\n\n const dateIsoStr = getIsoDateStr(date.year, date.month, date.day);\n const formattedDate = dateFormatter(dateIsoStr);\n let ariaLabel = isToday ? `${today}, ${formattedDate}` : formattedDate;\n ariaLabel = isRestrictedFormat ? `${ariaLabel}, ${restricted}` : ariaLabel;\n ariaLabel = isSelected ? `${ariaLabel}, ${selected}` : ariaLabel;\n const dayOfMonth = toJSDate(date.year, date.month, date.day).getDate().toString();\n\n return {\n buttonProps: {\n 'aria-label': ariaLabel,\n ...((isHidden || isDisabled || isDisabledFormat || isRestrictedFormat) && {\n 'aria-disabled': true\n }),\n isActivable: !(isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat),\n isAdjacentMonth,\n isDimmed: isDisabled || isDisabledFormat,\n isHidden,\n isHoverable: !(isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat),\n isReadonly,\n isSelected,\n isRestricted: isRestrictedFormat,\n isToday,\n label: dayOfMonth,\n ...buttonProps,\n ...buttonEventHandlers\n } as ComponentProps<typeof StyledDatePickerButton>\n };\n};\n\n/**\n * A default day formatter that always formats as enabled state.\n */\nconst defaultDayFormatter = () => ({ state: 'enabled' }) as DayFormatOptions;\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { StyledDatePickerButton } from '#PRIVATE_StyledDatePickerButton';\nimport { UseDayCellProps, useDayCell } from './useDayCell';\nimport { dayCellStyles } from './themes/DayCellStyles.css';\n\ntype PickedUseDayCellProps = Pick<\n UseDayCellProps,\n | 'date'\n | 'dateFormatter'\n | 'dayFormatter'\n | 'isAdjacentMonth'\n | 'isDisabled'\n | 'isFocusable'\n | 'isFocused'\n | 'isHidden'\n | 'isReadonly'\n | 'isSelected'\n | 'isToday'\n | 'onAction'\n | 'onNavigation'\n>;\n\ntype DayCellProps = PickedUseDayCellProps;\n\n/**\n * The DayCell is the cell within the DatePicker's month view that contains the day in the month view.\n * This component will format the date for the aria-label.\n * The DayCell components uses the useDayCell hook to handle the user interactions with the day cell.\n */\nexport const DayCell = (props: DayCellProps) => {\n const { buttonProps } = useDayCell(props);\n // buttonProps, e.g., tabIndex, aria-label, onclick, onkeydown and visual states\n return (\n <div role=\"gridcell\" class={dayCellStyles}>\n <StyledDatePickerButton {...buttonProps} />\n </div>\n );\n};\n","import { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { CalendarDateRequired, toJSDate, toJSDateUTC } from '#utils/UNSAFE_calendarDateUtils';\nimport { weekNumberCellStyles, weekNumberStyles } from './themes/WeekNumberCellStyle.css';\nimport * as Logger from '../utils/UNSAFE_logger';\n\ntype Props = {\n /**\n * startDateOfWeek is the first date of the week row\n */\n startDateOfWeek: CalendarDateRequired;\n};\n\n/**\n * The ISO 8601 definition for week 01 is the week with the first Thursday of the Gregorian year (i.e. of January) in it.\n * https://en.wikipedia.org/wiki/ISO_week_date\n * @param date The first date of the week row to be used to calculate the week number.\n * The date must be a Saturday, Sunday, or Monday. We assume this because the week for\n * all the locales we support start on one of these days.\n * @returns the number of week in the year\n */\nconst calculateWeekNumber = (date: CalendarDateRequired) => {\n const checkDate = toJSDateUTC(date.year, date.month, date.day);\n const dayNumber = checkDate.getUTCDay(); // 0 for Sunday, 1 for Monday, 2 for Tuesday, etc.\n\n if (dayNumber !== 0 && dayNumber !== 1 && dayNumber !== 6) {\n // This message is for internal JET developers. We should never see this message. In all locales the day of the\n // week starts on Sunday, Monday or Saturday.\n Logger.warn(`calculateWeekNumber's date property's getUTCDay() is assumed to be 0 (Sunday), 1 (Monday) or 6 (Saturday)\n since that is the first day of the week for the locale's JET supports.`);\n }\n\n // For ISO week, we set the start of the week to Monday\n if (dayNumber !== 1) {\n // If it is already Monday, do nothing.\n // If it is Sunday (0), add 1 to move it up to Monday.\n // If it is Saturday (6), move it up two days to Monday.\n checkDate.setUTCDate(checkDate.getUTCDate() + (dayNumber === 0 ? 1 : 2));\n }\n\n // Find Thursday (day value of 4) of this week. Since we know checkDate at this point is a Monday,\n // we move it up 3 days.\n checkDate.setUTCDate(checkDate.getUTCDate() + 3);\n\n // Create the start of the year date\n const janFirst = toJSDate(checkDate.getUTCFullYear(), 1, 1);\n\n return Math.floor(Math.round((checkDate.getTime() - janFirst.getTime()) / 86400000) / 7) + 1;\n};\n\n/**\n * The WeekNumberCell is the cell at the start of a week's row within the DatePicker's\n * month view that contains the week's number within the year. This displays when\n * the DatePicker's 'weekDisplay' prop is set to 'number'.\n * This component will format the week number for the aria-label.\n */\nconst WeekNumberCell = ({ startDateOfWeek }: Props) => {\n const weekNumber = calculateWeekNumber(startDateOfWeek);\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n return (\n <div\n aria-label={translations.datePicker_weekNum({ NUM: String(weekNumber) })}\n class={weekNumberCellStyles}\n role=\"rowheader\">\n <span class={weekNumberStyles}>{weekNumber}</span>\n </div>\n );\n};\n\nexport { WeekNumberCell };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport {\n getWeeksInMonth,\n getDatesInWeek,\n getStartOfWeek,\n getDaysOfWeekNames,\n WeekInMonthIndex\n} from '#utils/PRIVATE_dayUtils';\nimport { ComponentProps } from 'preact/compat';\nimport { useMemo } from 'preact/hooks';\nimport {\n CalendarDateRequired,\n checkNoCalendarExtension,\n formatFullCalendarDate,\n isDateOutOfRange\n} from '#utils/UNSAFE_calendarDateUtils';\nimport { getFormatParse, NativeDateTimeOptions } from '#UNSAFE_IntlDateTime';\nimport { DayCell } from './DayCell';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { Grid } from '#UNSAFE_Grid';\nimport {\n MonthViewStyles,\n MonthViewVariantOptions\n} from '#PRIVATE_MonthView/themes/MonthViewStyles.css';\nimport { MonthViewRedwoodTheme } from '#PRIVATE_MonthView/themes/redwood/MonthViewTheme';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { monthViewScaleVars } from '#PRIVATE_MonthView/themes/MonthViewContract.css';\nimport { WeekNumberCell } from './WeekNumberCell';\n\ntype PickedDayCellProps = Pick<\n ComponentProps<typeof DayCell>,\n 'dayFormatter' | 'onAction' | 'onNavigation'\n>;\n\ntype MonthViewProps = TestIdProps &\n PickedDayCellProps & {\n /**\n * The daysOutsideMonth property affects the day cells that are outside of the current month.\n * If set to 'hidden', then the days outside of the current month will be hidden.\n * If set to 'selectable', then the days outside of the current month will be visible and selectable.\n * This defaults to 'hidden'.\n */\n daysOutsideMonth?: 'hidden' | 'selectable';\n /**\n * The MonthView renders with the month of the focusableDate.\n * The focusableDate is the only day in the MonthView that has tabIndex: 0 on it.\n * The focusableDate doesn't have focus until the user tabs in to the Month View.\n * The focusableDate is never undefined.\n */\n focusableDate: CalendarDateRequired;\n /**\n * If set to true, the focusableDate will be focused and you will see the focus ring. It will be\n * false when no date has focus.\n * @default false\n */\n isFocused?: boolean;\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n /**\n * The maximum selectable date. The max must be greater than the min if they are both specified.\n */\n max?: CalendarDateRequired;\n /**\n * The minimum selectable date. The min must be less than the max if they are both specified.\n */\n min?: CalendarDateRequired;\n /**\n * The selected date of the MonthView, or undefined is there is no selected date. This\n * is used to highlight the selected day cell if it is within the min/max range.\n */\n selectedDate?: CalendarDateRequired;\n /**\n * Today's date. This is used to highlight the Today day cell.\n */\n todaysDate: CalendarDateRequired;\n /**\n * Whether week of the year will be shown in the DatePicker. The default calculation follows the\n * ISO 8601 definition: the first week of the year contains the first Thursday of the year.\n * This means that some days from one year may be placed into weeks 'belonging' to another year.\n */\n weekDisplay?: 'none' | 'number';\n };\n\n/**\n * A MonthView is a month interface that allows users to select a single date. The MonthView is the week day header\n * abbreviations and the days of the month. A MonthView is used inside of a DatePicker\n * along with the DatePickerHeader and the MonthGridView and YearGridView.\n */\nexport const MonthView = ({\n dayFormatter,\n daysOutsideMonth = 'hidden',\n isReadonly = false,\n max,\n min,\n onAction,\n onNavigation,\n selectedDate,\n focusableDate,\n isFocused = false,\n testId,\n todaysDate,\n weekDisplay = 'none'\n}: MonthViewProps) => {\n const { locale } = useUser();\n const weeksInMonth = getWeeksInMonth(focusableDate.year, focusableDate.month, locale);\n const { baseTheme, styles } = useComponentTheme<MonthViewVariantOptions, MonthViewStyles>(\n MonthViewRedwoodTheme,\n {}\n );\n const isWeekNumberDisplayed = weekDisplay === 'number';\n const gridTemplateColumns = `repeat(${isWeekNumberDisplayed ? 8 : 7}, 1fr)`;\n\n const dateFormatter = useMemo(() => {\n checkNoCalendarExtension(locale);\n const dateFormatOptions: NativeDateTimeOptions = {\n locale,\n dateStyle: 'full'\n };\n const { format } = getFormatParse(dateFormatOptions);\n return format;\n }, [locale]);\n\n const renderMonthViewHeaderRow = () => {\n const weekDays = getDaysOfWeekNames(locale, 'short');\n\n return (\n <div class={styles.sticky}>\n <Grid\n role=\"row\"\n aria-hidden=\"true\"\n gridTemplateColumns={gridTemplateColumns}\n gap={monthViewScaleVars.columnGap}>\n {isWeekNumberDisplayed && <div role=\"presentation\" />}\n {weekDays.map((day) => (\n <div role=\"columnheader\" class={styles.dayOfTheWeek}>\n <span>{day}</span>\n </div>\n ))}\n </Grid>\n </div>\n );\n };\n\n const renderMonthView = () => {\n const calendarGrid: JSX.Element[] = [];\n\n for (let weekIndex = 0; weekIndex < weeksInMonth; weekIndex++) {\n const startDateOfWeek = getStartOfWeek(focusableDate.year, focusableDate.month, 1, locale);\n\n const weekDates = getDatesInWeek(\n weekIndex as WeekInMonthIndex,\n startDateOfWeek.year,\n startDateOfWeek.month,\n startDateOfWeek.day\n );\n\n const weekCells = weekDates.map((dayCellDate) => {\n // This figures out the visual state of the DayCell.\n const isDisabled = isDateOutOfRange(dayCellDate, min, max);\n\n // Even if the selected date is out of range, the UX design shows it as selected.\n const isSelected = selectedDate ? isSameDate(dayCellDate, selectedDate) : false;\n const isToday = isSameDate(dayCellDate, todaysDate);\n const isFocusable = isSameDate(dayCellDate, focusableDate);\n const isAdjacentMonth = isOutOfMonth(dayCellDate, focusableDate);\n const isHidden = isAdjacentMonth && daysOutsideMonth === 'hidden';\n\n return (\n <DayCell\n key={`${dayCellDate.year}-${dayCellDate.month}-${dayCellDate.day}`}\n date={dayCellDate}\n dateFormatter={dateFormatter}\n dayFormatter={dayFormatter}\n isAdjacentMonth={isAdjacentMonth}\n isDisabled={isDisabled}\n isFocusable={isFocusable}\n isFocused={isFocusable && isFocused}\n isHidden={isHidden}\n isReadonly={isReadonly}\n isSelected={isSelected}\n isToday={isToday}\n onAction={onAction}\n onNavigation={onNavigation}\n />\n );\n });\n\n calendarGrid.push(\n <Grid\n key={weekIndex}\n role=\"row\"\n gridTemplateColumns={gridTemplateColumns}\n gap={monthViewScaleVars.columnGap}>\n {isWeekNumberDisplayed && <WeekNumberCell startDateOfWeek={weekDates[0]} />}\n {weekCells}\n </Grid>\n );\n }\n\n return calendarGrid;\n };\n\n const monthViewAriaLabel = formatFullCalendarDate(locale, focusableDate, 'month');\n return (\n <div class={baseTheme}>\n <Grid\n gap={monthViewScaleVars.rowGap}\n aria-label={monthViewAriaLabel}\n role=\"grid\"\n testId={testId}>\n {renderMonthViewHeaderRow()}\n {renderMonthView()}\n </Grid>\n </div>\n );\n};\n\nfunction isSameDate(date1: CalendarDateRequired, date2: CalendarDateRequired) {\n return date1.year === date2.year && date1.month === date2.month && date1.day === date2.day;\n}\n\nfunction isOutOfMonth(date1: CalendarDateRequired, currentMonthDate: CalendarDateRequired) {\n return date1.month !== currentMonthDate.month;\n}\n"],"names":["_jsx","Logger.warn","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AA6FH;;;AAGG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,EACJ,YAAY,GAAG,mBAAmB,EAClC,aAAa,EACb,eAAe,EACf,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,OAAO,EACP,QAAQ,EACR,YAAY,EACI,KAAI;;IAEpB,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;AACrC,IAAA,MAAM,gBAAgB,GAAG,KAAK,KAAK,UAAU,CAAC;AAC9C,IAAA,MAAM,kBAAkB,GAAG,KAAK,KAAK,YAAY,CAAC;;IAGlD,MAAM,WAAW,GAAG,gBAAgB,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;;AAEjE,IAAA,MAAM,YAAY,GAAgC,WAAW,CAC3D,CAAC,OAAO,KAAI;AACV,QAAA,IAAI,UAAU,IAAI,UAAU,IAAI,gBAAgB,IAAI,kBAAkB;YAAE,OAAO;QAC/E,QAAQ,CAAC,OAAO,CAAC,CAAC;AACpB,KAAC,EACD,CAAC,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,kBAAkB,EAAE,QAAQ,CAAC,CACzE,CAAC;I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,CAAC,GAAI,EAC1E,SAAS,KALL,SAAS,CAMT,CACR,CAAC;SACH;AAED,QAAA,OAAO,YAAY,CAAC;AACtB,KAAC,CAAC;IAEF,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;AAClF,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,SAAS,EACnB,QAAA,EAAAE,IAAA,CAAC,IAAI,EAAA,EACH,GAAG,EAAE,kBAAkB,CAAC,MAAM,EAClB,YAAA,EAAA,kBAAkB,EAC9B,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,MAAM,EAAA,QAAA,EAAA,CACb,wBAAwB,EAAE,EAC1B,eAAe,EAAE,CACb,EAAA,CAAA,EAAA,CACH,EACN;AACJ,EAAE;AAEF,SAAS,UAAU,CAAC,KAA2B,EAAE,KAA2B,EAAA;IAC1E,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC;AAC7F,CAAC;AAED,SAAS,YAAY,CAAC,KAA2B,EAAE,gBAAsC,EAAA;AACvF,IAAA,OAAO,KAAK,CAAC,KAAK,KAAK,gBAAgB,CAAC,KAAK,CAAC;AAChD;;;;"}
1
+ {"version":3,"file":"MonthView-4b2b483a.js","sources":["../../src/PRIVATE_MonthView/useDayCell.ts","../../src/PRIVATE_MonthView/DayCell.tsx","../../src/PRIVATE_MonthView/WeekNumberCell.tsx","../../src/PRIVATE_MonthView/MonthView.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport { DateISOStr } from '#UNSAFE_IntlDateTime';\nimport { FormatterFunc } from '#UNSAFE_IntlFormatParse';\nimport { getIsoDateStr, toJSDate } from '#utils/UNSAFE_calendarDateUtils';\nimport { ComponentProps, useCallback } from 'preact/compat';\n\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { useFocusableCell } from '#UNSAFE_DatePicker/useFocusableCell';\nimport { useCellNavigation } from '#UNSAFE_DatePicker/useCellNavigation';\nimport { StyledDatePickerButton } from '#PRIVATE_StyledDatePickerButton';\n\ntype NavigationDirections =\n | 'previousDay'\n | 'nextDay'\n | 'previousWeek'\n | 'nextWeek'\n | 'previousMonth'\n | 'nextMonth'\n | 'previousYear'\n | 'nextYear'\n | 'firstDayOfMonth'\n | 'lastDayOfMonth'\n | 'today';\n\nexport type DayFormatOptions = {\n state: 'enabled' | 'disabled' | 'restricted';\n};\n\n// These are the properties the useDayCell hook takes.\nexport type UseDayCellProps = {\n /**\n * Date of the day cell. This will be formatted as a full date and put in the aria-label.\n */\n date: CalendarDateRequired;\n /**\n * A function used to format the day cell date as a full date.\n */\n dateFormatter: FormatterFunc<DateISOStr>;\n /**\n * A function that receives a date and returns an object specifying how to format the provided date.\n * This function is called for each date that is rendered and this can be used to control how individual\n * dates are rendered - disabled, restricted, or enabled.\n * @param date The date to format\n * @returns The format options\n */\n dayFormatter?: (date: CalendarDateRequired) => DayFormatOptions;\n /**\n * Whether the day cell is in an adjacent month, not the current month.\n */\n isAdjacentMonth: boolean;\n /**\n * Whether the day cell is disabled, like if it is out of the min/max range.\n */\n isDisabled?: boolean;\n /**\n * Whether the day cell is focusable, meaning it will have tabIndex 0.\n */\n isFocusable: boolean;\n /**\n * Whether the day cell has focus.\n */\n isFocused: boolean;\n /**\n * Whether the day cell is hidden. For example, days outside of the current month are hidden by default.\n */\n isHidden: boolean;\n /**\n * Whether the day cell is readonly. It is not activeable.\n */\n isReadonly: boolean;\n /**\n * Whether the day cell looks selected.\n */\n isSelected: boolean;\n /**\n * Whether the day cell's date is today.\n */\n isToday: boolean;\n /**\n * A callback that will be invoked when the user selects the date by clicking on a day cell or selecting the enter or space key on a day cell.\n * @param payload The payload containing the date represented by this cell.\n */\n onAction: (payload: { date: CalendarDateRequired }) => void;\n\n /**\n * A callback that will be invoked when the user navigates.\n */\n onNavigation: (detail: { direction: NavigationDirections; date: CalendarDateRequired }) => void;\n};\n\n/**\n * The useDayCell hook returns properties for an individual DayCell. The properties returned should be spread on the StyledDatePickerButton.\n * These include the event handlers for keydown and click.\n */\nexport const useDayCell = ({\n date,\n dayFormatter = defaultDayFormatter,\n dateFormatter,\n isAdjacentMonth,\n isDisabled,\n isFocusable,\n isFocused,\n isHidden,\n isReadonly,\n isSelected,\n isToday,\n onAction,\n onNavigation\n}: UseDayCellProps) => {\n // apply day formatting\n const { state } = dayFormatter(date);\n const isDisabledFormat = state === 'disabled';\n const isRestrictedFormat = state === 'restricted';\n\n // Focus the day cell with isFocused true when the state updates.\n const buttonProps = useFocusableCell({ isFocusable, isFocused });\n // Override onAction to not call it if disabled, readonly or restricted\n const handleAction: UseDayCellProps['onAction'] = useCallback(\n (payload) => {\n if (isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat) return;\n onAction(payload);\n },\n [isDisabled, isDisabledFormat, isReadonly, isRestrictedFormat, onAction]\n );\n const buttonEventHandlers = useCellNavigation({\n navigationMap: {\n ArrowLeft: { ltr: 'previousDay', rtl: 'nextDay' },\n ArrowRight: { ltr: 'nextDay', rtl: 'previousDay' },\n ArrowDown: 'nextWeek',\n ArrowUp: 'previousWeek',\n PageDown: 'nextMonth',\n PageUp: 'previousMonth',\n Home: 'firstDayOfMonth',\n End: 'lastDayOfMonth',\n ShiftPageDown: 'nextYear',\n ShiftPageUp: 'previousYear',\n CtrlAltT: 'today'\n },\n payload: { date },\n onAction: handleAction,\n onNavigation\n });\n\n // For accessibility, we want a full date.\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const today = translations.datePicker_today();\n const selected = translations.datePicker_selected();\n const restricted = translations.datePicker_restricted();\n\n const dateIsoStr = getIsoDateStr(date.year, date.month, date.day);\n const formattedDate = dateFormatter(dateIsoStr);\n let ariaLabel = isToday ? `${today}, ${formattedDate}` : formattedDate;\n ariaLabel = isRestrictedFormat ? `${ariaLabel}, ${restricted}` : ariaLabel;\n ariaLabel = isSelected ? `${ariaLabel}, ${selected}` : ariaLabel;\n const dayOfMonth = toJSDate(date.year, date.month, date.day).getDate().toString();\n\n return {\n buttonProps: {\n 'aria-label': ariaLabel,\n ...((isHidden || isDisabled || isDisabledFormat || isRestrictedFormat) && {\n 'aria-disabled': true\n }),\n isActivable: !(isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat),\n isAdjacentMonth,\n isDimmed: isDisabled || isDisabledFormat,\n isHidden,\n isHoverable: !(isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat),\n isReadonly,\n isSelected,\n isRestricted: isRestrictedFormat,\n isToday,\n label: dayOfMonth,\n ...buttonProps,\n ...buttonEventHandlers\n } as ComponentProps<typeof StyledDatePickerButton>\n };\n};\n\n/**\n * A default day formatter that always formats as enabled state.\n */\nconst defaultDayFormatter = () => ({ state: 'enabled' }) as DayFormatOptions;\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { StyledDatePickerButton } from '#PRIVATE_StyledDatePickerButton';\nimport { UseDayCellProps, useDayCell } from './useDayCell';\nimport { dayCellStyles } from './themes/DayCellStyles.css';\n\ntype PickedUseDayCellProps = Pick<\n UseDayCellProps,\n | 'date'\n | 'dateFormatter'\n | 'dayFormatter'\n | 'isAdjacentMonth'\n | 'isDisabled'\n | 'isFocusable'\n | 'isFocused'\n | 'isHidden'\n | 'isReadonly'\n | 'isSelected'\n | 'isToday'\n | 'onAction'\n | 'onNavigation'\n>;\n\ntype DayCellProps = PickedUseDayCellProps;\n\n/**\n * The DayCell is the cell within the DatePicker's month view that contains the day in the month view.\n * This component will format the date for the aria-label.\n * The DayCell components uses the useDayCell hook to handle the user interactions with the day cell.\n */\nexport const DayCell = (props: DayCellProps) => {\n const { buttonProps } = useDayCell(props);\n // buttonProps, e.g., tabIndex, aria-label, onclick, onkeydown and visual states\n return (\n <div role=\"gridcell\" class={dayCellStyles}>\n <StyledDatePickerButton {...buttonProps} />\n </div>\n );\n};\n","import { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { CalendarDateRequired, toJSDate, toJSDateUTC } from '#utils/UNSAFE_calendarDateUtils';\nimport { weekNumberCellStyles, weekNumberStyles } from './themes/WeekNumberCellStyle.css';\nimport * as Logger from '../utils/UNSAFE_logger';\n\ntype Props = {\n /**\n * startDateOfWeek is the first date of the week row\n */\n startDateOfWeek: CalendarDateRequired;\n};\n\n/**\n * The ISO 8601 definition for week 01 is the week with the first Thursday of the Gregorian year (i.e. of January) in it.\n * https://en.wikipedia.org/wiki/ISO_week_date\n * @param date The first date of the week row to be used to calculate the week number.\n * The date must be a Saturday, Sunday, or Monday. We assume this because the week for\n * all the locales we support start on one of these days.\n * @returns the number of week in the year\n */\nconst calculateWeekNumber = (date: CalendarDateRequired) => {\n const checkDate = toJSDateUTC(date.year, date.month, date.day);\n const dayNumber = checkDate.getUTCDay(); // 0 for Sunday, 1 for Monday, 2 for Tuesday, etc.\n\n if (dayNumber !== 0 && dayNumber !== 1 && dayNumber !== 6) {\n // This message is for internal JET developers. We should never see this message. In all locales the day of the\n // week starts on Sunday, Monday or Saturday.\n Logger.warn(`calculateWeekNumber's date property's getUTCDay() is assumed to be 0 (Sunday), 1 (Monday) or 6 (Saturday)\n since that is the first day of the week for the locale's JET supports.`);\n }\n\n // For ISO week, we set the start of the week to Monday\n if (dayNumber !== 1) {\n // If it is already Monday, do nothing.\n // If it is Sunday (0), add 1 to move it up to Monday.\n // If it is Saturday (6), move it up two days to Monday.\n checkDate.setUTCDate(checkDate.getUTCDate() + (dayNumber === 0 ? 1 : 2));\n }\n\n // Find Thursday (day value of 4) of this week. Since we know checkDate at this point is a Monday,\n // we move it up 3 days.\n checkDate.setUTCDate(checkDate.getUTCDate() + 3);\n\n // Create the start of the year date\n const janFirst = toJSDate(checkDate.getUTCFullYear(), 1, 1);\n\n return Math.floor(Math.round((checkDate.getTime() - janFirst.getTime()) / 86400000) / 7) + 1;\n};\n\n/**\n * The WeekNumberCell is the cell at the start of a week's row within the DatePicker's\n * month view that contains the week's number within the year. This displays when\n * the DatePicker's 'weekDisplay' prop is set to 'number'.\n * This component will format the week number for the aria-label.\n */\nconst WeekNumberCell = ({ startDateOfWeek }: Props) => {\n const weekNumber = calculateWeekNumber(startDateOfWeek);\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n return (\n <div\n aria-label={translations.datePicker_weekNum({ NUM: String(weekNumber) })}\n class={weekNumberCellStyles}\n role=\"rowheader\">\n <span class={weekNumberStyles}>{weekNumber}</span>\n </div>\n );\n};\n\nexport { WeekNumberCell };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport {\n getWeeksInMonth,\n getDatesInWeek,\n getStartOfWeek,\n getDaysOfWeekNames,\n WeekInMonthIndex\n} from '#utils/PRIVATE_dayUtils';\nimport { ComponentProps } from 'preact/compat';\nimport { useMemo } from 'preact/hooks';\nimport {\n CalendarDateRequired,\n checkNoCalendarExtension,\n formatFullCalendarDate,\n isDateOutOfRange\n} from '#utils/UNSAFE_calendarDateUtils';\nimport { getFormatParse, NativeDateTimeOptions } from '#UNSAFE_IntlDateTime';\nimport { DayCell } from './DayCell';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { Grid } from '#UNSAFE_Grid';\nimport {\n MonthViewStyles,\n MonthViewVariantOptions\n} from '#PRIVATE_MonthView/themes/MonthViewStyles.css';\nimport { MonthViewRedwoodTheme } from '#PRIVATE_MonthView/themes/redwood/MonthViewTheme';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { monthViewScaleVars } from '#PRIVATE_MonthView/themes/MonthViewContract.css';\nimport { WeekNumberCell } from './WeekNumberCell';\n\ntype PickedDayCellProps = Pick<\n ComponentProps<typeof DayCell>,\n 'dayFormatter' | 'onAction' | 'onNavigation'\n>;\n\ntype MonthViewProps = TestIdProps &\n PickedDayCellProps & {\n /**\n * The daysOutsideMonth property affects the day cells that are outside of the current month.\n * If set to 'hidden', then the days outside of the current month will be hidden.\n * If set to 'selectable', then the days outside of the current month will be visible and selectable.\n * This defaults to 'hidden'.\n */\n daysOutsideMonth?: 'hidden' | 'selectable';\n /**\n * The MonthView renders with the month of the focusableDate.\n * The focusableDate is the only day in the MonthView that has tabIndex: 0 on it.\n * The focusableDate doesn't have focus until the user tabs in to the Month View.\n * The focusableDate is never undefined.\n */\n focusableDate: CalendarDateRequired;\n /**\n * If set to true, the focusableDate will be focused and you will see the focus ring. It will be\n * false when no date has focus.\n * @default false\n */\n isFocused?: boolean;\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n /**\n * The maximum selectable date. The max must be greater than the min if they are both specified.\n */\n max?: CalendarDateRequired;\n /**\n * The minimum selectable date. The min must be less than the max if they are both specified.\n */\n min?: CalendarDateRequired;\n /**\n * The selected date of the MonthView, or undefined is there is no selected date. This\n * is used to highlight the selected day cell if it is within the min/max range.\n */\n selectedDate?: CalendarDateRequired;\n /**\n * Today's date. This is used to highlight the Today day cell.\n */\n todaysDate: CalendarDateRequired;\n /**\n * Whether week of the year will be shown in the DatePicker. The default calculation follows the\n * ISO 8601 definition: the first week of the year contains the first Thursday of the year.\n * This means that some days from one year may be placed into weeks 'belonging' to another year.\n */\n weekDisplay?: 'none' | 'number';\n };\n\n/**\n * A MonthView is a month interface that allows users to select a single date. The MonthView is the week day header\n * abbreviations and the days of the month. A MonthView is used inside of a DatePicker\n * along with the DatePickerHeader and the MonthGridView and YearGridView.\n */\nexport const MonthView = ({\n dayFormatter,\n daysOutsideMonth = 'hidden',\n isReadonly = false,\n max,\n min,\n onAction,\n onNavigation,\n selectedDate,\n focusableDate,\n isFocused = false,\n testId,\n todaysDate,\n weekDisplay = 'none'\n}: MonthViewProps) => {\n const { locale } = useUser();\n const weeksInMonth = getWeeksInMonth(focusableDate.year, focusableDate.month, locale);\n const { baseTheme, styles } = useComponentTheme<MonthViewVariantOptions, MonthViewStyles>(\n MonthViewRedwoodTheme,\n {}\n );\n const isWeekNumberDisplayed = weekDisplay === 'number';\n const gridTemplateColumns = `repeat(${isWeekNumberDisplayed ? 8 : 7}, 1fr)`;\n\n const dateFormatter = useMemo(() => {\n checkNoCalendarExtension(locale);\n const dateFormatOptions: NativeDateTimeOptions = {\n locale,\n dateStyle: 'full'\n };\n const { format } = getFormatParse(dateFormatOptions);\n return format;\n }, [locale]);\n\n const renderMonthViewHeaderRow = () => {\n const weekDays = getDaysOfWeekNames(locale, 'short');\n\n return (\n <div class={styles.sticky}>\n <Grid\n role=\"row\"\n aria-hidden=\"true\"\n gridTemplateColumns={gridTemplateColumns}\n gap={monthViewScaleVars.columnGap}>\n {isWeekNumberDisplayed && <div role=\"presentation\" />}\n {weekDays.map((day) => (\n <div role=\"columnheader\" class={styles.dayOfTheWeek}>\n <span>{day}</span>\n </div>\n ))}\n </Grid>\n </div>\n );\n };\n\n const renderMonthView = () => {\n const calendarGrid: JSX.Element[] = [];\n\n for (let weekIndex = 0; weekIndex < weeksInMonth; weekIndex++) {\n const startDateOfWeek = getStartOfWeek(focusableDate.year, focusableDate.month, 1, locale);\n\n const weekDates = getDatesInWeek(\n weekIndex as WeekInMonthIndex,\n startDateOfWeek.year,\n startDateOfWeek.month,\n startDateOfWeek.day\n );\n\n const weekCells = weekDates.map((dayCellDate) => {\n // This figures out the visual state of the DayCell.\n const isDisabled = isDateOutOfRange(dayCellDate, min, max);\n\n // Even if the selected date is out of range, the UX design shows it as selected.\n const isSelected = selectedDate ? isSameDate(dayCellDate, selectedDate) : false;\n const isToday = isSameDate(dayCellDate, todaysDate);\n const isFocusable = isSameDate(dayCellDate, focusableDate);\n const isAdjacentMonth = isOutOfMonth(dayCellDate, focusableDate);\n const isHidden = isAdjacentMonth && daysOutsideMonth === 'hidden';\n\n return (\n <DayCell\n key={`${dayCellDate.year}-${dayCellDate.month}-${dayCellDate.day}`}\n date={dayCellDate}\n dateFormatter={dateFormatter}\n dayFormatter={dayFormatter}\n isAdjacentMonth={isAdjacentMonth}\n isDisabled={isDisabled}\n isFocusable={isFocusable}\n isFocused={isFocusable && isFocused}\n isHidden={isHidden}\n isReadonly={isReadonly}\n isSelected={isSelected}\n isToday={isToday}\n onAction={onAction}\n onNavigation={onNavigation}\n />\n );\n });\n\n calendarGrid.push(\n <Grid\n key={weekIndex}\n role=\"row\"\n gridTemplateColumns={gridTemplateColumns}\n gap={monthViewScaleVars.columnGap}>\n {isWeekNumberDisplayed && <WeekNumberCell startDateOfWeek={weekDates[0]} />}\n {weekCells}\n </Grid>\n );\n }\n\n return calendarGrid;\n };\n\n const monthViewAriaLabel = formatFullCalendarDate(locale, focusableDate, 'month');\n return (\n <div class={baseTheme}>\n <Grid\n gap={monthViewScaleVars.rowGap}\n aria-label={monthViewAriaLabel}\n role=\"grid\"\n testId={testId}>\n {renderMonthViewHeaderRow()}\n {renderMonthView()}\n </Grid>\n </div>\n );\n};\n\nfunction isSameDate(date1: CalendarDateRequired, date2: CalendarDateRequired) {\n return date1.year === date2.year && date1.month === date2.month && date1.day === date2.day;\n}\n\nfunction isOutOfMonth(date1: CalendarDateRequired, currentMonthDate: CalendarDateRequired) {\n return date1.month !== currentMonthDate.month;\n}\n"],"names":["_jsx","Logger.warn","_jsxs"],"mappings":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,CACb,wBAAwB,EAAE,EAC1B,eAAe,EAAE,CACb,EAAA,CAAA,EAAA,CACH,EACN;AACJ,EAAE;AAEF,SAAS,UAAU,CAAC,KAA2B,EAAE,KAA2B,EAAA;IAC1E,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC;AAC7F,CAAC;AAED,SAAS,YAAY,CAAC,KAA2B,EAAE,gBAAsC,EAAA;AACvF,IAAA,OAAO,KAAK,CAAC,KAAK,KAAK,gBAAgB,CAAC,KAAK,CAAC;AAChD;;;;"}
@@ -16,7 +16,25 @@ import { forwardRef, useImperativeHandle } from 'preact/compat';
16
16
  import { u as useTestId } from './useTestId-f24ac480.js';
17
17
  import { H as HiddenAccessible } from './HiddenAccessible-61197e7c.js';
18
18
  import { L as LiveRegion } from './LiveRegion-cebac18d.js';
19
+ import './UNSAFE_Text/themes/TextStyles.css.js';
19
20
  import { a as NavigationListContext, B as BaseNavigationListItem } from './NavigationListLinkItem-e28fd846.js';
21
+ import './Flex-03129963.js';
22
+ import './logger-c92f309c.js';
23
+ import './BadgeStyles.styles.css';
24
+ import './UNSAFE_Badge/themes/redwood/BadgeThemeBaseTheme.styles.css';
25
+ import './UNSAFE_Badge/themes/redwood/BadgeVariants.css.js';
26
+ import 'preact';
27
+ import './LayerHost-7931b424.js';
28
+ import './TooltipContentStyles.styles.css';
29
+ import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.styles.css';
30
+ import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css.js';
31
+ import './tooltipUtils-af0abd38.js';
32
+ import './IconStyle.styles.css';
33
+ import './UNSAFE_NavigationList/themes/NavigationListItemStyles.css.js';
34
+ import './UNSAFE_NavigationList/themes/redwood/NavigationListItemBaseTheme.styles.css';
35
+ import './UNSAFE_NavigationList/themes/redwood/NavigationListItemVariants.css.js';
36
+ import './BaseButton-41068c85.js';
37
+ import './ButtonLabelLayout-1631c997.js';
20
38
 
21
39
  const ITEM_SELECTOR = '[role="tab"]';
22
40
  const REMOVE_ICON_SELECTOR = '[data-oj-navigationlist-item-remove-icon]';
@@ -288,4 +306,4 @@ function NavigationListItem({ itemKey, label, badge, metadata, severity, icon })
288
306
  }
289
307
 
290
308
  export { NavigationList as N, NavigationListItem as a };
291
- //# sourceMappingURL=NavigationListItem-dbd29973.js.map
309
+ //# sourceMappingURL=NavigationListItem-340ab770.js.map