Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(package): use prop-types package #1576

Merged
merged 4 commits into from
Apr 16, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/app/Components/ComponentDoc/ComponentDoc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import DocumentTitle from 'react-document-title'
import { Link } from 'react-router-dom'

Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/ComponentDoc/ComponentExample.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as Babel from 'babel-standalone'
import _ from 'lodash'
import React, { Component, createElement, isValidElement, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component, createElement, isValidElement } from 'react'
import { withRouter } from 'react-router'
import { renderToStaticMarkup } from 'react-dom/server'
import { html } from 'js-beautify'
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/ComponentDoc/ComponentExamples.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash'
import React, { Component, createElement, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component, createElement } from 'react'

import { exampleContext } from 'docs/app/utils'
import { Grid } from 'src'
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/ComponentDoc/ComponentProps.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'

import { Header, Icon, Popup, Table } from 'src'
import { SUI } from 'src/lib'
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/ComponentDoc/ContributionPrompt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import { repoURL } from 'docs/app/utils'
import { Message, Icon } from 'src'
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/ComponentDoc/ExampleSection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import { Grid, Header } from 'src'

Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/Editor/Editor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import AceEditor from 'react-ace'
import ace from 'brace'
import 'brace/ext/language_tools'
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/ExternalExampleLayout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash/fp'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'

import PageNotFound from '../Views/PageNotFound'
import { exampleContext } from 'docs/app/utils'
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/Layout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AnchorJS from 'anchor-js'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'

import Sidebar from 'docs/app/Components/Sidebar/Sidebar'
import style from 'docs/app/Style'
Expand Down
1 change: 0 additions & 1 deletion docs/app/Components/Logo/Logo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'

import { Image } from 'src'

const Logo = (props) => <Image {...props} src='/logo.png' />
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/Root.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash/fp'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'

import ComponentDoc from '../Components/ComponentDoc/ComponentDoc'
import { META } from 'src/lib'
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash/fp'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { findDOMNode } from 'react-dom'
import { NavLink } from 'react-router-dom'
import { withRouter } from 'react-router'
Expand Down
3 changes: 2 additions & 1 deletion docs/app/Examples/collections/Form/Shorthand/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Menu } from 'semantic-ui-react'

const colors = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Menu } from 'semantic-ui-react'

const colors = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import { Grid, Image, Rail, Segment } from 'semantic-ui-react'

const Wrapper = ({ children }) => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import { Label } from 'semantic-ui-react'

import SearchExampleCategory from './SearchExampleCategory'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import { Label } from 'semantic-ui-react'

import SearchExampleStandard from './SearchExampleStandard'
Expand Down
4 changes: 3 additions & 1 deletion docs/app/Views/Introduction.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import { Link } from 'react-router-dom'

import Editor from 'docs/app/Components/Editor/Editor'
import pkg from 'package.json'
import {
Expand Down
1 change: 1 addition & 0 deletions docs/app/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<script src="//cdn.jsdelivr.net/faker.js/<%= htmlWebpackPlugin.options.versions.faker %>/faker.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/<%= htmlWebpackPlugin.options.versions.jsBeautify %>/beautify-html.min.js"></script>
<!-- Use unminified React when not in production so we get errors and warnings -->
<script src="//unpkg.com/prop-types@<%= htmlWebpackPlugin.options.versions.propTypes %>/prop-types.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/<%= htmlWebpackPlugin.options.versions.react %>/react<%= __PROD__ ? '.min' : '' %>.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/<%= htmlWebpackPlugin.options.versions.reactDOM %>/react-dom.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/<%= htmlWebpackPlugin.options.versions.reactDOM %>/react-dom-server.min.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
"babel-runtime": "^6.22.0",
"classnames": "^2.1.5",
"debug": "^2.6.3",
"lodash": "^4.17.2"
"lodash": "^4.17.2",
"prop-types": "^15.5.7"
},
"devDependencies": {
"@types/react": "^15.0.14",
Expand Down
3 changes: 2 additions & 1 deletion src/addons/Confirm/Confirm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/addons/Portal/Portal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash'
import { Children, cloneElement, PropTypes } from 'react'
import PropTypes from 'prop-types'
import { Children, cloneElement } from 'react'
import ReactDOM from 'react-dom'

import {
Expand Down
3 changes: 2 additions & 1 deletion src/addons/TextArea/TextArea.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import {
customPropTypes,
getElementType,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Breadcrumb/Breadcrumb.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Breadcrumb/BreadcrumbDivider.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
createShorthandFactory,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Breadcrumb/BreadcrumbSection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'

import {
createShorthandFactory,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Form/Form.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Form/FormField.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { createElement, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { createElement } from 'react'

import {
createHTMLLabel,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Form/FormGroup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Grid/Grid.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Grid/GridColumn.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Grid/GridRow.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Menu/Menu.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
AutoControlledComponent as Component,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Menu/MenuHeader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Menu/MenuItem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'

import {
createShorthandFactory,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Menu/MenuMenu.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Message/Message.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import React, { Component } from 'react'

import {
createHTMLParagraph,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Message/MessageContent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Message/MessageHeader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
createShorthandFactory,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Message/MessageItem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
createShorthandFactory,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Message/MessageList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cx from 'classnames'
import _ from 'lodash'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
createShorthandFactory,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Table/Table.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _ from 'lodash'
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Table/TableBody.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Table/TableCell.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _ from 'lodash'
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
createShorthandFactory,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Table/TableHeader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Table/TableHeaderCell.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
customPropTypes,
Expand Down
3 changes: 2 additions & 1 deletion src/collections/Table/TableRow.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _ from 'lodash'
import cx from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'

import {
createShorthandFactory,
Expand Down
Loading