@carbon/ibm-products 2.68.0 → 2.69.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 (146) hide show
  1. package/css/carbon.css +382 -74
  2. package/css/carbon.css.map +1 -1
  3. package/css/index-full-carbon.css +524 -116
  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 +126 -42
  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 +142 -42
  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 +185 -50
  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/_virtual/_commonjsHelpers.js +3 -1
  20. package/es/_virtual/index2.js +6 -2
  21. package/es/_virtual/index3.js +10 -0
  22. package/es/components/AddSelect/AddSelectColumn.js +41 -18
  23. package/es/components/AddSelect/AddSelectSort.js +15 -16
  24. package/es/components/AddSelect/types/index.d.ts +1 -1
  25. package/es/components/Card/Card.d.ts +2 -2
  26. package/es/components/Card/Card.js +7 -4
  27. package/es/components/Coachmark/Coachmark.d.ts +43 -0
  28. package/es/components/Coachmark/Coachmark.js +49 -33
  29. package/es/components/Coachmark/CoachmarkOverlay.js +6 -0
  30. package/es/components/Coachmark/index.d.ts +1 -0
  31. package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +11 -0
  32. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +19 -11
  33. package/es/components/CoachmarkButton/CoachmarkButton.js +7 -0
  34. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +6 -0
  35. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +7 -0
  36. package/es/components/Datagrid/Datagrid/DatagridContent.js +7 -5
  37. package/es/components/Datagrid/Datagrid/DatagridRow.d.ts +1 -1
  38. package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  39. package/es/components/Datagrid/Datagrid/DatagridToolbar.d.ts +1 -1
  40. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +8 -7
  41. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  42. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  43. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +4 -3
  44. package/es/components/Datagrid/useNestedRowExpander.js +4 -2
  45. package/es/components/Datagrid/useOnRowClick.d.ts +1 -1
  46. package/es/components/Datagrid/useOnRowClick.js +6 -4
  47. package/es/components/Datagrid/useRowExpander.js +4 -2
  48. package/es/components/Datagrid/useSelectRows.d.ts +1 -1
  49. package/es/components/Datagrid/useSelectRows.js +4 -3
  50. package/es/components/Datagrid/useSortableColumns.d.ts +1 -1
  51. package/es/components/Datagrid/useSortableColumns.js +6 -5
  52. package/es/components/EditInPlace/EditInPlace.d.ts +1 -1
  53. package/es/components/EditInPlace/EditInPlace.js +4 -3
  54. package/es/components/EmptyStates/EmptyStateContent.d.ts +30 -1
  55. package/es/components/EmptyStates/EmptyStateContent.js +2 -2
  56. package/es/components/ExportModal/ExportModal.js +7 -5
  57. package/es/components/FeatureFlags/index.d.ts +31 -12
  58. package/es/components/FeatureFlags/index.js +46 -15
  59. package/es/components/InterstitialScreen/InterstitialScreenBody.js +3 -2
  60. package/es/components/InterstitialScreen/InterstitialScreenFooter.js +5 -2
  61. package/es/components/InterstitialScreen/InterstitialScreenHeader.js +3 -1
  62. package/es/components/ProductiveCard/ProductiveCard.d.ts +1 -1
  63. package/es/components/ScrollGradient/ScrollGradient.js +9 -7
  64. package/es/components/SidePanel/SidePanel.js +74 -0
  65. package/es/components/SidePanel/constants.d.ts +14 -8
  66. package/es/components/SidePanel/constants.js +1 -1
  67. package/es/components/SidePanel/resizer/Resizer.d.ts +21 -0
  68. package/es/components/SidePanel/resizer/Resizer.js +271 -0
  69. package/es/components/TruncatedList/TruncatedList.d.ts +1 -1
  70. package/es/components/TruncatedList/TruncatedList.js +4 -3
  71. package/es/feature-flags.js +5 -1
  72. package/es/index.js +1 -0
  73. package/es/node_modules/@carbon/{icons-react/node_modules/@carbon/icon-helpers → icon-helpers}/es/index.js +3 -3
  74. package/es/node_modules/@carbon/icons-react/es/Icon.js +1 -1
  75. package/es/node_modules/@carbon/icons-react/es/generated/bucket-10.js +816 -808
  76. package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +615 -637
  77. package/es/node_modules/lodash.debounce/index.js +367 -0
  78. package/es/node_modules/prop-types/index.js +1 -1
  79. package/es/settings.js +1 -4
  80. package/lib/_virtual/_commonjsHelpers.js +3 -0
  81. package/lib/_virtual/index2.js +8 -2
  82. package/lib/_virtual/index3.js +12 -0
  83. package/lib/components/AddSelect/AddSelectColumn.js +40 -17
  84. package/lib/components/AddSelect/AddSelectSort.js +13 -14
  85. package/lib/components/AddSelect/types/index.d.ts +1 -1
  86. package/lib/components/Card/Card.d.ts +2 -2
  87. package/lib/components/Card/Card.js +7 -4
  88. package/lib/components/Coachmark/Coachmark.d.ts +43 -0
  89. package/lib/components/Coachmark/Coachmark.js +50 -32
  90. package/lib/components/Coachmark/CoachmarkOverlay.js +6 -0
  91. package/lib/components/Coachmark/index.d.ts +1 -0
  92. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +11 -0
  93. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +19 -11
  94. package/lib/components/CoachmarkButton/CoachmarkButton.js +7 -0
  95. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +6 -0
  96. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +7 -0
  97. package/lib/components/Datagrid/Datagrid/DatagridContent.js +5 -3
  98. package/lib/components/Datagrid/Datagrid/DatagridRow.d.ts +1 -1
  99. package/lib/components/Datagrid/Datagrid/DatagridRow.js +2 -1
  100. package/lib/components/Datagrid/Datagrid/DatagridToolbar.d.ts +1 -1
  101. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +6 -5
  102. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  103. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +3 -2
  104. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +2 -1
  105. package/lib/components/Datagrid/useNestedRowExpander.js +3 -1
  106. package/lib/components/Datagrid/useOnRowClick.d.ts +1 -1
  107. package/lib/components/Datagrid/useOnRowClick.js +5 -3
  108. package/lib/components/Datagrid/useRowExpander.js +3 -1
  109. package/lib/components/Datagrid/useSelectRows.d.ts +1 -1
  110. package/lib/components/Datagrid/useSelectRows.js +2 -1
  111. package/lib/components/Datagrid/useSortableColumns.d.ts +1 -1
  112. package/lib/components/Datagrid/useSortableColumns.js +4 -3
  113. package/lib/components/EditInPlace/EditInPlace.d.ts +1 -1
  114. package/lib/components/EditInPlace/EditInPlace.js +2 -1
  115. package/lib/components/EmptyStates/EmptyStateContent.d.ts +30 -1
  116. package/lib/components/EmptyStates/EmptyStateContent.js +2 -2
  117. package/lib/components/ExportModal/ExportModal.js +5 -3
  118. package/lib/components/FeatureFlags/index.d.ts +31 -12
  119. package/lib/components/FeatureFlags/index.js +46 -15
  120. package/lib/components/InterstitialScreen/InterstitialScreenBody.js +3 -2
  121. package/lib/components/InterstitialScreen/InterstitialScreenFooter.js +5 -2
  122. package/lib/components/InterstitialScreen/InterstitialScreenHeader.js +3 -1
  123. package/lib/components/ProductiveCard/ProductiveCard.d.ts +1 -1
  124. package/lib/components/ScrollGradient/ScrollGradient.js +8 -6
  125. package/lib/components/SidePanel/SidePanel.js +74 -0
  126. package/lib/components/SidePanel/constants.d.ts +14 -8
  127. package/lib/components/SidePanel/constants.js +1 -1
  128. package/lib/components/SidePanel/resizer/Resizer.d.ts +21 -0
  129. package/lib/components/SidePanel/resizer/Resizer.js +277 -0
  130. package/lib/components/TruncatedList/TruncatedList.d.ts +1 -1
  131. package/lib/components/TruncatedList/TruncatedList.js +2 -1
  132. package/lib/feature-flags.js +5 -1
  133. package/lib/index.js +1 -0
  134. package/lib/node_modules/@carbon/{icons-react/node_modules/@carbon/icon-helpers → icon-helpers}/es/index.js +3 -3
  135. package/lib/node_modules/@carbon/icons-react/es/Icon.js +1 -1
  136. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-10.js +839 -831
  137. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +621 -643
  138. package/lib/node_modules/lodash.debounce/index.js +369 -0
  139. package/lib/node_modules/prop-types/index.js +1 -1
  140. package/lib/settings.js +0 -4
  141. package/package.json +15 -15
  142. package/scss/components/AddSelect/_add-select.scss +12 -13
  143. package/scss/components/SidePanel/_side-panel-variables.scss +1 -5
  144. package/scss/components/SidePanel/_side-panel.scss +129 -12
  145. package/scss/global/decorators/_side-panel-decorator.scss +36 -8
  146. package/telemetry.yml +17 -0
