@mui/material 5.10.7 → 5.10.9

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 (63) hide show
  1. package/ButtonBase/ButtonBase.js +1 -2
  2. package/CHANGELOG.md +117 -0
  3. package/CssBaseline/CssBaseline.js +15 -3
  4. package/Fab/Fab.js +5 -2
  5. package/Fade/Fade.js +1 -2
  6. package/FormControlLabel/FormControlLabel.d.ts +1 -1
  7. package/Grow/Grow.js +1 -2
  8. package/InputBase/InputBase.js +1 -3
  9. package/Popover/Popover.js +1 -0
  10. package/Rating/Rating.js +1 -2
  11. package/ScopedCssBaseline/ScopedCssBaseline.js +13 -1
  12. package/Slide/Slide.js +1 -2
  13. package/Tooltip/Tooltip.js +1 -3
  14. package/Unstable_TrapFocus/index.d.ts +1 -1
  15. package/Zoom/Zoom.js +1 -2
  16. package/esm/ButtonBase/ButtonBase.js +1 -2
  17. package/esm/CssBaseline/CssBaseline.js +16 -3
  18. package/esm/Fab/Fab.js +5 -2
  19. package/esm/Fade/Fade.js +1 -2
  20. package/esm/Grow/Grow.js +1 -2
  21. package/esm/InputBase/InputBase.js +1 -3
  22. package/esm/Popover/Popover.js +1 -0
  23. package/esm/Rating/Rating.js +1 -2
  24. package/esm/ScopedCssBaseline/ScopedCssBaseline.js +13 -1
  25. package/esm/Slide/Slide.js +1 -2
  26. package/esm/Tooltip/Tooltip.js +1 -3
  27. package/esm/Zoom/Zoom.js +1 -2
  28. package/esm/locale/index.js +81 -1
  29. package/index.js +1 -1
  30. package/legacy/ButtonBase/ButtonBase.js +1 -2
  31. package/legacy/CssBaseline/CssBaseline.js +21 -3
  32. package/legacy/Fab/Fab.js +7 -2
  33. package/legacy/Fade/Fade.js +1 -2
  34. package/legacy/Grow/Grow.js +1 -2
  35. package/legacy/InputBase/InputBase.js +1 -3
  36. package/legacy/Popover/Popover.js +1 -0
  37. package/legacy/Rating/Rating.js +1 -2
  38. package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +18 -1
  39. package/legacy/Slide/Slide.js +1 -2
  40. package/legacy/Tooltip/Tooltip.js +1 -3
  41. package/legacy/Zoom/Zoom.js +1 -2
  42. package/legacy/index.js +1 -1
  43. package/legacy/locale/index.js +224 -141
  44. package/locale/index.d.ts +1 -0
  45. package/locale/index.js +83 -2
  46. package/modern/ButtonBase/ButtonBase.js +1 -2
  47. package/modern/CssBaseline/CssBaseline.js +14 -3
  48. package/modern/Fab/Fab.js +5 -2
  49. package/modern/Fade/Fade.js +1 -2
  50. package/modern/Grow/Grow.js +1 -2
  51. package/modern/InputBase/InputBase.js +1 -3
  52. package/modern/Popover/Popover.js +1 -0
  53. package/modern/Rating/Rating.js +1 -2
  54. package/modern/ScopedCssBaseline/ScopedCssBaseline.js +11 -1
  55. package/modern/Slide/Slide.js +1 -2
  56. package/modern/Tooltip/Tooltip.js +1 -3
  57. package/modern/Zoom/Zoom.js +1 -2
  58. package/modern/index.js +1 -1
  59. package/modern/locale/index.js +81 -1
  60. package/package.json +5 -5
  61. package/styles/experimental_extendTheme.d.ts +1 -1
  62. package/umd/material-ui.development.js +116 -85
  63. package/umd/material-ui.production.min.js +20 -20
@@ -321,8 +321,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
321
321
  }
322
322
  }
323
323
 
324
- const handleOwnRef = (0, _useForkRef.default)(focusVisibleRef, buttonRef);
325
- const handleRef = (0, _useForkRef.default)(ref, handleOwnRef);
324
+ const handleRef = (0, _useForkRef.default)(ref, focusVisibleRef, buttonRef);
326
325
 
