@carbon/ibm-products 2.32.0 → 2.33.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/css/index-full-carbon.css +56 -0
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon.css +56 -0
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +1 -1
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +56 -0
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +1 -1
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/ActionBar/ActionBar.js +8 -1
  14. package/es/components/CreateTearsheet/CreateTearsheetDivider.d.ts +12 -1
  15. package/es/components/CreateTearsheet/CreateTearsheetDivider.js +1 -1
  16. package/es/components/DataSpreadsheet/DataSpreadsheet.js +36 -30
  17. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +49 -2
  18. package/es/components/DataSpreadsheet/hooks/useMoveActiveCell.d.ts +3 -1
  19. package/es/components/DataSpreadsheet/hooks/useMoveActiveCell.js +10 -3
  20. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +5 -5
  21. package/es/components/Datagrid/useRowSize.js +4 -2
  22. package/es/components/DescriptionList/DescriptionList.d.ts +0 -37
  23. package/es/components/DescriptionList/DescriptionList.js +7 -12
  24. package/es/components/DescriptionList/DescriptionListBody.d.ts +2 -0
  25. package/es/components/DescriptionList/DescriptionListBody.js +39 -0
  26. package/es/components/DescriptionList/DescriptionListCell.d.ts +2 -0
  27. package/es/components/DescriptionList/DescriptionListCell.js +39 -0
  28. package/es/components/DescriptionList/DescriptionListRow.d.ts +2 -0
  29. package/es/components/DescriptionList/DescriptionListRow.js +41 -0
  30. package/es/components/DescriptionList/index.d.ts +4 -1
  31. package/es/components/FilterPanel/FilterPanel.d.ts +5 -0
  32. package/es/components/FilterPanel/FilterPanel.js +55 -0
  33. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  34. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +78 -0
  35. package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.d.ts +5 -0
  36. package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +63 -0
  37. package/es/components/FilterPanel/FilterPanelLabel/index.d.ts +1 -0
  38. package/es/components/FilterPanel/index.d.ts +3 -0
  39. package/es/components/SidePanel/SidePanel.js +35 -68
  40. package/es/components/Tearsheet/TearsheetShell.js +9 -1
  41. package/es/components/Toolbar/ToolbarGroup.d.ts +17 -2
  42. package/es/components/Toolbar/ToolbarGroup.js +0 -1
  43. package/es/components/index.d.ts +3 -1
  44. package/es/global/js/hooks/useFocus.js +9 -2
  45. package/es/global/js/package-settings.d.ts +7 -0
  46. package/es/global/js/package-settings.js +7 -0
  47. package/es/index.js +7 -0
  48. package/es/settings.d.ts +7 -0
  49. package/lib/components/ActionBar/ActionBar.js +11 -6
  50. package/lib/components/CreateTearsheet/CreateTearsheetDivider.d.ts +12 -1
  51. package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +1 -1
  52. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +36 -30
  53. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +49 -2
  54. package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.d.ts +3 -1
  55. package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +9 -2
  56. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +5 -5
  57. package/lib/components/Datagrid/useRowSize.js +4 -2
  58. package/lib/components/DescriptionList/DescriptionList.d.ts +0 -37
  59. package/lib/components/DescriptionList/DescriptionList.js +6 -11
  60. package/lib/components/DescriptionList/DescriptionListBody.d.ts +2 -0
  61. package/lib/components/DescriptionList/DescriptionListBody.js +46 -0
  62. package/lib/components/DescriptionList/DescriptionListCell.d.ts +2 -0
  63. package/lib/components/DescriptionList/DescriptionListCell.js +46 -0
  64. package/lib/components/DescriptionList/DescriptionListRow.d.ts +2 -0
  65. package/lib/components/DescriptionList/DescriptionListRow.js +48 -0
  66. package/lib/components/DescriptionList/index.d.ts +4 -1
  67. package/lib/components/FilterPanel/FilterPanel.d.ts +5 -0
  68. package/lib/components/FilterPanel/FilterPanel.js +62 -0
  69. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  70. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +85 -0
  71. package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.d.ts +5 -0
  72. package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +70 -0
  73. package/lib/components/FilterPanel/FilterPanelLabel/index.d.ts +1 -0
  74. package/lib/components/FilterPanel/index.d.ts +3 -0
  75. package/lib/components/SidePanel/SidePanel.js +35 -68
  76. package/lib/components/Tearsheet/TearsheetShell.js +9 -1
  77. package/lib/components/Toolbar/ToolbarGroup.d.ts +17 -2
  78. package/lib/components/Toolbar/ToolbarGroup.js +0 -1
  79. package/lib/components/index.d.ts +3 -1
  80. package/lib/global/js/hooks/useFocus.js +9 -2
  81. package/lib/global/js/package-settings.d.ts +7 -0
  82. package/lib/global/js/package-settings.js +7 -0
  83. package/lib/index.js +35 -0
  84. package/lib/settings.d.ts +7 -0
  85. package/package.json +3 -3
  86. package/scss/components/FilterPanel/_carbon-imports.scss +9 -0
  87. package/scss/components/FilterPanel/_filter-panel-checkbox.scss +32 -0
  88. package/scss/components/FilterPanel/_filter-panel-label.scss +47 -0
  89. package/scss/components/FilterPanel/_filter-panel.scss +29 -0
  90. package/scss/components/FilterPanel/_index-with-carbon.scss +11 -0
  91. package/scss/components/FilterPanel/_index.scss +10 -0
  92. package/scss/components/_index-with-carbon.scss +1 -0
  93. package/scss/components/_index.scss +1 -0
