@carbon/ibm-products 2.12.0 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (364) hide show
  1. package/css/index-full-carbon.css +3485 -3237
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -10
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +464 -696
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -4
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +1041 -991
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -8
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +1419 -1437
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -8
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/APIKeyModal/APIKeyDownloader.js +7 -5
  18. package/es/components/APIKeyModal/APIKeyModal.js +7 -5
  19. package/es/components/Checklist/Checklist.docs-page.js +13 -0
  20. package/es/components/Checklist/Checklist.js +292 -0
  21. package/es/components/Checklist/ChecklistChart.js +98 -0
  22. package/es/components/Checklist/ChecklistIcon.js +107 -0
  23. package/es/components/Checklist/index.js +8 -0
  24. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -3
  25. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -5
  26. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +1 -3
  27. package/es/components/Datagrid/Datagrid/DatagridRow.js +2 -6
  28. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -3
  29. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +1 -1
  30. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +1 -3
  31. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +9 -8
  32. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +6 -12
  33. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +0 -5
  34. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +20 -6
  35. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +5 -4
  36. package/es/components/Datagrid/Datagrid.docs-page.js +1 -1
  37. package/es/components/Datagrid/useDisableSelectRows.js +1 -1
  38. package/es/components/Datagrid/useInlineEdit.js +1 -6
  39. package/es/components/Datagrid/useSelectRows.js +1 -1
  40. package/es/components/Datagrid/useSortableColumns.js +14 -25
  41. package/es/components/ImportModal/ImportModal.js +7 -5
  42. package/es/components/PageHeader/PageHeader.js +1 -1
  43. package/es/components/index.js +2 -1
  44. package/es/global/js/hooks/useCreateComponentFocus.js +7 -5
  45. package/es/global/js/hooks/useCreateComponentStepChange.js +42 -37
  46. package/es/global/js/package-settings.js +4 -2
  47. package/es/global/js/utils/getNodeTextContent.js +4 -0
  48. package/es/global/js/utils/story-helper.js +2 -1
  49. package/es/global/js/utils/test-helper.js +28 -17
  50. package/lib/components/APIKeyModal/APIKeyDownloader.js +10 -9
  51. package/lib/components/APIKeyModal/APIKeyModal.docs-page.js +3 -4
  52. package/lib/components/APIKeyModal/APIKeyModal.js +10 -9
  53. package/lib/components/AboutModal/AboutModal.docs-page.js +3 -4
  54. package/lib/components/AboutModal/AboutModal.js +3 -4
  55. package/lib/components/ActionBar/ActionBar.js +3 -4
  56. package/lib/components/ActionBar/ActionBarItem.js +1 -2
  57. package/lib/components/ActionBar/ActionBarOverflowItems.js +3 -4
  58. package/lib/components/ActionSet/ActionSet.js +1 -2
  59. package/lib/components/ActionSet/actions.js +4 -7
  60. package/lib/components/AddSelect/AddSelect.js +3 -4
  61. package/lib/components/AddSelect/AddSelectBody.js +3 -4
  62. package/lib/components/AddSelect/AddSelectBreadcrumbs.js +1 -2
  63. package/lib/components/AddSelect/AddSelectColumn.js +3 -4
  64. package/lib/components/AddSelect/AddSelectFilter.js +3 -4
  65. package/lib/components/AddSelect/AddSelectFormControl.js +1 -2
  66. package/lib/components/AddSelect/AddSelectList.js +1 -2
  67. package/lib/components/AddSelect/AddSelectMetaPanel.js +3 -4
  68. package/lib/components/AddSelect/AddSelectRow.js +3 -4
  69. package/lib/components/AddSelect/AddSelectSidebar.js +1 -2
  70. package/lib/components/AddSelect/AddSelectSort.js +1 -2
  71. package/lib/components/AddSelect/add-select-utils.js +5 -9
  72. package/lib/components/AddSelect/hooks/useFocus.js +1 -2
  73. package/lib/components/AddSelect/hooks/useItemSort.js +2 -3
  74. package/lib/components/AddSelect/hooks/useParentSelect.js +1 -2
  75. package/lib/components/AddSelect/hooks/usePath.js +1 -2
  76. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +3 -4
  77. package/lib/components/ButtonMenu/ButtonMenu.js +1 -2
  78. package/lib/components/ButtonMenu/ButtonMenuItem.js +1 -2
  79. package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +3 -4
  80. package/lib/components/Card/Card.js +3 -4
  81. package/lib/components/Card/CardFooter.js +1 -2
  82. package/lib/components/Card/CardHeader.js +1 -2
  83. package/lib/components/Cascade/Cascade.docs-page.js +3 -4
  84. package/lib/components/Cascade/Cascade.js +3 -4
  85. package/lib/components/Checklist/Checklist.docs-page.js +23 -0
  86. package/lib/components/Checklist/Checklist.js +297 -0
  87. package/lib/components/Checklist/ChecklistChart.js +99 -0
  88. package/lib/components/Checklist/ChecklistIcon.js +109 -0
  89. package/lib/components/Checklist/index.js +12 -0
  90. package/lib/components/ComboButton/ComboButton.js +3 -4
  91. package/lib/components/ComboButton/ComboButtonItem/index.js +1 -2
  92. package/lib/components/CreateFullPage/CreateFullPage.docs-page.js +3 -4
  93. package/lib/components/CreateFullPage/CreateFullPage.js +5 -8
  94. package/lib/components/CreateFullPage/CreateFullPageStep.js +3 -4
  95. package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -2
  96. package/lib/components/CreateModal/CreateModal.docs-page.js +3 -4
  97. package/lib/components/CreateModal/CreateModal.js +1 -2
  98. package/lib/components/CreateSidePanel/CreateSidePanel.docs-page.js +3 -4
  99. package/lib/components/CreateSidePanel/CreateSidePanel.js +1 -2
  100. package/lib/components/CreateTearsheet/CreateTearsheet.docs-page.js +3 -4
  101. package/lib/components/CreateTearsheet/CreateTearsheet.js +5 -8
  102. package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +3 -4
  103. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +3 -4
  104. package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +4 -5
  105. package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +4 -5
  106. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -2
  107. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +3 -4
  108. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +3 -4
  109. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +3 -4
  110. package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +2 -3
  111. package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +2 -3
  112. package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +2 -3
  113. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +2 -3
  114. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +2 -3
  115. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +2 -3
  116. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +2 -3
  117. package/lib/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +2 -3
  118. package/lib/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +2 -3
  119. package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +2 -3
  120. package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +2 -3
  121. package/lib/components/DataSpreadsheet/utils/generateData.js +2 -3
  122. package/lib/components/DataSpreadsheet/utils/getCellSize.js +2 -3
  123. package/lib/components/DataSpreadsheet/utils/getSelectionAreaPoints.js +2 -3
  124. package/lib/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +2 -3
  125. package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +2 -3
  126. package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +2 -3
  127. package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +2 -3
  128. package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +2 -3
  129. package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +2 -3
  130. package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +4 -7
  131. package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +2 -3
  132. package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +2 -3
  133. package/lib/components/DataSpreadsheet/utils/selectAllCells.js +2 -3
  134. package/lib/components/Datagrid/Datagrid/Datagrid.js +1 -2
  135. package/lib/components/Datagrid/Datagrid/DatagridBody.js +1 -2
  136. package/lib/components/Datagrid/Datagrid/DatagridContent.js +3 -4
  137. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -5
  138. package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +1 -2
  139. package/lib/components/Datagrid/Datagrid/DatagridHead.js +1 -2
  140. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -9
  141. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +2 -5
  142. package/lib/components/Datagrid/Datagrid/DatagridRow.js +3 -8
  143. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -5
  144. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -4
  145. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +2 -5
  146. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +4 -5
  147. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +4 -7
  148. package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -2
  149. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +3 -4
  150. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +3 -4
  151. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +3 -4
  152. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +3 -4
  153. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +10 -10
  154. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +3 -4
  155. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +2 -3
  156. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +3 -4
  157. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +4 -6
  158. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +5 -8
  159. package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +3 -4
  160. package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +13 -26
  161. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
  162. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +4 -6
  163. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
  164. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
  165. package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +4 -7
  166. package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +2 -3
  167. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +7 -14
  168. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +3 -9
  169. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +4 -6
  170. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +2 -3
  171. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +2 -3
  172. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +2 -3
  173. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +2 -3
  174. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +2 -3
  175. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +26 -13
  176. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +9 -6
  177. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +5 -9
  178. package/lib/components/Datagrid/Datagrid.docs-page.js +5 -6
  179. package/lib/components/Datagrid/Datagrid.stories/CustomizeColumnStory.js +2 -3
  180. package/lib/components/Datagrid/Datagrid.stories/RowSizeDropdownStory.js +2 -3
  181. package/lib/components/Datagrid/Datagrid.stories/SelectAllWithToggleStory.js +2 -3
  182. package/lib/components/Datagrid/Datagrid.stories/common.js +4 -7
  183. package/lib/components/Datagrid/Extensions/ColumnAlignment/ColumnAlignment.docs-page.js +2 -3
  184. package/lib/components/Datagrid/Extensions/ColumnCustomization/ColumnCustomization.docs-page.js +2 -3
  185. package/lib/components/Datagrid/Extensions/EditableCell/EditableCell.docs-page.js +2 -3
  186. package/lib/components/Datagrid/Extensions/ExpandableRow/ExpandableRow.docs-page.js +2 -3
  187. package/lib/components/Datagrid/Extensions/Filtering/Filtering.docs-page.js +2 -3
  188. package/lib/components/Datagrid/Extensions/RowActionButtons/RowActionButtons.docs-page.js +2 -3
  189. package/lib/components/Datagrid/common-column-ids.js +1 -2
  190. package/lib/components/Datagrid/useActionsColumn.js +3 -4
  191. package/lib/components/Datagrid/useColumnCenterAlign.js +1 -2
  192. package/lib/components/Datagrid/useColumnOrder.js +1 -2
  193. package/lib/components/Datagrid/useColumnRightAlign.js +1 -2
  194. package/lib/components/Datagrid/useCustomizeColumns.js +3 -4
  195. package/lib/components/Datagrid/useDatagrid.js +1 -2
  196. package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -2
  197. package/lib/components/Datagrid/useDisableSelectRows.js +2 -3
  198. package/lib/components/Datagrid/useEditableCell.js +1 -2
  199. package/lib/components/Datagrid/useExpandedRow.js +1 -2
  200. package/lib/components/Datagrid/useFiltering.js +1 -2
  201. package/lib/components/Datagrid/useFlexResize.js +1 -2
  202. package/lib/components/Datagrid/useFloatingScroll.js +1 -2
  203. package/lib/components/Datagrid/useInfiniteScroll.js +1 -2
  204. package/lib/components/Datagrid/useInlineEdit.js +4 -10
  205. package/lib/components/Datagrid/useNestedRowExpander.js +3 -4
  206. package/lib/components/Datagrid/useNestedRows.js +1 -2
  207. package/lib/components/Datagrid/useOnRowClick.js +1 -2
  208. package/lib/components/Datagrid/useParentDimensions.js +1 -2
  209. package/lib/components/Datagrid/useResizeTable.js +1 -2
  210. package/lib/components/Datagrid/useRowExpander.js +3 -4
  211. package/lib/components/Datagrid/useRowIsMouseOver.js +1 -2
  212. package/lib/components/Datagrid/useRowRenderer.js +1 -2
  213. package/lib/components/Datagrid/useRowSize.js +1 -2
  214. package/lib/components/Datagrid/useSelectAllToggle.js +3 -4
  215. package/lib/components/Datagrid/useSelectRows.js +4 -5
  216. package/lib/components/Datagrid/useSkeletonRows.js +1 -2
  217. package/lib/components/Datagrid/useSortableColumns.js +15 -27
  218. package/lib/components/Datagrid/useStickyColumn.js +1 -2
  219. package/lib/components/Datagrid/utils/DatagridActions.js +4 -5
  220. package/lib/components/Datagrid/utils/DatagridPagination.js +2 -3
  221. package/lib/components/Datagrid/utils/Wrapper.js +2 -3
  222. package/lib/components/Datagrid/utils/getArgTypes.js +2 -3
  223. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +2 -3
  224. package/lib/components/Datagrid/utils/getInlineEditColumns.js +3 -5
  225. package/lib/components/Datagrid/utils/makeData.js +3 -6
  226. package/lib/components/EditFullPage/EditFullPage.docs-page.js +3 -4
  227. package/lib/components/EditFullPage/EditFullPage.js +1 -2
  228. package/lib/components/EditInPlace/EditInPlace.js +4 -6
  229. package/lib/components/EditSidePanel/EditSidePanel.js +1 -2
  230. package/lib/components/EditTearsheet/EditTearsheet.docs-page.js +3 -4
  231. package/lib/components/EditTearsheet/EditTearsheet.js +5 -8
  232. package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -4
  233. package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +4 -5
  234. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +1 -2
  235. package/lib/components/EditUpdateCards/EditUpdateCards.js +1 -2
  236. package/lib/components/EmptyStates/EmptyState.js +2 -4
  237. package/lib/components/EmptyStates/EmptyStateContent.js +1 -2
  238. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -2
  239. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  240. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -2
  241. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -2
  242. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -2
  243. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  244. package/lib/components/EmptyStates/assets/ErrorIllustration.js +1 -2
  245. package/lib/components/EmptyStates/assets/NoDataIllustration.js +1 -2
  246. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +1 -2
  247. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +1 -2
  248. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +1 -2
  249. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +1 -2
  250. package/lib/components/ExampleComponent/ExampleComponent.docs-page.js +3 -4
  251. package/lib/components/ExampleComponent/ExampleComponent.js +3 -4
  252. package/lib/components/ExampleComponent/ExampleDeprecatedComponent.js +1 -2
  253. package/lib/components/ExampleComponent/useExample.js +1 -2
  254. package/lib/components/ExportModal/ExportModal.js +3 -4
  255. package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -4
  256. package/lib/components/FilterSummary/FilterSummary.js +1 -2
  257. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -2
  258. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -2
  259. package/lib/components/HTTPErrors/HTTPErrorContent.js +1 -2
  260. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -2
  261. package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +1 -2
  262. package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +1 -2
  263. package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +1 -2
  264. package/lib/components/ImportModal/ImportModal.docs-page.js +1 -2
  265. package/lib/components/ImportModal/ImportModal.js +10 -9
  266. package/lib/components/MultiAddSelect/MultiAddSelect.docs-page.js +1 -2
  267. package/lib/components/MultiAddSelect/MultiAddSelect.js +3 -4
  268. package/lib/components/NotificationsPanel/NotificationsPanel.js +3 -4
  269. package/lib/components/NotificationsPanel/NotificationsPanel_data.js +1 -2
  270. package/lib/components/NotificationsPanel/preview-components/UnreadNotificationBell.js +2 -3
  271. package/lib/components/NotificationsPanel/utils.js +1 -2
  272. package/lib/components/OptionsTile/OptionsTile.js +3 -4
  273. package/lib/components/PageHeader/PageHeader.js +5 -7
  274. package/lib/components/PageHeader/PageHeaderDemo.data.js +3 -4
  275. package/lib/components/PageHeader/PageHeaderTitle.js +2 -4
  276. package/lib/components/PageHeader/PageHeaderUtils.js +5 -9
  277. package/lib/components/ProductiveCard/ProductiveCard.js +3 -4
  278. package/lib/components/RemoveModal/RemoveModal.docs-page.js +1 -2
  279. package/lib/components/RemoveModal/RemoveModal.js +3 -4
  280. package/lib/components/Saving/Saving.js +3 -4
  281. package/lib/components/SidePanel/SidePanel.js +3 -4
  282. package/lib/components/SidePanel/constants.js +2 -3
  283. package/lib/components/SidePanel/motion/variants.js +3 -5
  284. package/lib/components/SimpleHeader/SimpleHeader.docs-page.js +3 -4
  285. package/lib/components/SimpleHeader/SimpleHeader.js +4 -6
  286. package/lib/components/SingleAddSelect/SingleAddSelect.docs-page.js +1 -2
  287. package/lib/components/SingleAddSelect/SingleAddSelect.js +3 -4
  288. package/lib/components/StatusIcon/StatusIcon.docs-page.js +3 -4
  289. package/lib/components/StatusIcon/StatusIcon.js +3 -4
  290. package/lib/components/TagSet/TagSet.js +5 -8
  291. package/lib/components/TagSet/TagSetModal.js +3 -4
  292. package/lib/components/TagSet/TagSetOverflow.js +3 -4
  293. package/lib/components/TagSet/constants.js +2 -3
  294. package/lib/components/Tearsheet/Tearsheet.js +2 -4
  295. package/lib/components/Tearsheet/TearsheetNarrow.js +2 -4
  296. package/lib/components/Tearsheet/TearsheetShell.js +8 -14
  297. package/lib/components/Toolbar/Toolbar.docs-page.js +3 -4
  298. package/lib/components/Toolbar/Toolbar.js +6 -10
  299. package/lib/components/Toolbar/ToolbarButton.js +4 -6
  300. package/lib/components/Toolbar/ToolbarGroup.js +3 -4
  301. package/lib/components/TooltipTrigger/TooltipTrigger.js +1 -2
  302. package/lib/components/TooltipTrigger/useExample.js +1 -2
  303. package/lib/components/UserProfileImage/UserProfileImage.docs-page.js +3 -4
  304. package/lib/components/UserProfileImage/UserProfileImage.js +1 -2
  305. package/lib/components/WebTerminal/WebTerminal.docs-page.js +3 -4
  306. package/lib/components/WebTerminal/WebTerminal.js +3 -4
  307. package/lib/components/WebTerminal/WebTerminalContentWrapper.js +1 -2
  308. package/lib/components/WebTerminal/hooks/index.js +6 -9
  309. package/lib/components/WebTerminal/preview-components/Navigation.js +1 -2
  310. package/lib/components/WebTerminal/preview-components/documentationLinks.js +2 -3
  311. package/lib/components/_Canary/Canary.js +1 -2
  312. package/lib/components/index.js +8 -1
  313. package/lib/global/decorators/sidePanelDecorator.js +2 -3
  314. package/lib/global/js/hooks/useActiveElement.js +2 -3
  315. package/lib/global/js/hooks/useClickOutside.js +2 -3
  316. package/lib/global/js/hooks/useCreateComponentFocus.js +9 -8
  317. package/lib/global/js/hooks/useCreateComponentStepChange.js +44 -40
  318. package/lib/global/js/hooks/usePortalTarget.js +2 -3
  319. package/lib/global/js/hooks/usePreviousValue.js +2 -3
  320. package/lib/global/js/hooks/useResetCreateComponent.js +2 -3
  321. package/lib/global/js/hooks/useResizeObserver.js +2 -3
  322. package/lib/global/js/hooks/useRetrieveFormTitles.js +2 -3
  323. package/lib/global/js/hooks/useRetrieveStepData.js +2 -3
  324. package/lib/global/js/hooks/useValidCreateStepCount.js +2 -3
  325. package/lib/global/js/hooks/useWindowResize.js +2 -3
  326. package/lib/global/js/package-settings.js +6 -5
  327. package/lib/global/js/utils/ClickListener.js +3 -4
  328. package/lib/global/js/utils/DisplayBox.js +1 -2
  329. package/lib/global/js/utils/StoryDocsPage.js +2 -4
  330. package/lib/global/js/utils/Wrap.js +1 -2
  331. package/lib/global/js/utils/deepCloneObject.js +2 -3
  332. package/lib/global/js/utils/devtools.js +1 -2
  333. package/lib/global/js/utils/getBezierValues.js +2 -3
  334. package/lib/global/js/utils/getFocusableElements.js +2 -3
  335. package/lib/global/js/utils/getNodeTextContent.js +6 -3
  336. package/lib/global/js/utils/getNumberOfHiddenSteps.js +2 -3
  337. package/lib/global/js/utils/getScrollbarWidth.js +2 -3
  338. package/lib/global/js/utils/keyboardNavigation.js +4 -8
  339. package/lib/global/js/utils/lastIndexInArray.js +2 -3
  340. package/lib/global/js/utils/motionConstants.js +4 -5
  341. package/lib/global/js/utils/pconsole.js +8 -15
  342. package/lib/global/js/utils/props-helper.js +7 -14
  343. package/lib/global/js/utils/rangeWithCallback.js +2 -3
  344. package/lib/global/js/utils/scrollableAncestor.js +2 -3
  345. package/lib/global/js/utils/story-helper.js +15 -26
  346. package/lib/global/js/utils/test-helper.js +39 -42
  347. package/lib/global/js/utils/unwrap-if-fragment.js +1 -2
  348. package/lib/global/js/utils/uuidv4.js +1 -2
  349. package/lib/global/js/utils/wait.js +1 -2
  350. package/lib/global/js/utils/wrapFocus.js +1 -2
  351. package/lib/settings.js +2 -4
  352. package/package.json +6 -6
  353. package/scss/components/AboutModal/_about-modal.scss +1 -2
  354. package/scss/components/Checklist/_checklist.scss +217 -0
  355. package/scss/components/Checklist/_index.scss +8 -0
  356. package/scss/components/Checklist/_storybook-styles.scss +13 -0
  357. package/scss/components/CreateFullPage/_storybook-styles.scss +1 -1
  358. package/scss/components/Datagrid/_datagrid.scss +1 -0
  359. package/scss/components/Datagrid/styles/_datagrid.scss +1 -2
  360. package/scss/components/Datagrid/styles/_useInlineEdit.scss +8 -11
  361. package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +5 -0
  362. package/scss/components/_index.scss +2 -1
  363. package/es/components/Datagrid/utils/getColTitle.js +0 -25
  364. package/lib/components/Datagrid/utils/getColTitle.js +0 -32
