@carbon/ibm-products 2.68.0 → 2.69.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 (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
@@ -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.
@@ -7,11 +7,11 @@
7
7
 
8
8
  import { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { isValidElement } from 'react';
10
- import { TableRow, SkeletonText, TableCell } from '@carbon/react';
10
+ import { usePrefix, TableRow, SkeletonText, TableCell } from '@carbon/react';
11
11
  import { px } from '@carbon/layout';
12
12
  import { selectionColumnId } from '../common-column-ids.js';
13
13
  import cx from 'classnames';
14
- import { pkg, carbon } from '../../../settings.js';
14
+ import { pkg } from '../../../settings.js';
15
15
  import { DatagridAILabel } from './addons/AiLabel/DatagridAiLabel.js';
16
16
 
17
17
  var _SkeletonText;
@@ -39,6 +39,7 @@ const DatagridRow = datagridState => {
39
39
  visibleColumns,
40
40
  getAsyncSubRows
41
41
  } = datagridState;
42
+ const carbonPrefix = usePrefix();
42
43
  const getVisibleNestedRowCount = _ref => {
43
44
  let {
44
45
  isExpanded,
@@ -118,7 +119,7 @@ const DatagridRow = datagridState => {
118
119
  [`${blockClass}__carbon-row-expanded`]: row.isExpanded,
119
120
  [`${blockClass}__carbon-row-expandable`]: row.canExpand,
120
121
  [`${blockClass}__carbon-row-expandable--async`]: getAsyncSubRows && row.depth > 0,
121
- [`${carbon.prefix}--data-table--selected`]: row.isSelected,
122
+ [`${carbonPrefix}--data-table--selected`]: row.isSelected,
122
123
  [`${blockClass}__slug--row`]: /*#__PURE__*/isValidElement(row?.original?.slug),
123
124
  [`${blockClass}__ai-label--row`]: /*#__PURE__*/isValidElement(row?.original?.aiLabel)
124
125
  });
@@ -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.
@@ -7,9 +7,9 @@
7
7
 
8
8
  import React__default, { useRef, useState, useEffect } from 'react';
9
9
  import PropTypes from '../../../_virtual/index.js';
10
- import { TableToolbar, TableBatchActions, TableBatchAction, MenuButton, MenuItem } from '@carbon/react';
10
+ import { TableToolbar, usePrefix, TableBatchActions, TableBatchAction, MenuButton, MenuItem } from '@carbon/react';
11
11
  import { useResizeObserver } from '../../../global/js/hooks/useResizeObserver.js';
12
- import { pkg, carbon } from '../../../settings.js';
12
+ import { pkg } from '../../../settings.js';
13
13
  import cx from 'classnames';
14
14
  import { handleSelectAllRowData } from './addons/stateReducer.js';
15
15
 
@@ -33,6 +33,7 @@ const DatagridBatchActionsToolbar = (datagridState, width, ref) => {
33
33
  batchActionMenuButtonLabel,
34
34
  translateWithIdBatchActions
35
35
  } = datagridState;
36
+ const carbonPrefix = usePrefix();
36
37
  const [availableRowsCount, setAvailableRowsCount] = useState(rows.length);
37
38
  const batchActionMenuButtonLabelText = batchActionMenuButtonLabel ?? 'More';
38
39
  const selectedKeys = Object.keys(selectedRowIds || {});
@@ -49,19 +50,19 @@ const DatagridBatchActionsToolbar = (datagridState, width, ref) => {
49
50
  // the ButtonMenu
50
51
  useEffect(() => {
51
52
  if (totalSelected === 1 && !receivedInitialWidth) {
52
- const batchActionListWidth = ref?.current?.querySelector(`.${carbon.prefix}--action-list`).offsetWidth;
53
+ const batchActionListWidth = ref?.current?.querySelector(`.${carbonPrefix}--action-list`).offsetWidth;
53
54
  setInitialListWidth(batchActionListWidth);
54
55
  setReceivedInitialWidth(true);
55
56
  }
56
- }, [totalSelected, receivedInitialWidth, ref]);
57
+ }, [totalSelected, receivedInitialWidth, ref, carbonPrefix]);
57
58
  useEffect(() => {
58
- const summaryWidth = ref?.current.querySelector(`.${carbon.prefix}--batch-summary`).offsetWidth;
59
+ const summaryWidth = ref?.current.querySelector(`.${carbonPrefix}--batch-summary`).offsetWidth;
59
60
  if (width < summaryWidth + initialListWidth + 32) {
60
61
  setDisplayAllInMenu(true);
61
62
  } else {
62
63
  setDisplayAllInMenu(false);
63
64
  }
64
- }, [width, ref, initialListWidth]);
65
+ }, [width, ref, initialListWidth, carbonPrefix]);
65
66
  const getSelectedRowData = () => {
66
67
  if (selectedKeys.length === 0) {
67
68
  return [];
@@ -149,7 +150,7 @@ const DatagridBatchActionsToolbar = (datagridState, width, ref) => {
149
150
  renderIcon: batchAction.renderIcon,
150
151
  onClick: event => onClickHandler(event, batchAction),
151
152
  className: cx({
152
- [`${carbon.prefix}--noLabel`]: !batchAction.label || batchAction.label === ''
153
+ [`${carbonPrefix}--noLabel`]: !batchAction.label || batchAction.label === ''
153
154
  }),
154
155
  iconDescription: batchAction.label,
155
156
  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;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { pkg, carbon } from '../../../../../settings.js';
8
+ import { pkg } from '../../../../../settings.js';
9
9
  import { handleMultipleKeys } from './handleMultipleKeys.js';
10
10
  import { getCellIdAsObject } from './InlineEditContext/getCellIdAsObject.js';
11
11
 
@@ -18,7 +18,8 @@ const handleGridKeyPress = _ref => {
18
18
  instance,
19
19
  keysPressedList,
20
20
  usingMac,
21
- ref
21
+ ref,
22
+ carbonPrefix
22
23
  } = _ref;
23
24
  const {
24
25
  key
@@ -73,7 +74,7 @@ const handleGridKeyPress = _ref => {
73
74
 
74
75
  // Checks if the date picker is open
75
76
  const datePickerIsActive = () => {
76
- const focusedCalendarElement = document.querySelector(`.${carbon.prefix}--date-picker__input.flatpickr-input.active`);
77
+ const focusedCalendarElement = document.querySelector(`.${carbonPrefix}--date-picker__input.flatpickr-input.active`);
77
78
  if (focusedCalendarElement || document.activeElement.classList.contains(`flatpickr-day`)) {
78
79
  return true;
79
80
  }
@@ -9,10 +9,10 @@ import { extends as _extends } from '../../../../../_virtual/_rollupPluginBabelH
9
9
  import React__default, { useRef, useEffect } from 'react';
10
10
  import PropTypes from '../../../../../_virtual/index.js';
11
11
  import { Settings } from '@carbon/react/icons';
12
- import { Popover, IconButton, PopoverContent, Layer } from '@carbon/react';
12
+ import { usePrefix, Popover, IconButton, PopoverContent, Layer } from '@carbon/react';
13
13
  import cx from 'classnames';
14
14
  import RowSizeRadioGroup from './RowSizeRadioGroup.js';
15
- import { carbon, pkg } from '../../../../../settings.js';
15
+ import { pkg } from '../../../../../settings.js';
16
16
 
17
17
  var _Settings;
18
18
  const blockClass = `${pkg.prefix}--datagrid__row-size`;
@@ -25,6 +25,7 @@ const RowSizeDropdown = _ref => {
25
25
  } = _ref;
26
26
  const radioGroupRef = useRef(undefined);
27
27
  const [isOpen, setIsOpen] = React__default.useState(false);
28
+ const carbonPrefix = usePrefix();
28
29
  const onCloseHandler = () => {
29
30
  setIsOpen(false);
30
31
  };
@@ -41,7 +42,7 @@ const RowSizeDropdown = _ref => {
41
42
  useEffect(() => {
42
43
  if (isOpen) {
43
44
  const radioGroupParentElement = radioGroupRef?.current;
44
- const checkedRadioChild = radioGroupParentElement?.querySelector(`.${carbon.prefix}--radio-button:checked`);
45
+ const checkedRadioChild = radioGroupParentElement?.querySelector(`.${carbonPrefix}--radio-button:checked`);
45
46
  checkedRadioChild?.focus();
46
47
  }
47
48
  }, [isOpen]);
@@ -9,12 +9,14 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
9
9
  import React__default, { useRef } from 'react';
10
10
  import { ChevronRight } from '@carbon/react/icons';
11
11
  import cx from 'classnames';
12
- import { pkg, carbon } from '../../settings.js';
12
+ import { pkg } from '../../settings.js';
13
13
  import { useFocusRowExpander } from './useFocusRowExpander.js';
14
14
  import { handleDynamicRowCheck } from './Datagrid/addons/stateReducer.js';
15
+ import { usePrefix } from '@carbon/react';
15
16
 
16
17
  const blockClass = `${pkg.prefix}--datagrid`;
17
18
  const useNestedRowExpander = hooks => {
19
+ const carbonPrefix = usePrefix();
18
20
  const tempState = useRef(undefined);
19
21
  const lastExpandedRowIndex = useRef(undefined);
20
22
  const useInstance = instance => {
@@ -80,7 +82,7 @@ const useNestedRowExpander = hooks => {
80
82
  return row.canExpand || getAsyncSubRows ? /*#__PURE__*/React__default.createElement("button", _extends({
81
83
  type: "button",
82
84
  "aria-label": expanderTitle,
83
- className: cx(`${blockClass}__row-expander`, `${carbon.prefix}--btn`, `${carbon.prefix}--btn--ghost`)
85
+ className: cx(`${blockClass}__row-expander`, `${carbonPrefix}--btn`, `${carbonPrefix}--btn--ghost`)
84
86
  }, expanderButtonProps), /*#__PURE__*/React__default.createElement(ChevronRight, {
85
87
  className: cx(`${blockClass}__expander-icon`, {
86
88
  [`${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.
@@ -5,10 +5,12 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { pkg, carbon } from '../../settings.js';
8
+ import { pkg } from '../../settings.js';
9
+ import { usePrefix } from '@carbon/react';
9
10
 
10
11
  const useOnRowClick = hooks => {
11
12
  const useInstance = rowInstance => {
13
+ const carbonPrefix = usePrefix();
12
14
  const {
13
15
  onRowClick
14
16
  } = rowInstance;
@@ -32,14 +34,14 @@ const useOnRowClick = hooks => {
32
34
  // 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
33
35
 
34
36
  // Remove selected class from all other clickable rows as only one clickable row can be selected at a time
35
- const clickableSelectedRows = document.querySelectorAll(`#${tableId}.${pkg.prefix}--datagrid .${carbon.prefix}--data-table--selected:not(.${pkg.prefix}--datagrid__active-row)`);
37
+ const clickableSelectedRows = document.querySelectorAll(`#${tableId}.${pkg.prefix}--datagrid .${carbonPrefix}--data-table--selected:not(.${pkg.prefix}--datagrid__active-row)`);
36
38
  if (clickableSelectedRows.length) {
37
39
  Array.from(clickableSelectedRows).forEach(row => {
38
- row.classList.remove(`${carbon.prefix}--data-table--selected`);
40
+ row.classList.remove(`${carbonPrefix}--data-table--selected`);
39
41
  });
40
42
  }
41
43
  const closestRow = event.currentTarget.closest('tr');
42
- closestRow.classList.add(`${carbon.prefix}--data-table--selected`);
44
+ closestRow.classList.add(`${carbonPrefix}--data-table--selected`);
43
45
  if (!withSelectRows) {
44
46
  if (instance.selectedFlatRows) {
45
47
  instance.selectedFlatRows.map(toggleRow => toggleRow.toggleRowSelected?.(false));
@@ -8,9 +8,10 @@
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { useRef } from 'react';
10
10
  import { ChevronUp, ChevronDown } from '@carbon/react/icons';
11
- import { pkg, carbon } from '../../settings.js';
11
+ import { pkg } from '../../settings.js';
12
12
  import cx from 'classnames';
13
13
  import { useFocusRowExpander } from './useFocusRowExpander.js';
14
+ import { usePrefix } from '@carbon/react';
14
15
 
15
16
  const blockClass = `${pkg.prefix}--datagrid`;
16
17
  const useRowExpander = hooks => {
@@ -19,6 +20,7 @@ const useRowExpander = hooks => {
19
20
  const useInstance = instance => {
20
21
  tempState.current = instance;
21
22
  };
23
+ const carbonPrefix = usePrefix();
22
24
  useFocusRowExpander({
23
25
  instance: tempState?.current,
24
26
  lastExpandedRowIndex: lastExpandedRowIndex?.current,
@@ -51,7 +53,7 @@ const useRowExpander = hooks => {
51
53
  return row.canExpand && /*#__PURE__*/React__default.createElement("button", _extends({
52
54
  type: "button",
53
55
  "aria-label": expanderTitle,
54
- className: cx(`${blockClass}__row-expander`, `${carbon.prefix}--btn`, `${carbon.prefix}--btn--ghost`)
56
+ className: cx(`${blockClass}__row-expander`, `${carbonPrefix}--btn`, `${carbonPrefix}--btn--ghost`)
55
57
  }, expanderButtonProps), row.isExpanded ? /*#__PURE__*/React__default.createElement(ChevronUp, {
56
58
  className: `${blockClass}__row-expander--icon`
57
59
  }) : /*#__PURE__*/React__default.createElement(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.
@@ -8,10 +8,10 @@
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { useState, useLayoutEffect, useCallback } from 'react';
10
10
  import cx from 'classnames';
11
- import { TableSelectRow } from '@carbon/react';
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
- import { pkg, carbon } from '../../settings.js';
14
+ import { pkg } from '../../settings.js';
15
15
  import { handleToggleRowSelected } from './Datagrid/addons/stateReducer.js';
16
16
 
17
17
  const blockClass = `${pkg.prefix}--datagrid`;
@@ -52,6 +52,7 @@ const useSelectRows = hooks => {
52
52
  });
53
53
  };
54
54
  const useHighlightSelection = hooks => {
55
+ const carbonPrefix = usePrefix();
55
56
  const getRowProps = (props, _ref) => {
56
57
  let {
57
58
  row
@@ -61,7 +62,7 @@ const useHighlightSelection = hooks => {
61
62
  } = row.getToggleRowSelectedProps();
62
63
  return [props, {
63
64
  className: cx([`${blockClass}__carbon-row`, {
64
- [`${carbon.prefix}--data-table--selected`]: checked,
65
+ [`${carbonPrefix}--data-table--selected`]: checked,
65
66
  [`${blockClass}__active-row`]: checked
66
67
  }])
67
68
  }];
@@ -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.
@@ -7,8 +7,8 @@
7
7
 
8
8
  import React__default from 'react';
9
9
  import cx from 'classnames';
10
- import { pkg, carbon } from '../../settings.js';
11
- import { Button } from '@carbon/react';
10
+ import { pkg } from '../../settings.js';
11
+ import { usePrefix, Button } from '@carbon/react';
12
12
  import { ArrowsVertical, ArrowDown, ArrowUp } from '@carbon/react/icons';
13
13
  import { SelectAll } from './Datagrid/DatagridSelectAll.js';
14
14
  import { DatagridAILabel } from './Datagrid/addons/AiLabel/DatagridAiLabel.js';
@@ -52,6 +52,7 @@ const getAriaPressedValue = col => {
52
52
  return 'false';
53
53
  };
54
54
  const useSortableColumns = hooks => {
55
+ const carbonPrefix = usePrefix();
55
56
  const sortableVisibleColumns = (visibleColumns, _ref) => {
56
57
  let {
57
58
  instance
@@ -60,7 +61,7 @@ const useSortableColumns = hooks => {
60
61
  onSort
61
62
  } = instance;
62
63
  const onSortClick = (event, column) => {
63
- const aiLabel = event.target.classList.contains(`${carbon.prefix}--slug`) || event.target.closest(`.${carbon.prefix}--slug`);
64
+ const aiLabel = event.target.classList.contains(`${carbonPrefix}--slug`) || event.target.closest(`.${carbonPrefix}--slug`);
64
65
  // Do not continue with sorting if we find a slug
65
66
  if (aiLabel) {
66
67
  event.stopPropagation();
@@ -82,7 +83,7 @@ const useSortableColumns = hooks => {
82
83
  const iconProps = {
83
84
  size: 16,
84
85
  ...props,
85
- className: `${blockClass}__sortable-icon ${carbon.prefix}--btn__icon`
86
+ className: `${blockClass}__sortable-icon ${carbonPrefix}--btn__icon`
86
87
  };
87
88
  if (col?.isSorted) {
88
89
  switch (col.isSortedDesc) {
@@ -114,7 +115,7 @@ const useSortableColumns = hooks => {
114
115
  }), icon(headerProp?.column, props));
115
116
  },
116
117
  id: column?.id,
117
- className: cx(`${carbon.prefix}--table-sort ${blockClass}--table-sort`, {
118
+ className: cx(`${carbonPrefix}--table-sort ${blockClass}--table-sort`, {
118
119
  [`${blockClass}--table-sort--desc`]: headerProp?.column.isSortedDesc,
119
120
  [`${blockClass}--table-sort--asc`]: headerProp?.column.isSortedDesc === false
120
121
  }),
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022, 2022
2
+ * Copyright IBM Corp. 2022, 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.
@@ -8,8 +8,8 @@
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import { WarningFilled, Close, Checkmark, Edit } from '@carbon/react/icons';
10
10
  import React__default, { forwardRef, useState, useRef, useEffect } from 'react';
11
- import { pkg, carbon } from '../../settings.js';
12
- import { IconButton } from '@carbon/react';
11
+ import { pkg } from '../../settings.js';
12
+ import { usePrefix, IconButton } from '@carbon/react';
13
13
  import PropTypes from '../../_virtual/index.js';
14
14
  import cx from 'classnames';
15
15
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
@@ -49,6 +49,7 @@ let EditInPlace = /*#__PURE__*/forwardRef((_ref, ref) => {
49
49
  const inputRef = useRef(null);
50
50
  const canSave = value !== initialValue && !invalid;
51
51
  const escaping = useRef(false);
52
+ const carbonPrefix = usePrefix();
52
53
  const tipAlignIsObject = typeof tooltipAlignment === 'object';
53
54
  const tipAlignments = ['edit', 'save', 'cancel'].reduce((acc, tips) => {
54
55
  acc[tips] = (tipAlignIsObject ? tooltipAlignment[tips] : tooltipAlignment) ?? defaults.tooltipAlignment;
@@ -156,7 +157,7 @@ let EditInPlace = /*#__PURE__*/forwardRef((_ref, ref) => {
156
157
  onBlur: onBlurHandler
157
158
  }, /*#__PURE__*/React__default.createElement("input", {
158
159
  id: id,
159
- className: cx(`${blockClass}__text-input`, `${carbon.prefix}--text-input`, `${carbon.prefix}--text-input--${size}`),
160
+ className: cx(`${blockClass}__text-input`, `${carbonPrefix}--text-input`, `${carbonPrefix}--text-input--${size}`),
160
161
  type: "text",
161
162
  placeholder: placeholder,
162
163
  value: value,
@@ -32,5 +32,34 @@ interface EmptyStateProps {
32
32
  */
33
33
  title: string | ReactNode;
34
34
  }
35
- export declare const EmptyStateContent: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
35
+ export declare const EmptyStateContent: {
36
+ (props: EmptyStateProps): React.JSX.Element;
37
+ displayName: string;
38
+ propTypes: {
39
+ /**
40
+ * Empty state action button
41
+ */
42
+ action: any;
43
+ /**
44
+ * Empty state headingAs allows you to customize the type of heading element
45
+ */
46
+ headingAs: any;
47
+ /**
48
+ * Empty state link object
49
+ */
50
+ link: any;
51
+ /**
52
+ * Empty state size
53
+ */
54
+ size: any;
55
+ /**
56
+ * Empty state subtitle
57
+ */
58
+ subtitle: any;
59
+ /**
60
+ * Empty state title
61
+ */
62
+ title: any;
63
+ };
64
+ };
36
65
  export {};
@@ -15,7 +15,7 @@ import { Button, Section, Heading, Link } from '@carbon/react';
15
15
  // The block part of our conventional BEM class names (blockClass__E--M).
16
16
  const blockClass = `${pkg.prefix}--empty-state`;
17
17
  const componentName = 'EmptyStateContent';
18
- const EmptyStateContent = /*#__PURE__*/React__default.forwardRef(props => {
18
+ const EmptyStateContent = props => {
19
19
  const {
20
20
  action,
21
21
  link,
@@ -45,7 +45,7 @@ const EmptyStateContent = /*#__PURE__*/React__default.forwardRef(props => {
45
45
  className: `${blockClass}__link`,
46
46
  href: link.href
47
47
  }), link.text));
48
- });
48
+ };
49
49
 
50
50
  // The display name of the component, used by React. Note that displayName
51
51
  // is used in preference to relying on function.name.
@@ -6,13 +6,13 @@
6
6
  */
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import { unstable_FeatureFlags, ComposedModal, ModalHeader, ModalBody, FormGroup, RadioButtonGroup, RadioButton, TextInput, PasswordInput, Loading, ModalFooter, Button } from '@carbon/react';
9
+ import { usePrefix, unstable_FeatureFlags, ComposedModal, ModalHeader, ModalBody, FormGroup, RadioButtonGroup, RadioButton, TextInput, PasswordInput, Loading, ModalFooter, Button } from '@carbon/react';
10
10
  import { CheckmarkFilled, ErrorFilled } from '@carbon/react/icons';
11
11
  import React__default, { forwardRef, useState, useEffect, useRef } from 'react';
12
12
  import PropTypes from '../../_virtual/index.js';
13
13
  import cx from 'classnames';
14
14
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
15
- import { pkg, carbon } from '../../settings.js';
15
+ import { pkg } from '../../settings.js';
16
16
  import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
17
17
  import uuidv4 from '../../global/js/utils/uuidv4.js';
18
18
 
@@ -65,6 +65,7 @@ let ExportModal = /*#__PURE__*/forwardRef((_ref, ref) => {
65
65
  // by default (if it exists) use the first extension in the extension array
66
66
  const [extension, setExtension] = useState('');
67
67
  const renderPortalUse = usePortalTarget(portalTargetIn);
68
+ const carbonPrefix = usePrefix();
68
69
  useEffect(() => {
69
70
  setName(filename);
70
71
  if (preformattedExtensions && preformattedExtensions.length > 0 && preformattedExtensions[0]?.extension) {
@@ -73,10 +74,10 @@ let ExportModal = /*#__PURE__*/forwardRef((_ref, ref) => {
73
74
  }, [filename, preformattedExtensions, open]);
74
75
  useEffect(() => {
75
76
  if (successful) {
76
- const button = document.querySelector(`.${blockClass} .${carbon.prefix}--modal-close-button button`);
77
+ const button = document.querySelector(`.${blockClass} .${carbonPrefix}--modal-close-button button`);
77
78
  button?.focus();
78
79
  }
79
- }, [successful, blockClass]);
80
+ }, [successful, blockClass, carbonPrefix]);
80
81
  const onNameChangeHandler = evt => {
81
82
  setName(evt.target.value);
82
83
  };
@@ -141,7 +142,8 @@ let ExportModal = /*#__PURE__*/forwardRef((_ref, ref) => {
141
142
  orientation: "vertical",
142
143
  onChange: onExtensionChangeHandler,
143
144
  valueSelected: extension,
144
- name: "extensions"
145
+ name: "extensions",
146
+ "aria-label": "extensions"
145
147
  }, preformattedExtensions.map(o => /*#__PURE__*/React__default.createElement(RadioButton, {
146
148
  key: o.extension,
147
149
  id: o.extension,
@@ -1,40 +1,59 @@
1
1
  /**
2
- * Copyright IBM Corp. 2024, 2024
2
+ * Copyright IBM Corp. 2024, 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.
6
6
  */
7
- import React from 'react';
7
+ import React, { ReactNode, type JSX } from 'react';
8
+ export interface FeatureFlagsProps {
9
+ children?: ReactNode;
10
+ flags?: Record<string, boolean>;
11
+ defaultPortalTargetBody?: boolean;
12
+ enableDatagridUseInlineEdit?: boolean;
13
+ enableDatagridUseEditableCell?: boolean;
14
+ enableDatagridUseCustomizeColumns?: boolean;
15
+ enableSidepanelResizer?: boolean;
16
+ enableTestFlagA?: boolean;
17
+ enableTestFlagB?: boolean;
18
+ }
8
19
  /**
9
20
  * Our FeatureFlagContext is used alongside the FeatureFlags component to enable
10
21
  * or disable feature flags in a given React tree
11
22
  */
12
23
  declare const FeatureFlagContext: React.Context<any>;
13
24
  /**
14
- * Supports individual feature flag values as props, merging them
25
+ * Supports an object of feature flag values with the `flags` prop, merging them
15
26
  * along with the current `FeatureFlagContext` to provide consumers to check if
16
27
  * a feature flag is enabled or disabled in a given React tree
17
28
  */
18
- declare function FeatureFlags({ children, flags, ...newFlags }: {
19
- [x: string]: any;
20
- children: any;
21
- flags?: {} | undefined;
22
- }): React.JSX.Element;
29
+ declare function FeatureFlags({ children, flags, defaultPortalTargetBody, enableDatagridUseInlineEdit, enableDatagridUseEditableCell, enableDatagridUseCustomizeColumns, enableSidepanelResizer, enableTestFlagA, enableTestFlagB, }: FeatureFlagsProps): JSX.Element;
23
30
  declare namespace FeatureFlags {
24
31
  var propTypes: {
25
32
  children: any;
26
33
  /**
27
- * Provide the feature flags to enabled or disabled in the current React tree, this has been deprecated. as we are going to pass individual boolean props for each flag.
34
+ * Provide the feature flags to enabled or disabled in the current React tree
28
35
  */
29
- flags: any;
36
+ defaultPortalTargetBody: any;
37
+ enableDatagridUseCustomizeColumns: any;
38
+ enableDatagridUseEditableCell: any;
39
+ enableDatagridUseInlineEdit: any;
40
+ enableSidepanelResizer: any;
41
+ enableTestFlagA: any;
42
+ enableTestFlagB: any;
43
+ flags: (props: any, propName: any, comp: any, loc: any, propFullName: any, secret: any) => any;
30
44
  };
31
45
  }
32
46
  /**
33
- * Access whether a given flag is enabled or disabled in a given FeatureFlagContext
47
+ * Access whether a given flag is enabled or disabled in a given
48
+ * FeatureFlagContext
49
+ *
50
+ * @returns {boolean}
34
51
  */
35
- declare function useFeatureFlag(flag: string): boolean;
52
+ declare function useFeatureFlag(flag: any): any;
36
53
  /**
37
54
  * Access all feature flag information for the given FeatureFlagContext
55
+ *
56
+ * @returns {FeatureFlagScope}
38
57
  */
39
58
  declare function useFeatureFlags(): any;
40
59
  export { FeatureFlags, FeatureFlagContext, useFeatureFlags, useFeatureFlag };