@carbon/ibm-products 1.73.0 → 1.73.2
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/css/index-full-carbon.css +34 -53
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -14
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +25 -40
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -12
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +27 -47
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -14
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +31 -51
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -14
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyDownloader.js +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +3 -3
- package/es/components/AboutModal/AboutModal.js +2 -2
- package/es/components/ActionBar/ActionBar.js +4 -4
- package/es/components/ActionBar/ActionBarItem.js +2 -2
- package/es/components/ActionSet/ActionSet.js +5 -6
- package/es/components/AddSelect/AddSelectBody.js +4 -4
- package/es/components/AddSelect/AddSelectColumn.js +5 -4
- package/es/components/AddSelect/AddSelectFilter.js +2 -2
- package/es/components/AddSelect/AddSelectList.js +2 -3
- package/es/components/AddSelect/AddSelectSidebar.js +1 -1
- package/es/components/AddSelect/add-select-utils.js +7 -6
- package/es/components/AddSelect/hooks/usePath.js +2 -2
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -5
- package/es/components/ButtonMenu/ButtonMenu.js +0 -1
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +5 -5
- package/es/components/Card/Card.js +3 -4
- package/es/components/Card/CardHeader.js +1 -2
- package/es/components/Cascade/Cascade.js +2 -2
- package/es/components/Coachmark/Coachmark.js +1 -1
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +2 -3
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -2
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +1 -1
- package/es/components/ComboButton/ComboButton.js +2 -2
- package/es/components/CreateFullPage/CreateFullPageStep.js +3 -4
- package/es/components/CreateInfluencer/CreateInfluencer.js +0 -1
- package/es/components/CreateModal/CreateModal.js +1 -1
- package/es/components/CreateSidePanel/CreateSidePanel.js +2 -2
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +3 -4
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +3 -5
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +7 -8
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +4 -5
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +2 -3
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +5 -5
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +4 -4
- package/es/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +4 -4
- package/es/components/DataSpreadsheet/utils/createActiveCellFn.js +1 -2
- package/es/components/DataSpreadsheet/utils/createCellSelectionArea.js +0 -1
- package/es/components/DataSpreadsheet/utils/generateData.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +4 -4
- package/es/components/DataSpreadsheet/utils/handleEditSubmit.js +2 -4
- package/es/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +2 -2
- package/es/components/DataSpreadsheet/utils/selectAllCells.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -2
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +4 -5
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridRow.js +15 -16
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +2 -3
- package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +3 -4
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +11 -11
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +11 -11
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +3 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +0 -2
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +5 -5
- package/es/components/Datagrid/Datagrid.stories/common.js +5 -5
- package/es/components/Datagrid/useActionsColumn.js +3 -5
- package/es/components/Datagrid/useColumnCenterAlign.js +2 -2
- package/es/components/Datagrid/useColumnRightAlign.js +2 -2
- package/es/components/Datagrid/useCustomizeColumns.js +2 -2
- package/es/components/Datagrid/useDatagrid.js +2 -2
- package/es/components/Datagrid/useDefaultStringRenderer.js +2 -2
- package/es/components/Datagrid/useDisableSelectRows.js +4 -4
- package/es/components/Datagrid/useExpandedRow.js +2 -2
- package/es/components/Datagrid/useFiltering.js +7 -8
- package/es/components/Datagrid/useFloatingScroll.js +1 -1
- package/es/components/Datagrid/useInitialColumnSort.js +1 -1
- package/es/components/Datagrid/useInlineEdit.js +2 -2
- package/es/components/Datagrid/useNestedRowExpander.js +3 -4
- package/es/components/Datagrid/useNestedRows.js +1 -2
- package/es/components/Datagrid/useRowExpander.js +2 -2
- package/es/components/Datagrid/useRowIsMouseOver.js +2 -2
- package/es/components/Datagrid/useRowRenderer.js +3 -3
- package/es/components/Datagrid/useRowSize.js +2 -2
- package/es/components/Datagrid/useSelectRows.js +4 -5
- package/es/components/Datagrid/useSortableColumns.js +3 -4
- package/es/components/Datagrid/useStickyColumn.js +5 -7
- package/es/components/Datagrid/utils/DatagridPagination.js +0 -1
- package/es/components/Datagrid/utils/filterPropsForTesting.js +2 -3
- package/es/components/Datagrid/utils/makeData.js +5 -5
- package/es/components/EditInPlace/EditInPlace.js +2 -2
- package/es/components/EditSidePanel/EditSidePanel.js +2 -2
- package/es/components/EditTearsheet/EditTearsheetForm.js +1 -2
- package/es/components/EmptyStates/EmptyState.js +2 -2
- package/es/components/EmptyStates/EmptyStateContent.js +2 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -2
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +2 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -2
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -2
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -2
- package/es/components/ExampleComponent/ExampleComponent.js +2 -2
- package/es/components/ExportModal/ExportModal.js +5 -5
- package/es/components/FilterSummary/FilterSummary.js +3 -3
- package/es/components/HTTPErrors/HTTPErrorContent.js +2 -2
- package/es/components/ImportModal/ImportModal.js +3 -3
- package/es/components/InlineEdit/InlineEdit.js +2 -2
- package/es/components/InlineEditV1/InlineEditV1.js +5 -4
- package/es/components/InlineEditV2/InlineEditV2.js +3 -4
- package/es/components/InlineTip/utils.js +6 -5
- package/es/components/InterstitialScreen/InterstitialScreen.js +4 -5
- package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +0 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +2 -3
- package/es/components/PageHeader/PageHeader.js +11 -13
- package/es/components/PageHeader/PageHeaderUtils.js +2 -2
- package/es/components/ProductiveCard/ProductiveCard.js +2 -2
- package/es/components/RemoveModal/RemoveModal.js +2 -2
- package/es/components/Saving/Saving.js +6 -6
- package/es/components/SidePanel/SidePanel.js +17 -18
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +2 -2
- package/es/components/TagSet/TagSet.js +4 -4
- package/es/components/TagSet/TagSetModal.js +5 -5
- package/es/components/TagSet/TagSetOverflow.js +1 -2
- package/es/components/Tearsheet/Tearsheet.js +2 -2
- package/es/components/Tearsheet/TearsheetNarrow.js +2 -2
- package/es/components/Tearsheet/TearsheetShell.js +10 -11
- package/es/components/WebTerminal/WebTerminal.js +3 -4
- package/es/global/js/hooks/useCreateComponentFocus.js +1 -1
- package/es/global/js/hooks/useCreateComponentStepChange.js +3 -3
- package/es/global/js/hooks/useFocus.js +4 -4
- package/es/global/js/hooks/useWindowResize.js +2 -2
- package/es/global/js/package-settings.js +2 -3
- package/es/global/js/utils/Wrap.js +3 -3
- package/es/global/js/utils/deepCloneObject.js +4 -3
- package/es/global/js/utils/getNodeTextContent.js +6 -5
- package/es/global/js/utils/motionConstants.js +0 -1
- package/es/global/js/utils/props-helper.js +3 -3
- package/es/global/js/utils/scrollableAncestor.js +3 -3
- package/es/global/js/utils/story-helper.js +1 -1
- package/es/global/js/utils/test-helper.js +1 -1
- package/es/global/js/utils/unwrap-if-fragment.js +6 -6
- package/lib/components/APIKeyModal/APIKeyDownloader.js +4 -5
- package/lib/components/APIKeyModal/APIKeyModal.js +12 -8
- package/lib/components/AboutModal/AboutModal.js +14 -6
- package/lib/components/ActionBar/ActionBar.js +16 -9
- package/lib/components/ActionBar/ActionBarItem.js +12 -5
- package/lib/components/ActionBar/ActionBarOverflowItems.js +3 -4
- package/lib/components/ActionSet/ActionSet.js +15 -8
- package/lib/components/ActionSet/actions.js +4 -7
- package/lib/components/AddSelect/AddSelect.js +9 -5
- package/lib/components/AddSelect/AddSelectBody.js +13 -9
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +1 -2
- package/lib/components/AddSelect/AddSelectColumn.js +12 -8
- package/lib/components/AddSelect/AddSelectFilter.js +10 -6
- package/lib/components/AddSelect/AddSelectList.js +3 -5
- package/lib/components/AddSelect/AddSelectMetaPanel.js +3 -4
- package/lib/components/AddSelect/AddSelectSidebar.js +8 -4
- package/lib/components/AddSelect/AddSelectSort.js +1 -2
- package/lib/components/AddSelect/add-select-utils.js +10 -14
- 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 +8 -4
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +16 -10
- package/lib/components/ButtonMenu/ButtonMenu.js +10 -3
- package/lib/components/ButtonMenu/ButtonMenuItem.js +1 -2
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +13 -9
- package/lib/components/Card/Card.js +12 -9
- package/lib/components/Card/CardFooter.js +1 -2
- package/lib/components/Card/CardHeader.js +2 -4
- package/lib/components/Carousel/Carousel.js +9 -4
- package/lib/components/Carousel/CarouselItem.js +8 -2
- package/lib/components/Cascade/Cascade.js +11 -7
- package/lib/components/Checklist/Checklist.js +19 -4
- package/lib/components/Checklist/ChecklistChart.js +15 -2
- package/lib/components/Checklist/ChecklistIcon.js +17 -2
- package/lib/components/Coachmark/Coachmark.js +10 -5
- package/lib/components/Coachmark/CoachmarkDragbar.js +11 -4
- package/lib/components/Coachmark/CoachmarkHeader.js +9 -2
- package/lib/components/Coachmark/CoachmarkOverlay.js +11 -4
- package/lib/components/Coachmark/CoachmarkTagline.js +9 -2
- package/lib/components/Coachmark/utils/constants.js +2 -3
- package/lib/components/Coachmark/utils/context.js +3 -5
- package/lib/components/Coachmark/utils/enums.js +4 -7
- package/lib/components/Coachmark/utils/hooks.js +2 -3
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +11 -5
- package/lib/components/CoachmarkButton/CoachmarkButton.js +9 -2
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +12 -6
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +9 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +11 -4
- package/lib/components/CoachmarkStack/CoachmarkStack.js +9 -4
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +10 -5
- package/lib/components/ComboButton/ComboButton.js +11 -6
- package/lib/components/ComboButton/ComboButtonItem/index.js +1 -2
- package/lib/components/CreateFullPage/CreateFullPage.js +14 -8
- package/lib/components/CreateFullPage/CreateFullPageStep.js +12 -8
- package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -3
- package/lib/components/CreateModal/CreateModal.js +10 -3
- package/lib/components/CreateSidePanel/CreateSidePanel.js +12 -4
- package/lib/components/CreateTearsheet/CreateTearsheet.js +11 -8
- package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +9 -4
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +12 -8
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +11 -5
- package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +4 -5
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +10 -3
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +14 -9
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +15 -12
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +12 -9
- 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 +4 -6
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +7 -8
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +11 -7
- 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 +6 -7
- package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +3 -5
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +2 -4
- package/lib/components/DataSpreadsheet/utils/generateData.js +4 -5
- 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 +9 -5
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -7
- package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +9 -7
- package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +4 -5
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +11 -9
- 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 +9 -5
- package/lib/components/Datagrid/Datagrid/Datagrid.js +7 -2
- package/lib/components/Datagrid/Datagrid/DatagridBody.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +4 -6
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -2
- 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 +12 -9
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -18
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +11 -6
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +10 -7
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +2 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +9 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +10 -6
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +8 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +9 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +4 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -8
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +12 -10
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +15 -30
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +19 -15
- 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 +3 -5
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +19 -15
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +11 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +10 -6
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +12 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +10 -5
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +3 -6
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +16 -16
- 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 +9 -12
- package/lib/components/Datagrid/common-column-ids.js +1 -2
- package/lib/components/Datagrid/useActionsColumn.js +10 -7
- package/lib/components/Datagrid/useColumnCenterAlign.js +8 -4
- package/lib/components/Datagrid/useColumnOrder.js +1 -2
- package/lib/components/Datagrid/useColumnRightAlign.js +8 -4
- package/lib/components/Datagrid/useCustomizeColumns.js +10 -6
- package/lib/components/Datagrid/useDatagrid.js +9 -4
- package/lib/components/Datagrid/useDefaultStringRenderer.js +9 -4
- package/lib/components/Datagrid/useDisableSelectRows.js +5 -6
- package/lib/components/Datagrid/useEditableCell.js +1 -2
- package/lib/components/Datagrid/useExpandedRow.js +8 -4
- package/lib/components/Datagrid/useFiltering.js +13 -10
- package/lib/components/Datagrid/useFlexResize.js +1 -2
- package/lib/components/Datagrid/useFloatingScroll.js +2 -3
- package/lib/components/Datagrid/useFocusRowExpander.js +2 -3
- package/lib/components/Datagrid/useInfiniteScroll.js +1 -2
- package/lib/components/Datagrid/useInitialColumnSort.js +3 -4
- package/lib/components/Datagrid/useInlineEdit.js +5 -6
- package/lib/components/Datagrid/useNestedRowExpander.js +11 -8
- package/lib/components/Datagrid/useNestedRows.js +2 -4
- 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 +10 -6
- package/lib/components/Datagrid/useRowIsMouseOver.js +9 -4
- package/lib/components/Datagrid/useRowRenderer.js +4 -5
- package/lib/components/Datagrid/useRowSize.js +9 -4
- package/lib/components/Datagrid/useSelectAllToggle.js +3 -4
- package/lib/components/Datagrid/useSelectRows.js +12 -9
- package/lib/components/Datagrid/useSkeletonRows.js +1 -2
- package/lib/components/Datagrid/useSortableColumns.js +10 -8
- package/lib/components/Datagrid/useStickyColumn.js +11 -9
- package/lib/components/Datagrid/utils/DatagridActions.js +4 -5
- package/lib/components/Datagrid/utils/DatagridPagination.js +2 -4
- package/lib/components/Datagrid/utils/Wrapper.js +2 -3
- package/lib/components/Datagrid/utils/filterPropsForTesting.js +5 -8
- 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/handleFilterTagLabelText.js +2 -3
- package/lib/components/Datagrid/utils/makeData.js +13 -11
- package/lib/components/EditFullPage/EditFullPage.js +9 -2
- package/lib/components/EditInPlace/EditInPlace.js +11 -6
- package/lib/components/EditSidePanel/EditSidePanel.js +12 -4
- package/lib/components/EditTearsheet/EditTearsheet.js +11 -8
- package/lib/components/EditTearsheet/EditTearsheetForm.js +10 -6
- package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +4 -5
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +9 -2
- package/lib/components/EditUpdateCards/EditUpdateCards.js +9 -2
- package/lib/components/EmptyStates/EmptyState.js +12 -6
- package/lib/components/EmptyStates/EmptyStateContent.js +10 -4
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +11 -4
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +11 -4
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +11 -4
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +11 -4
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +11 -4
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +11 -4
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +9 -2
- package/lib/components/ExampleComponent/ExampleComponent.js +14 -6
- package/lib/components/ExampleComponent/useExample.js +1 -2
- package/lib/components/ExportModal/ExportModal.js +14 -10
- package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -4
- package/lib/components/FilterSummary/FilterSummary.js +12 -7
- package/lib/components/Guidebanner/Guidebanner.js +11 -4
- package/lib/components/Guidebanner/GuidebannerElement.js +9 -2
- package/lib/components/Guidebanner/GuidebannerElementButton.js +9 -2
- package/lib/components/Guidebanner/GuidebannerElementLink.js +9 -2
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +9 -2
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +9 -2
- package/lib/components/HTTPErrors/HTTPErrorContent.js +10 -4
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +9 -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.js +12 -8
- package/lib/components/InlineEdit/InlineEdit.js +11 -6
- package/lib/components/InlineEditV1/InlineEditV1.js +18 -8
- package/lib/components/InlineEditV2/InlineEditV2.js +13 -10
- package/lib/components/InlineTip/InlineTip.js +11 -4
- package/lib/components/InlineTip/InlineTipButton.js +9 -2
- package/lib/components/InlineTip/InlineTipLink.js +9 -2
- package/lib/components/InlineTip/utils.js +5 -6
- package/lib/components/InterstitialScreen/InterstitialScreen.js +15 -9
- package/lib/components/InterstitialScreen/assets/index.js +4 -8
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +9 -2
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +9 -3
- package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +1 -2
- package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +1 -2
- package/lib/components/ModifiedTabs/ModifiedTabs.js +3 -4
- package/lib/components/MultiAddSelect/MultiAddSelect.js +3 -4
- package/lib/components/NonLinearReading/NonLinearReading.js +9 -4
- package/lib/components/NotificationsPanel/NotificationsPanel.js +14 -7
- 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 +12 -4
- package/lib/components/PageHeader/PageHeader.js +21 -20
- package/lib/components/PageHeader/PageHeaderDemo.data.js +3 -4
- package/lib/components/PageHeader/PageHeaderTitle.js +2 -4
- package/lib/components/PageHeader/PageHeaderUtils.js +12 -11
- package/lib/components/ProductiveCard/ProductiveCard.js +11 -7
- package/lib/components/RemoveModal/RemoveModal.js +11 -7
- package/lib/components/Saving/Saving.js +15 -10
- package/lib/components/SidePanel/SidePanel.js +29 -22
- package/lib/components/SidePanel/constants.js +2 -3
- package/lib/components/SidePanel/motion/variants.js +3 -5
- package/lib/components/SingleAddSelect/SingleAddSelect.js +3 -4
- package/lib/components/StatusIcon/StatusIcon.js +7 -2
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +13 -6
- package/lib/components/SteppedAnimatedMedia/assets/index.js +3 -6
- package/lib/components/TagSet/TagSet.js +15 -13
- package/lib/components/TagSet/TagSetModal.js +14 -10
- package/lib/components/TagSet/TagSetOverflow.js +10 -7
- package/lib/components/Tearsheet/Tearsheet.js +13 -6
- package/lib/components/Tearsheet/TearsheetNarrow.js +13 -6
- package/lib/components/Tearsheet/TearsheetShell.js +26 -23
- package/lib/components/Toolbar/Toolbar.js +12 -10
- package/lib/components/Toolbar/ToolbarButton.js +10 -6
- package/lib/components/Toolbar/ToolbarGroup.js +9 -4
- package/lib/components/UserProfileImage/UserProfileImage.js +10 -2
- package/lib/components/WebTerminal/WebTerminal.js +15 -8
- package/lib/components/WebTerminal/WebTerminalContentWrapper.js +9 -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 +11 -2
- 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 +3 -4
- package/lib/global/js/hooks/useCreateComponentStepChange.js +5 -6
- package/lib/global/js/hooks/useFocus.js +6 -7
- package/lib/global/js/hooks/useIsomorphicEffect.js +1 -2
- package/lib/global/js/hooks/usePrefix.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/useRetrieveStepData.js +2 -3
- package/lib/global/js/hooks/useValidCreateStepCount.js +2 -3
- package/lib/global/js/hooks/useWindowResize.js +4 -5
- package/lib/global/js/package-settings.js +9 -6
- package/lib/global/js/utils/ClickListener.js +3 -4
- package/lib/global/js/utils/DisplayBox.js +1 -2
- package/lib/global/js/utils/Wrap.js +12 -5
- package/lib/global/js/utils/deepCloneObject.js +3 -4
- 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 +5 -6
- 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 +3 -5
- package/lib/global/js/utils/pconsole.js +8 -15
- package/lib/global/js/utils/props-helper.js +15 -17
- package/lib/global/js/utils/rangeWithCallback.js +2 -3
- package/lib/global/js/utils/scrollableAncestor.js +5 -6
- package/lib/global/js/utils/story-helper.js +7 -12
- package/lib/global/js/utils/test-helper.js +15 -28
- package/lib/global/js/utils/unwrap-if-fragment.js +7 -8
- 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 +4 -4
- package/scss/components/AboutModal/_about-modal.scss +1 -2
- package/scss/components/Coachmark/styles/_coachmark-tagline.scss +1 -4
- package/scss/components/Datagrid/styles/_datagrid.scss +1 -2
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +1 -0
- package/scss/components/SidePanel/_side-panel.scss +1 -4
@@ -17,7 +17,7 @@ var _wait = _interopRequireDefault(require("../utils/wait"));
|
|
17
17
|
*/
|
18
18
|
|
19
19
|
// Focus the first focusable element and call the onMount prop for the current step if one is provided
|
20
|
-
var useCreateComponentFocus = function useCreateComponentFocus(_ref) {
|
20
|
+
var useCreateComponentFocus = exports.useCreateComponentFocus = function useCreateComponentFocus(_ref) {
|
21
21
|
var previousState = _ref.previousState,
|
22
22
|
currentStep = _ref.currentStep,
|
23
23
|
blockClass = _ref.blockClass,
|
@@ -31,7 +31,7 @@ var useCreateComponentFocus = function useCreateComponentFocus(_ref) {
|
|
31
31
|
(0, _react.useEffect)(function () {
|
32
32
|
// because of how handleStackChange.claimFocus in TearsheetShell works a timeout is required to focus on specific elements
|
33
33
|
var awaitFocus = /*#__PURE__*/function () {
|
34
|
-
var _ref2 = (0, _asyncToGenerator2.default)(
|
34
|
+
var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(elm) {
|
35
35
|
return _regenerator.default.wrap(function _callee$(_context) {
|
36
36
|
while (1) switch (_context.prev = _context.next) {
|
37
37
|
case 0:
|
@@ -58,5 +58,4 @@ var useCreateComponentFocus = function useCreateComponentFocus(_ref) {
|
|
58
58
|
}
|
59
59
|
}
|
60
60
|
}, [currentStep, previousState, blockClass, onMount, firstFocusElement]);
|
61
|
-
};
|
62
|
-
exports.useCreateComponentFocus = useCreateComponentFocus;
|
61
|
+
};
|
@@ -15,7 +15,7 @@ var _react = require("react");
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
16
16
|
*/
|
17
17
|
|
18
|
-
var useCreateComponentStepChange = function useCreateComponentStepChange(_ref) {
|
18
|
+
var useCreateComponentStepChange = exports.useCreateComponentStepChange = function useCreateComponentStepChange(_ref) {
|
19
19
|
var firstIncludedStep = _ref.firstIncludedStep,
|
20
20
|
lastIncludedStep = _ref.lastIncludedStep,
|
21
21
|
stepData = _ref.stepData,
|
@@ -48,7 +48,7 @@ var useCreateComponentStepChange = function useCreateComponentStepChange(_ref) {
|
|
48
48
|
onClose();
|
49
49
|
};
|
50
50
|
var handleOnRequestSubmit = /*#__PURE__*/function () {
|
51
|
-
var _ref2 = (0, _asyncToGenerator2.default)(
|
51
|
+
var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
52
52
|
return _regenerator.default.wrap(function _callee$(_context) {
|
53
53
|
while (1) switch (_context.prev = _context.next) {
|
54
54
|
case 0:
|
@@ -75,7 +75,7 @@ var useCreateComponentStepChange = function useCreateComponentStepChange(_ref) {
|
|
75
75
|
};
|
76
76
|
}();
|
77
77
|
var handleNext = /*#__PURE__*/function () {
|
78
|
-
var _ref3 = (0, _asyncToGenerator2.default)(
|
78
|
+
var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
79
79
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
80
80
|
while (1) switch (_context2.prev = _context2.next) {
|
81
81
|
case 0:
|
@@ -112,7 +112,7 @@ var useCreateComponentStepChange = function useCreateComponentStepChange(_ref) {
|
|
112
112
|
};
|
113
113
|
}();
|
114
114
|
var handleSubmit = /*#__PURE__*/function () {
|
115
|
-
var _ref4 = (0, _asyncToGenerator2.default)(
|
115
|
+
var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
116
116
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
117
117
|
while (1) switch (_context3.prev = _context3.next) {
|
118
118
|
case 0:
|
@@ -207,5 +207,4 @@ var useCreateComponentStepChange = function useCreateComponentStepChange(_ref) {
|
|
207
207
|
return prev;
|
208
208
|
});
|
209
209
|
}, [setCurrentStep, setIsSubmitting, stepData]);
|
210
|
-
};
|
211
|
-
exports.useCreateComponentStepChange = useCreateComponentStepChange;
|
210
|
+
};
|
@@ -13,7 +13,7 @@ var _react = require("react");
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
14
14
|
*/
|
15
15
|
|
16
|
-
var useFocus = function useFocus(modalRef) {
|
16
|
+
var useFocus = exports.useFocus = function useFocus(modalRef) {
|
17
17
|
var tearsheetBaseClass = "".concat(_settings.pkg.prefix, "--tearsheet");
|
18
18
|
// Querying focusable element in the modal
|
19
19
|
// Query to exclude hidden elements in the modal from querySelectorAll() method
|
@@ -28,9 +28,9 @@ var useFocus = function useFocus(modalRef) {
|
|
28
28
|
// Final query
|
29
29
|
var query = "".concat(queryButton, ",").concat(queryLink, ",").concat(queryInput, ",").concat(querySelect, ",").concat(queryTextarea);
|
30
30
|
var getFocusable = (0, _react.useCallback)(function () {
|
31
|
-
var _modalRef$current
|
31
|
+
var _modalRef$current;
|
32
32
|
// Selecting all focusable elements based on the above conditions
|
33
|
-
var focusableElements = modalRef === null || modalRef === void 0
|
33
|
+
var focusableElements = modalRef === null || modalRef === void 0 || (_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 || (_modalRef$current = _modalRef$current.innerModal) === null || _modalRef$current === void 0 || (_modalRef$current = _modalRef$current.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.querySelectorAll("".concat(query));
|
34
34
|
var first = focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements[0];
|
35
35
|
var last = focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements[(focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) - 1];
|
36
36
|
var all = focusableElements;
|
@@ -58,12 +58,12 @@ var useFocus = function useFocus(modalRef) {
|
|
58
58
|
// Prevents the default "Tab" behavior
|
59
59
|
event.preventDefault();
|
60
60
|
// if the user press shift+tab and the current element not in focusable items
|
61
|
-
last === null || last === void 0
|
61
|
+
last === null || last === void 0 || last.focus();
|
62
62
|
} else if (!Array.prototype.includes.call(all, (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.activeElement)) {
|
63
63
|
event.preventDefault();
|
64
64
|
// user pressing tab key only then
|
65
65
|
// focusing the first element if the current element is not in focusable items
|
66
|
-
first === null || first === void 0
|
66
|
+
first === null || first === void 0 || first.focus();
|
67
67
|
}
|
68
68
|
}, 0);
|
69
69
|
}
|
@@ -75,5 +75,4 @@ var useFocus = function useFocus(modalRef) {
|
|
75
75
|
keyDownListener: handleKeyDown,
|
76
76
|
getFocusable: getFocusable
|
77
77
|
};
|
78
|
-
};
|
79
|
-
exports.useFocus = useFocus;
|
78
|
+
};
|
@@ -14,5 +14,4 @@ var _react = require("react");
|
|
14
14
|
|
15
15
|
// Originally from `@carbon/react`, https://github.com/carbon-design-system/carbon/blob/main/packages/react/src/internal/useIsomorphicEffect.js
|
16
16
|
// useLayoutEffect on the client, useEffect on the server
|
17
|
-
var useIsomorphicEffect = typeof window !== 'undefined' ? _react.useLayoutEffect : _react.useEffect;
|
18
|
-
exports.useIsomorphicEffect = useIsomorphicEffect;
|
17
|
+
var useIsomorphicEffect = exports.useIsomorphicEffect = typeof window !== 'undefined' ? _react.useLayoutEffect : _react.useEffect;
|
@@ -13,7 +13,6 @@ var _packageSettings = _interopRequireDefault(require("../package-settings"));
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
14
14
|
*/
|
15
15
|
|
16
|
-
var usePrefix = function usePrefix() {
|
16
|
+
var usePrefix = exports.usePrefix = function usePrefix() {
|
17
17
|
return _packageSettings.default.prefix;
|
18
|
-
};
|
19
|
-
exports.usePrefix = usePrefix;
|
18
|
+
};
|
@@ -16,11 +16,10 @@ var _react = require("react");
|
|
16
16
|
* Returns the previous state values included in the param
|
17
17
|
* @param {object} value
|
18
18
|
*/
|
19
|
-
var usePreviousValue = function usePreviousValue(value) {
|
19
|
+
var usePreviousValue = exports.usePreviousValue = function usePreviousValue(value) {
|
20
20
|
var ref = (0, _react.useRef)();
|
21
21
|
(0, _react.useEffect)(function () {
|
22
22
|
ref.current = value;
|
23
23
|
});
|
24
24
|
return ref.current;
|
25
|
-
};
|
26
|
-
exports.usePreviousValue = usePreviousValue;
|
25
|
+
};
|
@@ -25,7 +25,7 @@ var _getNumberOfHiddenSteps = require("../utils/getNumberOfHiddenSteps");
|
|
25
25
|
* @param {number} useResetCreateComponent.totalSteps
|
26
26
|
* @param {string} useResetCreateComponent.componentName
|
27
27
|
*/
|
28
|
-
var useResetCreateComponent = function useResetCreateComponent(_ref) {
|
28
|
+
var useResetCreateComponent = exports.useResetCreateComponent = function useResetCreateComponent(_ref) {
|
29
29
|
var firstIncludedStep = _ref.firstIncludedStep,
|
30
30
|
previousState = _ref.previousState,
|
31
31
|
open = _ref.open,
|
@@ -50,5 +50,4 @@ var useResetCreateComponent = function useResetCreateComponent(_ref) {
|
|
50
50
|
}
|
51
51
|
}
|
52
52
|
}, [firstIncludedStep, open, previousState, setCurrentStep, initialStep, totalSteps, componentName, stepData]);
|
53
|
-
};
|
54
|
-
exports.useResetCreateComponent = useResetCreateComponent;
|
53
|
+
};
|
@@ -14,7 +14,7 @@ var _react = require("react");
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
15
15
|
*/
|
16
16
|
|
17
|
-
var useResizeObserver = function useResizeObserver(ref, callback) {
|
17
|
+
var useResizeObserver = exports.useResizeObserver = function useResizeObserver(ref, callback) {
|
18
18
|
var _useState = (0, _react.useState)(-1),
|
19
19
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
20
20
|
width = _useState2[0],
|
@@ -81,5 +81,4 @@ var useResizeObserver = function useResizeObserver(ref, callback) {
|
|
81
81
|
width: width,
|
82
82
|
height: height
|
83
83
|
};
|
84
|
-
};
|
85
|
-
exports.useResizeObserver = useResizeObserver;
|
84
|
+
};
|
@@ -25,7 +25,7 @@ var _react = require("react");
|
|
25
25
|
* @param {string} useResetCreateComponent.secondaryLabel
|
26
26
|
* @param {string} useResetCreateComponent.title
|
27
27
|
*/
|
28
|
-
var useRetrieveStepData = function useRetrieveStepData(_ref) {
|
28
|
+
var useRetrieveStepData = exports.useRetrieveStepData = function useRetrieveStepData(_ref) {
|
29
29
|
var stepsContext = _ref.stepsContext,
|
30
30
|
stepNumber = _ref.stepNumber,
|
31
31
|
introStep = _ref.introStep,
|
@@ -51,5 +51,4 @@ var useRetrieveStepData = function useRetrieveStepData(_ref) {
|
|
51
51
|
});
|
52
52
|
}
|
53
53
|
}, [shouldIncludeStep, title, secondaryLabel, introStep, stepsContext, stepNumber]);
|
54
|
-
};
|
55
|
-
exports.useRetrieveStepData = useRetrieveStepData;
|
54
|
+
};
|
@@ -17,11 +17,10 @@ var _react = require("react");
|
|
17
17
|
* @param {number} stepCount
|
18
18
|
* @param {string} componentName
|
19
19
|
*/
|
20
|
-
var useValidCreateStepCount = function useValidCreateStepCount(stepCount, componentName) {
|
20
|
+
var useValidCreateStepCount = exports.useValidCreateStepCount = function useValidCreateStepCount(stepCount, componentName) {
|
21
21
|
(0, _react.useEffect)(function () {
|
22
22
|
if (stepCount === 1) {
|
23
23
|
console.warn("".concat(componentName, ": ").concat(componentName, "s with one step are not permitted. If you require only one step, please use either the CreateTearsheetNarrow, CreateSidePanel, or CreateModal components."));
|
24
24
|
}
|
25
25
|
}, [stepCount, componentName]);
|
26
|
-
};
|
27
|
-
exports.useValidCreateStepCount = useValidCreateStepCount;
|
26
|
+
};
|
@@ -8,8 +8,8 @@ exports.useWindowResize = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
10
10
|
var _react = require("react");
|
11
|
-
function ownKeys(
|
12
|
-
function _objectSpread(
|
11
|
+
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; }
|
12
|
+
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) { (0, _defineProperty2.default)(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; }
|
13
13
|
var windowExists = (typeof window === "undefined" ? "undefined" : (0, _typeof2.default)(window)) !== "undefined";
|
14
14
|
var getWindowSize = function getWindowSize() {
|
15
15
|
if (!windowExists) {
|
@@ -32,7 +32,7 @@ var getWindowSize = function getWindowSize() {
|
|
32
32
|
outerWidth: outerWidth
|
33
33
|
};
|
34
34
|
};
|
35
|
-
var useWindowResize = function useWindowResize(effect, deps) {
|
35
|
+
var useWindowResize = exports.useWindowResize = function useWindowResize(effect, deps) {
|
36
36
|
var throttleInterval = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
37
37
|
var windowSize = (0, _react.useRef)({});
|
38
38
|
var throttleTimeout = (0, _react.useRef)(null);
|
@@ -64,5 +64,4 @@ var useWindowResize = function useWindowResize(effect, deps) {
|
|
64
64
|
};
|
65
65
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
66
66
|
}, deps);
|
67
|
-
};
|
68
|
-
exports.useWindowResize = useWindowResize;
|
67
|
+
};
|
@@ -7,8 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.default = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
9
|
var _devtools = require("./utils/devtools");
|
10
|
-
function ownKeys(
|
11
|
-
function _objectSpread(
|
10
|
+
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; }
|
11
|
+
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) { (0, _defineProperty2.default)(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; } //
|
12
|
+
// Copyright IBM Corp. 2020, 2023
|
13
|
+
//
|
14
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
15
|
+
// LICENSE file in the root directory of this source tree.
|
16
|
+
//
|
12
17
|
var defaults = {
|
13
18
|
prefix: 'c4p',
|
14
19
|
// by default only released components are set to true
|
@@ -95,7 +100,6 @@ var defaults = {
|
|
95
100
|
|
96
101
|
/* new component flags here - comment used by generate CLI */
|
97
102
|
},
|
98
|
-
|
99
103
|
// feature level flags
|
100
104
|
feature: {
|
101
105
|
'a-new-feature': false,
|
@@ -167,7 +171,7 @@ var feature = new Proxy(_objectSpread({}, defaults.feature), {
|
|
167
171
|
return allFeatures((_target$property2 = target[property]) !== null && _target$property2 !== void 0 ? _target$property2 : false);
|
168
172
|
}
|
169
173
|
});
|
170
|
-
var _default = {
|
174
|
+
var _default = exports.default = {
|
171
175
|
devtoolsAttribute: _devtools.devtoolsAttribute,
|
172
176
|
getDevtoolsId: _devtools.getDevtoolsId,
|
173
177
|
prefix: defaults.prefix,
|
@@ -213,5 +217,4 @@ var _default = {
|
|
213
217
|
// as in internal test suites and storybook builds.
|
214
218
|
silent = value;
|
215
219
|
}
|
216
|
-
};
|
217
|
-
exports.default = _default;
|
220
|
+
};
|
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
exports.ClickListener = void 0;
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
11
|
-
function _getRequireWildcardCache(
|
12
|
-
function _interopRequireWildcard(
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
13
13
|
/**
|
14
14
|
* Copyright IBM Corp. 2021, 2021
|
15
15
|
*
|
@@ -26,7 +26,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
26
26
|
* given `children` element. Adapted from carbon-react internal utilities, converted
|
27
27
|
* to use React hooks.
|
28
28
|
*/
|
29
|
-
var ClickListener = function ClickListener(_ref) {
|
29
|
+
var ClickListener = exports.ClickListener = function ClickListener(_ref) {
|
30
30
|
var children = _ref.children,
|
31
31
|
onClickOutside = _ref.onClickOutside;
|
32
32
|
var targetElement = (0, _react.useRef)();
|
@@ -69,7 +69,6 @@ var ClickListener = function ClickListener(_ref) {
|
|
69
69
|
ref: handleRef
|
70
70
|
});
|
71
71
|
};
|
72
|
-
exports.ClickListener = ClickListener;
|
73
72
|
ClickListener.propTypes = {
|
74
73
|
children: _propTypes.default.element.isRequired,
|
75
74
|
onClickOutside: _propTypes.default.func.isRequired
|
@@ -16,7 +16,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
16
|
*/
|
17
17
|
|
18
18
|
var blockClass = 'ccs-sb--display-box';
|
19
|
-
var DisplayBox = function DisplayBox(_ref) {
|
19
|
+
var DisplayBox = exports.DisplayBox = function DisplayBox(_ref) {
|
20
20
|
var children = _ref.children,
|
21
21
|
className = _ref.className,
|
22
22
|
msg = _ref.msg;
|
@@ -32,7 +32,6 @@ var DisplayBox = function DisplayBox(_ref) {
|
|
32
32
|
className: "".concat(blockClass, "__indicator--right")
|
33
33
|
})), children);
|
34
34
|
};
|
35
|
-
exports.DisplayBox = DisplayBox;
|
36
35
|
DisplayBox.propTypes = {
|
37
36
|
children: _propTypes.default.node,
|
38
37
|
className: _propTypes.default.string,
|
@@ -10,15 +10,23 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
12
12
|
var _excluded = ["alwaysRender", "children", "element", "neverRender"];
|
13
|
+
/**
|
14
|
+
* Copyright IBM Corp. 2021, 2021
|
15
|
+
*
|
16
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
18
|
+
*/
|
19
|
+
// Import portions of React that are needed.
|
20
|
+
// Other standard imports.
|
13
21
|
// Examine a flat array of children to decide whether it is effectively empty.
|
14
22
|
// If there are no children, or all the children are falsy, or all the non-falsy
|
15
23
|
// children are themselves Wrap components that are empty, then return true.
|
16
|
-
var
|
24
|
+
var _isEmpty = function isEmpty(children) {
|
17
25
|
var result = true;
|
18
26
|
_react.default.Children.forEach(children, function (child) {
|
19
27
|
if (child) {
|
20
28
|
var _child$type, _child$props;
|
21
|
-
result && (result = (child === null || child === void 0
|
29
|
+
result && (result = (child === null || child === void 0 || (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === 'Wrap' && _isEmpty(child === null || child === void 0 || (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.children));
|
22
30
|
}
|
23
31
|
});
|
24
32
|
return result;
|
@@ -39,18 +47,17 @@ var defaults = {
|
|
39
47
|
* the ref.current will be set to the wrapper element if it renders, and will
|
40
48
|
* remain undefined if it does not render.
|
41
49
|
*/
|
42
|
-
var Wrap = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
50
|
+
var Wrap = exports.Wrap = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
43
51
|
var alwaysRender = _ref.alwaysRender,
|
44
52
|
children = _ref.children,
|
45
53
|
_ref$element = _ref.element,
|
46
54
|
Wrapper = _ref$element === void 0 ? defaults.element : _ref$element,
|
47
55
|
neverRender = _ref.neverRender,
|
48
56
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
49
|
-
return (neverRender ||
|
57
|
+
return (neverRender || _isEmpty(children)) && !alwaysRender ? null : /*#__PURE__*/_react.default.createElement(Wrapper, (0, _extends2.default)({}, rest, {
|
50
58
|
ref: ref
|
51
59
|
}), children);
|
52
60
|
});
|
53
|
-
exports.Wrap = Wrap;
|
54
61
|
Wrap.displayName = 'Wrap';
|
55
62
|
Wrap.propTypes = {
|
56
63
|
/**
|
@@ -14,7 +14,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
14
14
|
*/
|
15
15
|
|
16
16
|
// Utility to return a deep clone of a nested object or array.
|
17
|
-
var deepCloneObject = function deepCloneObject(objectToClone) {
|
17
|
+
var _deepCloneObject = exports.deepCloneObject = function deepCloneObject(objectToClone) {
|
18
18
|
// Return the value if objectToClone is not an object
|
19
19
|
if ((0, _typeof2.default)(objectToClone) !== 'object' || objectToClone === null) {
|
20
20
|
return objectToClone;
|
@@ -24,8 +24,7 @@ var deepCloneObject = function deepCloneObject(objectToClone) {
|
|
24
24
|
for (var key in objectToClone) {
|
25
25
|
var value = objectToClone[key];
|
26
26
|
// Recursively check for nested objects/arrays
|
27
|
-
clonedObject[key] =
|
27
|
+
clonedObject[key] = _deepCloneObject(value);
|
28
28
|
}
|
29
29
|
return clonedObject;
|
30
|
-
};
|
31
|
-
exports.deepCloneObject = deepCloneObject;
|
30
|
+
};
|
@@ -16,8 +16,7 @@ var _packageSettings = _interopRequireDefault(require("../package-settings"));
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
17
17
|
*/
|
18
18
|
|
19
|
-
var devtoolsAttribute = 'data-carbon-devtools-id';
|
20
|
-
exports.devtoolsAttribute = devtoolsAttribute;
|
19
|
+
var devtoolsAttribute = exports.devtoolsAttribute = 'data-carbon-devtools-id';
|
21
20
|
function getDevtoolsId(componentName) {
|
22
21
|
return "".concat(_packageSettings.default.prefix, "--").concat(componentName);
|
23
22
|
}
|
@@ -12,7 +12,7 @@ var _motion = require("@carbon/motion");
|
|
12
12
|
* @param {string} mode - The carbon motion mode, either 'productive', or 'expressive'
|
13
13
|
*/
|
14
14
|
|
15
|
-
var getBezierValues = function getBezierValues(type, mode) {
|
15
|
+
var getBezierValues = exports.getBezierValues = function getBezierValues(type, mode) {
|
16
16
|
var cubicBezier = (0, _motion.motion)(type, mode);
|
17
17
|
var extractStringFromParens = /\(([^)]+)\)/;
|
18
18
|
var desiredBezierStrings = extractStringFromParens.exec(cubicBezier)[1];
|
@@ -21,5 +21,4 @@ var getBezierValues = function getBezierValues(type, mode) {
|
|
21
21
|
return formattedDesiredBezierStrings;
|
22
22
|
}
|
23
23
|
return [];
|
24
|
-
};
|
25
|
-
exports.getBezierValues = getBezierValues;
|
24
|
+
};
|
@@ -14,9 +14,8 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
14
14
|
*/
|
15
15
|
|
16
16
|
// Returns an array of focusable elements
|
17
|
-
var getFocusableElements = function getFocusableElements(element) {
|
17
|
+
var getFocusableElements = exports.getFocusableElements = function getFocusableElements(element) {
|
18
18
|
return (0, _toConsumableArray2.default)(element.querySelectorAll('a, button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])')).filter(function (e) {
|
19
19
|
return !e.hasAttribute('disabled');
|
20
20
|
});
|
21
|
-
};
|
22
|
-
exports.getFocusableElements = getFocusableElements;
|
21
|
+
};
|
@@ -27,7 +27,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
27
27
|
* @param {Node} node A React node
|
28
28
|
* @returns {string}
|
29
29
|
*/
|
30
|
-
var getNodeTextContent = function getNodeTextContent(node) {
|
30
|
+
var _getNodeTextContent = exports.getNodeTextContent = function getNodeTextContent(node) {
|
31
31
|
if (node == null) {
|
32
32
|
return '';
|
33
33
|
}
|
@@ -38,10 +38,10 @@ var getNodeTextContent = function getNodeTextContent(node) {
|
|
38
38
|
case 'object':
|
39
39
|
{
|
40
40
|
if (node instanceof Array) {
|
41
|
-
return node.map(
|
41
|
+
return node.map(_getNodeTextContent).join('');
|
42
42
|
}
|
43
43
|
if ('props' in node) {
|
44
|
-
return
|
44
|
+
return _getNodeTextContent(node.props.children);
|
45
45
|
}
|
46
46
|
|
47
47
|
// Ignore any other JavaScript 'object' types.
|
@@ -49,11 +49,10 @@ var getNodeTextContent = function getNodeTextContent(node) {
|
|
49
49
|
}
|
50
50
|
case 'function':
|
51
51
|
{
|
52
|
-
return
|
52
|
+
return _getNodeTextContent(node());
|
53
53
|
}
|
54
54
|
default:
|
55
55
|
// Ignore all other JavaScript types.
|
56
56
|
return '';
|
57
57
|
}
|
58
|
-
};
|
59
|
-
exports.getNodeTextContent = getNodeTextContent;
|
58
|
+
};
|
@@ -11,7 +11,7 @@ exports.getNumberOfHiddenSteps = void 0;
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
12
12
|
*/
|
13
13
|
|
14
|
-
var getNumberOfHiddenSteps = function getNumberOfHiddenSteps(stepData, initialStep) {
|
14
|
+
var getNumberOfHiddenSteps = exports.getNumberOfHiddenSteps = function getNumberOfHiddenSteps(stepData, initialStep) {
|
15
15
|
var numberOfHiddenSteps = 0;
|
16
16
|
stepData.forEach(function (step, stepIndex) {
|
17
17
|
if (stepIndex + 1 > initialStep) {
|
@@ -22,5 +22,4 @@ var getNumberOfHiddenSteps = function getNumberOfHiddenSteps(stepData, initialSt
|
|
22
22
|
}
|
23
23
|
});
|
24
24
|
return numberOfHiddenSteps;
|
25
|
-
};
|
26
|
-
exports.getNumberOfHiddenSteps = getNumberOfHiddenSteps;
|
25
|
+
};
|
@@ -11,12 +11,11 @@ exports.getScrollbarWidth = void 0;
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
12
12
|
*/
|
13
13
|
|
14
|
-
var getScrollbarWidth = function getScrollbarWidth() {
|
14
|
+
var getScrollbarWidth = exports.getScrollbarWidth = function getScrollbarWidth() {
|
15
15
|
var scrollDiv = document.createElement('div');
|
16
16
|
scrollDiv.setAttribute('style', 'width: 100px; height: 100px; overflow: scroll; position:absolute; top:-9999px;');
|
17
17
|
document.body.appendChild(scrollDiv);
|
18
18
|
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
19
19
|
document.body.removeChild(scrollDiv);
|
20
20
|
return scrollbarWidth;
|
21
|
-
};
|
22
|
-
exports.getScrollbarWidth = getScrollbarWidth;
|
21
|
+
};
|
@@ -19,7 +19,7 @@ exports.selectorTabbable = exports.selectorFocusable = exports.DOCUMENT_POSITION
|
|
19
19
|
* A flag `node.compareDocumentPosition(target)` returns,
|
20
20
|
* that indicates `target` is located earlier than `node` in the document or `target` contains `node`.
|
21
21
|
*/
|
22
|
-
var DOCUMENT_POSITION_BROAD_PRECEDING =
|
22
|
+
var DOCUMENT_POSITION_BROAD_PRECEDING = exports.DOCUMENT_POSITION_BROAD_PRECEDING =
|
23
23
|
// Checks `typeof Node` for `react-docgen`
|
24
24
|
typeof Node !== 'undefined' && Node.DOCUMENT_POSITION_PRECEDING | Node.DOCUMENT_POSITION_CONTAINS;
|
25
25
|
|
@@ -27,20 +27,16 @@ typeof Node !== 'undefined' && Node.DOCUMENT_POSITION_PRECEDING | Node.DOCUMENT_
|
|
27
27
|
* A flag `node.compareDocumentPosition(target)` returns,
|
28
28
|
* that indicates `target` is located later than `node` in the document or `node` contains `target`.
|
29
29
|
*/
|
30
|
-
exports.
|
31
|
-
var DOCUMENT_POSITION_BROAD_FOLLOWING =
|
30
|
+
var DOCUMENT_POSITION_BROAD_FOLLOWING = exports.DOCUMENT_POSITION_BROAD_FOLLOWING =
|
32
31
|
// Checks `typeof Node` for `react-docgen`
|
33
32
|
typeof Node !== 'undefined' && Node.DOCUMENT_POSITION_FOLLOWING | Node.DOCUMENT_POSITION_CONTAINED_BY;
|
34
33
|
|
35
34
|
/**
|
36
35
|
* CSS selector that selects major nodes that are sequential-focusable.
|
37
36
|
*/
|
38
|
-
exports.
|
39
|
-
var selectorTabbable = "\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]\n";
|
37
|
+
var selectorTabbable = exports.selectorTabbable = "\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]\n";
|
40
38
|
|
41
39
|
/**
|
42
40
|
* CSS selector that selects major nodes that are click focusable
|
43
41
|
*/
|
44
|
-
exports.
|
45
|
-
var selectorFocusable = "\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex]:not([disabled]), *[contenteditable=true]\n";
|
46
|
-
exports.selectorFocusable = selectorFocusable;
|
42
|
+
var selectorFocusable = exports.selectorFocusable = "\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex]:not([disabled]), *[contenteditable=true]\n";
|
@@ -19,7 +19,7 @@ exports.lastIndexInArray = void 0;
|
|
19
19
|
* @param {string} key
|
20
20
|
* @param {string|boolean|number} value
|
21
21
|
*/
|
22
|
-
var lastIndexInArray = function lastIndexInArray(array, key, value) {
|
22
|
+
var lastIndexInArray = exports.lastIndexInArray = function lastIndexInArray(array, key, value) {
|
23
23
|
for (var i = array.length - 1; i >= 0; i--) {
|
24
24
|
var _array$i;
|
25
25
|
if (((_array$i = array[i]) === null || _array$i === void 0 ? void 0 : _array$i[key]) === value) {
|
@@ -27,5 +27,4 @@ var lastIndexInArray = function lastIndexInArray(array, key, value) {
|
|
27
27
|
}
|
28
28
|
}
|
29
29
|
return -1;
|
30
|
-
};
|
31
|
-
exports.lastIndexInArray = lastIndexInArray;
|
30
|
+
};
|
@@ -16,7 +16,7 @@ var _motion = require("@carbon/motion");
|
|
16
16
|
var cleanMotionValue = function cleanMotionValue(val) {
|
17
17
|
return parseInt(val) / 1000;
|
18
18
|
};
|
19
|
-
var DURATIONS = {
|
19
|
+
var DURATIONS = exports.DURATIONS = {
|
20
20
|
// Micro-interactions such as button and toggle
|
21
21
|
fast01: cleanMotionValue(_motion.fast01),
|
22
22
|
// '70ms'
|
@@ -35,8 +35,7 @@ var DURATIONS = {
|
|
35
35
|
// Background dimming
|
36
36
|
slow02: cleanMotionValue(_motion.slow02) // '700ms'
|
37
37
|
};
|
38
|
-
exports.
|
39
|
-
var EASINGS = {
|
38
|
+
var EASINGS = exports.EASINGS = {
|
40
39
|
productive: {
|
41
40
|
entrance: (0, _getBezierValues.getBezierValues)('entrance', 'productive'),
|
42
41
|
standard: (0, _getBezierValues.getBezierValues)('standard', 'productive'),
|
@@ -47,5 +46,4 @@ var EASINGS = {
|
|
47
46
|
standard: (0, _getBezierValues.getBezierValues)('standard', 'expressive'),
|
48
47
|
exit: (0, _getBezierValues.getBezierValues)('exit', 'expressive')
|
49
48
|
}
|
50
|
-
};
|
51
|
-
exports.EASINGS = EASINGS;
|
49
|
+
};
|
@@ -11,37 +11,30 @@ exports.warn = exports.shimIfProduction = exports.noop = exports.log = exports.i
|
|
11
11
|
// LICENSE file in the root directory of this source tree.
|
12
12
|
//
|
13
13
|
|
14
|
-
var isProduction = process.env.NODE_ENV === 'production';
|
15
|
-
exports.
|
16
|
-
var noop = function noop() {
|
14
|
+
var isProduction = exports.isProduction = process.env.NODE_ENV === 'production';
|
15
|
+
var noop = exports.noop = function noop() {
|
17
16
|
return undefined;
|
18
17
|
};
|
19
|
-
exports.
|
20
|
-
var shimIfProduction = function shimIfProduction(fn) {
|
18
|
+
var shimIfProduction = exports.shimIfProduction = function shimIfProduction(fn) {
|
21
19
|
return isProduction ? noop : fn;
|
22
20
|
};
|
23
|
-
exports.
|
24
|
-
var log = shimIfProduction(function () {
|
21
|
+
var log = exports.log = shimIfProduction(function () {
|
25
22
|
var _console;
|
26
23
|
return (_console = console).log.apply(_console, arguments);
|
27
24
|
});
|
28
|
-
exports.
|
29
|
-
var warn = shimIfProduction(function () {
|
25
|
+
var warn = exports.warn = shimIfProduction(function () {
|
30
26
|
var _console2;
|
31
27
|
return (_console2 = console).warn.apply(_console2, arguments);
|
32
28
|
});
|
33
|
-
exports.
|
34
|
-
var error = shimIfProduction(function () {
|
29
|
+
var error = exports.error = shimIfProduction(function () {
|
35
30
|
var _console3;
|
36
31
|
return (_console3 = console).error.apply(_console3, arguments);
|
37
32
|
});
|
38
|
-
exports.
|
39
|
-
var _default = {
|
33
|
+
var _default = exports.default = {
|
40
34
|
isProduction: isProduction,
|
41
35
|
noop: noop,
|
42
36
|
shimIfProduction: shimIfProduction,
|
43
37
|
log: log,
|
44
38
|
warn: warn,
|
45
39
|
error: error
|
46
|
-
};
|
47
|
-
exports.default = _default;
|
40
|
+
};
|