@oracle/oraclejet-preact 17.1.5 → 17.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (653) hide show
  1. package/amd/ActionCard-01322111.js +1 -1
  2. package/amd/BarChart-b75423c1.js +1 -1
  3. package/amd/BaseButton-51e50f77.js +1 -1
  4. package/amd/BaseCardView-c5624c8a.js +1 -1
  5. package/amd/{BaseCardViewSelectionTest-b80dd91b.js → BaseCardViewSelectionTest-9627e4ab.js} +2 -2
  6. package/amd/{BaseCardViewSelectionTest-b80dd91b.js.map → BaseCardViewSelectionTest-9627e4ab.js.map} +1 -1
  7. package/amd/BaseNavigationListItem-368284be.js +1 -1
  8. package/amd/ButtonSet-c389d5c7.js +1 -1
  9. package/amd/ButtonSetIconButton-141a8745.js +1 -1
  10. package/amd/{Center-9ec5524e.js → Center-b449a95c.js} +2 -2
  11. package/amd/{Center-9ec5524e.js.map → Center-b449a95c.js.map} +1 -1
  12. package/amd/Chart-96ea9fed.js +1 -1
  13. package/amd/CheckboxControl-74a7fead.js +1 -1
  14. package/amd/CheckboxRadioField-005a110c.js +1 -1
  15. package/amd/CheckboxSetContext-2e486ea8.js +2 -0
  16. package/amd/CheckboxSetContext-2e486ea8.js.map +1 -0
  17. package/amd/Chip-3062b3d3.js +1 -1
  18. package/amd/ClearIcon-c13664cd.js +1 -1
  19. package/amd/CollapseIcon-38899da0.js +1 -1
  20. package/amd/Collapsible-ba4eef8f.js +1 -1
  21. package/amd/CompactHelpSource-be790e15.js +1 -1
  22. package/amd/CompactLabelAssistance-7db2fde2.js +2 -0
  23. package/amd/{CompactLabelAssistance-bc14e060.js.map → CompactLabelAssistance-7db2fde2.js.map} +1 -1
  24. package/amd/CompactUserAssistance-a7b3ffc0.js +1 -1
  25. package/amd/ComponentMessageContainer-3b691959.js +1 -1
  26. package/amd/ConveyorBeltItem-bc128f62.js +1 -1
  27. package/amd/{DatePicker-dd358026.js → DatePicker-d7802b3e.js} +2 -2
  28. package/amd/{DatePicker-dd358026.js.map → DatePicker-d7802b3e.js.map} +1 -1
  29. package/amd/DatePickerHeader-c03ca6b4.js +1 -1
  30. package/amd/{Diagram-1b48168a.js → Diagram-14fd94c3.js} +2 -2
  31. package/amd/{Diagram-1b48168a.js.map → Diagram-14fd94c3.js.map} +1 -1
  32. package/amd/{Dialog-c34f9e89.js → Dialog-f6da299c.js} +2 -2
  33. package/amd/{Dialog-c34f9e89.js.map → Dialog-f6da299c.js.map} +1 -1
  34. package/amd/DirectionalCollapseArrowIcon-1c72e459.js +1 -1
  35. package/amd/DirectionalExpandArrowIcon-198cec2b.js +1 -1
  36. package/amd/DragHandle-e4959d2b.js +1 -1
  37. package/amd/{Dropdown-b36aa071.js → Dropdown-5f68516d.js} +2 -2
  38. package/amd/{Dropdown-b36aa071.js.map → Dropdown-5f68516d.js.map} +1 -1
  39. package/amd/{EnvironmentProvider-c0e1e39b.js → EnvironmentProvider-8f6fc388.js} +2 -2
  40. package/amd/{EnvironmentProvider-c0e1e39b.js.map → EnvironmentProvider-8f6fc388.js.map} +1 -1
  41. package/amd/FilePicker-e13f405f.js +1 -1
  42. package/amd/Flex-56ecdf4c.js +2 -0
  43. package/amd/{Flex-3421f0df.js.map → Flex-56ecdf4c.js.map} +1 -1
  44. package/amd/{Floating-25e0092b.js → Floating-a658b79c.js} +2 -2
  45. package/amd/{Floating-25e0092b.js.map → Floating-a658b79c.js.map} +1 -1
  46. package/amd/FormLayout-c6f1fdff.js +1 -1
  47. package/amd/Gantt-7be8d8bc.js +1 -1
  48. package/amd/{Grid-8911aa0f.js → Grid-160f4885.js} +2 -2
  49. package/amd/{Grid-8911aa0f.js.map → Grid-160f4885.js.map} +1 -1
  50. package/amd/{Gridlines-071ff524.js → Gridlines-b1d59999.js} +2 -2
  51. package/amd/{Gridlines-071ff524.js.map → Gridlines-b1d59999.js.map} +1 -1
  52. package/amd/GroupLoadingIndicator-cd9192c9.js +1 -1
  53. package/amd/HighlightText-bd4c0101.js +2 -0
  54. package/amd/{HighlightText-644bc74e.js.map → HighlightText-bd4c0101.js.map} +1 -1
  55. package/amd/Icon-2d805acb.js +1 -1
  56. package/amd/IconButton-81c8463f.js +1 -1
  57. package/amd/IconMenuButton-3e3db121.js +1 -1
  58. package/amd/IconProgressButton-04979469.js +1 -1
  59. package/amd/IconSwitchButton-bc007cbd.js +1 -1
  60. package/amd/IconToggleButton-28960894.js +1 -1
  61. package/amd/{IconUserAssistance-dda606e6.js → IconUserAssistance-2f809060.js} +2 -2
  62. package/amd/{IconUserAssistance-dda606e6.js.map → IconUserAssistance-2f809060.js.map} +1 -1
  63. package/amd/Indexer-74c989ce.js +1 -1
  64. package/amd/InlineHelpSource-85961e81.js +1 -1
  65. package/amd/InlineUserAssistance-2a480664.js +1 -1
  66. package/amd/InputDateMask-9aba967d.js +1 -1
  67. package/amd/InputDatePicker-6167ff45.js +1 -1
  68. package/amd/InputPassword-bf533999.js +1 -1
  69. package/amd/InputText-a4234d1f.js +1 -1
  70. package/amd/Label-a4172af7.js +1 -1
  71. package/amd/LabelValueLayout-194e64d9.js +1 -1
  72. package/amd/{Layer-e835aed8.js → Layer-276d62e8.js} +2 -2
  73. package/amd/{Layer-e835aed8.js.map → Layer-276d62e8.js.map} +1 -1
  74. package/amd/{LayerHost-639b3284.js → LayerHost-e95c5f30.js} +2 -2
  75. package/amd/{LayerHost-639b3284.js.map → LayerHost-e95c5f30.js.map} +1 -1
  76. package/amd/{LayerManager-2972de92.js → LayerManager-76fcfb58.js} +2 -2
  77. package/amd/{LayerManager-2972de92.js.map → LayerManager-76fcfb58.js.map} +1 -1
  78. package/amd/Legend-cd2f78b2.js +1 -1
  79. package/amd/{LineAreaChart-2d79c161.js → LineAreaChart-47b01e9e.js} +2 -2
  80. package/amd/{LineAreaChart-2d79c161.js.map → LineAreaChart-47b01e9e.js.map} +1 -1
  81. package/amd/Link-cb232696.js +1 -1
  82. package/amd/List-61d64cd6.js +1 -1
  83. package/amd/{ListItemLayout-1d8f166a.js → ListItemLayout-90873fb8.js} +2 -2
  84. package/amd/{ListItemLayout-1d8f166a.js.map → ListItemLayout-90873fb8.js.map} +1 -1
  85. package/amd/ListView-a49e52c3.js +1 -1
  86. package/amd/LiveRegion-8142ed0d.js +2 -0
  87. package/amd/{LiveRegion-9a362373.js.map → LiveRegion-8142ed0d.js.map} +1 -1
  88. package/amd/MaxLengthLiveRegion-8954fc30.js +2 -0
  89. package/amd/{MaxLengthLiveRegion-bb956138.js.map → MaxLengthLiveRegion-8954fc30.js.map} +1 -1
  90. package/amd/{Menu-e682ccb9.js → Menu-8f3a1e8c.js} +2 -2
  91. package/amd/{Menu-e682ccb9.js.map → Menu-8f3a1e8c.js.map} +1 -1
  92. package/amd/MenuButton-e4d7ec34.js +1 -1
  93. package/amd/MenuItem-44b2547b.js +1 -1
  94. package/amd/Message-1b166e4f.js +1 -1
  95. package/amd/{MessageLayer-3742e608.js → MessageLayer-cf9265e0.js} +2 -2
  96. package/amd/{MessageLayer-3742e608.js.map → MessageLayer-cf9265e0.js.map} +1 -1
  97. package/amd/MessageToast-7aba4a66.js +1 -1
  98. package/amd/MessagesManager-d6d43884.js +1 -1
  99. package/amd/MeterBar-90569d10.js +1 -1
  100. package/amd/MeterCircle-b14ff590.js +1 -1
  101. package/amd/{Modal-2b6ce101.js → Modal-36acfc12.js} +2 -2
  102. package/amd/{Modal-2b6ce101.js.map → Modal-36acfc12.js.map} +1 -1
  103. package/amd/{MonthView-8a1fde80.js → MonthView-ac27389f.js} +2 -2
  104. package/amd/{MonthView-8a1fde80.js.map → MonthView-ac27389f.js.map} +1 -1
  105. package/amd/NavigationListItem-1742f912.js +1 -1
  106. package/amd/NumberInputText-83ba7a58.js +1 -1
  107. package/amd/OverflowTabBarItem-4c4b75e0.js +1 -1
  108. package/amd/PRIVATE_BaseCardView.js +1 -1
  109. package/amd/PRIVATE_Chart.js +1 -1
  110. package/amd/PRIVATE_CheckboxControl.js +1 -1
  111. package/amd/PRIVATE_CheckboxRadioField.js +1 -1
  112. package/amd/PRIVATE_ClearIcon.js +1 -1
  113. package/amd/PRIVATE_DatePickerHeader.js +1 -1
  114. package/amd/PRIVATE_DatePickerLayout.js +1 -1
  115. package/amd/PRIVATE_EmbeddedIconButton.js +1 -1
  116. package/amd/PRIVATE_FormControls.js +1 -1
  117. package/amd/PRIVATE_IconSwitchButton.js +1 -1
  118. package/amd/PRIVATE_Icons/CheckboxMixed.js +1 -1
  119. package/amd/PRIVATE_Icons/CheckboxOff.js +1 -1
  120. package/amd/PRIVATE_Icons/CheckboxOn.js +1 -1
  121. package/amd/PRIVATE_Icons/RadiobuttonOff.js +1 -1
  122. package/amd/PRIVATE_Icons/RadiobuttonOn.js +1 -1
  123. package/amd/PRIVATE_Icons/WarningS.js +1 -1
  124. package/amd/PRIVATE_List.js +1 -1
  125. package/amd/PRIVATE_Message.js +1 -1
  126. package/amd/PRIVATE_MessageLayer.js +1 -1
  127. package/amd/PRIVATE_MonthView.js +1 -1
  128. package/amd/PRIVATE_MonthYearGridView.js +1 -1
  129. package/amd/PRIVATE_PlotArea.js +1 -1
  130. package/amd/PRIVATE_RevealToggleIcon.js +1 -1
  131. package/amd/PRIVATE_SelectCommon.js +1 -1
  132. package/amd/PRIVATE_StyledCheckbox.js +1 -1
  133. package/amd/PRIVATE_Table.js +1 -1
  134. package/amd/PRIVATE_ThemedIcons/CalendarIcon.js +1 -1
  135. package/amd/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +1 -1
  136. package/amd/PRIVATE_ThemedIcons/ChartPanIcon.js +1 -1
  137. package/amd/PRIVATE_ThemedIcons/ChartZoomIcon.js +1 -1
  138. package/amd/PRIVATE_ThemedIcons/CheckIcon.js +1 -1
  139. package/amd/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +1 -1
  140. package/amd/PRIVATE_ThemedIcons/CheckboxOffIcon.js +1 -1
  141. package/amd/PRIVATE_ThemedIcons/CheckboxOnIcon.js +1 -1
  142. package/amd/PRIVATE_ThemedIcons/CloseIcon.js +1 -1
  143. package/amd/PRIVATE_ThemedIcons/CollapseIcon.js +1 -1
  144. package/amd/PRIVATE_ThemedIcons/CollapseUpIcon.js +1 -1
  145. package/amd/PRIVATE_ThemedIcons/DecrementIcon.js +1 -1
  146. package/amd/PRIVATE_ThemedIcons/DeleteIcon.js +1 -1
  147. package/amd/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +1 -1
  148. package/amd/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +1 -1
  149. package/amd/PRIVATE_ThemedIcons/DropdownArrowIcon.js +1 -1
  150. package/amd/PRIVATE_ThemedIcons/ExpandIcon.js +1 -1
  151. package/amd/PRIVATE_ThemedIcons/HelpIcon.js +1 -1
  152. package/amd/PRIVATE_ThemedIcons/IncrementIcon.js +1 -1
  153. package/amd/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +1 -1
  154. package/amd/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +1 -1
  155. package/amd/PRIVATE_ThemedIcons/MessageErrorIcon.js +1 -1
  156. package/amd/PRIVATE_ThemedIcons/MessageInfoIcon.js +1 -1
  157. package/amd/PRIVATE_ThemedIcons/MessageWarningIcon.js +1 -1
  158. package/amd/PRIVATE_ThemedIcons/MinusIcon.js +1 -1
  159. package/amd/PRIVATE_ThemedIcons/NavDownIcon.js +1 -1
  160. package/amd/PRIVATE_ThemedIcons/PlusIcon.js +1 -1
  161. package/amd/PRIVATE_ThemedIcons/RadioOffIcon.js +1 -1
  162. package/amd/PRIVATE_ThemedIcons/RadioOnIcon.js +1 -1
  163. package/amd/PRIVATE_ThemedIcons/SortAscendingIcon.js +1 -1
  164. package/amd/PRIVATE_ThemedIcons/SortDefaultIcon.js +1 -1
  165. package/amd/PRIVATE_ThemedIcons/SortDescendingIcon.js +1 -1
  166. package/amd/PRIVATE_ThemedIcons/ViewHideIcon.js +1 -1
  167. package/amd/PRIVATE_ThemedIcons/ViewIcon.js +1 -1
  168. package/amd/PRIVATE_TimeComponent.js +1 -1
  169. package/amd/PRIVATE_VisTabularDatatip.js +1 -1
  170. package/amd/PictoChart-98b54953.js +1 -1
  171. package/amd/{PieChart-45cc3798.js → PieChart-cbe2806f.js} +2 -2
  172. package/amd/{PieChart-45cc3798.js.map → PieChart-cbe2806f.js.map} +1 -1
  173. package/amd/{Popup-059eb48a.js → Popup-956e6d7d.js} +2 -2
  174. package/amd/{Popup-059eb48a.js.map → Popup-956e6d7d.js.map} +1 -1
  175. package/amd/{ProgressBar-479b35e5.js → ProgressBar-d7cfdb63.js} +2 -2
  176. package/amd/{ProgressBar-479b35e5.js.map → ProgressBar-d7cfdb63.js.map} +1 -1
  177. package/amd/ProgressButton-c98e276b.js +1 -1
  178. package/amd/ProgressButtonLabelLayout-3a78ba61.js +1 -1
  179. package/amd/{ProgressCircle-365c4568.js → ProgressCircle-1e4cefde.js} +2 -2
  180. package/amd/{ProgressCircle-365c4568.js.map → ProgressCircle-1e4cefde.js.map} +1 -1
  181. package/amd/RadioItem-ce699d94.js +1 -1
  182. package/amd/RatingGauge-138a7d8b.js +1 -1
  183. package/amd/ReadonlyTextFieldInput-608bddc1.js +1 -1
  184. package/amd/RemovableNavigationListItem-dd14305f.js +1 -1
  185. package/amd/RemovableTabBarItem-6a25d890.js +1 -1
  186. package/amd/ReorderableTabBar-e40ffae9.js +1 -1
  187. package/amd/RevealToggleIcon-c5b17f49.js +1 -1
  188. package/amd/SectionalLegend-5d4afed4.js +1 -1
  189. package/amd/SectionedContent-6031f8f7.js +2 -0
  190. package/amd/{SectionedContent-2b89af7b.js.map → SectionedContent-6031f8f7.js.map} +1 -1
  191. package/amd/SelectMultiple-1ff92cc3.js +1 -1
  192. package/amd/SelectSingle-641a4cac.js +1 -1
  193. package/amd/{SelectionCard-3973de1b.js → SelectionCard-062e1c6f.js} +2 -2
  194. package/amd/{SelectionCard-3973de1b.js.map → SelectionCard-062e1c6f.js.map} +1 -1
  195. package/amd/Selector-039f7481.js +1 -1
  196. package/amd/SelectorAll-53efae22.js +2 -0
  197. package/amd/{SelectorAll-7288e923.js.map → SelectorAll-53efae22.js.map} +1 -1
  198. package/amd/{Sheet-c6fc15b2.js → Sheet-e6308643.js} +2 -2
  199. package/amd/{Sheet-c6fc15b2.js.map → Sheet-e6308643.js.map} +1 -1
  200. package/amd/SplitMenuButton-09d7b66f.js +1 -1
  201. package/amd/StyledTextField-a51060bb.js +1 -1
  202. package/amd/Submenu-8cb31b61.js +1 -1
  203. package/amd/TabBar-1c002b5b.js +1 -1
  204. package/amd/TabBarItem-16383a92.js +1 -1
  205. package/amd/TabBarLayout-685ac295.js +1 -1
  206. package/amd/TabBarMixed-4e0326f5.js +1 -1
  207. package/amd/TabBarMixedSeparator-8c278254.js +2 -0
  208. package/amd/{TabBarMixedSeparator-ed764207.js.map → TabBarMixedSeparator-8c278254.js.map} +1 -1
  209. package/amd/Table-986ae70c.js +1 -1
  210. package/amd/TagCloud-58b4a81b.js +1 -1
  211. package/amd/TextArea-259d741c.js +1 -1
  212. package/amd/TextAreaAutosize-e8dc13b4.js +1 -1
  213. package/amd/TextField-51daf13e.js +1 -1
  214. package/amd/TextFieldInput-d6645f5b.js +1 -1
  215. package/amd/Theme-redwood/theme.css +221 -221
  216. package/amd/Theme-stable/theme.css +183 -183
  217. package/amd/TimeComponentCanvas2D-2f1cede4.js +1 -1
  218. package/amd/Toolbar-e84c90ac.js +1 -1
  219. package/amd/{TruncatingBadge-b6a271ea.js → TruncatingBadge-5b720ad3.js} +2 -2
  220. package/amd/{TruncatingBadge-b6a271ea.js.map → TruncatingBadge-5b720ad3.js.map} +1 -1
  221. package/amd/TruncatingText-17a6d4b6.js +2 -0
  222. package/amd/{TruncatingText-e1aceee7.js.map → TruncatingText-17a6d4b6.js.map} +1 -1
  223. package/amd/UNSAFE_ActionCard.js +1 -1
  224. package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
  225. package/amd/UNSAFE_BarChart.js +1 -1
  226. package/amd/UNSAFE_BaseButton.js +1 -1
  227. package/amd/UNSAFE_Button.js +1 -1
  228. package/amd/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +1 -1
  229. package/amd/UNSAFE_ButtonSet.js +1 -1
  230. package/amd/UNSAFE_ButtonSetButton.js +1 -1
  231. package/amd/UNSAFE_ButtonSetIconButton.js +1 -1
  232. package/amd/UNSAFE_ButtonSetItem.js +1 -1
  233. package/amd/UNSAFE_ButtonSetMultiple.js +1 -1
  234. package/amd/UNSAFE_ButtonSetSingle.js +1 -1
  235. package/amd/UNSAFE_CardFlexView.js +1 -1
  236. package/amd/UNSAFE_CardGridView.js +1 -1
  237. package/amd/UNSAFE_Center.js +1 -1
  238. package/amd/UNSAFE_ChartWithLegend.js +1 -1
  239. package/amd/UNSAFE_Checkbox.js +1 -1
  240. package/amd/UNSAFE_CheckboxItem.js +1 -1
  241. package/amd/UNSAFE_CheckboxItem.js.map +1 -1
  242. package/amd/UNSAFE_CheckboxSet.js +1 -1
  243. package/amd/UNSAFE_CheckboxSet.js.map +1 -1
  244. package/amd/UNSAFE_Chip.js +1 -1
  245. package/amd/UNSAFE_Collapsible.js +1 -1
  246. package/amd/UNSAFE_ComponentMessage.js +1 -1
  247. package/amd/UNSAFE_ConveyorBelt.js +1 -1
  248. package/amd/UNSAFE_DatePicker.js +1 -1
  249. package/amd/UNSAFE_Diagram.js +1 -1
  250. package/amd/UNSAFE_Dialog.js +1 -1
  251. package/amd/UNSAFE_DragHandle.js +1 -1
  252. package/amd/UNSAFE_DrawerLayout.js +1 -1
  253. package/amd/UNSAFE_DrawerPopup.js +1 -1
  254. package/amd/UNSAFE_Dropdown.js +1 -1
  255. package/amd/UNSAFE_Environment.js +1 -1
  256. package/amd/UNSAFE_ExpandableList.js +1 -1
  257. package/amd/UNSAFE_FilePicker.js +1 -1
  258. package/amd/UNSAFE_Flex.js +1 -1
  259. package/amd/UNSAFE_Floating.js +1 -1
  260. package/amd/UNSAFE_FormLayout.js +1 -1
  261. package/amd/UNSAFE_Gantt.js +1 -1
  262. package/amd/UNSAFE_Grid.js +1 -1
  263. package/amd/UNSAFE_HighlightText.js +1 -1
  264. package/amd/UNSAFE_Icon.js +1 -1
  265. package/amd/UNSAFE_IconButton.js +1 -1
  266. package/amd/UNSAFE_IconMenuButton.js +1 -1
  267. package/amd/UNSAFE_IconProgressButton.js +1 -1
  268. package/amd/UNSAFE_IconToggleButton.js +1 -1
  269. package/amd/UNSAFE_Indexer.js +1 -1
  270. package/amd/UNSAFE_InputDateMask.js +1 -1
  271. package/amd/UNSAFE_InputDatePicker.js +1 -1
  272. package/amd/UNSAFE_InputPassword.js +1 -1
  273. package/amd/UNSAFE_InputSensitiveText.js +1 -1
  274. package/amd/UNSAFE_InputText.js +1 -1
  275. package/amd/UNSAFE_Label.js +1 -1
  276. package/amd/UNSAFE_LabelValueLayout.js +1 -1
  277. package/amd/UNSAFE_LabelledLink.js +1 -1
  278. package/amd/UNSAFE_Layer.js +1 -1
  279. package/amd/UNSAFE_Legend.js +1 -1
  280. package/amd/UNSAFE_LineAreaChart/__test__/LineChart.spec.js +1 -1
  281. package/amd/UNSAFE_LineAreaChart.js +1 -1
  282. package/amd/UNSAFE_Link.js +1 -1
  283. package/amd/UNSAFE_ListItemLayout.js +1 -1
  284. package/amd/UNSAFE_ListView.js +1 -1
  285. package/amd/UNSAFE_LiveRegion.js +1 -1
  286. package/amd/UNSAFE_Menu.js +1 -1
  287. package/amd/UNSAFE_MenuButton.js +1 -1
  288. package/amd/UNSAFE_MessageBanner.js +1 -1
  289. package/amd/UNSAFE_MessageToast.js +1 -1
  290. package/amd/UNSAFE_MeterBar.js +1 -1
  291. package/amd/UNSAFE_MeterCircle.js +1 -1
  292. package/amd/UNSAFE_Modal.js +1 -1
  293. package/amd/UNSAFE_NavigationList.js +1 -1
  294. package/amd/UNSAFE_NavigationListCommon.js +1 -1
  295. package/amd/UNSAFE_NumberInputText.js +1 -1
  296. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  297. package/amd/UNSAFE_PictoChart.js +1 -1
  298. package/amd/UNSAFE_PieChart/__test__/PieChart.spec.js +1 -1
  299. package/amd/UNSAFE_PieChart.js +1 -1
  300. package/amd/UNSAFE_Popup.js +1 -1
  301. package/amd/UNSAFE_ProgressBar.js +1 -1
  302. package/amd/UNSAFE_ProgressButton.js +1 -1
  303. package/amd/UNSAFE_ProgressButtonLabelLayout.js +1 -1
  304. package/amd/UNSAFE_ProgressCircle.js +1 -1
  305. package/amd/UNSAFE_RadioItem.js +1 -1
  306. package/amd/UNSAFE_RadioSet.js +1 -1
  307. package/amd/UNSAFE_RatingGauge.js +1 -1
  308. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  309. package/amd/UNSAFE_SectionalLegend.js +1 -1
  310. package/amd/UNSAFE_SelectMultiple.js +1 -1
  311. package/amd/UNSAFE_SelectSingle.js +1 -1
  312. package/amd/UNSAFE_SelectionCard.js +1 -1
  313. package/amd/UNSAFE_Selector.js +1 -1
  314. package/amd/UNSAFE_SelectorAll.js +1 -1
  315. package/amd/UNSAFE_Sheet/__test__/Sheet.spec.js +1 -1
  316. package/amd/UNSAFE_Sheet.js +1 -1
  317. package/amd/UNSAFE_SplitMenuButton.js +1 -1
  318. package/amd/UNSAFE_TabBar.js +1 -1
  319. package/amd/UNSAFE_TabBarCommon.js +1 -1
  320. package/amd/UNSAFE_TabBarMixed.js +1 -1
  321. package/amd/UNSAFE_TableView.js +1 -1
  322. package/amd/UNSAFE_TagCloud.js +1 -1
  323. package/amd/UNSAFE_TextArea.js +1 -1
  324. package/amd/UNSAFE_TextAreaAutosize.js +1 -1
  325. package/amd/UNSAFE_TextField.js +1 -1
  326. package/amd/UNSAFE_ToggleButton.js +1 -1
  327. package/amd/UNSAFE_Toolbar/tests/Toolbar.spec.js +1 -1
  328. package/amd/UNSAFE_Toolbar.js +1 -1
  329. package/amd/UNSAFE_Train.js +1 -1
  330. package/amd/UNSAFE_TruncatingBadge.js +1 -1
  331. package/amd/UNSAFE_TruncatingText.js +1 -1
  332. package/amd/UNSAFE_UserAssistance.js +1 -1
  333. package/amd/UNSAFE_View.js +1 -1
  334. package/amd/UNSAFE_VirtualizedListView.js +1 -1
  335. package/amd/UNSAFE_VisProgressiveLoader/__test__/VisProgressiveLoader.spec.js +1 -1
  336. package/amd/UNSAFE_VisProgressiveLoader.js +1 -1
  337. package/amd/UNSAFE_VisStatusMessage.js +1 -1
  338. package/amd/UNSAFE_WindowOverlay.js +1 -1
  339. package/amd/{View-bd5c7fa7.js → View-ce970ed7.js} +2 -2
  340. package/amd/{View-bd5c7fa7.js.map → View-ce970ed7.js.map} +1 -1
  341. package/amd/{VisNoData-ed2bd5cf.js → VisNoData-7d5f77c3.js} +2 -2
  342. package/amd/{VisNoData-ed2bd5cf.js.map → VisNoData-7d5f77c3.js.map} +1 -1
  343. package/amd/{VisProgressiveLoader-06a60c8f.js → VisProgressiveLoader-68d8d8b3.js} +2 -2
  344. package/amd/{VisProgressiveLoader-06a60c8f.js.map → VisProgressiveLoader-68d8d8b3.js.map} +1 -1
  345. package/amd/{VisTabularDatatip-55bbd19f.js → VisTabularDatatip-1051eaca.js} +2 -2
  346. package/amd/{VisTabularDatatip-55bbd19f.js.map → VisTabularDatatip-1051eaca.js.map} +1 -1
  347. package/amd/{WindowOverlay-43c10424.js → WindowOverlay-a2d80d55.js} +2 -2
  348. package/amd/{WindowOverlay-43c10424.js.map → WindowOverlay-a2d80d55.js.map} +1 -1
  349. package/amd/{YearsGridView-ddc90c36.js → YearsGridView-e758c73a.js} +2 -2
  350. package/amd/{YearsGridView-ddc90c36.js.map → YearsGridView-e758c73a.js.map} +1 -1
  351. package/amd/hoc/PRIVATE_withDirectionIcon.js +1 -1
  352. package/amd/hoc/PRIVATE_withThemeIcon.js +1 -1
  353. package/amd/hoc/UNSAFE_withThemeProps.js +1 -1
  354. package/amd/hooks/PRIVATE_useChartContextMenu.js +1 -1
  355. package/amd/hooks/PRIVATE_useChartDatatip.js +1 -1
  356. package/amd/hooks/PRIVATE_useChartEvents.js +1 -1
  357. package/amd/hooks/PRIVATE_useChartMarquee.js +1 -1
  358. package/amd/hooks/PRIVATE_useCssVars.js +1 -1
  359. package/amd/hooks/PRIVATE_useCurrentKey.js +1 -1
  360. package/amd/hooks/PRIVATE_useDatatip.js +1 -1
  361. package/amd/hooks/PRIVATE_useFloating.js +1 -1
  362. package/amd/hooks/PRIVATE_useReorderable.js +1 -1
  363. package/amd/hooks/PRIVATE_useRovingTabIndexContainer.js +1 -1
  364. package/amd/hooks/PRIVATE_useSelection.js +1 -1
  365. package/amd/hooks/PRIVATE_useTabBar.js +1 -1
  366. package/amd/hooks/PRIVATE_useVisContextMenu.js +1 -1
  367. package/amd/hooks/PRIVATE_useVisEvents.js +1 -1
  368. package/amd/hooks/PRIVATE_useVisMeterEvents.js +1 -1
  369. package/amd/hooks/PRIVATE_useVisSelection.js +1 -1
  370. package/amd/hooks/UNSAFE_useColorScheme.js +1 -1
  371. package/amd/hooks/UNSAFE_useCurrentBgColor.js +1 -1
  372. package/amd/hooks/UNSAFE_useDensity.js +1 -1
  373. package/amd/hooks/UNSAFE_useOutsideClick.js +1 -1
  374. package/amd/hooks/UNSAFE_usePrefixSuffix.js +1 -1
  375. package/amd/hooks/UNSAFE_useScale.js +1 -1
  376. package/amd/hooks/UNSAFE_useTestId.js +1 -1
  377. package/amd/hooks/UNSAFE_useTheme.js +1 -1
  378. package/amd/hooks/UNSAFE_useThemeInterpolations.js +1 -1
  379. package/amd/hooks/UNSAFE_useTooltip.js +1 -1
  380. package/amd/hooks/UNSAFE_useTranslationBundle.js +1 -1
  381. package/amd/hooks/UNSAFE_useUser.js +1 -1
  382. package/amd/{index-a444ef75.js → index-735cad6d.js} +2 -2
  383. package/amd/index-735cad6d.js.map +1 -0
  384. package/amd/listViewSelectionTests-a8209843.js +1 -1
  385. package/amd/render-4250c759.js +2 -0
  386. package/amd/{render-a1ae323f.js.map → render-4250c759.js.map} +1 -1
  387. package/amd/{tabbableUtils-f5e521c8.js → tabbableUtils-9887f50b.js} +2 -2
  388. package/amd/{tabbableUtils-f5e521c8.js.map → tabbableUtils-9887f50b.js.map} +1 -1
  389. package/amd/{testData-b22c8f34.js → testData-71364772.js} +2 -2
  390. package/amd/{testData-b22c8f34.js.map → testData-71364772.js.map} +1 -1
  391. package/amd/tooltipUtils-3b34c2bc.js +2 -0
  392. package/amd/{tooltipUtils-79293e46.js.map → tooltipUtils-3b34c2bc.js.map} +1 -1
  393. package/amd/useCellNavigation-1feec094.js +1 -1
  394. package/amd/useChartContextMenu-673e3de0.js +1 -1
  395. package/amd/{useChartDatatip-04fa72c7.js → useChartDatatip-c702890c.js} +2 -2
  396. package/amd/{useChartDatatip-04fa72c7.js.map → useChartDatatip-c702890c.js.map} +1 -1
  397. package/amd/useChartMarquee-62e7676c.js +1 -1
  398. package/amd/{useColorScheme-443e7cc7.js → useColorScheme-10dc88de.js} +2 -2
  399. package/amd/{useColorScheme-443e7cc7.js.map → useColorScheme-10dc88de.js.map} +1 -1
  400. package/amd/useContextMenu-57f18e97.js +1 -1
  401. package/amd/{useCssVars-dc52806c.js → useCssVars-c043f8da.js} +2 -2
  402. package/amd/{useCssVars-dc52806c.js.map → useCssVars-c043f8da.js.map} +1 -1
  403. package/amd/{useCurrentBgColor-50142bd8.js → useCurrentBgColor-2426ee24.js} +2 -2
  404. package/amd/{useCurrentBgColor-50142bd8.js.map → useCurrentBgColor-2426ee24.js.map} +1 -1
  405. package/amd/useCurrentKey-1d869ff4.js +2 -0
  406. package/amd/{useCurrentKey-db6f418a.js.map → useCurrentKey-1d869ff4.js.map} +1 -1
  407. package/amd/{useDatatip-748e233f.js → useDatatip-87792500.js} +2 -2
  408. package/amd/{useDatatip-748e233f.js.map → useDatatip-87792500.js.map} +1 -1
  409. package/amd/{useDensity-f0f7ae9a.js → useDensity-c83df7b4.js} +2 -2
  410. package/amd/{useDensity-f0f7ae9a.js.map → useDensity-c83df7b4.js.map} +1 -1
  411. package/amd/{useFloating-a2399a51.js → useFloating-8726c4bb.js} +2 -2
  412. package/amd/{useFloating-a2399a51.js.map → useFloating-8726c4bb.js.map} +1 -1
  413. package/amd/useKeyboardEvents-d87e3587.js +2 -0
  414. package/amd/{useKeyboardEvents-8ada7a1f.js.map → useKeyboardEvents-d87e3587.js.map} +1 -1
  415. package/amd/useLegendContextMenu-09c7a5a9.js +1 -1
  416. package/amd/useMeterDatatip-3abdf66a.js +2 -0
  417. package/amd/{useMeterDatatip-3b5a5112.js.map → useMeterDatatip-3abdf66a.js.map} +1 -1
  418. package/amd/{useOutsideClick-476e0577.js → useOutsideClick-5c2a47be.js} +2 -2
  419. package/amd/{useOutsideClick-476e0577.js.map → useOutsideClick-5c2a47be.js.map} +1 -1
  420. package/amd/usePopupAnimation-916ff96d.js +2 -0
  421. package/amd/{usePopupAnimation-6445a247.js.map → usePopupAnimation-916ff96d.js.map} +1 -1
  422. package/amd/usePrefixSuffix-09bd5925.js +2 -0
  423. package/amd/{usePrefixSuffix-f7544e05.js.map → usePrefixSuffix-09bd5925.js.map} +1 -1
  424. package/amd/useReorderableItem-7fd4d629.js +1 -1
  425. package/amd/{useRovingTabIndexContainer-94cc3710.js → useRovingTabIndexContainer-05e87912.js} +2 -2
  426. package/amd/{useRovingTabIndexContainer-94cc3710.js.map → useRovingTabIndexContainer-05e87912.js.map} +1 -1
  427. package/amd/useScale-37d42c9d.js +2 -0
  428. package/amd/{useScale-e311d35f.js.map → useScale-37d42c9d.js.map} +1 -1
  429. package/amd/useSelectCommon-4e256cf0.js +1 -1
  430. package/amd/{useSelectDrill-65d98139.js → useSelectDrill-a7d833b6.js} +2 -2
  431. package/amd/{useSelectDrill-65d98139.js.map → useSelectDrill-a7d833b6.js.map} +1 -1
  432. package/amd/{useSelection-4d3a1ea8.js → useSelection-396ce75f.js} +2 -2
  433. package/amd/{useSelection-4d3a1ea8.js.map → useSelection-396ce75f.js.map} +1 -1
  434. package/amd/useSelection-e2791513.js +2 -0
  435. package/amd/{useSelection-a6fd13cf.js.map → useSelection-e2791513.js.map} +1 -1
  436. package/amd/{useTabBar-40842fb9.js → useTabBar-423a0c03.js} +2 -2
  437. package/amd/{useTabBar-40842fb9.js.map → useTabBar-423a0c03.js.map} +1 -1
  438. package/amd/{useTestId-b5cd4766.js → useTestId-3a316499.js} +2 -2
  439. package/amd/{useTestId-b5cd4766.js.map → useTestId-3a316499.js.map} +1 -1
  440. package/amd/{useTheme-a8334e06.js → useTheme-ac980f9a.js} +2 -2
  441. package/amd/{useTheme-a8334e06.js.map → useTheme-ac980f9a.js.map} +1 -1
  442. package/amd/useThemeInterpolations-b1d98ea4.js +2 -0
  443. package/amd/{useThemeInterpolations-e20f8cfa.js.map → useThemeInterpolations-b1d98ea4.js.map} +1 -1
  444. package/amd/useTooltip-6a5fedfa.js +2 -0
  445. package/amd/{useTooltip-e4089d1a.js.map → useTooltip-6a5fedfa.js.map} +1 -1
  446. package/amd/{useTooltipControlled-fafb2f01.js → useTooltipControlled-fb57eb02.js} +2 -2
  447. package/amd/{useTooltipControlled-fafb2f01.js.map → useTooltipControlled-fb57eb02.js.map} +1 -1
  448. package/amd/{useTranslationBundle-d07d4b20.js → useTranslationBundle-516b1b83.js} +2 -2
  449. package/amd/{useTranslationBundle-d07d4b20.js.map → useTranslationBundle-516b1b83.js.map} +1 -1
  450. package/amd/{useUser-3ef25571.js → useUser-85c781ea.js} +2 -2
  451. package/amd/{useUser-3ef25571.js.map → useUser-85c781ea.js.map} +1 -1
  452. package/amd/{useVisEvents-48144382.js → useVisEvents-954dcd88.js} +2 -2
  453. package/amd/{useVisEvents-48144382.js.map → useVisEvents-954dcd88.js.map} +1 -1
  454. package/amd/utils/PRIVATE_tooltipUtils.js +1 -1
  455. package/amd/utils/PRIVATE_visTestUtils.js +1 -1
  456. package/amd/{withDirectionIcon-74c39ee3.js → withDirectionIcon-ce0c7432.js} +2 -2
  457. package/amd/{withDirectionIcon-74c39ee3.js.map → withDirectionIcon-ce0c7432.js.map} +1 -1
  458. package/amd/withThemeProps-4c23997e.js +1 -1
  459. package/cjs/CheckboxSetContext-c62db26d.js +12 -0
  460. package/cjs/CheckboxSetContext-c62db26d.js.map +1 -0
  461. package/cjs/MaxLengthCounter-a5370f66.js +27 -0
  462. package/{es/MaxLengthCounter-cead2dac.js.map → cjs/MaxLengthCounter-a5370f66.js.map} +1 -1
  463. package/cjs/{NavigationListItem-d9228979.js → NavigationListItem-7550547a.js} +14 -1
  464. package/cjs/{NavigationListItem-d9228979.js.map → NavigationListItem-7550547a.js.map} +1 -1
  465. package/cjs/{OverflowTabBar-081cc41e.js → OverflowTabBar-76c75781.js} +2 -2
  466. package/cjs/{OverflowTabBar-081cc41e.js.map → OverflowTabBar-76c75781.js.map} +1 -1
  467. package/cjs/{OverflowTabBarItem-57899880.js → OverflowTabBarItem-76059bad.js} +2 -2
  468. package/cjs/{OverflowTabBarItem-57899880.js.map → OverflowTabBarItem-76059bad.js.map} +1 -1
  469. package/cjs/{TextArea-792069d7.js → TextArea-096f18ad.js} +4 -22
  470. package/{es/TextArea-6f18b955.js.map → cjs/TextArea-096f18ad.js.map} +1 -1
  471. package/cjs/{TextAreaAutosize-1989de68.js → TextAreaAutosize-4d30faec.js} +3 -3
  472. package/cjs/{TextAreaAutosize-1989de68.js.map → TextAreaAutosize-4d30faec.js.map} +1 -1
  473. package/cjs/Theme-redwood/theme.css +205 -205
  474. package/cjs/Theme-stable/theme.css +257 -257
  475. package/cjs/UNSAFE_CheckboxItem.js +30 -80
  476. package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
  477. package/cjs/UNSAFE_CheckboxSet.js +44 -15
  478. package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
  479. package/cjs/UNSAFE_NavigationList.js +4 -4
  480. package/cjs/UNSAFE_OverflowTabBar.js +3 -3
  481. package/cjs/UNSAFE_TabBar.js +2 -2
  482. package/cjs/UNSAFE_TabBarCommon.js +2 -2
  483. package/cjs/UNSAFE_TabBarMixed.js +2 -2
  484. package/cjs/UNSAFE_TextArea.js +4 -3
  485. package/cjs/UNSAFE_TextArea.js.map +1 -1
  486. package/cjs/UNSAFE_TextAreaAutosize.js +3 -3
  487. package/es/BadgeVariants.styles.css +14 -14
  488. package/es/BadgeVariants.styles2.css +14 -14
  489. package/es/BaseCardView-e0e8a69b.js +1 -1
  490. package/es/CollapsibleVariants.styles.css +3 -3
  491. package/es/CollapsibleVariants.styles2.css +3 -3
  492. package/es/ConveyorBeltVariants.styles.css +6 -6
  493. package/es/ConveyorBeltVariants.styles2.css +6 -6
  494. package/es/DrawerPopupVariants.styles.css +5 -5
  495. package/es/DrawerPopupVariants.styles2.css +5 -5
  496. package/es/LinkVariants.styles.css +14 -14
  497. package/es/LinkVariants.styles2.css +14 -14
  498. package/es/MessageBannerVariants.styles.css +2 -2
  499. package/es/MessageBannerVariants.styles2.css +2 -2
  500. package/es/NavigationListItemVariants.styles.css +5 -5
  501. package/es/NavigationListItemVariants.styles2.css +5 -5
  502. package/es/PRIVATE_BaseCardView/themes/redwood/BaseCardViewBaseTheme.css.js +1 -1
  503. package/es/PRIVATE_BaseCardView/themes/stable/BaseCardViewBaseTheme.css.js +1 -1
  504. package/es/PRIVATE_BaseCardView.js +1 -1
  505. package/es/PRIVATE_CheckboxControl.js +1 -1
  506. package/es/PRIVATE_CheckboxRadioField.js +2 -2
  507. package/es/PRIVATE_FormControls.js +1 -1
  508. package/es/PRIVATE_Message.js +1 -1
  509. package/es/PRIVATE_SelectCommon/themes/dropdownStyles.css.js +1 -1
  510. package/es/PRIVATE_SelectCommon.js +3 -3
  511. package/es/ProgressBarVariants.styles.css +1 -1
  512. package/es/ProgressBarVariants.styles2.css +1 -1
  513. package/es/ProgressCircleVariants.styles.css +4 -4
  514. package/es/ProgressCircleVariants.styles2.css +4 -4
  515. package/es/RadioIconVariants.styles.css +1 -1
  516. package/es/RadioIconVariants.styles2.css +1 -1
  517. package/es/SplitMenuButtonTheme.styles.css +4 -4
  518. package/es/SplitMenuButtonTheme.styles2.css +4 -4
  519. package/es/TabBar-90cea652.js +1 -1
  520. package/es/TabBarMixed-52ac388e.js +1 -1
  521. package/es/{TextArea-6f18b955.js → TextArea-ea6aaf32.js} +25 -8
  522. package/{cjs/TextArea-792069d7.js.map → es/TextArea-ea6aaf32.js.map} +1 -1
  523. package/es/{TextAreaAutosize-4cf2754b.js → TextAreaAutosize-edc7dde7.js} +2 -2
  524. package/es/{TextAreaAutosize-4cf2754b.js.map → TextAreaAutosize-edc7dde7.js.map} +1 -1
  525. package/es/TextFieldVariants.styles.css +29 -29
  526. package/es/TextFieldVariants.styles2.css +29 -29
  527. package/es/Theme-redwood/theme.css +1099 -1090
  528. package/es/Theme-stable/theme.css +485 -494
  529. package/es/UNSAFE_Badge/themes/redwood/BadgeTheme.js +1 -1
  530. package/es/UNSAFE_Badge/themes/redwood/BadgeVariants.css.js +1 -1
  531. package/es/UNSAFE_Badge/themes/stable/BadgeTheme.js +1 -1
  532. package/es/UNSAFE_Badge/themes/stable/BadgeVariants.css.js +1 -1
  533. package/es/UNSAFE_Badge.js +1 -1
  534. package/es/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +1 -1
  535. package/es/UNSAFE_CardFlexView.js +1 -1
  536. package/es/UNSAFE_CardGridView.js +1 -1
  537. package/es/UNSAFE_Checkbox.js +1 -1
  538. package/es/UNSAFE_CheckboxItem.js +1 -1
  539. package/es/UNSAFE_CheckboxSet.js +2 -2
  540. package/es/UNSAFE_Collapsible/themes/redwood/CollapsibleTheme.js +1 -1
  541. package/es/UNSAFE_Collapsible/themes/redwood/CollapsibleVariants.css.js +1 -1
  542. package/es/UNSAFE_Collapsible/themes/stable/CollapsibleTheme.js +1 -1
  543. package/es/UNSAFE_Collapsible/themes/stable/CollapsibleVariants.css.js +1 -1
  544. package/es/UNSAFE_Collapsible.js +1 -1
  545. package/es/UNSAFE_ComponentMessage.js +1 -1
  546. package/es/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltTheme.js +1 -1
  547. package/es/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltVariants.css.js +1 -1
  548. package/es/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltTheme.js +1 -1
  549. package/es/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltVariants.css.js +1 -1
  550. package/es/UNSAFE_ConveyorBelt.js +1 -1
  551. package/es/UNSAFE_DrawerPopup/themes/redwood/DrawerPopupTheme.js +1 -1
  552. package/es/UNSAFE_DrawerPopup/themes/redwood/DrawerPopupVariants.css.js +1 -1
  553. package/es/UNSAFE_DrawerPopup/themes/stable/DrawerPopupTheme.js +1 -1
  554. package/es/UNSAFE_DrawerPopup/themes/stable/DrawerPopupVariants.css.js +1 -1
  555. package/es/UNSAFE_DrawerPopup.js +1 -1
  556. package/es/UNSAFE_Dropdown/themes/dropdownStyles.css.js +1 -1
  557. package/es/UNSAFE_Dropdown.js +1 -1
  558. package/es/UNSAFE_IconProgressButton.js +1 -1
  559. package/es/UNSAFE_InputDateMask.js +2 -2
  560. package/es/UNSAFE_InputDatePicker.js +3 -3
  561. package/es/UNSAFE_InputPassword.js +2 -2
  562. package/es/UNSAFE_InputSensitiveText.js +2 -2
  563. package/es/UNSAFE_InputText.js +2 -2
  564. package/es/UNSAFE_Label.js +2 -2
  565. package/es/UNSAFE_LabelValueLayout.js +1 -1
  566. package/es/UNSAFE_LabelledLink.js +3 -3
  567. package/es/UNSAFE_Link/themes/redwood/LinkTheme.js +1 -1
  568. package/es/UNSAFE_Link/themes/redwood/LinkVariants.css.js +1 -1
  569. package/es/UNSAFE_Link/themes/stable/LinkTheme.js +1 -1
  570. package/es/UNSAFE_Link/themes/stable/LinkVariants.css.js +1 -1
  571. package/es/UNSAFE_Link.js +1 -1
  572. package/es/UNSAFE_MessageBanner/themes/redwood/MessageBannerTheme.js +1 -1
  573. package/es/UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css.js +1 -1
  574. package/es/UNSAFE_MessageBanner/themes/stable/MessageBannerTheme.js +1 -1
  575. package/es/UNSAFE_MessageBanner/themes/stable/MessageBannerVariants.css.js +1 -1
  576. package/es/UNSAFE_MessageBanner.js +1 -1
  577. package/es/UNSAFE_MessageToast.js +1 -1
  578. package/es/UNSAFE_NavigationList/themes/redwood/NavigationListItemVariants.css.js +1 -1
  579. package/es/UNSAFE_NavigationList/themes/stable/NavigationListItemTheme.js +1 -1
  580. package/es/UNSAFE_NavigationList/themes/stable/NavigationListItemVariants.css.js +1 -1
  581. package/es/UNSAFE_NavigationList.js +2 -2
  582. package/es/UNSAFE_NavigationListCommon/themes/redwood/NavigationListItemTheme.js +1 -1
  583. package/es/UNSAFE_NavigationListCommon.js +2 -2
  584. package/es/UNSAFE_NumberInputText.js +2 -2
  585. package/es/UNSAFE_OverflowTabBar.js +3 -3
  586. package/es/UNSAFE_ProgressBar/themes/redwood/ProgressBarTheme.js +1 -1
  587. package/es/UNSAFE_ProgressBar/themes/redwood/ProgressBarVariants.css.js +1 -1
  588. package/es/UNSAFE_ProgressBar/themes/stable/ProgressBarTheme.js +1 -1
  589. package/es/UNSAFE_ProgressBar/themes/stable/ProgressBarVariants.css.js +1 -1
  590. package/es/UNSAFE_ProgressBar.js +1 -1
  591. package/es/UNSAFE_ProgressButton.js +1 -1
  592. package/es/UNSAFE_ProgressButtonLabelLayout.js +1 -1
  593. package/es/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleTheme.js +1 -1
  594. package/es/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleVariants.css.js +1 -1
  595. package/es/UNSAFE_ProgressCircle/themes/stable/ProgressCircleTheme.js +1 -1
  596. package/es/UNSAFE_ProgressCircle/themes/stable/ProgressCircleVariants.css.js +1 -1
  597. package/es/UNSAFE_ProgressCircle.js +1 -1
  598. package/es/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js +1 -1
  599. package/es/UNSAFE_RadioItem/themes/redwood/RadioIconVariants.css.js +1 -1
  600. package/es/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js +1 -1
  601. package/es/UNSAFE_RadioItem/themes/stable/RadioIconVariants.css.js +1 -1
  602. package/es/UNSAFE_RadioItem.js +2 -2
  603. package/es/UNSAFE_RadioSet.js +2 -2
  604. package/es/UNSAFE_ReorderableTabBar.js +1 -1
  605. package/es/UNSAFE_SelectMultiple.js +4 -4
  606. package/es/UNSAFE_SelectSingle.js +4 -4
  607. package/es/UNSAFE_SplitMenuButton/themes/redwood/SplitMenuButtonTheme.css.js +1 -1
  608. package/es/UNSAFE_SplitMenuButton/themes/stable/SplitMenuButtonTheme.css.js +1 -1
  609. package/es/UNSAFE_SplitMenuButton.js +1 -1
  610. package/es/UNSAFE_TabBar.js +3 -3
  611. package/es/UNSAFE_TabBarCommon.js +3 -3
  612. package/es/UNSAFE_TabBarMixed.js +3 -3
  613. package/es/UNSAFE_TextArea.js +4 -5
  614. package/es/UNSAFE_TextArea.js.map +1 -1
  615. package/es/UNSAFE_TextAreaAutosize.js +5 -5
  616. package/es/UNSAFE_TextField/themes/redwood/TextFieldTheme.js +1 -1
  617. package/es/UNSAFE_TextField/themes/redwood/TextFieldVariants.css.js +1 -1
  618. package/es/UNSAFE_TextField/themes/stable/TextFieldTheme.js +1 -1
  619. package/es/UNSAFE_TextField/themes/stable/TextFieldVariants.css.js +1 -1
  620. package/es/UNSAFE_TextField.js +1 -1
  621. package/es/UNSAFE_Toolbar/tests/Toolbar.spec.js +1 -1
  622. package/es/UNSAFE_TruncatingBadge.js +1 -1
  623. package/es/UNSAFE_UserAssistance.js +1 -1
  624. package/es/dropdownStyles.styles.css +6 -90
  625. package/es/dropdownStyles.styles2.css +90 -6
  626. package/package.json +2 -2
  627. package/amd/CheckboxSet-e523552e.js +0 -2
  628. package/amd/CheckboxSet-e523552e.js.map +0 -1
  629. package/amd/CompactLabelAssistance-bc14e060.js +0 -2
  630. package/amd/Flex-3421f0df.js +0 -2
  631. package/amd/HighlightText-644bc74e.js +0 -2
  632. package/amd/LiveRegion-9a362373.js +0 -2
  633. package/amd/MaxLengthLiveRegion-bb956138.js +0 -2
  634. package/amd/SectionedContent-2b89af7b.js +0 -2
  635. package/amd/SelectorAll-7288e923.js +0 -2
  636. package/amd/TabBarMixedSeparator-ed764207.js +0 -2
  637. package/amd/TruncatingText-e1aceee7.js +0 -2
  638. package/amd/index-a444ef75.js.map +0 -1
  639. package/amd/render-a1ae323f.js +0 -2
  640. package/amd/tooltipUtils-79293e46.js +0 -2
  641. package/amd/useCurrentKey-db6f418a.js +0 -2
  642. package/amd/useKeyboardEvents-8ada7a1f.js +0 -2
  643. package/amd/useMeterDatatip-3b5a5112.js +0 -2
  644. package/amd/usePopupAnimation-6445a247.js +0 -2
  645. package/amd/usePrefixSuffix-f7544e05.js +0 -2
  646. package/amd/useScale-e311d35f.js +0 -2
  647. package/amd/useSelection-a6fd13cf.js +0 -2
  648. package/amd/useThemeInterpolations-e20f8cfa.js +0 -2
  649. package/amd/useTooltip-e4089d1a.js +0 -2
  650. package/cjs/CheckboxSet-368b907b.js +0 -53
  651. package/cjs/CheckboxSet-368b907b.js.map +0 -1
  652. package/es/MaxLengthCounter-cead2dac.js +0 -25
  653. /package/es/PRIVATE_BaseCardView/themes/{stable → redwood}/BaseCardViewBaseTheme.styles.css +0 -0
