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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_components","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_components","_useKeyboardFocusContainer","_useRenderedChildren","_IsViewFocusedContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","withKeyboardFocus","Component","WithKeyboardFocus","React","memo","forwardRef","allProps","ref","focusStyle","style","containerStyle","containerFocusStyle","withPressedStyle","onPress","onLongPress","onKeyUpPress","onKeyDownPress","onPressIn","onPressOut","triggerCodes","autoFocus","focusableWrapper","haloEffect","focusable","tintColor","onFocus","onBlur","onFocusChange","groupIdentifier","haloCornerRadius","haloExpendX","haloExpendY","screenAutoA11yFocus","screenAutoA11yFocusDelay","lockFocus","defaultFocusHighlightEnabled","androidKeyboardPressState","orderIndex","orderGroup","orderId","orderLeft","orderRight","orderUp","orderDown","orderForward","orderBackward","orderFirst","orderLast","componentRef","onComponentFocus","onComponentBlur","renderContent","renderFocusable","roundedHaloFix","tintType","enableA11yFocus","_enableA11yFocus","children","userChildren","props","focused","keyboardPressed","containerFocusedStyle","componentStyleViewStyle","onFocusChangeHandler","onKeyUpPressHandler","onKeyDownPressHandler","onPressHandler","onContextMenuHandler","enableContextMenu","useKeyboardFocusContainer","pressedStyleSignature","RNPressable","renderedChildren","useRenderedChildren","childContent","useMemo","undefined","childrenFn","state","pressed","containerStyleArr","jsx","IsViewFocusedContext","Provider","value","BaseKeyboardView","onContextMenuPress","wrappedComponentName","displayName","name","exports"],"sourceRoot":"../../../src","sources":["utils/withKeyboardFocus.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAQA,IAAAG,0BAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAL,OAAA;AAAuE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OA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,18 +4,17 @@ import React, { useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
|
4
4
|
import { Platform } from 'react-native';
|
|
5
5
|
import { ExternalKeyboardViewNative } from '../../nativeSpec';
|
|
6
6
|
import { Commands } from '../../nativeSpec/ExternalKeyboardViewNativeComponent';
|
|
7
|
-
import { LockFocusEnum } from '../../types
|
|
7
|
+
import { LockFocusEnum } from '../../types';
|
|
8
8
|
import { KeyPressContext } from '../../context/BubbledKeyPressContext';
|
|
9
9
|
import { useBubbledInfo } from './BaseKeyboardView.hooks';
|
|
10
10
|
import { useGroupIdentifierContext } from '../../context/GroupIdentifierContext';
|
|
11
11
|
import { useOnFocusChange } from '../../utils/useOnFocusChange';
|
|
12
12
|
import { useOrderFocusGroup } from '../../context/OrderFocusContext';
|
|
13
|
-
import {
|
|
13
|
+
import { useWrappedOrderProps } from '../../utils/useWrappedOrderProps';
|
|
14
14
|
|
|
15
15
|
// @ts-ignore
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
const isIOS = Platform.OS === 'ios';
|
|
18
|
-
const DEFAULT_EXPOSE_METHODS = ['blur', 'measure', 'measureInWindow', 'measureLayout', 'setNativeProps'];
|
|
19
18
|
var BITS = /*#__PURE__*/function (BITS) {
|
|
20
19
|
BITS[BITS["BIT_01"] = 1] = "BIT_01";
|
|
21
20
|
BITS[BITS["BIT_02"] = 2] = "BIT_02";
|
|
@@ -23,8 +22,6 @@ var BITS = /*#__PURE__*/function (BITS) {
|
|
|
23
22
|
BITS[BITS["BIT_04"] = 8] = "BIT_04";
|
|
24
23
|
BITS[BITS["BIT_05"] = 16] = "BIT_05";
|
|
25
24
|
BITS[BITS["BIT_06"] = 32] = "BIT_06";
|
|
26
|
-
BITS[BITS["BIT_07"] = 64] = "BIT_07";
|
|
27
|
-
BITS[BITS["BIT_08"] = 128] = "BIT_08";
|
|
28
25
|
BITS[BITS["BIT_09"] = 256] = "BIT_09";
|
|
29
26
|
BITS[BITS["BIT_10"] = 512] = "BIT_10";
|
|
30
27
|
return BITS;
|
|
@@ -52,18 +49,14 @@ export const BaseKeyboardView = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwa
|
|
|
52
49
|
onBubbledContextMenuPress,
|
|
53
50
|
haloEffect,
|
|
54
51
|
autoFocus,
|
|
55
|
-
canBeFocused = true,
|
|
56
52
|
focusable = true,
|
|
57
|
-
|
|
53
|
+
focusableWrapper = false,
|
|
58
54
|
onFocus,
|
|
59
55
|
onBlur,
|
|
60
|
-
viewRef,
|
|
61
56
|
groupIdentifier,
|
|
62
57
|
tintColor,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
enableA11yFocus = false,
|
|
66
|
-
screenAutoA11yFocusDelay = 500,
|
|
58
|
+
// TODO: revisit screenAutoA11yFocusDelay default (currently 300ms)
|
|
59
|
+
screenAutoA11yFocusDelay = 300,
|
|
67
60
|
lockFocus,
|
|
68
61
|
orderIndex,
|
|
69
62
|
orderForward,
|
|
@@ -78,11 +71,14 @@ export const BaseKeyboardView = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwa
|
|
|
78
71
|
orderId,
|
|
79
72
|
enableContextMenu,
|
|
80
73
|
orderPrefix: _orderPrefix,
|
|
74
|
+
tintType,
|
|
75
|
+
// Deprecated no-ops: destructured out so they never reach the native view.
|
|
76
|
+
enableA11yFocus: _enableA11yFocus,
|
|
81
77
|
defaultFocusHighlightEnabled = true,
|
|
78
|
+
roundedHaloFix = false,
|
|
82
79
|
...props
|
|
83
80
|
}, ref) => {
|
|
84
|
-
const
|
|
85
|
-
const targetRef = viewRef ?? localRef;
|
|
81
|
+
const targetRef = useRef(null);
|
|
86
82
|
const lockFocusValue = useMemo(() => mapFocusValues(lockFocus), [lockFocus]);
|
|
87
83
|
const contextIdentifier = useGroupIdentifierContext();
|
|
88
84
|
const contextGroupId = useOrderFocusGroup();
|
|
@@ -100,44 +96,53 @@ export const BaseKeyboardView = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwa
|
|
|
100
96
|
}
|
|
101
97
|
}, [orderId, orderForward, orderBackward, orderFirst, orderLast, orderLeft, orderRight, orderUp, orderDown, orderPrefix]);
|
|
102
98
|
useImperativeHandle(ref, () => {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
99
|
+
const nativeCommands = {
|
|
100
|
+
keyboardFocus: () => {
|
|
101
|
+
if (targetRef?.current) {
|
|
102
|
+
Commands.rnekKeyboardFocus(targetRef.current);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
screenReaderFocus: () => {
|
|
106
|
+
if (targetRef?.current) {
|
|
107
|
+
Commands.rnekScreenReaderFocus(targetRef.current);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
focus: () => {
|
|
111
|
+
if (targetRef?.current) {
|
|
112
|
+
Commands.rnekKeyboardFocus(targetRef.current);
|
|
113
|
+
Commands.rnekScreenReaderFocus(targetRef.current);
|
|
114
|
+
}
|
|
113
115
|
}
|
|
114
116
|
};
|
|
115
|
-
return
|
|
116
|
-
|
|
117
|
+
return new Proxy({}, {
|
|
118
|
+
get(_target, prop) {
|
|
119
|
+
if (prop in nativeCommands) {
|
|
120
|
+
return nativeCommands[prop];
|
|
121
|
+
}
|
|
122
|
+
return targetRef?.current?.[prop];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}, [targetRef]);
|
|
117
126
|
const bubbled = useBubbledInfo(onBubbledContextMenuPress);
|
|
118
127
|
const onFocusChangeHandler = useOnFocusChange({
|
|
119
128
|
onFocusChange,
|
|
120
129
|
onFocus,
|
|
121
130
|
onBlur
|
|
122
131
|
});
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const platformSpecificHalo = useMemo(() => Platform.select({
|
|
138
|
-
ios: haloEffect,
|
|
139
|
-
android: defaultFocusHighlightEnabled
|
|
140
|
-
}) ?? true, [defaultFocusHighlightEnabled, haloEffect]);
|
|
132
|
+
const hasFocusListener = onFocusChange || onFocus || onBlur;
|
|
133
|
+
const wrappedOrderProps = useWrappedOrderProps({
|
|
134
|
+
orderPrefix,
|
|
135
|
+
orderId,
|
|
136
|
+
orderForward,
|
|
137
|
+
orderBackward,
|
|
138
|
+
orderFirst,
|
|
139
|
+
orderLast,
|
|
140
|
+
orderLeft,
|
|
141
|
+
orderRight,
|
|
142
|
+
orderUp,
|
|
143
|
+
orderDown
|
|
144
|
+
});
|
|
145
|
+
const platformSpecificHalo = tintType !== 'none' && (isIOS ? haloEffect ?? true : defaultFocusHighlightEnabled);
|
|
141
146
|
return /*#__PURE__*/_jsx(KeyPressContext.Provider, {
|
|
142
147
|
value: bubbled.context,
|
|
143
148
|
children: /*#__PURE__*/_jsx(ExternalKeyboardViewNative, {
|
|
@@ -145,27 +150,24 @@ export const BaseKeyboardView = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwa
|
|
|
145
150
|
haloEffect: platformSpecificHalo,
|
|
146
151
|
ref: targetRef,
|
|
147
152
|
enableContextMenu: enableContextMenu,
|
|
148
|
-
canBeFocused:
|
|
153
|
+
canBeFocused: focusable,
|
|
149
154
|
autoFocus: autoFocus,
|
|
150
|
-
onKeyDownPress: onKeyDownPress
|
|
151
|
-
,
|
|
152
|
-
onKeyUpPress: onKeyUpPress //ToDo update types
|
|
153
|
-
,
|
|
155
|
+
onKeyDownPress: onKeyDownPress,
|
|
156
|
+
onKeyUpPress: onKeyUpPress,
|
|
154
157
|
onBubbledContextMenuPress: bubbled.contextMenu,
|
|
155
158
|
groupIdentifier: groupIdentifier ?? contextIdentifier,
|
|
156
159
|
tintColor: isIOS ? tintColor : undefined,
|
|
157
|
-
onFocusChange:
|
|
158
|
-
,
|
|
160
|
+
onFocusChange: hasFocusListener ? onFocusChangeHandler : undefined,
|
|
159
161
|
hasKeyDownPress: Boolean(onKeyDownPress),
|
|
160
162
|
hasKeyUpPress: Boolean(onKeyUpPress),
|
|
161
|
-
hasOnFocusChanged: Boolean(
|
|
162
|
-
|
|
163
|
+
hasOnFocusChanged: Boolean(hasFocusListener),
|
|
164
|
+
focusableWrapper: focusableWrapper,
|
|
163
165
|
orderIndex: orderIndex ?? -1,
|
|
164
|
-
enableA11yFocus: enableA11yFocus,
|
|
165
166
|
screenAutoA11yFocusDelay: screenAutoA11yFocusDelay,
|
|
166
167
|
lockFocus: lockFocusValue,
|
|
167
168
|
...wrappedOrderProps,
|
|
168
|
-
orderGroup: groupId
|
|
169
|
+
orderGroup: groupId,
|
|
170
|
+
roundedHaloFix: roundedHaloFix
|
|
169
171
|
})
|
|
170
172
|
});
|
|
171
173
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useImperativeHandle","useMemo","useRef","Platform","ExternalKeyboardViewNative","Commands","LockFocusEnum","KeyPressContext","useBubbledInfo","useGroupIdentifierContext","useOnFocusChange","useOrderFocusGroup","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useImperativeHandle","useMemo","useRef","Platform","ExternalKeyboardViewNative","Commands","LockFocusEnum","KeyPressContext","useBubbledInfo","useGroupIdentifierContext","useOnFocusChange","useOrderFocusGroup","useWrappedOrderProps","jsx","_jsx","isIOS","OS","BITS","focusBinaryValue","Up","BIT_01","Down","BIT_02","Left","BIT_03","Right","BIT_04","Forward","BIT_05","Backward","BIT_06","First","BIT_09","Last","BIT_10","mapFocusValues","values","length","reduce","acc","item","BaseKeyboardView","memo","forwardRef","onFocusChange","onKeyUpPress","onKeyDownPress","onBubbledContextMenuPress","haloEffect","autoFocus","focusable","focusableWrapper","onFocus","onBlur","groupIdentifier","tintColor","screenAutoA11yFocusDelay","lockFocus","orderIndex","orderForward","orderBackward","orderFirst","orderLast","orderGroup","orderLeft","orderRight","orderUp","orderDown","orderId","enableContextMenu","orderPrefix","_orderPrefix","tintType","enableA11yFocus","_enableA11yFocus","defaultFocusHighlightEnabled","roundedHaloFix","props","ref","targetRef","lockFocusValue","contextIdentifier","contextGroupId","groupId","__DEV__","undefined","console","warn","hasOrderLinkProp","nativeCommands","keyboardFocus","current","rnekKeyboardFocus","screenReaderFocus","rnekScreenReaderFocus","focus","Proxy","get","_target","prop","bubbled","onFocusChangeHandler","hasFocusListener","wrappedOrderProps","platformSpecificHalo","Provider","value","context","children","canBeFocused","contextMenu","hasKeyDownPress","Boolean","hasKeyUpPress","hasOnFocusChanged"],"sourceRoot":"../../../../src","sources":["components/BaseKeyboardView/BaseKeyboardView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAEVC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AACd,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,0BAA0B,QAAQ,kBAAkB;AAC7D,SAASC,QAAQ,QAAQ,sDAAsD;AAC/E,SACEC,aAAa,QAIR,aAAa;AAEpB,SAASC,eAAe,QAAQ,sCAAsC;AACtE,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,yBAAyB,QAAQ,sCAAsC;AAChF,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,oBAAoB,QAAQ,kCAAkC;;AAEvE;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEA,MAAMC,KAAK,GAAGZ,QAAQ,CAACa,EAAE,KAAK,KAAK;AAAC,IAE/BC,IAAI,0BAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJ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EAAEoB,OAAQ;MACpBP,cAAc,EAAEA;IAAe,CAChC;EAAC,CACsB,CAAC;AAE/B,CACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,45 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, {
|
|
4
|
-
import {
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { TextInput, Platform } from 'react-native';
|
|
5
5
|
import { TextInputFocusWrapperNative } from '../../nativeSpec';
|
|
6
6
|
import { useFocusStyle } from '../../utils/useFocusStyle';
|
|
7
7
|
import { focusEventMapper } from '../../utils/focusEventMapper';
|
|
8
|
-
import { RenderPropComponent } from '../RenderPropComponent/RenderPropComponent';
|
|
9
8
|
import { useGroupIdentifierContext } from '../../context/GroupIdentifierContext';
|
|
10
9
|
import { useOrderFocusGroup } from '../../context/OrderFocusContext';
|
|
10
|
+
import { mapLockFocus } from '../../utils/mapLockFocus';
|
|
11
|
+
import { useOrderValidation } from '../../utils/useOrderValidation';
|
|
12
|
+
import { useWrappedOrderProps } from '../../utils/useWrappedOrderProps';
|
|
11
13
|
import { blurMap, focusMap } from './KeyboardExtendedInput.consts';
|
|
12
|
-
import {
|
|
13
|
-
import { LockFocusEnum } from '../../types/BaseKeyboardView';
|
|
14
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
var BITS = /*#__PURE__*/function (BITS) {
|
|
16
|
-
BITS[BITS["BIT_01"] = 1] = "BIT_01";
|
|
17
|
-
BITS[BITS["BIT_02"] = 2] = "BIT_02";
|
|
18
|
-
BITS[BITS["BIT_03"] = 4] = "BIT_03";
|
|
19
|
-
BITS[BITS["BIT_04"] = 8] = "BIT_04";
|
|
20
|
-
BITS[BITS["BIT_05"] = 16] = "BIT_05";
|
|
21
|
-
BITS[BITS["BIT_06"] = 32] = "BIT_06";
|
|
22
|
-
BITS[BITS["BIT_07"] = 64] = "BIT_07";
|
|
23
|
-
BITS[BITS["BIT_08"] = 128] = "BIT_08";
|
|
24
|
-
BITS[BITS["BIT_09"] = 256] = "BIT_09";
|
|
25
|
-
BITS[BITS["BIT_10"] = 512] = "BIT_10";
|
|
26
|
-
return BITS;
|
|
27
|
-
}(BITS || {});
|
|
28
|
-
const focusBinaryValue = {
|
|
29
|
-
[LockFocusEnum.Up]: BITS.BIT_01,
|
|
30
|
-
[LockFocusEnum.Down]: BITS.BIT_02,
|
|
31
|
-
[LockFocusEnum.Left]: BITS.BIT_03,
|
|
32
|
-
[LockFocusEnum.Right]: BITS.BIT_04,
|
|
33
|
-
[LockFocusEnum.Forward]: BITS.BIT_05,
|
|
34
|
-
[LockFocusEnum.Backward]: BITS.BIT_06,
|
|
35
|
-
[LockFocusEnum.First]: BITS.BIT_09,
|
|
36
|
-
[LockFocusEnum.Last]: BITS.BIT_10
|
|
37
|
-
};
|
|
38
|
-
const mapLockFocus = values => {
|
|
39
|
-
if (!values || !values.length) return 0;
|
|
40
|
-
// eslint-disable-next-line no-bitwise
|
|
41
|
-
return values.reduce((acc, item) => acc | focusBinaryValue[item], 0);
|
|
42
|
-
};
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
43
15
|
const isIOS = Platform.OS === 'ios';
|
|
44
16
|
export const KeyboardExtendedInput = /*#__PURE__*/React.forwardRef(({
|
|
45
17
|
focusType = 'default',
|
|
@@ -49,12 +21,10 @@ export const KeyboardExtendedInput = /*#__PURE__*/React.forwardRef(({
|
|
|
49
21
|
focusStyle,
|
|
50
22
|
style,
|
|
51
23
|
haloEffect = true,
|
|
52
|
-
|
|
24
|
+
roundedHaloFix = false,
|
|
53
25
|
focusable = true,
|
|
54
26
|
containerFocusStyle,
|
|
55
27
|
tintColor,
|
|
56
|
-
tintType = 'default',
|
|
57
|
-
FocusHoverComponent,
|
|
58
28
|
onSubmitEditing,
|
|
59
29
|
submitBehavior,
|
|
60
30
|
groupIdentifier,
|
|
@@ -68,89 +38,85 @@ export const KeyboardExtendedInput = /*#__PURE__*/React.forwardRef(({
|
|
|
68
38
|
orderRight,
|
|
69
39
|
orderUp,
|
|
70
40
|
orderDown,
|
|
41
|
+
orderFirst,
|
|
42
|
+
orderLast,
|
|
71
43
|
rejectResponderTermination,
|
|
72
44
|
selectionHandleColor,
|
|
73
45
|
cursorColor,
|
|
74
46
|
maxFontSizeMultiplier,
|
|
75
|
-
orderFirst,
|
|
76
|
-
orderLast,
|
|
77
47
|
defaultFocusHighlightEnabled = true,
|
|
48
|
+
tintType,
|
|
78
49
|
orderPrefix: _orderPrefix,
|
|
79
50
|
...props
|
|
80
51
|
}, ref) => {
|
|
81
52
|
const {
|
|
82
|
-
focused,
|
|
83
53
|
containerFocusedStyle,
|
|
84
54
|
componentFocusedStyle,
|
|
85
|
-
onFocusChangeHandler
|
|
86
|
-
hoverColor
|
|
55
|
+
onFocusChangeHandler
|
|
87
56
|
} = useFocusStyle({
|
|
88
57
|
onFocusChange,
|
|
89
|
-
tintColor,
|
|
90
58
|
focusStyle,
|
|
91
|
-
containerFocusStyle
|
|
92
|
-
tintType
|
|
59
|
+
containerFocusStyle
|
|
93
60
|
});
|
|
94
61
|
const contextIdentifier = useGroupIdentifierContext();
|
|
95
62
|
const contextGroupId = useOrderFocusGroup();
|
|
96
63
|
const groupId = orderGroup ?? contextGroupId;
|
|
97
64
|
const orderPrefix = _orderPrefix ?? contextGroupId ?? '';
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
65
|
+
useOrderValidation({
|
|
66
|
+
groupId,
|
|
67
|
+
orderPrefix,
|
|
68
|
+
orderIndex,
|
|
69
|
+
orderId,
|
|
70
|
+
orderForward,
|
|
71
|
+
orderBackward,
|
|
72
|
+
orderFirst,
|
|
73
|
+
orderLast,
|
|
74
|
+
orderLeft,
|
|
75
|
+
orderRight,
|
|
76
|
+
orderUp,
|
|
77
|
+
orderDown
|
|
101
78
|
});
|
|
79
|
+
const wrappedOrderProps = useWrappedOrderProps({
|
|
80
|
+
orderPrefix,
|
|
81
|
+
orderId,
|
|
82
|
+
orderForward,
|
|
83
|
+
orderBackward,
|
|
84
|
+
orderFirst,
|
|
85
|
+
orderLast,
|
|
86
|
+
orderLeft,
|
|
87
|
+
orderRight,
|
|
88
|
+
orderUp,
|
|
89
|
+
orderDown
|
|
90
|
+
});
|
|
91
|
+
const hasFocusListener = Boolean(onFocusChange || focusStyle || containerFocusStyle);
|
|
102
92
|
const nativeFocusHandler = useMemo(() => focusEventMapper(onFocusChangeHandler), [onFocusChangeHandler]);
|
|
103
|
-
const HoverComonent = useMemo(() => {
|
|
104
|
-
if (FocusHoverComponent) return FocusHoverComponent;
|
|
105
|
-
if (tintType === 'hover') return /*#__PURE__*/_jsx(View, {
|
|
106
|
-
style: [hoverColor, styles.absolute, styles.opacity]
|
|
107
|
-
});
|
|
108
|
-
return undefined;
|
|
109
|
-
}, [FocusHoverComponent, hoverColor, tintType]);
|
|
110
93
|
const blurOnSubmit = submitBehavior ? submitBehavior === 'blurAndSubmit' : props.blurOnSubmit ?? true;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
console.warn('[react-native-external-keyboard] orderId, orderForward, orderBackward, orderFirst, orderLast, ' + 'orderLeft, orderRight, orderUp, and orderDown are global IDs. ' + 'Wrap the component in <KeyboardOrderFocusGroup> or pass orderPrefix to avoid ID collisions across screens.');
|
|
120
|
-
}
|
|
121
|
-
}, [orderId, orderForward, orderBackward, orderFirst, orderLast, orderLeft, orderRight, orderUp, orderDown, orderPrefix]);
|
|
122
|
-
const wrapPrefix = useMemo(() => wrapOrderPrefix(orderPrefix), [orderPrefix]);
|
|
123
|
-
const wrappedOrderProps = useMemo(() => ({
|
|
124
|
-
orderId: wrapPrefix(orderId),
|
|
125
|
-
orderForward: wrapPrefix(orderForward),
|
|
126
|
-
orderBackward: wrapPrefix(orderBackward),
|
|
127
|
-
orderLeft: wrapPrefix(orderLeft),
|
|
128
|
-
orderRight: wrapPrefix(orderRight),
|
|
129
|
-
orderUp: wrapPrefix(orderUp),
|
|
130
|
-
orderDown: wrapPrefix(orderDown),
|
|
131
|
-
orderFirst: wrapPrefix(orderFirst === null ? undefined : orderFirst ?? orderForward),
|
|
132
|
-
orderLast: wrapPrefix(orderLast === null ? undefined : orderLast ?? orderBackward)
|
|
133
|
-
}), [wrapPrefix, orderId, orderForward, orderBackward, orderLeft, orderRight, orderUp, orderDown, orderFirst, orderLast]);
|
|
134
|
-
return /*#__PURE__*/_jsxs(TextInputFocusWrapperNative, {
|
|
135
|
-
onFocusChange: nativeFocusHandler //ToDo update type
|
|
136
|
-
,
|
|
94
|
+
const withHaloEffect = tintType !== 'none' && Platform.select({
|
|
95
|
+
ios: haloEffect,
|
|
96
|
+
android: defaultFocusHighlightEnabled
|
|
97
|
+
});
|
|
98
|
+
const isContainerFocusable = !isIOS && focusable ? undefined : false;
|
|
99
|
+
return /*#__PURE__*/_jsx(TextInputFocusWrapperNative, {
|
|
100
|
+
onFocusChange: hasFocusListener ? nativeFocusHandler : undefined,
|
|
101
|
+
hasOnFocusChanged: hasFocusListener,
|
|
137
102
|
focusType: focusMap[focusType],
|
|
138
103
|
blurType: blurMap[blurType],
|
|
139
104
|
style: [containerStyle, containerFocusedStyle],
|
|
140
105
|
haloEffect: withHaloEffect,
|
|
106
|
+
roundedHaloFix: withHaloEffect === false && roundedHaloFix,
|
|
141
107
|
multiline: props.multiline,
|
|
142
108
|
blurOnSubmit: blurOnSubmit,
|
|
143
109
|
onMultiplyTextSubmit: onSubmitEditing,
|
|
144
|
-
canBeFocused:
|
|
110
|
+
canBeFocused: isContainerFocusable,
|
|
145
111
|
tintColor: isIOS ? tintColor : undefined,
|
|
146
112
|
groupIdentifier: groupIdentifier ?? contextIdentifier,
|
|
147
113
|
lockFocus: mapLockFocus(lockFocus),
|
|
148
114
|
orderGroup: groupId,
|
|
149
115
|
orderIndex: orderIndex ?? -1,
|
|
150
116
|
...wrappedOrderProps,
|
|
151
|
-
children:
|
|
117
|
+
children: /*#__PURE__*/_jsx(TextInput, {
|
|
152
118
|
ref: ref,
|
|
153
|
-
editable:
|
|
119
|
+
editable: focusable,
|
|
154
120
|
style: [style, componentFocusedStyle],
|
|
155
121
|
onSubmitEditing: onSubmitEditing,
|
|
156
122
|
submitBehavior: submitBehavior,
|
|
@@ -159,21 +125,7 @@ export const KeyboardExtendedInput = /*#__PURE__*/React.forwardRef(({
|
|
|
159
125
|
cursorColor: cursorColor ?? undefined,
|
|
160
126
|
maxFontSizeMultiplier: maxFontSizeMultiplier ?? undefined,
|
|
161
127
|
...props
|
|
162
|
-
})
|
|
163
|
-
render: HoverComonent
|
|
164
|
-
})]
|
|
128
|
+
})
|
|
165
129
|
});
|
|
166
130
|
});
|
|
167
|
-
const styles = StyleSheet.create({
|
|
168
|
-
absolute: {
|
|
169
|
-
position: 'absolute',
|
|
170
|
-
top: 0,
|
|
171
|
-
left: 0,
|
|
172
|
-
right: 0,
|
|
173
|
-
bottom: 0
|
|
174
|
-
},
|
|
175
|
-
opacity: {
|
|
176
|
-
opacity: 0.3
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
131
|
//# sourceMappingURL=KeyboardExtendedInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","useMemo","TextInput","Platform","TextInputFocusWrapperNative","useFocusStyle","focusEventMapper","useGroupIdentifierContext","useOrderFocusGroup","mapLockFocus","useOrderValidation","useWrappedOrderProps","blurMap","focusMap","jsx","_jsx","isIOS","OS","KeyboardExtendedInput","forwardRef","focusType","blurType","containerStyle","onFocusChange","focusStyle","style","haloEffect","roundedHaloFix","focusable","containerFocusStyle","tintColor","onSubmitEditing","submitBehavior","groupIdentifier","lockFocus","orderGroup","orderIndex","orderId","orderForward","orderBackward","orderLeft","orderRight","orderUp","orderDown","orderFirst","orderLast","rejectResponderTermination","selectionHandleColor","cursorColor","maxFontSizeMultiplier","defaultFocusHighlightEnabled","tintType","orderPrefix","_orderPrefix","props","ref","containerFocusedStyle","componentFocusedStyle","onFocusChangeHandler","contextIdentifier","contextGroupId","groupId","wrappedOrderProps","hasFocusListener","Boolean","nativeFocusHandler","blurOnSubmit","withHaloEffect","select","ios","android","isContainerFocusable","undefined","hasOnFocusChanged","multiline","onMultiplyTextSubmit","canBeFocused","children","editable"],"sourceRoot":"../../../../src","sources":["components/KeyboardExtendedInput/KeyboardExtendedInput.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,cAAc;AAElD,SAASC,2BAA2B,QAAQ,kBAAkB;AAC9D,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,yBAAyB,QAAQ,sCAAsC;AAChF,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,kBAAkB,QAAQ,gCAAgC;AACnE,SAASC,oBAAoB,QAAQ,kCAAkC;AAEvE,SAASC,OAAO,EAAEC,QAAQ,QAAQ,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnE,MAAMC,KAAK,GAAGb,QAAQ,CAACc,EAAE,KAAK,KAAK;AAEnC,OAAO,MAAMC,qBAAqB,gBAAGlB,KAAK,CAACmB,UAAU,CAInD,CACE;EACEC,SAAS,GAAG,SAAS;EACrBC,QAAQ,GAAG,SAAS;EACpBC,cAAc;EACdC,aAAa;EACbC,UAAU;EACVC,KAAK;EACLC,UAAU,GAAG,IAAI;EACjBC,cAAc,GAAG,KAAK;EACtBC,SAAS,GAAG,IAAI;EAChBC,mBAAmB;EACnBC,SAAS;EACTC,eAAe;EACfC,cAAc;EACdC,eAAe;EACfC,SAAS;EACTC,UAAU;EACVC,UAAU;EACVC,OAAO;EACPC,YAAY;EACZC,aAAa;EACbC,SAAS;EACTC,UAAU;EACVC,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AoB,IAAIyB,SAAU;MACxDxB,WAAW,EAAEA,WAAW,IAAIwB,SAAU;MACtCvB,qBAAqB,EAAEA,qBAAqB,IAAIuB,SAAU;MAAA,GACtDlB;IAAK,CACV;EAAC,CACyB,CAAC;AAElC,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","KeyboardFocusGroupNative","useOnFocusChange","useFocusStyle","jsx","_jsx","KeyboardFocusGroup","memo","props","containerFocusedStyle","focusStyle","onFocusChangeHandler","onFocusChange","containerFocusStyle","onGroupFocusChangeHandler","style","onGroupFocusChange"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusGroup/KeyboardFocusGroup.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,
|
|
1
|
+
{"version":3,"names":["React","KeyboardFocusGroupNative","useOnFocusChange","useFocusStyle","jsx","_jsx","KeyboardFocusGroup","memo","props","containerFocusedStyle","focusStyle","onFocusChangeHandler","onFocusChange","containerFocusStyle","onGroupFocusChangeHandler","style","onGroupFocusChange"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusGroup/KeyboardFocusGroup.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,wBAAwB,QAAQ,kBAAkB;AAC3D,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,aAAa,QAAQ,2BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAK1D,OAAO,MAAMC,kBAAkB,gBAAGN,KAAK,CAACO,IAAI,CACzCC,KAAK,IAAK;EACT,MAAM;IAAEC,qBAAqB,EAAEC,UAAU;IAAEC;EAAqB,CAAC,GAC/DR,aAAa,CAAC;IACZS,aAAa,EAAEJ,KAAK,CAACI,aAAa;IAClCC,mBAAmB,EAAEL,KAAK,CAACE;EAC7B,CAAC,CAAC;EAEJ,MAAMI,yBAAyB,GAAGZ,gBAAgB,CAAC;IACjD,GAAGM,KAAK;IACRI,aAAa,EAAED;EACjB,CAAC,CAAC;EAEF,oBACEN,IAAA,CAACJ,wBAAwB;IAAA,GACnBO,KAAK;IACTO,KAAK,EAAE,CAACP,KAAK,CAACO,KAAK,EAAEL,UAAU,CAAE;IACjCM,kBAAkB,EAAEF;EAA0B,CAC/C,CAAC;AAEN,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","KeyboardFocusGroupNative","GroupIdentifierContext","useOnFocusChange","useFocusStyle","jsx","_jsx","KeyboardFocusGroup","memo","props","groupIdentifier","containerFocusedStyle","focusStyle","onFocusChangeHandler","onFocusChange","containerFocusStyle","onGroupFocusChangeHandler","style","onGroupFocusChange","Provider","value","children"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusGroup/KeyboardFocusGroup.ios.tsx"],"mappings":";;AAAA,OAAOA,KAAK,
|
|
1
|
+
{"version":3,"names":["React","KeyboardFocusGroupNative","GroupIdentifierContext","useOnFocusChange","useFocusStyle","jsx","_jsx","KeyboardFocusGroup","memo","props","groupIdentifier","containerFocusedStyle","focusStyle","onFocusChangeHandler","onFocusChange","containerFocusStyle","onGroupFocusChangeHandler","style","onGroupFocusChange","Provider","value","children"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusGroup/KeyboardFocusGroup.ios.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,wBAAwB,QAAQ,kBAAkB;AAC3D,SAASC,sBAAsB,QAAQ,sCAAsC;AAC7E,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,aAAa,QAAQ,2BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAK1D,OAAO,MAAMC,kBAAkB,gBAAGP,KAAK,CAACQ,IAAI,CACzCC,KAAK,IAAK;EACT,MAAM;IAAEC;EAAgB,CAAC,GAAGD,KAAK;EAEjC,MAAM;IAAEE,qBAAqB,EAAEC,UAAU;IAAEC;EAAqB,CAAC,GAC/DT,aAAa,CAAC;IACZU,aAAa,EAAEL,KAAK,CAACK,aAAa;IAClCC,mBAAmB,EAAEN,KAAK,CAACG;EAC7B,CAAC,CAAC;EAEJ,MAAMI,yBAAyB,GAAGb,gBAAgB,CAAC;IACjD,GAAGM,KAAK;IACRK,aAAa,EAAED;EACjB,CAAC,CAAC;EAEF,IAAI,CAACH,eAAe,EAClB,oBACEJ,IAAA,CAACL,wBAAwB;IAAA,GACnBQ,KAAK;IACTQ,KAAK,EAAE,CAACR,KAAK,CAACQ,KAAK,EAAEL,UAAU,CAAE;IACjCM,kBAAkB,EAAEF;EAA0B,CAC/C,CAAC;EAGN,oBACEV,IAAA,CAACJ,sBAAsB,CAACiB,QAAQ;IAACC,KAAK,EAAEV,eAAgB;IAAAW,QAAA,eACtDf,IAAA,CAACL,wBAAwB;MAAA,GACnBQ,KAAK;MACTQ,KAAK,EAAE,CAACR,KAAK,CAACQ,KAAK,EAAEL,UAAU,CAAE;MACjCM,kBAAkB,EAAEF;IAA0B,CAC/C;EAAC,CAC6B,CAAC;AAEtC,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","KeyboardFocusGroup"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusGroup/KeyboardFocusGroup.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["View","KeyboardFocusGroup"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusGroup/KeyboardFocusGroup.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AAKnC,OAAO,MAAMC,kBAAkB,GAC7BD,IAAoD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusGroup/KeyboardFocusGroup.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { FrameProvider } from '../../../context/FocusFrameProviderContext';
|
|
5
5
|
import { KeyboardFocusLockBase } from '../KeyboardFocusLockBase/KeyboardFocusLockBase';
|
|
6
|
+
import { LockComponentType } from '../../../types';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export const FocusFrame = /*#__PURE__*/React.memo(({
|
|
8
9
|
lockDisabled = false,
|
|
@@ -11,7 +12,7 @@ export const FocusFrame = /*#__PURE__*/React.memo(({
|
|
|
11
12
|
return /*#__PURE__*/_jsx(FrameProvider, {
|
|
12
13
|
children: /*#__PURE__*/_jsx(KeyboardFocusLockBase, {
|
|
13
14
|
...props,
|
|
14
|
-
componentType:
|
|
15
|
+
componentType: LockComponentType.Frame,
|
|
15
16
|
lockDisabled: lockDisabled
|
|
16
17
|
})
|
|
17
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","FrameProvider","KeyboardFocusLockBase","jsx","_jsx","FocusFrame","memo","lockDisabled","props","children","componentType"],"sourceRoot":"../../../../../src","sources":["components/KeyboardFocusLock/FocusFrame/FocusFrame.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,QAAQ,4CAA4C;AAC1E,SAASC,qBAAqB,QAAQ,gDAAgD;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","FrameProvider","KeyboardFocusLockBase","LockComponentType","jsx","_jsx","FocusFrame","memo","lockDisabled","props","children","componentType","Frame"],"sourceRoot":"../../../../../src","sources":["components/KeyboardFocusLock/FocusFrame/FocusFrame.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,QAAQ,4CAA4C;AAC1E,SAASC,qBAAqB,QAAQ,gDAAgD;AACtF,SAASC,iBAAiB,QAAqC,gBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhF,OAAO,MAAMC,UAAU,gBAAGN,KAAK,CAACO,IAAI,CAClC,CAAC;EAAEC,YAAY,GAAG,KAAK;EAAE,GAAGC;AAAM,CAAC,KAAK;EACtC,oBACEJ,IAAA,CAACJ,aAAa;IAAAS,QAAA,eACZL,IAAA,CAACH,qBAAqB;MAAA,GAChBO,KAAK;MACTE,aAAa,EAAER,iBAAiB,CAACS,KAAM;MACvCJ,YAAY,EAAEA;IAAa,CAC5B;EAAC,CACW,CAAC;AAEpB,CACF,CAAC","ignoreList":[]}
|