@momo-kits/foundation 0.81.1-optimize.14 → 0.81.1-optimize.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/BottomSheet.tsx +2 -2
- package/Application/BottomTab/BottomTabBar.tsx +4 -17
- package/Application/BottomTab/index.tsx +1 -5
- package/Application/StackScreen.tsx +1 -3
- package/Layout/Card.tsx +1 -0
- package/Layout/Screen.tsx +4 -2
- package/Layout/Section.tsx +1 -0
- package/Loader/index.tsx +2 -0
- package/Popup/PopupNotify.tsx +1 -1
- package/Popup/PopupPromotion.tsx +1 -1
- package/Popup/types.ts +1 -1
- package/package.json +1 -1
|
@@ -84,9 +84,9 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
84
84
|
Animated.timing(animatedHeight, {
|
|
85
85
|
useNativeDriver: false,
|
|
86
86
|
toValue: heightDevice * point,
|
|
87
|
-
duration:
|
|
87
|
+
duration: 150,
|
|
88
88
|
}).start();
|
|
89
|
-
},
|
|
89
|
+
}, 50);
|
|
90
90
|
}, [estimate]);
|
|
91
91
|
|
|
92
92
|
/**
|
|
@@ -26,7 +26,6 @@ type Props = BottomTabBarProps & {
|
|
|
26
26
|
activeTintColor?: string;
|
|
27
27
|
inactiveTintColor?: string;
|
|
28
28
|
floatingButton?: FloatingButtonProps;
|
|
29
|
-
accessibilityLabel?: string;
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
const getPaddingBottom = (insets: EdgeInsets) => {
|
|
@@ -65,7 +64,7 @@ export default function BottomTabBar({
|
|
|
65
64
|
*/
|
|
66
65
|
const renderTabItem = useCallback(
|
|
67
66
|
(data: any[]) => {
|
|
68
|
-
return data?.map((route,
|
|
67
|
+
return data?.map((route, _) => {
|
|
69
68
|
const focused = route.params.name === focusedTab;
|
|
70
69
|
const {options} = descriptors[route?.key] as any;
|
|
71
70
|
const onPress = () => {
|
|
@@ -90,19 +89,7 @@ export default function BottomTabBar({
|
|
|
90
89
|
});
|
|
91
90
|
};
|
|
92
91
|
|
|
93
|
-
const label =
|
|
94
|
-
options.tabBarLabel !== undefined
|
|
95
|
-
? options.tabBarLabel
|
|
96
|
-
: options.title !== undefined
|
|
97
|
-
? options.title
|
|
98
|
-
: route.name;
|
|
99
|
-
|
|
100
|
-
const accessibilityLabel =
|
|
101
|
-
options.tabBarAccessibilityLabel !== undefined
|
|
102
|
-
? options.tabBarAccessibilityLabel
|
|
103
|
-
: typeof label === 'string'
|
|
104
|
-
? `${label}, tab, ${index + 1} of ${routes.length}`
|
|
105
|
-
: undefined;
|
|
92
|
+
const label = options.tabBarLabel || options.title || route.name;
|
|
106
93
|
|
|
107
94
|
return (
|
|
108
95
|
<NavigationContext.Provider
|
|
@@ -115,7 +102,7 @@ export default function BottomTabBar({
|
|
|
115
102
|
horizontal={false}
|
|
116
103
|
onPress={onPress}
|
|
117
104
|
onLongPress={onLongPress}
|
|
118
|
-
accessibilityLabel={
|
|
105
|
+
accessibilityLabel={`tab_item_${route.name}`}
|
|
119
106
|
to={buildLink(route.name, route.params)}
|
|
120
107
|
testID={options.tabBarTestID}
|
|
121
108
|
allowFontScaling={allowFontScaling}
|
|
@@ -232,7 +219,7 @@ export default function BottomTabBar({
|
|
|
232
219
|
style,
|
|
233
220
|
]}
|
|
234
221
|
pointerEvents={'auto'}>
|
|
235
|
-
<View style={styles.content}>
|
|
222
|
+
<View style={styles.content} accessibilityLabel={'bottom_tab_bar'}>
|
|
236
223
|
{useFloating && floatingButton?.container}
|
|
237
224
|
<Animated.View
|
|
238
225
|
style={{
|
|
@@ -81,11 +81,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
|
|
|
81
81
|
initialRouteName={initialRouteName}
|
|
82
82
|
backBehavior={'firstRoute'}
|
|
83
83
|
tabBar={props => (
|
|
84
|
-
<BottomTabBar
|
|
85
|
-
{...props}
|
|
86
|
-
accessibilityLabel={'BottomTabBar'}
|
|
87
|
-
floatingButton={floatingButton}
|
|
88
|
-
/>
|
|
84
|
+
<BottomTabBar {...props} floatingButton={floatingButton} />
|
|
89
85
|
)}
|
|
90
86
|
tabBarOptions={{
|
|
91
87
|
style: {
|
|
@@ -50,9 +50,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
50
50
|
* tracking for screen
|
|
51
51
|
*/
|
|
52
52
|
useEffect(() => {
|
|
53
|
-
|
|
54
|
-
Alert.alert('Design system', `Unvalidated screen name "${screenName}" !`);
|
|
55
|
-
}
|
|
53
|
+
Alert.alert(screenName);
|
|
56
54
|
|
|
57
55
|
navigator?.maxApi?.of?.({screenName});
|
|
58
56
|
|
package/Layout/Card.tsx
CHANGED
package/Layout/Screen.tsx
CHANGED
|
@@ -296,7 +296,8 @@ const Screen = forwardRef(
|
|
|
296
296
|
style={{
|
|
297
297
|
marginTop: space,
|
|
298
298
|
flex: item.props?.expanded ? 1 : undefined,
|
|
299
|
-
}}
|
|
299
|
+
}}
|
|
300
|
+
onLayout={item.props?.onLayout}>
|
|
300
301
|
{item}
|
|
301
302
|
</View>
|
|
302
303
|
);
|
|
@@ -314,7 +315,8 @@ const Screen = forwardRef(
|
|
|
314
315
|
style={{
|
|
315
316
|
marginTop: space,
|
|
316
317
|
flex: item?.props?.expanded ? 1 : undefined,
|
|
317
|
-
}}
|
|
318
|
+
}}
|
|
319
|
+
onLayout={item?.props?.onLayout}>
|
|
318
320
|
{children}
|
|
319
321
|
</View>
|
|
320
322
|
);
|
package/Layout/Section.tsx
CHANGED
package/Loader/index.tsx
CHANGED
package/Popup/PopupNotify.tsx
CHANGED
package/Popup/PopupPromotion.tsx
CHANGED
package/Popup/types.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type PopupNotifyProps = {
|
|
|
18
18
|
/**
|
|
19
19
|
* `description`: Represents the description text to be displayed in the PopupNotify component.
|
|
20
20
|
*/
|
|
21
|
-
description
|
|
21
|
+
description?: string | React.ReactNode;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* `error`: Optional. Represents additional error text to be displayed in the PopupNotify component.
|