@mui/material 5.11.11 → 5.11.12

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 (187) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/Autocomplete.d.ts +1 -0
  9. package/Autocomplete/Autocomplete.js +5 -2
  10. package/Autocomplete/autocompleteClasses.d.ts +56 -54
  11. package/Autocomplete/autocompleteClasses.js +1 -1
  12. package/Avatar/avatarClasses.d.ts +20 -20
  13. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  14. package/Backdrop/backdropClasses.d.ts +10 -10
  15. package/Badge/badgeClasses.d.ts +56 -56
  16. package/BottomNavigation/BottomNavigation.js +0 -0
  17. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  18. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  19. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  20. package/Button/buttonClasses.d.ts +100 -100
  21. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  22. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  23. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  24. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  25. package/CHANGELOG.md +144 -0
  26. package/Card/cardClasses.d.ts +8 -8
  27. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  28. package/CardActions/cardActionsClasses.d.ts +10 -10
  29. package/CardContent/cardContentClasses.d.ts +8 -8
  30. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  31. package/CardMedia/cardMediaClasses.d.ts +12 -12
  32. package/Checkbox/checkboxClasses.d.ts +18 -18
  33. package/Chip/chipClasses.d.ts +96 -96
  34. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  35. package/ClickAwayListener/index.d.ts +2 -2
  36. package/Collapse/collapseClasses.d.ts +18 -18
  37. package/Container/containerClasses.d.ts +6 -6
  38. package/Dialog/DialogContext.d.ts +6 -6
  39. package/Dialog/dialogClasses.d.ts +36 -36
  40. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  41. package/DialogContent/dialogContentClasses.d.ts +10 -10
  42. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  43. package/DialogTitle/DialogTitle.js +2 -2
  44. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  45. package/Divider/dividerClasses.d.ts +34 -34
  46. package/Drawer/drawerClasses.d.ts +30 -30
  47. package/Fab/fabClasses.d.ts +26 -26
  48. package/FilledInput/filledInputClasses.d.ts +40 -40
  49. package/FormControl/FormControlContext.d.ts +17 -17
  50. package/FormControl/formControlClasses.d.ts +14 -14
  51. package/FormControl/useFormControl.d.ts +2 -2
  52. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  53. package/FormGroup/formGroupClasses.d.ts +12 -12
  54. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  55. package/FormLabel/formLabelClasses.d.ts +22 -22
  56. package/Grid/gridClasses.d.ts +48 -48
  57. package/Icon/iconClasses.d.ts +24 -24
  58. package/IconButton/iconButtonClasses.d.ts +34 -34
  59. package/ImageList/imageListClasses.d.ts +16 -16
  60. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  61. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  62. package/Input/inputClasses.d.ts +34 -34
  63. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  64. package/InputBase/inputBaseClasses.d.ts +46 -46
  65. package/InputLabel/inputLabelClasses.d.ts +32 -32
  66. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  67. package/Link/getTextDecoration.d.ts +15 -15
  68. package/Link/linkClasses.d.ts +18 -18
  69. package/List/listClasses.d.ts +14 -14
  70. package/ListItem/listItemClasses.d.ts +30 -30
  71. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  72. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  73. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  74. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  75. package/ListItemText/listItemTextClasses.d.ts +18 -18
  76. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  77. package/Menu/Menu.js +1 -1
  78. package/Menu/menuClasses.d.ts +12 -12
  79. package/MenuItem/menuItemClasses.d.ts +20 -20
  80. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  81. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  82. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  83. package/Pagination/paginationClasses.d.ts +14 -14
  84. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  85. package/Paper/paperClasses.d.ts +39 -39
  86. package/Popover/popoverClasses.d.ts +10 -10
  87. package/Popper/Popper.d.ts +55 -55
  88. package/Radio/radioClasses.d.ts +16 -16
  89. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  90. package/RadioGroup/useRadioGroup.d.ts +4 -4
  91. package/Rating/ratingClasses.d.ts +40 -40
  92. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  93. package/Select/selectClasses.d.ts +30 -30
  94. package/Skeleton/skeletonClasses.d.ts +26 -26
  95. package/Slider/SliderValueLabel.d.ts +15 -15
  96. package/Slider/SliderValueLabel.types.d.ts +24 -24
  97. package/Slider/sliderClasses.d.ts +58 -58
  98. package/Snackbar/snackbarClasses.d.ts +20 -20
  99. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  100. package/SpeedDial/speedDialClasses.d.ts +22 -22
  101. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  102. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  103. package/Stack/stackClasses.d.ts +6 -6
  104. package/Step/StepContext.d.ts +20 -20
  105. package/Step/stepClasses.d.ts +16 -16
  106. package/StepButton/stepButtonClasses.d.ts +14 -14
  107. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  108. package/StepContent/stepContentClasses.d.ts +12 -12
  109. package/StepIcon/stepIconClasses.d.ts +16 -16
  110. package/StepLabel/stepLabelClasses.d.ts +28 -28
  111. package/Stepper/StepperContext.d.ts +18 -18
  112. package/Stepper/stepperClasses.d.ts +14 -14
  113. package/SvgIcon/svgIconClasses.d.ts +26 -26
  114. package/Switch/switchClasses.d.ts +32 -32
  115. package/Tab/tabClasses.d.ts +26 -26
  116. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  117. package/Table/tableClasses.d.ts +10 -10
  118. package/TableBody/tableBodyClasses.d.ts +8 -8
  119. package/TableCell/tableCellClasses.d.ts +32 -32
  120. package/TableContainer/tableContainerClasses.d.ts +8 -8
  121. package/TableFooter/tableFooterClasses.d.ts +8 -8
  122. package/TableHead/tableHeadClasses.d.ts +8 -8
  123. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  124. package/TableRow/tableRowClasses.d.ts +16 -16
  125. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  126. package/Tabs/tabsClasses.d.ts +32 -32
  127. package/TextField/textFieldClasses.d.ts +8 -8
  128. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  129. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  130. package/Toolbar/toolbarClasses.d.ts +14 -14
  131. package/Tooltip/tooltipClasses.d.ts +30 -30
  132. package/Typography/typographyClasses.d.ts +50 -50
  133. package/Unstable_Grid2/Grid2.d.ts +4 -4
  134. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  135. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  136. package/Unstable_Grid2/index.d.ts +4 -4
  137. package/className/index.d.ts +1 -1
  138. package/darkScrollbar/index.d.ts +28 -28
  139. package/generateUtilityClass/index.d.ts +2 -2
  140. package/generateUtilityClasses/index.d.ts +1 -1
  141. package/index.js +1 -1
  142. package/internal/switchBaseClasses.d.ts +12 -12
  143. package/legacy/Autocomplete/Autocomplete.js +5 -2
  144. package/legacy/Autocomplete/autocompleteClasses.js +1 -1
  145. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  146. package/legacy/DialogTitle/DialogTitle.js +2 -2
  147. package/legacy/Menu/Menu.js +1 -1
  148. package/legacy/index.js +1 -1
  149. package/legacy/styles/CssVarsProvider.js +1 -8
  150. package/legacy/styles/experimental_extendTheme.js +64 -40
  151. package/locale/index.d.ts +75 -75
  152. package/modern/Autocomplete/Autocomplete.js +5 -2
  153. package/modern/Autocomplete/autocompleteClasses.js +1 -1
  154. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  155. package/modern/DialogTitle/DialogTitle.js +2 -2
  156. package/modern/Menu/Menu.js +1 -1
  157. package/modern/index.js +1 -1
  158. package/modern/styles/CssVarsProvider.js +1 -5
  159. package/modern/styles/experimental_extendTheme.js +62 -41
  160. package/node/Autocomplete/Autocomplete.js +5 -2
  161. package/node/Autocomplete/autocompleteClasses.js +1 -1
  162. package/node/BottomNavigation/BottomNavigation.js +0 -0
  163. package/node/DialogTitle/DialogTitle.js +2 -2
  164. package/node/Menu/Menu.js +1 -1
  165. package/node/index.js +1 -1
  166. package/node/styles/CssVarsProvider.js +1 -9
  167. package/node/styles/experimental_extendTheme.js +66 -40
  168. package/package.json +4 -4
  169. package/styles/CssVarsProvider.d.ts +15 -16
  170. package/styles/CssVarsProvider.js +1 -8
  171. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  172. package/styles/experimental_extendTheme.d.ts +16 -0
  173. package/styles/experimental_extendTheme.js +65 -41
  174. package/styles/getOverlayAlpha.d.ts +2 -2
  175. package/transitions/index.d.ts +1 -1
  176. package/transitions/transition.d.ts +13 -13
  177. package/transitions/utils.d.ts +23 -23
  178. package/types/OverridableComponentAugmentation.d.ts +31 -31
  179. package/umd/material-ui.development.js +287 -214
  180. package/umd/material-ui.production.min.js +20 -20
  181. package/useMediaQuery/useMediaQuery.d.ts +46 -46
  182. package/useTouchRipple/index.d.ts +1 -1
  183. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  184. package/utils/getScrollbarSize.d.ts +2 -2
  185. package/utils/ownerDocument.d.ts +2 -2
  186. package/utils/ownerWindow.d.ts +2 -2
  187. package/utils/setRef.d.ts +2 -2
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.11.11
2
+ * @mui/material v5.11.12
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -6844,7 +6844,7 @@
6844
6844
  styleFunctionSx.filterProps = ['sx'];