@@ -31,15 +31,21 @@ export interface CoachmarkProps {
31
31
  */
32
32
  onClose?: () => void;
33
33
  /**
34
+ * @deprecated
34
35
  * Optional class name for the Coachmark Overlay component.
35
36
  */
36
37
  overlayClassName?: string;
37
38
  /**
39
+ * @deprecated
38
40
  * What kind or style of Coachmark to render.
39
41
  */
40
42
  overlayKind?: 'tooltip' | 'floating' | 'stacked';
43
+ /**
44
+ * @deprecated
45
+ */
41
46
  overlayRef?: MutableRefObject<HTMLElement | null>;
42
47
  /**
48
+ * @deprecated
43
49
  * By default, the Coachmark will be appended to the end of `document.body`.
44
50
  * The Coachmark will remain persistent as the user navigates the app until
45
51
  * the user closes the Coachmark.
@@ -58,10 +64,12 @@ export interface CoachmarkProps {
58
64
  y: number;
59
65
  };
60
66
  /**
67
+ * @deprecated
61
68
  * The optional button or beacon that the user will click to show the Coachmark.
62
69
  */
63
70
  target: React.ReactNode;
64
71
  /**
72
+ * @deprecated
65
73
  * Determines the theme of the component.
66
74
  */
67
75
  theme?: 'light' | 'dark';
@@ -77,3 +85,38 @@ export interface CoachmarkProps {
77
85
  * user to gain understanding of the product's main value and discover new use cases.
78
86
  */
79
87
  export declare let Coachmark: React.ForwardRefExoticComponent<CoachmarkProps & React.RefAttributes<HTMLElement>>;
88
+ export declare const deprecatedProps: {
89
+ /**
90
+ * **Deprecated**
91
+ * Optional class name for the Coachmark Overlay component.
92
+ */
93
+ overlayClassName: any;
94
+ /**
95
+ * **Deprecated**
96
+ * What kind or style of Coachmark to render.
97
+ */
98
+ overlayKind: any;
99
+ overlayRef: any;
100
+ /**
101
+ * **Deprecated**
102
+ * By default, the Coachmark will be appended to the end of `document.body`.
103
+ * The Coachmark will remain persistent as the user navigates the app until
104
+ * the user closes the Coachmark.
105
+ *
106
+ * Alternatively, the app developer can tightly couple the Coachmark to a DOM
107
+ * element or other component by specifying a CSS selector. The Coachmark will
108
+ * remain visible as long as that element remains visible or mounted. When the
109
+ * element is hidden or component is unmounted, the Coachmark will disappear.
110
+ */
111
+ portalTarget: any;
112
+ /**
113
+ * **Deprecated**
114
+ * The optional button or beacon that the user will click to show the Coachmark.
115
+ */
116
+ target: any;
117
+ /**
118
+ * **Deprecated**
119
+ * Determines the theme of the component.
120
+ */
121
+ theme: any;
122
+ };
@@ -72,6 +72,10 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef((_ref, ref) => {
72
72
  const _overlayRef = overlayRef || overlayBackupRef;
73
73
  const portalNode = React.useRef(null);
74
74
  const popoverRef = React.useRef(null);
75
+ let targetName;
76
+ if (/*#__PURE__*/React.isValidElement(target) && typeof target.type !== 'string') {
77
+ targetName = target.type;
78
+ }
75
79
  useIsomorphicEffect.useIsomorphicEffect(() => {
76
80
  portalNode.current = portalTarget ? document?.querySelector(portalTarget) ?? document?.querySelector('body') : document?.querySelector('body');
77
81
  }, [portalTarget]);
@@ -175,7 +179,9 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef((_ref, ref) => {
175
179
  }, /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
176
180
  className: cx(blockClass, `${blockClass}__${theme}`, className),
177
181
  ref: _coachmarkRef
178
- }, rest, devtools.getDevtoolsProps(componentName)), overlayKind !== 'tooltip' ? /*#__PURE__*/React.createElement(React.Fragment, null, target, isOpen && portalNode?.current && /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/React.createElement(CoachmarkOverlay.CoachmarkOverlay, {
182
+ }, rest, devtools.getDevtoolsProps(componentName)), overlayKind !== 'tooltip' ? /*#__PURE__*/React.createElement(React.Fragment, null, targetName?.displayName === 'CoachmarkBeacon' ? /*#__PURE__*/React.cloneElement(target, {
183
+ buttonProps: contextValue.buttonProps
184
+ }) : target, isOpen && portalNode?.current && /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/React.createElement(CoachmarkOverlay.CoachmarkOverlay, {
179
185
  ref: _overlayRef,
180
186
  fixedIsVisible: false,
181
187
  kind: overlayKind,
@@ -191,7 +197,9 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef((_ref, ref) => {
191
197
  align: align,
192
198
  autoAlign: autoAlign,
193
199
  open: isOpen
194
- }, target, /*#__PURE__*/React.createElement(react.PopoverContent, null, isOpen && /*#__PURE__*/React.createElement(CoachmarkOverlay.CoachmarkOverlay, {
200
+ }, targetName?.displayName === 'CoachmarkBeacon' ? /*#__PURE__*/React.cloneElement(target, {
201
+ buttonProps: contextValue.buttonProps
202
+ }) : target, /*#__PURE__*/React.createElement(react.PopoverContent, null, isOpen && /*#__PURE__*/React.createElement(CoachmarkOverlay.CoachmarkOverlay, {
195
203
  ref: _overlayRef,
196
204
  fixedIsVisible: false,
197
205
  kind: overlayKind,
@@ -212,6 +220,43 @@ exports.Coachmark = settings.pkg.checkComponentEnabled(exports.Coachmark, compon
212
220
  // The display name of the component, used by React. Note that displayName
213
221
  // is used in preference to relying on function.name.
214
222
  exports.Coachmark.displayName = componentName;
223
+ const deprecatedProps = {
224
+ /**
225
+ * **Deprecated**
226
+ * Optional class name for the Coachmark Overlay component.
227
+ */
228
+ overlayClassName: index.default.string,
229
+ /**
230
+ * **Deprecated**
231
+ * What kind or style of Coachmark to render.
232
+ */
233
+ overlayKind: index.default.oneOf(['tooltip', 'floating', 'stacked']),
234
+ overlayRef: index.default.shape({
235
+ current: overlayRefType
236
+ }),
237
+ /**
238
+ * **Deprecated**
239
+ * By default, the Coachmark will be appended to the end of `document.body`.
240
+ * The Coachmark will remain persistent as the user navigates the app until
241
+ * the user closes the Coachmark.
242
+ *
243
+ * Alternatively, the app developer can tightly couple the Coachmark to a DOM
244
+ * element or other component by specifying a CSS selector. The Coachmark will
245
+ * remain visible as long as that element remains visible or mounted. When the
246
+ * element is hidden or component is unmounted, the Coachmark will disappear.
247
+ */
248
+ portalTarget: index.default.string,
249
+ /**
250
+ * **Deprecated**
251
+ * The optional button or beacon that the user will click to show the Coachmark.
252
+ */
253
+ target: index.default.node,
254
+ /**
255
+ * **Deprecated**
256
+ * Determines the theme of the component.
257
+ */
258
+ theme: index.default.oneOf(['light', 'dark'])
259
+ };
215
260
 
216
261
  // The types and DocGen commentary for the component props,
217
262
  // in alphabetical order (for consistency).
@@ -246,28 +291,6 @@ exports.Coachmark.propTypes = {
246
291
  * Function to call when the Coachmark closes.
247
292
  */
248
293
  onClose: index.default.func,
249
- /**
250
- * Optional class name for the Coachmark Overlay component.
251
- */
252
- overlayClassName: index.default.string,
253
- /**
254
- * What kind or style of Coachmark to render.
255
- */
256
- overlayKind: index.default.oneOf(['tooltip', 'floating', 'stacked']),
257
- overlayRef: index.default.shape({
258
- current: overlayRefType
259
- }),
260
- /**
261
- * By default, the Coachmark will be appended to the end of `document.body`.
262
- * The Coachmark will remain persistent as the user navigates the app until
263
- * the user closes the Coachmark.
264
- *
265
- * Alternatively, the app developer can tightly couple the Coachmark to a DOM
266
- * element or other component by specifying a CSS selector. The Coachmark will
267
- * remain visible as long as that element remains visible or mounted. When the
268
- * element is hidden or component is unmounted, the Coachmark will disappear.
269
- */
270
- portalTarget: index.default.string,
271
294
  /**
272
295
  * Fine tune the position of the target in pixels. Applies only to Beacons.
273
296
  */
@@ -276,12 +299,7 @@ exports.Coachmark.propTypes = {
276
299
  x: index.default.number,
277
300
  y: index.default.number
278
301
  }),
279
- /**
280
- * The optional button or beacon that the user will click to show the Coachmark.
281
- */
282
- target: index.default.node,
283
- /**
284
- * Determines the theme of the component.
285
- */
286
- theme: index.default.oneOf(['light', 'dark'])
302
+ ...deprecatedProps
287
303
  };
304
+
305
+ exports.deprecatedProps = deprecatedProps;
@@ -199,6 +199,12 @@ const useWindowDimensions = () => {
199
199
  return windowDimensions;
200
200
  };
201
201
 
202
+ /**@ts-ignore*/
203
+ exports.CoachmarkOverlay.deprecated = {
204
+ level: 'warn',
205
+ details: `${componentName} is deprecated.`
206
+ };
207
+
202
208
  // Return a placeholder if not released and not enabled by feature flag
203
209
  exports.CoachmarkOverlay = settings.pkg.checkComponentEnabled(exports.CoachmarkOverlay, componentName);
204
210
 
@@ -8,3 +8,4 @@ export { Coachmark } from './Coachmark';
8
8
  export { BEACON_KIND, COACHMARK_OVERLAY_KIND, COACHMARK_ALIGNMENT, } from './utils/enums';
9
9
  export { useCoachmark } from './utils/context';
10
10
  export type { CoachmarkProps } from './Coachmark';
11
+ export { CoachmarkTagline } from './CoachmarkTagline';
@@ -6,6 +6,13 @@
6
6
  */
7
7
  import { BEACON_KIND } from '../Coachmark';
8
8
  import React from 'react';
9
+ import { ButtonProps } from '@carbon/react';
10
+ export interface CoachmarkButtonProps extends ButtonProps<React.ElementType> {
11
+ onClick?(): void;
12
+ onDoubleClick?(): void;
13
+ tabIndex?: number;
14
+ ['aria-bool']?: boolean;
15
+ }
9
16
  export interface CoachmarkBeaconProps {
10
17
  /**
11
18
  * Optional class name for this component.
@@ -21,6 +28,10 @@ export interface CoachmarkBeaconProps {
21
28
  * The aria label.
22
29
  */
23
30
  label: string;
31
+ /**
32
+ * button props
33
+ */
34
+ buttonProps?: CoachmarkButtonProps;
24
35
  }
25
36
  /**
26
37
  * Use beacon for the target prop of a Coachmark component.
@@ -8,15 +8,14 @@
8
8
  'use strict';
9
9
 
10
10
  var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
11
- require('../Coachmark/Coachmark.js');
12
- var context = require('../Coachmark/utils/context.js');
13
11
  var index = require('../../_virtual/index.js');
14
12
  var React = require('react');
15
13
  var cx = require('classnames');
16
14
  var devtools = require('../../global/js/utils/devtools.js');
17
15
  var settings = require('../../settings.js');
16
+ var react = require('@carbon/react');
18
17
 
19
- var _div, _circle;
18
+ var _circle;
20
19
 
21
20
  // The block part of our conventional BEM class names (blockClass__E--M).
22
21
  const blockClass = `${settings.pkg.prefix}--coachmark-beacon`;
@@ -27,17 +26,14 @@ const defaults = {
27
26
  /**
28
27
  * Use beacon for the target prop of a Coachmark component.
29
28
  */
30
- exports.CoachmarkBeacon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
31
- let {
29
+ exports.CoachmarkBeacon = /*#__PURE__*/React.forwardRef((props, ref) => {
30
+ const {
32
31
  label,
33
32
  className,
34
33
  kind = defaults.kind,
34
+ buttonProps,
35
35
  ...rest
36
- } = _ref;
37
- const coachmark = context.useCoachmark();
38
- if (!coachmark) {
39
- return _div || (_div = /*#__PURE__*/React.createElement("div", null, "CoachmarkBeacon is to be use exclusively within the target prop of Coachmark"));
40
- }
36
+ } = props;
41
37
  return /*#__PURE__*/React.createElement("span", _rollupPluginBabelHelpers.extends({}, rest, {
42
38
  className: cx(blockClass, `${blockClass}-${kind}`, className),
43
39
  ref: ref
@@ -46,7 +42,7 @@ exports.CoachmarkBeacon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
46
42
  }), /*#__PURE__*/React.createElement("button", _rollupPluginBabelHelpers.extends({
47
43
  tabIndex: 0,
48
44
  type: "button"
49
- }, coachmark.buttonProps, {
45
+ }, buttonProps, {
50
46
  className: `${blockClass}__target`
51
47
  }), /*#__PURE__*/React.createElement("svg", {
52
48
  className: `${blockClass}__center`,
@@ -69,6 +65,18 @@ exports.CoachmarkBeacon.displayName = componentName;
69
65
  // in alphabetical order (for consistency).
70
66
  // See https://www.npmjs.com/package/prop-types#usage.
71
67
  exports.CoachmarkBeacon.propTypes = {
68
+ /**
69
+ * button props
70
+ */
71
+ buttonProps: index.default.shape({
72
+ /**@ts-ignore*/
73
+ ...react.Button.propTypes,
74
+ /**@ts-ignore*/
75
+ onClick: index.default.func,
76
+ onDoubleClick: index.default.func,
77
+ tabIndex: index.default.number,
78
+ ['aria-expanded']: index.default.bool
79
+ }),
72
80
  /**
73
81
  * Optional class name for this component.
74
82
  */
@@ -16,6 +16,7 @@ var devtools = require('../../global/js/utils/devtools.js');
16
16
  var settings = require('../../settings.js');
17
17
  require('../Coachmark/Coachmark.js');
18
18
  var context = require('../Coachmark/utils/context.js');
19
+ require('../Coachmark/CoachmarkTagline.js');
19
20
 
20
21
  var _div;
21
22
 
@@ -71,6 +72,12 @@ exports.CoachmarkButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
71
72
  }, devtools.getDevtoolsProps(componentName), coachmark.buttonProps), label);
72
73
  });
73
74
 
75
+ /**@ts-ignore*/
76
+ exports.CoachmarkButton.deprecated = {
77
+ level: 'warn',
78
+ details: `${componentName} is deprecated.`
79
+ };
80
+
74
81
  // Return a placeholder if not released and not enabled by feature flag
75
82
  exports.CoachmarkButton = settings.pkg.checkComponentEnabled(exports.CoachmarkButton, componentName);
76
83
 
@@ -53,6 +53,12 @@ exports.CoachmarkOverlayElement = /*#__PURE__*/React.forwardRef((_ref, ref) => {
53
53
  }, button));
54
54
  });
55
55
 
56
+ /**@ts-ignore*/
57
+ exports.CoachmarkOverlayElement.deprecated = {
58
+ level: 'warn',
59
+ details: `${componentName} is deprecated.`
60
+ };
61
+
56
62
  // Return a placeholder if not released and not enabled by feature flag
57
63
  exports.CoachmarkOverlayElement = settings.pkg.checkComponentEnabled(exports.CoachmarkOverlayElement, componentName);
58
64
 
@@ -20,6 +20,7 @@ var pconsole = require('../../global/js/utils/pconsole.js');
20
20
  var settings = require('../../settings.js');
21
21
  require('../Coachmark/Coachmark.js');
22
22
  var context = require('../Coachmark/utils/context.js');
23
+ require('../Coachmark/CoachmarkTagline.js');
23
24
 
24
25
  // The block part of our conventional BEM class names (blockClass__E--M).
25
26
  const blockClass = `${settings.pkg.prefix}--coachmark-overlay-elements`;
@@ -164,6 +165,12 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef((_ref, ref) =>
164
165
  }, coachmark.closeButtonProps), closeButtonLabel))));
165
166
  });
166
167
 
168
+ /**@ts-ignore*/
169
+ exports.CoachmarkOverlayElements.deprecated = {
170
+ level: 'warn',
171
+ details: `${componentName} is deprecated.`
172
+ };
173
+
167
174
  // Return a placeholder if not released and not enabled by feature flag
168
175
  exports.CoachmarkOverlayElements = settings.pkg.checkComponentEnabled(exports.CoachmarkOverlayElements, componentName);
169
176
 
@@ -84,6 +84,7 @@ const DatagridContent = _ref => {
84
84
  const contentRows = DatagridPagination && page || rows;
85
85
  const gridAreaRef = React.useRef(null);
86
86
  const multiKeyTrackingRef = React.useRef(null);
87
+ const carbonPrefix = react.usePrefix();
87
88
  const enableEditableCell = index$1.useFeatureFlag('enable-datagrid-useEditableCell');
88
89
  const enableInlineEdit = index$1.useFeatureFlag('enable-datagrid-useInlineEdit');
89
90
  const enableCustomizeCols = index$1.useFeatureFlag('enable-datagrid-useCustomizeColumns');
@@ -137,7 +138,8 @@ const DatagridContent = _ref => {
137
138
  keysPressedList,
138
139
  state: inlineEditState,
139
140
  usingMac,
140
- ref: multiKeyTrackingRef
141
+ ref: multiKeyTrackingRef,
142
+ carbonPrefix
141
143
  })),
142
144
  onFocus: withInlineEdit && (() => handleGridFocus.handleGridFocus(inlineEditState, dispatch)),
143
145
  title
@@ -160,12 +162,12 @@ const DatagridContent = _ref => {
160
162
  return;
161
163
  }
162
164
  const gridElement = document.querySelector(`#${tableId}`);
163
- const tableHeader = gridElement?.querySelector(`.${settings.carbon.prefix}--data-table-header`);
165
+ const tableHeader = gridElement?.querySelector(`.${carbonPrefix}--data-table-header`);
164
166
  gridElement?.style?.setProperty(`--${blockClass}--grid-width`, layout.px((totalColumnsWidth || 0) + 32));
165
167
  if (gridActive) {
166
168
  gridElement?.style.setProperty(`--${blockClass}--grid-header-height`, layout.px(tableHeader?.clientHeight || 0));
167
169
  }
168
- }, [withInlineEdit, tableId, totalColumnsWidth, datagridState, gridActive]);
170
+ }, [withInlineEdit, tableId, totalColumnsWidth, datagridState, gridActive, carbonPrefix]);
169
171
  useSubscribeToEventEmitter.default(constants.CLEAR_SINGLE_FILTER, id => FilterProvider.clearSingleFilter(id, setAllFilters, state, contextTableId));
