Skip to content

Commit

Permalink
v3.1.1
Browse files Browse the repository at this point in the history
v3.1.1
  • Loading branch information
iRoachie authored Dec 17, 2017
2 parents 3fd0737 + 9dca5b5 commit a6a21b5
Show file tree
Hide file tree
Showing 18 changed files with 2,354 additions and 87 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["react-native"]
}
20 changes: 8 additions & 12 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@
"env": {
"browser": true,
"node": true,
"es6": true
"es6": true,
"jest": true
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"prettier",
"prettier/flowtype",
"prettier/react"
],
"extends": ["prettier", "prettier/flowtype", "prettier/react"],
"plugins": [
"babel",
"flowtype",
Expand Down Expand Up @@ -66,11 +63,9 @@
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error",

"babel/new-cap": "off",
"babel/object-curly-spacing": "off",
"babel/arrow-parens": "off",

"flowtype/boolean-style": ["error", "boolean"],
"flowtype/define-flow-type": "error",
"flowtype/no-dupe-keys": "error",
Expand All @@ -84,7 +79,6 @@
"flowtype/type-id-match": "off",
"flowtype/use-flow-type": "error",
"flowtype/valid-syntax": "error",

"import/no-unresolved": "error",
"import/named": "error",
"import/default": "off",
Expand All @@ -102,7 +96,6 @@
"import/no-namespace": "off",
"import/extensions": ["error", { "js": "never", "json": "always" }],
"import/order": "off",

"react/display-name": "off",
"react/forbid-prop-types": "off",
"react/no-danger": "error",
Expand Down Expand Up @@ -135,6 +128,9 @@
"react/jsx-uses-vars": "error",
"react-native/no-unused-styles": "error",
"react-native/split-platform-components": "off",
"prettier/prettier": ["error", {"trailingComma": "all", "singleQuote": true}]
"prettier/prettier": [
"error",
{ "trailingComma": "all", "singleQuote": true }
]
}
}
}
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ node_js:
install:
- yarn

before_script:
- yarn run flow
- yarn run lint
script:
- yarn run flow && yarn run lint && yarn run test
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# React Native Material Tabs

