Comparing version 5.0.2 to 5.1.0
@@ -36,6 +36,14 @@ /*! | ||
/** | ||
* A callback that will be called for the uncontrolled areas with `trapsFocus` | ||
* when Tabster wants to know is the element is currently trapping focus and | ||
* Tabster should not interfere with handling Tab. | ||
* A callback that will be called for the uncontrolled areas when Tabster wants | ||
* to know is the uncontrolled element wants complete control (for example it | ||
* is trapping focus) and Tabster should not interfere with handling Tab. | ||
* If the callback returns undefined, then the default behaviour is to return | ||
* the uncontrolled.completely value from the element. If the callback returns | ||
* non-undefined value, the callback's value will dominate the element's | ||
* uncontrolled.completely value. | ||
*/ | ||
checkUncontrolledCompletely?: (element: HTMLElement, completely: boolean) => boolean | undefined; | ||
/** | ||
* @deprecated use checkUncontrolledCompletely. | ||
*/ | ||
checkUncontrolledTrappingFocus?: (element: HTMLElement) => boolean; | ||
@@ -596,3 +604,3 @@ /** | ||
export interface UncontrolledAPI { | ||
isTrappingFocus(element: HTMLElement): boolean; | ||
isUncontrolledCompletely(element: HTMLElement, completely: boolean): boolean; | ||
} | ||
@@ -627,2 +635,5 @@ interface ModalizerAPIInternal extends TabsterPartWithAcceptElement { | ||
export type ModalizerElementAccessibleCheck = (element: HTMLElement, activeModalizerElements?: HTMLElement[]) => boolean; | ||
export interface UncontrolledProps { | ||
completely?: boolean; | ||
} | ||
export interface DeloserOnElement { | ||
@@ -650,3 +661,3 @@ deloser: Deloser; | ||
export interface UncontrolledOnElement { | ||
uncontrolled: Record<string, never>; | ||
uncontrolled: UncontrolledProps; | ||
} | ||
@@ -668,3 +679,3 @@ export interface ObservedOnElement { | ||
root: RootProps; | ||
uncontrolled: UncontrolledOnElement["uncontrolled"]; | ||
uncontrolled: UncontrolledProps; | ||
modalizer: ModalizerProps; | ||
@@ -671,0 +682,0 @@ focusable: FocusableProps; |
@@ -11,5 +11,5 @@ /*! | ||
export declare class UncontrolledAPI implements Types.UncontrolledAPI { | ||
private _isTrappingFocus?; | ||
constructor(isTrappingFocus?: (element: HTMLElement) => boolean); | ||
isTrappingFocus(element: HTMLElement): boolean; | ||
private _isUncontrolledCompletely?; | ||
constructor(isUncontrolledCompletely?: (element: HTMLElement, completely: boolean) => boolean | undefined); | ||
isUncontrolledCompletely(element: HTMLElement, completely: boolean): boolean; | ||
} |
@@ -36,6 +36,14 @@ /*! | ||
/** | ||
* A callback that will be called for the uncontrolled areas with `trapsFocus` | ||
* when Tabster wants to know is the element is currently trapping focus and | ||
* Tabster should not interfere with handling Tab. | ||
* A callback that will be called for the uncontrolled areas when Tabster wants | ||
* to know is the uncontrolled element wants complete control (for example it | ||
* is trapping focus) and Tabster should not interfere with handling Tab. | ||
* If the callback returns undefined, then the default behaviour is to return | ||
* the uncontrolled.completely value from the element. If the callback returns | ||
* non-undefined value, the callback's value will dominate the element's | ||
* uncontrolled.completely value. | ||
*/ | ||
checkUncontrolledCompletely?: (element: HTMLElement, completely: boolean) => boolean | undefined; | ||
/** | ||
* @deprecated use checkUncontrolledCompletely. | ||
*/ | ||
checkUncontrolledTrappingFocus?: (element: HTMLElement) => boolean; | ||
@@ -596,3 +604,3 @@ /** | ||
interface UncontrolledAPI { | ||
isTrappingFocus(element: HTMLElement): boolean; | ||
isUncontrolledCompletely(element: HTMLElement, completely: boolean): boolean; | ||
} | ||
@@ -627,2 +635,5 @@ interface ModalizerAPIInternal extends TabsterPartWithAcceptElement { | ||
type ModalizerElementAccessibleCheck = (element: HTMLElement, activeModalizerElements?: HTMLElement[]) => boolean; | ||
interface UncontrolledProps { | ||
completely?: boolean; | ||
} | ||
interface DeloserOnElement { | ||
@@ -650,3 +661,3 @@ deloser: Deloser; | ||
interface UncontrolledOnElement { | ||
uncontrolled: Record<string, never>; | ||
uncontrolled: UncontrolledProps; | ||
} | ||
@@ -668,3 +679,3 @@ interface ObservedOnElement { | ||
root: RootProps; | ||
uncontrolled: UncontrolledOnElement["uncontrolled"]; | ||
uncontrolled: UncontrolledProps; | ||
modalizer: ModalizerProps; | ||
@@ -838,2 +849,3 @@ focusable: FocusableProps; | ||
type Types_d_ModalizerElementAccessibleCheck = ModalizerElementAccessibleCheck; | ||
type Types_d_UncontrolledProps = UncontrolledProps; | ||
type Types_d_DeloserOnElement = DeloserOnElement; | ||
@@ -972,2 +984,3 @@ type Types_d_RootOnElement = RootOnElement; | ||
Types_d_ModalizerElementAccessibleCheck as ModalizerElementAccessibleCheck, | ||
Types_d_UncontrolledProps as UncontrolledProps, | ||
Types_d_DeloserOnElement as DeloserOnElement, | ||
@@ -974,0 +987,0 @@ Types_d_RootOnElement as RootOnElement, |
{ | ||
"name": "tabster", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"description": "Focus Management Tools for Web", | ||
@@ -5,0 +5,0 @@ "author": "Marat Abdullin <marata@microsoft.com>", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1959046
17027