@mui/material 5.15.12 → 5.15.14

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 (121) hide show
  1. package/Accordion/Accordion.js +30 -23
  2. package/AccordionActions/AccordionActions.js +14 -12
  3. package/AccordionDetails/AccordionDetails.js +2 -2
  4. package/AccordionSummary/AccordionSummary.js +29 -23
  5. package/Alert/Alert.d.ts +2 -2
  6. package/Autocomplete/Autocomplete.d.ts +1 -1
  7. package/Autocomplete/Autocomplete.js +117 -82
  8. package/Autocomplete/autocompleteClasses.d.ts +3 -3
  9. package/CHANGELOG.md +203 -51
  10. package/CircularProgress/CircularProgress.d.ts +1 -1
  11. package/CircularProgress/CircularProgress.js +1 -1
  12. package/Drawer/Drawer.js +9 -3
  13. package/Icon/Icon.d.ts +1 -1
  14. package/Icon/Icon.js +1 -1
  15. package/LinearProgress/LinearProgress.js +4 -4
  16. package/Menu/Menu.js +5 -4
  17. package/MenuList/MenuList.js +4 -2
  18. package/OverridableComponent.d.ts +1 -1
  19. package/PaginationItem/PaginationItem.js +3 -3
  20. package/Popper/Popper.d.ts +3 -26
  21. package/README.md +2 -2
  22. package/Rating/Rating.js +3 -3
  23. package/Select/Select.d.ts +8 -20
  24. package/Slider/Slider.js +406 -226
  25. package/SvgIcon/SvgIcon.js +1 -1
  26. package/Switch/Switch.js +61 -41
  27. package/TabScrollButton/TabScrollButton.js +2 -3
  28. package/TablePagination/TablePaginationActions.js +14 -14
  29. package/Tabs/Tabs.js +3 -2
  30. package/Tooltip/Tooltip.js +5 -4
  31. package/index.js +1 -1
  32. package/legacy/Accordion/Accordion.js +33 -22
  33. package/legacy/AccordionActions/AccordionActions.js +17 -14
  34. package/legacy/AccordionDetails/AccordionDetails.js +2 -2
  35. package/legacy/AccordionSummary/AccordionSummary.js +31 -22
  36. package/legacy/Autocomplete/Autocomplete.js +194 -164
  37. package/legacy/CircularProgress/CircularProgress.js +1 -1
  38. package/legacy/Drawer/Drawer.js +8 -3
  39. package/legacy/Icon/Icon.js +1 -1
  40. package/legacy/LinearProgress/LinearProgress.js +4 -4
  41. package/legacy/Menu/Menu.js +5 -4
  42. package/legacy/MenuList/MenuList.js +3 -2
  43. package/legacy/PaginationItem/PaginationItem.js +3 -3
  44. package/legacy/Rating/Rating.js +3 -3
  45. package/legacy/Slider/Slider.js +375 -194
  46. package/legacy/SvgIcon/SvgIcon.js +1 -1
  47. package/legacy/Switch/Switch.js +88 -59
  48. package/legacy/TabScrollButton/TabScrollButton.js +2 -3
  49. package/legacy/TablePagination/TablePaginationActions.js +14 -14
  50. package/legacy/Tabs/Tabs.js +3 -2
  51. package/legacy/Tooltip/Tooltip.js +7 -3
  52. package/legacy/index.js +1 -1
  53. package/legacy/styles/experimental_extendTheme.js +4 -1
  54. package/legacy/styles/rootShouldForwardProp.js +5 -0
  55. package/legacy/styles/slotShouldForwardProp.js +5 -0
  56. package/legacy/styles/styled.js +4 -5
  57. package/legacy/usePagination/usePagination.js +1 -1
  58. package/modern/Accordion/Accordion.js +30 -23
  59. package/modern/AccordionActions/AccordionActions.js +14 -12
  60. package/modern/AccordionDetails/AccordionDetails.js +2 -2
  61. package/modern/AccordionSummary/AccordionSummary.js +29 -23
  62. package/modern/Autocomplete/Autocomplete.js +117 -82
  63. package/modern/CircularProgress/CircularProgress.js +1 -1
  64. package/modern/Drawer/Drawer.js +9 -3
  65. package/modern/Icon/Icon.js +1 -1
  66. package/modern/LinearProgress/LinearProgress.js +4 -4
  67. package/modern/Menu/Menu.js +5 -4
  68. package/modern/MenuList/MenuList.js +4 -2
  69. package/modern/PaginationItem/PaginationItem.js +3 -3
  70. package/modern/Rating/Rating.js +3 -3
  71. package/modern/Slider/Slider.js +339 -175
  72. package/modern/SvgIcon/SvgIcon.js +1 -1
  73. package/modern/Switch/Switch.js +61 -41
  74. package/modern/TabScrollButton/TabScrollButton.js +2 -3
  75. package/modern/TablePagination/TablePaginationActions.js +14 -14
  76. package/modern/Tabs/Tabs.js +3 -2
  77. package/modern/Tooltip/Tooltip.js +5 -4
  78. package/modern/index.js +1 -1
  79. package/modern/styles/experimental_extendTheme.js +4 -1
  80. package/modern/styles/rootShouldForwardProp.js +3 -0
  81. package/modern/styles/slotShouldForwardProp.js +5 -0
  82. package/modern/styles/styled.js +4 -3
  83. package/modern/usePagination/usePagination.js +1 -1
  84. package/node/Accordion/Accordion.js +32 -25
  85. package/node/AccordionActions/AccordionActions.js +16 -14
  86. package/node/AccordionDetails/AccordionDetails.js +4 -4
  87. package/node/AccordionSummary/AccordionSummary.js +33 -27
  88. package/node/Autocomplete/Autocomplete.js +129 -94
  89. package/node/CircularProgress/CircularProgress.js +1 -1
  90. package/node/Drawer/Drawer.js +9 -3
  91. package/node/Icon/Icon.js +1 -1
  92. package/node/LinearProgress/LinearProgress.js +4 -4
  93. package/node/Menu/Menu.js +5 -4
  94. package/node/MenuList/MenuList.js +4 -2
  95. package/node/PaginationItem/PaginationItem.js +3 -3
  96. package/node/Rating/Rating.js +3 -3
  97. package/node/Slider/Slider.js +416 -236
  98. package/node/SvgIcon/SvgIcon.js +1 -1
  99. package/node/Switch/Switch.js +66 -46
  100. package/node/TabScrollButton/TabScrollButton.js +2 -3
  101. package/node/TablePagination/TablePaginationActions.js +14 -14
  102. package/node/Tabs/Tabs.js +3 -2
  103. package/node/Tooltip/Tooltip.js +5 -4
  104. package/node/index.js +1 -1
  105. package/node/styles/experimental_extendTheme.js +4 -1
  106. package/node/styles/rootShouldForwardProp.js +10 -0
  107. package/node/styles/slotShouldForwardProp.js +11 -0
  108. package/node/styles/styled.js +17 -8
  109. package/node/usePagination/usePagination.js +1 -1
  110. package/package.json +6 -6
  111. package/styles/experimental_extendTheme.d.ts +1 -0
  112. package/styles/experimental_extendTheme.js +4 -1
  113. package/styles/rootShouldForwardProp.d.ts +2 -0
  114. package/styles/rootShouldForwardProp.js +3 -0
  115. package/styles/slotShouldForwardProp.d.ts +2 -0
  116. package/styles/slotShouldForwardProp.js +5 -0
  117. package/styles/styled.d.ts +2 -3
  118. package/styles/styled.js +4 -3
  119. package/umd/material-ui.development.js +1048 -738
  120. package/umd/material-ui.production.min.js +2 -2
  121. package/usePagination/usePagination.js +1 -1