@@ -128,20 +128,24 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
128
128
  _useState18 = _rollupPluginBabelHelpers.slicedToArray(_useState17, 2),
129
129
  headerCellHoldActive = _useState18[0],
130
130
  setHeaderCellHoldActive = _useState18[1];
131
- var _useState19 = React.useState(false),
131
+ var _useState19 = React.useState(null),
132
132
  _useState20 = _rollupPluginBabelHelpers.slicedToArray(_useState19, 2),
133
- activeCellInsideSelectionArea = _useState20[0],
134
- setActiveCellInsideSelectionArea = _useState20[1];
133
+ isActiveHeaderCellChanged = _useState20[0],
134
+ setIsActiveHeaderCellChanged = _useState20[1];
135
+ var _useState21 = React.useState(false),
136
+ _useState22 = _rollupPluginBabelHelpers.slicedToArray(_useState21, 2),
137
+ activeCellInsideSelectionArea = _useState22[0],
138
+ setActiveCellInsideSelectionArea = _useState22[1];
135
139
  var previousState = usePreviousValue.usePreviousValue({
136
140
  activeCellCoordinates: activeCellCoordinates,
137
141
  isEditing: isEditing
138
142
  });
139
143
  var cellSizeValue = getCellSize.getCellSize(cellSize);
140
144
  var cellEditorRef = React.useRef();
141
- var _useState21 = React.useState(),
142
- _useState22 = _rollupPluginBabelHelpers.slicedToArray(_useState21, 2),
143
- activeCellContent = _useState22[0],
144
- setActiveCellContent = _useState22[1];
145
+ var _useState23 = React.useState(),
146
+ _useState24 = _rollupPluginBabelHelpers.slicedToArray(_useState23, 2),
147
+ activeCellContent = _useState24[0],
148
+ setActiveCellContent = _useState24[1];
145
149
  var activeCellRef = React.useRef();
146
150
  var cellEditorRulerRef = React.useRef();
147
151
  var defaultColumn = React.useMemo(function () {
@@ -215,6 +219,9 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
215
219
  }
216
220
  if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' || (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'header') {
217
221
  setActiveCellContent(null);
222
+ setIsActiveHeaderCellChanged(function (prev) {
223
+ return !prev;
224
+ });
218
225
  }
219
226
  }
220
227
  }, [activeCellCoordinates, previousState === null || previousState === void 0 ? void 0 : previousState.activeCellCoordinates, updateData, rows, isEditing, removeCellEditor, activeCellContent]);
@@ -225,23 +232,19 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
225
232
  addToHeader = _ref2$addToHeader === void 0 ? false : _ref2$addToHeader;
226
233
  var activeCellFullData = typeof (coords === null || coords === void 0 ? void 0 : coords.column) === 'number' && typeof (coords === null || coords === void 0 ? void 0 : coords.row) === 'number' ? rows[coords === null || coords === void 0 ? void 0 : coords.row].cells[coords === null || coords === void 0 ? void 0 : coords.column] : null;
