solid-dismiss
Advanced tools
Comparing version 1.0.19 to 1.0.20
@@ -1058,2 +1058,11 @@ import { insert, template, delegateEvents, addEventListener, effect, setAttribute, classList, createComponent, mergeProps } from 'solid-js/web'; | ||
if (appendToElement) { | ||
if (appendToElement === "menuPopup") { | ||
return queryElement({ | ||
containerEl: el | ||
}, { | ||
inputElement: null, | ||
type: "menuPopup" | ||
}); | ||
} | ||
return typeof appendToElement === "string" ? el.querySelector(appendToElement) : appendToElement; | ||
@@ -1522,2 +1531,11 @@ } | ||
if (appendToElement) { | ||
if (appendToElement === "menuPopup") { | ||
return queryElement({ | ||
containerEl: el | ||
}, { | ||
inputElement: null, | ||
type: "menuPopup" | ||
}); | ||
} | ||
return typeof appendToElement === "string" ? el.querySelector(appendToElement) : appendToElement; | ||
@@ -1524,0 +1542,0 @@ } |
import { untrack, createComputed, createSignal, children, } from "solid-js"; | ||
import { camelize } from "../utils"; | ||
import { camelize, queryElement } from "../utils"; | ||
export const Transition = (props) => { | ||
@@ -18,2 +18,5 @@ let el; | ||
if (appendToElement) { | ||
if (appendToElement === "menuPopup") { | ||
return queryElement({ containerEl: el }, { inputElement: null, type: "menuPopup" }); | ||
} | ||
return typeof appendToElement === "string" | ||
@@ -20,0 +23,0 @@ ? el.querySelector(appendToElement) |
@@ -106,2 +106,5 @@ import "./browserInfo"; | ||
if (appendToElement) { | ||
if (appendToElement === "menuPopup") { | ||
return queryElement({ containerEl: el }, { inputElement: null, type: "menuPopup" }); | ||
} | ||
return typeof appendToElement === "string" | ||
@@ -108,0 +111,0 @@ ? el.querySelector(appendToElement) |
@@ -24,7 +24,5 @@ import { Component, JSX } from "solid-js"; | ||
* | ||
* Using `"container"` value will use root element of the component | ||
* | ||
* @defaultValue The element is the root element of the component, where CSS classes are appended to, and it is also passed to callbacks | ||
*/ | ||
appendToElement?: string | Node; | ||
appendToElement?: "menuPopup" | JSX.Element; | ||
/** | ||
@@ -31,0 +29,0 @@ * Whether to apply transition on initial render. |
{ | ||
"name": "solid-dismiss", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"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.", |
@@ -323,7 +323,5 @@ <h1 align="center">Solid Dismiss | ||
* | ||
* Using `"container"` value will use root element of the component | ||
* | ||
* @defaultValue The element is the root element of the component, where CSS classes are appended to, and it is also passed to callbacks | ||
*/ | ||
appendToElement?: string | Node; | ||
appendToElement?: "menuPopup" | string | JSX.Element; | ||
/** | ||
@@ -330,0 +328,0 @@ * Whether to apply transition on initial render. |
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
287589
3882
333