@versini/ui-tooltip 4.0.0 → 4.0.1
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/dist/index.js +10 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-tooltip v4.0.
|
|
2
|
+
@versini/ui-tooltip v4.0.1
|
|
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.
|
|
9
|
-
buildTime: "11/30/2025
|
|
8
|
+
version: "4.0.1",
|
|
9
|
+
buildTime: "11/30/2025 07:18 PM EST",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-tooltip",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"sideEffects": [
|
|
51
51
|
"**/*.css"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "86a93dd1fc801dedf9d72169bb5a352a855fbf20"
|
|
54
54
|
}
|