@mui/material 5.8.3 → 5.8.4

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 (64) hide show
  1. package/Autocomplete/autocompleteClasses.d.ts +1 -1
  2. package/Button/buttonClasses.d.ts +24 -0
  3. package/Button/buttonClasses.js +1 -1
  4. package/CHANGELOG.md +90 -10
  5. package/Grid/Grid.d.ts +73 -52
  6. package/Grid/Grid.js +94 -40
  7. package/Grow/Grow.js +1 -2
  8. package/Hidden/withWidth.js +0 -2
  9. package/Link/Link.js +10 -17
  10. package/Link/getTextDecoration.d.ts +15 -0
  11. package/Link/getTextDecoration.js +29 -0
  12. package/Popover/Popover.d.ts +7 -0
  13. package/Popover/index.js +1 -0
  14. package/README.md +6 -9
  15. package/Slider/Slider.d.ts +3 -1
  16. package/Slider/Slider.js +3 -1
  17. package/Snackbar/Snackbar.js +6 -20
  18. package/Stack/Stack.js +1 -1
  19. package/StepIcon/StepIcon.js +2 -1
  20. package/Tab/Tab.d.ts +0 -1
  21. package/Tabs/Tabs.js +16 -0
  22. package/index.js +1 -1
  23. package/legacy/Button/buttonClasses.js +1 -1
  24. package/legacy/Grid/Grid.js +97 -48
  25. package/legacy/Grow/Grow.js +1 -2
  26. package/legacy/Hidden/withWidth.js +0 -2
  27. package/legacy/Link/Link.js +10 -17
  28. package/legacy/Link/getTextDecoration.js +28 -0
  29. package/legacy/Popover/index.js +1 -0
  30. package/legacy/Slider/Slider.js +3 -1
  31. package/legacy/Snackbar/Snackbar.js +6 -21
  32. package/legacy/Stack/Stack.js +2 -1
  33. package/legacy/StepIcon/StepIcon.js +2 -1
  34. package/legacy/Tabs/Tabs.js +16 -0
  35. package/legacy/index.js +1 -1
  36. package/modern/Button/buttonClasses.js +1 -1
  37. package/modern/Grid/Grid.js +94 -40
  38. package/modern/Grow/Grow.js +1 -2
  39. package/modern/Hidden/withWidth.js +0 -2
  40. package/modern/Link/Link.js +10 -17
  41. package/modern/Link/getTextDecoration.js +29 -0
  42. package/modern/Popover/index.js +1 -0
  43. package/modern/Slider/Slider.js +3 -1
  44. package/modern/Snackbar/Snackbar.js +6 -20
  45. package/modern/Stack/Stack.js +1 -1
  46. package/modern/StepIcon/StepIcon.js +2 -1
  47. package/modern/Tabs/Tabs.js +16 -0
  48. package/modern/index.js +1 -1
  49. package/node/Button/buttonClasses.js +1 -1
  50. package/node/Grid/Grid.js +95 -40
  51. package/node/Grow/Grow.js +1 -2
  52. package/node/Hidden/withWidth.js +0 -3
  53. package/node/Link/Link.js +12 -20
  54. package/node/Link/getTextDecoration.js +39 -0
  55. package/node/Popover/index.js +13 -3
  56. package/node/Slider/Slider.js +3 -1
  57. package/node/Snackbar/Snackbar.js +6 -18
  58. package/node/Stack/Stack.js +1 -1
  59. package/node/StepIcon/StepIcon.js +2 -1
  60. package/node/Tabs/Tabs.js +16 -0
  61. package/node/index.js +1 -1
  62. package/package.json +5 -6
  63. package/umd/material-ui.development.js +190 -173
  64. package/umd/material-ui.production.min.js +21 -21
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.3
1
+ /** @license MUI v5.8.4
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.
@@ -1330,32 +1330,6 @@
1330
1330
  var reactIs_5 = reactIs.Memo;
1331
1331
  reactIs.isValidElementType;
1332
1332
 
1333
- /**
1334
- * Copyright 2015, Yahoo! Inc.
1335
- * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
1336
- */
1337
- var REACT_STATICS = {
1338
- childContextTypes: true,
1339
- contextType: true,
1340
- contextTypes: true,
1341
- defaultProps: true,
1342
- displayName: true,
1343
- getDefaultProps: true,
1344
- getDerivedStateFromError: true,
1345
- getDerivedStateFromProps: true,
1346
- mixins: true,
1347
- propTypes: true,
1348
- type: true
1349
- };
1350
- var KNOWN_STATICS = {
1351
- name: true,
1352
- length: true,
1353
- prototype: true,
1354
- caller: true,
1355
- callee: true,
1356
- arguments: true,
1357
- arity: true
1358
- };
1359
1333
  var FORWARD_REF_STATICS = {
1360
1334
  '$$typeof': true,
1361
1335
  render: true,
@@ -1375,61 +1349,6 @@
1375
1349
  TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
1376
1350
  TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
1377
1351
 
1378
- function getStatics(component) {
1379
- // React v16.11 and below
1380
- if (reactIs.isMemo(component)) {
1381
- return MEMO_STATICS;
1382
- } // React v16.12 and above
1383
-
1384
-
1385
- return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
1386
- }
1387
-
1388
- var defineProperty = Object.defineProperty;
1389
- var getOwnPropertyNames = Object.getOwnPropertyNames;
1390
- var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
1391
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1392
- var getPrototypeOf = Object.getPrototypeOf;
1393
- var objectPrototype = Object.prototype;
1394
- function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
1395
- if (typeof sourceComponent !== 'string') {
1396
- // don't hoist over string (html) components
1397
- if (objectPrototype) {
1398
- var inheritedComponent = getPrototypeOf(sourceComponent);
1399
-
1400
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
1401
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
1402
- }
1403
- }
1404
-
1405
- var keys = getOwnPropertyNames(sourceComponent);
1406
-
1407
- if (getOwnPropertySymbols$1) {
1408
- keys = keys.concat(getOwnPropertySymbols$1(sourceComponent));
1409
- }
1410
-
1411
- var targetStatics = getStatics(targetComponent);
1412
- var sourceStatics = getStatics(sourceComponent);
1413
-
1414
- for (var i = 0; i < keys.length; ++i) {
1415
- var key = keys[i];
1416
-
1417
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
1418
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
1419
-
1420
- try {
1421
- // Avoid failures from read-only properties
1422
- defineProperty(targetComponent, key, descriptor);
1423
- } catch (e) {}
1424
- }
1425
- }
1426
- }
1427
-
1428
- return targetComponent;
1429
- }
1430
-
1431
- var hoistNonReactStatics_cjs = hoistNonReactStatics;
1432
-
1433
1352
  var isBrowser$4 = typeof document !== 'undefined';
