Skip to content

Commit

Permalink
Merge branch 'master' into stray-material-ui-doc-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Feb 12, 2024
2 parents e301e8d + 2d43ad1 commit d7d6583
Show file tree
Hide file tree
Showing 51 changed files with 1,093 additions and 423 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- name: Use Node.js 18.x
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/init@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
with:
languages: typescript
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -30,4 +30,4 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/analyze@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/vale-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: errata-ai/vale-action@c4213d4de3d5f718b8497bd86161531c78992084 # v2.0.1
- uses: errata-ai/vale-action@38bf078c328061f59879b347ca344a718a736018 # v2.1.0
continue-on-error: true
with:
reporter: github-pr-review
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
# [Versions](https://mui.com/versions/)

## v5.15.10

<!-- generated comparing v5.15.9..master -->

_Feb 12, 2024_

A big thanks to the 8 contributors who made this release possible.
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.

### `@mui/material@5.15.10`

- [Avatar] Add props deprecation with a codemod (#40853) @siriwatknp

### `@mui/system@5.15.10`

- [Stack] Update import statement for Stack component (#41032) @sai6855

### `@mui/joy@5.0.0-beta.28`

- [Button] Fix `disabled` prop priority when inside button group (#41000) @Smileek
- [IconButton] Support loading prop (#40949) @Smileek

### Docs

- [Button][material-ui] Fix 'File upload' demo a11y (#40943) @oliviertassinari
- [TableRow][material-ui] Escape markup in `children` prop so docgen tools don't parse it as HTML (#40992) @millerized
- [material-ui] Remove outdated example projects link (it uses Joy UI now) (#40913) @oliviertassinari
- [material-ui] Fix the "Intro to the MUI ecosystem" link placement (#40988) @danilo-leal
- Fix 301 redirection to StackBlitz @oliviertassinari
- Fix h1 on Joy UI templates @oliviertassinari
- Have MUI workspace own the CodeSandbox @oliviertassinari
- Add notification for mui x v7 beta (#41001) @joserodolfofreitas
- Fix 301 links @oliviertassinari
- Fix Next.js v13.5.1 <title> SEO regression (#40302) @oliviertassinari
- Add a 404 page (#40884) @danilo-leal
- Fix missing GitHub label when opening new issue @oliviertassinari

### Core

- [blog] Add post about upcoming plans for Base UI (#40882) @danilo-leal
- [core] Simplify CodeSandbox reproduction @oliviertassinari
- [core] Missing redirection @oliviertassinari
- [core] Export functions from `copyFiles` script to reuse in MUI X repo (#40970) @cherniavskii
- [core] Avoid variable shorthands @oliviertassinari
- [docs-infra] Fix search icon issue (#40957) @oliviertassinari
- [docs-infra] Ignore classes tagged with `@ignore` (#41009) @cherniavskii
- [docs-infra] Fix selected tab on codeblocks (#41036) @danilo-leal
- [website] Polish Customer Support Agent role @oliviertassinari

All contributors of this release in alphabetical order: @cherniavskii, @danilo-leal, @joserodolfofreitas, @millerized, @oliviertassinari, @sai6855, @siriwatknp, @Smileek

## v5.15.9<!-- generated comparing v5.15.8..master -->

_Feb 8, 2024_
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"styled-components": "^6.1.8",
"styled-system": "^5.1.5",
"theme-ui": "^0.16.1",
"webpack": "^5.90.0"
"webpack": "^5.90.1"
}
}
216 changes: 216 additions & 0 deletions docs/data/base/components/transitions/AllTransitionsDemo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { styled } from '@mui/system';
import { Unstable_Popup as PopupBase } from '@mui/base/Unstable_Popup';
import { Button as ButtonBase } from '@mui/base/Button';
import { CssAnimation, CssTransition } from '@mui/base/Transitions';

const styles = `
@keyframes open-animation {
0% {
opacity: 0;
transform: translateY(-8px) scale(0.95);
}
50% {
opacity: 1;
transform: translateY(4px) scale(1.05);
}
100% {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes close-animation {
0% {
opacity: 1;
transform: scale(1) rotate(0deg);
filter: blur(0);
}
100% {
opacity: 0;
transform: scale(1.5) rotate(8deg);
filter: blur(4px);
}
}
.anim-open {
animation: open-animation 1s ease-out both;
}
.anim-close {
animation: close-animation 1s ease-out forwards;
}
.open {
opacity: 1;
transform: translateY(0) scale(1)
filter: blur(0);
transition: transform 0.2s cubic-bezier(0.345, 0.275, 0.505, 1.625), opacity 0.2s ease-out;
}
.close {
opacity: 0;
transform: translateY(-8px) scale(0.95);
filter: blur(3px);
transition: transform 0.4s ease-out, opacity 0.4s ease-out, filter 0.2s ease-out;
}
`;

const grey = {
200: '#DAE2ED',
700: '#434D5B',
900: '#1C2025',
};

const blue = {
200: '#99CCFF',
300: '#66B2FF',
400: '#3399FF',
500: '#007FFF',
600: '#0072E5',
700: '#0066CC',
};

const Button = styled(ButtonBase)(
({ theme }) => `
min-width: 175px;
font-family: 'IBM Plex Sans', sans-serif;
font-weight: 600;
font-size: 0.875rem;
line-height: 1.5;
background-color: ${blue[500]};
padding: 8px 16px;
border-radius: 8px;
color: white;
transition: background-color, box-shadow, 120ms ease;
cursor: pointer;
border: 1px solid ${blue[500]};
box-shadow: 0 1px 1px ${
theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.1)'
}, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
&:active {
background-color: ${blue[700]};
box-shadow: none;
}
&:focus-visible {
box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
`,
);

const Popup = styled(PopupBase)`
width: max-content;
`;

const PopupBody = styled('div')(
({ theme }) => `
width: max-content;
padding: 12px 16px;
margin: 8px;
border-radius: 8px;
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
background-color: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'};
box-shadow: ${
theme.palette.mode === 'dark'
? `0px 4px 8px rgb(0 0 0 / 0.7)`
: `0px 4px 8px rgb(0 0 0 / 0.1)`
};
font-family: 'IBM Plex Sans', sans-serif;
font-size: 0.875rem;
z-index: 1;
`,
);

const Section = styled('div')`
display: flex;
gap: 12px;
padding: 8px;
@media (max-width: 700px) {
flex-direction: column;
}
`;

export default function AllTransitionsDemo() {
return (
<div>
<style>{styles}</style>
<Section>
<PopupWithTrigger>
<CssTransition
enterClassName="open"
exitClassName="close"
lastTransitionedPropertyOnExit="transform"
>
<PopupBody>Animated with the CSS Transition component.</PopupBody>
</CssTransition>
</PopupWithTrigger>
<PopupWithTrigger2>
<CssAnimation
enterClassName="anim-open"
exitClassName="anim-close"
enterAnimationName="open-animation"
exitAnimationName="close-animation"
>
<PopupBody>Animated with the CSS Animation component.</PopupBody>
</CssAnimation>
</PopupWithTrigger2>
</Section>
</div>
);
}

function PopupWithTrigger(props) {
const [anchor, setAnchor] = React.useState(null);
const [open, setOpen] = React.useState(false);

const { children, ...other } = props;

return (
<React.Fragment>
<Button ref={setAnchor} onClick={() => setOpen((o) => !o)}>
{open ? 'Hide popup' : 'Open CSS Transition'}
</Button>
<Popup anchor={anchor} open={open} {...other}>
{children}
</Popup>
</React.Fragment>
);
}

PopupWithTrigger.propTypes = {
children: PropTypes.node,
};

function PopupWithTrigger2(props) {
const [anchor, setAnchor] = React.useState(null);
const [open, setOpen] = React.useState(false);

const { children, ...other } = props;

return (
<React.Fragment>
<Button ref={setAnchor} onClick={() => setOpen((o) => !o)}>
{open ? 'Hide popup' : 'Open CSS Animation'}
</Button>
<Popup anchor={anchor} open={open} {...other}>
{children}
</Popup>
</React.Fragment>
);
}

PopupWithTrigger2.propTypes = {
children: PropTypes.node,
};
Loading

0 comments on commit d7d6583

Please sign in to comment.