@y14e/roving-tabindex 3.1.23 → 3.1.25
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/README.md +11 -11
- package/dist/index.bundle.cjs +4 -12
- package/dist/index.bundle.js +4 -12
- package/dist/index.cjs +4 -12
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,11 +13,11 @@ npm i @y14e/roving-tabindex
|
|
|
13
13
|
import { createRovingTabIndex } from '@y14e/roving-tabindex';
|
|
14
14
|
|
|
15
15
|
// CDNs
|
|
16
|
-
import { createRovingTabIndex } from 'https://esm.sh/@y14e/roving-tabindex@3.1.
|
|
16
|
+
import { createRovingTabIndex } from 'https://esm.sh/@y14e/roving-tabindex@3.1.24';
|
|
17
17
|
// or
|
|
18
|
-
import { createRovingTabIndex } from 'https://cdn.jsdelivr.net/npm/@y14e/roving-tabindex@3.1.
|
|
18
|
+
import { createRovingTabIndex } from 'https://cdn.jsdelivr.net/npm/@y14e/roving-tabindex@3.1.24/+esm';
|
|
19
19
|
// or
|
|
20
|
-
import { createRovingTabIndex } from 'https://esm.unpkg.com/@y14e/roving-tabindex@3.1.
|
|
20
|
+
import { createRovingTabIndex } from 'https://esm.unpkg.com/@y14e/roving-tabindex@3.1.24';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## 📦 APIs
|
|
@@ -38,16 +38,16 @@ const cleanup = createRovingTabIndex(container, options);
|
|
|
38
38
|
|
|
39
39
|
```ts
|
|
40
40
|
interface RovingTabIndexOptions {
|
|
41
|
-
direction:
|
|
42
|
-
navigationOnly: boolean;
|
|
43
|
-
noMemory: boolean;
|
|
44
|
-
noStart: boolean;
|
|
45
|
-
selector: string;
|
|
46
|
-
typeahead: boolean;
|
|
47
|
-
wrap: boolean;
|
|
41
|
+
direction: Direction; // default: 'both'
|
|
42
|
+
navigationOnly: boolean; // default: false
|
|
43
|
+
noMemory: boolean; // default: false
|
|
44
|
+
noStart: boolean; // default: false
|
|
45
|
+
selector: string; // default: ''
|
|
46
|
+
typeahead: boolean; // default: false
|
|
47
|
+
wrap: boolean; // default: false
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
type
|
|
50
|
+
type Direction = 'both' | 'horizontal' | 'vertical';
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
### `navigationOnly`
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -366,17 +366,9 @@ var RovingTabIndex = class _RovingTabIndex {
|
|
|
366
366
|
noStart = false;
|
|
367
367
|
}
|
|
368
368
|
if (selector !== "") {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
} else {
|
|
373
|
-
try {
|
|
374
|
-
this.#container.querySelector(selector);
|
|
375
|
-
} catch {
|
|
376
|
-
hasError = true;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
if (hasError) {
|
|
369
|
+
try {
|
|
370
|
+
document.querySelector(selector);
|
|
371
|
+
} catch {
|
|
380
372
|
console.warn("Invalid selector. Fallback: no selector string.");
|
|
381
373
|
selector = "";
|
|
382
374
|
}
|
|
@@ -591,7 +583,7 @@ var RovingTabIndex = class _RovingTabIndex {
|
|
|
591
583
|
* Lightweight roving tabindex utility with fully focus management.
|
|
592
584
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
593
585
|
*
|
|
594
|
-
* @version 3.1.
|
|
586
|
+
* @version 3.1.25
|
|
595
587
|
* @author Yusuke Kamiyamane
|
|
596
588
|
* @license MIT
|
|
597
589
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -364,17 +364,9 @@ var RovingTabIndex = class _RovingTabIndex {
|
|
|
364
364
|
noStart = false;
|
|
365
365
|
}
|
|
366
366
|
if (selector !== "") {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
} else {
|
|
371
|
-
try {
|
|
372
|
-
this.#container.querySelector(selector);
|
|
373
|
-
} catch {
|
|
374
|
-
hasError = true;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
if (hasError) {
|
|
367
|
+
try {
|
|
368
|
+
document.querySelector(selector);
|
|
369
|
+
} catch {
|
|
378
370
|
console.warn("Invalid selector. Fallback: no selector string.");
|
|
379
371
|
selector = "";
|
|
380
372
|
}
|
|
@@ -589,7 +581,7 @@ var RovingTabIndex = class _RovingTabIndex {
|
|
|
589
581
|
* Lightweight roving tabindex utility with fully focus management.
|
|
590
582
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
591
583
|
*
|
|
592
|
-
* @version 3.1.
|
|
584
|
+
* @version 3.1.25
|
|
593
585
|
* @author Yusuke Kamiyamane
|
|
594
586
|
* @license MIT
|
|
595
587
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -71,17 +71,9 @@ var RovingTabIndex = class _RovingTabIndex {
|
|
|
71
71
|
noStart = false;
|
|
72
72
|
}
|
|
73
73
|
if (selector !== "") {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
} else {
|
|
78
|
-
try {
|
|
79
|
-
this.#container.querySelector(selector);
|
|
80
|
-
} catch {
|
|
81
|
-
hasError = true;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (hasError) {
|
|
74
|
+
try {
|
|
75
|
+
document.querySelector(selector);
|
|
76
|
+
} catch {
|
|
85
77
|
console.warn("Invalid selector. Fallback: no selector string.");
|
|
86
78
|
selector = "";
|
|
87
79
|
}
|
|
@@ -296,7 +288,7 @@ var RovingTabIndex = class _RovingTabIndex {
|
|
|
296
288
|
* Lightweight roving tabindex utility with fully focus management.
|
|
297
289
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
298
290
|
*
|
|
299
|
-
* @version 3.1.
|
|
291
|
+
* @version 3.1.25
|
|
300
292
|
* @author Yusuke Kamiyamane
|
|
301
293
|
* @license MIT
|
|
302
294
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Lightweight roving tabindex utility with fully focus management.
|
|
4
4
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
5
5
|
*
|
|
6
|
-
* @version 3.1.
|
|
6
|
+
* @version 3.1.25
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
10
10
|
* @see {@link https://github.com/y14e/roving-tabindex}
|
|
11
11
|
*/
|
|
12
12
|
interface RovingTabIndexOptions {
|
|
13
|
-
direction:
|
|
13
|
+
direction: Direction;
|
|
14
14
|
navigationOnly: boolean;
|
|
15
15
|
noMemory: boolean;
|
|
16
16
|
noStart: boolean;
|
|
@@ -18,7 +18,7 @@ interface RovingTabIndexOptions {
|
|
|
18
18
|
typeahead: boolean;
|
|
19
19
|
wrap: boolean;
|
|
20
20
|
}
|
|
21
|
-
type
|
|
21
|
+
type Direction = 'both' | 'horizontal' | 'vertical';
|
|
22
22
|
declare function createRovingTabIndex(container: Element, options?: Partial<RovingTabIndexOptions>): () => void;
|
|
23
23
|
|
|
24
24
|
export { type RovingTabIndexOptions, createRovingTabIndex };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Lightweight roving tabindex utility with fully focus management.
|
|
4
4
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
5
5
|
*
|
|
6
|
-
* @version 3.1.
|
|
6
|
+
* @version 3.1.25
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
10
10
|
* @see {@link https://github.com/y14e/roving-tabindex}
|
|
11
11
|
*/
|
|
12
12
|
interface RovingTabIndexOptions {
|
|
13
|
-
direction:
|
|
13
|
+
direction: Direction;
|
|
14
14
|
navigationOnly: boolean;
|
|
15
15
|
noMemory: boolean;
|
|
16
16
|
noStart: boolean;
|
|
@@ -18,7 +18,7 @@ interface RovingTabIndexOptions {
|
|
|
18
18
|
typeahead: boolean;
|
|
19
19
|
wrap: boolean;
|
|
20
20
|
}
|
|
21
|
-
type
|
|
21
|
+
type Direction = 'both' | 'horizontal' | 'vertical';
|
|
22
22
|
declare function createRovingTabIndex(container: Element, options?: Partial<RovingTabIndexOptions>): () => void;
|
|
23
23
|
|
|
24
24
|
export { type RovingTabIndexOptions, createRovingTabIndex };
|
package/dist/index.js
CHANGED
|
@@ -48,17 +48,9 @@ var RovingTabIndex = class _RovingTabIndex {
|
|
|
48
48
|
noStart = false;
|
|
49
49
|
}
|
|
50
50
|
if (selector !== "") {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
} else {
|
|
55
|
-
try {
|
|
56
|
-
this.#container.querySelector(selector);
|
|
57
|
-
} catch {
|
|
58
|
-
hasError = true;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (hasError) {
|
|
51
|
+
try {
|
|
52
|
+
document.querySelector(selector);
|
|
53
|
+
} catch {
|
|
62
54
|
console.warn("Invalid selector. Fallback: no selector string.");
|
|
63
55
|
selector = "";
|
|
64
56
|
}
|
|
@@ -273,7 +265,7 @@ var RovingTabIndex = class _RovingTabIndex {
|
|
|
273
265
|
* Lightweight roving tabindex utility with fully focus management.
|
|
274
266
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
275
267
|
*
|
|
276
|
-
* @version 3.1.
|
|
268
|
+
* @version 3.1.25
|
|
277
269
|
* @author Yusuke Kamiyamane
|
|
278
270
|
* @license MIT
|
|
279
271
|
* @copyright Copyright (c) Yusuke Kamiyamane
|