@oracle/oraclejet-preact 21.0.0 → 21.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (898) hide show
  1. package/amd/{BaseDiagram-295ed9cc.js → BaseDiagram-7845a7ae.js} +2 -2
  2. package/amd/{BaseDiagram-295ed9cc.js.map → BaseDiagram-7845a7ae.js.map} +1 -1
  3. package/amd/{BaseNavigationListItem-299cbfab.js → BaseNavigationListItem-0efcad58.js} +2 -2
  4. package/amd/{BaseNavigationListItem-299cbfab.js.map → BaseNavigationListItem-0efcad58.js.map} +1 -1
  5. package/amd/{CollapsibleNavigationListExternalLinkItem-fcf1805d.js → CollapsibleNavigationListExternalLinkItem-06a92293.js} +2 -2
  6. package/amd/{CollapsibleNavigationListExternalLinkItem-fcf1805d.js.map → CollapsibleNavigationListExternalLinkItem-06a92293.js.map} +1 -1
  7. package/amd/{ColorInputText-55b31f03.js → ColorInputText-3ac0f956.js} +2 -2
  8. package/amd/{ColorInputText-55b31f03.js.map → ColorInputText-3ac0f956.js.map} +1 -1
  9. package/amd/ColorPickerVariants.styles.css +1 -1
  10. package/amd/ColorPickerVariants.styles2.css +1 -1
  11. package/amd/ColorSwatchVariants.styles.css +1 -1
  12. package/amd/ColorSwatchVariants.styles2.css +1 -1
  13. package/amd/ContainerDiagram-5e392270.js +2 -0
  14. package/amd/{ContainerDiagram-521f402a.js.map → ContainerDiagram-5e392270.js.map} +1 -1
  15. package/amd/ConveyorBeltVariants.styles.css +6 -6
  16. package/amd/ConveyorBeltVariants.styles2.css +6 -6
  17. package/amd/{Diagram-b73d20a3.js → Diagram-3ef5b038.js} +2 -2
  18. package/amd/{Diagram-b73d20a3.js.map → Diagram-3ef5b038.js.map} +1 -1
  19. package/amd/DiagramStyles.styles2.css +16 -10
  20. package/amd/DiagramStyles.styles3.css +10 -16
  21. package/amd/DrawerPopupVariants.styles.css +5 -5
  22. package/amd/DrawerPopupVariants.styles2.css +5 -5
  23. package/amd/Expander-4b1f2445.js +2 -0
  24. package/amd/{Expander-150fa95e.js.map → Expander-4b1f2445.js.map} +1 -1
  25. package/amd/FormLayoutVariants.styles.css +14 -14
  26. package/amd/FormLayoutVariants.styles2.css +14 -14
  27. package/amd/IndentedCellLayout-dc0896ab.js +1 -1
  28. package/amd/IndentedCellLayout-dc0896ab.js.map +1 -1
  29. package/amd/{InputColor-019b9397.js → InputColor-96a82077.js} +2 -2
  30. package/amd/{InputColor-019b9397.js.map → InputColor-96a82077.js.map} +1 -1
  31. package/amd/InputDatePicker-37824ba4.js +2 -0
  32. package/amd/{InputDatePicker-613800d1.js.map → InputDatePicker-37824ba4.js.map} +1 -1
  33. package/amd/ListStyles.styles.css +105 -7
  34. package/amd/ListStyles.styles2.css +7 -105
  35. package/amd/MeterCircleVariants.styles.css +8 -8
  36. package/amd/MeterCircleVariants.styles2.css +8 -8
  37. package/amd/NavigationListExternalLinkItem-382cd5a2.js +2 -0
  38. package/amd/{NavigationListExternalLinkItem-3d98a9e8.js.map → NavigationListExternalLinkItem-382cd5a2.js.map} +1 -1
  39. package/amd/NavigationListLinkItem-8ed2c18d.js +2 -0
  40. package/amd/{NavigationListLinkItem-c4b2b73c.js.map → NavigationListLinkItem-8ed2c18d.js.map} +1 -1
  41. package/amd/OverflowTabBar-9e7277f4.js +2 -0
  42. package/amd/OverflowTabBar-9e7277f4.js.map +1 -0
  43. package/amd/OverflowTabBarItem-7d80beed.js +2 -0
  44. package/amd/{OverflowTabBarItem-11f199ee.js.map → OverflowTabBarItem-7d80beed.js.map} +1 -1
  45. package/amd/PRIVATE_BaseDiagram.js +1 -1
  46. package/amd/PRIVATE_List/themes/ListStyles.css.js +1 -1
  47. package/amd/PRIVATE_List.js +1 -1
  48. package/amd/PRIVATE_SelectCommon.js +1 -1
  49. package/amd/PRIVATE_Table.js +1 -1
  50. package/amd/PRIVATE_TableList/themes/ListStyles.css.js +1 -1
  51. package/amd/PRIVATE_TableList/themes/redwood/ListTheme.js +1 -1
  52. package/amd/PRIVATE_TableList/themes/redwood/ListTheme.js.map +1 -1
  53. package/amd/PRIVATE_TableList/themes/redwood/ListVariants.css.js +1 -1
  54. package/amd/PRIVATE_TableList/themes/stable/ListTheme.js +1 -1
  55. package/amd/PRIVATE_TableList/themes/stable/ListTheme.js.map +1 -1
  56. package/amd/PRIVATE_TableList/themes/stable/ListVariants.css.js +1 -1
  57. package/amd/PRIVATE_TableList.js +1 -1
  58. package/amd/ProgressBarVariants.styles.css +1 -1
  59. package/amd/ProgressBarVariants.styles2.css +1 -1
  60. package/amd/ProgressCircleVariants.styles.css +4 -4
  61. package/amd/ProgressCircleVariants.styles2.css +4 -4
  62. package/amd/RadioIconVariants.styles.css +3 -3
  63. package/amd/RadioIconVariants.styles2.css +3 -3
  64. package/amd/{ReorderableTabBar-35cce8ac.js → ReorderableTabBar-7fb56c0b.js} +2 -2
  65. package/amd/{ReorderableTabBar-35cce8ac.js.map → ReorderableTabBar-7fb56c0b.js.map} +1 -1
  66. package/amd/SortControl-eb114fee.js +2 -0
  67. package/amd/{SortControl-115bc431.js.map → SortControl-eb114fee.js.map} +1 -1
  68. package/amd/TabBar-34e0073f.js +2 -0
  69. package/amd/TabBar-34e0073f.js.map +1 -0
  70. package/amd/{TabBarItem-191d0223.js → TabBarItem-60866864.js} +2 -2
  71. package/amd/{TabBarItem-191d0223.js.map → TabBarItem-60866864.js.map} +1 -1
  72. package/amd/TabBarItemVariants.styles.css +3 -3
  73. package/amd/TabBarItemVariants.styles2.css +3 -3
  74. package/amd/{TabBarLinkItem-5f376f4e.js → TabBarLinkItem-7b5b5b73.js} +2 -2
  75. package/amd/{TabBarLinkItem-5f376f4e.js.map → TabBarLinkItem-7b5b5b73.js.map} +1 -1
  76. package/amd/TabBarMixed-b61a657d.js +2 -0
  77. package/amd/{TabBarMixed-e16ca418.js.map → TabBarMixed-b61a657d.js.map} +1 -1
  78. package/amd/{Table-76c8555b.js → Table-caf0eeb9.js} +2 -2
  79. package/amd/{Table-76c8555b.js.map → Table-caf0eeb9.js.map} +1 -1
  80. package/amd/{TableDisplay-938d743b.js → TableDisplay-d2efde54.js} +2 -2
  81. package/amd/{TableDisplay-938d743b.js.map → TableDisplay-d2efde54.js.map} +1 -1
  82. package/amd/{TableView-490cc209.js → TableView-94381f75.js} +2 -2
  83. package/amd/{TableView-490cc209.js.map → TableView-94381f75.js.map} +1 -1
  84. package/amd/Theme-redwood/theme.css +301 -306
  85. package/amd/Theme-stable/theme.css +542 -537
  86. package/amd/TrainVariants.styles.css +6 -6
  87. package/amd/TrainVariants.styles2.css +6 -6
  88. package/amd/{TreeTableView-1b66b880.js → TreeTableView-ef0d26bd.js} +2 -2
  89. package/amd/{TreeTableView-1b66b880.js.map → TreeTableView-ef0d26bd.js.map} +1 -1
  90. package/amd/UNSAFE_CollapsibleNavigationList.js +1 -1
  91. package/amd/UNSAFE_ColorInputText.js +1 -1
  92. package/amd/UNSAFE_ColorPalette.js +1 -1
  93. package/amd/UNSAFE_ColorPicker/themes/redwood/ColorPickerTheme.js +1 -1
  94. package/amd/UNSAFE_ColorPicker/themes/redwood/ColorPickerTheme.js.map +1 -1
  95. package/amd/UNSAFE_ColorPicker/themes/redwood/ColorPickerVariants.css.js +1 -1
  96. package/amd/UNSAFE_ColorPicker/themes/stable/ColorPickerTheme.js +1 -1
  97. package/amd/UNSAFE_ColorPicker/themes/stable/ColorPickerTheme.js.map +1 -1
  98. package/amd/UNSAFE_ColorPicker/themes/stable/ColorPickerVariants.css.js +1 -1
  99. package/amd/UNSAFE_ColorPicker.js +1 -1
  100. package/amd/UNSAFE_ColorSwatch/themes/redwood/ColorSwatchTheme.js +1 -1
  101. package/amd/UNSAFE_ColorSwatch/themes/redwood/ColorSwatchTheme.js.map +1 -1
  102. package/amd/UNSAFE_ColorSwatch/themes/redwood/ColorSwatchVariants.css.js +1 -1
  103. package/amd/UNSAFE_ColorSwatch/themes/stable/ColorSwatchTheme.js +1 -1
  104. package/amd/UNSAFE_ColorSwatch/themes/stable/ColorSwatchTheme.js.map +1 -1
  105. package/amd/UNSAFE_ColorSwatch/themes/stable/ColorSwatchVariants.css.js +1 -1
  106. package/amd/UNSAFE_ColorSwatch.js +1 -1
  107. package/amd/UNSAFE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
  108. package/amd/UNSAFE_ContainerDiagram.js +1 -1
  109. package/amd/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltTheme.js +1 -1
  110. package/amd/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltTheme.js.map +1 -1
  111. package/amd/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltVariants.css.js +1 -1
  112. package/amd/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltTheme.js +1 -1
  113. package/amd/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltTheme.js.map +1 -1
  114. package/amd/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltVariants.css.js +1 -1
  115. package/amd/UNSAFE_ConveyorBelt.js +1 -1
  116. package/amd/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
  117. package/amd/UNSAFE_Diagram.js +1 -1
  118. package/amd/UNSAFE_DrawerPopup/themes/redwood/DrawerPopupTheme.js +1 -1
  119. package/amd/UNSAFE_DrawerPopup/themes/redwood/DrawerPopupTheme.js.map +1 -1
  120. package/amd/UNSAFE_DrawerPopup/themes/redwood/DrawerPopupVariants.css.js +1 -1
  121. package/amd/UNSAFE_DrawerPopup/themes/stable/DrawerPopupTheme.js +1 -1
  122. package/amd/UNSAFE_DrawerPopup/themes/stable/DrawerPopupTheme.js.map +1 -1
  123. package/amd/UNSAFE_DrawerPopup/themes/stable/DrawerPopupVariants.css.js +1 -1
  124. package/amd/UNSAFE_DrawerPopup.js +1 -1
  125. package/amd/UNSAFE_Expander.js +1 -1
  126. package/amd/UNSAFE_FormLayout/themes/redwood/FormLayoutTheme.js +1 -1
  127. package/amd/UNSAFE_FormLayout/themes/redwood/FormLayoutTheme.js.map +1 -1
  128. package/amd/UNSAFE_FormLayout/themes/redwood/FormLayoutVariants.css.js +1 -1
  129. package/amd/UNSAFE_FormLayout/themes/stable/FormLayoutTheme.js +1 -1
  130. package/amd/UNSAFE_FormLayout/themes/stable/FormLayoutTheme.js.map +1 -1
  131. package/amd/UNSAFE_FormLayout/themes/stable/FormLayoutVariants.css.js +1 -1
  132. package/amd/UNSAFE_FormLayout.js +1 -1
  133. package/amd/UNSAFE_HierarchicalList.js +1 -1
  134. package/amd/UNSAFE_IconProgressButton.js +1 -1
  135. package/amd/UNSAFE_IndentedCellLayout.js +1 -1
  136. package/amd/UNSAFE_InlineSelectSingle.js +1 -1
  137. package/amd/UNSAFE_InputColor.js +1 -1
  138. package/amd/UNSAFE_InputDatePicker.js +1 -1
  139. package/amd/UNSAFE_InputSearch.js +1 -1
  140. package/amd/UNSAFE_InputSearch.js.map +1 -1
  141. package/amd/UNSAFE_InputTimePicker.js +1 -1
  142. package/amd/UNSAFE_InputTimePicker.js.map +1 -1
  143. package/amd/UNSAFE_ListView.js +1 -1
  144. package/amd/UNSAFE_MeterCircle/themes/redwood/MeterCircleTheme.js +1 -1
  145. package/amd/UNSAFE_MeterCircle/themes/redwood/MeterCircleTheme.js.map +1 -1
  146. package/amd/UNSAFE_MeterCircle/themes/redwood/MeterCircleVariants.css.js +1 -1
  147. package/amd/UNSAFE_MeterCircle/themes/stable/MeterCircleTheme.js +1 -1
  148. package/amd/UNSAFE_MeterCircle/themes/stable/MeterCircleTheme.js.map +1 -1
  149. package/amd/UNSAFE_MeterCircle/themes/stable/MeterCircleVariants.css.js +1 -1
  150. package/amd/UNSAFE_MeterCircle.js +1 -1
  151. package/amd/UNSAFE_NavigationList.js +1 -1
  152. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  153. package/amd/UNSAFE_ProgressBar/themes/redwood/ProgressBarTheme.js +1 -1
  154. package/amd/UNSAFE_ProgressBar/themes/redwood/ProgressBarTheme.js.map +1 -1
  155. package/amd/UNSAFE_ProgressBar/themes/redwood/ProgressBarVariants.css.js +1 -1
  156. package/amd/UNSAFE_ProgressBar/themes/stable/ProgressBarTheme.js +1 -1
  157. package/amd/UNSAFE_ProgressBar/themes/stable/ProgressBarTheme.js.map +1 -1
  158. package/amd/UNSAFE_ProgressBar/themes/stable/ProgressBarVariants.css.js +1 -1
  159. package/amd/UNSAFE_ProgressBar.js +1 -1
  160. package/amd/UNSAFE_ProgressButton.js +1 -1
  161. package/amd/UNSAFE_ProgressButtonLabelLayout.js +1 -1
  162. package/amd/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleTheme.js +1 -1
  163. package/amd/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleTheme.js.map +1 -1
  164. package/amd/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleVariants.css.js +1 -1
  165. package/amd/UNSAFE_ProgressCircle/themes/stable/ProgressCircleTheme.js +1 -1
  166. package/amd/UNSAFE_ProgressCircle/themes/stable/ProgressCircleTheme.js.map +1 -1
  167. package/amd/UNSAFE_ProgressCircle/themes/stable/ProgressCircleVariants.css.js +1 -1
  168. package/amd/UNSAFE_ProgressCircle.js +1 -1
  169. package/amd/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js +1 -1
  170. package/amd/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js.map +1 -1
  171. package/amd/UNSAFE_RadioItem/themes/redwood/RadioIconVariants.css.js +1 -1
  172. package/amd/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js +1 -1
  173. package/amd/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js.map +1 -1
  174. package/amd/UNSAFE_RadioItem/themes/stable/RadioIconVariants.css.js +1 -1
  175. package/amd/UNSAFE_RadioItem.js +1 -1
  176. package/amd/UNSAFE_Refresher.js +1 -1
  177. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  178. package/amd/UNSAFE_RichSelectionItem.js +1 -1
  179. package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
  180. package/amd/UNSAFE_SelectMultiple.js +1 -1
  181. package/amd/UNSAFE_SelectSingle.js +1 -1
  182. package/amd/UNSAFE_SortControl.js +1 -1
  183. package/amd/UNSAFE_TabBar.js +1 -1
  184. package/amd/UNSAFE_TabBarCommon/themes/redwood/TabBarItemTheme.js +1 -1
  185. package/amd/UNSAFE_TabBarCommon/themes/redwood/TabBarItemTheme.js.map +1 -1
  186. package/amd/UNSAFE_TabBarCommon/themes/redwood/TabBarItemVariants.css.js +1 -1
  187. package/amd/UNSAFE_TabBarCommon/themes/stable/TabBarItemTheme.js +1 -1
  188. package/amd/UNSAFE_TabBarCommon/themes/stable/TabBarItemTheme.js.map +1 -1
  189. package/amd/UNSAFE_TabBarCommon/themes/stable/TabBarItemVariants.css.js +1 -1
  190. package/amd/UNSAFE_TabBarCommon.js +1 -1
  191. package/amd/UNSAFE_TabBarMixed.js +1 -1
  192. package/amd/UNSAFE_TableDisplay.js +1 -1
  193. package/amd/UNSAFE_TableView.js +1 -1
  194. package/amd/UNSAFE_TimePicker.js +1 -1
  195. package/amd/UNSAFE_Train/themes/redwood/TrainTheme.js +1 -1
  196. package/amd/UNSAFE_Train/themes/redwood/TrainTheme.js.map +1 -1
  197. package/amd/UNSAFE_Train/themes/redwood/TrainVariants.css.js +1 -1
  198. package/amd/UNSAFE_Train/themes/stable/TrainTheme.js +1 -1
  199. package/amd/UNSAFE_Train/themes/stable/TrainTheme.js.map +1 -1
  200. package/amd/UNSAFE_Train/themes/stable/TrainVariants.css.js +1 -1
  201. package/amd/UNSAFE_Train.js +1 -1
  202. package/amd/UNSAFE_TreeTableView.js +1 -1
  203. package/amd/UNSAFE_TreeView.js +1 -1
  204. package/amd/UNSAFE_VirtualizedListView.js +1 -1
  205. package/amd/hooks/PRIVATE_useDetectHorizontalOverflow.js +1 -1
  206. package/amd/hooks/PRIVATE_useTabBar.js +1 -1
  207. package/amd/useDetectHorizontalOverflow-88d9b328.js +2 -0
  208. package/amd/useDetectHorizontalOverflow-88d9b328.js.map +1 -0
  209. package/amd/useTabBar-edf8f8a1.js +2 -0
  210. package/amd/useTabBar-edf8f8a1.js.map +1 -0
  211. package/cjs/AvatarVariants.styles.css +25 -25
  212. package/cjs/AvatarVariants.styles2.css +25 -25
  213. package/cjs/{BaseCardView-e38589c6.js → BaseCardView-f3b3402b.js} +4 -1
  214. package/cjs/{BaseCardView-e38589c6.js.map → BaseCardView-f3b3402b.js.map} +1 -1
  215. package/cjs/ButtonLabelLayoutVariants.styles.css +8 -8
  216. package/cjs/ButtonLabelLayoutVariants.styles2.css +8 -8
  217. package/cjs/CheckboxIconVariants.styles.css +7 -7
  218. package/cjs/CheckboxIconVariants.styles2.css +7 -7
  219. package/cjs/ColorPickerVariants.styles.css +1 -1
  220. package/cjs/ColorPickerVariants.styles2.css +1 -1
  221. package/cjs/ConveyorBeltVariants.styles.css +6 -6
  222. package/cjs/ConveyorBeltVariants.styles2.css +6 -6
  223. package/cjs/DiagramStyles.styles.css +12 -81
  224. package/cjs/DiagramStyles.styles2.css +81 -12
  225. package/cjs/InputSearchVariants.styles.css +3 -3
  226. package/cjs/InputSearchVariants.styles2.css +3 -3
  227. package/cjs/{List-eea800fd.js → List-436100e1.js} +3 -1
  228. package/cjs/{List-eea800fd.js.map → List-436100e1.js.map} +1 -1
  229. package/cjs/MeterBarVariants.styles.css +4 -4
  230. package/cjs/MeterBarVariants.styles2.css +4 -4
  231. package/cjs/NavigationListItemVariants.styles.css +5 -5
  232. package/cjs/NavigationListItemVariants.styles2.css +5 -5
  233. package/cjs/PRIVATE_BaseCardView.js +1 -1
  234. package/cjs/PRIVATE_SelectCommon.js +2 -2
  235. package/cjs/PRIVATE_TableList.js +1 -1
  236. package/cjs/ProgressBarVariants.styles.css +1 -1
  237. package/cjs/ProgressBarVariants.styles2.css +1 -1
  238. package/cjs/ProgressCircleVariants.styles.css +4 -4
  239. package/cjs/ProgressCircleVariants.styles2.css +4 -4
  240. package/cjs/RadioIconVariants.styles.css +3 -3
  241. package/cjs/RadioIconVariants.styles2.css +3 -3
  242. package/cjs/{TabBar-1cd4ac17.js → TabBar-ba4bcd32.js} +9 -5
  243. package/cjs/TabBar-ba4bcd32.js.map +1 -0
  244. package/cjs/TabBarItemVariants.styles.css +3 -3
  245. package/cjs/TabBarItemVariants.styles2.css +3 -3
  246. package/cjs/Theme-redwood/theme.css +413 -413
  247. package/cjs/Theme-stable/theme.css +559 -559
  248. package/cjs/{TimePicker-25997417.js → TimePicker-fe817eb1.js} +2 -2
  249. package/cjs/{TimePicker-25997417.js.map → TimePicker-fe817eb1.js.map} +1 -1
  250. package/cjs/UNSAFE_CardFlexView.js +1 -1
  251. package/cjs/UNSAFE_CardGridView.js +1 -1
  252. package/cjs/UNSAFE_ColorInputText.js +82 -82
  253. package/cjs/UNSAFE_HierarchicalList.js +1 -1
  254. package/cjs/UNSAFE_InlineSelectSingle.js +3 -3
  255. package/cjs/UNSAFE_InputColor.js +82 -82
  256. package/cjs/UNSAFE_InputSearch.js +1 -1
  257. package/cjs/UNSAFE_InputTimePicker.js +2 -2
  258. package/cjs/UNSAFE_ListView.js +1 -1
  259. package/cjs/UNSAFE_OverflowTabBar.js +9 -5
  260. package/cjs/UNSAFE_OverflowTabBar.js.map +1 -1
  261. package/cjs/UNSAFE_ReorderableTabBar.js +13 -13
  262. package/cjs/UNSAFE_RichSelectionItem.js +1 -1
  263. package/cjs/UNSAFE_SelectMultiple.js +2 -2
  264. package/cjs/UNSAFE_SelectSingle.js +3 -3
  265. package/cjs/UNSAFE_TabBar.js +3 -3
  266. package/cjs/UNSAFE_TabBarMixed.js +26 -26
  267. package/cjs/UNSAFE_TabBarMixed.js.map +1 -1
  268. package/cjs/UNSAFE_TextArea.js +174 -72
  269. package/cjs/UNSAFE_TextArea.js.map +1 -1
  270. package/cjs/UNSAFE_TextAreaAutosize.js +3 -3
  271. package/cjs/UNSAFE_TextAreaAutosize.js.map +1 -1
  272. package/cjs/UNSAFE_TimePicker.js +2 -2
  273. package/cjs/UNSAFE_TreeView.js +1 -1
  274. package/cjs/dropdownStyles.styles.css +104 -6
  275. package/cjs/dropdownStyles.styles2.css +6 -104
  276. package/cjs/hooks/PRIVATE_useDetectHorizontalOverflow.js +1 -1
  277. package/cjs/hooks/PRIVATE_useTabBar.js +1 -1
  278. package/cjs/{useDetectHorizontalOverflow-622817d4.js → useDetectHorizontalOverflow-15084cbf.js} +30 -58
  279. package/cjs/useDetectHorizontalOverflow-15084cbf.js.map +1 -0
  280. package/cjs/{useDisplayValue-ce2d071e.js → useDisplayValue-777c9be5.js} +2 -2
  281. package/cjs/{useDisplayValue-ce2d071e.js.map → useDisplayValue-777c9be5.js.map} +1 -1
  282. package/cjs/{useSelectCommon-544c22ee.js → useSelectCommon-bb44fdb6.js} +2 -2
  283. package/cjs/{useSelectCommon-544c22ee.js.map → useSelectCommon-bb44fdb6.js.map} +1 -1
  284. package/cjs/{useTabBar-ec20851a.js → useTabBar-1cfaf3e6.js} +2 -5
  285. package/cjs/useTabBar-1cfaf3e6.js.map +1 -0
  286. package/cjs/useTextAreaAltEnter-27263abe.js +68 -0
  287. package/cjs/useTextAreaAltEnter-27263abe.js.map +1 -0
  288. package/es/BaseBarChart-26b0e87c.js +3 -3
  289. package/es/BaseBarGroup-ff0495d8.js +1 -1
  290. package/es/{BaseButton-77bb9d91.js → BaseButton-f3a607e1.js} +2 -2
  291. package/es/{BaseButton-77bb9d91.js.map → BaseButton-f3a607e1.js.map} +1 -1
  292. package/es/BaseCardView-21ee7272.js +6 -6
  293. package/es/BaseDiagram-c48f2fc4.js +7 -7
  294. package/es/BaseNavigationListItem-973e1502.js +5 -5
  295. package/es/BaseRichSelection-b0ee75b8.js +9 -9
  296. package/es/BaseSelector-33194eea.js +1 -1
  297. package/es/BaseSwatchView-028f6717.js +2 -2
  298. package/es/{Button-64b2d5c7.js → Button-166a6aa3.js} +2 -2
  299. package/es/{Button-64b2d5c7.js.map → Button-166a6aa3.js.map} +1 -1
  300. package/es/ButtonSet-6cba414c.js +2 -2
  301. package/es/ButtonSetButton-125e316b.js +1 -1
  302. package/es/ButtonSetIconButton-8b969ad2.js +4 -4
  303. package/es/{Center-e2a7c4c7.js → Center-0388bd0c.js} +2 -2
  304. package/es/{Center-e2a7c4c7.js.map → Center-0388bd0c.js.map} +1 -1
  305. package/es/Chart-5d837bee.js +11 -11
  306. package/es/CheckboxControl-777f547a.js +6 -6
  307. package/es/CheckboxRadioField-b332f3ef.js +6 -6
  308. package/es/CheckboxRadioLabelValueLayout-05524fdf.js +1 -1
  309. package/es/CheckboxSetContext-1be56556.js +9 -0
  310. package/es/CheckboxSetContext-1be56556.js.map +1 -0
  311. package/es/Chip-a0b982b3.js +1 -1
  312. package/es/ClearIcon-f9ae8ca2.js +1 -1
  313. package/es/CollapseIcon-134ba4b8.js +1 -1
  314. package/es/Collapsible-6a2da8e9.js +2 -2
  315. package/es/ColorPalette-660c0665.js +4 -4
  316. package/es/{ColorPicker-d399a2dc.js → ColorPicker-98ba93ac.js} +3 -3
  317. package/es/{ColorPicker-d399a2dc.js.map → ColorPicker-98ba93ac.js.map} +1 -1
  318. package/es/ColorSwatch-ac777ee8.js +5 -5
  319. package/es/{CompactLabelAssistance-db24bf83.js → CompactLabelAssistance-44907e8b.js} +6 -6
  320. package/es/{CompactLabelAssistance-db24bf83.js.map → CompactLabelAssistance-44907e8b.js.map} +1 -1
  321. package/es/CompactUserAssistance-80d7ed0f.js +6 -6
  322. package/es/ComponentMessageContainer-f95c0576.js +4 -4
  323. package/es/{DatePicker-56fb4fcf.js → DatePicker-659b8c72.js} +8 -8
  324. package/es/{DatePicker-56fb4fcf.js.map → DatePicker-659b8c72.js.map} +1 -1
  325. package/es/DatePickerHeader-2fa4dff3.js +3 -3
  326. package/es/{Dialog-6fc62c1d.js → Dialog-c1502d03.js} +7 -7
  327. package/es/{Dialog-6fc62c1d.js.map → Dialog-c1502d03.js.map} +1 -1
  328. package/es/DirectionalCollapseArrowIcon-1f47a4a6.js +1 -1
  329. package/es/DirectionalExpandArrowIcon-ddaa04dc.js +1 -1
  330. package/es/{Dropdown-a3e401ae.js → Dropdown-e3f6f436.js} +6 -6
  331. package/es/{Dropdown-a3e401ae.js.map → Dropdown-e3f6f436.js.map} +1 -1
  332. package/es/{EmbeddedIconButton-3824dbe1.js → EmbeddedIconButton-8dca2a64.js} +2 -2
  333. package/es/{EmbeddedIconButton-3824dbe1.js.map → EmbeddedIconButton-8dca2a64.js.map} +1 -1
  334. package/es/{EmbeddedTextField-12d0e0a7.js → EmbeddedTextField-e4b319a0.js} +2 -2
  335. package/es/{EmbeddedTextField-12d0e0a7.js.map → EmbeddedTextField-e4b319a0.js.map} +1 -1
  336. package/es/{EnvironmentProvider-12bbb301.js → EnvironmentProvider-60423f29.js} +3 -3
  337. package/es/{EnvironmentProvider-12bbb301.js.map → EnvironmentProvider-60423f29.js.map} +1 -1
  338. package/es/Expander-19633442.js +2 -2
  339. package/es/FilmStrip-c0155ba5.js +1 -1
  340. package/es/{Flex-f0f1bb0d.js → Flex-f5fe143f.js} +2 -2
  341. package/es/{Flex-f0f1bb0d.js.map → Flex-f5fe143f.js.map} +1 -1
  342. package/es/{Floating-87cd2bbf.js → Floating-91e0f4c1.js} +4 -4
  343. package/es/{Floating-87cd2bbf.js.map → Floating-91e0f4c1.js.map} +1 -1
  344. package/es/FormLayoutVariants.styles.css +14 -14
  345. package/es/FormLayoutVariants.styles2.css +14 -14
  346. package/es/{Grid-45385814.js → Grid-67dc57cb.js} +2 -2
  347. package/es/{Grid-45385814.js.map → Grid-67dc57cb.js.map} +1 -1
  348. package/es/{HighlightText-39c46ea1.js → HighlightText-790fa99f.js} +2 -2
  349. package/es/{HighlightText-39c46ea1.js.map → HighlightText-790fa99f.js.map} +1 -1
  350. package/es/Icon-c0fda273.js +3 -3
  351. package/es/IconButton-94077753.js +4 -4
  352. package/es/IconSwitchButton-ced93277.js +4 -4
  353. package/es/IconToggleButton-8605dd2d.js +4 -4
  354. package/es/{IconUserAssistance-b03771f5.js → IconUserAssistance-16f55b57.js} +3 -3
  355. package/es/{IconUserAssistance-b03771f5.js.map → IconUserAssistance-16f55b57.js.map} +1 -1
  356. package/es/InlineHelp-6a8bd475.js +1 -1
  357. package/es/InlineUserAssistance-5d329af5.js +5 -5
  358. package/es/InputDateMask-9255cb45.js +6 -6
  359. package/es/InputSearchVariants.styles.css +3 -3
  360. package/es/InputSearchVariants.styles2.css +3 -3
  361. package/es/InputTimeMask-8f552768.js +6 -6
  362. package/es/Label-293073f5.js +8 -8
  363. package/es/LabelValueLayout-cb1f7711.js +1 -1
  364. package/es/{Layer-937ca8d8.js → Layer-542de448.js} +3 -3
  365. package/es/{Layer-937ca8d8.js.map → Layer-542de448.js.map} +1 -1
  366. package/es/{LayerHost-20500ac8.js → LayerHost-c4481db3.js} +2 -2
  367. package/es/{LayerHost-20500ac8.js.map → LayerHost-c4481db3.js.map} +1 -1
  368. package/es/{LayerManager-55001240.js → LayerManager-4b79a6a2.js} +2 -2
  369. package/es/{LayerManager-55001240.js.map → LayerManager-4b79a6a2.js.map} +1 -1
  370. package/es/Link-530a365a.js +1 -1
  371. package/es/List-5419d582.js +4 -4
  372. package/es/List-eab74f6d.js +8 -8
  373. package/es/{ListItemLayout-bcebf158.js → ListItemLayout-bc6fb853.js} +2 -2
  374. package/es/{ListItemLayout-bcebf158.js.map → ListItemLayout-bc6fb853.js.map} +1 -1
  375. package/es/ListStyles.styles.css +7 -105
  376. package/es/ListStyles.styles2.css +105 -7
  377. package/es/{LiveRegion-bd98c133.js → LiveRegion-74d90422.js} +2 -2
  378. package/es/{LiveRegion-bd98c133.js.map → LiveRegion-74d90422.js.map} +1 -1
  379. package/es/{MaxLengthLiveRegion-8551ea6a.js → MaxLengthLiveRegion-96ac8f1c.js} +3 -3
  380. package/es/{MaxLengthLiveRegion-8551ea6a.js.map → MaxLengthLiveRegion-96ac8f1c.js.map} +1 -1
  381. package/es/MenuItemVariants.styles.css +8 -8
  382. package/es/MenuItemVariants.styles2.css +8 -8
  383. package/es/Message-f941b6ee.js +2 -2
  384. package/es/{MessageLayer-0523ebac.js → MessageLayer-7aad786a.js} +6 -6
  385. package/es/{MessageLayer-0523ebac.js.map → MessageLayer-7aad786a.js.map} +1 -1
  386. package/es/MessagesManager-a42ca15e.js +3 -3
  387. package/es/MeterCircleVariants.styles.css +8 -8
  388. package/es/MeterCircleVariants.styles2.css +8 -8
  389. package/es/Modal-863676e2.js +3 -3
  390. package/es/{MonthView-31ced05b.js → MonthView-5ba0a449.js} +5 -5
  391. package/es/{MonthView-31ced05b.js.map → MonthView-5ba0a449.js.map} +1 -1
  392. package/es/NavigationList-0281b772.js +4 -4
  393. package/es/{NumberInputText-8c8fffa0.js → NumberInputText-e001d629.js} +7 -7
  394. package/es/{NumberInputText-8c8fffa0.js.map → NumberInputText-e001d629.js.map} +1 -1
  395. package/es/OverflowTabBarItem-75b943ec.js +8 -8
  396. package/es/PRIVATE_BaseBarChart.js +37 -37
  397. package/es/PRIVATE_BaseCardView.js +22 -22
  398. package/es/PRIVATE_BaseDiagram.js +30 -30
  399. package/es/PRIVATE_BaseSelector.js +17 -17
  400. package/es/PRIVATE_BaseSwatchView.js +18 -18
  401. package/es/PRIVATE_Chart.js +36 -36
  402. package/es/PRIVATE_CheckboxControl.js +25 -25
  403. package/es/PRIVATE_CheckboxRadioField.js +27 -27
  404. package/es/PRIVATE_ClearIcon.js +18 -18
  405. package/es/PRIVATE_DatePickerHeader.js +20 -20
  406. package/es/PRIVATE_DatePickerLayout.js +4 -4
  407. package/es/PRIVATE_EmbeddedIconButton.js +6 -6
  408. package/es/PRIVATE_EmbeddedTextField.js +18 -18
  409. package/es/PRIVATE_FilmStrip.js +17 -17
  410. package/es/PRIVATE_FormControls.js +21 -21
  411. package/es/PRIVATE_IconSwitchButton.js +17 -17
  412. package/es/PRIVATE_Icons/CheckboxCrossed.js +16 -16
  413. package/es/PRIVATE_Icons/CheckboxMixed.js +16 -16
  414. package/es/PRIVATE_Icons/CheckboxOff.js +16 -16
  415. package/es/PRIVATE_Icons/CheckboxOn.js +16 -16
  416. package/es/PRIVATE_Icons/None.js +16 -16
  417. package/es/PRIVATE_InputBase.js +28 -28
  418. package/es/PRIVATE_List/themes/ListStyles.css.js +1 -1
  419. package/es/PRIVATE_List.js +22 -22
  420. package/es/PRIVATE_Message.js +20 -20
  421. package/es/PRIVATE_MessageLayer.js +12 -12
  422. package/es/PRIVATE_MonthView.js +20 -20
  423. package/es/PRIVATE_MonthYearGridView.js +7 -7
  424. package/es/PRIVATE_PlotArea.js +5 -5
  425. package/es/PRIVATE_RevealToggleIcon.js +18 -18
  426. package/es/PRIVATE_RichSelectionCommon.js +28 -28
  427. package/es/PRIVATE_SelectCommon.js +33 -33
  428. package/es/PRIVATE_StyledCard.js +17 -17
  429. package/es/PRIVATE_StyledCheckbox.js +16 -16
  430. package/es/PRIVATE_StyledSwitch.js +4 -4
  431. package/es/PRIVATE_SwatchFlexView.js +18 -18
  432. package/es/PRIVATE_Table.js +39 -39
  433. package/es/PRIVATE_TableList/themes/ListStyles.css.js +1 -1
  434. package/es/PRIVATE_TableList/themes/redwood/ListTheme.js +1 -1
  435. package/es/PRIVATE_TableList/themes/redwood/ListVariants.css.js +1 -1
  436. package/es/PRIVATE_TableList/themes/stable/ListTheme.js +1 -1
  437. package/es/PRIVATE_TableList/themes/stable/ListVariants.css.js +1 -1
  438. package/es/PRIVATE_TableList.js +29 -29
  439. package/es/PRIVATE_ThemedIcons/CalendarIcon.js +16 -16
  440. package/es/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +16 -16
  441. package/es/PRIVATE_ThemedIcons/ChartPanIcon.js +16 -16
  442. package/es/PRIVATE_ThemedIcons/ChartZoomIcon.js +16 -16
  443. package/es/PRIVATE_ThemedIcons/CheckIcon.js +16 -16
  444. package/es/PRIVATE_ThemedIcons/CheckboxCrossedIcon.js +16 -16
  445. package/es/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +16 -16
  446. package/es/PRIVATE_ThemedIcons/CheckboxOffIcon.js +16 -16
  447. package/es/PRIVATE_ThemedIcons/CheckboxOnIcon.js +16 -16
  448. package/es/PRIVATE_ThemedIcons/CloseIcon.js +16 -16
  449. package/es/PRIVATE_ThemedIcons/CollapseIcon.js +17 -17
  450. package/es/PRIVATE_ThemedIcons/CollapseUpIcon.js +16 -16
  451. package/es/PRIVATE_ThemedIcons/DecrementIcon.js +16 -16
  452. package/es/PRIVATE_ThemedIcons/DeleteIcon.js +16 -16
  453. package/es/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +17 -17
  454. package/es/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +17 -17
  455. package/es/PRIVATE_ThemedIcons/DragHandleIcon.js +16 -16
  456. package/es/PRIVATE_ThemedIcons/DropdownArrowIcon.js +16 -16
  457. package/es/PRIVATE_ThemedIcons/ExpandIcon.js +16 -16
  458. package/es/PRIVATE_ThemedIcons/HelpIcon.js +16 -16
  459. package/es/PRIVATE_ThemedIcons/IncrementIcon.js +16 -16
  460. package/es/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +16 -16
  461. package/es/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +16 -16
  462. package/es/PRIVATE_ThemedIcons/MessageErrorIcon.js +16 -16
  463. package/es/PRIVATE_ThemedIcons/MessageInfoIcon.js +16 -16
  464. package/es/PRIVATE_ThemedIcons/MessageWarningIcon.js +16 -16
  465. package/es/PRIVATE_ThemedIcons/MinusIcon.js +16 -16
  466. package/es/PRIVATE_ThemedIcons/NavDownIcon.js +16 -16
  467. package/es/PRIVATE_ThemedIcons/None.js +16 -16
  468. package/es/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +16 -16
  469. package/es/PRIVATE_ThemedIcons/PlusIcon.js +16 -16
  470. package/es/PRIVATE_ThemedIcons/RadioOffIcon.js +16 -16
  471. package/es/PRIVATE_ThemedIcons/RadioOnIcon.js +16 -16
  472. package/es/PRIVATE_ThemedIcons/SortAscendingIcon.js +16 -16
  473. package/es/PRIVATE_ThemedIcons/SortDescendingIcon.js +16 -16
  474. package/es/PRIVATE_ThemedIcons/UnsortedIcon.js +16 -16
  475. package/es/PRIVATE_ThemedIcons/ViewHideIcon.js +16 -16
  476. package/es/PRIVATE_ThemedIcons/ViewIcon.js +16 -16
  477. package/es/PRIVATE_TimeComponent.js +19 -19
  478. package/es/PRIVATE_TruncatingLink.js +16 -16
  479. package/es/PRIVATE_VisOverview.js +16 -16
  480. package/es/PRIVATE_VisStatusMessage.js +5 -5
  481. package/es/PRIVATE_VisTabularDatatip.js +4 -4
  482. package/es/PolarChartWithDimensions-76ff5180.js +7 -7
  483. package/es/{Popup-83eb0d14.js → Popup-5e092ea2.js} +10 -10
  484. package/es/{Popup-83eb0d14.js.map → Popup-5e092ea2.js.map} +1 -1
  485. package/es/ProgressBarVariants.styles.css +1 -1
  486. package/es/ProgressBarVariants.styles2.css +1 -1
  487. package/es/ProgressButtonLabelLayout-66b9ffed.js +3 -3
  488. package/es/{ProgressCircle-840273b1.js → ProgressCircle-5f423576.js} +2 -2
  489. package/es/{ProgressCircle-840273b1.js.map → ProgressCircle-5f423576.js.map} +1 -1
  490. package/es/ProgressCircleVariants.styles.css +4 -4
  491. package/es/ProgressCircleVariants.styles2.css +4 -4
  492. package/es/RadioItem-1a4b2f6c.js +6 -6
  493. package/es/ReadonlyTextField-bddb2cdf.js +2 -2
  494. package/es/ReadonlyTextFieldInput-bc7ef76e.js +1 -1
  495. package/es/{ReferenceLineArea-6408ffab.js → ReferenceLineArea-ee334176.js} +3 -3
  496. package/es/{ReferenceLineArea-6408ffab.js.map → ReferenceLineArea-ee334176.js.map} +1 -1
  497. package/es/RevealToggleIcon-f599e415.js +1 -1
  498. package/es/{SectionedContent-55b8f8c6.js → SectionedContent-ce3d19ab.js} +5 -5
  499. package/es/{SectionedContent-55b8f8c6.js.map → SectionedContent-ce3d19ab.js.map} +1 -1
  500. package/es/SegmentStyles.styles.css +12 -9
  501. package/es/SegmentStyles.styles2.css +9 -12
  502. package/es/SelectMenuGroupContext-ea5310eb.js +6 -6
  503. package/es/{SelectMobileDropdown-cec84a47.js → SelectMobileDropdown-502af91c.js} +7 -7
  504. package/es/{SelectMobileDropdown-cec84a47.js.map → SelectMobileDropdown-502af91c.js.map} +1 -1
  505. package/es/SelectMobileFieldInput-bd65672b.js +4 -4
  506. package/es/{SelectorAll-855a2050.js → SelectorAll-4b170e2f.js} +5 -5
  507. package/es/{SelectorAll-855a2050.js.map → SelectorAll-4b170e2f.js.map} +1 -1
  508. package/es/Sheet-9a10abc4.js +2 -2
  509. package/es/SortControl-73376bf0.js +3 -3
  510. package/es/SplitMenuButtonTheme.styles.css +4 -4
  511. package/es/SplitMenuButtonTheme.styles2.css +4 -4
  512. package/es/StyledCard-0e89c7fd.js +1 -1
  513. package/es/{StyledLabelValueLayout-69ac5e9a.js → StyledLabelValueLayout-1ebe21b2.js} +2 -2
  514. package/es/{StyledLabelValueLayout-69ac5e9a.js.map → StyledLabelValueLayout-1ebe21b2.js.map} +1 -1
  515. package/es/StyledSwitch-dc6a94af.js +2 -2
  516. package/es/StyledTextField-56e1a6e7.js +3 -3
  517. package/es/Submenu-481b3c39.js +1 -1
  518. package/es/{TabBar-36932ca2.js → TabBar-de0cb67b.js} +14 -12
  519. package/es/TabBar-de0cb67b.js.map +1 -0
  520. package/es/TabBarContextMenu-41639eb7.js +2 -2
  521. package/es/TabBarItemVariants.styles.css +3 -3
  522. package/es/TabBarItemVariants.styles2.css +3 -3
  523. package/es/TabBarLayout-5876474d.js +1 -1
  524. package/es/Table-fd39c1b5.js +9 -9
  525. package/es/TableColGroup-2f67372c.js +1 -1
  526. package/es/{TextField-0a9a5a57.js → TextField-a556da78.js} +2 -2
  527. package/es/{TextField-0a9a5a57.js.map → TextField-a556da78.js.map} +1 -1
  528. package/es/TextFieldContent-5e5ed450.js +2 -2
  529. package/es/{TextureDefs-295dccbd.js → TextureDefs-7373dec8.js} +2 -2
  530. package/es/{TextureDefs-295dccbd.js.map → TextureDefs-7373dec8.js.map} +1 -1
  531. package/es/Theme-redwood/theme.css +361 -371
  532. package/es/Theme-stable/theme.css +459 -449
  533. package/es/TimeComponentCanvas2D-e22cb491.js +6 -6
  534. package/es/TimePicker-aba30924.js +2 -2
  535. package/es/ToggleButton-d2b3a635.js +1 -1
  536. package/es/TreeItemLayout-7783b7bf.js +2 -2
  537. package/es/TruncatingLink-e0338cb2.js +4 -4
  538. package/es/TruncatingText-868308d3.js +1 -1
  539. package/es/UNSAFE_AccordionItemMultiple.js +18 -18
  540. package/es/UNSAFE_AccordionItemSingle.js +18 -18
  541. package/es/UNSAFE_ActionCard.js +17 -17
  542. package/es/UNSAFE_BarChart.js +37 -37
  543. package/es/UNSAFE_BareButton.js +2 -2
  544. package/es/UNSAFE_BaseButton.js +5 -5
  545. package/es/UNSAFE_Button.js +6 -6
  546. package/es/UNSAFE_ButtonSet.js +17 -17
  547. package/es/UNSAFE_ButtonSetButton.js +5 -5
  548. package/es/UNSAFE_ButtonSetIconButton.js +17 -17
  549. package/es/UNSAFE_ButtonSetItem.js +18 -18
  550. package/es/UNSAFE_ButtonSetMultiple.js +17 -17
  551. package/es/UNSAFE_ButtonSetSingle.js +17 -17
  552. package/es/UNSAFE_Card.js +17 -17
  553. package/es/UNSAFE_CardFlexView.js +22 -22
  554. package/es/UNSAFE_CardGridView.js +22 -22
  555. package/es/UNSAFE_Center.js +5 -5
  556. package/es/UNSAFE_Checkbox.js +25 -25
  557. package/es/UNSAFE_CheckboxItem.js +77 -139
  558. package/es/UNSAFE_CheckboxItem.js.map +1 -1
  559. package/es/UNSAFE_CheckboxRadioField.js +4 -4
  560. package/es/UNSAFE_CheckboxSet.js +75 -41
  561. package/es/UNSAFE_CheckboxSet.js.map +1 -1
  562. package/es/UNSAFE_Chip.js +2 -2
  563. package/es/UNSAFE_Collapsible.js +18 -18
  564. package/es/UNSAFE_CollapsibleNavigationList.js +28 -28
  565. package/es/UNSAFE_ColorInputText.js +109 -109
  566. package/es/UNSAFE_ColorPalette.js +21 -21
  567. package/es/UNSAFE_ColorPicker.js +23 -23
  568. package/es/UNSAFE_ColorSwatch.js +18 -18
  569. package/es/UNSAFE_ComboChart.js +38 -38
  570. package/es/UNSAFE_ComponentMessage.js +20 -20
  571. package/es/UNSAFE_ContainerDiagram.js +30 -30
  572. package/es/UNSAFE_ConveyorBelt.js +18 -18
  573. package/es/UNSAFE_DatePicker.js +27 -27
  574. package/es/UNSAFE_Diagram.js +30 -30
  575. package/es/UNSAFE_Dialog.js +22 -22
  576. package/es/UNSAFE_DragHandle.js +17 -17
  577. package/es/UNSAFE_DrawerLayout.js +12 -12
  578. package/es/UNSAFE_DrawerPopup.js +11 -11
  579. package/es/UNSAFE_Dropdown.js +15 -15
  580. package/es/UNSAFE_Environment.js +4 -4
  581. package/es/UNSAFE_Expander.js +20 -20
  582. package/es/UNSAFE_FilePicker.js +4 -4
  583. package/es/UNSAFE_FilmStrip.js +19 -19
  584. package/es/UNSAFE_Flex.js +4 -4
  585. package/es/UNSAFE_Floating.js +11 -11
  586. package/es/UNSAFE_FormLayout/themes/redwood/FormLayoutTheme.js +1 -1
  587. package/es/UNSAFE_FormLayout/themes/redwood/FormLayoutVariants.css.js +1 -1
  588. package/es/UNSAFE_FormLayout/themes/stable/FormLayoutTheme.js +1 -1
  589. package/es/UNSAFE_FormLayout/themes/stable/FormLayoutVariants.css.js +1 -1
  590. package/es/UNSAFE_FormLayout.js +3 -3
  591. package/es/UNSAFE_Gantt.js +23 -23
  592. package/es/UNSAFE_Grid.js +4 -4
  593. package/es/UNSAFE_HierarchicalList.js +30 -30
  594. package/es/UNSAFE_HighlightText.js +4 -4
  595. package/es/UNSAFE_Icon.js +16 -16
  596. package/es/UNSAFE_IconButton.js +17 -17
  597. package/es/UNSAFE_IconMenuButton.js +26 -26
  598. package/es/UNSAFE_IconProgressButton.js +22 -22
  599. package/es/UNSAFE_IconToggleButton.js +17 -17
  600. package/es/UNSAFE_IndentedCellLayout/themes/redwood/IndentedCellLayoutBaseTheme.css.js +1 -1
  601. package/es/UNSAFE_IndentedCellLayout/themes/stable/IndentedCellLayoutBaseTheme.css.js +1 -1
  602. package/es/UNSAFE_IndentedCellLayout.js +1 -1
  603. package/es/UNSAFE_Indexer.js +19 -19
  604. package/es/UNSAFE_InlineSelectSingle.js +36 -36
  605. package/es/UNSAFE_InputColor.js +108 -108
  606. package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
  607. package/es/UNSAFE_InputDateMask.js +30 -30
  608. package/es/UNSAFE_InputDatePicker.js +39 -39
  609. package/es/UNSAFE_InputPassword.js +28 -28
  610. package/es/UNSAFE_InputSearch/themes/redwood/InputSearchTheme.js +1 -1
  611. package/es/UNSAFE_InputSearch/themes/redwood/InputSearchVariants.css.js +1 -1
  612. package/es/UNSAFE_InputSearch/themes/stable/InputSearchTheme.js +1 -1
  613. package/es/UNSAFE_InputSearch/themes/stable/InputSearchVariants.css.js +1 -1
  614. package/es/UNSAFE_InputSearch.js +35 -35
  615. package/es/UNSAFE_InputSensitiveText.js +29 -29
  616. package/es/UNSAFE_InputText.js +30 -30
  617. package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
  618. package/es/UNSAFE_InputTimeMask.js +29 -29
  619. package/es/UNSAFE_InputTimePicker.js +39 -39
  620. package/es/UNSAFE_Label.js +25 -25
  621. package/es/UNSAFE_LabelValueLayout.js +4 -4
  622. package/es/UNSAFE_LabelledLink.js +27 -27
  623. package/es/UNSAFE_Layer.js +8 -8
  624. package/es/UNSAFE_Legend.js +29 -29
  625. package/es/UNSAFE_LineAreaChart.js +38 -38
  626. package/es/UNSAFE_Link.js +2 -2
  627. package/es/UNSAFE_ListGroupHeaderLayout.js +5 -5
  628. package/es/UNSAFE_ListItemLayout.js +5 -5
  629. package/es/UNSAFE_ListView.js +29 -29
  630. package/es/UNSAFE_LiveRegion.js +4 -4
  631. package/es/UNSAFE_Menu/themes/redwood/MenuItemTheme.js +1 -1
  632. package/es/UNSAFE_Menu/themes/redwood/MenuItemVariants.css.js +1 -1
  633. package/es/UNSAFE_Menu/themes/stable/MenuItemTheme.js +1 -1
  634. package/es/UNSAFE_Menu/themes/stable/MenuItemVariants.css.js +1 -1
  635. package/es/UNSAFE_Menu.js +27 -27
  636. package/es/UNSAFE_MenuButton.js +26 -26
  637. package/es/UNSAFE_MessageBanner.js +20 -20
  638. package/es/UNSAFE_MessageToast.js +22 -22
  639. package/es/UNSAFE_MeterBar.js +16 -16
  640. package/es/UNSAFE_MeterCircle/themes/redwood/MeterCircleTheme.js +1 -1
  641. package/es/UNSAFE_MeterCircle/themes/redwood/MeterCircleVariants.css.js +1 -1
  642. package/es/UNSAFE_MeterCircle/themes/stable/MeterCircleTheme.js +1 -1
  643. package/es/UNSAFE_MeterCircle/themes/stable/MeterCircleVariants.css.js +1 -1
  644. package/es/UNSAFE_MeterCircle.js +18 -18
  645. package/es/UNSAFE_Modal.js +8 -8
  646. package/es/UNSAFE_NavigationList.js +28 -28
  647. package/es/UNSAFE_NumberInputText.js +32 -32
  648. package/es/UNSAFE_OverflowTabBar.js +39 -35
  649. package/es/UNSAFE_OverflowTabBar.js.map +1 -1
  650. package/es/UNSAFE_PictoChart.js +26 -26
  651. package/es/UNSAFE_PieChart.js +30 -30
  652. package/es/UNSAFE_PolarBarChart.js +31 -31
  653. package/es/UNSAFE_PolarLineAreaChart.js +31 -31
  654. package/es/UNSAFE_Popup.js +18 -18
  655. package/es/UNSAFE_ProgressBar/themes/redwood/ProgressBarTheme.js +1 -1
  656. package/es/UNSAFE_ProgressBar/themes/redwood/ProgressBarVariants.css.js +1 -1
  657. package/es/UNSAFE_ProgressBar/themes/stable/ProgressBarTheme.js +1 -1
  658. package/es/UNSAFE_ProgressBar/themes/stable/ProgressBarVariants.css.js +1 -1
  659. package/es/UNSAFE_ProgressBar.js +5 -5
  660. package/es/UNSAFE_ProgressButton.js +22 -22
  661. package/es/UNSAFE_ProgressButtonLabelLayout.js +11 -11
  662. package/es/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleTheme.js +1 -1
  663. package/es/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleVariants.css.js +1 -1
  664. package/es/UNSAFE_ProgressCircle/themes/stable/ProgressCircleTheme.js +1 -1
  665. package/es/UNSAFE_ProgressCircle/themes/stable/ProgressCircleVariants.css.js +1 -1
  666. package/es/UNSAFE_ProgressCircle.js +5 -5
  667. package/es/UNSAFE_RadioItem.js +25 -25
  668. package/es/UNSAFE_RadioSet.js +27 -27
  669. package/es/UNSAFE_RangeBarChart.js +37 -37
  670. package/es/UNSAFE_RatingGauge.js +18 -18
  671. package/es/UNSAFE_Refresher.js +5 -5
  672. package/es/UNSAFE_ReorderableTabBar.js +33 -33
  673. package/es/UNSAFE_RichCheckboxSet.js +65 -69
  674. package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
  675. package/es/UNSAFE_RichRadioSet.js +29 -29
  676. package/es/UNSAFE_RichSelectionItem.js +122 -177
  677. package/es/UNSAFE_RichSelectionItem.js.map +1 -1
  678. package/es/UNSAFE_ScatterChart.js +37 -37
  679. package/es/UNSAFE_SectionalLegend.js +29 -29
  680. package/es/UNSAFE_SelectMultiple.js +40 -40
  681. package/es/UNSAFE_SelectSingle.js +39 -39
  682. package/es/UNSAFE_SelectionCard.js +17 -17
  683. package/es/UNSAFE_Selector.js +17 -17
  684. package/es/UNSAFE_SelectorAll.js +19 -19
  685. package/es/UNSAFE_Sheet.js +11 -11
  686. package/es/UNSAFE_Slider.js +28 -28
  687. package/es/UNSAFE_SortControl.js +19 -19
  688. package/es/UNSAFE_SplitMenuButton/themes/redwood/SplitMenuButtonTheme.css.js +1 -1
  689. package/es/UNSAFE_SplitMenuButton/themes/stable/SplitMenuButtonTheme.css.js +1 -1
  690. package/es/UNSAFE_SplitMenuButton.js +27 -27
  691. package/es/UNSAFE_SwipeActions.js +26 -26
  692. package/es/UNSAFE_Switch/themes/redwood/SwitchBaseTheme.css.js +1 -1
  693. package/es/UNSAFE_Switch/themes/redwood/SwitchTheme.js +1 -1
  694. package/es/UNSAFE_Switch/themes/stable/SwitchBaseTheme.css.js +1 -1
  695. package/es/UNSAFE_Switch/themes/stable/SwitchTheme.js +1 -1
  696. package/es/UNSAFE_Switch.js +27 -27
  697. package/es/UNSAFE_TabBar.js +34 -34
  698. package/es/UNSAFE_TabBarCommon/themes/redwood/TabBarItemTheme.js +1 -1
  699. package/es/UNSAFE_TabBarCommon/themes/redwood/TabBarItemVariants.css.js +1 -1
  700. package/es/UNSAFE_TabBarCommon/themes/stable/TabBarItemTheme.js +1 -1
  701. package/es/UNSAFE_TabBarCommon/themes/stable/TabBarItemVariants.css.js +1 -1
  702. package/es/UNSAFE_TabBarCommon.js +30 -30
  703. package/es/UNSAFE_TabBarMixed.js +32 -32
  704. package/es/UNSAFE_TabBarMixed.js.map +1 -1
  705. package/es/UNSAFE_TableDisplay.js +19 -19
  706. package/es/UNSAFE_TableView.js +39 -39
  707. package/es/UNSAFE_TagCloud.js +27 -27
  708. package/es/UNSAFE_TextArea.js +29 -29
  709. package/es/UNSAFE_TextAreaAutosize.js +29 -29
  710. package/es/UNSAFE_TextField.js +21 -21
  711. package/es/UNSAFE_TimePicker.js +30 -30
  712. package/es/UNSAFE_ToggleButton.js +5 -5
  713. package/es/UNSAFE_Toolbar.js +4 -4
  714. package/es/UNSAFE_Train.js +17 -17
  715. package/es/UNSAFE_TreeItemLayout.js +5 -5
  716. package/es/UNSAFE_TreeTableView.js +39 -39
  717. package/es/UNSAFE_TreeView.js +30 -30
  718. package/es/UNSAFE_TruncatingBadge.js +17 -17
  719. package/es/UNSAFE_TruncatingText.js +17 -17
  720. package/es/UNSAFE_UserAssistance.js +26 -26
  721. package/es/UNSAFE_View.js +7 -7
  722. package/es/UNSAFE_VirtualizedListView.js +22 -22
  723. package/es/UNSAFE_VisInvalidDataMessage.js +6 -6
  724. package/es/UNSAFE_VisNoDataMessage.js +6 -6
  725. package/es/UNSAFE_VisProgressiveLoader.js +5 -5
  726. package/es/UNSAFE_WindowOverlay.js +4 -4
  727. package/es/{View-5e006875.js → View-0ee9645e.js} +5 -5
  728. package/es/{View-5e006875.js.map → View-0ee9645e.js.map} +1 -1
  729. package/es/{VisStatusMessage-091fb10e.js → VisStatusMessage-56f961f5.js} +2 -2
  730. package/es/{VisStatusMessage-091fb10e.js.map → VisStatusMessage-56f961f5.js.map} +1 -1
  731. package/es/{VisTabularDatatip-e3acfb61.js → VisTabularDatatip-e71cef20.js} +2 -2
  732. package/es/{VisTabularDatatip-e3acfb61.js.map → VisTabularDatatip-e71cef20.js.map} +1 -1
  733. package/es/{WindowOverlay-05bff667.js → WindowOverlay-9f2cbaa0.js} +2 -2
  734. package/es/{WindowOverlay-05bff667.js.map → WindowOverlay-9f2cbaa0.js.map} +1 -1
  735. package/es/{YearsGridView-db24fc9f.js → YearsGridView-6a5c2c74.js} +4 -4
  736. package/es/{YearsGridView-db24fc9f.js.map → YearsGridView-6a5c2c74.js.map} +1 -1
  737. package/es/hoc/PRIVATE_withDirectionIcon.js +4 -4
  738. package/es/hoc/PRIVATE_withThemeIcon.js +3 -3
  739. package/es/hoc/UNSAFE_withThemeProps.js +3 -3
  740. package/es/hooks/PRIVATE_useChartContextMenu.js +24 -24
  741. package/es/hooks/PRIVATE_useChartDatatip.js +14 -14
  742. package/es/hooks/PRIVATE_useChartEvents.js +20 -20
  743. package/es/hooks/PRIVATE_useChartMarquee.js +19 -19
  744. package/es/hooks/PRIVATE_useCollectionFocusRing.js +17 -17
  745. package/es/hooks/PRIVATE_useCssVars.js +7 -7
  746. package/es/hooks/PRIVATE_useCurrentKey.js +4 -4
  747. package/es/hooks/PRIVATE_useDatatip.js +12 -12
  748. package/es/hooks/PRIVATE_useDetectHorizontalOverflow.js +17 -17
  749. package/es/hooks/PRIVATE_useFloating.js +4 -4
  750. package/es/hooks/PRIVATE_useItemAction.js +17 -17
  751. package/es/hooks/PRIVATE_useListCommon.js +18 -18
  752. package/es/hooks/PRIVATE_useOutsideMousedown.js +9 -9
  753. package/es/hooks/PRIVATE_useRadioFocusManager.js +4 -4
  754. package/es/hooks/PRIVATE_useReorderable.js +19 -19
  755. package/es/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
  756. package/es/hooks/PRIVATE_useSelection.js +4 -4
  757. package/es/hooks/PRIVATE_useTabBar.js +28 -28
  758. package/es/hooks/PRIVATE_useTabbableModeSet.js +17 -17
  759. package/es/hooks/PRIVATE_useTooltipOnTruncation.js +17 -17
  760. package/es/hooks/PRIVATE_useVisContextMenu.js +24 -24
  761. package/es/hooks/PRIVATE_useVisDragModeControls.js +19 -19
  762. package/es/hooks/PRIVATE_useVisEvents.js +4 -4
  763. package/es/hooks/PRIVATE_useVisMeterEvents.js +14 -14
  764. package/es/hooks/PRIVATE_useVisSelection.js +15 -15
  765. package/es/hooks/UNSAFE_useBareButton.js +2 -2
  766. package/es/hooks/UNSAFE_useColorScheme.js +3 -3
  767. package/es/hooks/UNSAFE_useCurrentBgColor.js +2 -2
  768. package/es/hooks/UNSAFE_useDensity.js +3 -3
  769. package/es/hooks/UNSAFE_useHiddenTestMethod.js +3 -3
  770. package/es/hooks/UNSAFE_useOutsideClick.js +8 -8
  771. package/es/hooks/UNSAFE_usePrefixSuffix.js +4 -4
  772. package/es/hooks/UNSAFE_useScale.js +3 -3
  773. package/es/hooks/UNSAFE_useTestId.js +3 -3
  774. package/es/hooks/UNSAFE_useTheme.js +3 -3
  775. package/es/hooks/UNSAFE_useThemeInterpolations.js +6 -6
  776. package/es/hooks/UNSAFE_useTooltip.js +17 -17
  777. package/es/hooks/UNSAFE_useTranslationBundle.js +3 -3
  778. package/es/hooks/UNSAFE_useUser.js +3 -3
  779. package/es/{popupUtils-c052da19.js → popupUtils-87073802.js} +2 -2
  780. package/es/{popupUtils-c052da19.js.map → popupUtils-87073802.js.map} +1 -1
  781. package/es/{tooltipUtils-8f52a37e.js → tooltipUtils-f2f90085.js} +5 -5
  782. package/es/{tooltipUtils-8f52a37e.js.map → tooltipUtils-f2f90085.js.map} +1 -1
  783. package/es/useBareButton-3d8d3267.js +1 -1
  784. package/es/useCellNavigation-74703ae5.js +1 -1
  785. package/es/useChartContextMenu-f63e0e70.js +2 -2
  786. package/es/{useChartDatatip-7a0287e7.js → useChartDatatip-c8797dc7.js} +4 -4
  787. package/es/{useChartDatatip-7a0287e7.js.map → useChartDatatip-c8797dc7.js.map} +1 -1
  788. package/es/{useColorScheme-febcabc0.js → useColorScheme-0d2625c5.js} +2 -2
  789. package/es/{useColorScheme-febcabc0.js.map → useColorScheme-0d2625c5.js.map} +1 -1
  790. package/es/useContextMenu-5730737d.js +2 -2
  791. package/es/{useCssVars-663740c4.js → useCssVars-697799fa.js} +5 -5
  792. package/es/{useCssVars-663740c4.js.map → useCssVars-697799fa.js.map} +1 -1
  793. package/es/{useCurrentKey-89b60d32.js → useCurrentKey-2cdeda49.js} +2 -2
  794. package/es/{useCurrentKey-89b60d32.js.map → useCurrentKey-2cdeda49.js.map} +1 -1
  795. package/es/{useDatatip-e234ee0a.js → useDatatip-73d51f39.js} +4 -4
  796. package/es/{useDatatip-e234ee0a.js.map → useDatatip-73d51f39.js.map} +1 -1
  797. package/es/{useDatatipAndCursor-0b8febe5.js → useDatatipAndCursor-142787d4.js} +2 -2
  798. package/es/{useDatatipAndCursor-0b8febe5.js.map → useDatatipAndCursor-142787d4.js.map} +1 -1
  799. package/es/{useDensity-482708e7.js → useDensity-9c3ef227.js} +2 -2
  800. package/es/{useDensity-482708e7.js.map → useDensity-9c3ef227.js.map} +1 -1
  801. package/es/{useDetectHorizontalOverflow-9b684feb.js → useDetectHorizontalOverflow-5b505e78.js} +30 -58
  802. package/es/useDetectHorizontalOverflow-5b505e78.js.map +1 -0
  803. package/es/useDisplayValue-f7c80ffe.js +6 -6
  804. package/es/{useFloating-38c13cfa.js → useFloating-98ad16ec.js} +2 -2
  805. package/es/{useFloating-38c13cfa.js.map → useFloating-98ad16ec.js.map} +1 -1
  806. package/es/{useHiddenTestMethod-dc102488.js → useHiddenTestMethod-4bb568f0.js} +2 -2
  807. package/es/{useHiddenTestMethod-dc102488.js.map → useHiddenTestMethod-4bb568f0.js.map} +1 -1
  808. package/es/useInputBase-6dc2e103.js +6 -6
  809. package/es/{useKeyboardEvents-ce2d5783.js → useKeyboardEvents-18678615.js} +2 -2
  810. package/es/{useKeyboardEvents-ce2d5783.js.map → useKeyboardEvents-18678615.js.map} +1 -1
  811. package/es/useLegendContextMenu-a6e566c4.js +6 -6
  812. package/es/{useMeterDatatip-e21c0d4b.js → useMeterDatatip-27882514.js} +3 -3
  813. package/es/{useMeterDatatip-e21c0d4b.js.map → useMeterDatatip-27882514.js.map} +1 -1
  814. package/es/useNavigation-a4715511.js +1 -1
  815. package/es/{useOutsideClick-552699e3.js → useOutsideClick-cad76f8b.js} +2 -2
  816. package/es/{useOutsideClick-552699e3.js.map → useOutsideClick-cad76f8b.js.map} +1 -1
  817. package/es/{useOutsideMousedown-36235b3d.js → useOutsideMousedown-9da55345.js} +2 -2
  818. package/es/{useOutsideMousedown-36235b3d.js.map → useOutsideMousedown-9da55345.js.map} +1 -1
  819. package/es/{usePopupAnimation-83d1dde8.js → usePopupAnimation-c12f24ba.js} +2 -2
  820. package/es/{usePopupAnimation-83d1dde8.js.map → usePopupAnimation-c12f24ba.js.map} +1 -1
  821. package/es/{usePrefixSuffix-7a0fb41b.js → usePrefixSuffix-56167b97.js} +2 -2
  822. package/es/{usePrefixSuffix-7a0fb41b.js.map → usePrefixSuffix-56167b97.js.map} +1 -1
  823. package/es/{useRadioFocusManager-d14e0331.js → useRadioFocusManager-afcb8a84.js} +2 -2
  824. package/es/{useRadioFocusManager-d14e0331.js.map → useRadioFocusManager-afcb8a84.js.map} +1 -1
  825. package/es/{useReorderableItem-936082ee.js → useReorderableItem-c47eebbe.js} +3 -3
  826. package/es/{useReorderableItem-936082ee.js.map → useReorderableItem-c47eebbe.js.map} +1 -1
  827. package/es/{useRovingTabIndexContainer-50d6566f.js → useRovingTabIndexContainer-51de19b5.js} +2 -2
  828. package/es/{useRovingTabIndexContainer-50d6566f.js.map → useRovingTabIndexContainer-51de19b5.js.map} +1 -1
  829. package/es/{useScale-9936da9d.js → useScale-4a98c348.js} +2 -2
  830. package/es/{useScale-9936da9d.js.map → useScale-4a98c348.js.map} +1 -1
  831. package/es/useSelectCommon-480b6641.js +5 -5
  832. package/es/{useSelectDrill-93387909.js → useSelectDrill-81f36802.js} +2 -2
  833. package/es/{useSelectDrill-93387909.js.map → useSelectDrill-81f36802.js.map} +1 -1
  834. package/es/{useSelection-429274e4.js → useSelection-584c64a6.js} +2 -2
  835. package/es/{useSelection-429274e4.js.map → useSelection-584c64a6.js.map} +1 -1
  836. package/es/{useSelection-58503244.js → useSelection-9f099db0.js} +6 -6
  837. package/es/{useSelection-58503244.js.map → useSelection-9f099db0.js.map} +1 -1
  838. package/es/{useTabBar-04a0093f.js → useTabBar-f068eee4.js} +6 -9
  839. package/es/useTabBar-f068eee4.js.map +1 -0
  840. package/es/{useTestId-20c68501.js → useTestId-2c0e08d3.js} +2 -2
  841. package/es/{useTestId-20c68501.js.map → useTestId-2c0e08d3.js.map} +1 -1
  842. package/es/{useTheme-eef5d217.js → useTheme-2c44fa3e.js} +2 -2
  843. package/es/{useTheme-eef5d217.js.map → useTheme-2c44fa3e.js.map} +1 -1
  844. package/es/{useThemeInterpolations-2d6f0d78.js → useThemeInterpolations-9df8ad1a.js} +5 -5
  845. package/es/{useThemeInterpolations-2d6f0d78.js.map → useThemeInterpolations-9df8ad1a.js.map} +1 -1
  846. package/es/{useTooltip-8decbde6.js → useTooltip-7779b267.js} +2 -2
  847. package/es/{useTooltip-8decbde6.js.map → useTooltip-7779b267.js.map} +1 -1
  848. package/es/{useTooltipControlled-ccfa2705.js → useTooltipControlled-729b3aac.js} +5 -5
  849. package/es/{useTooltipControlled-ccfa2705.js.map → useTooltipControlled-729b3aac.js.map} +1 -1
  850. package/es/{useTooltipOnTruncation-2df1e74f.js → useTooltipOnTruncation-5e2c2a50.js} +4 -4
  851. package/es/{useTooltipOnTruncation-2df1e74f.js.map → useTooltipOnTruncation-5e2c2a50.js.map} +1 -1
  852. package/es/{useTranslationBundle-ded09d52.js → useTranslationBundle-752de59a.js} +2 -2
  853. package/es/{useTranslationBundle-ded09d52.js.map → useTranslationBundle-752de59a.js.map} +1 -1
  854. package/es/useTruncationTooltip-fd1dac2a.js +3 -3
  855. package/es/{useUser-e1199cab.js → useUser-2c24ff59.js} +2 -2
  856. package/es/{useUser-e1199cab.js.map → useUser-2c24ff59.js.map} +1 -1
  857. package/es/useVisDragModeControls-092e8ac4.js +1 -1
  858. package/es/{useVisEvents-012f2a18.js → useVisEvents-454b5545.js} +2 -2
  859. package/es/{useVisEvents-012f2a18.js.map → useVisEvents-454b5545.js.map} +1 -1
  860. package/es/utils/PRIVATE_collectionUtils.js +17 -17
  861. package/es/utils/PRIVATE_tabBarUtils.js +17 -17
  862. package/es/utils/PRIVATE_tooltipUtils.js +14 -14
  863. package/es/utils/PRIVATE_visTestUtils.js +4 -4
  864. package/es/utils/UNSAFE_popupUtils.js +8 -8
  865. package/es/{withDirectionIcon-abc3124a.js → withDirectionIcon-dec377dd.js} +2 -2
  866. package/es/{withDirectionIcon-abc3124a.js.map → withDirectionIcon-dec377dd.js.map} +1 -1
  867. package/es/withThemeProps-3565a045.js +2 -2
  868. package/package.json +2 -2
  869. package/types/UNSAFE_TabBarMixed/useTabBarMixed.d.ts +1 -1
  870. package/amd/ContainerDiagram-521f402a.js +0 -2
  871. package/amd/Expander-150fa95e.js +0 -2
  872. package/amd/InputDatePicker-613800d1.js +0 -2
  873. package/amd/NavigationListExternalLinkItem-3d98a9e8.js +0 -2
  874. package/amd/NavigationListLinkItem-c4b2b73c.js +0 -2
  875. package/amd/OverflowTabBar-37f590ba.js +0 -2
  876. package/amd/OverflowTabBar-37f590ba.js.map +0 -1
  877. package/amd/OverflowTabBarItem-11f199ee.js +0 -2
  878. package/amd/SortControl-115bc431.js +0 -2
  879. package/amd/TabBar-dc8cadc2.js +0 -2
  880. package/amd/TabBar-dc8cadc2.js.map +0 -1
  881. package/amd/TabBarMixed-e16ca418.js +0 -2
  882. package/amd/useDetectHorizontalOverflow-7f5bba36.js +0 -2
  883. package/amd/useDetectHorizontalOverflow-7f5bba36.js.map +0 -1
  884. package/amd/useTabBar-2d8fc9aa.js +0 -2
  885. package/amd/useTabBar-2d8fc9aa.js.map +0 -1
  886. package/cjs/TabBar-1cd4ac17.js.map +0 -1
  887. package/cjs/TextArea-d65e3f5b.js +0 -207
  888. package/cjs/TextArea-d65e3f5b.js.map +0 -1
  889. package/cjs/useDetectHorizontalOverflow-622817d4.js.map +0 -1
  890. package/cjs/useTabBar-ec20851a.js.map +0 -1
  891. package/es/CheckboxSet-3e0ce80c.js +0 -52
  892. package/es/CheckboxSet-3e0ce80c.js.map +0 -1
  893. package/es/TabBar-36932ca2.js.map +0 -1
  894. package/es/useDetectHorizontalOverflow-9b684feb.js.map +0 -1
  895. package/es/useTabBar-04a0093f.js.map +0 -1
  896. /package/amd/UNSAFE_IndentedCellLayout/themes/{redwood → stable}/IndentedCellLayoutBaseTheme.styles.css +0 -0
  897. /package/es/UNSAFE_IndentedCellLayout/themes/{redwood → stable}/IndentedCellLayoutBaseTheme.styles.css +0 -0
  898. /package/es/UNSAFE_Switch/themes/{redwood → stable}/SwitchBaseTheme.styles.css +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useDisplayValue-ce2d071e.js","sources":["../../src/UNSAFE_SelectSingle/SelectSingleField.tsx","../../src/UNSAFE_SelectSingle/SelectSingleFieldInput.tsx","../../src/UNSAFE_SelectSingle/useDisplayValue.ts"],"sourcesContent":["import { DropdownArrow } from '#PRIVATE_SelectCommon';\nimport { IconButton } from '#UNSAFE_IconButton';\nimport { CancelS } from '#UNSAFE_RedwoodIcons/CancelS';\nimport { NavLeft } from '#UNSAFE_RedwoodIcons/NavLeft';\nimport { TextField } from '#UNSAFE_TextField';\nimport { useFormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { ComponentProps } from 'preact';\n\ntype PickedTextFieldProps = Pick<\n ComponentProps<typeof TextField>,\n | 'columnSpan'\n | 'compactUserAssistance'\n | 'contentVariant'\n | 'endContent'\n | 'hasZeroStartMargin'\n | 'id'\n | 'inlineUserAssistance'\n | 'label'\n | 'labelEdge'\n | 'labelStartWidth'\n | 'mainFieldRef'\n | 'onBlur'\n | 'onFocus'\n | 'onKeyDown'\n | 'onMouseDown'\n | 'onMouseEnter'\n | 'onMouseLeave'\n | 'resize'\n | 'rootRef'\n | 'startContent'\n | 'statusVariant'\n | 'styleVariant'\n | 'testId'\n> & {\n children: ComponentProps<typeof TextField>['mainContent'];\n};\n\ntype Props = PickedTextFieldProps & {\n hasInsideLabel?: boolean;\n isBackButtonShown?: boolean;\n isClearButtonShown?: boolean;\n isDropdownArrowShown?: boolean;\n onBackButtonClick?: ComponentProps<typeof IconButton>['onAction'];\n onClearButtonClick?: ComponentProps<typeof IconButton>['onAction'];\n onDropdownArrowClick?: ComponentProps<typeof DropdownArrow>['onClick'];\n};\n\nexport function SelectSingleField({\n children,\n hasInsideLabel,\n isBackButtonShown,\n isClearButtonShown,\n isDropdownArrowShown,\n onBackButtonClick,\n onClearButtonClick,\n onDropdownArrowClick,\n ...passThroughTextFieldProps\n}: Props) {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const { isDisabled, isLoading } = useFormFieldContext();\n\n const startContent = isBackButtonShown ? (\n <IconButton\n aria-label={translations.selectMultiple_back()}\n size=\"xs\"\n variant=\"ghost\"\n onAction={onBackButtonClick}>\n <NavLeft />\n </IconButton>\n ) : null;\n\n const endContent = isLoading ? undefined : (\n <>\n {isClearButtonShown && (\n <IconButton\n aria-label={translations.formControl_clear()}\n size=\"sm\"\n variant=\"ghost\"\n onAction={onClearButtonClick}>\n <CancelS />\n </IconButton>\n )}\n {isDropdownArrowShown && (\n <DropdownArrow\n isDisabled={isDisabled}\n onClick={onDropdownArrowClick}\n testId={`${passThroughTextFieldProps.testId}_dropdownarrow`}\n />\n )}\n </>\n );\n\n return (\n <TextField\n startContent={startContent}\n mainContent={children}\n endContent={endContent}\n {...passThroughTextFieldProps}\n />\n );\n}\n","import { LiveRegion } from '#UNSAFE_LiveRegion';\nimport { TextFieldInput } from '#UNSAFE_TextField';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { ComponentProps, Ref } from 'preact';\n\ntype PickedTextFieldInputProps = Pick<\n ComponentProps<typeof TextFieldInput>,\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-expanded'\n | 'aria-invalid'\n | 'aria-label'\n | 'hasEmptyLabel'\n | 'hasInsideLabel'\n | 'id'\n | 'isRequired'\n | 'onBlur'\n | 'onFocus'\n | 'onInput'\n | 'onKeyDown'\n | 'onKeyUp'\n | 'placeholder'\n | 'textAlign'\n | 'variant'\n> & {\n inputRef?: Ref<HTMLInputElement>;\n};\n\ntype Props = PickedTextFieldInputProps & {\n displayValue: string;\n isAddToListShown: boolean;\n isAdvancedSearchShown: boolean;\n isUserFiltering: boolean;\n liveRegionText?: string;\n userInput?: string;\n virtualKeyboard?: 'auto' | 'email' | 'number' | 'search' | 'tel' | 'text' | 'url';\n};\n\nexport function SelectSingleFieldInput({\n displayValue,\n isAddToListShown,\n isAdvancedSearchShown,\n isUserFiltering,\n liveRegionText,\n userInput,\n virtualKeyboard,\n ...passThroughTextFieldInputProps\n}: Props) {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const addToListAccText = translations.select_addToListAvailable();\n const advancedSearchAccText = translations.select_moreSearchOptionsAvailable();\n const combinedLiveRegionText = `${liveRegionText} ${isAddToListShown ? addToListAccText : ''} ${\n isAdvancedSearchShown ? advancedSearchAccText : ''\n }`;\n\n return (\n <>\n <TextFieldInput\n {...passThroughTextFieldInputProps}\n hasEndContent={true}\n aria-autocomplete=\"list\"\n autoComplete=\"off\"\n role=\"combobox\"\n spellcheck={false}\n type={virtualKeyboard === 'auto' ? 'search' : virtualKeyboard}\n value={isUserFiltering ? userInput : displayValue}\n />\n <LiveRegion>{combinedLiveRegionText}</LiveRegion>\n </>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useMemo } from 'preact/hooks';\n\nimport { renderItemText } from '#PRIVATE_SelectCommon';\nimport { Item } from '#utils/UNSAFE_dataProvider';\nimport { ItemTextType } from '#utils/UNSAFE_selectUtils';\n\nexport function useDisplayValue<K, D>(\n itemText: ItemTextType<K, D>,\n valueItem?: Item<K, D>,\n componentName: 'SelectSingle' | 'InlineSelectSingle' = 'SelectSingle'\n): string {\n // create the text displayed in the field from the selected value\n const displayValue = useMemo(() => {\n return valueItem === undefined ? '' : renderItemText(valueItem, itemText, componentName) ?? '';\n }, [valueItem, itemText, componentName]);\n\n return displayValue;\n}\n"],"names":["useTranslationBundle","useFormFieldContext","_jsx","IconButton","NavLeft","_jsxs","_Fragment","CancelS","DropdownArrow","TextField","TextFieldInput","LiveRegion","useMemo","renderItemText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDM,SAAU,iBAAiB,CAAC,EAChC,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,GAAG,yBAAyB,EACtB,EAAA;AACN,IAAA,MAAM,YAAY,GAAGA,yCAAoB,CAAa,0BAA0B,CAAC,CAAC;IAClF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAGC,uCAAmB,EAAE,CAAC;AAExD,IAAA,MAAM,YAAY,GAAG,iBAAiB,IACpCC,cAAA,CAACC,qBAAU,EAAA,EAAA,YAAA,EACG,Y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MAAM,sBAAsB,GAAG,CAAA,EAAG,cAAc,CAAA,CAAA,EAAI,gBAAgB,GAAG,gBAAgB,GAAG,EAAE,CAAA,CAAA,EAC1F,qBAAqB,GAAG,qBAAqB,GAAG,EAClD,CAAA,CAAE,CAAC;IAEH,QACEK,eACE,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CAAAJ,cAAA,CAACQ,gCAAc,EAAA,EAAA,GACT,8BAA8B,EAClC,aAAa,EAAE,IAAI,EAAA,mBAAA,EACD,MAAM,EACxB,YAAY,EAAC,KAAK,EAClB,IAAI,EAAC,UAAU,EACf,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,eAAe,KAAK,MAAM,GAAG,QAAQ,GAAG,eAAe,EAC7D,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,YAAY,EAAA,CACjD,EACFR,cAAA,CAACS,qBAAU,EAAA,EAAA,QAAA,EAAE,sBAAsB,EAAA,CAAc,CAChD,EAAA,CAAA,EACH;AACJ;;ACvEA;;;;;;AAMG;AAQG,SAAU,eAAe,CAC7B,QAA4B,EAC5B,SAAsB,EACtB,gBAAuD,cAAc,EAAA;;AAGrE,IAAA,MAAM,YAAY,GAAGC,aAAO,CAAC,MAAK;QAChC,OAAO,SAAS,KAAK,SAAS,GAAG,EAAE,GAAGC,8BAAc,CAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC;KAChG,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAEzC,IAAA,OAAO,YAAY,CAAC;AACtB;;;;;;"}
1
+ {"version":3,"file":"useDisplayValue-777c9be5.js","sources":["../../src/UNSAFE_SelectSingle/SelectSingleField.tsx","../../src/UNSAFE_SelectSingle/SelectSingleFieldInput.tsx","../../src/UNSAFE_SelectSingle/useDisplayValue.ts"],"sourcesContent":["import { DropdownArrow } from '#PRIVATE_SelectCommon';\nimport { IconButton } from '#UNSAFE_IconButton';\nimport { CancelS } from '#UNSAFE_RedwoodIcons/CancelS';\nimport { NavLeft } from '#UNSAFE_RedwoodIcons/NavLeft';\nimport { TextField } from '#UNSAFE_TextField';\nimport { useFormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { ComponentProps } from 'preact';\n\ntype PickedTextFieldProps = Pick<\n ComponentProps<typeof TextField>,\n | 'columnSpan'\n | 'compactUserAssistance'\n | 'contentVariant'\n | 'endContent'\n | 'hasZeroStartMargin'\n | 'id'\n | 'inlineUserAssistance'\n | 'label'\n | 'labelEdge'\n | 'labelStartWidth'\n | 'mainFieldRef'\n | 'onBlur'\n | 'onFocus'\n | 'onKeyDown'\n | 'onMouseDown'\n | 'onMouseEnter'\n | 'onMouseLeave'\n | 'resize'\n | 'rootRef'\n | 'startContent'\n | 'statusVariant'\n | 'styleVariant'\n | 'testId'\n> & {\n children: ComponentProps<typeof TextField>['mainContent'];\n};\n\ntype Props = PickedTextFieldProps & {\n hasInsideLabel?: boolean;\n isBackButtonShown?: boolean;\n isClearButtonShown?: boolean;\n isDropdownArrowShown?: boolean;\n onBackButtonClick?: ComponentProps<typeof IconButton>['onAction'];\n onClearButtonClick?: ComponentProps<typeof IconButton>['onAction'];\n onDropdownArrowClick?: ComponentProps<typeof DropdownArrow>['onClick'];\n};\n\nexport function SelectSingleField({\n children,\n hasInsideLabel,\n isBackButtonShown,\n isClearButtonShown,\n isDropdownArrowShown,\n onBackButtonClick,\n onClearButtonClick,\n onDropdownArrowClick,\n ...passThroughTextFieldProps\n}: Props) {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const { isDisabled, isLoading } = useFormFieldContext();\n\n const startContent = isBackButtonShown ? (\n <IconButton\n aria-label={translations.selectMultiple_back()}\n size=\"xs\"\n variant=\"ghost\"\n onAction={onBackButtonClick}>\n <NavLeft />\n </IconButton>\n ) : null;\n\n const endContent = isLoading ? undefined : (\n <>\n {isClearButtonShown && (\n <IconButton\n aria-label={translations.formControl_clear()}\n size=\"sm\"\n variant=\"ghost\"\n onAction={onClearButtonClick}>\n <CancelS />\n </IconButton>\n )}\n {isDropdownArrowShown && (\n <DropdownArrow\n isDisabled={isDisabled}\n onClick={onDropdownArrowClick}\n testId={`${passThroughTextFieldProps.testId}_dropdownarrow`}\n />\n )}\n </>\n );\n\n return (\n <TextField\n startContent={startContent}\n mainContent={children}\n endContent={endContent}\n {...passThroughTextFieldProps}\n />\n );\n}\n","import { LiveRegion } from '#UNSAFE_LiveRegion';\nimport { TextFieldInput } from '#UNSAFE_TextField';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { ComponentProps, Ref } from 'preact';\n\ntype PickedTextFieldInputProps = Pick<\n ComponentProps<typeof TextFieldInput>,\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-expanded'\n | 'aria-invalid'\n | 'aria-label'\n | 'hasEmptyLabel'\n | 'hasInsideLabel'\n | 'id'\n | 'isRequired'\n | 'onBlur'\n | 'onFocus'\n | 'onInput'\n | 'onKeyDown'\n | 'onKeyUp'\n | 'placeholder'\n | 'textAlign'\n | 'variant'\n> & {\n inputRef?: Ref<HTMLInputElement>;\n};\n\ntype Props = PickedTextFieldInputProps & {\n displayValue: string;\n isAddToListShown: boolean;\n isAdvancedSearchShown: boolean;\n isUserFiltering: boolean;\n liveRegionText?: string;\n userInput?: string;\n virtualKeyboard?: 'auto' | 'email' | 'number' | 'search' | 'tel' | 'text' | 'url';\n};\n\nexport function SelectSingleFieldInput({\n displayValue,\n isAddToListShown,\n isAdvancedSearchShown,\n isUserFiltering,\n liveRegionText,\n userInput,\n virtualKeyboard,\n ...passThroughTextFieldInputProps\n}: Props) {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const addToListAccText = translations.select_addToListAvailable();\n const advancedSearchAccText = translations.select_moreSearchOptionsAvailable();\n const combinedLiveRegionText = `${liveRegionText} ${isAddToListShown ? addToListAccText : ''} ${\n isAdvancedSearchShown ? advancedSearchAccText : ''\n }`;\n\n return (\n <>\n <TextFieldInput\n {...passThroughTextFieldInputProps}\n hasEndContent={true}\n aria-autocomplete=\"list\"\n autoComplete=\"off\"\n role=\"combobox\"\n spellcheck={false}\n type={virtualKeyboard === 'auto' ? 'search' : virtualKeyboard}\n value={isUserFiltering ? userInput : displayValue}\n />\n <LiveRegion>{combinedLiveRegionText}</LiveRegion>\n </>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useMemo } from 'preact/hooks';\n\nimport { renderItemText } from '#PRIVATE_SelectCommon';\nimport { Item } from '#utils/UNSAFE_dataProvider';\nimport { ItemTextType } from '#utils/UNSAFE_selectUtils';\n\nexport function useDisplayValue<K, D>(\n itemText: ItemTextType<K, D>,\n valueItem?: Item<K, D>,\n componentName: 'SelectSingle' | 'InlineSelectSingle' = 'SelectSingle'\n): string {\n // create the text displayed in the field from the selected value\n const displayValue = useMemo(() => {\n return valueItem === undefined ? '' : renderItemText(valueItem, itemText, componentName) ?? '';\n }, [valueItem, itemText, componentName]);\n\n return displayValue;\n}\n"],"names":["useTranslationBundle","useFormFieldContext","_jsx","IconButton","NavLeft","_jsxs","_Fragment","CancelS","DropdownArrow","TextField","TextFieldInput","LiveRegion","useMemo","renderItemText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDM,SAAU,iBAAiB,CAAC,EAChC,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,GAAG,yBAAyB,EACtB,EAAA;AACN,IAAA,MAAM,YAAY,GAAGA,yCAAoB,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= require('preact/jsx-runtime');
5
- var List = require('./List-eea800fd.js');
5
+ var List = require('./List-436100e1.js');
6
6
  var Flex = require('./Flex-d23357d1.js');
7
7
  var HighlightText = require('./HighlightText-96feeb92.js');
8
8
  require('./Grid-96a8d701.js');
@@ -549,4 +549,4 @@ exports.shouldIgnoreSelectInputKeyDownDuringComposition = shouldIgnoreSelectInpu
549
549
  exports.shouldIgnoreSelectInputKeyUpDuringComposition = shouldIgnoreSelectInputKeyUpDuringComposition;
550
550
  exports.useCollectionRenderer = useCollectionRenderer;
551
551
  exports.useSelectCommon = useSelectCommon;
552
- //# sourceMappingURL=useSelectCommon-544c22ee.js.map
552
+ //# sourceMappingURL=useSelectCommon-bb44fdb6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSelectCommon-544c22ee.js","sources":["../../src/PRIVATE_SelectCommon/itemTextUtils.ts","../../src/PRIVATE_SelectCommon/DefaultList.tsx","../../src/PRIVATE_SelectCommon/DropdownArrow.tsx","../../src/PRIVATE_SelectCommon/EmptyResults.tsx","../../src/PRIVATE_SelectCommon/selectUtils.ts","../../src/PRIVATE_SelectCommon/useCollectionRenderer.ts","../../src/PRIVATE_SelectCommon/useSelectCommon.ts"],"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 { Item } from '#utils/UNSAFE_dataProvider';\nimport { error } from '#utils/UNSAFE_logger';\nimport { ItemTextFunctionType, ItemTextType } from '#utils/UNSAFE_selectUtils';\n\nexport type ComponentName = 'InlineSelectSingle' | 'SelectSingle' | 'SelectMultiple';\n\nexport function renderItemText<K, D>(\n item: Item<K, D>,\n itemText: ItemTextType<K, D>,\n componentName: ComponentName\n) {\n // if item-text is a string and the data has the specified field, return it;\n // otherwise log an error\n if (typeof itemText === 'string') {\n // JET-78134: in 26C rc0 preflight, line type is not editable in PRC\n // Some JS applications incorrectly pass {} as valueItem/value-item instead of null\n // or leaving the property unset for the empty state. Older releases already handled that misconfiguration\n // by logging this custom error; keep that behavior and avoid throwing when item.data is missing.\n const itemData = item.data;\n if (itemData != null && Object.prototype.hasOwnProperty.call(itemData, itemText)) {\n const retData = itemData[itemText];\n return String(retData);\n }\n error(`${componentName}: itemText specifies field that does not exist: ${itemText}`);\n // return undefined if the field doesn't exist\n return undefined;\n }\n // if item-text is a function, call it to create a display label\n return (itemText as ItemTextFunctionType<K, D>)(item);\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { ComponentChildren, ComponentProps } from 'preact';\n\nimport { List } from '#PRIVATE_TableList';\nimport { List as PrivateList } from '#PRIVATE_List';\nimport type { DataState, ListItemRendererContext, Metadata } from '#UNSAFE_Collection';\nimport { Flex } from '#UNSAFE_Flex';\nimport { HighlightText } from '#UNSAFE_HighlightText';\nimport { ListItemText } from '#UNSAFE_ListItemLayout';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport type { Keys } from '#utils/UNSAFE_keys';\nimport type { ItemTextType } from '#utils/UNSAFE_selectUtils';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { type ComponentName, renderItemText } from './itemTextUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype ListProps<K extends string | number, D> = ComponentProps<typeof List<K, D>>;\ntype PickedPropsFromList = Pick<\n ComponentProps<typeof List>,\n 'aria-label' | 'currentItemVariant' | 'selectionMode'\n>;\n\n// pick the props from the ListItemContext instead of extending it directly so that we\n// don't automatically expose any new props that may be added to it\ntype PickedPropsFromListItemContext<K, D> = Pick<\n ListItemRendererContext<K, D>,\n 'data' | 'index' | 'selector'\n>;\ntype ItemRendererSelectionDetail<K> = {\n value: Set<K>;\n target: EventTarget | null;\n};\ntype ItemRendererMetadata<K> = Pick<Metadata<K>, 'key' | 'suggestion'>;\ntype ItemRendererProps<K, D> = PickedPropsFromListItemContext<K, D> & {\n metadata: ItemRendererMetadata<K>;\n searchText?: string;\n selectedKeys?: Set<K>;\n onSelectionChange: (detail: ItemRendererSelectionDetail<K>) => void;\n};\n\ntype DefaultListCurrentKeyDetail<K> = { value: K };\ntype DefaultListItemActionDetail<K, D> = { context: Item<K, D> };\ntype DefaultListSelectionDetail<K> = { value: Set<K> };\n\ntype Props<K extends string | number, D extends Record<string, any>> = PickedPropsFromList & {\n itemRenderer?: (itemRendererProps: ItemRendererProps<K, D>) => ComponentChildren;\n itemText: ItemTextType<K, D>;\n // props from List that we constrain or unconstrain\n currentKey?: K;\n data?: DataState<K, D> | null;\n onCurrentKeyChange: (detail: DefaultListCurrentKeyDetail<K>) => void;\n onItemAction?: (detail: DefaultListItemActionDetail<K, D>) => void;\n onLoadRange?: ComponentProps<typeof PrivateList>['onLoadRange'];\n onSelectionChange?: (detail: DefaultListSelectionDetail<K>) => void;\n searchText?: string;\n selectedKeys?: Set<K>;\n // props for logging purposes\n componentName: ComponentName;\n};\n\nconst noOp = () => {};\n\nexport function DefaultList<K extends string | number, D extends Record<string, any>>({\n 'aria-label': ariaLabel,\n componentName,\n currentItemVariant,\n currentKey,\n data,\n itemRenderer,\n itemText,\n onCurrentKeyChange,\n onItemAction,\n onLoadRange = noOp,\n onSelectionChange,\n searchText,\n selectedKeys,\n selectionMode\n}: Props<K, D>) {\n const listItemRenderer = useCallback(\n (listItemContext: ListItemRendererContext<K, D>) => {\n // specify the listItemContext props that we want to expose individually instead of\n // spreading the whole object so that we don't automatically include any new props that\n // may be added to it\n const itemRendererProps: ItemRendererProps<K, D> = {\n data: listItemContext.data,\n index: listItemContext.index,\n metadata: listItemContext.metadata,\n selector: listItemContext.selector,\n searchText,\n selectedKeys,\n onSelectionChange: ({ value }) => {\n onSelectionChange?.({ value });\n }\n };\n const itemContext = {\n data: listItemContext.data,\n key: listItemContext.metadata.key,\n metadata: listItemContext.metadata\n };\n return itemRenderer ? (\n itemRenderer(itemRendererProps)\n ) : (\n <Flex align=\"center\">\n {listItemContext.selector && (\n <div class={dropdownStyles.selectorWrapper}>{listItemContext.selector()}</div>\n )}\n <div\n class={\n selectionMode === 'single'\n ? dropdownStyles.singleSelectItem\n : dropdownStyles.multiSelectItem\n }>\n <ListItemText variant=\"primary\">\n <HighlightText matchText={searchText}>\n {renderItemText(itemContext, itemText, componentName) as string}\n </HighlightText>\n </ListItemText>\n </div>\n </Flex>\n );\n },\n [\n componentName,\n itemRenderer,\n itemText,\n onSelectionChange,\n searchText,\n selectedKeys,\n selectionMode\n ]\n );\n\n const keys = useMemo(() => {\n return { all: false, keys: selectedKeys ?? new Set<K>() };\n }, [selectedKeys]) as Keys<K>;\n\n const currentItemOverride = useMemo(\n () => (currentKey !== undefined ? { rowKey: currentKey } : undefined),\n [currentKey]\n );\n const handleItemAction = useCallback<NonNullable<ListProps<K, D>['onItemAction']>>(\n ({ context: { data, metadata } }) => {\n onItemAction?.({ context: { data, key: metadata.key, metadata } });\n },\n [onItemAction]\n );\n const handleSelectionChange = useCallback<NonNullable<ListProps<K, D>['onSelectedChange']>>(\n ({ value }) => {\n onSelectionChange?.({ value: new Set(value.keys?.values()) });\n },\n [onSelectionChange]\n );\n\n const hasMore =\n data == null || (data.sizePrecision === 'atLeast' && data.data.length <= data.totalSize);\n\n const onLoadMore = useCallback(() => {\n onLoadRange({ offset: 0, count: 25 + (data != null ? data.data.length : 0) });\n }, [data, onLoadRange]);\n\n return (\n <List<K, D>\n aria-label={ariaLabel}\n currentItemVariant={currentItemVariant}\n currentItemOverride={currentItemOverride}\n collectionData={data?.data}\n onPersistCurrentItem={onCurrentKeyChange}\n onItemAction={handleItemAction}\n hasMore={hasMore}\n onLoadMore={onLoadMore}\n onSelectedChange={handleSelectionChange}\n role=\"listbox\"\n selected={keys}\n selectionMode={selectionMode}>\n {(context: ListItemRendererContext<K, D>) => listItemRenderer(context)}\n </List>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useCallback } from 'preact/hooks';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { DropdownArrowIcon } from '../PRIVATE_ThemedIcons/DropdownArrowIcon';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { ButtonLabelLayoutRedwoodTheme } from '#UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme';\nimport type { ButtonLabelLayoutVariantOptions } from '#UNSAFE_ButtonLabelLayout/themes/ButtonLabelLayoutStyles.css';\nimport { TestIdProps, useTestId } from '#hooks/UNSAFE_useTestId';\nimport { BaseButtonRedwoodTheme } from '#UNSAFE_BaseButton/themes/redwood/BaseButtonTheme';\n\ntype Props = TestIdProps & {\n isDisabled?: boolean;\n onClick?: () => void;\n};\n\nconst noop = () => {};\n\nexport function DropdownArrow({ isDisabled = false, onClick, testId }: Props) {\n const { classes } = useComponentTheme<ButtonLabelLayoutVariantOptions>(\n ButtonLabelLayoutRedwoodTheme,\n { size: 'sm' }\n );\n const { baseTheme } = useComponentTheme(BaseButtonRedwoodTheme);\n\n const preventDefault = useCallback((event: Event) => {\n event.preventDefault();\n }, []);\n const { pressProps } = usePress(onClick ?? noop, { isDisabled });\n\n // TODO: JET-67410 replace this with a icon button\n const styleClasses = classNames([\n classes,\n baseTheme,\n dropdownStyles.arrow.base,\n isDisabled ? dropdownStyles.arrow.disabled : dropdownStyles.arrow.enabled\n ]);\n\n const testIdProps = useTestId(testId);\n\n return (\n <span\n aria-hidden=\"true\"\n class={styleClasses}\n tabIndex={-1}\n onMouseDown={preventDefault}\n {...testIdProps}\n {...pressProps}>\n <DropdownArrowIcon />\n </span>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { Text } from '#UNSAFE_Text';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\nexport function EmptyResults() {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n // call preventDefault for mousedown on this div so that focus does not transfer from\n // the input\n return (\n <div class={dropdownStyles.results.extraItem} onMouseDown={preventDefaultForCurrentTarget}>\n <Text variant=\"primary\">{translations.select_noMatchesFound()}</Text>\n </div>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport { KEYS } from '#utils/PRIVATE_keyboardUtils';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\n\n/**\n * Helper function to determine whether the current device is a mobile device\n * @returns true if running on a mobile device, false otherwise\n */\nexport function isMobile() {\n const deviceType = getClientHints().deviceType;\n return deviceType === 'phone' || deviceType === 'tablet';\n}\n\n/**\n * Helper function to determine whether the current device is a phone\n * @returns true if running on a phone, false otherwise\n */\nexport function isPhone() {\n return getClientHints().deviceType === 'phone';\n}\n\n/**\n * Helper function to determine whether the current device is a tablet\n * @returns true if running on a tablet, false otherwise\n */\nexport function isTablet() {\n return getClientHints().deviceType === 'tablet';\n}\n\nexport function isBeforeDataFetch<K, D>(data: DataState<K, D>) {\n return data.sizePrecision === 'atLeast' && data.totalSize === 0;\n}\n\nexport function isSearchTextEmptyOrUndefined(searchText?: string) {\n return searchText === undefined || searchText.length === 0;\n}\n\nexport function isSearchClearedFirstTime(prevSearchText?: string, searchText?: string) {\n return prevSearchText === undefined && searchText === '';\n}\n\nconst LEGACY_IME_PROCESS_KEY_CODE = 229;\n\n/**\n * JET-77501 - WHILE TYPING /SEARCHING JAPANESE CHARACTERS THE MENU DID NOT SHOW THE SUGGESTIONS FOR THE ENTERED VALUE\n * `event.isComposing` means the key event is still inside a composition session:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing\n * Common CJK IMEs compose text before commit. Apple documents Japanese conversion using\n * Space, arrow keys, and Return; Chinese/Cantonese candidate navigation using arrow keys\n * and Space or Return; and Korean Hanja candidates using arrow keys, Space, and Return.\n * Windows also exposes IME-specific virtual keys, including IME convert and accept keys.\n * https://support.apple.com/guide/japanese-input-method/keyboard-shortcuts-jpim10263/mac\n * https://support.apple.com/guide/chinese-input-method/use-the-candidate-window-cim12992/mac\n * https://support.apple.com/guide/korean-input-method/welcome/mac\n * https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes\n * If Select handles these keydown events while composing, it interferes with IME-owned\n * navigation and confirmation. Enter/NumpadEnter can be consumed by Select to commit or clear\n * the select value before the IME commits the composed text. Up/Down can be consumed by Select\n * to prevent default browser/IME behavior or move focus from the input into the select dropdown\n * while the user is still navigating IME candidates.\n */\nexport function shouldIgnoreSelectInputKeyDownDuringComposition(event: KeyboardEvent) {\n const isEnter = event.code === KEYS.ENTER || event.code === KEYS.NUMPAD_ENTER;\n const isArrow = event.code === KEYS.UP || event.code === KEYS.DOWN;\n // JET-77501 - WHILE TYPING /SEARCHING JAPANESE CHARACTERS THE MENU DID NOT SHOW THE SUGGESTIONS FOR THE ENTERED VALUE\n // Safari/WebKit requires an additional fallback for the Enter key that confirms an IME\n // candidate. Affected versions dispatch `compositionend` before that `keydown`, so the Enter\n // event incorrectly has `isComposing === false` and would otherwise reach Select's commit logic.\n // Those versions report `keyCode === 229` for the IME-owned event. Although `keyCode` is\n // deprecated, it is intentionally used only for this standards-API false negative:\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n // WebKit records the event-ordering issue as fixed by the following bug, but the incorrect\n // behavior was still manually reproducible in Safari 26.5. A WebKit source change or backport\n // does not establish that a particular Safari release contains the effective fix. Remove this\n // fallback only after the behavior has been verified in every supported Safari version:\n // https://bugs.webkit.org/show_bug.cgi?id=311717\n // Do not gate the fallback using browser detection. Browser branding does not reliably identify\n // every WebKit host, including alternate browsers on iOS and embedded WKWebView applications.\n // In any browser, key code 229 identifies an IME-processed event, so Select should not treat that\n // Enter as a request to commit or clear its value.\n const isLegacyImeConfirmation =\n !event.isComposing && isEnter && event.keyCode === LEGACY_IME_PROCESS_KEY_CODE;\n\n return (event.isComposing && (isEnter || isArrow)) || isLegacyImeConfirmation;\n}\n\n/**\n * JET-77501 - WHILE TYPING /SEARCHING JAPANESE CHARACTERS THE MENU DID NOT SHOW THE SUGGESTIONS FOR THE ENTERED VALUE\n * `event.isComposing` means the key event is still inside a composition session:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing\n * Common CJK IMEs compose text before commit. Apple documents Japanese conversion using\n * Up/Down Arrow for kanji candidates, Chinese/Cantonese candidate navigation using arrow\n * keys, and Korean Hanja candidate navigation using arrow keys.\n * Windows also exposes IME-specific virtual keys, including IME convert and accept keys.\n * https://support.apple.com/guide/japanese-input-method/keyboard-shortcuts-jpim10263/mac\n * https://support.apple.com/guide/chinese-input-method/use-the-candidate-window-cim12992/mac\n * https://support.apple.com/guide/korean-input-method/welcome/mac\n * https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes\n * If Select handles these keyup events while composing, it interferes with IME-owned\n * candidate navigation. Up/Down can open the select dropdown, move focus into the dropdown,\n * or change Select's current row after the IME has used the same key to navigate candidates.\n */\nexport function shouldIgnoreSelectInputKeyUpDuringComposition(event: KeyboardEvent) {\n return event.isComposing && (event.code === KEYS.UP || event.code === KEYS.DOWN);\n}\n\n/**\n * Extract keys from a value items array.\n *\n * @param valueItems The value items from which the keys are to be extracted\n * @returns The set of keys\n */\nexport function createKeysFromValueItems<K, D>(valueItems?: Item<K, D>[]) {\n const keys = valueItems?.reduce((accumKeys, currentItem) => {\n accumKeys.add(currentItem.key);\n return accumKeys;\n }, new Set<K>());\n return keys;\n}\n","import type { DataState } from '#UNSAFE_Collection';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport { useMemo } from 'preact/compat';\n\ntype Key = string | number;\ntype Data = Record<string, any>;\n\ntype UseCollectionRendererCommonParams<K> = {\n currentKey?: K;\n searchText?: string;\n selectedKeys?: Set<K>;\n onCurrentKeyChange: (detail: { value?: K }) => void;\n};\n\nexport type UseCollectionRendererSelectSingleParams<K, D> = UseCollectionRendererCommonParams<K> & {\n onItemAction: (detail: { context: Item<K, D> }) => void;\n onSelectedKeysChange?: never;\n selectedOnlyData?: never;\n};\n\nexport type UseCollectionRendererSelectMultipleParams<K, D> =\n UseCollectionRendererCommonParams<K> & {\n onItemAction?: never;\n onSelectedKeysChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n };\n\ntype UseCollectionRendererParams<K, D> =\n | UseCollectionRendererSelectSingleParams<K, D>\n | UseCollectionRendererSelectMultipleParams<K, D>;\n\ntype CommonCollectionRendererContext<K extends Key> = {\n searchText?: string;\n currentRowKeyOverride?: K;\n onPersistCurrentRowKey: (detail: { value?: K }) => void;\n selected?: Set<K>;\n};\n\nexport type SelectSingleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onRowAction: (detail: { context: Item<K, D> }) => void;\n};\n\nexport type SelectMultipleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onSelectedChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n};\n\ntype CollectionRendererContext<K extends Key, D extends Data> =\n | SelectSingleCollectionRendererContext<K, D>\n | SelectMultipleCollectionRendererContext<K, D>;\n\n// NOTE: We will using a single hook that constructs the collection renderer context for both select single and\n// select multiple. This is ok as they both share most of the properties and differ only in a few areas. So, we will\n// be using function overloading to determine which component is calling the hook (based on the args) and return the\n// correct context.\n\n/**\n * A custom hook that constructs the context for SelectSingle's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectSingleParams<K, D>\n): SelectSingleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectMultiple's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectMultipleParams<K, D>\n): SelectMultipleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectSingle/SelectMultiple's collectionRenderer.\n * @param param0 Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>({\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n}: UseCollectionRendererParams<K, D>) {\n return useMemo<CollectionRendererContext<K, D>>(() => {\n const common = {\n searchText,\n currentRowKeyOverride: currentKey,\n onPersistCurrentRowKey: onCurrentKeyChange,\n selected: selectedKeys\n } satisfies CommonCollectionRendererContext<K>;\n\n // If onItemAction is present, then we are constructing context for SelectSingle. So,\n // return the context satisfying SelectSingleCollectionRendererContext type.\n if (onItemAction !== undefined)\n return {\n ...common,\n onRowAction: onItemAction\n } satisfies SelectSingleCollectionRendererContext<K, D>;\n\n // If onItemAction is not present, then we are constructing context for SelectMultiple. So,\n // return the context satisfying SelectMultipleCollectionRendererContext type.\n return {\n ...common,\n onSelectedChange: onSelectedKeysChange,\n selectedOnlyData\n } satisfies SelectMultipleCollectionRendererContext<K, D>;\n }, [\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n ]);\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { RefObject } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport type { PositionData } from '#UNSAFE_Floating';\nimport { KEYS, isControlOrFunctionKey } from '#utils/PRIVATE_keyboardUtils';\nimport { allTabbableElements } from '#utils/PRIVATE_tabbableUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { isSimpleClick } from './eventUtils';\n\ntype UseSelectCommonProps<K, D> = {\n data?: DataState<K, D> | null;\n inputRef: RefObject<HTMLElement>;\n isFocused?: boolean;\n mainFieldRef?: RefObject<HTMLDivElement>;\n onFilter?: ({ searchText }: { searchText?: string }) => void;\n};\n\nexport type CurrentKeyDetail<K> = {\n value?: K;\n};\n\n/**\n * Hook that manages state and behavior for a Select* component. This hook creates state\n * variables and event listeners, returning properties to apply to components internally\n * rendered by a Select* component, as well as state information.\n *\n * @param data Specifies data for the dropdown list.\n * @param inputRef Ref to the input element.\n * @param isFocused Specifies whether the component has focus.\n * @param onFilter Callback function to trigger loading data for the dropdown list,\n * which may or may not be filtered by user entered text.\n *\n * @returns Component state and event listeners.\n */\nexport function useSelectCommon<K, D>({\n data,\n inputRef,\n isFocused,\n mainFieldRef: externalMainFieldRef,\n onFilter\n}: UseSelectCommonProps<K, D>) {\n const localMainFieldRef = useRef<HTMLDivElement>(null);\n // Some migrated controls now create the shell anchor ref through `useInputBase`.\n // Accepting an external ref here lets the select behavior hooks keep using the exact same\n // field anchor for compact assistance, popup positioning, and readonly-only hidden methods.\n const mainFieldRef = externalMainFieldRef ?? localMainFieldRef;\n const dropdownRef = useRef<HTMLDivElement>(null);\n const [isDropdownOpen, setDropdownOpen] = useState(false);\n const [isDropdownAbove, setDropdownAbove] = useState(false);\n\n // We only need to push currentRow when we need to override the\n // current row, like when the dropdown is opened and we want to set the initial\n // focused row or when filtering and we want to focus the first row.\n const [currentRowOverride, _setCurrentRowOverride] = useState<{ rowKey?: K }>({\n rowKey: undefined\n });\n // We still need information on what the current row actually is, but we do not need\n // to react to it until certain scenarios like pressing Tab from the dropdown. So, we\n // just store this in a ref.\n const currentRowKeyRef = useRef<K>();\n // When we want to update the currentRowOverride, we also want to keep the currentRowKeyRef\n // in sync as the collection will not call onChanged for this change.\n const setCurrentRowOverride = useCallback((currentRow: { rowKey?: K }) => {\n currentRowKeyRef.current = currentRow.rowKey;\n _setCurrentRowOverride(currentRow);\n }, []);\n const [isUserFiltering, setUserFiltering] = useState(false);\n const [userInput, setUserInput] = useState<string>();\n const [searchText, setSearchText] = useState<string>();\n\n const [prevIsDropdownOpen, setPrevIsDropdownOpen] = useState(isDropdownOpen);\n const [prevIsFocused, setPrevIsFocused] = useState(isFocused);\n const [prevIsUserFiltering, setPrevIsUserFiltering] = useState(isUserFiltering);\n\n const onMouseDown = useCallback(\n (event: MouseEvent) => {\n // const target = event.target as HTMLElement;\n if (event.defaultPrevented || !isSimpleClick(event)) {\n return;\n }\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n // this is needed to focus the input when clicking on the inside label when there is no\n // value; otherwise the component looks focused but doesn't actually have physical focus\n setTimeout(function () {\n inputRef.current?.focus();\n }, 0);\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownArrowClick = useCallback(() => {\n setDropdownOpen(!isDropdownOpen);\n\n // focus the input so that if the user Tabs afterwards, it loses focus and the dropdown closes\n inputRef.current?.focus();\n }, [inputRef, isDropdownOpen]);\n\n const handleDropdownAutoDismiss = useCallback(\n (event?: Event) => {\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n switch (event?.type) {\n case 'keydown': {\n const keyboardEvent = event as KeyboardEvent;\n switch (keyboardEvent.code) {\n case KEYS.ESC:\n // focus the input when the user cancels out of the dropdown\n inputRef.current?.focus();\n break;\n default:\n break;\n }\n break;\n }\n case 'mousedown':\n // if focus is in the dropdown, focus the input before the dropdown is hidden so that\n // focus will transfer correctly when the target is not focusable;\n // otherwise the text cursor appears in the input again\n if (dropdownRef.current?.contains(document.activeElement)) {\n inputRef.current?.focus();\n }\n break;\n default:\n break;\n }\n }\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownPosition = useCallback((data: PositionData) => {\n setDropdownAbove(data.placement.startsWith('top'));\n }, []);\n\n const getDropdownTabbableElems = useCallback(() => {\n return isDropdownOpen && dropdownRef.current\n ? allTabbableElements(dropdownRef.current)\n : undefined;\n }, [isDropdownOpen]);\n\n const handleUpDownArrowKeys = useCallback(\n (event: KeyboardEvent) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n } else {\n // JET-64909 - focus / 'current' dropped when arrow keying during loading\n // Transfer physical focus into the dropdown only if the data is present and the dropdown\n // has rendered the data. Otherwise, keep the focus in the field.\n if (data != null) {\n const tabbableElems = getDropdownTabbableElems();\n tabbableElems?.[0]?.focus();\n\n // if there is no current item set, make the first item current\n if (currentRowOverride.rowKey === undefined) {\n setCurrentRowOverride({ rowKey: data.data[0]?.metadata?.key });\n }\n }\n }\n\n // prevent the page from scrolling\n event.preventDefault();\n },\n [currentRowOverride, data, getDropdownTabbableElems, isDropdownOpen, setCurrentRowOverride]\n );\n\n const handleMainFieldKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // const target = event.target as HTMLElement;\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.PAGE_UP:\n case KEYS.PAGE_DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n\n return;\n\n case KEYS.UP:\n case KEYS.DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n break;\n\n case KEYS.ESC:\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n event.preventDefault();\n\n // JET-53183 - core pack compat: stop propagation of handled events\n // we don't want a parent collection component to stop editing the row when we close\n // the dropdown\n event.stopPropagation();\n }\n break;\n\n default:\n break;\n }\n },\n [isDropdownOpen]\n );\n\n const handleMainFieldKeyUp = useCallback(\n (event: KeyboardEvent) => {\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n handleUpDownArrowKeys(event);\n break;\n\n default:\n break;\n }\n },\n [handleUpDownArrowKeys]\n );\n\n const handleInput = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n setUserFiltering(true);\n setUserInput(detail.value);\n const str = detail.value;\n setSearchText(str);\n onFilter?.({ searchText: str });\n },\n [isDropdownOpen, onFilter]\n );\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K>) => {\n // when the collection changes the current key, we only want to store the information\n // and not do anything.\n currentRowKeyRef.current = detail.value;\n }, []);\n\n const stopFiltering = useCallback(() => {\n setUserFiltering(false);\n setUserInput('');\n // Set this to `undefined` as this represents the initial state.\n // We need to do this for select-single as we need to highlight different\n // rows based on whether it is the initial dropdown navigation or empty filter navigation.\n setSearchText(undefined);\n }, []);\n\n const updateFiltering = useCallback((value?: string) => {\n setUserFiltering(true);\n setUserInput(value);\n setSearchText(value);\n }, []);\n\n // the user is not actively filtering if the dropdown is closed and the component doesn't\n // have focus\n if (\n prevIsDropdownOpen !== isDropdownOpen ||\n prevIsFocused !== isFocused ||\n prevIsUserFiltering !== isUserFiltering\n ) {\n if (!isDropdownOpen && !isFocused && isUserFiltering) {\n stopFiltering();\n }\n }\n\n // need to call onFilter with undefined searchText when the dropdown opens and the\n // user is NOT filtering\n useEffect(() => {\n if (isDropdownOpen && !isUserFiltering) {\n onFilter?.({ searchText: undefined });\n }\n }, [isDropdownOpen, isUserFiltering, onFilter]);\n\n // when the dropdown closes, reset the isDropdownAbove flag\n if (prevIsDropdownOpen !== isDropdownOpen) {\n if (!isDropdownOpen) {\n setDropdownAbove(false);\n }\n setPrevIsDropdownOpen(isDropdownOpen);\n }\n\n if (prevIsFocused !== isFocused) {\n setPrevIsFocused(isFocused);\n }\n if (prevIsUserFiltering !== isUserFiltering) {\n setPrevIsUserFiltering(isUserFiltering);\n }\n\n return {\n currentRowKeyRef,\n currentRowOverride,\n dropdownRef,\n getDropdownTabbableElems,\n handleDropdownArrowClick,\n handleDropdownAutoDismiss,\n handleDropdownPosition,\n handleInput,\n handleMainFieldKeyDown,\n handleMainFieldKeyUp,\n handleUpDownArrowKeys,\n isDropdownAbove,\n isDropdownOpen,\n // the field should remain to look focused while the dropdown is open,\n // in case physical focus is in the dropdown\n isFocused: isFocused || isDropdownOpen,\n isUserFiltering,\n mainFieldRef,\n onCurrentKeyChange,\n onMouseDown,\n searchText,\n setCurrentRowOverride,\n setDropdownOpen,\n setUserInput,\n stopFiltering,\n updateFiltering,\n userInput\n };\n}\n"],"names":["error","useCallback","_jsxs","Flex","_jsx","dropdownStyles","ListItemText","HighlightText","useMemo","List","useComponentTheme","ButtonLabelLayoutRedwoodTheme","BaseButtonRedwoodTheme","usePress","classNames","useTestId","DropdownArrowIcon","useTranslationBundle","preventDefaultForCurrentTarget","Text","getClientHints","KEYS","useRef","useState","isSimpleClick","allTabbableElements","isControlOrFunctionKey","useEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;SAQa,cAAc,CAC5B,IAAgB,EAChB,QAA4B,EAC5B,aAA4B,EAAA;;;AAI5B,IAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;;;;;AAKhC,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;AAC3B,QAAA,IAAI,QAAQ,IAAI,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC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","../../src/PRIVATE_SelectCommon/DefaultList.tsx","../../src/PRIVATE_SelectCommon/DropdownArrow.tsx","../../src/PRIVATE_SelectCommon/EmptyResults.tsx","../../src/PRIVATE_SelectCommon/selectUtils.ts","../../src/PRIVATE_SelectCommon/useCollectionRenderer.ts","../../src/PRIVATE_SelectCommon/useSelectCommon.ts"],"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 { Item } from '#utils/UNSAFE_dataProvider';\nimport { error } from '#utils/UNSAFE_logger';\nimport { ItemTextFunctionType, ItemTextType } from '#utils/UNSAFE_selectUtils';\n\nexport type ComponentName = 'InlineSelectSingle' | 'SelectSingle' | 'SelectMultiple';\n\nexport function renderItemText<K, D>(\n item: Item<K, D>,\n itemText: ItemTextType<K, D>,\n componentName: ComponentName\n) {\n // if item-text is a string and the data has the specified field, return it;\n // otherwise log an error\n if (typeof itemText === 'string') {\n // JET-78134: in 26C rc0 preflight, line type is not editable in PRC\n // Some JS applications incorrectly pass {} as valueItem/value-item instead of null\n // or leaving the property unset for the empty state. Older releases already handled that misconfiguration\n // by logging this custom error; keep that behavior and avoid throwing when item.data is missing.\n const itemData = item.data;\n if (itemData != null && Object.prototype.hasOwnProperty.call(itemData, itemText)) {\n const retData = itemData[itemText];\n return String(retData);\n }\n error(`${componentName}: itemText specifies field that does not exist: ${itemText}`);\n // return undefined if the field doesn't exist\n return undefined;\n }\n // if item-text is a function, call it to create a display label\n return (itemText as ItemTextFunctionType<K, D>)(item);\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { ComponentChildren, ComponentProps } from 'preact';\n\nimport { List } from '#PRIVATE_TableList';\nimport { List as PrivateList } from '#PRIVATE_List';\nimport type { DataState, ListItemRendererContext, Metadata } from '#UNSAFE_Collection';\nimport { Flex } from '#UNSAFE_Flex';\nimport { HighlightText } from '#UNSAFE_HighlightText';\nimport { ListItemText } from '#UNSAFE_ListItemLayout';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport type { Keys } from '#utils/UNSAFE_keys';\nimport type { ItemTextType } from '#utils/UNSAFE_selectUtils';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { type ComponentName, renderItemText } from './itemTextUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype ListProps<K extends string | number, D> = ComponentProps<typeof List<K, D>>;\ntype PickedPropsFromList = Pick<\n ComponentProps<typeof List>,\n 'aria-label' | 'currentItemVariant' | 'selectionMode'\n>;\n\n// pick the props from the ListItemContext instead of extending it directly so that we\n// don't automatically expose any new props that may be added to it\ntype PickedPropsFromListItemContext<K, D> = Pick<\n ListItemRendererContext<K, D>,\n 'data' | 'index' | 'selector'\n>;\ntype ItemRendererSelectionDetail<K> = {\n value: Set<K>;\n target: EventTarget | null;\n};\ntype ItemRendererMetadata<K> = Pick<Metadata<K>, 'key' | 'suggestion'>;\ntype ItemRendererProps<K, D> = PickedPropsFromListItemContext<K, D> & {\n metadata: ItemRendererMetadata<K>;\n searchText?: string;\n selectedKeys?: Set<K>;\n onSelectionChange: (detail: ItemRendererSelectionDetail<K>) => void;\n};\n\ntype DefaultListCurrentKeyDetail<K> = { value: K };\ntype DefaultListItemActionDetail<K, D> = { context: Item<K, D> };\ntype DefaultListSelectionDetail<K> = { value: Set<K> };\n\ntype Props<K extends string | number, D extends Record<string, any>> = PickedPropsFromList & {\n itemRenderer?: (itemRendererProps: ItemRendererProps<K, D>) => ComponentChildren;\n itemText: ItemTextType<K, D>;\n // props from List that we constrain or unconstrain\n currentKey?: K;\n data?: DataState<K, D> | null;\n onCurrentKeyChange: (detail: DefaultListCurrentKeyDetail<K>) => void;\n onItemAction?: (detail: DefaultListItemActionDetail<K, D>) => void;\n onLoadRange?: ComponentProps<typeof PrivateList>['onLoadRange'];\n onSelectionChange?: (detail: DefaultListSelectionDetail<K>) => void;\n searchText?: string;\n selectedKeys?: Set<K>;\n // props for logging purposes\n componentName: ComponentName;\n};\n\nconst noOp = () => {};\n\nexport function DefaultList<K extends string | number, D extends Record<string, any>>({\n 'aria-label': ariaLabel,\n componentName,\n currentItemVariant,\n currentKey,\n data,\n itemRenderer,\n itemText,\n onCurrentKeyChange,\n onItemAction,\n onLoadRange = noOp,\n onSelectionChange,\n searchText,\n selectedKeys,\n selectionMode\n}: Props<K, D>) {\n const listItemRenderer = useCallback(\n (listItemContext: ListItemRendererContext<K, D>) => {\n // specify the listItemContext props that we want to expose individually instead of\n // spreading the whole object so that we don't automatically include any new props that\n // may be added to it\n const itemRendererProps: ItemRendererProps<K, D> = {\n data: listItemContext.data,\n index: listItemContext.index,\n metadata: listItemContext.metadata,\n selector: listItemContext.selector,\n searchText,\n selectedKeys,\n onSelectionChange: ({ value }) => {\n onSelectionChange?.({ value });\n }\n };\n const itemContext = {\n data: listItemContext.data,\n key: listItemContext.metadata.key,\n metadata: listItemContext.metadata\n };\n return itemRenderer ? (\n itemRenderer(itemRendererProps)\n ) : (\n <Flex align=\"center\">\n {listItemContext.selector && (\n <div class={dropdownStyles.selectorWrapper}>{listItemContext.selector()}</div>\n )}\n <div\n class={\n selectionMode === 'single'\n ? dropdownStyles.singleSelectItem\n : dropdownStyles.multiSelectItem\n }>\n <ListItemText variant=\"primary\">\n <HighlightText matchText={searchText}>\n {renderItemText(itemContext, itemText, componentName) as string}\n </HighlightText>\n </ListItemText>\n </div>\n </Flex>\n );\n },\n [\n componentName,\n itemRenderer,\n itemText,\n onSelectionChange,\n searchText,\n selectedKeys,\n selectionMode\n ]\n );\n\n const keys = useMemo(() => {\n return { all: false, keys: selectedKeys ?? new Set<K>() };\n }, [selectedKeys]) as Keys<K>;\n\n const currentItemOverride = useMemo(\n () => (currentKey !== undefined ? { rowKey: currentKey } : undefined),\n [currentKey]\n );\n const handleItemAction = useCallback<NonNullable<ListProps<K, D>['onItemAction']>>(\n ({ context: { data, metadata } }) => {\n onItemAction?.({ context: { data, key: metadata.key, metadata } });\n },\n [onItemAction]\n );\n const handleSelectionChange = useCallback<NonNullable<ListProps<K, D>['onSelectedChange']>>(\n ({ value }) => {\n onSelectionChange?.({ value: new Set(value.keys?.values()) });\n },\n [onSelectionChange]\n );\n\n const hasMore =\n data == null || (data.sizePrecision === 'atLeast' && data.data.length <= data.totalSize);\n\n const onLoadMore = useCallback(() => {\n onLoadRange({ offset: 0, count: 25 + (data != null ? data.data.length : 0) });\n }, [data, onLoadRange]);\n\n return (\n <List<K, D>\n aria-label={ariaLabel}\n currentItemVariant={currentItemVariant}\n currentItemOverride={currentItemOverride}\n collectionData={data?.data}\n onPersistCurrentItem={onCurrentKeyChange}\n onItemAction={handleItemAction}\n hasMore={hasMore}\n onLoadMore={onLoadMore}\n onSelectedChange={handleSelectionChange}\n role=\"listbox\"\n selected={keys}\n selectionMode={selectionMode}>\n {(context: ListItemRendererContext<K, D>) => listItemRenderer(context)}\n </List>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useCallback } from 'preact/hooks';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { DropdownArrowIcon } from '../PRIVATE_ThemedIcons/DropdownArrowIcon';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { ButtonLabelLayoutRedwoodTheme } from '#UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme';\nimport type { ButtonLabelLayoutVariantOptions } from '#UNSAFE_ButtonLabelLayout/themes/ButtonLabelLayoutStyles.css';\nimport { TestIdProps, useTestId } from '#hooks/UNSAFE_useTestId';\nimport { BaseButtonRedwoodTheme } from '#UNSAFE_BaseButton/themes/redwood/BaseButtonTheme';\n\ntype Props = TestIdProps & {\n isDisabled?: boolean;\n onClick?: () => void;\n};\n\nconst noop = () => {};\n\nexport function DropdownArrow({ isDisabled = false, onClick, testId }: Props) {\n const { classes } = useComponentTheme<ButtonLabelLayoutVariantOptions>(\n ButtonLabelLayoutRedwoodTheme,\n { size: 'sm' }\n );\n const { baseTheme } = useComponentTheme(BaseButtonRedwoodTheme);\n\n const preventDefault = useCallback((event: Event) => {\n event.preventDefault();\n }, []);\n const { pressProps } = usePress(onClick ?? noop, { isDisabled });\n\n // TODO: JET-67410 replace this with a icon button\n const styleClasses = classNames([\n classes,\n baseTheme,\n dropdownStyles.arrow.base,\n isDisabled ? dropdownStyles.arrow.disabled : dropdownStyles.arrow.enabled\n ]);\n\n const testIdProps = useTestId(testId);\n\n return (\n <span\n aria-hidden=\"true\"\n class={styleClasses}\n tabIndex={-1}\n onMouseDown={preventDefault}\n {...testIdProps}\n {...pressProps}>\n <DropdownArrowIcon />\n </span>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { Text } from '#UNSAFE_Text';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\nexport function EmptyResults() {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n // call preventDefault for mousedown on this div so that focus does not transfer from\n // the input\n return (\n <div class={dropdownStyles.results.extraItem} onMouseDown={preventDefaultForCurrentTarget}>\n <Text variant=\"primary\">{translations.select_noMatchesFound()}</Text>\n </div>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport { KEYS } from '#utils/PRIVATE_keyboardUtils';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\n\n/**\n * Helper function to determine whether the current device is a mobile device\n * @returns true if running on a mobile device, false otherwise\n */\nexport function isMobile() {\n const deviceType = getClientHints().deviceType;\n return deviceType === 'phone' || deviceType === 'tablet';\n}\n\n/**\n * Helper function to determine whether the current device is a phone\n * @returns true if running on a phone, false otherwise\n */\nexport function isPhone() {\n return getClientHints().deviceType === 'phone';\n}\n\n/**\n * Helper function to determine whether the current device is a tablet\n * @returns true if running on a tablet, false otherwise\n */\nexport function isTablet() {\n return getClientHints().deviceType === 'tablet';\n}\n\nexport function isBeforeDataFetch<K, D>(data: DataState<K, D>) {\n return data.sizePrecision === 'atLeast' && data.totalSize === 0;\n}\n\nexport function isSearchTextEmptyOrUndefined(searchText?: string) {\n return searchText === undefined || searchText.length === 0;\n}\n\nexport function isSearchClearedFirstTime(prevSearchText?: string, searchText?: string) {\n return prevSearchText === undefined && searchText === '';\n}\n\nconst LEGACY_IME_PROCESS_KEY_CODE = 229;\n\n/**\n * JET-77501 - WHILE TYPING /SEARCHING JAPANESE CHARACTERS THE MENU DID NOT SHOW THE SUGGESTIONS FOR THE ENTERED VALUE\n * `event.isComposing` means the key event is still inside a composition session:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing\n * Common CJK IMEs compose text before commit. Apple documents Japanese conversion using\n * Space, arrow keys, and Return; Chinese/Cantonese candidate navigation using arrow keys\n * and Space or Return; and Korean Hanja candidates using arrow keys, Space, and Return.\n * Windows also exposes IME-specific virtual keys, including IME convert and accept keys.\n * https://support.apple.com/guide/japanese-input-method/keyboard-shortcuts-jpim10263/mac\n * https://support.apple.com/guide/chinese-input-method/use-the-candidate-window-cim12992/mac\n * https://support.apple.com/guide/korean-input-method/welcome/mac\n * https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes\n * If Select handles these keydown events while composing, it interferes with IME-owned\n * navigation and confirmation. Enter/NumpadEnter can be consumed by Select to commit or clear\n * the select value before the IME commits the composed text. Up/Down can be consumed by Select\n * to prevent default browser/IME behavior or move focus from the input into the select dropdown\n * while the user is still navigating IME candidates.\n */\nexport function shouldIgnoreSelectInputKeyDownDuringComposition(event: KeyboardEvent) {\n const isEnter = event.code === KEYS.ENTER || event.code === KEYS.NUMPAD_ENTER;\n const isArrow = event.code === KEYS.UP || event.code === KEYS.DOWN;\n // JET-77501 - WHILE TYPING /SEARCHING JAPANESE CHARACTERS THE MENU DID NOT SHOW THE SUGGESTIONS FOR THE ENTERED VALUE\n // Safari/WebKit requires an additional fallback for the Enter key that confirms an IME\n // candidate. Affected versions dispatch `compositionend` before that `keydown`, so the Enter\n // event incorrectly has `isComposing === false` and would otherwise reach Select's commit logic.\n // Those versions report `keyCode === 229` for the IME-owned event. Although `keyCode` is\n // deprecated, it is intentionally used only for this standards-API false negative:\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n // WebKit records the event-ordering issue as fixed by the following bug, but the incorrect\n // behavior was still manually reproducible in Safari 26.5. A WebKit source change or backport\n // does not establish that a particular Safari release contains the effective fix. Remove this\n // fallback only after the behavior has been verified in every supported Safari version:\n // https://bugs.webkit.org/show_bug.cgi?id=311717\n // Do not gate the fallback using browser detection. Browser branding does not reliably identify\n // every WebKit host, including alternate browsers on iOS and embedded WKWebView applications.\n // In any browser, key code 229 identifies an IME-processed event, so Select should not treat that\n // Enter as a request to commit or clear its value.\n const isLegacyImeConfirmation =\n !event.isComposing && isEnter && event.keyCode === LEGACY_IME_PROCESS_KEY_CODE;\n\n return (event.isComposing && (isEnter || isArrow)) || isLegacyImeConfirmation;\n}\n\n/**\n * JET-77501 - WHILE TYPING /SEARCHING JAPANESE CHARACTERS THE MENU DID NOT SHOW THE SUGGESTIONS FOR THE ENTERED VALUE\n * `event.isComposing` means the key event is still inside a composition session:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing\n * Common CJK IMEs compose text before commit. Apple documents Japanese conversion using\n * Up/Down Arrow for kanji candidates, Chinese/Cantonese candidate navigation using arrow\n * keys, and Korean Hanja candidate navigation using arrow keys.\n * Windows also exposes IME-specific virtual keys, including IME convert and accept keys.\n * https://support.apple.com/guide/japanese-input-method/keyboard-shortcuts-jpim10263/mac\n * https://support.apple.com/guide/chinese-input-method/use-the-candidate-window-cim12992/mac\n * https://support.apple.com/guide/korean-input-method/welcome/mac\n * https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes\n * If Select handles these keyup events while composing, it interferes with IME-owned\n * candidate navigation. Up/Down can open the select dropdown, move focus into the dropdown,\n * or change Select's current row after the IME has used the same key to navigate candidates.\n */\nexport function shouldIgnoreSelectInputKeyUpDuringComposition(event: KeyboardEvent) {\n return event.isComposing && (event.code === KEYS.UP || event.code === KEYS.DOWN);\n}\n\n/**\n * Extract keys from a value items array.\n *\n * @param valueItems The value items from which the keys are to be extracted\n * @returns The set of keys\n */\nexport function createKeysFromValueItems<K, D>(valueItems?: Item<K, D>[]) {\n const keys = valueItems?.reduce((accumKeys, currentItem) => {\n accumKeys.add(currentItem.key);\n return accumKeys;\n }, new Set<K>());\n return keys;\n}\n","import type { DataState } from '#UNSAFE_Collection';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport { useMemo } from 'preact/compat';\n\ntype Key = string | number;\ntype Data = Record<string, any>;\n\ntype UseCollectionRendererCommonParams<K> = {\n currentKey?: K;\n searchText?: string;\n selectedKeys?: Set<K>;\n onCurrentKeyChange: (detail: { value?: K }) => void;\n};\n\nexport type UseCollectionRendererSelectSingleParams<K, D> = UseCollectionRendererCommonParams<K> & {\n onItemAction: (detail: { context: Item<K, D> }) => void;\n onSelectedKeysChange?: never;\n selectedOnlyData?: never;\n};\n\nexport type UseCollectionRendererSelectMultipleParams<K, D> =\n UseCollectionRendererCommonParams<K> & {\n onItemAction?: never;\n onSelectedKeysChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n };\n\ntype UseCollectionRendererParams<K, D> =\n | UseCollectionRendererSelectSingleParams<K, D>\n | UseCollectionRendererSelectMultipleParams<K, D>;\n\ntype CommonCollectionRendererContext<K extends Key> = {\n searchText?: string;\n currentRowKeyOverride?: K;\n onPersistCurrentRowKey: (detail: { value?: K }) => void;\n selected?: Set<K>;\n};\n\nexport type SelectSingleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onRowAction: (detail: { context: Item<K, D> }) => void;\n};\n\nexport type SelectMultipleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onSelectedChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n};\n\ntype CollectionRendererContext<K extends Key, D extends Data> =\n | SelectSingleCollectionRendererContext<K, D>\n | SelectMultipleCollectionRendererContext<K, D>;\n\n// NOTE: We will using a single hook that constructs the collection renderer context for both select single and\n// select multiple. This is ok as they both share most of the properties and differ only in a few areas. So, we will\n// be using function overloading to determine which component is calling the hook (based on the args) and return the\n// correct context.\n\n/**\n * A custom hook that constructs the context for SelectSingle's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectSingleParams<K, D>\n): SelectSingleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectMultiple's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectMultipleParams<K, D>\n): SelectMultipleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectSingle/SelectMultiple's collectionRenderer.\n * @param param0 Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>({\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n}: UseCollectionRendererParams<K, D>) {\n return useMemo<CollectionRendererContext<K, D>>(() => {\n const common = {\n searchText,\n currentRowKeyOverride: currentKey,\n onPersistCurrentRowKey: onCurrentKeyChange,\n selected: selectedKeys\n } satisfies CommonCollectionRendererContext<K>;\n\n // If onItemAction is present, then we are constructing context for SelectSingle. So,\n // return the context satisfying SelectSingleCollectionRendererContext type.\n if (onItemAction !== undefined)\n return {\n ...common,\n onRowAction: onItemAction\n } satisfies SelectSingleCollectionRendererContext<K, D>;\n\n // If onItemAction is not present, then we are constructing context for SelectMultiple. So,\n // return the context satisfying SelectMultipleCollectionRendererContext type.\n return {\n ...common,\n onSelectedChange: onSelectedKeysChange,\n selectedOnlyData\n } satisfies SelectMultipleCollectionRendererContext<K, D>;\n }, [\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n ]);\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { RefObject } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport type { PositionData } from '#UNSAFE_Floating';\nimport { KEYS, isControlOrFunctionKey } from '#utils/PRIVATE_keyboardUtils';\nimport { allTabbableElements } from '#utils/PRIVATE_tabbableUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { isSimpleClick } from './eventUtils';\n\ntype UseSelectCommonProps<K, D> = {\n data?: DataState<K, D> | null;\n inputRef: RefObject<HTMLElement>;\n isFocused?: boolean;\n mainFieldRef?: RefObject<HTMLDivElement>;\n onFilter?: ({ searchText }: { searchText?: string }) => void;\n};\n\nexport type CurrentKeyDetail<K> = {\n value?: K;\n};\n\n/**\n * Hook that manages state and behavior for a Select* component. This hook creates state\n * variables and event listeners, returning properties to apply to components internally\n * rendered by a Select* component, as well as state information.\n *\n * @param data Specifies data for the dropdown list.\n * @param inputRef Ref to the input element.\n * @param isFocused Specifies whether the component has focus.\n * @param onFilter Callback function to trigger loading data for the dropdown list,\n * which may or may not be filtered by user entered text.\n *\n * @returns Component state and event listeners.\n */\nexport function useSelectCommon<K, D>({\n data,\n inputRef,\n isFocused,\n mainFieldRef: externalMainFieldRef,\n onFilter\n}: UseSelectCommonProps<K, D>) {\n const localMainFieldRef = useRef<HTMLDivElement>(null);\n // Some migrated controls now create the shell anchor ref through `useInputBase`.\n // Accepting an external ref here lets the select behavior hooks keep using the exact same\n // field anchor for compact assistance, popup positioning, and readonly-only hidden methods.\n const mainFieldRef = externalMainFieldRef ?? localMainFieldRef;\n const dropdownRef = useRef<HTMLDivElement>(null);\n const [isDropdownOpen, setDropdownOpen] = useState(false);\n const [isDropdownAbove, setDropdownAbove] = useState(false);\n\n // We only need to push currentRow when we need to override the\n // current row, like when the dropdown is opened and we want to set the initial\n // focused row or when filtering and we want to focus the first row.\n const [currentRowOverride, _setCurrentRowOverride] = useState<{ rowKey?: K }>({\n rowKey: undefined\n });\n // We still need information on what the current row actually is, but we do not need\n // to react to it until certain scenarios like pressing Tab from the dropdown. So, we\n // just store this in a ref.\n const currentRowKeyRef = useRef<K>();\n // When we want to update the currentRowOverride, we also want to keep the currentRowKeyRef\n // in sync as the collection will not call onChanged for this change.\n const setCurrentRowOverride = useCallback((currentRow: { rowKey?: K }) => {\n currentRowKeyRef.current = currentRow.rowKey;\n _setCurrentRowOverride(currentRow);\n }, []);\n const [isUserFiltering, setUserFiltering] = useState(false);\n const [userInput, setUserInput] = useState<string>();\n const [searchText, setSearchText] = useState<string>();\n\n const [prevIsDropdownOpen, setPrevIsDropdownOpen] = useState(isDropdownOpen);\n const [prevIsFocused, setPrevIsFocused] = useState(isFocused);\n const [prevIsUserFiltering, setPrevIsUserFiltering] = useState(isUserFiltering);\n\n const onMouseDown = useCallback(\n (event: MouseEvent) => {\n // const target = event.target as HTMLElement;\n if (event.defaultPrevented || !isSimpleClick(event)) {\n return;\n }\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n // this is needed to focus the input when clicking on the inside label when there is no\n // value; otherwise the component looks focused but doesn't actually have physical focus\n setTimeout(function () {\n inputRef.current?.focus();\n }, 0);\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownArrowClick = useCallback(() => {\n setDropdownOpen(!isDropdownOpen);\n\n // focus the input so that if the user Tabs afterwards, it loses focus and the dropdown closes\n inputRef.current?.focus();\n }, [inputRef, isDropdownOpen]);\n\n const handleDropdownAutoDismiss = useCallback(\n (event?: Event) => {\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n switch (event?.type) {\n case 'keydown': {\n const keyboardEvent = event as KeyboardEvent;\n switch (keyboardEvent.code) {\n case KEYS.ESC:\n // focus the input when the user cancels out of the dropdown\n inputRef.current?.focus();\n break;\n default:\n break;\n }\n break;\n }\n case 'mousedown':\n // if focus is in the dropdown, focus the input before the dropdown is hidden so that\n // focus will transfer correctly when the target is not focusable;\n // otherwise the text cursor appears in the input again\n if (dropdownRef.current?.contains(document.activeElement)) {\n inputRef.current?.focus();\n }\n break;\n default:\n break;\n }\n }\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownPosition = useCallback((data: PositionData) => {\n setDropdownAbove(data.placement.startsWith('top'));\n }, []);\n\n const getDropdownTabbableElems = useCallback(() => {\n return isDropdownOpen && dropdownRef.current\n ? allTabbableElements(dropdownRef.current)\n : undefined;\n }, [isDropdownOpen]);\n\n const handleUpDownArrowKeys = useCallback(\n (event: KeyboardEvent) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n } else {\n // JET-64909 - focus / 'current' dropped when arrow keying during loading\n // Transfer physical focus into the dropdown only if the data is present and the dropdown\n // has rendered the data. Otherwise, keep the focus in the field.\n if (data != null) {\n const tabbableElems = getDropdownTabbableElems();\n tabbableElems?.[0]?.focus();\n\n // if there is no current item set, make the first item current\n if (currentRowOverride.rowKey === undefined) {\n setCurrentRowOverride({ rowKey: data.data[0]?.metadata?.key });\n }\n }\n }\n\n // prevent the page from scrolling\n event.preventDefault();\n },\n [currentRowOverride, data, getDropdownTabbableElems, isDropdownOpen, setCurrentRowOverride]\n );\n\n const handleMainFieldKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // const target = event.target as HTMLElement;\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.PAGE_UP:\n case KEYS.PAGE_DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n\n return;\n\n case KEYS.UP:\n case KEYS.DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n break;\n\n case KEYS.ESC:\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n event.preventDefault();\n\n // JET-53183 - core pack compat: stop propagation of handled events\n // we don't want a parent collection component to stop editing the row when we close\n // the dropdown\n event.stopPropagation();\n }\n break;\n\n default:\n break;\n }\n },\n [isDropdownOpen]\n );\n\n const handleMainFieldKeyUp = useCallback(\n (event: KeyboardEvent) => {\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n handleUpDownArrowKeys(event);\n break;\n\n default:\n break;\n }\n },\n [handleUpDownArrowKeys]\n );\n\n const handleInput = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n setUserFiltering(true);\n setUserInput(detail.value);\n const str = detail.value;\n setSearchText(str);\n onFilter?.({ searchText: str });\n },\n [isDropdownOpen, onFilter]\n );\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K>) => {\n // when the collection changes the current key, we only want to store the information\n // and not do anything.\n currentRowKeyRef.current = detail.value;\n }, []);\n\n const stopFiltering = useCallback(() => {\n setUserFiltering(false);\n setUserInput('');\n // Set this to `undefined` as this represents the initial state.\n // We need to do this for select-single as we need to highlight different\n // rows based on whether it is the initial dropdown navigation or empty filter navigation.\n setSearchText(undefined);\n }, []);\n\n const updateFiltering = useCallback((value?: string) => {\n setUserFiltering(true);\n setUserInput(value);\n setSearchText(value);\n }, []);\n\n // the user is not actively filtering if the dropdown is closed and the component doesn't\n // have focus\n if (\n prevIsDropdownOpen !== isDropdownOpen ||\n prevIsFocused !== isFocused ||\n prevIsUserFiltering !== isUserFiltering\n ) {\n if (!isDropdownOpen && !isFocused && isUserFiltering) {\n stopFiltering();\n }\n }\n\n // need to call onFilter with undefined searchText when the dropdown opens and the\n // user is NOT filtering\n useEffect(() => {\n if (isDropdownOpen && !isUserFiltering) {\n onFilter?.({ searchText: undefined });\n }\n }, [isDropdownOpen, isUserFiltering, onFilter]);\n\n // when the dropdown closes, reset the isDropdownAbove flag\n if (prevIsDropdownOpen !== isDropdownOpen) {\n if (!isDropdownOpen) {\n setDropdownAbove(false);\n }\n setPrevIsDropdownOpen(isDropdownOpen);\n }\n\n if (prevIsFocused !== isFocused) {\n setPrevIsFocused(isFocused);\n }\n if (prevIsUserFiltering !== isUserFiltering) {\n setPrevIsUserFiltering(isUserFiltering);\n }\n\n return {\n currentRowKeyRef,\n currentRowOverride,\n dropdownRef,\n getDropdownTabbableElems,\n handleDropdownArrowClick,\n handleDropdownAutoDismiss,\n handleDropdownPosition,\n handleInput,\n handleMainFieldKeyDown,\n handleMainFieldKeyUp,\n handleUpDownArrowKeys,\n isDropdownAbove,\n isDropdownOpen,\n // the field should remain to look focused while the dropdown is open,\n // in case physical focus is in the dropdown\n isFocused: isFocused || isDropdownOpen,\n isUserFiltering,\n mainFieldRef,\n onCurrentKeyChange,\n onMouseDown,\n searchText,\n setCurrentRowOverride,\n setDropdownOpen,\n setUserInput,\n stopFiltering,\n updateFiltering,\n userInput\n };\n}\n"],"names":["error","useCallback","_jsxs","Flex","_jsx","dropdownStyles","ListItemText","HighlightText","useMemo","List","useComponentTheme","ButtonLabelLayoutRedwoodTheme","BaseButtonRedwoodTheme","usePress","classNames","useTestId","DropdownArrowIcon","useTranslationBundle","preventDefaultForCurrentTarget","Text","getClientHints","KEYS","useRef","useState","isSimpleClick","allTabbableElements","isControlOrFunctionKey","useEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;SAQa,cAAc,CAC5B,IAAgB,EAChB,QAA4B,EAC5B,aAA4B,EAAA;;;AAI5B,IAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;;;;;AAKhC,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;AAC3B,QAAA,IAAI,QAAQ,IAAI,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;AAChF,YAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnC,YAAA,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;SACxB;AACD,QAAAA,YAAK,CAAC,CAAG,EAAA,aAAa,mDAAmD,QAAQ,CAAA,CAAE,CAAC,CAAC;;AAErF,QAAA,OAAO,SAAS,CAAC;KAClB;;AAED,IAAA,OAAQ,QAAuC,CAAC,IAAI,CAAC,CAAC;AACxD;;AC8BA,MAAM,IAAI,GAAG,MAAK,GAAG,CAAC;AAEN,SAAA,WAAW,CAA2D,EACpF,YAAY,EAAE,SAAS,EACvB,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ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;SACzB;QACD,qBAAqB,CAAC,cAAc,CAAC,CAAC;KACvC;AAED,IAAA,IAAI,aAAa,KAAK,SAAS,EAAE;QAC/B,gBAAgB,CAAC,SAAS,CAAC,CAAC;KAC7B;AACD,IAAA,IAAI,mBAAmB,KAAK,eAAe,EAAE;QAC3C,sBAAsB,CAAC,eAAe,CAAC,CAAC;KACzC;IAED,OAAO;QACL,gBAAgB;QAChB,kBAAkB;QAClB,WAAW;QACX,wBAAwB;QACxB,wBAAwB;QACxB,yBAAyB;QACzB,sBAAsB;QACtB,WAAW;QACX,sBAAsB;QACtB,oBAAoB;QACpB,qBAAqB;QACrB,eAAe;QACf,cAAc;;;QAGd,SAAS,EAAE,SAAS,IAAI,cAAc;QACtC,eAAe;QACf,YAAY;QACZ,kBAAkB;QAClB,WAAW;QACX,UAAU;QACV,qBAAqB;QACrB,eAAe;QACf,YAAY;QACZ,aAAa;QACb,eAAe;QACf,SAAS;KACV,CAAC;AACJ;;;;;;;;;;;;;;;;;;"}
@@ -45,11 +45,9 @@ const initialMenuProps = {
45
45
  * Implements TabBar behavior for focus and keyboad handling
46
46
  */
47
47
  function useTabBar(options) {
48
- const { children, class: className, display, edge = 'top', selection, onSelect, onRemove, ref: userRef, size, contextMenuConfig } = options;
48
+ const { children, class: className, display, edge = 'top', selection, onSelect, onRemove, ref: rootRef, size, contextMenuConfig } = options;
49
49
  const { direction } = useUser.useUser();
50
50
  const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
51
- const internalRef = hooks.useRef(null);
52
- const rootRef = userRef || internalRef;
53
51
  const tabId = useId.useId();
54
52
  const [currentKey, setCurrentKey] = hooks.useState(selection);
55
53
  const [hideTooltip, setHideTooltip] = hooks.useState(false);
@@ -218,7 +216,6 @@ function useTabBar(options) {
218
216
  'aria-activedescendant': currentKey ? tabItemPrefix + currentKey : '',
219
217
  'aria-multiselectable': false,
220
218
  class: className,
221
- ref: rootRef,
222
219
  role: 'tablist',
223
220
  tabIndex: 0
224
221
  }, currentKeyProps, focusRingProps, eventProps),
@@ -306,4 +303,4 @@ const getItemLabel = (itemKey, root) => {
306
303
  exports.REMOVABLE_ITEM_ATTRIBUTE = REMOVABLE_ITEM_ATTRIBUTE;
307
304
  exports.getItemAttribute = getItemAttribute;
308
305
  exports.useTabBar = useTabBar;
309
- //# sourceMappingURL=useTabBar-ec20851a.js.map
306
+ //# sourceMappingURL=useTabBar-1cfaf3e6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTabBar-1cfaf3e6.js","sources":["../../src/hooks/PRIVATE_useTabBar/useTabBar.ts"],"sourcesContent":["import { useState, useRef, useEffect, useCallback } from 'preact/hooks';\nimport { mergeProps } from '../../utils/UNSAFE_mergeProps';\nimport {\n getPrevNextKeyUsingRef,\n getFirstVisibleKey,\n getKey,\n keyExtractor,\n findElementByKey,\n getItemKeysArray\n} from '../../utils/PRIVATE_collectionUtils';\nimport { useCollectionFocusRing } from '../PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../PRIVATE_useCurrentKey';\nimport { useId } from '../UNSAFE_useId';\nimport type { ComponentProps, ContextType, RefObject } from 'preact';\nimport type { TabBarContext, TabBarLayout } from '../../UNSAFE_TabBarCommon';\nimport { useReorderableContext } from '../../hooks/PRIVATE_useReorderable/useReorderableContext';\nimport { Menu } from '../../UNSAFE_Menu';\nimport { TabBarContextMenuConfig } from '../../UNSAFE_TabBarCommon';\nimport { useContextMenuGesture } from '../../hooks/UNSAFE_useContextMenuGesture';\nimport { getDefaultContextMenu } from '../../UNSAFE_TabBar/TabBarContextMenu';\nimport { TabBarItemContextMenuContext } from '../../UNSAFE_TabBarCommon/TabBar.types';\nimport { useUser } from '../../hooks/UNSAFE_useUser';\nimport { useTranslationBundle } from '../../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../../resources/nls/bundle';\n\ntype TabBarContextValue = ContextType<typeof TabBarContext>;\n\nexport type useTabBarOptions<K extends string | number> = {\n class?: string;\n display?: TabBarContextValue['display'];\n edge?: 'bottom' | 'top';\n onRemove?: TabBarContextValue['onRemove'];\n onSelect?: TabBarContextValue['onSelect'];\n ref: RefObject<HTMLDivElement>;\n selection?: TabBarContextValue['selection'];\n size?: TabBarContextValue['size'];\n children?: ComponentProps<typeof TabBarLayout>['children'];\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n};\n\nconst ITEM_SELECTOR = '[role=\"tab\"]';\nconst REMOVABLE_ICON_SELECTOR = '[data-oj-tabbar-item-remove-icon]';\nexport const REMOVABLE_ITEM_ATTRIBUTE = 'data-oj-removable';\n\ntype MenuProps = Pick<\n ComponentProps<typeof Menu>,\n 'anchorRef' | 'initialFocus' | 'placement' | 'offsetValue' | 'isOpen'\n>;\n\nconst TOUCH_OFFSET_VALUE = 40;\n\nconst menuPropGestureStates: Record<\n 'mouse' | 'keyboard' | 'touch',\n Omit<Required<MenuProps>, 'anchorRef' | 'isOpen'>\n> = {\n mouse: {\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0\n },\n keyboard: {\n initialFocus: 'firstItem',\n placement: 'bottom-start',\n offsetValue: 0\n },\n touch: {\n initialFocus: 'menu',\n placement: 'end',\n offsetValue: TOUCH_OFFSET_VALUE\n }\n};\n\nconst initialMenuProps: MenuProps = {\n isOpen: false,\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0,\n anchorRef: { current: null }\n};\n\n/**\n * Implements TabBar behavior for focus and keyboad handling\n */\nexport function useTabBar<K extends string | number>(options: useTabBarOptions<K>) {\n const {\n children,\n class: className,\n display,\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n ref: rootRef,\n size,\n contextMenuConfig\n } = options;\n\n const { direction } = useUser();\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const tabId = useId();\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection as K);\n const [hideTooltip, setHideTooltip] = useState(false);\n\n const tabItemPrefix = tabId + '_';\n\n const contextMenuDescriptionId = 'contextMenu_' + useId();\n const contextMenuDescription = translations.tabbar_labelContextMenu();\n\n /**\n * A reference to the previous set of tab keys that this TabBar\n * contains before children were re-rendered. In the event the \"current\" tab\n * is removed and the \"currentKey\" reference is broken, we can redirect\n * the \"currentKey\" to another tab based on the index of the removed tab.\n */\n const prevTabKeys = useRef<(string | number | undefined)[]>();\n\n useEffect(() => {\n if (rootRef.current) {\n const tabKeys = getItemKeysArray(rootRef.current, ITEM_SELECTOR);\n if (currentKey == null && tabKeys) {\n if (selection != null && tabKeys.includes(selection as K)) {\n setCurrentKey(selection as K);\n } else if (tabKeys.length > 0) {\n setCurrentKey(tabKeys[0] as K);\n }\n }\n if (currentKey != null && tabKeys && !tabKeys.includes(currentKey as K)) {\n //If prevTabs does not exist set the first visible key as currentKey\n prevTabKeys.current\n ? setCurrentKey(findNextValidKey(currentKey, tabKeys, prevTabKeys.current) as K)\n : setCurrentKey(tabKeys[0] as K);\n }\n prevTabKeys.current = tabKeys as K[];\n }\n }, [children, currentKey, rootRef, selection]);\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(rootRef, [\n 'ArrowRight',\n 'ArrowLeft',\n 'Home',\n 'End'\n ]);\n\n const reorderableContext = useReorderableContext();\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? extractOnlyItemKey(element, ITEM_SELECTOR, REMOVABLE_ICON_SELECTOR)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n false,\n undefined,\n undefined,\n getPrevNextKeyUsingRef(rootRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(rootRef, currentKey, false, ITEM_SELECTOR),\n currentKey,\n (detail) => {\n const key = detail.value as K;\n setCurrentKey(key);\n setHideTooltip(false);\n }\n );\n\n useEffect(() => {\n if (reorderableContext) {\n reorderableContext.currentItemKey.current = currentKey;\n }\n }, [currentKey, reorderableContext]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (rootRef.current && currentKey != null) {\n if (event.key === 'Home' || event.key === 'End') {\n const tabBarItemKey = getItemKeysArray(rootRef.current, ITEM_SELECTOR);\n event.preventDefault();\n setCurrentKey?.(tabBarItemKey[event.key === 'Home' ? 0 : tabBarItemKey.length - 1] as K);\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.({ value: currentKey });\n }\n if (event.key === 'Delete') {\n const tabBarItem = findElementByKey(\n rootRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as HTMLElement;\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n onRemove?.({ value: currentKey });\n }\n }\n if (event.key === 'Escape') {\n setHideTooltip(true);\n }\n }\n };\n\n const onFocus = () => {\n if (rootRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(rootRef.current, ITEM_SELECTOR);\n if (key != null) {\n setCurrentKey(key as K);\n }\n }\n };\n\n const [contextMenuContext, setContextMenuContext] = useState<TabBarItemContextMenuContext<K>>();\n\n const [menuProps, setMenuProps] = useState<MenuProps>(initialMenuProps);\n const [accStatusInfo, setAccStatusInfo] = useState<string>();\n\n const { triggerProps } = useContextMenuGesture(\n ({ gesture, anchor, target }) => {\n let anchorBasedOnGesture = anchor;\n let itemKey = currentKey as K;\n if (gesture === 'keyboard') {\n //We find the element where the position of the menu is going to be based of\n const elem = findElementByKey(\n rootRef.current as HTMLElement,\n currentKey as K,\n ITEM_SELECTOR\n );\n //We set the correct anchor\n anchorBasedOnGesture = elem ? elem : anchor;\n } else {\n //We search for the key using the target of the event\n const key = keyExtractor(target as HTMLElement, ITEM_SELECTOR);\n\n //On touch devices, the keyExtractor returns null because target of touch event is the entire tabbar. Hence we make use of currentkey since the context menu is always launched from selected item and its key is currentKey\n itemKey = key != null ? (key as K) : (currentKey as K);\n }\n let tabKeysArray;\n let isRemovableItem = false;\n const isReorderable = reorderableContext?.onReorder != null;\n if (rootRef.current) {\n tabKeysArray = isReorderable\n ? (getItemKeysArray(rootRef.current, ITEM_SELECTOR) as K[])\n : undefined;\n isRemovableItem =\n getItemAttribute(itemKey, rootRef.current, REMOVABLE_ITEM_ATTRIBUTE) != null;\n }\n const isRemovable = onRemove != null && isRemovableItem;\n const defaultContext = getDefaultContextMenu<K>({\n // For default menu items the existence of REMOVABLE_ICON_SELECTOR is the indicator that it is removable because we render the default menu in touch devices not the application.\n // Furthermore in corepack due to delegations onRemove is always defined as it is a even handler hence not a good check for isRemovable.\n isRemovable: isRemovable,\n handleRemove: onRemove,\n handleReorder: isReorderable ? reorderableContext.onReorder : undefined,\n itemKey: itemKey,\n tabKeys: tabKeysArray,\n direction: direction,\n itemLabels: {\n labelRemove: isRemovable ? translations.tabbar_labelRemove() : undefined,\n labelMoveLeft: isReorderable ? translations.tabbar_labelMoveLeft() : undefined,\n labelMoveRight: isReorderable ? translations.tabbar_labelMoveRight() : undefined\n },\n handleAccStatus: (detail) => {\n const removeItemLabel = getItemLabel(detail.removedKey!, rootRef.current!) as string;\n const removeStatus =\n isRemovable && detail.removedKey\n ? translations.tabbar_accAnnounceRemovedKey({ itemKey: removeItemLabel })\n : '';\n const destinationItemLabel = getItemLabel(\n detail.destinationKey!,\n rootRef.current!\n ) as string;\n const reorderStatus =\n isReorderable && detail.destinationKey\n ? translations.accAnnounceMovedKey({\n // This acc info is for reordering using context menu hence as per spec source item key is not required.\n itemKey: '',\n position: detail.position!,\n referenceKey: destinationItemLabel\n })\n : '';\n setAccStatusInfo(removeStatus + reorderStatus);\n }\n });\n setContextMenuContext(defaultContext);\n\n setMenuProps({\n ...menuPropGestureStates[gesture],\n anchorRef: { current: anchorBasedOnGesture },\n // This is set so that when no contextMenuConfig is available we need not open it. Example: Apps may choose to open only for removable items and return contextMenuConfig as undefined for non removable ones in such cases it will prevent it from opening.\n isOpen: contextMenuConfig != null\n });\n },\n {\n isDisabled: !contextMenuConfig //If there is no a context menu renderer we disable the hook\n }\n );\n\n const handleCloseContextMenu = useCallback<Required<ComponentProps<typeof Menu>>['onClose']>(\n (detail) => {\n //Focus has to be set on the current target that was obtained\n //during context menu gesture when menu is dismissed or item is \"selected\"\n if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {\n setCurrentKey(contextMenuContext?.itemKey);\n rootRef.current?.focus();\n }\n // We close the menu.The only prop that matters here is isOpen\n setMenuProps({ ...initialMenuProps });\n },\n [rootRef, contextMenuContext?.itemKey]\n );\n\n const eventProps = mergeProps({ onKeyDown, onFocus }, triggerProps);\n\n return {\n rootProps: mergeProps(\n {\n 'aria-activedescendant': currentKey ? tabItemPrefix + currentKey : '',\n 'aria-multiselectable': false,\n class: className,\n role: 'tablist',\n tabIndex: 0\n },\n currentKeyProps,\n focusRingProps,\n eventProps\n ),\n tabBarContext: {\n currentKey,\n display,\n isEdgeBottom: edge === 'bottom',\n layout: 'condense',\n onRemove,\n onSelect,\n showFocusRing,\n hideTooltip,\n selection,\n size,\n tabItemPrefix\n },\n menuProps: { ...menuProps, onClose: handleCloseContextMenu },\n contextMenuContext,\n contextMenuDescriptionId,\n contextMenuDescription,\n accStatusInfo\n } as const;\n}\n\n//useCurrentKey use click capture that captures first click, which is on remove button\n//when we remove and sets the item being removed to currentKey. So we should not allow\n//this if click is on remove button\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const tabBarItem = element.closest(itemSelector);\n if (tabBarItem) {\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n const removeButton = element.closest(itemEliminator);\n if (removeButton && tabBarItem?.contains(removeButton)) {\n return null;\n }\n }\n return getKey(tabBarItem as HTMLElement);\n }\n return null;\n};\n\nconst findNextValidKey = <K>(currentKey: K, currTabs: K[], prevTabs: K[]) => {\n const index = prevTabs.indexOf(currentKey);\n // update current key to be the first one if currentKey is invalid\n if (index === -1) {\n return currTabs[0];\n }\n let nextIndex = 0;\n let isLastKey = false;\n if (index === prevTabs.length - 1) {\n nextIndex = index - 1;\n isLastKey = true;\n } else {\n nextIndex = index + 1;\n }\n while (nextIndex !== index && nextIndex > -1 && nextIndex < prevTabs.length) {\n const nextKey = prevTabs[nextIndex];\n if (currTabs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n isLastKey ? nextIndex-- : nextIndex++;\n }\n // update current key to be the first one if we can't find a suitable next key\n return currTabs[0];\n};\n\n// Utility that returns the value for a attribute related to the role=\"tab\" item.\nexport const getItemAttribute = <K extends string | number>(\n itemKey: K,\n root: HTMLElement,\n attribute: string\n) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n const tabBarItemAttribute = tabBarItem.hasAttribute(attribute)\n ? tabBarItem.getAttribute(attribute)\n : null;\n return tabBarItemAttribute;\n }\n return;\n};\n\n// Utility that returns the visible inner text inside the role=\"tab\" item.\nconst getItemLabel = <K extends string | number>(itemKey: K, root: HTMLElement) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n return tabBarItem.innerText;\n }\n return;\n};\n"],"names":["useUser","useTranslationBundle","useId","useState","useRef","useEffect","getItemKeysArray","useCollectionFocusRing","useReorderableContext","useCurrentKey","keyExtractor","getPrevNextKeyUsingRef","findElementByKey","getFirstVisibleKey","useContextMenuGesture","getDefaultContextMenu","useCallback","mergeProps","getKey"],"mappings":";;;;;;;;;;;;;;;AAwCA,MAAM,aAAa,GAAG,cAAc,CAAC;AACrC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAC7D,MAAM,wBAAwB,GAAG,oBAAoB;AAO5D,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,MAAM,qBAAqB,GAGvB;AACF,IAAA,KAAK,EAAE;AACL,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,SAAS,EAAE,cAAc;AACzB,QAAA,WAAW,EAAE,CAAC;AACf,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,YAAY,EAAE,WAAW;AACzB,QAAA,SAAS,EAAE,cAAc;AACzB,QAAA,WAAW,EAAE,CAAC;AACf,KAAA;AACD,IAAA,KAAK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F,IAAI,UAAU,EAAE;AACd,QAAA,MAAM,mBAAmB,GAAG,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC;AAC5D,cAAE,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC;cAClC,IAAI,CAAC;AACT,QAAA,OAAO,mBAAmB,CAAC;KAC5B;IACD,OAAO;AACT,EAAE;AAEF;AACA,MAAM,YAAY,GAAG,CAA4B,OAAU,EAAE,IAAiB,KAAI;IAChF,MAAM,UAAU,GAAGA,gCAAgB,CAAC,IAAI,EAAE,OAAY,EAAE,aAAa,CAAgB,CAAC;IACtF,IAAI,UAAU,EAAE;QACd,OAAO,UAAU,CAAC,SAAS,CAAC;KAC7B;IACD,OAAO;AACT,CAAC;;;;;;"}
@@ -0,0 +1,68 @@
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-11904554.js');
8
+ require('./FormFieldContext-69fe83d2.js');
9
+ var useFormFieldContext = require('./useFormFieldContext-4632eb73.js');
10
+
11
+
12
+
13
+
14
+
15
+
16
+ var hide = 'MaxLengthCounterStyles_hide__7dy9j71';
17
+ var maxLengthCounterBase = 'MaxLengthCounterStyles_maxLengthCounterBase__7dy9j70';
18
+ var spanStyles = 'MaxLengthCounterStyles_spanStyles__7dy9j72';
19
+
20
+ const noop = () => { };
21
+ function MaxLengthCounter({ maxLength, valueLength = 0, onClick }) {
22
+ const { isFocused } = useFormFieldContext.useFormFieldContext();
23
+ // We don't want mousedown on this component to do anything, so prevent the default behavior.
24
+ const killEvent = hooks.useCallback((event) => event.preventDefault(), []);
25
+ const textClasses = classNames.classNames([!isFocused && hide]);
26
+ const { pressProps } = usePress.usePress(onClick ?? noop);
27
+ 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 })] }) }));
28
+ }
29
+
30
+ /**
31
+ * A custom hook to enable an alternate way for entering a new line in the TextArea components using
32
+ * Alt + Enter (or option + return in MacOS). This is particularly useful in scenarios where pressing Enter
33
+ * could mean a different action, like exiting from edit mode in a Table/DataGrid containing a TextArea.
34
+ */
35
+ const useTextAreaAltEnter = ({ onInput, textAreaRef }) => {
36
+ // We want to have alt/option+Enter to insert a newline like Enter does.
37
+ const [selectionStart, setSelectionStart] = hooks.useState();
38
+ const handleKeyDown = hooks.useCallback((event) => {
39
+ // If we see an alt+enter (or option+return on a Mac), we insert a newline and call onInputAndDispatch
40
+ // since that is what is called any time the input value changes.
41
+ if (event.altKey && event.key === 'Enter') {
42
+ event.preventDefault(); // Prevent default Enter behavior
43
+ const textarea = event.target;
44
+ const { selectionStart: start, selectionEnd: end, value: previousValue } = textarea;
45
+ const newValue = previousValue.substring(0, start) + '\n' + previousValue.substring(end);
46
+ const valueUpdateDetail = {
47
+ previousValue: previousValue,
48
+ value: newValue
49
+ };
50
+ setSelectionStart(start + 1);
51
+ onInput(valueUpdateDetail);
52
+ }
53
+ }, [onInput]);
54
+ hooks.useLayoutEffect(() => {
55
+ if (selectionStart) {
56
+ textAreaRef.current?.setSelectionRange(selectionStart, selectionStart);
57
+ // reset to undefined, so the next selectionStart will trigger the useLayoutEffect
58
+ // even if it is the same as the previous selectionStart that was set. This is
59
+ // because we are only setting selectionStart for alt+enter.
60
+ setSelectionStart(undefined);
61
+ }
62
+ }, [selectionStart, textAreaRef]);
63
+ return { handleKeyDown };
64
+ };
65
+
66
+ exports.MaxLengthCounter = MaxLengthCounter;
67
+ exports.useTextAreaAltEnter = useTextAreaAltEnter;
68
+ //# sourceMappingURL=useTextAreaAltEnter-27263abe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTextAreaAltEnter-27263abe.js","sources":["../../src/UNSAFE_TextArea/MaxLengthCounter.tsx","../../src/UNSAFE_TextArea/useTextAreaAltEnter.ts"],"sourcesContent":["import { useCallback } from 'preact/hooks';\n\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useFormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { hide, maxLengthCounterBase, spanStyles } from './MaxLengthCounterStyles.css';\n\ntype Props = {\n maxLength: number;\n valueLength?: number;\n onClick?: () => void; // the calling component should focus on the appropriate element when clicked.\n};\n\nconst noop = () => {};\n\nexport function MaxLengthCounter({ maxLength, valueLength = 0, onClick }: Props) {\n const { isFocused } = useFormFieldContext();\n // We don't want mousedown on this component to do anything, so prevent the default behavior.\n const killEvent = useCallback((event: Event) => event.preventDefault(), []);\n const textClasses = classNames([!isFocused && hide]);\n const { pressProps } = usePress(onClick ?? noop);\n return (\n <div class={maxLengthCounterBase} onMouseDown={killEvent} {...pressProps}>\n <span class={textClasses}>\n <span class={spanStyles}>{valueLength}</span>\n <span class={spanStyles}>/</span>\n <span class={spanStyles}>{maxLength}</span>\n </span>\n </div>\n );\n}\n","import { ComponentProps, RefObject } from 'preact';\nimport { useCallback, useLayoutEffect, useState } from 'preact/hooks';\n\nimport { TextFieldInput } from '#UNSAFE_TextField';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\n\ntype UseTextAreaAltEnterOptions = {\n /**\n * The onInput of the TextFieldInput\n */\n onInput: NonNullable<ComponentProps<typeof TextFieldInput>['onInput']>;\n /**\n * The ref to the textarea element\n */\n textAreaRef: RefObject<HTMLTextAreaElement>;\n};\n\n/**\n * A custom hook to enable an alternate way for entering a new line in the TextArea components using\n * Alt + Enter (or option + return in MacOS). This is particularly useful in scenarios where pressing Enter\n * could mean a different action, like exiting from edit mode in a Table/DataGrid containing a TextArea.\n */\nexport const useTextAreaAltEnter = ({ onInput, textAreaRef }: UseTextAreaAltEnterOptions) => {\n // We want to have alt/option+Enter to insert a newline like Enter does.\n const [selectionStart, setSelectionStart] = useState<number>();\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // If we see an alt+enter (or option+return on a Mac), we insert a newline and call onInputAndDispatch\n // since that is what is called any time the input value changes.\n if (event.altKey && event.key === 'Enter') {\n event.preventDefault(); // Prevent default Enter behavior\n const textarea = event.target as HTMLTextAreaElement;\n const { selectionStart: start, selectionEnd: end, value: previousValue } = textarea;\n const newValue = previousValue.substring(0, start) + '\\n' + previousValue.substring(end);\n\n const valueUpdateDetail: ValueUpdateDetail<string> = {\n previousValue: previousValue,\n value: newValue\n };\n setSelectionStart(start + 1);\n onInput(valueUpdateDetail);\n }\n },\n [onInput]\n );\n\n useLayoutEffect(() => {\n if (selectionStart) {\n textAreaRef.current?.setSelectionRange(selectionStart, selectionStart);\n // reset to undefined, so the next selectionStart will trigger the useLayoutEffect\n // even if it is the same as the previous selectionStart that was set. This is\n // because we are only setting selectionStart for alt+enter.\n setSelectionStart(undefined);\n }\n }, [selectionStart, textAreaRef]);\n\n return { handleKeyDown };\n};\n"],"names":["useFormFieldContext","useCallback","classNames","usePress","_jsx","_jsxs","useState","useLayoutEffect"],"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,I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iB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC7B,OAAO,CAAC,iBAAiB,CAAC,CAAC;SAC5B;AACH,KAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEFM,qBAAe,CAAC,MAAK;QACnB,IAAI,cAAc,EAAE;YAClB,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;;;;YAIvE,iBAAiB,CAAC,SAAS,CAAC,CAAC;SAC9B;AACH,KAAC,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC;IAElC,OAAO,EAAE,aAAa,EAAE,CAAC;AAC3B;;;;;"}
@@ -2,14 +2,14 @@
2
2
  import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
