UNPKG

55.2 kBSource Map (JSON)View Raw
1{"version":3,"sources":["BottomNavigation.tsx"],"names":["React","View","Animated","TouchableWithoutFeedback","StyleSheet","Platform","getBottomSpace","color","overlay","Icon","Surface","Badge","TouchableRipple","Text","black","white","withTheme","useAnimatedValue","useAnimatedValueArray","useLayout","useIsKeyboardShown","BottomNavigationRouteScreen","MIN_RIPPLE_SCALE","MIN_TAB_WIDTH","MAX_TAB_WIDTH","BAR_HEIGHT","BOTTOM_INSET","FAR_FAR_AWAY","OS","Touchable","route","_0","style","children","borderless","centered","rippleColor","rest","supported","disabled","undefined","SceneComponent","memo","component","createElement","BottomNavigation","navigationState","renderScene","renderIcon","renderLabel","renderTouchable","props","getLabelText","title","getBadge","badge","getColor","getAccessibilityLabel","accessibilityLabel","getTestID","testID","activeColor","inactiveColor","keyboardHidesNavigationBar","barStyle","labeled","theme","sceneAnimationEnabled","onTabPress","onIndexChange","shifting","routes","length","safeAreaInsets","labelMaxFontSizeMultiplier","scale","animation","focusedKey","index","key","visibleAnim","tabsAnims","map","_","i","offsetsAnims","indexAnim","rippleAnim","layout","onLayout","loaded","setLoaded","useState","includes","keyboardVisible","setKeyboardVisible","handleKeyboardShow","useCallback","timing","toValue","duration","useNativeDriver","start","handleKeyboardHide","animateToIndex","setValue","parallel","finished","tab","forEach","offset","useEffect","onShow","onHide","prevNavigationState","useRef","current","handleTabPress","event","defaultPrevented","preventDefault","jumpTo","findIndex","colors","dark","isDarkTheme","mode","backgroundColor","customBackground","elevation","flatten","approxBackgroundColor","surface","primary","interpolate","inputRange","outputRange","isDark","isLight","textColor","activeTintColor","inactiveTintColor","alpha","rgb","string","touchColor","maxTabWidth","maxTabBarWidth","tabBarWidth","Math","min","width","tabWidth","rippleSize","insets","left","right","bottom","styles","container","content","background","focused","opacity","top","absoluteFill","bar","transform","translateY","height","position","measured","barContent","items","marginBottom","marginHorizontal","max","maxWidth","ripple","borderRadius","active","activeOpacity","inactiveOpacity","onPress","accessibilityTraits","accessibilityComponentType","accessibilityRole","accessibilityState","selected","item","iconContainer","iconWrapper","icon","badgeContainer","String","labelContainer","labelWrapper","label","SceneMap","scenes","create","flex","overflow","alignItems","flexDirection","paddingVertical","marginTop","alignSelf","absoluteFillObject","paddingBottom","fontSize","textAlign","whiteSpace"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,QAFF,EAGEC,wBAHF,EAKEC,UALF,EAOEC,QAPF,QASO,cATP;AAUA,SAASC,cAAT,QAA+B,8BAA/B;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,OAAP,MAAoB,sBAApB;AACA,OAAOC,IAAP,MAAiC,SAAjC;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,eAAP,MAA4B,oCAA5B;AACA,OAAOC,IAAP,MAAiB,oBAAjB;AACA,SAASC,KAAT,EAAgBC,KAAhB,QAA6B,qBAA7B;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,OAAOC,gBAAP,MAA6B,8BAA7B;AACA,OAAOC,qBAAP,MAAkC,mCAAlC;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,kBAAP,MAA+B,gCAA/B;AACA,OAAOC,2BAAP,MAAwC,+BAAxC;AAsNA,MAAMC,gBAAgB,GAAG,KAAzB,C,CAAgC;;AAChC,MAAMC,aAAa,GAAG,EAAtB;AACA,MAAMC,aAAa,GAAG,GAAtB;AACA,MAAMC,UAAU,GAAG,EAAnB;AACA,MAAMC,YAAY,GAAGpB,cAAc,EAAnC;AACA,MAAMqB,YAAY,GAAGtB,QAAQ,CAACuB,EAAT,KAAgB,KAAhB,GAAwB,CAAxB,GAA4B,IAAjD;;AAEA,MAAMC,SAAS,GAAG;AAAA,MAAC;AACjBC,IAAAA,KAAK,EAAEC,EADU;AAEjBC,IAAAA,KAFiB;AAGjBC,IAAAA,QAHiB;AAIjBC,IAAAA,UAJiB;A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AELzC,IAAAA,MAAM,EAAEhJ,UAFH;AAGL0L,IAAAA,SAAS,EAAE,QAHN;AAILpF,IAAAA,eAAe,EAAE,aAJZ;AAKL,QAAI1H,QAAQ,CAACuB,EAAT,KAAgB,KAAhB,GACA;AACEwL,MAAAA,UAAU,EAAE,QADd;AAEEL,MAAAA,SAAS,EAAE;AAFb,KADA,GAKA,IALJ;AALK,GAtDwB;AAkE/Bd,EAAAA,cAAc,EAAE;AACdvB,IAAAA,QAAQ,EAAE,UADI;AAEdf,IAAAA,IAAI,EAAE,CAFQ;AAGdS,IAAAA,GAAG,EAAE,CAAC;AAHQ;AAlEe,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport {\n View,\n Animated,\n TouchableWithoutFeedback,\n TouchableWithoutFeedbackProps,\n StyleSheet,\n StyleProp,\n Platform,\n ViewStyle,\n} from 'react-native';\nimport { getBottomSpace } from 'react-native-iphone-x-helper';\nimport color from 'color';\nimport overlay from '../../styles/overlay';\nimport Icon, { IconSource } from '../Icon';\nimport Surface from '../Surface';\nimport Badge from '../Badge';\nimport TouchableRipple from '../TouchableRipple/TouchableRipple';\nimport Text from '../Typography/Text';\nimport { black, white } from '../../styles/colors';\nimport { withTheme } from '../../core/theming';\nimport useAnimatedValue from '../../utils/useAnimatedValue';\nimport useAnimatedValueArray from '../../utils/useAnimatedValueArray';\nimport useLayout from '../../utils/useLayout';\nimport useIsKeyboardShown from '../../utils/useIsKeyboardShown';\nimport BottomNavigationRouteScreen from './BottomNavigationRouteScreen';\n\ntype Route = {\n key: string;\n title?: string;\n icon?: IconSource;\n badge?: string | number | boolean;\n color?: string;\n accessibilityLabel?: string;\n testID?: string;\n};\n\ntype NavigationState = {\n index: number;\n routes: Route[];\n};\n\ntype TabPressEvent = {\n defaultPrevented: boolean;\n preventDefault(): void;\n};\n\ntype TouchableProps = TouchableWithoutFeedbackProps & {\n key: string;\n route: Route;\n children: React.ReactNode;\n borderless?: boolean;\n centered?: boolean;\n rippleColor?: string;\n};\n\ntype Props = {\n /**\n * Whether the shifting style is used, the active tab icon shifts up to show the label and the inactive tabs won't have a label.\n *\n * By default, this is `true` when you have more than 3 tabs.\n * Pass `shifting={false}` to explicitly disable this animation, or `shifting={true}` to always use this animation.\n */\n shifting?: boolean;\n /**\n * Whether to show labels in tabs. When `false`, only icons will be displayed.\n */\n labeled?: boolean;\n /**\n * State for the bottom navigation. The state should contain the following properties:\n *\n * - `index`: a number representing the index of the active route in the `routes` array\n * - `routes`: an array containing a list of route objects used for rendering the tabs\n *\n * Each route object should contain the following properties:\n *\n * - `key`: a unique key to identify the route (required)\n * - `title`: title of the route to use as the tab label\n * - `icon`: icon to use as the tab icon, can be a string, an image source or a react component\n * - `color`: color to use as background color for shifting bottom navigation\n * - `badge`: badge to show on the tab icon, can be `true` to show a dot, `string` or `number` to show text.\n * - `accessibilityLabel`: accessibility label for the tab button\n * - `testID`: test id for the tab button\n *\n * Example:\n *\n * ```js\n * {\n * index: 1,\n * routes: [\n * { key: 'music', title: 'Music', icon: 'queue-music', color: '#3F51B5' },\n * { key: 'albums', title: 'Albums', icon: 'album', color: '#009688' },\n * { key: 'recents', title: 'Recents', icon: 'history', color: '#795548' },\n * { key: 'purchased', title: 'Purchased', icon: 'shopping-cart', color: '#607D8B' },\n * ]\n * }\n * ```\n *\n * `BottomNavigation` is a controlled component, which means the `index` needs to be updated via the `onIndexChange` callback.\n */\n navigationState: NavigationState;\n /**\n * Callback which is called on tab change, receives the index of the new tab as argument.\n * The navigation state needs to be updated when it's called, otherwise the change is dropped.\n */\n onIndexChange: (index: number) => void;\n /**\n * Callback which returns a react element to render as the page for the tab. Receives an object containing the route as the argument:\n *\n * ```js\n * renderScene = ({ route, jumpTo }) => {\n * switch (route.key) {\n * case 'music':\n * return <MusicRoute jumpTo={jumpTo} />;\n * case 'albums':\n * return <AlbumsRoute jumpTo={jumpTo} />;\n * }\n * }\n * ```\n *\n * Pages are lazily rendered, which means that a page will be rendered the first time you navigate to it.\n * After initial render, all the pages stay rendered to preserve their state.\n *\n * You need to make sure that your individual routes implement a `shouldComponentUpdate` to improve the performance.\n * To make it easier to specify the components, you can use the `SceneMap` helper:\n *\n * ```js\n * renderScene = BottomNavigation.SceneMap({\n * music: MusicRoute,\n * albums: AlbumsRoute,\n * });\n * ```\n *\n * Specifying the components this way is easier and takes care of implementing a `shouldComponentUpdate` method.\n * Each component will receive the current route and a `jumpTo` method as it's props.\n * The `jumpTo` method can be used to navigate to other tabs programmatically:\n *\n * ```js\n * this.props.jumpTo('albums')\n * ```\n */\n renderScene: (props: {\n route: Route;\n jumpTo: (key: string) => void;\n }) => React.ReactNode | null;\n /**\n * Callback which returns a React Element to be used as tab icon.\n */\n renderIcon?: (props: {\n route: Route;\n focused: boolean;\n color: string;\n }) => React.ReactNode;\n /**\n * Callback which React Element to be used as tab label.\n */\n renderLabel?: (props: {\n route: Route;\n focused: boolean;\n color: string;\n }) => React.ReactNode;\n /**\n * Callback which returns a React element to be used as the touchable for the tab item.\n * Renders a `TouchableRipple` on Android and `TouchableWithoutFeedback` with `View` on iOS.\n */\n renderTouchable?: (props: TouchableProps) => React.ReactNode;\n /**\n * Get label text for the tab, uses `route.title` by default. Use `renderLabel` to replace label component.\n */\n getLabelText?: (props: { route: Route }) => string | undefined;\n /**\n * Get accessibility label for the tab button. This is read by the screen reader when the user taps the tab.\n * Uses `route.accessibilityLabel` by default.\n */\n getAccessibilityLabel?: (props: { route: Route }) => string | undefined;\n /**\n * Get the id to locate this tab button in tests, uses `route.testID` by default.\n */\n getTestID?: (props: { route: Route }) => string | undefined;\n /**\n * Get badge for the tab, uses `route.badge` by default.\n */\n getBadge?: (props: { route: Route }) => boolean | number | string | undefined;\n /**\n * Get color for the tab, uses `route.color` by default.\n */\n getColor?: (props: { route: Route }) => string | undefined;\n /**\n * Function to execute on tab press. It receives the route for the pressed tab, useful for things like scroll to top.\n */\n onTabPress?: (props: { route: Route } & TabPressEvent) => void;\n /**\n * Custom color for icon and label in the active tab.\n */\n activeColor?: string;\n /**\n * Custom color for icon and label in the inactive tab.\n */\n inactiveColor?: string;\n /**\n * Whether animation is enabled for scenes transitions in `shifting` mode.\n * By default, the scenes cross-fade during tab change when `shifting` is enabled.\n * Specify `sceneAnimationEnabled` as `false` to disable the animation.\n */\n sceneAnimationEnabled?: boolean;\n /**\n * Whether the bottom navigation bar is hidden when keyboard is shown.\n * On Android, this works best when [`windowSoftInputMode`](https://developer.android.com/guide/topics/manifest/activity-element#wsoft) is set to `adjustResize`.\n */\n keyboardHidesNavigationBar?: boolean;\n /**\n * Safe area insets for the tab bar. This can be used to avoid elements like the navigation bar on Android and bottom safe area on iOS.\n * The bottom insets for iOS is added by default. You can override the behavior with this option.\n */\n safeAreaInsets?: {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n };\n /**\n * Style for the bottom navigation bar. You can pass a custom background color here:\n *\n * ```js\n * barStyle={{ backgroundColor: '#694fad' }}\n * ```\n */\n barStyle?: StyleProp<ViewStyle>;\n /**\n * Specifies the largest possible scale a label font can reach.\n */\n labelMaxFontSizeMultiplier?: number;\n style?: StyleProp<ViewStyle>;\n /**\n * @optional\n */\n theme: ReactNativePaper.Theme;\n};\n\nconst MIN_RIPPLE_SCALE = 0.001; // Minimum scale is not 0 due to bug with animation\nconst MIN_TAB_WIDTH = 96;\nconst MAX_TAB_WIDTH = 168;\nconst BAR_HEIGHT = 56;\nconst BOTTOM_INSET = getBottomSpace();\nconst FAR_FAR_AWAY = Platform.OS === 'web' ? 0 : 9999;\n\nconst Touchable = ({\n route: _0,\n style,\n children,\n borderless,\n centered,\n rippleColor,\n ...rest\n}: TouchableProps) =>\n TouchableRipple.supported ? (\n <TouchableRipple\n {...rest}\n disabled={rest.disabled || undefined}\n borderless={borderless}\n centered={centered}\n rippleColor={rippleColor}\n style={style}\n >\n {children}\n </TouchableRipple>\n ) : (\n <TouchableWithoutFeedback {...rest}>\n <View style={style}>{children}</View>\n </TouchableWithoutFeedback>\n );\n\nconst SceneComponent = React.memo(({ component, ...rest }: any) =>\n React.createElement(component, rest)\n);\n\n/**\n * Bottom navigation provides quick navigation between top-level views of an app with a bottom navigation bar.\n * It is primarily designed for use on mobile.\n *\n * For integration with React Navigation, you can use [react-navigation-material-bottom-tabs](https://github.com/react-navigation/react-navigation/tree/main/packages/material-bottom-tabs) and consult [createMaterialBottomTabNavigator](https://reactnavigation.org/docs/material-bottom-tab-navigator/) documentation.\n *\n * By default Bottom navigation uses primary color as a background, in dark theme with `adaptive` mode it will use surface colour instead.\n * See [Dark Theme](https://callstack.github.io/react-native-paper/theming.html#dark-theme) for more information.\n *\n * <div class=\"screenshots\">\n * <img class=\"medium\" src=\"screenshots/bottom-navigation.gif\" />\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { BottomNavigation, Text } from 'react-native-paper';\n *\n * const MusicRoute = () => <Text>Music</Text>;\n *\n * const AlbumsRoute = () => <Text>Albums</Text>;\n *\n * const RecentsRoute = () => <Text>Recents</Text>;\n *\n * const MyComponent = () => {\n * const [index, setIndex] = React.useState(0);\n * const [routes] = React.useState([\n * { key: 'music', title: 'Music', icon: 'queue-music' },\n * { key: 'albums', title: 'Albums', icon: 'album' },\n * { key: 'recents', title: 'Recents', icon: 'history' },\n * ]);\n *\n * const renderScene = BottomNavigation.SceneMap({\n * music: MusicRoute,\n * albums: AlbumsRoute,\n * recents: RecentsRoute,\n * });\n *\n * return (\n * <BottomNavigation\n * navigationState={{ index, routes }}\n * onIndexChange={setIndex}\n * renderScene={renderScene}\n * />\n * );\n * };\n *\n * export default MyComponent;\n * ```\n */\nconst BottomNavigation = ({\n navigationState,\n renderScene,\n renderIcon,\n renderLabel,\n renderTouchable = (props: TouchableProps) => <Touchable {...props} />,\n getLabelText = ({ route }: { route: Route }) => route.title,\n getBadge = ({ route }: { route: Route }) => route.badge,\n getColor = ({ route }: { route: Route }) => route.color,\n getAccessibilityLabel = ({ route }: { route: Route }) =>\n route.accessibilityLabel,\n getTestID = ({ route }: { route: Route }) => route.testID,\n activeColor,\n inactiveColor,\n keyboardHidesNavigationBar = true,\n barStyle,\n labeled = true,\n style,\n theme,\n sceneAnimationEnabled = false,\n onTabPress,\n onIndexChange,\n shifting = navigationState.routes.length > 3,\n safeAreaInsets,\n labelMaxFontSizeMultiplier = 1,\n}: Props) => {\n const { scale } = theme.animation;\n\n const focusedKey = navigationState.routes[navigationState.index].key;\n\n /**\n * Visibility of the navigation bar, visible state is 1 and invisible is 0.\n */\n const visibleAnim = useAnimatedValue(1);\n\n /**\n * Active state of individual tab items, active state is 1 and inactive state is 0.\n */\n const tabsAnims = useAnimatedValueArray(\n navigationState.routes.map(\n // focused === 1, unfocused === 0\n (_, i) => (i === navigationState.index ? 1 : 0)\n )\n );\n\n /**\n * The top offset for each tab item to position it offscreen.\n * Placing items offscreen helps to save memory usage for inactive screens with removeClippedSubviews.\n * We use animated values for this to prevent unnecessary re-renders.\n */\n const offsetsAnims = useAnimatedValueArray(\n navigationState.routes.map(\n // offscreen === 1, normal === 0\n (_, i) => (i === navigationState.index ? 0 : 1)\n )\n );\n\n /**\n * Index of the currently active tab. Used for setting the background color.\n * We don't use the color as an animated value directly, because `setValue` seems to be buggy with colors.\n */\n const indexAnim = useAnimatedValue(navigationState.index);\n\n /**\n * Animation for the background color ripple, used to determine it's scale and opacity.\n */\n const rippleAnim = useAnimatedValue(MIN_RIPPLE_SCALE);\n\n /**\n * Layout of the navigation bar. The width is used to determine the size and position of the ripple.\n */\n const [layout, onLayout] = useLayout();\n\n /**\n * List of loaded tabs, tabs will be loaded when navigated to.\n */\n const [loaded, setLoaded] = React.useState<string[]>([focusedKey]);\n\n if (!loaded.includes(focusedKey)) {\n // Set the current tab to be loaded if it was not loaded before\n setLoaded((loaded) => [...loaded, focusedKey]);\n }\n\n /**\n * Track whether the keyboard is visible to show and hide the navigation bar.\n */\n const [keyboardVisible, setKeyboardVisible] = React.useState(false);\n\n const handleKeyboardShow = React.useCallback(() => {\n setKeyboardVisible(true);\n Animated.timing(visibleAnim, {\n toValue: 0,\n duration: 150 * scale,\n useNativeDriver: true,\n }).start();\n }, [scale, visibleAnim]);\n\n const handleKeyboardHide = React.useCallback(() => {\n Animated.timing(visibleAnim, {\n toValue: 1,\n duration: 100 * scale,\n useNativeDriver: true,\n }).start(() => {\n setKeyboardVisible(false);\n });\n }, [scale, visibleAnim]);\n\n const animateToIndex = React.useCallback(\n (index: number) => {\n // Reset the ripple to avoid glitch if it's currently animating\n rippleAnim.setValue(MIN_RIPPLE_SCALE);\n\n Animated.parallel([\n Animated.timing(rippleAnim, {\n toValue: 1,\n duration: shifting ? 400 * scale : 0,\n useNativeDriver: true,\n }),\n ...navigationState.routes.map((_, i) =>\n Animated.timing(tabsAnims[i], {\n toValue: i === index ? 1 : 0,\n duration: shifting ? 150 * scale : 0,\n useNativeDriver: true,\n })\n ),\n ]).start(({ finished }) => {\n // Workaround a bug in native animations where this is reset after first animation\n tabsAnims.map((tab, i) => tab.setValue(i === index ? 1 : 0));\n\n // Update the index to change bar's background color and then hide the ripple\n indexAnim.setValue(index);\n rippleAnim.setValue(MIN_RIPPLE_SCALE);\n\n if (finished) {\n // Position all inactive screens offscreen to save memory usage\n // Only do it when animation has finished to avoid glitches mid-transition if switching fast\n offsetsAnims.forEach((offset, i) => {\n if (i === index) {\n offset.setValue(0);\n } else {\n offset.setValue(1);\n }\n });\n }\n });\n },\n [\n indexAnim,\n shifting,\n navigationState.routes,\n offsetsAnims,\n rippleAnim,\n scale,\n tabsAnims,\n ]\n );\n\n React.useEffect(() => {\n // Workaround for native animated bug in react-native@^0.57\n // Context: https://github.com/callstack/react-native-paper/pull/637\n animateToIndex(navigationState.index);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useIsKeyboardShown({\n onShow: handleKeyboardShow,\n onHide: handleKeyboardHide,\n });\n\n const prevNavigationState = React.useRef<NavigationState>();\n\n React.useEffect(() => {\n // Reset offsets of previous and current tabs before animation\n offsetsAnims.forEach((offset, i) => {\n if (\n i === navigationState.index ||\n i === prevNavigationState.current?.index\n ) {\n offset.setValue(0);\n }\n });\n\n animateToIndex(navigationState.index);\n }, [navigationState.index, animateToIndex, offsetsAnims]);\n\n const handleTabPress = (index: number) => {\n const event = {\n route: navigationState.routes[index],\n defaultPrevented: false,\n preventDefault: () => {\n event.defaultPrevented = true;\n },\n };\n\n onTabPress?.(event);\n\n if (event.defaultPrevented) {\n return;\n }\n\n if (index !== navigationState.index) {\n onIndexChange(index);\n }\n };\n\n const jumpTo = React.useCallback(\n (key: string) => {\n const index = navigationState.routes.findIndex(\n (route) => route.key === key\n );\n\n onIndexChange(index);\n },\n [navigationState.routes, onIndexChange]\n );\n\n const { routes } = navigationState;\n const { colors, dark: isDarkTheme, mode } = theme;\n\n const { backgroundColor: customBackground, elevation = 4 }: ViewStyle =\n StyleSheet.flatten(barStyle) || {};\n\n const approxBackgroundColor = customBackground\n ? customBackground\n : isDarkTheme && mode === 'adaptive'\n ? overlay(elevation, colors.surface)\n : colors.primary;\n\n const backgroundColor = shifting\n ? indexAnim.interpolate({\n inputRange: routes.map((_, i) => i),\n // FIXME: does outputRange support ColorValue or just strings?\n // @ts-expect-error\n outputRange: routes.map(\n (route) => getColor({ route }) || approxBackgroundColor\n ),\n })\n : approxBackgroundColor;\n\n const isDark =\n typeof approxBackgroundColor === 'string'\n ? !color(approxBackgroundColor).isLight()\n : true;\n\n const textColor = isDark ? white : black;\n const activeTintColor =\n typeof activeColor !== 'undefined' ? activeColor : textColor;\n const inactiveTintColor =\n typeof inactiveColor !== 'undefined'\n ? inactiveColor\n : color(textColor).alpha(0.5).rgb().string();\n\n const touchColor = color(activeColor || activeTintColor)\n .alpha(0.12)\n .rgb()\n .string();\n\n const maxTabWidth = routes.length > 3 ? MIN_TAB_WIDTH : MAX_TAB_WIDTH;\n const maxTabBarWidth = maxTabWidth * routes.length;\n\n const tabBarWidth = Math.min(layout.width, maxTabBarWidth);\n const tabWidth = tabBarWidth / routes.length;\n\n const rippleSize = layout.width / 4;\n\n const insets = {\n left: safeAreaInsets?.left ?? 0,\n right: safeAreaInsets?.right ?? 0,\n bottom: safeAreaInsets?.bottom ?? BOTTOM_INSET,\n };\n\n return (\n <View style={[styles.container, style]}>\n <View style={[styles.content, { backgroundColor: colors.background }]}>\n {routes.map((route, index) => {\n if (!loaded.includes(route.key)) {\n // Don't render a screen if we've never navigated to it\n return null;\n }\n\n const focused = navigationState.index === index;\n\n const opacity = sceneAnimationEnabled\n ? tabsAnims[index]\n : focused\n ? 1\n : 0;\n\n const top = sceneAnimationEnabled\n ? offsetsAnims[index].interpolate({\n inputRange: [0, 1],\n outputRange: [0, FAR_FAR_AWAY],\n })\n : focused\n ? 0\n : FAR_FAR_AWAY;\n\n return (\n <BottomNavigationRouteScreen\n key={route.key}\n pointerEvents={focused ? 'auto' : 'none'}\n accessibilityElementsHidden={!focused}\n importantForAccessibility={\n focused ? 'auto' : 'no-hide-descendants'\n }\n index={index}\n visibility={opacity}\n style={[StyleSheet.absoluteFill, { opacity }]}\n collapsable={false}\n removeClippedSubviews={\n // On iOS, set removeClippedSubviews to true only when not focused\n // This is an workaround for a bug where the clipped view never re-appears\n Platform.OS === 'ios' ? navigationState.index !== index : true\n }\n >\n <Animated.View style={[styles.content, { top }]}>\n {renderScene({ route, jumpTo })}\n </Animated.View>\n </BottomNavigationRouteScreen>\n );\n })}\n </View>\n <Surface\n style={\n [\n styles.bar,\n keyboardHidesNavigationBar\n ? {\n // When the keyboard is shown, slide down the navigation bar\n transform: [\n {\n translateY: visibleAnim.interpolate({\n inputRange: [0, 1],\n outputRange: [layout.height, 0],\n }),\n },\n ],\n // Absolutely position the navigation bar so that the content is below it\n // This is needed to avoid gap at bottom when the navigation bar is hidden\n position: keyboardVisible ? 'absolute' : null,\n }\n : null,\n barStyle,\n ] as StyleProp<ViewStyle>\n }\n pointerEvents={\n layout.measured\n ? keyboardHidesNavigationBar && keyboardVisible\n ? 'none'\n : 'auto'\n : 'none'\n }\n onLayout={onLayout}\n >\n <Animated.View style={[styles.barContent, { backgroundColor }]}>\n <View\n style={[\n styles.items,\n {\n marginBottom: insets.bottom,\n marginHorizontal: Math.max(insets.left, insets.right),\n maxWidth: maxTabBarWidth,\n },\n ]}\n accessibilityRole={'tablist'}\n >\n {shifting ? (\n <Animated.View\n pointerEvents=\"none\"\n style={[\n styles.ripple,\n {\n // Since we have a single ripple, we have to reposition it so that it appears to expand from active tab.\n // We need to move it from the top to center of the navigation bar and from the left to the active tab.\n top: (BAR_HEIGHT - rippleSize) / 2,\n left:\n tabWidth * (navigationState.index + 0.5) - rippleSize / 2,\n height: rippleSize,\n width: rippleSize,\n borderRadius: rippleSize / 2,\n backgroundColor: getColor({\n route: routes[navigationState.index],\n }),\n transform: [\n {\n // Scale to twice the size to ensure it covers the whole navigation bar\n scale: rippleAnim.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 8],\n }),\n },\n ],\n opacity: rippleAnim.interpolate({\n inputRange: [0, MIN_RIPPLE_SCALE, 0.3, 1],\n outputRange: [0, 0, 1, 1],\n }),\n },\n ]}\n />\n ) : null}\n {routes.map((route, index) => {\n const focused = navigationState.index === index;\n const active = tabsAnims[index];\n\n // Scale the label up\n const scale =\n labeled && shifting\n ? active.interpolate({\n inputRange: [0, 1],\n outputRange: [0.5, 1],\n })\n : 1;\n\n // Move down the icon to account for no-label in shifting and smaller label in non-shifting.\n const translateY = labeled\n ? shifting\n ? active.interpolate({\n inputRange: [0, 1],\n outputRange: [7, 0],\n })\n : 0\n : 7;\n\n // We render the active icon and label on top of inactive ones and cross-fade them on change.\n // This trick gives the illusion that we are animating between active and inactive colors.\n // This is to ensure that we can use native driver, as colors cannot be animated with native driver.\n const activeOpacity = active;\n const inactiveOpacity = active.interpolate({\n inputRange: [0, 1],\n outputRange: [1, 0],\n });\n\n const badge = getBadge({ route });\n\n return renderTouchable({\n key: route.key,\n route,\n borderless: true,\n centered: true,\n rippleColor: touchColor,\n onPress: () => handleTabPress(index),\n testID: getTestID({ route }),\n accessibilityLabel: getAccessibilityLabel({ route }),\n // @ts-expect-error We keep old a11y props for backwards compat with old RN versions\n accessibilityTraits: focused\n ? ['button', 'selected']\n : 'button',\n accessibilityComponentType: 'button',\n accessibilityRole: Platform.OS === 'ios' ? 'button' : 'tab',\n accessibilityState: { selected: focused },\n style: styles.item,\n children: (\n <View pointerEvents=\"none\">\n <Animated.View\n style={[\n styles.iconContainer,\n { transform: [{ translateY }] },\n ]}\n >\n <Animated.View\n style={[styles.iconWrapper, { opacity: activeOpacity }]}\n >\n {renderIcon ? (\n renderIcon({\n route,\n focused: true,\n color: activeTintColor,\n })\n ) : (\n <Icon\n source={route.icon as IconSource}\n color={activeTintColor}\n size={24}\n />\n )}\n </Animated.View>\n <Animated.View\n style={[\n styles.iconWrapper,\n { opacity: inactiveOpacity },\n ]}\n >\n {renderIcon ? (\n renderIcon({\n route,\n focused: false,\n color: inactiveTintColor,\n })\n ) : (\n <Icon\n source={route.icon as IconSource}\n color={inactiveTintColor}\n size={24}\n />\n )}\n </Animated.View>\n <View\n style={[\n styles.badgeContainer,\n {\n right:\n (badge != null && typeof badge !== 'boolean'\n ? String(badge).length * -2\n : 0) - 2,\n },\n ]}\n >\n {typeof badge === 'boolean' ? (\n <Badge visible={badge} size={8} />\n ) : (\n <Badge visible={badge != null} size={16}>\n {badge}\n </Badge>\n )}\n </View>\n </Animated.View>\n {labeled ? (\n <Animated.View\n style={[\n styles.labelContainer,\n { transform: [{ scale }] },\n ]}\n >\n <Animated.View\n style={[\n styles.labelWrapper,\n { opacity: activeOpacity },\n ]}\n >\n {renderLabel ? (\n renderLabel({\n route,\n focused: true,\n color: activeTintColor,\n })\n ) : (\n <Text\n maxFontSizeMultiplier={labelMaxFontSizeMultiplier}\n style={[styles.label, { color: activeTintColor }]}\n >\n {getLabelText({ route })}\n </Text>\n )}\n </Animated.View>\n {shifting ? null : (\n <Animated.View\n style={[\n styles.labelWrapper,\n { opacity: inactiveOpacity },\n ]}\n >\n {renderLabel ? (\n renderLabel({\n route,\n focused: false,\n color: inactiveTintColor,\n })\n ) : (\n <Text\n maxFontSizeMultiplier={\n labelMaxFontSizeMultiplier\n }\n selectable={false}\n style={[\n styles.label,\n { color: inactiveTintColor },\n ]}\n >\n {getLabelText({ route })}\n </Text>\n )}\n </Animated.View>\n )}\n </Animated.View>\n ) : (\n <View style={styles.labelContainer} />\n )}\n </View>\n ),\n });\n })}\n </View>\n </Animated.View>\n </Surface>\n </View>\n );\n};\n\n/**\n * Function which takes a map of route keys to components.\n * Pure components are used to minimize re-rendering of the pages.\n * This drastically improves the animation performance.\n */\nBottomNavigation.SceneMap = (scenes: {\n [key: string]: React.ComponentType<{\n route: Route;\n jumpTo: (key: string) => void;\n }>;\n}) => {\n return ({\n route,\n jumpTo,\n }: {\n route: Route;\n jumpTo: (key: string) => void;\n }) => (\n <SceneComponent\n key={route.key}\n component={scenes[route.key ? route.key : '']}\n route={route}\n jumpTo={jumpTo}\n />\n );\n};\n\nexport default withTheme(BottomNavigation);\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n overflow: 'hidden',\n },\n content: {\n flex: 1,\n },\n bar: {\n left: 0,\n right: 0,\n bottom: 0,\n elevation: 4,\n },\n barContent: {\n alignItems: 'center',\n overflow: 'hidden',\n },\n items: {\n flexDirection: 'row',\n ...(Platform.OS === 'web'\n ? {\n width: '100%',\n }\n : null),\n },\n item: {\n flex: 1,\n // Top padding is 6 and bottom padding is 10\n // The extra 4dp bottom padding is offset by label's height\n paddingVertical: 6,\n },\n ripple: {\n position: 'absolute',\n },\n iconContainer: {\n height: 24,\n width: 24,\n marginTop: 2,\n marginHorizontal: 12,\n alignSelf: 'center',\n },\n iconWrapper: {\n ...StyleSheet.absoluteFillObject,\n alignItems: 'center',\n },\n labelContainer: {\n height: 16,\n paddingBottom: 2,\n },\n labelWrapper: {\n ...StyleSheet.absoluteFillObject,\n },\n // eslint-disable-next-line react-native/no-color-literals\n label: {\n fontSize: 12,\n height: BAR_HEIGHT,\n textAlign: 'center',\n backgroundColor: 'transparent',\n ...(Platform.OS === 'web'\n ? {\n whiteSpace: 'nowrap',\n alignSelf: 'center',\n }\n : null),\n },\n badgeContainer: {\n position: 'absolute',\n left: 0,\n top: -2,\n },\n});\n"]}
\No newline at end of file