@oracle/oraclejet-preact 20.1.3 → 20.1.5

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 (1363) hide show
  1. package/amd/AccordionItemMultiple-ff9bc272.js +1 -1
  2. package/amd/AccordionItemSingle-a6082157.js +1 -1
  3. package/amd/AvatarVariants.styles.css +25 -25
  4. package/amd/AvatarVariants.styles2.css +25 -25
  5. package/amd/BadgeVariants.styles.css +14 -14
  6. package/amd/BadgeVariants.styles2.css +14 -14
  7. package/amd/BarChart-aed6b204.js +1 -1
  8. package/amd/{BaseButton-d0f59de5.js → BaseButton-e92d9a48.js} +2 -2
  9. package/amd/{BaseButton-d0f59de5.js.map → BaseButton-e92d9a48.js.map} +1 -1
  10. package/amd/BaseCardView-b8f9f997.js +2 -0
  11. package/amd/{BaseCardView-131755ff.js.map → BaseCardView-b8f9f997.js.map} +1 -1
  12. package/amd/{BaseCardViewSelectionTest-9afea995.js → BaseCardViewSelectionTest-284cb1a9.js} +2 -2
  13. package/amd/{BaseCardViewSelectionTest-9afea995.js.map → BaseCardViewSelectionTest-284cb1a9.js.map} +1 -1
  14. package/amd/BaseDiagram-3bde785f.js +1 -1
  15. package/amd/BaseRichSelection-2a239000.js +1 -1
  16. package/amd/BaseSelector-6879e9b8.js +1 -1
  17. package/amd/BaseSwatchView-76face8e.js +1 -1
  18. package/amd/BaseTabBarItem-bdd9ea3b.js +1 -1
  19. package/amd/{Button-2f632753.js → Button-ceeb05f2.js} +2 -2
  20. package/amd/{Button-2f632753.js.map → Button-ceeb05f2.js.map} +1 -1
  21. package/amd/ButtonSet-9f26cc51.js +1 -1
  22. package/amd/ButtonSetButton-3aef83e6.js +1 -1
  23. package/amd/ButtonSetIconButton-2e7f9c98.js +1 -1
  24. package/amd/{CardFlexView-68b7bf6f.js → CardFlexView-beb5a7a8.js} +2 -2
  25. package/amd/{CardFlexView-68b7bf6f.js.map → CardFlexView-beb5a7a8.js.map} +1 -1
  26. package/amd/{CardGridView-886ae6b3.js → CardGridView-48a478e0.js} +2 -2
  27. package/amd/{CardGridView-886ae6b3.js.map → CardGridView-48a478e0.js.map} +1 -1
  28. package/amd/{Center-17925696.js → Center-27a71002.js} +2 -2
  29. package/amd/{Center-17925696.js.map → Center-27a71002.js.map} +1 -1
  30. package/amd/Chart-bf9828b6.js +1 -1
  31. package/amd/Checkbox-b38db527.js +1 -1
  32. package/amd/CheckboxControl-38454610.js +1 -1
  33. package/amd/CheckboxRadioField-91def532.js +1 -1
  34. package/amd/CheckboxRadioLabelValueLayout-3a870309.js +1 -1
  35. package/amd/CheckboxSet-bc17a1ee.js +1 -1
  36. package/amd/Chip-8280de2e.js +1 -1
  37. package/amd/ClearIcon-9d632986.js +1 -1
  38. package/amd/CollapseIcon-cff32243.js +1 -1
  39. package/amd/Collapsible-e71affa0.js +1 -1
  40. package/amd/CollapsibleNavigationList-1d252cbd.js +1 -1
  41. package/amd/ColorPalette-a6758c98.js +1 -1
  42. package/amd/{ColorPicker-764b0235.js → ColorPicker-4a18c4b0.js} +2 -2
  43. package/amd/{ColorPicker-764b0235.js.map → ColorPicker-4a18c4b0.js.map} +1 -1
  44. package/amd/ColorPickerVariants.styles.css +1 -1
  45. package/amd/ColorPickerVariants.styles2.css +1 -1
  46. package/amd/ColorSwatch-a705f4b1.js +1 -1
  47. package/amd/ComboChart-0525c350.js +1 -1
  48. package/amd/CompactHelpSource-476fa2f8.js +1 -1
  49. package/amd/CompactLabelAssistance-89684859.js +2 -0
  50. package/amd/{CompactLabelAssistance-002f7b2f.js.map → CompactLabelAssistance-89684859.js.map} +1 -1
  51. package/amd/CompactUserAssistance-b2b73f46.js +1 -1
  52. package/amd/ComponentMessageContainer-04fb3402.js +1 -1
  53. package/amd/ConveyorBelt-1d6d2d8a.js +1 -1
  54. package/amd/{DatePicker-e2fecffc.js → DatePicker-71cb7d07.js} +2 -2
  55. package/amd/{DatePicker-e2fecffc.js.map → DatePicker-71cb7d07.js.map} +1 -1
  56. package/amd/DatePickerHeader-d0dd7b4a.js +1 -1
  57. package/amd/DiagramStyles.styles2.css +16 -10
  58. package/amd/DiagramStyles.styles3.css +10 -16
  59. package/amd/{Dialog-fa8a5012.js → Dialog-0c124587.js} +2 -2
  60. package/amd/{Dialog-fa8a5012.js.map → Dialog-0c124587.js.map} +1 -1
  61. package/amd/DirectionalCollapseArrowIcon-6294b628.js +1 -1
  62. package/amd/DirectionalExpandArrowIcon-c3e50398.js +1 -1
  63. package/amd/DragHandle-75151eea.js +2 -0
  64. package/amd/{DragHandle-ebe5c3ae.js.map → DragHandle-75151eea.js.map} +1 -1
  65. package/amd/{DrawerPopup-1ee2f5e2.js → DrawerPopup-5e03ba8c.js} +2 -2
  66. package/amd/{DrawerPopup-1ee2f5e2.js.map → DrawerPopup-5e03ba8c.js.map} +1 -1
  67. package/amd/DrawerPopupVariants.styles.css +5 -5
  68. package/amd/DrawerPopupVariants.styles2.css +5 -5
  69. package/amd/{Dropdown-a26fb975.js → Dropdown-45cc6812.js} +2 -2
  70. package/amd/{Dropdown-a26fb975.js.map → Dropdown-45cc6812.js.map} +1 -1
  71. package/amd/EmbeddedIconButton-9647e9af.js +2 -0
  72. package/amd/{EmbeddedIconButton-49aab46c.js.map → EmbeddedIconButton-9647e9af.js.map} +1 -1
  73. package/amd/{EnvironmentProvider-403bf554.js → EnvironmentProvider-75ba928e.js} +2 -2
  74. package/amd/{EnvironmentProvider-403bf554.js.map → EnvironmentProvider-75ba928e.js.map} +1 -1
  75. package/amd/ExpandableList-d1320214.js +1 -1
  76. package/amd/Expander-3c749f26.js +1 -1
  77. package/amd/FilePicker-1017e6ed.js +1 -1
  78. package/amd/FilePickerVariants.styles.css +2 -2
  79. package/amd/FilePickerVariants.styles2.css +2 -2
  80. package/amd/FlatTreeView-85c3556a.js +1 -1
  81. package/amd/Flex-71f83c12.js +2 -0
  82. package/amd/{Flex-4b81b412.js.map → Flex-71f83c12.js.map} +1 -1
  83. package/amd/{Floating-eca152d7.js → Floating-e8ec1b0b.js} +2 -2
  84. package/amd/{Floating-eca152d7.js.map → Floating-e8ec1b0b.js.map} +1 -1
  85. package/amd/FormLayout-4cd8a8a5.js +1 -1
  86. package/amd/FormLayoutVariants.styles.css +14 -14
  87. package/amd/FormLayoutVariants.styles2.css +14 -14
  88. package/amd/Gantt-5b813f62.js +1 -1
  89. package/amd/{Grid-caac1c86.js → Grid-5324e17b.js} +2 -2
  90. package/amd/{Grid-caac1c86.js.map → Grid-5324e17b.js.map} +1 -1
  91. package/amd/GroupLoadingIndicator-61328f4c.js +1 -1
  92. package/amd/HighlightText-365ba020.js +2 -0
  93. package/amd/{HighlightText-ee76c447.js.map → HighlightText-365ba020.js.map} +1 -1
  94. package/amd/Icon-1e9e773e.js +1 -1
  95. package/amd/IconButton-be3bd92a.js +1 -1
  96. package/amd/IconMenuButton-9cd87d50.js +1 -1
  97. package/amd/IconProgressButton-a793a7e7.js +1 -1
  98. package/amd/IconSwitchButton-e89dd18a.js +1 -1
  99. package/amd/IconToggleButton-e8488f70.js +1 -1
  100. package/amd/{IconUserAssistance-b5908d4a.js → IconUserAssistance-b856425b.js} +2 -2
  101. package/amd/{IconUserAssistance-b5908d4a.js.map → IconUserAssistance-b856425b.js.map} +1 -1
  102. package/amd/Indexer-cb626ecf.js +1 -1
  103. package/amd/InlineHelpSource-ab765897.js +1 -1
  104. package/amd/InlineSelectSingle-9222b0eb.js +1 -1
  105. package/amd/InlineUserAssistance-18d1d457.js +1 -1
  106. package/amd/InputColor-b4b0e701.js +1 -1
  107. package/amd/InputDateMask-f783e5c6.js +1 -1
  108. package/amd/InputDatePicker-7b8c3f34.js +2 -0
  109. package/amd/{InputDatePicker-e1b3a4ec.js.map → InputDatePicker-7b8c3f34.js.map} +1 -1
  110. package/amd/InputPassword-d0a245dd.js +1 -1
  111. package/amd/InputSensitiveText-382cbdb0.js +1 -1
  112. package/amd/InputText-41e15f52.js +1 -1
  113. package/amd/Label-bb51506c.js +1 -1
  114. package/amd/LabelValueLayout-20843443.js +1 -1
  115. package/amd/LabelledLinkVariants.styles.css +3 -3
  116. package/amd/LabelledLinkVariants.styles2.css +3 -3
  117. package/amd/{Layer-1971eddb.js → Layer-64bf71ad.js} +2 -2
  118. package/amd/{Layer-1971eddb.js.map → Layer-64bf71ad.js.map} +1 -1
  119. package/amd/{LayerHost-0b288129.js → LayerHost-1a734852.js} +2 -2
  120. package/amd/{LayerHost-0b288129.js.map → LayerHost-1a734852.js.map} +1 -1
  121. package/amd/LayerManager-5ba8e6ed.js +2 -0
  122. package/amd/{LayerManager-426c669d.js.map → LayerManager-5ba8e6ed.js.map} +1 -1
  123. package/amd/Legend-a5c5da73.js +1 -1
  124. package/amd/LineAreaChart-0a7c48c0.js +1 -1
  125. package/amd/Link-aef5429d.js +1 -1
  126. package/amd/List-99db89cc.js +1 -1
  127. package/amd/{ListItemLayout-2dbba38a.js → ListItemLayout-23390b90.js} +2 -2
  128. package/amd/{ListItemLayout-2dbba38a.js.map → ListItemLayout-23390b90.js.map} +1 -1
  129. package/amd/ListStyles.styles.css +7 -133
  130. package/amd/ListStyles.styles2.css +133 -7
  131. package/amd/ListView-e2d36a70.js +2 -0
  132. package/amd/{ListView-7af453a0.js.map → ListView-e2d36a70.js.map} +1 -1
  133. package/amd/LiveRegion-1553833d.js +2 -0
  134. package/amd/{LiveRegion-dbefb95b.js.map → LiveRegion-1553833d.js.map} +1 -1
  135. package/amd/{MaxLengthLiveRegion-8f9f7247.js → MaxLengthLiveRegion-5172c87a.js} +2 -2
  136. package/amd/{MaxLengthLiveRegion-8f9f7247.js.map → MaxLengthLiveRegion-5172c87a.js.map} +1 -1
  137. package/amd/Menu-0c230049.js +1 -1
  138. package/amd/MenuButton-10be141e.js +1 -1
  139. package/amd/MenuItem-8456d6e2.js +1 -1
  140. package/amd/Message-215f9d76.js +1 -1
  141. package/amd/MessageBanner-b16bf82a.js +1 -1
  142. package/amd/MessageBannerVariants.styles.css +2 -2
  143. package/amd/MessageBannerVariants.styles2.css +2 -2
  144. package/amd/MessageLayer-3c3156a8.js +2 -0
  145. package/amd/{MessageLayer-29d1f82c.js.map → MessageLayer-3c3156a8.js.map} +1 -1
  146. package/amd/MessageToast-c968b70e.js +1 -1
  147. package/amd/MessagesManager-33f8965e.js +1 -1
  148. package/amd/MeterBar-5bc359f6.js +1 -1
  149. package/amd/MeterCircle-b6971795.js +1 -1
  150. package/amd/Modal-95bf034f.js +1 -1
  151. package/amd/{MonthView-83028b09.js → MonthView-61364398.js} +2 -2
  152. package/amd/{MonthView-83028b09.js.map → MonthView-61364398.js.map} +1 -1
  153. package/amd/NavigationListItem-13378f8f.js +2 -0
  154. package/amd/NavigationListItem-13378f8f.js.map +1 -0
  155. package/amd/NavigationListLinkItem-82fd633c.js +2 -0
  156. package/amd/NavigationListLinkItem-82fd633c.js.map +1 -0
  157. package/amd/NumberInputText-bc20c26b.js +1 -1
  158. package/amd/OverflowTabBar-2799b824.js +2 -0
  159. package/amd/OverflowTabBar-2799b824.js.map +1 -0
  160. package/amd/OverflowTabBarItem-be8cd2ae.js +2 -0
  161. package/amd/{OverflowTabBarItem-51015785.js.map → OverflowTabBarItem-be8cd2ae.js.map} +1 -1
  162. package/amd/PRIVATE_BaseCardView.js +1 -1
  163. package/amd/PRIVATE_BaseDiagram.js +1 -1
  164. package/amd/PRIVATE_BaseSelector.js +1 -1
  165. package/amd/PRIVATE_BaseSwatchView.js +1 -1
  166. package/amd/PRIVATE_Chart.js +1 -1
  167. package/amd/PRIVATE_CheckboxControl.js +1 -1
  168. package/amd/PRIVATE_CheckboxRadioField.js +1 -1
  169. package/amd/PRIVATE_ClearIcon.js +1 -1
  170. package/amd/PRIVATE_CollapsibleNavigationList.js +1 -1
  171. package/amd/PRIVATE_DatePickerHeader.js +1 -1
  172. package/amd/PRIVATE_DatePickerLayout.js +1 -1
  173. package/amd/PRIVATE_EmbeddedIconButton.js +1 -1
  174. package/amd/PRIVATE_Expander.js +1 -1
  175. package/amd/PRIVATE_FormControls.js +1 -1
  176. package/amd/PRIVATE_FormControls.js.map +1 -1
  177. package/amd/PRIVATE_IconSwitchButton.js +1 -1
  178. package/amd/PRIVATE_Icons/CheckboxCrossed.js +1 -1
  179. package/amd/PRIVATE_Icons/CheckboxMixed.js +1 -1
  180. package/amd/PRIVATE_Icons/CheckboxOff.js +1 -1
  181. package/amd/PRIVATE_Icons/CheckboxOn.js +1 -1
  182. package/amd/PRIVATE_Icons/DragV.js +1 -1
  183. package/amd/PRIVATE_Icons/None.js +1 -1
  184. package/amd/PRIVATE_List/themes/ListStyles.css.js +1 -1
  185. package/amd/PRIVATE_List.js +1 -1
  186. package/amd/PRIVATE_Message.js +1 -1
  187. package/amd/PRIVATE_MessageLayer.js +1 -1
  188. package/amd/PRIVATE_MonthView.js +1 -1
  189. package/amd/PRIVATE_MonthYearGridView.js +1 -1
  190. package/amd/PRIVATE_PlotArea.js +1 -1
  191. package/amd/PRIVATE_RevealToggleIcon.js +1 -1
  192. package/amd/PRIVATE_RichSelectionCommon.js +1 -1
  193. package/amd/PRIVATE_SelectCommon/themes/dropdownStyles.css.js +1 -1
  194. package/amd/PRIVATE_SelectCommon.js +1 -1
  195. package/amd/PRIVATE_StyledCard.js +1 -1
  196. package/amd/PRIVATE_StyledCheckbox.js +1 -1
  197. package/amd/PRIVATE_StyledSwitch.js +1 -1
  198. package/amd/PRIVATE_SwatchFlexView.js +1 -1
  199. package/amd/PRIVATE_Table.js +1 -1
  200. package/amd/PRIVATE_TableDisplay.js +1 -1
  201. package/amd/PRIVATE_TableList/themes/ListStyles.css.js +1 -1
  202. package/amd/PRIVATE_TableList/themes/redwood/ListTheme.js +1 -1
  203. package/amd/PRIVATE_TableList/themes/redwood/ListTheme.js.map +1 -1
  204. package/amd/PRIVATE_TableList/themes/redwood/ListVariants.css.js +1 -1
  205. package/amd/PRIVATE_TableList/themes/stable/ListTheme.js +1 -1
  206. package/amd/PRIVATE_TableList/themes/stable/ListTheme.js.map +1 -1
  207. package/amd/PRIVATE_TableList/themes/stable/ListVariants.css.js +1 -1
  208. package/amd/PRIVATE_TableList.js +1 -1
  209. package/amd/PRIVATE_ThemedIcons/CalendarIcon.js +1 -1
  210. package/amd/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +1 -1
  211. package/amd/PRIVATE_ThemedIcons/ChartPanIcon.js +1 -1
  212. package/amd/PRIVATE_ThemedIcons/ChartZoomIcon.js +1 -1
  213. package/amd/PRIVATE_ThemedIcons/CheckIcon.js +1 -1
  214. package/amd/PRIVATE_ThemedIcons/CheckboxCrossedIcon.js +1 -1
  215. package/amd/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +1 -1
  216. package/amd/PRIVATE_ThemedIcons/CheckboxOffIcon.js +1 -1
  217. package/amd/PRIVATE_ThemedIcons/CheckboxOnIcon.js +1 -1
  218. package/amd/PRIVATE_ThemedIcons/CloseIcon.js +1 -1
  219. package/amd/PRIVATE_ThemedIcons/CollapseIcon.js +1 -1
  220. package/amd/PRIVATE_ThemedIcons/CollapseUpIcon.js +1 -1
  221. package/amd/PRIVATE_ThemedIcons/DecrementIcon.js +1 -1
  222. package/amd/PRIVATE_ThemedIcons/DeleteIcon.js +1 -1
  223. package/amd/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +1 -1
  224. package/amd/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +1 -1
  225. package/amd/PRIVATE_ThemedIcons/DragHandleIcon.js +1 -1
  226. package/amd/PRIVATE_ThemedIcons/DropdownArrowIcon.js +1 -1
  227. package/amd/PRIVATE_ThemedIcons/ExpandIcon.js +1 -1
  228. package/amd/PRIVATE_ThemedIcons/HelpIcon.js +1 -1
  229. package/amd/PRIVATE_ThemedIcons/IncrementIcon.js +1 -1
  230. package/amd/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +1 -1
  231. package/amd/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +1 -1
  232. package/amd/PRIVATE_ThemedIcons/MessageErrorIcon.js +1 -1
  233. package/amd/PRIVATE_ThemedIcons/MessageInfoIcon.js +1 -1
  234. package/amd/PRIVATE_ThemedIcons/MessageWarningIcon.js +1 -1
  235. package/amd/PRIVATE_ThemedIcons/MinusIcon.js +1 -1
  236. package/amd/PRIVATE_ThemedIcons/NavDownIcon.js +1 -1
  237. package/amd/PRIVATE_ThemedIcons/None.js +1 -1
  238. package/amd/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +1 -1
  239. package/amd/PRIVATE_ThemedIcons/PlusIcon.js +1 -1
  240. package/amd/PRIVATE_ThemedIcons/RadioOffIcon.js +1 -1
  241. package/amd/PRIVATE_ThemedIcons/RadioOnIcon.js +1 -1
  242. package/amd/PRIVATE_ThemedIcons/SortAscendingIcon.js +1 -1
  243. package/amd/PRIVATE_ThemedIcons/SortDescendingIcon.js +1 -1
  244. package/amd/PRIVATE_ThemedIcons/ViewHideIcon.js +1 -1
  245. package/amd/PRIVATE_ThemedIcons/ViewIcon.js +1 -1
  246. package/amd/PRIVATE_TimeComponent.js +1 -1
  247. package/amd/PRIVATE_TruncatingLink.js +1 -1
  248. package/amd/PRIVATE_VisOverview.js +1 -1
  249. package/amd/PRIVATE_VisStatusMessage.js +1 -1
  250. package/amd/PRIVATE_VisTabularDatatip.js +1 -1
  251. package/amd/PictoChart-0350ad5d.js +1 -1
  252. package/amd/PieChart-3b1632a9.js +1 -1
  253. package/amd/{Popup-195ebcbf.js → Popup-224c908e.js} +2 -2
  254. package/amd/{Popup-195ebcbf.js.map → Popup-224c908e.js.map} +1 -1
  255. package/amd/{ProgressBar-198c9eaa.js → ProgressBar-3ba40e55.js} +2 -2
  256. package/amd/{ProgressBar-198c9eaa.js.map → ProgressBar-3ba40e55.js.map} +1 -1
  257. package/amd/ProgressBarVariants.styles.css +1 -1
  258. package/amd/ProgressBarVariants.styles2.css +1 -1
  259. package/amd/ProgressButton-88cd271b.js +1 -1
  260. package/amd/ProgressButtonLabelLayout-c3a53386.js +1 -1
  261. package/amd/{ProgressCircle-64b285b7.js → ProgressCircle-4687b2dc.js} +2 -2
  262. package/amd/{ProgressCircle-64b285b7.js.map → ProgressCircle-4687b2dc.js.map} +1 -1
  263. package/amd/RadioIconVariants.styles.css +3 -3
  264. package/amd/RadioIconVariants.styles2.css +3 -3
  265. package/amd/RadioItem-4d0bc9d4.js +1 -1
  266. package/amd/RadioSet-11931b48.js +1 -1
  267. package/amd/RatingGauge-cc3bc6f5.js +1 -1
  268. package/amd/ReadonlyTextFieldInput-9706fa0f.js +1 -1
  269. package/amd/{ReferenceLineArea-450530dd.js → ReferenceLineArea-27698a8f.js} +2 -2
  270. package/amd/{ReferenceLineArea-450530dd.js.map → ReferenceLineArea-27698a8f.js.map} +1 -1
  271. package/amd/RemovableNavigationListItem-257c9f29.js +2 -0
  272. package/amd/{RemovableNavigationListItem-69964f9b.js.map → RemovableNavigationListItem-257c9f29.js.map} +1 -1
  273. package/amd/RemovableTabBarItem-41219bd9.js +1 -1
  274. package/amd/ReorderableTabBar-83c85e12.js +2 -0
  275. package/amd/{ReorderableTabBar-88812623.js.map → ReorderableTabBar-83c85e12.js.map} +1 -1
  276. package/amd/RevealToggleIcon-cbac4379.js +1 -1
  277. package/amd/ScatterChart-f9737c22.js +1 -1
  278. package/amd/SectionalLegend-bb8ddea0.js +1 -1
  279. package/amd/SectionedContent-83e573fa.js +2 -0
  280. package/amd/{SectionedContent-b3b8c704.js.map → SectionedContent-83e573fa.js.map} +1 -1
  281. package/amd/SegmentStyles.styles.css +12 -9
  282. package/amd/SegmentStyles.styles2.css +9 -12
  283. package/amd/SelectMobileFieldInput-622df695.js +1 -1
  284. package/amd/SelectMultiple-29802730.js +1 -1
  285. package/amd/SelectSingle-1df8db91.js +1 -1
  286. package/amd/{SelectorAll-af8819d1.js → SelectorAll-57f46502.js} +2 -2
  287. package/amd/{SelectorAll-af8819d1.js.map → SelectorAll-57f46502.js.map} +1 -1
  288. package/amd/Sheet-2f362cd6.js +1 -1
  289. package/amd/SortControl-0bad0e70.js +1 -1
  290. package/amd/SplitMenuButton-e0588843.js +1 -1
  291. package/amd/SplitMenuButtonTheme.styles.css +4 -4
  292. package/amd/SplitMenuButtonTheme.styles2.css +4 -4
  293. package/amd/StyledCard-4baafee3.js +1 -1
  294. package/amd/{StyledLabelValueLayout-907bc2d3.js → StyledLabelValueLayout-16ac9a5e.js} +2 -2
  295. package/amd/{StyledLabelValueLayout-907bc2d3.js.map → StyledLabelValueLayout-16ac9a5e.js.map} +1 -1
  296. package/amd/StyledSwitch-70b52e12.js +1 -1
  297. package/amd/StyledTextField-2b9c440e.js +1 -1
  298. package/amd/Submenu-5c9dd132.js +1 -1
  299. package/amd/TabBar-b1a5b152.js +2 -0
  300. package/amd/TabBar-b1a5b152.js.map +1 -0
  301. package/amd/TabBarContextMenu-6f38f6ab.js +1 -1
  302. package/amd/TabBarItemVariants.styles.css +3 -3
  303. package/amd/TabBarItemVariants.styles2.css +3 -3
  304. package/amd/TabBarLayout-4eb6c732.js +1 -1
  305. package/amd/TabBarMixed-89c3bcbf.js +2 -0
  306. package/amd/{TabBarMixed-ec5c495d.js.map → TabBarMixed-89c3bcbf.js.map} +1 -1
  307. package/amd/{TabBarMixedSeparator-019d266b.js → TabBarMixedSeparator-c77d8e96.js} +2 -2
  308. package/amd/{TabBarMixedSeparator-019d266b.js.map → TabBarMixedSeparator-c77d8e96.js.map} +1 -1
  309. package/amd/Table-1cf29ebb.js +1 -1
  310. package/amd/TableColGroup-53b37601.js +1 -1
  311. package/amd/TableDisplay-a8788021.js +1 -1
  312. package/amd/TagCloud-6ce219f4.js +1 -1
  313. package/amd/TextArea-6ef225b5.js +1 -1
  314. package/amd/TextAreaAutosize-26fd8dd5.js +1 -1
  315. package/amd/TextField-9e466a1b.js +1 -1
  316. package/amd/TextFieldInput-b220bd88.js +1 -1
  317. package/amd/Theme-redwood/theme.css +613 -763
  318. package/amd/Theme-stable/theme.css +708 -558
  319. package/amd/TimeComponentCanvas2D-51923749.js +1 -1
  320. package/amd/ToggleButton-8e83d4e6.js +1 -1
  321. package/amd/Toolbar-ad8e9e18.js +1 -1
  322. package/amd/TruncatingBadge-a1a5ff30.js +1 -1
  323. package/amd/TruncatingLink-3ee7b335.js +1 -1
  324. package/amd/TruncatingText-bccd5fe9.js +1 -1
  325. package/amd/UNSAFE_AccordionItemMultiple.js +1 -1
  326. package/amd/UNSAFE_AccordionItemSingle.js +1 -1
  327. package/amd/UNSAFE_ActionCard.js +1 -1
  328. package/amd/UNSAFE_Avatar/themes/redwood/AvatarTheme.js +1 -1
  329. package/amd/UNSAFE_Avatar/themes/redwood/AvatarTheme.js.map +1 -1
  330. package/amd/UNSAFE_Avatar/themes/redwood/AvatarVariants.css.js +1 -1
  331. package/amd/UNSAFE_Avatar/themes/stable/AvatarTheme.js +1 -1
  332. package/amd/UNSAFE_Avatar/themes/stable/AvatarTheme.js.map +1 -1
  333. package/amd/UNSAFE_Avatar/themes/stable/AvatarVariants.css.js +1 -1
  334. package/amd/UNSAFE_Avatar.js +1 -1
  335. package/amd/UNSAFE_Badge/themes/redwood/BadgeTheme.js +1 -1
  336. package/amd/UNSAFE_Badge/themes/redwood/BadgeTheme.js.map +1 -1
  337. package/amd/UNSAFE_Badge/themes/redwood/BadgeVariants.css.js +1 -1
  338. package/amd/UNSAFE_Badge/themes/stable/BadgeTheme.js +1 -1
  339. package/amd/UNSAFE_Badge/themes/stable/BadgeTheme.js.map +1 -1
  340. package/amd/UNSAFE_Badge/themes/stable/BadgeVariants.css.js +1 -1
  341. package/amd/UNSAFE_Badge.js +1 -1
  342. package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
  343. package/amd/UNSAFE_BarChart.js +1 -1
  344. package/amd/UNSAFE_BareButton.js +1 -1
  345. package/amd/UNSAFE_BaseButton/themes/redwood/BaseButtonTheme.js +1 -1
  346. package/amd/UNSAFE_BaseButton/themes/redwood/BaseButtonTheme.js.map +1 -1
  347. package/amd/UNSAFE_BaseButton.js +1 -1
  348. package/amd/UNSAFE_Button.js +1 -1
  349. package/amd/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +1 -1
  350. package/amd/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js.map +1 -1
  351. package/amd/UNSAFE_ButtonSet.js +1 -1
  352. package/amd/UNSAFE_ButtonSetButton.js +1 -1
  353. package/amd/UNSAFE_ButtonSetIconButton.js +1 -1
  354. package/amd/UNSAFE_ButtonSetItem.js +1 -1
  355. package/amd/UNSAFE_ButtonSetMultiple.js +1 -1
  356. package/amd/UNSAFE_ButtonSetSingle.js +1 -1
  357. package/amd/UNSAFE_Card.js +1 -1
  358. package/amd/UNSAFE_CardFlexView.js +1 -1
  359. package/amd/UNSAFE_CardGridView.js +1 -1
  360. package/amd/UNSAFE_Center.js +1 -1
  361. package/amd/UNSAFE_Checkbox.js +1 -1
  362. package/amd/UNSAFE_CheckboxItem.js +1 -1
  363. package/amd/UNSAFE_CheckboxRadioField.js +1 -1
  364. package/amd/UNSAFE_CheckboxSet.js +1 -1
  365. package/amd/UNSAFE_Chip.js +1 -1
  366. package/amd/UNSAFE_Collapsible.js +1 -1
  367. package/amd/UNSAFE_ColorPalette.js +1 -1
  368. package/amd/UNSAFE_ColorPicker/themes/redwood/ColorPickerTheme.js +1 -1
  369. package/amd/UNSAFE_ColorPicker/themes/redwood/ColorPickerTheme.js.map +1 -1
  370. package/amd/UNSAFE_ColorPicker/themes/redwood/ColorPickerVariants.css.js +1 -1
  371. package/amd/UNSAFE_ColorPicker/themes/stable/ColorPickerTheme.js +1 -1
  372. package/amd/UNSAFE_ColorPicker/themes/stable/ColorPickerTheme.js.map +1 -1
  373. package/amd/UNSAFE_ColorPicker/themes/stable/ColorPickerVariants.css.js +1 -1
  374. package/amd/UNSAFE_ColorPicker.js +1 -1
  375. package/amd/UNSAFE_ColorSwatch.js +1 -1
  376. package/amd/UNSAFE_ComboChart.js +1 -1
  377. package/amd/UNSAFE_ComponentMessage.js +1 -1
  378. package/amd/UNSAFE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
  379. package/amd/UNSAFE_ContainerDiagram.js +1 -1
  380. package/amd/UNSAFE_ConveyorBelt.js +1 -1
  381. package/amd/UNSAFE_DatePicker.js +1 -1
  382. package/amd/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
  383. package/amd/UNSAFE_Diagram.js +1 -1
  384. package/amd/UNSAFE_Dialog.js +1 -1
  385. package/amd/UNSAFE_Dialog.js.map +1 -1
  386. package/amd/UNSAFE_DragHandle.js +1 -1
  387. package/amd/UNSAFE_DrawerLayout.js +1 -1
  388. package/amd/UNSAFE_DrawerPopup/themes/redwood/DrawerPopupTheme.js +1 -1
  389. package/amd/UNSAFE_DrawerPopup/themes/redwood/DrawerPopupTheme.js.map +1 -1
  390. package/amd/UNSAFE_DrawerPopup/themes/redwood/DrawerPopupVariants.css.js +1 -1
  391. package/amd/UNSAFE_DrawerPopup/themes/stable/DrawerPopupTheme.js +1 -1
  392. package/amd/UNSAFE_DrawerPopup/themes/stable/DrawerPopupTheme.js.map +1 -1
  393. package/amd/UNSAFE_DrawerPopup/themes/stable/DrawerPopupVariants.css.js +1 -1
  394. package/amd/UNSAFE_DrawerPopup.js +1 -1
  395. package/amd/UNSAFE_Dropdown/themes/dropdownStyles.css.js +1 -1
  396. package/amd/UNSAFE_Dropdown.js +1 -1
  397. package/amd/UNSAFE_Environment.js +1 -1
  398. package/amd/UNSAFE_ExpandableList.js +1 -1
  399. package/amd/UNSAFE_FilePicker/themes/redwood/FilePickerTheme.js +1 -1
  400. package/amd/UNSAFE_FilePicker/themes/redwood/FilePickerTheme.js.map +1 -1
  401. package/amd/UNSAFE_FilePicker/themes/redwood/FilePickerVariants.css.js +1 -1
  402. package/amd/UNSAFE_FilePicker/themes/stable/FilePickerTheme.js +1 -1
  403. package/amd/UNSAFE_FilePicker/themes/stable/FilePickerTheme.js.map +1 -1
  404. package/amd/UNSAFE_FilePicker/themes/stable/FilePickerVariants.css.js +1 -1
  405. package/amd/UNSAFE_FilePicker.js +1 -1
  406. package/amd/UNSAFE_FlatTreeView.js +1 -1
  407. package/amd/UNSAFE_Flex.js +1 -1
  408. package/amd/UNSAFE_Floating.js +1 -1
  409. package/amd/UNSAFE_FormLayout/themes/redwood/FormLayoutTheme.js +1 -1
  410. package/amd/UNSAFE_FormLayout/themes/redwood/FormLayoutTheme.js.map +1 -1
  411. package/amd/UNSAFE_FormLayout/themes/redwood/FormLayoutVariants.css.js +1 -1
  412. package/amd/UNSAFE_FormLayout/themes/stable/FormLayoutTheme.js +1 -1
  413. package/amd/UNSAFE_FormLayout/themes/stable/FormLayoutTheme.js.map +1 -1
  414. package/amd/UNSAFE_FormLayout/themes/stable/FormLayoutVariants.css.js +1 -1
  415. package/amd/UNSAFE_FormLayout.js +1 -1
  416. package/amd/UNSAFE_Gantt.js +1 -1
  417. package/amd/UNSAFE_Grid.js +1 -1
  418. package/amd/UNSAFE_HighlightText.js +1 -1
  419. package/amd/UNSAFE_Icon.js +1 -1
  420. package/amd/UNSAFE_IconButton.js +1 -1
  421. package/amd/UNSAFE_IconMenuButton.js +1 -1
  422. package/amd/UNSAFE_IconProgressButton.js +1 -1
  423. package/amd/UNSAFE_IconToggleButton.js +1 -1
  424. package/amd/UNSAFE_Indexer.js +1 -1
  425. package/amd/UNSAFE_InlineSelectSingle.js +1 -1
  426. package/amd/UNSAFE_InputColor.js +1 -1
  427. package/amd/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
  428. package/amd/UNSAFE_InputDateMask.js +1 -1
  429. package/amd/UNSAFE_InputDatePicker.js +1 -1
  430. package/amd/UNSAFE_InputPassword.js +1 -1
  431. package/amd/UNSAFE_InputSensitiveText.js +1 -1
  432. package/amd/UNSAFE_InputText.js +1 -1
  433. package/amd/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
  434. package/amd/UNSAFE_InputTimeMask.js +1 -1
  435. package/amd/UNSAFE_InputTimeMask.js.map +1 -1
  436. package/amd/UNSAFE_Label.js +1 -1
  437. package/amd/UNSAFE_LabelValueLayout.js +1 -1
  438. package/amd/UNSAFE_LabelledLink/themes/redwood/LabelledLinkTheme.js +1 -1
  439. package/amd/UNSAFE_LabelledLink/themes/redwood/LabelledLinkTheme.js.map +1 -1
  440. package/amd/UNSAFE_LabelledLink/themes/redwood/LabelledLinkVariants.css.js +1 -1
  441. package/amd/UNSAFE_LabelledLink/themes/stable/LabelledLinkTheme.js +1 -1
  442. package/amd/UNSAFE_LabelledLink/themes/stable/LabelledLinkTheme.js.map +1 -1
  443. package/amd/UNSAFE_LabelledLink/themes/stable/LabelledLinkVariants.css.js +1 -1
  444. package/amd/UNSAFE_LabelledLink.js +1 -1
  445. package/amd/UNSAFE_LabelledLink.js.map +1 -1
  446. package/amd/UNSAFE_Layer.js +1 -1
  447. package/amd/UNSAFE_Legend.js +1 -1
  448. package/amd/UNSAFE_LineAreaChart.js +1 -1
  449. package/amd/UNSAFE_Link.js +1 -1
  450. package/amd/UNSAFE_ListItemLayout.js +1 -1
  451. package/amd/UNSAFE_ListView.js +1 -1
  452. package/amd/UNSAFE_LiveRegion.js +1 -1
  453. package/amd/UNSAFE_Menu.js +1 -1
  454. package/amd/UNSAFE_MenuButton.js +1 -1
  455. package/amd/UNSAFE_MessageBanner/themes/redwood/MessageBannerTheme.js +1 -1
  456. package/amd/UNSAFE_MessageBanner/themes/redwood/MessageBannerTheme.js.map +1 -1
  457. package/amd/UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css.js +1 -1
  458. package/amd/UNSAFE_MessageBanner/themes/stable/MessageBannerTheme.js +1 -1
  459. package/amd/UNSAFE_MessageBanner/themes/stable/MessageBannerTheme.js.map +1 -1
  460. package/amd/UNSAFE_MessageBanner/themes/stable/MessageBannerVariants.css.js +1 -1
  461. package/amd/UNSAFE_MessageBanner.js +1 -1
  462. package/amd/UNSAFE_MessageToast.js +1 -1
  463. package/amd/UNSAFE_MeterBar.js +1 -1
  464. package/amd/UNSAFE_MeterCircle.js +1 -1
  465. package/amd/UNSAFE_Modal.js +1 -1
  466. package/amd/UNSAFE_NavigationList.js +1 -1
  467. package/amd/UNSAFE_NavigationListCommon.js +1 -1
  468. package/amd/UNSAFE_NumberInputText.js +1 -1
  469. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  470. package/amd/UNSAFE_PictoChart.js +1 -1
  471. package/amd/UNSAFE_PieChart/__test__/PieChart.spec.js +1 -1
  472. package/amd/UNSAFE_PieChart/__test__/PieChart.spec.js.map +1 -1
  473. package/amd/UNSAFE_PieChart.js +1 -1
  474. package/amd/UNSAFE_Popup.js +1 -1
  475. package/amd/UNSAFE_ProgressBar/themes/redwood/ProgressBarTheme.js +1 -1
  476. package/amd/UNSAFE_ProgressBar/themes/redwood/ProgressBarTheme.js.map +1 -1
  477. package/amd/UNSAFE_ProgressBar/themes/redwood/ProgressBarVariants.css.js +1 -1
  478. package/amd/UNSAFE_ProgressBar/themes/stable/ProgressBarTheme.js +1 -1
  479. package/amd/UNSAFE_ProgressBar/themes/stable/ProgressBarTheme.js.map +1 -1
  480. package/amd/UNSAFE_ProgressBar/themes/stable/ProgressBarVariants.css.js +1 -1
  481. package/amd/UNSAFE_ProgressBar.js +1 -1
  482. package/amd/UNSAFE_ProgressButton.js +1 -1
  483. package/amd/UNSAFE_ProgressButtonLabelLayout.js +1 -1
  484. package/amd/UNSAFE_ProgressCircle.js +1 -1
  485. package/amd/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js +1 -1
  486. package/amd/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js.map +1 -1
  487. package/amd/UNSAFE_RadioItem/themes/redwood/RadioIconVariants.css.js +1 -1
  488. package/amd/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js +1 -1
  489. package/amd/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js.map +1 -1
  490. package/amd/UNSAFE_RadioItem/themes/stable/RadioIconVariants.css.js +1 -1
  491. package/amd/UNSAFE_RadioItem.js +1 -1
  492. package/amd/UNSAFE_RadioSet.js +1 -1
  493. package/amd/UNSAFE_RatingGauge.js +1 -1
  494. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  495. package/amd/UNSAFE_RichCheckboxSet.js +1 -1
  496. package/amd/UNSAFE_RichRadioSet.js +1 -1
  497. package/amd/UNSAFE_RichSelectionItem.js +1 -1
  498. package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
  499. package/amd/UNSAFE_ScatterChart.js +1 -1
  500. package/amd/UNSAFE_SectionalLegend.js +1 -1
  501. package/amd/UNSAFE_SelectMultiple.js +1 -1
  502. package/amd/UNSAFE_SelectSingle.js +1 -1
  503. package/amd/UNSAFE_SelectionCard.js +1 -1
  504. package/amd/UNSAFE_Selector.js +1 -1
  505. package/amd/UNSAFE_SelectorAll.js +1 -1
  506. package/amd/UNSAFE_Sheet/__test__/Sheet.spec.js +1 -1
  507. package/amd/UNSAFE_Sheet/__test__/Sheet.spec.js.map +1 -1
  508. package/amd/UNSAFE_Sheet.js +1 -1
  509. package/amd/UNSAFE_SortControl.js +1 -1
  510. package/amd/UNSAFE_SplitMenuButton/themes/redwood/SplitMenuButtonTheme.css.js +1 -1
  511. package/amd/UNSAFE_SplitMenuButton/themes/stable/SplitMenuButtonTheme.css.js +1 -1
  512. package/amd/UNSAFE_SplitMenuButton.js +1 -1
  513. package/amd/UNSAFE_Switch.js +1 -1
  514. package/amd/UNSAFE_TabBar.js +1 -1
  515. package/amd/UNSAFE_TabBarCommon/themes/redwood/TabBarItemTheme.js +1 -1
  516. package/amd/UNSAFE_TabBarCommon/themes/redwood/TabBarItemTheme.js.map +1 -1
  517. package/amd/UNSAFE_TabBarCommon/themes/redwood/TabBarItemVariants.css.js +1 -1
  518. package/amd/UNSAFE_TabBarCommon/themes/stable/TabBarItemTheme.js +1 -1
  519. package/amd/UNSAFE_TabBarCommon/themes/stable/TabBarItemTheme.js.map +1 -1
  520. package/amd/UNSAFE_TabBarCommon/themes/stable/TabBarItemVariants.css.js +1 -1
  521. package/amd/UNSAFE_TabBarCommon.js +1 -1
  522. package/amd/UNSAFE_TabBarMixed.js +1 -1
  523. package/amd/UNSAFE_TableView.js +1 -1
  524. package/amd/UNSAFE_TagCloud.js +1 -1
  525. package/amd/UNSAFE_TextArea.js +1 -1
  526. package/amd/UNSAFE_TextAreaAutosize.js +1 -1
  527. package/amd/UNSAFE_TextField.js +1 -1
  528. package/amd/UNSAFE_ToggleButton.js +1 -1
  529. package/amd/UNSAFE_Toolbar/tests/Toolbar.spec.js +1 -1
  530. package/amd/UNSAFE_Toolbar/tests/Toolbar.spec.js.map +1 -1
  531. package/amd/UNSAFE_Toolbar.js +1 -1
  532. package/amd/UNSAFE_Train.js +1 -1
  533. package/amd/UNSAFE_TruncatingBadge.js +1 -1
  534. package/amd/UNSAFE_TruncatingText.js +1 -1
  535. package/amd/UNSAFE_UserAssistance.js +1 -1
  536. package/amd/UNSAFE_View.js +1 -1
  537. package/amd/UNSAFE_VirtualizedListView.js +1 -1
  538. package/amd/UNSAFE_VisInvalidDataMessage.js +1 -1
  539. package/amd/UNSAFE_VisNoDataMessage.js +1 -1
  540. package/amd/UNSAFE_VisProgressiveLoader/__test__/VisProgressiveLoader.spec.js +1 -1
  541. package/amd/UNSAFE_VisProgressiveLoader.js +1 -1
  542. package/amd/UNSAFE_WindowOverlay.js +1 -1
  543. package/amd/{View-35699bb2.js → View-215ec211.js} +2 -2
  544. package/amd/{View-35699bb2.js.map → View-215ec211.js.map} +1 -1
  545. package/amd/{VisInvalidDataMessage-8e7534a7.js → VisInvalidDataMessage-139a0bf8.js} +2 -2
  546. package/amd/{VisInvalidDataMessage-8e7534a7.js.map → VisInvalidDataMessage-139a0bf8.js.map} +1 -1
  547. package/amd/VisNoDataMessage-e4eb08f6.js +2 -0
  548. package/amd/{VisNoDataMessage-fc41dae3.js.map → VisNoDataMessage-e4eb08f6.js.map} +1 -1
  549. package/amd/{VisPlaceholder-1bbfb2f0.js → VisPlaceholder-a7cac338.js} +2 -2
  550. package/amd/{VisPlaceholder-1bbfb2f0.js.map → VisPlaceholder-a7cac338.js.map} +1 -1
  551. package/amd/{VisProgressiveLoader-8c036105.js → VisProgressiveLoader-7dbd5478.js} +2 -2
  552. package/amd/{VisProgressiveLoader-8c036105.js.map → VisProgressiveLoader-7dbd5478.js.map} +1 -1
  553. package/amd/{VisStatusMessage-ac3a90aa.js → VisStatusMessage-307f20e9.js} +2 -2
  554. package/amd/{VisStatusMessage-ac3a90aa.js.map → VisStatusMessage-307f20e9.js.map} +1 -1
  555. package/amd/{VisTabularDatatip-93d56ae8.js → VisTabularDatatip-d6b9f28f.js} +2 -2
  556. package/amd/{VisTabularDatatip-93d56ae8.js.map → VisTabularDatatip-d6b9f28f.js.map} +1 -1
  557. package/amd/{WindowOverlay-3293b108.js → WindowOverlay-5b6850df.js} +2 -2
  558. package/amd/{WindowOverlay-3293b108.js.map → WindowOverlay-5b6850df.js.map} +1 -1
  559. package/amd/{YearsGridView-7d59e5a3.js → YearsGridView-c7c36cea.js} +2 -2
  560. package/amd/{YearsGridView-7d59e5a3.js.map → YearsGridView-c7c36cea.js.map} +1 -1
  561. package/amd/dropdownStyles.styles.css +97 -6
  562. package/amd/dropdownStyles.styles2.css +6 -97
  563. package/amd/hoc/PRIVATE_withDirectionIcon.js +1 -1
  564. package/amd/hoc/PRIVATE_withThemeIcon.js +1 -1
  565. package/amd/hoc/UNSAFE_withThemeProps.js +1 -1
  566. package/amd/hooks/PRIVATE_useChartContextMenu.js +1 -1
  567. package/amd/hooks/PRIVATE_useChartDatatip.js +1 -1
  568. package/amd/hooks/PRIVATE_useChartEvents.js +1 -1
  569. package/amd/hooks/PRIVATE_useChartMarquee.js +1 -1
  570. package/amd/hooks/PRIVATE_useCollectionFocusRing.js +1 -1
  571. package/amd/hooks/PRIVATE_useCssVars.js +1 -1
  572. package/amd/hooks/PRIVATE_useCurrentKey.js +1 -1
  573. package/amd/hooks/PRIVATE_useDatatip.js +1 -1
  574. package/amd/hooks/PRIVATE_useDetectHorizontalOverflow.js +1 -1
  575. package/amd/hooks/PRIVATE_useFloating.js +1 -1
  576. package/amd/hooks/PRIVATE_useItemAction.js +1 -1
  577. package/amd/hooks/PRIVATE_useListCommon.js +1 -1
  578. package/amd/hooks/PRIVATE_useOutsideMousedown.js +1 -1
  579. package/amd/hooks/PRIVATE_useRadioFocusManager.js +1 -1
  580. package/amd/hooks/PRIVATE_useReorderable.js +1 -1
  581. package/amd/hooks/PRIVATE_useRovingTabIndexContainer.js +1 -1
  582. package/amd/hooks/PRIVATE_useSelection.js +1 -1
  583. package/amd/hooks/PRIVATE_useTabBar.js +1 -1
  584. package/amd/hooks/PRIVATE_useTabbableModeSet.js +1 -1
  585. package/amd/hooks/PRIVATE_useTooltipOnTruncation.js +1 -1
  586. package/amd/hooks/PRIVATE_useVisContextMenu.js +1 -1
  587. package/amd/hooks/PRIVATE_useVisDragModeControls.js +1 -1
  588. package/amd/hooks/PRIVATE_useVisEvents.js +1 -1
  589. package/amd/hooks/PRIVATE_useVisMeterEvents.js +1 -1
  590. package/amd/hooks/PRIVATE_useVisSelection.js +1 -1
  591. package/amd/hooks/UNSAFE_useBareButton.js +1 -1
  592. package/amd/hooks/UNSAFE_useColorScheme.js +1 -1
  593. package/amd/hooks/UNSAFE_useCurrentBgColor.js +1 -1
  594. package/amd/hooks/UNSAFE_useDensity.js +1 -1
  595. package/amd/hooks/UNSAFE_useHiddenTestMethod.js +1 -1
  596. package/amd/hooks/UNSAFE_useOutsideClick.js +1 -1
  597. package/amd/hooks/UNSAFE_usePrefixSuffix.js +1 -1
  598. package/amd/hooks/UNSAFE_useScale.js +1 -1
  599. package/amd/hooks/UNSAFE_useTestId.js +1 -1
  600. package/amd/hooks/UNSAFE_useTheme.js +1 -1
  601. package/amd/hooks/UNSAFE_useThemeInterpolations.js +1 -1
  602. package/amd/hooks/UNSAFE_useTooltip.js +1 -1
  603. package/amd/hooks/UNSAFE_useTranslationBundle.js +1 -1
  604. package/amd/hooks/UNSAFE_useUser.js +1 -1
  605. package/amd/{index-ec69d863.js → index-b26cafb6.js} +2 -2
  606. package/amd/index-b26cafb6.js.map +1 -0
  607. package/amd/listViewSelectionTests-73aa8024.js +1 -1
  608. package/amd/popupUtils-71ea5dd1.js +2 -0
  609. package/amd/{popupUtils-d42db8bf.js.map → popupUtils-71ea5dd1.js.map} +1 -1
  610. package/amd/render-40923005.js +2 -0
  611. package/amd/{render-0e124b25.js.map → render-40923005.js.map} +1 -1
  612. package/amd/{tabbableUtils-0f5a148a.js → tabbableUtils-7fa099af.js} +2 -2
  613. package/amd/{tabbableUtils-0f5a148a.js.map → tabbableUtils-7fa099af.js.map} +1 -1
  614. package/amd/{testData-c84b4335.js → testData-d92d6bdb.js} +2 -2
  615. package/amd/{testData-c84b4335.js.map → testData-d92d6bdb.js.map} +1 -1
  616. package/amd/{testData-0ee09770.js → testData-db08ddc1.js} +2 -2
  617. package/amd/{testData-0ee09770.js.map → testData-db08ddc1.js.map} +1 -1
  618. package/amd/{tooltipUtils-d855e8f2.js → tooltipUtils-2f3b01e4.js} +2 -2
  619. package/amd/{tooltipUtils-d855e8f2.js.map → tooltipUtils-2f3b01e4.js.map} +1 -1
  620. package/amd/useBareButton-0afa84c2.js +1 -1
  621. package/amd/useCellNavigation-fe5a7be7.js +1 -1
  622. package/amd/useChartContextMenu-a5570943.js +1 -1
  623. package/amd/{useChartDatatip-570d6077.js → useChartDatatip-62ec3c41.js} +2 -2
  624. package/amd/{useChartDatatip-570d6077.js.map → useChartDatatip-62ec3c41.js.map} +1 -1
  625. package/amd/{useColorScheme-097c31ff.js → useColorScheme-6cb3a3b7.js} +2 -2
  626. package/amd/{useColorScheme-097c31ff.js.map → useColorScheme-6cb3a3b7.js.map} +1 -1
  627. package/amd/useContextMenu-025b44ba.js +1 -1
  628. package/amd/{useCssVars-3194b2f6.js → useCssVars-d0c0bfa2.js} +2 -2
  629. package/amd/{useCssVars-3194b2f6.js.map → useCssVars-d0c0bfa2.js.map} +1 -1
  630. package/amd/{useCurrentBgColor-6f440613.js → useCurrentBgColor-3044b50a.js} +2 -2
  631. package/amd/{useCurrentBgColor-6f440613.js.map → useCurrentBgColor-3044b50a.js.map} +1 -1
  632. package/amd/useCurrentKey-05038cac.js +2 -0
  633. package/amd/{useCurrentKey-5749e7fb.js.map → useCurrentKey-05038cac.js.map} +1 -1
  634. package/amd/{useDatatip-a1713300.js → useDatatip-a2c4bd6d.js} +2 -2
  635. package/amd/{useDatatip-a1713300.js.map → useDatatip-a2c4bd6d.js.map} +1 -1
  636. package/amd/{useDensity-8a10fc70.js → useDensity-622a2d34.js} +2 -2
  637. package/amd/{useDensity-8a10fc70.js.map → useDensity-622a2d34.js.map} +1 -1
  638. package/amd/useDetectHorizontalOverflow-e729b857.js +2 -0
  639. package/amd/useDetectHorizontalOverflow-e729b857.js.map +1 -0
  640. package/amd/useDisplayValue-6ad8d409.js +1 -1
  641. package/amd/{useExpandCollapse-41860b2a.js → useExpandCollapse-d8799966.js} +2 -2
  642. package/amd/{useExpandCollapse-41860b2a.js.map → useExpandCollapse-d8799966.js.map} +1 -1
  643. package/amd/{useFloating-5cb85d2b.js → useFloating-0bdf9133.js} +2 -2
  644. package/amd/{useFloating-5cb85d2b.js.map → useFloating-0bdf9133.js.map} +1 -1
  645. package/amd/{useHiddenTestMethod-8321d341.js → useHiddenTestMethod-6bbe8a43.js} +2 -2
  646. package/amd/{useHiddenTestMethod-8321d341.js.map → useHiddenTestMethod-6bbe8a43.js.map} +1 -1
  647. package/amd/useKeyboardEvents-191a444a.js +2 -0
  648. package/amd/{useKeyboardEvents-f0419128.js.map → useKeyboardEvents-191a444a.js.map} +1 -1
  649. package/amd/useLegendContextMenu-5d461b88.js +1 -1
  650. package/amd/useMeterDatatip-c5e61ed7.js +2 -0
  651. package/amd/{useMeterDatatip-126b6bc1.js.map → useMeterDatatip-c5e61ed7.js.map} +1 -1
  652. package/amd/useNavigation-58a94f6a.js +1 -1
  653. package/amd/{useOutsideClick-b9b661a4.js → useOutsideClick-ace4f686.js} +2 -2
  654. package/amd/{useOutsideClick-b9b661a4.js.map → useOutsideClick-ace4f686.js.map} +1 -1
  655. package/amd/{useOutsideMousedown-cb88da60.js → useOutsideMousedown-62fa309c.js} +2 -2
  656. package/amd/{useOutsideMousedown-cb88da60.js.map → useOutsideMousedown-62fa309c.js.map} +1 -1
  657. package/amd/usePopupAnimation-389749fc.js +2 -0
  658. package/amd/{usePopupAnimation-dc282b02.js.map → usePopupAnimation-389749fc.js.map} +1 -1
  659. package/amd/usePrefixSuffix-7371ec52.js +2 -0
  660. package/amd/{usePrefixSuffix-dd2cae55.js.map → usePrefixSuffix-7371ec52.js.map} +1 -1
  661. package/amd/useRadioFocusManager-c613d2fc.js +2 -0
  662. package/amd/{useRadioFocusManager-462e28eb.js.map → useRadioFocusManager-c613d2fc.js.map} +1 -1
  663. package/amd/{useReorderableItem-565edeff.js → useReorderableItem-b526f83c.js} +2 -2
  664. package/amd/{useReorderableItem-565edeff.js.map → useReorderableItem-b526f83c.js.map} +1 -1
  665. package/amd/{useRovingTabIndexContainer-9aa2fbcf.js → useRovingTabIndexContainer-a8b8ab8f.js} +2 -2
  666. package/amd/{useRovingTabIndexContainer-9aa2fbcf.js.map → useRovingTabIndexContainer-a8b8ab8f.js.map} +1 -1
  667. package/amd/{useScale-04a448c3.js → useScale-404175fb.js} +2 -2
  668. package/amd/{useScale-04a448c3.js.map → useScale-404175fb.js.map} +1 -1
  669. package/amd/useSelectCommon-0abad82b.js +1 -1
  670. package/amd/{useSelectDrill-b650174d.js → useSelectDrill-40171e59.js} +2 -2
  671. package/amd/{useSelectDrill-b650174d.js.map → useSelectDrill-40171e59.js.map} +1 -1
  672. package/amd/{useSelection-aecb6b23.js → useSelection-48cb7bdf.js} +2 -2
  673. package/amd/{useSelection-aecb6b23.js.map → useSelection-48cb7bdf.js.map} +1 -1
  674. package/amd/{useSelection-5cb56713.js → useSelection-c25e02bd.js} +2 -2
  675. package/amd/{useSelection-5cb56713.js.map → useSelection-c25e02bd.js.map} +1 -1
  676. package/amd/useTabBar-c84e226e.js +2 -0
  677. package/amd/useTabBar-c84e226e.js.map +1 -0
  678. package/amd/{useTabBarItemTooltip-6c6fb512.js → useTabBarItemTooltip-b9987366.js} +2 -2
  679. package/amd/{useTabBarItemTooltip-6c6fb512.js.map → useTabBarItemTooltip-b9987366.js.map} +1 -1
  680. package/amd/{useTestId-f4240cbd.js → useTestId-6160e7a2.js} +2 -2
  681. package/amd/{useTestId-f4240cbd.js.map → useTestId-6160e7a2.js.map} +1 -1
  682. package/amd/{useTheme-da27e1d1.js → useTheme-59bafcbb.js} +2 -2
  683. package/amd/{useTheme-da27e1d1.js.map → useTheme-59bafcbb.js.map} +1 -1
  684. package/amd/useThemeInterpolations-53e9343f.js +2 -0
  685. package/amd/{useThemeInterpolations-cc05b0f0.js.map → useThemeInterpolations-53e9343f.js.map} +1 -1
  686. package/amd/useTooltip-c03bc796.js +2 -0
  687. package/amd/{useTooltip-31ac71c4.js.map → useTooltip-c03bc796.js.map} +1 -1
  688. package/amd/{useTooltipControlled-e7021312.js → useTooltipControlled-1a6eeb63.js} +2 -2
  689. package/amd/{useTooltipControlled-e7021312.js.map → useTooltipControlled-1a6eeb63.js.map} +1 -1
  690. package/amd/{useTooltipOnTruncation-e8d8f010.js → useTooltipOnTruncation-0a7035c2.js} +2 -2
  691. package/amd/{useTooltipOnTruncation-e8d8f010.js.map → useTooltipOnTruncation-0a7035c2.js.map} +1 -1
  692. package/amd/{useTranslationBundle-e4dd341e.js → useTranslationBundle-db326955.js} +2 -2
  693. package/amd/{useTranslationBundle-e4dd341e.js.map → useTranslationBundle-db326955.js.map} +1 -1
  694. package/amd/{useUser-08901aba.js → useUser-e0677e8d.js} +2 -2
  695. package/amd/{useUser-08901aba.js.map → useUser-e0677e8d.js.map} +1 -1
  696. package/amd/useVisDragModeControls-2295174b.js +1 -1
  697. package/amd/{useVisEvents-5f18ab46.js → useVisEvents-4860cd24.js} +2 -2
  698. package/amd/{useVisEvents-5f18ab46.js.map → useVisEvents-4860cd24.js.map} +1 -1
  699. package/amd/utils/PRIVATE_collectionUtils.js +1 -1
  700. package/amd/utils/PRIVATE_tabBarUtils.js +1 -1
  701. package/amd/utils/PRIVATE_tooltipUtils.js +1 -1
  702. package/amd/utils/PRIVATE_visTestUtils.js +1 -1
  703. package/amd/utils/UNSAFE_popupUtils.js +1 -1
  704. package/amd/{withDirectionIcon-cea07c6e.js → withDirectionIcon-07d1a4ee.js} +2 -2
  705. package/amd/{withDirectionIcon-cea07c6e.js.map → withDirectionIcon-07d1a4ee.js.map} +1 -1
  706. package/amd/withThemeProps-88ad9dea.js +1 -1
  707. package/cjs/BadgeVariants.styles.css +14 -14
  708. package/cjs/BadgeVariants.styles2.css +14 -14
  709. package/cjs/{BaseCardView-da62c29e.js → BaseCardView-7ee4ea60.js} +4 -1
  710. package/cjs/{BaseCardView-da62c29e.js.map → BaseCardView-7ee4ea60.js.map} +1 -1
  711. package/cjs/{Chart-d4034cc2.js → Chart-790a72df.js} +2 -2
  712. package/cjs/{Chart-d4034cc2.js.map → Chart-790a72df.js.map} +1 -1
  713. package/cjs/CollapsibleNavigationListItemVariants.styles.css +4 -4
  714. package/cjs/CollapsibleNavigationListItemVariants.styles2.css +4 -4
  715. package/cjs/{ColorPicker-d3e8f8e0.js → ColorPicker-6e6af845.js} +2 -2
  716. package/cjs/{ColorPicker-d3e8f8e0.js.map → ColorPicker-6e6af845.js.map} +1 -1
  717. package/cjs/ConveyorBeltVariants.styles.css +6 -6
  718. package/cjs/ConveyorBeltVariants.styles2.css +6 -6
  719. package/cjs/DiagramStyles.styles2.css +16 -10
  720. package/cjs/DiagramStyles.styles3.css +10 -16
  721. package/cjs/DrawerPopupVariants.styles.css +5 -5
  722. package/cjs/DrawerPopupVariants.styles2.css +5 -5
  723. package/cjs/FilePickerVariants.styles.css +2 -2
  724. package/cjs/FilePickerVariants.styles2.css +2 -2
  725. package/cjs/FormLayoutVariants.styles.css +14 -14
  726. package/cjs/FormLayoutVariants.styles2.css +14 -14
  727. package/cjs/LabelledLinkVariants.styles.css +3 -3
  728. package/cjs/LabelledLinkVariants.styles2.css +3 -3
  729. package/cjs/LinkVariants.styles.css +17 -17
  730. package/cjs/LinkVariants.styles2.css +17 -17
  731. package/cjs/ListStyles.styles.css +7 -133
  732. package/cjs/ListStyles.styles2.css +133 -7
  733. package/cjs/MeterCircleVariants.styles.css +8 -8
  734. package/cjs/MeterCircleVariants.styles2.css +8 -8
  735. package/cjs/NavigationListItemStyles.styles.css +85 -28
  736. package/cjs/NavigationListItemStyles.styles2.css +28 -85
  737. package/cjs/NavigationListItemVariants.styles.css +4 -4
  738. package/cjs/NavigationListItemVariants.styles2.css +4 -4
  739. package/cjs/PRIVATE_BaseCardView.js +1 -1
  740. package/cjs/PRIVATE_Chart.js +4 -4
  741. package/cjs/PRIVATE_TableList.js +4 -4
  742. package/cjs/ProgressBarVariants.styles.css +1 -1
  743. package/cjs/ProgressBarVariants.styles2.css +1 -1
  744. package/cjs/RatingGaugeVariants.styles.css +15 -15
  745. package/cjs/RatingGaugeVariants.styles2.css +15 -15
  746. package/cjs/ReadonlyTextFieldVariants.styles.css +20 -20
  747. package/cjs/ReadonlyTextFieldVariants.styles2.css +20 -20
  748. package/cjs/SplitMenuButtonTheme.styles.css +4 -4
  749. package/cjs/SplitMenuButtonTheme.styles2.css +4 -4
  750. package/cjs/{TabBar-9bc26ed2.js → TabBar-e3314035.js} +9 -5
  751. package/cjs/TabBar-e3314035.js.map +1 -0
  752. package/cjs/TabBarItemVariants.styles.css +3 -3
  753. package/cjs/TabBarItemVariants.styles2.css +3 -3
  754. package/cjs/TextFieldInputVariants.styles.css +20 -20
  755. package/cjs/TextFieldInputVariants.styles2.css +20 -20
  756. package/cjs/Theme-redwood/theme.css +454 -459
  757. package/cjs/Theme-stable/theme.css +702 -697
  758. package/cjs/TrainVariants.styles.css +6 -6
  759. package/cjs/TrainVariants.styles2.css +6 -6
  760. package/cjs/UNSAFE_BarChart.js +4 -4
  761. package/cjs/UNSAFE_CardFlexView.js +1 -1
  762. package/cjs/UNSAFE_CardGridView.js +1 -1
  763. package/cjs/UNSAFE_ColorPicker.js +25 -25
  764. package/cjs/UNSAFE_ComboChart.js +4 -4
  765. package/cjs/UNSAFE_InputColor.js +2 -2
  766. package/cjs/UNSAFE_InputDatePicker.js +92 -92
  767. package/cjs/UNSAFE_LineAreaChart.js +4 -4
  768. package/cjs/UNSAFE_ListView.js +53 -53
  769. package/cjs/UNSAFE_OverflowTabBar.js +17 -13
  770. package/cjs/UNSAFE_OverflowTabBar.js.map +1 -1
  771. package/cjs/UNSAFE_ReorderableTabBar.js +13 -13
  772. package/cjs/UNSAFE_ScatterChart.js +4 -4
  773. package/cjs/UNSAFE_TabBar.js +11 -11
  774. package/cjs/UNSAFE_TabBarMixed.js +10 -10
  775. package/cjs/UNSAFE_TabBarMixed.js.map +1 -1
  776. package/cjs/hooks/PRIVATE_useDetectHorizontalOverflow.js +1 -1
  777. package/cjs/hooks/PRIVATE_useTabBar.js +1 -1
  778. package/cjs/{useDetectHorizontalOverflow-867b1a33.js → useDetectHorizontalOverflow-5ef28b51.js} +30 -58
  779. package/cjs/useDetectHorizontalOverflow-5ef28b51.js.map +1 -0
  780. package/cjs/{useTabBar-59484847.js → useTabBar-f8dc4f58.js} +2 -5
  781. package/cjs/useTabBar-f8dc4f58.js.map +1 -0
  782. package/es/{BaseButton-e8e5bfe4.js → BaseButton-feeaaf1c.js} +2 -2
  783. package/es/{BaseButton-e8e5bfe4.js.map → BaseButton-feeaaf1c.js.map} +1 -1
  784. package/es/{BaseCardView-f262a5b4.js → BaseCardView-35315f78.js} +10 -7
  785. package/es/{BaseCardView-f262a5b4.js.map → BaseCardView-35315f78.js.map} +1 -1
  786. package/es/BaseDiagram-faa6e0d7.js +7 -7
  787. package/es/BaseRichSelection-23604860.js +9 -9
  788. package/es/BaseSelector-9bbbaba1.js +1 -1
  789. package/es/BaseSwatchView-3c44d9f2.js +2 -2
  790. package/es/{Button-1a5604c2.js → Button-4efeb375.js} +2 -2
  791. package/es/{Button-1a5604c2.js.map → Button-4efeb375.js.map} +1 -1
  792. package/es/ButtonLayoutVariants.styles.css +2 -2
  793. package/es/ButtonLayoutVariants.styles2.css +2 -2
  794. package/es/ButtonSet-b7464e9a.js +2 -2
  795. package/es/ButtonSetButton-61b88d81.js +1 -1
  796. package/es/ButtonSetIconButton-480cff44.js +4 -4
  797. package/es/{Center-71a03e65.js → Center-3860fe60.js} +2 -2
  798. package/es/{Center-71a03e65.js.map → Center-3860fe60.js.map} +1 -1
  799. package/es/{Chart-1c763f58.js → Chart-2dc00418.js} +12 -12
  800. package/es/{Chart-1c763f58.js.map → Chart-2dc00418.js.map} +1 -1
  801. package/es/CheckboxControl-6809b83a.js +6 -6
  802. package/es/CheckboxRadioField-519849af.js +6 -6
  803. package/es/CheckboxRadioLabelValueLayout-e2722e3d.js +1 -1
  804. package/es/Chip-4efea02e.js +1 -1
  805. package/es/ClearIcon-8e4a444e.js +1 -1
  806. package/es/CollapseIcon-d6a9d390.js +1 -1
  807. package/es/Collapsible-9df0dd24.js +2 -2
  808. package/es/ColorPalette-55b90e34.js +2 -2
  809. package/es/{ColorPicker-1da92fa1.js → ColorPicker-e85a8b91.js} +3 -3
  810. package/es/{ColorPicker-1da92fa1.js.map → ColorPicker-e85a8b91.js.map} +1 -1
  811. package/es/ColorSwatch-c7ed4c71.js +4 -4
  812. package/es/{CompactLabelAssistance-5d20a2c9.js → CompactLabelAssistance-58b860e8.js} +6 -6
  813. package/es/{CompactLabelAssistance-5d20a2c9.js.map → CompactLabelAssistance-58b860e8.js.map} +1 -1
  814. package/es/CompactUserAssistance-946c7e35.js +5 -5
  815. package/es/ComponentMessageContainer-b3f70763.js +4 -4
  816. package/es/{DatePicker-4d20c548.js → DatePicker-052acd92.js} +8 -8
  817. package/es/{DatePicker-4d20c548.js.map → DatePicker-052acd92.js.map} +1 -1
  818. package/es/DatePickerHeader-d0704e8e.js +3 -3
  819. package/es/DiagramStyles.styles2.css +16 -10
  820. package/es/DiagramStyles.styles3.css +10 -16
  821. package/es/{Dialog-5f3bd525.js → Dialog-edc4e066.js} +7 -7
  822. package/es/{Dialog-5f3bd525.js.map → Dialog-edc4e066.js.map} +1 -1
  823. package/es/DirectionalCollapseArrowIcon-d30c236f.js +1 -1
  824. package/es/DirectionalExpandArrowIcon-00f45fad.js +1 -1
  825. package/es/{Dropdown-63170b62.js → Dropdown-f3f363dc.js} +6 -6
  826. package/es/{Dropdown-63170b62.js.map → Dropdown-f3f363dc.js.map} +1 -1
  827. package/es/{EmbeddedIconButton-a1aadc89.js → EmbeddedIconButton-8237a4ea.js} +2 -2
  828. package/es/{EmbeddedIconButton-a1aadc89.js.map → EmbeddedIconButton-8237a4ea.js.map} +1 -1
  829. package/es/{EnvironmentProvider-6a0a8212.js → EnvironmentProvider-6cf8ed37.js} +3 -3
  830. package/es/{EnvironmentProvider-6a0a8212.js.map → EnvironmentProvider-6cf8ed37.js.map} +1 -1
  831. package/es/Expander-0c60d26b.js +1 -1
  832. package/es/{Flex-03129963.js → Flex-fc483125.js} +2 -2
  833. package/es/{Flex-03129963.js.map → Flex-fc483125.js.map} +1 -1
  834. package/es/{Floating-8a9436ac.js → Floating-0a11107a.js} +4 -4
  835. package/es/{Floating-8a9436ac.js.map → Floating-0a11107a.js.map} +1 -1
  836. package/es/{Grid-9e4b4f19.js → Grid-6f92d323.js} +2 -2
  837. package/es/{Grid-9e4b4f19.js.map → Grid-6f92d323.js.map} +1 -1
  838. package/es/GroupLoadingIndicator-e2acd49f.js +1 -1
  839. package/es/{HighlightText-0205faef.js → HighlightText-dd484ffd.js} +2 -2
  840. package/es/{HighlightText-0205faef.js.map → HighlightText-dd484ffd.js.map} +1 -1
  841. package/es/Icon-96679294.js +3 -3
  842. package/es/IconButton-bb390936.js +4 -4
  843. package/es/IconSwitchButton-765c38e8.js +4 -4
  844. package/es/IconToggleButton-fe8d0e55.js +4 -4
  845. package/es/{IconUserAssistance-30afcebe.js → IconUserAssistance-2deafca3.js} +3 -3
  846. package/es/{IconUserAssistance-30afcebe.js.map → IconUserAssistance-2deafca3.js.map} +1 -1
  847. package/es/InlineHelp-774fd01d.js +1 -1
  848. package/es/InlineUserAssistance-6aa2141e.js +5 -5
  849. package/es/InputDateMask-80707fa6.js +7 -7
  850. package/es/Label-a6c32235.js +8 -8
  851. package/es/LabelValueLayout-e8167a67.js +1 -1
  852. package/es/{Layer-535577b5.js → Layer-6c27170e.js} +3 -3
  853. package/es/{Layer-535577b5.js.map → Layer-6c27170e.js.map} +1 -1
  854. package/es/{LayerHost-7931b424.js → LayerHost-3cf255a6.js} +2 -2
  855. package/es/{LayerHost-7931b424.js.map → LayerHost-3cf255a6.js.map} +1 -1
  856. package/es/{LayerManager-52a26c55.js → LayerManager-e30fbfd6.js} +2 -2
  857. package/es/{LayerManager-52a26c55.js.map → LayerManager-e30fbfd6.js.map} +1 -1
  858. package/es/Link-49801aeb.js +1 -1
  859. package/es/List-3ed2c0e8.js +5 -5
  860. package/es/ListStyles.styles.css +7 -133
  861. package/es/ListStyles.styles2.css +133 -7
  862. package/es/{LiveRegion-cebac18d.js → LiveRegion-2e8830ae.js} +2 -2
  863. package/es/{LiveRegion-cebac18d.js.map → LiveRegion-2e8830ae.js.map} +1 -1
  864. package/es/{MaxLengthLiveRegion-8099fde5.js → MaxLengthLiveRegion-8f552ae2.js} +3 -3
  865. package/es/{MaxLengthLiveRegion-8099fde5.js.map → MaxLengthLiveRegion-8f552ae2.js.map} +1 -1
  866. package/es/MenuItemVariants.styles.css +8 -8
  867. package/es/MenuItemVariants.styles2.css +8 -8
  868. package/es/Message-aac08650.js +2 -2
  869. package/es/MessageBannerVariants.styles.css +2 -2
  870. package/es/MessageBannerVariants.styles2.css +2 -2
  871. package/es/{MessageLayer-69878fee.js → MessageLayer-776fe02e.js} +6 -6
  872. package/es/{MessageLayer-69878fee.js.map → MessageLayer-776fe02e.js.map} +1 -1
  873. package/es/MessagesManager-98126752.js +3 -3
  874. package/es/Modal-c0f730b8.js +3 -3
  875. package/es/{MonthView-65906260.js → MonthView-6ed9958e.js} +5 -5
  876. package/es/{MonthView-65906260.js.map → MonthView-6ed9958e.js.map} +1 -1
  877. package/es/NavigationListItem-aca16c7a.js +4 -4
  878. package/es/NavigationListLinkItem-99c5b4e5.js +5 -5
  879. package/es/NumberInputText-a3f34683.js +6 -6
  880. package/es/OverflowTabBarItem-817b089a.js +5 -5
  881. package/es/PRIVATE_BaseCardView.js +23 -23
  882. package/es/PRIVATE_BaseDiagram.js +30 -30
  883. package/es/PRIVATE_BaseSelector.js +17 -17
  884. package/es/PRIVATE_BaseSwatchView.js +18 -18
  885. package/es/PRIVATE_Chart.js +39 -39
  886. package/es/PRIVATE_CheckboxControl.js +26 -26
  887. package/es/PRIVATE_CheckboxRadioField.js +28 -28
  888. package/es/PRIVATE_ClearIcon.js +18 -18
  889. package/es/PRIVATE_CollapsibleNavigationList.js +43 -43
  890. package/es/PRIVATE_DatePickerHeader.js +20 -20
  891. package/es/PRIVATE_DatePickerLayout.js +4 -4
  892. package/es/PRIVATE_EmbeddedIconButton.js +6 -6
  893. package/es/PRIVATE_Expander.js +19 -19
  894. package/es/PRIVATE_FormControls.js +21 -21
  895. package/es/PRIVATE_IconSwitchButton.js +17 -17
  896. package/es/PRIVATE_Icons/CheckboxCrossed.js +16 -16
  897. package/es/PRIVATE_Icons/CheckboxMixed.js +16 -16
  898. package/es/PRIVATE_Icons/CheckboxOff.js +16 -16
  899. package/es/PRIVATE_Icons/CheckboxOn.js +16 -16
  900. package/es/PRIVATE_Icons/DragV.js +16 -16
  901. package/es/PRIVATE_Icons/None.js +16 -16
  902. package/es/PRIVATE_List/themes/ListStyles.css.js +1 -1
  903. package/es/PRIVATE_List.js +22 -22
  904. package/es/PRIVATE_Message.js +21 -21
  905. package/es/PRIVATE_MessageLayer.js +12 -12
  906. package/es/PRIVATE_MonthView.js +20 -20
  907. package/es/PRIVATE_MonthYearGridView.js +7 -7
  908. package/es/PRIVATE_PlotArea.js +5 -5
  909. package/es/PRIVATE_RevealToggleIcon.js +18 -18
  910. package/es/PRIVATE_RichSelectionCommon.js +29 -29
  911. package/es/PRIVATE_SelectCommon.js +33 -33
  912. package/es/PRIVATE_StyledCard.js +3 -3
  913. package/es/PRIVATE_StyledCheckbox.js +16 -16
  914. package/es/PRIVATE_StyledSwitch.js +4 -4
  915. package/es/PRIVATE_SwatchFlexView.js +18 -18
  916. package/es/PRIVATE_Table.js +59 -59
  917. package/es/PRIVATE_TableDisplay.js +19 -19
  918. package/es/PRIVATE_TableList/themes/ListStyles.css.js +1 -1
  919. package/es/PRIVATE_TableList/themes/redwood/ListTheme.js +1 -1
  920. package/es/PRIVATE_TableList/themes/redwood/ListVariants.css.js +1 -1
  921. package/es/PRIVATE_TableList/themes/stable/ListTheme.js +1 -1
  922. package/es/PRIVATE_TableList/themes/stable/ListVariants.css.js +1 -1
  923. package/es/PRIVATE_TableList.js +32 -32
  924. package/es/PRIVATE_ThemedIcons/CalendarIcon.js +16 -16
  925. package/es/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +16 -16
  926. package/es/PRIVATE_ThemedIcons/ChartPanIcon.js +16 -16
  927. package/es/PRIVATE_ThemedIcons/ChartZoomIcon.js +16 -16
  928. package/es/PRIVATE_ThemedIcons/CheckIcon.js +16 -16
  929. package/es/PRIVATE_ThemedIcons/CheckboxCrossedIcon.js +16 -16
  930. package/es/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +16 -16
  931. package/es/PRIVATE_ThemedIcons/CheckboxOffIcon.js +16 -16
  932. package/es/PRIVATE_ThemedIcons/CheckboxOnIcon.js +16 -16
  933. package/es/PRIVATE_ThemedIcons/CloseIcon.js +16 -16
  934. package/es/PRIVATE_ThemedIcons/CollapseIcon.js +17 -17
  935. package/es/PRIVATE_ThemedIcons/CollapseUpIcon.js +16 -16
  936. package/es/PRIVATE_ThemedIcons/DecrementIcon.js +16 -16
  937. package/es/PRIVATE_ThemedIcons/DeleteIcon.js +16 -16
  938. package/es/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +17 -17
  939. package/es/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +17 -17
  940. package/es/PRIVATE_ThemedIcons/DragHandleIcon.js +16 -16
  941. package/es/PRIVATE_ThemedIcons/DropdownArrowIcon.js +16 -16
  942. package/es/PRIVATE_ThemedIcons/ExpandIcon.js +16 -16
  943. package/es/PRIVATE_ThemedIcons/HelpIcon.js +16 -16
  944. package/es/PRIVATE_ThemedIcons/IncrementIcon.js +16 -16
  945. package/es/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +16 -16
  946. package/es/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +16 -16
  947. package/es/PRIVATE_ThemedIcons/MessageErrorIcon.js +16 -16
  948. package/es/PRIVATE_ThemedIcons/MessageInfoIcon.js +16 -16
  949. package/es/PRIVATE_ThemedIcons/MessageWarningIcon.js +16 -16
  950. package/es/PRIVATE_ThemedIcons/MinusIcon.js +16 -16
  951. package/es/PRIVATE_ThemedIcons/NavDownIcon.js +16 -16
  952. package/es/PRIVATE_ThemedIcons/None.js +16 -16
  953. package/es/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +16 -16
  954. package/es/PRIVATE_ThemedIcons/PlusIcon.js +16 -16
  955. package/es/PRIVATE_ThemedIcons/RadioOffIcon.js +16 -16
  956. package/es/PRIVATE_ThemedIcons/RadioOnIcon.js +16 -16
  957. package/es/PRIVATE_ThemedIcons/SortAscendingIcon.js +16 -16
  958. package/es/PRIVATE_ThemedIcons/SortDescendingIcon.js +16 -16
  959. package/es/PRIVATE_ThemedIcons/ViewHideIcon.js +16 -16
  960. package/es/PRIVATE_ThemedIcons/ViewIcon.js +16 -16
  961. package/es/PRIVATE_TimeComponent.js +19 -19
  962. package/es/PRIVATE_TruncatingLink.js +16 -16
  963. package/es/PRIVATE_VisOverview.js +16 -16
  964. package/es/PRIVATE_VisStatusMessage.js +5 -5
  965. package/es/PRIVATE_VisTabularDatatip.js +4 -4
  966. package/es/{Popup-d782a727.js → Popup-0f23bad9.js} +10 -10
  967. package/es/{Popup-d782a727.js.map → Popup-0f23bad9.js.map} +1 -1
  968. package/es/ProgressButtonLabelLayout-765b3a67.js +3 -3
  969. package/es/{ProgressCircle-d1f1a500.js → ProgressCircle-bb22d984.js} +2 -2
  970. package/es/{ProgressCircle-d1f1a500.js.map → ProgressCircle-bb22d984.js.map} +1 -1
  971. package/es/ProgressCircleVariants.styles.css +4 -4
  972. package/es/ProgressCircleVariants.styles2.css +4 -4
  973. package/es/RadioIconVariants.styles.css +3 -3
  974. package/es/RadioIconVariants.styles2.css +3 -3
  975. package/es/RadioItem-4538a3b5.js +6 -6
  976. package/es/ReadonlyTextFieldInput-5ff445b5.js +1 -1
  977. package/es/{ReferenceLineArea-53129f72.js → ReferenceLineArea-cc72b070.js} +3 -3
  978. package/es/{ReferenceLineArea-53129f72.js.map → ReferenceLineArea-cc72b070.js.map} +1 -1
  979. package/es/RevealToggleIcon-5f4ab7aa.js +1 -1
  980. package/es/{SectionedContent-a39cd82d.js → SectionedContent-e10e5a04.js} +5 -5
  981. package/es/{SectionedContent-a39cd82d.js.map → SectionedContent-e10e5a04.js.map} +1 -1
  982. package/es/SelectMenuGroupContext-6ee1b1e1.js +6 -6
  983. package/es/SelectMobileFieldInput-b9917148.js +8 -8
  984. package/es/{SelectorAll-de333d4d.js → SelectorAll-59d30e4f.js} +5 -5
  985. package/es/{SelectorAll-de333d4d.js.map → SelectorAll-59d30e4f.js.map} +1 -1
  986. package/es/Sheet-b5910642.js +2 -2
  987. package/es/SortControl-efe2f5bf.js +3 -3
  988. package/es/StyledCard-77623731.js +1 -1
  989. package/es/{StyledLabelValueLayout-bb05f474.js → StyledLabelValueLayout-bddfb884.js} +2 -2
  990. package/es/{StyledLabelValueLayout-bb05f474.js.map → StyledLabelValueLayout-bddfb884.js.map} +1 -1
  991. package/es/StyledSwitch-aa3e03af.js +2 -2
  992. package/es/StyledTextField-64f0929e.js +5 -5
  993. package/es/Submenu-d5927a83.js +1 -1
  994. package/es/{TabBar-49b735e8.js → TabBar-8ea1a60c.js} +15 -11
  995. package/es/TabBar-8ea1a60c.js.map +1 -0
  996. package/es/TabBarContextMenu-d9a31d89.js +2 -2
  997. package/es/TabBarLayout-9b67d1b6.js +1 -1
  998. package/es/{Table-5bc4bdb7.js → Table-1195e284.js} +12 -12
  999. package/es/{Table-5bc4bdb7.js.map → Table-1195e284.js.map} +1 -1
  1000. package/es/TableColGroup-7c7b852c.js +1 -1
  1001. package/es/TextArea-1d78b5d8.js +226 -0
  1002. package/es/TextArea-1d78b5d8.js.map +1 -0
  1003. package/es/TextField-9aba3df3.js +3 -3
  1004. package/es/Theme-redwood/theme.css +531 -531
  1005. package/es/Theme-stable/theme.css +564 -564
  1006. package/es/TimeComponentCanvas2D-d81e0b0d.js +6 -6
  1007. package/es/ToggleButton-4ec8c0ee.js +1 -1
  1008. package/es/TrainVariants.styles.css +6 -6
  1009. package/es/TrainVariants.styles2.css +6 -6
  1010. package/es/TruncatingLink-cfd6e8a3.js +4 -4
  1011. package/es/TruncatingText-02a5241a.js +1 -1
  1012. package/es/UNSAFE_AccordionItemMultiple.js +18 -18
  1013. package/es/UNSAFE_AccordionItemSingle.js +18 -18
  1014. package/es/UNSAFE_ActionCard.js +2 -2
  1015. package/es/UNSAFE_BarChart.js +40 -40
  1016. package/es/UNSAFE_BareButton.js +2 -2
  1017. package/es/UNSAFE_BaseButton.js +5 -5
  1018. package/es/UNSAFE_Button.js +6 -6
  1019. package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutTheme.js +1 -1
  1020. package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutVariants.css.js +1 -1
  1021. package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutTheme.js +1 -1
  1022. package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutVariants.css.js +1 -1
  1023. package/es/UNSAFE_ButtonLayout.js +1 -1
  1024. package/es/UNSAFE_ButtonSet.js +4 -4
  1025. package/es/UNSAFE_ButtonSetButton.js +5 -5
  1026. package/es/UNSAFE_ButtonSetIconButton.js +17 -17
  1027. package/es/UNSAFE_ButtonSetItem.js +18 -18
  1028. package/es/UNSAFE_ButtonSetMultiple.js +4 -4
  1029. package/es/UNSAFE_ButtonSetSingle.js +4 -4
  1030. package/es/UNSAFE_Card.js +3 -3
  1031. package/es/UNSAFE_CardFlexView.js +23 -23
  1032. package/es/UNSAFE_CardGridView.js +23 -23
  1033. package/es/UNSAFE_Center.js +5 -5
  1034. package/es/UNSAFE_Checkbox.js +26 -26
  1035. package/es/UNSAFE_CheckboxItem.js +26 -26
  1036. package/es/UNSAFE_CheckboxRadioField.js +4 -4
  1037. package/es/UNSAFE_CheckboxSet.js +27 -27
  1038. package/es/UNSAFE_Chip.js +2 -2
  1039. package/es/UNSAFE_Collapsible.js +18 -18
  1040. package/es/UNSAFE_ColorPalette.js +19 -19
  1041. package/es/UNSAFE_ColorPicker.js +21 -21
  1042. package/es/UNSAFE_ColorSwatch.js +17 -17
  1043. package/es/UNSAFE_ComboChart.js +40 -40
  1044. package/es/UNSAFE_ComponentMessage.js +21 -21
  1045. package/es/UNSAFE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
  1046. package/es/UNSAFE_ContainerDiagram.js +30 -30
  1047. package/es/UNSAFE_ConveyorBelt.js +18 -18
  1048. package/es/UNSAFE_DatePicker.js +27 -27
  1049. package/es/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
  1050. package/es/UNSAFE_Diagram.js +30 -30
  1051. package/es/UNSAFE_Dialog.js +22 -22
  1052. package/es/UNSAFE_DragHandle.js +17 -17
  1053. package/es/UNSAFE_DrawerLayout.js +12 -12
  1054. package/es/UNSAFE_DrawerPopup.js +11 -11
  1055. package/es/UNSAFE_Dropdown.js +15 -15
  1056. package/es/UNSAFE_Environment.js +4 -4
  1057. package/es/UNSAFE_ExpandableList.js +67 -67
  1058. package/es/UNSAFE_FilePicker.js +4 -4
  1059. package/es/UNSAFE_FlatTreeView.js +39 -39
  1060. package/es/UNSAFE_Flex.js +4 -4
  1061. package/es/UNSAFE_Floating.js +11 -11
  1062. package/es/UNSAFE_FormLayout.js +2 -2
  1063. package/es/UNSAFE_Gantt.js +23 -23
  1064. package/es/UNSAFE_Grid.js +4 -4
  1065. package/es/UNSAFE_HighlightText.js +4 -4
  1066. package/es/UNSAFE_Icon.js +16 -16
  1067. package/es/UNSAFE_IconButton.js +17 -17
  1068. package/es/UNSAFE_IconMenuButton.js +26 -26
  1069. package/es/UNSAFE_IconProgressButton.js +22 -22
  1070. package/es/UNSAFE_IconToggleButton.js +17 -17
  1071. package/es/UNSAFE_Indexer.js +19 -19
  1072. package/es/UNSAFE_InlineSelectSingle.js +34 -34
  1073. package/es/UNSAFE_InputColor.js +33 -33
  1074. package/es/UNSAFE_InputDateMask.js +27 -27
  1075. package/es/UNSAFE_InputDatePicker.js +37 -37
  1076. package/es/UNSAFE_InputPassword.js +27 -27
  1077. package/es/UNSAFE_InputSensitiveText.js +28 -28
  1078. package/es/UNSAFE_InputText.js +29 -29
  1079. package/es/UNSAFE_InputTimeMask.js +27 -27
  1080. package/es/UNSAFE_Label.js +26 -26
  1081. package/es/UNSAFE_LabelValueLayout.js +4 -4
  1082. package/es/UNSAFE_LabelledLink.js +28 -28
  1083. package/es/UNSAFE_Layer.js +8 -8
  1084. package/es/UNSAFE_Legend.js +28 -28
  1085. package/es/UNSAFE_LineAreaChart.js +40 -40
  1086. package/es/UNSAFE_Link.js +2 -2
  1087. package/es/UNSAFE_ListItemLayout.js +4 -4
  1088. package/es/UNSAFE_ListView.js +76 -76
  1089. package/es/UNSAFE_LiveRegion.js +4 -4
  1090. package/es/UNSAFE_Menu/themes/redwood/MenuItemTheme.js +1 -1
  1091. package/es/UNSAFE_Menu/themes/redwood/MenuItemVariants.css.js +1 -1
  1092. package/es/UNSAFE_Menu/themes/stable/MenuItemTheme.js +1 -1
  1093. package/es/UNSAFE_Menu/themes/stable/MenuItemVariants.css.js +1 -1
  1094. package/es/UNSAFE_Menu.js +27 -27
  1095. package/es/UNSAFE_MenuButton.js +26 -26
  1096. package/es/UNSAFE_MessageBanner/themes/redwood/MessageBannerTheme.js +1 -1
  1097. package/es/UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css.js +1 -1
  1098. package/es/UNSAFE_MessageBanner/themes/stable/MessageBannerTheme.js +1 -1
  1099. package/es/UNSAFE_MessageBanner/themes/stable/MessageBannerVariants.css.js +1 -1
  1100. package/es/UNSAFE_MessageBanner.js +21 -21
  1101. package/es/UNSAFE_MessageToast.js +23 -23
  1102. package/es/UNSAFE_MeterBar.js +16 -16
  1103. package/es/UNSAFE_MeterCircle.js +17 -17
  1104. package/es/UNSAFE_Modal.js +8 -8
  1105. package/es/UNSAFE_NavigationList.js +29 -29
  1106. package/es/UNSAFE_NavigationListCommon.js +20 -20
  1107. package/es/UNSAFE_NumberInputText.js +29 -29
  1108. package/es/UNSAFE_OverflowTabBar.js +45 -41
  1109. package/es/UNSAFE_OverflowTabBar.js.map +1 -1
  1110. package/es/UNSAFE_PictoChart.js +26 -26
  1111. package/es/UNSAFE_PieChart.js +27 -27
  1112. package/es/UNSAFE_Popup.js +18 -18
  1113. package/es/UNSAFE_ProgressBar.js +4 -4
  1114. package/es/UNSAFE_ProgressButton.js +22 -22
  1115. package/es/UNSAFE_ProgressButtonLabelLayout.js +11 -11
  1116. package/es/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleTheme.js +1 -1
  1117. package/es/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleVariants.css.js +1 -1
  1118. package/es/UNSAFE_ProgressCircle/themes/stable/ProgressCircleTheme.js +1 -1
  1119. package/es/UNSAFE_ProgressCircle/themes/stable/ProgressCircleVariants.css.js +1 -1
  1120. package/es/UNSAFE_ProgressCircle.js +5 -5
  1121. package/es/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js +1 -1
  1122. package/es/UNSAFE_RadioItem/themes/redwood/RadioIconVariants.css.js +1 -1
  1123. package/es/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js +1 -1
  1124. package/es/UNSAFE_RadioItem/themes/stable/RadioIconVariants.css.js +1 -1
  1125. package/es/UNSAFE_RadioItem.js +27 -27
  1126. package/es/UNSAFE_RadioSet.js +28 -28
  1127. package/es/UNSAFE_RatingGauge.js +18 -18
  1128. package/es/UNSAFE_ReorderableTabBar.js +41 -41
  1129. package/es/UNSAFE_RichCheckboxSet.js +29 -29
  1130. package/es/UNSAFE_RichRadioSet.js +30 -30
  1131. package/es/UNSAFE_RichSelectionItem.js +30 -30
  1132. package/es/UNSAFE_ScatterChart.js +40 -40
  1133. package/es/UNSAFE_SectionalLegend.js +28 -28
  1134. package/es/UNSAFE_SelectMultiple.js +39 -39
  1135. package/es/UNSAFE_SelectSingle.js +36 -36
  1136. package/es/UNSAFE_SelectionCard.js +3 -3
  1137. package/es/UNSAFE_Selector.js +17 -17
  1138. package/es/UNSAFE_SelectorAll.js +19 -19
  1139. package/es/UNSAFE_Sheet.js +11 -11
  1140. package/es/UNSAFE_SortControl.js +20 -20
  1141. package/es/UNSAFE_SplitMenuButton.js +26 -26
  1142. package/es/UNSAFE_Switch.js +27 -27
  1143. package/es/UNSAFE_TabBar.js +40 -40
  1144. package/es/UNSAFE_TabBarCommon.js +29 -29
  1145. package/es/UNSAFE_TabBarMixed.js +39 -39
  1146. package/es/UNSAFE_TabBarMixed.js.map +1 -1
  1147. package/es/UNSAFE_TableView.js +59 -59
  1148. package/es/UNSAFE_TagCloud.js +27 -27
  1149. package/es/UNSAFE_TextArea.js +119 -239
  1150. package/es/UNSAFE_TextArea.js.map +1 -1
  1151. package/es/UNSAFE_TextAreaAutosize.js +29 -29
  1152. package/es/UNSAFE_TextField.js +20 -20
  1153. package/es/UNSAFE_ToggleButton.js +5 -5
  1154. package/es/UNSAFE_Toolbar.js +5 -5
  1155. package/es/UNSAFE_Train/themes/redwood/TrainTheme.js +1 -1
  1156. package/es/UNSAFE_Train/themes/redwood/TrainVariants.css.js +1 -1
  1157. package/es/UNSAFE_Train/themes/stable/TrainTheme.js +1 -1
  1158. package/es/UNSAFE_Train/themes/stable/TrainVariants.css.js +1 -1
  1159. package/es/UNSAFE_Train.js +18 -18
  1160. package/es/UNSAFE_TruncatingBadge.js +17 -17
  1161. package/es/UNSAFE_TruncatingText.js +17 -17
  1162. package/es/UNSAFE_UserAssistance.js +27 -27
  1163. package/es/UNSAFE_View.js +7 -7
  1164. package/es/UNSAFE_VirtualizedListView.js +22 -22
  1165. package/es/UNSAFE_VisInvalidDataMessage.js +6 -6
  1166. package/es/UNSAFE_VisNoDataMessage.js +6 -6
  1167. package/es/UNSAFE_VisProgressiveLoader.js +5 -5
  1168. package/es/UNSAFE_WindowOverlay.js +4 -4
  1169. package/es/{View-5bdd9b3c.js → View-818f2f31.js} +5 -5
  1170. package/es/{View-5bdd9b3c.js.map → View-818f2f31.js.map} +1 -1
  1171. package/es/{VisStatusMessage-e2d629bb.js → VisStatusMessage-09c532e3.js} +2 -2
  1172. package/es/{VisStatusMessage-e2d629bb.js.map → VisStatusMessage-09c532e3.js.map} +1 -1
  1173. package/es/{VisTabularDatatip-85b00c1b.js → VisTabularDatatip-f45069f1.js} +2 -2
  1174. package/es/{VisTabularDatatip-85b00c1b.js.map → VisTabularDatatip-f45069f1.js.map} +1 -1
  1175. package/es/{WindowOverlay-ee64634e.js → WindowOverlay-cd90d18c.js} +2 -2
  1176. package/es/{WindowOverlay-ee64634e.js.map → WindowOverlay-cd90d18c.js.map} +1 -1
  1177. package/es/{YearsGridView-5379d7af.js → YearsGridView-61ecebfe.js} +4 -4
  1178. package/es/{YearsGridView-5379d7af.js.map → YearsGridView-61ecebfe.js.map} +1 -1
  1179. package/es/hoc/PRIVATE_withDirectionIcon.js +4 -4
  1180. package/es/hoc/PRIVATE_withThemeIcon.js +3 -3
  1181. package/es/hoc/UNSAFE_withThemeProps.js +3 -3
  1182. package/es/hooks/PRIVATE_useChartContextMenu.js +24 -24
  1183. package/es/hooks/PRIVATE_useChartDatatip.js +14 -14
  1184. package/es/hooks/PRIVATE_useChartEvents.js +19 -19
  1185. package/es/hooks/PRIVATE_useChartMarquee.js +19 -19
  1186. package/es/hooks/PRIVATE_useCollectionFocusRing.js +17 -17
  1187. package/es/hooks/PRIVATE_useCssVars.js +7 -7
  1188. package/es/hooks/PRIVATE_useCurrentKey.js +4 -4
  1189. package/es/hooks/PRIVATE_useDatatip.js +12 -12
  1190. package/es/hooks/PRIVATE_useDetectHorizontalOverflow.js +17 -17
  1191. package/es/hooks/PRIVATE_useFloating.js +4 -4
  1192. package/es/hooks/PRIVATE_useItemAction.js +17 -17
  1193. package/es/hooks/PRIVATE_useListCommon.js +19 -19
  1194. package/es/hooks/PRIVATE_useOutsideMousedown.js +9 -9
  1195. package/es/hooks/PRIVATE_useRadioFocusManager.js +4 -4
  1196. package/es/hooks/PRIVATE_useReorderable.js +19 -19
  1197. package/es/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
  1198. package/es/hooks/PRIVATE_useSelection.js +4 -4
  1199. package/es/hooks/PRIVATE_useTabBar.js +28 -28
  1200. package/es/hooks/PRIVATE_useTabbableModeSet.js +17 -17
  1201. package/es/hooks/PRIVATE_useTooltipOnTruncation.js +17 -17
  1202. package/es/hooks/PRIVATE_useVisContextMenu.js +24 -24
  1203. package/es/hooks/PRIVATE_useVisDragModeControls.js +19 -19
  1204. package/es/hooks/PRIVATE_useVisEvents.js +4 -4
  1205. package/es/hooks/PRIVATE_useVisMeterEvents.js +14 -14
  1206. package/es/hooks/PRIVATE_useVisSelection.js +15 -15
  1207. package/es/hooks/UNSAFE_useBareButton.js +2 -2
  1208. package/es/hooks/UNSAFE_useColorScheme.js +3 -3
  1209. package/es/hooks/UNSAFE_useCurrentBgColor.js +2 -2
  1210. package/es/hooks/UNSAFE_useDensity.js +3 -3
  1211. package/es/hooks/UNSAFE_useHiddenTestMethod.js +3 -3
  1212. package/es/hooks/UNSAFE_useOutsideClick.js +8 -8
  1213. package/es/hooks/UNSAFE_usePrefixSuffix.js +4 -4
  1214. package/es/hooks/UNSAFE_useScale.js +3 -3
  1215. package/es/hooks/UNSAFE_useTestId.js +3 -3
  1216. package/es/hooks/UNSAFE_useTheme.js +3 -3
  1217. package/es/hooks/UNSAFE_useThemeInterpolations.js +6 -6
  1218. package/es/hooks/UNSAFE_useTooltip.js +17 -17
  1219. package/es/hooks/UNSAFE_useTranslationBundle.js +3 -3
  1220. package/es/hooks/UNSAFE_useUser.js +3 -3
  1221. package/es/{popupUtils-51366a29.js → popupUtils-7774330e.js} +2 -2
  1222. package/es/{popupUtils-51366a29.js.map → popupUtils-7774330e.js.map} +1 -1
  1223. package/es/{tooltipUtils-7825620d.js → tooltipUtils-1e5f592e.js} +5 -5
  1224. package/es/{tooltipUtils-7825620d.js.map → tooltipUtils-1e5f592e.js.map} +1 -1
  1225. package/es/useBareButton-ff4bd21e.js +1 -1
  1226. package/es/useCellNavigation-0565b6dd.js +1 -1
  1227. package/es/useChartContextMenu-41b18037.js +2 -2
  1228. package/es/{useChartDatatip-e4009610.js → useChartDatatip-69788dbb.js} +4 -4
  1229. package/es/{useChartDatatip-e4009610.js.map → useChartDatatip-69788dbb.js.map} +1 -1
  1230. package/es/{useColorScheme-c4f6caab.js → useColorScheme-67245285.js} +2 -2
  1231. package/es/{useColorScheme-c4f6caab.js.map → useColorScheme-67245285.js.map} +1 -1
  1232. package/es/useContextMenu-2c5034a4.js +2 -2
  1233. package/es/{useCssVars-bc2527ac.js → useCssVars-048a52d8.js} +5 -5
  1234. package/es/{useCssVars-bc2527ac.js.map → useCssVars-048a52d8.js.map} +1 -1
  1235. package/es/{useCurrentKey-5f865bbd.js → useCurrentKey-38e5f097.js} +2 -2
  1236. package/es/{useCurrentKey-5f865bbd.js.map → useCurrentKey-38e5f097.js.map} +1 -1
  1237. package/es/{useDatatip-710f97c7.js → useDatatip-e65b4013.js} +4 -4
  1238. package/es/{useDatatip-710f97c7.js.map → useDatatip-e65b4013.js.map} +1 -1
  1239. package/es/{useDensity-1acb0153.js → useDensity-969273f3.js} +2 -2
  1240. package/es/{useDensity-1acb0153.js.map → useDensity-969273f3.js.map} +1 -1
  1241. package/es/{useDetectHorizontalOverflow-154005bb.js → useDetectHorizontalOverflow-5895bc5a.js} +30 -58
  1242. package/es/useDetectHorizontalOverflow-5895bc5a.js.map +1 -0
  1243. package/es/useDisplayValue-614a904f.js +5 -5
  1244. package/es/{useExpandCollapse-5739cfd2.js → useExpandCollapse-51f9bb4b.js} +2 -2
  1245. package/es/{useExpandCollapse-5739cfd2.js.map → useExpandCollapse-51f9bb4b.js.map} +1 -1
  1246. package/es/{useFloating-b9d680f7.js → useFloating-c74a7f54.js} +2 -2
  1247. package/es/{useFloating-b9d680f7.js.map → useFloating-c74a7f54.js.map} +1 -1
  1248. package/es/{useHiddenTestMethod-f3f25093.js → useHiddenTestMethod-ec7b3989.js} +2 -2
  1249. package/es/{useHiddenTestMethod-f3f25093.js.map → useHiddenTestMethod-ec7b3989.js.map} +1 -1
  1250. package/es/{useKeyboardEvents-9aae7ea3.js → useKeyboardEvents-a1495728.js} +2 -2
  1251. package/es/{useKeyboardEvents-9aae7ea3.js.map → useKeyboardEvents-a1495728.js.map} +1 -1
  1252. package/es/useLegendContextMenu-cda4f327.js +4 -4
  1253. package/es/{useMeterDatatip-b8148b11.js → useMeterDatatip-c301cd9a.js} +3 -3
  1254. package/es/{useMeterDatatip-b8148b11.js.map → useMeterDatatip-c301cd9a.js.map} +1 -1
  1255. package/es/useNavigation-ef11265f.js +1 -1
  1256. package/es/{useOutsideClick-f00c65fc.js → useOutsideClick-3ac4fc59.js} +2 -2
  1257. package/es/{useOutsideClick-f00c65fc.js.map → useOutsideClick-3ac4fc59.js.map} +1 -1
  1258. package/es/{useOutsideMousedown-c45c22c0.js → useOutsideMousedown-e0866d58.js} +2 -2
  1259. package/es/{useOutsideMousedown-c45c22c0.js.map → useOutsideMousedown-e0866d58.js.map} +1 -1
  1260. package/es/{usePopupAnimation-96d2bc83.js → usePopupAnimation-7c5db425.js} +2 -2
  1261. package/es/{usePopupAnimation-96d2bc83.js.map → usePopupAnimation-7c5db425.js.map} +1 -1
  1262. package/es/{usePrefixSuffix-f981b65f.js → usePrefixSuffix-95fc00fd.js} +2 -2
  1263. package/es/{usePrefixSuffix-f981b65f.js.map → usePrefixSuffix-95fc00fd.js.map} +1 -1
  1264. package/es/{useRadioFocusManager-36eb283e.js → useRadioFocusManager-d9eecfb4.js} +2 -2
  1265. package/es/{useRadioFocusManager-36eb283e.js.map → useRadioFocusManager-d9eecfb4.js.map} +1 -1
  1266. package/es/{useReorderableItem-017bc1fc.js → useReorderableItem-9e15401c.js} +3 -3
  1267. package/es/{useReorderableItem-017bc1fc.js.map → useReorderableItem-9e15401c.js.map} +1 -1
  1268. package/es/{useRovingTabIndexContainer-5992e107.js → useRovingTabIndexContainer-c0356f5d.js} +2 -2
  1269. package/es/{useRovingTabIndexContainer-5992e107.js.map → useRovingTabIndexContainer-c0356f5d.js.map} +1 -1
  1270. package/es/{useScale-434ad939.js → useScale-93490e54.js} +2 -2
  1271. package/es/{useScale-434ad939.js.map → useScale-93490e54.js.map} +1 -1
  1272. package/es/useSelectCommon-34b231da.js +5 -5
  1273. package/es/{useSelectDrill-4abc5148.js → useSelectDrill-6b515558.js} +3 -3
  1274. package/es/{useSelectDrill-4abc5148.js.map → useSelectDrill-6b515558.js.map} +1 -1
  1275. package/es/{useSelection-d79057c6.js → useSelection-1113eb0b.js} +6 -6
  1276. package/es/{useSelection-d79057c6.js.map → useSelection-1113eb0b.js.map} +1 -1
  1277. package/es/{useSelection-65134722.js → useSelection-d6fefa3d.js} +2 -2
  1278. package/es/{useSelection-65134722.js.map → useSelection-d6fefa3d.js.map} +1 -1
  1279. package/es/{useTabBar-c50957fa.js → useTabBar-6dca14a7.js} +6 -9
  1280. package/es/useTabBar-6dca14a7.js.map +1 -0
  1281. package/es/{useTestId-f24ac480.js → useTestId-ab1bede6.js} +2 -2
  1282. package/es/{useTestId-f24ac480.js.map → useTestId-ab1bede6.js.map} +1 -1
  1283. package/es/{useTheme-0e7497db.js → useTheme-c2cfbc29.js} +2 -2
  1284. package/es/{useTheme-0e7497db.js.map → useTheme-c2cfbc29.js.map} +1 -1
  1285. package/es/{useThemeInterpolations-e144e8ec.js → useThemeInterpolations-5f358139.js} +5 -5
  1286. package/es/{useThemeInterpolations-e144e8ec.js.map → useThemeInterpolations-5f358139.js.map} +1 -1
  1287. package/es/{useTooltip-33d2e421.js → useTooltip-22ae63dd.js} +2 -2
  1288. package/es/{useTooltip-33d2e421.js.map → useTooltip-22ae63dd.js.map} +1 -1
  1289. package/es/{useTooltipControlled-af42d1d6.js → useTooltipControlled-207b0297.js} +5 -5
  1290. package/es/{useTooltipControlled-af42d1d6.js.map → useTooltipControlled-207b0297.js.map} +1 -1
  1291. package/es/{useTooltipOnTruncation-f7a0a7a9.js → useTooltipOnTruncation-e64dded6.js} +4 -4
  1292. package/es/{useTooltipOnTruncation-f7a0a7a9.js.map → useTooltipOnTruncation-e64dded6.js.map} +1 -1
  1293. package/es/{useTranslationBundle-4822502f.js → useTranslationBundle-bc6e0896.js} +2 -2
  1294. package/es/{useTranslationBundle-4822502f.js.map → useTranslationBundle-bc6e0896.js.map} +1 -1
  1295. package/es/{useUser-06d34d19.js → useUser-e543b73c.js} +2 -2
  1296. package/es/{useUser-06d34d19.js.map → useUser-e543b73c.js.map} +1 -1
  1297. package/es/useVisDragModeControls-8791a1b4.js +1 -1
  1298. package/es/{useVisEvents-256dee29.js → useVisEvents-0edc925f.js} +2 -2
  1299. package/es/{useVisEvents-256dee29.js.map → useVisEvents-0edc925f.js.map} +1 -1
  1300. package/es/utils/PRIVATE_collectionUtils.js +17 -17
  1301. package/es/utils/PRIVATE_tabBarUtils.js +17 -17
  1302. package/es/utils/PRIVATE_tooltipUtils.js +14 -14
  1303. package/es/utils/PRIVATE_visTestUtils.js +4 -4
  1304. package/es/utils/UNSAFE_popupUtils.js +8 -8
  1305. package/es/{withDirectionIcon-a8d84a3d.js → withDirectionIcon-b725a6d7.js} +2 -2
  1306. package/es/{withDirectionIcon-a8d84a3d.js.map → withDirectionIcon-b725a6d7.js.map} +1 -1
  1307. package/es/withThemeProps-dbd4fedf.js +2 -2
  1308. package/package.json +2 -2
  1309. package/types/UNSAFE_TabBarMixed/useTabBarMixed.d.ts +1 -1
  1310. package/amd/BaseCardView-131755ff.js +0 -2
  1311. package/amd/CompactLabelAssistance-002f7b2f.js +0 -2
  1312. package/amd/DragHandle-ebe5c3ae.js +0 -2
  1313. package/amd/EmbeddedIconButton-49aab46c.js +0 -2
  1314. package/amd/Flex-4b81b412.js +0 -2
  1315. package/amd/HighlightText-ee76c447.js +0 -2
  1316. package/amd/InputDatePicker-e1b3a4ec.js +0 -2
  1317. package/amd/LayerManager-426c669d.js +0 -2
  1318. package/amd/ListView-7af453a0.js +0 -2
  1319. package/amd/LiveRegion-dbefb95b.js +0 -2
  1320. package/amd/MessageLayer-29d1f82c.js +0 -2
  1321. package/amd/NavigationList-8cd4ad71.js +0 -2
  1322. package/amd/NavigationList-8cd4ad71.js.map +0 -1
  1323. package/amd/NavigationListItem-dbb3ad30.js +0 -2
  1324. package/amd/NavigationListItem-dbb3ad30.js.map +0 -1
  1325. package/amd/NavigationListLinkItem-5f82f3c2.js +0 -2
  1326. package/amd/NavigationListLinkItem-5f82f3c2.js.map +0 -1
  1327. package/amd/OverflowTabBar-dbe09e7b.js +0 -2
  1328. package/amd/OverflowTabBar-dbe09e7b.js.map +0 -1
  1329. package/amd/OverflowTabBarItem-51015785.js +0 -2
  1330. package/amd/RemovableNavigationListItem-69964f9b.js +0 -2
  1331. package/amd/ReorderableTabBar-88812623.js +0 -2
  1332. package/amd/SectionedContent-b3b8c704.js +0 -2
  1333. package/amd/TabBar-71251f08.js +0 -2
  1334. package/amd/TabBar-71251f08.js.map +0 -1
  1335. package/amd/TabBarMixed-ec5c495d.js +0 -2
  1336. package/amd/VisNoDataMessage-fc41dae3.js +0 -2
  1337. package/amd/index-ec69d863.js.map +0 -1
  1338. package/amd/popupUtils-d42db8bf.js +0 -2
  1339. package/amd/render-0e124b25.js +0 -2
  1340. package/amd/useCurrentKey-5749e7fb.js +0 -2
  1341. package/amd/useDetectHorizontalOverflow-b00641ee.js +0 -2
  1342. package/amd/useDetectHorizontalOverflow-b00641ee.js.map +0 -1
  1343. package/amd/useKeyboardEvents-f0419128.js +0 -2
  1344. package/amd/useMeterDatatip-126b6bc1.js +0 -2
  1345. package/amd/useNavigationListItem-29bd087a.js +0 -2
  1346. package/amd/useNavigationListItem-29bd087a.js.map +0 -1
  1347. package/amd/usePopupAnimation-dc282b02.js +0 -2
  1348. package/amd/usePrefixSuffix-dd2cae55.js +0 -2
  1349. package/amd/useRadioFocusManager-462e28eb.js +0 -2
  1350. package/amd/useTabBar-0161bf67.js +0 -2
  1351. package/amd/useTabBar-0161bf67.js.map +0 -1
  1352. package/amd/useThemeInterpolations-cc05b0f0.js +0 -2
  1353. package/amd/useTooltip-31ac71c4.js +0 -2
  1354. package/cjs/TabBar-9bc26ed2.js.map +0 -1
  1355. package/cjs/useDetectHorizontalOverflow-867b1a33.js.map +0 -1
  1356. package/cjs/useTabBar-59484847.js.map +0 -1
  1357. package/es/TabBar-49b735e8.js.map +0 -1
  1358. package/es/useDetectHorizontalOverflow-154005bb.js.map +0 -1
  1359. package/es/useTabBar-c50957fa.js.map +0 -1
  1360. package/es/useTextAreaAltEnter-ac460f4c.js +0 -61
  1361. package/es/useTextAreaAltEnter-ac460f4c.js.map +0 -1
  1362. /package/amd/UNSAFE_BaseButton/themes/{redwood → stable}/BaseButtonBaseTheme.styles.css +0 -0
  1363. /package/cjs/UNSAFE_Switch/themes/{redwood → stable}/SwitchBaseTheme.styles.css +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDetectHorizontalOverflow-b00641ee.js","sources":["../../src/hooks/PRIVATE_useDetectHorizontalOverflow/useDetectHorizontalOverflow.ts"],"sourcesContent":["import { RefObject } from 'preact';\nimport { useState, useLayoutEffect, useRef, StateUpdater, useCallback } from 'preact/hooks';\nimport { useResizeObserver } from '../../hooks/UNSAFE_useResizeObserver';\nimport { Size } from '../../utils/UNSAFE_size';\nimport { getTabWidths } from '../../utils/PRIVATE_tabBarUtils';\nimport type { TrailingContentInfo } from '../../utils/PRIVATE_tabBarUtils';\n\ntype TabDimensions<K extends string | number> = {\n key: K;\n maxWidth: number;\n nonTextWidth?: number;\n needsTruncation?: boolean;\n cumulativeWidth?: number;\n};\n\n//The minimum width of the overflowtabbaritem, it can be rendered with width greater than this based on available width\nconst MORE_ITEM_WIDTH = 48;\nconst LABEL_MIN_WIDTH = 96;\nconst TAB_BORDER = 6;\n//This is the minWidth a tab will have if it has only a label.\nconst TAB_MIN_WIDTH = LABEL_MIN_WIDTH + TAB_BORDER;\n\nexport type useDetectOverflowProps<K extends string | number> = {\n rootRef: RefObject<HTMLDivElement>;\n keysArray: (K | undefined)[];\n isTruncationDisabled?: boolean;\n};\n\n/**\n * Implements overflow detection and calculation\n */\nexport function useDetectHorizontalOverflow<K extends string | number>({\n rootRef,\n keysArray,\n isTruncationDisabled = true\n}: useDetectOverflowProps<K>) {\n const [visibleItemKeys, setVisibleItemKeys] = useState<(K | undefined)[]>();\n const [overflowItemKeys, setOverflowingItemKeys] = useState<(K | undefined)[]>();\n const trailingContentWidths = useRef(new Map<K, TrailingContentInfo>());\n const [tabMaxWidth, setTabMaxWidth] = useState<Map<K, Size>>();\n // This state var is to only re-trigger the layout effect. Using it locally will not give the latest updated value hence we use current suffix vars\n const [tabBarWidth, setTabBarWidth] = useState<number>(0);\n const isAllItemsTruncatedMax = useRef<boolean>(false);\n const isAllItemsTruncatedFinal = useRef<boolean>(false);\n const tabDimensions = useRef<TabDimensions<K>[]>();\n\n useLayoutEffect(() => {\n // Store locally to avoid calling rootRef everytime within layouteffect\n const tabBarWidthCurrent = rootRef?.current?.clientWidth;\n const tabBarScrollWidthCurrent = rootRef?.current?.scrollWidth;\n if (\n rootRef.current &&\n keysArray &&\n keysArray.length > 0 &&\n tabBarWidthCurrent &&\n tabBarWidthCurrent > 0\n ) {\n //Set tabBarWidth if not the current value\n if (tabBarWidth !== tabBarWidthCurrent) {\n setTabBarWidth(tabBarWidthCurrent);\n }\n\n if (tabMaxWidth === undefined) {\n const isOverflow = tabBarWidthCurrent > 0 && tabBarWidthCurrent < tabBarScrollWidthCurrent!;\n\n //If there is no overflow maxWidth should be its prevState, prevState may also be undefined if truncation is disabled.\n if (!isOverflow) {\n setTabMaxWidth((prevState) => {\n return prevState;\n });\n } else {\n //We need to calculate maxWidth only if truncation threshold limit is not reached\n if (!isAllItemsTruncatedMax.current) {\n const tabWidths = getTabWidths(\n rootRef.current,\n trailingContentWidths,\n isTruncationDisabled,\n tabBarWidthCurrent,\n isAllItemsTruncatedMax?.current,\n keysArray as K[]\n );\n //If all items have reached max treshold of truncation then we set it to true\n if (tabWidths.every((item) => item.hasReachedLimit)) {\n isAllItemsTruncatedMax.current = true;\n }\n tabDimensions.current = tabWidths as any;\n }\n //If all items have reached max treshold of truncation then we do not have update tabDimensions are maxWidth cannot go lesser than 96px.\n else {\n tabDimensions.current = tabDimensions.current?.map((item) => ({\n ...item\n }));\n }\n }\n\n //Set calculated maxWidths\n if (!isTruncationDisabled) {\n const tabMaxWidthMap = new Map(\n tabDimensions.current?.map((tab) => [tab.key, (tab.maxWidth + 'px') as Size])\n );\n setTabMaxWidth(tabMaxWidthMap);\n }\n //Overflow calculation\n if (tabBarWidthCurrent < tabBarScrollWidthCurrent!) {\n const arr = tabDimensions.current?.map((item) => item.cumulativeWidth) as number[];\n const lastIndex = arr.length - 1;\n //In addition to scrollWidth we check if the cumulative width of last item is greater than rootRef clientwidth\n if (arr && tabBarWidthCurrent < arr[lastIndex]) {\n const { closestEntry, closestIndex } = searchClosest(arr, tabBarWidthCurrent);\n // Check for not null, because even for '0' value of closestIndex we want to slice in such cases only overflow item will be rendered\n if (closestEntry && closestIndex != null) {\n // Closest index refers to the index of the last item that would be visible.\n // While splicing we need to include it however if we check for closestIndex < lastIndex alone then closestIndex + 1 will be greater than the last item index so we check for one less.\n const lastVisibleItemIndex =\n closestIndex < lastIndex - 1 ? closestIndex + 1 : closestIndex;\n setVisibleItemKeys(keysArray.slice(0, lastVisibleItemIndex));\n setOverflowingItemKeys(keysArray?.slice(lastVisibleItemIndex));\n //Once OverflowTabBarItem is rendered, i.e overflowItemKeys move into overflow menu then space is available, which can be re-dsitributed to truncated visible items. We also check if these visible items have already gone through this calculation otherwise we skip it to avoid infinite loop.\n if (closestIndex > 0 && !isAllItemsTruncatedFinal.current && !isTruncationDisabled) {\n const tabWidthsAfterOverflow = getTabWidths(\n rootRef.current,\n trailingContentWidths,\n isTruncationDisabled,\n tabBarWidthCurrent,\n isAllItemsTruncatedMax?.current\n );\n const tabMaxWidthMapAfterOverflow = new Map(\n tabWidthsAfterOverflow.map((tab) => [tab.key, (tab.maxWidth + 'px') as Size])\n );\n //Flag to indicate that final truncation calculation has occured\n isAllItemsTruncatedFinal.current = true;\n setTabMaxWidth(tabMaxWidthMapAfterOverflow);\n }\n }\n }\n }\n }\n }\n }, [keysArray, rootRef, tabBarWidth, tabMaxWidth, isTruncationDisabled]);\n\n const updateTabBarWidth = useCallback(\n (entry: { contentRect: { width: StateUpdater<number> } }) => {\n const rectWidth = Math.ceil(entry.contentRect.width as number);\n // Sometimes entry.contentRect.width maybe a decimal value so we need to get absolute value\n if (Math.abs(tabBarWidth - (entry.contentRect.width as number)) > 1) {\n setTabBarWidth(entry.contentRect.width);\n if (tabMaxWidth !== undefined && !isAllItemsTruncatedMax.current) {\n setTabMaxWidth(undefined);\n }\n //Once there is change in the container width and there is no overflow we render all items as visible.\n if (rectWidth >= rootRef.current?.scrollWidth!) {\n setVisibleItemKeys(keysArray);\n setOverflowingItemKeys([]);\n }\n isAllItemsTruncatedFinal.current = false;\n }\n },\n [tabBarWidth, tabMaxWidth, rootRef, keysArray]\n );\n\n useResizeObserver(rootRef, updateTabBarWidth);\n\n return shouldRenderAllTabs(visibleItemKeys, overflowItemKeys, keysArray)\n ? {\n visibleItemKeys: keysArray,\n overflowItemKeys,\n maxWidths: tabMaxWidth\n }\n : {\n visibleItemKeys,\n overflowItemKeys,\n maxWidths: tabMaxWidth\n };\n}\n\n//If the overflow + visible keys or their quantity are not the same as keysArray then we first render all the keys as visible\nconst shouldRenderAllTabs = <K extends string | number>(\n visibleItemKeys: (K | undefined)[] | undefined,\n overflowItemKeys: (K | undefined)[] | undefined,\n keysArray: (K | undefined)[]\n) => {\n if (visibleItemKeys == null) return true;\n else if (visibleItemKeys && overflowItemKeys && keysArray) {\n const combinedArray = [...visibleItemKeys, ...overflowItemKeys];\n const isNotEqual =\n combinedArray.length !== keysArray.length ||\n JSON.stringify(keysArray) !== JSON.stringify(combinedArray);\n return isNotEqual;\n } else return false;\n};\n\n//Searches for a value closest and smaller than search value from the cumulative array\nconst searchClosest = (\n arr: number[] | undefined,\n searchValue: number | undefined | null\n): { closestEntry: number | null; closestIndex: number | null } => {\n {\n if (arr != null && searchValue != null) {\n let left = 0;\n let right = arr.length - 1;\n let closestEntry: number | null = null;\n let closestIndex: number | null = null;\n while (left <= right && left < arr.length && right > -1) {\n const mid = Math.floor((left + right) / 2);\n const midEntry = arr[mid];\n if (midEntry === searchValue) {\n return { closestEntry: midEntry!, closestIndex: mid! };\n } else if (midEntry < searchValue) {\n closestEntry = midEntry;\n closestIndex = mid;\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n //If the searchValue is greater than closest entry and their difference is greater more item width then we have space to fit more item. Otherwise we return the index with the closest and small value when compared to searchvalue\n if (closestEntry && searchValue > closestEntry) {\n //NOTE: Do not update closestEntry to midEntry here because value from const midEntry = arr[mid], midEntry maybe greater than searchValue and below it may end up updating closestIndex to mid +1 due to abs check\n //Sometimes closest entry may be much smaller than searchvalue so in such cases we maybe able to accomodate more items. The difference between searchValue and closestEntry should be greater than the minWidth needed for any item so that it can be rendered. If the difference is lesser than item min width we then check if space is available to render overflowitem alone else we reduce the closestIndex.\n closestIndex =\n Math.abs(searchValue - closestEntry) > TAB_MIN_WIDTH && mid + 1 <= arr.length - 2\n ? mid + 1\n : Math.abs(searchValue - closestEntry) > MORE_ITEM_WIDTH\n ? mid\n : mid - 1 >= 0\n ? mid - 1\n : 0;\n }\n //If the searchValue is lesser than closestEntry we return a value lesser than mid, this happens when all the values in the array are lesser than searchValue, i.e screensize is extremely small\n else {\n closestIndex = mid - 1 >= 0 ? mid - 1 : 0;\n }\n }\n return { closestEntry: closestEntry!, closestIndex: closestIndex! };\n } else return { closestEntry: null, closestIndex: null };\n }\n};\n"],"names":["shouldRenderAllTabs","visibleItemKeys","overflowItemKeys","keysArray","combinedArray","length","JSON","stringify","searchClosest","arr","searchValue","left","right","closestEntry","closestIndex","mid","Math","floor","midEntry","abs","LABEL_MIN_WIDTH","rootRef","isTruncationDisabled","setVisibleItemKeys","useState","setOverflowingItemKeys","trailingContentWidths","useRef","Map","tabMaxWidth","setTabMaxWidth","tabBarWidth","setTabBarWidth","isAllItemsTruncatedMax","isAllItemsTruncatedFinal","tabDimensions","useLayoutEffect","tabBarWidthCurrent","current","clientWidth","tabBarScrollWidthCurrent","scrollWidth","undefined","map","item","tabWidths","getTabWidths","every","hasReachedLimit","prevState","tabMaxWidthMap","tab","key","maxWidth","cumulativeWidth","lastIndex","lastVisibleItemIndex","slice","tabWidthsAfterOverflow","tabMaxWidthMapAfterOverflow","updateTabBarWidth","useCallback","entry","rectWidth","ceil","contentRect","width","useResizeObserver","maxWidths"],"mappings":"0HAgLA,MAAMA,EAAsB,CAC1BC,EACAC,EACAC,KAEA,GAAuB,MAAnBF,EAAyB,OAAO,EAC/B,GAAIA,GAAmBC,GAAoBC,EAAW,CACzD,MAAMC,EAAgB,IAAIH,KAAoBC,GAI9C,OAFEE,EAAcC,SAAWF,EAAUE,QACnCC,KAAKC,UAAUJ,KAAeG,KAAKC,UAAUH,EAEhD,CAAM,OAAO,CAAK,EAIfI,EAAgB,CACpBC,EACAC,KAGE,GAAW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C,eACvBC,IACC,MAAMC,EAAY/C,KAAKgD,KAAKF,EAAMG,YAAYC,OAE1ClD,KAAKG,IAAIY,EAAe+B,EAAMG,YAAYC,OAAoB,IAChElC,EAAe8B,EAAMG,YAAYC,YACbxB,IAAhBb,GAA8BI,EAAuBK,SACvDR,OAAeY,GAGbqB,GAAa1C,EAAQiB,SAASG,cAChClB,EAAmBpB,GACnBsB,EAAuB,KAEzBS,EAAyBI,SAAU,EACpC,GAEH,CAACP,EAAaF,EAAaR,EAASlB,IAKtC,OAFAgE,oBAAkB9C,EAASuC,GAEpB5D,EAAoBC,EAAiBC,EAAkBC,GAC1D,CACEF,gBAAiBE,EACjBD,mBACAkE,UAAWvC,GAEb,CACE5B,kBACAC,mBACAkE,UAAWvC,EAEnB"}
