@synerise/ds-tooltip 0.11.1 → 0.11.2

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.11.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-tooltip@0.11.1...@synerise/ds-tooltip@0.11.2) (2021-11-22)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-tooltip
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.11.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-tooltip@0.10.56...@synerise/ds-tooltip@0.11.1) (2021-11-09)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-tooltip
package/dist/Tooltip.js CHANGED
@@ -2,20 +2,6 @@ var _excluded = ["type", "icon", "title", "status", "description", "tutorials",
2
2
 
3
3
  function _extends() { _extends = Object.assign || 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); }
4
4
 
5
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
-
7
- 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."); }
8
-
9
- 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); }
10
-
11
- 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; }
12
-
13
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
14
-
15
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
-
17
- 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; }
18
-
19
5
  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; }
20
6
 
21
7
  import '@synerise/ds-core/dist/js/style';
@@ -57,12 +43,11 @@ var Tooltip = function Tooltip(_ref) {
57
43
  offset = _ref$offset === void 0 ? 'default' : _ref$offset,
58
44
  children = _ref.children,
59
45
  button = _ref.button,
60
- props = _objectWithoutProperties(_ref, _excluded);
46
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
61
47
 
62
48
  var _React$useState = React.useState(false),
63
- _React$useState2 = _slicedToArray(_React$useState, 2),
64
- isVisible = _React$useState2[0],
65
- setIsVisible = _React$useState2[1];
49
+ isVisible = _React$useState[0],
50
+ setIsVisible = _React$useState[1];
66
51
 
67
52
  var timeoutClickRef = React.useRef(null);
68
53
 
@@ -102,8 +87,8 @@ var Tooltip = function Tooltip(_ref) {
102
87
  }, title), /*#__PURE__*/React.createElement(S.TooltipDescription, null, description)), button && /*#__PURE__*/React.createElement(S.TooltipButton, null, /*#__PURE__*/React.createElement(Button, {
103
88
  type: "ghost-white",
104
89
  mode: buttonMode(),
105
- onClick: button === null || button === void 0 ? void 0 : button.onClick
106
- }, button === null || button === void 0 ? void 0 : button.buttonIcon, button === null || button === void 0 ? void 0 : button.label)));
90
+ onClick: button == null ? void 0 : button.onClick
91
+ }, button == null ? void 0 : button.buttonIcon, button == null ? void 0 : button.label)));
107
92
  }, [button, type, title, description, status]);
108
93
  var renderTutorial = /*#__PURE__*/React.createElement(S.TooltipComponent, {
109
94
  tooltipType: type
@@ -113,7 +98,7 @@ var Tooltip = function Tooltip(_ref) {
113
98
  effect: "fade"
114
99
  }, tutorials && tutorials.map(function (tutorial) {
115
100
  return /*#__PURE__*/React.createElement(S.TutorialItem, {
116
- key: "".concat(JSON.stringify(tutorial.title))
101
+ key: "" + JSON.stringify(tutorial.title)
117
102
  }, /*#__PURE__*/React.createElement(S.TooltipTitle, {
118
103
  tooltipType: "tutorial"
119
104
  }, tutorial.title), /*#__PURE__*/React.createElement(S.TooltipDescription, null, tutorial.description));
@@ -124,9 +109,9 @@ var Tooltip = function Tooltip(_ref) {
124
109
  return renderTooltip;
125
110
  }, [type, renderTooltip, renderTutorial, renderButton]);
126
111
  var offsetClassName = React.useMemo(function () {
127
- return "ds-tooltip-offset-".concat(offset);
112
+ return "ds-tooltip-offset-" + offset;
128
113
  }, [offset]);
129
- var titleExists = Boolean(description || title || icon || (tutorials === null || tutorials === void 0 ? void 0 : tutorials.length));
114
+ var titleExists = Boolean(description || title || icon || (tutorials == null ? void 0 : tutorials.length));
130
115
  React.useEffect(function () {
131
116
  return function () {
132
117
  timeoutClickRef.current && clearTimeout(timeoutClickRef.current);
@@ -48,7 +48,7 @@ export var TooltipComponent = styled.div.withConfig({
48
48
  }, function (props) {
49
49
  return props.theme.palette['green-600'];
50
50
  }, function (props) {
51
- return "".concat(props.theme.palette['grey-800'], "E5");
51
+ return props.theme.palette['grey-800'] + "E5";
52
52
  });
53
53
  export var TutorialItem = styled.div.withConfig({
54
54
  displayName: "Tooltipstyles__TutorialItem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-tooltip",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Tooltip UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -32,8 +32,8 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-button": "^0.16.1",
36
- "@synerise/ds-icon": "^0.46.1"
35
+ "@synerise/ds-button": "^0.16.2",
36
+ "@synerise/ds-icon": "^0.46.2"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@synerise/ds-core": "*",
@@ -43,5 +43,5 @@
43
43
  "devDependencies": {
44
44
  "@synerise/ds-utils": "^0.19.0"
45
45
  },
46
- "gitHead": "14733fd96fcf0727a2baf45444e54e9a490d64f4"
46
+ "gitHead": "2468359677783819939fb9f1ef5acc36667ecd1a"
47
47
  }