@carbon/ibm-products 1.59.0 → 1.60.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/css/index-full-carbon.css +97 -65
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +3 -3
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon.css +53 -21
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +2 -2
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +97 -65
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +3 -3
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/Checklist/ChecklistChart.js +2 -2
  14. package/es/components/Datagrid/Datagrid/Datagrid.js +2 -1
  15. package/es/components/Datagrid/Datagrid/DatagridContent.js +15 -7
  16. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +3 -2
  17. package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +26 -13
  18. package/es/components/Datagrid/Datagrid/DatagridRow.js +41 -33
  19. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +13 -1
  20. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +3 -15
  21. package/es/components/Datagrid/Datagrid/DraggableElement.js +32 -135
  22. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +14 -38
  23. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -0
  24. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +128 -40
  25. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +7 -6
  26. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +104 -18
  27. package/es/components/Datagrid/Datagrid/addons/Filtering/constants.js +1 -0
  28. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +37 -4
  29. package/es/components/Datagrid/useExpandedRow.js +1 -1
  30. package/es/components/Datagrid/useFiltering.js +4 -1
  31. package/es/components/Datagrid/useNestedRowExpander.js +22 -9
  32. package/es/components/Datagrid/useRowExpander.js +22 -9
  33. package/es/components/Datagrid/utils/DatagridPagination.js +1 -1
  34. package/es/components/Datagrid/utils/getArgTypes.js +12 -0
  35. package/es/components/EmptyStates/EmptyState.js +1 -1
  36. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  37. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  38. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  39. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  40. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  41. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  42. package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -11
  43. package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -11
  44. package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -12
  45. package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -12
  46. package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -12
  47. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -12
  48. package/es/components/FilterSummary/FilterSummary.js +9 -3
  49. package/es/components/TagSet/TagSet.js +3 -7
  50. package/es/global/js/hooks/useWindowScroll.js +5 -0
  51. package/lib/components/Checklist/ChecklistChart.js +2 -2
  52. package/lib/components/Datagrid/Datagrid/Datagrid.js +2 -1
  53. package/lib/components/Datagrid/Datagrid/DatagridContent.js +14 -6
  54. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -1
  55. package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +26 -13
  56. package/lib/components/Datagrid/Datagrid/DatagridRow.js +41 -33
  57. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +13 -1
  58. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +3 -15
  59. package/lib/components/Datagrid/Datagrid/DraggableElement.js +34 -140
  60. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +17 -38
  61. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -0
  62. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +128 -47
  63. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +7 -6
  64. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +104 -24
  65. package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +4 -2
  66. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +36 -3
  67. package/lib/components/Datagrid/useExpandedRow.js +1 -1
  68. package/lib/components/Datagrid/useFiltering.js +4 -1
  69. package/lib/components/Datagrid/useNestedRowExpander.js +24 -9
  70. package/lib/components/Datagrid/useRowExpander.js +24 -9
  71. package/lib/components/Datagrid/utils/DatagridPagination.js +1 -1
  72. package/lib/components/Datagrid/utils/getArgTypes.js +12 -0
  73. package/lib/components/EmptyStates/EmptyState.js +1 -1
  74. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  75. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  76. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  77. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  78. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  79. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  80. package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -11
  81. package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -11
  82. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -12
  83. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -12
  84. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -12
  85. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -12
  86. package/lib/components/FilterSummary/FilterSummary.js +9 -10
  87. package/lib/components/TagSet/TagSet.js +2 -6
  88. package/lib/global/js/hooks/useWindowScroll.js +6 -0
  89. package/package.json +8 -7
  90. package/scss/components/Datagrid/_datagrid.scss +1 -1
  91. package/scss/components/Datagrid/styles/_datagrid.scss +5 -0
  92. package/scss/components/Datagrid/styles/_draggableElement.scss +44 -20
  93. package/scss/components/Datagrid/styles/_useExpandedRow.scss +10 -0
  94. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +0 -1
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  /**
3
- * Copyright IBM Corp. 2022, 2022
3
+ * Copyright IBM Corp. 2022, 2023
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.
@@ -91,6 +91,18 @@ export var ARG_TYPES = {
91
91
  },
92
92
  description: 'This value controls the height of the expanded content area. _This value is set/passed inside of the `datagridState` object._'
93
93
  },
94
+ expanderButtonTitleExpanded: {
95
+ control: {
96
+ type: 'text'
97
+ },
98
+ description: 'This value controls the expander title/aria-label when expanded. _This value is set/passed inside of the `datagridState` object._'
99
+ },
100
+ expanderButtonTitleCollapsed: {
101
+ control: {
102
+ type: 'text'
103
+ },
104
+ description: 'This value controls the expander title/aria-label when expanded. _This value is set/passed inside of the `datagridState` object._'
105
+ },
94
106
  customizeColumnsProps: {
95
107
  control: 'object',
96
108
  description: 'This is an object containing all of the props used with the column customization extension. _This value is set/passed inside of the `datagridState` object._'
@@ -50,7 +50,7 @@ export var EmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50
50
  });
51
51
  };
52
52
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
53
- className: cx(blockClass, className),
53
+ className: cx(blockClass, className, "".concat(blockClass, "-type--default")),
54
54
  ref: ref
55
55
  }, getDevtoolsProps(componentName)), illustration && renderIllustration(), /*#__PURE__*/React.createElement(EmptyStateContent, {
56
56
  action: action,
@@ -38,7 +38,7 @@ export var ErrorEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
38
38
  title = _ref.title,
39
39
  rest = _objectWithoutProperties(_ref, _excluded);
40
40
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
41
- className: cx(blockClass, className),
41
+ className: cx(blockClass, className, "".concat(blockClass, "-type--error")),
42
42
  ref: ref
43
43
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(ErrorIllustration, {
44
44
  theme: illustrationTheme,
@@ -38,7 +38,7 @@ export var NoDataEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
38
38
  title = _ref.title,
39
39
  rest = _objectWithoutProperties(_ref, _excluded);
40
40
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
41
- className: cx(blockClass, className),
41
+ className: cx(blockClass, className, "".concat(blockClass, "-type--noData")),
42
42
  ref: ref
43
43
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NoDataIllustration, {
44
44
  theme: illustrationTheme,
@@ -38,7 +38,7 @@ export var NoTagsEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
38
38
  title = _ref.title,
39
39
  rest = _objectWithoutProperties(_ref, _excluded);
40
40
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
41
- className: cx(blockClass, className),
41
+ className: cx(blockClass, className, "".concat(blockClass, "-type--noTags")),
42
42
  ref: ref
43
43
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NoTagsIllustration, {
44
44
  theme: illustrationTheme,
@@ -38,7 +38,7 @@ export var NotFoundEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, re
38
38
  title = _ref.title,
39
39
  rest = _objectWithoutProperties(_ref, _excluded);
40
40
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
41
- className: cx(blockClass, className),
41
+ className: cx(blockClass, className, "".concat(blockClass, "-type--notFound")),
42
42
  ref: ref
43
43
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NotFoundIllustration, {
44
44
  theme: illustrationTheme,
@@ -38,7 +38,7 @@ export var NotificationsEmptyState = /*#__PURE__*/React.forwardRef(function (_re
38
38
  title = _ref.title,
39
39
  rest = _objectWithoutProperties(_ref, _excluded);
40
40
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
41
- className: cx(blockClass, className),
41
+ className: cx(blockClass, className, "".concat(blockClass, "-type--notifications")),
42
42
  ref: ref
43
43
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NotificationsIllustration, {
44
44
  size: size,
@@ -38,7 +38,7 @@ export var UnauthorizedEmptyState = /*#__PURE__*/React.forwardRef(function (_ref
38
38
  title = _ref.title,
39
39
  rest = _objectWithoutProperties(_ref, _excluded);
40
40
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
41
- className: cx(blockClass, className),
41
+ className: cx(blockClass, className, "".concat(blockClass, "-type--default")),
42
42
  ref: ref
43
43
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(UnauthorizedIllustration, {
44
44
  size: size,
@@ -24,13 +24,14 @@ export var ErrorIllustration = function ErrorIllustration(_ref) {
24
24
  size = _ref.size,
25
25
  rest = _objectWithoutProperties(_ref, _excluded);
26
26
  var svgId = uuidv4();
27
- return theme === 'dark' ? /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
27
+ return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
28
28
  xmlns: "http://www.w3.org/2000/svg",
29
29
  width: 80,
30
30
  height: 80,
31
31
  viewBox: "0 0 80 80",
32
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
33
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
32
+ className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-error"), "".concat(blockClass, "__illustration--").concat(size)]),
33
+ role: "img"
34
+ }), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
34
35
  id: "prefix__a_dark_".concat(svgId),
35
36
  x1: 38.9,
36
37
  y1: 77.08,
@@ -94,13 +95,7 @@ export var ErrorIllustration = function ErrorIllustration(_ref) {
94
95
  }), /*#__PURE__*/React.createElement("path", {
95
96
  d: "M38.93 49.79a6.9 6.9 0 01-2.66-2.51 6.11 6.11 0 01-.81-3v-1a2.26 2.26 0 01.81-2c.54-.35 1.43-.17 2.66.54a6.71 6.71 0 012.61 2.5 6.06 6.06 0 01.81 3v1a2.24 2.24 0 01-.81 2.05c-.54.29-1.41.12-2.61-.58zm-1.16-11.63L36 22.77V13l5.81 3.36v9.73l-1.64 13.46z",
96
97
  fill: "#525252"
97
- })) : /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
98
- xmlns: "http://www.w3.org/2000/svg",
99
- width: 80,
100
- height: 80,
101
- viewBox: "0 0 80 80",
102
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
103
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
98
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
104
99
  id: "prefix__a_".concat(svgId),
105
100
  x1: 29.96,
106
101
  y1: 45.68,
@@ -210,7 +205,7 @@ export var ErrorIllustration = function ErrorIllustration(_ref) {
210
205
  }), /*#__PURE__*/React.createElement("path", {
211
206
  d: "M38.93 49.79a6.9 6.9 0 01-2.66-2.51 6.11 6.11 0 01-.81-3v-1a2.26 2.26 0 01.81-2c.54-.35 1.43-.17 2.66.54a6.71 6.71 0 012.61 2.5 6.06 6.06 0 01.81 3v1a2.24 2.24 0 01-.81 2.05c-.54.29-1.41.12-2.61-.58zm-1.16-11.63L36 22.77V13l5.81 3.36v9.73l-1.64 13.46z",
212
207
  fill: "url(#prefix__e_".concat(svgId, ")")
213
- }));
208
+ })));
214
209
  };
215
210
  ErrorIllustration.propTypes = {
216
211
  size: PropTypes.oneOf(['lg', 'sm']),
@@ -24,13 +24,14 @@ export var NoDataIllustration = function NoDataIllustration(_ref) {
24
24
  size = _ref.size,
25
25
  rest = _objectWithoutProperties(_ref, _excluded);
26
26
  var svgId = uuidv4();
27
- return theme === 'dark' ? /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
27
+ return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
28
28
  xmlns: "http://www.w3.org/2000/svg",
29
29
  width: 80,
30
30
  height: 80,
31
31
  viewBox: "0 0 80 80",
32
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
33
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
32
+ className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noData"), "".concat(blockClass, "__illustration--").concat(size)]),
33
+ role: "img"
34
+ }), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
34
35
  id: "prefix__a_dark_".concat(svgId),
35
36
  x1: 11.12,
36
37
  y1: 43.34,
@@ -93,13 +94,7 @@ export var NoDataIllustration = function NoDataIllustration(_ref) {
93
94
  }), /*#__PURE__*/React.createElement("path", {
94
95
  fill: "#525252",
95
96
  d: "M21.49 33.33l-8.2-4.73.01-5.69 8.19 4.74v5.68z"
96
- })) : /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
97
- xmlns: "http://www.w3.org/2000/svg",
98
- width: 80,
99
- height: 80,
100
- viewBox: "0 0 80 80",
101
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
102
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
97
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
103
98
  id: "prefix__a_".concat(svgId),
104
99
  x1: 18.35,
105
100
  y1: 74.17,
@@ -173,7 +168,7 @@ export var NoDataIllustration = function NoDataIllustration(_ref) {
173
168
  }), /*#__PURE__*/React.createElement("path", {
174
169
  className: "prefix__g_".concat(svgId),
175
170
  d: "M40 35.24L11.13 18.57v-.24l.21-.12 28.87 16.67-.21.11v.25zM21.49 33.33l-8.2-4.73.01-5.69 8.19 4.74v5.68z"
176
- }));
171
+ })));
177
172
  };
