@uxf/core-react 11.42.0 → 11.45.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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports._useSimulatedButton = _useSimulatedButton;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function _useSimulatedButton({ analyticsCallback, isClickable, isHyperlink, onClick, onKeyDown, onKeyUp, isSubmitType, }) {
|
|
6
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
6
7
|
const _onClick = (0, react_1.useCallback)((e) => {
|
|
7
8
|
var _a;
|
|
8
9
|
if ((isClickable || isHyperlink) && analyticsCallback) {
|
|
@@ -23,6 +24,7 @@ function _useSimulatedButton({ analyticsCallback, isClickable, isHyperlink, onCl
|
|
|
23
24
|
e.preventDefault();
|
|
24
25
|
}
|
|
25
26
|
}, [analyticsCallback, isClickable, isHyperlink, onClick, isSubmitType]);
|
|
27
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
26
28
|
const _onKeyUp = (0, react_1.useCallback)((e) => {
|
|
27
29
|
if (isClickable && (e.key === "Enter" || e.key === " ")) {
|
|
28
30
|
e.target.dispatchEvent(new MouseEvent("click", {
|
|
@@ -36,6 +38,7 @@ function _useSimulatedButton({ analyticsCallback, isClickable, isHyperlink, onCl
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}, [isClickable, onKeyUp]);
|
|
41
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
39
42
|
const _onKeyDown = (0, react_1.useCallback)((e) => {
|
|
40
43
|
if (isClickable && e.key === " ") {
|
|
41
44
|
e.preventDefault();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/core-react",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.45.0",
|
|
4
4
|
"description": "UXF Core",
|
|
5
5
|
"author": "UX Fans s.r.o",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"typecheck": "tsc --noEmit --skipLibCheck"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@uxf/core": "11.
|
|
15
|
+
"@uxf/core": "11.45.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=18.2.0"
|