@@ -44,7 +44,7 @@ const SvgIconRoot = styled('svg', {
44
44
  height: '1em',
45
45
  display: 'inline-block',
46
46
  // the <svg> will define the property that has `currentColor`
47
- // e.g. heroicons uses fill="none" and stroke="currentColor"
47
+ // for example heroicons uses fill="none" and stroke="currentColor"
48
48
  fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
49
49
  flexShrink: 0,
50
50
  transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
package/Switch/Switch.js CHANGED
@@ -12,11 +12,11 @@ import composeClasses from '@mui/utils/composeClasses';
12
12
  import { alpha, darken, lighten } from '@mui/system/colorManipulator';
13
13
  import capitalize from '../utils/capitalize';
14
14
  import SwitchBase from '../internal/SwitchBase';
15
- import useThemeProps from '../styles/useThemeProps';
16
- import styled from '../styles/styled';
15
+ import { styled, createUseThemeProps } from '../zero-styled';
17
16
  import switchClasses, { getSwitchUtilityClass } from './switchClasses';
18
17
  import { jsx as _jsx } from "react/jsx-runtime";
19
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ const useThemeProps = createUseThemeProps('MuiSwitch');
20
20
  const useUtilityClasses = ownerState => {
21
21
  const {
22
22
  classes,
@@ -45,9 +45,7 @@ const SwitchRoot = styled('span', {
45
45
  } = props;
46
46
  return [styles.root, ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];
47
47
  }
48
- })(({
49
- ownerState
50
- }) => _extends({
48
+ })({
51
49
  display: 'inline-flex',
52
50
  width: 34 + 12 * 2,
53
51
  height: 14 + 12 * 2,
@@ -62,26 +60,42 @@ const SwitchRoot = styled('span', {
62
60
  // For correct alignment with the text.
63
61
  '@media print': {
64
62
  colorAdjust: 'exact'
65
- }
66
- }, ownerState.edge === 'start' && {
67
- marginLeft: -8
68
- }, ownerState.edge === 'end' && {
69
- marginRight: -8
70
- }, ownerState.size === 'small' && {
71
- width: 40,
72
- height: 24,
73
- padding: 7,
74
- [`& .${switchClasses.thumb}`]: {
75
- width: 16,
76
- height: 16
77
63
  },
78
- [`& .${switchClasses.switchBase}`]: {
79
- padding: 4,
80
- [`&.${switchClasses.checked}`]: {
81
- transform: 'translateX(16px)'
64
+ variants: [{
65
+ props: {
66
+ edge: 'start'
67
+ },
68
+ style: {
69
+ marginLeft: -8
82
70
  }
83
- }
84
- }));
71
+ }, {
72
+ props: {
73
+ edge: 'end'
74
+ },
75
+ style: {
76
+ marginRight: -8
77
+ }
78
+ }, {
79
+ props: {
80
+ size: 'small'
81
+ },
82
+ style: {
83
+ width: 40,
84
+ height: 24,
85
+ padding: 7,
86
+ [`& .${switchClasses.thumb}`]: {
87
+ width: 16,
88
+ height: 16
89
+ },
90
+ [`& .${switchClasses.switchBase}`]: {
91
+ padding: 4,
92
+ [`&.${switchClasses.checked}`]: {
93
+ transform: 'translateX(16px)'
94
+ }
95
+ }
96
+ }
97
+ }]
98
+ });
85
99
  const SwitchSwitchBase = styled(SwitchBase, {
86
100
  name: 'MuiSwitch',
87
101
  slot: 'SwitchBase',
@@ -122,32 +136,38 @@ const SwitchSwitchBase = styled(SwitchBase, {
122
136
  width: '300%'
123
137
  }
124
138
  }), ({
125
- theme,
126
- ownerState
127
- }) => _extends({
139
+ theme
140
+ }) => ({
128
141
  '&:hover': {
129
142
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
130
143
  // Reset on touch devices, it doesn't add specificity
131
144
  '@media (hover: none)': {
132
145
  backgroundColor: 'transparent'
133
146
  }
134
- }
135
- }, ownerState.color !== 'default' && {
136
- [`&.${switchClasses.checked}`]: {
137
- color: (theme.vars || theme).palette[ownerState.color].main,
138
- '&:hover': {
139
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
140
- '@media (hover: none)': {
141
- backgroundColor: 'transparent'
142
- }
147
+ },
148
+ variants: [...Object.entries(theme.palette).filter(([, value]) => value.main && value.light) // check all the used fields in the style below
149
+ .map(([color]) => ({
150
+ props: {
151
+ color
143
152
  },
144
- [`&.${switchClasses.disabled}`]: {
145
- color: theme.vars ? theme.vars.palette.Switch[`${ownerState.color}DisabledColor`] : `${theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)}`
153
+ style: {
154
+ [`&.${switchClasses.checked}`]: {
155
+ color: (theme.vars || theme).palette[color].main,
156
+ '&:hover': {
157
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity),
158
+ '@media (hover: none)': {
159
+ backgroundColor: 'transparent'
160
+ }
161
+ },
162
+ [`&.${switchClasses.disabled}`]: {
163
+ color: theme.vars ? theme.vars.palette.Switch[`${color}DisabledColor`] : `${theme.palette.mode === 'light' ? lighten(theme.palette[color].main, 0.62) : darken(theme.palette[color].main, 0.55)}`
164
+ }
165
+ },
166
+ [`&.${switchClasses.checked} + .${switchClasses.track}`]: {
167
+ backgroundColor: (theme.vars || theme).palette[color].main
168
+ }
146
169
  }
147
- },
148
- [`&.${switchClasses.checked} + .${switchClasses.track}`]: {
149
- backgroundColor: (theme.vars || theme).palette[ownerState.color].main
150
- }
170
+ }))]
151
171
  }));
152
172
  const SwitchTrack = styled('span', {
153
173
  name: 'MuiSwitch',
@@ -9,10 +9,10 @@ import PropTypes from 'prop-types';
9
9
  import clsx from 'clsx';
10
10
  import { useSlotProps } from '@mui/base/utils';
11
11
  import composeClasses from '@mui/utils/composeClasses';
12
+ import { useRtl } from '@mui/system/RtlProvider';
12
13
  import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
13
14
  import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';
14
15
  import ButtonBase from '../ButtonBase';
15
- import useTheme from '../styles/useTheme';
16
16
  import useThemeProps from '../styles/useThemeProps';
17
17
  import styled from '../styles/styled';
18
18
  import tabScrollButtonClasses, { getTabScrollButtonUtilityClass } from './tabScrollButtonClasses';
@@ -66,8 +66,7 @@ const TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(i
66
66
  direction
67
67
  } = props,
68
68
  other = _objectWithoutPropertiesLoose(props, _excluded);
69
- const theme = useTheme();
70
- const isRtl = theme.direction === 'rtl';
69
+ const isRtl = useRtl();
71
70
  const ownerState = _extends({
72
71
  isRtl
73
72
  }, props);
@@ -5,9 +5,9 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
5
5
  const _excluded = ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slots", "slotProps"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
+ import { useRtl } from '@mui/system/RtlProvider';
8
9
  import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
9
10
  import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';
10
- import useTheme from '../styles/useTheme';
11
11
  import IconButton from '../IconButton';
12
12
  import LastPageIconDefault from '../internal/svg-icons/LastPage';
13
13
  import FirstPageIconDefault from '../internal/svg-icons/FirstPage';
@@ -34,7 +34,7 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
34
34
  slotProps = {}
35
35
  } = props,
36
36
  other = _objectWithoutPropertiesLoose(props, _excluded);
37
- const theme = useTheme();
37
+ const isRtl = useRtl();
38
38
  const handleFirstPageButtonClick = event => {
39
39
  onPageChange(event, 0);
40
40
  };
@@ -55,14 +55,14 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
55
55
  const LastButtonIcon = (_slots$lastButtonIcon = slots.lastButtonIcon) != null ? _slots$lastButtonIcon : LastPageIconDefault;
56
56
  const NextButtonIcon = (_slots$nextButtonIcon = slots.nextButtonIcon) != null ? _slots$nextButtonIcon : KeyboardArrowRight;
57
57
  const PreviousButtonIcon = (_slots$previousButton2 = slots.previousButtonIcon) != null ? _slots$previousButton2 : KeyboardArrowLeft;
58
- const FirstButtonSlot = theme.direction === 'rtl' ? LastButton : FirstButton;
59
- const PreviousButtonSlot = theme.direction === 'rtl' ? NextButton : PreviousButton;
60
- const NextButtonSlot = theme.direction === 'rtl' ? PreviousButton : NextButton;
61
- const LastButtonSlot = theme.direction === 'rtl' ? FirstButton : LastButton;
62
- const firstButtonSlotProps = theme.direction === 'rtl' ? slotProps.lastButton : slotProps.firstButton;
63
- const previousButtonSlotProps = theme.direction === 'rtl' ? slotProps.nextButton : slotProps.previousButton;
64
- const nextButtonSlotProps = theme.direction === 'rtl' ? slotProps.previousButton : slotProps.nextButton;
65
- const lastButtonSlotProps = theme.direction === 'rtl' ? slotProps.firstButton : slotProps.lastButton;
58
+ const FirstButtonSlot = isRtl ? LastButton : FirstButton;
59
+ const PreviousButtonSlot = isRtl ? NextButton : PreviousButton;
60
+ const NextButtonSlot = isRtl ? PreviousButton : NextButton;
61
+ const LastButtonSlot = isRtl ? FirstButton : LastButton;
62
+ const firstButtonSlotProps = isRtl ? slotProps.lastButton : slotProps.firstButton;
63
+ const previousButtonSlotProps = isRtl ? slotProps.nextButton : slotProps.previousButton;
64
+ const nextButtonSlotProps = isRtl ? slotProps.previousButton : slotProps.nextButton;
65
+ const lastButtonSlotProps = isRtl ? slotProps.firstButton : slotProps.lastButton;
66
66
  return /*#__PURE__*/_jsxs("div", _extends({
67
67
  ref: ref
68
68
  }, other, {
@@ -72,7 +72,7 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
72
72
  "aria-label": getItemAriaLabel('first', page),
73
73
  title: getItemAriaLabel('first', page)
74
74
  }, firstButtonSlotProps, {
75
- children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon)) : /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon))
75
+ children: isRtl ? /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon)) : /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon))
76
76
  })), /*#__PURE__*/_jsx(PreviousButtonSlot, _extends({
77
77
  onClick: handleBackButtonClick,
78
78
  disabled: disabled || page === 0,
@@ -80,7 +80,7 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
80
80
  "aria-label": getItemAriaLabel('previous', page),
81
81
  title: getItemAriaLabel('previous', page)
82
82
  }, previousButtonSlotProps != null ? previousButtonSlotProps : backIconButtonProps, {
83
- children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon)) : /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon))
83
+ children: isRtl ? /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon)) : /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon))
84
84
  })), /*#__PURE__*/_jsx(NextButtonSlot, _extends({
85
85
  onClick: handleNextButtonClick,
86
86
  disabled: disabled || (count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false),
@@ -88,14 +88,14 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
88
88
  "aria-label": getItemAriaLabel('next', page),
89
89
  title: getItemAriaLabel('next', page)
90
90
  }, nextButtonSlotProps != null ? nextButtonSlotProps : nextIconButtonProps, {
91
- children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon)) : /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon))
91
+ children: isRtl ? /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon)) : /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon))
92
92
  })), showLastButton && /*#__PURE__*/_jsx(LastButtonSlot, _extends({
93
93
  onClick: handleLastPageButtonClick,
94
94
  disabled: disabled || page >= Math.ceil(count / rowsPerPage) - 1,
95
95
  "aria-label": getItemAriaLabel('last', page),
96
96
  title: getItemAriaLabel('last', page)
97
97
  }, lastButtonSlotProps, {
98
- children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon)) : /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon))
98
+ children: isRtl ? /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon)) : /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon))
99
99
  }))]
