@carbon/ibm-products 2.79.0 → 2.80.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/css/carbon.css +39 -19
  2. package/css/carbon.css.map +1 -1
  3. package/css/index-full-carbon.css +186 -80
  4. package/css/index-full-carbon.css.map +1 -1
  5. package/css/index-full-carbon.min.css +1 -1
  6. package/css/index-full-carbon.min.css.map +1 -1
  7. package/css/index-without-carbon-released-only.css +147 -61
  8. package/css/index-without-carbon-released-only.css.map +1 -1
  9. package/css/index-without-carbon-released-only.min.css +1 -1
  10. package/css/index-without-carbon-released-only.min.css.map +1 -1
  11. package/css/index-without-carbon.css +147 -61
  12. package/css/index-without-carbon.css.map +1 -1
  13. package/css/index-without-carbon.min.css +1 -1
  14. package/css/index-without-carbon.min.css.map +1 -1
  15. package/css/index.css +150 -66
  16. package/css/index.css.map +1 -1
  17. package/css/index.min.css +1 -1
  18. package/css/index.min.css.map +1 -1
  19. package/es/components/Coachmark/Coachmark.d.ts +2 -1
  20. package/es/components/Coachmark/Coachmark.js +6 -0
  21. package/es/components/Coachmark/CoachmarkDragbar.d.ts +2 -1
  22. package/es/components/Coachmark/CoachmarkDragbar.js +7 -0
  23. package/es/components/Coachmark/CoachmarkHeader.d.ts +2 -1
  24. package/es/components/Coachmark/CoachmarkHeader.js +7 -0
  25. package/es/components/Coachmark/CoachmarkOverlay.d.ts +2 -1
  26. package/es/components/Coachmark/CoachmarkOverlay.js +1 -0
  27. package/es/components/Coachmark/CoachmarkTagline.d.ts +2 -1
  28. package/es/components/Coachmark/CoachmarkTagline.js +7 -0
  29. package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +3 -2
  30. package/es/components/Coachmark/utils/hooks.js +4 -3
  31. package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +2 -1
  32. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +7 -0
  33. package/es/components/CoachmarkButton/CoachmarkButton.d.ts +2 -1
  34. package/es/components/CoachmarkButton/CoachmarkButton.js +1 -0
  35. package/es/components/CoachmarkFixed/CoachmarkFixed.d.ts +1 -0
  36. package/es/components/CoachmarkFixed/CoachmarkFixed.js +7 -0
  37. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +2 -1
  38. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +1 -0
  39. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +2 -1
  40. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +1 -0
  41. package/es/components/CoachmarkStack/CoachmarkStack.d.ts +2 -1
  42. package/es/components/CoachmarkStack/CoachmarkStack.js +7 -0
  43. package/es/components/CreateFullPage/CreateFullPage.js +1 -1
  44. package/es/components/CreateTearsheet/CreateTearsheet.js +2 -2
  45. package/es/components/CreateTearsheet/CreateTearsheetStep.js +2 -21
  46. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +3 -2
  47. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  48. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -0
  49. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +2 -1
  50. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -1
  51. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.d.ts +1 -1
  52. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +6 -1
  53. package/es/components/Datagrid/useResizeTable.js +2 -2
  54. package/es/components/Datagrid/useSelectRows.js +3 -2
  55. package/es/components/Datagrid/useStickyColumn.js +3 -2
  56. package/es/components/PageHeader/next/PageHeader.js +4 -3
  57. package/es/components/ScrollGradient/constants.js +3 -2
  58. package/es/components/Tearsheet/TearsheetShell.js +4 -6
  59. package/es/components/Tearsheet/next/StackContext.d.ts +21 -0
  60. package/es/components/Tearsheet/next/StackContext.js +94 -0
  61. package/es/components/Tearsheet/next/Tearsheet.d.ts +13 -2
  62. package/es/components/Tearsheet/next/Tearsheet.js +46 -10
  63. package/es/components/Tearsheet/next/TearsheetBody.d.ts +6 -0
  64. package/es/components/Tearsheet/next/TearsheetBody.js +19 -7
  65. package/es/components/Tearsheet/next/TearsheetHeaderActions.js +9 -4
  66. package/es/components/Tearsheet/next/TearsheetHeaderContent.d.ts +22 -8
  67. package/es/components/Tearsheet/next/TearsheetHeaderContent.js +14 -27
  68. package/es/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +3 -2
  69. package/es/components/Tearsheet/next/index.d.ts +2 -0
  70. package/es/components/index.d.ts +2 -1
  71. package/es/global/js/hooks/useCreateComponentFocus.js +34 -4
  72. package/es/global/js/hooks/useIsomorphicEffect.d.ts +7 -1
  73. package/es/global/js/hooks/useIsomorphicEffect.js +1 -2
  74. package/es/global/js/hooks/useResizeObserver.js +4 -3
  75. package/es/global/js/hooks/useWindowResize.js +3 -2
  76. package/es/global/js/hooks/useWindowScroll.js +3 -2
  77. package/es/index.js +2 -2
  78. package/lib/components/Coachmark/Coachmark.d.ts +2 -1
  79. package/lib/components/Coachmark/Coachmark.js +6 -0
  80. package/lib/components/Coachmark/CoachmarkDragbar.d.ts +2 -1
  81. package/lib/components/Coachmark/CoachmarkDragbar.js +7 -0
  82. package/lib/components/Coachmark/CoachmarkHeader.d.ts +2 -1
  83. package/lib/components/Coachmark/CoachmarkHeader.js +7 -0
  84. package/lib/components/Coachmark/CoachmarkOverlay.d.ts +2 -1
  85. package/lib/components/Coachmark/CoachmarkOverlay.js +1 -0
  86. package/lib/components/Coachmark/CoachmarkTagline.d.ts +2 -1
  87. package/lib/components/Coachmark/CoachmarkTagline.js +7 -0
  88. package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +2 -1
  89. package/lib/components/Coachmark/utils/hooks.js +3 -2
  90. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +2 -1
  91. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +7 -0
  92. package/lib/components/CoachmarkButton/CoachmarkButton.d.ts +2 -1
  93. package/lib/components/CoachmarkButton/CoachmarkButton.js +1 -0
  94. package/lib/components/CoachmarkFixed/CoachmarkFixed.d.ts +1 -0
  95. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +7 -0
  96. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +2 -1
  97. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +1 -0
  98. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +2 -1
  99. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +1 -0
  100. package/lib/components/CoachmarkStack/CoachmarkStack.d.ts +2 -1
  101. package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -0
  102. package/lib/components/CreateFullPage/CreateFullPage.js +1 -1
  103. package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -2
  104. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +2 -21
  105. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
  106. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +2 -1
  107. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -0
  108. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +2 -1
  109. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -1
  110. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.d.ts +1 -1
  111. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +6 -1
  112. package/lib/components/Datagrid/useResizeTable.js +2 -2
  113. package/lib/components/Datagrid/useSelectRows.js +2 -1
  114. package/lib/components/Datagrid/useStickyColumn.js +2 -1
  115. package/lib/components/PageHeader/next/PageHeader.js +3 -2
  116. package/lib/components/ScrollGradient/constants.js +2 -1
  117. package/lib/components/Tearsheet/TearsheetShell.js +3 -5
  118. package/lib/components/Tearsheet/next/StackContext.d.ts +21 -0
  119. package/lib/components/Tearsheet/next/StackContext.js +97 -0
  120. package/lib/components/Tearsheet/next/Tearsheet.d.ts +13 -2
  121. package/lib/components/Tearsheet/next/Tearsheet.js +44 -8
  122. package/lib/components/Tearsheet/next/TearsheetBody.d.ts +6 -0
  123. package/lib/components/Tearsheet/next/TearsheetBody.js +19 -7
  124. package/lib/components/Tearsheet/next/TearsheetHeaderActions.js +8 -3
  125. package/lib/components/Tearsheet/next/TearsheetHeaderContent.d.ts +22 -8
  126. package/lib/components/Tearsheet/next/TearsheetHeaderContent.js +12 -25
  127. package/lib/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +3 -2
  128. package/lib/components/Tearsheet/next/index.d.ts +2 -0
  129. package/lib/components/index.d.ts +2 -1
  130. package/lib/global/js/hooks/useCreateComponentFocus.js +34 -4
  131. package/lib/global/js/hooks/useIsomorphicEffect.d.ts +7 -1
  132. package/lib/global/js/hooks/useIsomorphicEffect.js +1 -2
  133. package/lib/global/js/hooks/useResizeObserver.js +3 -2
  134. package/lib/global/js/hooks/useWindowResize.js +2 -1
  135. package/lib/global/js/hooks/useWindowScroll.js +2 -1
  136. package/lib/index.js +15 -13
  137. package/package.json +14 -14
  138. package/scss/components/Tearsheet/_tearsheet.scss +11 -6
  139. package/scss/components/Tearsheet/_tearsheet_next.scss +218 -96
  140. package/telemetry.yml +11 -7
  141. package/es/components/Tearsheet/next/index.js +0 -8
  142. package/lib/components/Tearsheet/next/index.js +0 -14
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -87,6 +87,7 @@ export interface CoachmarkProps {
87
87
  * Coachmarks are used to call out specific functionality or concepts
88
88
  * within the UI that may not be intuitive but are important for the
89
89
  * user to gain understanding of the product's main value and discover new use cases.
90
+ * @deprecated This component is deprecated.
90
91
  */
91
92
  export declare const Coachmark: React.ForwardRefExoticComponent<CoachmarkProps & React.RefAttributes<HTMLElement>>;
92
93
  export declare const deprecatedProps: {
@@ -36,6 +36,7 @@ const defaults = {
36
36
  * Coachmarks are used to call out specific functionality or concepts
37
37
  * within the UI that may not be intuitive but are important for the
38
38
  * user to gain understanding of the product's main value and discover new use cases.
39
+ * @deprecated This component is deprecated.
39
40
  */
40
41
 
41
42
  const Coachmark = /*#__PURE__*/forwardRef((_ref, ref) => {
@@ -215,6 +216,11 @@ const overlayRefType = typeof HTMLElement === 'undefined' ? PropTypes.object :
215
216
  // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
216
217
  PropTypes.instanceOf(HTMLElement);
217
218
 
219
+ /**@ts-ignore*/
220
+ Coachmark.deprecated = {
221
+ level: 'warn',
222
+ details: `${componentName} is deprecated.`
223
+ };
218
224
  // Return a placeholder if not released and not enabled by feature flag
219
225
 
220
226
  // The display name of the component, used by React. Note that displayName
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -35,6 +35,7 @@ interface CoachmarkDragbarProps {
35
35
  /**
36
36
  * DO NOT USE. This component is for the exclusive use
37
37
  * of other Onboarding components.
38
+ * @deprecated This component is deprecated.
38
39
  */
39
40
  export declare const CoachmarkDragbar: React.ForwardRefExoticComponent<Omit<CoachmarkDragbarProps, "ref"> & React.RefAttributes<HTMLElement>>;
40
41
  export {};
@@ -33,6 +33,7 @@ const defaults = {
33
33
  /**
34
34
  * DO NOT USE. This component is for the exclusive use
35
35
  * of other Onboarding components.
36
+ * @deprecated This component is deprecated.
36
37
  */
37
38
  const CoachmarkDragbar = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
38
39
  let {
@@ -95,6 +96,12 @@ const CoachmarkDragbar = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
95
96
  }));
96
97
  });
97
98
 
99
+ /**@ts-ignore*/
100
+ CoachmarkDragbar.deprecated = {
101
+ level: 'warn',
102
+ details: `${componentName} is deprecated.`
103
+ };
104
+
98
105
  // Return a placeholder if not released and not enabled by feature flag
99
106
 
100
107
  // The display name of the component, used by React. Note that displayName
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -22,6 +22,7 @@ interface CoachmarkHeaderProps {
22
22
  /**
23
23
  * DO NOT USE. This component is for the exclusive use
24
24
  * of other Onboarding components.
25
+ * @deprecated This component is deprecated.
25
26
  */
26
27
  export declare const CoachmarkHeader: React.ForwardRefExoticComponent<CoachmarkHeaderProps & React.RefAttributes<HTMLElement>>;
27
28
  export {};
@@ -27,6 +27,7 @@ const defaults = {
27
27
  /**
28
28
  * DO NOT USE. This component is for the exclusive use
29
29
  * of other Onboarding components.
30
+ * @deprecated This component is deprecated.
30
31
  */
31
32
  const CoachmarkHeader = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
32
33
  let {
@@ -53,6 +54,12 @@ const CoachmarkHeader = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
53
54
  })));
54
55
  });