6845
6845
  var styleFunctionSx$1 = styleFunctionSx;
6846
6846
 
6847
- const _excluded$2m = ["sx"];
6847
+ const _excluded$2n = ["sx"];
6848
6848
  const splitProps = props => {
6849
6849
  var _props$theme$unstable, _props$theme;
6850
6850
  const result = {
@@ -6865,7 +6865,7 @@
6865
6865
  const {
6866
6866
  sx: inSx
6867
6867
  } = props,
6868
- other = _objectWithoutPropertiesLoose(props, _excluded$2m);
6868
+ other = _objectWithoutPropertiesLoose(props, _excluded$2n);
6869
6869
  const {
6870
6870
  systemProps,
6871
6871
  otherProps
@@ -6891,7 +6891,7 @@
6891
6891
 
6892
6892
  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}
6893
6893
 
6894
- const _excluded$2l = ["values", "unit", "step"];
6894
+ const _excluded$2m = ["values", "unit", "step"];
6895
6895
  const sortBreakpointsValues = values => {
6896
6896
  const breakpointsAsArray = Object.keys(values).map(key => ({
6897
6897
  key,
@@ -6926,7 +6926,7 @@
6926
6926
  unit = 'px',
6927
6927
  step = 5
6928
6928
  } = breakpoints,
6929
- other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2l);
6929
+ other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2m);
6930
6930
  const sortedValues = sortBreakpointsValues(values);
6931
6931
  const keys = Object.keys(sortedValues);
6932
6932
  function up(key) {
@@ -7005,7 +7005,7 @@
7005
7005
  return spacing;
7006
7006
  }
7007
7007
 
7008
- const _excluded$2k = ["breakpoints", "palette", "spacing", "shape"];
7008
+ const _excluded$2l = ["breakpoints", "palette", "spacing", "shape"];
7009
7009
  function createTheme$1(options = {}, ...args) {
7010
7010
  const {
7011
7011
  breakpoints: breakpointsInput = {},
@@ -7013,7 +7013,7 @@
7013
7013
  spacing: spacingInput,
7014
7014
  shape: shapeInput = {}
7015
7015
  } = options,
7016
- other = _objectWithoutPropertiesLoose(options, _excluded$2k);
7016
+ other = _objectWithoutPropertiesLoose(options, _excluded$2l);
7017
7017
  const breakpoints = createBreakpoints(breakpointsInput);
7018
7018
  const spacing = createSpacing(spacingInput);
7019
7019
  let muiTheme = deepmerge({
@@ -7124,7 +7124,7 @@
7124
7124
  return useTheme$2(defaultTheme);
7125
7125
  }
7126
7126
 
7127
- const _excluded$2j = ["className", "component"];
7127
+ const _excluded$2k = ["className", "component"];
7128
7128
  function createBox(options = {}) {
7129
7129
  const {
7130
7130
  defaultTheme,
@@ -7141,7 +7141,7 @@
7141
7141
  className,
7142
7142
  component = 'div'
7143
7143
  } = _extendSxProp,
7144
- other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2j);
7144
+ other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2k);
7145
7145
  return /*#__PURE__*/jsxRuntime_1(BoxRoot, _extends({
7146
7146
  as: component,
7147
7147
  ref: ref,
@@ -7152,7 +7152,7 @@
7152
7152
  return Box;
7153
7153
  }
7154
7154
 
7155
- const _excluded$2i = ["variant"];
7155
+ const _excluded$2j = ["variant"];
7156
7156
  function isEmpty$3(string) {
7157
7157
  return string.length === 0;
7158
7158
  }
@@ -7166,7 +7166,7 @@
7166
7166
  const {
7167
7167
  variant
7168
7168
  } = props,
7169
- other = _objectWithoutPropertiesLoose(props, _excluded$2i);
7169
+ other = _objectWithoutPropertiesLoose(props, _excluded$2j);
7170
7170
  let classKey = variant || '';
7171
7171
  Object.keys(other).sort().forEach(key => {
7172
7172
  if (key === 'color') {
@@ -7178,8 +7178,8 @@
7178
7178
  return classKey;
7179
7179
  }
7180
7180
 
7181
- const _excluded$2h = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
7182
- _excluded2$c = ["theme"],
7181
+ const _excluded$2i = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
7182
+ _excluded2$d = ["theme"],
7183
7183
  _excluded3$1 = ["theme"];
7184
7184
  function isEmpty$2(obj) {
7185
7185
  return Object.keys(obj).length === 0;
@@ -7265,7 +7265,7 @@
7265
7265
  skipSx: inputSkipSx,
7266
7266
  overridesResolver
7267
7267
  } = inputOptions,
7268
- options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2h);
7268
+ options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2i);
7269
7269
 
7270
7270
  // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
7271
7271
  const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
@@ -7299,7 +7299,7 @@
7299
7299
  let {
7300
7300
  theme: themeInput
7301
7301
  } = _ref,
7302
- other = _objectWithoutPropertiesLoose(_ref, _excluded2$c);
7302
+ other = _objectWithoutPropertiesLoose(_ref, _excluded2$d);
7303
7303
  return stylesArg(_extends({
7304
7304
  theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
7305
7305
  }, other));
@@ -7776,133 +7776,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7776
7776
  ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) ;
7777
7777
  }
7778
7778
 
7779
- /**
7780
- * This function create an object from keys, value and then assign to target
7781
- *
7782
- * @param {Object} obj : the target object to be assigned
7783
- * @param {string[]} keys
7784
- * @param {string | number} value
7785
- *
7786
- * @example
7787
- * const source = {}
7788
- * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')
7789
- * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }
7790
- *
7791
- * @example
7792
- * const source = { palette: { primary: 'var(--palette-primary)' } }
7793
- * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')
7794
- * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }
7795
- */
7796
- const assignNestedKeys = (obj, keys, value, arrayKeys = []) => {
7797
- let temp = obj;
7798
- keys.forEach((k, index) => {
7799
- if (index === keys.length - 1) {
7800
- if (Array.isArray(temp)) {
7801
- temp[Number(k)] = value;
7802
- } else if (temp && typeof temp === 'object') {
7803
- temp[k] = value;
7804
- }
7805
- } else if (temp && typeof temp === 'object') {
7806
- if (!temp[k]) {
7807
- temp[k] = arrayKeys.includes(k) ? [] : {};
7808
- }
7809
- temp = temp[k];
7810
- }
7811
- });
7812
- };
7813
-
7814
- /**
7815
- *
7816
- * @param {Object} obj : source object
7817
- * @param {Function} callback : a function that will be called when
7818
- * - the deepest key in source object is reached
7819
- * - the value of the deepest key is NOT `undefined` | `null`
7820
- *
7821
- * @example
7822
- * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)
7823
- * // ['palette', 'primary', 'main'] '#000000'
7824
- */
7825
- const walkObjectDeep = (obj, callback, shouldSkipPaths) => {
7826
- function recurse(object, parentKeys = [], arrayKeys = []) {
7827
- Object.entries(object).forEach(([key, value]) => {
7828
- if (!shouldSkipPaths || shouldSkipPaths && !shouldSkipPaths([...parentKeys, key])) {
7829
- if (value !== undefined && value !== null) {
7830
- if (typeof value === 'object' && Object.keys(value).length > 0) {
7831
- recurse(value, [...parentKeys, key], Array.isArray(value) ? [...arrayKeys, key] : arrayKeys);
7832
- } else {
7833
- callback([...parentKeys, key], value, arrayKeys);
7834
- }
7835
- }
7836
- }
7837
- });
7838
- }
7839
- recurse(obj);
7840
- };
7841
- const getCssValue = (keys, value) => {
7842
- if (typeof value === 'number') {
7843
- if (['lineHeight', 'fontWeight', 'opacity', 'zIndex'].some(prop => keys.includes(prop))) {
7844
- // CSS property that are unitless
7845
- return value;
7846
- }
7847
- const lastKey = keys[keys.length - 1];
7848
- if (lastKey.toLowerCase().indexOf('opacity') >= 0) {
7849
- // opacity values are unitless
7850
- return value;
7851
- }
7852
- return `${value}px`;
7853
- }
7854
- return value;
7855
- };
7856
-
7857
- /**
7858
- * a function that parse theme and return { css, vars }
7859
- *
7860
- * @param {Object} theme
7861
- * @param {{
7862
- * prefix?: string,
7863
- * shouldSkipGeneratingVar?: (objectPathKeys: Array<string>, value: string | number) => boolean
7864
- * }} options.
7865
- * `prefix`: The prefix of the generated CSS variables. This function does not change the value.
7866
- *
7867
- * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme).
7868
- *
7869
- * @example
7870
- * const { css, vars } = parser({
7871
- * fontSize: 12,
7872
- * lineHeight: 1.2,
7873
- * palette: { primary: { 500: 'var(--color)' } }
7874
- * }, { prefix: 'foo' })
7875
- *
7876
- * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }
7877
- * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }
7878
- */
7879
- function cssVarsParser(theme, options) {
7880
- const {
7881
- prefix,
7882
- shouldSkipGeneratingVar
7883
- } = options || {};
7884
- const css = {};
7885
- const vars = {};
7886
- walkObjectDeep(theme, (keys, value, arrayKeys) => {
7887
- if (typeof value === 'string' || typeof value === 'number') {
7888
- if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {
7889
- // only create css & var if `shouldSkipGeneratingVar` return false
7890
- const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;
7891
- Object.assign(css, {
7892
- [cssVar]: getCssValue(keys, value)
7893
- });
7894
- assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys);
7895
- }
7896
- }
7897
- }, keys => keys[0] === 'vars' // skip 'vars/*' paths
7898
- );
7899
-
7900
- return {
7901
- css,
7902
- vars
7903
- };
7904
- }
7905
-
7906
7779
  const DEFAULT_MODE_STORAGE_KEY = 'mode';
7907
7780
  const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';
7908
7781
  const DEFAULT_ATTRIBUTE = 'data-color-scheme';
@@ -8162,7 +8035,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8162
8035
  });
8163
8036
  }
