diff --git a/docs/data/material/components/grid-legacy/AutoGrid.js b/docs/data/material/components/grid-legacy/AutoGrid.js deleted file mode 100644 index 6e89794ba7196c..00000000000000 --- a/docs/data/material/components/grid-legacy/AutoGrid.js +++ /dev/null @@ -1,33 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function AutoGrid() { - return ( - - - - xs - - - xs=6 - - - xs - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/AutoGrid.tsx b/docs/data/material/components/grid-legacy/AutoGrid.tsx deleted file mode 100644 index 6e89794ba7196c..00000000000000 --- a/docs/data/material/components/grid-legacy/AutoGrid.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function AutoGrid() { - return ( - - - - xs - - - xs=6 - - - xs - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/AutoGrid.tsx.preview b/docs/data/material/components/grid-legacy/AutoGrid.tsx.preview deleted file mode 100644 index 6e5f1717d57fa3..00000000000000 --- a/docs/data/material/components/grid-legacy/AutoGrid.tsx.preview +++ /dev/null @@ -1,11 +0,0 @@ - - - xs - - - xs=6 - - - xs - - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/AutoGridNoWrap.js b/docs/data/material/components/grid-legacy/AutoGridNoWrap.js deleted file mode 100644 index bc806faad045c3..00000000000000 --- a/docs/data/material/components/grid-legacy/AutoGridNoWrap.js +++ /dev/null @@ -1,57 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; -import Avatar from '@mui/material/Avatar'; -import Typography from '@mui/material/Typography'; - -const StyledPaper = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(2), - maxWidth: 400, - color: (theme.vars ?? theme).palette.text.primary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -const message = `Truncation should be conditionally applicable on this long line of text - as this is a much longer line than what the container can support. `; - -export default function AutoGridNoWrap() { - return ( - - - - - W - - - {message} - - - - - - - W - - - {message} - - - - - - - W - - - {message} - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/AutoGridNoWrap.tsx b/docs/data/material/components/grid-legacy/AutoGridNoWrap.tsx deleted file mode 100644 index bc806faad045c3..00000000000000 --- a/docs/data/material/components/grid-legacy/AutoGridNoWrap.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; -import Avatar from '@mui/material/Avatar'; -import Typography from '@mui/material/Typography'; - -const StyledPaper = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(2), - maxWidth: 400, - color: (theme.vars ?? theme).palette.text.primary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -const message = `Truncation should be conditionally applicable on this long line of text - as this is a much longer line than what the container can support. `; - -export default function AutoGridNoWrap() { - return ( - - - - - W - - - {message} - - - - - - - W - - - {message} - - - - - - - W - - - {message} - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/BasicGrid.js b/docs/data/material/components/grid-legacy/BasicGrid.js deleted file mode 100644 index db26e76e3058f0..00000000000000 --- a/docs/data/material/components/grid-legacy/BasicGrid.js +++ /dev/null @@ -1,36 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function BasicGrid() { - return ( - - - - xs=8 - - - xs=4 - - - xs=4 - - - xs=8 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/BasicGrid.tsx b/docs/data/material/components/grid-legacy/BasicGrid.tsx deleted file mode 100644 index db26e76e3058f0..00000000000000 --- a/docs/data/material/components/grid-legacy/BasicGrid.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function BasicGrid() { - return ( - - - - xs=8 - - - xs=4 - - - xs=4 - - - xs=8 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/BasicGrid.tsx.preview b/docs/data/material/components/grid-legacy/BasicGrid.tsx.preview deleted file mode 100644 index 4f5fbe62bffba7..00000000000000 --- a/docs/data/material/components/grid-legacy/BasicGrid.tsx.preview +++ /dev/null @@ -1,14 +0,0 @@ - - - xs=8 - - - xs=4 - - - xs=4 - - - xs=8 - - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/CSSGrid.js b/docs/data/material/components/grid-legacy/CSSGrid.js deleted file mode 100644 index 6e6745b7a42f63..00000000000000 --- a/docs/data/material/components/grid-legacy/CSSGrid.js +++ /dev/null @@ -1,35 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function CSSGrid() { - return ( - - - - xs=8 - - - xs=4 - - - xs=4 - - - xs=8 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/CSSGrid.tsx b/docs/data/material/components/grid-legacy/CSSGrid.tsx deleted file mode 100644 index 6e6745b7a42f63..00000000000000 --- a/docs/data/material/components/grid-legacy/CSSGrid.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function CSSGrid() { - return ( - - - - xs=8 - - - xs=4 - - - xs=4 - - - xs=8 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/CSSGrid.tsx.preview b/docs/data/material/components/grid-legacy/CSSGrid.tsx.preview deleted file mode 100644 index e0a55118f7e4e4..00000000000000 --- a/docs/data/material/components/grid-legacy/CSSGrid.tsx.preview +++ /dev/null @@ -1,14 +0,0 @@ - - - xs=8 - - - xs=4 - - - xs=4 - - - xs=8 - - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/ColumnsGrid.js b/docs/data/material/components/grid-legacy/ColumnsGrid.js deleted file mode 100644 index 3254c529e46d24..00000000000000 --- a/docs/data/material/components/grid-legacy/ColumnsGrid.js +++ /dev/null @@ -1,30 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function ColumnsGrid() { - return ( - - - - xs=8 - - - xs=8 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/ColumnsGrid.tsx b/docs/data/material/components/grid-legacy/ColumnsGrid.tsx deleted file mode 100644 index 3254c529e46d24..00000000000000 --- a/docs/data/material/components/grid-legacy/ColumnsGrid.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function ColumnsGrid() { - return ( - - - - xs=8 - - - xs=8 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/ColumnsGrid.tsx.preview b/docs/data/material/components/grid-legacy/ColumnsGrid.tsx.preview deleted file mode 100644 index 1e18f8528f5594..00000000000000 --- a/docs/data/material/components/grid-legacy/ColumnsGrid.tsx.preview +++ /dev/null @@ -1,8 +0,0 @@ - - - xs=8 - - - xs=8 - - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/ComplexGrid.js b/docs/data/material/components/grid-legacy/ComplexGrid.js deleted file mode 100644 index e565f3933875cc..00000000000000 --- a/docs/data/material/components/grid-legacy/ComplexGrid.js +++ /dev/null @@ -1,62 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Grid from '@mui/material/GridLegacy'; -import Paper from '@mui/material/Paper'; -import Typography from '@mui/material/Typography'; -import ButtonBase from '@mui/material/ButtonBase'; - -const Img = styled('img')({ - margin: 'auto', - display: 'block', - maxWidth: '100%', - maxHeight: '100%', -}); - -export default function ComplexGrid() { - return ( - ({ - p: 2, - margin: 'auto', - maxWidth: 500, - flexGrow: 1, - backgroundColor: '#fff', - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), - })} - > - - - - complex - - - - - - - Standard license - - - Full resolution 1920x1080 • JPEG - - - ID: 1030114 - - - - - Remove - - - - - - $19.00 - - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/ComplexGrid.tsx b/docs/data/material/components/grid-legacy/ComplexGrid.tsx deleted file mode 100644 index e565f3933875cc..00000000000000 --- a/docs/data/material/components/grid-legacy/ComplexGrid.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Grid from '@mui/material/GridLegacy'; -import Paper from '@mui/material/Paper'; -import Typography from '@mui/material/Typography'; -import ButtonBase from '@mui/material/ButtonBase'; - -const Img = styled('img')({ - margin: 'auto', - display: 'block', - maxWidth: '100%', - maxHeight: '100%', -}); - -export default function ComplexGrid() { - return ( - ({ - p: 2, - margin: 'auto', - maxWidth: 500, - flexGrow: 1, - backgroundColor: '#fff', - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), - })} - > - - - - complex - - - - - - - Standard license - - - Full resolution 1920x1080 • JPEG - - - ID: 1030114 - - - - - Remove - - - - - - $19.00 - - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/FullWidthGrid.js b/docs/data/material/components/grid-legacy/FullWidthGrid.js deleted file mode 100644 index d13a33b09e6d44..00000000000000 --- a/docs/data/material/components/grid-legacy/FullWidthGrid.js +++ /dev/null @@ -1,36 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function FullWidthGrid() { - return ( - - - - xs=6 md=8 - - - xs=6 md=4 - - - xs=6 md=4 - - - xs=6 md=8 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/FullWidthGrid.tsx b/docs/data/material/components/grid-legacy/FullWidthGrid.tsx deleted file mode 100644 index d13a33b09e6d44..00000000000000 --- a/docs/data/material/components/grid-legacy/FullWidthGrid.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function FullWidthGrid() { - return ( - - - - xs=6 md=8 - - - xs=6 md=4 - - - xs=6 md=4 - - - xs=6 md=8 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/FullWidthGrid.tsx.preview b/docs/data/material/components/grid-legacy/FullWidthGrid.tsx.preview deleted file mode 100644 index 5ce81b8bbeaec9..00000000000000 --- a/docs/data/material/components/grid-legacy/FullWidthGrid.tsx.preview +++ /dev/null @@ -1,14 +0,0 @@ - - - xs=6 md=8 - - - xs=6 md=4 - - - xs=6 md=4 - - - xs=6 md=8 - - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/InteractiveGrid.js b/docs/data/material/components/grid-legacy/InteractiveGrid.js deleted file mode 100644 index 640ba909f3ff4f..00000000000000 --- a/docs/data/material/components/grid-legacy/InteractiveGrid.js +++ /dev/null @@ -1,184 +0,0 @@ -import * as React from 'react'; -import Grid from '@mui/material/GridLegacy'; -import FormControl from '@mui/material/FormControl'; -import FormLabel from '@mui/material/FormLabel'; -import FormControlLabel from '@mui/material/FormControlLabel'; -import RadioGroup from '@mui/material/RadioGroup'; -import Radio from '@mui/material/Radio'; -import Paper from '@mui/material/Paper'; -import { HighlightedCode } from '@mui/docs/HighlightedCode'; - -export default function InteractiveGrid() { - const [direction, setDirection] = React.useState('row'); - const [justifyContent, setJustifyContent] = React.useState('center'); - const [alignItems, setAlignItems] = React.useState('center'); - - const jsx = ` - -`; - - return ( - - - - {[0, 1, 2].map((value) => ( - - ({ - p: 2, - backgroundColor: '#fff', - height: '100%', - color: 'text.secondary', - pt: `${(value + 1) * 10}px`, - pb: `${(value + 1) * 10}px`, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), - })} - > - {`Cell ${value + 1}`} - - - ))} - - - - - - - - direction - { - setDirection(event.target.value); - }} - > - } label="row" /> - } - label="row-reverse" - /> - } - label="column" - /> - } - label="column-reverse" - /> - - - - - - justifyContent - { - setJustifyContent(event.target.value); - }} - > - } - label="flex-start" - /> - } - label="center" - /> - } - label="flex-end" - /> - } - label="space-between" - /> - } - label="space-around" - /> - } - label="space-evenly" - /> - - - - - - alignItems - { - setAlignItems(event.target.value); - }} - > - } - label="flex-start" - /> - } - label="center" - /> - } - label="flex-end" - /> - } - label="stretch" - /> - } - label="baseline" - /> - - - - - - - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/InteractiveGrid.tsx b/docs/data/material/components/grid-legacy/InteractiveGrid.tsx deleted file mode 100644 index 681e2ba4a8bd15..00000000000000 --- a/docs/data/material/components/grid-legacy/InteractiveGrid.tsx +++ /dev/null @@ -1,207 +0,0 @@ -import * as React from 'react'; -import Grid, { GridLegacyDirection } from '@mui/material/GridLegacy'; -import FormControl from '@mui/material/FormControl'; -import FormLabel from '@mui/material/FormLabel'; -import FormControlLabel from '@mui/material/FormControlLabel'; -import RadioGroup from '@mui/material/RadioGroup'; -import Radio from '@mui/material/Radio'; -import Paper from '@mui/material/Paper'; -import { HighlightedCode } from '@mui/docs/HighlightedCode'; - -type GridItemsAlignment = - | 'flex-start' - | 'center' - | 'flex-end' - | 'stretch' - | 'baseline'; - -type GridJustification = - | 'flex-start' - | 'center' - | 'flex-end' - | 'space-between' - | 'space-around' - | 'space-evenly'; - -export default function InteractiveGrid() { - const [direction, setDirection] = React.useState('row'); - const [justifyContent, setJustifyContent] = - React.useState('center'); - const [alignItems, setAlignItems] = React.useState('center'); - - const jsx = ` - -`; - - return ( - - - - {[0, 1, 2].map((value) => ( - - ({ - p: 2, - backgroundColor: '#fff', - height: '100%', - color: 'text.secondary', - pt: `${(value + 1) * 10}px`, - pb: `${(value + 1) * 10}px`, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), - })} - > - {`Cell ${value + 1}`} - - - ))} - - - - - - - - direction - { - setDirection( - (event.target as HTMLInputElement) - .value as GridLegacyDirection, - ); - }} - > - } label="row" /> - } - label="row-reverse" - /> - } - label="column" - /> - } - label="column-reverse" - /> - - - - - - justifyContent - { - setJustifyContent( - (event.target as HTMLInputElement).value as GridJustification, - ); - }} - > - } - label="flex-start" - /> - } - label="center" - /> - } - label="flex-end" - /> - } - label="space-between" - /> - } - label="space-around" - /> - } - label="space-evenly" - /> - - - - - - alignItems - { - setAlignItems( - (event.target as HTMLInputElement).value as GridItemsAlignment, - ); - }} - > - } - label="flex-start" - /> - } - label="center" - /> - } - label="flex-end" - /> - } - label="stretch" - /> - } - label="baseline" - /> - - - - - - - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/NestedGrid.js b/docs/data/material/components/grid-legacy/NestedGrid.js deleted file mode 100644 index 1c224336c1ef51..00000000000000 --- a/docs/data/material/components/grid-legacy/NestedGrid.js +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from 'react'; -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -function FormRow() { - return ( - - - Item - - - Item - - - Item - - - ); -} - -export default function NestedGrid() { - return ( - - - - - - - - - - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/NestedGrid.tsx b/docs/data/material/components/grid-legacy/NestedGrid.tsx deleted file mode 100644 index 1c224336c1ef51..00000000000000 --- a/docs/data/material/components/grid-legacy/NestedGrid.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from 'react'; -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -function FormRow() { - return ( - - - Item - - - Item - - - Item - - - ); -} - -export default function NestedGrid() { - return ( - - - - - - - - - - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/NestedGrid.tsx.preview b/docs/data/material/components/grid-legacy/NestedGrid.tsx.preview deleted file mode 100644 index 970ac4ff951a5e..00000000000000 --- a/docs/data/material/components/grid-legacy/NestedGrid.tsx.preview +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/ResponsiveGrid.js b/docs/data/material/components/grid-legacy/ResponsiveGrid.js deleted file mode 100644 index ac3c1dc1c627fe..00000000000000 --- a/docs/data/material/components/grid-legacy/ResponsiveGrid.js +++ /dev/null @@ -1,29 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(2), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function ResponsiveGrid() { - return ( - - - {Array.from(Array(6)).map((_, index) => ( - - xs=2 - - ))} - - - ); -} diff --git a/docs/data/material/components/grid-legacy/ResponsiveGrid.tsx b/docs/data/material/components/grid-legacy/ResponsiveGrid.tsx deleted file mode 100644 index ac3c1dc1c627fe..00000000000000 --- a/docs/data/material/components/grid-legacy/ResponsiveGrid.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(2), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function ResponsiveGrid() { - return ( - - - {Array.from(Array(6)).map((_, index) => ( - - xs=2 - - ))} - - - ); -} diff --git a/docs/data/material/components/grid-legacy/ResponsiveGrid.tsx.preview b/docs/data/material/components/grid-legacy/ResponsiveGrid.tsx.preview deleted file mode 100644 index f5e746fc44fe91..00000000000000 --- a/docs/data/material/components/grid-legacy/ResponsiveGrid.tsx.preview +++ /dev/null @@ -1,7 +0,0 @@ - - {Array.from(Array(6)).map((_, index) => ( - - xs=2 - - ))} - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/RowAndColumnSpacing.js b/docs/data/material/components/grid-legacy/RowAndColumnSpacing.js deleted file mode 100644 index a8182890e453ca..00000000000000 --- a/docs/data/material/components/grid-legacy/RowAndColumnSpacing.js +++ /dev/null @@ -1,36 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Grid from '@mui/material/GridLegacy'; -import Paper from '@mui/material/Paper'; -import Box from '@mui/material/Box'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function RowAndColumnSpacing() { - return ( - - - - 1 - - - 2 - - - 3 - - - 4 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/RowAndColumnSpacing.tsx b/docs/data/material/components/grid-legacy/RowAndColumnSpacing.tsx deleted file mode 100644 index a8182890e453ca..00000000000000 --- a/docs/data/material/components/grid-legacy/RowAndColumnSpacing.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Grid from '@mui/material/GridLegacy'; -import Paper from '@mui/material/Paper'; -import Box from '@mui/material/Box'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function RowAndColumnSpacing() { - return ( - - - - 1 - - - 2 - - - 3 - - - 4 - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/RowAndColumnSpacing.tsx.preview b/docs/data/material/components/grid-legacy/RowAndColumnSpacing.tsx.preview deleted file mode 100644 index 50501e68913f47..00000000000000 --- a/docs/data/material/components/grid-legacy/RowAndColumnSpacing.tsx.preview +++ /dev/null @@ -1,14 +0,0 @@ - - - 1 - - - 2 - - - 3 - - - 4 - - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/SpacingGrid.js b/docs/data/material/components/grid-legacy/SpacingGrid.js deleted file mode 100644 index 4a0a16c7b4cf80..00000000000000 --- a/docs/data/material/components/grid-legacy/SpacingGrid.js +++ /dev/null @@ -1,72 +0,0 @@ -import * as React from 'react'; -import Grid from '@mui/material/GridLegacy'; -import FormLabel from '@mui/material/FormLabel'; -import FormControl from '@mui/material/FormControl'; -import FormControlLabel from '@mui/material/FormControlLabel'; -import RadioGroup from '@mui/material/RadioGroup'; -import Radio from '@mui/material/Radio'; -import Paper from '@mui/material/Paper'; -import { HighlightedCode } from '@mui/docs/HighlightedCode'; - -export default function SpacingGrid() { - const [spacing, setSpacing] = React.useState(2); - - const handleChange = (event) => { - setSpacing(Number(event.target.value)); - }; - - const jsx = ` - -`; - - return ( - - - - {[0, 1, 2].map((value) => ( - - ({ - height: 140, - width: 100, - backgroundColor: '#fff', - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), - })} - /> - - ))} - - - - - - - - spacing - - {[0, 0.5, 1, 2, 3, 4, 8, 12].map((value) => ( - } - label={value.toString()} - /> - ))} - - - - - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/SpacingGrid.tsx b/docs/data/material/components/grid-legacy/SpacingGrid.tsx deleted file mode 100644 index f424eb7ca16217..00000000000000 --- a/docs/data/material/components/grid-legacy/SpacingGrid.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import * as React from 'react'; -import Grid from '@mui/material/GridLegacy'; -import FormLabel from '@mui/material/FormLabel'; -import FormControl from '@mui/material/FormControl'; -import FormControlLabel from '@mui/material/FormControlLabel'; -import RadioGroup from '@mui/material/RadioGroup'; -import Radio from '@mui/material/Radio'; -import Paper from '@mui/material/Paper'; -import { HighlightedCode } from '@mui/docs/HighlightedCode'; - -export default function SpacingGrid() { - const [spacing, setSpacing] = React.useState(2); - - const handleChange = (event: React.ChangeEvent) => { - setSpacing(Number((event.target as HTMLInputElement).value)); - }; - - const jsx = ` - -`; - - return ( - - - - {[0, 1, 2].map((value) => ( - - ({ - height: 140, - width: 100, - backgroundColor: '#fff', - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), - })} - /> - - ))} - - - - - - - - spacing - - {[0, 0.5, 1, 2, 3, 4, 8, 12].map((value) => ( - } - label={value.toString()} - /> - ))} - - - - - - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/VariableWidthGrid.js b/docs/data/material/components/grid-legacy/VariableWidthGrid.js deleted file mode 100644 index d7b3698bdfff46..00000000000000 --- a/docs/data/material/components/grid-legacy/VariableWidthGrid.js +++ /dev/null @@ -1,33 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function VariableWidthGrid() { - return ( - - - - variable width content - - - xs=6 - - - xs - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/VariableWidthGrid.tsx b/docs/data/material/components/grid-legacy/VariableWidthGrid.tsx deleted file mode 100644 index d7b3698bdfff46..00000000000000 --- a/docs/data/material/components/grid-legacy/VariableWidthGrid.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { styled } from '@mui/material/styles'; -import Box from '@mui/material/Box'; -import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; - -const Item = styled(Paper)(({ theme }) => ({ - backgroundColor: '#fff', - ...theme.typography.body2, - padding: theme.spacing(1), - textAlign: 'center', - color: (theme.vars ?? theme).palette.text.secondary, - ...theme.applyStyles('dark', { - backgroundColor: '#1A2027', - }), -})); - -export default function VariableWidthGrid() { - return ( - - - - variable width content - - - xs=6 - - - xs - - - - ); -} diff --git a/docs/data/material/components/grid-legacy/VariableWidthGrid.tsx.preview b/docs/data/material/components/grid-legacy/VariableWidthGrid.tsx.preview deleted file mode 100644 index c52b1f2156b45e..00000000000000 --- a/docs/data/material/components/grid-legacy/VariableWidthGrid.tsx.preview +++ /dev/null @@ -1,11 +0,0 @@ - - - variable width content - - - xs=6 - - - xs - - \ No newline at end of file diff --git a/docs/data/material/components/grid-legacy/grid-legacy.md b/docs/data/material/components/grid-legacy/grid-legacy.md deleted file mode 100644 index 7089dc28342b65..00000000000000 --- a/docs/data/material/components/grid-legacy/grid-legacy.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -productId: material-ui -title: React GridLegacy component -components: GridLegacy -githubLabel: 'component: Grid' -materialDesign: https://m2.material.io/design/layout/understanding-layout.html -githubSource: packages/mui-material/src/GridLegacy ---- - -# GridLegacy - -

The Material Design responsive layout grid adapts to screen size and orientation, ensuring consistency across layouts.

- -The [grid](https://m2.material.io/design/layout/responsive-layout-grid.html) creates visual consistency between layouts while allowing flexibility across a wide variety of designs. -Material Design's responsive UI is based on a 12-column grid layout. - -{{"component": "@mui/docs/ComponentLinkHeader", "design": false}} - -:::warning -The `GridLegacy` component shouldn't be confused with a data grid; it is closer to a layout grid. For a data grid head to [the `DataGrid` component](/x/react-data-grid/). -::: - -:::warning -The `GridLegacy` component has been deprecated. -Please use [Grid](/material-ui/react-grid/) instead. -See the [Grid upgrade guide](/material-ui/migration/upgrade-to-grid-v2/) for more details. -::: - -## How it works - -The grid system is implemented with the `GridLegacy` component: - -- It uses [CSS's Flexible Box module](https://www.w3.org/TR/css-flexbox-1/) for high flexibility. -- There are two types of layout: _containers_ and _items_. -- Item widths are set in percentages, so they're always fluid and sized relative to their parent element. -- Items have padding to create the spacing between individual items. -- There are five grid breakpoints: xs, sm, md, lg, and xl. -- Integer values can be given to each breakpoint, indicating how many of the 12 available columns are occupied by the component when the viewport width satisfies the [breakpoint constraints](/material-ui/customization/breakpoints/#default-breakpoints). - -If you are **new to or unfamiliar with flexbox**, we encourage you to read this [CSS-Tricks flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) guide. - -## Fluid grids - -Fluid grids use columns that scale and resize content. A fluid grid's layout can use breakpoints to determine if the layout needs to change dramatically. - -### Basic grid - -Column widths are integer values between 1 and 12; they apply at any breakpoint and indicate how many columns are occupied by the component. - -A value passed to any given breakpoint also applies to all wider breakpoints (if they have no values explicitly defined). -For example, `xs={12}` sizes a component to occupy the full width of its parent container, regardless of the viewport size. - -{{"demo": "BasicGrid.js", "bg": true}} - -### Grid with multiple breakpoints - -Components may have multiple widths defined, causing the layout to change at the defined breakpoint. Width values given to larger breakpoints override those given to smaller breakpoints. - -For example, `xs={12} sm={6}` sizes a component to occupy half of the viewport width (6 columns) when viewport width is [600 or more pixels](/material-ui/customization/breakpoints/#default-breakpoints). For smaller viewports, the component fills all 12 available columns. - -{{"demo": "FullWidthGrid.js", "bg": true}} - -## Spacing - -To control space between children, use the `spacing` prop. -The spacing value can be any positive number, including decimals and any string. -The prop is converted into a CSS property using the [`theme.spacing()`](/material-ui/customization/spacing/) helper. - -{{"demo": "SpacingGrid.js", "bg": true}} - -### Row & column spacing - -The `rowSpacing` and `columnSpacing` props allow for specifying the row and column gaps independently. -It's similar to the `row-gap` and `column-gap` properties of [CSS Grid](/system/grid/#row-gap-column-gap). - -{{"demo": "RowAndColumnSpacing.js", "bg": true}} - -## Responsive values - -You can switch the props' value based on the active breakpoint. -For instance, we can implement the ["recommended"](https://m2.material.io/design/layout/responsive-layout-grid.html) responsive layout grid of Material Design. - -{{"demo": "ResponsiveGrid.js", "bg": true}} - -Responsive values is supported by: - -- `columns` -- `columnSpacing` -- `direction` -- `rowSpacing` -- `spacing` -- all the [other props](#system-props) of MUI System - -:::warning -When using a responsive `columns` prop, each grid item needs its corresponding breakpoint. -For instance, this is not working. The grid item misses the value for `md`: - -```jsx - - - -``` - -::: - -## Interactive - -Below is an interactive demo that lets you explore the visual results of the different settings: - -{{"demo": "InteractiveGrid.js", "hideToolbar": true, "bg": true}} - -## Auto-layout - -The Auto-layout makes the _items_ equitably share the available space. -That also means you can set the width of one _item_ and the others will automatically resize around it. - -{{"demo": "AutoGrid.js", "bg": true}} - -### Variable width content - -Set one of the size breakpoint props to `"auto"` instead of `true` / a `number` to size -a column based on the natural width of its content. - -{{"demo": "VariableWidthGrid.js", "bg": true}} - -## Complex Grid - -The following demo doesn't follow the Material Design guidelines, but illustrates how the grid can be used to build complex layouts. - -{{"demo": "ComplexGrid.js", "bg": true}} - -## Nested Grid - -The `container` and `item` props are two independent booleans; they can be combined to allow a Grid component to be both a flex container and child. - -:::info -A flex **container** is the box generated by an element with a computed display of `flex` or `inline-flex`. In-flow children of a flex container are called flex **items** and are laid out using the flex layout model. -::: - -https://www.w3.org/TR/css-flexbox-1/#box-model - -{{"demo": "NestedGrid.js", "bg": true}} - -⚠️ Defining an explicit width to a Grid element that is flex container, flex item, and has spacing at the same time leads to unexpected behavior, avoid doing it: - -```jsx - -``` - -If you need to do such, remove one of the props. - -## Columns - -You can change the default number of columns (12) with the `columns` prop. - -{{"demo": "ColumnsGrid.js", "bg": true}} - -## Limitations - -### Negative margin - -The spacing between items is implemented with a negative margin. This might lead to unexpected behaviors. For instance, to apply a background color, you need to apply `display: flex;` to the parent. - -### white-space: nowrap - -The initial setting on flex items is `min-width: auto`. -This causes a positioning conflict when children use `white-space: nowrap;`. -You can reproduce the issue with: - -```jsx - - -``` - -In order for the item to stay within the container you need to set `min-width: 0`. -In practice, you can set the `zeroMinWidth` prop: - -```jsx - - -``` - -{{"demo": "AutoGridNoWrap.js", "bg": true}} - -### direction: column | column-reverse - -The `xs`, `sm`, `md`, `lg`, and `xl` props are **not supported** within `direction="column"` and `direction="column-reverse"` containers. - -They define the number of grids the component will use for a given breakpoint. They are intended to control **width** using `flex-basis` in `row` containers but they will impact height in `column` containers. -If used, these props may have undesirable effects on the height of the `GridLegacy` item elements. - -## CSS Grid Layout - -The `GridLegacy` component is using CSS flexbox internally. -But as seen below, you can easily use [MUI System](/system/grid/) and CSS Grid to layout your pages. - -{{"demo": "CSSGrid.js", "bg": true}} - -## System props - -:::info -System props are deprecated and will be removed in the next major release. Please use the `sx` prop instead. - -```diff -- -+ -``` - -::: diff --git a/docs/data/material/migration/upgrade-to-grid-v2/upgrade-to-grid-v2.md b/docs/data/material/migration/upgrade-to-grid-v2/upgrade-to-grid-v2.md index 244f71b1c4cd03..9c3b160bbef82d 100644 --- a/docs/data/material/migration/upgrade-to-grid-v2/upgrade-to-grid-v2.md +++ b/docs/data/material/migration/upgrade-to-grid-v2/upgrade-to-grid-v2.md @@ -16,7 +16,7 @@ Grid provides the following improvements over GridLegacy: - All grids are considered items without specifying the `item` prop. - The [offset feature](/material-ui/react-grid/#offset) gives you more flexibility for positioning. - [Nested grids](/material-ui/react-grid/#nested-grid) now have no depth limitation. -- Its implementation doesn't use negative margins so it doesn't [overflow like GridLegacy](/material-ui/react-grid-legacy/#negative-margin). +- Its implementation doesn't use negative margins so it doesn't overflow. ## How to upgrade @@ -163,7 +163,7 @@ function Demo() { ### Column direction -Using `direction="column"` or `direction="column-reverse"` is not supported on [GridLegacy](/material-ui/react-grid-legacy/#direction-column-column-reverse) nor on [the updated Grid](/material-ui/react-grid/#column-direction). +Using `direction="column"` or `direction="column-reverse"` is not supported. If your layout used GridLegacy with these values, it might break when you switch to the updated Grid. If you need a vertical layout, follow the instructions in the [Grid documentation](/material-ui/react-grid/#column-direction). @@ -202,6 +202,3 @@ You'll need to manually update these components. - Grid: - [Documentation](/material-ui/react-grid/) - [API](/material-ui/api/grid/) -- GridLegacy: - - [Documentation](/material-ui/react-grid-legacy/) - - [API](/material-ui/api/grid-legacy/) diff --git a/docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md b/docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md index 0e2cfdc73de838..1237c4d4334619 100644 --- a/docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md +++ b/docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md @@ -118,6 +118,31 @@ This also fixes an issue where props like `color` were consumed by the Grid inst ``` +### GridLegacy + +The `GridLegacy` component is **removed**, use the `Grid` component instead. + +The main API differences are: + +- The `item` prop is no longer needed. +- The `xs`, `sm`, `md`, `lg`, `xl` props are replaced by the `size` prop. + +```diff +-import Grid from '@mui/material/GridLegacy'; ++import Grid from '@mui/material/Grid'; + + +- ++ + ... + + +``` + +See the [Grid v2 migration guide](/material-ui/migration/upgrade-to-grid-v2/) for more details. + +`MuiGridLegacy` has also been removed from the theme `components` types (`ComponentsProps`, `ComponentsOverrides`, and `ComponentsVariants`). + ### TablePagination numbers are formatted by default Pagination numbers in `TablePagination` are now formatted using `Intl.NumberFormat` according to the locale. diff --git a/docs/data/material/pages.ts b/docs/data/material/pages.ts index 3dd995459b93fa..6dd1a6128a4191 100644 --- a/docs/data/material/pages.ts +++ b/docs/data/material/pages.ts @@ -111,7 +111,6 @@ const pages: MuiPage[] = [ { pathname: '/material-ui/react-box' }, { pathname: '/material-ui/react-container' }, { pathname: '/material-ui/react-grid' }, - { pathname: '/material-ui/react-grid-legacy', deprecated: true, title: 'GridLegacy' }, { pathname: '/material-ui/react-stack' }, { pathname: '/material-ui/react-image-list', title: 'Image List' }, ], diff --git a/docs/data/material/pagesApi.js b/docs/data/material/pagesApi.js index 95054641a8bbad..ee76034af9e54a 100644 --- a/docs/data/material/pagesApi.js +++ b/docs/data/material/pagesApi.js @@ -48,7 +48,6 @@ export default [ { pathname: '/material-ui/api/form-label' }, { pathname: '/material-ui/api/global-styles' }, { pathname: '/material-ui/api/grid' }, - { pathname: '/material-ui/api/grid-legacy' }, { pathname: '/material-ui/api/grow' }, { pathname: '/material-ui/api/icon' }, { pathname: '/material-ui/api/icon-button' }, diff --git a/docs/pages/blog/2021-q2-update.md b/docs/pages/blog/2021-q2-update.md index d02d0aefa84f5f..b658f754444257 100644 --- a/docs/pages/blog/2021-q2-update.md +++ b/docs/pages/blog/2021-q2-update.md @@ -48,25 +48,25 @@ Here are the most significant improvements since March 2021. - ✨ The new style engine has unlocked problems on the `Grid` component that we couldn't solve before with JSS: - We have added support for [row & column](https://mui.com/material-ui/react-grid-legacy/#row-column-spacing) spacing: + We have added support for [row & column](https://mui.com/material-ui/react-grid/#row-column-spacing) spacing: ```jsx ``` -We have added support for [responsive values](https://mui.com/material-ui/react-grid-legacy/#responsive-values) on all the props: +We have added support for [responsive values](https://mui.com/material-ui/react-grid/#responsive-values) on all the props: ```jsx ``` -We have added support for a different [number of columns](https://mui.com/material-ui/react-grid-legacy/#columns) than 12: +We have added support for a different [number of columns](https://mui.com/material-ui/react-grid/#columns) than 12: ```jsx ``` -We have added an alternative implementation that uses [CSS grid](https://mui.com/material-ui/react-grid-legacy/#css-grid-layout): +We have added an alternative implementation that uses [CSS grid](https://mui.com/material-ui/react-grid/#css-grid-layout): ```jsx diff --git a/docs/pages/blog/build-layouts-faster-with-grid-v2.md b/docs/pages/blog/build-layouts-faster-with-grid-v2.md index a63eebaebd05d7..b2cebc1814c2ce 100644 --- a/docs/pages/blog/build-layouts-faster-with-grid-v2.md +++ b/docs/pages/blog/build-layouts-faster-with-grid-v2.md @@ -19,7 +19,7 @@ import Grid from '@mui/material/Grid'; // The updated grid, a.k.a. Grid v2 - To fix the migration pain points ([#26266](https://github.com/mui/material-ui/issues/29266) and [#31244](https://github.com/mui/material-ui/issues/31244)) for the grid component which is caused by the [implementation changes](https://github.com/mui/material-ui/pull/24332) introduced in v5. - To add the long-awaited [offset feature](https://github.com/mui/material-ui/issues/11251) to the layout grid component. - To remove the child combinator (`>`) from the grid item styles, which [complicates the customization](https://github.com/mui/material-ui/issues/28855) of the old grid. -- To fix [the limitation on nested grids](https://mui.com/material-ui/react-grid-legacy/#nested-grid). +- To fix [the limitation on nested grids](https://mui.com/material-ui/react-grid/#nested-grid). - To eliminate the unnecessary `item` prop. ## What's new diff --git a/docs/pages/material-ui/api/grid-legacy.js b/docs/pages/material-ui/api/grid-legacy.js deleted file mode 100644 index bc5bee5b5cd220..00000000000000 --- a/docs/pages/material-ui/api/grid-legacy.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as React from 'react'; -import ApiPage from 'docs/src/modules/components/ApiPage'; -import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; -import jsonPageContent from './grid-legacy.json'; - -export default function Page(props) { - const { descriptions } = props; - return ; -} - -export async function getStaticProps() { - const req = require.context( - 'docs/translations/api-docs/grid-legacy', - false, - /\.\/grid-legacy.*\.json$/, - ); - const descriptions = mapApiPageTranslations(req); - - return { props: { descriptions } }; -} diff --git a/docs/pages/material-ui/api/grid-legacy.json b/docs/pages/material-ui/api/grid-legacy.json deleted file mode 100644 index 6b350524b2bcbb..00000000000000 --- a/docs/pages/material-ui/api/grid-legacy.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "props": { - "children": { "type": { "name": "node" } }, - "classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } }, - "columns": { - "type": { - "name": "union", - "description": "Array<number>
| number
| object" - }, - "default": "12" - }, - "columnSpacing": { - "type": { - "name": "union", - "description": "Array<number
| string>
| number
| object
| string" - } - }, - "component": { "type": { "name": "elementType" } }, - "container": { "type": { "name": "bool" }, "default": "false" }, - "direction": { - "type": { - "name": "union", - "description": "'column-reverse'
| 'column'
| 'row-reverse'
| 'row'
| Array<'column-reverse'
| 'column'
| 'row-reverse'
| 'row'>
| object" - }, - "default": "'row'" - }, - "item": { "type": { "name": "bool" }, "default": "false" }, - "lg": { - "type": { - "name": "union", - "description": "'auto'
| number
| bool" - }, - "default": "false" - }, - "md": { - "type": { - "name": "union", - "description": "'auto'
| number
| bool" - }, - "default": "false" - }, - "rowSpacing": { - "type": { - "name": "union", - "description": "Array<number
| string>
| number
| object
| string" - } - }, - "sm": { - "type": { - "name": "union", - "description": "'auto'
| number
| bool" - }, - "default": "false" - }, - "spacing": { - "type": { - "name": "union", - "description": "Array<number
| string>
| number
| object
| string" - }, - "default": "0" - }, - "sx": { - "type": { - "name": "union", - "description": "Array<func
| object
| bool>
| func
| object" - }, - "additionalInfo": { "sx": true } - }, - "wrap": { - "type": { - "name": "enum", - "description": "'nowrap'
| 'wrap-reverse'
| 'wrap'" - }, - "default": "'wrap'" - }, - "xl": { - "type": { - "name": "union", - "description": "'auto'
| number
| bool" - }, - "default": "false" - }, - "xs": { - "type": { - "name": "union", - "description": "'auto'
| number
| bool" - }, - "default": "false" - }, - "zeroMinWidth": { "type": { "name": "bool" }, "default": "false" } - }, - "name": "GridLegacy", - "imports": [ - "import GridLegacy from '@mui/material/GridLegacy';", - "import { GridLegacy } from '@mui/material';" - ], - "classes": [ - { - "key": "container", - "className": "MuiGridLegacy-container", - "description": "Styles applied to the root element if `container={true}`.", - "isGlobal": false - }, - { - "key": "direction-xs-column", - "className": "MuiGridLegacy-direction-xs-column", - "description": "Styles applied to the root element if `direction=\"column\"`.", - "isGlobal": false - }, - { - "key": "direction-xs-column-reverse", - "className": "MuiGridLegacy-direction-xs-column-reverse", - "description": "Styles applied to the root element if `direction=\"column-reverse\"`.", - "isGlobal": false - }, - { - "key": "direction-xs-row-reverse", - "className": "MuiGridLegacy-direction-xs-row-reverse", - "description": "Styles applied to the root element if `direction=\"row-reverse\"`.", - "isGlobal": false - }, - { - "key": "grid-xs-1", - "className": "MuiGridLegacy-grid-xs-1", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-10", - "className": "MuiGridLegacy-grid-xs-10", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-11", - "className": "MuiGridLegacy-grid-xs-11", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-12", - "className": "MuiGridLegacy-grid-xs-12", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-2", - "className": "MuiGridLegacy-grid-xs-2", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-3", - "className": "MuiGridLegacy-grid-xs-3", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-4", - "className": "MuiGridLegacy-grid-xs-4", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-5", - "className": "MuiGridLegacy-grid-xs-5", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-6", - "className": "MuiGridLegacy-grid-xs-6", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-7", - "className": "MuiGridLegacy-grid-xs-7", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-8", - "className": "MuiGridLegacy-grid-xs-8", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-9", - "className": "MuiGridLegacy-grid-xs-9", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-auto", - "className": "MuiGridLegacy-grid-xs-auto", - "description": "", - "isGlobal": false - }, - { - "key": "grid-xs-true", - "className": "MuiGridLegacy-grid-xs-true", - "description": "", - "isGlobal": false - }, - { - "key": "item", - "className": "MuiGridLegacy-item", - "description": "Styles applied to the root element if `item={true}`.", - "isGlobal": false - }, - { - "key": "root", - "className": "MuiGridLegacy-root", - "description": "Styles applied to the root element.", - "isGlobal": false - }, - { - "key": "spacing-xs-1", - "className": "MuiGridLegacy-spacing-xs-1", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-10", - "className": "MuiGridLegacy-spacing-xs-10", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-2", - "className": "MuiGridLegacy-spacing-xs-2", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-3", - "className": "MuiGridLegacy-spacing-xs-3", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-4", - "className": "MuiGridLegacy-spacing-xs-4", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-5", - "className": "MuiGridLegacy-spacing-xs-5", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-6", - "className": "MuiGridLegacy-spacing-xs-6", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-7", - "className": "MuiGridLegacy-spacing-xs-7", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-8", - "className": "MuiGridLegacy-spacing-xs-8", - "description": "", - "isGlobal": false - }, - { - "key": "spacing-xs-9", - "className": "MuiGridLegacy-spacing-xs-9", - "description": "", - "isGlobal": false - }, - { - "key": "wrap-xs-nowrap", - "className": "MuiGridLegacy-wrap-xs-nowrap", - "description": "Styles applied to the root element if `wrap=\"nowrap\"`.", - "isGlobal": false - }, - { - "key": "wrap-xs-wrap-reverse", - "className": "MuiGridLegacy-wrap-xs-wrap-reverse", - "description": "Styles applied to the root element if `wrap=\"reverse\"`.", - "isGlobal": false - }, - { - "key": "zeroMinWidth", - "className": "MuiGridLegacy-zeroMinWidth", - "description": "Styles applied to the root element if `zeroMinWidth={true}`.", - "isGlobal": false - } - ], - "spread": true, - "themeDefaultProps": true, - "muiName": "MuiGridLegacy", - "forwardsRefTo": "HTMLDivElement", - "filename": "/packages/mui-material/src/GridLegacy/GridLegacy.js", - "inheritance": null, - "demos": "", - "cssComponent": false, - "deprecated": true -} diff --git a/docs/pages/material-ui/react-grid-legacy.js b/docs/pages/material-ui/react-grid-legacy.js deleted file mode 100644 index 08dd4b9c384301..00000000000000 --- a/docs/pages/material-ui/react-grid-legacy.js +++ /dev/null @@ -1,11 +0,0 @@ -import MarkdownDocs from 'docs/src/modules/components/MarkdownDocsV2'; -import AppFrame from 'docs/src/modules/components/AppFrame'; -import * as pageProps from 'docs/data/material/components/grid-legacy/grid-legacy.md?muiMarkdown'; - -export default function Page() { - return ; -} - -Page.getLayout = (page) => { - return {page}; -}; diff --git a/docs/src/modules/components/MaterialUIComponents/MaterialLayoutComponents.js b/docs/src/modules/components/MaterialUIComponents/MaterialLayoutComponents.js index c83c186eaff593..7be46545c2af6f 100644 --- a/docs/src/modules/components/MaterialUIComponents/MaterialLayoutComponents.js +++ b/docs/src/modules/components/MaterialUIComponents/MaterialLayoutComponents.js @@ -22,16 +22,6 @@ const layoutComponents = [ md3: false, noGuidelines: true, }, - { - name: 'GridLegacy', - srcLight: '/static/material-ui/react-components/grid-light.png', - srcDark: '/static/material-ui/react-components/grid-dark.png', - link: '/material-ui/react-grid-legacy/', - md1: false, - md2: false, - md3: false, - noGuidelines: true, - }, { name: 'Grid', srcLight: '/static/material-ui/react-components/grid-v2-light.png', diff --git a/docs/src/pages/premium-themes/onepirate/SignUp.js b/docs/src/pages/premium-themes/onepirate/SignUp.js index 9b82838b03d1a5..198bb1cc2017fe 100644 --- a/docs/src/pages/premium-themes/onepirate/SignUp.js +++ b/docs/src/pages/premium-themes/onepirate/SignUp.js @@ -1,6 +1,6 @@ import * as React from 'react'; import Box from '@mui/material/Box'; -import Grid from '@mui/material/GridLegacy'; +import Grid from '@mui/material/Grid'; import Link from '@mui/material/Link'; import { Field, Form, FormSpy } from 'react-final-form'; import Typography from './modules/components/Typography'; @@ -55,7 +55,7 @@ function SignUp() { {({ handleSubmit: handleSubmit2, submitting }) => ( - + - + ( - + - + - + - + X - + - + Legal @@ -86,7 +86,7 @@ export default function AppFooter() {
- + Language @@ -108,7 +108,7 @@ export default function AppFooter() { ))} - + {'Icons made by '} diff --git a/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.tsx b/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.tsx index aee9ce50c265c2..c4706be2104ffe 100644 --- a/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.tsx +++ b/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import Box from '@mui/material/Box'; -import Grid from '@mui/material/GridLegacy'; +import Grid from '@mui/material/Grid'; import Link from '@mui/material/Link'; import Container from '@mui/material/Container'; import Typography from '../components/Typography'; @@ -50,14 +50,14 @@ export default function AppFooter() { > - + - + X - + - + Legal @@ -86,7 +86,7 @@ export default function AppFooter() { - + Language @@ -108,7 +108,7 @@ export default function AppFooter() { ))} - + {'Icons made by '} diff --git a/docs/src/pages/premium-themes/onepirate/modules/views/ProductCTA.js b/docs/src/pages/premium-themes/onepirate/modules/views/ProductCTA.js index 5679e22ac5b510..28bcc892a51780 100644 --- a/docs/src/pages/premium-themes/onepirate/modules/views/ProductCTA.js +++ b/docs/src/pages/premium-themes/onepirate/modules/views/ProductCTA.js @@ -1,6 +1,6 @@ import * as React from 'react'; import Box from '@mui/material/Box'; -import Grid from '@mui/material/GridLegacy'; +import Grid from '@mui/material/Grid'; import Container from '@mui/material/Container'; import Typography from '../components/Typography'; import TextField from '../components/TextField'; @@ -22,7 +22,7 @@ function ProductCTA() { return ( - + - +
- + 1. - + 2. - + 3.
- + 1. - + 2. - + 3. - + - + - + - + - + - + - + - + - + diff --git a/docs/src/pages/premium-themes/paperbase/Content.tsx b/docs/src/pages/premium-themes/paperbase/Content.tsx index e1aa27eda315d8..895aacee5ea222 100644 --- a/docs/src/pages/premium-themes/paperbase/Content.tsx +++ b/docs/src/pages/premium-themes/paperbase/Content.tsx @@ -2,7 +2,7 @@ import AppBar from '@mui/material/AppBar'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/GridLegacy'; +import Grid from '@mui/material/Grid'; import Button from '@mui/material/Button'; import TextField from '@mui/material/TextField'; import Tooltip from '@mui/material/Tooltip'; @@ -21,10 +21,10 @@ export default function Content() { > - + - + - + diff --git a/docs/src/pages/premium-themes/paperbase/Header.js b/docs/src/pages/premium-themes/paperbase/Header.js index 8293b063610521..59a184c8f6486d 100644 --- a/docs/src/pages/premium-themes/paperbase/Header.js +++ b/docs/src/pages/premium-themes/paperbase/Header.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import AppBar from '@mui/material/AppBar'; import Avatar from '@mui/material/Avatar'; import Button from '@mui/material/Button'; -import Grid from '@mui/material/GridLegacy'; +import Grid from '@mui/material/Grid'; import HelpIcon from '@mui/icons-material/Help'; import IconButton from '@mui/material/IconButton'; import Link from '@mui/material/Link'; @@ -25,7 +25,7 @@ function Header(props) { - + - - + + - + - + @@ -77,12 +77,12 @@ function Header(props) { > - + Authentication - +