@mui/material 5.11.15 → 5.12.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 (115) hide show
  1. package/Autocomplete/Autocomplete.js +9 -1
  2. package/Badge/badgeClasses.d.ts +18 -18
  3. package/Box/Box.js +2 -0
  4. package/CHANGELOG.md +139 -26
  5. package/CardActionArea/CardActionArea.js +2 -0
  6. package/GlobalStyles/GlobalStyles.js +4 -4
  7. package/Menu/Menu.js +1 -1
  8. package/NativeSelect/NativeSelectInput.d.ts +1 -0
  9. package/NativeSelect/NativeSelectInput.js +12 -5
  10. package/NativeSelect/nativeSelectClasses.d.ts +2 -0
  11. package/NativeSelect/nativeSelectClasses.js +1 -1
  12. package/OverridableComponent.d.ts +1 -1
  13. package/PaginationItem/paginationItemClasses.d.ts +2 -2
  14. package/Popper/Popper.js +0 -4
  15. package/README.md +5 -5
  16. package/Select/Select.d.ts +1 -1
  17. package/Select/Select.js +15 -10
  18. package/Select/SelectInput.d.ts +1 -0
  19. package/Select/SelectInput.js +14 -4
  20. package/Select/selectClasses.d.ts +2 -0
  21. package/Select/selectClasses.js +1 -1
  22. package/Slider/Slider.js +6 -6
  23. package/Slider/sliderClasses.d.ts +22 -22
  24. package/Tabs/Tabs.js +1 -1
  25. package/Toolbar/Toolbar.d.ts +1 -1
  26. package/Toolbar/Toolbar.js +1 -1
  27. package/Unstable_Grid2/Grid2.js +1 -0
  28. package/darkScrollbar/index.js +1 -1
  29. package/index.js +1 -1
  30. package/legacy/Autocomplete/Autocomplete.js +8 -3
  31. package/legacy/Box/Box.js +2 -0
  32. package/legacy/CardActionArea/CardActionArea.js +2 -0
  33. package/legacy/GlobalStyles/GlobalStyles.js +4 -4
  34. package/legacy/Menu/Menu.js +1 -1
  35. package/legacy/NativeSelect/NativeSelectInput.js +12 -5
  36. package/legacy/NativeSelect/nativeSelectClasses.js +1 -1
  37. package/legacy/Popper/Popper.js +0 -4
  38. package/legacy/Select/Select.js +15 -10
  39. package/legacy/Select/SelectInput.js +14 -5
  40. package/legacy/Select/selectClasses.js +1 -1
  41. package/legacy/Slider/Slider.js +6 -6
  42. package/legacy/Tabs/Tabs.js +1 -1
  43. package/legacy/Toolbar/Toolbar.js +1 -1
  44. package/legacy/Unstable_Grid2/Grid2.js +1 -0
  45. package/legacy/darkScrollbar/index.js +1 -1
  46. package/legacy/index.js +1 -1
  47. package/legacy/styles/CssVarsProvider.js +2 -0
  48. package/legacy/styles/ThemeProvider.js +19 -1
  49. package/legacy/styles/identifier.js +1 -0
  50. package/legacy/styles/index.js +1 -0
  51. package/legacy/styles/styled.js +2 -0
  52. package/legacy/styles/useTheme.js +2 -1
  53. package/legacy/styles/useThemeProps.js +3 -1
  54. package/modern/Autocomplete/Autocomplete.js +9 -1
  55. package/modern/Box/Box.js +2 -0
  56. package/modern/CardActionArea/CardActionArea.js +2 -0
  57. package/modern/GlobalStyles/GlobalStyles.js +4 -4
  58. package/modern/Menu/Menu.js +1 -1
  59. package/modern/NativeSelect/NativeSelectInput.js +12 -5
  60. package/modern/NativeSelect/nativeSelectClasses.js +1 -1
  61. package/modern/Popper/Popper.js +0 -4
  62. package/modern/Select/Select.js +15 -10
  63. package/modern/Select/SelectInput.js +14 -4
  64. package/modern/Select/selectClasses.js +1 -1
  65. package/modern/Slider/Slider.js +6 -6
  66. package/modern/Tabs/Tabs.js +1 -1
  67. package/modern/Toolbar/Toolbar.js +1 -1
  68. package/modern/Unstable_Grid2/Grid2.js +1 -0
  69. package/modern/darkScrollbar/index.js +1 -1
  70. package/modern/index.js +1 -1
  71. package/modern/styles/CssVarsProvider.js +2 -0
  72. package/modern/styles/ThemeProvider.js +22 -1
  73. package/modern/styles/identifier.js +1 -0
  74. package/modern/styles/index.js +1 -0
  75. package/modern/styles/styled.js +2 -0
  76. package/modern/styles/useTheme.js +2 -1
  77. package/modern/styles/useThemeProps.js +3 -1
  78. package/node/Autocomplete/Autocomplete.js +9 -1
  79. package/node/Box/Box.js +2 -0
  80. package/node/CardActionArea/CardActionArea.js +2 -0
  81. package/node/GlobalStyles/GlobalStyles.js +4 -4
  82. package/node/Menu/Menu.js +1 -1
  83. package/node/NativeSelect/NativeSelectInput.js +12 -5
  84. package/node/NativeSelect/nativeSelectClasses.js +1 -1
  85. package/node/Popper/Popper.js +0 -4
  86. package/node/Select/Select.js +15 -10
  87. package/node/Select/SelectInput.js +14 -4
  88. package/node/Select/selectClasses.js +1 -1
  89. package/node/Slider/Slider.js +6 -6
  90. package/node/Tabs/Tabs.js +1 -1
  91. package/node/Toolbar/Toolbar.js +1 -1
  92. package/node/Unstable_Grid2/Grid2.js +1 -0
  93. package/node/darkScrollbar/index.js +1 -1
  94. package/node/index.js +1 -1
  95. package/node/styles/CssVarsProvider.js +2 -0
  96. package/node/styles/ThemeProvider.js +26 -7
  97. package/node/styles/identifier.js +8 -0
  98. package/node/styles/index.js +8 -0
  99. package/node/styles/styled.js +2 -0
  100. package/node/styles/useTheme.js +2 -1
  101. package/node/styles/useThemeProps.js +3 -1
  102. package/package.json +7 -7
  103. package/styles/CssVarsProvider.d.ts +5 -0
  104. package/styles/CssVarsProvider.js +2 -0
  105. package/styles/ThemeProvider.js +22 -1
  106. package/styles/experimental_extendTheme.d.ts +1 -1
  107. package/styles/identifier.d.ts +2 -0
  108. package/styles/identifier.js +1 -0
  109. package/styles/index.d.ts +1 -0
  110. package/styles/index.js +1 -0
  111. package/styles/styled.js +2 -0
  112. package/styles/useTheme.js +2 -1
  113. package/styles/useThemeProps.js +3 -1
  114. package/umd/material-ui.development.js +660 -533
  115. package/umd/material-ui.production.min.js +21 -21
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.11.15
2
+ * @mui/material v5.12.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -2358,6 +2358,8 @@
2358
2358
  return result;
2359
2359
  }
2360
2360
 
2361
+ var THEME_ID = '$$material';
2362
+
2361
2363
  function _objectWithoutPropertiesLoose(source, excluded) {
2362
2364
  if (source == null) return {};
2363
2365
  var target = {};
@@ -2717,7 +2719,7 @@
2717
2719
  var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
2718
2720
 
2719
2721
  if (unsafePseudoClasses) {
2720
- var isNested = element.parent === children[0]; // in nested rules comments become children of the "auto-inserted" rule
2722
+ var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
2721
2723
  //
2722
2724
  // considering this input:
2723
2725
  // .a {
@@ -2733,7 +2735,7 @@
2733
2735
  // .b {}
2734
2736
  // }
2735
2737
 
2736
- var commentContainer = isNested ? children[0].children : // global rule at the root level
2738
+ var commentContainer = isNested ? element.parent.children : // global rule at the root level
2737
2739
  children;
2738
2740
 
2739
2741
  for (var i = commentContainer.length - 1; i >= 0; i--) {
@@ -5811,7 +5813,7 @@
5811
5813
  function isEmpty$4(obj) {
5812
5814
  return obj === undefined || obj === null || Object.keys(obj).length === 0;
5813
5815
  }
5814
- function GlobalStyles$1(props) {
5816
+ function GlobalStyles$2(props) {
5815
5817
  const {
5816
5818
  styles,
5817
5819
  defaultTheme = {}
@@ -5821,9 +5823,9 @@
5821
5823
  styles: globalStyles
5822
5824
  });
5823
5825
  }
5824
- GlobalStyles$1.propTypes = {
5826
+ GlobalStyles$2.propTypes = {
5825
5827
  defaultTheme: PropTypes.object,
5826
- styles: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func])
5828
+ styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])
5827
5829
  } ;
5828
5830
 
5829
5831
  function styled$3(tag, options) {
@@ -5850,6 +5852,90 @@
5850
5852
  }
5851
5853
  };
5852
5854
 
5855
+ const _excluded$2p = ["values", "unit", "step"];
5856
+ const sortBreakpointsValues = values => {
5857
+ const breakpointsAsArray = Object.keys(values).map(key => ({
5858
+ key,
5859
+ val: values[key]
5860
+ })) || [];
5861
+ // Sort in ascending order
5862
+ breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
5863
+ return breakpointsAsArray.reduce((acc, obj) => {
5864
+ return _extends({}, acc, {
5865
+ [obj.key]: obj.val
5866
+ });
5867
+ }, {});
5868
+ };
5869
+
5870
+ // Keep in mind that @media is inclusive by the CSS specification.
5871
+ function createBreakpoints(breakpoints) {
5872
+ const {
5873
+ // The breakpoint **start** at this value.
5874
+ // For instance with the first breakpoint xs: [xs, sm).
5875
+ values = {
5876
+ xs: 0,
5877
+ // phone
5878
+ sm: 600,
5879
+ // tablet
5880
+ md: 900,
5881
+ // small laptop
5882
+ lg: 1200,
5883
+ // desktop
5884
+ xl: 1536 // large screen
5885
+ },
5886
+
5887
+ unit = 'px',
5888
+ step = 5
5889
+ } = breakpoints,
5890
+ other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2p);
5891
+ const sortedValues = sortBreakpointsValues(values);
5892
+ const keys = Object.keys(sortedValues);
5893
+ function up(key) {
5894
+ const value = typeof values[key] === 'number' ? values[key] : key;
5895
+ return `@media (min-width:${value}${unit})`;
5896
+ }
5897
+ function down(key) {
5898
+ const value = typeof values[key] === 'number' ? values[key] : key;
5899
+ return `@media (max-width:${value - step / 100}${unit})`;
5900
+ }
5901
+ function between(start, end) {
5902
+ const endIndex = keys.indexOf(end);
5903
+ return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
5904
+ }
5905
+ function only(key) {
5906
+ if (keys.indexOf(key) + 1 < keys.length) {
5907
+ return between(key, keys[keys.indexOf(key) + 1]);
5908
+ }
5909
+ return up(key);
5910
+ }
5911
+ function not(key) {
5912
+ // handle first and last key separately, for better readability
5913
+ const keyIndex = keys.indexOf(key);
5914
+ if (keyIndex === 0) {
5915
+ return up(keys[1]);
5916
+ }
5917
+ if (keyIndex === keys.length - 1) {
5918
+ return down(keys[keyIndex]);
5919
+ }
5920
+ return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
5921
+ }
5922
+ return _extends({
5923
+ keys,
5924
+ values: sortedValues,
5925
+ up,
5926
+ down,
5927
+ between,
5928
+ only,
5929
+ not,
5930
+ unit
5931
+ }, other);
5932
+ }
5933
+
5934
+ const shape = {
5935
+ borderRadius: 4
5936
+ };
5937
+ var shape$1 = shape;
5938
+
5853
5939
  const responsivePropType = PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) ;
