@y14e/accordion 1.4.2 → 1.4.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/accordion
10
10
 
11
11
  ```ts
12
12
  // npm
13
- import Accordion from '@y14e/accordion@1.4.2';
13
+ import Accordion from '@y14e/accordion@1.4.4';
14
14
 
15
15
  // CDNs
16
- import Accordion from 'https://esm.sh/@y14e/accordion@1.4.2';
16
+ import Accordion from 'https://esm.sh/@y14e/accordion@1.4.4';
17
17
  // or
18
- import Accordion from 'https://cdn.jsdelivr.net/npm/@y14e/accordion@1.4.2/+esm';
18
+ import Accordion from 'https://cdn.jsdelivr.net/npm/@y14e/accordion@1.4.4/+esm';
19
19
  // or
20
- import Accordion from 'https://esm.unpkg.com/@y14e/accordion@1.4.2';
20
+ import Accordion from 'https://esm.unpkg.com/@y14e/accordion@1.4.4';
21
21
  ```
22
22
 
23
23
  ## Usage
package/dist/index.cjs CHANGED
@@ -802,9 +802,7 @@ var Accordion = class _Accordion {
802
802
  const opened = this.#triggerElements.find(
803
803
  (t) => t !== trigger && t.getAttribute("data-accordion-name") === name && t.ariaExpanded === "true"
804
804
  );
805
- if (opened) {
806
- this.#toggle(opened, false, isMatch);
807
- }
805
+ opened && this.#toggle(opened, false, isMatch);
808
806
  }
809
807
  trigger.setAttribute(
810
808
  "aria-label",
@@ -862,9 +860,9 @@ var Accordion = class _Accordion {
862
860
  if (trigger.ariaExpanded === "false") {
863
861
  content.setAttribute("hidden", "until-found");
864
862
  }
865
- const { style } = content;
866
- style.removeProperty("block-size");
867
- style.removeProperty("overflow");
863
+ ["block-size", "overflow"].forEach((name) => {
864
+ content.style.removeProperty(name);
865
+ });
868
866
  }
869
867
  async #waitAnimationsFinish() {
870
868
  const promises = [];
@@ -894,7 +892,7 @@ function waitAnimationFinish(animation) {
894
892
  * Accordion
895
893
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
896
894
  *
897
- * @version 1.4.2
895
+ * @version 1.4.4
898
896
  * @author Yusuke Kamiyamane
899
897
  * @license MIT
900
898
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Accordion
3
3
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
4
4
  *
5
- * @version 1.4.2
5
+ * @version 1.4.4
6
6
  * @author Yusuke Kamiyamane
7
7
  * @license MIT
8
8
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Accordion
3
3
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
4
4
  *
5
- * @version 1.4.2
5
+ * @version 1.4.4
6
6
  * @author Yusuke Kamiyamane
7
7
  * @license MIT
8
8
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -800,9 +800,7 @@ var Accordion = class _Accordion {
800
800
  const opened = this.#triggerElements.find(
801
801
  (t) => t !== trigger && t.getAttribute("data-accordion-name") === name && t.ariaExpanded === "true"
802
802
  );
803
- if (opened) {
804
- this.#toggle(opened, false, isMatch);
805
- }
803
+ opened && this.#toggle(opened, false, isMatch);
806
804
  }
807
805
  trigger.setAttribute(
808
806
  "aria-label",
@@ -860,9 +858,9 @@ var Accordion = class _Accordion {
860
858
  if (trigger.ariaExpanded === "false") {
861
859
  content.setAttribute("hidden", "until-found");
862
860
  }
863
- const { style } = content;
864
- style.removeProperty("block-size");
865
- style.removeProperty("overflow");
861
+ ["block-size", "overflow"].forEach((name) => {
862
+ content.style.removeProperty(name);
863
+ });
866
864
  }
867
865
  async #waitAnimationsFinish() {
868
866
  const promises = [];
@@ -892,7 +890,7 @@ function waitAnimationFinish(animation) {
892
890
  * Accordion
893
891
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
894
892
  *
895
- * @version 1.4.2
893
+ * @version 1.4.4
896
894
  * @author Yusuke Kamiyamane
897
895
  * @license MIT
898
896
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/accordion",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "WAI-ARIA compliant accordion pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",