solid-dismiss
Advanced tools
Comparing version 1.6.72 to 1.6.73
@@ -21,3 +21,3 @@ import { untrack, createComputed, createSignal, children, batch, } from "solid-js"; | ||
const { onBeforeEnter, onEnter, onAfterEnter, onBeforeExit, onExit, onAfterExit, appendToElement, appear, state, } = props; | ||
const { onBeforeEnter: onBeforeEnterOverlay, onEnter: onEnterOverlay, onAfterEnter: onAfterEnterOverlay, onBeforeExit: onBeforeExitOverlay, onExit: onExitOverlay, onAfterExit: onAfterExitOverlay, } = props.overlay || {}; | ||
const { onBeforeEnter: onBeforeEnterOverlay, onEnter: onEnterOverlay, onAfterEnter: onAfterEnterOverlay, onBeforeExit: onBeforeExitOverlay, onExit: onExitOverlay, onAfterExit: onAfterExitOverlay, appendToElement: appendToElementOverlay, } = props.overlay || {}; | ||
const createOnBeforeEnter = (type) => type === "content" ? onBeforeEnter : onBeforeEnterOverlay; | ||
@@ -40,9 +40,10 @@ const createOnEnter = (type) => type === "content" ? onEnter : onEnterOverlay; | ||
const getElement = (type, el) => { | ||
if (appendToElement) { | ||
if (appendToElement === "menuPopup" && type !== "overlay") { | ||
const appendToElement_ = type === "content" ? appendToElement : appendToElementOverlay; | ||
if (appendToElement_) { | ||
if (appendToElement_ === "menuPopup" && type !== "overlay") { | ||
return queryElement({ containerEl: el }, { inputElement: null, type: "menuPopup" }); | ||
} | ||
return typeof appendToElement === "string" | ||
? el && el.querySelector(appendToElement) | ||
: appendToElement; | ||
return typeof appendToElement_ === "string" | ||
? el && el.querySelector(appendToElement_) | ||
: appendToElement_; | ||
} | ||
@@ -49,0 +50,0 @@ return el; |
{ | ||
"name": "solid-dismiss", | ||
"version": "1.6.72", | ||
"version": "1.6.73", | ||
"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 too big to display
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
351114
4724