178
173
  NoDataIllustration.propTypes = {
179
174
  size: PropTypes.oneOf(['lg', 'sm']),
@@ -24,14 +24,15 @@ export var NoTagsIllustration = function NoTagsIllustration(_ref) {
24
24
  size = _ref.size,
25
25
  rest = _objectWithoutProperties(_ref, _excluded);
26
26
  var svgId = uuidv4();
27
- return theme === 'dark' ? /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
27
+ return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
28
28
  xmlns: "http://www.w3.org/2000/svg",
29
29
  xmlnsXlink: "http://www.w3.org/1999/xlink",
30
30
  width: 80,
31
31
  height: 80,
32
32
  viewBox: "0 0 80 80",
33
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
34
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
33
+ className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noTags"), "".concat(blockClass, "__illustration--").concat(size)]),
34
+ role: "img"
35
+ }), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
35
36
  id: "prefix__c_dark_".concat(svgId),
36
37
  x1: 34.96,
37
38
  y1: 5.37,
@@ -231,14 +232,7 @@ export var NoTagsIllustration = function NoTagsIllustration(_ref) {
231
232
  }), /*#__PURE__*/React.createElement("path", {
232
233
  d: "M35.67 16.33a2.88 2.88 0 011.41.43 7 7 0 013.13 5.44c0 1.42-.7 2.24-1.73 2.24a2.82 2.82 0 01-1.4-.43 6.93 6.93 0 01-3.14-5.44c0-1.42.7-2.24 1.73-2.24m0-.41c-1.3 0-2.15 1-2.15 2.65a7.3 7.3 0 003.35 5.8 3.23 3.23 0 001.61.48c1.3 0 2.15-1 2.15-2.65a7.29 7.29 0 00-3.35-5.8 3.2 3.2 0 00-1.61-.48z",
233
234
  fill: "url(#prefix__i_dark_".concat(svgId, ")")
234
- })) : /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
235
- xmlns: "http://www.w3.org/2000/svg",
236
- xmlnsXlink: "http://www.w3.org/1999/xlink",
237
- width: 80,
238
- height: 80,
239
- viewBox: "0 0 80 80",
240
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
241
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
235
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
242
236
  id: "prefix__b_".concat(svgId),
