import * as React from 'react'; import { AccessibilityRole, AccessibilityState, StyleProp, TextStyle, ViewStyle } from 'react-native'; import Animated from 'react-native-reanimated'; import { NavigationRoute, NavigationState, NavigationScreenProp, NavigationParams, NavigationDescriptor, NavigationScreenConfig, SupportedThemes } from 'react-navigation'; export declare type NavigationTabState = NavigationState; export declare type NavigationTabProp = NavigationScreenProp & { jumpTo(routeName: string, key?: string): void; }; export declare type ThemedColor = string | { light: string; dark: string; }; export declare type Orientation = 'horizontal' | 'vertical'; export declare type LabelPosition = 'beside-icon' | 'below-icon'; interface BaseAnimation { useNativeDriver?: boolean; } interface TimingAnimation extends BaseAnimation { easing?: (value: number) => number; duration?: number; delay?: number; } interface SpringAnimation extends BaseAnimation { overshootClamping?: boolean; restDisplacementThreshold?: number; restSpeedThreshold?: number; velocity?: number | { x: number; y: number; }; bounciness?: number; speed?: number; tension?: number; friction?: number; stiffness?: number; mass?: number; damping?: number; delay?: number; } export declare type TimingKeyboardAnimationConfig = { animation: 'timing'; config?: TimingAnimation; }; export declare type SpringKeyboardAnimationConfig = { animation: 'spring'; config?: SpringAnimation; }; export declare type KeyboardAnimationConfig = TimingKeyboardAnimationConfig | SpringKeyboardAnimationConfig; export declare type KeyboardHidesTabBarAnimationConfig = { show: KeyboardAnimationConfig; hide: KeyboardAnimationConfig; }; export declare type BottomTabBarOptions = { keyboardHidesTabBar?: boolean; keyboardHidesTabBarAnimationConfig?: Partial; activeTintColor?: ThemedColor; inactiveTintColor?: ThemedColor; activeBackgroundColor?: ThemedColor; inactiveBackgroundColor?: ThemedColor; allowFontScaling?: boolean; showLabel?: boolean; showIcon?: boolean; labelStyle?: StyleProp; tabStyle?: StyleProp; labelPosition?: LabelPosition | ((options: { deviceOrientation: Orientation; }) => LabelPosition); adaptive?: boolean; safeAreaInset?: { top?: 'always' | 'never' | number; right?: 'always' | 'never' | number; bottom?: 'always' | 'never' | number; left?: 'always' | 'never' | number; }; style?: StyleProp; }; export declare type ButtonComponentProps = { route: NavigationRoute; focused: boolean; onPress: () => void; onLongPress: () => void; testID?: string; accessibilityLabel?: string; accessibilityRole?: AccessibilityRole; accessibilityState?: AccessibilityState; accessibilityStates?: string[]; style?: StyleProp; }; export declare type BottomTabBarProps = BottomTabBarOptions & { navigation: NavigationTabProp; onTabPress: (props: { route: NavigationRoute; }) => void; onTabLongPress: (props: { route: NavigationRoute; }) => void; getAccessibilityLabel: (props: { route: NavigationRoute; }) => string | undefined; getAccessibilityRole: (props: { route: NavigationRoute; }) => AccessibilityRole | undefined; getAccessibilityStates: (props: { route: NavigationRoute; focused: boolean; }) => string[]; getButtonComponent: (props: { route: NavigationRoute; }) => React.ComponentType | undefined; getLabelText: (props: { route: NavigationRoute; }) => ((scene: { focused: boolean; tintColor?: string; orientation?: 'horizontal' | 'vertical'; }) => string | undefined) | string | undefined; getTestID: (props: { route: NavigationRoute; }) => string | undefined; renderIcon: (props: { route: NavigationRoute; focused: boolean; tintColor?: string; horizontal?: boolean; }) => React.ReactNode; dimensions: { width: number; height: number; }; isLandscape: boolean; jumpTo: (key: string) => void; screenProps: unknown; detachInactiveScreens?: boolean; }; export declare type MaterialTabBarOptions = { activeTintColor?: string; allowFontScaling?: boolean; bounces?: boolean; inactiveTintColor?: string; pressColor?: string; pressOpacity?: number; scrollEnabled?: boolean; showIcon?: boolean; showLabel?: boolean; upperCaseLabel?: boolean; tabStyle?: StyleProp; indicatorStyle?: StyleProp; iconStyle?: StyleProp; labelStyle?: StyleProp; contentContainerStyle?: StyleProp; style?: StyleProp; }; export declare type MaterialTabBarProps = MaterialTabBarOptions & { layout: { width: number; height: number; }; position: Animated.Node; jumpTo: (key: string) => void; getLabelText: (scene: { route: NavigationRoute; }) => ((scene: { focused: boolean; tintColor: string; }) => string | undefined) | string | undefined; getAccessible?: (scene: { route: NavigationRoute; }) => boolean | undefined; getAccessibilityLabel: (scene: { route: NavigationRoute; }) => string | undefined; getTestID: (scene: { route: NavigationRoute; }) => string | undefined; renderIcon: (scene: { route: NavigationRoute; focused: boolean; tintColor: string; horizontal?: boolean; }) => React.ReactNode; renderBadge?: (scene: { route: NavigationRoute; }) => React.ReactNode; onTabPress?: (scene: { route: NavigationRoute; }) => void; onTabLongPress?: (scene: { route: NavigationRoute; }) => void; tabBarPosition?: 'top' | 'bottom'; screenProps: unknown; navigation: NavigationTabProp; }; export declare type NavigationCommonTabOptions = { title?: string; tabBarLabel?: React.ReactNode; tabBarVisible?: boolean; tabBarAccessibilityLabel?: string; tabBarTestID?: string; tabBarIcon?: React.ReactNode | ((props: { focused: boolean; tintColor?: string; horizontal?: boolean; }) => React.ReactNode); tabBarOnPress?: (props: { navigation: NavigationTabProp; defaultHandler: () => void; }) => void; tabBarOnLongPress?: (props: { navigation: NavigationTabProp; defaultHandler: () => void; }) => void; }; export declare type NavigationBottomTabOptions = NavigationCommonTabOptions & { tabBarButtonComponent?: React.ComponentType; }; export declare type NavigationMaterialTabOptions = NavigationCommonTabOptions & { tabBarButtonComponent?: React.ComponentType; swipeEnabled?: boolean | ((state: NavigationState) => boolean); }; export declare type NavigationTabScreenProps = { theme: SupportedThemes; navigation: NavigationTabProp; screenProps: ScreenProps; }; export declare type NavigationMaterialTabScreenComponent = React.ComponentType> & { navigationOptions?: NavigationScreenConfig, ScreenProps>; }; export declare type NavigationBottomTabScreenComponent = React.ComponentType> & { navigationOptions?: NavigationScreenConfig, ScreenProps>; }; export declare type SceneDescriptorMap = { [key: string]: NavigationDescriptor; }; export {};