@momo-kits/foundation 0.92.6-rc.14 → 0.92.6-rc.16

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.
@@ -78,6 +78,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
78
78
  context.autoTracking?.({
79
79
  appId: context.appId,
80
80
  code: context.code,
81
+ buildNumber: context.buildNumber,
81
82
  screenName,
82
83
  componentName: 'Screen',
83
84
  state: 'load',
@@ -100,6 +101,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
100
101
  context.autoTracking?.({
101
102
  appId: context.appId,
102
103
  code: context.code,
104
+ buildNumber: context.buildNumber,
103
105
  screenName,
104
106
  componentName: 'Screen',
105
107
  state: 'interaction',
@@ -12,8 +12,7 @@ import {
12
12
  } from './Components';
13
13
  import {NavigationOptions, Theme} from './types';
14
14
  import {Colors} from '../Consts';
15
- import {Platform} from 'react-native';
16
- const isIOS = Platform.OS === 'ios';
15
+
17
16
  /**
18
17
  * default options for stack screen
19
18
  */
@@ -142,22 +141,6 @@ const getOptions = (params: NavigationOptions, theme: Theme) => {
142
141
  };
143
142
  };
144
143
 
145
- const getAccessibilityID = (
146
- key = '',
147
- override: string | undefined = undefined,
148
- ) => {
149
- if (isIOS) {
150
- return {
151
- accessible: true,
152
- testID: override || key,
153
- };
154
- } else {
155
- return {
156
- accessibilityLabel: override || key,
157
- };
158
- }
159
- };
160
-
161
144
  const formatNameLength = (name = '') => {
162
145
  let formattedName = name;
163
146
  if (formattedName.length > 100) {
@@ -171,5 +154,4 @@ export {
171
154
  getModalOptions,
172
155
  getOptions,
173
156
  formatNameLength,
174
- getAccessibilityID,
175
157
  };
package/Icon/index.tsx CHANGED
@@ -33,6 +33,7 @@ const Icon: React.FC<IconProps> = ({
33
33
  loading={false}
34
34
  source={getIconSource()}
35
35
  style={[style, {width: size, height: size}]}
36
+ resizeMode='contain'
36
37
  {...tintColorProps}
37
38
  />
38
39
  );
package/Input/Input.tsx CHANGED
@@ -169,7 +169,7 @@ const Input = forwardRef(
169
169
  <TextInput
170
170
  {...props}
171
171
  accessibilityLabel={accessibilityLabel}
172
- editable={editable && !disabled}
172
+ editable={editable || !disabled}
173
173
  secureTextEntry={secure}
174
174
  textAlignVertical="center"
175
175
  ref={inputRef}
@@ -49,17 +49,17 @@ export const FloatingButton: React.FC<FloatingButtonProps> = ({
49
49
  if (down) {
50
50
  Animated.timing(widthAnimated!, {
51
51
  toValue: minWidth,
52
- duration: 300,
52
+ duration: 200,
53
53
  useNativeDriver: false,
54
54
  }).start(() => setShowText(false));
55
55
  } else {
56
56
  Animated.timing(widthAnimated!, {
57
57
  toValue: maxWidth.current,
58
- duration: 300,
58
+ duration: 200,
59
59
  useNativeDriver: false,
60
60
  }).start(() => setShowText(true));
61
61
  }
62
- }, 500);
62
+ }, 300);
63
63
  });
64
64
 
65
65
  return () => {
@@ -199,16 +199,20 @@ const PopupNotify: React.FC<PopupNotifyProps> = ({
199
199
  {title}
200
200
  </Text>
201
201
  <Description style={[styles.description, descriptionStyle]}>
202
- <Text
203
- typography={'body_default_regular'}
204
- onTextLayout={({nativeEvent: {lines}}) => {
205
- const enableScroll = lines.length > 3;
206
- if (enableScroll != scrollContent) {
207
- setScrollContent(enableScroll);
208
- }
209
- }}>
210
- {description}
211
- </Text>
202
+ {typeof description === 'string' ? (
203
+ <Text
204
+ typography={'body_default_regular'}
205
+ onTextLayout={({nativeEvent: {lines}}) => {
206
+ const enableScroll = lines.length > 3;
207
+ if (enableScroll != scrollContent) {
208
+ setScrollContent(enableScroll);
209
+ }
210
+ }}>
211
+ {description}
212
+ </Text>
213
+ ) : (
214
+ description
215
+ )}
212
216
  </Description>
213
217
  {!!error && (
214
218
  <View style={styles.information}>
package/index.ts CHANGED
@@ -4,12 +4,11 @@ import {
4
4
  useSafeAreaInsets,
5
5
  } from 'react-native-safe-area-context';
6
6
  import LinearGradient from 'react-native-linear-gradient';
7
- import {getAccessibilityID} from "./Application/utils";
8
7
 
9
8
  /**
10
9
  * native export
11
10
  */
12
- export {SafeAreaView, useSafeAreaInsets, SafeAreaProvider, LinearGradient, getAccessibilityID};
11
+ export {SafeAreaView, useSafeAreaInsets, SafeAreaProvider, LinearGradient};
13
12
 
14
13
  /**
15
14
  * foundation component
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.6-rc.14",
3
+ "version": "0.92.6-rc.16",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},