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

@zag-js/focus-visible

Package Overview
Dependencies
Maintainers
0
Versions
732
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/focus-visible - npm Package Compare versions

Comparing version 0.71.0 to 0.72.0

13

dist/index.js

@@ -15,8 +15,6 @@ 'use strict';

function isKeyboardFocusEvent(isTextInput, modality, e) {
const IHTMLInputElement = typeof window !== "undefined" ? domQuery.getWindow(e?.target).HTMLInputElement : HTMLInputElement;
const IHTMLTextAreaElement = typeof window !== "undefined" ? domQuery.getWindow(e?.target).HTMLTextAreaElement : HTMLTextAreaElement;
const IHTMLElement = typeof window !== "undefined" ? domQuery.getWindow(e?.target).HTMLElement : HTMLElement;
const IKeyboardEvent = typeof window !== "undefined" ? domQuery.getWindow(e?.target).KeyboardEvent : KeyboardEvent;
isTextInput = isTextInput || e?.target instanceof IHTMLInputElement && !nonTextInputTypes.has(e?.target?.type) || e?.target instanceof IHTMLTextAreaElement || e?.target instanceof IHTMLElement && e?.target.isContentEditable;
return !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !Reflect.has(FOCUS_VISIBLE_INPUT_KEYS, e.key));
const target = e ? domQuery.getEventTarget(e) : null;
const win = domQuery.getWindow(target);
isTextInput = isTextInput || target instanceof win.HTMLInputElement && !nonTextInputTypes.has(target?.type) || target instanceof win.HTMLTextAreaElement || target instanceof win.HTMLElement && target.isContentEditable;
return !(isTextInput && modality === "keyboard" && e instanceof win.KeyboardEvent && !Reflect.has(FOCUS_VISIBLE_INPUT_KEYS, e.key));
}

@@ -58,3 +56,4 @@ var currentModality = null;

function handleFocusEvent(e) {
if (e.target === domQuery.getWindow(e.target) || e.target === domQuery.getDocument(e.target)) {
const target = domQuery.getEventTarget(e);
if (target === domQuery.getWindow(target) || target === domQuery.getDocument(target)) {
return;

@@ -61,0 +60,0 @@ }

{
"name": "@zag-js/focus-visible",
"version": "0.71.0",
"version": "0.72.0",
"description": "Focus visible polyfill utility based on WICG",

@@ -28,3 +28,3 @@ "keywords": [

"dependencies": {
"@zag-js/dom-query": "0.71.0"
"@zag-js/dom-query": "0.72.0"
},

@@ -31,0 +31,0 @@ "devDependencies": {

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