@carbon/ibm-products 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. package/css/index-full-carbon.css +19 -4
  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 +11 -2
  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 +11 -2
  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 +12 -3
  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 +15 -8
  32. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +22 -12
  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/utils.js +1 -5
  36. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  37. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +2 -2
  38. package/es/components/Datagrid/useActionsColumn.js +1 -2
  39. package/es/components/Datagrid/useDefaultStringRenderer.js +1 -2
  40. package/es/components/Datagrid/useFiltering.js +1 -0
  41. package/es/components/Datagrid/useNestedRowExpander.js +1 -2
  42. package/es/components/Datagrid/useNestedRows.js +49 -33
  43. package/es/components/Datagrid/useOnRowClick.js +1 -1
  44. package/es/components/Datagrid/useSelectRows.js +1 -2
  45. package/es/components/Datagrid/useSortableColumns.js +1 -2
  46. package/es/components/Datagrid/useStickyColumn.js +3 -4
  47. package/es/components/Datagrid/utils/filterPropsForTesting.js +149 -0
  48. package/es/components/EditInPlace/EditInPlace.js +1 -2
  49. package/es/components/EditTearsheet/EditTearsheetForm.js +1 -2
  50. package/es/components/FilterSummary/FilterSummary.js +15 -12
  51. package/es/components/NotificationsPanel/NotificationsPanel.js +2 -3
  52. package/es/components/PageHeader/PageHeader.js +9 -11
  53. package/es/components/Saving/Saving.js +6 -6
  54. package/es/components/SidePanel/SidePanel.js +6 -6
  55. package/es/components/TagSet/TagSetOverflow.js +1 -2
  56. package/es/components/Tearsheet/Tearsheet.js +5 -0
  57. package/es/components/Tearsheet/TearsheetNarrow.js +5 -0
  58. package/es/components/Tearsheet/TearsheetShell.js +9 -9
  59. package/es/components/WebTerminal/WebTerminal.js +1 -2
  60. package/lib/components/ActionSet/ActionSet.js +3 -4
  61. package/lib/components/AddSelect/AddSelectBody.js +2 -2
  62. package/lib/components/AddSelect/AddSelectRow.js +2 -2
  63. package/lib/components/Card/Card.js +1 -2
  64. package/lib/components/Card/CardHeader.js +1 -2
  65. package/lib/components/CreateFullPage/CreateFullPageStep.js +1 -2
  66. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +1 -2
  67. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +1 -2
  68. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +1 -2
  69. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +1 -2
  70. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -7
  71. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -11
  72. package/lib/components/Datagrid/Datagrid/DatagridRow.js +9 -10
  73. package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -2
  74. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +15 -8
  75. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +22 -12
  76. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
  77. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
  78. package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -5
  79. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  80. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +2 -2
  81. package/lib/components/Datagrid/useActionsColumn.js +1 -2
  82. package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -2
  83. package/lib/components/Datagrid/useFiltering.js +1 -0
  84. package/lib/components/Datagrid/useNestedRowExpander.js +1 -2
  85. package/lib/components/Datagrid/useNestedRows.js +49 -33
  86. package/lib/components/Datagrid/useOnRowClick.js +1 -1
  87. package/lib/components/Datagrid/useSelectRows.js +1 -2
  88. package/lib/components/Datagrid/useSortableColumns.js +1 -2
  89. package/lib/components/Datagrid/useStickyColumn.js +3 -4
  90. package/lib/components/Datagrid/utils/filterPropsForTesting.js +156 -0
  91. package/lib/components/EditInPlace/EditInPlace.js +1 -2
  92. package/lib/components/EditTearsheet/EditTearsheetForm.js +1 -2
  93. package/lib/components/FilterSummary/FilterSummary.js +15 -12
  94. package/lib/components/NotificationsPanel/NotificationsPanel.js +2 -3
  95. package/lib/components/PageHeader/PageHeader.js +9 -11
  96. package/lib/components/Saving/Saving.js +6 -6
  97. package/lib/components/SidePanel/SidePanel.js +6 -6
  98. package/lib/components/TagSet/TagSetOverflow.js +1 -2
  99. package/lib/components/Tearsheet/Tearsheet.js +5 -0
  100. package/lib/components/Tearsheet/TearsheetNarrow.js +5 -0
  101. package/lib/components/Tearsheet/TearsheetShell.js +9 -9
  102. package/lib/components/WebTerminal/WebTerminal.js +1 -2
  103. package/package.json +4 -4
  104. package/scss/components/Saving/_saving.scss +6 -0
  105. package/scss/components/SidePanel/_side-panel.scss +5 -1
  106. package/scss/components/TagSet/_tag-set.scss +4 -1
@@ -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, {
@@ -18,7 +18,7 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools';
18
18
  import { pkg } from '../../settings';
19
19
  var componentName = 'Saving';
20
20
  export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
21
- var _statusObj, _statusObj$status, _statusObj$status2, _statusObj$status3, _statusObj$status4;
21
+ var _statusObj$status, _statusObj$status2, _statusObj$status3, _statusObj$status4;
22
22
  var secondaryButtonText = _ref.secondaryButtonText,
23
23
  className = _ref.className,
24
24
  defaultIconDescription = _ref.defaultIconDescription,
@@ -34,7 +34,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
34
34
  successText = _ref.successText,
35
35
  type = _ref.type,
36
36
  rest = _objectWithoutProperties(_ref, _excluded);
37
- var statusObj = (_statusObj = {
37
+ var statusObj = _defineProperty(_defineProperty(_defineProperty({
38
38
  default: {
39
39
  text: defaultText,
40
40
  iconDescription: defaultIconDescription,
@@ -44,7 +44,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
44
44
  }, props));
45
45
  }
46
46
  }
47
- }, _defineProperty(_statusObj, 'in-progress', {
47
+ }, 'in-progress', {
48
48
  text: inProgressText,
49
49
  iconDescription: inProgressIconDescription,
50
50
  icon: function icon(props) {
@@ -52,7 +52,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
52
52
  size: 16
53
53
  }, props));
54
54
  }
55
- }), _defineProperty(_statusObj, "success", {
55
+ }), "success", {
56
56
  text: successText,
57
57
  iconDescription: successIconDescription,
58
58
  icon: function icon(props) {
@@ -60,7 +60,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
60
60
  size: 16
61
61
  }, props));
62
62
  }
63
- }), _defineProperty(_statusObj, "fail", {
63
+ }), "fail", {
64
64
  text: failText,
65
65
  iconDescription: failIconDescription,
66
66
  icon: function icon(props) {
@@ -68,7 +68,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
68
68
  size: 16
69
69
  }, props));
70
70
  }
71
- }), _statusObj);
71
+ });
72
72
  var blockClass = "".concat(pkg.prefix, "--saving");
73
73
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
74
74
  ref: ref,
@@ -54,7 +54,7 @@ var defaults = {
54
54
  * Side panels keep users in-context of a page while performing tasks like navigating, editing, viewing details, or configuring something new.
55
55
  */
56
56
  export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
57
- var _window, _ref5, _cx4;
57
+ var _window;
58
58
  var actionToolbarButtons = _ref.actionToolbarButtons,
59
59
  actions = _ref.actions,
60
60
  _ref$animateTitle = _ref.animateTitle,
@@ -380,9 +380,9 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
380
380
  }
381
381
  };
382
382
  var primaryActionContainerClassNames = cx(["".concat(blockClass, "__actions-container"), _defineProperty({}, "".concat(blockClass, "__actions-container-condensed"), condensedActions)]);