100
100
  }));
101
101
  });
package/Tabs/Tabs.js CHANGED
@@ -10,6 +10,7 @@ import clsx from 'clsx';
10
10
  import refType from '@mui/utils/refType';
11
11
  import { useSlotProps } from '@mui/base/utils';
12
12
  import composeClasses from '@mui/utils/composeClasses';
13
+ import { useRtl } from '@mui/system/RtlProvider';
13
14
  import styled from '../styles/styled';
14
15
  import useThemeProps from '../styles/useThemeProps';
15
16
  import useTheme from '../styles/useTheme';
@@ -209,7 +210,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
209
210
  name: 'MuiTabs'
210
211
  });
211
212
  const theme = useTheme();
212
- const isRtl = theme.direction === 'rtl';
213
+ const isRtl = useRtl();
213
214
  const {
214
215
  'aria-label': ariaLabel,
215
216
  'aria-labelledby': ariaLabelledBy,
@@ -297,7 +298,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
297
298
  clientWidth: tabsNode.clientWidth,
298
299
  scrollLeft: tabsNode.scrollLeft,
299
300
  scrollTop: tabsNode.scrollTop,
300
- scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),
301
+ scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, isRtl ? 'rtl' : 'ltr'),
301
302
  scrollWidth: tabsNode.scrollWidth,
