@mui/material 5.2.5 → 5.3.0

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 (99) hide show
  1. package/Autocomplete/Autocomplete.d.ts +2 -0
  2. package/Autocomplete/Autocomplete.js +10 -6
  3. package/Avatar/Avatar.d.ts +3 -1
  4. package/Backdrop/Backdrop.js +3 -1
  5. package/Badge/Badge.d.ts +25 -0
  6. package/Badge/Badge.js +31 -15
  7. package/ButtonGroup/ButtonGroupContext.d.ts +1 -1
  8. package/CHANGELOG.md +245 -32
  9. package/FilledInput/FilledInput.js +4 -1
  10. package/FormControlLabel/FormControlLabel.js +3 -1
  11. package/Input/Input.js +4 -1
  12. package/InputBase/InputBase.js +4 -1
  13. package/InputLabel/InputLabel.js +4 -0
  14. package/ListItem/ListItem.js +3 -1
  15. package/Modal/Modal.js +3 -1
  16. package/README.md +19 -24
  17. package/Select/Select.d.ts +9 -1
  18. package/Select/Select.js +10 -1
  19. package/Select/SelectInput.d.ts +1 -0
  20. package/Select/SelectInput.js +25 -4
  21. package/Slider/Slider.d.ts +2 -0
  22. package/Slider/Slider.js +126 -53
  23. package/StepLabel/StepLabel.js +3 -1
  24. package/SvgIcon/SvgIcon.d.ts +8 -0
  25. package/SvgIcon/SvgIcon.js +19 -3
  26. package/TextField/TextField.d.ts +1 -0
  27. package/TextField/TextField.js +1 -0
  28. package/Tooltip/Tooltip.js +6 -1
  29. package/index.js +1 -1
  30. package/legacy/Autocomplete/Autocomplete.js +10 -6
  31. package/legacy/Backdrop/Backdrop.js +3 -1
  32. package/legacy/Badge/Badge.js +36 -16
  33. package/legacy/FilledInput/FilledInput.js +4 -1
  34. package/legacy/FormControlLabel/FormControlLabel.js +3 -1
  35. package/legacy/Input/Input.js +4 -1
  36. package/legacy/InputBase/InputBase.js +4 -1
  37. package/legacy/InputLabel/InputLabel.js +4 -0
  38. package/legacy/ListItem/ListItem.js +3 -1
  39. package/legacy/Modal/Modal.js +3 -1
  40. package/legacy/Select/Select.js +11 -1
  41. package/legacy/Select/SelectInput.js +29 -7
  42. package/legacy/Slider/Slider.js +127 -54
  43. package/legacy/StepLabel/StepLabel.js +3 -1
  44. package/legacy/SvgIcon/SvgIcon.js +20 -3
  45. package/legacy/TextField/TextField.js +1 -0
  46. package/legacy/Tooltip/Tooltip.js +6 -1
  47. package/legacy/index.js +1 -1
  48. package/legacy/locale/index.js +224 -130
  49. package/legacy/utils/shouldSpreadAdditionalProps.js +7 -0
  50. package/locale/index.d.ts +1 -0
  51. package/locale/index.js +140 -50
  52. package/modern/Autocomplete/Autocomplete.js +9 -5
  53. package/modern/Backdrop/Backdrop.js +3 -1
  54. package/modern/Badge/Badge.js +31 -15
  55. package/modern/FilledInput/FilledInput.js +4 -1
  56. package/modern/FormControlLabel/FormControlLabel.js +3 -1
  57. package/modern/Input/Input.js +4 -1
  58. package/modern/InputBase/InputBase.js +4 -1
  59. package/modern/InputLabel/InputLabel.js +4 -0
  60. package/modern/ListItem/ListItem.js +3 -1
  61. package/modern/Modal/Modal.js +3 -1
  62. package/modern/Select/Select.js +10 -1
  63. package/modern/Select/SelectInput.js +25 -4
  64. package/modern/Slider/Slider.js +126 -53
  65. package/modern/StepLabel/StepLabel.js +3 -1
  66. package/modern/SvgIcon/SvgIcon.js +19 -3
  67. package/modern/TextField/TextField.js +1 -0
  68. package/modern/Tooltip/Tooltip.js +6 -1
  69. package/modern/index.js +1 -1
  70. package/modern/locale/index.js +140 -50
  71. package/modern/utils/shouldSpreadAdditionalProps.js +7 -0
  72. package/node/Autocomplete/Autocomplete.js +10 -6
  73. package/node/Backdrop/Backdrop.js +3 -1
  74. package/node/Badge/Badge.js +33 -16
  75. package/node/FilledInput/FilledInput.js +4 -1
  76. package/node/FormControlLabel/FormControlLabel.js +3 -1
  77. package/node/Input/Input.js +4 -1
  78. package/node/InputBase/InputBase.js +4 -1
  79. package/node/InputLabel/InputLabel.js +4 -0
  80. package/node/ListItem/ListItem.js +3 -1
  81. package/node/Modal/Modal.js +3 -1
  82. package/node/Select/Select.js +10 -1
  83. package/node/Select/SelectInput.js +25 -4
  84. package/node/Slider/Slider.js +112 -45
  85. package/node/StepLabel/StepLabel.js +3 -1
  86. package/node/SvgIcon/SvgIcon.js +19 -3
  87. package/node/TextField/TextField.js +1 -0
  88. package/node/Tooltip/Tooltip.js +6 -1
  89. package/node/index.js +1 -1
  90. package/node/locale/index.js +142 -51
  91. package/node/utils/shouldSpreadAdditionalProps.js +15 -0
  92. package/package.json +7 -7
  93. package/styles/components.d.ts +452 -113
  94. package/styles/createTheme.d.ts +12 -6
  95. package/styles/overrides.d.ts +16 -4
  96. package/styles/useThemeProps.d.ts +2 -1
  97. package/umd/material-ui.development.js +703 -332
  98. package/umd/material-ui.production.min.js +21 -21
  99. package/utils/shouldSpreadAdditionalProps.js +7 -0
