@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.
Files changed (243) hide show
  1. package/css/index-full-carbon.css +90 -21
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +14 -8
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +14 -8
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +27 -11
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/_virtual/_rollupPluginBabelHelpers.js +1 -1
  18. package/es/components/APIKeyModal/APIKeyDownloader.js +1 -1
  19. package/es/components/APIKeyModal/APIKeyModal.js +42 -6
  20. package/es/components/APIKeyModal/APIKeyModal.types.d.ts +10 -1
  21. package/es/components/AboutModal/AboutModal.js +3 -6
  22. package/es/components/AddSelect/AddSelect.d.ts +2 -2
  23. package/es/components/AddSelect/AddSelect.js +1 -0
  24. package/es/components/AddSelect/AddSelectBody.d.ts +2 -2
  25. package/es/components/AddSelect/AddSelectBody.js +1 -0
  26. package/es/components/AddSelect/hooks/useFocus.js +1 -2
  27. package/es/components/AddSelect/hooks/useParentSelect.js +1 -2
  28. package/es/components/AddSelect/hooks/usePath.js +1 -2
  29. package/es/components/Card/Card.js +13 -9
  30. package/es/components/Checklist/Checklist.js +1 -1
  31. package/es/components/Checklist/ChecklistIcon.js +1 -1
  32. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -2
  33. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +1 -5
  34. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +5 -5
  35. package/es/components/ConditionBuilder/utils/util.js +0 -4
  36. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +2 -2
  37. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +1 -2
  38. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -2
  39. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -2
  40. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -2
  41. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -2
  42. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +2 -3
  43. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -3
  44. package/es/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +1 -2
  45. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
  46. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
  47. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
  48. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
  49. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -2
  50. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -2
  51. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +1 -1
  52. package/es/components/Datagrid/useCustomizeColumns.js +4 -4
  53. package/es/components/Datagrid/useDatagrid.js +2 -2
  54. package/es/components/Datagrid/useDefaultStringRenderer.js +1 -2
  55. package/es/components/Datagrid/useEditableCell.js +1 -2
  56. package/es/components/Datagrid/useFlexResize.js +1 -2
  57. package/es/components/Datagrid/useFloatingScroll.js +1 -2
  58. package/es/components/Datagrid/useNestedRowExpander.js +1 -2
  59. package/es/components/Datagrid/useParentDimensions.js +1 -2
  60. package/es/components/Datagrid/useResizeTable.js +1 -2
  61. package/es/components/Datagrid/useRowExpander.js +1 -2
  62. package/es/components/Datagrid/useRowRenderer.js +1 -2
  63. package/es/components/Datagrid/useRowSize.js +1 -2
  64. package/es/components/Datagrid/useSkeletonRows.js +1 -2
  65. package/es/components/DecoratorDualButton/DecoratorDualButton.d.ts +1 -0
  66. package/es/components/DecoratorDualButton/DecoratorDualButton.js +5 -0
  67. package/es/components/DecoratorLink/DecoratorLink.d.ts +1 -0
  68. package/es/components/DecoratorLink/DecoratorLink.js +5 -0
  69. package/es/components/DecoratorSingleButton/DecoratorSingleButton.d.ts +1 -0
  70. package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +5 -0
  71. package/es/components/DescriptionList/DescriptionList.d.ts +1 -0
  72. package/es/components/DescriptionList/DescriptionList.js +5 -0
  73. package/es/components/EditFullPage/EditFullPage.d.ts +2 -0
  74. package/es/components/EditFullPage/EditFullPage.js +8 -0
  75. package/es/components/EditSidePanel/EditSidePanel.d.ts +2 -0
  76. package/es/components/EditSidePanel/EditSidePanel.js +8 -0
  77. package/es/components/EditTearsheet/EditTearsheet.d.ts +2 -0
  78. package/es/components/EditTearsheet/EditTearsheet.js +8 -0
  79. package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.d.ts +2 -0
  80. package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.js +8 -0
  81. package/es/components/EditUpdateCards/EditUpdateCards.d.ts +2 -0
  82. package/es/components/EditUpdateCards/EditUpdateCards.js +8 -0
  83. package/es/components/EmptyStates/EmptyStateIllustration.js +1 -2
  84. package/es/components/EmptyStates/EmptyStateV2.d.ts +1 -0
  85. package/es/components/EmptyStates/EmptyStateV2.js +7 -0
  86. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  87. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  88. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  89. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  90. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  91. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  92. package/es/components/EmptyStates/assets/ErrorIllustration.js +1 -2
  93. package/es/components/EmptyStates/assets/NoDataIllustration.js +1 -2
  94. package/es/components/EmptyStates/assets/NoTagsIllustration.js +1 -2
  95. package/es/components/EmptyStates/assets/NotFoundIllustration.js +1 -2
  96. package/es/components/EmptyStates/assets/NotificationsIllustration.js +1 -2
  97. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +1 -2
  98. package/es/components/FilterPanel/FilterPanel.d.ts +1 -0
  99. package/es/components/FilterPanel/FilterPanel.js +6 -0
  100. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +1 -0
  101. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +5 -0
  102. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +1 -0
  103. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +5 -1
  104. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +1 -0
  105. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -0
  106. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +1 -0
  107. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +5 -0
  108. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +1 -0
  109. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +5 -0
  110. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +1 -0
  111. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +5 -1
  112. package/es/components/Nav/Nav.d.ts +3 -0
  113. package/es/components/Nav/Nav.js +8 -0
  114. package/es/components/Nav/NavItemLink.js +1 -2
  115. package/es/components/StatusIndicator/StatusIndicator.d.ts +1 -0
  116. package/es/components/StatusIndicator/StatusIndicator.js +5 -0
  117. package/es/components/StatusIndicator/StatusIndicatorStep.d.ts +1 -0
  118. package/es/components/StatusIndicator/StatusIndicatorStep.js +5 -0
  119. package/es/components/Tearsheet/Tearsheet.d.ts +1 -1
  120. package/es/components/Tearsheet/TearsheetNarrow.d.ts +1 -1
  121. package/es/components/Tearsheet/TearsheetShell.d.ts +1 -1
  122. package/es/components/Tearsheet/TearsheetShell.js +3 -24
  123. package/es/components/TooltipTrigger/TooltipTrigger.d.ts +1 -1
  124. package/es/components/TooltipTrigger/TooltipTrigger.js +3 -2
  125. package/es/components/UserAvatar/UserAvatar.js +1 -3
  126. package/es/global/js/hooks/useFocus.d.ts +1 -0
  127. package/es/global/js/hooks/useFocus.js +21 -1
  128. package/es/global/js/hooks/usePrefersReducedMotion.js +1 -2
  129. package/es/index.js +1 -1
  130. package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
  131. package/lib/components/APIKeyModal/APIKeyDownloader.js +1 -1
  132. package/lib/components/APIKeyModal/APIKeyModal.js +41 -5
  133. package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +10 -1
  134. package/lib/components/AboutModal/AboutModal.js +2 -5
  135. package/lib/components/AddSelect/AddSelect.d.ts +2 -2
  136. package/lib/components/AddSelect/AddSelect.js +1 -0
  137. package/lib/components/AddSelect/AddSelectBody.d.ts +2 -2
  138. package/lib/components/AddSelect/AddSelectBody.js +1 -0
  139. package/lib/components/AddSelect/hooks/useFocus.js +1 -2
  140. package/lib/components/AddSelect/hooks/useParentSelect.js +1 -2
  141. package/lib/components/AddSelect/hooks/usePath.js +1 -2
  142. package/lib/components/Card/Card.js +12 -8
  143. package/lib/components/Checklist/ChecklistChart.js +7 -7
  144. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -2
  145. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +1 -5
  146. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +5 -5
  147. package/lib/components/ConditionBuilder/utils/util.js +0 -4
  148. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +2 -2
  149. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +1 -2
  150. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -2
  151. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -2
  152. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -2
  153. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -2
  154. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +1 -2
  155. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +1 -2
  156. package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +1 -2
  157. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
  158. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
  159. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
  160. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
  161. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -2
  162. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -2
  163. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +1 -1
  164. package/lib/components/Datagrid/useColumnOrder.js +1 -1
  165. package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -2
  166. package/lib/components/Datagrid/useEditableCell.js +1 -2
  167. package/lib/components/Datagrid/useFlexResize.js +1 -2
  168. package/lib/components/Datagrid/useFloatingScroll.js +1 -2
  169. package/lib/components/Datagrid/useNestedRowExpander.js +1 -2
  170. package/lib/components/Datagrid/useParentDimensions.js +1 -2
  171. package/lib/components/Datagrid/useResizeTable.js +1 -2
  172. package/lib/components/Datagrid/useRowExpander.js +1 -2
  173. package/lib/components/Datagrid/useRowRenderer.js +1 -2
  174. package/lib/components/Datagrid/useRowSize.js +1 -2
  175. package/lib/components/Datagrid/useSkeletonRows.js +1 -2
  176. package/lib/components/DecoratorDualButton/DecoratorDualButton.d.ts +1 -0
  177. package/lib/components/DecoratorDualButton/DecoratorDualButton.js +5 -0
  178. package/lib/components/DecoratorLink/DecoratorLink.d.ts +1 -0
  179. package/lib/components/DecoratorLink/DecoratorLink.js +5 -0
  180. package/lib/components/DecoratorSingleButton/DecoratorSingleButton.d.ts +1 -0
  181. package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +5 -0
  182. package/lib/components/DescriptionList/DescriptionList.d.ts +1 -0
  183. package/lib/components/DescriptionList/DescriptionList.js +5 -0
  184. package/lib/components/EditFullPage/EditFullPage.d.ts +2 -0
  185. package/lib/components/EditFullPage/EditFullPage.js +8 -0
  186. package/lib/components/EditSidePanel/EditSidePanel.d.ts +2 -0
  187. package/lib/components/EditSidePanel/EditSidePanel.js +8 -0
  188. package/lib/components/EditTearsheet/EditTearsheet.d.ts +2 -0
  189. package/lib/components/EditTearsheet/EditTearsheet.js +8 -0
  190. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.d.ts +2 -0
  191. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +8 -0
  192. package/lib/components/EditUpdateCards/EditUpdateCards.d.ts +2 -0
  193. package/lib/components/EditUpdateCards/EditUpdateCards.js +8 -0
  194. package/lib/components/EmptyStates/EmptyStateIllustration.js +1 -2
  195. package/lib/components/EmptyStates/EmptyStateV2.d.ts +1 -0
  196. package/lib/components/EmptyStates/EmptyStateV2.js +7 -0
  197. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  198. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  199. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  200. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  201. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  202. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  203. package/lib/components/EmptyStates/assets/ErrorIllustration.js +1 -2
  204. package/lib/components/EmptyStates/assets/NoDataIllustration.js +1 -2
  205. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +1 -2
  206. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +1 -2
  207. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +1 -2
  208. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +1 -2
  209. package/lib/components/FilterPanel/FilterPanel.d.ts +1 -0
  210. package/lib/components/FilterPanel/FilterPanel.js +6 -0
  211. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +1 -0
  212. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +5 -0
  213. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +1 -0
  214. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +5 -1
  215. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +1 -0
  216. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -0
  217. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +1 -0
  218. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +5 -0
  219. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +1 -0
  220. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +5 -0
  221. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +1 -0
  222. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +5 -1
  223. package/lib/components/Nav/Nav.d.ts +3 -0
  224. package/lib/components/Nav/Nav.js +8 -0
  225. package/lib/components/Nav/NavItemLink.js +1 -2
  226. package/lib/components/StatusIndicator/StatusIndicator.d.ts +1 -0
  227. package/lib/components/StatusIndicator/StatusIndicator.js +5 -0
  228. package/lib/components/StatusIndicator/StatusIndicatorStep.d.ts +1 -0
  229. package/lib/components/StatusIndicator/StatusIndicatorStep.js +5 -0
  230. package/lib/components/Tearsheet/Tearsheet.d.ts +1 -1
  231. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +1 -1
  232. package/lib/components/Tearsheet/TearsheetShell.d.ts +1 -1
  233. package/lib/components/Tearsheet/TearsheetShell.js +2 -23
  234. package/lib/components/TooltipTrigger/TooltipTrigger.d.ts +1 -1
  235. package/lib/components/TooltipTrigger/TooltipTrigger.js +3 -2
  236. package/lib/components/UserAvatar/UserAvatar.js +1 -3
  237. package/lib/global/js/hooks/useFocus.d.ts +1 -0
  238. package/lib/global/js/hooks/useFocus.js +21 -0
  239. package/lib/global/js/hooks/usePrefersReducedMotion.js +1 -2
  240. package/lib/index.js +109 -109
  241. package/package.json +11 -11
  242. package/scss/components/Datagrid/styles/_datagrid.scss +16 -6
  243. 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';