170
172
  const renderFilterSummary = () => state.filters.length > 0 && /*#__PURE__*/React.createElement(FilterSummary.default, {
171
173
  className: `${blockClass}__filter-summary`,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2020, 2024
2
+ * Copyright IBM Corp. 2020, 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.
@@ -43,6 +43,7 @@ const DatagridRow = datagridState => {
43
43
  visibleColumns,
44
44
  getAsyncSubRows
45
45
  } = datagridState;
46
+ const carbonPrefix = react.usePrefix();
46
47
  const getVisibleNestedRowCount = _ref => {
47
48
  let {
48
49
  isExpanded,
@@ -122,7 +123,7 @@ const DatagridRow = datagridState => {
122
123
  [`${blockClass}__carbon-row-expanded`]: row.isExpanded,
123
124
  [`${blockClass}__carbon-row-expandable`]: row.canExpand,
124
125
  [`${blockClass}__carbon-row-expandable--async`]: getAsyncSubRows && row.depth > 0,
125
- [`${settings.carbon.prefix}--data-table--selected`]: row.isSelected,
126
+ [`${carbonPrefix}--data-table--selected`]: row.isSelected,
126
127
  [`${blockClass}__slug--row`]: /*#__PURE__*/React.isValidElement(row?.original?.slug),
127
128
  [`${blockClass}__ai-label--row`]: /*#__PURE__*/React.isValidElement(row?.original?.aiLabel)
128
129
  });
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2021, 2023
2
+ * Copyright IBM Corp. 2021, 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.
@@ -37,6 +37,7 @@ const DatagridBatchActionsToolbar = (datagridState, width, ref) => {
37
37
  batchActionMenuButtonLabel,
38
38
  translateWithIdBatchActions
39
39
  } = datagridState;
40
+ const carbonPrefix = react.usePrefix();
40
41
  const [availableRowsCount, setAvailableRowsCount] = React.useState(rows.length);
41
42
  const batchActionMenuButtonLabelText = batchActionMenuButtonLabel ?? 'More';
42
43
  const selectedKeys = Object.keys(selectedRowIds || {});
@@ -53,19 +54,19 @@ const DatagridBatchActionsToolbar = (datagridState, width, ref) => {
53
54
  // the ButtonMenu
54
55
  React.useEffect(() => {
55
56
  if (totalSelected === 1 && !receivedInitialWidth) {
56
- const batchActionListWidth = ref?.current?.querySelector(`.${settings.carbon.prefix}--action-list`).offsetWidth;
57
+ const batchActionListWidth = ref?.current?.querySelector(`.${carbonPrefix}--action-list`).offsetWidth;
57
58
  setInitialListWidth(batchActionListWidth);
58
59
  setReceivedInitialWidth(true);
59
60
  }
60
- }, [totalSelected, receivedInitialWidth, ref]);
61
+ }, [totalSelected, receivedInitialWidth, ref, carbonPrefix]);
61
62
  React.useEffect(() => {
62
- const summaryWidth = ref?.current.querySelector(`.${settings.carbon.prefix}--batch-summary`).offsetWidth;
63
+ const summaryWidth = ref?.current.querySelector(`.${carbonPrefix}--batch-summary`).offsetWidth;
63
64
  if (width < summaryWidth + initialListWidth + 32) {
64
65
  setDisplayAllInMenu(true);
65
66
  } else {
66
67
  setDisplayAllInMenu(false);
67
68
  }
68
- }, [width, ref, initialListWidth]);
69
+ }, [width, ref, initialListWidth, carbonPrefix]);
69
70
  const getSelectedRowData = () => {
70
71
  if (selectedKeys.length === 0) {
71
72
  return [];
@@ -153,7 +154,7 @@ const DatagridBatchActionsToolbar = (datagridState, width, ref) => {
153
154
  renderIcon: batchAction.renderIcon,
154
155
  onClick: event => onClickHandler(event, batchAction),
155
156
  className: cx({
156
- [`${settings.carbon.prefix}--noLabel`]: !batchAction.label || batchAction.label === ''
157
+ [`${carbonPrefix}--noLabel`]: !batchAction.label || batchAction.label === ''
157
158
  }),
158
159
  iconDescription: batchAction.label,
159
160
  tabIndex: totalSelected > 0 ? 0 : -1
@@ -1,4 +1,4 @@
1
- export function handleGridKeyPress({ event, dispatch, state, instance, keysPressedList, usingMac, ref, }: {
1
+ export function handleGridKeyPress({ event, dispatch, state, instance, keysPressedList, usingMac, ref, carbonPrefix, }: {
2
2
  event: any;
3
3
  dispatch: any;
4
4
  state: any;
@@ -6,4 +6,5 @@ export function handleGridKeyPress({ event, dispatch, state, instance, keysPress
6
6
  keysPressedList: any;
7
7
  usingMac: any;
8
8
  ref: any;
9
+ carbonPrefix: any;
9
10
  }): void;
@@ -20,7 +20,8 @@ const handleGridKeyPress = _ref => {
20
20
  instance,
21
21
  keysPressedList,
22
22
  usingMac,
23
- ref
23
+ ref,
24
+ carbonPrefix
24
25
  } = _ref;
25
26
  const {
26
27
  key
@@ -75,7 +76,7 @@ const handleGridKeyPress = _ref => {
75
76
 
76
77
  // Checks if the date picker is open
77
78
  const datePickerIsActive = () => {
78
- const focusedCalendarElement = document.querySelector(`.${settings.carbon.prefix}--date-picker__input.flatpickr-input.active`);
79
+ const focusedCalendarElement = document.querySelector(`.${carbonPrefix}--date-picker__input.flatpickr-input.active`);
79
80
  if (focusedCalendarElement || document.activeElement.classList.contains(`flatpickr-day`)) {
80
81
  return true;
81
82
  }
@@ -29,6 +29,7 @@ const RowSizeDropdown = _ref => {
29
29
  } = _ref;
30
30
  const radioGroupRef = React.useRef(undefined);
31
31
  const [isOpen, setIsOpen] = React.useState(false);
32
+ const carbonPrefix = react.usePrefix();
32
33
  const onCloseHandler = () => {
33
34
  setIsOpen(false);
34
35
  };
@@ -45,7 +46,7 @@ const RowSizeDropdown = _ref => {
45
46
  React.useEffect(() => {
46
47
  if (isOpen) {
47
48
  const radioGroupParentElement = radioGroupRef?.current;
48
- const checkedRadioChild = radioGroupParentElement?.querySelector(`.${settings.carbon.prefix}--radio-button:checked`);
49
+ const checkedRadioChild = radioGroupParentElement?.querySelector(`.${carbonPrefix}--radio-button:checked`);
49
50
  checkedRadioChild?.focus();
50
51
  }
51
52
  }, [isOpen]);
@@ -16,9 +16,11 @@ var cx = require('classnames');
16
16
  var settings = require('../../settings.js');
17
17
  var useFocusRowExpander = require('./useFocusRowExpander.js');
18
18
  var stateReducer = require('./Datagrid/addons/stateReducer.js');
19
+ var react = require('@carbon/react');
19
20
 
20
21
  const blockClass = `${settings.pkg.prefix}--datagrid`;
21
22
  const useNestedRowExpander = hooks => {
23
+ const carbonPrefix = react.usePrefix();
22
24
  const tempState = React.useRef(undefined);
23
25
  const lastExpandedRowIndex = React.useRef(undefined);
24
26
  const useInstance = instance => {
@@ -84,7 +86,7 @@ const useNestedRowExpander = hooks => {
84
86
  return row.canExpand || getAsyncSubRows ? /*#__PURE__*/React.createElement("button", _rollupPluginBabelHelpers.extends({
85
87
  type: "button",
86
88
  "aria-label": expanderTitle,
87
- className: cx(`${blockClass}__row-expander`, `${settings.carbon.prefix}--btn`, `${settings.carbon.prefix}--btn--ghost`)
89
+ className: cx(`${blockClass}__row-expander`, `${carbonPrefix}--btn`, `${carbonPrefix}--btn--ghost`)
88
90
  }, expanderButtonProps), /*#__PURE__*/React.createElement(icons.ChevronRight, {
89
91
  className: cx(`${blockClass}__expander-icon`, {
90
92
  [`${blockClass}__expander-icon--not-open`]: !row.isExpanded,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2020, 2023
2
+ * Copyright IBM Corp. 2020, 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.
@@ -10,9 +10,11 @@
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
12
  var settings = require('../../settings.js');
13
+ var react = require('@carbon/react');
13
14
 
14
15
  const useOnRowClick = hooks => {
15
16
  const useInstance = rowInstance => {
17
+ const carbonPrefix = react.usePrefix();
16
18
  const {
17
19
  onRowClick
18
20
  } = rowInstance;
@@ -36,14 +38,14 @@ const useOnRowClick = hooks => {
36
38
  // We do not want to change the list of selected rows if using the useSelectedRows hook, otherwise clicking on an entire row will mark the row as checked
37
39
 
38
40
  // Remove selected class from all other clickable rows as only one clickable row can be selected at a time
39
- const clickableSelectedRows = document.querySelectorAll(`#${tableId}.${settings.pkg.prefix}--datagrid .${settings.carbon.prefix}--data-table--selected:not(.${settings.pkg.prefix}--datagrid__active-row)`);
41
+ const clickableSelectedRows = document.querySelectorAll(`#${tableId}.${settings.pkg.prefix}--datagrid .${carbonPrefix}--data-table--selected:not(.${settings.pkg.prefix}--datagrid__active-row)`);
40
42
  if (clickableSelectedRows.length) {
41
43
  Array.from(clickableSelectedRows).forEach(row => {
42
- row.classList.remove(`${settings.carbon.prefix}--data-table--selected`);
44
+ row.classList.remove(`${carbonPrefix}--data-table--selected`);
43
45
  });
44
46
  }
45
47
  const closestRow = event.currentTarget.closest('tr');
46
- closestRow.classList.add(`${settings.carbon.prefix}--data-table--selected`);
48
+ closestRow.classList.add(`${carbonPrefix}--data-table--selected`);
47
49
  if (!withSelectRows) {
48
50
  if (instance.selectedFlatRows) {
49
51
  instance.selectedFlatRows.map(toggleRow => toggleRow.toggleRowSelected?.(false));
@@ -15,6 +15,7 @@ var icons = require('@carbon/react/icons');
15
15
  var settings = require('../../settings.js');
16
16
  var cx = require('classnames');
17
17
  var useFocusRowExpander = require('./useFocusRowExpander.js');
18
+ var react = require('@carbon/react');
18
19
 
19
20
  const blockClass = `${settings.pkg.prefix}--datagrid`;
20
21
  const useRowExpander = hooks => {
@@ -23,6 +24,7 @@ const useRowExpander = hooks => {
23
24
  const useInstance = instance => {
24
25
  tempState.current = instance;
25
26
  };
27
+ const carbonPrefix = react.usePrefix();
26
28
  useFocusRowExpander.useFocusRowExpander({
27
29
  instance: tempState?.current,
28
30
  lastExpandedRowIndex: lastExpandedRowIndex?.current,
@@ -55,7 +57,7 @@ const useRowExpander = hooks => {
55
57
  return row.canExpand && /*#__PURE__*/React.createElement("button", _rollupPluginBabelHelpers.extends({
56
58
  type: "button",
57
59
  "aria-label": expanderTitle,
58
- className: cx(`${blockClass}__row-expander`, `${settings.carbon.prefix}--btn`, `${settings.carbon.prefix}--btn--ghost`)
60
+ className: cx(`${blockClass}__row-expander`, `${carbonPrefix}--btn`, `${carbonPrefix}--btn--ghost`)
59
61
  }, expanderButtonProps), row.isExpanded ? /*#__PURE__*/React.createElement(icons.ChevronUp, {
60
62
  className: `${blockClass}__row-expander--icon`
61
63
  }) : /*#__PURE__*/React.createElement(icons.ChevronDown, {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2020, 2023
2
+ * Copyright IBM Corp. 2020, 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.
@@ -56,6 +56,7 @@ const useSelectRows = hooks => {
56
56
  });
57
57
  };
58
58
  const useHighlightSelection = hooks => {
59
+ const carbonPrefix = react.usePrefix();
59
60
  const getRowProps = (props, _ref) => {
60
61
  let {
61
62
  row
@@ -65,7 +66,7 @@ const useHighlightSelection = hooks => {
65
66
  } = row.getToggleRowSelectedProps();
66
67
  return [props, {
67
68
  className: cx([`${blockClass}__carbon-row`, {
68
- [`${settings.carbon.prefix}--data-table--selected`]: checked,
69
+ [`${carbonPrefix}--data-table--selected`]: checked,
69
70
  [`${blockClass}__active-row`]: checked
70
71
  }])
71
72
  }];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2020, 2024
2
+ * Copyright IBM Corp. 2020, 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.