diff --git a/components/app_bar/AppBar.js b/components/app_bar/AppBar.js index 85e90c6e..d4421b87 100644 --- a/components/app_bar/AppBar.js +++ b/components/app_bar/AppBar.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import cn from 'classnames'; import { themr } from 'react-css-themr'; import { APP_BAR } from '../identifiers'; diff --git a/components/autocomplete/Autocomplete.js b/components/autocomplete/Autocomplete.js index 458f40c1..099a0337 100644 --- a/components/autocomplete/Autocomplete.js +++ b/components/autocomplete/Autocomplete.js @@ -1,5 +1,6 @@ /* eslint-disable */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; @@ -21,14 +22,14 @@ const factory = (Chip, Input) => { className: PropTypes.string, direction: PropTypes.oneOf(['auto', 'up', 'down']), disabled: PropTypes.bool, - error: React.PropTypes.oneOfType([ - React.PropTypes.string, - React.PropTypes.node, + error: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.node, ]), keepFocusOnChange: PropTypes.bool, - label: React.PropTypes.oneOfType([ - React.PropTypes.string, - React.PropTypes.node, + label: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.node, ]), multiple: PropTypes.bool, onBlur: PropTypes.func, diff --git a/components/avatar/Avatar.js b/components/avatar/Avatar.js index e73ebe99..9d9dd944 100644 --- a/components/avatar/Avatar.js +++ b/components/avatar/Avatar.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { AVATAR } from '../identifiers'; diff --git a/components/button/BrowseButton.js b/components/button/BrowseButton.js index 199b27c6..662de5c8 100644 --- a/components/button/BrowseButton.js +++ b/components/button/BrowseButton.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { BUTTON } from '../identifiers'; diff --git a/components/button/Button.js b/components/button/Button.js index 5584e3ff..90634ea8 100644 --- a/components/button/Button.js +++ b/components/button/Button.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { BUTTON } from '../identifiers'; diff --git a/components/button/IconButton.js b/components/button/IconButton.js index 14992756..dde3d478 100644 --- a/components/button/IconButton.js +++ b/components/button/IconButton.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { BUTTON } from '../identifiers'; diff --git a/components/card/Card.js b/components/card/Card.js index 9c15137c..6f22b713 100644 --- a/components/card/Card.js +++ b/components/card/Card.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import classnames from 'classnames'; import { CARD } from '../identifiers'; diff --git a/components/card/CardActions.js b/components/card/CardActions.js index e11ae865..38555083 100644 --- a/components/card/CardActions.js +++ b/components/card/CardActions.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import classnames from 'classnames'; import { CARD } from '../identifiers'; diff --git a/components/card/CardMedia.js b/components/card/CardMedia.js index cf32853e..b12a4cbf 100644 --- a/components/card/CardMedia.js +++ b/components/card/CardMedia.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import classnames from 'classnames'; import { CARD } from '../identifiers'; diff --git a/components/card/CardText.js b/components/card/CardText.js index a9caf059..f0f8a847 100644 --- a/components/card/CardText.js +++ b/components/card/CardText.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import classnames from 'classnames'; import { CARD } from '../identifiers'; diff --git a/components/card/CardTitle.js b/components/card/CardTitle.js index 92dce98d..1aa74a58 100644 --- a/components/card/CardTitle.js +++ b/components/card/CardTitle.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { CARD } from '../identifiers'; diff --git a/components/checkbox/Check.js b/components/checkbox/Check.js index 71528634..2274594c 100644 --- a/components/checkbox/Check.js +++ b/components/checkbox/Check.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import styleShape from 'react-style-proptype'; diff --git a/components/checkbox/Checkbox.js b/components/checkbox/Checkbox.js index 5891eee3..94f93e02 100644 --- a/components/checkbox/Checkbox.js +++ b/components/checkbox/Checkbox.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import styleShape from 'react-style-proptype'; import { themr } from 'react-css-themr'; diff --git a/components/chip/Chip.js b/components/chip/Chip.js index a791be37..bb60a105 100644 --- a/components/chip/Chip.js +++ b/components/chip/Chip.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { CHIP } from '../identifiers'; diff --git a/components/date_picker/Calendar.js b/components/date_picker/Calendar.js index 4a0cfc5a..360f9cb0 100644 --- a/components/date_picker/Calendar.js +++ b/components/date_picker/Calendar.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import CssTransitionGroup from 'react-addons-css-transition-group'; import { range, getAnimationModule } from '../utils/utils'; import time from '../utils/time'; @@ -9,19 +10,19 @@ const DIRECTION_STEPS = { left: -1, right: 1 }; const factory = (IconButton) => { class Calendar extends Component { static propTypes = { - disabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)), + disabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)), display: PropTypes.oneOf(['months', 'years']), - enabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)), + enabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)), handleSelect: PropTypes.func, - locale: React.PropTypes.oneOfType([ - React.PropTypes.string, - React.PropTypes.object, + locale: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.object, ]), maxDate: PropTypes.instanceOf(Date), minDate: PropTypes.instanceOf(Date), onChange: PropTypes.func, selectedDate: PropTypes.instanceOf(Date), - sundayFirstDayOfWeek: React.PropTypes.bool, + sundayFirstDayOfWeek: PropTypes.bool, theme: PropTypes.shape({ active: PropTypes.string, calendar: PropTypes.string, diff --git a/components/date_picker/CalendarDay.js b/components/date_picker/CalendarDay.js index 027c010f..e4257a12 100644 --- a/components/date_picker/CalendarDay.js +++ b/components/date_picker/CalendarDay.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import time from '../utils/time'; diff --git a/components/date_picker/CalendarMonth.js b/components/date_picker/CalendarMonth.js index 08fb20aa..fdd9625a 100644 --- a/components/date_picker/CalendarMonth.js +++ b/components/date_picker/CalendarMonth.js @@ -1,21 +1,22 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { range } from '../utils/utils'; import time from '../utils/time'; import CalendarDay from './CalendarDay'; class Month extends Component { static propTypes = { - disabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)), - enabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)), - locale: React.PropTypes.oneOfType([ - React.PropTypes.string, - React.PropTypes.object, + disabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)), + enabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)), + locale: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.object, ]), maxDate: PropTypes.instanceOf(Date), minDate: PropTypes.instanceOf(Date), onDayClick: PropTypes.func, selectedDate: PropTypes.instanceOf(Date), - sundayFirstDayOfWeek: React.PropTypes.bool, + sundayFirstDayOfWeek: PropTypes.bool, theme: PropTypes.shape({ days: PropTypes.string, month: PropTypes.string, diff --git a/components/date_picker/DatePicker.js b/components/date_picker/DatePicker.js index 68029016..58211e8d 100644 --- a/components/date_picker/DatePicker.js +++ b/components/date_picker/DatePicker.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { DATE_PICKER } from '../identifiers'; @@ -18,8 +19,8 @@ const factory = (Input, DatePickerDialog) => { autoOk: PropTypes.bool, cancelLabel: PropTypes.string, className: PropTypes.string, - disabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)), - enabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)), + disabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)), + enabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)), error: PropTypes.string, icon: PropTypes.oneOfType([ PropTypes.string, @@ -28,9 +29,9 @@ const factory = (Input, DatePickerDialog) => { inputClassName: PropTypes.string, inputFormat: PropTypes.func, label: PropTypes.string, - locale: React.PropTypes.oneOfType([ - React.PropTypes.string, - React.PropTypes.object, + locale: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.object, ]), maxDate: PropTypes.instanceOf(Date), minDate: PropTypes.instanceOf(Date), @@ -43,7 +44,7 @@ const factory = (Input, DatePickerDialog) => { onKeyPress: PropTypes.func, onOverlayClick: PropTypes.func, readonly: PropTypes.bool, - sundayFirstDayOfWeek: React.PropTypes.bool, + sundayFirstDayOfWeek: PropTypes.bool, theme: PropTypes.shape({ container: PropTypes.string, input: PropTypes.string, diff --git a/components/date_picker/DatePickerDialog.js b/components/date_picker/DatePickerDialog.js index ea4c0baa..869572ed 100644 --- a/components/date_picker/DatePickerDialog.js +++ b/components/date_picker/DatePickerDialog.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import time from '../utils/time'; @@ -9,11 +10,11 @@ const factory = (Dialog, Calendar) => { autoOk: PropTypes.bool, cancelLabel: PropTypes.string, className: PropTypes.string, - disabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)), - enabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)), - locale: React.PropTypes.oneOfType([ - React.PropTypes.string, - React.PropTypes.object, + disabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)), + enabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)), + locale: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.object, ]), maxDate: PropTypes.instanceOf(Date), minDate: PropTypes.instanceOf(Date), @@ -23,7 +24,7 @@ const factory = (Dialog, Calendar) => { onEscKeyDown: PropTypes.func, onOverlayClick: PropTypes.func, onSelect: PropTypes.func, - sundayFirstDayOfWeek: React.PropTypes.bool, + sundayFirstDayOfWeek: PropTypes.bool, theme: PropTypes.shape({ button: PropTypes.string, calendarWrapper: PropTypes.string, diff --git a/components/dialog/Dialog.js b/components/dialog/Dialog.js index 74330861..5f9e2d40 100644 --- a/components/dialog/Dialog.js +++ b/components/dialog/Dialog.js @@ -1,5 +1,6 @@ /* eslint-disable jsx-a11y/aria-role */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import classnames from 'classnames'; import { DIALOG } from '../identifiers'; diff --git a/components/drawer/Drawer.js b/components/drawer/Drawer.js index 75dc8a7d..caba56db 100644 --- a/components/drawer/Drawer.js +++ b/components/drawer/Drawer.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import classnames from 'classnames'; import Portal from '../hoc/Portal'; diff --git a/components/dropdown/Dropdown.js b/components/dropdown/Dropdown.js index a9d527b0..d31e7e4d 100644 --- a/components/dropdown/Dropdown.js +++ b/components/dropdown/Dropdown.js @@ -1,5 +1,6 @@ /* eslint-disable */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; diff --git a/components/font_icon/FontIcon.js b/components/font_icon/FontIcon.js index a56bd612..26fe4b5f 100644 --- a/components/font_icon/FontIcon.js +++ b/components/font_icon/FontIcon.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; const FontIcon = ({ alt, children, className, theme, value, ...other}) => ( // eslint-disable-line diff --git a/components/hoc/ActivableRenderer.js b/components/hoc/ActivableRenderer.js index bc2908b7..edb6455c 100644 --- a/components/hoc/ActivableRenderer.js +++ b/components/hoc/ActivableRenderer.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; const ActivableRendererFactory = (options = { delay: 500 }) => ActivableComponent => class ActivableRenderer extends Component { diff --git a/components/hoc/Portal.js b/components/hoc/Portal.js index 2e09b10d..99769747 100644 --- a/components/hoc/Portal.js +++ b/components/hoc/Portal.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; class Portal extends Component { diff --git a/components/input/Input.js b/components/input/Input.js index 230472a9..545fe8d3 100644 --- a/components/input/Input.js +++ b/components/input/Input.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { INPUT } from '../identifiers'; diff --git a/components/layout/Layout.js b/components/layout/Layout.js index 6277a1a9..8c540436 100644 --- a/components/layout/Layout.js +++ b/components/layout/Layout.js @@ -1,4 +1,5 @@ -import React, { cloneElement, Component, PropTypes } from 'react'; +import React, { cloneElement, Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { getViewport } from '../utils/utils'; diff --git a/components/layout/NavDrawer.js b/components/layout/NavDrawer.js index e4a36b21..967afc6b 100644 --- a/components/layout/NavDrawer.js +++ b/components/layout/NavDrawer.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import InjectDrawer from '../drawer/Drawer'; diff --git a/components/layout/Panel.js b/components/layout/Panel.js index a7cbfd47..24410405 100644 --- a/components/layout/Panel.js +++ b/components/layout/Panel.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import cn from 'classnames'; import { themr } from 'react-css-themr'; import { LAYOUT } from '../identifiers'; diff --git a/components/layout/Sidebar.js b/components/layout/Sidebar.js index 006d8231..562dde22 100644 --- a/components/layout/Sidebar.js +++ b/components/layout/Sidebar.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import InjectDrawer from '../drawer/Drawer'; diff --git a/components/link/Link.js b/components/link/Link.js index 382f2a8d..7097759b 100644 --- a/components/link/Link.js +++ b/components/link/Link.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { LINK } from '../identifiers'; diff --git a/components/list/List.js b/components/list/List.js index f90c7324..a9a14f69 100644 --- a/components/list/List.js +++ b/components/list/List.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; diff --git a/components/list/ListCheckbox.js b/components/list/ListCheckbox.js index b2a7203d..9498b660 100644 --- a/components/list/ListCheckbox.js +++ b/components/list/ListCheckbox.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; diff --git a/components/list/ListDivider.js b/components/list/ListDivider.js index 851575ad..80eaa97f 100644 --- a/components/list/ListDivider.js +++ b/components/list/ListDivider.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; diff --git a/components/list/ListItem.js b/components/list/ListItem.js index 79d0056b..f2e836b0 100644 --- a/components/list/ListItem.js +++ b/components/list/ListItem.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; import InjectListItemContent from './ListItemContent'; diff --git a/components/list/ListItemAction.js b/components/list/ListItemAction.js index 838d2adc..c74bc44c 100644 --- a/components/list/ListItemAction.js +++ b/components/list/ListItemAction.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; diff --git a/components/list/ListItemActions.js b/components/list/ListItemActions.js index 71f9e639..01053416 100644 --- a/components/list/ListItemActions.js +++ b/components/list/ListItemActions.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; import InjectListItemAction from './ListItemAction'; diff --git a/components/list/ListItemContent.js b/components/list/ListItemContent.js index 8a6dff29..561be326 100644 --- a/components/list/ListItemContent.js +++ b/components/list/ListItemContent.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; diff --git a/components/list/ListItemLayout.js b/components/list/ListItemLayout.js index d7be0565..0ee7f199 100644 --- a/components/list/ListItemLayout.js +++ b/components/list/ListItemLayout.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; diff --git a/components/list/ListItemText.js b/components/list/ListItemText.js index 21160508..20bfb611 100644 --- a/components/list/ListItemText.js +++ b/components/list/ListItemText.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; diff --git a/components/list/ListSubHeader.js b/components/list/ListSubHeader.js index db4a1fd5..31f988f8 100644 --- a/components/list/ListSubHeader.js +++ b/components/list/ListSubHeader.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { LIST } from '../identifiers'; diff --git a/components/menu/IconMenu.js b/components/menu/IconMenu.js index 9962b5c1..3fd7341c 100644 --- a/components/menu/IconMenu.js +++ b/components/menu/IconMenu.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { MENU } from '../identifiers'; diff --git a/components/menu/Menu.js b/components/menu/Menu.js index efd46156..77333ac3 100644 --- a/components/menu/Menu.js +++ b/components/menu/Menu.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; diff --git a/components/menu/MenuDivider.js b/components/menu/MenuDivider.js index 89543bca..242b1834 100644 --- a/components/menu/MenuDivider.js +++ b/components/menu/MenuDivider.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import { MENU } from '../identifiers'; diff --git a/components/menu/MenuItem.js b/components/menu/MenuItem.js index d573704b..5b5cfffa 100644 --- a/components/menu/MenuItem.js +++ b/components/menu/MenuItem.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { MENU } from '../identifiers'; diff --git a/components/navigation/Navigation.js b/components/navigation/Navigation.js index 29a014fb..8a364c98 100644 --- a/components/navigation/Navigation.js +++ b/components/navigation/Navigation.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { NAVIGATION } from '../identifiers'; diff --git a/components/overlay/Overlay.js b/components/overlay/Overlay.js index d33a2c7f..59992e1e 100644 --- a/components/overlay/Overlay.js +++ b/components/overlay/Overlay.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { OVERLAY } from '../identifiers'; diff --git a/components/progress_bar/ProgressBar.js b/components/progress_bar/ProgressBar.js index 8cdccedc..b8957fc6 100644 --- a/components/progress_bar/ProgressBar.js +++ b/components/progress_bar/ProgressBar.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { PROGRESS_BAR } from '../identifiers'; diff --git a/components/radio/Radio.js b/components/radio/Radio.js index 7b9d9b61..1d18cfd3 100644 --- a/components/radio/Radio.js +++ b/components/radio/Radio.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; const factory = (ripple) => { const Radio = ({ checked, onMouseDown, theme, ...other }) => ( diff --git a/components/radio/RadioButton.js b/components/radio/RadioButton.js index 69fc2a09..6d36c6f6 100644 --- a/components/radio/RadioButton.js +++ b/components/radio/RadioButton.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { RADIO } from '../identifiers'; diff --git a/components/radio/RadioGroup.js b/components/radio/RadioGroup.js index a0488894..13d8b3df 100644 --- a/components/radio/RadioGroup.js +++ b/components/radio/RadioGroup.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import { RADIO } from '../identifiers'; import InjectRadioButton from './RadioButton'; diff --git a/components/ripple/Ripple.js b/components/ripple/Ripple.js index 150a3f74..2709b650 100644 --- a/components/ripple/Ripple.js +++ b/components/ripple/Ripple.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; diff --git a/components/slider/Slider.js b/components/slider/Slider.js index 229670ba..01edef5c 100644 --- a/components/slider/Slider.js +++ b/components/slider/Slider.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import classnames from 'classnames'; import styleShape from 'react-style-proptype'; diff --git a/components/snackbar/Snackbar.js b/components/snackbar/Snackbar.js index feb0859a..bf355644 100644 --- a/components/snackbar/Snackbar.js +++ b/components/snackbar/Snackbar.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { SNACKBAR } from '../identifiers'; diff --git a/components/switch/Switch.js b/components/switch/Switch.js index 16cd228f..3dee9b25 100644 --- a/components/switch/Switch.js +++ b/components/switch/Switch.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { SWITCH } from '../identifiers'; diff --git a/components/switch/Thumb.js b/components/switch/Thumb.js index 92e9a82c..0f195e6b 100644 --- a/components/switch/Thumb.js +++ b/components/switch/Thumb.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; const factory = (ripple) => { const Thumb = ({ onMouseDown, theme, ...other }) => ( diff --git a/components/table/Table.js b/components/table/Table.js index cbaf1d79..f7eff3c9 100644 --- a/components/table/Table.js +++ b/components/table/Table.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component, cloneElement } from 'react'; +import React, { Component, cloneElement } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import filterReactChildren from '../utils/filter-react-children'; diff --git a/components/table/TableCell.js b/components/table/TableCell.js index 3324c118..3785b774 100644 --- a/components/table/TableCell.js +++ b/components/table/TableCell.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { TABLE } from '../identifiers'; diff --git a/components/table/TableHead.js b/components/table/TableHead.js index 74ec38b1..06fccdf1 100644 --- a/components/table/TableHead.js +++ b/components/table/TableHead.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes, cloneElement } from 'react'; +import React, { Component, cloneElement } from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import { TABLE } from '../identifiers'; import InjectCheckbox from '../checkbox/Checkbox'; diff --git a/components/table/TableRow.js b/components/table/TableRow.js index 4acd26f9..b490d42d 100644 --- a/components/table/TableRow.js +++ b/components/table/TableRow.js @@ -1,4 +1,5 @@ -import React, { cloneElement, Component, PropTypes } from 'react'; +import React, { cloneElement, Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { TABLE } from '../identifiers'; diff --git a/components/tabs/Tab.js b/components/tabs/Tab.js index 40fcee5b..eb35c222 100644 --- a/components/tabs/Tab.js +++ b/components/tabs/Tab.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { FontIcon } from '../font_icon'; diff --git a/components/tabs/TabContent.js b/components/tabs/TabContent.js index a329a364..b9c98bea 100644 --- a/components/tabs/TabContent.js +++ b/components/tabs/TabContent.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { TABS } from '../identifiers'; diff --git a/components/tabs/Tabs.js b/components/tabs/Tabs.js index 2d617df5..81c73458 100644 --- a/components/tabs/Tabs.js +++ b/components/tabs/Tabs.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { TABS } from '../identifiers'; diff --git a/components/time_picker/Clock.js b/components/time_picker/Clock.js index 43a6fe3b..b8a4fef6 100644 --- a/components/time_picker/Clock.js +++ b/components/time_picker/Clock.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import CssTransitionGroup from 'react-addons-css-transition-group'; import { getAnimationModule } from '../utils/utils'; import time from '../utils/time'; diff --git a/components/time_picker/ClockFace.js b/components/time_picker/ClockFace.js index 5fcfcf77..279be6de 100644 --- a/components/time_picker/ClockFace.js +++ b/components/time_picker/ClockFace.js @@ -1,5 +1,6 @@ /* eslint-disable no-mixed-operators */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; class Face extends Component { diff --git a/components/time_picker/ClockHand.js b/components/time_picker/ClockHand.js index 5eb8aee6..d6cb88c1 100644 --- a/components/time_picker/ClockHand.js +++ b/components/time_picker/ClockHand.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { angle360FromPositions } from '../utils/utils'; import events from '../utils/events'; import prefixer from '../utils/prefixer'; diff --git a/components/time_picker/ClockHours.js b/components/time_picker/ClockHours.js index fa24e926..71a067e4 100644 --- a/components/time_picker/ClockHours.js +++ b/components/time_picker/ClockHours.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { range } from '../utils/utils'; import Hand from './ClockHand'; import Face from './ClockFace'; diff --git a/components/time_picker/ClockMinutes.js b/components/time_picker/ClockMinutes.js index e06e4404..34c15ac4 100644 --- a/components/time_picker/ClockMinutes.js +++ b/components/time_picker/ClockMinutes.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { range } from '../utils/utils'; import Hand from './ClockHand'; import Face from './ClockFace'; diff --git a/components/time_picker/TimePicker.js b/components/time_picker/TimePicker.js index 74804f42..723ca206 100644 --- a/components/time_picker/TimePicker.js +++ b/components/time_picker/TimePicker.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import { TIME_PICKER } from '../identifiers'; diff --git a/components/time_picker/TimePickerDialog.js b/components/time_picker/TimePickerDialog.js index 5d16b597..28d21955 100644 --- a/components/time_picker/TimePickerDialog.js +++ b/components/time_picker/TimePickerDialog.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import cn from 'classnames'; import time from '../utils/time'; import Clock from './Clock'; diff --git a/components/tooltip/Tooltip.js b/components/tooltip/Tooltip.js index 9a6c2cc1..f2a07617 100644 --- a/components/tooltip/Tooltip.js +++ b/components/tooltip/Tooltip.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import Portal from '../hoc/Portal'; diff --git a/docs/app/components/appbar/index.js b/docs/app/components/appbar/index.js index 2bdd8138..4ec69686 100644 --- a/docs/app/components/appbar/index.js +++ b/docs/app/components/appbar/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { AppBar } from 'react-toolbox'; import { Link } from 'react-router'; import Logo from '../logo'; @@ -20,7 +21,7 @@ const MainAppBar = (props) => { }; MainAppBar.propTypes = { - className: React.PropTypes.string + className: PropTypes.string }; MainAppBar.defaultProps = { diff --git a/docs/app/components/editor/index.js b/docs/app/components/editor/index.js index 2b6536dd..51238eb3 100644 --- a/docs/app/components/editor/index.js +++ b/docs/app/components/editor/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import CodeMirror from 'codemirror'; import style from './style.css'; import 'codemirror/lib/codemirror.css'; @@ -7,13 +8,13 @@ import './one-dark.css'; class Editor extends React.Component { static propTypes = { - className: React.PropTypes.string, - codeText: React.PropTypes.string, - lineNumbers: React.PropTypes.bool, - onChange: React.PropTypes.func, - readOnly: React.PropTypes.bool, - tabSize: React.PropTypes.number, - theme: React.PropTypes.string + className: PropTypes.string, + codeText: PropTypes.string, + lineNumbers: PropTypes.bool, + onChange: PropTypes.func, + readOnly: PropTypes.bool, + tabSize: PropTypes.number, + theme: PropTypes.string }; static defaultProps = { diff --git a/docs/app/components/layout/main/components/navigation.js b/docs/app/components/layout/main/components/navigation.js index 1a807979..305a252c 100644 --- a/docs/app/components/layout/main/components/navigation.js +++ b/docs/app/components/layout/main/components/navigation.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { List, ListItem } from 'react-toolbox'; import classnames from 'classnames'; import components from '../modules/components'; diff --git a/docs/app/components/layout/main/components/playground.js b/docs/app/components/layout/main/components/playground.js index 29e93b31..9a6e6f23 100644 --- a/docs/app/components/layout/main/components/playground.js +++ b/docs/app/components/layout/main/components/playground.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import Editor from '../../../editor'; import Preview from '../../../preview'; import codeText from '../modules/examples/example.txt'; @@ -6,7 +7,7 @@ import style from './playground.css'; class Playground extends React.Component { static propTypes = { - className: React.PropTypes.string + className: PropTypes.string }; state = { diff --git a/docs/app/components/layout/main/index.js b/docs/app/components/layout/main/index.js index 75a3f1ff..eb2b76c1 100644 --- a/docs/app/components/layout/main/index.js +++ b/docs/app/components/layout/main/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import { Button } from 'react-toolbox'; import Appbar from '../../../components/appbar'; @@ -21,13 +22,13 @@ const LoadExampleButton = props => ( ); LoadExampleButton.propTypes = { - onClick: React.PropTypes.func + onClick: PropTypes.func }; class Main extends React.Component { static propTypes = { - onClick: React.PropTypes.func, - params: React.PropTypes.object + onClick: PropTypes.func, + params: PropTypes.object }; state = { diff --git a/docs/app/components/logo/index.js b/docs/app/components/logo/index.js index 236391a6..1cbf1e1c 100644 --- a/docs/app/components/logo/index.js +++ b/docs/app/components/logo/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import style from './style.css'; const Logo = (props) => { @@ -16,7 +17,7 @@ const Logo = (props) => { }; Logo.propTypes = { - className: React.PropTypes.string + className: PropTypes.string }; export default Logo; diff --git a/docs/app/components/markdown/index.js b/docs/app/components/markdown/index.js index 3d85d7ab..90c380fc 100644 --- a/docs/app/components/markdown/index.js +++ b/docs/app/components/markdown/index.js @@ -1,5 +1,6 @@ import 'highlight.js/styles/github-gist'; import React from 'react'; +import PropTypes from 'prop-types'; import style from './style.css'; const Markdown = (props) => { @@ -14,8 +15,8 @@ const Markdown = (props) => { }; Markdown.propTypes = { - className: React.PropTypes.string, - markdown: React.PropTypes.string.isRequired + className: PropTypes.string, + markdown: PropTypes.string.isRequired }; Markdown.defaultProps = { diff --git a/docs/app/components/navigation/index.js b/docs/app/components/navigation/index.js index 950525d2..a475ebc5 100644 --- a/docs/app/components/navigation/index.js +++ b/docs/app/components/navigation/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; const Navigation = props => ( @@ -12,8 +13,8 @@ const Navigation = props => ( ); Navigation.propTypes = { - activeClassName: React.PropTypes.string, - className: React.PropTypes.string + activeClassName: PropTypes.string, + className: PropTypes.string }; diff --git a/docs/app/components/preview/index.js b/docs/app/components/preview/index.js index 414078eb..5270b50c 100644 --- a/docs/app/components/preview/index.js +++ b/docs/app/components/preview/index.js @@ -1,5 +1,6 @@ /* eslint-disable no-eval*/ import React from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import { transform } from 'babel-standalone'; import * as ReactToolbox from 'react-toolbox'; @@ -9,9 +10,9 @@ const ERROR_TIMEOUT = 500; const Preview = React.createClass({ propTypes: { - className: React.PropTypes.string, - code: React.PropTypes.string.isRequired, - scope: React.PropTypes.object + className: PropTypes.string, + code: PropTypes.string.isRequired, + scope: PropTypes.object }, getDefaultProps () { diff --git a/package.json b/package.json index 4300d47c..06051c86 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "postcss-mixins": "^5.4.0", "postcss-reporter": "^3.0.0", "pre-commit": "^1.2.2", + "prop-types": "^15.5.7", "react": "^15.4.2", "react-addons-test-utils": "^15.4.2", "react-dom": "^15.4.2", @@ -133,6 +134,7 @@ }, "peerDependencies": { "classnames": "^2.2.0", + "prop-types": "^15.5.7", "react": "^0.14 || ~15.4.0", "react-addons-css-transition-group": "^0.14.0 || ~15.4.0", "react-dom": "^0.14.0 || ~15.4.0" diff --git a/spec/components/dialog.js b/spec/components/dialog.js index 33e0ca7c..480a72cd 100644 --- a/spec/components/dialog.js +++ b/spec/components/dialog.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import Button from '../../components/button'; import Dialog from '../../components/dialog'; import Dropdown from '../../components/dropdown'; diff --git a/yarn.lock b/yarn.lock index 8b70e293..612c9f18 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5734,6 +5734,12 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +prop-types@^15.5.7: + version "15.5.7" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.7.tgz#231c4f29cdd82e355011d4889386ca9059544dd1" + dependencies: + fbjs "^0.8.9" + proxy-addr@~1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.3.tgz#dc97502f5722e888467b3fa2297a7b1ff47df074"