1434
1353
  function getRegisteredStyles(registered, registeredStyles, classNames) {
1435
1354
  var rawClassName = '';
@@ -4793,7 +4712,7 @@
4793
4712
 
4794
4713
  if (element == null || // When server-side rendering React doesn't warn either.
4795
4714
  // This is not an accurate check for SSR.
4796
- // This is only in place for emotion compat.
4715
+ // This is only in place for Emotion compat.
4797
4716
  // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
4798
4717
  typeof window === 'undefined') {
4799
4718
  return null;
@@ -5762,9 +5681,11 @@
5762
5681
  if (Array.isArray(breakpointValues)) {
5763
5682
  acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];
5764
5683
  previous = i;
5765
- } else {
5766
- acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous] || breakpointValues;
5684
+ } else if (typeof breakpointValues === 'object') {
5685
+ acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];
5767
5686
  previous = breakpoint;
5687
+ } else {
5688
+ acc[breakpoint] = breakpointValues;
5768
5689
  }
5769
5690
 
5770
5691
  return acc;
@@ -6468,7 +6389,7 @@
6468
6389
  } = props || {};
6469
6390
 
6470
6391
  if (!sx) {
6471
- return null; // emotion & styled-components will neglect null
6392
+ return null; // Emotion & styled-components will neglect null
6472
6393
  }
