@carbon/ibm-products 2.43.1 → 2.43.2-canary.100

Sign up to get free protection for your applications and to get access to all the features.
Files changed (365) hide show
  1. package/css/index-full-carbon.css +428 -143
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +218 -9
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +248 -105
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +349 -129
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/ActionBar/ActionBarItem.js +1 -1
  18. package/es/components/Coachmark/Coachmark.d.ts +6 -1
  19. package/es/components/Coachmark/Coachmark.js +47 -11
  20. package/es/components/Coachmark/CoachmarkOverlay.js +2 -4
  21. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
  22. package/es/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  23. package/es/components/CoachmarkStack/CoachmarkStack.js +7 -3
  24. package/es/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  25. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +76 -55
  26. package/es/components/ConditionBuilder/ConditionBuilder.js +82 -25
  27. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  28. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +154 -0
  29. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  30. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +29 -13
  31. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
  32. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +30 -8
  33. package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +14 -9
  34. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +19 -11
  35. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
  36. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +75 -62
  37. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
  38. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
  39. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
  40. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +35 -24
  41. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +40 -36
  42. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +40 -36
  43. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
  44. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +98 -40
  45. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  46. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  47. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +27 -9
  48. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  49. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +114 -0
  50. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  51. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +71 -38
  52. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  53. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +22 -9
  54. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  55. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  56. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +121 -40
  57. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
  58. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +45 -19
  59. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
  60. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +137 -40
  61. package/es/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  62. package/es/components/ConditionBuilder/utils/useTranslations.js +26 -0
  63. package/es/components/ConditionBuilder/utils/util.d.ts +6 -4
  64. package/es/components/ConditionBuilder/utils/util.js +42 -17
  65. package/es/components/CreateFullPage/CreateFullPage.js +2 -2
  66. package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
  67. package/es/components/DataSpreadsheet/DataSpreadsheet.js +149 -54
  68. package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +25 -1
  69. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +50 -9
  70. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +16 -0
  71. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +32 -8
  72. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
  73. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.d.ts +3 -1
  74. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +15 -3
  75. package/es/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.d.ts +2 -1
  76. package/es/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +4 -3
  77. package/es/components/DataSpreadsheet/types/index.d.ts +3 -1
  78. package/es/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
  79. package/es/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  80. package/es/components/Datagrid/Datagrid/Datagrid.js +4 -9
  81. package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  82. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
  83. package/es/components/Datagrid/Datagrid/DatagridRow.js +21 -8
  84. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
  85. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  86. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
  87. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  88. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  89. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
  90. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +7 -4
  91. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  92. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +54 -17
  93. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  94. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +75 -12
  95. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  96. package/es/components/Datagrid/types/index.d.ts +61 -9
  97. package/es/components/Datagrid/useActionsColumn.d.ts +8 -1
  98. package/es/components/Datagrid/useActionsColumn.js +7 -6
  99. package/es/components/Datagrid/useColumnCenterAlign.d.ts +8 -1
  100. package/es/components/Datagrid/useColumnCenterAlign.js +1 -1
  101. package/es/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  102. package/es/components/Datagrid/useColumnRightAlign.js +4 -3
  103. package/es/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  104. package/es/components/Datagrid/useCustomizeColumns.js +4 -3
  105. package/es/components/Datagrid/useDefaultStringRenderer.js +0 -1
  106. package/es/components/Datagrid/useDisableSelectRows.d.ts +2 -1
  107. package/es/components/Datagrid/useDisableSelectRows.js +27 -22
  108. package/es/components/Datagrid/useInlineEdit.d.ts +8 -1
  109. package/es/components/Datagrid/useInlineEdit.js +13 -3
  110. package/es/components/Datagrid/useNestedRowExpander.js +1 -3
  111. package/es/components/Datagrid/useNestedRows.js +32 -13
  112. package/es/components/Datagrid/useRowExpander.js +1 -3
  113. package/es/components/Datagrid/useSelectRows.js +2 -1
  114. package/es/components/Datagrid/useStickyColumn.d.ts +8 -1
  115. package/es/components/Datagrid/useStickyColumn.js +12 -9
  116. package/es/components/Decorator/Decorator.js +2 -1
  117. package/es/components/DecoratorBase/DecoratorBase.js +3 -5
  118. package/es/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
  119. package/es/components/DecoratorLink/DecoratorLink.js +2 -1
  120. package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
  121. package/es/components/EditInPlace/EditInPlace.d.ts +4 -0
  122. package/es/components/EditInPlace/EditInPlace.js +21 -10
  123. package/es/components/EditTearsheet/EditTearsheet.d.ts +7 -2
  124. package/es/components/EditTearsheet/EditTearsheet.js +44 -10
  125. package/es/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  126. package/es/components/EditTearsheet/EditTearsheetForm.js +3 -0
  127. package/es/components/EmptyStates/EmptyStateV2.d.ts +63 -2
  128. package/es/components/EmptyStates/EmptyStateV2.js +2 -1
  129. package/es/components/FullPageError/FullPageError.d.ts +36 -2
  130. package/es/components/FullPageError/FullPageError.js +0 -3
  131. package/es/components/GetStartedCard/GetStartedCard.d.ts +61 -2
  132. package/es/components/GetStartedCard/GetStartedCard.js +9 -8
  133. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  134. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  135. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  136. package/es/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  137. package/es/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  138. package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  139. package/es/components/Nav/NavItem.js +12 -3
  140. package/es/components/OptionsTile/OptionsTile.js +11 -6
  141. package/es/components/PageHeader/PageHeader.js +1 -0
  142. package/es/components/RemoveModal/RemoveModal.d.ts +4 -0
  143. package/es/components/RemoveModal/RemoveModal.js +7 -1
  144. package/es/components/SearchBar/SearchBar.d.ts +1 -1
  145. package/es/components/SearchBar/SearchBar.js +2 -2
  146. package/es/components/SidePanel/SidePanel.js +17 -21
  147. package/es/components/SidePanel/motion/variants.d.ts +4 -6
  148. package/es/components/SidePanel/motion/variants.js +10 -11
  149. package/es/components/StatusIndicator/StatusIndicatorStep.js +87 -0
  150. package/es/components/StringFormatter/StringFormatter.js +14 -3
  151. package/es/components/StringFormatter/utils/enums.d.ts +20 -1
  152. package/es/components/StringFormatter/utils/enums.js +22 -2
  153. package/es/components/TagOverflow/TagOverflow.d.ts +35 -4
  154. package/es/components/TagOverflow/TagOverflow.js +47 -64
  155. package/es/components/TagOverflow/TagOverflowModal.js +4 -6
  156. package/es/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
  157. package/es/components/TagOverflow/TagOverflowPopover.js +38 -41
  158. package/es/components/Tearsheet/Tearsheet.d.ts +8 -1
  159. package/es/components/Tearsheet/Tearsheet.js +9 -1
  160. package/es/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  161. package/es/components/Tearsheet/TearsheetNarrow.js +12 -0
  162. package/es/components/Tearsheet/TearsheetShell.d.ts +11 -1
  163. package/es/components/Tearsheet/TearsheetShell.js +28 -7
  164. package/es/components/Toolbar/ToolbarButton.js +1 -1
  165. package/es/components/WebTerminal/WebTerminal.js +10 -12
  166. package/es/components/index.d.ts +1 -1
  167. package/es/global/js/hooks/useFocus.d.ts +1 -0
  168. package/es/global/js/hooks/useFocus.js +5 -2
  169. package/es/global/js/hooks/usePrefersReducedMotion.js +14 -8
  170. package/es/global/js/package-settings.d.ts +1 -1
  171. package/es/global/js/package-settings.js +1 -1
  172. package/es/index.js +1 -0
  173. package/es/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  174. package/es/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1020 -1058
  175. package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +881 -758
  176. package/es/settings.d.ts +1 -1
  177. package/lib/components/ActionBar/ActionBarItem.js +1 -1
  178. package/lib/components/Coachmark/Coachmark.d.ts +6 -1
  179. package/lib/components/Coachmark/Coachmark.js +46 -10
  180. package/lib/components/Coachmark/CoachmarkOverlay.js +2 -4
  181. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
  182. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  183. package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -3
  184. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  185. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +74 -53
  186. package/lib/components/ConditionBuilder/ConditionBuilder.js +82 -25
  187. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  188. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +163 -0
  189. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  190. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +28 -11
  191. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
  192. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +29 -7
  193. package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +12 -7
  194. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +18 -10
  195. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
  196. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +73 -60
  197. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
  198. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
  199. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
  200. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +34 -24
  201. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +40 -36
  202. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +40 -36
  203. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
  204. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +96 -38
  205. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  206. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  207. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +28 -10
  208. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  209. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +122 -0
  210. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  211. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +68 -35
  212. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  213. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +21 -8
  214. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  215. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  216. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +118 -37
  217. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
  218. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +44 -17
  219. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
  220. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +137 -39
  221. package/lib/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  222. package/lib/components/ConditionBuilder/utils/useTranslations.js +30 -0
  223. package/lib/components/ConditionBuilder/utils/util.d.ts +6 -4
  224. package/lib/components/ConditionBuilder/utils/util.js +44 -16
  225. package/lib/components/CreateFullPage/CreateFullPage.js +2 -2
  226. package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
  227. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +149 -54
  228. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +25 -1
  229. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +50 -9
  230. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +16 -0
  231. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +32 -8
  232. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
  233. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.d.ts +3 -1
  234. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +15 -3
  235. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.d.ts +2 -1
  236. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +4 -3
  237. package/lib/components/DataSpreadsheet/types/index.d.ts +3 -1
  238. package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
  239. package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  240. package/lib/components/Datagrid/Datagrid/Datagrid.js +4 -9
  241. package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  242. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
  243. package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -8
  244. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
  245. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  246. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
  247. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  248. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  249. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
  250. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +7 -4
  251. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  252. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +53 -16
  253. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  254. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +74 -11
  255. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  256. package/lib/components/Datagrid/types/index.d.ts +61 -9
  257. package/lib/components/Datagrid/useActionsColumn.d.ts +8 -1
  258. package/lib/components/Datagrid/useActionsColumn.js +7 -6
  259. package/lib/components/Datagrid/useColumnCenterAlign.d.ts +8 -1
  260. package/lib/components/Datagrid/useColumnCenterAlign.js +1 -1
  261. package/lib/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  262. package/lib/components/Datagrid/useColumnRightAlign.js +4 -3
  263. package/lib/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  264. package/lib/components/Datagrid/useCustomizeColumns.js +4 -3
  265. package/lib/components/Datagrid/useDefaultStringRenderer.js +0 -1
  266. package/lib/components/Datagrid/useDisableSelectRows.d.ts +2 -1
  267. package/lib/components/Datagrid/useDisableSelectRows.js +27 -22
  268. package/lib/components/Datagrid/useInlineEdit.d.ts +8 -1
  269. package/lib/components/Datagrid/useInlineEdit.js +13 -3
  270. package/lib/components/Datagrid/useNestedRowExpander.js +1 -3
  271. package/lib/components/Datagrid/useNestedRows.js +32 -13
  272. package/lib/components/Datagrid/useRowExpander.js +1 -3
  273. package/lib/components/Datagrid/useSelectRows.js +2 -1
  274. package/lib/components/Datagrid/useStickyColumn.d.ts +8 -1
  275. package/lib/components/Datagrid/useStickyColumn.js +12 -9
  276. package/lib/components/Decorator/Decorator.js +2 -1
  277. package/lib/components/DecoratorBase/DecoratorBase.js +3 -5
  278. package/lib/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
  279. package/lib/components/DecoratorLink/DecoratorLink.js +2 -1
  280. package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
  281. package/lib/components/EditInPlace/EditInPlace.d.ts +4 -0
  282. package/lib/components/EditInPlace/EditInPlace.js +21 -10
  283. package/lib/components/EditTearsheet/EditTearsheet.d.ts +7 -2
  284. package/lib/components/EditTearsheet/EditTearsheet.js +43 -9
  285. package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  286. package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -0
  287. package/lib/components/EmptyStates/EmptyStateV2.d.ts +63 -2
  288. package/lib/components/EmptyStates/EmptyStateV2.js +2 -1
  289. package/lib/components/FullPageError/FullPageError.d.ts +36 -2
  290. package/lib/components/FullPageError/FullPageError.js +0 -3
  291. package/lib/components/GetStartedCard/GetStartedCard.d.ts +61 -2
  292. package/lib/components/GetStartedCard/GetStartedCard.js +8 -7
  293. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  294. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  295. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  296. package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  297. package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  298. package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  299. package/lib/components/Nav/NavItem.js +10 -1
  300. package/lib/components/OptionsTile/OptionsTile.js +11 -6
  301. package/lib/components/PageHeader/PageHeader.js +1 -0
  302. package/lib/components/RemoveModal/RemoveModal.d.ts +4 -0
  303. package/lib/components/RemoveModal/RemoveModal.js +7 -1
  304. package/lib/components/SearchBar/SearchBar.d.ts +1 -1
  305. package/lib/components/SearchBar/SearchBar.js +2 -2
  306. package/lib/components/SidePanel/SidePanel.js +16 -20
  307. package/lib/components/SidePanel/motion/variants.d.ts +4 -6
  308. package/lib/components/SidePanel/motion/variants.js +10 -11
  309. package/lib/components/StatusIndicator/StatusIndicatorStep.js +94 -0
  310. package/lib/components/StringFormatter/StringFormatter.js +13 -2
  311. package/lib/components/StringFormatter/utils/enums.d.ts +20 -1
  312. package/lib/components/StringFormatter/utils/enums.js +23 -1
  313. package/lib/components/TagOverflow/TagOverflow.d.ts +35 -4
  314. package/lib/components/TagOverflow/TagOverflow.js +46 -63
  315. package/lib/components/TagOverflow/TagOverflowModal.js +4 -6
  316. package/lib/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
  317. package/lib/components/TagOverflow/TagOverflowPopover.js +37 -40
  318. package/lib/components/Tearsheet/Tearsheet.d.ts +8 -1
  319. package/lib/components/Tearsheet/Tearsheet.js +9 -1
  320. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  321. package/lib/components/Tearsheet/TearsheetNarrow.js +12 -0
  322. package/lib/components/Tearsheet/TearsheetShell.d.ts +11 -1
  323. package/lib/components/Tearsheet/TearsheetShell.js +26 -5
  324. package/lib/components/Toolbar/ToolbarButton.js +1 -1
  325. package/lib/components/WebTerminal/WebTerminal.js +10 -12
  326. package/lib/components/index.d.ts +1 -1
  327. package/lib/global/js/hooks/useFocus.d.ts +1 -0
  328. package/lib/global/js/hooks/useFocus.js +5 -1
  329. package/lib/global/js/hooks/usePrefersReducedMotion.js +13 -7
  330. package/lib/global/js/package-settings.d.ts +1 -1
  331. package/lib/global/js/package-settings.js +1 -1
  332. package/lib/index.js +5 -0
  333. package/lib/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  334. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1036 -1074
  335. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +946 -823
  336. package/lib/settings.d.ts +1 -1
  337. package/package.json +9 -8
  338. package/scss/components/Coachmark/_coachmark-overlay.scss +6 -70
  339. package/scss/components/Coachmark/_coachmark.scss +5 -4
  340. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +1 -3
  341. package/scss/components/ConditionBuilder/_condition-builder.scss +5 -1
  342. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +20 -3
  343. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +32 -3
  344. package/scss/components/CreateModal/_create-modal.scss +0 -4
  345. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +17 -2
  346. package/scss/components/Datagrid/_datagrid.scss +0 -4
  347. package/scss/components/Datagrid/styles/_useInlineEdit.scss +13 -0
  348. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +7 -5
  349. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +5 -4
  350. package/scss/components/HTTPErrors/_http-errors.scss +77 -0
  351. package/scss/components/OptionsTile/_options-tile.scss +6 -6
  352. package/scss/components/SidePanel/_side-panel.scss +1 -1
  353. package/scss/components/StatusIcon/_status-icon.scss +4 -4
  354. package/scss/components/StringFormatter/_string-formatter.scss +2 -2
  355. package/scss/components/UserProfileImage/_user-profile-image.scss +6 -2
  356. package/scss/components/_index-released-only.scss +1 -0
  357. package/telemetry.yml +32 -19
  358. package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  359. package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -16
  360. package/es/global/js/utils/window.d.ts +0 -2
  361. package/es/global/js/utils/window.js +0 -12
  362. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  363. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -20
  364. package/lib/global/js/utils/window.d.ts +0 -2
  365. package/lib/global/js/utils/window.js +0 -16
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React__default, { useRef, useState, useCallback, useEffect } from 'react';
9
+ import React__default, { forwardRef, useRef, useState, useCallback, useEffect, createElement } from 'react';
10
10
  import PropTypes from '../../node_modules/prop-types/index.js';
