@jobber/components 8.12.0 → 8.12.1
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/SideDrawer-cjs.js +3 -2
- package/dist/SideDrawer-es.js +3 -2
- package/package.json +2 -2
package/dist/SideDrawer-cjs.js
CHANGED
|
@@ -128,7 +128,7 @@ function SideDrawer({ children, onRequestClose, open, variation = "base", scroll
|
|
|
128
128
|
}, style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container },
|
|
129
129
|
React.createElement("div", { ref: sideDrawerRef, role: "dialog", className: classnames(styles.container, styles.hasShadow, {
|
|
130
130
|
[styles.subtle]: variation === "subtle",
|
|
131
|
-
}), tabIndex: 0,
|
|
131
|
+
}), tabIndex: 0, onKeyDown: handleKeyDown },
|
|
132
132
|
React.createElement("div", { className: classnames(styles.header, {
|
|
133
133
|
[styles.hasShadow]: headerShadowRef.current && !noHeaderShadow,
|
|
134
134
|
}) },
|
|
@@ -153,8 +153,9 @@ function SideDrawer({ children, onRequestClose, open, variation = "base", scroll
|
|
|
153
153
|
return SideDrawerRender;
|
|
154
154
|
}
|
|
155
155
|
return ReactDOM.createPortal(SideDrawerRender, container);
|
|
156
|
-
function
|
|
156
|
+
function handleKeyDown(event) {
|
|
157
157
|
if (event.key === "Escape") {
|
|
158
|
+
event.stopPropagation();
|
|
158
159
|
onRequestClose();
|
|
159
160
|
}
|
|
160
161
|
}
|
package/dist/SideDrawer-es.js
CHANGED
|
@@ -126,7 +126,7 @@ function SideDrawer({ children, onRequestClose, open, variation = "base", scroll
|
|
|
126
126
|
}, style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container },
|
|
127
127
|
React__default.createElement("div", { ref: sideDrawerRef, role: "dialog", className: classnames(styles.container, styles.hasShadow, {
|
|
128
128
|
[styles.subtle]: variation === "subtle",
|
|
129
|
-
}), tabIndex: 0,
|
|
129
|
+
}), tabIndex: 0, onKeyDown: handleKeyDown },
|
|
130
130
|
React__default.createElement("div", { className: classnames(styles.header, {
|
|
131
131
|
[styles.hasShadow]: headerShadowRef.current && !noHeaderShadow,
|
|
132
132
|
}) },
|
|
@@ -151,8 +151,9 @@ function SideDrawer({ children, onRequestClose, open, variation = "base", scroll
|
|
|
151
151
|
return SideDrawerRender;
|
|
152
152
|
}
|
|
153
153
|
return createPortal(SideDrawerRender, container);
|
|
154
|
-
function
|
|
154
|
+
function handleKeyDown(event) {
|
|
155
155
|
if (event.key === "Escape") {
|
|
156
|
+
event.stopPropagation();
|
|
156
157
|
onRequestClose();
|
|
157
158
|
}
|
|
158
159
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -556,5 +556,5 @@
|
|
|
556
556
|
"> 1%",
|
|
557
557
|
"IE 10"
|
|
558
558
|
],
|
|
559
|
-
"gitHead": "
|
|
559
|
+
"gitHead": "80813476ca22f110f6cc3a8bb1838279cd5dac3d"
|
|
560
560
|
}
|