243
237
  x1: 634.81,
244
238
  y1: 667.18,
@@ -481,7 +475,7 @@ export var NoTagsIllustration = function NoTagsIllustration(_ref) {
481
475
  }), /*#__PURE__*/React.createElement("path", {
482
476
  d: "M35.67 16.33a2.88 2.88 0 011.41.43 7 7 0 013.13 5.44c0 1.42-.7 2.24-1.73 2.24a2.82 2.82 0 01-1.4-.43 6.93 6.93 0 01-3.14-5.44c0-1.42.7-2.24 1.73-2.24m0-.41c-1.3 0-2.15 1-2.15 2.65a7.3 7.3 0 003.35 5.8 3.23 3.23 0 001.61.48c1.3 0 2.15-1 2.15-2.65a7.29 7.29 0 00-3.35-5.8 3.2 3.2 0 00-1.61-.48z",
483
477
  fill: "url(#prefix__j_".concat(svgId, ")")
484
- }));
478
+ })));
485
479
  };
486
480
  NoTagsIllustration.propTypes = {
487
481
  size: PropTypes.oneOf(['lg', 'sm']),
@@ -24,13 +24,14 @@ export var NotFoundIllustration = function NotFoundIllustration(_ref) {
24
24
  size = _ref.size,
25
25
  rest = _objectWithoutProperties(_ref, _excluded);
26
26
  var svgId = uuidv4();
27
- return theme === 'dark' ? /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
27
+ return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
28
28
  xmlns: "http://www.w3.org/2000/svg",
29
29
  width: 80,
30
30
  height: 80,
31
31
  viewBox: "0 0 80 80",
32
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
33
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
32
+ className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notFound"), "".concat(blockClass, "__illustration--").concat(size)]),
33
+ role: "img"
34
+ }), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
34
35
  id: "prefix__a_dark_".concat(svgId),
