@react-aria/interactions 3.0.0-nightly.2699 → 3.0.0-nightly.2707
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/import.mjs +54 -24
- package/dist/main.js +54 -23
- package/dist/main.js.map +1 -1
- package/dist/module.js +54 -24
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +1 -0
- package/src/useFocusVisible.ts +67 -27
package/dist/import.mjs
CHANGED
|
@@ -905,7 +905,7 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
905
905
|
|
|
906
906
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
907
907
|
let $507fabe10e71c6fb$var$changeHandlers = new Set();
|
|
908
|
-
let $507fabe10e71c6fb$
|
|
908
|
+
let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
909
909
|
let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
910
910
|
let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
911
911
|
// Only Tab or Esc keys will make focus visible on text input elements
|
|
@@ -964,39 +964,65 @@ function $507fabe10e71c6fb$var$handleWindowBlur() {
|
|
|
964
964
|
}
|
|
965
965
|
/**
|
|
966
966
|
* Setup global event listeners to control when keyboard focus style should be visible.
|
|
967
|
-
*/ function $507fabe10e71c6fb$var$setupGlobalFocusEvents() {
|
|
968
|
-
if (typeof window === "undefined" || $507fabe10e71c6fb$
|
|
967
|
+
*/ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
|
|
968
|
+
if (typeof window === "undefined" || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $bx7SL$getOwnerWindow)(element))) return;
|
|
969
|
+
const windowObject = (0, $bx7SL$getOwnerWindow)(element);
|
|
970
|
+
const documentObject = (0, $bx7SL$getOwnerDocument)(element);
|
|
969
971
|
// Programmatic focus() calls shouldn't affect the current input modality.
|
|
970
972
|
// However, we need to detect other cases when a focus event occurs without
|
|
971
973
|
// a preceding user event (e.g. screen reader focus). Overriding the focus
|
|
972
974
|
// method on HTMLElement.prototype is a bit hacky, but works.
|
|
973
|
-
let focus = HTMLElement.prototype.focus;
|
|
974
|
-
HTMLElement.prototype.focus = function() {
|
|
975
|
+
let focus = windowObject.HTMLElement.prototype.focus;
|
|
976
|
+
windowObject.HTMLElement.prototype.focus = function() {
|
|
975
977
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
976
978
|
focus.apply(this, arguments);
|
|
977
979
|
};
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
980
|
+
documentObject.addEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
981
|
+
documentObject.addEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
982
|
+
documentObject.addEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
|
|
981
983
|
// Register focus events on the window so they are sure to happen
|
|
982
984
|
// before React's event listeners (registered on the document).
|
|
983
|
-
|
|
984
|
-
|
|
985
|
+
windowObject.addEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
|
|
986
|
+
windowObject.addEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
|
|
985
987
|
if (typeof PointerEvent !== "undefined") {
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
988
|
+
documentObject.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
989
|
+
documentObject.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
990
|
+
documentObject.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
989
991
|
} else {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
992
|
+
documentObject.addEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
993
|
+
documentObject.addEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
994
|
+
documentObject.addEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
993
995
|
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
996
|
+
// Add unmount handler
|
|
997
|
+
windowObject.addEventListener("beforeunload", ()=>{
|
|
998
|
+
documentObject.removeEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
999
|
+
documentObject.removeEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
1000
|
+
documentObject.removeEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
|
|
1001
|
+
windowObject.removeEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
|
|
1002
|
+
windowObject.removeEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
|
|
1003
|
+
if (typeof PointerEvent !== "undefined") {
|
|
1004
|
+
documentObject.removeEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
1005
|
+
documentObject.removeEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
1006
|
+
documentObject.removeEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
1007
|
+
} else {
|
|
1008
|
+
documentObject.removeEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
1009
|
+
documentObject.removeEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
1010
|
+
documentObject.removeEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
1011
|
+
}
|
|
1012
|
+
if ($507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
|
|
1013
|
+
}, {
|
|
1014
|
+
once: true
|
|
1015
|
+
});
|
|
1016
|
+
$507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, true);
|
|
999
1017
|
}
|
|
1018
|
+
const $507fabe10e71c6fb$export$904d5b09c9b06fff = (element)=>{
|
|
1019
|
+
const documentObject = (0, $bx7SL$getOwnerDocument)(element);
|
|
1020
|
+
if (documentObject.readyState !== "loading") $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
|
|
1021
|
+
else documentObject.addEventListener("DOMContentLoaded", ()=>$507fabe10e71c6fb$var$setupGlobalFocusEvents(element));
|
|
1022
|
+
};
|
|
1023
|
+
// Server-side rendering does not have the document object defined
|
|
1024
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1025
|
+
if (typeof document !== "undefined") $507fabe10e71c6fb$export$904d5b09c9b06fff();
|
|
1000
1026
|
function $507fabe10e71c6fb$export$b9b3dfddab17db27() {
|
|
1001
1027
|
return $507fabe10e71c6fb$var$currentModality !== "pointer";
|
|
1002
1028
|
}
|
|
@@ -1037,8 +1063,12 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
|
|
|
1037
1063
|
* focus visible style can be properly set.
|
|
1038
1064
|
*/ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
1039
1065
|
var _e_target;
|
|
1040
|
-
|
|
1041
|
-
|
|
1066
|
+
const IHTMLInputElement = typeof window !== "undefined" ? (0, $bx7SL$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
|
|
1067
|
+
const IHTMLTextAreaElement = typeof window !== "undefined" ? (0, $bx7SL$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
|
|
1068
|
+
const IHTMLElement = typeof window !== "undefined" ? (0, $bx7SL$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
|
|
1069
|
+
const IKeyboardEvent = typeof window !== "undefined" ? (0, $bx7SL$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
|
|
1070
|
+
isTextInput = isTextInput || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(e === null || e === void 0 ? void 0 : (_e_target = e.target) === null || _e_target === void 0 ? void 0 : _e_target.type) || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLTextAreaElement || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLElement && (e === null || e === void 0 ? void 0 : e.target.isContentEditable);
|
|
1071
|
+
return !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
|
|
1042
1072
|
}
|
|
1043
1073
|
function $507fabe10e71c6fb$export$ffd9e5021c1fb2d6(props = {}) {
|
|
1044
1074
|
let { isTextInput: isTextInput, autoFocus: autoFocus } = props;
|
|
@@ -1747,5 +1777,5 @@ function $8a26561d2877236e$export$c24ed0104d07eab9(props) {
|
|
|
1747
1777
|
|
|
1748
1778
|
|
|
1749
1779
|
|
|
1750
|
-
export {$3b117e43dc0ca95d$export$27c701ed9e449e99 as Pressable, $f1ab8c75478c6f73$export$3351871ee4b288b8 as PressResponder, $f1ab8c75478c6f73$export$cf75428e0b9ed1ea as ClearPressResponder, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener, $9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin, $6179b936705e76d3$export$ae780daf29e6d456 as useHover, $e0b6e0b68ec7f50f$export$872b660ac5a1ff98 as useInteractOutside, $46d819fcbaf35654$export$8f71654801c2f7cd as useKeyboard, $e8a7022cf87cba2a$export$36da96379f79f245 as useMove, $f6c31cce2adf654f$export$45712eceda6fad21 as usePress, $7d0a636d7a4dcefd$export$2123ff2b87c81ca as useScrollWheel, $8a26561d2877236e$export$c24ed0104d07eab9 as useLongPress};
|
|
1780
|
+
export {$3b117e43dc0ca95d$export$27c701ed9e449e99 as Pressable, $f1ab8c75478c6f73$export$3351871ee4b288b8 as PressResponder, $f1ab8c75478c6f73$export$cf75428e0b9ed1ea as ClearPressResponder, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$904d5b09c9b06fff as setupFocus, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener, $9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin, $6179b936705e76d3$export$ae780daf29e6d456 as useHover, $e0b6e0b68ec7f50f$export$872b660ac5a1ff98 as useInteractOutside, $46d819fcbaf35654$export$8f71654801c2f7cd as useKeyboard, $e8a7022cf87cba2a$export$36da96379f79f245 as useMove, $f6c31cce2adf654f$export$45712eceda6fad21 as usePress, $7d0a636d7a4dcefd$export$2123ff2b87c81ca as useScrollWheel, $8a26561d2877236e$export$c24ed0104d07eab9 as useLongPress};
|
|
1751
1781
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -21,6 +21,7 @@ $parcel$export(module.exports, "useFocus", () => $5cb73d0ce355b0dc$export$f8168d
|
|
|
21
21
|
$parcel$export(module.exports, "isFocusVisible", () => $e77252a287ef94ab$export$b9b3dfddab17db27);
|
|
22
22
|
$parcel$export(module.exports, "getInteractionModality", () => $e77252a287ef94ab$export$630ff653c5ada6a9);
|
|
23
23
|
$parcel$export(module.exports, "setInteractionModality", () => $e77252a287ef94ab$export$8397ddfc504fdb9a);
|
|
24
|
+
$parcel$export(module.exports, "setupFocus", () => $e77252a287ef94ab$export$904d5b09c9b06fff);
|
|
24
25
|
$parcel$export(module.exports, "useInteractionModality", () => $e77252a287ef94ab$export$98e20ec92f614cfe);
|
|
25
26
|
$parcel$export(module.exports, "useFocusVisible", () => $e77252a287ef94ab$export$ffd9e5021c1fb2d6);
|
|
26
27
|
$parcel$export(module.exports, "useFocusVisibleListener", () => $e77252a287ef94ab$export$ec71b4b83ac08ec3);
|
|
@@ -932,7 +933,7 @@ function $5cb73d0ce355b0dc$export$f8168d8dd8fd66e6(props) {
|
|
|
932
933
|
|
|
933
934
|
let $e77252a287ef94ab$var$currentModality = null;
|
|
934
935
|
let $e77252a287ef94ab$var$changeHandlers = new Set();
|
|
935
|
-
let $e77252a287ef94ab$
|
|
936
|
+
let $e77252a287ef94ab$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
936
937
|
let $e77252a287ef94ab$var$hasEventBeforeFocus = false;
|
|
937
938
|
let $e77252a287ef94ab$var$hasBlurredWindowRecently = false;
|
|
938
939
|
// Only Tab or Esc keys will make focus visible on text input elements
|
|
@@ -991,39 +992,65 @@ function $e77252a287ef94ab$var$handleWindowBlur() {
|
|
|
991
992
|
}
|
|
992
993
|
/**
|
|
993
994
|
* Setup global event listeners to control when keyboard focus style should be visible.
|
|
994
|
-
*/ function $e77252a287ef94ab$var$setupGlobalFocusEvents() {
|
|
995
|
-
if (typeof window === "undefined" || $e77252a287ef94ab$
|
|
995
|
+
*/ function $e77252a287ef94ab$var$setupGlobalFocusEvents(element) {
|
|
996
|
+
if (typeof window === "undefined" || $e77252a287ef94ab$export$d90243b58daecda7.get((0, $goTMa$reactariautils.getOwnerWindow)(element))) return;
|
|
997
|
+
const windowObject = (0, $goTMa$reactariautils.getOwnerWindow)(element);
|
|
998
|
+
const documentObject = (0, $goTMa$reactariautils.getOwnerDocument)(element);
|
|
996
999
|
// Programmatic focus() calls shouldn't affect the current input modality.
|
|
997
1000
|
// However, we need to detect other cases when a focus event occurs without
|
|
998
1001
|
// a preceding user event (e.g. screen reader focus). Overriding the focus
|
|
999
1002
|
// method on HTMLElement.prototype is a bit hacky, but works.
|
|
1000
|
-
let focus = HTMLElement.prototype.focus;
|
|
1001
|
-
HTMLElement.prototype.focus = function() {
|
|
1003
|
+
let focus = windowObject.HTMLElement.prototype.focus;
|
|
1004
|
+
windowObject.HTMLElement.prototype.focus = function() {
|
|
1002
1005
|
$e77252a287ef94ab$var$hasEventBeforeFocus = true;
|
|
1003
1006
|
focus.apply(this, arguments);
|
|
1004
1007
|
};
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
+
documentObject.addEventListener("keydown", $e77252a287ef94ab$var$handleKeyboardEvent, true);
|
|
1009
|
+
documentObject.addEventListener("keyup", $e77252a287ef94ab$var$handleKeyboardEvent, true);
|
|
1010
|
+
documentObject.addEventListener("click", $e77252a287ef94ab$var$handleClickEvent, true);
|
|
1008
1011
|
// Register focus events on the window so they are sure to happen
|
|
1009
1012
|
// before React's event listeners (registered on the document).
|
|
1010
|
-
|
|
1011
|
-
|
|
1013
|
+
windowObject.addEventListener("focus", $e77252a287ef94ab$var$handleFocusEvent, true);
|
|
1014
|
+
windowObject.addEventListener("blur", $e77252a287ef94ab$var$handleWindowBlur, false);
|
|
1012
1015
|
if (typeof PointerEvent !== "undefined") {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
+
documentObject.addEventListener("pointerdown", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1017
|
+
documentObject.addEventListener("pointermove", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1018
|
+
documentObject.addEventListener("pointerup", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1016
1019
|
} else {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
+
documentObject.addEventListener("mousedown", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1021
|
+
documentObject.addEventListener("mousemove", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1022
|
+
documentObject.addEventListener("mouseup", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1020
1023
|
}
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1024
|
+
// Add unmount handler
|
|
1025
|
+
windowObject.addEventListener("beforeunload", ()=>{
|
|
1026
|
+
documentObject.removeEventListener("keydown", $e77252a287ef94ab$var$handleKeyboardEvent, true);
|
|
1027
|
+
documentObject.removeEventListener("keyup", $e77252a287ef94ab$var$handleKeyboardEvent, true);
|
|
1028
|
+
documentObject.removeEventListener("click", $e77252a287ef94ab$var$handleClickEvent, true);
|
|
1029
|
+
windowObject.removeEventListener("focus", $e77252a287ef94ab$var$handleFocusEvent, true);
|
|
1030
|
+
windowObject.removeEventListener("blur", $e77252a287ef94ab$var$handleWindowBlur, false);
|
|
1031
|
+
if (typeof PointerEvent !== "undefined") {
|
|
1032
|
+
documentObject.removeEventListener("pointerdown", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1033
|
+
documentObject.removeEventListener("pointermove", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1034
|
+
documentObject.removeEventListener("pointerup", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1035
|
+
} else {
|
|
1036
|
+
documentObject.removeEventListener("mousedown", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1037
|
+
documentObject.removeEventListener("mousemove", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1038
|
+
documentObject.removeEventListener("mouseup", $e77252a287ef94ab$var$handlePointerEvent, true);
|
|
1039
|
+
}
|
|
1040
|
+
if ($e77252a287ef94ab$export$d90243b58daecda7.has(windowObject)) $e77252a287ef94ab$export$d90243b58daecda7.delete(windowObject);
|
|
1041
|
+
}, {
|
|
1042
|
+
once: true
|
|
1043
|
+
});
|
|
1044
|
+
$e77252a287ef94ab$export$d90243b58daecda7.set(windowObject, true);
|
|
1026
1045
|
}
|
|
1046
|
+
const $e77252a287ef94ab$export$904d5b09c9b06fff = (element)=>{
|
|
1047
|
+
const documentObject = (0, $goTMa$reactariautils.getOwnerDocument)(element);
|
|
1048
|
+
if (documentObject.readyState !== "loading") $e77252a287ef94ab$var$setupGlobalFocusEvents(element);
|
|
1049
|
+
else documentObject.addEventListener("DOMContentLoaded", ()=>$e77252a287ef94ab$var$setupGlobalFocusEvents(element));
|
|
1050
|
+
};
|
|
1051
|
+
// Server-side rendering does not have the document object defined
|
|
1052
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1053
|
+
if (typeof document !== "undefined") $e77252a287ef94ab$export$904d5b09c9b06fff();
|
|
1027
1054
|
function $e77252a287ef94ab$export$b9b3dfddab17db27() {
|
|
1028
1055
|
return $e77252a287ef94ab$var$currentModality !== "pointer";
|
|
1029
1056
|
}
|
|
@@ -1064,8 +1091,12 @@ const $e77252a287ef94ab$var$nonTextInputTypes = new Set([
|
|
|
1064
1091
|
* focus visible style can be properly set.
|
|
1065
1092
|
*/ function $e77252a287ef94ab$var$isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
1066
1093
|
var _e_target;
|
|
1067
|
-
|
|
1068
|
-
|
|
1094
|
+
const IHTMLInputElement = typeof window !== "undefined" ? (0, $goTMa$reactariautils.getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
|
|
1095
|
+
const IHTMLTextAreaElement = typeof window !== "undefined" ? (0, $goTMa$reactariautils.getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
|
|
1096
|
+
const IHTMLElement = typeof window !== "undefined" ? (0, $goTMa$reactariautils.getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
|
|
1097
|
+
const IKeyboardEvent = typeof window !== "undefined" ? (0, $goTMa$reactariautils.getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
|
|
1098
|
+
isTextInput = isTextInput || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLInputElement && !$e77252a287ef94ab$var$nonTextInputTypes.has(e === null || e === void 0 ? void 0 : (_e_target = e.target) === null || _e_target === void 0 ? void 0 : _e_target.type) || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLTextAreaElement || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLElement && (e === null || e === void 0 ? void 0 : e.target.isContentEditable);
|
|
1099
|
+
return !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !$e77252a287ef94ab$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
|
|
1069
1100
|
}
|
|
1070
1101
|
function $e77252a287ef94ab$export$ffd9e5021c1fb2d6(props = {}) {
|
|
1071
1102
|
let { isTextInput: isTextInput, autoFocus: autoFocus } = props;
|