From db4c49647952a983bebc62118e3b36cb44ea27a1 Mon Sep 17 00:00:00 2001 From: Francois Zaninotto Date: Mon, 14 May 2018 09:44:53 +0200 Subject: [PATCH 1/2] upgrade to mui-rc.0 --- README.md | 2 +- UPGRADE.md | 25 ++-- docs/Actions.md | 8 +- docs/Admin.md | 13 ++- docs/Authentication.md | 4 +- docs/Authorization.md | 6 +- docs/CreateEdit.md | 2 +- docs/CustomApp.md | 8 +- docs/Fields.md | 6 +- docs/Inputs.md | 12 +- docs/List.md | 15 ++- docs/Show.md | 9 +- docs/Theming.md | 22 ++-- docs/Translation.md | 2 +- docs/Tutorial.md | 4 +- examples/demo/package.json | 4 +- examples/demo/src/Login.js | 13 ++- .../src/categories/LinkToRelatedProducts.js | 4 +- examples/demo/src/categories/index.js | 2 +- examples/demo/src/commands/Basket.js | 15 ++- examples/demo/src/commands/MobileGrid.js | 6 +- examples/demo/src/commands/index.js | 2 +- .../demo/src/configuration/Configuration.js | 7 +- examples/demo/src/dashboard/CardIcon.js | 4 +- examples/demo/src/dashboard/MonthlyRevenue.js | 6 +- examples/demo/src/dashboard/NbNewOrders.js | 6 +- examples/demo/src/dashboard/NewCustomers.js | 14 ++- examples/demo/src/dashboard/PendingOrders.js | 16 +-- examples/demo/src/dashboard/PendingReviews.js | 14 ++- examples/demo/src/dashboard/Welcome.js | 8 +- examples/demo/src/products/GridList.js | 9 +- examples/demo/src/products/Poster.js | 5 +- examples/demo/src/products/ThumbnailField.js | 2 +- examples/demo/src/products/index.js | 4 +- examples/demo/src/reviews/AcceptButton.js | 2 +- examples/demo/src/reviews/ApproveButton.js | 4 +- examples/demo/src/reviews/MobileGrid.js | 7 +- examples/demo/src/reviews/RejectButton.js | 2 +- .../demo/src/reviews/ReviewEditActions.js | 3 +- examples/demo/src/reviews/index.js | 2 +- .../src/segments/LinkToRelatedCustomers.js | 4 +- examples/demo/src/segments/Segments.js | 13 +-- examples/demo/src/visitors/AvatarField.js | 2 +- examples/demo/src/visitors/MobileGrid.js | 7 +- examples/demo/src/visitors/SegmentInput.js | 2 +- examples/demo/src/visitors/SegmentsField.js | 2 +- examples/demo/src/visitors/index.js | 2 +- examples/graphcool-demo/package.json | 4 +- examples/graphcool-demo/src/Login.js | 13 ++- .../src/categories/LinkToRelatedProducts.js | 4 +- .../graphcool-demo/src/commands/Basket.js | 15 ++- .../graphcool-demo/src/commands/MobileGrid.js | 7 +- examples/graphcool-demo/src/commands/index.js | 2 +- .../src/configuration/Configuration.js | 5 +- .../graphcool-demo/src/dashboard/Dashboard.js | 3 +- .../src/dashboard/MonthlyRevenue.js | 3 +- .../src/dashboard/NbNewOrders.js | 3 +- .../src/dashboard/NewCustomers.js | 11 +- .../src/dashboard/PendingOrders.js | 16 +-- .../src/dashboard/PendingReviews.js | 11 +- .../graphcool-demo/src/dashboard/Welcome.js | 8 +- .../graphcool-demo/src/products/GridList.js | 9 +- .../graphcool-demo/src/products/Poster.js | 3 +- examples/graphcool-demo/src/products/index.js | 4 +- .../src/reviews/AcceptButton.js | 2 +- .../src/reviews/ApproveButton.js | 2 +- .../graphcool-demo/src/reviews/MobileGrid.js | 6 +- .../src/reviews/RejectButton.js | 2 +- .../src/reviews/ReviewEditActions.js | 2 +- examples/graphcool-demo/src/reviews/index.js | 2 +- .../src/segments/LinkToRelatedCustomers.js | 4 +- .../src/segments/SegmentReferenceField.js | 2 +- .../graphcool-demo/src/segments/Segments.js | 13 +-- .../src/visitors/AvatarField.js | 2 +- .../graphcool-demo/src/visitors/MobileGrid.js | 6 +- examples/graphcool-demo/src/visitors/index.js | 2 +- examples/simple/package.json | 4 +- examples/simple/src/comments/CommentEdit.js | 6 +- examples/simple/src/comments/CommentList.js | 15 ++- examples/simple/src/posts/PostList.js | 7 +- examples/simple/src/users/UserList.js | 2 +- examples/tutorial/package.json | 2 +- examples/tutorial/src/Dashboard.js | 4 +- .../src/controller/ListController.spec.js | 2 +- packages/ra-ui-materialui/package.json | 5 +- packages/ra-ui-materialui/src/Link.js | 2 +- packages/ra-ui-materialui/src/auth/Login.js | 6 +- .../ra-ui-materialui/src/auth/LoginForm.js | 10 +- packages/ra-ui-materialui/src/auth/Logout.js | 10 +- .../ra-ui-materialui/src/button/Button.js | 8 +- .../src/button/CreateButton.js | 6 +- .../src/button/DeleteButton.js | 4 +- .../ra-ui-materialui/src/button/SaveButton.js | 7 +- .../ra-ui-materialui/src/detail/Create.js | 2 +- .../src/detail/CreateActions.js | 2 +- packages/ra-ui-materialui/src/detail/Edit.js | 3 +- .../src/detail/EditActions.js | 2 +- packages/ra-ui-materialui/src/detail/Show.js | 2 +- .../src/detail/ShowActions.js | 2 +- .../src/detail/SimpleShowLayout.js | 2 +- packages/ra-ui-materialui/src/detail/Tab.js | 2 +- .../src/detail/TabbedShowLayout.js | 6 +- .../ra-ui-materialui/src/field/ChipField.js | 4 +- .../ra-ui-materialui/src/field/FileField.js | 2 +- .../ra-ui-materialui/src/field/ImageField.js | 2 +- .../ra-ui-materialui/src/field/NumberField.js | 2 +- .../src/field/ReferenceArrayField.js | 4 +- .../src/field/ReferenceField.js | 2 +- .../src/field/ReferenceManyField.js | 4 +- .../src/field/RichTextField.js | 2 +- .../ra-ui-materialui/src/form/FormInput.js | 2 +- .../ra-ui-materialui/src/form/SimpleForm.js | 2 +- .../src/form/SimpleFormIterator.js | 6 +- .../ra-ui-materialui/src/form/TabbedForm.js | 7 +- packages/ra-ui-materialui/src/form/Toolbar.js | 4 +- .../ra-ui-materialui/src/input/ArrayInput.js | 4 +- .../src/input/AutocompleteInput.js | 8 +- .../src/input/BooleanInput.js | 5 +- .../src/input/CheckboxGroupInput.js | 16 ++- .../ra-ui-materialui/src/input/DateInput.js | 2 +- .../src/input/DisabledInput.js | 2 +- .../ra-ui-materialui/src/input/FileInput.js | 2 +- .../src/input/FileInputPreview.js | 4 +- .../ra-ui-materialui/src/input/ImageInput.js | 2 +- .../ra-ui-materialui/src/input/Labeled.js | 6 +- .../src/input/LongTextInput.js | 2 +- .../src/input/NullableBooleanInput.js | 6 +- .../ra-ui-materialui/src/input/NumberInput.js | 2 +- .../src/input/RadioButtonGroupInput.js | 15 ++- .../src/input/ReferenceError.js | 2 +- .../src/input/SelectArrayInput.js | 14 ++- .../ra-ui-materialui/src/input/SelectInput.js | 6 +- .../ra-ui-materialui/src/input/TextInput.js | 2 +- .../ra-ui-materialui/src/layout/AppBar.js | 10 +- .../src/layout/AppBarMobile.js | 10 +- .../src/layout/CardActions.js | 4 +- .../ra-ui-materialui/src/layout/Confirm.js | 17 ++- .../ra-ui-materialui/src/layout/Header.js | 2 +- .../ra-ui-materialui/src/layout/Layout.js | 4 +- .../src/layout/LinearProgress.js | 4 +- .../ra-ui-materialui/src/layout/Loading.js | 4 +- .../src/layout/LoadingIndicator.js | 6 +- packages/ra-ui-materialui/src/layout/Menu.js | 2 +- .../src/layout/MenuItemLink.js | 4 +- .../ra-ui-materialui/src/layout/NotFound.js | 6 +- .../src/layout/Notification.js | 6 +- .../ra-ui-materialui/src/layout/Responsive.js | 2 +- .../ra-ui-materialui/src/layout/Sidebar.js | 6 +- .../ra-ui-materialui/src/layout/ViewTitle.js | 4 +- .../ra-ui-materialui/src/list/BulkActions.js | 5 +- .../ra-ui-materialui/src/list/Datagrid.js | 9 +- .../ra-ui-materialui/src/list/DatagridBody.js | 2 +- .../ra-ui-materialui/src/list/DatagridCell.js | 2 +- .../src/list/DatagridHeaderCell.js | 5 +- .../ra-ui-materialui/src/list/DatagridRow.js | 5 +- packages/ra-ui-materialui/src/list/Filter.js | 2 +- .../ra-ui-materialui/src/list/FilterButton.js | 4 +- .../src/list/FilterButtonMenuItem.js | 2 +- .../ra-ui-materialui/src/list/FilterForm.js | 4 +- .../src/list/FilterForm.spec.js | 2 +- .../src/list/FilterFormInput.js | 2 +- packages/ra-ui-materialui/src/list/List.js | 7 +- .../ra-ui-materialui/src/list/Pagination.js | 10 +- .../ra-ui-materialui/src/list/SimpleList.js | 17 ++- .../src/list/SingleFieldList.js | 2 +- packages/react-admin/README.md | 2 +- yarn.lock | 107 +++++++++--------- 167 files changed, 549 insertions(+), 494 deletions(-) diff --git a/README.md b/README.md index abde572167b..63e84176c0d 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ The `` component is a configuration component that allows to define su // in posts.js import React from 'react'; import { List, Datagrid, Edit, Create, SimpleForm, DateField, TextField, EditButton, DisabledInput, TextInput, LongTextInput, DateInput } from 'react-admin'; -import BookIcon from 'material-ui/svg-icons/action/book'; +import BookIcon from '@material-ui/core/svg-icons/action/book'; export const PostIcon = BookIcon; export const PostList = (props) => ( diff --git a/UPGRADE.md b/UPGRADE.md index ec15da2a692..e01ed8070f3 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -256,8 +256,8 @@ If you used CSS to customize the look and feel of these components, please updat Adding the `addField` prop to a component used to automatically add a redux-form `` component around an input component that you wanted to bind to the edit or create form. This feature was moved to a Higher-order component (HOC): ```diff -import SelectField from 'material-ui/SelectField'; -import MenuItem from 'material-ui/MenuItem'; +import SelectField from '@material-ui/core/SelectField'; +import MenuItem from '@material-ui/core/MenuItem'; + import { addField } from 'react-admin'; const SexInput = ({ input, meta: { touched, error } }) => ( ` component. If you relied on that prop to refresh the list, you must now use the new `` component. ```diff -import { CardActions } from 'material-ui/Card'; -- import FlatButton from 'material-ui/FlatButton'; +import CardActions from '@material-ui/core/CardActions'; +- import FlatButton from '@material-ui/core/FlatButton'; - import { CreateButton } from 'admin-on-rest'; -- import NavigationRefresh from 'material-ui/svg-icons/navigation/refresh'; +- import NavigationRefresh from '@material-ui/core/svg-icons/navigation/refresh'; + import { CreateButton, RefreshButton } from 'react-admin'; - const PostListActions = ({ resource, filters, displayedFilters, filterValues, basePath, showFilter, refresh }) => ( @@ -336,7 +336,7 @@ All react-admin components now accept a `className` prop instead of the `elStyle // foo@example.com // + import { EmailField, List, Datagrid } from 'react-admin'; -+ import { withStyles } from 'material-ui/styles'; ++ import { withStyles } from '@material-ui/core/styles'; + const styles = { + field: { + textDecoration: 'none', @@ -358,7 +358,7 @@ In addition to `elStyle`, Field and Input components used to support a `style` p ```diff - import { EmailField, List, Datagrid } from 'admin-on-rest'; + import { EmailField, List, Datagrid } from 'react-admin'; -+ import { withStyles } from 'material-ui/styles'; ++ import { withStyles } from '@material-ui/core/styles'; + const styles = { + cell: { @@ -395,7 +395,7 @@ Furthermore, some React-admin components such as the `List`, `Filter`, and `Data ```jsx import { EmailField, List, Datagrid } from 'react-admin'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; const styles = { header: { fontWeight: 'bold' }, @@ -668,7 +668,8 @@ Finally, you won't need the now deprecated `` or `` page, as a [custom action](./CreateEdit.md#actions): ```jsx // in src/comments/CommentEditActions.js import React from 'react'; -import { CardActions } from 'material-ui/Card'; +import CardActions from '@material-ui/core/CardActions'; import { ListButton, DeleteButton } from 'react-admin'; import ApproveButton from './ApproveButton'; @@ -188,7 +188,7 @@ To use the new action creator in the component, `connect` it: import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import { commentApprove as commentApproveAction } from './commentActions'; class ApproveButton extends Component { @@ -374,7 +374,7 @@ To make an action with a `fetch` meta optimistic, decorate it with the `startUnd import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; + import { startUndoable as startUndoableAction } from 'ra-core'; - import { commentApprove as commentApproveAction } from './commentActions'; + import { commentApprove } from './commentActions'; diff --git a/docs/Admin.md b/docs/Admin.md index 279f7a80ae6..cbd191ac903 100644 --- a/docs/Admin.md +++ b/docs/Admin.md @@ -86,7 +86,8 @@ By default, the homepage of an an admin app is the `list` of the first child ` ( @@ -122,7 +123,8 @@ You can customize this page to use the component of your choice by passing it as ```jsx // in src/NotFound.js import React from 'react'; -import Card, { CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; import { ViewTitle } from 'react-admin'; export default () => ( @@ -213,7 +215,7 @@ If the default active style does not suit your tastes, you can override it by pa import React from 'react'; import { connect } from 'react-redux'; import { MenuItemLink, getResources } from 'react-admin'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import { withRouter } from 'react-router-dom'; const styles = { @@ -247,7 +249,7 @@ export default withRouter(connect(mapStateToProps)(withStyles(styles)(Menu))); Material UI supports [theming](http://www.material-ui.com/#/customization/themes). This lets you customize the look and feel of an admin by overriding fonts, colors, and spacing. You can provide a custom material ui theme by using the `theme` prop: ```jsx -import { createMuiTheme } from 'material-ui/styles'; +import { createMuiTheme } from '@material-ui/core/styles'; const theme = createMuiTheme({ palette: { @@ -424,7 +426,8 @@ to design the screen the way you want. ```jsx // in src/Foo.js import React from 'react'; -import Card, { CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; import { ViewTitle } from 'react-admin'; const Foo = () => ( diff --git a/docs/Authentication.md b/docs/Authentication.md index 95bd277afbb..6d268ef61d5 100644 --- a/docs/Authentication.md +++ b/docs/Authentication.md @@ -275,8 +275,8 @@ export default connect(undefined, { userLogin })(MyLoginPage); import React from 'react'; import { connect } from 'react-redux'; import { Responsive, userLogout } from 'react-admin'; -import { MenuItem } from 'material-ui/Menu'; -import Button from 'material-ui/Button'; +import MenuItem from '@material-ui/core/MenuItem'; +import Button from '@material-ui/core/Button'; import ExitIcon from '@material-ui/icons/PowerSettingsNew'; const MyLogoutButton = ({ userLogout, ...rest }) => ( diff --git a/docs/Authorization.md b/docs/Authorization.md index 7775549a391..8442c50c298 100644 --- a/docs/Authorization.md +++ b/docs/Authorization.md @@ -208,7 +208,8 @@ The component provided as a [`dashboard`]('./Admin.md#dashboard) will receive th ```jsx // in src/Dashboard.js import React from 'react'; -import Card, { CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; import { ViewTitle } from 'react-admin'; export default ({ permissions }) => ( @@ -232,7 +233,8 @@ You might want to check user permissions inside a [custom pages](./Admin.md#cust ```jsx // in src/MyPage.js import React from 'react'; -import Card, { CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; import { ViewTitle, WithPermissions } from 'react-admin'; import { withRouter } from 'react-router-dom'; diff --git a/docs/CreateEdit.md b/docs/CreateEdit.md index 65fce9599f8..ce02c8ddf86 100644 --- a/docs/CreateEdit.md +++ b/docs/CreateEdit.md @@ -116,7 +116,7 @@ export const PostEdit = (props) => ( You can replace the list of default actions by your own element using the `actions` prop: ```jsx -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import { CardActions, ListButton, diff --git a/docs/CustomApp.md b/docs/CustomApp.md index 6fd747795e7..7f01a3ee982 100644 --- a/docs/CustomApp.md +++ b/docs/CustomApp.md @@ -28,10 +28,10 @@ import { Switch, Route } from 'react-router-dom'; import { ConnectedRouter, routerReducer, routerMiddleware } from 'react-router-redux'; import { reducer as formReducer } from 'redux-form'; import createSagaMiddleware from 'redux-saga'; -import { MuiThemeProvider } from 'material-ui/styles'; -import AppBar from 'material-ui/AppBar'; -import Toolbar from 'material-ui/Toolbar'; -import Typography from 'material-ui/Typography'; +import { MuiThemeProvider } from '@material-ui/core/styles'; +import AppBar from '@material-ui/core/AppBar'; +import Toolbar from '@material-ui/core/Toolbar'; +import Typography from '@material-ui/core/Typography'; // prebuilt react-admin features import { diff --git a/docs/Fields.md b/docs/Fields.md index 624d747e1e5..b501a6e0f4d 100644 --- a/docs/Fields.md +++ b/docs/Fields.md @@ -743,7 +743,7 @@ All field components accept a `className` prop, allowing you to customize their {% raw %} ```jsx -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; const styles = { price: { color: 'purple' }, @@ -772,7 +772,7 @@ You may want to customize the cell style inside a `DataGrid`. You can use the `c {% raw %} ```jsx -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; const styles = { priceCell: { fontWeight: 'bold' }, @@ -799,7 +799,7 @@ You may want to override the field header (the `` element in the datagrid). {% raw %} ```jsx -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; const styles = { priceHeader: { fontWeight: 'bold' }, diff --git a/docs/Inputs.md b/docs/Inputs.md index b63c68dceba..6d932585295 100644 --- a/docs/Inputs.md +++ b/docs/Inputs.md @@ -138,7 +138,7 @@ You can customize the `filter` function used to filter the results. By default, ```jsx import { AutocompleteInput } from 'react-admin'; -import AutoComplete from 'material-ui/AutoComplete'; +import AutoComplete from '@material-ui/core/AutoComplete'; ``` @@ -1126,7 +1126,7 @@ Instead of HTML `input` elements, you can use a material-ui component. To compos ```jsx // in LatLongInput.js -import TextField from 'material-ui/TextField'; +import TextField from '@material-ui/core/TextField'; import { Field } from 'redux-form'; const renderTextField = ({ input, label, meta: { touched, error }, ...custom }) => ( ` component already includes a label, so you don't nee ```jsx // in SexInput.js -import SelectField from 'material-ui/SelectField'; -import MenuItem from 'material-ui/MenuItem'; +import SelectField from '@material-ui/core/SelectField'; +import MenuItem from '@material-ui/core/MenuItem'; import { addField } from 'react-admin'; const SexInput = ({ input, meta: { touched, error } }) => ( @@ -1169,8 +1169,8 @@ const SexInput = ({ input, meta: { touched, error } }) => ( export default addField(SexInput); // decorate with redux-form's // equivalent of -import SelectField from 'material-ui/SelectField'; -import MenuItem from 'material-ui/MenuItem'; +import SelectField from '@material-ui/core/SelectField'; +import MenuItem from '@material-ui/core/MenuItem'; import { Field } from 'redux-form'; const renderSexInput = ({ input, meta: { touched, error } }) => ( diff --git a/docs/List.md b/docs/List.md index 01d22892c68..f3efd1bedb1 100644 --- a/docs/List.md +++ b/docs/List.md @@ -84,7 +84,7 @@ The title can be either a string, or an element of your own. You can replace the list of default actions by your own element using the `actions` prop: ```jsx -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import { CardActions, CreateButton, RefreshButton } from 'react-admin'; const PostActions = ({ resource, filters, displayedFilters, filterValues, basePath, showFilter }) => ( @@ -115,7 +115,7 @@ export const PostList = (props) => ( Bulk actions are actions that affect several records at once, like mass deletion for instance. In the `` component, bulk actions are triggered by ticking the checkboxes in the first column of the table, then choosing an action from the bulk action menu. By default, all list views have a single bulk action, the bulk delete action. You can add other bulk actions by passing a custom element as the `bulkActions` prop of the `` component: ```jsx -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import { BulkActions, BulkDeleteAction } from 'react-admin'; import ResetViewsAction from './ResetViewsAction'; @@ -388,10 +388,10 @@ You can replace the default pagination element by your own, using the `paginatio So if you want to replace the default pagination by a "" pagination, create a pagination component like the following: ```jsx -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import ChevronLeft from '@material-ui/icons/ChevronLeft'; import ChevronRight from '@material-ui/icons/ChevronRight'; -import Toolbar from 'material-ui/Toolbar'; +import Toolbar from '@material-ui/core/Toolbar'; const PostPagination = ({ page, perPage, total, setPage }) => { const nbPages = Math.ceil(total / perPage) || 1; @@ -489,7 +489,7 @@ export const PostList = (props) => ( **Tip**: If you want to override the `header` and `cell` styles independently for each column, use the `headerClassName` and `cellClassName` props in `` components. For instance, to hide a certain column on small screens: ```jsx -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; const styles = theme => ({ hiddenOnSmallScreens: { @@ -667,7 +667,10 @@ You'll need to create your own iterator component as follows: {% raw %} ```jsx // in src/comments.js -import Card, { CardHeader, CardContent, CardActions } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardActions from '@material-ui/core/CardActions'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; const cardStyle = { width: 300, diff --git a/docs/Show.md b/docs/Show.md index 7e3b23dd203..0d5b4ff2044 100644 --- a/docs/Show.md +++ b/docs/Show.md @@ -90,9 +90,8 @@ export const PostShow = (props) => ( You can replace the list of default actions by your own element using the `actions` prop: ```jsx -import { CardActions } from 'material-ui/Card'; - -import Button from 'material-ui/Button'; +import CardActions from '@material-ui/core/CardActions'; +import Button from '@material-ui/core/Button'; import { ListButton, EditButton, DeleteButton, RefreshButton } from 'react-admin'; const cardActionStyle = { @@ -213,8 +212,8 @@ Here's an example inside a `Show` view with a `SimpleShowLayout` and a custom `a {% raw %} ```jsx -import { CardActions } from 'material-ui/Card'; -import Button from 'material-ui/Button'; +import CardActions from '@material-ui/core/CardActions'; +import Button from '@material-ui/core/Button'; import { ListButton, EditButton, DeleteButton } from 'react-admin'; const cardActionStyle = { diff --git a/docs/Theming.md b/docs/Theming.md index 4af73c2024b..1dca579f3e7 100644 --- a/docs/Theming.md +++ b/docs/Theming.md @@ -16,7 +16,7 @@ Here is an example customizing an `EditButton` component inside a `Datagrid`, us {% raw %} ```jsx import { NumberField, List, Datagrid, EditButton } from 'react-admin'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; const styles = { button: { @@ -65,7 +65,7 @@ import { TextInput, } from 'react-admin'; import Icon from '@material-ui/icons/Person'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; export const VisitorIcon = Icon; @@ -142,7 +142,7 @@ Sometimes you want the format to depend on the value. The following example show {% raw %} ```jsx import { NumberField, List, Datagrid, EditButton } from 'react-admin'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; const coloredStyles = { @@ -182,7 +182,7 @@ Furthermore, you may extract this highlighting strategy into an Higher Order Com {% raw %} ```jsx import { NumberField, List, Datagrid, EditButton } from 'react-admin'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; const coloredStyles = { @@ -269,7 +269,7 @@ export const PostList = (props) => ( Material UI also supports [complete theming](http://www.material-ui.com/#/customization/themes) out of the box. Material UI ships two base themes: light and dark. React-admin uses the light one by default. To use the dark one, pass it to the `` component, in the `theme` prop (along with `createMuiTheme()`). ```jsx -import { createMuiTheme } from 'material-ui/styles'; +import { createMuiTheme } from '@material-ui/core/styles'; const theme = createMuiTheme({ palette: { @@ -296,9 +296,9 @@ import { pinkA200, grey100, grey300, grey400, grey500, white, darkBlack, fullBlack, -} from 'material-ui/styles/colors'; -import { fade } from 'material-ui/utils/colorManipulator'; -import spacing from 'material-ui/styles/spacing'; +} from '@material-ui/core/styles/colors'; +import { fade } from '@material-ui/core/utils/colorManipulator'; +import spacing from '@material-ui/core/styles/spacing'; const myTheme = { spacing: spacing, @@ -368,10 +368,10 @@ Use the [default layout](https://github.com/marmelab/react-admin/blob/master/src import React, { createElement, Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; -import createMuiTheme from 'material-ui/styles/createMuiTheme'; +import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider'; +import createMuiTheme from '@material-ui/core/styles/createMuiTheme'; +import CircularProgress from '@material-ui/core/CircularProgress'; -import { CircularProgress } from 'material-ui/Progress'; import { AppBar, Menu, diff --git a/docs/Translation.md b/docs/Translation.md index 35cf56fdf54..e3a8f14fa85 100644 --- a/docs/Translation.md +++ b/docs/Translation.md @@ -140,7 +140,7 @@ Then, dispatch the `CHANGE_LOCALE` action, by using the `changeLocale` action cr ```jsx import React, { Component } from 'react'; import { connect } from 'react-redux'; -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import { changeLocale as changeLocaleAction } from 'react-admin'; class LocaleSwitcher extends Component { diff --git a/docs/Tutorial.md b/docs/Tutorial.md index b735bbd768b..3477a8050b7 100644 --- a/docs/Tutorial.md +++ b/docs/Tutorial.md @@ -390,7 +390,9 @@ By default, react-admin displays the list page of the first resource as home pag ```jsx // in src/Dashboard.js import React from 'react'; -import Card, { CardHeader, CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; export default () => ( diff --git a/examples/demo/package.json b/examples/demo/package.json index 989a3881511..8819ca17d9b 100644 --- a/examples/demo/package.json +++ b/examples/demo/package.json @@ -3,12 +3,12 @@ "version": "0.1.0", "private": true, "dependencies": { - "@material-ui/icons": "1.0.0-beta.43", + "@material-ui/core": "1.0.0-rc.0", + "@material-ui/icons": "1.0.0-rc.0", "data-generator": "^0.1.0", "fakerest": "~2.1.0", "fetch-mock": "~6.3.0", "json-graphql-server": "~2.1.1", - "material-ui": "1.0.0-beta.47", "ra-data-fakerest": "^2.0.0-RC3", "ra-data-graphql-simple": "~2.0.0-RC3", "ra-data-simple-rest": "~2.0.0-RC3", diff --git a/examples/demo/src/Login.js b/examples/demo/src/Login.js index 9b366744ed4..8071d278e3c 100644 --- a/examples/demo/src/Login.js +++ b/examples/demo/src/Login.js @@ -4,12 +4,13 @@ import { propTypes, reduxForm, Field } from 'redux-form'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; -import Card, { CardActions } from 'material-ui/Card'; -import Avatar from 'material-ui/Avatar'; -import Button from 'material-ui/Button'; -import TextField from 'material-ui/TextField'; -import { CircularProgress } from 'material-ui/Progress'; -import { withStyles } from 'material-ui/styles'; +import Avatar from '@material-ui/core/Avatar'; +import Button from '@material-ui/core/Button'; +import Card from '@material-ui/core/Card'; +import CardActions from '@material-ui/core/CardActions'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import TextField from '@material-ui/core/TextField'; +import { withStyles } from '@material-ui/core/styles'; import LockIcon from '@material-ui/icons/LockOutline'; import { Notification, translate, userLogin } from 'react-admin'; diff --git a/examples/demo/src/categories/LinkToRelatedProducts.js b/examples/demo/src/categories/LinkToRelatedProducts.js index 9642da4502a..38df0b49f8a 100644 --- a/examples/demo/src/categories/LinkToRelatedProducts.js +++ b/examples/demo/src/categories/LinkToRelatedProducts.js @@ -1,7 +1,7 @@ import React from 'react'; import compose from 'recompose/compose'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; +import Button from '@material-ui/core/Button'; +import { withStyles } from '@material-ui/core/styles'; import { Link } from 'react-admin'; import { translate } from 'react-admin'; import { stringify } from 'query-string'; diff --git a/examples/demo/src/categories/index.js b/examples/demo/src/categories/index.js index 9b6d0c2f2e8..128ced6a689 100644 --- a/examples/demo/src/categories/index.js +++ b/examples/demo/src/categories/index.js @@ -11,7 +11,7 @@ import { TextField, TextInput, } from 'react-admin'; -import withStyles from 'material-ui/styles/withStyles'; +import withStyles from '@material-ui/core/styles/withStyles'; import Icon from '@material-ui/icons/Bookmark'; import ThumbnailField from '../products/ThumbnailField'; diff --git a/examples/demo/src/commands/Basket.js b/examples/demo/src/commands/Basket.js index e141023cfda..ebf68007489 100644 --- a/examples/demo/src/commands/Basket.js +++ b/examples/demo/src/commands/Basket.js @@ -2,16 +2,15 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import classnames from 'classnames'; -import Table, { - TableBody, - TableHead, - TableCell, - TableRow, -} from 'material-ui/Table'; -import Paper from 'material-ui/Paper'; +import Table from '@material-ui/core/Table'; +import TableBody from '@material-ui/core/TableBody'; +import TableCell from '@material-ui/core/TableCell'; +import TableHead from '@material-ui/core/TableHead'; +import TableRow from '@material-ui/core/TableRow'; +import Paper from '@material-ui/core/Paper'; import { translate, crudGetMany as crudGetManyAction } from 'react-admin'; import compose from 'recompose/compose'; -import withStyles from 'material-ui/styles/withStyles'; +import withStyles from '@material-ui/core/styles/withStyles'; const styles = { container: { diff --git a/examples/demo/src/commands/MobileGrid.js b/examples/demo/src/commands/MobileGrid.js index 427b3c869e8..1160523c9a1 100644 --- a/examples/demo/src/commands/MobileGrid.js +++ b/examples/demo/src/commands/MobileGrid.js @@ -8,8 +8,10 @@ import { TextField, BooleanField, } from 'react-admin'; -import Card, { CardHeader, CardContent } from 'material-ui/Card'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import CardHeader from '@material-ui/core/CardHeader'; +import CardContent from '@material-ui/core/CardContent'; +import { withStyles } from '@material-ui/core/styles'; import CustomerReferenceField from '../visitors/CustomerReferenceField'; const listStyles = theme => ({ diff --git a/examples/demo/src/commands/index.js b/examples/demo/src/commands/index.js index 8dd13234a3f..732704d5a66 100644 --- a/examples/demo/src/commands/index.js +++ b/examples/demo/src/commands/index.js @@ -20,7 +20,7 @@ import { TextField, TextInput, } from 'react-admin'; -import withStyles from 'material-ui/styles/withStyles'; +import withStyles from '@material-ui/core/styles/withStyles'; import Icon from '@material-ui/icons/AttachMoney'; import Basket from './Basket'; diff --git a/examples/demo/src/configuration/Configuration.js b/examples/demo/src/configuration/Configuration.js index ee8bc4e20dd..65e5fcc6170 100644 --- a/examples/demo/src/configuration/Configuration.js +++ b/examples/demo/src/configuration/Configuration.js @@ -1,9 +1,10 @@ import React from 'react'; import { connect } from 'react-redux'; -import Card, { CardContent } from 'material-ui/Card'; -import Button from 'material-ui/Button'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import Button from '@material-ui/core/Button'; import { translate, changeLocale, ViewTitle } from 'react-admin'; -import withStyles from 'material-ui/styles/withStyles'; +import withStyles from '@material-ui/core/styles/withStyles'; import compose from 'recompose/compose'; import { changeTheme } from './actions'; diff --git a/examples/demo/src/dashboard/CardIcon.js b/examples/demo/src/dashboard/CardIcon.js index 0899bcff689..bd7520371d0 100644 --- a/examples/demo/src/dashboard/CardIcon.js +++ b/examples/demo/src/dashboard/CardIcon.js @@ -1,6 +1,6 @@ import React from 'react'; -import Card from 'material-ui/Card'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import { withStyles } from '@material-ui/core/styles'; const styles = { card: { diff --git a/examples/demo/src/dashboard/MonthlyRevenue.js b/examples/demo/src/dashboard/MonthlyRevenue.js index 83fdc0c15f3..f00e2f5197a 100644 --- a/examples/demo/src/dashboard/MonthlyRevenue.js +++ b/examples/demo/src/dashboard/MonthlyRevenue.js @@ -1,8 +1,8 @@ import React from 'react'; -import Card from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; import DollarIcon from '@material-ui/icons/AttachMoney'; -import { withStyles } from 'material-ui/styles'; -import Typography from 'material-ui/Typography'; +import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; import { translate } from 'react-admin'; import CardIcon from './CardIcon'; diff --git a/examples/demo/src/dashboard/NbNewOrders.js b/examples/demo/src/dashboard/NbNewOrders.js index 8a33a07bcad..bde592381f7 100644 --- a/examples/demo/src/dashboard/NbNewOrders.js +++ b/examples/demo/src/dashboard/NbNewOrders.js @@ -1,8 +1,8 @@ import React from 'react'; -import Card from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; import ShoppingCartIcon from '@material-ui/icons/ShoppingCart'; -import { withStyles } from 'material-ui/styles'; -import Typography from 'material-ui/Typography'; +import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; import { translate } from 'react-admin'; import CardIcon from './CardIcon'; diff --git a/examples/demo/src/dashboard/NewCustomers.js b/examples/demo/src/dashboard/NewCustomers.js index 67ae751f943..db3f45f0344 100644 --- a/examples/demo/src/dashboard/NewCustomers.js +++ b/examples/demo/src/dashboard/NewCustomers.js @@ -1,12 +1,14 @@ import React from 'react'; import compose from 'recompose/compose'; -import Card from 'material-ui/Card'; -import List, { ListItem, ListItemText } from 'material-ui/List'; -import Avatar from 'material-ui/Avatar'; -import { withStyles } from 'material-ui/styles'; -import Typography from 'material-ui/Typography'; +import Card from '@material-ui/core/Card'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemText from '@material-ui/core/ListItemText'; +import Avatar from '@material-ui/core/Avatar'; +import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; import CustomerIcon from '@material-ui/icons/PersonAdd'; -import Divider from 'material-ui/Divider'; +import Divider from '@material-ui/core/Divider'; import { Link } from 'react-router-dom'; import { translate } from 'react-admin'; diff --git a/examples/demo/src/dashboard/PendingOrders.js b/examples/demo/src/dashboard/PendingOrders.js index b2908bac339..05910954649 100644 --- a/examples/demo/src/dashboard/PendingOrders.js +++ b/examples/demo/src/dashboard/PendingOrders.js @@ -1,13 +1,13 @@ import React from 'react'; import compose from 'recompose/compose'; -import Card, { CardHeader } from 'material-ui/Card'; -import List, { - ListItem, - ListItemSecondaryAction, - ListItemText, -} from 'material-ui/List'; -import Avatar from 'material-ui/Avatar'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import CardHeader from '@material-ui/core/CardHeader'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; +import ListItemText from '@material-ui/core/ListItemText'; +import Avatar from '@material-ui/core/Avatar'; +import { withStyles } from '@material-ui/core/styles'; import { Link } from 'react-router-dom'; import { translate } from 'react-admin'; diff --git a/examples/demo/src/dashboard/PendingReviews.js b/examples/demo/src/dashboard/PendingReviews.js index 9f17695e61f..bbe85af464e 100644 --- a/examples/demo/src/dashboard/PendingReviews.js +++ b/examples/demo/src/dashboard/PendingReviews.js @@ -1,12 +1,14 @@ import React from 'react'; import compose from 'recompose/compose'; -import Card from 'material-ui/Card'; -import List, { ListItem, ListItemText } from 'material-ui/List'; -import Avatar from 'material-ui/Avatar'; -import { withStyles } from 'material-ui/styles'; -import Typography from 'material-ui/Typography'; +import Card from '@material-ui/core/Card'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemText from '@material-ui/core/ListItemText'; +import Avatar from '@material-ui/core/Avatar'; +import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; import CommentIcon from '@material-ui/icons/Comment'; -import Divider from 'material-ui/Divider'; +import Divider from '@material-ui/core/Divider'; import { Link } from 'react-router-dom'; import { translate } from 'react-admin'; diff --git a/examples/demo/src/dashboard/Welcome.js b/examples/demo/src/dashboard/Welcome.js index f671df473dc..b533094c510 100644 --- a/examples/demo/src/dashboard/Welcome.js +++ b/examples/demo/src/dashboard/Welcome.js @@ -1,7 +1,9 @@ import React from 'react'; -import Card, { CardContent, CardActions } from 'material-ui/Card'; -import Button from 'material-ui/Button'; -import Typography from 'material-ui/Typography'; +import Card from '@material-ui/core/Card'; +import CardActions from '@material-ui/core/CardActions'; +import CardContent from '@material-ui/core/CardContent'; +import Button from '@material-ui/core/Button'; +import Typography from '@material-ui/core/Typography'; import HomeIcon from '@material-ui/icons/Home'; import CodeIcon from '@material-ui/icons/Code'; diff --git a/examples/demo/src/products/GridList.js b/examples/demo/src/products/GridList.js index ebd41dec8c3..3e2a0be95a9 100644 --- a/examples/demo/src/products/GridList.js +++ b/examples/demo/src/products/GridList.js @@ -1,9 +1,8 @@ import React from 'react'; -import MuiGridList, { - GridListTile, - GridListTileBar, -} from 'material-ui/GridList'; -import { withStyles } from 'material-ui/styles'; +import MuiGridList from '@material-ui/core/GridList'; +import GridListTile from '@material-ui/core/GridListTile'; +import GridListTileBar from '@material-ui/core/GridListTileBar'; +import { withStyles } from '@material-ui/core/styles'; import { NumberField, EditButton } from 'react-admin'; const styles = { diff --git a/examples/demo/src/products/Poster.js b/examples/demo/src/products/Poster.js index 795809dc1da..8203514667f 100644 --- a/examples/demo/src/products/Poster.js +++ b/examples/demo/src/products/Poster.js @@ -1,6 +1,7 @@ import React from 'react'; -import Card, { CardContent } from 'material-ui/Card'; -import withStyles from 'material-ui/styles/withStyles'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import withStyles from '@material-ui/core/styles/withStyles'; const styles = { root: { display: 'inline-block', marginTop: '1em', zIndex: 2 }, diff --git a/examples/demo/src/products/ThumbnailField.js b/examples/demo/src/products/ThumbnailField.js index 198696a5c11..6c9ac1875ef 100644 --- a/examples/demo/src/products/ThumbnailField.js +++ b/examples/demo/src/products/ThumbnailField.js @@ -1,5 +1,5 @@ import React from 'react'; -import withStyles from 'material-ui/styles/withStyles'; +import withStyles from '@material-ui/core/styles/withStyles'; const styles = { root: { width: 25, maxWidth: 25, maxHeight: 25 }, diff --git a/examples/demo/src/products/index.js b/examples/demo/src/products/index.js index 17a7a87fd63..cc5c0aa1995 100644 --- a/examples/demo/src/products/index.js +++ b/examples/demo/src/products/index.js @@ -18,8 +18,8 @@ import { TextInput, required, } from 'react-admin'; -import Chip from 'material-ui/Chip'; -import withStyles from 'material-ui/styles/withStyles'; +import Chip from '@material-ui/core/Chip'; +import withStyles from '@material-ui/core/styles/withStyles'; import Icon from '@material-ui/icons/Collections'; import RichTextInput from 'ra-input-rich-text'; diff --git a/examples/demo/src/reviews/AcceptButton.js b/examples/demo/src/reviews/AcceptButton.js index 324899c37ed..e958e3f0548 100644 --- a/examples/demo/src/reviews/AcceptButton.js +++ b/examples/demo/src/reviews/AcceptButton.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import ThumbUp from '@material-ui/icons/ThumbUp'; import { translate } from 'react-admin'; import compose from 'recompose/compose'; diff --git a/examples/demo/src/reviews/ApproveButton.js b/examples/demo/src/reviews/ApproveButton.js index e5dc2eb8149..6d265b0157f 100644 --- a/examples/demo/src/reviews/ApproveButton.js +++ b/examples/demo/src/reviews/ApproveButton.js @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import IconButton from 'material-ui/IconButton'; -import { withStyles } from 'material-ui/styles'; +import IconButton from '@material-ui/core/IconButton'; +import { withStyles } from '@material-ui/core/styles'; import ThumbUp from '@material-ui/icons/ThumbUp'; import ThumbDown from '@material-ui/icons/ThumbDown'; diff --git a/examples/demo/src/reviews/MobileGrid.js b/examples/demo/src/reviews/MobileGrid.js index 6bec48cea04..90a0b084b68 100644 --- a/examples/demo/src/reviews/MobileGrid.js +++ b/examples/demo/src/reviews/MobileGrid.js @@ -1,8 +1,11 @@ // in src/comments.js import React from 'react'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import { withStyles } from '@material-ui/core/styles'; import { DateField, EditButton, translate } from 'react-admin'; -import Card, { CardHeader, CardContent } from 'material-ui/Card'; -import { withStyles } from 'material-ui/styles'; + import CustomerReferenceField from '../visitors/CustomerReferenceField'; import StarRatingField from './StarRatingField'; import ProductReferenceField from '../products/ProductReferenceField'; diff --git a/examples/demo/src/reviews/RejectButton.js b/examples/demo/src/reviews/RejectButton.js index 17c7c9f544e..09a7fb00635 100644 --- a/examples/demo/src/reviews/RejectButton.js +++ b/examples/demo/src/reviews/RejectButton.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import ThumbDown from '@material-ui/icons/ThumbDown'; import { translate } from 'react-admin'; import compose from 'recompose/compose'; diff --git a/examples/demo/src/reviews/ReviewEditActions.js b/examples/demo/src/reviews/ReviewEditActions.js index e24b07adff0..0603d5ae448 100644 --- a/examples/demo/src/reviews/ReviewEditActions.js +++ b/examples/demo/src/reviews/ReviewEditActions.js @@ -1,6 +1,7 @@ import React from 'react'; -import { CardActions } from 'material-ui/Card'; +import CardActions from '@material-ui/core/CardActions'; import { ListButton, DeleteButton, RefreshButton } from 'react-admin'; + import AcceptButton from './AcceptButton'; import RejectButton from './RejectButton'; diff --git a/examples/demo/src/reviews/index.js b/examples/demo/src/reviews/index.js index 288d217f9d6..73852d77dd2 100644 --- a/examples/demo/src/reviews/index.js +++ b/examples/demo/src/reviews/index.js @@ -19,7 +19,7 @@ import { TextField, TextInput, } from 'react-admin'; -import withStyles from 'material-ui/styles/withStyles'; +import withStyles from '@material-ui/core/styles/withStyles'; import Icon from '@material-ui/icons/Comment'; import ProductReferenceField from '../products/ProductReferenceField'; diff --git a/examples/demo/src/segments/LinkToRelatedCustomers.js b/examples/demo/src/segments/LinkToRelatedCustomers.js index 6fef849d849..67a5c4a6a6d 100644 --- a/examples/demo/src/segments/LinkToRelatedCustomers.js +++ b/examples/demo/src/segments/LinkToRelatedCustomers.js @@ -1,7 +1,7 @@ import React from 'react'; import compose from 'recompose/compose'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; +import Button from '@material-ui/core/Button'; +import { withStyles } from '@material-ui/core/styles'; import { Link } from 'react-admin'; import { translate } from 'react-admin'; import { stringify } from 'query-string'; diff --git a/examples/demo/src/segments/Segments.js b/examples/demo/src/segments/Segments.js index d59e7765098..ac9390fa001 100644 --- a/examples/demo/src/segments/Segments.js +++ b/examples/demo/src/segments/Segments.js @@ -1,11 +1,10 @@ import React from 'react'; -import Card from 'material-ui/Card'; -import Table, { - TableBody, - TableHead, - TableRow, - TableCell, -} from 'material-ui/Table'; +import Card from '@material-ui/core/Card'; +import Table from '@material-ui/core/Table'; +import TableBody from '@material-ui/core/TableBody'; +import TableCell from '@material-ui/core/TableCell'; +import TableHead from '@material-ui/core/TableHead'; +import TableRow from '@material-ui/core/TableRow'; import { translate, ViewTitle } from 'react-admin'; import LinkToRelatedCustomers from './LinkToRelatedCustomers'; diff --git a/examples/demo/src/visitors/AvatarField.js b/examples/demo/src/visitors/AvatarField.js index b2b19c7e5d4..83dd42862db 100644 --- a/examples/demo/src/visitors/AvatarField.js +++ b/examples/demo/src/visitors/AvatarField.js @@ -1,5 +1,5 @@ import React from 'react'; -import Avatar from 'material-ui/Avatar'; +import Avatar from '@material-ui/core/Avatar'; const AvatarField = ({ record, size }) => ( ({ diff --git a/examples/graphcool-demo/src/commands/index.js b/examples/graphcool-demo/src/commands/index.js index 87b7c4178be..0507aea382b 100644 --- a/examples/graphcool-demo/src/commands/index.js +++ b/examples/graphcool-demo/src/commands/index.js @@ -20,7 +20,7 @@ import { TextField, TextInput, } from 'react-admin'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import Icon from '@material-ui/icons/AttachMoney'; import Basket from './Basket'; diff --git a/examples/graphcool-demo/src/configuration/Configuration.js b/examples/graphcool-demo/src/configuration/Configuration.js index cc2750a20e1..fe3da6f7f57 100644 --- a/examples/graphcool-demo/src/configuration/Configuration.js +++ b/examples/graphcool-demo/src/configuration/Configuration.js @@ -1,7 +1,8 @@ import React from 'react'; import { connect } from 'react-redux'; -import Card, { CardContent } from 'material-ui/Card'; -import Button from 'material-ui/Button'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import Button from '@material-ui/core/Button'; import { translate, changeLocale, ViewTitle } from 'react-admin'; import { changeTheme } from './actions'; diff --git a/examples/graphcool-demo/src/dashboard/Dashboard.js b/examples/graphcool-demo/src/dashboard/Dashboard.js index 23e516080ff..30fa14e46f9 100644 --- a/examples/graphcool-demo/src/dashboard/Dashboard.js +++ b/examples/graphcool-demo/src/dashboard/Dashboard.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import { GET_LIST, GET_MANY, Responsive, ViewTitle } from 'react-admin'; -import Card, { CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; import Welcome from './Welcome'; import MonthlyRevenue from './MonthlyRevenue'; diff --git a/examples/graphcool-demo/src/dashboard/MonthlyRevenue.js b/examples/graphcool-demo/src/dashboard/MonthlyRevenue.js index 3851ff5fe93..0c25c51a9b9 100644 --- a/examples/graphcool-demo/src/dashboard/MonthlyRevenue.js +++ b/examples/graphcool-demo/src/dashboard/MonthlyRevenue.js @@ -1,5 +1,6 @@ import React from 'react'; -import Card, { CardHeader } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardHeader from '@material-ui/core/CardHeader'; import DollarIcon from '@material-ui/icons/AttachMoney'; import { translate } from 'react-admin'; diff --git a/examples/graphcool-demo/src/dashboard/NbNewOrders.js b/examples/graphcool-demo/src/dashboard/NbNewOrders.js index cb02b6378c5..0c5d8936a0d 100644 --- a/examples/graphcool-demo/src/dashboard/NbNewOrders.js +++ b/examples/graphcool-demo/src/dashboard/NbNewOrders.js @@ -1,5 +1,6 @@ import React from 'react'; -import Card, { CardHeader } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardHeader from '@material-ui/core/CardHeader'; import ShoppingCartIcon from '@material-ui/icons/ShoppingCart'; import { translate } from 'react-admin'; diff --git a/examples/graphcool-demo/src/dashboard/NewCustomers.js b/examples/graphcool-demo/src/dashboard/NewCustomers.js index d77a7dc0536..4eac0d8299b 100644 --- a/examples/graphcool-demo/src/dashboard/NewCustomers.js +++ b/examples/graphcool-demo/src/dashboard/NewCustomers.js @@ -1,9 +1,12 @@ import React from 'react'; import compose from 'recompose/compose'; -import Card, { CardHeader } from 'material-ui/Card'; -import List, { ListItem, ListItemText } from 'material-ui/List'; -import Avatar from 'material-ui/Avatar'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import CardHeader from '@material-ui/core/CardHeader'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemText from '@material-ui/core/ListItemText'; +import Avatar from '@material-ui/core/Avatar'; +import { withStyles } from '@material-ui/core/styles'; import CustomerIcon from '@material-ui/icons/PersonAdd'; import { Link } from 'react-router-dom'; import { translate } from 'react-admin'; diff --git a/examples/graphcool-demo/src/dashboard/PendingOrders.js b/examples/graphcool-demo/src/dashboard/PendingOrders.js index ceb9dc15128..45522d6c32d 100644 --- a/examples/graphcool-demo/src/dashboard/PendingOrders.js +++ b/examples/graphcool-demo/src/dashboard/PendingOrders.js @@ -1,13 +1,13 @@ import React from 'react'; import compose from 'recompose/compose'; -import Card, { CardHeader } from 'material-ui/Card'; -import List, { - ListItem, - ListItemSecondaryAction, - ListItemText, -} from 'material-ui/List'; -import Avatar from 'material-ui/Avatar'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import CardHeader from '@material-ui/core/CardHeader'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; +import ListItemText from '@material-ui/core/ListItemText'; +import Avatar from '@material-ui/core/Avatar'; +import { withStyles } from '@material-ui/core/styles'; import { Link } from 'react-router-dom'; import { translate } from 'react-admin'; diff --git a/examples/graphcool-demo/src/dashboard/PendingReviews.js b/examples/graphcool-demo/src/dashboard/PendingReviews.js index b173f14896c..dd56a4706cf 100644 --- a/examples/graphcool-demo/src/dashboard/PendingReviews.js +++ b/examples/graphcool-demo/src/dashboard/PendingReviews.js @@ -1,9 +1,12 @@ import React from 'react'; import compose from 'recompose/compose'; -import Card, { CardHeader } from 'material-ui/Card'; -import List, { ListItem, ListItemText } from 'material-ui/List'; -import Avatar from 'material-ui/Avatar'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import CardHeader from '@material-ui/core/CardHeader'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemText from '@material-ui/core/ListItemText'; +import Avatar from '@material-ui/core/Avatar'; +import { withStyles } from '@material-ui/core/styles'; import CommentIcon from '@material-ui/icons/Comment'; import { Link } from 'react-router-dom'; import { translate } from 'react-admin'; diff --git a/examples/graphcool-demo/src/dashboard/Welcome.js b/examples/graphcool-demo/src/dashboard/Welcome.js index 14839e91c5a..8b980c82001 100644 --- a/examples/graphcool-demo/src/dashboard/Welcome.js +++ b/examples/graphcool-demo/src/dashboard/Welcome.js @@ -1,7 +1,9 @@ import React from 'react'; -import Card, { CardHeader, CardActions } from 'material-ui/Card'; -import Avatar from 'material-ui/Avatar'; -import Button from 'material-ui/Button'; +import Card from '@material-ui/core/Card'; +import CardActions from '@material-ui/core/CardActions'; +import CardHeader from '@material-ui/core/CardHeader'; +import Avatar from '@material-ui/core/Avatar'; +import Button from '@material-ui/core/Button'; import LightBulbIcon from '@material-ui/icons/LightbulbOutline'; import HomeIcon from '@material-ui/icons/Home'; import CodeIcon from '@material-ui/icons/Code'; diff --git a/examples/graphcool-demo/src/products/GridList.js b/examples/graphcool-demo/src/products/GridList.js index 85ec334f1db..67621154b84 100644 --- a/examples/graphcool-demo/src/products/GridList.js +++ b/examples/graphcool-demo/src/products/GridList.js @@ -1,9 +1,8 @@ import React from 'react'; -import MuiGridList, { - GridListTile, - GridListTileBar, -} from 'material-ui/GridList'; -import { withStyles } from 'material-ui/styles'; +import MuiGridList from '@material-ui/core/GridList'; +import GridListTile from '@material-ui/core/GridListTile'; +import GridListTileBar from '@material-ui/core/GridListTileBar'; +import { withStyles } from '@material-ui/core/styles'; import { NumberField, EditButton } from 'react-admin'; const styles = { diff --git a/examples/graphcool-demo/src/products/Poster.js b/examples/graphcool-demo/src/products/Poster.js index e100d2e156f..97e054d696e 100644 --- a/examples/graphcool-demo/src/products/Poster.js +++ b/examples/graphcool-demo/src/products/Poster.js @@ -1,5 +1,6 @@ import React from 'react'; -import Card, { CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; const Poster = ({ record }) => ( diff --git a/examples/graphcool-demo/src/products/index.js b/examples/graphcool-demo/src/products/index.js index f81b10c097e..fab072b3af5 100644 --- a/examples/graphcool-demo/src/products/index.js +++ b/examples/graphcool-demo/src/products/index.js @@ -17,7 +17,7 @@ import { TextField, TextInput, } from 'react-admin'; -import Chip from 'material-ui/Chip'; +import Chip from '@material-ui/core/Chip'; import Icon from '@material-ui/icons/Collections'; import RichTextInput from 'ra-input-rich-text'; @@ -25,7 +25,7 @@ import CustomerReferenceField from '../visitors/CustomerReferenceField'; import StarRatingField from '../reviews/StarRatingField'; import GridList from './GridList'; import Poster from './Poster'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; export const ProductIcon = Icon; diff --git a/examples/graphcool-demo/src/reviews/AcceptButton.js b/examples/graphcool-demo/src/reviews/AcceptButton.js index 64ae2dea307..ef091beb37f 100644 --- a/examples/graphcool-demo/src/reviews/AcceptButton.js +++ b/examples/graphcool-demo/src/reviews/AcceptButton.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import ThumbUp from '@material-ui/icons/ThumbUp'; import { translate } from 'react-admin'; import compose from 'recompose/compose'; diff --git a/examples/graphcool-demo/src/reviews/ApproveButton.js b/examples/graphcool-demo/src/reviews/ApproveButton.js index 0d55245f96e..c3e8d6c0c49 100644 --- a/examples/graphcool-demo/src/reviews/ApproveButton.js +++ b/examples/graphcool-demo/src/reviews/ApproveButton.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import IconButton from 'material-ui/IconButton'; +import IconButton from '@material-ui/core/IconButton'; import ThumbUp from '@material-ui/icons/ThumbUp'; import ThumbDown from '@material-ui/icons/ThumbDown'; import { diff --git a/examples/graphcool-demo/src/reviews/MobileGrid.js b/examples/graphcool-demo/src/reviews/MobileGrid.js index 6bec48cea04..d366daa781a 100644 --- a/examples/graphcool-demo/src/reviews/MobileGrid.js +++ b/examples/graphcool-demo/src/reviews/MobileGrid.js @@ -1,8 +1,10 @@ // in src/comments.js import React from 'react'; import { DateField, EditButton, translate } from 'react-admin'; -import Card, { CardHeader, CardContent } from 'material-ui/Card'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import { withStyles } from '@material-ui/core/styles'; import CustomerReferenceField from '../visitors/CustomerReferenceField'; import StarRatingField from './StarRatingField'; import ProductReferenceField from '../products/ProductReferenceField'; diff --git a/examples/graphcool-demo/src/reviews/RejectButton.js b/examples/graphcool-demo/src/reviews/RejectButton.js index c19dff06e07..f7aed0a23fd 100644 --- a/examples/graphcool-demo/src/reviews/RejectButton.js +++ b/examples/graphcool-demo/src/reviews/RejectButton.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import Button from 'material-ui/Button'; +import Button from '@material-ui/core/Button'; import ThumbDown from '@material-ui/icons/ThumbDown'; import { translate } from 'react-admin'; import compose from 'recompose/compose'; diff --git a/examples/graphcool-demo/src/reviews/ReviewEditActions.js b/examples/graphcool-demo/src/reviews/ReviewEditActions.js index 08f3d7f5755..5b80c43cd56 100644 --- a/examples/graphcool-demo/src/reviews/ReviewEditActions.js +++ b/examples/graphcool-demo/src/reviews/ReviewEditActions.js @@ -1,5 +1,5 @@ import React from 'react'; -import { CardActions } from 'material-ui/Card'; +import CardActions from '@material-ui/core/CardActions'; import { ListButton, DeleteButton, RefreshButton } from 'react-admin'; import AcceptButton from './AcceptButton'; import RejectButton from './RejectButton'; diff --git a/examples/graphcool-demo/src/reviews/index.js b/examples/graphcool-demo/src/reviews/index.js index 88cb6fd9aa3..a766415fb73 100644 --- a/examples/graphcool-demo/src/reviews/index.js +++ b/examples/graphcool-demo/src/reviews/index.js @@ -17,7 +17,7 @@ import { TextField, TextInput, } from 'react-admin'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import Icon from '@material-ui/icons/Comment'; import ProductReferenceField from '../products/ProductReferenceField'; diff --git a/examples/graphcool-demo/src/segments/LinkToRelatedCustomers.js b/examples/graphcool-demo/src/segments/LinkToRelatedCustomers.js index 51113a3bcfd..23af1cd1762 100644 --- a/examples/graphcool-demo/src/segments/LinkToRelatedCustomers.js +++ b/examples/graphcool-demo/src/segments/LinkToRelatedCustomers.js @@ -1,7 +1,7 @@ import React from 'react'; import compose from 'recompose/compose'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; +import Button from '@material-ui/core/Button'; +import { withStyles } from '@material-ui/core/styles'; import { Link } from 'react-admin'; import { translate } from 'react-admin'; import { stringify } from 'query-string'; diff --git a/examples/graphcool-demo/src/segments/SegmentReferenceField.js b/examples/graphcool-demo/src/segments/SegmentReferenceField.js index e2237b55493..1c4b16cda93 100644 --- a/examples/graphcool-demo/src/segments/SegmentReferenceField.js +++ b/examples/graphcool-demo/src/segments/SegmentReferenceField.js @@ -1,7 +1,7 @@ import React from 'react'; import { translate, ReferenceArrayField, SingleFieldList } from 'react-admin'; -import Chip from 'material-ui/Chip'; +import Chip from '@material-ui/core/Chip'; const NameField = translate(({ translate: t, source, record = {} }) => ( diff --git a/examples/graphcool-demo/src/segments/Segments.js b/examples/graphcool-demo/src/segments/Segments.js index 84fbbca9b2d..d9c4b428042 100644 --- a/examples/graphcool-demo/src/segments/Segments.js +++ b/examples/graphcool-demo/src/segments/Segments.js @@ -1,11 +1,10 @@ import React from 'react'; -import Card from 'material-ui/Card'; -import Table, { - TableBody, - TableHead, - TableRow, - TableCell, -} from 'material-ui/Table'; +import Card from '@material-ui/core/Card'; +import Table from '@material-ui/core/Table'; +import TableBody from '@material-ui/core/TableBody'; +import TableHead from '@material-ui/core/TableHead'; +import TableRow from '@material-ui/core/TableRow'; +import TableCell from '@material-ui/core/TableCell'; import { translate, ViewTitle } from 'react-admin'; import LinkToRelatedCustomers from './LinkToRelatedCustomers'; diff --git a/examples/graphcool-demo/src/visitors/AvatarField.js b/examples/graphcool-demo/src/visitors/AvatarField.js index 945eb625a6a..6e5c03d111a 100644 --- a/examples/graphcool-demo/src/visitors/AvatarField.js +++ b/examples/graphcool-demo/src/visitors/AvatarField.js @@ -1,5 +1,5 @@ import React from 'react'; -import Avatar from 'material-ui/Avatar'; +import Avatar from '@material-ui/core/Avatar'; const style = { verticalAlign: 'middle' }; const AvatarField = ({ record, size }) => ( diff --git a/examples/graphcool-demo/src/visitors/MobileGrid.js b/examples/graphcool-demo/src/visitors/MobileGrid.js index 1be5e1e05b6..62af1013b89 100644 --- a/examples/graphcool-demo/src/visitors/MobileGrid.js +++ b/examples/graphcool-demo/src/visitors/MobileGrid.js @@ -1,8 +1,10 @@ // in src/comments.js import React from 'react'; import { EditButton, translate, NumberField } from 'react-admin'; -import Card, { CardHeader, CardContent } from 'material-ui/Card'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import { withStyles } from '@material-ui/core/styles'; import AvatarField from './AvatarField'; import { ColoredNumberField } from './index'; diff --git a/examples/graphcool-demo/src/visitors/index.js b/examples/graphcool-demo/src/visitors/index.js index 97c0672c219..b6fdbaaa001 100644 --- a/examples/graphcool-demo/src/visitors/index.js +++ b/examples/graphcool-demo/src/visitors/index.js @@ -18,7 +18,7 @@ import { TextField, TextInput, } from 'react-admin'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import Icon from '@material-ui/icons/Person'; import NbItemsField from '../commands/NbItemsField'; diff --git a/examples/simple/package.json b/examples/simple/package.json index 5c7b2f6eaeb..062728ca508 100644 --- a/examples/simple/package.json +++ b/examples/simple/package.json @@ -14,7 +14,8 @@ "author": "", "license": "MIT", "devDependencies": { - "@material-ui/icons": "1.0.0-beta.43", + "@material-ui/core": "1.0.0-rc.0", + "@material-ui/icons": "1.0.0-rc.0", "babel-core": "~6.26.0", "babel-loader": "~7.1.1", "babel-plugin-transform-react-jsx": "~6.24.1", @@ -24,7 +25,6 @@ "hard-source-webpack-plugin": "^0.6.4", "html-loader": "~0.5.5", "html-webpack-plugin": "~3.2.0", - "material-ui": "1.0.0-beta.47", "ra-data-fakerest": "^2.0.0-RC3", "ra-input-rich-text": "^2.0.0-RC3", "ra-language-english": "^2.0.0-RC3", diff --git a/examples/simple/src/comments/CommentEdit.js b/examples/simple/src/comments/CommentEdit.js index 1ed25ab69aa..7d60348c58f 100644 --- a/examples/simple/src/comments/CommentEdit.js +++ b/examples/simple/src/comments/CommentEdit.js @@ -1,6 +1,6 @@ -import Card from 'material-ui/Card'; -import Typography from 'material-ui/Typography'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import Typography from '@material-ui/core/Typography'; +import { withStyles } from '@material-ui/core/styles'; import React from 'react'; import { AutocompleteInput, diff --git a/examples/simple/src/comments/CommentList.js b/examples/simple/src/comments/CommentList.js index ee436aef2cf..57d29747cda 100644 --- a/examples/simple/src/comments/CommentList.js +++ b/examples/simple/src/comments/CommentList.js @@ -1,12 +1,15 @@ import ChevronLeft from '@material-ui/icons/ChevronLeft'; import ChevronRight from '@material-ui/icons/ChevronRight'; import PersonIcon from '@material-ui/icons/Person'; -import Avatar from 'material-ui/Avatar'; -import Button from 'material-ui/Button'; -import Card, { CardActions, CardContent, CardHeader } from 'material-ui/Card'; -import Grid from 'material-ui/Grid'; -import Toolbar from 'material-ui/Toolbar'; -import { withStyles } from 'material-ui/styles'; +import Avatar from '@material-ui/core/Avatar'; +import Button from '@material-ui/core/Button'; +import Card from '@material-ui/core/Card'; +import CardActions from '@material-ui/core/CardActions'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import Grid from '@material-ui/core/Grid'; +import Toolbar from '@material-ui/core/Toolbar'; +import { withStyles } from '@material-ui/core/styles'; import React from 'react'; import { DateField, diff --git a/examples/simple/src/posts/PostList.js b/examples/simple/src/posts/PostList.js index 6d00359a465..47459120539 100644 --- a/examples/simple/src/posts/PostList.js +++ b/examples/simple/src/posts/PostList.js @@ -1,8 +1,8 @@ import BookIcon from '@material-ui/icons/Book'; import SearchIcon from '@material-ui/icons/Search'; -import Chip from 'material-ui/Chip'; -import { InputAdornment } from 'material-ui/Input'; -import { withStyles } from 'material-ui/styles'; +import Chip from '@material-ui/core/Chip'; +import InputAdornment from '@material-ui/core/InputAdornment'; +import { withStyles } from '@material-ui/core/styles'; import React, { Children, cloneElement } from 'react'; import { BooleanField, @@ -24,6 +24,7 @@ import { TextInput, translate, } from 'react-admin'; // eslint-disable-line import/no-unresolved + import ResetViewsAction from './ResetViewsAction'; export const PostIcon = BookIcon; diff --git a/examples/simple/src/users/UserList.js b/examples/simple/src/users/UserList.js index 16bf26db24e..324ae4e1b21 100644 --- a/examples/simple/src/users/UserList.js +++ b/examples/simple/src/users/UserList.js @@ -1,7 +1,7 @@ /* eslint react/jsx-key: off */ import PeopleIcon from '@material-ui/icons/People'; import SearchIcon from '@material-ui/icons/Search'; -import { InputAdornment } from 'material-ui/Input'; +import InputAdornment from '@material-ui/core/InputAdornment'; import React from 'react'; import { Datagrid, diff --git a/examples/tutorial/package.json b/examples/tutorial/package.json index 15fa8ec4a4f..2cc96573103 100644 --- a/examples/tutorial/package.json +++ b/examples/tutorial/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "material-ui": "1.0.0-beta.47", + "@material-ui/core": "1.0.0-rc.0", "ra-data-json-server": "~2.0.0-RC3", "react": "~16.3.1", "react-admin": "~2.0.0-RC3", diff --git a/examples/tutorial/src/Dashboard.js b/examples/tutorial/src/Dashboard.js index 78bf1875641..52dd1b5b296 100644 --- a/examples/tutorial/src/Dashboard.js +++ b/examples/tutorial/src/Dashboard.js @@ -1,5 +1,7 @@ import React from 'react'; -import Card, { CardHeader, CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; export default () => ( diff --git a/packages/ra-core/src/controller/ListController.spec.js b/packages/ra-core/src/controller/ListController.spec.js index c932002d335..db2a6277bc2 100644 --- a/packages/ra-core/src/controller/ListController.spec.js +++ b/packages/ra-core/src/controller/ListController.spec.js @@ -4,7 +4,7 @@ import lolex from 'lolex'; import { setDisplayName } from 'recompose'; import { ListController } from './ListController'; -import TextField from 'material-ui/TextField/TextField'; +import TextField from '@material-ui/core/TextField/TextField'; describe('ListController', () => { const defaultProps = { diff --git a/packages/ra-ui-materialui/package.json b/packages/ra-ui-materialui/package.json index 392404c4928..6387db7a36e 100644 --- a/packages/ra-ui-materialui/package.json +++ b/packages/ra-ui-materialui/package.json @@ -10,6 +10,7 @@ "bugs": "https://github.com/marmelab/react-admin/issues", "license": "MIT", "devDependencies": { + "@material-ui/codemod": "^1.0.0-rc.0", "enzyme": "~3.3.0", "enzyme-adapter-react-16": "~1.1.1", "file-api": "~0.10.4", @@ -23,12 +24,12 @@ "react-dom": "~16.0.0 || ~16.1.0 || ~16.2.0 || ~16.3.0" }, "dependencies": { - "@material-ui/icons": "1.0.0-beta.43", + "@material-ui/core": "1.0.0-rc.0", + "@material-ui/icons": "1.0.0-rc.0", "autosuggest-highlight": "^3.1.1", "classnames": "~2.2.5", "inflection": "~1.12.0", "lodash": "~4.17.5", - "material-ui": "1.0.0-beta.47", "prop-types": "~15.6.1", "ra-core": "^2.0.0-RC3", "react-autosuggest": "^9.3.2", diff --git a/packages/ra-ui-materialui/src/Link.js b/packages/ra-ui-materialui/src/Link.js index eb566b172f1..d1083f0f6ea 100644 --- a/packages/ra-ui-materialui/src/Link.js +++ b/packages/ra-ui-materialui/src/Link.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { Link as RRLink } from 'react-router-dom'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; const styles = theme => ({ link: { diff --git a/packages/ra-ui-materialui/src/auth/Login.js b/packages/ra-ui-materialui/src/auth/Login.js index f43179f3953..c9a436b2de4 100644 --- a/packages/ra-ui-materialui/src/auth/Login.js +++ b/packages/ra-ui-materialui/src/auth/Login.js @@ -1,9 +1,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; -import Card from 'material-ui/Card'; -import Avatar from 'material-ui/Avatar'; -import { withStyles } from 'material-ui/styles'; +import Card from '@material-ui/core/Card'; +import Avatar from '@material-ui/core/Avatar'; +import { withStyles } from '@material-ui/core/styles'; import LockIcon from '@material-ui/icons/LockOutline'; import defaultTheme from '../defaultTheme'; diff --git a/packages/ra-ui-materialui/src/auth/LoginForm.js b/packages/ra-ui-materialui/src/auth/LoginForm.js index c2cb39c4a79..0e230c5fa77 100644 --- a/packages/ra-ui-materialui/src/auth/LoginForm.js +++ b/packages/ra-ui-materialui/src/auth/LoginForm.js @@ -3,11 +3,11 @@ import PropTypes from 'prop-types'; import { Field, propTypes, reduxForm } from 'redux-form'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; -import { CardActions } from 'material-ui/Card'; -import Button from 'material-ui/Button'; -import TextField from 'material-ui/TextField'; -import { CircularProgress } from 'material-ui/Progress'; -import { withStyles } from 'material-ui/styles'; +import CardActions from '@material-ui/core/CardActions'; +import Button from '@material-ui/core/Button'; +import TextField from '@material-ui/core/TextField'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import { withStyles } from '@material-ui/core/styles'; import { translate, userLogin } from 'ra-core'; const styles = () => ({ diff --git a/packages/ra-ui-materialui/src/auth/Logout.js b/packages/ra-ui-materialui/src/auth/Logout.js index 41cb2f85e18..21cbfa9c842 100644 --- a/packages/ra-ui-materialui/src/auth/Logout.js +++ b/packages/ra-ui-materialui/src/auth/Logout.js @@ -2,15 +2,15 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; -import { MenuItem } from 'material-ui/Menu'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; +import Button from '@material-ui/core/Button'; +import MenuItem from '@material-ui/core/MenuItem'; +import { withStyles } from '@material-ui/core/styles'; import ExitIcon from '@material-ui/icons/PowerSettingsNew'; import classnames from 'classnames'; -import Responsive from '../layout/Responsive'; - import { translate, userLogout as userLogoutAction } from 'ra-core'; +import Responsive from '../layout/Responsive'; + const styles = theme => ({ menuItem: { color: theme.palette.text.secondary, diff --git a/packages/ra-ui-materialui/src/button/Button.js b/packages/ra-ui-materialui/src/button/Button.js index 6c64046bb4c..48e4d769129 100644 --- a/packages/ra-ui-materialui/src/button/Button.js +++ b/packages/ra-ui-materialui/src/button/Button.js @@ -1,12 +1,12 @@ import React from 'react'; import PropTypes from 'prop-types'; import compose from 'recompose/compose'; -import MuiButton from 'material-ui/Button'; -import IconButton from 'material-ui/IconButton'; -import { withStyles } from 'material-ui/styles'; +import MuiButton from '@material-ui/core/Button'; +import IconButton from '@material-ui/core/IconButton'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; - import { translate } from 'ra-core'; + import Responsive from '../layout/Responsive'; const styles = { diff --git a/packages/ra-ui-materialui/src/button/CreateButton.js b/packages/ra-ui-materialui/src/button/CreateButton.js index 671c2c60bcb..aba82b7b889 100644 --- a/packages/ra-ui-materialui/src/button/CreateButton.js +++ b/packages/ra-ui-materialui/src/button/CreateButton.js @@ -1,15 +1,15 @@ import React from 'react'; import PropTypes from 'prop-types'; import onlyUpdateForKeys from 'recompose/onlyUpdateForKeys'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; +import Button from '@material-ui/core/Button'; +import { withStyles } from '@material-ui/core/styles'; import ContentAdd from '@material-ui/icons/Add'; import compose from 'recompose/compose'; import classnames from 'classnames'; +import { translate } from 'ra-core'; import Responsive from '../layout/Responsive'; import Link from '../Link'; -import { translate } from 'ra-core'; const styles = theme => ({ floating: { diff --git a/packages/ra-ui-materialui/src/button/DeleteButton.js b/packages/ra-ui-materialui/src/button/DeleteButton.js index 7c7baffe4ee..2cfb70c2c89 100644 --- a/packages/ra-ui-materialui/src/button/DeleteButton.js +++ b/packages/ra-ui-materialui/src/button/DeleteButton.js @@ -2,8 +2,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; -import { withStyles } from 'material-ui/styles'; -import { fade } from 'material-ui/styles/colorManipulator'; +import { withStyles } from '@material-ui/core/styles'; +import { fade } from '@material-ui/core/styles/colorManipulator'; import ActionDelete from '@material-ui/icons/Delete'; import classnames from 'classnames'; import { translate, crudDelete, startUndoable } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/button/SaveButton.js b/packages/ra-ui-materialui/src/button/SaveButton.js index d251fb1c10d..4a21b78e47b 100644 --- a/packages/ra-ui-materialui/src/button/SaveButton.js +++ b/packages/ra-ui-materialui/src/button/SaveButton.js @@ -2,12 +2,11 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; -import Button from 'material-ui/Button'; -import { CircularProgress } from 'material-ui/Progress'; -import { withStyles } from 'material-ui/styles'; +import Button from '@material-ui/core/Button'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import { withStyles } from '@material-ui/core/styles'; import ContentSave from '@material-ui/icons/Save'; import classnames from 'classnames'; - import { showNotification, translate } from 'ra-core'; const styles = { diff --git a/packages/ra-ui-materialui/src/detail/Create.js b/packages/ra-ui-materialui/src/detail/Create.js index 3942149b303..d805d551b4c 100644 --- a/packages/ra-ui-materialui/src/detail/Create.js +++ b/packages/ra-ui-materialui/src/detail/Create.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Card from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; import classnames from 'classnames'; import { CreateController } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/detail/CreateActions.js b/packages/ra-ui-materialui/src/detail/CreateActions.js index edc1b33b43a..e4a7edddb16 100644 --- a/packages/ra-ui-materialui/src/detail/CreateActions.js +++ b/packages/ra-ui-materialui/src/detail/CreateActions.js @@ -20,7 +20,7 @@ const sanitizeRestProps = ({ * use it in the `actions` prop to pas a custom element. * * @example - * import Button from 'material-ui/Button'; + * import Button from '@material-ui/core/Button'; * import { CardActions, Create, ListButton } from 'react-admin'; * * const PostCreateActions = ({ basePath }) => ( diff --git a/packages/ra-ui-materialui/src/detail/Edit.js b/packages/ra-ui-materialui/src/detail/Edit.js index 9b67634830f..8c4109b54e0 100644 --- a/packages/ra-ui-materialui/src/detail/Edit.js +++ b/packages/ra-ui-materialui/src/detail/Edit.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Card, { CardContent } from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; import classnames from 'classnames'; import { EditController } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/detail/EditActions.js b/packages/ra-ui-materialui/src/detail/EditActions.js index 07470040836..25fd0192be9 100644 --- a/packages/ra-ui-materialui/src/detail/EditActions.js +++ b/packages/ra-ui-materialui/src/detail/EditActions.js @@ -21,7 +21,7 @@ const sanitizeRestProps = ({ * use it in the `actions` prop to pas a custom element. * * @example - * import Button from 'material-ui/Button'; + * import Button from '@material-ui/core/Button'; * import { CardActions, ListButton, ShowButton, DeleteButton, RefreshButton, Edit } from 'react-admin'; * * const PostEditActions = ({ basePath, record, rseource }) => ( diff --git a/packages/ra-ui-materialui/src/detail/Show.js b/packages/ra-ui-materialui/src/detail/Show.js index 65e3f93ccf4..7bab49dfdca 100644 --- a/packages/ra-ui-materialui/src/detail/Show.js +++ b/packages/ra-ui-materialui/src/detail/Show.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Card from 'material-ui/Card'; +import Card from '@material-ui/core/Card'; import classnames from 'classnames'; import { ShowController } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/detail/ShowActions.js b/packages/ra-ui-materialui/src/detail/ShowActions.js index cb4a13234fa..e23777927a4 100644 --- a/packages/ra-ui-materialui/src/detail/ShowActions.js +++ b/packages/ra-ui-materialui/src/detail/ShowActions.js @@ -22,7 +22,7 @@ const sanitizeRestProps = ({ * use it in the `actions` prop to pas a custom element. * * @example - * import Button from 'material-ui/Button'; + * import Button from '@material-ui/core/Button'; * import { CardActions, ListButton, EditButton, DeleteButton, RefreshButton, Show } from 'react-admin'; * * const PostShowActions = ({ basePath, record, resource }) => ( diff --git a/packages/ra-ui-materialui/src/detail/SimpleShowLayout.js b/packages/ra-ui-materialui/src/detail/SimpleShowLayout.js index 536fbf73be2..43ab2ea575b 100644 --- a/packages/ra-ui-materialui/src/detail/SimpleShowLayout.js +++ b/packages/ra-ui-materialui/src/detail/SimpleShowLayout.js @@ -1,6 +1,6 @@ import React, { Children } from 'react'; import PropTypes from 'prop-types'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import Labeled from '../input/Labeled'; diff --git a/packages/ra-ui-materialui/src/detail/Tab.js b/packages/ra-ui-materialui/src/detail/Tab.js index b7f8bc5f0f7..cf3d5c66cdb 100644 --- a/packages/ra-ui-materialui/src/detail/Tab.js +++ b/packages/ra-ui-materialui/src/detail/Tab.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { Tab as MuiTab } from 'material-ui/Tabs'; +import MuiTab from '@material-ui/core/Tab'; import { translate } from 'ra-core'; import Labeled from '../input/Labeled'; diff --git a/packages/ra-ui-materialui/src/detail/TabbedShowLayout.js b/packages/ra-ui-materialui/src/detail/TabbedShowLayout.js index 199ef0e0512..0f533f1957e 100644 --- a/packages/ra-ui-materialui/src/detail/TabbedShowLayout.js +++ b/packages/ra-ui-materialui/src/detail/TabbedShowLayout.js @@ -1,8 +1,8 @@ import React, { Component, Children, cloneElement } from 'react'; import PropTypes from 'prop-types'; -import Tabs from 'material-ui/Tabs'; -import Divider from 'material-ui/Divider'; -import { withStyles } from 'material-ui/styles'; +import Tabs from '@material-ui/core/Tabs'; +import Divider from '@material-ui/core/Divider'; +import { withStyles } from '@material-ui/core/styles'; const styles = { tab: { padding: '0 1em 1em 1em' }, diff --git a/packages/ra-ui-materialui/src/field/ChipField.js b/packages/ra-ui-materialui/src/field/ChipField.js index d3dc5b56717..7e1e71c6cf9 100644 --- a/packages/ra-ui-materialui/src/field/ChipField.js +++ b/packages/ra-ui-materialui/src/field/ChipField.js @@ -2,8 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; import pure from 'recompose/pure'; -import Chip from 'material-ui/Chip'; -import { withStyles } from 'material-ui/styles'; +import Chip from '@material-ui/core/Chip'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/field/FileField.js b/packages/ra-ui-materialui/src/field/FileField.js index dc1c6abd06f..be9c39da856 100644 --- a/packages/ra-ui-materialui/src/field/FileField.js +++ b/packages/ra-ui-materialui/src/field/FileField.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/field/ImageField.js b/packages/ra-ui-materialui/src/field/ImageField.js index 1e161ea5e12..ecbfe01d77e 100644 --- a/packages/ra-ui-materialui/src/field/ImageField.js +++ b/packages/ra-ui-materialui/src/field/ImageField.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/field/NumberField.js b/packages/ra-ui-materialui/src/field/NumberField.js index 72282576d2a..d2883429e85 100644 --- a/packages/ra-ui-materialui/src/field/NumberField.js +++ b/packages/ra-ui-materialui/src/field/NumberField.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; import pure from 'recompose/pure'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import compose from 'recompose/compose'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/field/ReferenceArrayField.js b/packages/ra-ui-materialui/src/field/ReferenceArrayField.js index 40b230c39ce..a7a806684a8 100644 --- a/packages/ra-ui-materialui/src/field/ReferenceArrayField.js +++ b/packages/ra-ui-materialui/src/field/ReferenceArrayField.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { LinearProgress } from 'material-ui/Progress'; -import { withStyles } from 'material-ui/styles'; +import LinearProgress from '@material-ui/core/LinearProgress'; +import { withStyles } from '@material-ui/core/styles'; import { ReferenceArrayFieldController } from 'ra-core'; const styles = { diff --git a/packages/ra-ui-materialui/src/field/ReferenceField.js b/packages/ra-ui-materialui/src/field/ReferenceField.js index 0963384db7e..d36c690457b 100644 --- a/packages/ra-ui-materialui/src/field/ReferenceField.js +++ b/packages/ra-ui-materialui/src/field/ReferenceField.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import { ReferenceFieldController } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/field/ReferenceManyField.js b/packages/ra-ui-materialui/src/field/ReferenceManyField.js index 399e7d09931..6e6a7ff3956 100644 --- a/packages/ra-ui-materialui/src/field/ReferenceManyField.js +++ b/packages/ra-ui-materialui/src/field/ReferenceManyField.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { LinearProgress } from 'material-ui/Progress'; -import { withStyles } from 'material-ui/styles'; +import LinearProgress from '@material-ui/core/LinearProgress'; +import { withStyles } from '@material-ui/core/styles'; import { ReferenceManyFieldController } from 'ra-core'; const styles = { diff --git a/packages/ra-ui-materialui/src/field/RichTextField.js b/packages/ra-ui-materialui/src/field/RichTextField.js index 5e7fb0be823..0fc1799f185 100644 --- a/packages/ra-ui-materialui/src/field/RichTextField.js +++ b/packages/ra-ui-materialui/src/field/RichTextField.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; import pure from 'recompose/pure'; -import Typography from 'material-ui/Typography'; +import Typography from '@material-ui/core/Typography'; import sanitizeRestProps from './sanitizeRestProps'; export const removeTags = input => diff --git a/packages/ra-ui-materialui/src/form/FormInput.js b/packages/ra-ui-materialui/src/form/FormInput.js index afdf81cc33c..27bf339c8ab 100644 --- a/packages/ra-ui-materialui/src/form/FormInput.js +++ b/packages/ra-ui-materialui/src/form/FormInput.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import Labeled from '../input/Labeled'; diff --git a/packages/ra-ui-materialui/src/form/SimpleForm.js b/packages/ra-ui-materialui/src/form/SimpleForm.js index 48022b84618..d30cd70bb86 100644 --- a/packages/ra-ui-materialui/src/form/SimpleForm.js +++ b/packages/ra-ui-materialui/src/form/SimpleForm.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { reduxForm } from 'redux-form'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import { getDefaultValues, translate } from 'ra-core'; import FormInput from './FormInput'; diff --git a/packages/ra-ui-materialui/src/form/SimpleFormIterator.js b/packages/ra-ui-materialui/src/form/SimpleFormIterator.js index 01709d519db..082c7340d7f 100644 --- a/packages/ra-ui-materialui/src/form/SimpleFormIterator.js +++ b/packages/ra-ui-materialui/src/form/SimpleFormIterator.js @@ -2,9 +2,9 @@ import React, { Children, cloneElement, Component } from 'react'; import PropTypes from 'prop-types'; import compose from 'recompose/compose'; import { CSSTransition, TransitionGroup } from 'react-transition-group'; -import Typography from 'material-ui/Typography'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; +import Typography from '@material-ui/core/Typography'; +import Button from '@material-ui/core/Button'; +import { withStyles } from '@material-ui/core/styles'; import CloseIcon from '@material-ui/icons/RemoveCircleOutline'; import AddIcon from '@material-ui/icons/AddCircleOutline'; import { translate } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/form/TabbedForm.js b/packages/ra-ui-materialui/src/form/TabbedForm.js index a53a40c6bfc..bdab3b19a85 100644 --- a/packages/ra-ui-materialui/src/form/TabbedForm.js +++ b/packages/ra-ui-materialui/src/form/TabbedForm.js @@ -9,9 +9,10 @@ import { } from 'redux-form'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; -import Divider from 'material-ui/Divider'; -import Tabs, { Tab } from 'material-ui/Tabs'; -import { withStyles } from 'material-ui/styles'; +import Divider from '@material-ui/core/Divider'; +import Tabs from '@material-ui/core/Tabs'; +import Tab from '@material-ui/core/Tab'; +import { withStyles } from '@material-ui/core/styles'; import { getDefaultValues, translate } from 'ra-core'; import Toolbar from './Toolbar'; diff --git a/packages/ra-ui-materialui/src/form/Toolbar.js b/packages/ra-ui-materialui/src/form/Toolbar.js index b3407f30a90..2807ba4058a 100644 --- a/packages/ra-ui-materialui/src/form/Toolbar.js +++ b/packages/ra-ui-materialui/src/form/Toolbar.js @@ -1,7 +1,7 @@ import React, { Children } from 'react'; import PropTypes from 'prop-types'; -import MuiToolbar from 'material-ui/Toolbar'; -import { withStyles } from 'material-ui/styles'; +import MuiToolbar from '@material-ui/core/Toolbar'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import { SaveButton } from '../button'; diff --git a/packages/ra-ui-materialui/src/input/ArrayInput.js b/packages/ra-ui-materialui/src/input/ArrayInput.js index ae42821ccf0..372b2493265 100644 --- a/packages/ra-ui-materialui/src/input/ArrayInput.js +++ b/packages/ra-ui-materialui/src/input/ArrayInput.js @@ -2,8 +2,8 @@ import React, { cloneElement, Component } from 'react'; import PropTypes from 'prop-types'; import { isRequired, FieldTitle } from 'ra-core'; import { FieldArray } from 'redux-form'; -import { FormControl } from 'material-ui/Form'; -import { InputLabel } from 'material-ui/Input'; +import FormControl from '@material-ui/core/FormControl'; +import InputLabel from '@material-ui/core/InputLabel'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/input/AutocompleteInput.js b/packages/ra-ui-materialui/src/input/AutocompleteInput.js index 543fa019213..9477a1e53af 100644 --- a/packages/ra-ui-materialui/src/input/AutocompleteInput.js +++ b/packages/ra-ui-materialui/src/input/AutocompleteInput.js @@ -3,10 +3,10 @@ import PropTypes from 'prop-types'; import get from 'lodash/get'; import isEqual from 'lodash/isEqual'; import Autosuggest from 'react-autosuggest'; -import TextField from 'material-ui/TextField'; -import Paper from 'material-ui/Paper'; -import { MenuItem } from 'material-ui/Menu'; -import { withStyles } from 'material-ui/styles'; +import TextField from '@material-ui/core/TextField'; +import Paper from '@material-ui/core/Paper'; +import MenuItem from '@material-ui/core/MenuItem'; +import { withStyles } from '@material-ui/core/styles'; import parse from 'autosuggest-highlight/parse'; import match from 'autosuggest-highlight/match'; import compose from 'recompose/compose'; diff --git a/packages/ra-ui-materialui/src/input/BooleanInput.js b/packages/ra-ui-materialui/src/input/BooleanInput.js index a2c4d8853c7..f2091df7b6f 100644 --- a/packages/ra-ui-materialui/src/input/BooleanInput.js +++ b/packages/ra-ui-materialui/src/input/BooleanInput.js @@ -1,7 +1,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { FormControlLabel, FormGroup } from 'material-ui/Form'; -import Switch from 'material-ui/Switch'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import FormGroup from '@material-ui/core/FormGroup'; +import Switch from '@material-ui/core/Switch'; import { addField, FieldTitle } from 'ra-core'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/input/CheckboxGroupInput.js b/packages/ra-ui-materialui/src/input/CheckboxGroupInput.js index 1e587f34042..441d074b81a 100644 --- a/packages/ra-ui-materialui/src/input/CheckboxGroupInput.js +++ b/packages/ra-ui-materialui/src/input/CheckboxGroupInput.js @@ -1,15 +1,13 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; -import { - FormLabel, - FormControl, - FormGroup, - FormControlLabel, - FormHelperText, -} from 'material-ui/Form'; -import Checkbox from 'material-ui/Checkbox'; -import { withStyles } from 'material-ui/styles'; +import FormLabel from '@material-ui/core/FormLabel'; +import FormControl from '@material-ui/core/FormControl'; +import FormGroup from '@material-ui/core/FormGroup'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import FormHelperText from '@material-ui/core/FormHelperText'; +import Checkbox from '@material-ui/core/Checkbox'; +import { withStyles } from '@material-ui/core/styles'; import compose from 'recompose/compose'; import { addField, translate, FieldTitle } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/input/DateInput.js b/packages/ra-ui-materialui/src/input/DateInput.js index 50ed93e5c42..d2f564fea80 100644 --- a/packages/ra-ui-materialui/src/input/DateInput.js +++ b/packages/ra-ui-materialui/src/input/DateInput.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import TextField from 'material-ui/TextField'; +import TextField from '@material-ui/core/TextField'; import { addField, FieldTitle } from 'ra-core'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/input/DisabledInput.js b/packages/ra-ui-materialui/src/input/DisabledInput.js index d39406c768e..5f268d70db1 100644 --- a/packages/ra-ui-materialui/src/input/DisabledInput.js +++ b/packages/ra-ui-materialui/src/input/DisabledInput.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import TextField from 'material-ui/TextField'; +import TextField from '@material-ui/core/TextField'; import { addField, FieldTitle } from 'ra-core'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/input/FileInput.js b/packages/ra-ui-materialui/src/input/FileInput.js index 527b0fd1ec9..c43baf0db38 100644 --- a/packages/ra-ui-materialui/src/input/FileInput.js +++ b/packages/ra-ui-materialui/src/input/FileInput.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { shallowEqual } from 'recompose'; import Dropzone from 'react-dropzone'; import compose from 'recompose/compose'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import { addField, translate } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/input/FileInputPreview.js b/packages/ra-ui-materialui/src/input/FileInputPreview.js index 909091373c7..0ec830a729e 100644 --- a/packages/ra-ui-materialui/src/input/FileInputPreview.js +++ b/packages/ra-ui-materialui/src/input/FileInputPreview.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import IconButton from 'material-ui/IconButton'; -import { withStyles } from 'material-ui/styles'; +import IconButton from '@material-ui/core/IconButton'; +import { withStyles } from '@material-ui/core/styles'; import RemoveCircle from '@material-ui/icons/RemoveCircle'; const styles = theme => ({ diff --git a/packages/ra-ui-materialui/src/input/ImageInput.js b/packages/ra-ui-materialui/src/input/ImageInput.js index 67f9af90a20..06c53819702 100644 --- a/packages/ra-ui-materialui/src/input/ImageInput.js +++ b/packages/ra-ui-materialui/src/input/ImageInput.js @@ -1,5 +1,5 @@ import compose from 'recompose/compose'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import { addField, translate } from 'ra-core'; import { FileInput } from './FileInput'; diff --git a/packages/ra-ui-materialui/src/input/Labeled.js b/packages/ra-ui-materialui/src/input/Labeled.js index 1194cc07489..b739623508e 100644 --- a/packages/ra-ui-materialui/src/input/Labeled.js +++ b/packages/ra-ui-materialui/src/input/Labeled.js @@ -1,8 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { InputLabel } from 'material-ui/Input'; -import { FormControl } from 'material-ui/Form'; -import { withStyles } from 'material-ui/styles'; +import InputLabel from '@material-ui/core/InputLabel'; +import FormControl from '@material-ui/core/FormControl'; +import { withStyles } from '@material-ui/core/styles'; import { FieldTitle } from 'ra-core'; const styles = theme => ({ diff --git a/packages/ra-ui-materialui/src/input/LongTextInput.js b/packages/ra-ui-materialui/src/input/LongTextInput.js index 92ebe29664a..d78423be995 100644 --- a/packages/ra-ui-materialui/src/input/LongTextInput.js +++ b/packages/ra-ui-materialui/src/input/LongTextInput.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import TextField from 'material-ui/TextField'; +import TextField from '@material-ui/core/TextField'; import { addField, FieldTitle } from 'ra-core'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/input/NullableBooleanInput.js b/packages/ra-ui-materialui/src/input/NullableBooleanInput.js index 09cdab5b03d..128e5a66aaa 100644 --- a/packages/ra-ui-materialui/src/input/NullableBooleanInput.js +++ b/packages/ra-ui-materialui/src/input/NullableBooleanInput.js @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import TextField from 'material-ui/TextField'; -import { MenuItem } from 'material-ui/Menu'; -import { withStyles } from 'material-ui/styles'; +import TextField from '@material-ui/core/TextField'; +import MenuItem from '@material-ui/core/MenuItem'; +import { withStyles } from '@material-ui/core/styles'; import compose from 'recompose/compose'; import classnames from 'classnames'; import { addField, translate, FieldTitle } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/input/NumberInput.js b/packages/ra-ui-materialui/src/input/NumberInput.js index f2d576b8c31..153a2af5c17 100644 --- a/packages/ra-ui-materialui/src/input/NumberInput.js +++ b/packages/ra-ui-materialui/src/input/NumberInput.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import TextField from 'material-ui/TextField'; +import TextField from '@material-ui/core/TextField'; import { addField, FieldTitle } from 'ra-core'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.js b/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.js index 1a62f632ffc..cefd8dae5d4 100644 --- a/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.js +++ b/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.js @@ -1,14 +1,13 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; -import { - FormControl, - FormControlLabel, - FormHelperText, -} from 'material-ui/Form'; -import { InputLabel } from 'material-ui/Input'; -import Radio, { RadioGroup } from 'material-ui/Radio'; -import { withStyles } from 'material-ui/styles'; +import FormControl from '@material-ui/core/FormControl'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import FormHelperText from '@material-ui/core/FormHelperText'; +import InputLabel from '@material-ui/core/InputLabel'; +import RadioGroup from '@material-ui/core/RadioGroup'; +import Radio from '@material-ui/core/Radio'; +import { withStyles } from '@material-ui/core/styles'; import compose from 'recompose/compose'; import { addField, translate, FieldTitle } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/input/ReferenceError.js b/packages/ra-ui-materialui/src/input/ReferenceError.js index 82e07e31be1..f4327ca2117 100644 --- a/packages/ra-ui-materialui/src/input/ReferenceError.js +++ b/packages/ra-ui-materialui/src/input/ReferenceError.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import TextField from 'material-ui/TextField'; +import TextField from '@material-ui/core/TextField'; const ReferenceError = ({ label, error }) => ( diff --git a/packages/ra-ui-materialui/src/input/SelectArrayInput.js b/packages/ra-ui-materialui/src/input/SelectArrayInput.js index 19847fba024..c33284d245b 100644 --- a/packages/ra-ui-materialui/src/input/SelectArrayInput.js +++ b/packages/ra-ui-materialui/src/input/SelectArrayInput.js @@ -1,12 +1,14 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; -import Select from 'material-ui/Select'; -import { MenuItem } from 'material-ui/Menu'; -import Input, { InputLabel } from 'material-ui/Input'; -import { FormControl, FormHelperText } from 'material-ui/Form'; -import Chip from 'material-ui/Chip'; -import { withStyles } from 'material-ui/styles'; +import Select from '@material-ui/core/Select'; +import MenuItem from '@material-ui/core/MenuItem'; +import InputLabel from '@material-ui/core/InputLabel'; +import Input from '@material-ui/core/Input'; +import FormHelperText from '@material-ui/core/FormHelperText'; +import FormControl from '@material-ui/core/FormControl'; +import Chip from '@material-ui/core/Chip'; +import { withStyles } from '@material-ui/core/styles'; import compose from 'recompose/compose'; import classnames from 'classnames'; import { addField, translate, FieldTitle } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/input/SelectInput.js b/packages/ra-ui-materialui/src/input/SelectInput.js index 4ef126714fa..2e6bd84b4bd 100644 --- a/packages/ra-ui-materialui/src/input/SelectInput.js +++ b/packages/ra-ui-materialui/src/input/SelectInput.js @@ -1,9 +1,9 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import get from 'lodash/get'; -import TextField from 'material-ui/TextField'; -import { MenuItem } from 'material-ui/Menu'; -import { withStyles } from 'material-ui/styles'; +import TextField from '@material-ui/core/TextField'; +import MenuItem from '@material-ui/core/MenuItem'; +import { withStyles } from '@material-ui/core/styles'; import compose from 'recompose/compose'; import { addField, translate, FieldTitle } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/input/TextInput.js b/packages/ra-ui-materialui/src/input/TextInput.js index ae396d466a8..b08811ad36d 100644 --- a/packages/ra-ui-materialui/src/input/TextInput.js +++ b/packages/ra-ui-materialui/src/input/TextInput.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import TextField from 'material-ui/TextField'; +import TextField from '@material-ui/core/TextField'; import { addField, FieldTitle } from 'ra-core'; import sanitizeRestProps from './sanitizeRestProps'; diff --git a/packages/ra-ui-materialui/src/layout/AppBar.js b/packages/ra-ui-materialui/src/layout/AppBar.js index 205ea37f3d0..6440fe5eaf8 100644 --- a/packages/ra-ui-materialui/src/layout/AppBar.js +++ b/packages/ra-ui-materialui/src/layout/AppBar.js @@ -2,11 +2,11 @@ import React, { cloneElement } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import classNames from 'classnames'; -import MuiAppBar from 'material-ui/AppBar'; -import Toolbar from 'material-ui/Toolbar'; -import IconButton from 'material-ui/IconButton'; -import Typography from 'material-ui/Typography'; -import { withStyles } from 'material-ui/styles'; +import MuiAppBar from '@material-ui/core/AppBar'; +import Toolbar from '@material-ui/core/Toolbar'; +import IconButton from '@material-ui/core/IconButton'; +import Typography from '@material-ui/core/Typography'; +import { withStyles } from '@material-ui/core/styles'; import MenuIcon from '@material-ui/icons/Menu'; import compose from 'recompose/compose'; import { toggleSidebar as toggleSidebarAction } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/layout/AppBarMobile.js b/packages/ra-ui-materialui/src/layout/AppBarMobile.js index 5ee39ce5b64..d63fca41386 100644 --- a/packages/ra-ui-materialui/src/layout/AppBarMobile.js +++ b/packages/ra-ui-materialui/src/layout/AppBarMobile.js @@ -1,11 +1,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import MuiAppBar from 'material-ui/AppBar'; -import Toolbar from 'material-ui/Toolbar'; -import IconButton from 'material-ui/IconButton'; -import Typography from 'material-ui/Typography'; -import { withStyles } from 'material-ui/styles'; +import MuiAppBar from '@material-ui/core/AppBar'; +import Toolbar from '@material-ui/core/Toolbar'; +import IconButton from '@material-ui/core/IconButton'; +import Typography from '@material-ui/core/Typography'; +import { withStyles } from '@material-ui/core/styles'; import MenuIcon from '@material-ui/icons/Menu'; import compose from 'recompose/compose'; import classnames from 'classnames'; diff --git a/packages/ra-ui-materialui/src/layout/CardActions.js b/packages/ra-ui-materialui/src/layout/CardActions.js index ff39a4ac16e..6d40f32aa0f 100644 --- a/packages/ra-ui-materialui/src/layout/CardActions.js +++ b/packages/ra-ui-materialui/src/layout/CardActions.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { CardActions as MuiCardActions } from 'material-ui/Card'; -import { withStyles } from 'material-ui/styles'; +import MuiCardActions from '@material-ui/core/CardActions'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; const styles = { diff --git a/packages/ra-ui-materialui/src/layout/Confirm.js b/packages/ra-ui-materialui/src/layout/Confirm.js index 49ab87a5e20..007238331e3 100644 --- a/packages/ra-ui-materialui/src/layout/Confirm.js +++ b/packages/ra-ui-materialui/src/layout/Confirm.js @@ -1,14 +1,13 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Dialog, { - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, -} from 'material-ui/Dialog'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; -import { fade } from 'material-ui/styles/colorManipulator'; +import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogContentText from '@material-ui/core/DialogContentText'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import { withStyles } from '@material-ui/core/styles'; +import { fade } from '@material-ui/core/styles/colorManipulator'; import ActionCheck from '@material-ui/icons/CheckCircle'; import AlertError from '@material-ui/icons/ErrorOutline'; import classnames from 'classnames'; diff --git a/packages/ra-ui-materialui/src/layout/Header.js b/packages/ra-ui-materialui/src/layout/Header.js index 1c848568586..1c98c7fb7bc 100644 --- a/packages/ra-ui-materialui/src/layout/Header.js +++ b/packages/ra-ui-materialui/src/layout/Header.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import ViewTitle from './ViewTitle'; diff --git a/packages/ra-ui-materialui/src/layout/Layout.js b/packages/ra-ui-materialui/src/layout/Layout.js index a5b92b11e46..103c4c103d4 100644 --- a/packages/ra-ui-materialui/src/layout/Layout.js +++ b/packages/ra-ui-materialui/src/layout/Layout.js @@ -6,8 +6,8 @@ import { MuiThemeProvider, createMuiTheme, withStyles, -} from 'material-ui/styles'; -import Hidden from 'material-ui/Hidden'; +} from '@material-ui/core/styles'; +import Hidden from '@material-ui/core/Hidden'; import compose from 'recompose/compose'; import AppBar from './AppBar'; diff --git a/packages/ra-ui-materialui/src/layout/LinearProgress.js b/packages/ra-ui-materialui/src/layout/LinearProgress.js index c2199d1086c..44efad2b733 100644 --- a/packages/ra-ui-materialui/src/layout/LinearProgress.js +++ b/packages/ra-ui-materialui/src/layout/LinearProgress.js @@ -1,7 +1,7 @@ import React from 'react'; -import { LinearProgress as Progress } from 'material-ui/Progress'; +import Progress from '@material-ui/core/LinearProgress'; import PropTypes from 'prop-types'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; const styles = theme => ({ diff --git a/packages/ra-ui-materialui/src/layout/Loading.js b/packages/ra-ui-materialui/src/layout/Loading.js index 4a1703c7532..edab37de1d5 100644 --- a/packages/ra-ui-materialui/src/layout/Loading.js +++ b/packages/ra-ui-materialui/src/layout/Loading.js @@ -1,9 +1,9 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import compose from 'recompose/compose'; import classnames from 'classnames'; -import { CircularProgress } from 'material-ui/Progress'; +import CircularProgress from '@material-ui/core/CircularProgress'; import { translate } from 'ra-core'; const styles = theme => ({ diff --git a/packages/ra-ui-materialui/src/layout/LoadingIndicator.js b/packages/ra-ui-materialui/src/layout/LoadingIndicator.js index e5b21607d11..11bba2595a5 100644 --- a/packages/ra-ui-materialui/src/layout/LoadingIndicator.js +++ b/packages/ra-ui-materialui/src/layout/LoadingIndicator.js @@ -2,9 +2,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { connect } from 'react-redux'; -import { withStyles } from 'material-ui/styles'; -import withWidth from 'material-ui/utils/withWidth'; -import { CircularProgress } from 'material-ui/Progress'; +import { withStyles } from '@material-ui/core/styles'; +import withWidth from '@material-ui/core/withWidth'; +import CircularProgress from '@material-ui/core/CircularProgress'; import compose from 'recompose/compose'; const styles = { diff --git a/packages/ra-ui-materialui/src/layout/Menu.js b/packages/ra-ui-materialui/src/layout/Menu.js index 5a3c4cca4b9..6849a53c481 100644 --- a/packages/ra-ui-materialui/src/layout/Menu.js +++ b/packages/ra-ui-materialui/src/layout/Menu.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import inflection from 'inflection'; import compose from 'recompose/compose'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import classnames from 'classnames'; import { getResources, translate } from 'ra-core'; import DefaultIcon from '@material-ui/icons/ViewList'; diff --git a/packages/ra-ui-materialui/src/layout/MenuItemLink.js b/packages/ra-ui-materialui/src/layout/MenuItemLink.js index 0ae234d9933..12c311d9b77 100644 --- a/packages/ra-ui-materialui/src/layout/MenuItemLink.js +++ b/packages/ra-ui-materialui/src/layout/MenuItemLink.js @@ -2,8 +2,8 @@ import React, { cloneElement, Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { NavLink } from 'react-router-dom'; -import { MenuItem } from 'material-ui/Menu'; -import { withStyles } from 'material-ui/styles'; +import MenuItem from '@material-ui/core/MenuItem'; +import { withStyles } from '@material-ui/core/styles'; const styles = theme => ({ root: { diff --git a/packages/ra-ui-materialui/src/layout/NotFound.js b/packages/ra-ui-materialui/src/layout/NotFound.js index c6a911b0e2f..286ff3818d4 100644 --- a/packages/ra-ui-materialui/src/layout/NotFound.js +++ b/packages/ra-ui-materialui/src/layout/NotFound.js @@ -1,8 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; -import Hidden from 'material-ui/Hidden'; +import Button from '@material-ui/core/Button'; +import { withStyles } from '@material-ui/core/styles'; +import Hidden from '@material-ui/core/Hidden'; import HotTub from '@material-ui/icons/HotTub'; import History from '@material-ui/icons/History'; import compose from 'recompose/compose'; diff --git a/packages/ra-ui-materialui/src/layout/Notification.js b/packages/ra-ui-materialui/src/layout/Notification.js index 985f42697b8..fd64173a53e 100644 --- a/packages/ra-ui-materialui/src/layout/Notification.js +++ b/packages/ra-ui-materialui/src/layout/Notification.js @@ -1,9 +1,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import Snackbar from 'material-ui/Snackbar'; -import Button from 'material-ui/Button'; -import { withStyles } from 'material-ui/styles'; +import Snackbar from '@material-ui/core/Snackbar'; +import Button from '@material-ui/core/Button'; +import { withStyles } from '@material-ui/core/styles'; import compose from 'recompose/compose'; import classnames from 'classnames'; diff --git a/packages/ra-ui-materialui/src/layout/Responsive.js b/packages/ra-ui-materialui/src/layout/Responsive.js index 4f93aaa624f..7ba079daab1 100644 --- a/packages/ra-ui-materialui/src/layout/Responsive.js +++ b/packages/ra-ui-materialui/src/layout/Responsive.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import withWidth from 'material-ui/utils/withWidth'; +import withWidth from '@material-ui/core/withWidth'; export const Responsive = ({ xsmall, diff --git a/packages/ra-ui-materialui/src/layout/Sidebar.js b/packages/ra-ui-materialui/src/layout/Sidebar.js index 3fe47276b21..a6b1c49cc1a 100644 --- a/packages/ra-ui-materialui/src/layout/Sidebar.js +++ b/packages/ra-ui-materialui/src/layout/Sidebar.js @@ -2,9 +2,9 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; -import Drawer from 'material-ui/Drawer'; -import { withStyles } from 'material-ui/styles'; -import withWidth from 'material-ui/utils/withWidth'; +import Drawer from '@material-ui/core/Drawer'; +import { withStyles } from '@material-ui/core/styles'; +import withWidth from '@material-ui/core/withWidth'; import classnames from 'classnames'; import { setSidebarVisibility } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/layout/ViewTitle.js b/packages/ra-ui-materialui/src/layout/ViewTitle.js index 76f5b43a320..b55ae9c158d 100644 --- a/packages/ra-ui-materialui/src/layout/ViewTitle.js +++ b/packages/ra-ui-materialui/src/layout/ViewTitle.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { CardContent } from 'material-ui/Card'; -import Typography from 'material-ui/Typography'; +import CardContent from '@material-ui/core/CardContent'; +import Typography from '@material-ui/core/Typography'; import classnames from 'classnames'; import Responsive from './Responsive'; diff --git a/packages/ra-ui-materialui/src/list/BulkActions.js b/packages/ra-ui-materialui/src/list/BulkActions.js index 231fbfb5120..fbd5eca1eaf 100644 --- a/packages/ra-ui-materialui/src/list/BulkActions.js +++ b/packages/ra-ui-materialui/src/list/BulkActions.js @@ -1,7 +1,8 @@ import React, { cloneElement, Children, Component } from 'react'; import PropTypes from 'prop-types'; -import Menu, { MenuItem } from 'material-ui/Menu'; -import { withStyles } from 'material-ui/styles'; +import Menu from '@material-ui/core/Menu'; +import MenuItem from '@material-ui/core/MenuItem'; +import { withStyles } from '@material-ui/core/styles'; import FilterNoneIcon from '@material-ui/icons/FilterNone'; import compose from 'recompose/compose'; import classnames from 'classnames'; diff --git a/packages/ra-ui-materialui/src/list/Datagrid.js b/packages/ra-ui-materialui/src/list/Datagrid.js index 2a6aa5a0456..7ba0fc5989c 100644 --- a/packages/ra-ui-materialui/src/list/Datagrid.js +++ b/packages/ra-ui-materialui/src/list/Datagrid.js @@ -1,8 +1,11 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { withStyles } from 'material-ui/styles'; -import Table, { TableCell, TableHead, TableRow } from 'material-ui/Table'; -import Checkbox from 'material-ui/Checkbox'; +import { withStyles } from '@material-ui/core/styles'; +import Table from '@material-ui/core/Table'; +import TableCell from '@material-ui/core/TableCell'; +import TableHead from '@material-ui/core/TableHead'; +import TableRow from '@material-ui/core/TableRow'; +import Checkbox from '@material-ui/core/Checkbox'; import classnames from 'classnames'; diff --git a/packages/ra-ui-materialui/src/list/DatagridBody.js b/packages/ra-ui-materialui/src/list/DatagridBody.js index 6c281000b53..bbb771ec71e 100644 --- a/packages/ra-ui-materialui/src/list/DatagridBody.js +++ b/packages/ra-ui-materialui/src/list/DatagridBody.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import shouldUpdate from 'recompose/shouldUpdate'; -import { TableBody } from 'material-ui/Table'; +import TableBody from '@material-ui/core/TableBody'; import classnames from 'classnames'; import DatagridRow from './DatagridRow'; diff --git a/packages/ra-ui-materialui/src/list/DatagridCell.js b/packages/ra-ui-materialui/src/list/DatagridCell.js index 367918cf369..f0b815deda2 100644 --- a/packages/ra-ui-materialui/src/list/DatagridCell.js +++ b/packages/ra-ui-materialui/src/list/DatagridCell.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { TableCell } from 'material-ui/Table'; +import TableCell from '@material-ui/core/TableCell'; import classnames from 'classnames'; const sanitizeRestProps = ({ diff --git a/packages/ra-ui-materialui/src/list/DatagridHeaderCell.js b/packages/ra-ui-materialui/src/list/DatagridHeaderCell.js index 5100ca8f444..1cdc18ecf19 100644 --- a/packages/ra-ui-materialui/src/list/DatagridHeaderCell.js +++ b/packages/ra-ui-materialui/src/list/DatagridHeaderCell.js @@ -3,8 +3,9 @@ import PropTypes from 'prop-types'; import classnames from 'classnames'; import shouldUpdate from 'recompose/shouldUpdate'; import compose from 'recompose/compose'; -import { TableCell, TableSortLabel } from 'material-ui/Table'; -import Tooltip from 'material-ui/Tooltip'; +import TableCell from '@material-ui/core/TableCell'; +import TableSortLabel from '@material-ui/core/TableSortLabel'; +import Tooltip from '@material-ui/core/Tooltip'; import { FieldTitle, translate } from 'ra-core'; export const DatagridHeaderCell = ({ diff --git a/packages/ra-ui-materialui/src/list/DatagridRow.js b/packages/ra-ui-materialui/src/list/DatagridRow.js index 079583db643..19831b8eb32 100644 --- a/packages/ra-ui-materialui/src/list/DatagridRow.js +++ b/packages/ra-ui-materialui/src/list/DatagridRow.js @@ -1,7 +1,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { TableCell, TableRow } from 'material-ui/Table'; -import Checkbox from 'material-ui/Checkbox'; +import TableCell from '@material-ui/core/TableCell'; +import TableRow from '@material-ui/core/TableRow'; +import Checkbox from '@material-ui/core/Checkbox'; import classnames from 'classnames'; import DatagridCell from './DatagridCell'; diff --git a/packages/ra-ui-materialui/src/list/Filter.js b/packages/ra-ui-materialui/src/list/Filter.js index 67d1b778328..88b6e050008 100644 --- a/packages/ra-ui-materialui/src/list/Filter.js +++ b/packages/ra-ui-materialui/src/list/Filter.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import FilterForm from './FilterForm'; import FilterButton from './FilterButton'; diff --git a/packages/ra-ui-materialui/src/list/FilterButton.js b/packages/ra-ui-materialui/src/list/FilterButton.js index 72504b7485c..4a10afc35ec 100644 --- a/packages/ra-ui-materialui/src/list/FilterButton.js +++ b/packages/ra-ui-materialui/src/list/FilterButton.js @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import { findDOMNode } from 'react-dom'; import PropTypes from 'prop-types'; -import Menu from 'material-ui/Menu'; -import { withStyles } from 'material-ui/styles'; +import Menu from '@material-ui/core/Menu'; +import { withStyles } from '@material-ui/core/styles'; import ContentFilter from '@material-ui/icons/FilterList'; import classnames from 'classnames'; import compose from 'recompose/compose'; diff --git a/packages/ra-ui-materialui/src/list/FilterButtonMenuItem.js b/packages/ra-ui-materialui/src/list/FilterButtonMenuItem.js index 09facce3420..db2558b4a66 100644 --- a/packages/ra-ui-materialui/src/list/FilterButtonMenuItem.js +++ b/packages/ra-ui-materialui/src/list/FilterButtonMenuItem.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { MenuItem } from 'material-ui/Menu'; +import MenuItem from '@material-ui/core/MenuItem'; import { FieldTitle } from 'ra-core'; class FilterButtonMenuItem extends Component { diff --git a/packages/ra-ui-materialui/src/list/FilterForm.js b/packages/ra-ui-materialui/src/list/FilterForm.js index dd87a06a7b3..028a052d297 100644 --- a/packages/ra-ui-materialui/src/list/FilterForm.js +++ b/packages/ra-ui-materialui/src/list/FilterForm.js @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { reduxForm } from 'redux-form'; -import { CardContent } from 'material-ui/Card'; -import { withStyles } from 'material-ui/styles'; +import CardContent from '@material-ui/core/CardContent'; +import { withStyles } from '@material-ui/core/styles'; import compose from 'recompose/compose'; import withProps from 'recompose/withProps'; import lodashSet from 'lodash/set'; diff --git a/packages/ra-ui-materialui/src/list/FilterForm.spec.js b/packages/ra-ui-materialui/src/list/FilterForm.spec.js index 2b166b4bf0e..4792effe587 100644 --- a/packages/ra-ui-materialui/src/list/FilterForm.spec.js +++ b/packages/ra-ui-materialui/src/list/FilterForm.spec.js @@ -3,7 +3,7 @@ import { render } from 'enzyme'; import React from 'react'; import { createStore } from 'redux'; import { Provider } from 'react-redux'; -import { createMuiTheme, MuiThemeProvider } from 'material-ui/styles'; +import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles'; import { TranslationProvider } from 'ra-core'; import FilterForm, { mergeInitialValuesWithDefaultValues } from './FilterForm'; import TextInput from '../input/TextInput'; diff --git a/packages/ra-ui-materialui/src/list/FilterFormInput.js b/packages/ra-ui-materialui/src/list/FilterFormInput.js index bddd529ae54..390814f257f 100644 --- a/packages/ra-ui-materialui/src/list/FilterFormInput.js +++ b/packages/ra-ui-materialui/src/list/FilterFormInput.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Field } from 'redux-form'; -import IconButton from 'material-ui/IconButton'; +import IconButton from '@material-ui/core/IconButton'; import ActionHide from '@material-ui/icons/HighlightOff'; import classnames from 'classnames'; import { translate } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/list/List.js b/packages/ra-ui-materialui/src/list/List.js index ca2596fb3ce..ce6043acd46 100644 --- a/packages/ra-ui-materialui/src/list/List.js +++ b/packages/ra-ui-materialui/src/list/List.js @@ -1,10 +1,11 @@ /* eslint no-console: ["error", { allow: ["warn", "error"] }] */ import React from 'react'; import PropTypes from 'prop-types'; -import Card, { CardContent } from 'material-ui/Card'; -import Typography from 'material-ui/Typography'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import Typography from '@material-ui/core/Typography'; import classnames from 'classnames'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import Header from '../layout/Header'; import Title from '../layout/Title'; diff --git a/packages/ra-ui-materialui/src/list/Pagination.js b/packages/ra-ui-materialui/src/list/Pagination.js index 87a8568089b..bcbc324af20 100644 --- a/packages/ra-ui-materialui/src/list/Pagination.js +++ b/packages/ra-ui-materialui/src/list/Pagination.js @@ -1,11 +1,11 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import pure from 'recompose/pure'; -import Button from 'material-ui/Button'; -import IconButton from 'material-ui/IconButton'; -import Typography from 'material-ui/Typography'; -import Toolbar from 'material-ui/Toolbar'; -import { withStyles } from 'material-ui/styles'; +import Button from '@material-ui/core/Button'; +import IconButton from '@material-ui/core/IconButton'; +import Typography from '@material-ui/core/Typography'; +import Toolbar from '@material-ui/core/Toolbar'; +import { withStyles } from '@material-ui/core/styles'; import ChevronLeft from '@material-ui/icons/ChevronLeft'; import ChevronRight from '@material-ui/icons/ChevronRight'; import compose from 'recompose/compose'; diff --git a/packages/ra-ui-materialui/src/list/SimpleList.js b/packages/ra-ui-materialui/src/list/SimpleList.js index baa853f82b2..8733b10e478 100644 --- a/packages/ra-ui-materialui/src/list/SimpleList.js +++ b/packages/ra-ui-materialui/src/list/SimpleList.js @@ -1,14 +1,13 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Avatar from 'material-ui/Avatar'; -import List, { - ListItem, - ListItemAvatar, - ListItemIcon, - ListItemSecondaryAction, - ListItemText, -} from 'material-ui/List'; -import { withStyles } from 'material-ui/styles'; +import Avatar from '@material-ui/core/Avatar'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemAvatar from '@material-ui/core/ListItemAvatar'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; +import ListItemText from '@material-ui/core/ListItemText'; +import { withStyles } from '@material-ui/core/styles'; import { Link } from 'react-router-dom'; import { linkToRecord } from 'ra-core'; diff --git a/packages/ra-ui-materialui/src/list/SingleFieldList.js b/packages/ra-ui-materialui/src/list/SingleFieldList.js index c8a7fc925b9..78d7547c021 100644 --- a/packages/ra-ui-materialui/src/list/SingleFieldList.js +++ b/packages/ra-ui-materialui/src/list/SingleFieldList.js @@ -1,7 +1,7 @@ import React, { cloneElement, Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; -import { withStyles } from 'material-ui/styles'; +import { withStyles } from '@material-ui/core/styles'; import { linkToRecord } from 'ra-core'; import Link from '../Link'; diff --git a/packages/react-admin/README.md b/packages/react-admin/README.md index 0e6f104c79e..2cdd52fe90b 100644 --- a/packages/react-admin/README.md +++ b/packages/react-admin/README.md @@ -77,7 +77,7 @@ The `` component is a configuration component that allows to define su // in posts.js import React from 'react'; import { List, Datagrid, Edit, Create, SimpleForm, DateField, TextField, EditButton, DisabledInput, TextInput, LongTextInput, DateInput } from 'react-admin'; -export PostIcon from 'material-ui/svg-icons/action/book'; +export PostIcon from '@material-ui/core/svg-icons/action/book'; export const PostList = (props) => ( diff --git a/yarn.lock b/yarn.lock index 4f35dadf6a4..7b20f4356d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -85,11 +85,47 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@material-ui/icons@1.0.0-beta.43": - version "1.0.0-beta.43" - resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-1.0.0-beta.43.tgz#38bba799a4e575de7eced4bd10a0afbd546e9b47" +"@material-ui/codemod@^1.0.0-rc.0": + version "1.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@material-ui/codemod/-/codemod-1.0.0-rc.0.tgz#d3d96b90d1f960f41e99688e6fbf92e74d8084bb" + +"@material-ui/core@1.0.0-rc.0": + version "1.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-1.0.0-rc.0.tgz#8bd32a4e9c37bd5fa9227375a42fcced5e17cdfa" + dependencies: + "@babel/runtime" "^7.0.0-beta.42" + "@types/jss" "^9.5.3" + "@types/react-transition-group" "^2.0.8" + brcast "^3.0.1" + classnames "^2.2.5" + deepmerge "^2.0.1" + dom-helpers "^3.2.1" + hoist-non-react-statics "^2.5.0" + jss "^9.3.3" + jss-camel-case "^6.0.0" + jss-default-unit "^8.0.2" + jss-global "^3.0.0" + jss-nested "^6.0.1" + jss-props-sort "^6.0.0" + jss-vendor-prefixer "^7.0.0" + keycode "^2.1.9" + lodash "^4.2.0" + normalize-scroll-left "^0.1.2" + prop-types "^15.6.0" + react-event-listener "^0.5.1" + react-jss "^8.1.0" + react-popper "^0.10.0" + react-scrollbar-size "^2.0.2" + react-transition-group "^2.2.1" + recompose "^0.26.0 || ^0.27.0" + scroll "^2.0.3" + warning "^3.0.0" + +"@material-ui/icons@1.0.0-rc.0": + version "1.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-1.0.0-rc.0.tgz#1c836832183d509eaac9df42aa31dbbe4dd337cb" dependencies: - recompose "^0.26.0" + recompose "^0.26.0 || ^0.27.0" "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" @@ -118,9 +154,9 @@ version "0.0.34" resolved "https://registry.yarnpkg.com/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.34.tgz#3c3483e606c041378438e951464f00e4e60706d6" -"@types/jss@^9.3.0": - version "9.5.2" - resolved "https://registry.yarnpkg.com/@types/jss/-/jss-9.5.2.tgz#85076b2c16606a6f996aa7e20c1ec7ed6a08075f" +"@types/jss@^9.5.3": + version "9.5.3" + resolved "https://registry.yarnpkg.com/@types/jss/-/jss-9.5.3.tgz#0c106de3fe0b324cd4173fac7dab26c12cda624e" dependencies: csstype "^2.0.0" indefinite-observable "^1.0.1" @@ -2585,11 +2621,7 @@ core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0: - version "2.5.6" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d" - -core-js@^2.5.3: +core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0, core-js@^2.5.3: version "2.5.6" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d" @@ -6643,39 +6675,6 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -material-ui@1.0.0-beta.47: - version "1.0.0-beta.47" - resolved "https://registry.yarnpkg.com/material-ui/-/material-ui-1.0.0-beta.47.tgz#5deb97dc3e694299992d3c3cacb44051f8bc2166" - dependencies: - "@babel/runtime" "^7.0.0-beta.42" - "@types/jss" "^9.3.0" - "@types/react-transition-group" "^2.0.8" - brcast "^3.0.1" - classnames "^2.2.5" - deepmerge "^2.0.1" - dom-helpers "^3.2.1" - hoist-non-react-statics "^2.5.0" - jss "^9.3.3" - jss-camel-case "^6.0.0" - jss-default-unit "^8.0.2" - jss-global "^3.0.0" - jss-nested "^6.0.1" - jss-props-sort "^6.0.0" - jss-vendor-prefixer "^7.0.0" - keycode "^2.1.9" - lodash "^4.2.0" - normalize-scroll-left "^0.1.2" - prop-types "^15.6.0" - react-event-listener "^0.5.1" - react-jss "^8.1.0" - react-lifecycles-compat "^3.0.0" - react-popper "^0.10.0" - react-scrollbar-size "^2.0.2" - react-transition-group "^2.2.1" - recompose "^0.26.0 || ^0.27.0" - scroll "^2.0.3" - warning "^3.0.0" - math-expression-evaluator@^1.2.14: version "1.2.17" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" @@ -8498,7 +8497,7 @@ react-jss@^8.1.0: prop-types "^15.6.0" theming "^1.3.0" -react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.2: +react-lifecycles-compat@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.3.tgz#473820154732f1ccd762e89324abab154255da6b" @@ -8779,24 +8778,24 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -recompose@^0.26.0, recompose@~0.26.0: - version "0.26.0" - resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.26.0.tgz#9babff039cb72ba5bd17366d55d7232fbdfb2d30" +"recompose@^0.26.0 || ^0.27.0": + version "0.27.0" + resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.27.0.tgz#8230ebd651bf1159097006f79083fe224b1501cf" dependencies: + babel-runtime "^6.26.0" change-emitter "^0.1.2" fbjs "^0.8.1" hoist-non-react-statics "^2.3.1" + react-lifecycles-compat "^3.0.2" symbol-observable "^1.0.4" -"recompose@^0.26.0 || ^0.27.0": - version "0.27.0" - resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.27.0.tgz#8230ebd651bf1159097006f79083fe224b1501cf" +recompose@~0.26.0: + version "0.26.0" + resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.26.0.tgz#9babff039cb72ba5bd17366d55d7232fbdfb2d30" dependencies: - babel-runtime "^6.26.0" change-emitter "^0.1.2" fbjs "^0.8.1" hoist-non-react-statics "^2.3.1" - react-lifecycles-compat "^3.0.2" symbol-observable "^1.0.4" recursive-readdir@2.2.1: From 2168759c393e8c2187479bed5dbab054d6df460c Mon Sep 17 00:00:00 2001 From: Francois Zaninotto Date: Mon, 14 May 2018 09:51:37 +0200 Subject: [PATCH 2/2] Update peerDependencies of packages depending on mui --- packages/ra-ui-materialui/package.json | 4 ++-- packages/react-admin/package.json | 18 ++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/packages/ra-ui-materialui/package.json b/packages/ra-ui-materialui/package.json index 6387db7a36e..3bf59051e33 100644 --- a/packages/ra-ui-materialui/package.json +++ b/packages/ra-ui-materialui/package.json @@ -20,8 +20,8 @@ "react-test-renderer": "~16.3.1" }, "peerDependencies": { - "react": "~16.0.0 || ~16.1.0 || ~16.2.0 || ~16.3.0", - "react-dom": "~16.0.0 || ~16.1.0 || ~16.2.0 || ~16.3.0" + "react": "~16.3.0", + "react-dom": "~16.3.0" }, "dependencies": { "@material-ui/core": "1.0.0-rc.0", diff --git a/packages/react-admin/package.json b/packages/react-admin/package.json index b0c76b7f811..d14e1b1396e 100644 --- a/packages/react-admin/package.json +++ b/packages/react-admin/package.json @@ -1,24 +1,18 @@ { "name": "react-admin", "version": "2.0.0-RC3", - "description": "A frontend Framework for building admin applications on top of REST services, using ES6, React and Material UI", - "files": [ - "*.md", - "lib", - "src", - "docs" - ], + "description": + "A frontend Framework for building admin applications on top of REST services, using ES6, React and Material UI", + "files": ["*.md", "lib", "src", "docs"], "main": "lib/index", - "authors": [ - "François Zaninotto" - ], + "authors": ["François Zaninotto"], "repository": "marmelab/react-admin", "homepage": "https://github.com/marmelab/react-admin#readme", "bugs": "https://github.com/marmelab/react-admin/issues", "license": "MIT", "peerDependencies": { - "react": "~16.0.0 || ~16.1.0 || ~16.2.0 || ~16.3.0", - "react-dom": "~16.0.0 || ~16.1.0 || ~16.2.0 || ~16.3.0" + "react": "~16.3.0", + "react-dom": "~16.3.0" }, "dependencies": { "ra-core": "^2.0.0-RC3",