@carbon/ibm-products 2.23.0 → 2.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/css/index-full-carbon.css +29484 -28211
  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 +49 -10
  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 +24418 -291
  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 +17172 -13
  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/Card/Card.js +1 -2
  18. package/es/components/Card/CardHeader.js +2 -2
  19. package/es/components/Carousel/Carousel.js +5 -3
  20. package/es/components/Coachmark/Coachmark.js +255 -0
  21. package/es/components/Coachmark/CoachmarkDragbar.js +146 -0
  22. package/es/components/Coachmark/CoachmarkHeader.js +91 -0
  23. package/es/components/Coachmark/CoachmarkOverlay.js +235 -0
  24. package/es/components/Coachmark/CoachmarkTagline.js +97 -0
  25. package/es/components/Coachmark/index.js +10 -0
  26. package/es/components/Coachmark/utils/constants.js +76 -0
  27. package/es/components/Coachmark/utils/context.js +5 -0
  28. package/es/components/Coachmark/utils/enums.js +40 -0
  29. package/es/components/Coachmark/utils/helpers.js +11 -0
  30. package/es/components/Coachmark/utils/hooks.js +54 -0
  31. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +93 -0
  32. package/es/components/CoachmarkBeacon/index.js +8 -0
  33. package/es/components/CoachmarkButton/CoachmarkButton.js +90 -0
  34. package/es/components/CoachmarkButton/index.js +8 -0
  35. package/es/components/CoachmarkFixed/CoachmarkFixed.js +226 -0
  36. package/es/components/CoachmarkFixed/index.js +8 -0
  37. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +86 -0
  38. package/es/components/CoachmarkOverlayElement/index.js +8 -0
  39. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +216 -0
  40. package/es/components/CoachmarkOverlayElements/index.js +8 -0
  41. package/es/components/CoachmarkStack/CoachmarkStack.js +283 -0
  42. package/es/components/CoachmarkStack/CoachmarkStackHome.js +192 -0
  43. package/es/components/CoachmarkStack/index.js +8 -0
  44. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
  45. package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -1
  46. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
  47. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
  48. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
  49. package/es/components/Datagrid/Datagrid.docs-page.js +2 -2
  50. package/es/components/Datagrid/useActionsColumn.js +16 -12
  51. package/es/components/Datagrid/useNestedRowExpander.js +2 -2
  52. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +7 -2
  53. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
  54. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +7 -2
  55. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +7 -2
  56. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +7 -2
  57. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +7 -2
  58. package/es/components/EmptyStates/assets/ErrorIllustration.js +5 -5
  59. package/es/components/EmptyStates/assets/NoDataIllustration.js +5 -5
  60. package/es/components/EmptyStates/assets/NoTagsIllustration.js +5 -5
  61. package/es/components/EmptyStates/assets/NotFoundIllustration.js +5 -5
  62. package/es/components/EmptyStates/assets/NotificationsIllustration.js +5 -5
  63. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +5 -5
  64. package/es/components/InterstitialScreen/InterstitialScreen.js +427 -0
  65. package/es/components/InterstitialScreen/index.js +8 -0
  66. package/es/components/InterstitialScreenView/InterstitialScreenView.js +75 -0
  67. package/es/components/InterstitialScreenView/index.js +8 -0
  68. package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +83 -0
  69. package/es/components/InterstitialScreenViewModule/index.js +8 -0
  70. package/es/components/PageHeader/PageHeaderUtils.js +2 -2
  71. package/es/components/SearchBar/SearchBar.js +227 -0
  72. package/es/components/SearchBar/index.js +8 -0
  73. package/es/components/index.js +12 -1
  74. package/es/global/js/package-settings.js +14 -0
  75. package/lib/components/Card/Card.js +3 -4
  76. package/lib/components/Card/CardHeader.js +2 -2
  77. package/lib/components/Carousel/Carousel.js +5 -3
  78. package/lib/components/Coachmark/Coachmark.js +264 -0
  79. package/lib/components/Coachmark/CoachmarkDragbar.js +151 -0
  80. package/lib/components/Coachmark/CoachmarkHeader.js +95 -0
  81. package/lib/components/Coachmark/CoachmarkOverlay.js +243 -0
  82. package/lib/components/Coachmark/CoachmarkTagline.js +101 -0
  83. package/lib/components/Coachmark/index.js +38 -0
  84. package/lib/components/Coachmark/utils/constants.js +81 -0
  85. package/lib/components/Coachmark/utils/context.js +11 -0
  86. package/lib/components/Coachmark/utils/enums.js +46 -0
  87. package/lib/components/Coachmark/utils/helpers.js +17 -0
  88. package/lib/components/Coachmark/utils/hooks.js +59 -0
  89. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +97 -0
  90. package/lib/components/CoachmarkBeacon/index.js +12 -0
  91. package/lib/components/CoachmarkButton/CoachmarkButton.js +93 -0
  92. package/lib/components/CoachmarkButton/index.js +12 -0
  93. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +232 -0
  94. package/lib/components/CoachmarkFixed/index.js +12 -0
  95. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +90 -0
  96. package/lib/components/CoachmarkOverlayElement/index.js +12 -0
  97. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +222 -0
  98. package/lib/components/CoachmarkOverlayElements/index.js +12 -0
  99. package/lib/components/CoachmarkStack/CoachmarkStack.js +288 -0
  100. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +198 -0
  101. package/lib/components/CoachmarkStack/index.js +12 -0
  102. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
  103. package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -1
  104. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
  105. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
  106. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
  107. package/lib/components/Datagrid/Datagrid.docs-page.js +2 -2
  108. package/lib/components/Datagrid/useActionsColumn.js +15 -11
  109. package/lib/components/Datagrid/useNestedRowExpander.js +2 -2
  110. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +7 -2
  111. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
  112. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +7 -2
  113. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +7 -2
  114. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +7 -2
  115. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +7 -2
  116. package/lib/components/EmptyStates/assets/ErrorIllustration.js +5 -5
  117. package/lib/components/EmptyStates/assets/NoDataIllustration.js +5 -5
  118. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +5 -5
  119. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +5 -5
  120. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +5 -5
  121. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +5 -5
  122. package/lib/components/InterstitialScreen/InterstitialScreen.js +434 -0
  123. package/lib/components/InterstitialScreen/index.js +12 -0
  124. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +77 -0
  125. package/lib/components/InterstitialScreenView/index.js +12 -0
  126. package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +85 -0
  127. package/lib/components/InterstitialScreenViewModule/index.js +12 -0
  128. package/lib/components/PageHeader/PageHeaderUtils.js +2 -2
  129. package/lib/components/SearchBar/SearchBar.js +233 -0
  130. package/lib/components/SearchBar/index.js +12 -0
  131. package/lib/components/index.js +78 -1
  132. package/lib/global/js/package-settings.js +14 -0
  133. package/package.json +5 -5
  134. package/scss/components/Card/_card.scss +6 -5
  135. package/scss/components/Coachmark/_carbon-imports.scss +10 -0
  136. package/scss/components/Coachmark/_coachmark-dragbar.scss +27 -0
  137. package/scss/components/Coachmark/_coachmark-header.scss +20 -0
  138. package/scss/components/Coachmark/_coachmark-overlay.scss +431 -0
  139. package/scss/components/Coachmark/_coachmark-tagline.scss +140 -0
  140. package/scss/components/Coachmark/_coachmark.scss +30 -0
  141. package/scss/components/Coachmark/_index-with-carbon.scss +9 -0
  142. package/scss/components/Coachmark/_index.scss +8 -0
  143. package/scss/components/CoachmarkBeacon/_carbon-imports.scss +9 -0
  144. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +166 -0
  145. package/scss/components/CoachmarkBeacon/_index-with-carbon.scss +9 -0
  146. package/scss/components/CoachmarkBeacon/_index.scss +8 -0
  147. package/scss/components/CoachmarkButton/_carbon-imports.scss +9 -0
  148. package/scss/components/CoachmarkButton/_coachmark-button.scss +25 -0
  149. package/scss/components/CoachmarkButton/_index-with-carbon.scss +9 -0
  150. package/scss/components/CoachmarkButton/_index.scss +8 -0
  151. package/scss/components/CoachmarkFixed/_carbon-imports.scss +9 -0
  152. package/scss/components/CoachmarkFixed/_coachmark-fixed.scss +25 -0
  153. package/scss/components/CoachmarkFixed/_index-with-carbon.scss +9 -0
  154. package/scss/components/CoachmarkFixed/_index.scss +8 -0
  155. package/scss/components/CoachmarkOverlayElement/_carbon-imports.scss +9 -0
  156. package/scss/components/CoachmarkOverlayElement/_coachmark-overlay-element.scss +52 -0
  157. package/scss/components/CoachmarkOverlayElement/_index-with-carbon.scss +9 -0
  158. package/scss/components/CoachmarkOverlayElement/_index.scss +8 -0
  159. package/scss/components/CoachmarkOverlayElements/_carbon-imports.scss +9 -0
  160. package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +47 -0
  161. package/scss/components/CoachmarkOverlayElements/_index-with-carbon.scss +9 -0
  162. package/scss/components/CoachmarkOverlayElements/_index.scss +8 -0
  163. package/scss/components/CoachmarkStack/_carbon-imports.scss +9 -0
  164. package/scss/components/CoachmarkStack/_coachmark-stack.scss +95 -0
  165. package/scss/components/CoachmarkStack/_index-with-carbon.scss +9 -0
  166. package/scss/components/CoachmarkStack/_index.scss +8 -0
  167. package/scss/components/InterstitialScreen/_carbon-imports.scss +9 -0
  168. package/scss/components/InterstitialScreen/_index-with-carbon.scss +9 -0
  169. package/scss/components/InterstitialScreen/_index.scss +8 -0
  170. package/scss/components/InterstitialScreen/_interstitial-screen.scss +276 -0
  171. package/scss/components/InterstitialScreenView/_carbon-imports.scss +9 -0
  172. package/scss/components/InterstitialScreenView/_index-with-carbon.scss +9 -0
  173. package/scss/components/InterstitialScreenView/_index.scss +8 -0
  174. package/scss/components/InterstitialScreenView/_interstitial-screen-view.scss +25 -0
  175. package/scss/components/InterstitialScreenViewModule/_carbon-imports.scss +9 -0
  176. package/scss/components/InterstitialScreenViewModule/_index-with-carbon.scss +9 -0
  177. package/scss/components/InterstitialScreenViewModule/_index.scss +8 -0
  178. package/scss/components/InterstitialScreenViewModule/_interstitial-screen-view-module.scss +59 -0
  179. package/scss/components/PageHeader/_page-header.scss +0 -1
  180. package/scss/components/SearchBar/_carbon-imports.scss +9 -0
  181. package/scss/components/SearchBar/_index-with-carbon.scss +9 -0
  182. package/scss/components/SearchBar/_index.scss +8 -0
  183. package/scss/components/SearchBar/_search-bar.scss +26 -0
  184. package/scss/components/SidePanel/_side-panel.scss +12 -7
  185. package/scss/components/_index-with-carbon.scss +11 -0
  186. package/scss/components/_index.scss +11 -0
