@y14e/disclosure-css 1.3.3 → 1.3.4

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.3';
13
+ import Disclosure from '@y14e/disclosure-css@1.3.4';
14
14
 
15
15
  // CDNs
16
- import Disclosure from 'https://esm.sh/@y14e/disclosure-css@1.3.3';
16
+ import Disclosure from 'https://esm.sh/@y14e/disclosure-css@1.3.4';
17
17
  // or
18
- import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@1.3.3/+esm';
18
+ import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@1.3.4/+esm';
19
19
  // or
20
- import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure-css@1.3.3';
20
+ import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure-css@1.3.4';
21
21
  ```
22
22
 
23
23
  ## Usage
package/dist/index.cjs CHANGED
@@ -639,15 +639,10 @@ var Disclosure = class {
639
639
  "style",
640
640
  "tabindex"
641
641
  ]);
642
- this.#summaryElements.forEach((summary) => {
643
- if (!summary) {
644
- return;
645
- }
646
- if (!isFocusable2(summary)) {
647
- summary.setAttribute("aria-disabled", "true");
648
- summary.setAttribute("tabindex", "-1");
649
- summary.style.setProperty("pointer-events", "none");
650
- }
642
+ this.#summaryElements.filter((summary) => !isFocusable2(summary)).forEach((summary) => {
643
+ summary.setAttribute("aria-disabled", "true");
644
+ summary.setAttribute("tabindex", "-1");
645
+ summary.style.setProperty("pointer-events", "none");
651
646
  });
652
647
  this.#cleanupRovingTabIndex = createRovingTabIndex(this.#rootElement, {
653
648
  direction: "vertical",
@@ -674,7 +669,7 @@ function isFocusable2(element) {
674
669
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
675
670
  * Using the <details> and <summary> element.
676
671
  *
677
- * @version 1.3.3
672
+ * @version 1.3.4
678
673
  * @author Yusuke Kamiyamane
679
674
  * @license MIT
680
675
  * @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.3
6
+ * @version 1.3.4
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.3
6
+ * @version 1.3.4
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -637,15 +637,10 @@ var Disclosure = class {
637
637
  "style",
638
638
  "tabindex"
639
639
  ]);
640
- this.#summaryElements.forEach((summary) => {
641
- if (!summary) {
642
- return;
643
- }
644
- if (!isFocusable2(summary)) {
645
- summary.setAttribute("aria-disabled", "true");
646
- summary.setAttribute("tabindex", "-1");
647
- summary.style.setProperty("pointer-events", "none");
648
- }
640
+ this.#summaryElements.filter((summary) => !isFocusable2(summary)).forEach((summary) => {
641
+ summary.setAttribute("aria-disabled", "true");
642
+ summary.setAttribute("tabindex", "-1");
643
+ summary.style.setProperty("pointer-events", "none");
649
644
  });
650
645
  this.#cleanupRovingTabIndex = createRovingTabIndex(this.#rootElement, {
651
646
  direction: "vertical",
@@ -672,7 +667,7 @@ function isFocusable2(element) {
672
667
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
673
668
  * Using the <details> and <summary> element.
674
669
  *
675
- * @version 1.3.3
670
+ * @version 1.3.4
676
671
  * @author Yusuke Kamiyamane
677
672
  * @license MIT
678
673
  * @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.3",
3
+ "version": "1.3.4",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",