@cambly/syntax-core 7.11.0 → 7.12.0
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.d.ts +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1164,7 +1164,7 @@ function Layer({
|
|
|
1164
1164
|
children,
|
|
1165
1165
|
zIndex = 1
|
|
1166
1166
|
}) {
|
|
1167
|
-
return createPortal(
|
|
1167
|
+
return typeof document !== "undefined" ? createPortal(
|
|
1168
1168
|
/* @__PURE__ */ jsx16(
|
|
1169
1169
|
Box_default,
|
|
1170
1170
|
{
|
|
@@ -1177,7 +1177,7 @@ function Layer({
|
|
|
1177
1177
|
}
|
|
1178
1178
|
),
|
|
1179
1179
|
document.body
|
|
1180
|
-
);
|
|
1180
|
+
) : null;
|
|
1181
1181
|
}
|
|
1182
1182
|
|
|
1183
1183
|
// css-module:./Modal.module.css#css-module
|
|
@@ -1492,6 +1492,14 @@ var TapArea = forwardRef6(
|
|
|
1492
1492
|
tabIndex = 0
|
|
1493
1493
|
}, ref) => {
|
|
1494
1494
|
const handleClick = (event) => !disabled ? onClick(event) : void 0;
|
|
1495
|
+
const handleKeyDown = (event) => {
|
|
1496
|
+
if (disabled)
|
|
1497
|
+
return;
|
|
1498
|
+
if (event.key === "Enter" || event.key === " " || event.key === "Space") {
|
|
1499
|
+
event.preventDefault();
|
|
1500
|
+
onClick(event);
|
|
1501
|
+
}
|
|
1502
|
+
};
|
|
1495
1503
|
return /* @__PURE__ */ jsx21(
|
|
1496
1504
|
"div",
|
|
1497
1505
|
{
|
|
@@ -1505,6 +1513,7 @@ var TapArea = forwardRef6(
|
|
|
1505
1513
|
),
|
|
1506
1514
|
"data-testid": dataTestId,
|
|
1507
1515
|
onClick: handleClick,
|
|
1516
|
+
onKeyDown: handleKeyDown,
|
|
1508
1517
|
ref,
|
|
1509
1518
|
role: "button",
|
|
1510
1519
|
tabIndex: disabled ? void 0 : tabIndex,
|