Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into componentsProps/menu
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Jun 9, 2022
2 parents 3efae41 + b5bbbec commit a24c5b2
Show file tree
Hide file tree
Showing 143 changed files with 3,087 additions and 1,766 deletions.
26 changes: 13 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ jobs:
test_browser:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
test_e2e:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -390,7 +390,7 @@ jobs:
test_e2e_website:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -405,7 +405,7 @@ jobs:
test_profile:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -432,7 +432,7 @@ jobs:
test_regressions:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -486,7 +486,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -510,7 +510,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -534,7 +534,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -558,7 +558,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -582,7 +582,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -606,7 +606,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -634,7 +634,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -736,7 +736,7 @@ jobs:
test_benchmark:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.21.1-focal
- image: mcr.microsoft.com/playwright:v1.22.2-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down
4 changes: 2 additions & 2 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"react-is": "^17.0.2",
"react-jss": "^10.9.0",
"react-redux": "^7.2.8",
"redux": "^4.1.2",
"redux": "^4.2.0",
"serve-handler": "^6.1.3",
"styled-components": "^5.3.5",
"theme-ui": "^0.14.5",
"webpack": "^5.72.1",
"webpack": "^5.73.0",
"webpack-cli": "^4.9.2"
}
}
Empty file removed cd
Empty file.
7 changes: 1 addition & 6 deletions docs/data/joy/components/aspect-ratio/BasicRatio.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ export default function BasicRatio() {
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }}
>
<AspectRatio>
<Typography
level="h2"
sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}
>
16 : 9
</Typography>
<Typography level="h2">16 : 9</Typography>
</AspectRatio>
</Sheet>
);
Expand Down
17 changes: 17 additions & 0 deletions docs/data/joy/components/aspect-ratio/BasicRatio.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as React from 'react';
import AspectRatio from '@mui/joy/AspectRatio';
import Sheet from '@mui/joy/Sheet';
import Typography from '@mui/joy/Typography';

export default function BasicRatio() {
return (
<Sheet
variant="outlined"
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }}
>
<AspectRatio>
<Typography level="h2">16 : 9</Typography>
</AspectRatio>
</Sheet>
);
}
8 changes: 8 additions & 0 deletions docs/data/joy/components/aspect-ratio/BasicRatio.tsx.preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Sheet
variant="outlined"
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }}
>
<AspectRatio>
<Typography level="h2">16 : 9</Typography>
</AspectRatio>
</Sheet>
13 changes: 6 additions & 7 deletions docs/data/joy/components/aspect-ratio/CarouselRatio.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import AspectRatio from '@mui/joy/AspectRatio';
import Box from '@mui/joy/Box';
import Typography from '@mui/joy/Typography';
import Sheet from '@mui/joy/Sheet';
import Card from '@mui/joy/Card';

