Skip to content

chore(deps): upgrade to mui 5 #4296

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

Merged
merged 9 commits into from
Dec 29, 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
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@
"styled-components": "^5.3.0"
},
"dependencies": {
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.58",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/icons-material": "^6.3.0",
"@mui/lab": "^6.0.0-beta.21",
"@mui/material": "^6.3.0",
"ansi-styles": "^6.2.1",
"commander": "^11.0.0",
"cross-spawn": "^7.0.5",
Expand Down
17 changes: 11 additions & 6 deletions ui/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { MuiThemeProvider } from "@material-ui/core";
import {
ThemeProvider as MuiThemeProvider,
StyledEngineProvider,
} from "@mui/material";
import qs from "query-string";
import * as React from "react";
import { QueryClient, QueryClientProvider } from "react-query";
Expand Down Expand Up @@ -231,11 +234,13 @@ const StylesProvider = ({ children }) => {
const appliedTheme = theme(mode);
return (
<ThemeProvider theme={appliedTheme}>
<MuiThemeProvider theme={muiTheme(appliedTheme.colors, mode)}>
<Fonts />
<GlobalStyle />
{children}
</MuiThemeProvider>
<StyledEngineProvider injectFirst>
<MuiThemeProvider theme={muiTheme(appliedTheme.colors, mode)}>
<Fonts />
<GlobalStyle />
{children}
</MuiThemeProvider>
</StyledEngineProvider>
</ThemeProvider>
);
};
Expand Down
2 changes: 1 addition & 1 deletion ui/components/AddKustomizationForm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Divider, MenuItem } from "@material-ui/core";
import { Divider, MenuItem } from "@mui/material";
import _ from "lodash";
import * as React from "react";
import styled from "styled-components";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/Alert.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AlertTitle, Alert as MaterialAlert } from "@material-ui/lab";
import { AlertTitle, Alert as MaterialAlert } from "@mui/lab";
import * as React from "react";
import styled from "styled-components";
import { ThemeTypes } from "../contexts/AppContext";
Expand Down
4 changes: 2 additions & 2 deletions ui/components/AlertListErrors.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Button, Collapse } from "@material-ui/core";
import Alert from "@material-ui/lab/Alert";
import Alert from "@mui/lab/Alert";
import { Box, Button, Collapse } from "@mui/material";
import { sortBy, uniqBy } from "lodash";
import React, { FC, useEffect, useState } from "react";
import styled from "styled-components";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tooltip } from "@material-ui/core";
import { Tooltip } from "@mui/material";
import React from "react";
import styled from "styled-components";
import Flex from "./Flex";
Expand Down
7 changes: 3 additions & 4 deletions ui/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line
import { CircularProgress, PropTypes } from "@material-ui/core";
import MaterialButton, { ButtonProps } from "@material-ui/core/Button/Button";
import { CircularProgress } from "@mui/material";
import MaterialButton, { type ButtonProps } from "@mui/material/Button";
import * as React from "react";
import styled, { useTheme } from "styled-components";

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

const defaultProps = {
variant: "outlined" as "text" | "outlined" | "contained",
color: "primary" as PropTypes.Color,
color: "primary" as "inherit" | "primary" | "secondary",
};

/** Form Button */
Expand All @@ -35,7 +35,6 @@ function UnstyledButton({ loading, ...props }: Props) {
disableElevation={true}
{...defaultProps}
{...props}
innerRef={props.innerRef}
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ChipGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Chip } from "@material-ui/core";
import { Chip } from "@mui/material";
import _ from "lodash";
import * as React from "react";
import styled from "styled-components";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/Collapsible.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Collapse } from "@material-ui/core";
import { Collapse } from "@mui/material";
import React from "react";
import styled from "styled-components";
import Flex from "./Flex";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/DagGraph.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Slider } from "@material-ui/core";
import { Slider } from "@mui/material";
import * as d3d from "d3-dag";
import _ from "lodash";
import * as React from "react";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/DarkModeSwitch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Switch } from "@material-ui/core";
import { Switch } from "@mui/material";
import * as React from "react";
import styled from "styled-components";
import { AppContext, ThemeTypes } from "../contexts/AppContext";
Expand Down
1 change: 1 addition & 0 deletions ui/components/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ function UnstyledDataTable({
onClick={() => setFilterDialogOpen(!filterDialogOpen)}
variant={filterDialogOpen ? "contained" : "text"}
color="inherit"
size="large"
>
<Icon
type={IconType.FilterIcon}
Expand Down
2 changes: 1 addition & 1 deletion ui/components/DataTable/SortableLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button } from "@material-ui/core";
import { Button } from "@mui/material";
import * as React from "react";
import styled from "styled-components";
import Flex from "../Flex";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/DataTable/TableView/TableBody.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Checkbox, TableBody, TableCell, TableRow } from "@material-ui/core";
import { Checkbox, TableBody, TableCell, TableRow } from "@mui/material";
import React from "react";
import styled from "styled-components";
import Flex from "../../Flex";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/DataTable/TableView/TableHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Checkbox, TableCell, TableHead, TableRow } from "@material-ui/core";
import { Checkbox, TableCell, TableHead, TableRow } from "@mui/material";
import React from "react";
import SortableLabelView from "./SortableLabelView";
import { SortField, TableHeaderProps } from "./types";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/DataTable/TableView/TableView.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Table, TableContainer } from "@material-ui/core";
import { Table, TableContainer } from "@mui/material";
import React from "react";
import TableBodyView from "./TableBody";
import TableHeader from "./TableHeader";
Expand Down
Loading
Loading