@momo-kits/foundation 0.92.19 → 0.92.21-beta.0

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.
@@ -125,7 +125,7 @@ export default function BottomTabBar({
125
125
  );
126
126
  });
127
127
  },
128
- [JSON.stringify(routes), state, descriptors, focusedTab],
128
+ [JSON.stringify(routes), state, descriptors, focusedTab]
129
129
  );
130
130
 
131
131
  /**
@@ -153,7 +153,7 @@ export default function BottomTabBar({
153
153
  </View>
154
154
  <View
155
155
  style={{
156
- top: -6,
156
+ top: -4,
157
157
  backgroundColor: activeTintColor ?? theme.colors.primary,
158
158
  borderRadius: Radius.XL,
159
159
  paddingHorizontal: 6,
@@ -101,7 +101,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
101
101
  name={item.name}
102
102
  component={TabScreen}
103
103
  initialParams={{...item, nested}}
104
- listeners={listeners}
104
+ listeners={item.listeners ?? listeners}
105
105
  options={{
106
106
  tabBarLabel: ({color, focused}) => {
107
107
  return (
@@ -1,4 +1,5 @@
1
1
  import {StackNavigationOptions} from '@react-navigation/stack';
2
+ import {EventArg} from '@react-navigation/core';
2
3
  import React from 'react';
3
4
  import {Animated, ViewProps} from 'react-native';
4
5
  import {PopupNotifyProps} from '../Popup/types';
@@ -198,6 +199,11 @@ export type BottomTabItemProps = {
198
199
  screen: Screen;
199
200
  options: NavigationOptions;
200
201
  initialParams?: any;
202
+ listeners?: {
203
+ tabPress?: (e: EventArg<'tabPress', true, undefined>) => void;
204
+ focus?: (e: EventArg<'focus', false, unknown>) => void;
205
+ blur?: (e: EventArg<'blur', false, unknown>) => void;
206
+ };
201
207
  };
202
208
 
203
209
  export type BottomTabProps = {
@@ -206,8 +212,9 @@ export type BottomTabProps = {
206
212
  initialRouteName?: string;
207
213
  navigation: Navigation;
208
214
  listeners?: {
209
- tabPress?: any;
210
- focus?: any;
215
+ tabPress?: (e: EventArg<'tabPress', true, undefined>) => void;
216
+ focus?: (e: EventArg<'focus', false, unknown>) => void;
217
+ blur?: (e: EventArg<'blur', false, unknown>) => void;
211
218
  };
212
219
  floatingButton?: FloatingButtonProps;
213
220
  };
package/Icon/types.ts CHANGED
@@ -16,7 +16,6 @@ export type IconProps = {
16
16
 
17
17
  /**
18
18
  * Optional. Represents the color of the icon.
19
- * It can be any valid color in @momo-kits/foundation.
20
19
  */
21
20
  color?: string | null;
22
21
 
@@ -4,7 +4,7 @@ import {ApplicationContext, ComponentContext} from '../Application';
4
4
  import {Styles} from '../Consts';
5
5
  import {Icon} from '../Icon';
6
6
  import {Loader} from '../Loader';
7
- import {ErrorView, FloatingView, getSizeStyle} from './common';
7
+ import {ErrorView, FloatingView, getBorderColor, getSizeStyle} from './common';
8
8
  import {InputDropDownProps} from './index';
9
9
  import styles from './styles';
10
10
 
@@ -61,7 +61,7 @@ const InputDropDown = ({
61
61
  styles.inputWrapper,
62
62
  {backgroundColor: theme.colors.background.surface},
63
63
  getSizeStyle(size),
64
- // getBorderColor(theme, false, errorMessage, disabled),
64
+ getBorderColor(theme, false, errorMessage, disabled),
65
65
  ]}>
66
66
  <FloatingView
67
67
  floatingValue={floatingValue}
package/Title/index.tsx CHANGED
@@ -1,16 +1,13 @@
1
1
  import React, {FC, useContext, useState} from 'react';
2
2
  import {Text as RNText, TouchableOpacity, View, ViewStyle} from 'react-native';
3
- import {
4
- Typography,
5
- Colors,
6
- Icon,
7
- Badge,
8
- ApplicationContext,
9
- scaleSize,
10
- Text,
11
- } from '@momo-kits/foundation';
3
+ import {Icon} from '../Icon';
4
+ import {scaleSize, Text} from '../Text';
5
+ import {ApplicationContext} from '../Application';
6
+ import {Badge} from '../Badge';
7
+ import {Colors} from '../Consts';
12
8
  import styles from './styles';
13
9
  import {TitleProps} from './types';
10
+ import {Typography} from '../Text/types';
14
11
 
15
12
  const Title: FC<TitleProps> = ({
16
13
  title = 'Title',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.19",
3
+ "version": "0.92.21-beta.0",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},
@@ -43,4 +43,4 @@
43
43
  },
44
44
  "author": "@momo-kits/foundation",
45
45
  "license": "ISC"
46
- }
46
+ }
package/publish.sh CHANGED
@@ -7,16 +7,16 @@ rsync -r --exclude=/dist ./* dist
7
7
  cd dist
8
8
 
9
9
  if [ "$1" == "stable" ]; then
10
- npm version $(npm view @momo-kits/foundation@stable version)
11
- npm version patch
10
+ #npm version $(npm view @momo-kits/foundation@stable version)
11
+ #npm version patch
12
12
  npm publish --tag stable --access=public
13
13
  elif [ "$1" == "latest" ]; then
14
- npm version $(npm view @momo-kits/foundation@latest version)
15
- npm version prerelease --preid=rc
14
+ #npm version $(npm view @momo-kits/foundation@latest version)
15
+ #npm version prerelease --preid=rc
16
16
  npm publish --tag latest --access=public
17
17
  else
18
- npm version $(npm view @momo-kits/foundation@beta version)
19
- npm version prerelease --preid=beta
18
+ #npm version $(npm view @momo-kits/foundation@beta version)
19
+ #npm version prerelease --preid=beta
20
20
  npm publish --tag beta --access=public
21
21
  fi
22
22