@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.
- package/css/carbon.css +39 -19
- package/css/carbon.css.map +1 -1
- package/css/index-full-carbon.css +186 -80
- 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 +147 -61
- 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 +147 -61
- 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 +150 -66
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/Coachmark/Coachmark.d.ts +2 -1
- package/es/components/Coachmark/Coachmark.js +6 -0
- package/es/components/Coachmark/CoachmarkDragbar.d.ts +2 -1
- package/es/components/Coachmark/CoachmarkDragbar.js +7 -0
- package/es/components/Coachmark/CoachmarkHeader.d.ts +2 -1
- package/es/components/Coachmark/CoachmarkHeader.js +7 -0
- package/es/components/Coachmark/CoachmarkOverlay.d.ts +2 -1
- package/es/components/Coachmark/CoachmarkOverlay.js +1 -0
- package/es/components/Coachmark/CoachmarkTagline.d.ts +2 -1
- package/es/components/Coachmark/CoachmarkTagline.js +7 -0
- package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +3 -2
- package/es/components/Coachmark/utils/hooks.js +4 -3
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +2 -1
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +7 -0
- package/es/components/CoachmarkButton/CoachmarkButton.d.ts +2 -1
- package/es/components/CoachmarkButton/CoachmarkButton.js +1 -0
- package/es/components/CoachmarkFixed/CoachmarkFixed.d.ts +1 -0
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +7 -0
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +2 -1
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +1 -0
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +2 -1
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +1 -0
- package/es/components/CoachmarkStack/CoachmarkStack.d.ts +2 -1
- package/es/components/CoachmarkStack/CoachmarkStack.js +7 -0
- package/es/components/CreateFullPage/CreateFullPage.js +1 -1
- package/es/components/CreateTearsheet/CreateTearsheet.js +2 -2
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +2 -21
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +3 -2
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +6 -1
- package/es/components/Datagrid/useResizeTable.js +2 -2
- package/es/components/Datagrid/useSelectRows.js +3 -2
- package/es/components/Datagrid/useStickyColumn.js +3 -2
- package/es/components/PageHeader/next/PageHeader.js +4 -3
- package/es/components/ScrollGradient/constants.js +3 -2
- package/es/components/Tearsheet/TearsheetShell.js +4 -6
- package/es/components/Tearsheet/next/StackContext.d.ts +21 -0
- package/es/components/Tearsheet/next/StackContext.js +94 -0
- package/es/components/Tearsheet/next/Tearsheet.d.ts +13 -2
- package/es/components/Tearsheet/next/Tearsheet.js +46 -10
- package/es/components/Tearsheet/next/TearsheetBody.d.ts +6 -0
- package/es/components/Tearsheet/next/TearsheetBody.js +19 -7
- package/es/components/Tearsheet/next/TearsheetHeaderActions.js +9 -4
- package/es/components/Tearsheet/next/TearsheetHeaderContent.d.ts +22 -8
- package/es/components/Tearsheet/next/TearsheetHeaderContent.js +14 -27
- package/es/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +3 -2
- package/es/components/Tearsheet/next/index.d.ts +2 -0
- package/es/components/index.d.ts +2 -1
- package/es/global/js/hooks/useCreateComponentFocus.js +34 -4
- package/es/global/js/hooks/useIsomorphicEffect.d.ts +7 -1
- package/es/global/js/hooks/useIsomorphicEffect.js +1 -2
- package/es/global/js/hooks/useResizeObserver.js +4 -3
- package/es/global/js/hooks/useWindowResize.js +3 -2
- package/es/global/js/hooks/useWindowScroll.js +3 -2
- package/es/index.js +2 -2
- package/lib/components/Coachmark/Coachmark.d.ts +2 -1
- package/lib/components/Coachmark/Coachmark.js +6 -0
- package/lib/components/Coachmark/CoachmarkDragbar.d.ts +2 -1
- package/lib/components/Coachmark/CoachmarkDragbar.js +7 -0
- package/lib/components/Coachmark/CoachmarkHeader.d.ts +2 -1
- package/lib/components/Coachmark/CoachmarkHeader.js +7 -0
- package/lib/components/Coachmark/CoachmarkOverlay.d.ts +2 -1
- package/lib/components/Coachmark/CoachmarkOverlay.js +1 -0
- package/lib/components/Coachmark/CoachmarkTagline.d.ts +2 -1
- package/lib/components/Coachmark/CoachmarkTagline.js +7 -0
- package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +2 -1
- package/lib/components/Coachmark/utils/hooks.js +3 -2
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +2 -1
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +7 -0
- package/lib/components/CoachmarkButton/CoachmarkButton.d.ts +2 -1
- package/lib/components/CoachmarkButton/CoachmarkButton.js +1 -0
- package/lib/components/CoachmarkFixed/CoachmarkFixed.d.ts +1 -0
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +7 -0
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +2 -1
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +1 -0
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +2 -1
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +1 -0
- package/lib/components/CoachmarkStack/CoachmarkStack.d.ts +2 -1
- package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -0
- package/lib/components/CreateFullPage/CreateFullPage.js +1 -1
- package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -2
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +2 -21
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +6 -1
- package/lib/components/Datagrid/useResizeTable.js +2 -2
- package/lib/components/Datagrid/useSelectRows.js +2 -1
- package/lib/components/Datagrid/useStickyColumn.js +2 -1
- package/lib/components/PageHeader/next/PageHeader.js +3 -2
- package/lib/components/ScrollGradient/constants.js +2 -1
- package/lib/components/Tearsheet/TearsheetShell.js +3 -5
- package/lib/components/Tearsheet/next/StackContext.d.ts +21 -0
- package/lib/components/Tearsheet/next/StackContext.js +97 -0
- package/lib/components/Tearsheet/next/Tearsheet.d.ts +13 -2
- package/lib/components/Tearsheet/next/Tearsheet.js +44 -8
- package/lib/components/Tearsheet/next/TearsheetBody.d.ts +6 -0
- package/lib/components/Tearsheet/next/TearsheetBody.js +19 -7
- package/lib/components/Tearsheet/next/TearsheetHeaderActions.js +8 -3
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.d.ts +22 -8
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.js +12 -25
- package/lib/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +3 -2
- package/lib/components/Tearsheet/next/index.d.ts +2 -0
- package/lib/components/index.d.ts +2 -1
- package/lib/global/js/hooks/useCreateComponentFocus.js +34 -4
- package/lib/global/js/hooks/useIsomorphicEffect.d.ts +7 -1
- package/lib/global/js/hooks/useIsomorphicEffect.js +1 -2
- package/lib/global/js/hooks/useResizeObserver.js +3 -2
- package/lib/global/js/hooks/useWindowResize.js +2 -1
- package/lib/global/js/hooks/useWindowScroll.js +2 -1
- package/lib/index.js +15 -13
- package/package.json +14 -14
- package/scss/components/Tearsheet/_tearsheet.scss +11 -6
- package/scss/components/Tearsheet/_tearsheet_next.scss +218 -96
- package/telemetry.yml +11 -7
- package/es/components/Tearsheet/next/index.js +0 -8
- package/lib/components/Tearsheet/next/index.js +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2023,
|
|
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,
|
|
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,
|
|
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,
|
|
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 {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2023,
|
|
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
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
23
|
+
useIsomorphicEffect(() => {
|
|
23
24
|
cb.current = callback;
|
|
24
25
|
}, [callback]);
|
|
25
|
-
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
44
|
+
useIsomorphicEffect(() => {
|
|
44
45
|
setWindowSize(window.innerWidth);
|
|
45
46
|
function updateSize() {
|
|
46
47
|
setWindowSize(window.innerWidth);
|
package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js
CHANGED
|
@@ -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
|
}
|
|
@@ -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 {
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
25
|
+
useIsomorphicEffect(() => {
|
|
25
26
|
/* istanbul ignore next */
|
|
26
27
|
function updateSize() {
|
|
27
28
|
setWindowSize(window.innerWidth);
|