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