@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 +4 -4
- package/dist/index.cjs +5 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -7
- package/package.json +1 -1
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
866
|
-
|
|
867
|
-
|
|
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.
|
|
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
package/dist/index.d.ts
CHANGED
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
|
-
|
|
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
|
-
|
|
864
|
-
|
|
865
|
-
|
|
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.
|
|
893
|
+
* @version 1.4.4
|
|
896
894
|
* @author Yusuke Kamiyamane
|
|
897
895
|
* @license MIT
|
|
898
896
|
* @copyright Copyright (c) Yusuke Kamiyamane
|