@carbon/ibm-products 2.0.0-rc.2 → 2.0.0-rc.20
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/css/index-full-carbon.css +1368 -401
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +6 -8
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +1413 -385
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +4 -8
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +1292 -456
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +6 -8
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +1165 -334
- package/css/index.css.map +1 -1
- package/css/index.min.css +6 -8
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +1 -1
- package/es/components/ActionBar/ActionBarOverflowItems.js +1 -0
- package/es/components/ActionSet/ActionSet.js +7 -3
- package/es/components/AddSelect/AddSelect.js +6 -6
- package/es/components/AddSelect/AddSelectBody.js +73 -32
- package/es/components/AddSelect/AddSelectBreadcrumbs.js +12 -4
- package/es/components/AddSelect/AddSelectColumn.js +8 -8
- package/es/components/AddSelect/AddSelectFilter.js +10 -7
- package/es/components/AddSelect/AddSelectList.js +64 -29
- package/es/components/AddSelect/AddSelectMetaPanel.js +7 -1
- package/es/components/AddSelect/AddSelectSidebar.js +5 -2
- package/es/components/AddSelect/AddSelectSort.js +2 -2
- package/es/components/AddSelect/add-select-utils.js +9 -2
- package/es/components/AddSelect/hooks/useItemSort.js +6 -0
- package/es/components/AddSelect/hooks/useParentSelect.js +6 -0
- package/es/components/AddSelect/hooks/usePath.js +23 -2
- package/es/components/AddSelect/index.js +1 -1
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -6
- package/es/components/ButtonMenu/ButtonMenu.js +4 -3
- package/es/components/Card/Card.js +16 -6
- package/es/components/Card/CardFooter.js +3 -1
- package/es/components/Card/CardHeader.js +20 -1
- package/es/components/ComboButton/ComboButton.js +1 -1
- package/es/components/CreateFullPage/CreateFullPage.js +13 -3
- package/es/components/CreateTearsheet/CreateTearsheet.js +17 -3
- package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +3 -1
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +65 -15
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -1
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +7 -0
- package/es/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +6 -5
- package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +42 -0
- package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +1 -1
- package/es/components/Datagrid/Datagrid/Datagrid.js +16 -40
- package/es/components/Datagrid/Datagrid/DatagridContent.js +194 -0
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +18 -8
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +9 -1
- package/es/components/Datagrid/Datagrid/DatagridHead.js +1 -2
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -4
- package/es/components/Datagrid/Datagrid/DatagridRow.js +44 -7
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +11 -5
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +13 -4
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -2
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +14 -10
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +32 -11
- package/es/components/Datagrid/Datagrid/DraggableElement.js +12 -4
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +11 -54
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +15 -14
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +63 -31
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +193 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +56 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +484 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +514 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +91 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/constants.js +28 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/index.js +9 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +25 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +38 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +25 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/index.js +9 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +55 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +72 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +60 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/index.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +541 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/index.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +112 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +27 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/index.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +39 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +19 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +262 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +87 -0
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +17 -14
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +13 -36
- package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/index.js +0 -1
- package/es/components/Datagrid/index.js +4 -1
- package/es/components/Datagrid/useActionsColumn.js +28 -12
- package/es/components/Datagrid/useColumnOrder.js +8 -0
- package/es/components/Datagrid/useCustomizeColumns.js +13 -8
- package/es/components/Datagrid/useDisableSelectRows.js +6 -2
- package/es/components/Datagrid/useExpandedRow.js +0 -1
- package/es/components/Datagrid/useFiltering.js +99 -0
- package/es/components/Datagrid/useInfiniteScroll.js +5 -2
- package/es/components/Datagrid/useInlineEdit.js +71 -0
- package/es/components/Datagrid/useNestedRowExpander.js +47 -0
- package/es/components/Datagrid/useNestedRows.js +16 -4
- package/es/components/Datagrid/useParentDimensions.js +3 -1
- package/es/components/Datagrid/useRowExpander.js +12 -4
- package/es/components/Datagrid/useRowSize.js +17 -6
- package/es/components/Datagrid/useSelectAllToggle.js +17 -4
- package/es/components/Datagrid/useSelectRows.js +13 -4
- package/es/components/Datagrid/useSortableColumns.js +15 -9
- package/es/components/Datagrid/useStickyColumn.js +11 -0
- package/es/components/Datagrid/utils/DatagridActions.js +249 -0
- package/es/components/Datagrid/utils/DatagridPagination.js +33 -0
- package/es/components/Datagrid/utils/Wrapper.js +21 -0
- package/es/components/Datagrid/utils/getArgTypes.js +94 -0
- package/es/components/Datagrid/utils/getInlineEditColumns.js +159 -0
- package/es/components/Datagrid/utils/makeData.js +54 -1
- package/es/components/EditUpdateCards/EditUpdateCards.js +144 -0
- package/es/components/EditUpdateCards/index.js +7 -0
- package/es/components/ExportModal/ExportModal.js +1 -1
- package/es/components/FilterSummary/FilterSummary.js +54 -0
- package/es/components/FilterSummary/index.js +7 -0
- package/es/components/ImportModal/ImportModal.js +3 -3
- package/es/components/InlineEdit/InlineEdit.js +28 -426
- package/es/components/InlineEditV1/InlineEditV1.js +447 -0
- package/es/components/InlineEditV1/index.js +7 -0
- package/es/components/InlineEditV2/InlineEditV2.js +289 -0
- package/es/components/InlineEditV2/index.js +7 -0
- package/es/components/ModifiedTabs/ModifiedTabLabelNew.js +1 -1
- package/es/components/ModifiedTabs/ModifiedTabLabelWithClose.js +1 -1
- package/es/components/MultiAddSelect/MultiAddSelect.js +14 -7
- package/es/components/MultiAddSelect/index.js +6 -0
- package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/es/components/OptionsTile/OptionsTile.js +32 -16
- package/es/components/PageHeader/PageHeader.js +4 -4
- package/es/components/PageHeader/PageHeaderTitle.js +1 -1
- package/es/components/ProductiveCard/ProductiveCard.js +5 -0
- package/es/components/RemoveModal/RemoveModal.js +20 -3
- package/es/components/Saving/Saving.js +1 -1
- package/es/components/SidePanel/SidePanel.js +45 -52
- package/es/components/SidePanel/motion/variants.js +45 -0
- package/es/components/SingleAddSelect/SingleAddSelect.js +6 -0
- package/es/components/SingleAddSelect/index.js +6 -0
- package/es/components/StatusIcon/StatusIcon.js +1 -1
- package/es/components/Tearsheet/Tearsheet.js +5 -0
- package/es/components/Tearsheet/TearsheetNarrow.js +5 -0
- package/es/components/Tearsheet/TearsheetShell.js +1 -1
- package/es/components/UserProfileImage/UserProfileImage.js +1 -1
- package/es/components/WebTerminal/WebTerminal.js +1 -1
- package/es/components/WebTerminal/preview-components/Navigation.js +1 -1
- package/es/components/index.js +4 -3
- package/es/global/js/hooks/index.js +2 -1
- package/es/global/js/hooks/useClickOutside.js +1 -1
- package/es/global/js/hooks/useControllableState.js +83 -0
- package/es/global/js/hooks/useCreateComponentFocus.js +38 -10
- package/es/global/js/hooks/useResetCreateComponent.js +6 -2
- package/es/global/js/package-settings.js +9 -6
- package/es/global/js/utils/getBezierValues.js +20 -0
- package/es/global/js/utils/getNumberOfHiddenSteps.js +19 -0
- package/es/global/js/utils/motionConstants.js +45 -0
- package/es/global/js/utils/rangeWithCallback.js +13 -0
- package/es/global/js/utils/story-helper.js +5 -1
- package/es/global/js/utils/uuidv4.spec.js +4 -0
- package/lib/components/APIKeyModal/APIKeyModal.js +4 -4
- package/lib/components/ActionBar/ActionBarOverflowItems.js +1 -0
- package/lib/components/ActionSet/ActionSet.js +7 -3
- package/lib/components/AddSelect/AddSelect.js +5 -6
- package/lib/components/AddSelect/AddSelectBody.js +68 -31
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +15 -4
- package/lib/components/AddSelect/AddSelectColumn.js +7 -7
- package/lib/components/AddSelect/AddSelectFilter.js +9 -6
- package/lib/components/AddSelect/AddSelectList.js +65 -30
- package/lib/components/AddSelect/AddSelectMetaPanel.js +8 -2
- package/lib/components/AddSelect/AddSelectSidebar.js +4 -1
- package/lib/components/AddSelect/AddSelectSort.js +5 -5
- package/lib/components/AddSelect/add-select-utils.js +9 -2
- package/lib/components/AddSelect/hooks/useItemSort.js +6 -0
- package/lib/components/AddSelect/hooks/useParentSelect.js +6 -0
- package/lib/components/AddSelect/hooks/usePath.js +16 -1
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +6 -6
- package/lib/components/ButtonMenu/ButtonMenu.js +4 -3
- package/lib/components/Card/Card.js +16 -6
- package/lib/components/Card/CardFooter.js +3 -1
- package/lib/components/Card/CardHeader.js +21 -1
- package/lib/components/ComboButton/ComboButton.js +3 -3
- package/lib/components/CreateFullPage/CreateFullPage.js +13 -3
- package/lib/components/CreateTearsheet/CreateTearsheet.js +18 -3
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +3 -1
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +65 -14
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -1
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +7 -0
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +6 -5
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +53 -0
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +1 -1
- package/lib/components/Datagrid/Datagrid/Datagrid.js +19 -47
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +230 -0
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +19 -9
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +9 -1
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +1 -3
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +2 -5
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +46 -8
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +14 -6
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +16 -5
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +14 -10
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +33 -10
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +12 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +11 -49
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +11 -8
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +76 -46
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/{CustomizeColumnsModal.js → CustomizeColumnsTearsheet.js} +85 -48
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/{ModalWrapper.js → TearsheetWrapper.js} +32 -36
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +3 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +505 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +538 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +112 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +47 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/index.js +31 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +37 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +50 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +35 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/index.js +37 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +67 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +82 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +76 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/index.js +13 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +566 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/index.js +13 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +129 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +36 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/index.js +19 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +45 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +28 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +271 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +100 -0
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +17 -13
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +13 -35
- package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/index.js +0 -8
- package/lib/components/Datagrid/index.js +25 -1
- package/lib/components/Datagrid/useActionsColumn.js +28 -13
- package/lib/components/Datagrid/useColumnOrder.js +17 -0
- package/lib/components/Datagrid/useCustomizeColumns.js +12 -7
- package/lib/components/Datagrid/useDisableSelectRows.js +6 -2
- package/lib/components/Datagrid/useExpandedRow.js +0 -1
- package/lib/components/Datagrid/useFiltering.js +105 -0
- package/lib/components/Datagrid/useInfiniteScroll.js +5 -2
- package/lib/components/Datagrid/useInlineEdit.js +85 -0
- package/lib/components/Datagrid/useNestedRowExpander.js +63 -0
- package/lib/components/Datagrid/useNestedRows.js +17 -4
- package/lib/components/Datagrid/useParentDimensions.js +3 -1
- package/lib/components/Datagrid/useRowExpander.js +17 -5
- package/lib/components/Datagrid/useRowSize.js +18 -13
- package/lib/components/Datagrid/useSelectAllToggle.js +18 -4
- package/lib/components/Datagrid/useSelectRows.js +13 -4
- package/lib/components/Datagrid/useSortableColumns.js +16 -7
- package/lib/components/Datagrid/useStickyColumn.js +11 -0
- package/lib/components/Datagrid/utils/DatagridActions.js +275 -0
- package/lib/components/Datagrid/utils/DatagridPagination.js +46 -0
- package/lib/components/Datagrid/utils/Wrapper.js +33 -0
- package/lib/components/Datagrid/utils/getArgTypes.js +102 -0
- package/lib/components/Datagrid/utils/getInlineEditColumns.js +174 -0
- package/lib/components/Datagrid/utils/makeData.js +56 -2
- package/lib/components/EditUpdateCards/EditUpdateCards.js +152 -0
- package/lib/components/EditUpdateCards/index.js +13 -0
- package/lib/components/ExportModal/ExportModal.js +3 -3
- package/lib/components/FilterSummary/FilterSummary.js +72 -0
- package/lib/components/FilterSummary/index.js +15 -0
- package/lib/components/ImportModal/ImportModal.js +4 -4
- package/lib/components/InlineEdit/InlineEdit.js +27 -426
- package/lib/components/InlineEditV1/InlineEditV1.js +464 -0
- package/lib/components/InlineEditV1/index.js +13 -0
- package/lib/components/InlineEditV2/InlineEditV2.js +309 -0
- package/lib/components/InlineEditV2/index.js +13 -0
- package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +2 -2
- package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +3 -3
- package/lib/components/MultiAddSelect/MultiAddSelect.js +14 -7
- package/lib/components/NotificationsPanel/NotificationsPanel.js +8 -8
- package/lib/components/OptionsTile/OptionsTile.js +36 -19
- package/lib/components/PageHeader/PageHeader.js +5 -5
- package/lib/components/PageHeader/PageHeaderTitle.js +1 -1
- package/lib/components/ProductiveCard/ProductiveCard.js +5 -0
- package/lib/components/RemoveModal/RemoveModal.js +20 -3
- package/lib/components/Saving/Saving.js +5 -5
- package/lib/components/SidePanel/SidePanel.js +48 -53
- package/lib/components/SidePanel/motion/variants.js +55 -0
- package/lib/components/SingleAddSelect/SingleAddSelect.js +6 -0
- package/lib/components/StatusIcon/StatusIcon.js +45 -45
- package/lib/components/Tearsheet/Tearsheet.js +5 -0
- package/lib/components/Tearsheet/TearsheetNarrow.js +5 -0
- package/lib/components/Tearsheet/TearsheetShell.js +1 -1
- package/lib/components/UserProfileImage/UserProfileImage.js +7 -7
- package/lib/components/WebTerminal/WebTerminal.js +3 -3
- package/lib/components/WebTerminal/preview-components/Navigation.js +4 -4
- package/lib/components/index.js +33 -1
- package/lib/global/js/hooks/index.js +9 -1
- package/lib/global/js/hooks/useClickOutside.js +1 -1
- package/lib/global/js/hooks/useControllableState.js +94 -0
- package/lib/global/js/hooks/useCreateComponentFocus.js +42 -11
- package/lib/global/js/hooks/useResetCreateComponent.js +7 -2
- package/lib/global/js/package-settings.js +9 -6
- package/lib/global/js/utils/getBezierValues.js +29 -0
- package/lib/global/js/utils/getNumberOfHiddenSteps.js +28 -0
- package/lib/global/js/utils/motionConstants.js +55 -0
- package/lib/global/js/utils/rangeWithCallback.js +22 -0
- package/lib/global/js/utils/story-helper.js +5 -1
- package/lib/global/js/utils/uuidv4.spec.js +4 -0
- package/package.json +18 -16
- package/scss/components/ActionSet/_action-set.scss +9 -4
- package/scss/components/AddSelect/_add-select.scss +132 -34
- package/scss/components/AddSelect/_index.scss +1 -1
- package/scss/components/AddSelect/_storybook-styles.scss +1 -1
- package/scss/components/Card/_card.scss +1 -0
- package/scss/components/Cascade/_cascade.scss +1 -1
- package/scss/components/CreateTearsheet/_create-tearsheet.scss +2 -0
- package/scss/components/Datagrid/_datagrid.scss +7 -1
- package/scss/components/Datagrid/_storybook-styles.scss +29 -5
- package/scss/components/Datagrid/styles/_datagrid.scss +131 -37
- package/scss/components/Datagrid/styles/_draggableElement.scss +50 -18
- package/scss/components/Datagrid/styles/_index.scss +10 -8
- package/scss/components/Datagrid/styles/_useActionsColumn.scss +14 -0
- package/scss/components/Datagrid/styles/_useExpandedRow.scss +56 -10
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +419 -0
- package/scss/components/Datagrid/styles/_useNestedRows.scss +33 -1
- package/scss/components/Datagrid/styles/_useSortableColumns.scss +35 -16
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +31 -2
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +69 -0
- package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +87 -0
- package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +129 -0
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +12 -4
- package/scss/components/EditUpdateCards/_carbon-imports.scss +9 -0
- package/scss/components/EditUpdateCards/_edit-update-cards.scss +85 -0
- package/scss/components/EditUpdateCards/_index-with-carbon.scss +9 -0
- package/scss/components/EditUpdateCards/_index.scss +8 -0
- package/scss/components/EditUpdateCards/_storybook-styles.scss +55 -0
- package/scss/components/FilterSummary/_filter-summary.scss +21 -0
- package/scss/components/FilterSummary/_index.scss +10 -0
- package/scss/components/FilterSummary/_storybook-styles.scss +14 -0
- package/scss/components/{InlineEdit → InlineEditV1}/_index-with-carbon.scss +1 -1
- package/scss/components/{InlineEdit → InlineEditV1}/_index.scss +1 -1
- package/scss/components/{InlineEdit/_inline-edit.scss → InlineEditV1/_inline-edit-v1.scss} +4 -2
- package/scss/components/InlineEditV2/_carbon-imports.scss +9 -0
- package/scss/components/InlineEditV2/_index-with-carbon.scss +9 -0
- package/scss/components/InlineEditV2/_index.scss +10 -0
- package/scss/components/InlineEditV2/_inline-edit-v2.scss +83 -0
- package/scss/components/InlineEditV2/_storybook-styles.scss +9 -0
- package/scss/components/MultiAddSelect/_multi-add-select.scss +8 -1
- package/scss/components/MultiAddSelect/_storybook-styles.scss +1 -1
- package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -6
- package/scss/components/RemoveModal/_remove-modal.scss +0 -4
- package/scss/components/SidePanel/_side-panel.scss +3 -82
- package/scss/components/SidePanel/_storybook-styles.scss +6 -1
- package/scss/components/SingleAddSelect/_carbon-imports.scss +1 -1
- package/scss/components/SingleAddSelect/_index-with-carbon.scss +1 -1
- package/scss/components/SingleAddSelect/_index.scss +7 -0
- package/scss/components/SingleAddSelect/_single-add-select.scss +8 -1
- package/scss/components/SingleAddSelect/_storybook-styles.scss +1 -1
- package/scss/components/Tearsheet/_tearsheet.scss +4 -2
- package/scss/components/_index-released-only-with-carbon.scss +3 -1
- package/scss/components/_index-released-only.scss +4 -1
- package/scss/components/_index-with-carbon.scss +3 -1
- package/scss/components/_index.scss +4 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +0 -157
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +0 -62
- package/es/components/Datagrid/Datagrid.stories-helpers/LeftPanelStory.js +0 -6
- package/lib/components/Datagrid/Datagrid.stories-helpers/LeftPanelStory.js +0 -13
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +0 -52
- /package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/CustomizeColumnStory.js +0 -0
- /package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/RowSizeDropdownStory.js +0 -0
- /package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/SelectAllWithToggleStory.js +0 -0
- /package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/StickyActionsColumnStory.js +0 -0
- /package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/common.js +0 -0
- /package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/CustomizeColumnStory.js +0 -0
- /package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/RowSizeDropdownStory.js +0 -0
- /package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/SelectAllWithToggleStory.js +0 -0
- /package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/StickyActionsColumnStory.js +0 -0
- /package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/common.js +0 -0
- /package/scss/components/{InlineEdit → InlineEditV1}/_carbon-imports.scss +0 -0
- /package/scss/components/{InlineEdit → InlineEditV1}/_storybook-styles.scss +0 -0
@@ -105,8 +105,10 @@ $block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
|
105
105
|
overflow: hidden;
|
106
106
|
// positions text and placeholder including when showing placeholder
|
107
107
|
// NOTE: Using flex does strange things to a caret in content editable
|
108
|
-
width: calc(100% - var(--#{$block-class}--toolbar-width) - $spacing-05);
|
109
|
-
max-width: calc(
|
108
|
+
width: calc(100% - var(--#{$block-class}--toolbar-width) - #{$spacing-05});
|
109
|
+
max-width: calc(
|
110
|
+
100% - var(--#{$block-class}--toolbar-width) - #{$spacing-05}
|
111
|
+
);
|
110
112
|
min-height: var(--#{$block-class}--size);
|
111
113
|
/* stylelint-disable-next-line carbon/layout-token-use */
|
112
114
|
margin-right: var(--#{$block-class}--toolbar-width);
|
@@ -0,0 +1,9 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
|
8
|
+
@use '@carbon/react/scss/components/button';
|
9
|
+
@use '@carbon/react/scss/components/text-input';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
|
8
|
+
// An index file is most useful when you have multiple components
|
9
|
+
|
10
|
+
@use './inline-edit-v2';
|
@@ -0,0 +1,83 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
|
8
|
+
// Standard imports.
|
9
|
+
@use '@carbon/styles/scss/spacing' as *;
|
10
|
+
@use '@carbon/styles/scss/theme' as *;
|
11
|
+
@use '../../global/styles/project-settings' as *;
|
12
|
+
@use '@carbon/styles/scss/type';
|
13
|
+
|
14
|
+
$block-class: #{$pkg-prefix}--inline-edit-v2;
|
15
|
+
$carbon-input: #{$carbon-prefix}--text-input;
|
16
|
+
|
17
|
+
.#{$block-class} {
|
18
|
+
display: flex;
|
19
|
+
align-items: center;
|
20
|
+
background: transparent;
|
21
|
+
cursor: pointer;
|
22
|
+
}
|
23
|
+
|
24
|
+
.#{$block-class}-readonly {
|
25
|
+
cursor: not-allowed;
|
26
|
+
}
|
27
|
+
|
28
|
+
.#{$block-class}:hover {
|
29
|
+
background: $field-01;
|
30
|
+
}
|
31
|
+
|
32
|
+
.#{$block-class}:hover .#{$block-class}__btn-edit {
|
33
|
+
visibility: visible;
|
34
|
+
}
|
35
|
+
|
36
|
+
.#{$block-class}__btn-edit {
|
37
|
+
visibility: hidden;
|
38
|
+
}
|
39
|
+
|
40
|
+
.#{$block-class}-focused {
|
41
|
+
background: $field-01;
|
42
|
+
outline: 2px solid $focus;
|
43
|
+
}
|
44
|
+
|
45
|
+
.#{$block-class}__text-input {
|
46
|
+
flex: 1;
|
47
|
+
}
|
48
|
+
|
49
|
+
.#{$block-class}__text-input-label {
|
50
|
+
display: none;
|
51
|
+
}
|
52
|
+
|
53
|
+
.#{$block-class}__warning-icon {
|
54
|
+
/* stylelint-disable-next-line carbon/layout-token-use */
|
55
|
+
margin-right: 0.4375rem;
|
56
|
+
color: $support-error;
|
57
|
+
}
|
58
|
+
|
59
|
+
.#{$block-class}__warning-text {
|
60
|
+
@include type.type-style('label-01');
|
61
|
+
|
62
|
+
margin-top: $spacing-03;
|
63
|
+
color: $support-error;
|
64
|
+
}
|
65
|
+
|
66
|
+
// overrides
|
67
|
+
.#{$block-class}__text-input.#{$carbon-input} {
|
68
|
+
border: none;
|
69
|
+
background: transparent;
|
70
|
+
cursor: pointer;
|
71
|
+
outline: none;
|
72
|
+
}
|
73
|
+
|
74
|
+
.#{$block-class}-readonly .#{$block-class}__text-input.#{$carbon-input},
|
75
|
+
.#{$block-class}-readonly
|
76
|
+
.#{$carbon-prefix}--btn.#{$carbon-prefix}--btn--icon-only.#{$carbon-prefix}--tooltip__trigger {
|
77
|
+
cursor: not-allowed;
|
78
|
+
}
|
79
|
+
|
80
|
+
.#{$block-class}__text-input.#{$carbon-input}:focus,
|
81
|
+
.#{$block-class}__text-input.#{$carbon-input}:active {
|
82
|
+
outline: none;
|
83
|
+
}
|
@@ -60,8 +60,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--notifications-panel;
|
|
60
60
|
max-height: 38.5rem;
|
61
61
|
background-color: $background;
|
62
62
|
color: $text-primary;
|
63
|
-
transition: transform $duration-fast-02;
|
64
|
-
transition-timing-function: motion(standard);
|
63
|
+
transition: transform $duration-fast-02 motion(standard);
|
65
64
|
|
66
65
|
.#{$block-class}__header-container {
|
67
66
|
position: sticky;
|
@@ -123,8 +122,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--notifications-panel;
|
|
123
122
|
background-color: $background;
|
124
123
|
cursor: pointer;
|
125
124
|
text-align: left;
|
126
|
-
transition: background-color $duration-moderate-02;
|
127
|
-
transition-timing-function: motion(standard);
|
125
|
+
transition: background-color $duration-moderate-02 motion(standard);
|
128
126
|
.#{$block-class}__notification-title {
|
129
127
|
margin-bottom: $spacing-02;
|
130
128
|
color: $text-on-color;
|
@@ -236,8 +234,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--notifications-panel;
|
|
236
234
|
margin: 0 auto;
|
237
235
|
background-color: $layer-02;
|
238
236
|
content: '';
|
239
|
-
transition: background-color $duration-moderate-02;
|
240
|
-
transition-timing-function: motion(standard);
|
237
|
+
transition: background-color $duration-moderate-02 motion(standard);
|
241
238
|
}
|
242
239
|
.#{$block-class}__notification-today:hover
|
243
240
|
+ .#{$block-class}__notification-today:not(:first-of-type):before,
|
@@ -21,10 +21,6 @@ $block-class: #{c4p-settings.$pkg-prefix}--remove-modal;
|
|
21
21
|
padding-right: $spacing-05;
|
22
22
|
}
|
23
23
|
|
24
|
-
.#{$block-class} .#{c4p-settings.$carbon-prefix}--modal-close {
|
25
|
-
display: none;
|
26
|
-
}
|
27
|
-
|
28
24
|
.#{$block-class}__body {
|
29
25
|
padding-right: 20%;
|
30
26
|
margin-bottom: $spacing-05;
|
@@ -26,49 +26,6 @@
|
|
26
26
|
$block-class: #{c4p-settings.$pkg-prefix}--side-panel;
|
27
27
|
$action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
28
28
|
|
29
|
-
@mixin sidePanelEntranceRight($size: map-get($side-panel-sizes, md)) {
|
30
|
-
@keyframes side-panel-entrance-right {
|
31
|
-
0% {
|
32
|
-
opacity: 0;
|
33
|
-
// stylelint-disable-next-line carbon/layout-token-use
|
34
|
-
transform: translateX(#{$size}); // the size width of the side panel
|
35
|
-
}
|
36
|
-
|
37
|
-
100% {
|
38
|
-
opacity: 1;
|
39
|
-
transform: translateX(0);
|
40
|
-
}
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
@mixin sidePanelEntranceLeft($size: map-get($side-panel-sizes, md)) {
|
45
|
-
@keyframes side-panel-entrance-left {
|
46
|
-
0% {
|
47
|
-
opacity: 0;
|
48
|
-
// stylelint-disable-next-line carbon/layout-token-use
|
49
|
-
transform: translateX(-#{$size}); // the size width of the side panel
|
50
|
-
}
|
51
|
-
|
52
|
-
100% {
|
53
|
-
opacity: 1;
|
54
|
-
transform: translateX(0);
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
@mixin sidePanelEntrance(
|
60
|
-
$placement: 'right',
|
61
|
-
$size: map-get($side-panel-sizes, md)
|
62
|
-
) {
|
63
|
-
width: $size;
|
64
|
-
max-width: 100%;
|
65
|
-
@if $placement == right {
|
66
|
-
@include sidePanelEntranceRight($size);
|
67
|
-
} @else {
|
68
|
-
@include sidePanelEntranceLeft($size);
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
29
|
@mixin setPanelSize($size: map-get($side-panel-sizes, md)) {
|
73
30
|
width: $size;
|
74
31
|
max-width: 100%;
|
@@ -93,32 +50,6 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
93
50
|
-webkit-line-clamp: 2;
|
94
51
|
}
|
95
52
|
|
96
|
-
@keyframes side-panel-exit-left {
|
97
|
-
0% {
|
98
|
-
opacity: 1;
|
99
|
-
transform: translateX(0);
|
100
|
-
}
|
101
|
-
|
102
|
-
100% {
|
103
|
-
opacity: 0;
|
104
|
-
// stylelint-disable-next-line carbon/layout-token-use
|
105
|
-
transform: translateX(calc(-1 * #{map-get($side-panel-sizes, md)}));
|
106
|
-
}
|
107
|
-
}
|
108
|
-
|
109
|
-
@keyframes side-panel-exit-right {
|
110
|
-
0% {
|
111
|
-
opacity: 1;
|
112
|
-
transform: translateX(0);
|
113
|
-
}
|
114
|
-
|
115
|
-
100% {
|
116
|
-
opacity: 0;
|
117
|
-
// stylelint-disable-next-line carbon/layout-token-use
|
118
|
-
transform: translateX(map-get($side-panel-sizes, md));
|
119
|
-
}
|
120
|
-
}
|
121
|
-
|
122
53
|
.#{$block-class}__container {
|
123
54
|
--#{$block-class}--subtitle-opacity: 1;
|
124
55
|
--#{$block-class}--title-container-height: 0;
|
@@ -140,8 +71,6 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
140
71
|
box-sizing: border-box;
|
141
72
|
background-color: $layer-01;
|
142
73
|
color: $text-primary;
|
143
|
-
transition: transform $duration-moderate-02;
|
144
|
-
transition-timing-function: motion(standard);
|
145
74
|
@each $size, $size_value in $side-panel-sizes {
|
146
75
|
&.#{$block-class}__container--#{$size} {
|
147
76
|
@include setPanelSize($size_value);
|
@@ -153,14 +82,10 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
153
82
|
}
|
154
83
|
}
|
155
84
|
&.#{$block-class}__container-right-placement.#{$block-class}__container--#{$size} {
|
156
|
-
@include sidePanelEntrance(right, $size_value);
|
157
|
-
|
158
85
|
right: 0;
|
159
86
|
border-left: 1px solid $border-subtle-02;
|
160
87
|
}
|
161
88
|
&.#{$block-class}__container-left-placement.#{$block-class}__container--#{$size} {
|
162
|
-
@include sidePanelEntrance(left, $size_value);
|
163
|
-
|
164
89
|
left: 0;
|
165
90
|
border-right: 1px solid $border-subtle-02;
|
166
91
|
}
|
@@ -284,7 +209,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
284
209
|
// stylelint-disable-next-line carbon/layout-token-use
|
285
210
|
top: calc(
|
286
211
|
var(--#{$block-class}--title-text-height) +
|
287
|
-
var(--#{$block-class}--label-text-height)
|
212
|
+
var(--#{$block-class}--label-text-height)
|
288
213
|
);
|
289
214
|
background-color: $layer-01;
|
290
215
|
}
|
@@ -304,7 +229,6 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
304
229
|
|
305
230
|
.#{$block-class}__title-container.#{$block-class}__title-container--no-title-animation {
|
306
231
|
position: fixed;
|
307
|
-
top: $spacing-09;
|
308
232
|
height: calc(
|
309
233
|
var(--#{$block-class}--title-text-height) +
|
310
234
|
var(--#{$block-class}--label-text-height)
|
@@ -359,7 +283,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
359
283
|
// stylelint-disable-next-line carbon/layout-token-use
|
360
284
|
top: calc(
|
361
285
|
var(--#{$block-class}--title-text-height) +
|
362
|
-
var(--#{$block-class}--subtitle-container-height)
|
286
|
+
var(--#{$block-class}--subtitle-container-height)
|
363
287
|
);
|
364
288
|
width: 100%;
|
365
289
|
border-bottom: 1px solid $layer-active-01;
|
@@ -389,8 +313,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
389
313
|
padding: 0 $spacing-05;
|
390
314
|
margin-bottom: $spacing-03;
|
391
315
|
background-color: $layer-01;
|
392
|
-
transition: transform $duration-moderate-01;
|
393
|
-
transition-timing-function: motion(standard);
|
316
|
+
transition: transform $duration-moderate-01 motion(standard);
|
394
317
|
.#{$block-class}__action-toolbar-button {
|
395
318
|
min-width: 2rem;
|
396
319
|
&.#{$block-class}__action-toolbar-icon-only-button {
|
@@ -535,6 +458,4 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
535
458
|
width: 100%;
|
536
459
|
height: 100%;
|
537
460
|
background-color: $overlay;
|
538
|
-
transition: background-color $duration-moderate-02;
|
539
|
-
transition-timing-function: motion(standard);
|
540
461
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
//
|
2
|
-
// Copyright IBM Corp. 2020,
|
2
|
+
// Copyright IBM Corp. 2020, 2022
|
3
3
|
//
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
@@ -7,6 +7,7 @@
|
|
7
7
|
|
8
8
|
@use '@carbon/styles/scss/theme' as *;
|
9
9
|
@use '@carbon/styles/scss/spacing' as *;
|
10
|
+
@use '@carbon/themes/scss/themes';
|
10
11
|
@use '@carbon/styles/scss/type';
|
11
12
|
|
12
13
|
$story-prefix: side-panel-stories__;
|
@@ -38,3 +39,7 @@ $story-prefix: side-panel-stories__;
|
|
38
39
|
margin: $spacing-05 0 $spacing-04;
|
39
40
|
}
|
40
41
|
}
|
42
|
+
|
43
|
+
.#{$story-prefix}header {
|
44
|
+
@include theme(themes.$g100);
|
45
|
+
}
|
@@ -47,8 +47,8 @@ $motion-duration: $duration-moderate-02;
|
|
47
47
|
/* stylelint-disable-next-line function-no-unknown */
|
48
48
|
z-index: utilities.z('modal');
|
49
49
|
align-items: flex-end;
|
50
|
-
// stylelint-disable-next-line carbon/motion-
|
51
|
-
transition: visibility
|
50
|
+
// stylelint-disable-next-line carbon/motion-duration-use, carbon/motion-easing-use
|
51
|
+
transition: visibility 0s linear,
|
52
52
|
background-color $motion-duration motion(entrance, expressive),
|
53
53
|
opacity $motion-duration motion(entrance, expressive);
|
54
54
|
@media (prefers-reduced-motion: reduce) {
|
@@ -202,6 +202,8 @@ $motion-duration: $duration-moderate-02;
|
|
202
202
|
@include breakpoint-up('md') {
|
203
203
|
max-width: 60%;
|
204
204
|
}
|
205
|
+
|
206
|
+
word-break: break-word;
|
205
207
|
}
|
206
208
|
|
207
209
|
&.#{$block-class}--narrow .#{$block-class}__header-description {
|
@@ -21,14 +21,16 @@
|
|
21
21
|
@use './ExportModal/index-with-carbon' as *;
|
22
22
|
@use './ExpressiveCard/index-with-carbon' as *;
|
23
23
|
@use './HTTPErrors/index-with-carbon' as *;
|
24
|
-
@use './
|
24
|
+
@use './InlineEditV1/index-with-carbon' as *;
|
25
25
|
@use './ImportModal/index-with-carbon' as *;
|
26
|
+
@use './MultiAddSelect/index-with-carbon' as *;
|
26
27
|
@use './NotificationsPanel/index-with-carbon' as *;
|
27
28
|
@use './PageHeader/index-with-carbon' as *;
|
28
29
|
@use './ProductiveCard/index-with-carbon' as *;
|
29
30
|
@use './RemoveModal/index-with-carbon' as *;
|
30
31
|
@use './Saving/index-with-carbon' as *;
|
31
32
|
@use './SidePanel/index-with-carbon' as *;
|
33
|
+
@use './SingleAddSelect/index-with-carbon' as *;
|
32
34
|
@use './StatusIcon/index-with-carbon' as *;
|
33
35
|
@use './TagSet/index-with-carbon' as *;
|
34
36
|
@use './Tearsheet/index-with-carbon' as *;
|
@@ -21,15 +21,18 @@
|
|
21
21
|
@use './ExportModal';
|
22
22
|
@use './ExpressiveCard';
|
23
23
|
@use './HTTPErrors';
|
24
|
-
@use './
|
24
|
+
@use './InlineEditV1';
|
25
25
|
@use './ImportModal';
|
26
|
+
@use './MultiAddSelect';
|
26
27
|
@use './NotificationsPanel';
|
27
28
|
@use './PageHeader';
|
28
29
|
@use './ProductiveCard';
|
29
30
|
@use './RemoveModal';
|
30
31
|
@use './Saving';
|
31
32
|
@use './SidePanel';
|
33
|
+
@use './SingleAddSelect';
|
32
34
|
@use './StatusIcon';
|
33
35
|
@use './TagSet';
|
34
36
|
@use './Tearsheet';
|
35
37
|
@use './UserProfileImage';
|
38
|
+
@use './WebTerminal';
|
@@ -42,6 +42,8 @@
|
|
42
42
|
@use './UserProfileImage/index-with-carbon' as *;
|
43
43
|
@use './EditSidePanel/index-with-carbon' as *;
|
44
44
|
@use './OptionsTile/index-with-carbon' as *;
|
45
|
-
@use './
|
45
|
+
@use './InlineEditV1/index-with-carbon' as *;
|
46
|
+
@use './InlineEditV2/index-with-carbon' as *;
|
46
47
|
@use './DataSpreadsheet/index-with-carbon' as *;
|
47
48
|
@use './Datagrid/index-with-carbon' as *;
|
49
|
+
@use './EditUpdateCards/index-with-carbon' as *;
|
@@ -23,6 +23,7 @@
|
|
23
23
|
@use './EmptyStates';
|
24
24
|
@use './ExportModal';
|
25
25
|
@use './ExpressiveCard';
|
26
|
+
@use './FilterSummary/index';
|
26
27
|
@use './HTTPErrors';
|
27
28
|
@use './ImportModal';
|
28
29
|
@use './ModifiedTabs';
|
@@ -42,9 +43,11 @@
|
|
42
43
|
@use './UserProfileImage';
|
43
44
|
@use './EditSidePanel';
|
44
45
|
@use './OptionsTile';
|
45
|
-
@use './
|
46
|
+
@use './InlineEditV1';
|
47
|
+
@use './InlineEditV2';
|
46
48
|
@use './DataSpreadsheet';
|
47
49
|
@use './Datagrid';
|
48
50
|
@use './EditTearsheet';
|
49
51
|
@use './EditTearsheetNarrow';
|
50
52
|
@use './EditFullPage';
|
53
|
+
@use './EditUpdateCards';
|
@@ -1,157 +0,0 @@
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
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; }
|
5
|
-
|
6
|
-
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; }
|
7
|
-
|
8
|
-
/*
|
9
|
-
* Licensed Materials - Property of IBM
|
10
|
-
* 5724-Q36
|
11
|
-
* (c) Copyright IBM Corp. 2021
|
12
|
-
* US Government Users Restricted Rights - Use, duplication or disclosure
|
13
|
-
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
14
|
-
*/
|
15
|
-
// @flow
|
16
|
-
import React, { useState } from 'react';
|
17
|
-
import PropTypes from 'prop-types';
|
18
|
-
import { Modal } from '@carbon/react';
|
19
|
-
import { isColumnVisible } from './common';
|
20
|
-
import Columns from './Columns';
|
21
|
-
import Actions from './Actions';
|
22
|
-
import { pkg } from '../../../../../settings';
|
23
|
-
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
24
|
-
|
25
|
-
var CustomizeColumnsModal = function CustomizeColumnsModal(_ref) {
|
26
|
-
var isOpen = _ref.isOpen,
|
27
|
-
setIsModalOpen = _ref.setIsModalOpen,
|
28
|
-
onSaveColumnPrefs = _ref.onSaveColumnPrefs,
|
29
|
-
columnDefinitions = _ref.columnDefinitions,
|
30
|
-
originalColumnDefinitions = _ref.originalColumnDefinitions,
|
31
|
-
_ref$customizeModalHe = _ref.customizeModalHeadingLabel,
|
32
|
-
customizeModalHeadingLabel = _ref$customizeModalHe === void 0 ? 'Customize display' : _ref$customizeModalHe,
|
33
|
-
_ref$primaryButtonTex = _ref.primaryButtonTextLabel,
|
34
|
-
primaryButtonTextLabel = _ref$primaryButtonTex === void 0 ? 'Save' : _ref$primaryButtonTex,
|
35
|
-
_ref$secondaryButtonT = _ref.secondaryButtonTextLabel,
|
36
|
-
secondaryButtonTextLabel = _ref$secondaryButtonT === void 0 ? 'Cancel' : _ref$secondaryButtonT,
|
37
|
-
_ref$instructionsLabe = _ref.instructionsLabel,
|
38
|
-
instructionsLabel = _ref$instructionsLabe === void 0 ? 'Deselect columns to hide them. Click and drag the white box to reorder the columns. These specifications will be saved and persist if you leave and return to the data table.' : _ref$instructionsLabe;
|
39
|
-
|
40
|
-
var _useState = useState(''),
|
41
|
-
_useState2 = _slicedToArray(_useState, 2),
|
42
|
-
searchText = _useState2[0],
|
43
|
-
setSearchText = _useState2[1];
|
44
|
-
|
45
|
-
var _useState3 = useState(columnDefinitions // hide the columns without Header, e.g the sticky actions, spacer
|
46
|
-
.filter(function (colDef) {
|
47
|
-
return !!colDef.Header.props;
|
48
|
-
}) // only sort the hidden column to the end when modal reopen
|
49
|
-
.sort(function (defA, defB) {
|
50
|
-
var isVisibleA = isColumnVisible(defA);
|
51
|
-
var isVisibleB = isColumnVisible(defB);
|
52
|
-
|
53
|
-
if (isVisibleA && !isVisibleB) {
|
54
|
-
return -1;
|
55
|
-
}
|
56
|
-
|
57
|
-
if (!isVisibleA && isVisibleB) {
|
58
|
-
return 1;
|
59
|
-
}
|
60
|
-
|
61
|
-
return 0;
|
62
|
-
})),
|
63
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
64
|
-
columnObjects = _useState4[0],
|
65
|
-
_setColumnsObject = _useState4[1];
|
66
|
-
|
67
|
-
var _useState5 = useState(false),
|
68
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
69
|
-
isDirty = _useState6[0],
|
70
|
-
setIsDirty = _useState6[1];
|
71
|
-
|
72
|
-
var onRequestClose = function onRequestClose() {
|
73
|
-
setIsModalOpen(false);
|
74
|
-
};
|
75
|
-
|
76
|
-
var onRequestSubmit = function onRequestSubmit() {
|
77
|
-
setIsModalOpen(false);
|
78
|
-
var updatedColumns = columnObjects.map(function (colDef) {
|
79
|
-
return {
|
80
|
-
id: colDef.id,
|
81
|
-
isVisible: colDef.isVisible
|
82
|
-
};
|
83
|
-
});
|
84
|
-
onSaveColumnPrefs(updatedColumns);
|
85
|
-
};
|
86
|
-
|
87
|
-
var onCheckboxCheck = function onCheckboxCheck(col, value) {
|
88
|
-
var changedDefinitions = columnObjects.map(function (definition) {
|
89
|
-
if (definition.id === col.id) {
|
90
|
-
return _objectSpread(_objectSpread({}, definition), {}, {
|
91
|
-
isVisible: value
|
92
|
-
});
|
93
|
-
}
|
94
|
-
|
95
|
-
return definition;
|
96
|
-
});
|
97
|
-
|
98
|
-
_setColumnsObject(changedDefinitions);
|
99
|
-
|
100
|
-
setDirty();
|
101
|
-
};
|
102
|
-
|
103
|
-
var setDirty = function setDirty() {
|
104
|
-
if (!isDirty) {
|
105
|
-
setIsDirty(true);
|
106
|
-
}
|
107
|
-
};
|
108
|
-
|
109
|
-
var string = searchText.trim().toLowerCase();
|
110
|
-
return /*#__PURE__*/React.createElement(Modal, {
|
111
|
-
className: "".concat(blockClass, "__customize-columns-modal"),
|
112
|
-
open: isOpen,
|
113
|
-
modalHeading: customizeModalHeadingLabel,
|
114
|
-
primaryButtonText: primaryButtonTextLabel,
|
115
|
-
secondaryButtonText: secondaryButtonTextLabel,
|
116
|
-
selectorPrimaryFocus: ".".concat(blockClass, "__customize-columns-column-list--focus"),
|
117
|
-
primaryButtonDisabled: !isDirty,
|
118
|
-
onRequestClose: onRequestClose,
|
119
|
-
onRequestSubmit: onRequestSubmit,
|
120
|
-
size: "sm",
|
121
|
-
hasForm: true
|
122
|
-
}, /*#__PURE__*/React.createElement("div", {
|
123
|
-
className: "".concat(blockClass, "__customize-columns-instructions")
|
124
|
-
}, instructionsLabel), /*#__PURE__*/React.createElement(Actions, {
|
125
|
-
columns: columnObjects,
|
126
|
-
originalColumnDefinitions: originalColumnDefinitions,
|
127
|
-
searchText: searchText,
|
128
|
-
setColumnsObject: function setColumnsObject(cols) {
|
129
|
-
_setColumnsObject(cols);
|
130
|
-
|
131
|
-
setDirty();
|
132
|
-
},
|
133
|
-
setSearchText: setSearchText
|
134
|
-
}), isOpen && /*#__PURE__*/React.createElement(Columns, {
|
135
|
-
columns: columnObjects,
|
136
|
-
filterString: string,
|
137
|
-
onSelectColumn: onCheckboxCheck,
|
138
|
-
setColumnsObject: function setColumnsObject(cols) {
|
139
|
-
_setColumnsObject(cols);
|
140
|
-
|
141
|
-
setDirty();
|
142
|
-
}
|
143
|
-
}));
|
144
|
-
};
|
145
|
-
|
146
|
-
CustomizeColumnsModal.propTypes = {
|
147
|
-
columnDefinitions: PropTypes.array.isRequired,
|
148
|
-
customizeModalHeadingLabel: PropTypes.string,
|
149
|
-
instructionsLabel: PropTypes.string,
|
150
|
-
isOpen: PropTypes.bool.isRequired,
|
151
|
-
onSaveColumnPrefs: PropTypes.func.isRequired,
|
152
|
-
originalColumnDefinitions: PropTypes.array.isRequired,
|
153
|
-
primaryButtonTextLabel: PropTypes.string,
|
154
|
-
secondaryButtonTextLabel: PropTypes.string,
|
155
|
-
setIsModalOpen: PropTypes.func.isRequired
|
156
|
-
};
|
157
|
-
export default CustomizeColumnsModal;
|