@y14e/disclosure 1.3.6 → 1.3.7

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
10
10
 
11
11
  ```ts
12
12
  // npm
13
- import Disclosure from '@y14e/disclosure@1.3.6';
13
+ import Disclosure from '@y14e/disclosure@1.3.7';
14
14
 
15
15
  // CDNs
16
- import Disclosure from 'https://esm.sh/@y14e/disclosure@1.3.6';
16
+ import Disclosure from 'https://esm.sh/@y14e/disclosure@1.3.7';
17
17
  // or
18
- import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure@1.3.6/+esm';
18
+ import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure@1.3.7/+esm';
19
19
  // or
20
- import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure@1.3.6';
20
+ import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure@1.3.7';
21
21
  ```
22
22
 
23
23
  ## Usage
package/dist/index.cjs CHANGED
@@ -655,8 +655,9 @@ var Disclosure = class _Disclosure {
655
655
  this.#animationController?.abort();
656
656
  this.#animationController = null;
657
657
  this.#detailsElements.forEach((details) => {
658
- details.removeAttribute("data-disclosure-name");
659
- details.removeAttribute("data-disclosure-open");
658
+ ["name", "open"].forEach((name) => {
659
+ details.removeAttribute(`data-disclosure-${name}`);
660
+ });
660
661
  });
661
662
  this.#detailsElements.length = 0;
662
663
  restoreAttributes(this.#summaryElements);
@@ -785,9 +786,9 @@ var Disclosure = class _Disclosure {
785
786
  if (!details.hasAttribute("data-disclosure-open")) {
786
787
  details.open = false;
787
788
  }
788
- const { style } = content;
789
- style.removeProperty("block-size");
790
- style.removeProperty("overflow");
789
+ ["block-size", "overflow"].forEach((name2) => {
790
+ content.style.removeProperty(name2);
791
+ });
791
792
  }
792
793
  async #waitAnimationsFinish() {
793
794
  const promises = [];
@@ -818,7 +819,7 @@ function waitAnimationFinish(animation) {
818
819
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
819
820
  * Using the <details> and <summary> element.
820
821
  *
821
- * @version 1.3.6
822
+ * @version 1.3.7
822
823
  * @author Yusuke Kamiyamane
823
824
  * @license MIT
824
825
  * @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.6
6
+ * @version 1.3.7
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.6
6
+ * @version 1.3.7
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -653,8 +653,9 @@ var Disclosure = class _Disclosure {
653
653
  this.#animationController?.abort();
654
654
  this.#animationController = null;
655
655
  this.#detailsElements.forEach((details) => {
656
- details.removeAttribute("data-disclosure-name");
657
- details.removeAttribute("data-disclosure-open");
656
+ ["name", "open"].forEach((name) => {
657
+ details.removeAttribute(`data-disclosure-${name}`);
658
+ });
658
659
  });
659
660
  this.#detailsElements.length = 0;
660
661
  restoreAttributes(this.#summaryElements);
@@ -783,9 +784,9 @@ var Disclosure = class _Disclosure {
783
784
  if (!details.hasAttribute("data-disclosure-open")) {
784
785
  details.open = false;
785
786
  }
786
- const { style } = content;
787
- style.removeProperty("block-size");
788
- style.removeProperty("overflow");
787
+ ["block-size", "overflow"].forEach((name2) => {
788
+ content.style.removeProperty(name2);
789
+ });
789
790
  }
790
791
  async #waitAnimationsFinish() {
791
792
  const promises = [];
@@ -816,7 +817,7 @@ function waitAnimationFinish(animation) {
816
817
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
817
818
  * Using the <details> and <summary> element.
818
819
  *
819
- * @version 1.3.6
820
+ * @version 1.3.7
820
821
  * @author Yusuke Kamiyamane
821
822
  * @license MIT
822
823
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",