@momo-kits/foundation 0.161.2-beta.19 → 0.161.2-beta.20
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.
|
@@ -37,8 +37,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
37
37
|
const action = useRef<undefined | string>(undefined);
|
|
38
38
|
const insets = useSafeAreaInsets();
|
|
39
39
|
const heightHeader = useHeaderHeight();
|
|
40
|
-
const
|
|
41
|
-
const keyboardOffset = heightHeader - bottomInset;
|
|
40
|
+
const keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
|
|
42
41
|
|
|
43
42
|
const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
|
|
44
43
|
|
|
@@ -312,7 +311,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
312
311
|
{useBottomInset && (
|
|
313
312
|
<View
|
|
314
313
|
style={{
|
|
315
|
-
height:
|
|
314
|
+
height: Math.min(insets.bottom, 21),
|
|
316
315
|
backgroundColor: backgroundColor,
|
|
317
316
|
}}
|
|
318
317
|
/>
|
|
@@ -320,7 +320,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
|
|
|
320
320
|
activeTintColor={theme.colors.primary}
|
|
321
321
|
style={[
|
|
322
322
|
{
|
|
323
|
-
height: 64 +
|
|
323
|
+
height: 64 + Math.min(insets.bottom, 21),
|
|
324
324
|
},
|
|
325
325
|
]}
|
|
326
326
|
/>
|
|
@@ -26,7 +26,6 @@ import { HeaderLeft } from './Components/HeaderLeft';
|
|
|
26
26
|
import { HeaderRight } from './Components/HeaderRight';
|
|
27
27
|
import { HeaderTitle } from './Components/HeaderTitle';
|
|
28
28
|
import { HeaderBackground } from './Components/HeaderBackground';
|
|
29
|
-
import { KeyboardProvider } from 'react-native-keyboard-controller';
|
|
30
29
|
|
|
31
30
|
const Stack = createStackNavigator();
|
|
32
31
|
|
|
@@ -57,23 +56,21 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
|
|
|
57
56
|
};
|
|
58
57
|
|
|
59
58
|
return (
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</SafeAreaProvider>
|
|
76
|
-
</KeyboardProvider>
|
|
59
|
+
<SafeAreaProvider>
|
|
60
|
+
<MiniAppContext.Provider value={mergedContext}>
|
|
61
|
+
<ScaleSizeProvider scaleSizeMaxRate={mergedContext?.scaleSizeMaxRate}>
|
|
62
|
+
<Navigation
|
|
63
|
+
screen={screen}
|
|
64
|
+
theme={theme}
|
|
65
|
+
options={options}
|
|
66
|
+
maxApi={maxApi}
|
|
67
|
+
setCurrentContext={setCurrentContext}
|
|
68
|
+
initialParams={initialParams}
|
|
69
|
+
localize={localize}
|
|
70
|
+
/>
|
|
71
|
+
</ScaleSizeProvider>
|
|
72
|
+
</MiniAppContext.Provider>
|
|
73
|
+
</SafeAreaProvider>
|
|
77
74
|
);
|
|
78
75
|
};
|
|
79
76
|
|
package/Layout/Screen.tsx
CHANGED
|
@@ -13,6 +13,7 @@ import React, {
|
|
|
13
13
|
} from 'react';
|
|
14
14
|
import {
|
|
15
15
|
Animated,
|
|
16
|
+
KeyboardAvoidingView,
|
|
16
17
|
NativeScrollEvent,
|
|
17
18
|
NativeSyntheticEvent,
|
|
18
19
|
Platform,
|
|
@@ -24,7 +25,6 @@ import {
|
|
|
24
25
|
View,
|
|
25
26
|
ViewProps,
|
|
26
27
|
} from 'react-native';
|
|
27
|
-
import { KeyboardAvoidingView } from "react-native-keyboard-controller";
|
|
28
28
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
29
29
|
import { ApplicationContext, ScreenContext } from '../Context';
|
|
30
30
|
import Navigation from '../Application/Navigation';
|
|
@@ -204,10 +204,9 @@ const Screen = forwardRef(
|
|
|
204
204
|
let handleScroll;
|
|
205
205
|
let Component: any = View;
|
|
206
206
|
|
|
207
|
-
|
|
208
|
-
let keyboardOffset = heightHeader - bottomInset;
|
|
207
|
+
let keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
|
|
209
208
|
if (headerType === 'extended' || animatedHeader || inputSearchProps) {
|
|
210
|
-
keyboardOffset = -
|
|
209
|
+
keyboardOffset = -Math.min(insets.bottom, 21);
|
|
211
210
|
}
|
|
212
211
|
|
|
213
212
|
/**
|
|
@@ -592,7 +591,7 @@ const Screen = forwardRef(
|
|
|
592
591
|
keyboardVerticalOffset={keyboardVerticalOffset ?? keyboardOffset}
|
|
593
592
|
behavior={Platform.select({
|
|
594
593
|
ios: 'padding',
|
|
595
|
-
android:
|
|
594
|
+
android: undefined,
|
|
596
595
|
})}
|
|
597
596
|
>
|
|
598
597
|
{Header}
|
|
@@ -617,7 +616,7 @@ const Screen = forwardRef(
|
|
|
617
616
|
{...floatingButtonProps}
|
|
618
617
|
animatedValue={animatedValue.current}
|
|
619
618
|
bottom={
|
|
620
|
-
Footer || isTab ? 12 :
|
|
619
|
+
Footer || isTab ? 12 : Math.min(insets.bottom, 21) + Spacing.S
|
|
621
620
|
}
|
|
622
621
|
/>
|
|
623
622
|
</View>
|
|
@@ -628,7 +627,7 @@ const Screen = forwardRef(
|
|
|
628
627
|
style={[
|
|
629
628
|
styles.shadow,
|
|
630
629
|
{
|
|
631
|
-
paddingBottom:
|
|
630
|
+
paddingBottom: Math.min(insets.bottom, 21) + Spacing.S,
|
|
632
631
|
backgroundColor: theme.colors.background.surface,
|
|
633
632
|
},
|
|
634
633
|
]}
|
package/package.json
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
2
|
+
"name": "@momo-kits/foundation",
|
|
3
|
+
"version": "0.161.2-beta.20",
|
|
4
|
+
"description": "React Native Component Kits",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"scripts": {},
|
|
7
|
+
"keywords": [
|
|
8
|
+
"@momo-kits/foundation"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"react-native-fast-image": "git+https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-fast-image.git#v8.11.0",
|
|
12
|
+
"@react-navigation/bottom-tabs": "7.4.2",
|
|
13
|
+
"@react-navigation/core": "7.12.1",
|
|
14
|
+
"@react-navigation/elements": "2.5.2",
|
|
15
|
+
"@react-navigation/native": "7.1.14",
|
|
16
|
+
"@react-navigation/routers": "7.4.1",
|
|
17
|
+
"@react-navigation/stack": "7.4.2",
|
|
18
|
+
"react-native-gesture-handler": "2.27.1",
|
|
19
|
+
"react-native-linear-gradient": "git+https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-linear-gradient#v3.0.0",
|
|
20
|
+
"react-native-reanimated": "4.2.2",
|
|
21
|
+
"react-native-safe-area-context": "5.5.2",
|
|
22
|
+
"@shopify/flash-list": "2.1.0",
|
|
23
|
+
"lottie-react-native": "7.2.4"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react-native": "*"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/color": "3.0.6"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"registry": "https://registry.npmjs.org/"
|
|
33
|
+
},
|
|
34
|
+
"license": "MoMo"
|
|
35
|
+
}
|