383
- var mainPanelClassNames = cx([blockClass, className, "".concat(blockClass, "__container"), "".concat(blockClass, "__container--").concat(size), (_ref5 = {}, _defineProperty(_ref5, "".concat(blockClass, "__container-right-placement"), placement === 'right'), _defineProperty(_ref5, "".concat(blockClass, "__container-left-placement"), placement === 'left'), _defineProperty(_ref5, "".concat(blockClass, "__container-with-action-toolbar"), actionToolbarButtons && actionToolbarButtons.length), _defineProperty(_ref5, "".concat(blockClass, "__container-without-overlay"), !includeOverlay && !slideIn), _defineProperty(_ref5, "".concat(blockClass, "__container-is-animating"), !animationComplete || !open), _defineProperty(_ref5, "".concat(blockClass, "__container--has-slug"), slug), _ref5)]);
383
+ var mainPanelClassNames = cx([blockClass, className, "".concat(blockClass, "__container"), "".concat(blockClass, "__container--").concat(size), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__container-right-placement"), placement === 'right'), "".concat(blockClass, "__container-left-placement"), placement === 'left'), "".concat(blockClass, "__container-with-action-toolbar"), actionToolbarButtons && actionToolbarButtons.length), "".concat(blockClass, "__container-without-overlay"), !includeOverlay && !slideIn), "".concat(blockClass, "__container-is-animating"), !animationComplete || !open), "".concat(blockClass, "__container--has-slug"), slug)]);
384
384
  var renderHeader = function renderHeader() {
385
- var _slug$type, _cx, _cx2;
385
+ var _slug$type;
386
386
  var slugCloseSize = actions && actions.length && /l/.test(size) ? 'md' : 'sm';
387
387
  var normalizedSlug;
388
388
  if (slug && (slug === null || slug === void 0 || (_slug$type = slug.type) === null || _slug$type === void 0 ? void 0 : _slug$type.displayName) === 'Slug') {
@@ -392,7 +392,7 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
392
392
  });
393
393
  }
394
394
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
395
- className: cx("".concat(blockClass, "__title-container"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__on-detail-step"), currentStep > 0), _defineProperty(_cx, "".concat(blockClass, "__on-detail-step-without-title"), currentStep > 0 && !title), _defineProperty(_cx, "".concat(blockClass, "__title-container--no-title-animation"), !animateTitle), _defineProperty(_cx, "".concat(blockClass, "__title-container-is-animating"), !animationComplete || !open), _defineProperty(_cx, "".concat(blockClass, "__title-container-without-title"), !title), _defineProperty(_cx, "".concat(blockClass, "__title-container--reduced-motion"), reducedMotion.matches), _cx))
395
+ className: cx("".concat(blockClass, "__title-container"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__on-detail-step"), currentStep > 0), "".concat(blockClass, "__on-detail-step-without-title"), currentStep > 0 && !title), "".concat(blockClass, "__title-container--no-title-animation"), !animateTitle), "".concat(blockClass, "__title-container-is-animating"), !animationComplete || !open), "".concat(blockClass, "__title-container-without-title"), !title), "".concat(blockClass, "__title-container--reduced-motion"), reducedMotion.matches))
396
396
  }, currentStep > 0 && /*#__PURE__*/React.createElement(Button, {
397
397
  "aria-label": navigationBackIconDescription,
398
398
  kind: "ghost",
@@ -424,7 +424,7 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
424
424
  onClick: onRequestClose,
425
425
  ref: sidePanelCloseRef
426
426
  })), subtitle && /*#__PURE__*/React.createElement("p", {
427
- className: cx("".concat(blockClass, "__subtitle-text"), (_cx2 = {}, _defineProperty(_cx2, "".concat(blockClass, "__subtitle-text-no-animation"), !animateTitle), _defineProperty(_cx2, "".concat(blockClass, "__subtitle-text-no-animation-no-action-toolbar"), !animateTitle && (!actionToolbarButtons || !actionToolbarButtons.length)), _defineProperty(_cx2, "".concat(blockClass, "__subtitle-text-is-animating"), !animationComplete && animateTitle), _defineProperty(_cx2, "".concat(blockClass, "__subtitle-without-title"), !title), _cx2))
427
+ className: cx("".concat(blockClass, "__subtitle-text"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__subtitle-text-no-animation"), !animateTitle), "".concat(blockClass, "__subtitle-text-no-animation-no-action-toolbar"), !animateTitle && (!actionToolbarButtons || !actionToolbarButtons.length)), "".concat(blockClass, "__subtitle-text-is-animating"), !animationComplete && animateTitle), "".concat(blockClass, "__subtitle-without-title"), !title))
428
428
  }, subtitle), actionToolbarButtons && actionToolbarButtons.length && /*#__PURE__*/React.createElement("div", {
429
429
  className: cx("".concat(blockClass, "__action-toolbar"), _defineProperty({}, "".concat(blockClass, "__action-toolbar-no-animation"), !animateTitle))
430
430
  }, actionToolbarButtons.map(function (_ref6) {
@@ -489,7 +489,7 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
489
489
  className: "".concat(blockClass, "__visually-hidden")
490
490
  }, "Focus sentinel"), !animateTitle && renderHeader(), /*#__PURE__*/React.createElement("div", {
491
491
  ref: sidePanelInnerRef,
492
- className: cx("".concat(blockClass, "__inner-content"), (_cx4 = {}, _defineProperty(_cx4, "".concat(blockClass, "__static-inner-content"), !animateTitle), _defineProperty(_cx4, "".concat(blockClass, "__static-inner-content-no-actions"), !animateTitle && !(actions !== null && actions !== void 0 && actions.length)), _defineProperty(_cx4, "".concat(blockClass, "__inner-content-with-actions"), actions && actions.length), _cx4))
492
+ className: cx("".concat(blockClass, "__inner-content"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__static-inner-content"), !animateTitle), "".concat(blockClass, "__static-inner-content-no-actions"), !animateTitle && !(actions !== null && actions !== void 0 && actions.length)), "".concat(blockClass, "__inner-content-with-actions"), actions && actions.length))
493
493
  }, animateTitle && renderHeader(), /*#__PURE__*/React.createElement("div", {
494
494
  className: "".concat(blockClass, "__body-content")
495
495
  }, children), /*#__PURE__*/React.createElement(ActionSet, {
@@ -82,7 +82,6 @@ export var TagSetOverflow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
82
82
  }, overflowTags.filter(function (_, index) {
83
83
  return overflowTags.length > allTagsModalSearchThreshold ? index < allTagsModalSearchThreshold : index <= allTagsModalSearchThreshold;
84
84
  }).map(function (tag, index) {
85
- var _cx2;
86
85
  var tagProps = {};
87
86
  if (overflowType === 'tag') {
88
87
  tagProps.type = 'high-contrast';
@@ -91,7 +90,7 @@ export var TagSetOverflow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
91
90
  tagProps.filter = false;
92
91
  }
93
92
  return /*#__PURE__*/React.createElement("li", {
94
- className: cx("".concat(blockClass, "__tag-item"), (_cx2 = {}, _defineProperty(_cx2, "".concat(blockClass, "__tag-item--default"), overflowType === 'default'), _defineProperty(_cx2, "".concat(blockClass, "__tag-item--tag"), overflowType === 'tag'), _cx2)),
93
+ className: cx("".concat(blockClass, "__tag-item"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__tag-item--default"), overflowType === 'default'), "".concat(blockClass, "__tag-item--tag"), overflowType === 'tag')),
95
94
  key: index
96
95
  }, /*#__PURE__*/React.cloneElement(tag, tagProps));
97
96
  })), overflowTags.length > allTagsModalSearchThreshold && /*#__PURE__*/React.createElement(Link, {
@@ -112,6 +112,11 @@ Tearsheet.propTypes = _objectSpread({
112
112
  // we duplicate this Button prop to improve the DocGen here
113
113
  onClick: Button.propTypes.onClick
114
114
  })))]),
115
+ /**
116
+ * The aria-label for the tearsheet, which is optional.
117
+ * if it is not passed, the title will be used as the aria-label.
118
+ */
119
+ ariaLabel: PropTypes.string,
115
120
  /**
116
121
  * An optional class or classes to be added to the outermost element.
117
122
  */
@@ -100,6 +100,11 @@ TearsheetNarrow.propTypes = _objectSpread({
100
100
  // we duplicate this Button prop to improve the DocGen here
101
101
  onClick: Button.propTypes.onClick
102
102
  })))]),
103
+ /**
104
+ * The aria-label for the tearsheet, which is optional.
105
+ * if it is not passed, the title will be used as the aria-label.
106
+ */
107
+ ariaLabel: PropTypes.string,
103
108
  /**
104
109
  * An optional class or classes to be added to the outermost element.
105
110
  */
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["actions", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "selectorPrimaryFocus", "size", "portalTarget", "title", "verticalPosition"];
5
+ var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "selectorPrimaryFocus", "size", "portalTarget", "title", "verticalPosition"];
6
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; }
7
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; }
8
8
  /**
@@ -65,6 +65,7 @@ export var tearsheetHasCloseIcon = function tearsheetHasCloseIcon(actions, hasCl
65
65
  * */
66
66
  export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
67
67
  var actions = _ref.actions,
68
+ ariaLabel = _ref.ariaLabel,
68
69
  children = _ref.children,
69
70
  className = _ref.className,
70
71
  closeIconDescription = _ref.closeIconDescription,
@@ -179,7 +180,6 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
179
180
  }
180
181
  }