3
3
  import { C as Chart } from './Chart-5d837bee.js';
4
4
  import { g as getNextItemInSeries, a as getPrevItemInSeries, b as getNextItemInGroup, c as getPrevItemInGroup } from './PolarChartWithDimensions-76ff5180.js';
5
- import { u as useUser } from './useUser-e1199cab.js';
5
+ import { u as useUser } from './useUser-2c24ff59.js';
6
6
  import { g as getItemColor } from './dataStyleUtils-4fb5b14d.js';
7
7
  import { g as getStartAndEndAxesOffset, a as getBarGapRatio } from './lineUtils-2d315e16.js';
8
8
  import { forwardRef } from 'preact/compat';
9
9
  import { useMemo } from 'preact/hooks';
10
- import { T as TextureDefs } from './TextureDefs-295dccbd.js';
10
+ import { T as TextureDefs } from './TextureDefs-7373dec8.js';
11
11
  import { a as addTextureDefinition, r as resolveTexture, c as createTexturePatternIdResolver } from './textureUtils-e6d7da37.js';
12
- import { u as useColorScheme } from './useColorScheme-febcabc0.js';
12
+ import { u as useColorScheme } from './useColorScheme-0d2625c5.js';
13
13
  import { u as useId } from './useId-03dbfdf0.js';
