@carbon/ibm-products 2.50.0 → 2.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/css/index-full-carbon.css +56 -29
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +3 -10
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +3 -10
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +34 -28
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/ActionBar/ActionBarOverflowItems.js +5 -0
- package/es/components/AddSelect/AddSelectBody.js +1 -1
- package/es/components/BigNumbers/BigNumbers.js +1 -1
- package/es/components/Coachmark/utils/enums.js +1 -0
- package/es/components/ConditionBuilder/ConditionBuilder.js +26 -20
- package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts +6 -2
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +11 -8
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +44 -24
- package/es/components/CreateFullPage/CreateFullPage.d.ts +4 -2
- package/es/components/CreateFullPage/CreateFullPage.js +10 -3
- package/es/components/CreateFullPage/CreateFullPageStep.d.ts +3 -1
- package/es/components/CreateFullPage/CreateFullPageStep.js +5 -2
- package/es/components/Datagrid/Datagrid/Datagrid.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/Datagrid.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +12 -1
- package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +3 -8
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +15 -13
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +17 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +13 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -12
- package/es/components/Datagrid/types/index.d.ts +4 -0
- package/es/components/Datagrid/useSelectRows.js +40 -19
- package/es/components/EditInPlace/EditInPlace.js +0 -3
- package/es/components/ExportModal/ExportModal.js +18 -5
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +5 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +14 -1
- package/es/components/OptionsTile/OptionsTile.d.ts +1 -1
- package/es/components/OptionsTile/OptionsTile.js +0 -1
- package/es/components/ProductiveCard/ProductiveCard.d.ts +4 -0
- package/es/components/ProductiveCard/ProductiveCard.js +4 -0
- package/es/components/ScrollGradient/ScrollGradient.js +1 -1
- package/es/components/SimpleHeader/SimpleHeader.d.ts +3 -1
- package/es/components/SimpleHeader/SimpleHeader.js +9 -2
- package/es/components/StringFormatter/StringFormatter.js +1 -1
- package/es/components/TagSet/TagSet.js +5 -0
- package/es/components/TagSet/TagSetOverflow.d.ts +4 -0
- package/es/components/TagSet/TagSetOverflow.js +13 -6
- package/es/components/Tearsheet/TearsheetShell.js +9 -2
- package/es/components/UserProfileImage/UserProfileImage.d.ts +1 -1
- package/es/components/UserProfileImage/UserProfileImage.js +1 -1
- package/es/global/js/utils/Wrap.d.ts +4 -0
- package/es/global/js/utils/Wrap.js +9 -3
- package/es/global/js/utils/devtools.js +1 -2
- package/es/node_modules/@carbon/icon-helpers/es/index.js +3 -3
- package/lib/_virtual/_commonjsHelpers.js +0 -2
- package/lib/_virtual/_rollupPluginBabelHelpers.js +2 -4
- package/lib/_virtual/index.js +0 -2
- package/lib/components/APIKeyModal/APIKeyDownloader.js +8 -14
- package/lib/components/APIKeyModal/APIKeyModal.js +70 -77
- package/lib/components/AboutModal/AboutModal.js +29 -36
- package/lib/components/ActionBar/ActionBar.js +26 -33
- package/lib/components/ActionBar/ActionBarItem.js +9 -16
- package/lib/components/ActionBar/ActionBarOverflowItems.js +23 -25
- package/lib/components/ActionSet/ActionSet.js +17 -24
- package/lib/components/AddSelect/AddSelect.js +62 -68
- package/lib/components/AddSelect/AddSelectBody.js +82 -89
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +6 -13
- package/lib/components/AddSelect/AddSelectColumn.js +29 -35
- package/lib/components/AddSelect/AddSelectFilter.js +30 -37
- package/lib/components/AddSelect/AddSelectFormControl.js +15 -21
- package/lib/components/AddSelect/AddSelectList.js +9 -16
- package/lib/components/AddSelect/AddSelectMetaPanel.js +16 -22
- package/lib/components/AddSelect/AddSelectRow.js +32 -39
- package/lib/components/AddSelect/AddSelectSidebar.js +29 -35
- package/lib/components/AddSelect/AddSelectSort.js +10 -16
- package/lib/components/AddSelect/add-select-utils.js +0 -2
- package/lib/components/AddSelect/hooks/useFocus.js +1 -1
- package/lib/components/AddSelect/hooks/useItemSort.js +0 -2
- package/lib/components/AddSelect/hooks/useParentSelect.js +1 -1
- package/lib/components/AddSelect/hooks/usePath.js +1 -1
- package/lib/components/BigNumbers/BigNumbers.js +39 -46
- package/lib/components/BigNumbers/constants.js +0 -2
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +35 -42
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +22 -29
- package/lib/components/Card/Card.js +73 -80
- package/lib/components/Card/CardFooter.js +28 -35
- package/lib/components/Card/CardHeader.js +37 -44
- package/lib/components/Carousel/Carousel.js +21 -28
- package/lib/components/Carousel/CarouselItem.js +5 -12
- package/lib/components/Cascade/Cascade.js +15 -22
- package/lib/components/Checklist/Checklist.js +50 -57
- package/lib/components/Checklist/Checklist.types.js +0 -2
- package/lib/components/Checklist/ChecklistChart.js +7 -15
- package/lib/components/Checklist/ChecklistIcon.js +7 -14
- package/lib/components/Coachmark/Coachmark.js +24 -31
- package/lib/components/Coachmark/CoachmarkDragbar.js +12 -19
- package/lib/components/Coachmark/CoachmarkHeader.js +9 -16
- package/lib/components/Coachmark/CoachmarkOverlay.js +14 -21
- package/lib/components/Coachmark/CoachmarkTagline.js +12 -19
- package/lib/components/Coachmark/utils/constants.js +0 -2
- package/lib/components/Coachmark/utils/context.js +0 -2
- package/lib/components/Coachmark/utils/enums.js +1 -2
- package/lib/components/Coachmark/utils/hooks.js +0 -2
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +10 -17
- package/lib/components/CoachmarkButton/CoachmarkButton.js +6 -13
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -20
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +11 -18
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +25 -32
- package/lib/components/CoachmarkStack/CoachmarkStack.js +23 -30
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +29 -36
- package/lib/components/ComboButton/ComboButton.js +11 -18
- package/lib/components/ComboButton/ComboButtonItem/index.js +2 -8
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +34 -39
- package/lib/components/ConditionBuilder/ConditionBuilder.js +58 -59
- package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts +6 -2
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +18 -23
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +15 -20
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +20 -27
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +8 -12
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +4 -8
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +11 -8
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +63 -47
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +25 -31
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +0 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +17 -23
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +9 -15
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +5 -11
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +13 -19
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +17 -23
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +6 -12
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +9 -15
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +27 -32
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +25 -30
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +0 -2
- package/lib/components/ConditionBuilder/utils/useDataConfigs.js +0 -2
- package/lib/components/ConditionBuilder/utils/useTranslations.js +0 -2
- package/lib/components/ConditionBuilder/utils/util.js +0 -2
- package/lib/components/CreateFullPage/CreateFullPage.d.ts +4 -2
- package/lib/components/CreateFullPage/CreateFullPage.js +53 -53
- package/lib/components/CreateFullPage/CreateFullPageStep.d.ts +3 -1
- package/lib/components/CreateFullPage/CreateFullPageStep.js +27 -31
- package/lib/components/CreateInfluencer/CreateInfluencer.js +15 -22
- package/lib/components/CreateModal/CreateModal.js +22 -29
- package/lib/components/CreateSidePanel/CreateSidePanel.js +24 -31
- package/lib/components/CreateTearsheet/CreateTearsheet.js +26 -33
- package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +3 -10
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +31 -38
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +24 -31
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +37 -44
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +54 -61
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +37 -44
- package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +0 -2
- package/lib/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +0 -2
- package/lib/components/DataSpreadsheet/utils/checkForHoldingKey.js +0 -2
- package/lib/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +0 -2
- package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +1 -3
- package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +0 -2
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +0 -2
- package/lib/components/DataSpreadsheet/utils/getCellSize.js +0 -2
- package/lib/components/DataSpreadsheet/utils/getSelectionAreaPoints.js +0 -2
- package/lib/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +0 -2
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +0 -2
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +0 -2
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +0 -2
- package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +1 -3
- package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +1 -3
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +2 -4
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +0 -2
- package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +0 -2
- package/lib/components/DataSpreadsheet/utils/selectAllCells.js +1 -3
- package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/Datagrid.js +10 -17
- package/lib/components/Datagrid/Datagrid/DatagridBody.js +5 -9
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +43 -50
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -8
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +6 -11
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +2 -6
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +12 -17
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -8
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +12 -17
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -11
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +18 -23
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +3 -8
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +26 -20
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -9
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +18 -22
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +11 -12
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +10 -11
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +25 -31
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +21 -30
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +7 -13
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +18 -20
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +1 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +49 -39
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +54 -48
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +5 -11
- package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +11 -15
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +16 -31
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +18 -25
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +32 -39
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +2 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +12 -17
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +11 -16
- package/lib/components/Datagrid/Datagrid/addons/Slug/DatagridSlug.js +2 -8
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +0 -2
- package/lib/components/Datagrid/common-column-ids.js +0 -2
- package/lib/components/Datagrid/types/index.d.ts +4 -0
- package/lib/components/Datagrid/useActionsColumn.js +12 -17
- package/lib/components/Datagrid/useColumnCenterAlign.js +4 -9
- package/lib/components/Datagrid/useColumnRightAlign.js +4 -9
- package/lib/components/Datagrid/useCustomizeColumns.js +6 -7
- package/lib/components/Datagrid/useDatagrid.js +4 -8
- package/lib/components/Datagrid/useDefaultStringRenderer.js +5 -10
- package/lib/components/Datagrid/useDisableSelectRows.js +1 -1
- package/lib/components/Datagrid/useEditableCell.js +2 -2
- package/lib/components/Datagrid/useExpandedRow.js +3 -3
- package/lib/components/Datagrid/useFiltering.js +5 -5
- package/lib/components/Datagrid/useFlexResize.js +1 -1
- package/lib/components/Datagrid/useFloatingScroll.js +2 -6
- package/lib/components/Datagrid/useFocusRowExpander.js +0 -2
- package/lib/components/Datagrid/useInfiniteScroll.js +4 -8
- package/lib/components/Datagrid/useInitialColumnSort.js +0 -2
- package/lib/components/Datagrid/useInlineEdit.js +7 -12
- package/lib/components/Datagrid/useNestedRowExpander.js +5 -10
- package/lib/components/Datagrid/useNestedRows.js +3 -7
- package/lib/components/Datagrid/useOnRowClick.js +1 -1
- package/lib/components/Datagrid/useParentDimensions.js +1 -1
- package/lib/components/Datagrid/useResizeTable.js +1 -1
- package/lib/components/Datagrid/useRowExpander.js +5 -10
- package/lib/components/Datagrid/useRowIsMouseOver.js +2 -6
- package/lib/components/Datagrid/useRowRenderer.js +2 -2
- package/lib/components/Datagrid/useRowSize.js +2 -2
- package/lib/components/Datagrid/useSelectAllToggle.js +3 -8
- package/lib/components/Datagrid/useSelectRows.js +45 -29
- package/lib/components/Datagrid/useSkeletonRows.js +1 -1
- package/lib/components/Datagrid/useSortableColumns.js +8 -13
- package/lib/components/Datagrid/useStickyColumn.js +4 -9
- package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +0 -2
- package/lib/components/Decorator/Decorator.js +16 -22
- package/lib/components/DecoratorBase/DecoratorBase.js +41 -48
- package/lib/components/DecoratorBase/DecoratorIcon.js +6 -13
- package/lib/components/DecoratorBase/utils.js +0 -2
- package/lib/components/DecoratorDualButton/DecoratorDualButton.js +21 -27
- package/lib/components/DecoratorLink/DecoratorLink.js +19 -25
- package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +19 -25
- package/lib/components/DelimitedList/DelimitedList.js +7 -14
- package/lib/components/DescriptionList/DescriptionList.js +8 -15
- package/lib/components/DescriptionList/DescriptionListBody.js +5 -12
- package/lib/components/DescriptionList/DescriptionListCell.js +5 -12
- package/lib/components/DescriptionList/DescriptionListRow.js +5 -12
- package/lib/components/DescriptionList/constants.js +0 -2
- package/lib/components/EditFullPage/EditFullPage.js +5 -12
- package/lib/components/EditInPlace/EditInPlace.js +35 -45
- package/lib/components/EditSidePanel/EditSidePanel.js +26 -33
- package/lib/components/EditTearsheet/EditTearsheet.js +24 -31
- package/lib/components/EditTearsheet/EditTearsheetForm.js +16 -23
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +5 -12
- package/lib/components/EditUpdateCards/EditUpdateCards.js +32 -39
- package/lib/components/EmptyStates/EmptyState.js +22 -29
- package/lib/components/EmptyStates/EmptyStateContent.js +18 -25
- package/lib/components/EmptyStates/EmptyStateIllustration.js +3 -7
- package/lib/components/EmptyStates/EmptyStateV2.js +25 -32
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +19 -26
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +19 -26
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +19 -26
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +19 -26
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +19 -26
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +19 -26
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +53 -58
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +43 -48
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +114 -119
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +84 -89
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +81 -86
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +74 -79
- package/lib/components/ExportModal/ExportModal.js +59 -53
- package/lib/components/ExpressiveCard/ExpressiveCard.js +28 -34
- package/lib/components/FeatureFlags/index.js +3 -9
- package/lib/components/FilterPanel/FilterPanel.js +7 -14
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +10 -17
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +13 -20
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +9 -16
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +17 -24
- package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +11 -18
- package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +9 -16
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +9 -16
- package/lib/components/FilterSummary/FilterSummary.js +22 -28
- package/lib/components/FullPageError/FullPageError.js +21 -28
- package/lib/components/FullPageError/assets/Error403SVG.js +129 -135
- package/lib/components/FullPageError/assets/Error404SVG.js +114 -120
- package/lib/components/FullPageError/assets/ErrorGenericSVG.js +128 -134
- package/lib/components/GetStartedCard/GetStartedCard.js +16 -22
- package/lib/components/Guidebanner/Guidebanner.js +32 -39
- package/lib/components/Guidebanner/GuidebannerElement.js +10 -17
- package/lib/components/Guidebanner/GuidebannerElementButton.js +9 -16
- package/lib/components/Guidebanner/GuidebannerElementLink.js +5 -12
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +5 -12
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +5 -12
- package/lib/components/HTTPErrors/HTTPErrorContent.js +5 -11
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +5 -12
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +358 -364
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +309 -315
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +321 -327
- package/lib/components/ImportModal/ImportModal.js +48 -55
- package/lib/components/InlineTip/InlineTip.js +38 -45
- package/lib/components/InlineTip/InlineTipButton.js +5 -12
- package/lib/components/InlineTip/InlineTipLink.js +6 -13
- package/lib/components/InlineTip/utils.js +2 -4
- package/lib/components/InterstitialScreen/InterstitialScreen.js +73 -80
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +6 -13
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +8 -15
- package/lib/components/MultiAddSelect/MultiAddSelect.js +45 -51
- package/lib/components/Nav/Nav.js +14 -21
- package/lib/components/Nav/NavItem.js +19 -24
- package/lib/components/Nav/NavItemLink.js +4 -8
- package/lib/components/Nav/NavList.js +12 -17
- package/lib/components/NonLinearReading/NonLinearReading.js +12 -19
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +5 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +104 -98
- package/lib/components/NotificationsPanel/utils.js +0 -2
- package/lib/components/OptionsTile/OptionsTile.d.ts +1 -1
- package/lib/components/OptionsTile/OptionsTile.js +40 -48
- package/lib/components/PageHeader/PageHeader.js +105 -112
- package/lib/components/PageHeader/PageHeaderTitle.js +23 -30
- package/lib/components/PageHeader/PageHeaderUtils.js +2 -9
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +4 -0
- package/lib/components/ProductiveCard/ProductiveCard.js +39 -41
- package/lib/components/RemoveModal/RemoveModal.js +27 -34
- package/lib/components/Saving/Saving.js +27 -34
- package/lib/components/ScrollGradient/ScrollGradient.js +17 -24
- package/lib/components/ScrollGradient/constants.js +0 -2
- package/lib/components/SearchBar/SearchBar.js +22 -29
- package/lib/components/SidePanel/SidePanel.js +66 -73
- package/lib/components/SidePanel/constants.js +0 -2
- package/lib/components/SidePanel/motion/variants.js +0 -2
- package/lib/components/SimpleHeader/SimpleHeader.d.ts +3 -1
- package/lib/components/SimpleHeader/SimpleHeader.js +27 -27
- package/lib/components/SingleAddSelect/SingleAddSelect.js +21 -27
- package/lib/components/StatusIcon/StatusIcon.js +52 -59
- package/lib/components/StatusIndicator/StatusIndicator.js +13 -20
- package/lib/components/StatusIndicator/StatusIndicatorStep.js +14 -21
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +8 -17
- package/lib/components/StringFormatter/StringFormatter.js +12 -19
- package/lib/components/StringFormatter/utils/enums.js +0 -2
- package/lib/components/TagOverflow/TagOverflow.js +26 -33
- package/lib/components/TagOverflow/TagOverflowModal.js +17 -24
- package/lib/components/TagOverflow/TagOverflowPopover.js +22 -29
- package/lib/components/TagOverflow/constants.js +0 -2
- package/lib/components/TagSet/TagSet.js +39 -41
- package/lib/components/TagSet/TagSetModal.js +16 -23
- package/lib/components/TagSet/TagSetOverflow.d.ts +4 -0
- package/lib/components/TagSet/TagSetOverflow.js +32 -32
- package/lib/components/Tearsheet/Tearsheet.js +23 -29
- package/lib/components/Tearsheet/TearsheetNarrow.js +18 -24
- package/lib/components/Tearsheet/TearsheetShell.js +63 -63
- package/lib/components/Toolbar/Toolbar.js +3 -10
- package/lib/components/Toolbar/ToolbarButton.js +3 -10
- package/lib/components/Toolbar/ToolbarGroup.js +2 -9
- package/lib/components/TooltipTrigger/TooltipTrigger.js +4 -11
- package/lib/components/TruncatedList/TruncatedList.js +15 -22
- package/lib/components/UserAvatar/UserAvatar.js +18 -25
- package/lib/components/UserProfileImage/UserProfileImage.d.ts +1 -1
- package/lib/components/UserProfileImage/UserProfileImage.js +25 -32
- package/lib/components/WebTerminal/WebTerminal.js +26 -33
- package/lib/components/WebTerminal/WebTerminalContentWrapper.js +4 -11
- package/lib/components/WebTerminal/hooks/index.js +2 -8
- package/lib/components/_Canary/Canary.js +7 -14
- package/lib/feature-flags.js +3 -4
- package/lib/global/js/hooks/useActiveElement.js +0 -2
- package/lib/global/js/hooks/useClickOutside.js +0 -2
- package/lib/global/js/hooks/useControllableState.js +2 -4
- package/lib/global/js/hooks/useCreateComponentFocus.js +1 -3
- package/lib/global/js/hooks/useCreateComponentStepChange.js +0 -2
- package/lib/global/js/hooks/useFocus.js +1 -3
- package/lib/global/js/hooks/useIsomorphicEffect.js +0 -2
- package/lib/global/js/hooks/usePortalTarget.js +0 -2
- package/lib/global/js/hooks/usePrefersReducedMotion.js +1 -1
- package/lib/global/js/hooks/usePrefix.js +1 -3
- package/lib/global/js/hooks/usePreviousValue.js +0 -2
- package/lib/global/js/hooks/useResetCreateComponent.js +0 -2
- package/lib/global/js/hooks/useResizeObserver.js +0 -2
- package/lib/global/js/hooks/useRetrieveFormTitles.js +0 -2
- package/lib/global/js/hooks/useRetrieveStepData.js +0 -2
- package/lib/global/js/hooks/useValidCreateStepCount.js +0 -2
- package/lib/global/js/hooks/useWindowResize.js +1 -3
- package/lib/global/js/hooks/useWindowScroll.js +1 -3
- package/lib/global/js/package-settings.js +1 -1
- package/lib/global/js/utils/Wrap.d.ts +4 -0
- package/lib/global/js/utils/Wrap.js +16 -16
- package/lib/global/js/utils/deepCloneObject.js +1 -3
- package/lib/global/js/utils/devtools.js +0 -2
- package/lib/global/js/utils/getBezierValues.js +0 -2
- package/lib/global/js/utils/getFocusableElements.js +0 -2
- package/lib/global/js/utils/getNodeTextContent.js +1 -3
- package/lib/global/js/utils/getNumberOfHiddenSteps.js +0 -2
- package/lib/global/js/utils/getScrollbarWidth.js +0 -2
- package/lib/global/js/utils/keyboardNavigation.js +0 -2
- package/lib/global/js/utils/lastIndexInArray.js +0 -2
- package/lib/global/js/utils/motionConstants.js +0 -2
- package/lib/global/js/utils/pconsole.js +1 -1
- package/lib/global/js/utils/props-helper.js +10 -12
- package/lib/global/js/utils/rangeWithCallback.js +0 -2
- package/lib/global/js/utils/scrollableAncestor.js +1 -3
- package/lib/global/js/utils/uuidv4.js +1 -1
- package/lib/global/js/utils/wait.js +1 -1
- package/lib/global/js/utils/wrapFocus.js +1 -1
- package/lib/index.js +19 -21
- package/lib/node_modules/@carbon/colors/es/index.js +0 -2
- package/lib/node_modules/@carbon/icon-helpers/es/index.js +6 -8
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +14 -18
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +525 -531
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +500 -506
- package/lib/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +1 -3
- package/lib/node_modules/object-assign/index.js +0 -2
- package/lib/node_modules/prop-types/checkPropTypes.js +2 -4
- package/lib/node_modules/prop-types/factoryWithThrowingShims.js +0 -2
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +4 -10
- package/lib/node_modules/prop-types/index.js +2 -6
- package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -2
- package/lib/node_modules/prop-types/lib/has.js +0 -2
- package/lib/settings.js +9 -15
- package/package.json +11 -11
- package/scss/components/EditInPlace/_edit-in-place.scss +0 -11
- package/scss/components/SidePanel/_side-panel.scss +1 -0
- package/scss/components/TagSet/_tag-set.scss +2 -0
- package/telemetry.yml +3 -3
@@ -7,8 +7,6 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
-
|
12
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
11
|
var React = require('react');
|
14
12
|
var index = require('../../node_modules/prop-types/index.js');
|
@@ -20,11 +18,6 @@ var react = require('@carbon/react');
|
|
20
18
|
var constants = require('./constants.js');
|
21
19
|
var TooltipTrigger = require('../TooltipTrigger/TooltipTrigger.js');
|
22
20
|
|
23
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
24
|
-
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
26
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
27
|
-
|
28
21
|
var _Information;
|
29
22
|
var _excluded = ["className", "forceShowTotal", "fractionDigits", "iconButton", "loading", "label", "locale", "percentage", "size", "tooltipDescription", "total", "trending", "truncate", "value"],
|
30
23
|
_excluded2 = ["className", "size"];
|
@@ -59,7 +52,7 @@ var defaults = {
|
|
59
52
|
* of a button as well as tool tip functionality.
|
60
53
|
* The default locale is English (`en-US`) if one is not provided or if the provided one is not supported.
|
61
54
|
*/
|
62
|
-
exports.BigNumbers = /*#__PURE__*/
|
55
|
+
exports.BigNumbers = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
63
56
|
var _formatValue, _formatValue2;
|
64
57
|
var className = _ref.className,
|
65
58
|
_ref$forceShowTotal = _ref.forceShowTotal,
|
@@ -86,48 +79,48 @@ exports.BigNumbers = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
86
79
|
_ref$value = _ref.value,
|
87
80
|
value = _ref$value === void 0 ? defaults.value : _ref$value,
|
88
81
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
89
|
-
var BigNumbersClasses =
|
82
|
+
var BigNumbersClasses = cx(className, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--lg"), size === constants.BigNumbersSize.Large), "".concat(blockClass, "--xl"), size === constants.BigNumbersSize.XLarge));
|
90
83
|
var supportedLocale = constants.getSupportedLocale(locale);
|
91
84
|
var truncatedValue = (_formatValue = constants.formatValue(supportedLocale, value, fractionDigits, truncate)) !== null && _formatValue !== void 0 ? _formatValue : constants.Characters.Dash;
|
92
85
|
var truncatedTotal = (_formatValue2 = constants.formatValue(supportedLocale, total, fractionDigits, truncate)) !== null && _formatValue2 !== void 0 ? _formatValue2 : 'Unknown';
|
93
86
|
var shouldDisplayDenominator = !percentage && total > value && truncatedValue !== truncatedTotal || forceShowTotal && total > 0;
|
94
87
|
if (loading) {
|
95
|
-
return /*#__PURE__*/
|
88
|
+
return /*#__PURE__*/React.createElement(SkeletonBigNumbers, _rollupPluginBabelHelpers.extends({}, rest, {
|
96
89
|
ref: ref,
|
97
90
|
className: className,
|
98
91
|
size: size
|
99
92
|
}, devtools.getDevtoolsProps(componentName)));
|
100
93
|
}
|
101
|
-
return /*#__PURE__*/
|
102
|
-
className:
|
94
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
|
95
|
+
className: cx(blockClass, BigNumbersClasses, className),
|
103
96
|
ref: ref
|
104
|
-
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/
|
97
|
+
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement("span", {
|
105
98
|
className: "".concat(blockClass, "__row")
|
106
|
-
}, /*#__PURE__*/
|
99
|
+
}, /*#__PURE__*/React.createElement("h4", {
|
107
100
|
className: "".concat(blockClass, "__label")
|
108
|
-
}, label), tooltipDescription && /*#__PURE__*/
|
101
|
+
}, label), tooltipDescription && /*#__PURE__*/React.createElement(react.Tooltip, {
|
109
102
|
description: tooltipDescription,
|
110
103
|
align: "right",
|
111
104
|
className: "".concat(blockClass, "__info")
|
112
|
-
}, /*#__PURE__*/
|
105
|
+
}, /*#__PURE__*/React.createElement(TooltipTrigger.TooltipTrigger, {
|
113
106
|
className: "".concat(blockClass, "__tooltip-trigger")
|
114
|
-
}, _Information || (_Information = /*#__PURE__*/
|
107
|
+
}, _Information || (_Information = /*#__PURE__*/React.createElement(icons.Information, {
|
115
108
|
size: 16
|
116
|
-
}))))), /*#__PURE__*/
|
109
|
+
}))))), /*#__PURE__*/React.createElement("span", {
|
117
110
|
className: "".concat(blockClass, "__row"),
|
118
111
|
role: "math"
|
119
|
-
}, trending && /*#__PURE__*/
|
112
|
+
}, trending && /*#__PURE__*/React.createElement(icons.ArrowUp, {
|
120
113
|
className: "".concat(blockClass, "__trend"),
|
121
114
|
size: constants.getIconSize(size)
|
122
|
-
}), /*#__PURE__*/
|
115
|
+
}), /*#__PURE__*/React.createElement("span", {
|
123
116
|
className: "".concat(blockClass, "__value")
|
124
|
-
}, percentage ? /*#__PURE__*/
|
117
|
+
}, percentage ? /*#__PURE__*/React.createElement("div", {
|
125
118
|
className: "".concat(blockClass, "__percentage")
|
126
|
-
}, truncatedValue, /*#__PURE__*/
|
119
|
+
}, truncatedValue, /*#__PURE__*/React.createElement("span", {
|
127
120
|
className: "".concat(blockClass, "__percentage-mark")
|
128
|
-
}, "%")) : truncatedValue), shouldDisplayDenominator && /*#__PURE__*/
|
121
|
+
}, "%")) : truncatedValue), shouldDisplayDenominator && /*#__PURE__*/React.createElement("span", {
|
129
122
|
className: "".concat(blockClass, "__total")
|
130
|
-
}, /*#__PURE__*/
|
123
|
+
}, /*#__PURE__*/React.createElement("span", null, constants.Characters.Slash, truncatedTotal)), iconButton));
|
131
124
|
});
|
132
125
|
|
133
126
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -145,69 +138,69 @@ exports.BigNumbers.propTypes = {
|
|
145
138
|
* Optional class name.
|
146
139
|
* @type number
|
147
140
|
*/
|
148
|
-
className: index
|
141
|
+
className: index.default.string,
|
149
142
|
/**
|
150
143
|
* Display the `total` even when the `value` is equal to
|
151
144
|
* the `total` when `forceShowTotal` prop is true on the
|
152
145
|
* condition that the `total` is greater than 0.
|
153
146
|
* @type bool
|
154
147
|
*/
|
155
|
-
forceShowTotal: index
|
148
|
+
forceShowTotal: index.default.bool,
|
156
149
|
/**
|
157
150
|
* Optional value to control the maximum fraction digits
|
158
151
|
* used when truncating the value and total.
|
159
152
|
* @type number
|
160
153
|
*/
|
161
|
-
fractionDigits: index
|
154
|
+
fractionDigits: index.default.number,
|
162
155
|
/** Displays an iconButton next to the BigNumbers value
|
163
156
|
* @type node
|
164
157
|
*/
|
165
|
-
iconButton: index
|
158
|
+
iconButton: index.default.node,
|
166
159
|
/**
|
167
160
|
* Text label for BigNumbers.
|
168
161
|
* @type string
|
169
162
|
*/
|
170
|
-
label: index
|
163
|
+
label: index.default.string.isRequired,
|
171
164
|
/** Specify if the BigNumbers is in a loading state
|
172
165
|
* @type bool
|
173
166
|
*/
|
174
|
-
loading: index
|
167
|
+
loading: index.default.bool,
|
175
168
|
/**
|
176
169
|
* Locale value to determine approach to formatting numbers.
|
177
170
|
* @type string
|
178
171
|
*/
|
179
|
-
locale: index
|
172
|
+
locale: index.default.string,
|
180
173
|
/**
|
181
174
|
* Format number to percentage when `percentage` prop is true.
|
182
175
|
* @type bool
|
183
176
|
*/
|
184
|
-
percentage: index
|
177
|
+
percentage: index.default.bool,
|
185
178
|
/** The size of the BigNumbers.
|
186
179
|
* @type string
|
187
180
|
*/
|
188
|
-
size: index
|
181
|
+
size: index.default.oneOf(Object.values(constants.BigNumbersSize)),
|
189
182
|
/** Label applied to a Tooltip - marked with the Information icon.
|
190
183
|
* @type string
|
191
184
|
*/
|
192
|
-
tooltipDescription: index
|
185
|
+
tooltipDescription: index.default.string,
|
193
186
|
/**
|
194
187
|
* Total value that the main BigNumbers value is a subset of.
|
195
188
|
* @type number
|
196
189
|
*/
|
197
|
-
total: index
|
190
|
+
total: index.default.number,
|
198
191
|
/** Display trending icon.
|
199
192
|
* @type boolean
|
200
193
|
*/
|
201
|
-
trending: index
|
194
|
+
trending: index.default.bool,
|
202
195
|
/** Specify whether or not the values should be truncated.
|
203
196
|
* @type boolean
|
204
197
|
*/
|
205
|
-
truncate: index
|
198
|
+
truncate: index.default.bool,
|
206
199
|
/**
|
207
200
|
* The main BigNumbers value to display
|
208
201
|
* @type number
|
209
202
|
*/
|
210
|
-
value: index
|
203
|
+
value: index.default.number
|
211
204
|
};
|
212
205
|
|
213
206
|
/**
|
@@ -216,17 +209,17 @@ exports.BigNumbers.propTypes = {
|
|
216
209
|
*
|
217
210
|
* Note: This component is only used within BigNumbers.
|
218
211
|
*/
|
219
|
-
var SkeletonBigNumbers = /*#__PURE__*/
|
212
|
+
var SkeletonBigNumbers = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
220
213
|
var className = _ref2.className,
|
221
214
|
size = _ref2.size,
|
222
215
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded2);
|
223
|
-
var BigNumbersSkeletonClasses =
|
224
|
-
return /*#__PURE__*/
|
225
|
-
className:
|
216
|
+
var BigNumbersSkeletonClasses = cx(className, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(skeletonBlockClass, "--lg"), size === constants.BigNumbersSize.Large), "".concat(skeletonBlockClass, "--xl"), size === constants.BigNumbersSize.XLarge));
|
217
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
|
218
|
+
className: cx(className, skeletonBlockClass, BigNumbersSkeletonClasses),
|
226
219
|
ref: ref
|
227
|
-
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/
|
220
|
+
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(react.SkeletonText, {
|
228
221
|
className: "".concat(skeletonBlockClass, "__label")
|
229
|
-
}), /*#__PURE__*/
|
222
|
+
}), /*#__PURE__*/React.createElement(react.SkeletonText, {
|
230
223
|
heading: true,
|
231
224
|
className: "".concat(skeletonBlockClass, "__value"),
|
232
225
|
width: "80%"
|
@@ -237,9 +230,9 @@ SkeletonBigNumbers.propTypes = {
|
|
237
230
|
* Optional class name.
|
238
231
|
* @type number
|
239
232
|
*/
|
240
|
-
className: index
|
233
|
+
className: index.default.string,
|
241
234
|
/** The size of the BigNumbers.
|
242
235
|
* @type string
|
243
236
|
*/
|
244
|
-
size: index
|
237
|
+
size: index.default.oneOf(Object.values(constants.BigNumbersSize))
|
245
238
|
};
|
@@ -7,8 +7,6 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
-
|
12
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
11
|
var React = require('react');
|
14
12
|
var index = require('../../node_modules/prop-types/index.js');
|
@@ -21,11 +19,6 @@ var uuidv4 = require('../../global/js/utils/uuidv4.js');
|
|
21
19
|
require('../../global/js/utils/props-helper.js');
|
22
20
|
var TooltipTrigger = require('../TooltipTrigger/TooltipTrigger.js');
|
23
21
|
|
24
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
25
|
-
|
26
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
27
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
28
|
-
|
29
22
|
var _TooltipTrigger;
|
30
23
|
var _excluded = ["breadcrumbs", "className", "maxVisible", "noTrailingSlash", "overflowAriaLabel", "overflowTooltipAlign"],
|
31
24
|
_excluded2 = ["label", "key", "title", "id", "shortTitle"],
|
@@ -60,7 +53,7 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
60
53
|
setDisplayedBreadcrumbItems = _useState4[1];
|
61
54
|
var breadcrumbItemWithOverflow = React.useRef(null);
|
62
55
|
var sizingContainerRef = React.useRef(null);
|
63
|
-
var internalId = React.useRef(uuidv4
|
56
|
+
var internalId = React.useRef(uuidv4.default());
|
64
57
|
var _useState5 = React.useState([]),
|
65
58
|
_useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
|
66
59
|
hiddenSizingItems = _useState6[0],
|
@@ -69,15 +62,15 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
69
62
|
// eslint-disable-next-line react/prop-types
|
70
63
|
var BreadcrumbOverflowMenu = function BreadcrumbOverflowMenu(_ref2) {
|
71
64
|
var overflowItems = _ref2.overflowItems;
|
72
|
-
return /*#__PURE__*/
|
65
|
+
return /*#__PURE__*/React.createElement(react.BreadcrumbItem, {
|
73
66
|
key: "breadcrumb-overflow-".concat(internalId.current)
|
74
|
-
}, /*#__PURE__*/
|
67
|
+
}, /*#__PURE__*/React.createElement(react.OverflowMenu, {
|
75
68
|
align: overflowTooltipAlign,
|
76
69
|
"aria-label": overflowAriaLabel,
|
77
70
|
iconDescription: overflowAriaLabel // also needs setting to avoid a11y "Accessible name does not match or contain the visible label text"
|
78
71
|
,
|
79
72
|
renderIcon: function renderIcon(props) {
|
80
|
-
return /*#__PURE__*/
|
73
|
+
return /*#__PURE__*/React.createElement(icons.OverflowMenuHorizontal, _rollupPluginBabelHelpers.extends({
|
81
74
|
size: 32
|
82
75
|
}, props));
|
83
76
|
},
|
@@ -86,7 +79,7 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
86
79
|
},
|
87
80
|
// eslint-disable-next-line react/prop-types
|
88
81
|
overflowItems.map(function (item, index) {
|
89
|
-
return /*#__PURE__*/
|
82
|
+
return /*#__PURE__*/React.createElement(react.OverflowMenuItem, {
|
90
83
|
key: "breadcrumb-overflow-menu-item-".concat(internalId.current, "-").concat(index),
|
91
84
|
href: item.props.href,
|
92
85
|
onClick: item.props.onClick,
|
@@ -98,16 +91,16 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
98
91
|
// create hidden sizing items
|
99
92
|
React.useEffect(function () {
|
100
93
|
// Hidden action bar and items used to calculate sizes
|
101
|
-
setHiddenSizingItems( /*#__PURE__*/
|
94
|
+
setHiddenSizingItems( /*#__PURE__*/React.createElement("div", {
|
102
95
|
className: "".concat(blockClass, "__breadcrumb-container ").concat(blockClass, "__breadcrumb-container--hidden"),
|
103
96
|
"aria-hidden": true,
|
104
97
|
ref: sizingContainerRef
|
105
|
-
}, /*#__PURE__*/
|
98
|
+
}, /*#__PURE__*/React.createElement(react.Breadcrumb, null, /*#__PURE__*/React.createElement(react.BreadcrumbItem, {
|
106
99
|
key: "".concat(blockClass, "-hidden-overflow-").concat(internalId)
|
107
|
-
}, /*#__PURE__*/
|
100
|
+
}, /*#__PURE__*/React.createElement(react.OverflowMenu, {
|
108
101
|
"aria-label": overflowAriaLabel,
|
109
102
|
renderIcon: function renderIcon(props) {
|
110
|
-
return /*#__PURE__*/
|
103
|
+
return /*#__PURE__*/React.createElement(icons.OverflowMenuHorizontal, _rollupPluginBabelHelpers.extends({
|
111
104
|
size: 32
|
112
105
|
}, props));
|
113
106
|
}
|
@@ -118,7 +111,7 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
118
111
|
id = _ref3.id;
|
119
112
|
_ref3.shortTitle;
|
120
113
|
var rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref3, _excluded2);
|
121
|
-
return /*#__PURE__*/
|
114
|
+
return /*#__PURE__*/React.createElement(react.BreadcrumbItem, _rollupPluginBabelHelpers.extends({
|
122
115
|
key: key
|
123
116
|
}, rest, {
|
124
117
|
// ensure id is not duplicated
|
@@ -141,9 +134,9 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
141
134
|
shortTitle = _ref4.shortTitle,
|
142
135
|
title = _ref4.title,
|
143
136
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref4, _excluded3);
|
144
|
-
return /*#__PURE__*/
|
137
|
+
return /*#__PURE__*/React.createElement(react.BreadcrumbItem, _rollupPluginBabelHelpers.extends({
|
145
138
|
key: key,
|
146
|
-
className: index > 0 || displayCount > 1 ?
|
139
|
+
className: index > 0 || displayCount > 1 ? cx([className, "".concat(blockClass, "__displayed-breadcrumb")]) : className,
|
147
140
|
title: index + 1 === breadcrumbs.length ? title : null
|
148
141
|
}, rest), shortTitle || label);
|
149
142
|
});
|
@@ -159,7 +152,7 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
159
152
|
|
160
153
|
// if needed add overflow menu
|
161
154
|
if (newOverflowBreadcrumbItems.length) {
|
162
|
-
newDisplayedBreadcrumbItems.splice(overflowPosition, 0, /*#__PURE__*/
|
155
|
+
newDisplayedBreadcrumbItems.splice(overflowPosition, 0, /*#__PURE__*/React.createElement(BreadcrumbOverflowMenu, {
|
163
156
|
overflowItems: newOverflowBreadcrumbItems,
|
164
157
|
key: "displayed-breadcrumb-".concat(internalId, "-overflow")
|
165
158
|
}));
|
@@ -262,24 +255,24 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
262
255
|
useResizeObserver.useResizeObserver(sizingContainerRef, handleResize);
|
263
256
|
// item resize
|
264
257
|
useResizeObserver.useResizeObserver(breadcrumbItemWithOverflow, handleResize);
|
265
|
-
return /*#__PURE__*/
|
266
|
-
className:
|
258
|
+
return /*#__PURE__*/React.createElement("div", {
|
259
|
+
className: cx(blockClass, className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__with-items"), displayedBreadcrumbItems.length > 1)),
|
267
260
|
ref: breadcrumbItemWithOverflow
|
268
|
-
}, /*#__PURE__*/
|
269
|
-
className:
|
270
|
-
}, hiddenSizingItems, /*#__PURE__*/
|
271
|
-
className:
|
261
|
+
}, /*#__PURE__*/React.createElement("div", {
|
262
|
+
className: cx(["".concat(blockClass, "__space")])
|
263
|
+
}, hiddenSizingItems, /*#__PURE__*/React.createElement(react.Breadcrumb, _rollupPluginBabelHelpers.extends({
|
264
|
+
className: cx("".concat(blockClass, "__breadcrumb-container"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__breadcrumb-container-with-items"), displayedBreadcrumbItems.length > 1)),
|
272
265
|
noTrailingSlash: noTrailingSlash
|
273
|
-
}, other), ((_backItem = backItem) === null || _backItem === void 0 ? void 0 : _backItem.href) && (((_backItem2 = backItem) === null || _backItem2 === void 0 ? void 0 : _backItem2.label) || ((_backItem3 = backItem) === null || _backItem3 === void 0 ? void 0 : _backItem3.title)) && /*#__PURE__*/
|
274
|
-
className:
|
275
|
-
}, /*#__PURE__*/
|
266
|
+
}, other), ((_backItem = backItem) === null || _backItem === void 0 ? void 0 : _backItem.href) && (((_backItem2 = backItem) === null || _backItem2 === void 0 ? void 0 : _backItem2.label) || ((_backItem3 = backItem) === null || _backItem3 === void 0 ? void 0 : _backItem3.title)) && /*#__PURE__*/React.createElement(react.BreadcrumbItem, {
|
267
|
+
className: cx("".concat(blockClass, "__breadcrumb-back"))
|
268
|
+
}, /*#__PURE__*/React.createElement(react.Link, {
|
276
269
|
href: backItem.href,
|
277
270
|
renderIcon: function renderIcon() {
|
278
|
-
return /*#__PURE__*/
|
271
|
+
return /*#__PURE__*/React.createElement(react.Tooltip, {
|
279
272
|
align: "right",
|
280
273
|
label: backItem.title || backItem.label,
|
281
274
|
className: "".concat(blockClass, "__back__button ").concat(carbonPrefix, "--icon-tooltip")
|
282
|
-
}, _TooltipTrigger || (_TooltipTrigger = /*#__PURE__*/
|
275
|
+
}, _TooltipTrigger || (_TooltipTrigger = /*#__PURE__*/React.createElement(TooltipTrigger.TooltipTrigger, null, /*#__PURE__*/React.createElement(icons.ArrowLeft, {
|
283
276
|
size: 16
|
284
277
|
}))));
|
285
278
|
}
|
@@ -289,31 +282,31 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
289
282
|
// Return a placeholder if not released and not enabled by feature flag
|
290
283
|
exports.BreadcrumbWithOverflow = settings.pkg.checkComponentEnabled(exports.BreadcrumbWithOverflow, componentName);
|
291
284
|
exports.BreadcrumbWithOverflow.propTypes = {
|
292
|
-
breadcrumbs: index
|
285
|
+
breadcrumbs: index.default.arrayOf(index.default.shape({
|
293
286
|
/**
|
294
287
|
* Optional string representing the link location for the BreadcrumbItem
|
295
288
|
*/
|
296
|
-
href: index
|
289
|
+
href: index.default.string,
|
297
290
|
/**
|
298
291
|
* Provide if this breadcrumb item represents the current page
|
299
292
|
*/
|
300
|
-
isCurrentPage: index
|
293
|
+
isCurrentPage: index.default.bool,
|
301
294
|
/**
|
302
295
|
* Key required to render array efficiently
|
303
296
|
*/
|
304
|
-
key: index
|
297
|
+
key: index.default.string.isRequired,
|
305
298
|
/**
|
306
299
|
* Pass in content that will be inside of the BreadcrumbItem
|
307
300
|
*/
|
308
|
-
label: index
|
301
|
+
label: index.default.node,
|
309
302
|
/**
|
310
303
|
* An optional title label for extra long breadcrumb
|
311
304
|
*/
|
312
|
-
shortTitle: index
|
305
|
+
shortTitle: index.default.string,
|
313
306
|
/**
|
314
307
|
* A string based alternative to the children, required only if children is not of type string
|
315
308
|
*/
|
316
|
-
title: index
|
309
|
+
title: index.default.string.isRequired.if(function (_ref5) {
|
317
310
|
var label = _ref5.label;
|
318
311
|
return typeof label !== 'string';
|
319
312
|
})
|
@@ -321,19 +314,19 @@ exports.BreadcrumbWithOverflow.propTypes = {
|
|
321
314
|
/**
|
322
315
|
* className
|
323
316
|
*/
|
324
|
-
className: index
|
317
|
+
className: index.default.string,
|
325
318
|
/**
|
326
319
|
* maxVisible: maximum visible breadcrumb-items before overflow is used (values less than 1 are treated as 1)
|
327
320
|
*/
|
328
|
-
maxVisible: index
|
321
|
+
maxVisible: index.default.number,
|
329
322
|
/**
|
330
323
|
* noTrailing slash - same as for Carbon
|
331
324
|
*/
|
332
|
-
noTrailingSlash: index
|
325
|
+
noTrailingSlash: index.default.bool,
|
333
326
|
/**
|
334
327
|
* overflowAriaLabel label for open close button overflow used for breadcrumb items that do not fit.
|
335
328
|
*/
|
336
|
-
overflowAriaLabel: index
|
329
|
+
overflowAriaLabel: index.default.string.isRequired.if(function (_ref6) {
|
337
330
|
var breadcrumbs = _ref6.breadcrumbs;
|
338
331
|
return breadcrumbs.length > 1;
|
339
332
|
}),
|
@@ -7,8 +7,6 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
-
|
12
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
11
|
var React = require('react');
|
14
12
|
var index = require('../../node_modules/prop-types/index.js');
|
@@ -18,11 +16,6 @@ var react = require('@carbon/react');
|
|
18
16
|
var settings = require('../../settings.js');
|
19
17
|
var propsHelper = require('../../global/js/utils/props-helper.js');
|
20
18
|
|
21
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
22
|
-
|
23
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
24
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
25
|
-
|
26
19
|
var _excluded = ["isHidden", "buttons"],
|
27
20
|
_excluded2 = ["label", "key", "kind", "id"],
|
28
21
|
_excluded3 = ["buttons"],
|
@@ -98,12 +91,12 @@ var ButtonSetWithOverflow = function ButtonSetWithOverflow(_ref) {
|
|
98
91
|
checkFullyVisibleItems();
|
99
92
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
100
93
|
}, [buttons]);
|
101
|
-
var AButtonSet = /*#__PURE__*/
|
94
|
+
var AButtonSet = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
102
95
|
var _ref2$isHidden = _ref2.isHidden,
|
103
96
|
isHidden = _ref2$isHidden === void 0 ? false : _ref2$isHidden,
|
104
97
|
buttons = _ref2.buttons,
|
105
98
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded);
|
106
|
-
return /*#__PURE__*/
|
99
|
+
return /*#__PURE__*/React.createElement(react.ButtonSet, _rollupPluginBabelHelpers.extends({}, rest, {
|
107
100
|
ref: ref
|
108
101
|
}), buttons.map(function (_ref3) {
|
109
102
|
var label = _ref3.label,
|
@@ -112,7 +105,7 @@ var ButtonSetWithOverflow = function ButtonSetWithOverflow(_ref) {
|
|
112
105
|
id = _ref3.id,
|
113
106
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref3, _excluded2);
|
114
107
|
var kindFix = kind === 'default' ? 'primary' : kind;
|
115
|
-
return /*#__PURE__*/
|
108
|
+
return /*#__PURE__*/React.createElement(react.Button, _rollupPluginBabelHelpers.extends({}, other, {
|
116
109
|
key: key && "button-set-".concat(key),
|
117
110
|
size: buttonSize,
|
118
111
|
type: "button",
|
@@ -126,12 +119,12 @@ var ButtonSetWithOverflow = function ButtonSetWithOverflow(_ref) {
|
|
126
119
|
* isHidden - Used to conditionally change id if one is passed to the `AButtonSet` component
|
127
120
|
* in order to avoid duplicate ids between the visible and hidden button set buttons
|
128
121
|
*/
|
129
|
-
isHidden: index
|
122
|
+
isHidden: index.default.bool
|
130
123
|
};
|
131
|
-
var AButtonMenu = /*#__PURE__*/
|
124
|
+
var AButtonMenu = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
132
125
|
var buttons = _ref4.buttons,
|
133
126
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref4, _excluded3);
|
134
|
-
return /*#__PURE__*/
|
127
|
+
return /*#__PURE__*/React.createElement(react.MenuButton, _rollupPluginBabelHelpers.extends({}, rest, {
|
135
128
|
ref: ref,
|
136
129
|
label: buttonSetOverflowLabel
|
137
130
|
}), buttons.map(function (_ref5) {
|
@@ -140,7 +133,7 @@ var ButtonSetWithOverflow = function ButtonSetWithOverflow(_ref) {
|
|
140
133
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref5, _excluded4);
|
141
134
|
// menu items only come in default and danger flavors
|
142
135
|
var kindFix = kind === 'danger' ? 'danger' : 'default';
|
143
|
-
return /*#__PURE__*/
|
136
|
+
return /*#__PURE__*/React.createElement(react.MenuItem, _rollupPluginBabelHelpers.extends({}, propsHelper.prepareProps(other, ['iconDescription', 'renderIcon']), {
|
144
137
|
key: key && "button-menu-".concat(key),
|
145
138
|
kind: kindFix
|
146
139
|
}));
|
@@ -149,32 +142,32 @@ var ButtonSetWithOverflow = function ButtonSetWithOverflow(_ref) {
|
|
149
142
|
useResizeObserver.useResizeObserver(sizingContainerRefSet, checkFullyVisibleItems);
|
150
143
|
useResizeObserver.useResizeObserver(sizingContainerRefCombo, checkFullyVisibleItems);
|
151
144
|
useResizeObserver.useResizeObserver(spaceAvailableRef, checkFullyVisibleItems);
|
152
|
-
return /*#__PURE__*/
|
153
|
-
className:
|
145
|
+
return /*#__PURE__*/React.createElement("div", {
|
146
|
+
className: cx([blockClass, className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--right"), rightAlign)]),
|
154
147
|
ref: spaceAvailableRef
|
155
|
-
}, /*#__PURE__*/
|
148
|
+
}, /*#__PURE__*/React.createElement("div", {
|
156
149
|
className: "".concat(blockClass, "__button-container ").concat(blockClass, "__button-container--hidden")
|
157
|
-
}, /*#__PURE__*/
|
150
|
+
}, /*#__PURE__*/React.createElement(AButtonSet, {
|
158
151
|
"aria-hidden": true,
|
159
152
|
ref: sizingContainerRefSet,
|
160
153
|
size: buttonSize,
|
161
154
|
buttons: buttons,
|
162
155
|
isHidden: true
|
163
|
-
})), /*#__PURE__*/
|
156
|
+
})), /*#__PURE__*/React.createElement("div", {
|
164
157
|
className: "".concat(blockClass, "__button-container ").concat(blockClass, "__button-container--hidden"),
|
165
158
|
"aria-hidden": true
|
166
|
-
}, /*#__PURE__*/
|
159
|
+
}, /*#__PURE__*/React.createElement(AButtonMenu, {
|
167
160
|
className: menuOptionsClass,
|
168
161
|
ref: sizingContainerRefCombo,
|
169
162
|
buttons: buttons,
|
170
163
|
size: buttonSize
|
171
|
-
})), /*#__PURE__*/
|
164
|
+
})), /*#__PURE__*/React.createElement("div", {
|
172
165
|
className: "".concat(blockClass, "__button-container ").concat(blockClass, "__button-container--visible")
|
173
|
-
}, showAsOverflow ? /*#__PURE__*/
|
166
|
+
}, showAsOverflow ? /*#__PURE__*/React.createElement(AButtonMenu, {
|
174
167
|
buttons: buttons,
|
175
168
|
size: buttonSize,
|
176
169
|
className: menuOptionsClass
|
177
|
-
}) : /*#__PURE__*/
|
170
|
+
}) : /*#__PURE__*/React.createElement(AButtonSet, {
|
178
171
|
className: "".concat(blockClass, "__button-container"),
|
179
172
|
size: buttonSize,
|
180
173
|
buttons: buttons
|
@@ -184,30 +177,30 @@ ButtonSetWithOverflow.propTypes = {
|
|
184
177
|
/**
|
185
178
|
* buttonSetOverflowLabel - used when button set is shown as combo button
|
186
179
|
*/
|
187
|
-
buttonSetOverflowLabel: index
|
180
|
+
buttonSetOverflowLabel: index.default.node.isRequired,
|
188
181
|
/**
|
189
182
|
* Specifies the buttons for the ButtonSetWithOverflow. Each item is specified as an object
|
190
183
|
* with the properties of a Carbon Button plus a label.
|
191
184
|
*
|
192
185
|
* Carbon Button API https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
193
186
|
*/
|
194
|
-
buttons: index
|
187
|
+
buttons: index.default.array.isRequired,
|
195
188
|
/**
|
196
189
|
* className
|
197
190
|
*/
|
198
|
-
className: index
|
191
|
+
className: index.default.string,
|
199
192
|
/**
|
200
193
|
* class name applied to the overflow options
|
201
194
|
*/
|
202
|
-
menuOptionsClass: index
|
195
|
+
menuOptionsClass: index.default.string,
|
203
196
|
/**
|
204
197
|
* onResize reports maxSize on resize
|
205
198
|
*/
|
206
|
-
onWidthChange: index
|
199
|
+
onWidthChange: index.default.func,
|
207
200
|
/**
|
208
201
|
* align buttons to right of available space
|
209
202
|
*/
|
210
|
-
rightAlign: index
|
203
|
+
rightAlign: index.default.bool
|
211
204
|
};
|
212
205
|
ButtonSetWithOverflow.displayName = componentName;
|
213
206
|
|