@onepercentio/one-ui 0.20.4 → 0.21.0

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 (124) hide show
  1. package/.babelrc +6 -0
  2. package/.prod.babelrc +8 -2
  3. package/dist/assets/styles/variables.scss +1 -0
  4. package/dist/components/AdaptiveButton/AdaptiveButton.js +2 -2
  5. package/dist/components/AdaptiveContainer/AdaptiveContainer.js +28 -26
  6. package/dist/components/AdaptiveContainer/AdaptiveContainer.module.scss +3 -1
  7. package/dist/components/AdaptiveDialog/AdaptiveDialog.js +9 -9
  8. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js +14 -14
  9. package/dist/components/AnchoredTooltip/AnchoredTooltip.js +30 -30
  10. package/dist/components/AnimatedEntrance/AnimatedEntrance.d.ts +1 -1
  11. package/dist/components/AnimatedEntrance/AnimatedEntrance.js +34 -45
  12. package/dist/components/AsyncWrapper/AsyncWrapper.js +2 -2
  13. package/dist/components/Avatar/Avatar.js +4 -4
  14. package/dist/components/BucketFill/BucketFill.js +9 -9
  15. package/dist/components/Button/Button.js +4 -4
  16. package/dist/components/Card/Card.js +1 -1
  17. package/dist/components/Chart/Chart.view.js +34 -34
  18. package/dist/components/CheckBox/CheckBox.js +3 -3
  19. package/dist/components/Collapsable/Collapsable.js +18 -18
  20. package/dist/components/Countdown/Countdown.js +16 -16
  21. package/dist/components/Divider/Divider.js +1 -1
  22. package/dist/components/EmailInput/EmailInput.d.ts +1 -1
  23. package/dist/components/EmailInput/EmailInput.js +4 -4
  24. package/dist/components/FadeIn/FadeIn.js +9 -9
  25. package/dist/components/FileInput/FileInput.js +6 -6
  26. package/dist/components/FileInput/View/BigFactory/BigFactory.js +1 -1
  27. package/dist/components/FileInput/View/Compact/Compact.js +6 -6
  28. package/dist/components/FlowController/FlowController.js +4 -4
  29. package/dist/components/Form/Form.js +17 -28
  30. package/dist/components/Freeze/Freeze.js +1 -1
  31. package/dist/components/HSForms/HSForms.js +9 -11
  32. package/dist/components/Header/Header.js +7 -7
  33. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js +1 -1
  34. package/dist/components/InfinityScroll/InfinityScroll.js +25 -25
  35. package/dist/components/Input/Input.js +13 -13
  36. package/dist/components/InstantCounter/InstantCounter.js +9 -9
  37. package/dist/components/LavaLamp/LavaLamp.data.js +25 -25
  38. package/dist/components/LavaLamp/LavaLamp.js +7 -7
  39. package/dist/components/LavaLamp/v2/LavaLamp.js +29 -45
  40. package/dist/components/LinkToId/LinkToId.js +7 -7
  41. package/dist/components/Loader/Loader.js +2 -2
  42. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js +6 -6
  43. package/dist/components/LoopableVideo/LoopableVideo.js +4 -4
  44. package/dist/components/MainGrid/MainGrid.js +2 -2
  45. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js +2 -2
  46. package/dist/components/Notification/Notification.js +1 -1
  47. package/dist/components/OrderableList/OrderableList.js +113 -138
  48. package/dist/components/PaginationIndicator/PaginationIndicator.js +50 -50
  49. package/dist/components/Parallax/Parallax.js +39 -39
  50. package/dist/components/Parallax/math/helpers.js +18 -19
  51. package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
  52. package/dist/components/PasswordInput/PasswordInput.js +10 -10
  53. package/dist/components/PingPongText/PingPongText.js +15 -15
  54. package/dist/components/PixelatedScan/PixelatedScan.js +19 -19
  55. package/dist/components/Portal/Portal.js +10 -10
  56. package/dist/components/ProgressBar/ProgressBar.js +6 -6
  57. package/dist/components/ProgressTexts/ProgressTexts.js +3 -3
  58. package/dist/components/Radio/Radio.js +3 -3
  59. package/dist/components/SectionContainer/SectionContainer.js +1 -1
  60. package/dist/components/Select/Select.js +13 -13
  61. package/dist/components/Select/Select.module.scss +8 -5
  62. package/dist/components/Skeleton/Skeleton.js +1 -1
  63. package/dist/components/Spacing/Spacing.js +1 -1
  64. package/dist/components/StaticScroller/StaticScroller.js +12 -12
  65. package/dist/components/Switch/Switch.js +2 -2
  66. package/dist/components/Table/Table.js +11 -11
  67. package/dist/components/Tabs/Tabs.d.ts +6 -1
  68. package/dist/components/Tabs/Tabs.js +28 -9
  69. package/dist/components/Tabs/Tabs.module.scss +20 -2
  70. package/dist/components/Text/Text.js +5 -5
  71. package/dist/components/Transition/MasksFactory/DiagonalReveal.js +5 -5
  72. package/dist/components/Transition/MasksFactory/DiagonalSquareToBalls.js +17 -17
  73. package/dist/components/Transition/MasksFactory/PhysicsSquares.js +13 -13
  74. package/dist/components/Transition/MasksFactory/SquareToBalls.js +9 -9
  75. package/dist/components/Transition/MasksFactory/utils.js +8 -8
  76. package/dist/components/Transition/Transition.js +49 -49
  77. package/dist/components/UncontrolledTransition/UncontrolledTransition.js +7 -7
  78. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js +44 -82
  79. package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js +6 -6
  80. package/dist/context/AsyncProcess.js +19 -42
  81. package/dist/context/CustomBrowserRouter.js +6 -6
  82. package/dist/context/OneUIProvider.js +15 -15
  83. package/dist/hooks/logs/useDependencyChangeDetection.js +2 -5
  84. package/dist/hooks/persistence/useLocalStorage.js +7 -7
  85. package/dist/hooks/shims/ObjectWatchShim.js +1 -15
  86. package/dist/hooks/ui/useAdaptiveImage.js +6 -6
  87. package/dist/hooks/ui/useBreakpoint.js +5 -5
  88. package/dist/hooks/ui/useCustomScrollbar.js +2 -2
  89. package/dist/hooks/ui/useMouseHover.js +4 -4
  90. package/dist/hooks/ui/usePaginationControls.js +34 -34
  91. package/dist/hooks/ui/useSnapToViewport.js +3 -3
  92. package/dist/hooks/ui/useTilt.js +38 -38
  93. package/dist/hooks/ui/useZoomable.js +20 -20
  94. package/dist/hooks/useAsyncControl.js +21 -38
  95. package/dist/hooks/useContainedRepositioning.js +22 -22
  96. package/dist/hooks/useCustomHistory.js +2 -2
  97. package/dist/hooks/useElementFit.js +6 -6
  98. package/dist/hooks/useFirestoreWatch.js +26 -39
  99. package/dist/hooks/useForm.js +8 -8
  100. package/dist/hooks/useFreeze.js +1 -1
  101. package/dist/hooks/useHero.d.ts +1 -0
  102. package/dist/hooks/useHero.js +132 -91
  103. package/dist/hooks/useHero.module.scss +7 -0
  104. package/dist/hooks/useIntersection.js +3 -3
  105. package/dist/hooks/useMergeRefs.js +3 -7
  106. package/dist/hooks/useObserve.js +5 -5
  107. package/dist/hooks/usePagination.js +39 -59
  108. package/dist/hooks/usePooledOperation.js +8 -22
  109. package/dist/hooks/usePooling.js +17 -33
  110. package/dist/hooks/useRebound.js +5 -5
  111. package/dist/hooks/useShortIntl.js +13 -13
  112. package/dist/hooks/utility/useEvents.js +5 -5
  113. package/dist/hooks/utility/useModule.js +3 -3
  114. package/dist/hooks/utility/useQuery.js +1 -1
  115. package/dist/models/DebugLogger.js +2 -2
  116. package/dist/models/GenericContract.js +1 -1
  117. package/dist/storybookUtils/index.js +1 -1
  118. package/dist/types.d.ts +11 -4
  119. package/dist/utility.d.js +3 -3
  120. package/dist/utils/blockchain.js +29 -102
  121. package/dist/utils/flatten.js +3 -3
  122. package/dist/utils/html.utils.js +1 -1
  123. package/package.json +2 -1
  124. package/src/types.ts +155 -41