5854
5940
  var responsivePropType$1 = responsivePropType;
5855
5941
 
@@ -6055,6 +6141,183 @@
6055
6141
  return fn;
6056
6142
  }
6057
6143
 
6144
+ function memoize(fn) {
6145
+ const cache = {};
6146
+ return arg => {
6147
+ if (cache[arg] === undefined) {
6148
+ cache[arg] = fn(arg);
6149
+ }
6150
+ return cache[arg];
6151
+ };
6152
+ }
6153
+
6154
+ const properties = {
6155
+ m: 'margin',
6156
+ p: 'padding'
6157
+ };
6158
+ const directions = {
6159
+ t: 'Top',
6160
+ r: 'Right',
6161
+ b: 'Bottom',
6162
+ l: 'Left',
6163
+ x: ['Left', 'Right'],
6164
+ y: ['Top', 'Bottom']
6165
+ };
6166
+ const aliases = {
6167
+ marginX: 'mx',
6168
+ marginY: 'my',
6169
+ paddingX: 'px',
6170
+ paddingY: 'py'
6171
+ };
6172
+
6173
+ // memoize() impact:
6174
+ // From 300,000 ops/sec
6175
+ // To 350,000 ops/sec
6176
+ const getCssProperties = memoize(prop => {
6177
+ // It's not a shorthand notation.
6178
+ if (prop.length > 2) {
6179
+ if (aliases[prop]) {
6180
+ prop = aliases[prop];
6181
+ } else {
6182
+ return [prop];
6183
+ }
6184
+ }
6185
+ const [a, b] = prop.split('');
6186
+ const property = properties[a];
6187
+ const direction = directions[b] || '';
6188
+ return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];
6189
+ });
6190
+ const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];
6191
+ const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
6192
+ const spacingKeys = [...marginKeys, ...paddingKeys];
6193
+ function createUnaryUnit(theme, themeKey, defaultValue, propName) {
6194
+ var _getPath;
6195
+ const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
6196
+ if (typeof themeSpacing === 'number') {
6197
+ return abs => {
6198
+ if (typeof abs === 'string') {
6199
+ return abs;
6200
+ }
6201
+ {
6202
+ if (typeof abs !== 'number') {
6203
+ console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
6204
+ }
6205
+ }
6206
+ return themeSpacing * abs;
6207
+ };
6208
+ }
6209
+ if (Array.isArray(themeSpacing)) {
6210
+ return abs => {
6211
+ if (typeof abs === 'string') {
6212
+ return abs;
6213
+ }
6214
+ {
6215
+ if (!Number.isInteger(abs)) {
6216
+ console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
6217
+ } else if (abs > themeSpacing.length - 1) {
6218
+ console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
6219
+ }
6220
+ }
6221
+ return themeSpacing[abs];
6222
+ };
6223
+ }
6224
+ if (typeof themeSpacing === 'function') {
6225
+ return themeSpacing;
6226
+ }
6227
+ {
6228
+ console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
6229
+ }
6230
+ return () => undefined;
6231
+ }
6232
+ function createUnarySpacing(theme) {
6233
+ return createUnaryUnit(theme, 'spacing', 8, 'spacing');
6234
+ }
6235
+ function getValue(transformer, propValue) {
6236
+ if (typeof propValue === 'string' || propValue == null) {
6237
+ return propValue;
6238
+ }
6239
+ const abs = Math.abs(propValue);
6240
+ const transformed = transformer(abs);
6241
+ if (propValue >= 0) {
6242
+ return transformed;
6243
+ }
6244
+ if (typeof transformed === 'number') {
6245
+ return -transformed;
6246
+ }
6247
+ return `-${transformed}`;
6248
+ }
6249
+ function getStyleFromPropValue(cssProperties, transformer) {
6250
+ return propValue => cssProperties.reduce((acc, cssProperty) => {
6251
+ acc[cssProperty] = getValue(transformer, propValue);
6252
+ return acc;
6253
+ }, {});
6254
+ }
6255
+ function resolveCssProperty(props, keys, prop, transformer) {
6256
+ // Using a hash computation over an array iteration could be faster, but with only 28 items,
6257
+ // it's doesn't worth the bundle size.
6258
+ if (keys.indexOf(prop) === -1) {
6259
+ return null;
6260
+ }
6261
+ const cssProperties = getCssProperties(prop);
6262
+ const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
6263
+ const propValue = props[prop];
6264
+ return handleBreakpoints(props, propValue, styleFromPropValue);
6265
+ }
6266
+ function style$1(props, keys) {
6267
+ const transformer = createUnarySpacing(props.theme);
6268
+ return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});
6269
+ }
6270
+ function margin(props) {
6271
+ return style$1(props, marginKeys);
6272
+ }
6273
+ margin.propTypes = marginKeys.reduce((obj, key) => {
6274
+ obj[key] = responsivePropType$1;
6275
+ return obj;
6276
+ }, {}) ;
6277
+ margin.filterProps = marginKeys;
6278
+ function padding(props) {
6279
+ return style$1(props, paddingKeys);
6280
+ }
6281
+ padding.propTypes = paddingKeys.reduce((obj, key) => {
6282
+ obj[key] = responsivePropType$1;
6283
+ return obj;
6284
+ }, {}) ;
6285
+ padding.filterProps = paddingKeys;
6286
+ spacingKeys.reduce((obj, key) => {
6287
+ obj[key] = responsivePropType$1;
6288
+ return obj;
6289
+ }, {}) ;
6290
+
6291
+ /* tslint:enable:unified-signatures */
6292
+
6293
+ function createSpacing(spacingInput = 8) {
6294
+ // Already transformed.
6295
+ if (spacingInput.mui) {
6296
+ return spacingInput;
6297
+ }
6298
+
6299
+ // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
6300
+ // Smaller components, such as icons, can align to a 4dp grid.
6301
+ // https://m2.material.io/design/layout/understanding-layout.html
6302
+ const transform = createUnarySpacing({
6303
+ spacing: spacingInput
6304
+ });
6305
+ const spacing = (...argsInput) => {
6306
+ {
6307
+ if (!(argsInput.length <= 4)) {
6308
+ console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
6309
+ }
6310
+ }
6311
+ const args = argsInput.length === 0 ? [1] : argsInput;
6312
+ return args.map(argument => {
6313
+ const output = transform(argument);
6314
+ return typeof output === 'number' ? `${output}px` : output;
6315
+ }).join(' ');
6316
+ };
6317
+ spacing.mui = true;
6318
+ return spacing;
6319
+ }
6320
+
6058
6321
  function compose(...styles) {
6059
6322
  const handlers = styles.reduce((acc, style) => {
6060
6323
  style.filterProps.forEach(prop => {
@@ -6078,153 +6341,6 @@
6078
6341
  return fn;
6079
6342
  }
6080
6343
 
6081
- function memoize(fn) {
6082
- const cache = {};
6083
- return arg => {
6084
- if (cache[arg] === undefined) {
6085
- cache[arg] = fn(arg);
6086
- }
6087
- return cache[arg];
6088
- };
6089
- }
6090
-
6091
- const properties = {
6092
- m: 'margin',
6093
- p: 'padding'
6094
- };
6095
- const directions = {
6096
- t: 'Top',
6097
- r: 'Right',
6098
- b: 'Bottom',
6099
- l: 'Left',
6100
- x: ['Left', 'Right'],
6101
- y: ['Top', 'Bottom']
6102
- };
6103
- const aliases = {
6104
- marginX: 'mx',
6105
- marginY: 'my',
6106
- paddingX: 'px',
6107
- paddingY: 'py'
6108
- };
6109
-
6110
- // memoize() impact:
6111
- // From 300,000 ops/sec
6112
- // To 350,000 ops/sec
6113
- const getCssProperties = memoize(prop => {
6114
- // It's not a shorthand notation.
6115
- if (prop.length > 2) {
6116
- if (aliases[prop]) {
6117
- prop = aliases[prop];
6118
- } else {
6119
- return [prop];
6120
- }
6121
- }
6122
- const [a, b] = prop.split('');
6123
- const property = properties[a];
6124
- const direction = directions[b] || '';
6125
- return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];
6126
- });
6127
- const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];
6128
- const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
6129
- const spacingKeys = [...marginKeys, ...paddingKeys];
6130
- function createUnaryUnit(theme, themeKey, defaultValue, propName) {
6131
- var _getPath;
6132
- const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
6133
- if (typeof themeSpacing === 'number') {
6134
- return abs => {
6135
- if (typeof abs === 'string') {
6136
- return abs;
6137
- }
6138
- {
6139
- if (typeof abs !== 'number') {
6140
- console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
6141
- }
6142
- }
6143
- return themeSpacing * abs;
6144
- };
6145
- }
6146
- if (Array.isArray(themeSpacing)) {
6147
- return abs => {
6148
- if (typeof abs === 'string') {
6149
- return abs;
6150
- }
6151
- {
6152
- if (!Number.isInteger(abs)) {
6153
- console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
6154
- } else if (abs > themeSpacing.length - 1) {
6155
- console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
6156
- }
6157
- }
6158
- return themeSpacing[abs];
6159
- };
6160
- }
6161
- if (typeof themeSpacing === 'function') {
6162
- return themeSpacing;
6163
- }
6164
- {
6165
- console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
6166
- }
6167
- return () => undefined;
6168
- }
6169
- function createUnarySpacing(theme) {
6170
- return createUnaryUnit(theme, 'spacing', 8, 'spacing');
6171
- }
6172
- function getValue(transformer, propValue) {
6173
- if (typeof propValue === 'string' || propValue == null) {
6174
- return propValue;
6175
- }
6176
- const abs = Math.abs(propValue);
6177
- const transformed = transformer(abs);
6178
- if (propValue >= 0) {
6179
- return transformed;
6180
- }
6181
- if (typeof transformed === 'number') {
6182
- return -transformed;
6183
- }
6184
- return `-${transformed}`;
6185
- }
6186
- function getStyleFromPropValue(cssProperties, transformer) {
6187
- return propValue => cssProperties.reduce((acc, cssProperty) => {
6188
- acc[cssProperty] = getValue(transformer, propValue);
6189
- return acc;
6190
- }, {});
6191
- }
6192
- function resolveCssProperty(props, keys, prop, transformer) {
6193
- // Using a hash computation over an array iteration could be faster, but with only 28 items,
6194
- // it's doesn't worth the bundle size.
6195
- if (keys.indexOf(prop) === -1) {
6196
- return null;
6197
- }
6198
- const cssProperties = getCssProperties(prop);
6199
- const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
6200
- const propValue = props[prop];
6201
- return handleBreakpoints(props, propValue, styleFromPropValue);
6202
- }
6203
- function style$1(props, keys) {
6204
- const transformer = createUnarySpacing(props.theme);
6205
- return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});
6206
- }
6207
- function margin(props) {
6208
- return style$1(props, marginKeys);
6209
- }
6210
- margin.propTypes = marginKeys.reduce((obj, key) => {
6211
- obj[key] = responsivePropType$1;
6212
- return obj;
6213
- }, {}) ;
6214
- margin.filterProps = marginKeys;
6215
- function padding(props) {
6216
- return style$1(props, paddingKeys);
6217
- }
6218
- padding.propTypes = paddingKeys.reduce((obj, key) => {
6219
- obj[key] = responsivePropType$1;
6220
- return obj;
6221
- }, {}) ;
6222
- padding.filterProps = paddingKeys;
6223
- spacingKeys.reduce((obj, key) => {
6224
- obj[key] = responsivePropType$1;
6225
- return obj;
6226
- }, {}) ;
6227
-
6228
6344
  function borderTransform(value) {
6229
6345
  if (typeof value !== 'number') {
6230
6346
  return value;
@@ -6852,168 +6968,7 @@
6852
6968
  styleFunctionSx.filterProps = ['sx'];
6853
6969
  var styleFunctionSx$1 = styleFunctionSx;
6854
6970
 
6855
- const _excluded$2o = ["sx"];
6856
- const splitProps = props => {
6857
- var _props$theme$unstable, _props$theme;
6858
- const result = {
6859
- systemProps: {},
6860
- otherProps: {}
6861
- };
6862
- const config = (_props$theme$unstable = props == null ? void 0 : (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig$1;
6863
- Object.keys(props).forEach(prop => {
6864
- if (config[prop]) {
6865
- result.systemProps[prop] = props[prop];
6866
- } else {
6867
- result.otherProps[prop] = props[prop];
6868
- }
6869
- });
6870
- return result;
6871
- };
6872
- function extendSxProp(props) {
6873
- const {
6874
- sx: inSx
6875
- } = props,
6876
- other = _objectWithoutPropertiesLoose(props, _excluded$2o);
6877
- const {
6878
- systemProps,
6879
- otherProps
6880
- } = splitProps(other);
6881
- let finalSx;
6882
- if (Array.isArray(inSx)) {
6883
- finalSx = [systemProps, ...inSx];
6884
- } else if (typeof inSx === 'function') {
6885
- finalSx = (...args) => {
6886
- const result = inSx(...args);
6887
- if (!isPlainObject(result)) {
6888
- return systemProps;
6889
- }
6890
- return _extends({}, systemProps, result);
6891
- };
6892
- } else {
6893
- finalSx = _extends({}, systemProps, inSx);
6894
- }
6895
- return _extends({}, otherProps, {
6896
- sx: finalSx
6897
- });
6898
- }
6899
-
6900
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
6901
-
6902
- const _excluded$2n = ["values", "unit", "step"];
6903
- const sortBreakpointsValues = values => {
6904
- const breakpointsAsArray = Object.keys(values).map(key => ({
6905
- key,
6906
- val: values[key]
6907
- })) || [];
6908
- // Sort in ascending order
6909
- breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
6910
- return breakpointsAsArray.reduce((acc, obj) => {
6911
- return _extends({}, acc, {
6912
- [obj.key]: obj.val
6913
- });
6914
- }, {});
6915
- };
6916
-
6917
- // Keep in mind that @media is inclusive by the CSS specification.
6918
- function createBreakpoints(breakpoints) {
6919
- const {
6920
- // The breakpoint **start** at this value.
6921
- // For instance with the first breakpoint xs: [xs, sm).
6922
- values = {
6923
- xs: 0,
6924
- // phone
6925
- sm: 600,
6926
- // tablet
6927
- md: 900,
6928
- // small laptop
6929
- lg: 1200,
6930
- // desktop
6931
- xl: 1536 // large screen
6932
- },
6933
-
6934
- unit = 'px',
6935
- step = 5
6936
- } = breakpoints,
6937
- other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2n);
6938
- const sortedValues = sortBreakpointsValues(values);
6939
- const keys = Object.keys(sortedValues);
6940
- function up(key) {
6941
- const value = typeof values[key] === 'number' ? values[key] : key;
6942
- return `@media (min-width:${value}${unit})`;
6943
- }
6944
- function down(key) {
6945
- const value = typeof values[key] === 'number' ? values[key] : key;
6946
- return `@media (max-width:${value - step / 100}${unit})`;
6947
- }
6948
- function between(start, end) {
6949
- const endIndex = keys.indexOf(end);
6950
- return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
6951
- }
6952
- function only(key) {
6953
- if (keys.indexOf(key) + 1 < keys.length) {
6954
- return between(key, keys[keys.indexOf(key) + 1]);
6955
- }
6956
- return up(key);
6957
- }
6958
- function not(key) {
6959
- // handle first and last key separately, for better readability
6960
- const keyIndex = keys.indexOf(key);
6961
- if (keyIndex === 0) {
6962
- return up(keys[1]);
6963
- }
6964
- if (keyIndex === keys.length - 1) {
6965
- return down(keys[keyIndex]);
6966
- }
6967
- return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
6968
- }
6969
- return _extends({
6970
- keys,
6971
- values: sortedValues,
6972
- up,
6973
- down,
6974
- between,
6975
- only,
6976
- not,
6977
- unit
6978
- }, other);
6979
- }
6980
-
6981
- const shape = {
6982
- borderRadius: 4
6983
- };
6984
- var shape$1 = shape;
6985
-
6986
- /* tslint:enable:unified-signatures */
6987
-
6988
- function createSpacing(spacingInput = 8) {
6989
- // Already transformed.
6990
- if (spacingInput.mui) {
6991
- return spacingInput;
6992
- }
6993
-
6994
- // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
6995
- // Smaller components, such as icons, can align to a 4dp grid.
6996
- // https://m2.material.io/design/layout/understanding-layout.html
6997
- const transform = createUnarySpacing({
6998
- spacing: spacingInput
6999
- });
7000
- const spacing = (...argsInput) => {
7001
- {
7002
- if (!(argsInput.length <= 4)) {
7003
- console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
7004
- }
7005
- }
7006
- const args = argsInput.length === 0 ? [1] : argsInput;
7007
- return args.map(argument => {
7008
- const output = transform(argument);
7009
- return typeof output === 'number' ? `${output}px` : output;
7010
- }).join(' ');
7011
- };
7012
- spacing.mui = true;
7013
- return spacing;
7014
- }
7015
-
7016
- const _excluded$2m = ["breakpoints", "palette", "spacing", "shape"];
6971
+ const _excluded$2o = ["breakpoints", "palette", "spacing", "shape"];
7017
6972
  function createTheme$1(options = {}, ...args) {
7018
6973
  const {
7019
6974
  breakpoints: breakpointsInput = {},
@@ -7021,7 +6976,7 @@
7021
6976
  spacing: spacingInput,
7022
6977
  shape: shapeInput = {}
7023
6978
  } = options,
7024
- other = _objectWithoutPropertiesLoose(options, _excluded$2m);
6979
+ other = _objectWithoutPropertiesLoose(options, _excluded$2o);
7025
6980
  const breakpoints = createBreakpoints(breakpointsInput);
7026
6981
  const spacing = createSpacing(spacingInput);
7027
6982
  let muiTheme = deepmerge({
@@ -7046,95 +7001,100 @@
7046
7001
  return muiTheme;
7047
7002
  }
7048
7003
 
7049
- const ThemeContext = /*#__PURE__*/React__namespace.createContext(null);
7050
- {
7051
- ThemeContext.displayName = 'ThemeContext';
7004
+ function isObjectEmpty(obj) {
7005
+ return Object.keys(obj).length === 0;
7052
7006
  }
7053
- var ThemeContext$1 = ThemeContext;
7054
-
7055
- function useTheme$3() {
7056
- const theme = React__namespace.useContext(ThemeContext$1);
7057
- {
7058
- // eslint-disable-next-line react-hooks/rules-of-hooks
7059
- React__namespace.useDebugValue(theme);
7060
- }
7061
- return theme;
7007
+ function useTheme$3(defaultTheme = null) {
7008
+ const contextTheme = React__namespace.useContext(ThemeContext$2);
7009
+ return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
7062
7010
  }
7063
7011
 
7064
- const hasSymbol = typeof Symbol === 'function' && Symbol.for;
7065
- var nested = hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';
7066
-
7067
- function mergeOuterLocalTheme(outerTheme, localTheme) {
7068
- if (typeof localTheme === 'function') {
7069
- const mergedTheme = localTheme(outerTheme);
7070
- {
7071
- if (!mergedTheme) {
7072
- console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
7073
- }
7074
- }
7075
- return mergedTheme;
7076
- }
7077
- return _extends({}, outerTheme, localTheme);
7012
+ const systemDefaultTheme$1 = createTheme$1();
7013
+ function useTheme$2(defaultTheme = systemDefaultTheme$1) {
7014
+ return useTheme$3(defaultTheme);
7078
7015
  }
7079
7016
 
7080
- /**
7081
- * This component takes a `theme` prop.
7082
- * It makes the `theme` available down the React tree thanks to React context.
7083
- * This component should preferably be used at **the root of your component tree**.
7084
- */
7085
- function ThemeProvider$1(props) {
7086
- const {
7087
- children,
7088
- theme: localTheme
7089
- } = props;
7090
- const outerTheme = useTheme$3();
7091
- {
7092
- if (outerTheme === null && typeof localTheme === 'function') {
7093
- console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
7094
- }
7095
- }
7096
- const theme = React__namespace.useMemo(() => {
7097
- const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
7098
- if (output != null) {
7099
- output[nested] = outerTheme !== null;
7100
- }
7101
- return output;
7102
- }, [localTheme, outerTheme]);
7103
- return /*#__PURE__*/jsxRuntime_1(ThemeContext$1.Provider, {
7104
- value: theme,
7105
- children: children
7017
+ function GlobalStyles$1({
7018
+ styles,
7019
+ themeId,
7020
+ defaultTheme = {}
7021
+ }) {
7022
+ const upperTheme = useTheme$2(defaultTheme);
7023
+ const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;
7024
+ return /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
7025
+ styles: globalStyles
7106
7026
  });
7107
7027
  }
7108
- ThemeProvider$1.propTypes = {
7028
+ GlobalStyles$1.propTypes /* remove-proptypes */ = {
7029
+ // ----------------------------- Warning --------------------------------
7030
+ // | These PropTypes are generated from the TypeScript type definitions |
7031
+ // | To update them edit TypeScript types and run "yarn proptypes" |
7032
+ // ----------------------------------------------------------------------
7109
7033
  /**
7110
- * Your component tree.
7034
+ * @ignore
7111
7035
  */
7112
- children: PropTypes.node,
7036
+ defaultTheme: PropTypes.object,
7113
7037
  /**
7114
- * A theme object. You can provide a function to extend the outer theme.
7038
+ * @ignore
7115
7039
  */
7116
- theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
7040
+ styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),
7041
+ /**
7042
+ * @ignore
7043
+ */
7044
+ themeId: PropTypes.string
7117
7045
  } ;
7118
- {
7119
- ThemeProvider$1.propTypes = exactProp(ThemeProvider$1.propTypes) ;
7120
- }
7121
7046
 
7122
- function isObjectEmpty(obj) {
7123
- return Object.keys(obj).length === 0;
7124
- }
7125
- function useTheme$2(defaultTheme = null) {
7126
- const contextTheme = useTheme$3();
7127
- return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
7047
+ const _excluded$2n = ["sx"];
7048
+ const splitProps = props => {
7049
+ var _props$theme$unstable, _props$theme;
7050
+ const result = {
7051
+ systemProps: {},
7052
+ otherProps: {}
7053
+ };
7054
+ const config = (_props$theme$unstable = props == null ? void 0 : (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig$1;
7055
+ Object.keys(props).forEach(prop => {
7056
+ if (config[prop]) {
7057
+ result.systemProps[prop] = props[prop];
7058
+ } else {
7059
+ result.otherProps[prop] = props[prop];
7060
+ }
7061
+ });
7062
+ return result;
7063
+ };
7064
+ function extendSxProp(props) {
7065
+ const {
7066
+ sx: inSx
7067
+ } = props,
7068
+ other = _objectWithoutPropertiesLoose(props, _excluded$2n);
7069
+ const {
7070
+ systemProps,
7071
+ otherProps
7072
+ } = splitProps(other);
7073
+ let finalSx;
7074
+ if (Array.isArray(inSx)) {
7075
+ finalSx = [systemProps, ...inSx];
7076
+ } else if (typeof inSx === 'function') {
7077
+ finalSx = (...args) => {
7078
+ const result = inSx(...args);
7079
+ if (!isPlainObject(result)) {
7080
+ return systemProps;
7081
+ }
7082
+ return _extends({}, systemProps, result);
7083
+ };
7084
+ } else {
7085
+ finalSx = _extends({}, systemProps, inSx);
7086
+ }
7087
+ return _extends({}, otherProps, {
7088
+ sx: finalSx
7089
+ });
7128
7090
  }
7129
7091
 
7130
- const systemDefaultTheme$1 = createTheme$1();
7131
- function useTheme$1(defaultTheme = systemDefaultTheme$1) {
7132
- return useTheme$2(defaultTheme);
7133
- }
7092
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
7134
7093
 
7135
- const _excluded$2l = ["className", "component"];
7094
+ const _excluded$2m = ["className", "component"];
7136
7095
  function createBox(options = {}) {
7137
7096
  const {
7097
+ themeId,
7138
7098
  defaultTheme,
7139
7099
  defaultClassName = 'MuiBox-root',
7140
7100
  generateClassName
@@ -7143,24 +7103,24 @@
7143
7103
  shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
7144
7104
  })(styleFunctionSx$1);
7145
7105
  const Box = /*#__PURE__*/React__namespace.forwardRef(function Box(inProps, ref) {
7146
- const theme = useTheme$1(defaultTheme);
7106
+ const theme = useTheme$2(defaultTheme);
7147
7107
  const _extendSxProp = extendSxProp(inProps),
7148
7108
  {
7149
7109
  className,
7150
7110
  component = 'div'
7151
7111
  } = _extendSxProp,
7152
- other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2l);
7112
+ other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2m);
7153
7113
  return /*#__PURE__*/jsxRuntime_1(BoxRoot, _extends({
7154
7114
  as: component,
7155
7115
  ref: ref,
7156
7116
  className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
7157
- theme: theme
7117
+ theme: themeId ? theme[themeId] || theme : theme
7158
7118
  }, other));
7159
7119
  });
7160
7120
  return Box;
7161
7121
  }
7162
7122
 
7163
- const _excluded$2k = ["variant"];
7123
+ const _excluded$2l = ["variant"];
7164
7124
  function isEmpty$3(string) {
7165
7125
  return string.length === 0;
7166
7126
  }
@@ -7174,7 +7134,7 @@
7174
7134
  const {
7175
7135
  variant
7176
7136
  } = props,
7177
- other = _objectWithoutPropertiesLoose(props, _excluded$2k);
7137
+ other = _objectWithoutPropertiesLoose(props, _excluded$2l);
7178
7138
  let classKey = variant || '';
7179
7139
  Object.keys(other).sort().forEach(key => {
7180
7140
  if (key === 'color') {
@@ -7186,9 +7146,7 @@
7186
7146
  return classKey;
7187
7147
  }
7188
7148
 
7189
- const _excluded$2j = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
7190
- _excluded2$d = ["theme"],
7191
- _excluded3$1 = ["theme"];
7149
+ const _excluded$2k = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
7192
7150
  function isEmpty$2(obj) {
7193
7151
  return Object.keys(obj).length === 0;
7194
7152
  }
@@ -7250,16 +7208,26 @@
7250
7208
  const lowercaseFirstLetter = string => {
7251
7209
  return string.charAt(0).toLowerCase() + string.slice(1);
7252
7210
  };
7211
+ function resolveTheme({
7212
+ defaultTheme,
7213
+ theme,
7214
+ themeId
7215
+ }) {
7216
+ return isEmpty$2(theme) ? defaultTheme : theme[themeId] || theme;
7217
+ }
7253
7218
  function createStyled(input = {}) {
7254
7219
  const {
7220
+ themeId,
7255
7221
  defaultTheme = systemDefaultTheme,
7256
7222
  rootShouldForwardProp = shouldForwardProp,
7257
7223
  slotShouldForwardProp = shouldForwardProp
7258
7224
  } = input;
7259
7225
  const systemSx = props => {
7260
- const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
7261
7226
  return styleFunctionSx$1(_extends({}, props, {
7262
- theme
7227
+ theme: resolveTheme(_extends({}, props, {
7228
+ defaultTheme,
7229
+ themeId
7230
+ }))
7263
7231
  }));
7264
7232
  };
7265
7233
  systemSx.__mui_systemSx = true;
@@ -7273,7 +7241,7 @@
7273
7241
  skipSx: inputSkipSx,
7274
7242
  overridesResolver
7275
7243
  } = inputOptions,
7276
- options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2j);
7244
+ options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2k);
7277
7245
 
7278
7246
  // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
7279
7247
  const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
@@ -7303,20 +7271,22 @@
7303
7271
  // On the server Emotion doesn't use React.forwardRef for creating components, so the created
7304
7272
  // component stays as a function. This condition makes sure that we do not interpolate functions
7305
7273
  // which are basically components used as a selectors.
7306
- return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? _ref => {
7307
- let {
7308
- theme: themeInput
7309
- } = _ref,
7310
- other = _objectWithoutPropertiesLoose(_ref, _excluded2$d);
7311
- return stylesArg(_extends({
7312
- theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
7313
- }, other));
7274
+ return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? props => {
7275
+ return stylesArg(_extends({}, props, {
7276
+ theme: resolveTheme(_extends({}, props, {
7277
+ defaultTheme,
7278
+ themeId
7279
+ }))
7280
+ }));
7314
7281
  } : stylesArg;
7315
7282
  }) : [];
7316
7283
  let transformedStyleArg = styleArg;
7317
7284
  if (componentName && overridesResolver) {
7318
7285
  expressionsWithDefaultTheme.push(props => {
7319
- const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
7286
+ const theme = resolveTheme(_extends({}, props, {
7287
+ defaultTheme,
7288
+ themeId
7289
+ }));
7320
7290
  const styleOverrides = getStyleOverrides(componentName, theme);
7321
7291
  if (styleOverrides) {
7322
7292
  const resolvedStyleOverrides = {};
@@ -7332,7 +7302,10 @@
7332
7302
  }
7333
7303
  if (componentName && !skipVariantsResolver) {
7334
7304
  expressionsWithDefaultTheme.push(props => {
7335
- const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
7305
+ const theme = resolveTheme(_extends({}, props, {
7306
+ defaultTheme,
7307
+ themeId
7308
+ }));
7336
7309
  return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
7337
7310
  });
7338
7311
  }
@@ -7351,15 +7324,12 @@
7351
7324
  // which are basically components used as a selectors.
7352
7325
  styleArg.__emotion_real !== styleArg) {
7353
7326
  // If the type is function, we need to define the default theme.
7354
- transformedStyleArg = _ref2 => {
7355
- let {
7356
- theme: themeInput
7357
- } = _ref2,
7358
- other = _objectWithoutPropertiesLoose(_ref2, _excluded3$1);
7359
- return styleArg(_extends({
7360
- theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
7361
- }, other));
7362
- };
7327
+ transformedStyleArg = props => styleArg(_extends({}, props, {
7328
+ theme: resolveTheme(_extends({}, props, {
7329
+ defaultTheme,
7330
+ themeId
7331
+ }))
7332
+ }));
7363
7333
  }
7364
7334
  const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
7365
7335
  {
@@ -7399,9 +7369,13 @@
7399
7369
  function useThemeProps$1({
7400
7370
  props,
7401
7371
  name,
7402
- defaultTheme
7372
+ defaultTheme,
7373
+ themeId
7403
7374
  }) {
7404
- const theme = useTheme$1(defaultTheme);
7375
+ let theme = useTheme$2(defaultTheme);
7376
+ if (themeId) {
7377
+ theme = theme[themeId] || theme;
7378
+ }
7405
7379
  const mergedProps = getThemeProps({
7406
7380
  theme,
7407
7381
  name,
@@ -7735,38 +7709,132 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7735
7709
  }
7736
7710
  }
7737
7711
 
7738
- const EMPTY_THEME = {};
7739
- function InnerThemeProvider(props) {
7740
- const theme = useTheme$1();
7741
- return /*#__PURE__*/jsxRuntime_1(ThemeContext$2.Provider, {
7742
- value: typeof theme === 'object' ? theme : EMPTY_THEME,
7743
- children: props.children
7712
+ const ThemeContext = /*#__PURE__*/React__namespace.createContext(null);
7713
+ {
7714
+ ThemeContext.displayName = 'ThemeContext';
7715
+ }
7716
+ var ThemeContext$1 = ThemeContext;
7717
+
7718
+ function useTheme$1() {
7719
+ const theme = React__namespace.useContext(ThemeContext$1);
7720
+ {
7721
+ // eslint-disable-next-line react-hooks/rules-of-hooks
7722
+ React__namespace.useDebugValue(theme);
7723
+ }
7724
+ return theme;
7725
+ }
7726
+
7727
+ const hasSymbol = typeof Symbol === 'function' && Symbol.for;
7728
+ var nested = hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';
7729
+
7730
+ function mergeOuterLocalTheme(outerTheme, localTheme) {
7731
+ if (typeof localTheme === 'function') {
7732
+ const mergedTheme = localTheme(outerTheme);
7733
+ {
7734
+ if (!mergedTheme) {
7735
+ console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
7736
+ }
7737
+ }
7738
+ return mergedTheme;
7739
+ }
7740
+ return _extends({}, outerTheme, localTheme);
7741
+ }
7742
+
7743
+ /**
7744
+ * This component takes a `theme` prop.
7745
+ * It makes the `theme` available down the React tree thanks to React context.
7746
+ * This component should preferably be used at **the root of your component tree**.
7747
+ */
7748
+ function ThemeProvider$2(props) {
7749
+ const {
7750
+ children,
7751
+ theme: localTheme
7752
+ } = props;
7753
+ const outerTheme = useTheme$1();
7754
+ {
7755
+ if (outerTheme === null && typeof localTheme === 'function') {
7756
+ console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
7757
+ }
7758
+ }
7759
+ const theme = React__namespace.useMemo(() => {
7760
+ const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
7761
+ if (output != null) {
7762
+ output[nested] = outerTheme !== null;
7763
+ }
7764
+ return output;
7765
+ }, [localTheme, outerTheme]);
7766
+ return /*#__PURE__*/jsxRuntime_1(ThemeContext$1.Provider, {
7767
+ value: theme,
7768
+ children: children
7744
7769
  });
7745
7770
  }
7746
- InnerThemeProvider.propTypes = {
7771
+ ThemeProvider$2.propTypes = {
7747
7772
  /**
7748
7773
  * Your component tree.
7749
7774
  */
7750
- children: PropTypes.node
7775
+ children: PropTypes.node,
7776
+ /**
7777
+ * A theme object. You can provide a function to extend the outer theme.
7778
+ */
7779
+ theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
7751
7780
  } ;
7781
+ {
7782
+ ThemeProvider$2.propTypes = exactProp(ThemeProvider$2.propTypes) ;
7783
+ }
7784
+
7785
+ const EMPTY_THEME = {};
7786
+ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
7787
+ return React__namespace.useMemo(() => {
7788
+ const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
7789
+ if (typeof localTheme === 'function') {
7790
+ const mergedTheme = localTheme(resolvedTheme);
7791
+ const result = themeId ? _extends({}, upperTheme, {
7792
+ [themeId]: mergedTheme
7793
+ }) : mergedTheme;
7794
+ // must return a function for the private theme to NOT merge with the upper theme.
7795
+ // see the test case "use provided theme from a callback" in ThemeProvider.test.js
7796
+ if (isPrivate) {
7797
+ return () => result;
7798
+ }
7799
+ return result;
7800
+ }
7801
+ return themeId ? _extends({}, upperTheme, {
7802
+ [themeId]: localTheme
7803
+ }) : _extends({}, upperTheme, localTheme);
7804
+ }, [themeId, upperTheme, localTheme, isPrivate]);
7805
+ }
7752
7806
 
7753
7807
  /**
7754
7808
  * This component makes the `theme` available down the React tree.
7755
7809
  * It should preferably be used at **the root of your component tree**.
7810
+ *
7811
+ * <ThemeProvider theme={theme}> // existing use case
7812
+ * <ThemeProvider theme={{ id: theme }}> // theme scoping
7756
7813
  */
7757
- function ThemeProvider(props) {
7814
+ function ThemeProvider$1(props) {
7758
7815
  const {
7759
7816
  children,
7760
- theme: localTheme
7761
- } = props;
7762
- return /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, {
7763
7817
  theme: localTheme,
7764
- children: /*#__PURE__*/jsxRuntime_1(InnerThemeProvider, {
7818
+ themeId
7819
+ } = props;
7820
+ const upperTheme = useTheme$3(EMPTY_THEME);
7821
+ const upperPrivateTheme = useTheme$1() || EMPTY_THEME;
7822
+ {
7823
+ if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {
7824
+ console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
7825
+ }
7826
+ }
7827
+ const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
7828
+ const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
7829
+ return /*#__PURE__*/jsxRuntime_1(ThemeProvider$2, {
7830
+ theme: privateTheme,
7831
+ children: /*#__PURE__*/jsxRuntime_1(ThemeContext$2.Provider, {
7832
+ value: engineTheme,
7765
7833
  children: children
7766
7834
  })
7767
7835
  });
7768
7836
  }
7769
- ThemeProvider.propTypes /* remove-proptypes */ = {
7837
+ ThemeProvider$1.propTypes /* remove-proptypes */ = {
7770
7838
  // ----------------------------- Warning --------------------------------
7771
7839
  // | These PropTypes are generated from the TypeScript type definitions |
7772
7840
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -7778,10 +7846,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7778
7846
  /**
7779
7847
  * A theme object. You can provide a function to extend the outer theme.
7780
7848
  */
7781
- theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired
7849
+ theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,
7850
+ /**
7851
+ * The design system's unique id for getting the corresponded theme when there are multiple design systems.
7852
+ */
7853
+ themeId: PropTypes.string
7782
7854
  } ;
7783
7855
  {
7784
- ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) ;
7856
+ ThemeProvider$1.propTypes = exactProp(ThemeProvider$1.propTypes) ;
7785
7857
  }
7786
7858
 
7787
7859
  const DEFAULT_MODE_STORAGE_KEY = 'mode';
@@ -8043,10 +8115,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8043
8115
  });
8044
8116
  }
8045
8117
 
8046
- const _excluded$2i = ["colorSchemes", "components", "generateCssVars", "cssVarPrefix"];
8118
+ const _excluded$2j = ["colorSchemes", "components", "generateCssVars", "cssVarPrefix"];
8047
8119
  const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
8048
8120
  function createCssVarsProvider(options) {
8049
8121
  const {
8122
+ themeId,
8050
8123
  theme: defaultTheme = {},
8051
8124
  attribute: defaultAttribute = DEFAULT_ATTRIBUTE,
8052
8125
  modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,
@@ -8085,10 +8158,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8085
8158
  disableStyleSheetGeneration = false
8086
8159
  }) {
8087
8160
  const hasMounted = React__namespace.useRef(false);
8088
- const upperTheme = useTheme$3();
8161
+ const upperTheme = useTheme$1();
8089
8162
  const ctx = React__namespace.useContext(ColorSchemeContext);
8090
8163
  const nested = !!ctx && !disableNestedContext;
8091
- const {
8164
+ const scopedTheme = themeProp[themeId];
8165
+ const _ref = scopedTheme || themeProp,
8166
+ {
8092
8167
  colorSchemes = {},
8093
8168
  components = {},
8094
8169
  generateCssVars = () => ({
@@ -8096,8 +8171,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8096
8171
  css: {}
8097
8172
  }),
8098
8173
  cssVarPrefix
8099
- } = themeProp,
8100
- restThemeProp = _objectWithoutPropertiesLoose(themeProp, _excluded$2i);
8174
+ } = _ref,
8175
+ restThemeProp = _objectWithoutPropertiesLoose(_ref, _excluded$2j);
8101
8176
  const allColorSchemes = Object.keys(colorSchemes);
8102
8177
  const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
8103
8178
  const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
@@ -8263,16 +8338,17 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8263
8338
  }
8264
8339
  const element = /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
8265
8340
  children: [shouldGenerateStyleSheet && /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
8266
- children: [/*#__PURE__*/jsxRuntime_1(GlobalStyles$1, {
8341
+ children: [/*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
8267
8342
  styles: {
8268
8343
  [colorSchemeSelector]: rootCss
8269
8344
  }
8270
- }), /*#__PURE__*/jsxRuntime_1(GlobalStyles$1, {
8345
+ }), /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
8271
8346
  styles: defaultColorSchemeStyleSheet
8272
- }), /*#__PURE__*/jsxRuntime_1(GlobalStyles$1, {
8347
+ }), /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
8273
8348
  styles: otherColorSchemesStyleSheet
8274
8349
  })]
8275
- }), /*#__PURE__*/jsxRuntime_1(ThemeProvider, {
8350
+ }), /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, {
8351
+ themeId: scopedTheme ? themeId : undefined,
8276
8352
  theme: resolveTheme ? resolveTheme(theme) : theme,
8277
8353
  children: children
8278
8354
  })]
@@ -8516,14 +8592,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8516
8592
  };
8517
8593
  }
8518
8594
 
8519
- const _excluded$2h = ["colorSchemes", "components"],
8595
+ const _excluded$2i = ["colorSchemes", "components"],
8520
8596
  _excluded2$c = ["light"];
8521
8597
  function prepareCssVars(theme, parserConfig) {
8522
8598
  // @ts-ignore - ignore components do not exist
8523
8599
  const {
8524
8600
  colorSchemes = {}
8525
8601
  } = theme,
8526
- otherTheme = _objectWithoutPropertiesLoose(theme, _excluded$2h);
8602
+ otherTheme = _objectWithoutPropertiesLoose(theme, _excluded$2i);
8527
8603
  const {
8528
8604
  vars: rootVars,
8529
8605
  css: rootCss,
@@ -8575,7 +8651,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8575
8651
  };
8576
8652
  }
8577
8653
 
8578
- const _excluded$2g = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
8654
+ const _excluded$2h = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
8579
8655
  const defaultTheme$6 = createTheme$1();
8580
8656
  const defaultCreateStyledComponent$2 = systemStyled('div', {
8581
8657
  name: 'MuiContainer',
@@ -8671,7 +8747,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8671
8747
  fixed = false,
8672
8748
  maxWidth = 'lg'
8673
8749
  } = props,
8674
- other = _objectWithoutPropertiesLoose(props, _excluded$2g);
8750
+ other = _objectWithoutPropertiesLoose(props, _excluded$2h);
8675
8751
  const ownerState = _extends({}, props, {
8676
8752
  component,
8677
8753
  disableGutters,
@@ -8972,7 +9048,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8972
9048
  return [`direction-xs-${String(direction)}`];
8973
9049
  };
8974
9050
 
8975
- const _excluded$2f = ["className", "columns", "container", "component", "direction", "wrap", "spacing", "rowSpacing", "columnSpacing", "disableEqualOverflow"];
9051
+ const _excluded$2g = ["className", "columns", "container", "component", "direction", "wrap", "spacing", "rowSpacing", "columnSpacing", "disableEqualOverflow"];
8976
9052
  const defaultTheme$5 = createTheme$1();
8977
9053
 
8978
9054
  // widening Theme to any so that the consumer can own the theme structure.
@@ -9013,7 +9089,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9013
9089
  const GridRoot = createStyledComponent(generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridSizeStyles, generateGridDirectionStyles, generateGridStyles, generateGridOffsetStyles);
9014
9090
  const Grid = /*#__PURE__*/React__namespace.forwardRef(function Grid(inProps, ref) {
9015
9091
  var _inProps$columns, _inProps$spacing, _ref, _inProps$rowSpacing, _ref2, _inProps$columnSpacin, _ref3, _disableEqualOverflow;
9016
- const theme = useTheme$1();
9092
+ const theme = useTheme$2();
9017
9093
  const themeProps = useThemeProps(inProps);
9018
9094
  const props = extendSxProp(themeProps); // `color` type conflicts with html color attribute.
9019
9095
  const level = React__namespace.useContext(NestedContext);
@@ -9030,7 +9106,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9030
9106
  columnSpacing: columnSpacingProp = spacingProp,
9031
9107
  disableEqualOverflow: themeDisableEqualOverflow
9032
9108
  } = props,
9033
- rest = _objectWithoutPropertiesLoose(props, _excluded$2f);
9109
+ rest = _objectWithoutPropertiesLoose(props, _excluded$2g);
9034
9110
  // Because `disableEqualOverflow` can be set from the theme's defaultProps, the **nested** grid should look at the instance props instead.
9035
9111
  let disableEqualOverflow = themeDisableEqualOverflow;
9036
9112
  if (level && themeDisableEqualOverflow !== undefined) {
@@ -9120,7 +9196,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9120
9196
  return Grid;
9121
9197
  }
9122
9198
 
9123
- const _excluded$2e = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"];
9199
+ const _excluded$2f = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"];
9124
9200
  const defaultTheme$4 = createTheme$1();
9125
9201
  // widening Theme to any so that the consumer can own the theme structure.
9126
9202
  const defaultCreateStyledComponent = systemStyled('div', {
@@ -9249,7 +9325,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9249
9325
  className,
9250
9326
  useFlexGap = false
9251
9327
  } = props,
9252
- other = _objectWithoutPropertiesLoose(props, _excluded$2e);
9328
+ other = _objectWithoutPropertiesLoose(props, _excluded$2f);
9253
9329
  const ownerState = {
9254
9330
  direction,
9255
9331
  spacing,
@@ -9275,7 +9351,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9275
9351
  return Stack;
9276
9352
  }
9277
9353
 
9278
- const _excluded$2d = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
9354
+ const _excluded$2e = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
9279
9355
  _excluded2$b = ["type", "mode"];
9280
9356
  function adaptV4Theme(inputTheme) {
9281
9357
  {
@@ -9289,7 +9365,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9289
9365
  props = {},
9290
9366
  styleOverrides = {}
9291
9367
  } = inputTheme,
9292
- other = _objectWithoutPropertiesLoose(inputTheme, _excluded$2d);
9368
+ other = _objectWithoutPropertiesLoose(inputTheme, _excluded$2e);
9293
9369
  const theme = _extends({}, other, {
9294
9370
  components: {}
9295
9371
  });
@@ -9370,7 +9446,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9370
9446
  }, mixins);
9371
9447
  }
9372
9448
 
9373
- const _excluded$2c = ["mode", "contrastThreshold", "tonalOffset"];
9449
+ const _excluded$2d = ["mode", "contrastThreshold", "tonalOffset"];
9374
9450
  const light = {
9375
9451
  // The colors used to style the text.
9376
9452
  text: {
@@ -9539,7 +9615,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9539
9615
  contrastThreshold = 3,
9540
9616
  tonalOffset = 0.2
9541
9617
  } = palette,
9542
- other = _objectWithoutPropertiesLoose(palette, _excluded$2c);
9618
+ other = _objectWithoutPropertiesLoose(palette, _excluded$2d);
9543
9619
  const primary = palette.primary || getDefaultPrimary(mode);
9544
9620
  const secondary = palette.secondary || getDefaultSecondary(mode);
9545
9621
  const error = palette.error || getDefaultError(mode);
@@ -9663,7 +9739,7 @@ const theme2 = createTheme({ palette: {
9663
9739
  return paletteOutput;
9664
9740
  }
9665
9741
 
9666
- const _excluded$2b = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
9742
+ const _excluded$2c = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
9667
9743
  function round$2(value) {
9668
9744
  return Math.round(value * 1e5) / 1e5;
9669
9745
  }
@@ -9694,7 +9770,7 @@ const theme2 = createTheme({ palette: {
9694
9770
  allVariants,
9695
9771
  pxToRem: pxToRem2
9696
9772
  } = _ref,
9697
- other = _objectWithoutPropertiesLoose(_ref, _excluded$2b);
9773
+ other = _objectWithoutPropertiesLoose(_ref, _excluded$2c);
9698
9774
  {
9699
9775
  if (typeof fontSize !== 'number') {
9700
9776
  console.error('MUI: `fontSize` is required to be a number.');
@@ -9761,7 +9837,7 @@ const theme2 = createTheme({ palette: {
9761
9837
  const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
9762
9838
  var shadows$1 = shadows;
9763
9839
 
9764
- const _excluded$2a = ["duration", "easing", "delay"];
9840
+ const _excluded$2b = ["duration", "easing", "delay"];
9765
9841
  // Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
9766
9842
  // to learn the context in which each easing should be used.
9767
9843
  const easing = {
@@ -9812,7 +9888,7 @@ const theme2 = createTheme({ palette: {
9812
9888
  easing: easingOption = mergedEasing.easeInOut,
9813
9889
  delay = 0
9814
9890
  } = options,
9815
- other = _objectWithoutPropertiesLoose(options, _excluded$2a);
9891
+ other = _objectWithoutPropertiesLoose(options, _excluded$2b);
9816
9892
  {
9817
9893
  const isString = value => typeof value === 'string';
9818
9894
  // IE11 support, replace with Number.isNaN
@@ -9859,7 +9935,7 @@ const theme2 = createTheme({ palette: {
9859
9935
  };
9860
9936
  var zIndex$1 = zIndex;
9861
9937
 
9862
- const _excluded$29 = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
9938
+ const _excluded$2a = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
9863
9939
  function createTheme(options = {}, ...args) {
9864
9940
  const {
9865
9941
  mixins: mixinsInput = {},
@@ -9867,7 +9943,7 @@ const theme2 = createTheme({ palette: {
9867
9943
  transitions: transitionsInput = {},
9868
9944
  typography: typographyInput = {}
9869
9945
  } = options,
9870
- other = _objectWithoutPropertiesLoose(options, _excluded$29);
9946
+ other = _objectWithoutPropertiesLoose(options, _excluded$2a);
9871
9947
  if (options.vars) {
9872
9948
  throw new Error(`MUI: \`vars\` is a private field used for CSS variables support.
9873
9949
  Please use another name.` );
@@ -10139,12 +10215,12 @@ Use unitless line heights instead.` );
10139
10215
  var defaultTheme$3 = defaultTheme$2;
10140
10216
 
10141
10217
  function useTheme() {
10142
- const theme = useTheme$1(defaultTheme$3);
10218
+ const theme = useTheme$2(defaultTheme$3);
10143
10219
  {
10144
10220
  // eslint-disable-next-line react-hooks/rules-of-hooks
10145
10221
  React__namespace.useDebugValue(theme);
10146
10222
  }
10147
- return theme;
10223
+ return theme[THEME_ID] || theme;
10148
10224
  }
10149
10225
 
10150
10226
  function useThemeProps({
@@ -10154,18 +10230,36 @@ Use unitless line heights instead.` );
10154
10230
  return useThemeProps$1({
10155
10231
  props,
10156
10232
  name,
10157
- defaultTheme: defaultTheme$3
10233
+ defaultTheme: defaultTheme$3,
10234
+ themeId: THEME_ID
10158
10235
  });
10159
10236
  }
10160
10237
 
10161
10238
  const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';
10162
10239
  const slotShouldForwardProp = shouldForwardProp;
10163
10240
  const styled = createStyled({
10241
+ themeId: THEME_ID,
10164
10242
  defaultTheme: defaultTheme$3,
10165
10243
  rootShouldForwardProp
10166
10244
  });
10167
10245
  var styled$1 = styled;
10168
10246
 
10247
+ const _excluded$29 = ["theme"];
10248
+ function ThemeProvider(_ref) {
10249
+ let {
10250
+ theme: themeInput
10251
+ } = _ref,
10252
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$29);
10253
+ const scopedTheme = themeInput[THEME_ID];
10254
+ return /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, _extends({}, props, {
10255
+ themeId: scopedTheme ? THEME_ID : undefined,
10256
+ theme: scopedTheme || themeInput
10257
+ }));
10258
+ }
10259
+ ThemeProvider.propTypes = {
10260
+ theme: PropTypes.object
10261
+ } ;
10262
+
10169
10263
  function makeStyles() {
10170
10264
  throw new Error(`MUI: makeStyles is no longer exported from @mui/material/styles.
10171
10265
  You have to import it from @mui/styles.
@@ -10504,6 +10598,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10504
10598
  useColorScheme,
10505
10599
  getInitColorSchemeScript
10506
10600
  } = createCssVarsProvider({
10601
+ themeId: THEME_ID,
10507
10602
  theme: defaultTheme$1,
10508
10603
  attribute: 'data-mui-color-scheme',
10509
10604
  modeStorageKey: 'mui-mode',
@@ -10681,7 +10776,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10681
10776
  const internalSlotProps = getSlotProps(eventHandlers);
10682
10777
 
10683
10778
  // The order of classes is important here.
10684
- // Emotion (that we use in libraries consuming MUI Base) depends on this order
10779
+ // Emotion (that we use in libraries consuming Base UI) depends on this order
10685
10780
  // to properly override style. It requires the most important classes to be last
10686
10781
  // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.
10687
10782
  const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
@@ -10738,7 +10833,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10738
10833
  *
10739
10834
  * API:
10740
10835
  *
10741
- * - [useBadge API](https://mui.com/base/api/use-badge/)
10836
+ * - [useBadge API](https://mui.com/base/react-badge/hooks-api/#use-badge)
10742
10837
  */
10743
10838
  function useBadge(parameters) {
10744
10839
  const {
@@ -10784,7 +10879,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10784
10879
  *
10785
10880
  * API:
10786
10881
  *
10787
- * - [ClickAwayListener API](https://mui.com/base/api/click-away-listener/)
10882
+ * - [ClickAwayListener API](https://mui.com/base/react-click-away-listener/components-api/#click-away-listener)
10788
10883
  */
10789
10884
  function ClickAwayListener(props) {
10790
10885
  const {
@@ -11012,7 +11107,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
11012
11107
  *
11013
11108
  * API:
11014
11109
  *
11015
- * - [FocusTrap API](https://mui.com/base/api/focus-trap/)
11110
+ * - [FocusTrap API](https://mui.com/base/react-focus-trap/components-api/#focus-trap)
11016
11111
  */
11017
11112
  function FocusTrap(props) {
11018
11113
  const {
@@ -13246,7 +13341,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
13246
13341
  *
13247
13342
  * API:
13248
13343
  *
13249
- * - [Portal API](https://mui.com/base/api/portal/)
13344
+ * - [Portal API](https://mui.com/base/react-portal/components-api/#portal)
13250
13345
  */
13251
13346
  const Portal = /*#__PURE__*/React__namespace.forwardRef(function Portal(props, ref) {
13252
13347
  const {
@@ -13320,7 +13415,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
13320
13415
  }
13321
13416
  generateUtilityClasses('MuiPopper', ['root']);
13322
13417
 
13323
- const _excluded$26 = ["anchorEl", "children", "component", "direction", "disablePortal", "modifiers", "open", "ownerState", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps"],
13418
+ const _excluded$26 = ["anchorEl", "children", "component", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"],
13324
13419
  _excluded2$9 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
13325
13420
  function flipPlacement(placement, direction) {
13326
13421
  if (direction === 'ltr') {
@@ -13365,7 +13460,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
13365
13460
  disablePortal,
13366
13461
  modifiers,
13367
13462
  open,
13368
- ownerState,
13369
13463
  placement: initialPlacement,
13370
13464
  popperOptions,
13371
13465
  popperRef: popperRefProp,
@@ -13468,7 +13562,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
13468
13562
  role: 'tooltip',
13469
13563
  ref: ownRef
13470
13564
  },
13471
- ownerState: _extends({}, props, ownerState),
13565
+ ownerState: props,
13472
13566
  className: classes.root
13473
13567
  });
13474
13568
  return /*#__PURE__*/jsxRuntime_1(Root, _extends({}, rootProps, {
@@ -13485,7 +13579,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
13485
13579
  *
13486
13580
  * API:
13487
13581
  *
13488
- * - [PopperUnstyled API](https://mui.com/base/api/popper-unstyled/)
13582
+ * - [PopperUnstyled API](https://mui.com/base/react-popper/components-api/#popper-unstyled)
13489
13583
  */
13490
13584
  const PopperUnstyled = /*#__PURE__*/React__namespace.forwardRef(function PopperUnstyled(props, ref) {
13491
13585
  const {
@@ -13947,7 +14041,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
13947
14041
  *
13948
14042
  * API:
13949
14043
  *
13950
- * - [ModalUnstyled API](https://mui.com/base/api/modal-unstyled/)
14044
+ * - [ModalUnstyled API](https://mui.com/base/react-modal/components-api/#modal-unstyled)
13951
14045
  */
13952
14046
  const ModalUnstyled = /*#__PURE__*/React__namespace.forwardRef(function ModalUnstyled(props, forwardedRef) {
13953
14047
  var _props$ariaHidden, _ref;
@@ -14135,7 +14229,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
14135
14229
  return null;
14136
14230
  }
14137
14231
  return /*#__PURE__*/jsxRuntime_1(Portal$1
14138
- // @ts-expect-error TODO: include ref to MUI Base Portal props
14232
+ // @ts-expect-error TODO: include ref to Base UI Portal props
14139
14233
  , {
14140
14234
  ref: handlePortalRef,
14141
14235
  container: container,
@@ -14287,7 +14381,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
14287
14381
  *
14288
14382
  * API:
14289
14383
  *
14290
- * - [NoSsr API](https://mui.com/base/api/no-ssr/)
14384
+ * - [NoSsr API](https://mui.com/base/react-no-ssr/components-api/#no-ssr)
14291
14385
  */
14292
14386
  function NoSsr(props) {
14293
14387
  const {
@@ -14488,7 +14582,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
14488
14582
  *
14489
14583
  * API:
14490
14584
  *
14491
- * - [useSlider API](https://mui.com/base/api/use-slider/)
14585
+ * - [useSlider API](https://mui.com/base/react-slider/hooks-api/#use-slider)
14492
14586
  */
14493
14587
  function useSlider(parameters) {
14494
14588
  const {
@@ -14952,7 +15046,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
14952
15046
  *
14953
15047
  * API:
14954
15048
  *
14955
- * - [useSnackbar API](https://mui.com/base/api/use-snackbar/)
15049
+ * - [useSnackbar API](https://mui.com/base/react-snackbar/hooks-api/#use-snackbar)
14956
15050
  */
14957
15051
  function useSnackbar(parameters) {
14958
15052
  const {
@@ -15108,7 +15202,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15108
15202
  *
15109
15203
  * API:
15110
15204
  *
15111
- * - [TextareaAutosize API](https://mui.com/base/api/textarea-autosize/)
15205
+ * - [TextareaAutosize API](https://mui.com/base/react-textarea-autosize/components-api/#textarea-autosize)
15112
15206
  */
15113
15207
  const TextareaAutosize = /*#__PURE__*/React__namespace.forwardRef(function TextareaAutosize(props, ref) {
15114
15208
  const {
@@ -15208,7 +15302,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15208
15302
  return updateState(prevState, newState);
15209
15303
  });
15210
15304
  }, [getUpdatedState]);
15211
- const syncHeightWithFlushSycn = () => {
15305
+ const syncHeightWithFlushSync = () => {
15212
15306
  const newState = getUpdatedState();
15213
15307
  if (isEmpty$1(newState)) {
15214
15308
  return;
@@ -15232,7 +15326,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15232
15326
  // access a dom node that is no longer there (as the fallback component is being shown instead).
15233
15327
  // See https://github.com/mui/material-ui/issues/32640
15234
15328
  if (inputRef.current) {
15235
- syncHeightWithFlushSycn();
15329
+ syncHeightWithFlushSync();
15236
15330
  }
15237
15331
  });
15238
15332
  let resizeObserver;
@@ -16108,12 +16202,15 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
16108
16202
  handleOpen(event);
16109
16203
  }
16110
16204
  };
16111
- const handleOptionMouseOver = event => {
16112
- setHighlightedIndex({
16113
- event,
16114
- index: Number(event.currentTarget.getAttribute('data-option-index')),
16115
- reason: 'mouse'
16116
- });
16205
+ const handleOptionMouseMove = event => {
16206
+ const index = Number(event.currentTarget.getAttribute('data-option-index'));
16207
+ if (highlightedIndexRef.current !== index) {
16208
+ setHighlightedIndex({
16209
+ event,
16210
+ index,
16211
+ reason: 'mouse'
16212
+ });
16213
+ }
16117
16214
  };
16118
16215
  const handleOptionTouchStart = event => {
16119
16216
  setHighlightedIndex({
@@ -16214,7 +16311,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
16214
16311
  onFocus: handleFocus,
16215
16312
  onChange: handleInputChange,
16216
16313
  onMouseDown: handleInputMouseDown,
16217
- // if open then this is handled imperativeley so don't let react override
16314
+ // if open then this is handled imperatively so don't let react override
16218
16315
  // only have an opinion about this when closed
16219
16316
  'aria-activedescendant': popupOpen ? '' : null,
16220
16317
  'aria-autocomplete': autoComplete ? 'both' : 'list',
@@ -16267,7 +16364,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
16267
16364
  tabIndex: -1,
16268
16365
  role: 'option',
16269
16366
  id: `${id}-option-${index}`,
16270
- onMouseOver: handleOptionMouseOver,
16367
+ onMouseMove: handleOptionMouseMove,
16271
16368
  onClick: handleOptionClick,
16272
16369
  onTouchStart: handleOptionTouchStart,
16273
16370
  'data-option-index': index,
@@ -20448,7 +20545,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20448
20545
  */
20449
20546
  const Popper = /*#__PURE__*/React__namespace.forwardRef(function Popper(inProps, ref) {
20450
20547
  var _slots$root;
20451
- const theme = useTheme$2();
20548
+ const theme = useTheme$3();
20452
20549
  const props = useThemeProps({
20453
20550
  props: inProps,
20454
20551
  name: 'MuiPopper'
@@ -20550,10 +20647,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20550
20647
  * If `true`, the component is shown.
20551
20648
  */
20552
20649
  open: PropTypes.bool.isRequired,
20553
- /**
20554
- * @ignore
20555
- */
20556
- ownerState: PropTypes.any,
20557
20650
  /**
20558
20651
  * Popper placement.
20559
20652
  * @default 'bottom'
@@ -21257,7 +21350,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
21257
21350
 
21258
21351
  function GlobalStyles(props) {
21259
21352
  return /*#__PURE__*/jsxRuntime_1(GlobalStyles$1, _extends({}, props, {
21260
- defaultTheme: defaultTheme$3
21353
+ defaultTheme: defaultTheme$3,
21354
+ themeId: THEME_ID
21261
21355
  }));
21262
21356
  }
21263
21357
  GlobalStyles.propTypes /* remove-proptypes */ = {
@@ -21268,9 +21362,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
21268
21362
  /**
21269
21363
  * The styles you want to apply globally.
21270
21364
  */
21271
- styles: PropTypes.oneOfType([PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.shape({
21272
- __emotion_styles: PropTypes.any.isRequired
21273
- }), PropTypes.string, PropTypes.bool])
21365
+ styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool])
21274
21366
  } ;
21275
21367
 
21276
21368
  // Supports determination of isControlled().
@@ -22454,6 +22546,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22454
22546
  }));
22455
22547
  const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
22456
22548
  const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
22549
+ const {
22550
+ onMouseDown: handleInputMouseDown
22551
+ } = getInputProps();
22457
22552
 
22458
22553
  // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
22459
22554
  const ownerState = _extends({}, props, {
@@ -22544,7 +22639,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22544
22639
  InputProps: _extends({
22545
22640
  ref: setAnchorEl,
22546
22641
  className: classes.inputRoot,
22547
- startAdornment
22642
+ startAdornment,
22643
+ onClick: event => {
22644
+ if (event.target === event.currentTarget) {
22645
+ handleInputMouseDown(event);
22646
+ }
22647
+ }
22548
22648
  }, (hasClearIcon || hasPopupIcon) && {
22549
22649
  endAdornment: /*#__PURE__*/jsxRuntime_2(AutocompleteEndAdornment, {
22550
22650
  className: classes.endAdornment,
@@ -24500,6 +24600,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
24500
24600
 
24501
24601
  const defaultTheme = createTheme();
24502
24602
  const Box = createBox({
24603
+ themeId: THEME_ID,
24503
24604
  defaultTheme,
24504
24605
  defaultClassName: 'MuiBox-root',
24505
24606
  generateClassName: ClassNameGenerator$1.generate
@@ -25563,6 +25664,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
25563
25664
  }) => ({
25564
25665
  display: 'block',
25565
25666
  textAlign: 'inherit',
25667
+ borderRadius: 'inherit',
25668
+ // for Safari to work https://github.com/mui/material-ui/issues/36285.
25566
25669
  width: '100%',
25567
25670
  [`&:hover .${cardActionAreaClasses$1.focusHighlight}`]: {
25568
25671
  opacity: (theme.vars || theme).palette.action.hoverOpacity,
@@ -27010,7 +27113,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27010
27113
  enableColorScheme: PropTypes.bool
27011
27114
  } ;
27012
27115
 
27013
- // track, thumb and active are derieved from macOS 10.15.7
27116
+ // track, thumb and active are derived from macOS 10.15.7
27014
27117
  const scrollBar = {
27015
27118
  track: '#2b2b2b',
27016
27119
  thumb: '#6b6b6b',
@@ -31009,6 +31112,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31009
31112
  const Grid2 = createGrid({
31010
31113
  createStyledComponent: styled$1('div', {
31011
31114
  name: 'MuiGrid2',
31115
+ slot: 'Root',
31012
31116
  overridesResolver: (props, styles) => styles.root
31013
31117
  }),
31014
31118
  componentName: 'MuiGrid2',
@@ -31374,7 +31478,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
31374
31478
  return match;
31375
31479
  }
31376
31480
  function useMediaQuery(queryInput, options = {}) {
31377
- const theme = useTheme$2();
31481
+ const theme = useTheme$3();
31378
31482
  // Wait for jsdom to support the match media feature.
31379
31483
  // All the browsers MUI support have this built-in.
31380
31484
  // This defensive check is here for simplicity.
@@ -35800,7 +35904,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
35800
35904
  overridesResolver: (props, styles) => styles.paper
35801
35905
  })({
35802
35906
  // specZ: The maximum height of a simple menu should be one or more rows less than the view
35803
- // height. This ensures a tapable area outside of the simple menu with which to dismiss
35907
+ // height. This ensures a tappable area outside of the simple menu with which to dismiss
35804
35908
  // the menu.
35805
35909
  maxHeight: 'calc(100% - 96px)',
35806
35910
  // Add iOS momentum scrolling for iOS < 13.0
@@ -36462,20 +36566,21 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
36462
36566
  function getNativeSelectUtilityClasses(slot) {
36463
36567
  return generateUtilityClass('MuiNativeSelect', slot);
36464
36568
  }
36465
- const nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput']);
36569
+ const nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
36466
36570
  var nativeSelectClasses$1 = nativeSelectClasses;
36467
36571
 
36468
- const _excluded$O = ["className", "disabled", "IconComponent", "inputRef", "variant"];
36572
+ const _excluded$O = ["className", "disabled", "error", "IconComponent", "inputRef", "variant"];
36469
36573
  const useUtilityClasses$F = ownerState => {
36470
36574
  const {
36471
36575
  classes,
36472
36576
  variant,
36473
36577
  disabled,
36474
36578
  multiple,
36475
- open
36579
+ open,
36580
+ error
36476
36581
  } = ownerState;
36477
36582
  const slots = {
36478
- select: ['select', variant, disabled && 'disabled', multiple && 'multiple'],
36583
+ select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],
36479
36584
  icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled']
36480
36585
  };
36481
36586
  return composeClasses(slots, getNativeSelectUtilityClasses, classes);
@@ -36542,7 +36647,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
36542
36647
  const {
36543
36648
  ownerState
36544
36649
  } = props;
36545
- return [styles.select, styles[ownerState.variant], {
36650
+ return [styles.select, styles[ownerState.variant], ownerState.error && styles.error, {
36546
36651
  [`&.${nativeSelectClasses$1.multiple}`]: styles.multiple
36547
36652
  }];
36548
36653
  }
@@ -36588,6 +36693,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
36588
36693
  const {
36589
36694
  className,
36590
36695
  disabled,
36696
+ error,
36591
36697
  IconComponent,
36592
36698
  inputRef,
36593
36699
  variant = 'standard'
@@ -36595,7 +36701,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
36595
36701
  other = _objectWithoutPropertiesLoose(props, _excluded$O);
36596
36702
  const ownerState = _extends({}, props, {
36597
36703
  disabled,
36598
- variant
36704
+ variant,
36705
+ error
36599
36706
  });
36600
36707
  const classes = useUtilityClasses$F(ownerState);
36601
36708
  return /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
@@ -36630,6 +36737,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
36630
36737
  * If `true`, the select is disabled.
36631
36738
  */
36632
36739
  disabled: PropTypes.bool,
36740
+ /**
36741
+ * If `true`, the `select input` will indicate an error.
36742
+ */
36743
+ error: PropTypes.bool,
36633
36744
  /**
36634
36745
  * The icon that displays the arrow.
36635
36746
  */
@@ -39071,11 +39182,11 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39071
39182
  function getSelectUtilityClasses(slot) {
39072
39183
  return generateUtilityClass('MuiSelect', slot);
39073
39184
  }
39074
- const selectClasses = generateUtilityClasses('MuiSelect', ['select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput']);
39185
+ const selectClasses = generateUtilityClasses('MuiSelect', ['select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
39075
39186
  var selectClasses$1 = selectClasses;
39076
39187
 
39077
39188
  var _span;
39078
- const _excluded$D = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"];
39189
+ const _excluded$D = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "error", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"];
39079
39190
  const SelectSelect = styled$1('div', {
39080
39191
  name: 'MuiSelect',
39081
39192
  slot: 'Select',
@@ -39089,6 +39200,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39089
39200
  [`&.${selectClasses$1.select}`]: styles.select
39090
39201
  }, {
39091
39202
  [`&.${selectClasses$1.select}`]: styles[ownerState.variant]
39203
+ }, {
39204
+ [`&.${selectClasses$1.error}`]: styles.error
39092
39205
  }, {
39093
39206
  [`&.${selectClasses$1.multiple}`]: styles.multiple
39094
39207
  }];
@@ -39146,10 +39259,11 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39146
39259
  variant,
39147
39260
  disabled,
39148
39261
  multiple,
39149
- open
39262
+ open,
39263
+ error
39150
39264
  } = ownerState;
39151
39265
  const slots = {
39152
- select: ['select', variant, disabled && 'disabled', multiple && 'multiple'],
39266
+ select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],
39153
39267
  icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled'],
39154
39268
  nativeInput: ['nativeInput']
39155
39269
  };
@@ -39171,6 +39285,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39171
39285
  defaultValue,
39172
39286
  disabled,
39173
39287
  displayEmpty,
39288
+ error = false,
39174
39289
  IconComponent,
39175
39290
  inputRef: inputRefProp,
39176
39291
  labelId,
@@ -39476,7 +39591,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39476
39591
  const ownerState = _extends({}, props, {
39477
39592
  variant,
39478
39593
  value,
39479
- open
39594
+ open,
39595
+ error
39480
39596
  });
39481
39597
  const classes = useUtilityClasses$x(ownerState);
39482
39598
  return /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
@@ -39506,6 +39622,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39506
39622
  children: "\u200B"
39507
39623
  })) : display
39508
39624
  })), /*#__PURE__*/jsxRuntime_1(SelectNativeInput, _extends({
39625
+ "aria-invalid": error,
39509
39626
  value: Array.isArray(value) ? value.join(',') : value,
39510
39627
  name: name,
39511
39628
  ref: inputRef,
@@ -39597,6 +39714,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39597
39714
  * If `true`, the selected item is displayed even if its value is empty.
39598
39715
  */
39599
39716
  displayEmpty: PropTypes.bool,
39717
+ /**
39718
+ * If `true`, the `select input` will indicate an error.
39719
+ */
39720
+ error: PropTypes.bool,
39600
39721
  /**
39601
39722
  * The icon that displays the arrow.
39602
39723
  */
@@ -39691,7 +39812,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39691
39812
  } ;
39692
39813
  var SelectInput$1 = SelectInput;
39693
39814
 
39694
- var _StyledInput, _StyledFilledInput;
39695
39815
  const _excluded$C = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
39696
39816
  const useUtilityClasses$w = ownerState => {
39697
39817
  const {
@@ -39742,21 +39862,26 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39742
39862
  const fcs = formControlState({
39743
39863
  props,
39744
39864
  muiFormControl,
39745
- states: ['variant']
39865
+ states: ['variant', 'error']
39746
39866
  });
39747
39867
  const variant = fcs.variant || variantProp;
39748
- const InputComponent = input || {
39749
- standard: _StyledInput || (_StyledInput = /*#__PURE__*/jsxRuntime_1(StyledInput, {})),
39750
- outlined: /*#__PURE__*/jsxRuntime_1(StyledOutlinedInput, {
39751
- label: label
39752
- }),
39753
- filled: _StyledFilledInput || (_StyledFilledInput = /*#__PURE__*/jsxRuntime_1(StyledFilledInput, {}))
39754
- }[variant];
39755
39868
  const ownerState = _extends({}, props, {
39756
39869
  variant,
39757
39870
  classes: classesProp
39758
39871
  });
39759
39872
  const classes = useUtilityClasses$w(ownerState);
39873
+ const InputComponent = input || {
39874
+ standard: /*#__PURE__*/jsxRuntime_1(StyledInput, {
39875
+ ownerState: ownerState
39876
+ }),
39877
+ outlined: /*#__PURE__*/jsxRuntime_1(StyledOutlinedInput, {
39878
+ label: label,
39879
+ ownerState: ownerState
39880
+ }),
39881
+ filled: /*#__PURE__*/jsxRuntime_1(StyledFilledInput, {
39882
+ ownerState: ownerState
39883
+ })
39884
+ }[variant];
39760
39885
  const inputComponentRef = useForkRef(ref, InputComponent.ref);
39761
39886
  return /*#__PURE__*/jsxRuntime_1(React__namespace.Fragment, {
39762
39887
  children: /*#__PURE__*/React__namespace.cloneElement(InputComponent, _extends({
@@ -39765,6 +39890,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39765
39890
  inputComponent,
39766
39891
  inputProps: _extends({
39767
39892
  children,
39893
+ error: fcs.error,
39768
39894
  IconComponent,
39769
39895
  variant,
39770
39896
  type: undefined,
@@ -39898,7 +40024,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
39898
40024
  onChange: PropTypes.func,
39899
40025
  /**
39900
40026
  * Callback fired when the component requests to be closed.
39901
- * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapes).
40027
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).
39902
40028
  *
39903
40029
  * @param {object} event The event source of the callback.
39904
40030
  */
@@ -40470,7 +40596,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
40470
40596
  ownerState
40471
40597
  }) => _extends({
40472
40598
  [`&.${sliderClasses$1.valueLabelOpen}`]: {
40473
- transform: 'translateY(-100%) scale(1)'
40599
+ transform: `${ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(1)`
40474
40600
  },
40475
40601
  zIndex: 1,
40476
40602
  whiteSpace: 'nowrap'
@@ -40479,7 +40605,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
40479
40605
  transition: theme.transitions.create(['transform'], {
40480
40606
  duration: theme.transitions.duration.shortest
40481
40607
  }),
40482
- transform: 'translateY(-100%) scale(0)',
40608
+ transform: `${ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(0)`,
40483
40609
  position: 'absolute',
40484
40610
  backgroundColor: (theme.vars || theme).palette.grey[600],
40485
40611
  borderRadius: 2,
@@ -40502,18 +40628,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
40502
40628
  left: '50%'
40503
40629
  }
40504
40630
  }, ownerState.orientation === 'vertical' && {
40505
- right: '30px',
40506
- top: '24px',
40631
+ right: ownerState.size === 'small' ? '20px' : '30px',
40632
+ top: '50%',
40507
40633
  transformOrigin: 'right center',
40508
40634
  '&:before': {
40509
40635
  position: 'absolute',
40510
40636
  content: '""',
40511
40637
  width: 8,
40512
40638
  height: 8,
40513
- transform: 'translate(-50%, 50%) rotate(45deg)',
40639
+ transform: 'translate(-50%, -50%) rotate(45deg)',
40514
40640
  backgroundColor: 'inherit',
40515
40641
  right: '-20%',
40516
- top: '25%'
40642
+ top: '50%'
40517
40643
  }
40518
40644
  }, ownerState.size === 'small' && {
40519
40645
  fontSize: theme.typography.pxToRem(12),
@@ -46497,7 +46623,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
46497
46623
  // ----------------------------------------------------------------------
46498
46624
  /**
46499
46625
  * The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
46500
- * The Toolbar is a flex container, allowing flex item properites to be used to lay out the children.
46626
+ * The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.
46501
46627
  */
46502
46628
  children: PropTypes.node,
46503
46629
  /**
@@ -47949,7 +48075,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
47949
48075
  moveTabsScroll(getScrollSize());
47950
48076
  };
47951
48077
 
47952
- // TODO Remove <ScrollbarSize /> as browser support for hidding the scrollbar
48078
+ // TODO Remove <ScrollbarSize /> as browser support for hiding the scrollbar
47953
48079
  // with CSS improves.
47954
48080
  const handleScrollbarSizeChange = React__namespace.useCallback(scrollbarWidth => {
47955
48081
  setScrollerStyle({
@@ -49323,6 +49449,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
49323
49449
  exports.SvgIcon = SvgIcon$1;
49324
49450
  exports.SwipeableDrawer = SwipeableDrawer$1;
49325
49451
  exports.Switch = Switch$1;
49452
+ exports.THEME_ID = THEME_ID;
49326
49453
  exports.Tab = Tab$1;
49327
49454
  exports.TabScrollButton = TabScrollButton$1;
49328
49455
  exports.Table = Table$1;