@momo-kits/foundation 0.111.1-rc.8 → 0.111.3

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.
@@ -19,6 +19,32 @@ const BackgroundImageView: FC<BackgroundImageViewProps> = ({
19
19
  opacityBackground,
20
20
  }) => {
21
21
  const {theme} = useContext(ApplicationContext);
22
+ if (Platform.OS === 'android') {
23
+ return (
24
+ <Animated.View
25
+ style={[
26
+ useShadowHeader ? styles.shadowHeader : styles.dividerHeader,
27
+ {
28
+ position: 'absolute',
29
+ width: '100%',
30
+ zIndex: 1,
31
+ height: heightHeader,
32
+ backgroundColor: theme.colors.background.surface,
33
+ opacity: opacityBackground,
34
+ overflow: 'hidden',
35
+ },
36
+ ]}>
37
+ {headerBackground && (
38
+ <Image
39
+ style={styles.headerBackground}
40
+ source={{uri: headerBackground}}
41
+ loading={false}
42
+ />
43
+ )}
44
+ </Animated.View>
45
+ );
46
+ }
47
+
22
48
  return (
23
49
  <>
24
50
  <Animated.View
@@ -31,10 +57,21 @@ const BackgroundImageView: FC<BackgroundImageViewProps> = ({
31
57
  height: heightHeader,
32
58
  backgroundColor: theme.colors.background.surface,
33
59
  opacity: opacityBackground,
34
- overflow: Platform.OS === 'android' ? 'hidden' : 'visible',
60
+ },
61
+ ]}
62
+ />
63
+ <Animated.View
64
+ style={[
65
+ {
66
+ position: 'absolute',
67
+ width: '100%',
68
+ zIndex: 1,
69
+ height: heightHeader,
70
+ opacity: opacityBackground,
71
+ overflow: 'hidden',
35
72
  },
36
73
  ]}>
37
- {Platform.OS === 'android' && headerBackground && (
74
+ {headerBackground && (
38
75
  <Image
39
76
  style={styles.headerBackground}
40
77
  source={{uri: headerBackground}}
@@ -42,26 +79,6 @@ const BackgroundImageView: FC<BackgroundImageViewProps> = ({
42
79
  />
43
80
  )}
44
81
  </Animated.View>
45
- {Platform.OS === 'ios' && (
46
- <Animated.View
47
- style={[
48
- {
49
- position: 'absolute',
50
- width: '100%',
51
- zIndex: 1,
52
- height: heightHeader,
53
- overflow: 'hidden',
54
- },
55
- ]}>
56
- {headerBackground && (
57
- <Image
58
- style={styles.headerBackground}
59
- source={{uri: headerBackground}}
60
- loading={false}
61
- />
62
- )}
63
- </Animated.View>
64
- )}
65
82
  </>
66
83
  );
67
84
  };
@@ -69,14 +69,14 @@ const styles = StyleSheet.create({
69
69
  overflow: 'hidden',
70
70
  },
71
71
  extendedHeader: {
72
- aspectRatio: 2.43,
72
+ aspectRatio: 375 / 154,
73
73
  position: 'absolute',
74
74
  width: '100%',
75
75
  },
76
76
  headerBackground: {
77
77
  width: '100%',
78
78
  position: 'absolute',
79
- aspectRatio: 375 / 152,
79
+ aspectRatio: 375 / 154,
80
80
  },
81
81
  });
82
82
 
@@ -204,7 +204,7 @@ const styles = StyleSheet.create({
204
204
  aspectRatio: 375 / 154,
205
205
  },
206
206
  extendedHeader: {
207
- aspectRatio: 2.43,
207
+ aspectRatio: 375 / 154,
208
208
  position: 'absolute',
209
209
  width: '100%',
210
210
  },
@@ -284,7 +284,14 @@ const HeaderToolkitAction: React.FC<any> = ({
284
284
  showBadge={showBadge}
285
285
  />
286
286
  )}
287
- <View style={[styles.toolkitContainer, buttonStyle]}>
287
+ <View
288
+ style={[
289
+ styles.toolkitContainer,
290
+ buttonStyle,
291
+ {
292
+ width: context.appId !== 'vn.momo.helpcenter' ? 65 : 28,
293
+ },
294
+ ]}>
288
295
  {context.appId !== 'vn.momo.helpcenter' && (
289
296
  <>
290
297
  <TouchableOpacity
@@ -368,7 +375,6 @@ const styles = StyleSheet.create({
368
375
  paddingRight: Spacing.M,
369
376
  },
370
377
  toolkitContainer: {
371
- width: 65,
372
378
  height: 28,
373
379
  borderRadius: 14,
374
380
  justifyContent: 'center',
@@ -105,7 +105,7 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
105
105
  });
106
106
  };
107
107
 
108
- const headerBackground = config?.headerBar || theme.assets?.headerBackground;
108
+ const headerBackground = theme.assets?.headerBackground || config?.headerBar;
109
109
  const headerGradient = config?.headerGradient || theme.colors?.gradient;
110
110
 
111
111
  navigator.current.setCurrentContext = setCurrentContext;
package/Input/Input.tsx CHANGED
@@ -218,6 +218,7 @@ const Input = forwardRef(
218
218
  },
219
219
  secure && haveValue && {fontSize: size === 'small' ? 18 : 22},
220
220
  ]}
221
+ allowFontScaling={false}
221
222
  textBreakStrategy="highQuality"
222
223
  value={value}
223
224
  onChangeText={_onChangeText}
@@ -150,6 +150,7 @@ const InputMoney = forwardRef(
150
150
  editable={!disabled}
151
151
  ref={inputRef}
152
152
  keyboardType={'number-pad'}
153
+ allowFontScaling={false}
153
154
  style={[
154
155
  styles.moneyInput,
155
156
  {
@@ -215,6 +215,7 @@ const InputOTP = forwardRef(
215
215
  value={value}
216
216
  onChangeText={_onChangeText}
217
217
  keyboardType={dataType === 'number' ? 'number-pad' : 'default'}
218
+ allowFontScaling={false}
218
219
  onFocus={onFocusInput}
219
220
  onBlur={onBlurInput}
220
221
  style={styles.otpRealInput}
@@ -107,6 +107,7 @@ const TextTyping: FC<any> = ({
107
107
  autoCorrect={false}
108
108
  pointerEvents={'none'}
109
109
  numberOfLines={1}
110
+ allowFontScaling={false}
110
111
  />
111
112
  );
112
113
  };
@@ -203,6 +204,7 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
203
204
  {...props}
204
205
  accessibilityLabel={accessibilityLabel}
205
206
  textAlignVertical="center"
207
+ allowFontScaling={false}
206
208
  ref={inputRef}
207
209
  style={[
208
210
  styles.searchInput,
@@ -133,6 +133,7 @@ const InputTextArea = forwardRef(
133
133
  ref={inputRef}
134
134
  editable={!disabled}
135
135
  textAlignVertical="top"
136
+ allowFontScaling={false}
136
137
  style={[
137
138
  styles.textArea,
138
139
  {
@@ -95,6 +95,7 @@ const TextTyping: FC<TextTypingProps> = ({
95
95
  autoCorrect={false}
96
96
  pointerEvents={'none'}
97
97
  numberOfLines={1}
98
+ allowFontScaling={false}
98
99
  />
99
100
  );
100
101
  };
package/Text/index.tsx CHANGED
@@ -156,6 +156,7 @@ const Text: React.FC<TextProps> = ({
156
156
  <RNText
157
157
  {...rest}
158
158
  {...setAutomationID(rest.accessibilityLabel)}
159
+ allowFontScaling={false}
159
160
  style={[
160
161
  style,
161
162
  textStyle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.111.1-rc.8",
3
+ "version": "0.111.3",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},
@@ -14,13 +14,13 @@
14
14
  "react-native-linear-gradient": "2.8.3",
15
15
  "react-native-gesture-handler": "1.10.3",
16
16
  "react-native-fast-image": "8.1.5",
17
- "@react-navigation/bottom-tabs": "https://gitlab.mservice.com.vn/momo-platform/react-native-bottom-tabs.git",
18
17
  "@react-navigation/core": "5.16.1",
19
18
  "@react-navigation/native": "5.9.8",
20
19
  "@react-navigation/routers": "5.7.4",
21
- "react-native-reanimated": "git+https://gitlab.mservice.com.vn/momo-platform/react-native-reanimated.git#v1.13.4_gradle_7",
22
- "lottie-react-native": "git+https://gitlab.mservice.com.vn/momo-platform/momo-lottie-react-native.git",
23
- "@react-navigation/stack": "https://gitlab.mservice.com.vn/momo-platform/react-navigation-stack.git"
20
+ "react-native-reanimated": "git+https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-reanimated.git#v1.13.4_gradle_7",
21
+ "lottie-react-native": "https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/momo-lottie-react-native.git",
22
+ "@react-navigation/stack": "https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-navigation-stack.git",
23
+ "@react-navigation/bottom-tabs": "https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-bottom-tabs.git"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react-native": "*"