35
36
  x1: 2.6,
36
37
  y1: -12.81,
@@ -181,14 +182,7 @@ export var NotFoundIllustration = function NotFoundIllustration(_ref) {
181
182
  }), /*#__PURE__*/React.createElement("path", {
182
183
  d: "M57 37.5c0-12-8.75-26.85-19.56-33.08C31.82 1.16 26.73.89 23.16 3.09l-4.83 2.78 1.19 1.94c3.25-1.74 7.72-1.38 12.67 1.47C42.09 15 50.11 28.57 50.11 39.6c0 4.86-1.55 8.4-4.11 10.4-.12.1-1.17.73-1.31.82l2.12 1.42 4.83-2.79C55 47.44 57 43.34 57 37.5",
183
184
  fill: "url(#prefix__f_dark_".concat(svgId, ")")
184
- })) : /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
185
- xmlns: "http://www.w3.org/2000/svg",
186
- xmlnsXlink: "http://www.w3.org/1999/xlink",
187
- width: 80,
188
- height: 80,
189
- viewBox: "0 0 80 80",
190
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
191
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
185
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
192
186
  id: "prefix__a_".concat(svgId),
193
187
  x1: 2.6,
194
188
  y1: -12.81,
@@ -358,7 +352,7 @@ export var NotFoundIllustration = function NotFoundIllustration(_ref) {
358
352
  }), /*#__PURE__*/React.createElement("path", {
359
353
  d: "M57 37.5c0-12-8.75-26.85-19.56-33.08C31.82 1.16 26.73.89 23.16 3.09l-4.83 2.78 1.19 1.94c3.25-1.74 7.72-1.38 12.67 1.47C42.09 15 50.11 28.57 50.11 39.6c0 4.86-1.55 8.4-4.11 10.4-.12.1-1.17.73-1.31.82l2.12 1.42 4.83-2.79C55 47.44 57 43.34 57 37.5",
360
354
  fill: "url(#prefix__g_".concat(svgId, ")")
361
- }));
355
+ })));
362
356
  };
363
357
  NotFoundIllustration.propTypes = {
364
358
  size: PropTypes.oneOf(['lg', 'sm']),
@@ -24,13 +24,14 @@ export var NotificationsIllustration = function NotificationsIllustration(_ref)
24
24
  size = _ref.size,
25
25
  rest = _objectWithoutProperties(_ref, _excluded);
26
26
  var svgId = uuidv4();
27
- return theme === 'dark' ? /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
27
+ return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
28
28
  xmlns: "http://www.w3.org/2000/svg",
29
29
  width: 80,
30
30
  height: 80,
31
31
  viewBox: "0 0 80 80",
32
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
33
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
32
+ className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notification"), "".concat(blockClass, "__illustration--").concat(size)]),
33
+ role: "img"
34
+ }), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
34
35
  id: "prefix__a_dark_".concat(svgId),