@@ -227,7 +227,9 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes
227
227
  * The props used for each slot inside.
228
228
  * @default {}
229
229
  */
230
- componentsProps: _propTypes.default.object,
230
+ componentsProps: _propTypes.default.shape({
231
+ label: _propTypes.default.object
232
+ }),
231
233
 
232
234
  /**
233
235
  * If `true`, the step is marked as failed.
@@ -29,7 +29,7 @@ var _svgIconClasses = require("./svgIconClasses");
29
29
 
30
30
  var _jsxRuntime = require("react/jsx-runtime");
31
31
 
32
- const _excluded = ["children", "className", "color", "component", "fontSize", "htmlColor", "titleAccess", "viewBox"];
32
+ const _excluded = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
33
33
 
34
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
35
 
@@ -98,6 +98,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
98
98
  component = 'svg',
99
99
  fontSize = 'medium',
100
100
  htmlColor,
101
+ inheritViewBox = false,
101
102
  titleAccess,
102
103
  viewBox = '0 0 24 24'
103
104
  } = props,
@@ -106,20 +107,26 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
106
107
  color,
107
108
  component,
108
109
  fontSize,
110
+ inheritViewBox,
109
111
  viewBox
110
112
  });
113
+ const more = {};
114
+
115
+ if (!inheritViewBox) {
116
+ more.viewBox = viewBox;
117
+ }
118
+
111
119
  const classes = useUtilityClasses(ownerState);
112
120
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SvgIconRoot, (0, _extends2.default)({
113
121
  as: component,
114
122
  className: (0, _clsx.default)(classes.root, className),
115
123
  ownerState: ownerState,
116
124
  focusable: "false",
117
- viewBox: viewBox,
118
125
  color: htmlColor,
119
126
  "aria-hidden": titleAccess ? undefined : true,
120
127
  role: titleAccess ? 'img' : undefined,
121
128
  ref: ref
122
- }, other, {
129
+ }, more, other, {
123
130
  children: [children, titleAccess ? /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
124
131
  children: titleAccess
125
132
  }) : null]
@@ -176,6 +183,15 @@ process.env.NODE_ENV !== "production" ? SvgIcon.propTypes
176
183
  */
177
184
  htmlColor: _propTypes.default.string,
178
185
 
186
+ /**
187
+ * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
188
+ * prop will be ignored.
189
+ * Useful when you want to reference a custom `component` and have `SvgIcon` pass that
190
+ * `component`'s viewBox to the root node.
191
+ * @default false
192
+ */
193
+ inheritViewBox: _propTypes.default.bool,
194
+
179
195
  /**
180
196
  * The shape-rendering attribute. The behavior of the different options is described on the
181
197
  * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
@@ -322,6 +322,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes
322
322
 
323
323
  /**
324
324
  * Props applied to the [`InputLabel`](/api/input-label/) element.
325
+ * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
325
326
  */
