@carbon/ibm-products 2.54.0-canary.7 → 2.54.0-canary.71
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 +1352 -681
- 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 +974 -59
- 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 +597 -557
- 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 +678 -562
- 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/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +5 -0
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +19 -5
- 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/Datagrid.d.ts +1 -0
- package/es/components/Datagrid/Datagrid/Datagrid.js +7 -0
- 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/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/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/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/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/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +5 -0
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +18 -4
- 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/Datagrid.d.ts +1 -0
- package/lib/components/Datagrid/Datagrid/Datagrid.js +7 -0
- 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/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/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/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/index.js +109 -109
- package/lib/settings.d.ts +1 -1
- package/package.json +10 -10
- 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 +20 -13
- 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
@@ -18,10 +18,10 @@ import { Button, usePrefix, unstable_FeatureFlags, ComposedModal, ModalHeader, L
|
|
18
18
|
import { ActionSet } from '../ActionSet/ActionSet.js';
|
19
19
|
import { Wrap } from '../../global/js/utils/Wrap.js';
|
20
20
|
import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
|
21
|
-
import { useFocus,
|
21
|
+
import { useFocus, claimFocus } from '../../global/js/hooks/useFocus.js';
|
22
22
|
import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
|
23
23
|
|
24
|
-
var _excluded = ["actions", "aiLabel", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
24
|
+
var _excluded = ["actions", "aiLabel", "ariaLabel", "children", "className", "closeIconDescription", "currentStep", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
25
25
|
// The block part of our conventional BEM class names (bc__E--M).
|
26
26
|
var bc = "".concat(pkg.prefix, "--tearsheet");
|
27
27
|
var componentName = 'TearsheetShell';
|
@@ -68,6 +68,7 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
68
68
|
children = _ref.children,
|
69
69
|
className = _ref.className,
|
70
70
|
closeIconDescription = _ref.closeIconDescription,
|
71
|
+
currentStep = _ref.currentStep,
|
71
72
|
description = _ref.description,
|
72
73
|
hasCloseIcon = _ref.hasCloseIcon,
|
73
74
|
headerActions = _ref.headerActions,
|
@@ -100,8 +101,7 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
100
101
|
var prevOpen = usePreviousValue(open);
|
101
102
|
var _useFocus = useFocus(modalRef, selectorPrimaryFocus),
|
102
103
|
firstElement = _useFocus.firstElement,
|
103
|
-
keyDownListener = _useFocus.keyDownListener
|
104
|
-
specifiedElement = _useFocus.specifiedElement;
|
104
|
+
keyDownListener = _useFocus.keyDownListener;
|
105
105
|
var modalRefValue = modalRef.current;
|
106
106
|
|
107
107
|
// Function to strip html tags out of a string.
|
@@ -137,44 +137,12 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
137
137
|
setDepth(newDepth);
|
138
138
|
setPosition(newPosition);
|
139
139
|
}
|
140
|
-
handleStackChange.checkFocus = function () {
|
141
|
-
// if we are now the topmost tearsheet, ensure we have focus
|
142
|
-
if (open && position === depth && modalRefValue && !modalRefValue.contains(document.activeElement)) {
|
143
|
-
handleStackChange.claimFocus();
|
144
|
-
}
|
145
|
-
};
|
146
|
-
|
147
|
-
// Callback to give the tearsheet the opportunity to claim focus
|
148
|
-
handleStackChange.claimFocus = function () {
|
149
|
-
if (selectorPrimaryFocus && getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus)) {
|
150
|
-
var _window;
|
151
|
-
var specifiedEl = getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus);
|
152
|
-
if (specifiedEl && ((_window = window) === null || _window === void 0 || (_window = _window.getComputedStyle(specifiedEl)) === null || _window === void 0 ? void 0 : _window.display) !== 'none') {
|
153
|
-
return specifiedEl.focus();
|
154
|
-
}
|
155
|
-
}
|
156
|
-
setTimeout(function () {
|
157
|
-
return firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
158
|
-
}, 0);
|
159
|
-
};
|
160
140
|
useEffect(function () {
|
161
|
-
if (open) {
|
141
|
+
if (open && position === depth) {
|
162
142
|
// Focusing the first element or selectorPrimaryFocus element
|
163
|
-
|
164
|
-
var _window2;
|
165
|
-
var specifiedEl = getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus);
|
166
|
-
if (specifiedEl && ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.getComputedStyle(specifiedEl)) === null || _window2 === void 0 ? void 0 : _window2.display) !== 'none') {
|
167
|
-
setTimeout(function () {
|
168
|
-
return specifiedEl.focus();
|
169
|
-
}, 0);
|
170
|
-
return;
|
171
|
-
}
|
172
|
-
}
|
173
|
-
setTimeout(function () {
|
174
|
-
return firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
175
|
-
}, 0);
|
143
|
+
claimFocus(firstElement, modalRef, selectorPrimaryFocus);
|
176
144
|
}
|
177
|
-
}, [firstElement, modalRef, open, selectorPrimaryFocus]);
|
145
|
+
}, [currentStep, depth, firstElement, modalRef, modalRefValue, open, position, selectorPrimaryFocus]);
|
178
146
|
useEffect(function () {
|
179
147
|
if (prevOpen && !open && launcherButtonRef) {
|
180
148
|
setTimeout(function () {
|
@@ -182,22 +150,10 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
182
150
|
}, 0);
|
183
151
|
}
|
184
152
|
}, [launcherButtonRef, open, prevOpen]);
|
185
|
-
useEffect(function () {
|
186
|
-
if (open && position !== depth) {
|
187
|
-
setTimeout(function () {
|
188
|
-
if (selectorPrimaryFocus) {
|
189
|
-
return specifiedElement === null || specifiedElement === void 0 ? void 0 : specifiedElement.focus();
|
190
|
-
}
|
191
|
-
firstElement === null || firstElement === void 0 || firstElement.focus();
|
192
|
-
}, 0);
|
193
|
-
}
|
194
|
-
}, [position, depth, firstElement, open, specifiedElement, selectorPrimaryFocus]);
|
195
153
|
useEffect(function () {
|
196
154
|
var notify = function notify() {
|
197
155
|
return stack.all.forEach(function (handler) {
|
198
|
-
var _handler$checkFocus;
|
199
156
|
handler(Math.min(stack.open.length, maxDepth), stack.open.indexOf(handler) + 1);
|
200
|
-
(_handler$checkFocus = handler.checkFocus) === null || _handler$checkFocus === void 0 || _handler$checkFocus.call(handler);
|
201
157
|
});
|
202
158
|
};
|
203
159
|
|
@@ -232,14 +188,6 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
232
188
|
}
|
233
189
|
};
|
234
190
|
}, [open, size]);
|
235
|
-
function handleFocus() {
|
236
|
-
// If something within us is receiving focus but we are not the topmost
|
237
|
-
// stacked tearsheet, transfer focus to the topmost tearsheet instead
|
238
|
-
if (position < depth) {
|
239
|
-
var _stack$open$claimFocu, _stack$open;
|
240
|
-
(_stack$open$claimFocu = (_stack$open = stack.open[stack.open.length - 1]).claimFocus) === null || _stack$open$claimFocu === void 0 || _stack$open$claimFocu.call(_stack$open);
|
241
|
-
}
|
242
|
-
}
|
243
191
|
if (position <= depth) {
|
244
192
|
var _prevDepth$current;
|
245
193
|
// Include a modal header if and only if one or more of these is given.
|
@@ -271,7 +219,6 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
271
219
|
onClose: onClose,
|
272
220
|
open: open,
|
273
221
|
selectorPrimaryFocus: selectorPrimaryFocus,
|
274
|
-
onFocus: handleFocus,
|
275
222
|
onKeyDown: keyDownListener,
|
276
223
|
preventCloseOnClickOutside: !isPassive,
|
277
224
|
ref: modalRef,
|
@@ -104,4 +104,27 @@ var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
|
|
104
104
|
};
|
105
105
|
};
|
106
106
|
|
107
|
-
|
107
|
+
/**
|
108
|
+
*
|
109
|
+
* @param {*} firstElement
|
110
|
+
* @param {*} modalRef
|
111
|
+
* @param {string | undefined} selectorPrimaryFocus
|
112
|
+
*/
|
113
|
+
var claimFocus = function claimFocus(firstElement, modalRef) {
|
114
|
+
var selectorPrimaryFocus = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
115
|
+
if (selectorPrimaryFocus && getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus)) {
|
116
|
+
var _window2;
|
117
|
+
var specifiedEl = getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus);
|
118
|
+
if (specifiedEl && ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.getComputedStyle(specifiedEl)) === null || _window2 === void 0 ? void 0 : _window2.display) !== 'none') {
|
119
|
+
setTimeout(function () {
|
120
|
+
return specifiedEl.focus();
|
121
|
+
}, 0);
|
122
|
+
}
|
123
|
+
} else {
|
124
|
+
setTimeout(function () {
|
125
|
+
return firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
126
|
+
}, 0);
|
127
|
+
}
|
128
|
+
};
|
129
|
+
|
130
|
+
export { claimFocus, getSpecificElement, useFocus };
|
@@ -29,6 +29,5 @@ var usePrefersReducedMotion = function usePrefersReducedMotion() {
|
|
29
29
|
}, []);
|
30
30
|
return prefersReducedMotion;
|
31
31
|
};
|
32
|
-
var usePrefersReducedMotion$1 = usePrefersReducedMotion;
|
33
32
|
|
34
|
-
export { usePrefersReducedMotion
|
33
|
+
export { usePrefersReducedMotion as default };
|
@@ -66,6 +66,7 @@ declare namespace defaults {
|
|
66
66
|
let WebTerminal: boolean;
|
67
67
|
let WebTerminalContentWrapper: boolean;
|
68
68
|
let WebTerminalProvider: boolean;
|
69
|
+
let UserAvatar: boolean;
|
69
70
|
let Toolbar: boolean;
|
70
71
|
let ToolbarButton: boolean;
|
71
72
|
let ToolbarGroup: boolean;
|
@@ -115,7 +116,6 @@ declare namespace defaults {
|
|
115
116
|
let DescriptionListCell: boolean;
|
116
117
|
let DescriptionListRow: boolean;
|
117
118
|
let SearchBar: boolean;
|
118
|
-
let UserAvatar: boolean;
|
119
119
|
let EmptyStateV2: boolean;
|
120
120
|
let Guidebanner: boolean;
|
121
121
|
let GuidebannerElement: boolean;
|
@@ -64,6 +64,7 @@ var defaults = {
|
|
64
64
|
WebTerminal: true,
|
65
65
|
WebTerminalContentWrapper: true,
|
66
66
|
WebTerminalProvider: true,
|
67
|
+
UserAvatar: true,
|
67
68
|
// other public components not yet reviewed and released:
|
68
69
|
Toolbar: false,
|
69
70
|
ToolbarButton: false,
|
@@ -117,7 +118,6 @@ var defaults = {
|
|
117
118
|
DescriptionListCell: false,
|
118
119
|
DescriptionListRow: false,
|
119
120
|
SearchBar: false,
|
120
|
-
UserAvatar: false,
|
121
121
|
/* new component flags here - comment used by generate CLI */
|
122
122
|
|
123
123
|
// Onboarding components not yet reviewed and released:
|
package/es/index.js
CHANGED
@@ -103,12 +103,12 @@ export { SearchBar } from './components/SearchBar/SearchBar.js';
|
|
103
103
|
export { TagOverflow } from './components/TagOverflow/TagOverflow.js';
|
104
104
|
export { GetStartedCard } from './components/GetStartedCard/GetStartedCard.js';
|
105
105
|
export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags } from './components/FeatureFlags/index.js';
|
106
|
+
export { default as useFilterContext } from './components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js';
|
106
107
|
export { usePrefix } from './global/js/hooks/usePrefix.js';
|
107
108
|
export { ActionBar } from './components/ActionBar/ActionBar.js';
|
108
109
|
export { HTTPError403 } from './components/HTTPErrors/HTTPError403/HTTPError403.js';
|
109
110
|
export { HTTPError404 } from './components/HTTPErrors/HTTPError404/HTTPError404.js';
|
110
111
|
export { HTTPErrorOther } from './components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js';
|
111
|
-
export { default as useFilterContext } from './components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js';
|
112
112
|
export { EditTearsheet } from './components/EditTearsheet/EditTearsheet.js';
|
113
113
|
export { EditTearsheetForm } from './components/EditTearsheet/EditTearsheetForm.js';
|
114
114
|
export { CoachmarkStack } from './components/CoachmarkStack/CoachmarkStack.js';
|
package/es/settings.d.ts
CHANGED
@@ -52,6 +52,7 @@ export const pkg: {
|
|
52
52
|
WebTerminal: boolean;
|
53
53
|
WebTerminalContentWrapper: boolean;
|
54
54
|
WebTerminalProvider: boolean;
|
55
|
+
UserAvatar: boolean;
|
55
56
|
Toolbar: boolean;
|
56
57
|
ToolbarButton: boolean;
|
57
58
|
ToolbarGroup: boolean;
|
@@ -101,7 +102,6 @@ export const pkg: {
|
|
101
102
|
DescriptionListCell: boolean;
|
102
103
|
DescriptionListRow: boolean;
|
103
104
|
SearchBar: boolean;
|
104
|
-
UserAvatar: boolean;
|
105
105
|
EmptyStateV2: boolean;
|
106
106
|
Guidebanner: boolean;
|
107
107
|
GuidebannerElement: boolean;
|
@@ -506,7 +506,7 @@ function _nonIterableRest() {
|
|
506
506
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
507
507
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
508
508
|
if (!it) {
|
509
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike
|
509
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) {
|
510
510
|
if (it) o = it;
|
511
511
|
var i = 0;
|
512
512
|
var F = function () {};
|
@@ -10,7 +10,7 @@ export namespace APIKeyDownloader {
|
|
10
10
|
export { componentName as displayName };
|
11
11
|
export namespace propTypes {
|
12
12
|
let apiKey: PropTypes.Validator<string>;
|
13
|
-
let body: PropTypes.
|
13
|
+
let body: PropTypes.Requireable<string>;
|
14
14
|
let downloadLinkLabel: PropTypes.Requireable<string>;
|
15
15
|
let fileName: PropTypes.Validator<string>;
|
16
16
|
let fileType: PropTypes.Validator<string>;
|
@@ -1,3 +1,16 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
2
3
|
import { APIKeyModalProps } from './APIKeyModal.types';
|
3
4
|
export declare let APIKeyModal: React.FC<APIKeyModalProps>;
|
5
|
+
export declare const deprecatedProps: {
|
6
|
+
/**
|
7
|
+
* deprecated
|
8
|
+
* title for a successful edit
|
9
|
+
*/
|
10
|
+
editSuccessTitle: PropTypes.Requireable<string>;
|
11
|
+
/**
|
12
|
+
* deprecated
|
13
|
+
* title for a successful key generation
|
14
|
+
*/
|
15
|
+
generateSuccessTitle: PropTypes.Requireable<string>;
|
16
|
+
};
|
@@ -20,9 +20,10 @@ var devtools = require('../../global/js/utils/devtools.js');
|
|
20
20
|
var propsHelper = require('../../global/js/utils/props-helper.js');
|
21
21
|
var uuidv4 = require('../../global/js/utils/uuidv4.js');
|
22
22
|
var useFocus = require('../../global/js/hooks/useFocus.js');
|
23
|
+
var usePreviousValue = require('../../global/js/hooks/usePreviousValue.js');
|
23
24
|
|
24
25
|
var _ErrorFilled, _InformationFilled;
|
25
|
-
var _excluded = ["apiKey", "apiKeyLabel", "apiKeyName", "body", "className", "closeButtonText", "copyButtonText", "copyErrorText", "copyIconDescription", "customSteps", "downloadBodyText", "downloadFileName", "downloadFileType", "downloadLinkText", "downloadLinkLabel", "editButtonText", "editSuccess", "editSuccessTitle", "editing", "error", "errorText", "generateButtonText", "generateSuccessBody", "generateSuccessTitle", "generateTitle", "hasAPIKeyVisibilityToggle", "hasDownloadLink", "hideAPIKeyLabel", "loading", "loadingText", "modalLabel", "nameHelperText", "nameLabel", "namePlaceholder", "nameRequired", "nextStepButtonText", "onClose", "onCopy", "onRequestEdit", "onRequestGenerate", "open", "portalTarget", "previousStepButtonText", "selectorPrimaryFocus", "showAPIKeyLabel"];
|
26
|
+
var _excluded = ["apiKey", "apiKeyLabel", "apiKeyName", "body", "className", "closeButtonText", "copyButtonText", "copyErrorText", "copyIconDescription", "customSteps", "downloadBodyText", "downloadFileName", "downloadFileType", "downloadLinkText", "downloadLinkLabel", "editButtonText", "editSuccess", "editSuccessTitle", "editSuccessMessage", "editing", "error", "errorText", "generateButtonText", "generateSuccessBody", "generateSuccessTitle", "generateSuccessMessage", "generateTitle", "hasAPIKeyVisibilityToggle", "hasDownloadLink", "hideAPIKeyLabel", "launcherButtonRef", "loading", "loadingText", "modalLabel", "nameHelperText", "nameLabel", "namePlaceholder", "nameRequired", "nextStepButtonText", "onClose", "onCopy", "onRequestEdit", "onRequestGenerate", "open", "portalTarget", "previousStepButtonText", "selectorPrimaryFocus", "showAPIKeyLabel", "helperText"];
|
26
27
|
var componentName = 'APIKeyModal';
|
27
28
|
|
28
29
|
// Default values for props
|
@@ -53,16 +54,19 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
53
54
|
editButtonText = _ref.editButtonText,
|
54
55
|
editSuccess = _ref.editSuccess,
|
55
56
|
editSuccessTitle = _ref.editSuccessTitle,
|
57
|
+
editSuccessMessage = _ref.editSuccessMessage,
|
56
58
|
editing = _ref.editing,
|
57
59
|
error = _ref.error,
|
58
60
|
errorText = _ref.errorText,
|
59
61
|
generateButtonText = _ref.generateButtonText,
|
60
62
|
generateSuccessBody = _ref.generateSuccessBody,
|
61
63
|
generateSuccessTitle = _ref.generateSuccessTitle,
|
64
|
+
generateSuccessMessage = _ref.generateSuccessMessage,
|
62
65
|
generateTitle = _ref.generateTitle,
|
63
66
|
hasAPIKeyVisibilityToggle = _ref.hasAPIKeyVisibilityToggle,
|
64
67
|
hasDownloadLink = _ref.hasDownloadLink,
|
65
68
|
hideAPIKeyLabel = _ref.hideAPIKeyLabel,
|
69
|
+
launcherButtonRef = _ref.launcherButtonRef,
|
66
70
|
loading = _ref.loading,
|
67
71
|
loadingText = _ref.loadingText,
|
68
72
|
modalLabel = _ref.modalLabel,
|
@@ -80,23 +84,28 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
80
84
|
previousStepButtonText = _ref.previousStepButtonText,
|
81
85
|
selectorPrimaryFocus = _ref.selectorPrimaryFocus,
|
82
86
|
showAPIKeyLabel = _ref.showAPIKeyLabel,
|
87
|
+
helperText = _ref.helperText,
|
83
88
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
84
89
|
var _useState = React.useState(null),
|
85
90
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
86
91
|
title = _useState2[0],
|
87
92
|
setTitle = _useState2[1];
|
88
|
-
var _useState3 = React.useState(
|
93
|
+
var _useState3 = React.useState(null),
|
89
94
|
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
90
|
-
|
91
|
-
|
92
|
-
var _useState5 = React.useState(
|
95
|
+
successMessage = _useState4[0],
|
96
|
+
setSuccessMessage = _useState4[1];
|
97
|
+
var _useState5 = React.useState(false),
|
93
98
|
_useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
|
94
|
-
|
95
|
-
|
96
|
-
var _useState7 = React.useState(
|
99
|
+
copyError = _useState6[0],
|
100
|
+
setCopyError = _useState6[1];
|
101
|
+
var _useState7 = React.useState(apiKeyName),
|
97
102
|
_useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
|
98
|
-
|
99
|
-
|
103
|
+
name = _useState8[0],
|
104
|
+
setName = _useState8[1];
|
105
|
+
var _useState9 = React.useState(0),
|
106
|
+
_useState10 = _rollupPluginBabelHelpers.slicedToArray(_useState9, 2),
|
107
|
+
currentStep = _useState10[0],
|
108
|
+
setCurrentStep = _useState10[1];
|
100
109
|
var copyRef = React.useRef(undefined);
|
101
110
|
var apiKeyInputId = React.useRef(uuidv4.default());
|
102
111
|
var nameInputId = React.useRef(uuidv4.default());
|
@@ -116,33 +125,33 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
116
125
|
};
|
117
126
|
var blockClass = "".concat(settings.pkg.prefix, "--apikey-modal");
|
118
127
|
var localRef = React.useRef(undefined);
|
128
|
+
var PasswordInputRef = React.useRef(null);
|
119
129
|
var modalRef = ref || localRef;
|
120
130
|
var _useFocus = useFocus.useFocus(modalRef, selectorPrimaryFocus),
|
121
131
|
firstElement = _useFocus.firstElement,
|
122
132
|
keyDownListener = _useFocus.keyDownListener;
|
133
|
+
var prevOpen = usePreviousValue.usePreviousValue(open);
|
123
134
|
React.useEffect(function () {
|
124
135
|
if (copyRef.current && open && apiKeyLoaded) {
|
125
136
|
copyRef.current.focus();
|
126
137
|
}
|
138
|
+
if (PasswordInputRef !== null && PasswordInputRef !== void 0 && PasswordInputRef.current) {
|
139
|
+
PasswordInputRef === null || PasswordInputRef === void 0 || PasswordInputRef.current.setAttribute('readOnly', 'true');
|
140
|
+
}
|
127
141
|
}, [open, apiKeyLoaded]);
|
128
142
|
React.useEffect(function () {
|
129
143
|
if (open) {
|
130
144
|
// Focusing the first element or selectorPrimaryFocus element
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
return specifiedEl.focus();
|
137
|
-
}, 0);
|
138
|
-
return;
|
139
|
-
}
|
140
|
-
}
|
145
|
+
useFocus.claimFocus(firstElement, modalRef, selectorPrimaryFocus);
|
146
|
+
}
|
147
|
+
}, [firstElement, modalRef, open, selectorPrimaryFocus]);
|
148
|
+
React.useEffect(function () {
|
149
|
+
if (prevOpen && !open && launcherButtonRef) {
|
141
150
|
setTimeout(function () {
|
142
|
-
|
151
|
+
launcherButtonRef.current.focus();
|
143
152
|
}, 0);
|
144
153
|
}
|
145
|
-
}, [
|
154
|
+
}, [launcherButtonRef, open, prevOpen]);
|
146
155
|
var isPrimaryButtonDisabled = function isPrimaryButtonDisabled() {
|
147
156
|
if (loading) {
|
148
157
|
return true;
|
@@ -176,16 +185,18 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
176
185
|
};
|
177
186
|
React.useEffect(function () {
|
178
187
|
if (editing && editSuccess) {
|
179
|
-
setTitle(
|
188
|
+
setTitle(generateTitle);
|
189
|
+
setSuccessMessage(editSuccessMessage !== null && editSuccessMessage !== void 0 ? editSuccessMessage : editSuccessTitle);
|
180
190
|
} else if (apiKeyLoaded) {
|
181
|
-
setTitle(
|
191
|
+
setTitle(generateTitle);
|
192
|
+
setSuccessMessage(generateSuccessMessage !== null && generateSuccessMessage !== void 0 ? generateSuccessMessage : generateSuccessTitle);
|
182
193
|
} else if (hasSteps) {
|
183
194
|
var _customSteps$currentS2;
|
184
195
|
setTitle((_customSteps$currentS2 = customSteps[currentStep]) === null || _customSteps$currentS2 === void 0 ? void 0 : _customSteps$currentS2.title);
|
185
196
|
} else {
|
186
197
|
setTitle(generateTitle);
|
187
198
|
}
|
188
|
-
}, [apiKeyLoaded, editing, editSuccess, editSuccessTitle, hasSteps, generateSuccessTitle, generateTitle, currentStep, customSteps]);
|
199
|
+
}, [apiKeyLoaded, loading, editing, editSuccess, editSuccessTitle, editSuccessMessage, hasSteps, generateSuccessTitle, generateSuccessMessage, generateTitle, currentStep, customSteps]);
|
189
200
|
var setNameHandler = function setNameHandler(evt) {
|
190
201
|
setName(evt.target.value);
|
191
202
|
};
|
@@ -283,7 +294,9 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
283
294
|
id: apiKeyInputId.current,
|
284
295
|
showPasswordLabel: showAPIKeyLabel,
|
285
296
|
hidePasswordLabel: hideAPIKeyLabel,
|
286
|
-
tooltipPosition: "left"
|
297
|
+
tooltipPosition: "left",
|
298
|
+
helperText: helperText,
|
299
|
+
ref: PasswordInputRef
|
287
300
|
}), !editing && apiKey && !hasAPIKeyVisibilityToggle && /*#__PURE__*/React.createElement(react.TextInput, {
|
288
301
|
value: apiKey,
|
289
302
|
labelText: apiKeyLabel,
|
@@ -311,7 +324,9 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
311
324
|
}, _ErrorFilled || (_ErrorFilled = /*#__PURE__*/React.createElement(icons.ErrorFilled, {
|
312
325
|
size: 16
|
313
326
|
}))), /*#__PURE__*/React.createElement("p", {
|
314
|
-
className: "".concat(blockClass, "__messaging-text")
|
327
|
+
className: "".concat(blockClass, "__messaging-text"),
|
328
|
+
role: "alert",
|
329
|
+
"aria-live": "assertive"
|
315
330
|
}, copyError ? copyErrorText : errorText)), apiKeyLoaded && /*#__PURE__*/React.createElement("div", {
|
316
331
|
className: "".concat(blockClass, "__messaging")
|
317
332
|
}, _InformationFilled || (_InformationFilled = /*#__PURE__*/React.createElement(icons.InformationFilled, {
|
@@ -324,8 +339,19 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
324
339
|
fileType: downloadFileType,
|
325
340
|
downloadLinkLabel: downloadLinkLabel
|
326
341
|
}) : /*#__PURE__*/React.createElement("div", {
|
327
|
-
className: "".concat(blockClass, "__messaging-text")
|
328
|
-
|
342
|
+
className: "".concat(blockClass, "__messaging-text"),
|
343
|
+
role: "alert",
|
344
|
+
"aria-live": "assertive"
|
345
|
+
}, generateSuccessBody)), (editSuccess || apiKeyLoaded && successMessage) && /*#__PURE__*/React.createElement("div", {
|
346
|
+
className: "".concat(blockClass, "__messaging")
|
347
|
+
}, /*#__PURE__*/React.createElement(icons.CheckmarkFilled, {
|
348
|
+
size: 16,
|
349
|
+
className: "".concat(blockClass, "__checkmark-icon")
|
350
|
+
}), /*#__PURE__*/React.createElement("p", {
|
351
|
+
className: "".concat(blockClass, "__messaging-text"),
|
352
|
+
role: "alert",
|
353
|
+
"aria-live": "assertive"
|
354
|
+
}, successMessage)))), /*#__PURE__*/React.createElement(react.ModalFooter, {
|
329
355
|
className: "".concat(blockClass, "__footer")
|
330
356
|
}, /*#__PURE__*/React.createElement(react.Button, {
|
331
357
|
type: "button",
|
@@ -359,7 +385,19 @@ var downloadRequiredProps = function downloadRequiredProps(type) {
|
|
359
385
|
|
360
386
|
// Return a placeholder if not released and not enabled by feature flag
|
361
387
|
exports.APIKeyModal = settings.pkg.checkComponentEnabled(exports.APIKeyModal, componentName);
|
362
|
-
|
388
|
+
var deprecatedProps = {
|
389
|
+
/**
|
390
|
+
* deprecated
|
391
|
+
* title for a successful edit
|
392
|
+
*/
|
393
|
+
editSuccessTitle: index.default.string,
|
394
|
+
/**
|
395
|
+
* deprecated
|
396
|
+
* title for a successful key generation
|
397
|
+
*/
|
398
|
+
generateSuccessTitle: index.default.string
|
399
|
+
};
|
400
|
+
exports.APIKeyModal.propTypes = _rollupPluginBabelHelpers.objectSpread2({
|
363
401
|
/**
|
364
402
|
* the api key that's displayed to the user when a request to create is fulfilled.
|
365
403
|
*/
|
@@ -417,7 +455,7 @@ exports.APIKeyModal.propTypes = {
|
|
417
455
|
/**
|
418
456
|
* the content that appears that indicates the key is downloadable
|
419
457
|
*/
|
420
|
-
downloadBodyText:
|
458
|
+
downloadBodyText: index.default.string,
|
421
459
|
/**
|
422
460
|
* designates the name of downloadable json file with the key. if not specified will default to 'apikey'
|
423
461
|
*/
|
@@ -445,7 +483,7 @@ exports.APIKeyModal.propTypes = {
|
|
445
483
|
/**
|
446
484
|
* title for a successful edit
|
447
485
|
*/
|
448
|
-
|
486
|
+
editSuccessMessage: editRequiredProps(index.default.string),
|
449
487
|
/**
|
450
488
|
* designates if the modal is in the edit mode
|
451
489
|
*/
|
@@ -471,7 +509,7 @@ exports.APIKeyModal.propTypes = {
|
|
471
509
|
/**
|
472
510
|
* title for a successful key generation
|
473
511
|
*/
|
474
|
-
|
512
|
+
generateSuccessMessage: index.default.string,
|
475
513
|
/**
|
476
514
|
* default title for the modal in generate key mode
|
477
515
|
*/
|
@@ -484,10 +522,19 @@ exports.APIKeyModal.propTypes = {
|
|
484
522
|
* designates if user is able to download the api key
|
485
523
|
*/
|
486
524
|
hasDownloadLink: index.default.bool,
|
525
|
+
/**
|
526
|
+
* helper text for password input
|
527
|
+
*/
|
528
|
+
helperText: index.default.string,
|
487
529
|
/**
|
488
530
|
* label text that's displayed when hovering over visibility toggler to hide key
|
489
531
|
*/
|
490
532
|
hideAPIKeyLabel: index.default.string,
|
533
|
+
/**
|
534
|
+
* Provide a ref to return focus to once the tearsheet is closed.
|
535
|
+
*/
|
536
|
+
/**@ts-ignore */
|
537
|
+
launcherButtonRef: index.default.any,
|
491
538
|
/**
|
492
539
|
* designates if the modal is in a loading state via a request or some other in progress operation
|
493
540
|
*/
|
@@ -558,5 +605,7 @@ exports.APIKeyModal.propTypes = {
|
|
558
605
|
* label text that's displayed when hovering over visibility toggler to show key
|
559
606
|
*/
|
560
607
|
showAPIKeyLabel: index.default.string
|
561
|
-
};
|
608
|
+
}, deprecatedProps);
|
562
609
|
exports.APIKeyModal.displayName = componentName;
|
610
|
+
|
611
|
+
exports.deprecatedProps = deprecatedProps;
|
@@ -4,7 +4,7 @@
|
|
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
|
-
import { ReactNode } from 'react';
|
7
|
+
import { ReactNode, RefObject } from 'react';
|
8
8
|
interface APIKeyModalCommonProps {
|
9
9
|
/**
|
10
10
|
* the api key that's displayed to the user when a request to create is fulfilled.
|
@@ -73,9 +73,14 @@ interface APIKeyModalCommonProps {
|
|
73
73
|
*/
|
74
74
|
generateSuccessBody?: ReactNode;
|
75
75
|
/**
|
76
|
+
* * @deprecated use `generateSuccessMessage` instead
|
76
77
|
* title for a successful key generation
|
77
78
|
*/
|
78
79
|
generateSuccessTitle?: string;
|
80
|
+
/**
|
81
|
+
* success message for a successful key generation
|
82
|
+
*/
|
83
|
+
generateSuccessMessage?: string;
|
79
84
|
/**
|
80
85
|
* default title for the modal in generate key mode
|
81
86
|
*/
|
@@ -92,6 +97,10 @@ interface APIKeyModalCommonProps {
|
|
92
97
|
* label text that's displayed when hovering over visibility toggler to hide key
|
93
98
|
*/
|
94
99
|
hideAPIKeyLabel?: string;
|
100
|
+
/**
|
101
|
+
* Provide a ref to return focus to once the tearsheet is closed.
|
102
|
+
*/
|
103
|
+
launcherButtonRef?: RefObject<any>;
|
95
104
|
/**
|
96
105
|
* designates if the modal is in a loading state via a request or some other in progress operation
|
97
106
|
*/
|
@@ -154,6 +163,10 @@ interface APIKeyModalCommonProps {
|
|
154
163
|
* label text that's displayed when hovering over visibility toggler to show key
|
155
164
|
*/
|
156
165
|
showAPIKeyLabel?: string;
|
166
|
+
/**
|
167
|
+
* helper text for password input
|
168
|
+
*/
|
169
|
+
helperText?: string;
|
157
170
|
}
|
158
171
|
type CustomStepConditionalProps = {
|
159
172
|
/**
|
@@ -187,9 +200,14 @@ type EditingConditionalProps = {
|
|
187
200
|
*/
|
188
201
|
editSuccess: boolean;
|
189
202
|
/**
|
203
|
+
* * @deprecated use `editSuccessMessage` instead
|
190
204
|
* title for a successful edit
|
191
205
|
*/
|
192
|
-
editSuccessTitle
|
206
|
+
editSuccessTitle?: string;
|
207
|
+
/**
|
208
|
+
* success message for edit
|
209
|
+
*/
|
210
|
+
editSuccessMessage: string;
|
193
211
|
};
|
194
212
|
type HasDownloadLinkProps = {
|
195
213
|
/**
|
@@ -199,7 +217,7 @@ type HasDownloadLinkProps = {
|
|
199
217
|
/**
|
200
218
|
* the content that appears that indicates the key is downloadable
|
201
219
|
*/
|
202
|
-
downloadBodyText
|
220
|
+
downloadBodyText?: string;
|
203
221
|
/**
|
204
222
|
* designates the name of downloadable json file with the key. if not specified will default to 'apikey'
|
205
223
|
*/
|
@@ -64,12 +64,9 @@ exports.AboutModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
64
64
|
}, [bodyRef]);
|
65
65
|
React.useEffect(function () {
|
66
66
|
if (open) {
|
67
|
-
|
68
|
-
return firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
69
|
-
}, 0);
|
67
|
+
useFocus.claimFocus(firstElement, modalRef);
|
70
68
|
}
|
71
|
-
|
72
|
-
}, [open]);
|
69
|
+
}, [firstElement, modalRef, open]);
|
73
70
|
return renderPortalUse( /*#__PURE__*/React.createElement(react.unstable_FeatureFlags, {
|
74
71
|
enableExperimentalFocusWrapWithoutSentinels: true
|
75
72
|
}, /*#__PURE__*/React.createElement(react.ComposedModal, _rollupPluginBabelHelpers.extends({}, rest, {
|