@carbon/ibm-products 2.43.2-canary.308 → 2.43.2-canary.317

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/css/index-full-carbon.css +4239 -4238
  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.css +618 -0
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +1 -1
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +1 -0
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +1 -1
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/AddSelect/AddSelectBody.js +8 -1
  14. package/es/components/AddSelect/AddSelectSidebar.js +1 -1
  15. package/es/components/Carousel/Carousel.js +17 -8
  16. package/es/components/Checklist/ChecklistChart.js +22 -6
  17. package/es/components/Coachmark/Coachmark.js +16 -9
  18. package/es/components/Coachmark/CoachmarkOverlay.js +30 -19
  19. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +5 -1
  20. package/es/components/EmptyStates/EmptyState.d.ts +1 -1
  21. package/es/components/EmptyStates/EmptyState.js +8 -2
  22. package/es/components/EmptyStates/EmptyStateV2.d.ts +1 -2
  23. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +1 -2
  24. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  25. package/es/components/EmptyStates/ErrorEmptyState/index.d.ts +8 -1
  26. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +1 -2
  27. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  28. package/es/components/EmptyStates/NoDataEmptyState/index.d.ts +8 -1
  29. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +1 -2
  30. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  31. package/es/components/EmptyStates/NoTagsEmptyState/index.d.ts +8 -1
  32. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +1 -2
  33. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  34. package/es/components/EmptyStates/NotFoundEmptyState/index.d.ts +8 -1
  35. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +1 -2
  36. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  37. package/es/components/EmptyStates/NotificationsEmptyState/index.d.ts +8 -1
  38. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +1 -2
  39. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  40. package/es/components/EmptyStates/UnauthorizedEmptyState/index.d.ts +8 -1
  41. package/es/components/EmptyStates/index.d.ts +22 -8
  42. package/es/components/NotificationsPanel/NotificationsPanel.js +8 -1
  43. package/es/components/UserAvatar/UserAvatar.d.ts +1 -1
  44. package/es/components/UserAvatar/UserAvatar.js +3 -2
  45. package/es/index.js +8 -8
  46. package/lib/components/AddSelect/AddSelectBody.js +8 -1
  47. package/lib/components/AddSelect/AddSelectSidebar.js +1 -1
  48. package/lib/components/Carousel/Carousel.js +17 -8
  49. package/lib/components/Checklist/ChecklistChart.js +20 -4
  50. package/lib/components/Coachmark/Coachmark.js +15 -8
  51. package/lib/components/Coachmark/CoachmarkOverlay.js +29 -18
  52. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +5 -1
  53. package/lib/components/EmptyStates/EmptyState.d.ts +1 -1
  54. package/lib/components/EmptyStates/EmptyState.js +7 -1
  55. package/lib/components/EmptyStates/EmptyStateV2.d.ts +1 -2
  56. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +1 -2
  57. package/lib/components/EmptyStates/ErrorEmptyState/index.d.ts +8 -1
  58. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +1 -2
  59. package/lib/components/EmptyStates/NoDataEmptyState/index.d.ts +8 -1
  60. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +1 -2
  61. package/lib/components/EmptyStates/NoTagsEmptyState/index.d.ts +8 -1
  62. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +1 -2
  63. package/lib/components/EmptyStates/NotFoundEmptyState/index.d.ts +8 -1
  64. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +1 -2
  65. package/lib/components/EmptyStates/NotificationsEmptyState/index.d.ts +8 -1
  66. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +1 -2
  67. package/lib/components/EmptyStates/UnauthorizedEmptyState/index.d.ts +8 -1
  68. package/lib/components/EmptyStates/index.d.ts +22 -8
  69. package/lib/components/NotificationsPanel/NotificationsPanel.js +8 -1
  70. package/lib/components/UserAvatar/UserAvatar.d.ts +1 -1
  71. package/lib/components/UserAvatar/UserAvatar.js +3 -2
  72. package/lib/index.js +40 -40
  73. package/package.json +4 -4
  74. package/scss/components/UserAvatar/_carbon-imports.scss +1 -0
  75. package/scss/components/UserAvatar/_user-avatar.scss +4 -0
  76. package/telemetry.yml +1 -1
