@momo-kits/foundation 0.112.1-optimize.1 → 0.112.1-optimize.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.
@@ -109,7 +109,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
109
109
  initialRouteName,
110
110
  floatingButton,
111
111
  }) => {
112
- const {theme} = useContext(ApplicationContext);
112
+ const {theme, navigator} = useContext(ApplicationContext);
113
113
  const insets = useSafeAreaInsets();
114
114
 
115
115
  useEffect(() => {
@@ -127,6 +127,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
127
127
  state?: (e: any) => void;
128
128
  } = {
129
129
  tabPress: e => {
130
+ navigator?.maxApi?.triggerEventVibration?.('light');
130
131
  listeners?.tabPress?.(e);
131
132
  },
132
133
  focus: e => {
@@ -16,7 +16,7 @@ import {getDialogOptions, getModalOptions, getStackOptions} from './utils';
16
16
  import {NavigationContainerProps} from './types';
17
17
  import {ApplicationContext, MiniAppContext} from './index';
18
18
  import Localize from './Localize';
19
- import {defaultTheme, Configs} from '../Consts';
19
+ import {defaultTheme} from '../Consts';
20
20
 
21
21
  const Stack = createStackNavigator();
22
22
 
@@ -36,6 +36,15 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
36
36
  const [showGrid, setShowGrid] = useState(false);
37
37
  const [currentContext, setCurrentContext] = useState({});
38
38
 
39
+ let headerBackground = theme.assets?.headerBackground;
40
+ let headerGradient = context?.designConfig.headerGradient;
41
+ if (context?.designConfig?.headerBar) {
42
+ headerBackground = context?.designConfig.headerBar;
43
+ }
44
+ if (theme.colors?.gradient) {
45
+ headerGradient = theme.colors?.gradient;
46
+ }
47
+
39
48
  /**
40
49
  * inject data for navigator
41
50
  */
@@ -96,9 +105,6 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
96
105
  });
97
106
  };
98
107
 
99
- const headerBackground = theme.assets?.headerBackground || Configs.headerBar;
100
- const headerGradient = Configs?.headerGradient || theme.colors?.gradient;
101
-
102
108
  navigator.current.setCurrentContext = setCurrentContext;
103
109
 
104
110
  return (
@@ -229,34 +229,4 @@ const Shadow = {
229
229
  }),
230
230
  };
231
231
 
232
- const Configs = {
233
- headerGradient: undefined,
234
- headerBar: undefined,
235
- trustBanner: {
236
- content: {
237
- vi: 'Bảo mật thông tin & An toàn tài sản của bạn là ưu tiên hàng đầu của MoMo.',
238
- en: "Your data security and money safety are MoMo's top priorities.",
239
- },
240
- subContent: {
241
- vi: 'Tìm hiểu thêm',
242
- en: 'Learn more',
243
- },
244
- pciImage: 'https://static.momocdn.net/app/img/kits/trustBanner/pci_dss.png',
245
- sslImage: 'https://static.momocdn.net/app/img/kits/trustBanner/ssl.png',
246
- momoImage:
247
- 'https://static.momocdn.net/app/img/kits/trustBanner/ic_secu.png',
248
- urlConfig: 'login_and_security',
249
- icons: [
250
- 'https://static.momocdn.net/app/img/kits/trustBanner/ic_viettinbank.png',
251
- 'https://static.momocdn.net/app/img/kits/trustBanner/ic_agribank.png',
252
- 'https://static.momocdn.net/app/img/kits/trustBanner/ic_vietcombank.png',
253
- 'https://static.momocdn.net/app/img/kits/trustBanner/ic_bidv.png',
254
- ],
255
- titleWeb: {
256
- vi: 'Thông tin',
257
- en: 'Information',
258
- },
259
- },
260
- };
261
-
262
- export {Colors, Spacing, Radius, Shadow, Configs};
232
+ export {Colors, Spacing, Radius, Shadow};
package/Text/index.tsx CHANGED
@@ -33,20 +33,6 @@ const AlegreyaSans: TypographyWeight = {
33
33
  bold: 'Bold',
34
34
  };
35
35
 
36
- const MomoTrustSans: TypographyWeight = {
37
- 100: 'Light',
38
- 200: 'Light',
39
- 300: 'Light',
40
- 400: 'Regular',
41
- 500: 'Medium',
42
- 600: 'Medium',
43
- 700: 'Medium',
44
- 800: 'Medium',
45
- 900: 'Medium',
46
- normal: 'Regular',
47
- bold: 'Medium',
48
- };
49
-
50
36
  const FontStyle: {[key: string]: string} = {
51
37
  italic: 'Italic',
52
38
  normal: '',
@@ -107,10 +93,6 @@ const getTypoStyle = (typo: Typography, newFontFamily?: string) => {
107
93
  fontFamily = `${font}-${AlegreyaSans[fontWeight]}${style}`;
108
94
  break;
109
95
  }
110
- case 'MomoTrustSans': {
111
- fontFamily = `${font}-${MomoTrustSans[fontWeight]}${style}`;
112
- break;
113
- }
114
96
  case 'Montserrat-Bold':
115
97
  case 'iCielPanton-Black':
116
98
  case 'iCielBCCubano-Normal':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.112.1-optimize.1",
3
+ "version": "0.112.1-optimize.3",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},