Skip to content

Commit 2e4f4ab

Browse files
authored
chore(deps): upgrade to mui 5 (#4296)
1 parent 5ac7311 commit 2e4f4ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1612
-1609
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
"styled-components": "^5.3.0"
5151
},
5252
"dependencies": {
53-
"@material-ui/core": "^4.12.4",
54-
"@material-ui/icons": "^4.11.2",
55-
"@material-ui/lab": "^4.0.0-alpha.58",
53+
"@emotion/react": "^11.14.0",
54+
"@emotion/styled": "^11.14.0",
55+
"@mui/icons-material": "^6.3.0",
56+
"@mui/lab": "^6.0.0-beta.21",
57+
"@mui/material": "^6.3.0",
5658
"ansi-styles": "^6.2.1",
5759
"commander": "^11.0.0",
5860
"cross-spawn": "^7.0.5",

ui/App.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { MuiThemeProvider } from "@material-ui/core";
1+
import {
2+
ThemeProvider as MuiThemeProvider,
3+
StyledEngineProvider,
4+
} from "@mui/material";
25
import qs from "query-string";
36
import * as React from "react";
47
import { QueryClient, QueryClientProvider } from "react-query";
@@ -231,11 +234,13 @@ const StylesProvider = ({ children }) => {
231234
const appliedTheme = theme(mode);
232235
return (
233236
<ThemeProvider theme={appliedTheme}>
234-
<MuiThemeProvider theme={muiTheme(appliedTheme.colors, mode)}>
235-
<Fonts />
236-
<GlobalStyle />
237-
{children}
238-
</MuiThemeProvider>
237+
<StyledEngineProvider injectFirst>
238+
<MuiThemeProvider theme={muiTheme(appliedTheme.colors, mode)}>
239+
<Fonts />
240+
<GlobalStyle />
241+
{children}
242+
</MuiThemeProvider>
243+
</StyledEngineProvider>
239244
</ThemeProvider>
240245
);
241246
};

ui/components/AddKustomizationForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Divider, MenuItem } from "@material-ui/core";
1+
import { Divider, MenuItem } from "@mui/material";
22
import _ from "lodash";
33
import * as React from "react";
44
import styled from "styled-components";

ui/components/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AlertTitle, Alert as MaterialAlert } from "@material-ui/lab";
1+
import { AlertTitle, Alert as MaterialAlert } from "@mui/lab";
22
import * as React from "react";
33
import styled from "styled-components";
44
import { ThemeTypes } from "../contexts/AppContext";

ui/components/AlertListErrors.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Box, Button, Collapse } from "@material-ui/core";
2-
import Alert from "@material-ui/lab/Alert";
1+
import Alert from "@mui/lab/Alert";
2+
import { Box, Button, Collapse } from "@mui/material";
33
import { sortBy, uniqBy } from "lodash";
44
import React, { FC, useEffect, useState } from "react";
55
import styled from "styled-components";

ui/components/Breadcrumbs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tooltip } from "@material-ui/core";
1+
import { Tooltip } from "@mui/material";
22
import React from "react";
33
import styled from "styled-components";
44
import Flex from "./Flex";

ui/components/Button.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// eslint-disable-next-line
2-
import { CircularProgress, PropTypes } from "@material-ui/core";
3-
import MaterialButton, { ButtonProps } from "@material-ui/core/Button/Button";
2+
import { CircularProgress } from "@mui/material";
3+
import MaterialButton, { type ButtonProps } from "@mui/material/Button";
44
import * as React from "react";
55
import styled, { useTheme } from "styled-components";
66

@@ -16,7 +16,7 @@ export interface Props extends ButtonProps {
1616

1717
const defaultProps = {
1818
variant: "outlined" as "text" | "outlined" | "contained",
19-
color: "primary" as PropTypes.Color,
19+
color: "primary" as "inherit" | "primary" | "secondary",
2020
};
2121

2222
/** Form Button */
@@ -35,7 +35,6 @@ function UnstyledButton({ loading, ...props }: Props) {
3535
disableElevation={true}
3636
{...defaultProps}
3737
{...props}
38-
innerRef={props.innerRef}
3938
/>
4039
);
4140
}

ui/components/ChipGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Chip } from "@material-ui/core";
1+
import { Chip } from "@mui/material";
22
import _ from "lodash";
33
import * as React from "react";
44
import styled from "styled-components";

ui/components/Collapsible.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Collapse } from "@material-ui/core";
1+
import { Collapse } from "@mui/material";
22
import React from "react";
33
import styled from "styled-components";
44
import Flex from "./Flex";

ui/components/DagGraph.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Slider } from "@material-ui/core";
1+
import { Slider } from "@mui/material";
22
import * as d3d from "d3-dag";
33
import _ from "lodash";
44
import * as React from "react";

ui/components/DarkModeSwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Switch } from "@material-ui/core";
1+
import { Switch } from "@mui/material";
22
import * as React from "react";
33
import styled from "styled-components";
44
import { AppContext, ThemeTypes } from "../contexts/AppContext";

ui/components/DataTable/DataTable.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ function UnstyledDataTable({
200200
onClick={() => setFilterDialogOpen(!filterDialogOpen)}
201201
variant={filterDialogOpen ? "contained" : "text"}
202202
color="inherit"
203+
size="large"
203204
>
204205
<Icon
205206
type={IconType.FilterIcon}

ui/components/DataTable/SortableLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button } from "@material-ui/core";
1+
import { Button } from "@mui/material";
22
import * as React from "react";
33
import styled from "styled-components";
44
import Flex from "../Flex";

ui/components/DataTable/TableView/TableBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Checkbox, TableBody, TableCell, TableRow } from "@material-ui/core";
1+
import { Checkbox, TableBody, TableCell, TableRow } from "@mui/material";
22
import React from "react";
33
import styled from "styled-components";
44
import Flex from "../../Flex";

ui/components/DataTable/TableView/TableHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Checkbox, TableCell, TableHead, TableRow } from "@material-ui/core";
1+
import { Checkbox, TableCell, TableHead, TableRow } from "@mui/material";
22
import React from "react";
33
import SortableLabelView from "./SortableLabelView";
44
import { SortField, TableHeaderProps } from "./types";

ui/components/DataTable/TableView/TableView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Table, TableContainer } from "@material-ui/core";
1+
import { Table, TableContainer } from "@mui/material";
22
import React from "react";
33
import TableBodyView from "./TableBody";
44
import TableHeader from "./TableHeader";

0 commit comments

Comments
 (0)