@mui/material 6.3.0 → 6.3.1

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.
@@ -30,7 +30,7 @@ export interface AppBarOwnProps {
30
30
  enableColorOnDark?: boolean;
31
31
  /**
32
32
  * The positioning type. The behavior of the different options is described
33
- * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
33
+ * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/position).
34
34
  * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
35
35
  * @default 'fixed'
36
36
  */
package/AppBar/AppBar.js CHANGED
@@ -214,7 +214,7 @@ process.env.NODE_ENV !== "production" ? AppBar.propTypes /* remove-proptypes */
214
214
  enableColorOnDark: PropTypes.bool,
215
215
  /**
216
216
  * The positioning type. The behavior of the different options is described
217
- * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
217
+ * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/position).
218
218
  * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
219
219
  * @default 'fixed'
220
220
  */
@@ -650,53 +650,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
650
650
  };
651
651
  const clearIndicatorSlotProps = externalForwardedProps.slotProps.clearIndicator;
652
652
  const popupIndicatorSlotProps = externalForwardedProps.slotProps.popupIndicator;
653
- const renderAutocompletePopperChildren = children => /*#__PURE__*/_jsx(AutocompletePopper, {
654
- as: PopperSlot,
655
- ...popperProps,
656
- children: /*#__PURE__*/_jsx(AutocompletePaper, {
657
- as: PaperSlot,
658
- ...paperProps,
659
- children: children
660
- })
661
- });
662
- let autocompletePopper = null;
663
- if (groupedOptions.length > 0) {
664
- autocompletePopper = renderAutocompletePopperChildren(
665
- /*#__PURE__*/
666
- // TODO v7: remove `as` prop and move ListboxComponentProp to externalForwardedProps or remove ListboxComponentProp entirely
667
- // https://github.com/mui/material-ui/pull/43994#issuecomment-2401945800
668
- _jsx(ListboxSlot, {
669
- as: ListboxComponentProp,
670
- ...listboxProps,
671
- children: groupedOptions.map((option, index) => {
672
- if (groupBy) {
673
- return renderGroup({
674
- key: option.key,
675
- group: option.group,
676
- children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
677
- });
678
- }
679
- return renderListOption(option, index);
680
- })
681
- }));
682
- } else if (loading && groupedOptions.length === 0) {
683
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteLoading, {
684
- className: classes.loading,
685
- ownerState: ownerState,
686
- children: loadingText
687
- }));
688
- } else if (groupedOptions.length === 0 && !freeSolo && !loading) {
689
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteNoOptions, {
690
- className: classes.noOptions,
691
- ownerState: ownerState,
692
- role: "presentation",
693
- onMouseDown: event => {
694
- // Prevent input blur when interacting with the "no options" content
695
- event.preventDefault();
696
- },
697
- children: noOptionsText
698
- }));
699
- }
700
653
  return /*#__PURE__*/_jsxs(React.Fragment, {
701
654
  children: [/*#__PURE__*/_jsx(AutocompleteRoot, {
702
655
  ref: ref,
@@ -750,7 +703,41 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
750
703
  ...getInputProps()
751
704
  }
752
705
  })
753
- }), anchorEl ? autocompletePopper : null]
706
+ }), anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
707
+ as: PopperSlot,
708
+ ...popperProps,
709
+ children: /*#__PURE__*/_jsxs(AutocompletePaper, {
710
+ as: PaperSlot,
711
+ ...paperProps,
712
+ children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
713
+ className: classes.loading,
714
+ ownerState: ownerState,
715
+ children: loadingText
716
+ }) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /*#__PURE__*/_jsx(AutocompleteNoOptions, {
717
+ className: classes.noOptions,
718
+ ownerState: ownerState,
719
+ role: "presentation",
720
+ onMouseDown: event => {
721
+ // Prevent input blur when interacting with the "no options" content
722
+ event.preventDefault();
723
+ },
724
+ children: noOptionsText
725
+ }) : null, groupedOptions.length > 0 ? /*#__PURE__*/_jsx(ListboxSlot, {
726
+ as: ListboxComponentProp,
727
+ ...listboxProps,
728
+ children: groupedOptions.map((option, index) => {
729
+ if (groupBy) {
730
+ return renderGroup({
731
+ key: option.key,
732
+ group: option.group,
733
+ children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
734
+ });
735
+ }
736
+ return renderListOption(option, index);
737
+ })
738
+ }) : null]
739
+ })
740
+ }) : null]
754
741
  });