227
234
  var activeCellValue = activeCellFullData ? Object.values(activeCellFullData.row.values)[coords === null || coords === void 0 ? void 0 : coords.column] : null;
228
- var prevCoords = previousState === null || previousState === void 0 ? void 0 : previousState.activeCellCoordinates;
229
- // Only create an active cell if the activeCellCoordinates have changed
230
- if ((prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row) !== (coords === null || coords === void 0 ? void 0 : coords.row) || (prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.column) !== (coords === null || coords === void 0 ? void 0 : coords.column)) {
231
- createActiveCellFn.createActiveCellFn({
232
- placementElement: placementElement,
233
- coords: coords,
234
- addToHeader: addToHeader,
235
- contextRef: spreadsheetRef,
236
- blockClass: blockClass,
237
- onActiveCellChange: onActiveCellChange,
238
- activeCellValue: activeCellValue,
239
- activeCellRef: activeCellRef,
240
- cellEditorRef: cellEditorRef,
241
- defaultColumn: defaultColumn
242
- });
243
- }
244
- }, [spreadsheetRef, rows, onActiveCellChange, previousState === null || previousState === void 0 ? void 0 : previousState.activeCellCoordinates, defaultColumn]);
235
+ createActiveCellFn.createActiveCellFn({
236
+ placementElement: placementElement,
237
+ coords: coords,
238
+ addToHeader: addToHeader,
239
+ contextRef: spreadsheetRef,
240
+ blockClass: blockClass,
241
+ onActiveCellChange: onActiveCellChange,
242
+ activeCellValue: activeCellValue,
243
+ activeCellRef: activeCellRef,
244
+ cellEditorRef: cellEditorRef,
245
+ defaultColumn: defaultColumn
246
+ });
247
+ }, [spreadsheetRef, rows, onActiveCellChange, defaultColumn]);
245
248
  useResetSpreadsheetFocus.useResetSpreadsheetFocus({
246
249
  focusedElement: focusedElement,
247
250
  removeActiveCell: removeActiveCell,
@@ -260,7 +263,9 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
260
263
  spreadsheetRef: spreadsheetRef,
261
264
  activeCellCoordinates: activeCellCoordinates,
262
265
  containerHasFocus: containerHasFocus,
263
- createActiveCell: createActiveCell
266
+ createActiveCell: createActiveCell,
267
+ activeCellContent: activeCellContent,
268
+ isActiveHeaderCellChanged: isActiveHeaderCellChanged
264
269
  });
265
270
  var handleInitialArrowPress = React.useCallback(function () {
266
271
  // If activeCellCoordinates is null then we need to set an initial value
@@ -308,10 +313,10 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
308
313
  spreadsheetRef: spreadsheetRef
309
314
  });
310
315
  }, [activeCellCoordinates, updateActiveCellCoordinates, spreadsheetRef, columns.length]);
311
- var checkforReturnConditon = React.useCallback(function (key) {
316
+ var checkForReturnCondition = React.useCallback(function (key) {
312
317
  return isEditing || key === 'Meta' || key === 'Control';
313
318
  }, [isEditing]);
314
- var handleArrowkeyPress = React.useCallback(function (arrowKey) {
319
+ var handleArrowKeyPress = React.useCallback(function (arrowKey) {
315
320
  event.preventDefault();
316
321
  handleInitialArrowPress();
317
322
  var coordinatesClone = _rollupPluginBabelHelpers.objectSpread2({}, activeCellCoordinates);
@@ -412,7 +417,7 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
412
417
  var key = event.key;
413
418
  // Command keys need to be returned as there is default browser behavior with these keys
414
419
  // Needs to be returned in editing mode
415
- if (checkforReturnConditon(key)) {
420
+ if (checkForReturnCondition(key)) {
416
421
  return;
417
422
  }
418
423
 
@@ -515,11 +520,11 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
515
520
  case 'ArrowRight':
516
521
  case 'ArrowDown':
517
522
  {
518
- handleArrowkeyPress(key);
523
+ handleArrowKeyPress(key);
519
524
  }
520
525
  }
521
526
  }
522
- }, [activeCellInsideSelectionArea, updateActiveCellCoordinates, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData, checkforReturnConditon, handleArrowkeyPress]);
527
+ }, [activeCellInsideSelectionArea, updateActiveCellCoordinates, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData, checkForReturnCondition, handleArrowKeyPress]);
523
528
  var startEditMode = function startEditMode() {
524
529
  setIsEditing(true);
525
530
  setClickAndHoldActive(false);
@@ -718,6 +723,7 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
718
723
  visibleColumns: visibleColumns,
719
724
  selectAllAriaLabel: selectAllAriaLabel
720
725
  }), /*#__PURE__*/React__default["default"].createElement(DataSpreadsheetBody.DataSpreadsheetBody, {
726
+ activeCellRef: activeCellRef,
721
727
  activeCellCoordinates: activeCellCoordinates,
722
728
  ref: spreadsheetRef,
723
729
  clickAndHoldActive: clickAndHoldActive,
@@ -36,7 +36,8 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
36
36
  var _div;
37
37
  var blockClass = "".concat(settings.pkg.prefix, "--data-spreadsheet");
38
38
  var DataSpreadsheetBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
39
- var columns = _ref.columns,
39
+ var activeCellRef = _ref.activeCellRef,
40
+ columns = _ref.columns,
40
41
  activeCellCoordinates = _ref.activeCellCoordinates,
41
42
  defaultColumn = _ref.defaultColumn,
42
43
  defaultEmptyRowCount = _ref.defaultEmptyRowCount,
@@ -205,6 +206,47 @@ var DataSpreadsheetBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
205
206
  }
206
207
  }