327
326
  if (process.env.NODE_ENV !== 'production') {
328
327
  // eslint-disable-next-line react-hooks/rules-of-hooks
package/CHANGELOG.md CHANGED
@@ -1,5 +1,122 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.10.9
4
+
5
+ <!-- generated comparing v5.10.8..master -->
6
+
7
+ _Oct 10, 2022_
8
+
9
+ A big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🚀 [Joy] Button loading functionality has been added by @kushagra010 (#34658)
12
+ - And more 🐛 bug fixes and 📚 documentation improvements.
13
+
14
+ ### `@mui/material@5.10.9`
15
+
16
+ - &#8203;<!-- 16 -->[Grid v2][system] Handle direction object prop for responsive design (#34574) @vanyaxk
17
+ - &#8203;<!-- 03 -->[Slider] Fix unnecessary accessibility attribute in root element (#34610) @vanyaxk
18
+
19
+ ### `@mui/system@5.10.9`
20
+
21
+ #### BREAKING CHANGE
22
+
23
+ - &#8203;<!-- 17 -->[system] Fix color-scheme implementation (#34639) @siriwatknp
24
+
25
+ The `enableColorScheme` prop has been removed from `CssVarsProvider` and `getInitColorScheme` (both Material UI and Joy UI).
26
+
27
+ Migration:
28
+
29
+ - **Material UI**: you can enable the CSS color scheme via `<CssBaseline enableColorScheme />`.
30
+ - **Joy UI**: it is enabled automatically if you use `<CssBaseline />`, [see the docs](https://mui.com/joy-ui/react-css-baseline/).
31
+
32
+ #### Changes
33
+
34
+ - &#8203;<!-- 02 -->[system] Fix typo in createCssVarsProvider (#34661) @HexM7
35
+
36
+ ### `@mui/base@5.0.0-alpha.101`
37
+
38
+ - &#8203;<!-- 01 -->[TrapFocus] Restore the previously exported type from @mui/material (#34601) @michaldudak
39
+
40
+ ### `@mui/joy@5.0.0-alpha.49`
41
+
42
+ - &#8203;<!-- 04 -->[Joy] Add button loading functionality (#34658) @kushagra010
43
+
44
+ ### Docs
45
+
46
+ - &#8203;<!-- 18 -->[docs] Revert #34541 (#34700) @michaldudak
47
+ - &#8203;<!-- 15 -->[blog] Blog post for MUI X v6 alpha zero (#34424) @joserodolfofreitas
48
+ - &#8203;<!-- 09 -->[docs] Improve Joy UI tutorial demo (#34653) @oliviertassinari
49
+ - &#8203;<!-- 08 -->[docs] Explain how SelectUnstyled renders a hidden input (#34638) @michaldudak
50
+ - &#8203;<!-- 07 -->[docs] Fix Taiwan description (#34611) @oliviertassinari
51
+ - &#8203;<!-- 06 -->[docs] Fix codesandbox export with dayjs (#34619) @oliviertassinari
52
+ - &#8203;<!-- 05 -->[docs] Explain the purpose of renderGroup prop (#34066) @michaldudak
53
+
54
+ ### Core
55
+
56
+ - &#8203;<!-- 14 -->[core] Make useForkRef variadic (#27939) @michaldudak
57
+ - &#8203;<!-- 13 -->[core] Speedup of yarn install in the CI (#34632) @oliviertassinari
58
+ - &#8203;<!-- 12 -->[core] Fix markdown loader on Windows (#34623) @michaldudak
59
+ - &#8203;<!-- 11 -->[core] Update changelog for version v5.10.8 (#34593) @mnajdova
60
+ - &#8203;<!-- 10 -->[core] Update root package.json version (#34592) @mnajdova
61
+
62
+ All contributors of this release in alphabetical order: @HexM7, @joserodolfofreitas, @kushagra010, @michaldudak, @mnajdova, @oliviertassinari, @vanyaxk
63
+
64
+ ## 5.10.8
65
+
66
+ <!-- generated comparing v5.10.7..master -->
67
+
68
+ _Oct 3, 2022_
69
+
70
+ A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
71
+
72
+ - 🚀 [SnackbarUnstyled](https://mui.com/base/react-snackbar/) component & headless hook are added to MUI Base (#33227) @ZeeshanTamboli
73
+ - 📚 [CSS variables documentation](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/) for Material UI has been added by @siriwatknp (#33958)
74
+ - And more 🐛 bug fixes and 📚 documentation improvements.
75
+
76
+ ### `@mui/material@5.10.8`
77
+
78
+ - &#8203;<!-- 28 -->[Autocomplete] Skip filtering when list of options is loading (#33278) @ndebeiss
79
+ - &#8203;<!-- 13 -->[Fab] Add `disabled` class to FAB button (#34245) @meenarama
80
+ - &#8203;<!-- 09 -->[l10n] Add Arabic Saudi Arabia (ar-SA) locale (#33340) @rolule
81
+ - &#8203;<!-- 08 -->[l10n] zhTW refinement (#33391) @Aporim2051
82
+ - &#8203;<!-- 07 -->[Popover] Add `ownerState` on the paper slot (#34445) @kabernardes
83
+ - &#8203;<!-- 05 -->[Slider] Fixed incorrect marks displayed due to duplicate keys in range (#33526) @kskd1804
84
+ - &#8203;<!-- 03 -->[TextField] Fix typo in FormControlLabel declaration file (#34535) @hghmn
85
+
86
+ ### `@mui/base@5.0.0-alpha.100`
87
+
88
+ - &#8203;<!-- 04 -->[SnackbarUnstyled] Create component and `useSnackbar` hook (#33227) @ZeeshanTamboli
89
+
90
+ ### `@mui/joy@5.0.0-alpha.48`
91
+
92
+ - &#8203;<!-- 12 -->[Joy] Fix `variantPlain` classname missing in few components (#34534) @hbjORbj
93
+ - &#8203;<!-- 11 -->[Joy] Fix input decorator color and list padding (#34586) @siriwatknp
94
+ - &#8203;<!-- 10 -->[Joy] Miscellaneous fixes (#34492) @siriwatknp
95
+
96
+ ### Docs
97
+
98
+ - &#8203;<!-- 27 -->[blog] Fix 404 link in base introduction @oliviertassinari
99
+ - &#8203;<!-- 21 -->[docs] Fix CI build (#34589) @mnajdova
100
+ - &#8203;<!-- 20 -->[docs] Temporary remove date picker from home page (#34541) @siriwatknp
101
+ - &#8203;<!-- 19 -->[docs] Revise and expand Joy UI "Tutorial" doc (#34569) @samuelsycamore
102
+ - &#8203;<!-- 18 -->[docs] Fix SEO issues (#34537) @oliviertassinari
103
+ - &#8203;<!-- 17 -->[docs] Add CSS variables documentation for Material UI (#33958) @siriwatknp
104
+ - &#8203;<!-- 16 -->[docs] Capitalize Material Design on the Breakpoints page (#34481) @Dustin-Digitar
105
+ - &#8203;<!-- 15 -->[docs] Able to load doc components inside markdown files (#34243) @flaviendelangle
106
+ - &#8203;<!-- 14 -->[docs] Use mouse pointer on esc button in the search modal (#34485) @minkyngkm
107
+ - &#8203;<!-- 02 -->[website] Fix typo in pricing FAQ @oliviertassinari
108
+ - &#8203;<!-- 01 -->[website] Move the React Engineer role from open to next (#34494) @mnajdova
109
+
110
+ ### Core
111
+
112
+ - &#8203;<!-- 26 -->[core] Update root package.json version (#34592) @mnajdova
113
+ - &#8203;<!-- 25 -->[core] Remove useless comment in fixtures (#34581) @Garz4
114
+ - &#8203;<!-- 24 -->[core] Fix link to CODE_OF_CONDUCT.md (#34543) @peippo
115
+ - &#8203;<!-- 23 -->[core] Remove outdated docsearch.js dependency (#34421) @oliviertassinari
116
+ - &#8203;<!-- 22 -->[core] Add `newFeature` to the typing of MuiPage (#34511) @flaviendelangle
117
+
118
+ All contributors of this release in alphabetical order: @Aporim2051, @Dustin-Digitar, @flaviendelangle, @Garz4, @hbjORbj, @hghmn, @kabernardes, @kskd1804, @meenarama, @minkyngkm, @mnajdova, @ndebeiss, @oliviertassinari, @peippo, @rolule, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
119
+
3
120
  ## 5.10.7
4
121
 
5
122
  <!-- generated comparing v5.10.6..master -->
@@ -33,7 +33,7 @@ const html = (theme, enableColorScheme) => (0, _extends2.default)({
33
33
  boxSizing: 'border-box',
34
34
  // Fix font resize problem in iOS
35
35
  WebkitTextSizeAdjust: '100%'
36
- }, enableColorScheme && {
36
+ }, enableColorScheme && !theme.vars && {
37
37
  colorScheme: theme.palette.mode
38
38
  });
39
39
 
@@ -54,7 +54,19 @@ exports.body = body;
54
54
  const styles = (theme, enableColorScheme = false) => {
55
55
  var _theme$components, _theme$components$Mui;
56
56
 
57
- let defaultStyles = {
57
+ const colorSchemeStyles = {};
58
+
59
+ if (enableColorScheme && theme.colorSchemes) {
60
+ Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
61
+ var _scheme$palette;
62
+
63
+ colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\s*&/, '')] = {
64
+ colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
65
+ };
66
+ });
67
+ }
68
+
69
+ let defaultStyles = (0, _extends2.default)({
58
70
  html: html(theme, enableColorScheme),
59
71
  '*, *::before, *::after': {
60
72
  boxSizing: 'inherit'
@@ -71,7 +83,7 @@ const styles = (theme, enableColorScheme = false) => {
71
83
  backgroundColor: (theme.vars || theme).palette.background.default
72
84
  }
73
85
  })
74
- };
86
+ }, colorSchemeStyles);
75
87
  const themeOverrides = (_theme$components = theme.components) == null ? void 0 : (_theme$components$Mui = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components$Mui.styleOverrides;
76
88
 
77
89
  if (themeOverrides) {
package/Fab/Fab.js CHANGED
@@ -27,7 +27,7 @@ var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
27
27
 
28
28
  var _fabClasses = _interopRequireWildcard(require("./fabClasses"));
29
29
 
30
- var _styled = _interopRequireDefault(require("../styles/styled"));
30
+ var _styled = _interopRequireWildcard(require("../styles/styled"));
31
31
 
32
32
  var _jsxRuntime = require("react/jsx-runtime");
33
33
 
@@ -47,12 +47,14 @@ const useUtilityClasses = ownerState => {
47
47
  const slots = {
48
48
  root: ['root', variant, `size${(0, _capitalize.default)(size)}`, color === 'inherit' ? 'colorInherit' : color]
49
49
  };
50
- return (0, _base.unstable_composeClasses)(slots, _fabClasses.getFabUtilityClass, classes);
50
+ const composedClasses = (0, _base.unstable_composeClasses)(slots, _fabClasses.getFabUtilityClass, classes);
51
+ return (0, _extends2.default)({}, classes, composedClasses);
51
52
  };
52
53
 
53
54
  const FabRoot = (0, _styled.default)(_ButtonBase.default, {
54
55
  name: 'MuiFab',
55
56
  slot: 'Root',
57
+ shouldForwardProp: prop => (0, _styled.rootShouldForwardProp)(prop) || prop === 'classes',
56
58
  overridesResolver: (props, styles) => {
57
59
  const {
58
60
  ownerState
@@ -175,6 +177,7 @@ const Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {
175
177
  ownerState: ownerState,
176
178
  ref: ref
177
179
  }, other, {
180
+ classes: classes,
178
181
  children: children
179
182
  }));
180
183
  });
package/Fade/Fade.js CHANGED
@@ -72,8 +72,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
72
72
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
73
73
  const enableStrictModeCompat = true;
74
74
  const nodeRef = React.useRef(null);
75
- const foreignRef = (0, _useForkRef.default)(children.ref, ref);
76
- const handleRef = (0, _useForkRef.default)(nodeRef, foreignRef);
75
+ const handleRef = (0, _useForkRef.default)(nodeRef, children.ref, ref);
77
76
 
78
77
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
79
78
  if (callback) {
@@ -21,7 +21,7 @@ export interface FormControlLabelProps
21
21
  componentsProps?: {
22
22
  /**
23
23
  * Props applied to the Typography wrapper of the passed label.
24
- * This is unused if disableTpography is true.
24
+ * This is unused if disableTypography is true.
25
25
  * @default {}
26
26
  */
27
27
  typography?: TypographyProps;
package/Grow/Grow.js CHANGED
@@ -82,8 +82,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
82
82
  const autoTimeout = React.useRef();
83
83
  const theme = (0, _useTheme.default)();
84
84
  const nodeRef = React.useRef(null);
85
- const foreignRef = (0, _useForkRef.default)(children.ref, ref);
86
- const handleRef = (0, _useForkRef.default)(nodeRef, foreignRef);
85
+ const handleRef = (0, _useForkRef.default)(nodeRef, children.ref, ref);
87
86
 
88
87
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
89
88
  if (callback) {
@@ -300,9 +300,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
300
300
  }
301
301
  }
302
302
  }, []);
303
- const handleInputPropsRefProp = (0, _useForkRef.default)(inputPropsProp.ref, handleInputRefWarning);
304
- const handleInputRefProp = (0, _useForkRef.default)(inputRefProp, handleInputPropsRefProp);
305
- const handleInputRef = (0, _useForkRef.default)(inputRef, handleInputRefProp);
303
+ const handleInputRef = (0, _useForkRef.default)(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);
306
304
  const [focused, setFocused] = React.useState(false);
307
305
  const muiFormControl = (0, _useFormControl.default)();
308
306
 
@@ -352,6 +352,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
352
352
  }, PaperProps, {
353
353
  ref: handlePaperRef,
354
354
  className: (0, _clsx.default)(classes.paper, PaperProps.className),
355
+ ownerState: ownerState,
355
356
  children: children
356
357
  }))
