@carbon/ibm-products 2.61.0 → 2.62.0-rc.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/css/index-full-carbon.css +170 -22
- 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 +170 -22
- 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 +170 -22
- 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 +170 -22
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/APIKeyModal/APIKeyDownloader.js +2 -2
- package/es/components/APIKeyModal/APIKeyModal.js +16 -16
- package/es/components/AboutModal/AboutModal.js +1 -1
- package/es/components/ActionBar/ActionBar.js +5 -5
- package/es/components/ActionBar/ActionBarOverflowItems.js +3 -3
- package/es/components/ActionSet/ActionSet.js +5 -5
- package/es/components/AddSelect/AddSelect.js +5 -4
- package/es/components/AddSelect/AddSelectBody.js +12 -11
- package/es/components/AddSelect/AddSelectColumn.js +1 -1
- package/es/components/AddSelect/AddSelectFilter.js +1 -1
- package/es/components/AddSelect/AddSelectMetaPanel.js +3 -3
- package/es/components/AddSelect/AddSelectRow.js +21 -13
- package/es/components/AddSelect/AddSelectSidebar.js +14 -4
- package/es/components/AddSelect/AddSelectSort.js +5 -5
- package/es/components/AddSelect/add-select-utils.js +3 -3
- package/es/components/AddSelect/types/index.d.ts +1 -0
- package/es/components/BigNumbers/BigNumbers.js +11 -11
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -4
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +4 -4
- package/es/components/Card/Card.js +14 -14
- package/es/components/Card/CardFooter.js +4 -4
- package/es/components/Card/CardHeader.js +2 -2
- package/es/components/Carousel/Carousel.js +16 -16
- package/es/components/Cascade/Cascade.js +2 -2
- package/es/components/Checklist/Checklist.js +11 -11
- package/es/components/Checklist/ChecklistChart.js +1 -1
- package/es/components/Checklist/ChecklistIcon.js +1 -1
- package/es/components/Coachmark/Coachmark.js +10 -10
- package/es/components/Coachmark/CoachmarkDragbar.js +5 -5
- package/es/components/Coachmark/CoachmarkHeader.js +4 -4
- package/es/components/Coachmark/CoachmarkOverlay.js +4 -4
- package/es/components/Coachmark/CoachmarkTagline.js +3 -3
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -1
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +6 -6
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +0 -10
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +16 -35
- package/es/components/CoachmarkStack/CoachmarkStack.d.ts +2 -13
- package/es/components/CoachmarkStack/CoachmarkStack.js +12 -22
- package/es/components/CoachmarkStack/CoachmarkStackHome.d.ts +0 -17
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +6 -29
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +12 -12
- package/es/components/ConditionBuilder/ConditionBuilder.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +5 -5
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +19 -19
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +7 -7
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +6 -6
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -6
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +3 -3
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +31 -31
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +15 -15
- package/es/components/ConditionBuilder/utils/useDataConfigs.js +1 -1
- package/es/components/ConditionBuilder/utils/useTranslations.js +2 -2
- package/es/components/ConditionBuilder/utils/util.js +13 -13
- package/es/components/CreateFullPage/CreateFullPage.js +3 -3
- package/es/components/CreateFullPage/CreateFullPageStep.js +9 -9
- package/es/components/CreateInfluencer/CreateInfluencer.js +8 -8
- package/es/components/CreateModal/CreateModal.js +1 -1
- package/es/components/CreateSidePanel/CreateSidePanel.js +1 -1
- package/es/components/CreateTearsheet/CreateTearsheet.js +4 -4
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +16 -16
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +52 -52
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +36 -36
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +26 -26
- package/es/components/DataSpreadsheet/hooks/useMoveActiveCell.js +3 -3
- package/es/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +3 -3
- package/es/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +1 -1
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +16 -16
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +5 -5
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +8 -8
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +1 -1
- package/es/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +3 -3
- package/es/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +5 -5
- package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +3 -3
- package/es/components/DataSpreadsheet/utils/createActiveCellFn.js +10 -10
- package/es/components/DataSpreadsheet/utils/createCellSelectionArea.js +1 -1
- package/es/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +1 -1
- package/es/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +6 -6
- package/es/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +6 -6
- package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -6
- package/es/components/DataSpreadsheet/utils/handleEditSubmit.js +3 -3
- package/es/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +10 -10
- package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +14 -14
- package/es/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +4 -4
- package/es/components/DataSpreadsheet/utils/removeCellSelections.js +1 -1
- package/es/components/Datagrid/Datagrid/Datagrid.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridBody.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.js +14 -14
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +3 -3
- package/es/components/Datagrid/Datagrid/DatagridHead.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -23
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridRow.js +19 -19
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +9 -9
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +7 -7
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +11 -11
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +18 -18
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +9 -9
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +15 -15
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +59 -44
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/constants.js +1 -5
- package/es/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +20 -20
- package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +35 -35
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +6 -6
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +4 -4
- package/es/components/Datagrid/useActionsColumn.js +2 -2
- package/es/components/Datagrid/useColumnRightAlign.js +3 -3
- package/es/components/Datagrid/useCustomizeColumns.js +1 -1
- package/es/components/Datagrid/useDatagrid.js +2 -2
- package/es/components/Datagrid/useDefaultStringRenderer.js +1 -1
- package/es/components/Datagrid/useDisableSelectRows.js +16 -16
- package/es/components/Datagrid/useExpandedRow.js +1 -1
- package/es/components/Datagrid/useFiltering.js +1 -1
- package/es/components/Datagrid/useFloatingScroll.js +2 -2
- package/es/components/Datagrid/useFocusRowExpander.js +4 -4
- package/es/components/Datagrid/useInfiniteScroll.js +1 -1
- package/es/components/Datagrid/useInitialColumnSort.js +1 -1
- package/es/components/Datagrid/useInlineEdit.js +4 -4
- package/es/components/Datagrid/useNestedRowExpander.js +6 -6
- package/es/components/Datagrid/useNestedRows.js +6 -6
- package/es/components/Datagrid/useOnRowClick.js +1 -1
- package/es/components/Datagrid/useRowExpander.js +4 -4
- package/es/components/Datagrid/useRowIsMouseOver.js +1 -1
- package/es/components/Datagrid/useRowRenderer.js +6 -6
- package/es/components/Datagrid/useSelectAllToggle.js +2 -2
- package/es/components/Datagrid/useSelectRows.js +5 -5
- package/es/components/Datagrid/useSortableColumns.js +11 -11
- package/es/components/Datagrid/useStickyColumn.js +8 -8
- package/es/components/DecoratorBase/DecoratorBase.js +8 -8
- package/es/components/DecoratorBase/DecoratorIcon.js +2 -2
- package/es/components/DelimitedList/DelimitedList.js +3 -3
- package/es/components/DescriptionList/DescriptionList.js +2 -2
- package/es/components/EditInPlace/EditInPlace.js +6 -6
- package/es/components/EditSidePanel/EditSidePanel.js +3 -3
- package/es/components/EditTearsheet/EditTearsheet.js +3 -3
- package/es/components/EditTearsheet/EditTearsheetForm.js +2 -2
- package/es/components/EmptyStates/EmptyState.js +5 -5
- package/es/components/EmptyStates/EmptyStateContent.js +2 -2
- package/es/components/EmptyStates/EmptyStateV2.js +2 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +3 -3
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +3 -3
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +3 -3
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +3 -3
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +3 -3
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +3 -3
- package/es/components/ExportModal/ExportModal.js +7 -7
- package/es/components/FeatureFlags/index.js +1 -1
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +8 -8
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +1 -1
- package/es/components/FilterSummary/FilterSummary.js +18 -34
- package/es/components/FullPageError/FullPageError.js +1 -1
- package/es/components/Guidebanner/Guidebanner.js +8 -8
- package/es/components/Guidebanner/GuidebannerElementButton.js +1 -1
- package/es/components/ImportModal/ImportModal.js +2 -2
- package/es/components/InlineTip/InlineTip.d.ts +0 -14
- package/es/components/InlineTip/InlineTip.js +13 -35
- package/es/components/InlineTip/utils.js +1 -1
- package/es/components/InterstitialScreen/InterstitialScreen.d.ts +0 -26
- package/es/components/InterstitialScreen/InterstitialScreen.js +22 -56
- package/es/components/MultiAddSelect/MultiAddSelect.d.ts +4 -0
- package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/es/components/Nav/Nav.js +3 -3
- package/es/components/Nav/NavItem.js +8 -9
- package/es/components/Nav/NavList.js +14 -15
- package/es/components/NonLinearReading/NonLinearReading.js +1 -1
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +53 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +89 -71
- package/es/components/OptionsTile/OptionsTile.js +4 -3
- package/es/components/PageHeader/PageHeader.js +19 -19
- package/es/components/PageHeader/PageHeaderTitle.js +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +1 -1
- package/es/components/ProductiveCard/ProductiveCard.js +1 -1
- package/es/components/RemoveModal/RemoveModal.js +2 -2
- package/es/components/Saving/Saving.js +4 -4
- package/es/components/ScrollGradient/ScrollGradient.js +6 -6
- package/es/components/SearchBar/SearchBar.js +6 -6
- package/es/components/SidePanel/SidePanel.js +45 -45
- package/es/components/SimpleHeader/SimpleHeader.js +4 -4
- package/es/components/StatusIcon/StatusIcon.js +1 -1
- package/es/components/StatusIndicator/StatusIndicator.js +2 -2
- package/es/components/StatusIndicator/StatusIndicatorStep.js +1 -1
- package/es/components/StringFormatter/StringFormatter.js +4 -4
- package/es/components/TagOverflow/TagOverflow.js +7 -7
- package/es/components/TagOverflow/TagOverflowModal.js +4 -4
- package/es/components/TagOverflow/TagOverflowPopover.js +13 -13
- package/es/components/TagSet/TagSet.js +15 -15
- package/es/components/TagSet/TagSetModal.js +6 -6
- package/es/components/TagSet/TagSetOverflow.js +3 -3
- package/es/components/Tearsheet/Tearsheet.js +2 -2
- package/es/components/Tearsheet/TearsheetNarrow.js +1 -1
- package/es/components/Tearsheet/TearsheetShell.js +6 -6
- package/es/components/Toolbar/Toolbar.js +6 -6
- package/es/components/Toolbar/ToolbarButton.js +4 -4
- package/es/components/TruncatedList/TruncatedList.js +8 -8
- package/es/components/UserAvatar/UserAvatar.js +4 -4
- package/es/components/UserProfileImage/UserProfileImage.js +2 -2
- package/es/components/WebTerminal/WebTerminal.js +8 -8
- package/es/global/js/hooks/useControllableState.js +1 -1
- package/es/global/js/hooks/useCreateComponentFocus.js +1 -1
- package/es/global/js/hooks/useCreateComponentStepChange.js +10 -10
- package/es/global/js/hooks/useFocus.js +19 -19
- package/es/global/js/hooks/useOverflowItems/index.d.ts +7 -0
- package/es/global/js/hooks/{useOverflowItems.js → useOverflowItems/useOverflowItems.js} +16 -16
- package/es/global/js/hooks/useOverflowString.js +6 -6
- package/es/global/js/hooks/usePresence.d.ts +23 -0
- package/es/global/js/hooks/usePresence.js +26 -6
- package/es/global/js/hooks/useResetCreateComponent.js +1 -1
- package/es/global/js/hooks/useResizeObserver.js +5 -5
- package/es/global/js/hooks/useRetrieveStepData.js +1 -1
- package/es/global/js/package-settings.js +4 -4
- package/es/global/js/utils/Wrap.js +2 -2
- package/es/global/js/utils/checkForOverflow.js +1 -1
- package/es/global/js/utils/debounce.d.ts +1 -1
- package/es/global/js/utils/debounce.js +2 -2
- package/es/global/js/utils/getSupportedLocale.d.ts +2 -0
- package/es/global/js/utils/getSupportedLocale.js +2 -0
- package/es/global/js/utils/lastIndexInArray.js +1 -1
- package/es/global/js/utils/props-helper.js +1 -1
- package/es/node_modules/@carbon/icon-helpers/es/index.js +2 -2
- package/es/node_modules/@carbon/icons-react/es/Icon.js +2 -2
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-10.js +894 -863
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +824 -823
- package/es/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/es/settings.js +2 -2
- package/lib/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/lib/components/APIKeyModal/APIKeyDownloader.js +2 -2
- package/lib/components/APIKeyModal/APIKeyModal.js +16 -16
- package/lib/components/AboutModal/AboutModal.js +1 -1
- package/lib/components/ActionBar/ActionBar.js +5 -5
- package/lib/components/ActionBar/ActionBarOverflowItems.js +3 -3
- package/lib/components/ActionSet/ActionSet.js +5 -5
- package/lib/components/AddSelect/AddSelect.js +5 -4
- package/lib/components/AddSelect/AddSelectBody.js +12 -11
- package/lib/components/AddSelect/AddSelectColumn.js +1 -1
- package/lib/components/AddSelect/AddSelectFilter.js +1 -1
- package/lib/components/AddSelect/AddSelectMetaPanel.js +3 -3
- package/lib/components/AddSelect/AddSelectRow.js +20 -12
- package/lib/components/AddSelect/AddSelectSidebar.js +14 -4
- package/lib/components/AddSelect/AddSelectSort.js +5 -5
- package/lib/components/AddSelect/add-select-utils.js +3 -3
- package/lib/components/AddSelect/types/index.d.ts +1 -0
- package/lib/components/BigNumbers/BigNumbers.js +10 -10
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -4
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +4 -4
- package/lib/components/Card/Card.js +14 -14
- package/lib/components/Card/CardFooter.js +4 -4
- package/lib/components/Card/CardHeader.js +2 -2
- package/lib/components/Carousel/Carousel.js +16 -16
- package/lib/components/Cascade/Cascade.js +2 -2
- package/lib/components/Checklist/Checklist.js +11 -11
- package/lib/components/Checklist/ChecklistChart.js +1 -1
- package/lib/components/Checklist/ChecklistIcon.js +1 -1
- package/lib/components/Coachmark/Coachmark.js +10 -10
- package/lib/components/Coachmark/CoachmarkDragbar.js +5 -5
- package/lib/components/Coachmark/CoachmarkHeader.js +4 -4
- package/lib/components/Coachmark/CoachmarkOverlay.js +4 -4
- package/lib/components/Coachmark/CoachmarkTagline.js +3 -3
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -1
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +6 -6
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +0 -10
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +16 -35
- package/lib/components/CoachmarkStack/CoachmarkStack.d.ts +2 -13
- package/lib/components/CoachmarkStack/CoachmarkStack.js +12 -22
- package/lib/components/CoachmarkStack/CoachmarkStackHome.d.ts +0 -17
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +6 -29
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +12 -12
- package/lib/components/ConditionBuilder/ConditionBuilder.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +5 -5
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +19 -19
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +7 -7
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +6 -6
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -6
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +3 -3
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +31 -31
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +15 -15
- package/lib/components/ConditionBuilder/utils/useDataConfigs.js +1 -1
- package/lib/components/ConditionBuilder/utils/useTranslations.js +2 -2
- package/lib/components/ConditionBuilder/utils/util.js +13 -13
- package/lib/components/CreateFullPage/CreateFullPage.js +3 -3
- package/lib/components/CreateFullPage/CreateFullPageStep.js +9 -9
- package/lib/components/CreateInfluencer/CreateInfluencer.js +8 -8
- package/lib/components/CreateModal/CreateModal.js +1 -1
- package/lib/components/CreateSidePanel/CreateSidePanel.js +1 -1
- package/lib/components/CreateTearsheet/CreateTearsheet.js +4 -4
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +16 -16
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -1
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +52 -52
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +36 -36
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +26 -26
- package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +3 -3
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +3 -3
- package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +1 -1
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +16 -16
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +5 -5
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +8 -8
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +1 -1
- package/lib/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +3 -3
- package/lib/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +5 -5
- package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +3 -3
- package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +10 -10
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +1 -1
- package/lib/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +1 -1
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +6 -6
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +6 -6
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -6
- package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +3 -3
- package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +10 -10
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +14 -14
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +4 -4
- package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +1 -1
- package/lib/components/Datagrid/Datagrid/Datagrid.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridBody.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +14 -14
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +3 -3
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -23
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +19 -19
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +9 -9
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +7 -7
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +11 -11
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +18 -18
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +9 -9
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +15 -15
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +59 -44
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +0 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +20 -20
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +35 -35
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +6 -6
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +5 -5
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +4 -4
- package/lib/components/Datagrid/useActionsColumn.js +2 -2
- package/lib/components/Datagrid/useColumnRightAlign.js +3 -3
- package/lib/components/Datagrid/useCustomizeColumns.js +1 -1
- package/lib/components/Datagrid/useDatagrid.js +2 -2
- package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -1
- package/lib/components/Datagrid/useDisableSelectRows.js +16 -16
- package/lib/components/Datagrid/useExpandedRow.js +1 -1
- package/lib/components/Datagrid/useFiltering.js +1 -1
- package/lib/components/Datagrid/useFloatingScroll.js +2 -2
- package/lib/components/Datagrid/useFocusRowExpander.js +4 -4
- package/lib/components/Datagrid/useInfiniteScroll.js +1 -1
- package/lib/components/Datagrid/useInitialColumnSort.js +1 -1
- package/lib/components/Datagrid/useInlineEdit.js +4 -4
- package/lib/components/Datagrid/useNestedRowExpander.js +6 -6
- package/lib/components/Datagrid/useNestedRows.js +6 -6
- package/lib/components/Datagrid/useOnRowClick.js +1 -1
- package/lib/components/Datagrid/useRowExpander.js +4 -4
- package/lib/components/Datagrid/useRowIsMouseOver.js +1 -1
- package/lib/components/Datagrid/useRowRenderer.js +6 -6
- package/lib/components/Datagrid/useSelectAllToggle.js +2 -2
- package/lib/components/Datagrid/useSelectRows.js +5 -5
- package/lib/components/Datagrid/useSortableColumns.js +11 -11
- package/lib/components/Datagrid/useStickyColumn.js +8 -8
- package/lib/components/DecoratorBase/DecoratorBase.js +8 -8
- package/lib/components/DecoratorBase/DecoratorIcon.js +2 -2
- package/lib/components/DelimitedList/DelimitedList.js +3 -3
- package/lib/components/DescriptionList/DescriptionList.js +2 -2
- package/lib/components/EditInPlace/EditInPlace.js +6 -6
- package/lib/components/EditSidePanel/EditSidePanel.js +3 -3
- package/lib/components/EditTearsheet/EditTearsheet.js +3 -3
- package/lib/components/EditTearsheet/EditTearsheetForm.js +2 -2
- package/lib/components/EmptyStates/EmptyState.js +5 -5
- package/lib/components/EmptyStates/EmptyStateContent.js +2 -2
- package/lib/components/EmptyStates/EmptyStateV2.js +2 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +3 -3
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +3 -3
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +3 -3
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +3 -3
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +3 -3
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +3 -3
- package/lib/components/ExportModal/ExportModal.js +7 -7
- package/lib/components/FeatureFlags/index.js +1 -1
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +8 -8
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +1 -1
- package/lib/components/FilterSummary/FilterSummary.js +18 -34
- package/lib/components/FullPageError/FullPageError.js +1 -1
- package/lib/components/Guidebanner/Guidebanner.js +8 -8
- package/lib/components/Guidebanner/GuidebannerElementButton.js +1 -1
- package/lib/components/ImportModal/ImportModal.js +2 -2
- package/lib/components/InlineTip/InlineTip.d.ts +0 -14
- package/lib/components/InlineTip/InlineTip.js +13 -35
- package/lib/components/InlineTip/utils.js +1 -1
- package/lib/components/InterstitialScreen/InterstitialScreen.d.ts +0 -26
- package/lib/components/InterstitialScreen/InterstitialScreen.js +22 -56
- package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +4 -0
- package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/lib/components/Nav/Nav.js +3 -3
- package/lib/components/Nav/NavItem.js +12 -13
- package/lib/components/Nav/NavList.js +18 -19
- package/lib/components/NonLinearReading/NonLinearReading.js +1 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +53 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +89 -71
- package/lib/components/OptionsTile/OptionsTile.js +4 -3
- package/lib/components/PageHeader/PageHeader.js +19 -19
- package/lib/components/PageHeader/PageHeaderTitle.js +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +1 -1
- package/lib/components/ProductiveCard/ProductiveCard.js +1 -1
- package/lib/components/RemoveModal/RemoveModal.js +2 -2
- package/lib/components/Saving/Saving.js +4 -4
- package/lib/components/ScrollGradient/ScrollGradient.js +6 -6
- package/lib/components/SearchBar/SearchBar.js +6 -6
- package/lib/components/SidePanel/SidePanel.js +45 -45
- package/lib/components/SimpleHeader/SimpleHeader.js +4 -4
- package/lib/components/StatusIcon/StatusIcon.js +1 -1
- package/lib/components/StatusIndicator/StatusIndicator.js +2 -2
- package/lib/components/StatusIndicator/StatusIndicatorStep.js +1 -1
- package/lib/components/StringFormatter/StringFormatter.js +4 -4
- package/lib/components/TagOverflow/TagOverflow.js +7 -7
- package/lib/components/TagOverflow/TagOverflowModal.js +4 -4
- package/lib/components/TagOverflow/TagOverflowPopover.js +13 -13
- package/lib/components/TagSet/TagSet.js +15 -15
- package/lib/components/TagSet/TagSetModal.js +6 -6
- package/lib/components/TagSet/TagSetOverflow.js +3 -3
- package/lib/components/Tearsheet/Tearsheet.js +2 -2
- package/lib/components/Tearsheet/TearsheetNarrow.js +1 -1
- package/lib/components/Tearsheet/TearsheetShell.js +6 -6
- package/lib/components/Toolbar/Toolbar.js +6 -6
- package/lib/components/Toolbar/ToolbarButton.js +4 -4
- package/lib/components/TruncatedList/TruncatedList.js +8 -8
- package/lib/components/UserAvatar/UserAvatar.js +4 -4
- package/lib/components/UserProfileImage/UserProfileImage.js +2 -2
- package/lib/components/WebTerminal/WebTerminal.js +8 -8
- package/lib/global/js/hooks/useControllableState.js +1 -1
- package/lib/global/js/hooks/useCreateComponentFocus.js +1 -1
- package/lib/global/js/hooks/useCreateComponentStepChange.js +10 -10
- package/lib/global/js/hooks/useFocus.js +19 -19
- package/lib/global/js/hooks/useOverflowItems/index.d.ts +7 -0
- package/lib/global/js/hooks/{useOverflowItems.js → useOverflowItems/useOverflowItems.js} +16 -16
- package/lib/global/js/hooks/useOverflowString.js +6 -6
- package/lib/global/js/hooks/usePresence.d.ts +23 -0
- package/lib/global/js/hooks/usePresence.js +26 -6
- package/lib/global/js/hooks/useResetCreateComponent.js +1 -1
- package/lib/global/js/hooks/useResizeObserver.js +5 -5
- package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
- package/lib/global/js/package-settings.js +4 -4
- package/lib/global/js/utils/Wrap.js +2 -2
- package/lib/global/js/utils/checkForOverflow.js +1 -1
- package/lib/global/js/utils/debounce.d.ts +1 -1
- package/lib/global/js/utils/debounce.js +2 -2
- package/lib/global/js/utils/getSupportedLocale.d.ts +2 -0
- package/lib/global/js/utils/getSupportedLocale.js +2 -0
- package/lib/global/js/utils/lastIndexInArray.js +1 -1
- package/lib/global/js/utils/props-helper.js +1 -1
- package/lib/node_modules/@carbon/icon-helpers/es/index.js +2 -2
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +2 -2
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-10.js +902 -871
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +824 -823
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/lib/settings.js +2 -2
- package/package.json +19 -19
- package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +100 -22
- package/scss/components/Datagrid/styles/addons/_animations.scss +56 -0
- package/scss/components/FilterSummary/_animations.scss +20 -0
- package/scss/components/FilterSummary/_filter-summary.scss +11 -0
- package/scss/components/FullPageError/_full-page-error.scss +4 -0
- package/scss/components/GetStartedCard/_get-started-card.scss +2 -2
- package/scss/components/NotificationsPanel/_notifications-panel.scss +35 -7
- package/scss/components/SidePanel/_side-panel.scss +4 -2
- package/scss/components/Tearsheet/_tearsheet.scss +6 -12
- package/telemetry.yml +9 -17
- package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.d.ts +0 -60
- package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +0 -80
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +0 -25
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +0 -146
- package/es/components/SteppedAnimatedMedia/index.d.ts +0 -8
- package/es/global/js/utils/getBezierValues.d.ts +0 -1
- package/es/global/js/utils/getBezierValues.js +0 -28
- package/es/global/js/utils/motionConstants.d.ts +0 -23
- package/es/global/js/utils/motionConstants.js +0 -39
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.d.ts +0 -60
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +0 -84
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +0 -25
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +0 -148
- package/lib/components/SteppedAnimatedMedia/index.d.ts +0 -8
- package/lib/global/js/utils/getBezierValues.d.ts +0 -1
- package/lib/global/js/utils/getBezierValues.js +0 -30
- package/lib/global/js/utils/motionConstants.d.ts +0 -23
- package/lib/global/js/utils/motionConstants.js +0 -42
- /package/es/global/js/hooks/{useOverflowItems.d.ts → useOverflowItems/useOverflowItems.d.ts} +0 -0
- /package/lib/global/js/hooks/{useOverflowItems.d.ts → useOverflowItems/useOverflowItems.d.ts} +0 -0
@@ -13,8 +13,8 @@ var settings = require('../../../settings.js');
|
|
13
13
|
var React = require('react');
|
14
14
|
|
15
15
|
var getSpecificElement = function getSpecificElement(parentEl, elementId) {
|
16
|
-
var element = parentEl === null || parentEl ===
|
17
|
-
return elementId && !(element !== null && element !==
|
16
|
+
var element = parentEl === null || parentEl === void 0 ? void 0 : parentEl.querySelector(elementId);
|
17
|
+
return elementId && !(element !== null && element !== void 0 && element.disabled) ? element : null;
|
18
18
|
};
|
19
19
|
var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
|
20
20
|
var _getFocusable2, _getFocusable3, _getFocusable4, _getFocusable5;
|
@@ -39,17 +39,17 @@ var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
|
|
39
39
|
var getFocusable = React.useCallback(function () {
|
40
40
|
var _modalRef$current, _focusableElements, _focusableElements2, _focusableElements3, _focusableElements4;
|
41
41
|
// Selecting all focusable elements based on the above conditions
|
42
|
-
var focusableElements = modalRef === null || modalRef ===
|
43
|
-
if ((_focusableElements = focusableElements) !== null && _focusableElements !==
|
42
|
+
var focusableElements = modalRef === null || modalRef === void 0 || (_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.querySelectorAll("".concat(query));
|
43
|
+
if ((_focusableElements = focusableElements) !== null && _focusableElements !== void 0 && _focusableElements.length) {
|
44
44
|
focusableElements = Array.prototype.filter.call(focusableElements, function (el) {
|
45
45
|
var _window;
|
46
|
-
return ((_window = window) === null || _window ===
|
46
|
+
return ((_window = window) === null || _window === void 0 || (_window = _window.getComputedStyle(el)) === null || _window === void 0 ? void 0 : _window.display) !== 'none';
|
47
47
|
});
|
48
48
|
}
|
49
|
-
var first = (_focusableElements2 = focusableElements) === null || _focusableElements2 ===
|
50
|
-
var last = (_focusableElements3 = focusableElements) === null || _focusableElements3 ===
|
49
|
+
var first = (_focusableElements2 = focusableElements) === null || _focusableElements2 === void 0 ? void 0 : _focusableElements2[0];
|
50
|
+
var last = (_focusableElements3 = focusableElements) === null || _focusableElements3 === void 0 ? void 0 : _focusableElements3[((_focusableElements4 = focusableElements) === null || _focusableElements4 === void 0 ? void 0 : _focusableElements4.length) - 1];
|
51
51
|
var all = focusableElements;
|
52
|
-
var specified = getSpecificElement(modalRef === null || modalRef ===
|
52
|
+
var specified = getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus);
|
53
53
|
return {
|
54
54
|
first: first,
|
55
55
|
last: last,
|
@@ -70,16 +70,16 @@ var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
|
|
70
70
|
if (event.key === 'Tab') {
|
71
71
|
// updating the focusable elements list
|
72
72
|
_getFocusable = getFocusable(), first = _getFocusable.first, last = _getFocusable.last;
|
73
|
-
if (event.shiftKey && ((_document = document) === null || _document ===
|
73
|
+
if (event.shiftKey && ((_document = document) === null || _document === void 0 ? void 0 : _document.activeElement) === first) {
|
74
74
|
// Prevents the default "Tab" behavior
|
75
75
|
event.preventDefault();
|
76
76
|
// if the user press shift+tab and the current element not in focusable items
|
77
|
-
last === null || last ===
|
78
|
-
} else if (!event.shiftKey && ((_document2 = document) === null || _document2 ===
|
77
|
+
last === null || last === void 0 || last.focus();
|
78
|
+
} else if (!event.shiftKey && ((_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.activeElement) === last) {
|
79
79
|
event.preventDefault();
|
80
80
|
// user pressing tab key only then
|
81
81
|
// focusing the first element if the current element is not in focusable items
|
82
|
-
first === null || first ===
|
82
|
+
first === null || first === void 0 || first.focus();
|
83
83
|
}
|
84
84
|
}
|
85
85
|
case 1:
|
@@ -93,10 +93,10 @@ var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
|
|
93
93
|
};
|
94
94
|
}();
|
95
95
|
return {
|
96
|
-
firstElement: (_getFocusable2 = getFocusable()) === null || _getFocusable2 ===
|
97
|
-
lastElement: (_getFocusable3 = getFocusable()) === null || _getFocusable3 ===
|
98
|
-
allElements: (_getFocusable4 = getFocusable()) === null || _getFocusable4 ===
|
99
|
-
specifiedElement: (_getFocusable5 = getFocusable()) === null || _getFocusable5 ===
|
96
|
+
firstElement: (_getFocusable2 = getFocusable()) === null || _getFocusable2 === void 0 ? void 0 : _getFocusable2.first,
|
97
|
+
lastElement: (_getFocusable3 = getFocusable()) === null || _getFocusable3 === void 0 ? void 0 : _getFocusable3.last,
|
98
|
+
allElements: (_getFocusable4 = getFocusable()) === null || _getFocusable4 === void 0 ? void 0 : _getFocusable4.all,
|
99
|
+
specifiedElement: (_getFocusable5 = getFocusable()) === null || _getFocusable5 === void 0 ? void 0 : _getFocusable5.specified,
|
100
100
|
keyDownListener: handleKeyDown,
|
101
101
|
getFocusable: getFocusable
|
102
102
|
};
|
@@ -113,15 +113,15 @@ var claimFocus = function claimFocus(firstElement, modalRef) {
|
|
113
113
|
var selectorPrimaryFocus = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
114
114
|
var specifiedEl;
|
115
115
|
if (selectorPrimaryFocus) {
|
116
|
-
specifiedEl = getSpecificElement(modalRef === null || modalRef ===
|
116
|
+
specifiedEl = getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus);
|
117
117
|
}
|
118
|
-
if (specifiedEl && ((_window2 = window) === null || _window2 ===
|
118
|
+
if (specifiedEl && ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.getComputedStyle(specifiedEl)) === null || _window2 === void 0 ? void 0 : _window2.display) !== 'none' && ((_specifiedEl = specifiedEl) === null || _specifiedEl === void 0 ? void 0 : _specifiedEl.tabIndex) !== -1) {
|
119
119
|
setTimeout(function () {
|
120
120
|
return specifiedEl.focus();
|
121
121
|
}, 0);
|
122
122
|
} else {
|
123
123
|
setTimeout(function () {
|
124
|
-
return firstElement === null || firstElement ===
|
124
|
+
return firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
125
125
|
}, 0);
|
126
126
|
}
|
127
127
|
};
|
@@ -7,9 +7,9 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
var _rollupPluginBabelHelpers = require('
|
10
|
+
var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
|
11
11
|
var React = require('react');
|
12
|
-
var useResizeObserver = require('
|
12
|
+
var useResizeObserver = require('../useResizeObserver.js');
|
13
13
|
|
14
14
|
function useOverflowItems() {
|
15
15
|
var _items$slice;
|
@@ -28,15 +28,15 @@ function useOverflowItems() {
|
|
28
28
|
var minWidthRef = React.useRef(0);
|
29
29
|
var requiredWidthRef = React.useRef(0);
|
30
30
|
var handleResize = function handleResize() {
|
31
|
-
if (containerRef !== null && containerRef !==
|
31
|
+
if (containerRef !== null && containerRef !== void 0 && containerRef.current) {
|
32
32
|
var _offsetRef$current;
|
33
|
-
offsetWidthRef.current = (offsetRef === null || offsetRef ===
|
33
|
+
offsetWidthRef.current = (offsetRef === null || offsetRef === void 0 || (_offsetRef$current = offsetRef.current) === null || _offsetRef$current === void 0 ? void 0 : _offsetRef$current.offsetWidth) || 0;
|
34
34
|
var usableWidth = containerRef.current.offsetWidth - offsetWidthRef.current;
|
35
35
|
setRemainingWidth(usableWidth);
|
36
36
|
}
|
37
37
|
};
|
38
38
|
var offsetRefHandler = function offsetRefHandler(node) {
|
39
|
-
if (node && containerRef !== null && containerRef !==
|
39
|
+
if (node && containerRef !== null && containerRef !== void 0 && containerRef.current) {
|
40
40
|
offsetWidthRef.current = node.offsetWidth;
|
41
41
|
var usableWidth = containerRef.current.offsetWidth - offsetWidthRef.current;
|
42
42
|
setRemainingWidth(usableWidth);
|
@@ -50,14 +50,14 @@ function useOverflowItems() {
|
|
50
50
|
}
|
51
51
|
return itemsRef.current;
|
52
52
|
};
|
53
|
-
var requiredWidth = items === null || items ===
|
53
|
+
var requiredWidth = items === null || items === void 0 || (_items$slice = items.slice(0, maxItems)) === null || _items$slice === void 0 ? void 0 : _items$slice.reduce(function (acc, item) {
|
54
54
|
return acc + (getMap().get(item.id) || 0);
|
55
55
|
}, 0);
|
56
56
|
var itemRefHandler = function itemRefHandler(id, node) {
|
57
57
|
var map = getMap();
|
58
58
|
if (node) {
|
59
59
|
var _getComputedStyle;
|
60
|
-
var style = (_getComputedStyle = getComputedStyle) === null || _getComputedStyle ===
|
60
|
+
var style = (_getComputedStyle = getComputedStyle) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle(node);
|
61
61
|
var totalWidth = node.offsetWidth + parseInt(style.marginLeft) + parseInt(style.marginRight);
|
62
62
|
map.set(id, totalWidth);
|
63
63
|
}
|
@@ -74,9 +74,9 @@ function useOverflowItems() {
|
|
74
74
|
var accumulatedWidth = 0;
|
75
75
|
var includeOffset = false;
|
76
76
|
if (maxItems) {
|
77
|
-
includeOffset = requiredWidth + (offsetWidthRef === null || offsetWidthRef ===
|
77
|
+
includeOffset = requiredWidth + (offsetWidthRef === null || offsetWidthRef === void 0 ? void 0 : offsetWidthRef.current) > requiredWidth;
|
78
78
|
} else {
|
79
|
-
includeOffset = requiredWidth > remainingWidth + (offsetWidthRef === null || offsetWidthRef ===
|
79
|
+
includeOffset = requiredWidth > remainingWidth + (offsetWidthRef === null || offsetWidthRef === void 0 ? void 0 : offsetWidthRef.current);
|
80
80
|
}
|
81
81
|
return items.slice(0, maxItems).reduce(function (prev, cur) {
|
82
82
|
if (maxReached) {
|
@@ -85,7 +85,7 @@ function useOverflowItems() {
|
|
85
85
|
var itemWidth = map.get(cur.id) || 0;
|
86
86
|
var willFit = accumulatedWidth + itemWidth <= remainingWidth;
|
87
87
|
if (!includeOffset) {
|
88
|
-
willFit = accumulatedWidth + itemWidth <= remainingWidth + (offsetWidthRef === null || offsetWidthRef ===
|
88
|
+
willFit = accumulatedWidth + itemWidth <= remainingWidth + (offsetWidthRef === null || offsetWidthRef === void 0 ? void 0 : offsetWidthRef.current);
|
89
89
|
}
|
90
90
|
if (willFit) {
|
91
91
|
accumulatedWidth += itemWidth;
|
@@ -97,16 +97,16 @@ function useOverflowItems() {
|
|
97
97
|
}, []);
|
98
98
|
};
|
99
99
|
var visibleItems = getVisibleItems();
|
100
|
-
var hiddenItems = items.slice(visibleItems === null || visibleItems ===
|
100
|
+
var hiddenItems = items.slice(visibleItems === null || visibleItems === void 0 ? void 0 : visibleItems.length);
|
101
101
|
// only call the change handler when the number of visible items has changed
|
102
|
-
if ((visibleItems === null || visibleItems ===
|
102
|
+
if ((visibleItems === null || visibleItems === void 0 ? void 0 : visibleItems.length) !== visibleItemCount.current || remainingWidth !== minWidthRef.current || requiredWidth !== requiredWidthRef.current) {
|
103
103
|
var _getMap, _getMap2;
|
104
|
-
visibleItemCount.current = visibleItems === null || visibleItems ===
|
104
|
+
visibleItemCount.current = visibleItems === null || visibleItems === void 0 ? void 0 : visibleItems.length;
|
105
105
|
minWidthRef.current = remainingWidth;
|
106
106
|
requiredWidthRef.current = requiredWidth;
|
107
|
-
var firstItemKey = ((_getMap = getMap()) === null || _getMap ===
|
108
|
-
var firstItemWidth = ((_getMap2 = getMap()) === null || _getMap2 ===
|
109
|
-
onChange === null || onChange ===
|
107
|
+
var firstItemKey = ((_getMap = getMap()) === null || _getMap === void 0 || (_getMap = _getMap.keys()) === null || _getMap === void 0 || (_getMap = _getMap.next()) === null || _getMap === void 0 ? void 0 : _getMap.value) || '';
|
108
|
+
var firstItemWidth = ((_getMap2 = getMap()) === null || _getMap2 === void 0 ? void 0 : _getMap2.get(firstItemKey)) || 0;
|
109
|
+
onChange === null || onChange === void 0 || onChange({
|
110
110
|
hiddenItems: hiddenItems,
|
111
111
|
minWidth: remainingWidth,
|
112
112
|
maxWidth: requiredWidth + firstItemWidth
|
@@ -12,15 +12,15 @@ var React = require('react');
|
|
12
12
|
|
13
13
|
function useOverflowStringWidth(elementRef) {
|
14
14
|
var _elementRef$current;
|
15
|
-
var innerText = elementRef === null || elementRef ===
|
15
|
+
var innerText = elementRef === null || elementRef === void 0 || (_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.innerText;
|
16
16
|
var _useState = React.useState(),
|
17
17
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
18
18
|
isOverflowing = _useState2[0],
|
19
19
|
setIsOverflowing = _useState2[1];
|
20
20
|
var checkWidthOverflow = React.useCallback(function () {
|
21
21
|
var _elementRef$current2, _elementRef$current3;
|
22
|
-
var offsetWidth = elementRef === null || elementRef ===
|
23
|
-
var scrollWidth = elementRef === null || elementRef ===
|
22
|
+
var offsetWidth = elementRef === null || elementRef === void 0 || (_elementRef$current2 = elementRef.current) === null || _elementRef$current2 === void 0 ? void 0 : _elementRef$current2.offsetWidth;
|
23
|
+
var scrollWidth = elementRef === null || elementRef === void 0 || (_elementRef$current3 = elementRef.current) === null || _elementRef$current3 === void 0 ? void 0 : _elementRef$current3.scrollWidth;
|
24
24
|
if (offsetWidth && scrollWidth) {
|
25
25
|
setIsOverflowing(offsetWidth < scrollWidth);
|
26
26
|
}
|
@@ -32,15 +32,15 @@ function useOverflowStringWidth(elementRef) {
|
|
32
32
|
}
|
33
33
|
var useOverflowStringHeight = function useOverflowStringHeight(elementRef) {
|
34
34
|
var _elementRef$current4;
|
35
|
-
var innerText = elementRef === null || elementRef ===
|
35
|
+
var innerText = elementRef === null || elementRef === void 0 || (_elementRef$current4 = elementRef.current) === null || _elementRef$current4 === void 0 ? void 0 : _elementRef$current4.innerText;
|
36
36
|
var _useState3 = React.useState(),
|
37
37
|
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
38
38
|
isOverflowing = _useState4[0],
|
39
39
|
setIsOverflowing = _useState4[1];
|
40
40
|
var checkHeightOverflow = React.useCallback(function () {
|
41
41
|
var _elementRef$current5, _elementRef$current6;
|
42
|
-
var offsetHeight = elementRef === null || elementRef ===
|
43
|
-
var scrollHeight = elementRef === null || elementRef ===
|
42
|
+
var offsetHeight = elementRef === null || elementRef === void 0 || (_elementRef$current5 = elementRef.current) === null || _elementRef$current5 === void 0 ? void 0 : _elementRef$current5.offsetHeight;
|
43
|
+
var scrollHeight = elementRef === null || elementRef === void 0 || (_elementRef$current6 = elementRef.current) === null || _elementRef$current6 === void 0 ? void 0 : _elementRef$current6.scrollHeight;
|
44
44
|
if (offsetHeight && scrollHeight) {
|
45
45
|
setIsOverflowing(offsetHeight < scrollHeight);
|
46
46
|
}
|
@@ -5,6 +5,29 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
import { RefObject } from 'react';
|
8
|
+
/**
|
9
|
+
* Used as a replacement for AnimatePresence from framer-motion,
|
10
|
+
* this hook will return a boolean value to let the component
|
11
|
+
* calling this hook to know whether it should render or not.
|
12
|
+
* This solves a pain point around handling unmounting of components
|
13
|
+
* in React that should also include an exit animation.
|
14
|
+
*
|
15
|
+
* @param open The open value to the component using this hook
|
16
|
+
* @param ref The ref to the element that contains the animation this hook will be listening for
|
17
|
+
* @param animationName The animation that will be listened for, if event.animationName equals the
|
18
|
+
* animationName value provided it means that the exit animation has completed and shouldRender
|
19
|
+
* should be updated to false. If a separate animation is used for reduced motion cases, it should
|
20
|
+
* be conditionally passed as the `animationName`.
|
21
|
+
* @returns A boolean value so the component using this hook knows when it should render it's contents
|
22
|
+
*
|
23
|
+
* @example
|
24
|
+
* ```typescript
|
25
|
+
* const exitAnimationName = shouldReduceMotion
|
26
|
+
? 'reduced-animation-name'
|
27
|
+
: 'standard-animation-name';
|
28
|
+
* const { shouldRender } = usePresence(open, componentRef, exitAnimationName);
|
29
|
+
* ```
|
30
|
+
*/
|
8
31
|
export declare function usePresence(open: boolean, ref: RefObject<HTMLElement>, animationName: string): {
|
9
32
|
shouldRender: boolean;
|
10
33
|
};
|
@@ -10,9 +10,29 @@
|
|
10
10
|
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
11
11
|
var React = require('react');
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
/**
|
14
|
+
* Used as a replacement for AnimatePresence from framer-motion,
|
15
|
+
* this hook will return a boolean value to let the component
|
16
|
+
* calling this hook to know whether it should render or not.
|
17
|
+
* This solves a pain point around handling unmounting of components
|
18
|
+
* in React that should also include an exit animation.
|
19
|
+
*
|
20
|
+
* @param open The open value to the component using this hook
|
21
|
+
* @param ref The ref to the element that contains the animation this hook will be listening for
|
22
|
+
* @param animationName The animation that will be listened for, if event.animationName equals the
|
23
|
+
* animationName value provided it means that the exit animation has completed and shouldRender
|
24
|
+
* should be updated to false. If a separate animation is used for reduced motion cases, it should
|
25
|
+
* be conditionally passed as the `animationName`.
|
26
|
+
* @returns A boolean value so the component using this hook knows when it should render it's contents
|
27
|
+
*
|
28
|
+
* @example
|
29
|
+
* ```typescript
|
30
|
+
* const exitAnimationName = shouldReduceMotion
|
31
|
+
? 'reduced-animation-name'
|
32
|
+
: 'standard-animation-name';
|
33
|
+
* const { shouldRender } = usePresence(open, componentRef, exitAnimationName);
|
34
|
+
* ```
|
35
|
+
*/
|
16
36
|
function usePresence(open, ref, animationName) {
|
17
37
|
var _useState = React.useState(open),
|
18
38
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
@@ -27,10 +47,10 @@ function usePresence(open, ref, animationName) {
|
|
27
47
|
if (open) {
|
28
48
|
setShouldRender(true);
|
29
49
|
}
|
30
|
-
if (ref !== null && ref !==
|
31
|
-
ref === null || ref ===
|
50
|
+
if (ref !== null && ref !== void 0 && ref.current) {
|
51
|
+
ref === null || ref === void 0 || ref.current.addEventListener('animationend', handleAnimationEnd);
|
32
52
|
}
|
33
|
-
var animatedRef = ref === null || ref ===
|
53
|
+
var animatedRef = ref === null || ref === void 0 ? void 0 : ref.current;
|
34
54
|
return function () {
|
35
55
|
if (animatedRef) {
|
36
56
|
animatedRef.removeEventListener('animationend', handleAnimationEnd);
|
@@ -32,7 +32,7 @@ var useResetCreateComponent = function useResetCreateComponent(_ref) {
|
|
32
32
|
totalSteps = _ref.totalSteps,
|
33
33
|
componentName = _ref.componentName;
|
34
34
|
React.useEffect(function () {
|
35
|
-
if (!(previousState !== null && previousState !==
|
35
|
+
if (!(previousState !== null && previousState !== void 0 && previousState.open) && open) {
|
36
36
|
if (initialStep && totalSteps && Number(initialStep) <= Number(totalSteps) && Number(initialStep) > 0) {
|
37
37
|
var numberOfHiddenSteps = getNumberOfHiddenSteps.getNumberOfHiddenSteps(stepData, initialStep);
|
38
38
|
setCurrentStep(Number(initialStep + numberOfHiddenSteps));
|
@@ -33,24 +33,24 @@ var useResizeObserver = function useResizeObserver(ref, callback) {
|
|
33
33
|
if (ref.current) {
|
34
34
|
var _ref$current, _ref$current2;
|
35
35
|
var refComputedStyle = window.getComputedStyle(ref.current);
|
36
|
-
var initialWidth = (((_ref$current = ref.current) === null || _ref$current ===
|
37
|
-
var initialHeight = (((_ref$current2 = ref.current) === null || _ref$current2 ===
|
36
|
+
var initialWidth = (((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.offsetWidth) || 0) - (parseFloat((refComputedStyle === null || refComputedStyle === void 0 ? void 0 : refComputedStyle.paddingLeft) || 0), parseFloat((refComputedStyle === null || refComputedStyle === void 0 ? void 0 : refComputedStyle.paddingRight) || 0));
|
37
|
+
var initialHeight = (((_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.offsetHeight) || 0) - (parseFloat((refComputedStyle === null || refComputedStyle === void 0 ? void 0 : refComputedStyle.paddingTop) || 0), parseFloat((refComputedStyle === null || refComputedStyle === void 0 ? void 0 : refComputedStyle.paddingLeft) || 0));
|
38
38
|
setWidth(initialWidth);
|
39
39
|
setHeight(initialHeight);
|
40
40
|
}
|
41
41
|
};
|
42
|
-
if (!(ref !== null && ref !==
|
42
|
+
if (!(ref !== null && ref !== void 0 && ref.current) || width >= 0 && height >= 0) {
|
43
43
|
return;
|
44
44
|
}
|
45
45
|
getInitialSize();
|
46
46
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
47
47
|
}, [width, height, ref.current].concat(_rollupPluginBabelHelpers.toConsumableArray(deps)));
|
48
48
|
React.useLayoutEffect(function () {
|
49
|
-
if (!(ref !== null && ref !==
|
49
|
+
if (!(ref !== null && ref !== void 0 && ref.current)) {
|
50
50
|
return;
|
51
51
|
}
|
52
52
|
var doCallbacks = function doCallbacks() {
|
53
|
-
if (!(ref !== null && ref !==
|
53
|
+
if (!(ref !== null && ref !== void 0 && ref.current) || !Array.isArray(entriesToHandle === null || entriesToHandle === void 0 ? void 0 : entriesToHandle.current)) {
|
54
54
|
return;
|
55
55
|
}
|
56
56
|
var entry = entriesToHandle.current[0];
|
@@ -41,7 +41,7 @@ var useRetrieveStepData = function useRetrieveStepData(_ref) {
|
|
41
41
|
shouldIncludeStep: shouldIncludeStep
|
42
42
|
};
|
43
43
|
var previousItem = prev[stepNumber - 1];
|
44
|
-
if ((previousItem === null || previousItem ===
|
44
|
+
if ((previousItem === null || previousItem === void 0 ? void 0 : previousItem.title) !== stepItem.title || (previousItem === null || previousItem === void 0 ? void 0 : previousItem.secondaryLabel) !== stepItem.secondaryLabel || (previousItem === null || previousItem === void 0 ? void 0 : previousItem.introStep) !== stepItem.introStep || (previousItem === null || previousItem === void 0 ? void 0 : previousItem.shouldIncludeStep) !== stepItem.shouldIncludeStep || (previousItem === null || previousItem === void 0 ? void 0 : previousItem.invalid) !== stepItem.invalid) {
|
45
45
|
var clone = _rollupPluginBabelHelpers.toConsumableArray(prev);
|
46
46
|
clone[stepNumber - 1] = stepItem;
|
47
47
|
return clone;
|
@@ -187,7 +187,7 @@ var component = new Proxy(_rollupPluginBabelHelpers.objectSpread2({}, defaults.c
|
|
187
187
|
},
|
188
188
|
get: function get(target, property) {
|
189
189
|
var _target$property;
|
190
|
-
return allComponents((_target$property = target[property]) !== null && _target$property !==
|
190
|
+
return allComponents((_target$property = target[property]) !== null && _target$property !== void 0 ? _target$property : false);
|
191
191
|
}
|
192
192
|
});
|
193
193
|
var feature = new Proxy(_rollupPluginBabelHelpers.objectSpread2({}, defaults.feature), {
|
@@ -206,7 +206,7 @@ var feature = new Proxy(_rollupPluginBabelHelpers.objectSpread2({}, defaults.fea
|
|
206
206
|
},
|
207
207
|
get: function get(target, property) {
|
208
208
|
var _target$property2;
|
209
|
-
return allFeatures((_target$property2 = target[property]) !== null && _target$property2 !==
|
209
|
+
return allFeatures((_target$property2 = target[property]) !== null && _target$property2 !== void 0 ? _target$property2 : false);
|
210
210
|
}
|
211
211
|
});
|
212
212
|
var devtoolsAttribute = 'data-carbon-devtools-id';
|
@@ -221,12 +221,12 @@ var pkg = {
|
|
221
221
|
feature: feature,
|
222
222
|
isComponentEnabled: function isComponentEnabled(componentOrName) {
|
223
223
|
var byDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
224
|
-
var componentName = (componentOrName === null || componentOrName ===
|
224
|
+
var componentName = (componentOrName === null || componentOrName === void 0 ? void 0 : componentOrName.displayName) || (componentOrName === null || componentOrName === void 0 ? void 0 : componentOrName.name) || componentOrName;
|
225
225
|
return byDefault ? defaults.component[componentName] : component[componentName];
|
226
226
|
},
|
227
227
|
isComponentPublic: function isComponentPublic(componentOrName) {
|
228
228
|
var byDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
229
|
-
var componentName = (componentOrName === null || componentOrName ===
|
229
|
+
var componentName = (componentOrName === null || componentOrName === void 0 ? void 0 : componentOrName.displayName) || (componentOrName === null || componentOrName === void 0 ? void 0 : componentOrName.name) || componentOrName;
|
230
230
|
return Object.prototype.hasOwnProperty.call(byDefault ? defaults.component : component, componentName);
|
231
231
|
},
|
232
232
|
isFeatureEnabled: function isFeatureEnabled(featureName) {
|
@@ -21,7 +21,7 @@ var _isEmpty = function isEmpty(children) {
|
|
21
21
|
React.Children.forEach(children, function (child) {
|
22
22
|
if (child) {
|
23
23
|
var _child$type, _child$props;
|
24
|
-
result && (result = (child === null || child ===
|
24
|
+
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));
|
25
25
|
}
|
26
26
|
});
|
27
27
|
return result;
|
@@ -40,7 +40,7 @@ var Wrap = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
40
40
|
var alwaysRender = _ref.alwaysRender,
|
41
41
|
children = _ref.children,
|
42
42
|
_ref$element = _ref.element,
|
43
|
-
Wrapper = _ref$element ===
|
43
|
+
Wrapper = _ref$element === void 0 ? 'div' : _ref$element,
|
44
44
|
neverRender = _ref.neverRender,
|
45
45
|
className = _ref.className,
|
46
46
|
title = _ref.title,
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
var checkHeightOverflow = function checkHeightOverflow(el) {
|
17
17
|
if (el) {
|
18
|
-
return (el === null || el ===
|
18
|
+
return (el === null || el === void 0 ? void 0 : el.offsetHeight) < (el === null || el === void 0 ? void 0 : el.scrollHeight);
|
19
19
|
}
|
20
20
|
return false;
|
21
21
|
};
|
@@ -4,4 +4,4 @@
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
|
-
export declare const debounce: (func: any, delay: number, leading?: boolean) => () => void;
|
7
|
+
export declare const debounce: (func: any, delay: number, leading?: boolean) => (...args: []) => void;
|
@@ -18,12 +18,12 @@ var debounce = function debounce(func, delay) {
|
|
18
18
|
clearTimeout(timeout);
|
19
19
|
}
|
20
20
|
if (leading && !timeout) {
|
21
|
-
func.apply(
|
21
|
+
func.apply(void 0, args);
|
22
22
|
}
|
23
23
|
timeout = setTimeout(function () {
|
24
24
|
timeout = null;
|
25
25
|
if (!leading) {
|
26
|
-
func.apply(
|
26
|
+
func.apply(void 0, args);
|
27
27
|
}
|
28
28
|
}, delay);
|
29
29
|
};
|
@@ -5,6 +5,8 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
/**
|
8
|
+
* Ensures the requested `locale` is valid, else returns the default locale.
|
9
|
+
*
|
8
10
|
* Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales
|
9
11
|
*/
|
10
12
|
export declare const getSupportedLocale: (locale: Intl.LocalesArgument, defaultLocale?: string) => Intl.LocalesArgument;
|
@@ -18,7 +18,7 @@
|
|
18
18
|
var lastIndexInArray = function lastIndexInArray(array, key, value) {
|
19
19
|
for (var i = array.length - 1; i >= 0; i--) {
|
20
20
|
var _array$i;
|
21
|
-
if (((_array$i = array[i]) === null || _array$i ===
|
21
|
+
if (((_array$i = array[i]) === null || _array$i === void 0 ? void 0 : _array$i[key]) === value) {
|
22
22
|
return i + 1;
|
23
23
|
}
|
24
24
|
}
|
@@ -142,7 +142,7 @@ var allPropTypes = pconsole.default.shimIfProduction(function (arrayOfTypeChecke
|
|
142
142
|
}
|
143
143
|
var error = null;
|
144
144
|
arrayOfTypeCheckers.some(function (checker) {
|
145
|
-
return error = checker.apply(
|
145
|
+
return error = checker.apply(void 0, args);
|
146
146
|
});
|
147
147
|
return error;
|
148
148
|
};
|
@@ -61,7 +61,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
61
61
|
function _toPrimitive(t, r) {
|
62
62
|
if ("object" != _rollupPluginBabelHelpers.typeof(t) || !t) return t;
|
63
63
|
var e = t[Symbol.toPrimitive];
|
64
|
-
if (
|
64
|
+
if (void 0 !== e) {
|
65
65
|
var i = e.call(t, r);
|
66
66
|
if ("object" != _rollupPluginBabelHelpers.typeof(i)) return i;
|
67
67
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
@@ -99,7 +99,7 @@ function getAttributes() {
|
|
99
99
|
width = _ref.width,
|
100
100
|
height = _ref.height,
|
101
101
|
_ref$viewBox = _ref.viewBox,
|
102
|
-
viewBox = _ref$viewBox ===
|
102
|
+
viewBox = _ref$viewBox === void 0 ? "0 0 ".concat(width, " ").concat(height) : _ref$viewBox,
|
103
103
|
attributes = _objectWithoutProperties(_ref, _excluded);
|
104
104
|
var tabindex = attributes.tabindex,
|
105
105
|
rest = _objectWithoutProperties(attributes, _excluded2);
|
@@ -28,9 +28,9 @@ var Icon = /*#__PURE__*/React.forwardRef(function Icon(_ref, ref) {
|
|
28
28
|
children = _ref.children,
|
29
29
|
tabIndex = _ref.tabIndex,
|
30
30
|
_ref$xmlns = _ref.xmlns,
|
31
|
-
xmlns = _ref$xmlns ===
|
31
|
+
xmlns = _ref$xmlns === void 0 ? 'http://www.w3.org/2000/svg' : _ref$xmlns,
|
32
32
|
_ref$preserveAspectRa = _ref.preserveAspectRatio,
|
33
|
-
preserveAspectRatio = _ref$preserveAspectRa ===
|
33
|
+
preserveAspectRatio = _ref$preserveAspectRa === void 0 ? 'xMidYMid meet' : _ref$preserveAspectRa,
|
34
34
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
35
35
|
var _getAttributes = index.getAttributes(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rest), {}, {
|
36
36
|
tabindex: tabIndex
|