solid-dismiss
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -1053,3 +1053,3 @@ import { insert, template, delegateEvents, addEventListener, effect, setAttribute, classList, createComponent, mergeProps } from 'solid-js/web'; | ||
const classState = props[propStr]; | ||
return classState ? classState : `${name}-${type}`; | ||
return classState ? classState.split(" ") : [`${name}-${type}`]; | ||
} | ||
@@ -1080,7 +1080,7 @@ | ||
onBeforeEnter && onBeforeEnter(el); | ||
el.classList.add(enterClasses); | ||
el.classList.add(enterActiveClasses); | ||
el.classList.add(...enterClasses); | ||
el.classList.add(...enterActiveClasses); | ||
requestAnimationFrame(() => { | ||
el.classList.remove(enterClasses); | ||
el.classList.add(enterToClasses); | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
@@ -1100,4 +1100,4 @@ | ||
if (el) { | ||
el.classList.remove(enterActiveClasses); | ||
el.classList.remove(enterToClasses); | ||
el.classList.remove(...enterActiveClasses); | ||
el.classList.remove(...enterToClasses); | ||
s1() !== _el && set1(_el); | ||
@@ -1118,7 +1118,7 @@ onAfterEnter && onAfterEnter(el); | ||
onBeforeExit && onBeforeExit(_el); | ||
el.classList.add(exitClasses); | ||
el.classList.add(exitActiveClasses); | ||
el.classList.add(...exitClasses); | ||
el.classList.add(...exitActiveClasses); | ||
requestAnimationFrame(() => { | ||
el.classList.remove(exitClasses); | ||
el.classList.add(exitToClasses); | ||
el.classList.remove(...exitClasses); | ||
el.classList.add(...exitToClasses); | ||
}); | ||
@@ -1137,4 +1137,4 @@ onExit && onExit(el, endTransition); | ||
function endTransition() { | ||
el.classList.remove(exitActiveClasses); | ||
el.classList.remove(exitToClasses); | ||
el.classList.remove(...exitActiveClasses); | ||
el.classList.remove(...exitToClasses); | ||
s1() === _el && set1(undefined); | ||
@@ -1141,0 +1141,0 @@ onAfterExit && onAfterExit(el); |
@@ -14,3 +14,3 @@ import { untrack, createComputed, createSignal, children, } from "solid-js"; | ||
const classState = props[propStr]; | ||
return classState ? classState : `${name}-${type}`; | ||
return classState ? classState.split(" ") : [`${name}-${type}`]; | ||
} | ||
@@ -34,7 +34,7 @@ const getElement = (el) => { | ||
onBeforeEnter && onBeforeEnter(el); | ||
el.classList.add(enterClasses); | ||
el.classList.add(enterActiveClasses); | ||
el.classList.add(...enterClasses); | ||
el.classList.add(...enterActiveClasses); | ||
requestAnimationFrame(() => { | ||
el.classList.remove(enterClasses); | ||
el.classList.add(enterToClasses); | ||
el.classList.remove(...enterClasses); | ||
el.classList.add(...enterToClasses); | ||
onEnter && onEnter(el, endTransition); | ||
@@ -48,4 +48,4 @@ if (!onEnter || onEnter.length < 2) { | ||
if (el) { | ||
el.classList.remove(enterActiveClasses); | ||
el.classList.remove(enterToClasses); | ||
el.classList.remove(...enterActiveClasses); | ||
el.classList.remove(...enterToClasses); | ||
s1() !== _el && set1(_el); | ||
@@ -65,7 +65,7 @@ onAfterEnter && onAfterEnter(el); | ||
onBeforeExit && onBeforeExit(_el); | ||
el.classList.add(exitClasses); | ||
el.classList.add(exitActiveClasses); | ||
el.classList.add(...exitClasses); | ||
el.classList.add(...exitActiveClasses); | ||
requestAnimationFrame(() => { | ||
el.classList.remove(exitClasses); | ||
el.classList.add(exitToClasses); | ||
el.classList.remove(...exitClasses); | ||
el.classList.add(...exitToClasses); | ||
}); | ||
@@ -78,4 +78,4 @@ onExit && onExit(el, endTransition); | ||
function endTransition() { | ||
el.classList.remove(exitActiveClasses); | ||
el.classList.remove(exitToClasses); | ||
el.classList.remove(...exitActiveClasses); | ||
el.classList.remove(...exitToClasses); | ||
s1() === _el && set1(undefined); | ||
@@ -82,0 +82,0 @@ onAfterExit && onAfterExit(el); |
{ | ||
"name": "solid-dismiss", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"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
287878