Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data/material/components/alert/IconAlerts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Alert from '@mui/material/Alert';
import CheckIcon from '@mui/icons-material/Check';
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutlined';
import Stack from '@mui/material/Stack';

export default function IconAlerts() {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/alert/IconAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Alert from '@mui/material/Alert';
import CheckIcon from '@mui/icons-material/Check';
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutlined';
import Stack from '@mui/material/Stack';

export default function IconAlerts() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ export default function SearchIcons() {
<Icons icons={deferredIcons} handleOpenClick={handleOpenClick} />
</Grid>
<DialogDetails
open={!!selectedIcon}
open={Boolean(dialogSelectedIcon)}
selectedIcon={dialogSelectedIcon}
handleClose={handleClose}
/>
Expand Down
24 changes: 0 additions & 24 deletions docs/data/material/components/material-icons/synonyms.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const synonyms = {
Addchart:
'+ analytics bars data diagram infographic measure metrics new plus statistics symbol tracking',
AddCircle: '+ counter create new plus',
AddCircleOutline: '+ create new plus',
AddComment: '+ bubble chat communicate feedback message new plus speech symbol',
AddIcCall: '+ cell contact device hardware mobile new plus symbol telephone',
AddLink: 'attach clip new plus symbol',
Expand Down Expand Up @@ -448,7 +447,6 @@ const synonyms = {
'Android battery cell device electric energy hardware iOS instant lightning mobile phone tablet thunderbolt',
Chat: 'bubble comment communicate feedback message speech talk text',
ChatBubble: 'comment communicate feedback message speech talk text',
ChatBubbleOutline: 'comment communicate feedback message speech talk text',
Check:
'DISABLE_IOS checkmark complete confirm correct disable_ios done enter okay purchased select success tick yes',
CheckBox:
Expand All @@ -457,8 +455,6 @@ const synonyms = {
'button checkmark component control dashed deselected empty form selection square tick toggle ui',
CheckCircle:
'approve checkmark complete confirm done download finished ok select success tick upload validate verified yes',
CheckCircleOutline:
'approve checkmark complete done finished ok select success tick validate verified yes',
Checklist:
'alignment approve complete doc done editing editor format mark notes ok select spreadsheet text tick type validate verified writing yes',
ChecklistRtl:
Expand Down Expand Up @@ -657,7 +653,6 @@ const synonyms = {
Dehaze: 'adjust editing enhance image lines photography remove',
Delete: 'bin garbage junk recycle remove trashcan',
DeleteForever: 'all bin cancel clear exit garbage junk recycle remove trashcan',
DeleteOutline: 'bin can garbage remove trash',
DeleteSweep: 'bin garbage junk recycle remove trashcan',
DeliveryDining:
'food meal restaurant scooter takeout transportation vehicle vespa',
Expand Down Expand Up @@ -757,8 +752,6 @@ const synonyms = {
Done: 'DISABLE_IOS approve checkmark complete disable_ios finished ok select success tick validate verified yes',
DoneAll:
'approve checkmark complete finished layers multiple ok select stack success tick validate verified yes',
DoneOutline:
'all approve checkmark complete finished ok select success tick validate verified yes',
DoNotDisturb: 'cancel close denied deny neutral remove silence slash stop',
DoNotDisturbAlt: 'cancel close denied deny neutral remove silence slash stop',
DoNotDisturbOff:
Expand Down Expand Up @@ -883,8 +876,6 @@ const synonyms = {
'adjustment analytics chart data graph measure metrics music noise sound static statistics tracking volume',
Error:
'! alert announcement attention caution circle danger exclamation feedback important mark notification problem symbol warning',
ErrorOutline:
'! alert announcement attention caution circle danger exclamation feedback important mark notification problem symbol warning',
Escalator: 'down staircase up',
EscalatorWarning: 'body child human kid parent people person',
Euro: 'bill card cash coin commerce cost credit currency dollars euros finance money online payment price profit shopping symbol',
Expand Down Expand Up @@ -1277,8 +1268,6 @@ const synonyms = {
Help: '? alert announcement assistance circle information mark punctuation question recent restore shape support symbol',
HelpCenter:
'? assistance information mark punctuation question recent restore support symbol',
HelpOutline:
'? alert announcement assistance circle information mark punctuation question recent restore shape support symbol',
Hevc: 'alphabet character coding efficiency font high letters symbol text type video',
Hexagon: 'shape sides six',
HideImage: 'disabled enabled landscape mountains off on photography picture slash',
Expand Down Expand Up @@ -1574,7 +1563,6 @@ const synonyms = {
Mail: 'email envelope inbox letters message send',
MailLock:
'email envelop letters locked message password privacy private protection safety secure security send',
MailOutline: 'email envelope letters message note post receive send write',
Male: 'boy gender man social symbol',
Man: 'boy gender male social symbol',
Man2: 'boy gender male social symbol',
Expand Down Expand Up @@ -1655,7 +1643,6 @@ const synonyms = {
Mode: 'compose create draft draw edit pencil write',
ModeComment: 'bubble chat comment communicate feedback message mode speech',
ModeEdit: 'compose create draft draw pencil write',
ModeEditOutline: 'compose create draft draw pencil write',
ModeFanOff: 'air conditioner cool disabled enabled nest slash',
ModelTraining:
'arrow bulb idea inprogress light loading refresh renew restore reverse rotate',
Expand Down Expand Up @@ -1872,7 +1859,6 @@ const synonyms = {
Pause: 'controls media music pending player status video wait',
PauseCircle: 'controls media music video',
PauseCircleFilled: 'controls media music pending status video wait',
PauseCircleOutline: 'controls media music pending status video wait',
PausePresentation:
'application desktop device pending screen share slides status wait website window www',
Payment:
Expand All @@ -1888,8 +1874,6 @@ const synonyms = {
'accounts committee community face family friends group humans network persons profiles social team users',
PeopleAlt:
'accounts committee face family friends group humans network persons profiles social team users',
PeopleOutline:
'accounts committee face family friends group humans network persons profiles social team users',
Percent: 'math numbers symbol',
PermCameraMic: 'image microphone min photography picture speaker',
PermContactCalendar:
Expand Down Expand Up @@ -1920,7 +1904,6 @@ const synonyms = {
PersonalVideo:
'Android cam chrome desktop device hardware iOS mac monitor television tv web window',
PersonOff: 'account avatar disabled enabled face human people profile slash user',
PersonOutline: 'account avatar face human people profile user',
PersonPin:
'account avatar destination direction face gps human location maps people place profile stop user',
PersonPinCircle:
Expand Down Expand Up @@ -1986,8 +1969,6 @@ const synonyms = {
'chat cropped displays layout multitasking overlap photo pip position shape sizes talktrack',
PieChart:
'analytics bars data diagram infographic measure metrics statistics tracking',
PieChartOutline:
'analytics bars data diagram infographic measure metrics statistics tracking',
Pin: '1 2 3 digit key login logout numbers password pattern security star symbol unlock',
Pinch: 'arrows compress direction finger grasp hand navigation nip squeeze tweak',
PinDrop: 'destination direction gps location maps navigation place stop',
Expand All @@ -2004,7 +1985,6 @@ const synonyms = {
PlayCircle: 'arrow controls media music video',
PlayCircleFilled: 'arrow controls media music start video',
PlayCircleFilledWhite: 'start',
PlayCircleOutline: 'arrow controls media music start video',
PlayDisabled: 'controls enabled media music off slash video',
PlayForWork: 'arrow circle down google half',
PlayLesson: 'audio bookmark digital ebook lesson multimedia play reading ribbon',
Expand Down Expand Up @@ -2129,8 +2109,6 @@ const synonyms = {
Remove: 'can delete line minus negative substract subtract trash',
RemoveCircle:
'allowed banned block can delete disable minus negative not substract trash',
RemoveCircleOutline:
'allowed banned block can delete disable minus negative not substract trash',
RemoveDone:
'approve check complete disabled enabled finished mark multiple off ok select slash tick yes',
RemoveFromQueue:
Expand Down Expand Up @@ -2550,7 +2528,6 @@ const synonyms = {
'best bookmark favorite highlight outline ranking rate rating save toggle',
StarHalf:
'0.5 1/2 achievement bookmark favorite highlight important marked ranking rate rating reward saved shape special toggle',
StarOutline: 'bookmark favorite half highlight ranking rate rating save toggle',
StarPurple500: 'best bookmark favorite highlight ranking rate rating save toggle',
StarRate:
'achievement bookmark favorite highlight important marked ranking rating reward saved shape special',
Expand Down Expand Up @@ -3030,7 +3007,6 @@ const synonyms = {
WorkHistory:
'arrow backwards baggage briefcase business clock job pending recent refresh renew reverse rotate schedule suitcase time turn updates',
WorkOff: 'baggage briefcase business disabled enabled job on slash suitcase',
WorkOutline: 'baggage briefcase business job suitcase',
WorkspacePremium:
'certification degree ecommerce guarantee medal permit ribbon verification',
Workspaces: 'circles collaboration dot filled group outline team',
Expand Down
4 changes: 2 additions & 2 deletions docs/data/material/customization/density/DensityTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import Button from '@mui/material/Button';
import IconButton from '@mui/material/IconButton';
import FormControlLabel from '@mui/material/FormControlLabel';
import Switch from '@mui/material/Switch';
import IncreaseIcon from '@mui/icons-material/AddCircleOutline';
import DecreaseIcon from '@mui/icons-material/RemoveCircleOutline';
import IncreaseIcon from '@mui/icons-material/AddCircleOutlined';
import DecreaseIcon from '@mui/icons-material/RemoveCircleOutlined';
import { DispatchContext, ThemeOptionsContext } from '@mui/docs/ThemeContext';
import { useTranslate } from '@mui/docs/i18n';
import { setDocsSpacing, resetDocsSpacing } from '@mui/docs/branding';
Expand Down
16 changes: 16 additions & 0 deletions docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ This list is a work in progress.
Expect updates as new breaking changes are introduced.
:::

### Material Icons

23 legacy icon exports that ended with `Outline` (without the "d") have been removed.
These were exact duplicates of their `Outlined` counterparts (for example, `InfoOutline` had the same SVG as `InfoOutlined`).

To migrate, rename the import to use the `Outlined` suffix:

```diff
-import InfoOutlineIcon from '@mui/icons-material/InfoOutline';
+import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
```

The full list of removed exports: `AddCircleOutline`, `ChatBubbleOutline`, `CheckCircleOutline`, `DeleteOutline`, `DoneOutline`, `DriveFileMoveOutline`, `ErrorOutline`, `HelpOutline`, `InfoOutline`, `LabelImportantOutline`, `LightbulbOutline`, `LockOutline`, `MailOutline`, `ModeEditOutline`, `PauseCircleOutline`, `PeopleOutline`, `PersonOutline`, `PieChartOutline`, `PlayCircleOutline`, `RemoveCircleOutline`, `StarOutline`, `WorkOutline`, `WorkspacesOutline`.

Theme variants of these icons (for example, `InfoOutlineRounded`, `DeleteOutlineSharp`) are **not** affected and remain available.

### Backdrop

The Backdrop component no longer adds the `aria-hidden="true"` attribute to the Root slot by default.
Expand Down
5 changes: 4 additions & 1 deletion docs/scripts/updateIconSynonyms.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import * as mui from '@mui/icons-material';
import synonyms from 'docs/data/material/components/material-icons/synonyms';
// eslint-disable-next-line import/no-relative-packages
import myDestRewriter from '../../packages/mui-icons-material/renameFilters/material-design-icons';
// eslint-disable-next-line import/no-relative-packages, import/extensions
import { LEGACY_OUTLINE_ICONS } from '../../packages/mui-icons-material/builder.test.mjs';

function not(a, b) {
return a.filter((value) => !b.includes(value));
Expand Down Expand Up @@ -55,7 +57,8 @@ async function run() {
const iconList = union(Object.keys(materialIcons), Object.keys(synonyms))
.filter((icon) => {
// The icon is not in @mui/material so no point in having synonyms.
return npmPackageIcons[icon];
// Also exclude legacy *Outline duplicates removed in v9.
return npmPackageIcons[icon] && !LEGACY_OUTLINE_ICONS.includes(icon);
})
.sort((a, b) => -b.localeCompare(a));

Expand Down
56 changes: 56 additions & 0 deletions packages/mui-icons-material/builder.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,62 @@ describe('builder', () => {
});
});

// These 23 legacy *Outline icons were removed in v9 because they were
// exact SVG-path duplicates of their *Outlined counterparts.
// This test prevents them from being silently reintroduced.
// eslint-disable-next-line import/prefer-default-export
export const LEGACY_OUTLINE_ICONS = [
'AddCircleOutline',
'ChatBubbleOutline',
'CheckCircleOutline',
'DeleteOutline',
'DoneOutline',
'DriveFileMoveOutline',
'ErrorOutline',
'HelpOutline',
'InfoOutline',
'LabelImportantOutline',
'LightbulbOutline',
'LockOutline',
'MailOutline',
'ModeEditOutline',
'PauseCircleOutline',
'PeopleOutline',
'PersonOutline',
'PieChartOutline',
'PlayCircleOutline',
'RemoveCircleOutline',
'StarOutline',
'WorkOutline',
'WorkspacesOutline',
];

describe('Legacy *Outline icon removal', () => {
let indexContent;

beforeAll(() => {
indexContent = fs.readFileSync(path.join(currentDirectory, 'lib', 'index.js'), {
encoding: 'utf8',
});
});

LEGACY_OUTLINE_ICONS.forEach((name) => {
it(`should not export ${name}`, () => {
// Check that the icon is not exported from the package index
expect(indexContent).not.to.include(`"${name}"`);
// Check that the component file does not exist
expect(fs.existsSync(path.join(currentDirectory, 'lib', `${name}.js`))).to.equal(false);
});
});

it('should still export DriveFileRenameOutline (not a duplicate)', () => {
expect(indexContent).to.include('"DriveFileRenameOutline"');
expect(fs.existsSync(path.join(currentDirectory, 'lib', 'DriveFileRenameOutline.js'))).to.equal(
true,
);
});
});

async function emptyDir(dir) {
await fs.promises.rm(dir, { recursive: true, force: true });
await fs.promises.mkdir(dir, { recursive: true });
Expand Down
13 changes: 0 additions & 13 deletions packages/mui-icons-material/lib/AddCircleOutline.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/mui-icons-material/lib/AddCircleOutline.mjs

This file was deleted.

2 changes: 2 additions & 0 deletions packages/mui-icons-material/lib/Apple.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/mui-icons-material/lib/Apple.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions packages/mui-icons-material/lib/ChatBubbleOutline.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/mui-icons-material/lib/ChatBubbleOutline.mjs

This file was deleted.

13 changes: 0 additions & 13 deletions packages/mui-icons-material/lib/CheckCircleOutline.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/mui-icons-material/lib/CheckCircleOutline.mjs

This file was deleted.

13 changes: 0 additions & 13 deletions packages/mui-icons-material/lib/DeleteOutline.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/mui-icons-material/lib/DeleteOutline.mjs

This file was deleted.

Loading
Loading