8164
8037
 
8165
- const _excluded$2g = ["colorSchemes", "components", "cssVarPrefix"];
8038
+ const _excluded$2h = ["colorSchemes", "components", "generateCssVars", "cssVarPrefix"];
8166
8039
  const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
8167
8040
  function createCssVarsProvider(options) {
8168
8041
  const {
@@ -8173,7 +8046,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8173
8046
  defaultMode: designSystemMode = 'light',
8174
8047
  defaultColorScheme: designSystemColorScheme,
8175
8048
  disableTransitionOnChange: designSystemTransitionOnChange = false,
8176
- shouldSkipGeneratingVar: designSystemShouldSkipGeneratingVar,
8177
8049
  resolveTheme,
8178
8050
  excludeVariablesFromRoot
8179
8051
  } = options;
@@ -8201,7 +8073,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8201
8073
  documentNode = typeof document === 'undefined' ? undefined : document,
8202
8074
  colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
8203
8075
  colorSchemeSelector = ':root',
8204
- shouldSkipGeneratingVar = designSystemShouldSkipGeneratingVar,
8205
8076
  disableNestedContext = false,
8206
8077
  disableStyleSheetGeneration = false
8207
8078
  }) {
@@ -8212,9 +8083,13 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8212
8083
  const {
8213
8084
  colorSchemes = {},
8214
8085
  components = {},
8086
+ generateCssVars = () => ({
8087
+ vars: {},
8088
+ css: {}
8089
+ }),
8215
8090
  cssVarPrefix
8216
8091
  } = themeProp,
8217
- restThemeProp = _objectWithoutPropertiesLoose(themeProp, _excluded$2g);
8092
+ restThemeProp = _objectWithoutPropertiesLoose(themeProp, _excluded$2h);
8218
8093
  const allColorSchemes = Object.keys(colorSchemes);
8219
8094
  const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
8220
8095
  const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
@@ -8269,10 +8144,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8269
8144
  const {
8270
8145
  css: rootCss,
8271
8146
  vars: rootVars
8272
- } = cssVarsParser(restThemeProp, {
8273
- prefix: cssVarPrefix,
8274
- shouldSkipGeneratingVar
8275
- });
8147
+ } = generateCssVars();
8276
8148
 
