@carbon/ibm-products 2.0.0-rc.1 → 2.0.0-rc.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. package/README.md +2 -2
  2. package/css/index-full-carbon.css +1187 -325
  3. package/css/index-full-carbon.css.map +1 -1
  4. package/css/index-full-carbon.min.css +6 -8
  5. package/css/index-full-carbon.min.css.map +1 -1
  6. package/css/index-without-carbon-released-only.css +789 -171
  7. package/css/index-without-carbon-released-only.css.map +1 -1
  8. package/css/index-without-carbon-released-only.min.css +4 -8
  9. package/css/index-without-carbon-released-only.min.css.map +1 -1
  10. package/css/index-without-carbon.css +1068 -414
  11. package/css/index-without-carbon.css.map +1 -1
  12. package/css/index-without-carbon.min.css +6 -8
  13. package/css/index-without-carbon.min.css.map +1 -1
  14. package/css/index.css +981 -267
  15. package/css/index.css.map +1 -1
  16. package/css/index.min.css +6 -8
  17. package/css/index.min.css.map +1 -1
  18. package/es/components/APIKeyModal/APIKeyModal.js +1 -1
  19. package/es/components/ActionBar/ActionBarOverflowItems.js +1 -0
  20. package/es/components/ActionSet/ActionSet.js +7 -3
  21. package/es/components/AddSelect/AddSelect.js +6 -6
  22. package/es/components/AddSelect/AddSelectBody.js +72 -31
  23. package/es/components/AddSelect/AddSelectBreadcrumbs.js +12 -4
  24. package/es/components/AddSelect/AddSelectColumn.js +8 -8
  25. package/es/components/AddSelect/AddSelectFilter.js +10 -7
  26. package/es/components/AddSelect/AddSelectList.js +64 -29
  27. package/es/components/AddSelect/AddSelectMetaPanel.js +7 -1
  28. package/es/components/AddSelect/AddSelectSidebar.js +5 -2
  29. package/es/components/AddSelect/AddSelectSort.js +2 -2
  30. package/es/components/AddSelect/add-select-utils.js +9 -2
  31. package/es/components/AddSelect/hooks/useItemSort.js +6 -0
  32. package/es/components/AddSelect/hooks/useParentSelect.js +6 -0
  33. package/es/components/AddSelect/hooks/usePath.js +15 -1
  34. package/es/components/AddSelect/index.js +1 -1
  35. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -6
  36. package/es/components/Card/Card.js +16 -6
  37. package/es/components/Card/CardFooter.js +3 -1
  38. package/es/components/Card/CardHeader.js +20 -1
  39. package/es/components/ComboButton/ComboButton.js +1 -1
  40. package/es/components/CreateFullPage/CreateFullPage.js +4 -1
  41. package/es/components/CreateTearsheet/CreateTearsheet.js +8 -1
  42. package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
  43. package/es/components/DataSpreadsheet/DataSpreadsheet.js +64 -11
  44. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -1
  45. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +7 -0
  46. package/es/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +6 -5
  47. package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +40 -0
  48. package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +1 -1
  49. package/es/components/Datagrid/Datagrid/Datagrid.js +10 -38
  50. package/es/components/Datagrid/Datagrid/DatagridContent.js +154 -0
  51. package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +9 -1
  52. package/es/components/Datagrid/Datagrid/DatagridRow.js +53 -6
  53. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +10 -3
  54. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +13 -4
  55. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +9 -6
  56. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +2 -1
  57. package/es/components/Datagrid/Datagrid/DraggableElement.js +6 -2
  58. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +5 -45
  59. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +4 -1
  60. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +36 -10
  61. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +62 -26
  62. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +3 -2
  63. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +60 -0
  64. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/index.js +1 -0
  65. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +537 -0
  66. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/index.js +1 -0
  67. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +112 -0
  68. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +27 -0
  69. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/index.js +1 -0
  70. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +39 -0
  71. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +19 -0
  72. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +263 -0
  73. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +87 -0
  74. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +17 -14
  75. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +13 -36
  76. package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/CustomizeColumnStory.js +0 -0
  77. package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/LeftPanelStory.js +0 -0
  78. package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/RowSizeDropdownStory.js +0 -0
  79. package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/SelectAllWithToggleStory.js +0 -0
  80. package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/StickyActionsColumnStory.js +0 -0
  81. package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/common.js +0 -0
  82. package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/index.js +0 -0
  83. package/es/components/Datagrid/index.js +3 -1
  84. package/es/components/Datagrid/useActionsColumn.js +28 -12
  85. package/es/components/Datagrid/useColumnOrder.js +8 -0
  86. package/es/components/Datagrid/useCustomizeColumns.js +5 -0
  87. package/es/components/Datagrid/useDefaultStringRenderer.js +4 -1
  88. package/es/components/Datagrid/useDisableSelectRows.js +6 -2
  89. package/es/components/Datagrid/useExpandedRow.js +0 -1
  90. package/es/components/Datagrid/useInfiniteScroll.js +5 -2
  91. package/es/components/Datagrid/useInlineEdit.js +71 -0
  92. package/es/components/Datagrid/useNestedRowExpander.js +47 -0
  93. package/es/components/Datagrid/useNestedRows.js +16 -4
  94. package/es/components/Datagrid/useRowExpander.js +12 -4
  95. package/es/components/Datagrid/useRowSize.js +17 -6
  96. package/es/components/Datagrid/useSelectAllToggle.js +17 -4
  97. package/es/components/Datagrid/useSelectRows.js +12 -2
  98. package/es/components/Datagrid/useSortableColumns.js +1 -1
  99. package/es/components/Datagrid/useStickyColumn.js +11 -0
  100. package/es/components/Datagrid/utils/DatagridActions.js +236 -0
  101. package/es/components/Datagrid/utils/DatagridPagination.js +33 -0
  102. package/es/components/Datagrid/utils/Wrapper.js +21 -0
  103. package/es/components/Datagrid/utils/getArgTypes.js +89 -0
  104. package/es/components/Datagrid/utils/getInlineEditColumns.js +153 -0
  105. package/es/components/Datagrid/utils/makeData.js +47 -2
  106. package/es/components/EditUpdateCards/EditUpdateCards.js +144 -0
  107. package/es/components/EditUpdateCards/index.js +7 -0
  108. package/es/components/ExportModal/ExportModal.js +1 -1
  109. package/es/components/ImportModal/ImportModal.js +3 -3
  110. package/es/components/InlineEdit/InlineEdit.js +28 -426
  111. package/es/components/InlineEditV1/InlineEditV1.js +447 -0
  112. package/es/components/InlineEditV1/index.js +7 -0
  113. package/es/components/InlineEditV2/InlineEditV2.js +289 -0
  114. package/es/components/InlineEditV2/index.js +7 -0
  115. package/es/components/ModifiedTabs/ModifiedTabLabelNew.js +1 -1
  116. package/es/components/ModifiedTabs/ModifiedTabLabelWithClose.js +1 -1
  117. package/es/components/MultiAddSelect/MultiAddSelect.js +14 -7
  118. package/es/components/MultiAddSelect/index.js +6 -0
  119. package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
  120. package/es/components/OptionsTile/OptionsTile.js +29 -13
  121. package/es/components/PageHeader/PageHeader.js +4 -4
  122. package/es/components/PageHeader/PageHeaderTitle.js +1 -1
  123. package/es/components/ProductiveCard/ProductiveCard.js +5 -0
  124. package/es/components/RemoveModal/RemoveModal.js +20 -3
  125. package/es/components/Saving/Saving.js +1 -1
  126. package/es/components/SidePanel/SidePanel.js +45 -52
  127. package/es/components/SidePanel/motion/variants.js +45 -0
  128. package/es/components/SingleAddSelect/SingleAddSelect.js +6 -0
  129. package/es/components/SingleAddSelect/index.js +6 -0
  130. package/es/components/StatusIcon/StatusIcon.js +1 -1
  131. package/es/components/UserProfileImage/UserProfileImage.js +1 -1
  132. package/es/components/WebTerminal/WebTerminal.js +2 -2
  133. package/es/components/WebTerminal/WebTerminalContentWrapper.js +1 -1
  134. package/es/components/WebTerminal/hooks/index.js +6 -0
  135. package/es/components/WebTerminal/index.js +6 -0
  136. package/es/components/WebTerminal/preview-components/Navigation.js +7 -1
  137. package/es/components/WebTerminal/preview-components/documentationLinks.js +6 -0
  138. package/es/components/WebTerminal/preview-components/index.js +7 -0
  139. package/es/components/index.js +3 -2
  140. package/es/global/js/hooks/index.js +2 -1
  141. package/es/global/js/hooks/useClickOutside.js +1 -1
  142. package/es/global/js/hooks/useControllableState.js +83 -0
  143. package/es/global/js/hooks/useResetCreateComponent.js +6 -2
  144. package/es/global/js/package-settings.js +7 -4
  145. package/es/global/js/utils/getBezierValues.js +20 -0
  146. package/es/global/js/utils/getNumberOfHiddenSteps.js +19 -0
  147. package/es/global/js/utils/motionConstants.js +45 -0
  148. package/es/global/js/utils/rangeWithCallback.js +13 -0
  149. package/es/global/js/utils/story-helper.js +5 -1
  150. package/es/global/js/utils/uuidv4.spec.js +4 -0
  151. package/lib/components/APIKeyModal/APIKeyModal.js +4 -4
  152. package/lib/components/ActionBar/ActionBarOverflowItems.js +1 -0
  153. package/lib/components/ActionSet/ActionSet.js +7 -3
  154. package/lib/components/AddSelect/AddSelect.js +5 -6
  155. package/lib/components/AddSelect/AddSelectBody.js +67 -30
  156. package/lib/components/AddSelect/AddSelectBreadcrumbs.js +15 -4
  157. package/lib/components/AddSelect/AddSelectColumn.js +7 -7
  158. package/lib/components/AddSelect/AddSelectFilter.js +9 -6
  159. package/lib/components/AddSelect/AddSelectList.js +65 -30
  160. package/lib/components/AddSelect/AddSelectMetaPanel.js +8 -2
  161. package/lib/components/AddSelect/AddSelectSidebar.js +4 -1
  162. package/lib/components/AddSelect/AddSelectSort.js +5 -5
  163. package/lib/components/AddSelect/add-select-utils.js +9 -2
  164. package/lib/components/AddSelect/hooks/useItemSort.js +6 -0
  165. package/lib/components/AddSelect/hooks/useParentSelect.js +6 -0
  166. package/lib/components/AddSelect/hooks/usePath.js +9 -1
  167. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +6 -6
  168. package/lib/components/Card/Card.js +16 -6
  169. package/lib/components/Card/CardFooter.js +3 -1
  170. package/lib/components/Card/CardHeader.js +21 -1
  171. package/lib/components/ComboButton/ComboButton.js +3 -3
  172. package/lib/components/CreateFullPage/CreateFullPage.js +4 -1
  173. package/lib/components/CreateTearsheet/CreateTearsheet.js +9 -1
  174. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
  175. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +64 -10
  176. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -1
  177. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +7 -0
  178. package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +6 -5
  179. package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +51 -0
  180. package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +1 -1
  181. package/lib/components/Datagrid/Datagrid/Datagrid.js +12 -45
  182. package/lib/components/Datagrid/Datagrid/DatagridContent.js +188 -0
  183. package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +9 -1
  184. package/lib/components/Datagrid/Datagrid/DatagridRow.js +63 -6
  185. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +12 -3
  186. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +16 -5
  187. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +10 -7
  188. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +2 -1
  189. package/lib/components/Datagrid/Datagrid/DraggableElement.js +7 -3
  190. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +12 -47
  191. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +5 -2
  192. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +48 -25
  193. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +60 -25
  194. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +3 -2
  195. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +76 -0
  196. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/index.js +13 -0
  197. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +562 -0
  198. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/index.js +13 -0
  199. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +129 -0
  200. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +36 -0
  201. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/index.js +19 -0
  202. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +45 -0
  203. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +28 -0
  204. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +272 -0
  205. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +100 -0
  206. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +17 -13
  207. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +13 -35
  208. package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/CustomizeColumnStory.js +0 -0
  209. package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/LeftPanelStory.js +0 -0
  210. package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/RowSizeDropdownStory.js +0 -0
  211. package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/SelectAllWithToggleStory.js +0 -0
  212. package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/StickyActionsColumnStory.js +0 -0
  213. package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/common.js +0 -0
  214. package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/index.js +0 -0
  215. package/lib/components/Datagrid/index.js +17 -1
  216. package/lib/components/Datagrid/useActionsColumn.js +28 -13
  217. package/lib/components/Datagrid/useColumnOrder.js +17 -0
  218. package/lib/components/Datagrid/useCustomizeColumns.js +5 -0
  219. package/lib/components/Datagrid/useDefaultStringRenderer.js +5 -1
  220. package/lib/components/Datagrid/useDisableSelectRows.js +6 -2
  221. package/lib/components/Datagrid/useExpandedRow.js +0 -1
  222. package/lib/components/Datagrid/useInfiniteScroll.js +5 -2
  223. package/lib/components/Datagrid/useInlineEdit.js +85 -0
  224. package/lib/components/Datagrid/useNestedRowExpander.js +63 -0
  225. package/lib/components/Datagrid/useNestedRows.js +17 -4
  226. package/lib/components/Datagrid/useRowExpander.js +17 -5
  227. package/lib/components/Datagrid/useRowSize.js +18 -13
  228. package/lib/components/Datagrid/useSelectAllToggle.js +18 -4
  229. package/lib/components/Datagrid/useSelectRows.js +12 -2
  230. package/lib/components/Datagrid/useSortableColumns.js +5 -5
  231. package/lib/components/Datagrid/useStickyColumn.js +11 -0
  232. package/lib/components/Datagrid/utils/DatagridActions.js +260 -0
  233. package/lib/components/Datagrid/utils/DatagridPagination.js +46 -0
  234. package/lib/components/Datagrid/utils/Wrapper.js +33 -0
  235. package/lib/components/Datagrid/utils/getArgTypes.js +97 -0
  236. package/lib/components/Datagrid/utils/getInlineEditColumns.js +168 -0
  237. package/lib/components/Datagrid/utils/makeData.js +48 -2
  238. package/lib/components/EditUpdateCards/EditUpdateCards.js +152 -0
  239. package/lib/components/EditUpdateCards/index.js +13 -0
  240. package/lib/components/ExportModal/ExportModal.js +3 -3
  241. package/lib/components/ImportModal/ImportModal.js +4 -4
  242. package/lib/components/InlineEdit/InlineEdit.js +27 -426
  243. package/lib/components/InlineEditV1/InlineEditV1.js +464 -0
  244. package/lib/components/InlineEditV1/index.js +13 -0
  245. package/lib/components/InlineEditV2/InlineEditV2.js +309 -0
  246. package/lib/components/InlineEditV2/index.js +13 -0
  247. package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +2 -2
  248. package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +3 -3
  249. package/lib/components/MultiAddSelect/MultiAddSelect.js +14 -7
  250. package/lib/components/NotificationsPanel/NotificationsPanel.js +8 -8
  251. package/lib/components/OptionsTile/OptionsTile.js +34 -17
  252. package/lib/components/PageHeader/PageHeader.js +5 -5
  253. package/lib/components/PageHeader/PageHeaderTitle.js +1 -1
  254. package/lib/components/ProductiveCard/ProductiveCard.js +5 -0
  255. package/lib/components/RemoveModal/RemoveModal.js +20 -3
  256. package/lib/components/Saving/Saving.js +5 -5
  257. package/lib/components/SidePanel/SidePanel.js +48 -53
  258. package/lib/components/SidePanel/motion/variants.js +55 -0
  259. package/lib/components/SingleAddSelect/SingleAddSelect.js +6 -0
  260. package/lib/components/StatusIcon/StatusIcon.js +45 -45
  261. package/lib/components/UserProfileImage/UserProfileImage.js +7 -7
  262. package/lib/components/WebTerminal/WebTerminal.js +3 -3
  263. package/lib/components/WebTerminal/hooks/index.js +6 -0
  264. package/lib/components/WebTerminal/preview-components/Navigation.js +10 -4
  265. package/lib/components/WebTerminal/preview-components/documentationLinks.js +6 -0
  266. package/lib/components/index.js +21 -1
  267. package/lib/global/js/hooks/index.js +9 -1
  268. package/lib/global/js/hooks/useClickOutside.js +1 -1
  269. package/lib/global/js/hooks/useControllableState.js +94 -0
  270. package/lib/global/js/hooks/useResetCreateComponent.js +7 -2
  271. package/lib/global/js/package-settings.js +7 -4
  272. package/lib/global/js/utils/getBezierValues.js +29 -0
  273. package/lib/global/js/utils/getNumberOfHiddenSteps.js +28 -0
  274. package/lib/global/js/utils/motionConstants.js +55 -0
  275. package/lib/global/js/utils/rangeWithCallback.js +22 -0
  276. package/lib/global/js/utils/story-helper.js +5 -1
  277. package/lib/global/js/utils/uuidv4.spec.js +4 -0
  278. package/package.json +18 -16
  279. package/scss/components/ActionSet/_action-set.scss +9 -4
  280. package/scss/components/AddSelect/_add-select.scss +132 -34
  281. package/scss/components/AddSelect/_index.scss +1 -1
  282. package/scss/components/AddSelect/_storybook-styles.scss +1 -1
  283. package/scss/components/Card/_card.scss +1 -0
  284. package/scss/components/Cascade/_cascade.scss +1 -1
  285. package/scss/components/CreateTearsheet/_create-tearsheet.scss +2 -0
  286. package/scss/components/Datagrid/_datagrid.scss +7 -0
  287. package/scss/components/Datagrid/_storybook-styles.scss +17 -5
  288. package/scss/components/Datagrid/styles/_datagrid.scss +87 -18
  289. package/scss/components/Datagrid/styles/_draggableElement.scss +26 -9
  290. package/scss/components/Datagrid/styles/_index.scss +1 -0
  291. package/scss/components/Datagrid/styles/_useActionsColumn.scss +14 -0
  292. package/scss/components/Datagrid/styles/_useExpandedRow.scss +57 -11
  293. package/scss/components/Datagrid/styles/_useInlineEdit.scss +419 -0
  294. package/scss/components/Datagrid/styles/_useNestedRows.scss +33 -1
  295. package/scss/components/Datagrid/styles/_useStickyColumn.scss +31 -2
  296. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +47 -6
  297. package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +9 -1
  298. package/scss/components/EditUpdateCards/_carbon-imports.scss +9 -0
  299. package/scss/components/EditUpdateCards/_edit-update-cards.scss +85 -0
  300. package/scss/components/EditUpdateCards/_index-with-carbon.scss +9 -0
  301. package/scss/components/EditUpdateCards/_index.scss +8 -0
  302. package/scss/components/EditUpdateCards/_storybook-styles.scss +55 -0
  303. package/scss/components/{InlineEdit → InlineEditV1}/_carbon-imports.scss +0 -0
  304. package/scss/components/{InlineEdit → InlineEditV1}/_index-with-carbon.scss +1 -1
  305. package/scss/components/{InlineEdit → InlineEditV1}/_index.scss +1 -1
  306. package/scss/components/{InlineEdit/_inline-edit.scss → InlineEditV1/_inline-edit-v1.scss} +4 -2
  307. package/scss/components/{InlineEdit → InlineEditV1}/_storybook-styles.scss +0 -0
  308. package/scss/components/InlineEditV2/_carbon-imports.scss +9 -0
  309. package/scss/components/InlineEditV2/_index-with-carbon.scss +9 -0
  310. package/scss/components/InlineEditV2/_index.scss +10 -0
  311. package/scss/components/InlineEditV2/_inline-edit-v2.scss +83 -0
  312. package/scss/components/InlineEditV2/_storybook-styles.scss +9 -0
  313. package/scss/components/MultiAddSelect/_multi-add-select.scss +7 -0
  314. package/scss/components/MultiAddSelect/_storybook-styles.scss +1 -1
  315. package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -6
  316. package/scss/components/RemoveModal/_remove-modal.scss +0 -4
  317. package/scss/components/SidePanel/_side-panel.scss +3 -82
  318. package/scss/components/SidePanel/_storybook-styles.scss +6 -1
  319. package/scss/components/SingleAddSelect/_carbon-imports.scss +1 -1
  320. package/scss/components/SingleAddSelect/_index-with-carbon.scss +1 -1
  321. package/scss/components/SingleAddSelect/_index.scss +7 -0
  322. package/scss/components/SingleAddSelect/_single-add-select.scss +7 -0
  323. package/scss/components/SingleAddSelect/_storybook-styles.scss +1 -1
  324. package/scss/components/Tearsheet/_tearsheet.scss +2 -2
  325. package/scss/components/WebTerminal/_carbon-imports.scss +6 -0
  326. package/scss/components/WebTerminal/_index.scss +7 -0
  327. package/scss/components/WebTerminal/_storybook-styles.scss +7 -0
  328. package/scss/components/_index-released-only-with-carbon.scss +1 -1
  329. package/scss/components/_index-released-only.scss +2 -1
  330. package/scss/components/_index-with-carbon.scss +3 -1
  331. package/scss/components/_index.scss +3 -1