755
742
  });
756
743
  process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptypes */ = {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.3.1
4
+
5
+ <!-- generated comparing v6.3.0..master -->
6
+
7
+ _Jan 3, 2025_
8
+
9
+ A big thanks to the 8 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.3.1`
12
+
13
+ - [Autocomplete] Revert: Fix options list rendering in freeSolo mode (#44858) @ZeeshanTamboli
14
+ - [Tooltip] Warn instead of error when trigger is disabled (#44846) @yash49
15
+ - [TableSortLabel] Add slots and slotProps (#44728) @sai6855
16
+ - [Select] Deprecate composed classes (#44925) @sai6855
17
+
18
+ ### Docs
19
+
20
+ - [material-ui][Accordion] Update `Anatomy` section in Accordion docs (#44849) @ZeeshanTamboli
21
+ - [material-ui][CardActionArea] Added demo in docs of cards for adding props to CardActionArea (#44789) @siddhantantil39
22
+ - [material-ui][Grid2] Add interactive demo for Grid v2 (#44820) @yash49
23
+ - [material-ui][Select] Update docs to reflect the omission of placeholder prop (#44856) @adityaparab
24
+ - [joy-ui] Fix Color mode button on Theme builder (#44864) @komkanit
25
+ - Fix 301 redirections @oliviertassinari
26
+
27
+ ### Core
28
+
29
+ - [examples] Update Next.js examples Next.js and React versions (#44852) @DiegoAndai
30
+ - [code-infra] Prevent wrong nested imports in Base UI (#44426) @oliviertassinari
31
+ - [docs-infra] Add vale coverage for App Router and Page Router (060c55c) @oliviertassinari
32
+ - Sync with other repos (1b9300f) @oliviertassinari
33
+ - Fix docs:build to work in docs folder too (6b923a4) @oliviertassinari
34
+ - Setup React 18 CI tests (#44868) @DiegoAndai
35
+ - Update test to use public API (#44875) @oliviertassinari
36
+
37
+ All contributors of this release in alphabetical order: @adityaparab, @DiegoAndai, @komkanit, @oliviertassinari, @sai6855, @siddhantantil39, @yash49, @ZeeshanTamboli
38
+
3
39
  ## 6.3.0
4
40
 
5
41
  <!-- generated comparing v6.2.1..master -->
@@ -19,11 +19,17 @@ export interface SelectClasses {
19
19
  icon: string;
20
20
  /** Styles applied to the icon component if the popup is open. */
21
21
  iconOpen: string;
22
- /** Styles applied to the icon component if `variant="filled"`. */
22
+ /** Styles applied to the icon component if `variant="filled"`.
23
+ * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-icon) and [.MuiSelect-filled](/material-ui/api/select/#select-classes-filled) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
24
+ */
23
25
  iconFilled: string;
24
- /** Styles applied to the icon component if `variant="outlined"`. */
26
+ /** Styles applied to the icon component if `variant="outlined"`.
27
+ * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-icon) and [.MuiSelect-outlined](/material-ui/api/select/#select-classes-outlined) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
28
+ */
25
29
  iconOutlined: string;
26
- /** Styles applied to the icon component if `variant="standard"`. */
30
+ /** Styles applied to the icon component if `variant="standard"`.
31
+ * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-icon) and [.MuiSelect-standard](/material-ui/api/select/#select-classes-standard) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
32
+ */
27
33
  iconStandard: string;
28
34
  /** Styles applied to the underlying native input component. */
29
35
  nativeInput: string;
@@ -4,6 +4,48 @@ import { Theme } from '..';
4
4
  import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
5
5
  import { OverrideProps } from '../OverridableComponent';
6
6
  import { TableSortLabelClasses } from './tableSortLabelClasses';
7
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
8
+
9
+ export interface TableSortLabelRootSlotPropsOverrides {}
10
+
11
+ export interface TableSortLabelIconSlotPropsOverrides {}
12
+
13
+ export interface TableSortLabelSlots {
14
+ /**
15
+ * The component that renders the root slot.
16
+ * @default span
17
+ */
18
+ root?: React.ElementType;
19
+ /**
20
+ * The component that renders the icon slot.
21
+ * @default ArrowDownwardIcon
22
+ */
23
+ icon?: React.ElementType;
24
+ }
25
+
26
+ export type TableSortLabelSlotsAndSlotProps = CreateSlotsAndSlotProps<
27
+ TableSortLabelSlots,
28
+ {
29
+ /**
30
+ * Props forwarded to the root slot.
31
+ */
32
+ root: SlotProps<
33
+ React.ElementType<React.HTMLAttributes<HTMLSpanElement>>,
34
+ TableSortLabelRootSlotPropsOverrides,
35
+ TableSortLabelOwnerState
36
+ >;
37
+ /**
38
+ * Props forwarded to the icon slot.
39
+ */
40
+ icon: SlotProps<
41
+ React.ElementType<React.SVGAttributes<SVGSVGElement>>,
42
+ TableSortLabelIconSlotPropsOverrides,
43
+ TableSortLabelOwnerState
44
+ >;
45
+ }
46
+ >;
47
+
48
+ export interface TableSortLabelOwnerState extends TableSortLabelOwnProps {}
7
49
 
8
50
  export interface TableSortLabelOwnProps {
9
51
  /**
@@ -46,7 +88,7 @@ export type TableSortLabelTypeMap<
46
88
  AdditionalProps = {},
47
89
  RootComponent extends React.ElementType = 'span',
48
90
  > = ExtendButtonBaseTypeMap<{
49
- props: AdditionalProps & TableSortLabelOwnProps;
91
+ props: AdditionalProps & TableSortLabelOwnProps & TableSortLabelSlotsAndSlotProps;
50
92
  defaultComponent: RootComponent;
51
93
  }>;
52
94
 
@@ -11,6 +11,7 @@ import memoTheme from "../utils/memoTheme.js";
11
11
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
12
12
  import capitalize from "../utils/capitalize.js";
13
13
  import tableSortLabelClasses, { getTableSortLabelUtilityClass } from "./tableSortLabelClasses.js";
14
+ import useSlot from "../utils/useSlot.js";
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
16
  const useUtilityClasses = ownerState => {
16
17
  const {
@@ -110,6 +111,8 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
110
111
  direction = 'asc',
111
112
  hideSortIcon = false,
112
113
  IconComponent = ArrowDownwardIcon,
114
+ slots = {},
115
+ slotProps = {},
113
116
  ...other
114
117
  } = props;
115
118
  const ownerState = {
@@ -120,17 +123,31 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
120
123
  IconComponent
121
124
  };
122
125
  const classes = useUtilityClasses(ownerState);
123
- return /*#__PURE__*/_jsxs(TableSortLabelRoot, {
126
+ const externalForwardedProps = {
127
+ slots,
128
+ slotProps
129
+ };
130
+ const [RootSlot, rootProps] = useSlot('root', {
131
+ elementType: TableSortLabelRoot,
132
+ externalForwardedProps,
133
+ ownerState,
124
134
  className: clsx(classes.root, className),
125
- component: "span",
135
+ ref
136
+ });
137
+ const [IconSlot, iconProps] = useSlot('icon', {
138
+ elementType: TableSortLabelIcon,
139
+ externalForwardedProps,
140
+ ownerState,
141
+ className: classes.icon
142
+ });
143
+ return /*#__PURE__*/_jsxs(RootSlot, {
126
144
  disableRipple: true,
127
- ownerState: ownerState,
128
- ref: ref,
145
+ component: "span",
146
+ ...rootProps,
129
147
  ...other,
130
- children: [children, hideSortIcon && !active ? null : /*#__PURE__*/_jsx(TableSortLabelIcon, {
148
+ children: [children, hideSortIcon && !active ? null : /*#__PURE__*/_jsx(IconSlot, {
131
149
  as: IconComponent,
132
- className: clsx(classes.icon),
133
- ownerState: ownerState
150
+ ...iconProps
134
151
  })]
135
152
  });
136
153
  });
@@ -171,6 +188,22 @@ process.env.NODE_ENV !== "production" ? TableSortLabel.propTypes /* remove-propt
171
188
  * @default ArrowDownwardIcon
172
189
  */
173
190
  IconComponent: PropTypes.elementType,
191
+ /**
192
+ * The props used for each slot inside.
193
+ * @default {}
194
+ */
195
+ slotProps: PropTypes.shape({
196
+ icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
197
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
198
+ }),
199
+ /**
200
+ * The components used for each slot inside.
201
+ * @default {}
202
+ */
203
+ slots: PropTypes.shape({
204
+ icon: PropTypes.elementType,
205
+ root: PropTypes.elementType
206
+ }),
174
207
  /**
175
208
  * The system prop that allows defining system overrides as well as additional CSS styles.
176
209
  */
@@ -379,7 +379,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
379
379
  // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes
380
380
  React.useEffect(() => {
381
381
  if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {
382
- console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
382
+ console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
383
383
  }
384
384
  }, [title, childNode, isControlled]);
385
385
  }
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.3.0
2
+ * @mui/material v6.3.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -214,7 +214,7 @@ process.env.NODE_ENV !== "production" ? AppBar.propTypes /* remove-proptypes */
214
214
  enableColorOnDark: PropTypes.bool,
215
215
  /**
216
216
  * The positioning type. The behavior of the different options is described
217
- * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
217
+ * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/position).
218
218
  * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
219
219
  * @default 'fixed'
220
220
  */
@@ -650,53 +650,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
650
650
  };
651
651
  const clearIndicatorSlotProps = externalForwardedProps.slotProps.clearIndicator;
652
652
  const popupIndicatorSlotProps = externalForwardedProps.slotProps.popupIndicator;
653
- const renderAutocompletePopperChildren = children => /*#__PURE__*/_jsx(AutocompletePopper, {
654
- as: PopperSlot,
655
- ...popperProps,
656
- children: /*#__PURE__*/_jsx(AutocompletePaper, {
657
- as: PaperSlot,
658
- ...paperProps,
659
- children: children
660
- })
661
- });
662
- let autocompletePopper = null;
663
- if (groupedOptions.length > 0) {
664
- autocompletePopper = renderAutocompletePopperChildren(
665
- /*#__PURE__*/
666
- // TODO v7: remove `as` prop and move ListboxComponentProp to externalForwardedProps or remove ListboxComponentProp entirely
667
- // https://github.com/mui/material-ui/pull/43994#issuecomment-2401945800
668
- _jsx(ListboxSlot, {
669
- as: ListboxComponentProp,
670
- ...listboxProps,
671
- children: groupedOptions.map((option, index) => {
672
- if (groupBy) {
673
- return renderGroup({
674
- key: option.key,
675
- group: option.group,
676
- children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
677
- });
678
- }
679
- return renderListOption(option, index);
680
- })
681
- }));
682
- } else if (loading && groupedOptions.length === 0) {
683
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteLoading, {
684
- className: classes.loading,
685
- ownerState: ownerState,
686
- children: loadingText
687
- }));
688
- } else if (groupedOptions.length === 0 && !freeSolo && !loading) {
689
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteNoOptions, {
690
- className: classes.noOptions,
691
- ownerState: ownerState,
692
- role: "presentation",
693
- onMouseDown: event => {
694
- // Prevent input blur when interacting with the "no options" content
695
- event.preventDefault();
696
- },
697
- children: noOptionsText
698
- }));
699
- }
700
653
  return /*#__PURE__*/_jsxs(React.Fragment, {
701
654
  children: [/*#__PURE__*/_jsx(AutocompleteRoot, {
702
655
  ref: ref,
@@ -750,7 +703,41 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
750
703
  ...getInputProps()
751
704
  }
752
705
  })
753
- }), anchorEl ? autocompletePopper : null]
706
+ }), anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
707
+ as: PopperSlot,
708
+ ...popperProps,
709
+ children: /*#__PURE__*/_jsxs(AutocompletePaper, {
710
+ as: PaperSlot,
711
+ ...paperProps,
712
+ children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
713
+ className: classes.loading,
714
+ ownerState: ownerState,
715
+ children: loadingText
716
+ }) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /*#__PURE__*/_jsx(AutocompleteNoOptions, {
717
+ className: classes.noOptions,
718
+ ownerState: ownerState,
719
+ role: "presentation",
720
+ onMouseDown: event => {
721
+ // Prevent input blur when interacting with the "no options" content
722
+ event.preventDefault();
723
+ },
724
+ children: noOptionsText
725
+ }) : null, groupedOptions.length > 0 ? /*#__PURE__*/_jsx(ListboxSlot, {
726
+ as: ListboxComponentProp,
727
+ ...listboxProps,
728
+ children: groupedOptions.map((option, index) => {
729
+ if (groupBy) {
730
+ return renderGroup({
731
+ key: option.key,
732
+ group: option.group,
733
+ children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
734
+ });
735
+ }
736
+ return renderListOption(option, index);
737
+ })
738
+ }) : null]
739
+ })
740
+ }) : null]
754
741
  });
755
742
  });
756
743
  process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptypes */ = {
@@ -11,6 +11,7 @@ import memoTheme from "../utils/memoTheme.js";
11
11
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
12
12
  import capitalize from "../utils/capitalize.js";
13
13
  import tableSortLabelClasses, { getTableSortLabelUtilityClass } from "./tableSortLabelClasses.js";
14
+ import useSlot from "../utils/useSlot.js";
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
16
  const useUtilityClasses = ownerState => {
16
17
  const {
@@ -110,6 +111,8 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
110
111
  direction = 'asc',
111
112
  hideSortIcon = false,
112
113
  IconComponent = ArrowDownwardIcon,
114
+ slots = {},
115
+ slotProps = {},
113
116
  ...other
114
117
  } = props;
115
118
  const ownerState = {
@@ -120,17 +123,31 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
120
123
  IconComponent
121
124
  };
122
125
  const classes = useUtilityClasses(ownerState);
123
- return /*#__PURE__*/_jsxs(TableSortLabelRoot, {
126
+ const externalForwardedProps = {
127
+ slots,
128
+ slotProps
129
+ };
130
+ const [RootSlot, rootProps] = useSlot('root', {
131
+ elementType: TableSortLabelRoot,
132
+ externalForwardedProps,
133
+ ownerState,
124
134
  className: clsx(classes.root, className),
125
- component: "span",
135
+ ref
136
+ });
137
+ const [IconSlot, iconProps] = useSlot('icon', {
138
+ elementType: TableSortLabelIcon,
139
+ externalForwardedProps,
140
+ ownerState,
141
+ className: classes.icon
142
+ });
143
+ return /*#__PURE__*/_jsxs(RootSlot, {
126
144
  disableRipple: true,
127
- ownerState: ownerState,
128
- ref: ref,
145
+ component: "span",
146
+ ...rootProps,
129
147
  ...other,
130
- children: [children, hideSortIcon && !active ? null : /*#__PURE__*/_jsx(TableSortLabelIcon, {
148
+ children: [children, hideSortIcon && !active ? null : /*#__PURE__*/_jsx(IconSlot, {
131
149
  as: IconComponent,
132
- className: clsx(classes.icon),
133
- ownerState: ownerState
150
+ ...iconProps
134
151
  })]
135
152
  });
136
153
  });
@@ -171,6 +188,22 @@ process.env.NODE_ENV !== "production" ? TableSortLabel.propTypes /* remove-propt
171
188
  * @default ArrowDownwardIcon
172
189
  */
173
190
  IconComponent: PropTypes.elementType,
191
+ /**
192
+ * The props used for each slot inside.
193
+ * @default {}
194
+ */
195
+ slotProps: PropTypes.shape({
196
+ icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
197
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
198
+ }),
199
+ /**
200
+ * The components used for each slot inside.
201
+ * @default {}
202
+ */
203
+ slots: PropTypes.shape({
204
+ icon: PropTypes.elementType,
205
+ root: PropTypes.elementType
206
+ }),
174
207
  /**
175
208
  * The system prop that allows defining system overrides as well as additional CSS styles.
176
209
  */
@@ -379,7 +379,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
379
379
  // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes
380
380
  React.useEffect(() => {
381
381
  if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {
382
- console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
382
+ console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
383
383
  }
384
384
  }, [title, childNode, isControlled]);
385
385
  }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.3.0
2
+ * @mui/material v6.3.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,6 +1,6 @@
1
- export const version = "6.3.0";
1
+ export const version = "6.3.1";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("3");
4
- export const patch = Number("0");
4
+ export const patch = Number("1");
5
5
  export const prerelease = undefined;
6
6
  export default version;
@@ -221,7 +221,7 @@ process.env.NODE_ENV !== "production" ? AppBar.propTypes /* remove-proptypes */
221
221
  enableColorOnDark: _propTypes.default.bool,
222
222
  /**
223
223
  * The positioning type. The behavior of the different options is described
224
- * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
224
+ * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/position).
225
225
  * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
226
226
  * @default 'fixed'
227
227
  */
@@ -662,53 +662,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
662
662
  };
663
663
  const clearIndicatorSlotProps = externalForwardedProps.slotProps.clearIndicator;
664
664
  const popupIndicatorSlotProps = externalForwardedProps.slotProps.popupIndicator;
665
- const renderAutocompletePopperChildren = children => /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePopper, {
666
- as: PopperSlot,
667
- ...popperProps,
668
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePaper, {
669
- as: PaperSlot,
670
- ...paperProps,
671
- children: children
672
- })
673
- });
674
- let autocompletePopper = null;
675
- if (groupedOptions.length > 0) {
676
- autocompletePopper = renderAutocompletePopperChildren(
677
- /*#__PURE__*/
678
- // TODO v7: remove `as` prop and move ListboxComponentProp to externalForwardedProps or remove ListboxComponentProp entirely
679
- // https://github.com/mui/material-ui/pull/43994#issuecomment-2401945800
680
- (0, _jsxRuntime.jsx)(ListboxSlot, {
681
- as: ListboxComponentProp,
682
- ...listboxProps,
683
- children: groupedOptions.map((option, index) => {
684
- if (groupBy) {
685
- return renderGroup({
686
- key: option.key,
687
- group: option.group,
688
- children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
689
- });
690
- }
691
- return renderListOption(option, index);
692
- })
693
- }));
694
- } else if (loading && groupedOptions.length === 0) {
695
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteLoading, {
696
- className: classes.loading,
697
- ownerState: ownerState,
698
- children: loadingText
699
- }));
700
- } else if (groupedOptions.length === 0 && !freeSolo && !loading) {
701
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteNoOptions, {
702
- className: classes.noOptions,
703
- ownerState: ownerState,
704
- role: "presentation",
705
- onMouseDown: event => {
706
- // Prevent input blur when interacting with the "no options" content
707
- event.preventDefault();
708
- },
709
- children: noOptionsText
710
- }));
711
- }
712
665
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
713
666
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteRoot, {
714
667
  ref: ref,
@@ -762,7 +715,41 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
762
715
  ...getInputProps()
763
716
  }
764
717
  })
765
- }), anchorEl ? autocompletePopper : null]
718
+ }), anchorEl ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePopper, {
719
+ as: PopperSlot,
720
+ ...popperProps,
721
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(AutocompletePaper, {
722
+ as: PaperSlot,
723
+ ...paperProps,
724
+ children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteLoading, {
725
+ className: classes.loading,
726
+ ownerState: ownerState,
727
+ children: loadingText
728
+ }) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteNoOptions, {
729
+ className: classes.noOptions,
730
+ ownerState: ownerState,
731
+ role: "presentation",
732
+ onMouseDown: event => {
733
+ // Prevent input blur when interacting with the "no options" content
734
+ event.preventDefault();
735
+ },
736
+ children: noOptionsText
737
+ }) : null, groupedOptions.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ListboxSlot, {
738
+ as: ListboxComponentProp,
739
+ ...listboxProps,
740
+ children: groupedOptions.map((option, index) => {
741
+ if (groupBy) {
742
+ return renderGroup({
743
+ key: option.key,
744
+ group: option.group,
745
+ children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
746
+ });
747
+ }
748
+ return renderListOption(option, index);
749
+ })
750
+ }) : null]
751
+ })
752
+ }) : null]
766
753
  });
767
754
  });
768
755
  process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptypes */ = {
@@ -18,6 +18,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
18
18
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
19
19
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
20
20
  var _tableSortLabelClasses = _interopRequireWildcard(require("./tableSortLabelClasses"));
21
+ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
21
22
  var _jsxRuntime = require("react/jsx-runtime");
22
23
  const useUtilityClasses = ownerState => {
23
24
  const {
@@ -117,6 +118,8 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
117
118
  direction = 'asc',
118
119
  hideSortIcon = false,
119
120
  IconComponent = _ArrowDownward.default,
121
+ slots = {},
122
+ slotProps = {},
120
123
  ...other
121
124
  } = props;
122
125
  const ownerState = {
@@ -127,17 +130,31 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
127
130
  IconComponent
128
131
  };
129
132
  const classes = useUtilityClasses(ownerState);
130
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TableSortLabelRoot, {
133
+ const externalForwardedProps = {
134
+ slots,
135
+ slotProps
136
+ };
137
+ const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
138
+ elementType: TableSortLabelRoot,
139
+ externalForwardedProps,
140
+ ownerState,
131
141
  className: (0, _clsx.default)(classes.root, className),
132
- component: "span",
142
+ ref
143
+ });
144
+ const [IconSlot, iconProps] = (0, _useSlot.default)('icon', {
145
+ elementType: TableSortLabelIcon,
146
+ externalForwardedProps,
147
+ ownerState,
148
+ className: classes.icon
149
+ });
150
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
133
151
  disableRipple: true,
134
- ownerState: ownerState,
135
- ref: ref,
152
+ component: "span",
153
+ ...rootProps,
136
154
  ...other,
137
- children: [children, hideSortIcon && !active ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(TableSortLabelIcon, {
155
+ children: [children, hideSortIcon && !active ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(IconSlot, {
138
156
  as: IconComponent,
139
- className: (0, _clsx.default)(classes.icon),
140
- ownerState: ownerState
157
+ ...iconProps
141
158
  })]
142
159
  });
143
160
  });
@@ -178,6 +195,22 @@ process.env.NODE_ENV !== "production" ? TableSortLabel.propTypes /* remove-propt
178
195
  * @default ArrowDownwardIcon
179
196
  */
180
197
  IconComponent: _propTypes.default.elementType,
198
+ /**
199
+ * The props used for each slot inside.
200
+ * @default {}
201
+ */
202
+ slotProps: _propTypes.default.shape({
203
+ icon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
204
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
205
+ }),
206
+ /**
207
+ * The components used for each slot inside.
208
+ * @default {}
209
+ */
210
+ slots: _propTypes.default.shape({
211
+ icon: _propTypes.default.elementType,
212
+ root: _propTypes.default.elementType
213
+ }),
181
214
  /**
182
215
  * The system prop that allows defining system overrides as well as additional CSS styles.
183
216
  */
@@ -387,7 +387,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
387
387
  // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes
388
388
  React.useEffect(() => {
389
389
  if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {
390
- console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
390
+ console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
391
391
  }
392
392
  }, [title, childNode, isControlled]);
393
393
  }
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.3.0
2
+ * @mui/material v6.3.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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.3.0";
7
+ const version = exports.version = "6.3.1";
8
8
  const major = exports.major = Number("6");
9
9
  const minor = exports.minor = Number("3");
10
- const patch = exports.patch = Number("0");
10
+ const patch = exports.patch = Number("1");
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.3.0",
3
+ "version": "6.3.1",
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/types": "^7.2.20",
39
- "@mui/utils": "^6.3.0",
40
- "@mui/system": "^6.3.0",
41
- "@mui/core-downloads-tracker": "^6.3.0"
38
+ "@mui/core-downloads-tracker": "^6.3.1",
39
+ "@mui/types": "^7.2.21",
40
+ "@mui/system": "^6.3.1",
41
+ "@mui/utils": "^6.3.1"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@emotion/react": "^11.5.0",
@@ -46,7 +46,7 @@
46
46
  "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
47
47
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
48
48
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
49
- "@mui/material-pigment-css": "^6.3.0"
49
+ "@mui/material-pigment-css": "^6.3.1"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@types/react": {
package/version/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export const version = "6.3.0";
1
+ export const version = "6.3.1";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("3");
4
- export const patch = Number("0");
4
+ export const patch = Number("1");
5
5
  export const prerelease = undefined;
6
6
  export default version;