8277
8149
  // 3. Start composing the theme object
8278
8150
  const theme = _extends({}, restThemeProp, {
@@ -8292,10 +8164,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8292
8164
  const {
8293
8165
  css,
8294
8166
  vars
8295
- } = cssVarsParser(scheme, {
8296
- prefix: cssVarPrefix,
8297
- shouldSkipGeneratingVar
8298
- });
8167
+ } = generateCssVars(key);
8299
8168
  theme.vars = deepmerge(theme.vars, vars);
8300
8169
  if (key === calculatedColorScheme) {
8301
8170
  // 4.1 Merge the selected color scheme to the theme
@@ -8334,6 +8203,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8334
8203
  otherColorSchemesStyleSheet[`${colorSchemeSelector === ':root' ? '' : colorSchemeSelector}[${attribute}="${key}"]`] = css;
8335
8204
  }
8336
8205
  });
8206
+ theme.vars = deepmerge(theme.vars, rootVars);
8337
8207
 
8338
8208
  // 5. Declaring effects
8339
8209
  // 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.
@@ -8458,10 +8328,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8458
8328
  * The key in the local storage used to store current color scheme.
8459
8329
  */
8460
8330
  modeStorageKey: PropTypes.string,
8461
- /**
8462
- * A function to determine if the key, value should be attached as CSS Variable
8463
- */
8464
- shouldSkipGeneratingVar: PropTypes.func,
8465
8331
  /**
8466
8332
  * The window that attaches the 'storage' event listener
8467
8333
  * @default window
@@ -8499,7 +8365,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8499
8365
  return '';
8500
8366
  }
8501
8367
  const value = vars[0];
8502
- if (typeof value === 'string' && !value.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))/)) {
8368
+ if (typeof value === 'string' && !value.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)) {
8503
8369
  return `, var(--${prefix ? `${prefix}-` : ''}${value}${appendVar(...vars.slice(1))})`;
8504
8370
  }
8505
8371
  return `, ${value}`;
@@ -8512,6 +8378,195 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8512
8378
  return getCssVar;
8513
8379
  }
8514
8380
 
8381
+ /**
8382
+ * This function create an object from keys, value and then assign to target
8383
+ *
8384
+ * @param {Object} obj : the target object to be assigned
8385
+ * @param {string[]} keys
8386
+ * @param {string | number} value
8387
+ *
8388
+ * @example
8389
+ * const source = {}
8390
+ * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')
8391
+ * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }
8392
+ *
8393
+ * @example
8394
+ * const source = { palette: { primary: 'var(--palette-primary)' } }
8395
+ * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')
8396
+ * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }
8397
+ */
8398
+ const assignNestedKeys = (obj, keys, value, arrayKeys = []) => {
8399
+ let temp = obj;
8400
+ keys.forEach((k, index) => {
8401
+ if (index === keys.length - 1) {
8402
+ if (Array.isArray(temp)) {
8403
+ temp[Number(k)] = value;
8404
+ } else if (temp && typeof temp === 'object') {
8405
+ temp[k] = value;
8406
+ }
8407
+ } else if (temp && typeof temp === 'object') {
8408
+ if (!temp[k]) {
8409
+ temp[k] = arrayKeys.includes(k) ? [] : {};
8410
+ }
8411
+ temp = temp[k];
8412
+ }
8413
+ });
8414
+ };
8415
+
8416
+ /**
8417
+ *
8418
+ * @param {Object} obj : source object
8419
+ * @param {Function} callback : a function that will be called when
8420
+ * - the deepest key in source object is reached
8421
+ * - the value of the deepest key is NOT `undefined` | `null`
8422
+ *
8423
+ * @example
8424
+ * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)
8425
+ * // ['palette', 'primary', 'main'] '#000000'
8426
+ */
8427
+ const walkObjectDeep = (obj, callback, shouldSkipPaths) => {
8428
+ function recurse(object, parentKeys = [], arrayKeys = []) {
8429
+ Object.entries(object).forEach(([key, value]) => {
8430
+ if (!shouldSkipPaths || shouldSkipPaths && !shouldSkipPaths([...parentKeys, key])) {
8431
+ if (value !== undefined && value !== null) {
8432
+ if (typeof value === 'object' && Object.keys(value).length > 0) {
8433
+ recurse(value, [...parentKeys, key], Array.isArray(value) ? [...arrayKeys, key] : arrayKeys);
8434
+ } else {
8435
+ callback([...parentKeys, key], value, arrayKeys);
8436
+ }
8437
+ }
8438
+ }
8439
+ });
8440
+ }
8441
+ recurse(obj);
8442
+ };
8443
+ const getCssValue = (keys, value) => {
8444
+ if (typeof value === 'number') {
8445
+ if (['lineHeight', 'fontWeight', 'opacity', 'zIndex'].some(prop => keys.includes(prop))) {
8446
+ // CSS property that are unitless
8447
+ return value;
8448
+ }
8449
+ const lastKey = keys[keys.length - 1];
8450
+ if (lastKey.toLowerCase().indexOf('opacity') >= 0) {
8451
+ // opacity values are unitless
8452
+ return value;
8453
+ }
8454
+ return `${value}px`;
8455
+ }
8456
+ return value;
8457
+ };
8458
+
8459
+ /**
8460
+ * a function that parse theme and return { css, vars }
8461
+ *
8462
+ * @param {Object} theme
8463
+ * @param {{
8464
+ * prefix?: string,
8465
+ * shouldSkipGeneratingVar?: (objectPathKeys: Array<string>, value: string | number) => boolean
8466
+ * }} options.
8467
+ * `prefix`: The prefix of the generated CSS variables. This function does not change the value.
8468
+ *
8469
+ * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme).
8470
+ *
8471
+ * @example
8472
+ * const { css, vars } = parser({
8473
+ * fontSize: 12,
8474
+ * lineHeight: 1.2,
8475
+ * palette: { primary: { 500: 'var(--color)' } }
8476
+ * }, { prefix: 'foo' })
8477
+ *
8478
+ * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }
8479
+ * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }
8480
+ */
8481
+ function cssVarsParser(theme, options) {
8482
+ const {
8483
+ prefix,
8484
+ shouldSkipGeneratingVar
8485
+ } = options || {};
8486
+ const css = {};
8487
+ const vars = {};
8488
+ const varsWithDefaults = {};
8489
+ walkObjectDeep(theme, (keys, value, arrayKeys) => {
8490
+ if (typeof value === 'string' || typeof value === 'number') {
8491
+ if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {
8492
+ // only create css & var if `shouldSkipGeneratingVar` return false
8493
+ const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;
8494
+ Object.assign(css, {
8495
+ [cssVar]: getCssValue(keys, value)
8496
+ });
8497
+ assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys);
8498
+ assignNestedKeys(varsWithDefaults, keys, `var(${cssVar}, ${value})`, arrayKeys);
8499
+ }
8500
+ }
8501
+ }, keys => keys[0] === 'vars' // skip 'vars/*' paths
8502
+ );
8503
+
8504
+ return {
8505
+ css,
8506
+ vars,
8507
+ varsWithDefaults
8508
+ };
8509
+ }
8510
+
8511
+ const _excluded$2g = ["colorSchemes", "components"],
8512
+ _excluded2$c = ["light"];
8513
+ function prepareCssVars(theme, parserConfig) {
8514
+ // @ts-ignore - ignore components do not exist
8515
+ const {
8516
+ colorSchemes = {}
8517
+ } = theme,
8518
+ otherTheme = _objectWithoutPropertiesLoose(theme, _excluded$2g);
8519
+ const {
8520
+ vars: rootVars,
8521
+ css: rootCss,
8522
+ varsWithDefaults: rootVarsWithDefaults
8523
+ } = cssVarsParser(otherTheme, parserConfig);
8524
+ let themeVars = rootVarsWithDefaults;
8525
+ const colorSchemesMap = {};
8526
+ const {
8527
+ light
8528
+ } = colorSchemes,
8529
+ otherColorSchemes = _objectWithoutPropertiesLoose(colorSchemes, _excluded2$c);
8530
+ Object.entries(otherColorSchemes || {}).forEach(([key, scheme]) => {
8531
+ const {
8532
+ vars,
8533
+ css,
8534
+ varsWithDefaults
8535
+ } = cssVarsParser(scheme, parserConfig);
8536
+ themeVars = deepmerge(themeVars, varsWithDefaults);
8537
+ colorSchemesMap[key] = {
8538
+ css,
8539
+ vars
8540
+ };
8541
+ });
8542
+ if (light) {
8543
+ // light color scheme vars should be merged last to set as default
8544
+ const {
8545
+ css,
8546
+ vars,
8547
+ varsWithDefaults
8548
+ } = cssVarsParser(light, parserConfig);
8549
+ themeVars = deepmerge(themeVars, varsWithDefaults);
8550
+ colorSchemesMap.light = {
8551
+ css,
8552
+ vars
8553
+ };
8554
+ }
8555
+ const generateCssVars = colorScheme => {
8556
+ if (!colorScheme) {
8557
+ return {
8558
+ css: rootCss,
8559
+ vars: rootVars
8560
+ };
8561
+ }
8562
+ return colorSchemesMap[colorScheme];
8563
+ };
8564
+ return {
8565
+ vars: themeVars,
8566
+ generateCssVars
8567
+ };
8568
+ }
8569
+
8515
8570
  const _excluded$2f = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