35
36
  x1: 30.05,
36
37
  y1: 54.31,
@@ -126,14 +127,7 @@ export var NotificationsIllustration = function NotificationsIllustration(_ref)
126
127
  }), /*#__PURE__*/React.createElement("path", {
127
128
  d: "M60.76 30.55a2.54 2.54 0 01.14.8v3.95l.41-.13v-3.82a3.54 3.54 0 00-1.63-2.82L16.86 3.8a2.09 2.09 0 00-.44-.19l-.78.45a1 1 0 01.21-.06h.48l.27.12 21.47 12.4 21.41 12.36a3.19 3.19 0 011.28 1.67z",
128
129
  fill: "url(#prefix__d_dark_".concat(svgId, ")")
129
- })) : /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
130
- xmlns: "http://www.w3.org/2000/svg",
131
- xmlnsXlink: "http://www.w3.org/1999/xlink",
132
- width: 80,
133
- height: 80,
134
- viewBox: "0 0 80 80",
135
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
136
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
130
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
137
131
  id: "prefix__a_".concat(svgId),
138
132
  x1: 61.44,
139
133
  y1: 66.99,
@@ -329,7 +323,7 @@ export var NotificationsIllustration = function NotificationsIllustration(_ref)
329
323
  }), /*#__PURE__*/React.createElement("path", {
330
324
  d: "M60.76 30.55a2.54 2.54 0 01.14.8v3.95l.41-.13v-3.82a3.54 3.54 0 00-1.63-2.82L16.86 3.8a2.09 2.09 0 00-.44-.19l-.78.45a1 1 0 01.21-.06h.48l.27.12 21.47 12.4 21.41 12.36a3.19 3.19 0 011.28 1.67z",
331
325
  fill: "url(#prefix__k_".concat(svgId, ")")
332
- }));
326
+ })));
333
327
  };
334
328
  NotificationsIllustration.propTypes = {
335
329
  size: PropTypes.oneOf(['lg', 'sm']),
@@ -24,14 +24,15 @@ export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
24
24
  size = _ref.size,
25
25
  rest = _objectWithoutProperties(_ref, _excluded);
26
26
  var svgId = uuidv4();
27
- return theme === 'dark' ? /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
27
+ return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
28
28
  xmlns: "http://www.w3.org/2000/svg",
29
29
  xmlnsXlink: "http://www.w3.org/1999/xlink",
30
30
  width: 80,
31
31
  height: 80,
32
32
  viewBox: "0 0 80 80",
33
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
34
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
33
+ className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-unauthorized"), "".concat(blockClass, "__illustration--").concat(size)]),
34
+ role: "img"
35
+ }), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
35
36
  id: "prefix__b_dark_".concat(svgId),
36
37
  x1: 17.33,
37
38
  y1: 40.68,
@@ -114,14 +115,7 @@ export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
114
115
  }), /*#__PURE__*/React.createElement("path", {
115
116
  d: "M51.41 38.51a1.9 1.9 0 00-.64-.65l-1.1-.63-28.49-16.45-.1-.05-.61.35a.33.33 0 01.17 0 .6.6 0 01.32.1l28.5 16.41 1.1.63a1.5 1.5 0 01.49.51s.05.09.08.14l.36-.21z",
116
117
  fill: "#6f6f6f"
117
- })) : /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
118
- xmlns: "http://www.w3.org/2000/svg",
119
- xmlnsXlink: "http://www.w3.org/1999/xlink",
120
- width: 80,
121
- height: 80,
122
- viewBox: "0 0 80 80",
123
- className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
124
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
118
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
125
119
  id: "prefix__b",
126
120
  x1: 27.98,
127
121
  y1: 73.72,
@@ -302,7 +296,7 @@ export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
302
296
  }), /*#__PURE__*/React.createElement("path", {
303
297
  d: "M51.41 38.51a1.9 1.9 0 00-.64-.65l-1.1-.63-28.49-16.45-.1-.05-.61.35a.33.33 0 01.17 0 .6.6 0 01.32.1l28.5 16.41 1.1.63a1.5 1.5 0 01.49.51s.05.09.08.14l.36-.21z",
304
298
  fill: "url(#prefix__h_".concat(svgId, ")")
305
- }));
299
+ })));
306
300
  };
