@y14e/accordion 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 +5 -4
- package/dist/index.bundle.js +5 -4
- package/dist/index.cjs +5 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,11 +13,11 @@ npm i @y14e/accordion
|
|
|
13
13
|
import { Accordion } from "@y14e/accordion";
|
|
14
14
|
|
|
15
15
|
// CDNs
|
|
16
|
-
import { Accordion } from "https://esm.sh/@y14e/accordion@2.0.
|
|
16
|
+
import { Accordion } from "https://esm.sh/@y14e/accordion@2.0.13";
|
|
17
17
|
// or
|
|
18
|
-
import { Accordion } from "https://cdn.jsdelivr.net/npm/@y14e/accordion@2.0.
|
|
18
|
+
import { Accordion } from "https://cdn.jsdelivr.net/npm/@y14e/accordion@2.0.13/+esm";
|
|
19
19
|
// or
|
|
20
|
-
import { Accordion } from "https://esm.unpkg.com/@y14e/accordion@2.0.
|
|
20
|
+
import { Accordion } from "https://esm.unpkg.com/@y14e/accordion@2.0.13";
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -895,7 +895,8 @@ var Accordion = class _Accordion {
|
|
|
895
895
|
};
|
|
896
896
|
const mergedAnimation = merged.animation;
|
|
897
897
|
const duration = mergedAnimation.duration;
|
|
898
|
-
const
|
|
898
|
+
const defaults = this.#defaults;
|
|
899
|
+
const defaultAnimation = defaults.animation;
|
|
899
900
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
900
901
|
const duration2 = defaultAnimation.duration;
|
|
901
902
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
@@ -911,12 +912,12 @@ var Accordion = class _Accordion {
|
|
|
911
912
|
mergedAnimation.easing = easing;
|
|
912
913
|
}
|
|
913
914
|
if (typeof merged.collapsible !== "boolean") {
|
|
914
|
-
const collapsible =
|
|
915
|
+
const collapsible = defaults.collapsible;
|
|
915
916
|
console.warn(`Invalid collapsible option. Fallback: ${collapsible}.`);
|
|
916
917
|
merged.collapsible = collapsible;
|
|
917
918
|
}
|
|
918
919
|
const mergedSelector = merged.selector;
|
|
919
|
-
const defaultSelector =
|
|
920
|
+
const defaultSelector = defaults.selector;
|
|
920
921
|
try {
|
|
921
922
|
document.querySelector(mergedSelector.content);
|
|
922
923
|
} catch {
|
|
@@ -951,7 +952,7 @@ function waitAnimationFinish(animation) {
|
|
|
951
952
|
* Accordion
|
|
952
953
|
* WAI-ARIA compliant accordion pattern implementation in TypeScript.
|
|
953
954
|
*
|
|
954
|
-
* @version 2.0.
|
|
955
|
+
* @version 2.0.13
|
|
955
956
|
* @author Yusuke Kamiyamane
|
|
956
957
|
* @license MIT
|
|
957
958
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -893,7 +893,8 @@ var Accordion = class _Accordion {
|
|
|
893
893
|
};
|
|
894
894
|
const mergedAnimation = merged.animation;
|
|
895
895
|
const duration = mergedAnimation.duration;
|
|
896
|
-
const
|
|
896
|
+
const defaults = this.#defaults;
|
|
897
|
+
const defaultAnimation = defaults.animation;
|
|
897
898
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
898
899
|
const duration2 = defaultAnimation.duration;
|
|
899
900
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
@@ -909,12 +910,12 @@ var Accordion = class _Accordion {
|
|
|
909
910
|
mergedAnimation.easing = easing;
|
|
910
911
|
}
|
|
911
912
|
if (typeof merged.collapsible !== "boolean") {
|
|
912
|
-
const collapsible =
|
|
913
|
+
const collapsible = defaults.collapsible;
|
|
913
914
|
console.warn(`Invalid collapsible option. Fallback: ${collapsible}.`);
|
|
914
915
|
merged.collapsible = collapsible;
|
|
915
916
|
}
|
|
916
917
|
const mergedSelector = merged.selector;
|
|
917
|
-
const defaultSelector =
|
|
918
|
+
const defaultSelector = defaults.selector;
|
|
918
919
|
try {
|
|
919
920
|
document.querySelector(mergedSelector.content);
|
|
920
921
|
} catch {
|
|
@@ -949,7 +950,7 @@ function waitAnimationFinish(animation) {
|
|
|
949
950
|
* Accordion
|
|
950
951
|
* WAI-ARIA compliant accordion pattern implementation in TypeScript.
|
|
951
952
|
*
|
|
952
|
-
* @version 2.0.
|
|
953
|
+
* @version 2.0.13
|
|
953
954
|
* @author Yusuke Kamiyamane
|
|
954
955
|
* @license MIT
|
|
955
956
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -291,7 +291,8 @@ var Accordion = class _Accordion {
|
|
|
291
291
|
};
|
|
292
292
|
const mergedAnimation = merged.animation;
|
|
293
293
|
const duration = mergedAnimation.duration;
|
|
294
|
-
const
|
|
294
|
+
const defaults = this.#defaults;
|
|
295
|
+
const defaultAnimation = defaults.animation;
|
|
295
296
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
296
297
|
const duration2 = defaultAnimation.duration;
|
|
297
298
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
@@ -307,12 +308,12 @@ var Accordion = class _Accordion {
|
|
|
307
308
|
mergedAnimation.easing = easing;
|
|
308
309
|
}
|
|
309
310
|
if (typeof merged.collapsible !== "boolean") {
|
|
310
|
-
const collapsible =
|
|
311
|
+
const collapsible = defaults.collapsible;
|
|
311
312
|
console.warn(`Invalid collapsible option. Fallback: ${collapsible}.`);
|
|
312
313
|
merged.collapsible = collapsible;
|
|
313
314
|
}
|
|
314
315
|
const mergedSelector = merged.selector;
|
|
315
|
-
const defaultSelector =
|
|
316
|
+
const defaultSelector = defaults.selector;
|
|
316
317
|
try {
|
|
317
318
|
document.querySelector(mergedSelector.content);
|
|
318
319
|
} catch {
|
|
@@ -347,7 +348,7 @@ function waitAnimationFinish(animation) {
|
|
|
347
348
|
* Accordion
|
|
348
349
|
* WAI-ARIA compliant accordion pattern implementation in TypeScript.
|
|
349
350
|
*
|
|
350
|
-
* @version 2.0.
|
|
351
|
+
* @version 2.0.13
|
|
351
352
|
* @author Yusuke Kamiyamane
|
|
352
353
|
* @license MIT
|
|
353
354
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -269,7 +269,8 @@ var Accordion = class _Accordion {
|
|
|
269
269
|
};
|
|
270
270
|
const mergedAnimation = merged.animation;
|
|
271
271
|
const duration = mergedAnimation.duration;
|
|
272
|
-
const
|
|
272
|
+
const defaults = this.#defaults;
|
|
273
|
+
const defaultAnimation = defaults.animation;
|
|
273
274
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
274
275
|
const duration2 = defaultAnimation.duration;
|
|
275
276
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
@@ -285,12 +286,12 @@ var Accordion = class _Accordion {
|
|
|
285
286
|
mergedAnimation.easing = easing;
|
|
286
287
|
}
|
|
287
288
|
if (typeof merged.collapsible !== "boolean") {
|
|
288
|
-
const collapsible =
|
|
289
|
+
const collapsible = defaults.collapsible;
|
|
289
290
|
console.warn(`Invalid collapsible option. Fallback: ${collapsible}.`);
|
|
290
291
|
merged.collapsible = collapsible;
|
|
291
292
|
}
|
|
292
293
|
const mergedSelector = merged.selector;
|
|
293
|
-
const defaultSelector =
|
|
294
|
+
const defaultSelector = defaults.selector;
|
|
294
295
|
try {
|
|
295
296
|
document.querySelector(mergedSelector.content);
|
|
296
297
|
} catch {
|
|
@@ -325,7 +326,7 @@ function waitAnimationFinish(animation) {
|
|
|
325
326
|
* Accordion
|
|
326
327
|
* WAI-ARIA compliant accordion pattern implementation in TypeScript.
|
|
327
328
|
*
|
|
328
|
-
* @version 2.0.
|
|
329
|
+
* @version 2.0.13
|
|
329
330
|
* @author Yusuke Kamiyamane
|
|
330
331
|
* @license MIT
|
|
331
332
|
* @copyright Copyright (c) Yusuke Kamiyamane
|