8516
8571
  const defaultTheme$6 = createTheme$1();
8517
8572
  const defaultCreateStyledComponent$2 = systemStyled('div', {
@@ -10105,7 +10160,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10105
10160
  };
10106
10161
  var getOverlayAlpha$1 = getOverlayAlpha;
10107
10162
 
10108
- const _excluded$27 = ["colorSchemes", "cssVarPrefix"],
10163
+ const _excluded$27 = ["colorSchemes", "cssVarPrefix", "shouldSkipGeneratingVar"],
10109
10164
  _excluded2$a = ["palette"];
10110
10165
  const defaultDarkOverlays = [...Array(25)].map((_, index) => {
10111
10166
  if (index === 0) {
@@ -10142,11 +10197,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10142
10197
  return undefined;
10143
10198
  };
10144
10199
  const createGetCssVar = (cssVarPrefix = 'mui') => createGetCssVar$1(cssVarPrefix);
10200
+ const defaultShouldSkipGeneratingVar = keys => {
10201
+ var _keys$;
10202
+ return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
10203
+ // ends with sxConfig
10204
+ keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
10205
+ };
10145
10206
  function extendTheme(options = {}, ...args) {
10146
10207
  var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
10147
10208
  const {
10148
10209
  colorSchemes: colorSchemesInput = {},
10149
- cssVarPrefix = 'mui'
10210
+ cssVarPrefix = 'mui',
10211
+ shouldSkipGeneratingVar = defaultShouldSkipGeneratingVar
10150
10212
  } = options,
10151
10213
  input = _objectWithoutPropertiesLoose(options, _excluded$27);
10152
10214
  const getCssVar = createGetCssVar(cssVarPrefix);
@@ -10192,6 +10254,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10192
10254
  });
10193
10255
  Object.keys(theme.colorSchemes).forEach(key => {
10194
10256
  const palette = theme.colorSchemes[key].palette;
10257
+ const setCssVarColor = cssVar => {
10258
+ const tokens = cssVar.split('-');
10259
+ const color = tokens[1];
10260
+ const colorToken = tokens[2];
10261
+ return getCssVar(cssVar, palette[color][colorToken]);
10262
+ };
10195
10263
 
10196
10264
  // attach black & white channels to common node
10197
10265
  if (key === 'light') {
@@ -10209,10 +10277,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10209
10277
  setColor(palette.Alert, 'infoColor', private_safeDarken(palette.info.light, 0.6));
10210
10278
  setColor(palette.Alert, 'successColor', private_safeDarken(palette.success.light, 0.6));
10211
10279
  setColor(palette.Alert, 'warningColor', private_safeDarken(palette.warning.light, 0.6));
10212
- setColor(palette.Alert, 'errorFilledBg', getCssVar('palette-error-main'));
10213
- setColor(palette.Alert, 'infoFilledBg', getCssVar('palette-info-main'));
10214
- setColor(palette.Alert, 'successFilledBg', getCssVar('palette-success-main'));
10215
- setColor(palette.Alert, 'warningFilledBg', getCssVar('palette-warning-main'));
10280
+ setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-main'));
10281
+ setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-main'));
10282
+ setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-main'));
10283
+ setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-main'));
10216
10284
  setColor(palette.Alert, 'errorFilledColor', silent(() => lightPalette.getContrastText(palette.error.main)));
10217
10285
  setColor(palette.Alert, 'infoFilledColor', silent(() => lightPalette.getContrastText(palette.info.main)));
10218
10286
  setColor(palette.Alert, 'successFilledColor', silent(() => lightPalette.getContrastText(palette.success.main)));
@@ -10221,15 +10289,15 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10221
10289
  setColor(palette.Alert, 'infoStandardBg', private_safeLighten(palette.info.light, 0.9));
10222
10290
  setColor(palette.Alert, 'successStandardBg', private_safeLighten(palette.success.light, 0.9));
10223
10291
  setColor(palette.Alert, 'warningStandardBg', private_safeLighten(palette.warning.light, 0.9));
10224
- setColor(palette.Alert, 'errorIconColor', getCssVar('palette-error-main'));
10225
- setColor(palette.Alert, 'infoIconColor', getCssVar('palette-info-main'));
10226
- setColor(palette.Alert, 'successIconColor', getCssVar('palette-success-main'));
10227
- setColor(palette.Alert, 'warningIconColor', getCssVar('palette-warning-main'));
10228
- setColor(palette.AppBar, 'defaultBg', getCssVar('palette-grey-100'));
10229
- setColor(palette.Avatar, 'defaultBg', getCssVar('palette-grey-400'));
10230
- setColor(palette.Chip, 'defaultBorder', getCssVar('palette-grey-400'));
10231
- setColor(palette.Chip, 'defaultAvatarColor', getCssVar('palette-grey-700'));
10232
- setColor(palette.Chip, 'defaultIconColor', getCssVar('palette-grey-700'));
10292
+ setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));
10293
+ setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));
10294
+ setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));
10295
+ setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));
10296
+ setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));
10297
+ setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));
10298
+ setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));
10299
+ setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));
10300
+ setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));
10233
10301
  setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
