@carbon/ibm-products 1.61.1 → 1.62.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/css/index-full-carbon.css +156 -68
  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-released-only.css +1753 -0
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +3 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +156 -68
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +3 -3
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +156 -68
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +3 -3
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/Coachmark/Coachmark.js +17 -5
  18. package/es/components/Coachmark/CoachmarkDragbar.js +12 -5
  19. package/es/components/Coachmark/CoachmarkHeader.js +2 -1
  20. package/es/components/Coachmark/CoachmarkOverlay.js +105 -9
  21. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +5 -2
  22. package/es/components/CoachmarkFixed/CoachmarkFixed.js +26 -6
  23. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +28 -3
  24. package/es/components/CoachmarkStack/CoachmarkStack.js +19 -4
  25. package/es/components/CoachmarkStack/CoachmarkStackHome.js +45 -11
  26. package/es/components/Datagrid/Datagrid/DatagridContent.js +12 -9
  27. package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +4 -4
  28. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +41 -25
  29. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +4 -1
  30. package/es/components/Datagrid/Datagrid/DatagridRow.js +5 -2
  31. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +12 -11
  32. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  33. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +29 -23
  34. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +18 -18
  35. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +50 -14
  36. package/es/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +1 -1
  37. package/es/components/Datagrid/useActionsColumn.js +9 -9
  38. package/es/components/Datagrid/useDatagrid.js +13 -1
  39. package/es/components/Datagrid/useFlexResize.js +19 -9
  40. package/es/components/Datagrid/useInfiniteScroll.js +10 -9
  41. package/es/components/Datagrid/useOnRowClick.js +6 -7
  42. package/es/components/Datagrid/useParentDimensions.js +6 -6
  43. package/es/components/Datagrid/useResizeTable.js +7 -7
  44. package/es/components/Datagrid/useSelectAllToggle.js +2 -2
  45. package/es/components/Datagrid/useSelectRows.js +31 -21
  46. package/es/components/Datagrid/useSkeletonRows.js +6 -6
  47. package/es/components/Datagrid/useSortableColumns.js +4 -5
  48. package/es/components/Datagrid/useStickyColumn.js +13 -6
  49. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
  50. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -0
  51. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
  52. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
  53. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
  54. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -0
  55. package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -4
  56. package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -4
  57. package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -4
  58. package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -4
  59. package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -4
  60. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -4
  61. package/es/global/js/hooks/index.js +3 -2
  62. package/es/global/js/hooks/usePrefix.js +11 -0
  63. package/es/global/js/package-settings.js +1 -2
  64. package/lib/components/Coachmark/Coachmark.js +16 -4
  65. package/lib/components/Coachmark/CoachmarkDragbar.js +12 -5
  66. package/lib/components/Coachmark/CoachmarkHeader.js +2 -1
  67. package/lib/components/Coachmark/CoachmarkOverlay.js +105 -8
  68. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +5 -2
  69. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +25 -5
  70. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +28 -3
  71. package/lib/components/CoachmarkStack/CoachmarkStack.js +18 -3
  72. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +44 -10
  73. package/lib/components/Datagrid/Datagrid/DatagridContent.js +12 -9
  74. package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +4 -4
  75. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +41 -32
  76. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +4 -1
  77. package/lib/components/Datagrid/Datagrid/DatagridRow.js +5 -2
  78. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +6 -4
  79. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  80. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +29 -23
  81. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +12 -12
  82. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +52 -15
  83. package/lib/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +1 -1
  84. package/lib/components/Datagrid/useActionsColumn.js +9 -12
  85. package/lib/components/Datagrid/useDatagrid.js +13 -1
  86. package/lib/components/Datagrid/useFlexResize.js +19 -9
  87. package/lib/components/Datagrid/useInfiniteScroll.js +9 -9
  88. package/lib/components/Datagrid/useOnRowClick.js +6 -7
  89. package/lib/components/Datagrid/useParentDimensions.js +5 -6
  90. package/lib/components/Datagrid/useResizeTable.js +6 -7
  91. package/lib/components/Datagrid/useSelectAllToggle.js +2 -2
  92. package/lib/components/Datagrid/useSelectRows.js +31 -21
  93. package/lib/components/Datagrid/useSkeletonRows.js +6 -6
  94. package/lib/components/Datagrid/useSortableColumns.js +4 -5
  95. package/lib/components/Datagrid/useStickyColumn.js +8 -0
  96. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
  97. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -0
  98. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
  99. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
  100. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
  101. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -0
  102. package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -4
  103. package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -4
  104. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -4
  105. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -4
  106. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -4
  107. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -4
  108. package/lib/global/js/hooks/index.js +8 -1
  109. package/lib/global/js/hooks/usePrefix.js +19 -0
  110. package/lib/global/js/package-settings.js +1 -2
  111. package/package.json +2 -2
  112. package/scss/components/Checklist/_checklist.scss +13 -25
  113. package/scss/components/Coachmark/styles/_coachmark-dragbar.scss +1 -45
  114. package/scss/components/Coachmark/styles/_coachmark-header.scss +0 -33
  115. package/scss/components/Coachmark/styles/_coachmark-overlay.scss +113 -5
  116. package/scss/components/Coachmark/styles/_coachmark-tagline.scss +18 -0
  117. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +19 -1
  118. package/scss/components/CoachmarkOverlayElement/_coachmark-overlay-element.scss +2 -0
  119. package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +1 -0
  120. package/scss/components/CoachmarkStack/_coachmark-stack.scss +3 -0
  121. package/scss/components/Datagrid/styles/_datagrid.scss +31 -5
  122. package/scss/components/Datagrid/styles/_useNestedRows.scss +1 -1
  123. package/scss/components/_index-released-only.scss +1 -0
