@mui/material 6.4.11 → 6.5.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.
Files changed (50) hide show
  1. package/Badge/Badge.d.ts +32 -28
  2. package/Badge/Badge.js +27 -20
  3. package/BottomNavigationAction/BottomNavigationAction.d.ts +40 -3
  4. package/BottomNavigationAction/BottomNavigationAction.js +53 -9
  5. package/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  6. package/CHANGELOG.md +66 -0
  7. package/CardActionArea/CardActionArea.d.ts +40 -3
  8. package/CardActionArea/CardActionArea.js +47 -8
  9. package/Menu/Menu.d.ts +1 -1
  10. package/NativeSelect/NativeSelectInput.js +6 -2
  11. package/OutlinedInput/NotchedOutline.js +2 -0
  12. package/OutlinedInput/OutlinedInput.d.ts +29 -2
  13. package/OutlinedInput/OutlinedInput.js +30 -10
  14. package/Radio/RadioButtonIcon.js +7 -2
  15. package/SwipeableDrawer/SwipeArea.js +1 -0
  16. package/index.js +1 -1
  17. package/internal/SwitchBase.js +4 -1
  18. package/modern/Badge/Badge.js +27 -20
  19. package/modern/BottomNavigationAction/BottomNavigationAction.js +53 -9
  20. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  21. package/modern/CardActionArea/CardActionArea.js +47 -8
  22. package/modern/NativeSelect/NativeSelectInput.js +6 -2
  23. package/modern/OutlinedInput/NotchedOutline.js +2 -0
  24. package/modern/OutlinedInput/OutlinedInput.js +30 -10
  25. package/modern/Radio/RadioButtonIcon.js +7 -2
  26. package/modern/SwipeableDrawer/SwipeArea.js +1 -0
  27. package/modern/index.js +1 -1
  28. package/modern/internal/SwitchBase.js +4 -1
  29. package/modern/styles/ThemeProvider.js +17 -17
  30. package/modern/styles/shouldSkipGeneratingVar.js +1 -1
  31. package/modern/version/index.js +3 -3
  32. package/node/Badge/Badge.js +27 -20
  33. package/node/BottomNavigationAction/BottomNavigationAction.js +53 -9
  34. package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  35. package/node/CardActionArea/CardActionArea.js +47 -8
  36. package/node/NativeSelect/NativeSelectInput.js +6 -2
  37. package/node/OutlinedInput/NotchedOutline.js +2 -0
  38. package/node/OutlinedInput/OutlinedInput.js +30 -10
  39. package/node/Radio/RadioButtonIcon.js +7 -2
  40. package/node/SwipeableDrawer/SwipeArea.js +1 -0
  41. package/node/index.js +1 -1
  42. package/node/internal/SwitchBase.js +4 -1
  43. package/node/styles/ThemeProvider.js +17 -17
  44. package/node/styles/shouldSkipGeneratingVar.js +1 -1
  45. package/node/version/index.js +3 -3
  46. package/package.json +6 -6
  47. package/styles/ThemeProvider.js +17 -17
  48. package/styles/createThemeNoVars.d.ts +1 -0
  49. package/styles/shouldSkipGeneratingVar.js +1 -1
  50. package/version/index.js +3 -3
@@ -14,6 +14,7 @@ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFil
14
14
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
15
15
  import outlinedInputClasses, { getOutlinedInputUtilityClass } from "./outlinedInputClasses.js";
16
16
  import InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.js";
17
+ import useSlot from "../utils/useSlot.js";
17
18
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
18
19
  const useUtilityClasses = ownerState => {
19
20
  const {
@@ -178,7 +179,6 @@ const OutlinedInputInput = styled(InputBaseInput, {
178
179
  }]
179
180
  })));
