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