const data = [
{
Expand All @@ -28,6 +28,7 @@ export default function FlexRowRatio() {
sx={{
display: 'flex',
gap: 1,
py: 1,
overflow: 'auto',
width: 343,
scrollSnapType: 'x mandatory',
Expand All @@ -38,15 +39,13 @@ export default function FlexRowRatio() {
}}
>
{data.map((item) => (
<Sheet
<Card
row
key={item.title}
variant="outlined"
sx={{
gap: 2,
p: 2,
display: 'flex',
alignItems: 'center',
borderRadius: 'sm',
'--Card-padding': (theme) => theme.spacing(2),
}}
>
<AspectRatio
Expand All @@ -59,7 +58,7 @@ export default function FlexRowRatio() {
<Typography fontWeight="md">{item.title}</Typography>
<Typography level="body2">{item.description}</Typography>
</Box>
</Sheet>
</Card>
))}
</Box>
);
Expand Down
65 changes: 65 additions & 0 deletions docs/data/joy/components/aspect-ratio/CarouselRatio.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import * as React from 'react';
import AspectRatio from '@mui/joy/AspectRatio';
import Box from '@mui/joy/Box';
import Typography from '@mui/joy/Typography';
import Card from '@mui/joy/Card';

const data = [
{
src: 'https://images.unsplash.com/photo-1502657877623-f66bf489d236?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2369',
title: 'Night view',
description: '4.21M views',
},
{
src: 'https://images.unsplash.com/photo-1527549993586-dff825b37782?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3270',
title: 'Lake view',
description: '4.74M views',
},
{
src: 'https://images.unsplash.com/photo-1532614338840-ab30cf10ed36?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3270',
title: 'Mountain view',
description: '3.98M views',
},
];

export default function FlexRowRatio() {
return (
<Box
sx={{
display: 'flex',
gap: 1,
py: 1,
overflow: 'auto',
width: 343,
scrollSnapType: 'x mandatory',
'& > *': {
scrollSnapAlign: 'center',
},
'::-webkit-scrollbar': { display: 'none' },
}}
>
{data.map((item) => (
<Card
row
key={item.title}
variant="outlined"
sx={{
gap: 2,
'--Card-padding': (theme) => theme.spacing(2),
}}
>
<AspectRatio
ratio="1"
sx={{ minWidth: 60, borderRadius: 'sm', overflow: 'auto' }}
>
<img src={item.src} alt={item.title} />
</AspectRatio>
<Box sx={{ whiteSpace: 'nowrap' }}>
<Typography fontWeight="md">{item.title}</Typography>
<Typography level="body2">{item.description}</Typography>
</Box>
</Card>
))}
</Box>
);
}
7 changes: 1 addition & 6 deletions docs/data/joy/components/aspect-ratio/CustomRatio.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ export default function CustomRatio() {
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }}
>
<AspectRatio ratio="4/3">
<Typography
level="h2"
sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}
>
4 : 3
</Typography>
<Typography level="h2">4 : 3</Typography>
</AspectRatio>
</Sheet>
);
Expand Down
17 changes: 17 additions & 0 deletions docs/data/joy/components/aspect-ratio/CustomRatio.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as React from 'react';
import AspectRatio from '@mui/joy/AspectRatio';
import Sheet from '@mui/joy/Sheet';
import Typography from '@mui/joy/Typography';

export default function CustomRatio() {
return (
<Sheet
variant="outlined"
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }}
>
<AspectRatio ratio="4/3">
<Typography level="h2">4 : 3</Typography>
</AspectRatio>
</Sheet>
);
}
8 changes: 8 additions & 0 deletions docs/data/joy/components/aspect-ratio/CustomRatio.tsx.preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Sheet
variant="outlined"
sx={{ width: 300, borderRadius: 'md', overflow: 'auto' }}
>
<AspectRatio ratio="4/3">
<Typography level="h2">4 : 3</Typography>
</AspectRatio>
</Sheet>
2 changes: 1 addition & 1 deletion docs/data/joy/components/aspect-ratio/FlexRowRatio.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function FlexRowRatio() {
endDecorator="px"
type="number"
value={flexBasis}
onChange={(event) => setFlexBasis(event.target.value)}
onChange={(event) => setFlexBasis(event.target.valueAsNumber)}
sx={{ mx: 'auto', width: '100%' }}
/>
</Box>
Expand Down
52 changes: 52 additions & 0 deletions docs/data/joy/components/aspect-ratio/FlexRowRatio.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import * as React from 'react';
import AspectRatio from '@mui/joy/AspectRatio';
import Box from '@mui/joy/Box';
import TextField from '@mui/joy/TextField';
import Typography from '@mui/joy/Typography';
import Sheet from '@mui/joy/Sheet';

export default function FlexRowRatio() {
const [flexBasis, setFlexBasis] = React.useState(200);
return (
<Box sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
<Sheet
variant="outlined"
sx={{
display: 'flex',
gap: 2,
p: 2,
minWidth: 300,
borderRadius: 'sm',
}}
>
<AspectRatio
sx={{
flexBasis: flexBasis ? `${flexBasis}px` : undefined,
borderRadius: 'sm',
overflow: 'auto',
}}
>
<img
src="https://images.unsplash.com/photo-1502657877623-f66bf489d236?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2369"
alt=""
/>
</AspectRatio>
<Box>
<Typography fontWeight="md">Yosemite National Park</Typography>
<Typography level="body2">California, USA</Typography>
</Box>
</Sheet>
<br />
<TextField
variant="outlined"
label="flexBasis"
placeholder="number"
endDecorator="px"
type="number"
value={flexBasis}
onChange={(event) => setFlexBasis(event.target.valueAsNumber)}
sx={{ mx: 'auto', width: '100%' }}
/>
</Box>
);
}
Loading

0 comments on commit a24c5b2

Please sign in to comment.