Skip to content

Commit 4c26cc1

Browse files
committed
chore(deps): upgrade to mui v6
1 parent 84c61cd commit 4c26cc1

File tree

7 files changed

+232
-78
lines changed

7 files changed

+232
-78
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
"@emotion/styled": "11.13.0",
4242
"@mdx-js/loader": "3.1.0",
4343
"@mdx-js/react": "3.1.0",
44-
"@mui/icons-material": "5.16.7",
45-
"@mui/lab": "5.0.0-alpha.173",
46-
"@mui/material": "5.16.7",
47-
"@mui/styles": "5.16.7",
44+
"@mui/icons-material": "6.1.6",
45+
"@mui/lab": "6.0.0-beta.14",
46+
"@mui/material": "6.1.6",
47+
"@mui/styles": "6.1.6",
4848
"@next/eslint-plugin-next": "15.0.3",
4949
"@next/mdx": "15.0.3",
5050
"@rjsf/core": "5.22.3",

pnpm-lock.yaml

Lines changed: 206 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseCard.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
CardHeader,
1010
Collapse,
1111
IconButton,
12-
useTheme,
1312
} from "@mui/material";
1413

1514
/**
@@ -77,8 +76,6 @@ export const BaseCard = ({
7776
const [hasExpanded, setHasExpanded] = useState(!collapsedByDefault);
7877
const [expanded, setExpanded] = useState(!collapsedByDefault);
7978

80-
const theme = useTheme();
81-
8279
return (
8380
<Card>
8481
{!!header && (
@@ -108,13 +105,13 @@ export const BaseCard = ({
108105
<IconButton
109106
aria-expanded={expanded}
110107
size="large"
111-
sx={{
108+
sx={(theme) => ({
112109
marginLeft: "auto",
113110
transform: `rotate(${expanded ? 180 : 0}deg)`,
114111
transition: `${theme.transitions.create("transform", {
115112
duration: theme.transitions.duration.shortest,
116113
})}`,
117-
}}
114+
})}
118115
onClick={() => {
119116
setExpanded(!expanded);
120117
setHasExpanded(true);

src/components/DataTable/DataTable.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ export const DataTable = <Data extends Record<string, any>>(props: DataTableProp
263263
const tableContents = (
264264
<>
265265
{!!ToolbarChild || !!enableSearch ? (
266-
<Toolbar sx={{ pt: 2, alignItems: "flex-start", gap: (theme) => theme.spacing(1) }}>
266+
<Toolbar sx={theme => ({
267+
pt: 2,
268+
alignItems: "flex-start",
269+
gap: theme.spacing(1)
270+
})}>
267271
{ToolbarChild}
268272
{!!enableSearch && (
269273
<TextField

src/components/runCards/JobCard/JobInputFields.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export const InputSection = ({ children, title, required, error }: InputSectionP
168168
</em>
169169
</Typography>
170170
{children}
171-
<Typography sx={{ color: (theme) => theme.palette.error.main }}>{error}</Typography>
171+
<Typography sx={(theme) => ({ color: theme.palette.error.main })}>{error}</Typography>
172172
</Grid>
173173
);
174174
};

src/features/DatasetsTable/DatasetDetails/VersionActionsSection/AttachDatasetListItem/AttachDatasetListItem.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ import { useGetProjects } from "@squonk/data-manager-client/project";
77
import { useGetFileTypes } from "@squonk/data-manager-client/type";
88

99
import { AttachFileRounded as AttachFileRoundedIcon } from "@mui/icons-material";
10-
import { Alert, FormControl, FormGroup, ListItem, ListItemText, MenuItem } from "@mui/material";
10+
import {
11+
Alert,
12+
FormControl,
13+
FormGroup,
14+
ListItemButton,
15+
ListItemText,
16+
MenuItem,
17+
} from "@mui/material";
1118
import { useQueryClient } from "@tanstack/react-query";
1219
import { Field } from "formik";
1320
import { CheckboxWithLabel, TextField } from "formik-mui";
@@ -75,8 +82,7 @@ export const AttachDatasetListItem = ({ datasetId, version }: AttachDatasetListI
7582

7683
return (
7784
<>
78-
<ListItem
79-
button
85+
<ListItemButton
8086
disabled={isProjectsLoading || isTypesLoading || isUserLoading}
8187
onClick={() => setOpen(true)}
8288
>
@@ -95,8 +101,7 @@ export const AttachDatasetListItem = ({ datasetId, version }: AttachDatasetListI
95101
}
96102
/>
97103
<AttachFileRoundedIcon color="action" />
98-
</ListItem>
99-
104+
</ListItemButton>
100105
<FormikModalWrapper
101106
// Reinitialize to allow a project to be selected by default after the async action is
102107
// completed

src/features/DatasetsTable/DatasetDetails/VersionViewSection/VersionViewSection.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { type DatasetSummary, type DatasetVersionSummary } from "@squonk/data-manager-client";
22

33
import { Description } from "@mui/icons-material";
4-
import { List, ListItem, ListItemText } from "@mui/material";
4+
import { List, ListItemText } from "@mui/material";
5+
import ListItemButton from "@mui/material/ListItemButton";
56

67
import { API_ROUTES } from "../../../../utils/app/routes";
78
import { DatasetPlainTextViewerListItem } from "./DatasetPlainTextViewerListItem";
@@ -24,8 +25,7 @@ export const VersionViewSection = ({ dataset, version }: VersionViewSectionProps
2425
return (
2526
<List>
2627
<DatasetPlainTextViewerListItem datasetId={dataset.dataset_id} version={version.version} />
27-
<ListItem
28-
button
28+
<ListItemButton
2929
component="a"
3030
href={
3131
(process.env.NEXT_PUBLIC_BASE_PATH ?? "") +
@@ -39,7 +39,7 @@ export const VersionViewSection = ({ dataset, version }: VersionViewSectionProps
3939
secondary="Displays the file in your browser if it supports the file type, otherwise downloads the file"
4040
/>
4141
<Description color="action" />
42-
</ListItem>
42+
</ListItemButton>
4343
</List>
4444
);
4545
};

0 commit comments

Comments
 (0)