@@ -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);
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * A container with a label and optional count.
3
+ * @deprecated This component is deprecated
3
4
  */
4
5
  export let FilterPanelGroup: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
6
  import React from 'react';
@@ -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);
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * An input field and container to show search results.
3
+ * @deprecated This component is deprecated
3
4
  */
4
5
  export let FilterPanelSearch: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
6
  import React from 'react';
@@ -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;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated This component is deprecated
3
+ */
1
4
  export let Nav: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
5
  export default Nav;
3
6
  import React from 'react';
@@ -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.
@@ -25,6 +25,5 @@ NavItemLink.propTypes = {
25
25
  NavItemLink.defaultProps = {
26
26
  element: 'a'
27
27
  };
28
- var NavItemLink$1 = NavItemLink;
29
28
 
30
- export { NavItemLink$1 as default };
29
+ export { NavItemLink as default };
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * A list of icon/description pairs used to show multiple states of progress.
3
+ * @deprecated This component is deprecated
3
4
  */
4
5
  export let StatusIndicator: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
6
  import React from 'react';
@@ -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);
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * An icon/description pair that describes one step of the `StatusIndicator`.
3
+ * @deprecated This component is deprecated
3
4
  */
4
5
  export let StatusIndicatorStep: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
6
  import React from 'react';
