@momo-kits/foundation 0.161.2-beta.10 → 0.161.2-beta.12

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 bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
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: bottomInset,
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 + (Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom),
323
+ height: 64 + Math.min(insets.bottom, 21),
324
324
  },
325
325
  ]}
326
326
  />
@@ -86,7 +86,7 @@ const HeaderLeft: React.FC<HeaderBackProps> = ({
86
86
 
87
87
  const styles = StyleSheet.create({
88
88
  headerLeft: {
89
- marginLeft: 8,
89
+ marginLeft: 12,
90
90
  },
91
91
  });
92
92
 
package/Layout/Screen.tsx CHANGED
@@ -204,10 +204,9 @@ const Screen = forwardRef(
204
204
  let handleScroll;
205
205
  let Component: any = View;
206
206
 
207
- const bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
208
- let keyboardOffset = heightHeader - bottomInset;
207
+ let keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
209
208
  if (headerType === 'extended' || animatedHeader || inputSearchProps) {
210
- keyboardOffset = -bottomInset;
209
+ keyboardOffset = -Math.min(insets.bottom, 21);
211
210
  }
212
211
 
213
212
  /**
@@ -617,7 +616,7 @@ const Screen = forwardRef(
617
616
  {...floatingButtonProps}
618
617
  animatedValue={animatedValue.current}
619
618
  bottom={
620
- Footer || isTab ? 12 : bottomInset + Spacing.S
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: bottomInset + Spacing.S,
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.161.2-beta.10",
3
+ "version": "0.161.2-beta.12",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},