207
208
  }, [defaultColumn, ref, activeCellCoordinates, previousState === null || previousState === void 0 ? void 0 : previousState.rowHeight, selectionAreas, setActiveCellInsideSelectionArea, setSelectionAreas, visibleColumns]);
209
+ //selectionAreas will be set when ever a selection area is made.
210
+ React.useEffect(function () {
211
+ removeDuplicateSelections();
212
+ }, [selectionAreas, removeDuplicateSelections]);
213
+
214
+ //this method will check for any duplicate selection area and remove.
215
+ //same selections are those have the same height, width, top, left styles. These inline styles are being set in createCellSelection util.
216
+ var removeDuplicateSelections = React.useCallback(function () {
217
+ var uniqueAttrArray = [],
218
+ removedSelectionAreaMatcherArr = [];
219
+ ref.current.querySelectorAll(".".concat(blockClass, "__selection-area--element")).forEach(function (selectorEl) {
220
+ var _selectorEl$style = selectorEl.style,
221
+ top = _selectorEl$style.top,
222
+ left = _selectorEl$style.left,
223
+ height = _selectorEl$style.height,
224
+ width = _selectorEl$style.width;
225
+ var uniqueAttrStr = "".concat(top).concat(left).concat(height).concat(width); // eg: 20px30px70px90px
226
+ if (uniqueAttrArray.indexOf(uniqueAttrStr) == -1) {
227
+ uniqueAttrArray.push(uniqueAttrStr);
228
+ } else {
229
+ selectorEl.remove(); // this is identified as duplicate selection and hence removing.
230
+ removedSelectionAreaMatcherArr.push(selectorEl.getAttribute('data-matcher-id'));
231
+ }
232
+ });
233
+
234
+ //clean the duplicate selectionAreaData and selectionArea
235
+ if (removedSelectionAreaMatcherArr.length) {
236
+ setSelectionAreas(function (prev) {
237
+ var prevValues = deepCloneObject.deepCloneObject(prev);
238
+ return prevValues.filter(function (item) {
239
+ return !removedSelectionAreaMatcherArr.includes(item.matcher);
240
+ });
241
+ });
242
+ setSelectionAreaData(function (prev) {
243
+ var prevValues = deepCloneObject.deepCloneObject(prev);
244
+ return prevValues.filter(function (item) {
245
+ return !removedSelectionAreaMatcherArr.includes(item.selectionId);
246
+ });
247
+ });
248
+ }
249
+ }, [ref, setSelectionAreas, setSelectionAreaData]);
208
250
 
209
251
  // onClick fn for each cell in the data spreadsheet body,
210
252
  // adds the active cell highlight
@@ -259,6 +301,7 @@ var DataSpreadsheetBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
259
301
  setSelectionAreas(selectionAreaClone);
260
302
  }
261
303
  } else {
304
+ activeCellRef.current.style.display = 'none';
262
305
  setActiveCellInsideSelectionArea(false);
263
306
  setActiveCellCoordinates(activeCoordinates);
264
307
  // remove all previous cell selections
@@ -273,7 +316,7 @@ var DataSpreadsheetBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
273
316
  setSelectionAreaData([]);
274
317
  }
275
318
  };
276
- }, [currentMatcher, activeCellCoordinates, selectionAreas, setActiveCellCoordinates, setSelectionAreas, setContainerHasFocus, setClickAndHoldActive, setCurrentMatcher, ref, setSelectionAreaData, setActiveCellInsideSelectionArea]);
319
+ }, [currentMatcher, activeCellCoordinates, selectionAreas, setActiveCellCoordinates, setSelectionAreas, setContainerHasFocus, setClickAndHoldActive, setCurrentMatcher, ref, setSelectionAreaData, setActiveCellInsideSelectionArea, activeCellRef]);
277
320
  var handleBodyScroll = function handleBodyScroll() {
278
321
  var headerRowElement = ref.current.querySelector("\n .".concat(blockClass, "__header--container .").concat(blockClass, "__tr"));
279
322
  headerRowElement.scrollLeft = contentScrollRef.current.scrollLeft;
@@ -437,6 +480,10 @@ DataSpreadsheetBody.propTypes = {
437
480
  row: index["default"].oneOfType([index["default"].string, index["default"].number]),
438
481
  column: index["default"].oneOfType([index["default"].string, index["default"].number])
439
482
  }),
483
+ /**
484
+ *This is the ref of the button input, which is the active cell element
485
+ */
486
+ activeCellRef: index["default"].object,
440
487
  /**
441
488
  * Is the user clicking and holding in the data spreadsheet body
442
489
  */
@@ -1,6 +1,8 @@
1
- export function useMoveActiveCell({ spreadsheetRef, activeCellCoordinates, containerHasFocus, createActiveCell, }: {
1
+ export function useMoveActiveCell({ spreadsheetRef, activeCellCoordinates, containerHasFocus, createActiveCell, activeCellContent, isActiveHeaderCellChanged, }: {
2
2
  spreadsheetRef: any;
3
3
  activeCellCoordinates: any;
4
4
  containerHasFocus: any;
5
5
  createActiveCell: any;
6
+ activeCellContent: any;
7
+ isActiveHeaderCellChanged: any;
6
8
  }): void;
@@ -16,8 +16,15 @@ var useMoveActiveCell = function useMoveActiveCell(_ref) {
16
16
  var spreadsheetRef = _ref.spreadsheetRef,
17
17
  activeCellCoordinates = _ref.activeCellCoordinates,
18
18
  containerHasFocus = _ref.containerHasFocus,
19
- createActiveCell = _ref.createActiveCell;
19
+ createActiveCell = _ref.createActiveCell,
20
+ activeCellContent = _ref.activeCellContent,
21
+ isActiveHeaderCellChanged = _ref.isActiveHeaderCellChanged;
22
+ //new active cell is created when the activeCellContent changes or navigate through headers
23
+ // Otherwise new active cell will display the old value in a glance
20
24
  React.useEffect(function () {
25
+ performCreateActiveCell();
26
+ }, [activeCellContent, performCreateActiveCell, isActiveHeaderCellChanged]);
27
+ var performCreateActiveCell = React.useCallback(function () {
21
28
  var activeCellPlacementElement = spreadsheetRef === null || spreadsheetRef === void 0 ? void 0 : spreadsheetRef.current.querySelector("[data-row-index=\"".concat(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, "\"][data-column-index=\"").concat(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column, "\"]"));
22
29
  var shouldPlaceActiveCellInHeader = (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' && true;
23
30
  var selectAllElement = spreadsheetRef === null || spreadsheetRef === void 0 ? void 0 : spreadsheetRef.current.querySelector("[data-row-index=\"header\"][data-column-index=\"header\"]");
@@ -28,7 +35,7 @@ var useMoveActiveCell = function useMoveActiveCell(_ref) {
28
35
  addToHeader: shouldPlaceActiveCellInHeader
29
36
  });
30
37
  }
31
- }, [activeCellCoordinates, spreadsheetRef, createActiveCell, containerHasFocus]);
38
+ }, [spreadsheetRef, activeCellCoordinates, containerHasFocus, createActiveCell]);
32
39
  };
33
40
 
34
41
  exports.useMoveActiveCell = useMoveActiveCell;