@@ -0,0 +1,198 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.CoachmarkStackHome = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+ var _react = _interopRequireWildcard(require("react"));
13
+ var _pconsole = _interopRequireDefault(require("../../global/js/utils/pconsole"));
14
+ var _propTypes = _interopRequireDefault(require("prop-types"));
15
+ var _classnames = _interopRequireDefault(require("classnames"));
16
+ var _iconsReact = require("@carbon/icons-react");
17
+ var _react2 = require("@carbon/react");
18
+ var _devtools = require("../../global/js/utils/devtools");
19
+ var _settings = require("../../settings");
20
+ var _reactDom = require("react-dom");
21
+ var _CoachmarkHeader = require("../Coachmark/CoachmarkHeader");
22
+ var _SteppedAnimatedMedia = require("../SteppedAnimatedMedia");
23
+ var _excluded = ["className", "description", "isOpen", "media", "navLinkLabels", "onClickNavItem", "onClose", "portalTarget", "closeButtonLabel", "title"];
24
+ /**
25
+ * Copyright IBM Corp. 2023, 2024
26
+ *
27
+ * This source code is licensed under the Apache-2.0 license found in the
28
+ * LICENSE file in the root directory of this source tree.
29
+ */
30
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
31
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
32
+ // Carbon and package components we use.
33
+ /* TODO: @import(s) of carbon components and other package components. */ // The block part of our conventional BEM class names (blockClass__E--M).
34
+ var blockClass = "".concat(_settings.pkg.prefix, "--coachmark-stacked-home");
35
+ var overlayClass = "".concat(_settings.pkg.prefix, "--coachmark-overlay");
36
+ var componentName = 'CoachmarkStackHome';
37
+
38
+ /**
39
+ * DO NOT USE. This component is for the exclusive use
40
+ * of other Novice to Pro components.
41
+ */
42
+ var CoachmarkStackHome = exports.CoachmarkStackHome = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
43
+ var _document$querySelect;
44
+ var className = _ref.className,
45
+ description = _ref.description,
46
+ isOpen = _ref.isOpen,
47
+ media = _ref.media,
48
+ navLinkLabels = _ref.navLinkLabels,
49
+ onClickNavItem = _ref.onClickNavItem,
50
+ _onClose = _ref.onClose,
51
+ portalTarget = _ref.portalTarget,
52
+ closeButtonLabel = _ref.closeButtonLabel,
53
+ title = _ref.title,
54
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
55
+ var buttonFocusRef = (0, _react.useRef)();
56
+ var _useState = (0, _react.useState)(0),
57
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
58
+ linkFocusIndex = _useState2[0],
59
+ setLinkFocusIndex = _useState2[1];
60
+ (0, _react.useEffect)(function () {
61
+ setTimeout(function () {
62
+ if (isOpen && buttonFocusRef.current) {
63
+ buttonFocusRef.current.focus();
64
+ }
65
+ }, 100);
66
+ }, [isOpen]);
67
+ if (!navLinkLabels) {
68
+ return _pconsole.default.warn("".concat(componentName, " is a Novice to Pro internal component and is not intended for general use."));
69
+ }
70
+ var portalNode = portalTarget ? (_document$querySelect = document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('body') : document.querySelector('body');
71
+ return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, {
72
+ className: (0, _classnames.default)(blockClass, className),
73
+ ref: ref,
74
+ role: "main"
75
+ }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_CoachmarkHeader.CoachmarkHeader, {
76
+ onClose: function onClose() {
77
+ setLinkFocusIndex(0);
78
+ _onClose();
79
+ }
80
+ }), /*#__PURE__*/_react.default.createElement("div", {
81
+ className: "".concat(overlayClass, "__body")
82
+ }, /*#__PURE__*/_react.default.createElement("div", {
83
+ className: "".concat(overlayClass, "-element")
84
+ }, !media && /*#__PURE__*/_react.default.createElement(_iconsReact.Idea, {
85
+ size: 20,
86
+ className: "".concat(blockClass, "__icon-idea")
87
+ }), media && (media.render ? media.render() : /*#__PURE__*/_react.default.createElement(_SteppedAnimatedMedia.SteppedAnimatedMedia, {
88
+ className: "".concat(overlayClass, "__element-stepped-media"),
89
+ filePaths: media.filePaths,
90
+ playStep: 0
91
+ })), /*#__PURE__*/_react.default.createElement("div", {
92
+ className: "".concat(overlayClass, "-element__content")
93
+ }, title && /*#__PURE__*/_react.default.createElement("h2", {
94
+ className: "".concat(overlayClass, "-element__title")
95
+ }, title), description && /*#__PURE__*/_react.default.createElement("p", {
96
+ className: "".concat(overlayClass, "-element__body")
97
+ }, description)), /*#__PURE__*/_react.default.createElement("ul", {
98
+ className: "".concat(blockClass, "__nav-links")
99
+ }, navLinkLabels.map(function (label, index) {
100
+ if (index === linkFocusIndex) {
101
+ return renderNavLink(index, label, buttonFocusRef);
102
+ } else {
103
+ return renderNavLink(index, label);
104
+ }
105
+ })), closeButtonLabel && /*#__PURE__*/_react.default.createElement("div", {
106
+ className: "".concat(overlayClass, "__footer")
107
+ }, /*#__PURE__*/_react.default.createElement(_react2.Button, {
108
+ size: "sm",
109
+ onClick: function onClick() {
110
+ setLinkFocusIndex(0);
111
+ _onClose();
112
+ }
113
+ }, closeButtonLabel))))), portalNode);
114
+ function renderNavLink(index, label) {
115
+ var ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
116
+ return /*#__PURE__*/_react.default.createElement("li", {
117
+ key: index
118
+ }, /*#__PURE__*/_react.default.createElement(_react2.Button, {
119
+ kind: "ghost",
120
+ size: "sm",
121
+ onClick: function onClick() {
122
+ setLinkFocusIndex(index);
123
+ onClickNavItem(index + 1);
124
+ },
125
+ ref: ref
126
+ }, label));
127
+ }
128
+ });
129
+
130
+ // Return a placeholder if not released and not enabled by feature flag
131
+ exports.CoachmarkStackHome = CoachmarkStackHome = _settings.pkg.checkComponentEnabled(CoachmarkStackHome, componentName);
132
+
133
+ // The display name of the component, used by React. Note that displayName
134
+ // is used in preference to relying on function.name.
135
+ CoachmarkStackHome.displayName = componentName;
136
+
137
+ // The types and DocGen commentary for the component props,
138
+ // in alphabetical order (for consistency).
139
+ // See https://www.npmjs.com/package/prop-types#usage.
140
+ CoachmarkStackHome.propTypes = {
141
+ /**
142
+ * Optional class name for this component.
143
+ */
144
+ className: _propTypes.default.string,
145
+ /**
146
+ * The label for the button that will close the stack
147
+ */
148
+ closeButtonLabel: _propTypes.default.string,
149
+ /**
150
+ * The description of the Coachmark.
151
+ */
152
+ description: _propTypes.default.node.isRequired,
153
+ /**
154
+ * If the stack home is open.
155
+ */
156
+ isOpen: _propTypes.default.bool.isRequired,
157
+ /**
158
+ * The object describing an image in one of two shapes.
159
+ *
160
+ * If a single media element is required, use `{render}`.
161
+ *
162
+ * If a stepped animation is required, use `{filePaths}`.
163
+ *
164
+ * @see {@link MEDIA_PROP_TYPE}.
165
+ */
166
+ media: _propTypes.default.oneOfType([_propTypes.default.shape({
167
+ render: _propTypes.default.func
168
+ }), _propTypes.default.shape({
169
+ filePaths: _propTypes.default.arrayOf(_propTypes.default.string)
170
+ })]),
171
+ /**
172
+ * The labels used to link to the stackable Coachmarks.
173
+ */
174
+ navLinkLabels: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
175
+ /**
176
+ * For internal use only by CoachmarkStack and CoachmarkStackHome.
177
+ */
178
+ onClickNavItem: _propTypes.default.func.isRequired,
179
+ /**
180
+ * Function to call when the stack closes.
181
+ */
182
+ onClose: _propTypes.default.func.isRequired,
183
+ /**
184
+ * By default, the CoachmarkStackHome will be appended to the end of `document.body`.
185
+ * The CoachmarkStackHome will remain persistent as the user navigates the app until
186
+ * the user closes the CoachmarkStackHome.
187
+ *
188
+ * Alternatively, the app developer can tightly couple the CoachmarkStackHome to a DOM
189
+ * element or other component by specifying a CSS selector. The CoachmarkStackHome will
190
+ * remain visible as long as that element remains visible or mounted. When the
191
+ * element is hidden or component is unmounted, the CoachmarkStackHome will disappear.
192
+ */
193
+ portalTarget: _propTypes.default.string,
194
+ /**
195
+ * The title of the Coachmark.
196
+ */
197
+ title: _propTypes.default.string.isRequired
198
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "CoachmarkStack", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _CoachmarkStack.CoachmarkStack;
10
+ }
11
+ });
12
+ var _CoachmarkStack = require("./CoachmarkStack");
@@ -53,7 +53,8 @@ var SelectAll = exports.SelectAll = function SelectAll(datagridState) {
53
53
  dispatch = datagridState.dispatch,
54
54
  rows = datagridState.rows,
55
55
  getRowId = datagridState.getRowId,
56
- toggleAllRowsSelected = datagridState.toggleAllRowsSelected;
56
+ toggleAllRowsSelected = datagridState.toggleAllRowsSelected,
57
+ onAllRowSelect = datagridState.onAllRowSelect;
57
58
  var isFirstColumnStickyLeft = ((_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
58
59
  if (hideSelectAll || radio) {
59
60
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -75,6 +76,7 @@ var SelectAll = exports.SelectAll = function SelectAll(datagridState) {
75
76
  indeterminate: true
76
77
  });
77
78
  toggleAllRowsSelected(false);
79
+ onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
78
80
  return onChange === null || onChange === void 0 ? void 0 : onChange({
79
81
  target: {
80
82
  checked: false
@@ -87,6 +89,7 @@ var SelectAll = exports.SelectAll = function SelectAll(datagridState) {
87
89
  getRowId: getRowId,
88
90
  isChecked: event.target.checked
89
91
  });
92
+ onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
90
93
  return onChange === null || onChange === void 0 ? void 0 : onChange(event);
91
94
  };
92
95
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -52,7 +52,7 @@ var DraggableElement = function DraggableElement(_ref) {
52
52
  size: 16
53
53
  })), children);
54
54
  var style = {
55
- transform: _utilities.CSS.Transform.toString(transform),
55
+ transform: !disabled ? _utilities.CSS.Transform.toString(transform) : {},
56
56
  transition: transition
57
57
  };
58
58
  return /*#__PURE__*/_react.default.createElement("li", (0, _extends2.default)({
@@ -37,7 +37,7 @@ var ButtonWrapper = function ButtonWrapper(_ref) {
37
37
  }, props));
38
38
  },
39
39
  iconDescription: iconTooltipLabel,
40
- tooltipPosition: "left",
40
+ tooltipPosition: "bottom",
41
41
  kind: "ghost",
42
42
  hasIconOnly: true,
43
43
  "test-id": "".concat(blockClass, "__customize-columns-trigger"),
@@ -48,6 +48,9 @@ var Columns = function Columns(_ref) {
48
48
  $splice: [[from, 1], [to, 0, fromCol]]
49
49
  }));
