├── .circleci └── config.yml ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── stale.yml ├── .gitignore ├── .release-it.json ├── LICENSE.md ├── README.md ├── commitlint.config.js ├── example ├── .babelrc ├── .buckconfig ├── .eslintrc ├── .watchmanconfig ├── App.tsx ├── README.md ├── app.json ├── metro.config.js ├── package.json ├── src │ ├── IconTabs.tsx │ ├── ShiftingTabs.tsx │ ├── SimpleTabs.tsx │ └── shared │ │ ├── PhotoGrid.tsx │ │ └── tabBarIcon.tsx └── yarn.lock ├── flow-typed └── npm │ ├── @expo │ └── vector-icons_vx.x.x.js │ ├── babel-jest_vx.x.x.js │ ├── babel-plugin-syntax-class-properties_vx.x.x.js │ ├── babel-plugin-syntax-jsx_vx.x.x.js │ ├── babel-plugin-syntax-object-rest-spread_vx.x.x.js │ ├── babel-plugin-transform-flow-strip-types_vx.x.x.js │ ├── babel-preset-react-native_vx.x.x.js │ ├── enzyme-adapter-react-16_vx.x.x.js │ ├── enzyme-to-json_vx.x.x.js │ ├── enzyme_v3.x.x.js │ ├── eslint-config-satya164_vx.x.x.js │ ├── eslint-plugin-react-native-globals_vx.x.x.js │ ├── eslint_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── hoist-non-react-statics_v2.x.x.js │ ├── jest_v21.x.x.js │ ├── prettier_v1.x.x.js │ ├── prop-types_v15.x.x.js │ ├── react-lifecycles-compat_vx.x.x.js │ ├── react-native-paper_vx.x.x.js │ ├── react-native-safe-area-view_vx.x.x.js │ ├── react-native-tab-view_vx.x.x.js │ ├── react-navigation_vx.x.x.js │ └── react-test-renderer_v16.x.x.js ├── package.json ├── src ├── index.tsx ├── navigators │ └── createMaterialBottomTabNavigator.tsx ├── types.tsx └── views │ └── MaterialBottomTabView.tsx ├── tsconfig.json └── yarn.lock /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | defaults: &defaults 4 | docker: 5 | - image: circleci/node:10 6 | working_directory: ~/project 7 | 8 | jobs: 9 | install-dependencies: 10 | <<: *defaults 11 | steps: 12 | - checkout 13 | - attach_workspace: 14 | at: ~/project 15 | - restore_cache: 16 | keys: 17 | - v1-dependencies-{{ checksum "yarn.lock" }} 18 | - v1-dependencies- 19 | - restore_cache: 20 | keys: 21 | - v1-dependencies-example-{{ checksum "example/yarn.lock" }} 22 | - v1-dependencies-example- 23 | - run: | 24 | yarn bootstrap 25 | - save_cache: 26 | key: v1-dependencies-{{ checksum "yarn.lock" }} 27 | paths: node_modules 28 | - save_cache: 29 | key: v1-dependencies-example-{{ checksum "example/yarn.lock" }} 30 | paths: example/node_modules 31 | - persist_to_workspace: 32 | root: . 33 | paths: . 34 | lint-and-typecheck: 35 | <<: *defaults 36 | steps: 37 | - attach_workspace: 38 | at: ~/project 39 | - run: | 40 | yarn lint 41 | yarn typescript 42 | unit-tests: 43 | <<: *defaults 44 | steps: 45 | - attach_workspace: 46 | at: ~/project 47 | - run: | 48 | yarn test --coverage 49 | - store_artifacts: 50 | path: coverage 51 | destination: coverage 52 | build: 53 | <<: *defaults 54 | steps: 55 | - attach_workspace: 56 | at: ~/project 57 | - run: yarn prepare 58 | 59 | workflows: 60 | version: 2 61 | build-and-test: 62 | jobs: 63 | - install-dependencies 64 | - lint-and-typecheck: 65 | requires: 66 | - install-dependencies 67 | - build: 68 | requires: 69 | - install-dependencies 70 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # we recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | flow-typed/ 3 | dist/ 4 | 5 | # generated by bob 6 | lib/ 7 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-satya164", 3 | 4 | "plugins": ["react-native-globals"], 5 | 6 | "settings": { 7 | "react": { 8 | "version": "detect" 9 | } 10 | }, 11 | 12 | "env": { 13 | "es6": true, 14 | "react-native-globals/all": true, 15 | }, 16 | 17 | "rules": { 18 | "import/named": "off" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Current Behavior** 2 | 3 | - What code are you running and what is happening? 4 | - Include a screenshot or video if it makes sense. 5 | 6 | **Expected Behavior** 7 | 8 | - What do you expect should be happening? 9 | - Include a screenshot or video if it makes sense. 10 | 11 | **How to reproduce** 12 | 13 | - You must provide a way to reproduce the problem. If you are having an issue with your machine or build tools, the issue belongs on another repository as that is outside of the scope of React Navigation. 14 | - Either re-create the bug on [Snack](https://snack.expo.io) or link to a GitHub repository with code that reproduces the bug. 15 | - Explain how to run the example app and any steps that we need to take to reproduce the issue from the example app. 16 | - Keep the repro code as simple as possible, with the minimum amount of code required to repro the issue. 17 | - Before reporting an issue, make sure you are on latest version of the package. 18 | 19 | **Your Environment** 20 | 21 | | software | version | 22 | | ------------------------------------- | ------- | 23 | | iOS or Android | 24 | | react-navigation | 25 | | react-navigation-material-bottom-tabs | 26 | | react-native-paper | 27 | | react-native | 28 | | expo | 29 | | node | 30 | | npm or yarn | 31 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please provide enough information so that others can review your pull request: 2 | 3 | **Motivation** 4 | 5 | Explain the **motivation** for making this change. What existing problem does the pull request solve? 6 | 7 | **Test plan** 8 | 9 | Demonstrate the code is solid. Example: the exact commands you ran and their output, screenshots / videos if the pull request changes UI. 10 | 11 | Make sure you test on both platforms if your change affects both platforms. 12 | 13 | The code must pass tests. 14 | 15 | **Code formatting** 16 | 17 | Look around. Match the style of the rest of the codebase. Run `yarn lint --fix` before committing. 18 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: "Close stale issues and pull requests" 2 | on: 3 | schedule: 4 | - cron: "0 0 * * *" 5 | 6 | jobs: 7 | stale: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/stale@v1 11 | with: 12 | repo-token: ${{ secrets.GITHUB_TOKEN }} 13 | stale-issue-message: 'Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.' 14 | stale-pr-message: 'Hello 👋, this pull request has been open for more than 2 months with no activity on it. If you think this is still necessary with the latest version, please comment and ping a maintainer to get this reviewed, otherwise it will be closed automatically in 7 days.' 15 | exempt-issue-label: 'Keep opened' 16 | exempt-pr-label: 'Keep opened' 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # XDE 6 | .expo/ 7 | 8 | # VSCode 9 | .vscode/ 10 | jsconfig.json 11 | 12 | # Xcode 13 | # 14 | build/ 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata 24 | *.xccheckout 25 | *.moved-aside 26 | DerivedData 27 | *.hmap 28 | *.ipa 29 | *.xcuserstate 30 | project.xcworkspace 31 | 32 | # Android/IJ 33 | # 34 | .idea 35 | .gradle 36 | local.properties 37 | 38 | # node.js 39 | # 40 | node_modules/ 41 | npm-debug.log 42 | yarn-debug.log 43 | yarn-error.log 44 | 45 | # BUCK 46 | buck-out/ 47 | \.buckd/ 48 | android/app/libs 49 | android/keystores/debug.keystore 50 | 51 | # Build 52 | dist/ 53 | 54 | # generated by bob 55 | lib/ 56 | -------------------------------------------------------------------------------- /.release-it.json: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "commitMessage": "chore: release %s", 4 | "tagName": "v%s" 5 | }, 6 | "npm": { 7 | "publish": true 8 | }, 9 | "github": { 10 | "release": true 11 | }, 12 | "plugins": { 13 | "@release-it/conventional-changelog": { 14 | "preset": "angular" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 React Native Community 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This package has been moved to https://github.com/react-navigation/react-navigation/tree/4.x/packages/material-bottom-tabs 2 | 3 | --- 4 | 5 | # React Navigation Material Bottom Tabs 6 | 7 | Bottom Navigation component following [Material design guidelines](https://material.io/design/components/bottom-navigation.html) to use with React Navigation. Uses the Bottom Navigation component from [React Native Paper](https://callstack.github.io/react-native-paper/bottom-navigation.html). 8 | 9 | ## Installation 10 | 11 | Open a Terminal in your project's folder and run, 12 | 13 | ```sh 14 | yarn add react-navigation-material-bottom-tabs react-native-paper 15 | ``` 16 | 17 | If you're on a vanilla React Native project, you also need to install and link [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons). 18 | 19 | ```sh 20 | yarn add react-native-vector-icons 21 | react-native link react-native-vector-icons 22 | ``` 23 | 24 | If you don't want to install vector icons, you can use [babel-plugin-optional-require](https://github.com/satya164/babel-plugin-optional-require) to opt-out. 25 | 26 | If you use Expo, you don't need to install vector icons. But you will need to make sure that your `.babelrc` includes `babel-preset-expo`: 27 | 28 | ```json 29 | { 30 | "presets": ["expo"] 31 | } 32 | ``` 33 | 34 | If you don't use React Native Paper app, you should also add `react-native-paper/babel` to your `.babelrc` to avoid importing the whole library. See the [Getting Started guide](https://callstack.github.io/react-native-paper/getting-started.html) for more information. 35 | 36 | ## Usage 37 | 38 | ```js 39 | import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs'; 40 | 41 | export default createMaterialBottomTabNavigator({ 42 | Album: { screen: Album }, 43 | Library: { screen: Library }, 44 | History: { screen: History }, 45 | Cart: { screen: Cart }, 46 | }, { 47 | initialRouteName: 'Album', 48 | activeColor: '#F44336', 49 | }); 50 | ``` 51 | 52 | ## Docs 53 | 54 | Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/material-bottom-tab-navigator.html). 55 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "expo" 4 | ], 5 | "plugins": [ 6 | ["module-resolver", { 7 | "alias": { 8 | "react-navigation-material-bottom-tabs": "../src" 9 | } 10 | }] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": '../.eslintrc', 3 | 4 | "settings": { 5 | "import/core-modules": [ "expo", "react-navigation-material-bottom-tabs" ] 6 | }, 7 | 8 | "rules": { 9 | "react/prop-types": "off", 10 | "eslint-comments/no-unused-disable": "off", 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/App.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { StyleSheet } from 'react-native'; 3 | import { registerRootComponent } from 'expo'; 4 | import { Asset } from 'expo-asset'; 5 | import { 6 | FlatList, 7 | createAppContainer, 8 | NavigationScreenProp, 9 | } from 'react-navigation'; 10 | import { 11 | createStackNavigator, 12 | Assets as StackAssets, 13 | } from 'react-navigation-stack'; 14 | import { List, Divider } from 'react-native-paper'; 15 | 16 | import SimpleTabs from './src/SimpleTabs'; 17 | import ShiftingTabs from './src/ShiftingTabs'; 18 | import IconTabs from './src/IconTabs'; 19 | 20 | Asset.loadAsync(StackAssets); 21 | 22 | const data = [ 23 | { component: ShiftingTabs, title: 'Shifting', routeName: 'ShiftingTabs' }, 24 | { component: SimpleTabs, title: 'Simple', routeName: 'SimpleTabs' }, 25 | { component: IconTabs, title: 'Icons only', routeName: 'IconTabs' }, 26 | ]; 27 | 28 | type Props = { 29 | navigation: NavigationScreenProp; 30 | }; 31 | 32 | type Item = { title: string; routeName: string }; 33 | 34 | class Home extends React.Component { 35 | static navigationOptions = { 36 | title: 'Examples', 37 | }; 38 | 39 | _renderItem = ({ item }: { item: Item }) => ( 40 | { 43 | this.props.navigation.navigate(item.routeName); 44 | }} 45 | /> 46 | ); 47 | 48 | _keyExtractor = (item: Item) => item.routeName; 49 | 50 | render() { 51 | return ( 52 | 59 | ); 60 | } 61 | } 62 | 63 | const MainStack = createStackNavigator({ 64 | Home, 65 | ...data.reduce<{ 66 | [key: string]: { 67 | screen: React.ComponentType; 68 | navigationOptions: { title: string }; 69 | }; 70 | }>((acc, it) => { 71 | acc[it.routeName] = { 72 | screen: it.component, 73 | navigationOptions: { 74 | title: it.title, 75 | }, 76 | }; 77 | 78 | return acc; 79 | }, {}), 80 | }); 81 | 82 | const App = createAppContainer(MainStack); 83 | 84 | // @ts-ignore 85 | registerRootComponent(App); 86 | 87 | const styles = StyleSheet.create({ 88 | container: { 89 | backgroundColor: '#fff', 90 | }, 91 | }); 92 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | ## Run the example 2 | 3 | - Run the example locally 4 | - Clone the repository and `cd` to this directory 5 | - Run `yarn` to install the dependencies 6 | - Run `yarn start` to start the packager 7 | - Scan the QR Code with the Expo app 8 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "React Navigation Material Bottom Tabs Example", 4 | "description": "Demonstrates the various capabilities of react-navigation-material-bottom-tabs", 5 | "slug": "react-navigation-material-bottom-tabs-demo", 6 | "sdkVersion": "34.0.0", 7 | "version": "1.0.0", 8 | "primaryColor": "#2196f3", 9 | "packagerOpts": { 10 | "assetExts": [ 11 | "ttf" 12 | ], 13 | "projectRoots": "" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-commonjs, import/no-extraneous-dependencies */ 2 | 3 | const path = require('path'); 4 | const blacklist = require('metro-config/src/defaults/blacklist'); 5 | const pak = require('../package.json'); 6 | const escape = require('escape-string-regexp'); 7 | 8 | const peerDependencies = Object.keys(pak.peerDependencies); 9 | 10 | module.exports = { 11 | projectRoot: __dirname, 12 | watchFolders: [path.resolve(__dirname, '..')], 13 | 14 | resolver: { 15 | blacklistRE: blacklist([ 16 | new RegExp( 17 | `^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$` 18 | ), 19 | ]), 20 | 21 | providesModuleNodeModules: [ 22 | '@expo/vector-icons', 23 | '@babel/runtime', 24 | ...peerDependencies, 25 | ], 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tabviewexample", 3 | "version": "0.0.1", 4 | "private": true, 5 | "main": "App.tsx", 6 | "scripts": { 7 | "start": "expo start", 8 | "android": "expo start --android", 9 | "ios": "expo start --ios" 10 | }, 11 | "dependencies": { 12 | "@expo/vector-icons": "^10.0.5", 13 | "expo": "~34.0.4", 14 | "expo-asset": "~6.0.0", 15 | "hoist-non-react-statics": "^3.3.0", 16 | "prop-types": "^15.7.2", 17 | "react": "16.8.3", 18 | "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz", 19 | "react-native-gesture-handler": "~1.3.0", 20 | "react-native-paper": "^3.1.1", 21 | "react-native-reanimated": "~1.1.0", 22 | "react-navigation": "^4.0.7", 23 | "react-navigation-stack": "^1.5.4" 24 | }, 25 | "devDependencies": { 26 | "babel-plugin-module-resolver": "^3.2.0", 27 | "babel-preset-expo": "^5.2.0", 28 | "expo-cli": "^3.4.1", 29 | "glob-to-regexp": "^0.4.1" 30 | }, 31 | "resolutions": { 32 | "**/@babel/runtime": "7.6.3", 33 | "**/prop-types": "15.6.0", 34 | "**/react-lifecycles-compat": "3.0.4", 35 | "**/hoist-non-react-statics": "2.5.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /example/src/IconTabs.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { 3 | createMaterialBottomTabNavigator, 4 | NavigationMaterialBottomTabOptions, 5 | } from 'react-navigation-material-bottom-tabs'; 6 | import PhotoGrid from './shared/PhotoGrid'; 7 | import tabBarIcon from './shared/tabBarIcon'; 8 | 9 | class Album extends React.Component { 10 | static navigationOptions: NavigationMaterialBottomTabOptions = { 11 | tabBarIcon: tabBarIcon('photo-album'), 12 | }; 13 | 14 | render() { 15 | return ; 16 | } 17 | } 18 | 19 | class Library extends React.Component { 20 | static navigationOptions: NavigationMaterialBottomTabOptions = { 21 | tabBarIcon: tabBarIcon('inbox'), 22 | tabBarBadge: true, 23 | }; 24 | 25 | render() { 26 | return ; 27 | } 28 | } 29 | 30 | class Favorites extends React.Component { 31 | static navigationOptions: NavigationMaterialBottomTabOptions = { 32 | tabBarIcon: tabBarIcon('favorite'), 33 | }; 34 | 35 | render() { 36 | return ; 37 | } 38 | } 39 | 40 | class Purchased extends React.Component { 41 | static navigationOptions: NavigationMaterialBottomTabOptions = { 42 | tabBarIcon: tabBarIcon('shop'), 43 | }; 44 | 45 | render() { 46 | return ; 47 | } 48 | } 49 | 50 | export default createMaterialBottomTabNavigator( 51 | { 52 | Album, 53 | Library, 54 | Favorites, 55 | Purchased, 56 | }, 57 | { 58 | shifting: false, 59 | labeled: false, 60 | activeColor: '#f0edf6', 61 | inactiveColor: '#3e2465', 62 | barStyle: { backgroundColor: '#694fad' }, 63 | } 64 | ); 65 | -------------------------------------------------------------------------------- /example/src/ShiftingTabs.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { 3 | createMaterialBottomTabNavigator, 4 | NavigationMaterialBottomTabOptions, 5 | } from 'react-navigation-material-bottom-tabs'; 6 | import PhotoGrid from './shared/PhotoGrid'; 7 | import tabBarIcon from './shared/tabBarIcon'; 8 | 9 | class Album extends React.Component { 10 | static navigationOptions: NavigationMaterialBottomTabOptions = { 11 | tabBarColor: '#6200ee', 12 | tabBarIcon: tabBarIcon('photo-album'), 13 | }; 14 | 15 | render() { 16 | return ; 17 | } 18 | } 19 | 20 | class Library extends React.Component { 21 | static navigationOptions: NavigationMaterialBottomTabOptions = { 22 | tabBarColor: '#2962ff', 23 | tabBarIcon: tabBarIcon('inbox'), 24 | }; 25 | 26 | render() { 27 | return ; 28 | } 29 | } 30 | 31 | class Favorites extends React.Component { 32 | static navigationOptions: NavigationMaterialBottomTabOptions = { 33 | tabBarColor: '#00796b', 34 | tabBarIcon: tabBarIcon('favorite'), 35 | }; 36 | 37 | render() { 38 | return ; 39 | } 40 | } 41 | 42 | class Purchased extends React.Component { 43 | static navigationOptions: NavigationMaterialBottomTabOptions = { 44 | tabBarColor: '#c51162', 45 | tabBarIcon: tabBarIcon('shop'), 46 | tabBarBadge: 'test', 47 | }; 48 | 49 | render() { 50 | return ; 51 | } 52 | } 53 | 54 | export default createMaterialBottomTabNavigator( 55 | { 56 | Album, 57 | Library, 58 | Favorites, 59 | Purchased, 60 | }, 61 | { 62 | shifting: true, 63 | } 64 | ); 65 | -------------------------------------------------------------------------------- /example/src/SimpleTabs.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { StyleSheet } from 'react-native'; 3 | import { 4 | createMaterialBottomTabNavigator, 5 | NavigationMaterialBottomTabOptions, 6 | } from 'react-navigation-material-bottom-tabs'; 7 | import PhotoGrid from './shared/PhotoGrid'; 8 | import tabBarIcon from './shared/tabBarIcon'; 9 | 10 | class Album extends React.Component { 11 | static navigationOptions: NavigationMaterialBottomTabOptions = { 12 | tabBarIcon: tabBarIcon('photo-album'), 13 | }; 14 | 15 | render() { 16 | return ; 17 | } 18 | } 19 | 20 | class Library extends React.Component { 21 | static navigationOptions: NavigationMaterialBottomTabOptions = { 22 | tabBarIcon: tabBarIcon('inbox'), 23 | }; 24 | 25 | render() { 26 | return ; 27 | } 28 | } 29 | 30 | class Favorites extends React.Component { 31 | static navigationOptions: NavigationMaterialBottomTabOptions = { 32 | tabBarIcon: tabBarIcon('favorite'), 33 | }; 34 | 35 | render() { 36 | return ; 37 | } 38 | } 39 | 40 | class Purchased extends React.Component { 41 | static navigationOptions: NavigationMaterialBottomTabOptions = { 42 | tabBarIcon: tabBarIcon('shop'), 43 | tabBarBadge: 12, 44 | }; 45 | 46 | render() { 47 | return ; 48 | } 49 | } 50 | 51 | export default createMaterialBottomTabNavigator( 52 | { 53 | Album, 54 | Library, 55 | Favorites, 56 | Purchased, 57 | }, 58 | { 59 | shifting: false, 60 | activeColor: '#6200ee', 61 | inactiveColor: '#828792', 62 | barStyle: { 63 | backgroundColor: '#f8f7f9', 64 | borderTopWidth: StyleSheet.hairlineWidth, 65 | borderStyle: 'solid', 66 | borderColor: '#d0cfd0', 67 | }, 68 | } 69 | ); 70 | -------------------------------------------------------------------------------- /example/src/shared/PhotoGrid.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { View, Image, Dimensions, StyleSheet } from 'react-native'; 3 | import { ScrollView } from 'react-navigation'; 4 | 5 | export default function PhotoGrid({ id }: { id: string }) { 6 | const PHOTOS = Array.from({ length: 24 }).map( 7 | (_, i) => `https://unsplash.it/300/300/?random&__id=${id}${i}` 8 | ); 9 | 10 | return ( 11 | 12 | {PHOTOS.map(uri => ( 13 | 14 | 15 | 16 | ))} 17 | 18 | ); 19 | } 20 | 21 | const styles = StyleSheet.create({ 22 | content: { 23 | flexDirection: 'row', 24 | flexWrap: 'wrap', 25 | padding: 4, 26 | }, 27 | item: { 28 | height: Dimensions.get('window').width / 2, 29 | width: '50%', 30 | padding: 4, 31 | }, 32 | photo: { 33 | flex: 1, 34 | resizeMode: 'cover', 35 | }, 36 | }); 37 | -------------------------------------------------------------------------------- /example/src/shared/tabBarIcon.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { StyleSheet } from 'react-native'; 3 | import { MaterialIcons } from '@expo/vector-icons'; 4 | 5 | const tabBarIcon = (name: string) => ({ tintColor }: { tintColor: string }) => ( 6 | 7 | ); 8 | 9 | export default tabBarIcon; 10 | 11 | const styles = StyleSheet.create({ 12 | icon: { backgroundColor: 'transparent' }, 13 | }); 14 | -------------------------------------------------------------------------------- /flow-typed/npm/@expo/vector-icons_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c7c91558bdd879554405af715286a9e4 2 | // flow-typed version: <>/@expo/vector-icons_v^6.2.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@expo/vector-icons' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@expo/vector-icons' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@expo/vector-icons/createIconSet' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module '@expo/vector-icons/createIconSetFromFontello' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module '@expo/vector-icons/createIconSetFromIcoMoon' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module '@expo/vector-icons/Entypo' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module '@expo/vector-icons/EvilIcons' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module '@expo/vector-icons/Feather' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module '@expo/vector-icons/FontAwesome' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module '@expo/vector-icons/Foundation' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module '@expo/vector-icons/iconFontSources' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module '@expo/vector-icons/Ionicons' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module '@expo/vector-icons/MaterialCommunityIcons' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module '@expo/vector-icons/MaterialIcons' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module '@expo/vector-icons/Octicons' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module '@expo/vector-icons/SimpleLineIcons' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Entypo' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/EvilIcons' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Feather' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/FontAwesome' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Foundation' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/generate-icon' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/generate-material-icons' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/index' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Ionicons' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set-from-fontello' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/generate-icon-set-from-css' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/icon-button' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/react-native' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/react-native.osx' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/tab-bar-item-ios' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/toolbar-android' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/MaterialCommunityIcons' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/MaterialIcons' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Octicons' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/RNIMigration' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/SimpleLineIcons' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Zocial' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module '@expo/vector-icons/website/err-if-inside-universe' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module '@expo/vector-icons/website/src/App' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module '@expo/vector-icons/website/src/Icon' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module '@expo/vector-icons/website/src/IconConstants' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module '@expo/vector-icons/website/src/IconList' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module '@expo/vector-icons/website/src/index' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module '@expo/vector-icons/Zocial' { 202 | declare module.exports: any; 203 | } 204 | 205 | // Filename aliases 206 | declare module '@expo/vector-icons/createIconSet.js' { 207 | declare module.exports: $Exports<'@expo/vector-icons/createIconSet'>; 208 | } 209 | declare module '@expo/vector-icons/createIconSetFromFontello.js' { 210 | declare module.exports: $Exports<'@expo/vector-icons/createIconSetFromFontello'>; 211 | } 212 | declare module '@expo/vector-icons/createIconSetFromIcoMoon.js' { 213 | declare module.exports: $Exports<'@expo/vector-icons/createIconSetFromIcoMoon'>; 214 | } 215 | declare module '@expo/vector-icons/Entypo.js' { 216 | declare module.exports: $Exports<'@expo/vector-icons/Entypo'>; 217 | } 218 | declare module '@expo/vector-icons/EvilIcons.js' { 219 | declare module.exports: $Exports<'@expo/vector-icons/EvilIcons'>; 220 | } 221 | declare module '@expo/vector-icons/Feather.js' { 222 | declare module.exports: $Exports<'@expo/vector-icons/Feather'>; 223 | } 224 | declare module '@expo/vector-icons/FontAwesome.js' { 225 | declare module.exports: $Exports<'@expo/vector-icons/FontAwesome'>; 226 | } 227 | declare module '@expo/vector-icons/Foundation.js' { 228 | declare module.exports: $Exports<'@expo/vector-icons/Foundation'>; 229 | } 230 | declare module '@expo/vector-icons/iconFontSources.js' { 231 | declare module.exports: $Exports<'@expo/vector-icons/iconFontSources'>; 232 | } 233 | declare module '@expo/vector-icons/index' { 234 | declare module.exports: $Exports<'@expo/vector-icons'>; 235 | } 236 | declare module '@expo/vector-icons/index.js' { 237 | declare module.exports: $Exports<'@expo/vector-icons'>; 238 | } 239 | declare module '@expo/vector-icons/Ionicons.js' { 240 | declare module.exports: $Exports<'@expo/vector-icons/Ionicons'>; 241 | } 242 | declare module '@expo/vector-icons/MaterialCommunityIcons.js' { 243 | declare module.exports: $Exports<'@expo/vector-icons/MaterialCommunityIcons'>; 244 | } 245 | declare module '@expo/vector-icons/MaterialIcons.js' { 246 | declare module.exports: $Exports<'@expo/vector-icons/MaterialIcons'>; 247 | } 248 | declare module '@expo/vector-icons/Octicons.js' { 249 | declare module.exports: $Exports<'@expo/vector-icons/Octicons'>; 250 | } 251 | declare module '@expo/vector-icons/SimpleLineIcons.js' { 252 | declare module.exports: $Exports<'@expo/vector-icons/SimpleLineIcons'>; 253 | } 254 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Entypo.js' { 255 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/Entypo'>; 256 | } 257 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/EvilIcons.js' { 258 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/EvilIcons'>; 259 | } 260 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Feather.js' { 261 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/Feather'>; 262 | } 263 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/FontAwesome.js' { 264 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/FontAwesome'>; 265 | } 266 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Foundation.js' { 267 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/Foundation'>; 268 | } 269 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/generate-icon.js' { 270 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/generate-icon'>; 271 | } 272 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/generate-material-icons.js' { 273 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/generate-material-icons'>; 274 | } 275 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/index.js' { 276 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/index'>; 277 | } 278 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Ionicons.js' { 279 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/Ionicons'>; 280 | } 281 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set-from-fontello.js' { 282 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set-from-fontello'>; 283 | } 284 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon.js' { 285 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon'>; 286 | } 287 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set.js' { 288 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/create-icon-set'>; 289 | } 290 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/generate-icon-set-from-css.js' { 291 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/generate-icon-set-from-css'>; 292 | } 293 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/icon-button.js' { 294 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/icon-button'>; 295 | } 296 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/react-native.js' { 297 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/react-native'>; 298 | } 299 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/react-native.osx.js' { 300 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/react-native.osx'>; 301 | } 302 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/tab-bar-item-ios.js' { 303 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/tab-bar-item-ios'>; 304 | } 305 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/lib/toolbar-android.js' { 306 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/lib/toolbar-android'>; 307 | } 308 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/MaterialCommunityIcons.js' { 309 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/MaterialCommunityIcons'>; 310 | } 311 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/MaterialIcons.js' { 312 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/MaterialIcons'>; 313 | } 314 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Octicons.js' { 315 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/Octicons'>; 316 | } 317 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/RNIMigration.js' { 318 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/RNIMigration'>; 319 | } 320 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/SimpleLineIcons.js' { 321 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/SimpleLineIcons'>; 322 | } 323 | declare module '@expo/vector-icons/vendor/react-native-vector-icons/Zocial.js' { 324 | declare module.exports: $Exports<'@expo/vector-icons/vendor/react-native-vector-icons/Zocial'>; 325 | } 326 | declare module '@expo/vector-icons/website/err-if-inside-universe.js' { 327 | declare module.exports: $Exports<'@expo/vector-icons/website/err-if-inside-universe'>; 328 | } 329 | declare module '@expo/vector-icons/website/src/App.js' { 330 | declare module.exports: $Exports<'@expo/vector-icons/website/src/App'>; 331 | } 332 | declare module '@expo/vector-icons/website/src/Icon.js' { 333 | declare module.exports: $Exports<'@expo/vector-icons/website/src/Icon'>; 334 | } 335 | declare module '@expo/vector-icons/website/src/IconConstants.js' { 336 | declare module.exports: $Exports<'@expo/vector-icons/website/src/IconConstants'>; 337 | } 338 | declare module '@expo/vector-icons/website/src/IconList.js' { 339 | declare module.exports: $Exports<'@expo/vector-icons/website/src/IconList'>; 340 | } 341 | declare module '@expo/vector-icons/website/src/index.js' { 342 | declare module.exports: $Exports<'@expo/vector-icons/website/src/index'>; 343 | } 344 | declare module '@expo/vector-icons/Zocial.js' { 345 | declare module.exports: $Exports<'@expo/vector-icons/Zocial'>; 346 | } 347 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-jest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fda9206a865012e0b4454d59b28fc825 2 | // flow-typed version: <>/babel-jest_v^21.2.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-jest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-jest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-jest/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-jest/build/index.js' { 31 | declare module.exports: $Exports<'babel-jest/build/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-syntax-class-properties_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d0d6a4ba1367cd2e4c6482a08b1a4b01 2 | // flow-typed version: <>/babel-plugin-syntax-class-properties_v^6.13.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-syntax-class-properties' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-syntax-class-properties' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-syntax-class-properties/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-syntax-class-properties/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-syntax-class-properties/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-syntax-jsx_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: bca43ddbe413a229b1ee05870181660f 2 | // flow-typed version: <>/babel-plugin-syntax-jsx_v^6.18.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-syntax-jsx' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-syntax-jsx' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-syntax-jsx/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-syntax-jsx/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-syntax-jsx/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-syntax-object-rest-spread_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3bc29d2dec3d90d765e922c8096d8dfc 2 | // flow-typed version: <>/babel-plugin-syntax-object-rest-spread_v^6.13.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-syntax-object-rest-spread' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-syntax-object-rest-spread' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-syntax-object-rest-spread/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-syntax-object-rest-spread/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-syntax-object-rest-spread/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2374cfcadfa849e9026f394d9681deb2 2 | // flow-typed version: <>/babel-plugin-transform-flow-strip-types_v^6.22.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-flow-strip-types' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-flow-strip-types' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-flow-strip-types/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-flow-strip-types/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-flow-strip-types/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react-native_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: da7f4ffcfb420e0ad7492e04856705c2 2 | // flow-typed version: <>/babel-preset-react-native_v^4.0.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react-native' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react-native' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-react-native/configs/hmr' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-preset-react-native/configs/main' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-preset-react-native/lib/resolvePlugins' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-preset-react-native/plugins' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-preset-react-native/transforms/transform-dynamic-import' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-preset-react-native/transforms/transform-symbol-member' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-preset-react-native/configs/hmr.js' { 51 | declare module.exports: $Exports<'babel-preset-react-native/configs/hmr'>; 52 | } 53 | declare module 'babel-preset-react-native/configs/main.js' { 54 | declare module.exports: $Exports<'babel-preset-react-native/configs/main'>; 55 | } 56 | declare module 'babel-preset-react-native/index' { 57 | declare module.exports: $Exports<'babel-preset-react-native'>; 58 | } 59 | declare module 'babel-preset-react-native/index.js' { 60 | declare module.exports: $Exports<'babel-preset-react-native'>; 61 | } 62 | declare module 'babel-preset-react-native/lib/resolvePlugins.js' { 63 | declare module.exports: $Exports<'babel-preset-react-native/lib/resolvePlugins'>; 64 | } 65 | declare module 'babel-preset-react-native/plugins.js' { 66 | declare module.exports: $Exports<'babel-preset-react-native/plugins'>; 67 | } 68 | declare module 'babel-preset-react-native/transforms/transform-dynamic-import.js' { 69 | declare module.exports: $Exports<'babel-preset-react-native/transforms/transform-dynamic-import'>; 70 | } 71 | declare module 'babel-preset-react-native/transforms/transform-symbol-member.js' { 72 | declare module.exports: $Exports<'babel-preset-react-native/transforms/transform-symbol-member'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7814bad223d2abb492841c50a587c50a 2 | // flow-typed version: <>/enzyme-adapter-react-16_v^1.1.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'enzyme-adapter-react-16' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'enzyme-adapter-react-16' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'enzyme-adapter-react-16/build/findCurrentFiberUsingSlowPath' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'enzyme-adapter-react-16/build/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'enzyme-adapter-react-16/build/ReactSixteenAdapter' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'enzyme-adapter-react-16/src/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'enzyme-adapter-react-16/src/ReactSixteenAdapter' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'enzyme-adapter-react-16/build/findCurrentFiberUsingSlowPath.js' { 51 | declare module.exports: $Exports<'enzyme-adapter-react-16/build/findCurrentFiberUsingSlowPath'>; 52 | } 53 | declare module 'enzyme-adapter-react-16/build/index.js' { 54 | declare module.exports: $Exports<'enzyme-adapter-react-16/build/index'>; 55 | } 56 | declare module 'enzyme-adapter-react-16/build/ReactSixteenAdapter.js' { 57 | declare module.exports: $Exports<'enzyme-adapter-react-16/build/ReactSixteenAdapter'>; 58 | } 59 | declare module 'enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath.js' { 60 | declare module.exports: $Exports<'enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath'>; 61 | } 62 | declare module 'enzyme-adapter-react-16/src/index.js' { 63 | declare module.exports: $Exports<'enzyme-adapter-react-16/src/index'>; 64 | } 65 | declare module 'enzyme-adapter-react-16/src/ReactSixteenAdapter.js' { 66 | declare module.exports: $Exports<'enzyme-adapter-react-16/src/ReactSixteenAdapter'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme-to-json_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: baf756de734230f106096f5cc7925608 2 | // flow-typed version: <>/enzyme-to-json_v^3.2.2/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'enzyme-to-json' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'enzyme-to-json' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'enzyme-to-json/createSerializer' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'enzyme-to-json/mount' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'enzyme-to-json/render' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'enzyme-to-json/serializer' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'enzyme-to-json/shallow' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'enzyme-to-json/utils' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'enzyme-to-json/createSerializer.js' { 51 | declare module.exports: $Exports<'enzyme-to-json/createSerializer'>; 52 | } 53 | declare module 'enzyme-to-json/index' { 54 | declare module.exports: $Exports<'enzyme-to-json'>; 55 | } 56 | declare module 'enzyme-to-json/index.js' { 57 | declare module.exports: $Exports<'enzyme-to-json'>; 58 | } 59 | declare module 'enzyme-to-json/mount.js' { 60 | declare module.exports: $Exports<'enzyme-to-json/mount'>; 61 | } 62 | declare module 'enzyme-to-json/render.js' { 63 | declare module.exports: $Exports<'enzyme-to-json/render'>; 64 | } 65 | declare module 'enzyme-to-json/serializer.js' { 66 | declare module.exports: $Exports<'enzyme-to-json/serializer'>; 67 | } 68 | declare module 'enzyme-to-json/shallow.js' { 69 | declare module.exports: $Exports<'enzyme-to-json/shallow'>; 70 | } 71 | declare module 'enzyme-to-json/utils.js' { 72 | declare module.exports: $Exports<'enzyme-to-json/utils'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7be2af8800fdadaea6ac0404d256bafc 2 | // flow-typed version: 6ce6a0467c/enzyme_v3.x.x/flow_>=v0.53.x 3 | 4 | import * as React from "react"; 5 | 6 | declare module "enzyme" { 7 | declare type PredicateFunction = ( 8 | wrapper: T, 9 | index: number 10 | ) => boolean; 11 | declare type NodeOrNodes = React.Node | Array; 12 | declare type EnzymeSelector = string | Class> | Object; 13 | 14 | // CheerioWrapper is a type alias for an actual cheerio instance 15 | // TODO: Reference correct type from cheerio's type declarations 16 | declare type CheerioWrapper = any; 17 | 18 | declare class Wrapper { 19 | find(selector: EnzymeSelector): this, 20 | findWhere(predicate: PredicateFunction): this, 21 | filter(selector: EnzymeSelector): this, 22 | filterWhere(predicate: PredicateFunction): this, 23 | hostNodes(): this, 24 | contains(nodeOrNodes: NodeOrNodes): boolean, 25 | containsMatchingElement(node: React.Node): boolean, 26 | containsAllMatchingElements(nodes: NodeOrNodes): boolean, 27 | containsAnyMatchingElements(nodes: NodeOrNodes): boolean, 28 | dive(option?: { context?: Object }): this, 29 | exists(): boolean, 30 | isEmptyRender(): boolean, 31 | matchesElement(node: React.Node): boolean, 32 | hasClass(className: string): boolean, 33 | is(selector: EnzymeSelector): boolean, 34 | isEmpty(): boolean, 35 | not(selector: EnzymeSelector): this, 36 | children(selector?: EnzymeSelector): this, 37 | childAt(index: number): this, 38 | parents(selector?: EnzymeSelector): this, 39 | parent(): this, 40 | closest(selector: EnzymeSelector): this, 41 | render(): CheerioWrapper, 42 | unmount(): this, 43 | text(): string, 44 | html(): string, 45 | get(index: number): React.Node, 46 | getDOMNode(): HTMLElement | HTMLInputElement, 47 | at(index: number): this, 48 | first(): this, 49 | last(): this, 50 | state(key?: string): any, 51 | context(key?: string): any, 52 | props(): Object, 53 | prop(key: string): any, 54 | key(): string, 55 | simulate(event: string, ...args: Array): this, 56 | setState(state: {}, callback?: Function): this, 57 | setProps(props: {}): this, 58 | setContext(context: Object): this, 59 | instance(): React.Component<*, *>, 60 | update(): this, 61 | debug(options?: Object): string, 62 | type(): string | Function | null, 63 | name(): string, 64 | forEach(fn: (node: this, index: number) => mixed): this, 65 | map(fn: (node: this, index: number) => T): Array, 66 | reduce( 67 | fn: (value: T, node: this, index: number) => T, 68 | initialValue?: T 69 | ): Array, 70 | reduceRight( 71 | fn: (value: T, node: this, index: number) => T, 72 | initialValue?: T 73 | ): Array, 74 | some(selector: EnzymeSelector): boolean, 75 | someWhere(predicate: PredicateFunction): boolean, 76 | every(selector: EnzymeSelector): boolean, 77 | everyWhere(predicate: PredicateFunction): boolean, 78 | length: number 79 | } 80 | 81 | declare class ReactWrapper extends Wrapper { 82 | constructor(nodes: NodeOrNodes, root: any, options?: ?Object): ReactWrapper, 83 | mount(): this, 84 | ref(refName: string): this, 85 | detach(): void 86 | } 87 | 88 | declare class ShallowWrapper extends Wrapper { 89 | constructor( 90 | nodes: NodeOrNodes, 91 | root: any, 92 | options?: ?Object 93 | ): ShallowWrapper, 94 | equals(node: React.Node): boolean, 95 | shallow(options?: { context?: Object }): ShallowWrapper, 96 | getElement(): React.Node, 97 | getElements(): Array 98 | } 99 | 100 | declare function shallow( 101 | node: React.Node, 102 | options?: { context?: Object, disableLifecycleMethods?: boolean } 103 | ): ShallowWrapper; 104 | declare function mount( 105 | node: React.Node, 106 | options?: { 107 | context?: Object, 108 | attachTo?: HTMLElement, 109 | childContextTypes?: Object 110 | } 111 | ): ReactWrapper; 112 | declare function render( 113 | node: React.Node, 114 | options?: { context?: Object } 115 | ): CheerioWrapper; 116 | 117 | declare module.exports: { 118 | configure(options: { 119 | Adapter?: any, 120 | disableLifecycleMethods?: boolean 121 | }): void, 122 | render: typeof render, 123 | mount: typeof mount, 124 | shallow: typeof shallow, 125 | ShallowWrapper: typeof ShallowWrapper, 126 | ReactWrapper: typeof ReactWrapper 127 | }; 128 | } 129 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-satya164_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 971f61790d6569f915291a15ddb751b5 2 | // flow-typed version: <>/eslint-config-satya164_v^1.0.1/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-satya164' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-satya164' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'eslint-config-satya164/index' { 29 | declare module.exports: $Exports<'eslint-config-satya164'>; 30 | } 31 | declare module 'eslint-config-satya164/index.js' { 32 | declare module.exports: $Exports<'eslint-config-satya164'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-react-native-globals_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: be404e429473f2b985d42c86032a2276 2 | // flow-typed version: <>/eslint-plugin-react-native-globals_v^0.1.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-react-native-globals' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-react-native-globals' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'eslint-plugin-react-native-globals/index' { 29 | declare module.exports: $Exports<'eslint-plugin-react-native-globals'>; 30 | } 31 | declare module 'eslint-plugin-react-native-globals/index.js' { 32 | declare module.exports: $Exports<'eslint-plugin-react-native-globals'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /flow-typed/npm/hoist-non-react-statics_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4a70afc6aaa9f6d8678add172ff49ba7 2 | // flow-typed version: 341cb80802/hoist-non-react-statics_v2.x.x/flow_>=v0.54.1 3 | 4 | declare module 'hoist-non-react-statics' { 5 | /* 6 | S - source component statics 7 | TP - target component props 8 | SP - additional source component props 9 | */ 10 | declare module.exports: ( 11 | target: React$ComponentType, 12 | source: React$ComponentType & S, 13 | blacklist?: { [key: $Keys]: boolean } 14 | ) => React$ComponentType & $Shape; 15 | } 16 | -------------------------------------------------------------------------------- /flow-typed/npm/jest_v21.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 107cf7068b8835594e97f938e8848244 2 | // flow-typed version: 8b4dd96654/jest_v21.x.x/flow_>=v0.39.x 3 | 4 | type JestMockFn, TReturn> = { 5 | (...args: TArguments): TReturn, 6 | /** 7 | * An object for introspecting mock calls 8 | */ 9 | mock: { 10 | /** 11 | * An array that represents all calls that have been made into this mock 12 | * function. Each call is represented by an array of arguments that were 13 | * passed during the call. 14 | */ 15 | calls: Array, 16 | /** 17 | * An array that contains all the object instances that have been 18 | * instantiated from this mock function. 19 | */ 20 | instances: Array 21 | }, 22 | /** 23 | * Resets all information stored in the mockFn.mock.calls and 24 | * mockFn.mock.instances arrays. Often this is useful when you want to clean 25 | * up a mock's usage data between two assertions. 26 | */ 27 | mockClear(): void, 28 | /** 29 | * Resets all information stored in the mock. This is useful when you want to 30 | * completely restore a mock back to its initial state. 31 | */ 32 | mockReset(): void, 33 | /** 34 | * Removes the mock and restores the initial implementation. This is useful 35 | * when you want to mock functions in certain test cases and restore the 36 | * original implementation in others. Beware that mockFn.mockRestore only 37 | * works when mock was created with jest.spyOn. Thus you have to take care of 38 | * restoration yourself when manually assigning jest.fn(). 39 | */ 40 | mockRestore(): void, 41 | /** 42 | * Accepts a function that should be used as the implementation of the mock. 43 | * The mock itself will still record all calls that go into and instances 44 | * that come from itself -- the only difference is that the implementation 45 | * will also be executed when the mock is called. 46 | */ 47 | mockImplementation( 48 | fn: (...args: TArguments) => TReturn 49 | ): JestMockFn, 50 | /** 51 | * Accepts a function that will be used as an implementation of the mock for 52 | * one call to the mocked function. Can be chained so that multiple function 53 | * calls produce different results. 54 | */ 55 | mockImplementationOnce( 56 | fn: (...args: TArguments) => TReturn 57 | ): JestMockFn, 58 | /** 59 | * Just a simple sugar function for returning `this` 60 | */ 61 | mockReturnThis(): void, 62 | /** 63 | * Deprecated: use jest.fn(() => value) instead 64 | */ 65 | mockReturnValue(value: TReturn): JestMockFn, 66 | /** 67 | * Sugar for only returning a value once inside your mock 68 | */ 69 | mockReturnValueOnce(value: TReturn): JestMockFn 70 | }; 71 | 72 | type JestAsymmetricEqualityType = { 73 | /** 74 | * A custom Jasmine equality tester 75 | */ 76 | asymmetricMatch(value: mixed): boolean 77 | }; 78 | 79 | type JestCallsType = { 80 | allArgs(): mixed, 81 | all(): mixed, 82 | any(): boolean, 83 | count(): number, 84 | first(): mixed, 85 | mostRecent(): mixed, 86 | reset(): void 87 | }; 88 | 89 | type JestClockType = { 90 | install(): void, 91 | mockDate(date: Date): void, 92 | tick(milliseconds?: number): void, 93 | uninstall(): void 94 | }; 95 | 96 | type JestMatcherResult = { 97 | message?: string | (() => string), 98 | pass: boolean 99 | }; 100 | 101 | type JestMatcher = (actual: any, expected: any) => JestMatcherResult; 102 | 103 | type JestPromiseType = { 104 | /** 105 | * Use rejects to unwrap the reason of a rejected promise so any other 106 | * matcher can be chained. If the promise is fulfilled the assertion fails. 107 | */ 108 | rejects: JestExpectType, 109 | /** 110 | * Use resolves to unwrap the value of a fulfilled promise so any other 111 | * matcher can be chained. If the promise is rejected the assertion fails. 112 | */ 113 | resolves: JestExpectType 114 | }; 115 | 116 | /** 117 | * Plugin: jest-enzyme 118 | */ 119 | type EnzymeMatchersType = { 120 | toBeChecked(): void, 121 | toBeDisabled(): void, 122 | toBeEmpty(): void, 123 | toBePresent(): void, 124 | toContainReact(element: React$Element): void, 125 | toHaveClassName(className: string): void, 126 | toHaveHTML(html: string): void, 127 | toHaveProp(propKey: string, propValue?: any): void, 128 | toHaveRef(refName: string): void, 129 | toHaveState(stateKey: string, stateValue?: any): void, 130 | toHaveStyle(styleKey: string, styleValue?: any): void, 131 | toHaveTagName(tagName: string): void, 132 | toHaveText(text: string): void, 133 | toIncludeText(text: string): void, 134 | toHaveValue(value: any): void, 135 | toMatchElement(element: React$Element): void, 136 | toMatchSelector(selector: string): void 137 | }; 138 | 139 | type JestExpectType = { 140 | not: JestExpectType & EnzymeMatchersType, 141 | /** 142 | * If you have a mock function, you can use .lastCalledWith to test what 143 | * arguments it was last called with. 144 | */ 145 | lastCalledWith(...args: Array): void, 146 | /** 147 | * toBe just checks that a value is what you expect. It uses === to check 148 | * strict equality. 149 | */ 150 | toBe(value: any): void, 151 | /** 152 | * Use .toHaveBeenCalled to ensure that a mock function got called. 153 | */ 154 | toBeCalled(): void, 155 | /** 156 | * Use .toBeCalledWith to ensure that a mock function was called with 157 | * specific arguments. 158 | */ 159 | toBeCalledWith(...args: Array): void, 160 | /** 161 | * Using exact equality with floating point numbers is a bad idea. Rounding 162 | * means that intuitive things fail. 163 | */ 164 | toBeCloseTo(num: number, delta: any): void, 165 | /** 166 | * Use .toBeDefined to check that a variable is not undefined. 167 | */ 168 | toBeDefined(): void, 169 | /** 170 | * Use .toBeFalsy when you don't care what a value is, you just want to 171 | * ensure a value is false in a boolean context. 172 | */ 173 | toBeFalsy(): void, 174 | /** 175 | * To compare floating point numbers, you can use toBeGreaterThan. 176 | */ 177 | toBeGreaterThan(number: number): void, 178 | /** 179 | * To compare floating point numbers, you can use toBeGreaterThanOrEqual. 180 | */ 181 | toBeGreaterThanOrEqual(number: number): void, 182 | /** 183 | * To compare floating point numbers, you can use toBeLessThan. 184 | */ 185 | toBeLessThan(number: number): void, 186 | /** 187 | * To compare floating point numbers, you can use toBeLessThanOrEqual. 188 | */ 189 | toBeLessThanOrEqual(number: number): void, 190 | /** 191 | * Use .toBeInstanceOf(Class) to check that an object is an instance of a 192 | * class. 193 | */ 194 | toBeInstanceOf(cls: Class<*>): void, 195 | /** 196 | * .toBeNull() is the same as .toBe(null) but the error messages are a bit 197 | * nicer. 198 | */ 199 | toBeNull(): void, 200 | /** 201 | * Use .toBeTruthy when you don't care what a value is, you just want to 202 | * ensure a value is true in a boolean context. 203 | */ 204 | toBeTruthy(): void, 205 | /** 206 | * Use .toBeUndefined to check that a variable is undefined. 207 | */ 208 | toBeUndefined(): void, 209 | /** 210 | * Use .toContain when you want to check that an item is in a list. For 211 | * testing the items in the list, this uses ===, a strict equality check. 212 | */ 213 | toContain(item: any): void, 214 | /** 215 | * Use .toContainEqual when you want to check that an item is in a list. For 216 | * testing the items in the list, this matcher recursively checks the 217 | * equality of all fields, rather than checking for object identity. 218 | */ 219 | toContainEqual(item: any): void, 220 | /** 221 | * Use .toEqual when you want to check that two objects have the same value. 222 | * This matcher recursively checks the equality of all fields, rather than 223 | * checking for object identity. 224 | */ 225 | toEqual(value: any): void, 226 | /** 227 | * Use .toHaveBeenCalled to ensure that a mock function got called. 228 | */ 229 | toHaveBeenCalled(): void, 230 | /** 231 | * Use .toHaveBeenCalledTimes to ensure that a mock function got called exact 232 | * number of times. 233 | */ 234 | toHaveBeenCalledTimes(number: number): void, 235 | /** 236 | * Use .toHaveBeenCalledWith to ensure that a mock function was called with 237 | * specific arguments. 238 | */ 239 | toHaveBeenCalledWith(...args: Array): void, 240 | /** 241 | * Use .toHaveBeenLastCalledWith to ensure that a mock function was last called 242 | * with specific arguments. 243 | */ 244 | toHaveBeenLastCalledWith(...args: Array): void, 245 | /** 246 | * Check that an object has a .length property and it is set to a certain 247 | * numeric value. 248 | */ 249 | toHaveLength(number: number): void, 250 | /** 251 | * 252 | */ 253 | toHaveProperty(propPath: string, value?: any): void, 254 | /** 255 | * Use .toMatch to check that a string matches a regular expression or string. 256 | */ 257 | toMatch(regexpOrString: RegExp | string): void, 258 | /** 259 | * Use .toMatchObject to check that a javascript object matches a subset of the properties of an object. 260 | */ 261 | toMatchObject(object: Object | Array): void, 262 | /** 263 | * This ensures that a React component matches the most recent snapshot. 264 | */ 265 | toMatchSnapshot(name?: string): void, 266 | /** 267 | * Use .toThrow to test that a function throws when it is called. 268 | * If you want to test that a specific error gets thrown, you can provide an 269 | * argument to toThrow. The argument can be a string for the error message, 270 | * a class for the error, or a regex that should match the error. 271 | * 272 | * Alias: .toThrowError 273 | */ 274 | toThrow(message?: string | Error | Class | RegExp): void, 275 | toThrowError(message?: string | Error | Class | RegExp): void, 276 | /** 277 | * Use .toThrowErrorMatchingSnapshot to test that a function throws a error 278 | * matching the most recent snapshot when it is called. 279 | */ 280 | toThrowErrorMatchingSnapshot(): void 281 | }; 282 | 283 | type JestObjectType = { 284 | /** 285 | * Disables automatic mocking in the module loader. 286 | * 287 | * After this method is called, all `require()`s will return the real 288 | * versions of each module (rather than a mocked version). 289 | */ 290 | disableAutomock(): JestObjectType, 291 | /** 292 | * An un-hoisted version of disableAutomock 293 | */ 294 | autoMockOff(): JestObjectType, 295 | /** 296 | * Enables automatic mocking in the module loader. 297 | */ 298 | enableAutomock(): JestObjectType, 299 | /** 300 | * An un-hoisted version of enableAutomock 301 | */ 302 | autoMockOn(): JestObjectType, 303 | /** 304 | * Clears the mock.calls and mock.instances properties of all mocks. 305 | * Equivalent to calling .mockClear() on every mocked function. 306 | */ 307 | clearAllMocks(): JestObjectType, 308 | /** 309 | * Resets the state of all mocks. Equivalent to calling .mockReset() on every 310 | * mocked function. 311 | */ 312 | resetAllMocks(): JestObjectType, 313 | /** 314 | * Removes any pending timers from the timer system. 315 | */ 316 | clearAllTimers(): void, 317 | /** 318 | * The same as `mock` but not moved to the top of the expectation by 319 | * babel-jest. 320 | */ 321 | doMock(moduleName: string, moduleFactory?: any): JestObjectType, 322 | /** 323 | * The same as `unmock` but not moved to the top of the expectation by 324 | * babel-jest. 325 | */ 326 | dontMock(moduleName: string): JestObjectType, 327 | /** 328 | * Returns a new, unused mock function. Optionally takes a mock 329 | * implementation. 330 | */ 331 | fn, TReturn>( 332 | implementation?: (...args: TArguments) => TReturn 333 | ): JestMockFn, 334 | /** 335 | * Determines if the given function is a mocked function. 336 | */ 337 | isMockFunction(fn: Function): boolean, 338 | /** 339 | * Given the name of a module, use the automatic mocking system to generate a 340 | * mocked version of the module for you. 341 | */ 342 | genMockFromModule(moduleName: string): any, 343 | /** 344 | * Mocks a module with an auto-mocked version when it is being required. 345 | * 346 | * The second argument can be used to specify an explicit module factory that 347 | * is being run instead of using Jest's automocking feature. 348 | * 349 | * The third argument can be used to create virtual mocks -- mocks of modules 350 | * that don't exist anywhere in the system. 351 | */ 352 | mock( 353 | moduleName: string, 354 | moduleFactory?: any, 355 | options?: Object 356 | ): JestObjectType, 357 | /** 358 | * Returns the actual module instead of a mock, bypassing all checks on 359 | * whether the module should receive a mock implementation or not. 360 | */ 361 | requireActual(moduleName: string): any, 362 | /** 363 | * Returns a mock module instead of the actual module, bypassing all checks 364 | * on whether the module should be required normally or not. 365 | */ 366 | requireMock(moduleName: string): any, 367 | /** 368 | * Resets the module registry - the cache of all required modules. This is 369 | * useful to isolate modules where local state might conflict between tests. 370 | */ 371 | resetModules(): JestObjectType, 372 | /** 373 | * Exhausts the micro-task queue (usually interfaced in node via 374 | * process.nextTick). 375 | */ 376 | runAllTicks(): void, 377 | /** 378 | * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout(), 379 | * setInterval(), and setImmediate()). 380 | */ 381 | runAllTimers(): void, 382 | /** 383 | * Exhausts all tasks queued by setImmediate(). 384 | */ 385 | runAllImmediates(): void, 386 | /** 387 | * Executes only the macro task queue (i.e. all tasks queued by setTimeout() 388 | * or setInterval() and setImmediate()). 389 | */ 390 | runTimersToTime(msToRun: number): void, 391 | /** 392 | * Executes only the macro-tasks that are currently pending (i.e., only the 393 | * tasks that have been queued by setTimeout() or setInterval() up to this 394 | * point) 395 | */ 396 | runOnlyPendingTimers(): void, 397 | /** 398 | * Explicitly supplies the mock object that the module system should return 399 | * for the specified module. Note: It is recommended to use jest.mock() 400 | * instead. 401 | */ 402 | setMock(moduleName: string, moduleExports: any): JestObjectType, 403 | /** 404 | * Indicates that the module system should never return a mocked version of 405 | * the specified module from require() (e.g. that it should always return the 406 | * real module). 407 | */ 408 | unmock(moduleName: string): JestObjectType, 409 | /** 410 | * Instructs Jest to use fake versions of the standard timer functions 411 | * (setTimeout, setInterval, clearTimeout, clearInterval, nextTick, 412 | * setImmediate and clearImmediate). 413 | */ 414 | useFakeTimers(): JestObjectType, 415 | /** 416 | * Instructs Jest to use the real versions of the standard timer functions. 417 | */ 418 | useRealTimers(): JestObjectType, 419 | /** 420 | * Creates a mock function similar to jest.fn but also tracks calls to 421 | * object[methodName]. 422 | */ 423 | spyOn(object: Object, methodName: string): JestMockFn, 424 | /** 425 | * Set the default timeout interval for tests and before/after hooks in milliseconds. 426 | * Note: The default timeout interval is 5 seconds if this method is not called. 427 | */ 428 | setTimeout(timeout: number): JestObjectType 429 | }; 430 | 431 | type JestSpyType = { 432 | calls: JestCallsType 433 | }; 434 | 435 | /** Runs this function after every test inside this context */ 436 | declare function afterEach( 437 | fn: (done: () => void) => ?Promise, 438 | timeout?: number 439 | ): void; 440 | /** Runs this function before every test inside this context */ 441 | declare function beforeEach( 442 | fn: (done: () => void) => ?Promise, 443 | timeout?: number 444 | ): void; 445 | /** Runs this function after all tests have finished inside this context */ 446 | declare function afterAll( 447 | fn: (done: () => void) => ?Promise, 448 | timeout?: number 449 | ): void; 450 | /** Runs this function before any tests have started inside this context */ 451 | declare function beforeAll( 452 | fn: (done: () => void) => ?Promise, 453 | timeout?: number 454 | ): void; 455 | 456 | /** A context for grouping tests together */ 457 | declare var describe: { 458 | /** 459 | * Creates a block that groups together several related tests in one "test suite" 460 | */ 461 | (name: string, fn: () => void): void, 462 | 463 | /** 464 | * Only run this describe block 465 | */ 466 | only(name: string, fn: () => void): void, 467 | 468 | /** 469 | * Skip running this describe block 470 | */ 471 | skip(name: string, fn: () => void): void 472 | }; 473 | 474 | /** An individual test unit */ 475 | declare var it: { 476 | /** 477 | * An individual test unit 478 | * 479 | * @param {string} Name of Test 480 | * @param {Function} Test 481 | * @param {number} Timeout for the test, in milliseconds. 482 | */ 483 | ( 484 | name: string, 485 | fn?: (done: () => void) => ?Promise, 486 | timeout?: number 487 | ): void, 488 | /** 489 | * Only run this test 490 | * 491 | * @param {string} Name of Test 492 | * @param {Function} Test 493 | * @param {number} Timeout for the test, in milliseconds. 494 | */ 495 | only( 496 | name: string, 497 | fn?: (done: () => void) => ?Promise, 498 | timeout?: number 499 | ): void, 500 | /** 501 | * Skip running this test 502 | * 503 | * @param {string} Name of Test 504 | * @param {Function} Test 505 | * @param {number} Timeout for the test, in milliseconds. 506 | */ 507 | skip( 508 | name: string, 509 | fn?: (done: () => void) => ?Promise, 510 | timeout?: number 511 | ): void, 512 | /** 513 | * Run the test concurrently 514 | * 515 | * @param {string} Name of Test 516 | * @param {Function} Test 517 | * @param {number} Timeout for the test, in milliseconds. 518 | */ 519 | concurrent( 520 | name: string, 521 | fn?: (done: () => void) => ?Promise, 522 | timeout?: number 523 | ): void 524 | }; 525 | declare function fit( 526 | name: string, 527 | fn: (done: () => void) => ?Promise, 528 | timeout?: number 529 | ): void; 530 | /** An individual test unit */ 531 | declare var test: typeof it; 532 | /** A disabled group of tests */ 533 | declare var xdescribe: typeof describe; 534 | /** A focused group of tests */ 535 | declare var fdescribe: typeof describe; 536 | /** A disabled individual test */ 537 | declare var xit: typeof it; 538 | /** A disabled individual test */ 539 | declare var xtest: typeof it; 540 | 541 | /** The expect function is used every time you want to test a value */ 542 | declare var expect: { 543 | /** The object that you want to make assertions against */ 544 | (value: any): JestExpectType & JestPromiseType & EnzymeMatchersType, 545 | /** Add additional Jasmine matchers to Jest's roster */ 546 | extend(matchers: { [name: string]: JestMatcher }): void, 547 | /** Add a module that formats application-specific data structures. */ 548 | addSnapshotSerializer(serializer: (input: Object) => string): void, 549 | assertions(expectedAssertions: number): void, 550 | hasAssertions(): void, 551 | any(value: mixed): JestAsymmetricEqualityType, 552 | anything(): void, 553 | arrayContaining(value: Array): void, 554 | objectContaining(value: Object): void, 555 | /** Matches any received string that contains the exact expected string. */ 556 | stringContaining(value: string): void, 557 | stringMatching(value: string | RegExp): void 558 | }; 559 | 560 | // TODO handle return type 561 | // http://jasmine.github.io/2.4/introduction.html#section-Spies 562 | declare function spyOn(value: mixed, method: string): Object; 563 | 564 | /** Holds all functions related to manipulating test runner */ 565 | declare var jest: JestObjectType; 566 | 567 | /** 568 | * The global Jasmine object, this is generally not exposed as the public API, 569 | * using features inside here could break in later versions of Jest. 570 | */ 571 | declare var jasmine: { 572 | DEFAULT_TIMEOUT_INTERVAL: number, 573 | any(value: mixed): JestAsymmetricEqualityType, 574 | anything(): void, 575 | arrayContaining(value: Array): void, 576 | clock(): JestClockType, 577 | createSpy(name: string): JestSpyType, 578 | createSpyObj( 579 | baseName: string, 580 | methodNames: Array 581 | ): { [methodName: string]: JestSpyType }, 582 | objectContaining(value: Object): void, 583 | stringMatching(value: string): void 584 | }; 585 | -------------------------------------------------------------------------------- /flow-typed/npm/prettier_v1.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4eed8da2dc730dc33e7710b465eaa44b 2 | // flow-typed version: cc7a557b34/prettier_v1.x.x/flow_>=v0.56.x 3 | 4 | declare module "prettier" { 5 | declare type AST = Object; 6 | declare type Doc = Object; 7 | declare type FastPath = Object; 8 | 9 | declare type PrettierParserName = 10 | | "babylon" 11 | | "flow" 12 | | "typescript" 13 | | "postcss" 14 | | "css" 15 | | "less" 16 | | "scss" 17 | | "json" 18 | | "graphql" 19 | | "markdown" 20 | | "vue"; 21 | 22 | declare type PrettierParser = { 23 | [name: PrettierParserName]: (text: string, options?: Object) => AST 24 | }; 25 | 26 | declare type CustomParser = ( 27 | text: string, 28 | parsers: PrettierParser, 29 | options: Options 30 | ) => AST; 31 | 32 | declare type Options = {| 33 | printWidth?: number, 34 | tabWidth?: number, 35 | useTabs?: boolean, 36 | semi?: boolean, 37 | singleQuote?: boolean, 38 | trailingComma?: "none" | "es5" | "all", 39 | bracketSpacing?: boolean, 40 | jsxBracketSameLine?: boolean, 41 | arrowParens?: "avoid" | "always", 42 | rangeStart?: number, 43 | rangeEnd?: number, 44 | parser?: PrettierParserName | CustomParser, 45 | filepath?: string, 46 | requirePragma?: boolean, 47 | insertPragma?: boolean, 48 | proseWrap?: "always" | "never" | "preserve", 49 | plugins?: Array 50 | |}; 51 | 52 | declare type Plugin = { 53 | languages: SupportLanguage, 54 | parsers: { [parserName: string]: Parser }, 55 | printers: { [astFormat: string]: Printer } 56 | }; 57 | 58 | declare type Parser = { 59 | parse: ( 60 | text: string, 61 | parsers: { [parserName: string]: Parser }, 62 | options: Object 63 | ) => AST, 64 | astFormat: string 65 | }; 66 | 67 | declare type Printer = { 68 | print: ( 69 | path: FastPath, 70 | options: Object, 71 | print: (path: FastPath) => Doc 72 | ) => Doc, 73 | embed: ( 74 | path: FastPath, 75 | print: (path: FastPath) => Doc, 76 | textToDoc: (text: string, options: Object) => Doc, 77 | options: Object 78 | ) => ?Doc 79 | }; 80 | 81 | declare type CursorOptions = {| 82 | cursorOffset: number, 83 | printWidth?: $PropertyType, 84 | tabWidth?: $PropertyType, 85 | useTabs?: $PropertyType, 86 | semi?: $PropertyType, 87 | singleQuote?: $PropertyType, 88 | trailingComma?: $PropertyType, 89 | bracketSpacing?: $PropertyType, 90 | jsxBracketSameLine?: $PropertyType, 91 | arrowParens?: $PropertyType, 92 | parser?: $PropertyType, 93 | filepath?: $PropertyType, 94 | requirePragma?: $PropertyType, 95 | insertPragma?: $PropertyType, 96 | proseWrap?: $PropertyType, 97 | plugins?: $PropertyType 98 | |}; 99 | 100 | declare type CursorResult = {| 101 | formatted: string, 102 | cursorOffset: number 103 | |}; 104 | 105 | declare type ResolveConfigOptions = {| 106 | useCache?: boolean, 107 | config?: string, 108 | editorconfig?: boolean 109 | |}; 110 | 111 | declare type SupportLanguage = { 112 | name: string, 113 | since: string, 114 | parsers: Array, 115 | group?: string, 116 | tmScope: string, 117 | aceMode: string, 118 | codemirrorMode: string, 119 | codemirrorMimeType: string, 120 | aliases?: Array, 121 | extensions: Array, 122 | filenames?: Array, 123 | linguistLanguageId: number, 124 | vscodeLanguageIds: Array 125 | }; 126 | 127 | declare type SupportOption = {| 128 | since: string, 129 | type: "int" | "boolean" | "choice" | "path", 130 | deprecated?: string, 131 | redirect?: SupportOptionRedirect, 132 | description: string, 133 | oppositeDescription?: string, 134 | default: SupportOptionValue, 135 | range?: SupportOptionRange, 136 | choices?: SupportOptionChoice 137 | |}; 138 | 139 | declare type SupportOptionRedirect = {| 140 | options: string, 141 | value: SupportOptionValue 142 | |}; 143 | 144 | declare type SupportOptionRange = {| 145 | start: number, 146 | end: number, 147 | step: number 148 | |}; 149 | 150 | declare type SupportOptionChoice = {| 151 | value: boolean | string, 152 | description?: string, 153 | since?: string, 154 | deprecated?: string, 155 | redirect?: SupportOptionValue 156 | |}; 157 | 158 | declare type SupportOptionValue = number | boolean | string; 159 | 160 | declare type SupportInfo = {| 161 | languages: Array, 162 | options: Array 163 | |}; 164 | 165 | declare type Prettier = {| 166 | format: (source: string, options?: Options) => string, 167 | check: (source: string, options?: Options) => boolean, 168 | formatWithCursor: (source: string, options: CursorOptions) => CursorResult, 169 | resolveConfig: { 170 | (filePath: string, options?: ResolveConfigOptions): Promise, 171 | sync(filePath: string, options?: ResolveConfigOptions): Promise 172 | }, 173 | clearConfigCache: () => void, 174 | getSupportInfo: (version?: string) => SupportInfo 175 | |}; 176 | 177 | declare export default Prettier; 178 | } 179 | -------------------------------------------------------------------------------- /flow-typed/npm/prop-types_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d9a983bb1ac458a256c31c139047bdbb 2 | // flow-typed version: 927687984d/prop-types_v15.x.x/flow_>=v0.41.x 3 | 4 | type $npm$propTypes$ReactPropsCheckType = ( 5 | props: any, 6 | propName: string, 7 | componentName: string, 8 | href?: string) => ?Error; 9 | 10 | declare module 'prop-types' { 11 | declare var array: React$PropType$Primitive>; 12 | declare var bool: React$PropType$Primitive; 13 | declare var func: React$PropType$Primitive; 14 | declare var number: React$PropType$Primitive; 15 | declare var object: React$PropType$Primitive; 16 | declare var string: React$PropType$Primitive; 17 | declare var symbol: React$PropType$Primitive; 18 | declare var any: React$PropType$Primitive; 19 | declare var arrayOf: React$PropType$ArrayOf; 20 | declare var element: React$PropType$Primitive; /* TODO */ 21 | declare var instanceOf: React$PropType$InstanceOf; 22 | declare var node: React$PropType$Primitive; /* TODO */ 23 | declare var objectOf: React$PropType$ObjectOf; 24 | declare var oneOf: React$PropType$OneOf; 25 | declare var oneOfType: React$PropType$OneOfType; 26 | declare var shape: React$PropType$Shape; 27 | 28 | declare function checkPropTypes( 29 | propTypes: $Subtype<{[_: $Keys]: $npm$propTypes$ReactPropsCheckType}>, 30 | values: V, 31 | location: string, 32 | componentName: string, 33 | getStack: ?(() => ?string) 34 | ) : void; 35 | } 36 | -------------------------------------------------------------------------------- /flow-typed/npm/react-lifecycles-compat_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 325e9512817177ae9b36a263c768921e 2 | // flow-typed version: <>/react-lifecycles-compat_v^1.0.2/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-lifecycles-compat' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-lifecycles-compat' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-lifecycles-compat/react-lifecycles-compat' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-lifecycles-compat/react-lifecycles-compat.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'react-lifecycles-compat/index' { 35 | declare module.exports: $Exports<'react-lifecycles-compat'>; 36 | } 37 | declare module 'react-lifecycles-compat/index.js' { 38 | declare module.exports: $Exports<'react-lifecycles-compat'>; 39 | } 40 | declare module 'react-lifecycles-compat/react-lifecycles-compat.js' { 41 | declare module.exports: $Exports<'react-lifecycles-compat/react-lifecycles-compat'>; 42 | } 43 | declare module 'react-lifecycles-compat/react-lifecycles-compat.min.js' { 44 | declare module.exports: $Exports<'react-lifecycles-compat/react-lifecycles-compat.min'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/react-native-paper_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 386bdcd615d6c491751128e33bc326ed 2 | // flow-typed version: <>/react-native-paper_v^1.2.3/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-native-paper' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-native-paper' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-native-paper/src/components/__tests__/BottomNavigation.test' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-native-paper/src/components/__tests__/Portal.test' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-native-paper/src/components/BottomNavigation' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-native-paper/src/components/Button' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-native-paper/src/components/Card/Card' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-native-paper/src/components/Card/CardActions' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-native-paper/src/components/Card/CardContent' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-native-paper/src/components/Card/CardCover' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-native-paper/src/components/Checkbox.ios' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-native-paper/src/components/Checkbox' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-native-paper/src/components/Dialog/Dialog' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-native-paper/src/components/Dialog/DialogActions' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-native-paper/src/components/Dialog/DialogContent' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'react-native-paper/src/components/Dialog/DialogScrollArea' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'react-native-paper/src/components/Dialog/DialogTitle' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'react-native-paper/src/components/Divider' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'react-native-paper/src/components/DrawerItem' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'react-native-paper/src/components/DrawerSection' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'react-native-paper/src/components/FAB' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'react-native-paper/src/components/Icon' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'react-native-paper/src/components/Modal' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'react-native-paper/src/components/Paper' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'react-native-paper/src/components/Portal/Portal' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'react-native-paper/src/components/Portal/PortalConsumer' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'react-native-paper/src/components/Portal/PortalHost' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'react-native-paper/src/components/Portal/PortalManager' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'react-native-paper/src/components/Portal/ThemedPortal' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'react-native-paper/src/components/ProgressBar' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'react-native-paper/src/components/RadioButton.ios' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'react-native-paper/src/components/RadioButton' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'react-native-paper/src/components/SearchBar' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'react-native-paper/src/components/Switch' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'react-native-paper/src/components/TextInput' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'react-native-paper/src/components/Toolbar/Toolbar' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'react-native-paper/src/components/Toolbar/ToolbarAction' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'react-native-paper/src/components/Toolbar/ToolbarBackAction' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'react-native-paper/src/components/Toolbar/ToolbarContent' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'react-native-paper/src/components/TouchableIcon' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'react-native-paper/src/components/TouchableRipple' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'react-native-paper/src/components/Typography/Caption' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'react-native-paper/src/components/Typography/Headline' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'react-native-paper/src/components/Typography/Paragraph' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'react-native-paper/src/components/Typography/StyledText' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'react-native-paper/src/components/Typography/Subheading' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'react-native-paper/src/components/Typography/Text' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'react-native-paper/src/components/Typography/Title' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'react-native-paper/src/core/Provider' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'react-native-paper/src/core/ThemeProvider' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'react-native-paper/src/core/withTheme' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'react-native-paper/src/index' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'react-native-paper/src/styles/colors' { 226 | declare module.exports: any; 227 | } 228 | 229 | declare module 'react-native-paper/src/styles/DarkTheme' { 230 | declare module.exports: any; 231 | } 232 | 233 | declare module 'react-native-paper/src/styles/DefaultTheme' { 234 | declare module.exports: any; 235 | } 236 | 237 | declare module 'react-native-paper/src/styles/fonts' { 238 | declare module.exports: any; 239 | } 240 | 241 | declare module 'react-native-paper/src/styles/shadow' { 242 | declare module.exports: any; 243 | } 244 | 245 | declare module 'react-native-paper/src/types' { 246 | declare module.exports: any; 247 | } 248 | 249 | // Filename aliases 250 | declare module 'react-native-paper/src/components/__tests__/BottomNavigation.test.js' { 251 | declare module.exports: $Exports<'react-native-paper/src/components/__tests__/BottomNavigation.test'>; 252 | } 253 | declare module 'react-native-paper/src/components/__tests__/Portal.test.js' { 254 | declare module.exports: $Exports<'react-native-paper/src/components/__tests__/Portal.test'>; 255 | } 256 | declare module 'react-native-paper/src/components/BottomNavigation.js' { 257 | declare module.exports: $Exports<'react-native-paper/src/components/BottomNavigation'>; 258 | } 259 | declare module 'react-native-paper/src/components/Button.js' { 260 | declare module.exports: $Exports<'react-native-paper/src/components/Button'>; 261 | } 262 | declare module 'react-native-paper/src/components/Card/Card.js' { 263 | declare module.exports: $Exports<'react-native-paper/src/components/Card/Card'>; 264 | } 265 | declare module 'react-native-paper/src/components/Card/CardActions.js' { 266 | declare module.exports: $Exports<'react-native-paper/src/components/Card/CardActions'>; 267 | } 268 | declare module 'react-native-paper/src/components/Card/CardContent.js' { 269 | declare module.exports: $Exports<'react-native-paper/src/components/Card/CardContent'>; 270 | } 271 | declare module 'react-native-paper/src/components/Card/CardCover.js' { 272 | declare module.exports: $Exports<'react-native-paper/src/components/Card/CardCover'>; 273 | } 274 | declare module 'react-native-paper/src/components/Checkbox.ios.js' { 275 | declare module.exports: $Exports<'react-native-paper/src/components/Checkbox.ios'>; 276 | } 277 | declare module 'react-native-paper/src/components/Checkbox.js' { 278 | declare module.exports: $Exports<'react-native-paper/src/components/Checkbox'>; 279 | } 280 | declare module 'react-native-paper/src/components/Dialog/Dialog.js' { 281 | declare module.exports: $Exports<'react-native-paper/src/components/Dialog/Dialog'>; 282 | } 283 | declare module 'react-native-paper/src/components/Dialog/DialogActions.js' { 284 | declare module.exports: $Exports<'react-native-paper/src/components/Dialog/DialogActions'>; 285 | } 286 | declare module 'react-native-paper/src/components/Dialog/DialogContent.js' { 287 | declare module.exports: $Exports<'react-native-paper/src/components/Dialog/DialogContent'>; 288 | } 289 | declare module 'react-native-paper/src/components/Dialog/DialogScrollArea.js' { 290 | declare module.exports: $Exports<'react-native-paper/src/components/Dialog/DialogScrollArea'>; 291 | } 292 | declare module 'react-native-paper/src/components/Dialog/DialogTitle.js' { 293 | declare module.exports: $Exports<'react-native-paper/src/components/Dialog/DialogTitle'>; 294 | } 295 | declare module 'react-native-paper/src/components/Divider.js' { 296 | declare module.exports: $Exports<'react-native-paper/src/components/Divider'>; 297 | } 298 | declare module 'react-native-paper/src/components/DrawerItem.js' { 299 | declare module.exports: $Exports<'react-native-paper/src/components/DrawerItem'>; 300 | } 301 | declare module 'react-native-paper/src/components/DrawerSection.js' { 302 | declare module.exports: $Exports<'react-native-paper/src/components/DrawerSection'>; 303 | } 304 | declare module 'react-native-paper/src/components/FAB.js' { 305 | declare module.exports: $Exports<'react-native-paper/src/components/FAB'>; 306 | } 307 | declare module 'react-native-paper/src/components/Icon.js' { 308 | declare module.exports: $Exports<'react-native-paper/src/components/Icon'>; 309 | } 310 | declare module 'react-native-paper/src/components/Modal.js' { 311 | declare module.exports: $Exports<'react-native-paper/src/components/Modal'>; 312 | } 313 | declare module 'react-native-paper/src/components/Paper.js' { 314 | declare module.exports: $Exports<'react-native-paper/src/components/Paper'>; 315 | } 316 | declare module 'react-native-paper/src/components/Portal/Portal.js' { 317 | declare module.exports: $Exports<'react-native-paper/src/components/Portal/Portal'>; 318 | } 319 | declare module 'react-native-paper/src/components/Portal/PortalConsumer.js' { 320 | declare module.exports: $Exports<'react-native-paper/src/components/Portal/PortalConsumer'>; 321 | } 322 | declare module 'react-native-paper/src/components/Portal/PortalHost.js' { 323 | declare module.exports: $Exports<'react-native-paper/src/components/Portal/PortalHost'>; 324 | } 325 | declare module 'react-native-paper/src/components/Portal/PortalManager.js' { 326 | declare module.exports: $Exports<'react-native-paper/src/components/Portal/PortalManager'>; 327 | } 328 | declare module 'react-native-paper/src/components/Portal/ThemedPortal.js' { 329 | declare module.exports: $Exports<'react-native-paper/src/components/Portal/ThemedPortal'>; 330 | } 331 | declare module 'react-native-paper/src/components/ProgressBar.js' { 332 | declare module.exports: $Exports<'react-native-paper/src/components/ProgressBar'>; 333 | } 334 | declare module 'react-native-paper/src/components/RadioButton.ios.js' { 335 | declare module.exports: $Exports<'react-native-paper/src/components/RadioButton.ios'>; 336 | } 337 | declare module 'react-native-paper/src/components/RadioButton.js' { 338 | declare module.exports: $Exports<'react-native-paper/src/components/RadioButton'>; 339 | } 340 | declare module 'react-native-paper/src/components/SearchBar.js' { 341 | declare module.exports: $Exports<'react-native-paper/src/components/SearchBar'>; 342 | } 343 | declare module 'react-native-paper/src/components/Switch.js' { 344 | declare module.exports: $Exports<'react-native-paper/src/components/Switch'>; 345 | } 346 | declare module 'react-native-paper/src/components/TextInput.js' { 347 | declare module.exports: $Exports<'react-native-paper/src/components/TextInput'>; 348 | } 349 | declare module 'react-native-paper/src/components/Toolbar/Toolbar.js' { 350 | declare module.exports: $Exports<'react-native-paper/src/components/Toolbar/Toolbar'>; 351 | } 352 | declare module 'react-native-paper/src/components/Toolbar/ToolbarAction.js' { 353 | declare module.exports: $Exports<'react-native-paper/src/components/Toolbar/ToolbarAction'>; 354 | } 355 | declare module 'react-native-paper/src/components/Toolbar/ToolbarBackAction.js' { 356 | declare module.exports: $Exports<'react-native-paper/src/components/Toolbar/ToolbarBackAction'>; 357 | } 358 | declare module 'react-native-paper/src/components/Toolbar/ToolbarContent.js' { 359 | declare module.exports: $Exports<'react-native-paper/src/components/Toolbar/ToolbarContent'>; 360 | } 361 | declare module 'react-native-paper/src/components/TouchableIcon.js' { 362 | declare module.exports: $Exports<'react-native-paper/src/components/TouchableIcon'>; 363 | } 364 | declare module 'react-native-paper/src/components/TouchableRipple.js' { 365 | declare module.exports: $Exports<'react-native-paper/src/components/TouchableRipple'>; 366 | } 367 | declare module 'react-native-paper/src/components/Typography/Caption.js' { 368 | declare module.exports: $Exports<'react-native-paper/src/components/Typography/Caption'>; 369 | } 370 | declare module 'react-native-paper/src/components/Typography/Headline.js' { 371 | declare module.exports: $Exports<'react-native-paper/src/components/Typography/Headline'>; 372 | } 373 | declare module 'react-native-paper/src/components/Typography/Paragraph.js' { 374 | declare module.exports: $Exports<'react-native-paper/src/components/Typography/Paragraph'>; 375 | } 376 | declare module 'react-native-paper/src/components/Typography/StyledText.js' { 377 | declare module.exports: $Exports<'react-native-paper/src/components/Typography/StyledText'>; 378 | } 379 | declare module 'react-native-paper/src/components/Typography/Subheading.js' { 380 | declare module.exports: $Exports<'react-native-paper/src/components/Typography/Subheading'>; 381 | } 382 | declare module 'react-native-paper/src/components/Typography/Text.js' { 383 | declare module.exports: $Exports<'react-native-paper/src/components/Typography/Text'>; 384 | } 385 | declare module 'react-native-paper/src/components/Typography/Title.js' { 386 | declare module.exports: $Exports<'react-native-paper/src/components/Typography/Title'>; 387 | } 388 | declare module 'react-native-paper/src/core/Provider.js' { 389 | declare module.exports: $Exports<'react-native-paper/src/core/Provider'>; 390 | } 391 | declare module 'react-native-paper/src/core/ThemeProvider.js' { 392 | declare module.exports: $Exports<'react-native-paper/src/core/ThemeProvider'>; 393 | } 394 | declare module 'react-native-paper/src/core/withTheme.js' { 395 | declare module.exports: $Exports<'react-native-paper/src/core/withTheme'>; 396 | } 397 | declare module 'react-native-paper/src/index.js' { 398 | declare module.exports: $Exports<'react-native-paper/src/index'>; 399 | } 400 | declare module 'react-native-paper/src/styles/colors.js' { 401 | declare module.exports: $Exports<'react-native-paper/src/styles/colors'>; 402 | } 403 | declare module 'react-native-paper/src/styles/DarkTheme.js' { 404 | declare module.exports: $Exports<'react-native-paper/src/styles/DarkTheme'>; 405 | } 406 | declare module 'react-native-paper/src/styles/DefaultTheme.js' { 407 | declare module.exports: $Exports<'react-native-paper/src/styles/DefaultTheme'>; 408 | } 409 | declare module 'react-native-paper/src/styles/fonts.js' { 410 | declare module.exports: $Exports<'react-native-paper/src/styles/fonts'>; 411 | } 412 | declare module 'react-native-paper/src/styles/shadow.js' { 413 | declare module.exports: $Exports<'react-native-paper/src/styles/shadow'>; 414 | } 415 | declare module 'react-native-paper/src/types.js' { 416 | declare module.exports: $Exports<'react-native-paper/src/types'>; 417 | } 418 | -------------------------------------------------------------------------------- /flow-typed/npm/react-native-safe-area-view_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7381ec0e475ad6658e39dd49d7a46956 2 | // flow-typed version: <>/react-native-safe-area-view_v^0.7.0/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-native-safe-area-view' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-native-safe-area-view' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-native-safe-area-view/index.web' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-native-safe-area-view/withOrientation' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'react-native-safe-area-view/index' { 35 | declare module.exports: $Exports<'react-native-safe-area-view'>; 36 | } 37 | declare module 'react-native-safe-area-view/index.js' { 38 | declare module.exports: $Exports<'react-native-safe-area-view'>; 39 | } 40 | declare module 'react-native-safe-area-view/index.web.js' { 41 | declare module.exports: $Exports<'react-native-safe-area-view/index.web'>; 42 | } 43 | declare module 'react-native-safe-area-view/withOrientation.js' { 44 | declare module.exports: $Exports<'react-native-safe-area-view/withOrientation'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/react-native-tab-view_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c4b56df82846bab57f905af0ed4505df 2 | // flow-typed version: <>/react-native-tab-view_v^0.0.74/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-native-tab-view' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-native-tab-view' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-native-tab-view/src/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-native-tab-view/src/SceneMap' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-native-tab-view/src/TabBar' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-native-tab-view/src/TabViewAnimated' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-native-tab-view/src/TabViewPagerAndroid' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-native-tab-view/src/TabViewPagerExperimental' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-native-tab-view/src/TabViewPagerPan' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-native-tab-view/src/TabViewPagerScroll' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-native-tab-view/src/TabViewPropTypes' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-native-tab-view/src/TabViewTypeDefinitions' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-native-tab-view/src/TouchableItem' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-native-tab-view/types' { 70 | declare module.exports: any; 71 | } 72 | 73 | // Filename aliases 74 | declare module 'react-native-tab-view/src/index.js' { 75 | declare module.exports: $Exports<'react-native-tab-view/src/index'>; 76 | } 77 | declare module 'react-native-tab-view/src/SceneMap.js' { 78 | declare module.exports: $Exports<'react-native-tab-view/src/SceneMap'>; 79 | } 80 | declare module 'react-native-tab-view/src/TabBar.js' { 81 | declare module.exports: $Exports<'react-native-tab-view/src/TabBar'>; 82 | } 83 | declare module 'react-native-tab-view/src/TabViewAnimated.js' { 84 | declare module.exports: $Exports<'react-native-tab-view/src/TabViewAnimated'>; 85 | } 86 | declare module 'react-native-tab-view/src/TabViewPagerAndroid.js' { 87 | declare module.exports: $Exports<'react-native-tab-view/src/TabViewPagerAndroid'>; 88 | } 89 | declare module 'react-native-tab-view/src/TabViewPagerExperimental.js' { 90 | declare module.exports: $Exports<'react-native-tab-view/src/TabViewPagerExperimental'>; 91 | } 92 | declare module 'react-native-tab-view/src/TabViewPagerPan.js' { 93 | declare module.exports: $Exports<'react-native-tab-view/src/TabViewPagerPan'>; 94 | } 95 | declare module 'react-native-tab-view/src/TabViewPagerScroll.js' { 96 | declare module.exports: $Exports<'react-native-tab-view/src/TabViewPagerScroll'>; 97 | } 98 | declare module 'react-native-tab-view/src/TabViewPropTypes.js' { 99 | declare module.exports: $Exports<'react-native-tab-view/src/TabViewPropTypes'>; 100 | } 101 | declare module 'react-native-tab-view/src/TabViewTypeDefinitions.js' { 102 | declare module.exports: $Exports<'react-native-tab-view/src/TabViewTypeDefinitions'>; 103 | } 104 | declare module 'react-native-tab-view/src/TouchableItem.js' { 105 | declare module.exports: $Exports<'react-native-tab-view/src/TouchableItem'>; 106 | } 107 | declare module 'react-native-tab-view/types.js' { 108 | declare module.exports: $Exports<'react-native-tab-view/types'>; 109 | } 110 | -------------------------------------------------------------------------------- /flow-typed/npm/react-navigation_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 34e35e1c3ec93a558c7ad918514fdc72 2 | // flow-typed version: <>/react-navigation_v^2.0.0-alpha.5/flow_v0.56.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-navigation' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-navigation' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-navigation/src/__tests__/addNavigationHelpers-test' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-navigation/src/__tests__/getChildEventSubscriber-test' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-navigation/src/__tests__/NavigationActions-test' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-navigation/src/__tests__/NavigationContainer-test' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-navigation/src/__tests__/NavigationStateUtils-test' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-navigation/src/addNavigationHelpers' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-navigation/src/createNavigationContainer' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-navigation/src/getChildEventSubscriber' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-navigation/src/NavigationActions' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-navigation/src/navigators/__tests__/DrawerNavigator-test' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-navigation/src/navigators/__tests__/StackNavigator-test' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-navigation/src/navigators/__tests__/SwitchNavigator-test' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-navigation/src/navigators/__tests__/TabNavigator-test' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'react-navigation/src/navigators/createDrawerNavigator' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'react-navigation/src/navigators/createNavigator' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'react-navigation/src/navigators/createStackNavigator' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'react-navigation/src/navigators/createSwitchNavigator' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'react-navigation/src/navigators/createTabNavigator' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'react-navigation/src/PlatformHelpers.native' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'react-navigation/src/PlatformHelpers.web' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'react-navigation/src/react-navigation' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'react-navigation/src/react-navigation.web' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'react-navigation/src/routers/__tests__/createConfigGetter-test' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'react-navigation/src/routers/__tests__/DrawerRouter-test' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'react-navigation/src/routers/__tests__/Routers-test' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'react-navigation/src/routers/__tests__/StackRouter-test' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'react-navigation/src/routers/__tests__/SwitchRouter-test' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'react-navigation/src/routers/__tests__/TabRouter-test' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'react-navigation/src/routers/__tests__/validateRouteConfigMap-test' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'react-navigation/src/routers/createConfigGetter' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'react-navigation/src/routers/DrawerRouter' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'react-navigation/src/routers/getScreenForRouteName' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'react-navigation/src/routers/KeyGenerator' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'react-navigation/src/routers/StackRouter' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'react-navigation/src/routers/SwitchRouter' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'react-navigation/src/routers/TabRouter' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'react-navigation/src/routers/validateRouteConfigMap' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'react-navigation/src/routers/validateScreenOptions' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'react-navigation/src/StateUtils' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'react-navigation/src/utils/getSceneIndicesForInterpolationInputRange' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'react-navigation/src/utils/invariant' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'react-navigation/src/utils/ReactNativeFeatures' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'react-navigation/src/utils/shallowEqual' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'react-navigation/src/utils/withDefaultValue' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'react-navigation/src/views/__tests__/NavigationScenesReducer-test' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'react-navigation/src/views/__tests__/TabView-test' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'react-navigation/src/views/__tests__/withOrientation-test' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'react-navigation/src/views/AnimatedValueSubscription' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'react-navigation/src/views/Drawer/DrawerNavigatorItems' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'react-navigation/src/views/Drawer/DrawerScreen' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'react-navigation/src/views/Drawer/DrawerSidebar' { 226 | declare module.exports: any; 227 | } 228 | 229 | declare module 'react-navigation/src/views/Drawer/DrawerView' { 230 | declare module.exports: any; 231 | } 232 | 233 | declare module 'react-navigation/src/views/Header/Header' { 234 | declare module.exports: any; 235 | } 236 | 237 | declare module 'react-navigation/src/views/Header/HeaderBackButton' { 238 | declare module.exports: any; 239 | } 240 | 241 | declare module 'react-navigation/src/views/Header/HeaderStyleInterpolator' { 242 | declare module.exports: any; 243 | } 244 | 245 | declare module 'react-navigation/src/views/Header/HeaderTitle' { 246 | declare module.exports: any; 247 | } 248 | 249 | declare module 'react-navigation/src/views/Header/ModularHeaderBackButton' { 250 | declare module.exports: any; 251 | } 252 | 253 | declare module 'react-navigation/src/views/NavigationContext' { 254 | declare module.exports: any; 255 | } 256 | 257 | declare module 'react-navigation/src/views/ResourceSavingSceneView' { 258 | declare module.exports: any; 259 | } 260 | 261 | declare module 'react-navigation/src/views/ScenesReducer' { 262 | declare module.exports: any; 263 | } 264 | 265 | declare module 'react-navigation/src/views/SceneView' { 266 | declare module.exports: any; 267 | } 268 | 269 | declare module 'react-navigation/src/views/StackView/createPointerEventsContainer' { 270 | declare module.exports: any; 271 | } 272 | 273 | declare module 'react-navigation/src/views/StackView/StackView' { 274 | declare module.exports: any; 275 | } 276 | 277 | declare module 'react-navigation/src/views/StackView/StackViewCard' { 278 | declare module.exports: any; 279 | } 280 | 281 | declare module 'react-navigation/src/views/StackView/StackViewLayout' { 282 | declare module.exports: any; 283 | } 284 | 285 | declare module 'react-navigation/src/views/StackView/StackViewStyleInterpolator' { 286 | declare module.exports: any; 287 | } 288 | 289 | declare module 'react-navigation/src/views/StackView/StackViewTransitionConfigs' { 290 | declare module.exports: any; 291 | } 292 | 293 | declare module 'react-navigation/src/views/SwitchView/SwitchView' { 294 | declare module.exports: any; 295 | } 296 | 297 | declare module 'react-navigation/src/views/TabView/TabBarBottom' { 298 | declare module.exports: any; 299 | } 300 | 301 | declare module 'react-navigation/src/views/TabView/TabBarIcon' { 302 | declare module.exports: any; 303 | } 304 | 305 | declare module 'react-navigation/src/views/TabView/TabBarTop' { 306 | declare module.exports: any; 307 | } 308 | 309 | declare module 'react-navigation/src/views/TabView/TabView' { 310 | declare module.exports: any; 311 | } 312 | 313 | declare module 'react-navigation/src/views/TouchableItem' { 314 | declare module.exports: any; 315 | } 316 | 317 | declare module 'react-navigation/src/views/Transitioner' { 318 | declare module.exports: any; 319 | } 320 | 321 | declare module 'react-navigation/src/views/withNavigation' { 322 | declare module.exports: any; 323 | } 324 | 325 | declare module 'react-navigation/src/views/withNavigationFocus' { 326 | declare module.exports: any; 327 | } 328 | 329 | declare module 'react-navigation/src/views/withOrientation' { 330 | declare module.exports: any; 331 | } 332 | 333 | // Filename aliases 334 | declare module 'react-navigation/src/__tests__/addNavigationHelpers-test.js' { 335 | declare module.exports: $Exports<'react-navigation/src/__tests__/addNavigationHelpers-test'>; 336 | } 337 | declare module 'react-navigation/src/__tests__/getChildEventSubscriber-test.js' { 338 | declare module.exports: $Exports<'react-navigation/src/__tests__/getChildEventSubscriber-test'>; 339 | } 340 | declare module 'react-navigation/src/__tests__/NavigationActions-test.js' { 341 | declare module.exports: $Exports<'react-navigation/src/__tests__/NavigationActions-test'>; 342 | } 343 | declare module 'react-navigation/src/__tests__/NavigationContainer-test.js' { 344 | declare module.exports: $Exports<'react-navigation/src/__tests__/NavigationContainer-test'>; 345 | } 346 | declare module 'react-navigation/src/__tests__/NavigationStateUtils-test.js' { 347 | declare module.exports: $Exports<'react-navigation/src/__tests__/NavigationStateUtils-test'>; 348 | } 349 | declare module 'react-navigation/src/addNavigationHelpers.js' { 350 | declare module.exports: $Exports<'react-navigation/src/addNavigationHelpers'>; 351 | } 352 | declare module 'react-navigation/src/createNavigationContainer.js' { 353 | declare module.exports: $Exports<'react-navigation/src/createNavigationContainer'>; 354 | } 355 | declare module 'react-navigation/src/getChildEventSubscriber.js' { 356 | declare module.exports: $Exports<'react-navigation/src/getChildEventSubscriber'>; 357 | } 358 | declare module 'react-navigation/src/NavigationActions.js' { 359 | declare module.exports: $Exports<'react-navigation/src/NavigationActions'>; 360 | } 361 | declare module 'react-navigation/src/navigators/__tests__/DrawerNavigator-test.js' { 362 | declare module.exports: $Exports<'react-navigation/src/navigators/__tests__/DrawerNavigator-test'>; 363 | } 364 | declare module 'react-navigation/src/navigators/__tests__/StackNavigator-test.js' { 365 | declare module.exports: $Exports<'react-navigation/src/navigators/__tests__/StackNavigator-test'>; 366 | } 367 | declare module 'react-navigation/src/navigators/__tests__/SwitchNavigator-test.js' { 368 | declare module.exports: $Exports<'react-navigation/src/navigators/__tests__/SwitchNavigator-test'>; 369 | } 370 | declare module 'react-navigation/src/navigators/__tests__/TabNavigator-test.js' { 371 | declare module.exports: $Exports<'react-navigation/src/navigators/__tests__/TabNavigator-test'>; 372 | } 373 | declare module 'react-navigation/src/navigators/createDrawerNavigator.js' { 374 | declare module.exports: $Exports<'react-navigation/src/navigators/createDrawerNavigator'>; 375 | } 376 | declare module 'react-navigation/src/navigators/createNavigator.js' { 377 | declare module.exports: $Exports<'react-navigation/src/navigators/createNavigator'>; 378 | } 379 | declare module 'react-navigation/src/navigators/createStackNavigator.js' { 380 | declare module.exports: $Exports<'react-navigation/src/navigators/createStackNavigator'>; 381 | } 382 | declare module 'react-navigation/src/navigators/createSwitchNavigator.js' { 383 | declare module.exports: $Exports<'react-navigation/src/navigators/createSwitchNavigator'>; 384 | } 385 | declare module 'react-navigation/src/navigators/createTabNavigator.js' { 386 | declare module.exports: $Exports<'react-navigation/src/navigators/createTabNavigator'>; 387 | } 388 | declare module 'react-navigation/src/PlatformHelpers.native.js' { 389 | declare module.exports: $Exports<'react-navigation/src/PlatformHelpers.native'>; 390 | } 391 | declare module 'react-navigation/src/PlatformHelpers.web.js' { 392 | declare module.exports: $Exports<'react-navigation/src/PlatformHelpers.web'>; 393 | } 394 | declare module 'react-navigation/src/react-navigation.js' { 395 | declare module.exports: $Exports<'react-navigation/src/react-navigation'>; 396 | } 397 | declare module 'react-navigation/src/react-navigation.web.js' { 398 | declare module.exports: $Exports<'react-navigation/src/react-navigation.web'>; 399 | } 400 | declare module 'react-navigation/src/routers/__tests__/createConfigGetter-test.js' { 401 | declare module.exports: $Exports<'react-navigation/src/routers/__tests__/createConfigGetter-test'>; 402 | } 403 | declare module 'react-navigation/src/routers/__tests__/DrawerRouter-test.js' { 404 | declare module.exports: $Exports<'react-navigation/src/routers/__tests__/DrawerRouter-test'>; 405 | } 406 | declare module 'react-navigation/src/routers/__tests__/Routers-test.js' { 407 | declare module.exports: $Exports<'react-navigation/src/routers/__tests__/Routers-test'>; 408 | } 409 | declare module 'react-navigation/src/routers/__tests__/StackRouter-test.js' { 410 | declare module.exports: $Exports<'react-navigation/src/routers/__tests__/StackRouter-test'>; 411 | } 412 | declare module 'react-navigation/src/routers/__tests__/SwitchRouter-test.js' { 413 | declare module.exports: $Exports<'react-navigation/src/routers/__tests__/SwitchRouter-test'>; 414 | } 415 | declare module 'react-navigation/src/routers/__tests__/TabRouter-test.js' { 416 | declare module.exports: $Exports<'react-navigation/src/routers/__tests__/TabRouter-test'>; 417 | } 418 | declare module 'react-navigation/src/routers/__tests__/validateRouteConfigMap-test.js' { 419 | declare module.exports: $Exports<'react-navigation/src/routers/__tests__/validateRouteConfigMap-test'>; 420 | } 421 | declare module 'react-navigation/src/routers/createConfigGetter.js' { 422 | declare module.exports: $Exports<'react-navigation/src/routers/createConfigGetter'>; 423 | } 424 | declare module 'react-navigation/src/routers/DrawerRouter.js' { 425 | declare module.exports: $Exports<'react-navigation/src/routers/DrawerRouter'>; 426 | } 427 | declare module 'react-navigation/src/routers/getScreenForRouteName.js' { 428 | declare module.exports: $Exports<'react-navigation/src/routers/getScreenForRouteName'>; 429 | } 430 | declare module 'react-navigation/src/routers/KeyGenerator.js' { 431 | declare module.exports: $Exports<'react-navigation/src/routers/KeyGenerator'>; 432 | } 433 | declare module 'react-navigation/src/routers/StackRouter.js' { 434 | declare module.exports: $Exports<'react-navigation/src/routers/StackRouter'>; 435 | } 436 | declare module 'react-navigation/src/routers/SwitchRouter.js' { 437 | declare module.exports: $Exports<'react-navigation/src/routers/SwitchRouter'>; 438 | } 439 | declare module 'react-navigation/src/routers/TabRouter.js' { 440 | declare module.exports: $Exports<'react-navigation/src/routers/TabRouter'>; 441 | } 442 | declare module 'react-navigation/src/routers/validateRouteConfigMap.js' { 443 | declare module.exports: $Exports<'react-navigation/src/routers/validateRouteConfigMap'>; 444 | } 445 | declare module 'react-navigation/src/routers/validateScreenOptions.js' { 446 | declare module.exports: $Exports<'react-navigation/src/routers/validateScreenOptions'>; 447 | } 448 | declare module 'react-navigation/src/StateUtils.js' { 449 | declare module.exports: $Exports<'react-navigation/src/StateUtils'>; 450 | } 451 | declare module 'react-navigation/src/utils/getSceneIndicesForInterpolationInputRange.js' { 452 | declare module.exports: $Exports<'react-navigation/src/utils/getSceneIndicesForInterpolationInputRange'>; 453 | } 454 | declare module 'react-navigation/src/utils/invariant.js' { 455 | declare module.exports: $Exports<'react-navigation/src/utils/invariant'>; 456 | } 457 | declare module 'react-navigation/src/utils/ReactNativeFeatures.js' { 458 | declare module.exports: $Exports<'react-navigation/src/utils/ReactNativeFeatures'>; 459 | } 460 | declare module 'react-navigation/src/utils/shallowEqual.js' { 461 | declare module.exports: $Exports<'react-navigation/src/utils/shallowEqual'>; 462 | } 463 | declare module 'react-navigation/src/utils/withDefaultValue.js' { 464 | declare module.exports: $Exports<'react-navigation/src/utils/withDefaultValue'>; 465 | } 466 | declare module 'react-navigation/src/views/__tests__/NavigationScenesReducer-test.js' { 467 | declare module.exports: $Exports<'react-navigation/src/views/__tests__/NavigationScenesReducer-test'>; 468 | } 469 | declare module 'react-navigation/src/views/__tests__/TabView-test.js' { 470 | declare module.exports: $Exports<'react-navigation/src/views/__tests__/TabView-test'>; 471 | } 472 | declare module 'react-navigation/src/views/__tests__/withOrientation-test.js' { 473 | declare module.exports: $Exports<'react-navigation/src/views/__tests__/withOrientation-test'>; 474 | } 475 | declare module 'react-navigation/src/views/AnimatedValueSubscription.js' { 476 | declare module.exports: $Exports<'react-navigation/src/views/AnimatedValueSubscription'>; 477 | } 478 | declare module 'react-navigation/src/views/Drawer/DrawerNavigatorItems.js' { 479 | declare module.exports: $Exports<'react-navigation/src/views/Drawer/DrawerNavigatorItems'>; 480 | } 481 | declare module 'react-navigation/src/views/Drawer/DrawerScreen.js' { 482 | declare module.exports: $Exports<'react-navigation/src/views/Drawer/DrawerScreen'>; 483 | } 484 | declare module 'react-navigation/src/views/Drawer/DrawerSidebar.js' { 485 | declare module.exports: $Exports<'react-navigation/src/views/Drawer/DrawerSidebar'>; 486 | } 487 | declare module 'react-navigation/src/views/Drawer/DrawerView.js' { 488 | declare module.exports: $Exports<'react-navigation/src/views/Drawer/DrawerView'>; 489 | } 490 | declare module 'react-navigation/src/views/Header/Header.js' { 491 | declare module.exports: $Exports<'react-navigation/src/views/Header/Header'>; 492 | } 493 | declare module 'react-navigation/src/views/Header/HeaderBackButton.js' { 494 | declare module.exports: $Exports<'react-navigation/src/views/Header/HeaderBackButton'>; 495 | } 496 | declare module 'react-navigation/src/views/Header/HeaderStyleInterpolator.js' { 497 | declare module.exports: $Exports<'react-navigation/src/views/Header/HeaderStyleInterpolator'>; 498 | } 499 | declare module 'react-navigation/src/views/Header/HeaderTitle.js' { 500 | declare module.exports: $Exports<'react-navigation/src/views/Header/HeaderTitle'>; 501 | } 502 | declare module 'react-navigation/src/views/Header/ModularHeaderBackButton.js' { 503 | declare module.exports: $Exports<'react-navigation/src/views/Header/ModularHeaderBackButton'>; 504 | } 505 | declare module 'react-navigation/src/views/NavigationContext.js' { 506 | declare module.exports: $Exports<'react-navigation/src/views/NavigationContext'>; 507 | } 508 | declare module 'react-navigation/src/views/ResourceSavingSceneView.js' { 509 | declare module.exports: $Exports<'react-navigation/src/views/ResourceSavingSceneView'>; 510 | } 511 | declare module 'react-navigation/src/views/ScenesReducer.js' { 512 | declare module.exports: $Exports<'react-navigation/src/views/ScenesReducer'>; 513 | } 514 | declare module 'react-navigation/src/views/SceneView.js' { 515 | declare module.exports: $Exports<'react-navigation/src/views/SceneView'>; 516 | } 517 | declare module 'react-navigation/src/views/StackView/createPointerEventsContainer.js' { 518 | declare module.exports: $Exports<'react-navigation/src/views/StackView/createPointerEventsContainer'>; 519 | } 520 | declare module 'react-navigation/src/views/StackView/StackView.js' { 521 | declare module.exports: $Exports<'react-navigation/src/views/StackView/StackView'>; 522 | } 523 | declare module 'react-navigation/src/views/StackView/StackViewCard.js' { 524 | declare module.exports: $Exports<'react-navigation/src/views/StackView/StackViewCard'>; 525 | } 526 | declare module 'react-navigation/src/views/StackView/StackViewLayout.js' { 527 | declare module.exports: $Exports<'react-navigation/src/views/StackView/StackViewLayout'>; 528 | } 529 | declare module 'react-navigation/src/views/StackView/StackViewStyleInterpolator.js' { 530 | declare module.exports: $Exports<'react-navigation/src/views/StackView/StackViewStyleInterpolator'>; 531 | } 532 | declare module 'react-navigation/src/views/StackView/StackViewTransitionConfigs.js' { 533 | declare module.exports: $Exports<'react-navigation/src/views/StackView/StackViewTransitionConfigs'>; 534 | } 535 | declare module 'react-navigation/src/views/SwitchView/SwitchView.js' { 536 | declare module.exports: $Exports<'react-navigation/src/views/SwitchView/SwitchView'>; 537 | } 538 | declare module 'react-navigation/src/views/TabView/TabBarBottom.js' { 539 | declare module.exports: $Exports<'react-navigation/src/views/TabView/TabBarBottom'>; 540 | } 541 | declare module 'react-navigation/src/views/TabView/TabBarIcon.js' { 542 | declare module.exports: $Exports<'react-navigation/src/views/TabView/TabBarIcon'>; 543 | } 544 | declare module 'react-navigation/src/views/TabView/TabBarTop.js' { 545 | declare module.exports: $Exports<'react-navigation/src/views/TabView/TabBarTop'>; 546 | } 547 | declare module 'react-navigation/src/views/TabView/TabView.js' { 548 | declare module.exports: $Exports<'react-navigation/src/views/TabView/TabView'>; 549 | } 550 | declare module 'react-navigation/src/views/TouchableItem.js' { 551 | declare module.exports: $Exports<'react-navigation/src/views/TouchableItem'>; 552 | } 553 | declare module 'react-navigation/src/views/Transitioner.js' { 554 | declare module.exports: $Exports<'react-navigation/src/views/Transitioner'>; 555 | } 556 | declare module 'react-navigation/src/views/withNavigation.js' { 557 | declare module.exports: $Exports<'react-navigation/src/views/withNavigation'>; 558 | } 559 | declare module 'react-navigation/src/views/withNavigationFocus.js' { 560 | declare module.exports: $Exports<'react-navigation/src/views/withNavigationFocus'>; 561 | } 562 | declare module 'react-navigation/src/views/withOrientation.js' { 563 | declare module.exports: $Exports<'react-navigation/src/views/withOrientation'>; 564 | } 565 | -------------------------------------------------------------------------------- /flow-typed/npm/react-test-renderer_v16.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2d946f2ec4aba5210b19d053c411a59d 2 | // flow-typed version: 95b3e05165/react-test-renderer_v16.x.x/flow_>=v0.47.x 3 | 4 | // Type definitions for react-test-renderer 16.x.x 5 | // Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer 6 | 7 | type ReactTestRendererJSON = { 8 | type: string, 9 | props: { [propName: string]: any }, 10 | children: null | ReactTestRendererJSON[] 11 | }; 12 | 13 | type ReactTestRendererTree = ReactTestRendererJSON & { 14 | nodeType: "component" | "host", 15 | instance: any, 16 | rendered: null | ReactTestRendererTree 17 | }; 18 | 19 | type ReactTestInstance = { 20 | instance: any, 21 | type: string, 22 | props: { [propName: string]: any }, 23 | parent: null | ReactTestInstance, 24 | children: Array, 25 | 26 | find(predicate: (node: ReactTestInstance) => boolean): ReactTestInstance, 27 | findByType(type: React$ElementType): ReactTestInstance, 28 | findByProps(props: { [propName: string]: any }): ReactTestInstance, 29 | 30 | findAll( 31 | predicate: (node: ReactTestInstance) => boolean, 32 | options?: { deep: boolean } 33 | ): ReactTestInstance[], 34 | findAllByType( 35 | type: React$ElementType, 36 | options?: { deep: boolean } 37 | ): ReactTestInstance[], 38 | findAllByProps( 39 | props: { [propName: string]: any }, 40 | options?: { deep: boolean } 41 | ): ReactTestInstance[] 42 | }; 43 | 44 | type ReactTestRenderer = { 45 | toJSON(): null | ReactTestRendererJSON, 46 | toTree(): null | ReactTestRendererTree, 47 | unmount(nextElement?: React$Element): void, 48 | update(nextElement: React$Element): void, 49 | getInstance(): null | ReactTestInstance, 50 | root: ReactTestInstance 51 | }; 52 | 53 | type TestRendererOptions = { 54 | createNodeMock(element: React$Element): any 55 | }; 56 | 57 | declare module "react-test-renderer" { 58 | declare function create( 59 | nextElement: React$Element, 60 | options?: TestRendererOptions 61 | ): ReactTestRenderer; 62 | } 63 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-navigation-material-bottom-tabs", 3 | "version": "2.1.5", 4 | "description": "Material Bottom Tab Navigation component for React Navigation", 5 | "main": "lib/commonjs/index.js", 6 | "module": "lib/module/index.js", 7 | "react-native": "src/index.tsx", 8 | "types": "lib/typescript/src/index.d.ts", 9 | "files": [ 10 | "src", 11 | "lib" 12 | ], 13 | "scripts": { 14 | "typescript": "tsc --noEmit", 15 | "lint": "eslint --ext .js,.ts,.tsx .", 16 | "bootstrap": "yarn --cwd example && yarn", 17 | "example": "yarn --cwd example", 18 | "release": "yarn release-it", 19 | "prepare": "bob build" 20 | }, 21 | "publishConfig": { 22 | "registry": "https://registry.npmjs.org/" 23 | }, 24 | "keywords": [ 25 | "react-native-component", 26 | "react-component", 27 | "react-native", 28 | "ios", 29 | "android", 30 | "tab", 31 | "material" 32 | ], 33 | "repository": { 34 | "type": "git", 35 | "url": "git+https://github.com/react-navigation/react-navigation-material-bottom-tabs.git" 36 | }, 37 | "author": "Satyajit Sahoo (https://github.com/satya164/)", 38 | "license": "MIT", 39 | "bugs": { 40 | "url": "https://github.com/react-navigation/react-navigation-material-bottom-tabs/issues" 41 | }, 42 | "homepage": "https://github.com/react-navigation/react-navigation-material-bottom-tabs#readme", 43 | "devDependencies": { 44 | "@commitlint/config-conventional": "^7.5.0", 45 | "@expo/vector-icons": "^10.0.1", 46 | "@react-native-community/bob": "^0.6.1", 47 | "@release-it/conventional-changelog": "^1.1.0", 48 | "@types/hoist-non-react-statics": "^3.3.1", 49 | "@types/react": "^16.8.17", 50 | "@types/react-native": "^0.57.57", 51 | "babel-jest": "^24.5.0", 52 | "commitlint": "^7.5.2", 53 | "eslint": "^6.5.1", 54 | "eslint-config-satya164": "^3.1.2", 55 | "eslint-plugin-react-native-globals": "^0.1.0", 56 | "husky": "^1.3.1", 57 | "jest": "^24.5.0", 58 | "prettier": "^1.18.2", 59 | "react": "16.8.3", 60 | "react-native": "~0.59.8", 61 | "react-native-gesture-handler": "^1.4.1", 62 | "react-native-paper": "^3.1.1", 63 | "react-native-reanimated": "^1.2.0", 64 | "react-navigation": "^4.0.7", 65 | "release-it": "^12.3.6", 66 | "typescript": "^3.5.2" 67 | }, 68 | "peerDependencies": { 69 | "react": "*", 70 | "react-native": "*", 71 | "react-native-paper": "^2.2.2 || ^3.0.0", 72 | "react-navigation": "^4.0.7" 73 | }, 74 | "husky": { 75 | "hooks": { 76 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", 77 | "pre-commit": "yarn lint && yarn typescript" 78 | } 79 | }, 80 | "@react-native-community/bob": { 81 | "source": "src", 82 | "output": "lib", 83 | "targets": [ 84 | "commonjs", 85 | "module", 86 | "typescript" 87 | ] 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | export { 2 | default as createMaterialBottomTabNavigator, 3 | } from './navigators/createMaterialBottomTabNavigator'; 4 | 5 | /** 6 | * Types 7 | */ 8 | export { 9 | NavigationTabState, 10 | NavigationTabProp, 11 | NavigationTabScreenProps, 12 | NavigationMaterialBottomTabOptions, 13 | NavigationMaterialBottomTabConfig, 14 | NavigationMaterialBottomTabScreenComponent, 15 | } from './types'; 16 | -------------------------------------------------------------------------------- /src/navigators/createMaterialBottomTabNavigator.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { 3 | TabRouter, 4 | StackActions, 5 | SceneView, 6 | createNavigator, 7 | SwitchActions, 8 | NavigationProp, 9 | NavigationScreenProp, 10 | NavigationRoute, 11 | NavigationDescriptor, 12 | NavigationRouteConfigMap, 13 | NavigationParams, 14 | CreateNavigatorConfig, 15 | NavigationTabRouterConfig, 16 | } from 'react-navigation'; 17 | import MaterialBottomTabView from '../views/MaterialBottomTabView'; 18 | import { 19 | NavigationMaterialBottomTabOptions, 20 | NavigationTabState, 21 | NavigationMaterialBottomTabConfig, 22 | NavigationTabProp, 23 | } from '../types'; 24 | 25 | export type RenderIconProps = { 26 | route: NavigationRoute; 27 | focused: boolean; 28 | tintColor?: string; 29 | horizontal?: boolean; 30 | }; 31 | 32 | export type NavigationViewProps = { 33 | navigation: NavigationProp; 34 | descriptors: { 35 | [key: string]: NavigationDescriptor< 36 | NavigationParams, 37 | NavigationMaterialBottomTabOptions, 38 | NavigationTabProp 39 | >; 40 | }; 41 | screenProps?: unknown; 42 | navigationConfig: any; 43 | getLabelText: (props: { route: NavigationRoute }) => string | undefined; 44 | getAccessibilityLabel: (props: { 45 | route: NavigationRoute; 46 | }) => string | undefined; 47 | getTestID: (props: { route: NavigationRoute }) => string | undefined; 48 | renderIcon: (props: RenderIconProps) => React.ReactNode; 49 | renderScene: (props: { route: NavigationRoute }) => React.ReactNode; 50 | onIndexChange: (index: number) => void; 51 | onTabPress: (props: { route: NavigationRoute }) => void; 52 | }; 53 | 54 | export default function createMaterialBottomTabNavigator( 55 | routes: NavigationRouteConfigMap< 56 | NavigationMaterialBottomTabOptions, 57 | NavigationTabProp 58 | >, 59 | config: CreateNavigatorConfig< 60 | NavigationMaterialBottomTabConfig, 61 | NavigationTabRouterConfig, 62 | NavigationMaterialBottomTabOptions, 63 | NavigationTabProp 64 | > = {} 65 | ) { 66 | class NavigationView extends React.Component { 67 | _renderScene = ({ route }: { route: { key: string } }) => { 68 | const { screenProps, descriptors } = this.props; 69 | const descriptor = descriptors[route.key]; 70 | const TabComponent = descriptor.getComponent(); 71 | return ( 72 | 77 | ); 78 | }; 79 | 80 | _renderIcon = ({ 81 | route, 82 | focused, 83 | tintColor, 84 | horizontal = false, 85 | }: RenderIconProps) => { 86 | const { descriptors } = this.props; 87 | const descriptor = descriptors[route.key]; 88 | const options = descriptor.options; 89 | 90 | if (options.tabBarIcon) { 91 | return typeof options.tabBarIcon === 'function' 92 | ? options.tabBarIcon({ focused, tintColor, horizontal }) 93 | : options.tabBarIcon; 94 | } 95 | 96 | return null; 97 | }; 98 | 99 | _getLabelText = ({ route }: { route: NavigationRoute }) => { 100 | const { descriptors } = this.props; 101 | const descriptor = descriptors[route.key]; 102 | const options = descriptor.options; 103 | 104 | if (options.tabBarLabel) { 105 | return options.tabBarLabel; 106 | } 107 | 108 | if (typeof options.title === 'string') { 109 | return options.title; 110 | } 111 | 112 | return route.routeName; 113 | }; 114 | 115 | _getAccessibilityLabel = ({ route }: { route: NavigationRoute }) => { 116 | const { descriptors } = this.props; 117 | const descriptor = descriptors[route.key]; 118 | const options = descriptor.options; 119 | 120 | if (typeof options.tabBarAccessibilityLabel !== 'undefined') { 121 | return options.tabBarAccessibilityLabel; 122 | } 123 | 124 | const label = this._getLabelText({ route }); 125 | 126 | if (typeof label === 'string') { 127 | const { routes } = this.props.navigation.state; 128 | return `${label}, tab, ${routes.indexOf(route) + 1} of ${ 129 | routes.length 130 | }`; 131 | } 132 | 133 | return undefined; 134 | }; 135 | 136 | _getTestID = ({ route }: { route: NavigationRoute }) => { 137 | const { descriptors } = this.props; 138 | const descriptor = descriptors[route.key]; 139 | const options = descriptor.options; 140 | 141 | return options.tabBarTestID; 142 | }; 143 | 144 | _getBadge = ({ route }: { route: NavigationRoute }) => { 145 | const { descriptors } = this.props; 146 | const descriptor = descriptors[route.key]; 147 | const options = descriptor.options; 148 | 149 | return options.tabBarBadge; 150 | }; 151 | 152 | _makeDefaultHandler = ({ 153 | route, 154 | navigation, 155 | }: { 156 | route: NavigationRoute; 157 | navigation: NavigationScreenProp; 158 | }) => () => { 159 | if (navigation.isFocused()) { 160 | if (route.hasOwnProperty('index') && route.index > 0) { 161 | // If current tab has a nested navigator, pop to top 162 | navigation.dispatch(StackActions.popToTop({ key: route.key })); 163 | } else { 164 | // @ts-ignore 165 | navigation.emit('refocus'); 166 | } 167 | } else { 168 | this._jumpTo(route.routeName); 169 | } 170 | }; 171 | 172 | _handleTabPress = ({ route }: { route: NavigationRoute }) => { 173 | this._isTabPress = true; 174 | 175 | // After tab press, handleIndexChange will be called synchronously 176 | // So we reset it in promise callback 177 | Promise.resolve().then(() => (this._isTabPress = false)); 178 | 179 | const { descriptors } = this.props; 180 | const descriptor = descriptors[route.key]; 181 | const { navigation, options } = descriptor; 182 | 183 | const defaultHandler = this._makeDefaultHandler({ route, navigation }); 184 | 185 | if (options.tabBarOnPress) { 186 | options.tabBarOnPress({ navigation, defaultHandler }); 187 | } else { 188 | defaultHandler(); 189 | } 190 | }; 191 | 192 | _handleIndexChange = (index: number) => { 193 | if (this._isTabPress) { 194 | this._isTabPress = false; 195 | return; 196 | } 197 | 198 | this._jumpTo(this.props.navigation.state.routes[index].routeName); 199 | }; 200 | 201 | _jumpTo = (routeName: string) => { 202 | const { navigation } = this.props; 203 | 204 | navigation.dispatch( 205 | SwitchActions.jumpTo({ 206 | routeName, 207 | key: navigation.state.key, 208 | }) 209 | ); 210 | }; 211 | 212 | _isTabPress: boolean = false; 213 | 214 | render() { 215 | const { 216 | descriptors, 217 | navigation, 218 | screenProps, 219 | navigationConfig, 220 | } = this.props; 221 | const { state } = navigation; 222 | const route = state.routes[state.index]; 223 | const descriptor = descriptors[route.key]; 224 | const options = { 225 | ...navigationConfig, 226 | ...descriptor.options, 227 | }; 228 | 229 | return ( 230 | 244 | ); 245 | } 246 | } 247 | 248 | const router = TabRouter(routes, config as any); 249 | 250 | // TODO: don't have time to fix it right now 251 | // @ts-ignore 252 | return createNavigator(NavigationView, router, config as any); 253 | } 254 | -------------------------------------------------------------------------------- /src/types.tsx: -------------------------------------------------------------------------------- 1 | import { StyleProp, ViewStyle } from 'react-native'; 2 | import { BottomNavigation } from 'react-native-paper'; 3 | import { 4 | NavigationRoute, 5 | NavigationState, 6 | NavigationScreenProp, 7 | NavigationParams, 8 | NavigationScreenConfig, 9 | SupportedThemes, 10 | } from 'react-navigation'; 11 | 12 | export type NavigationTabState = NavigationState; 13 | 14 | export type NavigationTabProp< 15 | State = NavigationRoute, 16 | Params = NavigationParams 17 | > = NavigationScreenProp & { 18 | jumpTo(routeName: string, key?: string): void; 19 | }; 20 | 21 | export type NavigationMaterialBottomTabOptions = { 22 | title?: string; 23 | tabBarLabel?: React.ReactNode; 24 | tabBarBadge?: boolean | number | string; 25 | tabBarVisible?: boolean; 26 | tabBarAccessibilityLabel?: string; 27 | tabBarTestID?: string; 28 | tabBarColor?: string; 29 | tabBarIcon?: 30 | | React.ReactNode 31 | | ((props: { 32 | focused: boolean; 33 | tintColor?: string; 34 | horizontal?: boolean; 35 | }) => React.ReactNode); 36 | tabBarOnPress?: (props: { 37 | navigation: NavigationTabProp; 38 | defaultHandler: () => void; 39 | }) => void; 40 | }; 41 | 42 | export type NavigationMaterialBottomTabConfig = Partial< 43 | Omit< 44 | React.ComponentProps, 45 | | 'navigationState' 46 | | 'onIndexChange' 47 | | 'onTabPress' 48 | | 'renderScene' 49 | | 'renderLabel' 50 | | 'renderIcon' 51 | | 'getAccessibilityLabel' 52 | | 'getBadge' 53 | | 'getColor' 54 | | 'getLabelText' 55 | | 'getTestID' 56 | > 57 | > & { 58 | activeColorLight?: string; 59 | activeColorDark?: string; 60 | inactiveColorLight?: string; 61 | inactiveColorDark?: string; 62 | barStyleLight?: StyleProp; 63 | barStyleDark?: StyleProp; 64 | }; 65 | 66 | export type NavigationTabScreenProps< 67 | Params = NavigationParams, 68 | ScreenProps = unknown 69 | > = { 70 | theme: SupportedThemes; 71 | navigation: NavigationTabProp; 72 | screenProps: ScreenProps; 73 | }; 74 | 75 | export type NavigationMaterialBottomTabScreenComponent< 76 | Params = NavigationParams, 77 | ScreenProps = unknown 78 | > = React.ComponentType> & { 79 | navigationOptions?: NavigationScreenConfig< 80 | NavigationMaterialBottomTabOptions, 81 | NavigationTabProp, 82 | ScreenProps 83 | >; 84 | }; 85 | -------------------------------------------------------------------------------- /src/views/MaterialBottomTabView.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { 3 | ThemeContext, 4 | NavigationProp, 5 | NavigationDescriptor, 6 | } from 'react-navigation'; 7 | import { BottomNavigation } from 'react-native-paper'; 8 | import { NavigationMaterialBottomTabConfig } from '../types'; 9 | import { ViewStyle } from 'react-native'; 10 | 11 | type Options = { 12 | tabBarVisible?: boolean; 13 | tabBarColor?: string; 14 | tabBarColorLight?: string; 15 | tabBarColorDark?: string; 16 | }; 17 | 18 | type Props = React.ComponentProps & 19 | NavigationMaterialBottomTabConfig & { 20 | navigation: NavigationProp; 21 | descriptors: { [key: string]: NavigationDescriptor }; 22 | screenProps?: unknown; 23 | renderIcon: (options: { 24 | route: { key: string }; 25 | focused: boolean; 26 | tintColor: string; 27 | }) => React.ReactNode; 28 | }; 29 | 30 | export default class MaterialBottomTabView extends React.Component { 31 | static contextType = ThemeContext; 32 | 33 | _getColor = ({ route }: { route: { key: string } }) => { 34 | const { descriptors } = this.props; 35 | const descriptor = descriptors[route.key]; 36 | const options = descriptor.options; 37 | 38 | if (this.context === 'dark' && options.tabBarColorDark) { 39 | return options.tabBarColorDark; 40 | } else if (options.tabBarColorLight) { 41 | return options.tabBarColorLight; 42 | } else { 43 | return options.tabBarColor; 44 | } 45 | }; 46 | 47 | _getactiveColor = () => { 48 | let { activeColor, activeColorLight, activeColorDark } = this.props; 49 | 50 | if (this.context === 'dark' && activeColorDark) { 51 | return activeColorDark; 52 | } else if (activeColorLight) { 53 | return activeColorLight; 54 | } else { 55 | return activeColor; 56 | } 57 | }; 58 | 59 | _getInactiveColor = () => { 60 | let { inactiveColor, inactiveColorLight, inactiveColorDark } = this.props; 61 | 62 | if (this.context === 'dark' && inactiveColorDark) { 63 | return inactiveColorDark; 64 | } else if (inactiveColorLight) { 65 | return inactiveColorLight; 66 | } else { 67 | return inactiveColor; 68 | } 69 | }; 70 | 71 | _getBarStyle = () => { 72 | let { barStyle, barStyleLight, barStyleDark } = this.props; 73 | 74 | return [barStyle, this.context === 'dark' ? barStyleDark : barStyleLight]; 75 | }; 76 | 77 | _isVisible() { 78 | const { navigation, descriptors } = this.props; 79 | const { state } = navigation; 80 | const route = state.routes[state.index]; 81 | const options = descriptors[route.key].options; 82 | return options.tabBarVisible; 83 | } 84 | 85 | _renderIcon = ({ 86 | route, 87 | focused, 88 | color, 89 | }: { 90 | route: { key: string }; 91 | focused: boolean; 92 | color: string; 93 | }) => { 94 | return this.props.renderIcon({ route, focused, tintColor: color }); 95 | }; 96 | 97 | render() { 98 | const { 99 | navigation, 100 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 101 | descriptors, 102 | ...rest 103 | } = this.props; 104 | 105 | const activeColor = this._getactiveColor(); 106 | const inactiveColor = this._getInactiveColor(); 107 | const barStyle = this._getBarStyle(); 108 | 109 | const isVisible = this._isVisible(); 110 | const extraStyle: ViewStyle | null = 111 | isVisible === false 112 | ? { 113 | display: 'none', 114 | // When keyboard is shown, `position` is set to `absolute` in the library 115 | // This somehow breaks `display: 'none'`, so we explcitely override `position` 116 | position: undefined, 117 | } 118 | : null; 119 | 120 | return ( 121 | 131 | ); 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "react-navigation-material-bottom-tabs": ["./src/index"] 6 | }, 7 | "allowUnreachableCode": false, 8 | "allowUnusedLabels": false, 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "jsx": "react", 12 | "lib": ["esnext"], 13 | "module": "esnext", 14 | "moduleResolution": "node", 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitUseStrict": false, 18 | "noStrictGenericChecks": false, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "resolveJsonModule": true, 22 | "skipLibCheck": true, 23 | "strict": true, 24 | "target": "esnext" 25 | } 26 | } 27 | --------------------------------------------------------------------------------