@@ -12,6 +12,7 @@ import { CarouselItem } from './CarouselItem.js';
12
12
  import cx from 'classnames';
13
13
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
14
14
  import { pkg } from '../../settings.js';
15
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
15
16
 
16
17
  var _excluded = ["children", "className", "disableArrowScroll", "fadedEdgeColor", "onChangeIsScrollable", "onScroll"];
17
18
  // The block part of our conventional BEM class names (blockClass__E--M).
@@ -54,6 +55,8 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
54
55
  rest = _objectWithoutProperties(_ref, _excluded);
55
56
  var carouselRef = useRef(null);
56
57
  var scrollRef = useRef(null);
58
+ var leftFadedEdgeRef = useRef(null);
59
+ var rightFadedEdgeRef = useRef(null);
57
60
  // Array of refs used to reference this component's children DOM elements
58
61
  var childElementsRef = useRef(Array(React__default.Children.count(children)).fill(useRef(null)));
59
62
  var leftFadedEdgeColor = _typeof(fadedEdgeColor) === 'object' ? fadedEdgeColor === null || fadedEdgeColor === void 0 ? void 0 : fadedEdgeColor.left : fadedEdgeColor;
@@ -264,6 +267,16 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
264
267
  }
265
268
  };
266
269
  }, [handleScrollNext, handleScrollPrev, handleScrollReset, handleScrollToView]);
270
+ useIsomorphicEffect(function () {
271
+ if (leftFadedEdgeRef !== null && leftFadedEdgeRef !== void 0 && leftFadedEdgeRef.current && leftFadedEdgeRef.current.style) {
272
+ leftFadedEdgeRef.current.style.background = "linear-gradient(90deg, ".concat(leftFadedEdgeColor, ", transparent)");
273
+ }
274
+ }, [leftFadedEdgeRef, leftFadedEdgeColor]);
275
+ useIsomorphicEffect(function () {
276
+ if (rightFadedEdgeRef !== null && rightFadedEdgeRef !== void 0 && rightFadedEdgeRef.current && rightFadedEdgeRef.current.style) {
277
+ rightFadedEdgeRef.current.style.background = "linear-gradient(270deg, ".concat(rightFadedEdgeColor, ", transparent)");
278
+ }
279
+ }, [rightFadedEdgeRef, rightFadedEdgeColor]);
267
280
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
268
281
  tabIndex: -1,
269
282
  className: cx(blockClass, className),
@@ -281,15 +294,11 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
281
294
  }
282
295
  }, child);
283
296
  })), leftFadedEdgeColor && /*#__PURE__*/React__default.createElement("div", {
284
- className: "".concat(blockClass, "__elements-container--scrolled"),
285
- style: {
286
- background: "linear-gradient(90deg, ".concat(leftFadedEdgeColor, ", transparent)")
287
- }
297
+ ref: leftFadedEdgeRef,
298
+ className: "".concat(blockClass, "__elements-container--scrolled")
288
299
  }), rightFadedEdgeColor && /*#__PURE__*/React__default.createElement("div", {
289
- className: "".concat(blockClass, "__elements-container--scroll-max"),
290
- style: {
291
- background: "linear-gradient(270deg, ".concat(rightFadedEdgeColor, ", transparent)")
292
- }
300
+ ref: rightFadedEdgeRef,
301
+ className: "".concat(blockClass, "__elements-container--scroll-max")
293
302
  })));
294
303
  });
295
304
  Carousel.displayName = componentName;