357
358
  }))
package/Rating/Rating.js CHANGED
@@ -371,8 +371,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
371
371
  } = (0, _utils2.useIsFocusVisible)();
372
372
  const [focusVisible, setFocusVisible] = React.useState(false);
373
373
  const rootRef = React.useRef();
374
- const handleFocusRef = (0, _utils2.useForkRef)(focusVisibleRef, rootRef);
375
- const handleRef = (0, _utils2.useForkRef)(handleFocusRef, ref);
374
+ const handleRef = (0, _utils2.useForkRef)(focusVisibleRef, rootRef, ref);
376
375
 
377
376
  const handleMouseMove = event => {
378
377
  if (onMouseMove) {
@@ -53,6 +53,18 @@ const ScopedCssBaselineRoot = (0, _styled.default)('div', {
53
53
  theme,
54
54
  ownerState
55
55
  }) => {
56
+ const colorSchemeStyles = {};
57
+
58
+ if (ownerState.enableColorScheme && theme.colorSchemes) {
59
+ Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
60
+ var _scheme$palette;
61
+
62
+ colorSchemeStyles[`&${theme.getColorSchemeSelector(key).replace(/\s*&/, '')}`] = {
63
+ colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
64
+ };
65
+ });
66
+ }
67
+
56
68
  return (0, _extends2.default)({}, (0, _CssBaseline.html)(theme, ownerState.enableColorScheme), (0, _CssBaseline.body)(theme), {
57
69
  '& *, & *::before, & *::after': {
58
70
  boxSizing: 'inherit'
@@ -60,7 +72,7 @@ const ScopedCssBaselineRoot = (0, _styled.default)('div', {
60
72
  '& strong, & b': {
61
73
  fontWeight: theme.typography.fontWeightBold
62
74
  }
63
- });
75
+ }, colorSchemeStyles);
64
76
  });
