@mui/material 5.11.10 → 5.11.11

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 (240) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/Autocomplete.d.ts +3 -1
  9. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  10. package/Avatar/avatarClasses.d.ts +20 -20
  11. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  12. package/Backdrop/backdropClasses.d.ts +10 -10
  13. package/Badge/Badge.js +1 -1
  14. package/Badge/badgeClasses.d.ts +56 -56
  15. package/BottomNavigation/BottomNavigation.js +0 -0
  16. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  17. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  18. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  19. package/Button/buttonClasses.d.ts +100 -100
  20. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  21. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  22. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  23. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  24. package/CHANGELOG.md +89 -0
  25. package/Card/cardClasses.d.ts +8 -8
  26. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  27. package/CardActions/cardActionsClasses.d.ts +10 -10
  28. package/CardContent/cardContentClasses.d.ts +8 -8
  29. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  30. package/CardMedia/cardMediaClasses.d.ts +12 -12
  31. package/Checkbox/checkboxClasses.d.ts +18 -18
  32. package/Chip/chipClasses.d.ts +96 -96
  33. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  34. package/ClickAwayListener/index.d.ts +2 -2
  35. package/Collapse/collapseClasses.d.ts +18 -18
  36. package/Container/Container.js +0 -1
  37. package/Container/containerClasses.d.ts +6 -6
  38. package/Dialog/DialogContext.d.ts +6 -6
  39. package/Dialog/dialogClasses.d.ts +36 -36
  40. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  41. package/DialogContent/dialogContentClasses.d.ts +10 -10
  42. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  43. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  44. package/Divider/dividerClasses.d.ts +34 -34
  45. package/Drawer/drawerClasses.d.ts +30 -30
  46. package/Fab/fabClasses.d.ts +26 -26
  47. package/FilledInput/filledInputClasses.d.ts +40 -40
  48. package/FormControl/FormControlContext.d.ts +17 -17
  49. package/FormControl/formControlClasses.d.ts +14 -14
  50. package/FormControl/useFormControl.d.ts +2 -2
  51. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  52. package/FormGroup/formGroupClasses.d.ts +12 -12
  53. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  54. package/FormLabel/formLabelClasses.d.ts +22 -22
  55. package/Grid/gridClasses.d.ts +48 -48
  56. package/Icon/iconClasses.d.ts +24 -24
  57. package/IconButton/iconButtonClasses.d.ts +34 -34
  58. package/ImageList/imageListClasses.d.ts +16 -16
  59. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  60. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  61. package/Input/inputClasses.d.ts +34 -34
  62. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  63. package/InputBase/InputBase.js +2 -2
  64. package/InputBase/inputBaseClasses.d.ts +46 -46
  65. package/InputLabel/InputLabel.js +3 -1
  66. package/InputLabel/inputLabelClasses.d.ts +32 -32
  67. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  68. package/Link/getTextDecoration.d.ts +15 -15
  69. package/Link/linkClasses.d.ts +18 -18
  70. package/List/listClasses.d.ts +14 -14
  71. package/ListItem/listItemClasses.d.ts +30 -30
  72. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  73. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  74. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  75. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  76. package/ListItemText/listItemTextClasses.d.ts +18 -18
  77. package/ListSubheader/ListSubheader.js +1 -0
  78. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  79. package/Menu/menuClasses.d.ts +12 -12
  80. package/MenuItem/menuItemClasses.d.ts +20 -20
  81. package/MenuList/MenuList.js +7 -0
  82. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  83. package/Modal/Modal.d.ts +9 -1
  84. package/Modal/Modal.js +14 -9
  85. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  86. package/OutlinedInput/OutlinedInput.js +1 -1
  87. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  88. package/Pagination/paginationClasses.d.ts +14 -14
  89. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  90. package/Paper/paperClasses.d.ts +39 -39
  91. package/Popover/popoverClasses.d.ts +10 -10
  92. package/Popper/Popper.d.ts +55 -55
  93. package/README.md +0 -2
  94. package/Radio/radioClasses.d.ts +16 -16
  95. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  96. package/RadioGroup/useRadioGroup.d.ts +4 -4
  97. package/Rating/Rating.js +2 -2
  98. package/Rating/ratingClasses.d.ts +40 -40
  99. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  100. package/Select/SelectInput.js +2 -22
  101. package/Select/selectClasses.d.ts +30 -30
  102. package/Skeleton/skeletonClasses.d.ts +26 -26
  103. package/Slider/Slider.d.ts +5 -1
  104. package/Slider/Slider.js +16 -11
  105. package/Slider/SliderValueLabel.d.ts +15 -15
  106. package/Slider/SliderValueLabel.types.d.ts +24 -24
  107. package/Slider/sliderClasses.d.ts +58 -58
  108. package/Snackbar/Snackbar.js +21 -125
  109. package/Snackbar/snackbarClasses.d.ts +20 -20
  110. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  111. package/SpeedDial/speedDialClasses.d.ts +22 -22
  112. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  113. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  114. package/Stack/Stack.d.ts +0 -1
  115. package/Stack/Stack.js +9 -120
  116. package/Stack/index.d.ts +3 -0
  117. package/Stack/index.js +2 -1
  118. package/Stack/stackClasses.d.ts +6 -0
  119. package/Stack/stackClasses.js +7 -0
  120. package/Step/StepContext.d.ts +20 -20
  121. package/Step/stepClasses.d.ts +16 -16
  122. package/StepButton/stepButtonClasses.d.ts +14 -14
  123. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  124. package/StepContent/stepContentClasses.d.ts +12 -12
  125. package/StepIcon/stepIconClasses.d.ts +16 -16
  126. package/StepLabel/stepLabelClasses.d.ts +28 -28
  127. package/Stepper/StepperContext.d.ts +18 -18
  128. package/Stepper/stepperClasses.d.ts +14 -14
  129. package/SvgIcon/svgIconClasses.d.ts +26 -26
  130. package/Switch/switchClasses.d.ts +32 -32
  131. package/Tab/tabClasses.d.ts +26 -26
  132. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  133. package/Table/tableClasses.d.ts +10 -10
  134. package/TableBody/tableBodyClasses.d.ts +8 -8
  135. package/TableCell/tableCellClasses.d.ts +32 -32
  136. package/TableContainer/tableContainerClasses.d.ts +8 -8
  137. package/TableFooter/tableFooterClasses.d.ts +8 -8
  138. package/TableHead/tableHeadClasses.d.ts +8 -8
  139. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  140. package/TableRow/tableRowClasses.d.ts +16 -16
  141. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  142. package/Tabs/tabsClasses.d.ts +32 -32
  143. package/TextField/textFieldClasses.d.ts +8 -8
  144. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  145. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  146. package/Toolbar/toolbarClasses.d.ts +14 -14
  147. package/Tooltip/tooltipClasses.d.ts +30 -30
  148. package/Typography/typographyClasses.d.ts +50 -50
  149. package/Unstable_Grid2/Grid2.d.ts +4 -4
  150. package/Unstable_Grid2/Grid2.js +2 -3
  151. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  152. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  153. package/Unstable_Grid2/index.d.ts +4 -4
  154. package/className/index.d.ts +1 -1
  155. package/darkScrollbar/index.d.ts +28 -28
  156. package/generateUtilityClass/index.d.ts +2 -2
  157. package/generateUtilityClasses/index.d.ts +1 -1
  158. package/index.js +1 -1
  159. package/internal/switchBaseClasses.d.ts +12 -12
  160. package/legacy/Badge/Badge.js +1 -1
  161. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  162. package/legacy/Container/Container.js +0 -1
  163. package/legacy/InputBase/InputBase.js +2 -2
  164. package/legacy/InputLabel/InputLabel.js +3 -1
  165. package/legacy/ListSubheader/ListSubheader.js +1 -0
  166. package/legacy/MenuList/MenuList.js +7 -0
  167. package/legacy/Modal/Modal.js +14 -9
  168. package/legacy/OutlinedInput/OutlinedInput.js +1 -1
  169. package/legacy/Rating/Rating.js +2 -2
  170. package/legacy/Select/SelectInput.js +2 -22
  171. package/legacy/Slider/Slider.js +16 -12
  172. package/legacy/Snackbar/Snackbar.js +20 -119
  173. package/legacy/Stack/Stack.js +13 -122
  174. package/legacy/Stack/index.js +2 -1
  175. package/legacy/Stack/stackClasses.js +7 -0
  176. package/legacy/Unstable_Grid2/Grid2.js +2 -3
  177. package/legacy/index.js +1 -1
  178. package/legacy/styles/createTheme.js +1 -0
  179. package/legacy/useAutocomplete/useAutocomplete.js +2 -2
  180. package/locale/index.d.ts +75 -75
  181. package/modern/Badge/Badge.js +1 -1
  182. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  183. package/modern/Container/Container.js +0 -1
  184. package/modern/InputBase/InputBase.js +2 -2
  185. package/modern/InputLabel/InputLabel.js +3 -1
  186. package/modern/ListSubheader/ListSubheader.js +1 -0
  187. package/modern/MenuList/MenuList.js +7 -0
  188. package/modern/Modal/Modal.js +14 -9
  189. package/modern/OutlinedInput/OutlinedInput.js +1 -1
  190. package/modern/Rating/Rating.js +2 -2
  191. package/modern/Select/SelectInput.js +2 -18
  192. package/modern/Slider/Slider.js +16 -11
  193. package/modern/Snackbar/Snackbar.js +21 -125
  194. package/modern/Stack/Stack.js +9 -120
  195. package/modern/Stack/index.js +2 -1
  196. package/modern/Stack/stackClasses.js +7 -0
  197. package/modern/Unstable_Grid2/Grid2.js +2 -3
  198. package/modern/index.js +1 -1
  199. package/modern/styles/createTheme.js +1 -0
  200. package/modern/useAutocomplete/useAutocomplete.js +2 -2
  201. package/node/Badge/Badge.js +2 -2
  202. package/node/BottomNavigation/BottomNavigation.js +0 -0
  203. package/node/Container/Container.js +0 -2
  204. package/node/InputBase/InputBase.js +2 -2
  205. package/node/InputLabel/InputLabel.js +3 -1
  206. package/node/ListSubheader/ListSubheader.js +1 -0
  207. package/node/MenuList/MenuList.js +7 -0
  208. package/node/Modal/Modal.js +14 -9
  209. package/node/OutlinedInput/OutlinedInput.js +1 -1
  210. package/node/Rating/Rating.js +2 -2
  211. package/node/Select/SelectInput.js +2 -22
  212. package/node/Slider/Slider.js +19 -14
  213. package/node/Snackbar/Snackbar.js +20 -124
  214. package/node/Stack/Stack.js +9 -122
  215. package/node/Stack/index.js +8 -1
  216. package/node/Stack/stackClasses.js +16 -0
  217. package/node/Unstable_Grid2/Grid2.js +0 -1
  218. package/node/index.js +1 -1
  219. package/node/styles/createTheme.js +1 -0
  220. package/node/useAutocomplete/useAutocomplete.js +8 -6
  221. package/package.json +6 -6
  222. package/styles/CssVarsProvider.d.ts +16 -16
  223. package/styles/createTheme.js +1 -0
  224. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  225. package/styles/getOverlayAlpha.d.ts +2 -2
  226. package/transitions/index.d.ts +1 -1
  227. package/transitions/transition.d.ts +13 -13
  228. package/transitions/utils.d.ts +23 -23
  229. package/types/OverridableComponentAugmentation.d.ts +31 -31
  230. package/umd/material-ui.development.js +4132 -4060
  231. package/umd/material-ui.production.min.js +21 -21
  232. package/useAutocomplete/useAutocomplete.d.ts +2 -2
  233. package/useAutocomplete/useAutocomplete.js +2 -2
  234. package/useMediaQuery/useMediaQuery.d.ts +46 -46
  235. package/useTouchRipple/index.d.ts +1 -1
  236. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  237. package/utils/getScrollbarSize.d.ts +2 -2
  238. package/utils/ownerDocument.d.ts +2 -2
  239. package/utils/ownerWindow.d.ts +2 -2
  240. package/utils/setRef.d.ts +2 -2