10234
10302
  setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
10235
10303
  setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
@@ -10239,7 +10307,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10239
10307
  setColor(palette.LinearProgress, 'infoBg', private_safeLighten(palette.info.main, 0.62));
10240
10308
  setColor(palette.LinearProgress, 'successBg', private_safeLighten(palette.success.main, 0.62));
10241
10309
  setColor(palette.LinearProgress, 'warningBg', private_safeLighten(palette.warning.main, 0.62));
10242
- setColor(palette.Skeleton, 'bg', `rgba(${getCssVar('palette-text-primaryChannel')} / 0.11)`);
10310
+ setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.11)`);
10243
10311
  setColor(palette.Slider, 'primaryTrack', private_safeLighten(palette.primary.main, 0.62));
10244
10312
  setColor(palette.Slider, 'secondaryTrack', private_safeLighten(palette.secondary.main, 0.62));
10245
10313
  setColor(palette.Slider, 'errorTrack', private_safeLighten(palette.error.main, 0.62));
@@ -10250,10 +10318,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10250
10318
  setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
10251
10319
  setColor(palette.SnackbarContent, 'color', silent(() => lightPalette.getContrastText(snackbarContentBackground)));
10252
10320
  setColor(palette.SpeedDialAction, 'fabHoverBg', private_safeEmphasize(palette.background.paper, 0.15));
10253
- setColor(palette.StepConnector, 'border', getCssVar('palette-grey-400'));
10254
- setColor(palette.StepContent, 'border', getCssVar('palette-grey-400'));
10255
- setColor(palette.Switch, 'defaultColor', getCssVar('palette-common-white'));
10256
- setColor(palette.Switch, 'defaultDisabledColor', getCssVar('palette-grey-100'));
10321
+ setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-400'));
10322
+ setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-400'));
10323
+ setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-common-white'));
10324
+ setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-100'));
10257
10325
  setColor(palette.Switch, 'primaryDisabledColor', private_safeLighten(palette.primary.main, 0.62));
10258
10326
  setColor(palette.Switch, 'secondaryDisabledColor', private_safeLighten(palette.secondary.main, 0.62));
10259
10327
  setColor(palette.Switch, 'errorDisabledColor', private_safeLighten(palette.error.main, 0.62));
@@ -10267,10 +10335,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10267
10335
  setColor(palette.Alert, 'infoColor', private_safeLighten(palette.info.light, 0.6));
10268
10336
  setColor(palette.Alert, 'successColor', private_safeLighten(palette.success.light, 0.6));
10269
10337
  setColor(palette.Alert, 'warningColor', private_safeLighten(palette.warning.light, 0.6));
10270
- setColor(palette.Alert, 'errorFilledBg', getCssVar('palette-error-dark'));
10271
- setColor(palette.Alert, 'infoFilledBg', getCssVar('palette-info-dark'));
10272
- setColor(palette.Alert, 'successFilledBg', getCssVar('palette-success-dark'));
10273
- setColor(palette.Alert, 'warningFilledBg', getCssVar('palette-warning-dark'));
10338
+ setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-dark'));
10339
+ setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-dark'));
10340
+ setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-dark'));
10341
+ setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-dark'));
10274
10342
  setColor(palette.Alert, 'errorFilledColor', silent(() => darkPalette.getContrastText(palette.error.dark)));
10275
10343
  setColor(palette.Alert, 'infoFilledColor', silent(() => darkPalette.getContrastText(palette.info.dark)));
10276
10344
  setColor(palette.Alert, 'successFilledColor', silent(() => darkPalette.getContrastText(palette.success.dark)));
@@ -10279,17 +10347,17 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10279
10347
  setColor(palette.Alert, 'infoStandardBg', private_safeDarken(palette.info.light, 0.9));
10280
10348
  setColor(palette.Alert, 'successStandardBg', private_safeDarken(palette.success.light, 0.9));
10281
10349
  setColor(palette.Alert, 'warningStandardBg', private_safeDarken(palette.warning.light, 0.9));
10282
- setColor(palette.Alert, 'errorIconColor', getCssVar('palette-error-main'));
10283
- setColor(palette.Alert, 'infoIconColor', getCssVar('palette-info-main'));
10284
- setColor(palette.Alert, 'successIconColor', getCssVar('palette-success-main'));
10285
- setColor(palette.Alert, 'warningIconColor', getCssVar('palette-warning-main'));
10286
- setColor(palette.AppBar, 'defaultBg', getCssVar('palette-grey-900'));
10287
- setColor(palette.AppBar, 'darkBg', getCssVar('palette-background-paper')); // specific for dark mode
10288
- setColor(palette.AppBar, 'darkColor', getCssVar('palette-text-primary')); // specific for dark mode
10289
- setColor(palette.Avatar, 'defaultBg', getCssVar('palette-grey-600'));
10290
- setColor(palette.Chip, 'defaultBorder', getCssVar('palette-grey-700'));
10291
- setColor(palette.Chip, 'defaultAvatarColor', getCssVar('palette-grey-300'));
10292
- setColor(palette.Chip, 'defaultIconColor', getCssVar('palette-grey-300'));
10350
+ setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));
10351
+ setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));
10352
+ setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));
10353
+ setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));
10354
+ setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-900'));
10355
+ setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode
10356
+ setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode
10357
+ setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));
10358
+ setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));
10359
+ setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));
10360
+ setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));
10293
10361
  setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
10294
10362
  setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
10295
10363
  setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
@@ -10299,7 +10367,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10299
10367
  setColor(palette.LinearProgress, 'infoBg', private_safeDarken(palette.info.main, 0.5));
10300
10368
  setColor(palette.LinearProgress, 'successBg', private_safeDarken(palette.success.main, 0.5));
10301
10369
  setColor(palette.LinearProgress, 'warningBg', private_safeDarken(palette.warning.main, 0.5));
10302
- setColor(palette.Skeleton, 'bg', `rgba(${getCssVar('palette-text-primaryChannel')} / 0.13)`);
10370
+ setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.13)`);
10303
10371
  setColor(palette.Slider, 'primaryTrack', private_safeDarken(palette.primary.main, 0.5));
