@react-navigation/bottom-tabs
Advanced tools
Comparing version 5.0.0-alpha.43 to 5.0.0-alpha.44
@@ -6,2 +6,10 @@ # Change Log | ||
# [5.0.0-alpha.44](https://github.com/react-navigation/navigation-ex/tree/master/packages/bottom-tabs/compare/@react-navigation/bottom-tabs@5.0.0-alpha.43...@react-navigation/bottom-tabs@5.0.0-alpha.44) (2020-02-04) | ||
**Note:** Version bump only for package @react-navigation/bottom-tabs | ||
# [5.0.0-alpha.43](https://github.com/react-navigation/navigation-ex/tree/master/packages/bottom-tabs/compare/@react-navigation/bottom-tabs@5.0.0-alpha.42...@react-navigation/bottom-tabs@5.0.0-alpha.43) (2020-02-03) | ||
@@ -8,0 +16,0 @@ |
@@ -1,2 +0,2 @@ | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var React=_interopRequireWildcard(require("react"));var _native=require("@react-navigation/native");var _routers=require("@react-navigation/routers");var _BottomTabView=_interopRequireDefault(require("../views/BottomTabView"));var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/navigators/createBottomTabNavigator.tsx";function BottomTabNavigator(_ref){var initialRouteName=_ref.initialRouteName,backBehavior=_ref.backBehavior,children=_ref.children,screenOptions=_ref.screenOptions,rest=(0,_objectWithoutProperties2.default)(_ref,["initialRouteName","backBehavior","children","screenOptions"]);var _useNavigationBuilder=(0,_native.useNavigationBuilder)(_routers.TabRouter,{initialRouteName:initialRouteName,backBehavior:backBehavior,children:children,screenOptions:screenOptions}),state=_useNavigationBuilder.state,descriptors=_useNavigationBuilder.descriptors,navigation=_useNavigationBuilder.navigation;return React.createElement(_BottomTabView.default,(0,_extends2.default)({},rest,{state:state,navigation:navigation,descriptors:descriptors,__source:{fileName:_jsxFileName,lineNumber:43}}));}var _default=(0,_native.createNavigatorFactory)(BottomTabNavigator);exports.default=_default; | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var React=_interopRequireWildcard(require("react"));var _native=require("@react-navigation/native");var _routers=require("@react-navigation/routers");var _BottomTabView=_interopRequireDefault(require("../views/BottomTabView"));var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/navigators/createBottomTabNavigator.tsx";function BottomTabNavigator(_ref){var initialRouteName=_ref.initialRouteName,backBehavior=_ref.backBehavior,children=_ref.children,screenOptions=_ref.screenOptions,rest=(0,_objectWithoutProperties2.default)(_ref,["initialRouteName","backBehavior","children","screenOptions"]);var _useNavigationBuilder=(0,_native.useNavigationBuilder)(_routers.TabRouter,{initialRouteName:initialRouteName,backBehavior:backBehavior,children:children,screenOptions:screenOptions}),state=_useNavigationBuilder.state,descriptors=_useNavigationBuilder.descriptors,navigation=_useNavigationBuilder.navigation;return React.createElement(_BottomTabView.default,(0,_extends2.default)({},rest,{state:state,navigation:navigation,descriptors:descriptors,__source:{fileName:_jsxFileName,lineNumber:43}}));}var _default=(0,_native.createNavigatorFactory)(BottomTabNavigator);exports.default=_default; | ||
//# sourceMappingURL=createBottomTabNavigator.js.map |
@@ -1,2 +0,2 @@ | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=BottomTabBar;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _BottomTabItem=_interopRequireDefault(require("./BottomTabItem"));var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/BottomTabBar.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var DEFAULT_TABBAR_HEIGHT=50;var DEFAULT_MAX_TAB_ITEM_WIDTH=125;var useNativeDriver=_reactNative.Platform.OS!=='web';function BottomTabBar(_ref){var state=_ref.state,navigation=_ref.navigation,descriptors=_ref.descriptors,activeBackgroundColor=_ref.activeBackgroundColor,activeTintColor=_ref.activeTintColor,_ref$adaptive=_ref.adaptive,adaptive=_ref$adaptive===void 0?true:_ref$adaptive,allowFontScaling=_ref.allowFontScaling,inactiveBackgroundColor=_ref.inactiveBackgroundColor,inactiveTintColor=_ref.inactiveTintColor,_ref$keyboardHidesTab=_ref.keyboardHidesTabBar,keyboardHidesTabBar=_ref$keyboardHidesTab===void 0?false:_ref$keyboardHidesTab,labelPosition=_ref.labelPosition,labelStyle=_ref.labelStyle,showIcon=_ref.showIcon,showLabel=_ref.showLabel,style=_ref.style,tabStyle=_ref.tabStyle;var _useTheme=(0,_native.useTheme)(),colors=_useTheme.colors;var _React$useState=_react.default.useState(_reactNative.Dimensions.get('window')),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),dimensions=_React$useState2[0],setDimensions=_React$useState2[1];var _React$useState3=_react.default.useState({height:0,width:dimensions.width}),_React$useState4=(0,_slicedToArray2.default)(_React$useState3,2),layout=_React$useState4[0],setLayout=_React$useState4[1];var _React$useState5=_react.default.useState(false),_React$useState6=(0,_slicedToArray2.default)(_React$useState5,2),keyboardShown=_React$useState6[0],setKeyboardShown=_React$useState6[1];var _React$useState7=_react.default.useState(function(){return new _reactNative.Animated.Value(0);}),_React$useState8=(0,_slicedToArray2.default)(_React$useState7,1),visible=_React$useState8[0];var routes=state.routes;_react.default.useEffect(function(){if(keyboardShown){_reactNative.Animated.timing(visible,{toValue:0,duration:200,useNativeDriver:useNativeDriver}).start();}},[keyboardShown,visible]);_react.default.useEffect(function(){var handleOrientationChange=function handleOrientationChange(_ref2){var window=_ref2.window;setDimensions(window);};var handleKeyboardShow=function handleKeyboardShow(){return setKeyboardShown(true);};var handleKeyboardHide=function handleKeyboardHide(){return _reactNative.Animated.timing(visible,{toValue:1,duration:250,useNativeDriver:useNativeDriver}).start(function(_ref3){var finished=_ref3.finished;if(finished){setKeyboardShown(false);}});};_reactNative.Dimensions.addEventListener('change',handleOrientationChange);if(_reactNative.Platform.OS==='ios'){_reactNative.Keyboard.addListener('keyboardWillShow',handleKeyboardShow);_reactNative.Keyboard.addListener('keyboardWillHide',handleKeyboardHide);}else{_reactNative.Keyboard.addListener('keyboardDidShow',handleKeyboardShow);_reactNative.Keyboard.addListener('keyboardDidHide',handleKeyboardHide);}return function(){_reactNative.Dimensions.removeEventListener('change',handleOrientationChange);if(_reactNative.Platform.OS==='ios'){_reactNative.Keyboard.removeListener('keyboardWillShow',handleKeyboardShow);_reactNative.Keyboard.removeListener('keyboardWillHide',handleKeyboardHide);}else{_reactNative.Keyboard.removeListener('keyboardDidShow',handleKeyboardShow);_reactNative.Keyboard.removeListener('keyboardDidHide',handleKeyboardHide);}};},[visible]);var handleLayout=function handleLayout(e){var _e$nativeEvent$layout=e.nativeEvent.layout,height=_e$nativeEvent$layout.height,width=_e$nativeEvent$layout.width;setLayout(function(layout){if(height===layout.height&&width===layout.width){return layout;}else{return{height:height,width:width};}});};var shouldUseHorizontalLabels=function shouldUseHorizontalLabels(){if(labelPosition){return labelPosition==='beside-icon';}if(!adaptive){return false;}if(layout.width>=768){var maxTabItemWidth=DEFAULT_MAX_TAB_ITEM_WIDTH;var flattenedStyle=_reactNative.StyleSheet.flatten(tabStyle);if(flattenedStyle){if(typeof flattenedStyle.width==='number'){maxTabItemWidth=flattenedStyle.width;}else if(typeof flattenedStyle.maxWidth==='number'){maxTabItemWidth=flattenedStyle.maxWidth;}}return routes.length*maxTabItemWidth<=layout.width;}else{var isLandscape=dimensions.width>dimensions.height;return isLandscape;}};return _react.default.createElement(_reactNativeSafeAreaContext.SafeAreaConsumer,{__source:{fileName:_jsxFileName,lineNumber:161}},function(insets){return _react.default.createElement(_reactNative.Animated.View,{style:[styles.tabBar,{backgroundColor:colors.card,borderTopColor:colors.border},keyboardHidesTabBar?{transform:[{translateY:visible.interpolate({inputRange:[0,1],outputRange:[layout.height,0]})}],position:keyboardShown?'absolute':null}:null,{height:DEFAULT_TABBAR_HEIGHT+(insets?insets.bottom:0),paddingBottom:insets?insets.bottom:0},style],pointerEvents:keyboardHidesTabBar&&keyboardShown?'none':'auto',__source:{fileName:_jsxFileName,lineNumber:163}},_react.default.createElement(_reactNative.View,{style:styles.content,onLayout:handleLayout,__source:{fileName:_jsxFileName,lineNumber:194}},routes.map(function(route,index){var focused=index===state.index;var options=descriptors[route.key].options;var onPress=function onPress(){var event=navigation.emit({type:'tabPress',target:route.key,canPreventDefault:true});if(!focused&&!event.defaultPrevented){navigation.dispatch(_objectSpread({},_native.CommonActions.navigate(route.name),{target:state.key}));}};var onLongPress=function onLongPress(){navigation.emit({type:'tabLongPress',target:route.key});};var label=options.tabBarLabel!==undefined?options.tabBarLabel:options.title!==undefined?options.title:route.name;var accessibilityLabel=options.tabBarAccessibilityLabel!==undefined?options.tabBarAccessibilityLabel:typeof label==='string'?label+", tab, "+(index+1)+" of "+routes.length:undefined;return _react.default.createElement(_native.NavigationContext.Provider,{key:route.key,value:descriptors[route.key].navigation,__source:{fileName:_jsxFileName,lineNumber:236}},_react.default.createElement(_BottomTabItem.default,{route:route,focused:focused,horizontal:shouldUseHorizontalLabels(),onPress:onPress,onLongPress:onLongPress,accessibilityLabel:accessibilityLabel,testID:options.tabBarTestID,allowFontScaling:allowFontScaling,activeTintColor:activeTintColor,inactiveTintColor:inactiveTintColor,activeBackgroundColor:activeBackgroundColor,inactiveBackgroundColor:inactiveBackgroundColor,button:options.tabBarButton,icon:options.tabBarIcon,label:label,showIcon:showIcon,showLabel:showLabel,labelStyle:labelStyle,style:tabStyle,__source:{fileName:_jsxFileName,lineNumber:240}}));})));});}var styles=_reactNative.StyleSheet.create({tabBar:{left:0,right:0,bottom:0,borderTopWidth:_reactNative.StyleSheet.hairlineWidth,elevation:8},content:{flex:1,flexDirection:'row'}}); | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=BottomTabBar;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _BottomTabItem=_interopRequireDefault(require("./BottomTabItem"));var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/BottomTabBar.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var DEFAULT_TABBAR_HEIGHT=50;var DEFAULT_MAX_TAB_ITEM_WIDTH=125;var useNativeDriver=_reactNative.Platform.OS!=='web';function BottomTabBar(_ref){var state=_ref.state,navigation=_ref.navigation,descriptors=_ref.descriptors,activeBackgroundColor=_ref.activeBackgroundColor,activeTintColor=_ref.activeTintColor,_ref$adaptive=_ref.adaptive,adaptive=_ref$adaptive===void 0?true:_ref$adaptive,allowFontScaling=_ref.allowFontScaling,inactiveBackgroundColor=_ref.inactiveBackgroundColor,inactiveTintColor=_ref.inactiveTintColor,_ref$keyboardHidesTab=_ref.keyboardHidesTabBar,keyboardHidesTabBar=_ref$keyboardHidesTab===void 0?false:_ref$keyboardHidesTab,labelPosition=_ref.labelPosition,labelStyle=_ref.labelStyle,showIcon=_ref.showIcon,showLabel=_ref.showLabel,style=_ref.style,tabStyle=_ref.tabStyle;var _useTheme=(0,_native.useTheme)(),colors=_useTheme.colors;var _React$useState=_react.default.useState(_reactNative.Dimensions.get('window')),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),dimensions=_React$useState2[0],setDimensions=_React$useState2[1];var _React$useState3=_react.default.useState({height:0,width:dimensions.width}),_React$useState4=(0,_slicedToArray2.default)(_React$useState3,2),layout=_React$useState4[0],setLayout=_React$useState4[1];var _React$useState5=_react.default.useState(false),_React$useState6=(0,_slicedToArray2.default)(_React$useState5,2),keyboardShown=_React$useState6[0],setKeyboardShown=_React$useState6[1];var _React$useState7=_react.default.useState(function(){return new _reactNative.Animated.Value(0);}),_React$useState8=(0,_slicedToArray2.default)(_React$useState7,1),visible=_React$useState8[0];var routes=state.routes;_react.default.useEffect(function(){if(keyboardShown){_reactNative.Animated.timing(visible,{toValue:0,duration:200,useNativeDriver:useNativeDriver}).start();}},[keyboardShown,visible]);_react.default.useEffect(function(){var handleOrientationChange=function handleOrientationChange(_ref2){var window=_ref2.window;setDimensions(window);};var handleKeyboardShow=function handleKeyboardShow(){return setKeyboardShown(true);};var handleKeyboardHide=function handleKeyboardHide(){return _reactNative.Animated.timing(visible,{toValue:1,duration:250,useNativeDriver:useNativeDriver}).start(function(_ref3){var finished=_ref3.finished;if(finished){setKeyboardShown(false);}});};_reactNative.Dimensions.addEventListener('change',handleOrientationChange);if(_reactNative.Platform.OS==='ios'){_reactNative.Keyboard.addListener('keyboardWillShow',handleKeyboardShow);_reactNative.Keyboard.addListener('keyboardWillHide',handleKeyboardHide);}else{_reactNative.Keyboard.addListener('keyboardDidShow',handleKeyboardShow);_reactNative.Keyboard.addListener('keyboardDidHide',handleKeyboardHide);}return function(){_reactNative.Dimensions.removeEventListener('change',handleOrientationChange);if(_reactNative.Platform.OS==='ios'){_reactNative.Keyboard.removeListener('keyboardWillShow',handleKeyboardShow);_reactNative.Keyboard.removeListener('keyboardWillHide',handleKeyboardHide);}else{_reactNative.Keyboard.removeListener('keyboardDidShow',handleKeyboardShow);_reactNative.Keyboard.removeListener('keyboardDidHide',handleKeyboardHide);}};},[visible]);var handleLayout=function handleLayout(e){var _e$nativeEvent$layout=e.nativeEvent.layout,height=_e$nativeEvent$layout.height,width=_e$nativeEvent$layout.width;setLayout(function(layout){if(height===layout.height&&width===layout.width){return layout;}else{return{height:height,width:width};}});};var shouldUseHorizontalLabels=function shouldUseHorizontalLabels(){if(labelPosition){return labelPosition==='beside-icon';}if(!adaptive){return false;}if(layout.width>=768){var maxTabItemWidth=DEFAULT_MAX_TAB_ITEM_WIDTH;var flattenedStyle=_reactNative.StyleSheet.flatten(tabStyle);if(flattenedStyle){if(typeof flattenedStyle.width==='number'){maxTabItemWidth=flattenedStyle.width;}else if(typeof flattenedStyle.maxWidth==='number'){maxTabItemWidth=flattenedStyle.maxWidth;}}return routes.length*maxTabItemWidth<=layout.width;}else{var isLandscape=dimensions.width>dimensions.height;return isLandscape;}};return _react.default.createElement(_reactNativeSafeAreaContext.SafeAreaConsumer,{__source:{fileName:_jsxFileName,lineNumber:161}},function(insets){return _react.default.createElement(_reactNative.Animated.View,{style:[styles.tabBar,{backgroundColor:colors.card,borderTopColor:colors.border},keyboardHidesTabBar?{transform:[{translateY:visible.interpolate({inputRange:[0,1],outputRange:[layout.height,0]})}],position:keyboardShown?'absolute':null}:null,{height:DEFAULT_TABBAR_HEIGHT+(insets?insets.bottom:0),paddingBottom:insets?insets.bottom:0},style],pointerEvents:keyboardHidesTabBar&&keyboardShown?'none':'auto',__source:{fileName:_jsxFileName,lineNumber:163}},_react.default.createElement(_reactNative.View,{style:styles.content,onLayout:handleLayout,__source:{fileName:_jsxFileName,lineNumber:194}},routes.map(function(route,index){var focused=index===state.index;var options=descriptors[route.key].options;var onPress=function onPress(){var event=navigation.emit({type:'tabPress',target:route.key,canPreventDefault:true});if(!focused&&!event.defaultPrevented){navigation.dispatch(_objectSpread({},_native.CommonActions.navigate(route.name),{target:state.key}));}};var onLongPress=function onLongPress(){navigation.emit({type:'tabLongPress',target:route.key});};var label=options.tabBarLabel!==undefined?options.tabBarLabel:options.title!==undefined?options.title:route.name;var accessibilityLabel=options.tabBarAccessibilityLabel!==undefined?options.tabBarAccessibilityLabel:typeof label==='string'?label+", tab, "+(index+1)+" of "+routes.length:undefined;return _react.default.createElement(_native.NavigationContext.Provider,{key:route.key,value:descriptors[route.key].navigation,__source:{fileName:_jsxFileName,lineNumber:236}},_react.default.createElement(_BottomTabItem.default,{route:route,focused:focused,horizontal:shouldUseHorizontalLabels(),onPress:onPress,onLongPress:onLongPress,accessibilityLabel:accessibilityLabel,testID:options.tabBarTestID,allowFontScaling:allowFontScaling,activeTintColor:activeTintColor,inactiveTintColor:inactiveTintColor,activeBackgroundColor:activeBackgroundColor,inactiveBackgroundColor:inactiveBackgroundColor,button:options.tabBarButton,icon:options.tabBarIcon,label:label,showIcon:showIcon,showLabel:showLabel,labelStyle:labelStyle,style:tabStyle,__source:{fileName:_jsxFileName,lineNumber:240}}));})));});}var styles=_reactNative.StyleSheet.create({tabBar:{left:0,right:0,bottom:0,borderTopWidth:_reactNative.StyleSheet.hairlineWidth,elevation:8},content:{flex:1,flexDirection:'row'}}); | ||
//# sourceMappingURL=BottomTabBar.js.map |
@@ -1,2 +0,2 @@ | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=BottomTabBarItem;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _color=_interopRequireDefault(require("color"));var _TabBarIcon=_interopRequireDefault(require("./TabBarIcon"));var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/BottomTabItem.tsx";function BottomTabBarItem(_ref){var focused=_ref.focused,route=_ref.route,label=_ref.label,icon=_ref.icon,_ref$button=_ref.button,button=_ref$button===void 0?function(_ref2){var children=_ref2.children,style=_ref2.style,rest=(0,_objectWithoutProperties2.default)(_ref2,["children","style"]);return _react.default.createElement(_reactNative.TouchableWithoutFeedback,(0,_extends2.default)({},rest,{__source:{fileName:_jsxFileName,lineNumber:108}}),_react.default.createElement(_reactNative.View,{style:style,__source:{fileName:_jsxFileName,lineNumber:109}},children));}:_ref$button,accessibilityLabel=_ref.accessibilityLabel,testID=_ref.testID,onPress=_ref.onPress,onLongPress=_ref.onLongPress,horizontal=_ref.horizontal,customActiveTintColor=_ref.activeTintColor,customInactiveTintColor=_ref.inactiveTintColor,_ref$activeBackground=_ref.activeBackgroundColor,activeBackgroundColor=_ref$activeBackground===void 0?'transparent':_ref$activeBackground,_ref$inactiveBackgrou=_ref.inactiveBackgroundColor,inactiveBackgroundColor=_ref$inactiveBackgrou===void 0?'transparent':_ref$inactiveBackgrou,_ref$showLabel=_ref.showLabel,showLabel=_ref$showLabel===void 0?true:_ref$showLabel,_ref$showIcon=_ref.showIcon,showIcon=_ref$showIcon===void 0?true:_ref$showIcon,allowFontScaling=_ref.allowFontScaling,labelStyle=_ref.labelStyle,style=_ref.style;var _useTheme=(0,_native.useTheme)(),colors=_useTheme.colors;var activeTintColor=customActiveTintColor===undefined?colors.primary:customActiveTintColor;var inactiveTintColor=customInactiveTintColor===undefined?(0,_color.default)(colors.text).mix((0,_color.default)(colors.card),0.5).hex():customInactiveTintColor;var renderLabel=function renderLabel(_ref3){var focused=_ref3.focused;if(showLabel===false){return null;}var color=focused?activeTintColor:inactiveTintColor;if(typeof label==='string'){return _react.default.createElement(_reactNative.Animated.Text,{numberOfLines:1,style:[styles.label,{color:color},showIcon&&horizontal?styles.labelBeside:styles.labelBeneath,labelStyle],allowFontScaling:allowFontScaling,__source:{fileName:_jsxFileName,lineNumber:150}},label);}if(typeof label==='string'){return label;}return label({focused:focused,color:color});};var renderIcon=function renderIcon(_ref4){var focused=_ref4.focused;if(showIcon===false||icon===undefined){return null;}var activeOpacity=focused?1:0;var inactiveOpacity=focused?0:1;return _react.default.createElement(_TabBarIcon.default,{route:route,size:horizontal?17:24,activeOpacity:activeOpacity,inactiveOpacity:inactiveOpacity,activeTintColor:activeTintColor,inactiveTintColor:inactiveTintColor,renderIcon:icon,style:horizontal?styles.iconHorizontal:styles.iconVertical,__source:{fileName:_jsxFileName,lineNumber:181}});};var scene={route:route,focused:focused};var backgroundColor=focused?activeBackgroundColor:inactiveBackgroundColor;return button({onPress:onPress,onLongPress:onLongPress,testID:testID,accessibilityLabel:accessibilityLabel,accessibilityRole:'button',accessibilityStates:focused?['selected']:[],style:[styles.tab,{backgroundColor:backgroundColor},horizontal?styles.tabLandscape:styles.tabPortrait,style],children:_react.default.createElement(_react.default.Fragment,{__source:{fileName:_jsxFileName,lineNumber:214}},renderIcon(scene),renderLabel(scene))});}var styles=_reactNative.StyleSheet.create({tab:{flex:1,alignItems:'center'},tabPortrait:{justifyContent:'flex-end',flexDirection:'column'},tabLandscape:{justifyContent:'center',flexDirection:'row'},iconVertical:{flex:1},iconHorizontal:{height:'100%'},label:{textAlign:'center',backgroundColor:'transparent'},labelBeneath:{fontSize:11,marginBottom:1.5},labelBeside:{fontSize:12,marginLeft:20}}); | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=BottomTabBarItem;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _color=_interopRequireDefault(require("color"));var _TabBarIcon=_interopRequireDefault(require("./TabBarIcon"));var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/BottomTabItem.tsx";function BottomTabBarItem(_ref){var focused=_ref.focused,route=_ref.route,label=_ref.label,icon=_ref.icon,_ref$button=_ref.button,button=_ref$button===void 0?function(_ref2){var children=_ref2.children,style=_ref2.style,rest=(0,_objectWithoutProperties2.default)(_ref2,["children","style"]);return _react.default.createElement(_reactNative.TouchableWithoutFeedback,(0,_extends2.default)({},rest,{__source:{fileName:_jsxFileName,lineNumber:108}}),_react.default.createElement(_reactNative.View,{style:style,__source:{fileName:_jsxFileName,lineNumber:109}},children));}:_ref$button,accessibilityLabel=_ref.accessibilityLabel,testID=_ref.testID,onPress=_ref.onPress,onLongPress=_ref.onLongPress,horizontal=_ref.horizontal,customActiveTintColor=_ref.activeTintColor,customInactiveTintColor=_ref.inactiveTintColor,_ref$activeBackground=_ref.activeBackgroundColor,activeBackgroundColor=_ref$activeBackground===void 0?'transparent':_ref$activeBackground,_ref$inactiveBackgrou=_ref.inactiveBackgroundColor,inactiveBackgroundColor=_ref$inactiveBackgrou===void 0?'transparent':_ref$inactiveBackgrou,_ref$showLabel=_ref.showLabel,showLabel=_ref$showLabel===void 0?true:_ref$showLabel,_ref$showIcon=_ref.showIcon,showIcon=_ref$showIcon===void 0?true:_ref$showIcon,allowFontScaling=_ref.allowFontScaling,labelStyle=_ref.labelStyle,style=_ref.style;var _useTheme=(0,_native.useTheme)(),colors=_useTheme.colors;var activeTintColor=customActiveTintColor===undefined?colors.primary:customActiveTintColor;var inactiveTintColor=customInactiveTintColor===undefined?(0,_color.default)(colors.text).mix((0,_color.default)(colors.card),0.5).hex():customInactiveTintColor;var renderLabel=function renderLabel(_ref3){var focused=_ref3.focused;if(showLabel===false){return null;}var color=focused?activeTintColor:inactiveTintColor;if(typeof label==='string'){return _react.default.createElement(_reactNative.Animated.Text,{numberOfLines:1,style:[styles.label,{color:color},showIcon&&horizontal?styles.labelBeside:styles.labelBeneath,labelStyle],allowFontScaling:allowFontScaling,__source:{fileName:_jsxFileName,lineNumber:150}},label);}if(typeof label==='string'){return label;}return label({focused:focused,color:color});};var renderIcon=function renderIcon(_ref4){var focused=_ref4.focused;if(showIcon===false||icon===undefined){return null;}var activeOpacity=focused?1:0;var inactiveOpacity=focused?0:1;return _react.default.createElement(_TabBarIcon.default,{route:route,size:horizontal?17:24,activeOpacity:activeOpacity,inactiveOpacity:inactiveOpacity,activeTintColor:activeTintColor,inactiveTintColor:inactiveTintColor,renderIcon:icon,style:horizontal?styles.iconHorizontal:styles.iconVertical,__source:{fileName:_jsxFileName,lineNumber:181}});};var scene={route:route,focused:focused};var backgroundColor=focused?activeBackgroundColor:inactiveBackgroundColor;return button({onPress:onPress,onLongPress:onLongPress,testID:testID,accessibilityLabel:accessibilityLabel,accessibilityRole:'button',accessibilityStates:focused?['selected']:[],style:[styles.tab,{backgroundColor:backgroundColor},horizontal?styles.tabLandscape:styles.tabPortrait,style],children:_react.default.createElement(_react.default.Fragment,{__source:{fileName:_jsxFileName,lineNumber:214}},renderIcon(scene),renderLabel(scene))});}var styles=_reactNative.StyleSheet.create({tab:{flex:1,alignItems:'center'},tabPortrait:{justifyContent:'flex-end',flexDirection:'column'},tabLandscape:{justifyContent:'center',flexDirection:'row'},iconVertical:{flex:1},iconHorizontal:{height:'100%'},label:{textAlign:'center',backgroundColor:'transparent'},labelBeneath:{fontSize:11,marginBottom:1.5},labelBeside:{fontSize:12,marginLeft:20}}); | ||
//# sourceMappingURL=BottomTabItem.js.map |
@@ -1,2 +0,2 @@ | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _reactNativeScreens=require("react-native-screens");var _SafeAreaProviderCompat=_interopRequireDefault(require("./SafeAreaProviderCompat"));var _ResourceSavingScene=_interopRequireDefault(require("./ResourceSavingScene"));var _BottomTabBar=_interopRequireDefault(require("./BottomTabBar"));var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/BottomTabView.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function SceneContent(_ref){var isFocused=_ref.isFocused,children=_ref.children;var _useTheme=(0,_native.useTheme)(),colors=_useTheme.colors;return React.createElement(_reactNative.View,{accessibilityElementsHidden:!isFocused,importantForAccessibility:isFocused?'auto':'no-hide-descendants',style:[styles.content,{backgroundColor:colors.background}],__source:{fileName:_jsxFileName,lineNumber:39}},children);}var BottomTabView=function(_React$Component){(0,_inherits2.default)(BottomTabView,_React$Component);function BottomTabView(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,BottomTabView);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=(0,_possibleConstructorReturn2.default)(this,(_getPrototypeOf2=(0,_getPrototypeOf3.default)(BottomTabView)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.state={loaded:[_this.props.state.index]};_this.renderTabBar=function(){var _this$props=_this.props,_this$props$tabBar=_this$props.tabBar,tabBar=_this$props$tabBar===void 0?function(props){return React.createElement(_BottomTabBar.default,(0,_extends2.default)({},props,{__source:{fileName:_jsxFileName,lineNumber:71}}));}:_this$props$tabBar,tabBarOptions=_this$props.tabBarOptions,state=_this$props.state,navigation=_this$props.navigation;var descriptors=_this.props.descriptors;var route=state.routes[state.index];var descriptor=descriptors[route.key];var options=descriptor.options;if(options.tabBarVisible===false){return null;}return tabBar(_objectSpread({},tabBarOptions,{state:state,descriptors:descriptors,navigation:navigation}));};return _this;}(0,_createClass2.default)(BottomTabView,[{key:"render",value:function render(){var _this$props2=this.props,state=_this$props2.state,descriptors=_this$props2.descriptors,lazy=_this$props2.lazy;var routes=state.routes;var loaded=this.state.loaded;return React.createElement(_SafeAreaProviderCompat.default,{__source:{fileName:_jsxFileName,lineNumber:100}},React.createElement(_reactNative.View,{style:styles.container,__source:{fileName:_jsxFileName,lineNumber:101}},React.createElement(_reactNativeScreens.ScreenContainer,{style:styles.pages,__source:{fileName:_jsxFileName,lineNumber:102}},routes.map(function(route,index){var descriptor=descriptors[route.key];var unmountOnBlur=descriptor.options.unmountOnBlur;var isFocused=state.index===index;if(unmountOnBlur&&!isFocused){return null;}if(lazy&&!loaded.includes(index)&&!isFocused){return null;}return React.createElement(_ResourceSavingScene.default,{key:route.key,style:_reactNative.StyleSheet.absoluteFill,isVisible:isFocused,__source:{fileName:_jsxFileName,lineNumber:118}},React.createElement(SceneContent,{isFocused:isFocused,__source:{fileName:_jsxFileName,lineNumber:123}},descriptor.render()));})),this.renderTabBar()));}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(nextProps,prevState){var index=nextProps.state.index;return{loaded:prevState.loaded.includes(index)?prevState.loaded:[].concat((0,_toConsumableArray2.default)(prevState.loaded),[index])};}}]);return BottomTabView;}(React.Component);exports.default=BottomTabView;BottomTabView.defaultProps={lazy:true};var styles=_reactNative.StyleSheet.create({container:{flex:1,overflow:'hidden'},pages:{flex:1},content:{flex:1}}); | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _reactNativeScreens=require("react-native-screens");var _SafeAreaProviderCompat=_interopRequireDefault(require("./SafeAreaProviderCompat"));var _ResourceSavingScene=_interopRequireDefault(require("./ResourceSavingScene"));var _BottomTabBar=_interopRequireDefault(require("./BottomTabBar"));var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/BottomTabView.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function SceneContent(_ref){var isFocused=_ref.isFocused,children=_ref.children;var _useTheme=(0,_native.useTheme)(),colors=_useTheme.colors;return React.createElement(_reactNative.View,{accessibilityElementsHidden:!isFocused,importantForAccessibility:isFocused?'auto':'no-hide-descendants',style:[styles.content,{backgroundColor:colors.background}],__source:{fileName:_jsxFileName,lineNumber:39}},children);}var BottomTabView=function(_React$Component){(0,_inherits2.default)(BottomTabView,_React$Component);function BottomTabView(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,BottomTabView);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=(0,_possibleConstructorReturn2.default)(this,(_getPrototypeOf2=(0,_getPrototypeOf3.default)(BottomTabView)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.state={loaded:[_this.props.state.index]};_this.renderTabBar=function(){var _this$props=_this.props,_this$props$tabBar=_this$props.tabBar,tabBar=_this$props$tabBar===void 0?function(props){return React.createElement(_BottomTabBar.default,(0,_extends2.default)({},props,{__source:{fileName:_jsxFileName,lineNumber:71}}));}:_this$props$tabBar,tabBarOptions=_this$props.tabBarOptions,state=_this$props.state,navigation=_this$props.navigation;var descriptors=_this.props.descriptors;var route=state.routes[state.index];var descriptor=descriptors[route.key];var options=descriptor.options;if(options.tabBarVisible===false){return null;}return tabBar(_objectSpread({},tabBarOptions,{state:state,descriptors:descriptors,navigation:navigation}));};return _this;}(0,_createClass2.default)(BottomTabView,[{key:"render",value:function render(){var _this$props2=this.props,state=_this$props2.state,descriptors=_this$props2.descriptors,lazy=_this$props2.lazy;var routes=state.routes;var loaded=this.state.loaded;return React.createElement(_SafeAreaProviderCompat.default,{__source:{fileName:_jsxFileName,lineNumber:100}},React.createElement(_reactNative.View,{style:styles.container,__source:{fileName:_jsxFileName,lineNumber:101}},React.createElement(_reactNativeScreens.ScreenContainer,{style:styles.pages,__source:{fileName:_jsxFileName,lineNumber:102}},routes.map(function(route,index){var descriptor=descriptors[route.key];var unmountOnBlur=descriptor.options.unmountOnBlur;var isFocused=state.index===index;if(unmountOnBlur&&!isFocused){return null;}if(lazy&&!loaded.includes(index)&&!isFocused){return null;}return React.createElement(_ResourceSavingScene.default,{key:route.key,style:_reactNative.StyleSheet.absoluteFill,isVisible:isFocused,__source:{fileName:_jsxFileName,lineNumber:118}},React.createElement(SceneContent,{isFocused:isFocused,__source:{fileName:_jsxFileName,lineNumber:123}},descriptor.render()));})),this.renderTabBar()));}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(nextProps,prevState){var index=nextProps.state.index;return{loaded:prevState.loaded.includes(index)?prevState.loaded:[].concat((0,_toConsumableArray2.default)(prevState.loaded),[index])};}}]);return BottomTabView;}(React.Component);exports.default=BottomTabView;BottomTabView.defaultProps={lazy:true};var styles=_reactNative.StyleSheet.create({container:{flex:1,overflow:'hidden'},pages:{flex:1},content:{flex:1}}); | ||
//# sourceMappingURL=BottomTabView.js.map |
@@ -1,2 +0,2 @@ | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeScreens=require("react-native-screens");var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/ResourceSavingScene.tsx";var FAR_FAR_AWAY=3000;var ResourceSavingScene=function(_React$Component){(0,_inherits2.default)(ResourceSavingScene,_React$Component);function ResourceSavingScene(){(0,_classCallCheck2.default)(this,ResourceSavingScene);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(ResourceSavingScene).apply(this,arguments));}(0,_createClass2.default)(ResourceSavingScene,[{key:"render",value:function render(){if(_reactNativeScreens.screensEnabled==null?void 0:(0,_reactNativeScreens.screensEnabled)()){var _this$props=this.props,_isVisible=_this$props.isVisible,_rest=(0,_objectWithoutProperties2.default)(_this$props,["isVisible"]);return React.createElement(_reactNativeScreens.Screen,(0,_extends2.default)({active:_isVisible?1:0},_rest,{__source:{fileName:_jsxFileName,lineNumber:20}}));}var _this$props2=this.props,isVisible=_this$props2.isVisible,children=_this$props2.children,style=_this$props2.style,rest=(0,_objectWithoutProperties2.default)(_this$props2,["isVisible","children","style"]);return React.createElement(_reactNative.View,(0,_extends2.default)({style:[styles.container,style,{opacity:isVisible?1:0}],collapsable:false,removeClippedSubviews:_reactNative.Platform.OS==='ios'?!isVisible:true,pointerEvents:isVisible?'auto':'none'},rest,{__source:{fileName:_jsxFileName,lineNumber:26}}),React.createElement(_reactNative.View,{style:isVisible?styles.attached:styles.detached,__source:{fileName:_jsxFileName,lineNumber:37}},children));}}]);return ResourceSavingScene;}(React.Component);exports.default=ResourceSavingScene;var styles=_reactNative.StyleSheet.create({container:{flex:1,overflow:'hidden'},attached:{flex:1},detached:{flex:1,top:FAR_FAR_AWAY}}); | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeScreens=require("react-native-screens");var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/ResourceSavingScene.tsx";var FAR_FAR_AWAY=3000;var ResourceSavingScene=function(_React$Component){(0,_inherits2.default)(ResourceSavingScene,_React$Component);function ResourceSavingScene(){(0,_classCallCheck2.default)(this,ResourceSavingScene);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(ResourceSavingScene).apply(this,arguments));}(0,_createClass2.default)(ResourceSavingScene,[{key:"render",value:function render(){if(_reactNativeScreens.screensEnabled==null?void 0:(0,_reactNativeScreens.screensEnabled)()){var _this$props=this.props,_isVisible=_this$props.isVisible,_rest=(0,_objectWithoutProperties2.default)(_this$props,["isVisible"]);return React.createElement(_reactNativeScreens.Screen,(0,_extends2.default)({active:_isVisible?1:0},_rest,{__source:{fileName:_jsxFileName,lineNumber:20}}));}var _this$props2=this.props,isVisible=_this$props2.isVisible,children=_this$props2.children,style=_this$props2.style,rest=(0,_objectWithoutProperties2.default)(_this$props2,["isVisible","children","style"]);return React.createElement(_reactNative.View,(0,_extends2.default)({style:[styles.container,style,{opacity:isVisible?1:0}],collapsable:false,removeClippedSubviews:_reactNative.Platform.OS==='ios'?!isVisible:true,pointerEvents:isVisible?'auto':'none'},rest,{__source:{fileName:_jsxFileName,lineNumber:26}}),React.createElement(_reactNative.View,{style:isVisible?styles.attached:styles.detached,__source:{fileName:_jsxFileName,lineNumber:37}},children));}}]);return ResourceSavingScene;}(React.Component);exports.default=ResourceSavingScene;var styles=_reactNative.StyleSheet.create({container:{flex:1,overflow:'hidden'},attached:{flex:1},detached:{flex:1,top:FAR_FAR_AWAY}}); | ||
//# sourceMappingURL=ResourceSavingScene.js.map |
@@ -1,2 +0,2 @@ | ||
var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=SafeAreaProviderCompat;var React=_interopRequireWildcard(require("react"));var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _reactNativeIphoneXHelper=require("react-native-iphone-x-helper");var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/SafeAreaProviderCompat.tsx";var initialSafeAreaInsets={top:(0,_reactNativeIphoneXHelper.getStatusBarHeight)(true),bottom:(0,_reactNativeIphoneXHelper.getBottomSpace)(),right:0,left:0};function SafeAreaProviderCompat(_ref){var children=_ref.children;return React.createElement(_reactNativeSafeAreaContext.SafeAreaConsumer,{__source:{fileName:_jsxFileName,lineNumber:24}},function(insets){if(insets){return children;}return React.createElement(_reactNativeSafeAreaContext.SafeAreaProvider,{initialSafeAreaInsets:initialSafeAreaInsets,__source:{fileName:_jsxFileName,lineNumber:34}},children);});} | ||
var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=SafeAreaProviderCompat;var React=_interopRequireWildcard(require("react"));var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _reactNativeIphoneXHelper=require("react-native-iphone-x-helper");var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/SafeAreaProviderCompat.tsx";var initialSafeAreaInsets={top:(0,_reactNativeIphoneXHelper.getStatusBarHeight)(true),bottom:(0,_reactNativeIphoneXHelper.getBottomSpace)(),right:0,left:0};function SafeAreaProviderCompat(_ref){var children=_ref.children;return React.createElement(_reactNativeSafeAreaContext.SafeAreaConsumer,{__source:{fileName:_jsxFileName,lineNumber:24}},function(insets){if(insets){return children;}return React.createElement(_reactNativeSafeAreaContext.SafeAreaProvider,{initialSafeAreaInsets:initialSafeAreaInsets,__source:{fileName:_jsxFileName,lineNumber:34}},children);});} | ||
//# sourceMappingURL=SafeAreaProviderCompat.js.map |
@@ -1,2 +0,2 @@ | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=TabBarIcon;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/TabBarIcon.tsx";function TabBarIcon(_ref){var activeOpacity=_ref.activeOpacity,inactiveOpacity=_ref.inactiveOpacity,activeTintColor=_ref.activeTintColor,inactiveTintColor=_ref.inactiveTintColor,renderIcon=_ref.renderIcon,size=_ref.size,style=_ref.style;return _react.default.createElement(_reactNative.View,{style:style,__source:{fileName:_jsxFileName,lineNumber:32}},_react.default.createElement(_reactNative.View,{style:[styles.icon,{opacity:activeOpacity}],__source:{fileName:_jsxFileName,lineNumber:33}},renderIcon({focused:true,size:size,color:activeTintColor})),_react.default.createElement(_reactNative.View,{style:[styles.icon,{opacity:inactiveOpacity}],__source:{fileName:_jsxFileName,lineNumber:40}},renderIcon({focused:false,size:size,color:inactiveTintColor})));}var styles=_reactNative.StyleSheet.create({icon:{position:'absolute',alignSelf:'center',alignItems:'center',justifyContent:'center',height:'100%',width:'100%',minWidth:25}}); | ||
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=TabBarIcon;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/TabBarIcon.tsx";function TabBarIcon(_ref){var activeOpacity=_ref.activeOpacity,inactiveOpacity=_ref.inactiveOpacity,activeTintColor=_ref.activeTintColor,inactiveTintColor=_ref.inactiveTintColor,renderIcon=_ref.renderIcon,size=_ref.size,style=_ref.style;return _react.default.createElement(_reactNative.View,{style:style,__source:{fileName:_jsxFileName,lineNumber:32}},_react.default.createElement(_reactNative.View,{style:[styles.icon,{opacity:activeOpacity}],__source:{fileName:_jsxFileName,lineNumber:33}},renderIcon({focused:true,size:size,color:activeTintColor})),_react.default.createElement(_reactNative.View,{style:[styles.icon,{opacity:inactiveOpacity}],__source:{fileName:_jsxFileName,lineNumber:40}},renderIcon({focused:false,size:size,color:inactiveTintColor})));}var styles=_reactNative.StyleSheet.create({icon:{position:'absolute',alignSelf:'center',alignItems:'center',justifyContent:'center',height:'100%',width:'100%',minWidth:25}}); | ||
//# sourceMappingURL=TabBarIcon.js.map |
@@ -1,2 +0,2 @@ | ||
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/navigators/createBottomTabNavigator.tsx";import*as React from'react';import{useNavigationBuilder,createNavigatorFactory}from'@react-navigation/native';import{TabRouter}from'@react-navigation/routers';import BottomTabView from'../views/BottomTabView';function BottomTabNavigator(_ref){var initialRouteName=_ref.initialRouteName,backBehavior=_ref.backBehavior,children=_ref.children,screenOptions=_ref.screenOptions,rest=_objectWithoutProperties(_ref,["initialRouteName","backBehavior","children","screenOptions"]);var _useNavigationBuilder=useNavigationBuilder(TabRouter,{initialRouteName:initialRouteName,backBehavior:backBehavior,children:children,screenOptions:screenOptions}),state=_useNavigationBuilder.state,descriptors=_useNavigationBuilder.descriptors,navigation=_useNavigationBuilder.navigation;return React.createElement(BottomTabView,_extends({},rest,{state:state,navigation:navigation,descriptors:descriptors,__source:{fileName:_jsxFileName,lineNumber:43}}));}export default createNavigatorFactory(BottomTabNavigator); | ||
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/navigators/createBottomTabNavigator.tsx";import*as React from'react';import{useNavigationBuilder,createNavigatorFactory}from'@react-navigation/native';import{TabRouter}from'@react-navigation/routers';import BottomTabView from'../views/BottomTabView';function BottomTabNavigator(_ref){var initialRouteName=_ref.initialRouteName,backBehavior=_ref.backBehavior,children=_ref.children,screenOptions=_ref.screenOptions,rest=_objectWithoutProperties(_ref,["initialRouteName","backBehavior","children","screenOptions"]);var _useNavigationBuilder=useNavigationBuilder(TabRouter,{initialRouteName:initialRouteName,backBehavior:backBehavior,children:children,screenOptions:screenOptions}),state=_useNavigationBuilder.state,descriptors=_useNavigationBuilder.descriptors,navigation=_useNavigationBuilder.navigation;return React.createElement(BottomTabView,_extends({},rest,{state:state,navigation:navigation,descriptors:descriptors,__source:{fileName:_jsxFileName,lineNumber:43}}));}export default createNavigatorFactory(BottomTabNavigator); | ||
//# sourceMappingURL=createBottomTabNavigator.js.map |
@@ -1,2 +0,2 @@ | ||
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/BottomTabBar.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}import React from'react';import{View,Animated,StyleSheet,Keyboard,Platform,Dimensions}from'react-native';import{NavigationContext,CommonActions,useTheme}from'@react-navigation/native';import{SafeAreaConsumer}from'react-native-safe-area-context';import BottomTabItem from'./BottomTabItem';var DEFAULT_TABBAR_HEIGHT=50;var DEFAULT_MAX_TAB_ITEM_WIDTH=125;var useNativeDriver=Platform.OS!=='web';export default function BottomTabBar(_ref){var state=_ref.state,navigation=_ref.navigation,descriptors=_ref.descriptors,activeBackgroundColor=_ref.activeBackgroundColor,activeTintColor=_ref.activeTintColor,_ref$adaptive=_ref.adaptive,adaptive=_ref$adaptive===void 0?true:_ref$adaptive,allowFontScaling=_ref.allowFontScaling,inactiveBackgroundColor=_ref.inactiveBackgroundColor,inactiveTintColor=_ref.inactiveTintColor,_ref$keyboardHidesTab=_ref.keyboardHidesTabBar,keyboardHidesTabBar=_ref$keyboardHidesTab===void 0?false:_ref$keyboardHidesTab,labelPosition=_ref.labelPosition,labelStyle=_ref.labelStyle,showIcon=_ref.showIcon,showLabel=_ref.showLabel,style=_ref.style,tabStyle=_ref.tabStyle;var _useTheme=useTheme(),colors=_useTheme.colors;var _React$useState=React.useState(Dimensions.get('window')),_React$useState2=_slicedToArray(_React$useState,2),dimensions=_React$useState2[0],setDimensions=_React$useState2[1];var _React$useState3=React.useState({height:0,width:dimensions.width}),_React$useState4=_slicedToArray(_React$useState3,2),layout=_React$useState4[0],setLayout=_React$useState4[1];var _React$useState5=React.useState(false),_React$useState6=_slicedToArray(_React$useState5,2),keyboardShown=_React$useState6[0],setKeyboardShown=_React$useState6[1];var _React$useState7=React.useState(function(){return new Animated.Value(0);}),_React$useState8=_slicedToArray(_React$useState7,1),visible=_React$useState8[0];var routes=state.routes;React.useEffect(function(){if(keyboardShown){Animated.timing(visible,{toValue:0,duration:200,useNativeDriver:useNativeDriver}).start();}},[keyboardShown,visible]);React.useEffect(function(){var handleOrientationChange=function handleOrientationChange(_ref2){var window=_ref2.window;setDimensions(window);};var handleKeyboardShow=function handleKeyboardShow(){return setKeyboardShown(true);};var handleKeyboardHide=function handleKeyboardHide(){return Animated.timing(visible,{toValue:1,duration:250,useNativeDriver:useNativeDriver}).start(function(_ref3){var finished=_ref3.finished;if(finished){setKeyboardShown(false);}});};Dimensions.addEventListener('change',handleOrientationChange);if(Platform.OS==='ios'){Keyboard.addListener('keyboardWillShow',handleKeyboardShow);Keyboard.addListener('keyboardWillHide',handleKeyboardHide);}else{Keyboard.addListener('keyboardDidShow',handleKeyboardShow);Keyboard.addListener('keyboardDidHide',handleKeyboardHide);}return function(){Dimensions.removeEventListener('change',handleOrientationChange);if(Platform.OS==='ios'){Keyboard.removeListener('keyboardWillShow',handleKeyboardShow);Keyboard.removeListener('keyboardWillHide',handleKeyboardHide);}else{Keyboard.removeListener('keyboardDidShow',handleKeyboardShow);Keyboard.removeListener('keyboardDidHide',handleKeyboardHide);}};},[visible]);var handleLayout=function handleLayout(e){var _e$nativeEvent$layout=e.nativeEvent.layout,height=_e$nativeEvent$layout.height,width=_e$nativeEvent$layout.width;setLayout(function(layout){if(height===layout.height&&width===layout.width){return layout;}else{return{height:height,width:width};}});};var shouldUseHorizontalLabels=function shouldUseHorizontalLabels(){if(labelPosition){return labelPosition==='beside-icon';}if(!adaptive){return false;}if(layout.width>=768){var maxTabItemWidth=DEFAULT_MAX_TAB_ITEM_WIDTH;var flattenedStyle=StyleSheet.flatten(tabStyle);if(flattenedStyle){if(typeof flattenedStyle.width==='number'){maxTabItemWidth=flattenedStyle.width;}else if(typeof flattenedStyle.maxWidth==='number'){maxTabItemWidth=flattenedStyle.maxWidth;}}return routes.length*maxTabItemWidth<=layout.width;}else{var isLandscape=dimensions.width>dimensions.height;return isLandscape;}};return React.createElement(SafeAreaConsumer,{__source:{fileName:_jsxFileName,lineNumber:161}},function(insets){return React.createElement(Animated.View,{style:[styles.tabBar,{backgroundColor:colors.card,borderTopColor:colors.border},keyboardHidesTabBar?{transform:[{translateY:visible.interpolate({inputRange:[0,1],outputRange:[layout.height,0]})}],position:keyboardShown?'absolute':null}:null,{height:DEFAULT_TABBAR_HEIGHT+(insets?insets.bottom:0),paddingBottom:insets?insets.bottom:0},style],pointerEvents:keyboardHidesTabBar&&keyboardShown?'none':'auto',__source:{fileName:_jsxFileName,lineNumber:163}},React.createElement(View,{style:styles.content,onLayout:handleLayout,__source:{fileName:_jsxFileName,lineNumber:194}},routes.map(function(route,index){var focused=index===state.index;var options=descriptors[route.key].options;var onPress=function onPress(){var event=navigation.emit({type:'tabPress',target:route.key,canPreventDefault:true});if(!focused&&!event.defaultPrevented){navigation.dispatch(_objectSpread({},CommonActions.navigate(route.name),{target:state.key}));}};var onLongPress=function onLongPress(){navigation.emit({type:'tabLongPress',target:route.key});};var label=options.tabBarLabel!==undefined?options.tabBarLabel:options.title!==undefined?options.title:route.name;var accessibilityLabel=options.tabBarAccessibilityLabel!==undefined?options.tabBarAccessibilityLabel:typeof label==='string'?label+", tab, "+(index+1)+" of "+routes.length:undefined;return React.createElement(NavigationContext.Provider,{key:route.key,value:descriptors[route.key].navigation,__source:{fileName:_jsxFileName,lineNumber:236}},React.createElement(BottomTabItem,{route:route,focused:focused,horizontal:shouldUseHorizontalLabels(),onPress:onPress,onLongPress:onLongPress,accessibilityLabel:accessibilityLabel,testID:options.tabBarTestID,allowFontScaling:allowFontScaling,activeTintColor:activeTintColor,inactiveTintColor:inactiveTintColor,activeBackgroundColor:activeBackgroundColor,inactiveBackgroundColor:inactiveBackgroundColor,button:options.tabBarButton,icon:options.tabBarIcon,label:label,showIcon:showIcon,showLabel:showLabel,labelStyle:labelStyle,style:tabStyle,__source:{fileName:_jsxFileName,lineNumber:240}}));})));});}var styles=StyleSheet.create({tabBar:{left:0,right:0,bottom:0,borderTopWidth:StyleSheet.hairlineWidth,elevation:8},content:{flex:1,flexDirection:'row'}}); | ||
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/BottomTabBar.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}import React from'react';import{View,Animated,StyleSheet,Keyboard,Platform,Dimensions}from'react-native';import{NavigationContext,CommonActions,useTheme}from'@react-navigation/native';import{SafeAreaConsumer}from'react-native-safe-area-context';import BottomTabItem from'./BottomTabItem';var DEFAULT_TABBAR_HEIGHT=50;var DEFAULT_MAX_TAB_ITEM_WIDTH=125;var useNativeDriver=Platform.OS!=='web';export default function BottomTabBar(_ref){var state=_ref.state,navigation=_ref.navigation,descriptors=_ref.descriptors,activeBackgroundColor=_ref.activeBackgroundColor,activeTintColor=_ref.activeTintColor,_ref$adaptive=_ref.adaptive,adaptive=_ref$adaptive===void 0?true:_ref$adaptive,allowFontScaling=_ref.allowFontScaling,inactiveBackgroundColor=_ref.inactiveBackgroundColor,inactiveTintColor=_ref.inactiveTintColor,_ref$keyboardHidesTab=_ref.keyboardHidesTabBar,keyboardHidesTabBar=_ref$keyboardHidesTab===void 0?false:_ref$keyboardHidesTab,labelPosition=_ref.labelPosition,labelStyle=_ref.labelStyle,showIcon=_ref.showIcon,showLabel=_ref.showLabel,style=_ref.style,tabStyle=_ref.tabStyle;var _useTheme=useTheme(),colors=_useTheme.colors;var _React$useState=React.useState(Dimensions.get('window')),_React$useState2=_slicedToArray(_React$useState,2),dimensions=_React$useState2[0],setDimensions=_React$useState2[1];var _React$useState3=React.useState({height:0,width:dimensions.width}),_React$useState4=_slicedToArray(_React$useState3,2),layout=_React$useState4[0],setLayout=_React$useState4[1];var _React$useState5=React.useState(false),_React$useState6=_slicedToArray(_React$useState5,2),keyboardShown=_React$useState6[0],setKeyboardShown=_React$useState6[1];var _React$useState7=React.useState(function(){return new Animated.Value(0);}),_React$useState8=_slicedToArray(_React$useState7,1),visible=_React$useState8[0];var routes=state.routes;React.useEffect(function(){if(keyboardShown){Animated.timing(visible,{toValue:0,duration:200,useNativeDriver:useNativeDriver}).start();}},[keyboardShown,visible]);React.useEffect(function(){var handleOrientationChange=function handleOrientationChange(_ref2){var window=_ref2.window;setDimensions(window);};var handleKeyboardShow=function handleKeyboardShow(){return setKeyboardShown(true);};var handleKeyboardHide=function handleKeyboardHide(){return Animated.timing(visible,{toValue:1,duration:250,useNativeDriver:useNativeDriver}).start(function(_ref3){var finished=_ref3.finished;if(finished){setKeyboardShown(false);}});};Dimensions.addEventListener('change',handleOrientationChange);if(Platform.OS==='ios'){Keyboard.addListener('keyboardWillShow',handleKeyboardShow);Keyboard.addListener('keyboardWillHide',handleKeyboardHide);}else{Keyboard.addListener('keyboardDidShow',handleKeyboardShow);Keyboard.addListener('keyboardDidHide',handleKeyboardHide);}return function(){Dimensions.removeEventListener('change',handleOrientationChange);if(Platform.OS==='ios'){Keyboard.removeListener('keyboardWillShow',handleKeyboardShow);Keyboard.removeListener('keyboardWillHide',handleKeyboardHide);}else{Keyboard.removeListener('keyboardDidShow',handleKeyboardShow);Keyboard.removeListener('keyboardDidHide',handleKeyboardHide);}};},[visible]);var handleLayout=function handleLayout(e){var _e$nativeEvent$layout=e.nativeEvent.layout,height=_e$nativeEvent$layout.height,width=_e$nativeEvent$layout.width;setLayout(function(layout){if(height===layout.height&&width===layout.width){return layout;}else{return{height:height,width:width};}});};var shouldUseHorizontalLabels=function shouldUseHorizontalLabels(){if(labelPosition){return labelPosition==='beside-icon';}if(!adaptive){return false;}if(layout.width>=768){var maxTabItemWidth=DEFAULT_MAX_TAB_ITEM_WIDTH;var flattenedStyle=StyleSheet.flatten(tabStyle);if(flattenedStyle){if(typeof flattenedStyle.width==='number'){maxTabItemWidth=flattenedStyle.width;}else if(typeof flattenedStyle.maxWidth==='number'){maxTabItemWidth=flattenedStyle.maxWidth;}}return routes.length*maxTabItemWidth<=layout.width;}else{var isLandscape=dimensions.width>dimensions.height;return isLandscape;}};return React.createElement(SafeAreaConsumer,{__source:{fileName:_jsxFileName,lineNumber:161}},function(insets){return React.createElement(Animated.View,{style:[styles.tabBar,{backgroundColor:colors.card,borderTopColor:colors.border},keyboardHidesTabBar?{transform:[{translateY:visible.interpolate({inputRange:[0,1],outputRange:[layout.height,0]})}],position:keyboardShown?'absolute':null}:null,{height:DEFAULT_TABBAR_HEIGHT+(insets?insets.bottom:0),paddingBottom:insets?insets.bottom:0},style],pointerEvents:keyboardHidesTabBar&&keyboardShown?'none':'auto',__source:{fileName:_jsxFileName,lineNumber:163}},React.createElement(View,{style:styles.content,onLayout:handleLayout,__source:{fileName:_jsxFileName,lineNumber:194}},routes.map(function(route,index){var focused=index===state.index;var options=descriptors[route.key].options;var onPress=function onPress(){var event=navigation.emit({type:'tabPress',target:route.key,canPreventDefault:true});if(!focused&&!event.defaultPrevented){navigation.dispatch(_objectSpread({},CommonActions.navigate(route.name),{target:state.key}));}};var onLongPress=function onLongPress(){navigation.emit({type:'tabLongPress',target:route.key});};var label=options.tabBarLabel!==undefined?options.tabBarLabel:options.title!==undefined?options.title:route.name;var accessibilityLabel=options.tabBarAccessibilityLabel!==undefined?options.tabBarAccessibilityLabel:typeof label==='string'?label+", tab, "+(index+1)+" of "+routes.length:undefined;return React.createElement(NavigationContext.Provider,{key:route.key,value:descriptors[route.key].navigation,__source:{fileName:_jsxFileName,lineNumber:236}},React.createElement(BottomTabItem,{route:route,focused:focused,horizontal:shouldUseHorizontalLabels(),onPress:onPress,onLongPress:onLongPress,accessibilityLabel:accessibilityLabel,testID:options.tabBarTestID,allowFontScaling:allowFontScaling,activeTintColor:activeTintColor,inactiveTintColor:inactiveTintColor,activeBackgroundColor:activeBackgroundColor,inactiveBackgroundColor:inactiveBackgroundColor,button:options.tabBarButton,icon:options.tabBarIcon,label:label,showIcon:showIcon,showLabel:showLabel,labelStyle:labelStyle,style:tabStyle,__source:{fileName:_jsxFileName,lineNumber:240}}));})));});}var styles=StyleSheet.create({tabBar:{left:0,right:0,bottom:0,borderTopWidth:StyleSheet.hairlineWidth,elevation:8},content:{flex:1,flexDirection:'row'}}); | ||
//# sourceMappingURL=BottomTabBar.js.map |
@@ -1,2 +0,2 @@ | ||
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/BottomTabItem.tsx";import React from'react';import{View,TouchableWithoutFeedback,Animated,StyleSheet}from'react-native';import{useTheme}from'@react-navigation/native';import Color from'color';import TabBarIcon from'./TabBarIcon';export default function BottomTabBarItem(_ref){var focused=_ref.focused,route=_ref.route,label=_ref.label,icon=_ref.icon,_ref$button=_ref.button,button=_ref$button===void 0?function(_ref2){var children=_ref2.children,style=_ref2.style,rest=_objectWithoutProperties(_ref2,["children","style"]);return React.createElement(TouchableWithoutFeedback,_extends({},rest,{__source:{fileName:_jsxFileName,lineNumber:108}}),React.createElement(View,{style:style,__source:{fileName:_jsxFileName,lineNumber:109}},children));}:_ref$button,accessibilityLabel=_ref.accessibilityLabel,testID=_ref.testID,onPress=_ref.onPress,onLongPress=_ref.onLongPress,horizontal=_ref.horizontal,customActiveTintColor=_ref.activeTintColor,customInactiveTintColor=_ref.inactiveTintColor,_ref$activeBackground=_ref.activeBackgroundColor,activeBackgroundColor=_ref$activeBackground===void 0?'transparent':_ref$activeBackground,_ref$inactiveBackgrou=_ref.inactiveBackgroundColor,inactiveBackgroundColor=_ref$inactiveBackgrou===void 0?'transparent':_ref$inactiveBackgrou,_ref$showLabel=_ref.showLabel,showLabel=_ref$showLabel===void 0?true:_ref$showLabel,_ref$showIcon=_ref.showIcon,showIcon=_ref$showIcon===void 0?true:_ref$showIcon,allowFontScaling=_ref.allowFontScaling,labelStyle=_ref.labelStyle,style=_ref.style;var _useTheme=useTheme(),colors=_useTheme.colors;var activeTintColor=customActiveTintColor===undefined?colors.primary:customActiveTintColor;var inactiveTintColor=customInactiveTintColor===undefined?Color(colors.text).mix(Color(colors.card),0.5).hex():customInactiveTintColor;var renderLabel=function renderLabel(_ref3){var focused=_ref3.focused;if(showLabel===false){return null;}var color=focused?activeTintColor:inactiveTintColor;if(typeof label==='string'){return React.createElement(Animated.Text,{numberOfLines:1,style:[styles.label,{color:color},showIcon&&horizontal?styles.labelBeside:styles.labelBeneath,labelStyle],allowFontScaling:allowFontScaling,__source:{fileName:_jsxFileName,lineNumber:150}},label);}if(typeof label==='string'){return label;}return label({focused:focused,color:color});};var renderIcon=function renderIcon(_ref4){var focused=_ref4.focused;if(showIcon===false||icon===undefined){return null;}var activeOpacity=focused?1:0;var inactiveOpacity=focused?0:1;return React.createElement(TabBarIcon,{route:route,size:horizontal?17:24,activeOpacity:activeOpacity,inactiveOpacity:inactiveOpacity,activeTintColor:activeTintColor,inactiveTintColor:inactiveTintColor,renderIcon:icon,style:horizontal?styles.iconHorizontal:styles.iconVertical,__source:{fileName:_jsxFileName,lineNumber:181}});};var scene={route:route,focused:focused};var backgroundColor=focused?activeBackgroundColor:inactiveBackgroundColor;return button({onPress:onPress,onLongPress:onLongPress,testID:testID,accessibilityLabel:accessibilityLabel,accessibilityRole:'button',accessibilityStates:focused?['selected']:[],style:[styles.tab,{backgroundColor:backgroundColor},horizontal?styles.tabLandscape:styles.tabPortrait,style],children:React.createElement(React.Fragment,{__source:{fileName:_jsxFileName,lineNumber:214}},renderIcon(scene),renderLabel(scene))});}var styles=StyleSheet.create({tab:{flex:1,alignItems:'center'},tabPortrait:{justifyContent:'flex-end',flexDirection:'column'},tabLandscape:{justifyContent:'center',flexDirection:'row'},iconVertical:{flex:1},iconHorizontal:{height:'100%'},label:{textAlign:'center',backgroundColor:'transparent'},labelBeneath:{fontSize:11,marginBottom:1.5},labelBeside:{fontSize:12,marginLeft:20}}); | ||
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/BottomTabItem.tsx";import React from'react';import{View,TouchableWithoutFeedback,Animated,StyleSheet}from'react-native';import{useTheme}from'@react-navigation/native';import Color from'color';import TabBarIcon from'./TabBarIcon';export default function BottomTabBarItem(_ref){var focused=_ref.focused,route=_ref.route,label=_ref.label,icon=_ref.icon,_ref$button=_ref.button,button=_ref$button===void 0?function(_ref2){var children=_ref2.children,style=_ref2.style,rest=_objectWithoutProperties(_ref2,["children","style"]);return React.createElement(TouchableWithoutFeedback,_extends({},rest,{__source:{fileName:_jsxFileName,lineNumber:108}}),React.createElement(View,{style:style,__source:{fileName:_jsxFileName,lineNumber:109}},children));}:_ref$button,accessibilityLabel=_ref.accessibilityLabel,testID=_ref.testID,onPress=_ref.onPress,onLongPress=_ref.onLongPress,horizontal=_ref.horizontal,customActiveTintColor=_ref.activeTintColor,customInactiveTintColor=_ref.inactiveTintColor,_ref$activeBackground=_ref.activeBackgroundColor,activeBackgroundColor=_ref$activeBackground===void 0?'transparent':_ref$activeBackground,_ref$inactiveBackgrou=_ref.inactiveBackgroundColor,inactiveBackgroundColor=_ref$inactiveBackgrou===void 0?'transparent':_ref$inactiveBackgrou,_ref$showLabel=_ref.showLabel,showLabel=_ref$showLabel===void 0?true:_ref$showLabel,_ref$showIcon=_ref.showIcon,showIcon=_ref$showIcon===void 0?true:_ref$showIcon,allowFontScaling=_ref.allowFontScaling,labelStyle=_ref.labelStyle,style=_ref.style;var _useTheme=useTheme(),colors=_useTheme.colors;var activeTintColor=customActiveTintColor===undefined?colors.primary:customActiveTintColor;var inactiveTintColor=customInactiveTintColor===undefined?Color(colors.text).mix(Color(colors.card),0.5).hex():customInactiveTintColor;var renderLabel=function renderLabel(_ref3){var focused=_ref3.focused;if(showLabel===false){return null;}var color=focused?activeTintColor:inactiveTintColor;if(typeof label==='string'){return React.createElement(Animated.Text,{numberOfLines:1,style:[styles.label,{color:color},showIcon&&horizontal?styles.labelBeside:styles.labelBeneath,labelStyle],allowFontScaling:allowFontScaling,__source:{fileName:_jsxFileName,lineNumber:150}},label);}if(typeof label==='string'){return label;}return label({focused:focused,color:color});};var renderIcon=function renderIcon(_ref4){var focused=_ref4.focused;if(showIcon===false||icon===undefined){return null;}var activeOpacity=focused?1:0;var inactiveOpacity=focused?0:1;return React.createElement(TabBarIcon,{route:route,size:horizontal?17:24,activeOpacity:activeOpacity,inactiveOpacity:inactiveOpacity,activeTintColor:activeTintColor,inactiveTintColor:inactiveTintColor,renderIcon:icon,style:horizontal?styles.iconHorizontal:styles.iconVertical,__source:{fileName:_jsxFileName,lineNumber:181}});};var scene={route:route,focused:focused};var backgroundColor=focused?activeBackgroundColor:inactiveBackgroundColor;return button({onPress:onPress,onLongPress:onLongPress,testID:testID,accessibilityLabel:accessibilityLabel,accessibilityRole:'button',accessibilityStates:focused?['selected']:[],style:[styles.tab,{backgroundColor:backgroundColor},horizontal?styles.tabLandscape:styles.tabPortrait,style],children:React.createElement(React.Fragment,{__source:{fileName:_jsxFileName,lineNumber:214}},renderIcon(scene),renderLabel(scene))});}var styles=StyleSheet.create({tab:{flex:1,alignItems:'center'},tabPortrait:{justifyContent:'flex-end',flexDirection:'column'},tabLandscape:{justifyContent:'center',flexDirection:'row'},iconVertical:{flex:1},iconHorizontal:{height:'100%'},label:{textAlign:'center',backgroundColor:'transparent'},labelBeneath:{fontSize:11,marginBottom:1.5},labelBeside:{fontSize:12,marginLeft:20}}); | ||
//# sourceMappingURL=BottomTabItem.js.map |
@@ -1,2 +0,2 @@ | ||
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _extends from"@babel/runtime/helpers/extends";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/BottomTabView.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}import*as React from'react';import{View,StyleSheet}from'react-native';import{useTheme}from'@react-navigation/native';import{ScreenContainer}from'react-native-screens';import SafeAreaProviderCompat from'./SafeAreaProviderCompat';import ResourceSavingScene from'./ResourceSavingScene';import BottomTabBar from'./BottomTabBar';function SceneContent(_ref){var isFocused=_ref.isFocused,children=_ref.children;var _useTheme=useTheme(),colors=_useTheme.colors;return React.createElement(View,{accessibilityElementsHidden:!isFocused,importantForAccessibility:isFocused?'auto':'no-hide-descendants',style:[styles.content,{backgroundColor:colors.background}],__source:{fileName:_jsxFileName,lineNumber:39}},children);}var BottomTabView=function(_React$Component){_inherits(BottomTabView,_React$Component);function BottomTabView(){var _getPrototypeOf2;var _this;_classCallCheck(this,BottomTabView);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(BottomTabView)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.state={loaded:[_this.props.state.index]};_this.renderTabBar=function(){var _this$props=_this.props,_this$props$tabBar=_this$props.tabBar,tabBar=_this$props$tabBar===void 0?function(props){return React.createElement(BottomTabBar,_extends({},props,{__source:{fileName:_jsxFileName,lineNumber:71}}));}:_this$props$tabBar,tabBarOptions=_this$props.tabBarOptions,state=_this$props.state,navigation=_this$props.navigation;var descriptors=_this.props.descriptors;var route=state.routes[state.index];var descriptor=descriptors[route.key];var options=descriptor.options;if(options.tabBarVisible===false){return null;}return tabBar(_objectSpread({},tabBarOptions,{state:state,descriptors:descriptors,navigation:navigation}));};return _this;}_createClass(BottomTabView,[{key:"render",value:function render(){var _this$props2=this.props,state=_this$props2.state,descriptors=_this$props2.descriptors,lazy=_this$props2.lazy;var routes=state.routes;var loaded=this.state.loaded;return React.createElement(SafeAreaProviderCompat,{__source:{fileName:_jsxFileName,lineNumber:100}},React.createElement(View,{style:styles.container,__source:{fileName:_jsxFileName,lineNumber:101}},React.createElement(ScreenContainer,{style:styles.pages,__source:{fileName:_jsxFileName,lineNumber:102}},routes.map(function(route,index){var descriptor=descriptors[route.key];var unmountOnBlur=descriptor.options.unmountOnBlur;var isFocused=state.index===index;if(unmountOnBlur&&!isFocused){return null;}if(lazy&&!loaded.includes(index)&&!isFocused){return null;}return React.createElement(ResourceSavingScene,{key:route.key,style:StyleSheet.absoluteFill,isVisible:isFocused,__source:{fileName:_jsxFileName,lineNumber:118}},React.createElement(SceneContent,{isFocused:isFocused,__source:{fileName:_jsxFileName,lineNumber:123}},descriptor.render()));})),this.renderTabBar()));}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(nextProps,prevState){var index=nextProps.state.index;return{loaded:prevState.loaded.includes(index)?prevState.loaded:[].concat(_toConsumableArray(prevState.loaded),[index])};}}]);return BottomTabView;}(React.Component);BottomTabView.defaultProps={lazy:true};export{BottomTabView as default};var styles=StyleSheet.create({container:{flex:1,overflow:'hidden'},pages:{flex:1},content:{flex:1}}); | ||
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _extends from"@babel/runtime/helpers/extends";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/BottomTabView.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}import*as React from'react';import{View,StyleSheet}from'react-native';import{useTheme}from'@react-navigation/native';import{ScreenContainer}from'react-native-screens';import SafeAreaProviderCompat from'./SafeAreaProviderCompat';import ResourceSavingScene from'./ResourceSavingScene';import BottomTabBar from'./BottomTabBar';function SceneContent(_ref){var isFocused=_ref.isFocused,children=_ref.children;var _useTheme=useTheme(),colors=_useTheme.colors;return React.createElement(View,{accessibilityElementsHidden:!isFocused,importantForAccessibility:isFocused?'auto':'no-hide-descendants',style:[styles.content,{backgroundColor:colors.background}],__source:{fileName:_jsxFileName,lineNumber:39}},children);}var BottomTabView=function(_React$Component){_inherits(BottomTabView,_React$Component);function BottomTabView(){var _getPrototypeOf2;var _this;_classCallCheck(this,BottomTabView);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(BottomTabView)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.state={loaded:[_this.props.state.index]};_this.renderTabBar=function(){var _this$props=_this.props,_this$props$tabBar=_this$props.tabBar,tabBar=_this$props$tabBar===void 0?function(props){return React.createElement(BottomTabBar,_extends({},props,{__source:{fileName:_jsxFileName,lineNumber:71}}));}:_this$props$tabBar,tabBarOptions=_this$props.tabBarOptions,state=_this$props.state,navigation=_this$props.navigation;var descriptors=_this.props.descriptors;var route=state.routes[state.index];var descriptor=descriptors[route.key];var options=descriptor.options;if(options.tabBarVisible===false){return null;}return tabBar(_objectSpread({},tabBarOptions,{state:state,descriptors:descriptors,navigation:navigation}));};return _this;}_createClass(BottomTabView,[{key:"render",value:function render(){var _this$props2=this.props,state=_this$props2.state,descriptors=_this$props2.descriptors,lazy=_this$props2.lazy;var routes=state.routes;var loaded=this.state.loaded;return React.createElement(SafeAreaProviderCompat,{__source:{fileName:_jsxFileName,lineNumber:100}},React.createElement(View,{style:styles.container,__source:{fileName:_jsxFileName,lineNumber:101}},React.createElement(ScreenContainer,{style:styles.pages,__source:{fileName:_jsxFileName,lineNumber:102}},routes.map(function(route,index){var descriptor=descriptors[route.key];var unmountOnBlur=descriptor.options.unmountOnBlur;var isFocused=state.index===index;if(unmountOnBlur&&!isFocused){return null;}if(lazy&&!loaded.includes(index)&&!isFocused){return null;}return React.createElement(ResourceSavingScene,{key:route.key,style:StyleSheet.absoluteFill,isVisible:isFocused,__source:{fileName:_jsxFileName,lineNumber:118}},React.createElement(SceneContent,{isFocused:isFocused,__source:{fileName:_jsxFileName,lineNumber:123}},descriptor.render()));})),this.renderTabBar()));}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(nextProps,prevState){var index=nextProps.state.index;return{loaded:prevState.loaded.includes(index)?prevState.loaded:[].concat(_toConsumableArray(prevState.loaded),[index])};}}]);return BottomTabView;}(React.Component);BottomTabView.defaultProps={lazy:true};export{BottomTabView as default};var styles=StyleSheet.create({container:{flex:1,overflow:'hidden'},pages:{flex:1},content:{flex:1}}); | ||
//# sourceMappingURL=BottomTabView.js.map |
@@ -1,2 +0,2 @@ | ||
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/ResourceSavingScene.tsx";import*as React from'react';import{Platform,StyleSheet,View}from'react-native';import{Screen,screensEnabled}from'react-native-screens';var FAR_FAR_AWAY=3000;var ResourceSavingScene=function(_React$Component){_inherits(ResourceSavingScene,_React$Component);function ResourceSavingScene(){_classCallCheck(this,ResourceSavingScene);return _possibleConstructorReturn(this,_getPrototypeOf(ResourceSavingScene).apply(this,arguments));}_createClass(ResourceSavingScene,[{key:"render",value:function render(){if(screensEnabled==null?void 0:screensEnabled()){var _this$props=this.props,_isVisible=_this$props.isVisible,_rest=_objectWithoutProperties(_this$props,["isVisible"]);return React.createElement(Screen,_extends({active:_isVisible?1:0},_rest,{__source:{fileName:_jsxFileName,lineNumber:20}}));}var _this$props2=this.props,isVisible=_this$props2.isVisible,children=_this$props2.children,style=_this$props2.style,rest=_objectWithoutProperties(_this$props2,["isVisible","children","style"]);return React.createElement(View,_extends({style:[styles.container,style,{opacity:isVisible?1:0}],collapsable:false,removeClippedSubviews:Platform.OS==='ios'?!isVisible:true,pointerEvents:isVisible?'auto':'none'},rest,{__source:{fileName:_jsxFileName,lineNumber:26}}),React.createElement(View,{style:isVisible?styles.attached:styles.detached,__source:{fileName:_jsxFileName,lineNumber:37}},children));}}]);return ResourceSavingScene;}(React.Component);export{ResourceSavingScene as default};var styles=StyleSheet.create({container:{flex:1,overflow:'hidden'},attached:{flex:1},detached:{flex:1,top:FAR_FAR_AWAY}}); | ||
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/ResourceSavingScene.tsx";import*as React from'react';import{Platform,StyleSheet,View}from'react-native';import{Screen,screensEnabled}from'react-native-screens';var FAR_FAR_AWAY=3000;var ResourceSavingScene=function(_React$Component){_inherits(ResourceSavingScene,_React$Component);function ResourceSavingScene(){_classCallCheck(this,ResourceSavingScene);return _possibleConstructorReturn(this,_getPrototypeOf(ResourceSavingScene).apply(this,arguments));}_createClass(ResourceSavingScene,[{key:"render",value:function render(){if(screensEnabled==null?void 0:screensEnabled()){var _this$props=this.props,_isVisible=_this$props.isVisible,_rest=_objectWithoutProperties(_this$props,["isVisible"]);return React.createElement(Screen,_extends({active:_isVisible?1:0},_rest,{__source:{fileName:_jsxFileName,lineNumber:20}}));}var _this$props2=this.props,isVisible=_this$props2.isVisible,children=_this$props2.children,style=_this$props2.style,rest=_objectWithoutProperties(_this$props2,["isVisible","children","style"]);return React.createElement(View,_extends({style:[styles.container,style,{opacity:isVisible?1:0}],collapsable:false,removeClippedSubviews:Platform.OS==='ios'?!isVisible:true,pointerEvents:isVisible?'auto':'none'},rest,{__source:{fileName:_jsxFileName,lineNumber:26}}),React.createElement(View,{style:isVisible?styles.attached:styles.detached,__source:{fileName:_jsxFileName,lineNumber:37}},children));}}]);return ResourceSavingScene;}(React.Component);export{ResourceSavingScene as default};var styles=StyleSheet.create({container:{flex:1,overflow:'hidden'},attached:{flex:1},detached:{flex:1,top:FAR_FAR_AWAY}}); | ||
//# sourceMappingURL=ResourceSavingScene.js.map |
@@ -1,2 +0,2 @@ | ||
var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/SafeAreaProviderCompat.tsx";import*as React from'react';import{SafeAreaProvider,SafeAreaConsumer}from'react-native-safe-area-context';import{getStatusBarHeight,getBottomSpace}from'react-native-iphone-x-helper';var initialSafeAreaInsets={top:getStatusBarHeight(true),bottom:getBottomSpace(),right:0,left:0};export default function SafeAreaProviderCompat(_ref){var children=_ref.children;return React.createElement(SafeAreaConsumer,{__source:{fileName:_jsxFileName,lineNumber:24}},function(insets){if(insets){return children;}return React.createElement(SafeAreaProvider,{initialSafeAreaInsets:initialSafeAreaInsets,__source:{fileName:_jsxFileName,lineNumber:34}},children);});} | ||
var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/SafeAreaProviderCompat.tsx";import*as React from'react';import{SafeAreaProvider,SafeAreaConsumer}from'react-native-safe-area-context';import{getStatusBarHeight,getBottomSpace}from'react-native-iphone-x-helper';var initialSafeAreaInsets={top:getStatusBarHeight(true),bottom:getBottomSpace(),right:0,left:0};export default function SafeAreaProviderCompat(_ref){var children=_ref.children;return React.createElement(SafeAreaConsumer,{__source:{fileName:_jsxFileName,lineNumber:24}},function(insets){if(insets){return children;}return React.createElement(SafeAreaProvider,{initialSafeAreaInsets:initialSafeAreaInsets,__source:{fileName:_jsxFileName,lineNumber:34}},children);});} | ||
//# sourceMappingURL=SafeAreaProviderCompat.js.map |
@@ -1,2 +0,2 @@ | ||
var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/bottom-tabs/src/views/TabBarIcon.tsx";import React from'react';import{View,StyleSheet}from'react-native';export default function TabBarIcon(_ref){var activeOpacity=_ref.activeOpacity,inactiveOpacity=_ref.inactiveOpacity,activeTintColor=_ref.activeTintColor,inactiveTintColor=_ref.inactiveTintColor,renderIcon=_ref.renderIcon,size=_ref.size,style=_ref.style;return React.createElement(View,{style:style,__source:{fileName:_jsxFileName,lineNumber:32}},React.createElement(View,{style:[styles.icon,{opacity:activeOpacity}],__source:{fileName:_jsxFileName,lineNumber:33}},renderIcon({focused:true,size:size,color:activeTintColor})),React.createElement(View,{style:[styles.icon,{opacity:inactiveOpacity}],__source:{fileName:_jsxFileName,lineNumber:40}},renderIcon({focused:false,size:size,color:inactiveTintColor})));}var styles=StyleSheet.create({icon:{position:'absolute',alignSelf:'center',alignItems:'center',justifyContent:'center',height:'100%',width:'100%',minWidth:25}}); | ||
var _jsxFileName="/Users/osdnk/work/navigation-ex/packages/bottom-tabs/src/views/TabBarIcon.tsx";import React from'react';import{View,StyleSheet}from'react-native';export default function TabBarIcon(_ref){var activeOpacity=_ref.activeOpacity,inactiveOpacity=_ref.inactiveOpacity,activeTintColor=_ref.activeTintColor,inactiveTintColor=_ref.inactiveTintColor,renderIcon=_ref.renderIcon,size=_ref.size,style=_ref.style;return React.createElement(View,{style:style,__source:{fileName:_jsxFileName,lineNumber:32}},React.createElement(View,{style:[styles.icon,{opacity:activeOpacity}],__source:{fileName:_jsxFileName,lineNumber:33}},renderIcon({focused:true,size:size,color:activeTintColor})),React.createElement(View,{style:[styles.icon,{opacity:inactiveOpacity}],__source:{fileName:_jsxFileName,lineNumber:40}},renderIcon({focused:false,size:size,color:inactiveTintColor})));}var styles=StyleSheet.create({icon:{position:'absolute',alignSelf:'center',alignItems:'center',justifyContent:'center',height:'100%',width:'100%',minWidth:25}}); | ||
//# sourceMappingURL=TabBarIcon.js.map |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version": "5.0.0-alpha.43", | ||
"version": "5.0.0-alpha.44", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/bottom-tabs", | ||
"dependencies": { | ||
"@react-navigation/routers": "^5.0.0-alpha.31", | ||
"@react-navigation/routers": "^5.0.0-alpha.32", | ||
"color": "^3.1.2", | ||
@@ -70,3 +70,3 @@ "react-native-iphone-x-helper": "^1.2.1" | ||
}, | ||
"gitHead": "ba85db28d4a26c7ac2514497308ec98b55c8d26a" | ||
"gitHead": "25c3fc440fdbff662b6e456726571d169c7c9774" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
203442
1550
+ Addedcaniuse-lite@1.0.30001689(transitive)
+ Addedelectron-to-chromium@1.5.74(transitive)
+ Addedresolve@1.22.9(transitive)
- Removedcaniuse-lite@1.0.30001690(transitive)
- Removedelectron-to-chromium@1.5.75(transitive)
- Removedresolve@1.22.10(transitive)