307
301
  UnauthorizedIllustration.propTypes = {
308
302
  size: PropTypes.oneOf(['lg', 'sm']),
@@ -1,3 +1,8 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["key", "value"];
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
6
  /**
2
7
  * Copyright IBM Corp. 2022, 2022
3
8
  *
@@ -25,11 +30,12 @@ var FilterSummary = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
25
30
  var tagFilters = filters.map(function (_ref2) {
26
31
  var _renderLabel;
27
32
  var key = _ref2.key,
28
- value = _ref2.value;
29
- return {
33
+ value = _ref2.value,
34
+ rest = _objectWithoutProperties(_ref2, _excluded);
35
+ return _objectSpread(_objectSpread({}, rest), {}, {
30
36
  type: 'gray',
31
37
  label: (_renderLabel = renderLabel === null || renderLabel === void 0 ? void 0 : renderLabel(key, value)) !== null && _renderLabel !== void 0 ? _renderLabel : "".concat(key, ": ").concat(value)
32
- };
38
+ });
33
39
  });
34
40
  return /*#__PURE__*/React.createElement("div", {
35
41
  ref: ref,
@@ -23,7 +23,7 @@ import { TagSetModal } from './TagSetModal';
23
23
  import { Tag } from 'carbon-components-react';
24
24
  import { useResizeObserver } from '../../global/js/hooks/useResizeObserver';
25
25
  import { getDevtoolsProps } from '../../global/js/utils/devtools';
26
- import { prepareProps, isRequiredIf } from '../../global/js/utils/props-helper';
26
+ import { isRequiredIf } from '../../global/js/utils/props-helper';
27
27
  import { pkg } from '../../settings';
28
28
  var componentName = 'TagSet';
29
29
  var blockClass = "".concat(pkg.prefix, "--tag-set");
@@ -110,8 +110,7 @@ export var TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
110
110
  }
111
111
  }, /*#__PURE__*/React.createElement(Tag, _extends({}, other, {
112
112
  // ensure id is not duplicated
113
- "data-original-id": id,
114
- filter: false
113
+ "data-original-id": id
115
114
  }), label));
116
115
  }) : []);
117
116
  setSizingTags(newSizingTags);
@@ -122,7 +121,6 @@ export var TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
122
121
  var label = _ref3.label,
123
122
  other = _objectWithoutProperties(_ref3, _excluded3);
124
123
  return /*#__PURE__*/React.createElement(Tag, _extends({}, other, {
125
- filter: false,
126
124
  key: "displayed-tag-".concat(index)
127
125
  }), label);
128
126
  }) : [];
