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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) hide show
  1. package/README.md +2 -2
  2. package/css/index-full-carbon.css +1223 -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 +792 -174
  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 +1109 -419
  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 +1024 -274
  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 +142 -11
  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 +53 -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 +13 -3
  98. package/es/components/Datagrid/useSortableColumns.js +1 -1
  99. package/es/components/Datagrid/useStickyColumn.js +14 -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 +151 -9
  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 +53 -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 +13 -3
  230. package/lib/components/Datagrid/useSortableColumns.js +5 -5
  231. package/lib/components/Datagrid/useStickyColumn.js +14 -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/AboutModal/_about-modal.scss +2 -1
  280. package/scss/components/ActionSet/_action-set.scss +9 -4
  281. package/scss/components/AddSelect/_add-select.scss +132 -34
  282. package/scss/components/AddSelect/_index.scss +1 -1
  283. package/scss/components/AddSelect/_storybook-styles.scss +1 -1
  284. package/scss/components/Card/_card.scss +1 -0
  285. package/scss/components/Cascade/_cascade.scss +1 -1
  286. package/scss/components/CreateTearsheet/_create-tearsheet.scss +2 -0
  287. package/scss/components/Datagrid/_datagrid.scss +15 -0
  288. package/scss/components/Datagrid/_storybook-styles.scss +17 -5
  289. package/scss/components/Datagrid/styles/_datagrid.scss +129 -20
  290. package/scss/components/Datagrid/styles/_draggableElement.scss +26 -9
  291. package/scss/components/Datagrid/styles/_index.scss +1 -0
  292. package/scss/components/Datagrid/styles/_useActionsColumn.scss +14 -0
  293. package/scss/components/Datagrid/styles/_useExpandedRow.scss +57 -11
  294. package/scss/components/Datagrid/styles/_useInlineEdit.scss +419 -0
  295. package/scss/components/Datagrid/styles/_useNestedRows.scss +33 -1
  296. package/scss/components/Datagrid/styles/_useStickyColumn.scss +31 -2
  297. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +47 -6
  298. package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +9 -1
  299. package/scss/components/EditUpdateCards/_carbon-imports.scss +9 -0
  300. package/scss/components/EditUpdateCards/_edit-update-cards.scss +85 -0
  301. package/scss/components/EditUpdateCards/_index-with-carbon.scss +9 -0
  302. package/scss/components/EditUpdateCards/_index.scss +8 -0
  303. package/scss/components/EditUpdateCards/_storybook-styles.scss +55 -0
  304. package/scss/components/{InlineEdit → InlineEditV1}/_carbon-imports.scss +0 -0
  305. package/scss/components/{InlineEdit → InlineEditV1}/_index-with-carbon.scss +1 -1
  306. package/scss/components/{InlineEdit → InlineEditV1}/_index.scss +1 -1
  307. package/scss/components/{InlineEdit/_inline-edit.scss → InlineEditV1/_inline-edit-v1.scss} +5 -3
  308. package/scss/components/{InlineEdit → InlineEditV1}/_storybook-styles.scss +0 -0
  309. package/scss/components/InlineEditV2/_carbon-imports.scss +9 -0
  310. package/scss/components/InlineEditV2/_index-with-carbon.scss +9 -0
  311. package/scss/components/InlineEditV2/_index.scss +10 -0
  312. package/scss/components/InlineEditV2/_inline-edit-v2.scss +83 -0
  313. package/scss/components/InlineEditV2/_storybook-styles.scss +9 -0
  314. package/scss/components/MultiAddSelect/_multi-add-select.scss +7 -0
  315. package/scss/components/MultiAddSelect/_storybook-styles.scss +1 -1
  316. package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -6
  317. package/scss/components/RemoveModal/_remove-modal.scss +0 -4
  318. package/scss/components/SidePanel/_side-panel.scss +3 -82
  319. package/scss/components/SidePanel/_storybook-styles.scss +6 -1
  320. package/scss/components/SingleAddSelect/_carbon-imports.scss +1 -1
  321. package/scss/components/SingleAddSelect/_index-with-carbon.scss +1 -1
  322. package/scss/components/SingleAddSelect/_index.scss +7 -0
  323. package/scss/components/SingleAddSelect/_single-add-select.scss +7 -0
  324. package/scss/components/SingleAddSelect/_storybook-styles.scss +1 -1
  325. package/scss/components/Tearsheet/_tearsheet.scss +2 -2
  326. package/scss/components/WebTerminal/_carbon-imports.scss +6 -0
  327. package/scss/components/WebTerminal/_index.scss +7 -0
  328. package/scss/components/WebTerminal/_storybook-styles.scss +7 -0
  329. package/scss/components/_index-released-only-with-carbon.scss +1 -1
  330. package/scss/components/_index-released-only.scss +2 -1
  331. package/scss/components/_index-with-carbon.scss +3 -1
  332. package/scss/components/_index.scss +3 -1
@@ -0,0 +1,309 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.InlineEditV2 = void 0;
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
+
16
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
+
18
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
19
+
20
+ var _react = _interopRequireWildcard(require("react"));
21
+
22
+ var _react2 = require("@carbon/react");
23
+
24
+ var _classnames = _interopRequireDefault(require("classnames"));
25
+
26
+ var _propTypes = _interopRequireDefault(require("prop-types"));
27
+
28
+ var _icons = require("@carbon/react/icons");
29
+
30
+ var _settings = require("../../settings");
31
+
32
+ var _devtools = require("../../global/js/utils/devtools");
33
+
34
+ var _excluded = ["cancelLabel", "editLabel", "id", "invalid", "invalidLabel", "labelText", "onCancel", "onChange", "onSave", "saveLabel", "value"];
35
+
36
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
+
38
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
+
40
+ var componentName = 'InlineEditV2';
41
+ var blockClass = "".concat(_settings.pkg.prefix, "--inline-edit-v2");
42
+ var InlineEditV2 = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
43
+ var cancelLabel = _ref.cancelLabel,
44
+ editLabel = _ref.editLabel,
45
+ id = _ref.id,
46
+ invalid = _ref.invalid,
47
+ invalidLabel = _ref.invalidLabel,
48
+ labelText = _ref.labelText,
49
+ onCancel = _ref.onCancel,
50
+ onChange = _ref.onChange,
51
+ onSave = _ref.onSave,
52
+ saveLabel = _ref.saveLabel,
53
+ value = _ref.value,
54
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
55
+
56
+ var _useState = (0, _react.useState)(false),
57
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
58
+ focused = _useState2[0],
59
+ setFocused = _useState2[1];
60
+
61
+ var _useState3 = (0, _react.useState)(''),
62
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
63
+ initialValue = _useState4[0],
64
+ setInitialValue = _useState4[1];
65
+
66
+ var _useState5 = (0, _react.useState)(false),
67
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
68
+ dirtyInput = _useState6[0],
69
+ setDirtyInput = _useState6[1];
70
+
71
+ var inputRef = (0, _react.useRef)(null);
72
+ var canSave = value !== initialValue && !invalid;
73
+ var escaping = (0, _react.useRef)(false);
74
+ (0, _react.useEffect)(function () {
75
+ if (!initialValue && !dirtyInput) {
76
+ setInitialValue(value);
77
+ }
78
+ }, [initialValue, dirtyInput, value]);
79
+
80
+ var isTargetingChild = function isTargetingChild(_ref2) {
81
+ var currentTarget = _ref2.currentTarget,
82
+ relatedTarget = _ref2.relatedTarget;
83
+ return currentTarget.contains(relatedTarget);
84
+ };
85
+
86
+ var onChangeHandler = function onChangeHandler(_ref3) {
87
+ var target = _ref3.target;
88
+
89
+ if (!dirtyInput) {
90
+ setDirtyInput(true);
91
+ }
92
+
93
+ onChange(target.value);
94
+ };
95
+
96
+ var onFocusHandler = function onFocusHandler(e) {
97
+ // if (readOnly) {
98
+ // return;
99
+ // }
100
+ if (!isTargetingChild(e)) {
101
+ inputRef.current.focus();
102
+ setFocused(true);
103
+ }
104
+ };
105
+
106
+ var onSaveHandler = function onSaveHandler() {
107
+ setInitialValue(value);
108
+ setFocused(false);
109
+ setDirtyInput(false);
110
+ onSave();
111
+ };
112
+
113
+ var onCancelHandler = function onCancelHandler() {
114
+ setFocused(false);
115
+ setDirtyInput(false);
116
+ onCancel(initialValue);
117
+ };
118
+
119
+ var onBlurHandler = function onBlurHandler(e) {
120
+ // if (readOnly || escaping.current) {
121
+ if (escaping.current) {
122
+ return;
123
+ }
124
+
125
+ if (!isTargetingChild(e)) {
126
+ if (canSave) {
127
+ onSaveHandler();
128
+ } else {
129
+ onCancelHandler();
130
+ }
131
+ }
132
+ };
133
+
134
+ var returnHandler = function returnHandler() {
135
+ if (canSave) {
136
+ onSaveHandler();
137
+ }
138
+ };
139
+
140
+ var escapeHandler = function escapeHandler() {
141
+ onCancelHandler();
142
+ };
143
+
144
+ var onKeyHandler = function onKeyHandler(e) {
145
+ // to prevent blur handler from being called twice add additional state to check if escape is being used
146
+ escaping.current = true;
147
+
148
+ switch (e.key) {
149
+ case 'Escape':
150
+ inputRef.current.blur();
151
+ escapeHandler();
152
+ break;
153
+
154
+ case 'Enter':
155
+ inputRef.current.blur();
156
+ returnHandler();
157
+ break;
158
+
159
+ default:
160
+ break;
161
+ }
162
+
163
+ escaping.current = false;
164
+ };
165
+
166
+ return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, {
167
+ ref: ref
168
+ }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement("div", {
169
+ className: (0, _classnames.default)(blockClass, (0, _defineProperty2.default)({}, "".concat(blockClass, "-focused"), focused)),
170
+ onFocus: onFocusHandler,
171
+ onBlur: onBlurHandler
172
+ }, /*#__PURE__*/_react.default.createElement("label", {
173
+ className: "".concat(blockClass, "__text-input-label"),
174
+ htmlFor: id
175
+ }, labelText), /*#__PURE__*/_react.default.createElement("input", {
176
+ id: id,
177
+ className: (0, _classnames.default)("".concat(blockClass, "__text-input"), "".concat(_settings.carbon.prefix, "--text-input"), "".concat(_settings.carbon.prefix, "--text-input--sm")),
178
+ type: "text",
179
+ value: value,
180
+ onChange: onChangeHandler,
181
+ ref: inputRef // readOnly={readOnly}
182
+ ,
183
+ onKeyDown: onKeyHandler
184
+ }), focused ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, invalid && /*#__PURE__*/_react.default.createElement(_icons.WarningFilled, {
185
+ size: 16,
186
+ className: "".concat(blockClass, "__warning-icon")
187
+ }), /*#__PURE__*/_react.default.createElement(_react2.Button, {
188
+ hasIconOnly: true,
189
+ renderIcon: function renderIcon() {
190
+ return /*#__PURE__*/_react.default.createElement(_icons.Close, {
191
+ size: 24
192
+ });
193
+ },
194
+ size: "sm",
195
+ iconDescription: cancelLabel,
196
+ onClick: onCancelHandler,
197
+ kind: "ghost",
198
+ tabIndex: 0,
199
+ key: "cancel",
200
+ className: "".concat(blockClass, "__btn ").concat(blockClass, "__btn-cancel")
201
+ }), /*#__PURE__*/_react.default.createElement(_react2.Button, {
202
+ hasIconOnly: true,
203
+ renderIcon: function renderIcon() {
204
+ return /*#__PURE__*/_react.default.createElement(_icons.Checkmark, {
205
+ size: 24
206
+ });
207
+ },
208
+ size: "sm",
209
+ iconDescription: saveLabel,
210
+ onClick: onSaveHandler,
211
+ kind: "ghost",
212
+ tabIndex: 0,
213
+ key: "save",
214
+ className: "".concat(blockClass, "__btn ").concat(blockClass, "__btn-save"),
215
+ disabled: !canSave
216
+ })) : /*#__PURE__*/_react.default.createElement(_react2.Button, {
217
+ className: "".concat(blockClass, "__btn ").concat(blockClass, "__btn-edit"),
218
+ hasIconOnly: true // renderIcon={readOnly ? EditOff24 : Edit24}
219
+ ,
220
+ renderIcon: function renderIcon() {
221
+ return /*#__PURE__*/_react.default.createElement(_icons.Edit, {
222
+ size: 24
223
+ });
224
+ },
225
+ size: "sm" // iconDescription={readOnly ? readOnlyLabel : editLabel}
226
+ ,
227
+ iconDescription: editLabel,
228
+ onClick: onFocusHandler,
229
+ kind: "ghost",
230
+ tabIndex: 0,
231
+ key: "edit"
232
+ })), focused && invalid && /*#__PURE__*/_react.default.createElement("p", {
233
+ className: "".concat(blockClass, "__warning-text")
234
+ }, invalidLabel));
235
+ });
236
+ exports.InlineEditV2 = InlineEditV2;
237
+ exports.InlineEditV2 = InlineEditV2 = _settings.pkg.checkComponentEnabled(InlineEditV2, componentName);
238
+ InlineEditV2.displayName = componentName;
239
+ InlineEditV2.propTypes = {
240
+ /**
241
+ * label for cancel button
242
+ */
243
+ cancelLabel: _propTypes.default.string.isRequired,
244
+
245
+ /**
246
+ * label for edit button
247
+ */
248
+ editLabel: _propTypes.default.string.isRequired,
249
+
250
+ /**
251
+ * Specify a custom id for the input
252
+ */
253
+ id: _propTypes.default.string.isRequired,
254
+
255
+ /**
256
+ * determines if the input is invalid
257
+ */
258
+ invalid: _propTypes.default.bool,
259
+
260
+ /**
261
+ * text that is displayed if the input is invalid
262
+ */
263
+ invalidLabel: _propTypes.default.string,
264
+
265
+ /**
266
+ * Provide the text that will be read by a screen reader when visiting this control
267
+ */
268
+ labelText: _propTypes.default.string.isRequired,
269
+
270
+ /**
271
+ * 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
272
+ */
273
+ onCancel: _propTypes.default.func.isRequired,
274
+
275
+ /**
276
+ * handler that is called when the input is updated
277
+ */
278
+ onChange: _propTypes.default.func.isRequired,
279
+
280
+ /**
281
+ * 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
282
+ */
283
+ onSave: _propTypes.default.func.isRequired,
284
+
285
+ /**
286
+ * determines if the input is in readOnly mode
287
+ */
288
+ // readOnly: PropTypes.bool,
289
+
290
+ /**
291
+ * label for the edit button that displays when in read only mode
292
+ */
293
+ // readOnlyLabel: PropTypes.string,
294
+
295
+ /**
296
+ * label for save button
297
+ */
298
+ saveLabel: _propTypes.default.string.isRequired,
299
+
300
+ /**
301
+ * current value of the input
302
+ */
303
+ value: _propTypes.default.string.isRequired
304
+ };
305
+ InlineEditV2.defaultProps = {
306
+ invalid: false,
307
+ invalidLabel: '' // readOnly: false,
308
+
309
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "InlineEditV2", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _InlineEditV.InlineEditV2;
10
+ }
11
+ });
12
+
13
+ var _InlineEditV = require("./InlineEditV2");
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
- var _iconsReact = require("@carbon/icons-react");
14
+ var _icons = require("@carbon/react/icons");
15
15
 
16
16
  var _settings = require("../../settings");
17
17
 
@@ -31,7 +31,7 @@ var ModifiedTabLabelNew = function ModifiedTabLabelNew(_ref) {
31
31
  className: "".concat(blockClass, "__tab-new__label")
32
32
  }, label), /*#__PURE__*/_react.default.createElement("span", {
33
33
  className: "".concat(blockClass, "__tab-new-img")
34
- }, /*#__PURE__*/_react.default.createElement(_iconsReact.Add, {
34
+ }, /*#__PURE__*/_react.default.createElement(_icons.Add, {
35
35
  size: 20
36
36
  })));
37
37
  };
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
- var _iconsReact = require("@carbon/icons-react");
14
+ var _icons = require("@carbon/react/icons");
15
15
 
16
16
  var _settings = require("../../settings");
17
17
 
@@ -37,9 +37,9 @@ var ModifiedTabLabelWithClose = function ModifiedTabLabelWithClose(_ref) {
37
37
  onClick: handleClose,
38
38
  className: "".concat(blockClass, "__tab-close"),
39
39
  type: "button"
40
- }, unsavedContent ? /*#__PURE__*/_react.default.createElement(_iconsReact.CloseFilled, {
40
+ }, unsavedContent ? /*#__PURE__*/_react.default.createElement(_icons.CloseFilled, {
41
41
  size: 16
42
- }) : /*#__PURE__*/_react.default.createElement(_iconsReact.Close, {
42
+ }) : /*#__PURE__*/_react.default.createElement(_icons.Close, {
43
43
  size: 16
44
44
  })));