302
303
  top: rect.top,
303
304
  bottom: rect.bottom,
@@ -11,6 +11,7 @@ import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
11
11
  import { appendOwnerState } from '@mui/base/utils';
12
12
  import composeClasses from '@mui/utils/composeClasses';
13
13
  import { alpha } from '@mui/system/colorManipulator';
14
+ import { useRtl } from '@mui/system/RtlProvider';
14
15
  import styled from '../styles/styled';
15
16
  import useTheme from '../styles/useTheme';
16
17
  import useThemeProps from '../styles/useThemeProps';
@@ -206,11 +207,11 @@ export function testReset() {
206
207
  hystersisTimer.clear();
207
208
  }
208
209
  function composeEventHandler(handler, eventHandler) {
209
- return event => {
210
+ return (event, ...params) => {
210
211
  if (eventHandler) {
211
- eventHandler(event);
212
+ eventHandler(event, ...params);
212
213
  }
213
- handler(event);
214
+ handler(event, ...params);
214
215
  };
215
216
  }
216
217
 
@@ -257,7 +258,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
257
258
  children: childrenProp
258
259
  });
259
260
  const theme = useTheme();
260
- const isRtl = theme.direction === 'rtl';
261
+ const isRtl = useRtl();
261
262
  const [childNode, setChildNode] = React.useState();
