@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
package/locale/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.zhTW = exports.zhHK = exports.zhCN = exports.viVN = exports.ukUA = exports.trTR = exports.thTH = exports.svSE = exports.srRS = exports.skSK = exports.siLK = exports.ruRU = exports.roRO = exports.ptPT = exports.ptBR = exports.plPL = exports.nlNL = exports.nbNO = exports.mkMK = exports.kzKZ = exports.koKR = exports.khKH = exports.jaJP = exports.itIT = exports.isIS = exports.idID = exports.hyAM = exports.huHU = exports.hrHR = exports.hiIN = exports.heIL = exports.frFR = exports.fiFI = exports.faIR = exports.etEE = exports.esES = exports.enUS = exports.elGR = exports.deDE = exports.daDK = exports.csCZ = exports.caES = exports.bnBD = exports.bgBG = exports.azAZ = exports.arSD = exports.arEG = exports.amET = void 0;
6
+ exports.zhTW = exports.zhHK = exports.zhCN = exports.viVN = exports.ukUA = exports.trTR = exports.thTH = exports.svSE = exports.srRS = exports.skSK = exports.siLK = exports.ruRU = exports.roRO = exports.ptPT = exports.ptBR = exports.plPL = exports.nlNL = exports.nbNO = exports.mkMK = exports.kzKZ = exports.koKR = exports.khKH = exports.jaJP = exports.itIT = exports.isIS = exports.idID = exports.hyAM = exports.huHU = exports.hrHR = exports.hiIN = exports.heIL = exports.frFR = exports.fiFI = exports.faIR = exports.etEE = exports.esES = exports.enUS = exports.elGR = exports.deDE = exports.daDK = exports.csCZ = exports.caES = exports.bnBD = exports.bgBG = exports.azAZ = exports.arSD = exports.arSA = exports.arEG = exports.amET = void 0;
7
7
  const amET = {
8
8
  components: {
9
9
  MuiBreadcrumbs: {
@@ -166,6 +166,87 @@ const arEG = {
166
166
  }
167
167
  };
168
168
  exports.arEG = arEG;
169
+ const arSA = {
170
+ components: {
171
+ MuiBreadcrumbs: {
172
+ defaultProps: {
173
+ expandText: 'إظهار المسار'
174
+ }
175
+ },
176
+ MuiTablePagination: {
177
+ defaultProps: {
178
+ getItemAriaLabel: type => {
179
+ if (type === 'first') {
180
+ return 'الانتقال إلى الصفحة الأولى';
181
+ }
182
+
183
+ if (type === 'last') {
184
+ return 'الانتقال إلى الصفحة الأخيرة';
185
+ }
186
+
187
+ if (type === 'next') {
188
+ return 'الانتقال إلى الصفحة التالية';
189
+ } // if (type === 'previous') {
190
+
191
+
192
+ return 'الانتقال إلى الصفحة السابقة';
193
+ },
194
+ labelRowsPerPage: 'عدد الصفوف في الصفحة:',
195
+ labelDisplayedRows: ({
196
+ from,
197
+ to,
198
+ count
199
+ }) => `${from}–${to} من ${count !== -1 ? count : ` أكثر من${to}`}`
200
+ }
201
+ },
202
+ MuiRating: {
203
+ defaultProps: {
204
+ getLabelText: value => `${value} ${value !== 1 ? 'نجوم' : 'نجمة'}`,
205
+ emptyLabelText: 'فارغ'
206
+ }
207
+ },
208
+ MuiAutocomplete: {
209
+ defaultProps: {
210
+ clearText: 'مسح',
211
+ closeText: 'إغلاق',
212
+ loadingText: 'جار التحميل...',
213
+ noOptionsText: 'لا توجد خيارات',
214
+ openText: 'فتح'
215
+ }
216
+ },
217
+ MuiAlert: {
218
+ defaultProps: {
219
+ closeText: 'إغلاق'
220
+ }
221
+ },
222
+ MuiPagination: {
223
+ defaultProps: {
224
+ 'aria-label': 'التنقل عبر الصفحات',
225
+ getItemAriaLabel: (type, page, selected) => {
226
+ if (type === 'page') {
227
+ return `${selected ? '' : 'الانتقال إلى '} صفحة ${page}`;
228
+ }
229
+
230
+ if (type === 'first') {
231
+ return 'الانتقال إلى الصفحة الأولى';
232
+ }
233
+
234
+ if (type === 'last') {
235
+ return 'الانتقال الي الصفحة الأخيرة';
236
+ }
237
+
238
+ if (type === 'next') {
239
+ return 'الانتقال إلى الصفحة التالية';
240
+ } // if (type === 'previous') {
241
+
242
+
243
+ return 'الانتقال إلى الصفحة السابقة';
244
+ }
245
+ }
246
+ }
247
+ }
248
+ };
249
+ exports.arSA = arSA;
169
250
  const arSD = {
170
251
  components: {
171
252
  MuiBreadcrumbs: {
@@ -3805,7 +3886,7 @@ const zhTW = {
3805
3886
 
3806
3887
  return '上一頁';
3807
3888
  },
3808
- labelRowsPerPage: '每行行數:',
3889
+ labelRowsPerPage: '每頁行數:',
3809
3890
  labelDisplayedRows: ({
3810
3891
  from,
3811
3892
  to,
@@ -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({
@@ -28,7 +28,17 @@ export const body = theme => _extends({
28
28
  }
29
29
  });
30
30
  export const styles = (theme, enableColorScheme = false) => {
31
- let defaultStyles = {
31
+ const colorSchemeStyles = {};
32
+
33
+ if (enableColorScheme && theme.colorSchemes) {
34
+ Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
35
+ colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\s*&/, '')] = {
36
+ colorScheme: scheme.palette?.mode
37
+ };
38
+ });
39
+ }
40
+
41
+ let defaultStyles = _extends({
32
42
  html: html(theme, enableColorScheme),
33
43
  '*, *::before, *::after': {
34
44
  boxSizing: 'inherit'
@@ -45,7 +55,8 @@ export const styles = (theme, enableColorScheme = false) => {
45
55
  backgroundColor: (theme.vars || theme).palette.background.default
46
56
  }
47
57
  })
48
- };
58
+ }, colorSchemeStyles);
59
+
49
60
  const themeOverrides = theme.components?.MuiCssBaseline?.styleOverrides;
50
61
 
51
62
  if (themeOverrides) {
package/modern/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
@@ -149,6 +151,7 @@ const Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {
149
151
  ownerState: ownerState,
150
152
  ref: ref
151
153
  }, other, {
154
+ classes: classes,
152
155
  children: children
153
156
  }));
154
157
  });
@@ -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) {
@@ -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,16 @@ 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
+ colorSchemeStyles[`&${theme.getColorSchemeSelector(key).replace(/\s*&/, '')}`] = {
37
+ colorScheme: scheme.palette?.mode
38
+ };
39
+ });
40
+ }
41
+
32
42
  return _extends({}, html(theme, ownerState.enableColorScheme), body(theme), {
33
43
  '& *, & *::before, & *::after': {
34
44
  boxSizing: 'inherit'
@@ -36,7 +46,7 @@ const ScopedCssBaselineRoot = styled('div', {
36
46
  '& strong, & b': {
37
47
  fontWeight: theme.typography.fontWeightBold
38
48
  }
39
- });
49
+ }, colorSchemeStyles);
40
50
  });
