@momo-kits/foundation 0.92.6-rc.15 → 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.
- package/Application/utils.tsx +1 -19
- package/Icon/index.tsx +1 -0
- package/Layout/FloatingButton.tsx +3 -3
- package/Popup/PopupNotify.tsx +14 -10
- package/index.ts +1 -2
- package/package.json +1 -1
package/Application/utils.tsx
CHANGED
|
@@ -12,8 +12,7 @@ import {
|
|
|
12
12
|
} from './Components';
|
|
13
13
|
import {NavigationOptions, Theme} from './types';
|
|
14
14
|
import {Colors} from '../Consts';
|
|
15
|
-
|
|
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
|
@@ -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:
|
|
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:
|
|
58
|
+
duration: 200,
|
|
59
59
|
useNativeDriver: false,
|
|
60
60
|
}).start(() => setShowText(true));
|
|
61
61
|
}
|
|
62
|
-
},
|
|
62
|
+
}, 300);
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
return () => {
|
package/Popup/PopupNotify.tsx
CHANGED
|
@@ -199,16 +199,20 @@ const PopupNotify: React.FC<PopupNotifyProps> = ({
|
|
|
199
199
|
{title}
|
|
200
200
|
</Text>
|
|
201
201
|
<Description style={[styles.description, descriptionStyle]}>
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
|
11
|
+
export {SafeAreaView, useSafeAreaInsets, SafeAreaProvider, LinearGradient};
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* foundation component
|