@@ -15,9 +15,9 @@ import { Checkbox } from '@carbon/react';
15
15
  import { isColumnVisible } from './common';
16
16
  import DraggableElement from '../../DraggableElement';
17
17
  import { pkg } from '../../../../../settings';
18
- import getColTitle from '../../../utils/getColTitle';
19
18
  import { DndContext, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from '@dnd-kit/core';
20
19
  import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
20
+ import { getNodeTextContent } from '../../../../../global/js/utils/getNodeTextContent';
21
21
  var blockClass = "".concat(pkg.prefix, "--datagrid");
22
22
  var matchedColsById = function matchedColsById(col1, col2) {
23
23
  return col1 && col2 && col1.id === col2.id;
@@ -33,12 +33,13 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
33
33
  var visibleCols = columns
34
34
  // hide the columns without Header, e.g the sticky actions, spacer
35
35
  .filter(function (colDef) {
36
- return !!getColTitle(colDef);
36
+ return getNodeTextContent(colDef.Header).trim().length !== 0;
37
37
  }).filter(Boolean).filter(function (colDef) {
38
38
  return !colDef.isAction;
39
39
  }).filter(function (colDef) {
40
- var _getColTitle;
41
- return filterString.length === 0 || ((_getColTitle = getColTitle(colDef)) === null || _getColTitle === void 0 ? void 0 : _getColTitle.toLowerCase().includes(filterString)) && colDef.id !== 'spacer';
40
+ return colDef.id !== 'spacer';
41
+ }).filter(function (colDef) {
42
+ return filterString.length === 0 || getNodeTextContent(colDef.Header).toLowerCase().includes(filterString);
42
43
  });
43
44
  var getUpdatedDragCols = function getUpdatedDragCols() {
44
45
  var tempCols = _toConsumableArray(visibleCols);
@@ -71,7 +72,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
71
72
  var toVisibleIndex = columns.findIndex(function (col) {
72
73
  return matchedColsById(col, over);
73
74
  });
74
- var colTitle = getColTitle(updatedDragCols[fromVisibleIndex]);
75
+ var colTitle = getNodeTextContent(updatedDragCols[fromVisibleIndex].Header);
75
76
  setAriaRegionText("".concat(colTitle, " dropped. New position ").concat(toVisibleIndex + 1, " of ").concat(updatedDragCols.length, "."));
76
77
  var fromIndex = columns.findIndex(function (col) {
77
78
  return matchedColsById(col, active);
@@ -86,7 +87,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
86
87
  var fromIndex = updatedDragCols.findIndex(function (col) {
87
88
  return matchedColsById(col, active);
88
89
  });
89
- var colTitle = getColTitle(updatedDragCols[fromIndex]);
90
+ var colTitle = getNodeTextContent(updatedDragCols[fromIndex].Header);
90
91
  setAriaRegionText("".concat(colTitle, " grabbed. Current position ").concat(fromIndex + 1, " of ").concat(updatedDragCols.length, "."));
91
92
  };
92
93
  var handleDragUpdate = function handleDragUpdate(event) {
@@ -98,7 +99,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
98
99
  var toIndex = updatedDragCols.findIndex(function (col) {
99
100
  return matchedColsById(col, over);
100
101
  });
101
- var colTitle = getColTitle(updatedDragCols[fromIndex]);
102
+ var colTitle = getNodeTextContent(updatedDragCols[fromIndex].Header);
102
103
  setAriaRegionText("".concat(colTitle, " grabbed. Original position ").concat(fromIndex + 1, ", new position ").concat(toIndex + 1, " of ").concat(updatedDragCols.length, "."));
103
104
  };
104
105
  var pointerSensor = useSensor(PointerSensor, {
@@ -161,7 +162,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
161
162
  items: updatedDragCols,
162
163
  strategy: verticalListSortingStrategy
163
164
  }, visibleCols.map(function (colDef) {
164
- var colHeaderTitle = getColTitle(colDef);
165
+ var colHeaderTitle = getNodeTextContent(colDef.Header);
165
166
  var searchString = new RegExp('(' + filterString + ')');
166
167
  var res = filterString.length ? colHeaderTitle.toLowerCase().split(searchString) : null;
167
168
  var firstWord = res !== null ? res[0] === '' ? res[1].charAt(0).toUpperCase() + res[1].substring(1) : res[0].charAt(0).toUpperCase() + res[0].substring(1) : null;
@@ -1,10 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- /*
3
- * Licensed Materials - Property of IBM
4
- * 5724-Q36
5
- * (c) Copyright IBM Corp. 2022
6
- * US Government Users Restricted Rights - Use, duplication or disclosure
7
- * restricted by GSA ADP Schedule Contract with IBM Corp.
2
+ /**
3
+ * Copyright IBM Corp. 2022, 2023
4
+ *
5
+ * This source code is licensed under the Apache-2.0 license found in the
6
+ * LICENSE file in the root directory of this source tree.
8
7
  */
9
8
 
10
9
  import React from 'react';
@@ -22,12 +21,9 @@ export var InlineEditButton = function InlineEditButton(_ref) {
22
21
  nonEditCell = _ref.nonEditCell,
23
22
  isActiveCell = _ref.isActiveCell,
24
23
  columnConfig = _ref.columnConfig,
25
- totalInlineEditColumns = _ref.totalInlineEditColumns,
26
- totalColumns = _ref.totalColumns,
27
24
  type = _ref.type;
28
- var inlineEditColsLessThanHalfOfTotal = totalInlineEditColumns < totalColumns / 2;
29
25
  return /*#__PURE__*/React.createElement("div", {
30
- className: cx("".concat(blockClass, "__inline-edit-button"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--disabled"), disabled || nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--with-label-icon"), LabelIcon), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--non-edit"), nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--active"), isActiveCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--edit-less-than-half-of-total-cols"), inlineEditColsLessThanHalfOfTotal), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--").concat(type), type === 'date' || type === 'selection'), _cx)),
26
+ className: cx("".concat(blockClass, "__inline-edit-button"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--disabled"), disabled || nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--with-label-icon"), LabelIcon), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--non-edit"), nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--active"), isActiveCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--").concat(type), type === 'date' || type === 'selection'), _cx)),
31
27
  tabIndex: isActiveCell ? 0 : -1,
32
28
  "data-disabled": disabled || nonEditCell,
33
29
  "aria-disabled": disabled || nonEditCell,
@@ -52,8 +48,6 @@ InlineEditButton.propTypes = {
52
48
  nonEditCell: PropTypes.bool,
53
49
  placeholder: PropTypes.string,
54
50
  renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
55
- totalColumns: PropTypes.number,
56
- totalInlineEditColumns: PropTypes.number,
57
51
  type: PropTypes.oneOf(['text', 'number', 'selection', 'date']),
58
52
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
59
53
  };
@@ -33,14 +33,12 @@ export var InlineEditCell = function InlineEditCell(_ref) {
33
33
  value = _ref.value,
34
34
  _ref$nonEditCell = _ref.nonEditCell,
35
35
  nonEditCell = _ref$nonEditCell === void 0 ? false : _ref$nonEditCell,
36
- totalInlineEditColumns = _ref.totalInlineEditColumns,
37
36
  type = _ref.type;
38
37
  var columnId = cell.column.id;
39
38
  var columnIndex = instance.columns.findIndex(function (col) {
40
39
  return col.id === columnId;
41
40
  });
42
41
  var cellId = "column-".concat(columnIndex, "-row-").concat(cell.row.index);
43
- var totalColumns = instance.columns.length;
44
42
  var _useContext = useContext(InlineEditContext),
45
43
  state = _useContext.state,
46
44
  dispatch = _useContext.dispatch;
@@ -450,8 +448,6 @@ export var InlineEditCell = function InlineEditCell(_ref) {
450
448
  tabIndex: tabIndex,
451
449
  nonEditCell: nonEditCell,
452
450
  columnConfig: cell.column,
453
- totalInlineEditColumns: totalInlineEditColumns,
454
- totalColumns: totalColumns,
455
451
  type: type
456
452
  }), !nonEditCell && inEditMode && cellId === activeCellId && /*#__PURE__*/React.createElement(React.Fragment, null, type === 'text' && renderTextInput(), type === 'number' && renderNumberInput(), type === 'selection' && renderSelectCell(), type === 'date' && renderDateCell()))
457
453
  );
@@ -469,7 +465,6 @@ InlineEditCell.propTypes = {
469
465
  nonEditCell: PropTypes.bool,
470
466
  placeholder: PropTypes.string,
471
467
  tabIndex: PropTypes.number,
472
- totalInlineEditColumns: PropTypes.number,
473
468
  type: PropTypes.oneOf(['text', 'number', 'selection', 'date']),
474
469
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.object])
475
470
  };
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
5
  var _excluded = ["align", "legendText"];