14
14
  import { B as BaseBarGroup, g as getBarCenterCoordinate, a as getRangeBarCenterCoordinate, b as getBarPosition, c as getRangeBarPosition, d as getSeriesOffsetAndWidth, e as getRangeSeriesOffsetAndWidth } from './BaseBarGroup-ff0495d8.js';
15
15
 
@@ -5,7 +5,7 @@ import { s as supportsMobileScreenReader } from './accUtils-404953ed.js';
5
5
  import { t as isChartDataItemRenderable, v as getBarGapsInfo, w as getGroupCenterCoord } from './lineUtils-2d315e16.js';
6
6
  import { styles } from './PRIVATE_Chart/themes/ChartStyles.css.js';
7
7
  import { g as getContrastingTextColor } from './colorUtils-62e7f4bf.js';
8
- import { T as TextureDefs } from './TextureDefs-295dccbd.js';
8
+ import { T as TextureDefs } from './TextureDefs-7373dec8.js';
9
9
  import { c as classNames } from './classNames-4e12b00d.js';
10
10
  import { g as getTexturePatternId, b as getTextureOffsetX } from './textureUtils-e6d7da37.js';
11
11
  import { g as getRectCoord, a as getBarProps } from './barItemUtils-0dd39fbe.js';
@@ -4,7 +4,7 @@ import { forwardRef } from 'preact/compat';
4
4
  import { useState, useEffect } from 'preact/hooks';
5
5
  import { u as useHover } from './useHover-85077adb.js';
6
6
  import { u as useActive } from './useActive-fb6d4d52.js';
7
- import { u as useColorScheme } from './useColorScheme-febcabc0.js';
7
+ import { u as useColorScheme } from './useColorScheme-0d2625c5.js';
8
8
  import { c as classNames } from './classNames-4e12b00d.js';
9
9
  import { d as dimensionInterpolations } from './dimensions-598464f2.js';
10
10
  import { m as mergeInterpolations } from './mergeInterpolations-30cd9a69.js';
@@ -151,4 +151,4 @@ const BaseButton = forwardRef(({ variant, isReadOnly = false, isDisabled = false
151
151
  BaseButton.displayName = 'BaseButton';
152
152
 
153
153
  export { BaseButton as B };
154
- //# sourceMappingURL=BaseButton-77bb9d91.js.map
154
+ //# sourceMappingURL=BaseButton-f3a607e1.js.map