@@ -5,8 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React__default from 'react';
8
+ import { objectWithoutProperties as _objectWithoutProperties, createForOfIteratorHelper as _createForOfIteratorHelper, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default, { useEffect } from 'react';
10
10
  import PropTypes from '../../_virtual/index.js';
11
11
  import cx from 'classnames';
12
12
  import clamp from 'lodash/clamp';
@@ -38,12 +38,28 @@ function (_ref, ref) {
38
38
  var numDegrees = clamp(value * 360, 0, 360);
39
39
  var circleColor = theme === Themes.light ? gray20 : gray70; // $ui-03 (-ish)
40
40
  var progressColor = purple50;
41
+ useEffect(function () {
42
+ var ele = document.getElementsByClassName("".concat(blockClass));
43
+ setTimeout(function () {
44
+ var _iterator = _createForOfIteratorHelper(ele),
45
+ _step;
46
+ try {
47
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
48
+ var el = _step.value;
49
+ if (el instanceof HTMLElement) {
50
+ el.style.setProperty('background-image', "conic-gradient(".concat(progressColor, " ").concat(numDegrees, "deg, ").concat(circleColor, " ").concat(numDegrees, "deg 360deg)"));
51
+ el.style.setProperty('border-radius', '50%');
52
+ }
53
+ }
54
+ } catch (err) {
55
+ _iterator.e(err);
56
+ } finally {
57
+ _iterator.f();
58
+ }
59
+ }, 0);
60
+ });
41
61
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
42
62
  className: cx(blockClass, className),
43
- style: {
44
- backgroundImage: "conic-gradient(".concat(progressColor, " ").concat(numDegrees, "deg, ").concat(circleColor, " ").concat(numDegrees, "deg 360deg)"),
45
- borderRadius: '50%'
46
- },
47
63
  ref: ref,
48
64
  role: "img"
49
65
  }, getDevtoolsProps(componentName)));
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { forwardRef, useState, useRef, useCallback, useEffect } from 'react';
10
10
  import { useClickOutsideElement, useWindowEvent } from './utils/hooks.js';
11
11
  import { COACHMARK_OVERLAY_KIND } from './utils/enums.js';
@@ -39,7 +39,6 @@ var defaults = {
39
39
  */
40
40
 
41
41
  var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
42
- var _positionTune$y, _positionTune$x;
43
42
  var _ref$align = _ref.align,
44
43
  align = _ref$align === void 0 ? defaults.align : _ref$align,
45
44
  autoAlign = _ref.autoAlign,
@@ -83,6 +82,7 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
83
82
  var _coachmarkRef = ref || backupRef;
84
83
  var _overlayRef = overlayRef || overlayBackupRef;
85
84
  var portalNode = useRef(null);
85
+ var popoverRef = useRef(null);
86
86
  useIsomorphicEffect(function () {
87
87
  var _document$querySelect, _document, _document2, _document3;
88
88
  portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
@@ -128,10 +128,6 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
128
128
  setShouldResetPosition(true);
129
129
  }
130
130
  };
131
- var overlayPositionStyle = {
132
- top: ((_positionTune$y = positionTune === null || positionTune === void 0 ? void 0 : positionTune.y) !== null && _positionTune$y !== void 0 ? _positionTune$y : 0) - 16,
133
- left: ((_positionTune$x = positionTune === null || positionTune === void 0 ? void 0 : positionTune.x) !== null && _positionTune$x !== void 0 ? _positionTune$x : 0) - 16
134
- };
135
131
  var contextValue = {
136
132
  buttonProps: {
137
133
  'aria-expanded': isOpen,
@@ -162,6 +158,19 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
162
158
  setIsOpen(true);
163
159
  }
164
160
  }, [shouldResetPosition]);
161
+ useIsomorphicEffect(function () {
162
+ var _positionTune$y, _positionTune$x;
163
+ var overlayPositionStyle = {
164
+ top: "".concat(((_positionTune$y = positionTune === null || positionTune === void 0 ? void 0 : positionTune.y) !== null && _positionTune$y !== void 0 ? _positionTune$y : 0) - 16, "px"),
165
+ left: "".concat(((_positionTune$x = positionTune === null || positionTune === void 0 ? void 0 : positionTune.x) !== null && _positionTune$x !== void 0 ? _positionTune$x : 0) - 16, "px")
166
+ };
167
+ if (popoverRef.current && popoverRef.current.style && overlayPositionStyle) {
168
+ var combinedStyle = _objectSpread2({
169
+ position: 'absolute'
170
+ }, overlayPositionStyle);
171
+ Object.assign(popoverRef.current.style, combinedStyle);
172
+ }
173
+ }, [popoverRef, positionTune]);
165
174
 