262
263
  const [arrowRef, setArrowRef] = React.useState(null);
263
264
  const ignoreNonTouchEvents = React.useRef(false);
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.12
2
+ * @mui/material v5.15.14
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
4
  import _toArray from "@babel/runtime/helpers/esm/toArray";
4
5
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
6
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
- import _extends from "@babel/runtime/helpers/esm/extends";
7
7
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
8
  import * as React from 'react';
9
9
  import { isFragment } from 'react-is';
@@ -11,8 +11,7 @@ import PropTypes from 'prop-types';
11
11
  import clsx from 'clsx';
12
12
  import chainPropTypes from '@mui/utils/chainPropTypes';
13
13
  import composeClasses from '@mui/utils/composeClasses';
14
- import styled from '../styles/styled';
15
- import useThemeProps from '../styles/useThemeProps';
14
+ import { styled, createUseThemeProps } from '../zero-styled';
16
15
  import Collapse from '../Collapse';
17
16
  import Paper from '../Paper';
18
17
  import AccordionContext from './AccordionContext';
@@ -21,6 +20,7 @@ import useSlot from '../utils/useSlot';
21
20
  import accordionClasses, { getAccordionUtilityClass } from './accordionClasses';
22
21
  import { jsx as _jsx } from "react/jsx-runtime";
