@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.
Files changed (127) hide show
  1. package/Alert/Alert.d.ts +34 -3
  2. package/Alert/Alert.js +46 -9
  3. package/Autocomplete/Autocomplete.d.ts +10 -0
  4. package/Autocomplete/Autocomplete.js +27 -11
  5. package/AvatarGroup/AvatarGroup.d.ts +18 -1
  6. package/AvatarGroup/AvatarGroup.js +25 -6
  7. package/Backdrop/Backdrop.d.ts +33 -3
  8. package/Backdrop/Backdrop.js +46 -11
  9. package/Badge/Badge.d.ts +11 -3
  10. package/Badge/Badge.js +11 -3
  11. package/ButtonBase/TouchRipple.js +1 -1
  12. package/CHANGELOG.md +134 -0
  13. package/Chip/Chip.js +8 -4
  14. package/FilledInput/FilledInput.js +48 -9
  15. package/FormControl/FormControl.js +29 -29
  16. package/FormControlLabel/FormControlLabel.d.ts +12 -0
  17. package/FormControlLabel/FormControlLabel.js +17 -5
  18. package/Input/Input.js +49 -10
  19. package/InputBase/InputBase.d.ts +34 -3
  20. package/InputBase/InputBase.js +45 -8
  21. package/ListItem/ListItem.d.ts +32 -3
  22. package/ListItem/ListItem.js +43 -11
  23. package/ListItemButton/ListItemButton.js +2 -2
  24. package/MenuItem/MenuItem.js +2 -2
  25. package/Modal/Modal.d.ts +11 -3
  26. package/Modal/Modal.js +11 -3
  27. package/NativeSelect/NativeSelectInput.js +11 -9
  28. package/OutlinedInput/OutlinedInput.js +26 -8
  29. package/PaginationItem/PaginationItem.d.ts +19 -7
  30. package/PaginationItem/PaginationItem.js +31 -22
  31. package/README.md +1 -0
  32. package/Radio/Radio.js +2 -1
  33. package/RadioGroup/RadioGroup.js +12 -12
  34. package/Select/Select.d.ts +3 -3
  35. package/Select/Select.js +3 -3
  36. package/Slider/Slider.d.ts +14 -2
  37. package/Slider/Slider.js +12 -3
  38. package/StepLabel/StepLabel.d.ts +11 -0
  39. package/StepLabel/StepLabel.js +15 -3
  40. package/SwipeableDrawer/SwipeableDrawer.js +10 -2
  41. package/Tooltip/Tooltip.d.ts +43 -6
  42. package/Tooltip/Tooltip.js +69 -32
  43. package/Unstable_Grid2/Grid2Props.d.ts +1 -1
  44. package/esm/Alert/Alert.js +46 -9
  45. package/esm/Autocomplete/Autocomplete.js +27 -11
  46. package/esm/AvatarGroup/AvatarGroup.js +25 -6
  47. package/esm/Backdrop/Backdrop.js +46 -11
  48. package/esm/Badge/Badge.js +11 -3
  49. package/esm/ButtonBase/TouchRipple.js +1 -1
  50. package/esm/Chip/Chip.js +8 -4
  51. package/esm/FilledInput/FilledInput.js +48 -9
  52. package/esm/FormControl/FormControl.js +29 -29
  53. package/esm/FormControlLabel/FormControlLabel.js +17 -5
  54. package/esm/Input/Input.js +49 -10
  55. package/esm/InputBase/InputBase.js +45 -8
  56. package/esm/ListItem/ListItem.js +43 -11
  57. package/esm/ListItemButton/ListItemButton.js +2 -2
  58. package/esm/MenuItem/MenuItem.js +2 -2
  59. package/esm/Modal/Modal.js +11 -3
  60. package/esm/NativeSelect/NativeSelectInput.js +11 -9
  61. package/esm/OutlinedInput/OutlinedInput.js +26 -8
  62. package/esm/PaginationItem/PaginationItem.js +31 -22
  63. package/esm/Radio/Radio.js +2 -1
  64. package/esm/RadioGroup/RadioGroup.js +12 -12
  65. package/esm/Select/Select.js +3 -3
  66. package/esm/Slider/Slider.js +12 -3
  67. package/esm/StepLabel/StepLabel.js +15 -3
  68. package/esm/SwipeableDrawer/SwipeableDrawer.js +9 -2
  69. package/esm/Tooltip/Tooltip.js +69 -32
  70. package/index.js +1 -1
  71. package/legacy/Alert/Alert.js +48 -9
  72. package/legacy/Autocomplete/Autocomplete.js +27 -10
  73. package/legacy/AvatarGroup/AvatarGroup.js +26 -6
  74. package/legacy/Backdrop/Backdrop.js +48 -11
  75. package/legacy/Badge/Badge.js +11 -3
  76. package/legacy/ButtonBase/TouchRipple.js +1 -1
  77. package/legacy/Chip/Chip.js +8 -4
  78. package/legacy/FilledInput/FilledInput.js +49 -9
  79. package/legacy/FormControl/FormControl.js +29 -29
  80. package/legacy/FormControlLabel/FormControlLabel.js +17 -4
  81. package/legacy/Input/Input.js +50 -10
  82. package/legacy/InputBase/InputBase.js +47 -8
  83. package/legacy/ListItem/ListItem.js +49 -13
  84. package/legacy/ListItemButton/ListItemButton.js +7 -5
  85. package/legacy/MenuItem/MenuItem.js +6 -4
  86. package/legacy/Modal/Modal.js +11 -3
  87. package/legacy/NativeSelect/NativeSelectInput.js +11 -9
  88. package/legacy/OutlinedInput/OutlinedInput.js +27 -8
  89. package/legacy/PaginationItem/PaginationItem.js +32 -22
  90. package/legacy/Radio/Radio.js +2 -1
  91. package/legacy/RadioGroup/RadioGroup.js +14 -14
  92. package/legacy/Select/Select.js +3 -3
  93. package/legacy/Slider/Slider.js +12 -3
  94. package/legacy/StepLabel/StepLabel.js +16 -3
  95. package/legacy/SwipeableDrawer/SwipeableDrawer.js +9 -2
  96. package/legacy/Tooltip/Tooltip.js +64 -23
  97. package/legacy/index.js +1 -1
  98. package/modern/Alert/Alert.js +45 -8
  99. package/modern/Autocomplete/Autocomplete.js +26 -10
  100. package/modern/AvatarGroup/AvatarGroup.js +24 -5
  101. package/modern/Backdrop/Backdrop.js +45 -10
  102. package/modern/Badge/Badge.js +11 -3
  103. package/modern/ButtonBase/TouchRipple.js +1 -1
  104. package/modern/Chip/Chip.js +8 -4
  105. package/modern/FilledInput/FilledInput.js +46 -9
  106. package/modern/FormControl/FormControl.js +29 -29
  107. package/modern/FormControlLabel/FormControlLabel.js +15 -5
  108. package/modern/Input/Input.js +47 -10
  109. package/modern/InputBase/InputBase.js +43 -8
  110. package/modern/ListItem/ListItem.js +43 -11
  111. package/modern/ListItemButton/ListItemButton.js +2 -2
  112. package/modern/MenuItem/MenuItem.js +2 -2
  113. package/modern/Modal/Modal.js +11 -3
  114. package/modern/NativeSelect/NativeSelectInput.js +11 -9
  115. package/modern/OutlinedInput/OutlinedInput.js +25 -7
  116. package/modern/PaginationItem/PaginationItem.js +31 -22
  117. package/modern/Radio/Radio.js +2 -1
  118. package/modern/RadioGroup/RadioGroup.js +12 -12
  119. package/modern/Select/Select.js +3 -3
  120. package/modern/Slider/Slider.js +12 -3
  121. package/modern/StepLabel/StepLabel.js +13 -3
  122. package/modern/SwipeableDrawer/SwipeableDrawer.js +9 -2
  123. package/modern/Tooltip/Tooltip.js +59 -18
  124. package/modern/index.js +1 -1
  125. package/package.json +4 -4
  126. package/umd/material-ui.development.js +617 -234
  127. 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
