diff --git a/packages/react-navigation/examples/NavigationPlayground/js/App.js b/packages/react-navigation/examples/NavigationPlayground/js/App.js index 9db6a2cb..6435338e 100644 --- a/packages/react-navigation/examples/NavigationPlayground/js/App.js +++ b/packages/react-navigation/examples/NavigationPlayground/js/App.js @@ -322,7 +322,7 @@ const AppNavigator = createStackNavigator( } ); -export default () => ; +export default AppNavigator; const styles = StyleSheet.create({ item: { diff --git a/packages/react-navigation/examples/NavigationPlayground/js/TabsWithNavigationFocus.js b/packages/react-navigation/examples/NavigationPlayground/js/TabsWithNavigationFocus.js index 79effb2c..e40b3125 100644 --- a/packages/react-navigation/examples/NavigationPlayground/js/TabsWithNavigationFocus.js +++ b/packages/react-navigation/examples/NavigationPlayground/js/TabsWithNavigationFocus.js @@ -4,10 +4,8 @@ import React from 'react'; import { SafeAreaView, StatusBar, Text, View } from 'react-native'; -import { - createBottomTabNavigator, - withNavigationFocus, -} from 'react-navigation'; +import { withNavigationFocus } from 'react-navigation'; +import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs'; import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'; import { Button } from './commonComponents/ButtonWithMargin'; @@ -80,16 +78,26 @@ const createTabScreen = (name, icon, focusedIcon, tintColor = '#673ab7') => { return withNavigationFocus(TabScreen); }; -const TabsWithNavigationFocus = createBottomTabNavigator({ - One: { - screen: createTabScreen('One', 'numeric-1-box-outline', 'numeric-1-box'), +const TabsWithNavigationFocus = createMaterialBottomTabNavigator( + { + One: { + screen: createTabScreen('One', 'numeric-1-box-outline', 'numeric-1-box'), + }, + Two: { + screen: createTabScreen('Two', 'numeric-2-box-outline', 'numeric-2-box'), + }, + Three: { + screen: createTabScreen( + 'Three', + 'numeric-3-box-outline', + 'numeric-3-box' + ), + }, }, - Two: { - screen: createTabScreen('Two', 'numeric-2-box-outline', 'numeric-2-box'), - }, - Three: { - screen: createTabScreen('Three', 'numeric-3-box-outline', 'numeric-3-box'), - }, -}); + { + shifting: false, + activeTintColor: '#F44336', + } +); export default TabsWithNavigationFocus; diff --git a/packages/react-navigation/examples/NavigationPlayground/package.json b/packages/react-navigation/examples/NavigationPlayground/package.json index e60490a6..7a8da112 100644 --- a/packages/react-navigation/examples/NavigationPlayground/package.json +++ b/packages/react-navigation/examples/NavigationPlayground/package.json @@ -16,7 +16,8 @@ "react-native": "^0.54.0", "react-native-iphone-x-helper": "^1.0.2", "react-navigation": "link:../..", - "react-navigation-header-buttons": "^0.0.4" + "react-navigation-header-buttons": "^0.0.4", + "react-navigation-material-bottom-tabs": "0.1.3" }, "devDependencies": { "babel-jest": "^22.4.1", diff --git a/packages/react-navigation/examples/NavigationPlayground/yarn.lock b/packages/react-navigation/examples/NavigationPlayground/yarn.lock index 08ee41e7..209b9834 100644 --- a/packages/react-navigation/examples/NavigationPlayground/yarn.lock +++ b/packages/react-navigation/examples/NavigationPlayground/yarn.lock @@ -2110,6 +2110,13 @@ create-react-context@^0.2.1: fbjs "^0.8.0" gud "^1.0.0" +create-react-context@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca" + dependencies: + fbjs "^0.8.0" + gud "^1.0.0" + cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -2220,7 +2227,7 @@ deepmerge@^1.3.0, deepmerge@^1.5.1: version "1.5.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753" -deepmerge@^2.0.1: +deepmerge@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.1.0.tgz#511a54fff405fc346f0240bb270a3e9533a31102" @@ -5550,6 +5557,10 @@ react-lifecycles-compat@^1.0.2: version "1.1.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-1.1.4.tgz#fc005c72849b7ed364de20a0f64ff58ebdc2009a" +react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.2.tgz#7279047275bd727a912e25f734c0559527e84eff" + react-native-branch@2.0.0-beta.3: version "2.0.0-beta.3" resolved "https://registry.yarnpkg.com/react-native-branch/-/react-native-branch-2.0.0-beta.3.tgz#2167af86bbc9f964bd45bd5f37684e5b54965e32" @@ -5589,14 +5600,15 @@ react-native-iphone-x-helper@^1.0.2: babel-plugin-module-resolver "^2.3.0" babel-preset-react-native "1.9.0" -react-native-paper@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-1.2.5.tgz#3a4480ca967aae4b3e65a987116973dd012d1fa8" +react-native-paper@=1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-1.4.0.tgz#33bd477cde1468b63e60bdb0c9a500822d03cdca" dependencies: color "^2.0.1" - create-react-context "^0.2.1" - deepmerge "^2.0.1" + create-react-context "^0.2.2" + deepmerge "^2.1.0" hoist-non-react-statics "^2.5.0" + react-lifecycles-compat "^3.0.2" react-native-platform-touchable@^1.1.1: version "1.1.1" @@ -5642,9 +5654,9 @@ react-native-svg@6.2.2: lodash "^4.16.6" pegjs "^0.10.0" -"react-native-tab-view@github:react-navigation/react-native-tab-view": +react-native-tab-view@^0.0.74: version "0.0.74" - resolved "https://codeload.github.com/react-navigation/react-native-tab-view/tar.gz/36ebd834d78b841fc19778c966465d02fd1213bb" + resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.74.tgz#62c0c882d9232b461ce181d440d683b4f99d1bd8" dependencies: prop-types "^15.6.0" @@ -5725,11 +5737,11 @@ react-native@^0.54.0: xmldoc "^0.4.0" yargs "^9.0.0" -react-navigation-deprecated-tab-navigator@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.0.1.tgz#a869d749d16116630411d6c7761c51484ba90175" +react-navigation-deprecated-tab-navigator@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.1.0.tgz#58945c1c4c7c21b54954e814e8721e98423df75d" dependencies: - react-native-tab-view react-navigation/react-native-tab-view + react-native-tab-view "^0.0.74" react-navigation-header-buttons@^0.0.4: version "0.0.4" @@ -5737,14 +5749,22 @@ react-navigation-header-buttons@^0.0.4: dependencies: react-native-platform-touchable "^1.1.1" -react-navigation-tabs@0.1.0-alpha.5: - version "0.1.0-alpha.5" - resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.1.0-alpha.5.tgz#51cae3ea5f0f77bdf0deb50a855a5dcaa2f9bf1e" +react-navigation-material-bottom-tabs@0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/react-navigation-material-bottom-tabs/-/react-navigation-material-bottom-tabs-0.1.3.tgz#8e11c3d57ebb72d19adf5e4764390729ed964072" + dependencies: + hoist-non-react-statics "^2.5.0" + prop-types "^15.6.0" + react-native-paper "=1.4.0" + react-navigation-tabs "0.2.0-rc.0" + +react-navigation-tabs@0.2.0-rc.0: + version "0.2.0-rc.0" + resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.2.0-rc.0.tgz#671e8c9914b915796879329752f7240147494038" dependencies: hoist-non-react-statics "^2.5.0" prop-types "^15.6.0" react-lifecycles-compat "^1.0.2" - react-native-paper "^1.2.5" react-native-safe-area-view "^0.7.0" react-native-tab-view "~0.0.77" diff --git a/packages/react-navigation/flow/react-navigation.js b/packages/react-navigation/flow/react-navigation.js index 57df21db..30ea9dd4 100644 --- a/packages/react-navigation/flow/react-navigation.js +++ b/packages/react-navigation/flow/react-navigation.js @@ -809,10 +809,6 @@ declare module 'react-navigation' { routeConfigs: NavigationRouteConfigMap, config?: _TabNavigatorConfig ): NavigationContainer<*, *, *>; - declare export function createMaterialBottomTabNavigator( - routeConfigs: NavigationRouteConfigMap, - config?: _TabNavigatorConfig - ): NavigationContainer<*, *, *>; declare export function createMaterialTopTabNavigator( routeConfigs: NavigationRouteConfigMap, config?: _TabNavigatorConfig diff --git a/packages/react-navigation/package.json b/packages/react-navigation/package.json index 95d789c9..127a55ba 100644 --- a/packages/react-navigation/package.json +++ b/packages/react-navigation/package.json @@ -38,7 +38,7 @@ "react-native-drawer-layout-polyfill": "^1.3.2", "react-native-safe-area-view": "^0.7.0", "react-navigation-deprecated-tab-navigator": "1.1.0", - "react-navigation-tabs": "0.1.0-alpha.8" + "react-navigation-tabs": "0.2.0-rc.0" }, "devDependencies": { "babel-cli": "^6.24.1", diff --git a/packages/react-navigation/src/react-navigation.js b/packages/react-navigation/src/react-navigation.js index e0d59c2e..d93c0dcc 100644 --- a/packages/react-navigation/src/react-navigation.js +++ b/packages/react-navigation/src/react-navigation.js @@ -57,9 +57,6 @@ module.exports = { get createBottomTabNavigator() { return require('react-navigation-tabs').createBottomTabNavigator; }, - get createMaterialBottomTabNavigator() { - return require('react-navigation-tabs').createMaterialBottomTabNavigator; - }, get createMaterialTopTabNavigator() { return require('react-navigation-tabs').createMaterialTopTabNavigator; }, diff --git a/packages/react-navigation/yarn.lock b/packages/react-navigation/yarn.lock index f793b714..25b0a253 100644 --- a/packages/react-navigation/yarn.lock +++ b/packages/react-navigation/yarn.lock @@ -1372,34 +1372,20 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0, color-convert@^1.9.1: +color-convert@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: color-name "^1.1.1" -color-name@^1.0.0, color-name@^1.1.1: +color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -color-string@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.2.tgz#26e45814bc3c9a7cbd6751648a41434514a773a9" - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" -color@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color/-/color-2.0.1.tgz#e4ed78a3c4603d0891eba5430b04b86314f4c839" - dependencies: - color-convert "^1.9.1" - color-string "^1.5.2" - combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" @@ -1594,13 +1580,6 @@ create-react-context@^0.2.1: fbjs "^0.8.0" gud "^1.0.0" -create-react-context@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca" - dependencies: - fbjs "^0.8.0" - gud "^1.0.0" - cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -1700,10 +1679,6 @@ deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" -deepmerge@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.1.0.tgz#511a54fff405fc346f0240bb270a3e9533a31102" - default-require-extensions@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" @@ -2933,10 +2908,6 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" -is-arrayish@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.1.tgz#c2dfc386abaa0c3e33c48db3fe87059e69065efd" - is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -4890,7 +4861,7 @@ react-lifecycles-compat@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-1.0.2.tgz#551d8b1d156346e5fcf30ffac9b32ce3f78b8850" -react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.2: +react-lifecycles-compat@^3: version "3.0.2" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.2.tgz#7279047275bd727a912e25f734c0559527e84eff" @@ -4910,16 +4881,6 @@ react-native-drawer-layout@1.3.2: dependencies: react-native-dismiss-keyboard "1.0.0" -react-native-paper@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-1.4.1.tgz#81df909c14d9ae78274662df97c3b35224aa39a9" - dependencies: - color "^2.0.1" - create-react-context "^0.2.2" - deepmerge "^2.1.0" - hoist-non-react-statics "^2.5.0" - react-lifecycles-compat "^3.0.2" - react-native-safe-area-view@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.7.0.tgz#38f5ab9368d6ef9e5d18ab64212938af3ec39421" @@ -5011,14 +4972,13 @@ react-navigation-deprecated-tab-navigator@1.1.0: dependencies: react-native-tab-view "^0.0.74" -react-navigation-tabs@0.1.0-alpha.8: - version "0.1.0-alpha.8" - resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.1.0-alpha.8.tgz#bb18699f8496a00f9911c9c75cce243d299c2423" +react-navigation-tabs@0.2.0-rc.0: + version "0.2.0-rc.0" + resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.2.0-rc.0.tgz#671e8c9914b915796879329752f7240147494038" dependencies: hoist-non-react-statics "^2.5.0" prop-types "^15.6.0" react-lifecycles-compat "^1.0.2" - react-native-paper "^1.4.0" react-native-safe-area-view "^0.7.0" react-native-tab-view "~0.0.77" @@ -5570,12 +5530,6 @@ simple-plist@^0.2.1: bplist-parser "0.1.1" plist "2.0.1" -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" - dependencies: - is-arrayish "^0.3.1" - slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"