41
51
  const ScopedCssBaseline = /*#__PURE__*/React.forwardRef(function ScopedCssBaseline(inProps, ref) {
42
52
  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) {
@@ -459,9 +459,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
459
459
  document.removeEventListener('keydown', handleKeyDown);
460
460
  };
461
461
  }, [handleClose, open]);
462
- const handleUseRef = useForkRef(setChildNode, ref);
463
- const handleFocusRef = useForkRef(focusVisibleRef, handleUseRef);
464
- const handleRef = useForkRef(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
462
+ const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
465
463
 
466
464
  if (typeof title !== 'number' && !title) {
467
465
  open = false;
@@ -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) {
package/modern/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.
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.10.7",
3
+ "version": "5.10.9",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "React components that implement Google's Material Design.",
@@ -46,11 +46,11 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.19.0",
49
- "@mui/base": "5.0.0-alpha.99",
50
- "@mui/core-downloads-tracker": "^5.10.7",
51
- "@mui/system": "^5.10.7",
49
+ "@mui/base": "5.0.0-alpha.101",
50
+ "@mui/core-downloads-tracker": "^5.10.9",
51
+ "@mui/system": "^5.10.9",
52
52
  "@mui/types": "^7.2.0",
53
- "@mui/utils": "^5.10.6",
53
+ "@mui/utils": "^5.10.9",
54
54
  "@types/react-transition-group": "^4.4.5",
55
55
  "clsx": "^1.2.1",
56
56
  "csstype": "^3.1.1",
@@ -193,7 +193,7 @@ export interface PaletteTooltip {
193
193
 
194
194
  // The Palette should be sync with `../themeCssVarsAugmentation/index.d.ts`
195
195
  export interface ColorSystemOptions {
196
- palette?: Omit<PaletteOptions, 'mode'> & {
196
+ palette?: PaletteOptions & {
197
197
  common?: Partial<PaletteCommonChannel>;
198
198
  primary?: Partial<PaletteColorChannel>;
199
199
  secondary?: Partial<PaletteColorChannel>;