Socket
Socket
Sign inDemoInstall

react-navigation-material-bottom-tabs

Package Overview
Dependencies
532
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.3 to 2.1.4

2

lib/commonjs/views/MaterialBottomTabView.js

@@ -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 _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNavigation=require("react-navigation");var _reactNativePaper=require("react-native-paper");var _jsxFileName="/Users/satya/Workspace/Callstack/react-navigation-material-bottom-tabs/src/views/MaterialBottomTabView.tsx";var MaterialBottomTabView=function(_React$Component){(0,_inherits2.default)(MaterialBottomTabView,_React$Component);function MaterialBottomTabView(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,MaterialBottomTabView);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)(MaterialBottomTabView)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._getColor=function(_ref){var route=_ref.route;var descriptors=_this.props.descriptors;var descriptor=descriptors[route.key];var options=descriptor.options;if(_this.context==='dark'&&options.tabBarColorDark){return options.tabBarColorDark;}else if(options.tabBarColorLight){return options.tabBarColorLight;}else{return options.tabBarColor;}};_this._getactiveColor=function(){var _this$props=_this.props,activeColor=_this$props.activeColor,activeColorLight=_this$props.activeColorLight,activeColorDark=_this$props.activeColorDark;if(_this.context==='dark'&&activeColorDark){return activeColorDark;}else if(activeColorLight){return activeColorLight;}else{return activeColor;}};_this._getInactiveColor=function(){var _this$props2=_this.props,inactiveColor=_this$props2.inactiveColor,inactiveColorLight=_this$props2.inactiveColorLight,inactiveColorDark=_this$props2.inactiveColorDark;if(_this.context==='dark'&&inactiveColorDark){return inactiveColorDark;}else if(inactiveColorLight){return inactiveColorLight;}else{return inactiveColor;}};_this._getBarStyle=function(){var _this$props3=_this.props,barStyle=_this$props3.barStyle,barStyleLight=_this$props3.barStyleLight,barStyleDark=_this$props3.barStyleDark;return[barStyle,_this.context==='dark'?barStyleDark:barStyleLight];};_this._renderIcon=function(_ref2){var route=_ref2.route,focused=_ref2.focused,color=_ref2.color;return _this.props.renderIcon({route:route,focused:focused,tintColor:color});};return _this;}(0,_createClass2.default)(MaterialBottomTabView,[{key:"_isVisible",value:function _isVisible(){var _this$props4=this.props,navigation=_this$props4.navigation,descriptors=_this$props4.descriptors;var state=navigation.state;var route=state.routes[state.index];var options=descriptors[route.key].options;return options.tabBarVisible;}},{key:"render",value:function render(){var _this$props5=this.props,navigation=_this$props5.navigation,descriptors=_this$props5.descriptors,rest=(0,_objectWithoutProperties2.default)(_this$props5,["navigation","descriptors"]);var activeColor=this._getactiveColor();var inactiveColor=this._getInactiveColor();var barStyle=this._getBarStyle();var isVisible=this._isVisible();var extraStyle=typeof isVisible==='boolean'?{display:isVisible?undefined:'none'}:null;return React.createElement(_reactNativePaper.BottomNavigation,(0,_extends2.default)({},rest,{activeColor:activeColor,inactiveColor:inactiveColor,renderIcon:this._renderIcon,barStyle:[barStyle,extraStyle],navigationState:navigation.state,getColor:this._getColor,__source:{fileName:_jsxFileName,lineNumber:116}}));}}]);return MaterialBottomTabView;}(React.Component);exports.default=MaterialBottomTabView;MaterialBottomTabView.contextType=_reactNavigation.ThemeContext;
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 _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNavigation=require("react-navigation");var _reactNativePaper=require("react-native-paper");var _jsxFileName="/Users/satya/Workspace/Callstack/react-navigation-material-bottom-tabs/src/views/MaterialBottomTabView.tsx";var MaterialBottomTabView=function(_React$Component){(0,_inherits2.default)(MaterialBottomTabView,_React$Component);function MaterialBottomTabView(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,MaterialBottomTabView);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)(MaterialBottomTabView)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._getColor=function(_ref){var route=_ref.route;var descriptors=_this.props.descriptors;var descriptor=descriptors[route.key];var options=descriptor.options;if(_this.context==='dark'&&options.tabBarColorDark){return options.tabBarColorDark;}else if(options.tabBarColorLight){return options.tabBarColorLight;}else{return options.tabBarColor;}};_this._getactiveColor=function(){var _this$props=_this.props,activeColor=_this$props.activeColor,activeColorLight=_this$props.activeColorLight,activeColorDark=_this$props.activeColorDark;if(_this.context==='dark'&&activeColorDark){return activeColorDark;}else if(activeColorLight){return activeColorLight;}else{return activeColor;}};_this._getInactiveColor=function(){var _this$props2=_this.props,inactiveColor=_this$props2.inactiveColor,inactiveColorLight=_this$props2.inactiveColorLight,inactiveColorDark=_this$props2.inactiveColorDark;if(_this.context==='dark'&&inactiveColorDark){return inactiveColorDark;}else if(inactiveColorLight){return inactiveColorLight;}else{return inactiveColor;}};_this._getBarStyle=function(){var _this$props3=_this.props,barStyle=_this$props3.barStyle,barStyleLight=_this$props3.barStyleLight,barStyleDark=_this$props3.barStyleDark;return[barStyle,_this.context==='dark'?barStyleDark:barStyleLight];};_this._renderIcon=function(_ref2){var route=_ref2.route,focused=_ref2.focused,color=_ref2.color;return _this.props.renderIcon({route:route,focused:focused,tintColor:color});};return _this;}(0,_createClass2.default)(MaterialBottomTabView,[{key:"_isVisible",value:function _isVisible(){var _this$props4=this.props,navigation=_this$props4.navigation,descriptors=_this$props4.descriptors;var state=navigation.state;var route=state.routes[state.index];var options=descriptors[route.key].options;return options.tabBarVisible;}},{key:"render",value:function render(){var _this$props5=this.props,navigation=_this$props5.navigation,descriptors=_this$props5.descriptors,rest=(0,_objectWithoutProperties2.default)(_this$props5,["navigation","descriptors"]);var activeColor=this._getactiveColor();var inactiveColor=this._getInactiveColor();var barStyle=this._getBarStyle();var isVisible=this._isVisible();var extraStyle=isVisible===false?{display:'none',position:undefined}:null;return React.createElement(_reactNativePaper.BottomNavigation,(0,_extends2.default)({},rest,{activeColor:activeColor,inactiveColor:inactiveColor,renderIcon:this._renderIcon,barStyle:[barStyle,extraStyle],navigationState:navigation.state,getColor:this._getColor,__source:{fileName:_jsxFileName,lineNumber:121}}));}}]);return MaterialBottomTabView;}(React.Component);exports.default=MaterialBottomTabView;MaterialBottomTabView.contextType=_reactNavigation.ThemeContext;
//# sourceMappingURL=MaterialBottomTabView.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/Callstack/react-navigation-material-bottom-tabs/src/views/MaterialBottomTabView.tsx";import*as React from'react';import{ThemeContext}from'react-navigation';import{BottomNavigation}from'react-native-paper';var MaterialBottomTabView=function(_React$Component){_inherits(MaterialBottomTabView,_React$Component);function MaterialBottomTabView(){var _getPrototypeOf2;var _this;_classCallCheck(this,MaterialBottomTabView);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(MaterialBottomTabView)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._getColor=function(_ref){var route=_ref.route;var descriptors=_this.props.descriptors;var descriptor=descriptors[route.key];var options=descriptor.options;if(_this.context==='dark'&&options.tabBarColorDark){return options.tabBarColorDark;}else if(options.tabBarColorLight){return options.tabBarColorLight;}else{return options.tabBarColor;}};_this._getactiveColor=function(){var _this$props=_this.props,activeColor=_this$props.activeColor,activeColorLight=_this$props.activeColorLight,activeColorDark=_this$props.activeColorDark;if(_this.context==='dark'&&activeColorDark){return activeColorDark;}else if(activeColorLight){return activeColorLight;}else{return activeColor;}};_this._getInactiveColor=function(){var _this$props2=_this.props,inactiveColor=_this$props2.inactiveColor,inactiveColorLight=_this$props2.inactiveColorLight,inactiveColorDark=_this$props2.inactiveColorDark;if(_this.context==='dark'&&inactiveColorDark){return inactiveColorDark;}else if(inactiveColorLight){return inactiveColorLight;}else{return inactiveColor;}};_this._getBarStyle=function(){var _this$props3=_this.props,barStyle=_this$props3.barStyle,barStyleLight=_this$props3.barStyleLight,barStyleDark=_this$props3.barStyleDark;return[barStyle,_this.context==='dark'?barStyleDark:barStyleLight];};_this._renderIcon=function(_ref2){var route=_ref2.route,focused=_ref2.focused,color=_ref2.color;return _this.props.renderIcon({route:route,focused:focused,tintColor:color});};return _this;}_createClass(MaterialBottomTabView,[{key:"_isVisible",value:function _isVisible(){var _this$props4=this.props,navigation=_this$props4.navigation,descriptors=_this$props4.descriptors;var state=navigation.state;var route=state.routes[state.index];var options=descriptors[route.key].options;return options.tabBarVisible;}},{key:"render",value:function render(){var _this$props5=this.props,navigation=_this$props5.navigation,descriptors=_this$props5.descriptors,rest=_objectWithoutProperties(_this$props5,["navigation","descriptors"]);var activeColor=this._getactiveColor();var inactiveColor=this._getInactiveColor();var barStyle=this._getBarStyle();var isVisible=this._isVisible();var extraStyle=typeof isVisible==='boolean'?{display:isVisible?undefined:'none'}:null;return React.createElement(BottomNavigation,_extends({},rest,{activeColor:activeColor,inactiveColor:inactiveColor,renderIcon:this._renderIcon,barStyle:[barStyle,extraStyle],navigationState:navigation.state,getColor:this._getColor,__source:{fileName:_jsxFileName,lineNumber:116}}));}}]);return MaterialBottomTabView;}(React.Component);MaterialBottomTabView.contextType=ThemeContext;export{MaterialBottomTabView as default};
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/Callstack/react-navigation-material-bottom-tabs/src/views/MaterialBottomTabView.tsx";import*as React from'react';import{ThemeContext}from'react-navigation';import{BottomNavigation}from'react-native-paper';var MaterialBottomTabView=function(_React$Component){_inherits(MaterialBottomTabView,_React$Component);function MaterialBottomTabView(){var _getPrototypeOf2;var _this;_classCallCheck(this,MaterialBottomTabView);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(MaterialBottomTabView)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._getColor=function(_ref){var route=_ref.route;var descriptors=_this.props.descriptors;var descriptor=descriptors[route.key];var options=descriptor.options;if(_this.context==='dark'&&options.tabBarColorDark){return options.tabBarColorDark;}else if(options.tabBarColorLight){return options.tabBarColorLight;}else{return options.tabBarColor;}};_this._getactiveColor=function(){var _this$props=_this.props,activeColor=_this$props.activeColor,activeColorLight=_this$props.activeColorLight,activeColorDark=_this$props.activeColorDark;if(_this.context==='dark'&&activeColorDark){return activeColorDark;}else if(activeColorLight){return activeColorLight;}else{return activeColor;}};_this._getInactiveColor=function(){var _this$props2=_this.props,inactiveColor=_this$props2.inactiveColor,inactiveColorLight=_this$props2.inactiveColorLight,inactiveColorDark=_this$props2.inactiveColorDark;if(_this.context==='dark'&&inactiveColorDark){return inactiveColorDark;}else if(inactiveColorLight){return inactiveColorLight;}else{return inactiveColor;}};_this._getBarStyle=function(){var _this$props3=_this.props,barStyle=_this$props3.barStyle,barStyleLight=_this$props3.barStyleLight,barStyleDark=_this$props3.barStyleDark;return[barStyle,_this.context==='dark'?barStyleDark:barStyleLight];};_this._renderIcon=function(_ref2){var route=_ref2.route,focused=_ref2.focused,color=_ref2.color;return _this.props.renderIcon({route:route,focused:focused,tintColor:color});};return _this;}_createClass(MaterialBottomTabView,[{key:"_isVisible",value:function _isVisible(){var _this$props4=this.props,navigation=_this$props4.navigation,descriptors=_this$props4.descriptors;var state=navigation.state;var route=state.routes[state.index];var options=descriptors[route.key].options;return options.tabBarVisible;}},{key:"render",value:function render(){var _this$props5=this.props,navigation=_this$props5.navigation,descriptors=_this$props5.descriptors,rest=_objectWithoutProperties(_this$props5,["navigation","descriptors"]);var activeColor=this._getactiveColor();var inactiveColor=this._getInactiveColor();var barStyle=this._getBarStyle();var isVisible=this._isVisible();var extraStyle=isVisible===false?{display:'none',position:undefined}:null;return React.createElement(BottomNavigation,_extends({},rest,{activeColor:activeColor,inactiveColor:inactiveColor,renderIcon:this._renderIcon,barStyle:[barStyle,extraStyle],navigationState:navigation.state,getColor:this._getColor,__source:{fileName:_jsxFileName,lineNumber:121}}));}}]);return MaterialBottomTabView;}(React.Component);MaterialBottomTabView.contextType=ThemeContext;export{MaterialBottomTabView as default};
//# sourceMappingURL=MaterialBottomTabView.js.map
{
"name": "react-navigation-material-bottom-tabs",
"version": "2.1.3",
"version": "2.1.4",
"description": "Material Bottom Tab Navigation component for React Navigation",

@@ -62,3 +62,3 @@ "main": "lib/commonjs/index.js",

"react-native-gesture-handler": "^1.4.1",
"react-native-paper": "^3.0.0-alpha.8",
"react-native-paper": "^3.1.1",
"react-native-reanimated": "^1.2.0",

@@ -72,3 +72,3 @@ "react-navigation": "^4.0.7",

"react-native": "*",
"react-native-paper": "^2.2.2 || ^3.0.0-alpha.1",
"react-native-paper": "^2.2.2 || ^3.0.0",
"react-navigation": "^4.0.7"

@@ -75,0 +75,0 @@ },

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc