@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
@@ -2,14 +2,19 @@ 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 = ["className", "clearFiltersText", "closeIconDescription", "columnInputPlaceholder", "defaultModifiers", "description", "filterByLabel", "globalFilterOpts", "globalFiltersIconDescription", "globalFiltersPlaceholderText", "globalFiltersPrimaryButtonText", "globalFiltersSecondaryButtonText", "globalSearchLabel", "globalSearchPlaceholder", "globalSortBy", "influencerTitle", "items", "itemsLabel", "metaIconDescription", "metaPanelTitle", "multi", "navIconDescription", "noResultsDescription", "noResultsTitle", "noSelectionDescription", "noSelectionTitle", "normalizedItems", "onClose", "onCloseButtonText", "onSubmit", "onSubmitButtonText", "open", "portalTarget", "searchResultsLabel", "sortByLabel", "title", "useNormalizedItems"];
5
+ var _excluded = ["className", "clearFiltersText", "closeIconDescription", "columnInputPlaceholder", "defaultModifiers", "description", "filterByLabel", "globalFilterOpts", "globalFiltersLabel", "globalFiltersIconDescription", "globalFiltersPlaceholderText", "globalFiltersPrimaryButtonText", "globalFiltersSecondaryButtonText", "globalSearchLabel", "globalSearchPlaceholder", "globalSortBy", "illustrationTheme", "influencerTitle", "items", "itemsLabel", "metaIconDescription", "metaPanelTitle", "multi", "navIconDescription", "noResultsDescription", "noResultsTitle", "noSelectionDescription", "noSelectionTitle", "normalizedItems", "onClose", "onCloseButtonText", "onSubmit", "onSubmitButtonText", "open", "portalTarget", "searchResultsTitle", "title", "useNormalizedItems"];
6
+
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
+
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
+
6
11
  //
7
- // Copyright IBM Corp. 2022
12
+ // Copyright IBM Corp. 2022, 2022
8
13
  //
9
14
  // This source code is licensed under the Apache-2.0 license found in the
10
15
  // LICENSE file in the root directory of this source tree.
11
16
  //
12
- import React, { useState } from 'react';
17
+ import React, { forwardRef, useState } from 'react';
13
18
  import PropTypes from 'prop-types';
14
19
  import cx from 'classnames';
15
20
  import { Tag } from '@carbon/react';
@@ -28,7 +33,7 @@ import usePath from './hooks/usePath';
28
33
  import { pkg } from '../../settings';
29
34
  var blockClass = "".concat(pkg.prefix, "--add-select");
30
35
  var componentName = 'AddSelectBody';
