@y14e/disclosure 2.0.12 → 2.0.13
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 -3
- package/dist/index.bundle.cjs +4 -3
- package/dist/index.bundle.js +4 -3
- package/dist/index.cjs +4 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- 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.13";
|
|
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.13/+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.13";
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -879,7 +879,8 @@ var Disclosure = class _Disclosure {
|
|
|
879
879
|
};
|
|
880
880
|
const mergedAnimation = merged.animation;
|
|
881
881
|
const duration = mergedAnimation.duration;
|
|
882
|
-
const
|
|
882
|
+
const defaults = this.#defaults;
|
|
883
|
+
const defaultAnimation = defaults.animation;
|
|
883
884
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
884
885
|
const duration2 = defaultAnimation.duration;
|
|
885
886
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
@@ -895,7 +896,7 @@ var Disclosure = class _Disclosure {
|
|
|
895
896
|
mergedAnimation.easing = easing;
|
|
896
897
|
}
|
|
897
898
|
if (typeof merged.collapsible !== "boolean") {
|
|
898
|
-
const collapsible =
|
|
899
|
+
const collapsible = defaults.collapsible;
|
|
899
900
|
console.warn(`Invalid collapsible option. Fallback: ${collapsible}.`);
|
|
900
901
|
merged.collapsible = collapsible;
|
|
901
902
|
}
|
|
@@ -920,7 +921,7 @@ function waitAnimationFinish(animation) {
|
|
|
920
921
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
921
922
|
* Using the <details> and <summary> element.
|
|
922
923
|
*
|
|
923
|
-
* @version 2.0.
|
|
924
|
+
* @version 2.0.13
|
|
924
925
|
* @author Yusuke Kamiyamane
|
|
925
926
|
* @license MIT
|
|
926
927
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -877,7 +877,8 @@ var Disclosure = class _Disclosure {
|
|
|
877
877
|
};
|
|
878
878
|
const mergedAnimation = merged.animation;
|
|
879
879
|
const duration = mergedAnimation.duration;
|
|
880
|
-
const
|
|
880
|
+
const defaults = this.#defaults;
|
|
881
|
+
const defaultAnimation = defaults.animation;
|
|
881
882
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
882
883
|
const duration2 = defaultAnimation.duration;
|
|
883
884
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
@@ -893,7 +894,7 @@ var Disclosure = class _Disclosure {
|
|
|
893
894
|
mergedAnimation.easing = easing;
|
|
894
895
|
}
|
|
895
896
|
if (typeof merged.collapsible !== "boolean") {
|
|
896
|
-
const collapsible =
|
|
897
|
+
const collapsible = defaults.collapsible;
|
|
897
898
|
console.warn(`Invalid collapsible option. Fallback: ${collapsible}.`);
|
|
898
899
|
merged.collapsible = collapsible;
|
|
899
900
|
}
|
|
@@ -918,7 +919,7 @@ function waitAnimationFinish(animation) {
|
|
|
918
919
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
919
920
|
* Using the <details> and <summary> element.
|
|
920
921
|
*
|
|
921
|
-
* @version 2.0.
|
|
922
|
+
* @version 2.0.13
|
|
922
923
|
* @author Yusuke Kamiyamane
|
|
923
924
|
* @license MIT
|
|
924
925
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -285,7 +285,8 @@ var Disclosure = class _Disclosure {
|
|
|
285
285
|
};
|
|
286
286
|
const mergedAnimation = merged.animation;
|
|
287
287
|
const duration = mergedAnimation.duration;
|
|
288
|
-
const
|
|
288
|
+
const defaults = this.#defaults;
|
|
289
|
+
const defaultAnimation = defaults.animation;
|
|
289
290
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
290
291
|
const duration2 = defaultAnimation.duration;
|
|
291
292
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
@@ -301,7 +302,7 @@ var Disclosure = class _Disclosure {
|
|
|
301
302
|
mergedAnimation.easing = easing;
|
|
302
303
|
}
|
|
303
304
|
if (typeof merged.collapsible !== "boolean") {
|
|
304
|
-
const collapsible =
|
|
305
|
+
const collapsible = defaults.collapsible;
|
|
305
306
|
console.warn(`Invalid collapsible option. Fallback: ${collapsible}.`);
|
|
306
307
|
merged.collapsible = collapsible;
|
|
307
308
|
}
|
|
@@ -326,7 +327,7 @@ function waitAnimationFinish(animation) {
|
|
|
326
327
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
327
328
|
* Using the <details> and <summary> element.
|
|
328
329
|
*
|
|
329
|
-
* @version 2.0.
|
|
330
|
+
* @version 2.0.13
|
|
330
331
|
* @author Yusuke Kamiyamane
|
|
331
332
|
* @license MIT
|
|
332
333
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -263,7 +263,8 @@ var Disclosure = class _Disclosure {
|
|
|
263
263
|
};
|
|
264
264
|
const mergedAnimation = merged.animation;
|
|
265
265
|
const duration = mergedAnimation.duration;
|
|
266
|
-
const
|
|
266
|
+
const defaults = this.#defaults;
|
|
267
|
+
const defaultAnimation = defaults.animation;
|
|
267
268
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
268
269
|
const duration2 = defaultAnimation.duration;
|
|
269
270
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
@@ -279,7 +280,7 @@ var Disclosure = class _Disclosure {
|
|
|
279
280
|
mergedAnimation.easing = easing;
|
|
280
281
|
}
|
|
281
282
|
if (typeof merged.collapsible !== "boolean") {
|
|
282
|
-
const collapsible =
|
|
283
|
+
const collapsible = defaults.collapsible;
|
|
283
284
|
console.warn(`Invalid collapsible option. Fallback: ${collapsible}.`);
|
|
284
285
|
merged.collapsible = collapsible;
|
|
285
286
|
}
|
|
@@ -304,7 +305,7 @@ function waitAnimationFinish(animation) {
|
|
|
304
305
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
305
306
|
* Using the <details> and <summary> element.
|
|
306
307
|
*
|
|
307
|
-
* @version 2.0.
|
|
308
|
+
* @version 2.0.13
|
|
308
309
|
* @author Yusuke Kamiyamane
|
|
309
310
|
* @license MIT
|
|
310
311
|
* @copyright Copyright (c) Yusuke Kamiyamane
|