Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

solid-dismiss

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-dismiss - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

16

dist/esm/index.js

@@ -140,4 +140,3 @@ import { isServer, insert, template, delegateEvents, addEventListener, effect, setAttribute, classList, createComponent, mergeProps } from 'solid-js/web';

if (hasPassedVisitedElement) {
if (ignoreElement.some(el => el === child)) continue;
const el = queryTabbableElement(child, tabbableSelectors, direction);
const el = queryTabbableElement(child, tabbableSelectors, direction, ignoreElement);

@@ -165,4 +164,3 @@ if (el) {

if (hasPassedVisitedElement) {
if (ignoreElement.some(el => el === child)) continue;
const el = queryTabbableElement(child, tabbableSelectors, direction);
const el = queryTabbableElement(child, tabbableSelectors, direction, ignoreElement);
if (el) return el;

@@ -252,3 +250,3 @@ continue;

const queryTabbableElement = (el, selectors = _tabbableSelectors, iterationDirection = "forwards", windowContext = window, init = true) => {
const queryTabbableElement = (el, selectors = _tabbableSelectors, iterationDirection = "forwards", ignoreElement = [], windowContext = window, init = true) => {
const queryChild = el => {

@@ -287,3 +285,3 @@ if (!el.matches(selectors)) return {

if (init) {
if (isHidden(el, windowContext)) return null;
if (ignoreElement.some(item => item === el) || isHidden(el, windowContext)) return null;
const {

@@ -297,3 +295,3 @@ el: elResult,

windowContext = windowContextResult || windowContext;
return queryTabbableElement(el, selectors, iterationDirection, windowContext, false);
return queryTabbableElement(el, selectors, iterationDirection, ignoreElement, windowContext, false);
}

@@ -307,3 +305,3 @@

const iterateChild = el => {
if (isHidden(el, windowContext)) return {
if (ignoreElement.some(item => item === el) || isHidden(el, windowContext)) return {
continue: true

@@ -325,3 +323,3 @@ };

const foundChild = queryTabbableElement(el, selectors, iterationDirection, windowContext, false);
const foundChild = queryTabbableElement(el, selectors, iterationDirection, ignoreElement, windowContext, false);
if (foundChild) return {

@@ -328,0 +326,0 @@ returnVal: foundChild

@@ -52,5 +52,3 @@ const _tabbableSelectors = [

if (hasPassedVisitedElement) {
if (ignoreElement.some((el) => el === child))
continue;
const el = queryTabbableElement(child, tabbableSelectors, direction);
const el = queryTabbableElement(child, tabbableSelectors, direction, ignoreElement);
if (el) {

@@ -74,5 +72,3 @@ return el;

if (hasPassedVisitedElement) {
if (ignoreElement.some((el) => el === child))
continue;
const el = queryTabbableElement(child, tabbableSelectors, direction);
const el = queryTabbableElement(child, tabbableSelectors, direction, ignoreElement);
if (el)

@@ -155,3 +151,3 @@ return el;

};
export const queryTabbableElement = (el, selectors = _tabbableSelectors, iterationDirection = "forwards", windowContext = window, init = true) => {
export const queryTabbableElement = (el, selectors = _tabbableSelectors, iterationDirection = "forwards", ignoreElement = [], windowContext = window, init = true) => {
const queryChild = (el) => {

@@ -179,3 +175,4 @@ if (!el.matches(selectors))

if (init) {
if (isHidden(el, windowContext))
if (ignoreElement.some((item) => item === el) ||
isHidden(el, windowContext))
return null;

@@ -187,3 +184,3 @@ const { el: elResult, matched, windowContext: windowContextResult, } = queryChild(el);

windowContext = windowContextResult || windowContext;
return queryTabbableElement(el, selectors, iterationDirection, windowContext, false);
return queryTabbableElement(el, selectors, iterationDirection, ignoreElement, windowContext, false);
}

@@ -196,3 +193,4 @@ const shadowRoot = el.shadowRoot;

const iterateChild = (el) => {
if (isHidden(el, windowContext))
if (ignoreElement.some((item) => item === el) ||
isHidden(el, windowContext))
return {

@@ -207,3 +205,3 @@ continue: true,

}
const foundChild = queryTabbableElement(el, selectors, iterationDirection, windowContext, false);
const foundChild = queryTabbableElement(el, selectors, iterationDirection, ignoreElement, windowContext, false);
if (foundChild)

@@ -210,0 +208,0 @@ return { returnVal: foundChild };

@@ -33,3 +33,3 @@ declare type GetNextTabbableElement = {

export declare const getNextTabbableElement: ({ from: _from, stopAtRootElement: stopAtRootElement, ignoreElement, allowSelectors, direction, wrap, }: GetNextTabbableElement) => HTMLElement;
export declare const queryTabbableElement: (el: Element, selectors?: string, iterationDirection?: "forwards" | "backwards", windowContext?: Window, init?: boolean) => HTMLElement | null;
export declare const queryTabbableElement: (el: Element, selectors?: string, iterationDirection?: "forwards" | "backwards", ignoreElement?: HTMLElement[], windowContext?: Window, init?: boolean) => HTMLElement | null;
export {};
{
"name": "solid-dismiss",
"version": "1.4.1",
"version": "1.4.2",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc