@react-navigation/bottom-tabs 6.4.3 → 6.5.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 (79) hide show
  1. package/lib/commonjs/index.js +0 -7
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/navigators/createBottomTabNavigator.js +1 -17
  4. package/lib/commonjs/navigators/createBottomTabNavigator.js.map +1 -1
  5. package/lib/commonjs/types.js.map +1 -1
  6. package/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js +0 -5
  7. package/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js.map +1 -1
  8. package/lib/commonjs/utils/BottomTabBarHeightContext.js +0 -5
  9. package/lib/commonjs/utils/BottomTabBarHeightContext.js.map +1 -1
  10. package/lib/commonjs/utils/useBottomTabBarHeight.js +2 -10
  11. package/lib/commonjs/utils/useBottomTabBarHeight.js.map +1 -1
  12. package/lib/commonjs/utils/useIsKeyboardShown.js +0 -9
  13. package/lib/commonjs/utils/useIsKeyboardShown.js.map +1 -1
  14. package/lib/commonjs/views/Badge.js +2 -16
  15. package/lib/commonjs/views/Badge.js.map +1 -1
  16. package/lib/commonjs/views/BottomTabBar.js +5 -51
  17. package/lib/commonjs/views/BottomTabBar.js.map +1 -1
  18. package/lib/commonjs/views/BottomTabItem.js +9 -21
  19. package/lib/commonjs/views/BottomTabItem.js.map +1 -1
  20. package/lib/commonjs/views/BottomTabView.js +15 -39
  21. package/lib/commonjs/views/BottomTabView.js.map +1 -1
  22. package/lib/commonjs/views/ScreenFallback.js +2 -18
  23. package/lib/commonjs/views/ScreenFallback.js.map +1 -1
  24. package/lib/commonjs/views/TabBarIcon.js +3 -8
  25. package/lib/commonjs/views/TabBarIcon.js.map +1 -1
  26. package/lib/module/index.js +3 -2
  27. package/lib/module/index.js.map +1 -1
  28. package/lib/module/navigators/createBottomTabNavigator.js +1 -9
  29. package/lib/module/navigators/createBottomTabNavigator.js.map +1 -1
  30. package/lib/module/types.js.map +1 -1
  31. package/lib/module/utils/BottomTabBarHeightCallbackContext.js.map +1 -1
  32. package/lib/module/utils/BottomTabBarHeightContext.js.map +1 -1
  33. package/lib/module/utils/useBottomTabBarHeight.js +1 -3
  34. package/lib/module/utils/useBottomTabBarHeight.js.map +1 -1
  35. package/lib/module/utils/useIsKeyboardShown.js +0 -4
  36. package/lib/module/utils/useIsKeyboardShown.js.map +1 -1
  37. package/lib/module/views/Badge.js +2 -6
  38. package/lib/module/views/Badge.js.map +1 -1
  39. package/lib/module/views/BottomTabBar.js +5 -29
  40. package/lib/module/views/BottomTabBar.js.map +1 -1
  41. package/lib/module/views/BottomTabItem.js +9 -13
  42. package/lib/module/views/BottomTabItem.js.map +1 -1
  43. package/lib/module/views/BottomTabView.js +15 -26
  44. package/lib/module/views/BottomTabView.js.map +1 -1
  45. package/lib/module/views/ScreenFallback.js +2 -10
  46. package/lib/module/views/ScreenFallback.js.map +1 -1
  47. package/lib/module/views/TabBarIcon.js +3 -2
  48. package/lib/module/views/TabBarIcon.js.map +1 -1
  49. package/lib/typescript/src/index.d.ts +1 -0
  50. package/lib/typescript/src/index.d.ts.map +1 -0
  51. package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts +1 -0
  52. package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map +1 -0
  53. package/lib/typescript/src/types.d.ts +3 -1
  54. package/lib/typescript/src/types.d.ts.map +1 -0
  55. package/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts +1 -0
  56. package/lib/typescript/src/utils/BottomTabBarHeightCallbackContext.d.ts.map +1 -0
  57. package/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts +1 -0
  58. package/lib/typescript/src/utils/BottomTabBarHeightContext.d.ts.map +1 -0
  59. package/lib/typescript/src/utils/useBottomTabBarHeight.d.ts +2 -1
  60. package/lib/typescript/src/utils/useBottomTabBarHeight.d.ts.map +1 -0
  61. package/lib/typescript/src/utils/useIsKeyboardShown.d.ts +1 -0
  62. package/lib/typescript/src/utils/useIsKeyboardShown.d.ts.map +1 -0
  63. package/lib/typescript/src/views/Badge.d.ts +1 -0
  64. package/lib/typescript/src/views/Badge.d.ts.map +1 -0
  65. package/lib/typescript/src/views/BottomTabBar.d.ts +1 -0
  66. package/lib/typescript/src/views/BottomTabBar.d.ts.map +1 -0
  67. package/lib/typescript/src/views/BottomTabItem.d.ts +8 -2
  68. package/lib/typescript/src/views/BottomTabItem.d.ts.map +1 -0
  69. package/lib/typescript/src/views/BottomTabView.d.ts +1 -0
  70. package/lib/typescript/src/views/BottomTabView.d.ts.map +1 -0
  71. package/lib/typescript/src/views/ScreenFallback.d.ts +1 -0
  72. package/lib/typescript/src/views/ScreenFallback.d.ts.map +1 -0
  73. package/lib/typescript/src/views/TabBarIcon.d.ts +1 -0
  74. package/lib/typescript/src/views/TabBarIcon.d.ts.map +1 -0
  75. package/package.json +5 -5
  76. package/src/types.tsx +2 -1
  77. package/src/utils/useBottomTabBarHeight.tsx +1 -1
  78. package/src/views/BottomTabBar.tsx +1 -0
  79. package/src/views/BottomTabItem.tsx +20 -1
