@khanacademy/wonder-blocks-core 12.4.2 → 12.4.3
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/CHANGELOG.md +6 -0
- package/dist/es/index.js +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -37,4 +37,6 @@ const{useEffect,useState,useContext}=React;const RenderStateRoot=({children,thro
|
|
|
37
37
|
|
|
38
38
|
const keys={enter:"Enter",escape:"Escape",tab:"Tab",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End"};
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
const FOCUSABLE_ELEMENTS='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function findFocusableNodes(root){return Array.from(root.querySelectorAll(FOCUSABLE_ELEMENTS))}
|
|
41
|
+
|
|
42
|
+
export { Id, InitialFallback, RenderState, RenderStateRoot, Server, Text, View, addStyle, findFocusableNodes, keys, useForceUpdate, useIsMounted, useLatestRef, useOnMountEffect, useOnline, usePreHydrationEffect, useRenderState };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,3 +16,4 @@ export { RenderState } from "./components/render-state-context";
|
|
|
16
16
|
export type { AriaRole, AriaAttributes } from "./util/aria-types";
|
|
17
17
|
export type { AriaProps, StyleType, PropsFor } from "./util/types";
|
|
18
18
|
export { keys } from "./util/keys";
|
|
19
|
+
export { findFocusableNodes } from "./util/focus";
|
package/dist/index.js
CHANGED
|
@@ -60,6 +60,8 @@ const{useEffect,useState,useContext}=React__namespace;const RenderStateRoot=({ch
|
|
|
60
60
|
|
|
61
61
|
const keys={enter:"Enter",escape:"Escape",tab:"Tab",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End"};
|
|
62
62
|
|
|
63
|
+
const FOCUSABLE_ELEMENTS='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function findFocusableNodes(root){return Array.from(root.querySelectorAll(FOCUSABLE_ELEMENTS))}
|
|
64
|
+
|
|
63
65
|
exports.Id = Id;
|
|
64
66
|
exports.InitialFallback = InitialFallback;
|
|
65
67
|
exports.RenderState = RenderState;
|
|
@@ -68,6 +70,7 @@ exports.Server = Server;
|
|
|
68
70
|
exports.Text = Text;
|
|
69
71
|
exports.View = View;
|
|
70
72
|
exports.addStyle = addStyle;
|
|
73
|
+
exports.findFocusableNodes = findFocusableNodes;
|
|
71
74
|
exports.keys = keys;
|
|
72
75
|
exports.useForceUpdate = useForceUpdate;
|
|
73
76
|
exports.useIsMounted = useIsMounted;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "12.4.
|
|
6
|
+
"version": "12.4.3",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"react-router-dom-v5-compat": "^6.30.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@khanacademy/wb-dev-build-settings": "3.
|
|
33
|
-
"@khanacademy/wonder-blocks-testing-core": "
|
|
32
|
+
"@khanacademy/wb-dev-build-settings": "3.3.0",
|
|
33
|
+
"@khanacademy/wonder-blocks-testing-core": "5.0.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"test": "echo \"Error: no test specified\" && exit 1"
|