@y14e/disclosure-css 1.3.9 → 1.3.10

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 CHANGED
@@ -10,14 +10,14 @@ npm i @y14e/disclosure-css
10
10
 
11
11
  ```ts
12
12
  // npm
13
- import Disclosure from '@y14e/disclosure-css@1.3.9';
13
+ import Disclosure from '@y14e/disclosure-css@1.3.10';
14
14
 
15
15
  // CDNs
16
- import Disclosure from 'https://esm.sh/@y14e/disclosure-css@1.3.9';
16
+ import Disclosure from 'https://esm.sh/@y14e/disclosure-css@1.3.10';
17
17
  // or
18
- import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@1.3.9/+esm';
18
+ import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@1.3.10/+esm';
19
19
  // or
20
- import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure-css@1.3.9';
20
+ import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure-css@1.3.10';
21
21
  ```
22
22
 
23
23
  ## Usage
package/dist/index.cjs CHANGED
@@ -251,6 +251,16 @@ function getComposedChildren(node) {
251
251
  }
252
252
  return getChildren(node);
253
253
  }
254
+ function focusElement(element) {
255
+ "focus" in element && typeof element.focus === "function" && element.focus();
256
+ }
257
+ function getActiveElement() {
258
+ let current = document.activeElement;
259
+ while (current?.shadowRoot?.activeElement) {
260
+ current = current.shadowRoot.activeElement;
261
+ }
262
+ return current;
263
+ }
254
264
  function getChildren(node) {
255
265
  const elements = [];
256
266
  for (let child = node.firstElementChild; child; child = child.nextElementSibling) {
@@ -509,16 +519,6 @@ var RovingTabIndex = class {
509
519
  });
510
520
  }
511
521
  };
512
- function focusElement(element) {
513
- "focus" in element && typeof element.focus === "function" && element.focus();
514
- }
515
- function getActiveElement() {
516
- let current = document.activeElement;
517
- while (current?.shadowRoot?.activeElement) {
518
- current = current.shadowRoot.activeElement;
519
- }
520
- return current;
521
- }
522
522
 
523
523
  // src/index.ts
524
524
  var Disclosure = class {
@@ -648,7 +648,7 @@ function isFocusable2(element) {
648
648
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
649
649
  * Using the <details> and <summary> element.
650
650
  *
651
- * @version 1.3.9
651
+ * @version 1.3.10
652
652
  * @author Yusuke Kamiyamane
653
653
  * @license MIT
654
654
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -662,7 +662,7 @@ function isFocusable2(element) {
662
662
  * Lightweight roving tabindex utility with fully focus management.
663
663
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
664
664
  *
665
- * @version 3.0.7
665
+ * @version 3.0.8
666
666
  * @author Yusuke Kamiyamane
667
667
  * @license MIT
668
668
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.3.9
6
+ * @version 1.3.10
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.3.9
6
+ * @version 1.3.10
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -249,6 +249,16 @@ function getComposedChildren(node) {
249
249
  }
250
250
  return getChildren(node);
251
251
  }
252
+ function focusElement(element) {
253
+ "focus" in element && typeof element.focus === "function" && element.focus();
254
+ }
255
+ function getActiveElement() {
256
+ let current = document.activeElement;
257
+ while (current?.shadowRoot?.activeElement) {
258
+ current = current.shadowRoot.activeElement;
259
+ }
260
+ return current;
261
+ }
252
262
  function getChildren(node) {
253
263
  const elements = [];
254
264
  for (let child = node.firstElementChild; child; child = child.nextElementSibling) {
@@ -507,16 +517,6 @@ var RovingTabIndex = class {
507
517
  });
508
518
  }
509
519
  };
510
- function focusElement(element) {
511
- "focus" in element && typeof element.focus === "function" && element.focus();
512
- }
513
- function getActiveElement() {
514
- let current = document.activeElement;
515
- while (current?.shadowRoot?.activeElement) {
516
- current = current.shadowRoot.activeElement;
517
- }
518
- return current;
519
- }
520
520
 
521
521
  // src/index.ts
522
522
  var Disclosure = class {
@@ -646,7 +646,7 @@ function isFocusable2(element) {
646
646
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
647
647
  * Using the <details> and <summary> element.
648
648
  *
649
- * @version 1.3.9
649
+ * @version 1.3.10
650
650
  * @author Yusuke Kamiyamane
651
651
  * @license MIT
652
652
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -660,7 +660,7 @@ function isFocusable2(element) {
660
660
  * Lightweight roving tabindex utility with fully focus management.
661
661
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
662
662
  *
663
- * @version 3.0.7
663
+ * @version 3.0.8
664
664
  * @author Yusuke Kamiyamane
665
665
  * @license MIT
666
666
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure-css",
3
- "version": "1.3.9",
3
+ "version": "1.3.10",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "homepage": "https://github.com/y14e/disclosure-css#readme",
45
45
  "devDependencies": {
46
- "@y14e/roving-tabindex": "^3.0.7",
46
+ "@y14e/roving-tabindex": "^3.0.8",
47
47
  "bun-types": "latest",
48
48
  "tsup": "^8.0.0",
49
49
  "typescript": "^5.6.0"