intelicoreact 1.5.16 → 1.5.17

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.
@@ -33,7 +33,8 @@ const Hint = _ref => {
33
33
  children,
34
34
  icon,
35
35
  isAccessability = false,
36
- testId = "test-hint"
36
+ testId = "test-hint",
37
+ isHoverableContent = false
37
38
  } = _ref;
38
39
  const hintRef = (0, _react.useRef)(null);
39
40
  const [hintId] = (0, _react.useState)((_ref2 = key !== null && key !== void 0 ? key : id) !== null && _ref2 !== void 0 ? _ref2 : Math.random().toString(16).slice(2));
@@ -48,7 +49,8 @@ const Hint = _ref => {
48
49
  const getHintMarkUp = className => {
49
50
  return /*#__PURE__*/_react.default.createElement("div", {
50
51
  "data-testid": "test-hint-text",
51
- className: (0, _classnames.default)("hint__text", "hint__text_".concat(side), "hint--".concat(className, "__text"))
52
+ className: (0, _classnames.default)("hint__text", "hint__text_".concat(side), "hint--".concat(className, "__text")),
53
+ onMouseLeave: () => isHoverableContent && handleOpenType === "hover" && setIsOpen(false)
52
54
  }, hint, children);
53
55
  };
54
56
  const setHintContainerStyles = () => {
@@ -139,7 +141,7 @@ const Hint = _ref => {
139
141
  "aria-label": isAccessability && label || "",
140
142
  onClick: () => handleOpenType === "click" && (isCallbackExist ? onClickCallback() : setIsOpen(!isOpen)),
141
143
  onMouseEnter: () => handleOpenType === "hover" && setIsOpen(true),
142
- onMouseLeave: () => handleOpenType === "hover" && setIsOpen(false),
144
+ onMouseLeave: () => !isHoverableContent && handleOpenType === "hover" && setIsOpen(false),
143
145
  className: (0, _classnames.default)("hint__button", {
144
146
  hint__button_active: isOpen
145
147
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.5.16",
3
+ "version": "1.5.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [