@zag-js/popper
Advanced tools
Comparing version 0.79.2 to 0.79.3
@@ -234,9 +234,16 @@ 'use strict'; | ||
floating.style.setProperty("--y", `${y}px`); | ||
if (options.hideWhenDetached && pos.middlewareData.hide?.referenceHidden) { | ||
floating.style.setProperty("visibility", "hidden"); | ||
if (options.hideWhenDetached) { | ||
const isHidden = pos.middlewareData.hide?.referenceHidden; | ||
if (isHidden) { | ||
floating.style.setProperty("visibility", "hidden"); | ||
floating.style.setProperty("pointer-events", "none"); | ||
} else { | ||
floating.style.removeProperty("visibility"); | ||
floating.style.removeProperty("pointer-events"); | ||
} | ||
} | ||
const contentEl = floating.firstElementChild; | ||
if (contentEl) { | ||
const zIndex = win.getComputedStyle(contentEl).zIndex; | ||
floating.style.setProperty("--z-index", zIndex); | ||
const styles = domQuery.getComputedStyle(contentEl); | ||
floating.style.setProperty("--z-index", styles.zIndex); | ||
} | ||
@@ -243,0 +250,0 @@ }; |
{ | ||
"name": "@zag-js/popper", | ||
"version": "0.79.2", | ||
"version": "0.79.3", | ||
"description": "Dynamic positioning logic for ui machines", | ||
@@ -26,4 +26,4 @@ "keywords": [ | ||
"@floating-ui/dom": "1.6.12", | ||
"@zag-js/dom-query": "0.79.2", | ||
"@zag-js/utils": "0.79.2" | ||
"@zag-js/dom-query": "0.79.3", | ||
"@zag-js/utils": "0.79.3" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
33660
780
+ Added@zag-js/dom-query@0.79.3(transitive)
+ Added@zag-js/utils@0.79.3(transitive)
- Removed@zag-js/dom-query@0.79.2(transitive)
- Removed@zag-js/utils@0.79.2(transitive)
Updated@zag-js/dom-query@0.79.3
Updated@zag-js/utils@0.79.3