55
56
 
57
+ /**@ts-ignore*/
58
+ CoachmarkHeader.deprecated = {
59
+ level: 'warn',
60
+ details: `${componentName} is deprecated.`
61
+ };
62
+
56
63
  // Return a placeholder if not released and not enabled by feature flag
57
64
 
58
65
  // The display name of the component, used by React. Note that displayName
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -41,6 +41,7 @@ interface CoachmarkOverlayProps {
41
41
  /**
42
42
  * DO NOT USE. This component is for the exclusive use
43
43
  * of other Onboarding components.
44
+ * @deprecated This component is deprecated.
44
45
  */
45
46
  export declare const CoachmarkOverlay: React.ForwardRefExoticComponent<Omit<CoachmarkOverlayProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
46
47
  export {};
@@ -32,6 +32,7 @@ const defaults = {
32
32
  /**
33
33
  * DO NOT USE. This component is for the exclusive use
34
34
  * of other Onboarding components.
35
+ * @deprecated This component is deprecated.
35
36
  */
36
37
  const CoachmarkOverlay = /*#__PURE__*/forwardRef((props, ref) => {
37
38
  const {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -26,6 +26,7 @@ interface CoachmarkTaglineProps {
26
26
  /**
27
27
  * DO NOT USE. This component is for the exclusive use
28
28
  * of other Onboarding components.
29
+ * @deprecated This component is deprecated.
29
30
  */
30
31
  export declare const CoachmarkTagline: React.ForwardRefExoticComponent<CoachmarkTaglineProps & React.RefAttributes<HTMLDivElement>>;
31
32
  export {};
@@ -28,6 +28,7 @@ const defaults = {
28
28
  /**
29
29
  * DO NOT USE. This component is for the exclusive use
30
30
  * of other Onboarding components.
31
+ * @deprecated This component is deprecated.
31
32
  */
32
33
  const CoachmarkTagline = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
33
34
  let {
@@ -64,6 +65,12 @@ const CoachmarkTagline = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
64
65
  })));
65
66
  });
66
67
 
68
+ /**@ts-ignore*/
69
+ CoachmarkTagline.deprecated = {
70
+ level: 'warn',
71
+ details: `${componentName} is deprecated.`
72
+ };
73
+
67
74
  // Return a placeholder if not released and not enabled by feature flag
68
75
 
69
76
  // The display name of the component, used by React. Note that displayName
@@ -8,8 +8,9 @@
8
8
  import { extends as _extends } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import cx from 'classnames';
10
10
  import { useTheme, usePrefix } from '@carbon/react';
11
- import React__default, { forwardRef, useRef, useLayoutEffect } from 'react';
11
+ import React__default, { forwardRef, useRef } from 'react';
12
12
  import { pkg } from '../../../../../settings.js';
13
+ import { useIsomorphicEffect } from '../../../../../global/js/hooks/useIsomorphicEffect.js';
13
14
  import { offset, flip, shift, arrow } from '../../../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js';
14
15
  import { autoUpdate, computePosition } from '../../../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js';
15
16
 
@@ -32,7 +33,7 @@ const CoachmarkBubble = /*#__PURE__*/forwardRef((props, ref) => {
32
33
  const tooltipRef = useRef(null);
33
34
  const arrowRef = useRef(null);
34
35
  const targetRef = useRef(null);
35
- useLayoutEffect(() => {
36
+ useIsomorphicEffect(() => {
36
37
  if (target) {
37
38
  if (typeof target === 'string') {
38
39
  if (target === '#' || target.trim() === '') {
@@ -5,8 +5,9 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { useRef, useLayoutEffect, useEffect } from 'react';
8
+ import { useRef, useEffect } from 'react';
9
9
  import { COACHMARK_OVERLAY_KIND } from './enums.js';
10
+ import { useIsomorphicEffect } from '../../../global/js/hooks/useIsomorphicEffect.js';
10
11
 
11
12
  /**
12
13
  * Detects when a user clicks outside of the element
@@ -19,10 +20,10 @@ import { COACHMARK_OVERLAY_KIND } from './enums.js';
19
20
  function useClickOutsideElement(coachmarkRef, overlayRef, overlayKind, callback) {
20
21
  const cb = useRef(undefined);
21
22
  const isTooltip = overlayKind === COACHMARK_OVERLAY_KIND.TOOLTIP;
22
- useLayoutEffect(() => {
23
+ useIsomorphicEffect(() => {
23
24
  cb.current = callback;
24
25
  }, [callback]);
25
- useEffect(() => {
26
+ useIsomorphicEffect(() => {
26
27
  function handleClickOutside(event) {
27
28
  const isOverlayOutside = overlayRef.current && !overlayRef.current.contains(event.target);
28
29
  const isOutsideCoachmark = coachmarkRef.current && !coachmarkRef.current.contains(event.target);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -35,5 +35,6 @@ export interface CoachmarkBeaconProps {
35
35
  }
36
36
  /**
37
37
  * Use beacon for the target prop of a Coachmark component.
38
+ * @deprecated This component is deprecated.
38
39
  */
39
40
  export declare const CoachmarkBeacon: React.ForwardRefExoticComponent<CoachmarkBeaconProps & React.RefAttributes<HTMLDivElement>>;
@@ -23,6 +23,7 @@ const defaults = {
23
23
  };
24
24
  /**
25
25
  * Use beacon for the target prop of a Coachmark component.
26
+ * @deprecated This component is deprecated.
26
27
  */
27
28
  const CoachmarkBeacon = /*#__PURE__*/React__default.forwardRef((props, ref) => {
28
29
  const {
@@ -51,6 +52,12 @@ const CoachmarkBeacon = /*#__PURE__*/React__default.forwardRef((props, ref) => {
51
52
  })))));
52
53
  });
53
54
 
55
+ /**@ts-ignore*/
56
+ CoachmarkBeacon.deprecated = {
57
+ level: 'warn',
58
+ details: `${componentName} is deprecated.`
59
+ };
60
+
54
61
  // Return a placeholder if not released and not enabled by feature flag
55
62
 
56
63
  // The display name of the component, used by React. Note that displayName
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -17,5 +17,6 @@ export interface CoachmarkButtonProps {
17
17
  }
18
18
  /**
19
19
  * Use CoachmarkButton for the target prop of a Coachmark component.
20
+ * @deprecated This component is deprecated.
20
21
  */
21
22
  export declare const CoachmarkButton: React.ForwardRefExoticComponent<CoachmarkButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -43,6 +43,7 @@ const componentName = 'CoachmarkButton';
43
43
 
44
44
  /**
45
45
  * Use CoachmarkButton for the target prop of a Coachmark component.
46
+ * @deprecated This component is deprecated.
46
47
  */
47
48
  const CoachmarkButton = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
48
49
  let {
@@ -47,5 +47,6 @@ export interface CoachmarkFixedProps {
47
47
  * within the UI that may not be intuitive but are important for the
48
48
  * user to gain understanding of the product's main value and discover new use cases.
49
49
  * This variant allows the a coachmark overlay to be displayed by interacting with the tagline.
50
+ * @deprecated This component is deprecated.
50
51
  */
51
52
  export declare const CoachmarkFixed: React.ForwardRefExoticComponent<CoachmarkFixedProps & React.RefAttributes<HTMLDivElement>>;
@@ -38,6 +38,7 @@ const defaults = {
38
38
  * within the UI that may not be intuitive but are important for the
39
39
  * user to gain understanding of the product's main value and discover new use cases.
40
40
  * This variant allows the a coachmark overlay to be displayed by interacting with the tagline.
41
+ * @deprecated This component is deprecated.
41
42
  */
42
43
  const CoachmarkFixed = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
43
44
  let {
@@ -163,6 +164,12 @@ const CoachmarkFixed = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
163
164
  portalNode?.current)));
164
165
  });
165
166
 
167
+ /**@ts-ignore*/
168
+ CoachmarkFixed.deprecated = {
169
+ level: 'warn',
170
+ details: `${componentName} is deprecated.`
171
+ };
172
+
166
173
  // Return a placeholder if not released and not enabled by feature flag
167
174
 
168
175
  // The display name of the component, used by React. Note that displayName
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -28,5 +28,6 @@ export interface CoachmarkOverlayElementProps {
28
28
  * Component to be displayed within a CoachmarkOverlayElements container.
29
29
  * Can be used 1 to N number, to display content in a Coachmark's overlay
30
30
  * in a carousel fashion.
31
+ * @deprecated This component is deprecated.
31
32
  */
32
33
  export declare const CoachmarkOverlayElement: React.ForwardRefExoticComponent<CoachmarkOverlayElementProps & React.RefAttributes<HTMLDivElement>>;
@@ -19,6 +19,7 @@ const componentName = 'CoachmarkOverlayElement';
19
19
  * Component to be displayed within a CoachmarkOverlayElements container.
20
20
  * Can be used 1 to N number, to display content in a Coachmark's overlay
21
21
  * in a carousel fashion.
22
+ * @deprecated This component is deprecated.
22
23
  */
23
24
  const CoachmarkOverlayElement = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
24
25
  let {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -52,5 +52,6 @@ export interface CoachmarkOverlayElementsProps {
52
52
  /**
53
53
  * Composable container to allow for the displaying of CoachmarkOverlayElement
54
54
  * components in a carousel fashion.
55
+ * @deprecated This component is deprecated.
55
56
  */
56
57
  export declare const CoachmarkOverlayElements: React.ForwardRefExoticComponent<CoachmarkOverlayElementsProps & React.RefAttributes<HTMLDivElement>>;
@@ -47,6 +47,7 @@ const defaults = {
47
47
  /**
48
48
  * Composable container to allow for the displaying of CoachmarkOverlayElement
49
49
  * components in a carousel fashion.
50
+ * @deprecated This component is deprecated.
50
51
  */
51
52
  const CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
52
53
  let {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -66,6 +66,7 @@ interface CoachmarkStackProps {
66
66
  * within the UI that may not be intuitive but are important for the
67
67
  * user to gain understanding of the product's main value and discover new use cases.
68
68
  * This variant allows the stacking of multiple coachmark overlays to be displayed by interacting with the tagline.
69
+ * @deprecated This component is deprecated.
69
70
  */
70
71
  export declare const CoachmarkStack: React.ForwardRefExoticComponent<CoachmarkStackProps & React.RefAttributes<HTMLDivElement>>;
71
72
  export {};
@@ -45,6 +45,7 @@ const defaults = {
45
45
  * within the UI that may not be intuitive but are important for the
46
46
  * user to gain understanding of the product's main value and discover new use cases.
47
47
  * This variant allows the stacking of multiple coachmark overlays to be displayed by interacting with the tagline.
48
+ * @deprecated This component is deprecated.
48
49
  */
49
50
  const CoachmarkStack = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
50
51
  let {
@@ -213,6 +214,12 @@ const CoachmarkStack = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
213
214
  }), portalNode?.current ? /*#__PURE__*/createPortal(wrappedChildren, portalNode?.current) : null));
214
215
  });
215
216
 
217
+ /**@ts-ignore*/
218
+ CoachmarkStack.deprecated = {
219
+ level: 'warn',
220
+ details: `${componentName} is deprecated.`
221
+ };
222
+
216
223
  // Return a placeholder if not released and not enabled by feature flag
217
224
 
218
225
  // The display name of the component, used by React. Note that displayName
@@ -111,7 +111,7 @@ const CreateFullPage = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
111
111
  useCreateComponentFocus({
112
112
  previousState,
113
113
  currentStep,
114
- blockClass,
114
+ blockClass: `.${blockClass} .${pkg.prefix}--create-full-page__step`,
115
115
  onMount,
116
116
  firstFocusElement
117
117
  });
@@ -99,9 +99,9 @@ const CreateTearsheet = /*#__PURE__*/forwardRef((_ref, ref) => {
99
99
  useCreateComponentFocus({
100
100
  previousState,
101
101
  currentStep,
102
- blockClass,
102
+ blockClass: `.${blockClass} .${pkg.prefix}--tearsheet-create__step`,
103
103
  onMount,
104
- firstFocusElement
104
+ firstFocusElement: firstFocusElement || selectorPrimaryFocus
105
105
  });
106
106
  useValidCreateStepCount(stepData.length, componentName);
107
107
  useResetCreateComponent({
@@ -90,31 +90,11 @@ const CreateTearsheetStep = /*#__PURE__*/forwardRef((_ref, ref) => {
90
90
  useEffect(() => {
91
91
  setShouldIncludeStep(includeStep);
92
92
  }, [includeStep, stepsContext, title]);
93
- const setFocusChildrenTabIndex = (childInputs, value) => {
94
- if (childInputs?.length) {
95
- childInputs.forEach(child => {
96
- child.tabIndex = value;
97
- });
98
- }
99
- };
100
93
 
101
94
  // Whenever we are the current step, supply our disableSubmit and onNext values to the
102
95
  // steps container context so that it can manage the 'Next' button appropriately.
103
96
  useEffect(() => {
104
- const focusElementQuery = `button, input, select, textarea, a`;
105
- if (stepNumber !== stepsContext?.currentStep) {
106
- // Specify tab-index -1 for focusable elements not contained
107
- // in the current step so that the useFocus hook can exclude
108
- // from the focus trap
109
- const childInputs = stepRefValue?.querySelectorAll(focusElementQuery);
110
- setFocusChildrenTabIndex(childInputs, -1);
111
- }
112
97
  if (stepNumber === stepsContext?.currentStep) {
113
- // Specify tab-index 0 for current step focusable elements
114
- // for the useFocus hook to know which elements to include
115
- // in focus trap
116
- const childInputs = stepRefValue?.querySelectorAll(focusElementQuery);
117
- setFocusChildrenTabIndex(childInputs, 0);
118
98
  stepsContext.setIsDisabled(!!disableSubmit);
119
99
  stepsContext?.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
120
100
  stepsContext?.setOnPrevious(onPrevious);
@@ -139,7 +119,8 @@ const CreateTearsheetStep = /*#__PURE__*/forwardRef((_ref, ref) => {
139
119
  return null;
140
120
  };
141
121
  return stepsContext ? /*#__PURE__*/React__default.createElement("div", {
142
- ref: stepRef
122
+ ref: stepRef,
123
+ inert: stepNumber !== stepsContext?.currentStep
143
124
  }, /*#__PURE__*/React__default.createElement(Grid, _extends({}, rest, {
144
125
  className: cx(blockClass, className, {
145
126
  [`${blockClass}__step--hidden-step`]: stepNumber !== stepsContext?.currentStep,
@@ -6,16 +6,17 @@
6
6
  */
7
7
 
8
8
  import { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React__default, { useState, useLayoutEffect, useCallback } from 'react';
9
+ import React__default, { useState, useCallback } from 'react';
10
10
  import { TableSelectAll } from '@carbon/react';
11
11
  import cx from 'classnames';
12
12
  import { pkg } from '../../../settings.js';
13
13
  import { handleOnPageSelectAllRowData, handleSelectAllRowData } from './addons/stateReducer.js';
14
+ import { useIsomorphicEffect } from '../../../global/js/hooks/useIsomorphicEffect.js';
14
15
 
15
16
  const blockClass = `${pkg.prefix}--datagrid`;
16
17
  const SelectAll = datagridState => {
17
18
  const [windowSize, setWindowSize] = useState();
18
- useLayoutEffect(() => {
19
+ useIsomorphicEffect(() => {
19
20
  setWindowSize(window.innerWidth);
20
21
  /* istanbul ignore next */
21
22
  function updateSize() {
@@ -6,12 +6,13 @@
6
6
  */
7
7
 
8
8
  import { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React__default, { useState, useEffect, useLayoutEffect } from 'react';
9
+ import React__default, { useState, useEffect } from 'react';
10
10
  import PropTypes from '../../../_virtual/index.js';
11
11
  import cx from 'classnames';
12
12
  import { Checkbox, OverflowMenu, OverflowMenuItem } from '@carbon/react';
13
13
  import { CaretDown } from '@carbon/react/icons';
14
14
  import { pkg } from '../../../settings.js';
15
+ import { useIsomorphicEffect } from '../../../global/js/hooks/useIsomorphicEffect.js';
15
16
 
16
17
  const blockClass = `${pkg.prefix}--datagrid`;
17
18
  const SELECT_ALL_PAGE_ROWS = 'pageRows';
@@ -40,7 +41,7 @@ const SelectAllWithToggle = _ref => {
40
41
  }
41
42
  }, [isAllRowsSelected, selectAllMode, onSelectAllRows]);
42
43
  const [windowSize, setWindowSize] = useState();
43
- useLayoutEffect(() => {
44
+ useIsomorphicEffect(() => {
44
45
  setWindowSize(window.innerWidth);
45
46
  function updateSize() {
46
47
  setWindowSize(window.innerWidth);
@@ -93,6 +93,10 @@ const CustomizeColumnsTearsheet = _ref => {
93
93
  }, [columnObjects]);
94
94
  const string = searchText.trim().toLowerCase();
95
95
  useEffect(() => {
96
+ // prevent this effect from running when columns are being resized
97
+ if (!isOpen) {
98
+ return;
99
+ }
96
100
  if (prevColumnDefinitions.current !== columnDefinitions) {
97
101
  setColumnObjects(columnDefinitions);
98
102
  }
@@ -89,7 +89,8 @@ const FilterFlyout = _ref => {
89
89
  const [shouldDisableButtons, setShouldDisableButtons] = useShouldDisableButtons({
90
90
  initialValue: true,
91
91
  filtersState,
92
- prevFiltersRef
92
+ prevFiltersRef,
93
+ open
93
94
  });
94
95
 
95
96
  // Skip resize testing
@@ -97,7 +97,8 @@ const FilterPanel = _ref => {
97
97
  const [shouldDisableButtons, setShouldDisableButtons] = useShouldDisableButtons({
98
98
  initialValue: true,
99
99
  filtersState,
100
- prevFiltersRef
100
+ prevFiltersRef,
101
+ open: panelOpen
101
102
  });
102
103
  const shouldReduceMotion = usePrefersReducedMotion();
103
104
  const exitAnimationName = shouldReduceMotion ? 'filter-panel-exit-reduced' : 'filter-panel-exit-left';
@@ -6,4 +6,4 @@ export default useShouldDisableButtons;
6
6
  * @param {object} prevFiltersRef - reference of the prev filterState
7
7
  * @returns {Array} returns a tuple of the state and setter function
8
8
  */
9
- declare function useShouldDisableButtons({ initialValue, filtersState, prevFiltersRef, }: string): any[];
9
+ declare function useShouldDisableButtons({ initialValue, filtersState, prevFiltersRef, open, }: string): any[];
@@ -23,10 +23,15 @@ const useShouldDisableButtons = _ref => {
23
23
  initialValue,
24
24
  // initially the buttons should be disabled
25
25
  filtersState,
26
- prevFiltersRef
26
+ prevFiltersRef,
27
+ open
27
28
  } = _ref;
28
29
  const [shouldDisableButtons, setShouldDisableButtons] = useState(initialValue);
29
30
  useEffect(function updateDisabledButtonsState() {
31
+ // prevent this effect from running when columns are being resized
32
+ if (!open) {
33
+ return;
34
+ }
30
35
  setShouldDisableButtons(deepCompareObject(filtersState, JSON.parse(prevFiltersRef.current)));
31
36
  }, [filtersState, prevFiltersRef]);
32
37
  return [shouldDisableButtons, setShouldDisableButtons];
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { useLayoutEffect } from 'react';
8
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
9
9
 
10
10
  const useResizeTable = hooks => {
11
11
  const useInstanceBeforeDimensions = instance => {
@@ -14,7 +14,7 @@ const useResizeTable = hooks => {
14
14
  handleResize
15
15
  } = instance;
16
16
  const parent = rootRef && rootRef.current && rootRef.current.parentElement;
17
- useLayoutEffect(() => {
17
+ useIsomorphicEffect(() => {
18
18
  if (!parent) {
19
19
  return () => {};
20
20
  }
@@ -6,13 +6,14 @@
6
6
  */
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React__default, { useState, useLayoutEffect, useCallback } from 'react';
9
+ import React__default, { useState, useCallback } from 'react';
10
10
  import cx from 'classnames';
11
11
  import { usePrefix, TableSelectRow } from '@carbon/react';
12
12
  import { SelectAll } from './Datagrid/DatagridSelectAll.js';
13
13
  import { selectionColumnId } from './common-column-ids.js';
14
14
  import { pkg } from '../../settings.js';
15
15
  import { handleToggleRowSelected } from './Datagrid/addons/stateReducer.js';
16
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
16
17
 
17
18
  const blockClass = `${pkg.prefix}--datagrid`;
18
19
  const checkboxClass = `${pkg.prefix}--datagrid__checkbox-cell`;
@@ -85,7 +86,7 @@ const SelectRow = datagridState => {
85
86
  getRowId
86
87
  } = datagridState;
87
88
  const [windowSize, setWindowSize] = useState();
88
- useLayoutEffect(() => {
89
+ useIsomorphicEffect(() => {
89
90
  setWindowSize(window.innerWidth);
90
91
  function updateSize() {
91
92
  setWindowSize(window.innerWidth);
@@ -5,10 +5,11 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { useRef, useState, useEffect, useLayoutEffect } from 'react';
8
+ import { useRef, useState, useEffect } from 'react';
9
9
  import { debounce } from '../../global/js/utils/debounce.js';
10
10
  import cx from 'classnames';
11
11
  import { pkg } from '../../settings.js';
12
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
12
13
 
13
14
  const blockClass = `${pkg.prefix}--datagrid`;
14
15
  const styleClassPrefix = `${blockClass}__right-sticky-column`;
@@ -21,7 +22,7 @@ const useStickyColumn = hooks => {
21
22
  useEffect(() => {
22
23
  setWindowSize(window?.innerWidth);
23
24
  }, []);
24
- useLayoutEffect(() => {
25
+ useIsomorphicEffect(() => {
25
26
  /* istanbul ignore next */
26
27
  function updateSize() {
27
28
  setWindowSize(window.innerWidth);