6473
6394
  /*
6474
6395
  * Receive `sxInput` as object or callback
@@ -7063,7 +6984,7 @@
7063
6984
 
7064
6985
  const muiStyledResolver = (styleArg, ...expressions) => {
7065
6986
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
7066
- // On the server emotion doesn't use React.forwardRef for creating components, so the created
6987
+ // On the server Emotion doesn't use React.forwardRef for creating components, so the created
7067
6988
  // component stays as a function. This condition makes sure that we do not interpolate functions
7068
6989
  // which are basically components used as a selectors.
7069
6990
  // eslint-disable-next-line no-underscore-dangle
@@ -7122,7 +7043,7 @@
7122
7043
 
7123
7044
  transformedStyleArg = [...styleArg, ...placeholders];
7124
7045
  transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
7125
- } else if (typeof styleArg === 'function' && // On the server emotion doesn't use React.forwardRef for creating components, so the created
7046
+ } else if (typeof styleArg === 'function' && // On the server Emotion doesn't use React.forwardRef for creating components, so the created
7126
7047
  // component stays as a function. This condition makes sure that we do not interpolate functions
7127
7048
  // which are basically components used as a selectors.
7128
7049
  // eslint-disable-next-line no-underscore-dangle
@@ -7243,7 +7164,7 @@
7243
7164
  * Returns an object with the type and values of a color.
7244
7165
  *
7245
7166
  * Note: Does not support rgb % values.
7246
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
7167
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
7247
7168
  * @returns {object} - A MUI color object: {type: string, values: number[]}
7248
7169
  */
7249
7170
 
@@ -7295,7 +7216,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7295
7216
  /**
7296
7217
  * Returns a channel created from the input color.
7297
7218
  *
7298
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
7219
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
7299
7220
  * @returns {string} - The channel for the color, that can be used in rgba or hsla colors
7300
7221
  */
7301
7222
 
@@ -7306,7 +7227,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7306
7227
  /**
7307
7228
  * Converts a color object with type and values to a string.
7308
7229
  * @param {object} color - Decomposed color
7309
- * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'
7230
+ * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'
7310
7231
  * @param {array} color.values - [n,n,n] or [n,n,n,n]
7311
7232
  * @returns {string} A CSS color string
7312
7233
  */
@@ -12378,11 +12299,23 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
12378
12299
  return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;
12379
12300
  }
12380
12301
 
12302
+ function isAriaHiddenForbiddenOnElement(element) {
12303
+ // The forbidden HTML tags are the ones from ARIA specification that
12304
+ // can be children of body and can't have aria-hidden attribute.
12305
+ // cf. https://www.w3.org/TR/html-aria/#docconformance
12306
+ const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];
12307
+ const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;
12308
+ const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';
12309
+ return isForbiddenTagName || isInputHidden;
12310
+ }
12311
+
12381
12312
  function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude = [], show) {
12382
12313
  const blacklist = [mountElement, currentElement, ...elementsToExclude];
12383
- const blacklistTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE'];
12384
12314
  [].forEach.call(container.children, element => {
12385
- if (blacklist.indexOf(element) === -1 && blacklistTagNames.indexOf(element.tagName) === -1) {
12315
+ const isNotExcludedElement = blacklist.indexOf(element) === -1;
12316
+ const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);
12317
+
12318
+ if (isNotExcludedElement && isNotForbiddenElement) {
12386
12319
  ariaHidden(element, show);
12387
12320
  }
12388
12321
  });
@@ -12534,7 +12467,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
12534
12467
  }
12535
12468
  }
12536
12469
 
12537
- remove(modal) {
12470
+ remove(modal, ariaHiddenState = true) {
12538
12471
  const modalIndex = this.modals.indexOf(modal);
12539
12472
 
12540
12473
  if (modalIndex === -1) {
@@ -12554,7 +12487,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
12554
12487
 
12555
12488
  if (modal.modalRef) {
12556
12489
  // In case the modal wasn't in the DOM yet.
12557
- ariaHidden(modal.modalRef, true);
12490
+ ariaHidden(modal.modalRef, ariaHiddenState);
12558
12491
  }
12559
12492
 
12560
12493
  ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);
@@ -12982,6 +12915,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
12982
12915
  */
12983
12916
 
12984
12917
  const ModalUnstyled = /*#__PURE__*/React__namespace.forwardRef(function ModalUnstyled(props, ref) {
12918
+ var _props$ariaHidden;
12919
+
12985
12920
  const {
12986
12921
  BackdropComponent,
12987
12922
  BackdropProps,
@@ -13022,6 +12957,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13022
12957
  const modalRef = React__namespace.useRef(null);
13023
12958
  const handleRef = useForkRef(modalRef, ref);
13024
12959
  const hasTransition = getHasTransition(props);
12960
+ const ariaHiddenProp = (_props$ariaHidden = props['aria-hidden']) != null ? _props$ariaHidden : true;
13025
12961
 
13026
12962
  const getDoc = () => ownerDocument(mountNodeRef.current);
13027
12963
 
@@ -13058,12 +12994,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13058
12994
  if (open && isTopModal()) {
13059
12995
  handleMounted();
13060
12996
  } else {
13061
- ariaHidden(modalRef.current, true);
12997
+ ariaHidden(modalRef.current, ariaHiddenProp);
13062
12998
  }
13063
12999
  });
13064
13000
  const handleClose = React__namespace.useCallback(() => {
13065
- manager.remove(getModal());
13066
- }, [manager]);
13001
+ manager.remove(getModal(), ariaHiddenProp);
13002
+ }, [manager, ariaHiddenProp]);
13067
13003
  React__namespace.useEffect(() => {
13068
13004
  return () => {
13069
13005
  handleClose();
@@ -13460,7 +13396,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13460
13396
  })]
13461
13397
  }));