@@ -1,10 +1,8 @@
1
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
-
3
2
  import { createNavigatorFactory, TabRouter, useNavigationBuilder } from '@react-navigation/native';
4
3
  import * as React from 'react';
5
4
  import warnOnce from 'warn-once';
6
5
  import BottomTabView from '../views/BottomTabView';
7
-
8
6
  function BottomTabNavigator(_ref) {
9
7
  let {
10
8
  id,
@@ -24,10 +22,7 @@ function BottomTabNavigator(_ref) {
24
22
  ...rest
25
23
  } = restWithDeprecated;
26
24
  let defaultScreenOptions = {};
27
-
28
25
  if (tabBarOptions) {
29
- var _tabBarOptions$labelP;
30
-
31
26
  Object.assign(defaultScreenOptions, {
32
27
  tabBarHideOnKeyboard: tabBarOptions.keyboardHidesTabBar,
33
28
  tabBarActiveTintColor: tabBarOptions.activeTintColor,
@@ -39,7 +34,7 @@ function BottomTabNavigator(_ref) {
39
34
  tabBarLabelStyle: tabBarOptions.labelStyle,
40
35
  tabBarIconStyle: tabBarOptions.iconStyle,
41
36
  tabBarItemStyle: tabBarOptions.tabStyle,
42
- tabBarLabelPosition: (_tabBarOptions$labelP = tabBarOptions.labelPosition) !== null && _tabBarOptions$labelP !== void 0 ? _tabBarOptions$labelP : tabBarOptions.adaptive === false ? 'below-icon' : undefined,
37
+ tabBarLabelPosition: tabBarOptions.labelPosition ?? (tabBarOptions.adaptive === false ? 'below-icon' : undefined),
43
38
  tabBarStyle: [{
44
39
  display: tabBarOptions.tabBarVisible ? 'none' : 'flex'
45
40
  }, defaultScreenOptions.tabBarStyle]
@@ -52,12 +47,10 @@ function BottomTabNavigator(_ref) {
52
47
  });
53
48
  warnOnce(tabBarOptions, `Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(defaultScreenOptions, null, 2)}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`);
54
49
  }
55
-
56
50
  if (typeof lazy === 'boolean') {
57
51
  defaultScreenOptions.lazy = lazy;
58
52
  warnOnce(true, `Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details.`);
59
53
  }
60
-
61
54
  const {
62
55
  state,
63
56
  descriptors,
@@ -79,6 +72,5 @@ function BottomTabNavigator(_ref) {
79
72
  sceneContainerStyle: sceneContainerStyle
80
73
  })));
81
74
  }
82
-
83
75
  export default createNavigatorFactory(BottomTabNavigator);
84
76
  //# sourceMappingURL=createBottomTabNavigator.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createNavigatorFactory","TabRouter","useNavigationBuilder","React","warnOnce","BottomTabView","BottomTabNavigator","id","initialRouteName","backBehavior","children","screenListeners","screenOptions","sceneContainerStyle","restWithDeprecated","lazy","tabBarOptions","rest","defaultScreenOptions","Object","assign","tabBarHideOnKeyboard","keyboardHidesTabBar","tabBarActiveTintColor","activeTintColor","tabBarInactiveTintColor","inactiveTintColor","tabBarActiveBackgroundColor","activeBackgroundColor","tabBarInactiveBackgroundColor","inactiveBackgroundColor","tabBarAllowFontScaling","allowFontScaling","tabBarShowLabel","showLabel","tabBarLabelStyle","labelStyle","tabBarIconStyle","iconStyle","tabBarItemStyle","tabStyle","tabBarLabelPosition","labelPosition","adaptive","undefined","tabBarStyle","display","tabBarVisible","keys","forEach","key","JSON","stringify","state","descriptors","navigation","NavigationContent"],"sources":["createBottomTabNavigator.tsx"],"sourcesContent":["import {\n createNavigatorFactory,\n DefaultNavigatorOptions,\n ParamListBase,\n TabActionHelpers,\n TabNavigationState,\n TabRouter,\n TabRouterOptions,\n useNavigationBuilder,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport warnOnce from 'warn-once';\n\nimport type {\n BottomTabNavigationConfig,\n BottomTabNavigationEventMap,\n BottomTabNavigationOptions,\n} from '../types';\nimport BottomTabView from '../views/BottomTabView';\n\ntype Props = DefaultNavigatorOptions<\n ParamListBase,\n TabNavigationState<ParamListBase>,\n BottomTabNavigationOptions,\n BottomTabNavigationEventMap\n> &\n TabRouterOptions &\n BottomTabNavigationConfig;\n\nfunction BottomTabNavigator({\n id,\n initialRouteName,\n backBehavior,\n children,\n screenListeners,\n screenOptions,\n sceneContainerStyle,\n ...restWithDeprecated\n}: Props) {\n const {\n // @ts-expect-error: lazy is deprecated\n lazy,\n // @ts-expect-error: tabBarOptions is deprecated\n tabBarOptions,\n ...rest\n } = restWithDeprecated;\n\n let defaultScreenOptions: BottomTabNavigationOptions = {};\n\n if (tabBarOptions) {\n Object.assign(defaultScreenOptions, {\n tabBarHideOnKeyboard: tabBarOptions.keyboardHidesTabBar,\n tabBarActiveTintColor: tabBarOptions.activeTintColor,\n tabBarInactiveTintColor: tabBarOptions.inactiveTintColor,\n tabBarActiveBackgroundColor: tabBarOptions.activeBackgroundColor,\n tabBarInactiveBackgroundColor: tabBarOptions.inactiveBackgroundColor,\n tabBarAllowFontScaling: tabBarOptions.allowFontScaling,\n tabBarShowLabel: tabBarOptions.showLabel,\n tabBarLabelStyle: tabBarOptions.labelStyle,\n tabBarIconStyle: tabBarOptions.iconStyle,\n tabBarItemStyle: tabBarOptions.tabStyle,\n tabBarLabelPosition:\n tabBarOptions.labelPosition ??\n (tabBarOptions.adaptive === false ? 'below-icon' : undefined),\n tabBarStyle: [\n { display: tabBarOptions.tabBarVisible ? 'none' : 'flex' },\n defaultScreenOptions.tabBarStyle,\n ],\n });\n\n (\n Object.keys(defaultScreenOptions) as (keyof BottomTabNavigationOptions)[]\n ).forEach((key) => {\n if (defaultScreenOptions[key] === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete defaultScreenOptions[key];\n }\n });\n\n warnOnce(\n tabBarOptions,\n `Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\\n\\nPlace the following in 'screenOptions' in your code to keep current behavior:\\n\\n${JSON.stringify(\n defaultScreenOptions,\n null,\n 2\n )}\\n\\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`\n );\n }\n\n if (typeof lazy === 'boolean') {\n defaultScreenOptions.lazy = lazy;\n\n warnOnce(\n true,\n `Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\\n\\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details.`\n );\n }\n\n const { state, descriptors, navigation, NavigationContent } =\n useNavigationBuilder<\n TabNavigationState<ParamListBase>,\n TabRouterOptions,\n TabActionHelpers<ParamListBase>,\n BottomTabNavigationOptions,\n BottomTabNavigationEventMap\n >(TabRouter, {\n id,\n initialRouteName,\n backBehavior,\n children,\n screenListeners,\n screenOptions,\n defaultScreenOptions,\n });\n\n return (\n <NavigationContent>\n <BottomTabView\n {...rest}\n state={state}\n navigation={navigation}\n descriptors={descriptors}\n sceneContainerStyle={sceneContainerStyle}\n />\n </NavigationContent>\n );\n}\n\nexport default createNavigatorFactory<\n TabNavigationState<ParamListBase>,\n BottomTabNavigationOptions,\n BottomTabNavigationEventMap,\n typeof BottomTabNavigator\n>(BottomTabNavigator);\n"],"mappings":";;AAAA,SACEA,sBADF,EAMEC,SANF,EAQEC,oBARF,QASO,0BATP;AAUA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,QAAP,MAAqB,WAArB;AAOA,OAAOC,aAAP,MAA0B,wBAA1B;;AAWA,SAASC,kBAAT,OASU;EAAA,IATkB;IAC1BC,EAD0B;IAE1BC,gBAF0B;IAG1BC,YAH0B;IAI1BC,QAJ0B;IAK1BC,eAL0B;IAM1BC,aAN0B;IAO1BC,mBAP0B;IAQ1B,GAAGC;EARuB,CASlB;EACR,MAAM;IACJ;IACAC,IAFI;IAGJ;IACAC,aAJI;IAKJ,GAAGC;EALC,IAMFH,kBANJ;EAQA,IAAII,oBAAgD,GAAG,EAAvD;;EAEA,IAAIF,aAAJ,EAAmB;IAAA;;IACjBG,MAAM,CAACC,MAAP,CAAcF,oBAAd,EAAoC;MAClCG,oBAAoB,EAAEL,aAAa,CAACM,mBADF;MAElCC,qBAAqB,EAAEP,aAAa,CAACQ,eAFH;MAGlCC,uBAAuB,EAAET,aAAa,CAACU,iBAHL;MAIlCC,2BAA2B,EAAEX,aAAa,CAACY,qBAJT;MAKlCC,6BAA6B,EAAEb,aAAa,CAACc,uBALX;MAMlCC,sBAAsB,EAAEf,aAAa,CAACgB,gBANJ;MAOlCC,eAAe,EAAEjB,aAAa,CAACkB,SAPG;MAQlCC,gBAAgB,EAAEnB,aAAa,CAACoB,UARE;MASlCC,eAAe,EAAErB,aAAa,CAACsB,SATG;MAUlCC,eAAe,EAAEvB,aAAa,CAACwB,QAVG;MAWlCC,mBAAmB,2BACjBzB,aAAa,CAAC0B,aADG,yEAEhB1B,aAAa,CAAC2B,QAAd,KAA2B,KAA3B,GAAmC,YAAnC,GAAkDC,SAbnB;MAclCC,WAAW,EAAE,CACX;QAAEC,OAAO,EAAE9B,aAAa,CAAC+B,aAAd,GAA8B,MAA9B,GAAuC;MAAlD,CADW,EAEX7B,oBAAoB,CAAC2B,WAFV;IAdqB,CAApC;IAqBE1B,MAAM,CAAC6B,IAAP,CAAY9B,oBAAZ,CADF,CAEE+B,OAFF,CAEWC,GAAD,IAAS;MACjB,IAAIhC,oBAAoB,CAACgC,GAAD,CAApB,KAA8BN,SAAlC,EAA6C;QAC3C;QACA,OAAO1B,oBAAoB,CAACgC,GAAD,CAA3B;MACD;IACF,CAPD;IASA9C,QAAQ,CACNY,aADM,EAEL,4LAA2LmC,IAAI,CAACC,SAAL,CAC1LlC,oBAD0L,EAE1L,IAF0L,EAG1L,CAH0L,CAI1L,yFANI,CAAR;EAQD;;EAED,IAAI,OAAOH,IAAP,KAAgB,SAApB,EAA+B;IAC7BG,oBAAoB,CAACH,IAArB,GAA4BA,IAA5B;IAEAX,QAAQ,CACN,IADM,EAEL,+KAFK,CAAR;EAID;;EAED,MAAM;IAAEiD,KAAF;IAASC,WAAT;IAAsBC,UAAtB;IAAkCC;EAAlC,IACJtD,oBAAoB,CAMlBD,SANkB,EAMP;IACXM,EADW;IAEXC,gBAFW;IAGXC,YAHW;IAIXC,QAJW;IAKXC,eALW;IAMXC,aANW;IAOXM;EAPW,CANO,CADtB;EAiBA,oBACE,oBAAC,iBAAD,qBACE,oBAAC,aAAD,eACMD,IADN;IAEE,KAAK,EAAEoC,KAFT;IAGE,UAAU,EAAEE,UAHd;IAIE,WAAW,EAAED,WAJf;IAKE,mBAAmB,EAAEzC;EALvB,GADF,CADF;AAWD;;AAED,eAAeb,sBAAsB,CAKnCM,kBALmC,CAArC"}
1
+ {"version":3,"names":["createNavigatorFactory","TabRouter","useNavigationBuilder","React","warnOnce","BottomTabView","BottomTabNavigator","id","initialRouteName","backBehavior","children","screenListeners","screenOptions","sceneContainerStyle","restWithDeprecated","lazy","tabBarOptions","rest","defaultScreenOptions","Object","assign","tabBarHideOnKeyboard","keyboardHidesTabBar","tabBarActiveTintColor","activeTintColor","tabBarInactiveTintColor","inactiveTintColor","tabBarActiveBackgroundColor","activeBackgroundColor","tabBarInactiveBackgroundColor","inactiveBackgroundColor","tabBarAllowFontScaling","allowFontScaling","tabBarShowLabel","showLabel","tabBarLabelStyle","labelStyle","tabBarIconStyle","iconStyle","tabBarItemStyle","tabStyle","tabBarLabelPosition","labelPosition","adaptive","undefined","tabBarStyle","display","tabBarVisible","keys","forEach","key","JSON","stringify","state","descriptors","navigation","NavigationContent"],"sourceRoot":"../../src","sources":["createBottomTabNavigator.tsx"],"mappings":";AAAA,SACEA,sBAAsB,EAKtBC,SAAS,EAETC,oBAAoB,QACf,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,QAAQ,MAAM,WAAW;AAOhC,OAAOC,aAAa,MAAM,wBAAwB;AAWlD,SAASC,kBAAkB,OASjB;EAAA,IATkB;IAC1BC,EAAE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbC,mBAAmB;IACnB,GAAGC;EACE,CAAC;EACN,MAAM;IACJ;IACAC,IAAI;IACJ;IACAC,aAAa;IACb,GAAGC;EACL,CAAC,GAAGH,kBAAkB;EAEtB,IAAII,oBAAgD,GAAG,CAAC,CAAC;EAEzD,IAAIF,aAAa,EAAE;IACjBG,MAAM,CAACC,MAAM,CAACF,oBAAoB,EAAE;MAClCG,oBAAoB,EAAEL,aAAa,CAACM,mBAAmB;MACvDC,qBAAqB,EAAEP,aAAa,CAACQ,eAAe;MACpDC,uBAAuB,EAAET,aAAa,CAACU,iBAAiB;MACxDC,2BAA2B,EAAEX,aAAa,CAACY,qBAAqB;MAChEC,6BAA6B,EAAEb,aAAa,CAACc,uBAAuB;MACpEC,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KAAK,EAAEoC,KAAM;IACb,UAAU,EAAEE,UAAW;IACvB,WAAW,EAAED,WAAY;IACzB,mBAAmB,EAAEzC;EAAoB,GACzC,CACgB;AAExB;AAEA,eAAeb,sBAAsB,CAKnCM,kBAAkB,CAAC"}
@@ -1 +1 @@
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
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""}
@@ -1 +1 @@
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
+ {"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightCallbackContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,4BAAeA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV"}
@@ -1 +1 @@
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
+ {"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,4BAAeA,KAAK,CAACC,aAAa,CAAqBC,SAAS,CAAC"}
@@ -1,12 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import BottomTabBarHeightContext from './BottomTabBarHeightContext';
3
- export default function useFloatingBottomTabBarHeight() {
3
+ export default function useBottomTabBarHeight() {
4
4
  const height = React.useContext(BottomTabBarHeightContext);
5
-
6
5
  if (height === undefined) {
7
6
  throw new Error("Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?");
8
7
  }
9
-
10
8
  return height;
11
9
  }
12
10
  //# sourceMappingURL=useBottomTabBarHeight.js.map
@@ -1 +1 @@
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
+ {"version":3,"names":["React","BottomTabBarHeightContext","useBottomTabBarHeight","height","useContext","undefined","Error"],"sourceRoot":"../../src","sources":["useBottomTabBarHeight.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,yBAAyB,MAAM,6BAA6B;AAEnE,eAAe,SAASC,qBAAqB,GAAG;EAC9C,MAAMC,MAAM,GAAGH,KAAK,CAACI,UAAU,CAACH,yBAAyB,CAAC;EAE1D,IAAIE,MAAM,KAAKE,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,2FAA2F,CAC5F;EACH;EAEA,OAAOH,MAAM;AACf"}
@@ -4,17 +4,13 @@ export default function useIsKeyboardShown() {
4
4
  const [isKeyboardShown, setIsKeyboardShown] = React.useState(false);
5
5
  React.useEffect(() => {
6
6
  const handleKeyboardShow = () => setIsKeyboardShown(true);
7
-
8
7
  const handleKeyboardHide = () => setIsKeyboardShown(false);
9
-
10
8
  let subscriptions;
11
-
12
9
  if (Platform.OS === 'ios') {
13
10
  subscriptions = [Keyboard.addListener('keyboardWillShow', handleKeyboardShow), Keyboard.addListener('keyboardWillHide', handleKeyboardHide)];
14
11
  } else {
15
12
  subscriptions = [Keyboard.addListener('keyboardDidShow', handleKeyboardShow), Keyboard.addListener('keyboardDidHide', handleKeyboardHide)];
16
13
  }
17
-
18
14
  return () => {
19
15
  subscriptions.forEach(s => s.remove());
20
16
  };
@@ -1 +1 @@
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
+ {"version":3,"names":["React","Keyboard","Platform","useIsKeyboardShown","isKeyboardShown","setIsKeyboardShown","useState","useEffect","handleKeyboardShow","handleKeyboardHide","subscriptions","OS","addListener","forEach","s","remove"],"sourceRoot":"../../src","sources":["useIsKeyboardShown.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAA8BC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAEtE,eAAe,SAASC,kBAAkB,GAAG;EAC3C,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGL,KAAK,CAACM,QAAQ,CAAC,KAAK,CAAC;EAEnEN,KAAK,CAACO,SAAS,CAAC,MAAM;IACpB,MAAMC,kBAAkB,GAAG,MAAMH,kBAAkB,CAAC,IAAI,CAAC;IACzD,MAAMI,kBAAkB,GAAG,MAAMJ,kBAAkB,CAAC,KAAK,CAAC;IAE1D,IAAIK,aAAoC;IAExC,IAAIR,QAAQ,CAACS,EAAE,KAAK,KAAK,EAAE;MACzBD,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAW,CAAC,kBAAkB,EAAEJ,kBAAkB,CAAC,EAC5DP,QAAQ,CAACW,WAAW,CAAC,kBAAkB,EAAEH,kBAAkB,CAAC,CAC7D;IACH,CAAC,MAAM;MACLC,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAW,CAAC,iBAAiB,EAAEJ,kBAAkB,CAAC,EAC3DP,QAAQ,CAACW,WAAW,CAAC,iBAAiB,EAAEH,kBAAkB,CAAC,CAC5D;IACH;IAEA,OAAO,MAAM;MACXC,aAAa,CAACG,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAACC,MAAM,EAAE,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOX,eAAe;AACxB"}
@@ -1,5 +1,4 @@
1
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
-
3
2
  import { useTheme } from '@react-navigation/native';
4
3
  import color from 'color';
5
4
  import * as React from 'react';
@@ -19,7 +18,6 @@ export default function Badge(_ref) {
19
18
  if (!rendered) {
20
19
  return;
21
20
  }
22
-
23
21
  Animated.timing(opacity, {
24
22
  toValue: visible ? 1 : 0,
25
23
  duration: 150,
@@ -28,23 +26,21 @@ export default function Badge(_ref) {
28
26
  let {
29
27
  finished
30
28
  } = _ref2;
31
-
32
29
  if (finished && !visible) {
33
30
  setRendered(false);
34
31
  }
35
32
  });
36
33
  return () => opacity.stopAnimation();
37
34
  }, [opacity, rendered, visible]);
38
-
39
35
  if (!rendered) {
40
36
  if (visible) {
41
37
  setRendered(true);
42
38
  } else {
43
39
  return null;
44
40
  }
45
- } // @ts-expect-error: backgroundColor definitely exists
46
-
41
+ }
47
42
 
43
+ // @ts-expect-error: backgroundColor definitely exists
48
44
  const {
49
45
  backgroundColor = theme.colors.notification,
50
46
  ...restStyle
@@ -1 +1 @@
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;IACD;;IAEDX,QAAQ,CAACe,MAAT,CAAgBP,OAAhB,EAAyB;MACvBQ,OAAO,EAAEX,OAAO,GAAG,CAAH,GAAO,CADA;MAEvBY,QAAQ,EAAE,GAFa;MAGvBC,eAAe,EAAE;IAHM,CAAzB,EAIGC,KAJH,CAIS,SAAkB;MAAA,IAAjB;QAAEC;MAAF,CAAiB;;MACzB,IAAIA,QA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BMlB,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
+ {"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"],"sourceRoot":"../../src","sources":["Badge.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAaC,UAAU,QAAmB,cAAc;AAqBzE,eAAe,SAASC,KAAK,OAMnB;EAAA,IANoB;IAC5BC,QAAQ;IACRC,KAAK;IACLC,OAAO,GAAG,IAAI;IACdC,IAAI,GAAG,EAAE;IACT,GAAGC;EACE,CAAC;EACN,MAAM,CAACC,OAAO,CAAC,GAAGT,KAAK,CAACU,QAAQ,CAAC,MAAM,IAAIT,QAAQ,CAACU,KAAK,CAACL,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;EAC3E,MAAM,CAACM,QAAQ,EAAEC,WAAW,CAAC,GAAGb,KAAK,CAACU,QAAQ,CAACJ,OAAO,CAAC;EAEvD,MAAMQ,KAAK,GAAGhB,QAAQ,EAAE;EAExBE,KAAK,CAACe,SAAS,CAAC,MAAM;IACpB,IAAI,CAACH,QAAQ,EAAE;MACb;IACF;IAEAX,QAAQ,CAACe,MAAM,CAACP,OAAO,E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,EAAEhC,IAAI,GAAG,CAAC;MACpBiC,MAAM,EAAEjC,IAAI;MACZkC,QAAQ,EAAElC,IAAI;MACdE,OAAO;MACPc,eAAe;MACfQ,QAAQ;MACRD;IACF,CAAC,EACDY,MAAM,CAACC,SAAS,EAChBjB,SAAS;EACT,GACElB,IAAI,GAEPJ,QAAQ,CACK;AAEpB;AAEA,MAAMsC,MAAM,GAAGxC,UAAU,CAAC0C,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,SAAS,EAAE,UAAU;IACrBC,SAAS,EAAE,QAAQ;IACnBC,iBAAiB,EAAE,CAAC;IACpBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"}
@@ -10,7 +10,6 @@ const DEFAULT_TABBAR_HEIGHT = 49;
10
10
  const COMPACT_TABBAR_HEIGHT = 32;
11
11
  const DEFAULT_MAX_TAB_ITEM_WIDTH = 125;
12
12
  const useNativeDriver = Platform.OS !== 'web';
13
-
14
13
  const shouldUseHorizontalLabels = _ref => {
15
14
  let {
16
15
  state,
@@ -21,17 +20,14 @@ const shouldUseHorizontalLabels = _ref => {
21
20
  const {
22
21
  tabBarLabelPosition
23
22
  } = descriptors[state.routes[state.index].key].options;
24
-
25
23
  if (tabBarLabelPosition) {
26
24
  switch (tabBarLabelPosition) {
27
25
  case 'beside-icon':
28
26
  return true;
29
-
30
27
  case 'below-icon':
31
28
  return false;
32
29
  }
33
30
  }
34
-
35
31
  if (layout.width >= 768) {
36
32
  // Screen size matches a tablet
37
33
  const maxTabWidth = state.routes.reduce((acc, route) => {
@@ -39,7 +35,6 @@ const shouldUseHorizontalLabels = _ref => {
39
35
  tabBarItemStyle
40
36
  } = descriptors[route.key].options;
41
37
  const flattenedStyle = StyleSheet.flatten(tabBarItemStyle);
42
-
43
38
  if (flattenedStyle) {
44
39
  if (typeof flattenedStyle.width === 'number') {
45
40
  return acc + flattenedStyle.width;
@@ -47,7 +42,6 @@ const shouldUseHorizontalLabels = _ref => {
47
42
  return acc + flattenedStyle.maxWidth;
48
43
  }
49
44
  }
50
-
51
45
  return acc + DEFAULT_MAX_TAB_ITEM_WIDTH;
52
46
  }, 0);
53
47
  return maxTabWidth <= layout.width;
@@ -55,15 +49,12 @@ const shouldUseHorizontalLabels = _ref => {
55
49
  return dimensions.width > dimensions.height;
56
50
  }
57
51
  };
58
-
59
52
  const getPaddingBottom = insets => Math.max(insets.bottom - Platform.select({
60
53
  ios: 4,
61
54
  default: 0
62
55
  }), 0);
63
-
64
56
  export const getTabBarHeight = _ref2 => {
65
57
  var _StyleSheet$flatten;
66
-
67
58
  let {
68
59
  state,
69
60
  descriptors,
@@ -74,11 +65,9 @@ export const getTabBarHeight = _ref2 => {
74
65
  } = _ref2;
75
66
  // @ts-ignore
76
67
  const customHeight = (_StyleSheet$flatten = StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.height;
77
-
78
68
  if (typeof customHeight === 'number') {
79
69
  return customHeight;
80
70
  }
81
-
82
71
  const isLandscape = dimensions.width > dimensions.height;
83
72
  const horizontalLabels = shouldUseHorizontalLabels({
84
73
  state,
@@ -87,11 +76,9 @@ export const getTabBarHeight = _ref2 => {
87
76
  ...rest
88
77
  });
89
78
  const paddingBottom = getPaddingBottom(insets);
90
-
91
79
  if (Platform.OS === 'ios' && !Platform.isPad && isLandscape && horizontalLabels) {
92
80
  return COMPACT_TABBAR_HEIGHT + paddingBottom;
93
81
  }
94
-
95
82
  return DEFAULT_TABBAR_HEIGHT + paddingBottom;
96
83
  };
97
84
  export default function BottomTabBar(_ref3) {
@@ -132,10 +119,8 @@ export default function BottomTabBar(_ref3) {
132
119
  const [visible] = React.useState(() => new Animated.Value(shouldShowTabBar ? 1 : 0));
133
120
  React.useEffect(() => {
134
121
  const visibilityAnimationConfig = visibilityAnimationConfigRef.current;
135
-
136
122
  if (shouldShowTabBar) {
137
123
  var _visibilityAnimationC, _visibilityAnimationC2;
138
-
139
124
  const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC = visibilityAnimationConfig.show) === null || _visibilityAnimationC === void 0 ? void 0 : _visibilityAnimationC.animation) === 'spring' ? Animated.spring : Animated.timing;
140
125
  animation(visible, {
141
126
  toValue: 1,
@@ -146,14 +131,12 @@ export default function BottomTabBar(_ref3) {
146
131
  let {
147
132
  finished
148
133
  } = _ref4;
149
-
150
134
  if (finished) {
151
135
  setIsTabBarHidden(false);
152
136
  }
153
137
  });
154
138
  } else {
155
139
  var _visibilityAnimationC3, _visibilityAnimationC4;
156
-
157
140
  setIsTabBarHidden(true);
158
141
  const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC3 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC3 === void 0 ? void 0 : _visibilityAnimationC3.animation) === 'spring' ? Animated.spring : Animated.timing;
159
142
  animation(visible, {
@@ -163,14 +146,12 @@ export default function BottomTabBar(_ref3) {
163
146
  ...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC4 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC4 === void 0 ? void 0 : _visibilityAnimationC4.config)
164
147
  }).start();
165
148
  }
166
-
167
149
  return () => visible.stopAnimation();
168
150
  }, [visible, shouldShowTabBar]);
169
151
  const [layout, setLayout] = React.useState({
170
152
  height: 0,
171
153
  width: dimensions.width
172
154
  });
173
-
174
155
  const handleLayout = e => {
175
156
  const {
176
157
  height,
@@ -188,7 +169,6 @@ export default function BottomTabBar(_ref3) {
188
169
  }
189
170
  });
190
171
  };
191
-
192
172
  const {
193
173
  routes
194
174
  } = state;
@@ -236,22 +216,19 @@ export default function BottomTabBar(_ref3) {
236
216
  accessibilityRole: "tablist",
237
217
  style: styles.content
238
218
  }, routes.map((route, index) => {
239
- var _options$tabBarIcon;
240
-
241
219
  const focused = index === state.index;
242
220
  const {
243
221
  options
244
222
  } = descriptors[route.key];
245
-
246
223
  const onPress = () => {
247
224
  const event = navigation.emit({
248
225
  type: 'tabPress',
249
226
  target: route.key,
250
227
  canPreventDefault: true
251
228
  });
252
-
253
229
  if (!focused && !event.defaultPrevented) {
254
- navigation.dispatch({ ...CommonActions.navigate({
230
+ navigation.dispatch({
231
+ ...CommonActions.navigate({
255
232
  name: route.name,
256
233
  merge: true
257
234
  }),
@@ -259,14 +236,12 @@ export default function BottomTabBar(_ref3) {
259
236
  });
260
237
  }
261
238
  };
262
-
263
239
  const onLongPress = () => {
264
240
  navigation.emit({
265
241
  type: 'tabLongPress',
266
242
  target: route.key
267
243
  });
268
244
  };
269
-
270
245
  const label = options.tabBarLabel !== undefined ? options.tabBarLabel : options.title !== undefined ? options.title : route.name;
271
246
  const accessibilityLabel = options.tabBarAccessibilityLabel !== undefined ? options.tabBarAccessibilityLabel : typeof label === 'string' && Platform.OS === 'ios' ? `${label}, tab, ${index + 1} of ${routes.length}` : undefined;
272
247
  return /*#__PURE__*/React.createElement(NavigationContext.Provider, {
@@ -276,6 +251,7 @@ export default function BottomTabBar(_ref3) {
276
251
  value: route
277
252
  }, /*#__PURE__*/React.createElement(BottomTabItem, {
278
253
  route: route,
254
+ descriptor: descriptors[route.key],
279
255
  focused: focused,
280
256
  horizontal: hasHorizontalLabels,
281
257
  onPress: onPress,
@@ -289,7 +265,7 @@ export default function BottomTabBar(_ref3) {
289
265
  activeBackgroundColor: tabBarActiveBackgroundColor,
290
266
  inactiveBackgroundColor: tabBarInactiveBackgroundColor,
291
267
  button: options.tabBarButton,
292
- icon: (_options$tabBarIcon = options.tabBarIcon) !== null && _options$tabBarIcon !== void 0 ? _options$tabBarIcon : _ref5 => {
268
+ icon: options.tabBarIcon ?? (_ref5 => {
293
269
  let {
294
270
  color,
295
271
  size
@@ -298,7 +274,7 @@ export default function BottomTabBar(_ref3) {
298
274
  color: color,
299
275
  size: size
300
276
  });
301
- },
277
+ }),
302
278
  badge: options.tabBarBadge,
303
279
  badgeStyle: options.tabBarBadgeStyle,
304
280
  label: label,
@@ -1 +1 @@
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,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;EAAA,IALoB;IACjCC,KADiC;IAEjCC,WAFiC;IAGjCC,MAHiC;IAIjCC;EAJiC,CAKpB;EACb,MAAM;IAAEC;EAAF,IACJH,WAAW,CAACD,KAAK,CAACK,MAAN,CAAaL,KAAK,CAACM,KAAnB,EAA0BC,GAA3B,CAAX,CAA2CC,OAD7C;;EAGA,IAAIJ,mBAAJ,EAAyB;IACvB,QAAQA,mB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OAAO,CAACyH,WArBjB;MAsBE,UAAU,EAAEzH,OAAO,CAAC0H,gBAtBtB;MAuBE,KAAK,EAAEf,KAvBT;MAwBE,SAAS,EAAEzE,eAxBb;MAyBE,UAAU,EAAElC,OAAO,CAAC2H,gBAzBtB;MA0BE,SAAS,EAAE3H,OAAO,CAAC4H,eA1BrB;MA2BE,KAAK,EAAE5H,OAAO,CAACM;IA3BjB,EADF,CAJF,CADF;EAsCD,CA9EA,CADH,CArCF,CADF;AAyHD;AAED,MAAMqE,MAAM,GAAG/F,UAAU,CAACiJ,MAAX,CAAkB;EAC/BjD,MAAM,EAAE;IACNa,IAAI,EAAE,CADA;IAENC,KAAK,EAAE,CAFD;IAGN3E,MAAM,EAAE,CAHF;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
+ {"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"],"sourceRoot":"../../src","sources":["BottomTabBar.tsx"],"mappings":"AAAA,SAASA,WAAW,QAAQ,4BAA4B;AACxD,SACEC,aAAa,EACbC,iBAAiB,EACjBC,sBAAsB,EAGtBC,cAAc,EACdC,QAAQ,QACH,0BAA0B;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EAERC,QAAQ,EAERC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,SAAqBC,gBAAgB,QAAQ,gCAAgC;AAG7E,OAAOC,iCAAiC,MAAM,4CAA4C;AAC1F,OAAOC,kBAAkB,MAAM,6BAA6B;AAC5D,OAAOC,aAAa,MAAM,iBAAiB;AAM3C,MAAMC,qBAAqB,GAAG,EAAE;AAChC,MAAMC,qBAAqB,GAAG,EAAE;AAChC,MAAMC,0BAA0B,GAAG,GAAG;AAEtC,MAAMC,eAAe,GAAGV,QAAQ,CAACW,EAAE,KAAK,KAAK;AAS7C,MAAMC,yBAAyB,GAAG,QAKnB;EAAA,IALoB;IACjCC,KAAK;IACLC,WAA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AA,IAAC;UAAEC,KAAK;UAAEC;QAAK,CAAC;QAAA,oBACf,oBAAC,WAAW;UAAC,KAAK,EAAED,KAAM;UAAC,IAAI,EAAEC;QAAK,EAAG;MAAA,CAC1C,CACF;MACD,KAAK,EAAExH,OAAO,CAACyH,WAAY;MAC3B,UAAU,EAAEzH,OAAO,CAAC0H,gBAAiB;MACrC,KAAK,EAAEf,KAAM;MACb,SAAS,EAAEzE,eAAgB;MAC3B,UAAU,EAAElC,OAAO,CAAC2H,gBAAiB;MACrC,SAAS,EAAE3H,OAAO,CAAC4H,eAAgB;MACnC,KAAK,EAAE5H,OAAO,CAACM;IAAgB,EAC/B,CAC8B,CACP;EAEjC,CAAC,CAAC,CACG,CACO;AAEpB;AAEA,MAAMqE,MAAM,GAAG/F,UAAU,CAACiJ,MAAM,CAAC;EAC/BjD,MAAM,EAAE;IACNa,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACR3E,MAAM,EAAE,CAAC;IACT+G,cAAc,EAAElJ,UAAU,CAAC0G,aAAa;IACxCyC,SAAS,EAAE;EACb,CAAC;EACDnC,OAAO,EAAE;IACPoC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
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
-
3
2
  import { Link, useTheme } from '@react-navigation/native';
4
3
  import Color from 'color';
5
4
  import React from 'react';
@@ -9,6 +8,7 @@ export default function BottomTabBarItem(_ref) {
9
8
  let {
10
9
  focused,
11
10
  route,
11
+ descriptor,
12
12
  label,
13
13
  icon,
14
14
  badge,
@@ -23,7 +23,6 @@ export default function BottomTabBarItem(_ref) {
23
23
  accessibilityRole,
24
24
  ...rest
25
25
  } = _ref2;
26
-
27
26
  if (Platform.OS === 'web' && to) {
28
27
  // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.
29
28
  // We need to use `onClick` to be able to prevent default browser handling of links.
@@ -31,7 +30,8 @@ export default function BottomTabBarItem(_ref) {
31
30
  to: to,
32
31
  style: [styles.button, style],
33
32
  onPress: e => {
34
- if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && ( // ignore clicks with modifier keys
33
+ if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && (
34
+ // ignore clicks with modifier keys
35
35
  e.button == null || e.button === 0) // ignore everything but left clicks
36
36
  ) {
37
37
  e.preventDefault();
@@ -67,18 +67,14 @@ export default function BottomTabBarItem(_ref) {
67
67
  } = useTheme();
68
68
  const activeTintColor = customActiveTintColor === undefined ? colors.primary : customActiveTintColor;
69
69
  const inactiveTintColor = customInactiveTintColor === undefined ? Color(colors.text).mix(Color(colors.card), 0.5).hex() : customInactiveTintColor;
70
-
71
70
  const renderLabel = _ref3 => {
72
71
  let {
73
72
  focused
74
73
  } = _ref3;
75
-
76
74
  if (showLabel === false) {
77
75
  return null;
78
76
  }
79
-
80
77
  const color = focused ? activeTintColor : inactiveTintColor;
81
-
82
78
  if (typeof label === 'string') {
83
79
  return /*#__PURE__*/React.createElement(Text, {
84
80
  numberOfLines: 1,
@@ -88,23 +84,24 @@ export default function BottomTabBarItem(_ref) {
88
84
  allowFontScaling: allowFontScaling
89
85
  }, label);
90
86
  }
91
-
87
+ const {
88
+ options
89
+ } = descriptor;
90
+ const children = typeof options.tabBarLabel === 'string' ? options.tabBarLabel : options.title !== undefined ? options.title : route.name;
92
91
  return label({
93
92
  focused,
94
93
  color,
95
- position: horizontal ? 'beside-icon' : 'below-icon'
94
+ position: horizontal ? 'beside-icon' : 'below-icon',
95
+ children
96
96
  });
97
97
  };
98
-
99
98
  const renderIcon = _ref4 => {
100
99
  let {
101
100
  focused
102
101
  } = _ref4;
103
-
104
102
  if (icon === undefined) {
105
103
  return null;
106
104
  }
107
-
108
105
  const activeOpacity = focused ? 1 : 0;
109
106
  const inactiveOpacity = focused ? 0 : 1;
110
107
  return /*#__PURE__*/React.createElement(TabBarIcon, {
@@ -120,7 +117,6 @@ export default function BottomTabBarItem(_ref) {
120
117
  style: iconStyle
121
118
  });
122
119
  };
123
-
124
120
  const scene = {
125
121
  route,
126
122
  focused