@@ -0,0 +1,12 @@
1
+ /* @oracle/oraclejet-preact: undefined */
2
+ 'use strict';
3
+
4
+ var preact = require('preact');
5
+ var hooks = require('preact/hooks');
6
+
7
+ const CheckboxSetContext = preact.createContext({});
8
+ const useCheckboxSetContext = () => hooks.useContext(CheckboxSetContext);
9
+
10
+ exports.CheckboxSetContext = CheckboxSetContext;
11
+ exports.useCheckboxSetContext = useCheckboxSetContext;
12
+ //# sourceMappingURL=CheckboxSetContext-c62db26d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxSetContext-c62db26d.js","sources":["../../src/UNSAFE_CheckboxSet/CheckboxSetContext.ts"],"sourcesContent":["import { createContext } from 'preact';\nimport { useContext } from 'preact/hooks';\n\nimport { ValueUpdateDetail } from '../utils/UNSAFE_valueUpdateDetail';\n\ntype CheckboxSetContextValue = {\n name: string;\n value?: Set<string | number>;\n onCommit?: (detail: ValueUpdateDetail<Set<string | number>>) => void;\n};\n\nconst CheckboxSetContext = createContext<CheckboxSetContextValue>({} as CheckboxSetContextValue);\nconst useCheckboxSetContext = () => useContext(CheckboxSetContext);\n\nexport { CheckboxSetContext, useCheckboxSetContext };\n"],"names":["createContext","useContext"],"mappings":";;;;;;AAWA,MAAM,kBAAkB,GAAGA,oBAAa,CAA0B,EAA6B,EAAE;AAC3F,MAAA,qBAAqB,GAAG,MAAMC,gBAAU,CAAC,kBAAkB;;;;;"}
@@ -0,0 +1,27 @@
1
+ /* @oracle/oraclejet-preact: undefined */
2
+ 'use strict';
3
+
4
+ var jsxRuntime = require('preact/jsx-runtime');
5
+ var hooks = require('preact/hooks');
6
+ var classNames = require('./classNames-c14c6ef3.js');
7
+ var usePress = require('./usePress-00deca01.js');
8
+ require('./FormFieldContext-8418dc68.js');
9
+ var useFormFieldContext = require('./useFormFieldContext-20f419ef.js');
10
+
11
+
12
+ var hide = 'MaxLengthCounterStyles_hide__7dy9j71';
13
+ var maxLengthCounterBase = 'MaxLengthCounterStyles_maxLengthCounterBase__7dy9j70';
14
+ var spanStyles = 'MaxLengthCounterStyles_spanStyles__7dy9j72';
15
+
16
+ const noop = () => { };
17
+ function MaxLengthCounter({ maxLength, valueLength = 0, onClick }) {
18
+ const { isFocused } = useFormFieldContext.useFormFieldContext();
19
+ // We don't want mousedown on this component to do anything, so prevent the default behavior.
20
+ const killEvent = hooks.useCallback((event) => event.preventDefault(), []);
21
+ const textClasses = classNames.classNames([!isFocused && hide]);
22
+ const { pressProps } = usePress.usePress(onClick ?? noop);
23
+ return (jsxRuntime.jsx("div", { class: maxLengthCounterBase, onMouseDown: killEvent, ...pressProps, children: jsxRuntime.jsxs("span", { class: textClasses, children: [jsxRuntime.jsx("span", { class: spanStyles, children: valueLength }), jsxRuntime.jsx("span", { class: spanStyles, children: "/" }), jsxRuntime.jsx("span", { class: spanStyles, children: maxLength })] }) }));
24
+ }
25
+
26
+ exports.MaxLengthCounter = MaxLengthCounter;
27
+ //# sourceMappingURL=MaxLengthCounter-a5370f66.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MaxLengthCounter-cead2dac.js","sources":["../../src/UNSAFE_TextArea/MaxLengthCounter.tsx"],"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"],"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,EAAA,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,EAAM,GAAA,UAAU,YACtEC,IAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,WAAW,EAAA,QAAA,EAAA,CACtBD,cAAM,KAAK,EAAE,UAAU,EAAA,QAAA,EAAG,WAAW,EAAQ,CAAA,EAC7CA,cAAM,KAAK,EAAE,UAAU,EAAU,QAAA,EAAA,GAAA,EAAA,CAAA,EACjCA,cAAM,KAAK,EAAE,UAAU,EAAG,QAAA,EAAA,SAAS,GAAQ,CACtC,EAAA,CAAA,EAAA,CACH,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"MaxLengthCounter-a5370f66.js","sources":["../../src/UNSAFE_TextArea/MaxLengthCounter.tsx"],"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"],"names":["useFormFieldContext","useCallback","classNames","usePress","_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,GAAGA,uCAAmB,EAAE,CAAC;;AAE5C,IAAA,MAAM,SAAS,GAAGC,iBAAW,CAAC,CAAC,KAAY,KAAK,KAAK,CAAC,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5E,MAAM,WAAW,GAAGC,qBAAU,CAAC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC;IACrD,MAAM,EAAE,UAAU,EAAE,GAAGC,iBAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;AACjD,IAAA,QACEC,cAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,EAAM,GAAA,UAAU,YACtEC,eAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,WAAW,EAAA,QAAA,EAAA,CACtBD,yBAAM,KAAK,EAAE,UAAU,EAAA,QAAA,EAAG,WAAW,EAAQ,CAAA,EAC7CA,yBAAM,KAAK,EAAE,UAAU,EAAU,QAAA,EAAA,GAAA,EAAA,CAAA,EACjCA,yBAAM,KAAK,EAAE,UAAU,EAAG,QAAA,EAAA,SAAS,GAAQ,CACtC,EAAA,CAAA,EAAA,CACH,EACN;AACJ;;;;"}
@@ -12,7 +12,20 @@ var useCollectionFocusRing = require('./useCollectionFocusRing-ca37785b.js');
12
12
  var useCurrentKey = require('./useCurrentKey-3c1736a2.js');
