react-focus-lock
Advanced tools
Comparing version 2.11.1 to 2.11.2
{ | ||
"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": { |
@@ -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 @@ /** |
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
106794
2108