Skip to content

Commit

Permalink
Update to MUI 6
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Feb 4, 2025
1 parent fba3b5d commit 3747bf9
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@hello-pangea/dnd": "^16.0.1 || ^17.0.0",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.13.5",
"@mui/utils": "^5.13.1",
"@mui/x-tree-view": "^6.17.0",
"@mui/icons-material": "^6.0.0",
"@mui/material": "^6.0.0",
"@mui/utils": "^6.0.0",
"@mui/x-tree-view": "^7.25.0",
"@react-aria/live-announcer": "^3.1.2",
"@redux-devtools/extension": "^3.3.0",
"classnames": "^2.2.6",
Expand Down
4 changes: 2 additions & 2 deletions src/components/CollapsibleSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export function CollapsibleSection({
}, [setOpen]);

return (
<Accordion id={id} elevation={0} expanded={open} onChange={handleChange} disableGutters square variant="compact">
<Accordion slotProps={{ heading: { component: 'h4' } }} id={id} elevation={0} expanded={open} onChange={handleChange} disableGutters square variant="compact">
<AccordionSummary id={`${id}-header`} aria-controls={`${id}-content`} aria-label={t(open ? 'collapseSection' : 'expandSection', { section: label })} expandIcon={<ExpandMoreIcon />}>
<Typography variant="overline" component="h4">
<Typography variant="overline">
{label}
</Typography>
</AccordionSummary>
Expand Down
3 changes: 2 additions & 1 deletion src/components/CompanionArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const Container = styled('div', { name: 'CompanionArea', slot: 'container' })(({
const StyledToggle = styled('div', { name: 'CompanionArea', slot: 'toggle' })(({ theme }) => ({
alignItems: 'center',
backgroundColor: theme.palette.background.paper,
border: `1px solid ${theme.palette.mode === 'dark' ? theme.palette.divider : theme.palette.shades?.dark}`,
border: `1px solid ${theme.palette.shades?.dark}`,
...theme.applyStyles('dark', { borderColor: theme.palette.divider }),
borderInlineStart: 0,
borderRadius: 0,
display: 'inline-flex',
Expand Down
6 changes: 3 additions & 3 deletions src/components/WindowSideBarCollectionPanel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import MenuList from '@mui/material/MenuList';
Expand Down Expand Up @@ -87,8 +88,7 @@ export function WindowSideBarCollectionPanel({
<>
{ parentCollection && (
<List>
<ListItem
button
<ListItemButton
onClick={
() => updateCompanionWindow({ collectionPath: collectionPath.slice(0, -1) })
}
Expand All @@ -99,7 +99,7 @@ export function WindowSideBarCollectionPanel({
<ListItemText primaryTypographyProps={{ variant: 'body1' }}>
<IIIFResourceLabel resource={parentCollection} />
</ListItemText>
</ListItem>
</ListItemButton>
</List>
)}
<Typography variant="h6">
Expand Down
33 changes: 16 additions & 17 deletions src/components/WorkspaceArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@ import WorkspaceAdd from '../containers/WorkspaceAdd';
import BackgroundPluginArea from '../containers/BackgroundPluginArea';
import ns from '../config/css-ns';

const Root = styled('div', { name: 'WorkspaceArea', slot: 'root' })(({ theme }) => {
const getBackgroundColor = theme.palette.mode === 'light' ? darken : lighten;

return {
background: getBackgroundColor(theme.palette.shades.light, 0.1),
bottom: 0,
display: 'flex',
flexDirection: 'column',
left: 0,
position: 'absolute',
right: 0,
top: 0,
[theme.breakpoints.up('sm')]: {
flexDirection: 'row',
},
};
});
const Root = styled('div', { name: 'WorkspaceArea', slot: 'root' })(({ theme }) => ({
background: darken(theme.palette.shades.light, 0.1),
...theme.applyStyles('dark', {
background: lighten(theme.palette.shades.light, 0.1),
}),
bottom: 0,
display: 'flex',
flexDirection: 'column',
left: 0,
position: 'absolute',
right: 0,
top: 0,
[theme.breakpoints.up('sm')]: {
flexDirection: 'row',
},
}));

const ViewerArea = styled('main', { name: 'WorkspaceArea', slot: 'viewer' })(() => ({
flexGrow: 1,
Expand Down
4 changes: 2 additions & 2 deletions src/components/WorkspaceExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export function WorkspaceExport({
</DialogTitle>

<DialogContent>
<Accordion elevation={2}>
<Accordion slotProps={{ heading: { component: 'h4' } }} elevation={2}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
>
<Typography variant="h4">{t('viewWorkspaceConfiguration')}</Typography>
<Typography>{t('viewWorkspaceConfiguration')}</Typography>
</AccordionSummary>
<AccordionDetails sx={{ overflow: 'scroll' }}>
{children}
Expand Down

0 comments on commit 3747bf9

Please sign in to comment.