23
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ var useThemeProps = createUseThemeProps('MuiAccordion');
24
24
  var useUtilityClasses = function useUtilityClasses(ownerState) {
25
25
  var classes = ownerState.classes,
26
26
  square = ownerState.square,
@@ -85,26 +85,37 @@ var AccordionRoot = styled(Paper, {
85
85
  backgroundColor: (theme.vars || theme).palette.action.disabledBackground
86
86
  });
87
87
  }, function (_ref4) {
88
- var theme = _ref4.theme,
89
- ownerState = _ref4.ownerState;
90
- return _extends({}, !ownerState.square && {
91
- borderRadius: 0,
92
- '&:first-of-type': {
93
- borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
94
- borderTopRightRadius: (theme.vars || theme).shape.borderRadius
95
- },
96
- '&:last-of-type': {
97
- borderBottomLeftRadius: (theme.vars || theme).shape.borderRadius,
98
- borderBottomRightRadius: (theme.vars || theme).shape.borderRadius,
99
- // Fix a rendering issue on Edge
100
- '@supports (-ms-ime-align: auto)': {
101
- borderBottomLeftRadius: 0,
102
- borderBottomRightRadius: 0
88
+ var theme = _ref4.theme;
89
+ return {
90
+ variants: [{
91
+ props: function props(_props) {
92
+ return !_props.square;
93
+ },
94
+ style: {
95
+ borderRadius: 0,
96
+ '&:first-of-type': {
97
+ borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
98
+ borderTopRightRadius: (theme.vars || theme).shape.borderRadius
99
+ },
100
+ '&:last-of-type': {
101
+ borderBottomLeftRadius: (theme.vars || theme).shape.borderRadius,
102
+ borderBottomRightRadius: (theme.vars || theme).shape.borderRadius,
103
+ // Fix a rendering issue on Edge
104
+ '@supports (-ms-ime-align: auto)': {
105
+ borderBottomLeftRadius: 0,
106
+ borderBottomRightRadius: 0
107
+ }
108
+ }
103
109
  }
104
- }
105
- }, !ownerState.disableGutters && _defineProperty({}, "&.".concat(accordionClasses.expanded), {
106
- margin: '16px 0'
107
- }));
110
+ }, {
111
+ props: function props(_props2) {
112
+ return !_props2.disableGutters;
113
+ },
114
+ style: _defineProperty({}, "&.".concat(accordionClasses.expanded), {
115
+ margin: '16px 0'
116
+ })
117
+ }]
118
+ };
108
119
  });