166
175
  // On unmount:
167
176
  // - DO NOT "Close()" the coachmark.
@@ -193,9 +202,7 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
193
202
  portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)) : /*#__PURE__*/React__default.createElement(Popover, {
194
203
  highContrast: true,
195
204
  caret: true,
196
- style: _objectSpread2({
197
- position: 'absolute'
198
- }, overlayPositionStyle),
205
+ ref: popoverRef,
199
206
  align: align,
200
207
  autoAlign: autoAlign,
201
208
  open: isOpen
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React__default, { forwardRef, useState, useRef, useEffect } from 'react';
9
+ import React__default, { forwardRef, useState, useRef, useMemo, useEffect } from 'react';
10
10
  import uuidv4 from '../../global/js/utils/uuidv4.js';
11
11
  import PropTypes from '../../_virtual/index.js';
12
12
  import cx from 'classnames';
@@ -17,6 +17,7 @@ import { CoachmarkHeader } from './CoachmarkHeader.js';
17
17
  import { getOffsetTune } from './utils/constants.js';
18
18
  import { useCoachmark } from './utils/context.js';
19
19
  import { COACHMARK_OVERLAY_KIND } from './utils/enums.js';
20
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
20
21
 
21
22
  var _excluded = ["children", "onClose", "fixedIsVisible", "className", "kind", "theme"];
22
23
 
@@ -81,26 +82,27 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
81
82
  }
82
83
  }
83
84
  };
