This commit is contained in:
seb
2026-10-10 00:48:55 +02:00
parent 4c0691924e
commit f4ad1763f0
12 changed files with 39 additions and 57 deletions

View File

@@ -60,6 +60,10 @@ class AppDialog extends Component {
transitionDuration: _transitionDuration,
TransitionProps: _transitionProps,
TransitionComponent: _transitionComponent,
// Legacy MUI prop (removed in v9) — merge into slotProps.paper instead
// of spreading onto Dialog/DOM where it triggers
// "React does not recognize the `PaperProps` prop" warnings.
PaperProps: legacyPaperProps,
disableScrollLock = true,
slotProps: userSlotProps,
slots: userSlots,
@@ -69,6 +73,18 @@ class AppDialog extends Component {
void _transitionProps;
void _transitionComponent;
const userPaper = userSlotProps?.paper ?? {};
const { sx: userPaperSx, ...restPaper } = userPaper;
const { sx: legacyPaperSx, ...restLegacyPaper } = legacyPaperProps ?? {};
const toSxArray = (sx) =>
// eslint-disable-next-line no-nested-ternary
Array.isArray(sx) ? sx : sx ? [sx] : [];
const mergedPaperSx = [...toSxArray(legacyPaperSx), ...toSxArray(userPaperSx)];
const mergedPaper =
mergedPaperSx.length > 0
? { ...restLegacyPaper, ...restPaper, sx: mergedPaperSx }
: { ...restLegacyPaper, ...restPaper };
const userBackdrop = userSlotProps?.backdrop ?? {};
const { sx: userBackdropSx, ...restBackdrop } = userBackdrop;
const userTransition = userSlotProps?.transition ?? {};
@@ -77,6 +93,7 @@ class AppDialog extends Component {
const slotProps = {
...userSlotProps,
paper: mergedPaper,
backdrop: {
...restBackdrop,
sx: [

View File

@@ -649,16 +649,6 @@ export default class ArticleSearch extends PureComponent {
onClose={this.handleCloseDialog}
maxWidth="md"
fullWidth
PaperProps={{
sx: {
height: '80vh',
minHeight: '80vh',
maxHeight: '80vh',
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
},
}}
slotProps={{
paper: {
sx: {

View File

@@ -163,17 +163,6 @@ export default class CategoryPickerDialog extends PureComponent {
},
},
}}
PaperProps={{
sx: {
height: '75vh',
minHeight: '75vh',
maxHeight: 700,
display: 'flex',
flexDirection: 'column',
borderRadius: 2.5,
overflow: 'hidden',
},
}}
>
{/* Header */}
<DialogTitle

View File

@@ -245,13 +245,6 @@ export default class BrandImageSearchDialog extends PureComponent {
fullWidth
scroll="paper"
aria-labelledby="brand-image-search-dialog-title"
PaperProps={{
sx: {
height: '80vh',
minHeight: '80vh',
maxHeight: '80vh',
},
}}
slotProps={{
paper: {
sx: {

View File

@@ -72,11 +72,13 @@ export default class NewConversationDialog extends PureComponent {
onClose={loading ? undefined : onClose}
maxWidth="xs"
fullWidth
PaperProps={{
sx: {
borderRadius: 3,
p: 1,
boxShadow: SHADOW_DIALOG,
slotProps={{
paper: {
sx: {
borderRadius: 3,
p: 1,
boxShadow: SHADOW_DIALOG,
},
},
}}
>

View File

@@ -64,16 +64,6 @@ export default class ArticleSearchDialog extends PureComponent {
maxWidth="md"
fullWidth
aria-labelledby="article-search-dialog-title"
PaperProps={{
sx: {
height: '80vh',
minHeight: '80vh',
maxHeight: '80vh',
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
},
}}
slotProps={{
paper: {
sx: {

View File

@@ -76,7 +76,6 @@ export default class SettingsDialog extends Component {
maxWidth="lg"
fullWidth
slotProps={{ paper: { sx: paperSx } }}
PaperProps={{ sx: paperSx }}
>
<DialogTitle
sx={{

View File

@@ -719,7 +719,7 @@ export default class VfsFileExplorer extends PureComponent {
open={Boolean(menuAnchor)}
onClose={this.handleCloseMenu}
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
PaperProps={{ sx: { borderRadius: 2, minWidth: 180 } }}
slotProps={{ paper: { sx: { borderRadius: 2, minWidth: 180 } } }}
>
{isText && (
<MenuItem
@@ -818,7 +818,7 @@ export default class VfsFileExplorer extends PureComponent {
open={Boolean(folderMenuAnchor)}
onClose={this.handleCloseFolderMenu}
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
PaperProps={{ sx: { borderRadius: 2, minWidth: 190 } }}
slotProps={{ paper: { sx: { borderRadius: 2, minWidth: 190 } } }}
>
<MenuItem
onClick={() => {

View File

@@ -50,8 +50,8 @@ export default class VfsNewFileDialog extends PureComponent {
maxWidth="xs"
fullWidth
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
PaperProps={{
sx: { borderRadius: 3, p: 1 },
slotProps={{
paper: { sx: { borderRadius: 3, p: 1 } },
}}
>
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>

View File

@@ -54,8 +54,8 @@ export default class VfsNewFolderDialog extends PureComponent {
maxWidth="xs"
fullWidth
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
PaperProps={{
sx: { borderRadius: 3, p: 1 },
slotProps={{
paper: { sx: { borderRadius: 3, p: 1 } },
}}
>
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>

View File

@@ -61,8 +61,8 @@ export default class VfsRenameDialog extends PureComponent {
maxWidth="xs"
fullWidth
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
PaperProps={{
sx: { borderRadius: 3, p: 1 },
slotProps={{
paper: { sx: { borderRadius: 3, p: 1 } },
}}
>
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>

View File

@@ -330,11 +330,13 @@ class ArtikelVorlagenPage extends PureComponent {
open={editorOpen}
onClose={this.handleEditorClose}
maxWidth={false}
PaperProps={{
sx: {
width: '90vw',
maxWidth: 1000,
bgcolor: 'background.paper',
slotProps={{
paper: {
sx: {
width: '90vw',
maxWidth: 1000,
bgcolor: 'background.paper',
},
},
}}
>