Skip to content

Commit f995599

Browse files
Merge branch 'master' into issue-42379-AppBar-color-inherit-inconsistent
2 parents 6e338fa + 3a920ad commit f995599

File tree

325 files changed

+15475
-12379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

325 files changed

+15475
-12379
lines changed

.circleci/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ commands:
7575
node scripts/useReactVersion.mjs
7676
# log a patch for maintainers who want to check out this change
7777
git --no-pager diff HEAD
78+
7879
- when:
7980
condition: << parameters.browsers >>
8081
steps:
@@ -93,6 +94,13 @@ commands:
9394
name: Restore playwright cache
9495
keys:
9596
- v6-playwright-{{ arch }}-{{ checksum "/tmp/playwright_info.json" }}
97+
- when:
98+
condition:
99+
not: << parameters.browsers >>
100+
steps:
101+
# See https://stackoverflow.com/a/73411601
102+
- run: corepack enable --install-directory ~/bin
103+
96104
- run:
97105
name: View install environment
98106
command: |

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# fetch all tags which are required for `pnpm release:changelog`
3131
fetch-depth: 0
3232
- name: Set up pnpm
33-
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
33+
uses: pnpm/action-setup@v4
3434
- name: Use Node.js 18.x
3535
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
3636
with:

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
# [Versions](https://mui.com/versions/)
22

