@momo-kits/foundation 0.161.2-beta.20 → 0.161.2-beta.22
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/Application/BottomSheet.tsx +3 -2
- package/Application/BottomTab/index.tsx +1 -1
- package/Layout/Screen.tsx +12 -4
- package/package.json +34 -34
|
@@ -37,7 +37,8 @@ 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
|
|
40
|
+
const bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
|
|
41
|
+
const keyboardOffset = heightHeader - bottomInset;
|
|
41
42
|
|
|
42
43
|
const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
|
|
43
44
|
|
|
@@ -311,7 +312,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
311
312
|
{useBottomInset && (
|
|
312
313
|
<View
|
|
313
314
|
style={{
|
|
314
|
-
height:
|
|
315
|
+
height: bottomInset,
|
|
315
316
|
backgroundColor: backgroundColor,
|
|
316
317
|
}}
|
|
317
318
|
/>
|
|
@@ -320,7 +320,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
|
|
|
320
320
|
activeTintColor={theme.colors.primary}
|
|
321
321
|
style={[
|
|
322
322
|
{
|
|
323
|
-
height: 64 + Math.min(insets.bottom, 21),
|
|
323
|
+
height: 64 + (Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom),
|
|
324
324
|
},
|
|
325
325
|
]}
|
|
326
326
|
/>
|
package/Layout/Screen.tsx
CHANGED
|
@@ -204,9 +204,17 @@ const Screen = forwardRef(
|
|
|
204
204
|
let handleScroll;
|
|
205
205
|
let Component: any = View;
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
const maxBottomInset = useRef(0);
|
|
208
|
+
if (insets.bottom > maxBottomInset.current) {
|
|
209
|
+
maxBottomInset.current = insets.bottom;
|
|
210
|
+
}
|
|
211
|
+
const bottomInset =
|
|
212
|
+
Platform.OS === 'ios'
|
|
213
|
+
? Math.min(insets.bottom, 21)
|
|
214
|
+
: maxBottomInset.current;
|
|
215
|
+
let keyboardOffset = heightHeader - bottomInset;
|
|
208
216
|
if (headerType === 'extended' || animatedHeader || inputSearchProps) {
|
|
209
|
-
keyboardOffset = -
|
|
217
|
+
keyboardOffset = -bottomInset;
|
|
210
218
|
}
|
|
211
219
|
|
|
212
220
|
/**
|
|
@@ -616,7 +624,7 @@ const Screen = forwardRef(
|
|
|
616
624
|
{...floatingButtonProps}
|
|
617
625
|
animatedValue={animatedValue.current}
|
|
618
626
|
bottom={
|
|
619
|
-
Footer || isTab ? 12 :
|
|
627
|
+
Footer || isTab ? 12 : bottomInset + Spacing.S
|
|
620
628
|
}
|
|
621
629
|
/>
|
|
622
630
|
</View>
|
|
@@ -627,7 +635,7 @@ const Screen = forwardRef(
|
|
|
627
635
|
style={[
|
|
628
636
|
styles.shadow,
|
|
629
637
|
{
|
|
630
|
-
paddingBottom:
|
|
638
|
+
paddingBottom: bottomInset + Spacing.S,
|
|
631
639
|
backgroundColor: theme.colors.background.surface,
|
|
632
640
|
},
|
|
633
641
|
]}
|
package/package.json
CHANGED
|
@@ -1,35 +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
|
-
}
|
|
2
|
+
"name": "@momo-kits/foundation",
|
|
3
|
+
"version": "0.161.2-beta.22",
|
|
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
|
+
}
|