@y14e/accordion 2.0.11 → 2.0.12

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 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.11";
16
+ import { Accordion } from "https://esm.sh/@y14e/accordion@2.0.12";
17
17
  // or
18
- import { Accordion } from "https://cdn.jsdelivr.net/npm/@y14e/accordion@2.0.11/+esm";
18
+ import { Accordion } from "https://cdn.jsdelivr.net/npm/@y14e/accordion@2.0.12/+esm";
19
19
  // or
20
- import { Accordion } from "https://esm.unpkg.com/@y14e/accordion@2.0.11";
20
+ import { Accordion } from "https://esm.unpkg.com/@y14e/accordion@2.0.12";
21
21
  ```
22
22
 
23
23
  ## Usage
@@ -661,8 +661,8 @@ var Accordion = class _Accordion {
661
661
  return;
662
662
  }
663
663
  this.#rootElement = root;
664
- this.#defaults = this.#mergeOptions(this.#defaults, _Accordion.defaults);
665
- this.#settings = this.#mergeOptions(this.#defaults, options);
664
+ this.#defaults = this.#resolveOptions(this.#defaults, _Accordion.defaults);
665
+ this.#settings = this.#resolveOptions(this.#defaults, options);
666
666
  matchMedia("(prefers-reduced-motion: reduce)").matches && Object.assign(this.#settings.animation, { duration: 0 });
667
667
  const { trigger, content } = this.#settings.selector;
668
668
  const NOT_NESTED = `:not(:scope ${content} *)`;
@@ -886,7 +886,7 @@ var Accordion = class _Accordion {
886
886
  #isFocusable(element) {
887
887
  return !element.hasAttribute("disabled") && element.tabIndex >= 0;
888
888
  }
889
- #mergeOptions(target, source) {
889
+ #resolveOptions(target, source) {
890
890
  const merged = {
891
891
  ...target,
892
892
  ...source,
@@ -951,7 +951,7 @@ function waitAnimationFinish(animation) {
951
951
  * Accordion
952
952
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
953
953
  *
954
- * @version 2.0.11
954
+ * @version 2.0.12
955
955
  * @author Yusuke Kamiyamane
956
956
  * @license MIT
957
957
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -659,8 +659,8 @@ var Accordion = class _Accordion {
659
659
  return;
660
660
  }
661
661
  this.#rootElement = root;
662
- this.#defaults = this.#mergeOptions(this.#defaults, _Accordion.defaults);
663
- this.#settings = this.#mergeOptions(this.#defaults, options);
662
+ this.#defaults = this.#resolveOptions(this.#defaults, _Accordion.defaults);
663
+ this.#settings = this.#resolveOptions(this.#defaults, options);
664
664
  matchMedia("(prefers-reduced-motion: reduce)").matches && Object.assign(this.#settings.animation, { duration: 0 });
665
665
  const { trigger, content } = this.#settings.selector;
666
666
  const NOT_NESTED = `:not(:scope ${content} *)`;
@@ -884,7 +884,7 @@ var Accordion = class _Accordion {
884
884
  #isFocusable(element) {
885
885
  return !element.hasAttribute("disabled") && element.tabIndex >= 0;
886
886
  }
887
- #mergeOptions(target, source) {
887
+ #resolveOptions(target, source) {
888
888
  const merged = {
889
889
  ...target,
890
890
  ...source,
@@ -949,7 +949,7 @@ function waitAnimationFinish(animation) {
949
949
  * Accordion
950
950
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
951
951
  *
952
- * @version 2.0.11
952
+ * @version 2.0.12
953
953
  * @author Yusuke Kamiyamane
954
954
  * @license MIT
955
955
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.cjs CHANGED
@@ -57,8 +57,8 @@ var Accordion = class _Accordion {
57
57
  return;
58
58
  }
59
59
  this.#rootElement = root;
60
- this.#defaults = this.#mergeOptions(this.#defaults, _Accordion.defaults);
61
- this.#settings = this.#mergeOptions(this.#defaults, options);
60
+ this.#defaults = this.#resolveOptions(this.#defaults, _Accordion.defaults);
61
+ this.#settings = this.#resolveOptions(this.#defaults, options);
62
62
  matchMedia("(prefers-reduced-motion: reduce)").matches && Object.assign(this.#settings.animation, { duration: 0 });
63
63
  const { trigger, content } = this.#settings.selector;
64
64
  const NOT_NESTED = `:not(:scope ${content} *)`;
@@ -282,7 +282,7 @@ var Accordion = class _Accordion {
282
282
  #isFocusable(element) {
283
283
  return !element.hasAttribute("disabled") && element.tabIndex >= 0;
284
284
  }
285
- #mergeOptions(target, source) {
285
+ #resolveOptions(target, source) {
286
286
  const merged = {
287
287
  ...target,
288
288
  ...source,
@@ -347,7 +347,7 @@ function waitAnimationFinish(animation) {
347
347
  * Accordion
348
348
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
349
349
  *
350
- * @version 2.0.11
350
+ * @version 2.0.12
351
351
  * @author Yusuke Kamiyamane
352
352
  * @license MIT
353
353
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Accordion
3
3
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
4
4
  *
5
- * @version 2.0.11
5
+ * @version 2.0.12
6
6
  * @author Yusuke Kamiyamane
7
7
  * @license MIT
8
8
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Accordion
3
3
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
4
4
  *
5
- * @version 2.0.11
5
+ * @version 2.0.12
6
6
  * @author Yusuke Kamiyamane
7
7
  * @license MIT
8
8
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -35,8 +35,8 @@ var Accordion = class _Accordion {
35
35
  return;
36
36
  }
37
37
  this.#rootElement = root;
38
- this.#defaults = this.#mergeOptions(this.#defaults, _Accordion.defaults);
39
- this.#settings = this.#mergeOptions(this.#defaults, options);
38
+ this.#defaults = this.#resolveOptions(this.#defaults, _Accordion.defaults);
39
+ this.#settings = this.#resolveOptions(this.#defaults, options);
40
40
  matchMedia("(prefers-reduced-motion: reduce)").matches && Object.assign(this.#settings.animation, { duration: 0 });
41
41
  const { trigger, content } = this.#settings.selector;
42
42
  const NOT_NESTED = `:not(:scope ${content} *)`;
@@ -260,7 +260,7 @@ var Accordion = class _Accordion {
260
260
  #isFocusable(element) {
261
261
  return !element.hasAttribute("disabled") && element.tabIndex >= 0;
262
262
  }
263
- #mergeOptions(target, source) {
263
+ #resolveOptions(target, source) {
264
264
  const merged = {
265
265
  ...target,
266
266
  ...source,
@@ -325,7 +325,7 @@ function waitAnimationFinish(animation) {
325
325
  * Accordion
326
326
  * WAI-ARIA compliant accordion pattern implementation in TypeScript.
327
327
  *
328
- * @version 2.0.11
328
+ * @version 2.0.12
329
329
  * @author Yusuke Kamiyamane
330
330
  * @license MIT
331
331
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/accordion",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "WAI-ARIA compliant accordion pattern implementation in TypeScript",
5
5
  "keywords": [
6
6
  "a11y",