Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code-infra] Break package dependency cycle between @mui/material and @mui/icons-material #40400

Merged
merged 1 commit into from
Jan 2, 2024
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
1 change: 0 additions & 1 deletion packages/mui-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"devDependencies": {
"@mui-internal/babel-macros": "^1.0.0",
"@mui-internal/test-utils": "^1.0.0",
"@mui/icons-material": "^5.15.2",
"@mui/lab": "5.0.0-alpha.158",
"@popperjs/core": "^2.11.8",
"@rollup/plugin-replace": "^5.0.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import TabScrollButton, { tabScrollButtonClasses as classes } from '@mui/material/TabScrollButton';
import { createSvgIcon } from '@mui/material/utils';

const ArrowBackIcon = createSvgIcon(<path d="M3 3h18v18H3z" />, 'ArrowBack');
const ArrowForwardIcon = createSvgIcon(<path d="M3 3h18v18H3z" />, 'ArrowForward');

describe('<TabScrollButton />', () => {
const defaultProps = {
Expand Down
16 changes: 12 additions & 4 deletions packages/mui-material/src/TablePagination/TablePagination.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ import { outlinedInputClasses } from '@mui/material/OutlinedInput';
import { filledInputClasses } from '@mui/material/FilledInput';
import IconButton, { iconButtonClasses } from '@mui/material/IconButton';
import { svgIconClasses } from '@mui/material/SvgIcon';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import KeyboardDoubleArrowLeftRoundedIcon from '@mui/icons-material/KeyboardDoubleArrowLeftRounded';
import KeyboardDoubleArrowRightRoundedIcon from '@mui/icons-material/KeyboardDoubleArrowRightRounded';
import { createSvgIcon } from '@mui/material/utils';

const ArrowBackIcon = createSvgIcon(<path d="M3 3h18v18H3z" />, 'ArrowBack');
const ArrowForwardIcon = createSvgIcon(<path d="M3 3h18v18H3z" />, 'ArrowForward');
const KeyboardDoubleArrowLeftRoundedIcon = createSvgIcon(
<path d="M3 3h18v18H3z" />,
'KeyboardDoubleArrowLeftRounded',
);
const KeyboardDoubleArrowRightRoundedIcon = createSvgIcon(
<path d="M3 3h18v18H3z" />,
'KeyboardDoubleArrowRightRounded',
);

describe('<TablePagination />', () => {
const noop = () => {};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import SortIcon from '@mui/icons-material/Sort';
import TableSortLabel, { tableSortLabelClasses as classes } from '@mui/material/TableSortLabel';
import ButtonBase from '@mui/material/ButtonBase';
import { createSvgIcon } from '@mui/material/utils';

const SortIcon = createSvgIcon(<path d="M3 3h18v18H3z" />, 'Sort');

describe('<TableSortLabel />', () => {
const { render } = createRenderer();
Expand Down
6 changes: 4 additions & 2 deletions packages/mui-material/src/Tabs/Tabs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ import {
strictModeDoubleLoggingSuppressed,
waitFor,
} from '@mui-internal/test-utils';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import Tab from '@mui/material/Tab';
import Tabs, { tabsClasses as classes } from '@mui/material/Tabs';
import { svgIconClasses } from '@mui/material/SvgIcon';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { createSvgIcon } from '@mui/material/utils';
import capitalize from '../utils/capitalize';

const ArrowBackIcon = createSvgIcon(<path d="M3 3h18v18H3z" />, 'ArrowBack');
const ArrowForwardIcon = createSvgIcon(<path d="M3 3h18v18H3z" />, 'ArrowForward');

function findScrollButton(container, direction) {
return container.querySelector(`svg[data-testid="KeyboardArrow${capitalize(direction)}Icon"]`);
}
Expand Down
Loading