@@ -9,19 +10,21 @@ var _excluded = ["align", "legendText"];
9
10
  * LICENSE file in the root directory of this source tree.
10
11
  */
11
12
 
12
- import * as React from 'react';
13
+ import React, { useEffect, useRef } from 'react';
13
14
  import PropTypes from 'prop-types';
14
15
  import { Settings } from '@carbon/react/icons';
15
16
  import { IconButton, Layer, Popover, PopoverContent } from '@carbon/react';
17
+ import cx from 'classnames';
16
18
  import RowSizeRadioGroup from './RowSizeRadioGroup';
17
- import { pkg } from '../../../../../settings';
19
+ import { pkg, carbon } from '../../../../../settings';
18
20
  var blockClass = "".concat(pkg.prefix, "--datagrid__row-size");
19
21
  var RowSizeDropdown = function RowSizeDropdown(_ref) {
20
22
  var _ref$align = _ref.align,
21
23
  align = _ref$align === void 0 ? 'bottom-right' : _ref$align,
22
24
  _ref$legendText = _ref.legendText,
23
- legendText = _ref$legendText === void 0 ? 'Row height' : _ref$legendText,
25
+ legendText = _ref$legendText === void 0 ? 'Row settings' : _ref$legendText,
24
26
  props = _objectWithoutProperties(_ref, _excluded);
27
+ var radioGroupRef = useRef();
25
28
  var _React$useState = React.useState(false),
26
29
  _React$useState2 = _slicedToArray(_React$useState, 2),
27
30
  isOpen = _React$useState2[0],
@@ -39,8 +42,17 @@ var RowSizeDropdown = function RowSizeDropdown(_ref) {
39
42
  onCloseHandler();
40
43
  }
41
44
  };
