@zag-js/collapsible
Advanced tools
@@ -63,4 +63,3 @@ "use strict"; | ||
setOpen(nextOpen) { | ||
if (nextOpen === open) | ||
return; | ||
if (nextOpen === open) return; | ||
send(nextOpen ? "OPEN" : "CLOSE"); | ||
@@ -100,6 +99,4 @@ }, | ||
onClick(event) { | ||
if (event.defaultPrevented) | ||
return; | ||
if (disabled) | ||
return; | ||
if (event.defaultPrevented) return; | ||
if (disabled) return; | ||
send({ type: open ? "CLOSE" : "OPEN", src: "trigger.click" }); | ||
@@ -210,4 +207,3 @@ } | ||
const contentEl = dom.getContentEl(ctx2); | ||
if (!contentEl) | ||
return; | ||
if (!contentEl) return; | ||
const animationName = (0, import_dom_query3.getComputedStyle)(contentEl).animationName; | ||
@@ -248,4 +244,3 @@ const hasNoAnimation = !animationName || animationName === "none"; | ||
const contentEl = dom.getContentEl(ctx2); | ||
if (!contentEl) | ||
return; | ||
if (!contentEl) return; | ||
ctx2.stylesRef || (ctx2.stylesRef = (0, import_core.ref)({ | ||
@@ -252,0 +247,0 @@ animationName: contentEl.style.animationName, |
{ | ||
"name": "@zag-js/collapsible", | ||
"version": "0.56.0", | ||
"version": "0.56.1", | ||
"description": "Core logic for the collapsible widget implemented as a state machine", | ||
@@ -31,7 +31,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/anatomy": "0.56.0", | ||
"@zag-js/core": "0.56.0", | ||
"@zag-js/dom-query": "0.56.0", | ||
"@zag-js/utils": "0.56.0", | ||
"@zag-js/types": "0.56.0" | ||
"@zag-js/anatomy": "0.56.1", | ||
"@zag-js/core": "0.56.1", | ||
"@zag-js/dom-query": "0.56.1", | ||
"@zag-js/utils": "0.56.1", | ||
"@zag-js/types": "0.56.1" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
70272
-0.17%1020
-0.97%