@cambly/syntax-core 7.11.0 → 7.11.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/index.d.ts +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -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,
|