@y14e/disclosure 1.3.13 → 1.3.14
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 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- 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.14';
|
|
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.14';
|
|
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.14/+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.14';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
package/dist/index.cjs
CHANGED
|
@@ -624,11 +624,11 @@ var Disclosure = class _Disclosure {
|
|
|
624
624
|
if (this.#isDestroyed) {
|
|
625
625
|
return;
|
|
626
626
|
}
|
|
627
|
-
if (!(details instanceof HTMLDetailsElement)) {
|
|
627
|
+
if (!(details instanceof HTMLDetailsElement) || !this.#bindings.has(details)) {
|
|
628
628
|
console.warn("Invalid <details> element");
|
|
629
629
|
return;
|
|
630
630
|
}
|
|
631
|
-
this.#
|
|
631
|
+
this.#toggle(details, false);
|
|
632
632
|
}
|
|
633
633
|
async destroy(force = false) {
|
|
634
634
|
if (this.#isDestroyed) {
|
|
@@ -665,11 +665,11 @@ var Disclosure = class _Disclosure {
|
|
|
665
665
|
if (this.#isDestroyed) {
|
|
666
666
|
return;
|
|
667
667
|
}
|
|
668
|
-
if (!(details instanceof HTMLDetailsElement)) {
|
|
668
|
+
if (!(details instanceof HTMLDetailsElement) || !this.#bindings.has(details)) {
|
|
669
669
|
console.warn("Invalid <details> element");
|
|
670
670
|
return;
|
|
671
671
|
}
|
|
672
|
-
this.#
|
|
672
|
+
this.#toggle(details, true);
|
|
673
673
|
}
|
|
674
674
|
#initialize() {
|
|
675
675
|
saveAttributes(this.#summaryElements, [
|
|
@@ -827,7 +827,7 @@ function waitAnimationFinish(animation) {
|
|
|
827
827
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
828
828
|
* Using the <details> and <summary> element.
|
|
829
829
|
*
|
|
830
|
-
* @version 1.3.
|
|
830
|
+
* @version 1.3.14
|
|
831
831
|
* @author Yusuke Kamiyamane
|
|
832
832
|
* @license MIT
|
|
833
833
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -622,11 +622,11 @@ var Disclosure = class _Disclosure {
|
|
|
622
622
|
if (this.#isDestroyed) {
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
|
-
if (!(details instanceof HTMLDetailsElement)) {
|
|
625
|
+
if (!(details instanceof HTMLDetailsElement) || !this.#bindings.has(details)) {
|
|
626
626
|
console.warn("Invalid <details> element");
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
629
|
-
this.#
|
|
629
|
+
this.#toggle(details, false);
|
|
630
630
|
}
|
|
631
631
|
async destroy(force = false) {
|
|
632
632
|
if (this.#isDestroyed) {
|
|
@@ -663,11 +663,11 @@ var Disclosure = class _Disclosure {
|
|
|
663
663
|
if (this.#isDestroyed) {
|
|
664
664
|
return;
|
|
665
665
|
}
|
|
666
|
-
if (!(details instanceof HTMLDetailsElement)) {
|
|
666
|
+
if (!(details instanceof HTMLDetailsElement) || !this.#bindings.has(details)) {
|
|
667
667
|
console.warn("Invalid <details> element");
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
|
-
this.#
|
|
670
|
+
this.#toggle(details, true);
|
|
671
671
|
}
|
|
672
672
|
#initialize() {
|
|
673
673
|
saveAttributes(this.#summaryElements, [
|
|
@@ -825,7 +825,7 @@ function waitAnimationFinish(animation) {
|
|
|
825
825
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
826
826
|
* Using the <details> and <summary> element.
|
|
827
827
|
*
|
|
828
|
-
* @version 1.3.
|
|
828
|
+
* @version 1.3.14
|
|
829
829
|
* @author Yusuke Kamiyamane
|
|
830
830
|
* @license MIT
|
|
831
831
|
* @copyright Copyright (c) Yusuke Kamiyamane
|