45
+ useEffect(function () {
46
+ if (isOpen) {
47
+ var radioGroupParentElement = radioGroupRef === null || radioGroupRef === void 0 ? void 0 : radioGroupRef.current;
48
+ var checkedRadioChild = radioGroupParentElement === null || radioGroupParentElement === void 0 ? void 0 : radioGroupParentElement.querySelector(".".concat(carbon.prefix, "--radio-button:checked"));
49
+ checkedRadioChild === null || checkedRadioChild === void 0 || checkedRadioChild.focus();
50
+ }
51
+ }, [isOpen]);
42
52
  var onClickHandler = function onClickHandler() {
43
- setIsOpen(!isOpen);
53
+ setIsOpen(function (prev) {
54
+ return !prev;
55
+ });
44
56
  };
45
57
  return /*#__PURE__*/React.createElement(Popover, {
46
58
  tabIndex: -1,
@@ -56,10 +68,12 @@ var RowSizeDropdown = function RowSizeDropdown(_ref) {
56
68
  kind: "ghost",
57
69
  onClick: onClickHandler,
58
70
  label: legendText,
59
- className: "".concat(blockClass, "-button")
71
+ className: cx("".concat(blockClass, "-button"), _defineProperty({}, "".concat(blockClass, "__row-settings-trigger--open"), isOpen))
60
72
  }, /*#__PURE__*/React.createElement(Settings, {
61
73
  size: 16
62
- })), /*#__PURE__*/React.createElement(PopoverContent, null, /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(RowSizeRadioGroup, _extends({}, props, {
74
+ })), /*#__PURE__*/React.createElement(PopoverContent, null, /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(RowSizeRadioGroup, _extends({
75
+ ref: radioGroupRef
76
+ }, props, {
63
77
  legendText: legendText
64
78
  })))));