11
11
  import cx from 'classnames';
12
12
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
@@ -18,52 +18,36 @@ import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
18
18
  import { TagOverflowPopover } from './TagOverflowPopover.js';
19
19
  import { TagOverflowModal } from './TagOverflowModal.js';
20
20
 
21
- var _excluded = ["items", "tagComponent", "align", "showAllTagsLabel", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTarget", "allTagsModalTitle", "className", "containingElementRef", "measurementOffset", "maxVisible", "multiline", "overflowAlign", "overflowClassName", "overflowType", "onOverflowTagChange"],
21
+ var _excluded = ["align", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTarget", "allTagsModalTitle", "className", "containingElementRef", "items", "maxVisible", "measurementOffset", "multiline", "overflowAlign", "overflowClassName", "overflowType", "onOverflowTagChange", "showAllTagsLabel", "tagComponent"],
22
22
  _excluded2 = ["className", "id"],
23
23
  _excluded3 = ["tagType"],
24
24
  _excluded4 = ["id", "label", "tagType", "onClose"];
25
25
  var blockClass = "".concat(pkg.prefix, "--tag-overflow");
26
26
  var componentName = 'TagOverflow';
27
27
  var allTagsModalSearchThreshold = 10;
28
-
29
- // Default values for props
30
- var defaults = {
31
- items: [],
32
- align: 'start',
33
- measurementOffset: 0,
34
- overflowAlign: 'bottom',
35
- overflowType: 'default',
36
- onOverflowTagChange: function onOverflowTagChange() {}
37
- };
38
-
39
- /**
40
- * TODO: A description of the component.
41
- */
42
- var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
43
- var _ref$items = _ref.items,
44
- items = _ref$items === void 0 ? defaults.items : _ref$items,
45
- tagComponent = _ref.tagComponent,
46
- _ref$align = _ref.align,
47
- align = _ref$align === void 0 ? defaults.align : _ref$align,
48
- showAllTagsLabel = _ref.showAllTagsLabel,
49
- allTagsModalSearchLabel = _ref.allTagsModalSearchLabel,
50
- allTagsModalSearchPlaceholderText = _ref.allTagsModalSearchPlaceholderText,
51
- allTagsModalTarget = _ref.allTagsModalTarget,
52
- allTagsModalTitle = _ref.allTagsModalTitle,
53
- className = _ref.className,
54
- containingElementRef = _ref.containingElementRef,
55
- _ref$measurementOffse = _ref.measurementOffset,
56
- measurementOffset = _ref$measurementOffse === void 0 ? defaults.measurementOffset : _ref$measurementOffse,
57
- maxVisible = _ref.maxVisible,
58
- multiline = _ref.multiline,
59
- _ref$overflowAlign = _ref.overflowAlign,
60
- overflowAlign = _ref$overflowAlign === void 0 ? defaults.overflowAlign : _ref$overflowAlign,
61
- overflowClassName = _ref.overflowClassName,
62
- _ref$overflowType = _ref.overflowType,
63
- overflowType = _ref$overflowType === void 0 ? defaults.overflowType : _ref$overflowType,
64
- _ref$onOverflowTagCha = _ref.onOverflowTagChange,
65
- onOverflowTagChange = _ref$onOverflowTagCha === void 0 ? defaults.onOverflowTagChange : _ref$onOverflowTagCha,
66
- rest = _objectWithoutProperties(_ref, _excluded);
28
+ var TagOverflow = /*#__PURE__*/forwardRef(function (props, ref) {
29
+ var _props$align = props.align,
30
+ align = _props$align === void 0 ? 'start' : _props$align,
31
+ allTagsModalSearchLabel = props.allTagsModalSearchLabel,
32
+ allTagsModalSearchPlaceholderText = props.allTagsModalSearchPlaceholderText,
33
+ allTagsModalTarget = props.allTagsModalTarget,
34
+ allTagsModalTitle = props.allTagsModalTitle,
35
+ className = props.className,
36
+ containingElementRef = props.containingElementRef,
37
+ items = props.items,
38
+ maxVisible = props.maxVisible,
39
+ _props$measurementOff = props.measurementOffset,
40
+ measurementOffset = _props$measurementOff === void 0 ? 0 : _props$measurementOff,
41
+ multiline = props.multiline,
42
+ _props$overflowAlign = props.overflowAlign,
43
+ overflowAlign = _props$overflowAlign === void 0 ? 'bottom' : _props$overflowAlign,
44
+ overflowClassName = props.overflowClassName,
45
+ _props$overflowType = props.overflowType,
46
+ overflowType = _props$overflowType === void 0 ? 'default' : _props$overflowType,
47
+ onOverflowTagChange = props.onOverflowTagChange,
48
+ showAllTagsLabel = props.showAllTagsLabel,
49
+ tagComponent = props.tagComponent,
50
+ rest = _objectWithoutProperties(props, _excluded);
67
51
  var localContainerRef = useRef(null);
68
52
  var containerRef = ref || localContainerRef;
69
53
  var itemRefs = useRef(null);
@@ -100,7 +84,9 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
100
84
  setShowAllModalOpen(false);
101
85
  };
102
86
  var handleResize = function handleResize() {
103
- setContainerWidth(resizeElm.current.offsetWidth);
87
+ if (typeof resizeElm !== 'function' && resizeElm.current) {
88
+ setContainerWidth(resizeElm.current.offsetWidth);
89
+ }
104
90
  };
105
91
  useResizeObserver(resizeElm, handleResize);
106
92
  var getMap = function getMap() {
@@ -116,7 +102,6 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
116
102
  }
117
103
  };
118
104
  var getVisibleItems = useCallback(function () {
119
- var _overflowRef$current;
120
105
  if (!itemRefs.current) {
121
106
  return items;
122
107
  }
@@ -128,13 +113,13 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
128
113
  var optionalContainingElement = containingElementRef === null || containingElementRef === void 0 ? void 0 : containingElementRef.current;
129
114
  var measurementOffsetValue = typeof measurementOffset === 'number' ? measurementOffset : 0;
130
115
  var spaceAvailable = optionalContainingElement ? optionalContainingElement.offsetWidth - measurementOffsetValue : containerWidth;
131
- var overflowContainerWidth = ((_overflowRef$current = overflowRef.current) === null || _overflowRef$current === void 0 ? void 0 : _overflowRef$current.offsetWidth) > overflowIndicatorWidth ? overflowRef.current.offsetWidth : overflowIndicatorWidth;
116
+ var overflowContainerWidth = overflowRef && overflowRef.current && overflowRef.current.offsetWidth > overflowIndicatorWidth ? overflowRef.current.offsetWidth : overflowIndicatorWidth;
132
117
  var maxWidth = spaceAvailable - overflowContainerWidth;
133
118
  var childrenWidth = 0;
134
119
  var maxReached = false;
135
120
  return items.reduce(function (prev, cur) {
136
121
  if (!maxReached) {
137
- var itemWidth = map.get(cur.id) + itemOffset;
122
+ var itemWidth = (map ? Number(map.get(cur.id)) : 0) + itemOffset;
138
123
  var fits = itemWidth + childrenWidth < maxWidth;
139
124
  if (fits) {
140
125
  childrenWidth += itemWidth;
@@ -145,12 +130,13 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
145
130
  }
146
131
  return prev;
147
132
  }, []);
148
- }, [itemRefs, overflowRef, containerWidth, items, multiline, maxVisible, containingElementRef, measurementOffset]);
149
- var getCustomComponent = function getCustomComponent(item) {
133
+ }, [containerWidth, containingElementRef, items, maxVisible, measurementOffset, multiline]);
134
+ var getCustomComponent = function getCustomComponent(item, tagComponent) {
150
135
  var className = item.className,
151
136
  id = item.id,
152
137
  other = _objectWithoutProperties(item, _excluded2);
153
- return /*#__PURE__*/React__default.createElement(tagComponent, _objectSpread2(_objectSpread2({}, other), {}, {
138
+ return /*#__PURE__*/createElement(tagComponent, _objectSpread2(_objectSpread2({}, other), {}, {
139
+ key: id,
154
140
  className: cx("".concat(blockClass, "__item"), className),
155
141
  ref: function ref(node) {
156
142
  return itemRefHandler(id, node);
@@ -164,9 +150,9 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
164
150
  visibleItemsArr = (_visibleItemsArr = visibleItemsArr) === null || _visibleItemsArr === void 0 ? void 0 : _visibleItemsArr.slice(0, maxVisible);
165
151
  }
166
152
  var hiddenItems = items === null || items === void 0 ? void 0 : items.slice(visibleItemsArr.length);
167
- var overflowItemsArr = hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.map(function (_ref2) {
168
- var tagType = _ref2.tagType,
169
- other = _objectWithoutProperties(_ref2, _excluded3);
153
+ var overflowItemsArr = hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.map(function (_ref) {
154
+ var tagType = _ref.tagType,
155
+ other = _objectWithoutProperties(_ref, _excluded3);
170
156
  return _objectSpread2({
171
157
  type: tagType
172
158
  }, other);
@@ -174,10 +160,10 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
174
160
  setVisibleItems(visibleItemsArr);
175
161
  setOverflowItems(overflowItemsArr);
176
162
  onOverflowTagChange === null || onOverflowTagChange === void 0 || onOverflowTagChange(overflowItemsArr);
177
- }, [containerWidth, items, maxVisible, getVisibleItems, onOverflowTagChange]);
163
+ }, [getVisibleItems, items, maxVisible, onOverflowTagChange]);
178
164
  var handleTagOnClose = useCallback(function (onClose, index) {
179
165
  onClose === null || onClose === void 0 || onClose();
180
- if (index <= visibleItems.length - 1) {
166
+ if (index <= (visibleItems === null || visibleItems === void 0 ? void 0 : visibleItems.length) - 1) {
181
167
  setPopoverOpen(false);
182
168
  }
183
169
  }, [visibleItems]);
@@ -185,10 +171,10 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
185
171
  className: cx(blockClass, className, "".concat(blockClass, "--align-").concat(align), _defineProperty({}, "".concat(blockClass, "--multiline"), multiline)),
186
172
  ref: containerRef,
187
173
  role: "main"
188
- }, getDevtoolsProps(componentName)), visibleItems.length > 0 && visibleItems.map(function (item, index) {
174
+ }, getDevtoolsProps(componentName)), (visibleItems === null || visibleItems === void 0 ? void 0 : visibleItems.length) > 0 && visibleItems.map(function (item, index) {
189
175
  // Render custom components
190
176
  if (tagComponent) {
191
- return getCustomComponent(item);
177
+ return getCustomComponent(item, tagComponent);
192
178
  } else {
193
179
  var id = item.id,
194
180
  label = item.label,
@@ -215,7 +201,7 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
215
201
  }), /*#__PURE__*/React__default.createElement("span", {
216
202
  className: "".concat(blockClass, "__indicator"),
217
203
  ref: overflowRef
218
- }, overflowItems.length > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(TagOverflowPopover, {
204
+ }, (overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.length) > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(TagOverflowPopover, {
219
205
  allTagsModalSearchThreshold: allTagsModalSearchThreshold,
220
206
  className: overflowClassName,
221
207
  onShowAllClick: handleShowAllClick,
@@ -251,9 +237,9 @@ var tagTypes = Object.keys(TYPES);
251
237
  * The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
252
238
  * @returns null if no problems
253
239
  */
254
- var string_required_if_more_than_10_tags = isRequiredIf(PropTypes.string, function (_ref3) {
255
- var items = _ref3.items;
256
- return items && items.length > allTagsModalSearchThreshold;
240
+ var string_required_if_more_than_10_tags = isRequiredIf(PropTypes.string, function (_ref2) {
241
+ var items = _ref2.items;
242
+ return (items === null || items === void 0 ? void 0 : items.length) > allTagsModalSearchThreshold;
257
243
  });
258
244
 
259
245
  // The types and DocGen commentary for the component props,
@@ -284,11 +270,6 @@ TagOverflow.propTypes = {
284
270
  * Provide an optional class to be applied to the containing node.
285
271
  */
286
272
  className: PropTypes.string,
287
- /**
288
- * Optional ref for custom resize container to measure available space
289
- * Default will measure the available space of the TagSet container itself.
290
- */
291
- containingElementRef: PropTypes.object,
292
273
  /**
293
274
  * The items to be shown in the TagOverflow. Each item is specified as an object with properties:
294
275
  * **label**\* (required) to supply the content,
@@ -299,6 +280,7 @@ TagOverflow.propTypes = {
299
280
  * If you want to render a custom component, pass it as tagComponent prop and
300
281
  * then pass the props required for your custom component as the properties of item object
301
282
  */
283
+ //@ts-ignore
302
284
  items: PropTypes.arrayOf(PropTypes.shape({
303
285
  id: PropTypes.string.isRequired,
304
286
  label: PropTypes.string.isRequired,
@@ -342,6 +324,7 @@ TagOverflow.propTypes = {
342
324
  /** Component definition of the items to be rendered inside TagOverflow.
343
325
  * If this is not passed, items will be rendered as Tag component
344
326
  */
327
+ //@ts-ignore
345
328
  tagComponent: PropTypes.elementType
346
329
  };
347
330
 
@@ -14,8 +14,7 @@ import { pkg } from '../../settings.js';
14
14
  import { prepareProps } from '../../global/js/utils/props-helper.js';
15
15
  import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
16
16
 
17
- var _excluded = ["allTags", "className", "title", "onClose", "open", "overflowType", "portalTarget", "searchLabel", "searchPlaceholder"],
18
- _excluded2 = ["label", "id", "filter"];
17
+ var _excluded = ["allTags", "className", "title", "onClose", "open", "overflowType", "portalTarget", "searchLabel", "searchPlaceholder"];
19
18
  var componentName = 'TagOverflowModal';
20
19
  var blockClass = "".concat(pkg.prefix, "--tag-overflow-modal");
21
20
 
@@ -77,13 +76,12 @@ var TagOverflowModal = function TagOverflowModal(_ref) {
77
76
  }, getFilteredItems().map(function (_ref2) {
78
77
  var label = _ref2.label,
79
78
  id = _ref2.id,
80
- filter = _ref2.filter,
81
- other = _objectWithoutProperties(_ref2, _excluded2);
79
+ filter = _ref2.filter;
82
80
  var isFilterable = overflowType === 'tag' ? filter : false;
83
- return /*#__PURE__*/React__default.createElement(Tag, _extends({}, other, {
81
+ return /*#__PURE__*/React__default.createElement(Tag, {
84
82
  key: id,
85
83
  filter: isFilterable
86
- }), label);
84
+ }, label);
87
85
  })), /*#__PURE__*/React__default.createElement("div", {
88
86
  className: "".concat(blockClass, "__fade")
89
87
  })));
@@ -1,2 +1,14 @@
1
- export const TagOverflowPopover: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
1
  import React from 'react';
2
+ import { TagOverflowItem } from './TagOverflow';
3
+ export interface Props {
4
+ allTagsModalSearchThreshold?: number;
5
+ className?: string;
6
+ onShowAllClick: () => void;
7
+ overflowAlign?: string;
8
+ overflowTags: TagOverflowItem[];
9
+ overflowType?: string;
10
+ popoverOpen?: boolean;
11
+ setPopoverOpen?: (x: boolean) => void;
12
+ showAllTagsLabel?: string;
13
+ }
14
+ export declare const TagOverflowPopover: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React__default, { useRef } from 'react';
9
+ import React__default, { forwardRef, useRef } from 'react';
10
10
  import PropTypes from '../../node_modules/prop-types/index.js';
11
11
  import cx from 'classnames';
12
12
  import { Popover, Tag, PopoverContent, Link } from '@carbon/react';
@@ -17,52 +17,48 @@ var _excluded = ["allTagsModalSearchThreshold", "className", "onShowAllClick", "
17
17
  _excluded2 = ["label", "id", "tagType", "filter", "onClose"];
18
18
  var componentName = 'TagOverflowPopover';
19
19
  var blockClass = "".concat(pkg.prefix, "--tag-overflow-popover");
20
-
21
- // Default values for props
22
- var defaults = {
23
- allTagsModalSearchThreshold: 10,
24
- overflowAlign: 'bottom'
25
- };
26
- var TagOverflowPopover = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
27
- var _ref$allTagsModalSear = _ref.allTagsModalSearchThreshold,
28
- allTagsModalSearchThreshold = _ref$allTagsModalSear === void 0 ? defaults.allTagsModalSearchThreshold : _ref$allTagsModalSear,
29
- className = _ref.className,
30
- onShowAllClick = _ref.onShowAllClick,
31
- _ref$overflowAlign = _ref.overflowAlign,
32
- overflowAlign = _ref$overflowAlign === void 0 ? defaults.overflowAlign : _ref$overflowAlign,
33
- overflowTags = _ref.overflowTags,
34
- overflowType = _ref.overflowType,
35
- showAllTagsLabel = _ref.showAllTagsLabel,
36
- popoverOpen = _ref.popoverOpen,
37
- setPopoverOpen = _ref.setPopoverOpen,
38
- rest = _objectWithoutProperties(_ref, _excluded);
39
- var localRef = useRef();
20
+ var TagOverflowPopover = /*#__PURE__*/forwardRef(function (props, ref) {
21
+ var _overflowTags$length;
22
+ var allTagsModalSearchThreshold = props.allTagsModalSearchThreshold,
23
+ className = props.className,
24
+ onShowAllClick = props.onShowAllClick,
25
+ overflowAlign = props.overflowAlign,
26
+ overflowTags = props.overflowTags,
27
+ overflowType = props.overflowType,
28
+ showAllTagsLabel = props.showAllTagsLabel,
29
+ popoverOpen = props.popoverOpen,
30
+ setPopoverOpen = props.setPopoverOpen,
31
+ rest = _objectWithoutProperties(props, _excluded);
32
+ var localRef = useRef(null);
40
33
  var overflowTagContent = useRef(null);
41
34
  useClickOutside(ref || localRef, function () {
42
35
  if (popoverOpen) {
43
- setPopoverOpen(false);
36
+ setPopoverOpen === null || setPopoverOpen === void 0 || setPopoverOpen(false);
44
37
  }
45
38
  });
46
39
  var handleShowAllTagsClick = function handleShowAllTagsClick(evt) {
47
40
  evt.stopPropagation();
48
41
  evt.preventDefault();
49
- setPopoverOpen(false);
50
- onShowAllClick();
42
+ setPopoverOpen === null || setPopoverOpen === void 0 || setPopoverOpen(false);
43
+ onShowAllClick === null || onShowAllClick === void 0 || onShowAllClick();
51
44
  };
52
- var handleEscKeyPress = function handleEscKeyPress(event) {
53
- var key = event.key;
45
+ var handleEscKeyPress = function handleEscKeyPress(evt) {
46
+ var key = evt.key;
54
47
  if (key === 'Escape') {
55
- setPopoverOpen(false);
48
+ setPopoverOpen === null || setPopoverOpen === void 0 || setPopoverOpen(false);
56
49
  }
57
50
  };
58
51
  var getOverflowPopoverItems = function getOverflowPopoverItems() {
59
- return overflowTags.filter(function (_, index) {
60
- return overflowTags.length > allTagsModalSearchThreshold ? index < allTagsModalSearchThreshold : index <= allTagsModalSearchThreshold;
52
+ var thresh = allTagsModalSearchThreshold !== null && allTagsModalSearchThreshold !== void 0 ? allTagsModalSearchThreshold : 0;
53
+ return overflowTags === null || overflowTags === void 0 ? void 0 : overflowTags.filter(function (_, index) {
54
+ return (overflowTags === null || overflowTags === void 0 ? void 0 : overflowTags.length) > thresh ? index < thresh : index <= thresh;
61
55
  });
62
56
  };
57
+ var visibleItems = getOverflowPopoverItems();
58
+ var hasItems = (visibleItems === null || visibleItems === void 0 ? void 0 : visibleItems.length) > 0;
63
59
  return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
64
- "aria-hidden": overflowTags.length === 0,
65
- className: cx(blockClass, _defineProperty({}, "".concat(blockClass, "--hidden"), overflowTags.length === 0)),
60
+ "aria-hidden": (overflowTags === null || overflowTags === void 0 ? void 0 : overflowTags.length) === 0,
61
+ className: cx(blockClass, _defineProperty({}, "".concat(blockClass, "--hidden"), (overflowTags === null || overflowTags === void 0 ? void 0 : overflowTags.length) === 0)),
66
62
  ref: ref || localRef
67
63
  }), /*#__PURE__*/React__default.createElement(Popover, {
68
64
  align: overflowAlign,
@@ -73,21 +69,21 @@ var TagOverflowPopover = /*#__PURE__*/React__default.forwardRef(function (_ref,
73
69
  open: popoverOpen
74
70
  }, /*#__PURE__*/React__default.createElement(Tag, {
75
71
  onClick: function onClick() {
76
- return setPopoverOpen(!popoverOpen);
72
+ return setPopoverOpen === null || setPopoverOpen === void 0 ? void 0 : setPopoverOpen(!popoverOpen);
77
73
  },
78
74
  className: cx("".concat(blockClass, "__trigger"))
79
- }, "+", overflowTags.length), /*#__PURE__*/React__default.createElement(PopoverContent, null, /*#__PURE__*/React__default.createElement("div", {
75
+ }, "+", overflowTags === null || overflowTags === void 0 ? void 0 : overflowTags.length), /*#__PURE__*/React__default.createElement(PopoverContent, null, /*#__PURE__*/React__default.createElement("div", {
80
76
  ref: overflowTagContent,
81
77
  className: "".concat(blockClass, "__content")
82
78
  }, /*#__PURE__*/React__default.createElement("ul", {
83
79
  className: "".concat(blockClass, "__tag-list")
84
- }, getOverflowPopoverItems().map(function (_ref2) {
85
- var label = _ref2.label,
86
- id = _ref2.id,
87
- tagType = _ref2.tagType,
88
- filter = _ref2.filter,
89
- _onClose = _ref2.onClose,
90
- other = _objectWithoutProperties(_ref2, _excluded2);
80
+ }, hasItems && visibleItems.map(function (_ref) {
81
+ var label = _ref.label,
82
+ id = _ref.id,
83
+ tagType = _ref.tagType,
84
+ filter = _ref.filter,
85
+ _onClose = _ref.onClose,
86
+ other = _objectWithoutProperties(_ref, _excluded2);
91
87
  var typeValue = overflowType === 'tag' ? 'high-contrast' : tagType;
92
88
  var isFilterable = overflowType === 'tag' ? filter : false;
93
89
  return /*#__PURE__*/React__default.createElement("li", {
@@ -100,7 +96,7 @@ var TagOverflowPopover = /*#__PURE__*/React__default.forwardRef(function (_ref,
100
96
  type: typeValue,
101
97
  filter: isFilterable
102
98
  }), label) : label);
103
- })), overflowTags.length > allTagsModalSearchThreshold && /*#__PURE__*/React__default.createElement(Link, {
99
+ })), ((_overflowTags$length = overflowTags === null || overflowTags === void 0 ? void 0 : overflowTags.length) !== null && _overflowTags$length !== void 0 ? _overflowTags$length : 0) > (allTagsModalSearchThreshold !== null && allTagsModalSearchThreshold !== void 0 ? allTagsModalSearchThreshold : 0) && /*#__PURE__*/React__default.createElement(Link, {
104
100
  className: "".concat(blockClass, "__show-all-tags-link"),
105
101
  href: "",
106
102
  onClick: handleShowAllTagsClick,
@@ -128,6 +124,7 @@ TagOverflowPopover.propTypes = {
128
124
  /**
129
125
  * tags shown in overflow
130
126
  */
127
+ //@ts-ignore
131
128
  overflowTags: PropTypes.arrayOf(PropTypes.object).isRequired,
132
129
  /**
133
130
  * Type of rendering displayed inside of the tag overflow component
@@ -99,9 +99,16 @@ interface TearsheetProps extends PropsWithChildren {
99
99
  */
100
100
  portalTarget: ReactNode;
101
101
  /**
102
- * Specify a CSS selector that matches the DOM element that should be focused when the Modal opens
102
+ * Specify a CSS selector that matches the DOM element that should be
103
+ * focused when the Modal opens.
103
104
  */
104
105
  selectorPrimaryFocus?: string;
106
+ /**
107
+ * Specify the CSS selectors that match the floating menus.
108
+ *
109
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
110
+ */
111
+ selectorsFloatingMenus?: string[];
105
112
  /**
106
113
  * The main title of the tearsheet, displayed in the header area.
107
114
  */
@@ -190,9 +190,17 @@ Tearsheet.propTypes = _objectSpread2({
190
190
  /**@ts-ignore */
191
191
  portalTarget: portalType,
192
192
  /**
193
- * Specify a CSS selector that matches the DOM element that should be focused when the Modal opens
193
+ * Specify a CSS selector that matches the DOM element that should be
194
+ * focused when the Modal opens.
194
195
  */
195
196
  selectorPrimaryFocus: PropTypes.string,
197
+ /**
198
+ * Specify the CSS selectors that match the floating menus.
199
+ *
200
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
201
+ */
202
+ /**@ts-ignore*/
203
+ selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
196
204
  /**
197
205
  * The main title of the tearsheet, displayed in the header area.
198
206
  */
@@ -64,6 +64,17 @@ interface TearsheetNarrowBaseProps extends PropsWithChildren {
64
64
  * The DOM element that the tearsheet should be rendered within. Defaults to document.body.
65
65
  */
66
66
  portalTarget?: ReactNode;
67
+ /**
68
+ * Specify a CSS selector that matches the DOM element that should be
69
+ * focused when the Modal opens.
70
+ */
71
+ selectorPrimaryFocus?: string;
72
+ /**
73
+ * Specify the CSS selectors that match the floating menus.
74
+ *
75
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
76
+ */
77
+ selectorsFloatingMenus?: string[];
67
78
  /**
68
79
  * The main title of the tearsheet, displayed in the header area.
69
80
  */
@@ -148,6 +148,18 @@ TearsheetNarrow.propTypes = _objectSpread2({
148
148
  */
149
149
  /**@ts-ignore */
150
150
  portalTarget: portalType,
151
+ /**
152
+ * Specify a CSS selector that matches the DOM element that should be
153
+ * focused when the Modal opens.
154
+ */
155
+ selectorPrimaryFocus: PropTypes.string,
156
+ /**
157
+ * Specify the CSS selectors that match the floating menus.
158
+ *
159
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
160
+ */
161
+ /**@ts-ignore*/
162
+ selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
151
163
  /**
152
164
  * The main title of the tearsheet, displayed in the header area.
153
165
  */
@@ -9,7 +9,7 @@ import React, { PropsWithChildren, ReactNode, RefObject } from 'react';
9
9
  import PropTypes from 'prop-types';
10
10
  import { type ButtonProps } from '@carbon/react';
11
11
  interface TearsheetShellProps extends PropsWithChildren {
12
- actions?: ButtonProps[];
12
+ actions?: ButtonProps<any>[];
13
13
  ariaLabel?: string;
14
14
  /**
15
15
  * An optional class or classes to be added to the outermost element.
@@ -81,7 +81,17 @@ interface TearsheetShellProps extends PropsWithChildren {
81
81
  * The DOM element that the tearsheet should be rendered within. Defaults to document.body.
82
82
  */
83
83
  portalTarget?: ReactNode;
84
+ /**
85
+ * Specify a CSS selector that matches the DOM element that should be
86
+ * focused when the Modal opens.
87
+ */
84
88
  selectorPrimaryFocus?: string;
89
+ /**
90
+ * Specify the CSS selectors that match the floating menus.
91
+ *
92
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
93
+ */
94
+ selectorsFloatingMenus?: string[];
85
95
  /**
86
96
  * Specifies the width of the tearsheet, 'narrow' or 'wide'.
87
97
  */
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty, toConsumableArray as _toConsumableArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { useRef, useState, useEffect } from 'react';
10
10
  import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
11
11
  import PropTypes from '../../node_modules/prop-types/index.js';
@@ -16,11 +16,11 @@ import { getNodeTextContent } from '../../global/js/utils/getNodeTextContent.js'
16
16
  import { Button, usePrefix, ComposedModal, ModalHeader, Layer } from '@carbon/react';
17
17
  import { Wrap } from '../../global/js/utils/Wrap.js';
18
18
  import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
19
- import { useFocus } from '../../global/js/hooks/useFocus.js';
19
+ import { useFocus, getSpecificElement } from '../../global/js/hooks/useFocus.js';
20
20
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
21
21
  import { ActionSet } from '../ActionSet/ActionSet.js';
22
22
 
23
- var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
23
+ var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
24
24
 
25
25
  // The block part of our conventional BEM class names (bc__E--M).
26
26
  var bc = "".concat(pkg.prefix, "--tearsheet");
@@ -79,6 +79,8 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
79
79
  open = _ref.open,
80
80
  portalTargetIn = _ref.portalTarget,
81
81
  selectorPrimaryFocus = _ref.selectorPrimaryFocus,
82
+ _ref$selectorsFloatin = _ref.selectorsFloatingMenus,
83
+ selectorsFloatingMenus = _ref$selectorsFloatin === void 0 ? [] : _ref$selectorsFloatin,
82
84
  size = _ref.size,
83
85
  slug = _ref.slug,
84
86
  title = _ref.title,
@@ -138,7 +140,8 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
138
140
  // Callback to give the tearsheet the opportunity to claim focus
139
141
  handleStackChange.claimFocus = function () {
140
142
  if (selectorPrimaryFocus) {
141
- return specifiedElement === null || specifiedElement === void 0 ? void 0 : specifiedElement.focus();
143
+ var _getSpecificElement;
144
+ return (_getSpecificElement = getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus)) === null || _getSpecificElement === void 0 ? void 0 : _getSpecificElement.focus();
142
145
  }
143
146
  firstElement === null || firstElement === void 0 || firstElement.focus();
144
147
  };
@@ -164,10 +167,13 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
164
167
  useEffect(function () {
165
168
  if (open && position !== depth) {
166
169
  setTimeout(function () {
170
+ if (selectorPrimaryFocus) {
171
+ return specifiedElement === null || specifiedElement === void 0 ? void 0 : specifiedElement.focus();
172
+ }
167
173
  firstElement === null || firstElement === void 0 || firstElement.focus();
168
174
  }, 0);
169
175
  }
170
- }, [position, depth, firstElement, open]);
176
+ }, [position, depth, firstElement, open, specifiedElement, selectorPrimaryFocus]);
171
177
  useEffect(function () {
172
178
  var notify = function notify() {
173
179
  return stack.all.forEach(function (handler) {
@@ -249,7 +255,7 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
249
255
  onKeyDown: keyDownListener,
250
256
  preventCloseOnClickOutside: !isPassive,
251
257
  ref: modalRef,
252
- selectorsFloatingMenus: [".".concat(carbonPrefix, "--overflow-menu-options"), ".".concat(carbonPrefix, "--tooltip"), '.flatpickr-calendar', ".".concat(bc, "__container")],
258
+ selectorsFloatingMenus: [".".concat(carbonPrefix, "--overflow-menu-options"), ".".concat(carbonPrefix, "--tooltip"), '.flatpickr-calendar', ".".concat(bc, "__container")].concat(_toConsumableArray(selectorsFloatingMenus)),
253
259
  size: "sm"
254
260
  }), includeHeader && /*#__PURE__*/React__default.createElement(ModalHeader, {
255
261
  className: cx("".concat(bc, "__header"), _defineProperty(_defineProperty({}, "".concat(bc, "__header--with-close-icon"), effectiveHasCloseIcon), "".concat(bc, "__header--with-nav"), navigation)),
@@ -311,7 +317,9 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
311
317
  // The display name of the component, used by React. Note that displayName
312
318
  // is used in preference to relying on function.name.
313
319
  TearsheetShell.displayName = componentName;
314
- var portalType = typeof Element === 'undefined' ? PropTypes.object : PropTypes.instanceOf(Element);
320
+ var portalType = typeof Element === 'undefined' ? PropTypes.object :
321
+ // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
322
+ PropTypes.instanceOf(Element);
315
323
  var deprecatedProps = {
316
324
  /**
317
325
  * **Deprecated**
@@ -354,6 +362,7 @@ TearsheetShell.propTypes = _objectSpread2({
354
362
  label: PropTypes.string,
355
363
  loading: PropTypes.bool,
356
364
  // we duplicate this Button prop to improve the DocGen here
365
+ /**@ts-ignore*/
357
366
  onClick: Button.propTypes.onClick
358
367
  }))),
359
368
  /**
@@ -445,6 +454,18 @@ TearsheetShell.propTypes = _objectSpread2({
445
454
  */
446
455
  /**@ts-ignore*/
447
456
  portalTarget: portalType,
457
+ /**
458
+ * Specify a CSS selector that matches the DOM element that should be
459
+ * focused when the Modal opens.
460
+ */
461
+ selectorPrimaryFocus: PropTypes.string,
462
+ /**
463
+ * Specify the CSS selectors that match the floating menus.
464
+ *
465
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
466
+ */
467
+ /**@ts-ignore*/
468
+ selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
448
469
  /**
449
470
  * Specifies the width of the tearsheet, 'narrow' or 'wide'.
450
471
  */
@@ -28,7 +28,7 @@ var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
28
28
  rest = _objectWithoutProperties(_ref, _excluded);
29
29
  var Icon = renderIcon;
30
30
  return /*#__PURE__*/React__default.createElement(IconButton, _extends({
31
- align: ((_useContext = useContext(ToolbarContext)) === null || _useContext === void 0 ? void 0 : _useContext.vertical) && 'right'
31
+ align: (_useContext = useContext(ToolbarContext)) !== null && _useContext !== void 0 && _useContext.vertical ? 'right' : 'top'
32
32
  }, rest, {
33
33
  label: iconDescription,
34
34
  ref: ref,