@y14e/disclosure-css 1.2.3 → 1.2.4

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
@@ -1,4 +1,4 @@
1
- # Disclosure (CSS)
1
+ # Disclosure (CSS Animation)
2
2
 
3
3
  WAI-ARIA compliant [disclosure](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/) pattern implementation in TypeScript. Using the `<details>` and `<summary>` element.
4
4
 
package/dist/index.cjs CHANGED
@@ -112,13 +112,12 @@ var Disclosure = class {
112
112
  if (!["End", "Home", "ArrowUp", "ArrowDown"].includes(key)) {
113
113
  return;
114
114
  }
115
- event.preventDefault();
116
- event.stopPropagation();
117
115
  const focusables = this.#summaryElements.filter(isFocusable);
118
116
  const active = getActiveElement();
119
117
  if (!(active instanceof HTMLElement)) {
120
118
  return;
121
119
  }
120
+ event.preventDefault();
122
121
  const currentIndex = focusables.indexOf(active);
123
122
  let newIndex = currentIndex;
124
123
  switch (key) {
@@ -157,11 +156,11 @@ function isFocusable(element) {
157
156
  return element.tabIndex >= 0;
158
157
  }
159
158
  /**
160
- * Disclosure (CSS)
159
+ * Disclosure (CSS Animation)
161
160
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
162
161
  * Using the <details> and <summary> element.
163
162
  *
164
- * @version 1.2.3
163
+ * @version 1.2.4
165
164
  * @author Yusuke Kamiyamane
166
165
  * @license MIT
167
166
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Disclosure (CSS)
2
+ * Disclosure (CSS Animation)
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.2.3
6
+ * @version 1.2.4
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Disclosure (CSS)
2
+ * Disclosure (CSS Animation)
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.2.3
6
+ * @version 1.2.4
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -110,13 +110,12 @@ var Disclosure = class {
110
110
  if (!["End", "Home", "ArrowUp", "ArrowDown"].includes(key)) {
111
111
  return;
112
112
  }
113
- event.preventDefault();
114
- event.stopPropagation();
115
113
  const focusables = this.#summaryElements.filter(isFocusable);
116
114
  const active = getActiveElement();
117
115
  if (!(active instanceof HTMLElement)) {
118
116
  return;
119
117
  }
118
+ event.preventDefault();
120
119
  const currentIndex = focusables.indexOf(active);
121
120
  let newIndex = currentIndex;
122
121
  switch (key) {
@@ -155,11 +154,11 @@ function isFocusable(element) {
155
154
  return element.tabIndex >= 0;
156
155
  }
157
156
  /**
158
- * Disclosure (CSS)
157
+ * Disclosure (CSS Animation)
159
158
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
160
159
  * Using the <details> and <summary> element.
161
160
  *
162
- * @version 1.2.3
161
+ * @version 1.2.4
163
162
  * @author Yusuke Kamiyamane
164
163
  * @license MIT
165
164
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure-css",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",