Skip to content

Commit

Permalink
Run codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed Jun 26, 2024
1 parent b64c7e6 commit 35b31ba
Show file tree
Hide file tree
Showing 53 changed files with 151 additions and 153 deletions.
4 changes: 1 addition & 3 deletions benchmark/browser/scenarios/grid-system/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export default function GridSystem() {
return (
<Grid container spacing={2}>
{new Array(1000).fill().map(() => (
<Grid xs={12} sm={6} md={4}>
test case
</Grid>
<Grid size={{ xs: 12, sm: 6, md: 4 }}>test case</Grid>
))}
</Grid>
);
Expand Down
8 changes: 4 additions & 4 deletions docs/data/joy/components/aspect-ratio/VariantsRatio.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ import Typography from '@mui/joy/Typography';
export default function VariantsRatio() {
return (
<Grid container spacing={2} sx={{ width: '100%' }}>
<Grid xs={6} md>
<Grid size={{ xs: 6, md: 'grow' }}>
<AspectRatio variant="solid">
<Typography level="inherit" sx={{ fontWeight: 'lg' }}>
Solid
</Typography>
</AspectRatio>
</Grid>
<Grid xs={6} md>
<Grid size={{ xs: 6, md: 'grow' }}>
<AspectRatio variant="soft">
<Typography level="inherit" sx={{ fontWeight: 'lg' }}>
Soft
</Typography>
</AspectRatio>
</Grid>
<Grid xs={6} md>
<Grid size={{ xs: 6, md: 'grow' }}>
<AspectRatio variant="outlined">
<Typography level="inherit" sx={{ fontWeight: 'lg' }}>
Outlined
</Typography>
</AspectRatio>
</Grid>
<Grid xs={6} md>
<Grid size={{ xs: 6, md: 'grow' }}>
<AspectRatio variant="plain">
<Typography level="inherit" sx={{ fontWeight: 'lg' }}>
Plain
Expand Down
8 changes: 4 additions & 4 deletions docs/data/joy/components/aspect-ratio/VariantsRatio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ import Typography from '@mui/joy/Typography';
export default function VariantsRatio() {
return (
<Grid container spacing={2} sx={{ width: '100%' }}>
<Grid xs={6} md>
<Grid size={{ xs: 6, md: 'grow' }}>
<AspectRatio variant="solid">
<Typography level="inherit" sx={{ fontWeight: 'lg' }}>
Solid
</Typography>
</AspectRatio>
</Grid>
<Grid xs={6} md>
<Grid size={{ xs: 6, md: 'grow' }}>
<AspectRatio variant="soft">
<Typography level="inherit" sx={{ fontWeight: 'lg' }}>
Soft
</Typography>
</AspectRatio>
</Grid>
<Grid xs={6} md>
<Grid size={{ xs: 6, md: 'grow' }}>
<AspectRatio variant="outlined">
<Typography level="inherit" sx={{ fontWeight: 'lg' }}>
Outlined
</Typography>
</AspectRatio>
</Grid>
<Grid xs={6} md>
<Grid size={{ xs: 6, md: 'grow' }}>
<AspectRatio variant="plain">
<Typography level="inherit" sx={{ fontWeight: 'lg' }}>
Plain
Expand Down
8 changes: 4 additions & 4 deletions docs/data/joy/components/snackbar/PositionedSnackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function PositionedSnackbar() {
</Button>
</Box>
<Grid container sx={{ justifyContent: 'center' }}>
<Grid xs={6}>
<Grid size={6}>
<Button
variant="plain"
startDecorator={<NorthWestIcon />}
Expand All @@ -48,7 +48,7 @@ export default function PositionedSnackbar() {
Top Left
</Button>
</Grid>
<Grid xs={6} sx={{ textAlign: 'right', mb: 2 }}>
<Grid sx={{ textAlign: 'right', mb: 2 }} size={6}>
<Button
variant="plain"
endDecorator={<NorthEastIcon />}
Expand All @@ -57,7 +57,7 @@ export default function PositionedSnackbar() {
Top Right
</Button>
</Grid>
<Grid xs={6}>
<Grid size={6}>
<Button
variant="plain"
startDecorator={<SouthWestIcon />}
Expand All @@ -66,7 +66,7 @@ export default function PositionedSnackbar() {
Bottom Left
</Button>
</Grid>
<Grid xs={6} sx={{ textAlign: 'right' }}>
<Grid sx={{ textAlign: 'right' }} size={6}>
<Button
variant="plain"
endDecorator={<SouthEastIcon />}
Expand Down
8 changes: 4 additions & 4 deletions docs/data/joy/components/snackbar/PositionedSnackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function PositionedSnackbar() {
</Button>
</Box>
<Grid container sx={{ justifyContent: 'center' }}>
<Grid xs={6}>
<Grid size={6}>
<Button
variant="plain"
startDecorator={<NorthWestIcon />}
Expand All @@ -52,7 +52,7 @@ export default function PositionedSnackbar() {
Top Left
</Button>
</Grid>
<Grid xs={6} sx={{ textAlign: 'right', mb: 2 }}>
<Grid sx={{ textAlign: 'right', mb: 2 }} size={6}>
<Button
variant="plain"
endDecorator={<NorthEastIcon />}
Expand All @@ -61,7 +61,7 @@ export default function PositionedSnackbar() {
Top Right
</Button>
</Grid>
<Grid xs={6}>
<Grid size={6}>
<Button
variant="plain"
startDecorator={<SouthWestIcon />}
Expand All @@ -70,7 +70,7 @@ export default function PositionedSnackbar() {
Bottom Left
</Button>
</Grid>
<Grid xs={6} sx={{ textAlign: 'right' }}>
<Grid sx={{ textAlign: 'right' }} size={6}>
<Button
variant="plain"
endDecorator={<SouthEastIcon />}
Expand Down
8 changes: 4 additions & 4 deletions docs/data/joy/components/stack/InteractiveStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function InteractiveStack() {
})}
>
<Grid container spacing={3}>
<Grid xs={12}>
<Grid size={12}>
<FormControl>
<FormLabel sx={{ mb: 0.5 }}>direction</FormLabel>
<RadioGroup
Expand All @@ -85,7 +85,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl>
<FormLabel sx={{ mb: 0.5 }}>alignItems</FormLabel>
<RadioGroup
Expand All @@ -107,7 +107,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl>
<FormLabel sx={{ mb: 0.5 }}>justifyContent</FormLabel>
<RadioGroup
Expand All @@ -130,7 +130,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl>
<FormLabel sx={{ mb: 0.5 }}>spacing</FormLabel>
<RadioGroup
Expand Down
8 changes: 4 additions & 4 deletions docs/data/joy/components/stack/InteractiveStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function InteractiveStack() {
})}
>
<Grid container spacing={3}>
<Grid xs={12}>
<Grid size={12}>
<FormControl>
<FormLabel sx={{ mb: 0.5 }}>direction</FormLabel>
<RadioGroup
Expand All @@ -85,7 +85,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl>
<FormLabel sx={{ mb: 0.5 }}>alignItems</FormLabel>
<RadioGroup
Expand All @@ -107,7 +107,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl>
<FormLabel sx={{ mb: 0.5 }}>justifyContent</FormLabel>
<RadioGroup
Expand All @@ -130,7 +130,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl>
<FormLabel sx={{ mb: 0.5 }}>spacing</FormLabel>
<RadioGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export default function MainGrid() {
{/* cards */}
<Grid container spacing={2} columns={12}>
{data.map((card, index) => (
<Grid key={index} xs={6} sm={3} md={2} lg={2.25}>
<Grid key={index} size={{ xs: 6, sm: 3, md: 2, lg: 2.25 }}>
<StatCard {...card} />
</Grid>
))}
<Grid xs={12} md={4} lg={3}>
<Grid size={{ xs: 12, md: 4, lg: 3 }}>
<HighlightedCard />
</Grid>
</Grid>
Expand All @@ -60,14 +60,14 @@ export default function MainGrid() {
direction={{ xs: 'row-reverse', md: 'row' }}
columns={12}
>
<Grid xs={12} md={8} lg={9}>
<Grid size={{ xs: 12, md: 8, lg: 9 }}>
<Stack spacing={2}>
<PageViewsBarChart />
<PageViewsChart />
<CustomizedDataGrid />
</Stack>
</Grid>
<Grid xs={12} md={4} lg={3}>
<Grid size={{ xs: 12, md: 4, lg: 3 }}>
<Stack spacing={2} direction={{ xs: 'column', sm: 'row', md: 'column' }}>
<CustomizedTreeView />
<ChartUserByCountry />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export default function MainGrid() {
{/* cards */}
<Grid container spacing={2} columns={12}>
{data.map((card, index) => (
<Grid key={index} xs={6} sm={3} md={2} lg={2.25}>
<Grid key={index} size={{ xs: 6, sm: 3, md: 2, lg: 2.25 }}>
<StatCard {...card} />
</Grid>
))}
<Grid xs={12} md={4} lg={3}>
<Grid size={{ xs: 12, md: 4, lg: 3 }}>
<HighlightedCard />
</Grid>
</Grid>
Expand All @@ -60,14 +60,14 @@ export default function MainGrid() {
direction={{ xs: 'row-reverse', md: 'row' }}
columns={12}
>
<Grid xs={12} md={8} lg={9}>
<Grid size={{ xs: 12, md: 8, lg: 9 }}>
<Stack spacing={2}>
<PageViewsBarChart />
<PageViewsChart />
<CustomizedDataGrid />
</Stack>
</Grid>
<Grid xs={12} md={4} lg={3}>
<Grid size={{ xs: 12, md: 4, lg: 3 }}>
<Stack spacing={2} direction={{ xs: 'column', sm: 'row', md: 'column' }}>
<CustomizedTreeView />
<ChartUserByCountry />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function GridDisableEqualOverflow() {
alignItems="center"
justifyContent="center"
textAlign="center"
xs
size="grow"
>
ver.2 <br />
Top and left overflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function GridsDiff() {
alignItems="center"
justifyContent="center"
textAlign="center"
xs
size="grow"
>
ver.2 <br />
All sides
Expand Down
8 changes: 4 additions & 4 deletions docs/data/system/components/stack/InteractiveStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function InteractiveStack() {
</Stack>
<Paper sx={{ p: 2 }}>
<Grid container spacing={3}>
<Grid xs={12}>
<Grid size={12}>
<FormControl component="fieldset">
<FormLabel component="legend">direction</FormLabel>
<RadioGroup
Expand Down Expand Up @@ -83,7 +83,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl component="fieldset">
<FormLabel component="legend">alignItems</FormLabel>
<RadioGroup
Expand Down Expand Up @@ -123,7 +123,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl component="fieldset">
<FormLabel component="legend">justifyContent</FormLabel>
<RadioGroup
Expand Down Expand Up @@ -168,7 +168,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl component="fieldset">
<FormLabel component="legend">spacing</FormLabel>
<RadioGroup
Expand Down
8 changes: 4 additions & 4 deletions docs/data/system/components/stack/InteractiveStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function InteractiveStack() {
</Stack>
<Paper sx={{ p: 2 }}>
<Grid container spacing={3}>
<Grid xs={12}>
<Grid size={12}>
<FormControl component="fieldset">
<FormLabel component="legend">direction</FormLabel>
<RadioGroup
Expand Down Expand Up @@ -83,7 +83,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl component="fieldset">
<FormLabel component="legend">alignItems</FormLabel>
<RadioGroup
Expand Down Expand Up @@ -123,7 +123,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl component="fieldset">
<FormLabel component="legend">justifyContent</FormLabel>
<RadioGroup
Expand Down Expand Up @@ -168,7 +168,7 @@ export default function InteractiveStack() {
</RadioGroup>
</FormControl>
</Grid>
<Grid xs={12}>
<Grid size={12}>
<FormControl component="fieldset">
<FormLabel component="legend">spacing</FormLabel>
<RadioGroup
Expand Down
6 changes: 3 additions & 3 deletions docs/src/components/about/HowToSupport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function HowToSupport() {
description=""
/>
<Grid container spacing={3}>
<Grid xs={12} sm={6} md={4}>
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
<Widget
icon={<ForumRoundedIcon fontSize="small" color="primary" />}
title="Give feedback"
Expand All @@ -88,7 +88,7 @@ export default function HowToSupport() {
</Button>
</Widget>
</Grid>
<Grid xs={12} sm={6} md={4}>
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
<Widget
icon={<PeopleRoundedIcon fontSize="small" color="primary" />}
title="Join the community"
Expand Down Expand Up @@ -141,7 +141,7 @@ export default function HowToSupport() {
</Button>
</Widget>
</Grid>
<Grid xs={12} sm={6} md={4}>
<Grid size={{ xs: 12, sm: 6, md: 4 }}>
<Widget
icon={<LocalAtmRoundedIcon fontSize="small" color="primary" />}
title="Support us financially"
Expand Down
Loading

0 comments on commit 35b31ba

Please sign in to comment.