@carbon/ibm-products 2.12.0 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +3485 -3237
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -10
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +464 -696
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -4
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +1041 -991
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -8
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +1419 -1437
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -8
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyDownloader.js +7 -5
- package/es/components/APIKeyModal/APIKeyModal.js +7 -5
- package/es/components/Checklist/Checklist.docs-page.js +13 -0
- package/es/components/Checklist/Checklist.js +292 -0
- package/es/components/Checklist/ChecklistChart.js +98 -0
- package/es/components/Checklist/ChecklistIcon.js +107 -0
- package/es/components/Checklist/index.js +8 -0
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -3
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -5
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +1 -3
- package/es/components/Datagrid/Datagrid/DatagridRow.js +2 -6
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -3
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +1 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +9 -8
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +6 -12
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +0 -5
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +20 -6
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +5 -4
- package/es/components/Datagrid/Datagrid.docs-page.js +1 -1
- package/es/components/Datagrid/useDisableSelectRows.js +1 -1
- package/es/components/Datagrid/useInlineEdit.js +1 -6
- package/es/components/Datagrid/useSelectRows.js +1 -1
- package/es/components/Datagrid/useSortableColumns.js +14 -25
- package/es/components/ImportModal/ImportModal.js +7 -5
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/index.js +2 -1
- package/es/global/js/hooks/useCreateComponentFocus.js +7 -5
- package/es/global/js/hooks/useCreateComponentStepChange.js +42 -37
- package/es/global/js/package-settings.js +4 -2
- package/es/global/js/utils/getNodeTextContent.js +4 -0
- package/es/global/js/utils/story-helper.js +2 -1
- package/es/global/js/utils/test-helper.js +28 -17
- package/lib/components/APIKeyModal/APIKeyDownloader.js +10 -9
- package/lib/components/APIKeyModal/APIKeyModal.docs-page.js +3 -4
- package/lib/components/APIKeyModal/APIKeyModal.js +10 -9
- package/lib/components/AboutModal/AboutModal.docs-page.js +3 -4
- package/lib/components/AboutModal/AboutModal.js +3 -4
- package/lib/components/ActionBar/ActionBar.js +3 -4
- package/lib/components/ActionBar/ActionBarItem.js +1 -2
- package/lib/components/ActionBar/ActionBarOverflowItems.js +3 -4
- package/lib/components/ActionSet/ActionSet.js +1 -2
- package/lib/components/ActionSet/actions.js +4 -7
- package/lib/components/AddSelect/AddSelect.js +3 -4
- package/lib/components/AddSelect/AddSelectBody.js +3 -4
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +1 -2
- package/lib/components/AddSelect/AddSelectColumn.js +3 -4
- package/lib/components/AddSelect/AddSelectFilter.js +3 -4
- package/lib/components/AddSelect/AddSelectFormControl.js +1 -2
- package/lib/components/AddSelect/AddSelectList.js +1 -2
- package/lib/components/AddSelect/AddSelectMetaPanel.js +3 -4
- package/lib/components/AddSelect/AddSelectRow.js +3 -4
- package/lib/components/AddSelect/AddSelectSidebar.js +1 -2
- package/lib/components/AddSelect/AddSelectSort.js +1 -2
- package/lib/components/AddSelect/add-select-utils.js +5 -9
- package/lib/components/AddSelect/hooks/useFocus.js +1 -2
- package/lib/components/AddSelect/hooks/useItemSort.js +2 -3
- package/lib/components/AddSelect/hooks/useParentSelect.js +1 -2
- package/lib/components/AddSelect/hooks/usePath.js +1 -2
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +3 -4
- package/lib/components/ButtonMenu/ButtonMenu.js +1 -2
- package/lib/components/ButtonMenu/ButtonMenuItem.js +1 -2
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +3 -4
- package/lib/components/Card/Card.js +3 -4
- package/lib/components/Card/CardFooter.js +1 -2
- package/lib/components/Card/CardHeader.js +1 -2
- package/lib/components/Cascade/Cascade.docs-page.js +3 -4
- package/lib/components/Cascade/Cascade.js +3 -4
- package/lib/components/Checklist/Checklist.docs-page.js +23 -0
- package/lib/components/Checklist/Checklist.js +297 -0
- package/lib/components/Checklist/ChecklistChart.js +99 -0
- package/lib/components/Checklist/ChecklistIcon.js +109 -0
- package/lib/components/Checklist/index.js +12 -0
- package/lib/components/ComboButton/ComboButton.js +3 -4
- package/lib/components/ComboButton/ComboButtonItem/index.js +1 -2
- package/lib/components/CreateFullPage/CreateFullPage.docs-page.js +3 -4
- package/lib/components/CreateFullPage/CreateFullPage.js +5 -8
- package/lib/components/CreateFullPage/CreateFullPageStep.js +3 -4
- package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -2
- package/lib/components/CreateModal/CreateModal.docs-page.js +3 -4
- package/lib/components/CreateModal/CreateModal.js +1 -2
- package/lib/components/CreateSidePanel/CreateSidePanel.docs-page.js +3 -4
- package/lib/components/CreateSidePanel/CreateSidePanel.js +1 -2
- package/lib/components/CreateTearsheet/CreateTearsheet.docs-page.js +3 -4
- package/lib/components/CreateTearsheet/CreateTearsheet.js +5 -8
- package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +3 -4
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +3 -4
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +4 -5
- package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +4 -5
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +3 -4
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +3 -4
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +3 -4
- package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +2 -3
- package/lib/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +2 -3
- package/lib/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +2 -3
- package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +2 -3
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +2 -3
- package/lib/components/DataSpreadsheet/utils/generateData.js +2 -3
- package/lib/components/DataSpreadsheet/utils/getCellSize.js +2 -3
- package/lib/components/DataSpreadsheet/utils/getSelectionAreaPoints.js +2 -3
- package/lib/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +4 -7
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +2 -3
- package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +2 -3
- package/lib/components/DataSpreadsheet/utils/selectAllCells.js +2 -3
- package/lib/components/Datagrid/Datagrid/Datagrid.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridBody.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +3 -4
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -5
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -9
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +2 -5
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +3 -8
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -5
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -4
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +2 -5
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +4 -5
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +4 -7
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +10 -10
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +4 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +5 -8
- package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +13 -26
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +4 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +4 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +7 -14
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +3 -9
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +4 -6
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +26 -13
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +9 -6
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +5 -9
- package/lib/components/Datagrid/Datagrid.docs-page.js +5 -6
- package/lib/components/Datagrid/Datagrid.stories/CustomizeColumnStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/RowSizeDropdownStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/SelectAllWithToggleStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/common.js +4 -7
- package/lib/components/Datagrid/Extensions/ColumnAlignment/ColumnAlignment.docs-page.js +2 -3
- package/lib/components/Datagrid/Extensions/ColumnCustomization/ColumnCustomization.docs-page.js +2 -3
- package/lib/components/Datagrid/Extensions/EditableCell/EditableCell.docs-page.js +2 -3
- package/lib/components/Datagrid/Extensions/ExpandableRow/ExpandableRow.docs-page.js +2 -3
- package/lib/components/Datagrid/Extensions/Filtering/Filtering.docs-page.js +2 -3
- package/lib/components/Datagrid/Extensions/RowActionButtons/RowActionButtons.docs-page.js +2 -3
- package/lib/components/Datagrid/common-column-ids.js +1 -2
- package/lib/components/Datagrid/useActionsColumn.js +3 -4
- package/lib/components/Datagrid/useColumnCenterAlign.js +1 -2
- package/lib/components/Datagrid/useColumnOrder.js +1 -2
- package/lib/components/Datagrid/useColumnRightAlign.js +1 -2
- package/lib/components/Datagrid/useCustomizeColumns.js +3 -4
- package/lib/components/Datagrid/useDatagrid.js +1 -2
- package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -2
- package/lib/components/Datagrid/useDisableSelectRows.js +2 -3
- package/lib/components/Datagrid/useEditableCell.js +1 -2
- package/lib/components/Datagrid/useExpandedRow.js +1 -2
- package/lib/components/Datagrid/useFiltering.js +1 -2
- package/lib/components/Datagrid/useFlexResize.js +1 -2
- package/lib/components/Datagrid/useFloatingScroll.js +1 -2
- package/lib/components/Datagrid/useInfiniteScroll.js +1 -2
- package/lib/components/Datagrid/useInlineEdit.js +4 -10
- package/lib/components/Datagrid/useNestedRowExpander.js +3 -4
- package/lib/components/Datagrid/useNestedRows.js +1 -2
- package/lib/components/Datagrid/useOnRowClick.js +1 -2
- package/lib/components/Datagrid/useParentDimensions.js +1 -2
- package/lib/components/Datagrid/useResizeTable.js +1 -2
- package/lib/components/Datagrid/useRowExpander.js +3 -4
- package/lib/components/Datagrid/useRowIsMouseOver.js +1 -2
- package/lib/components/Datagrid/useRowRenderer.js +1 -2
- package/lib/components/Datagrid/useRowSize.js +1 -2
- package/lib/components/Datagrid/useSelectAllToggle.js +3 -4
- package/lib/components/Datagrid/useSelectRows.js +4 -5
- package/lib/components/Datagrid/useSkeletonRows.js +1 -2
- package/lib/components/Datagrid/useSortableColumns.js +15 -27
- package/lib/components/Datagrid/useStickyColumn.js +1 -2
- package/lib/components/Datagrid/utils/DatagridActions.js +4 -5
- package/lib/components/Datagrid/utils/DatagridPagination.js +2 -3
- package/lib/components/Datagrid/utils/Wrapper.js +2 -3
- package/lib/components/Datagrid/utils/getArgTypes.js +2 -3
- package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +2 -3
- package/lib/components/Datagrid/utils/getInlineEditColumns.js +3 -5
- package/lib/components/Datagrid/utils/makeData.js +3 -6
- package/lib/components/EditFullPage/EditFullPage.docs-page.js +3 -4
- package/lib/components/EditFullPage/EditFullPage.js +1 -2
- package/lib/components/EditInPlace/EditInPlace.js +4 -6
- package/lib/components/EditSidePanel/EditSidePanel.js +1 -2
- package/lib/components/EditTearsheet/EditTearsheet.docs-page.js +3 -4
- package/lib/components/EditTearsheet/EditTearsheet.js +5 -8
- package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -4
- package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +4 -5
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +1 -2
- package/lib/components/EditUpdateCards/EditUpdateCards.js +1 -2
- package/lib/components/EmptyStates/EmptyState.js +2 -4
- package/lib/components/EmptyStates/EmptyStateContent.js +1 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -2
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -2
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -2
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -2
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +1 -2
- package/lib/components/ExampleComponent/ExampleComponent.docs-page.js +3 -4
- package/lib/components/ExampleComponent/ExampleComponent.js +3 -4
- package/lib/components/ExampleComponent/ExampleDeprecatedComponent.js +1 -2
- package/lib/components/ExampleComponent/useExample.js +1 -2
- package/lib/components/ExportModal/ExportModal.js +3 -4
- package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -4
- package/lib/components/FilterSummary/FilterSummary.js +1 -2
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -2
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -2
- package/lib/components/HTTPErrors/HTTPErrorContent.js +1 -2
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +1 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +1 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +1 -2
- package/lib/components/ImportModal/ImportModal.docs-page.js +1 -2
- package/lib/components/ImportModal/ImportModal.js +10 -9
- package/lib/components/MultiAddSelect/MultiAddSelect.docs-page.js +1 -2
- package/lib/components/MultiAddSelect/MultiAddSelect.js +3 -4
- package/lib/components/NotificationsPanel/NotificationsPanel.js +3 -4
- package/lib/components/NotificationsPanel/NotificationsPanel_data.js +1 -2
- package/lib/components/NotificationsPanel/preview-components/UnreadNotificationBell.js +2 -3
- package/lib/components/NotificationsPanel/utils.js +1 -2
- package/lib/components/OptionsTile/OptionsTile.js +3 -4
- package/lib/components/PageHeader/PageHeader.js +5 -7
- package/lib/components/PageHeader/PageHeaderDemo.data.js +3 -4
- package/lib/components/PageHeader/PageHeaderTitle.js +2 -4
- package/lib/components/PageHeader/PageHeaderUtils.js +5 -9
- package/lib/components/ProductiveCard/ProductiveCard.js +3 -4
- package/lib/components/RemoveModal/RemoveModal.docs-page.js +1 -2
- package/lib/components/RemoveModal/RemoveModal.js +3 -4
- package/lib/components/Saving/Saving.js +3 -4
- package/lib/components/SidePanel/SidePanel.js +3 -4
- package/lib/components/SidePanel/constants.js +2 -3
- package/lib/components/SidePanel/motion/variants.js +3 -5
- package/lib/components/SimpleHeader/SimpleHeader.docs-page.js +3 -4
- package/lib/components/SimpleHeader/SimpleHeader.js +4 -6
- package/lib/components/SingleAddSelect/SingleAddSelect.docs-page.js +1 -2
- package/lib/components/SingleAddSelect/SingleAddSelect.js +3 -4
- package/lib/components/StatusIcon/StatusIcon.docs-page.js +3 -4
- package/lib/components/StatusIcon/StatusIcon.js +3 -4
- package/lib/components/TagSet/TagSet.js +5 -8
- package/lib/components/TagSet/TagSetModal.js +3 -4
- package/lib/components/TagSet/TagSetOverflow.js +3 -4
- package/lib/components/TagSet/constants.js +2 -3
- package/lib/components/Tearsheet/Tearsheet.js +2 -4
- package/lib/components/Tearsheet/TearsheetNarrow.js +2 -4
- package/lib/components/Tearsheet/TearsheetShell.js +8 -14
- package/lib/components/Toolbar/Toolbar.docs-page.js +3 -4
- package/lib/components/Toolbar/Toolbar.js +6 -10
- package/lib/components/Toolbar/ToolbarButton.js +4 -6
- package/lib/components/Toolbar/ToolbarGroup.js +3 -4
- package/lib/components/TooltipTrigger/TooltipTrigger.js +1 -2
- package/lib/components/TooltipTrigger/useExample.js +1 -2
- package/lib/components/UserProfileImage/UserProfileImage.docs-page.js +3 -4
- package/lib/components/UserProfileImage/UserProfileImage.js +1 -2
- package/lib/components/WebTerminal/WebTerminal.docs-page.js +3 -4
- package/lib/components/WebTerminal/WebTerminal.js +3 -4
- package/lib/components/WebTerminal/WebTerminalContentWrapper.js +1 -2
- package/lib/components/WebTerminal/hooks/index.js +6 -9
- package/lib/components/WebTerminal/preview-components/Navigation.js +1 -2
- package/lib/components/WebTerminal/preview-components/documentationLinks.js +2 -3
- package/lib/components/_Canary/Canary.js +1 -2
- package/lib/components/index.js +8 -1
- package/lib/global/decorators/sidePanelDecorator.js +2 -3
- package/lib/global/js/hooks/useActiveElement.js +2 -3
- package/lib/global/js/hooks/useClickOutside.js +2 -3
- package/lib/global/js/hooks/useCreateComponentFocus.js +9 -8
- package/lib/global/js/hooks/useCreateComponentStepChange.js +44 -40
- package/lib/global/js/hooks/usePortalTarget.js +2 -3
- package/lib/global/js/hooks/usePreviousValue.js +2 -3
- package/lib/global/js/hooks/useResetCreateComponent.js +2 -3
- package/lib/global/js/hooks/useResizeObserver.js +2 -3
- package/lib/global/js/hooks/useRetrieveFormTitles.js +2 -3
- package/lib/global/js/hooks/useRetrieveStepData.js +2 -3
- package/lib/global/js/hooks/useValidCreateStepCount.js +2 -3
- package/lib/global/js/hooks/useWindowResize.js +2 -3
- package/lib/global/js/package-settings.js +6 -5
- package/lib/global/js/utils/ClickListener.js +3 -4
- package/lib/global/js/utils/DisplayBox.js +1 -2
- package/lib/global/js/utils/StoryDocsPage.js +2 -4
- package/lib/global/js/utils/Wrap.js +1 -2
- package/lib/global/js/utils/deepCloneObject.js +2 -3
- package/lib/global/js/utils/devtools.js +1 -2
- package/lib/global/js/utils/getBezierValues.js +2 -3
- package/lib/global/js/utils/getFocusableElements.js +2 -3
- package/lib/global/js/utils/getNodeTextContent.js +6 -3
- package/lib/global/js/utils/getNumberOfHiddenSteps.js +2 -3
- package/lib/global/js/utils/getScrollbarWidth.js +2 -3
- package/lib/global/js/utils/keyboardNavigation.js +4 -8
- package/lib/global/js/utils/lastIndexInArray.js +2 -3
- package/lib/global/js/utils/motionConstants.js +4 -5
- package/lib/global/js/utils/pconsole.js +8 -15
- package/lib/global/js/utils/props-helper.js +7 -14
- package/lib/global/js/utils/rangeWithCallback.js +2 -3
- package/lib/global/js/utils/scrollableAncestor.js +2 -3
- package/lib/global/js/utils/story-helper.js +15 -26
- package/lib/global/js/utils/test-helper.js +39 -42
- package/lib/global/js/utils/unwrap-if-fragment.js +1 -2
- package/lib/global/js/utils/uuidv4.js +1 -2
- package/lib/global/js/utils/wait.js +1 -2
- package/lib/global/js/utils/wrapFocus.js +1 -2
- package/lib/settings.js +2 -4
- package/package.json +6 -6
- package/scss/components/AboutModal/_about-modal.scss +1 -2
- package/scss/components/Checklist/_checklist.scss +217 -0
- package/scss/components/Checklist/_index.scss +8 -0
- package/scss/components/Checklist/_storybook-styles.scss +13 -0
- package/scss/components/CreateFullPage/_storybook-styles.scss +1 -1
- package/scss/components/Datagrid/_datagrid.scss +1 -0
- package/scss/components/Datagrid/styles/_datagrid.scss +1 -2
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +8 -11
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +5 -0
- package/scss/components/_index.scss +2 -1
- package/es/components/Datagrid/utils/getColTitle.js +0 -25
- package/lib/components/Datagrid/utils/getColTitle.js +0 -32
@@ -15,9 +15,9 @@ import { Checkbox } from '@carbon/react';
|
|
15
15
|
import { isColumnVisible } from './common';
|
16
16
|
import DraggableElement from '../../DraggableElement';
|
17
17
|
import { pkg } from '../../../../../settings';
|
18
|
-
import getColTitle from '../../../utils/getColTitle';
|
19
18
|
import { DndContext, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from '@dnd-kit/core';
|
20
19
|
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
20
|
+
import { getNodeTextContent } from '../../../../../global/js/utils/getNodeTextContent';
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
22
22
|
var matchedColsById = function matchedColsById(col1, col2) {
|
23
23
|
return col1 && col2 && col1.id === col2.id;
|
@@ -33,12 +33,13 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
33
33
|
var visibleCols = columns
|
34
34
|
// hide the columns without Header, e.g the sticky actions, spacer
|
35
35
|
.filter(function (colDef) {
|
36
|
-
return
|
36
|
+
return getNodeTextContent(colDef.Header).trim().length !== 0;
|
37
37
|
}).filter(Boolean).filter(function (colDef) {
|
38
38
|
return !colDef.isAction;
|
39
39
|
}).filter(function (colDef) {
|
40
|
-
|
41
|
-
|
40
|
+
return colDef.id !== 'spacer';
|
41
|
+
}).filter(function (colDef) {
|
42
|
+
return filterString.length === 0 || getNodeTextContent(colDef.Header).toLowerCase().includes(filterString);
|
42
43
|
});
|
43
44
|
var getUpdatedDragCols = function getUpdatedDragCols() {
|
44
45
|
var tempCols = _toConsumableArray(visibleCols);
|
@@ -71,7 +72,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
71
72
|
var toVisibleIndex = columns.findIndex(function (col) {
|
72
73
|
return matchedColsById(col, over);
|
73
74
|
});
|
74
|
-
var colTitle =
|
75
|
+
var colTitle = getNodeTextContent(updatedDragCols[fromVisibleIndex].Header);
|
75
76
|
setAriaRegionText("".concat(colTitle, " dropped. New position ").concat(toVisibleIndex + 1, " of ").concat(updatedDragCols.length, "."));
|
76
77
|
var fromIndex = columns.findIndex(function (col) {
|
77
78
|
return matchedColsById(col, active);
|
@@ -86,7 +87,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
86
87
|
var fromIndex = updatedDragCols.findIndex(function (col) {
|
87
88
|
return matchedColsById(col, active);
|
88
89
|
});
|
89
|
-
var colTitle =
|
90
|
+
var colTitle = getNodeTextContent(updatedDragCols[fromIndex].Header);
|
90
91
|
setAriaRegionText("".concat(colTitle, " grabbed. Current position ").concat(fromIndex + 1, " of ").concat(updatedDragCols.length, "."));
|
91
92
|
};
|
92
93
|
var handleDragUpdate = function handleDragUpdate(event) {
|
@@ -98,7 +99,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
98
99
|
var toIndex = updatedDragCols.findIndex(function (col) {
|
99
100
|
return matchedColsById(col, over);
|
100
101
|
});
|
101
|
-
var colTitle =
|
102
|
+
var colTitle = getNodeTextContent(updatedDragCols[fromIndex].Header);
|
102
103
|
setAriaRegionText("".concat(colTitle, " grabbed. Original position ").concat(fromIndex + 1, ", new position ").concat(toIndex + 1, " of ").concat(updatedDragCols.length, "."));
|
103
104
|
};
|
104
105
|
var pointerSensor = useSensor(PointerSensor, {
|
@@ -161,7 +162,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
161
162
|
items: updatedDragCols,
|
162
163
|
strategy: verticalListSortingStrategy
|
163
164
|
}, visibleCols.map(function (colDef) {
|
164
|
-
var colHeaderTitle =
|
165
|
+
var colHeaderTitle = getNodeTextContent(colDef.Header);
|
165
166
|
var searchString = new RegExp('(' + filterString + ')');
|
166
167
|
var res = filterString.length ? colHeaderTitle.toLowerCase().split(searchString) : null;
|
167
168
|
var firstWord = res !== null ? res[0] === '' ? res[1].charAt(0).toUpperCase() + res[1].substring(1) : res[0].charAt(0).toUpperCase() + res[0].substring(1) : null;
|
package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
|
3
|
-
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
2
|
+
/**
|
3
|
+
* Copyright IBM Corp. 2022, 2023
|
4
|
+
*
|
5
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
8
7
|
*/
|
9
8
|
|
10
9
|
import React from 'react';
|
@@ -22,12 +21,9 @@ export var InlineEditButton = function InlineEditButton(_ref) {
|
|
22
21
|
nonEditCell = _ref.nonEditCell,
|
23
22
|
isActiveCell = _ref.isActiveCell,
|
24
23
|
columnConfig = _ref.columnConfig,
|
25
|
-
totalInlineEditColumns = _ref.totalInlineEditColumns,
|
26
|
-
totalColumns = _ref.totalColumns,
|
27
24
|
type = _ref.type;
|
28
|
-
var inlineEditColsLessThanHalfOfTotal = totalInlineEditColumns < totalColumns / 2;
|
29
25
|
return /*#__PURE__*/React.createElement("div", {
|
30
|
-
className: cx("".concat(blockClass, "__inline-edit-button"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--disabled"), disabled || nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--with-label-icon"), LabelIcon), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--non-edit"), nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--active"), isActiveCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--
|
26
|
+
className: cx("".concat(blockClass, "__inline-edit-button"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--disabled"), disabled || nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--with-label-icon"), LabelIcon), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--non-edit"), nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--active"), isActiveCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--").concat(type), type === 'date' || type === 'selection'), _cx)),
|
31
27
|
tabIndex: isActiveCell ? 0 : -1,
|
32
28
|
"data-disabled": disabled || nonEditCell,
|
33
29
|
"aria-disabled": disabled || nonEditCell,
|
@@ -52,8 +48,6 @@ InlineEditButton.propTypes = {
|
|
52
48
|
nonEditCell: PropTypes.bool,
|
53
49
|
placeholder: PropTypes.string,
|
54
50
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
55
|
-
totalColumns: PropTypes.number,
|
56
|
-
totalInlineEditColumns: PropTypes.number,
|
57
51
|
type: PropTypes.oneOf(['text', 'number', 'selection', 'date']),
|
58
52
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
59
53
|
};
|
@@ -33,14 +33,12 @@ export var InlineEditCell = function InlineEditCell(_ref) {
|
|
33
33
|
value = _ref.value,
|
34
34
|
_ref$nonEditCell = _ref.nonEditCell,
|
35
35
|
nonEditCell = _ref$nonEditCell === void 0 ? false : _ref$nonEditCell,
|
36
|
-
totalInlineEditColumns = _ref.totalInlineEditColumns,
|
37
36
|
type = _ref.type;
|
38
37
|
var columnId = cell.column.id;
|
39
38
|
var columnIndex = instance.columns.findIndex(function (col) {
|
40
39
|
return col.id === columnId;
|
41
40
|
});
|
42
41
|
var cellId = "column-".concat(columnIndex, "-row-").concat(cell.row.index);
|
43
|
-
var totalColumns = instance.columns.length;
|
44
42
|
var _useContext = useContext(InlineEditContext),
|
45
43
|
state = _useContext.state,
|
46
44
|
dispatch = _useContext.dispatch;
|
@@ -450,8 +448,6 @@ export var InlineEditCell = function InlineEditCell(_ref) {
|
|
450
448
|
tabIndex: tabIndex,
|
451
449
|
nonEditCell: nonEditCell,
|
452
450
|
columnConfig: cell.column,
|
453
|
-
totalInlineEditColumns: totalInlineEditColumns,
|
454
|
-
totalColumns: totalColumns,
|
455
451
|
type: type
|
456
452
|
}), !nonEditCell && inEditMode && cellId === activeCellId && /*#__PURE__*/React.createElement(React.Fragment, null, type === 'text' && renderTextInput(), type === 'number' && renderNumberInput(), type === 'selection' && renderSelectCell(), type === 'date' && renderDateCell()))
|
457
453
|
);
|
@@ -469,7 +465,6 @@ InlineEditCell.propTypes = {
|
|
469
465
|
nonEditCell: PropTypes.bool,
|
470
466
|
placeholder: PropTypes.string,
|
471
467
|
tabIndex: PropTypes.number,
|
472
|
-
totalInlineEditColumns: PropTypes.number,
|
473
468
|
type: PropTypes.oneOf(['text', 'number', 'selection', 'date']),
|
474
469
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.object])
|
475
470
|
};
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
5
|
var _excluded = ["align", "legendText"];
|
@@ -9,19 +10,21 @@ var _excluded = ["align", "legendText"];
|
|
9
10
|
* LICENSE file in the root directory of this source tree.
|
10
11
|
*/
|
11
12
|
|
12
|
-
import
|
13
|
+
import React, { useEffect, useRef } from 'react';
|
13
14
|
import PropTypes from 'prop-types';
|
14
15
|
import { Settings } from '@carbon/react/icons';
|
15
16
|
import { IconButton, Layer, Popover, PopoverContent } from '@carbon/react';
|
17
|
+
import cx from 'classnames';
|
16
18
|
import RowSizeRadioGroup from './RowSizeRadioGroup';
|
17
|
-
import { pkg } from '../../../../../settings';
|
19
|
+
import { pkg, carbon } from '../../../../../settings';
|
18
20
|
var blockClass = "".concat(pkg.prefix, "--datagrid__row-size");
|
19
21
|
var RowSizeDropdown = function RowSizeDropdown(_ref) {
|
20
22
|
var _ref$align = _ref.align,
|
21
23
|
align = _ref$align === void 0 ? 'bottom-right' : _ref$align,
|
22
24
|
_ref$legendText = _ref.legendText,
|
23
|
-
legendText = _ref$legendText === void 0 ? 'Row
|
25
|
+
legendText = _ref$legendText === void 0 ? 'Row settings' : _ref$legendText,
|
24
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
27
|
+
var radioGroupRef = useRef();
|
25
28
|
var _React$useState = React.useState(false),
|
26
29
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
27
30
|
isOpen = _React$useState2[0],
|
@@ -39,8 +42,17 @@ var RowSizeDropdown = function RowSizeDropdown(_ref) {
|
|
39
42
|
onCloseHandler();
|
40
43
|
}
|
41
44
|
};
|
45
|
+
useEffect(function () {
|
46
|
+
if (isOpen) {
|
47
|
+
var radioGroupParentElement = radioGroupRef === null || radioGroupRef === void 0 ? void 0 : radioGroupRef.current;
|
48
|
+
var checkedRadioChild = radioGroupParentElement === null || radioGroupParentElement === void 0 ? void 0 : radioGroupParentElement.querySelector(".".concat(carbon.prefix, "--radio-button:checked"));
|
49
|
+
checkedRadioChild === null || checkedRadioChild === void 0 || checkedRadioChild.focus();
|
50
|
+
}
|
51
|
+
}, [isOpen]);
|
42
52
|
var onClickHandler = function onClickHandler() {
|
43
|
-
setIsOpen(
|
53
|
+
setIsOpen(function (prev) {
|
54
|
+
return !prev;
|
55
|
+
});
|
44
56
|
};
|
45
57
|
return /*#__PURE__*/React.createElement(Popover, {
|
46
58
|
tabIndex: -1,
|
@@ -56,10 +68,12 @@ var RowSizeDropdown = function RowSizeDropdown(_ref) {
|
|
56
68
|
kind: "ghost",
|
57
69
|
onClick: onClickHandler,
|
58
70
|
label: legendText,
|
59
|
-
className: "".concat(blockClass, "-button")
|
71
|
+
className: cx("".concat(blockClass, "-button"), _defineProperty({}, "".concat(blockClass, "__row-settings-trigger--open"), isOpen))
|
60
72
|
}, /*#__PURE__*/React.createElement(Settings, {
|
61
73
|
size: 16
|
62
|
-
})), /*#__PURE__*/React.createElement(PopoverContent, null, /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(RowSizeRadioGroup, _extends({
|
74
|
+
})), /*#__PURE__*/React.createElement(PopoverContent, null, /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(RowSizeRadioGroup, _extends({
|
75
|
+
ref: radioGroupRef
|
76
|
+
}, props, {
|
63
77
|
legendText: legendText
|
64
78
|
})))));
|
65
79
|
};
|
@@ -5,13 +5,13 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import React from 'react';
|
8
|
+
import React, { forwardRef } from 'react';
|
9
9
|
import PropTypes from 'prop-types';
|
10
10
|
import { RadioButtonGroup, RadioButton } from '@carbon/react';
|
11
11
|
import isArray from 'lodash/isArray';
|
12
12
|
import { pkg } from '../../../../../settings';
|
13
13
|
var blockClass = "".concat(pkg.prefix, "--datagrid__row-size");
|
14
|
-
var RowSizeRadioGroup = function
|
14
|
+
var RowSizeRadioGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
15
15
|
var rowSizes = _ref.rowSizes,
|
16
16
|
selectedOption = _ref.selectedOption,
|
17
17
|
datagridName = _ref.datagridName,
|
@@ -27,7 +27,8 @@ var RowSizeRadioGroup = function RowSizeRadioGroup(_ref) {
|
|
27
27
|
} : _ref$rowSizeLabels;
|
28
28
|
return /*#__PURE__*/React.createElement("div", {
|
29
29
|
className: "".concat(blockClass, "-dropdown"),
|
30
|
-
role: "presentation"
|
30
|
+
role: "presentation",
|
31
|
+
ref: ref
|
31
32
|
}, /*#__PURE__*/React.createElement(RadioButtonGroup, {
|
32
33
|
legendText: legendText,
|
33
34
|
name: "row-height-group",
|
@@ -49,7 +50,7 @@ var RowSizeRadioGroup = function RowSizeRadioGroup(_ref) {
|
|
49
50
|
id: "".concat(datagridName || 'datagrid', "--row-density--").concat(option.value)
|
50
51
|
});
|
51
52
|
})));
|
52
|
-
};
|
53
|
+
});
|
53
54
|
var getBackwardCompatibleRowSize = function getBackwardCompatibleRowSize(rowSize) {
|
54
55
|
// TODO: deprecate this function in next major release (v8) on carbon-components-react
|
55
56
|
var rowSizeMap = {
|
@@ -116,7 +116,7 @@ export var DocsPage = function DocsPage() {
|
|
116
116
|
title: 'Sortable columns',
|
117
117
|
description: "To add sortable columns to your Datagrid, simply add the `useSortableColumns` hook. This will allow each column header to be clickable and sort each column in either ascending or descending order.\n- Include `useSortableColumns` hook\n ",
|
118
118
|
source: {
|
119
|
-
code: "\nconst [data] = useState(makeData(10));\nconst columns = React.useMemo(() => getColumns(data), []);\nconst datagridState = useDatagrid(\n {\n columns,\n data,\n },\n useSortableColumns\n);\n\nreturn <Datagrid datagridState={datagridState} />;\n "
|
119
|
+
code: "\nconst [data] = useState(makeData(10));\nconst columns = React.useMemo(() => getColumns(data), []);\nconst datagridState = useDatagrid(\n {\n columns,\n data,\n ascendingSortableLabelText: 'none',\n descendingSortableLabelText: 'ascending',\n defaultSortableLabelText: 'descending',\n },\n useSortableColumns\n);\n\nreturn <Datagrid datagridState={datagridState} />;\n "
|
120
120
|
}
|
121
121
|
}, {
|
122
122
|
title: 'Sticky column',
|
@@ -13,7 +13,7 @@ var useDisableSelectRows = function useDisableSelectRows(hooks) {
|
|
13
13
|
var row = _ref.row,
|
14
14
|
instance = _ref.instance;
|
15
15
|
return [props, {
|
16
|
-
|
16
|
+
disabled: instance.shouldDisableSelectRow && instance.shouldDisableSelectRow(row)
|
17
17
|
}];
|
18
18
|
};
|
19
19
|
hooks.getRowProps.push(getRowProps);
|
@@ -21,14 +21,11 @@ var useInlineEdit = function useInlineEdit(hooks, usingEditableCell) {
|
|
21
21
|
}
|
22
22
|
}, [usingEditableCell]);
|
23
23
|
var addInlineEdit = function addInlineEdit(props, _ref) {
|
24
|
-
var _cell$column
|
24
|
+
var _cell$column;
|
25
25
|
var cell = _ref.cell,
|
26
26
|
instance = _ref.instance;
|
27
27
|
var columnInlineEditConfig = cell.column.inlineEdit;
|
28
28
|
var inlineEditType = (_cell$column = cell.column) === null || _cell$column === void 0 || (_cell$column = _cell$column.inlineEdit) === null || _cell$column === void 0 ? void 0 : _cell$column.type;
|
29
|
-
var totalInlineEditColumns = (_instance$columns$fil = instance.columns.filter(function (item) {
|
30
|
-
return item.inlineEdit;
|
31
|
-
})) === null || _instance$columns$fil === void 0 ? void 0 : _instance$columns$fil.length;
|
32
29
|
var renderInlineEditComponent = function renderInlineEditComponent(type) {
|
33
30
|
return /*#__PURE__*/React.createElement(InlineEditCell, {
|
34
31
|
config: columnInlineEditConfig,
|
@@ -36,7 +33,6 @@ var useInlineEdit = function useInlineEdit(hooks, usingEditableCell) {
|
|
36
33
|
value: cell.value,
|
37
34
|
cell: cell,
|
38
35
|
instance: instance,
|
39
|
-
totalInlineEditColumns: totalInlineEditColumns,
|
40
36
|
type: type
|
41
37
|
});
|
42
38
|
};
|
@@ -56,7 +52,6 @@ var useInlineEdit = function useInlineEdit(hooks, usingEditableCell) {
|
|
56
52
|
instance: instance,
|
57
53
|
disabled: true,
|
58
54
|
nonEditCell: true,
|
59
|
-
totalInlineEditColumns: totalInlineEditColumns,
|
60
55
|
type: "text"
|
61
56
|
}))
|
62
57
|
}];
|
@@ -87,7 +87,7 @@ var SelectRow = function SelectRow(datagridState) {
|
|
87
87
|
return window.removeEventListener('resize', updateSize);
|
88
88
|
};
|
89
89
|
}, []);
|
90
|
-
var selectDisabled = isFetching || row.getRowProps().
|
90
|
+
var selectDisabled = isFetching || row.getRowProps().disabled;
|
91
91
|
var _row$getToggleRowSele = row.getToggleRowSelectedProps(),
|
92
92
|
onChange = _row$getToggleRowSele.onChange,
|
93
93
|
selectProps = _objectWithoutProperties(_row$getToggleRowSele, _excluded);
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
-
import _extends from "@babel/runtime/helpers/extends";
|
4
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
6
5
|
/**
|
@@ -15,6 +14,7 @@ import cx from 'classnames';
|
|
15
14
|
import { pkg, carbon } from '../../settings';
|
16
15
|
import { Button } from '@carbon/react';
|
17
16
|
import { ArrowUp, ArrowDown, ArrowsVertical } from '@carbon/react/icons';
|
17
|
+
import { SelectAll } from './Datagrid/DatagridSelectAll';
|
18
18
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
19
19
|
var ordering = {
|
20
20
|
ASC: 'ASC',
|
@@ -32,13 +32,13 @@ var getAriaSortValue = function getAriaSortValue(col, _ref) {
|
|
32
32
|
isSorted = _ref2.isSorted,
|
33
33
|
isSortedDesc = _ref2.isSortedDesc;
|
34
34
|
if (!isSorted) {
|
35
|
-
return defaultSortableLabelText
|
35
|
+
return defaultSortableLabelText;
|
36
36
|
}
|
37
37
|
if (isSorted && !isSortedDesc) {
|
38
|
-
return ascendingSortableLabelText
|
38
|
+
return ascendingSortableLabelText;
|
39
39
|
}
|
40
40
|
if (isSorted && isSortedDesc) {
|
41
|
-
return descendingSortableLabelText
|
41
|
+
return descendingSortableLabelText;
|
42
42
|
}
|
43
43
|
};
|
44
44
|
var getAriaPressedValue = function getAriaPressedValue(col) {
|
@@ -73,37 +73,26 @@ var useSortableColumns = function useSortableColumns(hooks) {
|
|
73
73
|
};
|
74
74
|
var sortableColumns = visibleColumns.map(function (column) {
|
75
75
|
var icon = function icon(col, props) {
|
76
|
+
var iconProps = _objectSpread(_objectSpread({
|
77
|
+
size: 16
|
78
|
+
}, props), {}, {
|
79
|
+
className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
|
80
|
+
});
|
76
81
|
if (col !== null && col !== void 0 && col.isSorted) {
|
77
82
|
switch (col.isSortedDesc) {
|
78
83
|
case false:
|
79
|
-
return /*#__PURE__*/React.createElement(ArrowUp,
|
80
|
-
size: 16
|
81
|
-
}, props, {
|
82
|
-
className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
|
83
|
-
}));
|
84
|
+
return /*#__PURE__*/React.createElement(ArrowUp, iconProps);
|
84
85
|
case true:
|
85
|
-
return /*#__PURE__*/React.createElement(ArrowDown,
|
86
|
-
size: 16
|
87
|
-
}, props, {
|
88
|
-
className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
|
89
|
-
}));
|
86
|
+
return /*#__PURE__*/React.createElement(ArrowDown, iconProps);
|
90
87
|
default:
|
91
|
-
return /*#__PURE__*/React.createElement(ArrowsVertical,
|
92
|
-
size: 16
|
93
|
-
}, props, {
|
94
|
-
className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
|
95
|
-
}));
|
88
|
+
return /*#__PURE__*/React.createElement(ArrowsVertical, iconProps);
|
96
89
|
}
|
97
90
|
}
|
98
|
-
return /*#__PURE__*/React.createElement(ArrowsVertical,
|
99
|
-
size: 16
|
100
|
-
}, props, {
|
101
|
-
className: "".concat(blockClass, "__sortable-icon ").concat(carbon.prefix, "--btn__icon")
|
102
|
-
}));
|
91
|
+
return /*#__PURE__*/React.createElement(ArrowsVertical, iconProps);
|
103
92
|
};
|
104
93
|
var Header = function Header(headerProp) {
|
105
94
|
var _cx;
|
106
|
-
return column.disableSortBy === true ? column.Header : /*#__PURE__*/React.createElement(Button, {
|
95
|
+
return column.disableSortBy === true || column.id === 'datagridSelection' ? column.disableSortBy ? column.Header : /*#__PURE__*/React.createElement(SelectAll, instance) : /*#__PURE__*/React.createElement(Button, {
|
107
96
|
"aria-sort": getAriaSortValue(headerProp === null || headerProp === void 0 ? void 0 : headerProp.column, {
|
108
97
|
ascendingSortableLabelText: ascendingSortableLabelText,
|
109
98
|
descendingSortableLabelText: descendingSortableLabelText,
|
@@ -31,7 +31,6 @@ var defaults = {
|
|
31
31
|
accept: Object.freeze([])
|
32
32
|
};
|
33
33
|
export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
34
|
-
var _ref2;
|
35
34
|
var _ref$accept = _ref.accept,
|
36
35
|
accept = _ref$accept === void 0 ? defaults.accept : _ref$accept,
|
37
36
|
className = _ref.className,
|
@@ -112,8 +111,8 @@ export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
112
111
|
var finalFiles = _toConsumableArray(updatedFiles);
|
113
112
|
setFiles(finalFiles);
|
114
113
|
};
|
115
|
-
var fetchFile = function
|
116
|
-
|
114
|
+
var fetchFile = /*#__PURE__*/function () {
|
115
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(evt) {
|
117
116
|
var fileName, pendingFile, response, blob, fetchedFile, failedFile;
|
118
117
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
119
118
|
while (1) switch (_context.prev = _context.next) {
|
@@ -161,8 +160,11 @@ export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
161
160
|
return _context.stop();
|
162
161
|
}
|
163
162
|
}, _callee, null, [[4, 19]]);
|
164
|
-
}))
|
165
|
-
|
163
|
+
}));
|
164
|
+
return function fetchFile(_x) {
|
165
|
+
return _ref2.apply(this, arguments);
|
166
|
+
};
|
167
|
+
}();
|
166
168
|
var onAddFile = function onAddFile(evt, _ref3) {
|
167
169
|
var addedFiles = _ref3.addedFiles;
|
168
170
|
evt.stopPropagation();
|
@@ -693,7 +693,7 @@ PageHeader.propTypes = _objectSpread({
|
|
693
693
|
* Sitting just below the title is this optional subtitle that provides additional context to
|
694
694
|
* identify the current page.
|
695
695
|
*/
|
696
|
-
subtitle: PropTypes.
|
696
|
+
subtitle: PropTypes.node,
|
697
697
|
/**
|
698
698
|
* An array of tags to be shown as the final content in the PageHeader.
|
699
699
|
*
|
package/es/components/index.js
CHANGED
@@ -41,4 +41,5 @@ export { Datagrid, useDatagrid, useInfiniteScroll, useNestedRows, useSelectRows,
|
|
41
41
|
export { EditTearsheet, EditTearsheetForm } from './EditTearsheet';
|
42
42
|
export { EditTearsheetNarrow } from './EditTearsheetNarrow';
|
43
43
|
export { EditFullPage } from './EditFullPage';
|
44
|
-
export { EditUpdateCards } from './EditUpdateCards';
|
44
|
+
export { EditUpdateCards } from './EditUpdateCards';
|
45
|
+
export { Checklist } from './Checklist';
|
@@ -23,10 +23,9 @@ export var useCreateComponentFocus = function useCreateComponentFocus(_ref) {
|
|
23
23
|
}
|
24
24
|
}, [onMount]);
|
25
25
|
useEffect(function () {
|
26
|
-
var _ref2;
|
27
26
|
// because of how handleStackChange.claimFocus in TearsheetShell works a timeout is required to focus on specific elements
|
28
|
-
var awaitFocus = function
|
29
|
-
|
27
|
+
var awaitFocus = /*#__PURE__*/function () {
|
28
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(elm) {
|
30
29
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
31
30
|
while (1) switch (_context.prev = _context.next) {
|
32
31
|
case 0:
|
@@ -39,8 +38,11 @@ export var useCreateComponentFocus = function useCreateComponentFocus(_ref) {
|
|
39
38
|
return _context.stop();
|
40
39
|
}
|
41
40
|
}, _callee);
|
42
|
-
}))
|
43
|
-
|
41
|
+
}));
|
42
|
+
return function awaitFocus(_x) {
|
43
|
+
return _ref2.apply(this, arguments);
|
44
|
+
};
|
45
|
+
}();
|
44
46
|
if ((previousState === null || previousState === void 0 ? void 0 : previousState.currentStep) !== currentStep && currentStep > 0) {
|
45
47
|
if (firstFocusElement) {
|
46
48
|
var elm = document.querySelector(firstFocusElement);
|
@@ -64,7 +64,6 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
|
|
64
64
|
|
65
65
|
// useEffect to handle multi step logic
|
66
66
|
useEffect(function () {
|
67
|
-
var _ref2, _ref3, _ref4, _ref5;
|
68
67
|
var onUnmount = function onUnmount() {
|
69
68
|
if (componentName !== 'CreateFullPage') {
|
70
69
|
setCurrentStep(0);
|
@@ -72,8 +71,8 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
|
|
72
71
|
setIsSubmitting(false);
|
73
72
|
onClose();
|
74
73
|
};
|
75
|
-
var handleOnRequestSubmit = function
|
76
|
-
|
74
|
+
var handleOnRequestSubmit = /*#__PURE__*/function () {
|
75
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
77
76
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
78
77
|
while (1) switch (_context.prev = _context.next) {
|
79
78
|
case 0:
|
@@ -94,49 +93,49 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
|
|
94
93
|
return _context.stop();
|
95
94
|
}
|
96
95
|
}, _callee, null, [[0, 6]]);
|
97
|
-
}))
|
98
|
-
|
99
|
-
|
100
|
-
|
96
|
+
}));
|
97
|
+
return function handleOnRequestSubmit() {
|
98
|
+
return _ref2.apply(this, arguments);
|
99
|
+
};
|
100
|
+
}();
|
101
|
+
var handlePrevious = /*#__PURE__*/function () {
|
102
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
101
103
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
102
104
|
while (1) switch (_context2.prev = _context2.next) {
|
103
105
|
case 0:
|
104
|
-
|
105
|
-
_context2.next = 2;
|
106
|
-
break;
|
107
|
-
}
|
108
|
-
return _context2.abrupt("return");
|
109
|
-
case 2:
|
110
|
-
setLoadingPrevious(true);
|
106
|
+
setLoadingPrevious === null || setLoadingPrevious === void 0 || setLoadingPrevious(true);
|
111
107
|
if (!(typeof onPrevious === 'function')) {
|
112
|
-
_context2.next =
|
108
|
+
_context2.next = 13;
|
113
109
|
break;
|
114
110
|
}
|
115
|
-
_context2.prev =
|
116
|
-
_context2.next =
|
111
|
+
_context2.prev = 2;
|
112
|
+
_context2.next = 5;
|
117
113
|
return onPrevious();
|
118
|
-
case
|
114
|
+
case 5:
|
119
115
|
moveToPreviousStep();
|
120
|
-
_context2.next =
|
116
|
+
_context2.next = 11;
|
121
117
|
break;
|
122
|
-
case
|
123
|
-
_context2.prev =
|
124
|
-
_context2.t0 = _context2["catch"](
|
118
|
+
case 8:
|
119
|
+
_context2.prev = 8;
|
120
|
+
_context2.t0 = _context2["catch"](2);
|
125
121
|
console.warn("".concat(componentName, " onBack error: ").concat(_context2.t0));
|
126
|
-
case
|
127
|
-
_context2.next =
|
122
|
+
case 11:
|
123
|
+
_context2.next = 14;
|
128
124
|
break;
|
129
|
-
case
|
125
|
+
case 13:
|
130
126
|
moveToPreviousStep();
|
131
|
-
case
|
127
|
+
case 14:
|
132
128
|
case "end":
|
133
129
|
return _context2.stop();
|
134
130
|
}
|
135
|
-
}, _callee2, null, [[
|
136
|
-
}))
|
137
|
-
|
138
|
-
|
139
|
-
|
131
|
+
}, _callee2, null, [[2, 8]]);
|
132
|
+
}));
|
133
|
+
return function handlePrevious() {
|
134
|
+
return _ref3.apply(this, arguments);
|
135
|
+
};
|
136
|
+
}();
|
137
|
+
var handleNext = /*#__PURE__*/function () {
|
138
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
140
139
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
141
140
|
while (1) switch (_context3.prev = _context3.next) {
|
142
141
|
case 0:
|
@@ -167,10 +166,13 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
|
|
167
166
|
return _context3.stop();
|
168
167
|
}
|
169
168
|
}, _callee3, null, [[2, 8]]);
|
170
|
-
}))
|
171
|
-
|
172
|
-
|
173
|
-
|
169
|
+
}));
|
170
|
+
return function handleNext() {
|
171
|
+
return _ref4.apply(this, arguments);
|
172
|
+
};
|
173
|
+
}();
|
174
|
+
var handleSubmit = /*#__PURE__*/function () {
|
175
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
174
176
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
175
177
|
while (1) switch (_context4.prev = _context4.next) {
|
176
178
|
case 0:
|
@@ -205,8 +207,11 @@ export var useCreateComponentStepChange = function useCreateComponentStepChange(
|
|
205
207
|
return _context4.stop();
|
206
208
|
}
|
207
209
|
}, _callee4, null, [[2, 9]]);
|
208
|
-
}))
|
209
|
-
|
210
|
+
}));
|
211
|
+
return function handleSubmit() {
|
212
|
+
return _ref5.apply(this, arguments);
|
213
|
+
};
|
214
|
+
}();
|
210
215
|
if ((stepData === null || stepData === void 0 ? void 0 : stepData.length) > 0) {
|
211
216
|
var buttons = [];
|
212
217
|
if ((stepData === null || stepData === void 0 ? void 0 : stepData.length) > 1) {
|
@@ -68,10 +68,12 @@ var defaults = {
|
|
68
68
|
EditTearsheetForm: false,
|
69
69
|
EditTearsheetNarrow: false,
|
70
70
|
EditFullPage: false,
|
71
|
-
EditUpdateCards: false
|
71
|
+
EditUpdateCards: false,
|
72
72
|
/* new component flags here - comment used by generate CLI */
|
73
|
-
},
|
74
73
|
|
74
|
+
// Novice to pro components not yet reviewed and released:
|
75
|
+
Checklist: false
|
76
|
+
},
|
75
77
|
// feature level flags
|
76
78
|
feature: {
|
77
79
|
'default-portal-target-body': true,
|
@@ -40,6 +40,10 @@ export var getNodeTextContent = function getNodeTextContent(node) {
|
|
40
40
|
// Ignore any other JavaScript 'object' types.
|
41
41
|
return '';
|
42
42
|
}
|
43
|
+
case 'function':
|
44
|
+
{
|
45
|
+
return getNodeTextContent(node());
|
46
|
+
}
|
43
47
|
default:
|
44
48
|
// Ignore all other JavaScript types.
|
45
49
|
return '';
|
@@ -205,6 +205,7 @@ export var storyDocsGuidelines = function storyDocsGuidelines(csfFile) {
|
|
205
205
|
* @returns "dark" or "light"
|
206
206
|
*/
|
207
207
|
export var getSelectedCarbonTheme = function getSelectedCarbonTheme() {
|
208
|
-
var
|
208
|
+
var _document$querySelect;
|
209
|
+
var themeId = (_document$querySelect = document.querySelector('[storybook-carbon-theme]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute('storybook-carbon-theme');
|
209
210
|
return themeId === 'g90' || themeId === 'g100' ? 'dark' : 'light';
|
210
211
|
};
|