109
120
  var Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref) {
110
121
  var props = useThemeProps({
@@ -1,15 +1,15 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import clsx from 'clsx';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
- import styled from '../styles/styled';
10
- import useThemeProps from '../styles/useThemeProps';
9
+ import { styled, createUseThemeProps } from '../zero-styled';
11
10
  import { getAccordionActionsUtilityClass } from './accordionActionsClasses';
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
+ var useThemeProps = createUseThemeProps('MuiAccordionActions');
13
13
  var useUtilityClasses = function useUtilityClasses(ownerState) {
14
14
  var classes = ownerState.classes,
15
15
  disableSpacing = ownerState.disableSpacing;
@@ -25,18 +25,21 @@ var AccordionActionsRoot = styled('div', {
25
25
  var ownerState = props.ownerState;
26
26
  return [styles.root, !ownerState.disableSpacing && styles.spacing];
27
27
  }
28
- })(function (_ref) {
29
- var ownerState = _ref.ownerState;
30
- return _extends({
31
- display: 'flex',
32
- alignItems: 'center',
33
- padding: 8,
34
- justifyContent: 'flex-end'
35
- }, !ownerState.disableSpacing && {
36
- '& > :not(style) ~ :not(style)': {
37
- marginLeft: 8
28
+ })({
29
+ display: 'flex',
30
+ alignItems: 'center',
31
+ padding: 8,
32
+ justifyContent: 'flex-end',
33
+ variants: [{
34
+ props: function props(_props) {
35
+ return !_props.disableSpacing;
36
+ },
37
+ style: {
38
+ '& > :not(style) ~ :not(style)': {
39
+ marginLeft: 8
40
+ }
38
41
  }
39
- });
42
+ }]
40
43
  });
41
44
  var AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions(inProps, ref) {
42
45
  var props = useThemeProps({
@@ -6,10 +6,10 @@ import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import clsx from 'clsx';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
- import styled from '../styles/styled';
10
- import useThemeProps from '../styles/useThemeProps';
9
+ import { styled, createUseThemeProps } from '../zero-styled';
11
10
  import { getAccordionDetailsUtilityClass } from './accordionDetailsClasses';
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
+ var useThemeProps = createUseThemeProps('MuiAccordionDetails');
13
13
  var useUtilityClasses = function useUtilityClasses(ownerState) {
14
14
  var classes = ownerState.classes;
15
15
  var slots = {
@@ -1,19 +1,19 @@
1
1
  'use client';
2
2
 
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
- import _extends from "@babel/runtime/helpers/esm/extends";
6
6
  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 ButtonBase from '../ButtonBase';
13
12
  import AccordionContext from '../Accordion/AccordionContext';
14
13
  import accordionSummaryClasses, { getAccordionSummaryUtilityClass } from './accordionSummaryClasses';
15
14
  import { jsx as _jsx } from "react/jsx-runtime";
16
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ var useThemeProps = createUseThemeProps('MuiAccordionSummary');
17
17
  var useUtilityClasses = function useUtilityClasses(ownerState) {
18
18
  var classes = ownerState.classes,
19
19
  expanded = ownerState.expanded,
@@ -34,12 +34,11 @@ var AccordionSummaryRoot = styled(ButtonBase, {
34
34
  return styles.root;
35
35
  }
36
36
  })(function (_ref) {
37
- var theme = _ref.theme,
38
- ownerState = _ref.ownerState;
37
+ var theme = _ref.theme;
39
38
  var transition = {
40
39
  duration: theme.transitions.duration.shortest
41
40
  };
42
- return _extends(_defineProperty(_defineProperty(_defineProperty({
41
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty({
43
42
  display: 'flex',
44
43
  minHeight: 48,
45
44
  padding: theme.spacing(0, 2),
@@ -50,9 +49,14 @@ var AccordionSummaryRoot = styled(ButtonBase, {
50
49
  opacity: (theme.vars || theme).palette.action.disabledOpacity
51
50
  }), "&:hover:not(.".concat(accordionSummaryClasses.disabled, ")"), {
52
51
  cursor: 'pointer'
53
- }), !ownerState.disableGutters && _defineProperty({}, "&.".concat(accordionSummaryClasses.expanded), {
54
- minHeight: 64
55
- }));
52
+ }), "variants", [{
53
+ props: function props(_props) {
54
+ return !_props.disableGutters;
55
+ },
56
+ style: _defineProperty({}, "&.".concat(accordionSummaryClasses.expanded), {
57
+ minHeight: 64
58
+ })
59
+ }]);
56
60
  });
57
61
  var AccordionSummaryContent = styled('div', {
58
62
  name: 'MuiAccordionSummary',
@@ -61,19 +65,24 @@ var AccordionSummaryContent = styled('div', {
61
65
  return styles.content;
62
66
  }
63
67
  })(function (_ref3) {
64
- var theme = _ref3.theme,
65
- ownerState = _ref3.ownerState;
66
- return _extends({
68
+ var theme = _ref3.theme;
69
+ return {
67
70
  display: 'flex',
68
71
  flexGrow: 1,
69
- margin: '12px 0'
70
- }, !ownerState.disableGutters && _defineProperty({
71
- transition: theme.transitions.create(['margin'], {
72
- duration: theme.transitions.duration.shortest
73
- })
74
- }, "&.".concat(accordionSummaryClasses.expanded), {
75
- margin: '20px 0'
76
- }));
72
+ margin: '12px 0',
73
+ variants: [{
74
+ props: function props(_props2) {
75
+ return !_props2.disableGutters;
76
+ },
77
+ style: _defineProperty({
78
+ transition: theme.transitions.create(['margin'], {
79
+ duration: theme.transitions.duration.shortest
80
+ })
81
+ }, "&.".concat(accordionSummaryClasses.expanded), {
82
+ margin: '20px 0'
83
+ })
84
+ }]
85
+ };
77
86
  });
78
87
  var AccordionSummaryExpandIconWrapper = styled('div', {
79
88
  name: 'MuiAccordionSummary',
@@ -81,8 +90,8 @@ var AccordionSummaryExpandIconWrapper = styled('div', {
81
90
  overridesResolver: function overridesResolver(props, styles) {
82
91
  return styles.expandIconWrapper;
83
92
  }
84
- })(function (_ref5) {
85
- var theme = _ref5.theme;
93
+ })(function (_ref4) {
94
+ var theme = _ref4.theme;
86
95
  return _defineProperty({
87
96
  display: 'flex',
88
97
  color: (theme.vars || theme).palette.action.active,