@react-navigation/bottom-tabs 6.3.3 → 6.4.1

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.
Files changed (42) hide show
  1. package/lib/commonjs/index.js.map +1 -1
  2. package/lib/commonjs/navigators/createBottomTabNavigator.js +1 -1
  3. package/lib/commonjs/navigators/createBottomTabNavigator.js.map +1 -1
  4. package/lib/commonjs/types.js.map +1 -1
  5. package/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js.map +1 -1
  6. package/lib/commonjs/utils/BottomTabBarHeightContext.js.map +1 -1
  7. package/lib/commonjs/utils/useBottomTabBarHeight.js.map +1 -1
  8. package/lib/commonjs/utils/useIsKeyboardShown.js.map +1 -1
  9. package/lib/commonjs/views/Badge.js +1 -1
  10. package/lib/commonjs/views/Badge.js.map +1 -1
  11. package/lib/commonjs/views/BottomTabBar.js.map +1 -1
  12. package/lib/commonjs/views/BottomTabItem.js +1 -1
  13. package/lib/commonjs/views/BottomTabItem.js.map +1 -1
  14. package/lib/commonjs/views/BottomTabView.js +11 -6
  15. package/lib/commonjs/views/BottomTabView.js.map +1 -1
  16. package/lib/commonjs/views/ScreenFallback.js +1 -1
  17. package/lib/commonjs/views/ScreenFallback.js.map +1 -1
  18. package/lib/commonjs/views/TabBarIcon.js.map +1 -1
  19. package/lib/module/index.js.map +1 -1
  20. package/lib/module/navigators/createBottomTabNavigator.js +1 -1
  21. package/lib/module/navigators/createBottomTabNavigator.js.map +1 -1
  22. package/lib/module/types.js.map +1 -1
  23. package/lib/module/utils/BottomTabBarHeightCallbackContext.js.map +1 -1
  24. package/lib/module/utils/BottomTabBarHeightContext.js.map +1 -1
  25. package/lib/module/utils/useBottomTabBarHeight.js.map +1 -1
  26. package/lib/module/utils/useIsKeyboardShown.js.map +1 -1
  27. package/lib/module/views/Badge.js +1 -1
  28. package/lib/module/views/Badge.js.map +1 -1
  29. package/lib/module/views/BottomTabBar.js.map +1 -1
  30. package/lib/module/views/BottomTabItem.js +1 -1
  31. package/lib/module/views/BottomTabItem.js.map +1 -1
  32. package/lib/module/views/BottomTabView.js +11 -6
  33. package/lib/module/views/BottomTabView.js.map +1 -1
  34. package/lib/module/views/ScreenFallback.js +1 -1
  35. package/lib/module/views/ScreenFallback.js.map +1 -1
  36. package/lib/module/views/TabBarIcon.js.map +1 -1
  37. package/lib/typescript/src/types.d.ts +8 -0
  38. package/lib/typescript/src/views/ScreenFallback.d.ts +1 -0
  39. package/package.json +11 -11
  40. package/src/types.tsx +9 -0
  41. package/src/views/BottomTabView.tsx +8 -5
  42. package/src/views/ScreenFallback.tsx +1 -0
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import type { HeaderOptions } from '@react-navigation/elements';\nimport type {\n Descriptor,\n NavigationHelpers,\n NavigationProp,\n ParamListBase,\n RouteProp,\n TabActionHelpers,\n TabNavigationState,\n} from '@react-navigation/native';\nimport type * as React from 'react';\nimport type {\n Animated,\n GestureResponderEvent,\n StyleProp,\n TextStyle,\n TouchableWithoutFeedbackProps,\n ViewStyle,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\n\nexport type Layout = { width: number; height: number };\n\nexport type BottomTabNavigationEventMap = {\n /**\n * Event which fires on tapping on the tab in the tab bar.\n */\n tabPress: { data: undefined; canPreventDefault: true };\n /**\n * Event which fires on long press on the tab in the tab bar.\n */\n tabLongPress: { data: undefined };\n};\n\nexport type LabelPosition = 'beside-icon' | 'below-icon';\n\nexport type BottomTabNavigationHelpers = NavigationHelpers<\n ParamListBase,\n BottomTabNavigationEventMap\n> &\n TabActionHelpers<ParamListBase>;\n\nexport type BottomTabNavigationProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = keyof ParamList,\n NavigatorID extends string | undefined = undefined\n> = NavigationProp<\n ParamList,\n RouteName,\n NavigatorID,\n TabNavigationState<ParamList>,\n BottomTabNavigationOptions,\n BottomTabNavigationEventMap\n> &\n TabActionHelpers<ParamList>;\n\nexport type BottomTabScreenProps<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = keyof ParamList,\n NavigatorID extends string | undefined = undefined\n> = {\n navigation: BottomTabNavigationProp<ParamList, RouteName, NavigatorID>;\n route: RouteProp<ParamList, RouteName>;\n};\n\nexport type TimingKeyboardAnimationConfig = {\n animation: 'timing';\n config?: Omit<\n Partial<Animated.TimingAnimationConfig>,\n 'toValue' | 'useNativeDriver'\n >;\n};\n\nexport type SpringKeyboardAnimationConfig = {\n animation: 'spring';\n config?: Omit<\n Partial<Animated.SpringAnimationConfig>,\n 'toValue' | 'useNativeDriver'\n >;\n};\n\nexport type TabBarVisibilityAnimationConfig =\n | TimingKeyboardAnimationConfig\n | SpringKeyboardAnimationConfig;\n\nexport type BottomTabNavigationOptions = HeaderOptions & {\n /**\n * Title text for the screen.\n */\n title?: string;\n\n /**\n * Title string of a tab displayed in the tab bar\n * or a function that given { focused: boolean, color: string, position: 'below-icon' | 'beside-icon' } returns a React.Node to display in tab bar.\n *\n * When undefined, scene title is used. Use `tabBarShowLabel` to hide the label.\n */\n tabBarLabel?:\n | string\n | ((props: {\n focused: boolean;\n color: string;\n position: LabelPosition;\n }) => React.ReactNode);\n\n /**\n * Whether the tab label should be visible. Defaults to `true`.\n */\n tabBarShowLabel?: boolean;\n\n /**\n * Whether the label is shown below the icon or beside the icon.\n *\n * - `below-icon`: the label is shown below the icon (typical for iPhones)\n * - `beside-icon` the label is shown next to the icon (typical for iPad)\n *\n * By default, the position is chosen automatically based on device width.\n */\n tabBarLabelPosition?: LabelPosition;\n\n /**\n * Style object for the tab label.\n */\n tabBarLabelStyle?: StyleProp<TextStyle>;\n\n /**\n * Whether label font should scale to respect Text Size accessibility settings.\n */\n tabBarAllowFontScaling?: boolean;\n\n /**\n * A function that given { focused: boolean, color: string } returns a React.Node to display in the tab bar.\n */\n tabBarIcon?: (props: {\n focused: boolean;\n color: string;\n size: number;\n }) => React.ReactNode;\n\n /**\n * Style object for the tab icon.\n */\n tabBarIconStyle?: StyleProp<TextStyle>;\n\n /**\n * Text to show in a badge on the tab icon.\n */\n tabBarBadge?: number | string;\n\n /**\n * Custom style for the tab bar badge.\n * You can specify a background color or text color here.\n */\n tabBarBadgeStyle?: StyleProp<TextStyle>;\n\n /**\n * Accessibility label for the tab button. This is read by the screen reader when the user taps the tab.\n * It's recommended to set this if you don't have a label for the tab.\n */\n tabBarAccessibilityLabel?: string;\n\n /**\n * ID to locate this tab button in tests.\n */\n tabBarTestID?: string;\n\n /**\n * Function which returns a React element to render as the tab bar button.\n * Renders `Pressable` by default.\n */\n tabBarButton?: (props: BottomTabBarButtonProps) => React.ReactNode;\n\n /**\n * Color for the icon and label in the active tab.\n */\n tabBarActiveTintColor?: string;\n\n /**\n * Color for the icon and label in the inactive tabs.\n */\n tabBarInactiveTintColor?: string;\n\n /**\n * Background color for the active tab.\n */\n tabBarActiveBackgroundColor?: string;\n\n /**\n * Background color for the inactive tabs.\n */\n tabBarInactiveBackgroundColor?: string;\n\n /**\n * Style object for the tab item container.\n */\n tabBarItemStyle?: StyleProp<ViewStyle>;\n\n /**\n * Whether the tab bar gets hidden when the keyboard is shown. Defaults to `false`.\n */\n tabBarHideOnKeyboard?: boolean;\n\n /**\n * Animation config for showing and hiding the tab bar when the keyboard is shown/hidden.\n */\n tabBarVisibilityAnimationConfig?: {\n show?: TabBarVisibilityAnimationConfig;\n hide?: TabBarVisibilityAnimationConfig;\n };\n\n /**\n * Style object for the tab bar container.\n */\n tabBarStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n\n /**\n * Function which returns a React Element to use as background for the tab bar.\n * You could render an image, a gradient, blur view etc.\n *\n * When using `BlurView`, make sure to set `position: 'absolute'` in `tabBarStyle` as well.\n * You'd also need to use `useBottomTabBarHeight()` to add a bottom padding to your content.\n */\n tabBarBackground?: () => React.ReactNode;\n\n /**\n * Whether this screens should render the first time it's accessed. Defaults to `true`.\n * Set it to `false` if you want to render the screen on initial render.\n */\n lazy?: boolean;\n\n /**\n * Function that given returns a React Element to display as a header.\n */\n header?: (props: BottomTabHeaderProps) => React.ReactNode;\n\n /**\n * Whether to show the header. Setting this to `false` hides the header.\n * Defaults to `true`.\n */\n headerShown?: boolean;\n\n /**\n * Whether this screen should be unmounted when navigating away from it.\n * Defaults to `false`.\n */\n unmountOnBlur?: boolean;\n\n /**\n * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.\n * Defaults to `true` when `enableFreeze()` is run at the top of the application.\n * Requires `react-native-screens` version >=3.16.0.\n *\n * Only supported on iOS and Android.\n */\n freezeOnBlur?: boolean;\n};\n\nexport type BottomTabDescriptor = Descriptor<\n BottomTabNavigationOptions,\n BottomTabNavigationProp<ParamListBase>,\n RouteProp<ParamListBase>\n>;\n\nexport type BottomTabDescriptorMap = Record<string, BottomTabDescriptor>;\n\nexport type BottomTabNavigationConfig = {\n /**\n * Function that returns a React element to display as the tab bar.\n */\n tabBar?: (props: BottomTabBarProps) => React.ReactNode;\n /**\n * Safe area insets for the tab bar. This is used to avoid elements like the navigation bar on Android and bottom safe area on iOS.\n * By default, the device's safe area insets are automatically detected. 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 * Whether inactive screens should be detached from the view hierarchy to save memory.\n * Make sure to call `enableScreens` from `react-native-screens` to make it work.\n * Defaults to `true` on Android.\n */\n detachInactiveScreens?: boolean;\n /**\n * Style object for the component wrapping the screen content.\n */\n sceneContainerStyle?: StyleProp<ViewStyle>;\n};\n\nexport type BottomTabHeaderProps = {\n /**\n * Layout of the screen.\n */\n layout: Layout;\n /**\n * Options for the current screen.\n */\n options: BottomTabNavigationOptions;\n /**\n * Route object for the current screen.\n */\n route: RouteProp<ParamListBase>;\n /**\n * Navigation prop for the header.\n */\n navigation: BottomTabNavigationProp<ParamListBase>;\n};\n\nexport type BottomTabBarProps = {\n state: TabNavigationState<ParamListBase>;\n descriptors: BottomTabDescriptorMap;\n navigation: NavigationHelpers<ParamListBase, BottomTabNavigationEventMap>;\n insets: EdgeInsets;\n};\n\nexport type BottomTabBarButtonProps = Omit<\n TouchableWithoutFeedbackProps,\n 'onPress'\n> & {\n to?: string;\n children: React.ReactNode;\n onPress?: (\n e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent\n ) => void;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["BottomTabBarHeightCallbackContext.tsx"],"names":["React","createContext","undefined"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,4BAAeA,KAAK,CAACC,aAAN,CACbC,SADa,CAAf","sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<((height: number) => void) | undefined>(\n undefined\n);\n"]}
1
+ {"version":3,"names":["React","createContext","undefined"],"sources":["BottomTabBarHeightCallbackContext.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<((height: number) => void) | undefined>(\n undefined\n);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,4BAAeA,KAAK,CAACC,aAAN,CACbC,SADa,CAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["BottomTabBarHeightContext.tsx"],"names":["React","createContext","undefined"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,4BAAeA,KAAK,CAACC,aAAN,CAAwCC,SAAxC,CAAf","sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<number | undefined>(undefined);\n"]}
1
+ {"version":3,"names":["React","createContext","undefined"],"sources":["BottomTabBarHeightContext.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<number | undefined>(undefined);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,4BAAeA,KAAK,CAACC,aAAN,CAAwCC,SAAxC,CAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useBottomTabBarHeight.tsx"],"names":["React","BottomTabBarHeightContext","useFloatingBottomTabBarHeight","height","useContext","undefined","Error"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,OAAOC,yBAAP,MAAsC,6BAAtC;AAEA,eAAe,SAASC,6BAAT,GAAyC;AACtD,QAAMC,MAAM,GAAGH,KAAK,CAACI,UAAN,CAAiBH,yBAAjB,CAAf;;AAEA,MAAIE,MAAM,KAAKE,SAAf,EAA0B;AACxB,UAAM,IAAIC,KAAJ,CACJ,2FADI,CAAN;AAGD;;AAED,SAAOH,MAAP;AACD","sourcesContent":["import * as React from 'react';\n\nimport BottomTabBarHeightContext from './BottomTabBarHeightContext';\n\nexport default function useFloatingBottomTabBarHeight() {\n const height = React.useContext(BottomTabBarHeightContext);\n\n if (height === undefined) {\n throw new Error(\n \"Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?\"\n );\n }\n\n return height;\n}\n"]}
1
+ {"version":3,"names":["React","BottomTabBarHeightContext","useFloatingBottomTabBarHeight","height","useContext","undefined","Error"],"sources":["useBottomTabBarHeight.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport BottomTabBarHeightContext from './BottomTabBarHeightContext';\n\nexport default function useFloatingBottomTabBarHeight() {\n const height = React.useContext(BottomTabBarHeightContext);\n\n if (height === undefined) {\n throw new Error(\n \"Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?\"\n );\n }\n\n return height;\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,OAAOC,yBAAP,MAAsC,6BAAtC;AAEA,eAAe,SAASC,6BAAT,GAAyC;EACtD,MAAMC,MAAM,GAAGH,KAAK,CAACI,UAAN,CAAiBH,yBAAjB,CAAf;;EAEA,IAAIE,MAAM,KAAKE,SAAf,EAA0B;IACxB,MAAM,IAAIC,KAAJ,CACJ,2FADI,CAAN;EAGD;;EAED,OAAOH,MAAP;AACD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useIsKeyboardShown.tsx"],"names":["React","Keyboard","Platform","useIsKeyboardShown","isKeyboardShown","setIsKeyboardShown","useState","useEffect","handleKeyboardShow","handleKeyboardHide","subscriptions","OS","addListener","forEach","s","remove"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAA8BC,QAA9B,EAAwCC,QAAxC,QAAwD,cAAxD;AAEA,eAAe,SAASC,kBAAT,GAA8B;AAC3C,QAAM,CAACC,eAAD,EAAkBC,kBAAlB,IAAwCL,KAAK,CAACM,QAAN,CAAe,KAAf,CAA9C;AAEAN,EAAAA,KAAK,CAACO,SAAN,CAAgB,MAAM;AACpB,UAAMC,kBAAkB,GAAG,MAAMH,kBAAkB,CAAC,IAAD,CAAnD;;AACA,UAAMI,kBAAkB,GAAG,MAAMJ,kBAAkB,CAAC,KAAD,CAAnD;;AAEA,QAAIK,aAAJ;;AAEA,QAAIR,QAAQ,CAACS,EAAT,KAAgB,KAApB,EAA2B;AACzBD,MAAAA,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAT,CAAqB,kBAArB,EAAyCJ,kBAAzC,CADc,EAEdP,QAAQ,CAACW,WAAT,CAAqB,kBAArB,EAAyCH,kBAAzC,CAFc,CAAhB;AAID,KALD,MAKO;AACLC,MAAAA,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAT,CAAqB,iBAArB,EAAwCJ,kBAAxC,CADc,EAEdP,QAAQ,CAACW,WAAT,CAAqB,iBAArB,EAAwCH,kBAAxC,CAFc,CAAhB;AAID;;AAED,WAAO,MAAM;AACXC,MAAAA,aAAa,CAACG,OAAd,CAAuBC,CAAD,IAAOA,CAAC,CAACC,MAAF,EAA7B;AACD,KAFD;AAGD,GArBD,EAqBG,EArBH;AAuBA,SAAOX,eAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { EmitterSubscription, Keyboard, Platform } from 'react-native';\n\nexport default function useIsKeyboardShown() {\n const [isKeyboardShown, setIsKeyboardShown] = React.useState(false);\n\n React.useEffect(() => {\n const handleKeyboardShow = () => setIsKeyboardShown(true);\n const handleKeyboardHide = () => setIsKeyboardShown(false);\n\n let subscriptions: EmitterSubscription[];\n\n if (Platform.OS === 'ios') {\n subscriptions = [\n Keyboard.addListener('keyboardWillShow', handleKeyboardShow),\n Keyboard.addListener('keyboardWillHide', handleKeyboardHide),\n ];\n } else {\n subscriptions = [\n Keyboard.addListener('keyboardDidShow', handleKeyboardShow),\n Keyboard.addListener('keyboardDidHide', handleKeyboardHide),\n ];\n }\n\n return () => {\n subscriptions.forEach((s) => s.remove());\n };\n }, []);\n\n return isKeyboardShown;\n}\n"]}
1
+ {"version":3,"names":["React","Keyboard","Platform","useIsKeyboardShown","isKeyboardShown","setIsKeyboardShown","useState","useEffect","handleKeyboardShow","handleKeyboardHide","subscriptions","OS","addListener","forEach","s","remove"],"sources":["useIsKeyboardShown.tsx"],"sourcesContent":["import * as React from 'react';\nimport { EmitterSubscription, Keyboard, Platform } from 'react-native';\n\nexport default function useIsKeyboardShown() {\n const [isKeyboardShown, setIsKeyboardShown] = React.useState(false);\n\n React.useEffect(() => {\n const handleKeyboardShow = () => setIsKeyboardShown(true);\n const handleKeyboardHide = () => setIsKeyboardShown(false);\n\n let subscriptions: EmitterSubscription[];\n\n if (Platform.OS === 'ios') {\n subscriptions = [\n Keyboard.addListener('keyboardWillShow', handleKeyboardShow),\n Keyboard.addListener('keyboardWillHide', handleKeyboardHide),\n ];\n } else {\n subscriptions = [\n Keyboard.addListener('keyboardDidShow', handleKeyboardShow),\n Keyboard.addListener('keyboardDidHide', handleKeyboardHide),\n ];\n }\n\n return () => {\n subscriptions.forEach((s) => s.remove());\n };\n }, []);\n\n return isKeyboardShown;\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAA8BC,QAA9B,EAAwCC,QAAxC,QAAwD,cAAxD;AAEA,eAAe,SAASC,kBAAT,GAA8B;EAC3C,MAAM,CAACC,eAAD,EAAkBC,kBAAlB,IAAwCL,KAAK,CAACM,QAAN,CAAe,KAAf,CAA9C;EAEAN,KAAK,CAACO,SAAN,CAAgB,MAAM;IACpB,MAAMC,kBAAkB,GAAG,MAAMH,kBAAkB,CAAC,IAAD,CAAnD;;IACA,MAAMI,kBAAkB,GAAG,MAAMJ,kBAAkB,CAAC,KAAD,CAAnD;;IAEA,IAAIK,aAAJ;;IAEA,IAAIR,QAAQ,CAACS,EAAT,KAAgB,KAApB,EAA2B;MACzBD,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAT,CAAqB,kBAArB,EAAyCJ,kBAAzC,CADc,EAEdP,QAAQ,CAACW,WAAT,CAAqB,kBAArB,EAAyCH,kBAAzC,CAFc,CAAhB;IAID,CALD,MAKO;MACLC,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAT,CAAqB,iBAArB,EAAwCJ,kBAAxC,CADc,EAEdP,QAAQ,CAACW,WAAT,CAAqB,iBAArB,EAAwCH,kBAAxC,CAFc,CAAhB;IAID;;IAED,OAAO,MAAM;MACXC,aAAa,CAACG,OAAd,CAAuBC,CAAD,IAAOA,CAAC,CAACC,MAAF,EAA7B;IACD,CAFD;EAGD,CArBD,EAqBG,EArBH;EAuBA,OAAOX,eAAP;AACD"}
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import { useTheme } from '@react-navigation/native';
4
4
  import color from 'color';
@@ -1 +1 @@
1
- {"version":3,"sources":["Badge.tsx"],"names":["useTheme","color","React","Animated","StyleSheet","Badge","children","style","visible","size","rest","opacity","useState","Value","rendered","setRendered","theme","useEffect","timing","toValue","duration","useNativeDriver","start","finished","stopAnimation","backgroundColor","colors","notification","restStyle","flatten","textColor","isLight","borderRadius","fontSize","Math","floor","transform","scale","interpolate","inputRange","outputRange","lineHeight","height","minWidth","styles","container","create","alignSelf","textAlign","paddingHorizontal","overflow"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,0BAAzB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAASC,QAAT,EAA8BC,UAA9B,QAA2D,cAA3D;AAqBA,eAAe,SAASC,KAAT,OAML;AAAA,MANoB;AAC5BC,IAAAA,QAD4B;AAE5BC,IAAAA,KAF4B;AAG5BC,IAAAA,OAAO,GAAG,IAHkB;AAI5BC,IAAAA,IAAI,GAAG,EAJqB;AAK5B,OAAGC;AALyB,GAMpB;AACR,QAAM,CAACC,OAAD,IAAYT,KAAK,CAACU,QAAN,CAAe,MAAM,IAAIT,QAAQ,CAACU,KAAb,CAAmBL,OAAO,GAAG,CAAH,GAAO,CAAjC,CAArB,CAAlB;AACA,QAAM,CAACM,QAAD,EAAWC,WAAX,IAA0Bb,KAAK,CAACU,QAAN,CAAeJ,OAAf,CAAhC;AAEA,QAAMQ,KAAK,GAAGhB,QAAQ,EAAtB;AAEAE,EAAAA,KAAK,CAACe,SAAN,CAAgB,MAAM;AACpB,QAAI,CAACH,QAAL,EAAe;AACb;AACD;;AAEDX,IAAAA,QAAQ,CAACe,MAAT,CAAgBP,OAAhB,EAAyB;AACvBQ,MAAAA,OAAO,EAAEX,OAAO,GAAG,CAAH,GAAO,CADA;AAEvBY,MAAAA,QAAQ,EAAE,GAFa;AAGvBC,MAAAA,eAAe,EAAE;AAHM,KAAzB,EAIGC,KAJH,CAIS,SAAkB;AAAA,UAAjB;AAAEC,QAAAA;AAAF,OAAiB;;AACzB,UAAIA,QAAQ,IAAI,CAACf,OAAjB,EAA0B;AACxBO,QAAA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gBED,MAAAA;AAhBF,KADK,EAmBLY,MAAM,CAACC,SAnBF,EAoBLjB,SApBK;AAFT,KAwBMlB,IAxBN,GA0BGJ,QA1BH,CADF;AA8BD;AAED,MAAMsC,MAAM,GAAGxC,UAAU,CAAC0C,MAAX,CAAkB;AAC/BD,EAAAA,SAAS,EAAE;AACTE,IAAAA,SAAS,EAAE,UADF;AAETC,IAAAA,SAAS,EAAE,QAFF;AAGTC,IAAAA,iBAAiB,EAAE,CAHV;AAITC,IAAAA,QAAQ,EAAE;AAJD;AADoB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport color from 'color';\nimport * as React from 'react';\nimport { Animated, StyleProp, StyleSheet, TextStyle } from 'react-native';\n\ntype Props = {\n /**\n * Whether the badge is visible\n */\n visible: boolean;\n /**\n * Content of the `Badge`.\n */\n children?: string | number;\n /**\n * Size of the `Badge`.\n */\n size?: number;\n /**\n * Style object for the tab bar container.\n */\n style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;\n};\n\nexport default function Badge({\n children,\n style,\n visible = true,\n size = 18,\n ...rest\n}: Props) {\n const [opacity] = React.useState(() => new Animated.Value(visible ? 1 : 0));\n const [rendered, setRendered] = React.useState(visible);\n\n const theme = useTheme();\n\n React.useEffect(() => {\n if (!rendered) {\n return;\n }\n\n Animated.timing(opacity, {\n toValue: visible ? 1 : 0,\n duration: 150,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished && !visible) {\n setRendered(false);\n }\n });\n\n return () => opacity.stopAnimation();\n }, [opacity, rendered, visible]);\n\n if (!rendered) {\n if (visible) {\n setRendered(true);\n } else {\n return null;\n }\n }\n\n // @ts-expect-error: backgroundColor definitely exists\n const { backgroundColor = theme.colors.notification, ...restStyle } =\n StyleSheet.flatten(style) || {};\n const textColor = color(backgroundColor).isLight() ? 'black' : 'white';\n\n const borderRadius = size / 2;\n const fontSize = Math.floor((size * 3) / 4);\n\n return (\n <Animated.Text\n numberOfLines={1}\n style={[\n {\n transform: [\n {\n scale: opacity.interpolate({\n inputRange: [0, 1],\n outputRange: [0.5, 1],\n }),\n },\n ],\n color: textColor,\n lineHeight: size - 1,\n height: size,\n minWidth: size,\n opacity,\n backgroundColor,\n fontSize,\n borderRadius,\n },\n styles.container,\n restStyle,\n ]}\n {...rest}\n >\n {children}\n </Animated.Text>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: 'flex-end',\n textAlign: 'center',\n paddingHorizontal: 4,\n overflow: 'hidden',\n },\n});\n"]}
1
+ {"version":3,"names":["useTheme","color","React","Animated","StyleSheet","Badge","children","style","visible","size","rest","opacity","useState","Value","rendered","setRendered","theme","useEffect","timing","toValue","duration","useNativeDriver","start","finished","stopAnimation","backgroundColor","colors","notification","restStyle","flatten","textColor","isLight","borderRadius","fontSize","Math","floor","transform","scale","interpolate","inputRange","outputRange","lineHeight","height","minWidth","styles","container","create","alignSelf","textAlign","paddingHorizontal","overflow"],"sources":["Badge.tsx"],"sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport color from 'color';\nimport * as React from 'react';\nimport { Animated, StyleProp, StyleSheet, TextStyle } from 'react-native';\n\ntype Props = {\n /**\n * Whether the badge is visible\n */\n visible: boolean;\n /**\n * Content of the `Badge`.\n */\n children?: string | number;\n /**\n * Size of the `Badge`.\n */\n size?: number;\n /**\n * Style object for the tab bar container.\n */\n style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;\n};\n\nexport default function Badge({\n children,\n style,\n visible = true,\n size = 18,\n ...rest\n}: Props) {\n const [opacity] = React.useState(() => new Animated.Value(visible ? 1 : 0));\n const [rendered, setRendered] = React.useState(visible);\n\n const theme = useTheme();\n\n React.useEffect(() => {\n if (!rendered) {\n return;\n }\n\n Animated.timing(opacity, {\n toValue: visible ? 1 : 0,\n duration: 150,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished && !visible) {\n setRendered(false);\n }\n });\n\n return () => opacity.stopAnimation();\n }, [opacity, rendered, visible]);\n\n if (!rendered) {\n if (visible) {\n setRendered(true);\n } else {\n return null;\n }\n }\n\n // @ts-expect-error: backgroundColor definitely exists\n const { backgroundColor = theme.colors.notification, ...restStyle } =\n StyleSheet.flatten(style) || {};\n const textColor = color(backgroundColor).isLight() ? 'black' : 'white';\n\n const borderRadius = size / 2;\n const fontSize = Math.floor((size * 3) / 4);\n\n return (\n <Animated.Text\n numberOfLines={1}\n style={[\n {\n transform: [\n {\n scale: opacity.interpolate({\n inputRange: [0, 1],\n outputRange: [0.5, 1],\n }),\n },\n ],\n color: textColor,\n lineHeight: size - 1,\n height: size,\n minWidth: size,\n opacity,\n backgroundColor,\n fontSize,\n borderRadius,\n },\n styles.container,\n restStyle,\n ]}\n {...rest}\n >\n {children}\n </Animated.Text>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: 'flex-end',\n textAlign: 'center',\n paddingHorizontal: 4,\n overflow: 'hidden',\n },\n});\n"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,0BAAzB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAASC,QAAT,EAA8BC,UAA9B,QAA2D,cAA3D;AAqBA,eAAe,SAASC,KAAT,OAML;EAAA,IANoB;IAC5BC,QAD4B;IAE5BC,KAF4B;IAG5BC,OAAO,GAAG,IAHkB;IAI5BC,IAAI,GAAG,EAJqB;IAK5B,GAAGC;EALyB,CAMpB;EACR,MAAM,CAACC,OAAD,IAAYT,KAAK,CAACU,QAAN,CAAe,MAAM,IAAIT,QAAQ,CAACU,KAAb,CAAmBL,OAAO,GAAG,CAAH,GAAO,CAAjC,CAArB,CAAlB;EACA,MAAM,CAACM,QAAD,EAAWC,WAAX,IAA0Bb,KAAK,CAACU,QAAN,CAAeJ,OAAf,CAAhC;EAEA,MAAMQ,KAAK,GAAGhB,QAAQ,EAAtB;EAEAE,KAAK,CAACe,SAAN,CAAgB,MAAM;IACpB,IAAI,CAACH,QAAL,EAAe;MACb;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CADb;MASEvC,KAAK,EAAE6B,SATT;MAUEW,UAAU,EAAEhC,IAAI,GAAG,CAVrB;MAWEiC,MAAM,EAAEjC,IAXV;MAYEkC,QAAQ,EAAElC,IAZZ;MAaEE,OAbF;MAcEc,eAdF;MAeEQ,QAfF;MAgBED;IAhBF,CADK,EAmBLY,MAAM,CAACC,SAnBF,EAoBLjB,SApBK;EAFT,GAwBMlB,IAxBN,GA0BGJ,QA1BH,CADF;AA8BD;AAED,MAAMsC,MAAM,GAAGxC,UAAU,CAAC0C,MAAX,CAAkB;EAC/BD,SAAS,EAAE;IACTE,SAAS,EAAE,UADF;IAETC,SAAS,EAAE,QAFF;IAGTC,iBAAiB,EAAE,CAHV;IAITC,QAAQ,EAAE;EAJD;AADoB,CAAlB,CAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["BottomTabBar.tsx"],"names":["MissingIcon","CommonActions","NavigationContext","NavigationRouteContext","useLinkBuilder","useTheme","React","Animated","Platform","StyleSheet","View","useSafeAreaFrame","BottomTabBarHeightCallbackContext","useIsKeyboardShown","BottomTabItem","DEFAULT_TABBAR_HEIGHT","COMPACT_TABBAR_HEIGHT","DEFAULT_MAX_TAB_ITEM_WIDTH","useNativeDriver","OS","shouldUseHorizontalLabels","state","descriptors","layout","dimensions","tabBarLabelPosition","routes","index","key","options","width","maxTabWidth","reduce","acc","route","tabBarItemStyle","flattenedStyle","flatten","maxWidth","height","getPaddingBottom","insets","Math","max","bottom","select","ios","default","getTabBarHeight","style","rest","customHeight","isLandscape","horizontalLabels","paddingBottom","isPad","BottomTabBar","navigation","colors","buildLink","focusedRoute","focusedDescriptor","focusedOptions","tabBarShowLabel","tabBarHideOnKeyboard","tabBarVisibilityAnimationConfig","tabBarStyle","tabBarBackground","tabBarActiveTintColor","tabBarInactiveTintColor","tabBarActiveBackgroundColor","tabBarInactiveBackgroundColor","isKeyboardShown","onHeightChange","useContext","shouldShowTabBar","visibilityAnimationConfigRef","useRef","useEffect","current","isTabBarHidden","setIsTabBarHidden","useState","visible","Value","visibilityAnimationConfig","animation","show","spring","timing","toValue","duration","config","start","finished","hide","stopAnimation","setLayout","handleLayout","e","nativeEvent","tabBarHeight","hasHorizontalLabels","tabBarBackgroundElement","styles","tabBar","backgroundColor","card","borderTopColor","border","transform","translateY","interpolate","inputRange","outputRange","hairlineWidth","position","paddingHorizontal","left","right","absoluteFill","content","map","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","navigate","name","merge","onLongPress","label","tabBarLabel","undefined","title","accessibilityLabel","tabBarAccessibilityLabel","length","params","tabBarTestID","tabBarAllowFontScaling","tabBarButton","tabBarIcon","color","size","tabBarBadge","tabBarBadgeStyle","tabBarLabelStyle","tabBarIconStyle","create","borderTopWidth","elevation","flex","flexDirection"],"mappings":"AAAA,SAASA,WAAT,QAA4B,4BAA5B;AACA,SACEC,aADF,EAEEC,iBAFF,EAGEC,sBAHF,EAMEC,cANF,EAOEC,QAPF,QAQO,0BARP;AASA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SACEC,QADF,EAGEC,QAHF,EAKEC,UALF,EAMEC,IANF,QAQO,cARP;AASA,SAAqBC,gBAArB,QAA6C,gCAA7C;AAGA,OAAOC,iCAAP,MAA8C,4CAA9C;AACA,OAAOC,kBAAP,MAA+B,6BAA/B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AAMA,MAAMC,qBAAqB,GAAG,EAA9B;AACA,MAAMC,qBAAqB,GAAG,EAA9B;AACA,MAAMC,0BAA0B,GAAG,GAAnC;AAEA,MAAMC,eAAe,GAAGV,QAAQ,CAACW,EAAT,KAAgB,KAAxC;;AASA,MAAMC,yBAAyB,GAAG,QAKnB;AAAA,MALoB;AACjCC,IAAAA,KADiC;AAEjCC,IAAAA,WAFiC;AAGjCC,IAAAA,MAHiC;AAIjCC,IAAAA;AAJiC,GAKpB;AACb,QAAM;AAAEC,IAAAA;AAAF,MACJH,WAAW,CAACD,KAAK,CAACK,MAAN,CAAaL,KAAK,CAACM,KA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iJ,MAAX,CAAkB;AAC/BjD,EAAAA,MAAM,EAAE;AACNa,IAAAA,IAAI,EAAE,CADA;AAENC,IAAAA,KAAK,EAAE,CAFD;AAGN3E,IAAAA,MAAM,EAAE,CAHF;AAIN+G,IAAAA,cAAc,EAAElJ,UAAU,CAAC0G,aAJrB;AAKNyC,IAAAA,SAAS,EAAE;AALL,GADuB;AAQ/BnC,EAAAA,OAAO,EAAE;AACPoC,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,aAAa,EAAE;AAFR;AARsB,CAAlB,CAAf","sourcesContent":["import { MissingIcon } from '@react-navigation/elements';\nimport {\n CommonActions,\n NavigationContext,\n NavigationRouteContext,\n ParamListBase,\n TabNavigationState,\n useLinkBuilder,\n useTheme,\n} from '@react-navigation/native';\nimport React from 'react';\nimport {\n Animated,\n LayoutChangeEvent,\n Platform,\n StyleProp,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native';\nimport { EdgeInsets, useSafeAreaFrame } from 'react-native-safe-area-context';\n\nimport type { BottomTabBarProps, BottomTabDescriptorMap } from '../types';\nimport BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';\nimport useIsKeyboardShown from '../utils/useIsKeyboardShown';\nimport BottomTabItem from './BottomTabItem';\n\ntype Props = BottomTabBarProps & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n};\n\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst COMPACT_TABBAR_HEIGHT = 32;\nconst DEFAULT_MAX_TAB_ITEM_WIDTH = 125;\n\nconst useNativeDriver = Platform.OS !== 'web';\n\ntype Options = {\n state: TabNavigationState<ParamListBase>;\n descriptors: BottomTabDescriptorMap;\n layout: { height: number; width: number };\n dimensions: { height: number; width: number };\n};\n\nconst shouldUseHorizontalLabels = ({\n state,\n descriptors,\n layout,\n dimensions,\n}: Options) => {\n const { tabBarLabelPosition } =\n descriptors[state.routes[state.index].key].options;\n\n if (tabBarLabelPosition) {\n switch (tabBarLabelPosition) {\n case 'beside-icon':\n return true;\n case 'below-icon':\n return false;\n }\n }\n\n if (layout.width >= 768) {\n // Screen size matches a tablet\n const maxTabWidth = state.routes.reduce((acc, route) => {\n const { tabBarItemStyle } = descriptors[route.key].options;\n const flattenedStyle = StyleSheet.flatten(tabBarItemStyle);\n\n if (flattenedStyle) {\n if (typeof flattenedStyle.width === 'number') {\n return acc + flattenedStyle.width;\n } else if (typeof flattenedStyle.maxWidth === 'number') {\n return acc + flattenedStyle.maxWidth;\n }\n }\n\n return acc + DEFAULT_MAX_TAB_ITEM_WIDTH;\n }, 0);\n\n return maxTabWidth <= layout.width;\n } else {\n return dimensions.width > dimensions.height;\n }\n};\n\nconst getPaddingBottom = (insets: EdgeInsets) =>\n Math.max(insets.bottom - Platform.select({ ios: 4, default: 0 }), 0);\n\nexport const getTabBarHeight = ({\n state,\n descriptors,\n dimensions,\n insets,\n style,\n ...rest\n}: Options & {\n insets: EdgeInsets;\n style: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;\n}) => {\n // @ts-ignore\n const customHeight = StyleSheet.flatten(style)?.height;\n\n if (typeof customHeight === 'number') {\n return customHeight;\n }\n\n const isLandscape = dimensions.width > dimensions.height;\n const horizontalLabels = shouldUseHorizontalLabels({\n state,\n descriptors,\n dimensions,\n ...rest,\n });\n const paddingBottom = getPaddingBottom(insets);\n\n if (\n Platform.OS === 'ios' &&\n !Platform.isPad &&\n isLandscape &&\n horizontalLabels\n ) {\n return COMPACT_TABBAR_HEIGHT + paddingBottom;\n }\n\n return DEFAULT_TABBAR_HEIGHT + paddingBottom;\n};\n\nexport default function BottomTabBar({\n state,\n navigation,\n descriptors,\n insets,\n style,\n}: Props) {\n const { colors } = useTheme();\n const buildLink = useLinkBuilder();\n\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor.options;\n\n const {\n tabBarShowLabel,\n tabBarHideOnKeyboard = false,\n tabBarVisibilityAnimationConfig,\n tabBarStyle,\n tabBarBackground,\n tabBarActiveTintColor,\n tabBarInactiveTintColor,\n tabBarActiveBackgroundColor,\n tabBarInactiveBackgroundColor,\n } = focusedOptions;\n\n const dimensions = useSafeAreaFrame();\n const isKeyboardShown = useIsKeyboardShown();\n\n const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext);\n\n const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown);\n\n const visibilityAnimationConfigRef = React.useRef(\n tabBarVisibilityAnimationConfig\n );\n\n React.useEffect(() => {\n visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig;\n });\n\n const [isTabBarHidden, setIsTabBarHidden] = React.useState(!shouldShowTabBar);\n\n const [visible] = React.useState(\n () => new Animated.Value(shouldShowTabBar ? 1 : 0)\n );\n\n React.useEffect(() => {\n const visibilityAnimationConfig = visibilityAnimationConfigRef.current;\n\n if (shouldShowTabBar) {\n const animation =\n visibilityAnimationConfig?.show?.animation === 'spring'\n ? Animated.spring\n : Animated.timing;\n\n animation(visible, {\n toValue: 1,\n useNativeDriver,\n duration: 250,\n ...visibilityAnimationConfig?.show?.config,\n }).start(({ finished }) => {\n if (finished) {\n setIsTabBarHidden(false);\n }\n });\n } else {\n setIsTabBarHidden(true);\n\n const animation =\n visibilityAnimationConfig?.hide?.animation === 'spring'\n ? Animated.spring\n : Animated.timing;\n\n animation(visible, {\n toValue: 0,\n useNativeDriver,\n duration: 200,\n ...visibilityAnimationConfig?.hide?.config,\n }).start();\n }\n\n return () => visible.stopAnimation();\n }, [visible, shouldShowTabBar]);\n\n const [layout, setLayout] = React.useState({\n height: 0,\n width: dimensions.width,\n });\n\n const handleLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n onHeightChange?.(height);\n\n setLayout((layout) => {\n if (height === layout.height && width === layout.width) {\n return layout;\n } else {\n return {\n height,\n width,\n };\n }\n });\n };\n\n const { routes } = state;\n\n const paddingBottom = getPaddingBottom(insets);\n const tabBarHeight = getTabBarHeight({\n state,\n descriptors,\n insets,\n dimensions,\n layout,\n style: [tabBarStyle, style],\n });\n\n const hasHorizontalLabels = shouldUseHorizontalLabels({\n state,\n descriptors,\n dimensions,\n layout,\n });\n\n const tabBarBackgroundElement = tabBarBackground?.();\n\n return (\n <Animated.View\n style={[\n styles.tabBar,\n {\n backgroundColor:\n tabBarBackgroundElement != null ? 'transparent' : colors.card,\n borderTopColor: colors.border,\n },\n {\n transform: [\n {\n translateY: visible.interpolate({\n inputRange: [0, 1],\n outputRange: [\n layout.height + paddingBottom + StyleSheet.hairlineWidth,\n 0,\n ],\n }),\n },\n ],\n // Absolutely position the tab bar so that the content is below it\n // This is needed to avoid gap at bottom when the tab bar is hidden\n position: isTabBarHidden ? 'absolute' : (null as any),\n },\n {\n height: tabBarHeight,\n paddingBottom,\n paddingHorizontal: Math.max(insets.left, insets.right),\n },\n tabBarStyle,\n ]}\n pointerEvents={isTabBarHidden ? 'none' : 'auto'}\n onLayout={handleLayout}\n >\n <View pointerEvents=\"none\" style={StyleSheet.absoluteFill}>\n {tabBarBackgroundElement}\n </View>\n <View accessibilityRole=\"tablist\" style={styles.content}>\n {routes.map((route, index) => {\n const focused = index === state.index;\n const { options } = descriptors[route.key];\n\n const onPress = () => {\n const event = navigation.emit({\n type: 'tabPress',\n target: route.key,\n canPreventDefault: true,\n });\n\n if (!focused && !event.defaultPrevented) {\n navigation.dispatch({\n ...CommonActions.navigate({ name: route.name, merge: true }),\n target: state.key,\n });\n }\n };\n\n const onLongPress = () => {\n navigation.emit({\n type: 'tabLongPress',\n target: route.key,\n });\n };\n\n const label =\n options.tabBarLabel !== undefined\n ? options.tabBarLabel\n : options.title !== undefined\n ? options.title\n : route.name;\n\n const accessibilityLabel =\n options.tabBarAccessibilityLabel !== undefined\n ? options.tabBarAccessibilityLabel\n : typeof label === 'string' && Platform.OS === 'ios'\n ? `${label}, tab, ${index + 1} of ${routes.length}`\n : undefined;\n\n return (\n <NavigationContext.Provider\n key={route.key}\n value={descriptors[route.key].navigation}\n >\n <NavigationRouteContext.Provider value={route}>\n <BottomTabItem\n route={route}\n focused={focused}\n horizontal={hasHorizontalLabels}\n onPress={onPress}\n onLongPress={onLongPress}\n accessibilityLabel={accessibilityLabel}\n to={buildLink(route.name, route.params)}\n testID={options.tabBarTestID}\n allowFontScaling={options.tabBarAllowFontScaling}\n activeTintColor={tabBarActiveTintColor}\n inactiveTintColor={tabBarInactiveTintColor}\n activeBackgroundColor={tabBarActiveBackgroundColor}\n inactiveBackgroundColor={tabBarInactiveBackgroundColor}\n button={options.tabBarButton}\n icon={\n options.tabBarIcon ??\n (({ color, size }) => (\n <MissingIcon color={color} size={size} />\n ))\n }\n badge={options.tabBarBadge}\n badgeStyle={options.tabBarBadgeStyle}\n label={label}\n showLabel={tabBarShowLabel}\n labelStyle={options.tabBarLabelStyle}\n iconStyle={options.tabBarIconStyle}\n style={options.tabBarItemStyle}\n />\n </NavigationRouteContext.Provider>\n </NavigationContext.Provider>\n );\n })}\n </View>\n </Animated.View>\n );\n}\n\nconst styles = StyleSheet.create({\n tabBar: {\n left: 0,\n right: 0,\n bottom: 0,\n borderTopWidth: StyleSheet.hairlineWidth,\n elevation: 8,\n },\n content: {\n flex: 1,\n flexDirection: 'row',\n },\n});\n"]}
1
+ {"version":3,"names":["MissingIcon","CommonActions","NavigationContext","NavigationRouteContext","useLinkBuilder","useTheme","React","Animated","Platform","StyleSheet","View","useSafeAreaFrame","BottomTabBarHeightCallbackContext","useIsKeyboardShown","BottomTabItem","DEFAULT_TABBAR_HEIGHT","COMPACT_TABBAR_HEIGHT","DEFAULT_MAX_TAB_ITEM_WIDTH","useNativeDriver","OS","shouldUseHorizontalLabels","state","descriptors","layout","dimensions","tabBarLabelPosition","routes","index","key","options","width","maxTabWidth","reduce","acc","route","tabBarItemStyle","flattenedStyle","flatten","maxWidth","height","getPaddingBottom","insets","Math","max","bottom","select","ios","default","getTabBarHeight","style","rest","customHeight","isLandscape","horizontalLabels","paddingBottom","isPad","BottomTabBar","navigation","colors","buildLink","focusedRoute","focusedDescriptor","focusedOptions","tabBarShowLabel","tabBarHideOnKeyboard","tabBarVisibilityAnimationConfig","tabBarStyle","tabBarBackground","tabBarActiveTintColor","tabBarInactiveTintColor","tabBarActiveBackgroundColor","tabBarInactiveBackgroundColor","isKeyboardShown","onHeightChange","useContext","shouldShowTabBar","visibilityAnimationConfigRef","useRef","useEffect","current","isTabBarHidden","setIsTabBarHidden","useState","visible","Value","visibilityAnimationConfig","animation","show","spring","timing","toValue","duration","config","start","finished","hide","stopAnimation","setLayout","handleLayout","e","nativeEvent","tabBarHeight","hasHorizontalLabels","tabBarBackgroundElement","styles","tabBar","backgroundColor","card","borderTopColor","border","transform","translateY","interpolate","inputRange","outputRange","hairlineWidth","position","paddingHorizontal","left","right","absoluteFill","content","map","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","navigate","name","merge","onLongPress","label","tabBarLabel","undefined","title","accessibilityLabel","tabBarAccessibilityLabel","length","params","tabBarTestID","tabBarAllowFontScaling","tabBarButton","tabBarIcon","color","size","tabBarBadge","tabBarBadgeStyle","tabBarLabelStyle","tabBarIconStyle","create","borderTopWidth","elevation","flex","flexDirection"],"sources":["BottomTabBar.tsx"],"sourcesContent":["import { MissingIcon } from '@react-navigation/elements';\nimport {\n CommonActions,\n NavigationContext,\n NavigationRouteContext,\n ParamListBase,\n TabNavigationState,\n useLinkBuilder,\n useTheme,\n} from '@react-navigation/native';\nimport React from 'react';\nimport {\n Animated,\n LayoutChangeEvent,\n Platform,\n StyleProp,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native';\nimport { EdgeInsets, useSafeAreaFrame } from 'react-native-safe-area-context';\n\nimport type { BottomTabBarProps, BottomTabDescriptorMap } from '../types';\nimport BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';\nimport useIsKeyboardShown from '../utils/useIsKeyboardShown';\nimport BottomTabItem from './BottomTabItem';\n\ntype Props = BottomTabBarProps & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n};\n\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst COMPACT_TABBAR_HEIGHT = 32;\nconst DEFAULT_MAX_TAB_ITEM_WIDTH = 125;\n\nconst useNativeDriver = Platform.OS !== 'web';\n\ntype Options = {\n state: TabNavigationState<ParamListBase>;\n descriptors: BottomTabDescriptorMap;\n layout: { height: number; width: number };\n dimensions: { height: number; width: number };\n};\n\nconst shouldUseHorizontalLabels = ({\n state,\n descriptors,\n layout,\n dimensions,\n}: Options) => {\n const { tabBarLabelPosition } =\n descriptors[state.routes[state.index].key].options;\n\n if (tabBarLabelPosition) {\n switch (tabBarLabelPosition) {\n case 'beside-icon':\n return true;\n case 'below-icon':\n return false;\n }\n }\n\n if (layout.width >= 768) {\n // Screen size matches a tablet\n const maxTabWidth = state.routes.reduce((acc, route) => {\n const { tabBarItemStyle } = descriptors[route.key].options;\n const flattenedStyle = StyleSheet.flatten(tabBarItemStyle);\n\n if (flattenedStyle) {\n if (typeof flattenedStyle.width === 'number') {\n return acc + flattenedStyle.width;\n } else if (typeof flattenedStyle.maxWidth === 'number') {\n return acc + flattenedStyle.maxWidth;\n }\n }\n\n return acc + DEFAULT_MAX_TAB_ITEM_WIDTH;\n }, 0);\n\n return maxTabWidth <= layout.width;\n } else {\n return dimensions.width > dimensions.height;\n }\n};\n\nconst getPaddingBottom = (insets: EdgeInsets) =>\n Math.max(insets.bottom - Platform.select({ ios: 4, default: 0 }), 0);\n\nexport const getTabBarHeight = ({\n state,\n descriptors,\n dimensions,\n insets,\n style,\n ...rest\n}: Options & {\n insets: EdgeInsets;\n style: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;\n}) => {\n // @ts-ignore\n const customHeight = StyleSheet.flatten(style)?.height;\n\n if (typeof customHeight === 'number') {\n return customHeight;\n }\n\n const isLandscape = dimensions.width > dimensions.height;\n const horizontalLabels = shouldUseHorizontalLabels({\n state,\n descriptors,\n dimensions,\n ...rest,\n });\n const paddingBottom = getPaddingBottom(insets);\n\n if (\n Platform.OS === 'ios' &&\n !Platform.isPad &&\n isLandscape &&\n horizontalLabels\n ) {\n return COMPACT_TABBAR_HEIGHT + paddingBottom;\n }\n\n return DEFAULT_TABBAR_HEIGHT + paddingBottom;\n};\n\nexport default function BottomTabBar({\n state,\n navigation,\n descriptors,\n insets,\n style,\n}: Props) {\n const { colors } = useTheme();\n const buildLink = useLinkBuilder();\n\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor.options;\n\n const {\n tabBarShowLabel,\n tabBarHideOnKeyboard = false,\n tabBarVisibilityAnimationConfig,\n tabBarStyle,\n tabBarBackground,\n tabBarActiveTintColor,\n tabBarInactiveTintColor,\n tabBarActiveBackgroundColor,\n tabBarInactiveBackgroundColor,\n } = focusedOptions;\n\n const dimensions = useSafeAreaFrame();\n const isKeyboardShown = useIsKeyboardShown();\n\n const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext);\n\n const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown);\n\n const visibilityAnimationConfigRef = React.useRef(\n tabBarVisibilityAnimationConfig\n );\n\n React.useEffect(() => {\n visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig;\n });\n\n const [isTabBarHidden, setIsTabBarHidden] = React.useState(!shouldShowTabBar);\n\n const [visible] = React.useState(\n () => new Animated.Value(shouldShowTabBar ? 1 : 0)\n );\n\n React.useEffect(() => {\n const visibilityAnimationConfig = visibilityAnimationConfigRef.current;\n\n if (shouldShowTabBar) {\n const animation =\n visibilityAnimationConfig?.show?.animation === 'spring'\n ? Animated.spring\n : Animated.timing;\n\n animation(visible, {\n toValue: 1,\n useNativeDriver,\n duration: 250,\n ...visibilityAnimationConfig?.show?.config,\n }).start(({ finished }) => {\n if (finished) {\n setIsTabBarHidden(false);\n }\n });\n } else {\n setIsTabBarHidden(true);\n\n const animation =\n visibilityAnimationConfig?.hide?.animation === 'spring'\n ? Animated.spring\n : Animated.timing;\n\n animation(visible, {\n toValue: 0,\n useNativeDriver,\n duration: 200,\n ...visibilityAnimationConfig?.hide?.config,\n }).start();\n }\n\n return () => visible.stopAnimation();\n }, [visible, shouldShowTabBar]);\n\n const [layout, setLayout] = React.useState({\n height: 0,\n width: dimensions.width,\n });\n\n const handleLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n onHeightChange?.(height);\n\n setLayout((layout) => {\n if (height === layout.height && width === layout.width) {\n return layout;\n } else {\n return {\n height,\n width,\n };\n }\n });\n };\n\n const { routes } = state;\n\n const paddingBottom = getPaddingBottom(insets);\n const tabBarHeight = getTabBarHeight({\n state,\n descriptors,\n insets,\n dimensions,\n layout,\n style: [tabBarStyle, style],\n });\n\n const hasHorizontalLabels = shouldUseHorizontalLabels({\n state,\n descriptors,\n dimensions,\n layout,\n });\n\n const tabBarBackgroundElement = tabBarBackground?.();\n\n return (\n <Animated.View\n style={[\n styles.tabBar,\n {\n backgroundColor:\n tabBarBackgroundElement != null ? 'transparent' : colors.card,\n borderTopColor: colors.border,\n },\n {\n transform: [\n {\n translateY: visible.interpolate({\n inputRange: [0, 1],\n outputRange: [\n layout.height + paddingBottom + StyleSheet.hairlineWidth,\n 0,\n ],\n }),\n },\n ],\n // Absolutely position the tab bar so that the content is below it\n // This is needed to avoid gap at bottom when the tab bar is hidden\n position: isTabBarHidden ? 'absolute' : (null as any),\n },\n {\n height: tabBarHeight,\n paddingBottom,\n paddingHorizontal: Math.max(insets.left, insets.right),\n },\n tabBarStyle,\n ]}\n pointerEvents={isTabBarHidden ? 'none' : 'auto'}\n onLayout={handleLayout}\n >\n <View pointerEvents=\"none\" style={StyleSheet.absoluteFill}>\n {tabBarBackgroundElement}\n </View>\n <View accessibilityRole=\"tablist\" style={styles.content}>\n {routes.map((route, index) => {\n const focused = index === state.index;\n const { options } = descriptors[route.key];\n\n const onPress = () => {\n const event = navigation.emit({\n type: 'tabPress',\n target: route.key,\n canPreventDefault: true,\n });\n\n if (!focused && !event.defaultPrevented) {\n navigation.dispatch({\n ...CommonActions.navigate({ name: route.name, merge: true }),\n target: state.key,\n });\n }\n };\n\n const onLongPress = () => {\n navigation.emit({\n type: 'tabLongPress',\n target: route.key,\n });\n };\n\n const label =\n options.tabBarLabel !== undefined\n ? options.tabBarLabel\n : options.title !== undefined\n ? options.title\n : route.name;\n\n const accessibilityLabel =\n options.tabBarAccessibilityLabel !== undefined\n ? options.tabBarAccessibilityLabel\n : typeof label === 'string' && Platform.OS === 'ios'\n ? `${label}, tab, ${index + 1} of ${routes.length}`\n : undefined;\n\n return (\n <NavigationContext.Provider\n key={route.key}\n value={descriptors[route.key].navigation}\n >\n <NavigationRouteContext.Provider value={route}>\n <BottomTabItem\n route={route}\n focused={focused}\n horizontal={hasHorizontalLabels}\n onPress={onPress}\n onLongPress={onLongPress}\n accessibilityLabel={accessibilityLabel}\n to={buildLink(route.name, route.params)}\n testID={options.tabBarTestID}\n allowFontScaling={options.tabBarAllowFontScaling}\n activeTintColor={tabBarActiveTintColor}\n inactiveTintColor={tabBarInactiveTintColor}\n activeBackgroundColor={tabBarActiveBackgroundColor}\n inactiveBackgroundColor={tabBarInactiveBackgroundColor}\n button={options.tabBarButton}\n icon={\n options.tabBarIcon ??\n (({ color, size }) => (\n <MissingIcon color={color} size={size} />\n ))\n }\n badge={options.tabBarBadge}\n badgeStyle={options.tabBarBadgeStyle}\n label={label}\n showLabel={tabBarShowLabel}\n labelStyle={options.tabBarLabelStyle}\n iconStyle={options.tabBarIconStyle}\n style={options.tabBarItemStyle}\n />\n </NavigationRouteContext.Provider>\n </NavigationContext.Provider>\n );\n })}\n </View>\n </Animated.View>\n );\n}\n\nconst styles = StyleSheet.create({\n tabBar: {\n left: 0,\n right: 0,\n bottom: 0,\n borderTopWidth: StyleSheet.hairlineWidth,\n elevation: 8,\n },\n content: {\n flex: 1,\n flexDirection: 'row',\n },\n});\n"],"mappings":"AAAA,SAASA,WAAT,QAA4B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;IAIN+G,cAAc,EAAElJ,UAAU,CAAC0G,aAJrB;IAKNyC,SAAS,EAAE;EALL,CADuB;EAQ/BnC,OAAO,EAAE;IACPoC,IAAI,EAAE,CADC;IAEPC,aAAa,EAAE;EAFR;AARsB,CAAlB,CAAf"}
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import { Link, useTheme } from '@react-navigation/native';
4
4
  import Color from 'color';
@@ -1 +1 @@
1
- {"version":3,"sources":["BottomTabItem.tsx"],"names":["Link","useTheme","Color","React","Platform","Pressable","StyleSheet","Text","TabBarIcon","BottomTabBarItem","focused","route","label","icon","badge","badgeStyle","to","button","children","style","onPress","accessibilityRole","rest","OS","styles","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","accessibilityLabel","testID","onLongPress","horizontal","activeTintColor","customActiveTintColor","inactiveTintColor","customInactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","showLabel","allowFontScaling","labelStyle","iconStyle","colors","undefined","primary","text","mix","card","hex","renderLabel","color","labelBeside","labelBeneath","position","renderIcon","activeOpacity","inactiveOpacity","scene","backgroundColor","select","ios","default","accessibilityState","selected","accessibilityStates","tab","tabLandscape","tabPortrait","create","flex","alignItems","justifyContent","flexDirection","textAlign","fontSize","marginLeft","marginTop","display"],"mappings":";;AAAA,SAASA,IAAT,EAAsBC,QAAtB,QAAsC,0BAAtC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAEEC,QAFF,EAGEC,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;AAyB/B9D,EAAAA,MAAM,EAAE;AACN+D,IAAAA,OAAO,EAAE;AADH;AAzBuB,CAAlB,CAAf","sourcesContent":["import { Link, Route, useTheme } from '@react-navigation/native';\nimport Color from 'color';\nimport React from 'react';\nimport {\n GestureResponderEvent,\n Platform,\n Pressable,\n StyleProp,\n StyleSheet,\n Text,\n TextStyle,\n ViewStyle,\n} from 'react-native';\n\nimport type { BottomTabBarButtonProps, LabelPosition } from '../types';\nimport TabBarIcon from './TabBarIcon';\n\ntype Props = {\n /**\n * Whether the tab is focused.\n */\n focused: boolean;\n /**\n * The route object which should be specified by the tab.\n */\n route: Route<string>;\n /**\n * The label text of the tab.\n */\n label:\n | string\n | ((props: {\n focused: boolean;\n color: string;\n position: LabelPosition;\n }) => React.ReactNode);\n /**\n * Icon to display for the tab.\n */\n icon: (props: {\n focused: boolean;\n size: number;\n color: string;\n }) => React.ReactNode;\n /**\n * Text to show in a badge on the tab icon.\n */\n badge?: number | string;\n /**\n * Custom style for the badge.\n */\n badgeStyle?: StyleProp<TextStyle>;\n /**\n * URL to use for the link to the tab.\n */\n to?: string;\n /**\n * The button for the tab. Uses a `TouchableWithoutFeedback` by default.\n */\n button?: (props: BottomTabBarButtonProps) => React.ReactNode;\n /**\n * The accessibility label for the tab.\n */\n accessibilityLabel?: string;\n /**\n * An unique ID for testing for the tab.\n */\n testID?: string;\n /**\n * Function to execute on press in React Native.\n * On the web, this will use onClick.\n */\n onPress: (\n e: React.MouseEvent<HTMLElement, MouseEvent> | GestureResponderEvent\n ) => void;\n /**\n * Function to execute on long press.\n */\n onLongPress: (e: GestureResponderEvent) => void;\n /**\n * Whether the label should be aligned with the icon horizontally.\n */\n horizontal: boolean;\n /**\n * Color for the icon and label when the item is active.\n */\n activeTintColor?: string;\n /**\n * Color for the icon and label when the item is inactive.\n */\n inactiveTintColor?: string;\n /**\n * Background color for item when its active.\n */\n activeBackgroundColor?: string;\n /**\n * Background color for item when its inactive.\n */\n inactiveBackgroundColor?: string;\n /**\n * Whether to show the label text for the tab.\n */\n showLabel?: boolean;\n /**\n * Whether to allow scaling the font for the label for accessibility purposes.\n */\n allowFontScaling?: boolean;\n /**\n * Style object for the label element.\n */\n labelStyle?: StyleProp<TextStyle>;\n /**\n * Style object for the icon element.\n */\n iconStyle?: StyleProp<ViewStyle>;\n /**\n * Style object for the wrapper element.\n */\n style?: StyleProp<ViewStyle>;\n};\n\nexport default function BottomTabBarItem({\n focused,\n route,\n label,\n icon,\n badge,\n badgeStyle,\n to,\n button = ({\n children,\n style,\n onPress,\n to,\n accessibilityRole,\n ...rest\n }: BottomTabBarButtonProps) => {\n if (Platform.OS === 'web' && to) {\n // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.\n // We need to use `onClick` to be able to prevent default browser handling of links.\n return (\n <Link\n {...rest}\n to={to}\n style={[styles.button, style]}\n onPress={(e: any) => {\n if (\n !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys\n (e.button == null || e.button === 0) // ignore everything but left clicks\n ) {\n e.preventDefault();\n onPress?.(e);\n }\n }}\n >\n {children}\n </Link>\n );\n } else {\n return (\n <Pressable\n {...rest}\n accessibilityRole={accessibilityRole}\n onPress={onPress}\n style={style}\n >\n {children}\n </Pressable>\n );\n }\n },\n accessibilityLabel,\n testID,\n onPress,\n onLongPress,\n horizontal,\n activeTintColor: customActiveTintColor,\n inactiveTintColor: customInactiveTintColor,\n activeBackgroundColor = 'transparent',\n inactiveBackgroundColor = 'transparent',\n showLabel = true,\n allowFontScaling,\n labelStyle,\n iconStyle,\n style,\n}: Props) {\n const { colors } = useTheme();\n\n const activeTintColor =\n customActiveTintColor === undefined\n ? colors.primary\n : customActiveTintColor;\n\n const inactiveTintColor =\n customInactiveTintColor === undefined\n ? Color(colors.text).mix(Color(colors.card), 0.5).hex()\n : customInactiveTintColor;\n\n const renderLabel = ({ focused }: { focused: boolean }) => {\n if (showLabel === false) {\n return null;\n }\n\n const color = focused ? activeTintColor : inactiveTintColor;\n\n if (typeof label === 'string') {\n return (\n <Text\n numberOfLines={1}\n style={[\n styles.label,\n { color },\n horizontal ? styles.labelBeside : styles.labelBeneath,\n labelStyle,\n ]}\n allowFontScaling={allowFontScaling}\n >\n {label}\n </Text>\n );\n }\n\n return label({\n focused,\n color,\n position: horizontal ? 'beside-icon' : 'below-icon',\n });\n };\n\n const renderIcon = ({ focused }: { focused: boolean }) => {\n if (icon === undefined) {\n return null;\n }\n\n const activeOpacity = focused ? 1 : 0;\n const inactiveOpacity = focused ? 0 : 1;\n\n return (\n <TabBarIcon\n route={route}\n horizontal={horizontal}\n badge={badge}\n badgeStyle={badgeStyle}\n activeOpacity={activeOpacity}\n inactiveOpacity={inactiveOpacity}\n activeTintColor={activeTintColor}\n inactiveTintColor={inactiveTintColor}\n renderIcon={icon}\n style={iconStyle}\n />\n );\n };\n\n const scene = { route, focused };\n\n const backgroundColor = focused\n ? activeBackgroundColor\n : inactiveBackgroundColor;\n\n return button({\n to,\n onPress,\n onLongPress,\n testID,\n accessibilityLabel,\n // FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS\n accessibilityRole: Platform.select({ ios: 'button', default: 'tab' }),\n accessibilityState: { selected: focused },\n // @ts-expect-error: keep for compatibility with older React Native versions\n accessibilityStates: focused ? ['selected'] : [],\n style: [\n styles.tab,\n { backgroundColor },\n horizontal ? styles.tabLandscape : styles.tabPortrait,\n style,\n ],\n children: (\n <React.Fragment>\n {renderIcon(scene)}\n {renderLabel(scene)}\n </React.Fragment>\n ),\n }) as React.ReactElement;\n}\n\nconst styles = StyleSheet.create({\n tab: {\n flex: 1,\n alignItems: 'center',\n },\n tabPortrait: {\n justifyContent: 'flex-end',\n flexDirection: 'column',\n },\n tabLandscape: {\n justifyContent: 'center',\n flexDirection: 'row',\n },\n label: {\n textAlign: 'center',\n backgroundColor: 'transparent',\n },\n labelBeneath: {\n fontSize: 10,\n },\n labelBeside: {\n fontSize: 13,\n marginLeft: 20,\n marginTop: 3,\n },\n button: {\n display: 'flex',\n },\n});\n"]}
1
+ {"version":3,"names":["Link","useTheme","Color","React","Platform","Pressable","StyleSheet","Text","TabBarIcon","BottomTabBarItem","focused","route","label","icon","badge","badgeStyle","to","button","children","style","onPress","accessibilityRole","rest","OS","styles","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","accessibilityLabel","testID","onLongPress","horizontal","activeTintColor","customActiveTintColor","inactiveTintColor","customInactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","showLabel","allowFontScaling","labelStyle","iconStyle","colors","undefined","primary","text","mix","card","hex","renderLabel","color","labelBeside","labelBeneath","position","renderIcon","activeOpacity","inactiveOpacity","scene","backgroundColor","select","ios","default","accessibilityState","selected","accessibilityStates","tab","tabLandscape","tabPortrait","create","flex","alignItems","justifyContent","flexDirection","textAlign","fontSize","marginLeft","marginTop","display"],"sources":["BottomTabItem.tsx"],"sourcesContent":["import { Link, Route, useTheme } from '@react-navigation/native';\nimport Color from 'color';\nimport React from 'react';\nimport {\n GestureResponderEvent,\n Platform,\n Pressable,\n StyleProp,\n StyleSheet,\n Text,\n TextStyle,\n ViewStyle,\n} from 'react-native';\n\nimport type { BottomTabBarButtonProps, LabelPosition } from '../types';\nimport TabBarIcon from './TabBarIcon';\n\ntype Props = {\n /**\n * Whether the tab is focused.\n */\n focused: boolean;\n /**\n * The route object which should be specified by the tab.\n */\n route: Route<string>;\n /**\n * The label text of the tab.\n */\n label:\n | string\n | ((props: {\n focused: boolean;\n color: string;\n position: LabelPosition;\n }) => React.ReactNode);\n /**\n * Icon to display for the tab.\n */\n icon: (props: {\n focused: boolean;\n size: number;\n color: string;\n }) => React.ReactNode;\n /**\n * Text to show in a badge on the tab icon.\n */\n badge?: number | string;\n /**\n * Custom style for the badge.\n */\n badgeStyle?: StyleProp<TextStyle>;\n /**\n * URL to use for the link to the tab.\n */\n to?: string;\n /**\n * The button for the tab. Uses a `TouchableWithoutFeedback` by default.\n */\n button?: (props: BottomTabBarButtonProps) => React.ReactNode;\n /**\n * The accessibility label for the tab.\n */\n accessibilityLabel?: string;\n /**\n * An unique ID for testing for the tab.\n */\n testID?: string;\n /**\n * Function to execute on press in React Native.\n * On the web, this will use onClick.\n */\n onPress: (\n e: React.MouseEvent<HTMLElement, MouseEvent> | GestureResponderEvent\n ) => void;\n /**\n * Function to execute on long press.\n */\n onLongPress: (e: GestureResponderEvent) => void;\n /**\n * Whether the label should be aligned with the icon horizontally.\n */\n horizontal: boolean;\n /**\n * Color for the icon and label when the item is active.\n */\n activeTintColor?: string;\n /**\n * Color for the icon and label when the item is inactive.\n */\n inactiveTintColor?: string;\n /**\n * Background color for item when its active.\n */\n activeBackgroundColor?: string;\n /**\n * Background color for item when its inactive.\n */\n inactiveBackgroundColor?: string;\n /**\n * Whether to show the label text for the tab.\n */\n showLabel?: boolean;\n /**\n * Whether to allow scaling the font for the label for accessibility purposes.\n */\n allowFontScaling?: boolean;\n /**\n * Style object for the label element.\n */\n labelStyle?: StyleProp<TextStyle>;\n /**\n * Style object for the icon element.\n */\n iconStyle?: StyleProp<ViewStyle>;\n /**\n * Style object for the wrapper element.\n */\n style?: StyleProp<ViewStyle>;\n};\n\nexport default function BottomTabBarItem({\n focused,\n route,\n label,\n icon,\n badge,\n badgeStyle,\n to,\n button = ({\n children,\n style,\n onPress,\n to,\n accessibilityRole,\n ...rest\n }: BottomTabBarButtonProps) => {\n if (Platform.OS === 'web' && to) {\n // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.\n // We need to use `onClick` to be able to prevent default browser handling of links.\n return (\n <Link\n {...rest}\n to={to}\n style={[styles.button, style]}\n onPress={(e: any) => {\n if (\n !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys\n (e.button == null || e.button === 0) // ignore everything but left clicks\n ) {\n e.preventDefault();\n onPress?.(e);\n }\n }}\n >\n {children}\n </Link>\n );\n } else {\n return (\n <Pressable\n {...rest}\n accessibilityRole={accessibilityRole}\n onPress={onPress}\n style={style}\n >\n {children}\n </Pressable>\n );\n }\n },\n accessibilityLabel,\n testID,\n onPress,\n onLongPress,\n horizontal,\n activeTintColor: customActiveTintColor,\n inactiveTintColor: customInactiveTintColor,\n activeBackgroundColor = 'transparent',\n inactiveBackgroundColor = 'transparent',\n showLabel = true,\n allowFontScaling,\n labelStyle,\n iconStyle,\n style,\n}: Props) {\n const { colors } = useTheme();\n\n const activeTintColor =\n customActiveTintColor === undefined\n ? colors.primary\n : customActiveTintColor;\n\n const inactiveTintColor =\n customInactiveTintColor === undefined\n ? Color(colors.text).mix(Color(colors.card), 0.5).hex()\n : customInactiveTintColor;\n\n const renderLabel = ({ focused }: { focused: boolean }) => {\n if (showLabel === false) {\n return null;\n }\n\n const color = focused ? activeTintColor : inactiveTintColor;\n\n if (typeof label === 'string') {\n return (\n <Text\n numberOfLines={1}\n style={[\n styles.label,\n { color },\n horizontal ? styles.labelBeside : styles.labelBeneath,\n labelStyle,\n ]}\n allowFontScaling={allowFontScaling}\n >\n {label}\n </Text>\n );\n }\n\n return label({\n focused,\n color,\n position: horizontal ? 'beside-icon' : 'below-icon',\n });\n };\n\n const renderIcon = ({ focused }: { focused: boolean }) => {\n if (icon === undefined) {\n return null;\n }\n\n const activeOpacity = focused ? 1 : 0;\n const inactiveOpacity = focused ? 0 : 1;\n\n return (\n <TabBarIcon\n route={route}\n horizontal={horizontal}\n badge={badge}\n badgeStyle={badgeStyle}\n activeOpacity={activeOpacity}\n inactiveOpacity={inactiveOpacity}\n activeTintColor={activeTintColor}\n inactiveTintColor={inactiveTintColor}\n renderIcon={icon}\n style={iconStyle}\n />\n );\n };\n\n const scene = { route, focused };\n\n const backgroundColor = focused\n ? activeBackgroundColor\n : inactiveBackgroundColor;\n\n return button({\n to,\n onPress,\n onLongPress,\n testID,\n accessibilityLabel,\n // FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS\n accessibilityRole: Platform.select({ ios: 'button', default: 'tab' }),\n accessibilityState: { selected: focused },\n // @ts-expect-error: keep for compatibility with older React Native versions\n accessibilityStates: focused ? ['selected'] : [],\n style: [\n styles.tab,\n { backgroundColor },\n horizontal ? styles.tabLandscape : styles.tabPortrait,\n style,\n ],\n children: (\n <React.Fragment>\n {renderIcon(scene)}\n {renderLabel(scene)}\n </React.Fragment>\n ),\n }) as React.ReactElement;\n}\n\nconst styles = StyleSheet.create({\n tab: {\n flex: 1,\n alignItems: 'center',\n },\n tabPortrait: {\n justifyContent: 'flex-end',\n flexDirection: 'column',\n },\n tabLandscape: {\n justifyContent: 'center',\n flexDirection: 'row',\n },\n label: {\n textAlign: 'center',\n backgroundColor: 'transparent',\n },\n labelBeneath: {\n fontSize: 10,\n },\n labelBeside: {\n fontSize: 13,\n marginLeft: 20,\n marginTop: 3,\n },\n button: {\n display: 'flex',\n },\n});\n"],"mappings":";;AAAA,SAASA,IAAT,EAAsBC,QAAtB,QAAsC,0BAAtC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAEEC,QAFF,EAGEC,SAHF,EAKEC,UALF,EAMEC,IANF,QASO,cATP;AAYA,OAAOC,UAAP,MAAuB,cAAvB;AA0GA,eAAe,SAASC,gBAAT,OAgEL;EAAA,IAhE+B;IACvCC,OADuC;IAEvCC,KAFuC;IAGvCC,KAHuC;IAIvCC,IAJuC;IAKvCC,KALuC;IAMvCC,UANuC;IAOvCC,EAPuC;IAQvCC,MAAM,GAAG,SAOsB;MAAA,IAPrB;QACRC,QADQ;QAERC,KAFQ;QAGRC,OAHQ;QAIRJ,EAJQ;QAKRK,iBALQ;QAMR,GAAGC;MANK,CAOqB;;MAC7B,IAAIlB,QAAQ,CAACmB,EAAT,KAAgB,KAAhB,IAAyBP,EAA7B,EAAiC;QAC/B;QACA;QACA,oBACE,oBAAC,IAAD,eACMM,IADN;UAEE,EAAE,EAAEN,EAFN;UAGE,KAAK,EAAE,CAACQ,MAAM,CAACP,MAAR,EAAgBE,KAAhB,CAHT;UAIE,OAAO,EAAG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;EAHA,CApBkB;EAyB/B9D,MAAM,EAAE;IACN+D,OAAO,EAAE;EADH;AAzBuB,CAAlB,CAAf"}
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import { getHeaderTitle, Header, SafeAreaProviderCompat, Screen } from '@react-navigation/elements';
4
4
  import * as React from 'react';
@@ -83,6 +83,7 @@ export default function BottomTabView(props) {
83
83
  }
84
84
 
85
85
  const {
86
+ freezeOnBlur,
86
87
  header = _ref5 => {
87
88
  let {
88
89
  layout,
@@ -92,7 +93,10 @@ export default function BottomTabView(props) {
92
93
  layout: layout,
93
94
  title: getHeaderTitle(options, route.name)
94
95
  }));
95
- }
96
+ },
97
+ headerShown,
98
+ headerStatusBarHeight,
99
+ headerTransparent
96
100
  } = descriptor.options;
97
101
  return /*#__PURE__*/React.createElement(MaybeScreen, {
98
102
  key: route.key,
@@ -100,16 +104,17 @@ export default function BottomTabView(props) {
100
104
  zIndex: isFocused ? 0 : -1
101
105
  }],
102
106
  visible: isFocused,
103
- enabled: detachInactiveScreens
107
+ enabled: detachInactiveScreens,
108
+ freezeOnBlur: freezeOnBlur
104
109
  }, /*#__PURE__*/React.createElement(BottomTabBarHeightContext.Provider, {
105
110
  value: tabBarHeight
106
111
  }, /*#__PURE__*/React.createElement(Screen, {
107
112
  focused: isFocused,
108
113
  route: descriptor.route,
109
114
  navigation: descriptor.navigation,
110
- headerShown: descriptor.options.headerShown,
111
- headerTransparent: descriptor.options.headerTransparent,
112
- headerStatusBarHeight: descriptor.options.headerStatusBarHeight,
115
+ headerShown: headerShown,
116
+ headerStatusBarHeight: headerStatusBarHeight,
117
+ headerTransparent: headerTransparent,
113
118
  header: header({
114
119
  layout: dimensions,
115
120
  route: descriptor.route,
@@ -1 +1 @@
1
- {"version":3,"sources":["BottomTabView.tsx"],"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","React","Platform","StyleSheet","SafeAreaInsetsContext","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","BottomTabBar","getTabBarHeight","MaybeScreen","MaybeScreenContainer","BottomTabView","props","tabBar","state","navigation","descriptors","safeAreaInsets","detachInactiveScreens","OS","sceneContainerStyle","focusedRouteKey","routes","index","key","loaded","setLoaded","useState","includes","dimensions","initialMetrics","frame","tabBarHeight","setTabBarHeight","layout","width","height","insets","style","options","tabBarStyle","renderTabBar","top","right","bottom","left","styles","container","map","route","descriptor","lazy","unmountOnBlur","isFocused","header","name","absoluteFill","zIndex","headerShown","headerTransparent","headerStatusBarHeight","render","create","flex","overflow"],"mappings":";;AAAA,SACEA,cADF,EAEEC,MAFF,EAGEC,sBAHF,EAIEC,MAJF,QAKO,4BALP;AAUA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAASC,QAAT,EAAmBC,UAAnB,QAAqC,cAArC;AACA,SAASC,qBAAT,QAAsC,gCAAtC;AAUA,OAAOC,iCAAP,MAA8C,4CAA9C;AACA,OAAOC,yBAAP,MAAsC,oCAAtC;AACA,OAAOC,YAAP,IAAuBC,eAAvB,QAA8C,gBAA9C;AACA,SAASC,WAAT,EAAsBC,oBAAtB,QAAkD,kBAAlD;AAQA,eAAe,SAASC,aAAT,CAAuBC,KAAvB,EAAqC;AAClD,QAAM;AACJC,IAAAA,MAAM,GAAID,KAAD,iBAA8B,oBAAC,YAAD,EAAkBA,KAAlB,CADnC;AAEJE,IAAAA,KAFI;AAGJC,IAAAA,UAHI;AAIJC,IAAAA,WAJI;AAKJC,IAAAA,cALI;AAMJC,IAAAA,qBAAqB,GAA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;AACbpB,QAAAA,MAAM,EAAEL,UADK;AAEboB,QAAAA,KAAK,EAAEC,UAAU,CAACD,KAFL;AAGblC,QAAAA,UAAU,EACRmC,UAAU,CAACnC,UAJA;AAKbwB,QAAAA,OAAO,EAAEW,UAAU,CAACX;AALP,OAAD,CAThB;AAgBE,MAAA,KAAK,EAAEnB;AAhBT,OAkBG8B,UAAU,CAACW,MAAX,EAlBH,CADF,CANF,CADF;AA+BD,GAvDA,CALH,CADF,eA+DE,oBAAC,iCAAD,CAAmC,QAAnC;AAA4C,IAAA,KAAK,EAAE5B;AAAnD,KACGQ,YAAY,EADf,CA/DF,CADF;AAqED;AAED,MAAMK,MAAM,GAAG3C,UAAU,CAAC2D,MAAX,CAAkB;AAC/Bf,EAAAA,SAAS,EAAE;AACTgB,IAAAA,IAAI,EAAE,CADG;AAETC,IAAAA,QAAQ,EAAE;AAFD;AADoB,CAAlB,CAAf","sourcesContent":["import {\n getHeaderTitle,\n Header,\n SafeAreaProviderCompat,\n Screen,\n} from '@react-navigation/elements';\nimport type {\n ParamListBase,\n TabNavigationState,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport { Platform, StyleSheet } from 'react-native';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nimport type {\n BottomTabBarProps,\n BottomTabDescriptorMap,\n BottomTabHeaderProps,\n BottomTabNavigationConfig,\n BottomTabNavigationHelpers,\n BottomTabNavigationProp,\n} from '../types';\nimport BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';\nimport BottomTabBarHeightContext from '../utils/BottomTabBarHeightContext';\nimport BottomTabBar, { getTabBarHeight } from './BottomTabBar';\nimport { MaybeScreen, MaybeScreenContainer } from './ScreenFallback';\n\ntype Props = BottomTabNavigationConfig & {\n state: TabNavigationState<ParamListBase>;\n navigation: BottomTabNavigationHelpers;\n descriptors: BottomTabDescriptorMap;\n};\n\nexport default function BottomTabView(props: Props) {\n const {\n tabBar = (props: BottomTabBarProps) => <BottomTabBar {...props} />,\n state,\n navigation,\n descriptors,\n safeAreaInsets,\n detachInactiveScreens = Platform.OS === 'web' ||\n Platform.OS === 'android' ||\n Platform.OS === 'ios',\n sceneContainerStyle,\n } = props;\n\n const focusedRouteKey = state.routes[state.index].key;\n const [loaded, setLoaded] = React.useState([focusedRouteKey]);\n\n if (!loaded.includes(focusedRouteKey)) {\n setLoaded([...loaded, focusedRouteKey]);\n }\n\n const dimensions = SafeAreaProviderCompat.initialMetrics.frame;\n const [tabBarHeight, setTabBarHeight] = React.useState(() =>\n getTabBarHeight({\n state,\n descriptors,\n dimensions,\n layout: { width: dimensions.width, height: 0 },\n insets: {\n ...SafeAreaProviderCompat.initialMetrics.insets,\n ...props.safeAreaInsets,\n },\n style: descriptors[state.routes[state.index].key].options.tabBarStyle,\n })\n );\n\n const renderTabBar = () => {\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets) =>\n tabBar({\n state: state,\n descriptors: descriptors,\n navigation: navigation,\n insets: {\n top: safeAreaInsets?.top ?? insets?.top ?? 0,\n right: safeAreaInsets?.right ?? insets?.right ?? 0,\n bottom: safeAreaInsets?.bottom ?? insets?.bottom ?? 0,\n left: safeAreaInsets?.left ?? insets?.left ?? 0,\n },\n })\n }\n </SafeAreaInsetsContext.Consumer>\n );\n };\n\n const { routes } = state;\n\n return (\n <SafeAreaProviderCompat>\n <MaybeScreenContainer\n enabled={detachInactiveScreens}\n hasTwoStates\n style={styles.container}\n >\n {routes.map((route, index) => {\n const descriptor = descriptors[route.key];\n const { lazy = true, unmountOnBlur } = descriptor.options;\n const isFocused = state.index === index;\n\n if (unmountOnBlur && !isFocused) {\n return null;\n }\n\n if (lazy && !loaded.includes(route.key) && !isFocused) {\n // Don't render a lazy screen if we've never navigated to it\n return null;\n }\n\n const {\n header = ({ layout, options }: BottomTabHeaderProps) => (\n <Header\n {...options}\n layout={layout}\n title={getHeaderTitle(options, route.name)}\n />\n ),\n } = descriptor.options;\n\n return (\n <MaybeScreen\n key={route.key}\n style={[StyleSheet.absoluteFill, { zIndex: isFocused ? 0 : -1 }]}\n visible={isFocused}\n enabled={detachInactiveScreens}\n >\n <BottomTabBarHeightContext.Provider value={tabBarHeight}>\n <Screen\n focused={isFocused}\n route={descriptor.route}\n navigation={descriptor.navigation}\n headerShown={descriptor.options.headerShown}\n headerTransparent={descriptor.options.headerTransparent}\n headerStatusBarHeight={\n descriptor.options.headerStatusBarHeight\n }\n header={header({\n layout: dimensions,\n route: descriptor.route,\n navigation:\n descriptor.navigation as BottomTabNavigationProp<ParamListBase>,\n options: descriptor.options,\n })}\n style={sceneContainerStyle}\n >\n {descriptor.render()}\n </Screen>\n </BottomTabBarHeightContext.Provider>\n </MaybeScreen>\n );\n })}\n </MaybeScreenContainer>\n <BottomTabBarHeightCallbackContext.Provider value={setTabBarHeight}>\n {renderTabBar()}\n </BottomTabBarHeightCallbackContext.Provider>\n </SafeAreaProviderCompat>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n overflow: 'hidden',\n },\n});\n"]}
1
+ {"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","React","Platform","StyleSheet","SafeAreaInsetsContext","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","BottomTabBar","getTabBarHeight","MaybeScreen","MaybeScreenContainer","BottomTabView","props","tabBar","state","navigation","descriptors","safeAreaInsets","detachInactiveScreens","OS","sceneContainerStyle","focusedRouteKey","routes","index","key","loaded","setLoaded","useState","includes","dimensions","initialMetrics","frame","tabBarHeight","setTabBarHeight","layout","width","height","insets","style","options","tabBarStyle","renderTabBar","top","right","bottom","left","styles","container","map","route","descriptor","lazy","unmountOnBlur","isFocused","freezeOnBlur","header","name","headerShown","headerStatusBarHeight","headerTransparent","absoluteFill","zIndex","render","create","flex","overflow"],"sources":["BottomTabView.tsx"],"sourcesContent":["import {\n getHeaderTitle,\n Header,\n SafeAreaProviderCompat,\n Screen,\n} from '@react-navigation/elements';\nimport type {\n ParamListBase,\n TabNavigationState,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport { Platform, StyleSheet } from 'react-native';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nimport type {\n BottomTabBarProps,\n BottomTabDescriptorMap,\n BottomTabHeaderProps,\n BottomTabNavigationConfig,\n BottomTabNavigationHelpers,\n BottomTabNavigationProp,\n} from '../types';\nimport BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';\nimport BottomTabBarHeightContext from '../utils/BottomTabBarHeightContext';\nimport BottomTabBar, { getTabBarHeight } from './BottomTabBar';\nimport { MaybeScreen, MaybeScreenContainer } from './ScreenFallback';\n\ntype Props = BottomTabNavigationConfig & {\n state: TabNavigationState<ParamListBase>;\n navigation: BottomTabNavigationHelpers;\n descriptors: BottomTabDescriptorMap;\n};\n\nexport default function BottomTabView(props: Props) {\n const {\n tabBar = (props: BottomTabBarProps) => <BottomTabBar {...props} />,\n state,\n navigation,\n descriptors,\n safeAreaInsets,\n detachInactiveScreens = Platform.OS === 'web' ||\n Platform.OS === 'android' ||\n Platform.OS === 'ios',\n sceneContainerStyle,\n } = props;\n\n const focusedRouteKey = state.routes[state.index].key;\n const [loaded, setLoaded] = React.useState([focusedRouteKey]);\n\n if (!loaded.includes(focusedRouteKey)) {\n setLoaded([...loaded, focusedRouteKey]);\n }\n\n const dimensions = SafeAreaProviderCompat.initialMetrics.frame;\n const [tabBarHeight, setTabBarHeight] = React.useState(() =>\n getTabBarHeight({\n state,\n descriptors,\n dimensions,\n layout: { width: dimensions.width, height: 0 },\n insets: {\n ...SafeAreaProviderCompat.initialMetrics.insets,\n ...props.safeAreaInsets,\n },\n style: descriptors[state.routes[state.index].key].options.tabBarStyle,\n })\n );\n\n const renderTabBar = () => {\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets) =>\n tabBar({\n state: state,\n descriptors: descriptors,\n navigation: navigation,\n insets: {\n top: safeAreaInsets?.top ?? insets?.top ?? 0,\n right: safeAreaInsets?.right ?? insets?.right ?? 0,\n bottom: safeAreaInsets?.bottom ?? insets?.bottom ?? 0,\n left: safeAreaInsets?.left ?? insets?.left ?? 0,\n },\n })\n }\n </SafeAreaInsetsContext.Consumer>\n );\n };\n\n const { routes } = state;\n\n return (\n <SafeAreaProviderCompat>\n <MaybeScreenContainer\n enabled={detachInactiveScreens}\n hasTwoStates\n style={styles.container}\n >\n {routes.map((route, index) => {\n const descriptor = descriptors[route.key];\n const { lazy = true, unmountOnBlur } = descriptor.options;\n const isFocused = state.index === index;\n\n if (unmountOnBlur && !isFocused) {\n return null;\n }\n\n if (lazy && !loaded.includes(route.key) && !isFocused) {\n // Don't render a lazy screen if we've never navigated to it\n return null;\n }\n\n const {\n freezeOnBlur,\n header = ({ layout, options }: BottomTabHeaderProps) => (\n <Header\n {...options}\n layout={layout}\n title={getHeaderTitle(options, route.name)}\n />\n ),\n headerShown,\n headerStatusBarHeight,\n headerTransparent,\n } = descriptor.options;\n\n return (\n <MaybeScreen\n key={route.key}\n style={[StyleSheet.absoluteFill, { zIndex: isFocused ? 0 : -1 }]}\n visible={isFocused}\n enabled={detachInactiveScreens}\n freezeOnBlur={freezeOnBlur}\n >\n <BottomTabBarHeightContext.Provider value={tabBarHeight}>\n <Screen\n focused={isFocused}\n route={descriptor.route}\n navigation={descriptor.navigation}\n headerShown={headerShown}\n headerStatusBarHeight={headerStatusBarHeight}\n headerTransparent={headerTransparent}\n header={header({\n layout: dimensions,\n route: descriptor.route,\n navigation:\n descriptor.navigation as BottomTabNavigationProp<ParamListBase>,\n options: descriptor.options,\n })}\n style={sceneContainerStyle}\n >\n {descriptor.render()}\n </Screen>\n </BottomTabBarHeightContext.Provider>\n </MaybeScreen>\n );\n })}\n </MaybeScreenContainer>\n <BottomTabBarHeightCallbackContext.Provider value={setTabBarHeight}>\n {renderTabBar()}\n </BottomTabBarHeightCallbackContext.Provider>\n </SafeAreaProviderCompat>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n overflow: 'hidden',\n },\n});\n"],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,CAA2B,QAA3B;MAAoC,KAAK,EAAEtB;IAA3C,gBACE,oBAAC,MAAD;MACE,OAAO,EAAEqB,SADX;MAEE,KAAK,EAAEH,UAAU,CAACD,KAFpB;MAGE,UAAU,EAAEC,UAAU,CAACnC,UAHzB;MAIE,WAAW,EAAE0C,WAJf;MAKE,qBAAqB,EAAEC,qBALzB;MAME,iBAAiB,EAAEC,iBANrB;MAOE,MAAM,EAAEJ,MAAM,CAAC;QACbrB,MAAM,EAAEL,UADK;QAEboB,KAAK,EAAEC,UAAU,CAACD,KAFL;QAGblC,UAAU,EACRmC,UAAU,CAACnC,UAJA;QAKbwB,OAAO,EAAEW,UAAU,CAACX;MALP,CAAD,CAPhB;MAcE,KAAK,EAAEnB;IAdT,GAgBG8B,UAAU,CAACY,MAAX,EAhBH,CADF,CAPF,CADF;EA8BD,CA1DA,CALH,CADF,eAkEE,oBAAC,iCAAD,CAAmC,QAAnC;IAA4C,KAAK,EAAE7B;EAAnD,GACGQ,YAAY,EADf,CAlEF,CADF;AAwED;AAED,MAAMK,MAAM,GAAG3C,UAAU,CAAC4D,MAAX,CAAkB;EAC/BhB,SAAS,EAAE;IACTiB,IAAI,EAAE,CADG;IAETC,QAAQ,EAAE;EAFD;AADoB,CAAlB,CAAf"}
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import { ResourceSavingView } from '@react-navigation/elements';
4
4
  import * as React from 'react';
@@ -1 +1 @@
1
- {"version":3,"sources":["ScreenFallback.tsx"],"names":["ResourceSavingView","React","View","Screens","require","e","MaybeScreenContainer","enabled","rest","screensEnabled","MaybeScreen","visible","children"],"mappings":";;AAAA,SAASA,kBAAT,QAAmC,4BAAnC;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAAoBC,IAApB,QAAsD,cAAtD;AASA,IAAIC,OAAJ;;AAEA,IAAI;AACFA,EAAAA,OAAO,GAAGC,OAAO,CAAC,sBAAD,CAAjB;AACD,CAFD,CAEE,OAAOC,CAAP,EAAU,CACV;AACD;;AAED,OAAO,MAAMC,oBAAoB,GAAG,QAO9B;AAAA;;AAAA,MAP+B;AACnCC,IAAAA,OADmC;AAEnC,OAAGC;AAFgC,GAO/B;;AACJ,kBAAIL,OAAJ,8DAAI,SAASM,cAAb,kDAAI,oCAAJ,EAAiC;AAC/B,wBAAO,oBAAC,OAAD,CAAS,eAAT;AAAyB,MAAA,OAAO,EAAEF;AAAlC,OAA+CC,IAA/C,EAAP;AACD;;AAED,sBAAO,oBAAC,IAAD,EAAUA,IAAV,CAAP;AACD,CAbM;AAeP,OAAO,SAASE,WAAT,QAA4D;AAAA;;AAAA,MAAvC;AAAEC,IAAAA,OAAF;AAAWC,IAAAA,QAAX;AAAqB,OAAGJ;AAAxB,GAAuC;;AACjE,mBAAIL,OAAJ,+DAAI,UAASM,cAAb,kDAAI,qCAAJ,EAAiC;AAC/B,wBACE,oBAAC,OAAD,CAAS,MAAT;AAAgB,MAAA,aAAa,EAAEE,OAAO,GAAG,CAAH,GAAO;AAA7C,OAAoDH,IAApD,GACGI,QADH,CADF;AAKD;;AAED,sBACE,oBAAC,kBAAD;AAAoB,IAAA,OAAO,EAAED;AAA7B,KAA0CH,IAA1C,GACGI,QADH,CADF;AAKD","sourcesContent":["import { ResourceSavingView } from '@react-navigation/elements';\nimport * as React from 'react';\nimport { StyleProp, View, ViewProps, ViewStyle } from 'react-native';\n\ntype Props = {\n visible: boolean;\n children: React.ReactNode;\n enabled: boolean;\n style?: StyleProp<ViewStyle>;\n};\n\nlet Screens: typeof import('react-native-screens') | undefined;\n\ntry {\n Screens = require('react-native-screens');\n} catch (e) {\n // Ignore\n}\n\nexport const MaybeScreenContainer = ({\n enabled,\n ...rest\n}: ViewProps & {\n enabled: boolean;\n hasTwoStates: boolean;\n children: React.ReactNode;\n}) => {\n if (Screens?.screensEnabled?.()) {\n return <Screens.ScreenContainer enabled={enabled} {...rest} />;\n }\n\n return <View {...rest} />;\n};\n\nexport function MaybeScreen({ visible, children, ...rest }: Props) {\n if (Screens?.screensEnabled?.()) {\n return (\n <Screens.Screen activityState={visible ? 2 : 0} {...rest}>\n {children}\n </Screens.Screen>\n );\n }\n\n return (\n <ResourceSavingView visible={visible} {...rest}>\n {children}\n </ResourceSavingView>\n );\n}\n"]}
1
+ {"version":3,"names":["ResourceSavingView","React","View","Screens","require","e","MaybeScreenContainer","enabled","rest","screensEnabled","MaybeScreen","visible","children"],"sources":["ScreenFallback.tsx"],"sourcesContent":["import { ResourceSavingView } from '@react-navigation/elements';\nimport * as React from 'react';\nimport { StyleProp, View, ViewProps, ViewStyle } from 'react-native';\n\ntype Props = {\n visible: boolean;\n children: React.ReactNode;\n enabled: boolean;\n freezeOnBlur?: boolean;\n style?: StyleProp<ViewStyle>;\n};\n\nlet Screens: typeof import('react-native-screens') | undefined;\n\ntry {\n Screens = require('react-native-screens');\n} catch (e) {\n // Ignore\n}\n\nexport const MaybeScreenContainer = ({\n enabled,\n ...rest\n}: ViewProps & {\n enabled: boolean;\n hasTwoStates: boolean;\n children: React.ReactNode;\n}) => {\n if (Screens?.screensEnabled?.()) {\n return <Screens.ScreenContainer enabled={enabled} {...rest} />;\n }\n\n return <View {...rest} />;\n};\n\nexport function MaybeScreen({ visible, children, ...rest }: Props) {\n if (Screens?.screensEnabled?.()) {\n return (\n <Screens.Screen activityState={visible ? 2 : 0} {...rest}>\n {children}\n </Screens.Screen>\n );\n }\n\n return (\n <ResourceSavingView visible={visible} {...rest}>\n {children}\n </ResourceSavingView>\n );\n}\n"],"mappings":";;AAAA,SAASA,kBAAT,QAAmC,4BAAnC;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAAoBC,IAApB,QAAsD,cAAtD;AAUA,IAAIC,OAAJ;;AAEA,IAAI;EACFA,OAAO,GAAGC,OAAO,CAAC,sBAAD,CAAjB;AACD,CAFD,CAEE,OAAOC,CAAP,EAAU,CACV;AACD;;AAED,OAAO,MAAMC,oBAAoB,GAAG,QAO9B;EAAA;;EAAA,IAP+B;IACnCC,OADmC;IAEnC,GAAGC;EAFgC,CAO/B;;EACJ,gBAAIL,OAAJ,8DAAI,SAASM,cAAb,kDAAI,oCAAJ,EAAiC;IAC/B,oBAAO,oBAAC,OAAD,CAAS,eAAT;MAAyB,OAAO,EAAEF;IAAlC,GAA+CC,IAA/C,EAAP;EACD;;EAED,oBAAO,oBAAC,IAAD,EAAUA,IAAV,CAAP;AACD,CAbM;AAeP,OAAO,SAASE,WAAT,QAA4D;EAAA;;EAAA,IAAvC;IAAEC,OAAF;IAAWC,QAAX;IAAqB,GAAGJ;EAAxB,CAAuC;;EACjE,iBAAIL,OAAJ,+DAAI,UAASM,cAAb,kDAAI,qCAAJ,EAAiC;IAC/B,oBACE,oBAAC,OAAD,CAAS,MAAT;MAAgB,aAAa,EAAEE,OAAO,GAAG,CAAH,GAAO;IAA7C,GAAoDH,IAApD,GACGI,QADH,CADF;EAKD;;EAED,oBACE,oBAAC,kBAAD;IAAoB,OAAO,EAAED;EAA7B,GAA0CH,IAA1C,GACGI,QADH,CADF;AAKD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TabBarIcon.tsx"],"names":["React","StyleSheet","View","Badge","TabBarIcon","route","_","horizontal","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","style","size","styles","iconHorizontal","iconVertical","icon","opacity","focused","color","badgeHorizontal","badgeVertical","create","position","alignSelf","alignItems","justifyContent","height","width","minWidth","flex","marginTop","left","top"],"mappings":"AACA,OAAOA,KAAP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FT;AAOE,IAAA,IAAI,EAAGO,IAAI,GAAG,CAAR,GAAa;AAPrB,KASGR,KATH,CAjBF,CADF;AA+BD;AAED,MAAMS,MAAM,GAAGhB,UAAU,CAACyB,MAAX,CAAkB;AAC/BN,EAAAA,IAAI,EAAE;AACJ;AACA;AACA;AACAO,IAAAA,QAAQ,EAAE,UAJN;AAKJC,IAAAA,SAAS,EAAE,QALP;AAMJC,IAAAA,UAAU,EAAE,QANR;AAOJC,IAAAA,cAAc,EAAE,QAPZ;AAQJC,IAAAA,MAAM,EAAE,MARJ;AASJC,IAAAA,KAAK,EAAE,MATH;AAUJ;AACAC,IAAAA,QAAQ,EAAE;AAXN,GADyB;AAc/Bd,EAAAA,YAAY,EAAE;AACZe,IAAAA,IAAI,EAAE;AADM,GAdiB;AAiB/BhB,EAAAA,cAAc,EAAE;AACda,IAAAA,MAAM,EAAE,MADM;AAEdI,IAAAA,SAAS,EAAE;AAFG,GAjBe;AAqB/B3B,EAAAA,KAAK,EAAE;AACLmB,IAAAA,QAAQ,EAAE,UADL;AAELS,IAAAA,IAAI,EAAE;AAFD,GArBwB;AAyB/BX,EAAAA,aAAa,EAAE;AACbY,IAAAA,GAAG,EAAE;AADQ,GAzBgB;AA4B/Bb,EAAAA,eAAe,EAAE;AACfa,IAAAA,GAAG,EAAE;AADU;AA5Bc,CAAlB,CAAf","sourcesContent":["import type { Route } from '@react-navigation/native';\nimport React from 'react';\nimport {\n StyleProp,\n StyleSheet,\n TextStyle,\n View,\n ViewStyle,\n} from 'react-native';\n\nimport Badge from './Badge';\n\ntype Props = {\n route: Route<string>;\n horizontal: boolean;\n badge?: string | number;\n badgeStyle?: StyleProp<TextStyle>;\n activeOpacity: number;\n inactiveOpacity: number;\n activeTintColor: string;\n inactiveTintColor: string;\n renderIcon: (props: {\n focused: boolean;\n color: string;\n size: number;\n }) => React.ReactNode;\n style: StyleProp<ViewStyle>;\n};\n\nexport default function TabBarIcon({\n route: _,\n horizontal,\n badge,\n badgeStyle,\n activeOpacity,\n inactiveOpacity,\n activeTintColor,\n inactiveTintColor,\n renderIcon,\n style,\n}: Props) {\n const size = 25;\n\n // We render the icon twice at the same position on top of each other:\n // active and inactive one, so we can fade between them.\n return (\n <View\n style={[horizontal ? styles.iconHorizontal : styles.iconVertical, style]}\n >\n <View style={[styles.icon, { opacity: activeOpacity }]}>\n {renderIcon({\n focused: true,\n size,\n color: activeTintColor,\n })}\n </View>\n <View style={[styles.icon, { opacity: inactiveOpacity }]}>\n {renderIcon({\n focused: false,\n size,\n color: inactiveTintColor,\n })}\n </View>\n <Badge\n visible={badge != null}\n style={[\n styles.badge,\n horizontal ? styles.badgeHorizontal : styles.badgeVertical,\n badgeStyle,\n ]}\n size={(size * 3) / 4}\n >\n {badge}\n </Badge>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n icon: {\n // We render the icon twice at the same position on top of each other:\n // active and inactive one, so we can fade between them:\n // Cover the whole iconContainer:\n position: 'absolute',\n alignSelf: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n width: '100%',\n // Workaround for react-native >= 0.54 layout bug\n minWidth: 25,\n },\n iconVertical: {\n flex: 1,\n },\n iconHorizontal: {\n height: '100%',\n marginTop: 3,\n },\n badge: {\n position: 'absolute',\n left: 3,\n },\n badgeVertical: {\n top: 3,\n },\n badgeHorizontal: {\n top: 7,\n },\n});\n"]}
1
+ {"version":3,"names":["React","StyleSheet","View","Badge","TabBarIcon","route","_","horizontal","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","style","size","styles","iconHorizontal","iconVertical","icon","opacity","focused","color","badgeHorizontal","badgeVertical","create","position","alignSelf","alignItems","justifyContent","height","width","minWidth","flex","marginTop","left","top"],"sources":["TabBarIcon.tsx"],"sourcesContent":["import type { Route } from '@react-navigation/native';\nimport React from 'react';\nimport {\n StyleProp,\n StyleSheet,\n TextStyle,\n View,\n ViewStyle,\n} from 'react-native';\n\nimport Badge from './Badge';\n\ntype Props = {\n route: Route<string>;\n horizontal: boolean;\n badge?: string | number;\n badgeStyle?: StyleProp<TextStyle>;\n activeOpacity: number;\n inactiveOpacity: number;\n activeTintColor: string;\n inactiveTintColor: string;\n renderIcon: (props: {\n focused: boolean;\n color: string;\n size: number;\n }) => React.ReactNode;\n style: StyleProp<ViewStyle>;\n};\n\nexport default function TabBarIcon({\n route: _,\n horizontal,\n badge,\n badgeStyle,\n activeOpacity,\n inactiveOpacity,\n activeTintColor,\n inactiveTintColor,\n renderIcon,\n style,\n}: Props) {\n const size = 25;\n\n // We render the icon twice at the same position on top of each other:\n // active and inactive one, so we can fade between them.\n return (\n <View\n style={[horizontal ? styles.iconHorizontal : styles.iconVertical, style]}\n >\n <View style={[styles.icon, { opacity: activeOpacity }]}>\n {renderIcon({\n focused: true,\n size,\n color: activeTintColor,\n })}\n </View>\n <View style={[styles.icon, { opacity: inactiveOpacity }]}>\n {renderIcon({\n focused: false,\n size,\n color: inactiveTintColor,\n })}\n </View>\n <Badge\n visible={badge != null}\n style={[\n styles.badge,\n horizontal ? styles.badgeHorizontal : styles.badgeVertical,\n badgeStyle,\n ]}\n size={(size * 3) / 4}\n >\n {badge}\n </Badge>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n icon: {\n // We render the icon twice at the same position on top of each other:\n // active and inactive one, so we can fade between them:\n // Cover the whole iconContainer:\n position: 'absolute',\n alignSelf: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n width: '100%',\n // Workaround for react-native >= 0.54 layout bug\n minWidth: 25,\n },\n iconVertical: {\n flex: 1,\n },\n iconHorizontal: {\n height: '100%',\n marginTop: 3,\n },\n badge: {\n position: 'absolute',\n left: 3,\n },\n badgeVertical: {\n top: 3,\n },\n badgeHorizontal: {\n top: 7,\n },\n});\n"],"mappings":"AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAEEC,UAFF,EAIEC,IAJF,QAMO,cANP;AAQA,OAAOC,KAAP,MAAkB,SAAlB;AAmBA,e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EAAE,QAPZ;IAQJC,MAAM,EAAE,MARJ;IASJC,KAAK,EAAE,MATH;IAUJ;IACAC,QAAQ,EAAE;EAXN,CADyB;EAc/Bd,YAAY,EAAE;IACZe,IAAI,EAAE;EADM,CAdiB;EAiB/BhB,cAAc,EAAE;IACda,MAAM,EAAE,MADM;IAEdI,SAAS,EAAE;EAFG,CAjBe;EAqB/B3B,KAAK,EAAE;IACLmB,QAAQ,EAAE,UADL;IAELS,IAAI,EAAE;EAFD,CArBwB;EAyB/BX,aAAa,EAAE;IACbY,GAAG,EAAE;EADQ,CAzBgB;EA4B/Bb,eAAe,EAAE;IACfa,GAAG,EAAE;EADU;AA5Bc,CAAlB,CAAf"}
@@ -172,6 +172,14 @@ export declare type BottomTabNavigationOptions = HeaderOptions & {
172
172
  * Defaults to `false`.
173
173
  */
174
174
  unmountOnBlur?: boolean;
175
+ /**
176
+ * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
177
+ * Defaults to `true` when `enableFreeze()` is run at the top of the application.
178
+ * Requires `react-native-screens` version >=3.16.0.
179
+ *
180
+ * Only supported on iOS and Android.
181
+ */
182
+ freezeOnBlur?: boolean;
175
183
  };
176
184
  export declare type BottomTabDescriptor = Descriptor<BottomTabNavigationOptions, BottomTabNavigationProp<ParamListBase>, RouteProp<ParamListBase>>;
177
185
  export declare type BottomTabDescriptorMap = Record<string, BottomTabDescriptor>;
@@ -4,6 +4,7 @@ declare type Props = {
4
4
  visible: boolean;
5
5
  children: React.ReactNode;
6
6
  enabled: boolean;
7
+ freezeOnBlur?: boolean;
7
8
  style?: StyleProp<ViewStyle>;
8
9
  };
9
10
  export declare const MaybeScreenContainer: ({ enabled, ...rest }: ViewProps & {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-navigation/bottom-tabs",
3
3
  "description": "Bottom tab navigator following iOS design guidelines",
4
- "version": "6.3.3",
4
+ "version": "6.4.1",
5
5
  "keywords": [
6
6
  "react-native-component",
7
7
  "react-component",
@@ -36,22 +36,22 @@
36
36
  "clean": "del lib"
37
37
  },
38
38
  "dependencies": {
39
- "@react-navigation/elements": "^1.3.5",
39
+ "@react-navigation/elements": "^1.3.7",
40
40
  "color": "^4.2.3",
41
41
  "warn-once": "^0.1.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@react-navigation/native": "^6.0.12",
45
- "@testing-library/react-native": "^7.2.0",
44
+ "@react-navigation/native": "^6.0.14",
45
+ "@testing-library/react-native": "^11.5.0",
46
46
  "@types/color": "^3.0.1",
47
- "@types/react": "^17.0.47",
48
- "@types/react-native": "~0.68.1",
47
+ "@types/react": "~18.0.0",
48
+ "@types/react-native": "~0.69.1",
49
49
  "del-cli": "^3.0.1",
50
- "react": "17.0.2",
51
- "react-native": "~0.68.2",
50
+ "react": "18.0.0",
51
+ "react-native": "0.69.5",
52
52
  "react-native-builder-bob": "^0.18.1",
53
- "react-native-safe-area-context": "4.2.4",
54
- "react-native-screens": "~3.11.1",
53
+ "react-native-safe-area-context": "4.3.1",
54
+ "react-native-screens": "~3.15.0",
55
55
  "typescript": "^4.7.4"
56
56
  },
57
57
  "peerDependencies": {
@@ -75,5 +75,5 @@
75
75
  ]
76
76
  ]
77
77
  },
78
- "gitHead": "83aa392f1e13796d609c9df0afa44699ce4bacae"
78
+ "gitHead": "92f9f265d2627a3ef5b3890042d59405ff38401e"
79
79
  }
package/src/types.tsx CHANGED
@@ -244,6 +244,15 @@ export type BottomTabNavigationOptions = HeaderOptions & {
244
244
  * Defaults to `false`.
245
245
  */
246
246
  unmountOnBlur?: boolean;
247
+
248
+ /**
249
+ * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
250
+ * Defaults to `true` when `enableFreeze()` is run at the top of the application.
251
+ * Requires `react-native-screens` version >=3.16.0.
252
+ *
253
+ * Only supported on iOS and Android.
254
+ */
255
+ freezeOnBlur?: boolean;
247
256
  };
248
257
 
249
258
  export type BottomTabDescriptor = Descriptor<
@@ -110,6 +110,7 @@ export default function BottomTabView(props: Props) {
110
110
  }
111
111
 
112
112
  const {
113
+ freezeOnBlur,
113
114
  header = ({ layout, options }: BottomTabHeaderProps) => (
114
115
  <Header
115
116
  {...options}
@@ -117,6 +118,9 @@ export default function BottomTabView(props: Props) {
117
118
  title={getHeaderTitle(options, route.name)}
118
119
  />
119
120
  ),
121
+ headerShown,
122
+ headerStatusBarHeight,
123
+ headerTransparent,
120
124
  } = descriptor.options;
121
125
 
122
126
  return (
@@ -125,17 +129,16 @@ export default function BottomTabView(props: Props) {
125
129
  style={[StyleSheet.absoluteFill, { zIndex: isFocused ? 0 : -1 }]}
126
130
  visible={isFocused}
127
131
  enabled={detachInactiveScreens}
132
+ freezeOnBlur={freezeOnBlur}
128
133
  >
129
134
  <BottomTabBarHeightContext.Provider value={tabBarHeight}>
130
135
  <Screen
131
136
  focused={isFocused}
132
137
  route={descriptor.route}
133
138
  navigation={descriptor.navigation}
134
- headerShown={descriptor.options.headerShown}
135
- headerTransparent={descriptor.options.headerTransparent}
136
- headerStatusBarHeight={
137
- descriptor.options.headerStatusBarHeight
138
- }
139
+ headerShown={headerShown}
140
+ headerStatusBarHeight={headerStatusBarHeight}
141
+ headerTransparent={headerTransparent}
139
142
  header={header({
140
143
  layout: dimensions,
141
144
  route: descriptor.route,
@@ -6,6 +6,7 @@ type Props = {
6
6
  visible: boolean;
7
7
  children: React.ReactNode;
8
8
  enabled: boolean;
9
+ freezeOnBlur?: boolean;
9
10
  style?: StyleProp<ViewStyle>;
10
11
  };
11
12