Skip to content

Commit f7cd1f1

Browse files
author
smeng9
committed
support mui v9
1 parent 2baa897 commit f7cd1f1

36 files changed

Lines changed: 154 additions & 68 deletions

packages/ra-core/src/form/FilterLiveForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { useListContext } from '../controller/list/useListContext';
2424
* at other places to create your own filter UI.
2525
*
2626
* @example
27-
* import MailIcon from '@mui/icons-material/MailOutline';
27+
* import MailIcon from '@mui/icons-material/MailOutlined';
2828
* import TitleIcon from '@mui/icons-material/Title';
2929
* import { Card, CardContent } from '@mui/material';
3030
* import * as React from 'react';

packages/ra-input-rich-text/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"clsx": "^2.1.1"
3535
},
3636
"peerDependencies": {
37-
"@mui/icons-material": "^5.16.12 || ^6.0.0 || ^7.0.0",
38-
"@mui/material": "^5.16.12 || ^6.0.0 || ^7.0.0",
37+
"@mui/icons-material": "^5.16.12 || ^6.0.0 || ^7.0.0 || ^9.0.0",
38+
"@mui/material": "^5.16.12 || ^6.0.0 || ^7.0.0 || ^9.0.0",
3939
"ra-core": "^5.0.0",
4040
"ra-ui-materialui": "^5.0.0",
4141
"react": "^18.0.0 || ^19.0.0",

packages/ra-no-code/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"zshy": "^0.5.0"
3636
},
3737
"peerDependencies": {
38-
"@mui/icons-material": "^5.16.12 || ^6.0.0 || ^7.0.0",
39-
"@mui/material": "^5.16.12 || ^6.0.0 || ^7.0.0",
38+
"@mui/icons-material": "^5.16.12 || ^6.0.0 || ^7.0.0 || ^9.0.0",
39+
"@mui/material": "^5.16.12 || ^6.0.0 || ^7.0.0 || ^9.0.0",
4040
"react": "^18.0.0 || ^19.0.0",
4141
"react-dom": "^18.0.0 || ^19.0.0"
4242
},

packages/ra-ui-materialui/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
"zshy": "^0.5.0"
5555
},
5656
"peerDependencies": {
57-
"@mui/icons-material": "^5.16.12 || ^6.0.0 || ^7.0.0",
58-
"@mui/material": "^5.16.12 || ^6.0.0 || ^7.0.0",
59-
"@mui/system": "^5.15.20 || ^6.0.0 || ^7.0.0",
60-
"@mui/utils": "^5.15.20 || ^6.0.0 || ^7.0.0",
57+
"@mui/icons-material": "^5.16.12 || ^6.0.0 || ^7.0.0 || ^9.0.0",
58+
"@mui/material": "^5.16.12 || ^6.0.0 || ^7.0.0 || ^9.0.0",
59+
"@mui/system": "^5.15.20 || ^6.0.0 || ^7.0.0 || ^9.0.0",
60+
"@mui/utils": "^5.15.20 || ^6.0.0 || ^7.0.0 || ^9.0.0",
6161
"@tanstack/react-query": "^5.83.0",
6262
"csstype": "^3.1.3",
6363
"ra-core": "^5.0.0",

packages/ra-ui-materialui/src/input/ArrayInput/AddItemButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import AddIcon from '@mui/icons-material/AddCircleOutline';
2+
import AddIcon from '@mui/icons-material/AddCircleOutlined';
33
import clsx from 'clsx';
44
import { useSimpleFormIterator } from 'ra-core';
55
import { IconButtonWithTooltip, ButtonProps } from '../../button';

packages/ra-ui-materialui/src/input/ArrayInput/RemoveItemButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import CloseIcon from '@mui/icons-material/RemoveCircleOutline';
2+
import CloseIcon from '@mui/icons-material/RemoveCircleOutlined';
33
import clsx from 'clsx';
44
import { useSimpleFormIterator, useSimpleFormIteratorItem } from 'ra-core';
55

packages/ra-ui-materialui/src/input/DateInput.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ export const DateInput = (props: DateInputProps) => {
188188
const { ref, name } = field;
189189
const inputRef = useForkRef(ref, localInputRef);
190190

191+
const mergedSlotProps = {
192+
...rest.slotProps,
193+
inputLabel: { ...defaultInputLabelProps, ...rest.slotProps?.inputLabel },
194+
};
195+
191196
return (
192197
<StyledTextField
193198
id={id}
@@ -226,6 +231,8 @@ export const DateInput = (props: DateInputProps) => {
226231
}
227232
InputLabelProps={defaultInputLabelProps}
228233
{...sanitizeInputRestProps(rest)}
234+
// @ts-expect-error slotProps do not yet exist in MUI v5
235+
slotProps={mergedSlotProps}
229236
/>
230237
);
231238
};

packages/ra-ui-materialui/src/input/DateTimeInput.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ export const DateTimeInput = (props: DateTimeInputProps) => {
147147
const { ref, name } = field;
148148
const inputRef = useForkRef(ref, localInputRef);
149149

150+
const mergedSlotProps = {
151+
...rest.slotProps,
152+
inputLabel: { ...defaultInputLabelProps, ...rest.slotProps?.inputLabel },
153+
};
154+
150155
return (
151156
<StyledTextField
152157
id={id}
@@ -185,6 +190,8 @@ export const DateTimeInput = (props: DateTimeInputProps) => {
185190
}
186191
InputLabelProps={defaultInputLabelProps}
187192
{...sanitizeInputRestProps(rest)}
193+
// @ts-expect-error slotProps do not yet exist in MUI v5
194+
slotProps={mergedSlotProps}
188195
/>
189196
);
190197
};

packages/ra-ui-materialui/src/input/FileInput.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { FileInput } from './FileInput';
99
import { FileField } from '../field';
1010
import { required } from 'ra-core';
1111
import { FormInspector } from './common';
12-
import DeleteIcon from '@mui/icons-material/DeleteOutline';
12+
import DeleteIcon from '@mui/icons-material/DeleteOutlined';
1313

1414
export default { title: 'ra-ui-materialui/input/FileInput' };
1515

packages/ra-ui-materialui/src/input/ImageInput.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { ImageInput } from './ImageInput';
99
import { ImageField } from '../field';
1010
import { required } from 'ra-core';
1111
import { FormInspector } from './common';
12-
import DeleteIcon from '@mui/icons-material/DeleteOutline';
12+
import DeleteIcon from '@mui/icons-material/DeleteOutlined';
1313

1414
export default { title: 'ra-ui-materialui/input/ImageInput' };
1515

0 commit comments

Comments
 (0)