@carbon/ibm-products 2.54.0 → 2.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/index-full-carbon.css +90 -21
- 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 +14 -8
- 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 +14 -8
- 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 +27 -11
- 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.js +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +42 -6
- package/es/components/APIKeyModal/APIKeyModal.types.d.ts +10 -1
- package/es/components/AboutModal/AboutModal.js +3 -6
- package/es/components/AddSelect/AddSelect.d.ts +2 -2
- package/es/components/AddSelect/AddSelect.js +1 -0
- package/es/components/AddSelect/AddSelectBody.d.ts +2 -2
- package/es/components/AddSelect/AddSelectBody.js +1 -0
- 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/Card/Card.js +13 -9
- package/es/components/Checklist/Checklist.js +1 -1
- package/es/components/Checklist/ChecklistIcon.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -2
- 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/Datagrid/Datagrid/DatagridHeaderRow.js +2 -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 +1 -2
- package/es/components/EmptyStates/assets/NoDataIllustration.js +1 -2
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +1 -2
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +1 -2
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +1 -2
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +1 -2
- 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/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/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/Tearsheet/Tearsheet.d.ts +1 -1
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +1 -1
- package/es/components/Tearsheet/TearsheetShell.d.ts +1 -1
- package/es/components/Tearsheet/TearsheetShell.js +3 -24
- package/es/components/TooltipTrigger/TooltipTrigger.d.ts +1 -1
- package/es/components/TooltipTrigger/TooltipTrigger.js +3 -2
- package/es/components/UserAvatar/UserAvatar.js +1 -3
- package/es/global/js/hooks/useFocus.d.ts +1 -0
- package/es/global/js/hooks/useFocus.js +21 -1
- package/es/global/js/hooks/usePrefersReducedMotion.js +1 -2
- package/es/index.js +1 -1
- package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/lib/components/APIKeyModal/APIKeyDownloader.js +1 -1
- package/lib/components/APIKeyModal/APIKeyModal.js +41 -5
- package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +10 -1
- package/lib/components/AboutModal/AboutModal.js +2 -5
- package/lib/components/AddSelect/AddSelect.d.ts +2 -2
- package/lib/components/AddSelect/AddSelect.js +1 -0
- package/lib/components/AddSelect/AddSelectBody.d.ts +2 -2
- package/lib/components/AddSelect/AddSelectBody.js +1 -0
- 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/Card/Card.js +12 -8
- package/lib/components/Checklist/ChecklistChart.js +7 -7
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -2
- 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/Datagrid/Datagrid/DatagridHeaderRow.js +2 -2
- 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 +1 -2
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +1 -2
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +1 -2
- 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/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/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/Tearsheet/Tearsheet.d.ts +1 -1
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +1 -1
- package/lib/components/Tearsheet/TearsheetShell.d.ts +1 -1
- package/lib/components/Tearsheet/TearsheetShell.js +2 -23
- package/lib/components/TooltipTrigger/TooltipTrigger.d.ts +1 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.js +3 -2
- package/lib/components/UserAvatar/UserAvatar.js +1 -3
- package/lib/global/js/hooks/useFocus.d.ts +1 -0
- package/lib/global/js/hooks/useFocus.js +21 -0
- package/lib/global/js/hooks/usePrefersReducedMotion.js +1 -2
- package/lib/index.js +109 -109
- package/package.json +11 -11
- package/scss/components/Datagrid/styles/_datagrid.scss +16 -6
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +2 -2
@@ -27,6 +27,7 @@ var componentName = 'FilterPanelCheckbox';
|
|
27
27
|
*
|
28
28
|
* All of Carbon Checkbox's props are directly available
|
29
29
|
* through "...rest", including id, onClick, etc.
|
30
|
+
* @deprecated This component is deprecated
|
30
31
|
*/
|
31
32
|
var FilterPanelCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
32
33
|
var className = _ref.className,
|
@@ -46,6 +47,10 @@ var FilterPanelCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
46
47
|
ref: ref
|
47
48
|
}, getDevtoolsProps(componentName)));
|
48
49
|
});
|
50
|
+
FilterPanelCheckbox.deprecated = {
|
51
|
+
level: 'warn',
|
52
|
+
details: "This component is deprecated"
|
53
|
+
};
|
49
54
|
|
50
55
|
// Return a placeholder if not released and not enabled by feature flag
|
51
56
|
FilterPanelCheckbox = pkg.checkComponentEnabled(FilterPanelCheckbox, componentName);
|
@@ -5,6 +5,7 @@
|
|
5
5
|
* just like FilterPanelCheckbox.
|
6
6
|
*
|
7
7
|
* Use `overflowMenuProps` for properties specific to the OverflowMenu.
|
8
|
+
* @deprecated This component is deprecated
|
8
9
|
*/
|
9
10
|
export let FilterPanelCheckboxWithOverflow: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
10
11
|
import React from 'react';
|
package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js
CHANGED
@@ -30,6 +30,7 @@ var defaults = {
|
|
30
30
|
* just like FilterPanelCheckbox.
|
31
31
|
*
|
32
32
|
* Use `overflowMenuProps` for properties specific to the OverflowMenu.
|
33
|
+
* @deprecated This component is deprecated
|
33
34
|
*/
|
34
35
|
var FilterPanelCheckboxWithOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
35
36
|
var children = _ref.children,
|
@@ -115,6 +116,10 @@ var FilterPanelCheckboxWithOverflow = /*#__PURE__*/React__default.forwardRef(fun
|
|
115
116
|
}, other), children))
|
116
117
|
);
|
117
118
|
});
|
119
|
+
FilterPanelCheckboxWithOverflow.deprecated = {
|
120
|
+
level: 'warn',
|
121
|
+
details: "This component is deprecated"
|
122
|
+
};
|
118
123
|
|
119
124
|
// Return a placeholder if not released and not enabled by feature flag
|
120
125
|
FilterPanelCheckboxWithOverflow = pkg.checkComponentEnabled(FilterPanelCheckboxWithOverflow, componentName);
|
@@ -21,6 +21,7 @@ var componentName = 'FilterPanelGroup';
|
|
21
21
|
|
22
22
|
/**
|
23
23
|
* A container with a label and optional count.
|
24
|
+
* @deprecated This component is deprecated
|
24
25
|
*/
|
25
26
|
var FilterPanelGroup = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
26
27
|
var children = _ref.children,
|
@@ -42,6 +43,10 @@ var FilterPanelGroup = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
42
43
|
className: "".concat(blockClass, "__content")
|
43
44
|
}, children));
|
44
45
|
});
|
46
|
+
FilterPanelGroup.deprecated = {
|
47
|
+
level: 'warn',
|
48
|
+
details: "This component is deprecated"
|
49
|
+
};
|
45
50
|
|
46
51
|
// Return a placeholder if not released and not enabled by feature flag
|
47
52
|
FilterPanelGroup = pkg.checkComponentEnabled(FilterPanelGroup, componentName);
|
@@ -24,6 +24,7 @@ var defaults = {
|
|
24
24
|
|
25
25
|
/**
|
26
26
|
* An input field and container to show search results.
|
27
|
+
* @deprecated This component is deprecated
|
27
28
|
*/
|
28
29
|
var FilterPanelSearch = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
29
30
|
var children = _ref.children,
|
@@ -67,7 +68,10 @@ var FilterPanelSearch = /*#__PURE__*/React__default.forwardRef(function (_ref, r
|
|
67
68
|
className: "".concat(blockClass, "__results")
|
68
69
|
}, children));
|
69
70
|
});
|
70
|
-
|
71
|
+
FilterPanelSearch.deprecated = {
|
72
|
+
level: 'warn',
|
73
|
+
details: "This component is deprecated"
|
74
|
+
};
|
71
75
|
// Return a placeholder if not released and not enabled by feature flag
|
72
76
|
FilterPanelSearch = pkg.checkComponentEnabled(FilterPanelSearch, componentName);
|
73
77
|
FilterPanelSearch.displayName = componentName;
|
package/es/components/Nav/Nav.js
CHANGED
@@ -17,6 +17,10 @@ import { pkg } from '../../settings.js';
|
|
17
17
|
var _excluded = ["activeHref", "className", "children", "heading", "label"];
|
18
18
|
var componentName = 'Nav';
|
19
19
|
var blockClass = "".concat(pkg.prefix, "--nav");
|
20
|
+
|
21
|
+
/**
|
22
|
+
* @deprecated This component is deprecated
|
23
|
+
*/
|
20
24
|
var Nav = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
21
25
|
var activeHref = _ref.activeHref,
|
22
26
|
className = _ref.className,
|
@@ -121,6 +125,10 @@ var Nav = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
121
125
|
return (child === null || child === void 0 || (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === NavList.displayName ? buildNewListChild(child, index) : buildNewItemChild(child, index);
|
122
126
|
})));
|
123
127
|
});
|
128
|
+
Nav.deprecated = {
|
129
|
+
level: 'warn',
|
130
|
+
details: "This component is deprecated"
|
131
|
+
};
|
124
132
|
Nav.propTypes = {
|
125
133
|
/**
|
126
134
|
* Hypertext reference for active page.
|
@@ -27,6 +27,7 @@ var defaults = {
|
|
27
27
|
|
28
28
|
/**
|
29
29
|
* A list of icon/description pairs used to show multiple states of progress.
|
30
|
+
* @deprecated This component is deprecated
|
30
31
|
*/
|
31
32
|
var StatusIndicator = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
32
33
|
var children = _ref.children,
|
@@ -57,6 +58,10 @@ var StatusIndicator = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
|
|
57
58
|
}
|
58
59
|
}, retryLabel));
|
59
60
|
});
|
61
|
+
StatusIndicator.deprecated = {
|
62
|
+
level: 'warn',
|
63
|
+
details: "This component is deprecated"
|
64
|
+
};
|
60
65
|
|
61
66
|
// Return a placeholder if not released and not enabled by feature flag
|
62
67
|
StatusIndicator = pkg.checkComponentEnabled(StatusIndicator, componentName);
|
@@ -26,6 +26,7 @@ var defaults = {
|
|
26
26
|
|
27
27
|
/**
|
28
28
|
* An icon/description pair that describes one step of the `StatusIndicator`.
|
29
|
+
* @deprecated This component is deprecated
|
29
30
|
*/
|
30
31
|
var StatusIndicatorStep = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
31
32
|
var className = _ref.className,
|
@@ -54,6 +55,10 @@ var StatusIndicatorStep = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
54
55
|
className: "".concat(blockClass, "__error-message")
|
55
56
|
}, errorMessage));
|
56
57
|
});
|
58
|
+
StatusIndicatorStep.deprecated = {
|
59
|
+
level: 'warn',
|
60
|
+
details: "This component is deprecated"
|
61
|
+
};
|
57
62
|
|
58
63
|
// Return a placeholder if not released and not enabled by feature flag
|
59
64
|
StatusIndicatorStep = pkg.checkComponentEnabled(StatusIndicatorStep, componentName);
|
@@ -107,7 +107,7 @@ export interface TearsheetProps extends PropsWithChildren {
|
|
107
107
|
/**
|
108
108
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
109
109
|
*/
|
110
|
-
portalTarget?:
|
110
|
+
portalTarget?: HTMLElement;
|
111
111
|
/**
|
112
112
|
* Specify a CSS selector that matches the DOM element that should be
|
113
113
|
* focused when the Modal opens.
|
@@ -63,7 +63,7 @@ interface TearsheetNarrowBaseProps extends PropsWithChildren {
|
|
63
63
|
/**
|
64
64
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
65
65
|
*/
|
66
|
-
portalTarget?:
|
66
|
+
portalTarget?: HTMLElement;
|
67
67
|
/**
|
68
68
|
* Specify a CSS selector that matches the DOM element that should be
|
69
69
|
* focused when the Modal opens.
|
@@ -84,7 +84,7 @@ interface TearsheetShellProps extends PropsWithChildren {
|
|
84
84
|
/**
|
85
85
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
86
86
|
*/
|
87
|
-
portalTarget?:
|
87
|
+
portalTarget?: HTMLElement;
|
88
88
|
/**
|
89
89
|
* Specify a CSS selector that matches the DOM element that should be
|
90
90
|
* focused when the Modal opens.
|
@@ -18,7 +18,7 @@ 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
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"];
|
@@ -146,33 +146,12 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
146
146
|
|
147
147
|
// Callback to give the tearsheet the opportunity to claim focus
|
148
148
|
handleStackChange.claimFocus = function () {
|
149
|
-
|
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);
|
149
|
+
claimFocus(firstElement, modalRef, selectorPrimaryFocus);
|
159
150
|
};
|
160
151
|
useEffect(function () {
|
161
152
|
if (open) {
|
162
153
|
// 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);
|
154
|
+
claimFocus(firstElement, modalRef, selectorPrimaryFocus);
|
176
155
|
}
|
177
156
|
}, [firstElement, modalRef, open, selectorPrimaryFocus]);
|
178
157
|
useEffect(function () {
|
@@ -15,4 +15,4 @@ export interface TooltipTriggerProps extends PropsWithChildren {
|
|
15
15
|
* This is an tooltip trigger as Carbon Tooltip requires an active element to work but provides
|
16
16
|
* no blanked button.
|
17
17
|
*/
|
18
|
-
export declare let TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<
|
18
|
+
export declare let TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
@@ -23,12 +23,13 @@ var componentName = 'TooltipTrigger';
|
|
23
23
|
* This is an tooltip trigger as Carbon Tooltip requires an active element to work but provides
|
24
24
|
* no blanked button.
|
25
25
|
*/
|
26
|
-
var TooltipTrigger = /*#__PURE__*/React__default.forwardRef(function (_ref) {
|
26
|
+
var TooltipTrigger = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
27
27
|
var children = _ref.children,
|
28
28
|
className = _ref.className,
|
29
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
30
30
|
return /*#__PURE__*/React__default.createElement("button", _extends({
|
31
|
-
type: "button"
|
31
|
+
type: "button",
|
32
|
+
ref: ref
|
32
33
|
}, rest, {
|
33
34
|
className: cx(blockClass,
|
34
35
|
// Apply the block class to the main HTML element
|
@@ -96,9 +96,7 @@ var UserAvatar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
96
96
|
// switched classes dependant on props or state
|
97
97
|
// example: [`${blockClass}__here-if-small`]: size === 'sm',
|
98
98
|
}),
|
99
|
-
ref: ref
|
100
|
-
role: "img",
|
101
|
-
"aria-hidden": "true"
|
99
|
+
ref: ref
|
102
100
|
}, getDevtoolsProps(componentName)), getItem());
|
103
101
|
};
|
104
102
|
if (tooltipText) {
|
@@ -104,4 +104,24 @@ 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
|
+
return specifiedEl.focus();
|
120
|
+
}
|
121
|
+
}
|
122
|
+
setTimeout(function () {
|
123
|
+
return firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
124
|
+
}, 0);
|
125
|
+
};
|
126
|
+
|
127
|
+
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 };
|
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';
|
@@ -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 () {};
|
@@ -67,7 +67,7 @@ var APIKeyDownloader = function APIKeyDownloader(_ref) {
|
|
67
67
|
className: "".concat(settings.pkg.prefix, "--apikey-modal__download-link"),
|
68
68
|
"aria-label": downloadLinkLabel !== null && downloadLinkLabel !== void 0 ? downloadLinkLabel : linkText,
|
69
69
|
role: "button"
|
70
|
-
}), linkText)));
|
70
|
+
}), downloadLinkLabel !== null && downloadLinkLabel !== void 0 ? downloadLinkLabel : linkText)));
|
71
71
|
};
|
72
72
|
APIKeyDownloader.displayName = componentName;
|
73
73
|
APIKeyDownloader.propTypes = {
|
@@ -19,9 +19,11 @@ var usePortalTarget = require('../../global/js/hooks/usePortalTarget.js');
|
|
19
19
|
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
|
+
var useFocus = require('../../global/js/hooks/useFocus.js');
|
23
|
+
var usePreviousValue = require('../../global/js/hooks/usePreviousValue.js');
|
22
24
|
|
23
25
|
var _ErrorFilled, _InformationFilled;
|
24
|
-
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", "showAPIKeyLabel"];
|
26
|
+
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", "launcherButtonRef", "loading", "loadingText", "modalLabel", "nameHelperText", "nameLabel", "namePlaceholder", "nameRequired", "nextStepButtonText", "onClose", "onCopy", "onRequestEdit", "onRequestGenerate", "open", "portalTarget", "previousStepButtonText", "selectorPrimaryFocus", "showAPIKeyLabel"];
|
25
27
|
var componentName = 'APIKeyModal';
|
26
28
|
|
27
29
|
// Default values for props
|
@@ -62,6 +64,7 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
62
64
|
hasAPIKeyVisibilityToggle = _ref.hasAPIKeyVisibilityToggle,
|
63
65
|
hasDownloadLink = _ref.hasDownloadLink,
|
64
66
|
hideAPIKeyLabel = _ref.hideAPIKeyLabel,
|
67
|
+
launcherButtonRef = _ref.launcherButtonRef,
|
65
68
|
loading = _ref.loading,
|
66
69
|
loadingText = _ref.loadingText,
|
67
70
|
modalLabel = _ref.modalLabel,
|
@@ -77,6 +80,7 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
77
80
|
open = _ref.open,
|
78
81
|
portalTargetIn = _ref.portalTarget,
|
79
82
|
previousStepButtonText = _ref.previousStepButtonText,
|
83
|
+
selectorPrimaryFocus = _ref.selectorPrimaryFocus,
|
80
84
|
showAPIKeyLabel = _ref.showAPIKeyLabel,
|
81
85
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
82
86
|
var _useState = React.useState(null),
|
@@ -113,11 +117,30 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
113
117
|
ref: copyRef
|
114
118
|
};
|
115
119
|
var blockClass = "".concat(settings.pkg.prefix, "--apikey-modal");
|
120
|
+
var localRef = React.useRef(undefined);
|
121
|
+
var modalRef = ref || localRef;
|
122
|
+
var _useFocus = useFocus.useFocus(modalRef, selectorPrimaryFocus),
|
123
|
+
firstElement = _useFocus.firstElement,
|
124
|
+
keyDownListener = _useFocus.keyDownListener;
|
125
|
+
var prevOpen = usePreviousValue.usePreviousValue(open);
|
116
126
|
React.useEffect(function () {
|
117
127
|
if (copyRef.current && open && apiKeyLoaded) {
|
118
128
|
copyRef.current.focus();
|
119
129
|
}
|
120
130
|
}, [open, apiKeyLoaded]);
|
131
|
+
React.useEffect(function () {
|
132
|
+
if (open) {
|
133
|
+
// Focusing the first element or selectorPrimaryFocus element
|
134
|
+
useFocus.claimFocus(firstElement, modalRef, selectorPrimaryFocus);
|
135
|
+
}
|
136
|
+
}, [firstElement, modalRef, open, selectorPrimaryFocus]);
|
137
|
+
React.useEffect(function () {
|
138
|
+
if (prevOpen && !open && launcherButtonRef) {
|
139
|
+
setTimeout(function () {
|
140
|
+
launcherButtonRef.current.focus();
|
141
|
+
}, 0);
|
142
|
+
}
|
143
|
+
}, [launcherButtonRef, open, prevOpen]);
|
121
144
|
var isPrimaryButtonDisabled = function isPrimaryButtonDisabled() {
|
122
145
|
if (loading) {
|
123
146
|
return true;
|
@@ -232,10 +255,13 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
232
255
|
onCloseHandler();
|
233
256
|
}
|
234
257
|
};
|
235
|
-
return renderPortalUse( /*#__PURE__*/React.createElement(react.
|
236
|
-
|
237
|
-
|
258
|
+
return renderPortalUse( /*#__PURE__*/React.createElement(react.unstable_FeatureFlags, {
|
259
|
+
enableExperimentalFocusWrapWithoutSentinels: true
|
260
|
+
}, /*#__PURE__*/React.createElement(react.ComposedModal, _rollupPluginBabelHelpers.extends({}, rest, _rollupPluginBabelHelpers.objectSpread2({
|
261
|
+
open: open
|
238
262
|
}, devtools.getDevtoolsProps(componentName)), {
|
263
|
+
ref: modalRef,
|
264
|
+
onKeyDown: keyDownListener,
|
239
265
|
className: cx(className, blockClass),
|
240
266
|
onClose: onCloseHandler,
|
241
267
|
size: "sm",
|
@@ -308,7 +334,7 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
308
334
|
kind: "primary",
|
309
335
|
onClick: submitHandler,
|
310
336
|
disabled: isPrimaryButtonDisabled()
|
311
|
-
}), getPrimaryButtonText()))));
|
337
|
+
}), getPrimaryButtonText())))));
|
312
338
|
});
|
313
339
|
var customStepsRequiredProps = function customStepsRequiredProps(type) {
|
314
340
|
return propsHelper.isRequiredIf(type, function (_ref3) {
|
@@ -460,6 +486,11 @@ exports.APIKeyModal.propTypes = {
|
|
460
486
|
* label text that's displayed when hovering over visibility toggler to hide key
|
461
487
|
*/
|
462
488
|
hideAPIKeyLabel: index.default.string,
|
489
|
+
/**
|
490
|
+
* Provide a ref to return focus to once the tearsheet is closed.
|
491
|
+
*/
|
492
|
+
/**@ts-ignore */
|
493
|
+
launcherButtonRef: index.default.any,
|
463
494
|
/**
|
464
495
|
* designates if the modal is in a loading state via a request or some other in progress operation
|
465
496
|
*/
|
@@ -521,6 +552,11 @@ exports.APIKeyModal.propTypes = {
|
|
521
552
|
* text that displays in the secondary button when using custom steps to indicate to the user that there is a previous step
|
522
553
|
*/
|
523
554
|
previousStepButtonText: customStepsRequiredProps(index.default.string),
|
555
|
+
/**
|
556
|
+
* Specify a CSS selector that matches the DOM element that should be
|
557
|
+
* focused when the Modal opens.
|
558
|
+
*/
|
559
|
+
selectorPrimaryFocus: index.default.string,
|
524
560
|
/**
|
525
561
|
* label text that's displayed when hovering over visibility toggler to show key
|
526
562
|
*/
|
@@ -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.
|
@@ -92,6 +92,10 @@ interface APIKeyModalCommonProps {
|
|
92
92
|
* label text that's displayed when hovering over visibility toggler to hide key
|
93
93
|
*/
|
94
94
|
hideAPIKeyLabel?: string;
|
95
|
+
/**
|
96
|
+
* Provide a ref to return focus to once the tearsheet is closed.
|
97
|
+
*/
|
98
|
+
launcherButtonRef?: RefObject<any>;
|
95
99
|
/**
|
96
100
|
* designates if the modal is in a loading state via a request or some other in progress operation
|
97
101
|
*/
|
@@ -145,6 +149,11 @@ interface APIKeyModalCommonProps {
|
|
145
149
|
* The DOM node the tearsheet should be rendered within. Defaults to document.body.
|
146
150
|
*/
|
147
151
|
portalTarget?: ReactNode;
|
152
|
+
/**
|
153
|
+
* Specify a CSS selector that matches the DOM element that should be
|
154
|
+
* focused when the Modal opens.
|
155
|
+
*/
|
156
|
+
selectorPrimaryFocus?: string;
|
148
157
|
/**
|
149
158
|
* label text that's displayed when hovering over visibility toggler to show key
|
150
159
|
*/
|
@@ -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, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import { Filter, Item, Theme } from './types';
|
3
3
|
export interface AddSelectProps {
|
4
4
|
className?: string;
|
@@ -36,7 +36,7 @@ export interface AddSelectProps {
|
|
36
36
|
/**
|
37
37
|
* portal target for the all tags modal
|
38
38
|
*/
|
39
|
-
portalTarget?:
|
39
|
+
portalTarget?: HTMLElement;
|
40
40
|
searchResultsTitle?: string;
|
41
41
|
sortByLabel?: string;
|
42
42
|
title: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import { Item, Theme } from './types';
|
3
3
|
export interface AddSelectBodyProps {
|
4
4
|
className?: string;
|
@@ -35,7 +35,7 @@ export interface AddSelectBodyProps {
|
|
35
35
|
onSubmit?: (selection: any) => void;
|
36
36
|
onSubmitButtonText?: string;
|
37
37
|
open?: boolean;
|
38
|
-
portalTarget?:
|
38
|
+
portalTarget?: HTMLElement;
|
39
39
|
searchResultsTitle?: string;
|
40
40
|
sortByLabel?: string;
|
41
41
|
title?: string;
|
@@ -363,6 +363,7 @@ AddSelectBody.propTypes = {
|
|
363
363
|
onSubmit: index.default.func,
|
364
364
|
onSubmitButtonText: index.default.string,
|
365
365
|
open: index.default.bool,
|
366
|
+
/**@ts-ignore */
|
366
367
|
portalTarget: index.default.node,
|
367
368
|
searchResultsTitle: index.default.string,
|
368
369
|
sortByLabel: index.default.string,
|