@gustavo-valsechi/client 1.4.16 → 1.4.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.
@@ -41,10 +41,9 @@ const TooltipContext = (0, import_react.createContext)({});
41
41
  const TooltipProviderContainer = ({ children }) => {
42
42
  const [tooltips, setTooltips] = (0, import_react.useState)([]);
43
43
  const getContent = (target) => {
44
- var _a, _b, _c;
44
+ var _a, _b;
45
45
  const rect = target.getBoundingClientRect();
46
- console.log(target.dataset);
47
- const props = JSON.parse(((_a = target.dataset) == null ? void 0 : _a["tooltip-props"]) || "{}");
46
+ const props = JSON.parse(((_a = target.dataset) == null ? void 0 : _a.tooltipProps) || "{}");
48
47
  const coords = {
49
48
  top: rect.top + window.scrollY - (target.offsetHeight + 8),
50
49
  left: rect.left + window.scrollX + target.offsetWidth / 2
@@ -65,7 +64,7 @@ const TooltipProviderContainer = ({ children }) => {
65
64
  return {
66
65
  ...coords,
67
66
  content: ((_b = target.dataset) == null ? void 0 : _b.tooltip) || "",
68
- props: JSON.parse(((_c = target.dataset) == null ? void 0 : _c["tooltip-props"]) || "{}")
67
+ props
69
68
  };
70
69
  };
71
70
  (0, import_react.useEffect)(() => {
@@ -7,10 +7,9 @@ const TooltipContext = createContext({});
7
7
  const TooltipProviderContainer = ({ children }) => {
8
8
  const [tooltips, setTooltips] = useState([]);
9
9
  const getContent = (target) => {
10
- var _a, _b, _c;
10
+ var _a, _b;
11
11
  const rect = target.getBoundingClientRect();
12
- console.log(target.dataset);
13
- const props = JSON.parse(((_a = target.dataset) == null ? void 0 : _a["tooltip-props"]) || "{}");
12
+ const props = JSON.parse(((_a = target.dataset) == null ? void 0 : _a.tooltipProps) || "{}");
14
13
  const coords = {
15
14
  top: rect.top + window.scrollY - (target.offsetHeight + 8),
16
15
  left: rect.left + window.scrollX + target.offsetWidth / 2
@@ -31,7 +30,7 @@ const TooltipProviderContainer = ({ children }) => {
31
30
  return {
32
31
  ...coords,
33
32
  content: ((_b = target.dataset) == null ? void 0 : _b.tooltip) || "",
34
- props: JSON.parse(((_c = target.dataset) == null ? void 0 : _c["tooltip-props"]) || "{}")
33
+ props
35
34
  };
36
35
  };
37
36
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.16",
3
+ "version": "1.4.17",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",