3+
## v5.16.0
4+
5+
<!-- generated comparing v5.15.21..master -->
6+
7+
_Jul 5, 2024_
8+
9+
A big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
10+
11+
- 🚀 Added `InitColorSchemeScript` for Next.js App Router (#42829) @siriwatknp
12+
13+
14+
15+
- [Alert] Add ability to override slot props (@alexey-kozlenkov) (#42808) @alexey-kozlenkov
16+
- Add `InitColorSchemeScript` for Next.js App Router (#42829) @siriwatknp
17+
- Add `DefaultPropsProvider` (#42820) @siriwatknp
18+
- Support `CssVarsTheme` in `responsiveFontSizes` return type (@jxdp) (#42806) @jxdp
19+
- Remove warning from `getInitColorSchemeScript` (#42838) @siriwatknp
20+
21+
### Docs
22+
23+
- [docs] Fix 301 MDN redirections @oliviertassinari
24+
25+
### Core
26+
27+
- [mui-utils][test] Remove usages of deprecated react-dom APIs (@aarongarciah) (#42813) @aarongarciah
28+
29+
All contributors of this release in alphabetical order: @aarongarciah, @alexey-kozlenkov, @jxdp, @oliviertassinari, @siriwatknp
30+
31+
## v5.15.21
32+
33+
<!-- generated comparing v5.15.20..master -->
34+
35+
_Jun 28, 2024_
36+
37+
A big thanks to the 7 contributors who made this release possible.
38+
39+
40+
41+
- [Autocomplete] Fix renderOption props type (@DiegoAndai) (#42709) @DiegoAndai
42+
- [Stepper] Generate class for `nonLinear` prop (@alexismo) (#42677) @alexismo
43+
44+
### Docs
45+
46+
- Use new email for sponsoring @oliviertassinari
47+
- Fix 301 links (@alexfauquette) (#42700) @alexfauquette
48+
- [material-ui][Select] Fix the `SelectAutoWidth` demo menu item value (@Danielkhakbaz) (#42696) @Danielkhakbaz
49+
- [material-ui][Autocomplete] Fix more React 18.3 key spread warnings in demos (#42766) @wbt
50+
- [material-ui] Fix sign in side image (#42708) @zanivan
51+
- [website] Add Ale to team (#42769) @alelthomas
52+
53+
### Core
54+
55+
- [core] Cherry pick pnpm updates (#42763) @DiegoAndai
56+
- [website] Add Armin to the team members (@arminmeh) (#42681) @arminmeh
57+
- [website] Open Staff Engineer role for Pigment CSS (@mnajdova) (#42669) @mnajdova
58+
59+
All contributors of this release in alphabetical order: @alexfauquette, @alexismo, @arminmeh, @Danielkhakbaz, @DiegoAndai, @mnajdova, @oliviertassinari
60+
361
## v5.15.20
462

563
<!-- generated comparing v5.15.19..master -->

apps/pigment-css-next-app/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
"@mui/icons-material": "file:../../packages/mui-icons-material/build",
1919
"@emotion/cache": "latest",
2020
"local-ui-lib": "workspace:^",
21-
"react": "^18.2.0",
22-
"react-dom": "^18.2.0",
23-
"next": "latest"
21+
"next": "latest",
22+
"react": "^18.3.1",
23+
"react-dom": "^18.3.1"
2424
},
2525
"devDependencies": {
2626
"@pigment-css/unplugin": "file:../../packages/pigment-css-unplugin",
2727
"@pigment-css/nextjs-plugin": "file:../../packages/pigment-css-nextjs-plugin",
2828
"@types/node": "^20.5.7",
29-
"@types/react": "^18.2.55",
30-
"@types/react-dom": "^18.2.19",
29+
"@types/react": "^18.3.3",
30+
"@types/react-dom": "^18.3.0",
3131
"eslint": "^8.56.0",
3232
"typescript": "^5.3.3"
3333
}

apps/pigment-css-vite-app/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"@mui/icons-material": "file:../../packages/mui-icons-material/build",
1818
"clsx": "^2.1.0",
1919
"local-ui-lib": "workspace:^",
20-
"react": "^18.2.0",
21-
"react-dom": "^18.2.0",
20+
"react": "^18.3.1",
21+
"react-dom": "^18.3.1",
2222
"react-router": "^6.22.1",
2323
"react-router-dom": "^6.22.1"
2424
},
@@ -27,8 +27,8 @@
2727
"@babel/preset-react": "^7.23.3",
2828
"@babel/preset-typescript": "^7.23.3",
2929
"@pigment-css/vite-plugin": "file:../../packages/pigment-css-vite-plugin",
30-
"@types/react": "^18.2.55",
31-
"@types/react-dom": "^18.2.19",
30+
"@types/react": "^18.3.3",
31+
"@types/react-dom": "^18.3.0",
3232
"@vitejs/plugin-react": "^4.2.1",
3333
"postcss": "^8.4.35",
3434
"postcss-combine-media-query": "^1.0.1",

benchmark/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
"jss": "^10.10.0",
2727
"playwright": "^1.42.1",
2828
"prop-types": "^15.8.1",
29-
"react": "^18.2.0",
30-
"react-dom": "^18.2.0",
31-
"react-is": "^18.2.0",
29+
"react": "^18.3.1",
30+
"react-dom": "^18.3.1",
31+
"react-is": "^18.3.1",
3232
"react-jss": "^10.10.0",
3333
"react-redux": "^8.1.3",
3434
"redux": "^4.2.1",

docs/data/about/teamMembers.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,5 +331,13 @@
331331
"locationCountry": "nl",
332332
"about": "♟️ Chess, 🛠️ Small DIY projects and learning about space 🌌",
333333
"github": "arminmeh"
334+
},
335+
{
336+
"name": "Alejandra Thomas",
337+
"title": "Content Engineer",
338+
"location": "New York, US",
339+
"locationCountry": "us",
340+
"about": "Books 📚, long coffee walks ☕️, and my cat 🐈‍⬛",
341+
"github": "alelthomas"
334342
}
335343
]

docs/data/joy/components/autocomplete/autocomplete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ In the event you want the avoid autofill, you can try the following:
337337
/>
338338
```
339339

340-
Read [the guide on MDN](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion) for more details.
340+
Read [the guide on MDN](https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/Turning_off_form_autocompletion) for more details.
341341

342342
### iOS VoiceOver
343343

docs/data/joy/customization/dark-mode/dark-mode.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ When you change the `defaultMode` to another value, you must clear the local sto
1212

1313
{{"demo": "DarkModeByDefault.js"}}
1414

15-
For server-side applications, check out the framework setup in [the section below](#server-side-rendering) and provide the same value to the `getInitColorSchemeScript` function:
15+
For server-side applications, check out the framework setup in [the section below](#server-side-rendering) and provide the same value to the `InitColorSchemeScript` component:
1616

1717
```js
18-
getInitColorSchemeScript({ defaultMode: 'dark' });
18+
<InitColorSchemeScript defaultMode="dark" />
1919
```
2020

2121
## Matching device's preference
@@ -28,10 +28,10 @@ import { CssVarsProvider } from '@mui/joy/styles';
2828
<CssVarsProvider defaultMode="system">...</CssVarsProvider>;
2929
```
3030

31-
For server-side applications, check out the framework setup in [the section below](#server-side-rendering) and provide the same value to the `getInitColorSchemeScript` function:
31+
For server-side applications, check out the framework setup in [the section below](#server-side-rendering) and provide the same value to the `InitColorSchemeScript` component:
3232

3333
```js
34-
getInitColorSchemeScript({ defaultMode: 'system' });
34+
<InitColorSchemeScript defaultMode="system" />
3535
```
3636

3737
### Identify the system mode
@@ -121,23 +121,47 @@ If you try to render your UI based on the server, before mounting on the client,
121121

122122
### Avoiding screen flickering
123123

124-
To [prevent the UI from flickering](/joy-ui/main-features/dark-mode-optimization/#the-problem-flickering-on-first-load), apply `getInitColorSchemeScript()` before the main application script-it varies across frameworks:
124+
To [prevent the UI from flickering](/joy-ui/main-features/dark-mode-optimization/#the-problem-flickering-on-first-load), add the `<InitColorSchemeScript />` component before the `<CssVarsProvider />` component:
125+
126+
### Next.js App Router
127+
128+
To use the Joy UI API with a Next.js project with the App Router, add the following code to the [`app/layout.js`](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts#layouts) file in order to prevent flickering:
129+
130+
```jsx title="layout.js"
131+
import InitColorSchemeScript from '@mui/joy/InitColorSchemeScript';
132+
import { CssVarsProvider } from '@mui/joy/styles';
133+
import CssBaseline from '@mui/joy/CssBaseline';
134+
135+
export default function RootLayout({ children }) {
136+
return (
137+
<html lang="en" suppressHydrationWarning={true}>
138+
<body>
139+
<InitColorSchemeScript />
140+
<CssVarsProvider>
141+
<CssBaseline />
142+
{children}
143+
</CssVarsProvider>
144+
</body>
145+
</html>
146+
);
147+
}
148+
```
125149

126150
### Next.js Pages Router
127151

128152
To use the Joy UI API with a Next.js project, add the following code to the custom [`pages/_document.js`](https://nextjs.org/docs/pages/building-your-application/routing/custom-document) file:
129153

130154
```jsx
131155
import Document, { Html, Head, Main, NextScript } from 'next/document';
132-
import { getInitColorSchemeScript } from '@mui/joy/styles';
156+
import InitColorSchemeScript from '@mui/joy/InitColorSchemeScript';
133157

134158
export default class MyDocument extends Document {
135159
render() {
136160
return (
137161
<Html data-color-scheme="light">
138162
<Head>...</Head>
139163
<body>
140-
{getInitColorSchemeScript()}
164+
<InitColorSchemeScript />
141165
<Main />
142166
<NextScript />
143167
</body>

docs/data/joy/main-features/dark-mode-optimization/dark-mode-optimization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ Solving this problem required us to take a novel approach to styling and theming
2727

2828
Thanks to Joy UI's built-in support for CSS variables, your app can render all of its color schemes at build time, so that the user's preference can be injected _before_ the DOM is rendered in the browser.
2929

30-
Joy UI provides the `getInitColorSchemeScript()` function to make this flash-free dark mode possible with React frameworks like Next.js or Remix.
30+
Joy UI provides the `InitColorSchemeScript` component to make this flash-free dark mode possible with React frameworks like Next.js or Remix.
3131
This function must be placed before the main script so it can apply the correct stylesheet before your components are rendered.
3232

3333
The code snippet below shows how this works with the Next.js Pages Router:
3434

3535
```jsx
3636
import Document, { Html, Head, Main, NextScript } from 'next/document';
37-
import { getInitColorSchemeScript } from '@mui/joy/styles';
37+
import InitColorSchemeScript from '@mui/joy/InitColorSchemeScript';
3838

3939
export default class MyDocument extends Document {
4040
render() {
4141
return (
4242
<Html data-color-scheme="light">
4343
<Head>...</Head>
4444
<body>
45-
{getInitColorSchemeScript()}
45+
<InitColorSchemeScript />
4646
<Main />
4747
<NextScript />
4848
</body>

0 commit comments

Comments
 (0)