@@ -1,2 +0,0 @@
1
- define(['exports', './useUser-08901aba', './meterUtils-0278713d'], (function(e,a,t){"use strict";const r=(e,a,t)=>{t?.({value:e}),a.current=e},s=e=>{e.preventDefault(),e.stopPropagation()};e.handleInput=r,e.useKeyboardEvents=function(e,n,o,c,u,i,b){const{direction:h}=a.useUser(),k="rtl"===h,p=t.adjustForStep(e+c,c,n,o),d=t.adjustForStep(e-c,c,n,o);return{onKeyUp:a=>{switch(a.key){case"Enter":i?.({value:e}),s(a);break;case"Tab":r(e,u,b),s(a);break;case"Home":r(n,u,b),s(a);break;case"End":r(o,u,b),s(a)}},onKeyDown:e=>{switch(e.key){case"Tab":return;case"ArrowDown":r(Math.max(n,d),u,b),s(e);break;case"ArrowUp":r(Math.min(o,p),u,b),s(e);break;case"ArrowLeft":{const a=k?Math.min(o,p):Math.max(n,d);r(a,u,b),s(e);break}case"ArrowRight":{const a=k?Math.max(n,d):Math.min(o,p);r(a,u,b),s(e);break}}}}}}));
2
- //# sourceMappingURL=useKeyboardEvents-f0419128.js.map
@@ -1,2 +0,0 @@
1
- define(['exports', 'preact/hooks', './useKeyboardEvents-f0419128', './useDatatip-a1713300'], (function(t,e,n,r){"use strict";t.useMeterDatatip=function(t,e,n,o){const i=void 0===n?`${t}`:n,{datatipContent:u,datatipProps:a}=r.useDatatip({content:i,anchor:e.current?"pointer":"element",offset:{mainAxis:8,crossAxis:0},placement:"top",touchResponse:"touchStart"});return a["aria-describedby"]=[o,a["aria-describedby"]].filter(Boolean).join(" ")||void 0,{datatipContent:u,datatipProps:a}},t.usePointerEvents=function(t,r,o,i,u,a,c){const s=e.useRef(!1);return{onPointerUp:t=>{s.current=!1;const e=r(t);void 0!==e&&a?.({value:e}),u.current=!0},onBlur:()=>{s.current=!1,a?.({value:t}),u.current=!1},onPointerMove:t=>{if(s.current){const e=r(t);void 0!==e&&e!=i.current&&n.handleInput(e,i,c)}u.current=!0},onPointerDown:t=>{s.current=!0,o.current?.setPointerCapture(t.pointerId);const e=r(t);void 0!==e&&e!=i.current&&n.handleInput(e,i,c),u.current=!0},onPointerLeave:()=>{u.current=!1},onPointerEnter:()=>{u.current=!0}}}}));
2
- //# sourceMappingURL=useMeterDatatip-126b6bc1.js.map
@@ -1,2 +0,0 @@
1
- define(['exports', 'preact/hooks', './usePress-949a0d03', './mergeProps-bcfa6a92', './classNames-08d99695', './useInteractionStyle-15a2bdd0', './useComponentTheme-db55de25', 'preact', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './UNSAFE_NavigationListCommon/themes/redwood/NavigationListItemTheme', './useUser-08901aba'], (function(e,s,t,n,o,i,a,r,l,c,d,u){"use strict";const m=r.createContext(null);function g(){return s.useContext(m)}const v=l.mergeInterpolations([...Object.values(c.flexitemInterpolations)]),{class:p,...y}=v({alignSelf:"center"});e.NavigationListContext=m,e.useNavigationListContext=g,e.useNavigationListItem=function({itemKey:e}){const{onSelectionChange:r,selection:l,currentKey:c,showFocusRing:m,navigationListItemPrefix:v,edge:C,display:I}=g(),S=c===e,N=l===e,b="icons"===I,f="end"===C,{interactionProps:H,applyPseudoHoverStyle:h,applyHoverStyle:P,applyActiveStyle:R}=i.useInteractionStyle(),{direction:x}=u.useUser(),L="rtl"===x,{classes:k,styles:{labelContainerClasses:E,navigationItemStackedBadge:O,navigationItemStackedBadgeRtl:F,startIconStacked:w}}=a.useComponentTheme(d.NavigationListItemRedwoodTheme,{focusRing:m?"isFocusRing":"notFocusRing",current:S?"isCurrent":"notCurrtent",selected:N?"isSelected":"notSelected",direction:L?"isRtl":"notRtl",hybridHover:P?"isHybridHover":"notHybridHover",pseudoHover:h?"isPseudoHover":"notPseudoHover",active:R?"isActive":"notActive",edgeEnd:"end"===C?"isEnd":"notEnd",iconOnly:b?"isIconOnly":"notIconOnly"}),A=o.classNames([w]),T=o.classNames([O,"rtl"===x&&F]),B=s.useCallback((()=>{r?.({value:e,reason:"pointer"})}),[e,r]),{pressProps:U}=t.usePress(B);return{itemId:v+e,itemHandlers:n.mergeProps(H,U),itemClasses:o.classNames([k]),isSelected:N,labelContainerClasses:o.classNames([E,p]),labelContainerStyle:y,isIconOnly:b,isEdgeEnd:f,stackedBadgeClasses:o.classNames([T]),iconOnlyClasses:o.classNames([A]),isCurrent:S,showFocusRing:m}}}));
2
- //# sourceMappingURL=useNavigationListItem-29bd087a.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useNavigationListItem-29bd087a.js","sources":["../../src/UNSAFE_NavigationListCommon/NavigationListContext.ts","../../src/UNSAFE_NavigationListCommon/useNavigationListContext.ts","../../src/UNSAFE_NavigationListCommon/useNavigationListItem.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { createContext } from 'preact';\nimport { NavigationListProps } from './NavigationListProps';\n\ntype CurrentKeyDetail<K> = {\n value: K;\n};\n\nexport type NavigationListContextProps<K extends string | number> = Pick<\n NavigationListProps<K>,\n 'selection' | 'onSelectionChange' | 'onRemove' | 'edge' | 'display'\n> & {\n currentKey?: K;\n showFocusRing: boolean;\n onCurrentKeyChange:\n | (<K extends string | number>(detail: CurrentKeyDetail<K>) => void)\n | undefined;\n navigationListItemPrefix: string;\n};\n\n/**\n * Context used to pass navlist information without having to pass it to navlist children props.\n * We want to communicate information down to any interested navlist item children.\n */\n\nconst NavigationListContext = createContext<NavigationListContextProps<string | number>>(null!);\n\nexport { NavigationListContext };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useContext } from 'preact/hooks';\nimport { NavigationListContext } from './NavigationListContext';\n\n/**\n * Utility hook for consuming the NavigationListContext\n *\n * @returns The value of NavigationListContext provider\n */\nfunction useNavigationListContext() {\n return useContext(NavigationListContext);\n}\n\nexport { useNavigationListContext };\n","import { useCallback } from 'preact/hooks';\n\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { useInteractionStyle } from '../hooks/UNSAFE_useInteractionStyle';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { useNavigationListContext } from './useNavigationListContext';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport {\n NavigationListItemStyles,\n NavigationListItemVariantOptions\n} from '../UNSAFE_NavigationList/themes/NavigationListItemStyles.css';\nimport { NavigationListItemRedwoodTheme } from './themes/redwood/NavigationListItemTheme';\nimport { useUser } from '../hooks/UNSAFE_useUser';\n\nconst flexItemStyleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n]);\nconst { class: labelContainerFlexItemClasses, ...labelContainerFlexItemStyle } =\n flexItemStyleInterpolations({\n alignSelf: 'center'\n });\n\nexport function useNavigationListItem<K extends string | number>({ itemKey }: { itemKey: K }) {\n const {\n onSelectionChange,\n selection,\n currentKey,\n showFocusRing,\n navigationListItemPrefix,\n edge,\n display\n } = useNavigationListContext();\n\n //Selection and focus state\n const isCurrent = currentKey === itemKey;\n\n const isSelected = selection === itemKey;\n\n const isIconOnly = display === 'icons' ? true : false;\n const isEdgeEnd = edge === 'end' ? true : false;\n\n //Styling\n const { interactionProps, applyPseudoHoverStyle, applyHoverStyle, applyActiveStyle } =\n useInteractionStyle();\n\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n\n const {\n classes: listItemClasses,\n styles: {\n labelContainerClasses,\n navigationItemStackedBadge,\n navigationItemStackedBadgeRtl,\n startIconStacked\n }\n } = useComponentTheme<NavigationListItemVariantOptions, NavigationListItemStyles>(\n NavigationListItemRedwoodTheme,\n {\n focusRing: showFocusRing ? 'isFocusRing' : 'notFocusRing',\n current: isCurrent ? 'isCurrent' : 'notCurrtent',\n selected: isSelected ? 'isSelected' : 'notSelected',\n direction: isRtl ? 'isRtl' : 'notRtl',\n hybridHover: applyHoverStyle ? 'isHybridHover' : 'notHybridHover',\n pseudoHover: applyPseudoHoverStyle ? 'isPseudoHover' : 'notPseudoHover',\n active: applyActiveStyle ? 'isActive' : 'notActive',\n edgeEnd: edge === 'end' ? 'isEnd' : 'notEnd',\n iconOnly: isIconOnly ? 'isIconOnly' : 'notIconOnly'\n }\n );\n\n const navigationItemIconOnlyClasses = classNames([startIconStacked]);\n\n const navigationItemStackedBadgeClasses = classNames([\n navigationItemStackedBadge,\n direction === 'rtl' && navigationItemStackedBadgeRtl\n ]);\n\n //Item handlers\n const handlePress = useCallback(() => {\n onSelectionChange?.({ value: itemKey as K, reason: 'pointer' });\n }, [itemKey, onSelectionChange]);\n\n //Legacy navlist makes selection on keyDown, but since preact tabbar made selection after keyUp, will do the same\n //for preact navlist\n const { pressProps } = usePress(handlePress);\n\n return {\n itemId: navigationListItemPrefix + itemKey,\n itemHandlers: mergeProps(interactionProps, pressProps /*,onFocusProps*/),\n itemClasses: classNames([listItemClasses]),\n isSelected,\n labelContainerClasses: classNames([labelContainerClasses, labelContainerFlexItemClasses]),\n labelContainerStyle: labelContainerFlexItemStyle,\n isIconOnly,\n isEdgeEnd,\n stackedBadgeClasses: classNames([navigationItemStackedBadgeClasses]),\n iconOnlyClasses: classNames([navigationItemIconOnlyClasses]),\n isCurrent,\n showFocusRing\n };\n}\n"],"names":["NavigationListContext","createContext","useNavigationListContext","useContext","flexItemStyleInterpolations","mergeInterpolations","Object","values","flexitemInterpolations","class","labelContainerFlexItemClasses","labelContainerFlexItemStyle","alignSelf","itemKey","onSelectionChange","selection","currentKey","showFocusRing","navigationListItemPrefix","edge","display","isCurrent","isSelected","isIconOnly","isEdgeEnd","interactionProps","applyPseudoHoverStyle","applyHoverStyle","applyActiveStyle","useInteractionStyle","direction","useUser","isRtl","classes","listItemClasses","styles","labelContainerClasses","navigationItemStackedBadge","navigationItemStackedBadgeRtl","startIconStacked","useComponentTheme","NavigationListItemRedwoodTheme","focusRing","current","selected","hybridHover","pseudoHover","active","edgeEnd","iconOnly","navigationItemIconOnlyClasses","classNames","navigationItemStackedBadgeClasses","handlePress","useCallback","value","reason","pressProps","usePress","itemId","itemHandlers","mergeProps","itemClasses","labelContainerStyle","stackedBadgeClasses","iconOnlyClasses"],"mappings":"oXAgCA,MAAMA,EAAwBC,EAAaA,cAA8C,MChBzF,SAASC,IACP,OAAOC,EAAAA,WAAWH,EACpB,CCAA,MAAMI,EAA8BC,EAAAA,oBAAmC,IAClEC,OAAOC,OAAOC,6BAEXC,MAAOC,KAAkCC,GAC/CP,EAA4B,CAC1BQ,UAAW,0FAGC,UAAiDC,QAAEA,IACjE,MAAMC,kBACJA,EAAiBC,UACjBA,EAASC,WACTA,EAAUC,cACVA,EAAaC,yBACbA,EAAwBC,KACxBA,EAAIC,QACJA,GACElB,IAGEmB,EAAYL,IAAeH,EAE3BS,EAAaP,IAAcF,EAE3BU,EAAyB,UAAZH,EACbI,EAAqB,QAATL,GAGZM,iBAAEA,EAAgBC,sBAAEA,EAAqBC,gBAAEA,EAAeC,iBAAEA,GAChEC,EAAAA,uBAEIC,UAAEA,GAAcC,EAAAA,UAChBC,EAAsB,QAAdF,GAGZG,QAASC,EACTC,QAAQC,sBACNA,EAAqBC,2BACrBA,EAA0BC,8BAC1BA,EAA6BC,iBAC7BA,IAEAC,EAAAA,kBACFC,EAAAA,+BACA,CACEC,UAAWzB,EAAgB,cAAgB,eAC3C0B,QAAStB,EAAY,YAAc,cACnCuB,SAAUtB,EAAa,aAAe,cACtCQ,UAAWE,EAAQ,QAAU,SAC7Ba,YAAalB,EAAkB,gBAAkB,iBACjDmB,YAAapB,EAAwB,gBAAkB,iBACvDqB,OAAQnB,EAAmB,WAAa,YACxCoB,QAAkB,QAAT7B,EAAiB,QAAU,SACpC8B,SAAU1B,EAAa,aAAe,gBAIpC2B,EAAgCC,EAAAA,WAAW,CAACZ,IAE5Ca,EAAoCD,EAAAA,WAAW,CACnDd,EACc,QAAdP,GAAuBQ,IAInBe,EAAcC,EAAAA,aAAY,KAC9BxC,IAAoB,CAAEyC,MAAO1C,EAAc2C,OAAQ,WAAY,GAC9D,CAAC3C,EAASC,KAIP2C,WAAEA,GAAeC,EAAQA,SAACL,GAEhC,MAAO,CACLM,OAAQzC,EAA2BL,EACnC+C,aAAcC,EAAAA,WAAWpC,EAAkBgC,GAC3CK,YAAaX,EAAAA,WAAW,CAACjB,IACzBZ,aACAc,sBAAuBe,EAAUA,WAAC,CAACf,EAAuB1B,IAC1DqD,oBAAqBpD,EACrBY,aACAC,YACAwC,oBAAqBb,EAAAA,WAAW,CAACC,IACjCa,gBAAiBd,EAAAA,WAAW,CAACD,IAC7B7B,YACAJ,gBAEJ"}
@@ -1,2 +0,0 @@
1
- define(['exports', './useAnimationStatus-0cae3dff', './useUser-08901aba', 'preact/hooks', './popupAnimationUtils-49b93365'], (function(n,t,e,i,a){"use strict";const o={opening:n=>({from:{scaleX:0,scaleY:0,opacity:0,transformOrigin:a.getTransformOrigin(n.placement,n.direction)},to:{scaleX:1,scaleY:1,opacity:1,transformOrigin:a.getTransformOrigin(n.placement,n.direction)},options:{duration:200}}),closing:n=>({from:{scaleX:1,scaleY:1,opacity:1,transformOrigin:a.getTransformOrigin(n.placement,n.direction)},to:{scaleX:0,scaleY:0,opacity:0,transformOrigin:a.getTransformOrigin(n.placement,n.direction)},options:{duration:200}})};n.usePopupAnimation=function(n){const{isOpen:a,isAnimatedOnMount:r,onTransitionEnd:s,placement:c,animationStates:m,onPosition:u}=n,[l,p]=i.useState(c),{direction:f}=e.useUser(),{setAnimationElementRef:d,animationElementRef:g,status:O}=t.useAnimationStatus({isOpen:a,isAnimatedOnMount:r,animationStates:m??o,onTransitionEnd:s}),A=g,E=i.useCallback((n=>{null!==A.current&&(A.current.placement=n.placement),l!==n.placement&&p(n.placement),u?.(n)}),[u,A,l]);return i.useEffect((()=>{null!=A&&null!=A.current&&"unmounted"!=O&&(A.current.placement!==l&&(A.current.placement=l),A.current.direction=f)}),[A,l,f,O]),{setAnimationElementRef:d,status:O,onPosition:E}}}));
2
- //# sourceMappingURL=usePopupAnimation-dc282b02.js.map
@@ -1,2 +0,0 @@
1
- define(['exports', './stringUtils-4ffd9d59', './useUser-08901aba'], (function(e,i,s){"use strict";e.usePrefixSuffix=({baseId:e,hasEndContent:t,hasInsideLabel:d,hasStartContent:a,hasValue:n,isDisabled:r,isFocused:f,labelId:o,prefix:u,suffix:l,value:x})=>{const{direction:$}=s.useUser(),v=`${e}-prefix`,b=`${e}-suffix`,h=void 0!==u&&""!==u,c=void 0!==l&&""!==l,p=h&&!r&&(n||f),I=c&&!r&&(n||f),P=h||c?function(e,i,s,t,d){if(!i)return d;const a="ltr"===e,n=void 0===s?"":a?`${s} `:` ${s}`,r=void 0===t?"":a?` ${t}`:`${t} `,f=`${n}${d}${r}`,o=`${r}${d}${n}`;return a?f:o}($,n,u,l,x):x;return{shouldRenderPrefix:p,shouldRenderSuffix:I,prefixProps:{id:v,hasEndContent:t,hasInsideLabel:d,hasStartContent:a,isDisabled:r,isFocused:f,text:u??"",variant:"prefix"},suffixProps:{id:b,hasInsideLabel:d,isDisabled:r,isFocused:f,text:l??"",variant:"suffix"},valuePrefixSuffix:P,ariaLabelledBy:h||c?i.l([o,h?v:void 0,c?b:void 0]):void 0}}}));
2
- //# sourceMappingURL=usePrefixSuffix-dd2cae55.js.map
@@ -1,2 +0,0 @@
1
- define(['exports', 'preact/hooks', './useUser-08901aba', './clientHints-6d361eaa'], (function(e,r,t,n){"use strict";e.useRadioFocusManager=(e,c)=>{const u=r.useRef([]),s=r.useRef(0),o="rtl"===t.useUser().direction,a="safari"===n.getClientHints().browser,l=r.useCallback((()=>{const e=u.current;if(!e.length)return;const r=s.current,t=a?Math.min(r+1,e.length-1):(r+1)%e.length;s.current=t,e[t]?.focus()}),[a]),f=r.useCallback((()=>{const e=u.current;if(!e.length)return;const r=s.current,t=a?Math.max(r-1,0):(r-1+e.length)%e.length;s.current=t,e[t]?.focus()}),[a]),i=r.useCallback((e=>{s.current=e}),[]),h=r.useCallback((()=>{const e=u.current;e.length&&e[s.current].focus()}),[]),g=r.useCallback((e=>{const{key:r}=e,t={ArrowDown:l,ArrowUp:f,ArrowRight:o&&!a?f:l,ArrowLeft:o&&!a?l:f}[r];t&&(e.preventDefault(),t())}),[l,f,o,a]),d=r.useCallback((()=>{if(!e.current)return;const r=e.current.querySelectorAll("[data-checked]");u.current=Array.from(r),s.current>=u.current.length&&i(u.current.length-1)}),[e,i]);return r.useEffect((()=>{const r=e?.current;r&&d()}),[d,c,e]),{focusNext:l,focusPrevious:f,resetFocus:h,setFocusIndex:i,focusIndex:s.current,handleArrowKeyPress:g}}}));
2
- //# sourceMappingURL=useRadioFocusManager-462e28eb.js.map
@@ -1,2 +0,0 @@
1
- define(['exports', 'preact/hooks', './mergeProps-bcfa6a92', './collectionUtils-89bc31e1', './useCollectionFocusRing-39368fdd', './useCurrentKey-5749e7fb', './useId-c9578d26', './useReorderableContext-a5453bd7', './useContextMenuGesture-750ef2c6', './TabBarContextMenu-6f38f6ab', './useUser-08901aba', './useTranslationBundle-e4dd341e'], (function(e,t,n,r,o,s,u,a,l,i,c,d){"use strict";const f='[role="tab"]',b="data-oj-removable",m={mouse:{initialFocus:"menu",placement:"bottom-start",offsetValue:0},keyboard:{initialFocus:"firstItem",placement:"bottom-start",offsetValue:0},touch:{initialFocus:"menu",placement:"end",offsetValue:40}},y={isOpen:!1,initialFocus:"menu",placement:"bottom-start",offsetValue:0,anchorRef:{current:null}};const g=(e,t,n)=>{const o=e.closest(t);if(o){if(o.hasAttribute(b)){const t=e.closest(n);if(t&&o?.contains(t))return null}return r.getKey(o)}return null},v=(e,t,n)=>{const r=n.indexOf(e);if(-1===r)return t[0];let o=0,s=!1;for(r===n.length-1?(o=r-1,s=!0):o=r+1;o!==r&&o>-1&&o<n.length;){const e=n[o];if(-1!==t.indexOf(e))return e;s?o--:o++}return t[0]},K=(e,t,n)=>{const o=r.findElementByKey(t,e,f);if(o){return o.hasAttribute(n)?o.getAttribute(n):null}},p=(e,t)=>{const n=r.findElementByKey(t,e,f);if(n)return n.innerText};e.REMOVABLE_ITEM_ATTRIBUTE=b,e.getItemAttribute=K,e.useTabBar=function(e){const{children:R,class:x,display:h,edge:E="top",selection:M,onSelect:A,onRemove:C,ref:I,size:k,contextMenuConfig:B}=e,{direction:P}=c.useUser(),T=d.useTranslationBundle("@oracle/oraclejet-preact"),F=t.useRef(null),S=I||F,_=u.useId(),[D,U]=t.useState(M),[V,L]=t.useState(!1),O=_+"_",w="contextMenu_"+u.useId(),j=T.tabbar_labelContextMenu(),H=t.useRef();t.useEffect((()=>{if(S.current){const e=r.getItemKeysArray(S.current,f);null==D&&e&&(null!=M&&e.includes(M)?U(M):e.length>0&&U(e[0])),null!=D&&e&&!e.includes(D)&&(H.current?U(v(D,e,H.current)):U(e[0])),H.current=e}}),[R,D,S,M]);const[z,G]=o.useCollectionFocusRing(S,["ArrowRight","ArrowLeft","Home","End"]),N=a.useReorderableContext(),{currentKeyProps:q}=s.useCurrentKey((e=>C?g(e,f,'[data-oj-tabbar-item-remove-icon="true"]'):r.keyExtractor(e,f)),!1,!1,void 0,void 0,r.getPrevNextKeyUsingRef(S,D,!0,f),r.getPrevNextKeyUsingRef(S,D,!1,f),D,(e=>{const t=e.value;U(t),L(!1)}));t.useEffect((()=>{N&&(N.currentItemKey.current=D)}),[D,N]);const[J,Q]=t.useState(),[W,X]=t.useState(y),[Y,Z]=t.useState(),{triggerProps:$}=l.useContextMenuGesture((({gesture:e,anchor:t,target:n})=>{let o,s=t,u=D;if("keyboard"===e){const e=r.findElementByKey(S.current,D,f);s=e||t}else{const e=r.keyExtractor(n,f);u=null!=e?e:D}let a=!1;const l=null!=N?.onReorder;S.current&&(o=l?r.getItemKeysArray(S.current,f):void 0,a=null!=K(u,S.current,b));const c=null!=C&&a,d=i.getDefaultContextMenu({isRemovable:c,handleRemove:C,handleReorder:l?N.onReorder:void 0,itemKey:u,tabKeys:o,direction:P,itemLabels:{labelRemove:c?T.tabbar_labelRemove():void 0,labelMoveLeft:l?T.tabbar_labelMoveLeft():void 0,labelMoveRight:l?T.tabbar_labelMoveRight():void 0},handleAccStatus:e=>{const t=p(e.removedKey,S.current),n=c&&e.removedKey?T.tabbar_accAnnounceRemovedKey({itemKey:t}):"",r=p(e.destinationKey,S.current),o=l&&e.destinationKey?T.accAnnounceMovedKey({itemKey:"",position:e.position,referenceKey:r}):"";Z(n+o)}});Q(d),X({...m[e],anchorRef:{current:s},isOpen:null!=B})}),{isDisabled:!B}),ee=t.useCallback((e=>{"dismissed"!==e.reason&&"itemAction"!==e.reason||(U(J?.itemKey),S.current?.focus()),X({...y})}),[S,J?.itemKey]),te=n.mergeProps({onKeyDown:e=>{if(S.current&&null!=D){if("Home"===e.key||"End"===e.key){const t=r.getItemKeysArray(S.current,f);e.preventDefault(),U?.(t["Home"===e.key?0:t.length-1])}if("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),A?.({value:D})),"Delete"===e.key){r.findElementByKey(S.current,D,f).hasAttribute(b)&&C?.({value:D})}"Escape"===e.key&&L(!0)}},onFocus:()=>{if(S.current&&void 0===D){const e=r.getFirstVisibleKey(S.current,f);null!=e&&U(e)}}},$);return{rootProps:n.mergeProps({"aria-activedescendant":D?O+D:"","aria-multiselectable":!1,class:x,ref:S,role:"tablist",tabIndex:0},q,G,te),tabBarContext:{currentKey:D,display:h,isEdgeBottom:"bottom"===E,layout:"condense",onRemove:C,onSelect:A,showFocusRing:z,hideTooltip:V,selection:M,size:k,tabItemPrefix:O},menuProps:{...W,onClose:ee},contextMenuContext:J,contextMenuDescriptionId:w,contextMenuDescription:j,accStatusInfo:Y}}}));
2
- //# sourceMappingURL=useTabBar-0161bf67.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTabBar-0161bf67.js","sources":["../../src/hooks/PRIVATE_useTabBar/useTabBar.ts"],"sourcesContent":["import { useState, useRef, useEffect, useCallback } from 'preact/hooks';\nimport { mergeProps } from '../../utils/UNSAFE_mergeProps';\nimport {\n getPrevNextKeyUsingRef,\n getFirstVisibleKey,\n getKey,\n keyExtractor,\n findElementByKey,\n getItemKeysArray\n} from '../../utils/PRIVATE_collectionUtils';\nimport { useCollectionFocusRing } from '../PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../PRIVATE_useCurrentKey';\nimport { useId } from '../UNSAFE_useId';\nimport type { ComponentProps, ContextType, RefObject } from 'preact';\nimport type { TabBarContext, TabBarLayout } from '../../UNSAFE_TabBarCommon';\nimport { useReorderableContext } from '../../hooks/PRIVATE_useReorderable/useReorderableContext';\nimport { Menu } from '../../UNSAFE_Menu';\nimport { TabBarContextMenuConfig } from '../../UNSAFE_TabBarCommon';\nimport { useContextMenuGesture } from '../../hooks/UNSAFE_useContextMenuGesture';\nimport { getDefaultContextMenu } from '../../UNSAFE_TabBar/TabBarContextMenu';\nimport { TabBarItemContextMenuContext } from '../../UNSAFE_TabBarCommon/TabBar.types';\nimport { useUser } from '../../hooks/UNSAFE_useUser';\nimport { useTranslationBundle } from '../../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../../resources/nls/bundle';\n\ntype TabBarContextValue = ContextType<typeof TabBarContext>;\n\nexport type useTabBarOptions<K extends string | number> = {\n class?: string;\n display?: TabBarContextValue['display'];\n edge?: 'bottom' | 'top';\n onRemove?: TabBarContextValue['onRemove'];\n onSelect?: TabBarContextValue['onSelect'];\n ref?: RefObject<HTMLDivElement>;\n selection?: TabBarContextValue['selection'];\n size?: TabBarContextValue['size'];\n children?: ComponentProps<typeof TabBarLayout>['children'];\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n};\n\nconst ITEM_SELECTOR = '[role=\"tab\"]';\nconst REMOVABLE_ICON_SELECTOR = '[data-oj-tabbar-item-remove-icon=\"true\"]';\nexport const REMOVABLE_ITEM_ATTRIBUTE = 'data-oj-removable';\n\ntype MenuProps = Pick<\n ComponentProps<typeof Menu>,\n 'anchorRef' | 'initialFocus' | 'placement' | 'offsetValue' | 'isOpen'\n>;\n\nconst TOUCH_OFFSET_VALUE = 40;\n\nconst menuPropGestureStates: Record<\n 'mouse' | 'keyboard' | 'touch',\n Omit<Required<MenuProps>, 'anchorRef' | 'isOpen'>\n> = {\n mouse: {\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0\n },\n keyboard: {\n initialFocus: 'firstItem',\n placement: 'bottom-start',\n offsetValue: 0\n },\n touch: {\n initialFocus: 'menu',\n placement: 'end',\n offsetValue: TOUCH_OFFSET_VALUE\n }\n};\n\nconst initialMenuProps: MenuProps = {\n isOpen: false,\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0,\n anchorRef: { current: null }\n};\n\n/**\n * Implements TabBar behavior for focus and keyboad handling\n */\nexport function useTabBar<K extends string | number>(options: useTabBarOptions<K>) {\n const {\n children,\n class: className,\n display,\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n ref: userRef,\n size,\n contextMenuConfig\n } = options;\n\n const { direction } = useUser();\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const internalRef = useRef<HTMLDivElement>(null);\n const rootRef = userRef || internalRef;\n\n const tabId = useId();\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection as K);\n const [hideTooltip, setHideTooltip] = useState(false);\n\n const tabItemPrefix = tabId + '_';\n\n const contextMenuDescriptionId = 'contextMenu_' + useId();\n const contextMenuDescription = translations.tabbar_labelContextMenu();\n\n /**\n * A reference to the previous set of tab keys that this TabBar\n * contains before children were re-rendered. In the event the \"current\" tab\n * is removed and the \"currentKey\" reference is broken, we can redirect\n * the \"currentKey\" to another tab based on the index of the removed tab.\n */\n const prevTabKeys = useRef<(string | number | undefined)[]>();\n\n useEffect(() => {\n if (rootRef.current) {\n const tabKeys = getItemKeysArray(rootRef.current, ITEM_SELECTOR);\n if (currentKey == null && tabKeys) {\n if (selection != null && tabKeys.includes(selection as K)) {\n setCurrentKey(selection as K);\n } else if (tabKeys.length > 0) {\n setCurrentKey(tabKeys[0] as K);\n }\n }\n if (currentKey != null && tabKeys && !tabKeys.includes(currentKey as K)) {\n //If prevTabs does not exist set the first visible key as currentKey\n prevTabKeys.current\n ? setCurrentKey(findNextValidKey(currentKey, tabKeys, prevTabKeys.current) as K)\n : setCurrentKey(tabKeys[0] as K);\n }\n prevTabKeys.current = tabKeys as K[];\n }\n }, [children, currentKey, rootRef, selection]);\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(rootRef, [\n 'ArrowRight',\n 'ArrowLeft',\n 'Home',\n 'End'\n ]);\n\n const reorderableContext = useReorderableContext();\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? extractOnlyItemKey(element, ITEM_SELECTOR, REMOVABLE_ICON_SELECTOR)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n false,\n undefined,\n undefined,\n getPrevNextKeyUsingRef(rootRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(rootRef, currentKey, false, ITEM_SELECTOR),\n currentKey,\n (detail) => {\n const key = detail.value as K;\n setCurrentKey(key);\n setHideTooltip(false);\n }\n );\n\n useEffect(() => {\n if (reorderableContext) {\n reorderableContext.currentItemKey.current = currentKey;\n }\n }, [currentKey, reorderableContext]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (rootRef.current && currentKey != null) {\n if (event.key === 'Home' || event.key === 'End') {\n const tabBarItemKey = getItemKeysArray(rootRef.current, ITEM_SELECTOR);\n event.preventDefault();\n setCurrentKey?.(tabBarItemKey[event.key === 'Home' ? 0 : tabBarItemKey.length - 1] as K);\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.({ value: currentKey });\n }\n if (event.key === 'Delete') {\n const tabBarItem = findElementByKey(\n rootRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as HTMLElement;\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n onRemove?.({ value: currentKey });\n }\n }\n if (event.key === 'Escape') {\n setHideTooltip(true);\n }\n }\n };\n\n const onFocus = () => {\n if (rootRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(rootRef.current, ITEM_SELECTOR);\n if (key != null) {\n setCurrentKey(key as K);\n }\n }\n };\n\n const [contextMenuContext, setContextMenuContext] = useState<TabBarItemContextMenuContext<K>>();\n\n const [menuProps, setMenuProps] = useState<MenuProps>(initialMenuProps);\n const [accStatusInfo, setAccStatusInfo] = useState<string>();\n\n const { triggerProps } = useContextMenuGesture(\n ({ gesture, anchor, target }) => {\n let anchorBasedOnGesture = anchor;\n let itemKey = currentKey as K;\n if (gesture === 'keyboard') {\n //We find the element where the position of the menu is going to be based of\n const elem = findElementByKey(\n rootRef.current as HTMLElement,\n currentKey as K,\n ITEM_SELECTOR\n );\n //We set the correct anchor\n anchorBasedOnGesture = elem ? elem : anchor;\n } else {\n //We search for the key using the target of the event\n const key = keyExtractor(target as HTMLElement, ITEM_SELECTOR);\n\n //On touch devices, the keyExtractor returns null because target of touch event is the entire tabbar. Hence we make use of currentkey since the context menu is always launched from selected item and its key is currentKey\n itemKey = key != null ? (key as K) : (currentKey as K);\n }\n let tabKeysArray;\n let isRemovableItem = false;\n const isReorderable = reorderableContext?.onReorder != null;\n if (rootRef.current) {\n tabKeysArray = isReorderable\n ? (getItemKeysArray(rootRef.current, ITEM_SELECTOR) as K[])\n : undefined;\n isRemovableItem =\n getItemAttribute(itemKey, rootRef.current, REMOVABLE_ITEM_ATTRIBUTE) != null;\n }\n const isRemovable = onRemove != null && isRemovableItem;\n const defaultContext = getDefaultContextMenu<K>({\n // For default menu items the existence of REMOVABLE_ICON_SELECTOR is the indicator that it is removable because we render the default menu in touch devices not the application.\n // Furthermore in corepack due to delegations onRemove is always defined as it is a even handler hence not a good check for isRemovable.\n isRemovable: isRemovable,\n handleRemove: onRemove,\n handleReorder: isReorderable ? reorderableContext.onReorder : undefined,\n itemKey: itemKey,\n tabKeys: tabKeysArray,\n direction: direction,\n itemLabels: {\n labelRemove: isRemovable ? translations.tabbar_labelRemove() : undefined,\n labelMoveLeft: isReorderable ? translations.tabbar_labelMoveLeft() : undefined,\n labelMoveRight: isReorderable ? translations.tabbar_labelMoveRight() : undefined\n },\n handleAccStatus: (detail) => {\n const removeItemLabel = getItemLabel(detail.removedKey!, rootRef.current!) as string;\n const removeStatus =\n isRemovable && detail.removedKey\n ? translations.tabbar_accAnnounceRemovedKey({ itemKey: removeItemLabel })\n : '';\n const destinationItemLabel = getItemLabel(\n detail.destinationKey!,\n rootRef.current!\n ) as string;\n const reorderStatus =\n isReorderable && detail.destinationKey\n ? translations.accAnnounceMovedKey({\n // This acc info is for reordering using context menu hence as per spec source item key is not required.\n itemKey: '',\n position: detail.position!,\n referenceKey: destinationItemLabel\n })\n : '';\n setAccStatusInfo(removeStatus + reorderStatus);\n }\n });\n setContextMenuContext(defaultContext);\n\n setMenuProps({\n ...menuPropGestureStates[gesture],\n anchorRef: { current: anchorBasedOnGesture },\n // This is set so that when no contextMenuConfig is available we need not open it. Example: Apps may choose to open only for removable items and return contextMenuConfig as undefined for non removable ones in such cases it will prevent it from opening.\n isOpen: contextMenuConfig != null\n });\n },\n {\n isDisabled: !contextMenuConfig //If there is no a context menu renderer we disable the hook\n }\n );\n\n const handleCloseContextMenu = useCallback<Required<ComponentProps<typeof Menu>>['onClose']>(\n (detail) => {\n //Focus has to be set on the current target that was obtained\n //during context menu gesture when menu is dismissed or item is \"selected\"\n if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {\n setCurrentKey(contextMenuContext?.itemKey);\n rootRef.current?.focus();\n }\n // We close the menu.The only prop that matters here is isOpen\n setMenuProps({ ...initialMenuProps });\n },\n [rootRef, contextMenuContext?.itemKey]\n );\n\n const eventProps = mergeProps({ onKeyDown, onFocus }, triggerProps);\n\n return {\n rootProps: mergeProps(\n {\n 'aria-activedescendant': currentKey ? tabItemPrefix + currentKey : '',\n 'aria-multiselectable': false,\n class: className,\n ref: rootRef,\n role: 'tablist',\n tabIndex: 0\n },\n currentKeyProps,\n focusRingProps,\n eventProps\n ),\n tabBarContext: {\n currentKey,\n display,\n isEdgeBottom: edge === 'bottom',\n layout: 'condense',\n onRemove,\n onSelect,\n showFocusRing,\n hideTooltip,\n selection,\n size,\n tabItemPrefix\n },\n menuProps: { ...menuProps, onClose: handleCloseContextMenu },\n contextMenuContext,\n contextMenuDescriptionId,\n contextMenuDescription,\n accStatusInfo\n } as const;\n}\n\n//useCurrentKey use click capture that captures first click, which is on remove button\n//when we remove and sets the item being removed to currentKey. So we should not allow\n//this if click is on remove button\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const tabBarItem = element.closest(itemSelector);\n if (tabBarItem) {\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n const removeButton = element.closest(itemEliminator);\n if (removeButton && tabBarItem?.contains(removeButton)) {\n return null;\n }\n }\n return getKey(tabBarItem as HTMLElement);\n }\n return null;\n};\n\nconst findNextValidKey = <K>(currentKey: K, currTabs: K[], prevTabs: K[]) => {\n const index = prevTabs.indexOf(currentKey);\n // update current key to be the first one if currentKey is invalid\n if (index === -1) {\n return currTabs[0];\n }\n let nextIndex = 0;\n let isLastKey = false;\n if (index === prevTabs.length - 1) {\n nextIndex = index - 1;\n isLastKey = true;\n } else {\n nextIndex = index + 1;\n }\n while (nextIndex !== index && nextIndex > -1 && nextIndex < prevTabs.length) {\n const nextKey = prevTabs[nextIndex];\n if (currTabs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n isLastKey ? nextIndex-- : nextIndex++;\n }\n // update current key to be the first one if we can't find a suitable next key\n return currTabs[0];\n};\n\n// Utility that returns the value for a attribute related to the role=\"tab\" item.\nexport const getItemAttribute = <K extends string | number>(\n itemKey: K,\n root: HTMLElement,\n attribute: string\n) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n const tabBarItemAttribute = tabBarItem.hasAttribute(attribute)\n ? tabBarItem.getAttribute(attribute)\n : null;\n return tabBarItemAttribute;\n }\n return;\n};\n\n// Utility that returns the visible inner text inside the role=\"tab\" item.\nconst getItemLabel = <K extends string | number>(itemKey: K, root: HTMLElement) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n return tabBarItem.innerText;\n }\n return;\n};\n"],"names":["ITEM_SELECTOR","REMOVABLE_ITEM_ATTRIBUTE","menuPropGestureStates","mouse","initialFocus","placement","offsetValue","keyboard","touch","initialMenuProps","isOpen","anchorRef","current","extractOnlyItemKey","element","itemSelector","itemEliminator","tabBarItem","closest","hasAttribute","removeButton","contains","getKey","findNextValidKey","currentKey","currTabs","prevTabs","index","indexOf","nextIndex","isLastKey","length","nextKey","getItemAttribute","itemKey","root","attribute","findElementByKey","getAttribute","getItemLabel","innerText","options","children","class","className","display","edge","selection","onSelect","onRemove","ref","userRef","size","contextMenuConfig","direction","useUser","translations","useTranslationBundle","internalRef","useRef","rootRef","tabId","useId","setCurrentKey","useState","hideTooltip","setHideTooltip","tabItemPrefix","contextMenuDescriptionId","contextMenuDescription","tabbar_labelContextMenu","prevTabKeys","useEffect","tabKeys","getItemKeysArray","includes","showFocusRing","focusRingProps","useCollectionFocusRing","reorderableContext","useReorderableContext","currentKeyProps","useCurrentKey","keyExtractor","undefined","getPrevNextKeyUsingRef","detail","key","value","currentItemKey","contextMenuContext","setContextMenuContext","menuProps","setMenuProps","accStatusInfo","setAccStatusInfo","triggerProps","useContextMenuGesture","gesture","anchor","target","tabKeysArray","anchorBasedOnGesture","elem","isRemovableItem","isReorderable","onReorder","isRemovable","defaultContext","getDefaultContextMenu","handleRemove","handleReorder","itemLabels","labelRemove","tabbar_labelRemove","labelMoveLeft","tabbar_labelMoveLeft","labelMoveRight","tabbar_labelMoveRight","handleAccStatus","removeItemLabel","removedKey","removeStatus","tabbar_accAnnounceRemovedKey","destinationItemLabel","destinationKey","reorderStatus","accAnnounceMovedKey","position","referenceKey","isDisabled","handleCloseContextMenu","useCallback","reason","focus","eventProps","mergeProps","onKeyDown","event","tabBarItemKey","preventDefault","onFocus","getFirstVisibleKey","rootProps","role","tabIndex","tabBarContext","isEdgeBottom","layout","onClose"],"mappings":"qXAwCA,MAAMA,EAAgB,eAETC,EAA2B,oBASlCC,EAGF,CACFC,MAAO,CACLC,aAAc,OACdC,UAAW,eACXC,YAAa,GAEfC,SAAU,CACRH,aAAc,YACdC,UAAW,eACXC,YAAa,GAEfE,MAAO,CACLJ,aAAc,OACdC,UAAW,MACXC,YAnBuB,KAuBrBG,EAA8B,CAClCC,QAAQ,EACRN,aAAc,OACdC,UAAW,eACXC,YAAa,EACbK,UAAW,CAAEC,QAAS,OAgRxB,MAAMC,EAAqB,CAACC,EAAsBC,EAAsBC,KACtE,MAAMC,EAAaH,EAAQI,QAAQH,GACnC,GAAIE,EAAY,CACd,GAAIA,EAAWE,aAAalB,GAA2B,CACrD,MAAMmB,EAAeN,E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,2BACAC,yBACAyB,gBAEJ"}
@@ -1,2 +0,0 @@
1
- define(['exports', 'preact/hooks', './useColorScheme-097c31ff', './useScale-04a448c3', './theme-a8f3d819', './mergeInterpolations-9ede4cf7', './LayerHost-0b288129', './Theme-d945adae', './useDensity-8a10fc70', './unsafeDomAccess-602c5dde'], (function(e,t,n,o,s,c,a,r,l,u){"use strict";function i(e){const t=e?.current;return t?t instanceof Element?t:t[u.UNSAFE_DOM_ACCESS]:null}e.toUnsafeDomElement=i,e.useThemeInterpolations=function(e){const[u,f]=t.useState(void 0),m=n.useColorScheme(),S=l.useDensity(),d=o.useScale(),h=S!==a.DefaultEnvironment.density?S:void 0,D=d!==a.DefaultEnvironment.scale?d:void 0;t.useLayoutEffect((()=>{const t=i(e),n=t?.closest(`.${r.INVERT_CLASS}:not(.${r.DARK_CLASS})`);f(m!==a.DefaultEnvironment.colorScheme?m:n?"dark":"light")}),[e,m]);const E=c.mergeInterpolations([...Object.values(s.themeInterpolations)]),{class:v}=E({colorScheme:u,scale:D,density:h});return v}}));
2
- //# sourceMappingURL=useThemeInterpolations-cc05b0f0.js.map
@@ -1,2 +0,0 @@
1
- define(['exports', 'preact/hooks', './useTooltipControlled-e7021312'], (function(t,o,e){"use strict";t.useTooltip=({text:t,position:s="bottom",isDisabled:i=!1,anchor:n={x:"element",y:"element"},offset:l,variant:p="tooltip",testId:a})=>{const[r,u]=o.useState(!1),c=i||!t,d=o.useCallback((t=>{u(t.value)}),[]),{tooltipContent:f,tooltipProps:C}=e.useTooltipControlled({text:t,isOpen:r,position:s,isDisabled:c,offset:l,anchor:n,variant:p,onToggle:d,testId:a});return{tooltipContent:f,tooltipProps:C}}}));
2
- //# sourceMappingURL=useTooltip-31ac71c4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabBar-9bc26ed2.js","sources":["../../src/UNSAFE_TabBar/TabBar.tsx"],"sourcesContent":["import type { ComponentChildren, Ref, RefObject } from 'preact';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { TabBarContext, TabBarLayout, TabBarContextMenuConfig } from '../UNSAFE_TabBarCommon';\nimport { styles } from './themes/TabBarStyles.css';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { useTabBar } from '../hooks/PRIVATE_useTabBar';\nimport { forwardRef } from 'preact/compat';\nimport { TabBarContextMenu } from './TabBarContextMenu';\nexport {\n TabBarItem,\n RemovableTabBarItem,\n OverflowTabBarItem,\n TabBarContext,\n useTabBarContext,\n TabBarLayout,\n useProgressiveTruncation,\n TabBarLinkItem\n} from '../UNSAFE_TabBarCommon';\n\n/**\n * type for payload of current key change event handler\n */\nexport type CurrentKeyDetail<K> = {\n value: K;\n};\n\n/**\n * type for payload of selection change event handler\n */\ntype SelectionDetail<K> = {\n value: K;\n};\n\n/**\n * type for payload of remove event handler\n */\ntype RemoveDetail<K> = {\n value: K;\n};\n\ntype DisplayProps =\n | {\n /**\n * Controls the content layout of the TabBarItem: 'standard' lays out the contents horizontally,\n *'icons' hides the label,\n */\n display?: 'standard' | 'icons';\n /**\n * The size indicates how tall the TabBarItem is rendered.\n * Note: It is not possible to specify 'size' when 'display=\"stacked\".\n */\n size?: 'md' | 'lg';\n }\n | {\n /**\n *'stacked' stacks the icon on top of the label.\n * Note: It is not possible to specify 'size' when 'display=\"stacked\".\n */\n display?: 'stacked';\n size?: 'never';\n };\n\nexport type TabBarProps<K extends string | number> = DisplayProps & {\n /**\n * A set of TabBarItem(s) that TabBar will hold\n */\n children: ComponentChildren;\n /**\n * Whether to stretch the tab bar items to occupy available space or to condense items\n */\n layout?: 'stretch' | 'condense';\n /**\n * The position of the TabBar. Valid Values: top and bottom.\n * 'top' is used when TabBar is placed on top of content section and the selection\n * indicator would be placed below the TabBarItem.\n * 'bottom' is used when TabBar is placed on bottom of content section and the selection\n * indicator would be placed above the TabBarItem.\n */\n edge?: 'top' | 'bottom';\n /**\n * Key of the selected item.\n */\n selection?: K;\n /**\n * Callback function to handle when user selects a tab.\n * The callback is also invoked when a user selects a tab that is already selected.\n */\n onSelect?: <K extends string | number>(detail: SelectionDetail<K>) => void;\n /**\n * Callback function to handle remove\n */\n onRemove?: <K extends string | number>(detail: RemoveDetail<K>) => void;\n /**\n * Accepts the ID of an element that provides instructions for interaction with the TabBar.\n */\n 'aria-describedby'?: string;\n /**\n * An aria-label which defines a string value that labels this TabBar.\n * Either aria-label or aria-labelledby should be specified in order to make TabBar accessible.\n */\n 'aria-label'?: string;\n\n /**\n * An aria-labelledby which identifies the element(s) that labels this TabBar.\n * Either aria-label or aria-labelledby should be specified in order to make TabBar accessible.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Configuration used to specify a context menu.\n */\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n};\n/**\n * A tab bar allows navigation between different content sections.\n */\nexport const TabBar = forwardRef(\n <K extends string | number>(\n {\n children,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n contextMenuConfig\n }: TabBarProps<K> & TestIdProps,\n ref?: Ref<HTMLDivElement>\n ) => {\n const rootRef = ref as RefObject<HTMLDivElement>;\n\n const {\n rootProps,\n tabBarContext,\n menuProps,\n contextMenuContext,\n contextMenuDescription,\n contextMenuDescriptionId,\n accStatusInfo\n } = useTabBar({\n class: styles.tabBarBase,\n edge: edge,\n onRemove,\n onSelect,\n ref: rootRef,\n selection,\n size,\n children,\n contextMenuConfig\n });\n\n const isContextMenuAvailable = contextMenuConfig != null;\n\n return (\n <>\n <TabBarContext.Provider value={tabBarContext}>\n <div\n {...rootProps}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-haspopup={contextMenuConfig != null ? true : false}\n aria-describedby={\n isContextMenuAvailable && contextMenuDescriptionId\n ? ariaDescribedBy\n ? `${ariaDescribedBy} ${contextMenuDescriptionId}`\n : contextMenuDescriptionId\n : ariaDescribedBy\n }>\n <TabBarLayout layout={layout} display={display}>\n {children}\n </TabBarLayout>\n </div>\n </TabBarContext.Provider>\n {isContextMenuAvailable && contextMenuDescriptionId && (\n <span id={contextMenuDescriptionId}>\n <HiddenAccessible>{contextMenuDescription}</HiddenAccessible>\n </span>\n )}\n {isContextMenuAvailable && accStatusInfo && <LiveRegion>{accStatusInfo}</LiveRegion>}\n {isContextMenuAvailable && (\n <TabBarContextMenu\n {...menuProps}\n contextMenuConfig={contextMenuConfig}\n contextMenuContext={contextMenuContext!}\n />\n )}\n </>\n );\n }\n);\n"],"names":["forwardRef","useTabBar","styles","_jsxs","_Fragment","_jsx","TabBarContext","TabBarLayout","HiddenAccessible","LiveRegion","TabBarContextMenu"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA;;AAEG;MACU,MAAM,GAAGA,iBAAU,CAC9B,CACE,EACE,QAAQ,EACR,MAAM,GAAG,SAAS,EAClB,OAAO,GAAG,UAAU,EACpB,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAAE,eAAe,EACnC,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,iBAAiB,EACY,EAC/B,GAAyB,KACvB;IACF,MAAM,OAAO,GAAG,GAAgC,CAAC;AAEjD,IAAA,MAAM,EACJ,SAAS,EACT,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,aAAa,EACd,GAAGC,mBAAS,CAAC;QACZ,KAAK,EAAEC,4CAAM,CAAC,UAAU;AACxB,QAAA,IAAI,EAAE,IAAI;QACV,QAAQ;QACR,QAAQ;AACR,QAAA,GAAG,EAAE,OAAO;QACZ,SAAS;QACT,IAAI;QACJ,QAAQ;QACR,iBAAiB;AAClB,KAAA,CAAC,CAAC;AAEH,IAAA,MA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etectHorizontalOverflow.ts"],"sourcesContent":["import { RefObject } from 'preact';\nimport { useState, useLayoutEffect, useRef, StateUpdater, useCallback } from 'preact/hooks';\nimport { useResizeObserver } from '../../hooks/UNSAFE_useResizeObserver';\nimport { Size } from '../../utils/UNSAFE_size';\nimport { getTabWidths } from '../../utils/PRIVATE_tabBarUtils';\nimport type { TrailingContentInfo } from '../../utils/PRIVATE_tabBarUtils';\n\ntype TabDimensions<K extends string | number> = {\n key: K;\n maxWidth: number;\n nonTextWidth?: number;\n needsTruncation?: boolean;\n cumulativeWidth?: number;\n};\n\n//The minimum width of the overflowtabbaritem, it can be rendered with width greater than this based on available width\nconst MORE_ITEM_WIDTH = 48;\nconst LABEL_MIN_WIDTH = 96;\nconst TAB_BORDER = 6;\n//This is the minWidth a tab will have if it has only a label.\nconst TAB_MIN_WIDTH = LABEL_MIN_WIDTH + TAB_BORDER;\n\nexport type useDetectOverflowProps<K extends string | number> = {\n rootRef: RefObject<HTMLDivElement>;\n keysArray: (K | undefined)[];\n isTruncationDisabled?: boolean;\n};\n\n/**\n * Implements overflow detection and calculation\n */\nexport function useDetectHorizontalOverflow<K extends string | number>({\n rootRef,\n keysArray,\n isTruncationDisabled = true\n}: useDetectOverflowProps<K>) {\n const [visibleItemKeys, setVisibleItemKeys] = useState<(K | undefined)[]>();\n const [overflowItemKeys, setOverflowingItemKeys] = useState<(K | undefined)[]>();\n const trailingContentWidths = useRef(new Map<K, TrailingContentInfo>());\n const [tabMaxWidth, setTabMaxWidth] = useState<Map<K, Size>>();\n // This state var is to only re-trigger the layout effect. Using it locally will not give the latest updated value hence we use current suffix vars\n const [tabBarWidth, setTabBarWidth] = useState<number>(0);\n const isAllItemsTruncatedMax = useRef<boolean>(false);\n const isAllItemsTruncatedFinal = useRef<boolean>(false);\n const tabDimensions = useRef<TabDimensions<K>[]>();\n\n useLayoutEffect(() => {\n // Store locally to avoid calling rootRef everytime within layouteffect\n const tabBarWidthCurrent = rootRef?.current?.clientWidth;\n const tabBarScrollWidthCurrent = rootRef?.current?.scrollWidth;\n if (\n rootRef.current &&\n keysArray &&\n keysArray.length > 0 &&\n tabBarWidthCurrent &&\n tabBarWidthCurrent > 0\n ) {\n //Set tabBarWidth if not the current value\n if (tabBarWidth !== tabBarWidthCurrent) {\n setTabBarWidth(tabBarWidthCurrent);\n }\n\n if (tabMaxWidth === undefined) {\n const isOverflow = tabBarWidthCurrent > 0 && tabBarWidthCurrent < tabBarScrollWidthCurrent!;\n\n //If there is no overflow maxWidth should be its prevState, prevState may also be undefined if truncation is disabled.\n if (!isOverflow) {\n setTabMaxWidth((prevState) => {\n return prevState;\n });\n } else {\n //We need to calculate maxWidth only if truncation threshold limit is not reached\n if (!isAllItemsTruncatedMax.current) {\n const tabWidths = getTabWidths(\n rootRef.current,\n trailingContentWidths,\n isTruncationDisabled,\n tabBarWidthCurrent,\n isAllItemsTruncatedMax?.current,\n keysArray as K[]\n );\n //If all items have reached max treshold of truncation then we set it to true\n if (tabWidths.every((item) => item.hasReachedLimit)) {\n isAllItemsTruncatedMax.current = true;\n }\n tabDimensions.current = tabWidths as any;\n }\n //If all items have reached max treshold of truncation then we do not have update tabDimensions are maxWidth cannot go lesser than 96px.\n else {\n tabDimensions.current = tabDimensions.current?.map((item) => ({\n ...item\n }));\n }\n }\n\n //Set calculated maxWidths\n if (!isTruncationDisabled) {\n const tabMaxWidthMap = new Map(\n tabDimensions.current?.map((tab) => [tab.key, (tab.maxWidth + 'px') as Size])\n );\n setTabMaxWidth(tabMaxWidthMap);\n }\n //Overflow calculation\n if (tabBarWidthCurrent < tabBarScrollWidthCurrent!) {\n const arr = tabDimensions.current?.map((item) => item.cumulativeWidth) as number[];\n const lastIndex = arr.length - 1;\n //In addition to scrollWidth we check if the cumulative width of last item is greater than rootRef clientwidth\n if (arr && tabBarWidthCurrent < arr[lastIndex]) {\n const { closestEntry, closestIndex } = searchClosest(arr, tabBarWidthCurrent);\n // Check for not null, because even for '0' value of closestIndex we want to slice in such cases only overflow item will be rendered\n if (closestEntry && closestIndex != null) {\n // Closest index refers to the index of the last item that would be visible.\n // While splicing we need to include it however if we check for closestIndex < lastIndex alone then closestIndex + 1 will be greater than the last item index so we check for one less.\n const lastVisibleItemIndex =\n closestIndex < lastIndex - 1 ? closestIndex + 1 : closestIndex;\n setVisibleItemKeys(keysArray.slice(0, lastVisibleItemIndex));\n setOverflowingItemKeys(keysArray?.slice(lastVisibleItemIndex));\n //Once OverflowTabBarItem is rendered, i.e overflowItemKeys move into overflow menu then space is available, which can be re-dsitributed to truncated visible items. We also check if these visible items have already gone through this calculation otherwise we skip it to avoid infinite loop.\n if (closestIndex > 0 && !isAllItemsTruncatedFinal.current && !isTruncationDisabled) {\n const tabWidthsAfterOverflow = getTabWidths(\n rootRef.current,\n trailingContentWidths,\n isTruncationDisabled,\n tabBarWidthCurrent,\n isAllItemsTruncatedMax?.current\n );\n const tabMaxWidthMapAfterOverflow = new Map(\n tabWidthsAfterOverflow.map((tab) => [tab.key, (tab.maxWidth + 'px') as Size])\n );\n //Flag to indicate that final truncation calculation has occured\n isAllItemsTruncatedFinal.current = true;\n setTabMaxWidth(tabMaxWidthMapAfterOverflow);\n }\n }\n }\n }\n }\n }\n }, [keysArray, rootRef, tabBarWidth, tabMaxWidth, isTruncationDisabled]);\n\n const updateTabBarWidth = useCallback(\n (entry: { contentRect: { width: StateUpdater<number> } }) => {\n const rectWidth = Math.ceil(entry.contentRect.width as number);\n // Sometimes entry.contentRect.width maybe a decimal value so we need to get absolute value\n if (Math.abs(tabBarWidth - (entry.contentRect.width as number)) > 1) {\n setTabBarWidth(entry.contentRect.width);\n if (tabMaxWidth !== undefined && !isAllItemsTruncatedMax.current) {\n setTabMaxWidth(undefined);\n }\n //Once there is change in the container width and there is no overflow we render all items as visible.\n if (rectWidth >= rootRef.current?.scrollWidth!) {\n setVisibleItemKeys(keysArray);\n setOverflowingItemKeys([]);\n }\n isAllItemsTruncatedFinal.current = false;\n }\n },\n [tabBarWidth, tabMaxWidth, rootRef, keysArray]\n );\n\n useResizeObserver(rootRef, updateTabBarWidth);\n\n return shouldRenderAllTabs(visibleItemKeys, overflowItemKeys, keysArray)\n ? {\n visibleItemKeys: keysArray,\n overflowItemKeys,\n maxWidths: tabMaxWidth\n }\n : {\n visibleItemKeys,\n overflowItemKeys,\n maxWidths: tabMaxWidth\n };\n}\n\n//If the overflow + visible keys or their quantity are not the same as keysArray then we first render all the keys as visible\nconst shouldRenderAllTabs = <K extends string | number>(\n visibleItemKeys: (K | undefined)[] | undefined,\n overflowItemKeys: (K | undefined)[] | undefined,\n keysArray: (K | undefined)[]\n) => {\n if (visibleItemKeys == null) return true;\n else if (visibleItemKeys && overflowItemKeys && keysArray) {\n const combinedArray = [...visibleItemKeys, ...overflowItemKeys];\n const isNotEqual =\n combinedArray.length !== keysArray.length ||\n JSON.stringify(keysArray) !== JSON.stringify(combinedArray);\n return isNotEqual;\n } else return false;\n};\n\n//Searches for a value closest and smaller than search value from the cumulative array\nconst searchClosest = (\n arr: number[] | undefined,\n searchValue: number | undefined | null\n): { closestEntry: number | null; closestIndex: number | null } => {\n {\n if (arr != null && searchValue != null) {\n let left = 0;\n let right = arr.length - 1;\n let closestEntry: number | null = null;\n let closestIndex: number | null = null;\n while (left <= right && left < arr.length && right > -1) {\n const mid = Math.floor((left + right) / 2);\n const midEntry = arr[mid];\n if (midEntry === searchValue) {\n return { closestEntry: midEntry!, closestIndex: mid! };\n } else if (midEntry < searchValue) {\n closestEntry = midEntry;\n closestIndex = mid;\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n //If the searchValue is greater than closest entry and their difference is greater more item width then we have space to fit more item. Otherwise we return the index with the closest and small value when compared to searchvalue\n if (closestEntry && searchValue > closestEntry) {\n //NOTE: Do not update closestEntry to midEntry here because value from const midEntry = arr[mid], midEntry maybe greater than searchValue and below it may end up updating closestIndex to mid +1 due to abs check\n //Sometimes closest entry may be much smaller than searchvalue so in such cases we maybe able to accomodate more items. The difference between searchValue and closestEntry should be greater than the minWidth needed for any item so that it can be rendered. If the difference is lesser than item min width we then check if space is available to render overflowitem alone else we reduce the closestIndex.\n closestIndex =\n Math.abs(searchValue - closestEntry) > TAB_MIN_WIDTH && mid + 1 <= arr.length - 2\n ? mid + 1\n : Math.abs(searchValue - closestEntry) > MORE_ITEM_WIDTH\n ? mid\n : mid - 1 >= 0\n ? mid - 1\n : 0;\n }\n //If the searchValue is lesser than closestEntry we return a value lesser than mid, this happens when all the values in the array are lesser than searchValue, i.e screensize is extremely small\n else {\n closestIndex = mid - 1 >= 0 ? mid - 1 : 0;\n }\n }\n return { closestEntry: closestEntry!, closestIndex: closestIndex! };\n } else return { closestEntry: null, closestIndex: null };\n }\n};\n"],"names":["useState","useRef","useLayoutEffect","getTabWidths","useCallback","useResizeObserver"],"mappings":";;;;;;;AAeA;AACA,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,UAAU,GAAG,CAAC,CAAC;AACrB;AACA,MAAM,aAAa,GAAG,eAAe,GAAG,UAAU,CAAC;AAQnD;;AAEG;AACG,SAAU,2BAA2B,CAA4B,EACrE,OAAO,EACP,SAAS,EACT,oBAAoB,GAAG,IAAI,EACD,EAAA;IAC1B,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAGA,cAAQ,EAAqB,CAAC;IAC5E,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GAAGA,cAAQ,EAAqB,CAAC;IACjF,MAAM,qBAAqB,GAAGC,YAAM,CAAC,IAAI,GAAG,EAA0B,CAAC,CAAC;IACxE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAGD,cAAQ,EAAgB,CAAC;;IAE/D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAGA,cAAQ,CAAS,CAAC,CAAC,CAAC;AAC1D,IAAA,MAAM,sBAAsB,GAAGC,YAAM,CAAU,KAAK,CAAC,CAAC;AACtD,IAAA,MAAM,wBAAwB,GAAGA,Y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D;AACH,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTabBar-59484847.js","sources":["../../src/hooks/PRIVATE_useTabBar/useTabBar.ts"],"sourcesContent":["import { useState, useRef, useEffect, useCallback } from 'preact/hooks';\nimport { mergeProps } from '../../utils/UNSAFE_mergeProps';\nimport {\n getPrevNextKeyUsingRef,\n getFirstVisibleKey,\n getKey,\n keyExtractor,\n findElementByKey,\n getItemKeysArray\n} from '../../utils/PRIVATE_collectionUtils';\nimport { useCollectionFocusRing } from '../PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../PRIVATE_useCurrentKey';\nimport { useId } from '../UNSAFE_useId';\nimport type { ComponentProps, ContextType, RefObject } from 'preact';\nimport type { TabBarContext, TabBarLayout } from '../../UNSAFE_TabBarCommon';\nimport { useReorderableContext } from '../../hooks/PRIVATE_useReorderable/useReorderableContext';\nimport { Menu } from '../../UNSAFE_Menu';\nimport { TabBarContextMenuConfig } from '../../UNSAFE_TabBarCommon';\nimport { useContextMenuGesture } from '../../hooks/UNSAFE_useContextMenuGesture';\nimport { getDefaultContextMenu } from '../../UNSAFE_TabBar/TabBarContextMenu';\nimport { TabBarItemContextMenuContext } from '../../UNSAFE_TabBarCommon/TabBar.types';\nimport { useUser } from '../../hooks/UNSAFE_useUser';\nimport { useTranslationBundle } from '../../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../../resources/nls/bundle';\n\ntype TabBarContextValue = ContextType<typeof TabBarContext>;\n\nexport type useTabBarOptions<K extends string | number> = {\n class?: string;\n display?: TabBarContextValue['display'];\n edge?: 'bottom' | 'top';\n onRemove?: TabBarContextValue['onRemove'];\n onSelect?: TabBarContextValue['onSelect'];\n ref?: RefObject<HTMLDivElement>;\n selection?: TabBarContextValue['selection'];\n size?: TabBarContextValue['size'];\n children?: ComponentProps<typeof TabBarLayout>['children'];\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n};\n\nconst ITEM_SELECTOR = '[role=\"tab\"]';\nconst REMOVABLE_ICON_SELECTOR = '[data-oj-tabbar-item-remove-icon=\"true\"]';\nexport const REMOVABLE_ITEM_ATTRIBUTE = 'data-oj-removable';\n\ntype MenuProps = Pick<\n ComponentProps<typeof Menu>,\n 'anchorRef' | 'initialFocus' | 'placement' | 'offsetValue' | 'isOpen'\n>;\n\nconst TOUCH_OFFSET_VALUE = 40;\n\nconst menuPropGestureStates: Record<\n 'mouse' | 'keyboard' | 'touch',\n Omit<Required<MenuProps>, 'anchorRef' | 'isOpen'>\n> = {\n mouse: {\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0\n },\n keyboard: {\n initialFocus: 'firstItem',\n placement: 'bottom-start',\n offsetValue: 0\n },\n touch: {\n initialFocus: 'menu',\n placement: 'end',\n offsetValue: TOUCH_OFFSET_VALUE\n }\n};\n\nconst initialMenuProps: MenuProps = {\n isOpen: false,\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0,\n anchorRef: { current: null }\n};\n\n/**\n * Implements TabBar behavior for focus and keyboad handling\n */\nexport function useTabBar<K extends string | number>(options: useTabBarOptions<K>) {\n const {\n children,\n class: className,\n display,\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n ref: userRef,\n size,\n contextMenuConfig\n } = options;\n\n const { direction } = useUser();\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const internalRef = useRef<HTMLDivElement>(null);\n const rootRef = userRef || internalRef;\n\n const tabId = useId();\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection as K);\n const [hideTooltip, setHideTooltip] = useState(false);\n\n const tabItemPrefix = tabId + '_';\n\n const contextMenuDescriptionId = 'contextMenu_' + useId();\n const contextMenuDescription = translations.tabbar_labelContextMenu();\n\n /**\n * A reference to the previous set of tab keys that this TabBar\n * contains before children were re-rendered. In the event the \"current\" tab\n * is removed and the \"currentKey\" reference is broken, we can redirect\n * the \"currentKey\" to another tab based on the index of the removed tab.\n */\n const prevTabKeys = useRef<(string | number | undefined)[]>();\n\n useEffect(() => {\n if (rootRef.current) {\n const tabKeys = getItemKeysArray(rootRef.current, ITEM_SELECTOR);\n if (currentKey == null && tabKeys) {\n if (selection != null && tabKeys.includes(selection as K)) {\n setCurrentKey(selection as K);\n } else if (tabKeys.length > 0) {\n setCurrentKey(tabKeys[0] as K);\n }\n }\n if (currentKey != null && tabKeys && !tabKeys.includes(currentKey as K)) {\n //If prevTabs does not exist set the first visible key as currentKey\n prevTabKeys.current\n ? setCurrentKey(findNextValidKey(currentKey, tabKeys, prevTabKeys.current) as K)\n : setCurrentKey(tabKeys[0] as K);\n }\n prevTabKeys.current = tabKeys as K[];\n }\n }, [children, currentKey, rootRef, selection]);\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(rootRef, [\n 'ArrowRight',\n 'ArrowLeft',\n 'Home',\n 'End'\n ]);\n\n const reorderableContext = useReorderableContext();\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? extractOnlyItemKey(element, ITEM_SELECTOR, REMOVABLE_ICON_SELECTOR)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n false,\n undefined,\n undefined,\n getPrevNextKeyUsingRef(rootRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(rootRef, currentKey, false, ITEM_SELECTOR),\n currentKey,\n (detail) => {\n const key = detail.value as K;\n setCurrentKey(key);\n setHideTooltip(false);\n }\n );\n\n useEffect(() => {\n if (reorderableContext) {\n reorderableContext.currentItemKey.current = currentKey;\n }\n }, [currentKey, reorderableContext]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (rootRef.current && currentKey != null) {\n if (event.key === 'Home' || event.key === 'End') {\n const tabBarItemKey = getItemKeysArray(rootRef.current, ITEM_SELECTOR);\n event.preventDefault();\n setCurrentKey?.(tabBarItemKey[event.key === 'Home' ? 0 : tabBarItemKey.length - 1] as K);\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.({ value: currentKey });\n }\n if (event.key === 'Delete') {\n const tabBarItem = findElementByKey(\n rootRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as HTMLElement;\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n onRemove?.({ value: currentKey });\n }\n }\n if (event.key === 'Escape') {\n setHideTooltip(true);\n }\n }\n };\n\n const onFocus = () => {\n if (rootRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(rootRef.current, ITEM_SELECTOR);\n if (key != null) {\n setCurrentKey(key as K);\n }\n }\n };\n\n const [contextMenuContext, setContextMenuContext] = useState<TabBarItemContextMenuContext<K>>();\n\n const [menuProps, setMenuProps] = useState<MenuProps>(initialMenuProps);\n const [accStatusInfo, setAccStatusInfo] = useState<string>();\n\n const { triggerProps } = useContextMenuGesture(\n ({ gesture, anchor, target }) => {\n let anchorBasedOnGesture = anchor;\n let itemKey = currentKey as K;\n if (gesture === 'keyboard') {\n //We find the element where the position of the menu is going to be based of\n const elem = findElementByKey(\n rootRef.current as HTMLElement,\n currentKey as K,\n ITEM_SELECTOR\n );\n //We set the correct anchor\n anchorBasedOnGesture = elem ? elem : anchor;\n } else {\n //We search for the key using the target of the event\n const key = keyExtractor(target as HTMLElement, ITEM_SELECTOR);\n\n //On touch devices, the keyExtractor returns null because target of touch event is the entire tabbar. Hence we make use of currentkey since the context menu is always launched from selected item and its key is currentKey\n itemKey = key != null ? (key as K) : (currentKey as K);\n }\n let tabKeysArray;\n let isRemovableItem = false;\n const isReorderable = reorderableContext?.onReorder != null;\n if (rootRef.current) {\n tabKeysArray = isReorderable\n ? (getItemKeysArray(rootRef.current, ITEM_SELECTOR) as K[])\n : undefined;\n isRemovableItem =\n getItemAttribute(itemKey, rootRef.current, REMOVABLE_ITEM_ATTRIBUTE) != null;\n }\n const isRemovable = onRemove != null && isRemovableItem;\n const defaultContext = getDefaultContextMenu<K>({\n // For default menu items the existence of REMOVABLE_ICON_SELECTOR is the indicator that it is removable because we render the default menu in touch devices not the application.\n // Furthermore in corepack due to delegations onRemove is always defined as it is a even handler hence not a good check for isRemovable.\n isRemovable: isRemovable,\n handleRemove: onRemove,\n handleReorder: isReorderable ? reorderableContext.onReorder : undefined,\n itemKey: itemKey,\n tabKeys: tabKeysArray,\n direction: direction,\n itemLabels: {\n labelRemove: isRemovable ? translations.tabbar_labelRemove() : undefined,\n labelMoveLeft: isReorderable ? translations.tabbar_labelMoveLeft() : undefined,\n labelMoveRight: isReorderable ? translations.tabbar_labelMoveRight() : undefined\n },\n handleAccStatus: (detail) => {\n const removeItemLabel = getItemLabel(detail.removedKey!, rootRef.current!) as string;\n const removeStatus =\n isRemovable && detail.removedKey\n ? translations.tabbar_accAnnounceRemovedKey({ itemKey: removeItemLabel })\n : '';\n const destinationItemLabel = getItemLabel(\n detail.destinationKey!,\n rootRef.current!\n ) as string;\n const reorderStatus =\n isReorderable && detail.destinationKey\n ? translations.accAnnounceMovedKey({\n // This acc info is for reordering using context menu hence as per spec source item key is not required.\n itemKey: '',\n position: detail.position!,\n referenceKey: destinationItemLabel\n })\n : '';\n setAccStatusInfo(removeStatus + reorderStatus);\n }\n });\n setContextMenuContext(defaultContext);\n\n setMenuProps({\n ...menuPropGestureStates[gesture],\n anchorRef: { current: anchorBasedOnGesture },\n // This is set so that when no contextMenuConfig is available we need not open it. Example: Apps may choose to open only for removable items and return contextMenuConfig as undefined for non removable ones in such cases it will prevent it from opening.\n isOpen: contextMenuConfig != null\n });\n },\n {\n isDisabled: !contextMenuConfig //If there is no a context menu renderer we disable the hook\n }\n );\n\n const handleCloseContextMenu = useCallback<Required<ComponentProps<typeof Menu>>['onClose']>(\n (detail) => {\n //Focus has to be set on the current target that was obtained\n //during context menu gesture when menu is dismissed or item is \"selected\"\n if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {\n setCurrentKey(contextMenuContext?.itemKey);\n rootRef.current?.focus();\n }\n // We close the menu.The only prop that matters here is isOpen\n setMenuProps({ ...initialMenuProps });\n },\n [rootRef, contextMenuContext?.itemKey]\n );\n\n const eventProps = mergeProps({ onKeyDown, onFocus }, triggerProps);\n\n return {\n rootProps: mergeProps(\n {\n 'aria-activedescendant': currentKey ? tabItemPrefix + currentKey : '',\n 'aria-multiselectable': false,\n class: className,\n ref: rootRef,\n role: 'tablist',\n tabIndex: 0\n },\n currentKeyProps,\n focusRingProps,\n eventProps\n ),\n tabBarContext: {\n currentKey,\n display,\n isEdgeBottom: edge === 'bottom',\n layout: 'condense',\n onRemove,\n onSelect,\n showFocusRing,\n hideTooltip,\n selection,\n size,\n tabItemPrefix\n },\n menuProps: { ...menuProps, onClose: handleCloseContextMenu },\n contextMenuContext,\n contextMenuDescriptionId,\n contextMenuDescription,\n accStatusInfo\n } as const;\n}\n\n//useCurrentKey use click capture that captures first click, which is on remove button\n//when we remove and sets the item being removed to currentKey. So we should not allow\n//this if click is on remove button\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const tabBarItem = element.closest(itemSelector);\n if (tabBarItem) {\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n const removeButton = element.closest(itemEliminator);\n if (removeButton && tabBarItem?.contains(removeButton)) {\n return null;\n }\n }\n return getKey(tabBarItem as HTMLElement);\n }\n return null;\n};\n\nconst findNextValidKey = <K>(currentKey: K, currTabs: K[], prevTabs: K[]) => {\n const index = prevTabs.indexOf(currentKey);\n // update current key to be the first one if currentKey is invalid\n if (index === -1) {\n return currTabs[0];\n }\n let nextIndex = 0;\n let isLastKey = false;\n if (index === prevTabs.length - 1) {\n nextIndex = index - 1;\n isLastKey = true;\n } else {\n nextIndex = index + 1;\n }\n while (nextIndex !== index && nextIndex > -1 && nextIndex < prevTabs.length) {\n const nextKey = prevTabs[nextIndex];\n if (currTabs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n isLastKey ? nextIndex-- : nextIndex++;\n }\n // update current key to be the first one if we can't find a suitable next key\n return currTabs[0];\n};\n\n// Utility that returns the value for a attribute related to the role=\"tab\" item.\nexport const getItemAttribute = <K extends string | number>(\n itemKey: K,\n root: HTMLElement,\n attribute: string\n) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n const tabBarItemAttribute = tabBarItem.hasAttribute(attribute)\n ? tabBarItem.getAttribute(attribute)\n : null;\n return tabBarItemAttribute;\n }\n return;\n};\n\n// Utility that returns the visible inner text inside the role=\"tab\" item.\nconst getItemLabel = <K extends string | number>(itemKey: K, root: HTMLElement) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n return tabBarItem.innerText;\n }\n return;\n};\n"],"names":["useUser","useTranslationBundle","useRef","useId","useState","useEffect","getItemKeysArray","useCollectionFocusRing","useReorderableContext","useCurrentKey","keyExtractor","getPrevNextKeyUsingRef","findElementByKey","getFirstVisibleKey","useContextMenuGesture","getDefaultContextMenu","useCallback","mergeProps","getKey"],"mappings":";;;;;;;;;;;;;;;AAwCA,MAAM,aAAa,GAAG,cAAc,CAAC;AACrC,MAAM,uBAAuB,GAAG,0CAA0C,CAAC;AACpE,MAAM,wBAAwB,GAAG,oBAAoB;AAO5D,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,MAAM,qBAAqB,GAGvB;AACF,IAAA,KAAK,EAAE;AACL,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,SAAS,EAAE,cAAc;AACzB,QAAA,WAAW,EAAE,CAAC;AACf,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,YAAY,EAAE,WAAW;AACzB,QAAA,SAAS,EAAE,cAAc;AACzB,QAAA,WAAW,EAAE,CAAC;AACf,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,SAAS,EAAE,KAAK;AAChB,QAAA,WAAW,EAAE,kBAAkB;AAChC,KAAA;CACF,CAAC;AAEF,MAAM,gBAAgB,GAAc;AAClC,IAAA,MAAM,EAAE,KAAK;AACb,IAAA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AAmB,GAAG,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC;AAC5D,cAAE,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC;cAClC,IAAI,CAAC;AACT,QAAA,OAAO,mBAAmB,CAAC;KAC5B;IACD,OAAO;AACT,EAAE;AAEF;AACA,MAAM,YAAY,GAAG,CAA4B,OAAU,EAAE,IAAiB,KAAI;IAChF,MAAM,UAAU,GAAGA,gCAAgB,CAAC,IAAI,EAAE,OAAY,EAAE,aAAa,CAAgB,CAAC;IACtF,IAAI,UAAU,EAAE;QACd,OAAO,UAAU,CAAC,SAAS,CAAC;KAC7B;IACD,OAAO;AACT,CAAC;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabBar-49b735e8.js","sources":["../../src/UNSAFE_TabBar/TabBar.tsx"],"sourcesContent":["import type { ComponentChildren, Ref, RefObject } from 'preact';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { TabBarContext, TabBarLayout, TabBarContextMenuConfig } from '../UNSAFE_TabBarCommon';\nimport { styles } from './themes/TabBarStyles.css';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { useTabBar } from '../hooks/PRIVATE_useTabBar';\nimport { forwardRef } from 'preact/compat';\nimport { TabBarContextMenu } from './TabBarContextMenu';\nexport {\n TabBarItem,\n RemovableTabBarItem,\n OverflowTabBarItem,\n TabBarContext,\n useTabBarContext,\n TabBarLayout,\n useProgressiveTruncation,\n TabBarLinkItem\n} from '../UNSAFE_TabBarCommon';\n\n/**\n * type for payload of current key change event handler\n */\nexport type CurrentKeyDetail<K> = {\n value: K;\n};\n\n/**\n * type for payload of selection change event handler\n */\ntype SelectionDetail<K> = {\n value: K;\n};\n\n/**\n * type for payload of remove event handler\n */\ntype RemoveDetail<K> = {\n value: K;\n};\n\ntype DisplayProps =\n | {\n /**\n * Controls the content layout of the TabBarItem: 'standard' lays out the contents horizontally,\n *'icons' hides the label,\n */\n display?: 'standard' | 'icons';\n /**\n * The size indicates how tall the TabBarItem is rendered.\n * Note: It is not possible to specify 'size' when 'display=\"stacked\".\n */\n size?: 'md' | 'lg';\n }\n | {\n /**\n *'stacked' stacks the icon on top of the label.\n * Note: It is not possible to specify 'size' when 'display=\"stacked\".\n */\n display?: 'stacked';\n size?: 'never';\n };\n\nexport type TabBarProps<K extends string | number> = DisplayProps & {\n /**\n * A set of TabBarItem(s) that TabBar will hold\n */\n children: ComponentChildren;\n /**\n * Whether to stretch the tab bar items to occupy available space or to condense items\n */\n layout?: 'stretch' | 'condense';\n /**\n * The position of the TabBar. Valid Values: top and bottom.\n * 'top' is used when TabBar is placed on top of content section and the selection\n * indicator would be placed below the TabBarItem.\n * 'bottom' is used when TabBar is placed on bottom of content section and the selection\n * indicator would be placed above the TabBarItem.\n */\n edge?: 'top' | 'bottom';\n /**\n * Key of the selected item.\n */\n selection?: K;\n /**\n * Callback function to handle when user selects a tab.\n * The callback is also invoked when a user selects a tab that is already selected.\n */\n onSelect?: <K extends string | number>(detail: SelectionDetail<K>) => void;\n /**\n * Callback function to handle remove\n */\n onRemove?: <K extends string | number>(detail: RemoveDetail<K>) => void;\n /**\n * Accepts the ID of an element that provides instructions for interaction with the TabBar.\n */\n 'aria-describedby'?: string;\n /**\n * An aria-label which defines a string value that labels this TabBar.\n * Either aria-label or aria-labelledby should be specified in order to make TabBar accessible.\n */\n 'aria-label'?: string;\n\n /**\n * An aria-labelledby which identifies the element(s) that labels this TabBar.\n * Either aria-label or aria-labelledby should be specified in order to make TabBar accessible.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Configuration used to specify a context menu.\n */\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n};\n/**\n * A tab bar allows navigation between different content sections.\n */\nexport const TabBar = forwardRef(\n <K extends string | number>(\n {\n children,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n contextMenuConfig\n }: TabBarProps<K> & TestIdProps,\n ref?: Ref<HTMLDivElement>\n ) => {\n const rootRef = ref as RefObject<HTMLDivElement>;\n\n const {\n rootProps,\n tabBarContext,\n menuProps,\n contextMenuContext,\n contextMenuDescription,\n contextMenuDescriptionId,\n accStatusInfo\n } = useTabBar({\n class: styles.tabBarBase,\n edge: edge,\n onRemove,\n onSelect,\n ref: rootRef,\n selection,\n size,\n children,\n contextMenuConfig\n });\n\n const isContextMenuAvailable = contextMenuConfig != null;\n\n return (\n <>\n <TabBarContext.Provider value={tabBarContext}>\n <div\n {...rootProps}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-haspopup={contextMenuConfig != null ? true : false}\n aria-describedby={\n isContextMenuAvailable && contextMenuDescriptionId\n ? ariaDescribedBy\n ? `${ariaDescribedBy} ${contextMenuDescriptionId}`\n : contextMenuDescriptionId\n : ariaDescribedBy\n }>\n <TabBarLayout layout={layout} display={display}>\n {children}\n </TabBarLayout>\n </div>\n </TabBarContext.Provider>\n {isContextMenuAvailable && contextMenuDescriptionId && (\n <span id={contextMenuDescriptionId}>\n <HiddenAccessible>{contextMenuDescription}</HiddenAccessible>\n </span>\n )}\n {isContextMenuAvailable && accStatusInfo && <LiveRegion>{accStatusInfo}</LiveRegion>}\n {isContextMenuAvailable && (\n <TabBarContextMenu\n {...menuProps}\n contextMenuConfig={contextMenuConfig}\n contextMenuContext={contextMenuContext!}\n />\n )}\n </>\n );\n }\n);\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA;;AAEG;MACU,MAAM,GAAG,UAAU,CAC9B,CACE,EACE,QAAQ,EACR,MAAM,GAAG,SAAS,EAClB,OAAO,GAAG,UAAU,EACpB,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,QAAQ,EACR,Q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wBAAwB,EAChC,QAAA,EAAAA,GAAA,CAAC,gBAAgB,EAAE,EAAA,QAAA,EAAA,sBAAsB,EAAoB,CAAA,EAAA,CACxD,CACR,EACA,sBAAsB,IAAI,aAAa,IAAIA,GAAC,CAAA,UAAU,EAAE,EAAA,QAAA,EAAA,aAAa,EAAc,CAAA,EACnF,sBAAsB,KACrBA,GAAC,CAAA,iBAAiB,EACZ,EAAA,GAAA,SAAS,EACb,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,kBAAmB,EAAA,CACvC,CACH,CAAA,EAAA,CACA,EACH;AACJ,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDetectHorizontalOverflow-154005bb.js","sources":["../../src/hooks/PRIVATE_useDetectHorizontalOverflow/useDetectHorizontalOverflow.ts"],"sourcesContent":["import { RefObject } from 'preact';\nimport { useState, useLayoutEffect, useRef, StateUpdater, useCallback } from 'preact/hooks';\nimport { useResizeObserver } from '../../hooks/UNSAFE_useResizeObserver';\nimport { Size } from '../../utils/UNSAFE_size';\nimport { getTabWidths } from '../../utils/PRIVATE_tabBarUtils';\nimport type { TrailingContentInfo } from '../../utils/PRIVATE_tabBarUtils';\n\ntype TabDimensions<K extends string | number> = {\n key: K;\n maxWidth: number;\n nonTextWidth?: number;\n needsTruncation?: boolean;\n cumulativeWidth?: number;\n};\n\n//The minimum width of the overflowtabbaritem, it can be rendered with width greater than this based on available width\nconst MORE_ITEM_WIDTH = 48;\nconst LABEL_MIN_WIDTH = 96;\nconst TAB_BORDER = 6;\n//This is the minWidth a tab will have if it has only a label.\nconst TAB_MIN_WIDTH = LABEL_MIN_WIDTH + TAB_BORDER;\n\nexport type useDetectOverflowProps<K extends string | number> = {\n rootRef: RefObject<HTMLDivElement>;\n keysArray: (K | undefined)[];\n isTruncationDisabled?: boolean;\n};\n\n/**\n * Implements overflow detection and calculation\n */\nexport function useDetectHorizontalOverflow<K extends string | number>({\n rootRef,\n keysArray,\n isTruncationDisabled = true\n}: useDetectOverflowProps<K>) {\n const [visibleItemKeys, setVisibleItemKeys] = useState<(K | undefined)[]>();\n const [overflowItemKeys, setOverflowingItemKeys] = useState<(K | undefined)[]>();\n const trailingContentWidths = useRef(new Map<K, TrailingContentInfo>());\n const [tabMaxWidth, setTabMaxWidth] = useState<Map<K, Size>>();\n // This state var is to only re-trigger the layout effect. Using it locally will not give the latest updated value hence we use current suffix vars\n const [tabBarWidth, setTabBarWidth] = useState<number>(0);\n const isAllItemsTruncatedMax = useRef<boolean>(false);\n const isAllItemsTruncatedFinal = useRef<boolean>(false);\n const tabDimensions = useRef<TabDimensions<K>[]>();\n\n useLayoutEffect(() => {\n // Store locally to avoid calling rootRef everytime within layouteffect\n const tabBarWidthCurrent = rootRef?.current?.clientWidth;\n const tabBarScrollWidthCurrent = rootRef?.current?.scrollWidth;\n if (\n rootRef.current &&\n keysArray &&\n keysArray.length > 0 &&\n tabBarWidthCurrent &&\n tabBarWidthCurrent > 0\n ) {\n //Set tabBarWidth if not the current value\n if (tabBarWidth !== tabBarWidthCurrent) {\n setTabBarWidth(tabBarWidthCurrent);\n }\n\n if (tabMaxWidth === undefined) {\n const isOverflow = tabBarWidthCurrent > 0 && tabBarWidthCurrent < tabBarScrollWidthCurrent!;\n\n //If there is no overflow maxWidth should be its prevState, prevState may also be undefined if truncation is disabled.\n if (!isOverflow) {\n setTabMaxWidth((prevState) => {\n return prevState;\n });\n } else {\n //We need to calculate maxWidth only if truncation threshold limit is not reached\n if (!isAllItemsTruncatedMax.current) {\n const tabWidths = getTabWidths(\n rootRef.current,\n trailingContentWidths,\n isTruncationDisabled,\n tabBarWidthCurrent,\n isAllItemsTruncatedMax?.current,\n keysArray as K[]\n );\n //If all items have reached max treshold of truncation then we set it to true\n if (tabWidths.every((item) => item.hasReachedLimit)) {\n isAllItemsTruncatedMax.current = true;\n }\n tabDimensions.current = tabWidths as any;\n }\n //If all items have reached max treshold of truncation then we do not have update tabDimensions are maxWidth cannot go lesser than 96px.\n else {\n tabDimensions.current = tabDimensions.current?.map((item) => ({\n ...item\n }));\n }\n }\n\n //Set calculated maxWidths\n if (!isTruncationDisabled) {\n const tabMaxWidthMap = new Map(\n tabDimensions.current?.map((tab) => [tab.key, (tab.maxWidth + 'px') as Size])\n );\n setTabMaxWidth(tabMaxWidthMap);\n }\n //Overflow calculation\n if (tabBarWidthCurrent < tabBarScrollWidthCurrent!) {\n const arr = tabDimensions.current?.map((item) => item.cumulativeWidth) as number[];\n const lastIndex = arr.length - 1;\n //In addition to scrollWidth we check if the cumulative width of last item is greater than rootRef clientwidth\n if (arr && tabBarWidthCurrent < arr[lastIndex]) {\n const { closestEntry, closestIndex } = searchClosest(arr, tabBarWidthCurrent);\n // Check for not null, because even for '0' value of closestIndex we want to slice in such cases only overflow item will be rendered\n if (closestEntry && closestIndex != null) {\n // Closest index refers to the index of the last item that would be visible.\n // While splicing we need to include it however if we check for closestIndex < lastIndex alone then closestIndex + 1 will be greater than the last item index so we check for one less.\n const lastVisibleItemIndex =\n closestIndex < lastIndex - 1 ? closestIndex + 1 : closestIndex;\n setVisibleItemKeys(keysArray.slice(0, lastVisibleItemIndex));\n setOverflowingItemKeys(keysArray?.slice(lastVisibleItemIndex));\n //Once OverflowTabBarItem is rendered, i.e overflowItemKeys move into overflow menu then space is available, which can be re-dsitributed to truncated visible items. We also check if these visible items have already gone through this calculation otherwise we skip it to avoid infinite loop.\n if (closestIndex > 0 && !isAllItemsTruncatedFinal.current && !isTruncationDisabled) {\n const tabWidthsAfterOverflow = getTabWidths(\n rootRef.current,\n trailingContentWidths,\n isTruncationDisabled,\n tabBarWidthCurrent,\n isAllItemsTruncatedMax?.current\n );\n const tabMaxWidthMapAfterOverflow = new Map(\n tabWidthsAfterOverflow.map((tab) => [tab.key, (tab.maxWidth + 'px') as Size])\n );\n //Flag to indicate that final truncation calculation has occured\n isAllItemsTruncatedFinal.current = true;\n setTabMaxWidth(tabMaxWidthMapAfterOverflow);\n }\n }\n }\n }\n }\n }\n }, [keysArray, rootRef, tabBarWidth, tabMaxWidth, isTruncationDisabled]);\n\n const updateTabBarWidth = useCallback(\n (entry: { contentRect: { width: StateUpdater<number> } }) => {\n const rectWidth = Math.ceil(entry.contentRect.width as number);\n // Sometimes entry.contentRect.width maybe a decimal value so we need to get absolute value\n if (Math.abs(tabBarWidth - (entry.contentRect.width as number)) > 1) {\n setTabBarWidth(entry.contentRect.width);\n if (tabMaxWidth !== undefined && !isAllItemsTruncatedMax.current) {\n setTabMaxWidth(undefined);\n }\n //Once there is change in the container width and there is no overflow we render all items as visible.\n if (rectWidth >= rootRef.current?.scrollWidth!) {\n setVisibleItemKeys(keysArray);\n setOverflowingItemKeys([]);\n }\n isAllItemsTruncatedFinal.current = false;\n }\n },\n [tabBarWidth, tabMaxWidth, rootRef, keysArray]\n );\n\n useResizeObserver(rootRef, updateTabBarWidth);\n\n return shouldRenderAllTabs(visibleItemKeys, overflowItemKeys, keysArray)\n ? {\n visibleItemKeys: keysArray,\n overflowItemKeys,\n maxWidths: tabMaxWidth\n }\n : {\n visibleItemKeys,\n overflowItemKeys,\n maxWidths: tabMaxWidth\n };\n}\n\n//If the overflow + visible keys or their quantity are not the same as keysArray then we first render all the keys as visible\nconst shouldRenderAllTabs = <K extends string | number>(\n visibleItemKeys: (K | undefined)[] | undefined,\n overflowItemKeys: (K | undefined)[] | undefined,\n keysArray: (K | undefined)[]\n) => {\n if (visibleItemKeys == null) return true;\n else if (visibleItemKeys && overflowItemKeys && keysArray) {\n const combinedArray = [...visibleItemKeys, ...overflowItemKeys];\n const isNotEqual =\n combinedArray.length !== keysArray.length ||\n JSON.stringify(keysArray) !== JSON.stringify(combinedArray);\n return isNotEqual;\n } else return false;\n};\n\n//Searches for a value closest and smaller than search value from the cumulative array\nconst searchClosest = (\n arr: number[] | undefined,\n searchValue: number | undefined | null\n): { closestEntry: number | null; closestIndex: number | null } => {\n {\n if (arr != null && searchValue != null) {\n let left = 0;\n let right = arr.length - 1;\n let closestEntry: number | null = null;\n let closestIndex: number | null = null;\n while (left <= right && left < arr.length && right > -1) {\n const mid = Math.floor((left + right) / 2);\n const midEntry = arr[mid];\n if (midEntry === searchValue) {\n return { closestEntry: midEntry!, closestIndex: mid! };\n } else if (midEntry < searchValue) {\n closestEntry = midEntry;\n closestIndex = mid;\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n //If the searchValue is greater than closest entry and their difference is greater more item width then we have space to fit more item. Otherwise we return the index with the closest and small value when compared to searchvalue\n if (closestEntry && searchValue > closestEntry) {\n //NOTE: Do not update closestEntry to midEntry here because value from const midEntry = arr[mid], midEntry maybe greater than searchValue and below it may end up updating closestIndex to mid +1 due to abs check\n //Sometimes closest entry may be much smaller than searchvalue so in such cases we maybe able to accomodate more items. The difference between searchValue and closestEntry should be greater than the minWidth needed for any item so that it can be rendered. If the difference is lesser than item min width we then check if space is available to render overflowitem alone else we reduce the closestIndex.\n closestIndex =\n Math.abs(searchValue - closestEntry) > TAB_MIN_WIDTH && mid + 1 <= arr.length - 2\n ? mid + 1\n : Math.abs(searchValue - closestEntry) > MORE_ITEM_WIDTH\n ? mid\n : mid - 1 >= 0\n ? mid - 1\n : 0;\n }\n //If the searchValue is lesser than closestEntry we return a value lesser than mid, this happens when all the values in the array are lesser than searchValue, i.e screensize is extremely small\n else {\n closestIndex = mid - 1 >= 0 ? mid - 1 : 0;\n }\n }\n return { closestEntry: closestEntry!, closestIndex: closestIndex! };\n } else return { closestEntry: null, closestIndex: null };\n }\n};\n"],"names":[],"mappings":";;;;;AAeA;AACA,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,UAAU,GAAG,CAAC,CAAC;AACrB;AACA,MAAM,aAAa,GAAG,eAAe,GAAG,UAAU,CAAC;AAQnD;;AAEG;AACG,SAAU,2BAA2B,CAA4B,EACrE,OAAO,EACP,SAAS,EACT,oBAAoB,GAAG,IAAI,EACD,EAAA;IAC1B,MAAM,CAAC,eAAe,EAAE,kBA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AW,GAAG,YAAY,CAAC,GAAG,eAAe;AACxD,kCAAE,GAAG;AACL,kCAAE,GAAG,GAAG,CAAC,IAAI,CAAC;sCACZ,GAAG,GAAG,CAAC;sCACP,CAAC,CAAC;iBACT;;qBAEI;AACH,oBAAA,YAAY,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;iBAC3C;aACF;YACD,OAAO,EAAE,YAAY,EAAE,YAAa,EAAE,YAAY,EAAE,YAAa,EAAE,CAAC;SACrE;;YAAM,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;KAC1D;AACH,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTabBar-c50957fa.js","sources":["../../src/hooks/PRIVATE_useTabBar/useTabBar.ts"],"sourcesContent":["import { useState, useRef, useEffect, useCallback } from 'preact/hooks';\nimport { mergeProps } from '../../utils/UNSAFE_mergeProps';\nimport {\n getPrevNextKeyUsingRef,\n getFirstVisibleKey,\n getKey,\n keyExtractor,\n findElementByKey,\n getItemKeysArray\n} from '../../utils/PRIVATE_collectionUtils';\nimport { useCollectionFocusRing } from '../PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../PRIVATE_useCurrentKey';\nimport { useId } from '../UNSAFE_useId';\nimport type { ComponentProps, ContextType, RefObject } from 'preact';\nimport type { TabBarContext, TabBarLayout } from '../../UNSAFE_TabBarCommon';\nimport { useReorderableContext } from '../../hooks/PRIVATE_useReorderable/useReorderableContext';\nimport { Menu } from '../../UNSAFE_Menu';\nimport { TabBarContextMenuConfig } from '../../UNSAFE_TabBarCommon';\nimport { useContextMenuGesture } from '../../hooks/UNSAFE_useContextMenuGesture';\nimport { getDefaultContextMenu } from '../../UNSAFE_TabBar/TabBarContextMenu';\nimport { TabBarItemContextMenuContext } from '../../UNSAFE_TabBarCommon/TabBar.types';\nimport { useUser } from '../../hooks/UNSAFE_useUser';\nimport { useTranslationBundle } from '../../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../../resources/nls/bundle';\n\ntype TabBarContextValue = ContextType<typeof TabBarContext>;\n\nexport type useTabBarOptions<K extends string | number> = {\n class?: string;\n display?: TabBarContextValue['display'];\n edge?: 'bottom' | 'top';\n onRemove?: TabBarContextValue['onRemove'];\n onSelect?: TabBarContextValue['onSelect'];\n ref?: RefObject<HTMLDivElement>;\n selection?: TabBarContextValue['selection'];\n size?: TabBarContextValue['size'];\n children?: ComponentProps<typeof TabBarLayout>['children'];\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n};\n\nconst ITEM_SELECTOR = '[role=\"tab\"]';\nconst REMOVABLE_ICON_SELECTOR = '[data-oj-tabbar-item-remove-icon=\"true\"]';\nexport const REMOVABLE_ITEM_ATTRIBUTE = 'data-oj-removable';\n\ntype MenuProps = Pick<\n ComponentProps<typeof Menu>,\n 'anchorRef' | 'initialFocus' | 'placement' | 'offsetValue' | 'isOpen'\n>;\n\nconst TOUCH_OFFSET_VALUE = 40;\n\nconst menuPropGestureStates: Record<\n 'mouse' | 'keyboard' | 'touch',\n Omit<Required<MenuProps>, 'anchorRef' | 'isOpen'>\n> = {\n mouse: {\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0\n },\n keyboard: {\n initialFocus: 'firstItem',\n placement: 'bottom-start',\n offsetValue: 0\n },\n touch: {\n initialFocus: 'menu',\n placement: 'end',\n offsetValue: TOUCH_OFFSET_VALUE\n }\n};\n\nconst initialMenuProps: MenuProps = {\n isOpen: false,\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0,\n anchorRef: { current: null }\n};\n\n/**\n * Implements TabBar behavior for focus and keyboad handling\n */\nexport function useTabBar<K extends string | number>(options: useTabBarOptions<K>) {\n const {\n children,\n class: className,\n display,\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n ref: userRef,\n size,\n contextMenuConfig\n } = options;\n\n const { direction } = useUser();\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const internalRef = useRef<HTMLDivElement>(null);\n const rootRef = userRef || internalRef;\n\n const tabId = useId();\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection as K);\n const [hideTooltip, setHideTooltip] = useState(false);\n\n const tabItemPrefix = tabId + '_';\n\n const contextMenuDescriptionId = 'contextMenu_' + useId();\n const contextMenuDescription = translations.tabbar_labelContextMenu();\n\n /**\n * A reference to the previous set of tab keys that this TabBar\n * contains before children were re-rendered. In the event the \"current\" tab\n * is removed and the \"currentKey\" reference is broken, we can redirect\n * the \"currentKey\" to another tab based on the index of the removed tab.\n */\n const prevTabKeys = useRef<(string | number | undefined)[]>();\n\n useEffect(() => {\n if (rootRef.current) {\n const tabKeys = getItemKeysArray(rootRef.current, ITEM_SELECTOR);\n if (currentKey == null && tabKeys) {\n if (selection != null && tabKeys.includes(selection as K)) {\n setCurrentKey(selection as K);\n } else if (tabKeys.length > 0) {\n setCurrentKey(tabKeys[0] as K);\n }\n }\n if (currentKey != null && tabKeys && !tabKeys.includes(currentKey as K)) {\n //If prevTabs does not exist set the first visible key as currentKey\n prevTabKeys.current\n ? setCurrentKey(findNextValidKey(currentKey, tabKeys, prevTabKeys.current) as K)\n : setCurrentKey(tabKeys[0] as K);\n }\n prevTabKeys.current = tabKeys as K[];\n }\n }, [children, currentKey, rootRef, selection]);\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(rootRef, [\n 'ArrowRight',\n 'ArrowLeft',\n 'Home',\n 'End'\n ]);\n\n const reorderableContext = useReorderableContext();\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? extractOnlyItemKey(element, ITEM_SELECTOR, REMOVABLE_ICON_SELECTOR)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n false,\n undefined,\n undefined,\n getPrevNextKeyUsingRef(rootRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(rootRef, currentKey, false, ITEM_SELECTOR),\n currentKey,\n (detail) => {\n const key = detail.value as K;\n setCurrentKey(key);\n setHideTooltip(false);\n }\n );\n\n useEffect(() => {\n if (reorderableContext) {\n reorderableContext.currentItemKey.current = currentKey;\n }\n }, [currentKey, reorderableContext]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (rootRef.current && currentKey != null) {\n if (event.key === 'Home' || event.key === 'End') {\n const tabBarItemKey = getItemKeysArray(rootRef.current, ITEM_SELECTOR);\n event.preventDefault();\n setCurrentKey?.(tabBarItemKey[event.key === 'Home' ? 0 : tabBarItemKey.length - 1] as K);\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.({ value: currentKey });\n }\n if (event.key === 'Delete') {\n const tabBarItem = findElementByKey(\n rootRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as HTMLElement;\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n onRemove?.({ value: currentKey });\n }\n }\n if (event.key === 'Escape') {\n setHideTooltip(true);\n }\n }\n };\n\n const onFocus = () => {\n if (rootRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(rootRef.current, ITEM_SELECTOR);\n if (key != null) {\n setCurrentKey(key as K);\n }\n }\n };\n\n const [contextMenuContext, setContextMenuContext] = useState<TabBarItemContextMenuContext<K>>();\n\n const [menuProps, setMenuProps] = useState<MenuProps>(initialMenuProps);\n const [accStatusInfo, setAccStatusInfo] = useState<string>();\n\n const { triggerProps } = useContextMenuGesture(\n ({ gesture, anchor, target }) => {\n let anchorBasedOnGesture = anchor;\n let itemKey = currentKey as K;\n if (gesture === 'keyboard') {\n //We find the element where the position of the menu is going to be based of\n const elem = findElementByKey(\n rootRef.current as HTMLElement,\n currentKey as K,\n ITEM_SELECTOR\n );\n //We set the correct anchor\n anchorBasedOnGesture = elem ? elem : anchor;\n } else {\n //We search for the key using the target of the event\n const key = keyExtractor(target as HTMLElement, ITEM_SELECTOR);\n\n //On touch devices, the keyExtractor returns null because target of touch event is the entire tabbar. Hence we make use of currentkey since the context menu is always launched from selected item and its key is currentKey\n itemKey = key != null ? (key as K) : (currentKey as K);\n }\n let tabKeysArray;\n let isRemovableItem = false;\n const isReorderable = reorderableContext?.onReorder != null;\n if (rootRef.current) {\n tabKeysArray = isReorderable\n ? (getItemKeysArray(rootRef.current, ITEM_SELECTOR) as K[])\n : undefined;\n isRemovableItem =\n getItemAttribute(itemKey, rootRef.current, REMOVABLE_ITEM_ATTRIBUTE) != null;\n }\n const isRemovable = onRemove != null && isRemovableItem;\n const defaultContext = getDefaultContextMenu<K>({\n // For default menu items the existence of REMOVABLE_ICON_SELECTOR is the indicator that it is removable because we render the default menu in touch devices not the application.\n // Furthermore in corepack due to delegations onRemove is always defined as it is a even handler hence not a good check for isRemovable.\n isRemovable: isRemovable,\n handleRemove: onRemove,\n handleReorder: isReorderable ? reorderableContext.onReorder : undefined,\n itemKey: itemKey,\n tabKeys: tabKeysArray,\n direction: direction,\n itemLabels: {\n labelRemove: isRemovable ? translations.tabbar_labelRemove() : undefined,\n labelMoveLeft: isReorderable ? translations.tabbar_labelMoveLeft() : undefined,\n labelMoveRight: isReorderable ? translations.tabbar_labelMoveRight() : undefined\n },\n handleAccStatus: (detail) => {\n const removeItemLabel = getItemLabel(detail.removedKey!, rootRef.current!) as string;\n const removeStatus =\n isRemovable && detail.removedKey\n ? translations.tabbar_accAnnounceRemovedKey({ itemKey: removeItemLabel })\n : '';\n const destinationItemLabel = getItemLabel(\n detail.destinationKey!,\n rootRef.current!\n ) as string;\n const reorderStatus =\n isReorderable && detail.destinationKey\n ? translations.accAnnounceMovedKey({\n // This acc info is for reordering using context menu hence as per spec source item key is not required.\n itemKey: '',\n position: detail.position!,\n referenceKey: destinationItemLabel\n })\n : '';\n setAccStatusInfo(removeStatus + reorderStatus);\n }\n });\n setContextMenuContext(defaultContext);\n\n setMenuProps({\n ...menuPropGestureStates[gesture],\n anchorRef: { current: anchorBasedOnGesture },\n // This is set so that when no contextMenuConfig is available we need not open it. Example: Apps may choose to open only for removable items and return contextMenuConfig as undefined for non removable ones in such cases it will prevent it from opening.\n isOpen: contextMenuConfig != null\n });\n },\n {\n isDisabled: !contextMenuConfig //If there is no a context menu renderer we disable the hook\n }\n );\n\n const handleCloseContextMenu = useCallback<Required<ComponentProps<typeof Menu>>['onClose']>(\n (detail) => {\n //Focus has to be set on the current target that was obtained\n //during context menu gesture when menu is dismissed or item is \"selected\"\n if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {\n setCurrentKey(contextMenuContext?.itemKey);\n rootRef.current?.focus();\n }\n // We close the menu.The only prop that matters here is isOpen\n setMenuProps({ ...initialMenuProps });\n },\n [rootRef, contextMenuContext?.itemKey]\n );\n\n const eventProps = mergeProps({ onKeyDown, onFocus }, triggerProps);\n\n return {\n rootProps: mergeProps(\n {\n 'aria-activedescendant': currentKey ? tabItemPrefix + currentKey : '',\n 'aria-multiselectable': false,\n class: className,\n ref: rootRef,\n role: 'tablist',\n tabIndex: 0\n },\n currentKeyProps,\n focusRingProps,\n eventProps\n ),\n tabBarContext: {\n currentKey,\n display,\n isEdgeBottom: edge === 'bottom',\n layout: 'condense',\n onRemove,\n onSelect,\n showFocusRing,\n hideTooltip,\n selection,\n size,\n tabItemPrefix\n },\n menuProps: { ...menuProps, onClose: handleCloseContextMenu },\n contextMenuContext,\n contextMenuDescriptionId,\n contextMenuDescription,\n accStatusInfo\n } as const;\n}\n\n//useCurrentKey use click capture that captures first click, which is on remove button\n//when we remove and sets the item being removed to currentKey. So we should not allow\n//this if click is on remove button\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const tabBarItem = element.closest(itemSelector);\n if (tabBarItem) {\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n const removeButton = element.closest(itemEliminator);\n if (removeButton && tabBarItem?.contains(removeButton)) {\n return null;\n }\n }\n return getKey(tabBarItem as HTMLElement);\n }\n return null;\n};\n\nconst findNextValidKey = <K>(currentKey: K, currTabs: K[], prevTabs: K[]) => {\n const index = prevTabs.indexOf(currentKey);\n // update current key to be the first one if currentKey is invalid\n if (index === -1) {\n return currTabs[0];\n }\n let nextIndex = 0;\n let isLastKey = false;\n if (index === prevTabs.length - 1) {\n nextIndex = index - 1;\n isLastKey = true;\n } else {\n nextIndex = index + 1;\n }\n while (nextIndex !== index && nextIndex > -1 && nextIndex < prevTabs.length) {\n const nextKey = prevTabs[nextIndex];\n if (currTabs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n isLastKey ? nextIndex-- : nextIndex++;\n }\n // update current key to be the first one if we can't find a suitable next key\n return currTabs[0];\n};\n\n// Utility that returns the value for a attribute related to the role=\"tab\" item.\nexport const getItemAttribute = <K extends string | number>(\n itemKey: K,\n root: HTMLElement,\n attribute: string\n) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n const tabBarItemAttribute = tabBarItem.hasAttribute(attribute)\n ? tabBarItem.getAttribute(attribute)\n : null;\n return tabBarItemAttribute;\n }\n return;\n};\n\n// Utility that returns the visible inner text inside the role=\"tab\" item.\nconst getItemLabel = <K extends string | number>(itemKey: K, root: HTMLElement) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n return tabBarItem.innerText;\n }\n return;\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAwCA,MAAM,aAAa,GAAG,cAAc,CAAC;AACrC,MAAM,uBAAuB,GAAG,0CAA0C,CAAC;AACpE,MAAM,wBAAwB,GAAG,oBAAoB;AAO5D,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,MAAM,qBAAqB,GAGvB;AACF,IAAA,KAAK,EAAE;AACL,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,SAAS,EAAE,cAAc;AACzB,QAAA,WAAW,EAAE,CAAC;AACf,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,YAAY,EAAE,WAAW;AACzB,QAAA,SAAS,EAAE,c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;AAEF;AACa,MAAA,gBAAgB,GAAG,CAC9B,OAAU,EACV,IAAiB,EACjB,SAAiB,KACf;IACF,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,EAAE,OAAY,EAAE,aAAa,CAAgB,CAAC;IACtF,IAAI,UAAU,EAAE;AACd,QAAA,MAAM,mBAAmB,GAAG,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC;AAC5D,cAAE,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC;cAClC,IAAI,CAAC;AACT,QAAA,OAAO,mBAAmB,CAAC;KAC5B;IACD,OAAO;AACT,EAAE;AAEF;AACA,MAAM,YAAY,GAAG,CAA4B,OAAU,EAAE,IAAiB,KAAI;IAChF,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,EAAE,OAAY,EAAE,aAAa,CAAgB,CAAC;IACtF,IAAI,UAAU,EAAE;QACd,OAAO,UAAU,CAAC,SAAS,CAAC;KAC7B;IACD,OAAO;AACT,CAAC;;;;"}
@@ -1,61 +0,0 @@
1
- /* @oracle/oraclejet-preact: undefined */
2
- import { jsx, jsxs } from 'preact/jsx-runtime';
3
- import { useCallback, useState, useLayoutEffect } from 'preact/hooks';
4
- import { c as classNames } from './classNames-4e12b00d.js';
5
- import { u as usePress } from './usePress-051f5adb.js';
6
- import './FormFieldContext-47ca0c20.js';
7
- import { u as useFormFieldContext } from './useFormFieldContext-daf7a676.js';
8
- import './MaxLengthCounterStyles.styles.css';
9
-
10
- var hide = 'MaxLengthCounterStyles_hide__7dy9j71';
11
- var maxLengthCounterBase = 'MaxLengthCounterStyles_maxLengthCounterBase__7dy9j70';
12
- var spanStyles = 'MaxLengthCounterStyles_spanStyles__7dy9j72';
13
-
14
- const noop = () => { };
15
- function MaxLengthCounter({ maxLength, valueLength = 0, onClick }) {
16
- const { isFocused } = useFormFieldContext();
17
- // We don't want mousedown on this component to do anything, so prevent the default behavior.
18
- const killEvent = useCallback((event) => event.preventDefault(), []);
19
- const textClasses = classNames([!isFocused && hide]);
20
- const { pressProps } = usePress(onClick ?? noop);
21
- return (jsx("div", { class: maxLengthCounterBase, onMouseDown: killEvent, ...pressProps, children: jsxs("span", { class: textClasses, children: [jsx("span", { class: spanStyles, children: valueLength }), jsx("span", { class: spanStyles, children: "/" }), jsx("span", { class: spanStyles, children: maxLength })] }) }));
22
- }
23
-
24
- /**
25
- * A custom hook to enable an alternate way for entering a new line in the TextArea components using
26
- * Alt + Enter (or option + return in MacOS). This is particularly useful in scenarios where pressing Enter
27
- * could mean a different action, like exiting from edit mode in a Table/DataGrid containing a TextArea.
28
- */
29
- const useTextAreaAltEnter = ({ onInput, textAreaRef }) => {
30
- // We want to have alt/option+Enter to insert a newline like Enter does.
31
- const [selectionStart, setSelectionStart] = useState();
32
- const handleKeyDown = useCallback((event) => {
33
- // If we see an alt+enter (or option+return on a Mac), we insert a newline and call onInputAndDispatch
34
- // since that is what is called any time the input value changes.
35
- if (event.altKey && event.key === 'Enter') {
36
- event.preventDefault(); // Prevent default Enter behavior
37
- const textarea = event.target;
38
- const { selectionStart: start, selectionEnd: end, value: previousValue } = textarea;
39
- const newValue = previousValue.substring(0, start) + '\n' + previousValue.substring(end);
40
- const valueUpdateDetail = {
41
- previousValue: previousValue,
42
- value: newValue
43
- };
44
- setSelectionStart(start + 1);
45
- onInput(valueUpdateDetail);
46
- }
47
- }, [onInput]);
48
- useLayoutEffect(() => {
49
- if (selectionStart) {
50
- textAreaRef.current?.setSelectionRange(selectionStart, selectionStart);
51
- // reset to undefined, so the next selectionStart will trigger the useLayoutEffect
52
- // even if it is the same as the previous selectionStart that was set. This is
53
- // because we are only setting selectionStart for alt+enter.
54
- setSelectionStart(undefined);
55
- }
56
- }, [selectionStart, textAreaRef]);
57
- return { handleKeyDown };
58
- };
59
-
60
- export { MaxLengthCounter as M, useTextAreaAltEnter as u };
61
- //# sourceMappingURL=useTextAreaAltEnter-ac460f4c.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTextAreaAltEnter-ac460f4c.js","sources":["../../src/UNSAFE_TextArea/MaxLengthCounter.tsx","../../src/UNSAFE_TextArea/useTextAreaAltEnter.ts"],"sourcesContent":["import { useCallback } from 'preact/hooks';\n\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useFormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { hide, maxLengthCounterBase, spanStyles } from './MaxLengthCounterStyles.css';\n\ntype Props = {\n maxLength: number;\n valueLength?: number;\n onClick?: () => void; // the calling component should focus on the appropriate element when clicked.\n};\n\nconst noop = () => {};\n\nexport function MaxLengthCounter({ maxLength, valueLength = 0, onClick }: Props) {\n const { isFocused } = useFormFieldContext();\n // We don't want mousedown on this component to do anything, so prevent the default behavior.\n const killEvent = useCallback((event: Event) => event.preventDefault(), []);\n const textClasses = classNames([!isFocused && hide]);\n const { pressProps } = usePress(onClick ?? noop);\n return (\n <div class={maxLengthCounterBase} onMouseDown={killEvent} {...pressProps}>\n <span class={textClasses}>\n <span class={spanStyles}>{valueLength}</span>\n <span class={spanStyles}>/</span>\n <span class={spanStyles}>{maxLength}</span>\n </span>\n </div>\n );\n}\n","import { ComponentProps, RefObject } from 'preact';\nimport { useCallback, useLayoutEffect, useState } from 'preact/hooks';\n\nimport { TextFieldInput } from '#UNSAFE_TextField';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\n\ntype UseTextAreaAltEnterOptions = {\n /**\n * The onInput of the TextFieldInput\n */\n onInput: NonNullable<ComponentProps<typeof TextFieldInput>['onInput']>;\n /**\n * The ref to the textarea element\n */\n textAreaRef: RefObject<HTMLTextAreaElement>;\n};\n\n/**\n * A custom hook to enable an alternate way for entering a new line in the TextArea components using\n * Alt + Enter (or option + return in MacOS). This is particularly useful in scenarios where pressing Enter\n * could mean a different action, like exiting from edit mode in a Table/DataGrid containing a TextArea.\n */\nexport const useTextAreaAltEnter = ({ onInput, textAreaRef }: UseTextAreaAltEnterOptions) => {\n // We want to have alt/option+Enter to insert a newline like Enter does.\n const [selectionStart, setSelectionStart] = useState<number>();\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // If we see an alt+enter (or option+return on a Mac), we insert a newline and call onInputAndDispatch\n // since that is what is called any time the input value changes.\n if (event.altKey && event.key === 'Enter') {\n event.preventDefault(); // Prevent default Enter behavior\n const textarea = event.target as HTMLTextAreaElement;\n const { selectionStart: start, selectionEnd: end, value: previousValue } = textarea;\n const newValue = previousValue.substring(0, start) + '\\n' + previousValue.substring(end);\n\n const valueUpdateDetail: ValueUpdateDetail<string> = {\n previousValue: previousValue,\n value: newValue\n };\n setSelectionStart(start + 1);\n onInput(valueUpdateDetail);\n }\n },\n [onInput]\n );\n\n useLayoutEffect(() => {\n if (selectionStart) {\n textAreaRef.current?.setSelectionRange(selectionStart, selectionStart);\n // reset to undefined, so the next selectionStart will trigger the useLayoutEffect\n // even if it is the same as the previous selectionStart that was set. This is\n // because we are only setting selectionStart for alt+enter.\n setSelectionStart(undefined);\n }\n }, [selectionStart, textAreaRef]);\n\n return { handleKeyDown };\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,IAAI,GAAG,MAAK,GAAG,CAAC;AAEhB,SAAU,gBAAgB,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,CAAC,EAAE,OAAO,EAAS,EAAA;AAC7E,IAAA,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,EAAE,CAAC;;AAE5C,IAAA,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,KAAY,KAAK,KAAK,CAAC,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5E,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC;IACrD,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;AACjD,IAAA,QACEA,GAAK,CAAA,KAAA,EAAA,EAA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