31
- export var AddSelectBody = function AddSelectBody(_ref) {
36
+ export var AddSelectBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
32
37
  var _cx, _path$;
33
38
 
34
39
  var className = _ref.className,
@@ -39,6 +44,7 @@ export var AddSelectBody = function AddSelectBody(_ref) {
39
44
  description = _ref.description,
40
45
  filterByLabel = _ref.filterByLabel,
41
46
  globalFilterOpts = _ref.globalFilterOpts,
47
+ globalFiltersLabel = _ref.globalFiltersLabel,
42
48
  globalFiltersIconDescription = _ref.globalFiltersIconDescription,
43
49
  globalFiltersPlaceholderText = _ref.globalFiltersPlaceholderText,
44
50
  globalFiltersPrimaryButtonText = _ref.globalFiltersPrimaryButtonText,
@@ -46,6 +52,7 @@ export var AddSelectBody = function AddSelectBody(_ref) {
46
52
  globalSearchLabel = _ref.globalSearchLabel,
47
53
  globalSearchPlaceholder = _ref.globalSearchPlaceholder,
48
54
  globalSortBy = _ref.globalSortBy,
55
+ illustrationTheme = _ref.illustrationTheme,
49
56
  influencerTitle = _ref.influencerTitle,
50
57
  items = _ref.items,
51
58
  itemsLabel = _ref.itemsLabel,
@@ -64,8 +71,7 @@ export var AddSelectBody = function AddSelectBody(_ref) {
64
71
  onSubmitButtonText = _ref.onSubmitButtonText,
65
72
  open = _ref.open,
66
73
  portalTarget = _ref.portalTarget,
67
- searchResultsLabel = _ref.searchResultsLabel,
68
- sortByLabel = _ref.sortByLabel,
74
+ searchResultsTitle = _ref.searchResultsTitle,
69
75
  title = _ref.title,
70
76
  useNormalizedItems = _ref.useNormalizedItems,
71
77
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -114,9 +120,28 @@ export var AddSelectBody = function AddSelectBody(_ref) {
114
120
  var _usePath = usePath(itemsLabel),
115
121
  path = _usePath.path,
116
122
  setPath = _usePath.setPath,
117
- pathOnclick = _usePath.pathOnclick;
123
+ pathOnclick = _usePath.pathOnclick,
124
+ resetPath = _usePath.resetPath;
125
+
126
+ var resetState = function resetState() {
127
+ setSingleSelection('');
128
+ setMultiSelection([]);
129
+ setSearchTerm('');
130
+ setAppliedGlobalFilters({});
131
+ setDisplayMetaPanel({});
132
+ setAppliedModifiers(defaultModifiers);
133
+ setSortAttribute('');
134
+ setSortDirection('');
135
+ setParentSelected(null);
136
+ resetPath();
137
+ };
138
+
139
+ var onCloseHandler = function onCloseHandler() {
140
+ resetState();
141
+ onClose();
142
+ };
118
143
 
119
- var classNames = cx(className, blockClass, (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__single"), !multi), _defineProperty(_cx, "".concat(blockClass, "__multi"), multi), _cx));
144
+ var tearsheetClassnames = cx(className, blockClass, (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__single"), !multi), _defineProperty(_cx, "".concat(blockClass, "__multi"), multi), _cx));
120
145
  var globalFilterKeys = Object.keys(appliedGlobalFilters);
121
146
  var globalFiltersApplied = globalFilterKeys.length > 0; // handlers
122
147
 
@@ -141,6 +166,8 @@ export var AddSelectBody = function AddSelectBody(_ref) {
141
166
  } else {
142
167
  onSubmit(singleSelection);
143
168
  }
169
+
170
+ onCloseHandler();
144
171
  };
145
172
 
146
173
  var setShowBreadsCrumbs = function setShowBreadsCrumbs() {
@@ -175,6 +202,7 @@ export var AddSelectBody = function AddSelectBody(_ref) {
175
202
  var showSort = (searchTerm || globalFiltersApplied) && hasResults;
176
203
  var showTags = setShowTags();
177
204
  var commonListProps = {
205
+ displayMetalPanel: displayMetalPanel,
178
206
  metaIconDescription: metaIconDescription,
179
207
  multi: multi,
180
208
  multiSelection: multiSelection,
@@ -187,28 +215,31 @@ export var AddSelectBody = function AddSelectBody(_ref) {
187
215
  setDisplayMetaPanel: setDisplayMetaPanel,
188
216
  parentId: path[0].id
189
217
  };
190
- var commonTearsheetProps = {
191
- className: classNames,
218
+
219
+ var commonTearsheetProps = _objectSpread(_objectSpread({}, rest), {}, {
220
+ className: tearsheetClassnames,
192
221
  open: open,
193
222
  title: title,
194
223
  description: description,
195
- closeIconDescription: 'temp description',
196
224
  actions: [{
197
225
  label: onCloseButtonText,
198
226
  kind: 'secondary',
199
- onClick: onClose
227
+ onClick: onCloseHandler
200
228
  }, {
201
229
  label: onSubmitButtonText,
202
230
  kind: 'primary',
203
231
  onClick: submitHandler,
204
232
  disabled: multi ? multiSelection.length === 0 : !singleSelection
205
233
  }],
206
- portalTarget: portalTarget
207
- };
234
+ portalTarget: portalTarget,
235
+ ref: ref
236
+ });
237
+
208
238
  var sidebarProps = {
209
239
  appliedModifiers: appliedModifiers,
210
240
  closeIconDescription: closeIconDescription,
211
241
  displayMetalPanel: displayMetalPanel,
242
+ illustrationTheme: illustrationTheme,
212
243
  influencerTitle: influencerTitle,
213
244
  items: useNormalizedItems ? normalizedItems : items.entries,
214
245
  metaPanelTitle: metaPanelTitle,
@@ -229,6 +260,7 @@ export var AddSelectBody = function AddSelectBody(_ref) {
229
260
  handleSearch: handleSearch,
230
261
  multi: multi,
231
262
  filterOpts: globalFilterOpts,
263
+ filtersLabel: globalFiltersLabel,
232
264
  handleFilter: handleFilter,
233
265
  primaryButtonText: globalFiltersPrimaryButtonText,
234
266
  secondaryButtonText: globalFiltersSecondaryButtonText,
@@ -238,15 +270,16 @@ export var AddSelectBody = function AddSelectBody(_ref) {
238
270
  hasFiltersApplied: globalFiltersApplied,
239
271
  clearFiltersText: clearFiltersText
240
272
  }), /*#__PURE__*/React.createElement("div", {
241
- className: "".concat(blockClass, "__sub-header")
273
+ className: cx("".concat(blockClass, "__sub-header"), _defineProperty({}, "".concat(blockClass, "__sub-header-multi"), multi))
242
274
  }, /*#__PURE__*/React.createElement("div", {
243
- className: "".concat(blockClass, "__tag-container")
275
+ className: "".concat(blockClass, "__tags")
244
276
  }, showBreadsCrumbs ? /*#__PURE__*/React.createElement(AddSelectBreadcrumbs, {
245
277
  path: path,
246
- onClick: pathOnclick
278
+ onClick: pathOnclick,
279
+ multi: multi
247
280
  }) : /*#__PURE__*/React.createElement("p", {
248
- className: "".concat(blockClass, "__tag-container-label")
249
- }, searchTerm ? searchResultsLabel : itemsLabel), showTags && /*#__PURE__*/React.createElement(Tag, {
281
+ className: "".concat(blockClass, "__tags-label")
282
+ }, searchTerm ? searchResultsTitle : itemsLabel), showTags && /*#__PURE__*/React.createElement(Tag, {
250
283
  type: "gray",
251
284
  size: "sm"
252
285
  }, itemsToDisplay.length)), showSort && /*#__PURE__*/React.createElement(AddSelectSort, {
@@ -255,8 +288,7 @@ export var AddSelectBody = function AddSelectBody(_ref) {
255
288
  setSortDirection: setSortDirection,
256
289
  sortAttribute: sortAttribute,
257
290
  sortDirection: sortDirection,
258
- sortBy: globalSortBy,
259
- sortByLabel: sortByLabel
291
+ sortBy: globalSortBy
260
292
  }))), displayColumnView ? /*#__PURE__*/React.createElement("div", {
261
293
  className: "".concat(blockClass, "__columns")
262
294
  }, /*#__PURE__*/React.createElement(AddSelectColumn, _extends({}, commonListProps, {
@@ -276,13 +308,19 @@ export var AddSelectBody = function AddSelectBody(_ref) {
276
308
  className: "".concat(blockClass, "__body")
277
309
  }, /*#__PURE__*/React.createElement(NoDataEmptyState, {
278
310
  subtitle: noResultsDescription,
279
- title: noResultsTitle
311
+ title: noResultsTitle,
312
+ illustrationTheme: illustrationTheme
280
313
  }))));
281
- return /*#__PURE__*/React.createElement("div", rest, multi ? /*#__PURE__*/React.createElement(Tearsheet, _extends({}, commonTearsheetProps, {
282
- influencer: multi && /*#__PURE__*/React.createElement(AddSelectSidebar, sidebarProps),
283
- influencerPosition: "right"
284
- }), body) : /*#__PURE__*/React.createElement(TearsheetNarrow, commonTearsheetProps, body));
285
- };
314
+
315
+ if (multi) {
316
+ return /*#__PURE__*/React.createElement(Tearsheet, _extends({}, commonTearsheetProps, {
317
+ influencer: multi && /*#__PURE__*/React.createElement(AddSelectSidebar, sidebarProps),
318
+ influencerPosition: "right"
319
+ }), body);
320
+ }
321
+
322
+ return /*#__PURE__*/React.createElement(TearsheetNarrow, commonTearsheetProps, body);
323
+ });
286
324
  AddSelectBody.propTypes = {
287
325
  className: PropTypes.string,
288
326
  clearFiltersText: PropTypes.string,
@@ -293,12 +331,14 @@ AddSelectBody.propTypes = {
293
331
  filterByLabel: PropTypes.string,
294
332
  globalFilterOpts: PropTypes.array,
295
333
  globalFiltersIconDescription: PropTypes.string,
334
+ globalFiltersLabel: PropTypes.string,
296
335
  globalFiltersPlaceholderText: PropTypes.string,
297
336
  globalFiltersPrimaryButtonText: PropTypes.string,
298
337
  globalFiltersSecondaryButtonText: PropTypes.string,
299
338
  globalSearchLabel: PropTypes.string.isRequired,
300
339
  globalSearchPlaceholder: PropTypes.string,
301
340
  globalSortBy: PropTypes.array,
341
+ illustrationTheme: PropTypes.oneOf(['light', 'dark']),
302
342
  influencerTitle: PropTypes.string,
303
343
  items: PropTypes.shape({
304
344
  modifiers: PropTypes.shape({
@@ -311,11 +351,12 @@ AddSelectBody.propTypes = {
311
351
  entries: PropTypes.arrayOf(PropTypes.shape({
312
352
  avatar: PropTypes.shape({
313
353
  alt: PropTypes.string,
314
- icon: PropTypes.func,
315
- src: PropTypes.string
354
+ icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
355
+ src: PropTypes.string,
356
+ theme: PropTypes.oneOf(['light', 'dark'])
316
357
  }),
317
358
  children: PropTypes.object,
318
- icon: PropTypes.func,
359
+ icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
319
360
  id: PropTypes.string.isRequired,
320
361
  meta: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
321
362
  id: PropTypes.string,
@@ -343,7 +384,7 @@ AddSelectBody.propTypes = {
343
384
  onSubmitButtonText: PropTypes.string,
344
385
  open: PropTypes.bool,
345
386
  portalTarget: PropTypes.node,
346
- searchResultsLabel: PropTypes.string,
387
+ searchResultsTitle: PropTypes.string,
347
388
  sortByLabel: PropTypes.string,
348
389
  title: PropTypes.string,
349
390
  useNormalizedItems: PropTypes.bool
@@ -1,5 +1,6 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
2
  //
2
- // Copyright IBM Corp. 2022
3
+ // Copyright IBM Corp. 2022, 2022
3
4
  //
4
5
  // This source code is licensed under the Apache-2.0 license found in the
5
6
  // LICENSE file in the root directory of this source tree.
@@ -7,17 +8,23 @@
7
8
  import React from 'react';
8
9
  import { Breadcrumb, BreadcrumbItem } from '@carbon/react';
9
10
  import PropTypes from 'prop-types';
11
+ import cx from 'classnames';
12
+ import { pkg } from '../../settings';
13
+ var blockClass = "".concat(pkg.prefix, "--add-select__breadcrumbs");
10
14
  var componentName = 'AddSelectBreadcrumbs';
11
15
  export var AddSelectBreadcrumbs = function AddSelectBreadcrumbs(_ref) {
12
- var path = _ref.path,
13
- onClick = _ref.onClick;
16
+ var multi = _ref.multi,
17
+ onClick = _ref.onClick,
18
+ path = _ref.path;
14
19
 
15
20
  var clickHandler = function clickHandler(idx) {
16
21
  onClick(idx);
17
22
  };
18
23
 
24
+ var classNames = cx(blockClass, _defineProperty({}, "".concat(blockClass, "-multi"), multi));
19
25
  return /*#__PURE__*/React.createElement(Breadcrumb, {
20
- noTrailingSlash: true
26
+ noTrailingSlash: true,
27
+ className: classNames
21
28
  }, path.map(function (entry, idx) {
22
29
  var isCurrentPage = idx === path.length - 1;
23
30
  return /*#__PURE__*/React.createElement(BreadcrumbItem, {
@@ -30,6 +37,7 @@ export var AddSelectBreadcrumbs = function AddSelectBreadcrumbs(_ref) {
30
37
  }));
31
38
  };
32
39
  AddSelectBreadcrumbs.propTypes = {
40
+ multi: PropTypes.bool,
33
41
  onClick: PropTypes.func,
34
42
  path: PropTypes.array
35
43
  };
@@ -4,15 +4,15 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
5
  var _excluded = ["columnInputPlaceholder", "filterByLabel", "header", "items", "multiSelection", "parentId", "path", "setMultiSelection", "setPath"];
6
6
  //
7
- // Copyright IBM Corp. 2022
7
+ // Copyright IBM Corp. 2022, 2022
8
8
  //
9
9
  // This source code is licensed under the Apache-2.0 license found in the
10
10
  // LICENSE file in the root directory of this source tree.
11
11
  //
12
12
  import React, { useState } from 'react';
13
13
  import PropTypes from 'prop-types';
14
- import { TextInput, Tag, OverflowMenu, Checkbox, usePrefix } from '@carbon/react';
15
- import { Filter } from '@carbon/icons-react';
14
+ import { Search, Tag, OverflowMenu, Checkbox, usePrefix } from '@carbon/react';
15
+ import { Filter } from '@carbon/react/icons';
16
16
  import { pkg } from '../../settings';
17
17
  import { AddSelectList } from './AddSelectList';
18
18
  import { AddSelectSort } from './AddSelectSort';
@@ -165,16 +165,16 @@ export var AddSelectColumn = function AddSelectColumn(_ref) {
165
165
  className: colClass
166
166
  }, /*#__PURE__*/React.createElement("div", {
167
167
  className: "".concat(colClass, "-search-bar")
168
- }, /*#__PURE__*/React.createElement(TextInput, {
168
+ }, /*#__PURE__*/React.createElement(Search, {
169
169
  value: searchTerm,
170
170
  onChange: function onChange(e) {
171
171
  return setSearchTerm(e.target.value);
172
172
  },
173
- light: true,
174
173
  placeholder: columnInputPlaceholder,
175
174
  className: "".concat(colClass, "-input"),
176
175
  id: uuidv4(),
177
- labelText: columnInputPlaceholder
176
+ labelText: columnInputPlaceholder,
177
+ size: "md"
178
178
  }), /*#__PURE__*/React.createElement("div", {
179
179
  className: "".concat(colClass, "-sort-filter")
180
180
  }, /*#__PURE__*/React.createElement(AddSelectSort, {
@@ -211,14 +211,14 @@ export var AddSelectColumn = function AddSelectColumn(_ref) {
211
211
  }) ? true : false
212
212
  })));
213
213
  })))), /*#__PURE__*/React.createElement("div", {
214
- className: "".concat(blockClass, "__tag-container")
214
+ className: "".concat(blockClass, "__tags")
215
215
  }, /*#__PURE__*/React.createElement(Checkbox, {
216
216
  id: "".concat(uuidv4(), "-select-all"),
217
217
  className: "".concat(colClass, "__select-all"),
218
218
  checked: allSelected,
219
219
  onChange: selectAllHandler,
220
220
  labelText: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
221
- className: "".concat(blockClass, "__tag-container-label")
221
+ className: "".concat(blockClass, "__tag-label")
222
222
  }, header), /*#__PURE__*/React.createElement(Tag, {
223
223
  type: "gray",
224
224
  size: "sm"
@@ -7,16 +7,16 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
7
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
8
 
9
9
  //
10
- // Copyright IBM Corp. 2022
10
+ // Copyright IBM Corp. 2022, 2022
11
11
  //
12
12
  // This source code is licensed under the Apache-2.0 license found in the
13
13
  // LICENSE file in the root directory of this source tree.
14
14
  //
15
15
  import React, { useState } from 'react';
16
- import { Button, ButtonSet, Dropdown, TextInput, Tag } from '@carbon/react';
16
+ import { Button, ButtonSet, Dropdown, Search, Tag } from '@carbon/react';
17
17
  import cx from 'classnames';
18
18
  import PropTypes from 'prop-types';
19
- import { Filter } from '@carbon/icons-react';
19
+ import { Filter } from '@carbon/react/icons';
20
20
  import { pkg } from '../../settings';
21
21
  var blockClass = "".concat(pkg.prefix, "--add-select__global-filter");
22
22
  var componentName = 'AddSelectFilter';
@@ -24,6 +24,7 @@ export var AddSelectFilter = function AddSelectFilter(_ref) {
24
24
  var appliedFilters = _ref.appliedFilters,
25
25
  clearFiltersText = _ref.clearFiltersText,
26
26
  filterOpts = _ref.filterOpts,
27
+ filtersLabel = _ref.filtersLabel,
27
28
  handleFilter = _ref.handleFilter,
28
29
  handleSearch = _ref.handleSearch,
29
30
  hasFiltersApplied = _ref.hasFiltersApplied,
@@ -94,8 +95,8 @@ export var AddSelectFilter = function AddSelectFilter(_ref) {
94
95
  var dirtyInput = Object.keys(filters).length > 0;
95
96
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
96
97
  className: "".concat(blockClass, "-search")
97
- }, /*#__PURE__*/React.createElement(TextInput, {
98
- id: "temp-id",
98
+ }, /*#__PURE__*/React.createElement(Search, {
99
+ id: "add-select-global-search-filter",
99
100
  labelText: inputLabel,
100
101
  placeholder: inputPlaceholder,
101
102
  value: searchTerm,
@@ -113,12 +114,13 @@ export var AddSelectFilter = function AddSelectFilter(_ref) {
113
114
  },
114
115
  iconDescription: iconDescription,
115
116
  className: filterBtnClassnames,
116
- size: "md"
117
+ size: "lg",
118
+ tooltipPosition: "left"
117
119
  }), open && /*#__PURE__*/React.createElement("div", {
118
120
  className: blockClass
119
121
  }, /*#__PURE__*/React.createElement("div", {
120
122
  className: "".concat(blockClass, "-content")
121
- }, /*#__PURE__*/React.createElement("p", null, "Filters"), /*#__PURE__*/React.createElement("div", {
123
+ }, /*#__PURE__*/React.createElement("p", null, filtersLabel), /*#__PURE__*/React.createElement("div", {
122
124
  className: "".concat(blockClass, "-opts")
123
125
  }, filterOpts.map(function (filterOpts) {
124
126
  return /*#__PURE__*/React.createElement(Dropdown, {
@@ -167,6 +169,7 @@ AddSelectFilter.propTypes = {
167
169
  appliedFilters: PropTypes.object,
168
170
  clearFiltersText: PropTypes.string,
169
171
  filterOpts: PropTypes.array,
172
+ filtersLabel: PropTypes.string,
170
173
  handleFilter: PropTypes.func,
171
174
  handleSearch: PropTypes.func,
172
175
  hasFiltersApplied: PropTypes.bool,
@@ -2,14 +2,14 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
4
4
  //
5
- // Copyright IBM Corp. 2022
5
+ // Copyright IBM Corp. 2022, 2022
6
6
  //
7
7
  // This source code is licensed under the Apache-2.0 license found in the
8
8
  // LICENSE file in the root directory of this source tree.
9
9
  //
10
10
  import React from 'react';
11
- import { Button, Checkbox, RadioButton, StructuredListRow, StructuredListWrapper, StructuredListBody, StructuredListCell, Dropdown } from '@carbon/react';
12
- import { ChevronRight, View } from '@carbon/icons-react';
11
+ import { Button, Checkbox, Dropdown, RadioButton, StructuredListRow, StructuredListWrapper, StructuredListBody } from '@carbon/react';
12
+ import { ChevronRight, View } from '@carbon/react/icons';
13
13
  import PropTypes from 'prop-types';
14
14
  import cx from 'classnames';
15
15
  import { pkg } from '../../settings';
@@ -20,6 +20,7 @@ export var AddSelectList = function AddSelectList(_ref) {
20
20
  var _modifiers$options;
21
21
 
22
22
  var appliedModifiers = _ref.appliedModifiers,
23
+ displayMetalPanel = _ref.displayMetalPanel,
23
24
  filteredItems = _ref.filteredItems,
24
25
  metaIconDescription = _ref.metaIconDescription,
25
26
  modifiers = _ref.modifiers,
@@ -39,7 +40,10 @@ export var AddSelectList = function AddSelectList(_ref) {
39
40
  setSingleSelection(value);
40
41
  };
41
42
 
42
- var handleMultiSelection = function handleMultiSelection(id, checked) {
43
+ var handleMultiSelection = function handleMultiSelection(event, _ref2) {
44
+ var checked = _ref2.checked,
45
+ id = _ref2.id;
46
+
43
47
  if (checked) {
44
48
  var newValues = [].concat(_toConsumableArray(multiSelection), [id]);
45
49
  setMultiSelection(newValues);
@@ -52,25 +56,30 @@ export var AddSelectList = function AddSelectList(_ref) {
52
56
  }
53
57
  };
54
58
 
55
- var onNavigateItem = function onNavigateItem(_ref2) {
56
- var id = _ref2.id,
57
- title = _ref2.title;
59
+ var onNavigateItem = function onNavigateItem(_ref3) {
60
+ var id = _ref3.id,
61
+ title = _ref3.title;
58
62
  setParentSelected(id, title, parentId);
59
63
  };
60
64
 
61
65
  var isSelected = function isSelected(id) {
62
- return multiSelection.includes(id);
66
+ if (multi) {
67
+ return multiSelection.includes(id);
68
+ }
69
+
70
+ return id === singleSelection;
63
71
  };
64
72
 
65
- var getAvatarProps = function getAvatarProps(_ref3) {
66
- var src = _ref3.src,
67
- alt = _ref3.alt,
68
- icon = _ref3.icon,
69
- backgroundColor = _ref3.backgroundColor;
73
+ var getAvatarProps = function getAvatarProps(_ref4) {
74
+ var src = _ref4.src,
75
+ alt = _ref4.alt,
76
+ icon = _ref4.icon,
77
+ backgroundColor = _ref4.backgroundColor,
78
+ theme = _ref4.theme;
70
79
  return {
71
80
  className: "".concat(blockClass, "-cell-avatar"),
72
81
  size: 'lg',
73
- theme: 'light',
82
+ theme: theme,
74
83
  image: src,
75
84
  imageDescription: alt,
76
85
  icon: icon,
@@ -78,8 +87,8 @@ export var AddSelectList = function AddSelectList(_ref) {
78
87
  };
79
88
  };
80
89
 
81
- var getItemIcon = function getItemIcon(_ref4) {
82
- var Icon = _ref4.icon;
90
+ var getItemIcon = function getItemIcon(_ref5) {
91
+ var Icon = _ref5.icon;
83
92
  return /*#__PURE__*/React.createElement(Icon, null);
84
93
  };
85
94
 
@@ -95,31 +104,59 @@ export var AddSelectList = function AddSelectList(_ref) {
95
104
  setAppliedModifiers(modifiersClone);
96
105
  };
97
106
 
107
+ var metaPanelHandler = function metaPanelHandler(item) {
108
+ if (item.meta) {
109
+ setDisplayMetaPanel(item);
110
+ }
111
+ };
112
+
113
+ var isInMetaPanel = function isInMetaPanel(id) {
114
+ return id === (displayMetalPanel === null || displayMetalPanel === void 0 ? void 0 : displayMetalPanel.id);
115
+ };
116
+
98
117
  return /*#__PURE__*/React.createElement("div", {
99
- className: "".concat(blockClass, "-wrapper")
118
+ className: cx("".concat(blockClass, "-wrapper"), _defineProperty({}, "".concat(blockClass, "-wrapper-multi"), multi))
100
119
  }, /*#__PURE__*/React.createElement(StructuredListWrapper, {
101
120
  selection: true,
102
121
  className: "".concat(blockClass)
103
122
  }, /*#__PURE__*/React.createElement(StructuredListBody, null, filteredItems.map(function (item) {
123
+ var _cx2;
124
+
104
125
  return /*#__PURE__*/React.createElement(StructuredListRow, {
105
126
  key: item.id,
106
- className: cx("".concat(blockClass, "-row"), _defineProperty({}, "".concat(blockClass, "-row-selected"), isSelected(item.id)))
107
- }, /*#__PURE__*/React.createElement(StructuredListCell, {
108
- className: "".concat(blockClass, "-cell")
127
+ className: cx("".concat(blockClass, "-row"), (_cx2 = {}, _defineProperty(_cx2, "".concat(blockClass, "-row--selected"), isSelected(item.id)), _defineProperty(_cx2, "".concat(blockClass, "-row-meta--selected"), isInMetaPanel(item.id)), _cx2)),
128
+ onClick: function onClick(evt) {
129
+ return metaPanelHandler(item, evt);
130
+ }
131
+ }, /*#__PURE__*/React.createElement("div", {
132
+ className: "".concat(blockClass, "-cell"),
133
+ onClick: function onClick() {
134
+ metaPanelHandler(item);
135
+ },
136
+ onKeyDown: function onKeyDown() {
137
+ metaPanelHandler(item);
138
+ },
139
+ role: "button",
140
+ tabIndex: "0"
109
141
  }, /*#__PURE__*/React.createElement("div", {
110
142
  className: "".concat(blockClass, "-cell-wrapper")
111
143
  }, multi ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
112
144
  className: "".concat(blockClass, "-checkbox")
145
+ },
146
+ /*#__PURE__*/
147
+ // hacky way to prevent checkbox from triggering the meta onclick handler
148
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
149
+ React.createElement("div", {
150
+ onClick: function onClick(event) {
151
+ return event.stopPropagation();
152
+ }
113
153
  }, /*#__PURE__*/React.createElement(Checkbox, {
114
- onChange: function onChange(event, _ref5) {
115
- var checked = _ref5.checked;
116
- return handleMultiSelection(item.id, checked);
117
- },
154
+ onChange: handleMultiSelection,
118
155
  labelText: item.title,
119
156
  id: item.id,
120
157
  checked: isSelected(item.id),
121
158
  className: "".concat(blockClass, "-checkbox-wrapper")
122
- }), /*#__PURE__*/React.createElement("div", {
159
+ })), /*#__PURE__*/React.createElement("div", {
123
160
  className: "".concat(blockClass, "-checkbox-label-wrapper")
124
161
  }, item.avatar && /*#__PURE__*/React.createElement(UserProfileImage, getAvatarProps(item.avatar)), item.icon && /*#__PURE__*/React.createElement("div", {
125
162
  className: "".concat(blockClass, "-cell-icon")
@@ -151,7 +188,7 @@ export var AddSelectList = function AddSelectList(_ref) {
151
188
  onChange: function onChange() {
152
189
  return handleSingleSelection(item.id);
153
190
  },
154
- selected: item.id === singleSelection
191
+ checked: isSelected(item.id)
155
192
  }), item.children && /*#__PURE__*/React.createElement(Button, {
156
193
  className: "".concat(blockClass, "-view-children"),
157
194
  renderIcon: function renderIcon(props) {
@@ -181,9 +218,6 @@ export var AddSelectList = function AddSelectList(_ref) {
181
218
  tooltipPosition: "left",
182
219
  tooltipAlignment: "center",
183
220
  hasIconOnly: true,
184
- onClick: function onClick() {
185
- return setDisplayMetaPanel(item);
186
- },
187
221
  kind: "ghost",
188
222
  size: "sm"
189
223
  })))));
@@ -191,6 +225,7 @@ export var AddSelectList = function AddSelectList(_ref) {
191
225
  };
192
226
  AddSelectList.propTypes = {
193
227
  appliedModifiers: PropTypes.array,
228
+ displayMetalPanel: PropTypes.object,
194
229
  filteredItems: PropTypes.array,
195
230
  metaIconDescription: PropTypes.string,
196
231
  modifiers: PropTypes.object,
@@ -1,7 +1,13 @@
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, { isValidElement } from 'react';
3
9
  import PropTypes from 'prop-types';
4
- import { Close } from '@carbon/icons-react';
10
+ import { Close } from '@carbon/react/icons';
5
11
  import { Button } from '@carbon/react';
6
12
  import { pkg } from '../../settings';
7
13
  var blockClass = "".concat(pkg.prefix, "--add-select__meta-panel");
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
2
  var _excluded = ["meta", "icon", "avatar"];
3
3
  //
4
- // Copyright IBM Corp. 2022
4
+ // Copyright IBM Corp. 2022, 2022
5
5
  //
6
6
  // This source code is licensed under the Apache-2.0 license found in the
7
7
  // LICENSE file in the root directory of this source tree.
@@ -20,6 +20,7 @@ export var AddSelectSidebar = function AddSelectSidebar(_ref) {
20
20
  var appliedModifiers = _ref.appliedModifiers,
21
21
  closeIconDescription = _ref.closeIconDescription,
22
22
  displayMetalPanel = _ref.displayMetalPanel,
23
+ illustrationTheme = _ref.illustrationTheme,
23
24
  influencerTitle = _ref.influencerTitle,
24
25
  items = _ref.items,
25
26
  metaPanelTitle = _ref.metaPanelTitle,
@@ -106,13 +107,15 @@ export var AddSelectSidebar = function AddSelectSidebar(_ref) {
106
107
  }, /*#__PURE__*/React.createElement(NoDataEmptyState, {
107
108
  subtitle: noSelectionDescription,
108
109
  title: noSelectionTitle,
109
- size: "sm"
110
+ size: "sm",
111
+ illustrationTheme: illustrationTheme
110
112
  })));
111
113
  };
112
114
  AddSelectSidebar.propTypes = {
113
115
  appliedModifiers: PropTypes.array,
114
116
  closeIconDescription: PropTypes.string,
115
117
  displayMetalPanel: PropTypes.object,
118
+ illustrationTheme: PropTypes.oneOf(['light', 'dark']),
116
119
  influencerTitle: PropTypes.string,
117
120
  items: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
118
121
  metaPanelTitle: PropTypes.string,
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  //
4
- // Copyright IBM Corp. 2022
4
+ // Copyright IBM Corp. 2022, 2022
5
5
  //
6
6
  // This source code is licensed under the Apache-2.0 license found in the
7
7
  // LICENSE file in the root directory of this source tree.
@@ -9,7 +9,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
9
9
  import React from 'react';
10
10
  import PropTypes from 'prop-types';
11
11
  import { OverflowMenu, OverflowMenuItem } from '@carbon/react';
12
- import { ArrowsVertical, ArrowUp, ArrowDown } from '@carbon/icons-react';
12
+ import { ArrowsVertical, ArrowUp, ArrowDown } from '@carbon/react/icons';
13
13
  import { pkg } from '../../settings';
14
14
  var blockClass = "".concat(pkg.prefix, "--add-select-sort");
15
15
  var componentName = 'AddSelectSort';