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

react-focus-lock

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-focus-lock - npm Package Compare versions

Comparing version 2.11.1 to 2.11.2

5

package.json
{
"name": "react-focus-lock",
"version": "2.11.1",
"version": "2.11.2",
"description": "It is a trap! (for a focus)",

@@ -10,3 +10,4 @@ "main": "dist/cjs/index.js",

"sideEffects": [
"**/sidecar.js"
"**/sidecar.js",
"**/index.js"
],

@@ -13,0 +14,0 @@ "scripts": {

11

react-focus-lock.d.ts

@@ -62,3 +62,3 @@ import * as React from 'react';

*/
focusNext(options:FocusOptions):Promise<void>;
focusNext(options?:FocusOptions):Promise<void>;
/**

@@ -68,11 +68,11 @@ * focuses the prev element in the scope.

*/
focusPrev():Promise<void>;
focusPrev(options?:FocusOptions):Promise<void>;
/**
* focused the first element in the scope
*/
focusFirst(options: Pick<FocusOptions,'onlyTabbable'>):Promise<void>;
focusFirst(options?: Pick<FocusOptions,'onlyTabbable'>):Promise<void>;
/**
* focused the last element in the scope
*/
focusLast(options: Pick<FocusOptions,'onlyTabbable'>):Promise<void>;
focusLast(options?: Pick<FocusOptions,'onlyTabbable'>):Promise<void>;
}

@@ -84,5 +84,6 @@

* - can be used outside of FocusLock
* - can accept HTML elements or React Refs
* @see {@link useFocusScope} for use cases inside of FocusLock
*/
export function useFocusController(...shards: HTMLElement[]):FocusControl;
export function useFocusController<Elements extends HTMLElement=HTMLElement>(...shards: ReadonlyArray<HTMLElement | {current:HTMLElement | null}>):FocusControl;

@@ -89,0 +90,0 @@ /**

@@ -62,3 +62,3 @@ import * as React from 'react';

*/
focusNext(options:FocusOptions):Promise<void>;
focusNext(options?:FocusOptions):Promise<void>;
/**

@@ -68,11 +68,11 @@ * focuses the prev element in the scope.

*/
focusPrev():Promise<void>;
focusPrev(options?:FocusOptions):Promise<void>;
/**
* focused the first element in the scope
*/
focusFirst(options: Pick<FocusOptions,'onlyTabbable'>):Promise<void>;
focusFirst(options?: Pick<FocusOptions,'onlyTabbable'>):Promise<void>;
/**
* focused the last element in the scope
*/
focusLast(options: Pick<FocusOptions,'onlyTabbable'>):Promise<void>;
focusLast(options?: Pick<FocusOptions,'onlyTabbable'>):Promise<void>;
}

@@ -86,3 +86,3 @@

*/
export function useFocusController(...shards: HTMLElement[]):FocusControl;
export function useFocusController<Elements extends HTMLElement=HTMLElement>(...shards: ReadonlyArray<HTMLElement | {current:HTMLElement | null}>):FocusControl;

@@ -89,0 +89,0 @@ /**

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