Skip to content

Commit eb04c09

Browse files
authoredJul 24, 2023
[Joy] Replace leftover Joy- prefix with Mui- (#38086)
1 parent ec7de7c commit eb04c09

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed
 

‎docs/data/joy/components/menu/MenuIconSideNavExample.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function MenuButton({ children, menu, open, onOpen, onLeaveMenu, label, ...props
7272
onKeyDown={handleButtonKeyDown}
7373
sx={{
7474
bgcolor: open ? 'neutral.plainHoverBg' : undefined,
75-
'&.Joy-focusVisible': {
75+
'&:focus-visible': {
7676
bgcolor: 'neutral.plainHoverBg',
7777
},
7878
}}

‎docs/data/joy/components/menu/MenuIconSideNavExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function MenuButton({
9191
onKeyDown={handleButtonKeyDown}
9292
sx={{
9393
bgcolor: open ? 'neutral.plainHoverBg' : undefined,
94-
'&.Joy-focusVisible': {
94+
'&:focus-visible': {
9595
bgcolor: 'neutral.plainHoverBg',
9696
},
9797
}}

‎docs/data/joy/components/radio-button/radio-button.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,21 @@ Visit the [WAI-ARIA documentation](https://www.w3.org/WAI/ARIA/apg/patterns/radi
197197
The Radio Group component is composed of a root `<div>` element that can wrap multiple Radio components.
198198

199199
```html
200-
<div class="JoyRadioGroup-root">
200+
<div class="MuiRadioGroup-root">
201201
<!-- Radio components here -->
202202
</div>
203203
```
204204

205205
The Radio component is composed of a root `<span>`, with further nested `<span>` elements for the radio button, icon, action (with a nested `<input>`), and its associated `<label>`.
206206

207207
```html
208-
<span class="JoyRadio-root">
209-
<span class="JoyRadio-radio">
210-
<span class="JoyRadio-icon"></span>
211-
<span class="JoyRadio-action">
212-
<input class="JoyRadio-input">
208+
<span class="MuiRadio-root">
209+
<span class="MuiRadio-radio">
210+
<span class="MuiRadio-icon"></span>
211+
<span class="MuiRadio-action">
212+
<input class="MuiRadio-input">
213213
</span>
214214
</span>
215-
<label class="JoyRadio-label">
215+
<label class="MuiRadio-label">
216216
</span>
217217
```

‎docs/data/joy/getting-started/templates/framesx-web-blocks/theme.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { extendTheme } from '@mui/joy/styles';
2+
import { inputClasses } from '@mui/joy/Input';
23

34
export default extendTheme({
45
colorSchemes: {
@@ -56,7 +57,7 @@ export default extendTheme({
5657
root: ({ ownerState, theme }) => ({
5758
...(ownerState.variant === 'outlined' &&
5859
ownerState.color !== 'context' && {
59-
'&:not(.Joy-focused):hover::before': {
60+
[`&:not(.${inputClasses.focused}):hover::before`]: {
6061
boxShadow: `inset 0 0 0 2px ${
6162
theme.vars.palette?.[ownerState.color!]?.outlinedBorder
6263
}`,

‎packages/mui-joy/src/Autocomplete/Autocomplete.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(
385385
...props,
386386
id: id ?? formControl?.htmlFor,
387387
componentName: 'Autocomplete',
388-
unstable_classNamePrefix: 'Joy',
388+
unstable_classNamePrefix: 'Mui',
389389
unstable_isActiveElementInListbox: defaultIsActiveElementInListbox,
390390
});
391391

‎packages/mui-joy/src/Container/Container.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { useThemeProps } from '../styles';
88
import { ContainerTypeMap } from './ContainerProps';
99

1010
const Container = createContainer<Theme>({
11-
componentName: 'JoyContainer',
1211
createStyledComponent: styled('div', {
1312
name: 'JoyContainer',
1413
slot: 'Root',

‎packages/mui-joy/src/className/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { unstable_generateUtilityClass, unstable_generateUtilityClasses } from '
33
export { unstable_ClassNameGenerator } from '@mui/utils';
44

55
export const generateUtilityClass = (componentName: string, slot: string) =>
6-
unstable_generateUtilityClass(componentName, slot, 'Joy');
6+
unstable_generateUtilityClass(componentName, slot, 'Mui');
77

88
export const generateUtilityClasses = <T extends string>(componentName: string, slots: Array<T>) =>
9-
unstable_generateUtilityClasses(componentName, slots, 'Joy');
9+
unstable_generateUtilityClasses(componentName, slots, 'Mui');

‎test/e2e/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ describe('e2e', () => {
232232
await page.keyboard.down('ArrowDown'); // moves to 4th option
233233

234234
const listbox = (await screen.getByRole('listbox'))!;
235-
const focusedOption = (await listbox.$('.Joy-focused'))!;
235+
const focusedOption = (await listbox.$('.Mui-focused'))!;
236236
const focusedOptionText = await focusedOption.innerHTML();
237237

238238
expect(focusedOptionText).to.equal('four');

0 commit comments

Comments
 (0)
Please sign in to comment.