65
79
  };
@@ -5,13 +5,13 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import React from 'react';
8
+ import React, { forwardRef } from 'react';
9
9
  import PropTypes from 'prop-types';
10
10
  import { RadioButtonGroup, RadioButton } from '@carbon/react';
11
11
  import isArray from 'lodash/isArray';
12
12
  import { pkg } from '../../../../../settings';
13
13
  var blockClass = "".concat(pkg.prefix, "--datagrid__row-size");
14
- var RowSizeRadioGroup = function RowSizeRadioGroup(_ref) {
14
+ var RowSizeRadioGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
15
15
  var rowSizes = _ref.rowSizes,
16
16
  selectedOption = _ref.selectedOption,
17
17
  datagridName = _ref.datagridName,
@@ -27,7 +27,8 @@ var RowSizeRadioGroup = function RowSizeRadioGroup(_ref) {
27
27
  } : _ref$rowSizeLabels;
28
28
  return /*#__PURE__*/React.createElement("div", {
29
29
  className: "".concat(blockClass, "-dropdown"),
30
- role: "presentation"
30
+ role: "presentation",
31
+ ref: ref
31
32
  }, /*#__PURE__*/React.createElement(RadioButtonGroup, {
32
33
  legendText: legendText,
33
34
  name: "row-height-group",
@@ -49,7 +50,7 @@ var RowSizeRadioGroup = function RowSizeRadioGroup(_ref) {
49
50
  id: "".concat(datagridName || 'datagrid', "--row-density--").concat(option.value)
50
51
  });
51
52
  })));
