From f4ad1763f0448ad1b74bb7d92bb199364c97396f Mon Sep 17 00:00:00 2001 From: seb Date: Sat, 10 Oct 2026 00:48:55 +0200 Subject: [PATCH] u --- src/components/AppDialog.jsx | 17 +++++++++++++++++ src/components/article/ArticleSearch.jsx | 10 ---------- src/components/article/CategoryPickerDialog.jsx | 11 ----------- src/components/brand/BrandImageSearchDialog.jsx | 7 ------- src/components/chat/NewConversationDialog.jsx | 12 +++++++----- src/components/manifest/ArticleSearchDialog.jsx | 10 ---------- src/components/settings/SettingsDialog.jsx | 1 - src/components/vfs/VfsFileExplorer.jsx | 4 ++-- src/components/vfs/VfsNewFileDialog.jsx | 4 ++-- src/components/vfs/VfsNewFolderDialog.jsx | 4 ++-- src/components/vfs/VfsRenameDialog.jsx | 4 ++-- src/routes/artikel/vorlagen.jsx | 12 +++++++----- 12 files changed, 39 insertions(+), 57 deletions(-) diff --git a/src/components/AppDialog.jsx b/src/components/AppDialog.jsx index d0571cf..dd6f72b 100644 --- a/src/components/AppDialog.jsx +++ b/src/components/AppDialog.jsx @@ -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: [ diff --git a/src/components/article/ArticleSearch.jsx b/src/components/article/ArticleSearch.jsx index b7a912e..f3f2692 100644 --- a/src/components/article/ArticleSearch.jsx +++ b/src/components/article/ArticleSearch.jsx @@ -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: { diff --git a/src/components/article/CategoryPickerDialog.jsx b/src/components/article/CategoryPickerDialog.jsx index 3d07eae..7de3459 100644 --- a/src/components/article/CategoryPickerDialog.jsx +++ b/src/components/article/CategoryPickerDialog.jsx @@ -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 */} diff --git a/src/components/manifest/ArticleSearchDialog.jsx b/src/components/manifest/ArticleSearchDialog.jsx index 864a5f9..306eee6 100644 --- a/src/components/manifest/ArticleSearchDialog.jsx +++ b/src/components/manifest/ArticleSearchDialog.jsx @@ -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: { diff --git a/src/components/settings/SettingsDialog.jsx b/src/components/settings/SettingsDialog.jsx index ef83a0c..43120c7 100644 --- a/src/components/settings/SettingsDialog.jsx +++ b/src/components/settings/SettingsDialog.jsx @@ -76,7 +76,6 @@ export default class SettingsDialog extends Component { maxWidth="lg" fullWidth slotProps={{ paper: { sx: paperSx } }} - PaperProps={{ sx: paperSx }} > theme.zIndex.modal + 20 }} - PaperProps={{ sx: { borderRadius: 2, minWidth: 180 } }} + slotProps={{ paper: { sx: { borderRadius: 2, minWidth: 180 } } }} > {isText && ( theme.zIndex.modal + 20 }} - PaperProps={{ sx: { borderRadius: 2, minWidth: 190 } }} + slotProps={{ paper: { sx: { borderRadius: 2, minWidth: 190 } } }} > { diff --git a/src/components/vfs/VfsNewFileDialog.jsx b/src/components/vfs/VfsNewFileDialog.jsx index 289b71e..9b74613 100644 --- a/src/components/vfs/VfsNewFileDialog.jsx +++ b/src/components/vfs/VfsNewFileDialog.jsx @@ -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 } }, }} > diff --git a/src/components/vfs/VfsNewFolderDialog.jsx b/src/components/vfs/VfsNewFolderDialog.jsx index 895a0dd..d64b473 100644 --- a/src/components/vfs/VfsNewFolderDialog.jsx +++ b/src/components/vfs/VfsNewFolderDialog.jsx @@ -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 } }, }} > diff --git a/src/components/vfs/VfsRenameDialog.jsx b/src/components/vfs/VfsRenameDialog.jsx index 5e255fb..a546ae2 100644 --- a/src/components/vfs/VfsRenameDialog.jsx +++ b/src/components/vfs/VfsRenameDialog.jsx @@ -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 } }, }} > diff --git a/src/routes/artikel/vorlagen.jsx b/src/routes/artikel/vorlagen.jsx index d1c23bd..e682dc8 100644 --- a/src/routes/artikel/vorlagen.jsx +++ b/src/routes/artikel/vorlagen.jsx @@ -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', + }, }, }} >