@@ -0,0 +1,289 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
+ var _excluded = ["cancelLabel", "editLabel", "id", "invalid", "invalidLabel", "labelText", "onCancel", "onChange", "onSave", "saveLabel", "value"];
6
+
7
+ /**
8
+ * Copyright IBM Corp. 2022, 2022
9
+ *
10
+ * This source code is licensed under the Apache-2.0 license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ import React, { useState, useEffect, forwardRef, useRef } from 'react';
14
+ import { Button } from '@carbon/react';
15
+ import cx from 'classnames';
16
+ import PropTypes from 'prop-types';
17
+ import { Edit, Checkmark, Close, // EditOff,
18
+ WarningFilled } from '@carbon/react/icons';
19
+ import { pkg, carbon } from '../../settings';
20
+ import { getDevtoolsProps } from '../../global/js/utils/devtools';
21
+ var componentName = 'InlineEditV2';
22
+ var blockClass = "".concat(pkg.prefix, "--inline-edit-v2");
23
+ export var InlineEditV2 = /*#__PURE__*/forwardRef(function (_ref, ref) {
24
+ var cancelLabel = _ref.cancelLabel,
25
+ editLabel = _ref.editLabel,
26
+ id = _ref.id,
27
+ invalid = _ref.invalid,
28
+ invalidLabel = _ref.invalidLabel,
29
+ labelText = _ref.labelText,
30
+ onCancel = _ref.onCancel,
31
+ onChange = _ref.onChange,
32
+ onSave = _ref.onSave,
33
+ saveLabel = _ref.saveLabel,
34
+ value = _ref.value,
35
+ rest = _objectWithoutProperties(_ref, _excluded);
36
+
37
+ var _useState = useState(false),
38
+ _useState2 = _slicedToArray(_useState, 2),
39
+ focused = _useState2[0],
40
+ setFocused = _useState2[1];
41
+
42
+ var _useState3 = useState(''),
43
+ _useState4 = _slicedToArray(_useState3, 2),
44
+ initialValue = _useState4[0],
45
+ setInitialValue = _useState4[1];
46
+
47
+ var _useState5 = useState(false),
48
+ _useState6 = _slicedToArray(_useState5, 2),
49
+ dirtyInput = _useState6[0],
50
+ setDirtyInput = _useState6[1];
51
+
52
+ var inputRef = useRef(null);
53
+ var canSave = value !== initialValue && !invalid;
54
+ var escaping = useRef(false);
55
+ useEffect(function () {
56
+ if (!initialValue && !dirtyInput) {
57
+ setInitialValue(value);
58
+ }
59
+ }, [initialValue, dirtyInput, value]);
60
+
61
+ var isTargetingChild = function isTargetingChild(_ref2) {
62
+ var currentTarget = _ref2.currentTarget,
63
+ relatedTarget = _ref2.relatedTarget;
64
+ return currentTarget.contains(relatedTarget);
65
+ };
66
+
67
+ var onChangeHandler = function onChangeHandler(_ref3) {
68
+ var target = _ref3.target;
69
+
70
+ if (!dirtyInput) {
71
+ setDirtyInput(true);
72
+ }
73
+
74
+ onChange(target.value);
75
+ };
76
+
77
+ var onFocusHandler = function onFocusHandler(e) {
78
+ // if (readOnly) {
79
+ // return;
80
+ // }
81
+ if (!isTargetingChild(e)) {
82
+ inputRef.current.focus();
83
+ setFocused(true);
84
+ }
85
+ };
86
+
87
+ var onSaveHandler = function onSaveHandler() {
88
+ setInitialValue(value);
89
+ setFocused(false);
90
+ setDirtyInput(false);
91
+ onSave();
92
+ };
93
+
94
+ var onCancelHandler = function onCancelHandler() {
95
+ setFocused(false);
96
+ setDirtyInput(false);
97
+ onCancel(initialValue);
98
+ };
99
+
100
+ var onBlurHandler = function onBlurHandler(e) {
101
+ // if (readOnly || escaping.current) {
102
+ if (escaping.current) {
103
+ return;
104
+ }
105
+
106
+ if (!isTargetingChild(e)) {
107
+ if (canSave) {
108
+ onSaveHandler();
109
+ } else {
110
+ onCancelHandler();
111
+ }
112
+ }
113
+ };
114
+
115
+ var returnHandler = function returnHandler() {
116
+ if (canSave) {
117
+ onSaveHandler();
118
+ }
119
+ };
120
+
121
+ var escapeHandler = function escapeHandler() {
122
+ onCancelHandler();
123
+ };
124
+
125
+ var onKeyHandler = function onKeyHandler(e) {
126
+ // to prevent blur handler from being called twice add additional state to check if escape is being used
127
+ escaping.current = true;
128
+
129
+ switch (e.key) {
130
+ case 'Escape':
131
+ inputRef.current.blur();
132
+ escapeHandler();
133
+ break;
134
+
135
+ case 'Enter':
136
+ inputRef.current.blur();
137
+ returnHandler();
138
+ break;
139
+
140
+ default:
141
+ break;
142
+ }
143
+
144
+ escaping.current = false;
145
+ };
146
+
147
+ return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
148
+ ref: ref
149
+ }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement("div", {
150
+ className: cx(blockClass, _defineProperty({}, "".concat(blockClass, "-focused"), focused)),
151
+ onFocus: onFocusHandler,
152
+ onBlur: onBlurHandler
153
+ }, /*#__PURE__*/React.createElement("label", {
154
+ className: "".concat(blockClass, "__text-input-label"),
155
+ htmlFor: id
156
+ }, labelText), /*#__PURE__*/React.createElement("input", {
157
+ id: id,
158
+ className: cx("".concat(blockClass, "__text-input"), "".concat(carbon.prefix, "--text-input"), "".concat(carbon.prefix, "--text-input--sm")),
159
+ type: "text",
160
+ value: value,
161
+ onChange: onChangeHandler,
162
+ ref: inputRef // readOnly={readOnly}
163
+ ,
164
+ onKeyDown: onKeyHandler
165
+ }), focused ? /*#__PURE__*/React.createElement(React.Fragment, null, invalid && /*#__PURE__*/React.createElement(WarningFilled, {
166
+ size: 16,
167
+ className: "".concat(blockClass, "__warning-icon")
168
+ }), /*#__PURE__*/React.createElement(Button, {
169
+ hasIconOnly: true,
170
+ renderIcon: function renderIcon() {
171
+ return /*#__PURE__*/React.createElement(Close, {
172
+ size: 24
173
+ });
174
+ },
175
+ size: "sm",
176
+ iconDescription: cancelLabel,
177
+ onClick: onCancelHandler,
178
+ kind: "ghost",
179
+ tabIndex: 0,
180
+ key: "cancel",
181
+ className: "".concat(blockClass, "__btn ").concat(blockClass, "__btn-cancel")
182
+ }), /*#__PURE__*/React.createElement(Button, {
183
+ hasIconOnly: true,
184
+ renderIcon: function renderIcon() {
185
+ return /*#__PURE__*/React.createElement(Checkmark, {
186
+ size: 24
187
+ });
188
+ },
189
+ size: "sm",
190
+ iconDescription: saveLabel,
191
+ onClick: onSaveHandler,
192
+ kind: "ghost",
193
+ tabIndex: 0,
194
+ key: "save",
195
+ className: "".concat(blockClass, "__btn ").concat(blockClass, "__btn-save"),
196
+ disabled: !canSave
197
+ })) : /*#__PURE__*/React.createElement(Button, {
198
+ className: "".concat(blockClass, "__btn ").concat(blockClass, "__btn-edit"),
199
+ hasIconOnly: true // renderIcon={readOnly ? EditOff24 : Edit24}
200
+ ,
201
+ renderIcon: function renderIcon() {
202
+ return /*#__PURE__*/React.createElement(Edit, {
203
+ size: 24
204
+ });
205
+ },
206
+ size: "sm" // iconDescription={readOnly ? readOnlyLabel : editLabel}
207
+ ,
208
+ iconDescription: editLabel,
209
+ onClick: onFocusHandler,
210
+ kind: "ghost",
211
+ tabIndex: 0,
212
+ key: "edit"
213
+ })), focused && invalid && /*#__PURE__*/React.createElement("p", {
214
+ className: "".concat(blockClass, "__warning-text")
215
+ }, invalidLabel));
216
+ });
217
+ InlineEditV2 = pkg.checkComponentEnabled(InlineEditV2, componentName);
218
+ InlineEditV2.displayName = componentName;
219
+ InlineEditV2.propTypes = {
220
+ /**
221
+ * label for cancel button
222
+ */
223
+ cancelLabel: PropTypes.string.isRequired,
224
+
225
+ /**
226
+ * label for edit button
227
+ */
228
+ editLabel: PropTypes.string.isRequired,
229
+
230
+ /**
231
+ * Specify a custom id for the input
232
+ */
233
+ id: PropTypes.string.isRequired,
234
+
235
+ /**
236
+ * determines if the input is invalid
237
+ */
238
+ invalid: PropTypes.bool,
239
+
240
+ /**
241
+ * text that is displayed if the input is invalid
242
+ */
243
+ invalidLabel: PropTypes.string,
244
+
245
+ /**
246
+ * Provide the text that will be read by a screen reader when visiting this control
247
+ */
248
+ labelText: PropTypes.string.isRequired,
249
+
250
+ /**
251
+ * handler that is called when the cancel button is pressed or when the user removes focus from the input and there is no new value
252
+ */
253
+ onCancel: PropTypes.func.isRequired,
254
+
255
+ /**
256
+ * handler that is called when the input is updated
257
+ */
258
+ onChange: PropTypes.func.isRequired,
259
+
260
+ /**
261
+ * handler that is called when the save button is pressed or when the user removes focus from the input if it has a new value
262
+ */
263
+ onSave: PropTypes.func.isRequired,
264
+
265
+ /**
266
+ * determines if the input is in readOnly mode
267
+ */
268
+ // readOnly: PropTypes.bool,
269
+
270
+ /**
271
+ * label for the edit button that displays when in read only mode
272
+ */
273
+ // readOnlyLabel: PropTypes.string,
274
+
275
+ /**
276
+ * label for save button
277
+ */
278
+ saveLabel: PropTypes.string.isRequired,
279
+
280
+ /**
281
+ * current value of the input
282
+ */
283
+ value: PropTypes.string.isRequired
284
+ };
285
+ InlineEditV2.defaultProps = {
286
+ invalid: false,
287
+ invalidLabel: '' // readOnly: false,
288
+
289
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright IBM Corp. 2022, 2022
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export { InlineEditV2 } from './InlineEditV2';
@@ -6,7 +6,7 @@
6
6
  //
7
7
  import React from 'react';
8
8
  import PropTypes from 'prop-types';
9
- import { Add } from '@carbon/icons-react';
9
+ import { Add } from '@carbon/react/icons';
10
10
  import { pkg } from '../../settings';
11
11
  var blockClass = "".concat(pkg.prefix, "--modified-tabs");
12
12
  export var ModifiedTabLabelNew = function ModifiedTabLabelNew(_ref) {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Close, CloseFilled } from '@carbon/icons-react';
3
+ import { Close, CloseFilled } from '@carbon/react/icons';
4
4
  import { pkg } from '../../settings';
5
5
  var blockClass = "".concat(pkg.prefix, "--modified-tabs");
6
6
  export var ModifiedTabLabelWithClose = function ModifiedTabLabelWithClose(_ref) {
@@ -1,4 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ //
3
+ // Copyright IBM Corp. 2022, 2022
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.
7
+ //
2
8
  import React, { forwardRef } from 'react';
3
9
  import PropTypes from 'prop-types';
4
10
  import { AddSelect } from '../AddSelect';
@@ -64,6 +70,11 @@ MultiAddSelect.propTypes = {
64
70
  */
65
71
  globalSearchPlaceholder: PropTypes.string,
66
72
 
73
+ /**
74
+ * the theme for the empty state illustration
75
+ */
76
+ illustrationTheme: PropTypes.oneOf(['light', 'dark']),
77
+
67
78
  /**
68
79
  * title that displays in the sidebar / influencer
69
80
  */
@@ -84,7 +95,8 @@ MultiAddSelect.propTypes = {
84
95
  avatar: PropTypes.shape({
85
96
  alt: PropTypes.string,
86
97
  icon: PropTypes.func,
87
- src: PropTypes.string
98
+ src: PropTypes.string,
99
+ theme: PropTypes.oneOf(['light', 'dark'])
88
100
  }),
89
101
  children: PropTypes.object,
90
102
  icon: PropTypes.func,
@@ -145,15 +157,10 @@ MultiAddSelect.propTypes = {
145
157
  */
146
158
  open: PropTypes.bool,
147
159
 
148
- /**
149
- * description for the remove item icon
150
- */
151
- removeIconDescription: PropTypes.string,
152
-
153
160
  /**
154
161
  * text that displays when displaying filtered items
155
162
  */
156
- searchResultsLabel: PropTypes.string,
163
+ searchResultsTitle: PropTypes.string,
157
164
 
158
165
  /**
159
166
  * header text
@@ -1 +1,7 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
1
7
  export { MultiAddSelect } from './MultiAddSelect';
@@ -22,7 +22,7 @@ import { timeAgo } from './utils';
22
22
  import { NotificationsEmptyState } from '../EmptyStates/NotificationsEmptyState'; // Carbon and package components we use.
23
23
 
24
24
  import { Button, Link, Toggle, IconButton } from '@carbon/react';
25
- import { ErrorFilled, WarningAltFilled, CheckmarkFilled, InformationSquareFilled, ChevronDown, Close, Settings } from '@carbon/icons-react';
25
+ import { ErrorFilled, WarningAltFilled, CheckmarkFilled, InformationSquareFilled, ChevronDown, Close, Settings } from '@carbon/react/icons';
26
26
  import { usePreviousValue } from '../../global/js/hooks'; // The block part of our conventional BEM class names (blockClass__E--M).
27
27
 
28
28
  var componentName = 'NotificationsPanel';
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["children", "className", "enabled", "invalid", "invalidText", "locked", "lockedText", "onToggle", "open", "size", "summary", "title", "titleId", "warn", "warnText"];
5
+ var _excluded = ["children", "className", "enabled", "invalid", "invalidText", "locked", "lockedText", "onChange", "onToggle", "open", "size", "summary", "title", "titleId", "warn", "warnText"];
6
6
 
7
7
  /**
8
8
  * Copyright IBM Corp. 2021, 2022
@@ -17,10 +17,11 @@ import PropTypes from 'prop-types';
17
17
  import cx from 'classnames';
18
18
  import { getDevtoolsProps } from '../../global/js/utils/devtools';
19
19
  import uuidv4 from '../../global/js/utils/uuidv4';
20
- import { pkg } from '../../settings'; // Carbon and package components we use.
20
+ import { pkg } from '../../settings';
21
+ import { useControllableState } from '../../global/js/hooks'; // Carbon and package components we use.
21
22
 
22
23
  import { Toggle } from '@carbon/react';
23
- import { ChevronDown, Locked, WarningAltFilled, WarningFilled } from '@carbon/icons-react';
24
+ import { ChevronDown, Locked, WarningAltFilled, WarningFilled } from '@carbon/react/icons';
24
25
  import * as carbonMotion from '@carbon/motion'; // The block part of our conventional BEM class names (blockClass__E--M).
25
26
 
26
27
  var blockClass = "".concat(pkg.prefix, "--options-tile");
@@ -28,6 +29,7 @@ var componentName = 'OptionsTile'; // NOTE: the component SCSS is not imported h
28
29
  // Default values for props
29
30
 
30
31
  var defaults = {
32
+ onChange: function onChange() {},
31
33
  size: 'xl'
32
34
  };
33
35
  /**
@@ -42,6 +44,8 @@ export var OptionsTile = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
42
44
  invalidText = _ref.invalidText,
43
45
  locked = _ref.locked,
44
46
  lockedText = _ref.lockedText,
47
+ _ref$onChange = _ref.onChange,
48
+ _onChange = _ref$onChange === void 0 ? defaults.onChange : _ref$onChange,
45
49
  onToggle = _ref.onToggle,
46
50
  open = _ref.open,
47
51
  _ref$size = _ref.size,
@@ -55,18 +59,24 @@ export var OptionsTile = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
55
59
 
56
60
  var _useState = useState(open),
57
61
  _useState2 = _slicedToArray(_useState, 2),
58
- isOpen = _useState2[0],
59
- setIsOpen = _useState2[1];
62
+ prevIsOpen = _useState2[0],
63
+ setPrevIsOpen = _useState2[1];
60
64
 
61
- var _useState3 = useState(open),
65
+ var _useState3 = useState(false),
62
66
  _useState4 = _slicedToArray(_useState3, 2),
63
- prevIsOpen = _useState4[0],
64
- setPrevIsOpen = _useState4[1];
65
-
66
- var _useState5 = useState(false),
67
- _useState6 = _slicedToArray(_useState5, 2),
68
- closing = _useState6[0],
69
- setClosing = _useState6[1];
67
+ closing = _useState4[0],
68
+ setClosing = _useState4[1];
69
+
70
+ var _useControllableState = useControllableState({
71
+ value: open,
72
+ defaultValue: open || null,
73
+ onChange: function onChange(value) {
74
+ return _onChange(value);
75
+ }
76
+ }),
77
+ _useControllableState2 = _slicedToArray(_useControllableState, 2),
78
+ isOpen = _useControllableState2[0],
79
+ setIsOpen = _useControllableState2[1];
70
80
 
71
81
  var detailsRef = useRef(null);
72
82
  var contentRef = useRef(null);
@@ -297,6 +307,12 @@ OptionsTile.propTypes = {
297
307
  */
298
308
  lockedText: PropTypes.string,
299
309
 
310
+ /**
311
+ * Provide a function which will be called each time the user
312
+ * toggles the open state of the OptionsTile.
313
+ */
314
+ onChange: PropTypes.func,
315
+
300
316
  /**
301
317
  * Provide a function which will be called each time the user
302
318
  * interacts with the toggle.
@@ -29,7 +29,7 @@ import { ActionBar } from '../ActionBar/';
29
29
  import { BreadcrumbWithOverflow } from '../BreadcrumbWithOverflow';
30
30
  import { TagSet, string_required_if_more_than_10_tags } from '../TagSet/TagSet';
31
31
  import { ButtonSetWithOverflow } from '../ButtonSetWithOverflow';
32
- import { ChevronUp } from '@carbon/icons-react';
32
+ import { ChevronUp } from '@carbon/react/icons';
33
33
  var componentName = 'PageHeader';
34
34
  import { blockClass, utilCheckUpdateVerticalSpace, utilGetBreadcrumbItemForTitle, utilSetCollapsed } from './PageHeaderUtils';
35
35
  import { PageHeaderTitle } from './PageHeaderTitle'; // Default values for props
@@ -301,7 +301,7 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
301
301
  var current = _ref5.current;
302
302
  // on window resize and other updates some values may have changed
303
303
  checkUpdateVerticalSpace();
304
- setWidthIsNarrow(current.innerWidth < breakpoints.md.width); // small (below medium) media query
304
+ setWidthIsNarrow(current.innerWidth / 16 < parseInt(breakpoints.md.width)); // small (below medium) media query
305
305
  }, [actionBarItems, children, breadcrumbs, enableBreadcrumbScroll, navigation, pageActions, subtitle, tags, title]);
306
306
  useEffect(function () {
307
307
  checkUpdateVerticalSpace(); // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -344,7 +344,7 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
344
344
  };
345
345
 
346
346
  useEffect(function () {
347
- if (typeof collapseHeader === 'boolean') {
347
+ if (collapseHeader === true) {
348
348
  utilSetCollapsed(collapseHeader, metrics.headerOffset, metrics.headerTopValue);
349
349
  }
350
350
  }, [collapseHeader, metrics.headerOffset, metrics.headerTopValue]);
@@ -484,7 +484,7 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
484
484
  onWidthChange: handleWidthChange,
485
485
  buttons: pageActions,
486
486
  buttonSetOverflowLabel: pageActionsOverflowLabel,
487
- rightAlign: true
487
+ rightAlign: !widthIsNarrow
488
488
  })));
489
489
  }
490
490
  }
@@ -65,7 +65,7 @@ export var PageHeaderTitle = function PageHeaderTitle(_ref) {
65
65
  titleText = asText;
66
66
  }
67
67
 
68
- return /*#__PURE__*/React.createElement("div", {
68
+ return /*#__PURE__*/React.createElement("h1", {
69
69
  className: cx("".concat(blockClass, "__title"), _defineProperty({}, "".concat(blockClass, "__title--editable"), isEditable), _defineProperty({}, "".concat(blockClass, "__title--fades"), hasBreadcrumbRow)),
70
70
  title: titleText
71
71
  }, titleInnards);
@@ -117,6 +117,11 @@ ProductiveCard.propTypes = {
117
117
  */
118
118
  primaryButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
119
119
 
120
+ /**
121
+ * Determines if the primary button is on the top or bottom of the card
122
+ */
123
+ primaryButtonPlacement: PropTypes.oneOf(['top', 'bottom']),
124
+
120
125
  /**
121
126
  * The text that's displayed in the primary button
122
127
  */
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["body", "className", "iconDescription", "inputInvalidText", "inputLabelText", "inputPlaceholderText", "label", "onClose", "onRequestSubmit", "open", "preventCloseOnClickOutside", "primaryButtonText", "resourceName", "secondaryButtonText", "textConfirmation", "title"];
5
+ var _excluded = ["body", "className", "iconDescription", "inputInvalidText", "inputLabelText", "inputPlaceholderText", "label", "onClose", "onRequestSubmit", "open", "preventCloseOnClickOutside", "primaryButtonDisabled", "primaryButtonText", "resourceName", "secondaryButtonText", "textConfirmation", "title"];
6
6
 
7
7
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
8
 
@@ -35,6 +35,7 @@ export var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
35
35
  onRequestSubmit = _ref.onRequestSubmit,
36
36
  open = _ref.open,
37
37
  preventCloseOnClickOutside = _ref.preventCloseOnClickOutside,
38
+ primaryButtonDisabled = _ref.primaryButtonDisabled,
38
39
  primaryButtonText = _ref.primaryButtonText,
39
40
  resourceName = _ref.resourceName,
40
41
  secondaryButtonText = _ref.secondaryButtonText,
@@ -57,7 +58,18 @@ export var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
57
58
  setUserInput(e.target.value);
58
59
  };
59
60
 
60
- var primaryButtonDisabled = textConfirmation && userInput !== resourceName;
61
+ var checkPrimaryButtonDisabled = function checkPrimaryButtonDisabled() {
62
+ // user control should be used primarily
63
+ if (primaryButtonDisabled) {
64
+ return true;
65
+ } else if (textConfirmation && userInput !== resourceName) {
66
+ return true;
67
+ }
68
+
69
+ return false;
70
+ };
71
+
72
+ var primaryButtonStatus = checkPrimaryButtonDisabled();
61
73
  var blockClass = "".concat(pkg.prefix, "--remove-modal"); // Clear the user input this way so that if the onRequestSubmit handler fails for some reason
62
74
  // the value of the input will still remain: we only want to empty the input value
63
75
  // when open actually changes to false.
@@ -100,7 +112,7 @@ export var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
100
112
  type: "submit",
101
113
  kind: "danger",
102
114
  onClick: onRequestSubmit,
103
- disabled: primaryButtonDisabled
115
+ disabled: primaryButtonStatus
104
116
  }, primaryButtonText)));
105
117
  }); // Return a placeholder if not released and not enabled by feature flag
106
118
 
@@ -161,6 +173,11 @@ RemoveModal.propTypes = {
161
173
  */
162
174
  preventCloseOnClickOutside: PropTypes.bool,
163
175
 
176
+ /**
177
+ * Specify whether the primary button should be disabled. This value will override textConfirmation
178
+ */
179
+ primaryButtonDisabled: PropTypes.bool,
180
+
164
181
  /**
165
182
  * Specify the text for the primary button
166
183
  */
@@ -12,7 +12,7 @@ var _excluded = ["secondaryButtonText", "className", "defaultIconDescription", "
12
12
  import React, { forwardRef } from 'react';
13
13
  import cx from 'classnames';
14
14
  import { Button, InlineLoading } from '@carbon/react';
15
- import { Save, CheckmarkOutline, ErrorOutline, ErrorFilled } from '@carbon/icons-react';
15
+ import { Save, CheckmarkOutline, ErrorOutline, ErrorFilled } from '@carbon/react/icons';
16
16
  import PropTypes from 'prop-types';
17
17
  import { getDevtoolsProps } from '../../global/js/utils/devtools';
18
18
  import { pkg } from '../../settings';