181
182
  if (position <= depth) {
182
- var _cx, _ref2, _cx3, _cx5, _cx6;
183
183
  // Include a modal header if and only if one or more of these is given.
184
184
  // We can't use a Wrap for the ModalHeader because ComposedModal requires
185
185
  // the direct child to be the ModalHeader instance.
@@ -188,11 +188,11 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
188
188
  // Include an ActionSet if and only if one or more actions is given.
189
189
  var includeActions = actions && (actions === null || actions === void 0 ? void 0 : actions.length) > 0;
190
190
  return renderPortalUse( /*#__PURE__*/React.createElement(ComposedModal, _extends({}, rest, {
191
- "aria-label": getNodeTextContent(title),
192
- className: cx(bc, className, (_cx = {}, _defineProperty(_cx, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth),
191
+ "aria-label": ariaLabel || getNodeTextContent(title),
192
+ className: cx(bc, className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth),
193
193
  // Don't apply this on the initial open of a single tearsheet.
194
- depth > 1 || depth === 1 && prevDepth.current > 1), _defineProperty(_cx, "".concat(bc, "--wide"), wide), _defineProperty(_cx, "".concat(bc, "--narrow"), !wide), _cx)),
195
- style: (_ref2 = {}, _defineProperty(_ref2, "--".concat(bc, "--stacking-scale-factor-single"), (width - 32) / width), _defineProperty(_ref2, "--".concat(bc, "--stacking-scale-factor-double"), (width - 64) / width), _ref2),
194
+ depth > 1 || depth === 1 && prevDepth.current > 1), "".concat(bc, "--wide"), wide), "".concat(bc, "--narrow"), !wide)),
195
+ style: _defineProperty(_defineProperty({}, "--".concat(bc, "--stacking-scale-factor-single"), (width - 32) / width), "--".concat(bc, "--stacking-scale-factor-double"), (width - 64) / width),
196
196
  containerClassName: cx("".concat(bc, "__container"), _defineProperty({}, "".concat(bc, "__container--lower"), verticalPosition === 'lower')),