52
- };
53
+ });
53
54
  var getBackwardCompatibleRowSize = function getBackwardCompatibleRowSize(rowSize) {
54
55
  // TODO: deprecate this function in next major release (v8) on carbon-components-react
55
56
  var rowSizeMap = {
@@ -116,7 +116,7 @@ export var DocsPage = function DocsPage() {
116
116
  title: 'Sortable columns',
117
117
  description: "To add sortable columns to your Datagrid, simply add the `useSortableColumns` hook. This will allow each column header to be clickable and sort each column in either ascending or descending order.\n- Include `useSortableColumns` hook\n ",
118
118
  source: {
119
- code: "\nconst [data] = useState(makeData(10));\nconst columns = React.useMemo(() => getColumns(data), []);\nconst datagridState = useDatagrid(\n {\n columns,\n data,\n },\n useSortableColumns\n);\n\nreturn <Datagrid datagridState={datagridState} />;\n "
119
+ code: "\nconst [data] = useState(makeData(10));\nconst columns = React.useMemo(() => getColumns(data), []);\nconst datagridState = useDatagrid(\n {\n columns,\n data,\n ascendingSortableLabelText: 'none',\n descendingSortableLabelText: 'ascending',\n defaultSortableLabelText: 'descending',\n },\n useSortableColumns\n);\n\nreturn <Datagrid datagridState={datagridState} />;\n "
120
120
  }
121
121
  }, {
122
122
  title: 'Sticky column',
@@ -13,7 +13,7 @@ var useDisableSelectRows = function useDisableSelectRows(hooks) {
13
13
  var row = _ref.row,
14
14
  instance = _ref.instance;
15
15
  return [props, {
16
- selectDisabled: instance.shouldDisableSelectRow && instance.shouldDisableSelectRow(row)
16
+ disabled: instance.shouldDisableSelectRow && instance.shouldDisableSelectRow(row)
17
17
  }];
18
18
  };
19
19
  hooks.getRowProps.push(getRowProps);
@@ -21,14 +21,11 @@ var useInlineEdit = function useInlineEdit(hooks, usingEditableCell) {
21
21
  }
22
22
  }, [usingEditableCell]);
23
23
  var addInlineEdit = function addInlineEdit(props, _ref) {
24
- var _cell$column, _instance$columns$fil;
24
+ var _cell$column;
25
25
  var cell = _ref.cell,
26
26
  instance = _ref.instance;
27
27
  var columnInlineEditConfig = cell.column.inlineEdit;
28
28
  var inlineEditType = (_cell$column = cell.column) === null || _cell$column === void 0 || (_cell$column = _cell$column.inlineEdit) === null || _cell$column === void 0 ? void 0 : _cell$column.type;
29
- var totalInlineEditColumns = (_instance$columns$fil = instance.columns.filter(function (item) {
30
- return item.inlineEdit;
31
- })) === null || _instance$columns$fil === void 0 ? void 0 : _instance$columns$fil.length;
32
29
  var renderInlineEditComponent = function renderInlineEditComponent(type) {
33
30
  return /*#__PURE__*/React.createElement(InlineEditCell, {
34
31
  config: columnInlineEditConfig,
@@ -36,7 +33,6 @@ var useInlineEdit = function useInlineEdit(hooks, usingEditableCell) {
36
33
  value: cell.value,
37
34
  cell: cell,
38
35
  instance: instance,
39
- totalInlineEditColumns: totalInlineEditColumns,
40
36
  type: type
41
37
  });
42
38
  };
@@ -56,7 +52,6 @@ var useInlineEdit = function useInlineEdit(hooks, usingEditableCell) {
56
52
  instance: instance,
57
53
  disabled: true,
58
54
  nonEditCell: true,
59
- totalInlineEditColumns: totalInlineEditColumns,
60
55
  type: "text"
61
56
  }))
62
57
  }];
@@ -87,7 +87,7 @@ var SelectRow = function SelectRow(datagridState) {
87
87
  return window.removeEventListener('resize', updateSize);
88
88
  };
89
89
  }, []);
90
- var selectDisabled = isFetching || row.getRowProps().selectDisabled;
90
+ var selectDisabled = isFetching || row.getRowProps().disabled;
91
91
  var _row$getToggleRowSele = row.getToggleRowSelectedProps(),
92
92
  onChange = _row$getToggleRowSele.onChange,
93
93
  selectProps = _objectWithoutProperties(_row$getToggleRowSele, _excluded);
