@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
package/es/index.js CHANGED
@@ -20,6 +20,14 @@ export { CreateTearsheet } from './components/CreateTearsheet/CreateTearsheet.js
20
20
  export { CreateTearsheetStep } from './components/CreateTearsheet/CreateTearsheetStep.js';
21
21
  export { CreateTearsheetDivider } from './components/CreateTearsheet/CreateTearsheetDivider.js';
22
22
  export { CreateTearsheetNarrow } from './components/CreateTearsheetNarrow/CreateTearsheetNarrow.js';
23
+ export { EmptyState } from './components/EmptyStates/EmptyState.js';
24
+ export { EmptyStateV2 } from './components/EmptyStates/EmptyStateV2.js';
25
+ export { ErrorEmptyState } from './components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js';
26
+ export { NoDataEmptyState } from './components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js';
27
+ export { NoTagsEmptyState } from './components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js';
28
+ export { NotFoundEmptyState } from './components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js';
29
+ export { NotificationsEmptyState } from './components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js';
30
+ export { UnauthorizedEmptyState } from './components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js';
23
31
  export { ExportModal } from './components/ExportModal/ExportModal.js';
24
32
  export { ExpressiveCard } from './components/ExpressiveCard/ExpressiveCard.js';
25
33
  export { ImportModal } from './components/ImportModal/ImportModal.js';
@@ -97,14 +105,6 @@ export { GetStartedCard } from './components/GetStartedCard/GetStartedCard.js';
97
105
  export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags } from './components/FeatureFlags/index.js';
98
106
  export { usePrefix } from './global/js/hooks/usePrefix.js';
99
107
  export { ActionBar } from './components/ActionBar/ActionBar.js';
100
- export { EmptyState } from './components/EmptyStates/EmptyState.js';
101
- export { EmptyStateV2 } from './components/EmptyStates/EmptyStateV2.js';
102
- export { ErrorEmptyState } from './components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js';
103
- export { NoDataEmptyState } from './components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js';
104
- export { NoTagsEmptyState } from './components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js';
105
- export { NotFoundEmptyState } from './components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js';
106
- export { NotificationsEmptyState } from './components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js';
107
- export { UnauthorizedEmptyState } from './components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js';
108
108
  export { HTTPError403 } from './components/HTTPErrors/HTTPError403/HTTPError403.js';
109
109
  export { HTTPError404 } from './components/HTTPErrors/HTTPError404/HTTPError404.js';
110
110
  export { HTTPErrorOther } from './components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js';
@@ -14,6 +14,14 @@ var cx = require('classnames');
14
14
  var react = require('@carbon/react');
15
15
  var Tearsheet = require('../Tearsheet/Tearsheet.js');
16
16
  var TearsheetNarrow = require('../Tearsheet/TearsheetNarrow.js');
17
+ require('../EmptyStates/EmptyState.js');
18
+ require('../EmptyStates/EmptyStateV2.js');
19
+ require('../EmptyStates/ErrorEmptyState/ErrorEmptyState.js');
20
+ require('../EmptyStates/NoDataEmptyState/NoDataEmptyState.js');
21
+ require('../EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js');
22
+ var NotFoundEmptyState = require('../EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js');
23
+ require('../EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js');
24
+ require('../EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js');
17
25
  var AddSelectSidebar = require('./AddSelectSidebar.js');
18
26
  var AddSelectBreadcrumbs = require('./AddSelectBreadcrumbs.js');
19
27
  var AddSelectList = require('./AddSelectList.js');
@@ -25,7 +33,6 @@ var useItemSort = require('./hooks/useItemSort.js');
25
33
  var useParentSelect = require('./hooks/useParentSelect.js');
26
34
  var usePath = require('./hooks/usePath.js');
27
35
  var settings = require('../../settings.js');
28
- var NotFoundEmptyState = require('../EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js');
29
36
 
30
37
  var _excluded = ["className", "clearFiltersText", "closeIconDescription", "columnInputPlaceholder", "defaultModifiers", "description", "filterByLabel", "globalFilterOpts", "globalFiltersLabel", "globalFiltersIconDescription", "globalFiltersPlaceholderText", "globalFiltersPrimaryButtonText", "globalFiltersSecondaryButtonText", "globalSearchLabel", "globalSearchPlaceholder", "globalSortBy", "illustrationTheme", "influencerTitle", "items", "itemsLabel", "metaIconDescription", "metaPanelTitle", "multi", "navIconDescription", "noResultsDescription", "noResultsTitle", "noSelectionDescription", "noSelectionTitle", "normalizedItems", "onClose", "onCloseButtonText", "onSubmit", "onSubmitButtonText", "open", "portalTarget", "searchResultsTitle", "sortByLabel", "title", "useNormalizedItems"];
31
38
  var blockClass = "".concat(settings.pkg.prefix, "--add-select");
@@ -11,9 +11,9 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
11
11
  var React = require('react');
12
12
  var react = require('@carbon/react');
13
13
  var index = require('../../_virtual/index.js');
14
+ var NoDataEmptyState = require('../EmptyStates/NoDataEmptyState/NoDataEmptyState.js');
14
15
  var settings = require('../../settings.js');
15
16
  var AddSelectMetaPanel = require('./AddSelectMetaPanel.js');
16
- var NoDataEmptyState = require('../EmptyStates/NoDataEmptyState/NoDataEmptyState.js');
17
17
 
18
18
  var _excluded = ["meta", "icon", "avatar"];
19
19
  var blockClass = "".concat(settings.pkg.prefix, "--add-select__sidebar");
@@ -14,6 +14,7 @@ var CarouselItem = require('./CarouselItem.js');
14
14
  var cx = require('classnames');
15
15
  var devtools = require('../../global/js/utils/devtools.js');
16
16
  var settings = require('../../settings.js');
17
+ var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
17
18
 
18
19
  var _excluded = ["children", "className", "disableArrowScroll", "fadedEdgeColor", "onChangeIsScrollable", "onScroll"];
19
20
  // The block part of our conventional BEM class names (blockClass__E--M).
@@ -56,6 +57,8 @@ var Carousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
56
57
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
57
58
  var carouselRef = React.useRef(null);
58
59
  var scrollRef = React.useRef(null);
60
+ var leftFadedEdgeRef = React.useRef(null);
61
+ var rightFadedEdgeRef = React.useRef(null);
59
62
  // Array of refs used to reference this component's children DOM elements
60
63
  var childElementsRef = React.useRef(Array(React.Children.count(children)).fill(React.useRef(null)));
61
64
  var leftFadedEdgeColor = _rollupPluginBabelHelpers.typeof(fadedEdgeColor) === 'object' ? fadedEdgeColor === null || fadedEdgeColor === void 0 ? void 0 : fadedEdgeColor.left : fadedEdgeColor;
@@ -266,6 +269,16 @@ var Carousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
266
269
  }
267
270
  };
268
271
  }, [handleScrollNext, handleScrollPrev, handleScrollReset, handleScrollToView]);
272
+ useIsomorphicEffect.useIsomorphicEffect(function () {
273
+ if (leftFadedEdgeRef !== null && leftFadedEdgeRef !== void 0 && leftFadedEdgeRef.current && leftFadedEdgeRef.current.style) {
274
+ leftFadedEdgeRef.current.style.background = "linear-gradient(90deg, ".concat(leftFadedEdgeColor, ", transparent)");
275
+ }
276
+ }, [leftFadedEdgeRef, leftFadedEdgeColor]);
277
+ useIsomorphicEffect.useIsomorphicEffect(function () {
278
+ if (rightFadedEdgeRef !== null && rightFadedEdgeRef !== void 0 && rightFadedEdgeRef.current && rightFadedEdgeRef.current.style) {
279
+ rightFadedEdgeRef.current.style.background = "linear-gradient(270deg, ".concat(rightFadedEdgeColor, ", transparent)");
280
+ }
281
+ }, [rightFadedEdgeRef, rightFadedEdgeColor]);
269
282
  return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
270
283
  tabIndex: -1,
271
284
  className: cx(blockClass, className),
@@ -283,15 +296,11 @@ var Carousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
283
296
  }
284
297
  }, child);
285
298
  })), leftFadedEdgeColor && /*#__PURE__*/React.createElement("div", {
286
- className: "".concat(blockClass, "__elements-container--scrolled"),
287
- style: {
288
- background: "linear-gradient(90deg, ".concat(leftFadedEdgeColor, ", transparent)")
289
- }
299
+ ref: leftFadedEdgeRef,
300
+ className: "".concat(blockClass, "__elements-container--scrolled")
290
301
  }), rightFadedEdgeColor && /*#__PURE__*/React.createElement("div", {
291
- className: "".concat(blockClass, "__elements-container--scroll-max"),
292
- style: {
293
- background: "linear-gradient(270deg, ".concat(rightFadedEdgeColor, ", transparent)")
294
- }
302
+ ref: rightFadedEdgeRef,
303
+ className: "".concat(blockClass, "__elements-container--scroll-max")
295
304
  })));
