Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into change-switch-fil…
Browse files Browse the repository at this point in the history
…es-to-ts
  • Loading branch information
lhilgert9 committed Nov 22, 2023
2 parents be63176 + c755973 commit 922509e
Show file tree
Hide file tree
Showing 146 changed files with 3,723 additions and 3,180 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: mui
open_collective: mui-org
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/@mui/material
custom: # Replace with a single custom sponsorship URL
2 changes: 1 addition & 1 deletion CHANGELOG.old.md
Original file line number Diff line number Diff line change
Expand Up @@ -9377,7 +9377,7 @@ Here are some highlights ✨:
- We have reduced the size of the bundle by ~8 kB gzipped.
- The propTypes runtime checks are back. You might experience new warnings.
- We have introduced 4 breaking changes.
- You can support me on [Patreon](https://www.patreon.com/oliviertassinari) and the community on [Open Collective](https://opencollective.com/mui) (#9460).
- You can support me on [Patreon](https://www.patreon.com/oliviertassinari) and the community on [Open Collective](https://opencollective.com/mui-org) (#9460).
Blog posts are coming.
- And many more bug fixes and documentation improvements.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
[![Follow on Twitter](https://img.shields.io/twitter/follow/MUI_hq.svg?label=follow+MUI)](https://twitter.com/MUI_hq)
[![Renovate status](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://github.com/mui/material-ui/issues/27062)
[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/mui/material-ui.svg)](https://isitmaintained.com/project/mui/material-ui 'Average time to resolve an issue')
[![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/mui)](https://opencollective.com/mui)
[![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/mui-org)](https://opencollective.com/mui-org)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1320/badge)](https://bestpractices.coreinfrastructure.org/projects/1320)

</div>
Expand Down Expand Up @@ -80,7 +80,7 @@ Diamond sponsors are those who have pledged \$1,500/month or more to MUI.

### Gold 🏆

via [Open Collective](https://opencollective.com/mui) or via [Patreon](https://www.patreon.com/oliviertassinari)
via [Open Collective](https://opencollective.com/mui-org) or via [Patreon](https://www.patreon.com/oliviertassinari)

<p>
<a href="https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=homepage" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://avatars.githubusercontent.com/u/30204434?s=192" alt="tidelift.com" title="Enterprise-ready open-source software" loading="lazy" /></a>
Expand Down
2 changes: 1 addition & 1 deletion apps/zero-runtime-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@mui/material": "file:../../packages/mui-material/build",
"@mui/utils": "file:../../packages/mui-utils/build",
"@mui/zero-runtime": "file:../../packages/zero-runtime/build",
"next": "13.5.0",
"next": "13.5.6",
"react": "18.2.0",
"react-dom": "18.2.0"
},
Expand Down
10 changes: 5 additions & 5 deletions apps/zero-runtime-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@babel/preset-env": "^7.23.2",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.23.2",
"@babel/preset-env": "^7.23.3",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@mui/material": "file:../../packages/mui-material/build",
"@mui/utils": "file:../../packages/mui-utils/build",
"@mui/zero-jest": "file:../../packages/zero-jest/build",
"@mui/zero-vite-plugin": "file:../../packages/zero-vite-plugin/build",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@vitejs/plugin-react": "^4.1.1",
"@testing-library/react": "^14.1.2",
"@vitejs/plugin-react": "^4.2.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdom": "^22.1.0",
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"react-redux": "^8.1.3",
"redux": "^4.2.1",
"serve-handler": "^6.1.5",
"styled-components": "^6.1.0",
"styled-components": "^6.1.1",
"styled-system": "^5.1.5",
"theme-ui": "^0.16.1",
"webpack": "^5.88.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default function UnstyledButtonsIntroduction() {
return (
<React.Fragment>
<Stack spacing={2} direction="row">
<Button className="CustomButton">Button</Button>
<Button className="CustomButton" disabled>
<Button className="IntroductionButton">Button</Button>
<Button className="IntroductionButton" disabled>
Disabled
</Button>
</Stack>
Expand Down Expand Up @@ -54,7 +54,7 @@ function Styles() {

return (
<style>{`
.CustomButton {
.IntroductionButton {
font-family: IBM Plex Sans, sans-serif;
font-weight: 600;
font-size: 0.875rem;
Expand All @@ -66,29 +66,29 @@ function Styles() {
transition: all 150ms ease;
cursor: pointer;
border: 1px solid ${cyan[500]};
box-shadow: 0 2px 4px ${
isDarkMode ? 'rgba(0, 0, 0, 0.5)' : 'rgba(13, 84, 99, 0.5)'
box-shadow: 0 2px 1px ${
isDarkMode ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
}, inset 0 1.5px 1px ${cyan[400]}, inset 0 -2px 1px ${cyan[600]};
}
.CustomButton:hover {
.IntroductionButton:hover {
background-color: ${cyan[600]};
}
.CustomButton:active {
.IntroductionButton.Mui-active {
background-color: ${cyan[700]};
box-shadow: none;
transform: scale(0.99);
}
.CustomButton:focus-visible {
.IntroductionButton.Mui-focusVisible {
box-shadow: 0 0 0 4px ${isDarkMode ? cyan[300] : cyan[200]};
outline: none;
}
.CustomButton:disabled {
.IntroductionButton.Mui-disabled {
background-color: ${isDarkMode ? grey[700] : grey[200]};
color: ${isDarkMode ? grey[200] : grey[700]};
border: 0;
cursor: not-allowed;
cursor: default;
box-shadow: none;
}
.CustomButton:disabled:hover {
background-color: ${isDarkMode ? grey[700] : grey[200]};
transform: scale(1);
}
`}</style>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default function UnstyledButtonsIntroduction() {
return (
<React.Fragment>
<Stack spacing={2} direction="row">
<Button className="CustomButton">Button</Button>
<Button className="CustomButton" disabled>
<Button className="IntroductionButton">Button</Button>
<Button className="IntroductionButton" disabled>
Disabled
</Button>
</Stack>
Expand Down Expand Up @@ -54,7 +54,7 @@ function Styles() {

return (
<style>{`
.CustomButton {
.IntroductionButton {
font-family: IBM Plex Sans, sans-serif;
font-weight: 600;
font-size: 0.875rem;
Expand All @@ -66,29 +66,29 @@ function Styles() {
transition: all 150ms ease;
cursor: pointer;
border: 1px solid ${cyan[500]};
box-shadow: 0 2px 4px ${
isDarkMode ? 'rgba(0, 0, 0, 0.5)' : 'rgba(13, 84, 99, 0.5)'
box-shadow: 0 2px 1px ${
isDarkMode ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
}, inset 0 1.5px 1px ${cyan[400]}, inset 0 -2px 1px ${cyan[600]};
}
.CustomButton:hover {
.IntroductionButton:hover {
background-color: ${cyan[600]};
}
.CustomButton:active {
.IntroductionButton.Mui-active {
background-color: ${cyan[700]};
box-shadow: none;
transform: scale(0.99);
}
.CustomButton:focus-visible {
.IntroductionButton.Mui-focusVisible {
box-shadow: 0 0 0 4px ${isDarkMode ? cyan[300] : cyan[200]};
outline: none;
}
.CustomButton:disabled {
.IntroductionButton.Mui-disabled {
background-color: ${isDarkMode ? grey[700] : grey[200]};
color: ${isDarkMode ? grey[200] : grey[700]};
border: 0;
cursor: not-allowed;
cursor: default;
box-shadow: none;
}
.CustomButton:disabled:hover {
background-color: ${isDarkMode ? grey[700] : grey[200]};
transform: scale(1);
}
`}</style>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<React.Fragment>
<Stack spacing={2} direction="row">
<Button className="CustomButton">Button</Button>
<Button className="CustomButton" disabled>
<Button className="IntroductionButton">Button</Button>
<Button className="IntroductionButton" disabled>
Disabled
</Button>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Button as BaseButton } from '@mui/base/Button';
import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';

Expand Down Expand Up @@ -47,34 +47,32 @@ const Button = styled(BaseButton)(
transition: all 150ms ease;
cursor: pointer;
border: 1px solid ${blue[500]};
box-shadow: 0 2px 4px ${
theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(0, 127, 255, 0.5)'
box-shadow: 0 2px 1px ${
theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
}, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
&:active {
&.${buttonClasses.active} {
background-color: ${blue[700]};
box-shadow: none;
transform: scale(0.99);
}
&:focus-visible {
&.${buttonClasses.focusVisible} {
box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
&:disabled {
&.${buttonClasses.disabled} {
background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
border: 0;
cursor: default;
box-shadow: none;
&:hover {
background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
}
transform: scale(1);
}
`,
);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Button as BaseButton } from '@mui/base/Button';
import { Button as BaseButton, buttonClasses } from '@mui/base/Button';
import { styled } from '@mui/system';
import Stack from '@mui/material/Stack';

Expand Down Expand Up @@ -47,34 +47,32 @@ const Button = styled(BaseButton)(
transition: all 150ms ease;
cursor: pointer;
border: 1px solid ${blue[500]};
box-shadow: 0 2px 4px ${
theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(0, 127, 255, 0.5)'
box-shadow: 0 2px 1px ${
theme.palette.mode === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(45, 45, 60, 0.2)'
}, inset 0 1.5px 1px ${blue[400]}, inset 0 -2px 1px ${blue[600]};
&:hover {
background-color: ${blue[600]};
}
&:active {
&.${buttonClasses.active} {
background-color: ${blue[700]};
box-shadow: none;
transform: scale(0.99);
}
&:focus-visible {
&.${buttonClasses.focusVisible} {
box-shadow: 0 0 0 4px ${theme.palette.mode === 'dark' ? blue[300] : blue[200]};
outline: none;
}
&:disabled {
&.${buttonClasses.disabled} {
background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
border: 0;
cursor: default;
box-shadow: none;
&:hover {
background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
}
transform: scale(1);
}
`,
);
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const CustomButton = React.forwardRef((props, ref) => {
<BaseButton
ref={ref}
className={clsx(
'cursor-pointer transition text-sm font-sans font-semibold leading-normal bg-violet-500 text-white rounded-lg px-4 py-2 border border-solid border-violet-500 shadow-[0_2px_1px_rgb(45_45_60_/_0.2),_inset_0_1.5px_1px_#a78bfa,_inset_0_-2px_1px_#7c3aed] dark:shadow-[0_2px_1px_rgb(0_0_0/_0.5),_inset_0_1.5px_1px_#a78bfa,_inset_0_-2px_1px_#7c3aed] hover:bg-violet-600 active:bg-violet-700 active:shadow-none focus-visible:shadow-[0_0_0_4px_#ddd6fe] dark:focus-visible:shadow-[0_0_0_4px_#a78bfa] focus-visible:outline-none disabled:text-slate-700 disabled:dark:text-slate-200 disabled:bg-slate-200 disabled:dark:bg-slate-700 disabled:cursor-not-allowed disabled:shadow-none disabled:dark:shadow-none disabled:hover:bg-slate-200 disabled:hover:dark:bg-slate-700 disabled:border-none',
'cursor-pointer transition text-sm font-sans font-semibold leading-normal bg-violet-500 text-white rounded-lg px-4 py-2 border border-solid border-violet-500 shadow-[0_2px_1px_rgb(45_45_60_/_0.2),_inset_0_1.5px_1px_#a78bfa,_inset_0_-2px_1px_#7c3aed] dark:shadow-[0_2px_1px_rgb(0_0_0/_0.5),_inset_0_1.5px_1px_#a78bfa,_inset_0_-2px_1px_#7c3aed] hover:bg-violet-600 active:bg-violet-700 active:shadow-none active:scale-[0.99] focus-visible:shadow-[0_0_0_4px_#ddd6fe] dark:focus-visible:shadow-[0_0_0_4px_#a78bfa] focus-visible:outline-none ui-disabled:text-slate-700 ui-disabled:dark:text-slate-200 ui-disabled:bg-slate-200 ui-disabled:dark:bg-slate-700 ui-disabled:cursor-default ui-disabled:shadow-none ui-disabled:dark:shadow-none ui-disabled:hover:bg-slate-200 ui-disabled:hover:dark:bg-slate-700 ui-disabled:border-none',
className,
)}
{...other}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const CustomButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
<BaseButton
ref={ref}
className={clsx(
'cursor-pointer transition text-sm font-sans font-semibold leading-normal bg-violet-500 text-white rounded-lg px-4 py-2 border border-solid border-violet-500 shadow-[0_2px_1px_rgb(45_45_60_/_0.2),_inset_0_1.5px_1px_#a78bfa,_inset_0_-2px_1px_#7c3aed] dark:shadow-[0_2px_1px_rgb(0_0_0/_0.5),_inset_0_1.5px_1px_#a78bfa,_inset_0_-2px_1px_#7c3aed] hover:bg-violet-600 active:bg-violet-700 active:shadow-none focus-visible:shadow-[0_0_0_4px_#ddd6fe] dark:focus-visible:shadow-[0_0_0_4px_#a78bfa] focus-visible:outline-none disabled:text-slate-700 disabled:dark:text-slate-200 disabled:bg-slate-200 disabled:dark:bg-slate-700 disabled:cursor-not-allowed disabled:shadow-none disabled:dark:shadow-none disabled:hover:bg-slate-200 disabled:hover:dark:bg-slate-700 disabled:border-none',
'cursor-pointer transition text-sm font-sans font-semibold leading-normal bg-violet-500 text-white rounded-lg px-4 py-2 border border-solid border-violet-500 shadow-[0_2px_1px_rgb(45_45_60_/_0.2),_inset_0_1.5px_1px_#a78bfa,_inset_0_-2px_1px_#7c3aed] dark:shadow-[0_2px_1px_rgb(0_0_0/_0.5),_inset_0_1.5px_1px_#a78bfa,_inset_0_-2px_1px_#7c3aed] hover:bg-violet-600 active:bg-violet-700 active:shadow-none active:scale-[0.99] focus-visible:shadow-[0_0_0_4px_#ddd6fe] dark:focus-visible:shadow-[0_0_0_4px_#a78bfa] focus-visible:outline-none ui-disabled:text-slate-700 ui-disabled:dark:text-slate-200 ui-disabled:bg-slate-200 ui-disabled:dark:bg-slate-700 ui-disabled:cursor-default ui-disabled:shadow-none ui-disabled:dark:shadow-none ui-disabled:hover:bg-slate-200 ui-disabled:hover:dark:bg-slate-700 ui-disabled:border-none',
className,
)}
{...other}
Expand Down
15 changes: 7 additions & 8 deletions docs/data/base/components/button/UnstyledButtonsDisabledFocus.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import Stack from '@mui/material/Stack';
export default function UnstyledButtonsDisabledFocus() {
return (
<Stack spacing={2}>
<Button disabled>focusableWhenDisabled = false</Button>
<Button disabled>{'focusableWhenDisabled = false'}</Button>
<Button disabled focusableWhenDisabled>
focusableWhenDisabled = true
{'focusableWhenDisabled = true'}
</Button>
</Stack>
);
Expand Down Expand Up @@ -60,6 +60,7 @@ const Button = styled(BaseButton)(
&.${buttonClasses.active} {
background-color: ${blue[700]};
box-shadow: none;
transform: scale(0.99);
}
&.${buttonClasses.focusVisible} {
Expand All @@ -69,13 +70,11 @@ const Button = styled(BaseButton)(
&.${buttonClasses.disabled} {
background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]}};
border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
cursor: not-allowed;
color: ${theme.palette.mode === 'dark' ? grey[200] : grey[700]};
border: 0;
cursor: default;
box-shadow: none;
&:hover {
background-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
}
transform: scale(1);
}
`,
);
Loading

0 comments on commit 922509e

Please sign in to comment.