13
13
  var compat = require('preact/compat');
14
14
  var useTestId = require('./useTestId-e267a39d.js');
15
+ require('./UNSAFE_Text/themes/TextStyles.css.js');
15
16
  var BaseNavigationListItem = require('./BaseNavigationListItem-4b28f14e.js');
17
+ require('./Flex-ce16a2fa.js');
18
+ require('./logger-2b636482.js');
19
+ require('preact');
20
+ require('./LayerHost-7182bfaf.js');
21
+
22
+
23
+ require('./hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css.js');
24
+ require('./tooltipUtils-7857f698.js');
25
+
26
+ require('./UNSAFE_NavigationList/themes/NavigationListItemStyles.css.js');
27
+
28
+ require('./UNSAFE_NavigationList/themes/redwood/NavigationListItemVariants.css.js');
16
29
 
17
30
  /*TODO: JET-58534. Create a hook to share some logic between navlist and tabbar. Hook will be used inside this one. */
18
31
  function useNavigationList({ containerRef, selection, onRemove, onSelectionChange, children }) {
@@ -150,4 +163,4 @@ function NavigationListItem({ itemKey, label, badge, metadata, severity }) {
150
163
 
151
164
  exports.NavigationList = NavigationList;
152
165
  exports.NavigationListItem = NavigationListItem;
153
- //# sourceMappingURL=NavigationListItem-d9228979.js.map
166
+ //# sourceMappingURL=NavigationListItem-7550547a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationListItem-d9228979.js","sources":["../../src/UNSAFE_NavigationList/useNavigationList.ts","../../src/UNSAFE_NavigationList/NavigationList.tsx","../../src/UNSAFE_NavigationList/NavigationListItem.tsx"],"sourcesContent":["import { useState, useCallback, MutableRef, useRef, useEffect } from 'preact/hooks';\nimport {\n keyExtractor,\n getFirstVisibleKey,\n getKey,\n getPrevNextKeyUsingRef,\n findElementByKey\n} from '../utils/PRIVATE_collectionUtils';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { useCollectionFocusRing } from '../hooks/PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../hooks/PRIVATE_useCurrentKey';\nimport { NavigationListContextProps } from '../UNSAFE_NavigationListCommon';\n\nimport { ComponentChildren } from 'preact';\n\n/**\n * type for payload of current key change event handler\n */\ntype CurrentKeyDetail<K> = {\n value: K;\n};\n/**\n * type for payload of selection change event handler\n */\ntype SelectionDetail<K> = {\n value: K;\n reason: 'pointer' | 'keyboard';\n};\n/**\n * type for payload of remove event handler\n */\ntype RemoveDetail<K> = {\n value: K;\n};\n\n/*TODO: JET-58534. Create a hook to share some logic between navlist and tabbar. Hook will be used inside this one. */\nexport function useNavigationList<K extends string | number>({\n containerRef,\n selection,\n onRemove,\n onSelectionChange,\n children\n}: {\n containerRef: MutableRef<HTMLUListElement>;\n selection?: K;\n onRemove?: <K extends string | number>(detail: RemoveDetail<K>) => void;\n onSelectionChange?: <K extends string | number>(detail: SelectionDetail<K>) => void;\n children: ComponentChildren;\n}) {\n const ITEM_SELECTOR = '[role=\"tab\"]';\n const REMOVAL_ICON_SELECTOR = '[data-oj-navigationlist-item-remove-icon]';\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection);\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K | undefined>) => {\n setCurrentKey(detail.value);\n }, []) as NavigationListContextProps<K>['onCurrentKeyChange'];\n\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? (extractOnlyItemKey(element, ITEM_SELECTOR, REMOVAL_ICON_SELECTOR) as K)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n getPrevNextKeyUsingRef(containerRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(containerRef, currentKey, false, ITEM_SELECTOR),\n undefined,\n undefined,\n currentKey,\n onCurrentKeyChange\n );\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(containerRef, [\n 'Home',\n 'End',\n 'ArrowUp',\n 'ArrowDown'\n ]);\n\n const onFocus = useCallback(() => {\n if (containerRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(containerRef.current, ITEM_SELECTOR);\n if (key) {\n setCurrentKey(key as K);\n }\n }\n }, [currentKey, containerRef]);\n\n const onFocusProps = { onFocus };\n const prevNavItems = useRef<K[]>();\n\n useEffect(() => {\n if (containerRef.current) {\n const navListItemKeys = Array.from(\n containerRef.current.querySelectorAll(ITEM_SELECTOR),\n (elem) => getKey(elem as HTMLElement) as K\n );\n if (currentKey != null && navListItemKeys.indexOf(currentKey) !== -1) {\n const navListItem = findElementByKey(\n containerRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as any;\n if (navListItem.scrollIntoViewIfNeeded) {\n // for some browsers, we'll need the non-standard scrollIntoViewIfNeeded\n navListItem.scrollIntoViewIfNeeded();\n } else {\n navListItem.scrollIntoView({ block: 'nearest' });\n }\n } else {\n if (currentKey && navListItemKeys.indexOf(currentKey) === -1) {\n prevNavItems.current\n ? setCurrentKey(findNextCurrentKey(currentKey, navListItemKeys, prevNavItems.current))\n : setCurrentKey(navListItemKeys[0] as K);\n }\n prevNavItems.current = navListItemKeys;\n }\n }\n }, [children, currentKey, containerRef]);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if ((event.key === 'Home' || event.key === 'End') && containerRef.current && currentKey) {\n const navListItemKey = Array.from(\n containerRef.current.querySelectorAll(ITEM_SELECTOR),\n (elem) => getKey(elem as HTMLElement) as K\n );\n onCurrentKeyChange?.({\n value: navListItemKey[event.key === 'Home' ? 0 : navListItemKey.length - 1] as K\n });\n }\n if (currentKey && event.key === 'Enter') {\n onSelectionChange?.({\n value: currentKey as K,\n reason: 'keyboard'\n });\n }\n if (currentKey && event.key === 'Delete') {\n onRemove?.({ value: currentKey as K });\n }\n },\n [currentKey, onSelectionChange, onRemove, onCurrentKeyChange, containerRef]\n );\n\n return {\n showFocusRing,\n currentKey,\n onCurrentKeyChange,\n onKeyDown,\n containerHandlers: mergeProps(focusRingProps, currentKeyProps, onFocusProps)\n };\n}\n\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const navigationListItem = element.closest(itemSelector);\n const removeButton = element.closest(itemEliminator);\n return navigationListItem?.contains(removeButton) ? null : keyExtractor(element, itemSelector);\n};\n\nconst findNextCurrentKey = <K>(currentKey: K, currNavs: K[], prevNavs: K[]) => {\n const index = prevNavs.indexOf(currentKey);\n if (index > 0) {\n const nextIndex = index === prevNavs.length - 1 ? index - 1 : index + 1;\n const nextKey = prevNavs[nextIndex];\n if (currNavs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n }\n // update current key to be the first one if we can't find a suitable next key\n return currNavs[0];\n};\n","import { Ref } from 'preact';\nimport { MutableRef, useRef } from 'preact/hooks';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { useId } from '../hooks/UNSAFE_useId';\nimport { navigationListStyles } from './themes/NavigationListStyles.css';\nimport { useNavigationList } from './useNavigationList';\nimport { forwardRef, useImperativeHandle } from 'preact/compat';\nimport { useTestId, TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { NavigationListProps, NavigationListContext } from '../UNSAFE_NavigationListCommon';\nexport { RemovableNavigationListItem } from '../UNSAFE_NavigationListCommon';\n\nexport type FocusableHandle = {\n focus: () => void;\n blur: () => void;\n};\n\nexport const NavigationList = forwardRef(\n <K extends string | number>(\n {\n children,\n selection,\n onSelectionChange,\n onRemove,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelLedBy,\n testId\n }: NavigationListProps<K> & TestIdProps,\n ref?: Ref<FocusableHandle>\n ) => {\n const containerRef = useRef<HTMLUListElement>(null);\n\n const { showFocusRing, currentKey, onCurrentKeyChange, containerHandlers, onKeyDown } =\n useNavigationList({\n containerRef: containerRef as MutableRef<HTMLUListElement>,\n selection,\n onRemove,\n onSelectionChange,\n children\n });\n\n const eventProps = { onKeyDown };\n const navigationListClass = classNames([navigationListStyles.uListStyle]);\n const navigationListItemPrefix = useId() + '_';\n const testIdProps = useTestId(testId);\n\n //Allows to call focus on rootRef without having to expose it\n useImperativeHandle(ref!, () => ({\n focus: () => {\n if (containerRef.current) {\n containerRef.current.focus();\n }\n },\n blur: () => {\n if (containerRef.current) {\n containerRef.current.focus();\n }\n }\n }));\n\n return (\n <ul\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelLedBy}\n role=\"tablist\"\n ref={containerRef}\n aria-orientation={'vertical'}\n tabIndex={0}\n aria-activedescendant={currentKey ? navigationListItemPrefix + currentKey : ''}\n {...mergeProps(eventProps, containerHandlers)}\n {...testIdProps}\n class={navigationListClass}>\n <NavigationListContext.Provider\n value={{\n selection,\n onSelectionChange,\n onCurrentKeyChange,\n currentKey,\n showFocusRing,\n navigationListItemPrefix,\n onRemove\n }}>\n {children}\n </NavigationListContext.Provider>\n </ul>\n );\n }\n);\n","import {\n BaseNavigationListItem,\n BaseNavigationListItemProps\n} from '../UNSAFE_NavigationListCommon/BaseNavigationListItem';\n\nexport type NavigationListItemProps<K extends string | number> = Omit<\n BaseNavigationListItemProps<K>,\n 'removeIcon'\n>;\n\nexport function NavigationListItem<K extends string | number>({\n itemKey,\n label,\n badge,\n metadata,\n severity\n}: NavigationListItemProps<K>) {\n return (\n <BaseNavigationListItem\n itemKey={itemKey}\n label={label}\n badge={badge}\n metadata={metadata}\n severity={severity}\n />\n );\n}\n"],"names":["useState","useCallback","useCurrentKey","keyExtractor","getPrevNextKeyUsingRef","useCollectionFocusRing","getFirstVisibleKey","useRef","useEffect","getKey","findElementByKey","mergeProps","forwardRef","classNames","navigationListStyles","useId","useTestId","useImperativeHandle","_jsx","NavigationListContext","BaseNavigationListItem"],"mappings":";;;;;;;;;;;;;;;;AAmCA;AACgB,SAAA,iBAAiB,CAA4B,EAC3D,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EAOT,EAAA;IACC,MAAM,aAAa,GAAG,cAAc,CAAC;IACrC,MAAM,qBAAqB,GAAG,2CAA2C,CAAC;IAC1E,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAGA,cAAQ,CAAgB,SAAS,CAAC,CAAC;AAEvE,IAAA,MAAM,kBAAkB,GAAGC,iBAAW,CAAC,CAAC,MAAuC,KAAI;AACjF,QAAA,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC7B,EAAE,EAAE,CAAwD,CAAC;IAE9D,MAAM,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EAAE;AACxB,gBAAA,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;aAC9B;SACF;AACF,KAAA,CAAC,CAAC,CAAC;IAEJ,QACEC,qCACc,SAAS,EAAA,iBAAA,EACJ,cAAc,EAC/B,IAAI,EAAC,SAAS,EACd,GAAG,EAAE,YAAY,EAAA,kBAAA,EACC,UAAU,EAC5B,QAAQ,EAAE,CAAC,EACY,uBAAA,EAAA,UAAU,GAAG,wBAAwB,GAAG,UAAU,GAAG,EAAE,EAAA,GAC1EP,qBAAU,CAAC,UAAU,EAAE,iBAAiB,CAAC,EAAA,GACzC,WAAW,EACf,KAAK,EAAE,mBAAmB,EAC1B,QAAA,EAAAO,cAAA,CAACC,4CAAqB,CAAC,QAAQ,EAC7B,EAAA,KAAK,EAAE;gBACL,SAAS;gBACT,iBAAiB;gBACjB,kBAAkB;gBAClB,UAAU;gBACV,aAAa;gBACb,wBAAwB;gBACxB,QAAQ;AACT,aAAA,EAAA,QAAA,EACA,QAAQ,EAAA,CACsB,EAC9B,CAAA,EACL;AACJ,CAAC;;AC5Ea,SAAA,kBAAkB,CAA4B,EAC5D,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACmB,EAAA;IAC3B,QACED,cAAC,CAAAE,6CAAsB,EACrB,EAAA,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,CAAA,EACF;AACJ;;;;;"}
1
+ {"version":3,"file":"NavigationListItem-7550547a.js","sources":["../../src/UNSAFE_NavigationList/useNavigationList.ts","../../src/UNSAFE_NavigationList/NavigationList.tsx","../../src/UNSAFE_NavigationList/NavigationListItem.tsx"],"sourcesContent":["import { useState, useCallback, MutableRef, useRef, useEffect } from 'preact/hooks';\nimport {\n keyExtractor,\n getFirstVisibleKey,\n getKey,\n getPrevNextKeyUsingRef,\n findElementByKey\n} from '../utils/PRIVATE_collectionUtils';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { useCollectionFocusRing } from '../hooks/PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../hooks/PRIVATE_useCurrentKey';\nimport { NavigationListContextProps } from '../UNSAFE_NavigationListCommon';\n\nimport { ComponentChildren } from 'preact';\n\n/**\n * type for payload of current key change event handler\n */\ntype CurrentKeyDetail<K> = {\n value: K;\n};\n/**\n * type for payload of selection change event handler\n */\ntype SelectionDetail<K> = {\n value: K;\n reason: 'pointer' | 'keyboard';\n};\n/**\n * type for payload of remove event handler\n */\ntype RemoveDetail<K> = {\n value: K;\n};\n\n/*TODO: JET-58534. Create a hook to share some logic between navlist and tabbar. Hook will be used inside this one. */\nexport function useNavigationList<K extends string | number>({\n containerRef,\n selection,\n onRemove,\n onSelectionChange,\n children\n}: {\n containerRef: MutableRef<HTMLUListElement>;\n selection?: K;\n onRemove?: <K extends string | number>(detail: RemoveDetail<K>) => void;\n onSelectionChange?: <K extends string | number>(detail: SelectionDetail<K>) => void;\n children: ComponentChildren;\n}) {\n const ITEM_SELECTOR = '[role=\"tab\"]';\n const REMOVAL_ICON_SELECTOR = '[data-oj-navigationlist-item-remove-icon]';\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection);\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K | undefined>) => {\n setCurrentKey(detail.value);\n }, []) as NavigationListContextProps<K>['onCurrentKeyChange'];\n\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? (extractOnlyItemKey(element, ITEM_SELECTOR, REMOVAL_ICON_SELECTOR) as K)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n getPrevNextKeyUsingRef(containerRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(containerRef, currentKey, false, ITEM_SELECTOR),\n undefined,\n undefined,\n currentKey,\n onCurrentKeyChange\n );\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(containerRef, [\n 'Home',\n 'End',\n 'ArrowUp',\n 'ArrowDown'\n ]);\n\n const onFocus = useCallback(() => {\n if (containerRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(containerRef.current, ITEM_SELECTOR);\n if (key) {\n setCurrentKey(key as K);\n }\n }\n }, [currentKey, containerRef]);\n\n const onFocusProps = { onFocus };\n const prevNavItems = useRef<K[]>();\n\n useEffect(() => {\n if (containerRef.current) {\n const navListItemKeys = Array.from(\n containerRef.current.querySelectorAll(ITEM_SELECTOR),\n (elem) => getKey(elem as HTMLElement) as K\n );\n if (currentKey != null && navListItemKeys.indexOf(currentKey) !== -1) {\n const navListItem = findElementByKey(\n containerRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as any;\n if (navListItem.scrollIntoViewIfNeeded) {\n // for some browsers, we'll need the non-standard scrollIntoViewIfNeeded\n navListItem.scrollIntoViewIfNeeded();\n } else {\n navListItem.scrollIntoView({ block: 'nearest' });\n }\n } else {\n if (currentKey && navListItemKeys.indexOf(currentKey) === -1) {\n prevNavItems.current\n ? setCurrentKey(findNextCurrentKey(currentKey, navListItemKeys, prevNavItems.current))\n : setCurrentKey(navListItemKeys[0] as K);\n }\n prevNavItems.current = navListItemKeys;\n }\n }\n }, [children, currentKey, containerRef]);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if ((event.key === 'Home' || event.key === 'End') && containerRef.current && currentKey) {\n const navListItemKey = Array.from(\n containerRef.current.querySelectorAll(ITEM_SELECTOR),\n (elem) => getKey(elem as HTMLElement) as K\n );\n onCurrentKeyChange?.({\n value: navListItemKey[event.key === 'Home' ? 0 : navListItemKey.length - 1] as K\n });\n }\n if (currentKey && event.key === 'Enter') {\n onSelectionChange?.({\n value: currentKey as K,\n reason: 'keyboard'\n });\n }\n if (currentKey && event.key === 'Delete') {\n onRemove?.({ value: currentKey as K });\n }\n },\n [currentKey, onSelectionChange, onRemove, onCurrentKeyChange, containerRef]\n );\n\n return {\n showFocusRing,\n currentKey,\n onCurrentKeyChange,\n onKeyDown,\n containerHandlers: mergeProps(focusRingProps, currentKeyProps, onFocusProps)\n };\n}\n\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const navigationListItem = element.closest(itemSelector);\n const removeButton = element.closest(itemEliminator);\n return navigationListItem?.contains(removeButton) ? null : keyExtractor(element, itemSelector);\n};\n\nconst findNextCurrentKey = <K>(currentKey: K, currNavs: K[], prevNavs: K[]) => {\n const index = prevNavs.indexOf(currentKey);\n if (index > 0) {\n const nextIndex = index === prevNavs.length - 1 ? index - 1 : index + 1;\n const nextKey = prevNavs[nextIndex];\n if (currNavs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n }\n // update current key to be the first one if we can't find a suitable next key\n return currNavs[0];\n};\n","import { Ref } from 'preact';\nimport { MutableRef, useRef } from 'preact/hooks';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { useId } from '../hooks/UNSAFE_useId';\nimport { navigationListStyles } from './themes/NavigationListStyles.css';\nimport { useNavigationList } from './useNavigationList';\nimport { forwardRef, useImperativeHandle } from 'preact/compat';\nimport { useTestId, TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { NavigationListProps, NavigationListContext } from '../UNSAFE_NavigationListCommon';\nexport { RemovableNavigationListItem } from '../UNSAFE_NavigationListCommon';\n\nexport type FocusableHandle = {\n focus: () => void;\n blur: () => void;\n};\n\nexport const NavigationList = forwardRef(\n <K extends string | number>(\n {\n children,\n selection,\n onSelectionChange,\n onRemove,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelLedBy,\n testId\n }: NavigationListProps<K> & TestIdProps,\n ref?: Ref<FocusableHandle>\n ) => {\n const containerRef = useRef<HTMLUListElement>(null);\n\n const { showFocusRing, currentKey, onCurrentKeyChange, containerHandlers, onKeyDown } =\n useNavigationList({\n containerRef: containerRef as MutableRef<HTMLUListElement>,\n selection,\n onRemove,\n onSelectionChange,\n children\n });\n\n const eventProps = { onKeyDown };\n const navigationListClass = classNames([navigationListStyles.uListStyle]);\n const navigationListItemPrefix = useId() + '_';\n const testIdProps = useTestId(testId);\n\n //Allows to call focus on rootRef without having to expose it\n useImperativeHandle(ref!, () => ({\n focus: () => {\n if (containerRef.current) {\n containerRef.current.focus();\n }\n },\n blur: () => {\n if (containerRef.current) {\n containerRef.current.focus();\n }\n }\n }));\n\n return (\n <ul\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelLedBy}\n role=\"tablist\"\n ref={containerRef}\n aria-orientation={'vertical'}\n tabIndex={0}\n aria-activedescendant={currentKey ? navigationListItemPrefix + currentKey : ''}\n {...mergeProps(eventProps, containerHandlers)}\n {...testIdProps}\n class={navigationListClass}>\n <NavigationListContext.Provider\n value={{\n selection,\n onSelectionChange,\n onCurrentKeyChange,\n currentKey,\n showFocusRing,\n navigationListItemPrefix,\n onRemove\n }}>\n {children}\n </NavigationListContext.Provider>\n </ul>\n );\n }\n);\n","import {\n BaseNavigationListItem,\n BaseNavigationListItemProps\n} from '../UNSAFE_NavigationListCommon/BaseNavigationListItem';\n\nexport type NavigationListItemProps<K extends string | number> = Omit<\n BaseNavigationListItemProps<K>,\n 'removeIcon'\n>;\n\nexport function NavigationListItem<K extends string | number>({\n itemKey,\n label,\n badge,\n metadata,\n severity\n}: NavigationListItemProps<K>) {\n return (\n <BaseNavigationListItem\n itemKey={itemKey}\n label={label}\n badge={badge}\n metadata={metadata}\n severity={severity}\n />\n );\n}\n"],"names":["useState","useCallback","useCurrentKey","keyExtractor","getPrevNextKeyUsingRef","useCollectionFocusRing","getFirstVisibleKey","useRef","useEffect","getKey","findElementByKey","mergeProps","forwardRef","classNames","navigationListStyles","useId","useTestId","useImperativeHandle","_jsx","NavigationListContext","BaseNavigationListItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;AACgB,SAAA,iBAAiB,CAA4B,EAC3D,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,iBAAiB,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Z,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,CAAA,EACF;AACJ;;;;;"}
@@ -11,7 +11,7 @@ var useDetectHorizontalOverflow = require('./useDetectHorizontalOverflow-ceb85a3
11
11
  var collectionUtils = require('./collectionUtils-1535080e.js');
12
12
  var RemovableTabBarItem = require('./RemovableTabBarItem-da075122.js');
13
13
  var TabBarItem = require('./TabBarItem-5a7d5d03.js');
14
- var OverflowTabBarItem = require('./OverflowTabBarItem-57899880.js');
14
+ var OverflowTabBarItem = require('./OverflowTabBarItem-76059bad.js');
15
15
 
16
16
  /**
17
17
  * OverflowTabBar handles the rendering of overflowing tab items.
@@ -77,4 +77,4 @@ function OverflowTabBar({ items, layout = 'stretch', display = 'standard', size
77
77
  }
78
78
 
79
79
  exports.OverflowTabBar = OverflowTabBar;
80
- //# sourceMappingURL=OverflowTabBar-081cc41e.js.map
80
+ //# sourceMappingURL=OverflowTabBar-76c75781.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTabBar-081cc41e.js","sources":["../../src/UNSAFE_OverflowTabBar/OverflowTabBar.tsx"],"sourcesContent":["import { ComponentProps, createRef } from 'preact';\nimport { useCallback, useMemo, useRef, useState } from 'preact/hooks';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { OverflowTabBarItem, RemovableTabBarItem, TabBar, TabBarItem } from '../UNSAFE_TabBar';\nimport { CloseDetail, Item } from '../UNSAFE_TabBarCommon';\nimport { styles } from './themes/OverflowTabBarStyles.css';\nimport { useDetectHorizontalOverflow } from '../hooks/PRIVATE_useDetectHorizontalOverflow';\nimport { findElementByKey } from '../utils/PRIVATE_collectionUtils';\n\ntype OverflowTabBarProps<K extends string | number> = {\n /**\n * An array of data to render individual tabs\n */\n items: Item<K>[];\n} & Omit<ComponentProps<typeof TabBar>, 'children' | 'aria-describedby' | 'ref'>;\n\n/**\n * OverflowTabBar handles the rendering of overflowing tab items.\n */\nexport function OverflowTabBar<K extends string | number>({\n items,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n testId\n}: OverflowTabBarProps<K> & TestIdProps) {\n const displayStackProps = {\n display: display\n };\n const displayNonStackProps = {\n display: display,\n size: size\n };\n const itemSelector = '[role=\"tab\"]';\n const displayProps = display === 'stacked' ? displayStackProps : displayNonStackProps;\n const rootRef = useRef<HTMLDivElement>(null);\n const tabBarRef = createRef<HTMLDivElement>();\n\n const [isDropDownOpen, setIsDropDownOpen] = useState<boolean>(false);\n\n const isOutsideMouseDown = useRef<boolean>(false);\n\n const handleClose = (e: CloseDetail) => {\n if (tabBarRef.current && ['itemAction', 'dismissed'].includes(e.reason)) {\n tabBarRef?.current?.focus();\n }\n if (e.reason === 'outsideMousedown') {\n isOutsideMouseDown.current = true;\n }\n setIsDropDownOpen(false);\n };\n\n const handleSelect = useCallback<Required<ComponentProps<typeof TabBar>>['onSelect']>(\n (e: { value: string | number }) => {\n if (e.value === 'more') {\n //If overflow item is clicked after dropdown is open, the reason is outsideMouseDown and it needs to be closed\n if (isOutsideMouseDown.current) {\n setIsDropDownOpen(false);\n } else {\n setIsDropDownOpen(true);\n }\n } else {\n onSelect?.(e);\n }\n isOutsideMouseDown.current = false;\n },\n [onSelect]\n );\n\n const overflowItemKey = 'more' as K;\n\n const keysArray = useMemo(() => items.map((item) => item.itemKey) as K[], [items]);\n\n const getWidth = useCallback(\n <K extends string | number>(itemKey: K | undefined) => {\n const elem = findElementByKey(rootRef.current as HTMLElement, itemKey as K, itemSelector);\n const isLastKey = itemKey === (keysArray[keysArray.length - 1] as string | number);\n //If it is lastKey we need not account for gap after it\n const gapBetweenItems = !isLastKey ? 32 : 0;\n return elem! ? elem.getBoundingClientRect().width + gapBetweenItems : 0;\n },\n [keysArray]\n );\n\n const { visibleItemKeys, overflowItemKeys } = useDetectHorizontalOverflow({\n rootRef,\n getWidth,\n keysArray\n });\n\n const overflowTabBarClass = classNames([styles.overflowTabBarBase]);\n\n return (\n <div ref={rootRef} class={overflowTabBarClass}>\n <TabBar\n ref={tabBarRef}\n selection={selection}\n onSelect={handleSelect}\n {...displayProps}\n layout={layout}\n edge={edge}\n onRemove={onRemove}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n testId={testId}>\n {visibleItemKeys != null &&\n visibleItemKeys.length > 0 &&\n items\n .filter((item) => visibleItemKeys?.includes(item.itemKey))\n .map((item: Item<K>) =>\n item.isRemovable ? (\n <RemovableTabBarItem\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n />\n ) : (\n <TabBarItem\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n />\n )\n )}\n {overflowItemKeys != null && overflowItemKeys.length > 0 && (\n <OverflowTabBarItem\n isOpen={isDropDownOpen}\n onClose={handleClose}\n overflowItemKey={overflowItemKey}\n overflowItems={items.filter((item) => overflowItemKeys?.includes(item.itemKey))}\n />\n )}\n </TabBar>\n </div>\n );\n}\n"],"names":["useRef","createRef","useState","useCallback","useMemo","findElementByKey","useDetectHorizontalOverflow","classNames","styles","_jsx","_jsxs","TabBar","RemovableTabBarItem","TabBarItem","OverflowTabBarItem"],"mappings":";;;;;;;;;;;;;;;AAiBA;;AAEG;SACa,cAAc,CAA4B,EACxD,KAAK,EACL,MAAM,GAAG,SAAS,EAClB,OAAO,GAAG,UAAU,EACpB,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,MAAM,EAC+B,EAAA;AACrC,IAAA,MAAM,iBAAiB,GAAG;AACxB,QAAA,OAAO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AAC,EAAA,CAC/E,CACH,CACM,EAAA,CAAA,EAAA,CACL,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"OverflowTabBar-76c75781.js","sources":["../../src/UNSAFE_OverflowTabBar/OverflowTabBar.tsx"],"sourcesContent":["import { ComponentProps, createRef } from 'preact';\nimport { useCallback, useMemo, useRef, useState } from 'preact/hooks';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { OverflowTabBarItem, RemovableTabBarItem, TabBar, TabBarItem } from '../UNSAFE_TabBar';\nimport { CloseDetail, Item } from '../UNSAFE_TabBarCommon';\nimport { styles } from './themes/OverflowTabBarStyles.css';\nimport { useDetectHorizontalOverflow } from '../hooks/PRIVATE_useDetectHorizontalOverflow';\nimport { findElementByKey } from '../utils/PRIVATE_collectionUtils';\n\ntype OverflowTabBarProps<K extends string | number> = {\n /**\n * An array of data to render individual tabs\n */\n items: Item<K>[];\n} & Omit<ComponentProps<typeof TabBar>, 'children' | 'aria-describedby' | 'ref'>;\n\n/**\n * OverflowTabBar handles the rendering of overflowing tab items.\n */\nexport function OverflowTabBar<K extends string | number>({\n items,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n testId\n}: OverflowTabBarProps<K> & TestIdProps) {\n const displayStackProps = {\n display: display\n };\n const displayNonStackProps = {\n display: display,\n size: size\n };\n const itemSelector = '[role=\"tab\"]';\n const displayProps = display === 'stacked' ? displayStackProps : displayNonStackProps;\n const rootRef = useRef<HTMLDivElement>(null);\n const tabBarRef = createRef<HTMLDivElement>();\n\n const [isDropDownOpen, setIsDropDownOpen] = useState<boolean>(false);\n\n const isOutsideMouseDown = useRef<boolean>(false);\n\n const handleClose = (e: CloseDetail) => {\n if (tabBarRef.current && ['itemAction', 'dismissed'].includes(e.reason)) {\n tabBarRef?.current?.focus();\n }\n if (e.reason === 'outsideMousedown') {\n isOutsideMouseDown.current = true;\n }\n setIsDropDownOpen(false);\n };\n\n const handleSelect = useCallback<Required<ComponentProps<typeof TabBar>>['onSelect']>(\n (e: { value: string | number }) => {\n if (e.value === 'more') {\n //If overflow item is clicked after dropdown is open, the reason is outsideMouseDown and it needs to be closed\n if (isOutsideMouseDown.current) {\n setIsDropDownOpen(false);\n } else {\n setIsDropDownOpen(true);\n }\n } else {\n onSelect?.(e);\n }\n isOutsideMouseDown.current = false;\n },\n [onSelect]\n );\n\n const overflowItemKey = 'more' as K;\n\n const keysArray = useMemo(() => items.map((item) => item.itemKey) as K[], [items]);\n\n const getWidth = useCallback(\n <K extends string | number>(itemKey: K | undefined) => {\n const elem = findElementByKey(rootRef.current as HTMLElement, itemKey as K, itemSelector);\n const isLastKey = itemKey === (keysArray[keysArray.length - 1] as string | number);\n //If it is lastKey we need not account for gap after it\n const gapBetweenItems = !isLastKey ? 32 : 0;\n return elem! ? elem.getBoundingClientRect().width + gapBetweenItems : 0;\n },\n [keysArray]\n );\n\n const { visibleItemKeys, overflowItemKeys } = useDetectHorizontalOverflow({\n rootRef,\n getWidth,\n keysArray\n });\n\n const overflowTabBarClass = classNames([styles.overflowTabBarBase]);\n\n return (\n <div ref={rootRef} class={overflowTabBarClass}>\n <TabBar\n ref={tabBarRef}\n selection={selection}\n onSelect={handleSelect}\n {...displayProps}\n layout={layout}\n edge={edge}\n onRemove={onRemove}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n testId={testId}>\n {visibleItemKeys != null &&\n visibleItemKeys.length > 0 &&\n items\n .filter((item) => visibleItemKeys?.includes(item.itemKey))\n .map((item: Item<K>) =>\n item.isRemovable ? (\n <RemovableTabBarItem\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n />\n ) : (\n <TabBarItem\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n />\n )\n )}\n {overflowItemKeys != null && overflowItemKeys.length > 0 && (\n <OverflowTabBarItem\n isOpen={isDropDownOpen}\n onClose={handleClose}\n overflowItemKey={overflowItemKey}\n overflowItems={items.filter((item) => overflowItemKeys?.includes(item.itemKey))}\n />\n )}\n </TabBar>\n </div>\n );\n}\n"],"names":["useRef","createRef","useState","useCallback","useMemo","findElementByKey","useDetectHorizontalOverflow","classNames","styles","_jsx","_jsxs","TabBar","RemovableTabBarItem","TabBarItem","OverflowTabBarItem"],"mappings":";;;;;;;;;;;;;;;AAiBA;;AAEG;SACa,cAAc,CAA4B,EACxD,KAAK,EACL,MAAM,GAAG,SAAS,EAClB,OAAO,GAAG,UAAU,EACpB,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,MAAM,EAC+B,EAAA;AACrC,IAAA,MAAM,iBAAiB,GAAG;AACxB,QAAA,OAAO,EAAE,OAAO;KACjB,CAAC;AACF,IAAA,MAAM,oBAAoB,GAAG;AAC3B,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,IAAI,EAAE,IAAI;KACX,CAAC;IACF,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,IAAA,MAAM,YAAY,GAAG,OAAO,KAAK,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AACtF,IAAA,MAAM,OAAO,GAAGA,YAAM,CAAiB,IAAI,CAAC,CAAC;AAC7C,IAAA,MAAM,SAAS,GAAGC,gBAAS,EAAkB,CAAC;IAE9C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAGC,cAAQ,CAAU,KAAK,CAAC,CAAC;AAErE,IAAA,MAAM,kBAAkB,GAAGF,YAAM,CAAU,KAAK,CAAC,CAAC;AAElD,IAAA,MAAM,WAAW,GAAG,CAA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AAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACR,eAAA,EAAA,IAAI,CAAC,UAAU,GAC9B,KAEFH,cAAC,CAAAI,qBAAU,EACT,EAAA,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACR,eAAA,EAAA,IAAI,CAAC,UAAU,EAAA,CAC9B,CACH,CACF,EACJ,gBAAgB,IAAI,IAAI,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,KACtDJ,cAAA,CAACK,qCAAkB,EAAA,EACjB,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,WAAW,EACpB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,gBAAgB,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAA,CAC/E,CACH,CACM,EAAA,CAAA,EAAA,CACL,EACN;AACJ;;;;"}
@@ -15,7 +15,7 @@ var Dropdown = require('./Dropdown-62cd15ca.js');
15
15
  var Sheet = require('./Sheet-1650f94c.js');
16
16
  var TabBarItem = require('./TabBarItem-5a7d5d03.js');
17
17
  var UNSAFE_TabBarCommon_themes_OverflowTabBarItemStyles_css = require('./UNSAFE_TabBarCommon/themes/OverflowTabBarItemStyles.css.js');
18
- var NavigationListItem = require('./NavigationListItem-d9228979.js');
18
+ var NavigationListItem = require('./NavigationListItem-7550547a.js');
19
19
  var RemovableNavigationListItem = require('./RemovableNavigationListItem-727e53e8.js');
20
20
 
21
21
  const SvgOverflowH = (props) => (jsxRuntime.jsx(Icon.Icon, { viewBox: "0 0 24 24", ...props, children: jsxRuntime.jsx("g", { fill: "none", children: jsxRuntime.jsx("path", { d: "M6 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z", fill: "currentcolor" }) }) }));
@@ -85,4 +85,4 @@ const getIsMobile = () => {
85
85
  };
86
86
 
87
87
  exports.OverflowTabBarItem = OverflowTabBarItem;
88
- //# sourceMappingURL=OverflowTabBarItem-57899880.js.map
88
+ //# sourceMappingURL=OverflowTabBarItem-76059bad.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTabBarItem-57899880.js","sources":["../../src/UNSAFE_RedwoodIcons/OverflowH/OverflowH.tsx","../../src/UNSAFE_TabBarCommon/OverflowTabBarItem.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates. All rights reserved.\n * https://www.oracle.com/contracts/docs/cloud_csa_online_v062223_us_eng.pdf?download=false&er=221886\n * @ignore\n */\n// DO NOT MODIFY THIS FILE MANUALLY!\n// This file is automatically generated based on the corresponding SVG image in\n// the packages/oraclejet-preact/resources/icons folder.\nimport { ComponentProps } from 'preact';\nimport { Icon } from '../../UNSAFE_Icon';\ntype Props = Omit<ComponentProps<typeof Icon>, 'viewBox' | 'children'>;\nconst SvgOverflowH = (props: Props) => (\n <Icon viewBox=\"0 0 24 24\" {...props}>\n <g fill=\"none\">\n <path\n d=\"M6 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z\"\n fill=\"currentcolor\"\n />\n </g>\n </Icon>\n);\nexport { SvgOverflowH as OverflowH };\n","import { ComponentChild, ComponentProps, createRef } from 'preact';\nimport { useCallback, useRef } from 'preact/hooks';\nimport type { BundleType } from '../resources/nls/bundle';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport {\n NavigationListItem,\n NavigationList,\n RemovableNavigationListItem,\n FocusableHandle\n} from '../UNSAFE_NavigationList';\nimport { OverflowH } from '../UNSAFE_RedwoodIcons/OverflowH';\nimport { useTabBarContext } from './useTabBarContext';\nimport { Dropdown } from '../UNSAFE_Dropdown';\nimport { Sheet } from '../UNSAFE_Sheet';\nimport { BaseTabBarItem } from './BaseTabBarItem';\nimport { styles } from './themes/OverflowTabBarItemStyles.css';\nimport { TabBarItem } from './TabBarItem';\n\nexport type OverflowSelectionDetail<K> = {\n value: K;\n};\n\nexport type CloseDetail = {\n /**\n * dismissed represents dismissing the DropDown\n */\n reason: 'dismissed' | 'itemAction' | 'outsideMousedown';\n};\n\nexport type Item<K extends string | number> = Omit<\n ComponentProps<typeof TabBarItem<K>>,\n 'testId' | 'aria-controls'\n> & {\n isRemovable?: boolean;\n /**\n * Accepts the tabpanel element's ID associated with the tab item\n **/\n tabPanelId?: string;\n};\n\nexport type OverflowTabBarItemProps<K extends string | number> = {\n /**\n * Key of the TabBarItem\n */\n overflowItemKey: K;\n /**\n * Whether to open the popup\n */\n isOpen: boolean;\n /**\n * Property that triggers a callback when DropDown is supposed to be closed.\n */\n onClose?: (detail: CloseDetail) => void;\n /**\n * The icon of the OverflowTabBarItem\n */\n icon?: ComponentChild;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * An array of data used by NavigationList to render individual overflow items.\n */\n overflowItems?: Item<K>[];\n};\n\n/**\n * An OverflowTabBarItem renders TabBarItems in a device appropriate popup. OverflowTabBarItem is used internally in an OverflowTabBar.\n */\n\nexport function OverflowTabBarItem<K extends string | number>({\n overflowItemKey,\n icon,\n badge,\n overflowItems,\n isOpen,\n onClose\n}: OverflowTabBarItemProps<K>) {\n const { selection, showFocusRing, isEdgeBottom, onSelect, onRemove, layout } = useTabBarContext();\n\n const isPointerSelection = useRef<boolean>(false);\n\n const overflowTabBarItemRef = useRef<HTMLDivElement>(null);\n const navigationListRef = createRef<FocusableHandle>();\n\n const handleSelectionChange = useCallback<\n Required<ComponentProps<typeof NavigationList>>['onSelectionChange']\n >(\n (detail: { value: string | number; reason?: 'pointer' | 'keyboard' }) => {\n if (detail.reason === 'pointer') {\n isPointerSelection.current = true;\n }\n onSelect?.({ value: detail.value });\n onClose?.({ reason: 'itemAction' });\n },\n [onSelect, onClose]\n );\n\n const handleDropdownClose = useCallback(\n (e: CloseDetail) => {\n onClose?.({ reason: e.reason });\n },\n [onClose]\n );\n\n const handleSheetClose = useCallback(() => {\n onClose?.({ reason: 'dismissed' });\n }, [onClose]);\n\n //When NavigationList steals focus the app resets it. Not always would it be reset to\n //parent of OverflowTabBarItem. Though currentKey would be correct, but focusRing would would not be visible\n //Hence we check for isPointerSelection.current\n\n const focusRingRequirement = showFocusRing && !isPointerSelection.current && !getIsMobile();\n\n const overflowContainsKey = (searchKey: K) => {\n return overflowItems?.find((item) => item.itemKey === searchKey) != null;\n };\n\n const currentPanelId = overflowItems?.find((item) => item.itemKey === selection)?.tabPanelId;\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const isSelected = selection !== undefined && overflowContainsKey(selection as K);\n\n //instead of specifying flex: '1 0 auto' in cssProps var\n const styleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n ]);\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const navContainerClasses = classNames([styles.navContainerBase]);\n\n const navContainerRef = useRef<HTMLDivElement>(null);\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n navigationListRef.current?.focus();\n }\n },\n [navigationListRef]\n );\n const getNavigationList = useCallback(() => {\n return (\n <div onKeyDown={handleKeyDown} tabIndex={0} ref={navContainerRef} class={navContainerClasses}>\n <NavigationList\n ref={navigationListRef}\n selection={selection}\n onSelectionChange={handleSelectionChange}\n onRemove={onRemove}>\n {overflowItems?.map((item) =>\n item.isRemovable ? (\n <RemovableNavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n ) : (\n <NavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n )\n )}\n </NavigationList>\n </div>\n );\n }, [\n handleKeyDown,\n navContainerClasses,\n navigationListRef,\n selection,\n handleSelectionChange,\n onRemove,\n overflowItems\n ]);\n\n return (\n <>\n {overflowItems && overflowItems.length > 0 && (\n <div ref={overflowTabBarItemRef} style={flexDimensions}>\n <BaseTabBarItem\n aria-controls={currentPanelId}\n itemKey={overflowItemKey}\n label={translations.overflowItemLabel()}\n icon={icon ? icon : <OverflowH />}\n badge={badge}\n showFocusRingOverride={focusRingRequirement}\n selectionOverride={isSelected}\n displayOverride={'icons'}\n aria-haspopup={true}\n />\n </div>\n )}\n {getIsMobile() ? (\n <Sheet isOpen={isOpen} onClose={handleSheetClose}>\n {getNavigationList()}\n </Sheet>\n ) : (\n <Dropdown\n initialFocus=\"firstFocusable\"\n isOpen={isOpen}\n onClose={handleDropdownClose}\n placement={isEdgeBottom ? 'top-end' : 'bottom-end'}\n anchorRef={overflowTabBarItemRef}>\n {getNavigationList()}\n </Dropdown>\n )}\n </>\n );\n}\n\nconst getIsMobile = () => {\n const { deviceType } = getClientHints();\n return deviceType === 'phone';\n};\n"],"names":["_jsx","Icon","useTabBarContext","useRef","createRef","useCallback","useTranslationBundle","mergeInterpolations","flexitemInterpolations","classNames","styles","NavigationList","RemovableNavigationListItem","NavigationListItem","_jsxs","_Fragment","BaseTabBarItem","OverflowH","Sheet","Dropdown","getClientHints"],"mappings":";;;;;;;;;;;;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RedwoodIcons/OverflowH/OverflowH.tsx","../../src/UNSAFE_TabBarCommon/OverflowTabBarItem.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates. All rights reserved.\n * https://www.oracle.com/contracts/docs/cloud_csa_online_v062223_us_eng.pdf?download=false&er=221886\n * @ignore\n */\n// DO NOT MODIFY THIS FILE MANUALLY!\n// This file is automatically generated based on the corresponding SVG image in\n// the packages/oraclejet-preact/resources/icons folder.\nimport { ComponentProps } from 'preact';\nimport { Icon } from '../../UNSAFE_Icon';\ntype Props = Omit<ComponentProps<typeof Icon>, 'viewBox' | 'children'>;\nconst SvgOverflowH = (props: Props) => (\n <Icon viewBox=\"0 0 24 24\" {...props}>\n <g fill=\"none\">\n <path\n d=\"M6 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z\"\n fill=\"currentcolor\"\n />\n </g>\n </Icon>\n);\nexport { SvgOverflowH as OverflowH };\n","import { ComponentChild, ComponentProps, createRef } from 'preact';\nimport { useCallback, useRef } from 'preact/hooks';\nimport type { BundleType } from '../resources/nls/bundle';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport {\n NavigationListItem,\n NavigationList,\n RemovableNavigationListItem,\n FocusableHandle\n} from '../UNSAFE_NavigationList';\nimport { OverflowH } from '../UNSAFE_RedwoodIcons/OverflowH';\nimport { useTabBarContext } from './useTabBarContext';\nimport { Dropdown } from '../UNSAFE_Dropdown';\nimport { Sheet } from '../UNSAFE_Sheet';\nimport { BaseTabBarItem } from './BaseTabBarItem';\nimport { styles } from './themes/OverflowTabBarItemStyles.css';\nimport { TabBarItem } from './TabBarItem';\n\nexport type OverflowSelectionDetail<K> = {\n value: K;\n};\n\nexport type CloseDetail = {\n /**\n * dismissed represents dismissing the DropDown\n */\n reason: 'dismissed' | 'itemAction' | 'outsideMousedown';\n};\n\nexport type Item<K extends string | number> = Omit<\n ComponentProps<typeof TabBarItem<K>>,\n 'testId' | 'aria-controls'\n> & {\n isRemovable?: boolean;\n /**\n * Accepts the tabpanel element's ID associated with the tab item\n **/\n tabPanelId?: string;\n};\n\nexport type OverflowTabBarItemProps<K extends string | number> = {\n /**\n * Key of the TabBarItem\n */\n overflowItemKey: K;\n /**\n * Whether to open the popup\n */\n isOpen: boolean;\n /**\n * Property that triggers a callback when DropDown is supposed to be closed.\n */\n onClose?: (detail: CloseDetail) => void;\n /**\n * The icon of the OverflowTabBarItem\n */\n icon?: ComponentChild;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * An array of data used by NavigationList to render individual overflow items.\n */\n overflowItems?: Item<K>[];\n};\n\n/**\n * An OverflowTabBarItem renders TabBarItems in a device appropriate popup. OverflowTabBarItem is used internally in an OverflowTabBar.\n */\n\nexport function OverflowTabBarItem<K extends string | number>({\n overflowItemKey,\n icon,\n badge,\n overflowItems,\n isOpen,\n onClose\n}: OverflowTabBarItemProps<K>) {\n const { selection, showFocusRing, isEdgeBottom, onSelect, onRemove, layout } = useTabBarContext();\n\n const isPointerSelection = useRef<boolean>(false);\n\n const overflowTabBarItemRef = useRef<HTMLDivElement>(null);\n const navigationListRef = createRef<FocusableHandle>();\n\n const handleSelectionChange = useCallback<\n Required<ComponentProps<typeof NavigationList>>['onSelectionChange']\n >(\n (detail: { value: string | number; reason?: 'pointer' | 'keyboard' }) => {\n if (detail.reason === 'pointer') {\n isPointerSelection.current = true;\n }\n onSelect?.({ value: detail.value });\n onClose?.({ reason: 'itemAction' });\n },\n [onSelect, onClose]\n );\n\n const handleDropdownClose = useCallback(\n (e: CloseDetail) => {\n onClose?.({ reason: e.reason });\n },\n [onClose]\n );\n\n const handleSheetClose = useCallback(() => {\n onClose?.({ reason: 'dismissed' });\n }, [onClose]);\n\n //When NavigationList steals focus the app resets it. Not always would it be reset to\n //parent of OverflowTabBarItem. Though currentKey would be correct, but focusRing would would not be visible\n //Hence we check for isPointerSelection.current\n\n const focusRingRequirement = showFocusRing && !isPointerSelection.current && !getIsMobile();\n\n const overflowContainsKey = (searchKey: K) => {\n return overflowItems?.find((item) => item.itemKey === searchKey) != null;\n };\n\n const currentPanelId = overflowItems?.find((item) => item.itemKey === selection)?.tabPanelId;\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const isSelected = selection !== undefined && overflowContainsKey(selection as K);\n\n //instead of specifying flex: '1 0 auto' in cssProps var\n const styleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n ]);\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const navContainerClasses = classNames([styles.navContainerBase]);\n\n const navContainerRef = useRef<HTMLDivElement>(null);\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n navigationListRef.current?.focus();\n }\n },\n [navigationListRef]\n );\n const getNavigationList = useCallback(() => {\n return (\n <div onKeyDown={handleKeyDown} tabIndex={0} ref={navContainerRef} class={navContainerClasses}>\n <NavigationList\n ref={navigationListRef}\n selection={selection}\n onSelectionChange={handleSelectionChange}\n onRemove={onRemove}>\n {overflowItems?.map((item) =>\n item.isRemovable ? (\n <RemovableNavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n ) : (\n <NavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n )\n )}\n </NavigationList>\n </div>\n );\n }, [\n handleKeyDown,\n navContainerClasses,\n navigationListRef,\n selection,\n handleSelectionChange,\n onRemove,\n overflowItems\n ]);\n\n return (\n <>\n {overflowItems && overflowItems.length > 0 && (\n <div ref={overflowTabBarItemRef} style={flexDimensions}>\n <BaseTabBarItem\n aria-controls={currentPanelId}\n itemKey={overflowItemKey}\n label={translations.overflowItemLabel()}\n icon={icon ? icon : <OverflowH />}\n badge={badge}\n showFocusRingOverride={focusRingRequirement}\n selectionOverride={isSelected}\n displayOverride={'icons'}\n aria-haspopup={true}\n />\n </div>\n )}\n {getIsMobile() ? (\n <Sheet isOpen={isOpen} onClose={handleSheetClose}>\n {getNavigationList()}\n </Sheet>\n ) : (\n <Dropdown\n initialFocus=\"firstFocusable\"\n isOpen={isOpen}\n onClose={handleDropdownClose}\n placement={isEdgeBottom ? 'top-end' : 'bottom-end'}\n anchorRef={overflowTabBarItemRef}>\n {getNavigationList()}\n </Dropdown>\n )}\n </>\n );\n}\n\nconst getIsMobile = () => {\n const { deviceType } = getClientHints();\n return deviceType === 'phone';\n};\n"],"names":["_jsx","Icon","useTabBarContext","useRef","createRef","useCallback","useTranslationBundle","mergeInterpolations","flexitemInterpolations","classNames","styles","NavigationList","RemovableNavigationListItem","NavigationListItem","_jsxs","_Fragment","BaseTabBarItem","OverflowH","Sheet","Dropdown","getClientHints"],"mappings":";;;;;;;;;;;;;;;;;;;;AAYA,MAAM,YAAY,GAAG,CAAC,KAAY,MAChCA,cAAA,CAACC,SAAI,EAAC,EAAA,OAAO,EAAC,WAAW,KAAK,KAAK,EAAA,QAAA,EACjCD,cAAG,CAAA,GAAA,EAAA,EAAA,IAAI,EAAC,MAAM,EACZ,QAAA,EAAAA,cAAA,CAAA,MAAA,EAAA,EACE,CAAC,EAAC,sGAAsG,EACxG,IAAI,EAAC,cAAc,EAAA,CACnB,EACA,CAAA,EAAA,CACC,CACR;;ACmDD;;AAEG;AAEa,SAAA,kBAAkB,CAA4B,EAC5D,eAAe,EACf,IAAI,E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,EACvC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAGhB,eAACiB,YAAS,EAAA,EAAA,CAAG,EACjC,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,oBAAoB,EAC3C,iBAAiB,EAAE,UAAU,EAC7B,eAAe,EAAE,OAAO,EAAA,eAAA,EACT,IAAI,EAAA,CACnB,EACE,CAAA,CACP,EACA,WAAW,EAAE,IACZjB,cAAA,CAACkB,WAAK,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAC7C,QAAA,EAAA,iBAAiB,EAAE,EAAA,CACd,KAERlB,cAAA,CAACmB,iBAAQ,EACP,EAAA,YAAY,EAAC,gBAAgB,EAC7B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,EAClD,SAAS,EAAE,qBAAqB,EAC/B,QAAA,EAAA,iBAAiB,EAAE,EAAA,CACX,CACZ,CAAA,EAAA,CACA,EACH;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,MAAK;AACvB,IAAA,MAAM,EAAE,UAAU,EAAE,GAAGC,0BAAc,EAAE,CAAC;IACxC,OAAO,UAAU,KAAK,OAAO,CAAC;AAChC,CAAC;;;;"}
@@ -6,7 +6,7 @@ var compat = require('preact/compat');
6
6
  require('./FormContext-9452bd30.js');
7
7
  var useFormContext = require('./useFormContext-4c3091dc.js');
8
8
  var FormFieldContext = require('./FormFieldContext-8418dc68.js');
9
- var hooks = require('preact/hooks');
9
+ require('preact/hooks');
10
10
  var useFocusableTextField = require('./useFocusableTextField-2c36840d.js');
11
11
  var Label = require('./Label-47446013.js');
12
12
  var TextFieldInput = require('./TextFieldInput-a2e8dd01.js');
@@ -42,27 +42,10 @@ var HiddenAccessible = require('./HiddenAccessible-087eb49a.js');
42
42
 
43
43
  require('./UNSAFE_Popup/themes/redwood/PopupVariants.css.js');
44
44
  var useLengthFilter = require('./useLengthFilter-d4cb6f47.js');
45
- var classNames = require('./classNames-c14c6ef3.js');
46
- var usePress = require('./usePress-00deca01.js');
47
- var useFormFieldContext = require('./useFormFieldContext-20f419ef.js');
48
-
45
+ var MaxLengthCounter = require('./MaxLengthCounter-a5370f66.js');
49
46
  var useCurrentValueReducer = require('./useCurrentValueReducer-f37ac024.js');
50
47
  var useSelectableTextField = require('./useSelectableTextField-892b62db.js');
51
48
 
52
- var hide = 'MaxLengthCounterStyles_hide__7dy9j71';
53
- var maxLengthCounterBase = 'MaxLengthCounterStyles_maxLengthCounterBase__7dy9j70';
54
- var spanStyles = 'MaxLengthCounterStyles_spanStyles__7dy9j72';
55
-
56
- const noop = () => { };
57
- function MaxLengthCounter({ maxLength, valueLength = 0, onClick }) {
58
- const { isFocused } = useFormFieldContext.useFormFieldContext();
59
- // We don't want mousedown on this component to do anything, so prevent the default behavior.
60
- const killEvent = hooks.useCallback((event) => event.preventDefault(), []);
61
- const textClasses = classNames.classNames([!isFocused && hide]);
62
- const { pressProps } = usePress.usePress(onClick ?? noop);
63
- return (jsxRuntime.jsx("div", { class: maxLengthCounterBase, onMouseDown: killEvent, ...pressProps, children: jsxRuntime.jsxs("span", { class: textClasses, children: [jsxRuntime.jsx("span", { class: spanStyles, children: valueLength }), jsxRuntime.jsx("span", { class: spanStyles, children: "/" }), jsxRuntime.jsx("span", { class: spanStyles, children: maxLength })] }) }));
64
- }
65
-
66
49
  /**
67
50
  * A text area displays a field that allows a user to enter a multi-line text value.
68
51
  */
@@ -168,12 +151,11 @@ const TextArea = compat.forwardRef(({ 'aria-describedby': ariaDescribedBy, assis
168
151
  return (jsxRuntime.jsx(FormFieldContext.FormFieldContext.Provider, { value: formFieldContext, children: jsxRuntime.jsx(StyledTextField.ReadonlyTextField, { role: "presentation", columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, ref: anchorRef, testId: testId, variant: "textarea", mainContent: mainContent, resize: resize, ...fieldLabelProps }) }));
169
152
  }
170
153
  const hasMaxLength = maxLength !== undefined;
171
- const mainContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TextFieldInput.TextFieldInput, { as: "textarea", "aria-label": ariaLabel, autoComplete: autoComplete, autoFocus: autoFocus, currentCommitValue: currentCommitValue, hasEmptyLabel: label === '' && labelEdge === 'none', hasInsideLabel: labelComp !== undefined && labelEdge === 'inside', isRequired: isRequired, inputRef: enabledElementRef, onCommit: onCommitAndDispatch, onInput: onFilteredInput, placeholder: placeholder, role: role, rows: rows, textAlign: textAlign, value: value, ...inputProps }), maxLengthCounter === 'remaining' && hasMaxLength && (jsxRuntime.jsx(MaxLengthCounter, { maxLength: maxLength, valueLength: valueLength, onClick: onClickCounter })), hasMaxLength && (jsxRuntime.jsx(HiddenAccessible.HiddenAccessible, { id: maxLengthDescribedByIdRef.current, isHidden: true, children: translations.formControl_maxLength({
154
+ const mainContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TextFieldInput.TextFieldInput, { as: "textarea", "aria-label": ariaLabel, autoComplete: autoComplete, autoFocus: autoFocus, currentCommitValue: currentCommitValue, hasEmptyLabel: label === '' && labelEdge === 'none', hasInsideLabel: labelComp !== undefined && labelEdge === 'inside', isRequired: isRequired, inputRef: enabledElementRef, onCommit: onCommitAndDispatch, onInput: onFilteredInput, placeholder: placeholder, role: role, rows: rows, textAlign: textAlign, value: value, ...inputProps }), maxLengthCounter === 'remaining' && hasMaxLength && (jsxRuntime.jsx(MaxLengthCounter.MaxLengthCounter, { maxLength: maxLength, valueLength: valueLength, onClick: onClickCounter })), hasMaxLength && (jsxRuntime.jsx(HiddenAccessible.HiddenAccessible, { id: maxLengthDescribedByIdRef.current, isHidden: true, children: translations.formControl_maxLength({
172
155
  MAX_LENGTH: `${maxLength}`
173
156
  }) })), hasMaxLength && isFocused && (jsxRuntime.jsx(MaxLengthLiveRegion.MaxLengthLiveRegion, { maxLength: maxLength, valueLength: valueLength, testId: testId + '_remainingChars' }))] }));
174
157
  return (jsxRuntime.jsx(FormFieldContext.FormFieldContext.Provider, { value: formFieldContext, children: jsxRuntime.jsx(TextField.TextField, { mainContent: mainContent, columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, onBlur: focusProps?.onFocusOut, onFocus: focusProps?.onFocusIn, mainFieldRef: anchorRef, resize: resize, testId: testId, ...textFieldProps, ...fieldLabelProps }) }));
175
158
  });
176
159
 
177
- exports.MaxLengthCounter = MaxLengthCounter;
178
160
  exports.TextArea = TextArea;
179
- //# sourceMappingURL=TextArea-792069d7.js.map
161
+ //# sourceMappingURL=TextArea-096f18ad.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea-6f18b955.js","sources":["../../src/UNSAFE_TextArea/TextArea.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps, Ref } from 'preact';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'preact/compat';\nimport { useFormContext } from '../hooks/UNSAFE_useFormContext';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { FocusableHandle, useFocusableTextField } from '../hooks/UNSAFE_useFocusableTextField';\nimport { Label } from '../UNSAFE_Label';\nimport {\n ReadonlyTextField,\n ReadonlyTextFieldInput,\n TextField,\n TextFieldInput\n} from '../UNSAFE_TextField';\nimport { useTextField } from '../hooks/UNSAFE_useTextField';\nimport {\n CompactUserAssistance,\n InlineUserAssistance,\n UserAssistanceDensityType\n} from '../UNSAFE_UserAssistance';\nimport { CountUnit, useLengthFilter } from '../hooks/UNSAFE_useLengthFilter';\nimport { MaxLengthLiveRegion } from '../UNSAFE_TextField';\nimport { MaxLengthCounter } from './MaxLengthCounter';\nimport { Size } from '../utils/UNSAFE_size';\nimport { useCurrentValueReducer } from '../hooks/UNSAFE_useCurrentValueReducer';\nimport { ValueUpdateDetail } from '../utils/UNSAFE_valueUpdateDetail';\nimport { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { LayoutColumnSpan } from '../utils/UNSAFE_styles/Layout';\nimport type { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { useId } from '../hooks/UNSAFE_useId';\nimport { SelectableHandle, useSelectableTextField } from '#hooks/UNSAFE_useSelectableTextField';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\n\ntype TextFieldProps = ComponentProps<typeof TextField>;\ntype TextFieldInputProps = ComponentProps<typeof TextFieldInput>;\ntype InlineUserAssistanceProps = ComponentProps<typeof InlineUserAssistance>;\n\ntype Props = TestIdProps & {\n /**\n * The ID of an element (or space separated IDs of multiple elements) that\n * describes the input.\n */\n 'aria-describedby'?: TextFieldInputProps['aria-describedby'];\n\n /**\n * Text to provide guidance to help the user understand what to enter.\n */\n assistiveText?: InlineUserAssistanceProps['assistiveText'];\n /**\n * Dictates component's autocomplete state.\n * This attribute indicates whether the value of the control can be automatically completed by the browser.\n * The common values are \"on\" and \"off\".\n */\n autoComplete?: TextFieldInputProps['autoComplete'];\n /**\n * Autofocus specifies whether the component will get focus when the page is loaded.\n * If it is set to true then the associated component will get input focus when the page is loaded.\n * Setting this property doesn't set the focus to the component; it tells the browser to focus\n * to it when the element is inserted in the document.\n */\n autoFocus?: TextFieldInputProps['autoFocus'];\n /**\n * Specifies how many columns to span in a FormLayout with direction === 'row'\n */\n columnSpan?: LayoutColumnSpan;\n /**\n * Help source URL associated with the component.\n */\n helpSourceLink?: InlineUserAssistanceProps['helpSourceLink'];\n /**\n * Custom text to be rendered for the <code>helpSourceLink</code>.\n */\n helpSourceText?: InlineUserAssistanceProps['helpSourceText'];\n /**\n * Specifies whether the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n /**\n * Specifies for accessibility purposes whether a value is required.\n *\n * Setting this property to <code>false</code> means that a value is not required to be\n * committed by the user. Setting this property to <code>true</code> means that a value\n * is required to be committed by the user.\n */\n isRequired?: TextFieldInputProps['isRequired'];\n /**\n * Specifies whether to show an indicator on screen that a value is required, for example\n * before the user has committed a value.\n */\n isRequiredShown?: InlineUserAssistanceProps['isRequiredShown'];\n /**\n * Specifies the label associated with the field.\n */\n label: string;\n /**\n * Specifies where the label is positioned relative to the field.\n */\n labelEdge?: 'inside' | 'start' | 'top' | 'none';\n /**\n * Specifies the width of the label when <code>labelEdge</code> is <code>\"start\"</code>\n */\n labelStartWidth?: Size;\n /**\n * Specifies the maximum number of characters that can be entered in the input field.\n */\n maxLength?: number;\n /**\n * Determines whether the remaining number of characters that can be entered is shown or not.\n */\n maxLengthCounter?: 'none' | 'remaining';\n /**\n * Specifies how the input text characters are to be counted when maxLength is specified.\n */\n maxLengthUnit?: CountUnit;\n /**\n * Messages to show on screen that are associated with the component.\n */\n messages?: InlineUserAssistanceProps['messages'];\n /**\n * A short hint to display before the user enters a value.\n */\n placeholder?: TextFieldInputProps['placeholder'];\n /**\n * Specifies how the user is allowed to manually resize the TextArea component.\n */\n resize?: TextFieldProps['resize'];\n /**\n * Specifies the ARIA role type.\n */\n role?: TextFieldInputProps['role'];\n /**\n * Specifies the number of rows to display\n */\n rows?: TextFieldInputProps['rows'];\n /**\n * Specifies how to align text within the field.\n */\n textAlign?: TextFieldInputProps['textAlign'];\n /**\n * Specifies the density of the user assistance presentation. It can be set to:\n * <ul>\n * <li><code>'efficient'</code>: Show inline and reserve space to prevent layout reflow when user\n * assistance text is displayed.</li>\n * <li><code>'reflow'</code>: Show inline. Layout will reflow when text is displayed.</li>\n * <li><code>'compact'</code>: Messages, help, hints, and required will not be shown inline; they will show in a mode that keeps the screen more compact, like a popup for the messages, and a required icon to indicate Required. </li>\n * </ul>\n */\n userAssistanceDensity?: UserAssistanceDensityType;\n /**\n * The current display value of the component.\n */\n value?: TextFieldInputProps['value'];\n /**\n * The style variant of the component.\n */\n variant?: TextFieldInputProps['variant'];\n /**\n * Callback invoked when the user commits the entered value by blurring out of the field.\n */\n onCommit?: TextFieldInputProps['onCommit'];\n /**\n * Callback invoked each time the user changes the value of the field. For example, if the user\n * types 'abcd', this callback will be called four times with the value as 'a', 'ab', 'abc' and 'abcd'\n * respectively.\n */\n onInput: TextFieldInputProps['onInput'];\n};\n\ntype FocusSelectHandle = FocusableHandle & Partial<SelectableHandle>;\n\n/**\n * A text area displays a field that allows a user to enter a multi-line text value.\n */\nexport const TextArea = forwardRef(\n (\n {\n 'aria-describedby': ariaDescribedBy,\n assistiveText,\n autoComplete = 'off',\n autoFocus = false,\n columnSpan,\n helpSourceLink,\n helpSourceText,\n isDisabled: propIsDisabled,\n isReadonly: propIsReadonly,\n isRequired = false,\n isRequiredShown,\n label,\n labelEdge: propLabelEdge,\n labelStartWidth: propLabelStartWidth,\n maxLength,\n maxLengthCounter = 'remaining',\n maxLengthUnit,\n messages,\n placeholder,\n resize,\n role,\n rows,\n textAlign: propTextAlign,\n userAssistanceDensity: propUserAssistanceDensity,\n value,\n variant = 'default',\n onInput,\n onCommit,\n testId\n }: Props,\n ref?: Ref<FocusSelectHandle>\n ) => {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const formControl_limitReached = maxLength\n ? translations.formControl_limitReached({\n CHARACTER_LIMIT: maxLength\n })\n : '';\n\n const { currentCommitValue, dispatch } = useCurrentValueReducer({ value });\n const onInputAndDispatch = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)\n dispatch({ type: 'input', payload: detail.value });\n onInput?.(detail);\n },\n [onInput, dispatch]\n );\n const onCommitAndDispatch = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)\n dispatch({ type: 'commit', payload: detail.value });\n onCommit?.(detail);\n },\n [onCommit, dispatch]\n );\n const {\n isDisabled: isFormDisabled,\n isReadonly: isFormReadonly,\n labelEdge: formLabelEdge,\n labelStartWidth: formLabelStartWidth,\n textAlign: formTextAlign,\n userAssistanceDensity: formUserAssistanceDensity\n } = useFormContext();\n\n // default to FormContext values if component properties are not specified\n const isDisabled = propIsDisabled ?? isFormDisabled;\n const isReadonly = propIsReadonly ?? isFormReadonly;\n const labelEdge = propLabelEdge ?? formLabelEdge;\n const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;\n const textAlign = propTextAlign ?? formTextAlign;\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n const maxLengthDescribedByIdRef = useRef<string>(useId());\n // The enabledAriaDescribedBy includes the maxLengthDescribedById in addition to what was passed in to aria-describedby.\n // We don't need to announce the max length message for readonly, as it only applies when editing the value.\n const enabledAriaDescribedBy = ariaDescribedBy\n ? `${ariaDescribedBy} ${maxLengthDescribedByIdRef.current}`\n : maxLengthDescribedByIdRef.current;\n\n const enabledElementRef = useRef<HTMLTextAreaElement>(null);\n const readonlyElementRef = useRef<HTMLTextAreaElement>(null);\n\n const {\n focusProps,\n isFocused,\n methods: focusMethods\n } = useFocusableTextField<HTMLTextAreaElement, HTMLTextAreaElement>({\n isDisabled,\n isReadonly,\n enabledElementRef,\n readonlyElementRef\n });\n\n const { methods: selectMethods } =\n useSelectableTextField<HTMLTextAreaElement>(enabledElementRef);\n\n useImperativeHandle(ref!, () => mergeProps(focusMethods, selectMethods), [\n focusMethods,\n selectMethods\n ]);\n\n // Handle length filter for user-typed inputs and controlled inputs\n const { isMaxLengthReached, valueLength, onFilteredInput } = useLengthFilter({\n maxLength,\n maxLengthUnit,\n value,\n onInput: onInputAndDispatch,\n onCommit: onCommitAndDispatch\n });\n\n const limitMessage = [{ detail: formControl_limitReached, severity: 'info' }];\n const allMessages = [\n ...(messages ?? []),\n ...(isMaxLengthReached ? limitMessage : [])\n ] as ComponentMessageItem[];\n\n const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } =\n useTextField({\n ariaDescribedBy: isReadonly || isDisabled ? ariaDescribedBy : enabledAriaDescribedBy,\n contentVariant: 'textarea',\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isFocused,\n isReadonly,\n isRequiredShown,\n labelEdge,\n messages: allMessages,\n styleVariant: variant,\n userAssistanceDensity,\n value\n });\n\n const onClickCounter = useCallback(() => {\n const elm = enabledElementRef.current;\n // for setSelectionRange(), len needs to be a number or null.\n const len = elm ? elm.value.length : null;\n // Since the counter element is after the text, clicking in this\n // should put the selection at the end of the text\n enabledElementRef.current?.setSelectionRange(len, len);\n // Clicking the counter should put the focus on the input field\n enabledElementRef.current?.focus();\n }, [enabledElementRef]);\n\n const labelComp = labelEdge !== 'none' ? <Label {...labelProps}>{label}</Label> : undefined;\n\n const fieldLabelProps = {\n label: labelEdge !== 'none' ? labelComp : undefined,\n labelEdge: labelEdge !== 'none' ? labelEdge : undefined,\n labelStartWidth: labelEdge !== 'none' ? labelStartWidth : undefined\n };\n\n const ariaLabel = labelEdge === 'none' ? label : undefined;\n const isInlineDensity =\n userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';\n\n const inlineUserAssistance = isInlineDensity ? (\n isDisabled || isReadonly ? (\n // save space for user assistance if density is 'efficient', even though we don't\n // render user assistance for disabled or readonly fields\n userAssistanceDensity !== 'efficient' ? undefined : (\n <InlineUserAssistance\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : (\n <InlineUserAssistance\n assistiveText={assistiveText}\n fieldLabel={label}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n messages={allMessages}\n isRequiredShown={isRequiredShown}\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : undefined;\n\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const compactUserAssistance =\n userAssistanceDensity === 'compact' ? (\n <CompactUserAssistance\n anchorRef={anchorRef}\n messages={allMessages}\n assistiveText={assistiveText}\n {...userAssistanceProps}\n />\n ) : undefined;\n\n if (isReadonly) {\n const mainContent = (\n <ReadonlyTextFieldInput\n aria-describedby={inputProps['aria-describedby']}\n aria-label={ariaLabel}\n aria-labelledby={labelProps.id}\n as=\"textarea\"\n elementRef={readonlyElementRef}\n rows={rows}\n autoFocus={autoFocus}\n textAlign={textAlign}\n value={value}\n variant=\"textarea\"\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={label !== undefined && labelEdge === 'inside'}\n />\n );\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <ReadonlyTextField\n role=\"presentation\"\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n ref={anchorRef}\n testId={testId}\n variant=\"textarea\"\n mainContent={mainContent}\n resize={resize}\n {...fieldLabelProps}\n />\n </FormFieldContext.Provider>\n );\n }\n const hasMaxLength = maxLength !== undefined;\n const mainContent = (\n <>\n <TextFieldInput\n as=\"textarea\"\n aria-label={ariaLabel}\n autoComplete={autoComplete}\n autoFocus={autoFocus}\n currentCommitValue={currentCommitValue}\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={labelComp !== undefined && labelEdge === 'inside'}\n isRequired={isRequired}\n inputRef={enabledElementRef}\n onCommit={onCommitAndDispatch}\n onInput={onFilteredInput}\n placeholder={placeholder}\n role={role}\n rows={rows}\n textAlign={textAlign}\n value={value}\n {...inputProps}\n />\n {maxLengthCounter === 'remaining' && hasMaxLength && (\n <MaxLengthCounter\n maxLength={maxLength}\n valueLength={valueLength}\n onClick={onClickCounter}\n />\n )}\n {hasMaxLength && (\n <HiddenAccessible id={maxLengthDescribedByIdRef.current} isHidden={true}>\n {translations.formControl_maxLength({\n MAX_LENGTH: `${maxLength}`\n })}\n </HiddenAccessible>\n )}\n {hasMaxLength && isFocused && (\n <MaxLengthLiveRegion\n maxLength={maxLength}\n valueLength={valueLength}\n testId={testId + '_remainingChars'}\n />\n )}\n </>\n );\n\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <TextField\n mainContent={mainContent}\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n onBlur={focusProps?.onFocusOut}\n onFocus={focusProps?.onFocusIn}\n mainFieldRef={anchorRef}\n resize={resize}\n testId={testId}\n {...textFieldProps}\n {...fieldLabelProps}></TextField>\n </FormFieldContext.Provider>\n );\n }\n);\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuLA;;AAEG;MACU,QAAQ,GAAG,UAAU,CAChC,CACE,EACE,kBAAkB,EAAE,eAAe,EACnC,aAAa,EACb,YAAY,GAAG,KAAK,EACpB,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,cAAc,EACd,cAAc,EACd,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,cAAc,EAC1B,UAAU,GAAG,KAAK,EAClB,eAAe,EACf,KAAK,EACL,SAAS,EAAE,aAAa,EACxB,eAAe,EAAE,mBAAmB,EACpC,SAAS,EACT,gBAAgB,GAAG,WAAW,EAC9B,aAAa,EACb,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EAAE,aAAa,EACxB,qBAAqB,EAAE,yBAAyB,EAChD,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,OAAO,EACP,QAAQ,EACR,MAAM,EACA,EACR,GAA4B,KAC1B;AACF,IAAA,MAAM,YAAY,GAAG,oBAAoB,CAAa,0BAA0B,CAAC,CAAC;IAClF,MAAM,wBAAwB,GAAG,SAAS;AACxC,UAAE,YAAY,CAAC,wBAAwB,CAAC;AACpC,YAAA,eAAe,EAAE,SAAS;SAC3B,CAAC;UACF,EAAE,CAAC;AAEP,IAAA,MAAM,EAAE,kBAAkB,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IAAI,EAAA,QAAA,EACpE,YAAY,CAAC,qBAAqB,CAAC;oBAClC,UAAU,EAAE,CAAG,EAAA,SAAS,CAAE,CAAA;AAC3B,iBAAA,CAAC,EACe,CAAA,CACpB,EACA,YAAY,IAAI,SAAS,KACxBA,GAAC,CAAA,mBAAmB,EAClB,EAAA,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,GAAG,iBAAiB,EAClC,CAAA,CACH,CACA,EAAA,CAAA,CACJ,CAAC;IAEF,QACEA,GAAC,CAAA,gBAAgB,CAAC,QAAQ,EAAC,EAAA,KAAK,EAAE,gBAAgB,EAChD,QAAA,EAAAA,GAAA,CAAC,SAAS,EAAA,EACR,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,qBAAqB,EAAE,qBAAqB,EAC5C,oBAAoB,EAAE,oBAAoB,EAC1C,MAAM,EAAE,UAAU,EAAE,UAAU,EAC9B,OAAO,EAAE,UAAU,EAAE,SAAS,EAC9B,YAAY,EAAE,SAAS,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EAAA,GACV,cAAc,EAAA,GACd,eAAe,EAAA,CAAc,EACT,CAAA,EAC5B;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"TextArea-096f18ad.js","sources":["../../src/UNSAFE_TextArea/TextArea.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps, Ref } from 'preact';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'preact/compat';\nimport { useFormContext } from '../hooks/UNSAFE_useFormContext';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { FocusableHandle, useFocusableTextField } from '../hooks/UNSAFE_useFocusableTextField';\nimport { Label } from '../UNSAFE_Label';\nimport {\n ReadonlyTextField,\n ReadonlyTextFieldInput,\n TextField,\n TextFieldInput\n} from '../UNSAFE_TextField';\nimport { useTextField } from '../hooks/UNSAFE_useTextField';\nimport {\n CompactUserAssistance,\n InlineUserAssistance,\n UserAssistanceDensityType\n} from '../UNSAFE_UserAssistance';\nimport { CountUnit, useLengthFilter } from '../hooks/UNSAFE_useLengthFilter';\nimport { MaxLengthLiveRegion } from '../UNSAFE_TextField';\nimport { MaxLengthCounter } from './MaxLengthCounter';\nimport { Size } from '../utils/UNSAFE_size';\nimport { useCurrentValueReducer } from '../hooks/UNSAFE_useCurrentValueReducer';\nimport { ValueUpdateDetail } from '../utils/UNSAFE_valueUpdateDetail';\nimport { ComponentMessageItem } from '../UNSAFE_ComponentMessage';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { LayoutColumnSpan } from '../utils/UNSAFE_styles/Layout';\nimport type { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { useId } from '../hooks/UNSAFE_useId';\nimport { SelectableHandle, useSelectableTextField } from '#hooks/UNSAFE_useSelectableTextField';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\n\ntype TextFieldProps = ComponentProps<typeof TextField>;\ntype TextFieldInputProps = ComponentProps<typeof TextFieldInput>;\ntype InlineUserAssistanceProps = ComponentProps<typeof InlineUserAssistance>;\n\ntype Props = TestIdProps & {\n /**\n * The ID of an element (or space separated IDs of multiple elements) that\n * describes the input.\n */\n 'aria-describedby'?: TextFieldInputProps['aria-describedby'];\n\n /**\n * Text to provide guidance to help the user understand what to enter.\n */\n assistiveText?: InlineUserAssistanceProps['assistiveText'];\n /**\n * Dictates component's autocomplete state.\n * This attribute indicates whether the value of the control can be automatically completed by the browser.\n * The common values are \"on\" and \"off\".\n */\n autoComplete?: TextFieldInputProps['autoComplete'];\n /**\n * Autofocus specifies whether the component will get focus when the page is loaded.\n * If it is set to true then the associated component will get input focus when the page is loaded.\n * Setting this property doesn't set the focus to the component; it tells the browser to focus\n * to it when the element is inserted in the document.\n */\n autoFocus?: TextFieldInputProps['autoFocus'];\n /**\n * Specifies how many columns to span in a FormLayout with direction === 'row'\n */\n columnSpan?: LayoutColumnSpan;\n /**\n * Help source URL associated with the component.\n */\n helpSourceLink?: InlineUserAssistanceProps['helpSourceLink'];\n /**\n * Custom text to be rendered for the <code>helpSourceLink</code>.\n */\n helpSourceText?: InlineUserAssistanceProps['helpSourceText'];\n /**\n * Specifies whether the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n /**\n * Specifies for accessibility purposes whether a value is required.\n *\n * Setting this property to <code>false</code> means that a value is not required to be\n * committed by the user. Setting this property to <code>true</code> means that a value\n * is required to be committed by the user.\n */\n isRequired?: TextFieldInputProps['isRequired'];\n /**\n * Specifies whether to show an indicator on screen that a value is required, for example\n * before the user has committed a value.\n */\n isRequiredShown?: InlineUserAssistanceProps['isRequiredShown'];\n /**\n * Specifies the label associated with the field.\n */\n label: string;\n /**\n * Specifies where the label is positioned relative to the field.\n */\n labelEdge?: 'inside' | 'start' | 'top' | 'none';\n /**\n * Specifies the width of the label when <code>labelEdge</code> is <code>\"start\"</code>\n */\n labelStartWidth?: Size;\n /**\n * Specifies the maximum number of characters that can be entered in the input field.\n */\n maxLength?: number;\n /**\n * Determines whether the remaining number of characters that can be entered is shown or not.\n */\n maxLengthCounter?: 'none' | 'remaining';\n /**\n * Specifies how the input text characters are to be counted when maxLength is specified.\n */\n maxLengthUnit?: CountUnit;\n /**\n * Messages to show on screen that are associated with the component.\n */\n messages?: InlineUserAssistanceProps['messages'];\n /**\n * A short hint to display before the user enters a value.\n */\n placeholder?: TextFieldInputProps['placeholder'];\n /**\n * Specifies how the user is allowed to manually resize the TextArea component.\n */\n resize?: TextFieldProps['resize'];\n /**\n * Specifies the ARIA role type.\n */\n role?: TextFieldInputProps['role'];\n /**\n * Specifies the number of rows to display\n */\n rows?: TextFieldInputProps['rows'];\n /**\n * Specifies how to align text within the field.\n */\n textAlign?: TextFieldInputProps['textAlign'];\n /**\n * Specifies the density of the user assistance presentation. It can be set to:\n * <ul>\n * <li><code>'efficient'</code>: Show inline and reserve space to prevent layout reflow when user\n * assistance text is displayed.</li>\n * <li><code>'reflow'</code>: Show inline. Layout will reflow when text is displayed.</li>\n * <li><code>'compact'</code>: Messages, help, hints, and required will not be shown inline; they will show in a mode that keeps the screen more compact, like a popup for the messages, and a required icon to indicate Required. </li>\n * </ul>\n */\n userAssistanceDensity?: UserAssistanceDensityType;\n /**\n * The current display value of the component.\n */\n value?: TextFieldInputProps['value'];\n /**\n * The style variant of the component.\n */\n variant?: TextFieldInputProps['variant'];\n /**\n * Callback invoked when the user commits the entered value by blurring out of the field.\n */\n onCommit?: TextFieldInputProps['onCommit'];\n /**\n * Callback invoked each time the user changes the value of the field. For example, if the user\n * types 'abcd', this callback will be called four times with the value as 'a', 'ab', 'abc' and 'abcd'\n * respectively.\n */\n onInput: TextFieldInputProps['onInput'];\n};\n\ntype FocusSelectHandle = FocusableHandle & Partial<SelectableHandle>;\n\n/**\n * A text area displays a field that allows a user to enter a multi-line text value.\n */\nexport const TextArea = forwardRef(\n (\n {\n 'aria-describedby': ariaDescribedBy,\n assistiveText,\n autoComplete = 'off',\n autoFocus = false,\n columnSpan,\n helpSourceLink,\n helpSourceText,\n isDisabled: propIsDisabled,\n isReadonly: propIsReadonly,\n isRequired = false,\n isRequiredShown,\n label,\n labelEdge: propLabelEdge,\n labelStartWidth: propLabelStartWidth,\n maxLength,\n maxLengthCounter = 'remaining',\n maxLengthUnit,\n messages,\n placeholder,\n resize,\n role,\n rows,\n textAlign: propTextAlign,\n userAssistanceDensity: propUserAssistanceDensity,\n value,\n variant = 'default',\n onInput,\n onCommit,\n testId\n }: Props,\n ref?: Ref<FocusSelectHandle>\n ) => {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const formControl_limitReached = maxLength\n ? translations.formControl_limitReached({\n CHARACTER_LIMIT: maxLength\n })\n : '';\n\n const { currentCommitValue, dispatch } = useCurrentValueReducer({ value });\n const onInputAndDispatch = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)\n dispatch({ type: 'input', payload: detail.value });\n onInput?.(detail);\n },\n [onInput, dispatch]\n );\n const onCommitAndDispatch = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)\n dispatch({ type: 'commit', payload: detail.value });\n onCommit?.(detail);\n },\n [onCommit, dispatch]\n );\n const {\n isDisabled: isFormDisabled,\n isReadonly: isFormReadonly,\n labelEdge: formLabelEdge,\n labelStartWidth: formLabelStartWidth,\n textAlign: formTextAlign,\n userAssistanceDensity: formUserAssistanceDensity\n } = useFormContext();\n\n // default to FormContext values if component properties are not specified\n const isDisabled = propIsDisabled ?? isFormDisabled;\n const isReadonly = propIsReadonly ?? isFormReadonly;\n const labelEdge = propLabelEdge ?? formLabelEdge;\n const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;\n const textAlign = propTextAlign ?? formTextAlign;\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n const maxLengthDescribedByIdRef = useRef<string>(useId());\n // The enabledAriaDescribedBy includes the maxLengthDescribedById in addition to what was passed in to aria-describedby.\n // We don't need to announce the max length message for readonly, as it only applies when editing the value.\n const enabledAriaDescribedBy = ariaDescribedBy\n ? `${ariaDescribedBy} ${maxLengthDescribedByIdRef.current}`\n : maxLengthDescribedByIdRef.current;\n\n const enabledElementRef = useRef<HTMLTextAreaElement>(null);\n const readonlyElementRef = useRef<HTMLTextAreaElement>(null);\n\n const {\n focusProps,\n isFocused,\n methods: focusMethods\n } = useFocusableTextField<HTMLTextAreaElement, HTMLTextAreaElement>({\n isDisabled,\n isReadonly,\n enabledElementRef,\n readonlyElementRef\n });\n\n const { methods: selectMethods } =\n useSelectableTextField<HTMLTextAreaElement>(enabledElementRef);\n\n useImperativeHandle(ref!, () => mergeProps(focusMethods, selectMethods), [\n focusMethods,\n selectMethods\n ]);\n\n // Handle length filter for user-typed inputs and controlled inputs\n const { isMaxLengthReached, valueLength, onFilteredInput } = useLengthFilter({\n maxLength,\n maxLengthUnit,\n value,\n onInput: onInputAndDispatch,\n onCommit: onCommitAndDispatch\n });\n\n const limitMessage = [{ detail: formControl_limitReached, severity: 'info' }];\n const allMessages = [\n ...(messages ?? []),\n ...(isMaxLengthReached ? limitMessage : [])\n ] as ComponentMessageItem[];\n\n const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } =\n useTextField({\n ariaDescribedBy: isReadonly || isDisabled ? ariaDescribedBy : enabledAriaDescribedBy,\n contentVariant: 'textarea',\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isFocused,\n isReadonly,\n isRequiredShown,\n labelEdge,\n messages: allMessages,\n styleVariant: variant,\n userAssistanceDensity,\n value\n });\n\n const onClickCounter = useCallback(() => {\n const elm = enabledElementRef.current;\n // for setSelectionRange(), len needs to be a number or null.\n const len = elm ? elm.value.length : null;\n // Since the counter element is after the text, clicking in this\n // should put the selection at the end of the text\n enabledElementRef.current?.setSelectionRange(len, len);\n // Clicking the counter should put the focus on the input field\n enabledElementRef.current?.focus();\n }, [enabledElementRef]);\n\n const labelComp = labelEdge !== 'none' ? <Label {...labelProps}>{label}</Label> : undefined;\n\n const fieldLabelProps = {\n label: labelEdge !== 'none' ? labelComp : undefined,\n labelEdge: labelEdge !== 'none' ? labelEdge : undefined,\n labelStartWidth: labelEdge !== 'none' ? labelStartWidth : undefined\n };\n\n const ariaLabel = labelEdge === 'none' ? label : undefined;\n const isInlineDensity =\n userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';\n\n const inlineUserAssistance = isInlineDensity ? (\n isDisabled || isReadonly ? (\n // save space for user assistance if density is 'efficient', even though we don't\n // render user assistance for disabled or readonly fields\n userAssistanceDensity !== 'efficient' ? undefined : (\n <InlineUserAssistance\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : (\n <InlineUserAssistance\n assistiveText={assistiveText}\n fieldLabel={label}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n messages={allMessages}\n isRequiredShown={isRequiredShown}\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : undefined;\n\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const compactUserAssistance =\n userAssistanceDensity === 'compact' ? (\n <CompactUserAssistance\n anchorRef={anchorRef}\n messages={allMessages}\n assistiveText={assistiveText}\n {...userAssistanceProps}\n />\n ) : undefined;\n\n if (isReadonly) {\n const mainContent = (\n <ReadonlyTextFieldInput\n aria-describedby={inputProps['aria-describedby']}\n aria-label={ariaLabel}\n aria-labelledby={labelProps.id}\n as=\"textarea\"\n elementRef={readonlyElementRef}\n rows={rows}\n autoFocus={autoFocus}\n textAlign={textAlign}\n value={value}\n variant=\"textarea\"\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={label !== undefined && labelEdge === 'inside'}\n />\n );\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <ReadonlyTextField\n role=\"presentation\"\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n ref={anchorRef}\n testId={testId}\n variant=\"textarea\"\n mainContent={mainContent}\n resize={resize}\n {...fieldLabelProps}\n />\n </FormFieldContext.Provider>\n );\n }\n const hasMaxLength = maxLength !== undefined;\n const mainContent = (\n <>\n <TextFieldInput\n as=\"textarea\"\n aria-label={ariaLabel}\n autoComplete={autoComplete}\n autoFocus={autoFocus}\n currentCommitValue={currentCommitValue}\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={labelComp !== undefined && labelEdge === 'inside'}\n isRequired={isRequired}\n inputRef={enabledElementRef}\n onCommit={onCommitAndDispatch}\n onInput={onFilteredInput}\n placeholder={placeholder}\n role={role}\n rows={rows}\n textAlign={textAlign}\n value={value}\n {...inputProps}\n />\n {maxLengthCounter === 'remaining' && hasMaxLength && (\n <MaxLengthCounter\n maxLength={maxLength}\n valueLength={valueLength}\n onClick={onClickCounter}\n />\n )}\n {hasMaxLength && (\n <HiddenAccessible id={maxLengthDescribedByIdRef.current} isHidden={true}>\n {translations.formControl_maxLength({\n MAX_LENGTH: `${maxLength}`\n })}\n </HiddenAccessible>\n )}\n {hasMaxLength && isFocused && (\n <MaxLengthLiveRegion\n maxLength={maxLength}\n valueLength={valueLength}\n testId={testId + '_remainingChars'}\n />\n )}\n </>\n );\n\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <TextField\n mainContent={mainContent}\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n onBlur={focusProps?.onFocusOut}\n onFocus={focusProps?.onFocusIn}\n mainFieldRef={anchorRef}\n resize={resize}\n testId={testId}\n {...textFieldProps}\n {...fieldLabelProps}></TextField>\n </FormFieldContext.Provider>\n );\n }\n);\n"],"names":["forwardRef","useTranslationBundle","useCurrentValueReducer","useCallback","useFormContext","useRef","useId","useFocusableTextField","useSelectableTextField","useImperativeHandle","mergeProps","useLengthFilter","useTextField","_jsx","Label","InlineUserAssistance","CompactUserAssistance","ReadonlyTextFieldInput","FormFieldContext","ReadonlyTextField","_jsxs","_Fragment","TextFieldInput","MaxLengthCounter","HiddenAccessible","MaxLengthLiveRegion","TextField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuLA;;AAEG;MACU,QAAQ,GAAGA,iBAAU,CAChC,CACE,EACE,kBAAkB,EAAE,eAAe,EACnC,aAAa,EACb,YAAY,GAAG,KAAK,EACpB,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,cAAc,EACd,cAAc,EACd,UAAU,EAAE,cAAc,EAC1B,UAAU,EA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AO,EAAE,UAAU,EAAE,SAAS,EAC9B,YAAY,EAAE,SAAS,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EAAA,GACV,cAAc,EAAA,GACd,eAAe,EAAA,CAAc,EACT,CAAA,EAC5B;AACJ,CAAC;;;;"}
@@ -43,8 +43,8 @@ var HiddenAccessible = require('./HiddenAccessible-087eb49a.js');
43
43
  require('./UNSAFE_Popup/themes/redwood/PopupVariants.css.js');
44
44
  var useLengthFilter = require('./useLengthFilter-d4cb6f47.js');
45
45
  var useCurrentValueReducer = require('./useCurrentValueReducer-f37ac024.js');
46
- var TextArea = require('./TextArea-792069d7.js');
47
46
  var useSelectableTextField = require('./useSelectableTextField-892b62db.js');
47
+ var MaxLengthCounter = require('./MaxLengthCounter-a5370f66.js');
48
48
 
49
49
  // returns the lineHeight as a number of pixels.
50
50
  const calculateLineHeight = (textarea) => {
@@ -235,11 +235,11 @@ textAlign: propTextAlign, userAssistanceDensity: propUserAssistanceDensity, valu
235
235
  return (jsxRuntime.jsx(FormFieldContext.FormFieldContext.Provider, { value: formFieldContext, children: jsxRuntime.jsx(StyledTextField.ReadonlyTextField, { role: "presentation", colSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, variant: "textarea", mainContent: mainContent, ref: anchorRef, testId: testId, ...fieldLabelProps }) }));
236
236
  }
237
237
  const hasMaxLength = maxLength !== undefined;
238
- const mainContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TextFieldInput.TextFieldInput, { as: "textarea", "aria-label": ariaLabel, autoComplete: autoComplete, autoFocus: autoFocus, currentCommitValue: currentCommitValue, hasEmptyLabel: label === '' && labelEdge === 'none', hasInsideLabel: labelComp !== undefined && labelEdge === 'inside', isRequired: isRequired, inputRef: enabledElementRef, onCommit: onCommitAndDispatch, onInput: onFilteredInput, placeholder: placeholder, role: role, rows: minRows, textAlign: textAlign, value: value, ...inputProps }), maxLengthCounter === 'remaining' && hasMaxLength && (jsxRuntime.jsx(TextArea.MaxLengthCounter, { maxLength: maxLength, valueLength: valueLength, onClick: onClickCounter })), hasMaxLength && (jsxRuntime.jsx(HiddenAccessible.HiddenAccessible, { id: maxLengthDescribedByIdRef.current, children: translations.formControl_maxLength({
238
+ const mainContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TextFieldInput.TextFieldInput, { as: "textarea", "aria-label": ariaLabel, autoComplete: autoComplete, autoFocus: autoFocus, currentCommitValue: currentCommitValue, hasEmptyLabel: label === '' && labelEdge === 'none', hasInsideLabel: labelComp !== undefined && labelEdge === 'inside', isRequired: isRequired, inputRef: enabledElementRef, onCommit: onCommitAndDispatch, onInput: onFilteredInput, placeholder: placeholder, role: role, rows: minRows, textAlign: textAlign, value: value, ...inputProps }), maxLengthCounter === 'remaining' && hasMaxLength && (jsxRuntime.jsx(MaxLengthCounter.MaxLengthCounter, { maxLength: maxLength, valueLength: valueLength, onClick: onClickCounter })), hasMaxLength && (jsxRuntime.jsx(HiddenAccessible.HiddenAccessible, { id: maxLengthDescribedByIdRef.current, children: translations.formControl_maxLength({
239
239
  MAX_LENGTH: `${maxLength}`
240
240
  }) })), hasMaxLength && isFocused && (jsxRuntime.jsx(MaxLengthLiveRegion.MaxLengthLiveRegion, { maxLength: maxLength, valueLength: valueLength, testId: testId + '_remainingChars' }))] }));
241
241
  return (jsxRuntime.jsx(FormFieldContext.FormFieldContext.Provider, { value: formFieldContext, children: jsxRuntime.jsx(TextField.TextField, { mainContent: mainContent, columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, onBlur: focusProps?.onFocusOut, onFocus: focusProps?.onFocusIn, mainFieldRef: anchorRef, testId: testId, ...textFieldProps, ...fieldLabelProps }) }));
242
242
  });
243
243
 
244
244
  exports.TextAreaAutosize = TextAreaAutosize;
245
- //# sourceMappingURL=TextAreaAutosize-1989de68.js.map
245
+ //# sourceMappingURL=TextAreaAutosize-4d30faec.js.map