package/.babelrc CHANGED
@@ -4,6 +4,12 @@
4
4
  "@babel/preset-env",
5
5
  {
6
6
  "targets": "> 0.25%, not dead",
7
+ "exclude": [
8
+ "proposal-dynamic-import",
9
+ "transform-block-scoping",
10
+ "transform-for-of",
11
+ "transform-regenerator"
12
+ ]
7
13
  }
8
14
  ],
9
15
  "@babel/preset-typescript",
package/.prod.babelrc CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "plugins": [
3
3
  ["react-remove-properties", { "properties": ["data-testid"] }],
4
- ["remove-object-properties", { "regexp": "data-testid" }]
4
+ ["remove-object-properties", { "regexp": "data-testid" }],
5
5
  ],
6
6
  "presets": [
7
7
  [
8
8
  "@babel/preset-env",
9
9
  {
10
- "targets": "> 0.25%, not dead"
10
+ "targets": "> 0.25%, not dead",
11
+ "exclude": [
12
+ "proposal-dynamic-import",
13
+ "transform-block-scoping",
14
+ "transform-for-of",
15
+ "transform-regenerator"
16
+ ]
11
17
  }
12
18
  ],
13
19
  "@babel/preset-typescript",
@@ -10,6 +10,7 @@ $success: var(--success, lightgreen);
10
10
  $successDark: var(--success-dark, green);
11
11
  $mainBackgroundColor: var(--bg-color, white);
12
12
  $primaryColor: var(--primary-color, var(--digital-blue));
13
+ $elevation: var(--card-elevation, 0px 4px 10px rgba(0, 0, 0, 0.1));
13
14
 
14
15
  //FONTS
15
16
  $mainFontFamily: var(--main-font, Roboto);
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _AdaptiveContainer = _interopRequireDefault(require("../AdaptiveContainer"));
9
9
  var _Button = _interopRequireDefault(require("../Button"));
10
10
  var _AdaptiveButtonModule = _interopRequireDefault(require("./AdaptiveButton.module.scss"));
11
- var _excluded = ["children", "className"];
11
+ const _excluded = ["children", "className"];
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
14
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -17,7 +17,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
17
17
  * A button that adapts it's width according to the content size
18
18
  **/
19
19
  function AdaptiveButton(_ref) {
20
- var children = _ref.children,
20
+ let children = _ref.children,
21
21
  _ref$className = _ref.className,
22
22
  className = _ref$className === void 0 ? "" : _ref$className,
23
23
  buttonProps = _objectWithoutProperties(_ref, _excluded);
@@ -9,7 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _Transition = require("../Transition");
10
10
  var _UncontrolledTransition = _interopRequireDefault(require("../UncontrolledTransition"));
11
11
  var _AdaptiveContainerModule = _interopRequireDefault(require("./AdaptiveContainer.module.scss"));
12
- var _excluded = ["children", "className", "containerElement", "direction"];
12
+ const _excluded = ["children", "className", "containerElement", "direction"];
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -20,7 +20,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
20
20
  * A container that animates width changes across content updates
21
21
  **/
22
22
  function AdaptiveContainer(_ref) {
23
- var children = _ref.children,
23
+ let children = _ref.children,
24
24
  _ref$className = _ref.className,
25
25
  className = _ref$className === void 0 ? "" : _ref$className,
26
26
  _ref$containerElement = _ref.containerElement,
@@ -28,10 +28,10 @@ function AdaptiveContainer(_ref) {
28
28
  _ref$direction = _ref.direction,
29
29
  direction = _ref$direction === void 0 ? "h" : _ref$direction,
30
30
  otherProps = _objectWithoutProperties(_ref, _excluded);
31
- var uncontrolledRef = (0, _react.useRef)(null);
32
- var buttonRef = (0, _react.useRef)(null);
31
+ const uncontrolledRef = (0, _react.useRef)(null);
32
+ const buttonRef = (0, _react.useRef)(null);
33
33
  (0, _react.useEffect)(function () {
34
- var sectionDiv = uncontrolledRef.current.sectionRef.current;
34
+ const sectionDiv = uncontrolledRef.current.sectionRef.current;
35
35
  if (sectionDiv) if (direction === "h") {
36
36
  sectionDiv.style.width = "".concat(sectionDiv.clientWidth, "px");
37
37
  sectionDiv.style.height = "";
@@ -39,38 +39,40 @@ function AdaptiveContainer(_ref) {
39
39
  sectionDiv.style.height = "".concat(sectionDiv.clientHeight, "px");
40
40
  sectionDiv.style.width = "";
41
41
  }
42
- var t = setTimeout(function () {
42
+ const t = setTimeout(function () {
43
43
  if (uncontrolledRef.current) {
44
- var _sectionDiv = uncontrolledRef.current.sectionRef.current;
45
- if (_sectionDiv) {
46
- var lastChild = _sectionDiv.lastChild;
44
+ const sectionDiv = uncontrolledRef.current.sectionRef.current;
45
+ if (sectionDiv) {
46
+ const lastChild = sectionDiv.lastChild;
47
47
  if (lastChild) {
48
- var resetFactory = function resetFactory(param, target) {
49
- var instance = function instance(e) {
48
+ let resetFactory = function resetFactory(param, target) {
49
+ const instance = function instance(e) {
50
50
  if (e.propertyName !== param) return;
51
51
  setTimeout(function () {
52
- if ((_sectionDiv === null || _sectionDiv === void 0 ? void 0 : _sectionDiv.style[param]) === "".concat(target, "px")) _sectionDiv.style[param] = "";
52
+ if ((sectionDiv === null || sectionDiv === void 0 ? void 0 : sectionDiv.style[param]) === "".concat(target, "px")) sectionDiv.style[param] = "";
53
53
  }, 100);
54
- if (_sectionDiv) _sectionDiv.removeEventListener("transitionend", instance);
54
+ if (sectionDiv) sectionDiv.removeEventListener("transitionend", instance);
55
55
  };
56
56
  return instance;
57
57
  };
58
58
  if (direction === "h") {
59
- var contentWidth = lastChild.clientWidth;
60
- var targetWidth = "".concat(contentWidth, "px");
61
- _sectionDiv.style.width = targetWidth;
62
- var func = resetFactory("width", contentWidth);
63
- if (targetWidth === _sectionDiv.style.width) func({
59
+ const contentWidth = lastChild.clientWidth;
60
+ const targetWidth = "".concat(contentWidth, "px");
61
+ const prevWidth = sectionDiv.style.width;
62
+ sectionDiv.style.width = targetWidth;
63
+ const func = resetFactory("width", contentWidth);
64
+ if (targetWidth === prevWidth) func({
64
65
  propertyName: "width"
65
- });else _sectionDiv.addEventListener("transitionend", func);
66
+ });else sectionDiv.addEventListener("transitionend", func);
66
67
  } else {
67
- var contentHeight = lastChild.scrollHeight;
68
- var targetHeight = "".concat(contentHeight, "px");
69
- _sectionDiv.style.height = targetHeight;
70
- var _func = resetFactory("height", contentHeight);
71
- if (targetHeight === _sectionDiv.style.height) _func({
68
+ const contentHeight = lastChild.scrollHeight;
69
+ const targetHeight = "".concat(contentHeight, "px");
70
+ const prevHeight = sectionDiv.style.height;
71
+ sectionDiv.style.height = targetHeight;
72
+ const func = resetFactory("height", contentHeight);
73
+ if (targetHeight === prevHeight) func({
72
74
  propertyName: "height"
73
- });else _sectionDiv.addEventListener("transitionend", _func);
75
+ });else sectionDiv.addEventListener("transitionend", func);
74
76
  }
75
77
  }
76
78
  }
@@ -80,7 +82,7 @@ function AdaptiveContainer(_ref) {
80
82
  return clearTimeout(t);
81
83
  };
82
84
  }, [children.key, direction]);
83
- var Wrapper = _Wrapper;
85
+ const Wrapper = _Wrapper;
84
86
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Wrapper, _extends({
85
87
  className: "".concat(className),
86
88
  ref: buttonRef
@@ -1,8 +1,10 @@
1
1
  .resetSection {
2
2
  min-height: 0px;
3
- transition: width var(--adaptive-container-transition-time, 400ms), height var(--adaptive-container-transition-time, 400ms);
3
+ transition: width var(--adaptive-container-transition-time, 400ms) linear,
4
+ height var(--adaptive-container-transition-time, 400ms) linear;
4
5
  transition-timing-function: linear;
5
6
  overflow: hidden;
7
+ align-items: flex-start;
6
8
  &.h {
7
9
  > * {
8
10
  min-width: auto !important;
@@ -17,14 +17,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
17
17
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
18
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
19
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
20
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
21
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
20
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
21
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
22
22
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
23
  /**
24
24
  * This component implements a generic drawer that displays it as a drawer on mobile and as a modal on desktop
25
25
  **/
26
26
  function AdaptiveDialog(_ref) {
27
- var onClose = _ref.onClose,
27
+ let onClose = _ref.onClose,
28
28
  _ref$open = _ref.open,
29
29
  open = _ref$open === void 0 ? false : _ref$open,
30
30
  _ref$className = _ref.className,
@@ -32,19 +32,19 @@ function AdaptiveDialog(_ref) {
32
32
  onClickOut = _ref.onClickOut,
33
33
  children = _ref.children,
34
34
  onClosed = _ref.onClosed;
35
- var rootDivRef = (0, _react.useRef)(null);
36
- var _useState = (0, _react.useState)(open),
35
+ const rootDivRef = (0, _react.useRef)(null);
36
+ const _useState = (0, _react.useState)(open),
37
37
  _useState2 = _slicedToArray(_useState, 2),
38
38
  isVisible = _useState2[0],
39
39
  setIsVisible = _useState2[1];
40
- var _useState3 = (0, _react.useState)(false),
40
+ const _useState3 = (0, _react.useState)(false),
41
41
  _useState4 = _slicedToArray(_useState3, 2),
42
42
  expanded = _useState4[0],
43
43
  setExpanded = _useState4[1];
44
44
  (0, _react.useEffect)(function () {
45
45
  if (open) {
46
46
  setIsVisible(true);
47
- var toggleVisbility = function toggleVisbility(e) {
47
+ const toggleVisbility = function toggleVisbility(e) {
48
48
  if (e.animationName === _AdaptiveDialogModule.default.backdropDismiss) {
49
49
  onClosed === null || onClosed === void 0 ? void 0 : onClosed();
50
50
  setIsVisible(false);
@@ -54,7 +54,7 @@ function AdaptiveDialog(_ref) {
54
54
  rootDivRef.current.addEventListener("animationend", toggleVisbility);
55
55
  }
56
56
  }, [open]);
57
- var globalClassName = {
57
+ const globalClassName = {
58
58
  backdrop: (0, _OneUIProvider.useOneUIConfig)("component.adaptiveDialog.backdropClassName", ""),
59
59
  dialog: (0, _OneUIProvider.useOneUIConfig)("component.adaptiveDialog.dialogClassName", "")
60
60
  };
@@ -63,7 +63,7 @@ function AdaptiveDialog(_ref) {
63
63
  className: "".concat(_AdaptiveDialogModule.default.backdrop, " ").concat(open ? _AdaptiveDialogModule.default.open : _AdaptiveDialogModule.default.close, " ").concat(expanded ? _AdaptiveDialogModule.default.expanded : "", " ").concat(globalClassName.backdrop),
64
64
  onClick: onClickOut,
65
65
  onAnimationEnd: function onAnimationEnd(_ref2) {
66
- var target = _ref2.target,
66
+ let target = _ref2.target,
67
67
  currentTarget = _ref2.currentTarget;
68
68
  if (target === currentTarget) target.style.pointerEvents = "initial";
69
69
  }
@@ -12,7 +12,7 @@ var _AdaptiveSidebarModule = _interopRequireDefault(require("./AdaptiveSidebar.m
12
12
  var _useBreakpoint = _interopRequireDefault(require("../../hooks/ui/useBreakpoint"));
13
13
  var _reactDom = require("react-dom");
14
14
  var _OneUIProvider = require("../../context/OneUIProvider");
15
- var _excluded = ["open", "children", "className", "breakInto", "visibilityControlComponent"];
15
+ const _excluded = ["open", "children", "className", "breakInto", "visibilityControlComponent"];
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -20,13 +20,13 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
20
20
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
21
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
22
22
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
23
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
24
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
23
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
24
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
25
25
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
26
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
27
27
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
28
- var DefaultVisibilityControl = function DefaultVisibilityControl(_ref) {
29
- var open = _ref.open;
28
+ const DefaultVisibilityControl = function DefaultVisibilityControl(_ref) {
29
+ let open = _ref.open;
30
30
  return /*#__PURE__*/_react.default.createElement(_MutableHamburgerButton.default, {
31
31
  size: 48,
32
32
  state: open ? "closed" : "default"
@@ -36,7 +36,7 @@ var DefaultVisibilityControl = function DefaultVisibilityControl(_ref) {
36
36
  * A component that you can put anywhere but hides when small enough and shows the control via a fixed floating button
37
37
  **/
38
38
  function AdaptiveSidebar(_ref2, ref) {
39
- var externalOpen = _ref2.open,
39
+ let externalOpen = _ref2.open,
40
40
  children = _ref2.children,
41
41
  _ref2$className = _ref2.className,
42
42
  className = _ref2$className === void 0 ? "" : _ref2$className,
@@ -45,15 +45,15 @@ function AdaptiveSidebar(_ref2, ref) {
45
45
  _ref2$visibilityContr = _ref2.visibilityControlComponent,
46
46
  VisibilityControlComponent = _ref2$visibilityContr === void 0 ? DefaultVisibilityControl : _ref2$visibilityContr,
47
47
  props = _objectWithoutProperties(_ref2, _excluded);
48
- var _useState = (0, _react.useState)(false),
48
+ const _useState = (0, _react.useState)(false),
49
49
  _useState2 = _slicedToArray(_useState, 2),
50
50
  open = _useState2[0],
51
51
  setOpen = _useState2[1];
52
- var containerRef = (0, _react.useRef)(null);
53
- var _open = externalOpen === undefined ? open : externalOpen;
54
- var isMobile = (0, _useBreakpoint.default)(breakInto);
55
- var globalClassName = (0, _OneUIProvider.useOneUIConfig)("component.adaptiveSidebar.className");
56
- var globalControlClassName = (0, _OneUIProvider.useOneUIConfig)("component.adaptiveSidebar.controlClassName");
52
+ const containerRef = (0, _react.useRef)(null);
53
+ const _open = externalOpen === undefined ? open : externalOpen;
54
+ const isMobile = (0, _useBreakpoint.default)(breakInto);
55
+ const globalClassName = (0, _OneUIProvider.useOneUIConfig)("component.adaptiveSidebar.className");
56
+ const globalControlClassName = (0, _OneUIProvider.useOneUIConfig)("component.adaptiveSidebar.controlClassName");
57
57
  (0, _react.useImperativeHandle)(ref, function () {
58
58
  return {
59
59
  dismiss: function dismiss() {
@@ -69,8 +69,8 @@ function AdaptiveSidebar(_ref2, ref) {
69
69
  top: 0
70
70
  });
71
71
  }, [_open]);
72
- var externalControl = externalOpen !== undefined;
73
- var content = /*#__PURE__*/_react.default.createElement("div", _extends({
72
+ const externalControl = externalOpen !== undefined;
73
+ const content = /*#__PURE__*/_react.default.createElement("div", _extends({
74
74
  ref: containerRef,
75
75
  className: "".concat(isMobile ? _AdaptiveSidebarModule.default.mobile : _AdaptiveSidebarModule.default.desktop, " ").concat(_AdaptiveSidebarModule.default.container, " ").concat(!externalControl && DefaultVisibilityControl === VisibilityControlComponent ? _AdaptiveSidebarModule.default.defaultPadding : "", " ").concat(_open ? _AdaptiveSidebarModule.default.open : _AdaptiveSidebarModule.default.closed, " ").concat(className, " ").concat(globalClassName)
76
76
  }, props), /*#__PURE__*/_react.default.createElement(_ScrollAndFocusLock.default, {
@@ -11,40 +11,40 @@ var _OneUIProvider = require("../../context/OneUIProvider");
11
11
  var _FadeIn = _interopRequireDefault(require("../FadeIn"));
12
12
  var _AnchoredTooltipModule = _interopRequireDefault(require("./AnchoredTooltip.module.scss"));
13
13
  var _reactDom = _interopRequireDefault(require("react-dom"));
14
- var _excluded = ["containInViewport", "alignment"];
14
+ const _excluded = ["containInViewport", "alignment"];
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
17
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
18
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
19
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
20
20
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
22
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
21
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
22
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
23
23
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
24
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
25
25
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
26
26
  function getPositionOnViewport(element) {
27
27
  return element.getBoundingClientRect();
28
28
  }
29
- var AnchoredTooltipAlignment = /*#__PURE__*/function (AnchoredTooltipAlignment) {
29
+ let AnchoredTooltipAlignment = /*#__PURE__*/function (AnchoredTooltipAlignment) {
30
30
  AnchoredTooltipAlignment[AnchoredTooltipAlignment["LEFT"] = 0] = "LEFT";
31
31
  AnchoredTooltipAlignment[AnchoredTooltipAlignment["CENTER"] = 1] = "CENTER";
32
32
  AnchoredTooltipAlignment[AnchoredTooltipAlignment["RIGHT"] = 2] = "RIGHT";
33
33
  return AnchoredTooltipAlignment;
34
34
  }({});
35
35
  exports.AnchoredTooltipAlignment = AnchoredTooltipAlignment;
36
- var AnchoredTooltipAnchor = /*#__PURE__*/function (AnchoredTooltipAnchor) {
36
+ let AnchoredTooltipAnchor = /*#__PURE__*/function (AnchoredTooltipAnchor) {
37
37
  AnchoredTooltipAnchor[AnchoredTooltipAnchor["TOP"] = 0] = "TOP";
38
38
  AnchoredTooltipAnchor[AnchoredTooltipAnchor["BOTTOM"] = 1] = "BOTTOM";
39
39
  return AnchoredTooltipAnchor;
40
40
  }({});
41
41
  exports.AnchoredTooltipAnchor = AnchoredTooltipAnchor;
42
42
  function calculateTooltipFromAnchor(anchorRef, tooltipRef, containInViewport) {
43
- var alignTo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : AnchoredTooltipAlignment.CENTER;
44
- var anchorTo = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : AnchoredTooltipAnchor.TOP;
45
- var anchorPosition = getPositionOnViewport(anchorRef);
46
- var shouldAnchorToBottom = anchorTo === AnchoredTooltipAnchor.BOTTOM || tooltipRef.clientHeight > anchorPosition.top;
47
- var top = anchorPosition.top - tooltipRef.clientHeight;
43
+ let alignTo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : AnchoredTooltipAlignment.CENTER;
44
+ let anchorTo = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : AnchoredTooltipAnchor.TOP;
45
+ const anchorPosition = getPositionOnViewport(anchorRef);
46
+ const shouldAnchorToBottom = anchorTo === AnchoredTooltipAnchor.BOTTOM || tooltipRef.clientHeight > anchorPosition.top;
47
+ let top = anchorPosition.top - tooltipRef.clientHeight;
48
48
 
49
49
  /**
50
50
  * The terms mean:
@@ -52,7 +52,7 @@ function calculateTooltipFromAnchor(anchorRef, tooltipRef, containInViewport) {
52
52
  * anchorPosition.width = The width of the anchor (visible element)
53
53
  * tooltipRef.clientWidth = The width of the content
54
54
  */
55
- var left = function () {
55
+ let left = function () {
56
56
  switch (alignTo) {
57
57
  case AnchoredTooltipAlignment.CENTER:
58
58
  return anchorPosition.left + anchorPosition.width / 2 - tooltipRef.clientWidth / 2;
@@ -64,23 +64,23 @@ function calculateTooltipFromAnchor(anchorRef, tooltipRef, containInViewport) {
64
64
  }();
65
65
  if (shouldAnchorToBottom) top += tooltipRef.clientHeight + anchorRef.clientHeight;
66
66
  if (containInViewport && top < 0) top = 0;
67
- var offset = top + tooltipRef.clientHeight - window.innerHeight;
67
+ const offset = top + tooltipRef.clientHeight - window.innerHeight;
68
68
  if (containInViewport && offset > 0) {
69
69
  top -= offset;
70
70
  }
71
- var offsetLeft = left + tooltipRef.clientWidth - window.innerWidth;
71
+ const offsetLeft = left + tooltipRef.clientWidth - window.innerWidth;
72
72
  if (containInViewport && offsetLeft > 0) {
73
73
  left -= offsetLeft;
74
74
  }
75
75
  if (containInViewport && left < 0) {
76
76
  left = 0;
77
77
  }
78
- var maxLeftOffsetIndicator = tooltipRef.clientWidth / 2 - 60;
79
- var tooltipCenter = tooltipRef.clientWidth / 2 + left;
80
- var anchorPositionCenter = anchorPosition.left + anchorPosition.width / 2;
81
- var offsetTooltip = anchorPositionCenter - tooltipCenter;
82
- var minOffsetTooltip = -(tooltipRef.clientWidth / 2) + 60;
83
- var offsetIndicatorLeft = offsetLeft > 0 ? offsetLeft > maxLeftOffsetIndicator ? maxLeftOffsetIndicator : offsetLeft : offsetTooltip < 0 ? offsetTooltip < minOffsetTooltip ? minOffsetTooltip : offsetTooltip : 0;
78
+ const maxLeftOffsetIndicator = tooltipRef.clientWidth / 2 - 60;
79
+ const tooltipCenter = tooltipRef.clientWidth / 2 + left;
80
+ const anchorPositionCenter = anchorPosition.left + anchorPosition.width / 2;
81
+ const offsetTooltip = anchorPositionCenter - tooltipCenter;
82
+ const minOffsetTooltip = -(tooltipRef.clientWidth / 2) + 60;
83
+ const offsetIndicatorLeft = offsetLeft > 0 ? offsetLeft > maxLeftOffsetIndicator ? maxLeftOffsetIndicator : offsetLeft : offsetTooltip < 0 ? offsetTooltip < minOffsetTooltip ? minOffsetTooltip : offsetTooltip : 0;
84
84
  return {
85
85
  offset: offset,
86
86
  offsetIndicatorLeft: offsetIndicatorLeft,
@@ -90,16 +90,16 @@ function calculateTooltipFromAnchor(anchorRef, tooltipRef, containInViewport) {
90
90
  };
91
91
  }
92
92
  function updateTooltipPosition(tooltipRef, anchorRef) {
93
- var limitToViewport = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
94
- var alignment = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : AnchoredTooltipAlignment.CENTER;
95
- var anchorTo = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : AnchoredTooltipAnchor.TOP;
96
- var _calculateTooltipFrom = calculateTooltipFromAnchor(anchorRef, tooltipRef, limitToViewport, alignment, anchorTo),
93
+ let limitToViewport = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
94
+ let alignment = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : AnchoredTooltipAlignment.CENTER;
95
+ let anchorTo = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : AnchoredTooltipAnchor.TOP;
96
+ const _calculateTooltipFrom = calculateTooltipFromAnchor(anchorRef, tooltipRef, limitToViewport, alignment, anchorTo),
97
97
  top = _calculateTooltipFrom.top,
98
98
  left = _calculateTooltipFrom.left,
99
99
  shouldAnchorToBottom = _calculateTooltipFrom.shouldAnchorToBottom,
100
100
  offsetIndicatorLeft = _calculateTooltipFrom.offsetIndicatorLeft;
101
101
  if (limitToViewport) {
102
- var maxHeight = window.innerHeight - top;
102
+ const maxHeight = window.innerHeight - top;
103
103
  tooltipRef.style.maxHeight = "".concat(maxHeight - 32, "px");
104
104
  }
105
105
  tooltipRef.style.top = "".concat(top, "px");
@@ -121,16 +121,16 @@ function updateTooltipPosition(tooltipRef, anchorRef) {
121
121
  * This tooltip anchors itself to an element and handles positioning relative to the anchored element
122
122
  **/
123
123
  function AnchoredTooltip(_ref, ref) {
124
- var _ref$containInViewpor = _ref.containInViewport,
124
+ let _ref$containInViewpor = _ref.containInViewport,
125
125
  containInViewport = _ref$containInViewpor === void 0 ? true : _ref$containInViewpor,
126
126
  alignment = _ref.alignment,
127
127
  props = _objectWithoutProperties(_ref, _excluded);
128
- var open = props.open,
128
+ const open = props.open,
129
129
  children = props.children,
130
130
  anchorRef = props.anchorRef;
131
- var tooltipRef = (0, _react.useRef)(null);
132
- var className = (0, _OneUIProvider.useOneUIConfig)("component.tooltip.className");
133
- var _useState = (0, _react.useState)(!open),
131
+ const tooltipRef = (0, _react.useRef)(null);
132
+ const className = (0, _OneUIProvider.useOneUIConfig)("component.tooltip.className");
133
+ const _useState = (0, _react.useState)(!open),
134
134
  _useState2 = _slicedToArray(_useState, 2),
135
135
  realClosed = _useState2[0],
136
136
  setRealClosed = _useState2[1];
@@ -147,7 +147,7 @@ function AnchoredTooltip(_ref, ref) {
147
147
  (0, _react.useEffect)(function () {
148
148
  if (open && !realClosed) {
149
149
  if (anchorRef.current && tooltipRef.current) updateTooltipPosition(tooltipRef.current, anchorRef.current, containInViewport, alignment);
150
- var scrollHandler = function scrollHandler() {
150
+ const scrollHandler = function scrollHandler() {
151
151
  if (anchorRef.current && tooltipRef.current) updateTooltipPosition(tooltipRef.current, anchorRef.current, containInViewport, alignment);
152
152
  };
153
153
  window.addEventListener("scroll", scrollHandler, {
@@ -8,7 +8,7 @@ export declare function AnimatedEntranceItem({ children, noEntranceAnimation, on
8
8
  noEntranceAnimation: boolean;
9
9
  onRemoveChildren: (key: Key) => void;
10
10
  entranceType: EntranceType;
11
- }): JSX.Element | null;
11
+ }): JSX.Element;
12
12
  /**
13
13
  * Animates the entrance and exit of a component
14
14
  **/