326
327
  InputLabelProps: _propTypes.default.object,
327
328
 
@@ -712,7 +712,12 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
712
712
  * and `componentsProps.transition` prop values win over `TransitionProps` if both are applied.
713
713
  * @default {}
714
714
  */
715
- componentsProps: _propTypes.default.object,
715
+ componentsProps: _propTypes.default.shape({
716
+ arrow: _propTypes.default.object,
717
+ popper: _propTypes.default.object,
718
+ tooltip: _propTypes.default.object,
719
+ transition: _propTypes.default.object
720
+ }),
716
721
 
717
722
  /**
718
723
  * Set to `true` if the `title` acts as an accessible description.
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.2.5
1
+ /** @license MUI v5.3.0
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.
@@ -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.skSK = exports.siLK = exports.ruRU = exports.roRO = exports.ptPT = exports.ptBR = exports.plPL = exports.nlNL = exports.kzKZ = exports.koKR = exports.khKH = exports.jaJP = exports.itIT = exports.isIS = exports.idID = exports.hyAM = exports.huHU = 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.skSK = exports.siLK = exports.ruRU = exports.roRO = exports.ptPT = exports.ptBR = exports.plPL = exports.nlNL = exports.nbNO = exports.kzKZ = exports.koKR = exports.khKH = exports.jaJP = exports.itIT = exports.isIS = exports.idID = exports.hyAM = exports.huHU = 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;
7
7
  const amET = {
8
8
  components: {
9
9
  MuiBreadcrumbs: {
@@ -905,7 +905,7 @@ const enUS = {
905
905
  MuiBreadcrumbs: { defaultProps: {
906
906
  expandText: 'Show path',
907
907
  }},
908
- MuiTablePagination: { defaultProps: {
908
+ MuiTablePagination: { defaultProps: {
909
909
  getItemAriaLabel: (type) => {
910
910
  if (type === 'first') {
911
911
  return 'Go to first page';
@@ -923,21 +923,21 @@ const enUS = {
923
923
  labelDisplayedRows: ({ from, to, count }) =>
924
924
  `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`,
925
925
  }},
926
- MuiRating: { defaultProps: {
926
+ MuiRating: { defaultProps: {
927
927
  getLabelText: value => `${value} Star${value !== 1 ? 's' : ''}`,
928
928
  emptyLabelText: 'Empty',
929
929
  }},
930
- MuiAutocomplete: { defaultProps: {
930
+ MuiAutocomplete: { defaultProps: {
931
931
  clearText: 'Clear',
932
932
  closeText: 'Close',
933
933
  loadingText: 'Loading…',
934
934
  noOptionsText: 'No options',
935
935
  openText: 'Open',
936
936
  }},
937
- MuiAlert: { defaultProps: {
937
+ MuiAlert: { defaultProps: {
938
938
  closeText: 'Close',
939
939
  }},
940
- MuiPagination: { defaultProps: {
940
+ MuiPagination: { defaultProps: {
941
941
  'aria-label': 'Pagination navigation',
942
942
  getItemAriaLabel: (type, page, selected) => {
943
943
  if (type === 'page') {
@@ -955,7 +955,7 @@ const enUS = {
955
955
  // if (type === 'previous') {
956
956
  return 'Go to previous page';
957
957
  },
958
- },
958
+ }},
959
959
  },
960
960
  */
961
961
  };
@@ -1227,9 +1227,12 @@ const fiFI = {
1227
1227
 
1228
1228
  return 'Mene edelliselle sivulle';
1229
1229
  },
1230
- labelRowsPerPage: 'Rivejä per sivu:' // labelDisplayedRows: ({ from, to, count }) =>
1231
- // `${from}–${to} / ${count !== -1 ? count : `more than ${to}`}`,
1232
-
1230
+ labelRowsPerPage: 'Rivejä per sivu:',
1231
+ labelDisplayedRows: ({
1232
+ from,
1233
+ to,
1234
+ count
1235
+ }) => `${from}–${to} / ${count !== -1 ? count : `enemmän kuin ${to}`}`
1233
1236
  }
1234
1237
  },
1235
1238
  MuiRating: {
@@ -2220,6 +2223,87 @@ const kzKZ = {
2220
2223
  }
2221
2224
  };