@@ -1,6 +1,5 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- import _extends from "@babel/runtime/helpers/extends";
4
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
5
  /**
@@ -15,6 +14,7 @@ import cx from 'classnames';
15
14
  import { pkg, carbon } from '../../settings';
16
15
  import { Button } from '@carbon/react';
17
16
  import { ArrowUp, ArrowDown, ArrowsVertical } from '@carbon/react/icons';
17
+ import { SelectAll } from './Datagrid/DatagridSelectAll';
18
18
  var blockClass = "".concat(pkg.prefix, "--datagrid");
19
19
  var ordering = {
20
20
  ASC: 'ASC',
@@ -32,13 +32,13 @@ var getAriaSortValue = function getAriaSortValue(col, _ref) {
32
32
  isSorted = _ref2.isSorted,
33
33
  isSortedDesc = _ref2.isSortedDesc;
34
34
  if (!isSorted) {
35
- return defaultSortableLabelText || 'none';
35
+ return defaultSortableLabelText;
36
36
  }
37
37
  if (isSorted && !isSortedDesc) {
38
- return ascendingSortableLabelText || 'ascending';
38
+ return ascendingSortableLabelText;
39
39
  }
40
40
  if (isSorted && isSortedDesc) {
41
- return descendingSortableLabelText || 'descending';
41
+ return descendingSortableLabelText;
42
42
  }
43
43
  };
44
44
  var getAriaPressedValue = function getAriaPressedValue(col) {
@@ -73,37 +73,26 @@ var useSortableColumns = function useSortableColumns(hooks) {
73
73
  };
74
74
  var sortableColumns = visibleColumns.map(function (column) {
75
75
  var icon = function icon(col, props) {
76
+ var iconProps = _objectSpread(_objectSpread({
77
+ size: 16
78
+ }, props), {}, {
79
+ className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
80
+ });
76
81
  if (col !== null && col !== void 0 && col.isSorted) {
77
82
  switch (col.isSortedDesc) {
78
83
  case false:
79
- return /*#__PURE__*/React.createElement(ArrowUp, _extends({
80
- size: 16
81
- }, props, {
82
- className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
83
- }));
84
+ return /*#__PURE__*/React.createElement(ArrowUp, iconProps);
84
85
  case true:
85
- return /*#__PURE__*/React.createElement(ArrowDown, _extends({
86
- size: 16
87
- }, props, {
88
- className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
89
- }));
86
+ return /*#__PURE__*/React.createElement(ArrowDown, iconProps);
90
87
  default:
91
- return /*#__PURE__*/React.createElement(ArrowsVertical, _extends({
92
- size: 16
93
- }, props, {
94
- className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
95
- }));
88
+ return /*#__PURE__*/React.createElement(ArrowsVertical, iconProps);
96
89
  }
97
90
  }
98
- return /*#__PURE__*/React.createElement(ArrowsVertical, _extends({
99
- size: 16
100
- }, props, {
101
- className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
102
- }));
91
+ return /*#__PURE__*/React.createElement(ArrowsVertical, iconProps);
103
92
  };