10304
10372
  setColor(palette.Slider, 'secondaryTrack', private_safeDarken(palette.secondary.main, 0.5));
10305
10373
  setColor(palette.Slider, 'errorTrack', private_safeDarken(palette.error.main, 0.5));
@@ -10310,10 +10378,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10310
10378
  setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
10311
10379
  setColor(palette.SnackbarContent, 'color', silent(() => darkPalette.getContrastText(snackbarContentBackground)));
10312
10380
  setColor(palette.SpeedDialAction, 'fabHoverBg', private_safeEmphasize(palette.background.paper, 0.15));
10313
- setColor(palette.StepConnector, 'border', getCssVar('palette-grey-600'));
10314
- setColor(palette.StepContent, 'border', getCssVar('palette-grey-600'));
10315
- setColor(palette.Switch, 'defaultColor', getCssVar('palette-grey-300'));
10316
- setColor(palette.Switch, 'defaultDisabledColor', getCssVar('palette-grey-600'));
10381
+ setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-600'));
10382
+ setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-600'));
10383
+ setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-grey-300'));
10384
+ setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-600'));
10317
10385
  setColor(palette.Switch, 'primaryDisabledColor', private_safeDarken(palette.primary.main, 0.55));
10318
10386
  setColor(palette.Switch, 'secondaryDisabledColor', private_safeDarken(palette.secondary.main, 0.55));
10319
10387
  setColor(palette.Switch, 'errorDisabledColor', private_safeDarken(palette.error.main, 0.55));
@@ -10366,6 +10434,17 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10366
10434
  });
10367
10435
  });
10368
10436
  theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);
10437
+ const parserConfig = {
10438
+ prefix: cssVarPrefix,
10439
+ shouldSkipGeneratingVar
10440
+ };
10441
+ const {
10442
+ vars: themeVars,
10443
+ generateCssVars
10444
+ } = prepareCssVars(theme, parserConfig);
10445
+ theme.vars = themeVars;
10446
+ theme.generateCssVars = generateCssVars;
10447
+ theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar;
10369
10448
  theme.unstable_sxConfig = _extends({}, defaultSxConfig$1, input == null ? void 0 : input.unstable_sxConfig);
