diff --git a/native/chat/chat.react.js b/native/chat/chat.react.js --- a/native/chat/chat.react.js +++ b/native/chat/chat.react.js @@ -102,16 +102,16 @@ function ChatThreadsComponent(): React.Node { const colors = useColors(); const { tabBarBackground, tabBarAccent } = colors; - const tabBarOptions = React.useMemo( + const screenOptions = React.useMemo( () => ({ - showIcon: true, - style: { + tabBarShowIcon: true, + tabBarStyle: { backgroundColor: tabBarBackground, }, - tabStyle: { + tabBarItemStyle: { flexDirection: 'row', }, - indicatorStyle: { + tabBarIndicatorStyle: { borderColor: tabBarAccent, borderBottomWidth: 2, }, @@ -119,7 +119,7 @@ [tabBarAccent, tabBarBackground], ); return ( - + React$Node, +tabBarAccessibilityLabel: string, +tabBarTestID: string, + +tabBarActiveTintColor: string, + +tabBarInactiveTintColor: string, + +tabBarPressColor: string, + +tabBarPressOpacity: number, + +tabBarShowLabel: boolean, + +tabBarShowIcon: boolean, + +tabBarAllowFontScaling: boolean, + +tabBarBounces: boolean, + +tabBarScrollEnabled: boolean, + +tabBarIconStyle: ViewStyleProp, + +tabBarLabelStyle: TextStyleProp, + +tabBarItemStyle: ViewStyleProp, + +tabBarIndicatorStyle: ViewStyleProp, + +tabBarIndicatorContainerStyle: ViewStyleProp, + +tabBarContentContainerStyle: ViewStyleProp, + +tabBarStyle: ViewStyleProp, + +tabBarBadge: () => React$Node, + +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node, + +lazy: boolean, + +lazyPlaceholder: ({| +route: Route<> |}) => React$Node, |}>; /** @@ -1891,35 +1911,12 @@ |}; declare export type MaterialTopTabBarIndicatorProps = {| - +navigationState: TabNavigationState, + +state: TabNavigationState, +width: string, +style?: ViewStyleProp, +getTabWidth: number => number, |}; - declare export type MaterialTopTabBarOptions = $Partial<{| - +scrollEnabled: boolean, - +bounces: boolean, - +pressColor: string, - +pressOpacity: number, - +getAccessible: ({| +route: Route<> |}) => boolean, - +renderBadge: ({| +route: Route<> |}) => React$Node, - +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node, - +tabStyle: ViewStyleProp, - +indicatorStyle: ViewStyleProp, - +indicatorContainerStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - +activeTintColor: string, - +inactiveTintColor: string, - +iconStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +showLabel: boolean, - +showIcon: boolean, - +allowFontScaling: boolean, - |}>; - declare export type MaterialTopTabDescriptor = Descriptor< MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, @@ -1932,7 +1929,6 @@ |}; declare export type MaterialTopTabBarProps = {| - ...MaterialTopTabBarOptions, ...MaterialTopTabNavigationBuilderResult, +layout: {| +width: number, +height: number |}, +position: any, // Reanimated.Node @@ -1944,16 +1940,13 @@ +position?: any, // Reanimated.Value +tabBarPosition?: 'top' | 'bottom', +initialLayout?: $Partial<{| +width: number, +height: number |}>, - +lazy?: boolean, +lazyPreloadDistance?: number, +removeClippedSubviews?: boolean, +sceneContainerStyle?: ViewStyleProp, +style?: ViewStyleProp, +gestureHandlerProps?: PanGestureHandlerProps, +pager?: MaterialTopTabPagerProps => React$Node, - +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node, +tabBar?: MaterialTopTabBarProps => React$Node, - +tabBarOptions?: MaterialTopTabBarOptions, |}; declare export type ExtraMaterialTopTabNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js b/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js @@ -1808,6 +1808,26 @@ +tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node, +tabBarAccessibilityLabel: string, +tabBarTestID: string, + +tabBarActiveTintColor: string, + +tabBarInactiveTintColor: string, + +tabBarPressColor: string, + +tabBarPressOpacity: number, + +tabBarShowLabel: boolean, + +tabBarShowIcon: boolean, + +tabBarAllowFontScaling: boolean, + +tabBarBounces: boolean, + +tabBarScrollEnabled: boolean, + +tabBarIconStyle: ViewStyleProp, + +tabBarLabelStyle: TextStyleProp, + +tabBarItemStyle: ViewStyleProp, + +tabBarIndicatorStyle: ViewStyleProp, + +tabBarIndicatorContainerStyle: ViewStyleProp, + +tabBarContentContainerStyle: ViewStyleProp, + +tabBarStyle: ViewStyleProp, + +tabBarBadge: () => React$Node, + +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node, + +lazy: boolean, + +lazyPlaceholder: ({| +route: Route<> |}) => React$Node, |}>; /** @@ -1891,35 +1911,12 @@ |}; declare export type MaterialTopTabBarIndicatorProps = {| - +navigationState: TabNavigationState, + +state: TabNavigationState, +width: string, +style?: ViewStyleProp, +getTabWidth: number => number, |}; - declare export type MaterialTopTabBarOptions = $Partial<{| - +scrollEnabled: boolean, - +bounces: boolean, - +pressColor: string, - +pressOpacity: number, - +getAccessible: ({| +route: Route<> |}) => boolean, - +renderBadge: ({| +route: Route<> |}) => React$Node, - +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node, - +tabStyle: ViewStyleProp, - +indicatorStyle: ViewStyleProp, - +indicatorContainerStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - +activeTintColor: string, - +inactiveTintColor: string, - +iconStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +showLabel: boolean, - +showIcon: boolean, - +allowFontScaling: boolean, - |}>; - declare export type MaterialTopTabDescriptor = Descriptor< MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, @@ -1932,7 +1929,6 @@ |}; declare export type MaterialTopTabBarProps = {| - ...MaterialTopTabBarOptions, ...MaterialTopTabNavigationBuilderResult, +layout: {| +width: number, +height: number |}, +position: any, // Reanimated.Node @@ -1944,16 +1940,13 @@ +position?: any, // Reanimated.Value +tabBarPosition?: 'top' | 'bottom', +initialLayout?: $Partial<{| +width: number, +height: number |}>, - +lazy?: boolean, +lazyPreloadDistance?: number, +removeClippedSubviews?: boolean, +sceneContainerStyle?: ViewStyleProp, +style?: ViewStyleProp, +gestureHandlerProps?: PanGestureHandlerProps, +pager?: MaterialTopTabPagerProps => React$Node, - +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node, +tabBar?: MaterialTopTabBarProps => React$Node, - +tabBarOptions?: MaterialTopTabBarOptions, |}; declare export type ExtraMaterialTopTabNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/elements_v1.x.x.js b/native/flow-typed/npm/@react-navigation/elements_v1.x.x.js --- a/native/flow-typed/npm/@react-navigation/elements_v1.x.x.js +++ b/native/flow-typed/npm/@react-navigation/elements_v1.x.x.js @@ -1805,6 +1805,26 @@ +tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node, +tabBarAccessibilityLabel: string, +tabBarTestID: string, + +tabBarActiveTintColor: string, + +tabBarInactiveTintColor: string, + +tabBarPressColor: string, + +tabBarPressOpacity: number, + +tabBarShowLabel: boolean, + +tabBarShowIcon: boolean, + +tabBarAllowFontScaling: boolean, + +tabBarBounces: boolean, + +tabBarScrollEnabled: boolean, + +tabBarIconStyle: ViewStyleProp, + +tabBarLabelStyle: TextStyleProp, + +tabBarItemStyle: ViewStyleProp, + +tabBarIndicatorStyle: ViewStyleProp, + +tabBarIndicatorContainerStyle: ViewStyleProp, + +tabBarContentContainerStyle: ViewStyleProp, + +tabBarStyle: ViewStyleProp, + +tabBarBadge: () => React$Node, + +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node, + +lazy: boolean, + +lazyPlaceholder: ({| +route: Route<> |}) => React$Node, |}>; /** @@ -1888,35 +1908,12 @@ |}; declare export type MaterialTopTabBarIndicatorProps = {| - +navigationState: TabNavigationState, + +state: TabNavigationState, +width: string, +style?: ViewStyleProp, +getTabWidth: number => number, |}; - declare export type MaterialTopTabBarOptions = $Partial<{| - +scrollEnabled: boolean, - +bounces: boolean, - +pressColor: string, - +pressOpacity: number, - +getAccessible: ({| +route: Route<> |}) => boolean, - +renderBadge: ({| +route: Route<> |}) => React$Node, - +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node, - +tabStyle: ViewStyleProp, - +indicatorStyle: ViewStyleProp, - +indicatorContainerStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - +activeTintColor: string, - +inactiveTintColor: string, - +iconStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +showLabel: boolean, - +showIcon: boolean, - +allowFontScaling: boolean, - |}>; - declare export type MaterialTopTabDescriptor = Descriptor< MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, @@ -1929,7 +1926,6 @@ |}; declare export type MaterialTopTabBarProps = {| - ...MaterialTopTabBarOptions, ...MaterialTopTabNavigationBuilderResult, +layout: {| +width: number, +height: number |}, +position: any, // Reanimated.Node @@ -1941,16 +1937,13 @@ +position?: any, // Reanimated.Value +tabBarPosition?: 'top' | 'bottom', +initialLayout?: $Partial<{| +width: number, +height: number |}>, - +lazy?: boolean, +lazyPreloadDistance?: number, +removeClippedSubviews?: boolean, +sceneContainerStyle?: ViewStyleProp, +style?: ViewStyleProp, +gestureHandlerProps?: PanGestureHandlerProps, +pager?: MaterialTopTabPagerProps => React$Node, - +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node, +tabBar?: MaterialTopTabBarProps => React$Node, - +tabBarOptions?: MaterialTopTabBarOptions, |}; declare export type ExtraMaterialTopTabNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js b/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js @@ -1808,6 +1808,26 @@ +tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node, +tabBarAccessibilityLabel: string, +tabBarTestID: string, + +tabBarActiveTintColor: string, + +tabBarInactiveTintColor: string, + +tabBarPressColor: string, + +tabBarPressOpacity: number, + +tabBarShowLabel: boolean, + +tabBarShowIcon: boolean, + +tabBarAllowFontScaling: boolean, + +tabBarBounces: boolean, + +tabBarScrollEnabled: boolean, + +tabBarIconStyle: ViewStyleProp, + +tabBarLabelStyle: TextStyleProp, + +tabBarItemStyle: ViewStyleProp, + +tabBarIndicatorStyle: ViewStyleProp, + +tabBarIndicatorContainerStyle: ViewStyleProp, + +tabBarContentContainerStyle: ViewStyleProp, + +tabBarStyle: ViewStyleProp, + +tabBarBadge: () => React$Node, + +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node, + +lazy: boolean, + +lazyPlaceholder: ({| +route: Route<> |}) => React$Node, |}>; /** @@ -1891,35 +1911,12 @@ |}; declare export type MaterialTopTabBarIndicatorProps = {| - +navigationState: TabNavigationState, + +state: TabNavigationState, +width: string, +style?: ViewStyleProp, +getTabWidth: number => number, |}; - declare export type MaterialTopTabBarOptions = $Partial<{| - +scrollEnabled: boolean, - +bounces: boolean, - +pressColor: string, - +pressOpacity: number, - +getAccessible: ({| +route: Route<> |}) => boolean, - +renderBadge: ({| +route: Route<> |}) => React$Node, - +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node, - +tabStyle: ViewStyleProp, - +indicatorStyle: ViewStyleProp, - +indicatorContainerStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - +activeTintColor: string, - +inactiveTintColor: string, - +iconStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +showLabel: boolean, - +showIcon: boolean, - +allowFontScaling: boolean, - |}>; - declare export type MaterialTopTabDescriptor = Descriptor< MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, @@ -1932,7 +1929,6 @@ |}; declare export type MaterialTopTabBarProps = {| - ...MaterialTopTabBarOptions, ...MaterialTopTabNavigationBuilderResult, +layout: {| +width: number, +height: number |}, +position: any, // Reanimated.Node @@ -1944,16 +1940,13 @@ +position?: any, // Reanimated.Value +tabBarPosition?: 'top' | 'bottom', +initialLayout?: $Partial<{| +width: number, +height: number |}>, - +lazy?: boolean, +lazyPreloadDistance?: number, +removeClippedSubviews?: boolean, +sceneContainerStyle?: ViewStyleProp, +style?: ViewStyleProp, +gestureHandlerProps?: PanGestureHandlerProps, +pager?: MaterialTopTabPagerProps => React$Node, - +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node, +tabBar?: MaterialTopTabBarProps => React$Node, - +tabBarOptions?: MaterialTopTabBarOptions, |}; declare export type ExtraMaterialTopTabNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js @@ -1808,6 +1808,26 @@ +tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node, +tabBarAccessibilityLabel: string, +tabBarTestID: string, + +tabBarActiveTintColor: string, + +tabBarInactiveTintColor: string, + +tabBarPressColor: string, + +tabBarPressOpacity: number, + +tabBarShowLabel: boolean, + +tabBarShowIcon: boolean, + +tabBarAllowFontScaling: boolean, + +tabBarBounces: boolean, + +tabBarScrollEnabled: boolean, + +tabBarIconStyle: ViewStyleProp, + +tabBarLabelStyle: TextStyleProp, + +tabBarItemStyle: ViewStyleProp, + +tabBarIndicatorStyle: ViewStyleProp, + +tabBarIndicatorContainerStyle: ViewStyleProp, + +tabBarContentContainerStyle: ViewStyleProp, + +tabBarStyle: ViewStyleProp, + +tabBarBadge: () => React$Node, + +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node, + +lazy: boolean, + +lazyPlaceholder: ({| +route: Route<> |}) => React$Node, |}>; /** @@ -1891,35 +1911,12 @@ |}; declare export type MaterialTopTabBarIndicatorProps = {| - +navigationState: TabNavigationState, + +state: TabNavigationState, +width: string, +style?: ViewStyleProp, +getTabWidth: number => number, |}; - declare export type MaterialTopTabBarOptions = $Partial<{| - +scrollEnabled: boolean, - +bounces: boolean, - +pressColor: string, - +pressOpacity: number, - +getAccessible: ({| +route: Route<> |}) => boolean, - +renderBadge: ({| +route: Route<> |}) => React$Node, - +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node, - +tabStyle: ViewStyleProp, - +indicatorStyle: ViewStyleProp, - +indicatorContainerStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - +activeTintColor: string, - +inactiveTintColor: string, - +iconStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +showLabel: boolean, - +showIcon: boolean, - +allowFontScaling: boolean, - |}>; - declare export type MaterialTopTabDescriptor = Descriptor< MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, @@ -1932,7 +1929,6 @@ |}; declare export type MaterialTopTabBarProps = {| - ...MaterialTopTabBarOptions, ...MaterialTopTabNavigationBuilderResult, +layout: {| +width: number, +height: number |}, +position: any, // Reanimated.Node @@ -1944,16 +1940,13 @@ +position?: any, // Reanimated.Value +tabBarPosition?: 'top' | 'bottom', +initialLayout?: $Partial<{| +width: number, +height: number |}>, - +lazy?: boolean, +lazyPreloadDistance?: number, +removeClippedSubviews?: boolean, +sceneContainerStyle?: ViewStyleProp, +style?: ViewStyleProp, +gestureHandlerProps?: PanGestureHandlerProps, +pager?: MaterialTopTabPagerProps => React$Node, - +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node, +tabBar?: MaterialTopTabBarProps => React$Node, - +tabBarOptions?: MaterialTopTabBarOptions, |}; declare export type ExtraMaterialTopTabNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js b/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js @@ -1808,6 +1808,26 @@ +tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node, +tabBarAccessibilityLabel: string, +tabBarTestID: string, + +tabBarActiveTintColor: string, + +tabBarInactiveTintColor: string, + +tabBarPressColor: string, + +tabBarPressOpacity: number, + +tabBarShowLabel: boolean, + +tabBarShowIcon: boolean, + +tabBarAllowFontScaling: boolean, + +tabBarBounces: boolean, + +tabBarScrollEnabled: boolean, + +tabBarIconStyle: ViewStyleProp, + +tabBarLabelStyle: TextStyleProp, + +tabBarItemStyle: ViewStyleProp, + +tabBarIndicatorStyle: ViewStyleProp, + +tabBarIndicatorContainerStyle: ViewStyleProp, + +tabBarContentContainerStyle: ViewStyleProp, + +tabBarStyle: ViewStyleProp, + +tabBarBadge: () => React$Node, + +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node, + +lazy: boolean, + +lazyPlaceholder: ({| +route: Route<> |}) => React$Node, |}>; /** @@ -1891,35 +1911,12 @@ |}; declare export type MaterialTopTabBarIndicatorProps = {| - +navigationState: TabNavigationState, + +state: TabNavigationState, +width: string, +style?: ViewStyleProp, +getTabWidth: number => number, |}; - declare export type MaterialTopTabBarOptions = $Partial<{| - +scrollEnabled: boolean, - +bounces: boolean, - +pressColor: string, - +pressOpacity: number, - +getAccessible: ({| +route: Route<> |}) => boolean, - +renderBadge: ({| +route: Route<> |}) => React$Node, - +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node, - +tabStyle: ViewStyleProp, - +indicatorStyle: ViewStyleProp, - +indicatorContainerStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - +activeTintColor: string, - +inactiveTintColor: string, - +iconStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - +showLabel: boolean, - +showIcon: boolean, - +allowFontScaling: boolean, - |}>; - declare export type MaterialTopTabDescriptor = Descriptor< MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, @@ -1932,7 +1929,6 @@ |}; declare export type MaterialTopTabBarProps = {| - ...MaterialTopTabBarOptions, ...MaterialTopTabNavigationBuilderResult, +layout: {| +width: number, +height: number |}, +position: any, // Reanimated.Node @@ -1944,16 +1940,13 @@ +position?: any, // Reanimated.Value +tabBarPosition?: 'top' | 'bottom', +initialLayout?: $Partial<{| +width: number, +height: number |}>, - +lazy?: boolean, +lazyPreloadDistance?: number, +removeClippedSubviews?: boolean, +sceneContainerStyle?: ViewStyleProp, +style?: ViewStyleProp, +gestureHandlerProps?: PanGestureHandlerProps, +pager?: MaterialTopTabPagerProps => React$Node, - +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node, +tabBar?: MaterialTopTabBarProps => React$Node, - +tabBarOptions?: MaterialTopTabBarOptions, |}; declare export type ExtraMaterialTopTabNavigatorProps = {|