@@ -313,12 +311,10 @@ TagSet.propTypes = {
313
311
  * with properties: **label**\* (required) to supply the tag content, and
314
312
  * other properties will be passed to the Carbon Tag component, such as
315
313
  * **type**, **disabled**, **ref**, **className** , and any other Tag props.
316
- * NOTE: **filter** is not supported. Any other fields in the object will be passed through to the HTML element
317
- * as HTML attributes.
318
314
  *
319
315
  * See https://react.carbondesignsystem.com/?path=/docs/components-tag--default
320
316
  */
321
- tags: PropTypes.arrayOf(PropTypes.shape(_objectSpread(_objectSpread({}, prepareProps(Tag.propTypes, 'filter')), {}, {
317
+ tags: PropTypes.arrayOf(PropTypes.shape(_objectSpread(_objectSpread({}, Tag.propTypes), {}, {
322
318
  label: PropTypes.string.isRequired,
323
319
  // we duplicate this prop to improve the DocGen
324
320
  type: PropTypes.oneOf(tagTypes)
@@ -68,4 +68,9 @@ export function useNearestScroll(ref, effect, deps) {
68
68
  scrollableTarget = window;
69
69
  }
70
70
  return useTargetScroll(scrollableTarget, effect, deps, throttle);
71
+ }
72
+ export function useScroll(ref, effect, deps) {
73
+ var _ref$current;
74
+ var throttle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
75
+ return useTargetScroll((_ref$current = ref === null || ref === void 0 ? void 0 : ref.current) !== null && _ref$current !== void 0 ? _ref$current : null, effect, deps, throttle);
71
76
  }
@@ -47,8 +47,8 @@ var ChecklistChart = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
47
47
  theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
48
48
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
49
49
  var numDegrees = (0, _clamp.default)(value * 360, 0, 360);
50
- var circleColor = theme === 'light' ? '#c6c6c6' : '#525252'; // $gray-30, $gray-70
51
- var progressColor = theme === 'light' ? '#6929c4' : '#A56EFF'; // $purple-70, $purple-50
50
+ var circleColor = theme === 'light' ? '#e0e0e0' : '#525252'; // $ui-03 (-ish)
51
+ var progressColor = theme === 'light' ? '#a56eff' : '#a56eff'; // $purple-50
52
52
 
53
53
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, {
54
54
  className: (0, _classnames.default)(blockClass, className),
@@ -40,7 +40,8 @@ var Datagrid = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
40
40
  datagridState: datagridState
41
41
  };
42
42
  return /*#__PURE__*/_react.default.createElement(_FilterProvider.FilterProvider, {
43
- filters: filters
43
+ filters: filters,
44
+ filterProps: filterProps
44
45
  }, /*#__PURE__*/_react.default.createElement(_InlineEditContext.InlineEditProvider, null, /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, {
45
46
  id: tableId,
46
47
  ref: ref,
@@ -26,10 +26,12 @@ var _FilterPanel = _interopRequireDefault(require("./addons/Filtering/FilterPane
26
26
  var _FilterSummary = require("../../FilterSummary");
27
27
  var _Filtering = require("./addons/Filtering");
28
28
  var _constants = require("./addons/Filtering/constants");
29
+ var _hooks3 = require("./addons/Filtering/hooks");
30
+ var _FilterProvider = require("./addons/Filtering/FilterProvider");
29
31
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
33
  /**
32
- * Copyright IBM Corp. 2022, 2022
34
+ * Copyright IBM Corp. 2022, 2023
33
35
  *
34
36
  * This source code is licensed under the Apache-2.0 license found in the
35
37
  * LICENSE file in the root directory of this source tree.
@@ -72,8 +74,11 @@ var DatagridContent = function DatagridContent(_ref) {
72
74
  DatagridActions = datagridState.DatagridActions,
73
75
  totalColumnsWidth = datagridState.totalColumnsWidth,
74
76
  gridRef = datagridState.gridRef,
75
- state = datagridState.state;
76
- var rows = DatagridPagination && datagridState.page || datagridState.rows;
77
+ setAllFilters = datagridState.setAllFilters,
78
+ state = datagridState.state,
79
+ page = datagridState.page,
80
+ rows = datagridState.rows;
81
+ var contentRows = DatagridPagination && page || rows;
77
82
  var gridAreaRef = (0, _react.useRef)();
78
83
  var multiKeyTrackingRef = (0, _react.useRef)();
79
84
  (0, _hooks.useClickOutside)(gridAreaRef, function (target) {
@@ -111,8 +116,8 @@ var DatagridContent = function DatagridContent(_ref) {
111
116
  return (0, _handleGridFocus.handleGridFocus)(inlineEditState, dispatch);
112
117
  } : null,
113
118
  title: title
114
- }), !withVirtualScroll ? /*#__PURE__*/_react.default.createElement(_DatagridHead.default, datagridState) : null, /*#__PURE__*/_react.default.createElement(_DatagridBody.default, (0, _extends2.default)({}, datagridState, {
115
- rows: rows
119
+ }), !withVirtualScroll && /*#__PURE__*/_react.default.createElement(_DatagridHead.default, datagridState), /*#__PURE__*/_react.default.createElement(_DatagridBody.default, (0, _extends2.default)({}, datagridState, {
120
+ rows: contentRows
116
121
  })));
117
122
  };
118
123
  var _useMultipleKeyTracki = (0, _hooks2.useMultipleKeyTracking)({
@@ -135,6 +140,9 @@ var DatagridContent = function DatagridContent(_ref) {
135
140
  gridElement.style.setProperty("--".concat(blockClass, "--grid-header-height"), (0, _layout.px)((tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.clientHeight) || 0));
136
141
  }
137
142
  }, [withInlineEdit, tableId, totalColumnsWidth, datagridState, gridActive]);
143
+ (0, _hooks3.useSubscribeToEventEmitter)(_constants.CLEAR_SINGLE_FILTER, function (id) {
144
+ return (0, _FilterProvider.clearSingleFilter)(id, setAllFilters, state);
145
+ });
138
146
  var renderFilterSummary = function renderFilterSummary() {
139
147
  return state.filters.length > 0 && /*#__PURE__*/_react.default.createElement(_FilterSummary.FilterSummary, {
140
148
  className: "".concat(blockClass, "__filter-summary"),
@@ -163,7 +171,7 @@ var DatagridContent = function DatagridContent(_ref) {
163
171
  }, renderTable()) : withVirtualScroll ? /*#__PURE__*/_react.default.createElement("div", {
164
172
  className: "".concat(blockClass, "__virtualScrollContainer"),
165
173
  ref: gridRef
166
- }, renderTable()) : renderTable()))), (rows === null || rows === void 0 ? void 0 : rows.length) > 0 && !isFetching && DatagridPagination && /*#__PURE__*/_react.default.createElement(DatagridPagination, datagridState), CustomizeColumnsTearsheet && /*#__PURE__*/_react.default.createElement(CustomizeColumnsTearsheet, {
174
+ }, renderTable()) : renderTable()))), (contentRows === null || contentRows === void 0 ? void 0 : contentRows.length) > 0 && !isFetching && DatagridPagination && /*#__PURE__*/_react.default.createElement(DatagridPagination, datagridState), CustomizeColumnsTearsheet && /*#__PURE__*/_react.default.createElement(CustomizeColumnsTearsheet, {
167
175
  instance: datagridState
168
176
  }));
169
177
  };
@@ -40,13 +40,14 @@ var DatagridEmptyBody = function DatagridEmptyBody(datagridState) {
40
40
  action: emptyStateAction,
41
41
  link: emptyStateLink
42
42
  };
43
+ var validEmptyStates = ['error', 'noData', 'notFound'];
43
44
  return /*#__PURE__*/_react.default.createElement(TableBody, (0, _extends2.default)({}, getTableBodyProps({
44
45
  role: false
45
46
  }), {
46
47
  className: "".concat(blockClass, "__empty-state-body")
47
48
  }), /*#__PURE__*/_react.default.createElement(TableRow, null, /*#__PURE__*/_react.default.createElement(TableCell, {
48
49
  colSpan: headers.length
49
- }, emptyStateType === 'error' && /*#__PURE__*/_react.default.createElement(_EmptyStates.ErrorEmptyState, emptyStateProps), emptyStateType === 'noData' && /*#__PURE__*/_react.default.createElement(_EmptyStates.NoDataEmptyState, emptyStateProps), emptyStateType === 'notFound' && /*#__PURE__*/_react.default.createElement(_EmptyStates.NotFoundEmptyState, emptyStateProps))));
50
+ }, validEmptyStates.includes(emptyStateType) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, emptyStateType === 'error' && /*#__PURE__*/_react.default.createElement(_EmptyStates.ErrorEmptyState, emptyStateProps), emptyStateType === 'noData' && /*#__PURE__*/_react.default.createElement(_EmptyStates.NoDataEmptyState, emptyStateProps), emptyStateType === 'notFound' && /*#__PURE__*/_react.default.createElement(_EmptyStates.NotFoundEmptyState, emptyStateProps)) : /*#__PURE__*/_react.default.createElement(_EmptyStates.EmptyState, emptyStateProps))));
50
51
  };