@@ -24,7 +24,6 @@ var blockClass = "".concat(settings.pkg.prefix, "--datagrid__row-size");
24
24
  var RowSizeRadioGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
25
25
  var rowSizes = _ref.rowSizes,
26
26
  selectedOption = _ref.selectedOption,
27
- datagridName = _ref.datagridName,
28
27
  onChange = _ref.onChange,
29
28
  legendText = _ref.legendText,
30
29
  _ref$rowSizeLabels = _ref.rowSizeLabels,
@@ -34,7 +33,8 @@ var RowSizeRadioGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
34
33
  md: 'Medium',
35
34
  sm: 'Small',
36
35
  xs: 'Extra small'
37
- } : _ref$rowSizeLabels;
36
+ } : _ref$rowSizeLabels,
37
+ tableId = _ref.tableId;
38
38
  return /*#__PURE__*/React__default["default"].createElement("div", {
39
39
  className: "".concat(blockClass, "-dropdown"),
40
40
  role: "presentation",
@@ -57,7 +57,7 @@ var RowSizeRadioGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
57
57
  key: option.value,
58
58
  labelText: labelText,
59
59
  value: option.value,
60
- id: "".concat(datagridName || 'datagrid', "--row-density--").concat(option.value)
60
+ id: "".concat(tableId || 'datagrid', "--row-density--").concat(option.value)
61
61
  });
62
62
  })));
63
63
  });
@@ -87,12 +87,12 @@ RowSizeRadioGroup.defaultProps = {
87
87
  selectedOption: 'lg'
88
88
  };
89
89
  RowSizeRadioGroup.propTypes = {
90
- datagridName: index["default"].string,
91
90
  legendText: index["default"].string,
92
91
  onChange: index["default"].func.isRequired,
93
92
  rowSizeLabels: index["default"].object,
94
93
  rowSizes: index["default"].array.isRequired,
95
- selectedOption: index["default"].string.isRequired
94
+ selectedOption: index["default"].string.isRequired,
95
+ tableId: index["default"].string.isRequired
96
96
  };
97
97
  var RowSizeRadioGroup$1 = RowSizeRadioGroup;
98
98
 
@@ -22,7 +22,8 @@ var useRowSize = function useRowSize(hooks) {
22
22
  var rowSizeProps = instance.rowSizeProps,
23
23
  rowSizes = instance.rowSizes,
24
24
  rowSize = instance.rowSize,
25
- onRowSizeChange = instance.onRowSizeChange;
25
+ onRowSizeChange = instance.onRowSizeChange,
26
+ tableId = instance.tableId;
26
27
  var _ref = rowSizeProps || {},
27
28
  labels = _ref.labels;
28
29
  Object.assign(instance, {
@@ -36,7 +37,8 @@ var useRowSize = function useRowSize(hooks) {
36
37
  if (typeof onRowSizeChange === 'function') {
37
38
  onRowSizeChange(value);
38
39
  }
39
- }
40
+ },
41
+ tableId: tableId
40
42
  }),
41
43
  RowSizeDropdown: RowSizeDropdown["default"]
42
44
  });
@@ -2,41 +2,4 @@
2
2
  * Type layouts provide an orderly layout of terms and definitions.
3
3
  */
4
4
  export let DescriptionList: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- export function DescriptionListBody({ children, className, ...rest }: {
6
- [x: string]: any;
7
- children: any;
8
- className: any;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export namespace DescriptionListBody {
11
- export namespace propTypes {
12
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
- let className: PropTypes.Requireable<string>;
14
- }
15
- export { componentNameBody as displayName };
16
- }
17
- export function DescriptionListRow({ children, className, ...other }: {
18
- [x: string]: any;
19
- children: any;
20
- className: any;
21
- }): import("react/jsx-runtime").JSX.Element;
22
- export namespace DescriptionListRow {
23
- export namespace propTypes_1 { }
24
- export { propTypes_1 as propTypes };
25
- export { componentNameRow as displayName };
26
- }
27
- export function DescriptionListCell({ children, className, ...rest }: {
28
- [x: string]: any;
29
- children: any;
30
- className: any;
31
- }): import("react/jsx-runtime").JSX.Element;
32
- export namespace DescriptionListCell {
33
- export namespace propTypes_2 { }
34
- export { propTypes_2 as propTypes };
35
- export { componentNameCell as displayName };
36
- }
37
5
  import React from 'react';
38
- import PropTypes from 'prop-types';
39
- declare const componentNameBody: "DescriptionListBody";
40
- declare const componentNameRow: "DescriptionListRow";
41
- declare const componentNameCell: "DescriptionListCell";
42
- export {};
@@ -74,22 +74,17 @@ exports.DescriptionList = settings.pkg.checkComponentEnabled(exports.Description
74
74
  // The display name of the component, used by React. Note that displayName
75
75
  // is used in preference to relying on function.name.
76
76
  exports.DescriptionList.displayName = componentName;
77
- var propTypes = {
78
- /** Provide the contents of the node */
79
- children: index["default"].node,
80
- /** Provide an optional class to be applied to the containing node */
81
- className: index["default"].string
82
- };
83
77
 
84
78
  // The types and DocGen commentary for the component props,
85
79
  // in alphabetical order (for consistency).
86
80
  // See https://www.npmjs.com/package/prop-types#usage.
87
- exports.DescriptionList.propTypes = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, propTypes), {}, {
81
+ exports.DescriptionList.propTypes = {
88
82
  /** Specify if the type layout has a border */
89
83
  border: index["default"].bool,
84
+ /** Provide the contents of the node */
85
+ children: index["default"].node,
86
+ /** Provide an optional class to be applied to the containing node */
87
+ className: index["default"].string,
90
88
  /** Specify the size of the type layout, from a list of available sizes */
91
89
  size: index["default"].oneOf(Object.values(constants.DescriptionListSize))
92
- });
93
- _rollupPluginBabelHelpers.objectSpread2({}, propTypes);
94
- _rollupPluginBabelHelpers.objectSpread2({}, propTypes);
95
- _rollupPluginBabelHelpers.objectSpread2({}, propTypes);
90
+ };
@@ -0,0 +1,2 @@
1
+ export let DescriptionListBody: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
+ import React from 'react';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var devtools = require('../../global/js/utils/devtools.js');
17
+ var settings = require('../../settings.js');
18
+ var react = require('@carbon/react');
19
+
20
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
+
22
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
24
+
25
+ var _excluded = ["children", "className"];
26
+
27
+ // The block part of our conventional BEM class names (blockClass__E--M).
28
+ var blockClass = "".concat(settings.pkg.prefix, "--description-list__body");
29
+ var componentName = 'DescriptionListBody';
30
+ exports.DescriptionListBody = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
31
+ var children = _ref.children,
32
+ className = _ref.className,
33
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
34
+ return /*#__PURE__*/React__default["default"].createElement(react.StructuredListBody, _rollupPluginBabelHelpers["extends"]({
35
+ className: cx__default["default"](blockClass, className),
36
+ ref: ref
37
+ }, devtools.getDevtoolsProps(componentName), rest), children);
38
+ });
39
+ exports.DescriptionListBody.propTypes = {
40
+ /** Provide the contents of the node */
41
+ children: index["default"].node,
42
+ /** Provide an optional class to be applied to the containing node */
43
+ className: index["default"].string
44
+ };
45
+ exports.DescriptionListBody = settings.pkg.checkComponentEnabled(exports.DescriptionListBody, componentName);
46
+ exports.DescriptionListBody.displayName = componentName;
@@ -0,0 +1,2 @@
1
+ export let DescriptionListCell: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
+ import React from 'react';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var devtools = require('../../global/js/utils/devtools.js');
17
+ var settings = require('../../settings.js');
18
+ var react = require('@carbon/react');
19
+
20
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
+
22
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
24
+
25
+ var _excluded = ["children", "className"];
26
+
27
+ // The block part of our conventional BEM class names (blockClass__E--M).
28
+ var blockClass = "".concat(settings.pkg.prefix, "--description-list__cell");
29
+ var componentName = 'DescriptionListCell';
30
+ exports.DescriptionListCell = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
31
+ var children = _ref.children,
32
+ className = _ref.className,
33
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
34
+ return /*#__PURE__*/React__default["default"].createElement(react.StructuredListCell, _rollupPluginBabelHelpers["extends"]({
35
+ className: cx__default["default"](blockClass, className),
36
+ ref: ref
37
+ }, devtools.getDevtoolsProps(componentName), rest), children);
38
+ });
39
+ exports.DescriptionListCell.propTypes = {
40
+ /** Provide the contents of the node */
41
+ children: index["default"].node,
42
+ /** Provide an optional class to be applied to the containing node */
43
+ className: index["default"].string
44
+ };
45
+ exports.DescriptionListCell = settings.pkg.checkComponentEnabled(exports.DescriptionListCell, componentName);
46
+ exports.DescriptionListCell.displayName = componentName;
@@ -0,0 +1,2 @@
1
+ export let DescriptionListRow: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
+ import React from 'react';
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var devtools = require('../../global/js/utils/devtools.js');
17
+ var settings = require('../../settings.js');
18
+ var react = require('@carbon/react');
19
+
20
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
+
22
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
24
+
25
+ var _excluded = ["children", "className"];
26
+
27
+ // The block part of our conventional BEM class names (blockClass__E--M).
28
+ var blockClass = "".concat(settings.pkg.prefix, "--description-list__row");
29
+ var componentName = 'DescriptionListRow';
30
+ exports.DescriptionListRow = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
31
+ var children = _ref.children,
32
+ className = _ref.className,
33
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
34
+ return /*#__PURE__*/React__default["default"].createElement(react.StructuredListRow, _rollupPluginBabelHelpers["extends"]({
35
+ className: cx__default["default"](blockClass, className)
36
+ // role="row"
37
+ ,
38
+ ref: ref
39
+ }, devtools.getDevtoolsProps(componentName), rest), children);
40
+ });
41
+ exports.DescriptionListRow.propTypes = {
42
+ /** Provide the contents of the node */
43
+ children: index["default"].node,
44
+ /** Provide an optional class to be applied to the containing node */
45
+ className: index["default"].string
46
+ };
47
+ exports.DescriptionListRow = settings.pkg.checkComponentEnabled(exports.DescriptionListRow, componentName);
48
+ exports.DescriptionListRow.displayName = componentName;
@@ -1 +1,4 @@
1
- export { DescriptionList, DescriptionListBody, DescriptionListRow, DescriptionListCell } from "./DescriptionList";
1
+ export { DescriptionList } from "./DescriptionList";
2
+ export { DescriptionListBody } from "./DescriptionListBody";
3
+ export { DescriptionListCell } from "./DescriptionListCell";
4
+ export { DescriptionListRow } from "./DescriptionListRow";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The container for filter panel subcomponents.
3
+ */
4
+ export let FilterPanel: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var devtools = require('../../global/js/utils/devtools.js');
17
+ var settings = require('../../settings.js');
18
+
19
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
+
21
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
22
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
23
+
24
+ var _excluded = ["children", "className", "title"];
25
+
26
+ // The block part of our conventional BEM class names (blockClass__E--M).
27
+ var blockClass = "".concat(settings.pkg.prefix, "--filter-panel");
28
+ var componentName = 'FilterPanel';
29
+
30
+ /**
31
+ * The container for filter panel subcomponents.
32
+ */
33
+ exports.FilterPanel = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
34
+ var children = _ref.children,
35
+ className = _ref.className,
36
+ title = _ref.title,
37
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
38
+ return /*#__PURE__*/React__default["default"].createElement("section", _rollupPluginBabelHelpers["extends"]({}, rest, {
39
+ className: cx__default["default"](blockClass, className),
40
+ ref: ref
41
+ }, devtools.getDevtoolsProps(componentName)), title && /*#__PURE__*/React__default["default"].createElement("h1", {
42
+ className: "".concat(blockClass, "__title")
43
+ }, title), children);
44
+ });
45
+
46
+ // Return a placeholder if not released and not enabled by feature flag
47
+ exports.FilterPanel = settings.pkg.checkComponentEnabled(exports.FilterPanel, componentName);
48
+ exports.FilterPanel.displayName = componentName;
49
+ exports.FilterPanel.propTypes = {
50
+ /**
51
+ * Provide the contents of the FilterPanel.
52
+ */
53
+ children: index["default"].node,
54
+ /**
55
+ * Provide an optional class to be applied to the containing node.
56
+ */
57
+ className: index["default"].string,
58
+ /**
59
+ * Title text for the filter panel.
60
+ */
61
+ title: index["default"].node
62
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Provides a checkbox, label, and count.
3
+ */
4
+ export let FilterPanelCheckbox: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';