+ - &#8203;<!-- 08 -->[material-ui] Introduce the slots API (#34873) @michaldudak
18
+ - &#8203;<!-- 07 -->[NativeSelectInput] Support CSS theme variables (#34975) @siriwatknp
19
+
20
+ ### `@mui/system@5.10.13`
21
+
22
+ - &#8203;<!-- 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
+ - &#8203;<!-- 26 -->[base] Avoid calling setState during renders (#34916) @Janpot
27
+
28
+ ### `@mui/joy@5.0.0-alpha.53`
29
+
30
+ - &#8203;<!-- 06 -->[Select] Fix custom options menu not opening on Avatar click (#34648) @shivam1646
31
+
32
+ ### Docs
33
+
34
+ - &#8203;<!-- 20 -->[docs] Add a guide for setting dark mode by default (#34839) @siriwatknp
35
+ - &#8203;<!-- 19 -->[docs] Improve code font family (#35027) @oliviertassinari
36
+ - &#8203;<!-- 18 -->[docs] Revise and expand Joy UI "Alert" page (#34838) @samuelsycamore
37
+ - &#8203;<!-- 17 -->[docs] Live demos v2 (#34870) @oliviertassinari
38
+ - &#8203;<!-- 16 -->[docs] Fix 301 links in the docs @oliviertassinari
39
+ - &#8203;<!-- 15 -->[docs] Fix code display in RTL (#34951) @oliviertassinari
40
+ - &#8203;<!-- 14 -->[docs] New API design rule disabled > disable (#34972) @oliviertassinari
41
+ - &#8203;<!-- 13 -->[docs] Explain the usage of Select's onOpen/onClose in the uncontrolled mode (#34755) @michaldudak
42
+ - &#8203;<!-- 12 -->[docs] Add a new gold sponsor (#34984) @hbjORbj
43
+ - &#8203;<!-- 11 -->[docs] Add author and published_time meta tags (#34382) @alexfauquette
44
+ - &#8203;<!-- 10 -->[examples] Next.js examples v13 - fonts (#34971) @PetroSilenius
45
+ - &#8203;<!-- 09 -->[examples] Next.js examples v13 - links (#34970) @PetroSilenius
46
+ - &#8203;<!-- 04 -->[website] Update IPinfo.AI name @oliviertassinari
47
+ - &#8203;<!-- 03 -->[website] Remove date-io from the docs dependencies (#34748) @michaldudak
48
+ - &#8203;<!-- 02 -->[website] Migrate Design-kits page to use CSS theme variables (#34920) @jesrodri
49
+ - &#8203;<!-- 01 -->[website] Migrate Pricing page to use CSS theme variables (#34917) @trizotti
50
+
51
+ ### Core
52
+
53
+ - &#8203;<!-- 25 -->[core] Remove default access to GitHub action scopes @oliviertassinari
54
+ - &#8203;<!-- 24 -->[core] Fix Pinned-Dependencies @oliviertassinari
55
+ - &#8203;<!-- 23 -->[core] Fix typos in the component name @oliviertassinari
56
+ - &#8203;<!-- 22 -->[core] Fix scorecard regression @oliviertassinari
57
+ - &#8203;<!-- 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
+ - &#8203;<!-- 37 -->[Chip] Don't override icon color (#34247) @emlai
75
+ - &#8203;<!-- 09 -->[Radio] Skip default hover style when disableRipple is set (#34902) @VinceCYLiao
76
+ - &#8203;<!-- 08 -->[SwipeableDrawer] Fix React 18 issues (#34505) @mnajdova
77
+ - &#8203;<!-- 05 -->[Tooltip] Save a few bytes (#34853) @oliviertassinari
78
+
79
+ ### `@mui/base@5.0.0-alpha.104`
80
+
81
+ - &#8203;<!-- 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
+ - &#8203;<!-- 36 -->[Joy][circularprogress] Prevent new styles from being generated when `value` changes (#34897) @hbjORbj
86
+ - &#8203;<!-- 11 -->[Joy] Add color inversion feature (#32511) @siriwatknp
87
+ - &#8203;<!-- 10 -->[Joy] Add `LinearProgress` component (#34514) @hbjORbj
88
+
89
+ ### Docs
90
+
91
+ - &#8203;<!-- 40 -->[blog] Add blog post for high-level overview of all MUI products (#34325) @samuelsycamore
92
+ - &#8203;<!-- 39 -->[blog] Fix hydration mistmatch (#34857) @oliviertassinari
93
+ - &#8203;<!-- 21 -->[docs] Revise the Joy UI "Aspect Ratio" page (#34858) @samuelsycamore
94
+ - &#8203;<!-- 20 -->[docs] Fix Safari code font size (#34859) @oliviertassinari
95
+ - &#8203;<!-- 19 -->[docs] Fix spelling mistake (#34955) @punithnayak
96
+ - &#8203;<!-- 18 -->[docs] Fix 404 link of supported Material UI components @oliviertassinari
97
+ - &#8203;<!-- 17 -->[docs] Fix Safari button misalignment (#34861) @oliviertassinari
98
+ - &#8203;<!-- 16 -->[docs] Fix typo in docs title (#34926) @PunitSoniME
99
+ - &#8203;<!-- 25 -->[docs] Fix missing emotion prefixes (#34958) @oliviertassinari
100
+ - &#8203;<!-- 26 -->[docs] Improve UI display for copy code (#34950) @oliviertassinari
101
+ - &#8203;<!-- 15 -->[docs] Standardize all MUI Core "Usage" pages (#34183) @samuelsycamore
102
+ - &#8203;<!-- 14 -->[docs] Update templates' readme files to include required dependencies (#34757) @michaldudak
103
+ - &#8203;<!-- 13 -->[docs] Fix inconsistent theme colors when applying custom colors in playground (#34866) @cherniavskii
104
+ - &#8203;<!-- 12 -->[docs] Fix typo in bottom-navigation.md (#34884) @RoodyCode
105
+ - &#8203;<!-- 07 -->[website] Migrate about-us page to use CSS theme variables (#34919) @brianlu2610
106
+ - &#8203;<!-- 06 -->[website] Migrate Product-Templates page to use CSS theme variables (#34913) @EduardoSCosta
107
+ - &#8203;<!-- 05 -->[website] Migrate career page to use CSS theme variables (#34908) @the-mgi
108
+ - &#8203;<!-- 04 -->[website] Update MUI X open and future roles + about page (#34894) @DanailH
109
+ - &#8203;<!-- 03 -->[website] Remove one DOM node (#34960) @oliviertassinari
110
+ - &#8203;<!-- 02 -->[website] Use `span` for icon image (#34914) @siriwatknp
111
+ - &#8203;<!-- 01 -->[website] Fix subscribe input with Safari (#34869) @oliviertassinari
112
+
113
+ ### Core
114
+
115
+ - &#8203;<!-- 35 -->[core] Ignore compiled icons in CodeQL @oliviertassinari
116
+ - &#8203;<!-- 34 -->[core] Add OSSF Scorecard action (#34854) @oliviertassinari
117
+ - &#8203;<!-- 40 -->[core] Fix extra GitHub Action permission (#34496) @sashashura
118
+ - &#8203;<!-- 33 -->[core] Fix duplicate id @oliviertassinari
119
+ - &#8203;<!-- 41 -->[core] Enforce import \* as React (#34878) @da0x
120
+ - &#8203;<!-- 32 -->[core] A couple of simply fixes from #34870 (#34953) @oliviertassinari
121
+ - &#8203;<!-- 31 -->[core] Migrate outdated pattern to convention @oliviertassinari
122
+ - &#8203;<!-- 30 -->[core] Pin GitHub Actions dependencies (#34929) @renovate[bot]
123
+ - &#8203;<!-- 29 -->[core] Make the reproduction more important in the bug template (#34875) @oliviertassinari
124
+ - &#8203;<!-- 28 -->[core] Fix docs GitHub API rate limit (#34856) @oliviertassinari
125
+ - &#8203;<!-- 42 -->[core] Fix eslint issues (#34964) @mnajdova
126
+ - &#8203;<!-- 27 -->[core] Pin GitHub Action to digests (#34855) @oliviertassinari
127
+ - &#8203;<!-- 26 -->[core] Fix permissions in workflow @oliviertassinari
128
+ - &#8203;<!-- 25 -->[core] memoize context values for react/jsx-no-constructed-context-values (#34849) @Janpot
129
+ - &#8203;<!-- 24 -->[core] Fix @typescript-eslint/default-param-last issues (#34846) @Janpot
130
+ - &#8203;<!-- 23 -->[core] Fix HTML validation error (#34860) @oliviertassinari
131
+ - &#8203;<!-- 22 -->[core] Fix duplicate CodeQL build @oliviertassinari
132
+ - &#8203;<!-- 07 -->[test] Move Firefox tests to CircleCI (#34764) @oliviertassinari
133
+ - &#8203;<!-- 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)(color)}`],
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)(color)}`]
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
- components: (0, _extends2.default)({
241
- Root: FilledInputRoot,
242
- Input: FilledInputInput
243
- }, components),
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 the InputBase.
291
- * Either a string to use a HTML element or a component.
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 used for each slot inside the Input.
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 onFilled = React.useCallback(() => {
210
- setFilled(true);
211
- }, []);
212
- const onEmpty = React.useCallback(() => {
213
- setFilled(false);
214
- }, []);
215
- const childContext = {
216
- adornedStart,
217
- setAdornedStart,
218
- color,
219
- disabled,
220
- error,
221
- filled,
222
- focused,
223
- fullWidth,
224
- hiddenLabel,
225
- size,
226
- onBlur: () => {
227
- setFocused(false);
228
- },
229
- onEmpty,
230
- onFilled,
231
- onFocus: () => {
232
- setFocused(true);
233
- },
234
- registerEffect,
235
- required,
236
- variant
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
- className: classes.label
162
- }, componentsProps.typography, {
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
- components: (0, _extends2.default)({
165
- Root: InputRoot,
166
- Input: InputInput
167
- }, components),
168
- componentsProps: componentsProps,
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 the InputBase.
215
- * Either a string to use a HTML element or a component.
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 used for each slot inside the Input.
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
  */
@@ -54,8 +54,11 @@ export interface InputBaseProps
54
54
  InputBasePropsColorOverrides
55
55
  >;
56
56
  /**
57
- * The components used for each slot inside the InputBase.
58
- * Either a string to use a HTML element or a component.
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 used for each slot inside the Input.
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
  */