@momo-kits/foundation 0.92.21-beta.11 → 0.92.21-beta.13
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.
|
@@ -535,12 +535,22 @@ const HeaderExtendHeader: React.FC<{
|
|
|
535
535
|
if (inputSearchProps) {
|
|
536
536
|
if (headerType === 'surface') {
|
|
537
537
|
return (
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
538
|
+
<>
|
|
539
|
+
<Animated.View
|
|
540
|
+
style={[
|
|
541
|
+
styles.headerBox,
|
|
542
|
+
{
|
|
543
|
+
backgroundColor: theme.colors.background.surface,
|
|
544
|
+
borderBottomWidth: 1,
|
|
545
|
+
borderColor: theme.colors.border.default,
|
|
546
|
+
height: heightAnimated.current.interpolate({
|
|
547
|
+
inputRange: [0, 100],
|
|
548
|
+
outputRange: [heightHeader + 52, heightHeader],
|
|
549
|
+
extrapolate: 'clamp',
|
|
550
|
+
}),
|
|
551
|
+
},
|
|
552
|
+
]}
|
|
553
|
+
/>
|
|
544
554
|
<Animated.View
|
|
545
555
|
style={{
|
|
546
556
|
justifyContent: 'flex-end',
|
|
@@ -557,7 +567,7 @@ const HeaderExtendHeader: React.FC<{
|
|
|
557
567
|
hasColorBG={true}
|
|
558
568
|
/>
|
|
559
569
|
</Animated.View>
|
|
560
|
-
|
|
570
|
+
</>
|
|
561
571
|
);
|
|
562
572
|
}
|
|
563
573
|
|
package/Application/utils.tsx
CHANGED
|
@@ -149,9 +149,7 @@ const getOptions = (params: NavigationOptions, navigation?: Navigation) => {
|
|
|
149
149
|
{...props}
|
|
150
150
|
{...params.headerRight}
|
|
151
151
|
onLayout={(e: LayoutChangeEvent) => {
|
|
152
|
-
|
|
153
|
-
navigation.rightHeaderWidth = e.nativeEvent.layout.width;
|
|
154
|
-
}
|
|
152
|
+
navigation?.onHeaderRightChange?.(e.nativeEvent.layout.width);
|
|
155
153
|
}}
|
|
156
154
|
/>
|
|
157
155
|
);
|
|
@@ -162,9 +160,7 @@ const getOptions = (params: NavigationOptions, navigation?: Navigation) => {
|
|
|
162
160
|
<HeaderRight
|
|
163
161
|
{...props}
|
|
164
162
|
onLayout={(e: LayoutChangeEvent) => {
|
|
165
|
-
|
|
166
|
-
navigation.rightHeaderWidth = e.nativeEvent.layout.width;
|
|
167
|
-
}
|
|
163
|
+
navigation?.onHeaderRightChange?.(e.nativeEvent.layout.width);
|
|
168
164
|
}}>
|
|
169
165
|
{params.headerRight(props)}
|
|
170
166
|
</HeaderRight>
|
package/Assets/icon.json
CHANGED
|
@@ -4027,17 +4027,5 @@
|
|
|
4027
4027
|
},
|
|
4028
4028
|
"travel_suitcase": {
|
|
4029
4029
|
"uri": "https://static.momocdn.net/app/img/kits/travel_suitcase.png"
|
|
4030
|
-
},
|
|
4031
|
-
"security_abnormal_activity": {
|
|
4032
|
-
"uri": "https://static.momocdn.net/app/img/kits/security_abnormal_activity.png"
|
|
4033
|
-
},
|
|
4034
|
-
"security_bug": {
|
|
4035
|
-
"uri": "https://static.momocdn.net/app/img/kits/security_bug.png"
|
|
4036
|
-
},
|
|
4037
|
-
"security_hacker": {
|
|
4038
|
-
"uri": "https://static.momocdn.net/app/img/kits/security_hacker.png"
|
|
4039
|
-
},
|
|
4040
|
-
"security_phishing": {
|
|
4041
|
-
"uri": "https://static.momocdn.net/app/img/kits/security_phishing.png"
|
|
4042
4030
|
}
|
|
4043
4031
|
}
|
|
@@ -20,16 +20,9 @@ const AnimatedInputSearch: FC<AnimatedInputSearchProps> = ({
|
|
|
20
20
|
}) => {
|
|
21
21
|
const {width: screenWidth} = Dimensions.get('window');
|
|
22
22
|
const widthAnimated = useRef(new Animated.Value(0));
|
|
23
|
-
const [rightSpace, setRightSpace] = useState(
|
|
24
|
-
navigation?.rightHeaderWidth ?? 0
|
|
25
|
-
);
|
|
23
|
+
const [rightSpace, setRightSpace] = useState(0);
|
|
26
24
|
|
|
27
25
|
useEffect(() => {
|
|
28
|
-
setTimeout(() => {
|
|
29
|
-
if (rightSpace != navigation?.rightHeaderWidth) {
|
|
30
|
-
setRightSpace(navigation?.rightHeaderWidth ?? 0);
|
|
31
|
-
}
|
|
32
|
-
}, 500);
|
|
33
26
|
const listener = animatedValue.addListener(({value}) => {
|
|
34
27
|
widthAnimated.current.setValue(value);
|
|
35
28
|
});
|
|
@@ -38,6 +31,9 @@ const AnimatedInputSearch: FC<AnimatedInputSearchProps> = ({
|
|
|
38
31
|
};
|
|
39
32
|
}, []);
|
|
40
33
|
|
|
34
|
+
navigation!.onHeaderRightChange = (width: number) => {
|
|
35
|
+
setRightSpace(width);
|
|
36
|
+
};
|
|
41
37
|
const translateX = widthAnimated.current.interpolate({
|
|
42
38
|
inputRange: [0, 100],
|
|
43
39
|
outputRange: [SCREEN_PADDING, BACK_WIDTH + SCREEN_PADDING * 2],
|