Skip to content

Commit 65e7dac

Browse files
authored
[mui-plugin-rtl] fix RTL does not work with CSS layer with a new package (#46230)
1 parent ae042db commit 65e7dac

28 files changed

+557
-102
lines changed

docs/data/joy/customization/right-to-left/RtlDemo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import rtlPlugin from 'stylis-plugin-rtl';
2+
import rtlPlugin from '@mui/stylis-plugin-rtl';
33
import { prefixer } from 'stylis';
44
import { CacheProvider } from '@emotion/react';
55
import createCache from '@emotion/cache';

docs/data/joy/customization/right-to-left/RtlDemo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import rtlPlugin from 'stylis-plugin-rtl';
2+
import rtlPlugin from '@mui/stylis-plugin-rtl';
33
import { prefixer } from 'stylis';
44
import { CacheProvider } from '@emotion/react';
55
import createCache from '@emotion/cache';

docs/data/joy/customization/right-to-left/RtlOptOut.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { prefixer } from 'stylis';
3-
import rtlPlugin from 'stylis-plugin-rtl';
3+
import rtlPlugin from '@mui/stylis-plugin-rtl';
44
import { CacheProvider } from '@emotion/react';
55
import createCache from '@emotion/cache';
66
import { styled } from '@mui/joy/styles';

docs/data/joy/customization/right-to-left/RtlOptOut.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { prefixer } from 'stylis';
3-
import rtlPlugin from 'stylis-plugin-rtl';
3+
import rtlPlugin from '@mui/stylis-plugin-rtl';
44
import { CacheProvider } from '@emotion/react';
55
import createCache from '@emotion/cache';
66
import { styled } from '@mui/joy/styles';

docs/data/joy/customization/right-to-left/right-to-left.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,33 @@ const theme = extendTheme({
6060

6161
### 3. Configure RTL style plugin
6262

63-
Install the [`stylis-plugin-rtl`](https://github.com/styled-components/stylis-plugin-rtl) using one of the commands below:
63+
Install the `@mui/stylis-plugin-rtl` using one of the commands below:
6464

6565
<codeblock storageKey="package-manager">
6666

6767
```bash npm
68-
npm install stylis stylis-plugin-rtl
68+
npm install stylis @mui/stylis-plugin-rtl
6969
```
7070

7171
```bash pnpm
72-
pnpm add stylis stylis-plugin-rtl
72+
pnpm add stylis @mui/stylis-plugin-rtl
7373
```
7474

7575
```bash yarn
76-
yarn add stylis stylis-plugin-rtl
76+
yarn add stylis @mui/stylis-plugin-rtl
7777
```
7878

7979
</codeblock>
8080

8181
#### With Emotion
8282

83-
If you're using Emotion, use the [CacheProvider](https://emotion.sh/docs/cache-provider) to create a new cache instance that uses `rtlPlugin` from `stylis-plugin-rtl` and add that to the top of your application tree:
83+
If you're using Emotion, use the [CacheProvider](https://emotion.sh/docs/cache-provider) to create a new cache instance that uses `rtlPlugin` from `@mui/stylis-plugin-rtl` and add that to the top of your application tree:
8484

8585
```jsx
8686
import { CacheProvider } from '@emotion/react';
8787
import createCache from '@emotion/cache';
8888
import { prefixer } from 'stylis';
89-
import rtlPlugin from 'stylis-plugin-rtl';
89+
import rtlPlugin from '@mui/stylis-plugin-rtl';
9090

9191
// Create rtl cache
9292
const cacheRtl = createCache({
@@ -105,7 +105,7 @@ If you're using styled-components, use the [StyleSheetManager](https://styled-co
105105

106106
```jsx
107107
import { StyleSheetManager } from 'styled-components';
108-
import rtlPlugin from 'stylis-plugin-rtl';
108+
import rtlPlugin from '@mui/stylis-plugin-rtl';
109109

110110
function Rtl(props) {
111111
return (

docs/data/material/customization/right-to-left/RtlDemo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { createTheme, ThemeProvider } from '@mui/material/styles';
33
import TextField from '@mui/material/TextField';
4-
import rtlPlugin from 'stylis-plugin-rtl';
4+
import rtlPlugin from '@mui/stylis-plugin-rtl';
55
import { prefixer } from 'stylis';
66
import { CacheProvider } from '@emotion/react';
77
import createCache from '@emotion/cache';

docs/data/material/customization/right-to-left/RtlDemo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { createTheme, ThemeProvider, Theme } from '@mui/material/styles';
33
import TextField from '@mui/material/TextField';
4-
import rtlPlugin from 'stylis-plugin-rtl';
4+
import rtlPlugin from '@mui/stylis-plugin-rtl';
55
import { prefixer } from 'stylis';
66
import { CacheProvider } from '@emotion/react';
77
import createCache from '@emotion/cache';

docs/data/material/customization/right-to-left/RtlOptOut.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { prefixer } from 'stylis';
3-
import rtlPlugin from 'stylis-plugin-rtl';
3+
import rtlPlugin from '@mui/stylis-plugin-rtl';
44
import { CacheProvider } from '@emotion/react';
55
import createCache from '@emotion/cache';
66
import { styled } from '@mui/material/styles';

docs/data/material/customization/right-to-left/RtlOptOut.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { prefixer } from 'stylis';
3-
import rtlPlugin from 'stylis-plugin-rtl';
3+
import rtlPlugin from '@mui/stylis-plugin-rtl';
44
import { CacheProvider } from '@emotion/react';
55
import createCache from '@emotion/cache';
66
import { styled } from '@mui/material/styles';

docs/data/material/customization/right-to-left/right-to-left.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,33 @@ const theme = createTheme({
6060

6161
### 3. Configure RTL style plugin
6262

63-
Install the [`stylis-plugin-rtl`](https://github.com/styled-components/stylis-plugin-rtl) using one of the commands below:
63+
Install the `@mui/stylis-plugin-rtl` using one of the commands below:
6464

6565
<codeblock storageKey="package-manager">
6666

6767
```bash npm
68-
npm install stylis stylis-plugin-rtl
68+
npm install stylis @mui/stylis-plugin-rtl
6969
```
7070

7171
```bash pnpm
72-
pnpm add stylis stylis-plugin-rtl
72+
pnpm add stylis @mui/stylis-plugin-rtl
7373
```
7474

7575
```bash yarn
76-
yarn add stylis stylis-plugin-rtl
76+
yarn add stylis @mui/stylis-plugin-rtl
7777
```
7878

7979
</codeblock>
8080

8181
#### With Emotion
8282

83-
If you're using Emotion, use the [CacheProvider](https://emotion.sh/docs/cache-provider) to create a new cache instance that uses `rtlPlugin` from `stylis-plugin-rtl` and add that to the top of your application tree:
83+
If you're using Emotion, use the [CacheProvider](https://emotion.sh/docs/cache-provider) to create a new cache instance that uses `rtlPlugin` from `@mui/stylis-plugin-rtl` and add that to the top of your application tree:
8484

8585
```jsx
8686
import { CacheProvider } from '@emotion/react';
8787
import createCache from '@emotion/cache';
8888
import { prefixer } from 'stylis';
89-
import rtlPlugin from 'stylis-plugin-rtl';
89+
import rtlPlugin from '@mui/stylis-plugin-rtl';
9090

9191
// Create rtl cache
9292
const rtlCache = createCache({
@@ -105,7 +105,7 @@ If you're using styled-components, use the [StyleSheetManager](https://styled-co
105105

106106
```jsx
107107
import { StyleSheetManager } from 'styled-components';
108-
import rtlPlugin from 'stylis-plugin-rtl';
108+
import rtlPlugin from '@mui/stylis-plugin-rtl';
109109

110110
function Rtl(props) {
111111
return (

0 commit comments

Comments
 (0)