51
52
  var _default = DatagridEmptyBody;
52
53
  exports.default = _default;
@@ -7,28 +7,41 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _settings = require("../../../settings");
10
- /*
11
- * Licensed Materials - Property of IBM
12
- * 5724-Q36
13
- * (c) Copyright IBM Corp. 2020
14
- * US Government Users Restricted Rights - Use, duplication or disclosure
15
- * restricted by GSA ADP Schedule Contract with IBM Corp.
10
+ /**
11
+ * Copyright IBM Corp. 2020, 2023
12
+ *
13
+ * This source code is licensed under the Apache-2.0 license found in the
14
+ * LICENSE file in the root directory of this source tree.
16
15
  */
17
16
 
18
17
  var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
19
18
 
20
19
  // eslint-disable-next-line react/prop-types
21
- var DatagridExpandedRow = function DatagridExpandedRow(PreviousRowRenderer, ExpandedRowContentComponent) {
20
+ var DatagridExpandedRow = function DatagridExpandedRow(ExpandedRowContentComponent) {
22
21
  return function (datagridState) {
23
22
  var row = datagridState.row;
24
23
  var _ref = row || {},
25
24
  expandedContentHeight = _ref.expandedContentHeight;
26
- if (!row.isExpanded) {
27
- return PreviousRowRenderer(datagridState);
28
- }
29
- return /*#__PURE__*/_react.default.createElement("div", {
30
- className: "".concat(blockClass, "__expanded-row")
31
- }, PreviousRowRenderer(datagridState), /*#__PURE__*/_react.default.createElement("div", {
25
+ var toggleParentHoverClass = function toggleParentHoverClass(event, eventType) {
26
+ var _event$target, _event$target$parentN;
27
+ if (event !== null && event !== void 0 && (_event$target = event.target) !== null && _event$target !== void 0 && (_event$target$parentN = _event$target.parentNode) !== null && _event$target$parentN !== void 0 && _event$target$parentN.previousElementSibling) {
28
+ var parentNode = event.target.parentNode.previousElementSibling;
29
+ if (eventType === 'enter') {
30
+ parentNode.classList.add("".concat(blockClass, "__expandable-row--hover"));
31
+ } else {
32
+ parentNode.classList.remove("".concat(blockClass, "__expandable-row--hover"));
33
+ }
34
+ }
35
+ };
36
+ return /*#__PURE__*/_react.default.createElement("tr", {
37
+ className: "".concat(blockClass, "__expanded-row"),
38
+ onMouseEnter: function onMouseEnter(event) {
39
+ return toggleParentHoverClass(event, 'enter');
40
+ },
41
+ onMouseLeave: function onMouseLeave(event) {
42
+ return toggleParentHoverClass(event);
43
+ }
44
+ }, /*#__PURE__*/_react.default.createElement("div", {
32
45
  className: "".concat(blockClass, "__expanded-row-content"),
33
46
  style: {
34
47
  height: expandedContentHeight ? expandedContentHeight : null