@momo-kits/foundation 0.92.6-rc.7 → 0.92.6-rc.9

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.
package/Image/index.tsx CHANGED
@@ -2,7 +2,11 @@ import React, {useContext, useEffect, useRef, useState} from 'react';
2
2
  import {StyleSheet, View} from 'react-native';
3
3
  import FastImage, {Source} from 'react-native-fast-image';
4
4
  import styles from './styles';
5
- import {ApplicationContext, ComponentContext, MiniAppContext} from '../Application';
5
+ import {
6
+ ApplicationContext,
7
+ ComponentContext,
8
+ MiniAppContext,
9
+ } from '../Application';
6
10
  import {Skeleton} from '../Skeleton';
7
11
  import {Icon} from '../Icon';
8
12
  import {Styles} from '../Consts';
@@ -30,9 +34,9 @@ const Image: React.FC<ImageProps> = ({
30
34
  };
31
35
 
32
36
  useEffect(() => {
33
- if(app.enableAutoId){
37
+ if (app.enableAutoId) {
34
38
  component?.addChildren?.(test.accessibilityLabel, 'add');
35
- return () => component?.addChildren(test.accessibilityLabel, 'remove');
39
+ return () => component?.addChildren?.(test.accessibilityLabel, 'remove');
36
40
  }
37
41
  }, []);
38
42
 
@@ -57,37 +61,37 @@ const Image: React.FC<ImageProps> = ({
57
61
  };
58
62
 
59
63
  return (
60
- <FastImage
61
- {...rest}
62
- {...test}
63
- source={source}
64
- style={[styles.container, style]}
65
- onProgress={() => {
66
- error.current = false;
67
- if (status !== 'loading' && loading) {
68
- setStatus('loading');
69
- }
70
- }}
71
- onLoadStart={() => {
72
- error.current = false;
73
- }}
74
- onLoad={() => {
75
- error.current = false;
76
- }}
77
- onLoadEnd={() => {
78
- let current: Status = 'success';
79
- if (error.current) {
80
- current = 'error';
81
- }
82
- if (status !== current) {
83
- setStatus(current);
84
- }
85
- }}
86
- onError={() => {
87
- error.current = true;
88
- }}>
89
- {renderContent()}
90
- </FastImage>
64
+ <FastImage
65
+ {...rest}
66
+ {...test}
67
+ source={source}
68
+ style={[styles.container, style]}
69
+ onProgress={() => {
70
+ error.current = false;
71
+ if (status !== 'loading' && loading) {
72
+ setStatus('loading');
73
+ }
74
+ }}
75
+ onLoadStart={() => {
76
+ error.current = false;
77
+ }}
78
+ onLoad={() => {
79
+ error.current = false;
80
+ }}
81
+ onLoadEnd={() => {
82
+ let current: Status = 'success';
83
+ if (error.current) {
84
+ current = 'error';
85
+ }
86
+ if (status !== current) {
87
+ setStatus(current);
88
+ }
89
+ }}
90
+ onError={() => {
91
+ error.current = true;
92
+ }}>
93
+ {renderContent()}
94
+ </FastImage>
91
95
  );
92
96
  };
93
97
 
package/Input/Input.tsx CHANGED
@@ -50,6 +50,7 @@ const Input = forwardRef(
50
50
  params,
51
51
  hintText,
52
52
  accessibilityLabel,
53
+ editable = true,
53
54
  ...props
54
55
  }: InputProps,
55
56
  ref,
@@ -168,7 +169,7 @@ const Input = forwardRef(
168
169
  <TextInput
169
170
  {...props}
170
171
  accessibilityLabel={accessibilityLabel}
171
- editable={props.editable && !disabled}
172
+ editable={editable && !disabled}
172
173
  secureTextEntry={secure}
173
174
  textAlignVertical="center"
174
175
  ref={inputRef}
package/Layout/Screen.tsx CHANGED
@@ -114,7 +114,7 @@ const Screen = forwardRef(
114
114
  }: ScreenProps,
115
115
  ref,
116
116
  ) => {
117
- const animatedValue = useRef<Animated.Value | undefined>(undefined);
117
+ const animatedValue = useRef<Animated.Value>();
118
118
  const {theme} = useContext(ApplicationContext);
119
119
  const insets = useSafeAreaInsets();
120
120
  const heightHeader = useHeaderHeight();
@@ -190,12 +190,9 @@ const Screen = forwardRef(
190
190
  image={null}
191
191
  backgroundColor={theme.colors.background.surface}
192
192
  useBorder={true}
193
- animatedValue={animatedValue.current}
194
193
  />
195
194
  ),
196
- headerTitle: (props: any) => (
197
- <HeaderTitle {...props} animatedValue={animatedValue.current} />
198
- ),
195
+ headerTitle: (props: any) => <HeaderTitle {...props} />,
199
196
  };
200
197
  break;
201
198
 
@@ -228,8 +225,6 @@ const Screen = forwardRef(
228
225
  Component = Animated.ScrollView;
229
226
  handleScroll = scrollViewProps?.onScroll;
230
227
  if (animatedHeader || floatingButtonProps) {
231
- animatedValue.current = new Animated.Value(0);
232
-
233
228
  handleScroll = Animated.event(
234
229
  [
235
230
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.6-rc.7",
3
+ "version": "0.92.6-rc.9",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},