@carbon/ibm-products 1.25.1 → 2.0.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +24586 -24335
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +10 -12
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +5770 -2820
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +10 -12
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +10452 -4491
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +10 -12
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +10809 -14925
- package/css/index.css.map +1 -1
- package/css/index.min.css +10 -12
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +14 -6
- package/es/components/AboutModal/AboutModal.js +37 -10
- package/es/components/ActionBar/ActionBar.js +4 -3
- package/es/components/ActionBar/ActionBarItem.js +15 -13
- package/es/components/ActionBar/ActionBarOverflowItems.js +3 -2
- package/es/components/ActionSet/ActionSet.js +6 -6
- package/es/components/AddSelect/AddSelect.js +4 -2
- package/es/components/AddSelect/AddSelectBody.js +12 -6
- package/es/components/AddSelect/AddSelectBreadcrumbs.js +1 -1
- package/es/components/AddSelect/AddSelectColumn.js +21 -10
- package/es/components/AddSelect/AddSelectFilter.js +8 -3
- package/es/components/AddSelect/AddSelectList.js +17 -7
- package/es/components/AddSelect/AddSelectMetaPanel.js +8 -3
- package/es/components/AddSelect/AddSelectSidebar.js +1 -1
- package/es/components/AddSelect/AddSelectSort.js +20 -8
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +24 -13
- package/es/components/ButtonMenu/ButtonMenu.js +15 -6
- package/es/components/ButtonMenu/ButtonMenuItem.js +1 -1
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -5
- package/es/components/Card/Card.js +12 -10
- package/es/components/Card/CardFooter.js +3 -3
- package/es/components/Cascade/Cascade.js +1 -1
- package/es/components/ComboButton/ComboButton.js +11 -3
- package/es/components/CreateFullPage/CreateFullPage.js +4 -4
- package/es/components/CreateFullPage/CreateFullPageStep.js +1 -1
- package/es/components/CreateInfluencer/CreateInfluencer.js +1 -1
- package/es/components/CreateModal/CreateModal.js +1 -1
- package/es/components/CreateSidePanel/CreateSidePanel.js +1 -1
- package/es/components/CreateTearsheet/CreateTearsheet.js +3 -3
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +4 -2
- package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +14 -5
- package/es/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +11 -4
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +1 -3
- package/es/components/Datagrid/Datagrid/Datagrid.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridHead.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +12 -5
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +140 -12
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +1 -1
- package/es/components/Datagrid/Datagrid/DraggableElement.js +4 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +8 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +7 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +10 -10
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +23 -26
- package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/CustomizeColumnStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/LeftPanelStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/RowSizeDropdownStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/SelectAllWithToggleStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/StickyActionsColumnStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/common.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/index.js +2 -2
- package/es/components/Datagrid/useActionsColumn.js +32 -7
- package/es/components/Datagrid/useRowExpander.js +6 -2
- package/es/components/Datagrid/useSelectRows.js +4 -3
- package/es/components/Datagrid/useSortableColumns.js +19 -8
- package/es/components/Datagrid/useStickyColumn.js +3 -0
- package/es/components/EditSidePanel/EditSidePanel.js +2 -2
- package/es/components/EditTearsheet/EditTearsheet.js +1 -1
- package/es/components/EditTearsheet/EditTearsheetForm.js +4 -2
- package/es/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +9 -9
- package/es/components/EmptyStates/EmptyState.js +1 -1
- package/es/components/EmptyStates/EmptyStateContent.js +1 -1
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/es/components/ExampleComponent/ExampleComponent.js +4 -4
- package/es/components/ExportModal/ExportModal.js +7 -4
- package/es/components/ExpressiveCard/ExpressiveCard.js +1 -1
- package/es/components/HTTPErrors/HTTPErrorContent.js +1 -1
- package/es/components/ImportModal/ImportModal.js +12 -6
- package/es/components/InlineEdit/InlineEdit.js +27 -15
- package/es/components/ModifiedTabs/ModifiedTabLabelNew.js +9 -5
- package/es/components/ModifiedTabs/ModifiedTabLabelWithClose.js +13 -15
- package/es/components/ModifiedTabs/ModifiedTabs.js +64 -42
- package/es/components/MultiAddSelect/MultiAddSelect.js +2 -2
- package/es/components/NotificationsPanel/NotificationsPanel.js +32 -18
- package/es/components/OptionsTile/OptionsTile.js +15 -9
- package/es/components/PageHeader/PageHeader.js +13 -9
- package/es/components/PageHeader/PageHeaderTitle.js +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +1 -1
- package/es/components/ProductiveCard/ProductiveCard.js +5 -0
- package/es/components/RemoveModal/RemoveModal.js +3 -2
- package/es/components/Saving/Saving.js +26 -8
- package/es/components/SidePanel/SidePanel.js +18 -10
- package/es/components/StatusIcon/StatusIcon.js +294 -74
- package/es/components/TagSet/TagSet.js +6 -15
- package/es/components/TagSet/TagSetModal.js +4 -3
- package/es/components/TagSet/TagSetOverflow.js +37 -34
- package/es/components/TagSet/constants.js +20 -0
- package/es/components/Tearsheet/Tearsheet.js +2 -2
- package/es/components/Tearsheet/TearsheetNarrow.js +1 -1
- package/es/components/Tearsheet/TearsheetShell.js +11 -9
- package/es/components/Toolbar/Toolbar.js +2 -1
- package/es/components/Toolbar/ToolbarButton.js +22 -13
- package/es/components/UserProfileImage/UserProfileImage.js +38 -13
- package/es/components/WebTerminal/WebTerminal.js +15 -6
- package/es/components/WebTerminal/preview-components/Navigation.js +11 -5
- package/es/components/_Canary/Canary.js +1 -1
- package/es/global/js/hooks/index.js +1 -1
- package/es/global/js/utils/test-helper.js +2 -1
- package/es/settings.js +2 -10
- package/lib/components/APIKeyModal/APIKeyModal.js +25 -17
- package/lib/components/AboutModal/AboutModal.js +43 -15
- package/lib/components/ActionBar/ActionBar.js +6 -5
- package/lib/components/ActionBar/ActionBarItem.js +15 -13
- package/lib/components/ActionBar/ActionBarOverflowItems.js +5 -4
- package/lib/components/ActionSet/ActionSet.js +13 -13
- package/lib/components/AddSelect/AddSelect.js +4 -2
- package/lib/components/AddSelect/AddSelectBody.js +13 -7
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +3 -3
- package/lib/components/AddSelect/AddSelectColumn.js +23 -13
- package/lib/components/AddSelect/AddSelectFilter.js +16 -10
- package/lib/components/AddSelect/AddSelectList.js +26 -15
- package/lib/components/AddSelect/AddSelectMetaPanel.js +9 -3
- package/lib/components/AddSelect/AddSelectSidebar.js +4 -4
- package/lib/components/AddSelect/AddSelectSort.js +22 -9
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +29 -19
- package/lib/components/ButtonMenu/ButtonMenu.js +18 -9
- package/lib/components/ButtonMenu/ButtonMenuItem.js +3 -3
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +10 -8
- package/lib/components/Card/Card.js +15 -13
- package/lib/components/Card/CardFooter.js +5 -5
- package/lib/components/Cascade/Cascade.js +2 -2
- package/lib/components/ComboButton/ComboButton.js +21 -13
- package/lib/components/CreateFullPage/CreateFullPage.js +8 -8
- package/lib/components/CreateFullPage/CreateFullPageStep.js +2 -2
- package/lib/components/CreateInfluencer/CreateInfluencer.js +3 -3
- package/lib/components/CreateModal/CreateModal.js +7 -7
- package/lib/components/CreateSidePanel/CreateSidePanel.js +2 -2
- package/lib/components/CreateTearsheet/CreateTearsheet.js +3 -3
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +5 -3
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +27 -18
- package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +26 -19
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +1 -4
- package/lib/components/Datagrid/Datagrid/Datagrid.js +3 -3
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -4
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -3
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -4
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +15 -8
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +151 -12
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +2 -2
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +3 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +10 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +7 -3
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +9 -9
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +24 -27
- package/lib/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/CustomizeColumnStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/LeftPanelStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/RowSizeDropdownStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/SelectAllWithToggleStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/StickyActionsColumnStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/common.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/index.js +2 -2
- package/lib/components/Datagrid/useActionsColumn.js +34 -9
- package/lib/components/Datagrid/useRowExpander.js +5 -1
- package/lib/components/Datagrid/useSelectRows.js +4 -3
- package/lib/components/Datagrid/useSortableColumns.js +20 -8
- package/lib/components/Datagrid/useStickyColumn.js +3 -0
- package/lib/components/EditSidePanel/EditSidePanel.js +3 -3
- package/lib/components/EditTearsheet/EditTearsheet.js +5 -5
- package/lib/components/EditTearsheet/EditTearsheetForm.js +5 -3
- package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +21 -21
- package/lib/components/EmptyStates/EmptyState.js +4 -4
- package/lib/components/EmptyStates/EmptyStateContent.js +6 -6
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +4 -4
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +4 -4
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +4 -4
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +4 -4
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +4 -4
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +4 -4
- package/lib/components/ExampleComponent/ExampleComponent.js +7 -7
- package/lib/components/ExportModal/ExportModal.js +17 -14
- package/lib/components/ExpressiveCard/ExpressiveCard.js +1 -1
- package/lib/components/HTTPErrors/HTTPErrorContent.js +3 -3
- package/lib/components/ImportModal/ImportModal.js +19 -14
- package/lib/components/InlineEdit/InlineEdit.js +26 -14
- package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +10 -4
- package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +14 -14
- package/lib/components/ModifiedTabs/ModifiedTabs.js +66 -45
- package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -2
- package/lib/components/NotificationsPanel/NotificationsPanel.js +37 -23
- package/lib/components/OptionsTile/OptionsTile.js +15 -9
- package/lib/components/PageHeader/PageHeader.js +33 -29
- package/lib/components/PageHeader/PageHeaderTitle.js +2 -2
- package/lib/components/PageHeader/PageHeaderUtils.js +2 -2
- package/lib/components/ProductiveCard/ProductiveCard.js +5 -0
- package/lib/components/RemoveModal/RemoveModal.js +9 -8
- package/lib/components/Saving/Saving.js +28 -10
- package/lib/components/SidePanel/SidePanel.js +22 -14
- package/lib/components/StatusIcon/StatusIcon.js +300 -75
- package/lib/components/TagSet/TagSet.js +8 -17
- package/lib/components/TagSet/TagSetModal.js +10 -9
- package/lib/components/TagSet/TagSetOverflow.js +38 -35
- package/lib/components/TagSet/constants.js +27 -0
- package/lib/components/Tearsheet/Tearsheet.js +4 -4
- package/lib/components/Tearsheet/TearsheetNarrow.js +3 -3
- package/lib/components/Tearsheet/TearsheetShell.js +13 -12
- package/lib/components/Toolbar/Toolbar.js +3 -1
- package/lib/components/Toolbar/ToolbarButton.js +20 -10
- package/lib/components/UserProfileImage/UserProfileImage.js +37 -12
- package/lib/components/WebTerminal/WebTerminal.js +19 -10
- package/lib/components/WebTerminal/preview-components/Navigation.js +13 -7
- package/lib/components/_Canary/Canary.js +2 -2
- package/lib/global/js/utils/test-helper.js +2 -1
- package/lib/settings.js +2 -11
- package/package.json +11 -12
- package/scss/components/APIKeyModal/_api-key-modal.scss +44 -55
- package/scss/components/APIKeyModal/_carbon-imports.scss +15 -0
- package/scss/components/APIKeyModal/_index-with-carbon.scss +9 -0
- package/scss/components/APIKeyModal/_index.scss +1 -1
- package/scss/components/APIKeyModal/_storybook-styles.scss +10 -8
- package/scss/components/AboutModal/_about-modal.scss +121 -112
- package/scss/components/AboutModal/_carbon-imports.scss +11 -0
- package/scss/components/AboutModal/_index-with-carbon.scss +9 -0
- package/scss/components/AboutModal/_index.scss +1 -1
- package/scss/components/AboutModal/_storybook-styles.scss +2 -1
- package/scss/components/ActionBar/_action-bar.scss +35 -47
- package/scss/components/ActionBar/_carbon-imports.scss +11 -0
- package/scss/components/ActionBar/_index-with-carbon.scss +9 -0
- package/scss/components/ActionBar/_index.scss +1 -1
- package/scss/components/ActionBar/_storybook-styles.scss +1 -1
- package/scss/components/ActionSet/_action-set.scss +88 -96
- package/scss/components/ActionSet/_carbon-imports.scss +11 -0
- package/scss/components/ActionSet/_index-with-carbon.scss +9 -0
- package/scss/components/ActionSet/_index.scss +1 -1
- package/scss/components/ActionSet/_storybook-styles.scss +3 -3
- package/scss/components/AddSelect/_add-select.scss +288 -278
- package/scss/components/AddSelect/_carbon-imports.scss +19 -0
- package/scss/components/AddSelect/_index-with-carbon.scss +9 -0
- package/scss/components/AddSelect/_index.scss +1 -1
- package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +58 -64
- package/scss/components/BreadcrumbWithOverflow/_carbon-imports.scss +12 -0
- package/scss/components/BreadcrumbWithOverflow/_index-with-carbon.scss +9 -0
- package/scss/components/BreadcrumbWithOverflow/_index.scss +1 -1
- package/scss/components/BreadcrumbWithOverflow/_storybook-styles.scss +1 -1
- package/scss/components/ButtonMenu/_button-menu.scss +12 -19
- package/scss/components/ButtonMenu/_carbon-imports.scss +9 -0
- package/scss/components/ButtonMenu/_index-with-carbon.scss +9 -0
- package/scss/components/ButtonMenu/_index.scss +1 -1
- package/scss/components/ButtonSetWithOverflow/_button-set-with-overflow.scss +24 -34
- package/scss/components/ButtonSetWithOverflow/_carbon-imports.scss +10 -0
- package/scss/components/ButtonSetWithOverflow/_index-with-carbon.scss +9 -0
- package/scss/components/ButtonSetWithOverflow/_index.scss +1 -1
- package/scss/components/ButtonSetWithOverflow/_storybook-styles.scss +1 -1
- package/scss/components/Card/_carbon-imports.scss +11 -0
- package/scss/components/Card/_card.scss +107 -114
- package/scss/components/Card/_index-with-carbon.scss +9 -0
- package/scss/components/Card/_index.scss +1 -3
- package/scss/components/Cascade/_carbon-imports.scss +6 -0
- package/scss/components/Cascade/_cascade.scss +30 -34
- package/scss/components/Cascade/_index-with-carbon.scss +9 -0
- package/scss/components/Cascade/_index.scss +1 -1
- package/scss/components/Cascade/_storybook-styles.scss +6 -5
- package/scss/components/ComboButton/_carbon-imports.scss +11 -0
- package/scss/components/ComboButton/_combo-button.scss +57 -46
- package/scss/components/ComboButton/_index-with-carbon.scss +9 -0
- package/scss/components/ComboButton/_index.scss +1 -1
- package/scss/components/CreateFullPage/_carbon-imports.scss +17 -0
- package/scss/components/CreateFullPage/_create-full-page.scss +134 -140
- package/scss/components/CreateFullPage/_index-with-carbon.scss +9 -0
- package/scss/components/CreateFullPage/_index.scss +1 -1
- package/scss/components/CreateFullPage/_storybook-styles.scss +26 -10
- package/scss/components/CreateInfluencer/_carbon-imports.scss +10 -0
- package/scss/components/CreateInfluencer/_create-influencer.scss +65 -70
- package/scss/components/CreateInfluencer/_index-with-carbon.scss +9 -0
- package/scss/components/CreateInfluencer/_index.scss +1 -1
- package/scss/components/CreateModal/_carbon-imports.scss +12 -0
- package/scss/components/CreateModal/_create-modal.scss +56 -59
- package/scss/components/CreateModal/_index-with-carbon.scss +9 -0
- package/scss/components/CreateModal/_index.scss +1 -1
- package/scss/components/CreateModal/_storybook-styles.scss +24 -21
- package/scss/components/CreateSidePanel/_carbon-imports.scss +10 -0
- package/scss/components/CreateSidePanel/_create-side-panel.scss +65 -71
- package/scss/components/CreateSidePanel/_index-with-carbon.scss +9 -0
- package/scss/components/CreateSidePanel/_index.scss +1 -1
- package/scss/components/CreateSidePanel/_storybook-styles.scss +8 -6
- package/scss/components/CreateTearsheet/_carbon-imports.scss +10 -0
- package/scss/components/CreateTearsheet/_create-tearsheet.scss +116 -98
- package/scss/components/CreateTearsheet/_index-with-carbon.scss +9 -0
- package/scss/components/CreateTearsheet/_index.scss +1 -1
- package/scss/components/CreateTearsheet/_storybook-styles.scss +14 -11
- package/scss/components/CreateTearsheetNarrow/_carbon-imports.scss +10 -0
- package/scss/components/CreateTearsheetNarrow/_create-tearsheet-narrow.scss +36 -44
- package/scss/components/CreateTearsheetNarrow/_index-with-carbon.scss +9 -0
- package/scss/components/CreateTearsheetNarrow/_index.scss +1 -1
- package/scss/components/CreateTearsheetNarrow/_storybook-styles.scss +7 -6
- package/scss/components/DataSpreadsheet/_carbon-imports.scss +6 -0
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +217 -173
- package/scss/components/DataSpreadsheet/_index-with-carbon.scss +9 -0
- package/scss/components/DataSpreadsheet/_index.scss +1 -1
- package/scss/components/Datagrid/_carbon-imports.scss +6 -0
- package/scss/components/Datagrid/_datagrid.scss +37 -36
- package/scss/components/Datagrid/_index-with-carbon.scss +9 -0
- package/scss/components/Datagrid/_index.scss +1 -1
- package/scss/components/Datagrid/_storybook-styles.scss +15 -11
- package/scss/components/Datagrid/styles/_datagrid.scss +102 -59
- package/scss/components/Datagrid/styles/_draggableElement.scss +15 -13
- package/scss/components/Datagrid/styles/_index.scss +13 -13
- package/scss/components/Datagrid/styles/_useActionsColumn.scss +5 -4
- package/scss/components/Datagrid/styles/_useColumnCenterAlign.scss +2 -1
- package/scss/components/Datagrid/styles/_useColumnRightAlign.scss +5 -5
- package/scss/components/Datagrid/styles/_useExpandedRow.scss +14 -7
- package/scss/components/Datagrid/styles/_useNestedRows.scss +6 -3
- package/scss/components/Datagrid/styles/_useNestedTable.scss +15 -9
- package/scss/components/Datagrid/styles/_useSelectAllToggle.scss +6 -5
- package/scss/components/Datagrid/styles/_useSortableColumns.scss +14 -12
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +10 -9
- package/scss/components/Datagrid/styles/_variables.scss +3 -2
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +15 -11
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +9 -7
- package/scss/components/EditFullPage/_edit-full-page.scss +9 -17
- package/scss/components/EditSidePanel/_carbon-imports.scss +9 -0
- package/scss/components/EditSidePanel/_edit-side-panel.scss +45 -54
- package/scss/components/EditSidePanel/_index-with-carbon.scss +9 -0
- package/scss/components/EditSidePanel/_index.scss +1 -1
- package/scss/components/EditSidePanel/_storybook-styles.scss +3 -1
- package/scss/components/EditTearsheet/_edit-tearsheet.scss +95 -93
- package/scss/components/EditTearsheet/_storybook-styles.scss +15 -11
- package/scss/components/EditTearsheetNarrow/_edit-tearsheet-narrow.scss +9 -17
- package/scss/components/EmptyStates/_carbon-imports.scss +11 -0
- package/scss/components/EmptyStates/_empty-state.scss +38 -48
- package/scss/components/EmptyStates/_index-with-carbon.scss +9 -0
- package/scss/components/EmptyStates/_index.scss +1 -1
- package/scss/components/ExampleComponent/_carbon-imports.scss +10 -0
- package/scss/components/ExampleComponent/_example-component.scss +15 -26
- package/scss/components/ExampleComponent/_index-with-carbon.scss +9 -0
- package/scss/components/ExampleComponent/_index.scss +1 -1
- package/scss/components/ExportModal/_carbon-imports.scss +16 -0
- package/scss/components/ExportModal/_export-modal.scss +41 -48
- package/scss/components/ExportModal/_index-with-carbon.scss +9 -0
- package/scss/components/ExportModal/_index.scss +1 -1
- package/scss/components/ExpressiveCard/_carbon-imports.scss +6 -0
- package/scss/components/ExpressiveCard/_expressive-card.scss +7 -14
- package/scss/components/ExpressiveCard/_index-with-carbon.scss +9 -0
- package/scss/components/ExpressiveCard/_index.scss +1 -1
- package/scss/components/ExpressiveCard/_storybook-styles.scss +6 -5
- package/scss/components/HTTPErrors/_carbon-imports.scss +10 -0
- package/scss/components/HTTPErrors/_http-errors.scss +48 -56
- package/scss/components/HTTPErrors/_index-with-carbon.scss +9 -0
- package/scss/components/HTTPErrors/_index.scss +1 -1
- package/scss/components/ImportModal/_carbon-imports.scss +14 -0
- package/scss/components/ImportModal/_import-modal.scss +72 -77
- package/scss/components/ImportModal/_index-with-carbon.scss +9 -0
- package/scss/components/ImportModal/_index.scss +1 -1
- package/scss/components/InlineEdit/_carbon-imports.scss +6 -0
- package/scss/components/InlineEdit/_index-with-carbon.scss +9 -0
- package/scss/components/InlineEdit/_index.scss +1 -1
- package/scss/components/InlineEdit/_inline-edit.scss +262 -238
- package/scss/components/InlineEdit/_storybook-styles.scss +7 -3
- package/scss/components/ModifiedTabs/_carbon-imports.scss +10 -0
- package/scss/components/ModifiedTabs/_index-with-carbon.scss +9 -0
- package/scss/components/ModifiedTabs/_index.scss +8 -1
- package/scss/components/ModifiedTabs/_modified-tabs.scss +38 -16
- package/scss/components/MultiAddSelect/_carbon-imports.scss +6 -0
- package/scss/components/MultiAddSelect/_index-with-carbon.scss +9 -0
- package/scss/components/MultiAddSelect/_index.scss +8 -1
- package/scss/components/MultiAddSelect/_multi-add-select.scss +1 -1
- package/scss/components/NotificationsPanel/_carbon-imports.scss +12 -0
- package/scss/components/NotificationsPanel/_index-with-carbon.scss +9 -0
- package/scss/components/NotificationsPanel/_index.scss +1 -1
- package/scss/components/NotificationsPanel/_notifications-panel.scss +241 -237
- package/scss/components/NotificationsPanel/_storybook-styles.scss +9 -0
- package/scss/components/OptionsTile/_carbon-imports.scss +10 -0
- package/scss/components/OptionsTile/_index-with-carbon.scss +9 -0
- package/scss/components/OptionsTile/_index.scss +1 -1
- package/scss/components/OptionsTile/_options-tile.scss +173 -171
- package/scss/components/OptionsTile/_storybook-styles.scss +7 -4
- package/scss/components/PageHeader/_carbon-imports.scss +13 -0
- package/scss/components/PageHeader/_index-with-carbon.scss +9 -0
- package/scss/components/PageHeader/_index.scss +1 -1
- package/scss/components/PageHeader/_page-header.scss +449 -461
- package/scss/components/PageHeader/_storybook-styles.scss +15 -11
- package/scss/components/ProductiveCard/_carbon-imports.scss +6 -0
- package/scss/components/ProductiveCard/_index-with-carbon.scss +9 -0
- package/scss/components/ProductiveCard/_index.scss +1 -1
- package/scss/components/ProductiveCard/_productive-card.scss +43 -48
- package/scss/components/ProductiveCard/_storybook-styles.scss +7 -6
- package/scss/components/RemoveModal/_carbon-imports.scss +12 -0
- package/scss/components/RemoveModal/_index-with-carbon.scss +9 -0
- package/scss/components/RemoveModal/_index.scss +1 -1
- package/scss/components/RemoveModal/_remove-modal.scss +17 -26
- package/scss/components/Saving/_carbon-imports.scss +11 -0
- package/scss/components/Saving/_index-with-carbon.scss +9 -0
- package/scss/components/Saving/_index.scss +1 -1
- package/scss/components/Saving/_saving.scss +19 -27
- package/scss/components/Saving/_storybook-styles.scss +1 -1
- package/scss/components/SidePanel/_carbon-imports.scss +10 -0
- package/scss/components/SidePanel/_index-with-carbon.scss +9 -0
- package/scss/components/SidePanel/_index.scss +1 -1
- package/scss/components/SidePanel/_side-panel-variables.scss +1 -1
- package/scss/components/SidePanel/_side-panel.scss +402 -392
- package/scss/components/SidePanel/_storybook-styles.scss +6 -4
- package/scss/components/SingleAddSelect/_carbon-imports.scss +6 -0
- package/scss/components/SingleAddSelect/_index-with-carbon.scss +9 -0
- package/scss/components/SingleAddSelect/_index.scss +1 -1
- package/scss/components/SingleAddSelect/_single-add-select.scss +1 -1
- package/scss/components/StatusIcon/_carbon-imports.scss +6 -0
- package/scss/components/StatusIcon/_index-with-carbon.scss +9 -0
- package/scss/components/StatusIcon/_index.scss +1 -1
- package/scss/components/StatusIcon/_status-icon.scss +30 -27
- package/scss/components/TagSet/_carbon-imports.scss +14 -0
- package/scss/components/TagSet/_index-with-carbon.scss +9 -0
- package/scss/components/TagSet/_index.scss +1 -1
- package/scss/components/TagSet/_storybook-styles.scss +1 -1
- package/scss/components/TagSet/_tag-set.scss +141 -129
- package/scss/components/Tearsheet/_carbon-imports.scss +10 -0
- package/scss/components/Tearsheet/_index-with-carbon.scss +9 -0
- package/scss/components/Tearsheet/_index.scss +1 -1
- package/scss/components/Tearsheet/_storybook-styles.scss +6 -5
- package/scss/components/Tearsheet/_tearsheet.scss +269 -263
- package/scss/components/Toolbar/_carbon-imports.scss +8 -0
- package/scss/components/Toolbar/_index-with-carbon.scss +9 -0
- package/scss/components/Toolbar/_index.scss +1 -1
- package/scss/components/Toolbar/_toolbar.scss +53 -56
- package/scss/components/UserProfileImage/_carbon-imports.scss +10 -0
- package/scss/components/UserProfileImage/_color-map.scss +30 -30
- package/scss/components/UserProfileImage/_index-with-carbon.scss +9 -0
- package/scss/components/UserProfileImage/_index.scss +1 -1
- package/scss/components/UserProfileImage/_user-profile-image.scss +83 -79
- package/scss/components/WebTerminal/_carbon-imports.scss +6 -0
- package/scss/components/WebTerminal/_index-with-carbon.scss +9 -0
- package/scss/components/WebTerminal/_index.scss +1 -1
- package/scss/components/WebTerminal/_storybook-styles.scss +12 -2
- package/scss/components/WebTerminal/_web-terminal.scss +16 -5
- package/scss/components/_Canary/_canary.scss +2 -4
- package/scss/components/_index-released-only-with-carbon.scss +35 -0
- package/scss/components/_index-released-only.scss +26 -26
- package/scss/components/_index-with-carbon.scss +47 -0
- package/scss/components/_index.scss +40 -40
- package/scss/global/styles/_display-box.scss +9 -5
- package/scss/global/styles/_project-settings.scss +2 -18
- package/scss/index-full-carbon.scss +4 -5
- package/scss/index-without-carbon-released-only.scss +5 -6
- package/scss/index-without-carbon.scss +5 -6
- package/scss/index.scss +4 -4
- package/scss/global/styles/_generate-carbon-modules.scss +0 -14
@@ -13,7 +13,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
13
13
|
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
14
14
|
*/
|
15
15
|
import React from 'react';
|
16
|
-
import { DataTable } from 'carbon
|
16
|
+
import { DataTable } from '@carbon/react';
|
17
17
|
import cx from 'classnames';
|
18
18
|
import { pkg } from '../../../settings';
|
19
19
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
@@ -1,22 +1,150 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
*
|
6
|
-
*
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Copyright IBM Corp. 2022, 2022
|
6
|
+
*
|
7
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
7
9
|
*/
|
8
|
-
import React from 'react';
|
9
|
-
import {
|
10
|
-
import {
|
10
|
+
import React, { useEffect, useState } from 'react';
|
11
|
+
import { Add, OverflowMenuVertical } from '@carbon/icons-react';
|
12
|
+
import { DataTable, TableBatchActions, TableBatchAction } from '@carbon/react';
|
13
|
+
import { useResizeDetector } from 'react-resize-detector';
|
14
|
+
import { ButtonMenu, ButtonMenuItem } from '../../ButtonMenu';
|
15
|
+
import { pkg, carbon } from '../../../settings';
|
16
|
+
import cx from 'classnames';
|
11
17
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
12
18
|
var TableToolbar = DataTable.TableToolbar;
|
13
19
|
|
20
|
+
var DatagridBatchActionsToolbar = function DatagridBatchActionsToolbar(datagridState, width, ref) {
|
21
|
+
var _useState = useState(false),
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
23
|
+
displayAllInMenu = _useState2[0],
|
24
|
+
setDisplayAllInMenu = _useState2[1];
|
25
|
+
|
26
|
+
var _useState3 = useState(null),
|
27
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
28
|
+
initialListWidth = _useState4[0],
|
29
|
+
setInitialListWidth = _useState4[1];
|
30
|
+
|
31
|
+
var _useState5 = useState(false),
|
32
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
33
|
+
receivedInitialWidth = _useState6[0],
|
34
|
+
setReceivedInitialWidth = _useState6[1];
|
35
|
+
|
36
|
+
var selectedFlatRows = datagridState.selectedFlatRows,
|
37
|
+
toggleAllRowsSelected = datagridState.toggleAllRowsSelected,
|
38
|
+
toolbarBatchActions = datagridState.toolbarBatchActions;
|
39
|
+
var totalSelected = selectedFlatRows && selectedFlatRows.length; // Get initial width of batch actions container,
|
40
|
+
// used to measure when all items are put inside
|
41
|
+
// the ButtonMenu
|
42
|
+
|
43
|
+
useEffect(function () {
|
44
|
+
if (totalSelected === 1 && !receivedInitialWidth) {
|
45
|
+
var batchActionListWidth = ref.current.querySelector(".".concat(carbon.prefix, "--action-list")).offsetWidth;
|
46
|
+
setInitialListWidth(batchActionListWidth);
|
47
|
+
setReceivedInitialWidth(true);
|
48
|
+
}
|
49
|
+
}, [totalSelected, receivedInitialWidth, ref]);
|
50
|
+
useEffect(function () {
|
51
|
+
var summaryWidth = ref.current.querySelector(".".concat(carbon.prefix, "--batch-summary")).offsetWidth;
|
52
|
+
|
53
|
+
if (width < summaryWidth + initialListWidth + 32) {
|
54
|
+
setDisplayAllInMenu(true);
|
55
|
+
} else {
|
56
|
+
setDisplayAllInMenu(false);
|
57
|
+
}
|
58
|
+
}, [width, ref, initialListWidth]); // Render batch actions in ButtonMenu
|
59
|
+
|
60
|
+
var renderBatchActionOverflow = function renderBatchActionOverflow() {
|
61
|
+
var minWidthBeforeOverflowIcon = 380; // Do not render ButtonMenu when there are 3 or less items
|
62
|
+
// and if there is enough available space to render all the items
|
63
|
+
|
64
|
+
if ((toolbarBatchActions === null || toolbarBatchActions === void 0 ? void 0 : toolbarBatchActions.length) <= 3 && !displayAllInMenu) {
|
65
|
+
return null;
|
66
|
+
}
|
67
|
+
|
68
|
+
return /*#__PURE__*/React.createElement(ButtonMenu, {
|
69
|
+
label: width > minWidthBeforeOverflowIcon ? 'More' : null,
|
70
|
+
renderIcon: width > minWidthBeforeOverflowIcon ? Add : OverflowMenuVertical,
|
71
|
+
className: cx("".concat(blockClass, "__button-menu"), _defineProperty({}, "".concat(blockClass, "__button-menu--icon-only"), width <= minWidthBeforeOverflowIcon)),
|
72
|
+
menuOptionsClass: "".concat(blockClass, "__button-menu-options"),
|
73
|
+
flipped: true
|
74
|
+
}, toolbarBatchActions && toolbarBatchActions.map(function (batchAction, index) {
|
75
|
+
if (index < 2) {
|
76
|
+
if (displayAllInMenu) {
|
77
|
+
return /*#__PURE__*/React.createElement(ButtonMenuItem, {
|
78
|
+
key: "".concat(batchAction.label, "-").concat(index),
|
79
|
+
itemText: batchAction.label,
|
80
|
+
onClick: function onClick() {
|
81
|
+
batchAction.onClick();
|
82
|
+
|
83
|
+
if (batchAction.type === 'select_all') {
|
84
|
+
toggleAllRowsSelected(true);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
});
|
88
|
+
}
|
89
|
+
|
90
|
+
return null;
|
91
|
+
}
|
92
|
+
|
93
|
+
return /*#__PURE__*/React.createElement(ButtonMenuItem, {
|
94
|
+
key: "".concat(batchAction.label, "-").concat(index),
|
95
|
+
itemText: batchAction.label,
|
96
|
+
onClick: function onClick() {
|
97
|
+
batchAction.onClick();
|
98
|
+
|
99
|
+
if (batchAction.type === 'select_all') {
|
100
|
+
toggleAllRowsSelected(true);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
});
|
104
|
+
}));
|
105
|
+
}; // Only display the first two batch actions, the rest are
|
106
|
+
// displayed inside of the ButtonMenu if there are more than
|
107
|
+
// 3 batch actions
|
108
|
+
|
109
|
+
|
110
|
+
return /*#__PURE__*/React.createElement(TableBatchActions, {
|
111
|
+
shouldShowBatchActions: totalSelected > 0,
|
112
|
+
totalSelected: totalSelected,
|
113
|
+
onCancel: function onCancel() {
|
114
|
+
return toggleAllRowsSelected(false);
|
115
|
+
}
|
116
|
+
}, !displayAllInMenu && toolbarBatchActions && (toolbarBatchActions === null || toolbarBatchActions === void 0 ? void 0 : toolbarBatchActions.map(function (batchAction, index) {
|
117
|
+
if (index < 2 && toolbarBatchActions.length > 3 || index < 3 && toolbarBatchActions.length === 3) {
|
118
|
+
return /*#__PURE__*/React.createElement(TableBatchAction, {
|
119
|
+
key: "".concat(batchAction.label, "-").concat(index),
|
120
|
+
renderIcon: batchAction.renderIcon,
|
121
|
+
onClick: function onClick() {
|
122
|
+
batchAction.onClick();
|
123
|
+
|
124
|
+
if (batchAction.type === 'select_all') {
|
125
|
+
toggleAllRowsSelected(true);
|
126
|
+
}
|
127
|
+
},
|
128
|
+
iconDescription: batchAction.label
|
129
|
+
}, batchAction.label);
|
130
|
+
}
|
131
|
+
})), renderBatchActionOverflow());
|
132
|
+
};
|
133
|
+
|
14
134
|
var DatagridToolbar = function DatagridToolbar(datagridState) {
|
135
|
+
var _useResizeDetector = useResizeDetector(),
|
136
|
+
width = _useResizeDetector.width,
|
137
|
+
ref = _useResizeDetector.ref;
|
138
|
+
|
15
139
|
var DatagridActions = datagridState.DatagridActions,
|
16
|
-
DatagridBatchActions = datagridState.DatagridBatchActions
|
17
|
-
|
140
|
+
DatagridBatchActions = datagridState.DatagridBatchActions,
|
141
|
+
batchActions = datagridState.batchActions;
|
142
|
+
return batchActions && DatagridActions ? /*#__PURE__*/React.createElement("div", {
|
143
|
+
ref: ref,
|
144
|
+
className: "".concat(blockClass, "__table-toolbar")
|
145
|
+
}, /*#__PURE__*/React.createElement(TableToolbar, null, DatagridActions && DatagridActions(datagridState), DatagridBatchActionsToolbar && DatagridBatchActionsToolbar(datagridState, width, ref))) : /*#__PURE__*/React.createElement("div", {
|
18
146
|
className: "".concat(blockClass, "__table-toolbar")
|
19
|
-
}, /*#__PURE__*/React.createElement(TableToolbar, null, DatagridActions && DatagridActions(datagridState), DatagridBatchActions && DatagridBatchActions(datagridState)))
|
147
|
+
}, /*#__PURE__*/React.createElement(TableToolbar, null, DatagridActions && DatagridActions(datagridState), DatagridBatchActions && DatagridBatchActions(datagridState)));
|
20
148
|
};
|
21
149
|
|
22
150
|
export default DatagridToolbar;
|
@@ -14,7 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
14
14
|
*/
|
15
15
|
import React, { useEffect } from 'react';
|
16
16
|
import { VariableSizeList } from 'react-window';
|
17
|
-
import { DataTable } from 'carbon
|
17
|
+
import { DataTable } from '@carbon/react';
|
18
18
|
import { pkg } from '../../../settings';
|
19
19
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
20
20
|
var TableBody = DataTable.TableBody;
|
@@ -11,7 +11,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
11
11
|
*/
|
12
12
|
import * as React from 'react';
|
13
13
|
import PropTypes from 'prop-types';
|
14
|
-
import {
|
14
|
+
import { Draggable } from '@carbon/icons-react';
|
15
15
|
import { useDrag, useDrop } from 'react-dnd';
|
16
16
|
import cx from 'classnames';
|
17
17
|
import { pkg } from '../../../settings';
|
@@ -117,7 +117,9 @@ var DraggableElement = function DraggableElement(_ref) {
|
|
117
117
|
className: cx({
|
118
118
|
disabled: disabled
|
119
119
|
}, "".concat(blockClass, "__draggable-handleStyle"))
|
120
|
-
}, /*#__PURE__*/React.createElement(
|
120
|
+
}, /*#__PURE__*/React.createElement(Draggable, {
|
121
|
+
size: 16
|
122
|
+
})), children);
|
121
123
|
return /*#__PURE__*/React.createElement("li", {
|
122
124
|
className: cx(_defineProperty({}, "".concat(blockClass, "__draggable-handleHolder-isOver"), isOver && !disabled), _defineProperty({}, "".concat(blockClass, "__wkc-draggable-handleHolder--grabbed"), isGrabbed), "".concat(blockClass, "__draggable-handleHolder")),
|
123
125
|
ref: ref,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
3
|
|
3
4
|
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; }
|
4
5
|
|
@@ -13,9 +14,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
13
14
|
* US Government Users Restricted Rights - Use, duplication or disclosure
|
14
15
|
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
15
16
|
*/
|
16
|
-
import {
|
17
|
+
import { Reset } from '@carbon/icons-react';
|
17
18
|
import PropTypes from 'prop-types';
|
18
|
-
import { Button, Search } from 'carbon
|
19
|
+
import { Button, Search } from '@carbon/react';
|
19
20
|
import * as React from 'react';
|
20
21
|
import keyBy from 'lodash/keyBy';
|
21
22
|
import { pkg } from '../../../../../settings';
|
@@ -52,7 +53,11 @@ var Actions = function Actions(_ref) {
|
|
52
53
|
},
|
53
54
|
size: "sm",
|
54
55
|
kind: "ghost",
|
55
|
-
renderIcon:
|
56
|
+
renderIcon: function renderIcon(props) {
|
57
|
+
return /*#__PURE__*/React.createElement(Reset, _extends({
|
58
|
+
size: 16
|
59
|
+
}, props));
|
60
|
+
},
|
56
61
|
"test-id": "".concat(blockClass, "__customize-columns-modal--reset")
|
57
62
|
}, resetToDefaultLabel));
|
58
63
|
};
|
@@ -12,8 +12,8 @@ var _excluded = ["onClick", "setIsModalOpen", "isModalOpen", "iconTooltipLabel"]
|
|
12
12
|
*/
|
13
13
|
import * as React from 'react';
|
14
14
|
import PropTypes from 'prop-types';
|
15
|
-
import {
|
16
|
-
import { Button } from 'carbon
|
15
|
+
import { Column } from '@carbon/icons-react';
|
16
|
+
import { Button } from '@carbon/react';
|
17
17
|
import { pkg } from '../../../../../settings';
|
18
18
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
19
19
|
|
@@ -26,7 +26,11 @@ var ButtonWrapper = function ButtonWrapper(_ref) {
|
|
26
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
27
27
|
|
28
28
|
return /*#__PURE__*/React.createElement(Button, _extends({}, rest, {
|
29
|
-
renderIcon:
|
29
|
+
renderIcon: function renderIcon(props) {
|
30
|
+
return /*#__PURE__*/React.createElement(Column, _extends({
|
31
|
+
size: 16
|
32
|
+
}, props));
|
33
|
+
},
|
30
34
|
iconDescription: iconTooltipLabel,
|
31
35
|
tooltipPosition: "left",
|
32
36
|
kind: "ghost",
|
@@ -12,7 +12,7 @@ import * as React from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
13
13
|
import { DndProvider } from 'react-dnd';
|
14
14
|
import { HTML5Backend } from 'react-dnd-html5-backend';
|
15
|
-
import { Checkbox } from 'carbon
|
15
|
+
import { Checkbox } from '@carbon/react';
|
16
16
|
import update from 'immutability-helper';
|
17
17
|
import { pkg } from '../../../../../settings';
|
18
18
|
import DraggableElement from '../../DraggableElement';
|
@@ -15,7 +15,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
15
15
|
// @flow
|
16
16
|
import React, { useState } from 'react';
|
17
17
|
import PropTypes from 'prop-types';
|
18
|
-
import { Modal } from 'carbon
|
18
|
+
import { Modal } from '@carbon/react';
|
19
19
|
import { isColumnVisible } from './common';
|
20
20
|
import Columns from './Columns';
|
21
21
|
import Actions from './Actions';
|
@@ -14,8 +14,8 @@ var _excluded = ["buttonLabel"];
|
|
14
14
|
*/
|
15
15
|
import * as React from 'react';
|
16
16
|
import PropTypes from 'prop-types';
|
17
|
-
import {
|
18
|
-
import {
|
17
|
+
import { Settings } from '@carbon/icons-react';
|
18
|
+
import { IconButton } from '@carbon/react';
|
19
19
|
import cx from 'classnames';
|
20
20
|
import RowSizeRadioGroup from './RowSizeRadioGroup';
|
21
21
|
import { pkg } from '../../../../../settings';
|
@@ -33,19 +33,19 @@ var RowSizeDropdown = function RowSizeDropdown(_ref) {
|
|
33
33
|
isOpen = _React$useState2[0],
|
34
34
|
setIsOpen = _React$useState2[1];
|
35
35
|
|
36
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
37
|
-
hasIconOnly: true,
|
36
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconButton, {
|
38
37
|
ref: buttonRef,
|
39
38
|
kind: "ghost",
|
40
|
-
|
41
|
-
renderIcon: Settings16,
|
39
|
+
align: "left",
|
42
40
|
onClick: function onClick() {
|
43
41
|
return setIsOpen(!isOpen);
|
44
42
|
},
|
45
|
-
|
46
|
-
className: cx(_defineProperty({}, "".concat(blockClass, "__row-size-button--open"), isOpen))
|
47
|
-
}
|
48
|
-
|
43
|
+
label: buttonLabel,
|
44
|
+
className: cx("".concat(blockClass, "__row-size-button"), _defineProperty({}, "".concat(blockClass, "__row-size-button--open"), isOpen))
|
45
|
+
}, /*#__PURE__*/React.createElement(Settings, {
|
46
|
+
size: 16
|
47
|
+
})), isOpen && /*#__PURE__*/React.createElement(RowSizeRadioGroup, _extends({}, props, {
|
48
|
+
ref: buttonRef,
|
49
49
|
hideRadioGroup: function hideRadioGroup() {
|
50
50
|
setIsOpen(false);
|
51
51
|
}
|
@@ -8,18 +8,16 @@
|
|
8
8
|
* US Government Users Restricted Rights - Use, duplication or disclosure
|
9
9
|
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
10
10
|
*/
|
11
|
-
import React, { useEffect } from 'react';
|
11
|
+
import React, { useEffect, forwardRef } from 'react';
|
12
12
|
import PropTypes from 'prop-types';
|
13
|
-
import { RadioButtonGroup, RadioButton } from 'carbon
|
13
|
+
import { RadioButtonGroup, RadioButton } from '@carbon/react';
|
14
14
|
import isArray from 'lodash/isArray';
|
15
15
|
import { pkg } from '../../../../../settings';
|
16
16
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
17
|
-
|
18
|
-
var RowSizeRadioGroup = function RowSizeRadioGroup(_ref) {
|
17
|
+
var RowSizeRadioGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
19
18
|
var rowSizes = _ref.rowSizes,
|
20
19
|
selectedOption = _ref.selectedOption,
|
21
20
|
datagridName = _ref.datagridName,
|
22
|
-
buttonRef = _ref.buttonRef,
|
23
21
|
onChange = _ref.onChange,
|
24
22
|
hideRadioGroup = _ref.hideRadioGroup,
|
25
23
|
_ref$legendText = _ref.legendText,
|
@@ -33,7 +31,25 @@ var RowSizeRadioGroup = function RowSizeRadioGroup(_ref) {
|
|
33
31
|
xs: 'Extra small'
|
34
32
|
} : _ref$rowSizeLabels;
|
35
33
|
|
36
|
-
var
|
34
|
+
var getDropdownPosition = function getDropdownPosition(buttonEle) {
|
35
|
+
if (buttonEle instanceof HTMLElement) {
|
36
|
+
var _top = buttonEle.offsetTop + buttonEle.offsetHeight;
|
37
|
+
|
38
|
+
var _right = buttonEle.offsetLeft + buttonEle.offsetWidth;
|
39
|
+
|
40
|
+
return {
|
41
|
+
top: _top,
|
42
|
+
right: _right
|
43
|
+
};
|
44
|
+
}
|
45
|
+
|
46
|
+
return {
|
47
|
+
top: 0,
|
48
|
+
right: 0
|
49
|
+
};
|
50
|
+
};
|
51
|
+
|
52
|
+
var _getDropdownPosition = getDropdownPosition(ref.current),
|
37
53
|
top = _getDropdownPosition.top,
|
38
54
|
right = _getDropdownPosition.right;
|
39
55
|
|
@@ -75,7 +91,7 @@ var RowSizeRadioGroup = function RowSizeRadioGroup(_ref) {
|
|
75
91
|
id: "".concat(datagridName || 'datagrid', "--row-density--").concat(option.value)
|
76
92
|
});
|
77
93
|
})));
|
78
|
-
};
|
94
|
+
});
|
79
95
|
|
80
96
|
var getBackwardCompatibleRowSize = function getBackwardCompatibleRowSize(rowSize) {
|
81
97
|
// TODO: deprecate this function in next major release (v8) on carbon-components-react
|
@@ -89,24 +105,6 @@ var getBackwardCompatibleRowSize = function getBackwardCompatibleRowSize(rowSize
|
|
89
105
|
return rowSizeMap[rowSize] || rowSize;
|
90
106
|
};
|
91
107
|
|
92
|
-
var getDropdownPosition = function getDropdownPosition(buttonEle) {
|
93
|
-
var parent = buttonEle.parentElement;
|
94
|
-
|
95
|
-
if (parent instanceof HTMLElement) {
|
96
|
-
var top = buttonEle.offsetTop + buttonEle.offsetHeight;
|
97
|
-
var right = parent.offsetWidth - parent.offsetLeft - (buttonEle.offsetLeft + buttonEle.offsetWidth);
|
98
|
-
return {
|
99
|
-
top: top,
|
100
|
-
right: right
|
101
|
-
};
|
102
|
-
}
|
103
|
-
|
104
|
-
return {
|
105
|
-
top: 0,
|
106
|
-
right: 0
|
107
|
-
};
|
108
|
-
};
|
109
|
-
|
110
108
|
RowSizeRadioGroup.defaultProps = {
|
111
109
|
rowSizes: [{
|
112
110
|
value: 'xl' // 64
|
@@ -127,7 +125,6 @@ RowSizeRadioGroup.defaultProps = {
|
|
127
125
|
selectedOption: 'lg'
|
128
126
|
};
|
129
127
|
RowSizeRadioGroup.propTypes = {
|
130
|
-
buttonRef: PropTypes.any.isRequired,
|
131
128
|
datagridName: PropTypes.string,
|
132
129
|
hideRadioGroup: PropTypes.func.isRequired,
|
133
130
|
legendText: PropTypes.string,
|
package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/CustomizeColumnStory.js
RENAMED
File without changes
|
package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/LeftPanelStory.js
RENAMED
File without changes
|
package/es/components/Datagrid/{Datagrid.stories → Datagrid.stories-helpers}/RowSizeDropdownStory.js
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { story as
|
1
|
+
export { story as CustomizeColumnStoryNotes } from './CustomizeColumnStory';
|
2
2
|
export { default as StickyActionsColumn } from './StickyActionsColumnStory';
|
3
3
|
export { story as RowSizeDropdownStory } from './RowSizeDropdownStory';
|
4
4
|
export { story as LeftPanelStory } from './LeftPanelStory';
|
5
|
-
export { story as
|
5
|
+
export { story as SelectAllWithToggle } from './SelectAllWithToggleStory';
|
@@ -12,7 +12,7 @@ var _excluded = ["id", "onClick", "shouldHideMenuItem", "shouldDisableMenuItem",
|
|
12
12
|
*/
|
13
13
|
import React from 'react';
|
14
14
|
import cx from 'classnames';
|
15
|
-
import { IconSkeleton, OverflowMenu, OverflowMenuItem } from 'carbon
|
15
|
+
import { IconSkeleton, OverflowMenu, OverflowMenuItem } from '@carbon/react';
|
16
16
|
import { pkg } from '../../settings';
|
17
17
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
18
18
|
|
@@ -32,19 +32,44 @@ var useActionsColumn = function useActionsColumn(hooks) {
|
|
32
32
|
|
33
33
|
return [props, {
|
34
34
|
children: /*#__PURE__*/React.createElement("div", {
|
35
|
-
className: "".concat(blockClass, "__actions-column-
|
35
|
+
className: "".concat(blockClass, "__actions-column-contents")
|
36
36
|
}, isFetching && /*#__PURE__*/React.createElement(IconSkeleton, {
|
37
37
|
className: "".concat(blockClass, "__actions-column-loading")
|
38
|
-
}), !isFetching && /*#__PURE__*/React.createElement(
|
38
|
+
}), !isFetching && rowActions.length <= 2 && /*#__PURE__*/React.createElement("div", {
|
39
|
+
className: "".concat(blockClass, "_actions-column"),
|
40
|
+
style: {
|
41
|
+
display: 'flex'
|
42
|
+
}
|
43
|
+
}, rowActions.map(function (action) {
|
44
|
+
var id = action.id,
|
45
|
+
itemText = action.itemText,
|
46
|
+
_onClick = action.onClick,
|
47
|
+
icon = action.icon;
|
48
|
+
return /*#__PURE__*/React.createElement("div", {
|
49
|
+
className: "".concat(blockClass, "__actions-column-button"),
|
50
|
+
key: ""
|
51
|
+
}, /*#__PURE__*/React.createElement(OverflowMenu, {
|
52
|
+
renderIcon: icon,
|
53
|
+
hasIconOnly: true,
|
54
|
+
light: true,
|
55
|
+
iconDescription: itemText,
|
56
|
+
kind: "ghost",
|
57
|
+
onClick: function onClick(e) {
|
58
|
+
e.stopPropagation();
|
59
|
+
|
60
|
+
_onClick(id, row, e);
|
61
|
+
}
|
62
|
+
}));
|
63
|
+
})), !isFetching && rowActions.length > 2 && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(OverflowMenu, {
|
39
64
|
size: "sm",
|
40
65
|
light: true,
|
41
66
|
flipped: true,
|
42
67
|
onClick: function onClick(e) {
|
43
|
-
|
68
|
+
e.stopPropagation();
|
44
69
|
}
|
45
70
|
}, rowActions.map(function (action) {
|
46
71
|
var id = action.id,
|
47
|
-
|
72
|
+
_onClick2 = action.onClick,
|
48
73
|
shouldHideMenuItem = action.shouldHideMenuItem,
|
49
74
|
shouldDisableMenuItem = action.shouldDisableMenuItem,
|
50
75
|
disabled = action.disabled,
|
@@ -64,11 +89,11 @@ var useActionsColumn = function useActionsColumn(hooks) {
|
|
64
89
|
onClick: function onClick(e) {
|
65
90
|
e.stopPropagation();
|
66
91
|
|
67
|
-
|
92
|
+
_onClick2(id, row, e);
|
68
93
|
},
|
69
94
|
key: id
|
70
95
|
}));
|
71
|
-
}))),
|
96
|
+
})))),
|
72
97
|
className: cx((_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__actions-column-cell"), true), _defineProperty(_cx, "".concat(blockClass, "__cell"), true), _cx))
|
73
98
|
}];
|
74
99
|
}
|
@@ -10,7 +10,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
10
10
|
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
11
11
|
*/
|
12
12
|
import React from 'react';
|
13
|
-
import {
|
13
|
+
import { ChevronDown, ChevronUp } from '@carbon/icons-react';
|
14
14
|
|
15
15
|
var useRowExpander = function useRowExpander(hooks) {
|
16
16
|
var visibleColumns = function visibleColumns(columns) {
|
@@ -18,7 +18,11 @@ var useRowExpander = function useRowExpander(hooks) {
|
|
18
18
|
id: 'expander',
|
19
19
|
Cell: function Cell(_ref) {
|
20
20
|
var row = _ref.row;
|
21
|
-
return row.canExpand && /*#__PURE__*/React.createElement("span", row.getToggleRowExpandedProps(), row.isExpanded ? /*#__PURE__*/React.createElement(
|
21
|
+
return row.canExpand && /*#__PURE__*/React.createElement("span", row.getToggleRowExpandedProps(), row.isExpanded ? /*#__PURE__*/React.createElement(ChevronUp, {
|
22
|
+
size: 16
|
23
|
+
}) : /*#__PURE__*/React.createElement(ChevronDown, {
|
24
|
+
size: 16
|
25
|
+
}));
|
22
26
|
},
|
23
27
|
width: 48,
|
24
28
|
disableResizing: true,
|
@@ -18,10 +18,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
18
18
|
// @flow
|
19
19
|
import React from 'react';
|
20
20
|
import cx from 'classnames';
|
21
|
-
import {
|
21
|
+
import { DataTable } from '@carbon/react';
|
22
22
|
import { SelectAll } from './Datagrid/DatagridSelectAll';
|
23
23
|
import { selectionColumnId } from './common-column-ids';
|
24
|
-
import { pkg } from '../../settings';
|
24
|
+
import { pkg, carbon } from '../../settings';
|
25
|
+
var TableSelectRow = DataTable.TableSelectRow;
|
25
26
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
26
27
|
|
27
28
|
var useSelectRows = function useSelectRows(hooks) {
|
@@ -57,7 +58,7 @@ var useHighlightSelection = function useHighlightSelection(hooks) {
|
|
57
58
|
var getRowProps = function getRowProps(props, _ref) {
|
58
59
|
var row = _ref.row;
|
59
60
|
return [props, {
|
60
|
-
className: cx("".concat(blockClass, "__carbon-row"), row.getToggleRowSelectedProps().checked ?
|
61
|
+
className: cx("".concat(blockClass, "__carbon-row"), row.getToggleRowSelectedProps().checked ? "".concat(carbon.prefix, "--data-table--selected ").concat(blockClass, "__active-row") : '')
|
61
62
|
}];
|
62
63
|
};
|
63
64
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
3
4
|
|
4
5
|
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; }
|
5
6
|
|
@@ -13,8 +14,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
13
14
|
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
14
15
|
*/
|
15
16
|
import React from 'react';
|
16
|
-
import { Button } from 'carbon
|
17
|
-
import {
|
17
|
+
import { Button } from '@carbon/react';
|
18
|
+
import { ArrowUp, ArrowDown, ArrowsVertical } from '@carbon/icons-react';
|
18
19
|
var ordering = {
|
19
20
|
ASC: 'ASC',
|
20
21
|
DESC: 'DESC',
|
@@ -42,21 +43,29 @@ var useSortableColumns = function useSortableColumns(hooks) {
|
|
42
43
|
};
|
43
44
|
|
44
45
|
var sortableColumns = visibleColumns.map(function (column) {
|
45
|
-
var icon = function icon(col) {
|
46
|
+
var icon = function icon(col, props) {
|
46
47
|
if (col.isSorted) {
|
47
48
|
switch (col.isSortedDesc) {
|
48
49
|
case false:
|
49
|
-
return
|
50
|
+
return /*#__PURE__*/React.createElement(ArrowUp, _extends({
|
51
|
+
size: 16
|
52
|
+
}, props));
|
50
53
|
|
51
54
|
case true:
|
52
|
-
return
|
55
|
+
return /*#__PURE__*/React.createElement(ArrowDown, _extends({
|
56
|
+
size: 16
|
57
|
+
}, props));
|
53
58
|
|
54
59
|
default:
|
55
|
-
return
|
60
|
+
return /*#__PURE__*/React.createElement(ArrowsVertical, _extends({
|
61
|
+
size: 16
|
62
|
+
}, props));
|
56
63
|
}
|
57
64
|
}
|
58
65
|
|
59
|
-
return
|
66
|
+
return /*#__PURE__*/React.createElement(ArrowsVertical, _extends({
|
67
|
+
size: 16
|
68
|
+
}, props));
|
60
69
|
};
|
61
70
|
|
62
71
|
var Header = function Header(headerProp) {
|
@@ -65,7 +74,9 @@ var useSortableColumns = function useSortableColumns(hooks) {
|
|
65
74
|
return onSortClick(headerProp.column);
|
66
75
|
},
|
67
76
|
kind: "ghost",
|
68
|
-
renderIcon:
|
77
|
+
renderIcon: function renderIcon(props) {
|
78
|
+
return icon(headerProp.column, props);
|
79
|
+
}
|
69
80
|
}, column.Header);
|
70
81
|
};
|
71
82
|
|
@@ -117,6 +117,9 @@ var useStickyColumn = function useStickyColumn(hooks) {
|
|
117
117
|
if (spacerIdx >= 0 && stickyIdx >= 0 && stickyIdx < spacerIdx) {
|
118
118
|
var _temp = newHeaders[spacerIdx];
|
119
119
|
newHeaders[spacerIdx] = newHeaders[stickyIdx];
|
120
|
+
newHeaders[spacerIdx].canResize = false;
|
121
|
+
newHeaders[spacerIdx].disableResizing = true;
|
122
|
+
delete newHeaders[spacerIdx].getResizerProps;
|
120
123
|
newHeaders[stickyIdx] = _temp;
|
121
124
|
}
|
122
125
|
});
|
@@ -23,7 +23,7 @@ import { pkg
|
|
23
23
|
/*, carbon */
|
24
24
|
} from '../../settings'; // Carbon and package components we use.
|
25
25
|
|
26
|
-
import { Form } from 'carbon
|
26
|
+
import { Form } from '@carbon/react';
|
27
27
|
import { SidePanel } from '../SidePanel';
|
28
28
|
import '../../global/js/utils/props-helper'; // The block part of our conventional BEM class names (blockClass__E--M).
|
29
29
|
|
@@ -183,7 +183,7 @@ EditSidePanel.propTypes = {
|
|
183
183
|
/**
|
184
184
|
* Sets the size of the side panel
|
185
185
|
*/
|
186
|
-
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', '
|
186
|
+
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', '2xl']),
|
187
187
|
|
188
188
|
/**
|
189
189
|
* Specifies which DOM element in the form should be focused.
|