@react-navigation/bottom-tabs 7.3.9 → 7.3.11

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 (48) hide show
  1. package/lib/module/views/BottomTabBar.js +1 -1
  2. package/lib/module/views/BottomTabBar.js.map +1 -1
  3. package/lib/module/views/BottomTabItem.js +11 -15
  4. package/lib/module/views/BottomTabItem.js.map +1 -1
  5. package/lib/typescript/src/types.d.ts +3 -3
  6. package/lib/typescript/src/types.d.ts.map +1 -1
  7. package/lib/typescript/src/views/BottomTabBar.d.ts.map +1 -1
  8. package/lib/typescript/src/views/BottomTabItem.d.ts.map +1 -1
  9. package/lib/typescript/src/views/ScreenFallback.d.ts.map +1 -1
  10. package/package.json +20 -18
  11. package/src/types.tsx +5 -3
  12. package/src/views/BottomTabBar.tsx +1 -1
  13. package/src/views/BottomTabItem.tsx +11 -13
  14. package/lib/commonjs/TransitionConfigs/SceneStyleInterpolators.js +0 -45
  15. package/lib/commonjs/TransitionConfigs/SceneStyleInterpolators.js.map +0 -1
  16. package/lib/commonjs/TransitionConfigs/TransitionPresets.js +0 -17
  17. package/lib/commonjs/TransitionConfigs/TransitionPresets.js.map +0 -1
  18. package/lib/commonjs/TransitionConfigs/TransitionSpecs.js +0 -22
  19. package/lib/commonjs/TransitionConfigs/TransitionSpecs.js.map +0 -1
  20. package/lib/commonjs/index.js +0 -57
  21. package/lib/commonjs/index.js.map +0 -1
  22. package/lib/commonjs/navigators/createBottomTabNavigator.js +0 -50
  23. package/lib/commonjs/navigators/createBottomTabNavigator.js.map +0 -1
  24. package/lib/commonjs/package.json +0 -1
  25. package/lib/commonjs/types.js +0 -6
  26. package/lib/commonjs/types.js.map +0 -1
  27. package/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js +0 -11
  28. package/lib/commonjs/utils/BottomTabBarHeightCallbackContext.js.map +0 -1
  29. package/lib/commonjs/utils/BottomTabBarHeightContext.js +0 -11
  30. package/lib/commonjs/utils/BottomTabBarHeightContext.js.map +0 -1
  31. package/lib/commonjs/utils/useAnimatedHashMap.js +0 -29
  32. package/lib/commonjs/utils/useAnimatedHashMap.js.map +0 -1
  33. package/lib/commonjs/utils/useBottomTabBarHeight.js +0 -18
  34. package/lib/commonjs/utils/useBottomTabBarHeight.js.map +0 -1
  35. package/lib/commonjs/utils/useIsKeyboardShown.js +0 -28
  36. package/lib/commonjs/utils/useIsKeyboardShown.js.map +0 -1
  37. package/lib/commonjs/views/Badge.js +0 -92
  38. package/lib/commonjs/views/Badge.js.map +0 -1
  39. package/lib/commonjs/views/BottomTabBar.js +0 -376
  40. package/lib/commonjs/views/BottomTabBar.js.map +0 -1
  41. package/lib/commonjs/views/BottomTabItem.js +0 -227
  42. package/lib/commonjs/views/BottomTabItem.js.map +0 -1
  43. package/lib/commonjs/views/BottomTabView.js +0 -266
  44. package/lib/commonjs/views/BottomTabView.js.map +0 -1
  45. package/lib/commonjs/views/ScreenFallback.js +0 -50
  46. package/lib/commonjs/views/ScreenFallback.js.map +0 -1
  47. package/lib/commonjs/views/TabBarIcon.js +0 -102
  48. package/lib/commonjs/views/TabBarIcon.js.map +0 -1