180
181
  const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {
181
- var _React$Fragment;
182
182
  const props = useDefaultProps({
183
183
  props: inProps,
184
184
  name: 'MuiOutlinedInput'
@@ -191,6 +191,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
191
191
  multiline = false,
192
192
  notched,
193
193
  slots = {},
194
+ slotProps = {},
194
195
  type = 'text',
195
196
  ...other
196
197
  } = props;
@@ -216,17 +217,29 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
216
217
  };
217
218
  const RootSlot = slots.root ?? components.Root ?? OutlinedInputRoot;
218
219
  const InputSlot = slots.input ?? components.Input ?? OutlinedInputInput;
220
+ const [NotchedSlot, notchedProps] = useSlot('notchedOutline', {
221
+ elementType: NotchedOutlineRoot,
222
+ className: classes.notchedOutline,
223
+ shouldForwardComponentProp: true,
224
+ ownerState,
225
+ externalForwardedProps: {
226
+ slots,
227
+ slotProps
228
+ },
229
+ additionalProps: {
230
+ label: label != null && label !== '' && fcs.required ? /*#__PURE__*/_jsxs(React.Fragment, {
231
+ children: [label, "\u2009", '*']
232
+ }) : label
233
+ }
234
+ });
219
235
  return /*#__PURE__*/_jsx(InputBase, {
220
236
  slots: {
221
237
  root: RootSlot,
222
238
  input: InputSlot
223
239
  },
224
- renderSuffix: state => /*#__PURE__*/_jsx(NotchedOutlineRoot, {
225
- ownerState: ownerState,
226
- className: classes.notchedOutline,
227
- label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
228
- children: [label, "\u2009", '*']
229
- })) : label,
240
+ slotProps: slotProps,
241
+ renderSuffix: state => /*#__PURE__*/_jsx(NotchedSlot, {
242
+ ...notchedProps,
230
243
  notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
231
244
  }),
232
245
  fullWidth: fullWidth,
@@ -377,15 +390,22 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes /* remove-propty
377
390
  * Number of rows to display when multiline option is set to true.
378
391
  */
379
392
  rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
393
+ /**
394
+ * The props used for each slot inside.
395
+ * @default {}
396
+ */
397
+ slotProps: PropTypes.shape({
398
+ input: PropTypes.object,
399
+ notchedOutline: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
400
+ root: PropTypes.object
401
+ }),
380
402
  /**
381
403
  * The components used for each slot inside.
382
- *
383
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
384
- *
385
404
  * @default {}
386
405
  */
387
406
  slots: PropTypes.shape({
388
407
  input: PropTypes.elementType,
408
+ notchedOutline: PropTypes.elementType,
389
409
  root: PropTypes.elementType
390
410
  }),
391
411
  /**
@@ -9,16 +9,21 @@ import { styled } from "../zero-styled/index.js";
9
9
  import memoTheme from "../utils/memoTheme.js";
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  const RadioButtonIconRoot = styled('span', {
12
+ name: 'MuiRadioButtonIcon',
12
13
  shouldForwardProp: rootShouldForwardProp
13
14
  })({
14
15
  position: 'relative',
15
16
  display: 'flex'
16
17
  });
17
- const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon)({
18
+ const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon, {
19
+ name: 'MuiRadioButtonIcon'
20
+ })({
18
21
  // Scale applied to prevent dot misalignment in Safari
19
22
  transform: 'scale(1)'
20
23
  });
21
- const RadioButtonIconDot = styled(RadioButtonCheckedIcon)(memoTheme(({
24
+ const RadioButtonIconDot = styled(RadioButtonCheckedIcon, {
25
+ name: 'MuiRadioButtonIcon'
26
+ })(memoTheme(({
22
27
  theme
23
28
  }) => ({
24
29
  left: 0,
@@ -10,6 +10,7 @@ import capitalize from "../utils/capitalize.js";
10
10
  import { isHorizontal } from "../Drawer/Drawer.js";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  const SwipeAreaRoot = styled('div', {
13
+ name: 'MuiSwipeArea',
13
14
  shouldForwardProp: rootShouldForwardProp
14
15
  })(memoTheme(({
15
16
  theme
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.11
2
+ * @mui/material v6.5.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -26,7 +26,9 @@ const useUtilityClasses = ownerState => {
26
26
  };
27
27
  return composeClasses(slots, getSwitchBaseUtilityClass, classes);
28
28
  };
29
- const SwitchBaseRoot = styled(ButtonBase)({
29
+ const SwitchBaseRoot = styled(ButtonBase, {
30
+ name: 'MuiSwitchBase'
31
+ })({
30
32
  padding: 9,
31
33
  borderRadius: '50%',
32
34
  variants: [{
@@ -64,6 +66,7 @@ const SwitchBaseRoot = styled(ButtonBase)({
64
66
  }]
65
67
  });
66
68
  const SwitchBaseInput = styled('input', {
69
+ name: 'MuiSwitchBase',
67
70
  shouldForwardProp: rootShouldForwardProp
68
71
  })({
69
72
  cursor: 'inherit',
@@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
5
5
  import clsx from 'clsx';
6
6
  import usePreviousProps from '@mui/utils/usePreviousProps';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
- import useSlotProps from '@mui/utils/useSlotProps';
9
8
  import useBadge from "./useBadge.js";
10
9
  import { styled } from "../zero-styled/index.js";
11
10
  import memoTheme from "../utils/memoTheme.js";
@@ -13,6 +12,7 @@ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFil
13
12
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
14
13
  import capitalize from "../utils/capitalize.js";
15
14
  import badgeClasses, { getBadgeUtilityClass } from "./badgeClasses.js";
15
+ import useSlot from "../utils/useSlot.js";
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  const RADIUS_STANDARD = 10;
18
18
  const RADIUS_DOT = 4;
@@ -282,26 +282,34 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
282
282
  const classes = useUtilityClasses(ownerState);
283
283
 
284
284
  // support both `slots` and `components` for backward compatibility
285
- const RootSlot = slots?.root ?? components.Root ?? BadgeRoot;
286
- const BadgeSlot = slots?.badge ?? components.Badge ?? BadgeBadge;
287
- const rootSlotProps = slotProps?.root ?? componentsProps.root;
288
- const badgeSlotProps = slotProps?.badge ?? componentsProps.badge;
289
- const rootProps = useSlotProps({
290
- elementType: RootSlot,
291
- externalSlotProps: rootSlotProps,
292
- externalForwardedProps: other,
293
- additionalProps: {
294
- ref,
295
- as: component
285
+ const externalForwardedProps = {
286
+ slots: {
287
+ root: slots?.root ?? components.Root,
288
+ badge: slots?.badge ?? components.Badge
289
+ },
290
+ slotProps: {
291
+ root: slotProps?.root ?? componentsProps.root,
292
+ badge: slotProps?.badge ?? componentsProps.badge
293
+ }
294
+ };
295
+ const [RootSlot, rootProps] = useSlot('root', {
296
+ elementType: BadgeRoot,
297
+ externalForwardedProps: {
298
+ ...externalForwardedProps,
299
+ ...other
296
300
  },
297
301
  ownerState,
298
- className: clsx(rootSlotProps?.className, classes.root, className)
302
+ className: clsx(classes.root, className),
303
+ ref,
304
+ additionalProps: {
305
+ as: component
306
+ }
299
307
  });
300
- const badgeProps = useSlotProps({
301
- elementType: BadgeSlot,
302
- externalSlotProps: badgeSlotProps,
308
+ const [BadgeSlot, badgeProps] = useSlot('badge', {
309
+ elementType: BadgeBadge,
310
+ externalForwardedProps,
303
311
  ownerState,
304
- className: clsx(classes.badge, badgeSlotProps?.className)
312
+ className: classes.badge
305
313
  });
306
314
  return /*#__PURE__*/_jsxs(RootSlot, {
307
315
  ...rootProps,
@@ -399,7 +407,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
399
407
  */
400
408
  showZero: PropTypes.bool,
401
409
  /**
402
- * The props used for each slot inside the Badge.
410
+ * The props used for each slot inside.
403
411
  * @default {}
404
412
  */
405
413
  slotProps: PropTypes.shape({
@@ -407,8 +415,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
407
415
  root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
408
416
  }),
409
417
  /**
410
- * The components used for each slot inside the Badge.
411
- * Either a string to use a HTML element or a component.
418
+ * The components used for each slot inside.
412
419
  * @default {}
413
420
  */
414
421
  slots: PropTypes.shape({
@@ -10,6 +10,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
10
10
  import ButtonBase from "../ButtonBase/index.js";
11
11
  import unsupportedProp from "../utils/unsupportedProp.js";
12
12
  import bottomNavigationActionClasses, { getBottomNavigationActionUtilityClass } from "./bottomNavigationActionClasses.js";
13
+ import useSlot from "../utils/useSlot.js";
13
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
15
  const useUtilityClasses = ownerState => {
15
16
  const {
@@ -107,6 +108,8 @@ const BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavi
107
108
  selected,
108
109
  showLabel,
109
110
  value,
111
+ slots = {},
112
+ slotProps = {},
110
113
  ...other
111
114
  } = props;
112
115
  const ownerState = props;
@@ -119,16 +122,41 @@ const BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavi
119
122
  onClick(event);
120
123
  }
121
124
  };
122
- return /*#__PURE__*/_jsxs(BottomNavigationActionRoot, {
123
- ref: ref,
125
+ const externalForwardedProps = {
126
+ slots,
127
+ slotProps
128
+ };
129
+ const [RootSlot, rootProps] = useSlot('root', {
130
+ elementType: BottomNavigationActionRoot,
131
+ externalForwardedProps: {
132
+ ...externalForwardedProps,
133
+ ...other
134
+ },
135
+ shouldForwardComponentProp: true,
136
+ ownerState,
137
+ ref,
124
138
  className: clsx(classes.root, className),
125
- focusRipple: true,
126
- onClick: handleChange,
127
- ownerState: ownerState,
128
- ...other,
129
- children: [icon, /*#__PURE__*/_jsx(BottomNavigationActionLabel, {
130
- className: classes.label,
131
- ownerState: ownerState,
139
+ additionalProps: {
140
+ focusRipple: true
141
+ },
142
+ getSlotProps: handlers => ({
143
+ ...handlers,
144
+ onClick: event => {
145
+ handlers.onClick?.(event);
146
+ handleChange(event);
147
+ }
148
+ })
149
+ });
150
+ const [LabelSlot, labelProps] = useSlot('label', {
151
+ elementType: BottomNavigationActionLabel,
152
+ externalForwardedProps,
153
+ ownerState,
154
+ className: classes.label
155
+ });
156
+ return /*#__PURE__*/_jsxs(RootSlot, {
157
+ ...rootProps,
158
+ children: [icon, /*#__PURE__*/_jsx(LabelSlot, {
159
+ ...labelProps,
132
160
  children: label
133
161
  })]
134
162
  });
@@ -175,6 +203,22 @@ process.env.NODE_ENV !== "production" ? BottomNavigationAction.propTypes /* remo
175
203
  * The prop defaults to the value (`false`) inherited from the parent BottomNavigation component.
176
204
  */
177
205
  showLabel: PropTypes.bool,
206
+ /**
207
+ * The props used for each slot inside.
208
+ * @default {}
209
+ */
210
+ slotProps: PropTypes.shape({
211
+ label: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
212
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
213
+ }),
214
+ /**
215
+ * The components used for each slot inside.
216
+ * @default {}
217
+ */
218
+ slots: PropTypes.shape({
219
+ label: PropTypes.elementType,
220
+ root: PropTypes.elementType
221
+ }),
178
222
  /**
179
223
  * The system prop that allows defining system overrides as well as additional CSS styles.
180
224
  */
@@ -8,7 +8,9 @@ import memoTheme from "../utils/memoTheme.js";
8
8
  import MoreHorizIcon from "../internal/svg-icons/MoreHoriz.js";
9
9
  import ButtonBase from "../ButtonBase/index.js";
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
- const BreadcrumbCollapsedButton = styled(ButtonBase)(memoTheme(({
11
+ const BreadcrumbCollapsedButton = styled(ButtonBase, {
12
+ name: 'MuiBreadcrumbCollapsed'
13
+ })(memoTheme(({
12
14
  theme
13
15
  }) => ({
14
16
  display: 'flex',
@@ -9,6 +9,7 @@ import memoTheme from "../utils/memoTheme.js";
9
9
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
10
10
  import cardActionAreaClasses, { getCardActionAreaUtilityClass } from "./cardActionAreaClasses.js";
11
11
  import ButtonBase from "../ButtonBase/index.js";
12
+ import useSlot from "../utils/useSlot.js";
12
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
14
  const useUtilityClasses = ownerState => {
14
15
  const {
@@ -72,19 +73,41 @@ const CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(inP
72
73
  children,
73
74
  className,
74
75
  focusVisibleClassName,
76
+ slots = {},
77
+ slotProps = {},
75
78
  ...other
76
79
  } = props;
77
80
  const ownerState = props;
78
81
  const classes = useUtilityClasses(ownerState);
79
- return /*#__PURE__*/_jsxs(CardActionAreaRoot, {
82
+ const externalForwardedProps = {
83
+ slots,
84
+ slotProps
85
+ };
86
+ const [RootSlot, rootProps] = useSlot('root', {
87
+ elementType: CardActionAreaRoot,
88
+ externalForwardedProps: {
89
+ ...externalForwardedProps,
90
+ ...other
91
+ },
92
+ shouldForwardComponentProp: true,
93
+ ownerState,
94
+ ref,
80
95
  className: clsx(classes.root, className),
81
- focusVisibleClassName: clsx(focusVisibleClassName, classes.focusVisible),
82
- ref: ref,
83
- ownerState: ownerState,
84
- ...other,
85
- children: [children, /*#__PURE__*/_jsx(CardActionAreaFocusHighlight, {
86
- className: classes.focusHighlight,
87
- ownerState: ownerState
96
+ additionalProps: {
97
+ focusVisibleClassName: clsx(focusVisibleClassName, classes.focusVisible)
98
+ }
99
+ });
100
+ const [FocusHighlightSlot, focusHighlightProps] = useSlot('focusHighlight', {
101
+ elementType: CardActionAreaFocusHighlight,
102
+ externalForwardedProps,
103
+ ownerState,
104
+ ref,
105
+ className: classes.focusHighlight
106
+ });
107
+ return /*#__PURE__*/_jsxs(RootSlot, {
108
+ ...rootProps,
109
+ children: [children, /*#__PURE__*/_jsx(FocusHighlightSlot, {
110
+ ...focusHighlightProps
88
111
  })]
89
112
  });
90
113
  });
@@ -109,6 +132,22 @@ process.env.NODE_ENV !== "production" ? CardActionArea.propTypes /* remove-propt
109
132
  * @ignore
110
133
  */
111
134
  focusVisibleClassName: PropTypes.string,
135
+ /**
136
+ * The props used for each slot inside.
137
+ * @default {}
138
+ */
139
+ slotProps: PropTypes.shape({
140
+ focusHighlight: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
141
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
142
+ }),
143
+ /**
144
+ * The components used for each slot inside.
145
+ * @default {}
146
+ */
147
+ slots: PropTypes.shape({
148
+ focusHighlight: PropTypes.elementType,
149
+ root: PropTypes.elementType
150
+ }),
112
151
  /**
113
152
  * The system prop that allows defining system overrides as well as additional CSS styles.
114
153
  */
@@ -25,7 +25,9 @@ const useUtilityClasses = ownerState => {
25
25
  };
26
26
  return composeClasses(slots, getNativeSelectUtilityClasses, classes);
27
27
  };
28
- export const StyledSelectSelect = styled('select')(({
28
+ export const StyledSelectSelect = styled('select', {
29
+ name: 'MuiNativeSelect'
30
+ })(({
29
31
  theme
30
32
  }) => ({
31
33
  // Reset
@@ -99,7 +101,9 @@ const NativeSelectSelect = styled(StyledSelectSelect, {
99
101
  }];
100
102
  }
101
103
  })({});
102
- export const StyledSelectIcon = styled('svg')(({
104
+ export const StyledSelectIcon = styled('svg', {
105
+ name: 'MuiNativeSelect'
106
+ })(({
103
107
  theme
104
108
  }) => ({
105
109
  // We use a position absolute over a flexbox in order to forward the pointer events
@@ -8,6 +8,7 @@ import { styled } from "../zero-styled/index.js";
8
8
  import memoTheme from "../utils/memoTheme.js";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  const NotchedOutlineRoot = styled('fieldset', {
11
+ name: 'MuiNotchedOutlined',
11
12
  shouldForwardProp: rootShouldForwardProp
12
13
  })({
13
14
  textAlign: 'left',
@@ -26,6 +27,7 @@ const NotchedOutlineRoot = styled('fieldset', {
26
27
  minWidth: '0%'
27
28
  });
28
29
  const NotchedOutlineLegend = styled('legend', {
30
+ name: 'MuiNotchedOutlined',
29
31
  shouldForwardProp: rootShouldForwardProp
30
32
  })(memoTheme(({
31
33
  theme
@@ -14,6 +14,7 @@ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFil
14
14
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
15
15
  import outlinedInputClasses, { getOutlinedInputUtilityClass } from "./outlinedInputClasses.js";
16
16
  import InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.js";
17
+ import useSlot from "../utils/useSlot.js";
17
18
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
18
19
  const useUtilityClasses = ownerState => {
19
20
  const {
@@ -178,7 +179,6 @@ const OutlinedInputInput = styled(InputBaseInput, {
178
179
  }]
179
180
  })));
180
181
  const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {
181
- var _React$Fragment;
182
182
  const props = useDefaultProps({
183
183
  props: inProps,
184
184
  name: 'MuiOutlinedInput'
@@ -191,6 +191,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
191
191
  multiline = false,
192
192
  notched,
193
193
  slots = {},
194
+ slotProps = {},
194
195
  type = 'text',
195
196
  ...other
196
197
  } = props;
@@ -216,17 +217,29 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
216
217
  };
217
218
  const RootSlot = slots.root ?? components.Root ?? OutlinedInputRoot;
218
219
  const InputSlot = slots.input ?? components.Input ?? OutlinedInputInput;
220
+ const [NotchedSlot, notchedProps] = useSlot('notchedOutline', {
221
+ elementType: NotchedOutlineRoot,
222
+ className: classes.notchedOutline,
223
+ shouldForwardComponentProp: true,
224
+ ownerState,
225
+ externalForwardedProps: {
226
+ slots,
227
+ slotProps
228
+ },
229
+ additionalProps: {
230
+ label: label != null && label !== '' && fcs.required ? /*#__PURE__*/_jsxs(React.Fragment, {
231
+ children: [label, "\u2009", '*']
232
+ }) : label
233
+ }
234
+ });
219
235
  return /*#__PURE__*/_jsx(InputBase, {
220
236
  slots: {
221
237
  root: RootSlot,
222
238
  input: InputSlot
223
239
  },
224
- renderSuffix: state => /*#__PURE__*/_jsx(NotchedOutlineRoot, {
225
- ownerState: ownerState,
226
- className: classes.notchedOutline,
227
- label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
228
- children: [label, "\u2009", '*']
229
- })) : label,
240
+ slotProps: slotProps,
241
+ renderSuffix: state => /*#__PURE__*/_jsx(NotchedSlot, {
242
+ ...notchedProps,
230
243
  notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
231
244
  }),
232
245
  fullWidth: fullWidth,
@@ -377,15 +390,22 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes /* remove-propty
377
390
  * Number of rows to display when multiline option is set to true.
378
391
  */
379
392
  rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
393
+ /**
394
+ * The props used for each slot inside.
395
+ * @default {}
396
+ */
397
+ slotProps: PropTypes.shape({
398
+ input: PropTypes.object,
399
+ notchedOutline: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
400
+ root: PropTypes.object
401
+ }),
380
402
  /**
381
403
  * The components used for each slot inside.
382
- *
383
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
384
- *
385
404
  * @default {}
386
405
  */
387
406
  slots: PropTypes.shape({
388
407
  input: PropTypes.elementType,
408
+ notchedOutline: PropTypes.elementType,
389
409
  root: PropTypes.elementType
390
410
  }),
391
411
  /**
@@ -9,16 +9,21 @@ import { styled } from "../zero-styled/index.js";
9
9
  import memoTheme from "../utils/memoTheme.js";
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  const RadioButtonIconRoot = styled('span', {
12
+ name: 'MuiRadioButtonIcon',
12
13
  shouldForwardProp: rootShouldForwardProp
13
14
  })({
14
15
  position: 'relative',
15
16
  display: 'flex'
16
17
  });
17
- const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon)({
18
+ const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon, {
19
+ name: 'MuiRadioButtonIcon'
20
+ })({
18
21
  // Scale applied to prevent dot misalignment in Safari
19
22
  transform: 'scale(1)'
20
23
  });
21
- const RadioButtonIconDot = styled(RadioButtonCheckedIcon)(memoTheme(({
24
+ const RadioButtonIconDot = styled(RadioButtonCheckedIcon, {
25
+ name: 'MuiRadioButtonIcon'
26
+ })(memoTheme(({
22
27
  theme
23
28
  }) => ({
24
29
  left: 0,
@@ -10,6 +10,7 @@ import capitalize from "../utils/capitalize.js";
10
10
  import { isHorizontal } from "../Drawer/Drawer.js";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  const SwipeAreaRoot = styled('div', {
13
+ name: 'MuiSwipeArea',
13
14
  shouldForwardProp: rootShouldForwardProp
14
15
  })(memoTheme(({
15
16
  theme
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.11
2
+ * @mui/material v6.5.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -26,7 +26,9 @@ const useUtilityClasses = ownerState => {
26
26
  };
27
27
  return composeClasses(slots, getSwitchBaseUtilityClass, classes);
28
28
  };
29
- const SwitchBaseRoot = styled(ButtonBase)({
29
+ const SwitchBaseRoot = styled(ButtonBase, {
30
+ name: 'MuiSwitchBase'
31
+ })({
30
32
  padding: 9,
31
33
  borderRadius: '50%',
32
34
  variants: [{
@@ -64,6 +66,7 @@ const SwitchBaseRoot = styled(ButtonBase)({
64
66
  }]
65
67
  });
66
68
  const SwitchBaseInput = styled('input', {
69
+ name: 'MuiSwitchBase',
67
70
  shouldForwardProp: rootShouldForwardProp
68
71
  })({
69
72
  cursor: 'inherit',
@@ -9,27 +9,27 @@ export default function ThemeProvider({
9
9
  theme,
10
10
  ...props
11
11
  }) {
12
- if (typeof theme === 'function') {
13
- return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
14
- theme: theme,
15
- ...props
16
- });
17
- }
18
- const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;
19
- if (!('colorSchemes' in muiTheme)) {
20
- if (!('vars' in muiTheme)) {
21
- // For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.
22
- // The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
23
- return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
24
- theme: {
12
+ const noVarsTheme = React.useMemo(() => {
13
+ if (typeof theme === 'function') {
14
+ return theme;
15
+ }
16
+ const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;
17
+ if (!('colorSchemes' in muiTheme)) {
18
+ if (!('vars' in muiTheme)) {
19
+ // For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.
20
+ // The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
21
+ return {
25
22
  ...theme,
26
23
  vars: null
27
- },
28
- ...props
29
- });
24
+ };
25
+ }
26
+ return theme;
30
27
  }
28
+ return null;
29
+ }, [theme]);
30
+ if (noVarsTheme) {
31
31
  return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
32
- theme: theme,
32
+ theme: noVarsTheme,
33
33
  ...props
34
34
  });
35
35
  }
@@ -1,5 +1,5 @@
1
1
  export default function shouldSkipGeneratingVar(keys) {
2
- return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
2
+ return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
3
3
  // ends with sxConfig
4
4
  keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
5
5
  }
@@ -1,6 +1,6 @@
1
- export const version = "6.4.11";
1
+ export const version = "6.5.0";
2
2
  export const major = Number("6");
3
- export const minor = Number("4");
4
- export const patch = Number("11");
3
+ export const minor = Number("5");
4
+ export const patch = Number("0");
5
5
  export const prerelease = undefined;
6
6
  export default version;