13462
13398
  }
13463
-
13464
13399
  SliderValueLabelUnstyled.propTypes = {
13465
13400
  children: PropTypes.element.isRequired,
13466
13401
  className: PropTypes.string,
@@ -14451,12 +14386,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14451
14386
  thumb: PropTypes.object,
14452
14387
  track: PropTypes.object,
14453
14388
  valueLabel: PropTypes.shape({
14389
+ children: PropTypes.element,
14454
14390
  className: PropTypes.string,
14455
14391
  components: PropTypes.shape({
14456
14392
  Root: PropTypes.elementType
14457
14393
  }),
14394
+ open: PropTypes.bool,
14458
14395
  style: PropTypes.object,
14459
- value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
14396
+ value: PropTypes.number,
14460
14397
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
14461
14398
  })
14462
14399
  }),
@@ -24827,7 +24764,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
24827
24764
  function getButtonUtilityClass(slot) {
24828
24765
  return generateUtilityClass('MuiButton', slot);
24829
24766
  }
24830
- const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
24767
+ const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
24831
24768
  var buttonClasses$1 = buttonClasses;
24832
24769
 
24833
24770
  /**
@@ -30968,7 +30905,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
30968
30905
  ...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);
30969
30906
  var gridClasses$1 = gridClasses;
30970
30907
 
30971
- const _excluded$1d = ["className", "columns", "columnSpacing", "component", "container", "direction", "item", "lg", "md", "rowSpacing", "sm", "spacing", "wrap", "xl", "xs", "zeroMinWidth"];
30908
+ const _excluded$1d = ["className", "columns", "columnSpacing", "component", "container", "direction", "item", "rowSpacing", "spacing", "wrap", "zeroMinWidth"];
30972
30909
 
30973
30910
  function getOffset(val) {
30974
30911
  const parse = parseFloat(val);
@@ -31148,26 +31085,27 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31148
31085
 
31149
31086
  return styles;
31150
31087
  }
31151
- function resolveSpacingClasses(spacing, container, styles = {}) {
31152
- // in case of grid item or undefined/null or `spacing` <= 0
31153
- if (!container || !spacing || spacing <= 0) {
31088
+ function resolveSpacingStyles(spacing, breakpoints, styles = {}) {
31089
+ // undefined/null or `spacing` <= 0
31090
+ if (!spacing || spacing <= 0) {
31154
31091
  return [];
31155
31092
  } // in case of string/number `spacing`
31156
31093
 
31157
31094
 
31158
31095
  if (typeof spacing === 'string' && !Number.isNaN(Number(spacing)) || typeof spacing === 'number') {
31159
- return [styles[`spacing-xs-${String(spacing)}`] || `spacing-xs-${String(spacing)}`];
31096
+ return [styles[`spacing-xs-${String(spacing)}`]];
31160
31097
  } // in case of object `spacing`
31161
31098
 
31162
31099
 
31163
- const {
31164
- xs,
31165
- sm,
31166
- md,
31167
- lg,
31168
- xl
31169
- } = spacing;
31170
- return [Number(xs) > 0 && (styles[`spacing-xs-${String(xs)}`] || `spacing-xs-${String(xs)}`), Number(sm) > 0 && (styles[`spacing-sm-${String(sm)}`] || `spacing-sm-${String(sm)}`), Number(md) > 0 && (styles[`spacing-md-${String(md)}`] || `spacing-md-${String(md)}`), Number(lg) > 0 && (styles[`spacing-lg-${String(lg)}`] || `spacing-lg-${String(lg)}`), Number(xl) > 0 && (styles[`spacing-xl-${String(xl)}`] || `spacing-xl-${String(xl)}`)];
31100
+ const spacingStyles = [];
31101
+ breakpoints.forEach(breakpoint => {
31102
+ const value = spacing[breakpoint];
31103
+
31104
+ if (Number(value) > 0) {
31105
+ spacingStyles.push(styles[`spacing-${breakpoint}-${String(value)}`]);
31106
+ }
31107
+ });
31108
+ return spacingStyles;
31171
31109
  } // Default CSS values
31172
31110
  // flex: '0 1 auto',
31173
31111
  // flexDirection: 'row',
@@ -31179,20 +31117,33 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31179
31117
  name: 'MuiGrid',
31180
31118
  slot: 'Root',
31181
31119
  overridesResolver: (props, styles) => {
31120
+ const {
31121
+ ownerState
31122
+ } = props;
31182
31123
  const {
31183
31124
  container,
31184
31125
  direction,
31185
31126
  item,
31186
- lg,
31187
- md,
31188
- sm,
31189
31127
  spacing,
31190
31128
  wrap,
31191
- xl,
31192
- xs,
31193
- zeroMinWidth
31194
- } = props.ownerState;
31195
- return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, ...resolveSpacingClasses(spacing, container, styles), direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], xs !== false && styles[`grid-xs-${String(xs)}`], sm !== false && styles[`grid-sm-${String(sm)}`], md !== false && styles[`grid-md-${String(md)}`], lg !== false && styles[`grid-lg-${String(lg)}`], xl !== false && styles[`grid-xl-${String(xl)}`]];
31129
+ zeroMinWidth,
31130
+ breakpoints
31131
+ } = ownerState;
31132
+ let spacingStyles = []; // in case of grid item
31133
+
31134
+ if (container) {
31135
+ spacingStyles = resolveSpacingStyles(spacing, breakpoints, styles);
31136
+ }
31137
+
31138
+ const breakpointsStyles = [];
31139
+ breakpoints.forEach(breakpoint => {
31140
+ const value = ownerState[breakpoint];
31141
+
31142
+ if (value) {
31143
+ breakpointsStyles.push(styles[`grid-${breakpoint}-${String(value)}`]);
31144
+ }
31145
+ });
31146
+ return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, ...spacingStyles, direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], ...breakpointsStyles];
31196
31147
  }
31197
31148
  })(({
31198
31149
  ownerState
@@ -31210,6 +31161,29 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31210
31161
  }, ownerState.wrap !== 'wrap' && {
31211
31162
  flexWrap: ownerState.wrap
31212
31163
  }), generateDirection, generateRowGap, generateColumnGap, generateGrid);
31164
+ function resolveSpacingClasses(spacing, breakpoints) {
31165
+ // undefined/null or `spacing` <= 0
31166
+ if (!spacing || spacing <= 0) {
31167
+ return [];
31168
+ } // in case of string/number `spacing`
31169
+
31170
+
31171
+ if (typeof spacing === 'string' && !Number.isNaN(Number(spacing)) || typeof spacing === 'number') {
31172
+ return [`spacing-xs-${String(spacing)}`];
31173
+ } // in case of object `spacing`
31174
+
31175
+
31176
+ const classes = [];
31177
+ breakpoints.forEach(breakpoint => {
31178
+ const value = spacing[breakpoint];
31179
+
31180
+ if (Number(value) > 0) {
31181
+ const className = `spacing-${breakpoint}-${String(value)}`;
31182
+ classes.push(className);
31183
+ }
31184
+ });
31185
+ return classes;
31186
+ }
31213
31187
 
31214
31188
  const useUtilityClasses$_ = ownerState => {
31215
31189
  const {
@@ -31217,17 +31191,27 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31217
31191
  container,
31218
31192
  direction,
31219
31193
  item,
31220
- lg,
31221
- md,
31222
- sm,
31223
31194
  spacing,
31224
31195
  wrap,
31225
- xl,
31226
- xs,
31227
- zeroMinWidth
31196
+ zeroMinWidth,
31197
+ breakpoints
31228
31198
  } = ownerState;
31199
+ let spacingClasses = []; // in case of grid item
31200
+
31201
+ if (container) {
31202
+ spacingClasses = resolveSpacingClasses(spacing, breakpoints);
31203
+ }
31204
+
31205
+ const breakpointsClasses = [];
31206
+ breakpoints.forEach(breakpoint => {
31207
+ const value = ownerState[breakpoint];
31208
+
31209
+ if (value) {
31210
+ breakpointsClasses.push(`grid-${breakpoint}-${String(value)}`);
31211
+ }
31212
+ });
31229
31213
  const slots = {
31230
- root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', ...resolveSpacingClasses(spacing, container), direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, xs !== false && `grid-xs-${String(xs)}`, sm !== false && `grid-sm-${String(sm)}`, md !== false && `grid-md-${String(md)}`, lg !== false && `grid-lg-${String(lg)}`, xl !== false && `grid-xl-${String(xl)}`]
31214
+ root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', ...spacingClasses, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...breakpointsClasses]
31231
31215
  };
31232
31216
  return composeClasses(slots, getGridUtilityClass, classes);
31233
31217
  };
@@ -31237,6 +31221,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31237
31221
  props: inProps,
31238
31222
  name: 'MuiGrid'
31239
31223
  });
31224
+ const {
31225
+ breakpoints
31226
+ } = useTheme();
31240
31227
  const props = extendSxProp(themeProps);
31241
31228
 
31242
31229
  const {
@@ -31247,14 +31234,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31247
31234
  container = false,
31248
31235
  direction = 'row',
31249
31236
  item = false,
31250
- lg = false,
31251
- md = false,
31252
31237
  rowSpacing: rowSpacingProp,
31253
- sm = false,
31254
31238
  spacing = 0,
31255
31239
  wrap = 'wrap',
31256
- xl = false,
31257
- xs = false,
31258
31240
  zeroMinWidth = false
31259
31241
  } = props,
31260
31242
  other = _objectWithoutPropertiesLoose(props, _excluded$1d);
@@ -31264,21 +31246,29 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31264
31246
  const columnsContext = React__namespace.useContext(GridContext$1); // columns set with default breakpoint unit of 12
31265
31247
 
31266
31248
  const columns = container ? columnsProp || 12 : columnsContext;
31249
+ const breakpointsValues = {};
31250
+
31251
+ const otherFiltered = _extends({}, other);
31252
+
31253
+ breakpoints.keys.forEach(breakpoint => {
31254
+ if (other[breakpoint] != null) {
31255
+ breakpointsValues[breakpoint] = other[breakpoint];
31256
+ delete otherFiltered[breakpoint];
31257
+ }
31258
+ });
31267
31259
 
31268
31260
  const ownerState = _extends({}, props, {
31269
31261
  columns,
31270
31262
  container,
31271
31263
  direction,
31272
31264
  item,
31273
- lg,
31274
- md,
31275
- sm,
31276
31265
  rowSpacing,
31277
31266
  columnSpacing,
31278
31267
  wrap,
31279
- xl,
31280
- xs,
31281
- zeroMinWidth
31268
+ zeroMinWidth,
31269
+ spacing
31270
+ }, breakpointsValues, {
31271
+ breakpoints: breakpoints.keys
31282
31272
  });
31283
31273
 
31284
31274
  const classes = useUtilityClasses$_(ownerState);
@@ -31289,7 +31279,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31289
31279
  className: clsx(classes.root, className),
31290
31280
  as: component,
31291
31281
  ref: ref
31292
- }, other))
31282
+ }, otherFiltered))
31293
31283
  });
31294
31284
  });
31295
31285
  Grid.propTypes
@@ -31478,10 +31468,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31478
31468
  /*
31479
31469
  TODO v6: remove
31480
31470
  Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
31481
- Remove this workaround once the WebKit bug fix is released.
31482
31471
  */