@@ -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?: ReactNode;
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?: ReactNode;
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?: ReactNode;
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, getSpecificElement } from '../../global/js/hooks/useFocus.js';
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
- 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);
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
- if (selectorPrimaryFocus && getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus)) {
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<HTMLDivElement>>;
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) {
@@ -12,3 +12,4 @@ export function useFocus(modalRef: any, selectorPrimaryFocus: any): {
12
12
  specified: any;
13
13
  };
14
14
  };
15
+ export function claimFocus(firstElement: any, modalRef: any, selectorPrimaryFocus?: string | undefined): any;
@@ -104,4 +104,24 @@ var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
104
104
  };
105
105
  };
106
106
 
107
- export { getSpecificElement, useFocus };
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$1 as default };
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 && o && typeof o.length === "number") {
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.ComposedModal, _rollupPluginBabelHelpers.extends({}, rest, _rollupPluginBabelHelpers.objectSpread2({
236
- open: open,
237
- ref: ref
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
- setTimeout(function () {
68
- return firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
69
- }, 0);
67
+ useFocus.claimFocus(firstElement, modalRef);
70
68
  }
71
- // eslint-disable-next-line react-hooks/exhaustive-deps
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, { ReactNode } from '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?: ReactNode;
39
+ portalTarget?: HTMLElement;
40
40
  searchResultsTitle?: string;
41
41
  sortByLabel?: string;
42
42
  title: string;
@@ -109,6 +109,7 @@ AddSelect.propTypes = {
109
109
  /**
110
110
  * portal target for the all tags modal
111
111
  */
112
+ /**@ts-ignore */
112
113
  portalTarget: index.default.node,
113
114
  searchResultsTitle: index.default.string,
114
115
  sortByLabel: index.default.string,
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from '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?: ReactNode;
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,
@@ -40,6 +40,5 @@ var useFocus = function useFocus(size) {
40
40
  }, [handleKeyDown]);
41
41
  return [currentFocus, setCurrentFocus];
42
42
  };
43
- var useFocus$1 = useFocus;
44
43
 
45
- exports.default = useFocus$1;
44
+ exports.default = useFocus;
@@ -22,6 +22,5 @@ var useParentSelect = function useParentSelect() {
22
22
  setParentSelected: setParentSelected
23
23
  };
24
24
  };
25
- var useParentSelect$1 = useParentSelect;
26
25
 
27
- exports.default = useParentSelect$1;
26
+ exports.default = useParentSelect;
@@ -70,6 +70,5 @@ var usePath = function usePath() {
70
70
  resetPath: resetPath
71
71
  };
72
72
  };
73
- var usePath$1 = usePath;
74
73
 
75
- exports.default = usePath$1;
74
+ exports.default = usePath;