@carbon/ibm-products 2.54.0-canary.8 → 2.54.0-canary.80
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 +1399 -690
- 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 +987 -64
- 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 +610 -562
- 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 +692 -567
- 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 +1 -1
- package/es/components/APIKeyModal/APIKeyDownloader.d.ts +1 -1
- package/es/components/APIKeyModal/APIKeyDownloader.js +1 -1
- package/es/components/APIKeyModal/APIKeyModal.d.ts +13 -0
- package/es/components/APIKeyModal/APIKeyModal.js +85 -38
- package/es/components/APIKeyModal/APIKeyModal.types.d.ts +21 -3
- package/es/components/AboutModal/AboutModal.js +3 -6
- package/es/components/AddSelect/hooks/useFocus.js +1 -2
- package/es/components/AddSelect/hooks/useParentSelect.js +1 -2
- package/es/components/AddSelect/hooks/usePath.js +1 -2
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +18 -9
- package/es/components/Card/Card.d.ts +3 -3
- package/es/components/Card/Card.js +12 -12
- package/es/components/Card/CardHeader.d.ts +7 -7
- package/es/components/Card/CardHeader.js +14 -12
- package/es/components/Checklist/Checklist.js +1 -1
- package/es/components/Checklist/ChecklistIcon.js +1 -1
- package/es/components/Coachmark/Coachmark.d.ts +5 -0
- package/es/components/Coachmark/Coachmark.js +11 -3
- package/es/components/Coachmark/CoachmarkOverlay.js +4 -0
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +17 -0
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +57 -12
- package/es/components/CoachmarkStack/CoachmarkStackHome.d.ts +4 -0
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +18 -6
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -2
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +9 -5
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +1 -5
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +5 -5
- package/es/components/ConditionBuilder/utils/util.js +0 -4
- package/es/components/CreateTearsheet/CreateTearsheet.d.ts +1 -1
- package/es/components/CreateTearsheet/CreateTearsheet.js +4 -3
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +6 -3
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +31 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +1 -1
- package/es/components/Datagrid/useCustomizeColumns.js +4 -4
- package/es/components/Datagrid/useDatagrid.js +2 -2
- package/es/components/Datagrid/useDefaultStringRenderer.js +1 -2
- package/es/components/Datagrid/useEditableCell.js +1 -2
- package/es/components/Datagrid/useFlexResize.js +1 -2
- package/es/components/Datagrid/useFloatingScroll.js +1 -2
- package/es/components/Datagrid/useNestedRowExpander.js +1 -2
- package/es/components/Datagrid/useParentDimensions.js +1 -2
- package/es/components/Datagrid/useResizeTable.js +1 -2
- package/es/components/Datagrid/useRowExpander.js +1 -2
- package/es/components/Datagrid/useRowRenderer.js +1 -2
- package/es/components/Datagrid/useRowSize.js +1 -2
- package/es/components/Datagrid/useSkeletonRows.js +1 -2
- package/es/components/DecoratorDualButton/DecoratorDualButton.d.ts +1 -0
- package/es/components/DecoratorDualButton/DecoratorDualButton.js +5 -0
- package/es/components/DecoratorLink/DecoratorLink.d.ts +1 -0
- package/es/components/DecoratorLink/DecoratorLink.js +5 -0
- package/es/components/DecoratorSingleButton/DecoratorSingleButton.d.ts +1 -0
- package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +5 -0
- package/es/components/DescriptionList/DescriptionList.d.ts +1 -0
- package/es/components/DescriptionList/DescriptionList.js +5 -0
- package/es/components/EditFullPage/EditFullPage.d.ts +2 -0
- package/es/components/EditFullPage/EditFullPage.js +8 -0
- package/es/components/EditSidePanel/EditSidePanel.d.ts +2 -0
- package/es/components/EditSidePanel/EditSidePanel.js +8 -0
- package/es/components/EditTearsheet/EditTearsheet.d.ts +2 -0
- package/es/components/EditTearsheet/EditTearsheet.js +8 -0
- package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.d.ts +2 -0
- package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.js +8 -0
- package/es/components/EditUpdateCards/EditUpdateCards.d.ts +2 -0
- package/es/components/EditUpdateCards/EditUpdateCards.js +8 -0
- package/es/components/EmptyStates/EmptyStateIllustration.js +1 -2
- package/es/components/EmptyStates/EmptyStateV2.d.ts +1 -0
- package/es/components/EmptyStates/EmptyStateV2.js +7 -0
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/es/components/EmptyStates/assets/ErrorIllustration.js +3 -5
- package/es/components/EmptyStates/assets/NoDataIllustration.js +3 -5
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +3 -5
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +3 -5
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +3 -5
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +3 -5
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts +5 -5
- package/es/components/ExpressiveCard/ExpressiveCard.js +5 -5
- package/es/components/FilterPanel/FilterPanel.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanel.js +6 -0
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +5 -0
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +5 -1
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -0
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +5 -0
- package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +5 -0
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +5 -1
- package/es/components/FilterSummary/FilterSummary.js +1 -1
- package/es/components/FullPageError/FullPageError.js +7 -7
- package/es/components/FullPageError/assets/Error403SVG.d.ts +1 -3
- package/es/components/FullPageError/assets/Error403SVG.js +4 -6
- package/es/components/FullPageError/assets/Error404SVG.d.ts +1 -3
- package/es/components/FullPageError/assets/Error404SVG.js +4 -6
- package/es/components/FullPageError/assets/ErrorGenericSVG.d.ts +1 -3
- package/es/components/FullPageError/assets/ErrorGenericSVG.js +4 -6
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/es/components/InlineTip/InlineTip.d.ts +5 -0
- package/es/components/InlineTip/InlineTip.js +17 -8
- package/es/components/InterstitialScreen/InterstitialScreen.js +2 -3
- package/es/components/Nav/Nav.d.ts +3 -0
- package/es/components/Nav/Nav.js +8 -0
- package/es/components/Nav/NavItemLink.js +1 -2
- package/es/components/PageHeader/PageHeader.js +13 -3
- package/es/components/PageHeader/PageHeaderTitle.js +10 -29
- package/es/components/ProductiveCard/ProductiveCard.d.ts +9 -5
- package/es/components/ProductiveCard/ProductiveCard.js +11 -9
- package/es/components/SidePanel/SidePanel.d.ts +6 -1
- package/es/components/SidePanel/SidePanel.js +27 -14
- package/es/components/StatusIndicator/StatusIndicator.d.ts +1 -0
- package/es/components/StatusIndicator/StatusIndicator.js +5 -0
- package/es/components/StatusIndicator/StatusIndicatorStep.d.ts +1 -0
- package/es/components/StatusIndicator/StatusIndicatorStep.js +5 -0
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +3 -1
- package/es/components/TagOverflow/TagOverflow.js +2 -5
- package/es/components/Tearsheet/TearsheetShell.d.ts +4 -0
- package/es/components/Tearsheet/TearsheetShell.js +7 -60
- package/es/global/js/hooks/useFocus.d.ts +1 -0
- package/es/global/js/hooks/useFocus.js +24 -1
- package/es/global/js/hooks/usePrefersReducedMotion.js +1 -2
- package/es/global/js/package-settings.d.ts +1 -1
- package/es/global/js/package-settings.js +1 -1
- package/es/global/js/utils/checkForOverflow.d.ts +5 -0
- package/es/global/js/utils/checkForOverflow.js +31 -0
- package/es/index.js +1 -1
- package/es/settings.d.ts +1 -1
- package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/lib/components/APIKeyModal/APIKeyDownloader.d.ts +1 -1
- package/lib/components/APIKeyModal/APIKeyDownloader.js +1 -1
- package/lib/components/APIKeyModal/APIKeyModal.d.ts +13 -0
- package/lib/components/APIKeyModal/APIKeyModal.js +83 -34
- package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +21 -3
- package/lib/components/AboutModal/AboutModal.js +2 -5
- package/lib/components/AddSelect/hooks/useFocus.js +1 -2
- package/lib/components/AddSelect/hooks/useParentSelect.js +1 -2
- package/lib/components/AddSelect/hooks/usePath.js +1 -2
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +17 -8
- package/lib/components/Card/Card.d.ts +3 -3
- package/lib/components/Card/Card.js +12 -12
- package/lib/components/Card/CardHeader.d.ts +7 -7
- package/lib/components/Card/CardHeader.js +14 -12
- package/lib/components/Checklist/ChecklistChart.js +7 -7
- package/lib/components/Coachmark/Coachmark.d.ts +5 -0
- package/lib/components/Coachmark/Coachmark.js +11 -3
- package/lib/components/Coachmark/CoachmarkOverlay.js +4 -0
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +17 -0
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +56 -11
- package/lib/components/CoachmarkStack/CoachmarkStackHome.d.ts +4 -0
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +18 -6
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -2
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +9 -5
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +1 -5
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +5 -5
- package/lib/components/ConditionBuilder/utils/util.js +0 -4
- package/lib/components/CreateTearsheet/CreateTearsheet.d.ts +1 -1
- package/lib/components/CreateTearsheet/CreateTearsheet.js +4 -3
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +5 -2
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +30 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
- 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/RowSize/RowSizeDropdown.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +1 -1
- package/lib/components/Datagrid/useColumnOrder.js +1 -1
- package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -2
- package/lib/components/Datagrid/useEditableCell.js +1 -2
- package/lib/components/Datagrid/useFlexResize.js +1 -2
- package/lib/components/Datagrid/useFloatingScroll.js +1 -2
- package/lib/components/Datagrid/useNestedRowExpander.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 +1 -2
- package/lib/components/Datagrid/useRowRenderer.js +1 -2
- package/lib/components/Datagrid/useRowSize.js +1 -2
- package/lib/components/Datagrid/useSkeletonRows.js +1 -2
- package/lib/components/DecoratorDualButton/DecoratorDualButton.d.ts +1 -0
- package/lib/components/DecoratorDualButton/DecoratorDualButton.js +5 -0
- package/lib/components/DecoratorLink/DecoratorLink.d.ts +1 -0
- package/lib/components/DecoratorLink/DecoratorLink.js +5 -0
- package/lib/components/DecoratorSingleButton/DecoratorSingleButton.d.ts +1 -0
- package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +5 -0
- package/lib/components/DescriptionList/DescriptionList.d.ts +1 -0
- package/lib/components/DescriptionList/DescriptionList.js +5 -0
- package/lib/components/EditFullPage/EditFullPage.d.ts +2 -0
- package/lib/components/EditFullPage/EditFullPage.js +8 -0
- package/lib/components/EditSidePanel/EditSidePanel.d.ts +2 -0
- package/lib/components/EditSidePanel/EditSidePanel.js +8 -0
- package/lib/components/EditTearsheet/EditTearsheet.d.ts +2 -0
- package/lib/components/EditTearsheet/EditTearsheet.js +8 -0
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.d.ts +2 -0
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +8 -0
- package/lib/components/EditUpdateCards/EditUpdateCards.d.ts +2 -0
- package/lib/components/EditUpdateCards/EditUpdateCards.js +8 -0
- package/lib/components/EmptyStates/EmptyStateIllustration.js +1 -2
- package/lib/components/EmptyStates/EmptyStateV2.d.ts +1 -0
- package/lib/components/EmptyStates/EmptyStateV2.js +7 -0
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +2 -4
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +2 -4
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +2 -4
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +2 -4
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +2 -4
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +2 -4
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +5 -5
- package/lib/components/ExpressiveCard/ExpressiveCard.js +5 -5
- package/lib/components/FilterPanel/FilterPanel.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanel.js +6 -0
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +5 -0
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +5 -1
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -0
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +5 -0
- package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +5 -0
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +5 -1
- package/lib/components/FilterSummary/FilterSummary.js +1 -1
- package/lib/components/FullPageError/FullPageError.js +7 -7
- package/lib/components/FullPageError/assets/Error403SVG.d.ts +1 -3
- package/lib/components/FullPageError/assets/Error403SVG.js +4 -6
- package/lib/components/FullPageError/assets/Error404SVG.d.ts +1 -3
- package/lib/components/FullPageError/assets/Error404SVG.js +4 -6
- package/lib/components/FullPageError/assets/ErrorGenericSVG.d.ts +1 -3
- package/lib/components/FullPageError/assets/ErrorGenericSVG.js +4 -6
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/lib/components/InlineTip/InlineTip.d.ts +5 -0
- package/lib/components/InlineTip/InlineTip.js +17 -8
- package/lib/components/InterstitialScreen/InterstitialScreen.js +2 -3
- package/lib/components/Nav/Nav.d.ts +3 -0
- package/lib/components/Nav/Nav.js +8 -0
- package/lib/components/Nav/NavItemLink.js +1 -2
- package/lib/components/PageHeader/PageHeader.js +12 -2
- package/lib/components/PageHeader/PageHeaderTitle.js +8 -27
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +9 -5
- package/lib/components/ProductiveCard/ProductiveCard.js +11 -9
- package/lib/components/SidePanel/SidePanel.d.ts +6 -1
- package/lib/components/SidePanel/SidePanel.js +27 -14
- package/lib/components/StatusIndicator/StatusIndicator.d.ts +1 -0
- package/lib/components/StatusIndicator/StatusIndicator.js +5 -0
- package/lib/components/StatusIndicator/StatusIndicatorStep.d.ts +1 -0
- package/lib/components/StatusIndicator/StatusIndicatorStep.js +5 -0
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +3 -1
- package/lib/components/TagOverflow/TagOverflow.js +1 -4
- package/lib/components/Tearsheet/TearsheetShell.d.ts +4 -0
- package/lib/components/Tearsheet/TearsheetShell.js +6 -59
- package/lib/global/js/hooks/useFocus.d.ts +1 -0
- package/lib/global/js/hooks/useFocus.js +24 -0
- package/lib/global/js/hooks/usePrefersReducedMotion.js +1 -2
- package/lib/global/js/package-settings.d.ts +1 -1
- package/lib/global/js/package-settings.js +1 -1
- package/lib/global/js/utils/checkForOverflow.d.ts +5 -0
- package/lib/global/js/utils/checkForOverflow.js +34 -0
- package/lib/index.js +109 -109
- package/lib/settings.d.ts +1 -1
- package/package.json +11 -11
- package/scss/components/APIKeyModal/_api-key-modal.scss +4 -0
- package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +3 -3
- package/scss/components/Card/_card.scss +19 -5
- package/scss/components/Coachmark/_coachmark-overlay.scss +2 -2
- package/scss/components/Coachmark/_coachmark-tagline.scss +1 -1
- package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +3 -3
- package/scss/components/CoachmarkStack/_coachmark-stack.scss +2 -2
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +7 -7
- package/scss/components/CreateInfluencer/_create-influencer.scss +2 -2
- package/scss/components/CreateTearsheet/_create-tearsheet.scss +1 -2
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +4 -4
- package/scss/components/Datagrid/styles/_datagrid.scss +21 -14
- package/scss/components/Datagrid/styles/_draggableElement.scss +2 -2
- package/scss/components/Datagrid/styles/_useColumnRightAlign.scss +1 -1
- package/scss/components/Datagrid/styles/_useExpandedRow.scss +1 -1
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +1 -1
- package/scss/components/Datagrid/styles/_useNestedRows.scss +2 -2
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +2 -2
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +1 -1
- package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +1 -1
- package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +1 -1
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +1 -2
- package/scss/components/DecoratorBase/_decorator-base-mixins.scss +1 -1
- package/scss/components/DecoratorBase/_decorator-base.scss +3 -3
- package/scss/components/DecoratorDualButton/_decorator-dual-button.scss +1 -1
- package/scss/components/DecoratorSingleButton/_decorator-single-button.scss +1 -1
- package/scss/components/EditTearsheet/_edit-tearsheet.scss +1 -2
- package/scss/components/EditUpdateCards/_edit-update-cards.scss +7 -7
- package/scss/components/FullPageError/_full-page-error.scss +1 -1
- package/scss/components/GetStartedCard/_get-started-card.scss +1 -1
- package/scss/components/Guidebanner/_guidebanner.scss +4 -4
- package/scss/components/HTTPErrors/_http-errors.scss +1 -1
- package/scss/components/InlineTip/_inline-tip.scss +4 -4
- package/scss/components/InterstitialScreen/_interstitial-screen.scss +6 -6
- package/scss/components/NonLinearReading/_non-linear-reading.scss +2 -2
- package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -3
- package/scss/components/OptionsTile/_options-tile.scss +6 -8
- package/scss/components/PageHeader/_page-header.scss +38 -19
- package/scss/components/ProductiveCard/_productive-card.scss +2 -2
- package/scss/components/SidePanel/_side-panel.scss +24 -17
- package/scss/components/StatusIcon/_status-icon.scss +9 -7
- package/scss/components/StatusIndicator/_status-indicator.scss +1 -1
- package/scss/components/Tearsheet/_tearsheet.scss +5 -5
- package/scss/components/UserAvatar/_user-avatar.scss +5 -3
- package/scss/components/UserProfileImage/_user-profile-image.scss +6 -4
- package/scss/components/WebTerminal/_web-terminal.scss +2 -2
- package/scss/components/_index-released-only.scss +1 -0
- package/telemetry.yml +3 -0
@@ -9,10 +9,10 @@
|
|
9
9
|
|
10
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
11
11
|
var React = require('react');
|
12
|
-
var index
|
12
|
+
var index = require('../../_virtual/index.js');
|
13
13
|
var cx = require('classnames');
|
14
14
|
var clamp = require('lodash/clamp');
|
15
|
-
var index = require('../../node_modules/@carbon/colors/es/index.js');
|
15
|
+
var index$1 = require('../../node_modules/@carbon/colors/es/index.js');
|
16
16
|
var devtools = require('../../global/js/utils/devtools.js');
|
17
17
|
var settings = require('../../settings.js');
|
18
18
|
var Checklist_types = require('./Checklist.types.js');
|
@@ -38,8 +38,8 @@ function (_ref, ref) {
|
|
38
38
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
39
39
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
40
40
|
var numDegrees = clamp(value * 360, 0, 360);
|
41
|
-
var circleColor = theme === Checklist_types.Themes.light ? index.gray20 : index.gray70; // $ui-03 (-ish)
|
42
|
-
var progressColor = index.purple50;
|
41
|
+
var circleColor = theme === Checklist_types.Themes.light ? index$1.gray20 : index$1.gray70; // $ui-03 (-ish)
|
42
|
+
var progressColor = index$1.purple50;
|
43
43
|
React.useEffect(function () {
|
44
44
|
var ele = document.getElementsByClassName("".concat(blockClass));
|
45
45
|
setTimeout(function () {
|
@@ -75,15 +75,15 @@ ChecklistChart.propTypes = {
|
|
75
75
|
/**
|
76
76
|
* Optional class name for this component.
|
77
77
|
*/
|
78
|
-
className: index
|
78
|
+
className: index.default.string,
|
79
79
|
/**
|
80
80
|
* Determines the theme of the component.
|
81
81
|
*/
|
82
|
-
theme: index
|
82
|
+
theme: index.default.oneOf([Checklist_types.Themes.light, Checklist_types.Themes.dark]),
|
83
83
|
/**
|
84
84
|
* Number between 0 and 1.
|
85
85
|
*/
|
86
|
-
value: index
|
86
|
+
value: index.default.number.isRequired
|
87
87
|
};
|
88
88
|
|
89
89
|
exports.ChecklistChart = ChecklistChart;
|
@@ -65,6 +65,11 @@ export interface CoachmarkProps {
|
|
65
65
|
* Determines the theme of the component.
|
66
66
|
*/
|
67
67
|
theme?: 'light' | 'dark';
|
68
|
+
/**
|
69
|
+
* Determines if the coachmark is open by default.
|
70
|
+
* Does nothing if `overlayKind=stacked`.
|
71
|
+
*/
|
72
|
+
isOpenByDefault?: boolean;
|
68
73
|
}
|
69
74
|
/**
|
70
75
|
* Coachmarks are used to call out specific functionality or concepts
|
@@ -22,7 +22,7 @@ var lodash = require('lodash');
|
|
22
22
|
var react = require('@carbon/react');
|
23
23
|
var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
|
24
24
|
|
25
|
-
var _excluded = ["align", "autoAlign", "children", "className", "onClose", "overlayClassName", "overlayKind", "overlayRef", "positionTune", "portalTarget", "target", "theme"];
|
25
|
+
var _excluded = ["align", "autoAlign", "children", "className", "onClose", "overlayClassName", "overlayKind", "overlayRef", "positionTune", "portalTarget", "target", "theme", "isOpenByDefault"];
|
26
26
|
|
27
27
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
28
28
|
var blockClass = "".concat(settings.pkg.prefix, "--coachmark");
|
@@ -32,7 +32,8 @@ var defaults = {
|
|
32
32
|
align: 'bottom',
|
33
33
|
onClose: function onClose() {},
|
34
34
|
overlayKind: 'tooltip',
|
35
|
-
theme: 'light'
|
35
|
+
theme: 'light',
|
36
|
+
isOpenByDefault: false
|
36
37
|
};
|
37
38
|
/**
|
38
39
|
* Coachmarks are used to call out specific functionality or concepts
|
@@ -57,10 +58,12 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
57
58
|
target = _ref.target,
|
58
59
|
_ref$theme = _ref.theme,
|
59
60
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
61
|
+
_ref$isOpenByDefault = _ref.isOpenByDefault,
|
62
|
+
isOpenByDefault = _ref$isOpenByDefault === void 0 ? defaults.isOpenByDefault : _ref$isOpenByDefault,
|
60
63
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
61
64
|
var isBeacon = overlayKind === enums.COACHMARK_OVERLAY_KIND.TOOLTIP;
|
62
65
|
var isStacked = overlayKind === enums.COACHMARK_OVERLAY_KIND.STACKED;
|
63
|
-
var _useState = React.useState(isStacked),
|
66
|
+
var _useState = React.useState(isStacked || isOpenByDefault),
|
64
67
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
65
68
|
isOpen = _useState2[0],
|
66
69
|
setIsOpen = _useState2[1];
|
@@ -252,6 +255,11 @@ exports.Coachmark.propTypes = {
|
|
252
255
|
* Optional class name for this component.
|
253
256
|
*/
|
254
257
|
className: index.default.string,
|
258
|
+
/**
|
259
|
+
* Determines if the coachmark is open by default.
|
260
|
+
* Does nothing if `overlayKind=stacked`.
|
261
|
+
*/
|
262
|
+
isOpenByDefault: index.default.bool,
|
255
263
|
/**
|
256
264
|
* Function to call when the Coachmark closes.
|
257
265
|
*/
|
@@ -62,6 +62,7 @@ exports.CoachmarkOverlay = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
62
62
|
var handleKeyPress = function handleKeyPress(event) {
|
63
63
|
var shiftKey = event.shiftKey,
|
64
64
|
key = event.key;
|
65
|
+
/* istanbul ignore next */
|
65
66
|
if (key === 'Enter' || key === ' ') {
|
66
67
|
setA11yDragMode(function (prevVal) {
|
67
68
|
return !prevVal;
|
@@ -105,6 +106,8 @@ exports.CoachmarkOverlay = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
105
106
|
}
|
106
107
|
return style;
|
107
108
|
}, [isBeacon, isDraggable, coachmark, kind]);
|
109
|
+
|
110
|
+
/* istanbul ignore next */
|
108
111
|
function handleDragBounds(x, y) {
|
109
112
|
var xRes = x;
|
110
113
|
var yRes = y;
|
@@ -193,6 +196,7 @@ var useWindowDimensions = function useWindowDimensions() {
|
|
193
196
|
windowDimensions = _useState4[0],
|
194
197
|
setWindowDimensions = _useState4[1];
|
195
198
|
React.useEffect(function () {
|
199
|
+
/* istanbul ignore next */
|
196
200
|
function handleResize() {
|
197
201
|
setWindowDimensions(getWindowDimensions());
|
198
202
|
}
|
@@ -24,11 +24,16 @@ export interface CoachmarkOverlayElementsProps {
|
|
24
24
|
* The object describing an image in one of two shapes.
|
25
25
|
* If a single media element is required, use `{render}`.
|
26
26
|
* If a stepped animation is required, use `{filePaths}`.
|
27
|
+
* * @deprecated please use the `renderMedia` prop
|
27
28
|
*/
|
28
29
|
media?: {
|
29
30
|
render?: () => ReactNode;
|
30
31
|
filePaths?: string[];
|
31
32
|
};
|
33
|
+
/**
|
34
|
+
* Optional prop to render any media like images or any animated media.
|
35
|
+
*/
|
36
|
+
renderMedia?: (params: any) => ReactNode;
|
32
37
|
/**
|
33
38
|
* The label for the Next button.
|
34
39
|
*/
|
@@ -41,6 +46,18 @@ export interface CoachmarkOverlayElementsProps {
|
|
41
46
|
* The label for the Close button.
|
42
47
|
*/
|
43
48
|
closeButtonLabel?: string;
|
49
|
+
/**
|
50
|
+
* Callback called when clicking on the Next button.
|
51
|
+
*/
|
52
|
+
onNext?: () => void;
|
53
|
+
/**
|
54
|
+
* Callback called when clicking on the Previous button.
|
55
|
+
*/
|
56
|
+
onBack?: () => void;
|
57
|
+
/**
|
58
|
+
* Current step of the coachmarks.
|
59
|
+
*/
|
60
|
+
currentStep?: number;
|
44
61
|
}
|
45
62
|
/**
|
46
63
|
* Composable container to allow for the displaying of CoachmarkOverlayElement
|
@@ -22,7 +22,7 @@ var settings = require('../../settings.js');
|
|
22
22
|
require('../Coachmark/Coachmark.js');
|
23
23
|
var context = require('../Coachmark/utils/context.js');
|
24
24
|
|
25
|
-
var _excluded = ["className", "children", "isVisible", "media", "nextButtonText", "previousButtonLabel", "closeButtonLabel"];
|
25
|
+
var _excluded = ["className", "children", "isVisible", "media", "renderMedia", "currentStep", "nextButtonText", "previousButtonLabel", "closeButtonLabel", "onNext", "onBack"];
|
26
26
|
|
27
27
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
28
28
|
var blockClass = "".concat(settings.pkg.prefix, "--coachmark-overlay-elements");
|
@@ -43,7 +43,10 @@ var defaults = {
|
|
43
43
|
isVisible: false,
|
44
44
|
nextButtonText: 'Next',
|
45
45
|
previousButtonLabel: 'Back',
|
46
|
-
closeButtonLabel: 'Got it'
|
46
|
+
closeButtonLabel: 'Got it',
|
47
|
+
onNext: undefined,
|
48
|
+
onBack: undefined,
|
49
|
+
currentStep: 0
|
47
50
|
};
|
48
51
|
/**
|
49
52
|
* Composable container to allow for the displaying of CoachmarkOverlayElement
|
@@ -55,12 +58,19 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
55
58
|
_ref$isVisible = _ref.isVisible,
|
56
59
|
isVisible = _ref$isVisible === void 0 ? defaults.isVisible : _ref$isVisible,
|
57
60
|
media = _ref.media,
|
61
|
+
renderMedia = _ref.renderMedia,
|
62
|
+
_ref$currentStep = _ref.currentStep,
|
63
|
+
currentStep = _ref$currentStep === void 0 ? defaults.currentStep : _ref$currentStep,
|
58
64
|
_ref$nextButtonText = _ref.nextButtonText,
|
59
65
|
nextButtonText = _ref$nextButtonText === void 0 ? defaults.nextButtonText : _ref$nextButtonText,
|
60
66
|
_ref$previousButtonLa = _ref.previousButtonLabel,
|
61
67
|
previousButtonLabel = _ref$previousButtonLa === void 0 ? defaults.previousButtonLabel : _ref$previousButtonLa,
|
62
68
|
_ref$closeButtonLabel = _ref.closeButtonLabel,
|
63
69
|
closeButtonLabel = _ref$closeButtonLabel === void 0 ? defaults.closeButtonLabel : _ref$closeButtonLabel,
|
70
|
+
_ref$onNext = _ref.onNext,
|
71
|
+
onNext = _ref$onNext === void 0 ? defaults.onNext : _ref$onNext,
|
72
|
+
_ref$onBack = _ref.onBack,
|
73
|
+
onBack = _ref$onBack === void 0 ? defaults.onBack : _ref$onBack,
|
64
74
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
65
75
|
var buttonFocusRef = React.useRef(undefined);
|
66
76
|
var scrollRef = React.useRef(undefined);
|
@@ -68,11 +78,12 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
68
78
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
69
79
|
scrollPosition = _useState2[0],
|
70
80
|
setScrollPosition = _useState2[1];
|
71
|
-
var _useState3 = React.useState(
|
81
|
+
var _useState3 = React.useState(currentStep),
|
72
82
|
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
73
83
|
currentProgStep = _useState4[0],
|
74
84
|
_setCurrentProgStep = _useState4[1];
|
75
85
|
var coachmark = context.useCoachmark();
|
86
|
+
var hasMedia = media || renderMedia;
|
76
87
|
var setCurrentProgStep = function setCurrentProgStep(value) {
|
77
88
|
if (currentProgStep > 0 && value === 0 && buttonFocusRef.current) {
|
78
89
|
setTimeout(function () {
|
@@ -85,6 +96,20 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
85
96
|
var numProgSteps = React.Children.count(children);
|
86
97
|
var progStepFloor = 0;
|
87
98
|
var progStepCeil = numProgSteps - 1;
|
99
|
+
var renderMediaContent = React.useMemo(function () {
|
100
|
+
return renderMedia === null || renderMedia === void 0 ? void 0 : renderMedia({
|
101
|
+
playStep: currentProgStep
|
102
|
+
});
|
103
|
+
}, [currentProgStep, renderMedia]);
|
104
|
+
React.useEffect(function () {
|
105
|
+
var _scrollRef$current, _scrollRef$current$sc;
|
106
|
+
// When current step is set by props
|
107
|
+
// scroll to the appropriate view on the carrousel
|
108
|
+
var targetStep = lodash.clamp(currentStep, progStepFloor, progStepCeil);
|
109
|
+
scrollRef === null || scrollRef === void 0 || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || (_scrollRef$current$sc = _scrollRef$current.scrollToView) === null || _scrollRef$current$sc === void 0 || _scrollRef$current$sc.call(_scrollRef$current, targetStep);
|
110
|
+
// Avoid circular call to this hook
|
111
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
112
|
+
}, [currentStep]);
|
88
113
|
React.useEffect(function () {
|
89
114
|
// On mount, one of the two primary buttons ("next" or "close")
|
90
115
|
// will be rendered and must have focus. (a11y)
|
@@ -113,18 +138,19 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
113
138
|
// example: [`${blockClass}__here-if-small`]: size === 'sm',
|
114
139
|
}),
|
115
140
|
ref: ref
|
116
|
-
}, devtools.getDevtoolsProps(componentName)),
|
141
|
+
}, devtools.getDevtoolsProps(componentName)), hasMedia && (media === null || media === void 0 ? void 0 : media.render) && media.render(), hasMedia && (media === null || media === void 0 ? void 0 : media.filePaths) && /*#__PURE__*/React.createElement(SteppedAnimatedMedia.SteppedAnimatedMedia, {
|
117
142
|
className: "".concat(blockClass, "__element-stepped-media"),
|
118
143
|
filePaths: media.filePaths,
|
119
144
|
playStep: currentProgStep
|
120
|
-
})
|
145
|
+
}), hasMedia && renderMedia && /*#__PURE__*/React.createElement("div", {
|
146
|
+
className: "".concat(blockClass, "__element-stepped-media")
|
147
|
+
}, renderMediaContent), numProgSteps === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, children, closeButtonLabel && /*#__PURE__*/React.createElement("div", {
|
121
148
|
className: cx("".concat(blockClass, "__footer"), 'coachmark-carousel-controls')
|
122
149
|
}, /*#__PURE__*/React.createElement(react.Button, _rollupPluginBabelHelpers.extends({
|
123
150
|
size: "sm"
|
124
151
|
}, coachmark.closeButtonProps, {
|
125
152
|
ref: buttonFocusRef
|
126
153
|
}), closeButtonLabel))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Carousel.Carousel, {
|
127
|
-
disableArrowScroll: true,
|
128
154
|
ref: scrollRef,
|
129
155
|
onScroll: function onScroll(scrollPercent) {
|
130
156
|
setScrollPosition(scrollPercent);
|
@@ -139,10 +165,11 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
139
165
|
title: previousButtonLabel,
|
140
166
|
disabled: scrollPosition === 0,
|
141
167
|
onClick: function onClick() {
|
142
|
-
var _scrollRef$
|
168
|
+
var _scrollRef$current2, _scrollRef$current2$s;
|
143
169
|
var targetStep = lodash.clamp(currentProgStep - 1, progStepFloor, progStepCeil);
|
144
|
-
scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
170
|
+
scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 || (_scrollRef$current2$s = _scrollRef$current2.scrollToView) === null || _scrollRef$current2$s === void 0 || _scrollRef$current2$s.call(_scrollRef$current2, targetStep);
|
145
171
|
setCurrentProgStep(targetStep);
|
172
|
+
onBack === null || onBack === void 0 || onBack();
|
146
173
|
}
|
147
174
|
}, previousButtonLabel), currentProgStep < progStepCeil ? /*#__PURE__*/React.createElement(react.Button, {
|
148
175
|
size: "sm",
|
@@ -150,10 +177,11 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
150
177
|
title: nextButtonText,
|
151
178
|
disabled: scrollPosition === 1,
|
152
179
|
onClick: function onClick() {
|
153
|
-
var _scrollRef$
|
180
|
+
var _scrollRef$current3, _scrollRef$current3$s;
|
154
181
|
var targetStep = lodash.clamp(currentProgStep + 1, progStepFloor, progStepCeil);
|
155
|
-
scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
182
|
+
scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 || (_scrollRef$current3$s = _scrollRef$current3.scrollToView) === null || _scrollRef$current3$s === void 0 || _scrollRef$current3$s.call(_scrollRef$current3, targetStep);
|
156
183
|
setCurrentProgStep(targetStep);
|
184
|
+
onNext === null || onNext === void 0 || onNext();
|
157
185
|
}
|
158
186
|
}, nextButtonText) : closeButtonLabel && /*#__PURE__*/React.createElement(react.Button, _rollupPluginBabelHelpers.extends({
|
159
187
|
size: "sm",
|
@@ -187,6 +215,10 @@ exports.CoachmarkOverlayElements.propTypes = {
|
|
187
215
|
* The label for the Close button.
|
188
216
|
*/
|
189
217
|
closeButtonLabel: index.default.string,
|
218
|
+
/**
|
219
|
+
* Current step of the coachmarks
|
220
|
+
*/
|
221
|
+
currentStep: index.default.number,
|
190
222
|
/**
|
191
223
|
* The visibility of CoachmarkOverlayElements is
|
192
224
|
* managed in the parent component.
|
@@ -196,6 +228,7 @@ exports.CoachmarkOverlayElements.propTypes = {
|
|
196
228
|
* The object describing an image in one of two shapes.
|
197
229
|
* If a single media element is required, use `{render}`.
|
198
230
|
* If a stepped animation is required, use `{filePaths}`.
|
231
|
+
* @deprecated please use the `renderMedia` prop
|
199
232
|
*/
|
200
233
|
/**@ts-ignore*/
|
201
234
|
media: index.default.oneOfType([index.default.shape({
|
@@ -207,8 +240,20 @@ exports.CoachmarkOverlayElements.propTypes = {
|
|
207
240
|
* The label for the Next button.
|
208
241
|
*/
|
209
242
|
nextButtonText: index.default.string,
|
243
|
+
/**
|
244
|
+
* Optional callback called when clicking on the Previous button.
|
245
|
+
*/
|
246
|
+
onBack: index.default.func,
|
247
|
+
/**
|
248
|
+
* Optional callback called when clicking on the Next button.
|
249
|
+
*/
|
250
|
+
onNext: index.default.func,
|
210
251
|
/**
|
211
252
|
* The label for the Previous button.
|
212
253
|
*/
|
213
|
-
previousButtonLabel: index.default.string
|
254
|
+
previousButtonLabel: index.default.string,
|
255
|
+
/**
|
256
|
+
* Optional prop to render any media like images or animated media.
|
257
|
+
*/
|
258
|
+
renderMedia: index.default.func
|
214
259
|
};
|
@@ -39,6 +39,10 @@ interface CoachmarkStackHomeProps {
|
|
39
39
|
* @see {@link MEDIA_PROP_TYPE}.
|
40
40
|
*/
|
41
41
|
media?: Media;
|
42
|
+
/**
|
43
|
+
* Optional prop to render any media like images or any animated media.
|
44
|
+
*/
|
45
|
+
renderMedia?: (params: any) => ReactNode;
|
42
46
|
/**
|
43
47
|
* The labels used to link to the stackable Coachmarks.
|
44
48
|
*/
|
@@ -19,9 +19,10 @@ var settings = require('../../settings.js');
|
|
19
19
|
var reactDom = require('react-dom');
|
20
20
|
var CoachmarkHeader = require('../Coachmark/CoachmarkHeader.js');
|
21
21
|
var SteppedAnimatedMedia = require('../SteppedAnimatedMedia/SteppedAnimatedMedia.js');
|
22
|
+
var propsHelper = require('../../global/js/utils/props-helper.js');
|
22
23
|
var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
|
23
24
|
|
24
|
-
var _excluded = ["className", "description", "isOpen", "media", "navLinkLabels", "onClickNavItem", "onClose", "portalTarget", "closeButtonLabel", "title"];
|
25
|
+
var _excluded = ["className", "description", "isOpen", "media", "renderMedia", "navLinkLabels", "onClickNavItem", "onClose", "portalTarget", "closeButtonLabel", "title"];
|
25
26
|
// Carbon and package components we use.
|
26
27
|
/* TODO: @import(s) of carbon components and other package components. */
|
27
28
|
|
@@ -39,6 +40,7 @@ exports.CoachmarkStackHome = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
39
40
|
description = _ref.description,
|
40
41
|
isOpen = _ref.isOpen,
|
41
42
|
media = _ref.media,
|
43
|
+
renderMedia = _ref.renderMedia,
|
42
44
|
navLinkLabels = _ref.navLinkLabels,
|
43
45
|
onClickNavItem = _ref.onClickNavItem,
|
44
46
|
_onClose = _ref.onClose,
|
@@ -51,6 +53,7 @@ exports.CoachmarkStackHome = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
51
53
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
52
54
|
linkFocusIndex = _useState2[0],
|
53
55
|
setLinkFocusIndex = _useState2[1];
|
56
|
+
var hasMedia = media || renderMedia;
|
54
57
|
React.useEffect(function () {
|
55
58
|
setTimeout(function () {
|
56
59
|
if (isOpen && buttonFocusRef.current) {
|
@@ -92,13 +95,17 @@ exports.CoachmarkStackHome = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
92
95
|
className: "".concat(overlayClass, "__body")
|
93
96
|
}, /*#__PURE__*/React.createElement("div", {
|
94
97
|
className: "".concat(overlayClass, "-element")
|
95
|
-
}, !
|
98
|
+
}, !hasMedia && /*#__PURE__*/React.createElement(icons.Idea, {
|
96
99
|
size: 20,
|
97
100
|
className: "".concat(blockClass, "__icon-idea")
|
98
|
-
}),
|
99
|
-
className: "".concat(
|
101
|
+
}), hasMedia && (media === null || media === void 0 ? void 0 : media.render) && media.render(), hasMedia && (media === null || media === void 0 ? void 0 : media.filePaths) && /*#__PURE__*/React.createElement(SteppedAnimatedMedia.SteppedAnimatedMedia, {
|
102
|
+
className: "".concat(blockClass, "__element-stepped-media"),
|
100
103
|
filePaths: media.filePaths,
|
101
104
|
playStep: 0
|
105
|
+
}), hasMedia && renderMedia && /*#__PURE__*/React.createElement("div", {
|
106
|
+
className: "".concat(blockClass, "__element-stepped-media")
|
107
|
+
}, renderMedia({
|
108
|
+
playStep: 0
|
102
109
|
})), /*#__PURE__*/React.createElement("div", {
|
103
110
|
className: "".concat(overlayClass, "-element__content")
|
104
111
|
}, title && /*#__PURE__*/React.createElement("h2", {
|
@@ -158,12 +165,13 @@ exports.CoachmarkStackHome.propTypes = {
|
|
158
165
|
* If a stepped animation is required, use `{filePaths}`.
|
159
166
|
*
|
160
167
|
* @see {@link MEDIA_PROP_TYPE}.
|
168
|
+
* @deprecated please use the `renderMedia` prop
|
161
169
|
*/
|
162
|
-
media: index.default.oneOfType([index.default.shape({
|
170
|
+
media: propsHelper.deprecateProp(index.default.oneOfType([index.default.shape({
|
163
171
|
render: index.default.func
|
164
172
|
}), index.default.shape({
|
165
173
|
filePaths: index.default.arrayOf(index.default.string)
|
166
|
-
})]),
|
174
|
+
})]), ''),
|
167
175
|
/**
|
168
176
|
* The labels used to link to the stackable Coachmarks.
|
169
177
|
*/
|
@@ -187,6 +195,10 @@ exports.CoachmarkStackHome.propTypes = {
|
|
187
195
|
* element is hidden or component is unmounted, the CoachmarkStackHome will disappear.
|
188
196
|
*/
|
189
197
|
portalTarget: index.default.string,
|
198
|
+
/**
|
199
|
+
* Optional prop to render any media like images or animated media.
|
200
|
+
*/
|
201
|
+
renderMedia: index.default.func,
|
190
202
|
/**
|
191
203
|
* The title of the Coachmark.
|
192
204
|
*/
|
@@ -76,8 +76,7 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
76
76
|
}, [actionState]);
|
77
77
|
React.useEffect(function () {
|
78
78
|
if (initialState !== null && initialState !== void 0 && initialState.enabledDefault) {
|
79
|
-
setRootState === null || setRootState === void 0 || setRootState(
|
80
|
-
initialConditionState.current = null;
|
79
|
+
setRootState === null || setRootState === void 0 || setRootState(initialState.state);
|
81
80
|
}
|
82
81
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
83
82
|
}, [initialState]);
|
@@ -96,11 +95,16 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
96
95
|
};
|
97
96
|
var _onRemove = React.useCallback(function (groupId) {
|
98
97
|
var _rootState$groups2;
|
98
|
+
var groups = rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.filter(function (group) {
|
99
|
+
return groupId !== (group === null || group === void 0 ? void 0 : group.id);
|
100
|
+
});
|
99
101
|
setRootState === null || setRootState === void 0 || setRootState(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rootState), {}, {
|
100
|
-
groups: rootState ?
|
101
|
-
return groupId !== (group === null || group === void 0 ? void 0 : group.id);
|
102
|
-
}) : []
|
102
|
+
groups: rootState ? groups : []
|
103
103
|
}));
|
104
|
+
//set the initial state to empty.
|
105
|
+
if ((groups === null || groups === void 0 ? void 0 : groups.length) === 0) {
|
106
|
+
initialConditionState.current = null;
|
107
|
+
}
|
104
108
|
}, [setRootState, rootState]);
|
105
109
|
var onChangeHandler = function onChangeHandler(updatedGroup, groupIndex) {
|
106
110
|
/**
|
@@ -65,9 +65,6 @@ var ItemOption = function ItemOption(_ref) {
|
|
65
65
|
className: "".concat(util.blockClass, "__statement_wrapper")
|
66
66
|
}, /*#__PURE__*/React.createElement("div", null, option.text1, " (", option.connector, ")"), /*#__PURE__*/React.createElement("div", null, option.text2));
|
67
67
|
};
|
68
|
-
var preventDefault = function preventDefault(evt) {
|
69
|
-
return evt.preventDefault();
|
70
|
-
};
|
71
68
|
if (!allOptions) {
|
72
69
|
return;
|
73
70
|
}
|
@@ -80,8 +77,7 @@ var ItemOption = function ItemOption(_ref) {
|
|
80
77
|
size: "sm",
|
81
78
|
labelText: clearSearchText,
|
82
79
|
closeButtonLabelText: clearSearchText,
|
83
|
-
onChange: onSearchChangeHandler
|
84
|
-
onKeyDown: preventDefault
|
80
|
+
onChange: onSearchChangeHandler
|
85
81
|
})), /*#__PURE__*/React.createElement("ul", {
|
86
82
|
"aria-label": getAriaLabel(),
|
87
83
|
role: "listbox"
|
@@ -131,13 +131,14 @@ var ItemOptionForValueField = function ItemOptionForValueField(_ref) {
|
|
131
131
|
} else {
|
132
132
|
onChange(option, evt);
|
133
133
|
}
|
134
|
+
if (evt.target instanceof SVGElement) {
|
135
|
+
evt.stopPropagation();
|
136
|
+
//stop propagate event , since this closes the popover when clicked on checkboxes which are SVGs.
|
137
|
+
}
|
134
138
|
};
|
135
139
|
var getAriaLabel = function getAriaLabel() {
|
136
140
|
return conditionState.label ? conditionState.label : conditionState.property ? conditionState.property : propertyText;
|
137
141
|
};
|
138
|
-
var preventDefault = function preventDefault(evt) {
|
139
|
-
return evt.preventDefault();
|
140
|
-
};
|
141
142
|
if (!allOptions) {
|
142
143
|
return _SelectSkeleton || (_SelectSkeleton = /*#__PURE__*/React.createElement(react.SelectSkeleton, null));
|
143
144
|
}
|
@@ -150,8 +151,7 @@ var ItemOptionForValueField = function ItemOptionForValueField(_ref) {
|
|
150
151
|
size: "sm",
|
151
152
|
labelText: clearSearchText,
|
152
153
|
closeButtonLabelText: clearSearchText,
|
153
|
-
onChange: onSearchChangeHandler
|
154
|
-
onKeyDown: preventDefault
|
154
|
+
onChange: onSearchChangeHandler
|
155
155
|
})), multiSelectable && /*#__PURE__*/React.createElement("div", {
|
156
156
|
className: "".concat(util.blockClass, "__multiselectSelectionStatusContainer")
|
157
157
|
}, /*#__PURE__*/React.createElement("h4", null, /*#__PURE__*/React.createElement("label", null, selection.length, "/", allOptions.length, " Selected")), /*#__PURE__*/React.createElement(react.Button, {
|
@@ -50,10 +50,6 @@ var traverseReverse = function traverseReverse(eachElem, index, allElements, rot
|
|
50
50
|
}
|
51
51
|
};
|
52
52
|
var checkForHoldingKey = function checkForHoldingKey(evt, key) {
|
53
|
-
// possible key inputs: altKey,ctrlKey,metaKey,shiftKey
|
54
|
-
if (key === 'cmd') {
|
55
|
-
return evt.metaKey || evt.ctrlKey;
|
56
|
-
}
|
57
53
|
return evt[key];
|
58
54
|
};
|
59
55
|
var checkIsValid = function checkIsValid(item) {
|
@@ -8,7 +8,7 @@ import React, { Dispatch, PropsWithChildren, ReactNode, SetStateAction } from 'r
|
|
8
8
|
import { ExperimentalSecondarySubmit } from './CreateTearsheetStep';
|
9
9
|
export interface StepsContextType {
|
10
10
|
currentStep: number;
|
11
|
-
setExperimentalSecondarySubmit: Dispatch<SetStateAction<ExperimentalSecondarySubmit>>;
|
11
|
+
setExperimentalSecondarySubmit: Dispatch<SetStateAction<ExperimentalSecondarySubmit | undefined>>;
|
12
12
|
setIsDisabled: Dispatch<SetStateAction<boolean>>;
|
13
13
|
setOnPrevious: (fn: any) => void;
|
14
14
|
setOnNext: (fn: any) => void;
|
@@ -107,7 +107,7 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
107
107
|
_useState24 = _rollupPluginBabelHelpers.slicedToArray(_useState23, 2),
|
108
108
|
lastIncludedStep = _useState24[0],
|
109
109
|
setLastIncludedStep = _useState24[1];
|
110
|
-
var _useState25 = React.useState(
|
110
|
+
var _useState25 = React.useState(),
|
111
111
|
_useState26 = _rollupPluginBabelHelpers.slicedToArray(_useState25, 2),
|
112
112
|
experimentalSecondarySubmit = _useState26[0],
|
113
113
|
setExperimentalSecondarySubmit = _useState26[1];
|
@@ -178,7 +178,7 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
178
178
|
isSubmitting: isSubmitting,
|
179
179
|
componentBlockClass: blockClass,
|
180
180
|
experimentalSecondarySubmit: experimentalSecondarySubmit,
|
181
|
-
experimentalSecondarySubmitText: experimentalSecondarySubmit.labelText ? experimentalSecondarySubmit.labelText : experimentalSecondarySubmitText,
|
181
|
+
experimentalSecondarySubmitText: experimentalSecondarySubmit !== null && experimentalSecondarySubmit !== void 0 && experimentalSecondarySubmit.labelText ? experimentalSecondarySubmit.labelText : experimentalSecondarySubmitText,
|
182
182
|
setCreateComponentActions: setCreateTearsheetActions
|
183
183
|
});
|
184
184
|
return /*#__PURE__*/React.createElement(TearsheetShell.TearsheetShell, _rollupPluginBabelHelpers.extends({}, devtools.getDevtoolsProps(componentName), rest, {
|
@@ -198,7 +198,8 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
198
198
|
slug: slug,
|
199
199
|
title: title,
|
200
200
|
verticalPosition: verticalPosition,
|
201
|
-
closeIconDescription: ''
|
201
|
+
closeIconDescription: '',
|
202
|
+
currentStep: currentStep
|
202
203
|
}), /*#__PURE__*/React.createElement("div", {
|
203
204
|
className: "".concat(blockClass, "__content"),
|
204
205
|
ref: contentRef
|
@@ -84,7 +84,7 @@ exports.CreateTearsheetStep = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
84
84
|
React.useEffect(function () {
|
85
85
|
if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep) && (previousState === null || previousState === void 0 ? void 0 : previousState.currentStep) !== (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
|
86
86
|
stepsContext === null || stepsContext === void 0 || stepsContext.setOnMount(onMount);
|
87
|
-
stepsContext === null || stepsContext === void 0 || stepsContext.setExperimentalSecondarySubmit(
|
87
|
+
stepsContext === null || stepsContext === void 0 || stepsContext.setExperimentalSecondarySubmit(experimentalSecondarySubmit);
|
88
88
|
}
|
89
89
|
}, [onMount, experimentalSecondarySubmit, stepsContext, stepNumber, previousState === null || previousState === void 0 ? void 0 : previousState.currentStep]);
|
90
90
|
|
@@ -120,8 +120,11 @@ exports.CreateTearsheetStep = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
120
120
|
stepsContext.setIsDisabled(!!disableSubmit);
|
121
121
|
stepsContext === null || stepsContext === void 0 || stepsContext.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
|
122
122
|
stepsContext === null || stepsContext === void 0 || stepsContext.setOnPrevious(onPrevious);
|
123
|
+
|
124
|
+
//Handle props for experimentalSecondarySubmit button, depending on state change
|
125
|
+
stepsContext === null || stepsContext === void 0 || stepsContext.setExperimentalSecondarySubmit(experimentalSecondarySubmit);
|
123
126
|
}
|
124
|
-
}, [stepsContext, stepNumber, disableSubmit, onNext, onPrevious, stepRef, stepRefValue]);
|
127
|
+
}, [stepsContext, stepNumber, disableSubmit, onNext, onPrevious, stepRef, stepRefValue, experimentalSecondarySubmit]);
|
125
128
|
var renderDescription = function renderDescription() {
|
126
129
|
if (description) {
|
127
130
|
if (typeof description === 'string') {
|
@@ -61,12 +61,12 @@ var ResizeHeader = function ResizeHeader(_ref) {
|
|
61
61
|
if (key === 'ArrowLeft') {
|
62
62
|
if (currentColumnWidth - incrementAmount > Math.max(Number(minWidth), 50)) {
|
63
63
|
var newWidth = currentColumnWidth - incrementAmount;
|
64
|
-
stateReducer.handleColumnResizingEvent(dispatch, header, newWidth
|
64
|
+
stateReducer.handleColumnResizingEvent(dispatch, header, newWidth);
|
65
65
|
}
|
66
66
|
}
|
67
67
|
if (key === 'ArrowRight') {
|
68
68
|
var _newWidth = currentColumnWidth + incrementAmount;
|
69
|
-
stateReducer.handleColumnResizingEvent(dispatch, header, _newWidth
|
69
|
+
stateReducer.handleColumnResizingEvent(dispatch, header, _newWidth);
|
70
70
|
}
|
71
71
|
}
|
72
72
|
};
|
@@ -47,6 +47,8 @@ var SelectAll = function SelectAll(datagridState) {
|
|
47
47
|
dispatch = datagridState.dispatch,
|
48
48
|
rows = datagridState.rows,
|
49
49
|
getRowId = datagridState.getRowId,
|
50
|
+
toggleAllRowsSelected = datagridState.toggleAllRowsSelected,
|
51
|
+
withVirtualScroll = datagridState.withVirtualScroll,
|
50
52
|
onAllRowSelect = datagridState.onAllRowSelect;
|
51
53
|
var isFirstColumnStickyLeft = ((_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
|
52
54
|
if (hideSelectAll || radio) {
|
@@ -71,12 +73,39 @@ var SelectAll = function SelectAll(datagridState) {
|
|
71
73
|
onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
|
72
74
|
return onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
73
75
|
};
|
76
|
+
var handleSelectAllChange = function handleSelectAllChange(event) {
|
77
|
+
if (indeterminate) {
|
78
|
+
stateReducer.handleSelectAllRowData({
|
79
|
+
dispatch: dispatch,
|
80
|
+
rows: rows,
|
81
|
+
getRowId: getRowId,
|
82
|
+
indeterminate: true,
|
83
|
+
isChecked: undefined
|
84
|
+
});
|
85
|
+
toggleAllRowsSelected(false);
|
86
|
+
onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
|
87
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange({
|
88
|
+
target: {
|
89
|
+
checked: false
|
90
|
+
}
|
91
|
+
});
|
92
|
+
}
|
93
|
+
stateReducer.handleSelectAllRowData({
|
94
|
+
dispatch: dispatch,
|
95
|
+
rows: rows,
|
96
|
+
getRowId: getRowId,
|
97
|
+
isChecked: event.target.checked,
|
98
|
+
indeterminate: indeterminate
|
99
|
+
});
|
100
|
+
onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
|
101
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
102
|
+
};
|
74
103
|
return /*#__PURE__*/React.createElement(react.TableSelectAll, _rollupPluginBabelHelpers.extends({}, selectProps, {
|
75
104
|
checked: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.checked) || false,
|
76
105
|
className: cx("".concat(blockClass, "__head-select-all"), "".concat(blockClass, "__checkbox-cell"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__checkbox-cell-sticky-left"), /* istanbul ignore next */
|
77
106
|
isFirstColumnStickyLeft && Number(windowSize) > 671)),
|
78
107
|
name: "".concat(tableId, "-select-all-checkbox-name"),
|
79
|
-
onSelect: handleOnPageSelectAllChange,
|
108
|
+
onSelect: withVirtualScroll ? handleSelectAllChange : handleOnPageSelectAllChange,
|
80
109
|
disabled: isFetching || (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled),
|
81
110
|
id: "".concat(tableId, "-select-all-checkbox-id")
|
82
111
|
}));
|