31483
31472
 
31484
- const isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)[4-9]/i.test(navigator.userAgent);
31473
+ const isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent);
31485
31474
  /**
31486
31475
  * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and
31487
31476
  * [Popover](/material-ui/react-popover/) components.
@@ -31963,7 +31952,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31963
31952
  WithWidth.displayName = `WithWidth(${getDisplayName(Component)})`;
31964
31953
  }
31965
31954
 
31966
- hoistNonReactStatics_cjs(WithWidth, Component);
31967
31955
  return WithWidth;
31968
31956
  };
31969
31957
 
@@ -34331,7 +34319,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
34331
34319
  const linkClasses = generateUtilityClasses('MuiLink', ['root', 'underlineNone', 'underlineHover', 'underlineAlways', 'button', 'focusVisible']);
34332
34320
  var linkClasses$1 = linkClasses;
34333
34321
 
34334
- const _excluded$10 = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant", "sx"];
34335
34322
  const colorTransformations = {
34336
34323
  primary: 'primary.main',
34337
34324
  textPrimary: 'text.primary',
@@ -34344,6 +34331,25 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
34344
34331
  return colorTransformations[color] || color;
34345
34332
  };
34346
34333
 
34334
+ const getTextDecoration = ({
34335
+ theme,
34336
+ ownerState
34337
+ }) => {
34338
+ const transformedColor = transformDeprecatedColors(ownerState.color);
34339
+ const color = getPath(theme, `palette.${transformedColor}`, false) || ownerState.color;
34340
+ const channelColor = getPath(theme, `palette.${transformedColor}Channel`);
34341
+
34342
+ if ('vars' in theme && channelColor) {
34343
+ return `rgba(${channelColor} / 0.4)`;
34344
+ }
34345
+
34346
+ return alpha(color, 0.4);
34347
+ };
34348
+
34349
+ var getTextDecoration$1 = getTextDecoration;
34350
+
34351
+ const _excluded$10 = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant", "sx"];
34352
+
34347
34353
  const useUtilityClasses$Q = ownerState => {
34348
34354
  const {
34349
34355
  classes,
@@ -34370,7 +34376,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
34370
34376
  theme,
34371
34377
  ownerState
34372
34378
  }) => {
34373
- const color = getPath(theme, `palette.${transformDeprecatedColors(ownerState.color)}`) || ownerState.color;
34374
34379
  return _extends({}, ownerState.underline === 'none' && {
34375
34380
  textDecoration: 'none'
34376
34381
  }, ownerState.underline === 'hover' && {
@@ -34378,13 +34383,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
34378
34383
  '&:hover': {
34379
34384
  textDecoration: 'underline'
34380
34385
  }
34381
- }, ownerState.underline === 'always' && {
34382
- textDecoration: 'underline',
34383
- textDecorationColor: color !== 'inherit' ? alpha(color, 0.4) : undefined,
34386
+ }, ownerState.underline === 'always' && _extends({
34387
+ textDecoration: 'underline'
34388
+ }, ownerState.color !== 'inherit' && {
34389
+ textDecorationColor: getTextDecoration$1({
34390
+ theme,
34391
+ ownerState
34392
+ })
34393
+ }, {
34384
34394
  '&:hover': {
34385
34395
  textDecorationColor: 'inherit'
34386
34396
  }
34387
- }, ownerState.component === 'button' && {
34397
+ }), ownerState.component === 'button' && {
34388
34398
  position: 'relative',
34389
34399
  WebkitTapHighlightColor: 'transparent',
34390
34400
  backgroundColor: 'transparent',
@@ -42010,12 +42020,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
42010
42020
  thumb: PropTypes.object,
42011
42021
  track: PropTypes.object,
42012
42022
  valueLabel: PropTypes.shape({
42023
+ children: PropTypes.element,
42013
42024
  className: PropTypes.string,
42014
42025
  components: PropTypes.shape({
42015
42026
  Root: PropTypes.elementType
42016
42027
  }),
42028
+ open: PropTypes.bool,
42017
42029
  style: PropTypes.object,
42018
- value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
42030
+ value: PropTypes.number,
42019
42031
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
42020
42032
  })
42021
42033
  }),
@@ -42361,16 +42373,11 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
42361
42373
  theme,
42362
42374
  ownerState
42363
42375
  }) => {
42364
- const center = _extends({}, !ownerState.isRtl && {
42376
+ const center = {
42365
42377
  left: '50%',
42366
42378
  right: 'auto',
42367
42379
  transform: 'translateX(-50%)'
42368
- }, ownerState.isRtl && {
42369
- right: '50%',
42370
- left: 'auto',
42371
- transform: 'translateX(50%)'
42372
- });
42373
-
42380
+ };
42374
42381
  return _extends({
42375
42382
  zIndex: (theme.vars || theme).zIndex.snackbar,
42376
42383
  position: 'fixed',
@@ -42392,19 +42399,13 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
42392
42399
  top: 24
42393
42400
  } : {
42394
42401
  bottom: 24
42395
- }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && _extends({}, !ownerState.isRtl && {
42402
+ }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && {
42396
42403
  left: 24,
42397
42404
  right: 'auto'
42398
- }, ownerState.isRtl && {
42399
- right: 24,
42400
- left: 'auto'
42401
- }), ownerState.anchorOrigin.horizontal === 'right' && _extends({}, !ownerState.isRtl && {
42405
+ }, ownerState.anchorOrigin.horizontal === 'right' && {
42402
42406
  right: 24,
42403
42407
  left: 'auto'
42404
- }, ownerState.isRtl && {
42405
- left: 24,
42406
- right: 'auto'
42407
- }))
42408
+ })
42408
42409
  });
42409
42410
  });
42410
42411
  const Snackbar = /*#__PURE__*/React__namespace.forwardRef(function Snackbar(inProps, ref) {
@@ -42451,14 +42452,11 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
42451
42452
  TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded$z),
42452
42453
  other = _objectWithoutPropertiesLoose(props, _excluded2$2);
42453
42454
 
42454
- const isRtl = theme.direction === 'rtl';
42455
-
42456
42455
  const ownerState = _extends({}, props, {
42457
42456
  anchorOrigin: {
42458
42457
  vertical,
42459
42458
  horizontal
42460
- },
42461
- isRtl
42459
+ }
42462
42460
  });