45
45
  };
@@ -25,6 +25,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
25
25
 
26
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
27
 
28
+ //
29
+ // Copyright IBM Corp. 2022, 2022
30
+ //
31
+ // This source code is licensed under the Apache-2.0 license found in the
32
+ // LICENSE file in the root directory of this source tree.
33
+ //
28
34
  var componentName = 'MultiAddSelect';
29
35
  var MultiAddSelect = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
30
36
  return /*#__PURE__*/_react.default.createElement(_AddSelect.AddSelect, (0, _extends2.default)({}, props, {
@@ -86,6 +92,11 @@ MultiAddSelect.propTypes = {
86
92
  */
87
93
  globalSearchPlaceholder: _propTypes.default.string,
88
94
 
95
+ /**
96
+ * the theme for the empty state illustration
97
+ */
98
+ illustrationTheme: _propTypes.default.oneOf(['light', 'dark']),
99
+
89
100
  /**
90
101
  * title that displays in the sidebar / influencer
91
102
  */
@@ -106,7 +117,8 @@ MultiAddSelect.propTypes = {
106
117
  avatar: _propTypes.default.shape({
107
118
  alt: _propTypes.default.string,
108
119
  icon: _propTypes.default.func,
109
- src: _propTypes.default.string
120
+ src: _propTypes.default.string,
121
+ theme: _propTypes.default.oneOf(['light', 'dark'])
110
122
  }),
111
123
  children: _propTypes.default.object,
112
124
  icon: _propTypes.default.func,
@@ -167,15 +179,10 @@ MultiAddSelect.propTypes = {
167
179
  */
168
180
  open: _propTypes.default.bool,
169
181
 
170
- /**
171
- * description for the remove item icon
172
- */
173
- removeIconDescription: _propTypes.default.string,
174
-
175
182
  /**
176
183
  * text that displays when displaying filtered items
177
184
  */
178
- searchResultsLabel: _propTypes.default.string,
185
+ searchResultsTitle: _propTypes.default.string,
179
186
 
180
187
  /**
181
188
  * header text
@@ -35,7 +35,7 @@ var _NotificationsEmptyState = require("../EmptyStates/NotificationsEmptyState")
35
35
 
36
36
  var _react2 = require("@carbon/react");
37
37
 
38
- var _iconsReact = require("@carbon/icons-react");
38
+ var _icons = require("@carbon/react/icons");
39
39
 
40
40
  var _excluded = ["className", "data", "daysAgoText", "dismissAllLabel", "dismissSingleNotificationIconDescription", "doNotDisturbDefaultToggled", "doNotDisturbLabel", "emptyStateLabel", "hourAgoText", "hoursAgoText", "minuteAgoText", "minutesAgoText", "monthAgoText", "monthsAgoText", "nowText", "onClickOutside", "onDismissAllNotifications", "onDismissSingleNotification", "onDoNotDisturbChange", "onSettingsClick", "onViewAllClick", "open", "previousLabel", "readLessLabel", "readMoreLabel", "secondsAgoText", "settingsIconDescription", "title", "todayLabel", "viewAllLabel", "yearAgoText", "yearsAgoText", "yesterdayAtText", "yesterdayLabel"];
41
41
 
@@ -250,7 +250,7 @@ var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref,
250
250
  kind: "ghost",
251
251
  size: "sm",
252
252
  renderIcon: function renderIcon(props) {
253
- return /*#__PURE__*/_react.default.createElement(_iconsReact.ChevronDown, (0, _extends2.default)({
253
+ return /*#__PURE__*/_react.default.createElement(_icons.ChevronDown, (0, _extends2.default)({
254
254
  size: 16
255
255
  }, props));
256
256
  },
@@ -293,16 +293,16 @@ var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref,
293
293
 
294
294
  event.which === 13 && notification.onNotificationClick(notification);
295
295
  }
296
- }, notification.type === 'error' && /*#__PURE__*/_react.default.createElement(_iconsReact.ErrorFilled, {
296
+ }, notification.type === 'error' && /*#__PURE__*/_react.default.createElement(_icons.ErrorFilled, {
297
297
  size: 16,
298
298
  className: (0, _classnames.default)(["".concat(blockClass, "__notification-status-icon"), "".concat(blockClass, "__notification-status-icon-error")])
299
- }), notification.type === 'success' && /*#__PURE__*/_react.default.createElement(_iconsReact.CheckmarkFilled, {
299
+ }), notification.type === 'success' && /*#__PURE__*/_react.default.createElement(_icons.CheckmarkFilled, {
300
300
  size: 16,
301
301
  className: (0, _classnames.default)(["".concat(blockClass, "__notification-status-icon"), "".concat(blockClass, "__notification-status-icon-success")])
302
- }), notification.type === 'warning' && /*#__PURE__*/_react.default.createElement(_iconsReact.WarningAltFilled, {
302
+ }), notification.type === 'warning' && /*#__PURE__*/_react.default.createElement(_icons.WarningAltFilled, {
303
303
  size: 16,
304
304
  className: (0, _classnames.default)(["".concat(blockClass, "__notification-status-icon"), "".concat(blockClass, "__notification-status-icon-warning")])
305
- }), notification.type === 'informational' && /*#__PURE__*/_react.default.createElement(_iconsReact.InformationSquareFilled, {
305
+ }), notification.type === 'informational' && /*#__PURE__*/_react.default.createElement(_icons.InformationSquareFilled, {
306
306
  size: 16,
307
307
  className: (0, _classnames.default)(["".concat(blockClass, "__notification-status-icon"), "".concat(blockClass, "__notification-status-icon-informational")])
308
308
  }), /*#__PURE__*/_react.default.createElement("div", {
@@ -337,7 +337,7 @@ var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref,
337
337
  onClick: function onClick(event) {
338
338
  return dismissSingleNotification(event, notification);
339
339
  }
340
- }, /*#__PURE__*/_react.default.createElement(_iconsReact.Close, {
340
+ }, /*#__PURE__*/_react.default.createElement(_icons.Close, {
341
341
  size: 16
342
342
  })));
343
343
  };
@@ -413,7 +413,7 @@ var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref,
413
413
  size: "sm",
414
414
  className: "".concat(blockClass, "__settings-button"),
415
415
  renderIcon: function renderIcon(props) {
416
- return /*#__PURE__*/_react.default.createElement(_iconsReact.Settings, (0, _extends2.default)({
416
+ return /*#__PURE__*/_react.default.createElement(_icons.Settings, (0, _extends2.default)({
417
417
  size: 16
418
418
  }, props));
419
419
  },
@@ -29,13 +29,15 @@ var _uuidv = _interopRequireDefault(require("../../global/js/utils/uuidv4"));
29
29
 
30
30
  var _settings = require("../../settings");
31
31
 
32
+ var _hooks = require("../../global/js/hooks");
33
+
32
34
  var _react2 = require("@carbon/react");
33
35
 
34
- var _iconsReact = require("@carbon/icons-react");
36
+ var _icons = require("@carbon/react/icons");
35
37
 
36
38
  var carbonMotion = _interopRequireWildcard(require("@carbon/motion"));
37
39
 
38
- var _excluded = ["children", "className", "enabled", "invalid", "invalidText", "locked", "lockedText", "onToggle", "open", "size", "summary", "title", "titleId", "warn", "warnText"];
40
+ var _excluded = ["children", "className", "enabled", "invalid", "invalidText", "locked", "lockedText", "onChange", "onToggle", "open", "size", "summary", "title", "titleId", "warn", "warnText"];
39
41
 
40
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
41
43
 
@@ -47,6 +49,7 @@ var componentName = 'OptionsTile'; // NOTE: the component SCSS is not imported h
47
49
  // Default values for props
48
50
 
49
51
  var defaults = {
52
+ onChange: function onChange() {},
50
53
  size: 'xl'
51
54
  };
52
55
  /**
@@ -61,6 +64,8 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
61
64
  invalidText = _ref.invalidText,
62
65
  locked = _ref.locked,
63
66
  lockedText = _ref.lockedText,
67
+ _ref$onChange = _ref.onChange,
68
+ _onChange = _ref$onChange === void 0 ? defaults.onChange : _ref$onChange,
64
69
  onToggle = _ref.onToggle,
65
70
  open = _ref.open,
66
71
  _ref$size = _ref.size,
@@ -74,18 +79,24 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
74
79
 
75
80
  var _useState = (0, _react.useState)(open),
76
81
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
77
- isOpen = _useState2[0],
78
- setIsOpen = _useState2[1];
82
+ prevIsOpen = _useState2[0],
83
+ setPrevIsOpen = _useState2[1];
79
84
 
80
- var _useState3 = (0, _react.useState)(open),
85
+ var _useState3 = (0, _react.useState)(false),
81
86
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
82
- prevIsOpen = _useState4[0],
83
- setPrevIsOpen = _useState4[1];
84
-
85
- var _useState5 = (0, _react.useState)(false),
86
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
87
- closing = _useState6[0],
88
- setClosing = _useState6[1];
87
+ closing = _useState4[0],
88
+ setClosing = _useState4[1];
89
+
90
+ var _useControllableState = (0, _hooks.useControllableState)({
91
+ value: open,
92
+ defaultValue: open || null,
93
+ onChange: function onChange(value) {
94
+ return _onChange(value);
95
+ }
96
+ }),
97
+ _useControllableState2 = (0, _slicedToArray2.default)(_useControllableState, 2),
98
+ isOpen = _useControllableState2[0],
99
+ setIsOpen = _useControllableState2[1];
89
100
 
90
101
  var detailsRef = (0, _react.useRef)(null);
91
102
  var contentRef = (0, _react.useRef)(null);
@@ -194,15 +205,15 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
194
205
  var summaryClasses = ["".concat(blockClass, "__summary")];
195
206
 
196
207
  if (invalid) {
197
- Icon = _iconsReact.WarningFilled;
208
+ Icon = _icons.WarningFilled;
198
209
  text = invalidText;
199
210
  summaryClasses.push("".concat(blockClass, "__summary--invalid"));
200
211
  } else if (warn) {
201
- Icon = _iconsReact.WarningAltFilled;
212
+ Icon = _icons.WarningAltFilled;
202
213
  text = warnText;
203
214
  summaryClasses.push("".concat(blockClass, "__summary--warn"));
204
215
  } else if (locked) {
205
- Icon = _iconsReact.Locked;
216
+ Icon = _icons.Locked;
206
217
  summaryClasses.push("".concat(blockClass, "__summary--locked"));
207
218
 
208
219
  if (!text) {
@@ -256,7 +267,7 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
256
267
  }, /*#__PURE__*/_react.default.createElement("summary", {
257
268
  className: "".concat(blockClass, "__header"),
258
269
  onClick: toggle
259
- }, /*#__PURE__*/_react.default.createElement(_iconsReact.ChevronDown, {
270
+ }, /*#__PURE__*/_react.default.createElement(_icons.ChevronDown, {
260
271
  size: 16,
261
272
  className: "".concat(blockClass, "__chevron")
262
273
  }), renderTitle()), /*#__PURE__*/_react.default.createElement("div", {
@@ -264,7 +275,7 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
264
275
  ref: contentRef
265
276
  }, isLocked && /*#__PURE__*/_react.default.createElement("p", {
266
277
  className: "".concat(blockClass, "__locked-text")
267
- }, /*#__PURE__*/_react.default.createElement(_iconsReact.Locked, {
278
+ }, /*#__PURE__*/_react.default.createElement(_icons.Locked, {
268
279
  size: 16
269
280
  }), lockedText), children)) : /*#__PURE__*/_react.default.createElement("div", {
270
281
  className: "".concat(blockClass, "__static-content")
@@ -318,6 +329,12 @@ OptionsTile.propTypes = {
318
329
  */
319
330
  lockedText: _propTypes.default.string,
320
331
 
332
+ /**
333
+ * Provide a function which will be called each time the user
334
+ * toggles the open state of the OptionsTile.
335
+ */
336
+ onChange: _propTypes.default.func,
337
+
321
338
  /**
322
339
  * Provide a function which will be called each time the user
323
340
  * interacts with the toggle.
@@ -45,7 +45,7 @@ var _TagSet = require("../TagSet/TagSet");
45
45
 
46
46
  var _ButtonSetWithOverflow = require("../ButtonSetWithOverflow");
47
47
 
48
- var _iconsReact = require("@carbon/icons-react");
48
+ var _icons = require("@carbon/react/icons");
49
49
 
50
50
  var _PageHeaderUtils = require("./PageHeaderUtils");
51
51
 
@@ -330,7 +330,7 @@ var PageHeader = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
330
330
  var current = _ref5.current;
331
331
  // on window resize and other updates some values may have changed
332
332
  checkUpdateVerticalSpace();
333
- setWidthIsNarrow(current.innerWidth < _layout.breakpoints.md.width); // small (below medium) media query
333
+ setWidthIsNarrow(current.innerWidth / 16 < parseInt(_layout.breakpoints.md.width)); // small (below medium) media query
334
334
  }, [actionBarItems, children, breadcrumbs, enableBreadcrumbScroll, navigation, pageActions, subtitle, tags, title]);
335
335
  (0, _react.useEffect)(function () {
336
336
  checkUpdateVerticalSpace(); // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -373,7 +373,7 @@ var PageHeader = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
373
373
  };
374
374
 
375
375
  (0, _react.useEffect)(function () {
376
- if (typeof collapseHeader === 'boolean') {
376
+ if (collapseHeader === true) {
377
377
  (0, _PageHeaderUtils.utilSetCollapsed)(collapseHeader, metrics.headerOffset, metrics.headerTopValue);
378
378
  }
379
379
  }, [collapseHeader, metrics.headerOffset, metrics.headerTopValue]);
@@ -484,7 +484,7 @@ var PageHeader = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
484
484
  kind: "ghost",
485
485
  onClick: handleCollapseToggle,
486
486
  renderIcon: function renderIcon(props) {
487
- return /*#__PURE__*/_react.default.createElement(_iconsReact.ChevronUp, (0, _extends2.default)({
487
+ return /*#__PURE__*/_react.default.createElement(_icons.ChevronUp, (0, _extends2.default)({
488
488
  size: 16
489
489
  }, props));
490
490
  },
@@ -513,7 +513,7 @@ var PageHeader = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
513
513
  onWidthChange: handleWidthChange,
514
514
  buttons: pageActions,
515
515
  buttonSetOverflowLabel: pageActionsOverflowLabel,
516
- rightAlign: true
516
+ rightAlign: !widthIsNarrow
517
517
  })));
518
518
  }
519
519
  }
@@ -81,7 +81,7 @@ var PageHeaderTitle = function PageHeaderTitle(_ref) {
81
81
  titleText = asText;
82
82
  }
83
83
 
84
- return /*#__PURE__*/_react.default.createElement("div", {
84
+ return /*#__PURE__*/_react.default.createElement("h1", {
85
85
  className: (0, _classnames.default)("".concat(blockClass, "__title"), (0, _defineProperty2.default)({}, "".concat(blockClass, "__title--editable"), isEditable), (0, _defineProperty2.default)({}, "".concat(blockClass, "__title--fades"), hasBreadcrumbRow)),
86
86
  title: titleText
87
87
  }, titleInnards);
@@ -135,6 +135,11 @@ ProductiveCard.propTypes = {
135
135
  */
136
136
  primaryButtonIcon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
137
137
 
138
+ /**
139
+ * Determines if the primary button is on the top or bottom of the card
140
+ */
141
+ primaryButtonPlacement: _propTypes.default.oneOf(['top', 'bottom']),
142
+
138
143
  /**
139
144
  * The text that's displayed in the primary button
140
145
  */