@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 +5 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -2
- package/package.json +1 -1
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.
|
|
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
package/dist/index.d.ts
CHANGED
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.
|
|
303
|
+
* @version 1.2.7
|
|
301
304
|
* @author Yusuke Kamiyamane
|
|
302
305
|
* @license MIT
|
|
303
306
|
* @copyright Copyright (c) Yusuke Kamiyamane
|