197
197
  onClose: onClose,
198
198
  open: open,
@@ -203,7 +203,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
203
203
  selectorsFloatingMenus: [".".concat(carbonPrefix, "--overflow-menu-options"), ".".concat(carbonPrefix, "--tooltip"), '.flatpickr-calendar', ".".concat(bc, "__container")],
204
204
  size: "sm"
205
205
  }), includeHeader && /*#__PURE__*/React.createElement(ModalHeader, {
206
- className: cx("".concat(bc, "__header"), (_cx3 = {}, _defineProperty(_cx3, "".concat(bc, "__header--with-close-icon"), effectiveHasCloseIcon), _defineProperty(_cx3, "".concat(bc, "__header--with-nav"), navigation), _cx3)),
206
+ className: cx("".concat(bc, "__header"), _defineProperty(_defineProperty({}, "".concat(bc, "__header--with-close-icon"), effectiveHasCloseIcon), "".concat(bc, "__header--with-nav"), navigation)),
207
207
  closeClassName: cx(_defineProperty({}, "".concat(bc, "__header--no-close-icon"), !effectiveHasCloseIcon)),
208
208
  closeModal: onClose,
209
209
  iconDescription: closeIconDescription
@@ -228,7 +228,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
228
228
  element: ModalBody,
229
229
  className: "".concat(bc, "__body")
230
230
  }, /*#__PURE__*/React.createElement(Wrap, {
231
- className: cx((_cx5 = {}, _defineProperty(_cx5, "".concat(bc, "__influencer"), true), _defineProperty(_cx5, "".concat(bc, "__influencer--wide"), influencerWidth === 'wide'), _cx5)),
231
+ className: cx(_defineProperty(_defineProperty({}, "".concat(bc, "__influencer"), true), "".concat(bc, "__influencer--wide"), influencerWidth === 'wide')),
232
232
  neverRender: influencerPosition === 'right'
233
233
  }, influencer), /*#__PURE__*/React.createElement(Wrap, {
234
234
  className: "".concat(bc, "__right")
@@ -239,7 +239,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
239
239
  className: "".concat(bc, "__content"),
240
240
  alwaysRender: influencer && influencerPosition === 'right'
241
241
  }, children), /*#__PURE__*/React.createElement(Wrap, {
242
- className: cx((_cx6 = {}, _defineProperty(_cx6, "".concat(bc, "__influencer"), true), _defineProperty(_cx6, "".concat(bc, "__influencer--wide"), influencerWidth === 'wide'), _cx6)),
242
+ className: cx(_defineProperty(_defineProperty({}, "".concat(bc, "__influencer"), true), "".concat(bc, "__influencer--wide"), influencerWidth === 'wide')),
243
243
  neverRender: influencerPosition !== 'right'
244
244
  }, influencer)), includeActions && /*#__PURE__*/React.createElement(Wrap, {
245
245
  className: "".concat(bc, "__button-container")
@@ -44,7 +44,6 @@ var defaults = {
44
44
  * The `WebTerminal` is prompted by the user and is persistent until dismissed. The purpose of a web terminal is to provide users with the ability to type commands manually instead of using the GUI.
45
45
  */
46
46
  export var WebTerminal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47
- var _ref3;
48
47
  var _ref$actions = _ref.actions,
49
48
  actions = _ref$actions === void 0 ? defaults.actions : _ref$actions,
50
49
  children = _ref.children,
@@ -108,7 +107,7 @@ export var WebTerminal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
108
107
  };
109
108
  return shouldRender ? /*#__PURE__*/React.createElement("div", _extends({}, _objectSpread(_objectSpread({}, rest), getDevtoolsProps(componentName)), {
110
109
  ref: ref,
111
- className: cx([blockClass, className, (_ref3 = {}, _defineProperty(_ref3, "".concat(blockClass, "--open"), open), _defineProperty(_ref3, "".concat(blockClass, "--closed"), !open), _ref3)]),
110
+ className: cx([blockClass, className, _defineProperty(_defineProperty({}, "".concat(blockClass, "--open"), open), "".concat(blockClass, "--closed"), !open)]),
112
111
  style: {
113
112
  animation: !prefersReducedMotion && webTerminalAnimationName
114
113
  },