42463
42461
 
42464
42462
  const classes = useUtilityClasses$s(ownerState);
@@ -44820,7 +44818,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
44820
44818
  if (ownerState.spacing) {
44821
44819
  const transformer = createUnarySpacing(theme);
44822
44820
  const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
44823
- if (ownerState.spacing[breakpoint] != null || ownerState.direction[breakpoint] != null) {
44821
+ if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
44824
44822
  acc[breakpoint] = true;
44825
44823
  }
44826
44824
 
@@ -45263,8 +45261,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
45263
45261
  })), /*#__PURE__*/jsxRuntime_1(StepIconText, {
45264
45262
  className: classes.text,
45265
45263
  x: "12",
45266
- y: "16",
45264
+ y: "12",
45267
45265
  textAnchor: "middle",
45266
+ dominantBaseline: "central",
45268
45267
  ownerState: ownerState,
45269
45268
  children: icon
45270
45269
  })]
@@ -49824,10 +49823,26 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
49824
49823
  scroll(scrollValue);
49825
49824
  };
49826
49825
 
49826
+ const getFirstVisibleTab = tabs => {
49827
+ const containerSize = tabsRef.current[clientSize];
49828
+ const containerStartBound = Math.round(tabsRef.current[scrollStart]);
49829
+ const containerEndBound = Math.round(containerStartBound + containerSize);
49830
+ const offset = vertical ? 'offsetTop' : 'offsetLeft';
49831
+ return tabs.find(tab => {
49832
+ const centerPoint = tab[offset] + tab[clientSize] / 2;
49833
+ return centerPoint >= containerStartBound && centerPoint <= containerEndBound;
49834
+ });
49835
+ };
49836
+
49827
49837
  const getScrollSize = () => {
49828
49838
  const containerSize = tabsRef.current[clientSize];
49829
49839
  let totalSize = 0;
49830
49840
  const children = Array.from(tabListRef.current.children);
49841
+ const firstVisibleTab = getFirstVisibleTab(children);
49842
+
49843
+ if (firstVisibleTab && firstVisibleTab[clientSize] > containerSize) {
49844
+ return firstVisibleTab[clientSize];
49845
+ }
49831
49846
 
49832
49847
  for (let i = 0; i < children.length; i += 1) {
49833
49848
  const tab = children[i];
@@ -51520,6 +51535,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
51520
51535
  exports.getMobileStepperUtilityClass = getMobileStepperUtilityClass;
51521
51536
  exports.getModalUtilityClass = getModalUtilityClass;
51522
51537
  exports.getNativeSelectUtilityClasses = getNativeSelectUtilityClasses;
51538
+ exports.getOffsetLeft = getOffsetLeft;
51539
+ exports.getOffsetTop = getOffsetTop;
51523
51540
  exports.getOutlinedInputUtilityClass = getOutlinedInputUtilityClass;
51524
51541
  exports.getPaginationItemUtilityClass = getPaginationItemUtilityClass;
51525
51542
  exports.getPaginationUtilityClass = getPaginationUtilityClass;