@mui/material 5.15.11 → 5.15.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/Alert/Alert.d.ts +2 -2
  2. package/Alert/Alert.js +53 -35
  3. package/Alert/alertClasses.d.ts +68 -12
  4. package/Alert/alertClasses.js +1 -1
  5. package/AlertTitle/AlertTitle.js +2 -2
  6. package/Autocomplete/Autocomplete.js +58 -49
  7. package/Avatar/Avatar.js +2 -2
  8. package/Button/Button.js +3 -3
  9. package/Button/buttonClasses.d.ts +113 -33
  10. package/Button/buttonClasses.js +1 -1
  11. package/CHANGELOG.md +290 -116
  12. package/Checkbox/Checkbox.d.ts +1 -1
  13. package/Chip/chipClasses.d.ts +78 -26
  14. package/Drawer/Drawer.js +9 -3
  15. package/LinearProgress/LinearProgress.js +4 -4
  16. package/Menu/Menu.js +5 -4
  17. package/MenuList/MenuList.js +4 -2
  18. package/PaginationItem/PaginationItem.js +3 -3
  19. package/README.md +1 -1
  20. package/Rating/Rating.js +3 -3
  21. package/Slider/Slider.d.ts +2 -4
  22. package/Slider/Slider.js +4 -7
  23. package/Switch/Switch.js +61 -41
  24. package/TabScrollButton/TabScrollButton.js +2 -3
  25. package/TablePagination/TablePaginationActions.js +14 -14
  26. package/Tabs/Tabs.js +3 -2
  27. package/Tooltip/Tooltip.js +5 -4
  28. package/index.js +1 -1
  29. package/legacy/Alert/Alert.js +77 -34
  30. package/legacy/Alert/alertClasses.js +1 -1
  31. package/legacy/AlertTitle/AlertTitle.js +2 -2
  32. package/legacy/Autocomplete/Autocomplete.js +62 -51
  33. package/legacy/Avatar/Avatar.js +2 -2
  34. package/legacy/Button/Button.js +3 -3
  35. package/legacy/Button/buttonClasses.js +1 -1
  36. package/legacy/Drawer/Drawer.js +8 -3
  37. package/legacy/LinearProgress/LinearProgress.js +4 -4
  38. package/legacy/Menu/Menu.js +5 -4
  39. package/legacy/MenuList/MenuList.js +3 -2
  40. package/legacy/PaginationItem/PaginationItem.js +3 -3
  41. package/legacy/Rating/Rating.js +3 -3
  42. package/legacy/Slider/Slider.js +4 -7
  43. package/legacy/Switch/Switch.js +88 -59
  44. package/legacy/TabScrollButton/TabScrollButton.js +2 -3
  45. package/legacy/TablePagination/TablePaginationActions.js +14 -14
  46. package/legacy/Tabs/Tabs.js +3 -2
  47. package/legacy/Tooltip/Tooltip.js +7 -3
  48. package/legacy/index.js +1 -1
  49. package/legacy/styles/experimental_extendTheme.js +3 -0
  50. package/modern/Alert/Alert.js +53 -35
  51. package/modern/Alert/alertClasses.js +1 -1
  52. package/modern/AlertTitle/AlertTitle.js +2 -2
  53. package/modern/Autocomplete/Autocomplete.js +58 -49
  54. package/modern/Avatar/Avatar.js +2 -2
  55. package/modern/Button/Button.js +3 -3
  56. package/modern/Button/buttonClasses.js +1 -1
  57. package/modern/Drawer/Drawer.js +9 -3
  58. package/modern/LinearProgress/LinearProgress.js +4 -4
  59. package/modern/Menu/Menu.js +5 -4
  60. package/modern/MenuList/MenuList.js +4 -2
  61. package/modern/PaginationItem/PaginationItem.js +3 -3
  62. package/modern/Rating/Rating.js +3 -3
  63. package/modern/Slider/Slider.js +4 -7
  64. package/modern/Switch/Switch.js +61 -41
  65. package/modern/TabScrollButton/TabScrollButton.js +2 -3
  66. package/modern/TablePagination/TablePaginationActions.js +14 -14
  67. package/modern/Tabs/Tabs.js +3 -2
  68. package/modern/Tooltip/Tooltip.js +5 -4
  69. package/modern/index.js +1 -1
  70. package/modern/styles/experimental_extendTheme.js +3 -0
  71. package/node/Alert/Alert.js +61 -43
  72. package/node/Alert/alertClasses.js +1 -1
  73. package/node/AlertTitle/AlertTitle.js +4 -4
  74. package/node/Autocomplete/Autocomplete.js +58 -49
  75. package/node/Avatar/Avatar.js +6 -6
  76. package/node/Button/Button.js +3 -3
  77. package/node/Button/buttonClasses.js +1 -1
  78. package/node/Drawer/Drawer.js +9 -3
  79. package/node/LinearProgress/LinearProgress.js +4 -4
  80. package/node/Menu/Menu.js +5 -4
  81. package/node/MenuList/MenuList.js +4 -2
  82. package/node/PaginationItem/PaginationItem.js +3 -3
  83. package/node/Rating/Rating.js +3 -3
  84. package/node/Slider/Slider.js +4 -7
  85. package/node/Switch/Switch.js +66 -46
  86. package/node/TabScrollButton/TabScrollButton.js +2 -3
  87. package/node/TablePagination/TablePaginationActions.js +14 -14
  88. package/node/Tabs/Tabs.js +3 -2
  89. package/node/Tooltip/Tooltip.js +5 -4
  90. package/node/index.js +1 -1
  91. package/node/styles/experimental_extendTheme.js +3 -0
  92. package/package.json +5 -5
  93. package/styles/experimental_extendTheme.d.ts +1 -0
  94. package/styles/experimental_extendTheme.js +3 -0
  95. package/styles/variants.d.ts +7 -1
  96. package/umd/material-ui.development.js +6197 -6084
  97. package/umd/material-ui.production.min.js +2 -2
