@carbon/ibm-products 2.54.0-canary.8 → 2.54.0-canary.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/css/index-full-carbon.css +1399 -690
  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 +987 -64
  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 +610 -562
  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 +692 -567
  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/_virtual/_rollupPluginBabelHelpers.js +1 -1
  18. package/es/components/APIKeyModal/APIKeyDownloader.d.ts +1 -1
  19. package/es/components/APIKeyModal/APIKeyDownloader.js +1 -1
  20. package/es/components/APIKeyModal/APIKeyModal.d.ts +13 -0
  21. package/es/components/APIKeyModal/APIKeyModal.js +85 -38
  22. package/es/components/APIKeyModal/APIKeyModal.types.d.ts +21 -3
  23. package/es/components/AboutModal/AboutModal.js +3 -6
  24. package/es/components/AddSelect/hooks/useFocus.js +1 -2
  25. package/es/components/AddSelect/hooks/useParentSelect.js +1 -2
  26. package/es/components/AddSelect/hooks/usePath.js +1 -2
  27. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +18 -9
  28. package/es/components/Card/Card.d.ts +3 -3
  29. package/es/components/Card/Card.js +12 -12
  30. package/es/components/Card/CardHeader.d.ts +7 -7
  31. package/es/components/Card/CardHeader.js +14 -12
  32. package/es/components/Checklist/Checklist.js +1 -1
  33. package/es/components/Checklist/ChecklistIcon.js +1 -1
  34. package/es/components/Coachmark/Coachmark.d.ts +5 -0
  35. package/es/components/Coachmark/Coachmark.js +11 -3
  36. package/es/components/Coachmark/CoachmarkOverlay.js +4 -0
  37. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +17 -0
  38. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +57 -12
  39. package/es/components/CoachmarkStack/CoachmarkStackHome.d.ts +4 -0
  40. package/es/components/CoachmarkStack/CoachmarkStackHome.js +18 -6
  41. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -2
  42. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +9 -5
  43. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +1 -5
  44. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +5 -5
  45. package/es/components/ConditionBuilder/utils/util.js +0 -4
  46. package/es/components/CreateTearsheet/CreateTearsheet.d.ts +1 -1
  47. package/es/components/CreateTearsheet/CreateTearsheet.js +4 -3
  48. package/es/components/CreateTearsheet/CreateTearsheetStep.js +6 -3
  49. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +2 -2
  50. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +31 -2
  51. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +1 -2
  52. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -2
  53. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -2
  54. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -2
  55. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -2
  56. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +2 -3
  57. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -3
  58. package/es/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +1 -2
  59. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
  60. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
  61. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
  62. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
  63. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -2
  64. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -2
  65. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +1 -1
  66. package/es/components/Datagrid/useCustomizeColumns.js +4 -4
  67. package/es/components/Datagrid/useDatagrid.js +2 -2
  68. package/es/components/Datagrid/useDefaultStringRenderer.js +1 -2
  69. package/es/components/Datagrid/useEditableCell.js +1 -2
  70. package/es/components/Datagrid/useFlexResize.js +1 -2
  71. package/es/components/Datagrid/useFloatingScroll.js +1 -2
  72. package/es/components/Datagrid/useNestedRowExpander.js +1 -2
  73. package/es/components/Datagrid/useParentDimensions.js +1 -2
  74. package/es/components/Datagrid/useResizeTable.js +1 -2
  75. package/es/components/Datagrid/useRowExpander.js +1 -2
  76. package/es/components/Datagrid/useRowRenderer.js +1 -2
  77. package/es/components/Datagrid/useRowSize.js +1 -2
  78. package/es/components/Datagrid/useSkeletonRows.js +1 -2
  79. package/es/components/DecoratorDualButton/DecoratorDualButton.d.ts +1 -0
  80. package/es/components/DecoratorDualButton/DecoratorDualButton.js +5 -0
  81. package/es/components/DecoratorLink/DecoratorLink.d.ts +1 -0
  82. package/es/components/DecoratorLink/DecoratorLink.js +5 -0
  83. package/es/components/DecoratorSingleButton/DecoratorSingleButton.d.ts +1 -0
  84. package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +5 -0
  85. package/es/components/DescriptionList/DescriptionList.d.ts +1 -0
  86. package/es/components/DescriptionList/DescriptionList.js +5 -0
  87. package/es/components/EditFullPage/EditFullPage.d.ts +2 -0
  88. package/es/components/EditFullPage/EditFullPage.js +8 -0
  89. package/es/components/EditSidePanel/EditSidePanel.d.ts +2 -0
  90. package/es/components/EditSidePanel/EditSidePanel.js +8 -0
  91. package/es/components/EditTearsheet/EditTearsheet.d.ts +2 -0
  92. package/es/components/EditTearsheet/EditTearsheet.js +8 -0
  93. package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.d.ts +2 -0
  94. package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.js +8 -0
  95. package/es/components/EditUpdateCards/EditUpdateCards.d.ts +2 -0
  96. package/es/components/EditUpdateCards/EditUpdateCards.js +8 -0
  97. package/es/components/EmptyStates/EmptyStateIllustration.js +1 -2
  98. package/es/components/EmptyStates/EmptyStateV2.d.ts +1 -0
  99. package/es/components/EmptyStates/EmptyStateV2.js +7 -0
  100. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  101. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  102. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  103. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  104. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  105. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  106. package/es/components/EmptyStates/assets/ErrorIllustration.js +3 -5
  107. package/es/components/EmptyStates/assets/NoDataIllustration.js +3 -5
  108. package/es/components/EmptyStates/assets/NoTagsIllustration.js +3 -5
  109. package/es/components/EmptyStates/assets/NotFoundIllustration.js +3 -5
  110. package/es/components/EmptyStates/assets/NotificationsIllustration.js +3 -5
  111. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +3 -5
  112. package/es/components/ExpressiveCard/ExpressiveCard.d.ts +5 -5
  113. package/es/components/ExpressiveCard/ExpressiveCard.js +5 -5
  114. package/es/components/FilterPanel/FilterPanel.d.ts +1 -0
  115. package/es/components/FilterPanel/FilterPanel.js +6 -0
  116. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +1 -0
  117. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +5 -0
  118. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +1 -0
  119. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +5 -1
  120. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +1 -0
  121. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -0
  122. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +1 -0
  123. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +5 -0
  124. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +1 -0
  125. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +5 -0
  126. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +1 -0
  127. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +5 -1
  128. package/es/components/FilterSummary/FilterSummary.js +1 -1
  129. package/es/components/FullPageError/FullPageError.js +7 -7
  130. package/es/components/FullPageError/assets/Error403SVG.d.ts +1 -3
  131. package/es/components/FullPageError/assets/Error403SVG.js +4 -6
  132. package/es/components/FullPageError/assets/Error404SVG.d.ts +1 -3
  133. package/es/components/FullPageError/assets/Error404SVG.js +4 -6
  134. package/es/components/FullPageError/assets/ErrorGenericSVG.d.ts +1 -3
  135. package/es/components/FullPageError/assets/ErrorGenericSVG.js +4 -6
  136. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  137. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  138. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  139. package/es/components/InlineTip/InlineTip.d.ts +5 -0
  140. package/es/components/InlineTip/InlineTip.js +17 -8
  141. package/es/components/InterstitialScreen/InterstitialScreen.js +2 -3
  142. package/es/components/Nav/Nav.d.ts +3 -0
  143. package/es/components/Nav/Nav.js +8 -0
  144. package/es/components/Nav/NavItemLink.js +1 -2
  145. package/es/components/PageHeader/PageHeader.js +13 -3
  146. package/es/components/PageHeader/PageHeaderTitle.js +10 -29
  147. package/es/components/ProductiveCard/ProductiveCard.d.ts +9 -5
  148. package/es/components/ProductiveCard/ProductiveCard.js +11 -9
  149. package/es/components/SidePanel/SidePanel.d.ts +6 -1
  150. package/es/components/SidePanel/SidePanel.js +27 -14
  151. package/es/components/StatusIndicator/StatusIndicator.d.ts +1 -0
  152. package/es/components/StatusIndicator/StatusIndicator.js +5 -0
  153. package/es/components/StatusIndicator/StatusIndicatorStep.d.ts +1 -0
  154. package/es/components/StatusIndicator/StatusIndicatorStep.js +5 -0
  155. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +3 -1
  156. package/es/components/TagOverflow/TagOverflow.js +2 -5
  157. package/es/components/Tearsheet/TearsheetShell.d.ts +4 -0
  158. package/es/components/Tearsheet/TearsheetShell.js +7 -60
  159. package/es/global/js/hooks/useFocus.d.ts +1 -0
  160. package/es/global/js/hooks/useFocus.js +24 -1
  161. package/es/global/js/hooks/usePrefersReducedMotion.js +1 -2
  162. package/es/global/js/package-settings.d.ts +1 -1
  163. package/es/global/js/package-settings.js +1 -1
  164. package/es/global/js/utils/checkForOverflow.d.ts +5 -0
  165. package/es/global/js/utils/checkForOverflow.js +31 -0
  166. package/es/index.js +1 -1
  167. package/es/settings.d.ts +1 -1
  168. package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
  169. package/lib/components/APIKeyModal/APIKeyDownloader.d.ts +1 -1
  170. package/lib/components/APIKeyModal/APIKeyDownloader.js +1 -1
  171. package/lib/components/APIKeyModal/APIKeyModal.d.ts +13 -0
  172. package/lib/components/APIKeyModal/APIKeyModal.js +83 -34
  173. package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +21 -3
  174. package/lib/components/AboutModal/AboutModal.js +2 -5
  175. package/lib/components/AddSelect/hooks/useFocus.js +1 -2
  176. package/lib/components/AddSelect/hooks/useParentSelect.js +1 -2
  177. package/lib/components/AddSelect/hooks/usePath.js +1 -2
  178. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +17 -8
  179. package/lib/components/Card/Card.d.ts +3 -3
  180. package/lib/components/Card/Card.js +12 -12
  181. package/lib/components/Card/CardHeader.d.ts +7 -7
  182. package/lib/components/Card/CardHeader.js +14 -12
  183. package/lib/components/Checklist/ChecklistChart.js +7 -7
  184. package/lib/components/Coachmark/Coachmark.d.ts +5 -0
  185. package/lib/components/Coachmark/Coachmark.js +11 -3
  186. package/lib/components/Coachmark/CoachmarkOverlay.js +4 -0
  187. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +17 -0
  188. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +56 -11
  189. package/lib/components/CoachmarkStack/CoachmarkStackHome.d.ts +4 -0
  190. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +18 -6
  191. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -2
  192. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +9 -5
  193. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +1 -5
  194. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +5 -5
  195. package/lib/components/ConditionBuilder/utils/util.js +0 -4
  196. package/lib/components/CreateTearsheet/CreateTearsheet.d.ts +1 -1
  197. package/lib/components/CreateTearsheet/CreateTearsheet.js +4 -3
  198. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +5 -2
  199. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +2 -2
  200. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +30 -1
  201. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +1 -2
  202. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -2
  203. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -2
  204. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -2
  205. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -2
  206. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +1 -2
  207. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +1 -2
  208. package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +1 -2
  209. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
  210. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
  211. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
  212. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
  213. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -2
  214. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -2
  215. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +1 -1
  216. package/lib/components/Datagrid/useColumnOrder.js +1 -1
  217. package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -2
  218. package/lib/components/Datagrid/useEditableCell.js +1 -2
  219. package/lib/components/Datagrid/useFlexResize.js +1 -2
  220. package/lib/components/Datagrid/useFloatingScroll.js +1 -2
  221. package/lib/components/Datagrid/useNestedRowExpander.js +1 -2
  222. package/lib/components/Datagrid/useParentDimensions.js +1 -2
  223. package/lib/components/Datagrid/useResizeTable.js +1 -2
  224. package/lib/components/Datagrid/useRowExpander.js +1 -2
  225. package/lib/components/Datagrid/useRowRenderer.js +1 -2
  226. package/lib/components/Datagrid/useRowSize.js +1 -2
  227. package/lib/components/Datagrid/useSkeletonRows.js +1 -2
  228. package/lib/components/DecoratorDualButton/DecoratorDualButton.d.ts +1 -0
  229. package/lib/components/DecoratorDualButton/DecoratorDualButton.js +5 -0
  230. package/lib/components/DecoratorLink/DecoratorLink.d.ts +1 -0
  231. package/lib/components/DecoratorLink/DecoratorLink.js +5 -0
  232. package/lib/components/DecoratorSingleButton/DecoratorSingleButton.d.ts +1 -0
  233. package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +5 -0
  234. package/lib/components/DescriptionList/DescriptionList.d.ts +1 -0
  235. package/lib/components/DescriptionList/DescriptionList.js +5 -0
  236. package/lib/components/EditFullPage/EditFullPage.d.ts +2 -0
  237. package/lib/components/EditFullPage/EditFullPage.js +8 -0
  238. package/lib/components/EditSidePanel/EditSidePanel.d.ts +2 -0
  239. package/lib/components/EditSidePanel/EditSidePanel.js +8 -0
  240. package/lib/components/EditTearsheet/EditTearsheet.d.ts +2 -0
  241. package/lib/components/EditTearsheet/EditTearsheet.js +8 -0
  242. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.d.ts +2 -0
  243. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +8 -0
  244. package/lib/components/EditUpdateCards/EditUpdateCards.d.ts +2 -0
  245. package/lib/components/EditUpdateCards/EditUpdateCards.js +8 -0
  246. package/lib/components/EmptyStates/EmptyStateIllustration.js +1 -2
  247. package/lib/components/EmptyStates/EmptyStateV2.d.ts +1 -0
  248. package/lib/components/EmptyStates/EmptyStateV2.js +7 -0
  249. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  250. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  251. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  252. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  253. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  254. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  255. package/lib/components/EmptyStates/assets/ErrorIllustration.js +2 -4
  256. package/lib/components/EmptyStates/assets/NoDataIllustration.js +2 -4
  257. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +2 -4
  258. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +2 -4
  259. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +2 -4
  260. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +2 -4
  261. package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +5 -5
  262. package/lib/components/ExpressiveCard/ExpressiveCard.js +5 -5
  263. package/lib/components/FilterPanel/FilterPanel.d.ts +1 -0
  264. package/lib/components/FilterPanel/FilterPanel.js +6 -0
  265. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +1 -0
  266. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +5 -0
  267. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +1 -0
  268. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +5 -1
  269. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +1 -0
  270. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -0
  271. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +1 -0
  272. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +5 -0
  273. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +1 -0
  274. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +5 -0
  275. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +1 -0
  276. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +5 -1
  277. package/lib/components/FilterSummary/FilterSummary.js +1 -1
  278. package/lib/components/FullPageError/FullPageError.js +7 -7
  279. package/lib/components/FullPageError/assets/Error403SVG.d.ts +1 -3
  280. package/lib/components/FullPageError/assets/Error403SVG.js +4 -6
  281. package/lib/components/FullPageError/assets/Error404SVG.d.ts +1 -3
  282. package/lib/components/FullPageError/assets/Error404SVG.js +4 -6
  283. package/lib/components/FullPageError/assets/ErrorGenericSVG.d.ts +1 -3
  284. package/lib/components/FullPageError/assets/ErrorGenericSVG.js +4 -6
  285. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  286. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  287. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  288. package/lib/components/InlineTip/InlineTip.d.ts +5 -0
  289. package/lib/components/InlineTip/InlineTip.js +17 -8
  290. package/lib/components/InterstitialScreen/InterstitialScreen.js +2 -3
  291. package/lib/components/Nav/Nav.d.ts +3 -0
  292. package/lib/components/Nav/Nav.js +8 -0
  293. package/lib/components/Nav/NavItemLink.js +1 -2
  294. package/lib/components/PageHeader/PageHeader.js +12 -2
  295. package/lib/components/PageHeader/PageHeaderTitle.js +8 -27
  296. package/lib/components/ProductiveCard/ProductiveCard.d.ts +9 -5
  297. package/lib/components/ProductiveCard/ProductiveCard.js +11 -9
  298. package/lib/components/SidePanel/SidePanel.d.ts +6 -1
  299. package/lib/components/SidePanel/SidePanel.js +27 -14
  300. package/lib/components/StatusIndicator/StatusIndicator.d.ts +1 -0
  301. package/lib/components/StatusIndicator/StatusIndicator.js +5 -0
  302. package/lib/components/StatusIndicator/StatusIndicatorStep.d.ts +1 -0
  303. package/lib/components/StatusIndicator/StatusIndicatorStep.js +5 -0
  304. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +3 -1
  305. package/lib/components/TagOverflow/TagOverflow.js +1 -4
  306. package/lib/components/Tearsheet/TearsheetShell.d.ts +4 -0
  307. package/lib/components/Tearsheet/TearsheetShell.js +6 -59
  308. package/lib/global/js/hooks/useFocus.d.ts +1 -0
  309. package/lib/global/js/hooks/useFocus.js +24 -0
  310. package/lib/global/js/hooks/usePrefersReducedMotion.js +1 -2
  311. package/lib/global/js/package-settings.d.ts +1 -1
  312. package/lib/global/js/package-settings.js +1 -1
  313. package/lib/global/js/utils/checkForOverflow.d.ts +5 -0
  314. package/lib/global/js/utils/checkForOverflow.js +34 -0
  315. package/lib/index.js +109 -109
  316. package/lib/settings.d.ts +1 -1
  317. package/package.json +11 -11
  318. package/scss/components/APIKeyModal/_api-key-modal.scss +4 -0
  319. package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +3 -3
  320. package/scss/components/Card/_card.scss +19 -5
  321. package/scss/components/Coachmark/_coachmark-overlay.scss +2 -2
  322. package/scss/components/Coachmark/_coachmark-tagline.scss +1 -1
  323. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +3 -3
  324. package/scss/components/CoachmarkStack/_coachmark-stack.scss +2 -2
  325. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +7 -7
  326. package/scss/components/CreateInfluencer/_create-influencer.scss +2 -2
  327. package/scss/components/CreateTearsheet/_create-tearsheet.scss +1 -2
  328. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +4 -4
  329. package/scss/components/Datagrid/styles/_datagrid.scss +21 -14
  330. package/scss/components/Datagrid/styles/_draggableElement.scss +2 -2
  331. package/scss/components/Datagrid/styles/_useColumnRightAlign.scss +1 -1
  332. package/scss/components/Datagrid/styles/_useExpandedRow.scss +1 -1
  333. package/scss/components/Datagrid/styles/_useInlineEdit.scss +1 -1
  334. package/scss/components/Datagrid/styles/_useNestedRows.scss +2 -2
  335. package/scss/components/Datagrid/styles/_useStickyColumn.scss +2 -2
  336. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +1 -1
  337. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +1 -1
  338. package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +1 -1
  339. package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +1 -2
  340. package/scss/components/DecoratorBase/_decorator-base-mixins.scss +1 -1
  341. package/scss/components/DecoratorBase/_decorator-base.scss +3 -3
  342. package/scss/components/DecoratorDualButton/_decorator-dual-button.scss +1 -1
  343. package/scss/components/DecoratorSingleButton/_decorator-single-button.scss +1 -1
  344. package/scss/components/EditTearsheet/_edit-tearsheet.scss +1 -2
  345. package/scss/components/EditUpdateCards/_edit-update-cards.scss +7 -7
  346. package/scss/components/FullPageError/_full-page-error.scss +1 -1
  347. package/scss/components/GetStartedCard/_get-started-card.scss +1 -1
  348. package/scss/components/Guidebanner/_guidebanner.scss +4 -4
  349. package/scss/components/HTTPErrors/_http-errors.scss +1 -1
  350. package/scss/components/InlineTip/_inline-tip.scss +4 -4
  351. package/scss/components/InterstitialScreen/_interstitial-screen.scss +6 -6
  352. package/scss/components/NonLinearReading/_non-linear-reading.scss +2 -2
  353. package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -3
  354. package/scss/components/OptionsTile/_options-tile.scss +6 -8
  355. package/scss/components/PageHeader/_page-header.scss +38 -19
  356. package/scss/components/ProductiveCard/_productive-card.scss +2 -2
  357. package/scss/components/SidePanel/_side-panel.scss +24 -17
  358. package/scss/components/StatusIcon/_status-icon.scss +9 -7
  359. package/scss/components/StatusIndicator/_status-indicator.scss +1 -1
  360. package/scss/components/Tearsheet/_tearsheet.scss +5 -5
  361. package/scss/components/UserAvatar/_user-avatar.scss +5 -3
  362. package/scss/components/UserProfileImage/_user-profile-image.scss +6 -4
  363. package/scss/components/WebTerminal/_web-terminal.scss +2 -2
  364. package/scss/components/_index-released-only.scss +1 -0
  365. package/telemetry.yml +3 -0