2222
2225
  exports.kzKZ = kzKZ;
2226
+ const nbNO = {
2227
+ components: {
2228
+ MuiBreadcrumbs: {
2229
+ defaultProps: {
2230
+ expandText: 'Vis sti'
2231
+ }
2232
+ },
2233
+ MuiTablePagination: {
2234
+ defaultProps: {
2235
+ getItemAriaLabel: type => {
2236
+ if (type === 'first') {
2237
+ return 'Gå til første side';
2238
+ }
2239
+
2240
+ if (type === 'last') {
2241
+ return 'Gå til siste side';
2242
+ }
2243
+
2244
+ if (type === 'next') {
2245
+ return 'Gå til neste side';
2246
+ } // if (type === 'previous') {
2247
+
2248
+
2249
+ return 'Gå til forrige side';
2250
+ },
2251
+ labelRowsPerPage: 'Rader per side:',
2252
+ labelDisplayedRows: ({
2253
+ from,
2254
+ to,
2255
+ count
2256
+ }) => `${from}–${to} av ${count !== -1 ? count : `mer enn ${to}`}`
2257
+ }
2258
+ },
2259
+ MuiRating: {
2260
+ defaultProps: {
2261
+ getLabelText: value => `${value} Stjerne${value !== 1 ? 'r' : ''}`,
2262
+ emptyLabelText: 'Tom'
2263
+ }
2264
+ },
2265
+ MuiAutocomplete: {
2266
+ defaultProps: {
2267
+ clearText: 'Tøm',
2268
+ closeText: 'Lukk',
2269
+ loadingText: 'Laster inn…',
2270
+ noOptionsText: 'Ingen alternativer',
2271
+ openText: 'Åpne'
2272
+ }
2273
+ },
2274
+ MuiAlert: {
2275
+ defaultProps: {
2276
+ closeText: 'Lukk'
2277
+ }
2278
+ },
2279
+ MuiPagination: {
2280
+ defaultProps: {
2281
+ 'aria-label': 'Paginering navigasjon',
2282
+ getItemAriaLabel: (type, page, selected) => {
2283
+ if (type === 'page') {
2284
+ return `${selected ? '' : 'Gå til '}side ${page}`;
2285
+ }
2286
+
2287
+ if (type === 'first') {
2288
+ return 'Gå til første side';
2289
+ }
2290
+
2291
+ if (type === 'last') {
2292
+ return 'Gå til siste side';
2293
+ }
2294
+
2295
+ if (type === 'next') {
2296
+ return 'Gå til neste side';
2297
+ } // if (type === 'previous') {
2298
+
2299
+
2300
+ return 'Gå til forrige side';
2301
+ }
2302
+ }
2303
+ }
2304
+ }
2305
+ };
2306
+ exports.nbNO = nbNO;
2223
2307
  const nlNL = {
2224
2308
  components: {
2225
2309
  MuiBreadcrumbs: {
@@ -3232,26 +3316,29 @@ const ukUA = {
3232
3316
  exports.ukUA = ukUA;
3233
3317
  const viVN = {
3234
3318
  components: {
3235
- // MuiBreadcrumbs: {
3236
- // defaultProps: {
3237
- // expandText: 'Show path',
3238
- // },
3239
- // },
3319
+ MuiBreadcrumbs: {
3320
+ defaultProps: {
3321
+ expandText: 'Mở ra'
3322
+ }
3323
+ },
3240
3324
  MuiTablePagination: {
3241
3325
  defaultProps: {
3242
- // getItemAriaLabel: (type) => {
3243
- // if (type === 'first') {
3244
- // return 'Go to first page';
3245
- // }
3246
- // if (type === 'last') {
3247
- // return 'Go to last page';
3248
- // }
3249
- // if (type === 'next') {
3250
- // return 'Go to next page';
3251
- // }
3252
- // // if (type === 'previous') {
3253
- // return 'Go to previous page';
3254
- // },
3326
+ getItemAriaLabel: type => {
3327
+ if (type === 'first') {
3328
+ return 'Tới trang đầu tiên';
3329
+ }
3330
+
3331
+ if (type === 'last') {
3332
+ return 'Tới trang cuối cùng';
3333
+ }
3334
+
3335
+ if (type === 'next') {
3336
+ return 'Tới trang tiếp theo';
3337
+ } // if (type === 'previous') {
3338
+
3339
+
3340
+ return 'Về trang trước đó';
3341
+ },
3255
3342
  labelRowsPerPage: 'Số hàng mỗi trang:',
3256
3343
  labelDisplayedRows: ({
3257
3344
  from,
@@ -3263,7 +3350,7 @@ const viVN = {
3263
3350
  MuiRating: {
3264
3351
  defaultProps: {
3265
3352
  getLabelText: value => `${value} sao`,
3266
- emptyLabelText: 'Trống'
3353
+ emptyLabelText: 'Không có dữ liệu'
3267
3354
  }
3268
3355
  },
3269
3356
  MuiAutocomplete: {
@@ -3271,7 +3358,7 @@ const viVN = {
3271
3358
  clearText: 'Xóa',
3272
3359
  closeText: 'Đóng',
3273
3360
  loadingText: 'Đang tải…',
3274
- noOptionsText: 'Không có lựa chọn',
3361
+ noOptionsText: 'Không có lựa chọn nào',
3275
3362
  openText: 'Mở'
3276
3363
  }
3277
3364
  },
@@ -3279,28 +3366,32 @@ const viVN = {
3279
3366
  defaultProps: {
3280
3367
  closeText: 'Đóng'
3281
3368
  }
3282
- } // MuiPagination: {
3283
- // defaultProps: {
3284
- // 'aria-label': 'Pagination navigation',
3285
- // getItemAriaLabel: (type, page, selected) => {
3286
- // if (type === 'page') {
3287
- // return `${selected ? '' : 'Go to '}page ${page}`;
3288
- // }
3289
- // if (type === 'first') {
3290
- // return 'Go to first page';
3291
- // }
3292
- // if (type === 'last') {
3293
- // return 'Go to last page';
3294
- // }
3295
- // if (type === 'next') {
3296
- // return 'Go to next page';
3297
- // }
3298
- // // if (type === 'previous') {
3299
- // return 'Go to previous page';
3300
- // },
3301
- // },
3302
- // },
3369
+ },
3370
+ MuiPagination: {
3371
+ defaultProps: {
3372
+ 'aria-label': 'Thanh điều khiển trang',
3373
+ getItemAriaLabel: (type, page, selected) => {
3374
+ if (type === 'page') {
3375
+ return `${selected ? '' : 'Tới '}trang ${page}`;
3376
+ }
3303
3377
 
3378
+ if (type === 'first') {
3379
+ return 'Tới trang đầu tiên';
3380
+ }
3381
+
3382
+ if (type === 'last') {
3383
+ return 'Tới trang cuối cùng';
3384
+ }
3385
+
3386
+ if (type === 'next') {
3387
+ return 'Tới trang tiếp theo';
3388
+ } // if (type === 'previous') {
3389
+
3390
+
3391
+ return 'Về trang trước đó';
3392
+ }
3393
+ }
3394
+ }
3304
3395
  }
3305
3396
  };
3306
3397
  exports.viVN = viVN;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _base = require("@mui/base");
9
+
10
+ const shouldSpreadAdditionalProps = Slot => {
11
+ return !Slot || !(0, _base.isHostComponent)(Slot);
12
+ };
13
+
14
+ var _default = shouldSpreadAdditionalProps;
15
+ exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.2.5",
3
+ "version": "5.3.0",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Quickly build beautiful React apps. MUI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.",
@@ -30,8 +30,8 @@
30
30
  "@emotion/react": "^11.5.0",
31
31
  "@emotion/styled": "^11.3.0",
32
32
  "@types/react": "^16.8.6 || ^17.0.0",
33
- "react": "^17.0.2",
34
- "react-dom": "^17.0.2"
33
+ "react": "^17.0.0",
34
+ "react-dom": "^17.0.0"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@types/react": {
@@ -45,11 +45,11 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@babel/runtime": "^7.16.3",
49
- "@mui/base": "5.0.0-alpha.61",
50
- "@mui/system": "^5.2.5",
48
+ "@babel/runtime": "^7.16.7",
49
+ "@mui/base": "5.0.0-alpha.65",
50
+ "@mui/system": "^5.3.0",
51
51
  "@mui/types": "^7.1.0",
52
- "@mui/utils": "^5.2.3",
52
+ "@mui/utils": "^5.3.0",
53
53
  "@types/react-transition-group": "^4.4.4",
54
54
  "clsx": "^1.1.1",
55
55
  "csstype": "^3.0.10",