@y14e/disclosure 2.0.1 → 2.0.2
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 +3 -4
- package/dist/index.bundle.cjs +7 -6
- package/dist/index.bundle.js +7 -6
- 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
|
@@ -13,11 +13,11 @@ npm i @y14e/disclosure
|
|
|
13
13
|
import Disclosure from '@y14e/disclosure';
|
|
14
14
|
|
|
15
15
|
// CDNs
|
|
16
|
-
import Disclosure from 'https://esm.sh/@y14e/disclosure@2.0.
|
|
16
|
+
import Disclosure from 'https://esm.sh/@y14e/disclosure@2.0.2';
|
|
17
17
|
// or
|
|
18
|
-
import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure@2.0.
|
|
18
|
+
import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure@2.0.2/+esm';
|
|
19
19
|
// or
|
|
20
|
-
import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure@2.0.
|
|
20
|
+
import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure@2.0.2';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
@@ -28,7 +28,6 @@ new Disclosure(root, options);
|
|
|
28
28
|
//
|
|
29
29
|
// root: HTMLElement
|
|
30
30
|
// options (optional): DisclosureOptions
|
|
31
|
-
|
|
32
31
|
```
|
|
33
32
|
|
|
34
33
|
## 🪄 Options
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -594,12 +594,13 @@ var Disclosure = class _Disclosure {
|
|
|
594
594
|
this.#detailsElements.forEach((details, i) => {
|
|
595
595
|
const summary = this.#summaryElements[i];
|
|
596
596
|
const content = this.#contentElements[i];
|
|
597
|
-
if (summary
|
|
598
|
-
|
|
599
|
-
this.#bindings.set(details, binding);
|
|
600
|
-
this.#bindings.set(summary, binding);
|
|
601
|
-
this.#bindings.set(content, binding);
|
|
597
|
+
if (!summary || !content) {
|
|
598
|
+
return;
|
|
602
599
|
}
|
|
600
|
+
const binding = this.#createBinding(details, summary, content);
|
|
601
|
+
this.#bindings.set(details, binding);
|
|
602
|
+
this.#bindings.set(summary, binding);
|
|
603
|
+
this.#bindings.set(content, binding);
|
|
603
604
|
});
|
|
604
605
|
this.#initialize();
|
|
605
606
|
}
|
|
@@ -809,7 +810,7 @@ function waitAnimationFinish(animation) {
|
|
|
809
810
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
810
811
|
* Using the <details> and <summary> element.
|
|
811
812
|
*
|
|
812
|
-
* @version 2.0.
|
|
813
|
+
* @version 2.0.2
|
|
813
814
|
* @author Yusuke Kamiyamane
|
|
814
815
|
* @license MIT
|
|
815
816
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -592,12 +592,13 @@ var Disclosure = class _Disclosure {
|
|
|
592
592
|
this.#detailsElements.forEach((details, i) => {
|
|
593
593
|
const summary = this.#summaryElements[i];
|
|
594
594
|
const content = this.#contentElements[i];
|
|
595
|
-
if (summary
|
|
596
|
-
|
|
597
|
-
this.#bindings.set(details, binding);
|
|
598
|
-
this.#bindings.set(summary, binding);
|
|
599
|
-
this.#bindings.set(content, binding);
|
|
595
|
+
if (!summary || !content) {
|
|
596
|
+
return;
|
|
600
597
|
}
|
|
598
|
+
const binding = this.#createBinding(details, summary, content);
|
|
599
|
+
this.#bindings.set(details, binding);
|
|
600
|
+
this.#bindings.set(summary, binding);
|
|
601
|
+
this.#bindings.set(content, binding);
|
|
601
602
|
});
|
|
602
603
|
this.#initialize();
|
|
603
604
|
}
|
|
@@ -807,7 +808,7 @@ function waitAnimationFinish(animation) {
|
|
|
807
808
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
808
809
|
* Using the <details> and <summary> element.
|
|
809
810
|
*
|
|
810
|
-
* @version 2.0.
|
|
811
|
+
* @version 2.0.2
|
|
811
812
|
* @author Yusuke Kamiyamane
|
|
812
813
|
* @license MIT
|
|
813
814
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -67,12 +67,13 @@ var Disclosure = class _Disclosure {
|
|
|
67
67
|
this.#detailsElements.forEach((details, i) => {
|
|
68
68
|
const summary = this.#summaryElements[i];
|
|
69
69
|
const content = this.#contentElements[i];
|
|
70
|
-
if (summary
|
|
71
|
-
|
|
72
|
-
this.#bindings.set(details, binding);
|
|
73
|
-
this.#bindings.set(summary, binding);
|
|
74
|
-
this.#bindings.set(content, binding);
|
|
70
|
+
if (!summary || !content) {
|
|
71
|
+
return;
|
|
75
72
|
}
|
|
73
|
+
const binding = this.#createBinding(details, summary, content);
|
|
74
|
+
this.#bindings.set(details, binding);
|
|
75
|
+
this.#bindings.set(summary, binding);
|
|
76
|
+
this.#bindings.set(content, binding);
|
|
76
77
|
});
|
|
77
78
|
this.#initialize();
|
|
78
79
|
}
|
|
@@ -282,7 +283,7 @@ function waitAnimationFinish(animation) {
|
|
|
282
283
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
283
284
|
* Using the <details> and <summary> element.
|
|
284
285
|
*
|
|
285
|
-
* @version 2.0.
|
|
286
|
+
* @version 2.0.2
|
|
286
287
|
* @author Yusuke Kamiyamane
|
|
287
288
|
* @license MIT
|
|
288
289
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -65,12 +65,13 @@ var Disclosure = class _Disclosure {
|
|
|
65
65
|
this.#detailsElements.forEach((details, i) => {
|
|
66
66
|
const summary = this.#summaryElements[i];
|
|
67
67
|
const content = this.#contentElements[i];
|
|
68
|
-
if (summary
|
|
69
|
-
|
|
70
|
-
this.#bindings.set(details, binding);
|
|
71
|
-
this.#bindings.set(summary, binding);
|
|
72
|
-
this.#bindings.set(content, binding);
|
|
68
|
+
if (!summary || !content) {
|
|
69
|
+
return;
|
|
73
70
|
}
|
|
71
|
+
const binding = this.#createBinding(details, summary, content);
|
|
72
|
+
this.#bindings.set(details, binding);
|
|
73
|
+
this.#bindings.set(summary, binding);
|
|
74
|
+
this.#bindings.set(content, binding);
|
|
74
75
|
});
|
|
75
76
|
this.#initialize();
|
|
76
77
|
}
|
|
@@ -280,7 +281,7 @@ function waitAnimationFinish(animation) {
|
|
|
280
281
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
281
282
|
* Using the <details> and <summary> element.
|
|
282
283
|
*
|
|
283
|
-
* @version 2.0.
|
|
284
|
+
* @version 2.0.2
|
|
284
285
|
* @author Yusuke Kamiyamane
|
|
285
286
|
* @license MIT
|
|
286
287
|
* @copyright Copyright (c) Yusuke Kamiyamane
|