Material Design implementation of [Tabs](https://material.io/guidelines/components/tabs.html#tabs-types-of-tabs).

[![Build Status](https://travis-ci.org/iRoachie/react-native-material-tabs.svg?branch=master)](https://travis-ci.org/iRoachie/react-native-material-tabs)
[![npm version](https://badge.fury.io/js/react-native-material-tabs.svg)](https://badge.fury.io/js/react-native-material-tabs)
[![npm downloads](https://img.shields.io/npm/dt/react-native-material-tabs.svg)](https://www.npmjs.com/package/react-native-material-tabs)
<h2 align="center">React Native Material Tabs</h2>

<p align="center">Material Design implementation of <a href="https://material.io/guidelines/components/tabs.html#tabs-types-of-tabs">Tabs</a>

<p align="center">
<a href="https://travis-ci.org/iRoachie/react-native-material-tabs">
<img alt="Travis" src="https://img.shields.io/travis/iRoachie/react-native-material-tabs.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/react-native-material-tabs">
<img alt="npm version" src="https://img.shields.io/npm/v/react-native-material-tabs.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/react-native-material-tabs">
<img alt="npm downloads" src="https://img.shields.io/npm/dm/react-native-material-tabs.svg?style=flat-square">
</a>
<a href="#badge">
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square">
</a>
</p>

## Getting Started
#### Step 1
Expand Down
32 changes: 32 additions & 0 deletions flow-typed/npm/babel-jest_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// flow-typed signature: 476cdf041c12e4372121dd0d59078192
// flow-typed version: <<STUB>>/babel-jest_v21.2.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
*
* 'babel-jest'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'babel-jest' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'babel-jest/build/index' {
declare module.exports: any;
}

// Filename aliases
declare module 'babel-jest/build/index.js' {
declare module.exports: $Exports<'babel-jest/build/index'>;
}
73 changes: 73 additions & 0 deletions flow-typed/npm/babel-preset-react-native_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// flow-typed signature: 0a6f0b938b4ca850cbfe51d2630f769c
// flow-typed version: <<STUB>>/babel-preset-react-native_v4.0.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
*
* 'babel-preset-react-native'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'babel-preset-react-native' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'babel-preset-react-native/configs/hmr' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/configs/main' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/lib/resolvePlugins' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/plugins' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/transforms/transform-dynamic-import' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/transforms/transform-symbol-member' {
declare module.exports: any;
}

// Filename aliases
declare module 'babel-preset-react-native/configs/hmr.js' {
declare module.exports: $Exports<'babel-preset-react-native/configs/hmr'>;
}
declare module 'babel-preset-react-native/configs/main.js' {
declare module.exports: $Exports<'babel-preset-react-native/configs/main'>;
}
declare module 'babel-preset-react-native/index' {
declare module.exports: $Exports<'babel-preset-react-native'>;
}
declare module 'babel-preset-react-native/index.js' {
declare module.exports: $Exports<'babel-preset-react-native'>;
}
declare module 'babel-preset-react-native/lib/resolvePlugins.js' {
declare module.exports: $Exports<'babel-preset-react-native/lib/resolvePlugins'>;
}
declare module 'babel-preset-react-native/plugins.js' {
declare module.exports: $Exports<'babel-preset-react-native/plugins'>;
}
declare module 'babel-preset-react-native/transforms/transform-dynamic-import.js' {
declare module.exports: $Exports<'babel-preset-react-native/transforms/transform-dynamic-import'>;
}
declare module 'babel-preset-react-native/transforms/transform-symbol-member.js' {
declare module.exports: $Exports<'babel-preset-react-native/transforms/transform-symbol-member'>;
}
126 changes: 126 additions & 0 deletions flow-typed/npm/enzyme_v3.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
// flow-typed signature: 687805dabf4b11b8ad99d263c9d3703d
// flow-typed version: f0c7fe5246/enzyme_v3.x.x/flow_>=v0.53.x

import * as React from "react";

declare module "enzyme" {
declare type PredicateFunction<T: Wrapper> = (
wrapper: T,
index: number
) => boolean;
declare type NodeOrNodes = React.Node | Array<React.Node>;
declare type EnzymeSelector = string | Class<React.Component<*, *>> | Object;

// CheerioWrapper is a type alias for an actual cheerio instance
// TODO: Reference correct type from cheerio's type declarations
declare type CheerioWrapper = any;

declare class Wrapper {
find(selector: EnzymeSelector): this,
findWhere(predicate: PredicateFunction<this>): this,
filter(selector: EnzymeSelector): this,
filterWhere(predicate: PredicateFunction<this>): this,
contains(nodeOrNodes: NodeOrNodes): boolean,
containsMatchingElement(node: React.Node): boolean,
containsAllMatchingElements(nodes: NodeOrNodes): boolean,
containsAnyMatchingElements(nodes: NodeOrNodes): boolean,
dive(option?: { context?: Object }): this,
exists(): boolean,
isEmptyRender(): boolean,
matchesElement(node: React.Node): boolean,
hasClass(className: string): boolean,
is(selector: EnzymeSelector): boolean,
isEmpty(): boolean,
not(selector: EnzymeSelector): this,
children(selector?: EnzymeSelector): this,
childAt(index: number): this,
parents(selector?: EnzymeSelector): this,
parent(): this,
closest(selector: EnzymeSelector): this,
render(): CheerioWrapper,
unmount(): this,
text(): string,
html(): string,
get(index: number): React.Node,
getNodes(): Array<React.Node>,
getDOMNode(): HTMLElement | HTMLInputElement,
at(index: number): this,
first(): this,
last(): this,
state(key?: string): any,
context(key?: string): any,
props(): Object,
prop(key: string): any,
key(): string,
simulate(event: string, ...args: Array<any>): this,
setState(state: {}, callback?: Function): this,
setProps(props: {}): this,
setContext(context: Object): this,
instance(): React.Component<*, *>,
update(): this,
debug(): string,
type(): string | Function | null,
name(): string,
forEach(fn: (node: this, index: number) => mixed): this,
map<T>(fn: (node: this, index: number) => T): Array<T>,
reduce<T>(
fn: (value: T, node: this, index: number) => T,
initialValue?: T
): Array<T>,
reduceRight<T>(
fn: (value: T, node: this, index: number) => T,
initialValue?: T
): Array<T>,
some(selector: EnzymeSelector): boolean,
someWhere(predicate: PredicateFunction<this>): boolean,
every(selector: EnzymeSelector): boolean,
everyWhere(predicate: PredicateFunction<this>): boolean,
length: number
}

declare class ReactWrapper extends Wrapper {
constructor(nodes: NodeOrNodes, root: any, options?: ?Object): ReactWrapper,
mount(): this,
ref(refName: string): this,
detach(): void
}

declare class ShallowWrapper extends Wrapper {
constructor(
nodes: NodeOrNodes,
root: any,
options?: ?Object
): ShallowWrapper,
equals(node: React.Node): boolean,
shallow(options?: { context?: Object }): ShallowWrapper
}

declare function shallow(
node: React.Node,
options?: { context?: Object, disableLifecycleMethods?: boolean }
): ShallowWrapper;
declare function mount(
node: React.Node,
options?: {
context?: Object,
attachTo?: HTMLElement,
childContextTypes?: Object
}
): ReactWrapper;
declare function render(
node: React.Node,
options?: { context?: Object }
): CheerioWrapper;

declare module.exports: {
configure(options: {
Adapter?: any,
disableLifecycleMethods?: boolean
}): void,
render: typeof render,
mount: typeof mount,
shallow: typeof shallow,
ShallowWrapper: typeof ShallowWrapper,
ReactWrapper: typeof ReactWrapper
};
}
Loading

0 comments on commit a6a21b5

Please sign in to comment.