@carbon/ibm-products 2.19.2 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. package/css/index-full-carbon.css +147 -111
  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-released-only.css +28 -20
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +28 -20
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +51 -22
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/ActionSet/ActionSet.js +3 -4
  18. package/es/components/AddSelect/AddSelectBody.js +2 -2
  19. package/es/components/AddSelect/AddSelectRow.js +2 -2
  20. package/es/components/Card/Card.js +1 -2
  21. package/es/components/Card/CardHeader.js +1 -2
  22. package/es/components/CreateFullPage/CreateFullPageStep.js +1 -2
  23. package/es/components/CreateTearsheet/CreateTearsheetStep.js +1 -2
  24. package/es/components/DataSpreadsheet/DataSpreadsheet.js +1 -2
  25. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +1 -2
  26. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +1 -2
  27. package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -7
  28. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -11
  29. package/es/components/Datagrid/Datagrid/DatagridRow.js +9 -10
  30. package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -2
  31. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +61 -11
  32. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +28 -14
  33. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
  34. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
  35. package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +63 -41
  36. package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -5
  37. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  38. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +2 -2
  39. package/es/components/Datagrid/useActionsColumn.js +1 -2
  40. package/es/components/Datagrid/useDefaultStringRenderer.js +1 -2
  41. package/es/components/Datagrid/useFiltering.js +1 -0
  42. package/es/components/Datagrid/useNestedRowExpander.js +1 -2
  43. package/es/components/Datagrid/useNestedRows.js +49 -33
  44. package/es/components/Datagrid/useOnRowClick.js +1 -1
  45. package/es/components/Datagrid/useSelectRows.js +1 -2
  46. package/es/components/Datagrid/useSortableColumns.js +1 -2
  47. package/es/components/Datagrid/useStickyColumn.js +3 -4
  48. package/es/components/Datagrid/utils/filterPropsForTesting.js +149 -0
  49. package/es/components/EditInPlace/EditInPlace.js +1 -2
  50. package/es/components/EditTearsheet/EditTearsheetForm.js +1 -2
  51. package/es/components/FilterSummary/FilterSummary.js +15 -12
  52. package/es/components/NotificationsPanel/NotificationsPanel.js +2 -3
  53. package/es/components/PageHeader/PageHeader.js +9 -11
  54. package/es/components/Saving/Saving.js +6 -6
  55. package/es/components/SidePanel/SidePanel.js +12 -7
  56. package/es/components/TagSet/TagSetOverflow.js +1 -2
  57. package/es/components/Tearsheet/Tearsheet.js +5 -0
  58. package/es/components/Tearsheet/TearsheetNarrow.js +5 -0
  59. package/es/components/Tearsheet/TearsheetShell.js +10 -10
  60. package/es/components/WebTerminal/WebTerminal.js +1 -2
  61. package/lib/components/ActionSet/ActionSet.js +3 -4
  62. package/lib/components/AddSelect/AddSelectBody.js +2 -2
  63. package/lib/components/AddSelect/AddSelectRow.js +2 -2
  64. package/lib/components/Card/Card.js +1 -2
  65. package/lib/components/Card/CardHeader.js +1 -2
  66. package/lib/components/CreateFullPage/CreateFullPageStep.js +1 -2
  67. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +1 -2
  68. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +1 -2
  69. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +1 -2
  70. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +1 -2
  71. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -7
  72. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -11
  73. package/lib/components/Datagrid/Datagrid/DatagridRow.js +9 -10
  74. package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -2
  75. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +60 -10
  76. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +27 -13
  77. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
  78. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
  79. package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +63 -41
  80. package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -5
  81. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  82. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +2 -2
  83. package/lib/components/Datagrid/useActionsColumn.js +1 -2
  84. package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -2
  85. package/lib/components/Datagrid/useFiltering.js +1 -0
  86. package/lib/components/Datagrid/useNestedRowExpander.js +1 -2
  87. package/lib/components/Datagrid/useNestedRows.js +49 -33
  88. package/lib/components/Datagrid/useOnRowClick.js +1 -1
  89. package/lib/components/Datagrid/useSelectRows.js +1 -2
  90. package/lib/components/Datagrid/useSortableColumns.js +1 -2
  91. package/lib/components/Datagrid/useStickyColumn.js +3 -4
  92. package/lib/components/Datagrid/utils/filterPropsForTesting.js +156 -0
  93. package/lib/components/EditInPlace/EditInPlace.js +1 -2
  94. package/lib/components/EditTearsheet/EditTearsheetForm.js +1 -2
  95. package/lib/components/FilterSummary/FilterSummary.js +15 -12
  96. package/lib/components/NotificationsPanel/NotificationsPanel.js +2 -3
  97. package/lib/components/PageHeader/PageHeader.js +9 -11
  98. package/lib/components/Saving/Saving.js +6 -6
  99. package/lib/components/SidePanel/SidePanel.js +12 -7
  100. package/lib/components/TagSet/TagSetOverflow.js +1 -2
  101. package/lib/components/Tearsheet/Tearsheet.js +5 -0
  102. package/lib/components/Tearsheet/TearsheetNarrow.js +5 -0
  103. package/lib/components/Tearsheet/TearsheetShell.js +10 -10
  104. package/lib/components/WebTerminal/WebTerminal.js +1 -2
  105. package/package.json +4 -4
  106. package/scss/components/Datagrid/styles/_datagrid.scss +8 -0
  107. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +11 -8
  108. package/scss/components/Saving/_saving.scss +6 -0
  109. package/scss/components/SidePanel/_side-panel.scss +9 -3
  110. package/scss/components/TagSet/_tag-set.scss +4 -1
@@ -12,7 +12,6 @@ import PropTypes from 'prop-types';
12
12
  import { pkg } from '../../../../../../settings';
13
13
  var blockClass = "".concat(pkg.prefix, "--datagrid");
