@versini/ui-tooltip 4.0.0 → 4.0.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.
Files changed (2) hide show
  1. package/dist/index.js +11 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  /*!
2
- @versini/ui-tooltip v4.0.0
2
+ @versini/ui-tooltip v4.0.2
3
3
  © 2025 gizmette.com
4
4
  */
5
5
  try {
6
6
  if (!window.__VERSINI_UI_TOOLTIP__) {
7
7
  window.__VERSINI_UI_TOOLTIP__ = {
8
- version: "4.0.0",
9
- buildTime: "11/30/2025 06:54 PM EST",
10
- homepage: "https://github.com/aversini/ui-components",
8
+ version: "4.0.2",
9
+ buildTime: "12/10/2025 08:23 AM EST",
10
+ homepage: "https://www.npmjs.com/package/@versini/ui-tooltip",
11
11
  license: "MIT",
12
12
  };
13
13
  }
@@ -101,6 +101,7 @@ const Tooltip = ({ trigger, label, placement = "top", mode = "system", animation
101
101
  const showTimeoutRef = useRef(null);
102
102
  const [showTooltip, setShowTooltip] = useState(false);
103
103
  const [disabled, setDisabled] = useState(false);
104
+ const [isPositioned, setIsPositioned] = useState(false);
104
105
  const delayedRestartTooltip = useInterval(()=>{
105
106
  setDisabled(false);
106
107
  }, DEFAULT_DEACTIVATION_DELAY);
@@ -153,6 +154,7 @@ const Tooltip = ({ trigger, label, placement = "top", mode = "system", animation
153
154
  [staticSide]: "-4px"
154
155
  });
155
156
  }
157
+ setIsPositioned(true);
156
158
  }
157
159
  }, [
158
160
  placement,
@@ -163,6 +165,8 @@ const Tooltip = ({ trigger, label, placement = "top", mode = "system", animation
163
165
  (async ()=>{
164
166
  if (showTooltip) {
165
167
  await updatePosition();
168
+ } else {
169
+ setIsPositioned(false);
166
170
  }
167
171
  })();
168
172
  }, [
@@ -219,6 +223,9 @@ const Tooltip = ({ trigger, label, placement = "top", mode = "system", animation
219
223
  role: "tooltip",
220
224
  ref: floatingRef,
221
225
  className: tooltipClasses.tooltip,
226
+ style: {
227
+ opacity: isPositioned ? undefined : 0
228
+ },
222
229
  children: [
223
230
  label,
224
231
  /*#__PURE__*/ jsx("div", {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@versini/ui-tooltip",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
- "homepage": "https://github.com/aversini/ui-components",
9
+ "homepage": "https://www.npmjs.com/package/@versini/ui-tooltip",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git@github.com:aversini/ui-components.git"
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@testing-library/jest-dom": "6.9.1",
41
- "@versini/ui-types": "7.0.0"
41
+ "@versini/ui-types": "7.1.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "@floating-ui/react": "0.27.16",
@@ -50,5 +50,5 @@
50
50
  "sideEffects": [
51
51
  "**/*.css"
52
52
  ],
53
- "gitHead": "4795cf3239cceaf83dde13addc5254caa12dee6f"
53
+ "gitHead": "85fd31156888edce83b4b0ecf195ad613b7db699"
54
54
  }