@oracle/oraclejet-preact 20.0.0 → 20.0.1

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 (653) 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/{CollapsibleNavigationList-f0072c90.js → CollapsibleNavigationList-fdeccbfb.js} +2 -2
  10. package/amd/{CollapsibleNavigationList-f0072c90.js.map → CollapsibleNavigationList-fdeccbfb.js.map} +1 -1
  11. package/amd/ColorPicker-e3167e4c.js +2 -0
  12. package/amd/{ColorPicker-141fa49d.js.map → ColorPicker-e3167e4c.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/{FlatTreeView-9ecf2be6.js → FlatTreeView-15edd439.js} +2 -2
  16. package/amd/{FlatTreeView-9ecf2be6.js.map → FlatTreeView-15edd439.js.map} +1 -1
  17. package/amd/{InputColor-58e3fce3.js → InputColor-51d7e40c.js} +2 -2
  18. package/amd/{InputColor-58e3fce3.js.map → InputColor-51d7e40c.js.map} +1 -1
  19. package/amd/{InputDatePicker-48633486.js → InputDatePicker-030e345a.js} +2 -2
  20. package/amd/{InputDatePicker-48633486.js.map → InputDatePicker-030e345a.js.map} +1 -1
  21. package/amd/ListView-02a92d18.js +2 -0
  22. package/amd/{ListView-2678b2af.js.map → ListView-02a92d18.js.map} +1 -1
  23. package/amd/{MonthView-ea883c49.js → MonthView-96fafba4.js} +2 -2
  24. package/amd/{MonthView-ea883c49.js.map → MonthView-96fafba4.js.map} +1 -1
  25. package/amd/{OverflowTabBar-b142f8d4.js → OverflowTabBar-5ff68da7.js} +2 -2
  26. package/amd/{OverflowTabBar-b142f8d4.js.map → OverflowTabBar-5ff68da7.js.map} +1 -1
  27. package/amd/{OverflowTabBarItem-49a82149.js → OverflowTabBarItem-926b0c8a.js} +2 -2
  28. package/amd/{OverflowTabBarItem-49a82149.js.map → OverflowTabBarItem-926b0c8a.js.map} +1 -1
  29. package/amd/PRIVATE_BaseCardView.js +1 -1
  30. package/amd/PRIVATE_CollapsibleNavigationList.js +1 -1
  31. package/amd/PRIVATE_MonthView.js +1 -1
  32. package/amd/PRIVATE_MonthYearGridView.js +1 -1
  33. package/amd/PRIVATE_StyledDatePickerButton.js +1 -1
  34. package/amd/PRIVATE_TableList.js +1 -1
  35. package/amd/{RemovableTabBarItem-e1bee7fa.js → RemovableTabBarItem-9ae273fe.js} +2 -2
  36. package/amd/{RemovableTabBarItem-e1bee7fa.js.map → RemovableTabBarItem-9ae273fe.js.map} +1 -1
  37. package/amd/ReorderableTabBar-0c69bfd4.js +2 -0
  38. package/amd/{ReorderableTabBar-46683bcb.js.map → ReorderableTabBar-0c69bfd4.js.map} +1 -1
  39. package/amd/StyledDatePickerButton-bceb62e1.js +2 -0
  40. package/amd/StyledDatePickerButton-bceb62e1.js.map +1 -0
  41. package/amd/StyledDatePickerButtonStyles.styles.css +17 -0
  42. package/amd/TabBar-de723fbc.js +2 -0
  43. package/amd/{TabBar-fcebb560.js.map → TabBar-de723fbc.js.map} +1 -1
  44. package/amd/TabBarItem-a39c5de3.js +2 -0
  45. package/amd/{TabBarItem-224bc6b3.js.map → TabBarItem-a39c5de3.js.map} +1 -1
  46. package/amd/TabBarLinkItem-944b1e8d.js +2 -0
  47. package/amd/{TabBarLinkItem-57587dbd.js.map → TabBarLinkItem-944b1e8d.js.map} +1 -1
  48. package/amd/TabBarMixed-cfd346bf.js +2 -0
  49. package/amd/{TabBarMixed-8cc4b4ed.js.map → TabBarMixed-cfd346bf.js.map} +1 -1
  50. package/amd/TextArea-345f89d4.js +2 -0
  51. package/{es/TextArea-93ce78a7.js.map → amd/TextArea-345f89d4.js.map} +1 -1
  52. package/amd/TextAreaAutosize-01dfd98e.js +2 -0
  53. package/amd/{TextAreaAutosize-3a13ebb2.js.map → TextAreaAutosize-01dfd98e.js.map} +1 -1
  54. package/amd/Theme-redwood/theme.css +211 -211
  55. package/amd/Theme-stable/theme.css +281 -281
  56. package/amd/UNSAFE_CardFlexView.js +1 -1
  57. package/amd/UNSAFE_CardGridView.js +1 -1
  58. package/amd/UNSAFE_ColorPicker.js +1 -1
  59. package/amd/UNSAFE_DatePicker.js +1 -1
  60. package/amd/UNSAFE_FlatTreeView.js +1 -1
  61. package/amd/UNSAFE_InputColor.js +1 -1
  62. package/amd/UNSAFE_InputDatePicker.js +1 -1
  63. package/amd/UNSAFE_ListView.js +1 -1
  64. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  65. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  66. package/amd/UNSAFE_TabBar.js +1 -1
  67. package/amd/UNSAFE_TabBarCommon.js +1 -1
  68. package/amd/UNSAFE_TabBarMixed.js +1 -1
  69. package/amd/UNSAFE_TextArea.js +1 -1
  70. package/amd/UNSAFE_TextAreaAutosize.js +1 -1
  71. package/amd/{YearsGridView-4aa7bc66.js → YearsGridView-561c3074.js} +2 -2
  72. package/amd/{YearsGridView-4aa7bc66.js.map → YearsGridView-561c3074.js.map} +1 -1
  73. package/cjs/CheckboxSet-6865f4fd.js +55 -0
  74. package/cjs/CheckboxSet-6865f4fd.js.map +1 -0
  75. package/cjs/{ColorPalette-9f041744.js → ColorPalette-b14114d8.js} +2 -2
  76. package/cjs/{ColorPalette-9f041744.js.map → ColorPalette-b14114d8.js.map} +1 -1
  77. package/cjs/{ColorPicker-9af6707c.js → ColorPicker-2c99c0fb.js} +2 -2
  78. package/cjs/{ColorPicker-9af6707c.js.map → ColorPicker-2c99c0fb.js.map} +1 -1
  79. package/cjs/{DatePicker-48c602ff.js → DatePicker-b60f8a7e.js} +3 -3
  80. package/cjs/{DatePicker-48c602ff.js.map → DatePicker-b60f8a7e.js.map} +1 -1
  81. package/cjs/{MonthView-59452edc.js → MonthView-a2661a58.js} +2 -2
  82. package/cjs/{MonthView-59452edc.js.map → MonthView-a2661a58.js.map} +1 -1
  83. package/cjs/{NavigationListItem-3b9eb0fb.js → NavigationListItem-cdfd0740.js} +19 -1
  84. package/cjs/{NavigationListItem-3b9eb0fb.js.map → NavigationListItem-cdfd0740.js.map} +1 -1
  85. package/cjs/{OverflowTabBarItem-2c967a89.js → OverflowTabBarItem-4bbd5830.js} +7 -4
  86. package/cjs/OverflowTabBarItem-4bbd5830.js.map +1 -0
  87. package/cjs/PRIVATE_MonthView.js +2 -3
  88. package/cjs/PRIVATE_MonthView.js.map +1 -1
  89. package/cjs/PRIVATE_MonthYearGridView.js +2 -3
  90. package/cjs/PRIVATE_MonthYearGridView.js.map +1 -1
  91. package/cjs/PRIVATE_StyledDatePickerButton.js +1 -2
  92. package/cjs/PRIVATE_StyledDatePickerButton.js.map +1 -1
  93. package/cjs/SegmentStyles.styles.css +12 -9
  94. package/cjs/SegmentStyles.styles2.css +9 -12
  95. package/cjs/{StyledDatePickerButton-cf4e4dc0.js → StyledDatePickerButton-becd2a7d.js} +2 -8
  96. package/cjs/StyledDatePickerButton-becd2a7d.js.map +1 -0
  97. package/cjs/StyledDatePickerButtonStyles.styles.css +17 -0
  98. package/cjs/{TabBarLinkItem-42785eb3.js → TabBarLinkItem-891a5f10.js} +2 -2
  99. package/cjs/{TabBarLinkItem-42785eb3.js.map → TabBarLinkItem-891a5f10.js.map} +1 -1
  100. package/cjs/Theme-redwood/theme.css +129 -129
  101. package/cjs/Theme-stable/theme.css +161 -161
  102. package/cjs/UNSAFE_CheckboxItem.js +117 -56
  103. package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
  104. package/cjs/UNSAFE_CheckboxSet.js +21 -50
  105. package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
  106. package/cjs/UNSAFE_ColorPalette.js +80 -80
  107. package/cjs/UNSAFE_ColorPicker.js +76 -76
  108. package/cjs/UNSAFE_DatePicker.js +4 -4
  109. package/cjs/UNSAFE_InputColor.js +12 -12
  110. package/cjs/UNSAFE_InputDatePicker.js +96 -96
  111. package/cjs/UNSAFE_NavigationList.js +12 -12
  112. package/cjs/UNSAFE_OverflowTabBar.js +3 -3
  113. package/cjs/UNSAFE_RichCheckboxSet.js +46 -42
  114. package/cjs/UNSAFE_RichCheckboxSet.js.map +1 -1
  115. package/cjs/UNSAFE_RichSelectionItem.js +154 -91
  116. package/cjs/UNSAFE_RichSelectionItem.js.map +1 -1
  117. package/cjs/UNSAFE_TabBar.js +3 -3
  118. package/cjs/UNSAFE_TabBarCommon.js +5 -5
  119. package/cjs/UNSAFE_TabBarMixed.js +4 -4
  120. package/cjs/{YearsGridView-b56f7f42.js → YearsGridView-d0d4e8e1.js} +2 -2
  121. package/cjs/{YearsGridView-b56f7f42.js.map → YearsGridView-d0d4e8e1.js.map} +1 -1
  122. package/es/{BaseButton-41068c85.js → BaseButton-243d200f.js} +2 -2
  123. package/es/{BaseButton-41068c85.js.map → BaseButton-243d200f.js.map} +1 -1
  124. package/es/{BaseCardView-85b9a71e.js → BaseCardView-b3d8bae0.js} +10 -7
  125. package/es/{BaseCardView-85b9a71e.js.map → BaseCardView-b3d8bae0.js.map} +1 -1
  126. package/es/BaseDiagram-b5b22e53.js +7 -7
  127. package/es/BaseRichSelection-223d9830.js +9 -9
  128. package/es/BaseSelector-7cbc48bc.js +1 -1
  129. package/es/BaseSwatchView-2e1e6bd2.js +2 -2
  130. package/es/{Button-956f51c7.js → Button-a76ecfa8.js} +2 -2
  131. package/es/{Button-956f51c7.js.map → Button-a76ecfa8.js.map} +1 -1
  132. package/es/ButtonSet-b7464e9a.js +2 -2
  133. package/es/ButtonSetButton-8685c752.js +1 -1
  134. package/es/ButtonSetIconButton-c8ed85f9.js +4 -4
  135. package/es/{Center-71a03e65.js → Center-3860fe60.js} +2 -2
  136. package/es/{Center-71a03e65.js.map → Center-3860fe60.js.map} +1 -1
  137. package/es/Chart-b866a74c.js +10 -10
  138. package/es/CheckboxControl-c008372a.js +6 -6
  139. package/es/CheckboxRadioField-a387b3cb.js +6 -6
  140. package/es/CheckboxRadioLabelValueLayout-e3845f16.js +1 -1
  141. package/es/CheckboxSet-3aab5935.js +1 -1
  142. package/es/Chip-4efea02e.js +1 -1
  143. package/es/ClearIcon-f85ea340.js +1 -1
  144. package/es/CollapseIcon-84f6ba8e.js +1 -1
  145. package/es/Collapsible-2608ce3b.js +2 -2
  146. package/es/ColorPalette-950c6fc6.js +2 -2
  147. package/es/{ColorPicker-ae648c4c.js → ColorPicker-8c297849.js} +3 -3
  148. package/es/{ColorPicker-ae648c4c.js.map → ColorPicker-8c297849.js.map} +1 -1
  149. package/es/ColorSwatch-8339ee2f.js +4 -4
  150. package/es/{CompactLabelAssistance-e2fcfcab.js → CompactLabelAssistance-50ff3f7e.js} +6 -6
  151. package/es/{CompactLabelAssistance-e2fcfcab.js.map → CompactLabelAssistance-50ff3f7e.js.map} +1 -1
  152. package/es/CompactUserAssistance-6aa8894b.js +5 -5
  153. package/es/ComponentMessageContainer-d16c8b1f.js +4 -4
  154. package/es/{DatePicker-2ab05fbe.js → DatePicker-fa7d39a7.js} +8 -8
  155. package/es/{DatePicker-2ab05fbe.js.map → DatePicker-fa7d39a7.js.map} +1 -1
  156. package/es/DatePickerHeader-f8cf86bb.js +3 -3
  157. package/es/DiagramStyles.styles2.css +10 -16
  158. package/es/DiagramStyles.styles3.css +16 -10
  159. package/es/{Dialog-83368f52.js → Dialog-d1de5b06.js} +7 -7
  160. package/es/{Dialog-83368f52.js.map → Dialog-d1de5b06.js.map} +1 -1
  161. package/es/DirectionalCollapseArrowIcon-132761da.js +1 -1
  162. package/es/DirectionalExpandArrowIcon-5bc45cad.js +1 -1
  163. package/es/{Dropdown-019aba37.js → Dropdown-9d9813a9.js} +6 -6
  164. package/es/{Dropdown-019aba37.js.map → Dropdown-9d9813a9.js.map} +1 -1
  165. package/es/{EmbeddedIconButton-46434710.js → EmbeddedIconButton-9f0e56b7.js} +2 -2
  166. package/es/{EmbeddedIconButton-46434710.js.map → EmbeddedIconButton-9f0e56b7.js.map} +1 -1
  167. package/es/{EnvironmentProvider-6a0a8212.js → EnvironmentProvider-6cf8ed37.js} +3 -3
  168. package/es/{EnvironmentProvider-6a0a8212.js.map → EnvironmentProvider-6cf8ed37.js.map} +1 -1
  169. package/es/Expander-1347e769.js +1 -1
  170. package/es/{Flex-03129963.js → Flex-fc483125.js} +2 -2
  171. package/es/{Flex-03129963.js.map → Flex-fc483125.js.map} +1 -1
  172. package/es/{Floating-4a82db94.js → Floating-be4c0cb6.js} +4 -4
  173. package/es/{Floating-4a82db94.js.map → Floating-be4c0cb6.js.map} +1 -1
  174. package/es/{Grid-9e4b4f19.js → Grid-6f92d323.js} +2 -2
  175. package/es/{Grid-9e4b4f19.js.map → Grid-6f92d323.js.map} +1 -1
  176. package/es/GroupLoadingIndicator-19c6545a.js +1 -1
  177. package/es/{HighlightText-0205faef.js → HighlightText-dd484ffd.js} +2 -2
  178. package/es/{HighlightText-0205faef.js.map → HighlightText-dd484ffd.js.map} +1 -1
  179. package/es/Icon-4983d06e.js +3 -3
  180. package/es/IconButton-7f91481c.js +4 -4
  181. package/es/IconSwitchButton-05f1f602.js +4 -4
  182. package/es/IconToggleButton-808818f5.js +4 -4
  183. package/es/{IconUserAssistance-61978211.js → IconUserAssistance-6abc7837.js} +3 -3
  184. package/es/{IconUserAssistance-61978211.js.map → IconUserAssistance-6abc7837.js.map} +1 -1
  185. package/es/InlineHelp-9eaac91c.js +1 -1
  186. package/es/InlineUserAssistance-890293dd.js +5 -5
  187. package/es/InputDateMask-ec27aee7.js +7 -7
  188. package/es/Label-5d1ae8d7.js +8 -8
  189. package/es/LabelValueLayout-c6b9945a.js +1 -1
  190. package/es/{Layer-535577b5.js → Layer-6c27170e.js} +3 -3
  191. package/es/{Layer-535577b5.js.map → Layer-6c27170e.js.map} +1 -1
  192. package/es/{LayerHost-7931b424.js → LayerHost-3cf255a6.js} +2 -2
  193. package/es/{LayerHost-7931b424.js.map → LayerHost-3cf255a6.js.map} +1 -1
  194. package/es/{LayerManager-52a26c55.js → LayerManager-e30fbfd6.js} +2 -2
  195. package/es/{LayerManager-52a26c55.js.map → LayerManager-e30fbfd6.js.map} +1 -1
  196. package/es/Link-8503aab2.js +1 -1
  197. package/es/List-4636ba9b.js +5 -5
  198. package/es/{LiveRegion-cebac18d.js → LiveRegion-2e8830ae.js} +2 -2
  199. package/es/{LiveRegion-cebac18d.js.map → LiveRegion-2e8830ae.js.map} +1 -1
  200. package/es/{MaxLengthLiveRegion-8099fde5.js → MaxLengthLiveRegion-8f552ae2.js} +3 -3
  201. package/es/{MaxLengthLiveRegion-8099fde5.js.map → MaxLengthLiveRegion-8f552ae2.js.map} +1 -1
  202. package/es/Message-510c2db8.js +2 -2
  203. package/es/{MessageLayer-2a7fdec7.js → MessageLayer-1dbdc0b6.js} +6 -6
  204. package/es/{MessageLayer-2a7fdec7.js.map → MessageLayer-1dbdc0b6.js.map} +1 -1
  205. package/es/MessagesManager-47000438.js +3 -3
  206. package/es/Modal-c0f730b8.js +3 -3
  207. package/es/{MonthView-097171eb.js → MonthView-4e05e712.js} +5 -5
  208. package/es/{MonthView-097171eb.js.map → MonthView-4e05e712.js.map} +1 -1
  209. package/es/{NavigationListItem-dbd29973.js → NavigationListItem-340ab770.js} +23 -5
  210. package/es/{NavigationListItem-dbd29973.js.map → NavigationListItem-340ab770.js.map} +1 -1
  211. package/es/NavigationListLinkItem-e28fd846.js +5 -5
  212. package/es/NumberInputText-60be5757.js +6 -6
  213. package/es/{OverflowTabBarItem-6966fbc7.js → OverflowTabBarItem-aa0ce915.js} +12 -9
  214. package/es/OverflowTabBarItem-aa0ce915.js.map +1 -0
  215. package/es/PRIVATE_BaseCardView.js +23 -23
  216. package/es/PRIVATE_BaseDiagram.js +29 -29
  217. package/es/PRIVATE_BaseSelector.js +17 -17
  218. package/es/PRIVATE_BaseSwatchView.js +18 -18
  219. package/es/PRIVATE_Chart.js +34 -34
  220. package/es/PRIVATE_CheckboxControl.js +25 -25
  221. package/es/PRIVATE_CheckboxRadioField.js +27 -27
  222. package/es/PRIVATE_ClearIcon.js +18 -18
  223. package/es/PRIVATE_CollapsibleNavigationList.js +43 -43
  224. package/es/PRIVATE_DatePickerHeader.js +20 -20
  225. package/es/PRIVATE_DatePickerLayout.js +4 -4
  226. package/es/PRIVATE_EmbeddedIconButton.js +6 -6
  227. package/es/PRIVATE_Expander.js +19 -19
  228. package/es/PRIVATE_FormControls.js +21 -21
  229. package/es/PRIVATE_IconSwitchButton.js +17 -17
  230. package/es/PRIVATE_Icons/CheckboxCrossed.js +16 -16
  231. package/es/PRIVATE_Icons/CheckboxMixed.js +16 -16
  232. package/es/PRIVATE_Icons/CheckboxOff.js +16 -16
  233. package/es/PRIVATE_Icons/CheckboxOn.js +16 -16
  234. package/es/PRIVATE_Icons/DragV.js +16 -16
  235. package/es/PRIVATE_Icons/None.js +16 -16
  236. package/es/PRIVATE_List.js +21 -21
  237. package/es/PRIVATE_Message.js +20 -20
  238. package/es/PRIVATE_MessageLayer.js +12 -12
  239. package/es/PRIVATE_MonthView.js +8 -9
  240. package/es/PRIVATE_MonthView.js.map +1 -1
  241. package/es/PRIVATE_MonthYearGridView.js +8 -9
  242. package/es/PRIVATE_MonthYearGridView.js.map +1 -1
  243. package/es/PRIVATE_PlotArea.js +5 -5
  244. package/es/PRIVATE_RevealToggleIcon.js +18 -18
  245. package/es/PRIVATE_RichSelectionCommon.js +28 -28
  246. package/es/PRIVATE_SelectCommon.js +31 -31
  247. package/es/PRIVATE_StyledCard.js +3 -3
  248. package/es/PRIVATE_StyledCheckbox.js +16 -16
  249. package/es/PRIVATE_StyledDatePickerButton.js +1 -2
  250. package/es/PRIVATE_StyledDatePickerButton.js.map +1 -1
  251. package/es/PRIVATE_StyledSwitch.js +4 -4
  252. package/es/PRIVATE_SwatchFlexView.js +18 -18
  253. package/es/PRIVATE_Table.js +35 -35
  254. package/es/PRIVATE_TableDisplay.js +19 -19
  255. package/es/PRIVATE_TableList.js +30 -30
  256. package/es/PRIVATE_ThemedIcons/CalendarIcon.js +16 -16
  257. package/es/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +16 -16
  258. package/es/PRIVATE_ThemedIcons/ChartPanIcon.js +16 -16
  259. package/es/PRIVATE_ThemedIcons/ChartZoomIcon.js +16 -16
  260. package/es/PRIVATE_ThemedIcons/CheckIcon.js +16 -16
  261. package/es/PRIVATE_ThemedIcons/CheckboxCrossedIcon.js +16 -16
  262. package/es/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +16 -16
  263. package/es/PRIVATE_ThemedIcons/CheckboxOffIcon.js +16 -16
  264. package/es/PRIVATE_ThemedIcons/CheckboxOnIcon.js +16 -16
  265. package/es/PRIVATE_ThemedIcons/CloseIcon.js +16 -16
  266. package/es/PRIVATE_ThemedIcons/CollapseIcon.js +17 -17
  267. package/es/PRIVATE_ThemedIcons/CollapseUpIcon.js +16 -16
  268. package/es/PRIVATE_ThemedIcons/DecrementIcon.js +16 -16
  269. package/es/PRIVATE_ThemedIcons/DeleteIcon.js +16 -16
  270. package/es/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +17 -17
  271. package/es/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +17 -17
  272. package/es/PRIVATE_ThemedIcons/DragHandleIcon.js +16 -16
  273. package/es/PRIVATE_ThemedIcons/DropdownArrowIcon.js +16 -16
  274. package/es/PRIVATE_ThemedIcons/ExpandIcon.js +16 -16
  275. package/es/PRIVATE_ThemedIcons/HelpIcon.js +16 -16
  276. package/es/PRIVATE_ThemedIcons/IncrementIcon.js +16 -16
  277. package/es/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +16 -16
  278. package/es/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +16 -16
  279. package/es/PRIVATE_ThemedIcons/MessageErrorIcon.js +16 -16
  280. package/es/PRIVATE_ThemedIcons/MessageInfoIcon.js +16 -16
  281. package/es/PRIVATE_ThemedIcons/MessageWarningIcon.js +16 -16
  282. package/es/PRIVATE_ThemedIcons/MinusIcon.js +16 -16
  283. package/es/PRIVATE_ThemedIcons/NavDownIcon.js +16 -16
  284. package/es/PRIVATE_ThemedIcons/None.js +16 -16
  285. package/es/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +16 -16
  286. package/es/PRIVATE_ThemedIcons/PlusIcon.js +16 -16
  287. package/es/PRIVATE_ThemedIcons/RadioOffIcon.js +16 -16
  288. package/es/PRIVATE_ThemedIcons/RadioOnIcon.js +16 -16
  289. package/es/PRIVATE_ThemedIcons/SortAscendingIcon.js +16 -16
  290. package/es/PRIVATE_ThemedIcons/SortDescendingIcon.js +16 -16
  291. package/es/PRIVATE_ThemedIcons/ViewHideIcon.js +16 -16
  292. package/es/PRIVATE_ThemedIcons/ViewIcon.js +16 -16
  293. package/es/PRIVATE_TimeComponent.js +19 -19
  294. package/es/PRIVATE_TruncatingLink.js +16 -16
  295. package/es/PRIVATE_VisOverview.js +16 -16
  296. package/es/PRIVATE_VisStatusMessage.js +5 -5
  297. package/es/PRIVATE_VisTabularDatatip.js +4 -4
  298. package/es/{Popup-992b6c27.js → Popup-22d51095.js} +10 -10
  299. package/es/{Popup-992b6c27.js.map → Popup-22d51095.js.map} +1 -1
  300. package/es/ProgressButtonLabelLayout-69549cf9.js +3 -3
  301. package/es/{ProgressCircle-46084d0b.js → ProgressCircle-bce87dad.js} +2 -2
  302. package/es/{ProgressCircle-46084d0b.js.map → ProgressCircle-bce87dad.js.map} +1 -1
  303. package/es/RadioIconVariants.styles.css +3 -3
  304. package/es/RadioIconVariants.styles2.css +3 -3
  305. package/es/RadioItem-94909632.js +6 -6
  306. package/es/ReadonlyTextFieldInput-106ce959.js +1 -1
  307. package/es/{ReferenceLineArea-53129f72.js → ReferenceLineArea-cc72b070.js} +3 -3
  308. package/es/{ReferenceLineArea-53129f72.js.map → ReferenceLineArea-cc72b070.js.map} +1 -1
  309. package/es/RevealToggleIcon-2d622d8f.js +1 -1
  310. package/es/{SectionedContent-30e5bf98.js → SectionedContent-897e9c4e.js} +5 -5
  311. package/es/{SectionedContent-30e5bf98.js.map → SectionedContent-897e9c4e.js.map} +1 -1
  312. package/es/SegmentStyles.styles.css +9 -12
  313. package/es/SegmentStyles.styles2.css +12 -9
  314. package/es/SelectMenuGroupContext-aa1fe822.js +6 -6
  315. package/es/SelectMobileFieldInput-0a7c968c.js +8 -8
  316. package/es/{SelectorAll-de7ba2e1.js → SelectorAll-3d39196b.js} +5 -5
  317. package/es/{SelectorAll-de7ba2e1.js.map → SelectorAll-3d39196b.js.map} +1 -1
  318. package/es/Sheet-f9f8a4a4.js +2 -2
  319. package/es/SortControl-1044fcd9.js +3 -3
  320. package/es/SplitMenuButtonTheme.styles.css +4 -4
  321. package/es/SplitMenuButtonTheme.styles2.css +4 -4
  322. package/es/StyledCard-77623731.js +1 -1
  323. package/es/{StyledDatePickerButton-f3971567.js → StyledDatePickerButton-78f2f6e8.js} +2 -8
  324. package/es/StyledDatePickerButton-78f2f6e8.js.map +1 -0
  325. package/es/StyledDatePickerButtonStyles.styles.css +17 -0
  326. package/es/{StyledLabelValueLayout-bb05f474.js → StyledLabelValueLayout-bddfb884.js} +2 -2
  327. package/es/{StyledLabelValueLayout-bb05f474.js.map → StyledLabelValueLayout-bddfb884.js.map} +1 -1
  328. package/es/StyledSwitch-dbf29d95.js +2 -2
  329. package/es/StyledTextField-7605d76a.js +5 -5
  330. package/es/Submenu-cbd77756.js +1 -1
  331. package/es/{TabBar-10488830.js → TabBar-67ca442c.js} +9 -7
  332. package/es/{TabBar-10488830.js.map → TabBar-67ca442c.js.map} +1 -1
  333. package/es/TabBarContextMenu-c3326d67.js +2 -2
  334. package/es/TabBarLayout-9b67d1b6.js +1 -1
  335. package/es/{TabBarLinkItem-a9c1072b.js → TabBarLinkItem-e7be54fa.js} +2 -2
  336. package/es/{TabBarLinkItem-a9c1072b.js.map → TabBarLinkItem-e7be54fa.js.map} +1 -1
  337. package/es/Table-2f197c6a.js +11 -11
  338. package/es/TableColGroup-d74bd4f5.js +1 -1
  339. package/es/TextField-7884fcd7.js +3 -3
  340. package/es/Theme-redwood/theme.css +396 -396
  341. package/es/Theme-stable/theme.css +467 -467
  342. package/es/TimeComponentCanvas2D-cfb0066d.js +6 -6
  343. package/es/ToggleButton-bb69cf10.js +1 -1
  344. package/es/TrainVariants.styles.css +6 -6
  345. package/es/TrainVariants.styles2.css +6 -6
  346. package/es/TruncatingLink-298c6343.js +4 -4
  347. package/es/TruncatingText-1bf00351.js +1 -1
  348. package/es/UNSAFE_AccordionItemMultiple.js +18 -18
  349. package/es/UNSAFE_AccordionItemSingle.js +18 -18
  350. package/es/UNSAFE_ActionCard.js +2 -2
  351. package/es/UNSAFE_BarChart.js +35 -35
  352. package/es/UNSAFE_BareButton.js +2 -2
  353. package/es/UNSAFE_BaseButton.js +5 -5
  354. package/es/UNSAFE_Button.js +6 -6
  355. package/es/UNSAFE_ButtonSet.js +4 -4
  356. package/es/UNSAFE_ButtonSetButton.js +5 -5
  357. package/es/UNSAFE_ButtonSetIconButton.js +17 -17
  358. package/es/UNSAFE_ButtonSetItem.js +18 -18
  359. package/es/UNSAFE_ButtonSetMultiple.js +4 -4
  360. package/es/UNSAFE_ButtonSetSingle.js +4 -4
  361. package/es/UNSAFE_Card.js +3 -3
  362. package/es/UNSAFE_CardFlexView.js +23 -23
  363. package/es/UNSAFE_CardGridView.js +23 -23
  364. package/es/UNSAFE_Center.js +5 -5
  365. package/es/UNSAFE_Checkbox.js +25 -25
  366. package/es/UNSAFE_CheckboxItem.js +27 -27
  367. package/es/UNSAFE_CheckboxRadioField.js +4 -4
  368. package/es/UNSAFE_CheckboxSet.js +26 -26
  369. package/es/UNSAFE_Chip.js +2 -2
  370. package/es/UNSAFE_Collapsible.js +18 -18
  371. package/es/UNSAFE_ColorPalette.js +19 -19
  372. package/es/UNSAFE_ColorPicker.js +21 -21
  373. package/es/UNSAFE_ColorSwatch.js +17 -17
  374. package/es/UNSAFE_ComboChart.js +35 -35
  375. package/es/UNSAFE_ComponentMessage.js +20 -20
  376. package/es/UNSAFE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
  377. package/es/UNSAFE_ContainerDiagram.js +29 -29
  378. package/es/UNSAFE_ConveyorBelt.js +18 -18
  379. package/es/UNSAFE_DatePicker.js +28 -28
  380. package/es/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
  381. package/es/UNSAFE_Diagram.js +29 -29
  382. package/es/UNSAFE_Dialog.js +22 -22
  383. package/es/UNSAFE_DragHandle.js +17 -17
  384. package/es/UNSAFE_DrawerLayout.js +12 -12
  385. package/es/UNSAFE_DrawerPopup.js +11 -11
  386. package/es/UNSAFE_Dropdown.js +15 -15
  387. package/es/UNSAFE_Environment.js +4 -4
  388. package/es/UNSAFE_ExpandableList.js +25 -25
  389. package/es/UNSAFE_FilePicker.js +4 -4
  390. package/es/UNSAFE_FlatTreeView.js +39 -39
  391. package/es/UNSAFE_Flex.js +4 -4
  392. package/es/UNSAFE_Floating.js +11 -11
  393. package/es/UNSAFE_FormLayout.js +2 -2
  394. package/es/UNSAFE_Gantt.js +23 -23
  395. package/es/UNSAFE_Grid.js +4 -4
  396. package/es/UNSAFE_HighlightText.js +4 -4
  397. package/es/UNSAFE_Icon.js +16 -16
  398. package/es/UNSAFE_IconButton.js +17 -17
  399. package/es/UNSAFE_IconMenuButton.js +25 -25
  400. package/es/UNSAFE_IconProgressButton.js +21 -21
  401. package/es/UNSAFE_IconToggleButton.js +17 -17
  402. package/es/UNSAFE_Indexer.js +19 -19
  403. package/es/UNSAFE_InlineSelectSingle.js +32 -32
  404. package/es/UNSAFE_InputColor.js +32 -32
  405. package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
  406. package/es/UNSAFE_InputDateMask.js +27 -27
  407. package/es/UNSAFE_InputDatePicker.js +38 -38
  408. package/es/UNSAFE_InputPassword.js +26 -26
  409. package/es/UNSAFE_InputSensitiveText.js +27 -27
  410. package/es/UNSAFE_InputText.js +28 -28
  411. package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
  412. package/es/UNSAFE_InputTimeMask.js +27 -27
  413. package/es/UNSAFE_Label.js +25 -25
  414. package/es/UNSAFE_LabelValueLayout.js +4 -4
  415. package/es/UNSAFE_LabelledLink.js +27 -27
  416. package/es/UNSAFE_Layer.js +8 -8
  417. package/es/UNSAFE_Legend.js +27 -27
  418. package/es/UNSAFE_LineAreaChart.js +35 -35
  419. package/es/UNSAFE_Link.js +2 -2
  420. package/es/UNSAFE_ListItemLayout.js +4 -4
  421. package/es/UNSAFE_ListView.js +74 -74
  422. package/es/UNSAFE_LiveRegion.js +4 -4
  423. package/es/UNSAFE_Menu.js +26 -26
  424. package/es/UNSAFE_MenuButton.js +25 -25
  425. package/es/UNSAFE_MessageBanner.js +20 -20
  426. package/es/UNSAFE_MessageToast.js +22 -22
  427. package/es/UNSAFE_MeterBar.js +16 -16
  428. package/es/UNSAFE_MeterCircle.js +17 -17
  429. package/es/UNSAFE_Modal.js +8 -8
  430. package/es/UNSAFE_NavigationList.js +40 -40
  431. package/es/UNSAFE_NavigationListCommon.js +20 -20
  432. package/es/UNSAFE_NumberInputText.js +28 -28
  433. package/es/UNSAFE_OverflowTabBar.js +40 -40
  434. package/es/UNSAFE_PictoChart.js +25 -25
  435. package/es/UNSAFE_PieChart.js +26 -26
  436. package/es/UNSAFE_Popup.js +18 -18
  437. package/es/UNSAFE_ProgressBar.js +4 -4
  438. package/es/UNSAFE_ProgressButton.js +21 -21
  439. package/es/UNSAFE_ProgressButtonLabelLayout.js +10 -10
  440. package/es/UNSAFE_ProgressCircle.js +4 -4
  441. package/es/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js +1 -1
  442. package/es/UNSAFE_RadioItem/themes/redwood/RadioIconVariants.css.js +1 -1
  443. package/es/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js +1 -1
  444. package/es/UNSAFE_RadioItem/themes/stable/RadioIconVariants.css.js +1 -1
  445. package/es/UNSAFE_RadioItem.js +26 -26
  446. package/es/UNSAFE_RadioSet.js +27 -27
  447. package/es/UNSAFE_RatingGauge.js +18 -18
  448. package/es/UNSAFE_ReorderableTabBar.js +39 -39
  449. package/es/UNSAFE_RichCheckboxSet.js +28 -28
  450. package/es/UNSAFE_RichRadioSet.js +29 -29
  451. package/es/UNSAFE_RichSelectionItem.js +31 -31
  452. package/es/UNSAFE_ScatterChart.js +35 -35
  453. package/es/UNSAFE_SectionalLegend.js +27 -27
  454. package/es/UNSAFE_SelectMultiple.js +35 -35
  455. package/es/UNSAFE_SelectSingle.js +34 -34
  456. package/es/UNSAFE_SelectionCard.js +3 -3
  457. package/es/UNSAFE_Selector.js +17 -17
  458. package/es/UNSAFE_SelectorAll.js +19 -19
  459. package/es/UNSAFE_Sheet.js +11 -11
  460. package/es/UNSAFE_SortControl.js +20 -20
  461. package/es/UNSAFE_SplitMenuButton/themes/redwood/SplitMenuButtonTheme.css.js +1 -1
  462. package/es/UNSAFE_SplitMenuButton/themes/stable/SplitMenuButtonTheme.css.js +1 -1
  463. package/es/UNSAFE_SplitMenuButton.js +26 -26
  464. package/es/UNSAFE_Switch.js +26 -26
  465. package/es/UNSAFE_TabBar.js +41 -41
  466. package/es/UNSAFE_TabBarCommon.js +33 -33
  467. package/es/UNSAFE_TabBarMixed.js +40 -40
  468. package/es/UNSAFE_TableView.js +35 -35
  469. package/es/UNSAFE_TagCloud.js +26 -26
  470. package/es/UNSAFE_TextArea.js +237 -117
  471. package/es/UNSAFE_TextArea.js.map +1 -1
  472. package/es/UNSAFE_TextAreaAutosize.js +28 -28
  473. package/es/UNSAFE_TextField.js +20 -20
  474. package/es/UNSAFE_ToggleButton.js +5 -5
  475. package/es/UNSAFE_Toolbar.js +4 -4
  476. package/es/UNSAFE_Train/themes/redwood/TrainTheme.js +1 -1
  477. package/es/UNSAFE_Train/themes/redwood/TrainVariants.css.js +1 -1
  478. package/es/UNSAFE_Train/themes/stable/TrainTheme.js +1 -1
  479. package/es/UNSAFE_Train/themes/stable/TrainVariants.css.js +1 -1
  480. package/es/UNSAFE_Train.js +18 -18
  481. package/es/UNSAFE_TruncatingBadge.js +17 -17
  482. package/es/UNSAFE_TruncatingText.js +17 -17
  483. package/es/UNSAFE_UserAssistance.js +26 -26
  484. package/es/UNSAFE_View.js +7 -7
  485. package/es/UNSAFE_VirtualizedListView.js +21 -21
  486. package/es/UNSAFE_VisInvalidDataMessage.js +6 -6
  487. package/es/UNSAFE_VisNoDataMessage.js +6 -6
  488. package/es/UNSAFE_VisProgressiveLoader.js +5 -5
  489. package/es/UNSAFE_WindowOverlay.js +4 -4
  490. package/es/{View-5bdd9b3c.js → View-818f2f31.js} +5 -5
  491. package/es/{View-5bdd9b3c.js.map → View-818f2f31.js.map} +1 -1
  492. package/es/{VisStatusMessage-e2d629bb.js → VisStatusMessage-09c532e3.js} +2 -2
  493. package/es/{VisStatusMessage-e2d629bb.js.map → VisStatusMessage-09c532e3.js.map} +1 -1
  494. package/es/{VisTabularDatatip-85b00c1b.js → VisTabularDatatip-f45069f1.js} +2 -2
  495. package/es/{VisTabularDatatip-85b00c1b.js.map → VisTabularDatatip-f45069f1.js.map} +1 -1
  496. package/es/{WindowOverlay-7264c44a.js → WindowOverlay-467c2d12.js} +2 -2
  497. package/es/{WindowOverlay-7264c44a.js.map → WindowOverlay-467c2d12.js.map} +1 -1
  498. package/es/{YearsGridView-cac4710a.js → YearsGridView-5286a756.js} +5 -5
  499. package/es/{YearsGridView-cac4710a.js.map → YearsGridView-5286a756.js.map} +1 -1
  500. package/es/hoc/PRIVATE_withDirectionIcon.js +4 -4
  501. package/es/hoc/PRIVATE_withThemeIcon.js +3 -3
  502. package/es/hoc/UNSAFE_withThemeProps.js +3 -3
  503. package/es/hooks/PRIVATE_useChartContextMenu.js +23 -23
  504. package/es/hooks/PRIVATE_useChartDatatip.js +14 -14
  505. package/es/hooks/PRIVATE_useChartEvents.js +19 -19
  506. package/es/hooks/PRIVATE_useChartMarquee.js +19 -19
  507. package/es/hooks/PRIVATE_useCollectionFocusRing.js +17 -17
  508. package/es/hooks/PRIVATE_useCssVars.js +7 -7
  509. package/es/hooks/PRIVATE_useCurrentKey.js +4 -4
  510. package/es/hooks/PRIVATE_useDatatip.js +12 -12
  511. package/es/hooks/PRIVATE_useDetectHorizontalOverflow.js +16 -16
  512. package/es/hooks/PRIVATE_useFloating.js +4 -4
  513. package/es/hooks/PRIVATE_useItemAction.js +17 -17
  514. package/es/hooks/PRIVATE_useListCommon.js +19 -19
  515. package/es/hooks/PRIVATE_useOutsideMousedown.js +9 -9
  516. package/es/hooks/PRIVATE_useRadioFocusManager.js +4 -4
  517. package/es/hooks/PRIVATE_useReorderable.js +19 -19
  518. package/es/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
  519. package/es/hooks/PRIVATE_useSelection.js +4 -4
  520. package/es/hooks/PRIVATE_useTabBar.js +26 -26
  521. package/es/hooks/PRIVATE_useTabbableModeSet.js +17 -17
  522. package/es/hooks/PRIVATE_useTooltipOnTruncation.js +17 -17
  523. package/es/hooks/PRIVATE_useVisContextMenu.js +23 -23
  524. package/es/hooks/PRIVATE_useVisDragModeControls.js +19 -19
  525. package/es/hooks/PRIVATE_useVisEvents.js +4 -4
  526. package/es/hooks/PRIVATE_useVisMeterEvents.js +14 -14
  527. package/es/hooks/PRIVATE_useVisSelection.js +15 -15
  528. package/es/hooks/UNSAFE_useBareButton.js +2 -2
  529. package/es/hooks/UNSAFE_useColorScheme.js +3 -3
  530. package/es/hooks/UNSAFE_useCurrentBgColor.js +2 -2
  531. package/es/hooks/UNSAFE_useDensity.js +3 -3
  532. package/es/hooks/UNSAFE_useHiddenTestMethod.js +3 -3
  533. package/es/hooks/UNSAFE_useOutsideClick.js +8 -8
  534. package/es/hooks/UNSAFE_usePrefixSuffix.js +4 -4
  535. package/es/hooks/UNSAFE_useScale.js +3 -3
  536. package/es/hooks/UNSAFE_useTestId.js +3 -3
  537. package/es/hooks/UNSAFE_useTheme.js +3 -3
  538. package/es/hooks/UNSAFE_useThemeInterpolations.js +6 -6
  539. package/es/hooks/UNSAFE_useTooltip.js +17 -17
  540. package/es/hooks/UNSAFE_useTranslationBundle.js +3 -3
  541. package/es/hooks/UNSAFE_useUser.js +3 -3
  542. package/es/{popupUtils-51366a29.js → popupUtils-7774330e.js} +2 -2
  543. package/es/{popupUtils-51366a29.js.map → popupUtils-7774330e.js.map} +1 -1
  544. package/es/{tooltipUtils-af0abd38.js → tooltipUtils-90fb656f.js} +5 -5
  545. package/es/{tooltipUtils-af0abd38.js.map → tooltipUtils-90fb656f.js.map} +1 -1
  546. package/es/useBareButton-ff4bd21e.js +1 -1
  547. package/es/useCellNavigation-0565b6dd.js +1 -1
  548. package/es/useChartContextMenu-5de82cd7.js +2 -2
  549. package/es/{useChartDatatip-8dd22b71.js → useChartDatatip-cba78e0f.js} +4 -4
  550. package/es/{useChartDatatip-8dd22b71.js.map → useChartDatatip-cba78e0f.js.map} +1 -1
  551. package/es/{useColorScheme-c4f6caab.js → useColorScheme-67245285.js} +2 -2
  552. package/es/{useColorScheme-c4f6caab.js.map → useColorScheme-67245285.js.map} +1 -1
  553. package/es/useContextMenu-730d6c12.js +2 -2
  554. package/es/{useCssVars-bc2527ac.js → useCssVars-048a52d8.js} +5 -5
  555. package/es/{useCssVars-bc2527ac.js.map → useCssVars-048a52d8.js.map} +1 -1
  556. package/es/{useCurrentKey-5f865bbd.js → useCurrentKey-38e5f097.js} +2 -2
  557. package/es/{useCurrentKey-5f865bbd.js.map → useCurrentKey-38e5f097.js.map} +1 -1
  558. package/es/{useDatatip-4895a07a.js → useDatatip-ef5c47a7.js} +4 -4
  559. package/es/{useDatatip-4895a07a.js.map → useDatatip-ef5c47a7.js.map} +1 -1
  560. package/es/{useDensity-1acb0153.js → useDensity-969273f3.js} +2 -2
  561. package/es/{useDensity-1acb0153.js.map → useDensity-969273f3.js.map} +1 -1
  562. package/es/useDisplayValue-5bbf2830.js +5 -5
  563. package/es/{useExpandCollapse-5739cfd2.js → useExpandCollapse-51f9bb4b.js} +2 -2
  564. package/es/{useExpandCollapse-5739cfd2.js.map → useExpandCollapse-51f9bb4b.js.map} +1 -1
  565. package/es/{useFloating-b9d680f7.js → useFloating-c74a7f54.js} +2 -2
  566. package/es/{useFloating-b9d680f7.js.map → useFloating-c74a7f54.js.map} +1 -1
  567. package/es/{useHiddenTestMethod-f3f25093.js → useHiddenTestMethod-ec7b3989.js} +2 -2
  568. package/es/{useHiddenTestMethod-f3f25093.js.map → useHiddenTestMethod-ec7b3989.js.map} +1 -1
  569. package/es/{useKeyboardEvents-9aae7ea3.js → useKeyboardEvents-a1495728.js} +2 -2
  570. package/es/{useKeyboardEvents-9aae7ea3.js.map → useKeyboardEvents-a1495728.js.map} +1 -1
  571. package/es/useLegendContextMenu-a678b26f.js +4 -4
  572. package/es/{useMeterDatatip-538a4d53.js → useMeterDatatip-f61ca3e0.js} +3 -3
  573. package/es/{useMeterDatatip-538a4d53.js.map → useMeterDatatip-f61ca3e0.js.map} +1 -1
  574. package/es/useNavigation-b257c33a.js +1 -1
  575. package/es/{useOutsideClick-b777a43e.js → useOutsideClick-01f3d3e1.js} +2 -2
  576. package/es/{useOutsideClick-b777a43e.js.map → useOutsideClick-01f3d3e1.js.map} +1 -1
  577. package/es/{useOutsideMousedown-c45c22c0.js → useOutsideMousedown-e0866d58.js} +2 -2
  578. package/es/{useOutsideMousedown-c45c22c0.js.map → useOutsideMousedown-e0866d58.js.map} +1 -1
  579. package/es/{usePopupAnimation-96d2bc83.js → usePopupAnimation-7c5db425.js} +2 -2
  580. package/es/{usePopupAnimation-96d2bc83.js.map → usePopupAnimation-7c5db425.js.map} +1 -1
  581. package/es/{usePrefixSuffix-f981b65f.js → usePrefixSuffix-95fc00fd.js} +2 -2
  582. package/es/{usePrefixSuffix-f981b65f.js.map → usePrefixSuffix-95fc00fd.js.map} +1 -1
  583. package/es/{useRadioFocusManager-36eb283e.js → useRadioFocusManager-d9eecfb4.js} +2 -2
  584. package/es/{useRadioFocusManager-36eb283e.js.map → useRadioFocusManager-d9eecfb4.js.map} +1 -1
  585. package/es/{useReorderableItem-857636b7.js → useReorderableItem-06bd7a7b.js} +3 -3
  586. package/es/{useReorderableItem-857636b7.js.map → useReorderableItem-06bd7a7b.js.map} +1 -1
  587. package/es/{useRovingTabIndexContainer-5992e107.js → useRovingTabIndexContainer-c0356f5d.js} +2 -2
  588. package/es/{useRovingTabIndexContainer-5992e107.js.map → useRovingTabIndexContainer-c0356f5d.js.map} +1 -1
  589. package/es/{useScale-434ad939.js → useScale-93490e54.js} +2 -2
  590. package/es/{useScale-434ad939.js.map → useScale-93490e54.js.map} +1 -1
  591. package/es/useSelectCommon-309d0f07.js +5 -5
  592. package/es/{useSelectDrill-f669e729.js → useSelectDrill-2f855daa.js} +3 -3
  593. package/es/{useSelectDrill-f669e729.js.map → useSelectDrill-2f855daa.js.map} +1 -1
  594. package/es/{useSelection-82bec039.js → useSelection-10ed8060.js} +6 -6
  595. package/es/{useSelection-82bec039.js.map → useSelection-10ed8060.js.map} +1 -1
  596. package/es/{useSelection-65134722.js → useSelection-d6fefa3d.js} +2 -2
  597. package/es/{useSelection-65134722.js.map → useSelection-d6fefa3d.js.map} +1 -1
  598. package/es/useTabBar-c5558e77.js +3 -3
  599. package/es/{useTestId-f24ac480.js → useTestId-ab1bede6.js} +2 -2
  600. package/es/{useTestId-f24ac480.js.map → useTestId-ab1bede6.js.map} +1 -1
  601. package/es/useTextAreaAltEnter-ac460f4c.js +61 -0
  602. package/{amd/useTextAreaAltEnter-32272da6.js.map → es/useTextAreaAltEnter-ac460f4c.js.map} +1 -1
  603. package/es/{useTheme-0e7497db.js → useTheme-c2cfbc29.js} +2 -2
  604. package/es/{useTheme-0e7497db.js.map → useTheme-c2cfbc29.js.map} +1 -1
  605. package/es/{useThemeInterpolations-e144e8ec.js → useThemeInterpolations-5f358139.js} +5 -5
  606. package/es/{useThemeInterpolations-e144e8ec.js.map → useThemeInterpolations-5f358139.js.map} +1 -1
  607. package/es/{useTooltip-94af94d4.js → useTooltip-ab739df0.js} +2 -2
  608. package/es/{useTooltip-94af94d4.js.map → useTooltip-ab739df0.js.map} +1 -1
  609. package/es/{useTooltipControlled-f2cfa454.js → useTooltipControlled-b7f30aee.js} +5 -5
  610. package/es/{useTooltipControlled-f2cfa454.js.map → useTooltipControlled-b7f30aee.js.map} +1 -1
  611. package/es/{useTooltipOnTruncation-94282e75.js → useTooltipOnTruncation-31afc3f2.js} +4 -4
  612. package/es/{useTooltipOnTruncation-94282e75.js.map → useTooltipOnTruncation-31afc3f2.js.map} +1 -1
  613. package/es/{useTranslationBundle-4822502f.js → useTranslationBundle-bc6e0896.js} +2 -2
  614. package/es/{useTranslationBundle-4822502f.js.map → useTranslationBundle-bc6e0896.js.map} +1 -1
  615. package/es/{useUser-06d34d19.js → useUser-e543b73c.js} +2 -2
  616. package/es/{useUser-06d34d19.js.map → useUser-e543b73c.js.map} +1 -1
  617. package/es/useVisDragModeControls-af64848c.js +1 -1
  618. package/es/{useVisEvents-256dee29.js → useVisEvents-0edc925f.js} +2 -2
  619. package/es/{useVisEvents-256dee29.js.map → useVisEvents-0edc925f.js.map} +1 -1
  620. package/es/utils/PRIVATE_collectionUtils.js +17 -17
  621. package/es/utils/PRIVATE_tabBarUtils.js +17 -17
  622. package/es/utils/PRIVATE_tooltipUtils.js +14 -14
  623. package/es/utils/PRIVATE_visTestUtils.js +4 -4
  624. package/es/utils/UNSAFE_popupUtils.js +8 -8
  625. package/es/{withDirectionIcon-a8d84a3d.js → withDirectionIcon-b725a6d7.js} +2 -2
  626. package/es/{withDirectionIcon-a8d84a3d.js.map → withDirectionIcon-b725a6d7.js.map} +1 -1
  627. package/es/withThemeProps-dbd4fedf.js +2 -2
  628. package/package.json +2 -2
  629. package/amd/BaseCardView-b8119561.js +0 -2
  630. package/amd/BaseTabBarItem-03c91d3f.js +0 -2
  631. package/amd/BaseTabBarItem-03c91d3f.js.map +0 -1
  632. package/amd/CardFlexView-aa2f3de8.js +0 -2
  633. package/amd/CardGridView-85f90c75.js +0 -2
  634. package/amd/ColorPicker-141fa49d.js +0 -2
  635. package/amd/ListView-2678b2af.js +0 -2
  636. package/amd/ReorderableTabBar-46683bcb.js +0 -2
  637. package/amd/StyledDatePickerButton-b664f4f0.js +0 -2
  638. package/amd/StyledDatePickerButton-b664f4f0.js.map +0 -1
  639. package/amd/TabBar-fcebb560.js +0 -2
  640. package/amd/TabBarItem-224bc6b3.js +0 -2
  641. package/amd/TabBarLinkItem-57587dbd.js +0 -2
  642. package/amd/TabBarMixed-8cc4b4ed.js +0 -2
  643. package/amd/TextArea-4a3b8b56.js +0 -2
  644. package/amd/TextArea-4a3b8b56.js.map +0 -1
  645. package/amd/TextAreaAutosize-3a13ebb2.js +0 -2
  646. package/amd/useTextAreaAltEnter-32272da6.js +0 -2
  647. package/cjs/CheckboxSetContext-c62db26d.js +0 -12
  648. package/cjs/CheckboxSetContext-c62db26d.js.map +0 -1
  649. package/cjs/OverflowTabBarItem-2c967a89.js.map +0 -1
  650. package/cjs/StyledDatePickerButton-cf4e4dc0.js.map +0 -1
  651. package/es/OverflowTabBarItem-6966fbc7.js.map +0 -1
  652. package/es/StyledDatePickerButton-f3971567.js.map +0 -1
  653. package/es/TextArea-93ce78a7.js +0 -225
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact/jsx-runtime', 'preact', 'preact/compat', 'preact/hooks', './mergeProps-bcfa6a92', './collectionUtils-77dc5fa1', './ReorderableContext-6d10a1b7', './useNavigation-4d87e7e6', './LayerHost-0b288129', './useSelection-aecb6b23', './clientHints-6d361eaa', './classNames-08d99695', 'css!./DragAndDropStyles.styles.css', 'css!./ReorderableItemStyles.styles.css', './HiddenAccessible-037ef42d', './LoadMoreCollection-895f1ed5', './PRIVATE_BaseCardView/themes/BaseCardViewStyles.css', './refUtils-77e97004', './logger-0f873e29', './tabbableUtils-f95361a6', './useId-c9578d26', './useAnimation-d90c433f', './useResizeObserver-25032462', './TabbableModeContext-a9c97640', './FocusTrap-038b32c3', './useUser-08901aba', './keys-4755c121', './StyledCheckbox-368fed68', 'css!./SelectorStyles.styles.css', './CollectionInteractionContext-0b4ed98b', './useReorderableItem-7b4b2c3d', './useReorderableContext-a5453bd7', './Grid-caac1c86', './Flex-4b81b412', './PRIVATE_BaseCardView/themes/BaseCardViewContract.css', './Skeleton-3e52c94a', 'module', './useAddBusyState-8ed5cc58'], (function(e,t,r,n,o,s,i,a,l,c,d,u,y,m,h,g,f,x,b,p,C,S,R,v,A,I,w,K,j,B,k,E,T,D,L,P,O,V,F){"use strict";const M="[data-oj-card-item]",z={all:!1,keys:new Set},N={xs:12,sm:16,md:24,lg:48,xl:64};function _({children:e,itemKey:r,itemIndex:n,isCurrentKey:s,dragKey:i,setDragKey:a,onReorder:l,rootRef:c,gutterSize:d,columns:u}){const m=o.useRef(null),h=1===u,g=n%u==0,f=n%u==u-1,b=x.multiVariantStyles({itemOverlayFront:d}),p=x.multiVariantStyles({itemOverlayFrontVertical:d}),C={itemOverlayFront:h?p:b,itemOverlayRear:h?x.styles.itemOverlayRearVertical:x.styles.itemOverlayRear,itemDragger:x.styles.itemDragger},S=o.useCallback((()=>m?.current?.closest(M)),[]),R=o.useCallback((e=>{e.dataTransfer?.setData("text/cardview-items-key",JSON.stringify(r))}),[r]),{rootProps:v,isDragged:A,overlayZoneBeforeProps:I,overlayZoneAfterProps:j}=E.useReorderableItem({isDisabled:!l,dragKey:i,setDragKey:a,onReorder:l,rootRef:c,ref:m,getItem:S,setTransferData:R,itemStyles:C,itemSelector:M,isVertical:h}),{currentItemKey:B}=T.useReorderableContext();o.useEffect((()=>{s&&(B.current=r)}),[s,r,B]);const{direction:k}=w.useUser(),D="rtl"===k,L=y.classNames([I?.class,!h&&!D&&g&&x.styles.itemOverlayFrontEdge,!h&&D&&f&&x.styles.itemOverlayFrontEdge]),P=y.classNames([j?.class,!h&&!D&&f&&x.styles.itemOverlayRearEdge,!h&&D&&g&&x.styles.itemOverlayRearEdge]);return t.jsxs("div",{...v,children:[e,!A&&K.isKeyDefined(i)&&t.jsxs(t.Fragment,{children:[t.jsx("div",{...I,class:L}),t.jsx("div",{...j,class:P})]})]})}const H=e=>({animationStates:{slideUp:{from:{translateY:"50px"},to:{translateY:"0px"},options:{duration:300,delay:50*e,easing:[0,0,.2,1]}},slideDown:{from:{translateY:"-50px"},to:{translateY:"0"},options:{duration:300,delay:50*e,easing:[0,0,.2,1]}}},isAnimatedOnMount:!0}),U=(e,t,r)=>({animationStates:{opacity:{from:{opacity:0},to:{opacity:1},options:{duration:150,delay:50*e,easing:"linear"}}},isAnimatedOnMount:!0,onAnimationEnd:()=>{r?.(),t.current&&clearTimeout(t.current)}}),Y=n.memo((function({children:e,itemKey:r,itemData:n,itemIndex:s,isTabbable:a,isCurrentKey:l,isFocused:c,isFocusRingVisible:d,selectedKeys:u,selectionMode:m,onSelectionChange:h,focusBehavior:g,setIsFocusBehaviorValid:f,initialAnimation:w,isGridLayout:j,updateCardSize:B,reorderItemProps:k,onAnimationBusyStart:E,onAnimationBusyEnd:T}){const D=o.useRef(null),L=o.useRef(),P=c&&d,O=x.multiVariantStyles({itemFocused:"card"===g&&P?"isItemFocused":"isNotItemFocused",itemInitialOpacity:w?"isTransparent":"isNotTransparent",itemInGridLayout:j?"isInGridLayout":"isNotInGridLayout"}),V=y.classNames([x.styles.itemStyle,O]),F=o.useCallback((e=>{B?.(e.contentRect.width,e.contentRect.height)}),[B]),M=o.useRef(null);v.useResizeObserver(B?D:M,F),o.useLayoutEffect((()=>{if("content"===g&&P){const e=D.current?.firstElementChild?.firstElementChild,t=C.allTabbableElements(e,!0,!0);0===t.length||t.length>1?(p.warn(`${t.length} focusable elements are detected in the card. 'content' focusBehavior is intended only for use when the card has single focusable element. Please specify one focusable element in the card or switch the focusBehavior to 'card'.`),f?.(!1)):t[0].focus()}}),[g,P,f]);const{nodeRef:z,controller:N}=R.useAnimation(w||"none",H(s)),{nodeRef:Y,controller:G}=R.useAnimation(w?"opacity":"none",U(s,L,T));w&&E?.(),o.useEffect((()=>{void 0!==w&&(L.current=setTimeout((()=>{N.cancel(),G.cancel(),D.current&&(D.current.style.opacity="1"),T?.()}),1e3))}),[G,N,w,T]);const $=o.useMemo((()=>void 0===w?b.mergeRefs(D):b.mergeRefs(D,z,Y)),[D,z,Y,w]),W=i.getItemContext({data:{data:n,metadata:{key:r}},index:s},u,"multiple"===m,h),Z=k?t.jsx(_,{...k,itemKey:r,itemIndex:s,isCurrentKey:l,children:e(W)}):e(W);return t.jsx("div",{id:S.useId(),ref:$,class:V,role:"gridcell","data-oj-card-item":"","data-oj-key":r,onKeyDown:e=>{"card"!==g||!a||"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.stopPropagation()},"aria-selected":"none"===m?void 0:K.containsKey(u,r),..."number"==typeof r&&{"data-oj-key-type":"number"},children:t.jsx(A.TabbableModeContext.Provider,{value:{isTabbable:a},children:t.jsx(I.FocusTrap,{isDisabled:!a,restoreFocusRef:!1,children:Z})})})}),((e,t)=>{return!(!e||!t)&&(e.children===t.children&&e.itemKey===t.itemKey&&e.itemData===t.itemData&&e.itemIndex===t.itemIndex&&e.isTabbable===t.isTabbable&&e.isCurrentKey===t.isCurrentKey&&e.isFocused===t.isFocused&&e.isFocusRingVisible===t.isFocusRingVisible&&e.initialAnimation===t.initialAnimation&&e.focusBehavior===t.focusBehavior&&K.isSameKey(e.selectedKeys,t.selectedKeys)&&e.selectionMode===t.selectionMode&&e.onSelectionChange===t.onSelectionChange&&e.setIsFocusBehaviorValid===t.setIsFocusBehaviorValid&&e.isGridLayout===t.isGridLayout&&e.updateCardSize===t.updateCardSize&&e.onAnimationBusyStart===t.onAnimationBusyStart&&e.onAnimationBusyEnd===t.onAnimationBusyEnd&&(r=e.reorderItemProps,n=t.reorderItemProps,r?.dragKey===n?.dragKey&&r?.setDragKey===n?.setDragKey&&r?.columns===n?.columns&&r?.gutterSize===n?.gutterSize&&r?.rootRef===n?.rootRef));var r,n}));function G({children:e,layout:r,gutterSize:n,columns:o}){const s=P.cardViewVars.gutterSize[n];return"grid"===r?o<1?null:t.jsx(D.Grid,{gridTemplateColumns:`repeat(${o}, 1fr)`,gap:s,children:e}):t.jsx(L.Flex,{wrap:"wrap",gap:s,children:e})}function $({children:e}){const[n,s]=o.useState(!1);return o.useEffect((()=>{setTimeout((()=>{s(!0)}),50)}),[]),n?t.jsx(r.Fragment,{children:e}):t.jsx("div",{class:f.LOADMORE_STYLE_CLASS})}const W=(e,r=25,n,o,s=!0)=>{const i=n||("flex"===e?"80x":"100%"),a=o||"85x";return[...Array(r)].map(((e,r)=>t.jsx(O.Skeleton,{width:i,height:a,borderRadius:"6px"},s&&`${r}${(new Date).getTime()}`)))},Z=e=>t.jsx($,{children:W(e.layout)}),J=e=>{const r=[t.jsx("div",{class:f.LOADMORE_STYLE_CLASS,children:W(e.layout,1)}),...W(e.layout,24)];return t.jsx($,{children:r})},X=()=>t.jsx("div",{class:f.LOADMORE_STYLE_CLASS}),q=e=>{if(e.colCount<1||null==e.cardWidth||null==e.cardHeight)return t.jsx(X,{});{const r=[],n=e.colCount-e.totalCount%e.colCount,o=n===e.colCount,s=`calc(${e.cardWidth}px)`,i=e.cardHeight?`calc(${e.cardHeight}px)`:"85x",a="flex"===e.layout?s:"100%",l="flex"===e.layout||o?i:"100%",c=t.jsx("div",{class:f.LOADMORE_STYLE_CLASS,children:W(e.layout,1,a,l)});return r.push(c),r.push(W(e.layout,n-1,a,l)),o||r.push(W(e.layout,e.colCount,a,i)),t.jsx($,{children:r})}},Q=e=>t.jsx($,{children:te({loadingStatus:"initial"},25,e.skeletonRenderer)}),ee=e=>{const r=[];if(e.isRenderAsInitial){const n={loadingStatus:"initial"};r.push(t.jsx("div",{class:f.LOADMORE_STYLE_CLASS,children:e.skeletonRenderer(n)})),r.push(te(n,24,e.skeletonRenderer))}else{if(0===e.colCount)return null;const n=`calc(${e.cardWidth}px)`,o=`calc(${e.cardHeight}px)`,s=e.colCount-e.totalCount%e.colCount,i=s===e.colCount,a={loadingStatus:"loadMore",height:"flex"===e.layout||i?o:"100%",width:"flex"===e.layout?n:"100%"};r.push(t.jsx("div",{class:f.LOADMORE_STYLE_CLASS,children:e.skeletonRenderer(a)})),r.push(Array(te(a,s-1,e.skeletonRenderer))),i||r.push(te(a,e.colCount,e.skeletonRenderer))}return t.jsx($,{children:r})},te=(e,t,r)=>Array(t).fill(r(e)),re=n.forwardRef((({children:e,data:n,onLoadMore:c=()=>{},hasMore:m=!1,getRowKey:h,currentItemOverride:b,onPersistCurrentItem:p,selectionMode:C="none",selectedKeys:S=z,onSelectionChange:R,onReorder:v,viewportConfig:A,focusBehavior:I="card","aria-label":w,"aria-labelledby":K,"aria-describedby":j,initialAnimation:B="slideUp",gutterSize:k="sm",columns:T,layout:D,cardSize:L,updateCardSize:P,skeletonRenderer:O},V)=>{const _=o.useRef(null);o.useImperativeHandle(V,(()=>_.current),[_]);const H=o.useRef(),U=N[k],$={layout:D,columns:T,gutterSize:k},{onBusyStart:W,onBusyEnd:X}=F.useAddBusyState("handling initial animation"),te=o.useRef(!0);o.useEffect((()=>{null!=L.height&&null!=L.width&&(te.current=!1)}),[L]);const re="none"===C?void 0:"multiple"===C,oe=n?n.length:-1,[se,ie]=o.useState(!0),ae=se?I:"card",le=o.useRef(!1),ce=null!=v,de=o.useRef(!1),ue={ArrowUp:e=>i.getPrevNextKeyByCount(n,h,e,-T),ArrowDown:e=>i.getPrevNextKeyByCount(n,h,e,T),ArrowLeft:e=>i.getPrevNextKeyByCount(n,h,e,-1),ArrowRight:e=>i.getPrevNextKeyByCount(n,h,e,1)},{navigationProps:ye,currentKey:me,isCurrentItemOverridden:he,showFocusRing:ge,isCurrentTabbableKey:fe}=l.useNavigation(n,_,ne,M,ue,b,p,A,void 0,"multiple"!==C,"card"===ae,"card"===ae,!1),xe=o.useCallback((e=>{R&&(!1===e.value.all&&e.value.keys.size>0&&(H.current=Array.from(e.value.keys.values()).pop()),R(e))}),[H,R]),be=o.useCallback((e=>{if(n&&R){const t=i.handleSelectionRange(e,n,h);Array.isArray(t)&&("shiftSpace"===e.eventType?H.current=e.value.start:H.current=e.value.end,R({value:{all:!1,keys:new Set(t)},target:null}))}}),[n,R,h]),{selectionProps:pe}=d.useSelection((e=>e===_.current?void 0===me?null:me:i.keyExtractor(e,M)),S,C,!1,"toggle",xe,H.current,me,((e,t)=>i.getPrevNextKeyByCount(n,h,e,t?-T:T)),((e,t)=>i.getPrevNextKeyByCount(n,h,e,t?-1:1)),(e=>{if(_.current){const t=i.findElementByKey(_.current,e,M);t&&t.scrollIntoView({block:"nearest"})}}),be),{reorderProps:Ce,reorderItemProps:Se,reorderContext:Re,reorderInstructionsId:ve,reorderInstructions:Ae}=(({onReorder:e,gutterSize:t,columns:r,rootRef:n,scrollCurrItemIntoView:s})=>{const a=null!=e,[l,c]=o.useState(void 0),{reorderProps:d,reorderContext:u,reorderInstructionsId:y,reorderInstructions:m}=E.useReorderable({onReorder:e,rootRef:n,itemSelector:M,isDisabled:!a,columns:r});return a?{reorderProps:{...d,onDragOver:e=>{i.dragToScroll(e,void 0!==l,n.current),s.current=!1}},reorderItemProps:{dragKey:l,setDragKey:c,onReorder:e,rootRef:n,gutterSize:t,columns:r},reorderContext:u,reorderInstructionsId:y,reorderInstructions:m}:{reorderProps:d,reorderContext:u,reorderInstructionsId:y,reorderInstructions:m}})({onReorder:v,gutterSize:k,columns:T,rootRef:_,scrollCurrItemIntoView:le}),Ie=ce&&t.jsx(t.Fragment,{children:t.jsx("span",{id:ve,children:t.jsx(g.HiddenAccessible,{children:Ae})})});o.useEffect((()=>{if(ce&&null!=me&&_.current){const e=i.findElementByKey(_.current,me,M);e&&le.current&&!he&&(e.scrollIntoView({block:"nearest"}),le.current=!1)}}),[me,n,ce,he]);const we=o.useCallback((()=>{de.current||(de.current=!0,c())}),[de,c]);o.useEffect((()=>{de.current=!1}),[n,m]);const Ke=n?!n.length&&m?O?t.jsx(ee,{layout:D,colCount:T,totalCount:n.length,cardWidth:L.width,cardHeight:L.height,isRenderAsInitial:!0,skeletonRenderer:O}):t.jsx(J,{layout:D}):O?t.jsx(ee,{layout:D,colCount:T,totalCount:n.length,cardWidth:L.width,cardHeight:L.height,isRenderAsInitial:!1,skeletonRenderer:O}):t.jsx(q,{layout:D,colCount:T,totalCount:n.length,cardWidth:L.width,cardHeight:L.height}):null;A=i.getViewportConfig(_,A);const je=t.jsx("div",{role:"row",children:t.jsx(G,{...$,children:t.jsx(f.LoadMoreCollection,{data:n,hasMore:m,onLoadMore:we,loadMoreIndicator:Ke,loadMoreThreshold:U+4,viewportConfig:A,children:r=>{const o=h(r.data),s=fe(o),i=me===o&&!s,a=i&&ge,l=!!n&&r.index===n.length-1;return t.jsx(Y,{itemKey:o,isCurrentKey:me===o,itemData:r.data,itemIndex:r.index,isTabbable:s,isFocused:i,isFocusRingVisible:a,isGridLayout:"grid"===D,selectedKeys:S,selectionMode:C,onSelectionChange:R,focusBehavior:ae,...0===r.index&&te.current&&{onAnimationBusyStart:W},...l&&te.current&&{onAnimationBusyEnd:X},..."content"===I&&{setIsFocusBehaviorValid:ie},...te.current&&{initialAnimation:B},...0===r.index&&!L.width&&{updateCardSize:P},...ce&&{reorderItemProps:Se},children:e},o)}})})}),Be=t.jsx(G,{...$,children:O?t.jsx(Q,{skeletonRenderer:O}):t.jsx(Z,{layout:D})}),ke=!("ios"===u.getClientHints().platform||"android"===u.getClientHints().platform),Ee=[x.styles.baseStyle];ke||Ee.push(x.styles.userSelect);const Te=y.classNames(Ee);return t.jsxs("div",{...s.mergeProps(ye,pe,Ce,{onKeyDown:e=>{"content"===ae&&"Tab"===e.key&&_.current?.focus({preventScroll:!0});ce&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e.key)&&(le.current=!0)}}),ref:_,role:"grid",class:Te,tabIndex:0,"aria-label":w,"aria-labelledby":K,"aria-describedby":ce?ve+" "+j:j,"aria-multiselectable":re,"aria-rowcount":1,"aria-colcount":oe,children:[t.jsx(a.ReorderableContext.Provider,{value:Re,children:n?n.length||m?je:t.jsx(r.Fragment,{}):Be}),Ie]})})),ne=e=>e.id,oe=re;e.BaseCardView=oe,e.getColCount=(e,t,r)=>{if(!t||!r)return 0;const n=Math.floor((r+e)/(e+t));return Math.max(1,n)},e.gutterSizeToPX=N}));
2
+ //# sourceMappingURL=BaseCardView-16fda4c3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseCardView-b8119561.js","sources":["../../src/PRIVATE_BaseCardView/BaseCardViewUtils.ts","../../src/PRIVATE_BaseCardView/BaseCardViewReorderableItem.tsx","../../src/PRIVATE_BaseCardView/BaseCardViewItem.tsx","../../src/PRIVATE_BaseCardView/BaseCardViewLayout.tsx","../../src/PRIVATE_BaseCardView/BaseCardViewSkeletonContainer.tsx","../../src/PRIVATE_BaseCardView/BaseCardViewSkeleton.tsx","../../src/PRIVATE_BaseCardView/BaseCardView.tsx","../../src/PRIVATE_BaseCardView/useCardViewReorder.ts"],"sourcesContent":["import { Size } from '../utils/UNSAFE_size';\n\n/**\n * Item selector for CardView components\n */\nexport const CARDVIEW_ITEM_SELECTOR = '[data-oj-card-item]';\n\nexport const emptyKeys = { all: false, keys: new Set() };\nexport type GutterSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * A mapping of gutterSize to concrete size in pixels\n */\nexport const gutterSizeToPX: Record<string, number> = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 48,\n xl: 64\n};\n\nexport const getGapSize = (gutterSize?: GutterSize) => {\n const px = gutterSizeToPX[gutterSize || 'sm'];\n const gap = `${px / 4}x` as Size;\n return gap;\n};\n\nexport const getColCount = (gapWidth: number, cardWidth?: number, rootWidth?: number) => {\n if (!cardWidth || !rootWidth) return 0;\n\n // if we have n cards, we have n-1 gaps\n const colCount = Math.floor((rootWidth + gapWidth) / (gapWidth + cardWidth));\n return Math.max(1, colCount);\n};\n","import { useRef, useCallback, useEffect } from 'preact/hooks';\nimport { useReorderableItem } from '../hooks/PRIVATE_useReorderable';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { ReorderableItemProps } from '../UNSAFE_Collection/Reorderable.types';\nimport { multiVariantStyles, styles } from './themes/BaseCardViewStyles.css';\nimport { CARDVIEW_ITEM_SELECTOR, GutterSize } from './BaseCardViewUtils';\nimport { useReorderableContext } from '#hooks/PRIVATE_useReorderable/useReorderableContext';\nimport { isKeyDefined } from '../utils/UNSAFE_keys';\n\ntype BaseItemProps<K> = {\n itemKey: K;\n itemIndex: number;\n isCurrentKey: boolean;\n};\n\nexport type BaseCardViewReorderableItemProps<K> = ReorderableItemProps<K> & {\n gutterSize: GutterSize;\n columns: number;\n};\n\n/**\n * The internal component used to render a reorderable item in CardView.\n */\nexport function BaseCardViewReorderableItem<K extends string | number>({\n children,\n itemKey,\n itemIndex,\n isCurrentKey,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n gutterSize,\n columns\n}: BaseCardViewReorderableItemProps<K> & BaseItemProps<K>) {\n const itemRef = useRef<HTMLDivElement | null>(null);\n const isOneColumn = columns === 1;\n const isFirstColumn = itemIndex % columns === 0;\n const isLastColumn = itemIndex % columns === columns - 1;\n const variantClasses = multiVariantStyles({\n itemOverlayFront: gutterSize\n });\n const variantClassesVertical = multiVariantStyles({\n itemOverlayFrontVertical: gutterSize\n });\n const itemStyles = {\n itemOverlayFront: isOneColumn ? variantClassesVertical : variantClasses,\n itemOverlayRear: isOneColumn ? styles.itemOverlayRearVertical : styles.itemOverlayRear,\n itemDragger: styles.itemDragger\n };\n const getItem = useCallback(\n () => itemRef?.current?.closest(CARDVIEW_ITEM_SELECTOR) as HTMLElement,\n []\n );\n const setTransferData = useCallback(\n (event: DragEvent) => {\n event.dataTransfer?.setData('text/cardview-items-key', JSON.stringify(itemKey));\n },\n [itemKey]\n );\n const { rootProps, isDragged, overlayZoneBeforeProps, overlayZoneAfterProps } =\n useReorderableItem({\n isDisabled: onReorder ? false : true,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n ref: itemRef,\n getItem,\n setTransferData,\n itemStyles,\n itemSelector: CARDVIEW_ITEM_SELECTOR,\n isVertical: isOneColumn\n });\n\n // TODO: remove this as part of JET-70023\n const { currentItemKey } = useReorderableContext();\n useEffect(() => {\n if (isCurrentKey) {\n currentItemKey.current = itemKey;\n }\n }, [isCurrentKey, itemKey, currentItemKey]);\n\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n\n const overlayZoneBeforeClass = classNames([\n overlayZoneBeforeProps?.class,\n !isOneColumn && !isRtl && isFirstColumn && styles.itemOverlayFrontEdge,\n !isOneColumn && isRtl && isLastColumn && styles.itemOverlayFrontEdge\n ]);\n\n const overlayZoneAfterClass = classNames([\n overlayZoneAfterProps?.class,\n !isOneColumn && !isRtl && isLastColumn && styles.itemOverlayRearEdge,\n !isOneColumn && isRtl && isFirstColumn && styles.itemOverlayRearEdge\n ]);\n\n return (\n <div {...rootProps}>\n {children}\n {!isDragged && isKeyDefined(dragKey) && (\n <>\n <div {...overlayZoneBeforeProps} class={overlayZoneBeforeClass}></div>\n <div {...overlayZoneAfterProps} class={overlayZoneAfterClass}></div>\n </>\n )}\n </div>\n );\n}\n","/**\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 */\nimport { ComponentChildren } from 'preact';\nimport { memo } from 'preact/compat';\nimport {\n useRef,\n useCallback,\n useLayoutEffect,\n useMemo,\n useEffect,\n StateUpdater,\n Dispatch,\n MutableRef\n} from 'preact/hooks';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { mergeRefs } from '../utils/PRIVATE_refUtils';\nimport { warn } from '../utils/UNSAFE_logger';\nimport { allTabbableElements } from '../utils/PRIVATE_tabbableUtils';\nimport { useId } from '../hooks/UNSAFE_useId';\nimport { useAnimation, UseAnimationConfig } from '../hooks/UNSAFE_useAnimation';\nimport { useResizeObserver } from '../hooks/UNSAFE_useResizeObserver';\nimport { TabbableModeContext } from '../hooks/UNSAFE_useTabbableMode';\nimport { FocusTrap } from '../UNSAFE_FocusTrap';\nimport { SelectionMode, ListItemRendererContext, SelectionDetail } from '../UNSAFE_Collection';\nimport { multiVariantStyles, styles } from './themes/BaseCardViewStyles.css';\nimport {\n BaseCardViewReorderableItem,\n BaseCardViewReorderableItemProps\n} from './BaseCardViewReorderableItem';\nimport { containsKey, isSameKey, Keys } from '../utils/UNSAFE_keys';\nimport { getItemContext } from '../utils/PRIVATE_collectionUtils';\n\n/**\n * Props for the BaseCardViewItem Component\n */\nexport type Props<K, D> = {\n children: (context: ListItemRendererContext<K, D>) => ComponentChildren;\n itemKey: K;\n itemData: D;\n itemIndex: number;\n isTabbable: boolean;\n isCurrentKey: boolean;\n isFocused: boolean;\n isFocusRingVisible: boolean;\n selectedKeys: Keys<K>;\n selectionMode: SelectionMode;\n onSelectionChange?: (detail: SelectionDetail<K>) => void;\n focusBehavior: 'card' | 'content';\n setIsFocusBehaviorValid?: Dispatch<StateUpdater<boolean>>;\n initialAnimation?: 'slideUp' | 'slideDown';\n isGridLayout?: boolean;\n updateCardSize?: (width: number, height: number) => void;\n onAnimationBusyStart?: () => void;\n onAnimationBusyEnd?: () => void;\n} & {\n reorderItemProps?: Omit<BaseCardViewReorderableItemProps<K>, 'children'>;\n};\n\n/**\n * The internal component used to render a single item in CardView.\n */\nfunction BaseCardViewItem<K extends string | number, D>({\n children,\n itemKey,\n itemData,\n itemIndex,\n isTabbable,\n isCurrentKey,\n isFocused,\n isFocusRingVisible,\n selectedKeys,\n selectionMode,\n onSelectionChange,\n focusBehavior,\n setIsFocusBehaviorValid,\n initialAnimation,\n isGridLayout,\n updateCardSize,\n reorderItemProps,\n onAnimationBusyStart,\n onAnimationBusyEnd\n}: Props<K, D>) {\n const rootRef = useRef<HTMLDivElement>(null);\n const timeoutRef = useRef<ReturnType<typeof setTimeout>>();\n\n const isItemFocused = isFocused && isFocusRingVisible;\n const variantClasses = multiVariantStyles({\n itemFocused: focusBehavior === 'card' && isItemFocused ? 'isItemFocused' : 'isNotItemFocused',\n itemInitialOpacity: initialAnimation ? 'isTransparent' : 'isNotTransparent',\n itemInGridLayout: isGridLayout ? 'isInGridLayout' : 'isNotInGridLayout'\n });\n const classes = classNames([styles.itemStyle, variantClasses]);\n\n /*********************************** Tabbable Mode ***********************************/\n\n // don't bubble Arrow Up/Down/Left/Right events to parent when in isTabbable mode\n // this bubbling causes the outer CollectionFocus ring to change index while in the isTabbable mode.\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n focusBehavior === 'card' &&\n isTabbable &&\n (event.key === 'ArrowDown' ||\n event.key === 'ArrowUp' ||\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight')\n ) {\n event.stopPropagation();\n }\n };\n\n /************************************ Card Size ************************************/\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n updateCardSize?.(entry.contentRect.width, entry.contentRect.height);\n },\n [updateCardSize]\n );\n\n const nullRef = useRef<HTMLDivElement>(null);\n useResizeObserver(updateCardSize ? rootRef : nullRef, handleResize);\n\n /********************************* Focus Behavior *********************************/\n\n useLayoutEffect(() => {\n if (focusBehavior === 'content' && isItemFocused) {\n // rootRef is cardview item, its first child is the focus trap div, so its first grand child\n // is the actual content\n const content = rootRef.current?.firstElementChild?.firstElementChild as HTMLElement;\n const focusable = allTabbableElements(content, true, true);\n if (focusable.length === 0 || focusable.length > 1) {\n warn(\n `${focusable.length} focusable elements are detected in the card. 'content' focusBehavior is intended only for use when the card has single focusable element. Please specify one focusable element in the card or switch the focusBehavior to 'card'.`\n );\n setIsFocusBehaviorValid?.(false);\n } else {\n focusable[0].focus();\n }\n }\n }, [focusBehavior, isItemFocused, setIsFocusBehaviorValid]);\n\n /******************************** Initial Animation ********************************/\n\n // animation for slide up/down\n const { nodeRef: nodeRefSlide, controller: controllerSlide } = useAnimation<\n 'slideUp' | 'slideDown' | 'none',\n HTMLDivElement\n >(initialAnimation || 'none', animationConfigSlide(itemIndex));\n\n // animation for opacity change\n const { nodeRef: nodeRefOpacity, controller: controllerOpacity } = useAnimation<\n 'opacity' | 'none',\n HTMLDivElement\n >(\n (initialAnimation && 'opacity') || 'none',\n animationConfigOpacity(itemIndex, timeoutRef, onAnimationBusyEnd)\n );\n\n if (initialAnimation) {\n onAnimationBusyStart?.();\n }\n\n // max cap for animation is 1s\n useEffect(() => {\n if (initialAnimation !== undefined) {\n timeoutRef.current = setTimeout(() => {\n controllerSlide.cancel();\n controllerOpacity.cancel();\n if (rootRef.current) {\n rootRef.current.style.opacity = '1';\n }\n onAnimationBusyEnd?.();\n }, 1000);\n }\n }, [controllerOpacity, controllerSlide, initialAnimation, onAnimationBusyEnd]);\n\n // TODO: issue track in JET-57681, we currently have two useAnimation() because the opacity and\n // slide up/down have different durations, and the current API couldn't handle this case, we will\n // update this once the API is updated\n\n /********************************** Child Component **********************************/\n const itemRefs = useMemo(() => {\n // NOTE: spot an issue when we click the cards during animation is processing, the cards would not finish\n // the current animations and stay as what it is, e.g. leave itself as half transparent.\n // need to remove nodeRefSlide and nodeRefOpacity to avoid this issue.\n if (initialAnimation === undefined) {\n return mergeRefs(rootRef);\n }\n return mergeRefs(rootRef, nodeRefSlide, nodeRefOpacity);\n }, [rootRef, nodeRefSlide, nodeRefOpacity, initialAnimation]);\n\n const rendererContext = getItemContext<K, D>(\n { data: { data: itemData, metadata: { key: itemKey } }, index: itemIndex },\n selectedKeys,\n selectionMode === 'multiple',\n onSelectionChange\n );\n\n const childrenComponent = reorderItemProps ? (\n <BaseCardViewReorderableItem\n {...reorderItemProps}\n itemKey={itemKey}\n itemIndex={itemIndex}\n isCurrentKey={isCurrentKey}>\n {children(rendererContext)}\n </BaseCardViewReorderableItem>\n ) : (\n children(rendererContext)\n );\n\n return (\n <div\n id={useId()}\n ref={itemRefs}\n class={classes}\n role=\"gridcell\"\n data-oj-card-item=\"\"\n data-oj-key={itemKey}\n onKeyDown={handleKeyDown}\n aria-selected={selectionMode === 'none' ? undefined : containsKey(selectedKeys, itemKey)}\n {...(typeof itemKey === 'number' && { 'data-oj-key-type': 'number' })}>\n <TabbableModeContext.Provider value={{ isTabbable }}>\n <FocusTrap isDisabled={!isTabbable} restoreFocusRef={false}>\n {childrenComponent}\n </FocusTrap>\n </TabbableModeContext.Provider>\n </div>\n );\n}\n\nconst animationConfigSlide = (\n index: number\n): UseAnimationConfig<'slideUp' | 'slideDown' | 'none', HTMLDivElement> => {\n return {\n animationStates: {\n slideUp: {\n from: {\n translateY: '50px'\n },\n to: {\n translateY: '0px'\n },\n options: {\n duration: 300,\n delay: index * 50,\n easing: [0, 0, 0.2, 1]\n }\n },\n slideDown: {\n from: {\n translateY: '-50px'\n },\n to: {\n translateY: '0'\n },\n options: {\n duration: 300,\n delay: index * 50,\n easing: [0, 0, 0.2, 1]\n }\n }\n },\n isAnimatedOnMount: true\n };\n};\n\nconst animationConfigOpacity = (\n index: number,\n timeoutRef: MutableRef<ReturnType<typeof setTimeout> | undefined>,\n onAnimationBusyEnd?: () => void\n): UseAnimationConfig<'opacity' | 'none', HTMLDivElement> => {\n return {\n animationStates: {\n opacity: {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n },\n options: {\n duration: 150,\n delay: index * 50,\n easing: 'linear'\n }\n }\n },\n isAnimatedOnMount: true,\n onAnimationEnd: () => {\n onAnimationBusyEnd?.();\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n }\n };\n};\n\n/**\n * Compare the equality between two reorderItemProps, especially useful for memoized items\n */\nconst _compareReorderItemProps = (\n props1: Props<string | number, unknown>['reorderItemProps'],\n props2: Props<string | number, unknown>['reorderItemProps']\n) => {\n return (\n props1?.['dragKey'] === props2?.['dragKey'] &&\n props1?.['setDragKey'] === props2?.['setDragKey'] &&\n props1?.['columns'] === props2?.['columns'] &&\n props1?.['gutterSize'] === props2?.['gutterSize'] &&\n props1?.['rootRef'] === props2?.['rootRef']\n );\n};\n\nexport const MemoizeBaseCardViewItem = memo(\n BaseCardViewItem,\n (prev: Props<string | number, unknown>, next: Props<string | number, unknown>) => {\n if (prev && next) {\n return (\n prev.children === next.children &&\n prev.itemKey === next.itemKey &&\n prev.itemData === next.itemData &&\n prev.itemIndex === next.itemIndex &&\n prev.isTabbable === next.isTabbable &&\n prev.isCurrentKey === next.isCurrentKey &&\n prev.isFocused === next.isFocused &&\n prev.isFocusRingVisible === next.isFocusRingVisible &&\n prev.initialAnimation === next.initialAnimation &&\n prev.focusBehavior === next.focusBehavior &&\n isSameKey(prev.selectedKeys, next.selectedKeys) &&\n prev.selectionMode === next.selectionMode &&\n prev.onSelectionChange === next.onSelectionChange &&\n prev.setIsFocusBehaviorValid === next.setIsFocusBehaviorValid &&\n prev.isGridLayout === next.isGridLayout &&\n prev.updateCardSize === next.updateCardSize &&\n prev.onAnimationBusyStart === next.onAnimationBusyStart &&\n prev.onAnimationBusyEnd === next.onAnimationBusyEnd &&\n _compareReorderItemProps(prev.reorderItemProps, next.reorderItemProps)\n );\n }\n return false;\n }\n);\n","import { ComponentChildren } from 'preact';\nimport { Grid } from '../UNSAFE_Grid';\nimport { Flex } from '../UNSAFE_Flex';\nimport { GutterSize } from './BaseCardViewUtils';\nimport { cardViewVars } from './themes/BaseCardViewContract.css';\n\ntype Props = {\n children: ComponentChildren;\n layout: 'grid' | 'flex';\n gutterSize: GutterSize;\n columns: number;\n};\n\nexport function BaseCardViewLayout({ children, layout, gutterSize, columns }: Props) {\n const gap = cardViewVars.gutterSize[gutterSize];\n if (layout === 'grid') {\n return columns < 1 ? null : (\n <Grid gridTemplateColumns={`repeat(${columns}, 1fr)`} gap={gap}>\n {children}\n </Grid>\n );\n } else {\n return (\n <Flex wrap=\"wrap\" gap={gap}>\n {children}\n </Flex>\n );\n }\n}\n","/**\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 */\nimport { ComponentChildren, Fragment } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport { LOADMORE_STYLE_CLASS } from '../PRIVATE_LoadMoreCollection';\n\ntype Props = {\n /**\n * Allows to pass skeletons\n **/\n children: ComponentChildren;\n};\n\n/**\n * Allows to specify the time delay for rendering the component\n **/\nconst timerValue = 50;\n\n/**\n * BaseCardViewSkeletonContainer renders skeletons after 50ms threshold defined in the Redwood spec\n **/\nexport function BaseCardViewSkeletonContainer({ children }: Props) {\n const [isVisible, setIsVisible] = useState(false);\n\n useEffect(() => {\n setTimeout(() => {\n setIsVisible(true);\n }, timerValue);\n }, []);\n\n return isVisible ? <Fragment>{children}</Fragment> : <div class={LOADMORE_STYLE_CLASS}></div>;\n}\n","import { Size } from '../utils/UNSAFE_size';\nimport { Skeleton } from '../UNSAFE_Skeleton';\nimport { LOADMORE_STYLE_CLASS } from '../PRIVATE_LoadMoreCollection';\nimport { BaseCardViewSkeletonContainer } from './BaseCardViewSkeletonContainer';\nimport { SkeletonRendererContext } from '../UNSAFE_CardFlexView';\nimport { ComponentChildren } from 'preact';\n\nconst DEFAULT_SKELETON_NUMBER = 25;\nconst DEFAULT_SKELETON_WIDTH = '80x';\nconst DEFAULT_SKELETON_HEIGHT = '85x';\n\ntype SkeletonProps = {\n layout: 'flex' | 'grid';\n colCount: number;\n totalCount: number;\n cardWidth?: number;\n cardHeight?: number;\n};\n\n/**\n * A function that returns an array of skeletons based on count\n * @param count the number of skeletons\n */\nconst getSkeletonsByCount = (\n layout: 'flex' | 'grid',\n count = DEFAULT_SKELETON_NUMBER,\n width?: Size,\n height?: Size,\n isUnique = true\n) => {\n const sw = width || (layout === 'flex' ? DEFAULT_SKELETON_WIDTH : '100%');\n const sh = height || DEFAULT_SKELETON_HEIGHT;\n\n return [...Array(count)].map((_v, i) => (\n // create unique keys if needed, otherwise the animations won't start at the same time, because the old copy of skeletons\n // could be reused, even the key is specified by useId(), combine count with time to make the key unique.\n <Skeleton\n key={isUnique && `${i}${new Date().getTime()}`}\n width={sw}\n height={sh}\n borderRadius=\"6px\"\n />\n ));\n};\n\n/**\n * When there is no data (i.e. data is an empty array or null, and hasMore is false), we will show 25 card skeletons with default size\n */\nexport const InitialLoadSkeletons = (props: { layout: SkeletonProps['layout'] }) => (\n <BaseCardViewSkeletonContainer>{getSkeletonsByCount(props.layout)}</BaseCardViewSkeletonContainer>\n);\n\n/**\n * When we are fetching the initial data (i.e. data is an empty array, and hasMore is true), we will show 25 card skeletons with default size,\n * because we don't know the card dimension at this time. Since there is more data to load, we will specify LOADMORE_STYLE_CLASS on skeletons\n */\nexport const DefaultLoadMoreSkeletons = (props: { layout: SkeletonProps['layout'] }) => {\n const firstSkeleton = (\n <div class={LOADMORE_STYLE_CLASS}>{getSkeletonsByCount(props.layout, 1)}</div>\n );\n const otherSkeletons = getSkeletonsByCount(props.layout, DEFAULT_SKELETON_NUMBER - 1);\n const skeletons = [firstSkeleton, ...otherSkeletons];\n return <BaseCardViewSkeletonContainer>{skeletons}</BaseCardViewSkeletonContainer>;\n};\n\n/**\n * During the render that we measure and update card dimension, we will hide skeletons temporarily\n * to avoid showing incorrect skeletons\n */\nconst InvisibleSkeletons = () => {\n return <div class={LOADMORE_STYLE_CLASS}></div>;\n};\n\nexport const LoadMoreSkeletons = (props: SkeletonProps) => {\n if (props.colCount < 1 || props.cardWidth == null || props.cardHeight == null) {\n // if column count / card width / card height are invalid, we will show the invisible skeletons\n return <InvisibleSkeletons />;\n } else {\n // after initial renders, show skeletons with correct dimension and count\n const skeletons = [];\n\n const firstRowColCount = props.colCount - (props.totalCount % props.colCount);\n const isOnlyOneRow = firstRowColCount === props.colCount;\n\n const cardWidth = `calc(${props.cardWidth}px)` as Size;\n const cardHeight = props.cardHeight\n ? (`calc(${props.cardHeight}px)` as Size)\n : DEFAULT_SKELETON_HEIGHT;\n\n const width: Size = props.layout === 'flex' ? cardWidth : '100%';\n const height: Size = props.layout === 'flex' || isOnlyOneRow ? cardHeight : '100%';\n\n // first row\n const firstSkeleton = (\n <div class={LOADMORE_STYLE_CLASS}>{getSkeletonsByCount(props.layout, 1, width, height)}</div>\n );\n skeletons.push(firstSkeleton);\n skeletons.push(getSkeletonsByCount(props.layout, firstRowColCount - 1, width, height));\n\n // second row\n if (!isOnlyOneRow) {\n skeletons.push(getSkeletonsByCount(props.layout, props.colCount, width, cardHeight));\n }\n\n return <BaseCardViewSkeletonContainer>{skeletons}</BaseCardViewSkeletonContainer>;\n }\n};\n\nexport const CustomInitialSkeletions = (props: {\n skeletonRenderer: (context: SkeletonRendererContext) => ComponentChildren;\n}) => {\n const context: SkeletonRendererContext = { loadingStatus: 'initial' };\n return (\n <BaseCardViewSkeletonContainer>\n {renderMultipleSkeletons(context, 25, props.skeletonRenderer)}\n </BaseCardViewSkeletonContainer>\n );\n};\n\nexport const CustomLoadMoreSkeletons = (\n props: {\n isRenderAsInitial: boolean;\n skeletonRenderer: (context: SkeletonRendererContext) => ComponentChildren;\n } & SkeletonProps\n) => {\n const skeletons = [];\n if (props.isRenderAsInitial) {\n const context: SkeletonRendererContext = { loadingStatus: 'initial' };\n skeletons.push(<div class={LOADMORE_STYLE_CLASS}>{props.skeletonRenderer(context)}</div>);\n skeletons.push(renderMultipleSkeletons(context, 24, props.skeletonRenderer));\n } else {\n if (props.colCount === 0) {\n return null;\n }\n const cardWidth = `calc(${props.cardWidth}px)` as Size;\n const cardHeight = `calc(${props.cardHeight}px)` as Size;\n const firstRowColCount = props.colCount - (props.totalCount % props.colCount);\n const isOnlyOneRow = firstRowColCount === props.colCount;\n const context: SkeletonRendererContext = {\n loadingStatus: 'loadMore',\n height: props.layout === 'flex' || isOnlyOneRow ? cardHeight : '100%',\n width: props.layout === 'flex' ? cardWidth : '100%'\n };\n skeletons.push(<div class={LOADMORE_STYLE_CLASS}>{props.skeletonRenderer(context)}</div>);\n skeletons.push(\n Array(renderMultipleSkeletons(context, firstRowColCount - 1, props.skeletonRenderer))\n );\n if (!isOnlyOneRow) {\n skeletons.push(renderMultipleSkeletons(context, props.colCount, props.skeletonRenderer));\n }\n }\n return <BaseCardViewSkeletonContainer>{skeletons}</BaseCardViewSkeletonContainer>;\n};\n\nconst renderMultipleSkeletons = (\n context: SkeletonRendererContext,\n count: number,\n skeletonRenderer: (context: SkeletonRendererContext) => ComponentChildren\n) => {\n return Array(count).fill(skeletonRenderer(context));\n};\n","/**\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 */\nimport { Fragment } from 'preact';\nimport { forwardRef, ForwardedRef } from 'preact/compat';\nimport { useRef, useCallback, useEffect, useState, useImperativeHandle } from 'preact/hooks';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { Keys } from '../utils/UNSAFE_keys';\nimport {\n getPrevNextKeyByCount,\n getViewportConfig,\n findElementByKey,\n keyExtractor,\n handleSelectionRange\n} from '../utils/PRIVATE_collectionUtils';\n\nimport { useNavigation } from '../hooks/PRIVATE_useListCommon';\nimport { useSelection, SelectionRangeDetail } from '../hooks/PRIVATE_useSelection';\nimport { ReorderableContext } from '../hooks/PRIVATE_useReorderable';\nimport { ItemContext, SelectionDetail } from '../UNSAFE_Collection';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LoadMoreCollection } from '../PRIVATE_LoadMoreCollection';\nimport { styles } from './themes/BaseCardViewStyles.css';\nimport { Props } from '../UNSAFE_CardFlexView';\nimport { MemoizeBaseCardViewItem } from './BaseCardViewItem';\nimport { BaseCardViewLayout } from './BaseCardViewLayout';\nimport {\n DefaultLoadMoreSkeletons,\n LoadMoreSkeletons,\n InitialLoadSkeletons,\n CustomInitialSkeletions,\n CustomLoadMoreSkeletons\n} from './BaseCardViewSkeleton';\nimport { gutterSizeToPX, emptyKeys, CARDVIEW_ITEM_SELECTOR } from './BaseCardViewUtils';\nimport { useCardViewReorder } from './useCardViewReorder';\n// TODO: add this import due to issue JET-67485, need to update once Stable is introduced\nimport './themes/redwood/BaseCardViewBaseTheme.css';\nimport { useAddBusyState } from '#hooks/PRIVATE_useAddBusyState';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport { classNames } from '#utils/UNSAFE_classNames';\n\n/**\n * Props specific for the GradGridBaseImpl Component\n */\ntype BaseCardViewImplProps<K, D> = Props<K, D> & {\n /**\n * Provide the number of columns to render;\n */\n columns: number;\n /**\n * The layout of the BaseCardView. When we use CardGridView as parent, we will use grid layout;\n * when we use CardFlexView as parent, we will use flex layout.\n */\n layout: 'grid' | 'flex';\n /**\n * Card dimension, including width and height\n */\n cardSize: { width?: number; height?: number };\n /**\n * A callback function to update card dimension, including width and height\n */\n updateCardSize: (width: number, height: number) => void;\n};\n\nconst BaseCardViewImpl = forwardRef(\n <K extends string | number, D>(\n {\n children,\n data,\n onLoadMore = () => {},\n hasMore = false,\n getRowKey,\n currentItemOverride,\n onPersistCurrentItem,\n selectionMode = 'none',\n selectedKeys = emptyKeys as Keys<K>,\n onSelectionChange,\n onReorder,\n viewportConfig,\n focusBehavior = 'card',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n initialAnimation = 'slideUp',\n gutterSize = 'sm',\n columns,\n layout,\n cardSize,\n updateCardSize,\n skeletonRenderer\n }: BaseCardViewImplProps<K, D>,\n ref?: ForwardedRef<HTMLDivElement>\n ) => {\n const rootRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref!, () => rootRef.current!, [rootRef]);\n\n // tracking the anchor key which is used for shift+click selection\n const anchorKey = useRef<K | undefined>();\n\n const gutterSizePX = gutterSizeToPX[gutterSize];\n const layoutProps = { layout, columns, gutterSize };\n\n //setup busy start and busy end callbacks for the initial animation\n const { onBusyStart: onAnimationBusyStart, onBusyEnd: onAnimationBusyEnd } = useAddBusyState(\n 'handling initial animation'\n );\n const isInitialAnimation = useRef(true);\n useEffect(() => {\n if (cardSize.height != undefined && cardSize.width != undefined) {\n isInitialAnimation.current = false;\n }\n }, [cardSize]);\n\n const ariaMultiSelectable = selectionMode === 'none' ? undefined : selectionMode === 'multiple';\n const ariaRowcount = 1;\n const ariaColcount = data ? data.length : -1;\n\n const [isFocusBehaviorValid, setIsFocusBehaviorValid] = useState(true);\n const validFocusBehavior = isFocusBehaviorValid ? focusBehavior : 'card';\n\n // ensure current item is scrolled into view when current item is updated\n // during reordering, enable that during keyboard reordering, disable that during mouse reordering\n const scrollCurrItemIntoView = useRef(false);\n const isReorderEnabled = onReorder != undefined;\n\n const isFetching = useRef(false);\n\n /*****************************************************************************************/\n /*********************** Current Key, Focus Ring and Tabbable Mode ***********************/\n /*****************************************************************************************/\n\n const arrowKeyAndHandlers = {\n ArrowUp: (key?: K) => getPrevNextKeyByCount(data, getRowKey, key, -columns),\n ArrowDown: (key?: K) => getPrevNextKeyByCount(data, getRowKey, key, columns),\n ArrowLeft: (key?: K) => getPrevNextKeyByCount(data, getRowKey, key, -1),\n ArrowRight: (key?: K) => getPrevNextKeyByCount(data, getRowKey, key, 1)\n };\n\n const {\n navigationProps,\n currentKey,\n isCurrentItemOverridden,\n showFocusRing,\n isCurrentTabbableKey\n } = useNavigation(\n data,\n rootRef,\n idExtractor,\n CARDVIEW_ITEM_SELECTOR,\n arrowKeyAndHandlers,\n currentItemOverride,\n onPersistCurrentItem,\n viewportConfig,\n undefined,\n selectionMode !== 'multiple',\n validFocusBehavior === 'card',\n validFocusBehavior === 'card',\n false\n );\n\n /*****************************************************************************************/\n /*************************************** Selection ***************************************/\n /*****************************************************************************************/\n\n const handleSelectionChange = useCallback(\n (detail: SelectionDetail<K>) => {\n if (onSelectionChange) {\n if (detail.value.all === false && detail.value.keys.size > 0) {\n // during regular selection, the last key selected by a user gesture is the anchor key\n anchorKey.current = Array.from(detail.value.keys.values()).pop();\n }\n onSelectionChange(detail);\n }\n },\n [anchorKey, onSelectionChange]\n );\n\n const handleSelectionRangeChange = useCallback(\n (detail: SelectionRangeDetail<K>) => {\n if (data && onSelectionChange) {\n const value = handleSelectionRange(detail, data, getRowKey);\n // for non-virtualized CardView, value should always be an array\n if (Array.isArray(value)) {\n if (detail.eventType === 'shiftSpace') {\n // during range selection by shift+space, the first key selected by a user gesture is the anchor key\n anchorKey.current = detail.value.start;\n } else {\n // during range selection by shift+click/arrow keys, the last key selected by a user gesture is the anchor key\n anchorKey.current = detail.value.end;\n }\n onSelectionChange({ value: { all: false, keys: new Set(value) }, target: null });\n }\n }\n },\n [data, onSelectionChange, getRowKey]\n );\n\n const { selectionProps } = useSelection(\n (element: HTMLElement) => {\n if (element === rootRef.current) {\n return currentKey === undefined ? null : currentKey;\n }\n return keyExtractor(element, CARDVIEW_ITEM_SELECTOR) as K;\n },\n selectedKeys,\n selectionMode,\n false,\n 'toggle',\n handleSelectionChange,\n anchorKey.current,\n currentKey,\n (currentKey: K | undefined, isPrev: boolean) =>\n getPrevNextKeyByCount(data, getRowKey, currentKey, isPrev ? -columns : columns),\n (currentKey: K | undefined, isPrev: boolean) =>\n getPrevNextKeyByCount(data, getRowKey, currentKey, isPrev ? -1 : 1),\n (key: K) => {\n if (rootRef.current) {\n const elem = findElementByKey(rootRef.current, key, CARDVIEW_ITEM_SELECTOR);\n if (elem) {\n elem.scrollIntoView({ block: 'nearest' });\n }\n }\n },\n handleSelectionRangeChange\n );\n\n /*****************************************************************************************/\n /**************************************** Reorder ****************************************/\n /*****************************************************************************************/\n\n const {\n reorderProps,\n reorderItemProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } = useCardViewReorder({\n onReorder,\n gutterSize,\n columns,\n rootRef,\n scrollCurrItemIntoView\n });\n\n const reorderAcc = isReorderEnabled && (\n <>\n <span id={reorderInstructionsId}>\n <HiddenAccessible>{reorderInstructions}</HiddenAccessible>\n </span>\n </>\n );\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // for content focusBehavior, when users tab out, we need to focus back to card grid, to ensure\n // the tabbing order works properly, otherwise the focus might get stuck at the current item\n if (validFocusBehavior === 'content' && event.key === 'Tab') {\n rootRef.current?.focus({ preventScroll: true });\n }\n // during keyboard reordering, the current item should be scrolled into view\n const keyHandlers = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];\n if (\n isReorderEnabled &&\n (event.metaKey || event.ctrlKey) &&\n event.shiftKey &&\n keyHandlers.includes(event.key)\n ) {\n scrollCurrItemIntoView.current = true;\n }\n };\n\n useEffect(() => {\n if (isReorderEnabled && currentKey != null && rootRef.current) {\n const elem = findElementByKey(rootRef.current, currentKey, CARDVIEW_ITEM_SELECTOR);\n // make sure current item is visible during reordering\n // scroll the current item into view only when the current item is updated internally\n if (elem && scrollCurrItemIntoView.current && !isCurrentItemOverridden) {\n elem.scrollIntoView({ block: 'nearest' });\n scrollCurrItemIntoView.current = false;\n }\n }\n // since the currentKey will not change during keyboard reordering,\n // listen to data to ensure cardview scroll into view\n }, [currentKey, data, isReorderEnabled, isCurrentItemOverridden]);\n\n /*****************************************************************************************/\n /************************************* Load More *****************************************/\n /*****************************************************************************************/\n\n const handleLoadMore = useCallback(() => {\n // check isFetching to avoid multiple load more at the same time (details in JET-61117)\n if (!isFetching.current) {\n isFetching.current = true;\n onLoadMore();\n }\n }, [isFetching, onLoadMore]);\n\n useEffect(() => {\n isFetching.current = false;\n // listen to data and hasMore because when one of them gets updated, the fetching is done\n }, [data, hasMore]);\n\n /*****************************************************************************************/\n /************************************ Child Component ************************************/\n /*****************************************************************************************/\n\n const childrenComponent = (context: ItemContext<D>) => {\n const itemKey = getRowKey(context.data);\n const isTabbable = isCurrentTabbableKey(itemKey);\n const isFocused = currentKey === itemKey && !isTabbable;\n const isFocusRingVisible = isFocused && showFocusRing;\n const isLastCard = data ? context.index === data.length - 1 : false;\n return (\n <MemoizeBaseCardViewItem<K, D>\n key={itemKey}\n itemKey={itemKey}\n isCurrentKey={currentKey === itemKey}\n itemData={context.data}\n itemIndex={context.index}\n isTabbable={isTabbable}\n isFocused={isFocused}\n isFocusRingVisible={isFocusRingVisible}\n isGridLayout={layout === 'grid'}\n selectedKeys={selectedKeys}\n selectionMode={selectionMode}\n onSelectionChange={onSelectionChange}\n focusBehavior={validFocusBehavior}\n {...(context.index === 0 && isInitialAnimation.current && { onAnimationBusyStart })}\n {...(isLastCard && isInitialAnimation.current && { onAnimationBusyEnd })}\n {...(focusBehavior === 'content' && { setIsFocusBehaviorValid })}\n {...(isInitialAnimation.current && { initialAnimation })}\n {...(context.index === 0 && !cardSize.width && { updateCardSize })}\n {...(isReorderEnabled && { reorderItemProps })}>\n {children}\n </MemoizeBaseCardViewItem>\n );\n };\n\n // todo: issue track in JET-57952, need a way to show the skeletons in keyboard navigation\n const skeletons = data ? (\n !data.length && hasMore ? (\n skeletonRenderer ? (\n <CustomLoadMoreSkeletons\n layout={layout}\n colCount={columns}\n totalCount={data.length}\n cardWidth={cardSize.width}\n cardHeight={cardSize.height}\n isRenderAsInitial={true}\n skeletonRenderer={skeletonRenderer}\n />\n ) : (\n <DefaultLoadMoreSkeletons layout={layout} />\n )\n ) : skeletonRenderer ? (\n <CustomLoadMoreSkeletons\n layout={layout}\n colCount={columns}\n totalCount={data.length}\n cardWidth={cardSize.width}\n cardHeight={cardSize.height}\n isRenderAsInitial={false}\n skeletonRenderer={skeletonRenderer}\n />\n ) : (\n <LoadMoreSkeletons\n layout={layout}\n colCount={columns}\n totalCount={data.length}\n cardWidth={cardSize.width}\n cardHeight={cardSize.height}\n />\n )\n ) : null;\n\n viewportConfig = getViewportConfig(rootRef, viewportConfig);\n const collectionComponent = (\n <div role=\"row\">\n <BaseCardViewLayout {...layoutProps}>\n <LoadMoreCollection\n data={data}\n hasMore={hasMore}\n onLoadMore={handleLoadMore}\n loadMoreIndicator={skeletons}\n loadMoreThreshold={gutterSizePX + 4} // gap size + padding\n viewportConfig={viewportConfig}>\n {childrenComponent}\n </LoadMoreCollection>\n </BaseCardViewLayout>\n </div>\n );\n\n const initialLoadSkeletons = (\n <BaseCardViewLayout {...layoutProps}>\n {skeletonRenderer ? (\n <CustomInitialSkeletions skeletonRenderer={skeletonRenderer} />\n ) : (\n <InitialLoadSkeletons layout={layout} />\n )}\n </BaseCardViewLayout>\n );\n const allowBrowserContextMenu = !(\n getClientHints().platform === 'ios' || getClientHints().platform === 'android'\n );\n\n const classArray = [styles.baseStyle];\n if (!allowBrowserContextMenu) {\n classArray.push(styles.userSelect);\n }\n const classes = classNames(classArray);\n\n return (\n <div\n {...mergeProps(navigationProps, selectionProps, reorderProps, {\n onKeyDown: handleKeyDown\n })}\n ref={rootRef}\n role=\"grid\"\n class={classes}\n tabIndex={0}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={\n isReorderEnabled ? reorderInstructionsId + ' ' + ariaDescribedBy : ariaDescribedBy\n }\n aria-multiselectable={ariaMultiSelectable}\n aria-rowcount={ariaRowcount}\n aria-colcount={ariaColcount}>\n <ReorderableContext.Provider value={reorderContext}>\n {!data ? (\n initialLoadSkeletons\n ) : data.length || hasMore ? (\n collectionComponent\n ) : (\n <Fragment />\n )}\n </ReorderableContext.Provider>\n {reorderAcc}\n </div>\n );\n }\n);\n\nconst idExtractor = (elem: Element) => elem.id;\n\n/**\n * Props specific for the BaseCardView\n */\ntype BaseCardViewProps<K, D> = BaseCardViewImplProps<K, D> & {\n ref?: ForwardedRef<HTMLDivElement>;\n};\n\n/**\n * Cast BaseCardViewImpl to generic type, because BaseCardViewImpl would infer the generic type to specific type,\n * i.e infer <K extends string | number, D> to <string | number, unknown>, which will cause type issues in the parent component\n */\nexport const BaseCardView = BaseCardViewImpl as <K extends string | number, D>(\n props: BaseCardViewProps<K, D>\n) => JSX.Element;\n","import type { RefObject } from 'preact';\nimport { useState } from 'preact/hooks';\nimport { dragToScroll } from '../utils/PRIVATE_collectionUtils';\nimport { useReorderable } from '../hooks/PRIVATE_useReorderable';\nimport { Props } from '../UNSAFE_CardFlexView';\nimport { CARDVIEW_ITEM_SELECTOR, GutterSize } from './BaseCardViewUtils';\n\ntype useCardViewReorderProps<K, D> = Pick<Props<K, D>, 'onReorder'> & {\n gutterSize: GutterSize;\n columns: number;\n rootRef: RefObject<HTMLDivElement>;\n scrollCurrItemIntoView: RefObject<boolean>;\n};\n\nexport const useCardViewReorder = <K extends string | number, D>({\n onReorder,\n gutterSize,\n columns,\n rootRef,\n scrollCurrItemIntoView\n}: useCardViewReorderProps<K, D>) => {\n const isReorderEnabled = onReorder != undefined;\n\n const [dragKey, setDragKey] = useState<K | undefined>(undefined);\n const { reorderProps, reorderContext, reorderInstructionsId, reorderInstructions } =\n useReorderable({\n onReorder,\n rootRef,\n itemSelector: CARDVIEW_ITEM_SELECTOR,\n isDisabled: !isReorderEnabled,\n columns\n });\n\n if (!isReorderEnabled) {\n return {\n reorderProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } as const;\n }\n\n const handleDragOver = (event: DragEvent) => {\n dragToScroll(event, dragKey !== undefined, rootRef.current);\n // during mouse reordering, the drag item might not be the same as current item,\n // so we should disallow current item scroll into view\n scrollCurrItemIntoView.current = false;\n };\n\n const reorderEventProps = { ...reorderProps, onDragOver: handleDragOver };\n\n const reorderItemProps = {\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n gutterSize,\n columns\n };\n\n return {\n reorderProps: reorderEventProps,\n reorderItemProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } as const;\n};\n"],"names":["CARDVIEW_ITEM_SELECTOR","emptyKeys","all","keys","Set","gutterSizeToPX","xs","sm","md","lg","xl","BaseCardViewReorderableItem","children","itemKey","itemIndex","isCurrentKey","dragKey","setDragKey","onReorder","rootRef","gutterSize","columns","itemRef","useRef","isOneColumn","isFirstColumn","isLastColumn","variantClasses","multiVariantStyles","itemOverlayFront","variantClassesVertical","itemOverlayFrontVertical","itemStyles","itemOverlayRear","styles","itemOverlayRearVertical","itemDragger","getItem","useCallback","current","closest","setTransferData","event","dataTransfer","setData","JSON","stringify","rootProps","isDragged","overlayZoneBeforeProps","overlayZoneAfterProps","useReorderableItem","isDisabled","ref","itemSelector","isVertical","currentItemKey","useReorderableContext","useEffect","direction","useUser","isRtl","overlayZoneBeforeClass","classNames","class","itemOverlayFrontEdge","overlayZoneAfterClass","itemOverlayRearEdge","_jsxs","isKeyDefined","_Fragment","_jsx","jsx","animationConfigSlide","index","animationStates","slideUp","from","translateY","to","options","duration","delay","easing","slideDown","isAnimatedOnMount","animationConfigOpacity","timeoutRef","onAnimationBusyEnd","opacity","onAnimationEnd","clearTimeout","MemoizeBaseCardViewItem","memo","itemData","isTabbable","isFocused","isFocusRingVisible","selectedKeys","selectionMode","onSelectionChange","focusBehavior","setIsFocusBehaviorValid","initialAnimation","isGridLayout","updateCardSize","reorderItemProps","onAnimationBusyStart","isItemFocused","itemFocused","itemInitialOpacity","itemInGridLayout","classes","itemStyle","handleResize","entry","contentRect","width","height","nullRef","useResizeObserver","useLayoutEffect","content","firstElementChild","focusable","allTabbableElements","length","warn","focus","nodeRef","nodeRefSlide","controller","controllerSlide","useAnimation","nodeRefOpacity","controllerOpacity","undefined","setTimeout","cancel","style","itemRefs","useMemo","mergeRefs","rendererContext","getItemContext","data","metadata","key","childrenComponent","id","useId","role","onKeyDown","stopPropagation","containsKey","TabbableModeContext","Provider","value","FocusTrap","restoreFocusRef","prev","next","isSameKey","props1","props2","BaseCardViewLayout","layout","gap","cardViewVars","Grid","gridTemplateColumns","Flex","wrap","BaseCardViewSkeletonContainer","isVisible","setIsVisible","useState","Fragment","LOADMORE_STYLE_CLASS","getSkeletonsByCount","count","isUnique","sw","sh","Array","map","_v","i","Skeleton","borderRadius","Date","getTime","InitialLoadSkeletons","props","DefaultLoadMoreSkeletons","skeletons","DEFAULT_SKELETON_NUMBER","InvisibleSkeletons","LoadMoreSkeletons","colCount","cardWidth","cardHeight","firstRowColCount","totalCount","isOnlyOneRow","firstSkeleton","push","CustomInitialSkeletions","renderMultipleSkeletons","loadingStatus","skeletonRenderer","CustomLoadMoreSkeletons","isRenderAsInitial","context","fill","BaseCardViewImpl","forwardRef","onLoadMore","hasMore","getRowKey","currentItemOverride","onPersistCurrentItem","viewportConfig","ariaLabel","ariaLabelledBy","ariaDescribedBy","cardSize","useImperativeHandle","anchorKey","gutterSizePX","layoutProps","onBusyStart","onBusyEnd","useAddBusyState","isInitialAnimation","ariaMultiSelectable","ariaColcount","isFocusBehaviorValid","validFocusBehavior","scrollCurrItemIntoView","isReorderEnabled","isFetching","arrowKeyAndHandlers","ArrowUp","getPrevNextKeyByCount","ArrowDown","ArrowLeft","ArrowRight","navigationProps","currentKey","isCurrentItemOverridden","showFocusRing","isCurrentTabbableKey","useNavigation","idExtractor","handleSelectionChange","detail","size","values","pop","handleSelectionRangeChange","handleSelectionRange","isArray","eventType","start","end","target","selectionProps","useSelection","element","keyExtractor","isPrev","elem","findElementByKey","scrollIntoView","block","reorderProps","reorderContext","reorderInstructionsId","reorderInstructions","useReorderable","onDragOver","dragToScroll","useCardViewReorder","reorderAcc","HiddenAccessible","handleLoadMore","getViewportConfig","collectionComponent","LoadMoreCollection","loadMoreIndicator","loadMoreThreshold","isLastCard","initialLoadSkeletons","allowBrowserContextMenu","getClientHints","platform","classArray","baseStyle","userSelect","mergeProps","preventScroll","metaKey","ctrlKey","shiftKey","includes","tabIndex","ReorderableContext","BaseCardView","gapWidth","rootWidth","Math","floor","max"],"mappings":"ykCAKO,MAAMA,EAAyB,sBAEzBC,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UAJY,CAAC,YAAa,aAAc,UAAW,aAK7CC,SAASvQ,EAAMyG,OAE3B4F,GAAuBxM,SAAU,EAClC,IAoJCc,IAAKlC,EACLoI,KAAK,OACLvF,MAAOgD,GACPkM,SAAU,EAAC,aACCnF,EACK,kBAAAC,EAEf,mBAAAgB,GAAmBsC,GAAwB,IAAMrD,EAAkBA,EAE/C,uBAAAU,mBAtTL,EAuTU,gBACZC,GACfhO,SAAA,CAAA2D,EAAAC,IAAC2O,qBAAmBvJ,SAAS,CAAAC,MAAOwH,GAAczQ,SAC9CqI,EAEEA,EAAKnB,QAAU4F,KAGjBnJ,MAAC0G,EAAAA,aAJD,KAOH2G,KAEH,IAIA9B,GAAekB,GAAkBA,EAAK3H,GAa/B+J,GAAe7F,kCNhbD,CAAC8F,EAAkB7G,EAAoB8G,KAChE,IAAK9G,IAAc8G,EAAW,OAAO,EAGrC,MAAM/G,EAAWgH,KAAKC,OAAOF,EAAYD,IAAaA,EAAW7G,IACjE,OAAO+G,KAAKE,IAAI,EAAGlH,EAAS"}
1
+ {"version":3,"file":"BaseCardView-16fda4c3.js","sources":["../../src/PRIVATE_BaseCardView/BaseCardViewUtils.ts","../../src/PRIVATE_BaseCardView/BaseCardViewReorderableItem.tsx","../../src/PRIVATE_BaseCardView/BaseCardViewItem.tsx","../../src/PRIVATE_BaseCardView/BaseCardViewLayout.tsx","../../src/PRIVATE_BaseCardView/BaseCardViewSkeletonContainer.tsx","../../src/PRIVATE_BaseCardView/BaseCardViewSkeleton.tsx","../../src/PRIVATE_BaseCardView/BaseCardView.tsx","../../src/PRIVATE_BaseCardView/useCardViewReorder.ts"],"sourcesContent":["import { Size } from '../utils/UNSAFE_size';\n\n/**\n * Item selector for CardView components\n */\nexport const CARDVIEW_ITEM_SELECTOR = '[data-oj-card-item]';\n\nexport const emptyKeys = { all: false, keys: new Set() };\nexport type GutterSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * A mapping of gutterSize to concrete size in pixels\n */\nexport const gutterSizeToPX: Record<string, number> = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 48,\n xl: 64\n};\n\nexport const getGapSize = (gutterSize?: GutterSize) => {\n const px = gutterSizeToPX[gutterSize || 'sm'];\n const gap = `${px / 4}x` as Size;\n return gap;\n};\n\nexport const getColCount = (gapWidth: number, cardWidth?: number, rootWidth?: number) => {\n if (!cardWidth || !rootWidth) return 0;\n\n // if we have n cards, we have n-1 gaps\n const colCount = Math.floor((rootWidth + gapWidth) / (gapWidth + cardWidth));\n return Math.max(1, colCount);\n};\n","import { useRef, useCallback, useEffect } from 'preact/hooks';\nimport { useReorderableItem } from '../hooks/PRIVATE_useReorderable';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { ReorderableItemProps } from '../UNSAFE_Collection/Reorderable.types';\nimport { multiVariantStyles, styles } from './themes/BaseCardViewStyles.css';\nimport { CARDVIEW_ITEM_SELECTOR, GutterSize } from './BaseCardViewUtils';\nimport { useReorderableContext } from '#hooks/PRIVATE_useReorderable/useReorderableContext';\nimport { isKeyDefined } from '../utils/UNSAFE_keys';\n\ntype BaseItemProps<K> = {\n itemKey: K;\n itemIndex: number;\n isCurrentKey: boolean;\n};\n\nexport type BaseCardViewReorderableItemProps<K> = ReorderableItemProps<K> & {\n gutterSize: GutterSize;\n columns: number;\n};\n\n/**\n * The internal component used to render a reorderable item in CardView.\n */\nexport function BaseCardViewReorderableItem<K extends string | number>({\n children,\n itemKey,\n itemIndex,\n isCurrentKey,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n gutterSize,\n columns\n}: BaseCardViewReorderableItemProps<K> & BaseItemProps<K>) {\n const itemRef = useRef<HTMLDivElement | null>(null);\n const isOneColumn = columns === 1;\n const isFirstColumn = itemIndex % columns === 0;\n const isLastColumn = itemIndex % columns === columns - 1;\n const variantClasses = multiVariantStyles({\n itemOverlayFront: gutterSize\n });\n const variantClassesVertical = multiVariantStyles({\n itemOverlayFrontVertical: gutterSize\n });\n const itemStyles = {\n itemOverlayFront: isOneColumn ? variantClassesVertical : variantClasses,\n itemOverlayRear: isOneColumn ? styles.itemOverlayRearVertical : styles.itemOverlayRear,\n itemDragger: styles.itemDragger\n };\n const getItem = useCallback(\n () => itemRef?.current?.closest(CARDVIEW_ITEM_SELECTOR) as HTMLElement,\n []\n );\n const setTransferData = useCallback(\n (event: DragEvent) => {\n event.dataTransfer?.setData('text/cardview-items-key', JSON.stringify(itemKey));\n },\n [itemKey]\n );\n const { rootProps, isDragged, overlayZoneBeforeProps, overlayZoneAfterProps } =\n useReorderableItem({\n isDisabled: onReorder ? false : true,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n ref: itemRef,\n getItem,\n setTransferData,\n itemStyles,\n itemSelector: CARDVIEW_ITEM_SELECTOR,\n isVertical: isOneColumn\n });\n\n // TODO: remove this as part of JET-70023\n const { currentItemKey } = useReorderableContext();\n useEffect(() => {\n if (isCurrentKey) {\n currentItemKey.current = itemKey;\n }\n }, [isCurrentKey, itemKey, currentItemKey]);\n\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n\n const overlayZoneBeforeClass = classNames([\n overlayZoneBeforeProps?.class,\n !isOneColumn && !isRtl && isFirstColumn && styles.itemOverlayFrontEdge,\n !isOneColumn && isRtl && isLastColumn && styles.itemOverlayFrontEdge\n ]);\n\n const overlayZoneAfterClass = classNames([\n overlayZoneAfterProps?.class,\n !isOneColumn && !isRtl && isLastColumn && styles.itemOverlayRearEdge,\n !isOneColumn && isRtl && isFirstColumn && styles.itemOverlayRearEdge\n ]);\n\n return (\n <div {...rootProps}>\n {children}\n {!isDragged && isKeyDefined(dragKey) && (\n <>\n <div {...overlayZoneBeforeProps} class={overlayZoneBeforeClass}></div>\n <div {...overlayZoneAfterProps} class={overlayZoneAfterClass}></div>\n </>\n )}\n </div>\n );\n}\n","/**\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 */\nimport { ComponentChildren } from 'preact';\nimport { memo } from 'preact/compat';\nimport {\n useRef,\n useCallback,\n useLayoutEffect,\n useMemo,\n useEffect,\n StateUpdater,\n Dispatch,\n MutableRef\n} from 'preact/hooks';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { mergeRefs } from '../utils/PRIVATE_refUtils';\nimport { warn } from '../utils/UNSAFE_logger';\nimport { allTabbableElements } from '../utils/PRIVATE_tabbableUtils';\nimport { useId } from '../hooks/UNSAFE_useId';\nimport { useAnimation, UseAnimationConfig } from '../hooks/UNSAFE_useAnimation';\nimport { useResizeObserver } from '../hooks/UNSAFE_useResizeObserver';\nimport { TabbableModeContext } from '../hooks/UNSAFE_useTabbableMode';\nimport { FocusTrap } from '../UNSAFE_FocusTrap';\nimport { SelectionMode, ListItemRendererContext, SelectionDetail } from '../UNSAFE_Collection';\nimport { multiVariantStyles, styles } from './themes/BaseCardViewStyles.css';\nimport {\n BaseCardViewReorderableItem,\n BaseCardViewReorderableItemProps\n} from './BaseCardViewReorderableItem';\nimport { containsKey, isSameKey, Keys } from '../utils/UNSAFE_keys';\nimport { getItemContext } from '../utils/PRIVATE_collectionUtils';\n\n/**\n * Props for the BaseCardViewItem Component\n */\nexport type Props<K, D> = {\n children: (context: ListItemRendererContext<K, D>) => ComponentChildren;\n itemKey: K;\n itemData: D;\n itemIndex: number;\n isTabbable: boolean;\n isCurrentKey: boolean;\n isFocused: boolean;\n isFocusRingVisible: boolean;\n selectedKeys: Keys<K>;\n selectionMode: SelectionMode;\n onSelectionChange?: (detail: SelectionDetail<K>) => void;\n focusBehavior: 'card' | 'content';\n setIsFocusBehaviorValid?: Dispatch<StateUpdater<boolean>>;\n initialAnimation?: 'slideUp' | 'slideDown';\n isGridLayout?: boolean;\n updateCardSize?: (width: number, height: number) => void;\n onAnimationBusyStart?: () => void;\n onAnimationBusyEnd?: () => void;\n} & {\n reorderItemProps?: Omit<BaseCardViewReorderableItemProps<K>, 'children'>;\n};\n\n/**\n * The internal component used to render a single item in CardView.\n */\nfunction BaseCardViewItem<K extends string | number, D>({\n children,\n itemKey,\n itemData,\n itemIndex,\n isTabbable,\n isCurrentKey,\n isFocused,\n isFocusRingVisible,\n selectedKeys,\n selectionMode,\n onSelectionChange,\n focusBehavior,\n setIsFocusBehaviorValid,\n initialAnimation,\n isGridLayout,\n updateCardSize,\n reorderItemProps,\n onAnimationBusyStart,\n onAnimationBusyEnd\n}: Props<K, D>) {\n const rootRef = useRef<HTMLDivElement>(null);\n const timeoutRef = useRef<ReturnType<typeof setTimeout>>();\n\n const isItemFocused = isFocused && isFocusRingVisible;\n const variantClasses = multiVariantStyles({\n itemFocused: focusBehavior === 'card' && isItemFocused ? 'isItemFocused' : 'isNotItemFocused',\n itemInitialOpacity: initialAnimation ? 'isTransparent' : 'isNotTransparent',\n itemInGridLayout: isGridLayout ? 'isInGridLayout' : 'isNotInGridLayout'\n });\n const classes = classNames([styles.itemStyle, variantClasses]);\n\n /*********************************** Tabbable Mode ***********************************/\n\n // don't bubble Arrow Up/Down/Left/Right events to parent when in isTabbable mode\n // this bubbling causes the outer CollectionFocus ring to change index while in the isTabbable mode.\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n focusBehavior === 'card' &&\n isTabbable &&\n (event.key === 'ArrowDown' ||\n event.key === 'ArrowUp' ||\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight')\n ) {\n event.stopPropagation();\n }\n };\n\n /************************************ Card Size ************************************/\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n updateCardSize?.(entry.contentRect.width, entry.contentRect.height);\n },\n [updateCardSize]\n );\n\n const nullRef = useRef<HTMLDivElement>(null);\n useResizeObserver(updateCardSize ? rootRef : nullRef, handleResize);\n\n /********************************* Focus Behavior *********************************/\n\n useLayoutEffect(() => {\n if (focusBehavior === 'content' && isItemFocused) {\n // rootRef is cardview item, its first child is the focus trap div, so its first grand child\n // is the actual content\n const content = rootRef.current?.firstElementChild?.firstElementChild as HTMLElement;\n const focusable = allTabbableElements(content, true, true);\n if (focusable.length === 0 || focusable.length > 1) {\n warn(\n `${focusable.length} focusable elements are detected in the card. 'content' focusBehavior is intended only for use when the card has single focusable element. Please specify one focusable element in the card or switch the focusBehavior to 'card'.`\n );\n setIsFocusBehaviorValid?.(false);\n } else {\n focusable[0].focus();\n }\n }\n }, [focusBehavior, isItemFocused, setIsFocusBehaviorValid]);\n\n /******************************** Initial Animation ********************************/\n\n // animation for slide up/down\n const { nodeRef: nodeRefSlide, controller: controllerSlide } = useAnimation<\n 'slideUp' | 'slideDown' | 'none',\n HTMLDivElement\n >(initialAnimation || 'none', animationConfigSlide(itemIndex));\n\n // animation for opacity change\n const { nodeRef: nodeRefOpacity, controller: controllerOpacity } = useAnimation<\n 'opacity' | 'none',\n HTMLDivElement\n >(\n (initialAnimation && 'opacity') || 'none',\n animationConfigOpacity(itemIndex, timeoutRef, onAnimationBusyEnd)\n );\n\n if (initialAnimation) {\n onAnimationBusyStart?.();\n }\n\n // max cap for animation is 1s\n useEffect(() => {\n if (initialAnimation !== undefined) {\n timeoutRef.current = setTimeout(() => {\n controllerSlide.cancel();\n controllerOpacity.cancel();\n if (rootRef.current) {\n rootRef.current.style.opacity = '1';\n }\n onAnimationBusyEnd?.();\n }, 1000);\n }\n }, [controllerOpacity, controllerSlide, initialAnimation, onAnimationBusyEnd]);\n\n // TODO: issue track in JET-57681, we currently have two useAnimation() because the opacity and\n // slide up/down have different durations, and the current API couldn't handle this case, we will\n // update this once the API is updated\n\n /********************************** Child Component **********************************/\n const itemRefs = useMemo(() => {\n // NOTE: spot an issue when we click the cards during animation is processing, the cards would not finish\n // the current animations and stay as what it is, e.g. leave itself as half transparent.\n // need to remove nodeRefSlide and nodeRefOpacity to avoid this issue.\n if (initialAnimation === undefined) {\n return mergeRefs(rootRef);\n }\n return mergeRefs(rootRef, nodeRefSlide, nodeRefOpacity);\n }, [rootRef, nodeRefSlide, nodeRefOpacity, initialAnimation]);\n\n const rendererContext = getItemContext<K, D>(\n { data: { data: itemData, metadata: { key: itemKey } }, index: itemIndex },\n selectedKeys,\n selectionMode === 'multiple',\n onSelectionChange\n );\n\n const childrenComponent = reorderItemProps ? (\n <BaseCardViewReorderableItem\n {...reorderItemProps}\n itemKey={itemKey}\n itemIndex={itemIndex}\n isCurrentKey={isCurrentKey}>\n {children(rendererContext)}\n </BaseCardViewReorderableItem>\n ) : (\n children(rendererContext)\n );\n\n return (\n <div\n id={useId()}\n ref={itemRefs}\n class={classes}\n role=\"gridcell\"\n data-oj-card-item=\"\"\n data-oj-key={itemKey}\n onKeyDown={handleKeyDown}\n aria-selected={selectionMode === 'none' ? undefined : containsKey(selectedKeys, itemKey)}\n {...(typeof itemKey === 'number' && { 'data-oj-key-type': 'number' })}>\n <TabbableModeContext.Provider value={{ isTabbable }}>\n <FocusTrap isDisabled={!isTabbable} restoreFocusRef={false}>\n {childrenComponent}\n </FocusTrap>\n </TabbableModeContext.Provider>\n </div>\n );\n}\n\nconst animationConfigSlide = (\n index: number\n): UseAnimationConfig<'slideUp' | 'slideDown' | 'none', HTMLDivElement> => {\n return {\n animationStates: {\n slideUp: {\n from: {\n translateY: '50px'\n },\n to: {\n translateY: '0px'\n },\n options: {\n duration: 300,\n delay: index * 50,\n easing: [0, 0, 0.2, 1]\n }\n },\n slideDown: {\n from: {\n translateY: '-50px'\n },\n to: {\n translateY: '0'\n },\n options: {\n duration: 300,\n delay: index * 50,\n easing: [0, 0, 0.2, 1]\n }\n }\n },\n isAnimatedOnMount: true\n };\n};\n\nconst animationConfigOpacity = (\n index: number,\n timeoutRef: MutableRef<ReturnType<typeof setTimeout> | undefined>,\n onAnimationBusyEnd?: () => void\n): UseAnimationConfig<'opacity' | 'none', HTMLDivElement> => {\n return {\n animationStates: {\n opacity: {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n },\n options: {\n duration: 150,\n delay: index * 50,\n easing: 'linear'\n }\n }\n },\n isAnimatedOnMount: true,\n onAnimationEnd: () => {\n onAnimationBusyEnd?.();\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n }\n };\n};\n\n/**\n * Compare the equality between two reorderItemProps, especially useful for memoized items\n */\nconst _compareReorderItemProps = (\n props1: Props<string | number, unknown>['reorderItemProps'],\n props2: Props<string | number, unknown>['reorderItemProps']\n) => {\n return (\n props1?.['dragKey'] === props2?.['dragKey'] &&\n props1?.['setDragKey'] === props2?.['setDragKey'] &&\n props1?.['columns'] === props2?.['columns'] &&\n props1?.['gutterSize'] === props2?.['gutterSize'] &&\n props1?.['rootRef'] === props2?.['rootRef']\n );\n};\n\nexport const MemoizeBaseCardViewItem = memo(\n BaseCardViewItem,\n (prev: Props<string | number, unknown>, next: Props<string | number, unknown>) => {\n if (prev && next) {\n return (\n prev.children === next.children &&\n prev.itemKey === next.itemKey &&\n prev.itemData === next.itemData &&\n prev.itemIndex === next.itemIndex &&\n prev.isTabbable === next.isTabbable &&\n prev.isCurrentKey === next.isCurrentKey &&\n prev.isFocused === next.isFocused &&\n prev.isFocusRingVisible === next.isFocusRingVisible &&\n prev.initialAnimation === next.initialAnimation &&\n prev.focusBehavior === next.focusBehavior &&\n isSameKey(prev.selectedKeys, next.selectedKeys) &&\n prev.selectionMode === next.selectionMode &&\n prev.onSelectionChange === next.onSelectionChange &&\n prev.setIsFocusBehaviorValid === next.setIsFocusBehaviorValid &&\n prev.isGridLayout === next.isGridLayout &&\n prev.updateCardSize === next.updateCardSize &&\n prev.onAnimationBusyStart === next.onAnimationBusyStart &&\n prev.onAnimationBusyEnd === next.onAnimationBusyEnd &&\n _compareReorderItemProps(prev.reorderItemProps, next.reorderItemProps)\n );\n }\n return false;\n }\n);\n","import { ComponentChildren } from 'preact';\nimport { Grid } from '../UNSAFE_Grid';\nimport { Flex } from '../UNSAFE_Flex';\nimport { GutterSize } from './BaseCardViewUtils';\nimport { cardViewVars } from './themes/BaseCardViewContract.css';\n\ntype Props = {\n children: ComponentChildren;\n layout: 'grid' | 'flex';\n gutterSize: GutterSize;\n columns: number;\n};\n\nexport function BaseCardViewLayout({ children, layout, gutterSize, columns }: Props) {\n const gap = cardViewVars.gutterSize[gutterSize];\n if (layout === 'grid') {\n return columns < 1 ? null : (\n <Grid gridTemplateColumns={`repeat(${columns}, 1fr)`} gap={gap}>\n {children}\n </Grid>\n );\n } else {\n return (\n <Flex wrap=\"wrap\" gap={gap}>\n {children}\n </Flex>\n );\n }\n}\n","/**\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 */\nimport { ComponentChildren, Fragment } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport { LOADMORE_STYLE_CLASS } from '../PRIVATE_LoadMoreCollection';\n\ntype Props = {\n /**\n * Allows to pass skeletons\n **/\n children: ComponentChildren;\n};\n\n/**\n * Allows to specify the time delay for rendering the component\n **/\nconst timerValue = 50;\n\n/**\n * BaseCardViewSkeletonContainer renders skeletons after 50ms threshold defined in the Redwood spec\n **/\nexport function BaseCardViewSkeletonContainer({ children }: Props) {\n const [isVisible, setIsVisible] = useState(false);\n\n useEffect(() => {\n setTimeout(() => {\n setIsVisible(true);\n }, timerValue);\n }, []);\n\n return isVisible ? <Fragment>{children}</Fragment> : <div class={LOADMORE_STYLE_CLASS}></div>;\n}\n","import { Size } from '../utils/UNSAFE_size';\nimport { Skeleton } from '../UNSAFE_Skeleton';\nimport { LOADMORE_STYLE_CLASS } from '../PRIVATE_LoadMoreCollection';\nimport { BaseCardViewSkeletonContainer } from './BaseCardViewSkeletonContainer';\nimport { SkeletonRendererContext } from '../UNSAFE_CardFlexView';\nimport { ComponentChildren } from 'preact';\n\nconst DEFAULT_SKELETON_NUMBER = 25;\nconst DEFAULT_SKELETON_WIDTH = '80x';\nconst DEFAULT_SKELETON_HEIGHT = '85x';\n\ntype SkeletonProps = {\n layout: 'flex' | 'grid';\n colCount: number;\n totalCount: number;\n cardWidth?: number;\n cardHeight?: number;\n};\n\n/**\n * A function that returns an array of skeletons based on count\n * @param count the number of skeletons\n */\nconst getSkeletonsByCount = (\n layout: 'flex' | 'grid',\n count = DEFAULT_SKELETON_NUMBER,\n width?: Size,\n height?: Size,\n isUnique = true\n) => {\n const sw = width || (layout === 'flex' ? DEFAULT_SKELETON_WIDTH : '100%');\n const sh = height || DEFAULT_SKELETON_HEIGHT;\n\n return [...Array(count)].map((_v, i) => (\n // create unique keys if needed, otherwise the animations won't start at the same time, because the old copy of skeletons\n // could be reused, even the key is specified by useId(), combine count with time to make the key unique.\n <Skeleton\n key={isUnique && `${i}${new Date().getTime()}`}\n width={sw}\n height={sh}\n borderRadius=\"6px\"\n />\n ));\n};\n\n/**\n * When there is no data (i.e. data is an empty array or null, and hasMore is false), we will show 25 card skeletons with default size\n */\nexport const InitialLoadSkeletons = (props: { layout: SkeletonProps['layout'] }) => (\n <BaseCardViewSkeletonContainer>{getSkeletonsByCount(props.layout)}</BaseCardViewSkeletonContainer>\n);\n\n/**\n * When we are fetching the initial data (i.e. data is an empty array, and hasMore is true), we will show 25 card skeletons with default size,\n * because we don't know the card dimension at this time. Since there is more data to load, we will specify LOADMORE_STYLE_CLASS on skeletons\n */\nexport const DefaultLoadMoreSkeletons = (props: { layout: SkeletonProps['layout'] }) => {\n const firstSkeleton = (\n <div class={LOADMORE_STYLE_CLASS}>{getSkeletonsByCount(props.layout, 1)}</div>\n );\n const otherSkeletons = getSkeletonsByCount(props.layout, DEFAULT_SKELETON_NUMBER - 1);\n const skeletons = [firstSkeleton, ...otherSkeletons];\n return <BaseCardViewSkeletonContainer>{skeletons}</BaseCardViewSkeletonContainer>;\n};\n\n/**\n * During the render that we measure and update card dimension, we will hide skeletons temporarily\n * to avoid showing incorrect skeletons\n */\nconst InvisibleSkeletons = () => {\n return <div class={LOADMORE_STYLE_CLASS}></div>;\n};\n\nexport const LoadMoreSkeletons = (props: SkeletonProps) => {\n if (props.colCount < 1 || props.cardWidth == null || props.cardHeight == null) {\n // if column count / card width / card height are invalid, we will show the invisible skeletons\n return <InvisibleSkeletons />;\n } else {\n // after initial renders, show skeletons with correct dimension and count\n const skeletons = [];\n\n const firstRowColCount = props.colCount - (props.totalCount % props.colCount);\n const isOnlyOneRow = firstRowColCount === props.colCount;\n\n const cardWidth = `calc(${props.cardWidth}px)` as Size;\n const cardHeight = props.cardHeight\n ? (`calc(${props.cardHeight}px)` as Size)\n : DEFAULT_SKELETON_HEIGHT;\n\n const width: Size = props.layout === 'flex' ? cardWidth : '100%';\n const height: Size = props.layout === 'flex' || isOnlyOneRow ? cardHeight : '100%';\n\n // first row\n const firstSkeleton = (\n <div class={LOADMORE_STYLE_CLASS}>{getSkeletonsByCount(props.layout, 1, width, height)}</div>\n );\n skeletons.push(firstSkeleton);\n skeletons.push(getSkeletonsByCount(props.layout, firstRowColCount - 1, width, height));\n\n // second row\n if (!isOnlyOneRow) {\n skeletons.push(getSkeletonsByCount(props.layout, props.colCount, width, cardHeight));\n }\n\n return <BaseCardViewSkeletonContainer>{skeletons}</BaseCardViewSkeletonContainer>;\n }\n};\n\nexport const CustomInitialSkeletions = (props: {\n skeletonRenderer: (context: SkeletonRendererContext) => ComponentChildren;\n}) => {\n const context: SkeletonRendererContext = { loadingStatus: 'initial' };\n return (\n <BaseCardViewSkeletonContainer>\n {renderMultipleSkeletons(context, 25, props.skeletonRenderer)}\n </BaseCardViewSkeletonContainer>\n );\n};\n\nexport const CustomLoadMoreSkeletons = (\n props: {\n isRenderAsInitial: boolean;\n skeletonRenderer: (context: SkeletonRendererContext) => ComponentChildren;\n } & SkeletonProps\n) => {\n const skeletons = [];\n if (props.isRenderAsInitial) {\n const context: SkeletonRendererContext = { loadingStatus: 'initial' };\n skeletons.push(<div class={LOADMORE_STYLE_CLASS}>{props.skeletonRenderer(context)}</div>);\n skeletons.push(renderMultipleSkeletons(context, 24, props.skeletonRenderer));\n } else {\n if (props.colCount === 0) {\n return null;\n }\n const cardWidth = `calc(${props.cardWidth}px)` as Size;\n const cardHeight = `calc(${props.cardHeight}px)` as Size;\n const firstRowColCount = props.colCount - (props.totalCount % props.colCount);\n const isOnlyOneRow = firstRowColCount === props.colCount;\n const context: SkeletonRendererContext = {\n loadingStatus: 'loadMore',\n height: props.layout === 'flex' || isOnlyOneRow ? cardHeight : '100%',\n width: props.layout === 'flex' ? cardWidth : '100%'\n };\n skeletons.push(<div class={LOADMORE_STYLE_CLASS}>{props.skeletonRenderer(context)}</div>);\n skeletons.push(\n Array(renderMultipleSkeletons(context, firstRowColCount - 1, props.skeletonRenderer))\n );\n if (!isOnlyOneRow) {\n skeletons.push(renderMultipleSkeletons(context, props.colCount, props.skeletonRenderer));\n }\n }\n return <BaseCardViewSkeletonContainer>{skeletons}</BaseCardViewSkeletonContainer>;\n};\n\nconst renderMultipleSkeletons = (\n context: SkeletonRendererContext,\n count: number,\n skeletonRenderer: (context: SkeletonRendererContext) => ComponentChildren\n) => {\n return Array(count).fill(skeletonRenderer(context));\n};\n","/**\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 */\nimport { Fragment } from 'preact';\nimport { forwardRef, ForwardedRef } from 'preact/compat';\nimport { useRef, useCallback, useEffect, useState, useImperativeHandle } from 'preact/hooks';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { Keys } from '../utils/UNSAFE_keys';\nimport {\n getPrevNextKeyByCount,\n getViewportConfig,\n findElementByKey,\n keyExtractor,\n handleSelectionRange\n} from '../utils/PRIVATE_collectionUtils';\n\nimport { useNavigation } from '../hooks/PRIVATE_useListCommon';\nimport { useSelection, SelectionRangeDetail } from '../hooks/PRIVATE_useSelection';\nimport { ReorderableContext } from '../hooks/PRIVATE_useReorderable';\nimport { ItemContext, SelectionDetail } from '../UNSAFE_Collection';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LoadMoreCollection } from '../PRIVATE_LoadMoreCollection';\nimport { styles } from './themes/BaseCardViewStyles.css';\nimport { Props } from '../UNSAFE_CardFlexView';\nimport { MemoizeBaseCardViewItem } from './BaseCardViewItem';\nimport { BaseCardViewLayout } from './BaseCardViewLayout';\nimport {\n DefaultLoadMoreSkeletons,\n LoadMoreSkeletons,\n InitialLoadSkeletons,\n CustomInitialSkeletions,\n CustomLoadMoreSkeletons\n} from './BaseCardViewSkeleton';\nimport { gutterSizeToPX, emptyKeys, CARDVIEW_ITEM_SELECTOR } from './BaseCardViewUtils';\nimport { useCardViewReorder } from './useCardViewReorder';\n// TODO: add this import due to issue JET-67485, need to update once Stable is introduced\nimport './themes/redwood/BaseCardViewBaseTheme.css';\nimport { useAddBusyState } from '#hooks/PRIVATE_useAddBusyState';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport { classNames } from '#utils/UNSAFE_classNames';\n\n/**\n * Props specific for the GradGridBaseImpl Component\n */\ntype BaseCardViewImplProps<K, D> = Props<K, D> & {\n /**\n * Provide the number of columns to render;\n */\n columns: number;\n /**\n * The layout of the BaseCardView. When we use CardGridView as parent, we will use grid layout;\n * when we use CardFlexView as parent, we will use flex layout.\n */\n layout: 'grid' | 'flex';\n /**\n * Card dimension, including width and height\n */\n cardSize: { width?: number; height?: number };\n /**\n * A callback function to update card dimension, including width and height\n */\n updateCardSize: (width: number, height: number) => void;\n};\n\nconst BaseCardViewImpl = forwardRef(\n <K extends string | number, D>(\n {\n children,\n data,\n onLoadMore = () => {},\n hasMore = false,\n getRowKey,\n currentItemOverride,\n onPersistCurrentItem,\n selectionMode = 'none',\n selectedKeys = emptyKeys as Keys<K>,\n onSelectionChange,\n onReorder,\n viewportConfig,\n focusBehavior = 'card',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n initialAnimation = 'slideUp',\n gutterSize = 'sm',\n columns,\n layout,\n cardSize,\n updateCardSize,\n skeletonRenderer\n }: BaseCardViewImplProps<K, D>,\n ref?: ForwardedRef<HTMLDivElement>\n ) => {\n const rootRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref!, () => rootRef.current!, [rootRef]);\n\n // tracking the anchor key which is used for shift+click selection\n const anchorKey = useRef<K | undefined>();\n\n const gutterSizePX = gutterSizeToPX[gutterSize];\n const layoutProps = { layout, columns, gutterSize };\n\n //setup busy start and busy end callbacks for the initial animation\n const { onBusyStart: onAnimationBusyStart, onBusyEnd: onAnimationBusyEnd } = useAddBusyState(\n 'handling initial animation'\n );\n const isInitialAnimation = useRef(true);\n useEffect(() => {\n if (cardSize.height != undefined && cardSize.width != undefined) {\n isInitialAnimation.current = false;\n }\n }, [cardSize]);\n\n const ariaMultiSelectable = selectionMode === 'none' ? undefined : selectionMode === 'multiple';\n const ariaRowcount = 1;\n const ariaColcount = data ? data.length : -1;\n\n const [isFocusBehaviorValid, setIsFocusBehaviorValid] = useState(true);\n const validFocusBehavior = isFocusBehaviorValid ? focusBehavior : 'card';\n\n // ensure current item is scrolled into view when current item is updated\n // during reordering, enable that during keyboard reordering, disable that during mouse reordering\n const scrollCurrItemIntoView = useRef(false);\n const isReorderEnabled = onReorder != undefined;\n\n const isFetching = useRef(false);\n\n /*****************************************************************************************/\n /*********************** Current Key, Focus Ring and Tabbable Mode ***********************/\n /*****************************************************************************************/\n\n const arrowKeyAndHandlers = {\n ArrowUp: (key?: K) => getPrevNextKeyByCount(data, getRowKey, key, -columns),\n ArrowDown: (key?: K) => getPrevNextKeyByCount(data, getRowKey, key, columns),\n ArrowLeft: (key?: K) => getPrevNextKeyByCount(data, getRowKey, key, -1),\n ArrowRight: (key?: K) => getPrevNextKeyByCount(data, getRowKey, key, 1)\n };\n\n const {\n navigationProps,\n currentKey,\n isCurrentItemOverridden,\n showFocusRing,\n isCurrentTabbableKey\n } = useNavigation(\n data,\n rootRef,\n idExtractor,\n CARDVIEW_ITEM_SELECTOR,\n arrowKeyAndHandlers,\n currentItemOverride,\n onPersistCurrentItem,\n viewportConfig,\n undefined,\n selectionMode !== 'multiple',\n validFocusBehavior === 'card',\n validFocusBehavior === 'card',\n false\n );\n\n /*****************************************************************************************/\n /*************************************** Selection ***************************************/\n /*****************************************************************************************/\n\n const handleSelectionChange = useCallback(\n (detail: SelectionDetail<K>) => {\n if (onSelectionChange) {\n if (detail.value.all === false && detail.value.keys.size > 0) {\n // during regular selection, the last key selected by a user gesture is the anchor key\n anchorKey.current = Array.from(detail.value.keys.values()).pop();\n }\n onSelectionChange(detail);\n }\n },\n [anchorKey, onSelectionChange]\n );\n\n const handleSelectionRangeChange = useCallback(\n (detail: SelectionRangeDetail<K>) => {\n if (data && onSelectionChange) {\n const value = handleSelectionRange(detail, data, getRowKey);\n // for non-virtualized CardView, value should always be an array\n if (Array.isArray(value)) {\n if (detail.eventType === 'shiftSpace') {\n // during range selection by shift+space, the first key selected by a user gesture is the anchor key\n anchorKey.current = detail.value.start;\n } else {\n // during range selection by shift+click/arrow keys, the last key selected by a user gesture is the anchor key\n anchorKey.current = detail.value.end;\n }\n onSelectionChange({ value: { all: false, keys: new Set(value) }, target: null });\n }\n }\n },\n [data, onSelectionChange, getRowKey]\n );\n\n const { selectionProps } = useSelection(\n (element: HTMLElement) => {\n if (element === rootRef.current) {\n return currentKey === undefined ? null : currentKey;\n }\n return keyExtractor(element, CARDVIEW_ITEM_SELECTOR) as K;\n },\n selectedKeys,\n selectionMode,\n false,\n 'toggle',\n handleSelectionChange,\n anchorKey.current,\n currentKey,\n (currentKey: K | undefined, isPrev: boolean) =>\n getPrevNextKeyByCount(data, getRowKey, currentKey, isPrev ? -columns : columns),\n (currentKey: K | undefined, isPrev: boolean) =>\n getPrevNextKeyByCount(data, getRowKey, currentKey, isPrev ? -1 : 1),\n (key: K) => {\n if (rootRef.current) {\n const elem = findElementByKey(rootRef.current, key, CARDVIEW_ITEM_SELECTOR);\n if (elem) {\n elem.scrollIntoView({ block: 'nearest' });\n }\n }\n },\n handleSelectionRangeChange\n );\n\n /*****************************************************************************************/\n /**************************************** Reorder ****************************************/\n /*****************************************************************************************/\n\n const {\n reorderProps,\n reorderItemProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } = useCardViewReorder({\n onReorder,\n gutterSize,\n columns,\n rootRef,\n scrollCurrItemIntoView\n });\n\n const reorderAcc = isReorderEnabled && (\n <>\n <span id={reorderInstructionsId}>\n <HiddenAccessible>{reorderInstructions}</HiddenAccessible>\n </span>\n </>\n );\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // for content focusBehavior, when users tab out, we need to focus back to card grid, to ensure\n // the tabbing order works properly, otherwise the focus might get stuck at the current item\n if (validFocusBehavior === 'content' && event.key === 'Tab') {\n rootRef.current?.focus({ preventScroll: true });\n }\n // during keyboard reordering, the current item should be scrolled into view\n const keyHandlers = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];\n if (\n isReorderEnabled &&\n (event.metaKey || event.ctrlKey) &&\n event.shiftKey &&\n keyHandlers.includes(event.key)\n ) {\n scrollCurrItemIntoView.current = true;\n }\n };\n\n useEffect(() => {\n if (isReorderEnabled && currentKey != null && rootRef.current) {\n const elem = findElementByKey(rootRef.current, currentKey, CARDVIEW_ITEM_SELECTOR);\n // make sure current item is visible during reordering\n // scroll the current item into view only when the current item is updated internally\n if (elem && scrollCurrItemIntoView.current && !isCurrentItemOverridden) {\n elem.scrollIntoView({ block: 'nearest' });\n scrollCurrItemIntoView.current = false;\n }\n }\n // since the currentKey will not change during keyboard reordering,\n // listen to data to ensure cardview scroll into view\n }, [currentKey, data, isReorderEnabled, isCurrentItemOverridden]);\n\n /*****************************************************************************************/\n /************************************* Load More *****************************************/\n /*****************************************************************************************/\n\n const handleLoadMore = useCallback(() => {\n // check isFetching to avoid multiple load more at the same time (details in JET-61117)\n if (!isFetching.current) {\n isFetching.current = true;\n onLoadMore();\n }\n }, [isFetching, onLoadMore]);\n\n useEffect(() => {\n isFetching.current = false;\n // listen to data and hasMore because when one of them gets updated, the fetching is done\n }, [data, hasMore]);\n\n /*****************************************************************************************/\n /************************************ Child Component ************************************/\n /*****************************************************************************************/\n\n const childrenComponent = (context: ItemContext<D>) => {\n const itemKey = getRowKey(context.data);\n const isTabbable = isCurrentTabbableKey(itemKey);\n const isFocused = currentKey === itemKey && !isTabbable;\n const isFocusRingVisible = isFocused && showFocusRing;\n const isLastCard = data ? context.index === data.length - 1 : false;\n return (\n <MemoizeBaseCardViewItem<K, D>\n key={itemKey}\n itemKey={itemKey}\n isCurrentKey={currentKey === itemKey}\n itemData={context.data}\n itemIndex={context.index}\n isTabbable={isTabbable}\n isFocused={isFocused}\n isFocusRingVisible={isFocusRingVisible}\n isGridLayout={layout === 'grid'}\n selectedKeys={selectedKeys}\n selectionMode={selectionMode}\n onSelectionChange={onSelectionChange}\n focusBehavior={validFocusBehavior}\n {...(context.index === 0 && isInitialAnimation.current && { onAnimationBusyStart })}\n {...(isLastCard && isInitialAnimation.current && { onAnimationBusyEnd })}\n {...(focusBehavior === 'content' && { setIsFocusBehaviorValid })}\n {...(isInitialAnimation.current && { initialAnimation })}\n {...(context.index === 0 && !cardSize.width && { updateCardSize })}\n {...(isReorderEnabled && { reorderItemProps })}>\n {children}\n </MemoizeBaseCardViewItem>\n );\n };\n\n // todo: issue track in JET-57952, need a way to show the skeletons in keyboard navigation\n const skeletons = data ? (\n !data.length && hasMore ? (\n skeletonRenderer ? (\n <CustomLoadMoreSkeletons\n layout={layout}\n colCount={columns}\n totalCount={data.length}\n cardWidth={cardSize.width}\n cardHeight={cardSize.height}\n isRenderAsInitial={true}\n skeletonRenderer={skeletonRenderer}\n />\n ) : (\n <DefaultLoadMoreSkeletons layout={layout} />\n )\n ) : skeletonRenderer ? (\n <CustomLoadMoreSkeletons\n layout={layout}\n colCount={columns}\n totalCount={data.length}\n cardWidth={cardSize.width}\n cardHeight={cardSize.height}\n isRenderAsInitial={false}\n skeletonRenderer={skeletonRenderer}\n />\n ) : (\n <LoadMoreSkeletons\n layout={layout}\n colCount={columns}\n totalCount={data.length}\n cardWidth={cardSize.width}\n cardHeight={cardSize.height}\n />\n )\n ) : null;\n\n viewportConfig = getViewportConfig(rootRef, viewportConfig);\n const collectionComponent = (\n <div role=\"row\">\n <BaseCardViewLayout {...layoutProps}>\n <LoadMoreCollection\n data={data}\n hasMore={hasMore}\n onLoadMore={handleLoadMore}\n loadMoreIndicator={skeletons}\n loadMoreThreshold={gutterSizePX + 4} // gap size + padding\n viewportConfig={viewportConfig}>\n {childrenComponent}\n </LoadMoreCollection>\n </BaseCardViewLayout>\n </div>\n );\n\n const initialLoadSkeletons = (\n <BaseCardViewLayout {...layoutProps}>\n {skeletonRenderer ? (\n <CustomInitialSkeletions skeletonRenderer={skeletonRenderer} />\n ) : (\n <InitialLoadSkeletons layout={layout} />\n )}\n </BaseCardViewLayout>\n );\n const allowBrowserContextMenu = !(\n getClientHints().platform === 'ios' || getClientHints().platform === 'android'\n );\n\n const classArray = [styles.baseStyle];\n if (!allowBrowserContextMenu) {\n classArray.push(styles.userSelect);\n }\n const classes = classNames(classArray);\n\n return (\n <div\n {...mergeProps(navigationProps, selectionProps, reorderProps, {\n onKeyDown: handleKeyDown\n })}\n ref={rootRef}\n role=\"grid\"\n class={classes}\n tabIndex={0}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={\n isReorderEnabled ? reorderInstructionsId + ' ' + ariaDescribedBy : ariaDescribedBy\n }\n aria-multiselectable={ariaMultiSelectable}\n aria-rowcount={ariaRowcount}\n aria-colcount={ariaColcount}>\n <ReorderableContext.Provider value={reorderContext}>\n {!data ? (\n initialLoadSkeletons\n ) : data.length || hasMore ? (\n collectionComponent\n ) : (\n <Fragment />\n )}\n </ReorderableContext.Provider>\n {reorderAcc}\n </div>\n );\n }\n);\n\nconst idExtractor = (elem: Element) => elem.id;\n\n/**\n * Props specific for the BaseCardView\n */\ntype BaseCardViewProps<K, D> = BaseCardViewImplProps<K, D> & {\n ref?: ForwardedRef<HTMLDivElement>;\n};\n\n/**\n * Cast BaseCardViewImpl to generic type, because BaseCardViewImpl would infer the generic type to specific type,\n * i.e infer <K extends string | number, D> to <string | number, unknown>, which will cause type issues in the parent component\n */\nexport const BaseCardView = BaseCardViewImpl as <K extends string | number, D>(\n props: BaseCardViewProps<K, D>\n) => JSX.Element;\n","import type { RefObject } from 'preact';\nimport { useState } from 'preact/hooks';\nimport { dragToScroll } from '../utils/PRIVATE_collectionUtils';\nimport { useReorderable } from '../hooks/PRIVATE_useReorderable';\nimport { Props } from '../UNSAFE_CardFlexView';\nimport { CARDVIEW_ITEM_SELECTOR, GutterSize } from './BaseCardViewUtils';\n\ntype useCardViewReorderProps<K, D> = Pick<Props<K, D>, 'onReorder'> & {\n gutterSize: GutterSize;\n columns: number;\n rootRef: RefObject<HTMLDivElement>;\n scrollCurrItemIntoView: RefObject<boolean>;\n};\n\nexport const useCardViewReorder = <K extends string | number, D>({\n onReorder,\n gutterSize,\n columns,\n rootRef,\n scrollCurrItemIntoView\n}: useCardViewReorderProps<K, D>) => {\n const isReorderEnabled = onReorder != undefined;\n\n const [dragKey, setDragKey] = useState<K | undefined>(undefined);\n const { reorderProps, reorderContext, reorderInstructionsId, reorderInstructions } =\n useReorderable({\n onReorder,\n rootRef,\n itemSelector: CARDVIEW_ITEM_SELECTOR,\n isDisabled: !isReorderEnabled,\n columns\n });\n\n if (!isReorderEnabled) {\n return {\n reorderProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } as const;\n }\n\n const handleDragOver = (event: DragEvent) => {\n dragToScroll(event, dragKey !== undefined, rootRef.current);\n // during mouse reordering, the drag item might not be the same as current item,\n // so we should disallow current item scroll into view\n scrollCurrItemIntoView.current = false;\n };\n\n const reorderEventProps = { ...reorderProps, onDragOver: handleDragOver };\n\n const reorderItemProps = {\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n gutterSize,\n columns\n };\n\n return {\n reorderProps: reorderEventProps,\n reorderItemProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } as const;\n};\n"],"names":["CARDVIEW_ITEM_SELECTOR","emptyKeys","all","keys","Set","gutterSizeToPX","xs","sm","md","lg","xl","BaseCardViewReorderableItem","children","itemKey","itemIndex","isCurrentKey","dragKey","setDragKey","onReorder","rootRef","gutterSize","columns","itemRef","useRef","isOneColumn","isFirstColumn","isLastColumn","variantClasses","multiVariantStyles","itemOverlayFront","variantClassesVertical","itemOverlayFrontVertical","itemStyles","itemOverlayRear","styles","itemOverlayRearVertical","itemDragger","getItem","useCallback","current","closest","setTransferData","event","dataTransfer","setData","JSON","stringify","rootProps","isDragged","overlayZoneBeforeProps","overlayZoneAfterProps","useReorderableItem","isDisabled","ref","itemSelector","isVertical","currentItemKey","useReorderableContext","useEffect","direction","useUser","isRtl","overlayZoneBeforeClass","classNames","class","itemOverlayFrontEdge","overlayZoneAfterClass","itemOverlayRearEdge","_jsxs","isKeyDefined","_Fragment","_jsx","jsx","animationConfigSlide","index","animationStates","slideUp","from","translateY","to","options","duration","delay","easing","slideDown","isAnimatedOnMount","animationConfigOpacity","timeoutRef","onAnimationBusyEnd","opacity","onAnimationEnd","clearTimeout","MemoizeBaseCardViewItem","memo","itemData","isTabbable","isFocused","isFocusRingVisible","selectedKeys","selectionMode","onSelectionChange","focusBehavior","setIsFocusBehaviorValid","initialAnimation","isGridLayout","updateCardSize","reorderItemProps","onAnimationBusyStart","isItemFocused","itemFocused","itemInitialOpacity","itemInGridLayout","classes","itemStyle","handleResize","entry","contentRect","width","height","nullRef","useResizeObserver","useLayoutEffect","content","firstElementChild","focusable","allTabbableElements","length","warn","focus","nodeRef","nodeRefSlide","controller","controllerSlide","useAnimation","nodeRefOpacity","controllerOpacity","undefined","setTimeout","cancel","style","itemRefs","useMemo","mergeRefs","rendererContext","getItemContext","data","metadata","key","childrenComponent","id","useId","role","onKeyDown","stopPropagation","containsKey","TabbableModeContext","Provider","value","FocusTrap","restoreFocusRef","prev","next","isSameKey","props1","props2","BaseCardViewLayout","layout","gap","cardViewVars","Grid","gridTemplateColumns","Flex","wrap","BaseCardViewSkeletonContainer","isVisible","setIsVisible","useState","Fragment","LOADMORE_STYLE_CLASS","getSkeletonsByCount","count","isUnique","sw","sh","Array","map","_v","i","Skeleton","borderRadius","Date","getTime","InitialLoadSkeletons","props","DefaultLoadMoreSkeletons","skeletons","DEFAULT_SKELETON_NUMBER","InvisibleSkeletons","LoadMoreSkeletons","colCount","cardWidth","cardHeight","firstRowColCount","totalCount","isOnlyOneRow","firstSkeleton","push","CustomInitialSkeletions","renderMultipleSkeletons","loadingStatus","skeletonRenderer","CustomLoadMoreSkeletons","isRenderAsInitial","context","fill","BaseCardViewImpl","forwardRef","onLoadMore","hasMore","getRowKey","currentItemOverride","onPersistCurrentItem","viewportConfig","ariaLabel","ariaLabelledBy","ariaDescribedBy","cardSize","useImperativeHandle","anchorKey","gutterSizePX","layoutProps","onBusyStart","onBusyEnd","useAddBusyState","isInitialAnimation","ariaMultiSelectable","ariaColcount","isFocusBehaviorValid","validFocusBehavior","scrollCurrItemIntoView","isReorderEnabled","isFetching","arrowKeyAndHandlers","ArrowUp","getPrevNextKeyByCount","ArrowDown","ArrowLeft","ArrowRight","navigationProps","currentKey","isCurrentItemOverridden","showFocusRing","isCurrentTabbableKey","useNavigation","idExtractor","handleSelectionChange","detail","size","values","pop","handleSelectionRangeChange","handleSelectionRange","isArray","eventType","start","end","target","selectionProps","useSelection","element","keyExtractor","isPrev","elem","findElementByKey","scrollIntoView","block","reorderProps","reorderContext","reorderInstructionsId","reorderInstructions","useReorderable","onDragOver","dragToScroll","useCardViewReorder","reorderAcc","HiddenAccessible","handleLoadMore","getViewportConfig","collectionComponent","LoadMoreCollection","loadMoreIndicator","loadMoreThreshold","isLastCard","initialLoadSkeletons","allowBrowserContextMenu","getClientHints","platform","classArray","baseStyle","userSelect","mergeProps","preventScroll","metaKey","ctrlKey","shiftKey","includes","tabIndex","ReorderableCont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E6K,eAAe,IAKxC7D,KACCtM,EAAMoQ,SAAWpQ,EAAMqQ,UACxBrQ,EAAMsQ,UAJY,CAAC,YAAa,aAAc,UAAW,aAK7CC,SAASvQ,EAAMyG,OAE3B4F,GAAuBxM,SAAU,EAClC,IAoJCc,IAAKlC,EACLoI,KAAK,OACLvF,MAAOgD,GACPkM,SAAU,EAAC,aACCnF,EACK,kBAAAC,EAEf,mBAAAgB,GAAmBsC,GAAwB,IAAMrD,EAAkBA,EAE/C,uBAAAU,mBAtTL,EAuTU,gBACZC,GACfhO,SAAA,CAAA2D,EAAAC,IAAC2O,qBAAmBvJ,SAAS,CAAAC,MAAOwH,GAAczQ,SAC9CqI,EAEEA,EAAKnB,QAAU4F,KAGjBnJ,MAAC0G,EAAAA,aAJD,KAOH2G,KAEH,IAIA9B,GAAekB,GAAkBA,EAAK3H,GAa/B+J,GAAe7F,mCNhbD,CAAC8F,EAAkB7G,EAAoB8G,KAChE,IAAK9G,IAAc8G,EAAW,OAAO,EAGrC,MAAM/G,EAAWgH,KAAKC,OAAOF,EAAYD,IAAaA,EAAW7G,IACjE,OAAO+G,KAAKE,IAAI,EAAGlH,EAAS"}
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', './classNames-08d99695', './usePress-949a0d03', './useUser-08901aba', './Text-31cabc49', './Flex-4b81b412', './useTabBarContext-15a23bb6', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './dimensions-95c0c920', './boxalignment-8d80de7e', './useComponentTheme-5aa41a8f', './useTranslationBundle-e4dd341e', './UNSAFE_TabBarCommon/themes/redwood/TabBarItemTheme', './Badge-b28ef084', './useConveyorBeltItem-84d0e3e2', './useDetectTruncation-74f48ddc', './WarningS-98a81abe', './ErrorS-d91c3db2', './InformationS-53490112', './SuccessS-eb8fd915', './mergeProps-bcfa6a92', './useTabBarItemTooltip-a81da662', './UNSAFE_TabBarCommon/themes/TabBarItemContract.css', './HiddenAccessible-037ef42d'], (function(e,a,t,s,r,n,o,i,l,c,d,m,u,b,x,h,g,p,j,B,I,v,f,T,S,y,C){"use strict";const w=e=>{e.preventDefault()};e.BaseTabBarItem=function({itemKey:e,label:F,icon:k,badge:N,metadata:H,severity:P="none",removeIcon:R,showFocusRingOverride:E,selectionOverride:L,displayOverride:O,labelMaxWidth:z,href:W,"aria-controls":A,"aria-haspopup":V}){const D=x.useTranslationBundle("@oracle/oraclejet-preact"),{onSelect:U,selection:_,currentKey:K,showFocusRing:M,hideTooltip:$,layout:q,display:G,size:J,isEdgeBottom:Q,tabItemPrefix:X}=l.useTabBarContext(),Y=K===e,{ref:Z,...ee}=p.useConveyorBeltItem({isCurrent:Y}),ae=t.useCallback((()=>{U?.({value:e})}),[e,U]),{pressProps:te}=r.usePress(ae),se=_===e,re="stacked"===G,ne=!!("icons"===G||O&&"icons"===O),oe="lg"===J,ie=F&&!(" "===F&&void 0===F),le=!("none"===P||void 0===P),ce=e=>{switch(e){case"error":return a.jsx(I.SvgErrorS,{color:"danger",accessibleLabel:D.tabBar_tabContainsErrors()});case"warning":return a.jsx(B.SvgWarningS,{color:"warning"});case"info":return a.jsx(v.SvgInformationS,{color:"info"});case"confirmation":return a.jsx(f.SvgSuccessS,{color:"success"});default:return null}},{direction:de}=n.useUser(),me=void 0!==E?E:M,ue=void 0!==L?L:se,{classes:be,styles:{tabBarItemIcon:xe,tabBarItemIconStacked:he,tabBarItemMetadata:ge,tabBarItemStackedBadge:pe,tabBarItemStackedBadgeRtl:je,tabBarItemRemoveIcon:Be,tabBarItemLabel:Ie,tabBarItemLabelTruncated:ve,tabBarItemLink:fe}}=b.useComponentTheme(h.TabBarItemRedwoodTheme,{selection:ue?"isSelected":"notSelected",current:Y?"isCurrent":"notCurrent",focusRing:me?"showFocusRing":"noFocusRing",edgeBottom:Q?"isBottom":"notBottom"}),Te=s.classNames([be]),Se=s.classNames([Ie,void 0!==z&&ve]),ye=s.classNames([xe,(re||ne||!ie)&&he]),Ce=s.classNames([ge]),we=s.classNames([pe,"rtl"===de&&je]),Fe=s.classNames([Be]),ke=s.classNames([fe]),Ne=c.mergeInterpolations([...Object.values(d.flexitemInterpolations),...Object.values(m.dimensionInterpolations),...Object.values(u.boxAlignmentInterpolations)]),He=Ne({flex:"stretch"===q?"1 0 auto":"0 0 auto",minWidth:"10.5x",height:oe?y.tabBarItemVars.lgHeight:y.tabBarItemVars.mdHeight,gap:"2x"}),Pe=Ne({flex:"stretch"===q?"1 0 auto":"0 0 auto"}),Re=c.mergeInterpolations([...Object.values(m.dimensionInterpolations)])({maxWidth:void 0!==z?`calc(max(96px,${z}))`:"100%"}),{detectTruncationProps:Ee,isTextTruncated:Le}=j.useDetectTruncation(void 0===z),Oe=ne||Le,{tooltipContent:ze,tooltipEventHandlerProps:We,onLogicalFocus:Ae,onLogicalBlur:Ve}=S.useTabBarItemTooltip({label:F,isDisabled:!Oe});Oe&&(Y&&M&&!$?Ae(Z.current):(!Y||Y&&!M||$)&&Ve());const De=N||H||"none"!==P||re||ne,Ue=null!=W,_e=()=>a.jsxs(a.Fragment,{children:[a.jsxs(i.Flex,{align:"center",justify:"center",flex:"1 1 auto",gap:"2x",children:[!ne&&!re&&k&&ie&&a.jsx("span",{class:ye,"data-oj-tab-icon":"startIcon",children:k}),!ne&&ie&&a.jsx("span",{class:Se,style:Re,...Ee,children:a.jsx(o.Text,{size:"md",weight:"semiBold",children:F})})]}),!Ue&&R&&a.jsx("span",{class:Fe,children:R})]}),Ke=()=>a.jsxs(i.Flex,{flex:"1 1 auto",children:[a.jsxs(i.Flex,{minWidth:"10.5x",minHeight:oe?y.tabBarItemVars.lgHeight:"100%",height:re&&ie?y.tabBarItemVars.stackedHeight:y.tabBarItemVars.mdHeight,direction:re&&ie?"column":"row",gap:"2x",align:"center",justify:"center",alignSelf:"center",flex:"1 1 auto",children:[(re||ne)&&a.jsxs("div",{class:ye,children:[ne&&a.jsx(C.HiddenAccessible,{id:"hiddenLabel",children:F}),k,a.jsx("span",{class:we,children:N?a.jsx(g.Badge,{size:"xs",variant:"neutral",children:N}):null})]}),!ne&&!re&&k&&ie&&a.jsx("span",{class:ye,"data-oj-tab-icon":"startIcon",children:k}),!ne&&ie&&a.jsx("span",{class:Se,style:Re,...Ee,children:a.jsx(o.Text,{size:"md",weight:"semiBold",children:F})}),!re&&!ne&&N&&ie&&a.jsx("span",{"data-oj-tab-badge":N,children:a.jsx(g.Badge,{size:"md",variant:"neutralSubtle",children:N})}),H&&a.jsx("span",{class:Ce,"data-oj-tab-metadata":H,children:a.jsx(o.Text,{size:"md",weight:"normal",children:"( "+H+" )"})}),le&&a.jsx("span",{class:ye,"data-oj-tab-severity":P,children:ce(P)})]}),!Ue&&R&&a.jsx("span",{class:Fe,children:R})]});return Ue?a.jsxs("span",{ref:Z,class:Te,...T.mergeProps(te,We,ee),style:De?Pe:He,children:[a.jsx("a",{onClick:w,class:ke,href:W,"data-oj-key":e,"data-oj-removable":R?"true":void 0,id:X+e,role:"tab",tabindex:-1,"aria-controls":A,"aria-selected":se,"aria-haspopup":V,children:De?Ke():_e()}),ze]}):a.jsxs("div",{"data-oj-key":e,"data-oj-removable":R?"true":void 0,id:X+e,class:Te,role:"tab","aria-controls":A,"aria-selected":se,"aria-haspopup":V,...T.mergeProps(te,We,ee),ref:Z,style:De?Pe:He,children:[De?Ke():_e(),ze]})}}));
2
+ //# sourceMappingURL=BaseTabBarItem-d7c2922b.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseTabBarItem-d7c2922b.js","sources":["../../src/UNSAFE_TabBarCommon/BaseTabBarItem.tsx"],"sourcesContent":["import { ComponentChildren, ComponentChild } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { Text } from '../UNSAFE_Text';\nimport { Flex } from '../UNSAFE_Flex';\nimport { useTabBarContext } from './useTabBarContext';\nimport { Size } from '../utils/UNSAFE_size';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport { dimensionInterpolations } from '../utils/UNSAFE_interpolations/dimensions';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { DimensionProps } from '../utils/UNSAFE_interpolations/dimensions';\nimport type { BoxAlignmentProps } from '../utils/UNSAFE_interpolations/boxalignment';\nimport { boxAlignmentInterpolations } from '../utils/UNSAFE_interpolations/boxalignment';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { TabBarItemVariantOptions } from './themes/TabBarItemStyles.css';\nimport { TabBarItemRedwoodTheme } from './themes/redwood/TabBarItemTheme';\nimport { Badge } from '../UNSAFE_Badge';\nimport { useConveyorBeltItem } from '../UNSAFE_ConveyorBelt/useConveyorBeltItem';\nimport { useDetectTruncation } from '../hooks/PRIVATE_useDetectTruncation';\nimport { WarningS } from '../UNSAFE_RedwoodIcons/WarningS';\nimport { ErrorS } from '../UNSAFE_RedwoodIcons/ErrorS';\nimport { InformationS } from '../UNSAFE_RedwoodIcons/InformationS';\nimport { SuccessS } from '../UNSAFE_RedwoodIcons/SuccessS';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { useTabBarItemTooltip } from './useTabBarItemTooltip';\nimport { tabBarItemVars } from './themes/TabBarItemContract.css';\nimport { HiddenAccessible } from '#UNSAFE_HiddenAccessible';\n\ntype Severity = 'warning' | 'info' | 'none' | 'error' | 'confirmation';\n\ntype AriaProps = {\n /**\n * Accepts the tabpanel element's ID associated with the tab item\n **/\n 'aria-controls'?: string;\n /**\n * Used by an item that renders an interactive popup\n */\n 'aria-haspopup'?: boolean;\n};\n\nexport type BaseTabBarItemProps<K extends string | number> = {\n /**\n * Key of the TabBarItem\n */\n itemKey: K;\n /**\n * Label of the TabBarItem. For icon only display this label is the content\n * for aria-label and tooltip text of the Tab.\n */\n label: string;\n /**\n * The icon before the label in non-stack case, icon above the label in\n * stacked case or the stand alone icon when no label is specified.\n */\n icon?: ComponentChild;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * The content to be rendered inside the Text component as a metadata,\n * that appears after the label in non stack case only.\n */\n metadata?: string;\n /**\n * The status icon to be rendered after the label in non stack case only.\n */\n severity?: Severity;\n /**\n * The content to be rendered for remove icon\n */\n removeIcon?: ComponentChildren;\n /**\n * The control for enabling and disabling focusRing\n */\n showFocusRingOverride?: boolean;\n /**\n * The control for enabling and disabling selection indicator\n */\n selectionOverride?: boolean;\n /**\n * The control for overriding display value.\n */\n displayOverride?: string;\n /**\n * Maximum width tabbar item label can have\n */\n labelMaxWidth?: Size;\n /**\n * Sets the URL that the hyperlink points to. If there is no valid URL use \"#\" for href value to navigate to the top of the page.\n */\n href?: string;\n} & AriaProps;\n\nconst onClickLink = (event: MouseEvent) => {\n event.preventDefault();\n};\n\nexport function BaseTabBarItem<K extends string | number>({\n itemKey,\n label,\n icon,\n badge,\n metadata,\n severity = 'none',\n removeIcon,\n showFocusRingOverride,\n selectionOverride,\n displayOverride,\n labelMaxWidth,\n href,\n 'aria-controls': ariaControls,\n 'aria-haspopup': ariaHasPopup\n}: BaseTabBarItemProps<K>) {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const {\n onSelect,\n selection,\n currentKey,\n showFocusRing,\n hideTooltip,\n layout,\n display,\n size,\n isEdgeBottom,\n tabItemPrefix\n } = useTabBarContext();\n\n const isCurrent = currentKey === itemKey;\n\n const { ref, ...conveyorBeltProps } = useConveyorBeltItem({ isCurrent });\n\n //Selection\n //Dependency on currentKey because upon removal selectionChange does not change hence no re render\n //and it is still holding the deleted key as selection\n const handlePress = useCallback(() => {\n onSelect?.({ value: itemKey as K });\n }, [itemKey, onSelect]);\n\n const { pressProps } = usePress(handlePress);\n\n const isSelected = selection === itemKey;\n\n const isStacked = display === 'stacked' ? true : false;\n const isIconOnly =\n display === 'icons' || (displayOverride && displayOverride === 'icons') ? true : false;\n const isTall = size === 'lg' ? true : false;\n const labelRequirement = label && !(label === ' ' && label === undefined);\n const severityRequirement = !(severity === 'none' || severity === undefined);\n\n const IconComponent = (severityValue: Severity) => {\n switch (severityValue) {\n case 'error':\n // As per spec acc label is required only for error severity icon.\n return <ErrorS color=\"danger\" accessibleLabel={translations.tabBar_tabContainsErrors()} />;\n case 'warning':\n return <WarningS color=\"warning\" />;\n case 'info':\n return <InformationS color=\"info\" />;\n case 'confirmation':\n return <SuccessS color=\"success\" />;\n default:\n return null;\n }\n };\n\n const { direction } = useUser();\n const makeFocusRingVisible =\n showFocusRingOverride !== undefined ? showFocusRingOverride : showFocusRing;\n const makeSelectionVisible = selectionOverride !== undefined ? selectionOverride : isSelected;\n const {\n classes,\n styles: {\n tabBarItemIcon,\n tabBarItemIconStacked,\n tabBarItemMetadata,\n tabBarItemStackedBadge,\n tabBarItemStackedBadgeRtl,\n tabBarItemRemoveIcon,\n tabBarItemLabel,\n tabBarItemLabelTruncated,\n tabBarItemLink\n }\n } = useComponentTheme<TabBarItemVariantOptions>(TabBarItemRedwoodTheme, {\n selection: makeSelectionVisible ? 'isSelected' : 'notSelected',\n current: isCurrent ? 'isCurrent' : 'notCurrent',\n focusRing: makeFocusRingVisible ? 'showFocusRing' : 'noFocusRing',\n edgeBottom: isEdgeBottom ? 'isBottom' : 'notBottom'\n });\n\n const tabBarItem = classNames([classes]);\n const tabBarItemLabelClasses = classNames([\n tabBarItemLabel,\n labelMaxWidth !== undefined && tabBarItemLabelTruncated\n ]);\n const tabBarItemIconClasses = classNames([\n tabBarItemIcon,\n (isStacked || isIconOnly || !labelRequirement) && tabBarItemIconStacked\n ]);\n const tabBarItemMetadataClasses = classNames([tabBarItemMetadata]);\n const tabBarItemStackedBadgeClasses = classNames([\n tabBarItemStackedBadge,\n direction === 'rtl' && tabBarItemStackedBadgeRtl\n ]);\n const removeClass = classNames([tabBarItemRemoveIcon]);\n const tabBarItemLinkClasses = classNames([tabBarItemLink]);\n\n const styleInterpolations = mergeInterpolations<\n FlexitemProps & DimensionProps & BoxAlignmentProps\n >([\n ...Object.values(flexitemInterpolations),\n ...Object.values(dimensionInterpolations),\n ...Object.values(boxAlignmentInterpolations)\n ]);\n\n //This is for simple item where height and width need to be specified on the main div.\n const tabDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto',\n minWidth: '10.5x',\n height: isTall ? tabBarItemVars.lgHeight : tabBarItemVars.mdHeight,\n //This is needed for gap between icon/ label and remove icon in labelIconRenderer\n gap: '2x'\n });\n\n //This is for complex item, where only flex dimensions needs to be applied as height and width comes from child Flex component.\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const maxWithInterpolation = mergeInterpolations<DimensionProps>([\n ...Object.values(dimensionInterpolations)\n ]);\n\n //The threshold for truncation is labelMinWidth: 96px as per spec.\n const labelMinWidth = '96px';\n const maxWidthDimensions = maxWithInterpolation({\n maxWidth: labelMaxWidth !== undefined ? `calc(max(${labelMinWidth},${labelMaxWidth}))` : '100%'\n });\n\n const { detectTruncationProps, isTextTruncated } = useDetectTruncation(\n labelMaxWidth === undefined\n );\n const showTooltip = isIconOnly || isTextTruncated;\n const { tooltipContent, tooltipEventHandlerProps, onLogicalFocus, onLogicalBlur } =\n useTabBarItemTooltip({ label, isDisabled: !showTooltip });\n if (showTooltip) {\n if (isCurrent && showFocusRing && !hideTooltip) {\n onLogicalFocus(ref.current as HTMLElement);\n } else if (!isCurrent || (isCurrent && !showFocusRing) || hideTooltip) {\n onLogicalBlur();\n }\n }\n\n const isComplexItem = badge || metadata || severity !== 'none' || isStacked || isIconOnly;\n const isLinkItem = href != null;\n\n const labelIconRenderer = () => {\n return (\n <>\n <Flex align=\"center\" justify=\"center\" flex=\"1 1 auto\" gap=\"2x\">\n {!isIconOnly && !isStacked && icon && labelRequirement && (\n <span class={tabBarItemIconClasses} data-oj-tab-icon=\"startIcon\">\n {icon}\n </span>\n )}\n {!isIconOnly && labelRequirement && (\n <span\n class={tabBarItemLabelClasses}\n style={maxWidthDimensions}\n {...detectTruncationProps}>\n {\n <Text size=\"md\" weight=\"semiBold\">\n {label}\n </Text>\n }\n </span>\n )}\n </Flex>\n {!isLinkItem && removeIcon && <span class={removeClass}>{removeIcon}</span>}\n </>\n );\n };\n\n const complexItemRenderer = () => {\n return (\n <Flex flex=\"1 1 auto\">\n <Flex\n minWidth=\"10.5x\"\n minHeight={isTall ? tabBarItemVars.lgHeight : '100%'}\n height={\n isStacked && labelRequirement ? tabBarItemVars.stackedHeight : tabBarItemVars.mdHeight\n }\n direction={isStacked && labelRequirement ? 'column' : 'row'}\n gap=\"2x\"\n align=\"center\"\n justify=\"center\"\n alignSelf=\"center\"\n flex=\"1 1 auto\">\n {(isStacked || isIconOnly) && (\n <div class={tabBarItemIconClasses}>\n {\n // JET-79198 - The label is made hidden so that in can be read out by screen readers and we will not need aria-label at role=\"tab\" level to include all the content in it's children\n isIconOnly && <HiddenAccessible id=\"hiddenLabel\">{label}</HiddenAccessible>\n }\n {icon}\n <span class={tabBarItemStackedBadgeClasses}>\n {badge ? (\n <Badge size=\"xs\" variant=\"neutral\">\n {badge}\n </Badge>\n ) : null}\n </span>\n </div>\n )}\n {!isIconOnly && !isStacked && icon && labelRequirement && (\n <span class={tabBarItemIconClasses} data-oj-tab-icon=\"startIcon\">\n {icon}\n </span>\n )}\n {!isIconOnly && labelRequirement && (\n <span\n class={tabBarItemLabelClasses}\n style={maxWidthDimensions}\n {...detectTruncationProps}>\n {\n <Text size=\"md\" weight=\"semiBold\">\n {label}\n </Text>\n }\n </span>\n )}\n {!isStacked && !isIconOnly && badge && labelRequirement && (\n <span data-oj-tab-badge={badge}>\n <Badge size=\"md\" variant=\"neutralSubtle\">\n {badge}\n </Badge>\n </span>\n )}\n {metadata && (\n <span class={tabBarItemMetadataClasses} data-oj-tab-metadata={metadata}>\n <Text size=\"md\" weight=\"normal\">\n {'( ' + metadata + ' )'}\n </Text>\n </span>\n )}\n {severityRequirement && (\n <span class={tabBarItemIconClasses} data-oj-tab-severity={severity}>\n {IconComponent(severity)}\n </span>\n )}\n </Flex>\n {!isLinkItem && removeIcon && <span class={removeClass}>{removeIcon}</span>}\n </Flex>\n );\n };\n\n const tabBarItemRenderer = () => {\n return (\n <div\n data-oj-key={itemKey}\n data-oj-removable={removeIcon ? 'true' : undefined}\n id={tabItemPrefix + itemKey}\n class={tabBarItem}\n role=\"tab\"\n aria-controls={ariaControls}\n aria-selected={isSelected}\n aria-haspopup={ariaHasPopup}\n {...mergeProps(pressProps, tooltipEventHandlerProps, conveyorBeltProps)}\n ref={ref}\n style={isComplexItem ? flexDimensions : tabDimensions}>\n {isComplexItem ? complexItemRenderer() : labelIconRenderer()}\n {tooltipContent}\n </div>\n );\n };\n\n const tabBarLinkItemRenderer = () => {\n return (\n <span\n ref={ref}\n class={tabBarItem}\n {...mergeProps(pressProps, tooltipEventHandlerProps, conveyorBeltProps)}\n style={isComplexItem ? flexDimensions : tabDimensions}>\n <a\n onClick={onClickLink}\n class={tabBarItemLinkClasses}\n href={href}\n data-oj-key={itemKey}\n data-oj-removable={removeIcon ? 'true' : undefined}\n id={tabItemPrefix + itemKey}\n role=\"tab\"\n tabindex={-1}\n aria-controls={ariaControls}\n aria-selected={isSelected}\n aria-haspopup={ariaHasPopup}>\n {isComplexItem ? complexItemRenderer() : labelIconRenderer()}\n </a>\n {tooltipContent}\n </span>\n );\n };\n return isLinkItem ? tabBarLinkItemRenderer() : tabBarItemRenderer();\n}\n"],"names":["onClickLink","event","preventDefault","itemKey","label","icon","badge","metadata","severity","removeIcon","showFocusRingOverride","selectionOverride","displayOverride","labelMaxWidth","href","ariaControls","ariaHasPopup","translations","useTranslationBundle","onSelect","selection","currentKey","showFocusRing","hideTooltip","layout","display","size","isEdgeBottom","tabItemPrefix","useTabBarContext","isCurrent","ref","conveyorBeltProps","useConveyorBeltItem","handlePress","useCallback","value","pressProps","usePress","isSelected","isStacked","isIconOnly","isTall","labelRequirement","undefined","severityRequirement","IconComponent","severityValue","_jsx","jsx","ErrorS","color","accessibleLabel","tabBar_tabContainsErrors","WarningS","SvgWarningS","InformationS","SvgInformationS","SuccessS","SvgSuccessS","direction","useUser","makeFocusRingVisible","makeSelectionVisible","classes","styles","tabBarItemIcon","tabBarItemIconStacked","tabBarItemMetadata","tabBarItemStackedBadge","tabBarItemStackedBadgeRtl","tabBarItemRemoveIcon","tabBarItemLabel","tabBarItemLabelTruncated","tabBarItemLink","useComponentTheme","TabBarItemRedwoodTheme","current","focusRing","edgeBottom","tabBarItem","classNames","tabBarItemLabelClasses","tabBarItemIconClasses","tabBarItemMetadataClasses","tabBarItemStackedBadgeClasses","removeClass","tabBarItemLinkClasses","styleInterpolations","mergeInterpolations","Object","values","flexitemInterpolations","dimensionInterpolations","boxAlignmentInterpolations","tabDimensions","flex","minWidth","height","tabBarItemVars","lgHeight","mdHeight","gap","flexDimensions","maxWidthDimensions","maxWithInterpolation","maxWidth","detectTruncationProps","isTextTruncated","useDetectTruncation","showTooltip","tooltipContent","tooltipEventHandlerProps","onLogicalFocus","onLogicalBlur","useTabBarItemTooltip","isDisabled","isComplexItem","isLinkItem","labelIconRenderer","_jsxs","_Fragment","children","Flex","align","justify","class","style","Text","weight","complexItemRenderer","minHeight","stackedHeight","alignSelf","jsxs","HiddenAccessible","id","Badge","variant","mergeProps","onClick","role","tabindex"],"mappings":"wyBAoGA,MAAMA,EAAeC,IACnBA,EAAMC,gBAAgB,6BAGkCC,QACxDA,EAAOC,MACPA,EAAKC,KACLA,EAAIC,MACJA,EAAKC,SACLA,EAAQC,SACRA,EAAW,OAAMC,WACjBA,EAAUC,sBACVA,EAAqBC,kBACrBA,EAAiBC,gBACjBA,EAAeC,cACfA,EAAaC,KACbA,EACA,gBAAiBC,EACjB,gBAAiBC,IAEjB,MAAMC,EAAeC,uBAAiC,6B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/hooks', './useResizeObserver-25032462', './BaseCardView-16fda4c3'], (function(e,t,i,r,a){"use strict";e.CardFlexView=function(e){const c=i.useRef(null),[s,d]=i.useState({}),n=i.useCallback(((e,t)=>{d((i=>({...i,cardWidth:e,cardHeight:t})))}),[]),u=i.useCallback((e=>{const t=e.contentRect.width;s.containerWidth!==t&&d((e=>({...e,containerWidth:t})))}),[s]);r.useResizeObserver(c,u);const o=a.gutterSizeToPX[e.gutterSize||"sm"],h=a.getColCount(o,s.cardWidth,s.containerWidth),l={width:s.cardWidth,height:s.cardHeight};return t.jsx(a.BaseCardView,{...e,ref:c,layout:"flex",columns:h,cardSize:l,updateCardSize:n})}}));
2
+ //# sourceMappingURL=CardFlexView-d3eb7373.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardFlexView-aa2f3de8.js","sources":["../../src/UNSAFE_CardFlexView/CardFlexView.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'preact/hooks';\nimport { useResizeObserver } from '../hooks/UNSAFE_useResizeObserver';\nimport { BaseCardView, gutterSizeToPX, getColCount } from '../PRIVATE_BaseCardView';\nimport { BaseCardViewPublicProps as Props } from './BaseCardView.types';\n\ntype CardFlexViewProps<K extends string | number, D> = Props<K, D>;\ntype SizeInfo = {\n cardWidth?: number;\n cardHeight?: number;\n containerWidth?: number;\n};\n\nexport function CardFlexView<K extends string | number, D>(props: CardFlexViewProps<K, D>) {\n const rootRef = useRef<HTMLDivElement>(null);\n\n const [size, setSize] = useState<SizeInfo>({});\n const updateCardSize = useCallback((cardWidth: number, cardHeight: number) => {\n setSize((size) => ({ ...size, cardWidth, cardHeight }));\n }, []);\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n const containerWidth = entry.contentRect.width;\n if (size.containerWidth !== containerWidth) {\n setSize((size) => ({ ...size, containerWidth }));\n }\n },\n [size]\n );\n useResizeObserver(rootRef, handleResize);\n\n const gutterSizePX = gutterSizeToPX[props.gutterSize || 'sm'];\n const columns = getColCount(gutterSizePX, size.cardWidth, size.containerWidth);\n const cardSize = { width: size.cardWidth, height: size.cardHeight };\n\n return (\n <BaseCardView\n {...props}\n ref={rootRef}\n layout=\"flex\"\n columns={columns}\n cardSize={cardSize}\n updateCardSize={updateCardSize}\n />\n );\n}\n"],"names":["props","rootRef","useRef","size","setSize","useState","updateCardSize","useCallback","cardWidth","cardHeight","handleResize","entry","containerWidth","contentRect","width","useResizeObserver","gutterSizePX","gutterSizeToPX","gutterSize","columns","getColCount","cardSize","height","_jsx","BaseCardView","ref","layout"],"mappings":"iKAYM,SAAqDA,GACzD,MAAMC,EAAUC,SAAuB,OAEhCC,EAAMC,GAAWC,EAAQA,SAAW,CAAE,GACvCC,EAAiBC,EAAAA,aAAY,CAACC,EAAmBC,KACrDL,GAASD,QAAeA,EAAMK,YAAWC,gBAAc,GACtD,IAEGC,EAAeH,eAClBI,IACC,MAAMC,EAAiBD,EAAME,YAAYC,MACrCX,EAAKS,iBAAmBA,GAC1BR,GAASD,IAAU,IAAKA,EAAMS,oBAC/B,GAEH,CAACT,IAEHY,oBAAkBd,EAASS,GAE3B,MAAMM,EAAeC,EAAcA,eAACjB,EAAMkB,YAAc,MAClDC,EAAUC,EAAAA,YAAYJ,EAAcb,EAAKK,UAAWL,EAAKS,gBACzDS,EAAW,CAAEP,MAAOX,EAAKK,UAAWc,OAAQnB,EAAKM,YAEvD,OACEc,EAAAA,IAACC,EAAAA,aACK,IAAAxB,EACJyB,IAAKxB,EACLyB,OAAO,OACPP,QAASA,EACTE,SAAUA,EACVf,eAAgBA,GAGtB"}
1
+ {"version":3,"file":"CardFlexView-d3eb7373.js","sources":["../../src/UNSAFE_CardFlexView/CardFlexView.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'preact/hooks';\nimport { useResizeObserver } from '../hooks/UNSAFE_useResizeObserver';\nimport { BaseCardView, gutterSizeToPX, getColCount } from '../PRIVATE_BaseCardView';\nimport { BaseCardViewPublicProps as Props } from './BaseCardView.types';\n\ntype CardFlexViewProps<K extends string | number, D> = Props<K, D>;\ntype SizeInfo = {\n cardWidth?: number;\n cardHeight?: number;\n containerWidth?: number;\n};\n\nexport function CardFlexView<K extends string | number, D>(props: CardFlexViewProps<K, D>) {\n const rootRef = useRef<HTMLDivElement>(null);\n\n const [size, setSize] = useState<SizeInfo>({});\n const updateCardSize = useCallback((cardWidth: number, cardHeight: number) => {\n setSize((size) => ({ ...size, cardWidth, cardHeight }));\n }, []);\n\n const handleResize = useCallback(\n (entry: ResizeObserverEntry) => {\n const containerWidth = entry.contentRect.width;\n if (size.containerWidth !== containerWidth) {\n setSize((size) => ({ ...size, containerWidth }));\n }\n },\n [size]\n );\n useResizeObserver(rootRef, handleResize);\n\n const gutterSizePX = gutterSizeToPX[props.gutterSize || 'sm'];\n const columns = getColCount(gutterSizePX, size.cardWidth, size.containerWidth);\n const cardSize = { width: size.cardWidth, height: size.cardHeight };\n\n return (\n <BaseCardView\n {...props}\n ref={rootRef}\n layout=\"flex\"\n columns={columns}\n cardSize={cardSize}\n updateCardSize={updateCardSize}\n />\n );\n}\n"],"names":["props","rootRef","useRef","size","setSize","useState","updateCardSize","useCallback","cardWidth","cardHeight","handleResize","entry","containerWidth","contentRect","width","useResizeObserver","gutterSizePX","gutterSizeToPX","gutterSize","columns","getColCount","cardSize","height","_jsx","BaseCardView","ref","layout"],"mappings":"iKAYM,SAAqDA,GACzD,MAAMC,EAAUC,SAAuB,OAEhCC,EAAMC,GAAWC,EAAQA,SAAW,CAAE,GACvCC,EAAiBC,EAAAA,aAAY,CAACC,EAAmBC,KACrDL,GAASD,QAAeA,EAAMK,YAAWC,gBAAc,GACtD,IAEGC,EAAeH,eAClBI,IACC,MAAMC,EAAiBD,EAAME,YAAYC,MACrCX,EAAKS,iBAAmBA,GAC1BR,GAASD,IAAU,IAAKA,EAAMS,oBAC/B,GAEH,CAACT,IAEHY,oBAAkBd,EAASS,GAE3B,MAAMM,EAAeC,EAAcA,eAACjB,EAAMkB,YAAc,MAClDC,EAAUC,EAAAA,YAAYJ,EAAcb,EAAKK,UAAWL,EAAKS,gBACzDS,EAAW,CAAEP,MAAOX,EAAKK,UAAWc,OAAQnB,EAAKM,YAEvD,OACEc,EAAAA,IAACC,EAAAA,aACK,IAAAxB,EACJyB,IAAKxB,EACLyB,OAAO,OACPP,QAASA,EACTE,SAAUA,EACVf,eAAgBA,GAGtB"}
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', './BaseCardView-16fda4c3'], (function(e,t,a,i){"use strict";e.CardGridView=function(e){const[r,d]=a.useState({}),s=a.useCallback(((e,t)=>{d({width:e,height:t})}),[]);return t.jsx(i.BaseCardView,{...e,layout:"grid",cardSize:r,updateCardSize:s})}}));
2
+ //# sourceMappingURL=CardGridView-842f70cd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardGridView-85f90c75.js","sources":["../../src/UNSAFE_CardGridView/CardGridView.tsx"],"sourcesContent":["import { useCallback, useState } from 'preact/hooks';\nimport { BaseCardView } from '../PRIVATE_BaseCardView';\nimport { Props } from '../UNSAFE_CardFlexView';\n\ntype CardGridProps<K extends string | number, D> = Props<K, D> & {\n /**\n * Provide the number of columns to render. The number of columns is required for CardGridView component.\n * If the number of columns is not provided, please use CardFlexView component.\n */\n columns: number;\n};\n\nexport function CardGridView<K extends string | number, D>(props: CardGridProps<K, D>) {\n const [cardSize, setCardSize] = useState<{ width?: number; height?: number }>({});\n const updateCardSize = useCallback((width: number, height: number) => {\n setCardSize({ width, height });\n }, []);\n\n return (\n <BaseCardView {...props} layout=\"grid\" cardSize={cardSize} updateCardSize={updateCardSize} />\n );\n}\n"],"names":["props","cardSize","setCardSize","useState","updateCardSize","useCallback","width","height","_jsx","BaseCardView","layout"],"mappings":"gIAYM,SAAqDA,GACzD,MAAOC,EAAUC,GAAeC,EAAQA,SAAsC,CAAE,GAC1EC,EAAiBC,EAAAA,aAAY,CAACC,EAAeC,KACjDL,EAAY,CAAEI,QAAOC,UAAS,GAC7B,IAEH,OACEC,MAACC,EAAAA,iBAAiBT,EAAOU,OAAO,OAAOT,SAAUA,EAAUG,eAAgBA,GAE/E"}
1
+ {"version":3,"file":"CardGridView-842f70cd.js","sources":["../../src/UNSAFE_CardGridView/CardGridView.tsx"],"sourcesContent":["import { useCallback, useState } from 'preact/hooks';\nimport { BaseCardView } from '../PRIVATE_BaseCardView';\nimport { Props } from '../UNSAFE_CardFlexView';\n\ntype CardGridProps<K extends string | number, D> = Props<K, D> & {\n /**\n * Provide the number of columns to render. The number of columns is required for CardGridView component.\n * If the number of columns is not provided, please use CardFlexView component.\n */\n columns: number;\n};\n\nexport function CardGridView<K extends string | number, D>(props: CardGridProps<K, D>) {\n const [cardSize, setCardSize] = useState<{ width?: number; height?: number }>({});\n const updateCardSize = useCallback((width: number, height: number) => {\n setCardSize({ width, height });\n }, []);\n\n return (\n <BaseCardView {...props} layout=\"grid\" cardSize={cardSize} updateCardSize={updateCardSize} />\n );\n}\n"],"names":["props","cardSize","setCardSize","useState","updateCardSize","useCallback","width","height","_jsx","BaseCardView","layout"],"mappings":"gIAYM,SAAqDA,GACzD,MAAOC,EAAUC,GAAeC,EAAQA,SAAsC,CAAE,GAC1EC,EAAiBC,EAAAA,aAAY,CAACC,EAAeC,KACjDL,EAAY,CAAEI,QAAOC,UAAS,GAC7B,IAEH,OACEC,MAACC,EAAAA,iBAAiBT,EAAOU,OAAO,OAAOT,SAAUA,EAAUG,eAAgBA,GAE/E"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', './useCurrentKey-5749e7fb', './collectionUtils-77dc5fa1', 'preact/hooks', 'preact', './Flex-4b81b412', './mergeProps-bcfa6a92', './usePress-949a0d03', './Text-31cabc49', './Badge-b28ef084', './WarningS-98a81abe', './ErrorS-d91c3db2', './InformationS-53490112', './SuccessS-eb8fd915', './useComponentTheme-5aa41a8f', './PRIVATE_CollapsibleNavigationList/themes/CollapsibleNavigationListItemContract.css', './PRIVATE_CollapsibleNavigationList/themes/redwood/CollapsibleNavigationListItemTheme', './useInteractionStyle-15a2bdd0', './useUser-08901aba', './classNames-08d99695', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './Expander-8808dc90', './useCollectionFocusRing-ae19cd81', './PRIVATE_CollapsibleNavigationList/themes/CollapsibleNavigationListStyles.css'], (function(e,t,s,n,i,r,a,l,o,c,d,u,g,m,y,v,h,x,p,b,f,S,j,K,C,I){"use strict";const P=r.createContext(null);const w=({item:e,level:s})=>{const n=Array.isArray(e.children)&&e.children.length>0,r=e.itemKey,h=e.label,{selection:C,onToggle:I,onSelect:T,expandedKeys:A,showFocusRing:N,currentKey:L,navigationListItemPrefix:H}=i.useContext(P),E=n&&A?.has(e.itemKey),F=i.useCallback((()=>{T?.({value:e.itemKey}),n&&I?.({value:e.itemKey})}),[r,T,I,n]),{pressProps:k}=o.usePress(F),U=L===r,V=C===r,{interactionProps:D,applyPseudoHoverStyle:_,applyHoverStyle:z,applyActiveStyle:M}=p.useInteractionStyle(),B={...l.mergeProps(k,D)},W=H+r,$=!("none"===e.severity||void 0===e.severity),q=e.metadata||$||e.badge,O=S.mergeInterpolations([...Object.values(j.flexitemInterpolations)]),{class:G,...J}=O({alignSelf:"center"}),{direction:Q}=b.useUser(),X="rtl"===Q,{classes:Y,styles:{labelContainerClasses:Z,iconLabelContainer:ee,iconContainer:te,navigationItemMetadata:se},baseTheme:ne}=v.useComponentTheme(x.NavigationListItemRedwoodTheme,{focusRing:N?"isFocusRing":"notFocusRing",current:U?"isCurrent":"notCurrent",selected:V?"isSelected":"notSelected",direction:X?"isRtl":"notRtl",hybridHover:z?"isHybridHover":"notHybridHover",pseudoHover:_?"isPseudoHover":"notPseudoHover",active:M?"isActive":"notActive"}),ie=J,re=f.classNames([Y]),ae=f.classNames([se]),le=f.classNames([ee,te]),oe=R(s),ce=e=>{switch(e){case"error":return t.jsx(g.SvgErrorS,{color:"danger"});case"warning":return t.jsx(u.SvgWarningS,{color:"warning"});case"info":return t.jsx(m.SvgInformationS,{color:"info"});case"confirmation":return t.jsx(y.SvgSuccessS,{color:"success"});default:return null}};return t.jsxs("div",{class:ne,children:[t.jsx("div",{role:"treeitem",...B,"aria-expanded":n?E:void 0,"data-oj-key":r,id:W,class:re,"aria-selected":V,children:t.jsx("div",{style:{marginInlineStart:oe,display:"flex",alignItems:"center"},children:t.jsxs(a.Flex,{direction:"row",gap:"2x",align:"center",justify:"center",children:[q?t.jsxs(t.Fragment,{children:[h&&t.jsx("span",{class:Z,style:ie,children:t.jsx(c.Text,{size:"inherit",weight:"inherit",variant:"inherit",children:h})}),(e.metadata||$||e.badge)&&t.jsxs(a.Flex,{gap:"2x",align:"center",justify:"end",flex:"1 1 auto",children:[" ",e.badge&&t.jsx("span",{class:le,children:t.jsx(d.Badge,{size:"md",variant:"neutralSubtle",children:e.badge})}),e.metadata&&t.jsx("span",{class:ae,children:t.jsx(c.Text,{children:"( "+e.metadata+" )"})}),e.severityRequirement&&t.jsx("span",{class:le,children:ce(e.severity)})]})]}):t.jsx("span",{class:Z,style:ie,children:t.jsx(c.Text,{size:"inherit",weight:"inherit",variant:"inherit",children:h})}),n&&t.jsx(K.Expander,{itemKey:r,expanded:E,onToggle:I})]})})}),n&&E&&t.jsx("div",{role:"group",children:e.children.map((e=>t.jsx(w,{itemKey:e.itemKey,label:e.label,item:e,expandedKeys:A,level:s+1,onToggle:I})))})]})},R=e=>`calc(${Math.max(0,e)} * ${h.childItemVars.childItemPadding} )`,T=e=>{const t=new Set,s=new Set,n=[...e];for(;n.length;){const e=n.pop();s.has(e?.itemKey)||(s.add(e?.itemKey),Array.isArray(e?.children)&&e?.children.length>0&&(t.add(e.itemKey),n.push(...e.children)))}return t};e.CollapsibleNavigationList=({items:e,selection:r,expandedKeys:a,edge:o,onToggle:c,onSelect:d})=>{const u=i.useMemo((()=>T(e)),[e]),g=i.useRef(null),[m,y]=C.useCollectionFocusRing(g,["ArrowUp","ArrowDown","Home","End"]),[v,h]=i.useState(r),x='[role="treeitem"]',{currentKeyProps:p}=s.useCurrentKey((e=>n.keyExtractor(e,x)),!1,!1,n.getPrevNextKeyUsingRef(g,v,!0,x),n.getPrevNextKeyUsingRef(g,v,!1,x),void 0,void 0,v,(e=>{const t=e.value;h(t)})),b=i.useId()+"_",S={selection:r,onSelect:d,onToggle:c,expandedKeys:a,edge:o,showFocusRing:m,currentKey:v,navigationListItemPrefix:b};i.useEffect((()=>{if(g.current){const e=n.getItemKeysArray(g.current,x);null==v&&e&&(null!=r&&e.includes(r)?h(r):e.length>0&&h(e[0]))}}),[e,v,g,r]);const j={onKeyDown:e=>{if(g.current&&null!=v){if("Home"===e.key||"End"===e.key){const t=n.getItemKeysArray(g.current,x);e.preventDefault(),h?.(t["Home"===e.key?0:t.length-1])}"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),d?.({value:v}),u.has(v)&&c?.({value:v})),"ArrowRight"===e.key&&(!u.has(v)||a&&a.has(v)||c?.({value:v})),"ArrowLeft"===e.key&&u.has(v)&&a&&a.has(v)&&c?.({value:v})}},onFocus:()=>{if(g.current&&void 0===v){const e=n.getFirstVisibleKey(g.current,x);null!=e&&h(e)}}},K=f.classNames([I.navigationListStyles.uListStyle]);return t.jsx(P.Provider,{value:S,children:t.jsx("div",{role:"tree",class:K,ref:g,...l.mergeProps(p,y,j),tabindex:0,"aria-activedescendant":v?b:"",children:e.map((e=>t.jsx(w,{itemKey:e.itemKey,item:e,expandedKeys:a,level:0,label:e.label,onToggle:c})))})})}}));
2
- //# sourceMappingURL=CollapsibleNavigationList-f0072c90.js.map
1
+ define(['exports', 'preact/jsx-runtime', './useCurrentKey-5749e7fb', './collectionUtils-77dc5fa1', 'preact/hooks', 'preact', './Expander-8808dc90', './Flex-4b81b412', './mergeProps-bcfa6a92', './usePress-949a0d03', './Text-31cabc49', './Badge-b28ef084', './WarningS-98a81abe', './ErrorS-d91c3db2', './InformationS-53490112', './SuccessS-eb8fd915', './useComponentTheme-5aa41a8f', './PRIVATE_CollapsibleNavigationList/themes/CollapsibleNavigationListItemContract.css', './PRIVATE_CollapsibleNavigationList/themes/redwood/CollapsibleNavigationListItemTheme', './useInteractionStyle-15a2bdd0', './useUser-08901aba', './classNames-08d99695', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './useCollectionFocusRing-ae19cd81', './PRIVATE_CollapsibleNavigationList/themes/CollapsibleNavigationListStyles.css'], (function(e,t,s,n,i,r,a,l,o,c,d,u,g,m,y,v,h,x,p,b,f,S,j,K,C,I){"use strict";const P=r.createContext(null);const w=({item:e,level:s})=>{const n=Array.isArray(e.children)&&e.children.length>0,r=e.itemKey,x=e.label,{selection:C,onToggle:I,onSelect:T,expandedKeys:A,showFocusRing:N,currentKey:L,navigationListItemPrefix:H}=i.useContext(P),E=n&&A?.has(e.itemKey),F=i.useCallback((()=>{T?.({value:e.itemKey}),n&&I?.({value:e.itemKey})}),[r,T,I,n]),{pressProps:k}=c.usePress(F),U=L===r,V=C===r,{interactionProps:D,applyPseudoHoverStyle:_,applyHoverStyle:z,applyActiveStyle:M}=b.useInteractionStyle(),B={...o.mergeProps(k,D)},W=H+r,$=!("none"===e.severity||void 0===e.severity),q=e.metadata||$||e.badge,O=j.mergeInterpolations([...Object.values(K.flexitemInterpolations)]),{class:G,...J}=O({alignSelf:"center"}),{direction:Q}=f.useUser(),X="rtl"===Q,{classes:Y,styles:{labelContainerClasses:Z,iconLabelContainer:ee,iconContainer:te,navigationItemMetadata:se},baseTheme:ne}=h.useComponentTheme(p.NavigationListItemRedwoodTheme,{focusRing:N?"isFocusRing":"notFocusRing",current:U?"isCurrent":"notCurrent",selected:V?"isSelected":"notSelected",direction:X?"isRtl":"notRtl",hybridHover:z?"isHybridHover":"notHybridHover",pseudoHover:_?"isPseudoHover":"notPseudoHover",active:M?"isActive":"notActive"}),ie=J,re=S.classNames([Y]),ae=S.classNames([se]),le=S.classNames([ee,te]),oe=R(s),ce=e=>{switch(e){case"error":return t.jsx(m.SvgErrorS,{color:"danger"});case"warning":return t.jsx(g.SvgWarningS,{color:"warning"});case"info":return t.jsx(y.SvgInformationS,{color:"info"});case"confirmation":return t.jsx(v.SvgSuccessS,{color:"success"});default:return null}};return t.jsxs("div",{class:ne,children:[t.jsx("div",{role:"treeitem",...B,"aria-expanded":n?E:void 0,"data-oj-key":r,id:W,class:re,"aria-selected":V,children:t.jsx("div",{style:{marginInlineStart:oe,display:"flex",alignItems:"center"},children:t.jsxs(l.Flex,{direction:"row",gap:"2x",align:"center",justify:"center",children:[q?t.jsxs(t.Fragment,{children:[x&&t.jsx("span",{class:Z,style:ie,children:t.jsx(d.Text,{size:"inherit",weight:"inherit",variant:"inherit",children:x})}),(e.metadata||$||e.badge)&&t.jsxs(l.Flex,{gap:"2x",align:"center",justify:"end",flex:"1 1 auto",children:[" ",e.badge&&t.jsx("span",{class:le,children:t.jsx(u.Badge,{size:"md",variant:"neutralSubtle",children:e.badge})}),e.metadata&&t.jsx("span",{class:ae,children:t.jsx(d.Text,{children:"( "+e.metadata+" )"})}),e.severityRequirement&&t.jsx("span",{class:le,children:ce(e.severity)})]})]}):t.jsx("span",{class:Z,style:ie,children:t.jsx(d.Text,{size:"inherit",weight:"inherit",variant:"inherit",children:x})}),n&&t.jsx(a.Expander,{itemKey:r,expanded:E,onToggle:I})]})})}),n&&E&&t.jsx("div",{role:"group",children:e.children.map((e=>t.jsx(w,{itemKey:e.itemKey,label:e.label,item:e,expandedKeys:A,level:s+1,onToggle:I})))})]})},R=e=>`calc(${Math.max(0,e)} * ${x.childItemVars.childItemPadding} )`,T=e=>{const t=new Set,s=new Set,n=[...e];for(;n.length;){const e=n.pop();s.has(e?.itemKey)||(s.add(e?.itemKey),Array.isArray(e?.children)&&e?.children.length>0&&(t.add(e.itemKey),n.push(...e.children)))}return t};e.CollapsibleNavigationList=({items:e,selection:r,expandedKeys:a,edge:l,onToggle:c,onSelect:d})=>{const u=i.useMemo((()=>T(e)),[e]),g=i.useRef(null),[m,y]=C.useCollectionFocusRing(g,["ArrowUp","ArrowDown","Home","End"]),[v,h]=i.useState(r),x='[role="treeitem"]',{currentKeyProps:p}=s.useCurrentKey((e=>n.keyExtractor(e,x)),!1,!1,n.getPrevNextKeyUsingRef(g,v,!0,x),n.getPrevNextKeyUsingRef(g,v,!1,x),void 0,void 0,v,(e=>{const t=e.value;h(t)})),b=i.useId()+"_",f={selection:r,onSelect:d,onToggle:c,expandedKeys:a,edge:l,showFocusRing:m,currentKey:v,navigationListItemPrefix:b};i.useEffect((()=>{if(g.current){const e=n.getItemKeysArray(g.current,x);null==v&&e&&(null!=r&&e.includes(r)?h(r):e.length>0&&h(e[0]))}}),[e,v,g,r]);const j={onKeyDown:e=>{if(g.current&&null!=v){if("Home"===e.key||"End"===e.key){const t=n.getItemKeysArray(g.current,x);e.preventDefault(),h?.(t["Home"===e.key?0:t.length-1])}"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),d?.({value:v}),u.has(v)&&c?.({value:v})),"ArrowRight"===e.key&&(!u.has(v)||a&&a.has(v)||c?.({value:v})),"ArrowLeft"===e.key&&u.has(v)&&a&&a.has(v)&&c?.({value:v})}},onFocus:()=>{if(g.current&&void 0===v){const e=n.getFirstVisibleKey(g.current,x);null!=e&&h(e)}}},K=S.classNames([I.navigationListStyles.uListStyle]);return t.jsx(P.Provider,{value:f,children:t.jsx("div",{role:"tree",class:K,ref:g,...o.mergeProps(p,y,j),tabindex:0,"aria-activedescendant":v?b:"",children:e.map((e=>t.jsx(w,{itemKey:e.itemKey,item:e,expandedKeys:a,level:0,label:e.label,onToggle:c})))})})}}));
2
+ //# sourceMappingURL=CollapsibleNavigationList-fdeccbfb.js.map