@y14e/accordion 1.4.5 → 1.4.6

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.5';
13
+ import Accordion from '@y14e/accordion@1.4.6';
14
14
 
15
15
  // CDNs
16
- import Accordion from 'https://esm.sh/@y14e/accordion@1.4.5';
16
+ import Accordion from 'https://esm.sh/@y14e/accordion@1.4.6';
17
17
  // or
18
- import Accordion from 'https://cdn.jsdelivr.net/npm/@y14e/accordion@1.4.5/+esm';
18
+ import Accordion from 'https://cdn.jsdelivr.net/npm/@y14e/accordion@1.4.6/+esm';
19
19
  // or
20
- import Accordion from 'https://esm.unpkg.com/@y14e/accordion@1.4.5';
20
+ import Accordion from 'https://esm.unpkg.com/@y14e/accordion@1.4.6';
21
21
  ```
22
22
 
23
23
  ## Usage
package/dist/index.cjs CHANGED
@@ -749,7 +749,7 @@ var Accordion = class _Accordion {
749
749
  addTokenToAttribute(trigger2, "aria-controls", content2.id);
750
750
  trigger2.setAttribute(
751
751
  "aria-expanded",
752
- trigger2.ariaExpanded === "true" ? "true" : "false"
752
+ String(trigger2.ariaExpanded === "true")
753
753
  );
754
754
  trigger2.id ||= `accordion-trigger-${id}`;
755
755
  if (!isFocusable2(trigger2)) {
@@ -840,6 +840,9 @@ var Accordion = class _Accordion {
840
840
  animation.addEventListener(
841
841
  "finish",
842
842
  () => {
843
+ if (binding?.animation !== animation) {
844
+ return;
845
+ }
843
846
  this.#onAnimationFinish(content);
844
847
  cleanup();
845
848
  },
@@ -892,7 +895,7 @@ function waitAnimationFinish(animation) {
892
895
  * Accordion
893
896
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
894
897
  *
895
- * @version 1.4.5
898
+ * @version 1.4.6
896
899
  * @author Yusuke Kamiyamane
897
900
  * @license MIT
898
901
  * @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.5
5
+ * @version 1.4.6
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.5
5
+ * @version 1.4.6
6
6
  * @author Yusuke Kamiyamane
7
7
  * @license MIT
8
8
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -747,7 +747,7 @@ var Accordion = class _Accordion {
747
747
  addTokenToAttribute(trigger2, "aria-controls", content2.id);
748
748
  trigger2.setAttribute(
749
749
  "aria-expanded",
750
- trigger2.ariaExpanded === "true" ? "true" : "false"
750
+ String(trigger2.ariaExpanded === "true")
751
751
  );
752
752
  trigger2.id ||= `accordion-trigger-${id}`;
753
753
  if (!isFocusable2(trigger2)) {
@@ -838,6 +838,9 @@ var Accordion = class _Accordion {
838
838
  animation.addEventListener(
839
839
  "finish",
840
840
  () => {
841
+ if (binding?.animation !== animation) {
842
+ return;
843
+ }
841
844
  this.#onAnimationFinish(content);
842
845
  cleanup();
843
846
  },
@@ -890,7 +893,7 @@ function waitAnimationFinish(animation) {
890
893
  * Accordion
891
894
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
892
895
  *
893
- * @version 1.4.5
896
+ * @version 1.4.6
894
897
  * @author Yusuke Kamiyamane
895
898
  * @license MIT
896
899
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/accordion",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "WAI-ARIA compliant accordion pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",