diff --git a/docs/scripts/buildApi.js b/docs/scripts/buildApi.js index ed72a3950c52c8..679ea2189803f6 100644 --- a/docs/scripts/buildApi.js +++ b/docs/scripts/buildApi.js @@ -142,6 +142,7 @@ function buildDocs(options) { reactAPI.pagesMarkdown = pagesMarkdown; reactAPI.src = src; reactAPI.spread = spread; + reactAPI.props = reactAPI.props || {}; // if (reactAPI.name !== 'TableCell') { // return; diff --git a/packages/material-ui/src/GridList/GridList.d.ts b/packages/material-ui/src/GridList/GridList.d.ts new file mode 100644 index 00000000000000..600b31af9476ca --- /dev/null +++ b/packages/material-ui/src/GridList/GridList.d.ts @@ -0,0 +1,16 @@ +import * as React from 'react'; +import { StandardProps } from '..'; + +export interface GridListProps + extends StandardProps, GridListClassKey> { + cellHeight?: number | 'auto'; + cols?: number; + component?: React.ElementType; + spacing?: number; +} + +export type GridListClassKey = 'root'; + +declare const GridList: React.ComponentType; + +export default GridList; diff --git a/packages/material-ui/src/GridList/GridList.js b/packages/material-ui/src/GridList/GridList.js new file mode 100644 index 00000000000000..e90d611b647e47 --- /dev/null +++ b/packages/material-ui/src/GridList/GridList.js @@ -0,0 +1,19 @@ +// @inheritedComponent GridList + +import React from 'react'; +import warning from 'warning'; +import ImageList from '../ImageList'; + +/** + * Deprecated, use ImageList instead. + */ +export default function GridList(props) { + warning( + false, + [ + 'Material-UI: the GridList component is deprecated.', + 'The component was renamed to ImageList.', + ].join('\n'), + ); + return ; +} diff --git a/packages/material-ui/src/GridList/index.d.ts b/packages/material-ui/src/GridList/index.d.ts new file mode 100644 index 00000000000000..ccb08b003a8dbd --- /dev/null +++ b/packages/material-ui/src/GridList/index.d.ts @@ -0,0 +1,2 @@ +export { default } from './GridList'; +export * from './GridList'; diff --git a/packages/material-ui/src/GridList/index.js b/packages/material-ui/src/GridList/index.js new file mode 100644 index 00000000000000..b31386ab5ae4dc --- /dev/null +++ b/packages/material-ui/src/GridList/index.js @@ -0,0 +1 @@ +export { default } from './GridList'; diff --git a/packages/material-ui/src/GridListTile/GridListTile.d.ts b/packages/material-ui/src/GridListTile/GridListTile.d.ts new file mode 100644 index 00000000000000..bfd7a66173f0f6 --- /dev/null +++ b/packages/material-ui/src/GridListTile/GridListTile.d.ts @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { StandardProps } from '..'; + +export interface GridListTileProps + extends StandardProps, GridListTileClassKey> { + cols?: number; + component?: React.ElementType; + rows?: number; +} + +export type GridListTileClassKey = 'root' | 'tile' | 'imgFullHeight' | 'imgFullWidth'; + +declare const GridListTile: React.ComponentType; + +export default GridListTile; diff --git a/packages/material-ui/src/GridListTile/GridListTile.js b/packages/material-ui/src/GridListTile/GridListTile.js new file mode 100644 index 00000000000000..51467ac12ab371 --- /dev/null +++ b/packages/material-ui/src/GridListTile/GridListTile.js @@ -0,0 +1,19 @@ +// @inheritedComponent GridListTile + +import React from 'react'; +import warning from 'warning'; +import ImageListTile from '../ImageListTile'; + +/** + * Deprecated, use ImageListTile instead. + */ +export default function GridListTile(props) { + warning( + false, + [ + 'Material-UI: the GridListTile component is deprecated.', + 'The component was renamed to ImageListTile.', + ].join('\n'), + ); + return ; +} diff --git a/packages/material-ui/src/GridListTile/index.d.ts b/packages/material-ui/src/GridListTile/index.d.ts new file mode 100644 index 00000000000000..25a1add1cf5966 --- /dev/null +++ b/packages/material-ui/src/GridListTile/index.d.ts @@ -0,0 +1,2 @@ +export { default } from './GridListTile'; +export * from './GridListTile'; diff --git a/packages/material-ui/src/GridListTile/index.js b/packages/material-ui/src/GridListTile/index.js new file mode 100644 index 00000000000000..a2f96968c37576 --- /dev/null +++ b/packages/material-ui/src/GridListTile/index.js @@ -0,0 +1 @@ +export { default } from './GridListTile'; diff --git a/packages/material-ui/src/GridListTileBar/GridListTileBar.d.ts b/packages/material-ui/src/GridListTileBar/GridListTileBar.d.ts new file mode 100644 index 00000000000000..3565c3009c3a1d --- /dev/null +++ b/packages/material-ui/src/GridListTileBar/GridListTileBar.d.ts @@ -0,0 +1,27 @@ +import * as React from 'react'; +import { StandardProps } from '..'; + +export interface GridListTileBarProps extends StandardProps<{}, GridListTileBarClassKey> { + actionIcon?: React.ReactNode; + actionPosition?: 'left' | 'right'; + subtitle?: React.ReactNode; + title?: React.ReactNode; + titlePosition?: 'top' | 'bottom'; +} + +export type GridListTileBarClassKey = + | 'root' + | 'titlePositionBottom' + | 'titlePositionTop' + | 'rootSubtitle' + | 'titleWrap' + | 'titleWrapActionPosLeft' + | 'titleWrapActionPosRight' + | 'title' + | 'subtitle' + | 'actionIcon' + | 'actionIconActionPosLeft'; + +declare const GridListTileBar: React.ComponentType; + +export default GridListTileBar; diff --git a/packages/material-ui/src/GridListTileBar/GridListTileBar.js b/packages/material-ui/src/GridListTileBar/GridListTileBar.js new file mode 100644 index 00000000000000..f8e8f413582586 --- /dev/null +++ b/packages/material-ui/src/GridListTileBar/GridListTileBar.js @@ -0,0 +1,19 @@ +// @inheritedComponent GridListTileBar + +import React from 'react'; +import warning from 'warning'; +import ImageListTileBar from '../ImageListTileBar'; + +/** + * Deprecated, use ImageListTileBar instead. + */ +export default function GridListTileBar(props) { + warning( + false, + [ + 'Material-UI: the GridListTileBar component is deprecated.', + 'The component was renamed to ImageListTileBar.', + ].join('\n'), + ); + return ; +} diff --git a/packages/material-ui/src/GridListTileBar/index.d.ts b/packages/material-ui/src/GridListTileBar/index.d.ts new file mode 100644 index 00000000000000..3ecc2f66424d24 --- /dev/null +++ b/packages/material-ui/src/GridListTileBar/index.d.ts @@ -0,0 +1,2 @@ +export { default } from './GridListTileBar'; +export * from './GridListTileBar'; diff --git a/packages/material-ui/src/GridListTileBar/index.js b/packages/material-ui/src/GridListTileBar/index.js new file mode 100644 index 00000000000000..5b368926b920fc --- /dev/null +++ b/packages/material-ui/src/GridListTileBar/index.js @@ -0,0 +1 @@ +export { default } from './GridListTileBar'; diff --git a/packages/material-ui/src/index.d.ts b/packages/material-ui/src/index.d.ts index 2e7c42514a405f..3508e83e26e869 100644 --- a/packages/material-ui/src/index.d.ts +++ b/packages/material-ui/src/index.d.ts @@ -140,6 +140,9 @@ export { default as FormGroup } from './FormGroup'; export { default as FormHelperText } from './FormHelperText'; export { default as FormLabel } from './FormLabel'; export { default as Grid } from './Grid'; +export { default as GridList } from './GridList'; +export { default as GridListTile } from './GridListTile'; +export { default as GridListTileBar } from './GridListTileBar'; export { default as Grow } from './Grow'; export { default as Hidden } from './Hidden'; export { default as Icon } from './Icon'; diff --git a/packages/material-ui/src/index.js b/packages/material-ui/src/index.js index 59dbe79eef5eeb..1028d28a0215b7 100644 --- a/packages/material-ui/src/index.js +++ b/packages/material-ui/src/index.js @@ -51,6 +51,9 @@ export { default as FormGroup } from './FormGroup'; export { default as FormHelperText } from './FormHelperText'; export { default as FormLabel } from './FormLabel'; export { default as Grid } from './Grid'; +export { default as GridList } from './GridList'; +export { default as GridListTile } from './GridListTile'; +export { default as GridListTileBar } from './GridListTileBar'; export { default as Grow } from './Grow'; export { default as Hidden } from './Hidden'; export { default as Icon } from './Icon'; diff --git a/packages/material-ui/src/styles/overrides.d.ts b/packages/material-ui/src/styles/overrides.d.ts index ac6dd4774e15b1..b1714d8f95c435 100644 --- a/packages/material-ui/src/styles/overrides.d.ts +++ b/packages/material-ui/src/styles/overrides.d.ts @@ -38,6 +38,9 @@ import { FormGroupClassKey } from '../FormGroup'; import { FormHelperTextClassKey } from '../FormHelperText'; import { FormLabelClassKey } from '../FormLabel'; import { GridClassKey } from '../Grid'; +import { GridListClassKey } from '../GridList'; +import { GridListTileClassKey } from '../GridListTile'; +import { GridListTileBarClassKey } from '../GridListTileBar'; import { IconButtonClassKey } from '../IconButton'; import { IconClassKey } from '../Icon'; import { ImageListClassKey } from '../ImageList'; diff --git a/packages/material-ui/src/styles/props.d.ts b/packages/material-ui/src/styles/props.d.ts index efb34e8e5445e7..03b43eed4fa019 100644 --- a/packages/material-ui/src/styles/props.d.ts +++ b/packages/material-ui/src/styles/props.d.ts @@ -33,6 +33,9 @@ import { FormGroupProps } from '../FormGroup'; import { FormHelperTextProps } from '../FormHelperText'; import { FormLabelProps } from '../FormLabel'; import { GridProps } from '../Grid'; +import { GridListProps } from '../GridList'; +import { GridListTileBarProps } from '../GridListTileBar'; +import { GridListTileProps } from '../GridListTile'; import { IconButtonProps } from '../IconButton'; import { IconProps } from '../Icon'; import { ImageListProps } from '../ImageList'; @@ -127,6 +130,9 @@ export interface ComponentsPropsList { MuiFormHelperText: FormHelperTextProps; MuiFormLabel: FormLabelProps; MuiGrid: GridProps; + MuiGridList: GridListProps; + MuiGridListTile: GridListTileProps; + MuiGridListTileBar: GridListTileBarProps; MuiIcon: IconProps; MuiIconButton: IconButtonProps; MuiImageList: ImageListProps; diff --git a/pages/api/grid-list-tile-bar.js b/pages/api/grid-list-tile-bar.js new file mode 100644 index 00000000000000..dfd626349367a4 --- /dev/null +++ b/pages/api/grid-list-tile-bar.js @@ -0,0 +1,11 @@ +import 'docs/src/modules/components/bootstrap'; +// --- Post bootstrap ----- +import React from 'react'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; +import markdown from './grid-list-tile-bar.md'; + +function Page() { + return ; +} + +export default Page; diff --git a/pages/api/grid-list-tile-bar.md b/pages/api/grid-list-tile-bar.md new file mode 100644 index 00000000000000..725508a6b300b9 --- /dev/null +++ b/pages/api/grid-list-tile-bar.md @@ -0,0 +1,28 @@ +--- +filename: /packages/material-ui/src/GridListTileBar/GridListTileBar.js +--- + + + +# GridListTileBar API + +

The API documentation of the GridListTileBar React component. Learn more about the properties and the CSS customization points.

+ +```js +import GridListTileBar from '@material-ui/core/GridListTileBar'; +``` + +Deprecated, use ImageListTileBar instead. + +## Props + +| Name | Type | Default | Description | +|:-----|:-----|:--------|:------------| + +Any other properties supplied will be spread to the root element ([GridListTileBar](/api/grid-list-tile-bar/)). + +## Inheritance + +The properties of the [GridListTileBar](/api/grid-list-tile-bar/) component are also available. +You can take advantage of this behavior to [target nested components](/guides/api/#spread). + diff --git a/pages/api/grid-list-tile.js b/pages/api/grid-list-tile.js new file mode 100644 index 00000000000000..17b9d80fc289e0 --- /dev/null +++ b/pages/api/grid-list-tile.js @@ -0,0 +1,11 @@ +import 'docs/src/modules/components/bootstrap'; +// --- Post bootstrap ----- +import React from 'react'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; +import markdown from './grid-list-tile.md'; + +function Page() { + return ; +} + +export default Page; diff --git a/pages/api/grid-list-tile.md b/pages/api/grid-list-tile.md new file mode 100644 index 00000000000000..74c96a7252891d --- /dev/null +++ b/pages/api/grid-list-tile.md @@ -0,0 +1,28 @@ +--- +filename: /packages/material-ui/src/GridListTile/GridListTile.js +--- + + + +# GridListTile API + +

The API documentation of the GridListTile React component. Learn more about the properties and the CSS customization points.

+ +```js +import GridListTile from '@material-ui/core/GridListTile'; +``` + +Deprecated, use ImageListTile instead. + +## Props + +| Name | Type | Default | Description | +|:-----|:-----|:--------|:------------| + +Any other properties supplied will be spread to the root element ([GridListTile](/api/grid-list-tile/)). + +## Inheritance + +The properties of the [GridListTile](/api/grid-list-tile/) component are also available. +You can take advantage of this behavior to [target nested components](/guides/api/#spread). + diff --git a/pages/api/grid-list.js b/pages/api/grid-list.js new file mode 100644 index 00000000000000..7b706a4645091a --- /dev/null +++ b/pages/api/grid-list.js @@ -0,0 +1,11 @@ +import 'docs/src/modules/components/bootstrap'; +// --- Post bootstrap ----- +import React from 'react'; +import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; +import markdown from './grid-list.md'; + +function Page() { + return ; +} + +export default Page; diff --git a/pages/api/grid-list.md b/pages/api/grid-list.md new file mode 100644 index 00000000000000..a2332e0c88fe50 --- /dev/null +++ b/pages/api/grid-list.md @@ -0,0 +1,28 @@ +--- +filename: /packages/material-ui/src/GridList/GridList.js +--- + + + +# GridList API + +

The API documentation of the GridList React component. Learn more about the properties and the CSS customization points.

+ +```js +import GridList from '@material-ui/core/GridList'; +``` + +Deprecated, use ImageList instead. + +## Props + +| Name | Type | Default | Description | +|:-----|:-----|:--------|:------------| + +Any other properties supplied will be spread to the root element ([GridList](/api/grid-list/)). + +## Inheritance + +The properties of the [GridList](/api/grid-list/) component are also available. +You can take advantage of this behavior to [target nested components](/guides/api/#spread). +