65
77
  const ScopedCssBaseline = /*#__PURE__*/React.forwardRef(function ScopedCssBaseline(inProps, ref) {
66
78
  const props = (0, _useThemeProps.default)({
package/Slide/Slide.js CHANGED
@@ -144,8 +144,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
144
144
  } = props,
145
145
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
146
146
  const childrenRef = React.useRef(null);
147
- const handleRefIntermediary = (0, _useForkRef.default)(children.ref, childrenRef);
148
- const handleRef = (0, _useForkRef.default)(handleRefIntermediary, ref);
147
+ const handleRef = (0, _useForkRef.default)(children.ref, childrenRef, ref);
149
148
 
150
149
  const normalizedTransitionCallback = callback => isAppearing => {
151
150
  if (callback) {
@@ -494,9 +494,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
494
494
  document.removeEventListener('keydown', handleKeyDown);
495
495
  };
496
496
  }, [handleClose, open]);
497
- const handleUseRef = (0, _useForkRef.default)(setChildNode, ref);
498
- const handleFocusRef = (0, _useForkRef.default)(focusVisibleRef, handleUseRef);
499
- const handleRef = (0, _useForkRef.default)(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
497
+ const handleRef = (0, _useForkRef.default)(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
500
498
 
501
499
  if (typeof title !== 'number' && !title) {
502
500
  open = false;
@@ -1,2 +1,2 @@
1
1
  export { default } from '@mui/base/FocusTrap';
2
- export * from '@mui/base/FocusTrap';
2
+ export { FocusTrapProps as TrapFocusProps } from '@mui/base/FocusTrap';
package/Zoom/Zoom.js CHANGED
@@ -72,8 +72,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
72
72
  } = props,
73
73
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
74
74
  const nodeRef = React.useRef(null);
75
- const foreignRef = (0, _useForkRef.default)(children.ref, ref);
76
- const handleRef = (0, _useForkRef.default)(nodeRef, foreignRef);
75
+ const handleRef = (0, _useForkRef.default)(nodeRef, children.ref, ref);
77
76
 
78
77
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
79
78
  if (callback) {
@@ -295,8 +295,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
295
295
  }
296
296
  }
297
297
 
298
- const handleOwnRef = useForkRef(focusVisibleRef, buttonRef);
299
- const handleRef = useForkRef(ref, handleOwnRef);
298
+ const handleRef = useForkRef(ref, focusVisibleRef, buttonRef);
300
299
 
301
300
  if (process.env.NODE_ENV !== 'production') {
302
301
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -15,7 +15,7 @@ export const html = (theme, enableColorScheme) => _extends({
15
15
  boxSizing: 'border-box',
16
16
  // Fix font resize problem in iOS
17
17
  WebkitTextSizeAdjust: '100%'
18
- }, enableColorScheme && {
18
+ }, enableColorScheme && !theme.vars && {
19
19
  colorScheme: theme.palette.mode
20
20
  });
21
21
  export const body = theme => _extends({
@@ -30,7 +30,19 @@ export const body = theme => _extends({
30
30
  export const styles = (theme, enableColorScheme = false) => {
31
31
  var _theme$components, _theme$components$Mui;
32
32
 
33
- let defaultStyles = {
33
+ const colorSchemeStyles = {};
34
+
35
+ if (enableColorScheme && theme.colorSchemes) {
36
+ Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
37
+ var _scheme$palette;
38
+
39
+ colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\s*&/, '')] = {
40
+ colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
41
+ };
42
+ });
43
+ }
44
+
45
+ let defaultStyles = _extends({
34
46
  html: html(theme, enableColorScheme),
35
47
  '*, *::before, *::after': {
36
48
  boxSizing: 'inherit'
@@ -47,7 +59,8 @@ export const styles = (theme, enableColorScheme = false) => {
47
59
  backgroundColor: (theme.vars || theme).palette.background.default
48
60
  }
49
61
  })
50
- };
62
+ }, colorSchemeStyles);
63
+
51
64
  const themeOverrides = (_theme$components = theme.components) == null ? void 0 : (_theme$components$Mui = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components$Mui.styleOverrides;
52
65
 
53
66
  if (themeOverrides) {
package/esm/Fab/Fab.js CHANGED
@@ -9,7 +9,7 @@ import ButtonBase from '../ButtonBase';
9
9
  import capitalize from '../utils/capitalize';
10
10
  import useThemeProps from '../styles/useThemeProps';
11
11
  import fabClasses, { getFabUtilityClass } from './fabClasses';
12
- import styled from '../styles/styled';
12
+ import styled, { rootShouldForwardProp } from '../styles/styled';
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
 
15
15
  const useUtilityClasses = ownerState => {
@@ -22,12 +22,14 @@ const useUtilityClasses = ownerState => {
22
22
  const slots = {
23
23
  root: ['root', variant, `size${capitalize(size)}`, color === 'inherit' ? 'colorInherit' : color]
24
24
  };
25
- return composeClasses(slots, getFabUtilityClass, classes);
25
+ const composedClasses = composeClasses(slots, getFabUtilityClass, classes);
26
+ return _extends({}, classes, composedClasses);
26
27
  };
27
28
 
28
29
  const FabRoot = styled(ButtonBase, {
29
30
  name: 'MuiFab',
30
31
  slot: 'Root',
32
+ shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
31
33
  overridesResolver: (props, styles) => {
32
34
  const {
33
35
  ownerState
@@ -153,6 +155,7 @@ const Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {
153
155
  ownerState: ownerState,
154
156
  ref: ref
155
157
  }, other, {
158
+ classes: classes,
156
159
  children: children
157
160
  }));
158
161
  });
package/esm/Fade/Fade.js CHANGED
@@ -50,8 +50,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
50
50
 
51
51
  const enableStrictModeCompat = true;
52
52
  const nodeRef = React.useRef(null);
53
- const foreignRef = useForkRef(children.ref, ref);
54
- const handleRef = useForkRef(nodeRef, foreignRef);
53
+ const handleRef = useForkRef(nodeRef, children.ref, ref);
55
54
 
56
55
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
57
56
  if (callback) {
package/esm/Grow/Grow.js CHANGED
@@ -60,8 +60,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
60
60
  const autoTimeout = React.useRef();
61
61
  const theme = useTheme();
62
62
  const nodeRef = React.useRef(null);
63
- const foreignRef = useForkRef(children.ref, ref);
64
- const handleRef = useForkRef(nodeRef, foreignRef);
63
+ const handleRef = useForkRef(nodeRef, children.ref, ref);
65
64
 
66
65
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
67
66
  if (callback) {
@@ -268,9 +268,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
268
268
  }
269
269
  }
270
270
  }, []);
271
- const handleInputPropsRefProp = useForkRef(inputPropsProp.ref, handleInputRefWarning);
272
- const handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);
273
- const handleInputRef = useForkRef(inputRef, handleInputRefProp);
271
+ const handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);
274
272
  const [focused, setFocused] = React.useState(false);
275
273
  const muiFormControl = useFormControl();
276
274
 
@@ -321,6 +321,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
321
321
  }, PaperProps, {
322
322
  ref: handlePaperRef,
323
323
  className: clsx(classes.paper, PaperProps.className),
324
+ ownerState: ownerState,
324
325
  children: children
325
326
  }))