84
- var styledTune = {};
85
- if (isBeacon || isDraggable) {
86
- if (coachmark.targetRect) {
87
- styledTune.left = coachmark.targetRect.x + window.scrollX;
88
- styledTune.top = coachmark.targetRect.y + window.scrollY;
89
- }
90
- if (styledTune.left && styledTune.top) {
91
- if (isBeacon) {
92
- // Compensate for radius of beacon
93
- styledTune.left += 16;
94
- styledTune.top += 16;
85
+ var styledTune = useMemo(function () {
86
+ var style = {};
87
+ if (isBeacon || isDraggable) {
88
+ if (coachmark.targetRect) {
89
+ style.left = coachmark.targetRect.x + window.scrollX;
90
+ style.top = coachmark.targetRect.y + window.scrollY;
95
91
  }
96
- if (isDraggable) {
97
- // Compensate for width and height of target element
98
- var offsetTune = getOffsetTune(coachmark, kind);
99
- styledTune.left += offsetTune.left;
100
- styledTune.top += offsetTune.top;
92
+ if (style.left && style.top) {
93
+ if (isBeacon) {
94
+ style.left = style.left + 16;
95
+ style.top = style.top + 16;
96
+ }
97
+ if (isDraggable) {
98
+ var offsetTune = getOffsetTune(coachmark, kind);
99
+ style.left = style.left + offsetTune.left;
100
+ style.top = style.top + offsetTune.top;
101
+ }
101
102
  }
102
103
  }
103
- }
104
+ return style;
105
+ }, [isBeacon, isDraggable, coachmark, kind]);
104
106
  function handleDragBounds(x, y) {
105
107
  var xRes = x;
106
108
  var yRes = y;
@@ -139,10 +141,19 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
139
141
  overlay.style.bottom = 'auto';
140
142
  }
141
143
  var contentId = uuidv4();
144
+ useIsomorphicEffect(function () {
145
+ if (overlayRef.current) {
146
+ var _overlayRef$current;
147
+ var currentStyle = (_overlayRef$current = overlayRef.current) === null || _overlayRef$current === void 0 ? void 0 : _overlayRef$current.style;
148
+ Object.keys(styledTune).forEach(function (key) {
149
+ var value = styledTune[key];
150
+ currentStyle.setProperty(key, "".concat(value, "px"));
151
+ });
152
+ }
153
+ }, [styledTune, overlayRef]);
142
154
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
143
155
  className: cx(blockClass, "".concat(blockClass, "--").concat(kind), "".concat(blockClass, "__").concat(theme), (isBeacon || isDraggable) && "".concat(blockClass, "--").concat(coachmark.align), fixedIsVisible && "".concat(blockClass, "--is-visible"), a11yDragMode && "".concat(blockClass, "--is-dragmode"), className),
144
156
  ref: overlayRef,
145
- style: styledTune,
146
157
  "aria-labelledby": contentId,
147
158
  tabIndex: -1
148
159
  }, getDevtoolsProps(componentName)), isDraggable ? /*#__PURE__*/React__default.createElement(CoachmarkDragbar, {
@@ -9,10 +9,14 @@ import { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers
9
9
  import React__default from 'react';
10
10
  import { pkg } from '../../../settings.js';
11
11
  import { TableBody, TableRow, TableCell } from '@carbon/react';
12
+ import { EmptyState } from '../../EmptyStates/EmptyState.js';
13
+ import '../../EmptyStates/EmptyStateV2.js';
12
14
  import { ErrorEmptyState } from '../../EmptyStates/ErrorEmptyState/ErrorEmptyState.js';
13
15
  import { NoDataEmptyState } from '../../EmptyStates/NoDataEmptyState/NoDataEmptyState.js';
16
+ import '../../EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js';
14
17
  import { NotFoundEmptyState } from '../../EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js';
15
- import { EmptyState } from '../../EmptyStates/EmptyState.js';
18
+ import '../../EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js';
19
+ import '../../EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js';
16
20
 
17
21
  var blockClass = "".concat(pkg.prefix, "--datagrid");
18
22
  var DatagridEmptyBody = function DatagridEmptyBody(datagridState) {
@@ -17,7 +17,7 @@ export declare const defaults: {
17
17
  position: string;
18
18
  size: sizes;
19
19
  };
20
- interface EmptyStateProps {
20
+ export interface EmptyStateProps {
21
21
  /**
22
22
  * Empty state action button
23
23
  */
@@ -5,8 +5,15 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, defineProperty as _defineProperty, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
+ import { EmptyStateV2 } from './EmptyStateV2.js';
11
+ import './ErrorEmptyState/ErrorEmptyState.js';
12
+ import './NoDataEmptyState/NoDataEmptyState.js';
13
+ import './NoTagsEmptyState/NoTagsEmptyState.js';
14
+ import './NotFoundEmptyState/NotFoundEmptyState.js';
15
+ import './NotificationsEmptyState/NotificationsEmptyState.js';
16
+ import './UnauthorizedEmptyState/UnauthorizedEmptyState.js';
10
17
  import PropTypes from '../../_virtual/index.js';
11
18
  import cx from 'classnames';
12
19
  import { Button, Link } from '@carbon/react';
@@ -14,7 +21,6 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
14
21
  import '../../global/js/utils/props-helper.js';
15
22
  import { pkg } from '../../settings.js';
16
23
  import { EmptyStateContent } from './EmptyStateContent.js';
17
- import { EmptyStateV2 } from './EmptyStateV2.js';
18
24
 
19
25
  var _excluded = ["v2"],
20
26
  _excluded2 = ["action", "className", "illustration", "illustrationDescription", "illustrationPosition", "link", "size", "subtitle", "title"];
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React, { ReactNode } from 'react';
8
8
  import '../../global/js/utils/props-helper';
9
- interface EmptyStateV2Props {
9
+ export interface EmptyStateV2Props {
10
10
  /**
11
11
  * Props for the action button. Refer to the Carbon Components button documentation for full list of props.
12
12
  */
@@ -64,4 +64,3 @@ interface EmptyStateV2Props {
64
64
  * In order to avoid breaking changes in the future `EmptyStateV2` is not actually directly importable.
65
65
  */
66
66
  export declare let EmptyStateV2: React.ForwardRefExoticComponent<EmptyStateV2Props & React.RefAttributes<HTMLDivElement>>;
67
- export {};
@@ -8,7 +8,7 @@
8
8
  import React, { ReactNode } from 'react';
9
9
  import { ButtonProps } from '@carbon/react';
10
10
  import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
11
- interface ErrorEmptyStateProps {
11
+ export interface ErrorEmptyStateProps {
12
12
  /**
13
13
  * Empty state action button
14
14
  */
@@ -61,4 +61,3 @@ interface ErrorEmptyStateProps {
61
61
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
62
62
  */
63
63
  export declare let ErrorEmptyState: React.ForwardRefExoticComponent<ErrorEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
- export {};
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
10
  import PropTypes from '../../../_virtual/index.js';
11
11
  import { Button, Link } from '@carbon/react';
@@ -1 +1,8 @@
1
- export { ErrorEmptyState } from "./ErrorEmptyState";
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export { ErrorEmptyState } from './ErrorEmptyState';
8
+ export type { ErrorEmptyStateProps } from './ErrorEmptyState';
@@ -8,7 +8,7 @@
8
8
  import React, { ReactNode } from 'react';
9
9
  import { ButtonProps } from '@carbon/react';
10
10
  import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
11
- interface NoDataEmptyStateProps {
11
+ export interface NoDataEmptyStateProps {
12
12
  /**
13
13
  * Empty state action button
14
14
  */
@@ -61,4 +61,3 @@ interface NoDataEmptyStateProps {
61
61
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
62
62
  */
63
63
  export declare let NoDataEmptyState: React.ForwardRefExoticComponent<NoDataEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
- export {};
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
10
  import PropTypes from '../../../_virtual/index.js';
11
11
  import cx from 'classnames';
@@ -1 +1,8 @@
1
- export { NoDataEmptyState } from "./NoDataEmptyState";
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export { NoDataEmptyState } from './NoDataEmptyState';
8
+ export type { NoDataEmptyStateProps } from './NoDataEmptyState';
@@ -8,7 +8,7 @@
8
8
  import React, { ReactNode } from 'react';
9
9
  import { ButtonProps } from '@carbon/react';
10
10
  import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
11
- interface NoTagsEmptyStateProps {
11
+ export interface NoTagsEmptyStateProps {
12
12
  /**
13
13
  * Empty state action button
14
14
  */
@@ -61,4 +61,3 @@ interface NoTagsEmptyStateProps {
61
61
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
62
62
  */
63
63
  export declare let NoTagsEmptyState: React.ForwardRefExoticComponent<NoTagsEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
- export {};
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
10
  import PropTypes from '../../../_virtual/index.js';
11
11
  import cx from 'classnames';
@@ -1 +1,8 @@
1
- export { NoTagsEmptyState } from "./NoTagsEmptyState";
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export { NoTagsEmptyState } from './NoTagsEmptyState';
8
+ export type { NoTagsEmptyStateProps } from './NoTagsEmptyState';
@@ -8,7 +8,7 @@
8
8
  import React, { ReactNode } from 'react';
9
9
  import { ButtonProps } from '@carbon/react';
10
10
  import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
11
- interface NotFoundEmptyStateProps {
11
+ export interface NotFoundEmptyStateProps {
12
12
  /**
13
13
  * Empty state action button
14
14
  */
@@ -61,4 +61,3 @@ interface NotFoundEmptyStateProps {
61
61
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
62
62
  */
63
63
  export declare let NotFoundEmptyState: React.ForwardRefExoticComponent<NotFoundEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
- export {};
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
10
  import PropTypes from '../../../_virtual/index.js';
11
11
  import cx from 'classnames';
@@ -1 +1,8 @@
1
- export { NotFoundEmptyState } from "./NotFoundEmptyState";
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export { NotFoundEmptyState } from './NotFoundEmptyState';
8
+ export type { NotFoundEmptyStateProps } from './NotFoundEmptyState';
@@ -8,7 +8,7 @@
8
8
  import React, { ReactNode } from 'react';
9
9
  import { ButtonProps } from '@carbon/react';
10
10
  import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
11
- interface NotificationsEmptyStateProps {
11
+ export interface NotificationsEmptyStateProps {
12
12
  /**
13
13
  * Empty state action button
14
14
  */
@@ -61,4 +61,3 @@ interface NotificationsEmptyStateProps {
61
61
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
62
62
  */
63
63
  export declare let NotificationsEmptyState: React.ForwardRefExoticComponent<NotificationsEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
- export {};
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
10
  import PropTypes from '../../../_virtual/index.js';
11
11
  import cx from 'classnames';
@@ -1 +1,8 @@
1
- export { NotificationsEmptyState } from "./NotificationsEmptyState";
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export { NotificationsEmptyState } from './NotificationsEmptyState';
8
+ export type { NotificationsEmptyStateProps } from './NotificationsEmptyState';
@@ -8,7 +8,7 @@
8
8
  import React, { ReactNode } from 'react';
9
9
  import { ButtonProps } from '@carbon/react';
10
10
  import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
11
- interface UnauthorizedEmptyStateProps {
11
+ export interface UnauthorizedEmptyStateProps {
12
12
  /**
13
13
  * Empty state action button
14
14
  */
@@ -61,4 +61,3 @@ interface UnauthorizedEmptyStateProps {
61
61
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
62
62
  */
63
63
  export declare let UnauthorizedEmptyState: React.ForwardRefExoticComponent<UnauthorizedEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
- export {};
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
10
  import PropTypes from '../../../_virtual/index.js';
11
11
  import cx from 'classnames';
@@ -1 +1,8 @@
1
- export { UnauthorizedEmptyState } from "./UnauthorizedEmptyState";
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export { UnauthorizedEmptyState } from './UnauthorizedEmptyState';
8
+ export type { UnauthorizedEmptyStateProps } from './UnauthorizedEmptyState';
@@ -1,8 +1,22 @@
1
- export { EmptyState } from "./EmptyState";
2
- export { EmptyStateV2 } from "./EmptyStateV2";
3
- export { ErrorEmptyState } from "./ErrorEmptyState";
4
- export { NoDataEmptyState } from "./NoDataEmptyState";
5
- export { NoTagsEmptyState } from "./NoTagsEmptyState";
6
- export { NotFoundEmptyState } from "./NotFoundEmptyState";
7
- export { NotificationsEmptyState } from "./NotificationsEmptyState";
8
- export { UnauthorizedEmptyState } from "./UnauthorizedEmptyState";
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export { EmptyState } from './EmptyState';
8
+ export { EmptyStateV2 } from './EmptyStateV2';
9
+ export { ErrorEmptyState } from './ErrorEmptyState';
10
+ export { NoDataEmptyState } from './NoDataEmptyState';
11
+ export { NoTagsEmptyState } from './NoTagsEmptyState';
12
+ export { NotFoundEmptyState } from './NotFoundEmptyState';
13
+ export { NotificationsEmptyState } from './NotificationsEmptyState';
14
+ export { UnauthorizedEmptyState } from './UnauthorizedEmptyState';
15
+ export type { EmptyStateProps } from './EmptyState';
16
+ export type { EmptyStateV2Props } from './EmptyStateV2';
17
+ export type { ErrorEmptyStateProps } from './ErrorEmptyState';
18
+ export type { NoDataEmptyStateProps } from './NoDataEmptyState';
19
+ export type { NoTagsEmptyStateProps } from './NoTagsEmptyState';
20
+ export type { NotFoundEmptyStateProps } from './NotFoundEmptyState';
21
+ export type { NotificationsEmptyStateProps } from './NotificationsEmptyState';
22
+ export type { UnauthorizedEmptyStateProps } from './UnauthorizedEmptyState';
@@ -9,6 +9,14 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
9
9
  import { usePrefix, Button, Toggle, Link, IconButton } from '@carbon/react';
10
10
  import { Settings, ErrorFilled, CheckmarkFilled, WarningAltFilled, InformationSquareFilled, Close, ChevronDown } from '@carbon/react/icons';
11
11
  import React__default, { useRef, useState, useEffect } from 'react';
12
+ import '../EmptyStates/EmptyState.js';
13
+ import '../EmptyStates/EmptyStateV2.js';
14
+ import '../EmptyStates/ErrorEmptyState/ErrorEmptyState.js';
15
+ import '../EmptyStates/NoDataEmptyState/NoDataEmptyState.js';
16
+ import '../EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js';
17
+ import '../EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js';
18
+ import { NotificationsEmptyState } from '../EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js';
19
+ import '../EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js';
12
20
  import PropTypes from '../../_virtual/index.js';
13
21
  import cx from 'classnames';
14
22
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
@@ -19,7 +27,6 @@ import usePrefersReducedMotion from '../../global/js/hooks/usePrefersReducedMoti
19
27
  import wrapFocus from '../../global/js/utils/wrapFocus.js';
20
28
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
21
29
  import { useClickOutside } from '../../global/js/hooks/useClickOutside.js';
22
- import { NotificationsEmptyState } from '../EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js';
23
30
 
24
31
  var _Close;
25
32
  var _excluded = ["className", "data", "daysAgoText", "dismissAllLabel", "dismissSingleNotificationIconDescription", "doNotDisturbDefaultToggled", "doNotDisturbLabel", "emptyStateLabel", "hourAgoText", "hoursAgoText", "minuteAgoText", "minutesAgoText", "monthAgoText", "monthsAgoText", "nowText", "onClickOutside", "onDismissAllNotifications", "onDismissSingleNotification", "onDoNotDisturbChange", "onSettingsClick", "onViewAllClick", "open", "previousLabel", "readLessLabel", "readMoreLabel", "secondsAgoText", "settingsIconDescription", "title", "todayLabel", "viewAllLabel", "yearAgoText", "yearsAgoText", "yesterdayAtText", "yesterdayLabel", "selectorsFloatingMenus", "triggerButtonRef"];
@@ -41,7 +41,7 @@ type UserAvatarBaseProps = {
41
41
  /**
42
42
  * Provide a custom icon to use if you need to use an icon other than the default one
43
43
  */
44
- renderIcon?: React.ElementType;
44
+ renderIcon?: React.ElementType | string;
45
45
  /**
46
46
  * Set the size of the avatar circle
47
47
  */
@@ -123,7 +123,8 @@ UserAvatar.displayName = componentName;
123
123
  // See https://www.npmjs.com/package/prop-types#usage.
124
124
  UserAvatar.propTypes = {
125
125
  /**
126
- * Provide the background color need to be set for UserAvatar.
126
+ * Provide the background color need to be set for UserAvatar. Background color will be set based on lighter or darker theme.
127
+ * For example: if you select order-5-purple, it will take $purple-60 for lighter theme and $purple-50 for darker theme.
127
128
  */
128
129
  backgroundColor: PropTypes.oneOf(['order-1-cyan', 'order-2-gray', 'order-3-green', 'order-4-magenta', 'order-5-purple', 'order-6-teal', 'order-7-cyan', 'order-8-gray', 'order-9-green', 'order-10-magenta', 'order-11-purple', 'order-12-teal']),
129
130
  /**
@@ -151,7 +152,7 @@ UserAvatar.propTypes = {
151
152
  * Provide a custom icon to use if you need to use an icon other than the default one
152
153
  */
153
154
  /**@ts-ignore */
154
- renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
155
+ renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.string]),
155
156
  /**
156
157
  * Set the size of the avatar circle
157
158
  */