Skip to content

Commit

Permalink
[base] Remove unstyled suffix from Base components + Codemod script (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Apr 24, 2023
1 parent 4618307 commit e555828
Show file tree
Hide file tree
Showing 545 changed files with 5,036 additions and 6,105 deletions.
6 changes: 3 additions & 3 deletions docs/data/base/components/badge/AccessibleBadges.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { styled } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';
import MailIcon from '@mui/icons-material/Mail';

function notificationsLabel(count) {
Expand Down Expand Up @@ -31,7 +31,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -43,7 +43,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand Down
6 changes: 3 additions & 3 deletions docs/data/base/components/badge/AccessibleBadges.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { styled } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';
import MailIcon from '@mui/icons-material/Mail';

function notificationsLabel(count: number) {
Expand Down Expand Up @@ -31,7 +31,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -43,7 +43,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand Down
6 changes: 3 additions & 3 deletions docs/data/base/components/badge/BadgeMax.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import { styled } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';
import MailIcon from '@mui/icons-material/Mail';

export default function BadgeMax() {
Expand All @@ -28,7 +28,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -40,7 +40,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand Down
6 changes: 3 additions & 3 deletions docs/data/base/components/badge/BadgeMax.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import { styled } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';
import MailIcon from '@mui/icons-material/Mail';

export default function BadgeMax() {
Expand All @@ -28,7 +28,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -40,7 +40,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand Down
10 changes: 5 additions & 5 deletions docs/data/base/components/badge/BadgeVisibility.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import { styled } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';
import ButtonGroup from '@mui/material/ButtonGroup';
import Button from '@mui/material/Button';
import AddIcon from '@mui/icons-material/Add';
Expand All @@ -27,7 +27,7 @@ export default function BadgeVisibility() {
'& > *': {
marginBottom: 2,
},
[`& .${badgeUnstyledClasses.root}`]: {
[`& .${badgeClasses.root}`]: {
marginRight: 4,
},
}}
Expand Down Expand Up @@ -77,7 +77,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -89,7 +89,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand All @@ -110,7 +110,7 @@ const StyledBadge = styled(BadgeUnstyled)(
transform-origin: 100% 0;
}
& .${badgeUnstyledClasses.invisible} {
& .${badgeClasses.invisible} {
opacity: 0;
pointer-events: none;
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data/base/components/badge/BadgeVisibility.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import { styled } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';
import ButtonGroup from '@mui/material/ButtonGroup';
import Button from '@mui/material/Button';
import AddIcon from '@mui/icons-material/Add';
Expand All @@ -27,7 +27,7 @@ export default function BadgeVisibility() {
'& > *': {
marginBottom: 2,
},
[`& .${badgeUnstyledClasses.root}`]: {
[`& .${badgeClasses.root}`]: {
marginRight: 4,
},
}}
Expand Down Expand Up @@ -77,7 +77,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -89,7 +89,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand All @@ -110,7 +110,7 @@ const StyledBadge = styled(BadgeUnstyled)(
transform-origin: 100% 0;
}
& .${badgeUnstyledClasses.invisible} {
& .${badgeClasses.invisible} {
opacity: 0;
pointer-events: none;
}
Expand Down
8 changes: 4 additions & 4 deletions docs/data/base/components/badge/ShowZeroBadge.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import { styled } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';
import MailIcon from '@mui/icons-material/Mail';

export default function ShowZeroBadge() {
Expand All @@ -26,7 +26,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -38,7 +38,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand All @@ -59,7 +59,7 @@ const StyledBadge = styled(BadgeUnstyled)(
transform-origin: 100% 0;
}
& .${badgeUnstyledClasses.invisible} {
& .${badgeClasses.invisible} {
display: none;
}
`,
Expand Down
8 changes: 4 additions & 4 deletions docs/data/base/components/badge/ShowZeroBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import { styled } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';
import MailIcon from '@mui/icons-material/Mail';

export default function ShowZeroBadge() {
Expand All @@ -26,7 +26,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -38,7 +38,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand All @@ -59,7 +59,7 @@ const StyledBadge = styled(BadgeUnstyled)(
transform-origin: 100% 0;
}
& .${badgeUnstyledClasses.invisible} {
& .${badgeClasses.invisible} {
display: none;
}
`,
Expand Down
6 changes: 3 additions & 3 deletions docs/data/base/components/badge/UnstyledBadge.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { styled, Box } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';

function BadgeContent() {
return (
Expand Down Expand Up @@ -37,7 +37,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -50,7 +50,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand Down
6 changes: 3 additions & 3 deletions docs/data/base/components/badge/UnstyledBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { styled, Box } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';

function BadgeContent() {
return (
Expand Down Expand Up @@ -37,7 +37,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -50,7 +50,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand Down
6 changes: 3 additions & 3 deletions docs/data/base/components/badge/UnstyledBadgeIntroduction.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { styled, Box } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';

function BadgeContent() {
return (
Expand Down Expand Up @@ -37,7 +37,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -50,7 +50,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand Down
6 changes: 3 additions & 3 deletions docs/data/base/components/badge/UnstyledBadgeIntroduction.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { styled, Box } from '@mui/system';
import BadgeUnstyled, { badgeUnstyledClasses } from '@mui/base/BadgeUnstyled';
import Badge, { badgeClasses } from '@mui/base/Badge';

function BadgeContent() {
return (
Expand Down Expand Up @@ -37,7 +37,7 @@ const grey = {
900: '#24292f',
};

const StyledBadge = styled(BadgeUnstyled)(
const StyledBadge = styled(Badge)(
({ theme }) => `
box-sizing: border-box;
margin: 0;
Expand All @@ -50,7 +50,7 @@ const StyledBadge = styled(BadgeUnstyled)(
display: inline-block;
line-height: 1;
& .${badgeUnstyledClasses.badge} {
& .${badgeClasses.badge} {
z-index: auto;
position: absolute;
top: 0;
Expand Down
Loading

0 comments on commit e555828

Please sign in to comment.