10370
10449
  theme.unstable_sx = function sx(props) {
10371
10450
  return styleFunctionSx$1({
@@ -10382,12 +10461,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10382
10461
  const excludeVariablesFromRoot = cssVarPrefix => [...[...Array(24)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index + 1}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];
10383
10462
  var excludeVariablesFromRoot$1 = excludeVariablesFromRoot;
10384
10463
 
10385
- const shouldSkipGeneratingVar = keys => {
10386
- var _keys$;
10387
- return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
10388
- // ends with sxConfig
10389
- keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
10390
- };
10391
10464
  const defaultTheme$1 = extendTheme();
10392
10465
  const {
10393
10466
  CssVarsProvider,
@@ -10414,7 +10487,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10414
10487
  };
10415
10488
  return newTheme;
10416
10489
  },
10417
- shouldSkipGeneratingVar,
10418
10490
  excludeVariablesFromRoot: excludeVariablesFromRoot$1
10419
10491
  });
10420
10492
 
@@ -10804,7 +10876,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
10804
10876
  ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);
10805
10877
  }
10806
10878
 
10807
- /* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */
10808
10879
  // Inspired by https://github.com/focus-trap/tabbable
10809
10880
  const candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'].join(',');
10810
10881
  function getTabIndex(node) {
@@ -21885,7 +21956,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
21885
21956
  function getAutocompleteUtilityClass(slot) {
21886
21957
  return generateUtilityClass('MuiAutocomplete', slot);
21887
21958
  }
21888
- const autocompleteClasses = generateUtilityClasses('MuiAutocomplete', ['root', 'fullWidth', 'focused', 'focusVisible', 'tag', 'tagSizeSmall', 'tagSizeMedium', 'hasPopupIcon', 'hasClearIcon', 'inputRoot', 'input', 'inputFocused', 'endAdornment', 'clearIndicator', 'popupIndicator', 'popupIndicatorOpen', 'popper', 'popperDisablePortal', 'paper', 'listbox', 'loading', 'noOptions', 'option', 'groupLabel', 'groupUl']);
21959
+ const autocompleteClasses = generateUtilityClasses('MuiAutocomplete', ['root', 'expanded', 'fullWidth', 'focused', 'focusVisible', 'tag', 'tagSizeSmall', 'tagSizeMedium', 'hasPopupIcon', 'hasClearIcon', 'inputRoot', 'input', 'inputFocused', 'endAdornment', 'clearIndicator', 'popupIndicator', 'popupIndicatorOpen', 'popper', 'popperDisablePortal', 'paper', 'listbox', 'loading', 'noOptions', 'option', 'groupLabel', 'groupUl']);
21889
21960
  var autocompleteClasses$1 = autocompleteClasses;
21890
21961
 
21891
21962
  var _ClearIcon, _ArrowDropDownIcon;
@@ -21894,6 +21965,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
21894
21965
  const {
21895
21966
  classes,
21896
21967
  disablePortal,
21968
+ expanded,
21897
21969
  focused,
21898
21970
  fullWidth,
21899
21971
  hasClearIcon,
@@ -21903,7 +21975,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
21903
21975
  size
21904
21976
  } = ownerState;
21905
21977
  const slots = {
21906
- root: ['root', focused && 'focused', fullWidth && 'fullWidth', hasClearIcon && 'hasClearIcon', hasPopupIcon && 'hasPopupIcon'],
21978
+ root: ['root', expanded && 'expanded', focused && 'focused', fullWidth && 'fullWidth', hasClearIcon && 'hasClearIcon', hasPopupIcon && 'hasPopupIcon'],
21907
21979
  inputRoot: ['inputRoot'],
21908
21980
  input: ['input', inputFocused && 'inputFocused'],
21909
21981
  tag: ['tag', `tagSize${capitalize(size)}`],
@@ -22302,6 +22374,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22302
22374
  getOptionProps,
22303
22375
  value,
22304
22376
  dirty,
22377
+ expanded,
22305
22378
  id,
22306
22379
  popupOpen,
22307
22380
  focused,
@@ -22319,6 +22392,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22319
22392
  // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
22320
22393
  const ownerState = _extends({}, props, {
22321
22394
  disablePortal,
22395
+ expanded,
22322
22396
  focused,
22323
22397
  fullWidth,
22324
22398
  hasClearIcon,
@@ -22765,7 +22839,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22765
22839
  *
22766
22840
  * @param {React.SyntheticEvent} event The event source of the callback.
22767
22841
  * @param {T} option The highlighted option.
22768
- * @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`.
22842
+ * @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`, `"touch"`.
22769
22843
  */
22770
22844
  onHighlightChange: PropTypes.func,
22771
22845
  /**
@@ -27812,7 +27886,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27812
27886
  const ownerState = props;
27813
27887
  const classes = useUtilityClasses$19(ownerState);
27814
27888
  const {
27815
- titleId: id = idProp
27889
+ titleId = idProp
27816
27890
  } = React__namespace.useContext(DialogContext$1);
27817
27891
  return /*#__PURE__*/jsxRuntime_1(DialogTitleRoot, _extends({
27818
27892
  component: "h2",
@@ -27820,7 +27894,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27820
27894
  ownerState: ownerState,
27821
27895
  ref: ref,
27822
27896
  variant: "h6",
27823
- id: id
27897
+ id: idProp != null ? idProp : titleId
27824
27898
  }, other));
27825
27899
  });
27826
27900
  DialogTitle.propTypes /* remove-proptypes */ = {
@@ -35707,7 +35781,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
35707
35781
  },
35708
35782
  transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,
35709
35783
  PaperProps: _extends({
35710
- component: MenuPaper
35784
+ as: MenuPaper
35711
35785
  }, PaperProps, {
35712
35786
  classes: _extends({}, PaperProps.classes, {
35713
35787
  root: classes.paper
@@ -49303,7 +49377,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
49303
49377
  exports.scopedCssBaselineClasses = scopedCssBaselineClasses$1;
49304
49378
  exports.selectClasses = selectClasses$1;
49305
49379
  exports.setRef = setRef;
49306
- exports.shouldSkipGeneratingVar = shouldSkipGeneratingVar;
49307
49380
  exports.skeletonClasses = skeletonClasses$1;
49308
49381
  exports.sliderClasses = sliderClasses$1;
49309
49382
  exports.snackbarClasses = snackbarClasses$1;