@mui/material 5.10.11 → 5.10.13
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/Alert/Alert.d.ts +34 -3
- package/Alert/Alert.js +46 -9
- package/Autocomplete/Autocomplete.d.ts +10 -0
- package/Autocomplete/Autocomplete.js +27 -11
- package/AvatarGroup/AvatarGroup.d.ts +18 -1
- package/AvatarGroup/AvatarGroup.js +25 -6
- package/Backdrop/Backdrop.d.ts +33 -3
- package/Backdrop/Backdrop.js +46 -11
- package/Badge/Badge.d.ts +11 -3
- package/Badge/Badge.js +11 -3
- package/ButtonBase/TouchRipple.js +1 -1
- package/CHANGELOG.md +134 -0
- package/Chip/Chip.js +8 -4
- package/FilledInput/FilledInput.js +48 -9
- package/FormControl/FormControl.js +29 -29
- package/FormControlLabel/FormControlLabel.d.ts +12 -0
- package/FormControlLabel/FormControlLabel.js +17 -5
- package/Input/Input.js +49 -10
- package/InputBase/InputBase.d.ts +34 -3
- package/InputBase/InputBase.js +45 -8
- package/ListItem/ListItem.d.ts +32 -3
- package/ListItem/ListItem.js +43 -11
- package/ListItemButton/ListItemButton.js +2 -2
- package/MenuItem/MenuItem.js +2 -2
- package/Modal/Modal.d.ts +11 -3
- package/Modal/Modal.js +11 -3
- package/NativeSelect/NativeSelectInput.js +11 -9
- package/OutlinedInput/OutlinedInput.js +26 -8
- package/PaginationItem/PaginationItem.d.ts +19 -7
- package/PaginationItem/PaginationItem.js +31 -22
- package/README.md +1 -0
- package/Radio/Radio.js +2 -1
- package/RadioGroup/RadioGroup.js +12 -12
- package/Select/Select.d.ts +3 -3
- package/Select/Select.js +3 -3
- package/Slider/Slider.d.ts +14 -2
- package/Slider/Slider.js +12 -3
- package/StepLabel/StepLabel.d.ts +11 -0
- package/StepLabel/StepLabel.js +15 -3
- package/SwipeableDrawer/SwipeableDrawer.js +10 -2
- package/Tooltip/Tooltip.d.ts +43 -6
- package/Tooltip/Tooltip.js +69 -32
- package/Unstable_Grid2/Grid2Props.d.ts +1 -1
- package/esm/Alert/Alert.js +46 -9
- package/esm/Autocomplete/Autocomplete.js +27 -11
- package/esm/AvatarGroup/AvatarGroup.js +25 -6
- package/esm/Backdrop/Backdrop.js +46 -11
- package/esm/Badge/Badge.js +11 -3
- package/esm/ButtonBase/TouchRipple.js +1 -1
- package/esm/Chip/Chip.js +8 -4
- package/esm/FilledInput/FilledInput.js +48 -9
- package/esm/FormControl/FormControl.js +29 -29
- package/esm/FormControlLabel/FormControlLabel.js +17 -5
- package/esm/Input/Input.js +49 -10
- package/esm/InputBase/InputBase.js +45 -8
- package/esm/ListItem/ListItem.js +43 -11
- package/esm/ListItemButton/ListItemButton.js +2 -2
- package/esm/MenuItem/MenuItem.js +2 -2
- package/esm/Modal/Modal.js +11 -3
- package/esm/NativeSelect/NativeSelectInput.js +11 -9
- package/esm/OutlinedInput/OutlinedInput.js +26 -8
- package/esm/PaginationItem/PaginationItem.js +31 -22
- package/esm/Radio/Radio.js +2 -1
- package/esm/RadioGroup/RadioGroup.js +12 -12
- package/esm/Select/Select.js +3 -3
- package/esm/Slider/Slider.js +12 -3
- package/esm/StepLabel/StepLabel.js +15 -3
- package/esm/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/esm/Tooltip/Tooltip.js +69 -32
- package/index.js +1 -1
- package/legacy/Alert/Alert.js +48 -9
- package/legacy/Autocomplete/Autocomplete.js +27 -10
- package/legacy/AvatarGroup/AvatarGroup.js +26 -6
- package/legacy/Backdrop/Backdrop.js +48 -11
- package/legacy/Badge/Badge.js +11 -3
- package/legacy/ButtonBase/TouchRipple.js +1 -1
- package/legacy/Chip/Chip.js +8 -4
- package/legacy/FilledInput/FilledInput.js +49 -9
- package/legacy/FormControl/FormControl.js +29 -29
- package/legacy/FormControlLabel/FormControlLabel.js +17 -4
- package/legacy/Input/Input.js +50 -10
- package/legacy/InputBase/InputBase.js +47 -8
- package/legacy/ListItem/ListItem.js +49 -13
- package/legacy/ListItemButton/ListItemButton.js +7 -5
- package/legacy/MenuItem/MenuItem.js +6 -4
- package/legacy/Modal/Modal.js +11 -3
- package/legacy/NativeSelect/NativeSelectInput.js +11 -9
- package/legacy/OutlinedInput/OutlinedInput.js +27 -8
- package/legacy/PaginationItem/PaginationItem.js +32 -22
- package/legacy/Radio/Radio.js +2 -1
- package/legacy/RadioGroup/RadioGroup.js +14 -14
- package/legacy/Select/Select.js +3 -3
- package/legacy/Slider/Slider.js +12 -3
- package/legacy/StepLabel/StepLabel.js +16 -3
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/legacy/Tooltip/Tooltip.js +64 -23
- package/legacy/index.js +1 -1
- package/modern/Alert/Alert.js +45 -8
- package/modern/Autocomplete/Autocomplete.js +26 -10
- package/modern/AvatarGroup/AvatarGroup.js +24 -5
- package/modern/Backdrop/Backdrop.js +45 -10
- package/modern/Badge/Badge.js +11 -3
- package/modern/ButtonBase/TouchRipple.js +1 -1
- package/modern/Chip/Chip.js +8 -4
- package/modern/FilledInput/FilledInput.js +46 -9
- package/modern/FormControl/FormControl.js +29 -29
- package/modern/FormControlLabel/FormControlLabel.js +15 -5
- package/modern/Input/Input.js +47 -10
- package/modern/InputBase/InputBase.js +43 -8
- package/modern/ListItem/ListItem.js +43 -11
- package/modern/ListItemButton/ListItemButton.js +2 -2
- package/modern/MenuItem/MenuItem.js +2 -2
- package/modern/Modal/Modal.js +11 -3
- package/modern/NativeSelect/NativeSelectInput.js +11 -9
- package/modern/OutlinedInput/OutlinedInput.js +25 -7
- package/modern/PaginationItem/PaginationItem.js +31 -22
- package/modern/Radio/Radio.js +2 -1
- package/modern/RadioGroup/RadioGroup.js +12 -12
- package/modern/Select/Select.js +3 -3
- package/modern/Slider/Slider.js +12 -3
- package/modern/StepLabel/StepLabel.js +13 -3
- package/modern/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/modern/Tooltip/Tooltip.js +59 -18
- package/modern/index.js +1 -1
- package/package.json +4 -4
- package/umd/material-ui.development.js +617 -234
- package/umd/material-ui.production.min.js +20 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,139 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v5.10.13
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.10.12..master -->
|
|
6
|
+
|
|
7
|
+
_Nov 7, 2022_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🚀 The slots API has been introduced to the Material UI package by @michaldudak (#34873).
|
|
12
|
+
- 🔥 Live editting of demos is stabilized by @oliviertassinari (#34870).
|
|
13
|
+
- Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
|
|
14
|
+
|
|
15
|
+
### `@mui/material@5.10.13`
|
|
16
|
+
|
|
17
|
+
- ​<!-- 08 -->[material-ui] Introduce the slots API (#34873) @michaldudak
|
|
18
|
+
- ​<!-- 07 -->[NativeSelectInput] Support CSS theme variables (#34975) @siriwatknp
|
|
19
|
+
|
|
20
|
+
### `@mui/system@5.10.13`
|
|
21
|
+
|
|
22
|
+
- ​<!-- 05 -->[system] Add a missing key attribute in getInitColorScheme to fix key issue (#34992) @akshaya-venkatesh8
|
|
23
|
+
|
|
24
|
+
### `@mui/base@5.0.0-alpha.105`
|
|
25
|
+
|
|
26
|
+
- ​<!-- 26 -->[base] Avoid calling setState during renders (#34916) @Janpot
|
|
27
|
+
|
|
28
|
+
### `@mui/joy@5.0.0-alpha.53`
|
|
29
|
+
|
|
30
|
+
- ​<!-- 06 -->[Select] Fix custom options menu not opening on Avatar click (#34648) @shivam1646
|
|
31
|
+
|
|
32
|
+
### Docs
|
|
33
|
+
|
|
34
|
+
- ​<!-- 20 -->[docs] Add a guide for setting dark mode by default (#34839) @siriwatknp
|
|
35
|
+
- ​<!-- 19 -->[docs] Improve code font family (#35027) @oliviertassinari
|
|
36
|
+
- ​<!-- 18 -->[docs] Revise and expand Joy UI "Alert" page (#34838) @samuelsycamore
|
|
37
|
+
- ​<!-- 17 -->[docs] Live demos v2 (#34870) @oliviertassinari
|
|
38
|
+
- ​<!-- 16 -->[docs] Fix 301 links in the docs @oliviertassinari
|
|
39
|
+
- ​<!-- 15 -->[docs] Fix code display in RTL (#34951) @oliviertassinari
|
|
40
|
+
- ​<!-- 14 -->[docs] New API design rule disabled > disable (#34972) @oliviertassinari
|
|
41
|
+
- ​<!-- 13 -->[docs] Explain the usage of Select's onOpen/onClose in the uncontrolled mode (#34755) @michaldudak
|
|
42
|
+
- ​<!-- 12 -->[docs] Add a new gold sponsor (#34984) @hbjORbj
|
|
43
|
+
- ​<!-- 11 -->[docs] Add author and published_time meta tags (#34382) @alexfauquette
|
|
44
|
+
- ​<!-- 10 -->[examples] Next.js examples v13 - fonts (#34971) @PetroSilenius
|
|
45
|
+
- ​<!-- 09 -->[examples] Next.js examples v13 - links (#34970) @PetroSilenius
|
|
46
|
+
- ​<!-- 04 -->[website] Update IPinfo.AI name @oliviertassinari
|
|
47
|
+
- ​<!-- 03 -->[website] Remove date-io from the docs dependencies (#34748) @michaldudak
|
|
48
|
+
- ​<!-- 02 -->[website] Migrate Design-kits page to use CSS theme variables (#34920) @jesrodri
|
|
49
|
+
- ​<!-- 01 -->[website] Migrate Pricing page to use CSS theme variables (#34917) @trizotti
|
|
50
|
+
|
|
51
|
+
### Core
|
|
52
|
+
|
|
53
|
+
- ​<!-- 25 -->[core] Remove default access to GitHub action scopes @oliviertassinari
|
|
54
|
+
- ​<!-- 24 -->[core] Fix Pinned-Dependencies @oliviertassinari
|
|
55
|
+
- ​<!-- 23 -->[core] Fix typos in the component name @oliviertassinari
|
|
56
|
+
- ​<!-- 22 -->[core] Fix scorecard regression @oliviertassinari
|
|
57
|
+
- ​<!-- 21 -->[core] Create the docs theme once (#34954) @oliviertassinari
|
|
58
|
+
|
|
59
|
+
All contributors of this release in alphabetical order: @akshaya-venkatesh8, @alexfauquette, @hbjORbj, @Janpot, @jesrodri, @michaldudak, @oliviertassinari, @PetroSilenius, @samuelsycamore, @shivam1646, @siriwatknp, @trizotti
|
|
60
|
+
|
|
61
|
+
## v5.10.12
|
|
62
|
+
|
|
63
|
+
<!-- generated comparing v5.10.11..master -->
|
|
64
|
+
|
|
65
|
+
_Oct 31, 2022_
|
|
66
|
+
|
|
67
|
+
A big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
|
|
68
|
+
|
|
69
|
+
- 🚀 The LinearProgress component has been added to Joy UI by @hbjORbj (#34514).
|
|
70
|
+
- Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
|
|
71
|
+
|
|
72
|
+
### `@mui/material@5.10.12`
|
|
73
|
+
|
|
74
|
+
- ​<!-- 37 -->[Chip] Don't override icon color (#34247) @emlai
|
|
75
|
+
- ​<!-- 09 -->[Radio] Skip default hover style when disableRipple is set (#34902) @VinceCYLiao
|
|
76
|
+
- ​<!-- 08 -->[SwipeableDrawer] Fix React 18 issues (#34505) @mnajdova
|
|
77
|
+
- ​<!-- 05 -->[Tooltip] Save a few bytes (#34853) @oliviertassinari
|
|
78
|
+
|
|
79
|
+
### `@mui/base@5.0.0-alpha.104`
|
|
80
|
+
|
|
81
|
+
- ​<!-- 38 -->[ButtonUnstyled] Update to render as link when href or to is provided (#34337) @EduardoSCosta
|
|
82
|
+
|
|
83
|
+
### `@mui/joy@5.0.0-alpha.52`
|
|
84
|
+
|
|
85
|
+
- ​<!-- 36 -->[Joy][circularprogress] Prevent new styles from being generated when `value` changes (#34897) @hbjORbj
|
|
86
|
+
- ​<!-- 11 -->[Joy] Add color inversion feature (#32511) @siriwatknp
|
|
87
|
+
- ​<!-- 10 -->[Joy] Add `LinearProgress` component (#34514) @hbjORbj
|
|
88
|
+
|
|
89
|
+
### Docs
|
|
90
|
+
|
|
91
|
+
- ​<!-- 40 -->[blog] Add blog post for high-level overview of all MUI products (#34325) @samuelsycamore
|
|
92
|
+
- ​<!-- 39 -->[blog] Fix hydration mistmatch (#34857) @oliviertassinari
|
|
93
|
+
- ​<!-- 21 -->[docs] Revise the Joy UI "Aspect Ratio" page (#34858) @samuelsycamore
|
|
94
|
+
- ​<!-- 20 -->[docs] Fix Safari code font size (#34859) @oliviertassinari
|
|
95
|
+
- ​<!-- 19 -->[docs] Fix spelling mistake (#34955) @punithnayak
|
|
96
|
+
- ​<!-- 18 -->[docs] Fix 404 link of supported Material UI components @oliviertassinari
|
|
97
|
+
- ​<!-- 17 -->[docs] Fix Safari button misalignment (#34861) @oliviertassinari
|
|
98
|
+
- ​<!-- 16 -->[docs] Fix typo in docs title (#34926) @PunitSoniME
|
|
99
|
+
- ​<!-- 25 -->[docs] Fix missing emotion prefixes (#34958) @oliviertassinari
|
|
100
|
+
- ​<!-- 26 -->[docs] Improve UI display for copy code (#34950) @oliviertassinari
|
|
101
|
+
- ​<!-- 15 -->[docs] Standardize all MUI Core "Usage" pages (#34183) @samuelsycamore
|
|
102
|
+
- ​<!-- 14 -->[docs] Update templates' readme files to include required dependencies (#34757) @michaldudak
|
|
103
|
+
- ​<!-- 13 -->[docs] Fix inconsistent theme colors when applying custom colors in playground (#34866) @cherniavskii
|
|
104
|
+
- ​<!-- 12 -->[docs] Fix typo in bottom-navigation.md (#34884) @RoodyCode
|
|
105
|
+
- ​<!-- 07 -->[website] Migrate about-us page to use CSS theme variables (#34919) @brianlu2610
|
|
106
|
+
- ​<!-- 06 -->[website] Migrate Product-Templates page to use CSS theme variables (#34913) @EduardoSCosta
|
|
107
|
+
- ​<!-- 05 -->[website] Migrate career page to use CSS theme variables (#34908) @the-mgi
|
|
108
|
+
- ​<!-- 04 -->[website] Update MUI X open and future roles + about page (#34894) @DanailH
|
|
109
|
+
- ​<!-- 03 -->[website] Remove one DOM node (#34960) @oliviertassinari
|
|
110
|
+
- ​<!-- 02 -->[website] Use `span` for icon image (#34914) @siriwatknp
|
|
111
|
+
- ​<!-- 01 -->[website] Fix subscribe input with Safari (#34869) @oliviertassinari
|
|
112
|
+
|
|
113
|
+
### Core
|
|
114
|
+
|
|
115
|
+
- ​<!-- 35 -->[core] Ignore compiled icons in CodeQL @oliviertassinari
|
|
116
|
+
- ​<!-- 34 -->[core] Add OSSF Scorecard action (#34854) @oliviertassinari
|
|
117
|
+
- ​<!-- 40 -->[core] Fix extra GitHub Action permission (#34496) @sashashura
|
|
118
|
+
- ​<!-- 33 -->[core] Fix duplicate id @oliviertassinari
|
|
119
|
+
- ​<!-- 41 -->[core] Enforce import \* as React (#34878) @da0x
|
|
120
|
+
- ​<!-- 32 -->[core] A couple of simply fixes from #34870 (#34953) @oliviertassinari
|
|
121
|
+
- ​<!-- 31 -->[core] Migrate outdated pattern to convention @oliviertassinari
|
|
122
|
+
- ​<!-- 30 -->[core] Pin GitHub Actions dependencies (#34929) @renovate[bot]
|
|
123
|
+
- ​<!-- 29 -->[core] Make the reproduction more important in the bug template (#34875) @oliviertassinari
|
|
124
|
+
- ​<!-- 28 -->[core] Fix docs GitHub API rate limit (#34856) @oliviertassinari
|
|
125
|
+
- ​<!-- 42 -->[core] Fix eslint issues (#34964) @mnajdova
|
|
126
|
+
- ​<!-- 27 -->[core] Pin GitHub Action to digests (#34855) @oliviertassinari
|
|
127
|
+
- ​<!-- 26 -->[core] Fix permissions in workflow @oliviertassinari
|
|
128
|
+
- ​<!-- 25 -->[core] memoize context values for react/jsx-no-constructed-context-values (#34849) @Janpot
|
|
129
|
+
- ​<!-- 24 -->[core] Fix @typescript-eslint/default-param-last issues (#34846) @Janpot
|
|
130
|
+
- ​<!-- 23 -->[core] Fix HTML validation error (#34860) @oliviertassinari
|
|
131
|
+
- ​<!-- 22 -->[core] Fix duplicate CodeQL build @oliviertassinari
|
|
132
|
+
- ​<!-- 07 -->[test] Move Firefox tests to CircleCI (#34764) @oliviertassinari
|
|
133
|
+
- ​<!-- 06 -->[test] Use screen when possible for simplicity (#34890) @oliviertassinari
|
|
134
|
+
|
|
135
|
+
All contributors of this release in alphabetical order: @cherniavskii, @DanailH, @EduardoSCosta, @emlai, @hbjORbj, @Janpot, @michaldudak, @mnajdova, @oliviertassinari, @punithnayak, @PunitSoniME, @renovate[bot], @RoodyCode, @samuelsycamore, @siriwatknp, @VinceCYLiao
|
|
136
|
+
|
|
3
137
|
## v5.10.11
|
|
4
138
|
|
|
5
139
|
<!-- generated comparing v5.10.10..master -->
|
package/Chip/Chip.js
CHANGED
|
@@ -51,6 +51,7 @@ const useUtilityClasses = ownerState => {
|
|
|
51
51
|
disabled,
|
|
52
52
|
size,
|
|
53
53
|
color,
|
|
54
|
+
iconColor,
|
|
54
55
|
onDelete,
|
|
55
56
|
clickable,
|
|
56
57
|
variant
|
|
@@ -59,7 +60,7 @@ const useUtilityClasses = ownerState => {
|
|
|
59
60
|
root: ['root', variant, disabled && 'disabled', `size${(0, _capitalize.default)(size)}`, `color${(0, _capitalize.default)(color)}`, clickable && 'clickable', clickable && `clickableColor${(0, _capitalize.default)(color)}`, onDelete && 'deletable', onDelete && `deletableColor${(0, _capitalize.default)(color)}`, `${variant}${(0, _capitalize.default)(color)}`],
|
|
60
61
|
label: ['label', `label${(0, _capitalize.default)(size)}`],
|
|
61
62
|
avatar: ['avatar', `avatar${(0, _capitalize.default)(size)}`, `avatarColor${(0, _capitalize.default)(color)}`],
|
|
62
|
-
icon: ['icon', `icon${(0, _capitalize.default)(size)}`, `iconColor${(0, _capitalize.default)(
|
|
63
|
+
icon: ['icon', `icon${(0, _capitalize.default)(size)}`, `iconColor${(0, _capitalize.default)(iconColor)}`],
|
|
63
64
|
deleteIcon: ['deleteIcon', `deleteIcon${(0, _capitalize.default)(size)}`, `deleteIconColor${(0, _capitalize.default)(color)}`, `deleteIcon${(0, _capitalize.default)(variant)}Color${(0, _capitalize.default)(color)}`]
|
|
64
65
|
};
|
|
65
66
|
return (0, _base.unstable_composeClasses)(slots, _chipClasses.getChipUtilityClass, classes);
|
|
@@ -74,6 +75,7 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
74
75
|
} = props;
|
|
75
76
|
const {
|
|
76
77
|
color,
|
|
78
|
+
iconColor,
|
|
77
79
|
clickable,
|
|
78
80
|
onDelete,
|
|
79
81
|
size,
|
|
@@ -90,7 +92,7 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
90
92
|
}, {
|
|
91
93
|
[`& .${_chipClasses.default.icon}`]: styles[`icon${(0, _capitalize.default)(size)}`]
|
|
92
94
|
}, {
|
|
93
|
-
[`& .${_chipClasses.default.icon}`]: styles[`iconColor${(0, _capitalize.default)(
|
|
95
|
+
[`& .${_chipClasses.default.icon}`]: styles[`iconColor${(0, _capitalize.default)(iconColor)}`]
|
|
94
96
|
}, {
|
|
95
97
|
[`& .${_chipClasses.default.deleteIcon}`]: styles.deleteIcon
|
|
96
98
|
}, {
|
|
@@ -159,16 +161,17 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
159
161
|
fontSize: theme.typography.pxToRem(10)
|
|
160
162
|
},
|
|
161
163
|
[`& .${_chipClasses.default.icon}`]: (0, _extends2.default)({
|
|
162
|
-
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
|
|
163
164
|
marginLeft: 5,
|
|
164
165
|
marginRight: -6
|
|
165
166
|
}, ownerState.size === 'small' && {
|
|
166
167
|
fontSize: 18,
|
|
167
168
|
marginLeft: 4,
|
|
168
169
|
marginRight: -4
|
|
170
|
+
}, ownerState.iconColor === ownerState.color && (0, _extends2.default)({
|
|
171
|
+
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor
|
|
169
172
|
}, ownerState.color !== 'default' && {
|
|
170
173
|
color: 'inherit'
|
|
171
|
-
}),
|
|
174
|
+
})),
|
|
172
175
|
[`& .${_chipClasses.default.deleteIcon}`]: (0, _extends2.default)({
|
|
173
176
|
WebkitTapHighlightColor: 'transparent',
|
|
174
177
|
color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.26)` : deleteIconColor,
|
|
@@ -371,6 +374,7 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
371
374
|
disabled,
|
|
372
375
|
size,
|
|
373
376
|
color,
|
|
377
|
+
iconColor: /*#__PURE__*/React.isValidElement(iconProp) ? iconProp.props.color || color : color,
|
|
374
378
|
onDelete: !!onDelete,
|
|
375
379
|
clickable,
|
|
376
380
|
variant
|
|
@@ -31,7 +31,7 @@ var _InputBase2 = require("../InputBase/InputBase");
|
|
|
31
31
|
|
|
32
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
33
|
|
|
34
|
-
const _excluded = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "type"];
|
|
34
|
+
const _excluded = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "slotProps", "slots", "type"];
|
|
35
35
|
|
|
36
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
37
|
|
|
@@ -206,6 +206,8 @@ const FilledInputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
|
|
|
206
206
|
paddingBottom: 9
|
|
207
207
|
}));
|
|
208
208
|
const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {
|
|
209
|
+
var _ref, _slots$root, _ref2, _slots$input;
|
|
210
|
+
|
|
209
211
|
const props = (0, _useThemeProps.default)({
|
|
210
212
|
props: inProps,
|
|
211
213
|
name: 'MuiFilledInput'
|
|
@@ -217,6 +219,8 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
|
|
|
217
219
|
// declare here to prevent spreading to DOM
|
|
218
220
|
inputComponent = 'input',
|
|
219
221
|
multiline = false,
|
|
222
|
+
slotProps,
|
|
223
|
+
slots = {},
|
|
220
224
|
type = 'text'
|
|
221
225
|
} = props,
|
|
222
226
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
@@ -235,12 +239,14 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
|
|
|
235
239
|
ownerState
|
|
236
240
|
}
|
|
237
241
|
};
|
|
238
|
-
const componentsProps = componentsPropsProp ? (0, _utils.deepmerge)(componentsPropsProp, filledInputComponentsProps) : filledInputComponentsProps;
|
|
242
|
+
const componentsProps = (slotProps != null ? slotProps : componentsPropsProp) ? (0, _utils.deepmerge)(slotProps != null ? slotProps : componentsPropsProp, filledInputComponentsProps) : filledInputComponentsProps;
|
|
243
|
+
const RootSlot = (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : FilledInputRoot;
|
|
244
|
+
const InputSlot = (_ref2 = (_slots$input = slots.input) != null ? _slots$input : components.Input) != null ? _ref2 : FilledInputInput;
|
|
239
245
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
},
|
|
246
|
+
slots: {
|
|
247
|
+
root: RootSlot,
|
|
248
|
+
input: InputSlot
|
|
249
|
+
},
|
|
244
250
|
componentsProps: componentsProps,
|
|
245
251
|
fullWidth: fullWidth,
|
|
246
252
|
inputComponent: inputComponent,
|
|
@@ -287,8 +293,11 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
|
|
|
287
293
|
.oneOfType([_propTypes.default.oneOf(['primary', 'secondary']), _propTypes.default.string]),
|
|
288
294
|
|
|
289
295
|
/**
|
|
290
|
-
* The components used for each slot inside
|
|
291
|
-
*
|
|
296
|
+
* The components used for each slot inside.
|
|
297
|
+
*
|
|
298
|
+
* This prop is an alias for the `slots` prop.
|
|
299
|
+
* It's recommended to use the `slots` prop instead.
|
|
300
|
+
*
|
|
292
301
|
* @default {}
|
|
293
302
|
*/
|
|
294
303
|
components: _propTypes.default.shape({
|
|
@@ -297,7 +306,12 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
|
|
|
297
306
|
}),
|
|
298
307
|
|
|
299
308
|
/**
|
|
300
|
-
* The props
|
|
309
|
+
* The extra props for the slot components.
|
|
310
|
+
* You can override the existing props or add new ones.
|
|
311
|
+
*
|
|
312
|
+
* This prop is an alias for the `slotProps` prop.
|
|
313
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
314
|
+
*
|
|
301
315
|
* @default {}
|
|
302
316
|
*/
|
|
303
317
|
componentsProps: _propTypes.default.shape({
|
|
@@ -427,6 +441,31 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
|
|
|
427
441
|
*/
|
|
428
442
|
rows: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
429
443
|
|
|
444
|
+
/**
|
|
445
|
+
* The extra props for the slot components.
|
|
446
|
+
* You can override the existing props or add new ones.
|
|
447
|
+
*
|
|
448
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
449
|
+
*
|
|
450
|
+
* @default {}
|
|
451
|
+
*/
|
|
452
|
+
slotProps: _propTypes.default.shape({
|
|
453
|
+
input: _propTypes.default.object,
|
|
454
|
+
root: _propTypes.default.object
|
|
455
|
+
}),
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* The components used for each slot inside.
|
|
459
|
+
*
|
|
460
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
461
|
+
*
|
|
462
|
+
* @default {}
|
|
463
|
+
*/
|
|
464
|
+
slots: _propTypes.default.shape({
|
|
465
|
+
input: _propTypes.default.elementType,
|
|
466
|
+
root: _propTypes.default.elementType
|
|
467
|
+
}),
|
|
468
|
+
|
|
430
469
|
/**
|
|
431
470
|
* Start `InputAdornment` for this component.
|
|
432
471
|
*/
|
|
@@ -206,35 +206,35 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
|
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
};
|
|
209
|
+
const childContext = React.useMemo(() => {
|
|
210
|
+
return {
|
|
211
|
+
adornedStart,
|
|
212
|
+
setAdornedStart,
|
|
213
|
+
color,
|
|
214
|
+
disabled,
|
|
215
|
+
error,
|
|
216
|
+
filled,
|
|
217
|
+
focused,
|
|
218
|
+
fullWidth,
|
|
219
|
+
hiddenLabel,
|
|
220
|
+
size,
|
|
221
|
+
onBlur: () => {
|
|
222
|
+
setFocused(false);
|
|
223
|
+
},
|
|
224
|
+
onEmpty: () => {
|
|
225
|
+
setFilled(false);
|
|
226
|
+
},
|
|
227
|
+
onFilled: () => {
|
|
228
|
+
setFilled(true);
|
|
229
|
+
},
|
|
230
|
+
onFocus: () => {
|
|
231
|
+
setFocused(true);
|
|
232
|
+
},
|
|
233
|
+
registerEffect,
|
|
234
|
+
required,
|
|
235
|
+
variant
|
|
236
|
+
};
|
|
237
|
+
}, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant]);
|
|
238
238
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControlContext.default.Provider, {
|
|
239
239
|
value: childContext,
|
|
240
240
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(FormControlRoot, (0, _extends2.default)({
|
|
@@ -59,6 +59,18 @@ export interface FormControlLabelProps
|
|
|
59
59
|
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
60
60
|
*/
|
|
61
61
|
onChange?: (event: React.SyntheticEvent, checked: boolean) => void;
|
|
62
|
+
/**
|
|
63
|
+
* The props used for each slot inside.
|
|
64
|
+
* @default {}
|
|
65
|
+
*/
|
|
66
|
+
slotProps?: {
|
|
67
|
+
/**
|
|
68
|
+
* Props applied to the Typography wrapper of the passed label.
|
|
69
|
+
* This is unused if disableTypography is true.
|
|
70
|
+
* @default {}
|
|
71
|
+
*/
|
|
72
|
+
typography?: TypographyProps;
|
|
73
|
+
};
|
|
62
74
|
/**
|
|
63
75
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
64
76
|
*/
|
|
@@ -37,7 +37,7 @@ var _formControlState = _interopRequireDefault(require("../FormControl/formContr
|
|
|
37
37
|
|
|
38
38
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
39
39
|
|
|
40
|
-
const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "value"];
|
|
40
|
+
const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "slotProps", "value"];
|
|
41
41
|
|
|
42
42
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
43
|
|
|
@@ -109,6 +109,8 @@ const FormControlLabelRoot = (0, _styled.default)('label', {
|
|
|
109
109
|
|
|
110
110
|
exports.FormControlLabelRoot = FormControlLabelRoot;
|
|
111
111
|
const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(inProps, ref) {
|
|
112
|
+
var _slotProps$typography;
|
|
113
|
+
|
|
112
114
|
const props = (0, _useThemeProps.default)({
|
|
113
115
|
props: inProps,
|
|
114
116
|
name: 'MuiFormControlLabel'
|
|
@@ -120,7 +122,8 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
120
122
|
disabled: disabledProp,
|
|
121
123
|
disableTypography,
|
|
122
124
|
label: labelProp,
|
|
123
|
-
labelPlacement = 'end'
|
|
125
|
+
labelPlacement = 'end',
|
|
126
|
+
slotProps = {}
|
|
124
127
|
} = props,
|
|
125
128
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
126
129
|
const muiFormControl = (0, _FormControl.useFormControl)();
|
|
@@ -153,13 +156,14 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
153
156
|
error: fcs.error
|
|
154
157
|
});
|
|
155
158
|
const classes = useUtilityClasses(ownerState);
|
|
159
|
+
const typographySlotProps = (_slotProps$typography = slotProps.typography) != null ? _slotProps$typography : componentsProps.typography;
|
|
156
160
|
let label = labelProp;
|
|
157
161
|
|
|
158
162
|
if (label != null && label.type !== _Typography.default && !disableTypography) {
|
|
159
163
|
label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, (0, _extends2.default)({
|
|
160
|
-
component: "span"
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
component: "span"
|
|
165
|
+
}, typographySlotProps, {
|
|
166
|
+
className: (0, _clsx.default)(classes.label, typographySlotProps == null ? void 0 : typographySlotProps.className),
|
|
163
167
|
children: label
|
|
164
168
|
}));
|
|
165
169
|
}
|
|
@@ -247,6 +251,14 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes
|
|
|
247
251
|
*/
|
|
248
252
|
onChange: _propTypes.default.func,
|
|
249
253
|
|
|
254
|
+
/**
|
|
255
|
+
* The props used for each slot inside.
|
|
256
|
+
* @default {}
|
|
257
|
+
*/
|
|
258
|
+
slotProps: _propTypes.default.shape({
|
|
259
|
+
typography: _propTypes.default.object
|
|
260
|
+
}),
|
|
261
|
+
|
|
250
262
|
/**
|
|
251
263
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
252
264
|
*/
|
package/Input/Input.js
CHANGED
|
@@ -31,7 +31,7 @@ var _InputBase2 = require("../InputBase/InputBase");
|
|
|
31
31
|
|
|
32
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
33
|
|
|
34
|
-
const _excluded = ["disableUnderline", "components", "componentsProps", "fullWidth", "inputComponent", "multiline", "type"];
|
|
34
|
+
const _excluded = ["disableUnderline", "components", "componentsProps", "fullWidth", "inputComponent", "multiline", "slotProps", "slots", "type"];
|
|
35
35
|
|
|
36
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
37
|
|
|
@@ -136,6 +136,8 @@ const InputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
|
|
|
136
136
|
overridesResolver: _InputBase2.inputOverridesResolver
|
|
137
137
|
})({});
|
|
138
138
|
const Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {
|
|
139
|
+
var _ref, _slots$root, _ref2, _slots$input;
|
|
140
|
+
|
|
139
141
|
const props = (0, _useThemeProps.default)({
|
|
140
142
|
props: inProps,
|
|
141
143
|
name: 'MuiInput'
|
|
@@ -147,6 +149,8 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {
|
|
|
147
149
|
fullWidth = false,
|
|
148
150
|
inputComponent = 'input',
|
|
149
151
|
multiline = false,
|
|
152
|
+
slotProps,
|
|
153
|
+
slots = {},
|
|
150
154
|
type = 'text'
|
|
151
155
|
} = props,
|
|
152
156
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
@@ -159,13 +163,15 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {
|
|
|
159
163
|
ownerState
|
|
160
164
|
}
|
|
161
165
|
};
|
|
162
|
-
const componentsProps = componentsPropsProp ? (0, _utils.deepmerge)(componentsPropsProp, inputComponentsProps) : inputComponentsProps;
|
|
166
|
+
const componentsProps = (slotProps != null ? slotProps : componentsPropsProp) ? (0, _utils.deepmerge)(slotProps != null ? slotProps : componentsPropsProp, inputComponentsProps) : inputComponentsProps;
|
|
167
|
+
const RootSlot = (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : InputRoot;
|
|
168
|
+
const InputSlot = (_ref2 = (_slots$input = slots.input) != null ? _slots$input : components.Input) != null ? _ref2 : InputInput;
|
|
163
169
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
170
|
+
slots: {
|
|
171
|
+
root: RootSlot,
|
|
172
|
+
input: InputSlot
|
|
173
|
+
},
|
|
174
|
+
slotProps: componentsProps,
|
|
169
175
|
fullWidth: fullWidth,
|
|
170
176
|
inputComponent: inputComponent,
|
|
171
177
|
multiline: multiline,
|
|
@@ -211,8 +217,11 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
|
|
|
211
217
|
.oneOfType([_propTypes.default.oneOf(['primary', 'secondary']), _propTypes.default.string]),
|
|
212
218
|
|
|
213
219
|
/**
|
|
214
|
-
* The components used for each slot inside
|
|
215
|
-
*
|
|
220
|
+
* The components used for each slot inside.
|
|
221
|
+
*
|
|
222
|
+
* This prop is an alias for the `slots` prop.
|
|
223
|
+
* It's recommended to use the `slots` prop instead.
|
|
224
|
+
*
|
|
216
225
|
* @default {}
|
|
217
226
|
*/
|
|
218
227
|
components: _propTypes.default.shape({
|
|
@@ -221,7 +230,12 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
|
|
|
221
230
|
}),
|
|
222
231
|
|
|
223
232
|
/**
|
|
224
|
-
* The props
|
|
233
|
+
* The extra props for the slot components.
|
|
234
|
+
* You can override the existing props or add new ones.
|
|
235
|
+
*
|
|
236
|
+
* This prop is an alias for the `slotProps` prop.
|
|
237
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
238
|
+
*
|
|
225
239
|
* @default {}
|
|
226
240
|
*/
|
|
227
241
|
componentsProps: _propTypes.default.shape({
|
|
@@ -343,6 +357,31 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
|
|
|
343
357
|
*/
|
|
344
358
|
rows: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
345
359
|
|
|
360
|
+
/**
|
|
361
|
+
* The extra props for the slot components.
|
|
362
|
+
* You can override the existing props or add new ones.
|
|
363
|
+
*
|
|
364
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
365
|
+
*
|
|
366
|
+
* @default {}
|
|
367
|
+
*/
|
|
368
|
+
slotProps: _propTypes.default.shape({
|
|
369
|
+
input: _propTypes.default.object,
|
|
370
|
+
root: _propTypes.default.object
|
|
371
|
+
}),
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* The components used for each slot inside.
|
|
375
|
+
*
|
|
376
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
377
|
+
*
|
|
378
|
+
* @default {}
|
|
379
|
+
*/
|
|
380
|
+
slots: _propTypes.default.shape({
|
|
381
|
+
input: _propTypes.default.elementType,
|
|
382
|
+
root: _propTypes.default.elementType
|
|
383
|
+
}),
|
|
384
|
+
|
|
346
385
|
/**
|
|
347
386
|
* Start `InputAdornment` for this component.
|
|
348
387
|
*/
|
package/InputBase/InputBase.d.ts
CHANGED
|
@@ -54,8 +54,11 @@ export interface InputBaseProps
|
|
|
54
54
|
InputBasePropsColorOverrides
|
|
55
55
|
>;
|
|
56
56
|
/**
|
|
57
|
-
* The components used for each slot inside
|
|
58
|
-
*
|
|
57
|
+
* The components used for each slot inside.
|
|
58
|
+
*
|
|
59
|
+
* This prop is an alias for the `slots` prop.
|
|
60
|
+
* It's recommended to use the `slots` prop instead.
|
|
61
|
+
*
|
|
59
62
|
* @default {}
|
|
60
63
|
*/
|
|
61
64
|
components?: {
|
|
@@ -63,7 +66,12 @@ export interface InputBaseProps
|
|
|
63
66
|
Input?: React.ElementType;
|
|
64
67
|
};
|
|
65
68
|
/**
|
|
66
|
-
* The props
|
|
69
|
+
* The extra props for the slot components.
|
|
70
|
+
* You can override the existing props or add new ones.
|
|
71
|
+
*
|
|
72
|
+
* This prop is an alias for the `slotProps` prop.
|
|
73
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
74
|
+
*
|
|
67
75
|
* @default {}
|
|
68
76
|
*/
|
|
69
77
|
componentsProps?: {
|
|
@@ -192,6 +200,29 @@ export interface InputBaseProps
|
|
|
192
200
|
* The size of the component.
|
|
193
201
|
*/
|
|
194
202
|
size?: OverridableStringUnion<'small' | 'medium', InputBasePropsSizeOverrides>;
|
|
203
|
+
/**
|
|
204
|
+
* The extra props for the slot components.
|
|
205
|
+
* You can override the existing props or add new ones.
|
|
206
|
+
*
|
|
207
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
208
|
+
*
|
|
209
|
+
* @default {}
|
|
210
|
+
*/
|
|
211
|
+
slotProps?: {
|
|
212
|
+
root?: React.HTMLAttributes<HTMLDivElement> & InputBaseComponentsPropsOverrides;
|
|
213
|
+
input?: React.InputHTMLAttributes<HTMLInputElement> & InputBaseComponentsPropsOverrides;
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* The components used for each slot inside.
|
|
217
|
+
*
|
|
218
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
219
|
+
*
|
|
220
|
+
* @default {}
|
|
221
|
+
*/
|
|
222
|
+
slots?: {
|
|
223
|
+
root?: React.ElementType;
|
|
224
|
+
input?: React.ElementType;
|
|
225
|
+
};
|
|
195
226
|
/**
|
|
196
227
|
* Start `InputAdornment` for this component.
|
|
197
228
|
*/
|