package/Alert/Alert.d.ts CHANGED
@@ -33,7 +33,7 @@ export type AlertSlotsAndSlotProps = CreateSlotsAndSlotProps<
33
33
  }
34
34
  >;
35
35
 
36
- export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
36
+ export interface AlertProps extends StandardProps<PaperProps, 'variant'>, AlertSlotsAndSlotProps {
37
37
  /**
38
38
  * The action to display. It renders after the message, at the end of the alert.
39
39
  */
@@ -133,4 +133,4 @@ export interface AlertOwnerState extends AlertProps {}
133
133
  * - [Alert API](https://mui.com/material-ui/api/alert/)
134
134
  * - inherits [Paper API](https://mui.com/material-ui/api/paper/)
135
135
  */
136
- export default function Alert(props: AlertProps & AlertSlotsAndSlotProps): JSX.Element;
136
+ export default function Alert(props: AlertProps): JSX.Element;
package/Alert/Alert.js CHANGED
@@ -6,10 +6,9 @@ const _excluded = ["action", "children", "className", "closeText", "color", "com
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
- import { unstable_composeClasses as composeClasses } from '@mui/base';
10
- import { darken, lighten } from '@mui/system';
11
- import styled from '../styles/styled';
12
- import useThemeProps from '../styles/useThemeProps';
9
+ import composeClasses from '@mui/utils/composeClasses';
10
+ import { darken, lighten } from '@mui/system/colorManipulator';
11
+ import { styled, createUseThemeProps } from '../zero-styled';
13
12
  import useSlot from '../utils/useSlot';
14
13
  import capitalize from '../utils/capitalize';
15
14
  import Paper from '../Paper';
@@ -22,6 +21,7 @@ import InfoOutlinedIcon from '../internal/svg-icons/InfoOutlined';
22
21
  import CloseIcon from '../internal/svg-icons/Close';
23
22
  import { jsx as _jsx } from "react/jsx-runtime";
24
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
+ const useThemeProps = createUseThemeProps('MuiAlert');
25
25
  const useUtilityClasses = ownerState => {
26
26
  const {
27
27
  variant,
@@ -30,7 +30,7 @@ const useUtilityClasses = ownerState => {
30
30
  classes
31
31
  } = ownerState;
32
32
  const slots = {
33
- root: ['root', `${variant}${capitalize(color || severity)}`, `${variant}`],
33
+ root: ['root', `color${capitalize(color || severity)}`, `${variant}${capitalize(color || severity)}`, `${variant}`],
34
34
  icon: ['icon'],
35
35
  message: ['message'],
36
36
  action: ['action']
@@ -47,41 +47,58 @@ const AlertRoot = styled(Paper, {
47
47
  return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color || ownerState.severity)}`]];
48
48
  }
49
49
  })(({
50
- theme,
51
- ownerState
50
+ theme
52
51
  }) => {
53
52
  const getColor = theme.palette.mode === 'light' ? darken : lighten;
54
53
  const getBackgroundColor = theme.palette.mode === 'light' ? lighten : darken;
55
- const color = ownerState.color || ownerState.severity;
56
54
  return _extends({}, theme.typography.body2, {
57
55
  backgroundColor: 'transparent',
58
56
  display: 'flex',
59
- padding: '6px 16px'
60
- }, color && ownerState.variant === 'standard' && {
61
- color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
62
- backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color}StandardBg`] : getBackgroundColor(theme.palette[color].light, 0.9),
63
- [`& .${alertClasses.icon}`]: theme.vars ? {
64
- color: theme.vars.palette.Alert[`${color}IconColor`]
65
- } : {
66
- color: theme.palette[color].main
67
- }
68
- }, color && ownerState.variant === 'outlined' && {
69
- color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
70
- border: `1px solid ${(theme.vars || theme).palette[color].light}`,
71
- [`& .${alertClasses.icon}`]: theme.vars ? {
72
- color: theme.vars.palette.Alert[`${color}IconColor`]
73
- } : {
74
- color: theme.palette[color].main
75
- }
76
- }, color && ownerState.variant === 'filled' && _extends({
77
- fontWeight: theme.typography.fontWeightMedium
78
- }, theme.vars ? {
79
- color: theme.vars.palette.Alert[`${color}FilledColor`],
80
- backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`]
81
- } : {
82
- backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
83
- color: theme.palette.getContrastText(theme.palette[color].main)
84
- }));
57
+ padding: '6px 16px',
58
+ variants: [...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color]) => ({
59
+ props: {
60
+ colorSeverity: color,
61
+ variant: 'standard'
62
+ },
63
+ style: {
64
+ color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
65
+ backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color}StandardBg`] : getBackgroundColor(theme.palette[color].light, 0.9),
66
+ [`& .${alertClasses.icon}`]: theme.vars ? {
67
+ color: theme.vars.palette.Alert[`${color}IconColor`]
68
+ } : {
69
+ color: theme.palette[color].main
70
+ }
71
+ }
72
+ })), ...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color]) => ({
73
+ props: {
74
+ colorSeverity: color,
75
+ variant: 'outlined'
76
+ },
77
+ style: {
78
+ color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
79
+ border: `1px solid ${(theme.vars || theme).palette[color].light}`,
80
+ [`& .${alertClasses.icon}`]: theme.vars ? {
81
+ color: theme.vars.palette.Alert[`${color}IconColor`]
82
+ } : {
83
+ color: theme.palette[color].main
84
+ }
85
+ }
86
+ })), ...Object.entries(theme.palette).filter(([, value]) => value.main && value.dark).map(([color]) => ({
87
+ props: {
88
+ colorSeverity: color,
89
+ variant: 'filled'
90
+ },
91
+ style: _extends({
92
+ fontWeight: theme.typography.fontWeightMedium
93
+ }, theme.vars ? {
94
+ color: theme.vars.palette.Alert[`${color}FilledColor`],
95
+ backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`]
96
+ } : {
97
+ backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
98
+ color: theme.palette.getContrastText(theme.palette[color].main)
99
+ })
100
+ }))]
101
+ });
85
102
  });
86
103
  const AlertIcon = styled('div', {
87
104
  name: 'MuiAlert',
@@ -154,7 +171,8 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
154
171
  const ownerState = _extends({}, props, {
155
172
  color,
156
173
  severity,
157
- variant
174
+ variant,
175
+ colorSeverity: color || severity
158
176
  });
159
177
  const classes = useUtilityClasses(ownerState);
160
178
  const externalForwardedProps = {
@@ -7,29 +7,85 @@ export interface AlertClasses {
7
7
  outlined: string;
8
8
  /** Styles applied to the root element if `variant="standard"`. */
9
9
  standard: string;
10
- /** Styles applied to the root element if `variant="standard"` and `color="success"`. */
10
+ /** Styles applied to the root element if `color="success"`. */
11
+ colorSuccess: string;
12
+ /** Styles applied to the root element if `color="info"`. */
13
+ colorInfo: string;
14
+ /** Styles applied to the root element if `color="warning"`. */
15
+ colorWarning: string;
16
+ /** Styles applied to the root element if `color="error"`. */
17
+ colorError: string;
18
+ /** Styles applied to the root element if `variant="standard"` and `color="success"`.
19
+ * @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
20
+ * and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
21
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
22
+ */
11
23
  standardSuccess: string;
12
- /** Styles applied to the root element if `variant="standard"` and `color="info"`. */
24
+ /** Styles applied to the root element if `variant="standard"` and `color="info"`.
25
+ * @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
26
+ * and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
27
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
28
+ */
13
29
  standardInfo: string;
14
- /** Styles applied to the root element if `variant="standard"` and `color="warning"`. */
30
+ /** Styles applied to the root element if `variant="standard"` and `color="warning"`.
31
+ * @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
32
+ * and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
33
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
34
+ */
15
35
  standardWarning: string;
16
- /** Styles applied to the root element if `variant="standard"` and `color="error"`. */
36
+ /** Styles applied to the root element if `variant="standard"` and `color="error"`.
37
+ * @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
38
+ * and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
39
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
40
+ */
17
41
  standardError: string;
18
- /** Styles applied to the root element if `variant="outlined"` and `color="success"`. */
42
+ /** Styles applied to the root element if `variant="outlined"` and `color="success"`.
43
+ * @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
44
+ * and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
45
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
46
+ */
19
47
  outlinedSuccess: string;
20
- /** Styles applied to the root element if `variant="outlined"` and `color="info"`. */
48
+ /** Styles applied to the root element if `variant="outlined"` and `color="info"`.
49
+ * @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
50
+ * and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
51
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
52
+ */
21
53
  outlinedInfo: string;
22
- /** Styles applied to the root element if `variant="outlined"` and `color="warning"`. */
54
+ /** Styles applied to the root element if `variant="outlined"` and `color="warning"`.
55
+ * @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
56
+ * and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
57
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
58
+ */
23
59
  outlinedWarning: string;
24
- /** Styles applied to the root element if `variant="outlined"` and `color="error"`. */
60
+ /** Styles applied to the root element if `variant="outlined"` and `color="error"`.
61
+ * @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
62
+ * and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
63
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
64
+ */
25
65
  outlinedError: string;
26
- /** Styles applied to the root element if `variant="filled"` and `color="success"`. */
66
+ /** Styles applied to the root element if `variant="filled"` and `color="success"`.
67
+ * @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
68
+ * and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
69
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
70
+ */
27
71
  filledSuccess: string;
28
- /** Styles applied to the root element if `variant="filled"` and `color="info"`. */
72
+ /** Styles applied to the root element if `variant="filled"` and `color="info"`.
73
+ * @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
74
+ * and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
75
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
76
+ */
29
77
  filledInfo: string;
30
- /** Styles applied to the root element if `variant="filled"` and `color="warning"`. */
78
+ /** Styles applied to the root element if `variant="filled"` and `color="warning"`
79
+ * @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
80
+ * and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
81
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
82
+ */
31
83
  filledWarning: string;
32
- /** Styles applied to the root element if `variant="filled"` and `color="error"`. */
84
+ /** Styles applied to the root element if `variant="filled"` and `color="error"`.
85
+ * @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
86
+ * and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
87
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
88
+ */
33
89
  filledError: string;
34
90
  /** Styles applied to the icon wrapper element. */
35
91
  icon: string;
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
3
3
  export function getAlertUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiAlert', slot);
5
5
  }
6
- const alertClasses = generateUtilityClasses('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
6
+ const alertClasses = generateUtilityClasses('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'colorSuccess', 'colorInfo', 'colorWarning', 'colorError', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
7
7
  export default alertClasses;
@@ -7,11 +7,11 @@ import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import styled from '../styles/styled';
11
- import useThemeProps from '../styles/useThemeProps';
10
+ import { styled, createUseThemeProps } from '../zero-styled';
12
11
  import Typography from '../Typography';
13
12
  import { getAlertTitleUtilityClass } from './alertTitleClasses';
14
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
+ const useThemeProps = createUseThemeProps('MuiAlertTitle');
15
15
  const useUtilityClasses = ownerState => {
16
16
  const {
17
17
  classes
@@ -554,6 +554,63 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
554
554
  const paperSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : componentsProps.paper;
555
555
  const popperSlotProps = (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper;
556
556
  const popupIndicatorSlotProps = (_slotProps$popupIndic = slotProps.popupIndicator) != null ? _slotProps$popupIndic : componentsProps.popupIndicator;
557
+ const renderAutocompletePopperChildren = children => /*#__PURE__*/_jsx(AutocompletePopper, _extends({
558
+ as: PopperComponent,
559
+ disablePortal: disablePortal,
560
+ style: {
561
+ width: anchorEl ? anchorEl.clientWidth : null
562
+ },
563
+ ownerState: ownerState,
564
+ role: "presentation",
565
+ anchorEl: anchorEl,
566
+ open: popupOpen
567
+ }, popperSlotProps, {
568
+ className: clsx(classes.popper, popperSlotProps == null ? void 0 : popperSlotProps.className),
569
+ children: /*#__PURE__*/_jsx(AutocompletePaper, _extends({
570
+ ownerState: ownerState,
571
+ as: PaperComponent
572
+ }, paperSlotProps, {
573
+ className: clsx(classes.paper, paperSlotProps == null ? void 0 : paperSlotProps.className),
574
+ children: children
575
+ }))
576
+ }));
577
+ let autocompletePopper = null;
578
+ if (!loading && groupedOptions.length > 0) {
579
+ autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteListbox, _extends({
580
+ as: ListboxComponent,
581
+ className: classes.listbox,
582
+ ownerState: ownerState
583
+ }, otherListboxProps, ListboxProps, {
584
+ ref: combinedListboxRef,
585
+ children: groupedOptions.map((option, index) => {
586
+ if (groupBy) {
587
+ return renderGroup({
588
+ key: option.key,
589
+ group: option.group,
590
+ children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
591
+ });
592
+ }
593
+ return renderListOption(option, index);
594
+ })
595
+ })));
596
+ } else if (loading && groupedOptions.length === 0) {
597
+ autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteLoading, {
598
+ className: classes.loading,
599
+ ownerState: ownerState,
600
+ children: loadingText
601
+ }));
602
+ } else if (groupedOptions.length === 0 && !freeSolo && !loading) {
603
+ autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteNoOptions, {
604
+ className: classes.noOptions,
605
+ ownerState: ownerState,
606
+ role: "presentation",
607
+ onMouseDown: event => {
608
+ // Prevent input blur when interacting with the "no options" content
609
+ event.preventDefault();
610
+ },
611
+ children: noOptionsText
612
+ }));
613
+ }
557
614
  return /*#__PURE__*/_jsxs(React.Fragment, {
558
615
  children: [/*#__PURE__*/_jsx(AutocompleteRoot, _extends({
559
616
  ref: ref,
@@ -603,55 +660,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
603
660
  readOnly
604
661
  }, getInputProps())
605
662
  })
606
- })), anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, _extends({
607
- as: PopperComponent,
608
- disablePortal: disablePortal,
609
- style: {
610
- width: anchorEl ? anchorEl.clientWidth : null
611
- },
612
- ownerState: ownerState,
613
- role: "presentation",
614
- anchorEl: anchorEl,
615
- open: popupOpen
616
- }, popperSlotProps, {
617
- className: clsx(classes.popper, popperSlotProps == null ? void 0 : popperSlotProps.className),
618
- children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
619
- ownerState: ownerState,
620
- as: PaperComponent
621
- }, paperSlotProps, {
622
- className: clsx(classes.paper, paperSlotProps == null ? void 0 : paperSlotProps.className),
623
- children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
624
- className: classes.loading,
625
- ownerState: ownerState,
626
- children: loadingText
627
- }) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /*#__PURE__*/_jsx(AutocompleteNoOptions, {
628
- className: classes.noOptions,
629
- ownerState: ownerState,
630
- role: "presentation",
631
- onMouseDown: event => {
632
- // Prevent input blur when interacting with the "no options" content
633
- event.preventDefault();
634
- },
635
- children: noOptionsText
636
- }) : null, groupedOptions.length > 0 ? /*#__PURE__*/_jsx(AutocompleteListbox, _extends({
637
- as: ListboxComponent,
638
- className: classes.listbox,
639
- ownerState: ownerState
640
- }, otherListboxProps, ListboxProps, {
641
- ref: combinedListboxRef,
642
- children: groupedOptions.map((option, index) => {
643
- if (groupBy) {
644
- return renderGroup({
645
- key: option.key,
646
- group: option.group,
647
- children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
648
- });
649
- }
650
- return renderListOption(option, index);
651
- })
652
- })) : null]
653
- }))
654
- })) : null]
663
+ })), anchorEl ? autocompletePopper : null]
655
664
  });
656
665
  });
657
666
  process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptypes */ = {
package/Avatar/Avatar.js CHANGED
@@ -7,12 +7,12 @@ import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import styled from '../styles/styled';
11
- import useThemeProps from '../styles/useThemeProps';
10
+ import { styled, createUseThemeProps } from '../zero-styled';
12
11
  import Person from '../internal/svg-icons/Person';
13
12
  import { getAvatarUtilityClass } from './avatarClasses';
14
13
  import useSlot from '../utils/useSlot';
15
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ const useThemeProps = createUseThemeProps('MuiAvatar');
16
16
  const useUtilityClasses = ownerState => {
17
17
  const {
18
18
  classes,
package/Button/Button.js CHANGED
@@ -28,10 +28,10 @@ const useUtilityClasses = ownerState => {
28
28
  classes
29
29
  } = ownerState;
30
30
  const slots = {
31
- root: ['root', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, color === 'inherit' && 'colorInherit', disableElevation && 'disableElevation', fullWidth && 'fullWidth'],
31
+ root: ['root', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth'],
32
32
  label: ['label'],
33
- startIcon: ['startIcon', `iconSize${capitalize(size)}`],
34
- endIcon: ['endIcon', `iconSize${capitalize(size)}`]
33
+ startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],
34
+ endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`]
35
35
  };
36
36
  const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
37
37
  return _extends({}, classes, composedClasses);