react-native-external-keyboard 0.9.1 → 1.0.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/README.md +95 -600
- package/android/build.gradle +0 -18
- package/android/src/main/java/com/externalkeyboard/ExternalKeyboardViewPackage.java +24 -22
- package/android/src/main/java/com/externalkeyboard/events/EventHelper.java +10 -13
- package/android/src/main/java/com/externalkeyboard/helper/FocusHelper.java +1 -2
- package/android/src/main/java/com/externalkeyboard/services/FocusMemoryService.java +64 -0
- package/android/src/main/java/com/externalkeyboard/services/KeyboardFocusService.java +41 -0
- package/android/src/main/java/com/externalkeyboard/services/KeyboardService.java +4 -13
- package/android/src/main/java/com/externalkeyboard/views/ExternalKeyboardView/ExternalKeyboardView.java +2 -8
- package/android/src/main/java/com/externalkeyboard/views/ExternalKeyboardView/ExternalKeyboardViewManager.java +20 -13
- package/android/src/main/java/com/externalkeyboard/views/TextInputFocusWrapper/TextInputFocusWrapper.java +99 -21
- package/android/src/main/java/com/externalkeyboard/views/TextInputFocusWrapper/TextInputFocusWrapperManager.java +11 -0
- package/android/src/main/java/com/externalkeyboard/views/base/FocusHighlightBase.java +11 -5
- package/android/src/main/java/com/externalkeyboard/views/base/FocusableBase.java +36 -0
- package/android/src/main/java/com/externalkeyboard/views/base/keyboard/ViewFocusChangeBase.java +2 -3
- package/android/src/main/java/com/externalkeyboard/views/base/keyboard/ViewFocusRequestBase.java +10 -61
- package/android/src/newarch/ExternalKeyboardLockViewManagerInterface.java +11 -0
- package/android/src/newarch/ExternalKeyboardLockViewManagerSpec.java +0 -1
- package/android/src/newarch/ExternalKeyboardViewManagerInterface.java +42 -0
- package/android/src/newarch/ExternalKeyboardViewManagerSpec.java +0 -1
- package/android/src/newarch/KeyboardFocusGroupManagerInterface.java +12 -0
- package/android/src/newarch/KeyboardFocusGroupManagerSpec.java +0 -1
- package/android/src/newarch/TextInputFocusWrapperManagerInterface.java +34 -0
- package/android/src/newarch/TextInputFocusWrapperManagerSpec.java +0 -10
- package/android/src/newarch/helper/ReactNativeEventDispatcher.java +28 -0
- package/android/src/oldarch/ExternalKeyboardViewManagerSpec.java +6 -4
- package/android/src/oldarch/TextInputFocusWrapperManagerSpec.java +4 -0
- package/android/src/oldarch/helper/ReactNativeEventDispatcher.java +15 -0
- package/ios/Delegates/RNCEKVFocusDelegate/RNCEKVFocusDelegate.mm +1 -1
- package/ios/Delegates/RNCEKVFocusDelegate/RNCEKVFocusProtocol.h +1 -1
- package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloDelegate.h +2 -1
- package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloDelegate.mm +41 -5
- package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloProtocol.h +1 -0
- package/ios/Extensions/RCTCustomScrollView+RNCEKVExternalKeyboard.mm +5 -6
- package/ios/Extensions/RCTEnhancedScrollView+RNCEKVExternalKeyboard.mm +8 -9
- package/ios/Extensions/RCTTextInputComponentView+RNCEKVExternalKeyboard.mm +1 -1
- package/ios/Extensions/RCTViewComponentView+RNCEKVExternalKeyboard.h +0 -1
- package/ios/Extensions/RCTViewComponentView+RNCEKVExternalKeyboard.mm +16 -4
- package/ios/Extensions/UIViewController+RNCEKVExternalKeyboard.mm +7 -10
- package/ios/Helpers/RNCEKVNativeProps/RNCEKVNativeProps.h +4 -4
- package/ios/Helpers/RNCEKVSwizzleInstanceMethod/RNCEKVSwizzleInstanceMethod.h +19 -0
- package/ios/Protocols/RNCEKVCustomFocusEffectProtocol.h +1 -1
- package/ios/Services/RNCEKVFocusMemoryService.h +39 -0
- package/ios/Services/RNCEKVFocusMemoryService.mm +42 -0
- package/ios/Services/RNCEKVKeyboardFocusService.h +28 -0
- package/ios/Services/RNCEKVKeyboardFocusService.mm +54 -0
- package/ios/Views/Base/FocusChange/RNCEKVViewFocusChangeBase.h +2 -0
- package/ios/Views/Base/FocusChange/RNCEKVViewFocusChangeBase.mm +12 -10
- package/ios/Views/Base/FocusRequest/RNCEKVViewFocusRequestBase.h +1 -1
- package/ios/Views/Base/FocusRequest/RNCEKVViewFocusRequestBase.mm +6 -17
- package/ios/Views/Base/KeyboardHallo/RNCEKVExternalKeyboardHalloBase.h +1 -0
- package/ios/Views/Base/KeyboardHallo/RNCEKVExternalKeyboardHalloBase.mm +146 -6
- package/ios/Views/Base/ViewGroup/RNCEKVViewGroupBase.h +2 -0
- package/ios/Views/Base/ViewGroup/RNCEKVViewGroupBase.mm +4 -0
- package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.h +1 -1
- package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.mm +8 -4
- package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardViewManager.mm +22 -11
- package/ios/Views/RNCEKVTextInputFocusWrapper/RNCEKVTextInputFocusWrapper.mm +17 -0
- package/ios/Views/RNCEKVTextInputFocusWrapper/RNCEKVTextInputFocusWrapperManager.mm +12 -0
- package/lib/commonjs/components/BaseKeyboardView/BaseKeyboardView.js +67 -65
- package/lib/commonjs/components/BaseKeyboardView/BaseKeyboardView.js.map +1 -1
- package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.js +49 -97
- package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusGroup/KeyboardFocusGroup.android.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusGroup/KeyboardFocusGroup.js.map +1 -1
- package/lib/commonjs/components/{KeyboardExtendedInput/KeyboardExtendedInput.types.js → KeyboardFocusGroup/KeyboardFocusGroup.types.js} +1 -1
- package/lib/commonjs/components/KeyboardFocusGroup/KeyboardFocusGroup.types.js.map +1 -0
- package/lib/commonjs/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.js +2 -1
- package/lib/commonjs/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.js +2 -1
- package/lib/commonjs/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js +2 -1
- package/lib/commonjs/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.js +14 -51
- package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.js.map +1 -1
- package/lib/commonjs/components/index.js +47 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js +37 -19
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
- package/lib/commonjs/nativeSpec/ExternalKeyboardViewNativeComponent.ts +12 -9
- package/lib/commonjs/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
- package/lib/commonjs/nativeSpec/TextInputFocusWrapperNativeComponent.ts +7 -3
- package/lib/commonjs/types/KeyboardFocusLock.types.js +13 -0
- package/lib/commonjs/types/KeyboardFocusLock.types.js.map +1 -1
- package/lib/commonjs/types/baseKeyboardView.types.js +6 -0
- package/lib/commonjs/types/baseKeyboardView.types.js.map +1 -0
- package/lib/commonjs/types/{FocusStyle.js → focus.types.js} +1 -1
- package/lib/commonjs/types/{FocusStyle.js.map → focus.types.js.map} +1 -1
- package/lib/commonjs/types/focusOrder.types.js +33 -0
- package/lib/commonjs/types/focusOrder.types.js.map +1 -0
- package/lib/commonjs/types/{WithKeyboardFocus.js → focusStyle.types.js} +1 -1
- package/lib/commonjs/types/{WithKeyboardFocus.js.map → focusStyle.types.js.map} +1 -1
- package/lib/commonjs/types/index.js +18 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/keyPress.types.js +6 -0
- package/lib/{module/types/WithKeyboardFocus.js.map → commonjs/types/keyPress.types.js.map} +1 -1
- package/lib/commonjs/types/keyboardInput.types.js +6 -0
- package/lib/commonjs/types/keyboardInput.types.js.map +1 -0
- package/lib/commonjs/types/withKeyboardFocus.types.js +6 -0
- package/lib/commonjs/types/withKeyboardFocus.types.js.map +1 -0
- package/lib/commonjs/utils/mapLockFocus.js +37 -0
- package/lib/commonjs/utils/mapLockFocus.js.map +1 -0
- package/lib/commonjs/utils/useFocusStyle.js +4 -21
- package/lib/commonjs/utils/useFocusStyle.js.map +1 -1
- package/lib/commonjs/utils/useKeyboardFocusContainer.js +79 -0
- package/lib/commonjs/utils/useKeyboardFocusContainer.js.map +1 -0
- package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.android.js +4 -7
- package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.android.js.map +1 -1
- package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.ios.js +3 -6
- package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.ios.js.map +1 -1
- package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.js +9 -7
- package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.js.map +1 -1
- package/lib/commonjs/utils/useKeyboardPressState.js +65 -0
- package/lib/commonjs/utils/useKeyboardPressState.js.map +1 -0
- package/lib/commonjs/utils/useOnFocusChange.js +1 -1
- package/lib/commonjs/utils/useOnFocusChange.js.map +1 -1
- package/lib/commonjs/utils/useOrderValidation.js +35 -0
- package/lib/commonjs/utils/useOrderValidation.js.map +1 -0
- package/lib/commonjs/utils/useRenderedChildren.js +34 -0
- package/lib/commonjs/utils/useRenderedChildren.js.map +1 -0
- package/lib/commonjs/utils/useWrappedOrderProps.js +35 -0
- package/lib/commonjs/utils/useWrappedOrderProps.js.map +1 -0
- package/lib/commonjs/utils/withKeyboardFocus.js +81 -96
- package/lib/commonjs/utils/withKeyboardFocus.js.map +1 -1
- package/lib/module/components/BaseKeyboardView/BaseKeyboardView.js +57 -55
- package/lib/module/components/BaseKeyboardView/BaseKeyboardView.js.map +1 -1
- package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.js +51 -99
- package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.js.map +1 -1
- package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.android.js.map +1 -1
- package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.js.map +1 -1
- package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.js.map +1 -1
- package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.types.js +4 -0
- package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.types.js.map +1 -0
- package/lib/module/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.js +2 -1
- package/lib/module/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.js.map +1 -1
- package/lib/module/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.js +2 -1
- package/lib/module/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.js.map +1 -1
- package/lib/module/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js +2 -1
- package/lib/module/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js.map +1 -1
- package/lib/module/components/KeyboardFocusView/KeyboardFocusView.js +16 -53
- package/lib/module/components/KeyboardFocusView/KeyboardFocusView.js.map +1 -1
- package/lib/module/components/index.js +5 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +20 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
- package/lib/module/nativeSpec/ExternalKeyboardViewNativeComponent.ts +12 -9
- package/lib/module/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
- package/lib/module/nativeSpec/TextInputFocusWrapperNativeComponent.ts +7 -3
- package/lib/module/types/KeyboardFocusLock.types.js +12 -1
- package/lib/module/types/KeyboardFocusLock.types.js.map +1 -1
- package/lib/module/types/baseKeyboardView.types.js +4 -0
- package/lib/module/types/baseKeyboardView.types.js.map +1 -0
- package/lib/module/types/focus.types.js +4 -0
- package/lib/module/types/{FocusStyle.js.map → focus.types.js.map} +1 -1
- package/lib/module/types/focusOrder.types.js +31 -0
- package/lib/module/types/focusOrder.types.js.map +1 -0
- package/lib/module/types/focusStyle.types.js +4 -0
- package/lib/module/types/focusStyle.types.js.map +1 -0
- package/lib/module/types/index.js +3 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/keyPress.types.js +4 -0
- package/lib/module/types/keyPress.types.js.map +1 -0
- package/lib/module/types/keyboardInput.types.js +4 -0
- package/lib/module/types/keyboardInput.types.js.map +1 -0
- package/lib/module/types/withKeyboardFocus.types.js +4 -0
- package/lib/module/types/withKeyboardFocus.types.js.map +1 -0
- package/lib/module/utils/mapLockFocus.js +32 -0
- package/lib/module/utils/mapLockFocus.js.map +1 -0
- package/lib/module/utils/useFocusStyle.js +4 -21
- package/lib/module/utils/useFocusStyle.js.map +1 -1
- package/lib/module/utils/useKeyboardFocusContainer.js +74 -0
- package/lib/module/utils/useKeyboardFocusContainer.js.map +1 -0
- package/lib/module/utils/useKeyboardPress/useKeyboardPress.android.js +4 -7
- package/lib/module/utils/useKeyboardPress/useKeyboardPress.android.js.map +1 -1
- package/lib/module/utils/useKeyboardPress/useKeyboardPress.ios.js +3 -6
- package/lib/module/utils/useKeyboardPress/useKeyboardPress.ios.js.map +1 -1
- package/lib/module/utils/useKeyboardPress/useKeyboardPress.js +9 -7
- package/lib/module/utils/useKeyboardPress/useKeyboardPress.js.map +1 -1
- package/lib/module/utils/useKeyboardPressState.js +60 -0
- package/lib/module/utils/useKeyboardPressState.js.map +1 -0
- package/lib/module/utils/useOnFocusChange.js +1 -1
- package/lib/module/utils/useOnFocusChange.js.map +1 -1
- package/lib/module/utils/useOrderValidation.js +30 -0
- package/lib/module/utils/useOrderValidation.js.map +1 -0
- package/lib/module/utils/useRenderedChildren.js +29 -0
- package/lib/module/utils/useRenderedChildren.js.map +1 -0
- package/lib/module/utils/useWrappedOrderProps.js +30 -0
- package/lib/module/utils/useWrappedOrderProps.js.map +1 -0
- package/lib/module/utils/withKeyboardFocus.js +84 -99
- package/lib/module/utils/withKeyboardFocus.js.map +1 -1
- package/lib/typescript/src/components/BaseKeyboardView/BaseKeyboardView.d.ts +30 -10
- package/lib/typescript/src/components/BaseKeyboardView/BaseKeyboardView.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts +187 -12
- package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.android.d.ts +4 -146
- package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.android.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.d.ts +2 -12
- package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.d.ts +4 -146
- package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.types.d.ts +13 -0
- package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.types.d.ts.map +1 -0
- package/lib/typescript/src/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.d.ts +1 -1
- package/lib/typescript/src/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.d.ts +1 -1
- package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.d.ts +1 -1
- package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.d.ts +1 -1
- package/lib/typescript/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.d.ts.map +1 -1
- package/lib/typescript/src/components/KeyboardFocusView/KeyboardFocusView.d.ts +28 -18
- package/lib/typescript/src/components/KeyboardFocusView/KeyboardFocusView.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable/Pressable.d.ts +14 -14
- package/lib/typescript/src/components/Touchable/Pressable.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +5 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +694 -9
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.d.ts +2 -4
- package/lib/typescript/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts +6 -7
- package/lib/typescript/src/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpec/KeyboardFocusGroupNativeComponent.d.ts +2 -4
- package/lib/typescript/src/nativeSpec/KeyboardFocusGroupNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpec/TextInputFocusWrapperNativeComponent.d.ts +4 -4
- package/lib/typescript/src/nativeSpec/TextInputFocusWrapperNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/types/KeyboardFocusLock.types.d.ts +15 -1
- package/lib/typescript/src/types/KeyboardFocusLock.types.d.ts.map +1 -1
- package/lib/typescript/src/types/KeyboardFocusView.types.d.ts +16 -14
- package/lib/typescript/src/types/KeyboardFocusView.types.d.ts.map +1 -1
- package/lib/typescript/src/types/baseKeyboardView.types.d.ts +119 -0
- package/lib/typescript/src/types/baseKeyboardView.types.d.ts.map +1 -0
- package/lib/typescript/src/types/focus.types.d.ts +35 -0
- package/lib/typescript/src/types/focus.types.d.ts.map +1 -0
- package/lib/typescript/src/types/focusOrder.types.d.ts +57 -0
- package/lib/typescript/src/types/focusOrder.types.d.ts.map +1 -0
- package/lib/typescript/src/types/focusStyle.types.d.ts +11 -0
- package/lib/typescript/src/types/focusStyle.types.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +11 -2
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/keyPress.types.d.ts +7 -0
- package/lib/typescript/src/types/keyPress.types.d.ts.map +1 -0
- package/lib/typescript/src/types/keyboardInput.types.d.ts +53 -0
- package/lib/typescript/src/types/keyboardInput.types.d.ts.map +1 -0
- package/lib/typescript/src/types/withKeyboardFocus.types.d.ts +109 -0
- package/lib/typescript/src/types/withKeyboardFocus.types.d.ts.map +1 -0
- package/lib/typescript/src/utils/mapLockFocus.d.ts +3 -0
- package/lib/typescript/src/utils/mapLockFocus.d.ts.map +1 -0
- package/lib/typescript/src/utils/useFocusStyle.d.ts +26 -34
- package/lib/typescript/src/utils/useFocusStyle.d.ts.map +1 -1
- package/lib/typescript/src/utils/useKeyboardFocusContainer.d.ts +898 -0
- package/lib/typescript/src/utils/useKeyboardFocusContainer.d.ts.map +1 -0
- package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.android.d.ts +2 -2
- package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.android.d.ts.map +1 -1
- package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.d.ts +4 -3
- package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.d.ts.map +1 -1
- package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.ios.d.ts +3 -3
- package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.ios.d.ts.map +1 -1
- package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.types.d.ts +1 -2
- package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.types.d.ts.map +1 -1
- package/lib/typescript/src/utils/useKeyboardPressState.d.ts +29 -0
- package/lib/typescript/src/utils/useKeyboardPressState.d.ts.map +1 -0
- package/lib/typescript/src/utils/useOnFocusChange.d.ts +3 -3
- package/lib/typescript/src/utils/useOnFocusChange.d.ts.map +1 -1
- package/lib/typescript/src/utils/useOrderValidation.d.ts +8 -0
- package/lib/typescript/src/utils/useOrderValidation.d.ts.map +1 -0
- package/lib/typescript/src/utils/useRenderedChildren.d.ts +18 -0
- package/lib/typescript/src/utils/useRenderedChildren.d.ts.map +1 -0
- package/lib/typescript/src/utils/useWrappedOrderProps.d.ts +13 -0
- package/lib/typescript/src/utils/useWrappedOrderProps.d.ts.map +1 -0
- package/lib/typescript/src/utils/withKeyboardFocus.d.ts +3 -4
- package/lib/typescript/src/utils/withKeyboardFocus.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/components/BaseKeyboardView/BaseKeyboardView.tsx +74 -94
- package/src/components/KeyboardExtendedInput/KeyboardExtendedInput.tsx +49 -149
- package/src/components/KeyboardFocusGroup/KeyboardFocusGroup.android.tsx +23 -32
- package/src/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.tsx +32 -41
- package/src/components/KeyboardFocusGroup/KeyboardFocusGroup.tsx +3 -14
- package/src/components/KeyboardFocusGroup/KeyboardFocusGroup.types.ts +15 -0
- package/src/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.tsx +2 -2
- package/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.tsx +2 -2
- package/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.tsx +1 -1
- package/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.tsx +2 -2
- package/src/components/KeyboardFocusView/KeyboardFocusView.tsx +29 -68
- package/src/components/Touchable/Pressable.tsx +2 -2
- package/src/components/index.ts +12 -0
- package/src/index.tsx +44 -32
- package/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
- package/src/nativeSpec/ExternalKeyboardViewNativeComponent.ts +12 -9
- package/src/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
- package/src/nativeSpec/TextInputFocusWrapperNativeComponent.ts +7 -3
- package/src/types/KeyboardFocusLock.types.ts +16 -1
- package/src/types/KeyboardFocusView.types.ts +17 -18
- package/src/types/baseKeyboardView.types.ts +122 -0
- package/src/types/focus.types.ts +40 -0
- package/src/types/focusOrder.types.ts +59 -0
- package/src/types/{FocusStyle.ts → focusStyle.types.ts} +5 -0
- package/src/types/index.ts +32 -2
- package/src/types/keyPress.types.ts +8 -0
- package/src/types/keyboardInput.types.ts +81 -0
- package/src/types/withKeyboardFocus.types.ts +178 -0
- package/src/utils/mapLockFocus.ts +31 -0
- package/src/utils/useFocusStyle.tsx +13 -41
- package/src/utils/useKeyboardFocusContainer.ts +102 -0
- package/src/utils/useKeyboardPress/useKeyboardPress.android.ts +4 -7
- package/src/utils/useKeyboardPress/useKeyboardPress.ios.ts +3 -6
- package/src/utils/useKeyboardPress/useKeyboardPress.ts +9 -7
- package/src/utils/useKeyboardPress/useKeyboardPress.types.ts +1 -2
- package/src/utils/useKeyboardPressState.ts +81 -0
- package/src/utils/useOnFocusChange.ts +4 -7
- package/src/utils/useOrderValidation.ts +74 -0
- package/src/utils/useRenderedChildren.ts +42 -0
- package/src/utils/useWrappedOrderProps.ts +48 -0
- package/src/utils/withKeyboardFocus.tsx +105 -125
- package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.types.js.map +0 -1
- package/lib/commonjs/components/KeyboardFocusView/hooks/index.js +0 -13
- package/lib/commonjs/components/KeyboardFocusView/hooks/index.js.map +0 -1
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/index.js +0 -13
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/index.js.map +0 -1
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js +0 -33
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js.map +0 -1
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.js +0 -39
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.js.map +0 -1
- package/lib/commonjs/components/RenderPropComponent/RenderPropComponent.js +0 -23
- package/lib/commonjs/components/RenderPropComponent/RenderPropComponent.js.map +0 -1
- package/lib/commonjs/types/BaseKeyboardView.js +0 -18
- package/lib/commonjs/types/BaseKeyboardView.js.map +0 -1
- package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.types.js +0 -4
- package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.types.js.map +0 -1
- package/lib/module/components/KeyboardFocusView/hooks/index.js +0 -4
- package/lib/module/components/KeyboardFocusView/hooks/index.js.map +0 -1
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/index.js +0 -4
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/index.js.map +0 -1
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js +0 -28
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js.map +0 -1
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.js +0 -34
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.js.map +0 -1
- package/lib/module/components/RenderPropComponent/RenderPropComponent.js +0 -17
- package/lib/module/components/RenderPropComponent/RenderPropComponent.js.map +0 -1
- package/lib/module/types/BaseKeyboardView.js +0 -14
- package/lib/module/types/BaseKeyboardView.js.map +0 -1
- package/lib/module/types/FocusStyle.js +0 -4
- package/lib/module/types/WithKeyboardFocus.js +0 -4
- package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.d.ts +0 -45
- package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.d.ts.map +0 -1
- package/lib/typescript/src/components/KeyboardFocusView/hooks/index.d.ts +0 -2
- package/lib/typescript/src/components/KeyboardFocusView/hooks/index.d.ts.map +0 -1
- package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/index.d.ts +0 -2
- package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/index.d.ts.map +0 -1
- package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.d.ts +0 -175
- package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.d.ts.map +0 -1
- package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.d.ts +0 -181
- package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.d.ts.map +0 -1
- package/lib/typescript/src/components/RenderPropComponent/RenderPropComponent.d.ts +0 -6
- package/lib/typescript/src/components/RenderPropComponent/RenderPropComponent.d.ts.map +0 -1
- package/lib/typescript/src/types/BaseKeyboardView.d.ts +0 -70
- package/lib/typescript/src/types/BaseKeyboardView.d.ts.map +0 -1
- package/lib/typescript/src/types/FocusStyle.d.ts +0 -6
- package/lib/typescript/src/types/FocusStyle.d.ts.map +0 -1
- package/lib/typescript/src/types/WithKeyboardFocus.d.ts +0 -47
- package/lib/typescript/src/types/WithKeyboardFocus.d.ts.map +0 -1
- package/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.ts +0 -73
- package/src/components/KeyboardFocusView/hooks/index.ts +0 -1
- package/src/components/KeyboardFocusView/hooks/useFocusStyle/index.ts +0 -1
- package/src/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.ts +0 -34
- package/src/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.ts +0 -41
- package/src/components/RenderPropComponent/RenderPropComponent.tsx +0 -18
- package/src/types/BaseKeyboardView.ts +0 -74
- package/src/types/WithKeyboardFocus.ts +0 -115
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardFocusContainer.d.ts","sourceRoot":"","sources":["../../../../src/utils/useKeyboardFocusContainer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEzD,KAAK,eAAe,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAE7C,MAAM,MAAM,8BAA8B,CACxC,MAAM,SAAS,eAAe,GAAG,eAAe,EAChD,aAAa,SAAS,eAAe,GAAG,eAAe,IACrD;IACF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,MAAM,SAAS,eAAe,GAAG,eAAe,EAChD,aAAa,SAAS,eAAe,GAAG,eAAe,EACvD,uMAcC,8BAA8B,CAAC,MAAM,EAAE,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyDurtB,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAtB,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAtB,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAtB,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAtB,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CADpwtB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { GestureResponderEvent } from 'react-native';
|
|
2
2
|
import type { UseKeyboardPressProps } from './useKeyboardPress.types';
|
|
3
|
-
import type { OnKeyPressFn } from '../../types
|
|
3
|
+
import type { OnKeyPressFn } from '../../types';
|
|
4
4
|
export declare const ANDROID_SPACE_KEY_CODE = 62;
|
|
5
5
|
export declare const ANDROID_DPAD_CENTER_CODE = 23;
|
|
6
6
|
export declare const ANDROID_ENTER_CODE = 66;
|
|
7
7
|
export declare const ANDROID_TRIGGER_CODES: number[];
|
|
8
|
-
export declare const useKeyboardPress: <T extends (event?: any) => void, K extends (event?: any) => void>({ onKeyUpPress, onKeyDownPress, onPressIn, onPressOut, onPress, onLongPress, triggerCodes,
|
|
8
|
+
export declare const useKeyboardPress: <T extends (event?: any) => void, K extends (event?: any) => void>({ onKeyUpPress, onKeyDownPress, onPressIn, onPressOut, onPress, onLongPress, triggerCodes, }: UseKeyboardPressProps<T, K>) => {
|
|
9
9
|
onKeyUpPressHandler: OnKeyPressFn | undefined;
|
|
10
10
|
onKeyDownPressHandler: OnKeyPressFn | undefined;
|
|
11
11
|
onPressHandler: ((event: GestureResponderEvent) => void) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardPress.android.d.ts","sourceRoot":"","sources":["../../../../../src/utils/useKeyboardPress/useKeyboardPress.android.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAc,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useKeyboardPress.android.d.ts","sourceRoot":"","sources":["../../../../../src/utils/useKeyboardPress/useKeyboardPress.android.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAc,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,eAAO,MAAM,qBAAqB,UAIjC,CAAC;AAkBF,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,EAC/B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,EAC/B,8FAQC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC;;;6BA6ClB,qBAAqB;CAYhC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { UseKeyboardPressProps } from './useKeyboardPress.types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { OnKeyPress } from '../../types';
|
|
3
|
+
export declare const useKeyboardPress: <T extends (event?: any) => void, K extends (event?: any) => void>({ onKeyUpPress, onKeyDownPress, onPress, onLongPress, onPressIn, onPressOut, triggerCodes, }: UseKeyboardPressProps<T, K>) => {
|
|
4
|
+
onKeyUpPressHandler: (e: OnKeyPress) => void;
|
|
5
|
+
onKeyDownPressHandler: import("../..").OnKeyPressFn | undefined;
|
|
5
6
|
onPressHandler: T | undefined;
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=useKeyboardPress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardPress.d.ts","sourceRoot":"","sources":["../../../../../src/utils/useKeyboardPress/useKeyboardPress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"useKeyboardPress.d.ts","sourceRoot":"","sources":["../../../../../src/utils/useKeyboardPress/useKeyboardPress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAO9C,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,EAC/B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,EAC/B,8FAQC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC;6BAEf,UAAU;;;CA4BxB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { UseKeyboardPressProps } from './useKeyboardPress.types';
|
|
2
|
-
import type { OnKeyPress } from '../../types
|
|
3
|
-
export declare const useKeyboardPress: <T extends (event?: any) => void, K extends (event?: any) => void>({ onKeyUpPress, onKeyDownPress, onPress, onPressIn, onPressOut, onLongPress, triggerCodes,
|
|
2
|
+
import type { OnKeyPress } from '../../types';
|
|
3
|
+
export declare const useKeyboardPress: <T extends (event?: any) => void, K extends (event?: any) => void>({ onKeyUpPress, onKeyDownPress, onPress, onPressIn, onPressOut, onLongPress, triggerCodes, }: UseKeyboardPressProps<T, K>) => {
|
|
4
4
|
onKeyUpPressHandler: (e: OnKeyPress) => void;
|
|
5
|
-
onKeyDownPressHandler: import("
|
|
5
|
+
onKeyDownPressHandler: import("../..").OnKeyPressFn | undefined;
|
|
6
6
|
onPressHandler: T | undefined;
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=useKeyboardPress.ios.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardPress.ios.d.ts","sourceRoot":"","sources":["../../../../../src/utils/useKeyboardPress/useKeyboardPress.ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useKeyboardPress.ios.d.ts","sourceRoot":"","sources":["../../../../../src/utils/useKeyboardPress/useKeyboardPress.ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAQ9C,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,EAC/B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,EAC/B,8FAQC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC;6BAEf,UAAU;;;CA6BxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OnKeyPressFn } from '../../types
|
|
1
|
+
import type { OnKeyPressFn } from '../../types';
|
|
2
2
|
export type UseKeyboardPressProps<T, K> = {
|
|
3
3
|
triggerCodes?: number[];
|
|
4
4
|
onKeyUpPress?: OnKeyPressFn;
|
|
@@ -7,6 +7,5 @@ export type UseKeyboardPressProps<T, K> = {
|
|
|
7
7
|
onPress?: T;
|
|
8
8
|
onPressIn?: K;
|
|
9
9
|
onPressOut?: K;
|
|
10
|
-
disabled?: boolean;
|
|
11
10
|
};
|
|
12
11
|
//# sourceMappingURL=useKeyboardPress.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardPress.types.d.ts","sourceRoot":"","sources":["../../../../../src/utils/useKeyboardPress/useKeyboardPress.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useKeyboardPress.types.d.ts","sourceRoot":"","sources":["../../../../../src/utils/useKeyboardPress/useKeyboardPress.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,qBAAqB,CAAC,CAAC,EAAE,CAAC,IAAI;IACxC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,WAAW,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,UAAU,CAAC,EAAE,CAAC,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type AnyPressHandler = (event?: any) => void;
|
|
2
|
+
type UseKeyboardPressStateParams = {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
onPressIn?: AnyPressHandler;
|
|
5
|
+
onPressOut?: AnyPressHandler;
|
|
6
|
+
onFocusChange?: (isFocused: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Android only. Physical-keyboard activation (Enter / Space / DPad-center) never
|
|
10
|
+
* reaches the touch responder, so a wrapped component's `pressed` stays false.
|
|
11
|
+
* This derives a press state from the key down/up events and returns composable
|
|
12
|
+
* pieces to thread it through focus, press handlers, and function styles.
|
|
13
|
+
*
|
|
14
|
+
* Everything is a no-op unless `enabled` and running on Android, so callers can
|
|
15
|
+
* always wire the returned values unconditionally.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useKeyboardPressState: ({ enabled, onPressIn, onPressOut, onFocusChange, }: UseKeyboardPressStateParams) => {
|
|
18
|
+
/** A keyboard-driven press is currently held. */
|
|
19
|
+
pressed: boolean;
|
|
20
|
+
/** Pass to the keyboard press hook; the original handlers when inactive. */
|
|
21
|
+
onPressIn: AnyPressHandler | undefined;
|
|
22
|
+
onPressOut: AnyPressHandler | undefined;
|
|
23
|
+
/** Wrap `onFocusChange` to clear a stuck press on blur. */
|
|
24
|
+
onFocusChange: (isFocused: boolean) => void;
|
|
25
|
+
/** Fold the keyboard press into a function style. */
|
|
26
|
+
applyPressedStyle: <S>(style: S) => S;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=useKeyboardPressState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardPressState.d.ts","sourceRoot":"","sources":["../../../../src/utils/useKeyboardPressState.ts"],"names":[],"mappings":"AAGA,KAAK,eAAe,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAG7C,KAAK,2BAA2B,GAAG;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAAI,oDAKnC,2BAA2B;IA2C1B,iDAAiD;;IAEjD,4EAA4E;;;IAG5E,2DAA2D;+BA3B/C,OAAO;IA6BnB,qDAAqD;wBAjBpD,CAAC,SAAS,CAAC,KAAG,CAAC;CAoBnB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { OnFocusChangeFn } from '../types';
|
|
1
|
+
import type { OnFocusChangeFn, NativeFocusChangeHandler } from '../types';
|
|
2
2
|
type UseFocusChange = {
|
|
3
|
-
onFocusChange?:
|
|
3
|
+
onFocusChange?: OnFocusChangeFn;
|
|
4
4
|
onFocus?: () => void;
|
|
5
5
|
onBlur?: () => void;
|
|
6
6
|
};
|
|
7
|
-
export declare const useOnFocusChange: ({ onFocusChange, onFocus, onBlur, }: UseFocusChange) =>
|
|
7
|
+
export declare const useOnFocusChange: ({ onFocusChange, onFocus, onBlur, }: UseFocusChange) => NativeFocusChangeHandler;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=useOnFocusChange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnFocusChange.d.ts","sourceRoot":"","sources":["../../../../src/utils/useOnFocusChange.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useOnFocusChange.d.ts","sourceRoot":"","sources":["../../../../src/utils/useOnFocusChange.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAE1E,KAAK,cAAc,GAAG;IACpB,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,qCAI9B,cAAc,6BAWd,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FocusOrderProps } from '../types';
|
|
2
|
+
type UseOrderValidationProps = Pick<FocusOrderProps, 'orderIndex' | 'orderId' | 'orderForward' | 'orderBackward' | 'orderFirst' | 'orderLast' | 'orderLeft' | 'orderRight' | 'orderUp' | 'orderDown'> & {
|
|
3
|
+
groupId?: string;
|
|
4
|
+
orderPrefix: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const useOrderValidation: ({ groupId, orderIndex, orderPrefix, orderId, orderForward, orderBackward, orderFirst, orderLast, orderLeft, orderRight, orderUp, orderDown, }: UseOrderValidationProps) => void;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=useOrderValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOrderValidation.d.ts","sourceRoot":"","sources":["../../../../src/utils/useOrderValidation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,KAAK,uBAAuB,GAAG,IAAI,CACjC,eAAe,EACb,YAAY,GACZ,SAAS,GACT,cAAc,GACd,eAAe,GACf,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,GACZ,SAAS,GACT,WAAW,CACd,GAAG;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,+IAahC,uBAAuB,SAwCzB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type UseRenderedChildrenProps = {
|
|
2
|
+
focused: boolean;
|
|
3
|
+
keyboardPressed?: boolean;
|
|
4
|
+
renderContent?: (state: Record<string, unknown>) => React.ReactNode;
|
|
5
|
+
renderFocusable?: (state: {
|
|
6
|
+
focused: boolean;
|
|
7
|
+
}) => React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Resolves the `children` override for the wrapped component.
|
|
11
|
+
* - `renderContent` stays a function so the component can call it with its own state + `focused`
|
|
12
|
+
* (keyboard activation forces `pressed` when `keyboardPressed` is set)
|
|
13
|
+
* - `renderFocusable` is evaluated immediately and returned as a static node
|
|
14
|
+
* Returns `undefined` when neither prop is provided.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useRenderedChildren: ({ focused, keyboardPressed, renderContent, renderFocusable, }: UseRenderedChildrenProps) => string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | ((state: Record<string, unknown>) => import("react").ReactNode) | null | undefined;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useRenderedChildren.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRenderedChildren.d.ts","sourceRoot":"","sources":["../../../../src/utils/useRenderedChildren.ts"],"names":[],"mappings":"AAEA,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACpE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;CACpE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,+DAKjC,wBAAwB,wZAIT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kDAgBxC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FocusOrderProps } from '../types';
|
|
2
|
+
export declare const useWrappedOrderProps: ({ orderPrefix, orderId, orderForward, orderBackward, orderFirst, orderLast, orderLeft, orderRight, orderUp, orderDown, }: FocusOrderProps) => {
|
|
3
|
+
orderId: string | undefined;
|
|
4
|
+
orderForward: string | undefined;
|
|
5
|
+
orderBackward: string | undefined;
|
|
6
|
+
orderLeft: string | undefined;
|
|
7
|
+
orderRight: string | undefined;
|
|
8
|
+
orderUp: string | undefined;
|
|
9
|
+
orderDown: string | undefined;
|
|
10
|
+
orderFirst: string | undefined;
|
|
11
|
+
orderLast: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useWrappedOrderProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWrappedOrderProps.d.ts","sourceRoot":"","sources":["../../../../src/utils/useWrappedOrderProps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD,eAAO,MAAM,oBAAoB,GAAI,0HAWlC,eAAe;;;;;;;;;;CAgCjB,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, type ViewProps } from 'react-native';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
export declare const withKeyboardFocus: <ComponentProps extends object, ViewStyleType, ViewType = View>(Component: WithKeyboardFocusComponent<ComponentProps>) => React.NamedExoticComponent<React.PropsWithoutRef<WithKeyboardFocus<ComponentProps, ViewStyleType, ViewType>> & React.RefAttributes<((props: Omit<ViewProps, keyof {
|
|
3
|
+
import type { WithKeyboardFocusProps, KeyboardFocusableComponent } from '../types';
|
|
4
|
+
export declare const withKeyboardFocus: <ComponentProps extends object, ViewStyleType, ViewType = View>(Component: KeyboardFocusableComponent<ComponentProps>) => React.NamedExoticComponent<React.PropsWithoutRef<WithKeyboardFocusProps<ComponentProps, ViewStyleType, ViewType>> & React.RefAttributes<import("..").KeyboardFocus | ((props: Omit<ViewProps, keyof {
|
|
6
5
|
ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
|
|
7
6
|
}> & {
|
|
8
7
|
ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
|
|
9
|
-
}) => React.ReactNode)
|
|
8
|
+
}) => React.ReactNode)>>;
|
|
10
9
|
//# sourceMappingURL=withKeyboardFocus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withKeyboardFocus.d.ts","sourceRoot":"","sources":["../../../../src/utils/withKeyboardFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"withKeyboardFocus.d.ts","sourceRoot":"","sources":["../../../../src/utils/withKeyboardFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAA4B,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,KAAK,EAIV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,iBAAiB,GAC5B,cAAc,SAAS,MAAM,EAC7B,aAAa,EACb,QAAQ,GAAG,IAAI,EAEf,WAAW,0BAA0B,CAAC,cAAc,CAAC;OAK5B,CAAC;;OAEtB,CAAD;wBAkMJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-external-keyboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Toolkit for improving physical keyboard support in React Native",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
"!**/__tests__",
|
|
26
26
|
"!**/__fixtures__",
|
|
27
27
|
"!**/__mocks__",
|
|
28
|
-
"!**/.*"
|
|
28
|
+
"!**/.*",
|
|
29
|
+
"!**/CLAUDE.md",
|
|
30
|
+
"!**/docs"
|
|
29
31
|
],
|
|
30
32
|
"scripts": {
|
|
31
33
|
"example": "yarn workspace react-native-external-keyboard-example",
|
|
@@ -10,30 +10,22 @@ import { ExternalKeyboardViewNative } from '../../nativeSpec';
|
|
|
10
10
|
import { Commands } from '../../nativeSpec/ExternalKeyboardViewNativeComponent';
|
|
11
11
|
import {
|
|
12
12
|
LockFocusEnum,
|
|
13
|
+
type LockFocusType,
|
|
13
14
|
type BaseKeyboardViewProps,
|
|
14
15
|
type BaseKeyboardViewType,
|
|
15
|
-
|
|
16
|
-
} from '../../types/BaseKeyboardView';
|
|
16
|
+
} from '../../types';
|
|
17
17
|
import type { View } from 'react-native';
|
|
18
18
|
import { KeyPressContext } from '../../context/BubbledKeyPressContext';
|
|
19
19
|
import { useBubbledInfo } from './BaseKeyboardView.hooks';
|
|
20
20
|
import { useGroupIdentifierContext } from '../../context/GroupIdentifierContext';
|
|
21
21
|
import { useOnFocusChange } from '../../utils/useOnFocusChange';
|
|
22
22
|
import { useOrderFocusGroup } from '../../context/OrderFocusContext';
|
|
23
|
-
import {
|
|
23
|
+
import { useWrappedOrderProps } from '../../utils/useWrappedOrderProps';
|
|
24
24
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
type NativeRef = React.ElementRef<ComponentType>;
|
|
27
27
|
const isIOS = Platform.OS === 'ios';
|
|
28
28
|
|
|
29
|
-
const DEFAULT_EXPOSE_METHODS = [
|
|
30
|
-
'blur',
|
|
31
|
-
'measure',
|
|
32
|
-
'measureInWindow',
|
|
33
|
-
'measureLayout',
|
|
34
|
-
'setNativeProps',
|
|
35
|
-
];
|
|
36
|
-
|
|
37
29
|
enum BITS {
|
|
38
30
|
BIT_01 = 0b1,
|
|
39
31
|
BIT_02 = 0b10,
|
|
@@ -41,8 +33,6 @@ enum BITS {
|
|
|
41
33
|
BIT_04 = 0b1000,
|
|
42
34
|
BIT_05 = 0b10000,
|
|
43
35
|
BIT_06 = 0b100000,
|
|
44
|
-
BIT_07 = 0b1000000,
|
|
45
|
-
BIT_08 = 0b10000000,
|
|
46
36
|
BIT_09 = 0b100000000,
|
|
47
37
|
BIT_10 = 0b1000000000,
|
|
48
38
|
}
|
|
@@ -66,7 +56,7 @@ const mapFocusValues = (values: LockFocusType[] | undefined) => {
|
|
|
66
56
|
};
|
|
67
57
|
|
|
68
58
|
export const BaseKeyboardView = React.memo(
|
|
69
|
-
React.forwardRef<BaseKeyboardViewType, BaseKeyboardViewProps>(
|
|
59
|
+
React.forwardRef<BaseKeyboardViewType | View, BaseKeyboardViewProps>(
|
|
70
60
|
(
|
|
71
61
|
{
|
|
72
62
|
onFocusChange,
|
|
@@ -75,18 +65,14 @@ export const BaseKeyboardView = React.memo(
|
|
|
75
65
|
onBubbledContextMenuPress,
|
|
76
66
|
haloEffect,
|
|
77
67
|
autoFocus,
|
|
78
|
-
canBeFocused = true,
|
|
79
68
|
focusable = true,
|
|
80
|
-
|
|
69
|
+
focusableWrapper = false,
|
|
81
70
|
onFocus,
|
|
82
71
|
onBlur,
|
|
83
|
-
viewRef,
|
|
84
72
|
groupIdentifier,
|
|
85
73
|
tintColor,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
enableA11yFocus = false,
|
|
89
|
-
screenAutoA11yFocusDelay = 500,
|
|
74
|
+
// TODO: revisit screenAutoA11yFocusDelay default (currently 300ms)
|
|
75
|
+
screenAutoA11yFocusDelay = 300,
|
|
90
76
|
lockFocus,
|
|
91
77
|
orderIndex,
|
|
92
78
|
orderForward,
|
|
@@ -101,13 +87,16 @@ export const BaseKeyboardView = React.memo(
|
|
|
101
87
|
orderId,
|
|
102
88
|
enableContextMenu,
|
|
103
89
|
orderPrefix: _orderPrefix,
|
|
90
|
+
tintType,
|
|
91
|
+
// Deprecated no-ops: destructured out so they never reach the native view.
|
|
92
|
+
enableA11yFocus: _enableA11yFocus,
|
|
104
93
|
defaultFocusHighlightEnabled = true,
|
|
94
|
+
roundedHaloFix = false,
|
|
105
95
|
...props
|
|
106
96
|
},
|
|
107
97
|
ref
|
|
108
98
|
) => {
|
|
109
|
-
const
|
|
110
|
-
const targetRef = viewRef ?? localRef;
|
|
99
|
+
const targetRef = useRef<View | null>(null);
|
|
111
100
|
const lockFocusValue = useMemo(
|
|
112
101
|
() => mapFocusValues(lockFocus),
|
|
113
102
|
[lockFocus]
|
|
@@ -162,27 +151,48 @@ export const BaseKeyboardView = React.memo(
|
|
|
162
151
|
useImperativeHandle(
|
|
163
152
|
ref,
|
|
164
153
|
() => {
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
154
|
+
const nativeCommands: Record<string, () => void> = {
|
|
155
|
+
keyboardFocus: () => {
|
|
156
|
+
if (targetRef?.current) {
|
|
157
|
+
Commands.rnekKeyboardFocus(
|
|
158
|
+
targetRef.current as unknown as NativeRef
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
screenReaderFocus: () => {
|
|
163
|
+
if (targetRef?.current) {
|
|
164
|
+
Commands.rnekScreenReaderFocus(
|
|
165
|
+
targetRef.current as unknown as NativeRef
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
focus: () => {
|
|
170
|
+
if (targetRef?.current) {
|
|
171
|
+
Commands.rnekKeyboardFocus(
|
|
172
|
+
targetRef.current as unknown as NativeRef
|
|
173
|
+
);
|
|
174
|
+
Commands.rnekScreenReaderFocus(
|
|
175
|
+
targetRef.current as unknown as NativeRef
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
181
179
|
};
|
|
182
180
|
|
|
183
|
-
return
|
|
181
|
+
return new Proxy({} as BaseKeyboardViewType | View, {
|
|
182
|
+
get(_target, prop: string) {
|
|
183
|
+
if (prop in nativeCommands) {
|
|
184
|
+
return nativeCommands[prop];
|
|
185
|
+
}
|
|
186
|
+
return (
|
|
187
|
+
targetRef?.current as unknown as
|
|
188
|
+
| Record<string, unknown>
|
|
189
|
+
| null
|
|
190
|
+
| undefined
|
|
191
|
+
)?.[prop];
|
|
192
|
+
},
|
|
193
|
+
});
|
|
184
194
|
},
|
|
185
|
-
[
|
|
195
|
+
[targetRef]
|
|
186
196
|
);
|
|
187
197
|
|
|
188
198
|
const bubbled = useBubbledInfo(onBubbledContextMenuPress);
|
|
@@ -193,52 +203,24 @@ export const BaseKeyboardView = React.memo(
|
|
|
193
203
|
onBlur,
|
|
194
204
|
});
|
|
195
205
|
|
|
196
|
-
const
|
|
197
|
-
const ignoreFocusHint = Platform.OS !== 'ios' || !ignoreGroupFocusHint;
|
|
198
|
-
|
|
199
|
-
const wrapPrefix = useMemo(
|
|
200
|
-
() => wrapOrderPrefix(orderPrefix),
|
|
201
|
-
[orderPrefix]
|
|
202
|
-
);
|
|
206
|
+
const hasFocusListener = onFocusChange || onFocus || onBlur;
|
|
203
207
|
|
|
204
|
-
const wrappedOrderProps =
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
orderRight: wrapPrefix(orderRight),
|
|
217
|
-
orderUp: wrapPrefix(orderUp),
|
|
218
|
-
orderDown: wrapPrefix(orderDown),
|
|
219
|
-
}),
|
|
220
|
-
[
|
|
221
|
-
wrapPrefix,
|
|
222
|
-
orderId,
|
|
223
|
-
orderForward,
|
|
224
|
-
orderBackward,
|
|
225
|
-
orderFirst,
|
|
226
|
-
orderLast,
|
|
227
|
-
orderLeft,
|
|
228
|
-
orderRight,
|
|
229
|
-
orderUp,
|
|
230
|
-
orderDown,
|
|
231
|
-
]
|
|
232
|
-
);
|
|
208
|
+
const wrappedOrderProps = useWrappedOrderProps({
|
|
209
|
+
orderPrefix,
|
|
210
|
+
orderId,
|
|
211
|
+
orderForward,
|
|
212
|
+
orderBackward,
|
|
213
|
+
orderFirst,
|
|
214
|
+
orderLast,
|
|
215
|
+
orderLeft,
|
|
216
|
+
orderRight,
|
|
217
|
+
orderUp,
|
|
218
|
+
orderDown,
|
|
219
|
+
});
|
|
233
220
|
|
|
234
|
-
const platformSpecificHalo =
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
ios: haloEffect,
|
|
238
|
-
android: defaultFocusHighlightEnabled,
|
|
239
|
-
}) ?? true,
|
|
240
|
-
[defaultFocusHighlightEnabled, haloEffect]
|
|
241
|
-
);
|
|
221
|
+
const platformSpecificHalo =
|
|
222
|
+
tintType !== 'none' &&
|
|
223
|
+
(isIOS ? haloEffect ?? true : defaultFocusHighlightEnabled);
|
|
242
224
|
|
|
243
225
|
return (
|
|
244
226
|
<KeyPressContext.Provider value={bubbled.context}>
|
|
@@ -247,26 +229,24 @@ export const BaseKeyboardView = React.memo(
|
|
|
247
229
|
haloEffect={platformSpecificHalo}
|
|
248
230
|
ref={targetRef as React.RefObject<any>}
|
|
249
231
|
enableContextMenu={enableContextMenu}
|
|
250
|
-
canBeFocused={
|
|
232
|
+
canBeFocused={focusable}
|
|
251
233
|
autoFocus={autoFocus}
|
|
252
|
-
onKeyDownPress={onKeyDownPress
|
|
253
|
-
onKeyUpPress={onKeyUpPress
|
|
234
|
+
onKeyDownPress={onKeyDownPress}
|
|
235
|
+
onKeyUpPress={onKeyUpPress}
|
|
254
236
|
onBubbledContextMenuPress={bubbled.contextMenu}
|
|
255
237
|
groupIdentifier={groupIdentifier ?? contextIdentifier}
|
|
256
238
|
tintColor={isIOS ? tintColor : undefined}
|
|
257
|
-
onFocusChange={
|
|
258
|
-
(hasOnFocusChanged && onFocusChangeHandler) as undefined
|
|
259
|
-
} //ToDo update types
|
|
239
|
+
onFocusChange={hasFocusListener ? onFocusChangeHandler : undefined}
|
|
260
240
|
hasKeyDownPress={Boolean(onKeyDownPress)}
|
|
261
241
|
hasKeyUpPress={Boolean(onKeyUpPress)}
|
|
262
|
-
hasOnFocusChanged={Boolean(
|
|
263
|
-
|
|
242
|
+
hasOnFocusChanged={Boolean(hasFocusListener)}
|
|
243
|
+
focusableWrapper={focusableWrapper}
|
|
264
244
|
orderIndex={orderIndex ?? -1}
|
|
265
|
-
enableA11yFocus={enableA11yFocus}
|
|
266
245
|
screenAutoA11yFocusDelay={screenAutoA11yFocusDelay}
|
|
267
246
|
lockFocus={lockFocusValue}
|
|
268
247
|
{...wrappedOrderProps}
|
|
269
248
|
orderGroup={groupId}
|
|
249
|
+
roundedHaloFix={roundedHaloFix}
|
|
270
250
|
/>
|
|
271
251
|
</KeyPressContext.Provider>
|
|
272
252
|
);
|