@graupl/core 1.0.0-beta.14 → 1.0.0-beta.15
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.
- package/dist/js/accordion.js.map +1 -1
- package/dist/js/alert.js.map +1 -1
- package/dist/js/carousel.js.map +1 -1
- package/dist/js/component/accordion.cjs.js.map +1 -1
- package/dist/js/component/accordion.es.js.map +1 -1
- package/dist/js/component/accordion.iife.js.map +1 -1
- package/dist/js/component/alert.cjs.js.map +1 -1
- package/dist/js/component/alert.es.js.map +1 -1
- package/dist/js/component/alert.iife.js.map +1 -1
- package/dist/js/component/carousel.cjs.js.map +1 -1
- package/dist/js/component/carousel.es.js.map +1 -1
- package/dist/js/component/carousel.iife.js.map +1 -1
- package/dist/js/generator/accordion.cjs.js.map +1 -1
- package/dist/js/generator/accordion.es.js.map +1 -1
- package/dist/js/generator/accordion.iife.js.map +1 -1
- package/dist/js/generator/alert.cjs.js.map +1 -1
- package/dist/js/generator/alert.es.js.map +1 -1
- package/dist/js/generator/alert.iife.js.map +1 -1
- package/dist/js/generator/carousel.cjs.js.map +1 -1
- package/dist/js/generator/carousel.es.js.map +1 -1
- package/dist/js/generator/carousel.iife.js.map +1 -1
- package/dist/js/graupl.js.map +1 -1
- package/package.json +1 -1
- package/src/js/domHelpers.js +5 -10
package/package.json
CHANGED
package/src/js/domHelpers.js
CHANGED
|
@@ -40,8 +40,7 @@ export function removeClass(className, element) {
|
|
|
40
40
|
* Select all focusable elements within a given context.
|
|
41
41
|
*
|
|
42
42
|
* @param {HTMLElement} [context = document] - The context in which to search for focusable elements.
|
|
43
|
-
*
|
|
44
|
-
* @returns {HTMLElement[]}
|
|
43
|
+
* @return {HTMLElement[]} - An array of focusable elements.
|
|
45
44
|
*/
|
|
46
45
|
export function selectAllFocusableElements(context = document) {
|
|
47
46
|
const querySelector =
|
|
@@ -63,8 +62,7 @@ export function selectAllFocusableElements(context = document) {
|
|
|
63
62
|
* Select the first focusable element within a given context.
|
|
64
63
|
*
|
|
65
64
|
* @param {HTMLElement} [context = document] - The context in which to search for focusable elements.
|
|
66
|
-
*
|
|
67
|
-
* @returns {HTMLElement|boolean} - The first focusable element or false if none found.
|
|
65
|
+
* @return {HTMLElement|boolean} - The first focusable element or false if none found.
|
|
68
66
|
*/
|
|
69
67
|
export function selectFirstFocusableElement(context = document) {
|
|
70
68
|
const tabbableElements = selectAllFocusableElements(context);
|
|
@@ -76,8 +74,7 @@ export function selectFirstFocusableElement(context = document) {
|
|
|
76
74
|
* Select the last focusable element within a given context.
|
|
77
75
|
*
|
|
78
76
|
* @param {HTMLElement} [context = document] - The context in which to search for focusable elements.
|
|
79
|
-
*
|
|
80
|
-
* @returns {HTMLElement|boolean} - The last focusable element or false if none found.
|
|
77
|
+
* @return {HTMLElement|boolean} - The last focusable element or false if none found.
|
|
81
78
|
*/
|
|
82
79
|
export function selectLastFocusableElement(context = document) {
|
|
83
80
|
const tabbableElements = selectAllFocusableElements(context);
|
|
@@ -90,8 +87,7 @@ export function selectLastFocusableElement(context = document) {
|
|
|
90
87
|
*
|
|
91
88
|
* @param {HTMLElement} element - The reference element.
|
|
92
89
|
* @param {HTMLElement} [context = document] - The context in which to search for focusable elements.
|
|
93
|
-
*
|
|
94
|
-
* @returns {HTMLElement|boolean} - The next focusable element or false if none found.
|
|
90
|
+
* @return {HTMLElement|boolean} - The next focusable element or false if none found.
|
|
95
91
|
*/
|
|
96
92
|
export function selectNextFocusableElement(element, context = document) {
|
|
97
93
|
const tabbableElements = selectAllFocusableElements(context);
|
|
@@ -107,8 +103,7 @@ export function selectNextFocusableElement(element, context = document) {
|
|
|
107
103
|
*
|
|
108
104
|
* @param {HTMLElement} element - The reference element.
|
|
109
105
|
* @param {HTMLElement} [context = document] - The context in which to search for focusable elements.
|
|
110
|
-
*
|
|
111
|
-
* @returns {HTMLElement|boolean} - The previous focusable element or false if none found.
|
|
106
|
+
* @return {HTMLElement|boolean} - The previous focusable element or false if none found.
|
|
112
107
|
*/
|
|
113
108
|
export function selectPreviousFocusableElement(element, context = document) {
|
|
114
109
|
const tabbableElements = selectAllFocusableElements(context);
|