14
14
  export var InlineEditButton = function InlineEditButton(_ref) {
15
- var _cx, _cx2;
16
15
  var label = _ref.label,
17
16
  Icon = _ref.renderIcon,
18
17
  disabled = _ref.disabled,
@@ -23,7 +22,7 @@ export var InlineEditButton = function InlineEditButton(_ref) {
23
22
  columnConfig = _ref.columnConfig,
24
23
  type = _ref.type;
25
24
  return /*#__PURE__*/React.createElement("div", {
26
- className: cx("".concat(blockClass, "__inline-edit-button"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--disabled"), disabled || nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--with-label-icon"), LabelIcon), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--non-edit"), nonEditCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--active"), isActiveCell), _defineProperty(_cx, "".concat(blockClass, "__inline-edit-button--").concat(type), type === 'date' || type === 'selection'), _cx)),
25
+ className: cx("".concat(blockClass, "__inline-edit-button"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__inline-edit-button--disabled"), disabled || nonEditCell), "".concat(blockClass, "__inline-edit-button--with-label-icon"), LabelIcon), "".concat(blockClass, "__inline-edit-button--non-edit"), nonEditCell), "".concat(blockClass, "__inline-edit-button--active"), isActiveCell), "".concat(blockClass, "__inline-edit-button--").concat(type), type === 'date' || type === 'selection')),
27
26
  tabIndex: isActiveCell ? 0 : -1,
28
27
  "data-disabled": disabled || nonEditCell,
29
28
  "aria-disabled": disabled || nonEditCell,
@@ -32,7 +31,7 @@ export var InlineEditButton = function InlineEditButton(_ref) {
32
31
  }, LabelIcon && /*#__PURE__*/React.createElement("div", {
33
32
  className: "".concat(blockClass, "__label-icon")
34
33
  }, /*#__PURE__*/React.createElement(LabelIcon, null)), label !== '' ? /*#__PURE__*/React.createElement("span", {
35
- className: cx("".concat(blockClass, "__inline-edit-button-label"), (_cx2 = {}, _defineProperty(_cx2, "".concat(blockClass, "__inline-edit-button-label-with-icon"), !nonEditCell), _defineProperty(_cx2, "".concat(blockClass, "__defaultStringRenderer--multiline"), columnConfig === null || columnConfig === void 0 ? void 0 : columnConfig.multiLineWrap), _cx2))
34
+ className: cx("".concat(blockClass, "__inline-edit-button-label"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__inline-edit-button-label-with-icon"), !nonEditCell), "".concat(blockClass, "__defaultStringRenderer--multiline"), columnConfig === null || columnConfig === void 0 ? void 0 : columnConfig.multiLineWrap))
36
35
  }, label) : /*#__PURE__*/React.createElement("span", {
37
36
  className: "".concat(blockClass, "__placeholder")
38
37
  }, placeholder), !nonEditCell && Icon && /*#__PURE__*/React.createElement("div", {
@@ -23,7 +23,7 @@ import { usePreviousValue } from '../../../../../../global/js/hooks';
23
23
  import { prepareProps } from '../../../../../../global/js/utils/props-helper';
24
24
  var blockClass = "".concat(pkg.prefix, "--datagrid");
25
25
  export var InlineEditCell = function InlineEditCell(_ref) {
26
- var _config$validator, _cx3, _value$text;
26
+ var _config$validator, _value$text;
27
27
  var cell = _ref.cell,
28
28
  config = _ref.config,
29
29
  instance = _ref.instance,
@@ -438,7 +438,7 @@ export var InlineEditCell = function InlineEditCell(_ref) {
438
438
  "data-inline-type": type,
439
439
  onClick: !nonEditCell ? handleInlineCellClick : addActiveState,
440
440
  onKeyDown: !nonEditCell ? handleKeyDown : null,
441
- className: cx("".concat(blockClass, "__inline-edit--outer-cell-button"), (_cx3 = {}, _defineProperty(_cx3, "".concat(blockClass, "__inline-edit--outer-cell-button--").concat(rowSize), rowSize), _defineProperty(_cx3, "".concat(blockClass, "__inline-edit--outer-cell-button--lg"), !rowSize), _defineProperty(_cx3, "".concat(blockClass, "__inline-edit--outer-cell-button--invalid"), config === null || config === void 0 || (_config$validator = config.validator) === null || _config$validator === void 0 ? void 0 : _config$validator.call(config, cellValue)), _cx3))
441
+ className: cx("".concat(blockClass, "__inline-edit--outer-cell-button"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__inline-edit--outer-cell-button--").concat(rowSize), rowSize), "".concat(blockClass, "__inline-edit--outer-cell-button--lg"), !rowSize), "".concat(blockClass, "__inline-edit--outer-cell-button--invalid"), config === null || config === void 0 || (_config$validator = config.validator) === null || _config$validator === void 0 ? void 0 : _config$validator.call(config, cellValue)))
442
442
  }, !inEditMode && /*#__PURE__*/React.createElement(InlineEditButton, {
443
443
  isActiveCell: cellId === activeCellId,
444
444
  renderIcon: setRenderIcon(),
@@ -37,7 +37,6 @@ var useActionsColumn = function useActionsColumn(hooks) {
37
37
  var row = cell.row,
38
38
  column = cell.column;
39
39
  if (column.isAction) {
40
- var _cx3;
41
40
  var isColumnSticky = !!column.sticky;
42
41
  return [props, {
43
42
  children: /*#__PURE__*/React.createElement("div", {
@@ -109,7 +108,7 @@ var useActionsColumn = function useActionsColumn(hooks) {
109
108
  key: id
110
109
  }));
111
110
  })))),
112
- className: cx((_cx3 = {}, _defineProperty(_cx3, "".concat(blockClass, "__actions-column-cell"), true), _defineProperty(_cx3, "".concat(blockClass, "__cell"), true), _defineProperty(_cx3, "".concat(blockClass, "__actions-column-cell-non-sticky"), !isColumnSticky), _cx3)),
111
+ className: cx(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__actions-column-cell"), true), "".concat(blockClass, "__cell"), true), "".concat(blockClass, "__actions-column-cell-non-sticky"), !isColumnSticky)),
113
112
  style: {
114
113
  width: rowActions.length > 2 || isColumnSticky ? 48 : 96
115
114
  }
@@ -17,8 +17,7 @@ var useDefaultStringRenderer = function useDefaultStringRenderer(hooks) {
17
17
  var StringRenderer = function StringRenderer(tableProps) {
18
18
  var _tableProps$column;
19
19
  return /*#__PURE__*/React.createElement("div", {
20
- className: cx("".concat(blockClass, "__defaultStringRenderer"), _defineProperty({}, "".concat(blockClass, "__defaultStringRenderer--multiline"), ((_tableProps$column = tableProps.column) === null || _tableProps$column === void 0 ? void 0 : _tableProps$column.multiLineWrap) || (tableProps === null || tableProps === void 0 ? void 0 : tableProps.multiLineWrapAll))),
21
- title: tableProps.value
20
+ className: cx("".concat(blockClass, "__defaultStringRenderer"), _defineProperty({}, "".concat(blockClass, "__defaultStringRenderer--multiline"), ((_tableProps$column = tableProps.column) === null || _tableProps$column === void 0 ? void 0 : _tableProps$column.multiLineWrap) || (tableProps === null || tableProps === void 0 ? void 0 : tableProps.multiLineWrapAll)))
22
21
  }, tableProps.value);
23
22
  };
24
23
  var HeaderRenderer = function HeaderRenderer(header) {
@@ -18,6 +18,7 @@ var useFiltering = function useFiltering(hooks) {
18
18
  useEffect(function () {
19
19
  pkg.checkReportFeatureEnabled('Datagrid.useFiltering');
20
20
  }, []);
21
+ /* istanbul ignore next */
21
22
  var filterTypes = useMemo(function () {
22
23
  return {
23
24
  date: function date(rows, id, _ref) {
@@ -33,7 +33,6 @@ var useNestedRowExpander = function useNestedRowExpander(hooks) {
33
33
  var expanderColumn = {
34
34
  id: 'expander',
35
35
  Cell: function Cell(_ref) {
36
- var _cx;
37
36
  var row = _ref.row;
38
37
  var expanderButtonProps = _objectSpread(_objectSpread({}, row.getToggleRowExpandedProps()), {}, {
39
38
  onClick: function onClick(event) {
@@ -56,7 +55,7 @@ var useNestedRowExpander = function useNestedRowExpander(hooks) {
56
55
  }, expanderButtonProps, {
57
56
  title: expanderTitle
58
57
  }), /*#__PURE__*/React.createElement(ChevronRight, {
59
- className: cx("".concat(blockClass, "__expander-icon"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__expander-icon--not-open"), !row.isExpanded), _defineProperty(_cx, "".concat(blockClass, "__expander-icon--open"), row.isExpanded), _cx))
58
+ className: cx("".concat(blockClass, "__expander-icon"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__expander-icon--not-open"), !row.isExpanded), "".concat(blockClass, "__expander-icon--open"), row.isExpanded))
60
59
  }));
61
60
  },
62
61
  width: 48,
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /**
3
- * Copyright IBM Corp. 2020, 2023
3
+ * Copyright IBM Corp. 2020, 2024
4
4
  *
5
5
  * This source code is licensed under the Apache-2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
@@ -9,46 +9,62 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  import cx from 'classnames';
10
10
  import { pkg } from '../../settings';
11
11
  import useNestedRowExpander from './useNestedRowExpander';
12
+ import { useEffect } from 'react';
12
13
  var blockClass = "".concat(pkg.prefix, "--datagrid");
13
14
  var useNestedRows = function useNestedRows(hooks) {
14
15
  useNestedRowExpander(hooks);
15
- var marginLeft = 24;
16
- var getRowProps = function getRowProps(props, _ref) {
17
- var _cx;
18
- var row = _ref.row;
19
- return [props, {
20
- className: cx((_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__carbon-nested-row"), row.depth > 0), _defineProperty(_cx, "".concat(blockClass, "__carbon-row-expanded"), row.isExpanded), _cx))
21
- }];
22
- };
23
- var getRowStyles = function getRowStyles(props, _ref2) {
24
- var row = _ref2.row;
25
- return [props, {
26
- style: {
27
- paddingLeft: "".concat(row.depth > 1 ? marginLeft * 2 + (row.depth - 1) * (marginLeft + marginLeft / 3) : row.depth === 1 ? marginLeft * 2 : 0, "px")
28
- }
29
- }];
30
- };
31
- var getCellProps = function getCellProps(props, _ref3) {
32
- var cell = _ref3.cell,
33
- instance = _ref3.instance;
34
- // reduce the "first cell"s width to compensate added (left) margin
35
- var isFirstCell = instance.columns.findIndex(function (c) {
36
- return c.id === cell.column.id;
37
- }) === 0;
38
- return [props, {
39
- style: {
40
- marginRight: "".concat(isFirstCell && cell.row.depth > 0 ? "".concat(-32 * cell.row.depth - 18, "px") : '')
41
- }
42
- }];
43
- };
44
16
  var useInstance = function useInstance(instance) {
17
+ // This useEffect will expand rows if they exist in the initialState obj
18
+ useEffect(function () {
19
+ var rows = instance.rows,
20
+ initialState = instance.initialState;
21
+ var expandedRowIds = initialState.expandedRowIds;
22
+ if (expandedRowIds) {
23
+ Object.keys(expandedRowIds).forEach(function (key) {
24
+ var row = rows.filter(function (r) {
25
+ return r.id.toString() === key.toString();
26
+ });
27
+ if (row.length && key.toString() === row[0].id.toString()) {
28
+ row[0].toggleRowExpanded();
29
+ }
30
+ });
31
+ }
32
+ }, [instance]);
33
+ var marginLeft = 24;
34
+ var getRowProps = function getRowProps(props, _ref) {
35
+ var row = _ref.row;
36
+ return [props, {
37
+ className: cx(_defineProperty(_defineProperty({}, "".concat(blockClass, "__carbon-nested-row"), row.depth > 0), "".concat(blockClass, "__carbon-row-expanded"), row.isExpanded))
38
+ }];
39
+ };
40
+ var getRowStyles = function getRowStyles(props, _ref2) {
41
+ var row = _ref2.row;
42
+ return [props, {
43
+ style: {
44
+ paddingLeft: "".concat(row.depth > 1 ? marginLeft * 2 + (row.depth - 1) * (marginLeft + marginLeft / 3) : row.depth === 1 ? marginLeft * 2 : 0, "px")
45
+ }
46
+ }];
47
+ };
48
+ var getCellProps = function getCellProps(props, _ref3) {
49
+ var cell = _ref3.cell,
50
+ instance = _ref3.instance;
51
+ // reduce the "first cell"s width to compensate added (left) margin
52
+ var isFirstCell = instance.columns.findIndex(function (c) {
53
+ return c.id === cell.column.id;
54
+ }) === 0;
55
+ return [props, {
56
+ style: {
57
+ marginRight: "".concat(isFirstCell && cell.row.depth > 0 ? "".concat(-32 * cell.row.depth - 18, "px") : '')
58
+ }
59
+ }];
60
+ };
45
61
  Object.assign(instance, {
46
62
  withNestedRows: true
47
63
  });
64
+ hooks.getRowProps.push(getRowProps);
65
+ hooks.getRowProps.push(getRowStyles);
66
+ hooks.getCellProps.push(getCellProps);
48
67
  };
49
- hooks.getRowProps.push(getRowProps);
50
- hooks.getRowProps.push(getRowStyles);
51
- hooks.getCellProps.push(getCellProps);
52
68
  hooks.useInstance.push(useInstance);
53
69
  };
54
70
  export default useNestedRows;
@@ -29,7 +29,7 @@ var useOnRowClick = function useOnRowClick(hooks) {
29
29
  row.classList.remove("".concat(carbon.prefix, "--data-table--selected"));
30
30
  });
31
31
  }
32
- var closestRow = event.target.closest(".".concat(pkg.prefix, "--datagrid__carbon-row"));
32
+ var closestRow = event.currentTarget.closest('tr');
33
33
  closestRow.classList.add("".concat(carbon.prefix, "--data-table--selected"));
34
34
  if (!withSelectRows) {
35
35
  instance.selectedFlatRows && instance.selectedFlatRows.map(function (toggleRow) {
@@ -62,12 +62,11 @@ var useSelectRows = function useSelectRows(hooks) {
62
62
  };
63
63
  var useHighlightSelection = function useHighlightSelection(hooks) {
64
64
  var getRowProps = function getRowProps(props, _ref) {
65
- var _ref2;
66
65
  var row = _ref.row;
67
66
  var _row$getToggleRowSele = row.getToggleRowSelectedProps(),
68
67
  checked = _row$getToggleRowSele.checked;
69
68
  return [props, {
70
- className: cx(["".concat(blockClass, "__carbon-row"), (_ref2 = {}, _defineProperty(_ref2, "".concat(carbon.prefix, "--data-table--selected"), checked), _defineProperty(_ref2, "".concat(blockClass, "__active-row"), checked), _ref2)])
69
+ className: cx(["".concat(blockClass, "__carbon-row"), _defineProperty(_defineProperty({}, "".concat(carbon.prefix, "--data-table--selected"), checked), "".concat(blockClass, "__active-row"), checked)])
71
70
  }];
72
71
  };
73
72
  hooks.getRowProps.push(getRowProps);
@@ -89,7 +89,6 @@ var useSortableColumns = function useSortableColumns(hooks) {
89
89
  return /*#__PURE__*/React.createElement(ArrowsVertical, iconProps);
90
90
  };
91
91
  var Header = function Header(headerProp) {
92
- var _cx;
93
92
  return column.disableSortBy === true || column.id === 'datagridSelection' ? column.disableSortBy ? column.Header : /*#__PURE__*/React.createElement(SelectAll, instance) : /*#__PURE__*/React.createElement(Button, {
94
93
  "aria-sort": getAriaSortValue(headerProp === null || headerProp === void 0 ? void 0 : headerProp.column, {
95
94
  ascendingSortableLabelText: ascendingSortableLabelText,
@@ -104,7 +103,7 @@ var useSortableColumns = function useSortableColumns(hooks) {
104
103
  renderIcon: function renderIcon(props) {
105
104
  return icon(headerProp === null || headerProp === void 0 ? void 0 : headerProp.column, props);
106
105
  },
107
- className: cx("".concat(carbon.prefix, "--table-sort ").concat(blockClass, "--table-sort"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "--table-sort--desc"), headerProp === null || headerProp === void 0 ? void 0 : headerProp.column.isSortedDesc), _defineProperty(_cx, "".concat(blockClass, "--table-sort--asc"), (headerProp === null || headerProp === void 0 ? void 0 : headerProp.column.isSortedDesc) === false), _cx))
106
+ className: cx("".concat(carbon.prefix, "--table-sort ").concat(blockClass, "--table-sort"), _defineProperty(_defineProperty({}, "".concat(blockClass, "--table-sort--desc"), headerProp === null || headerProp === void 0 ? void 0 : headerProp.column.isSortedDesc), "".concat(blockClass, "--table-sort--asc"), (headerProp === null || headerProp === void 0 ? void 0 : headerProp.column.isSortedDesc) === false))
108
107
  }, column.Header);
109
108
  };
110
109
  return _objectSpread(_objectSpread({}, column), {}, {
@@ -143,17 +143,16 @@ var addTableBodyProps = function addTableBodyProps(tableBodyRef, props) {
143
143
  var changeProps = function changeProps(elementName, headerCellRef, windowSize, props, data) {
144
144
  var column = data.column || data.cell.column;
145
145
  if (column.sticky === 'right') {
146
- var _cx;
147
146
  return [props, _objectSpread({
148
- className: cx((_cx = {}, _defineProperty(_cx, "".concat(styleClassPrefix, "-").concat(elementName), true), _defineProperty(_cx, "".concat(blockClass, "__resizableColumn"), false), _defineProperty(_cx, "".concat(blockClass, "__sortableColumn"), false), _cx))
147
+ className: cx(_defineProperty(_defineProperty(_defineProperty({}, "".concat(styleClassPrefix, "-").concat(elementName), true), "".concat(blockClass, "__resizableColumn"), false), "".concat(blockClass, "__sortableColumn"), false))
149
148
  }, headerCellRef && {
150
149
  ref: headerCellRef
151
150
  })];
152
151
  }
153
152
  if (column.sticky === 'left') {
154
- var _data$instance, _cx2;
153
+ var _data$instance;
155
154
  return [props, _objectSpread({
156
- className: cx((_cx2 = {}, _defineProperty(_cx2, "".concat(leftStickyStyleClassPrefix, "-").concat(elementName), true && windowSize > 671), _defineProperty(_cx2, "".concat(leftStickyStyleClassPrefix, "-").concat(elementName, "--with-extra-select-column"), (data === null || data === void 0 || (_data$instance = data.instance) === null || _data$instance === void 0 ? void 0 : _data$instance.withSelectRows) && windowSize > 671), _cx2))
155
+ className: cx(_defineProperty(_defineProperty({}, "".concat(leftStickyStyleClassPrefix, "-").concat(elementName), true && windowSize > 671), "".concat(leftStickyStyleClassPrefix, "-").concat(elementName, "--with-extra-select-column"), (data === null || data === void 0 || (_data$instance = data.instance) === null || _data$instance === void 0 ? void 0 : _data$instance.withSelectRows) && windowSize > 671))
157
156
  }, headerCellRef && {
158
157
  ref: headerCellRef
159
158
  })];
@@ -0,0 +1,149 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
+ /**
4
+ * Copyright IBM Corp. 2024, 2024
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { handleFilterTagLabelText } from './handleFilterTagLabelText';
11
+ export var generateDummyCheckboxes = Array(25).fill(null).map(function (_, index) {
12
+ return {
13
+ id: "".concat(index),
14
+ labelText: "Dummy checkbox ".concat(index + 1),
15
+ value: 'dummy-checkbox',
16
+ disabled: true
17
+ };
18
+ });
19
+ export var filterProps = function filterProps() {
20
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
21
+ _ref$includeManyCheck = _ref.includeManyCheckboxes,
22
+ includeManyCheckboxes = _ref$includeManyCheck === void 0 ? false : _ref$includeManyCheck,
23
+ _ref$dropdownOnChange = _ref.dropdownOnChange,
24
+ dropdownOnChange = _ref$dropdownOnChange === void 0 ? function () {} : _ref$dropdownOnChange;
25
+ var checkboxList = [{
26
+ id: 'normal',
27
+ labelText: 'Normal',
28
+ value: 'normal'
29
+ }, {
30
+ id: 'minor-warning',
31
+ labelText: 'Minor warning',
32
+ value: 'minor-warning'
33
+ }, {
34
+ id: 'critical',
35
+ labelText: 'Critical',
36
+ value: 'critical'
37
+ }].concat(_toConsumableArray(includeManyCheckboxes ? generateDummyCheckboxes : []));
38
+ return {
39
+ autoHideFilters: includeManyCheckboxes ? false : true,
40
+ variation: 'panel',
41
+ panelIconDescription: 'Open filters',
42
+ sections: [{
43
+ categoryTitle: 'Category title',
44
+ hasAccordion: true,
45
+ filters: [{
46
+ filterLabel: 'Joined',
47
+ filter: {
48
+ type: 'date',
49
+ column: 'joined',
50
+ props: {
51
+ DatePicker: {
52
+ datePickerType: 'range'
53
+ },
54
+ DatePickerInput: {
55
+ start: {
56
+ id: 'date-picker-input-id-start',
57
+ placeholder: 'mm/dd/yyyy',
58
+ labelText: 'Joined start date'
59
+ },
60
+ end: {
61
+ id: 'date-picker-input-id-end',
62
+ placeholder: 'mm/dd/yyyy',
63
+ labelText: 'Joined end date'
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }, {
69
+ filterLabel: 'Status',
70
+ filter: {
71
+ type: 'dropdown',
72
+ column: 'status',
73
+ props: {
74
+ Dropdown: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
75
+ id: 'marital-status-dropdown'
76
+ }, 'aria-label', 'Marital status dropdown'), "items", ['relationship', 'complicated', 'single']), "label", 'Marital status'), "titleText", 'Marital status'), "onChange", dropdownOnChange)
77
+ }
78
+ }
79
+ }]
80
+ }, {
81
+ categoryTitle: 'Category title',
82
+ filters: [{
83
+ filterLabel: 'Role',
84
+ filter: {
85
+ type: 'radio',
86
+ column: 'role',
87
+ props: {
88
+ FormGroup: {
89
+ legendText: 'Role'
90
+ },
91
+ RadioButtonGroup: {
92
+ orientation: 'vertical',
93
+ legend: 'Role legend',
94
+ name: 'role-radio-button-group'
95
+ },
96
+ RadioButton: [{
97
+ id: 'developer',
98
+ labelText: 'Developer',
99
+ value: 'developer'
100
+ }, {
101
+ id: 'designer',
102
+ labelText: 'Designer',
103
+ value: 'designer'
104
+ }, {
105
+ id: 'researcher',
106
+ labelText: 'Researcher',
107
+ value: 'researcher'
108
+ }]
109
+ }
110
+ }
111
+ }, {
112
+ filterLabel: 'Visits',
113
+ filter: {
114
+ type: 'number',
115
+ column: 'visits',
116
+ props: {
117
+ NumberInput: {
118
+ min: 0,
119
+ id: 'visits-number-input',
120
+ invalidText: 'A valid value is required',
121
+ label: 'Visits',
122
+ placeholder: 'Type a number amount of visits'
123
+ }
124
+ }
125
+ }
126
+ }, {
127
+ filterLabel: 'Password strength',
128
+ filter: {
129
+ type: 'checkbox',
130
+ column: 'passwordStrength',
131
+ props: {
132
+ FormGroup: {
133
+ legendText: 'Password strength'
134
+ },
135
+ Checkbox: checkboxList
136
+ }
137
+ }
138
+ }]
139
+ }],
140
+ renderLabel: function renderLabel(key, value) {
141
+ return handleFilterTagLabelText(key, value);
142
+ },
143
+ renderDateLabel: function renderDateLabel(start, end) {
144
+ var startDateObj = new Date(start);
145
+ var endDateObj = new Date(end);
146
+ return "".concat(startDateObj.toLocaleDateString(), " - ").concat(endDateObj.toLocaleDateString());
147
+ }
148
+ };
149
+ };
@@ -29,7 +29,6 @@ var defaults = {
29
29
  size: 'sm'
30
30
  };
31
31
  export var EditInPlace = /*#__PURE__*/forwardRef(function (_ref, ref) {
32
- var _cx;
33
32
  var cancelLabel = _ref.cancelLabel,
34
33
  editAlwaysVisible = _ref.editAlwaysVisible,
35
34
  editLabel = _ref.editLabel,
@@ -148,7 +147,7 @@ export var EditInPlace = /*#__PURE__*/forwardRef(function (_ref, ref) {
148
147
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
149
148
  ref: ref
150
149
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement("div", {
151
- className: cx(blockClass, "".concat(blockClass, "--").concat(size), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "--focused"), focused), _defineProperty(_cx, "".concat(blockClass, "--invalid"), invalid), _defineProperty(_cx, "".concat(blockClass, "--inherit-type"), inheritTypography), _defineProperty(_cx, "".concat(blockClass, "--overflows"), inputRef.current && inputRef.current.scrollWidth > inputRef.current.offsetWidth), _cx)),
150
+ className: cx(blockClass, "".concat(blockClass, "--").concat(size), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "--focused"), focused), "".concat(blockClass, "--invalid"), invalid), "".concat(blockClass, "--inherit-type"), inheritTypography), "".concat(blockClass, "--overflows"), inputRef.current && inputRef.current.scrollWidth > inputRef.current.offsetWidth)),
152
151
  onFocus: onFocusHandler,
153
152
  onBlur: onBlurHandler
154
153
  }, /*#__PURE__*/React.createElement("label", {
@@ -25,7 +25,6 @@ var defaults = {
25
25
  hasFieldset: true
26
26
  };
27
27
  export var EditTearsheetForm = /*#__PURE__*/forwardRef(function (_ref, ref) {
28
- var _cx;
29
28
  var children = _ref.children,
30
29
  className = _ref.className,
31
30
  description = _ref.description,
@@ -43,7 +42,7 @@ export var EditTearsheetForm = /*#__PURE__*/forwardRef(function (_ref, ref) {
43
42
  title: title
44
43
  });
45
44
  return formContext ? /*#__PURE__*/React.createElement("div", _extends({}, rest, {
46
- className: cx(blockClass, className, (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__form--hidden-form"), formNumber !== (formContext === null || formContext === void 0 ? void 0 : formContext.currentForm)), _defineProperty(_cx, "".concat(blockClass, "__form--visible-form"), formNumber === (formContext === null || formContext === void 0 ? void 0 : formContext.currentForm)), _cx)),
45
+ className: cx(blockClass, className, _defineProperty(_defineProperty({}, "".concat(blockClass, "__form--hidden-form"), formNumber !== (formContext === null || formContext === void 0 ? void 0 : formContext.currentForm)), "".concat(blockClass, "__form--visible-form"), formNumber === (formContext === null || formContext === void 0 ? void 0 : formContext.currentForm))),
47
46
  ref: ref
48
47
  }), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Column, {
49
48
  xlg: 12,
@@ -1,6 +1,8 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["key", "value"];
4
+ var _excluded = ["className", "clearFiltersText", "clearFilters", "filters", "renderLabel", "overflowType", "clearButtonInline"],
5
+ _excluded2 = ["key", "value"];
4
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
8
  /**
@@ -16,6 +18,7 @@ import cx from 'classnames';
16
18
  import { TagSet } from '../TagSet';
17
19
  import { pkg } from '../../settings';
18
20
  import uuidv4 from '../../global/js/utils/uuidv4';
21
+ import { getDevtoolsProps } from '../../global/js/utils/devtools';
19
22
  var blockClass = "".concat(pkg.prefix, "--filter-summary");
20
23
  var FilterSummary = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
21
24
  var _filterSummaryClearBu;
@@ -23,22 +26,21 @@ var FilterSummary = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
23
26
  className = _ref$className === void 0 ? '' : _ref$className,
24
27
  _ref$clearFiltersText = _ref.clearFiltersText,
25
28
  clearFiltersText = _ref$clearFiltersText === void 0 ? 'Clear filters' : _ref$clearFiltersText,
26
- _ref$clearFilters = _ref.clearFilters,
27
- clearFilters = _ref$clearFilters === void 0 ? function () {} : _ref$clearFilters,
28
- _ref$filters = _ref.filters,
29
- filters = _ref$filters === void 0 ? [] : _ref$filters,
29
+ clearFilters = _ref.clearFilters,
30
+ filters = _ref.filters,
30
31
  _ref$renderLabel = _ref.renderLabel,
31
32
  renderLabel = _ref$renderLabel === void 0 ? null : _ref$renderLabel,
32
33
  _ref$overflowType = _ref.overflowType,
33
34
  overflowType = _ref$overflowType === void 0 ? 'default' : _ref$overflowType,
34
35
  _ref$clearButtonInlin = _ref.clearButtonInline,
35
- clearButtonInline = _ref$clearButtonInlin === void 0 ? true : _ref$clearButtonInlin;
36
+ clearButtonInline = _ref$clearButtonInlin === void 0 ? true : _ref$clearButtonInlin,
37
+ rest = _objectWithoutProperties(_ref, _excluded);
36
38
  var filterSummaryId = "".concat(blockClass, "__").concat(uuidv4());
37
39
  var tagFilters = filters.map(function (_ref2) {
38
40
  var _renderLabel;
39
41
  var key = _ref2.key,
40
42
  value = _ref2.value,
41
- rest = _objectWithoutProperties(_ref2, _excluded);
43
+ rest = _objectWithoutProperties(_ref2, _excluded2);
42
44
  return _objectSpread(_objectSpread({}, rest), {}, {
43
45
  type: 'gray',
44
46
  label: (_renderLabel = renderLabel === null || renderLabel === void 0 ? void 0 : renderLabel(key, value)) !== null && _renderLabel !== void 0 ? _renderLabel : "".concat(key, ": ").concat(value)
@@ -46,12 +48,13 @@ var FilterSummary = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
46
48
  });
47
49
  var filterSummaryClearButton = useRef();
48
50
  var filterSummaryRef = useRef();
49
- var localRef = filterSummaryRef || ref;
50
- return /*#__PURE__*/React.createElement("div", {
51
- ref: localRef,
52
- className: cx([blockClass, className]),
51
+ var localRef = ref || filterSummaryRef;
52
+ return /*#__PURE__*/React.createElement("div", _extends({}, getDevtoolsProps(componentName), {
53
53
  id: filterSummaryId
54
- }, /*#__PURE__*/React.createElement(TagSet, {
54
+ }, rest, {
55
+ ref: localRef,
56
+ className: cx([blockClass, className])
57
+ }), /*#__PURE__*/React.createElement(TagSet, {
55
58
  allTagsModalSearchLabel: "Search all tags",
56
59
  allTagsModalSearchPlaceholderText: "Search all tags",
57
60
  allTagsModalTitle: "All tags",
@@ -212,14 +212,13 @@ export var NotificationsPanel = /*#__PURE__*/React.forwardRef(function (_ref, re
212
212
  });
213
213
  previousNotifications = sortChronologically(previousNotifications);
214
214
  var renderDescription = function renderDescription(id) {
215
- var _ref2, _ref3;
216
215
  var notification = allNotifications && allNotifications.length && allNotifications.filter(function (item) {
217
216
  return item.id === id;
218
217
  })[0];
219
218
  var trimLength = 88;
220
219
  var description = notification.description;
221
- var descriptionClassName = cx(["".concat(blockClass, "__notification-description"), (_ref2 = {}, _defineProperty(_ref2, "".concat(blockClass, "__notification-long-description"), notification.showAll), _defineProperty(_ref2, "".concat(blockClass, "__notification-short-description"), !notification.showAll), _ref2)]);
222
- var showMoreButtonClassName = cx([(_ref3 = {}, _defineProperty(_ref3, "".concat(blockClass, "__notification-read-less-button"), notification.showAll), _defineProperty(_ref3, "".concat(blockClass, "__notification-read-more-button"), !notification.showAll), _ref3)]);
220
+ var descriptionClassName = cx(["".concat(blockClass, "__notification-description"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__notification-long-description"), notification.showAll), "".concat(blockClass, "__notification-short-description"), !notification.showAll)]);
221
+ var showMoreButtonClassName = cx([_defineProperty(_defineProperty({}, "".concat(blockClass, "__notification-read-less-button"), notification.showAll), "".concat(blockClass, "__notification-read-more-button"), !notification.showAll)]);
223
222
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
224
223
  className: descriptionClassName
225
224
  }, description), description.length > trimLength && /*#__PURE__*/React.createElement(Button, {
@@ -38,7 +38,7 @@ var defaults = {
38
38
  narrowGrid: false
39
39
  };
40
40
  export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
41
- var _withoutBackground, _enableBreadcrumbScro, _ref7, _cx2, _ref8, _cx4, _cx7;
41
+ var _withoutBackground, _enableBreadcrumbScro;
42
42
  var actionBarItems = _ref.actionBarItems,
43
43
  actionBarMenuOptionsClass = _ref.actionBarMenuOptionsClass,
44
44
  actionBarOverflowAriaLabel = _ref.actionBarOverflowAriaLabel,
@@ -234,17 +234,15 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
234
234
  }
235
235
  }
236
236
  setPageHeaderStyles(function (prev) {
237
- var _objectSpread2;
238
- return _objectSpread(_objectSpread({}, prev), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, "--".concat(blockClass, "--max-action-bar-width-px"), newActionBarWidth), _defineProperty(_objectSpread2, "--".concat(blockClass, "--button-set-in-breadcrumb-width-px"), "".concat(newPageActionInBreadcrumbWidth)), _objectSpread2));
237
+ return _objectSpread(_objectSpread({}, prev), {}, _defineProperty(_defineProperty({}, "--".concat(blockClass, "--max-action-bar-width-px"), newActionBarWidth), "--".concat(blockClass, "--button-set-in-breadcrumb-width-px"), "".concat(newPageActionInBreadcrumbWidth)));
239
238
  });
240
239
  }, [actionBarColumnWidth, actionBarMaxWidth, actionBarMinWidth, pageActionInBreadcrumbMaxWidth, pageActionInBreadcrumbMinWidth, headerRef]);
241
240
  useEffect(function () {
242
241
  // Updates custom CSS props used to manage scroll behavior
243
242
  /* istanbul ignore next */
244
243
  setPageHeaderStyles(function (prev) {
245
- var _objectSpread3;
246
- return _objectSpread(_objectSpread({}, prev), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, "--".concat(blockClass, "--height-px"), "".concat(metrics.headerHeight, "px")), _defineProperty(_objectSpread3, "--".concat(blockClass, "--width-px"), "".concat(metrics.headerWidth, "px")), _defineProperty(_objectSpread3, "--".concat(blockClass, "--header-top"), "".concat(metrics.headerTopValue + metrics.headerOffset, "px")), _defineProperty(_objectSpread3, "--".concat(blockClass, "--breadcrumb-title-visibility"), scrollYValue > 0 ? 'visible' : 'hidden'), _defineProperty(_objectSpread3, "--".concat(blockClass, "--scroll"), "".concat(scrollYValue)), _defineProperty(_objectSpread3, "--".concat(blockClass, "--breadcrumb-title-top"), "".concat(Math.max(0, metrics.breadcrumbTitleHeight + metrics.titleRowSpaceAbove - scrollYValue), "px")), _defineProperty(_objectSpread3, "--".concat(blockClass, "--breadcrumb-title-opacity"), "".concat(Math.min(1, Math.max(0, (scrollYValue - (metrics.titleRowSpaceAbove || 0)) / (metrics.breadcrumbTitleHeight || 1) // don't want to divide by zero
247
- )))), _defineProperty(_objectSpread3, "--".concat(blockClass, "--breadcrumb-row-width-px"), "".concat(metrics.breadcrumbRowWidth, "px")), _objectSpread3));
244
+ return _objectSpread(_objectSpread({}, prev), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(blockClass, "--height-px"), "".concat(metrics.headerHeight, "px")), "--".concat(blockClass, "--width-px"), "".concat(metrics.headerWidth, "px")), "--".concat(blockClass, "--header-top"), "".concat(metrics.headerTopValue + metrics.headerOffset, "px")), "--".concat(blockClass, "--breadcrumb-title-visibility"), scrollYValue > 0 ? 'visible' : 'hidden'), "--".concat(blockClass, "--scroll"), "".concat(scrollYValue)), "--".concat(blockClass, "--breadcrumb-title-top"), "".concat(Math.max(0, metrics.breadcrumbTitleHeight + metrics.titleRowSpaceAbove - scrollYValue), "px")), "--".concat(blockClass, "--breadcrumb-title-opacity"), "".concat(Math.min(1, Math.max(0, (scrollYValue - (metrics.titleRowSpaceAbove || 0)) / (metrics.breadcrumbTitleHeight || 1) // don't want to divide by zero
245
+ )))), "--".concat(blockClass, "--breadcrumb-row-width-px"), "".concat(metrics.breadcrumbRowWidth, "px")));
248
246
  });
249
247
  }, [headerRef, enableBreadcrumbScroll, metrics, metrics.breadcrumbRowHeight, metrics.breadcrumbRowSpaceBelow, metrics.breadcrumbTitleHeight, metrics.breadcrumbRowWidth, metrics.headerHeight, metrics.headerWidth, metrics.headerOffset, metrics.headerTopValue, metrics.navigationRowHeight, navigation, scrollYValue, tags]);
250
248
  useNearestScroll(headerRef,
@@ -323,7 +321,7 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
323
321
  className: "".concat(blockClass, "--offset-top-measuring-element"),
324
322
  ref: offsetTopMeasuringRef
325
323
  }), /*#__PURE__*/React.createElement("section", _extends({}, rest, {
326
- className: cx([blockClass, "".concat(blockClass, "--no-margins-below-row"), className, (_ref7 = {}, _defineProperty(_ref7, "".concat(blockClass, "--has-navigation"), navigation || tags), _defineProperty(_ref7, "".concat(blockClass, "--has-navigation-tags-only"), !navigation && tags), _ref7)]),
324
+ className: cx([blockClass, "".concat(blockClass, "--no-margins-below-row"), className, _defineProperty(_defineProperty({}, "".concat(blockClass, "--has-navigation"), navigation || tags), "".concat(blockClass, "--has-navigation-tags-only"), !navigation && tags)]),
327
325
  style: pageHeaderStyles,
328
326
  ref: headerRef
329
327
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(FlexGrid, {
@@ -333,7 +331,7 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
333
331
  }, /*#__PURE__*/React.createElement("div", {
334
332
  className: "".concat(blockClass, "__non-navigation-row-content")
335
333
  }, hasBreadcrumbRow ? /*#__PURE__*/React.createElement(Row, {
336
- className: cx("".concat(blockClass, "__breadcrumb-row"), (_cx2 = {}, _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--next-to-tabs"), nextToTabsCheck()), _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--has-breadcrumbs"), breadcrumbs || breadcrumbItemForTitle), _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--has-action-bar"), hasActionBar || widthIsNarrow), _defineProperty(_cx2, "".concat(blockClass, "__has-page-actions-without-action-bar"), !hasActionBar && !widthIsNarrow && pageActions), _cx2))
334
+ className: cx("".concat(blockClass, "__breadcrumb-row"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__breadcrumb-row--next-to-tabs"), nextToTabsCheck()), "".concat(blockClass, "__breadcrumb-row--has-breadcrumbs"), breadcrumbs || breadcrumbItemForTitle), "".concat(blockClass, "__breadcrumb-row--has-action-bar"), hasActionBar || widthIsNarrow), "".concat(blockClass, "__has-page-actions-without-action-bar"), !hasActionBar && !widthIsNarrow && pageActions))
337
335
  }, /*#__PURE__*/React.createElement("div", {
338
336
  className: "".concat(blockClass, "__breadcrumb-row--container")
339
337
  }, /*#__PURE__*/React.createElement(Column, {
@@ -344,7 +342,7 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
344
342
  overflowAriaLabel: breadcrumbOverflowAriaLabel,
345
343
  breadcrumbs: breadcrumbs && breadcrumbItemForTitle ? breadcrumbs.concat(breadcrumbItemForTitle) : breadcrumbItemForTitle ? [breadcrumbItemForTitle] : breadcrumbs // breadcrumbs may be null or undefined
346
344
  }) : null), /*#__PURE__*/React.createElement(Column, {
347
- className: cx(["".concat(blockClass, "__action-bar-column ").concat(blockClass, "__action-bar-column--background"), (_ref8 = {}, _defineProperty(_ref8, "".concat(blockClass, "__action-bar-column--has-page-actions"), pageActions), _defineProperty(_ref8, "".concat(blockClass, "__action-bar-column--influenced-by-collapse-button"), spaceForCollapseButton), _ref8)])
345
+ className: cx(["".concat(blockClass, "__action-bar-column ").concat(blockClass, "__action-bar-column--background"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__action-bar-column--has-page-actions"), pageActions), "".concat(blockClass, "__action-bar-column--influenced-by-collapse-button"), spaceForCollapseButton)])
348
346
  }, /*#__PURE__*/React.createElement("div", {
349
347
  className: "".concat(blockClass, "__action-bar-column-content"),
350
348
  ref: sizingContainerRef
@@ -359,7 +357,7 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
359
357
  onWidthChange: handleActionBarWidthChange,
360
358
  rightAlign: true
361
359
  })) : widthIsNarrow && thePageActions(true, pageActionsInBreadcrumbRow))))) : null, !collapseTitle && (title || pageActions) ? /*#__PURE__*/React.createElement(Row, {
362
- className: cx("".concat(blockClass, "__title-row"), (_cx4 = {}, _defineProperty(_cx4, "".concat(blockClass, "__title-row--no-breadcrumb-row"), !hasBreadcrumbRow), _defineProperty(_cx4, "".concat(blockClass, "__title-row--under-action-bar"), hasActionBar || widthIsNarrow), _defineProperty(_cx4, "".concat(blockClass, "__title-row--has-page-actions"), !!pageActions), _defineProperty(_cx4, "".concat(blockClass, "__title-row--sticky"), !!pageActions && !actionBarItems && hasBreadcrumbRow), _cx4))
360
+ className: cx("".concat(blockClass, "__title-row"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__title-row--no-breadcrumb-row"), !hasBreadcrumbRow), "".concat(blockClass, "__title-row--under-action-bar"), hasActionBar || widthIsNarrow), "".concat(blockClass, "__title-row--has-page-actions"), !!pageActions), "".concat(blockClass, "__title-row--sticky"), !!pageActions && !actionBarItems && hasBreadcrumbRow))
363
361
  }, /*#__PURE__*/React.createElement(Column, {
364
362
  className: "".concat(blockClass, "__title-column")
365
363
  }, title ? /*#__PURE__*/React.createElement(PageHeaderTitle, {
@@ -393,7 +391,7 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
393
391
  }))) : null),
394
392
  // this navigation pushes the breadcrumb off or settles underneath it depending on enableBreadcrumbScroll
395
393
  navigation ? /*#__PURE__*/React.createElement(Row, {
396
- className: cx("".concat(blockClass, "__navigation-row"), (_cx7 = {}, _defineProperty(_cx7, "".concat(blockClass, "__navigation-row--spacing-above-06"), !!navigation), _defineProperty(_cx7, "".concat(blockClass, "__navigation-row--has-tags"), tags), _cx7))
394
+ className: cx("".concat(blockClass, "__navigation-row"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__navigation-row--spacing-above-06"), !!navigation), "".concat(blockClass, "__navigation-row--has-tags"), tags))
397
395
  }, /*#__PURE__*/React.createElement(Column, {
398
396
  className: "".concat(blockClass, "__navigation-tabs")
399
397
  }, navigation), tags ? /*#__PURE__*/React.createElement(Column, {