@@ -20,7 +20,7 @@ var defaults = {
20
20
  };
21
21
  var CardHeader = function CardHeader(_ref) {
22
22
  var actions = _ref.actions,
23
- aiLabel = _ref.aiLabel,
23
+ decorator = _ref.decorator,
24
24
  noActionIcons = _ref.noActionIcons,
25
25
  onPrimaryButtonClick = _ref.onPrimaryButtonClick,
26
26
  onSecondaryButtonClick = _ref.onSecondaryButtonClick,
@@ -65,13 +65,13 @@ var CardHeader = function CardHeader(_ref) {
65
65
  d: "M13.2436 16H11.5996L10.9276 13.864H7.95164L7.29164 16H5.68364L8.49164 7.624H10.4596L13.2436 16ZM10.5436 12.508L9.46364 9.064H9.40364L8.33564 12.508H10.5436ZM17.9341 16H14.1301V14.728H15.2341V8.896H14.1301V7.624H17.9341V8.896H16.8181V14.728H17.9341V16Z",
66
66
  fill: "#161616"
67
67
  })));
68
- var normalizedAiLabel = null;
69
- if (aiLabel || slug) {
70
- if (inClickableCard || typeof aiLabel === 'boolean' || typeof slug === 'boolean') {
71
- normalizedAiLabel = hollowAiIcon;
68
+ var normalizedDecorator = null;
69
+ if (decorator || slug) {
70
+ if (inClickableCard || typeof decorator === 'boolean' || typeof slug === 'boolean') {
71
+ normalizedDecorator = hollowAiIcon;
72
72
  } else {
73
- var element = aiLabel || slug;
74
- normalizedAiLabel = /*#__PURE__*/React__default.cloneElement(element, {
73
+ var element = decorator || slug;
74
+ normalizedDecorator = /*#__PURE__*/React__default.cloneElement(element, {
75
75
  size: label && title || title && titleSize === 'large' ? 'sm' : 'xs'
76
76
  });
77
77
  }
@@ -79,7 +79,7 @@ var CardHeader = function CardHeader(_ref) {
79
79
  return /*#__PURE__*/React__default.createElement("div", {
80
80
  className: headerClasses
81
81
  }, /*#__PURE__*/React__default.createElement("div", {
82
- className: cx(["".concat(headerClass, "-container"), _defineProperty({}, "".concat(headerClass, "-container--has-slug"), !!slug), _defineProperty({}, "".concat(headerClass, "-container--has-ai-label"), !!aiLabel), _defineProperty({}, "".concat(headerClass, "-container--has-actions"), !!hasActions), _defineProperty({}, "".concat(headerClass, "-container--large-tile-or-label"), title && (label || titleSize === 'large'))])
82
+ className: cx(["".concat(headerClass, "-container"), _defineProperty({}, "".concat(headerClass, "-container--has-slug"), !!slug), _defineProperty({}, "".concat(headerClass, "-container--has-decorator"), !!decorator), _defineProperty({}, "".concat(headerClass, "-container--has-actions"), !!hasActions), _defineProperty({}, "".concat(headerClass, "-container--large-tile-or-label"), title && (label || titleSize === 'large'))])
83
83
  }, /*#__PURE__*/React__default.createElement("div", {
84
84
  className: "".concat(blockClass, "__title-container")
85
85
  }, label && /*#__PURE__*/React__default.createElement("p", {
@@ -105,15 +105,17 @@ var CardHeader = function CardHeader(_ref) {
105
105
  onClick: onPrimaryButtonClick,
106
106
  className: actionGhostButtonClass,
107
107
  disabled: primaryButtonDisabled
108
- }, primaryButtonText)), normalizedAiLabel));
108
+ }, primaryButtonText)), slug ? normalizedDecorator : decorator ? /*#__PURE__*/React__default.createElement("div", {
109
+ className: "".concat(blockClass, "__header__inner-wrapper--decorator")
110
+ }, normalizedDecorator) : ''));
109
111
  };
110
112
  /**@ts-ignore */
111
113
  CardHeader.propTypes = {
112
114
  actions: PropTypes.oneOfType([PropTypes.array, PropTypes.node]),
113
115
  /**
114
- * Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency, accountability, and explainability at the UI level.
116
+ * Optional prop that allows you to pass any component.
115
117
  */
116
- aiLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
118
+ decorator: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
117
119
  description: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
118
120
  hasActions: PropTypes.bool,
119
121
  /**
@@ -137,7 +139,7 @@ CardHeader.propTypes = {
137
139
  /**
138
140
  * **Experimental:** For all cases a `Slug` component can be provided.
139
141
  * Clickable tiles only accept a boolean value of true and display a hollow slug.
140
- * @deprecated please use the `aiLabel` prop
142
+ * @deprecated please use the `decorator` prop
141
143
  */
142
144
  slug: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
143
145
  title: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import { IconButton, Button } from '@carbon/react';
10
- import { Themes, Kinds } from './Checklist.types.js';
10
+ import { Kinds, Themes } from './Checklist.types.js';
11
11
  import React__default, { useState, useRef, useEffect } from 'react';
12
12
  import { ChecklistChart } from './ChecklistChart.js';
13
13
  import { ChecklistIcon } from './ChecklistIcon.js';
@@ -12,7 +12,7 @@ import cx from 'classnames';
12
12
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
13
13
  import { pkg } from '../../settings.js';
14
14
  import { CircleDash, CheckmarkOutline, Incomplete, Warning } from '@carbon/react/icons';
15
- import { Themes, Kinds } from './Checklist.types.js';
15
+ import { Kinds, Themes } from './Checklist.types.js';
16
16
 
17
17
  var _excluded = ["className", "kind", "theme"];
18
18
 
@@ -65,6 +65,11 @@ export interface CoachmarkProps {
65
65
  * Determines the theme of the component.
66
66
  */
67
67
  theme?: 'light' | 'dark';
68
+ /**
69
+ * Determines if the coachmark is open by default.
70
+ * Does nothing if `overlayKind=stacked`.
71
+ */
72
+ isOpenByDefault?: boolean;
68
73
  }
69
74
  /**
70
75
  * Coachmarks are used to call out specific functionality or concepts
@@ -20,7 +20,7 @@ import { throttle } from 'lodash';
20
20
  import { Popover, PopoverContent } from '@carbon/react';
21
21
  import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
22
22
 
23
- var _excluded = ["align", "autoAlign", "children", "className", "onClose", "overlayClassName", "overlayKind", "overlayRef", "positionTune", "portalTarget", "target", "theme"];
23
+ var _excluded = ["align", "autoAlign", "children", "className", "onClose", "overlayClassName", "overlayKind", "overlayRef", "positionTune", "portalTarget", "target", "theme", "isOpenByDefault"];
24
24
 
25
25
  // The block part of our conventional BEM class names (blockClass__E--M).
26
26
  var blockClass = "".concat(pkg.prefix, "--coachmark");
@@ -30,7 +30,8 @@ var defaults = {
30
30
  align: 'bottom',
31
31
  onClose: function onClose() {},
32
32
  overlayKind: 'tooltip',
33
- theme: 'light'
33
+ theme: 'light',
34
+ isOpenByDefault: false
34
35
  };
35
36
  /**
36
37
  * Coachmarks are used to call out specific functionality or concepts
@@ -55,10 +56,12 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
55
56
  target = _ref.target,
56
57
  _ref$theme = _ref.theme,
57
58
  theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
59
+ _ref$isOpenByDefault = _ref.isOpenByDefault,
60
+ isOpenByDefault = _ref$isOpenByDefault === void 0 ? defaults.isOpenByDefault : _ref$isOpenByDefault,
58
61
  rest = _objectWithoutProperties(_ref, _excluded);
59
62
  var isBeacon = overlayKind === COACHMARK_OVERLAY_KIND.TOOLTIP;
60
63
  var isStacked = overlayKind === COACHMARK_OVERLAY_KIND.STACKED;
61
- var _useState = useState(isStacked),
64
+ var _useState = useState(isStacked || isOpenByDefault),
62
65
  _useState2 = _slicedToArray(_useState, 2),
63
66
  isOpen = _useState2[0],
64
67
  setIsOpen = _useState2[1];
@@ -250,6 +253,11 @@ Coachmark.propTypes = {
250
253
  * Optional class name for this component.
251
254
  */
252
255
  className: PropTypes.string,
256
+ /**
257
+ * Determines if the coachmark is open by default.
258
+ * Does nothing if `overlayKind=stacked`.
259
+ */
260
+ isOpenByDefault: PropTypes.bool,
253
261
  /**
254
262
  * Function to call when the Coachmark closes.
255
263
  */
@@ -60,6 +60,7 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
60
60
  var handleKeyPress = function handleKeyPress(event) {
61
61
  var shiftKey = event.shiftKey,
62
62
  key = event.key;
63
+ /* istanbul ignore next */
63
64
  if (key === 'Enter' || key === ' ') {
64
65
  setA11yDragMode(function (prevVal) {
65
66
  return !prevVal;
@@ -103,6 +104,8 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
103
104
  }
104
105
  return style;
105
106
  }, [isBeacon, isDraggable, coachmark, kind]);
107
+
108
+ /* istanbul ignore next */
106
109
  function handleDragBounds(x, y) {
107
110
  var xRes = x;
108
111
  var yRes = y;
@@ -191,6 +194,7 @@ var useWindowDimensions = function useWindowDimensions() {
191
194
  windowDimensions = _useState4[0],
192
195
  setWindowDimensions = _useState4[1];
193
196
  useEffect(function () {
197
+ /* istanbul ignore next */
194
198
  function handleResize() {
195
199
  setWindowDimensions(getWindowDimensions());
196
200
  }
@@ -24,11 +24,16 @@ export interface CoachmarkOverlayElementsProps {
24
24
  * The object describing an image in one of two shapes.
25
25
  * If a single media element is required, use `{render}`.
26
26
  * If a stepped animation is required, use `{filePaths}`.
27
+ * * @deprecated please use the `renderMedia` prop
27
28
  */
28
29
  media?: {
29
30
  render?: () => ReactNode;
30
31
  filePaths?: string[];
31
32
  };
33
+ /**
34
+ * Optional prop to render any media like images or any animated media.
35
+ */
36
+ renderMedia?: (params: any) => ReactNode;
32
37
  /**
33
38
  * The label for the Next button.
34
39
  */
@@ -41,6 +46,18 @@ export interface CoachmarkOverlayElementsProps {
41
46
  * The label for the Close button.
42
47
  */
43
48
  closeButtonLabel?: string;
49
+ /**
50
+ * Callback called when clicking on the Next button.
51
+ */
52
+ onNext?: () => void;
53
+ /**
54
+ * Callback called when clicking on the Previous button.
55
+ */
56
+ onBack?: () => void;
57
+ /**
58
+ * Current step of the coachmarks.
59
+ */
60
+ currentStep?: number;
44
61
  }
45
62
  /**
46
63
  * Composable container to allow for the displaying of CoachmarkOverlayElement
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import { Button } from '@carbon/react';
10
- import React__default, { useRef, useState, Children, useEffect } from 'react';
10
+ import React__default, { useRef, useState, Children, useMemo, useEffect } from 'react';
11
11
  import { Carousel } from '../Carousel/Carousel.js';
12
12
  import '../Carousel/CarouselItem.js';
13
13
  import PropTypes from '../../_virtual/index.js';
@@ -20,7 +20,7 @@ import { pkg } from '../../settings.js';
20
20
  import '../Coachmark/Coachmark.js';
21
21
  import { useCoachmark } from '../Coachmark/utils/context.js';
22
22
 
23
- var _excluded = ["className", "children", "isVisible", "media", "nextButtonText", "previousButtonLabel", "closeButtonLabel"];
23
+ var _excluded = ["className", "children", "isVisible", "media", "renderMedia", "currentStep", "nextButtonText", "previousButtonLabel", "closeButtonLabel", "onNext", "onBack"];
24
24
 
25
25
  // The block part of our conventional BEM class names (blockClass__E--M).
26
26
  var blockClass = "".concat(pkg.prefix, "--coachmark-overlay-elements");
@@ -41,7 +41,10 @@ var defaults = {
41
41
  isVisible: false,
42
42
  nextButtonText: 'Next',
43
43
  previousButtonLabel: 'Back',
44
- closeButtonLabel: 'Got it'
44
+ closeButtonLabel: 'Got it',
45
+ onNext: undefined,
46
+ onBack: undefined,
47
+ currentStep: 0
45
48
  };
46
49
  /**
47
50
  * Composable container to allow for the displaying of CoachmarkOverlayElement
@@ -53,12 +56,19 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
53
56
  _ref$isVisible = _ref.isVisible,
54
57
  isVisible = _ref$isVisible === void 0 ? defaults.isVisible : _ref$isVisible,
55
58
  media = _ref.media,
59
+ renderMedia = _ref.renderMedia,
60
+ _ref$currentStep = _ref.currentStep,
61
+ currentStep = _ref$currentStep === void 0 ? defaults.currentStep : _ref$currentStep,
56
62
  _ref$nextButtonText = _ref.nextButtonText,
57
63
  nextButtonText = _ref$nextButtonText === void 0 ? defaults.nextButtonText : _ref$nextButtonText,
58
64
  _ref$previousButtonLa = _ref.previousButtonLabel,
59
65
  previousButtonLabel = _ref$previousButtonLa === void 0 ? defaults.previousButtonLabel : _ref$previousButtonLa,
60
66
  _ref$closeButtonLabel = _ref.closeButtonLabel,
61
67
  closeButtonLabel = _ref$closeButtonLabel === void 0 ? defaults.closeButtonLabel : _ref$closeButtonLabel,
68
+ _ref$onNext = _ref.onNext,
69
+ onNext = _ref$onNext === void 0 ? defaults.onNext : _ref$onNext,
70
+ _ref$onBack = _ref.onBack,
71
+ onBack = _ref$onBack === void 0 ? defaults.onBack : _ref$onBack,
62
72
  rest = _objectWithoutProperties(_ref, _excluded);
63
73
  var buttonFocusRef = useRef(undefined);
64
74
  var scrollRef = useRef(undefined);
@@ -66,11 +76,12 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
66
76
  _useState2 = _slicedToArray(_useState, 2),
67
77
  scrollPosition = _useState2[0],
68
78
  setScrollPosition = _useState2[1];
69
- var _useState3 = useState(0),
79
+ var _useState3 = useState(currentStep),
70
80
  _useState4 = _slicedToArray(_useState3, 2),
71
81
  currentProgStep = _useState4[0],
72
82
  _setCurrentProgStep = _useState4[1];
73
83
  var coachmark = useCoachmark();
84
+ var hasMedia = media || renderMedia;
74
85
  var setCurrentProgStep = function setCurrentProgStep(value) {
75
86
  if (currentProgStep > 0 && value === 0 && buttonFocusRef.current) {
76
87
  setTimeout(function () {
@@ -83,6 +94,20 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
83
94
  var numProgSteps = Children.count(children);
84
95
  var progStepFloor = 0;
85
96
  var progStepCeil = numProgSteps - 1;
97
+ var renderMediaContent = useMemo(function () {
98
+ return renderMedia === null || renderMedia === void 0 ? void 0 : renderMedia({
99
+ playStep: currentProgStep
100
+ });
101
+ }, [currentProgStep, renderMedia]);
102
+ useEffect(function () {
103
+ var _scrollRef$current, _scrollRef$current$sc;
104
+ // When current step is set by props
105
+ // scroll to the appropriate view on the carrousel
106
+ var targetStep = clamp(currentStep, progStepFloor, progStepCeil);
107
+ scrollRef === null || scrollRef === void 0 || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || (_scrollRef$current$sc = _scrollRef$current.scrollToView) === null || _scrollRef$current$sc === void 0 || _scrollRef$current$sc.call(_scrollRef$current, targetStep);
108
+ // Avoid circular call to this hook
109
+ // eslint-disable-next-line react-hooks/exhaustive-deps
110
+ }, [currentStep]);
86
111
  useEffect(function () {
87
112
  // On mount, one of the two primary buttons ("next" or "close")
88
113
  // will be rendered and must have focus. (a11y)
@@ -111,18 +136,19 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
111
136
  // example: [`${blockClass}__here-if-small`]: size === 'sm',
112
137
  }),
113
138
  ref: ref
114
- }, getDevtoolsProps(componentName)), media && (media.render ? media.render() : /*#__PURE__*/React__default.createElement(SteppedAnimatedMedia, {
139
+ }, getDevtoolsProps(componentName)), hasMedia && (media === null || media === void 0 ? void 0 : media.render) && media.render(), hasMedia && (media === null || media === void 0 ? void 0 : media.filePaths) && /*#__PURE__*/React__default.createElement(SteppedAnimatedMedia, {
115
140
  className: "".concat(blockClass, "__element-stepped-media"),
116
141
  filePaths: media.filePaths,
117
142
  playStep: currentProgStep
118
- })), numProgSteps === 1 ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children, closeButtonLabel && /*#__PURE__*/React__default.createElement("div", {
143
+ }), hasMedia && renderMedia && /*#__PURE__*/React__default.createElement("div", {
144
+ className: "".concat(blockClass, "__element-stepped-media")
145
+ }, renderMediaContent), numProgSteps === 1 ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children, closeButtonLabel && /*#__PURE__*/React__default.createElement("div", {
119
146
  className: cx("".concat(blockClass, "__footer"), 'coachmark-carousel-controls')
120
147
  }, /*#__PURE__*/React__default.createElement(Button, _extends({
121
148
  size: "sm"
122
149
  }, coachmark.closeButtonProps, {
123
150
  ref: buttonFocusRef
124
151
  }), closeButtonLabel))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Carousel, {
125
- disableArrowScroll: true,
126
152
  ref: scrollRef,
127
153
  onScroll: function onScroll(scrollPercent) {
128
154
  setScrollPosition(scrollPercent);
@@ -137,10 +163,11 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
137
163
  title: previousButtonLabel,
138
164
  disabled: scrollPosition === 0,
139
165
  onClick: function onClick() {
140
- var _scrollRef$current, _scrollRef$current$sc;
166
+ var _scrollRef$current2, _scrollRef$current2$s;
141
167
  var targetStep = clamp(currentProgStep - 1, progStepFloor, progStepCeil);
142
- scrollRef === null || scrollRef === void 0 || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || (_scrollRef$current$sc = _scrollRef$current.scrollToView) === null || _scrollRef$current$sc === void 0 || _scrollRef$current$sc.call(_scrollRef$current, targetStep);
168
+ scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 || (_scrollRef$current2$s = _scrollRef$current2.scrollToView) === null || _scrollRef$current2$s === void 0 || _scrollRef$current2$s.call(_scrollRef$current2, targetStep);
143
169
  setCurrentProgStep(targetStep);
170
+ onBack === null || onBack === void 0 || onBack();
144
171
  }
145
172
  }, previousButtonLabel), currentProgStep < progStepCeil ? /*#__PURE__*/React__default.createElement(Button, {
146
173
  size: "sm",
@@ -148,10 +175,11 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
148
175
  title: nextButtonText,
149
176
  disabled: scrollPosition === 1,
150
177
  onClick: function onClick() {
151
- var _scrollRef$current2, _scrollRef$current2$s;
178
+ var _scrollRef$current3, _scrollRef$current3$s;
152
179
  var targetStep = clamp(currentProgStep + 1, progStepFloor, progStepCeil);
153
- scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 || (_scrollRef$current2$s = _scrollRef$current2.scrollToView) === null || _scrollRef$current2$s === void 0 || _scrollRef$current2$s.call(_scrollRef$current2, targetStep);
180
+ scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 || (_scrollRef$current3$s = _scrollRef$current3.scrollToView) === null || _scrollRef$current3$s === void 0 || _scrollRef$current3$s.call(_scrollRef$current3, targetStep);
154
181
  setCurrentProgStep(targetStep);
182
+ onNext === null || onNext === void 0 || onNext();
155
183
  }
156
184
  }, nextButtonText) : closeButtonLabel && /*#__PURE__*/React__default.createElement(Button, _extends({
157
185
  size: "sm",
@@ -185,6 +213,10 @@ CoachmarkOverlayElements.propTypes = {
185
213
  * The label for the Close button.
186
214
  */
187
215
  closeButtonLabel: PropTypes.string,
216
+ /**
217
+ * Current step of the coachmarks
218
+ */
219
+ currentStep: PropTypes.number,
188
220
  /**
189
221
  * The visibility of CoachmarkOverlayElements is
190
222
  * managed in the parent component.
@@ -194,6 +226,7 @@ CoachmarkOverlayElements.propTypes = {
194
226
  * The object describing an image in one of two shapes.
195
227
  * If a single media element is required, use `{render}`.
196
228
  * If a stepped animation is required, use `{filePaths}`.
229
+ * @deprecated please use the `renderMedia` prop
197
230
  */
198
231
  /**@ts-ignore*/
199
232
  media: PropTypes.oneOfType([PropTypes.shape({
@@ -205,10 +238,22 @@ CoachmarkOverlayElements.propTypes = {
205
238
  * The label for the Next button.
206
239
  */
207
240
  nextButtonText: PropTypes.string,
241
+ /**
242
+ * Optional callback called when clicking on the Previous button.
243
+ */
244
+ onBack: PropTypes.func,
245
+ /**
246
+ * Optional callback called when clicking on the Next button.
247
+ */
248
+ onNext: PropTypes.func,
208
249
  /**
209
250
  * The label for the Previous button.
210
251
  */
211
- previousButtonLabel: PropTypes.string
252
+ previousButtonLabel: PropTypes.string,
253
+ /**
254
+ * Optional prop to render any media like images or animated media.
255
+ */
256
+ renderMedia: PropTypes.func
212
257
  };
213
258
 
214
259
  export { CoachmarkOverlayElements };
@@ -39,6 +39,10 @@ interface CoachmarkStackHomeProps {
39
39
  * @see {@link MEDIA_PROP_TYPE}.
40
40
  */
41
41
  media?: Media;
42
+ /**
43
+ * Optional prop to render any media like images or any animated media.
44
+ */
45
+ renderMedia?: (params: any) => ReactNode;
42
46
  /**
43
47
  * The labels used to link to the stackable Coachmarks.
44
48
  */
@@ -17,9 +17,10 @@ import { pkg } from '../../settings.js';
17
17
  import { createPortal } from 'react-dom';
18
18
  import { CoachmarkHeader } from '../Coachmark/CoachmarkHeader.js';
19
19
  import { SteppedAnimatedMedia } from '../SteppedAnimatedMedia/SteppedAnimatedMedia.js';
20
+ import { deprecateProp } from '../../global/js/utils/props-helper.js';
20
21
  import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
21
22
 
22
- var _excluded = ["className", "description", "isOpen", "media", "navLinkLabels", "onClickNavItem", "onClose", "portalTarget", "closeButtonLabel", "title"];
23
+ var _excluded = ["className", "description", "isOpen", "media", "renderMedia", "navLinkLabels", "onClickNavItem", "onClose", "portalTarget", "closeButtonLabel", "title"];
23
24
  // Carbon and package components we use.
24
25
  /* TODO: @import(s) of carbon components and other package components. */
25
26
 
@@ -37,6 +38,7 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
37
38
  description = _ref.description,
38
39
  isOpen = _ref.isOpen,
39
40
  media = _ref.media,
41
+ renderMedia = _ref.renderMedia,
40
42
  navLinkLabels = _ref.navLinkLabels,
41
43
  onClickNavItem = _ref.onClickNavItem,
42
44
  _onClose = _ref.onClose,
@@ -49,6 +51,7 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
49
51
  _useState2 = _slicedToArray(_useState, 2),
50
52
  linkFocusIndex = _useState2[0],
51
53
  setLinkFocusIndex = _useState2[1];
54
+ var hasMedia = media || renderMedia;
52
55
  useEffect(function () {
53
56
  setTimeout(function () {
54
57
  if (isOpen && buttonFocusRef.current) {
@@ -90,13 +93,17 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
90
93
  className: "".concat(overlayClass, "__body")
91
94
  }, /*#__PURE__*/React__default.createElement("div", {
92
95
  className: "".concat(overlayClass, "-element")
93
- }, !media && /*#__PURE__*/React__default.createElement(Idea, {
96
+ }, !hasMedia && /*#__PURE__*/React__default.createElement(Idea, {
94
97
  size: 20,
95
98
  className: "".concat(blockClass, "__icon-idea")
96
- }), media && (media.render ? media.render() : /*#__PURE__*/React__default.createElement(SteppedAnimatedMedia, {
97
- className: "".concat(overlayClass, "__element-stepped-media"),
99
+ }), hasMedia && (media === null || media === void 0 ? void 0 : media.render) && media.render(), hasMedia && (media === null || media === void 0 ? void 0 : media.filePaths) && /*#__PURE__*/React__default.createElement(SteppedAnimatedMedia, {
100
+ className: "".concat(blockClass, "__element-stepped-media"),
98
101
  filePaths: media.filePaths,
99
102
  playStep: 0
103
+ }), hasMedia && renderMedia && /*#__PURE__*/React__default.createElement("div", {
104
+ className: "".concat(blockClass, "__element-stepped-media")
105
+ }, renderMedia({
106
+ playStep: 0
100
107
  })), /*#__PURE__*/React__default.createElement("div", {
101
108
  className: "".concat(overlayClass, "-element__content")
102
109
  }, title && /*#__PURE__*/React__default.createElement("h2", {
@@ -156,12 +163,13 @@ CoachmarkStackHome.propTypes = {
156
163
  * If a stepped animation is required, use `{filePaths}`.
157
164
  *
158
165
  * @see {@link MEDIA_PROP_TYPE}.
166
+ * @deprecated please use the `renderMedia` prop
159
167
  */
160
- media: PropTypes.oneOfType([PropTypes.shape({
168
+ media: deprecateProp(PropTypes.oneOfType([PropTypes.shape({
161
169
  render: PropTypes.func
162
170
  }), PropTypes.shape({
163
171
  filePaths: PropTypes.arrayOf(PropTypes.string)
164
- })]),
172
+ })]), ''),
165
173
  /**
166
174
  * The labels used to link to the stackable Coachmarks.
167
175
  */
@@ -185,6 +193,10 @@ CoachmarkStackHome.propTypes = {
185
193
  * element is hidden or component is unmounted, the CoachmarkStackHome will disappear.
186
194
  */
187
195
  portalTarget: PropTypes.string,
196
+ /**
197
+ * Optional prop to render any media like images or animated media.
198
+ */
199
+ renderMedia: PropTypes.func,
188
200
  /**
189
201
  * The title of the Coachmark.
190
202
  */
@@ -50,6 +50,5 @@ var GroupConnector = function GroupConnector() {
50
50
  }
51
51
  })));
52
52
  };
53
- var GroupConnector$1 = GroupConnector;
54
53
 
55
- export { GroupConnector$1 as default };
54
+ export { GroupConnector as default };
@@ -72,8 +72,7 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
72
72
  }, [actionState]);
73
73
  useEffect(function () {
74
74
  if (initialState !== null && initialState !== void 0 && initialState.enabledDefault) {
75
- setRootState === null || setRootState === void 0 || setRootState(initialConditionState.current);
76
- initialConditionState.current = null;
75
+ setRootState === null || setRootState === void 0 || setRootState(initialState.state);
77
76
  }
78
77
  // eslint-disable-next-line react-hooks/exhaustive-deps
79
78
  }, [initialState]);
@@ -92,11 +91,16 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
92
91
  };
93
92
  var _onRemove = useCallback(function (groupId) {
94
93
  var _rootState$groups2;
94
+ var groups = rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.filter(function (group) {
95
+ return groupId !== (group === null || group === void 0 ? void 0 : group.id);
96
+ });
95
97
  setRootState === null || setRootState === void 0 || setRootState(_objectSpread2(_objectSpread2({}, rootState), {}, {
96
- groups: rootState ? rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.filter(function (group) {
97
- return groupId !== (group === null || group === void 0 ? void 0 : group.id);
98
- }) : []
98
+ groups: rootState ? groups : []
99
99
  }));
100
+ //set the initial state to empty.
101
+ if ((groups === null || groups === void 0 ? void 0 : groups.length) === 0) {
102
+ initialConditionState.current = null;
103
+ }
100
104
  }, [setRootState, rootState]);
101
105
  var onChangeHandler = function onChangeHandler(updatedGroup, groupIndex) {
102
106
  /**
@@ -63,9 +63,6 @@ var ItemOption = function ItemOption(_ref) {
63
63
  className: "".concat(blockClass, "__statement_wrapper")
64
64
  }, /*#__PURE__*/React__default.createElement("div", null, option.text1, " (", option.connector, ")"), /*#__PURE__*/React__default.createElement("div", null, option.text2));
65
65
  };
66
- var preventDefault = function preventDefault(evt) {
67
- return evt.preventDefault();
68
- };
69
66
  if (!allOptions) {
70
67
  return;
71
68
  }
@@ -78,8 +75,7 @@ var ItemOption = function ItemOption(_ref) {
78
75
  size: "sm",
79
76
  labelText: clearSearchText,
80
77
  closeButtonLabelText: clearSearchText,
81
- onChange: onSearchChangeHandler,
82
- onKeyDown: preventDefault
78
+ onChange: onSearchChangeHandler
83
79
  })), /*#__PURE__*/React__default.createElement("ul", {
84
80
  "aria-label": getAriaLabel(),
85
81
  role: "listbox"
@@ -129,13 +129,14 @@ var ItemOptionForValueField = function ItemOptionForValueField(_ref) {
129
129
  } else {
130
130
  onChange(option, evt);
131
131
  }
132
+ if (evt.target instanceof SVGElement) {
133
+ evt.stopPropagation();
134
+ //stop propagate event , since this closes the popover when clicked on checkboxes which are SVGs.
135
+ }
132
136
  };
133
137
  var getAriaLabel = function getAriaLabel() {
134
138
  return conditionState.label ? conditionState.label : conditionState.property ? conditionState.property : propertyText;
135
139
  };
136
- var preventDefault = function preventDefault(evt) {
137
- return evt.preventDefault();
138
- };
139
140
  if (!allOptions) {
140
141
  return _SelectSkeleton || (_SelectSkeleton = /*#__PURE__*/React__default.createElement(SelectSkeleton, null));
141
142
  }
@@ -148,8 +149,7 @@ var ItemOptionForValueField = function ItemOptionForValueField(_ref) {
148
149
  size: "sm",
149
150
  labelText: clearSearchText,
150
151
  closeButtonLabelText: clearSearchText,
151
- onChange: onSearchChangeHandler,
152
- onKeyDown: preventDefault
152
+ onChange: onSearchChangeHandler
153
153
  })), multiSelectable && /*#__PURE__*/React__default.createElement("div", {
154
154
  className: "".concat(blockClass, "__multiselectSelectionStatusContainer")
155
155
  }, /*#__PURE__*/React__default.createElement("h4", null, /*#__PURE__*/React__default.createElement("label", null, selection.length, "/", allOptions.length, " Selected")), /*#__PURE__*/React__default.createElement(Button, {
@@ -48,10 +48,6 @@ var traverseReverse = function traverseReverse(eachElem, index, allElements, rot
48
48
  }
49
49
  };
50
50
  var checkForHoldingKey = function checkForHoldingKey(evt, key) {
51
- // possible key inputs: altKey,ctrlKey,metaKey,shiftKey
52
- if (key === 'cmd') {
53
- return evt.metaKey || evt.ctrlKey;
54
- }
55
51
  return evt[key];
56
52
  };
57
53
  var checkIsValid = function checkIsValid(item) {
@@ -8,7 +8,7 @@ import React, { Dispatch, PropsWithChildren, ReactNode, SetStateAction } from 'r
8
8
  import { ExperimentalSecondarySubmit } from './CreateTearsheetStep';
9
9
  export interface StepsContextType {
10
10
  currentStep: number;
11
- setExperimentalSecondarySubmit: Dispatch<SetStateAction<ExperimentalSecondarySubmit>>;
11
+ setExperimentalSecondarySubmit: Dispatch<SetStateAction<ExperimentalSecondarySubmit | undefined>>;
12
12
  setIsDisabled: Dispatch<SetStateAction<boolean>>;
13
13
  setOnPrevious: (fn: any) => void;
14
14
  setOnNext: (fn: any) => void;
@@ -105,7 +105,7 @@ var CreateTearsheet = /*#__PURE__*/forwardRef(function (_ref, ref) {
105
105
  _useState24 = _slicedToArray(_useState23, 2),
106
106
  lastIncludedStep = _useState24[0],
107
107
  setLastIncludedStep = _useState24[1];
108
- var _useState25 = useState({}),
108
+ var _useState25 = useState(),
109
109
  _useState26 = _slicedToArray(_useState25, 2),
110
110
  experimentalSecondarySubmit = _useState26[0],
111
111
  setExperimentalSecondarySubmit = _useState26[1];
@@ -176,7 +176,7 @@ var CreateTearsheet = /*#__PURE__*/forwardRef(function (_ref, ref) {
176
176
  isSubmitting: isSubmitting,
177
177
  componentBlockClass: blockClass,
178
178
  experimentalSecondarySubmit: experimentalSecondarySubmit,
179
- experimentalSecondarySubmitText: experimentalSecondarySubmit.labelText ? experimentalSecondarySubmit.labelText : experimentalSecondarySubmitText,
179
+ experimentalSecondarySubmitText: experimentalSecondarySubmit !== null && experimentalSecondarySubmit !== void 0 && experimentalSecondarySubmit.labelText ? experimentalSecondarySubmit.labelText : experimentalSecondarySubmitText,
180
180
  setCreateComponentActions: setCreateTearsheetActions
181
181
  });
182
182
  return /*#__PURE__*/React__default.createElement(TearsheetShell, _extends({}, getDevtoolsProps(componentName), rest, {
@@ -196,7 +196,8 @@ var CreateTearsheet = /*#__PURE__*/forwardRef(function (_ref, ref) {
196
196
  slug: slug,
197
197
  title: title,
198
198
  verticalPosition: verticalPosition,
199
- closeIconDescription: ''
199
+ closeIconDescription: '',
200
+ currentStep: currentStep
200
201
  }), /*#__PURE__*/React__default.createElement("div", {
201
202
  className: "".concat(blockClass, "__content"),
202
203
  ref: contentRef
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { forwardRef, useRef, useContext, useState, useEffect, isValidElement } from 'react';
10
10
  import PropTypes from '../../_virtual/index.js';
11
11
  import cx from 'classnames';
@@ -82,7 +82,7 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
82
82
  useEffect(function () {
83
83
  if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep) && (previousState === null || previousState === void 0 ? void 0 : previousState.currentStep) !== (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
84
84
  stepsContext === null || stepsContext === void 0 || stepsContext.setOnMount(onMount);
85
- stepsContext === null || stepsContext === void 0 || stepsContext.setExperimentalSecondarySubmit(_objectSpread2({}, experimentalSecondarySubmit));
85
+ stepsContext === null || stepsContext === void 0 || stepsContext.setExperimentalSecondarySubmit(experimentalSecondarySubmit);
86
86
  }
87
87
  }, [onMount, experimentalSecondarySubmit, stepsContext, stepNumber, previousState === null || previousState === void 0 ? void 0 : previousState.currentStep]);
88
88
 
@@ -118,8 +118,11 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
118
118
  stepsContext.setIsDisabled(!!disableSubmit);
119
119
  stepsContext === null || stepsContext === void 0 || stepsContext.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
120
120
  stepsContext === null || stepsContext === void 0 || stepsContext.setOnPrevious(onPrevious);
121
+
122
+ //Handle props for experimentalSecondarySubmit button, depending on state change
123
+ stepsContext === null || stepsContext === void 0 || stepsContext.setExperimentalSecondarySubmit(experimentalSecondarySubmit);
121
124
  }
122
- }, [stepsContext, stepNumber, disableSubmit, onNext, onPrevious, stepRef, stepRefValue]);
125
+ }, [stepsContext, stepNumber, disableSubmit, onNext, onPrevious, stepRef, stepRefValue, experimentalSecondarySubmit]);
123
126
  var renderDescription = function renderDescription() {
124
127
  if (description) {
125
128
  if (typeof description === 'string') {