@smart-react-components/ui 2.0.0-alpha-20 → 2.0.0-alpha-21

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 (2) hide show
  1. package/Tooltip/index.js +1 -1
  2. package/package.json +1 -1
package/Tooltip/index.js CHANGED
@@ -25,7 +25,7 @@ const Tooltip = ({ afterHide, afterShow, beforeHide, beforeShow, children, hasHi
25
25
  const arrowEl = react_1.default.useRef(null);
26
26
  const getTriggerEl = () => { var _a; return ((_a = children[0].ref) !== null && _a !== void 0 ? _a : triggerEl).current; };
27
27
  const getTransitionDuration = () => transitionDuration !== null && transitionDuration !== void 0 ? transitionDuration : theme.$.transition.tooltipDuration;
28
- const handlePosition = () => (0, popover_1.calculatePosition)(triggerEl.current, boxEl.current, null, arrowEl.current, position, space);
28
+ const handlePosition = () => (0, popover_1.calculatePosition)(getTriggerEl(), boxEl.current, null, arrowEl.current, position, space);
29
29
  const { getStatus, handleBeforeShow, } = (0, useFixedBoxMethods_1.default)({ beforeShow, boxEl, getTriggerEl, handlePosition, hoverDelay, isDismissible, key: 'tooltip', setStatus, status, triggerInteraction });
30
30
  const content = (react_1.default.createElement(CSSTransition_1.default, { afterHide: afterHide, afterShow: afterShow, beforeHide: beforeHide, beforeShow: handleBeforeShow, className: transitionClassName !== null && transitionClassName !== void 0 ? transitionClassName : 'src-tooltip', duration: getTransitionDuration(), hasHideAnimation: hasHideAnimation, hasShowAnimation: hasShowAnimation, status: getStatus() },
31
31
  react_1.default.createElement(TooltipElement_1.default, { duration: getTransitionDuration(), hasTransition: !transitionClassName, isSoft: isSoft, palette: palette, tooltipSize: size, tooltipSizeSm: sizeSm, tooltipSizeMd: sizeMd, tooltipSizeLg: sizeLg, tooltipSizeXl: sizeXl, ref: boxEl },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-react-components/ui",
3
- "version": "2.0.0-alpha-20",
3
+ "version": "2.0.0-alpha-21",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "description": "SRC UI includes React and Styled components.",