@@ -1,130 +1,21 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
- import _typeof from "@babel/runtime/helpers/esm/typeof";
4
- import _extends from "@babel/runtime/helpers/esm/extends";
5
- import * as React from 'react';
6
1
  import PropTypes from 'prop-types';
7
- import { createUnarySpacing, getValue, handleBreakpoints, mergeBreakpointsInOrder, unstable_extendSxProp as extendSxProp, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
8
- import { deepmerge } from '@mui/utils';
2
+ import { createStack } from '@mui/system';
9
3
  import styled from '../styles/styled';
10
- import useThemeProps from '../styles/useThemeProps';
11
-
12
- /**
13
- * Return an array with the separator React element interspersed between
14
- * each React node of the input children.
15
- *
16
- * > joinChildren([1,2,3], 0)
17
- * [1,0,2,0,3]
18
- */
19
- import { jsx as _jsx } from "react/jsx-runtime";
20
- function joinChildren(children, separator) {
21
- var childrenArray = React.Children.toArray(children).filter(Boolean);
22
- return childrenArray.reduce(function (output, child, index) {
23
- output.push(child);
24
- if (index < childrenArray.length - 1) {
25
- output.push( /*#__PURE__*/React.cloneElement(separator, {
26
- key: "separator-".concat(index)
27
- }));
4
+ import _useThemeProps from '../styles/useThemeProps';
5
+ var Stack = createStack({
6
+ createStyledComponent: styled('div', {
7
+ name: 'MuiStack',
8
+ slot: 'Root',
9
+ overridesResolver: function overridesResolver(props, styles) {
10
+ return styles.root;
28
11
  }
29
- return output;
30
- }, []);
31
- }
32
- var getSideFromDirection = function getSideFromDirection(direction) {
33
- return {
34
- row: 'Left',
35
- 'row-reverse': 'Right',
36
- column: 'Top',
37
- 'column-reverse': 'Bottom'
38
- }[direction];
39
- };
40
- export var style = function style(_ref) {
41
- var ownerState = _ref.ownerState,
42
- theme = _ref.theme;
43
- var styles = _extends({
44
- display: 'flex',
45
- flexDirection: 'column'
46
- }, handleBreakpoints({
47
- theme: theme
48
- }, resolveBreakpointValues({
49
- values: ownerState.direction,
50
- breakpoints: theme.breakpoints.values
51
- }), function (propValue) {
52
- return {
53
- flexDirection: propValue
54
- };
55
- }));
56
- if (ownerState.spacing) {
57
- var transformer = createUnarySpacing(theme);
58
- var base = Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {
59
- if (_typeof(ownerState.spacing) === 'object' && ownerState.spacing[breakpoint] != null || _typeof(ownerState.direction) === 'object' && ownerState.direction[breakpoint] != null) {
60
- acc[breakpoint] = true;
61
- }
62
- return acc;
63
- }, {});
64
- var directionValues = resolveBreakpointValues({
65
- values: ownerState.direction,
66
- base: base
12
+ }),
13
+ useThemeProps: function useThemeProps(inProps) {
14
+ return _useThemeProps({
15
+ props: inProps,
16
+ name: 'MuiStack'
67
17
  });
68
- var spacingValues = resolveBreakpointValues({
69
- values: ownerState.spacing,
70
- base: base
71
- });
72
- if (_typeof(directionValues) === 'object') {
73
- Object.keys(directionValues).forEach(function (breakpoint, index, breakpoints) {
74
- var directionValue = directionValues[breakpoint];
75
- if (!directionValue) {
76
- var previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
77
- directionValues[breakpoint] = previousDirectionValue;
78
- }
79
- });
80
- }
81
- var styleFromPropValue = function styleFromPropValue(propValue, breakpoint) {
82
- return {
83
- '& > :not(style) + :not(style)': _defineProperty({
84
- margin: 0
85
- }, "margin".concat(getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)), getValue(transformer, propValue))
86
- };
87
- };
88
- styles = deepmerge(styles, handleBreakpoints({
89
- theme: theme
90
- }, spacingValues, styleFromPropValue));
91
- }
92
- styles = mergeBreakpointsInOrder(theme.breakpoints, styles);
93
- return styles;
94
- };
95
- var StackRoot = styled('div', {
96
- name: 'MuiStack',
97
- slot: 'Root',
98
- overridesResolver: function overridesResolver(props, styles) {
99
- return [styles.root];
100
18
  }
101
- })(style);
102
- var Stack = /*#__PURE__*/React.forwardRef(function Stack(inProps, ref) {
103
- var themeProps = useThemeProps({
104
- props: inProps,
105
- name: 'MuiStack'
106
- });
107
- var props = extendSxProp(themeProps);
108
- var _props$component = props.component,
109
- component = _props$component === void 0 ? 'div' : _props$component,
110
- _props$direction = props.direction,
111
- direction = _props$direction === void 0 ? 'column' : _props$direction,
112
- _props$spacing = props.spacing,
113
- spacing = _props$spacing === void 0 ? 0 : _props$spacing,
114
- divider = props.divider,
115
- children = props.children,
116
- other = _objectWithoutProperties(props, ["component", "direction", "spacing", "divider", "children"]);
117
- var ownerState = {
118
- direction: direction,
119
- spacing: spacing
120
- };
121
- return /*#__PURE__*/_jsx(StackRoot, _extends({
122
- as: component,
123
- ownerState: ownerState,
124
- ref: ref
125
- }, other, {
126
- children: divider ? joinChildren(children, divider) : children
127
- }));
128
19
  });
129
20
  process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
130
21
  // ----------------------------- Warning --------------------------------
@@ -1 +1,2 @@
1
- export { default } from './Stack';
1
+ export { default } from './Stack';
2
+ export { default as stackClasses } from './stackClasses';
@@ -0,0 +1,7 @@
1
+ import { unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
2
+ import generateUtilityClass from '../generateUtilityClass';
3
+ export function getStackUtilityClass(slot) {
4
+ return generateUtilityClass('MuiStack', slot);
5
+ }
6
+ var stackClasses = generateUtilityClasses('MuiStack', ['root']);
7
+ export default stackClasses;
@@ -1,7 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
- import { createGrid } from '@mui/system/Unstable_Grid';
2
+ import { createGrid as createGrid2 } from '@mui/system/Unstable_Grid';
3
3
  import { styled, useThemeProps as _useThemeProps } from '../styles';
4
- var Grid2 = createGrid({
4
+ var Grid2 = createGrid2({
5
5
  createStyledComponent: styled('div', {
6
6
  name: 'MuiGrid2',
7
7
  overridesResolver: function overridesResolver(props, styles) {
@@ -9,7 +9,6 @@ var Grid2 = createGrid({
9
9
  }
10
10
  }),
11
11
  componentName: 'MuiGrid2',
12
- // eslint-disable-next-line material-ui/mui-name-matches-component-name
13
12
  useThemeProps: function useThemeProps(inProps) {
14
13
  return _useThemeProps({
15
14
  props: inProps,
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.11.10
2
+ * @mui/material v5.11.11
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -47,6 +47,7 @@ function createTheme() {
47
47
  return deepmerge(acc, argument);
48
48
  }, muiTheme);
49
49
  if (process.env.NODE_ENV !== 'production') {
50
+ // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.
50
51
  var stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];
51
52
  var traverse = function traverse(node, component) {
52
53
  var key;
@@ -1,2 +1,2 @@
1
- export { useAutocomplete as default } from '@mui/base/AutocompleteUnstyled';
2
- export * from '@mui/base/AutocompleteUnstyled';
1
+ export { default } from '@mui/base/useAutocomplete';
2
+ export * from '@mui/base/useAutocomplete';
package/locale/index.d.ts CHANGED
@@ -1,75 +1,75 @@
1
- import { ComponentsPropsList } from '../styles/props';
2
- export interface Localization {
3
- components?: {
4
- MuiAlert?: {
5
- defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
- };
7
- MuiBreadcrumbs?: {
8
- defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
- };
10
- MuiTablePagination?: {
11
- defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
- };
13
- MuiRating?: {
14
- defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
- };
16
- MuiAutocomplete?: {
17
- defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
- };
19
- MuiPagination?: {
20
- defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
- };
22
- };
23
- }
24
- export declare const amET: Localization;
25
- export declare const arEG: Localization;
26
- export declare const arSA: Localization;
27
- export declare const arSD: Localization;
28
- export declare const azAZ: Localization;
29
- export declare const bnBD: Localization;
30
- export declare const beBY: Localization;
31
- export declare const bgBG: Localization;
32
- export declare const caES: Localization;
33
- export declare const csCZ: Localization;
34
- export declare const daDK: Localization;
35
- export declare const deDE: Localization;
36
- export declare const elGR: Localization;
37
- export declare const enUS: Localization;
38
- export declare const esES: Localization;
39
- export declare const etEE: Localization;
40
- export declare const faIR: Localization;
41
- export declare const fiFI: Localization;
42
- export declare const frFR: Localization;
43
- export declare const heIL: Localization;
44
- export declare const hiIN: Localization;
45
- export declare const hrHR: Localization;
46
- export declare const huHU: Localization;
47
- export declare const hyAM: Localization;
48
- export declare const idID: Localization;
49
- export declare const isIS: Localization;
50
- export declare const itIT: Localization;
51
- export declare const jaJP: Localization;
52
- export declare const khKH: Localization;
53
- export declare const koKR: Localization;
54
- export declare const kuLatn: Localization;
55
- export declare const kkKZ: Localization;
56
- export declare const mkMK: Localization;
57
- export declare const nbNO: Localization;
58
- export declare const nlNL: Localization;
59
- export declare const plPL: Localization;
60
- export declare const ptBR: Localization;
61
- export declare const ptPT: Localization;
62
- export declare const roRO: Localization;
63
- export declare const srRS: Localization;
64
- export declare const ruRU: Localization;
65
- export declare const siLK: Localization;
66
- export declare const skSK: Localization;
67
- export declare const svSE: Localization;
68
- export declare const thTH: Localization;
69
- export declare const trTR: Localization;
70
- export declare const ukUA: Localization;
71
- export declare const urPK: Localization;
72
- export declare const viVN: Localization;
73
- export declare const zhCN: Localization;
74
- export declare const zhHK: Localization;
75
- export declare const zhTW: Localization;
1
+ import { ComponentsPropsList } from '../styles/props';
2
+ export interface Localization {
3
+ components?: {
4
+ MuiAlert?: {
5
+ defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
+ };
7
+ MuiBreadcrumbs?: {
8
+ defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
+ };
10
+ MuiTablePagination?: {
11
+ defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
+ };
13
+ MuiRating?: {
14
+ defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
+ };
16
+ MuiAutocomplete?: {
17
+ defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
+ };
19
+ MuiPagination?: {
20
+ defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
+ };
22
+ };
23
+ }
24
+ export declare const amET: Localization;
25
+ export declare const arEG: Localization;
26
+ export declare const arSA: Localization;
27
+ export declare const arSD: Localization;
28
+ export declare const azAZ: Localization;
29
+ export declare const bnBD: Localization;
30
+ export declare const beBY: Localization;
31
+ export declare const bgBG: Localization;
32
+ export declare const caES: Localization;
33
+ export declare const csCZ: Localization;
34
+ export declare const daDK: Localization;
35
+ export declare const deDE: Localization;
36
+ export declare const elGR: Localization;
37
+ export declare const enUS: Localization;
38
+ export declare const esES: Localization;
39
+ export declare const etEE: Localization;
40
+ export declare const faIR: Localization;
41
+ export declare const fiFI: Localization;
42
+ export declare const frFR: Localization;
43
+ export declare const heIL: Localization;
44
+ export declare const hiIN: Localization;
45
+ export declare const hrHR: Localization;
46
+ export declare const huHU: Localization;
47
+ export declare const hyAM: Localization;
48
+ export declare const idID: Localization;
49
+ export declare const isIS: Localization;
50
+ export declare const itIT: Localization;
51
+ export declare const jaJP: Localization;
52
+ export declare const khKH: Localization;
53
+ export declare const koKR: Localization;
54
+ export declare const kuLatn: Localization;
55
+ export declare const kkKZ: Localization;
56
+ export declare const mkMK: Localization;
57
+ export declare const nbNO: Localization;
58
+ export declare const nlNL: Localization;
59
+ export declare const plPL: Localization;
60
+ export declare const ptBR: Localization;
61
+ export declare const ptPT: Localization;
62
+ export declare const roRO: Localization;
63
+ export declare const srRS: Localization;
64
+ export declare const ruRU: Localization;
65
+ export declare const siLK: Localization;
66
+ export declare const skSK: Localization;
67
+ export declare const svSE: Localization;
68
+ export declare const thTH: Localization;
69
+ export declare const trTR: Localization;
70
+ export declare const ukUA: Localization;
71
+ export declare const urPK: Localization;
72
+ export declare const viVN: Localization;
73
+ export declare const zhCN: Localization;
74
+ export declare const zhHK: Localization;
75
+ export declare const zhTW: Localization;
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { usePreviousProps } from '@mui/utils';
8
8
  import composeClasses from '@mui/base/composeClasses';
9
- import { useBadge } from '@mui/base/BadgeUnstyled';
9
+ import useBadge from '@mui/base/useBadge';
10
10
  import { useSlotProps } from '@mui/base';
11
11
  import styled from '../styles/styled';
12
12
  import useThemeProps from '../styles/useThemeProps';
File without changes
@@ -1,4 +1,3 @@
1
- /* eslint-disable material-ui/mui-name-matches-component-name */
2
1
  import PropTypes from 'prop-types';
3
2
  import { createContainer } from '@mui/system';
4
3
  import capitalize from '../utils/capitalize';
@@ -435,7 +435,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
435
435
  ref: ref,
436
436
  onClick: handleClick
437
437
  }, other, {
438
- className: clsx(classes.root, rootProps.className, className),
438
+ className: clsx(classes.root, rootProps.className, className, readOnly && 'MuiInputBase-readOnly'),
439
439
  children: [startAdornment, /*#__PURE__*/_jsx(FormControlContext.Provider, {
440
440
  value: null,
441
441
  children: /*#__PURE__*/_jsx(Input, _extends({
@@ -462,7 +462,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
462
462
  ownerState: _extends({}, ownerState, inputProps.ownerState)
463
463
  }, {
464
464
  ref: handleInputRef,
465
- className: clsx(classes.input, inputProps.className),
465
+ className: clsx(classes.input, inputProps.className, readOnly && 'MuiInputBase-readOnly'),
466
466
  onBlur: handleBlur,
467
467
  onChange: handleChange,
468
468
  onFocus: handleFocus
@@ -98,7 +98,9 @@ const InputLabelRoot = styled(FormLabel, {
98
98
  }, ownerState.shrink && {
99
99
  userSelect: 'none',
100
100
  pointerEvents: 'auto',
101
- maxWidth: 'calc(133% - 24px)',
101
+ // Theoretically, we should have (8+5)*2/0.75 = 34px
102
+ // but it feels a better when it bleeds a bit on the left, so 32px.
103
+ maxWidth: 'calc(133% - 32px)',
102
104
  transform: 'translate(14px, -9px) scale(0.75)'
103
105
  })));
104
106
  const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {
@@ -87,6 +87,7 @@ const ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inPro
87
87
  ownerState: ownerState
88
88
  }, other));
89
89
  });
90
+ ListSubheader.muiSkipListHighlight = true;
90
91
  process.env.NODE_ENV !== "production" ? ListSubheader.propTypes /* remove-proptypes */ = {
91
92
  // ----------------------------- Warning --------------------------------
92
93
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -194,6 +194,13 @@ const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {
194
194
  activeItemIndex = index;
195
195
  }
196
196
  }
197
+ if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {
198
+ activeItemIndex += 1;
199
+ if (activeItemIndex >= children.length) {
200
+ // there are no focusable items within the list.
201
+ activeItemIndex = -1;
202
+ }
203
+ }
197
204
  });
198
205
  const items = React.Children.map(children, (child, index) => {
199
206
  if (index === activeItemIndex) {
@@ -1,8 +1,9 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "slotProps", "slots", "theme"];
3
+ const _excluded = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "slotProps", "slots", "theme"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
+ import clsx from 'clsx';
6
7
  import ModalUnstyled, { modalUnstyledClasses } from '@mui/base/ModalUnstyled';
7
8
  import { isHostComponent, resolveComponentProps } from '@mui/base/utils';
8
9
  import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
@@ -11,9 +12,6 @@ import useThemeProps from '../styles/useThemeProps';
11
12
  import Backdrop from '../Backdrop';
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  export const modalClasses = modalUnstyledClasses;
14
- const extendUtilityClasses = ownerState => {
15
- return ownerState.classes;
16
- };
17
15
  const ModalRoot = styled('div', {
18
16
  name: 'MuiModal',
19
17
  slot: 'Root',
@@ -67,6 +65,8 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
67
65
  const {
68
66
  BackdropComponent = ModalBackdrop,
69
67
  BackdropProps,
68
+ classes,
69
+ className,
70
70
  closeAfterTransition = false,
71
71
  children,
72
72
  component,
@@ -101,7 +101,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
101
101
  const ownerState = _extends({}, props, commonProps, {
102
102
  exited
103
103
  });
104
- const classes = extendUtilityClasses(ownerState);
105
104
  const RootSlot = slots?.root ?? components.Root ?? ModalRoot;
106
105
  const BackdropSlot = slots?.backdrop ?? components.Backdrop ?? BackdropComponent;
107
106
  const rootSlotProps = slotProps?.root ?? componentsProps.root;
@@ -115,15 +114,17 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
115
114
  root: () => _extends({}, resolveComponentProps(rootSlotProps, ownerState), !isHostComponent(RootSlot) && {
116
115
  as: component,
117
116
  theme
117
+ }, {
118
+ className: clsx(className, rootSlotProps?.className, classes?.root, !ownerState.open && ownerState.exited && classes?.hidden)
118
119
  }),
119
- backdrop: () => _extends({}, BackdropProps, resolveComponentProps(backdropSlotProps, ownerState))
120
+ backdrop: () => _extends({}, BackdropProps, resolveComponentProps(backdropSlotProps, ownerState), {
121
+ className: clsx(backdropSlotProps?.className, classes?.backdrop)
122
+ })
120
123
  },
121
124
  onTransitionEnter: () => setExited(false),
122
125
  onTransitionExited: () => setExited(true),
123
126
  ref: ref
124
- }, other, {
125
- classes: classes
126
- }, commonProps, {
127
+ }, other, commonProps, {
127
128
  children: children
128
129
  }));
129
130
  });
@@ -160,6 +161,10 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
160
161
  * Override or extend the styles applied to the component.
161
162
  */
162
163
  classes: PropTypes.object,
164
+ /**
165
+ * @ignore
166
+ */
167
+ className: PropTypes.string,
163
168
  /**
164
169
  * When set to true the Modal waits until a nested Transition is completed before closing.
165
170
  * @default false
@@ -163,7 +163,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
163
163
  ownerState: ownerState,
164
164
  className: classes.notchedOutline,
165
165
  label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
166
- children: [label, "\xA0", '*']
166
+ children: [label, "\u2009", '*']
167
167
  })) : label,
168
168
  notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
169
169
  }),
@@ -46,7 +46,7 @@ const useUtilityClasses = ownerState => {
46
46
  focusVisible
47
47
  } = ownerState;
48
48
  const slots = {
49
- root: ['root', `size${capitalize(size)}`, disabled && 'disabled', focusVisible && 'focusVisible', readOnly && 'readyOnly'],
49
+ root: ['root', `size${capitalize(size)}`, disabled && 'disabled', focusVisible && 'focusVisible', readOnly && 'readOnly'],
50
50
  label: ['label', 'pristine'],
51
51
  labelEmptyValue: [emptyValueFocused && 'labelEmptyValueActive'],
52
52
  icon: ['icon'],
@@ -444,7 +444,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
444
444
  ref: handleRef,
445
445
  onMouseMove: handleMouseMove,
446
446
  onMouseLeave: handleMouseLeave,
447
- className: clsx(classes.root, className),
447
+ className: clsx(classes.root, className, readOnly && 'MuiRating-readOnly'),
448
448
  ownerState: ownerState,
449
449
  role: readOnly ? 'img' : null,
450
450
  "aria-label": readOnly ? getLabelText(value) : null
@@ -329,7 +329,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
329
329
  computeDisplay = true;
330
330
  }
331
331
  }
332
- const items = childrenArray.map((child, index, arr) => {
332
+ const items = childrenArray.map(child => {
333
333
  if (! /*#__PURE__*/React.isValidElement(child)) {
334
334
  return null;
335
335
  }
@@ -356,22 +356,6 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
356
356
  if (selected) {
357
357
  foundMatch = true;
358
358
  }
359
- if (child.props.value === undefined) {
360
- return /*#__PURE__*/React.cloneElement(child, {
361
- 'aria-readonly': true,
362
- role: 'option'
363
- });
364
- }
365
- const isFirstSelectableElement = () => {
366
- if (value) {
367
- return selected;
368
- }
369
- const firstSelectableElement = arr.find(item => item?.props?.value !== undefined && item.props.disabled !== true);
370
- if (child === firstSelectableElement) {
371
- return true;
372
- }
373
- return selected;
374
- };
375
359
  return /*#__PURE__*/React.cloneElement(child, {
376
360
  'aria-selected': selected ? 'true' : 'false',
377
361
  onClick: handleItemClick(child),
@@ -387,7 +371,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
387
371
  }
388
372
  },
389
373
  role: 'option',
390
- selected: arr[0]?.props?.value === undefined || arr[0]?.props?.disabled === true ? isFirstSelectableElement() : selected,
374
+ selected,
391
375
  value: undefined,
392
376
  // The value is most likely not a valid HTML attribute.
393
377
  'data-value': child.props.value // Instead, we provide it as a data attribute.
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { chainPropTypes } from '@mui/utils';
8
8
  import { isHostComponent, useSlotProps, unstable_composeClasses as composeClasses } from '@mui/base';
9
- import { useSlider } from '@mui/base/SliderUnstyled';
9
+ import useSlider, { valueToPercent } from '@mui/base/useSlider';
10
10
  import { alpha, lighten, darken } from '@mui/system';
11
11
  import useThemeProps from '../styles/useThemeProps';
12
12
  import styled, { slotShouldForwardProp } from '../styles/styled';
@@ -17,7 +17,6 @@ import SliderValueLabel from './SliderValueLabel';
17
17
  import sliderClasses, { getSliderUtilityClass } from './sliderClasses';
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
- const valueToPercent = (value, min, max) => (value - min) * 100 / (max - min);
21
20
  function Identity(x) {
22
21
  return x;
23
22
  }
@@ -457,7 +456,6 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
457
456
  componentsProps = {},
458
457
  color = 'primary',
459
458
  classes: classesProp,
460
- // eslint-disable-next-line react/prop-types
461
459
  className,
462
460
  disableSwap = false,
463
461
  disabled = false,
@@ -564,7 +562,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
564
562
  elementType: ThumbSlot,
565
563
  getSlotProps: getThumbProps,
566
564
  externalSlotProps: thumbSlotProps,
567
- ownerState: _extends({}, ownerState, thumbSlotProps?.ownerState)
565
+ ownerState: _extends({}, ownerState, thumbSlotProps?.ownerState),
566
+ className: classes.thumb
568
567
  });
569
568
  const valueLabelProps = useSlotProps({
570
569
  elementType: ValueLabelSlot,
@@ -581,7 +580,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
581
580
  const markLabelProps = useSlotProps({
582
581
  elementType: MarkLabelSlot,
583
582
  externalSlotProps: markLabelSlotProps,
584
- ownerState
583
+ ownerState,
584
+ className: classes.markLabel
585
585
  });
586
586
  const inputSliderProps = useSlotProps({
587
587
  elementType: InputSlot,
@@ -622,8 +622,10 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
622
622
  const percent = valueToPercent(value, min, max);
623
623
  const style = axisProps[axis].offset(percent);
624
624
  const ValueLabelComponent = valueLabelDisplay === 'off' ? Forward : ValueLabelSlot;
625
- return /*#__PURE__*/_jsx(React.Fragment, {
626
- children: /*#__PURE__*/_jsx(ValueLabelComponent, _extends({}, !isHostComponent(ValueLabelComponent) && {
625
+ return (
626
+ /*#__PURE__*/
627
+ /* TODO v6: Change component structure. It will help in avoiding the complicated React.cloneElement API added in SliderValueLabel component. Should be: Thumb -> Input, ValueLabel. Follow Joy UI's Slider structure. */
628
+ _jsx(ValueLabelComponent, _extends({}, !isHostComponent(ValueLabelComponent) && {
627
629
  valueLabelFormat,
628
630
  valueLabelDisplay,
629
631
  value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,
@@ -632,8 +634,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
632
634
  disabled
633
635
  }, valueLabelProps, {
634
636
  children: /*#__PURE__*/_jsx(ThumbSlot, _extends({
635
- "data-index": index,
636
- "data-focusvisible": focusedThumbIndex === index
637
+ "data-index": index
637
638
  }, thumbProps, {
638
639
  className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
639
640
  style: _extends({}, style, {
@@ -648,8 +649,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
648
649
  value: values[index]
649
650
  }, inputSliderProps))
650
651
  }))
651
- }))
652
- }, index);
652
+ }), index)
653
+ );
653
654
  })]
654
655
  }));
655
656
  });
@@ -690,6 +691,10 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
690
691
  * Override or extend the styles applied to the component.
691
692
  */
692
693
  classes: PropTypes.object,
694
+ /**
695
+ * @ignore
696
+ */
697
+ className: PropTypes.string,
693
698
  /**
694
699
  * The color of the component.
695
700
  * It supports both default and custom theme colors, which can be added as shown in the