296
305
  });
297
306
  Carousel.displayName = componentName;
@@ -40,12 +40,28 @@ function (_ref, ref) {
40
40
  var numDegrees = clamp(value * 360, 0, 360);
41
41
  var circleColor = theme === Checklist_types.Themes.light ? index.gray20 : index.gray70; // $ui-03 (-ish)
42
42
  var progressColor = index.purple50;
43
+ React.useEffect(function () {
44
+ var ele = document.getElementsByClassName("".concat(blockClass));
45
+ setTimeout(function () {
46
+ var _iterator = _rollupPluginBabelHelpers.createForOfIteratorHelper(ele),
47
+ _step;
48
+ try {
49
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
50
+ var el = _step.value;
51
+ if (el instanceof HTMLElement) {
52
+ el.style.setProperty('background-image', "conic-gradient(".concat(progressColor, " ").concat(numDegrees, "deg, ").concat(circleColor, " ").concat(numDegrees, "deg 360deg)"));
53
+ el.style.setProperty('border-radius', '50%');
54
+ }
55
+ }
56
+ } catch (err) {
57
+ _iterator.e(err);
58
+ } finally {
59
+ _iterator.f();
60
+ }
61
+ }, 0);
62
+ });
43
63
  return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
44
64
  className: cx(blockClass, className),
45
- style: {
46
- backgroundImage: "conic-gradient(".concat(progressColor, " ").concat(numDegrees, "deg, ").concat(circleColor, " ").concat(numDegrees, "deg 360deg)"),
47
- borderRadius: '50%'
48
- },
49
65
  ref: ref,
50
66
  role: "img"
51
67
  }, devtools.getDevtoolsProps(componentName)));
@@ -41,7 +41,6 @@ var defaults = {
41
41
  */
42
42
 
43
43
  exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
44
- var _positionTune$y, _positionTune$x;
45
44
  var _ref$align = _ref.align,
46
45
  align = _ref$align === void 0 ? defaults.align : _ref$align,
47
46
  autoAlign = _ref.autoAlign,
@@ -85,6 +84,7 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
85
84
  var _coachmarkRef = ref || backupRef;
86
85
  var _overlayRef = overlayRef || overlayBackupRef;
87
86
  var portalNode = React.useRef(null);
87
+ var popoverRef = React.useRef(null);
88
88
  useIsomorphicEffect.useIsomorphicEffect(function () {
89
89
  var _document$querySelect, _document, _document2, _document3;
90
90
  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');
@@ -130,10 +130,6 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
130
130
  setShouldResetPosition(true);
131
131
  }
132
132
  };
133
- var overlayPositionStyle = {
134
- top: ((_positionTune$y = positionTune === null || positionTune === void 0 ? void 0 : positionTune.y) !== null && _positionTune$y !== void 0 ? _positionTune$y : 0) - 16,
135
- left: ((_positionTune$x = positionTune === null || positionTune === void 0 ? void 0 : positionTune.x) !== null && _positionTune$x !== void 0 ? _positionTune$x : 0) - 16
136
- };
137
133
  var contextValue = {
138
134
  buttonProps: {
139
135
  'aria-expanded': isOpen,
@@ -164,6 +160,19 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
164
160
  setIsOpen(true);
165
161
  }
166
162
  }, [shouldResetPosition]);
163
+ useIsomorphicEffect.useIsomorphicEffect(function () {
164
+ var _positionTune$y, _positionTune$x;
165
+ var overlayPositionStyle = {
166
+ top: "".concat(((_positionTune$y = positionTune === null || positionTune === void 0 ? void 0 : positionTune.y) !== null && _positionTune$y !== void 0 ? _positionTune$y : 0) - 16, "px"),
167
+ left: "".concat(((_positionTune$x = positionTune === null || positionTune === void 0 ? void 0 : positionTune.x) !== null && _positionTune$x !== void 0 ? _positionTune$x : 0) - 16, "px")
168
+ };
169
+ if (popoverRef.current && popoverRef.current.style && overlayPositionStyle) {
170
+ var combinedStyle = _rollupPluginBabelHelpers.objectSpread2({
171
+ position: 'absolute'
172
+ }, overlayPositionStyle);
173
+ Object.assign(popoverRef.current.style, combinedStyle);
174
+ }
175
+ }, [popoverRef, positionTune]);
167
176
 
