solid-dismiss
Advanced tools
Comparing version 1.0.26 to 1.0.27
@@ -1083,14 +1083,16 @@ import { isServer, insert, template, delegateEvents, addEventListener, effect, setAttribute, classList, createComponent, mergeProps } from 'solid-js/web'; | ||
requestAnimationFrame(() => { | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
requestAnimationFrame(() => { | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
if (!onEnter || onEnter.length < 2) { | ||
el.addEventListener("transitionend", endTransition, { | ||
once: true | ||
}); | ||
el.addEventListener("animationend", endTransition, { | ||
once: true | ||
}); | ||
} | ||
if (!onEnter || onEnter.length < 2) { | ||
el.addEventListener("transitionend", endTransition, { | ||
once: true | ||
}); | ||
el.addEventListener("animationend", endTransition, { | ||
once: true | ||
}); | ||
} | ||
}); | ||
}); | ||
@@ -1588,20 +1590,22 @@ | ||
requestAnimationFrame(() => { | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
requestAnimationFrame(() => { | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
if (!onEnter || onEnter.length < 2) { | ||
if (type === "popup") { | ||
endEnterTransitionRef = endTransition; | ||
} else { | ||
endEnterTransitionOverlayRef = endTransition; | ||
if (!onEnter || onEnter.length < 2) { | ||
if (type === "popup") { | ||
endEnterTransitionRef = endTransition; | ||
} else { | ||
endEnterTransitionOverlayRef = endTransition; | ||
} | ||
el.addEventListener("transitionend", endTransition, { | ||
once: true | ||
}); | ||
el.addEventListener("animationend", endTransition, { | ||
once: true | ||
}); | ||
} | ||
el.addEventListener("transitionend", endTransition, { | ||
once: true | ||
}); | ||
el.addEventListener("animationend", endTransition, { | ||
once: true | ||
}); | ||
} | ||
}); | ||
}); | ||
@@ -1608,0 +1612,0 @@ |
@@ -36,9 +36,11 @@ import { untrack, createComputed, createSignal, children, } from "solid-js"; | ||
requestAnimationFrame(() => { | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
if (!onEnter || onEnter.length < 2) { | ||
el.addEventListener("transitionend", endTransition, { once: true }); | ||
el.addEventListener("animationend", endTransition, { once: true }); | ||
} | ||
requestAnimationFrame(() => { | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
if (!onEnter || onEnter.length < 2) { | ||
el.addEventListener("transitionend", endTransition, { once: true }); | ||
el.addEventListener("animationend", endTransition, { once: true }); | ||
} | ||
}); | ||
}); | ||
@@ -45,0 +47,0 @@ function endTransition() { |
@@ -149,19 +149,21 @@ import "./browserInfo"; | ||
requestAnimationFrame(() => { | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
if (!onEnter || onEnter.length < 2) { | ||
if (type === "popup") { | ||
endEnterTransitionRef = endTransition; | ||
requestAnimationFrame(() => { | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
if (!onEnter || onEnter.length < 2) { | ||
if (type === "popup") { | ||
endEnterTransitionRef = endTransition; | ||
} | ||
else { | ||
endEnterTransitionOverlayRef = endTransition; | ||
} | ||
el.addEventListener("transitionend", endTransition, { | ||
once: true, | ||
}); | ||
el.addEventListener("animationend", endTransition, { | ||
once: true, | ||
}); | ||
} | ||
else { | ||
endEnterTransitionOverlayRef = endTransition; | ||
} | ||
el.addEventListener("transitionend", endTransition, { | ||
once: true, | ||
}); | ||
el.addEventListener("animationend", endTransition, { | ||
once: true, | ||
}); | ||
} | ||
}); | ||
}); | ||
@@ -168,0 +170,0 @@ function endTransition() { |
{ | ||
"name": "solid-dismiss", | ||
"version": "1.0.26", | ||
"version": "1.0.27", | ||
"homepage": "https://aquaductape.github.io/solid-dismiss/", | ||
@@ -5,0 +5,0 @@ "description": "Handles \"click outside\" behavior for popup menu. Closing is triggered by click/focus outside of popup element or pressing \"Escape\" key.", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288643
3893