@@ -17,12 +17,14 @@ var _carbonComponentsReact = require("carbon-components-react");
17
17
  var _DatagridSelectAll = require("./Datagrid/DatagridSelectAll");
18
18
  var _commonColumnIds = require("./common-column-ids");
19
19
  var _settings = require("../../settings");
20
- var _excluded = ["onChange"];
20
+ var _stateReducer = require("./Datagrid/addons/stateReducer");
21
+ var _excluded = ["onChange", "title"];
21
22
  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); }
22
23
  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; }
23
24
  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; }
24
25
  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) { (0, _defineProperty2.default)(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; }
25
26
  var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
27
+ var checkboxClass = "".concat(blockClass, "__checkbox-cell");
26
28
  var useSelectRows = function useSelectRows(hooks) {
27
29
  useHighlightSelection(hooks);
28
30
  var useInstance = function useInstance(instance) {
@@ -56,9 +58,12 @@ var useSelectRows = function useSelectRows(hooks) {
56
58
  };
57
59
  var useHighlightSelection = function useHighlightSelection(hooks) {
58
60
  var getRowProps = function getRowProps(props, _ref) {
61
+ var _ref2;
59
62
  var row = _ref.row;
63
+ var _row$getToggleRowSele = row.getToggleRowSelectedProps(),
64
+ checked = _row$getToggleRowSele.checked;
60
65
  return [props, {
61
- className: (0, _classnames.default)("".concat(blockClass, "__carbon-row"), row.getToggleRowSelectedProps().checked ? "".concat(_settings.carbon.prefix, "--data-table--selected ").concat(blockClass, "__active-row") : '')
66
+ className: (0, _classnames.default)(["".concat(blockClass, "__carbon-row"), (_ref2 = {}, (0, _defineProperty2.default)(_ref2, "".concat(_settings.carbon.prefix, "--data-table--selected"), checked), (0, _defineProperty2.default)(_ref2, "".concat(blockClass, "__active-row"), checked), _ref2)])
62
67
  }];
63
68
  };
64
69
  hooks.getRowProps.push(getRowProps);
@@ -75,7 +80,8 @@ var SelectRow = function SelectRow(datagridState) {
75
80
  onRadioSelect = datagridState.onRadioSelect,
76
81
  onRowSelect = datagridState.onRowSelect,
77
82
  columns = datagridState.columns,
78
- withStickyColumn = datagridState.withStickyColumn;
83
+ withStickyColumn = datagridState.withStickyColumn,
84
+ dispatch = datagridState.dispatch;
79
85
  var _useState = (0, _react.useState)(window.innerWidth),
80
86
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
81
87
  windowSize = _useState2[0],
@@ -90,28 +96,32 @@ var SelectRow = function SelectRow(datagridState) {
90
96
  };
91
97
  }, []);
92
98
  var selectDisabled = isFetching || row.getRowProps().selectDisabled;
93
- var _row$getToggleRowSele = row.getToggleRowSelectedProps(),
94
- onChange = _row$getToggleRowSele.onChange,
95
- selectProps = (0, _objectWithoutProperties2.default)(_row$getToggleRowSele, _excluded);
99
+ var _row$getToggleRowSele2 = row.getToggleRowSelectedProps(),
100
+ onChange = _row$getToggleRowSele2.onChange,
101
+ title = _row$getToggleRowSele2.title,
102
+ selectProps = (0, _objectWithoutProperties2.default)(_row$getToggleRowSele2, _excluded);
96
103
  var cellProps = cell.getCellProps();
97
104
  var isFirstColumnStickyLeft = ((_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
105
+ var onSelectHandler = function onSelectHandler(event) {
106
+ event.stopPropagation(); // avoid triggering onRowClick
107
+ if (radio) {
108
+ toggleAllRowsSelected(false);
109
+ if (onRadioSelect) {
110
+ onRadioSelect(row);
111
+ }
112
+ }
113
+ onChange(event);
114
+ onRowSelect === null || onRowSelect === void 0 ? void 0 : onRowSelect(row, event);
115
+ (0, _stateReducer.handleToggleRowSelected)(dispatch, row, event.target.checked);
116
+ };
117
+ var rowId = "".concat(tableId, "-").concat(row.index);
98
118
  return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.TableSelectRow, (0, _extends2.default)({}, cellProps, selectProps, {
99
119
  radio: radio,
100
- onSelect: function onSelect(e) {
101
- e.stopPropagation(); // avoid triggering onRowClick
102
- if (radio) {
103
- toggleAllRowsSelected(false);
104
- if (onRadioSelect) {
105
- onRadioSelect(row);
106
- }
107
- }
108
- onChange(e);
109
- onRowSelect === null || onRowSelect === void 0 ? void 0 : onRowSelect(row, e);
110
- },
111
- id: "".concat(tableId, "-").concat(row.index),
112
- name: "".concat(tableId, "-").concat(row.index, "-name"),
113
- className: (0, _classnames.default)("".concat(blockClass, "__checkbox-cell"), cellProps.className, (0, _defineProperty2.default)({}, "".concat(blockClass, "__checkbox-cell-sticky-left"), isFirstColumnStickyLeft && windowSize > 671)),
114
- ariaLabel: "".concat(tableId, "-row-").concat(row.index) // TODO: aria label should be i18n'ed
120
+ onSelect: onSelectHandler,
121
+ id: rowId,
122
+ name: "".concat(rowId, "-name"),
123
+ className: (0, _classnames.default)(["".concat(checkboxClass, "__checkbox-cell"), cellProps.className, (0, _defineProperty2.default)({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && windowSize > 671)]),
124
+ ariaLabel: title // TODO: aria label should be i18n'ed
115
125
  ,
116
126
  disabled: selectDisabled
117
127
  }));
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- /*
10
- * Licensed Materials - Property of IBM
11
- * 5724-Q36
12
- * (c) Copyright IBM Corp. 2020
13
- * US Government Users Restricted Rights - Use, duplication or disclosure
14
- * restricted by GSA ADP Schedule Contract with IBM Corp.
9
+ /**
10
+ * Copyright IBM Corp. 2020, 2023
11
+ *
12
+ * This source code is licensed under the Apache-2.0 license found in the
13
+ * LICENSE file in the root directory of this source tree.
15
14
  */
15
+
16
16
  var useSkeletons = function useSkeletons(hooks) {
17
17
  var useInstance = function useInstance(instance) {
18
18
  var isFetching = instance.isFetching,
@@ -28,9 +28,8 @@ var getAriaSortValue = function getAriaSortValue(col, _ref) {
28
28
  if (!col) {
29
29
  return;
30
30
  }
31
- var _ref2 = col || {},
32
- isSorted = _ref2.isSorted,
33
- isSortedDesc = _ref2.isSortedDesc;
31
+ var isSorted = col.isSorted,
32
+ isSortedDesc = col.isSortedDesc;
34
33
  if (!isSorted) {
35
34
  return defaultSortableLabelText;
36
35
  }
@@ -42,9 +41,9 @@ var getAriaSortValue = function getAriaSortValue(col, _ref) {
42
41
  }
43
42
  };
44
43
  var useSortableColumns = function useSortableColumns(hooks) {
45
- var sortableVisibleColumns = function sortableVisibleColumns(visibleColumns, _ref3) {
44
+ var sortableVisibleColumns = function sortableVisibleColumns(visibleColumns, _ref2) {
46
45
  var _instance$customizeCo;
47
- var instance = _ref3.instance;
46
+ var instance = _ref2.instance;
48
47
  var onSort = instance.onSort,
49
48
  ascendingSortableLabelText = instance.ascendingSortableLabelText,
50
49
  descendingSortableLabelText = instance.descendingSortableLabelText,
@@ -28,9 +28,11 @@ var useStickyColumn = function useStickyColumn(hooks) {
28
28
  setWindowSize(window.innerWidth);
29
29
  }, []);
30
30
  (0, _react.useLayoutEffect)(function () {
31
+ /* istanbul ignore next */
31
32
  function updateSize() {
32
33
  setWindowSize(window.innerWidth);
33
34
  }
35
+ /* istanbul ignore next */
34
36
  window.addEventListener('resize', updateSize);
35
37
  return function () {
36
38
  return window.removeEventListener('resize', updateSize);
@@ -51,14 +53,17 @@ var useStickyColumn = function useStickyColumn(hooks) {
51
53
  (0, _react.useEffect)(function () {
52
54
  var tableBodyElement = tableBodyRef.current;
53
55
  var headerCellElement = stickyHeaderCellRef.current;
56
+ /* istanbul ignore next */
54
57
  if (hasVertScroll(tableBodyElement) && headerCellElement) {
55
58
  headerCellElement.classList.add(OFFSET_SCROLL_CLASS);
56
59
  }
57
60
  var boundListener = (0, _debounce.default)(onBodyResize.bind(null, tableBodyElement, headerCellElement), 250);
61
+ /* istanbul ignore next */
58
62
  if (typeof window !== 'undefined') {
59
63
  window.addEventListener('resize', boundListener);
60
64
  }
61
65
  return function () {
66
+ /* istanbul ignore next */
62
67
  if (typeof window !== 'undefined') {
63
68
  window.removeEventListener('resize', boundListener);
64
69
  }
@@ -157,6 +162,7 @@ var changeProps = function changeProps(elementName, headerCellRef, windowSize, p
157
162
  };
158
163
  var onBodyResize = function onBodyResize(tableBodyEle, headerCellEle) {
159
164
  if (headerCellEle) {
165
+ /* istanbul ignore next */
160
166
  if (hasVertScroll(tableBodyEle)) {
161
167
  headerCellEle.classList.add(OFFSET_SCROLL_CLASS);
162
168
  } else {
@@ -166,6 +172,7 @@ var onBodyResize = function onBodyResize(tableBodyEle, headerCellEle) {
166
172
  }
167
173
  };
168
174
  var toggleStickyShadow = function toggleStickyShadow(tableBodyEle, headerCellEle) {
175
+ /* istanbul ignore next */
169
176
  if (tableBodyEle && headerCellEle) {
170
177
  var isScrolledToRight = tableBodyEle.scrollLeft + tableBodyEle.clientWidth === tableBodyEle.scrollWidth;
171
178
  if (isScrolledToRight) {
@@ -178,6 +185,7 @@ var toggleStickyShadow = function toggleStickyShadow(tableBodyEle, headerCellEle
178
185
  }
179
186
  };
180
187
  var hasVertScroll = function hasVertScroll(element) {
188
+ /* istanbul ignore next */
181
189
  if (!element) {
182
190
  return false;
183
191
  }
@@ -37,6 +37,7 @@ var ErrorEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref
37
37
  className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-type--error")),
38
38
  ref: ref
39
39
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_ErrorIllustration.ErrorIllustration, {
40
+ title: title,
40
41
  theme: illustrationTheme,
41
42
  size: size
42
43
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
@@ -37,6 +37,7 @@ var NoDataEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, re
37
37
  className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-type--noData")),
38
38
  ref: ref
39
39
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NoDataIllustration.NoDataIllustration, {
40
+ title: title,
40
41
  theme: illustrationTheme,
41
42
  size: size
42
43
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
@@ -37,6 +37,7 @@ var NoTagsEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref, re
37
37
  className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-type--noTags")),
38
38
  ref: ref
39
39
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NoTagsIllustration.NoTagsIllustration, {
40
+ title: title,
40
41
  theme: illustrationTheme,
41
42
  size: size
42
43
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
@@ -37,6 +37,7 @@ var NotFoundEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_ref,
37
37
  className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-type--notFound")),
38
38
  ref: ref
39
39
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NotFoundIllustration.NotFoundIllustration, {
40
+ title: title,
40
41
  theme: illustrationTheme,
41
42
  size: size
42
43
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
@@ -38,6 +38,7 @@ var NotificationsEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_
38
38
  ref: ref
39
39
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NotificationsIllustration.NotificationsIllustration, {
40
40
  size: size,
41
+ title: title,
41
42
  theme: illustrationTheme
42
43
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
43
44
  action: action,
@@ -38,6 +38,7 @@ var UnauthorizedEmptyState = /*#__PURE__*/_react.default.forwardRef(function (_r
38
38
  ref: ref
39
39
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_UnauthorizedIllustration.UnauthorizedIllustration, {
40
40
  size: size,
41
+ title: title,
41
42
  theme: illustrationTheme
42
43
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
43
44
  action: action,
@@ -12,11 +12,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _settings = require("../../../settings");
14
14
  var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
15
- var _excluded = ["theme", "size"];
15
+ var _excluded = ["title", "theme", "size"];
16
16
  // The block part of our conventional BEM class names (blockClass__E--M).
17
17
  var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
18
18
  var ErrorIllustration = function ErrorIllustration(_ref) {
19
- var theme = _ref.theme,
19
+ var title = _ref.title,
20
+ theme = _ref.theme,
20
21
  size = _ref.size,
21
22
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
23
  var svgId = (0, _uuidv.default)();
@@ -27,7 +28,7 @@ var ErrorIllustration = function ErrorIllustration(_ref) {
27
28
  viewBox: "0 0 80 80",
28
29
  className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-error"), "".concat(blockClass, "__illustration--").concat(size)]),
29
30
  role: "img"
30
- }), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
31
+ }), /*#__PURE__*/_react.default.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
31
32
  id: "prefix__a_dark_".concat(svgId),
32
33
  x1: 38.9,
33
34
  y1: 77.08,
@@ -206,5 +207,6 @@ var ErrorIllustration = function ErrorIllustration(_ref) {
206
207
  exports.ErrorIllustration = ErrorIllustration;
207
208
  ErrorIllustration.propTypes = {
208
209
  size: _propTypes.default.oneOf(['lg', 'sm']),
209
- theme: _propTypes.default.oneOf(['light', 'dark'])
210
+ theme: _propTypes.default.oneOf(['light', 'dark']),
211
+ title: _propTypes.default.string
210
212
  };
@@ -12,11 +12,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _settings = require("../../../settings");
14
14
  var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
15
- var _excluded = ["theme", "size"];
15
+ var _excluded = ["title", "theme", "size"];
16
16
  // The block part of our conventional BEM class names (blockClass__E--M).
17
17
  var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
18
18
  var NoDataIllustration = function NoDataIllustration(_ref) {
19
- var theme = _ref.theme,
19
+ var title = _ref.title,
20
+ theme = _ref.theme,
20
21
  size = _ref.size,
21
22
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
23
  var svgId = (0, _uuidv.default)();
@@ -27,7 +28,7 @@ var NoDataIllustration = function NoDataIllustration(_ref) {
27
28
  viewBox: "0 0 80 80",
28
29
  className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noData"), "".concat(blockClass, "__illustration--").concat(size)]),
29
30
  role: "img"
30
- }), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
31
+ }), /*#__PURE__*/_react.default.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
31
32
  id: "prefix__a_dark_".concat(svgId),
32
33
  x1: 11.12,
33
34
  y1: 43.34,
@@ -169,5 +170,6 @@ var NoDataIllustration = function NoDataIllustration(_ref) {
169
170
  exports.NoDataIllustration = NoDataIllustration;
170
171
  NoDataIllustration.propTypes = {
171
172
  size: _propTypes.default.oneOf(['lg', 'sm']),
172
- theme: _propTypes.default.oneOf(['light', 'dark'])
173
+ theme: _propTypes.default.oneOf(['light', 'dark']),
174
+ title: _propTypes.default.string
173
175
  };
@@ -12,11 +12,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _settings = require("../../../settings");
14
14
  var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
15
- var _excluded = ["theme", "size"];
15
+ var _excluded = ["title", "theme", "size"];
16
16
  // The block part of our conventional BEM class names (blockClass__E--M).
17
17
  var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
18
18
  var NoTagsIllustration = function NoTagsIllustration(_ref) {
19
- var theme = _ref.theme,
19
+ var title = _ref.title,
20
+ theme = _ref.theme,
20
21
  size = _ref.size,
21
22
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
23
  var svgId = (0, _uuidv.default)();
@@ -28,7 +29,7 @@ var NoTagsIllustration = function NoTagsIllustration(_ref) {
28
29
  viewBox: "0 0 80 80",
29
30
  className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noTags"), "".concat(blockClass, "__illustration--").concat(size)]),
30
31
  role: "img"
31
- }), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
32
+ }), /*#__PURE__*/_react.default.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
32
33
  id: "prefix__c_dark_".concat(svgId),
33
34
  x1: 34.96,
34
35
  y1: 5.37,
@@ -476,5 +477,6 @@ var NoTagsIllustration = function NoTagsIllustration(_ref) {
476
477
  exports.NoTagsIllustration = NoTagsIllustration;
477
478
  NoTagsIllustration.propTypes = {
478
479
  size: _propTypes.default.oneOf(['lg', 'sm']),
479
- theme: _propTypes.default.oneOf(['light', 'dark'])
480
+ theme: _propTypes.default.oneOf(['light', 'dark']),
481
+ title: _propTypes.default.string
480
482
  };
@@ -12,11 +12,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _settings = require("../../../settings");
14
14
  var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
15
- var _excluded = ["theme", "size"];
15
+ var _excluded = ["title", "theme", "size"];
16
16
  // The block part of our conventional BEM class names (blockClass__E--M).
17
17
  var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
18
18
  var NotFoundIllustration = function NotFoundIllustration(_ref) {
19
- var theme = _ref.theme,
19
+ var title = _ref.title,
20
+ theme = _ref.theme,
20
21
  size = _ref.size,
21
22
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
23
  var svgId = (0, _uuidv.default)();
@@ -27,7 +28,7 @@ var NotFoundIllustration = function NotFoundIllustration(_ref) {
27
28
  viewBox: "0 0 80 80",
28
29
  className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notFound"), "".concat(blockClass, "__illustration--").concat(size)]),
29
30
  role: "img"
30
- }), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
31
+ }), /*#__PURE__*/_react.default.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
31
32
  id: "prefix__a_dark_".concat(svgId),
32
33
  x1: 2.6,
33
34
  y1: -12.81,
@@ -353,5 +354,6 @@ var NotFoundIllustration = function NotFoundIllustration(_ref) {
353
354
  exports.NotFoundIllustration = NotFoundIllustration;
354
355
  NotFoundIllustration.propTypes = {
355
356
  size: _propTypes.default.oneOf(['lg', 'sm']),
356
- theme: _propTypes.default.oneOf(['light', 'dark'])
357
+ theme: _propTypes.default.oneOf(['light', 'dark']),
358
+ title: _propTypes.default.string
357
359
  };
@@ -12,11 +12,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _settings = require("../../../settings");
14
14
  var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
15
- var _excluded = ["theme", "size"];
15
+ var _excluded = ["title", "theme", "size"];
16
16
  // The block part of our conventional BEM class names (blockClass__E--M).
17
17
  var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
18
18
  var NotificationsIllustration = function NotificationsIllustration(_ref) {
19
- var theme = _ref.theme,
19
+ var title = _ref.title,
20
+ theme = _ref.theme,
20
21
  size = _ref.size,
21
22
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
23
  var svgId = (0, _uuidv.default)();
@@ -27,7 +28,7 @@ var NotificationsIllustration = function NotificationsIllustration(_ref) {
27
28
  viewBox: "0 0 80 80",
28
29
  className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notification"), "".concat(blockClass, "__illustration--").concat(size)]),
29
30
  role: "img"
30
- }), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
31
+ }), /*#__PURE__*/_react.default.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
31
32
  id: "prefix__a_dark_".concat(svgId),
32
33
  x1: 30.05,
33
34
  y1: 54.31,
@@ -324,5 +325,6 @@ var NotificationsIllustration = function NotificationsIllustration(_ref) {
324
325
  exports.NotificationsIllustration = NotificationsIllustration;
325
326
  NotificationsIllustration.propTypes = {
326
327
  size: _propTypes.default.oneOf(['lg', 'sm']),
327
- theme: _propTypes.default.oneOf(['light', 'dark'])
328
+ theme: _propTypes.default.oneOf(['light', 'dark']),
329
+ title: _propTypes.default.string
328
330
  };
@@ -12,11 +12,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _settings = require("../../../settings");
14
14
  var _uuidv = _interopRequireDefault(require("../../../global/js/utils/uuidv4"));
15
- var _excluded = ["theme", "size"];
15
+ var _excluded = ["title", "theme", "size"];
16
16
  // The block part of our conventional BEM class names (blockClass__E--M).
17
17
  var blockClass = "".concat(_settings.pkg.prefix, "--empty-state");
18
18
  var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
19
- var theme = _ref.theme,
19
+ var title = _ref.title,
20
+ theme = _ref.theme,
20
21
  size = _ref.size,
21
22
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
23
  var svgId = (0, _uuidv.default)();
@@ -28,7 +29,7 @@ var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
28
29
  viewBox: "0 0 80 80",
29
30
  className: (0, _classnames.default)(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-unauthorized"), "".concat(blockClass, "__illustration--").concat(size)]),
30
31
  role: "img"
31
- }), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
32
+ }), /*#__PURE__*/_react.default.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
32
33
  id: "prefix__b_dark_".concat(svgId),
33
34
  x1: 17.33,
34
35
  y1: 40.68,
@@ -297,5 +298,6 @@ var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
297
298
  exports.UnauthorizedIllustration = UnauthorizedIllustration;
298
299
  UnauthorizedIllustration.propTypes = {
299
300
  size: _propTypes.default.oneOf(['lg', 'sm']),
300
- theme: _propTypes.default.oneOf(['light', 'dark'])
301
+ theme: _propTypes.default.oneOf(['light', 'dark']),
302
+ title: _propTypes.default.string
301
303
  };
@@ -39,6 +39,12 @@ Object.defineProperty(exports, "useNearestScroll", {
39
39
  return _useWindowScroll.useNearestScroll;
40
40
  }
41
41
  });
42
+ Object.defineProperty(exports, "usePrefix", {
43
+ enumerable: true,
44
+ get: function get() {
45
+ return _usePrefix.usePrefix;
46
+ }
47
+ });
42
48
  Object.defineProperty(exports, "usePreviousValue", {
43
49
  enumerable: true,
44
50
  get: function get() {
@@ -85,4 +91,5 @@ var _usePreviousValue = require("./usePreviousValue");
85
91
  var _useResetCreateComponent = require("./useResetCreateComponent");
86
92
  var _useRetrieveStepData = require("./useRetrieveStepData");
87
93
  var _useValidCreateStepCount = require("./useValidCreateStepCount");
88
- var _useControllableState = require("./useControllableState");
94
+ var _useControllableState = require("./useControllableState");
95
+ var _usePrefix = require("./usePrefix");
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.usePrefix = void 0;
8
+ var _packageSettings = _interopRequireDefault(require("../package-settings"));
9
+ /**
10
+ * Copyright IBM Corp. 2023, 2023
11
+ *
12
+ * This source code is licensed under the Apache-2.0 license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+
16
+ var usePrefix = function usePrefix() {
17
+ return _packageSettings.default.prefix;
18
+ };
19
+ exports.usePrefix = usePrefix;
@@ -25,6 +25,7 @@ var defaults = {
25
25
  CreateTearsheet: true,
26
26
  CreateTearsheetStep: true,
27
27
  CreateTearsheetDivider: true,
28
+ Datagrid: true,
28
29
  EditInPlace: true,
29
30
  EmptyState: true,
30
31
  ErrorEmptyState: true,
@@ -65,7 +66,6 @@ var defaults = {
65
66
  EditSidePanel: false,
66
67
  CancelableTextEdit: false,
67
68
  DataSpreadsheet: false,
68
- Datagrid: false,
69
69
  EditTearsheet: false,
70
70
  EditTearsheetNarrow: false,
71
71
  EditFullPage: false,
@@ -98,7 +98,6 @@ var defaults = {
98
98
  'Datagrid.useExpandedRow': false,
99
99
  'Datagrid.useNestedRows': false,
100
100
  'Datagrid.useInlineEdit': false,
101
- 'Datagrid.useActionsColumn': false,
102
101
  'Datagrid.useFiltering': false,
103
102
  'Datagrid.useCustomizeColumns': false,
104
103
  'ExampleComponent.secondaryIcon': false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibm-products",
3
3
  "description": "Carbon for IBM Products",
4
- "version": "1.61.1",
4
+ "version": "1.62.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -97,5 +97,5 @@
97
97
  "react": "^16.8.6 || ^17.0.1",
98
98
  "react-dom": "^16.8.6 || ^17.0.1"
99
99
  },
100
- "gitHead": "9c214f67bed9419967e0d865ab4fec31f923c64c"
100
+ "gitHead": "89c6e18fc0a426f7a6835947561210242824fb07"
101
101
  }
@@ -11,18 +11,6 @@
11
11
  @import '../../global/styles/project-settings';
12
12
  @import '../../global/styles/mixins';
13
13
 
14
- // Other Carbon settings.
15
- // TODO: @import 'carbon-components/scss/globals/grid/grid'; if needed
16
-
17
- // Checklist uses the following Carbon components:
18
- // TODO: @import(s) of Carbon component styles used by Checklist
19
-
20
- // Checklist uses the following Carbon for IBM Products components:
21
- // TODO: @import(s) of IBM Products component styles used by Checklist
22
-
23
- // Define all component styles in a mixin which is then exported using
24
- // the Carbon import-once mechanism.
25
-
26
14
  @mixin ellipsis-2-lines {
27
15
  display: -webkit-box;
28
16
  overflow: hidden;
@@ -39,6 +27,7 @@
39
27
  &__header {
40
28
  display: flex;
41
29
  padding: $spacing-05;
30
+ border-top: 1px solid $ui-03;
42
31
  background-color: $ui-01;
43
32
  gap: $spacing-03;
44
33
  }
@@ -114,7 +103,9 @@
114
103
  transform: rotate(-180deg);
115
104
  }
116
105
 
117
- // Button to appear more like a link so it aligns better with the list text
106
+ // Button to appear more like a link so it aligns better with the list text.
107
+ // Override Primary button styling to appear more like a link.
108
+ // "Unset" some settings to allow an inner div to enable multiple lines and an ellipsis if req'd.
118
109
  &__button {
119
110
  max-width: none !important;
120
111
  min-height: auto !important;
@@ -126,8 +117,7 @@
126
117
  background-color: transparent !important;
127
118
  color: $link-01 !important;
128
119
 
129
- // The CSS for the Carbon button's label
130
- // is incompatible with two-line ellipsis,
120
+ // The CSS for the Carbon button's label is incompatible with two-line ellipsis,
131
121
  // but a div inside a Carbon button works.
132
122
  div {
133
123
  @include ellipsis-2-lines();
@@ -144,10 +134,6 @@
144
134
  color: $text-primary;
145
135
  text-decoration: underline;
146
136
  }
147
-
148
- &--error {
149
- color: $text-error !important;
150
- }
151
137
  }
152
138
 
153
139
  // container for animated content
@@ -195,14 +181,18 @@
195
181
  &__icon {
196
182
  /* stylelint-disable-next-line carbon/layout-token-use */
197
183
  margin: rem(1px) $spacing-03 0 0;
198
- color: $link-01;
184
+
185
+ &--checked,
186
+ &--indeterminate {
187
+ color: $link-01;
188
+ }
199
189
 
200
190
  &--error {
201
191
  color: $support-error;
202
192
  }
203
193
 
204
194
  &--disabled {
205
- color: $disabled-03;
195
+ color: $disabled-02;
206
196
  }
207
197
  }
208
198
 
@@ -210,10 +200,8 @@
210
200
  @include carbon--type-style('body-short-01');
211
201
  @include ellipsis-2-lines();
212
202
 
213
- &--checked,
214
- &--disabled,
215
- &--error {
216
- color: $disabled-03;
203
+ &--disabled {
204
+ color: $disabled-02;
217
205
  }
218
206
  }
219
207