50
50
  }, [columns, setColumnsObject]);
51
+ var filteredStickyColumn = columns === null || columns === void 0 ? void 0 : columns.filter(function (item) {
52
+ return !item.sticky;
53
+ });
51
54
  return /*#__PURE__*/_react.default.createElement("div", {
52
55
  className: "".concat(blockClass, "__customize-columns-column-list"),
53
56
  ref: listRef
@@ -71,7 +74,7 @@ var Columns = function Columns(_ref) {
71
74
  checked: getVisibleColumnsCount() === columns.length,
72
75
  indeterminate: getVisibleColumnsCount() < columns.length && getVisibleColumnsCount() > 0,
73
76
  onChange: function onChange() {
74
- onSelectColumn(columns, getVisibleColumnsCount() !== columns.length);
77
+ onSelectColumn(filteredStickyColumn, getVisibleColumnsCount() !== columns.length);
75
78
  },
76
79
  id: "".concat(blockClass, "__customization-column-select-all"),
77
80
  labelText: selectAllLabel
@@ -97,7 +97,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
97
97
  };
98
98
  var onCheckboxCheck = function onCheckboxCheck(col, value) {
99
99
  var changedDefinitions = columnObjects.map(function (definition) {
100
- if (Array.isArray(col) && col.indexOf(definition) != null || definition.id === col.id) {
100
+ if (Array.isArray(col) && col.indexOf(definition) != -1 || definition.id === col.id) {
101
101
  return _objectSpread(_objectSpread({}, definition), {}, {
102
102
  isVisible: value
103
103
  });
@@ -114,9 +114,9 @@ var DocsPage = exports.DocsPage = function DocsPage() {
114
114
  }
115
115
  }, {
116
116
  title: 'Selecting rows',
117
- description: "When building a Datagrid that requires selectable rows, use the `useSelectRows` hook.\n- Include `useSelectRows` hook\n- Add `onRowSelect` to the `useDatagrid` hook, this is a callback function called when on a row's selection checkbox onChange, and sends back the row object and the event\n ",
117
+ description: "When building a Datagrid that requires selectable rows, use the `useSelectRows` hook.\n- Include `useSelectRows` hook\n- Add `onRowSelect` to the `useDatagrid` hook, this is a callback function called when on a row's selection checkbox onChange, and sends back the row object and the event\n- Add `onAllRowSelect` to the `useDatagrid` hook, this is a callback function called when on all rows selection checkbox onChange, and sends back all rows object and the event\n ",
118
118
  source: {
119
- code: "\nconst [data] = useState(makeData(10));\nconst columns = React.useMemo(() => getColumns(data), []);\nconst datagridState = useDatagrid(\n {\n columns,\n data,\n onRowSelect: (row, event) => console.log(row, event),\n batchActionMenuButtonLabel: 'More',\n },\n useSelectRows\n);\n\nreturn <Datagrid datagridState={datagridState} />;\n "
119
+ code: "\nconst [data] = useState(makeData(10));\nconst columns = React.useMemo(() => getColumns(data), []);\nconst datagridState = useDatagrid(\n {\n columns,\n data,\n onRowSelect: (row, event) => console.log(row, event),\n onAllRowSelect: (rows, event) => console.log(rows, event),\n batchActionMenuButtonLabel: 'More',\n },\n useSelectRows\n);\n\nreturn <Datagrid datagridState={datagridState} />;\n "
120
120
  }
121
121
  }, {
122
122
  description: "The select all checkbox can be optionally hidden by settings the `hideSelectAll` property to `true` in the `useDatagrid` hook.",
@@ -12,6 +12,7 @@ var _react = _interopRequireDefault(require("react"));
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _react2 = require("@carbon/react");
14
14
  var _settings = require("../../settings");
15
+ var _propsHelper = require("../../global/js/utils/props-helper");
15
16
  var _excluded = ["align", "id", "itemText", "onClick", "icon", "shouldHideMenuItem"],
16
17
  _excluded2 = ["id", "onClick", "shouldHideMenuItem", "shouldDisableMenuItem", "disabled"];
17
18
  /**
@@ -55,25 +56,28 @@ var useActionsColumn = function useActionsColumn(hooks) {
55
56
  display: 'flex'
56
57
  }
57
58
  }, rowActions.map(function (action, index) {
58
- var align = action.align,
59
- id = action.id,
60
- itemText = action.itemText,
61
- _onClick = action.onClick,
62
- icon = action.icon,
63
- shouldHideMenuItem = action.shouldHideMenuItem,
64
- rest = (0, _objectWithoutProperties2.default)(action, _excluded);
59
+ var preparedActionProps = (0, _propsHelper.prepareProps)(action, ['isDelete']);
60
+ var align = preparedActionProps.align,
61
+ id = preparedActionProps.id,
62
+ itemText = preparedActionProps.itemText,
63
+ _onClick = preparedActionProps.onClick,
64
+ icon = preparedActionProps.icon,
65
+ shouldHideMenuItem = preparedActionProps.shouldHideMenuItem,
66
+ rest = (0, _objectWithoutProperties2.default)(preparedActionProps, _excluded);
65
67
  var hidden = typeof shouldHideMenuItem === 'function' && shouldHideMenuItem(row);
66
68
  if (hidden) {
67
69
  return null;
68
70
  }
71
+ var Icon = icon;
69
72
  return /*#__PURE__*/_react.default.createElement("div", {
70
73
  className: (0, _classnames.default)("".concat(blockClass, "__actions-column-button"), (0, _defineProperty2.default)({}, "".concat(blockClass, "__disabled-row-action-button"), getDisabledState(row.index))),
71
74
  key: "".concat(itemText, "__").concat(index)
72
- }, /*#__PURE__*/_react.default.createElement(_react2.OverflowMenu, (0, _extends2.default)({}, rest, {
75
+ }, /*#__PURE__*/_react.default.createElement(_react2.IconButton, (0, _extends2.default)({}, rest, {
73
76
  align: align || 'top',
74
- renderIcon: icon,
75
- iconDescription: itemText,
77
+ label: itemText,
76
78
  kind: "ghost",
79
+ name: itemText //for test use
80
+ ,
77
81
  className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__disabled-row-action"), getDisabledState(row.index))),
78
82
  onClick: function onClick(e) {
79
83
  if (getDisabledState(row.index)) {
@@ -83,7 +87,7 @@ var useActionsColumn = function useActionsColumn(hooks) {
83
87
  e.stopPropagation();
84
88
  _onClick(id, row, e);
85
89
  }
86
- })));
90
+ }), /*#__PURE__*/_react.default.createElement(Icon, null)));
87
91
  })), !isFetching && (rowActions.length > 2 || isColumnSticky) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_react2.OverflowMenu, {
88
92
  align: "left",
89
93
  size: "sm",
@@ -18,7 +18,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  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; }
20
20
  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) { (0, _defineProperty2.default)(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; } /* eslint-disable react/prop-types */ /**
21
- * Copyright IBM Corp. 2020, 2023
21
+ * Copyright IBM Corp. 2020, 2024
22
22
  *
23
23
  * This source code is licensed under the Apache-2.0 license found in the
24
24
  * LICENSE file in the root directory of this source tree.
@@ -34,7 +34,7 @@ var useNestedRowExpander = function useNestedRowExpander(hooks) {
34
34
  instance: tempState === null || tempState === void 0 ? void 0 : tempState.current,
35
35
  lastExpandedRowIndex: lastExpandedRowIndex === null || lastExpandedRowIndex === void 0 ? void 0 : lastExpandedRowIndex.current,
36
36
  blockClass: blockClass,
37
- activeElement: document.activeElement
37
+ activeElement: typeof document !== 'undefined' && document.activeElement
38
38
  });
39
39
  var visibleColumns = function visibleColumns(columns) {
40
40
  var expanderColumn = {
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
17
17
  var _EmptyStateContent = require("../EmptyStateContent");
18
18
  var _ErrorIllustration = require("../assets/ErrorIllustration");
19
19
  var _EmptyState = require("../EmptyState");
20
- var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "link", "size", "subtitle", "title"];
20
+ var _excluded = ["action", "className", "illustrationPosition", "illustrationDescription", "illustrationTheme", "link", "size", "subtitle", "title"];
21
21
  /**
22
22
  * Copyright IBM Corp. 2020, 2021
23
23
  *
@@ -40,6 +40,7 @@ var ErrorEmptyState = exports.ErrorEmptyState = /*#__PURE__*/_react.default.forw
40
40
  className = _ref.className,
41
41
  _ref$illustrationPosi = _ref.illustrationPosition,
42
42
  illustrationPosition = _ref$illustrationPosi === void 0 ? _EmptyState.defaults.position : _ref$illustrationPosi,
43
+ illustrationDescription = _ref.illustrationDescription,
43
44
  illustrationTheme = _ref.illustrationTheme,
44
45
  link = _ref.link,
45
46
  _ref$size = _ref.size,
@@ -53,7 +54,7 @@ var ErrorEmptyState = exports.ErrorEmptyState = /*#__PURE__*/_react.default.forw
53
54
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_ErrorIllustration.ErrorIllustration, {
54
55
  theme: illustrationTheme,
55
56
  size: size,
56
- title: title
57
+ alt: illustrationDescription || title
57
58
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
58
59
  action: action,
59
60
  link: link,
@@ -87,6 +88,10 @@ ErrorEmptyState.propTypes = {
87
88
  * Provide an optional class to be applied to the containing node.
88
89
  */
89
90
  className: _propTypes.default.string,
91
+ /**
92
+ * The alt text for empty state svg images. If not provided , title will be used.
93
+ */
94
+ illustrationDescription: _propTypes.default.string,
90
95
  /**
91
96
  * Designates the position of the illustration relative to the content
92
97
  */
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
17
17
  var _EmptyStateContent = require("../EmptyStateContent");
18
18
  var _NoDataIllustration = require("../assets/NoDataIllustration");
19
19
  var _EmptyState = require("../EmptyState");
20
- var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "link", "size", "subtitle", "title"];
20
+ var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
21
21
  /**
22
22
  * Copyright IBM Corp. 2020, 2021
23
23
  *
@@ -41,6 +41,7 @@ var NoDataEmptyState = exports.NoDataEmptyState = /*#__PURE__*/_react.default.fo
41
41
  _ref$illustrationPosi = _ref.illustrationPosition,
42
42
  illustrationPosition = _ref$illustrationPosi === void 0 ? _EmptyState.defaults.position : _ref$illustrationPosi,
43
43
  illustrationTheme = _ref.illustrationTheme,
44
+ illustrationDescription = _ref.illustrationDescription,
44
45
  link = _ref.link,
45
46
  _ref$size = _ref.size,
46
47
  size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
@@ -51,9 +52,9 @@ var NoDataEmptyState = exports.NoDataEmptyState = /*#__PURE__*/_react.default.fo
51
52
  className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition), "".concat(blockClass, "-type--noData")),
52
53
  ref: ref
53
54
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NoDataIllustration.NoDataIllustration, {
54
- title: title,
55
55
  theme: illustrationTheme,
56
- size: size
56
+ size: size,
57
+ alt: illustrationDescription || title
57
58
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
58
59
  action: action,
59
60
  link: link,
@@ -87,6 +88,10 @@ NoDataEmptyState.propTypes = {
87
88
  * Provide an optional class to be applied to the containing node.
88
89
  */
89
90
  className: _propTypes.default.string,
91
+ /**
92
+ * The alt text for empty state svg images. If not provided , title will be used.
93
+ */
94
+ illustrationDescription: _propTypes.default.string,
90
95
  /**
91
96
  * Designates the position of the illustration relative to the content
92
97
  */
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
17
17
  var _EmptyStateContent = require("../EmptyStateContent");
18
18
  var _NoTagsIllustration = require("../assets/NoTagsIllustration");
19
19
  var _EmptyState = require("../EmptyState");
20
- var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "link", "size", "subtitle", "title"];
20
+ var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
21
21
  /**
22
22
  * Copyright IBM Corp. 2020, 2021
23
23
  *
@@ -41,6 +41,7 @@ var NoTagsEmptyState = exports.NoTagsEmptyState = /*#__PURE__*/_react.default.fo
41
41
  _ref$illustrationPosi = _ref.illustrationPosition,
42
42
  illustrationPosition = _ref$illustrationPosi === void 0 ? _EmptyState.defaults.position : _ref$illustrationPosi,
43
43
  illustrationTheme = _ref.illustrationTheme,
44
+ illustrationDescription = _ref.illustrationDescription,
44
45
  link = _ref.link,
45
46
  _ref$size = _ref.size,
46
47
  size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
@@ -53,7 +54,7 @@ var NoTagsEmptyState = exports.NoTagsEmptyState = /*#__PURE__*/_react.default.fo
53
54
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NoTagsIllustration.NoTagsIllustration, {
54
55
  theme: illustrationTheme,
55
56
  size: size,
56
- title: title
57
+ alt: illustrationDescription || title
57
58
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
58
59
  action: action,
59
60
  link: link,
@@ -87,6 +88,10 @@ NoTagsEmptyState.propTypes = {
87
88
  * Provide an optional class to be applied to the containing node.
88
89
  */
89
90
  className: _propTypes.default.string,
91
+ /**
92
+ * The alt text for empty state svg images. If not provided , title will be used.
93
+ */
94
+ illustrationDescription: _propTypes.default.string,
90
95
  /**
91
96
  * Designates the position of the illustration relative to the content
92
97
  */
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
17
17
  var _EmptyStateContent = require("../EmptyStateContent");
18
18
  var _NotFoundIllustration = require("../assets/NotFoundIllustration");
19
19
  var _EmptyState = require("../EmptyState");
20
- var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "link", "size", "subtitle", "title"];
20
+ var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
21
21
  /**
22
22
  * Copyright IBM Corp. 2020, 2021
23
23
  *
@@ -41,6 +41,7 @@ var NotFoundEmptyState = exports.NotFoundEmptyState = /*#__PURE__*/_react.defaul
41
41
  _ref$illustrationPosi = _ref.illustrationPosition,
42
42
  illustrationPosition = _ref$illustrationPosi === void 0 ? _EmptyState.defaults.position : _ref$illustrationPosi,
43
43
  illustrationTheme = _ref.illustrationTheme,
44
+ illustrationDescription = _ref.illustrationDescription,
44
45
  link = _ref.link,
45
46
  _ref$size = _ref.size,
46
47
  size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
@@ -53,7 +54,7 @@ var NotFoundEmptyState = exports.NotFoundEmptyState = /*#__PURE__*/_react.defaul
53
54
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NotFoundIllustration.NotFoundIllustration, {
54
55
  theme: illustrationTheme,
55
56
  size: size,
56
- title: title
57
+ alt: illustrationDescription || title
57
58
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
58
59
  action: action,
59
60
  link: link,
@@ -87,6 +88,10 @@ NotFoundEmptyState.propTypes = {
87
88
  * Provide an optional class to be applied to the containing node.
88
89
  */
89
90
  className: _propTypes.default.string,
91
+ /**
92
+ * The alt text for empty state svg images. If not provided , title will be used.
93
+ */
94
+ illustrationDescription: _propTypes.default.string,
90
95
  /**
91
96
  * Designates the position of the illustration relative to the content
92
97
  */
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
17
17
  var _EmptyStateContent = require("../EmptyStateContent");
18
18
  var _NotificationsIllustration = require("../assets/NotificationsIllustration");
19
19
  var _EmptyState = require("../EmptyState");
20
- var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "link", "size", "subtitle", "title"];
20
+ var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
21
21
  /**
22
22
  * Copyright IBM Corp. 2020, 2021
23
23
  *
@@ -41,6 +41,7 @@ var NotificationsEmptyState = exports.NotificationsEmptyState = /*#__PURE__*/_re
41
41
  _ref$illustrationPosi = _ref.illustrationPosition,
42
42
  illustrationPosition = _ref$illustrationPosi === void 0 ? _EmptyState.defaults.position : _ref$illustrationPosi,
43
43
  illustrationTheme = _ref.illustrationTheme,
44
+ illustrationDescription = _ref.illustrationDescription,
44
45
  link = _ref.link,
45
46
  _ref$size = _ref.size,
46
47
  size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
@@ -53,7 +54,7 @@ var NotificationsEmptyState = exports.NotificationsEmptyState = /*#__PURE__*/_re
53
54
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_NotificationsIllustration.NotificationsIllustration, {
54
55
  size: size,
55
56
  theme: illustrationTheme,
56
- title: title
57
+ alt: illustrationDescription || title
57
58
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
58
59
  action: action,
59
60
  link: link,
@@ -87,6 +88,10 @@ NotificationsEmptyState.propTypes = {
87
88
  * Provide an optional class to be applied to the containing node.
88
89
  */
89
90
  className: _propTypes.default.string,
91
+ /**
92
+ * The alt text for empty state svg images. If not provided , title will be used.
93
+ */
94
+ illustrationDescription: _propTypes.default.string,
90
95
  /**
91
96
  * Designates the position of the illustration relative to the content
92
97
  */
@@ -17,7 +17,7 @@ var _settings = require("../../../settings");
17
17
  var _EmptyStateContent = require("../EmptyStateContent");
18
18
  var _UnauthorizedIllustration = require("../assets/UnauthorizedIllustration");
19
19
  var _EmptyState = require("../EmptyState");
20
- var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "link", "size", "subtitle", "title"];
20
+ var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
21
21
  /**
22
22
  * Copyright IBM Corp. 2020, 2021
23
23
  *
@@ -41,6 +41,7 @@ var UnauthorizedEmptyState = exports.UnauthorizedEmptyState = /*#__PURE__*/_reac
41
41
  _ref$illustrationPosi = _ref.illustrationPosition,
42
42
  illustrationPosition = _ref$illustrationPosi === void 0 ? _EmptyState.defaults.position : _ref$illustrationPosi,
43
43
  illustrationTheme = _ref.illustrationTheme,
44
+ illustrationDescription = _ref.illustrationDescription,
44
45
  link = _ref.link,
45
46
  _ref$size = _ref.size,
46
47
  size = _ref$size === void 0 ? _EmptyState.defaults.size : _ref$size,
@@ -53,7 +54,7 @@ var UnauthorizedEmptyState = exports.UnauthorizedEmptyState = /*#__PURE__*/_reac
53
54
  }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_UnauthorizedIllustration.UnauthorizedIllustration, {
54
55
  size: size,
55
56
  theme: illustrationTheme,
56
- title: title
57
+ alt: illustrationDescription || title
57
58
  }), /*#__PURE__*/_react.default.createElement(_EmptyStateContent.EmptyStateContent, {
58
59
  action: action,
59
60
  link: link,
@@ -87,6 +88,10 @@ UnauthorizedEmptyState.propTypes = {
87
88
  * Provide an optional class to be applied to the containing node.
88
89
  */
89
90
  className: _propTypes.default.string,
91
+ /**
92
+ * The alt text for empty state svg images. If not provided , title will be used.
93
+ */
94
+ illustrationDescription: _propTypes.default.string,
90
95
  /**
91
96
  * Designates the position of the illustration relative to the content
92
97
  */