326
327
  }))
@@ -350,8 +350,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
350
350
  } = useIsFocusVisible();
351
351
  const [focusVisible, setFocusVisible] = React.useState(false);
352
352
  const rootRef = React.useRef();
353
- const handleFocusRef = useForkRef(focusVisibleRef, rootRef);
354
- const handleRef = useForkRef(handleFocusRef, ref);
353
+ const handleRef = useForkRef(focusVisibleRef, rootRef, ref);
355
354
 
356
355
  const handleMouseMove = event => {
357
356
  if (onMouseMove) {
@@ -29,6 +29,18 @@ const ScopedCssBaselineRoot = styled('div', {
29
29
  theme,
30
30
  ownerState
31
31
  }) => {
32
+ const colorSchemeStyles = {};
33
+
34
+ if (ownerState.enableColorScheme && theme.colorSchemes) {
35
+ Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
36
+ var _scheme$palette;
37
+
38
+ colorSchemeStyles[`&${theme.getColorSchemeSelector(key).replace(/\s*&/, '')}`] = {
39
+ colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
40
+ };
41
+ });
42
+ }
43
+
32
44
  return _extends({}, html(theme, ownerState.enableColorScheme), body(theme), {
33
45
  '& *, & *::before, & *::after': {
34
46
  boxSizing: 'inherit'
@@ -36,7 +48,7 @@ const ScopedCssBaselineRoot = styled('div', {
36
48
  '& strong, & b': {
37
49
  fontWeight: theme.typography.fontWeightBold
38
50
  }
39
- });
51
+ }, colorSchemeStyles);
40
52
  });