104
93
  var Header = function Header(headerProp) {
105
94
  var _cx;
106
- return column.disableSortBy === true ? column.Header : /*#__PURE__*/React.createElement(Button, {
95
+ return column.disableSortBy === true || column.id === 'datagridSelection' ? column.disableSortBy ? column.Header : /*#__PURE__*/React.createElement(SelectAll, instance) : /*#__PURE__*/React.createElement(Button, {
107
96
  "aria-sort": getAriaSortValue(headerProp === null || headerProp === void 0 ? void 0 : headerProp.column, {
108
97
  ascendingSortableLabelText: ascendingSortableLabelText,
109
98
  descendingSortableLabelText: descendingSortableLabelText,
@@ -31,7 +31,6 @@ var defaults = {
31
31
  accept: Object.freeze([])
32
32
  };
33
33
  export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
34
- var _ref2;
35
34
  var _ref$accept = _ref.accept,
36
35
  accept = _ref$accept === void 0 ? defaults.accept : _ref$accept,
37
36
  className = _ref.className,
@@ -112,8 +111,8 @@ export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
112
111
  var finalFiles = _toConsumableArray(updatedFiles);
113
112
  setFiles(finalFiles);
114
113
  };
115
- var fetchFile = function fetchFile(_x) {
116
- return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(evt) {
114
+ var fetchFile = /*#__PURE__*/function () {
115
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(evt) {
117
116
  var fileName, pendingFile, response, blob, fetchedFile, failedFile;
118
117
  return _regeneratorRuntime.wrap(function _callee$(_context) {
119
118
  while (1) switch (_context.prev = _context.next) {
@@ -161,8 +160,11 @@ export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
161
160
  return _context.stop();
162
161
  }
163
162
  }, _callee, null, [[4, 19]]);
164
- }))).apply(this, arguments);
165
- };
163
+ }));
164
+ return function fetchFile(_x) {
165
+ return _ref2.apply(this, arguments);
166
+ };
167
+ }();
166
168
  var onAddFile = function onAddFile(evt, _ref3) {
167
169
  var addedFiles = _ref3.addedFiles;
168
170
  evt.stopPropagation();
@@ -693,7 +693,7 @@ PageHeader.propTypes = _objectSpread({
693
693
  * Sitting just below the title is this optional subtitle that provides additional context to
694
694
  * identify the current page.
695
695
  */
696
- subtitle: PropTypes.string,
696
+ subtitle: PropTypes.node,
697
697
  /**
698
698
  * An array of tags to be shown as the final content in the PageHeader.
699
699
  *
@@ -41,4 +41,5 @@ export { Datagrid, useDatagrid, useInfiniteScroll, useNestedRows, useSelectRows,
41
41
  export { EditTearsheet, EditTearsheetForm } from './EditTearsheet';
42
42
  export { EditTearsheetNarrow } from './EditTearsheetNarrow';
43
43
  export { EditFullPage } from './EditFullPage';
44
- export { EditUpdateCards } from './EditUpdateCards';
44
+ export { EditUpdateCards } from './EditUpdateCards';
45
+ export { Checklist } from './Checklist';
@@ -23,10 +23,9 @@ export var useCreateComponentFocus = function useCreateComponentFocus(_ref) {
23
23
  }
24
24
  }, [onMount]);
25
25
  useEffect(function () {
26
- var _ref2;
27
26
  // because of how handleStackChange.claimFocus in TearsheetShell works a timeout is required to focus on specific elements
28
- var awaitFocus = function awaitFocus(_x) {
29
- return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(elm) {
27
+ var awaitFocus = /*#__PURE__*/function () {
28
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(elm) {
30
29
  return _regeneratorRuntime.wrap(function _callee$(_context) {
31
30
  while (1) switch (_context.prev = _context.next) {
32
31
  case 0:
@@ -39,8 +38,11 @@ export var useCreateComponentFocus = function useCreateComponentFocus(_ref) {
39
38
  return _context.stop();
40
39
  }
41
40
  }, _callee);
42
- }))).apply(this, arguments);
43
- };
41
+ }));
42
+ return function awaitFocus(_x) {
43
+ return _ref2.apply(this, arguments);
44
+ };
45
+ }();
44
46
  if ((previousState === null || previousState === void 0 ? void 0 : previousState.currentStep) !== currentStep && currentStep > 0) {
45
47
  if (firstFocusElement) {
46
48
  var elm = document.querySelector(firstFocusElement);
@@ -64,7 +64,6 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
64
64
 
65
65
  // useEffect to handle multi step logic
66
66
  useEffect(function () {
67
- var _ref2, _ref3, _ref4, _ref5;
68
67
  var onUnmount = function onUnmount() {
69
68
  if (componentName !== 'CreateFullPage') {
70
69
  setCurrentStep(0);
@@ -72,8 +71,8 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
72
71
  setIsSubmitting(false);
73
72
  onClose();
74
73
  };
75
- var handleOnRequestSubmit = function handleOnRequestSubmit() {
76
- return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
74
+ var handleOnRequestSubmit = /*#__PURE__*/function () {
75
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
77
76
  return _regeneratorRuntime.wrap(function _callee$(_context) {
78
77
  while (1) switch (_context.prev = _context.next) {
79
78
  case 0:
@@ -94,49 +93,49 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
94
93
  return _context.stop();
95
94
  }
96
95
  }, _callee, null, [[0, 6]]);
97
- }))).apply(this, arguments);
98
- };
99
- var handlePrevious = function handlePrevious() {
100
- return (_ref3 = _ref3 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
96
+ }));
97
+ return function handleOnRequestSubmit() {
98
+ return _ref2.apply(this, arguments);
99
+ };
100
+ }();
101
+ var handlePrevious = /*#__PURE__*/function () {
102
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
101
103
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
102
104
  while (1) switch (_context2.prev = _context2.next) {
103
105
  case 0:
104
- if (!(componentName === 'CreateFullPage')) {
105
- _context2.next = 2;
106
- break;
107
- }
108
- return _context2.abrupt("return");
109
- case 2:
110
- setLoadingPrevious(true);
106
+ setLoadingPrevious === null || setLoadingPrevious === void 0 || setLoadingPrevious(true);
111
107
  if (!(typeof onPrevious === 'function')) {
112
- _context2.next = 15;
108
+ _context2.next = 13;
113
109
  break;
114
110
  }
115
- _context2.prev = 4;
116
- _context2.next = 7;
111
+ _context2.prev = 2;
112
+ _context2.next = 5;
117
113
  return onPrevious();
118
- case 7:
114
+ case 5:
119
115
  moveToPreviousStep();
120
- _context2.next = 13;
116
+ _context2.next = 11;
121
117
  break;
122
- case 10:
123
- _context2.prev = 10;
124
- _context2.t0 = _context2["catch"](4);
118
+ case 8:
119
+ _context2.prev = 8;
120
+ _context2.t0 = _context2["catch"](2);
125
121
  console.warn("".concat(componentName, " onBack error: ").concat(_context2.t0));
126
- case 13:
127
- _context2.next = 16;
122
+ case 11:
123
+ _context2.next = 14;
128
124
  break;
129
- case 15:
125
+ case 13:
130
126
  moveToPreviousStep();
131
- case 16:
127
+ case 14:
132
128
  case "end":
133
129
  return _context2.stop();
134
130
  }
135
- }, _callee2, null, [[4, 10]]);
136
- }))).apply(this, arguments);
137
- };
138
- var handleNext = function handleNext() {
139
- return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
131
+ }, _callee2, null, [[2, 8]]);
132
+ }));
133
+ return function handlePrevious() {
134
+ return _ref3.apply(this, arguments);
135
+ };
136
+ }();
137
+ var handleNext = /*#__PURE__*/function () {
138
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
140
139
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
141
140
  while (1) switch (_context3.prev = _context3.next) {
142
141
  case 0:
@@ -167,10 +166,13 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
167
166
  return _context3.stop();
168
167
  }
169
168
  }, _callee3, null, [[2, 8]]);
170
- }))).apply(this, arguments);
171
- };
172
- var handleSubmit = function handleSubmit() {
173
- return (_ref5 = _ref5 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
169
+ }));
170
+ return function handleNext() {
171
+ return _ref4.apply(this, arguments);
172
+ };
173
+ }();
174
+ var handleSubmit = /*#__PURE__*/function () {
175
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
174
176
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
175
177
  while (1) switch (_context4.prev = _context4.next) {
176
178
  case 0:
@@ -205,8 +207,11 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
205
207
  return _context4.stop();
206
208
  }
207
209
  }, _callee4, null, [[2, 9]]);
208
- }))).apply(this, arguments);
209
- };
210
+ }));
211
+ return function handleSubmit() {
212
+ return _ref5.apply(this, arguments);
213
+ };
214
+ }();
210
215
  if ((stepData === null || stepData === void 0 ? void 0 : stepData.length) > 0) {
211
216
  var buttons = [];
212
217
  if ((stepData === null || stepData === void 0 ? void 0 : stepData.length) > 1) {
@@ -68,10 +68,12 @@ var defaults = {
68
68
  EditTearsheetForm: false,
69
69
  EditTearsheetNarrow: false,
70
70
  EditFullPage: false,
71
- EditUpdateCards: false
71
+ EditUpdateCards: false,
72
72
  /* new component flags here - comment used by generate CLI */
73
- },
74
73
 
74
+ // Novice to pro components not yet reviewed and released:
75
+ Checklist: false
76
+ },
75
77
  // feature level flags
76
78
  feature: {
77
79
  'default-portal-target-body': true,
@@ -40,6 +40,10 @@ export var getNodeTextContent = function getNodeTextContent(node) {
40
40
  // Ignore any other JavaScript 'object' types.
41
41
  return '';
42
42
  }
43
+ case 'function':
44
+ {
45
+ return getNodeTextContent(node());
46
+ }
43
47
  default:
44
48
  // Ignore all other JavaScript types.
45
49
  return '';
@@ -205,6 +205,7 @@ export var storyDocsGuidelines = function storyDocsGuidelines(csfFile) {
205
205
  * @returns "dark" or "light"
206
206
  */
207
207
  export var getSelectedCarbonTheme = function getSelectedCarbonTheme() {
208
- var themeId = document.querySelector('[storybook-carbon-theme]').getAttribute('storybook-carbon-theme');
208
+ var _document$querySelect;
209
+ var themeId = (_document$querySelect = document.querySelector('[storybook-carbon-theme]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute('storybook-carbon-theme');
209
210
  return themeId === 'g90' || themeId === 'g100' ? 'dark' : 'light';
210
211
  };