@y14e/disclosure-css 1.3.12 → 2.0.0

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
@@ -10,14 +10,14 @@ npm i @y14e/disclosure-css
10
10
 
11
11
  ```ts
12
12
  // npm
13
- import Disclosure from '@y14e/disclosure-css@1.3.12';
13
+ import Disclosure from '@y14e/disclosure-css';
14
14
 
15
15
  // CDNs
16
- import Disclosure from 'https://esm.sh/@y14e/disclosure-css@1.3.12';
16
+ import Disclosure from 'https://esm.sh/@y14e/disclosure-css@2.0.0';
17
17
  // or
18
- import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@1.3.12/+esm';
18
+ import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@2.0.0/+esm';
19
19
  // or
20
- import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure-css@1.3.12';
20
+ import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure-css@2.0.0';
21
21
  ```
22
22
 
23
23
  ## Usage
@@ -30,10 +30,10 @@ new Disclosure(root);
30
30
 
31
31
  ## 📦 APIs
32
32
 
33
- ### `close`
33
+ ### `collapse`
34
34
 
35
35
  ```ts
36
- disclosure.close(details);
36
+ disclosure.collapse(details);
37
37
  // => void
38
38
  //
39
39
  // details: HTMLDetailsElement
@@ -48,10 +48,10 @@ disclosure.destroy();
48
48
  // => void
49
49
  ```
50
50
 
51
- ### `open`
51
+ ### `expand`
52
52
 
53
53
  ```ts
54
- disclosure.open(details);
54
+ disclosure.expand(details);
55
55
  // => void
56
56
  //
57
57
  // details: HTMLDetailsElement
@@ -353,13 +353,7 @@ var RovingTabIndex = class _RovingTabIndex {
353
353
  console.warn("Invalid wrap option. Fallback: false.");
354
354
  wrap = false;
355
355
  }
356
- this.#settings = {
357
- navigationOnly,
358
- noMemory,
359
- noStart,
360
- typeahead,
361
- wrap
362
- };
356
+ this.#settings = { navigationOnly, noMemory, noStart, typeahead, wrap };
363
357
  direction && Object.assign(this.#settings, { direction });
364
358
  selector && Object.assign(this.#settings, { selector });
365
359
  this.#selectorFilter = this.#createSelectorFilter();
@@ -592,7 +586,7 @@ var Disclosure = class {
592
586
  });
593
587
  this.#initialize();
594
588
  }
595
- close(details) {
589
+ collapse(details) {
596
590
  if (this.#isDestroyed) {
597
591
  return;
598
592
  }
@@ -615,7 +609,7 @@ var Disclosure = class {
615
609
  this.#contentElements.length = 0;
616
610
  this.#rootElement.removeAttribute("data-disclosure-initialized");
617
611
  }
618
- open(details) {
612
+ expand(details) {
619
613
  if (this.#isDestroyed) {
620
614
  return;
621
615
  }
@@ -644,9 +638,9 @@ var Disclosure = class {
644
638
  });
645
639
  this.#rootElement.setAttribute("data-disclosure-initialized", "");
646
640
  }
647
- #toggle(details, isOpen) {
648
- if (details.open !== isOpen) {
649
- details.open = isOpen;
641
+ #toggle(details, isExpand) {
642
+ if (details.open !== isExpand) {
643
+ details.open = isExpand;
650
644
  }
651
645
  }
652
646
  #createBinding(details, summary, content) {
@@ -661,7 +655,7 @@ var Disclosure = class {
661
655
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
662
656
  * Using the <details> and <summary> element.
663
657
  *
664
- * @version 1.3.12
658
+ * @version 2.0.0
665
659
  * @author Yusuke Kamiyamane
666
660
  * @license MIT
667
661
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -686,7 +680,7 @@ power-focusable/dist/index.js:
686
680
  * High-precision focus management utility with full composed tree support.
687
681
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
688
682
  *
689
- * @version 4.3.5
683
+ * @version 4.3.6
690
684
  * @author Yusuke Kamiyamane
691
685
  * @license MIT
692
686
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -699,7 +693,7 @@ power-focusable/dist/index.js:
699
693
  * Lightweight roving tabindex utility with fully focus management.
700
694
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
701
695
  *
702
- * @version 3.1.2
696
+ * @version 3.1.3
703
697
  * @author Yusuke Kamiyamane
704
698
  * @license MIT
705
699
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -351,13 +351,7 @@ var RovingTabIndex = class _RovingTabIndex {
351
351
  console.warn("Invalid wrap option. Fallback: false.");
352
352
  wrap = false;
353
353
  }
354
- this.#settings = {
355
- navigationOnly,
356
- noMemory,
357
- noStart,
358
- typeahead,
359
- wrap
360
- };
354
+ this.#settings = { navigationOnly, noMemory, noStart, typeahead, wrap };
361
355
  direction && Object.assign(this.#settings, { direction });
362
356
  selector && Object.assign(this.#settings, { selector });
363
357
  this.#selectorFilter = this.#createSelectorFilter();
@@ -590,7 +584,7 @@ var Disclosure = class {
590
584
  });
591
585
  this.#initialize();
592
586
  }
593
- close(details) {
587
+ collapse(details) {
594
588
  if (this.#isDestroyed) {
595
589
  return;
596
590
  }
@@ -613,7 +607,7 @@ var Disclosure = class {
613
607
  this.#contentElements.length = 0;
614
608
  this.#rootElement.removeAttribute("data-disclosure-initialized");
615
609
  }
616
- open(details) {
610
+ expand(details) {
617
611
  if (this.#isDestroyed) {
618
612
  return;
619
613
  }
@@ -642,9 +636,9 @@ var Disclosure = class {
642
636
  });
643
637
  this.#rootElement.setAttribute("data-disclosure-initialized", "");
644
638
  }
645
- #toggle(details, isOpen) {
646
- if (details.open !== isOpen) {
647
- details.open = isOpen;
639
+ #toggle(details, isExpand) {
640
+ if (details.open !== isExpand) {
641
+ details.open = isExpand;
648
642
  }
649
643
  }
650
644
  #createBinding(details, summary, content) {
@@ -659,7 +653,7 @@ var Disclosure = class {
659
653
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
660
654
  * Using the <details> and <summary> element.
661
655
  *
662
- * @version 1.3.12
656
+ * @version 2.0.0
663
657
  * @author Yusuke Kamiyamane
664
658
  * @license MIT
665
659
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -684,7 +678,7 @@ power-focusable/dist/index.js:
684
678
  * High-precision focus management utility with full composed tree support.
685
679
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
686
680
  *
687
- * @version 4.3.5
681
+ * @version 4.3.6
688
682
  * @author Yusuke Kamiyamane
689
683
  * @license MIT
690
684
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -697,7 +691,7 @@ power-focusable/dist/index.js:
697
691
  * Lightweight roving tabindex utility with fully focus management.
698
692
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
699
693
  *
700
- * @version 3.1.2
694
+ * @version 3.1.3
701
695
  * @author Yusuke Kamiyamane
702
696
  * @license MIT
703
697
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.cjs CHANGED
@@ -62,7 +62,7 @@ var Disclosure = class {
62
62
  });
63
63
  this.#initialize();
64
64
  }
65
- close(details) {
65
+ collapse(details) {
66
66
  if (this.#isDestroyed) {
67
67
  return;
68
68
  }
@@ -85,7 +85,7 @@ var Disclosure = class {
85
85
  this.#contentElements.length = 0;
86
86
  this.#rootElement.removeAttribute("data-disclosure-initialized");
87
87
  }
88
- open(details) {
88
+ expand(details) {
89
89
  if (this.#isDestroyed) {
90
90
  return;
91
91
  }
@@ -114,9 +114,9 @@ var Disclosure = class {
114
114
  });
115
115
  this.#rootElement.setAttribute("data-disclosure-initialized", "");
116
116
  }
117
- #toggle(details, isOpen) {
118
- if (details.open !== isOpen) {
119
- details.open = isOpen;
117
+ #toggle(details, isExpand) {
118
+ if (details.open !== isExpand) {
119
+ details.open = isExpand;
120
120
  }
121
121
  }
122
122
  #createBinding(details, summary, content) {
@@ -131,7 +131,7 @@ var Disclosure = class {
131
131
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
132
132
  * Using the <details> and <summary> element.
133
133
  *
134
- * @version 1.3.12
134
+ * @version 2.0.0
135
135
  * @author Yusuke Kamiyamane
136
136
  * @license MIT
137
137
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.3.12
6
+ * @version 2.0.0
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -12,9 +12,9 @@
12
12
  declare class Disclosure {
13
13
  #private;
14
14
  constructor(root: HTMLElement);
15
- close(details: HTMLDetailsElement): void;
15
+ collapse(details: HTMLDetailsElement): void;
16
16
  destroy(): void;
17
- open(details: HTMLDetailsElement): void;
17
+ expand(details: HTMLDetailsElement): void;
18
18
  }
19
19
 
20
20
  export { Disclosure as default };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.3.12
6
+ * @version 2.0.0
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -12,9 +12,9 @@
12
12
  declare class Disclosure {
13
13
  #private;
14
14
  constructor(root: HTMLElement);
15
- close(details: HTMLDetailsElement): void;
15
+ collapse(details: HTMLDetailsElement): void;
16
16
  destroy(): void;
17
- open(details: HTMLDetailsElement): void;
17
+ expand(details: HTMLDetailsElement): void;
18
18
  }
19
19
 
20
20
  export { Disclosure as default };
package/dist/index.js CHANGED
@@ -60,7 +60,7 @@ var Disclosure = class {
60
60
  });
61
61
  this.#initialize();
62
62
  }
63
- close(details) {
63
+ collapse(details) {
64
64
  if (this.#isDestroyed) {
65
65
  return;
66
66
  }
@@ -83,7 +83,7 @@ var Disclosure = class {
83
83
  this.#contentElements.length = 0;
84
84
  this.#rootElement.removeAttribute("data-disclosure-initialized");
85
85
  }
86
- open(details) {
86
+ expand(details) {
87
87
  if (this.#isDestroyed) {
88
88
  return;
89
89
  }
@@ -112,9 +112,9 @@ var Disclosure = class {
112
112
  });
113
113
  this.#rootElement.setAttribute("data-disclosure-initialized", "");
114
114
  }
115
- #toggle(details, isOpen) {
116
- if (details.open !== isOpen) {
117
- details.open = isOpen;
115
+ #toggle(details, isExpand) {
116
+ if (details.open !== isExpand) {
117
+ details.open = isExpand;
118
118
  }
119
119
  }
120
120
  #createBinding(details, summary, content) {
@@ -129,7 +129,7 @@ var Disclosure = class {
129
129
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
130
130
  * Using the <details> and <summary> element.
131
131
  *
132
- * @version 1.3.12
132
+ * @version 2.0.0
133
133
  * @author Yusuke Kamiyamane
134
134
  * @license MIT
135
135
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure-css",
3
- "version": "1.3.12",
3
+ "version": "2.0.0",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -52,6 +52,6 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@y14e/attributes-utils": "^1.1.2",
55
- "@y14e/roving-tabindex": "^3.1.2"
55
+ "@y14e/roving-tabindex": "^3.1.3"
56
56
  }
57
57
  }