41
53
  const ScopedCssBaseline = /*#__PURE__*/React.forwardRef(function ScopedCssBaseline(inProps, ref) {
42
54
  const props = useThemeProps({
@@ -119,8 +119,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
119
119
  other = _objectWithoutPropertiesLoose(props, _excluded);
120
120
 
121
121
  const childrenRef = React.useRef(null);
122
- const handleRefIntermediary = useForkRef(children.ref, childrenRef);
123
- const handleRef = useForkRef(handleRefIntermediary, ref);
122
+ const handleRef = useForkRef(children.ref, childrenRef, ref);
124
123
 
125
124
  const normalizedTransitionCallback = callback => isAppearing => {
126
125
  if (callback) {
@@ -461,9 +461,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
461
461
  document.removeEventListener('keydown', handleKeyDown);
462
462
  };
463
463
  }, [handleClose, open]);
464
- const handleUseRef = useForkRef(setChildNode, ref);
465
- const handleFocusRef = useForkRef(focusVisibleRef, handleUseRef);
466
- const handleRef = useForkRef(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
464
+ const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
467
465
 
468
466
  if (typeof title !== 'number' && !title) {
469
467
  open = false;
package/esm/Zoom/Zoom.js CHANGED
@@ -50,8 +50,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
50
50
  other = _objectWithoutPropertiesLoose(props, _excluded);
51
51
 
52
52
  const nodeRef = React.useRef(null);
53
- const foreignRef = useForkRef(children.ref, ref);
54
- const handleRef = useForkRef(nodeRef, foreignRef);
53
+ const handleRef = useForkRef(nodeRef, children.ref, ref);
55
54
 
56
55
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
57
56
  if (callback) {
@@ -158,6 +158,86 @@ export const arEG = {
158
158
  }
159
159
  }
160
160
  };
161
+ export const arSA = {
162
+ components: {
163
+ MuiBreadcrumbs: {
164
+ defaultProps: {
165
+ expandText: 'إظهار المسار'
166
+ }
167
+ },
168
+ MuiTablePagination: {
169
+ defaultProps: {
170
+ getItemAriaLabel: type => {
171
+ if (type === 'first') {
172
+ return 'الانتقال إلى الصفحة الأولى';
173
+ }
174
+
175
+ if (type === 'last') {
176
+ return 'الانتقال إلى الصفحة الأخيرة';
177
+ }
178
+
179
+ if (type === 'next') {
180
+ return 'الانتقال إلى الصفحة التالية';
181
+ } // if (type === 'previous') {
182
+
183
+
184
+ return 'الانتقال إلى الصفحة السابقة';
185
+ },
186
+ labelRowsPerPage: 'عدد الصفوف في الصفحة:',
187
+ labelDisplayedRows: ({
188
+ from,
189
+ to,
190
+ count
191
+ }) => `${from}–${to} من ${count !== -1 ? count : ` أكثر من${to}`}`
192
+ }
193
+ },
194
+ MuiRating: {
195
+ defaultProps: {
196
+ getLabelText: value => `${value} ${value !== 1 ? 'نجوم' : 'نجمة'}`,
197
+ emptyLabelText: 'فارغ'
198
+ }
199
+ },
200
+ MuiAutocomplete: {
201
+ defaultProps: {
202
+ clearText: 'مسح',
203
+ closeText: 'إغلاق',
204
+ loadingText: 'جار التحميل...',
205
+ noOptionsText: 'لا توجد خيارات',
206
+ openText: 'فتح'
207
+ }
208
+ },
209
+ MuiAlert: {
210
+ defaultProps: {
211
+ closeText: 'إغلاق'
212
+ }
213
+ },
214
+ MuiPagination: {
215
+ defaultProps: {
216
+ 'aria-label': 'التنقل عبر الصفحات',
217
+ getItemAriaLabel: (type, page, selected) => {
218
+ if (type === 'page') {
219
+ return `${selected ? '' : 'الانتقال إلى '} صفحة ${page}`;
220
+ }
221
+
222
+ if (type === 'first') {
223
+ return 'الانتقال إلى الصفحة الأولى';
224
+ }
225
+
226
+ if (type === 'last') {
227
+ return 'الانتقال الي الصفحة الأخيرة';
228
+ }
229
+
230
+ if (type === 'next') {
231
+ return 'الانتقال إلى الصفحة التالية';
232
+ } // if (type === 'previous') {
233
+
234
+
235
+ return 'الانتقال إلى الصفحة السابقة';
236
+ }
237
+ }
238
+ }
239
+ }
240
+ };
161
241
  export const arSD = {
162
242
  components: {
163
243
  MuiBreadcrumbs: {
@@ -3752,7 +3832,7 @@ export const zhTW = {
3752
3832
 
3753
3833
  return '上一頁';
3754
3834
  },
3755
- labelRowsPerPage: '每行行數:',
3835
+ labelRowsPerPage: '每頁行數:',
3756
3836
  labelDisplayedRows: ({
3757
3837
  from,
3758
3838
  to,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.10.7
1
+ /** @license MUI v5.10.9
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -313,8 +313,7 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref)
313
313
  }
314
314
  }
315
315
 
316
- var handleOwnRef = useForkRef(focusVisibleRef, buttonRef);
317
- var handleRef = useForkRef(ref, handleOwnRef);
316
+ var handleRef = useForkRef(ref, focusVisibleRef, buttonRef);
318
317
 
319
318
  if (process.env.NODE_ENV !== 'production') {
320
319
  // eslint-disable-next-line react-hooks/rules-of-hooks