@mui/material 6.4.3 → 6.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.4.4
4
+
5
+ <!-- generated comparing v6.4.3..v6.x -->
6
+
7
+ _Feb 11, 2025_
8
+
9
+ A big thanks to the 3 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.4.4`
12
+
13
+ - [MobileStepper] deprecate `LinearProgressProps` and complete `slots`, `slotProps` (@siriwatknp) (#45242) @siriwatknp
14
+ - [Slider] Deprecate composed classes (@sai6855) (#45223) @sai6855
15
+ - [utils] Merge `sx` instead of override when using `mergeSlotProps` (#45129) @siriwatknp
16
+
17
+ ### Docs
18
+
19
+ - [Autocomplete] Improve Google Maps search example (#44708) @oliviertassinari
20
+ - [Dialog] Removes deprecated PaperProps from docs (#45217) @sai6855
21
+ - A quick first step to update docs for Tailwind v4 (#45221) @oliviertassinari
22
+
23
+ ### Core
24
+
25
+ - Fix missing store contributor renaming (527222d) @oliviertassinari
26
+ - Fix MUI Base vale rule (#45140) @oliviertassinari
27
+ - Fix 404 errors (#45137) @oliviertassinari
28
+ - [docs] Sync active sponsors (#45204) @oliviertassinari
29
+ - [docs-infra] Move Ukraine banner to the bottom (#45135) @oliviertassinari
30
+
31
+ All contributors of this release in alphabetical order: @oliviertassinari, @sai6855, @siriwatknp
32
+
3
33
  ## 6.4.3
4
34
 
5
35
  <!-- generated comparing v6.4.2..v6.x -->
@@ -4,8 +4,73 @@ import { InternalStandardProps as StandardProps, Theme } from '..';
4
4
  import { PaperProps } from '../Paper';
5
5
  import { LinearProgressProps } from '../LinearProgress';
6
6
  import { MobileStepperClasses } from './mobileStepperClasses';
7
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
7
8
 
8
- export interface MobileStepperProps extends StandardProps<PaperProps, 'children' | 'variant'> {
9
+ export interface MobileStepperSlots {
10
+ /**
11
+ * The component that renders the root slot.
12
+ * @default Paper
13
+ */
14
+ root: React.ElementType;
15
+ /**
16
+ * The component that renders the progress slot.
17
+ * @default LinearProgress
18
+ */
19
+ progress: React.ElementType;
20
+ /**
21
+ * The component that renders the dots slot.
22
+ * @default 'div'
23
+ */
24
+ dots: React.ElementType;
25
+ /**
26
+ * The component that renders the dot slot.
27
+ * @default 'div'
28
+ */
29
+ dot: React.ElementType;
30
+ }
31
+
32
+ export interface MobileStepperRootSlotPropsOverrides {}
33
+ export interface MobileStepperProgressSlotPropsOverrides {}
34
+ export interface MobileStepperDotsSlotPropsOverrides {}
35
+ export interface MobileStepperDotSlotPropsOverrides {}
36
+
37
+ export type MobileStepperSlotsAndSlotProps = CreateSlotsAndSlotProps<
38
+ MobileStepperSlots,
39
+ {
40
+ /**
41
+ * Props forwarded to the root slot.
42
+ * By default, the avaible props are based on the [Paper](https://mui.com/material-ui/api/paper/#props) component.
43
+ */
44
+ root: SlotProps<
45
+ React.ElementType<PaperProps>,
46
+ MobileStepperRootSlotPropsOverrides,
47
+ MobileStepperOwnerState
48
+ >;
49
+ /**
50
+ * Props forwarded to the progress slot.
51
+ * By default, the avaible props are based on the [LinearProgress](https://mui.com/material-ui/api/linear-progress/#props) component.
52
+ */
53
+ progress: SlotProps<
54
+ React.ElementType<LinearProgressProps>,
55
+ MobileStepperProgressSlotPropsOverrides,
56
+ MobileStepperOwnerState
57
+ >;
58
+ /**
59
+ * Props forwarded to the dots slot.
60
+ * By default, the avaible props are based on the div element.
61
+ */
62
+ dots: SlotProps<'div', MobileStepperDotsSlotPropsOverrides, MobileStepperOwnerState>;
63
+ /**
64
+ * Props forwarded to the dot slot.
65
+ * By default, the avaible props are based on the div element.
66
+ */
67
+ dot: SlotProps<'div', MobileStepperDotSlotPropsOverrides, MobileStepperOwnerState>;
68
+ }
69
+ >;
70
+
71
+ export interface MobileStepperProps
72
+ extends StandardProps<PaperProps, 'children' | 'variant'>,
73
+ MobileStepperSlotsAndSlotProps {
9
74
  /**
10
75
  * Set the active step (zero based index).
11
76
  * Defines which dot is highlighted when the variant is 'dots'.
@@ -22,6 +87,7 @@ export interface MobileStepperProps extends StandardProps<PaperProps, 'children'
22
87
  classes?: Partial<MobileStepperClasses>;
23
88
  /**
24
89
  * Props applied to the `LinearProgress` element.
90
+ * @deprecated Use `slotProps.progress` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
25
91
  */
26
92
  LinearProgressProps?: Partial<LinearProgressProps>;
27
93
  /**
@@ -48,6 +114,8 @@ export interface MobileStepperProps extends StandardProps<PaperProps, 'children'
48
114
  variant?: 'text' | 'dots' | 'progress';
49
115
  }
50
116
 
117
+ export interface MobileStepperOwnerState extends Omit<MobileStepperProps, 'slots' | 'slotProps'> {}
118
+
51
119
  /**
52
120
  *
53
121
  * Demos:
@@ -13,6 +13,7 @@ import memoTheme from "../utils/memoTheme.js";
13
13
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
14
14
  import slotShouldForwardProp from "../styles/slotShouldForwardProp.js";
15
15
  import { getMobileStepperUtilityClass } from "./mobileStepperClasses.js";
16
+ import useSlot from "../utils/useSlot.js";
16
17
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
17
18
  const useUtilityClasses = ownerState => {
18
19
  const {
@@ -152,6 +153,8 @@ const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inPro
152
153
  position = 'bottom',
153
154
  steps,
154
155
  variant = 'dots',
156
+ slots = {},
157
+ slotProps = {},
155
158
  ...other
156
159
  } = props;
157
160
  const ownerState = {
@@ -169,29 +172,63 @@ const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inPro
169
172
  }
170
173
  }
171
174
  const classes = useUtilityClasses(ownerState);
172
- return /*#__PURE__*/_jsxs(MobileStepperRoot, {
173
- square: true,
174
- elevation: 0,
175
+ const externalForwardedProps = {
176
+ slots,
177
+ slotProps: {
178
+ progress: LinearProgressProps,
179
+ ...slotProps
180
+ }
181
+ };
182
+ const [RootSlot, rootSlotProps] = useSlot('root', {
183
+ ref,
184
+ elementType: MobileStepperRoot,
185
+ shouldForwardComponentProp: true,
175
186
  className: clsx(classes.root, className),
176
- ref: ref,
177
- ownerState: ownerState,
178
- ...other,
187
+ externalForwardedProps: {
188
+ ...externalForwardedProps,
189
+ ...other
190
+ },
191
+ ownerState,
192
+ additionalProps: {
193
+ square: true,
194
+ elevation: 0
195
+ }
196
+ });
197
+ const [DotsSlot, dotsSlotProps] = useSlot('dots', {
198
+ className: classes.dots,
199
+ elementType: MobileStepperDots,
200
+ externalForwardedProps,
201
+ ownerState
202
+ });
203
+ const [DotSlot, dotSlotProps] = useSlot('dot', {
204
+ elementType: MobileStepperDot,
205
+ externalForwardedProps,
206
+ ownerState
207
+ });
208
+ const [ProgressSlot, progressSlotProps] = useSlot('progress', {
209
+ className: classes.progress,
210
+ elementType: MobileStepperProgress,
211
+ shouldForwardComponentProp: true,
212
+ externalForwardedProps,
213
+ ownerState,
214
+ additionalProps: {
215
+ value,
216
+ variant: 'determinate'
217
+ }
218
+ });
219
+ return /*#__PURE__*/_jsxs(RootSlot, {
220
+ ...rootSlotProps,
179
221
  children: [backButton, variant === 'text' && /*#__PURE__*/_jsxs(React.Fragment, {
180
222
  children: [activeStep + 1, " / ", steps]
181
- }), variant === 'dots' && /*#__PURE__*/_jsx(MobileStepperDots, {
182
- ownerState: ownerState,
183
- className: classes.dots,
184
- children: [...new Array(steps)].map((_, index) => /*#__PURE__*/_jsx(MobileStepperDot, {
185
- className: clsx(classes.dot, index === activeStep && classes.dotActive),
186
- ownerState: ownerState,
223
+ }), variant === 'dots' && /*#__PURE__*/_jsx(DotsSlot, {
224
+ ...dotsSlotProps,
225
+ children: [...new Array(steps)].map((_, index) => /*#__PURE__*/_jsx(DotSlot, {
226
+ ...dotSlotProps,
227
+ className: clsx(classes.dot, dotSlotProps.className, index === activeStep && classes.dotActive),
187
228
  dotActive: index === activeStep
188
229
  }, index))
189
- }), variant === 'progress' && /*#__PURE__*/_jsx(MobileStepperProgress, {
190
- ownerState: ownerState,
191
- className: classes.progress,
192
- variant: "determinate",
193
- value: value,
194
- ...LinearProgressProps
230
+ }), variant === 'progress' && /*#__PURE__*/_jsx(ProgressSlot, {
231
+ ...progressSlotProps
195
232
  }), nextButton]
196
233
  });
197
234
  });
@@ -220,6 +257,7 @@ process.env.NODE_ENV !== "production" ? MobileStepper.propTypes /* remove-propty
220
257
  className: PropTypes.string,
221
258
  /**
222
259
  * Props applied to the `LinearProgress` element.
260
+ * @deprecated Use `slotProps.progress` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
223
261
  */
224
262
  LinearProgressProps: PropTypes.object,
225
263
  /**
@@ -231,6 +269,26 @@ process.env.NODE_ENV !== "production" ? MobileStepper.propTypes /* remove-propty
231
269
  * @default 'bottom'
232
270
  */
233
271
  position: PropTypes.oneOf(['bottom', 'static', 'top']),
272
+ /**
273
+ * The props used for each slot inside.
274
+ * @default {}
275
+ */
276
+ slotProps: PropTypes.shape({
277
+ dot: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
278
+ dots: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
279
+ progress: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
280
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
281
+ }),
282
+ /**
283
+ * The components used for each slot inside.
284
+ * @default {}
285
+ */
286
+ slots: PropTypes.shape({
287
+ dot: PropTypes.elementType,
288
+ dots: PropTypes.elementType,
289
+ progress: PropTypes.elementType,
290
+ root: PropTypes.elementType
291
+ }),
234
292
  /**
235
293
  * The total steps.
236
294
  */
@@ -45,19 +45,33 @@ export interface SliderClasses {
45
45
  markLabelActive: string;
46
46
  /** Styles applied to the root element if `size="small"`. */
47
47
  sizeSmall: string;
48
- /** Styles applied to the thumb element if `color="primary"`. */
48
+ /** Styles applied to the thumb element if `color="primary"`.
49
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorPrimary](/material-ui/api/slider/#slider-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
50
+ */
49
51
  thumbColorPrimary: string;
50
- /** Styles applied to the thumb element if `color="secondary"`. */
52
+ /** Styles applied to the thumb element if `color="secondary"`.
53
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorSecondary](/material-ui/api/slider/#slider-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
54
+ */
51
55
  thumbColorSecondary: string;
52
- /** Styles applied to the thumb element if `color="error"`. */
56
+ /** Styles applied to the thumb element if `color="error"`.
57
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorError](/material-ui/api/slider/#slider-classes-colorError) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
58
+ */
53
59
  thumbColorError: string;
54
- /** Styles applied to the thumb element if `color="info"`. */
60
+ /** Styles applied to the thumb element if `color="info"`.
61
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorInfo](/material-ui/api/slider/#slider-classes-colorInfo) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
62
+ */
55
63
  thumbColorInfo: string;
56
- /** Styles applied to the thumb element if `color="success"`. */
64
+ /** Styles applied to the thumb element if `color="success"`.
65
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorSuccess](/material-ui/api/slider/#slider-classes-colorSuccess) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
66
+ */
57
67
  thumbColorSuccess: string;
58
- /** Styles applied to the thumb element if `color="warning"`. */
68
+ /** Styles applied to the thumb element if `color="warning"`.
69
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorWarning](/material-ui/api/slider/#slider-classes-colorWarning) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
70
+ */
59
71
  thumbColorWarning: string;
60
- /** Styles applied to the thumb element if `size="small"`. */
72
+ /** Styles applied to the thumb element if `size="small"`.
73
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-sizeSmall](/material-ui/api/slider/#slider-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
74
+ */
61
75
  thumbSizeSmall: string;
62
76
  /** Styles applied to the thumb label element. */
63
77
  valueLabel: string;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.3
2
+ * @mui/material v6.4.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -13,6 +13,7 @@ import memoTheme from "../utils/memoTheme.js";
13
13
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
14
14
  import slotShouldForwardProp from "../styles/slotShouldForwardProp.js";
15
15
  import { getMobileStepperUtilityClass } from "./mobileStepperClasses.js";
16
+ import useSlot from "../utils/useSlot.js";
16
17
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
17
18
  const useUtilityClasses = ownerState => {
18
19
  const {
@@ -152,6 +153,8 @@ const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inPro
152
153
  position = 'bottom',
153
154
  steps,
154
155
  variant = 'dots',
156
+ slots = {},
157
+ slotProps = {},
155
158
  ...other
156
159
  } = props;
157
160
  const ownerState = {
@@ -169,29 +172,63 @@ const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inPro
169
172
  }
170
173
  }
171
174
  const classes = useUtilityClasses(ownerState);
172
- return /*#__PURE__*/_jsxs(MobileStepperRoot, {
173
- square: true,
174
- elevation: 0,
175
+ const externalForwardedProps = {
176
+ slots,
177
+ slotProps: {
178
+ progress: LinearProgressProps,
179
+ ...slotProps
180
+ }
181
+ };
182
+ const [RootSlot, rootSlotProps] = useSlot('root', {
183
+ ref,
184
+ elementType: MobileStepperRoot,
185
+ shouldForwardComponentProp: true,
175
186
  className: clsx(classes.root, className),
176
- ref: ref,
177
- ownerState: ownerState,
178
- ...other,
187
+ externalForwardedProps: {
188
+ ...externalForwardedProps,
189
+ ...other
190
+ },
191
+ ownerState,
192
+ additionalProps: {
193
+ square: true,
194
+ elevation: 0
195
+ }
196
+ });
197
+ const [DotsSlot, dotsSlotProps] = useSlot('dots', {
198
+ className: classes.dots,
199
+ elementType: MobileStepperDots,
200
+ externalForwardedProps,
201
+ ownerState
202
+ });
203
+ const [DotSlot, dotSlotProps] = useSlot('dot', {
204
+ elementType: MobileStepperDot,
205
+ externalForwardedProps,
206
+ ownerState
207
+ });
208
+ const [ProgressSlot, progressSlotProps] = useSlot('progress', {
209
+ className: classes.progress,
210
+ elementType: MobileStepperProgress,
211
+ shouldForwardComponentProp: true,
212
+ externalForwardedProps,
213
+ ownerState,
214
+ additionalProps: {
215
+ value,
216
+ variant: 'determinate'
217
+ }
218
+ });
219
+ return /*#__PURE__*/_jsxs(RootSlot, {
220
+ ...rootSlotProps,
179
221
  children: [backButton, variant === 'text' && /*#__PURE__*/_jsxs(React.Fragment, {
180
222
  children: [activeStep + 1, " / ", steps]
181
- }), variant === 'dots' && /*#__PURE__*/_jsx(MobileStepperDots, {
182
- ownerState: ownerState,
183
- className: classes.dots,
184
- children: [...new Array(steps)].map((_, index) => /*#__PURE__*/_jsx(MobileStepperDot, {
185
- className: clsx(classes.dot, index === activeStep && classes.dotActive),
186
- ownerState: ownerState,
223
+ }), variant === 'dots' && /*#__PURE__*/_jsx(DotsSlot, {
224
+ ...dotsSlotProps,
225
+ children: [...new Array(steps)].map((_, index) => /*#__PURE__*/_jsx(DotSlot, {
226
+ ...dotSlotProps,
227
+ className: clsx(classes.dot, dotSlotProps.className, index === activeStep && classes.dotActive),
187
228
  dotActive: index === activeStep
188
229
  }, index))
189
- }), variant === 'progress' && /*#__PURE__*/_jsx(MobileStepperProgress, {
190
- ownerState: ownerState,
191
- className: classes.progress,
192
- variant: "determinate",
193
- value: value,
194
- ...LinearProgressProps
230
+ }), variant === 'progress' && /*#__PURE__*/_jsx(ProgressSlot, {
231
+ ...progressSlotProps
195
232
  }), nextButton]
196
233
  });
197
234
  });
@@ -220,6 +257,7 @@ process.env.NODE_ENV !== "production" ? MobileStepper.propTypes /* remove-propty
220
257
  className: PropTypes.string,
221
258
  /**
222
259
  * Props applied to the `LinearProgress` element.
260
+ * @deprecated Use `slotProps.progress` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
223
261
  */
224
262
  LinearProgressProps: PropTypes.object,
225
263
  /**
@@ -231,6 +269,26 @@ process.env.NODE_ENV !== "production" ? MobileStepper.propTypes /* remove-propty
231
269
  * @default 'bottom'
232
270
  */
233
271
  position: PropTypes.oneOf(['bottom', 'static', 'top']),
272
+ /**
273
+ * The props used for each slot inside.
274
+ * @default {}
275
+ */
276
+ slotProps: PropTypes.shape({
277
+ dot: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
278
+ dots: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
279
+ progress: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
280
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
281
+ }),
282
+ /**
283
+ * The components used for each slot inside.
284
+ * @default {}
285
+ */
286
+ slots: PropTypes.shape({
287
+ dot: PropTypes.elementType,
288
+ dots: PropTypes.elementType,
289
+ progress: PropTypes.elementType,
290
+ root: PropTypes.elementType
291
+ }),
234
292
  /**
235
293
  * The total steps.
236
294
  */
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.3
2
+ * @mui/material v6.4.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -22,22 +22,29 @@ export default function mergeSlotProps(externalSlotProps, defaultSlotProps) {
22
22
  ...defaultSlotPropsValue.style,
23
23
  ...externalSlotPropsValue.style
24
24
  }
25
+ }),
26
+ ...(defaultSlotPropsValue?.sx && externalSlotPropsValue?.sx && {
27
+ sx: [...(Array.isArray(defaultSlotPropsValue.sx) ? defaultSlotPropsValue.sx : [defaultSlotPropsValue.sx]), ...(Array.isArray(externalSlotPropsValue.sx) ? externalSlotPropsValue.sx : [externalSlotPropsValue.sx])]
25
28
  })
26
29
  };
27
30
  };
28
31
  }
29
- const className = clsx(defaultSlotProps?.className, externalSlotProps?.className);
32
+ const typedDefaultSlotProps = defaultSlotProps;
33
+ const className = clsx(typedDefaultSlotProps?.className, externalSlotProps?.className);
30
34
  return {
31
35
  ...defaultSlotProps,
32
36
  ...externalSlotProps,
33
37
  ...(!!className && {
34
38
  className
35
39
  }),
36
- ...(defaultSlotProps?.style && externalSlotProps?.style && {
40
+ ...(typedDefaultSlotProps?.style && externalSlotProps?.style && {
37
41
  style: {
38
- ...defaultSlotProps.style,
42
+ ...typedDefaultSlotProps.style,
39
43
  ...externalSlotProps.style
40
44
  }
45
+ }),
46
+ ...(typedDefaultSlotProps?.sx && externalSlotProps?.sx && {
47
+ sx: [...(Array.isArray(typedDefaultSlotProps.sx) ? typedDefaultSlotProps.sx : [typedDefaultSlotProps.sx]), ...(Array.isArray(externalSlotProps.sx) ? externalSlotProps.sx : [externalSlotProps.sx])]
41
48
  })
42
49
  };
43
50
  }
@@ -1,6 +1,6 @@
1
- export const version = "6.4.3";
1
+ export const version = "6.4.4";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("4");
4
- export const patch = Number("3");
4
+ export const patch = Number("4");
5
5
  export const prerelease = undefined;
6
6
  export default version;
@@ -20,6 +20,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
20
20
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
21
21
  var _slotShouldForwardProp = _interopRequireDefault(require("../styles/slotShouldForwardProp"));
22
22
  var _mobileStepperClasses = require("./mobileStepperClasses");
23
+ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
23
24
  var _jsxRuntime = require("react/jsx-runtime");
24
25
  const useUtilityClasses = ownerState => {
25
26
  const {
@@ -159,6 +160,8 @@ const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inPro
159
160
  position = 'bottom',
160
161
  steps,
161
162
  variant = 'dots',
163
+ slots = {},
164
+ slotProps = {},
162
165
  ...other
163
166
  } = props;
164
167
  const ownerState = {
@@ -176,29 +179,63 @@ const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inPro
176
179
  }
177
180
  }
178
181
  const classes = useUtilityClasses(ownerState);
179
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(MobileStepperRoot, {
180
- square: true,
181
- elevation: 0,
182
+ const externalForwardedProps = {
183
+ slots,
184
+ slotProps: {
185
+ progress: LinearProgressProps,
186
+ ...slotProps
187
+ }
188
+ };
189
+ const [RootSlot, rootSlotProps] = (0, _useSlot.default)('root', {
190
+ ref,
191
+ elementType: MobileStepperRoot,
192
+ shouldForwardComponentProp: true,
182
193
  className: (0, _clsx.default)(classes.root, className),
183
- ref: ref,
184
- ownerState: ownerState,
185
- ...other,
194
+ externalForwardedProps: {
195
+ ...externalForwardedProps,
196
+ ...other
197
+ },
198
+ ownerState,
199
+ additionalProps: {
200
+ square: true,
201
+ elevation: 0
202
+ }
203
+ });
204
+ const [DotsSlot, dotsSlotProps] = (0, _useSlot.default)('dots', {
205
+ className: classes.dots,
206
+ elementType: MobileStepperDots,
207
+ externalForwardedProps,
208
+ ownerState
209
+ });
210
+ const [DotSlot, dotSlotProps] = (0, _useSlot.default)('dot', {
211
+ elementType: MobileStepperDot,
212
+ externalForwardedProps,
213
+ ownerState
214
+ });
215
+ const [ProgressSlot, progressSlotProps] = (0, _useSlot.default)('progress', {
216
+ className: classes.progress,
217
+ elementType: MobileStepperProgress,
218
+ shouldForwardComponentProp: true,
219
+ externalForwardedProps,
220
+ ownerState,
221
+ additionalProps: {
222
+ value,
223
+ variant: 'determinate'
224
+ }
225
+ });
226
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
227
+ ...rootSlotProps,
186
228
  children: [backButton, variant === 'text' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
187
229
  children: [activeStep + 1, " / ", steps]
188
- }), variant === 'dots' && /*#__PURE__*/(0, _jsxRuntime.jsx)(MobileStepperDots, {
189
- ownerState: ownerState,
190
- className: classes.dots,
191
- children: [...new Array(steps)].map((_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(MobileStepperDot, {
192
- className: (0, _clsx.default)(classes.dot, index === activeStep && classes.dotActive),
193
- ownerState: ownerState,
230
+ }), variant === 'dots' && /*#__PURE__*/(0, _jsxRuntime.jsx)(DotsSlot, {
231
+ ...dotsSlotProps,
232
+ children: [...new Array(steps)].map((_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(DotSlot, {
233
+ ...dotSlotProps,
234
+ className: (0, _clsx.default)(classes.dot, dotSlotProps.className, index === activeStep && classes.dotActive),
194
235
  dotActive: index === activeStep
195
236
  }, index))
196
- }), variant === 'progress' && /*#__PURE__*/(0, _jsxRuntime.jsx)(MobileStepperProgress, {
197
- ownerState: ownerState,
198
- className: classes.progress,
199
- variant: "determinate",
200
- value: value,
201
- ...LinearProgressProps
237
+ }), variant === 'progress' && /*#__PURE__*/(0, _jsxRuntime.jsx)(ProgressSlot, {
238
+ ...progressSlotProps
202
239
  }), nextButton]
203
240
  });
204
241
  });
@@ -227,6 +264,7 @@ process.env.NODE_ENV !== "production" ? MobileStepper.propTypes /* remove-propty
227
264
  className: _propTypes.default.string,
228
265
  /**
229
266
  * Props applied to the `LinearProgress` element.
267
+ * @deprecated Use `slotProps.progress` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
230
268
  */
231
269
  LinearProgressProps: _propTypes.default.object,
232
270
  /**
@@ -238,6 +276,26 @@ process.env.NODE_ENV !== "production" ? MobileStepper.propTypes /* remove-propty
238
276
  * @default 'bottom'
239
277
  */
240
278
  position: _propTypes.default.oneOf(['bottom', 'static', 'top']),
279
+ /**
280
+ * The props used for each slot inside.
281
+ * @default {}
282
+ */
283
+ slotProps: _propTypes.default.shape({
284
+ dot: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
285
+ dots: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
286
+ progress: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
287
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
288
+ }),
289
+ /**
290
+ * The components used for each slot inside.
291
+ * @default {}
292
+ */
293
+ slots: _propTypes.default.shape({
294
+ dot: _propTypes.default.elementType,
295
+ dots: _propTypes.default.elementType,
296
+ progress: _propTypes.default.elementType,
297
+ root: _propTypes.default.elementType
298
+ }),
241
299
  /**
242
300
  * The total steps.
243
301
  */
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.3
2
+ * @mui/material v6.4.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -29,22 +29,29 @@ function mergeSlotProps(externalSlotProps, defaultSlotProps) {
29
29
  ...defaultSlotPropsValue.style,
30
30
  ...externalSlotPropsValue.style
31
31
  }
32
+ }),
33
+ ...(defaultSlotPropsValue?.sx && externalSlotPropsValue?.sx && {
34
+ sx: [...(Array.isArray(defaultSlotPropsValue.sx) ? defaultSlotPropsValue.sx : [defaultSlotPropsValue.sx]), ...(Array.isArray(externalSlotPropsValue.sx) ? externalSlotPropsValue.sx : [externalSlotPropsValue.sx])]
32
35
  })
33
36
  };
34
37
  };
35
38
  }
36
- const className = (0, _clsx.default)(defaultSlotProps?.className, externalSlotProps?.className);
39
+ const typedDefaultSlotProps = defaultSlotProps;
40
+ const className = (0, _clsx.default)(typedDefaultSlotProps?.className, externalSlotProps?.className);
37
41
  return {
38
42
  ...defaultSlotProps,
39
43
  ...externalSlotProps,
40
44
  ...(!!className && {
41
45
  className
42
46
  }),
43
- ...(defaultSlotProps?.style && externalSlotProps?.style && {
47
+ ...(typedDefaultSlotProps?.style && externalSlotProps?.style && {
44
48
  style: {
45
- ...defaultSlotProps.style,
49
+ ...typedDefaultSlotProps.style,
46
50
  ...externalSlotProps.style
47
51
  }
52
+ }),
53
+ ...(typedDefaultSlotProps?.sx && externalSlotProps?.sx && {
54
+ sx: [...(Array.isArray(typedDefaultSlotProps.sx) ? typedDefaultSlotProps.sx : [typedDefaultSlotProps.sx]), ...(Array.isArray(externalSlotProps.sx) ? externalSlotProps.sx : [externalSlotProps.sx])]
48
55
  })
49
56
  };
50
57
  }
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
7
- const version = exports.version = "6.4.3";
7
+ const version = exports.version = "6.4.4";
8
8
  const major = exports.major = Number("6");
9
9
  const minor = exports.minor = Number("4");
10
- const patch = exports.patch = Number("3");
10
+ const patch = exports.patch = Number("4");
11
11
  const prerelease = exports.prerelease = undefined;
12
12
  var _default = exports.default = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "6.4.3",
3
+ "version": "6.4.4",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
@@ -35,10 +35,10 @@
35
35
  "prop-types": "^15.8.1",
36
36
  "react-is": "^19.0.0",
37
37
  "react-transition-group": "^4.4.5",
38
+ "@mui/core-downloads-tracker": "^6.4.4",
38
39
  "@mui/system": "^6.4.3",
39
- "@mui/core-downloads-tracker": "^6.4.3",
40
- "@mui/types": "^7.2.21",
41
- "@mui/utils": "^6.4.3"
40
+ "@mui/utils": "^6.4.3",
41
+ "@mui/types": "^7.2.21"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@emotion/react": "^11.5.0",
@@ -22,22 +22,29 @@ export default function mergeSlotProps(externalSlotProps, defaultSlotProps) {
22
22
  ...defaultSlotPropsValue.style,
23
23
  ...externalSlotPropsValue.style
24
24
  }
25
+ }),
26
+ ...(defaultSlotPropsValue?.sx && externalSlotPropsValue?.sx && {
27
+ sx: [...(Array.isArray(defaultSlotPropsValue.sx) ? defaultSlotPropsValue.sx : [defaultSlotPropsValue.sx]), ...(Array.isArray(externalSlotPropsValue.sx) ? externalSlotPropsValue.sx : [externalSlotPropsValue.sx])]
25
28
  })
26
29
  };
27
30
  };
28
31
  }
29
- const className = clsx(defaultSlotProps?.className, externalSlotProps?.className);
32
+ const typedDefaultSlotProps = defaultSlotProps;
33
+ const className = clsx(typedDefaultSlotProps?.className, externalSlotProps?.className);
30
34
  return {
31
35
  ...defaultSlotProps,
32
36
  ...externalSlotProps,
33
37
  ...(!!className && {
34
38
  className
35
39
  }),
36
- ...(defaultSlotProps?.style && externalSlotProps?.style && {
40
+ ...(typedDefaultSlotProps?.style && externalSlotProps?.style && {
37
41
  style: {
38
- ...defaultSlotProps.style,
42
+ ...typedDefaultSlotProps.style,
39
43
  ...externalSlotProps.style
40
44
  }
45
+ }),
46
+ ...(typedDefaultSlotProps?.sx && externalSlotProps?.sx && {
47
+ sx: [...(Array.isArray(typedDefaultSlotProps.sx) ? typedDefaultSlotProps.sx : [typedDefaultSlotProps.sx]), ...(Array.isArray(externalSlotProps.sx) ? externalSlotProps.sx : [externalSlotProps.sx])]
41
48
  })
42
49
  };
43
50
  }
package/version/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export const version = "6.4.3";
1
+ export const version = "6.4.4";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("4");
4
- export const patch = Number("3");
4
+ export const patch = Number("4");
5
5
  export const prerelease = undefined;
6
6
  export default version;