168
177
  // On unmount:
169
178
  // - DO NOT "Close()" the coachmark.
@@ -195,9 +204,7 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
195
204
  portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)) : /*#__PURE__*/React.createElement(react.Popover, {
196
205
  highContrast: true,
197
206
  caret: true,
198
- style: _rollupPluginBabelHelpers.objectSpread2({
199
- position: 'absolute'
200
- }, overlayPositionStyle),
207
+ ref: popoverRef,
201
208
  align: align,
202
209
  autoAlign: autoAlign,
203
210
  open: isOpen
@@ -19,6 +19,7 @@ var CoachmarkHeader = require('./CoachmarkHeader.js');
19
19
  var constants = require('./utils/constants.js');
20
20
  var context = require('./utils/context.js');
21
21
  var enums = require('./utils/enums.js');
22
+ var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
22
23
 
23
24
  var _excluded = ["children", "onClose", "fixedIsVisible", "className", "kind", "theme"];
24
25
 
@@ -83,26 +84,27 @@ exports.CoachmarkOverlay = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
83
84
  }
84
85
  }
85
86
  };
86
- var styledTune = {};
87
- if (isBeacon || isDraggable) {
88
- if (coachmark.targetRect) {
89
- styledTune.left = coachmark.targetRect.x + window.scrollX;
90
- styledTune.top = coachmark.targetRect.y + window.scrollY;
91
- }
92
- if (styledTune.left && styledTune.top) {
93
- if (isBeacon) {
94
- // Compensate for radius of beacon
95
- styledTune.left += 16;
96
- styledTune.top += 16;
87
+ var styledTune = React.useMemo(function () {
88
+ var style = {};
89
+ if (isBeacon || isDraggable) {
90
+ if (coachmark.targetRect) {
91
+ style.left = coachmark.targetRect.x + window.scrollX;
92
+ style.top = coachmark.targetRect.y + window.scrollY;
97
93
  }
98
- if (isDraggable) {
99
- // Compensate for width and height of target element
100
- var offsetTune = constants.getOffsetTune(coachmark, kind);
101
- styledTune.left += offsetTune.left;
102
- styledTune.top += offsetTune.top;
94
+ if (style.left && style.top) {
95
+ if (isBeacon) {
96
+ style.left = style.left + 16;
97
+ style.top = style.top + 16;
98
+ }
99
+ if (isDraggable) {
100
+ var offsetTune = constants.getOffsetTune(coachmark, kind);
101
+ style.left = style.left + offsetTune.left;
102
+ style.top = style.top + offsetTune.top;
103
+ }
103
104
  }
104
105
  }
105
- }
106
+ return style;
107
+ }, [isBeacon, isDraggable, coachmark, kind]);
106
108
  function handleDragBounds(x, y) {
107
109
  var xRes = x;
108
110
  var yRes = y;
@@ -141,10 +143,19 @@ exports.CoachmarkOverlay = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
141
143
  overlay.style.bottom = 'auto';
142
144
  }
143
145
  var contentId = uuidv4.default();
146
+ useIsomorphicEffect.useIsomorphicEffect(function () {
147
+ if (overlayRef.current) {
148
+ var _overlayRef$current;
149
+ var currentStyle = (_overlayRef$current = overlayRef.current) === null || _overlayRef$current === void 0 ? void 0 : _overlayRef$current.style;
150
+ Object.keys(styledTune).forEach(function (key) {
151
+ var value = styledTune[key];
152
+ currentStyle.setProperty(key, "".concat(value, "px"));
153
+ });
154
+ }
155
+ }, [styledTune, overlayRef]);
144
156
  return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
145
157
  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),
146
158
  ref: overlayRef,
147
- style: styledTune,
148
159
  "aria-labelledby": contentId,
149
160
  tabIndex: -1
150
161
  }, devtools.getDevtoolsProps(componentName)), isDraggable ? /*#__PURE__*/React.createElement(CoachmarkDragbar.CoachmarkDragbar, {
@@ -13,10 +13,14 @@ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHel
13
13
  var React = require('react');
14
14
  var settings = require('../../../settings.js');
15
15
  var react = require('@carbon/react');
16
+ var EmptyState = require('../../EmptyStates/EmptyState.js');
17
+ require('../../EmptyStates/EmptyStateV2.js');
16
18
  var ErrorEmptyState = require('../../EmptyStates/ErrorEmptyState/ErrorEmptyState.js');
17
19
  var NoDataEmptyState = require('../../EmptyStates/NoDataEmptyState/NoDataEmptyState.js');
20
+ require('../../EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js');
18
21
  var NotFoundEmptyState = require('../../EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js');
19
- var EmptyState = require('../../EmptyStates/EmptyState.js');
22
+ require('../../EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js');
23
+ require('../../EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js');
20
24
 
21
25
  var blockClass = "".concat(settings.pkg.prefix, "--datagrid");
22
26
  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
  */
@@ -9,6 +9,13 @@
9
9
 
10
10
  var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
11
11
  var React = require('react');
12
+ var EmptyStateV2 = require('./EmptyStateV2.js');
13
+ require('./ErrorEmptyState/ErrorEmptyState.js');
14
+ require('./NoDataEmptyState/NoDataEmptyState.js');
15
+ require('./NoTagsEmptyState/NoTagsEmptyState.js');
16
+ require('./NotFoundEmptyState/NotFoundEmptyState.js');
17
+ require('./NotificationsEmptyState/NotificationsEmptyState.js');
18
+ require('./UnauthorizedEmptyState/UnauthorizedEmptyState.js');
12
19
  var index = require('../../_virtual/index.js');
13
20
  var cx = require('classnames');
14
21
  var react = require('@carbon/react');
@@ -16,7 +23,6 @@ var devtools = require('../../global/js/utils/devtools.js');
16
23
  require('../../global/js/utils/props-helper.js');
17
24
  var settings = require('../../settings.js');
18
25
  var EmptyStateContent = require('./EmptyStateContent.js');
19
- var EmptyStateV2 = require('./EmptyStateV2.js');
20
26
 
21
27
  var _excluded = ["v2"],
22
28
  _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 {};
@@ -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 {};
@@ -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 {};
@@ -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 {};
@@ -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 {};
@@ -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 {};
@@ -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';
@@ -11,6 +11,14 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
11
11
  var react = require('@carbon/react');
12
12
  var icons = require('@carbon/react/icons');
13
13
  var React = require('react');
14
+ require('../EmptyStates/EmptyState.js');
15
+ require('../EmptyStates/EmptyStateV2.js');
16
+ require('../EmptyStates/ErrorEmptyState/ErrorEmptyState.js');
17
+ require('../EmptyStates/NoDataEmptyState/NoDataEmptyState.js');
18
+ require('../EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js');
19
+ require('../EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js');
20
+ var NotificationsEmptyState = require('../EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js');
21
+ require('../EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js');
14
22
  var index = require('../../_virtual/index.js');
15
23
  var cx = require('classnames');
16
24
  var devtools = require('../../global/js/utils/devtools.js');
@@ -21,7 +29,6 @@ var usePrefersReducedMotion = require('../../global/js/hooks/usePrefersReducedMo
21
29
  var wrapFocus = require('../../global/js/utils/wrapFocus.js');
22
30
  var usePreviousValue = require('../../global/js/hooks/usePreviousValue.js');
23
31
  var useClickOutside = require('../../global/js/hooks/useClickOutside.js');
24
- var NotificationsEmptyState = require('../EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js');
25
32
 
26
33
  var _Close;
27
34
  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
  */
@@ -125,7 +125,8 @@ exports.UserAvatar.displayName = componentName;
125
125
  // See https://www.npmjs.com/package/prop-types#usage.
126
126
  exports.UserAvatar.propTypes = {
127
127
  /**
128
- * Provide the background color need to be set for UserAvatar.
128
+ * Provide the background color need to be set for UserAvatar. Background color will be set based on lighter or darker theme.
129
+ * For example: if you select order-5-purple, it will take $purple-60 for lighter theme and $purple-50 for darker theme.
129
130
  */
130
131
  backgroundColor: index.default.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']),
131
132
  /**
@@ -153,7 +154,7 @@ exports.UserAvatar.propTypes = {
153
154
  * Provide a custom icon to use if you need to use an icon other than the default one
154
155
  */
155
156
  /**@ts-ignore */
156
- renderIcon: index.default.oneOfType([index.default.func, index.default.object]),
157
+ renderIcon: index.default.oneOfType([index.default.func, index.default.object, index.default.string]),
157
158
  /**
158
159
  * Set the size of the avatar circle
159
160
  */