@y14e/disclosure 1.2.6 → 1.2.7

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/dist/index.cjs CHANGED
@@ -159,7 +159,10 @@ var Disclosure = class _Disclosure {
159
159
  this.#toggle(details, !details.hasAttribute("data-disclosure-open"));
160
160
  };
161
161
  #onSummaryKeyDown = (event) => {
162
- const { key } = event;
162
+ const { key, altKey, ctrlKey, metaKey, shiftKey } = event;
163
+ if (altKey || ctrlKey || metaKey || shiftKey) {
164
+ return;
165
+ }
163
166
  if (!["End", "Home", "ArrowUp", "ArrowDown"].includes(key)) {
164
167
  return;
165
168
  }
@@ -299,7 +302,7 @@ function waitAnimationFinish(animation) {
299
302
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
300
303
  * Using the <details> and <summary> element.
301
304
  *
302
- * @version 1.2.6
305
+ * @version 1.2.7
303
306
  * @author Yusuke Kamiyamane
304
307
  * @license MIT
305
308
  * @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.2.6
6
+ * @version 1.2.7
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
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.2.6
6
+ * @version 1.2.7
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -157,7 +157,10 @@ var Disclosure = class _Disclosure {
157
157
  this.#toggle(details, !details.hasAttribute("data-disclosure-open"));
158
158
  };
159
159
  #onSummaryKeyDown = (event) => {
160
- const { key } = event;
160
+ const { key, altKey, ctrlKey, metaKey, shiftKey } = event;
161
+ if (altKey || ctrlKey || metaKey || shiftKey) {
162
+ return;
163
+ }
161
164
  if (!["End", "Home", "ArrowUp", "ArrowDown"].includes(key)) {
162
165
  return;
163
166
  }
@@ -297,7 +300,7 @@ function waitAnimationFinish(animation) {
297
300
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
298
301
  * Using the <details> and <summary> element.
299
302
  *
300
- * @version 1.2.6
303
+ * @version 1.2.7
301
304
  * @author Yusuke Kamiyamane
302
305
  * @license MIT
303
306
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",