@mui/codemod 9.0.0-alpha.4 → 9.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +71 -4
- package/README.md +252 -0
- package/deprecations/all/deprecations-all.js +6 -0
- package/deprecations/checkbox-props/checkbox-props.js +33 -0
- package/deprecations/checkbox-props/index.js +13 -0
- package/deprecations/checkbox-props/test-cases/actual.js +45 -0
- package/deprecations/checkbox-props/test-cases/expected.js +61 -0
- package/deprecations/checkbox-props/test-cases/package.actual.js +34 -0
- package/deprecations/checkbox-props/test-cases/package.expected.js +50 -0
- package/deprecations/checkbox-props/test-cases/theme.actual.js +28 -0
- package/deprecations/checkbox-props/test-cases/theme.expected.js +36 -0
- package/deprecations/dialog-props/dialog-props.js +14 -0
- package/deprecations/dialog-props/test-cases/actual.js +4 -0
- package/deprecations/dialog-props/test-cases/expected.js +4 -0
- package/deprecations/drawer-props/drawer-props.js +14 -0
- package/deprecations/drawer-props/test-cases/actual.js +10 -2
- package/deprecations/drawer-props/test-cases/expected.js +14 -2
- package/deprecations/radio-props/index.js +13 -0
- package/deprecations/radio-props/radio-props.js +33 -0
- package/deprecations/radio-props/test-cases/actual.js +45 -0
- package/deprecations/radio-props/test-cases/expected.js +61 -0
- package/deprecations/radio-props/test-cases/package.actual.js +34 -0
- package/deprecations/radio-props/test-cases/package.expected.js +50 -0
- package/deprecations/radio-props/test-cases/theme.actual.js +28 -0
- package/deprecations/radio-props/test-cases/theme.expected.js +36 -0
- package/deprecations/switch-props/index.js +13 -0
- package/deprecations/switch-props/switch-props.js +33 -0
- package/deprecations/switch-props/test-cases/actual.js +45 -0
- package/deprecations/switch-props/test-cases/expected.js +61 -0
- package/deprecations/switch-props/test-cases/package.actual.js +34 -0
- package/deprecations/switch-props/test-cases/package.expected.js +50 -0
- package/deprecations/switch-props/test-cases/theme.actual.js +28 -0
- package/deprecations/switch-props/test-cases/theme.expected.js +36 -0
- package/package.json +2 -2
- package/v9.0.0/system-props/index.js +13 -0
- package/v9.0.0/system-props/removeSystemProps.js +243 -0
- package/v9.0.0/system-props/test-cases/system-props.actual.js +144 -0
- package/v9.0.0/system-props/test-cases/system-props.expected.js +175 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 9.0.0-beta.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v9.0.0-alpha.4..master -->
|
|
6
|
+
|
|
7
|
+
_Mar 25, 2026_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 8 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@9.0.0-beta.0`
|
|
12
|
+
|
|
13
|
+
#### Breaking Changes
|
|
14
|
+
|
|
15
|
+
- [linear-progress] Remove deprecated CSS classes (#48068) @mj12albert
|
|
16
|
+
- [list-item, list-item-text] Remove deprecated props (#48042) @siriwatknp
|
|
17
|
+
- [button-group] Remove deprecated classes (#48043) @siriwatknp
|
|
18
|
+
- [card] Remove deprecated CardHeader props (#47995) @silviuaavram
|
|
19
|
+
- [checkbox][radio][switch] Remove deprecated inputProps and inputRef (#48059) @siriwatknp
|
|
20
|
+
- [chip] Remove deprecated classes (#48046) @silviuaavram
|
|
21
|
+
- [dialog][modal][drawer][swipeabledrawer] Remove deprecated props and classes (#48039) @silviuaavram
|
|
22
|
+
- [divider] Remove deprecated CSS classes (#48075) @siriwatknp
|
|
23
|
+
- [drawer] Remove deprecated CSS classes (#48077) @siriwatknp
|
|
24
|
+
- [image-list-item-bar] Remove deprecated CSS classes (#48064) @siriwatknp
|
|
25
|
+
- [inputs] Remove deprecated props & classes (#48071) @mj12albert
|
|
26
|
+
- [material-ui] Remove unnecessary overridesResolvers from styled components (#48082) @ZeeshanTamboli
|
|
27
|
+
- [material-ui][system] Remove deprecated system props from Box, Stack, Typography (#48072) @siriwatknp
|
|
28
|
+
- [pagination-item] Remove deprecated CSS classes (#48076) @siriwatknp
|
|
29
|
+
- [pagination-item] Remove deprecated props (#48038) @siriwatknp
|
|
30
|
+
- [rating] Remove deprecated IconContainerComponent (#48019) @siriwatknp
|
|
31
|
+
- [select] Remove deprecated CSS classes (#48065) @mj12albert
|
|
32
|
+
- [slider] Remove deprecated CSS classes (#48074) @siriwatknp
|
|
33
|
+
- [step-connector][step-content][step-label] Remove deprecated props and classes (#48058) @siriwatknp
|
|
34
|
+
- [tabs][tab] Remove deprecated CSS classes (#48078) @siriwatknp
|
|
35
|
+
- [table-pagination][table-sort-label] Remove deprecated props and classes (#48060) @siriwatknp
|
|
36
|
+
- [toggle-button-group] Remove deprecated classes (#48061) @siriwatknp
|
|
37
|
+
|
|
38
|
+
#### Changes
|
|
39
|
+
|
|
40
|
+
- [system] Improve performance when using sx prop (#44254) @romgrk
|
|
41
|
+
|
|
42
|
+
### `@mui/codemod@9.0.0-beta.0`
|
|
43
|
+
|
|
44
|
+
- [codemod] Add missing codemod links in upgrade guide (#48069) @silviuaavram
|
|
45
|
+
|
|
46
|
+
### Docs
|
|
47
|
+
|
|
48
|
+
- Mention all breaking changes in changelog (#48091) @silviuaavram
|
|
49
|
+
- Fix link to upgrade-to-v9 docs in release CHANGELOG (#48081) @ZeeshanTamboli
|
|
50
|
+
|
|
51
|
+
### Core
|
|
52
|
+
|
|
53
|
+
- Update browserslistrc (#48085) @silviuaavram
|
|
54
|
+
- [code-infra] Prevent major version updates of bundler/framework packages in bundling fixtures (#48062) @Copilot
|
|
55
|
+
- [code-infra][icons-material] Avoid material utils barrel in createSvgIcon (#48029) @anchmelev
|
|
56
|
+
- [docs-infra] Migrate more leaf components to mui-docs (#48018) @brijeshb42
|
|
57
|
+
|
|
58
|
+
All contributors of this release in alphabetical order: @anchmelev, @brijeshb42, @Copilot, @mj12albert, @romgrk, @silviuaavram, @siriwatknp, @ZeeshanTamboli
|
|
59
|
+
|
|
3
60
|
## 9.0.0-alpha.4
|
|
4
61
|
|
|
5
62
|
<!-- generated comparing v9.0.0-alpha.3..master -->
|
|
@@ -118,7 +175,7 @@ A big thanks to the 11 contributors who made this release possible.
|
|
|
118
175
|
- [tablepagination] Format pagination numbers according to locale (#47803) @siriwatknp
|
|
119
176
|
- [textfield] Use non-native label for `<TextField select/>` (#47958) @mj12albert
|
|
120
177
|
|
|
121
|
-
Check out the [v9 upgrade guide](https://mui.com/material-ui/migration/upgrade-to-v9/).
|
|
178
|
+
Check out the [v9 upgrade guide](https://next.mui.com/material-ui/migration/upgrade-to-v9/).
|
|
122
179
|
|
|
123
180
|
#### Changes
|
|
124
181
|
|
|
@@ -167,11 +224,16 @@ A big thanks to the 10 contributors who made this release possible. Here are som
|
|
|
167
224
|
|
|
168
225
|
### `@mui/material@9.0.0-alpha.3`
|
|
169
226
|
|
|
227
|
+
#### Breaking Changes
|
|
228
|
+
|
|
229
|
+
- [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
|
|
230
|
+
|
|
231
|
+
#### Changes
|
|
232
|
+
|
|
170
233
|
- [autocomplete] Add `root` slot (#47852) @GerardasB
|
|
171
234
|
- [autocomplete] Fix popup reopening on window focus regain with openOnFocus (#47790) @aman44444
|
|
172
235
|
- [autocomplete] Support full slots for clearIndicator and popupIndicator (#47891) @silviuaavram
|
|
173
236
|
- [material-ui] Partially revert "[material-ui] Clean up duplicated CSS rules (#47838)" (#47927) @sai6855
|
|
174
|
-
- [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
|
|
175
237
|
|
|
176
238
|
### Docs
|
|
177
239
|
|
|
@@ -229,16 +291,21 @@ A big thanks to the 13 contributors who made this release possible. Here are som
|
|
|
229
291
|
|
|
230
292
|
### @mui/material@9.0.0-alpha.1
|
|
231
293
|
|
|
294
|
+
#### Breaking Changes
|
|
295
|
+
|
|
232
296
|
- [Autocomplete] Prevents Autocomplete menu from opening on right click (#47797) @silviuaavram
|
|
233
297
|
- [Backdrop] Remove aria-hidden by default (#47798) @silviuaavram
|
|
234
298
|
- [ButtonBase] Ensure that onClick propagates when non-native button is clicked (#47800) @silviuaavram
|
|
235
299
|
- [Dialog][Modal] Remove `disableEscapeKeyDown` prop (#47695) @silviuaavram
|
|
236
300
|
- [Grid] Remove system props support (#47846) @siriwatknp
|
|
237
|
-
- [TableCell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47762) @ZeeshanTamboli
|
|
238
301
|
- [theme] Remove MuiTouchRipple from theme component types (#47849) @siriwatknp
|
|
239
|
-
- [Tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47684) @ZeeshanTamboli
|
|
240
302
|
- [useAutocomplete] Improve isOptionEqualToValue value argument type (#47801) @silviuaavram
|
|
241
303
|
|
|
304
|
+
#### Changes
|
|
305
|
+
|
|
306
|
+
- [TableCell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47762) @ZeeshanTamboli
|
|
307
|
+
- [Tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47684) @ZeeshanTamboli
|
|
308
|
+
|
|
242
309
|
### Docs
|
|
243
310
|
|
|
244
311
|
- [docs] Add updated community theme resource (#47847) @PeterTYLiu
|
package/README.md
CHANGED
|
@@ -900,6 +900,20 @@ npx @mui/codemod@next deprecations/button-group-classes <path>
|
|
|
900
900
|
npx @mui/codemod@next deprecations/card-header-props <path>
|
|
901
901
|
```
|
|
902
902
|
|
|
903
|
+
#### `checkbox-props`
|
|
904
|
+
|
|
905
|
+
```diff
|
|
906
|
+
<Checkbox
|
|
907
|
+
- inputProps={{ 'aria-label': 'Checkbox' }}
|
|
908
|
+
- inputRef={ref}
|
|
909
|
+
+ slotProps={{ input: { 'aria-label': 'Checkbox', ref } }}
|
|
910
|
+
/>
|
|
911
|
+
```
|
|
912
|
+
|
|
913
|
+
```bash
|
|
914
|
+
npx @mui/codemod@next deprecations/checkbox-props <path>
|
|
915
|
+
```
|
|
916
|
+
|
|
903
917
|
#### `chip-classes`
|
|
904
918
|
|
|
905
919
|
JS transforms:
|
|
@@ -1263,6 +1277,46 @@ CSS transforms:
|
|
|
1263
1277
|
npx @mui/codemod@next deprecations/drawer-classes <path>
|
|
1264
1278
|
```
|
|
1265
1279
|
|
|
1280
|
+
#### `drawer-props`
|
|
1281
|
+
|
|
1282
|
+
```diff
|
|
1283
|
+
<Drawer
|
|
1284
|
+
- BackdropComponent={CustomBackdrop}
|
|
1285
|
+
- BackdropProps={{ transitionDuration: 300 }}
|
|
1286
|
+
- PaperProps={{ elevation: 20 }}
|
|
1287
|
+
- SlideProps={{ direction: 'right' }}
|
|
1288
|
+
+ slots={{ backdrop: CustomBackdrop }}
|
|
1289
|
+
+ slotProps={{
|
|
1290
|
+
+ backdrop: { transitionDuration: 300 },
|
|
1291
|
+
+ paper: { elevation: 20 },
|
|
1292
|
+
+ transition: { direction: 'right' },
|
|
1293
|
+
+ }}
|
|
1294
|
+
/>
|
|
1295
|
+
```
|
|
1296
|
+
|
|
1297
|
+
The same applies to `SwipeableDrawer`.
|
|
1298
|
+
|
|
1299
|
+
```diff
|
|
1300
|
+
MuiDrawer: {
|
|
1301
|
+
defaultProps: {
|
|
1302
|
+
- BackdropComponent: CustomBackdrop,
|
|
1303
|
+
- BackdropProps: { transitionDuration: 300 },
|
|
1304
|
+
- PaperProps: { elevation: 20 },
|
|
1305
|
+
- SlideProps: { direction: 'right' },
|
|
1306
|
+
+ slots: { backdrop: CustomBackdrop },
|
|
1307
|
+
+ slotProps: {
|
|
1308
|
+
+ backdrop: { transitionDuration: 300 },
|
|
1309
|
+
+ paper: { elevation: 20 },
|
|
1310
|
+
+ transition: { direction: 'right' },
|
|
1311
|
+
+ },
|
|
1312
|
+
},
|
|
1313
|
+
},
|
|
1314
|
+
```
|
|
1315
|
+
|
|
1316
|
+
```bash
|
|
1317
|
+
npx @mui/codemod@next deprecations/drawer-props <path>
|
|
1318
|
+
```
|
|
1319
|
+
|
|
1266
1320
|
#### `filled-input-props`
|
|
1267
1321
|
|
|
1268
1322
|
```diff
|
|
@@ -1626,6 +1680,40 @@ npx @mui/codemod@next deprecations/modal-props <path>
|
|
|
1626
1680
|
npx @mui/codemod@next deprecations/mobile-stepper-props <path>
|
|
1627
1681
|
```
|
|
1628
1682
|
|
|
1683
|
+
#### `menu-props`
|
|
1684
|
+
|
|
1685
|
+
```diff
|
|
1686
|
+
<Menu
|
|
1687
|
+
- TransitionComponent={CustomTransition}
|
|
1688
|
+
- MenuListProps={{ disablePadding: true }}
|
|
1689
|
+
- TransitionProps={{ timeout: 200 }}
|
|
1690
|
+
+ slots={{ transition: CustomTransition }}
|
|
1691
|
+
+ slotProps={{
|
|
1692
|
+
+ list: { disablePadding: true },
|
|
1693
|
+
+ transition: { timeout: 200 },
|
|
1694
|
+
+ }}
|
|
1695
|
+
/>
|
|
1696
|
+
```
|
|
1697
|
+
|
|
1698
|
+
```diff
|
|
1699
|
+
MuiMenu: {
|
|
1700
|
+
defaultProps: {
|
|
1701
|
+
- TransitionComponent: CustomTransition,
|
|
1702
|
+
- MenuListProps: { disablePadding: true },
|
|
1703
|
+
- TransitionProps: { timeout: 200 },
|
|
1704
|
+
+ slots: { transition: CustomTransition },
|
|
1705
|
+
+ slotProps: {
|
|
1706
|
+
+ list: { disablePadding: true },
|
|
1707
|
+
+ transition: { timeout: 200 },
|
|
1708
|
+
+ },
|
|
1709
|
+
},
|
|
1710
|
+
},
|
|
1711
|
+
```
|
|
1712
|
+
|
|
1713
|
+
```bash
|
|
1714
|
+
npx @mui/codemod@next deprecations/menu-props <path>
|
|
1715
|
+
```
|
|
1716
|
+
|
|
1629
1717
|
#### `pagination-item-classes`
|
|
1630
1718
|
|
|
1631
1719
|
JS transforms:
|
|
@@ -1712,6 +1800,46 @@ npx @mui/codemod@next deprecations/pagination-item-classes <path>
|
|
|
1712
1800
|
npx @mui/codemod@next deprecations/pagination-item-props <path>
|
|
1713
1801
|
```
|
|
1714
1802
|
|
|
1803
|
+
#### `popover-props`
|
|
1804
|
+
|
|
1805
|
+
```diff
|
|
1806
|
+
<Popover
|
|
1807
|
+
- BackdropComponent={CustomBackdrop}
|
|
1808
|
+
- BackdropProps={{ timeout: 200 }}
|
|
1809
|
+
- PaperProps={{ elevation: 4 }}
|
|
1810
|
+
- TransitionComponent={CustomTransition}
|
|
1811
|
+
- TransitionProps={{ timeout: 200 }}
|
|
1812
|
+
+ slots={{ backdrop: CustomBackdrop, transition: CustomTransition }}
|
|
1813
|
+
+ slotProps={{
|
|
1814
|
+
+ backdrop: { timeout: 200 },
|
|
1815
|
+
+ paper: { elevation: 4 },
|
|
1816
|
+
+ transition: { timeout: 200 },
|
|
1817
|
+
+ }}
|
|
1818
|
+
/>
|
|
1819
|
+
```
|
|
1820
|
+
|
|
1821
|
+
```diff
|
|
1822
|
+
MuiPopover: {
|
|
1823
|
+
defaultProps: {
|
|
1824
|
+
- BackdropComponent: 'div',
|
|
1825
|
+
- BackdropProps: { timeout: 200 },
|
|
1826
|
+
- PaperProps: { elevation: 8 },
|
|
1827
|
+
- TransitionComponent: 'em',
|
|
1828
|
+
- TransitionProps: { timeout: 200 },
|
|
1829
|
+
+ slots: { backdrop: 'div', transition: 'em' },
|
|
1830
|
+
+ slotProps: {
|
|
1831
|
+
+ backdrop: { timeout: 200 },
|
|
1832
|
+
+ paper: { elevation: 8 },
|
|
1833
|
+
+ transition: { timeout: 200 },
|
|
1834
|
+
+ },
|
|
1835
|
+
},
|
|
1836
|
+
},
|
|
1837
|
+
```
|
|
1838
|
+
|
|
1839
|
+
```bash
|
|
1840
|
+
npx @mui/codemod@next deprecations/popover-props <path>
|
|
1841
|
+
```
|
|
1842
|
+
|
|
1715
1843
|
#### `popper-props`
|
|
1716
1844
|
|
|
1717
1845
|
```diff
|
|
@@ -1781,6 +1909,20 @@ npx @mui/codemod@next deprecations/outlined-input-props <path>
|
|
|
1781
1909
|
npx @mui/codemod@next deprecations/rating-props <path>
|
|
1782
1910
|
```
|
|
1783
1911
|
|
|
1912
|
+
#### `radio-props`
|
|
1913
|
+
|
|
1914
|
+
```diff
|
|
1915
|
+
<Radio
|
|
1916
|
+
- inputProps={{ 'aria-label': 'Radio' }}
|
|
1917
|
+
- inputRef={ref}
|
|
1918
|
+
+ slotProps={{ input: { 'aria-label': 'Radio', ref } }}
|
|
1919
|
+
/>
|
|
1920
|
+
```
|
|
1921
|
+
|
|
1922
|
+
```bash
|
|
1923
|
+
npx @mui/codemod@next deprecations/radio-props <path>
|
|
1924
|
+
```
|
|
1925
|
+
|
|
1784
1926
|
#### `select-classes`
|
|
1785
1927
|
|
|
1786
1928
|
JS transforms:
|
|
@@ -1878,6 +2020,78 @@ npx @mui/codemod@next deprecations/slider-props <path>
|
|
|
1878
2020
|
npx @mui/codemod@next deprecations/snackbar-props <path>
|
|
1879
2021
|
```
|
|
1880
2022
|
|
|
2023
|
+
#### `speed-dial-props`
|
|
2024
|
+
|
|
2025
|
+
```diff
|
|
2026
|
+
<SpeedDial
|
|
2027
|
+
- TransitionComponent={CustomTransition}
|
|
2028
|
+
- TransitionProps={CustomTransitionProps}
|
|
2029
|
+
+ slots={{ transition: CustomTransition }}
|
|
2030
|
+
+ slotProps={{ transition: CustomTransitionProps }}
|
|
2031
|
+
/>
|
|
2032
|
+
```
|
|
2033
|
+
|
|
2034
|
+
```diff
|
|
2035
|
+
MuiSpeedDial: {
|
|
2036
|
+
defaultProps: {
|
|
2037
|
+
- TransitionComponent: CustomTransition,
|
|
2038
|
+
- TransitionProps: CustomTransitionProps,
|
|
2039
|
+
+ slots: { transition: CustomTransition },
|
|
2040
|
+
+ slotProps: { transition: CustomTransitionProps },
|
|
2041
|
+
},
|
|
2042
|
+
},
|
|
2043
|
+
```
|
|
2044
|
+
|
|
2045
|
+
```bash
|
|
2046
|
+
npx @mui/codemod@next deprecations/speed-dial-props <path>
|
|
2047
|
+
```
|
|
2048
|
+
|
|
2049
|
+
#### `speed-dial-action-props`
|
|
2050
|
+
|
|
2051
|
+
```diff
|
|
2052
|
+
<SpeedDialAction
|
|
2053
|
+
- FabProps={FabProps}
|
|
2054
|
+
- TooltipClasses={TooltipClasses}
|
|
2055
|
+
- tooltipOpen={true}
|
|
2056
|
+
- tooltipPlacement="top"
|
|
2057
|
+
- tooltipTitle="test"
|
|
2058
|
+
+ slotProps={{
|
|
2059
|
+
+ fab: FabProps,
|
|
2060
|
+
+ tooltip: {
|
|
2061
|
+
+ classes: TooltipClasses,
|
|
2062
|
+
+ open: true,
|
|
2063
|
+
+ placement: 'top',
|
|
2064
|
+
+ title: 'test',
|
|
2065
|
+
+ },
|
|
2066
|
+
+ }}
|
|
2067
|
+
/>
|
|
2068
|
+
```
|
|
2069
|
+
|
|
2070
|
+
```diff
|
|
2071
|
+
MuiSpeedDialAction: {
|
|
2072
|
+
defaultProps: {
|
|
2073
|
+
- FabProps: { id: 'test' },
|
|
2074
|
+
- TooltipClasses: classes,
|
|
2075
|
+
- tooltipOpen: true,
|
|
2076
|
+
- tooltipPlacement: 'top',
|
|
2077
|
+
- tooltipTitle: 'test',
|
|
2078
|
+
+ slotProps: {
|
|
2079
|
+
+ fab: { id: 'test' },
|
|
2080
|
+
+ tooltip: {
|
|
2081
|
+
+ classes: classes,
|
|
2082
|
+
+ open: true,
|
|
2083
|
+
+ placement: 'top',
|
|
2084
|
+
+ title: 'test',
|
|
2085
|
+
+ },
|
|
2086
|
+
+ },
|
|
2087
|
+
},
|
|
2088
|
+
},
|
|
2089
|
+
```
|
|
2090
|
+
|
|
2091
|
+
```bash
|
|
2092
|
+
npx @mui/codemod@next deprecations/speed-dial-action-props <path>
|
|
2093
|
+
```
|
|
2094
|
+
|
|
1881
2095
|
#### `slider-classes`
|
|
1882
2096
|
|
|
1883
2097
|
JS transforms:
|
|
@@ -2133,6 +2347,20 @@ npx @mui/codemod@next deprecations/step-content-props <path>
|
|
|
2133
2347
|
npx @mui/codemod@next deprecations/step-label-props <path>
|
|
2134
2348
|
```
|
|
2135
2349
|
|
|
2350
|
+
#### `switch-props`
|
|
2351
|
+
|
|
2352
|
+
```diff
|
|
2353
|
+
<Switch
|
|
2354
|
+
- inputProps={{ 'aria-label': 'Switch' }}
|
|
2355
|
+
- inputRef={ref}
|
|
2356
|
+
+ slotProps={{ input: { 'aria-label': 'Switch', ref } }}
|
|
2357
|
+
/>
|
|
2358
|
+
```
|
|
2359
|
+
|
|
2360
|
+
```bash
|
|
2361
|
+
npx @mui/codemod@next deprecations/switch-props <path>
|
|
2362
|
+
```
|
|
2363
|
+
|
|
2136
2364
|
#### `text-field-props`
|
|
2137
2365
|
|
|
2138
2366
|
```diff
|
|
@@ -2293,6 +2521,30 @@ npx @mui/codemod@next deprecations/table-sort-label-classes <path>
|
|
|
2293
2521
|
npx @mui/codemod@next deprecations/typography-props <path>
|
|
2294
2522
|
```
|
|
2295
2523
|
|
|
2524
|
+
### v9.0.0
|
|
2525
|
+
|
|
2526
|
+
#### `system-props`
|
|
2527
|
+
|
|
2528
|
+
```bash
|
|
2529
|
+
npx @mui/codemod@next v9.0.0/system-props <path>
|
|
2530
|
+
```
|
|
2531
|
+
|
|
2532
|
+
Remove system props from Box, Stack, Typography, Link, Grid, DialogContentText, TimelineContent, and TimelineOppositeContent components and move them to the `sx` prop.
|
|
2533
|
+
|
|
2534
|
+
Compared to the v6 codemod, the v9 version also handles:
|
|
2535
|
+
|
|
2536
|
+
- `color="inherit"` on Typography (moved to `sx`)
|
|
2537
|
+
- `color="text.secondary"` on Link (moved to `sx`, while keeping named colors like `"primary"` and `"inherit"` as component props)
|
|
2538
|
+
- DialogContentText, TimelineContent, and TimelineOppositeContent components
|
|
2539
|
+
|
|
2540
|
+
```diff
|
|
2541
|
+
-<Typography color="inherit" />
|
|
2542
|
+
+<Typography sx={{ color: "inherit" }} />
|
|
2543
|
+
|
|
2544
|
+
-<Link color="text.secondary" href="#" />
|
|
2545
|
+
+<Link href="#" sx={{ color: "text.secondary" }} />
|
|
2546
|
+
```
|
|
2547
|
+
|
|
2296
2548
|
### v7.0.0
|
|
2297
2549
|
|
|
2298
2550
|
#### `theme-color-functions`
|
|
@@ -13,6 +13,7 @@ var _avatarGroupProps = _interopRequireDefault(require("../avatar-group-props"))
|
|
|
13
13
|
var _autocompleteProps = _interopRequireDefault(require("../autocomplete-props"));
|
|
14
14
|
var _avatarProps = _interopRequireDefault(require("../avatar-props"));
|
|
15
15
|
var _backdropProps = _interopRequireDefault(require("../backdrop-props"));
|
|
16
|
+
var _checkboxProps = _interopRequireDefault(require("../checkbox-props"));
|
|
16
17
|
var _buttonClasses = _interopRequireDefault(require("../button-classes"));
|
|
17
18
|
var _buttonGroupClasses = _interopRequireDefault(require("../button-group-classes"));
|
|
18
19
|
var _chipClasses = _interopRequireDefault(require("../chip-classes"));
|
|
@@ -32,12 +33,14 @@ var _linearProgressClasses = _interopRequireDefault(require("../linear-progress-
|
|
|
32
33
|
var _modalProps = _interopRequireDefault(require("../modal-props"));
|
|
33
34
|
var _outlinedInputProps = _interopRequireDefault(require("../outlined-input-props"));
|
|
34
35
|
var _paginationItemProps = _interopRequireDefault(require("../pagination-item-props"));
|
|
36
|
+
var _radioProps = _interopRequireDefault(require("../radio-props"));
|
|
35
37
|
var _paginationItemClasses = _interopRequireDefault(require("../pagination-item-classes"));
|
|
36
38
|
var _popperProps = _interopRequireDefault(require("../popper-props"));
|
|
37
39
|
var _speedDialProps = _interopRequireDefault(require("../speed-dial-props"));
|
|
38
40
|
var _tableSortLabelClasses = _interopRequireDefault(require("../table-sort-label-classes"));
|
|
39
41
|
var _selectClasses = _interopRequireDefault(require("../select-classes"));
|
|
40
42
|
var _stepConnectorClasses = _interopRequireDefault(require("../step-connector-classes"));
|
|
43
|
+
var _switchProps = _interopRequireDefault(require("../switch-props"));
|
|
41
44
|
var _stepContentProps = _interopRequireDefault(require("../step-content-props"));
|
|
42
45
|
var _stepLabelProps = _interopRequireDefault(require("../step-label-props"));
|
|
43
46
|
var _textFieldProps = _interopRequireDefault(require("../text-field-props"));
|
|
@@ -70,6 +73,7 @@ function deprecationsAll(file, api, options) {
|
|
|
70
73
|
file.source = (0, _autocompleteProps.default)(file, api, options);
|
|
71
74
|
file.source = (0, _avatarProps.default)(file, api, options);
|
|
72
75
|
file.source = (0, _backdropProps.default)(file, api, options);
|
|
76
|
+
file.source = (0, _checkboxProps.default)(file, api, options);
|
|
73
77
|
file.source = (0, _buttonClasses.default)(file, api, options);
|
|
74
78
|
file.source = (0, _buttonGroupClasses.default)(file, api, options);
|
|
75
79
|
file.source = (0, _chipClasses.default)(file, api, options);
|
|
@@ -90,8 +94,10 @@ function deprecationsAll(file, api, options) {
|
|
|
90
94
|
file.source = (0, _outlinedInputProps.default)(file, api, options);
|
|
91
95
|
file.source = (0, _paginationItemClasses.default)(file, api, options);
|
|
92
96
|
file.source = (0, _paginationItemProps.default)(file, api, options);
|
|
97
|
+
file.source = (0, _radioProps.default)(file, api, options);
|
|
93
98
|
file.source = (0, _popperProps.default)(file, api, options);
|
|
94
99
|
file.source = (0, _speedDialProps.default)(file, api, options);
|
|
100
|
+
file.source = (0, _switchProps.default)(file, api, options);
|
|
95
101
|
file.source = (0, _stepConnectorClasses.default)(file, api, options);
|
|
96
102
|
file.source = (0, _stepContentProps.default)(file, api, options);
|
|
97
103
|
file.source = (0, _stepLabelProps.default)(file, api, options);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
var _movePropIntoSlotProps = _interopRequireDefault(require("../utils/movePropIntoSlotProps"));
|
|
9
|
+
/**
|
|
10
|
+
* @param {import('jscodeshift').FileInfo} file
|
|
11
|
+
* @param {import('jscodeshift').API} api
|
|
12
|
+
*/
|
|
13
|
+
function transformer(file, api, options) {
|
|
14
|
+
const j = api.jscodeshift;
|
|
15
|
+
const root = j(file.source);
|
|
16
|
+
const printOptions = options.printOptions;
|
|
17
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
18
|
+
root,
|
|
19
|
+
packageName: options.packageName,
|
|
20
|
+
componentName: 'Checkbox',
|
|
21
|
+
propName: 'inputProps',
|
|
22
|
+
slotName: 'input'
|
|
23
|
+
});
|
|
24
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
25
|
+
root,
|
|
26
|
+
packageName: options.packageName,
|
|
27
|
+
componentName: 'Checkbox',
|
|
28
|
+
propName: 'inputRef',
|
|
29
|
+
slotName: 'input',
|
|
30
|
+
slotPropName: 'ref'
|
|
31
|
+
});
|
|
32
|
+
return root.toSource(printOptions);
|
|
33
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _checkboxProps.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _checkboxProps = _interopRequireDefault(require("./checkbox-props"));
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
8
|
+
inputProps: {
|
|
9
|
+
'aria-label': 'Checkbox'
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
13
|
+
inputRef: ref
|
|
14
|
+
});
|
|
15
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
16
|
+
inputProps: {
|
|
17
|
+
'aria-label': 'Checkbox'
|
|
18
|
+
},
|
|
19
|
+
inputRef: ref
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
22
|
+
inputProps: {
|
|
23
|
+
'aria-label': 'Checkbox'
|
|
24
|
+
},
|
|
25
|
+
inputRef: ref,
|
|
26
|
+
slotProps: {
|
|
27
|
+
root: {
|
|
28
|
+
id: 'test'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
33
|
+
inputProps: {
|
|
34
|
+
'aria-label': 'Checkbox'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
38
|
+
inputRef: ref
|
|
39
|
+
});
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
41
|
+
inputProps: {
|
|
42
|
+
'aria-label': 'Checkbox'
|
|
43
|
+
},
|
|
44
|
+
inputRef: ref
|
|
45
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
8
|
+
slotProps: {
|
|
9
|
+
input: {
|
|
10
|
+
'aria-label': 'Checkbox'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
15
|
+
slotProps: {
|
|
16
|
+
input: {
|
|
17
|
+
ref: ref
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
22
|
+
slotProps: {
|
|
23
|
+
input: {
|
|
24
|
+
'aria-label': 'Checkbox',
|
|
25
|
+
ref: ref
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
30
|
+
slotProps: {
|
|
31
|
+
root: {
|
|
32
|
+
id: 'test'
|
|
33
|
+
},
|
|
34
|
+
input: {
|
|
35
|
+
'aria-label': 'Checkbox',
|
|
36
|
+
ref: ref
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
41
|
+
slotProps: {
|
|
42
|
+
input: {
|
|
43
|
+
'aria-label': 'Checkbox'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
48
|
+
slotProps: {
|
|
49
|
+
input: {
|
|
50
|
+
ref: ref
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
55
|
+
slotProps: {
|
|
56
|
+
input: {
|
|
57
|
+
'aria-label': 'Checkbox',
|
|
58
|
+
ref: ref
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Checkbox = _interopRequireDefault(require("@org/ui/material/Checkbox"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
8
|
+
inputProps: {
|
|
9
|
+
'aria-label': 'Checkbox'
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
13
|
+
inputRef: ref
|
|
14
|
+
});
|
|
15
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
16
|
+
inputProps: {
|
|
17
|
+
'aria-label': 'Checkbox'
|
|
18
|
+
},
|
|
19
|
+
inputRef: ref
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
22
|
+
inputProps: {
|
|
23
|
+
'aria-label': 'Checkbox'
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
27
|
+
inputRef: ref
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
30
|
+
inputProps: {
|
|
31
|
+
'aria-label': 'Checkbox'
|
|
32
|
+
},
|
|
33
|
+
inputRef: ref
|
|
34
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Checkbox = _interopRequireDefault(require("@org/ui/material/Checkbox"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
8
|
+
slotProps: {
|
|
9
|
+
input: {
|
|
10
|
+
'aria-label': 'Checkbox'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
15
|
+
slotProps: {
|
|
16
|
+
input: {
|
|
17
|
+
ref: ref
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
22
|
+
slotProps: {
|
|
23
|
+
input: {
|
|
24
|
+
'aria-label': 'Checkbox',
|
|
25
|
+
ref: ref
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
30
|
+
slotProps: {
|
|
31
|
+
input: {
|
|
32
|
+
'aria-label': 'Checkbox'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
37
|
+
slotProps: {
|
|
38
|
+
input: {
|
|
39
|
+
ref: ref
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
44
|
+
slotProps: {
|
|
45
|
+
input: {
|
|
46
|
+
'aria-label': 'Checkbox',
|
|
47
|
+
ref: ref
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|