@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 +4 -4
- package/dist/index.cjs +7 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -6
- package/package.json +1 -1
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
659
|
-
|
|
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
|
-
|
|
789
|
-
|
|
790
|
-
|
|
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.
|
|
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
package/dist/index.d.ts
CHANGED
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
|
-
|
|
657
|
-
|
|
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
|
-
|
|
787
|
-
|
|
788
|
-
|
|
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.
|
|
820
|
+
* @version 1.3.7
|
|
820
821
|
* @author Yusuke Kamiyamane
|
|
821
822
|
* @license MIT
|
|
822
823
|
* @copyright Copyright (c) Yusuke Kamiyamane
|