@react-native-ohos/react-native-keyboard-controller 1.17.0-beta.2 → 1.17.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/LICENSE +21 -21
- package/README.OpenSource +11 -11
- package/README.md +686 -19
- package/harmony/keyboard_controller/BuildProfile.ets +16 -16
- package/harmony/keyboard_controller/Index.ets +29 -28
- package/harmony/keyboard_controller/build-profile.json5 +31 -31
- package/harmony/keyboard_controller/hvigorfile.ts +6 -6
- package/harmony/keyboard_controller/obfuscation-rules.txt +17 -17
- package/harmony/keyboard_controller/oh-package-lock.json5 +28 -18
- package/harmony/keyboard_controller/oh-package.json5 +10 -10
- package/harmony/keyboard_controller/src/main/cpp/CMakeLists.txt +7 -7
- package/harmony/keyboard_controller/src/main/cpp/ClippingScrollViewComponentDescriptor.h +86 -0
- package/harmony/keyboard_controller/src/main/cpp/ClippingScrollViewComponentInstance.cpp +104 -0
- package/harmony/keyboard_controller/src/main/cpp/ClippingScrollViewComponentInstance.h +64 -0
- package/harmony/keyboard_controller/src/main/cpp/ClippingScrollViewJSIBinder.h +60 -0
- package/harmony/keyboard_controller/src/main/cpp/EventEmitters.cpp +119 -96
- package/harmony/keyboard_controller/src/main/cpp/EventEmitters.h +111 -111
- package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentDescriptor.h +94 -94
- package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentInstance.cpp +840 -288
- package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentInstance.h +169 -103
- package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewJSIBinder.h +65 -65
- package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentDescriptor.h +79 -79
- package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentInstance.cpp +108 -108
- package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentInstance.h +83 -83
- package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaJSIBinder.h +60 -60
- package/harmony/keyboard_controller/src/main/cpp/KeyboardToolbarGroupViewComponentDescriptor.h +46 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardToolbarGroupViewComponentInstance.cpp +37 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardToolbarGroupViewComponentInstance.h +32 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardToolbarGroupViewJSIBinder.h +23 -0
- package/harmony/keyboard_controller/src/main/cpp/RNKeyboardController.cpp +103 -46
- package/harmony/keyboard_controller/src/main/cpp/RNKeyboardController.h +48 -48
- package/harmony/keyboard_controller/src/main/cpp/RNKeyboardControllerPackage.h +20 -0
- package/harmony/keyboard_controller/src/main/cpp/RNStatusBarManagerCompat.cpp +45 -45
- package/harmony/keyboard_controller/src/main/cpp/RNStatusBarManagerCompat.h +49 -49
- package/harmony/keyboard_controller/src/main/cpp/ViewHierarchyNavigator.cpp +207 -186
- package/harmony/keyboard_controller/src/main/cpp/ViewHierarchyNavigator.h +131 -112
- package/harmony/keyboard_controller/src/main/cpp/keyboardControllerPackage.cpp +77 -64
- package/harmony/keyboard_controller/src/main/cpp/keyboardControllerPackage.h +85 -77
- package/harmony/keyboard_controller/src/main/ets/Logger.ts +66 -66
- package/harmony/keyboard_controller/src/main/ets/{RNKeyboardControllerPackage.ts → RNKeyboardControllerPackage.ets} +70 -66
- package/harmony/keyboard_controller/src/main/ets/RNKeyboardControllerTurboModule.ts +465 -273
- package/harmony/keyboard_controller/src/main/ets/RNStatusBarManagerCompatTurboModule.ts +128 -119
- package/harmony/keyboard_controller/src/main/ets/Type.ts +63 -62
- package/harmony/keyboard_controller/src/main/module.json5 +11 -11
- package/harmony/keyboard_controller/src/main/resources/base/element/string.json +8 -8
- package/harmony/keyboard_controller/src/main/resources/en_US/element/string.json +8 -8
- package/harmony/keyboard_controller/src/main/resources/zh_CN/element/string.json +8 -8
- package/harmony/keyboard_controller/{ts.ts → ts.ets} +29 -29
- package/harmony/keyboard_controller.har +0 -0
- package/lib/commonjs/animated.js +22 -11
- package/lib/commonjs/animated.js.map +1 -1
- package/lib/commonjs/architecture.js +8 -0
- package/lib/commonjs/architecture.js.map +1 -0
- package/lib/commonjs/bindings.js +40 -5
- package/lib/commonjs/bindings.js.map +1 -1
- package/lib/commonjs/bindings.native.js +28 -5
- package/lib/commonjs/bindings.native.js.map +1 -1
- package/lib/commonjs/compat.js +50 -0
- package/lib/commonjs/compat.js.map +1 -0
- package/lib/commonjs/components/KeyboardAvoidingView/hooks.js +21 -15
- package/lib/commonjs/components/KeyboardAvoidingView/hooks.js.map +1 -1
- package/lib/commonjs/components/KeyboardAvoidingView/index.js +39 -14
- package/lib/commonjs/components/KeyboardAvoidingView/index.js.map +1 -1
- package/lib/commonjs/components/KeyboardAwareScrollView/index.js +94 -57
- package/lib/commonjs/components/KeyboardAwareScrollView/index.js.map +1 -1
- package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +5 -5
- package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -1
- package/lib/commonjs/components/KeyboardAwareScrollView/utils.js.map +1 -1
- package/lib/commonjs/components/KeyboardChatScrollView/hooks.js +13 -0
- package/lib/commonjs/components/KeyboardChatScrollView/hooks.js.map +1 -0
- package/lib/commonjs/components/KeyboardChatScrollView/index.js +122 -0
- package/lib/commonjs/components/KeyboardChatScrollView/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardChatScrollView/types.js +6 -0
- package/lib/commonjs/components/KeyboardChatScrollView/types.js.map +1 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/helpers.js +221 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/helpers.js.map +1 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js +149 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js.map +1 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.js +240 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/types.js +6 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/types.js.map +1 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useEndVisible.js +40 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useEndVisible.js.map +1 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js +92 -0
- package/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardStickyView/index.js.map +1 -1
- package/lib/commonjs/components/KeyboardToolbar/Arrow.js +2 -3
- package/lib/commonjs/components/KeyboardToolbar/Arrow.js.map +1 -1
- package/lib/commonjs/components/KeyboardToolbar/Button.js +2 -3
- package/lib/commonjs/components/KeyboardToolbar/Button.js.map +1 -1
- package/lib/commonjs/components/KeyboardToolbar/colors.js.map +1 -1
- package/lib/commonjs/components/KeyboardToolbar/colors.native.js.map +1 -1
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Background.js +13 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Background.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Content.js +25 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Content.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Done.js +58 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Done.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Next.js +49 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Next.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Prev.js +49 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/Prev.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/index.js +42 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/types.js +6 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/components/types.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/context.js +17 -0
- package/lib/commonjs/components/KeyboardToolbar/compound/context.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/constants.js +17 -0
- package/lib/commonjs/components/KeyboardToolbar/constants.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/index.js +98 -87
- package/lib/commonjs/components/KeyboardToolbar/index.js.map +1 -1
- package/lib/commonjs/components/KeyboardToolbar/types.js.map +1 -1
- package/lib/commonjs/components/ScrollViewWithBottomPadding/index.js +120 -0
- package/lib/commonjs/components/ScrollViewWithBottomPadding/index.js.map +1 -0
- package/lib/commonjs/components/ScrollViewWithBottomPadding/styles.js +15 -0
- package/lib/commonjs/components/ScrollViewWithBottomPadding/styles.js.map +1 -0
- package/lib/commonjs/components/hooks/useColorScheme.js.map +1 -1
- package/lib/commonjs/components/hooks/useCombinedRef.js +24 -0
- package/lib/commonjs/components/hooks/useCombinedRef.js.map +1 -0
- package/lib/commonjs/components/hooks/useScrollState.js +62 -0
- package/lib/commonjs/components/hooks/useScrollState.js.map +1 -0
- package/lib/commonjs/components/index.js +7 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/constants.js +3 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/context.js +1 -0
- package/lib/commonjs/context.js.map +1 -1
- package/lib/commonjs/hooks/index.js +14 -1
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/useKeyboardState/index.js +39 -0
- package/lib/commonjs/hooks/useKeyboardState/index.js.map +1 -0
- package/lib/commonjs/hooks/useWindowDimensions/index.android.js.map +1 -1
- package/lib/commonjs/hooks/useWindowDimensions/index.js.map +1 -1
- package/lib/commonjs/index.js +27 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal.js +54 -18
- package/lib/commonjs/internal.js.map +1 -1
- package/lib/commonjs/module.js +21 -12
- package/lib/commonjs/module.js.map +1 -1
- package/lib/commonjs/reanimated.js.map +1 -1
- package/lib/commonjs/reanimated.native.js.map +1 -1
- package/lib/commonjs/specs/ClippingScrollViewDecoratorViewNativeComponent.js +12 -0
- package/lib/commonjs/specs/ClippingScrollViewDecoratorViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js +8 -2
- package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js +2 -1
- package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/KeyboardToolbarGroupViewNativeComponent.js +12 -0
- package/lib/commonjs/specs/KeyboardToolbarGroupViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/NativeKeyboardController.js.map +1 -1
- package/lib/commonjs/specs/NativeStatusBarManagerCompat.js.map +1 -1
- package/lib/commonjs/specs/OverKeyboardViewNativeComponent.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/findNodeHandle/index.js +9 -0
- package/lib/commonjs/utils/findNodeHandle/index.js.map +1 -0
- package/lib/commonjs/utils/findNodeHandle/index.native.js +13 -0
- package/lib/commonjs/utils/findNodeHandle/index.native.js.map +1 -0
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/views/KeyboardExtender/index.js +30 -0
- package/lib/commonjs/views/KeyboardExtender/index.js.map +1 -0
- package/lib/commonjs/views/OverKeyboardView/index.js.map +1 -1
- package/lib/commonjs/views/index.js +7 -0
- package/lib/commonjs/views/index.js.map +1 -1
- package/lib/module/animated.js +24 -13
- package/lib/module/animated.js.map +1 -1
- package/lib/module/architecture.js +2 -0
- package/lib/module/architecture.js.map +1 -0
- package/lib/module/bindings.js +39 -5
- package/lib/module/bindings.js.map +1 -1
- package/lib/module/bindings.native.js +27 -5
- package/lib/module/bindings.native.js.map +1 -1
- package/lib/module/compat.js +43 -0
- package/lib/module/compat.js.map +1 -0
- package/lib/module/components/KeyboardAvoidingView/hooks.js +22 -16
- package/lib/module/components/KeyboardAvoidingView/hooks.js.map +1 -1
- package/lib/module/components/KeyboardAvoidingView/index.js +38 -14
- package/lib/module/components/KeyboardAvoidingView/index.js.map +1 -1
- package/lib/module/components/KeyboardAwareScrollView/index.js +97 -60
- package/lib/module/components/KeyboardAwareScrollView/index.js.map +1 -1
- package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +5 -5
- package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -1
- package/lib/module/components/KeyboardAwareScrollView/utils.js.map +1 -1
- package/lib/module/components/KeyboardChatScrollView/hooks.js +2 -0
- package/lib/module/components/KeyboardChatScrollView/hooks.js.map +1 -0
- package/lib/module/components/KeyboardChatScrollView/index.js +115 -0
- package/lib/module/components/KeyboardChatScrollView/index.js.map +1 -0
- package/lib/module/components/KeyboardChatScrollView/types.js +2 -0
- package/lib/module/components/KeyboardChatScrollView/types.js.map +1 -0
- package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/helpers.js +207 -0
- package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/helpers.js.map +1 -0
- package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js +143 -0
- package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js.map +1 -0
- package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.js +234 -0
- package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.js.map +1 -0
- package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/types.js +2 -0
- package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/types.js.map +1 -0
- package/lib/module/components/KeyboardChatScrollView/useEndVisible.js +33 -0
- package/lib/module/components/KeyboardChatScrollView/useEndVisible.js.map +1 -0
- package/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js +87 -0
- package/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js.map +1 -0
- package/lib/module/components/KeyboardStickyView/index.js.map +1 -1
- package/lib/module/components/KeyboardToolbar/Arrow.js +2 -2
- package/lib/module/components/KeyboardToolbar/Arrow.js.map +1 -1
- package/lib/module/components/KeyboardToolbar/Button.js +2 -2
- package/lib/module/components/KeyboardToolbar/Button.js.map +1 -1
- package/lib/module/components/KeyboardToolbar/colors.js.map +1 -1
- package/lib/module/components/KeyboardToolbar/colors.native.js.map +1 -1
- package/lib/module/components/KeyboardToolbar/compound/components/Background.js +6 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Background.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Content.js +18 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Content.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Done.js +50 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Done.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Next.js +41 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Next.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Prev.js +41 -0
- package/lib/module/components/KeyboardToolbar/compound/components/Prev.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/compound/components/index.js +6 -0
- package/lib/module/components/KeyboardToolbar/compound/components/index.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/compound/components/types.js +2 -0
- package/lib/module/components/KeyboardToolbar/compound/components/types.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/compound/context.js +10 -0
- package/lib/module/components/KeyboardToolbar/compound/context.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/constants.js +11 -0
- package/lib/module/components/KeyboardToolbar/constants.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/index.js +98 -88
- package/lib/module/components/KeyboardToolbar/index.js.map +1 -1
- package/lib/module/components/KeyboardToolbar/types.js.map +1 -1
- package/lib/module/components/ScrollViewWithBottomPadding/index.js +112 -0
- package/lib/module/components/ScrollViewWithBottomPadding/index.js.map +1 -0
- package/lib/module/components/ScrollViewWithBottomPadding/styles.js +9 -0
- package/lib/module/components/ScrollViewWithBottomPadding/styles.js.map +1 -0
- package/lib/module/components/hooks/useColorScheme.js.map +1 -1
- package/lib/module/components/hooks/useCombinedRef.js +18 -0
- package/lib/module/components/hooks/useCombinedRef.js.map +1 -0
- package/lib/module/components/hooks/useScrollState.js +56 -0
- package/lib/module/components/hooks/useScrollState.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/constants.js +3 -0
- package/lib/module/constants.js.map +1 -1
- package/lib/module/context.js +1 -0
- package/lib/module/context.js.map +1 -1
- package/lib/module/hooks/index.js +3 -1
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useKeyboardState/index.js +33 -0
- package/lib/module/hooks/useKeyboardState/index.js.map +1 -0
- package/lib/module/hooks/useWindowDimensions/index.android.js.map +1 -1
- package/lib/module/hooks/useWindowDimensions/index.js.map +1 -1
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal.js +53 -18
- package/lib/module/internal.js.map +1 -1
- package/lib/module/module.js +21 -12
- package/lib/module/module.js.map +1 -1
- package/lib/module/reanimated.js.map +1 -1
- package/lib/module/reanimated.native.js.map +1 -1
- package/lib/module/specs/ClippingScrollViewDecoratorViewNativeComponent.js +6 -0
- package/lib/module/specs/ClippingScrollViewDecoratorViewNativeComponent.js.map +1 -0
- package/lib/module/specs/KeyboardControllerViewNativeComponent.js +7 -1
- package/lib/module/specs/KeyboardControllerViewNativeComponent.js.map +1 -1
- package/lib/module/specs/KeyboardGestureAreaNativeComponent.js +2 -1
- package/lib/module/specs/KeyboardGestureAreaNativeComponent.js.map +1 -1
- package/lib/module/specs/KeyboardToolbarGroupViewNativeComponent.js +5 -0
- package/lib/module/specs/KeyboardToolbarGroupViewNativeComponent.js.map +1 -0
- package/lib/module/specs/NativeKeyboardController.js.map +1 -1
- package/lib/module/specs/NativeStatusBarManagerCompat.js.map +1 -1
- package/lib/module/specs/OverKeyboardViewNativeComponent.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/findNodeHandle/index.js +2 -0
- package/lib/module/utils/findNodeHandle/index.js.map +1 -0
- package/lib/module/utils/findNodeHandle/index.native.js +3 -0
- package/lib/module/utils/findNodeHandle/index.native.js.map +1 -0
- package/lib/module/utils.js.map +1 -1
- package/lib/module/views/KeyboardExtender/index.js +23 -0
- package/lib/module/views/KeyboardExtender/index.js.map +1 -0
- package/lib/module/views/OverKeyboardView/index.js.map +1 -1
- package/lib/module/views/index.js +1 -0
- package/lib/module/views/index.js.map +1 -1
- package/lib/typescript/animated.d.ts +2 -38
- package/lib/typescript/architecture.d.ts +1 -0
- package/lib/typescript/bindings.d.ts +15 -1
- package/lib/typescript/bindings.native.d.ts +10 -1
- package/lib/typescript/compat.d.ts +12 -0
- package/lib/typescript/components/KeyboardAvoidingView/index.d.ts +5 -0
- package/lib/typescript/components/KeyboardAwareScrollView/index.d.ts +4 -1
- package/lib/typescript/components/KeyboardChatScrollView/hooks.d.ts +2 -0
- package/lib/typescript/components/KeyboardChatScrollView/index.d.ts +17 -0
- package/lib/typescript/components/KeyboardChatScrollView/types.d.ts +113 -0
- package/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts +132 -0
- package/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/index.d.ts +18 -0
- package/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/index.ios.d.ts +21 -0
- package/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts +37 -0
- package/lib/typescript/components/KeyboardChatScrollView/useEndVisible.d.ts +17 -0
- package/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts +45 -0
- package/lib/typescript/components/KeyboardToolbar/Button.d.ts +2 -2
- package/lib/typescript/components/KeyboardToolbar/compound/components/Background.d.ts +6 -0
- package/lib/typescript/components/KeyboardToolbar/compound/components/Content.d.ts +7 -0
- package/lib/typescript/components/KeyboardToolbar/compound/components/Done.d.ts +7 -0
- package/lib/typescript/components/KeyboardToolbar/compound/components/Next.d.ts +4 -0
- package/lib/typescript/components/KeyboardToolbar/compound/components/Prev.d.ts +4 -0
- package/lib/typescript/components/KeyboardToolbar/compound/components/index.d.ts +5 -0
- package/lib/typescript/components/KeyboardToolbar/compound/components/types.d.ts +14 -0
- package/lib/typescript/components/KeyboardToolbar/compound/context.d.ts +9 -0
- package/lib/typescript/components/KeyboardToolbar/constants.d.ts +10 -0
- package/lib/typescript/components/KeyboardToolbar/index.d.ts +12 -45
- package/lib/typescript/components/KeyboardToolbar/types.d.ts +24 -1
- package/lib/typescript/components/ScrollViewWithBottomPadding/index.d.ts +30 -0
- package/lib/typescript/components/ScrollViewWithBottomPadding/styles.d.ts +7 -0
- package/lib/typescript/components/hooks/useCombinedRef.d.ts +3 -0
- package/lib/typescript/components/hooks/useScrollState.d.ts +17 -0
- package/lib/typescript/components/index.d.ts +3 -0
- package/lib/typescript/constants.d.ts +1 -0
- package/lib/typescript/context.d.ts +1 -0
- package/lib/typescript/hooks/index.d.ts +2 -0
- package/lib/typescript/hooks/useKeyboardState/index.d.ts +4 -0
- package/lib/typescript/index.d.ts +4 -3
- package/lib/typescript/internal.d.ts +4 -0
- package/lib/typescript/specs/ClippingScrollViewDecoratorViewNativeComponent.d.ts +10 -0
- package/lib/typescript/specs/KeyboardControllerViewNativeComponent.d.ts +4 -0
- package/lib/typescript/specs/KeyboardToolbarGroupViewNativeComponent.d.ts +6 -0
- package/lib/typescript/specs/NativeKeyboardController.d.ts +6 -2
- package/lib/typescript/types.d.ts +81 -5
- package/lib/typescript/utils/findNodeHandle/index.d.ts +4 -0
- package/lib/typescript/utils/findNodeHandle/index.native.d.ts +2 -0
- package/lib/typescript/views/KeyboardExtender/index.d.ts +5 -0
- package/lib/typescript/views/index.d.ts +1 -0
- package/package.json +183 -174
- package/src/animated.tsx +248 -255
- package/src/architecture.ts +1 -0
- package/src/bindings.native.ts +97 -62
- package/src/bindings.ts +81 -42
- package/src/compat.ts +44 -0
- package/src/components/KeyboardAvoidingView/hooks.ts +130 -123
- package/src/components/KeyboardAvoidingView/index.tsx +232 -188
- package/src/components/KeyboardAwareScrollView/index.tsx +452 -389
- package/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +133 -133
- package/src/components/KeyboardAwareScrollView/utils.ts +41 -41
- package/src/components/KeyboardChatScrollView/hooks.ts +2 -0
- package/src/components/KeyboardChatScrollView/index.tsx +164 -0
- package/src/components/KeyboardChatScrollView/types.ts +117 -0
- package/src/components/KeyboardChatScrollView/useChatKeyboard/helpers.ts +268 -0
- package/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts +260 -0
- package/src/components/KeyboardChatScrollView/useChatKeyboard/index.ts +374 -0
- package/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts +39 -0
- package/src/components/KeyboardChatScrollView/useEndVisible.ts +66 -0
- package/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts +149 -0
- package/src/components/KeyboardStickyView/index.tsx +66 -66
- package/src/components/KeyboardToolbar/Arrow.tsx +80 -80
- package/src/components/KeyboardToolbar/Button.tsx +98 -98
- package/src/components/KeyboardToolbar/colors.native.ts +37 -37
- package/src/components/KeyboardToolbar/colors.ts +16 -16
- package/src/components/KeyboardToolbar/compound/components/Background.tsx +9 -0
- package/src/components/KeyboardToolbar/compound/components/Content.tsx +25 -0
- package/src/components/KeyboardToolbar/compound/components/Done.tsx +57 -0
- package/src/components/KeyboardToolbar/compound/components/Next.tsx +49 -0
- package/src/components/KeyboardToolbar/compound/components/Prev.tsx +49 -0
- package/src/components/KeyboardToolbar/compound/components/index.ts +5 -0
- package/src/components/KeyboardToolbar/compound/components/types.ts +15 -0
- package/src/components/KeyboardToolbar/compound/context.ts +25 -0
- package/src/components/KeyboardToolbar/constants.ts +14 -0
- package/src/components/KeyboardToolbar/index.tsx +220 -223
- package/src/components/KeyboardToolbar/types.ts +72 -40
- package/src/components/ScrollViewWithBottomPadding/index.tsx +216 -0
- package/src/components/ScrollViewWithBottomPadding/styles.ts +10 -0
- package/src/components/hooks/useColorScheme.ts +6 -6
- package/src/components/hooks/useCombinedRef.ts +22 -0
- package/src/components/hooks/useScrollState.ts +81 -0
- package/src/components/index.ts +14 -11
- package/src/constants.ts +23 -19
- package/src/context.ts +70 -68
- package/src/hooks/index.ts +91 -90
- package/src/hooks/useKeyboardState/index.ts +52 -0
- package/src/hooks/useWindowDimensions/index.android.ts +38 -38
- package/src/hooks/useWindowDimensions/index.ts +1 -1
- package/src/index.ts +27 -23
- package/src/internal.ts +146 -84
- package/src/module.ts +64 -52
- package/src/reanimated.native.ts +132 -132
- package/src/reanimated.ts +29 -29
- package/src/specs/ClippingScrollViewDecoratorViewNativeComponent.ts +19 -0
- package/src/specs/KeyboardControllerViewNativeComponent.ts +82 -71
- package/src/specs/KeyboardGestureAreaNativeComponent.ts +21 -20
- package/src/specs/KeyboardToolbarGroupViewNativeComponent.ts +10 -0
- package/src/specs/NativeKeyboardController.ts +23 -19
- package/src/specs/NativeStatusBarManagerCompat.ts +14 -14
- package/src/specs/OverKeyboardViewNativeComponent.ts +12 -12
- package/src/types.ts +330 -243
- package/src/utils/findNodeHandle/index.native.ts +3 -0
- package/src/utils/findNodeHandle/index.ts +6 -0
- package/src/utils.ts +1 -1
- package/src/views/KeyboardExtender/index.tsx +30 -0
- package/src/views/OverKeyboardView/index.tsx +43 -43
- package/src/views/index.ts +2 -1
- package/lib/commonjs/monkey-patch.android.js +0 -57
- package/lib/commonjs/monkey-patch.android.js.map +0 -1
- package/lib/commonjs/monkey-patch.js +0 -11
- package/lib/commonjs/monkey-patch.js.map +0 -1
- package/lib/module/monkey-patch.android.js +0 -47
- package/lib/module/monkey-patch.android.js.map +0 -1
- package/lib/module/monkey-patch.js +0 -5
- package/lib/module/monkey-patch.js.map +0 -1
- package/lib/typescript/monkey-patch.android.d.ts +0 -2
- package/lib/typescript/monkey-patch.d.ts +0 -2
- package/src/monkey-patch.android.ts +0 -44
- package/src/monkey-patch.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","colors","exports","light","primary","Platform","select","ios","PlatformColor","default","disabled","background","ripple","dark"],"sources":["colors.native.ts"],"sourcesContent":["import { Platform, PlatformColor } from \"react-native\";\
|
|
1
|
+
{"version":3,"names":["_reactNative","require","colors","exports","light","primary","Platform","select","ios","PlatformColor","default","disabled","background","ripple","dark"],"sources":["colors.native.ts"],"sourcesContent":["import { Platform, PlatformColor } from \"react-native\";\n\nimport type { KeyboardToolbarTheme } from \"./types\";\nimport type { ColorValue } from \"react-native\";\n\nexport const colors: KeyboardToolbarTheme = {\n light: {\n primary: Platform.select<ColorValue>({\n ios: PlatformColor(\"link\"),\n default: \"#2c2c2c\",\n }),\n disabled: Platform.select<ColorValue>({\n ios: PlatformColor(\"systemGray4\"),\n default: \"#B0BEC5\",\n }),\n background: Platform.select({\n ios: \"#F8F8F8\",\n default: \"#f3f3f4\",\n }),\n ripple: \"#bcbcbcbc\",\n },\n dark: {\n primary: Platform.select<ColorValue>({\n ios: PlatformColor(\"label\"),\n default: \"#fafafa\",\n }),\n disabled: Platform.select<ColorValue>({\n ios: PlatformColor(\"systemGray\"),\n default: \"#707070\",\n }),\n background: Platform.select({\n ios: \"#555756\",\n default: \"#2C2C2E\",\n }),\n ripple: \"#F8F8F888\",\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKO,MAAMC,MAA4B,GAAAC,OAAA,CAAAD,MAAA,GAAG;EAC1CE,KAAK,EAAE;IACLC,OAAO,EAAEC,qBAAQ,CAACC,MAAM,CAAa;MACnCC,GAAG,EAAE,IAAAC,0BAAa,EAAC,MAAM,CAAC;MAC1BC,OAAO,EAAE;IACX,CAAC,CAAC;IACFC,QAAQ,EAAEL,qBAAQ,CAACC,MAAM,CAAa;MACpCC,GAAG,EAAE,IAAAC,0BAAa,EAAC,aAAa,CAAC;MACjCC,OAAO,EAAE;IACX,CAAC,CAAC;IACFE,UAAU,EAAEN,qBAAQ,CAACC,MAAM,CAAC;MAC1BC,GAAG,EAAE,SAAS;MACdE,OAAO,EAAE;IACX,CAAC,CAAC;IACFG,MAAM,EAAE;EACV,CAAC;EACDC,IAAI,EAAE;IACJT,OAAO,EAAEC,qBAAQ,CAACC,MAAM,CAAa;MACnCC,GAAG,EAAE,IAAAC,0BAAa,EAAC,OAAO,CAAC;MAC3BC,OAAO,EAAE;IACX,CAAC,CAAC;IACFC,QAAQ,EAAEL,qBAAQ,CAACC,MAAM,CAAa;MACpCC,GAAG,EAAE,IAAAC,0BAAa,EAAC,YAAY,CAAC;MAChCC,OAAO,EAAE;IACX,CAAC,CAAC;IACFE,UAAU,EAAEN,qBAAQ,CAACC,MAAM,CAAC;MAC1BC,GAAG,EAAE,SAAS;MACdE,OAAO,EAAE;IACX,CAAC,CAAC;IACFG,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const Background = ({
|
|
10
|
+
children
|
|
11
|
+
}) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
12
|
+
var _default = exports.default = Background;
|
|
13
|
+
//# sourceMappingURL=Background.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","e","__esModule","default","Background","children","createElement","Fragment","_default","exports"],"sources":["Background.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { ReactNode } from \"react\";\n\nconst Background: React.FC<{ children: ReactNode }> = ({ children }) => (\n <>{children}</>\n);\n\nexport default Background;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAI1B,MAAMG,UAA6C,GAAGA,CAAC;EAAEC;AAAS,CAAC,kBACjEP,MAAA,CAAAK,OAAA,CAAAG,aAAA,CAAAR,MAAA,CAAAK,OAAA,CAAAI,QAAA,QAAGF,QAAW,CACf;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEaC,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _constants = require("../../constants");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const Content = ({
|
|
12
|
+
children
|
|
13
|
+
}) => {
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
15
|
+
style: styles.flex,
|
|
16
|
+
testID: _constants.TEST_ID_KEYBOARD_TOOLBAR_CONTENT
|
|
17
|
+
}, children);
|
|
18
|
+
};
|
|
19
|
+
const styles = _reactNative.StyleSheet.create({
|
|
20
|
+
flex: {
|
|
21
|
+
flex: 1
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _default = exports.default = Content;
|
|
25
|
+
//# sourceMappingURL=Content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_constants","e","__esModule","default","Content","children","createElement","View","style","styles","flex","testID","TEST_ID_KEYBOARD_TOOLBAR_CONTENT","StyleSheet","create","_default","exports"],"sources":["Content.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleSheet, View } from \"react-native\";\n\nimport { TEST_ID_KEYBOARD_TOOLBAR_CONTENT } from \"../../constants\";\n\nimport type { ReactNode } from \"react\";\nimport type { ViewProps } from \"react-native\";\n\nconst Content: React.FC<ViewProps & { children?: ReactNode }> = ({\n children,\n}) => {\n return (\n <View style={styles.flex} testID={TEST_ID_KEYBOARD_TOOLBAR_CONTENT}>\n {children}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n flex: {\n flex: 1,\n },\n});\n\nexport default Content;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAAmE,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKnE,MAAMG,OAAuD,GAAGA,CAAC;EAC/DC;AACF,CAAC,KAAK;EACJ,oBACET,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACP,YAAA,CAAAQ,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,IAAK;IAACC,MAAM,EAAEC;EAAiC,GAChEP,QACG,CAAC;AAEX,CAAC;AAED,MAAMI,MAAM,GAAGI,uBAAU,CAACC,MAAM,CAAC;EAC/BJ,IAAI,EAAE;IACJA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAb,OAAA,GAEYC,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _hooks = require("../../../../hooks");
|
|
10
|
+
var _module = require("../../../../module");
|
|
11
|
+
var _Button = _interopRequireDefault(require("../../Button"));
|
|
12
|
+
var _constants = require("../../constants");
|
|
13
|
+
var _context = require("../context");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
const Done = ({
|
|
17
|
+
children,
|
|
18
|
+
onPress,
|
|
19
|
+
rippleRadius = 28,
|
|
20
|
+
text,
|
|
21
|
+
button: ButtonContainer = _Button.default
|
|
22
|
+
}) => {
|
|
23
|
+
const colorScheme = (0, _hooks.useKeyboardState)(state => state.appearance);
|
|
24
|
+
const {
|
|
25
|
+
theme
|
|
26
|
+
} = (0, _context.useToolbarContext)();
|
|
27
|
+
const doneStyle = (0, _react.useMemo)(() => [styles.doneButton, {
|
|
28
|
+
color: theme[colorScheme].primary
|
|
29
|
+
}], [colorScheme, theme]);
|
|
30
|
+
const onPressDone = (0, _react.useCallback)(event => {
|
|
31
|
+
onPress === null || onPress === void 0 || onPress(event);
|
|
32
|
+
if (!event.isDefaultPrevented()) _module.KeyboardController.dismiss();
|
|
33
|
+
}, [onPress]);
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(ButtonContainer, {
|
|
35
|
+
accessibilityHint: "Closes the keyboard",
|
|
36
|
+
accessibilityLabel: "Done",
|
|
37
|
+
rippleRadius: rippleRadius,
|
|
38
|
+
style: styles.doneButtonContainer,
|
|
39
|
+
testID: _constants.TEST_ID_KEYBOARD_TOOLBAR_DONE,
|
|
40
|
+
theme: theme,
|
|
41
|
+
onPress: onPressDone
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
43
|
+
maxFontSizeMultiplier: 1.3,
|
|
44
|
+
style: doneStyle
|
|
45
|
+
}, children ?? text ?? "Done"));
|
|
46
|
+
};
|
|
47
|
+
const styles = _reactNative.StyleSheet.create({
|
|
48
|
+
doneButton: {
|
|
49
|
+
fontWeight: "600",
|
|
50
|
+
fontSize: 15
|
|
51
|
+
},
|
|
52
|
+
doneButtonContainer: {
|
|
53
|
+
marginRight: 16,
|
|
54
|
+
marginLeft: 8
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
var _default = exports.default = Done;
|
|
58
|
+
//# sourceMappingURL=Done.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_hooks","_module","_Button","_interopRequireDefault","_constants","_context","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Done","children","onPress","rippleRadius","text","button","ButtonContainer","Button","colorScheme","useKeyboardState","state","appearance","theme","useToolbarContext","doneStyle","useMemo","styles","doneButton","color","primary","onPressDone","useCallback","event","isDefaultPrevented","KeyboardController","dismiss","createElement","accessibilityHint","accessibilityLabel","style","doneButtonContainer","testID","TEST_ID_KEYBOARD_TOOLBAR_DONE","Text","maxFontSizeMultiplier","StyleSheet","create","fontWeight","fontSize","marginRight","marginLeft","_default","exports"],"sources":["Done.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { StyleSheet, Text } from \"react-native\";\n\nimport { useKeyboardState } from \"../../../../hooks\";\nimport { KeyboardController } from \"../../../../module\";\nimport Button from \"../../Button\";\nimport { TEST_ID_KEYBOARD_TOOLBAR_DONE } from \"../../constants\";\nimport { useToolbarContext } from \"../context\";\n\nimport type { ButtonSubProps } from \"./types\";\nimport type { ReactNode } from \"react\";\nimport type { GestureResponderEvent } from \"react-native\";\n\nconst Done: React.FC<Omit<ButtonSubProps, \"icon\"> & { text?: ReactNode }> = ({\n children,\n onPress,\n rippleRadius = 28,\n text,\n button: ButtonContainer = Button,\n}) => {\n const colorScheme = useKeyboardState((state) => state.appearance);\n const { theme } = useToolbarContext();\n const doneStyle = useMemo(\n () => [styles.doneButton, { color: theme[colorScheme].primary }],\n [colorScheme, theme],\n );\n const onPressDone = useCallback(\n (event: GestureResponderEvent) => {\n onPress?.(event);\n if (!event.isDefaultPrevented()) KeyboardController.dismiss();\n },\n [onPress],\n );\n\n return (\n <ButtonContainer\n accessibilityHint=\"Closes the keyboard\"\n accessibilityLabel=\"Done\"\n rippleRadius={rippleRadius}\n style={styles.doneButtonContainer}\n testID={TEST_ID_KEYBOARD_TOOLBAR_DONE}\n theme={theme}\n onPress={onPressDone}\n >\n <Text maxFontSizeMultiplier={1.3} style={doneStyle}>\n {children ?? text ?? \"Done\"}\n </Text>\n </ButtonContainer>\n );\n};\n\nconst styles = StyleSheet.create({\n doneButton: { fontWeight: \"600\", fontSize: 15 },\n doneButtonContainer: { marginRight: 16, marginLeft: 8 },\n});\n\nexport default Done;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _module = require("../../../../module");
|
|
9
|
+
var _Arrow = _interopRequireDefault(require("../../Arrow"));
|
|
10
|
+
var _Button = _interopRequireDefault(require("../../Button"));
|
|
11
|
+
var _constants = require("../../constants");
|
|
12
|
+
var _context = require("../context");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
const Next = ({
|
|
16
|
+
children,
|
|
17
|
+
onPress,
|
|
18
|
+
disabled,
|
|
19
|
+
rippleRadius,
|
|
20
|
+
style,
|
|
21
|
+
button: ButtonContainer = _Button.default,
|
|
22
|
+
icon: IconContainer = _Arrow.default
|
|
23
|
+
}) => {
|
|
24
|
+
const {
|
|
25
|
+
theme,
|
|
26
|
+
isNextDisabled
|
|
27
|
+
} = (0, _context.useToolbarContext)();
|
|
28
|
+
const isDisabled = disabled ?? isNextDisabled;
|
|
29
|
+
const onPressNext = (0, _react.useCallback)(event => {
|
|
30
|
+
onPress === null || onPress === void 0 || onPress(event);
|
|
31
|
+
if (!event.isDefaultPrevented()) _module.KeyboardController.setFocusTo("next");
|
|
32
|
+
}, [onPress]);
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(ButtonContainer, {
|
|
34
|
+
accessibilityHint: "Moves focus to the next field",
|
|
35
|
+
accessibilityLabel: "Next",
|
|
36
|
+
disabled: isDisabled,
|
|
37
|
+
rippleRadius: rippleRadius,
|
|
38
|
+
style: style,
|
|
39
|
+
testID: _constants.TEST_ID_KEYBOARD_TOOLBAR_NEXT,
|
|
40
|
+
theme: theme,
|
|
41
|
+
onPress: onPressNext
|
|
42
|
+
}, children ?? /*#__PURE__*/_react.default.createElement(IconContainer, {
|
|
43
|
+
disabled: isDisabled,
|
|
44
|
+
theme: theme,
|
|
45
|
+
type: "next"
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
var _default = exports.default = Next;
|
|
49
|
+
//# sourceMappingURL=Next.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_module","_Arrow","_interopRequireDefault","_Button","_constants","_context","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Next","children","onPress","disabled","rippleRadius","style","button","ButtonContainer","Button","icon","IconContainer","Arrow","theme","isNextDisabled","useToolbarContext","isDisabled","onPressNext","useCallback","event","isDefaultPrevented","KeyboardController","setFocusTo","createElement","accessibilityHint","accessibilityLabel","testID","TEST_ID_KEYBOARD_TOOLBAR_NEXT","type","_default","exports"],"sources":["Next.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\n\nimport { KeyboardController } from \"../../../../module\";\nimport Arrow from \"../../Arrow\";\nimport Button from \"../../Button\";\nimport { TEST_ID_KEYBOARD_TOOLBAR_NEXT } from \"../../constants\";\nimport { useToolbarContext } from \"../context\";\n\nimport type { ButtonSubProps } from \"./types\";\nimport type { GestureResponderEvent } from \"react-native\";\n\nconst Next: React.FC<ButtonSubProps> = ({\n children,\n onPress,\n disabled,\n rippleRadius,\n style,\n button: ButtonContainer = Button,\n icon: IconContainer = Arrow,\n}) => {\n const { theme, isNextDisabled } = useToolbarContext();\n const isDisabled = disabled ?? isNextDisabled;\n const onPressNext = useCallback(\n (event: GestureResponderEvent) => {\n onPress?.(event);\n if (!event.isDefaultPrevented()) KeyboardController.setFocusTo(\"next\");\n },\n [onPress],\n );\n\n return (\n <ButtonContainer\n accessibilityHint=\"Moves focus to the next field\"\n accessibilityLabel=\"Next\"\n disabled={isDisabled}\n rippleRadius={rippleRadius}\n style={style}\n testID={TEST_ID_KEYBOARD_TOOLBAR_NEXT}\n theme={theme}\n onPress={onPressNext}\n >\n {children ?? (\n <IconContainer disabled={isDisabled} theme={theme} type=\"next\" />\n )}\n </ButtonContainer>\n );\n};\n\nexport default Next;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _module = require("../../../../module");
|
|
9
|
+
var _Arrow = _interopRequireDefault(require("../../Arrow"));
|
|
10
|
+
var _Button = _interopRequireDefault(require("../../Button"));
|
|
11
|
+
var _constants = require("../../constants");
|
|
12
|
+
var _context = require("../context");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
const Prev = ({
|
|
16
|
+
children,
|
|
17
|
+
onPress,
|
|
18
|
+
disabled,
|
|
19
|
+
rippleRadius,
|
|
20
|
+
style,
|
|
21
|
+
button: ButtonContainer = _Button.default,
|
|
22
|
+
icon: IconContainer = _Arrow.default
|
|
23
|
+
}) => {
|
|
24
|
+
const {
|
|
25
|
+
theme,
|
|
26
|
+
isPrevDisabled
|
|
27
|
+
} = (0, _context.useToolbarContext)();
|
|
28
|
+
const isDisabled = disabled ?? isPrevDisabled;
|
|
29
|
+
const onPressPrev = (0, _react.useCallback)(event => {
|
|
30
|
+
onPress === null || onPress === void 0 || onPress(event);
|
|
31
|
+
if (!event.isDefaultPrevented()) _module.KeyboardController.setFocusTo("prev");
|
|
32
|
+
}, [onPress]);
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(ButtonContainer, {
|
|
34
|
+
accessibilityHint: "Moves focus to the previous field",
|
|
35
|
+
accessibilityLabel: "Previous",
|
|
36
|
+
disabled: isDisabled,
|
|
37
|
+
rippleRadius: rippleRadius,
|
|
38
|
+
style: style,
|
|
39
|
+
testID: _constants.TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS,
|
|
40
|
+
theme: theme,
|
|
41
|
+
onPress: onPressPrev
|
|
42
|
+
}, children ?? /*#__PURE__*/_react.default.createElement(IconContainer, {
|
|
43
|
+
disabled: isDisabled,
|
|
44
|
+
theme: theme,
|
|
45
|
+
type: "prev"
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
var _default = exports.default = Prev;
|
|
49
|
+
//# sourceMappingURL=Prev.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_module","_Arrow","_interopRequireDefault","_Button","_constants","_context","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Prev","children","onPress","disabled","rippleRadius","style","button","ButtonContainer","Button","icon","IconContainer","Arrow","theme","isPrevDisabled","useToolbarContext","isDisabled","onPressPrev","useCallback","event","isDefaultPrevented","KeyboardController","setFocusTo","createElement","accessibilityHint","accessibilityLabel","testID","TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS","type","_default","exports"],"sources":["Prev.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\n\nimport { KeyboardController } from \"../../../../module\";\nimport Arrow from \"../../Arrow\";\nimport Button from \"../../Button\";\nimport { TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS } from \"../../constants\";\nimport { useToolbarContext } from \"../context\";\n\nimport type { ButtonSubProps } from \"./types\";\nimport type { GestureResponderEvent } from \"react-native\";\n\nconst Prev: React.FC<ButtonSubProps> = ({\n children,\n onPress,\n disabled,\n rippleRadius,\n style,\n button: ButtonContainer = Button,\n icon: IconContainer = Arrow,\n}) => {\n const { theme, isPrevDisabled } = useToolbarContext();\n const isDisabled = disabled ?? isPrevDisabled;\n const onPressPrev = useCallback(\n (event: GestureResponderEvent) => {\n onPress?.(event);\n if (!event.isDefaultPrevented()) KeyboardController.setFocusTo(\"prev\");\n },\n [onPress],\n );\n\n return (\n <ButtonContainer\n accessibilityHint=\"Moves focus to the previous field\"\n accessibilityLabel=\"Previous\"\n disabled={isDisabled}\n rippleRadius={rippleRadius}\n style={style}\n testID={TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS}\n theme={theme}\n onPress={onPressPrev}\n >\n {children ?? (\n <IconContainer disabled={isDisabled} theme={theme} type=\"prev\" />\n )}\n </ButtonContainer>\n );\n};\n\nexport default Prev;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Background", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Background.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Content", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Content.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "Done", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _Done.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "Next", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _Next.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "Prev", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _Prev.default;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
var _Background = _interopRequireDefault(require("./Background"));
|
|
37
|
+
var _Content = _interopRequireDefault(require("./Content"));
|
|
38
|
+
var _Done = _interopRequireDefault(require("./Done"));
|
|
39
|
+
var _Next = _interopRequireDefault(require("./Next"));
|
|
40
|
+
var _Prev = _interopRequireDefault(require("./Prev"));
|
|
41
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_Background","_interopRequireDefault","require","_Content","_Done","_Next","_Prev","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["export { default as Background } from \"./Background\";\nexport { default as Content } from \"./Content\";\nexport { default as Done } from \"./Done\";\nexport { default as Next } from \"./Next\";\nexport { default as Prev } from \"./Prev\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAyC,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type Arrow from \"../../Arrow\";\nimport type Button from \"../../Button\";\nimport type { ReactNode } from \"react\";\nimport type { GestureResponderEvent, ViewStyle } from \"react-native\";\n\nexport type ButtonSubProps = {\n children?: ReactNode;\n onPress?: (event: GestureResponderEvent) => void;\n disabled?: boolean;\n testID?: string;\n rippleRadius?: number;\n style?: ViewStyle;\n button?: typeof Button;\n icon?: typeof Arrow;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useToolbarContext = exports.ToolbarContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
const ToolbarContext = exports.ToolbarContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
9
|
+
const useToolbarContext = () => {
|
|
10
|
+
const context = (0, _react.useContext)(ToolbarContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error("KeyboardToolbar.* component must be used inside <KeyboardToolbar>");
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
16
|
+
exports.useToolbarContext = useToolbarContext;
|
|
17
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","ToolbarContext","exports","createContext","undefined","useToolbarContext","context","useContext","Error"],"sources":["context.ts"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\nimport type { KeyboardToolbarTheme } from \"../types\";\n\ntype ToolbarContextType = {\n theme: KeyboardToolbarTheme;\n isPrevDisabled: boolean;\n isNextDisabled: boolean;\n};\n\nexport const ToolbarContext = createContext<ToolbarContextType | undefined>(\n undefined,\n);\n\nexport const useToolbarContext = () => {\n const context = useContext(ToolbarContext);\n\n if (!context) {\n throw new Error(\n \"KeyboardToolbar.* component must be used inside <KeyboardToolbar>\",\n );\n }\n\n return context;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAUO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,oBAAa,EACzCC,SACF,CAAC;AAEM,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACrC,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACN,cAAc,CAAC;EAE1C,IAAI,CAACK,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CACb,mEACF,CAAC;EACH;EAEA,OAAOF,OAAO;AAChB,CAAC;AAACJ,OAAA,CAAAG,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS = exports.TEST_ID_KEYBOARD_TOOLBAR_NEXT = exports.TEST_ID_KEYBOARD_TOOLBAR_DONE = exports.TEST_ID_KEYBOARD_TOOLBAR_CONTENT = exports.TEST_ID_KEYBOARD_TOOLBAR = exports.OPENED_OFFSET = exports.KEYBOARD_TOOLBAR_HEIGHT = exports.KEYBOARD_HAS_ROUNDED_CORNERS = exports.DEFAULT_OPACITY = void 0;
|
|
7
|
+
var _constants = require("../../constants");
|
|
8
|
+
const TEST_ID_KEYBOARD_TOOLBAR = exports.TEST_ID_KEYBOARD_TOOLBAR = "keyboard.toolbar";
|
|
9
|
+
const TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS = exports.TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS = `${TEST_ID_KEYBOARD_TOOLBAR}.previous`;
|
|
10
|
+
const TEST_ID_KEYBOARD_TOOLBAR_NEXT = exports.TEST_ID_KEYBOARD_TOOLBAR_NEXT = `${TEST_ID_KEYBOARD_TOOLBAR}.next`;
|
|
11
|
+
const TEST_ID_KEYBOARD_TOOLBAR_CONTENT = exports.TEST_ID_KEYBOARD_TOOLBAR_CONTENT = `${TEST_ID_KEYBOARD_TOOLBAR}.content`;
|
|
12
|
+
const TEST_ID_KEYBOARD_TOOLBAR_DONE = exports.TEST_ID_KEYBOARD_TOOLBAR_DONE = `${TEST_ID_KEYBOARD_TOOLBAR}.done`;
|
|
13
|
+
const KEYBOARD_TOOLBAR_HEIGHT = exports.KEYBOARD_TOOLBAR_HEIGHT = 42;
|
|
14
|
+
const DEFAULT_OPACITY = exports.DEFAULT_OPACITY = "FF";
|
|
15
|
+
const KEYBOARD_HAS_ROUNDED_CORNERS = exports.KEYBOARD_HAS_ROUNDED_CORNERS = _constants.KEYBOARD_BORDER_RADIUS > 0;
|
|
16
|
+
const OPENED_OFFSET = exports.OPENED_OFFSET = KEYBOARD_HAS_ROUNDED_CORNERS ? -11 : 0;
|
|
17
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_constants","require","TEST_ID_KEYBOARD_TOOLBAR","exports","TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS","TEST_ID_KEYBOARD_TOOLBAR_NEXT","TEST_ID_KEYBOARD_TOOLBAR_CONTENT","TEST_ID_KEYBOARD_TOOLBAR_DONE","KEYBOARD_TOOLBAR_HEIGHT","DEFAULT_OPACITY","KEYBOARD_HAS_ROUNDED_CORNERS","KEYBOARD_BORDER_RADIUS","OPENED_OFFSET"],"sources":["constants.ts"],"sourcesContent":["import { KEYBOARD_BORDER_RADIUS } from \"../../constants\";\n\nimport type { HEX } from \"./types\";\n\nexport const TEST_ID_KEYBOARD_TOOLBAR = \"keyboard.toolbar\";\nexport const TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS = `${TEST_ID_KEYBOARD_TOOLBAR}.previous`;\nexport const TEST_ID_KEYBOARD_TOOLBAR_NEXT = `${TEST_ID_KEYBOARD_TOOLBAR}.next`;\nexport const TEST_ID_KEYBOARD_TOOLBAR_CONTENT = `${TEST_ID_KEYBOARD_TOOLBAR}.content`;\nexport const TEST_ID_KEYBOARD_TOOLBAR_DONE = `${TEST_ID_KEYBOARD_TOOLBAR}.done`;\n\nexport const KEYBOARD_TOOLBAR_HEIGHT = 42;\nexport const DEFAULT_OPACITY: HEX = \"FF\";\nexport const KEYBOARD_HAS_ROUNDED_CORNERS = KEYBOARD_BORDER_RADIUS > 0;\nexport const OPENED_OFFSET = KEYBOARD_HAS_ROUNDED_CORNERS ? -11 : 0;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAIO,MAAMC,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAG,kBAAkB;AACnD,MAAME,iCAAiC,GAAAD,OAAA,CAAAC,iCAAA,GAAG,GAAGF,wBAAwB,WAAW;AAChF,MAAMG,6BAA6B,GAAAF,OAAA,CAAAE,6BAAA,GAAG,GAAGH,wBAAwB,OAAO;AACxE,MAAMI,gCAAgC,GAAAH,OAAA,CAAAG,gCAAA,GAAG,GAAGJ,wBAAwB,UAAU;AAC9E,MAAMK,6BAA6B,GAAAJ,OAAA,CAAAI,6BAAA,GAAG,GAAGL,wBAAwB,OAAO;AAExE,MAAMM,uBAAuB,GAAAL,OAAA,CAAAK,uBAAA,GAAG,EAAE;AAClC,MAAMC,eAAoB,GAAAN,OAAA,CAAAM,eAAA,GAAG,IAAI;AACjC,MAAMC,4BAA4B,GAAAP,OAAA,CAAAO,4BAAA,GAAGC,iCAAsB,GAAG,CAAC;AAC/D,MAAMC,aAAa,GAAAT,OAAA,CAAAS,aAAA,GAAGF,4BAA4B,GAAG,CAAC,EAAE,GAAG,CAAC","ignoreList":[]}
|
|
@@ -13,33 +13,26 @@ exports.default = void 0;
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactNative = require("react-native");
|
|
15
15
|
var _bindings = require("../../bindings");
|
|
16
|
+
var _hooks = require("../../hooks");
|
|
16
17
|
var _KeyboardStickyView = _interopRequireDefault(require("../KeyboardStickyView"));
|
|
17
|
-
var _useColorScheme = _interopRequireDefault(require("../hooks/useColorScheme"));
|
|
18
18
|
var _Arrow = _interopRequireDefault(require("./Arrow"));
|
|
19
19
|
var _Button = _interopRequireDefault(require("./Button"));
|
|
20
20
|
var _colors = require("./colors");
|
|
21
|
+
var _components = require("./compound/components");
|
|
22
|
+
var _context = require("./compound/context");
|
|
23
|
+
var _constants = require("./constants");
|
|
21
24
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
23
26
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const TEST_ID_KEYBOARD_TOOLBAR_CONTENT = `${TEST_ID_KEYBOARD_TOOLBAR}.content`;
|
|
28
|
-
const TEST_ID_KEYBOARD_TOOLBAR_DONE = `${TEST_ID_KEYBOARD_TOOLBAR}.done`;
|
|
29
|
-
const KEYBOARD_TOOLBAR_HEIGHT = 42;
|
|
30
|
-
const DEFAULT_OPACITY = "FF";
|
|
31
|
-
const dismissKeyboard = () => _bindings.KeyboardControllerNative.dismiss(false);
|
|
32
|
-
const goToNextField = () => _bindings.KeyboardControllerNative.setFocusTo("next");
|
|
33
|
-
const goToPrevField = () => _bindings.KeyboardControllerNative.setFocusTo("prev");
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* `KeyboardToolbar` is a component that is shown above the keyboard with `Prev`/`Next` and
|
|
37
|
-
* `Done` buttons.
|
|
27
|
+
/**
|
|
28
|
+
* `KeyboardToolbar` is a component that is shown above the keyboard with `Prev`/`Next` and
|
|
29
|
+
* `Done` buttons.
|
|
38
30
|
*/
|
|
39
31
|
const KeyboardToolbar = ({
|
|
32
|
+
children,
|
|
40
33
|
content,
|
|
41
34
|
theme = _colors.colors,
|
|
42
|
-
doneText,
|
|
35
|
+
doneText = "Done",
|
|
43
36
|
button,
|
|
44
37
|
icon,
|
|
45
38
|
showArrows = true,
|
|
@@ -47,98 +40,109 @@ const KeyboardToolbar = ({
|
|
|
47
40
|
onPrevCallback,
|
|
48
41
|
onDoneCallback,
|
|
49
42
|
blur = null,
|
|
50
|
-
opacity = DEFAULT_OPACITY,
|
|
43
|
+
opacity = _constants.DEFAULT_OPACITY,
|
|
51
44
|
offset: {
|
|
52
45
|
closed = 0,
|
|
53
46
|
opened = 0
|
|
54
47
|
} = {},
|
|
55
48
|
enabled = true,
|
|
49
|
+
insets,
|
|
56
50
|
...rest
|
|
57
51
|
}) => {
|
|
58
|
-
const colorScheme = (0,
|
|
52
|
+
const colorScheme = (0, _hooks.useKeyboardState)(state => state.appearance);
|
|
59
53
|
const [inputs, setInputs] = (0, _react.useState)({
|
|
60
54
|
current: 0,
|
|
61
55
|
count: 0
|
|
62
56
|
});
|
|
63
57
|
const isPrevDisabled = inputs.current === 0;
|
|
64
58
|
const isNextDisabled = inputs.current === inputs.count - 1;
|
|
59
|
+
const buttonContainer = button ?? _Button.default;
|
|
60
|
+
const iconContainer = icon ?? _Arrow.default;
|
|
65
61
|
(0, _react.useEffect)(() => {
|
|
66
62
|
const subscription = _bindings.FocusedInputEvents.addListener("focusDidSet", e => {
|
|
67
63
|
setInputs(e);
|
|
68
64
|
});
|
|
69
65
|
return subscription.remove;
|
|
70
66
|
}, []);
|
|
71
|
-
const doneStyle = (0, _react.useMemo)(() => [styles.doneButton, {
|
|
72
|
-
color: theme[colorScheme].primary
|
|
73
|
-
}], [colorScheme, theme]);
|
|
74
67
|
const toolbarStyle = (0, _react.useMemo)(() => [styles.toolbar, {
|
|
75
68
|
backgroundColor: `${theme[colorScheme].background}${opacity}`
|
|
76
|
-
}
|
|
69
|
+
}, !_constants.KEYBOARD_HAS_ROUNDED_CORNERS ? {
|
|
70
|
+
paddingLeft: insets === null || insets === void 0 ? void 0 : insets.left,
|
|
71
|
+
paddingRight: insets === null || insets === void 0 ? void 0 : insets.right
|
|
72
|
+
} : null, _constants.KEYBOARD_HAS_ROUNDED_CORNERS ? styles.floating : null], [colorScheme, opacity, theme, insets]);
|
|
73
|
+
const containerStyle = (0, _react.useMemo)(() => [
|
|
74
|
+
// CRUCIAL: gives the native view real bounds
|
|
75
|
+
styles.sticky, _constants.KEYBOARD_HAS_ROUNDED_CORNERS ? {
|
|
76
|
+
left: ((insets === null || insets === void 0 ? void 0 : insets.left) ?? 0) + 16,
|
|
77
|
+
right: ((insets === null || insets === void 0 ? void 0 : insets.right) ?? 0) + 16
|
|
78
|
+
} : null], [insets]);
|
|
77
79
|
const offset = (0, _react.useMemo)(() => ({
|
|
78
|
-
closed: closed + KEYBOARD_TOOLBAR_HEIGHT,
|
|
79
|
-
opened
|
|
80
|
+
closed: closed + _constants.KEYBOARD_TOOLBAR_HEIGHT,
|
|
81
|
+
opened: opened + _constants.OPENED_OFFSET
|
|
80
82
|
}), [closed, opened]);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
let backgroundElement = null;
|
|
84
|
+
let arrowsElement = null;
|
|
85
|
+
let contentContainer = null;
|
|
86
|
+
let doneElement = null;
|
|
87
|
+
if (children) {
|
|
88
|
+
let prevChild = null;
|
|
89
|
+
let nextChild = null;
|
|
90
|
+
let contentChild = null;
|
|
91
|
+
let doneChild = null;
|
|
92
|
+
let backgroundChild = null;
|
|
93
|
+
_react.default.Children.forEach(children, child => {
|
|
94
|
+
if (! /*#__PURE__*/_react.default.isValidElement(child)) return;
|
|
95
|
+
if (child.type === _components.Background) backgroundChild = child;else if (child.type === _components.Content) contentChild = child;else if (child.type === _components.Prev) prevChild = child;else if (child.type === _components.Next) nextChild = child;else if (child.type === _components.Done) doneChild = child;
|
|
96
|
+
});
|
|
97
|
+
backgroundElement = backgroundChild;
|
|
98
|
+
doneElement = doneChild;
|
|
99
|
+
arrowsElement = prevChild || nextChild ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
100
|
+
style: styles.arrows
|
|
101
|
+
}, prevChild, nextChild) : null;
|
|
102
|
+
contentContainer = contentChild ?? /*#__PURE__*/_react.default.createElement(_components.Content, null, contentChild);
|
|
103
|
+
} else {
|
|
104
|
+
backgroundElement = blur;
|
|
105
|
+
arrowsElement = showArrows ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
106
|
+
style: styles.arrows
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Prev, {
|
|
108
|
+
button: buttonContainer,
|
|
109
|
+
icon: iconContainer,
|
|
110
|
+
onPress: onPrevCallback
|
|
111
|
+
}), /*#__PURE__*/_react.default.createElement(_components.Next, {
|
|
112
|
+
button: buttonContainer,
|
|
113
|
+
icon: iconContainer,
|
|
114
|
+
onPress: onNextCallback
|
|
115
|
+
})) : null;
|
|
116
|
+
contentContainer = /*#__PURE__*/_react.default.createElement(_components.Content, null, content);
|
|
117
|
+
doneElement = doneText ? /*#__PURE__*/_react.default.createElement(_components.Done, {
|
|
118
|
+
button: buttonContainer,
|
|
119
|
+
text: doneText,
|
|
120
|
+
onPress: onDoneCallback
|
|
121
|
+
}) : null;
|
|
122
|
+
}
|
|
123
|
+
const contextValue = (0, _react.useMemo)(() => ({
|
|
124
|
+
theme,
|
|
125
|
+
isPrevDisabled,
|
|
126
|
+
isNextDisabled
|
|
127
|
+
}), [theme, isPrevDisabled, isNextDisabled]);
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_context.ToolbarContext.Provider, {
|
|
129
|
+
value: contextValue
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_KeyboardStickyView.default, {
|
|
96
131
|
enabled: enabled,
|
|
97
|
-
offset: offset
|
|
132
|
+
offset: offset,
|
|
133
|
+
style: containerStyle
|
|
98
134
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
99
135
|
style: toolbarStyle,
|
|
100
|
-
testID: TEST_ID_KEYBOARD_TOOLBAR
|
|
101
|
-
}),
|
|
102
|
-
accessibilityLabel: "Previous",
|
|
103
|
-
accessibilityHint: "Will move focus to previous field",
|
|
104
|
-
disabled: isPrevDisabled,
|
|
105
|
-
onPress: onPressPrev,
|
|
106
|
-
testID: TEST_ID_KEYBOARD_TOOLBAR_PREVIOUS,
|
|
107
|
-
theme: theme
|
|
108
|
-
}, /*#__PURE__*/_react.default.createElement(IconContainer, {
|
|
109
|
-
disabled: isPrevDisabled,
|
|
110
|
-
type: "prev",
|
|
111
|
-
theme: theme
|
|
112
|
-
})), /*#__PURE__*/_react.default.createElement(ButtonContainer, {
|
|
113
|
-
accessibilityLabel: "Next",
|
|
114
|
-
accessibilityHint: "Will move focus to next field",
|
|
115
|
-
disabled: isNextDisabled,
|
|
116
|
-
onPress: onPressNext,
|
|
117
|
-
testID: TEST_ID_KEYBOARD_TOOLBAR_NEXT,
|
|
118
|
-
theme: theme
|
|
119
|
-
}, /*#__PURE__*/_react.default.createElement(IconContainer, {
|
|
120
|
-
disabled: isNextDisabled,
|
|
121
|
-
type: "next",
|
|
122
|
-
theme: theme
|
|
123
|
-
}))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
124
|
-
style: styles.flex,
|
|
125
|
-
testID: TEST_ID_KEYBOARD_TOOLBAR_CONTENT
|
|
126
|
-
}, content), /*#__PURE__*/_react.default.createElement(ButtonContainer, {
|
|
127
|
-
accessibilityLabel: "Done",
|
|
128
|
-
accessibilityHint: "Will close the keyboard",
|
|
129
|
-
onPress: onPressDone,
|
|
130
|
-
testID: TEST_ID_KEYBOARD_TOOLBAR_DONE,
|
|
131
|
-
rippleRadius: 28,
|
|
132
|
-
style: styles.doneButtonContainer,
|
|
133
|
-
theme: theme
|
|
134
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
135
|
-
style: doneStyle,
|
|
136
|
-
maxFontSizeMultiplier: 1.3
|
|
137
|
-
}, doneText || "Done"))));
|
|
136
|
+
testID: _constants.TEST_ID_KEYBOARD_TOOLBAR
|
|
137
|
+
}), backgroundElement, arrowsElement, contentContainer, doneElement)));
|
|
138
138
|
};
|
|
139
139
|
const styles = _reactNative.StyleSheet.create({
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
sticky: {
|
|
141
|
+
position: "absolute",
|
|
142
|
+
left: 0,
|
|
143
|
+
right: 0,
|
|
144
|
+
bottom: 0,
|
|
145
|
+
height: _constants.KEYBOARD_TOOLBAR_HEIGHT
|
|
142
146
|
},
|
|
143
147
|
toolbar: {
|
|
144
148
|
position: "absolute",
|
|
@@ -146,16 +150,23 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
146
150
|
alignItems: "center",
|
|
147
151
|
width: "100%",
|
|
148
152
|
flexDirection: "row",
|
|
149
|
-
height: KEYBOARD_TOOLBAR_HEIGHT
|
|
150
|
-
paddingHorizontal: 8
|
|
153
|
+
height: _constants.KEYBOARD_TOOLBAR_HEIGHT
|
|
151
154
|
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
arrows: {
|
|
156
|
+
flexDirection: "row",
|
|
157
|
+
paddingLeft: 8
|
|
155
158
|
},
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
floating: {
|
|
160
|
+
alignSelf: "center",
|
|
161
|
+
borderRadius: 20,
|
|
162
|
+
overflow: "hidden"
|
|
158
163
|
}
|
|
159
164
|
});
|
|
165
|
+
KeyboardToolbar.Background = _components.Background;
|
|
166
|
+
KeyboardToolbar.Content = _components.Content;
|
|
167
|
+
KeyboardToolbar.Prev = _components.Prev;
|
|
168
|
+
KeyboardToolbar.Next = _components.Next;
|
|
169
|
+
KeyboardToolbar.Done = _components.Done;
|
|
170
|
+
KeyboardToolbar.Group = _bindings.RCTKeyboardToolbarGroupView;
|
|
160
171
|
var _default = exports.default = KeyboardToolbar;
|
|
161
172
|
//# sourceMappingURL=index.js.map
|