@muraldevkit/ui-toolkit 4.46.0 → 4.47.1-dev-0g73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Focus trap logic
|
|
3
|
-
*
|
|
4
3
|
* @param {HTMLElement} element - The component props.
|
|
5
4
|
* @returns {HTMLElement[]} - The focusable elements inside the element.
|
|
6
5
|
*/
|
|
7
6
|
export declare const getFocusableElementsInsideElement: (element: HTMLElement) => HTMLElement[];
|
|
8
7
|
/**
|
|
9
8
|
* Gets the first element with the data-autofocus="true" attribute within the container element
|
|
10
|
-
*
|
|
11
9
|
* @param {HTMLElement} containerElement - container element
|
|
12
10
|
* @returns {HTMLElement | undefined} - the first element that has autofocus="true" or undefined
|
|
13
11
|
*/
|
|
@@ -15,7 +13,6 @@ export declare const getElementWithAutofocus: (containerElement: HTMLElement) =>
|
|
|
15
13
|
/**
|
|
16
14
|
* Traps focus inside of an element.
|
|
17
15
|
* Adapted from https://hidde.blog/using-javascript-to-trap-focus-in-an-element/
|
|
18
|
-
*
|
|
19
16
|
* @param {HTMLElement} element // Element to trap focus in
|
|
20
17
|
* @param {boolean} disableAutofocus // Whether to disable autofocus
|
|
21
18
|
* @returns {Function} // Cleanup function to be run when component is
|