@@ -1,266 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BottomTabView = BottomTabView;
7
- var _elements = require("@react-navigation/elements");
8
- var _native = require("@react-navigation/native");
9
- var React = _interopRequireWildcard(require("react"));
10
- var _reactNative = require("react-native");
11
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
12
- var _TransitionPresets = require("../TransitionConfigs/TransitionPresets.js");
13
- var _BottomTabBarHeightCallbackContext = require("../utils/BottomTabBarHeightCallbackContext.js");
14
- var _BottomTabBarHeightContext = require("../utils/BottomTabBarHeightContext.js");
15
- var _useAnimatedHashMap = require("../utils/useAnimatedHashMap.js");
16
- var _BottomTabBar = require("./BottomTabBar.js");
17
- var _ScreenFallback = require("./ScreenFallback.js");
18
- var _jsxRuntime = require("react/jsx-runtime");
19
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
- const EPSILON = 1e-5;
22
- const STATE_INACTIVE = 0;
23
- const STATE_TRANSITIONING_OR_BELOW_TOP = 1;
24
- const STATE_ON_TOP = 2;
25
- const NAMED_TRANSITIONS_PRESETS = {
26
- fade: _TransitionPresets.FadeTransition,
27
- shift: _TransitionPresets.ShiftTransition,
28
- none: {
29
- sceneStyleInterpolator: undefined,
30
- transitionSpec: {
31
- animation: 'timing',
32
- config: {
33
- duration: 0
34
- }
35
- }
36
- }
37
- };
38
- const useNativeDriver = _reactNative.Platform.OS !== 'web';
39
- const hasAnimation = options => {
40
- const {
41
- animation,
42
- transitionSpec
43
- } = options;
44
- if (animation) {
45
- return animation !== 'none';
46
- }
47
- return Boolean(transitionSpec);
48
- };
49
- const renderTabBarDefault = props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BottomTabBar.BottomTabBar, {
50
- ...props
51
- });
52
- function BottomTabView(props) {
53
- const {
54
- tabBar = renderTabBarDefault,
55
- state,
56
- navigation,
57
- descriptors,
58
- safeAreaInsets,
59
- detachInactiveScreens = _reactNative.Platform.OS === 'web' || _reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios'
60
- } = props;
61
- const focusedRouteKey = state.routes[state.index].key;
62
- const {
63
- direction
64
- } = (0, _native.useLocale)();
65
-
66
- /**
67
- * List of loaded tabs, tabs will be loaded when navigated to.
68
- */
69
- const [loaded, setLoaded] = React.useState([focusedRouteKey]);
70
- if (!loaded.includes(focusedRouteKey)) {
71
- // Set the current tab to be loaded if it was not loaded before
72
- setLoaded([...loaded, focusedRouteKey]);
73
- }
74
- const previousRouteKeyRef = React.useRef(focusedRouteKey);
75
- const tabAnims = (0, _useAnimatedHashMap.useAnimatedHashMap)(state);
76
- React.useEffect(() => {
77
- const previousRouteKey = previousRouteKeyRef.current;
78
- let popToTopAction;
79
- if (previousRouteKey !== focusedRouteKey && descriptors[previousRouteKey]?.options.popToTopOnBlur) {
80
- const prevRoute = state.routes.find(route => route.key === previousRouteKey);
81
- if (prevRoute?.state?.type === 'stack' && prevRoute.state.key) {
82
- popToTopAction = {
83
- ..._native.StackActions.popToTop(),
84
- target: prevRoute.state.key
85
- };
86
- }
87
- }
88
- const animateToIndex = () => {
89
- if (previousRouteKey !== focusedRouteKey) {
90
- navigation.emit({
91
- type: 'transitionStart',
92
- target: focusedRouteKey
93
- });
94
- }
95
- _reactNative.Animated.parallel(state.routes.map((route, index) => {
96
- const {
97
- options
98
- } = descriptors[route.key];
99
- const {
100
- animation = 'none',
101
- transitionSpec = NAMED_TRANSITIONS_PRESETS[animation].transitionSpec
102
- } = options;
103
- let spec = transitionSpec;
104
- if (route.key !== previousRouteKey && route.key !== focusedRouteKey) {
105
- // Don't animate if the screen is not previous one or new one
106
- // This will avoid flicker for screens not involved in the transition
107
- spec = NAMED_TRANSITIONS_PRESETS.none.transitionSpec;
108
- }
109
- spec = spec ?? NAMED_TRANSITIONS_PRESETS.none.transitionSpec;
110
- const toValue = index === state.index ? 0 : index >= state.index ? 1 : -1;
111
- return _reactNative.Animated[spec.animation](tabAnims[route.key], {
112
- ...spec.config,
113
- toValue,
114
- useNativeDriver
115
- });
116
- }).filter(Boolean)).start(({
117
- finished
118
- }) => {
119
- if (finished && popToTopAction) {
120
- navigation.dispatch(popToTopAction);
121
- }
122
- if (previousRouteKey !== focusedRouteKey) {
123
- navigation.emit({
124
- type: 'transitionEnd',
125
- target: focusedRouteKey
126
- });
127
- }
128
- });
129
- };
130
- animateToIndex();
131
- previousRouteKeyRef.current = focusedRouteKey;
132
- }, [descriptors, focusedRouteKey, navigation, state.index, state.routes, tabAnims]);
133
- const dimensions = _elements.SafeAreaProviderCompat.initialMetrics.frame;
134
- const [tabBarHeight, setTabBarHeight] = React.useState(() => (0, _BottomTabBar.getTabBarHeight)({
135
- state,
136
- descriptors,
137
- dimensions,
138
- insets: {
139
- ..._elements.SafeAreaProviderCompat.initialMetrics.insets,
140
- ...props.safeAreaInsets
141
- },
142
- style: descriptors[state.routes[state.index].key].options.tabBarStyle
143
- }));
144
- const renderTabBar = () => {
145
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSafeAreaContext.SafeAreaInsetsContext.Consumer, {
146
- children: insets => tabBar({
147
- state: state,
148
- descriptors: descriptors,
149
- navigation: navigation,
150
- insets: {
151
- top: safeAreaInsets?.top ?? insets?.top ?? 0,
152
- right: safeAreaInsets?.right ?? insets?.right ?? 0,
153
- bottom: safeAreaInsets?.bottom ?? insets?.bottom ?? 0,
154
- left: safeAreaInsets?.left ?? insets?.left ?? 0
155
- }
156
- })
157
- });
158
- };
159
- const {
160
- routes
161
- } = state;
162
-
163
- // If there is no animation, we only have 2 states: visible and invisible
164
- const hasTwoStates = !routes.some(route => hasAnimation(descriptors[route.key].options));
165
- const {
166
- tabBarPosition = 'bottom'
167
- } = descriptors[focusedRouteKey].options;
168
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_elements.SafeAreaProviderCompat, {
169
- style: {
170
- flexDirection: tabBarPosition === 'left' || tabBarPosition === 'right' ? tabBarPosition === 'left' && direction === 'ltr' || tabBarPosition === 'right' && direction === 'rtl' ? 'row-reverse' : 'row' : 'column'
171
- },
172
- children: [tabBarPosition === 'top' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_BottomTabBarHeightCallbackContext.BottomTabBarHeightCallbackContext.Provider, {
173
- value: setTabBarHeight,
174
- children: renderTabBar()
175
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenFallback.MaybeScreenContainer, {
176
- enabled: detachInactiveScreens,
177
- hasTwoStates: hasTwoStates,
178
- style: styles.screens,
179
- children: routes.map((route, index) => {
180
- const descriptor = descriptors[route.key];
181
- const {
182
- lazy = true,
183
- animation = 'none',
184
- sceneStyleInterpolator = NAMED_TRANSITIONS_PRESETS[animation].sceneStyleInterpolator
185
- } = descriptor.options;
186
- const isFocused = state.index === index;
187
- const isPreloaded = state.preloadedRouteKeys.includes(route.key);
188
- if (lazy && !loaded.includes(route.key) && !isFocused && !isPreloaded) {
189
- // Don't render a lazy screen if we've never navigated to it or it wasn't preloaded
190
- return null;
191
- }
192
- const {
193
- freezeOnBlur,
194
- header = ({
195
- layout,
196
- options
197
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.Header, {
198
- ...options,
199
- layout: layout,
200
- title: (0, _elements.getHeaderTitle)(options, route.name)
201
- }),
202
- headerShown,
203
- headerStatusBarHeight,
204
- headerTransparent,
205
- sceneStyle: customSceneStyle
206
- } = descriptor.options;
207
- const {
208
- sceneStyle
209
- } = sceneStyleInterpolator?.({
210
- current: {
211
- progress: tabAnims[route.key]
212
- }
213
- }) ?? {};
214
- const animationEnabled = hasAnimation(descriptor.options);
215
- const activityState = isFocused ? STATE_ON_TOP // the screen is on top after the transition
216
- : animationEnabled // is animation is not enabled, immediately move to inactive state
217
- ? tabAnims[route.key].interpolate({
218
- inputRange: [0, 1 - EPSILON, 1],
219
- outputRange: [STATE_TRANSITIONING_OR_BELOW_TOP,
220
- // screen visible during transition
221
- STATE_TRANSITIONING_OR_BELOW_TOP, STATE_INACTIVE // the screen is detached after transition
222
- ],
223
- extrapolate: 'extend'
224
- }) : STATE_INACTIVE;
225
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenFallback.MaybeScreen, {
226
- style: [_reactNative.StyleSheet.absoluteFill, {
227
- zIndex: isFocused ? 0 : -1
228
- }],
229
- active: activityState,
230
- enabled: detachInactiveScreens,
231
- freezeOnBlur: freezeOnBlur,
232
- shouldFreeze: activityState === STATE_INACTIVE && !isPreloaded,
233
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_BottomTabBarHeightContext.BottomTabBarHeightContext.Provider, {
234
- value: tabBarPosition === 'bottom' ? tabBarHeight : 0,
235
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.Screen, {
236
- focused: isFocused,
237
- route: descriptor.route,
238
- navigation: descriptor.navigation,
239
- headerShown: headerShown,
240
- headerStatusBarHeight: headerStatusBarHeight,
241
- headerTransparent: headerTransparent,
242
- header: header({
243
- layout: dimensions,
244
- route: descriptor.route,
245
- navigation: descriptor.navigation,
246
- options: descriptor.options
247
- }),
248
- style: [customSceneStyle, animationEnabled && sceneStyle],
249
- children: descriptor.render()
250
- })
251
- })
252
- }, route.key);
253
- })
254
- }), tabBarPosition !== 'top' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_BottomTabBarHeightCallbackContext.BottomTabBarHeightCallbackContext.Provider, {
255
- value: setTabBarHeight,
256
- children: renderTabBar()
257
- }) : null]
258
- });
259
- }
260
- const styles = _reactNative.StyleSheet.create({
261
- screens: {
262
- flex: 1,
263
- overflow: 'hidden'
264
- }
265
- });
266
- //# sourceMappingURL=BottomTabView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_elements","require","_native","React","_interopRequireWildcard","_reactNative","_reactNativeSafeAreaContext","_TransitionPresets","_BottomTabBarHeightCallbackContext","_BottomTabBarHeightContext","_useAnimatedHashMap","_BottomTabBar","_ScreenFallback","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","EPSILON","STATE_INACTIVE","STATE_TRANSITIONING_OR_BELOW_TOP","STATE_ON_TOP","NAMED_TRANSITIONS_PRESETS","fade","FadeTransition","shift","ShiftTransition","none","sceneStyleInterpolator","undefined","transitionSpec","animation","config","duration","useNativeDriver","Platform","OS","hasAnimation","options","Boolean","renderTabBarDefault","props","jsx","BottomTabBar","BottomTabView","tabBar","state","navigation","descriptors","safeAreaInsets","detachInactiveScreens","focusedRouteKey","routes","index","key","direction","useLocale","loaded","setLoaded","useState","includes","previousRouteKeyRef","useRef","tabAnims","useAnimatedHashMap","useEffect","previousRouteKey","current","popToTopAction","popToTopOnBlur","prevRoute","find","route","type","StackActions","popToTop","target","animateToIndex","emit","Animated","parallel","map","spec","toValue","filter","start","finished","dispatch","dimensions","SafeAreaProviderCompat","initialMetrics","frame","tabBarHeight","setTabBarHeight","getTabBarHeight","insets","style","tabBarStyle","renderTabBar","SafeAreaInsetsContext","Consumer","children","top","right","bottom","left","hasTwoStates","some","tabBarPosition","jsxs","flexDirection","BottomTabBarHeightCallbackContext","Provider","value","MaybeScreenContainer","enabled","styles","screens","descriptor","lazy","isFocused","isPreloaded","preloadedRouteKeys","freezeOnBlur","header","layout","Header","title","getHeaderTitle","name","headerShown","headerStatusBarHeight","headerTransparent","sceneStyle","customSceneStyle","progress","animationEnabled","activityState","interpolate","inputRange","outputRange","extrapolate","MaybeScreen","StyleSheet","absoluteFill","zIndex","active","shouldFreeze","BottomTabBarHeightContext","Screen","focused","render","create","flex","overflow"],"sourceRoot":"../../../src","sources":["views/BottomTabView.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAMA,IAAAC,OAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,2BAAA,GAAAL,OAAA;AAEA,IAAAM,kBAAA,GAAAN,OAAA;AAaA,IAAAO,kCAAA,GAAAP,OAAA;AACA,IAAAQ,0BAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAA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C,CACkB,CAAC,EACtBsD,cAAc,KAAK,KAAK,gBACvB,IAAA/G,WAAA,CAAA6C,GAAA,EAAClD,kCAAA,CAAAuH,iCAAiC,CAACC,QAAQ;MAACC,KAAK,EAAEpB,eAAgB;MAAAQ,QAAA,EAChEH,YAAY,CAAC;IAAC,CAC2B,CAAC,GAC3C,IAAI;EAAA,CACc,CAAC;AAE7B;AAEA,MAAMkB,MAAM,GAAG2B,uBAAU,CAACS,MAAM,CAAC;EAC/BnC,OAAO,EAAE;IACPoC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.MaybeScreen = MaybeScreen;
7
- exports.MaybeScreenContainer = void 0;
8
- var React = _interopRequireWildcard(require("react"));
9
- var _reactNative = require("react-native");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- let Screens;
14
- try {
15
- Screens = require('react-native-screens');
16
- } catch (e) {
17
- // Ignore
18
- }
19
- const MaybeScreenContainer = ({
20
- enabled,
21
- ...rest
22
- }) => {
23
- if (Screens?.screensEnabled?.()) {
24
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Screens.ScreenContainer, {
25
- enabled: enabled,
26
- ...rest
27
- });
28
- }
29
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
30
- ...rest
31
- });
32
- };
33
- exports.MaybeScreenContainer = MaybeScreenContainer;
34
- function MaybeScreen({
35
- enabled,
36
- active,
37
- ...rest
38
- }) {
39
- if (Screens?.screensEnabled?.()) {
40
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Screens.Screen, {
41
- enabled: enabled,
42
- activityState: active,
43
- ...rest
44
- });
45
- }
46
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
47
- ...rest
48
- });
49
- }
50
- //# sourceMappingURL=ScreenFallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Screens","MaybeScreenContainer","enabled","rest","screensEnabled","jsx","ScreenContainer","View","exports","MaybeScreen","active","Screen","activityState"],"sourceRoot":"../../../src","sources":["views/ScreenFallback.tsx"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMsB,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CA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;AAEK,SAASQ,WAAWA,CAAC;EAAEP,OAAO;EAAEQ,MAAM;EAAE,GAAGP;AAAwB,CAAC,EAAE;EAC3E,IAAIH,OAAO,EAAEI,cAAc,GAAG,CAAC,EAAE;IAC/B,oBACE,IAAAzB,WAAA,CAAA0B,GAAA,EAACL,OAAO,CAACW,MAAM;MAACT,OAAO,EAAEA,OAAQ;MAACU,aAAa,EAAEF,MAAO;MAAA,GAAKP;IAAI,CAAG,CAAC;EAEzE;EAEA,oBAAO,IAAAxB,WAAA,CAAA0B,GAAA,EAAC3B,YAAA,CAAA6B,IAAI;IAAA,GAAKJ;EAAI,CAAG,CAAC;AAC3B","ignoreList":[]}
@@ -1,102 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.TabBarIcon = TabBarIcon;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _Badge = require("./Badge.js");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- /**
13
- * Icon sizes taken from Apple HIG
14
- * https://developer.apple.com/design/human-interface-guidelines/tab-bars
15
- */
16
- const ICON_SIZE_WIDE = 31;
17
- const ICON_SIZE_WIDE_COMPACT = 23;
18
- const ICON_SIZE_TALL = 28;
19
- const ICON_SIZE_TALL_COMPACT = 20;
20
- const ICON_SIZE_ROUND = 25;
21
- const ICON_SIZE_ROUND_COMPACT = 18;
22
- const ICON_SIZE_MATERIAL = 24;
23
- function TabBarIcon({
24
- route: _,
25
- variant,
26
- size,
27
- badge,
28
- badgeStyle,
29
- activeOpacity,
30
- inactiveOpacity,
31
- activeTintColor,
32
- inactiveTintColor,
33
- renderIcon,
34
- allowFontScaling,
35
- style
36
- }) {
37
- const iconSize = variant === 'material' ? ICON_SIZE_MATERIAL : size === 'compact' ? ICON_SIZE_ROUND_COMPACT : ICON_SIZE_ROUND;
38
-
39
- // We render the icon twice at the same position on top of each other:
40
- // active and inactive one, so we can fade between them.
41
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
42
- style: [variant === 'material' ? styles.wrapperMaterial : size === 'compact' ? styles.wrapperUikitCompact : styles.wrapperUikit, style],
43
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
44
- style: [styles.icon, {
45
- opacity: activeOpacity,
46
- // Workaround for react-native >= 0.54 layout bug
47
- minWidth: iconSize
48
- }],
49
- children: renderIcon({
50
- focused: true,
51
- size: iconSize,
52
- color: activeTintColor
53
- })
54
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
55
- style: [styles.icon, {
56
- opacity: inactiveOpacity
57
- }],
58
- children: renderIcon({
59
- focused: false,
60
- size: iconSize,
61
- color: inactiveTintColor
62
- })
63
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.Badge, {
64
- visible: badge != null,
65
- size: iconSize * 0.75,
66
- allowFontScaling: allowFontScaling,
67
- style: [styles.badge, badgeStyle],
68
- children: badge
69
- })]
70
- });
71
- }
72
- const styles = _reactNative.StyleSheet.create({
73
- icon: {
74
- // We render the icon twice at the same position on top of each other:
75
- // active and inactive one, so we can fade between them:
76
- // Cover the whole iconContainer:
77
- position: 'absolute',
78
- alignSelf: 'center',
79
- alignItems: 'center',
80
- justifyContent: 'center',
81
- height: '100%',
82
- width: '100%'
83
- },
84
- wrapperUikit: {
85
- width: ICON_SIZE_WIDE,
86
- height: ICON_SIZE_TALL
87
- },
88
- wrapperUikitCompact: {
89
- width: ICON_SIZE_WIDE_COMPACT,
90
- height: ICON_SIZE_TALL_COMPACT
91
- },
92
- wrapperMaterial: {
93
- width: ICON_SIZE_MATERIAL,
94
- height: ICON_SIZE_MATERIAL
95
- },
96
- badge: {
97
- position: 'absolute',
98
- end: -3,
99
- top: -3
100
- }
101
- });
102
- //# sourceMappingURL=TabBarIcon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_Badge","_jsxRuntime","e","__esModule","default","ICON_SIZE_WIDE","ICON_SIZE_WIDE_COMPACT","ICON_SIZE_TALL","ICON_SIZE_TALL_COMPACT","ICON_SIZE_ROUND","ICON_SIZE_ROUND_COMPACT","ICON_SIZE_MATERIAL","TabBarIcon","route","_","variant","size","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","allowFontScaling","style","iconSize","jsxs","View","styles","wrapperMaterial","wrapperUikitCompact","wrapperUikit","children","jsx","icon","opacity","minWidth","focused","color","Badge","visible","StyleSheet","create","position","alignSelf","alignItems","justifyContent","height","width","end","top"],"sourceRoot":"../../../src","sources":["views/TabBarIcon.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,MAAA,GAAAF,OAAA;AAAgC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAqBhC;AACA;AACA;AACA;AACA,MAAMG,cAAc,GAAG,EAAE;AACzB,MAAMC,sBAAsB,GAAG,EAAE;AACjC,MAAMC,cAAc,GAAG,EAAE;AACzB,MAAMC,sBAAsB,GAAG,EAAE;AACjC,MAAMC,eAAe,GAAG,EAAE;AAC1B,MAAMC,uBAAuB,GAAG,EAAE;AAClC,MAAMC,kBAAkB,GAAG,EAAE;AAEtB,SAASC,UAAUA,CAAC;EACzBC,KAAK,EAAEC,CAAC;EACRC,OAAO;EACPC,IAAI;EACJC,KAAK;EACLC,UAAU;EACVC,aAAa;EACbC,eAAe;EACfC,eAAe;EACfC,iBAAiB;EACjBC,UAAU;EACVC,gBAAgB;EAChBC;AACK,CAAC,EAAE;EACR,MAAMC,QAAQ,GACZX,OAAO,KAAK,UAAU,GAClBJ,kBAAkB,GAClBK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