@mui/material 5.8.4 → 5.8.7

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 (257) 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/Alert.js +19 -11
  6. package/Alert/alertClasses.d.ts +44 -44
  7. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  8. package/AppBar/AppBar.js +22 -5
  9. package/AppBar/appBarClasses.d.ts +28 -28
  10. package/Autocomplete/Autocomplete.d.ts +2 -0
  11. package/Autocomplete/Autocomplete.js +12 -8
  12. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  13. package/Avatar/Avatar.js +7 -4
  14. package/Avatar/avatarClasses.d.ts +20 -20
  15. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  16. package/Backdrop/backdropClasses.d.ts +10 -10
  17. package/Badge/Badge.js +2 -2
  18. package/Badge/badgeClasses.d.ts +56 -56
  19. package/BottomNavigation/BottomNavigation.js +0 -0
  20. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  21. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  22. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  23. package/Button/buttonClasses.d.ts +100 -100
  24. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  25. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  26. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  27. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  28. package/CHANGELOG.md +185 -4
  29. package/Card/cardClasses.d.ts +8 -8
  30. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  31. package/CardActions/cardActionsClasses.d.ts +10 -10
  32. package/CardContent/cardContentClasses.d.ts +8 -8
  33. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  34. package/CardMedia/cardMediaClasses.d.ts +12 -12
  35. package/Checkbox/checkboxClasses.d.ts +18 -18
  36. package/Chip/Chip.js +31 -30
  37. package/Chip/chipClasses.d.ts +80 -80
  38. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  39. package/ClickAwayListener/index.d.ts +2 -2
  40. package/Collapse/collapseClasses.d.ts +18 -18
  41. package/Container/containerClasses.d.ts +6 -6
  42. package/Dialog/Dialog.js +11 -6
  43. package/Dialog/DialogContext.d.ts +6 -6
  44. package/Dialog/dialogClasses.d.ts +36 -36
  45. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  46. package/DialogContent/dialogContentClasses.d.ts +10 -10
  47. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  48. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  49. package/Divider/dividerClasses.d.ts +34 -34
  50. package/Drawer/drawerClasses.d.ts +30 -30
  51. package/Fab/fabClasses.d.ts +26 -26
  52. package/FilledInput/FilledInput.js +28 -13
  53. package/FilledInput/filledInputClasses.d.ts +40 -40
  54. package/FormControl/formControlClasses.d.ts +14 -14
  55. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  56. package/FormGroup/formGroupClasses.d.ts +12 -12
  57. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  58. package/FormLabel/formLabelClasses.d.ts +22 -22
  59. package/Grid/gridClasses.d.ts +48 -48
  60. package/Icon/iconClasses.d.ts +24 -24
  61. package/IconButton/iconButtonClasses.d.ts +26 -26
  62. package/ImageList/imageListClasses.d.ts +16 -16
  63. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  64. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  65. package/Input/Input.js +1 -1
  66. package/Input/inputClasses.d.ts +34 -34
  67. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  68. package/InputBase/InputBase.js +2 -2
  69. package/InputBase/inputBaseClasses.d.ts +44 -44
  70. package/InputLabel/inputLabelClasses.d.ts +32 -32
  71. package/LinearProgress/LinearProgress.js +6 -2
  72. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  73. package/Link/getTextDecoration.d.ts +15 -15
  74. package/Link/linkClasses.d.ts +18 -18
  75. package/List/listClasses.d.ts +14 -14
  76. package/ListItem/listItemClasses.d.ts +30 -30
  77. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  78. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  79. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  80. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  81. package/ListItemText/listItemTextClasses.d.ts +18 -18
  82. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  83. package/Menu/menuClasses.d.ts +12 -12
  84. package/MenuItem/menuItemClasses.d.ts +20 -20
  85. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  86. package/Modal/Modal.d.ts +2 -0
  87. package/Modal/Modal.js +25 -8
  88. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  89. package/OutlinedInput/OutlinedInput.js +40 -10
  90. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  91. package/Pagination/paginationClasses.d.ts +14 -14
  92. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  93. package/Paper/paperClasses.d.ts +39 -39
  94. package/Popover/popoverClasses.d.ts +10 -10
  95. package/Popper/Popper.d.ts +29 -29
  96. package/Radio/radioClasses.d.ts +16 -16
  97. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  98. package/RadioGroup/useRadioGroup.d.ts +4 -4
  99. package/Rating/ratingClasses.d.ts +40 -40
  100. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  101. package/Select/Select.d.ts +1 -1
  102. package/Select/Select.js +1 -1
  103. package/Select/selectClasses.d.ts +30 -30
  104. package/Skeleton/Skeleton.js +8 -3
  105. package/Skeleton/skeletonClasses.d.ts +24 -24
  106. package/Slider/Slider.js +21 -21
  107. package/Snackbar/snackbarClasses.d.ts +20 -20
  108. package/SnackbarContent/SnackbarContent.js +3 -3
  109. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  110. package/SpeedDial/speedDialClasses.d.ts +22 -22
  111. package/SpeedDialAction/SpeedDialAction.js +7 -7
  112. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  113. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  114. package/Step/StepContext.d.ts +20 -20
  115. package/Step/stepClasses.d.ts +16 -16
  116. package/StepButton/stepButtonClasses.d.ts +14 -14
  117. package/StepConnector/StepConnector.js +14 -11
  118. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  119. package/StepContent/StepContent.js +1 -1
  120. package/StepContent/stepContentClasses.d.ts +12 -12
  121. package/StepIcon/stepIconClasses.d.ts +16 -16
  122. package/StepLabel/stepLabelClasses.d.ts +28 -28
  123. package/Stepper/StepperContext.d.ts +18 -18
  124. package/Stepper/stepperClasses.d.ts +14 -14
  125. package/SvgIcon/svgIconClasses.d.ts +24 -24
  126. package/Switch/Switch.js +11 -11
  127. package/Switch/switchClasses.d.ts +32 -32
  128. package/Tab/tabClasses.d.ts +26 -26
  129. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  130. package/Table/tableClasses.d.ts +10 -10
  131. package/TableBody/tableBodyClasses.d.ts +8 -8
  132. package/TableCell/TableCell.js +5 -5
  133. package/TableCell/tableCellClasses.d.ts +32 -32
  134. package/TableContainer/tableContainerClasses.d.ts +8 -8
  135. package/TableFooter/tableFooterClasses.d.ts +8 -8
  136. package/TableHead/tableHeadClasses.d.ts +8 -8
  137. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  138. package/TableRow/tableRowClasses.d.ts +16 -16
  139. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  140. package/Tabs/Tabs.js +16 -18
  141. package/Tabs/tabsClasses.d.ts +32 -32
  142. package/TextField/textFieldClasses.d.ts +8 -8
  143. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  144. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  145. package/Toolbar/toolbarClasses.d.ts +14 -14
  146. package/Tooltip/Tooltip.js +1 -1
  147. package/Tooltip/tooltipClasses.d.ts +30 -30
  148. package/Typography/typographyClasses.d.ts +50 -50
  149. package/className/index.d.ts +1 -1
  150. package/darkScrollbar/index.d.ts +28 -28
  151. package/index.js +1 -1
  152. package/internal/switchBaseClasses.d.ts +12 -12
  153. package/legacy/Alert/Alert.js +19 -11
  154. package/legacy/AppBar/AppBar.js +23 -4
  155. package/legacy/Autocomplete/Autocomplete.js +12 -8
  156. package/legacy/Avatar/Avatar.js +7 -4
  157. package/legacy/Badge/Badge.js +2 -2
  158. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  159. package/legacy/Chip/Chip.js +31 -30
  160. package/legacy/Dialog/Dialog.js +11 -6
  161. package/legacy/FilledInput/FilledInput.js +28 -14
  162. package/legacy/Input/Input.js +1 -1
  163. package/legacy/InputBase/InputBase.js +2 -2
  164. package/legacy/LinearProgress/LinearProgress.js +6 -2
  165. package/legacy/Modal/Modal.js +23 -7
  166. package/legacy/OutlinedInput/OutlinedInput.js +36 -9
  167. package/legacy/Select/Select.js +1 -1
  168. package/legacy/Skeleton/Skeleton.js +2 -2
  169. package/legacy/Slider/Slider.js +21 -21
  170. package/legacy/SnackbarContent/SnackbarContent.js +3 -3
  171. package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
  172. package/legacy/StepConnector/StepConnector.js +2 -1
  173. package/legacy/StepContent/StepContent.js +1 -1
  174. package/legacy/Switch/Switch.js +11 -11
  175. package/legacy/TableCell/TableCell.js +5 -5
  176. package/legacy/Tabs/Tabs.js +16 -18
  177. package/legacy/Tooltip/Tooltip.js +1 -1
  178. package/legacy/index.js +1 -1
  179. package/legacy/styles/CssVarsProvider.js +10 -8
  180. package/legacy/styles/experimental_extendTheme.js +170 -19
  181. package/locale/index.d.ts +71 -71
  182. package/modern/Alert/Alert.js +19 -11
  183. package/modern/AppBar/AppBar.js +22 -5
  184. package/modern/Autocomplete/Autocomplete.js +11 -7
  185. package/modern/Avatar/Avatar.js +7 -4
  186. package/modern/Badge/Badge.js +2 -2
  187. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  188. package/modern/Chip/Chip.js +31 -30
  189. package/modern/Dialog/Dialog.js +11 -6
  190. package/modern/FilledInput/FilledInput.js +27 -12
  191. package/modern/Input/Input.js +1 -1
  192. package/modern/InputBase/InputBase.js +2 -2
  193. package/modern/LinearProgress/LinearProgress.js +6 -2
  194. package/modern/Modal/Modal.js +24 -7
  195. package/modern/OutlinedInput/OutlinedInput.js +40 -10
  196. package/modern/Select/Select.js +1 -1
  197. package/modern/Skeleton/Skeleton.js +7 -2
  198. package/modern/Slider/Slider.js +21 -21
  199. package/modern/SnackbarContent/SnackbarContent.js +3 -3
  200. package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
  201. package/modern/StepConnector/StepConnector.js +14 -11
  202. package/modern/StepContent/StepContent.js +1 -1
  203. package/modern/Switch/Switch.js +11 -11
  204. package/modern/TableCell/TableCell.js +5 -5
  205. package/modern/Tabs/Tabs.js +16 -18
  206. package/modern/Tooltip/Tooltip.js +1 -1
  207. package/modern/index.js +1 -1
  208. package/modern/styles/CssVarsProvider.js +6 -6
  209. package/modern/styles/experimental_extendTheme.js +166 -20
  210. package/node/Alert/Alert.js +19 -11
  211. package/node/AppBar/AppBar.js +22 -5
  212. package/node/Autocomplete/Autocomplete.js +12 -8
  213. package/node/Avatar/Avatar.js +7 -4
  214. package/node/Badge/Badge.js +2 -2
  215. package/node/BottomNavigation/BottomNavigation.js +0 -0
  216. package/node/Chip/Chip.js +31 -30
  217. package/node/Dialog/Dialog.js +11 -6
  218. package/node/FilledInput/FilledInput.js +28 -13
  219. package/node/Input/Input.js +1 -1
  220. package/node/InputBase/InputBase.js +2 -2
  221. package/node/LinearProgress/LinearProgress.js +6 -2
  222. package/node/Modal/Modal.js +25 -8
  223. package/node/OutlinedInput/OutlinedInput.js +38 -10
  224. package/node/Select/Select.js +1 -1
  225. package/node/Skeleton/Skeleton.js +7 -2
  226. package/node/Slider/Slider.js +21 -21
  227. package/node/SnackbarContent/SnackbarContent.js +3 -3
  228. package/node/SpeedDialAction/SpeedDialAction.js +7 -7
  229. package/node/StepConnector/StepConnector.js +14 -11
  230. package/node/StepContent/StepContent.js +1 -1
  231. package/node/Switch/Switch.js +11 -11
  232. package/node/TableCell/TableCell.js +5 -5
  233. package/node/Tabs/Tabs.js +16 -18
  234. package/node/Tooltip/Tooltip.js +1 -1
  235. package/node/index.js +1 -1
  236. package/node/styles/CssVarsProvider.js +11 -6
  237. package/node/styles/experimental_extendTheme.js +167 -19
  238. package/package.json +7 -7
  239. package/styles/CssVarsProvider.d.ts +14 -28
  240. package/styles/CssVarsProvider.js +10 -6
  241. package/styles/createPalette.d.ts +0 -26
  242. package/styles/experimental_extendTheme.d.ts +238 -35
  243. package/styles/experimental_extendTheme.js +166 -20
  244. package/styles/index.d.ts +24 -1
  245. package/themeCssVarsAugmentation/index.d.ts +30 -0
  246. package/transitions/index.d.ts +1 -1
  247. package/transitions/transition.d.ts +13 -13
  248. package/transitions/utils.d.ts +23 -23
  249. package/umd/material-ui.development.js +954 -471
  250. package/umd/material-ui.production.min.js +27 -22
  251. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  252. package/useTouchRipple/index.d.ts +1 -1
  253. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  254. package/utils/getScrollbarSize.d.ts +2 -2
  255. package/utils/ownerDocument.d.ts +2 -2
  256. package/utils/ownerWindow.d.ts +2 -2
  257. package/utils/setRef.d.ts +2 -2
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.4
1
+ /** @license MUI v5.8.7
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -560,6 +560,7 @@
560
560
  }
561
561
 
562
562
  var StyleSheet = /*#__PURE__*/function () {
563
+ // Using Node instead of HTMLElement since container may be a ShadowRoot
563
564
  function StyleSheet(options) {
564
565
  var _this = this;
565
566
 
@@ -918,8 +919,7 @@
918
919
  }
919
920
  }
920
921
 
921
- var inserted = {}; // $FlowFixMe
922
-
922
+ var inserted = {};
923
923
  var container;
924
924
  var nodesToHydrate = [];
925
925
 
@@ -1574,6 +1574,8 @@
1574
1574
  };
1575
1575
  }
1576
1576
 
1577
+ var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
1578
+
1577
1579
  function handleInterpolation(mergedProps, registered, interpolation) {
1578
1580
  if (interpolation == null) {
1579
1581
  return '';
@@ -1581,7 +1583,7 @@
1581
1583
 
1582
1584
  if (interpolation.__emotion_styles !== undefined) {
1583
1585
  if (interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
1584
- throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
1586
+ throw new Error(noComponentSelectorMessage);
1585
1587
  }
1586
1588
 
1587
1589
  return interpolation;
@@ -1691,7 +1693,7 @@
1691
1693
  }
1692
1694
  } else {
1693
1695
  if (_key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') {
1694
- throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
1696
+ throw new Error(noComponentSelectorMessage);
1695
1697
  }
1696
1698
 
1697
1699
  if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
@@ -1961,7 +1963,7 @@
1961
1963
 
1962
1964
  var pkg = {
1963
1965
  name: "@emotion/react",
1964
- version: "11.9.0",
1966
+ version: "11.9.3",
1965
1967
  main: "dist/emotion-react.cjs.js",
1966
1968
  module: "dist/emotion-react.esm.js",
1967
1969
  browser: {
@@ -1989,8 +1991,8 @@
1989
1991
  dependencies: {
1990
1992
  "@babel/runtime": "^7.13.10",
1991
1993
  "@emotion/babel-plugin": "^11.7.1",
1992
- "@emotion/cache": "^11.7.1",
1993
- "@emotion/serialize": "^1.0.3",
1994
+ "@emotion/cache": "^11.9.3",
1995
+ "@emotion/serialize": "^1.0.4",
1994
1996
  "@emotion/utils": "^1.1.0",
1995
1997
  "@emotion/weak-memoize": "^0.2.5",
1996
1998
  "hoist-non-react-statics": "^3.3.1"
@@ -2009,12 +2011,11 @@
2009
2011
  },
2010
2012
  devDependencies: {
2011
2013
  "@babel/core": "^7.13.10",
2014
+ "@definitelytyped/dtslint": "0.0.112",
2012
2015
  "@emotion/css": "11.9.0",
2013
2016
  "@emotion/css-prettifier": "1.0.1",
2014
2017
  "@emotion/server": "11.4.0",
2015
- "@emotion/styled": "11.8.1",
2016
- "@types/react": "^16.9.11",
2017
- dtslint: "^4.2.1",
2018
+ "@emotion/styled": "11.9.3",
2018
2019
  "html-tag-names": "^1.1.2",
2019
2020
  react: "16.14.0",
2020
2021
  "svg-tag-names": "^1.1.1",
@@ -4624,7 +4625,7 @@
4624
4625
  injectFirst: PropTypes.bool
4625
4626
  } ;
4626
4627
 
4627
- function isEmpty$3(obj) {
4628
+ function isEmpty$4(obj) {
4628
4629
  return obj === undefined || obj === null || Object.keys(obj).length === 0;
4629
4630
  }
4630
4631
 
@@ -4633,7 +4634,7 @@
4633
4634
  styles,
4634
4635
  defaultTheme = {}
4635
4636
  } = props;
4636
- const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty$3(themeInput) ? defaultTheme : themeInput) : styles;
4637
+ const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty$4(themeInput) ? defaultTheme : themeInput) : styles;
4637
4638
  return /*#__PURE__*/jsxRuntime_1(Global, {
4638
4639
  styles: globalStyles
4639
4640
  });
@@ -5464,7 +5465,12 @@
5464
5465
  return requiredInteger(props, propName, ...other);
5465
5466
  }
5466
5467
 
5468
+ function validatorNoop() {
5469
+ return null;
5470
+ }
5471
+
5467
5472
  validator.isRequired = requiredInteger;
5473
+ validatorNoop.isRequired = validatorNoop;
5468
5474
  var integerPropType = validator;
5469
5475
 
5470
5476
  /**
@@ -5528,26 +5534,26 @@
5528
5534
  var ClassNameGenerator$1 = ClassNameGenerator;
5529
5535
 
5530
5536
  const globalStateClassesMapping = {
5531
- active: 'Mui-active',
5532
- checked: 'Mui-checked',
5533
- completed: 'Mui-completed',
5534
- disabled: 'Mui-disabled',
5535
- error: 'Mui-error',
5536
- expanded: 'Mui-expanded',
5537
- focused: 'Mui-focused',
5538
- focusVisible: 'Mui-focusVisible',
5539
- required: 'Mui-required',
5540
- selected: 'Mui-selected'
5541
- };
5542
- function generateUtilityClass(componentName, slot) {
5537
+ active: 'active',
5538
+ checked: 'checked',
5539
+ completed: 'completed',
5540
+ disabled: 'disabled',
5541
+ error: 'error',
5542
+ expanded: 'expanded',
5543
+ focused: 'focused',
5544
+ focusVisible: 'focusVisible',
5545
+ required: 'required',
5546
+ selected: 'selected'
5547
+ };
5548
+ function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
5543
5549
  const globalStateClass = globalStateClassesMapping[slot];
5544
- return globalStateClass || `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
5550
+ return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
5545
5551
  }
5546
5552
 
5547
- function generateUtilityClasses(componentName, slots) {
5553
+ function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
5548
5554
  const result = {};
5549
5555
  slots.forEach(slot => {
5550
- result[slot] = generateUtilityClass(componentName, slot);
5556
+ result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
5551
5557
  });
5552
5558
  return result;
5553
5559
  }
@@ -6455,7 +6461,7 @@
6455
6461
  styleFunctionSx.filterProps = ['sx'];
6456
6462
  var defaultStyleFunctionSx = styleFunctionSx;
6457
6463
 
6458
- const _excluded$2l = ["sx"];
6464
+ const _excluded$2m = ["sx"];
6459
6465
 
6460
6466
  const splitProps = props => {
6461
6467
  const result = {
@@ -6476,7 +6482,7 @@
6476
6482
  const {
6477
6483
  sx: inSx
6478
6484
  } = props,
6479
- other = _objectWithoutPropertiesLoose(props, _excluded$2l);
6485
+ other = _objectWithoutPropertiesLoose(props, _excluded$2m);
6480
6486
 
6481
6487
  const {
6482
6488
  systemProps,
@@ -6542,7 +6548,7 @@
6542
6548
  return str;
6543
6549
  }
6544
6550
 
6545
- function clsx () {
6551
+ function clsx() {
6546
6552
  var i=0, tmp, x, str='';
6547
6553
  while (i < arguments.length) {
6548
6554
  if (tmp = arguments[i++]) {
@@ -6555,7 +6561,7 @@
6555
6561
  return str;
6556
6562
  }
6557
6563
 
6558
- const _excluded$2k = ["values", "unit", "step"];
6564
+ const _excluded$2l = ["values", "unit", "step"];
6559
6565
 
6560
6566
  const sortBreakpointsValues = values => {
6561
6567
  const breakpointsAsArray = Object.keys(values).map(key => ({
@@ -6591,7 +6597,7 @@
6591
6597
  unit = 'px',
6592
6598
  step = 5
6593
6599
  } = breakpoints,
6594
- other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2k);
6600
+ other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2l);
6595
6601
 
6596
6602
  const sortedValues = sortBreakpointsValues(values);
6597
6603
  const keys = Object.keys(sortedValues);
@@ -6683,7 +6689,7 @@
6683
6689
  return spacing;
6684
6690
  }
6685
6691
 
6686
- const _excluded$2j = ["breakpoints", "palette", "spacing", "shape"];
6692
+ const _excluded$2k = ["breakpoints", "palette", "spacing", "shape"];
6687
6693
 
6688
6694
  function createTheme$1(options = {}, ...args) {
6689
6695
  const {
@@ -6692,7 +6698,7 @@
6692
6698
  spacing: spacingInput,
6693
6699
  shape: shapeInput = {}
6694
6700
  } = options,
6695
- other = _objectWithoutPropertiesLoose(options, _excluded$2j);
6701
+ other = _objectWithoutPropertiesLoose(options, _excluded$2k);
6696
6702
 
6697
6703
  const breakpoints = createBreakpoints(breakpointsInput);
6698
6704
  const spacing = createSpacing(spacingInput);
@@ -6814,7 +6820,7 @@
6814
6820
  return useTheme$2(defaultTheme);
6815
6821
  }
6816
6822
 
6817
- const _excluded$2i = ["className", "component"];
6823
+ const _excluded$2j = ["className", "component"];
6818
6824
  function createBox(options = {}) {
6819
6825
  const {
6820
6826
  defaultTheme,
@@ -6831,7 +6837,7 @@
6831
6837
  className,
6832
6838
  component = 'div'
6833
6839
  } = _extendSxProp,
6834
- other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2i);
6840
+ other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2j);
6835
6841
 
6836
6842
  return /*#__PURE__*/jsxRuntime_1(BoxRoot, _extends({
6837
6843
  as: component,
@@ -6843,9 +6849,9 @@
6843
6849
  return Box;
6844
6850
  }
6845
6851
 
6846
- const _excluded$2h = ["variant"];
6852
+ const _excluded$2i = ["variant"];
6847
6853
 
6848
- function isEmpty$2(string) {
6854
+ function isEmpty$3(string) {
6849
6855
  return string.length === 0;
6850
6856
  }
6851
6857
  /**
@@ -6859,24 +6865,24 @@
6859
6865
  const {
6860
6866
  variant
6861
6867
  } = props,
6862
- other = _objectWithoutPropertiesLoose(props, _excluded$2h);
6868
+ other = _objectWithoutPropertiesLoose(props, _excluded$2i);
6863
6869
 
6864
6870
  let classKey = variant || '';
6865
6871
  Object.keys(other).sort().forEach(key => {
6866
6872
  if (key === 'color') {
6867
- classKey += isEmpty$2(classKey) ? props[key] : capitalize(props[key]);
6873
+ classKey += isEmpty$3(classKey) ? props[key] : capitalize(props[key]);
6868
6874
  } else {
6869
- classKey += `${isEmpty$2(classKey) ? key : capitalize(key)}${capitalize(props[key].toString())}`;
6875
+ classKey += `${isEmpty$3(classKey) ? key : capitalize(key)}${capitalize(props[key].toString())}`;
6870
6876
  }
6871
6877
  });
6872
6878
  return classKey;
6873
6879
  }
6874
6880
 
6875
- const _excluded$2g = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
6881
+ const _excluded$2h = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
6876
6882
  _excluded2$c = ["theme"],
6877
6883
  _excluded3$1 = ["theme"];
6878
6884
 
6879
- function isEmpty$1(obj) {
6885
+ function isEmpty$2(obj) {
6880
6886
  return Object.keys(obj).length === 0;
6881
6887
  }
6882
6888
 
@@ -6955,7 +6961,7 @@
6955
6961
  skipSx: inputSkipSx,
6956
6962
  overridesResolver
6957
6963
  } = inputOptions,
6958
- options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2g); // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
6964
+ options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2h); // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
6959
6965
 
6960
6966
 
6961
6967
  const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
@@ -6995,7 +7001,7 @@
6995
7001
  other = _objectWithoutPropertiesLoose(_ref, _excluded2$c);
6996
7002
 
6997
7003
  return stylesArg(_extends({
6998
- theme: isEmpty$1(themeInput) ? defaultTheme : themeInput
7004
+ theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
6999
7005
  }, other));
7000
7006
  } : stylesArg;
7001
7007
  }) : [];
@@ -7003,7 +7009,7 @@
7003
7009
 
7004
7010
  if (componentName && overridesResolver) {
7005
7011
  expressionsWithDefaultTheme.push(props => {
7006
- const theme = isEmpty$1(props.theme) ? defaultTheme : props.theme;
7012
+ const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
7007
7013
  const styleOverrides = getStyleOverrides(componentName, theme);
7008
7014
 
7009
7015
  if (styleOverrides) {
@@ -7022,14 +7028,14 @@
7022
7028
 
7023
7029
  if (componentName && !skipVariantsResolver) {
7024
7030
  expressionsWithDefaultTheme.push(props => {
7025
- const theme = isEmpty$1(props.theme) ? defaultTheme : props.theme;
7031
+ const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
7026
7032
  return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
7027
7033
  });
7028
7034
  }
7029
7035
 
7030
7036
  if (!skipSx) {
7031
7037
  expressionsWithDefaultTheme.push(props => {
7032
- const theme = isEmpty$1(props.theme) ? defaultTheme : props.theme;
7038
+ const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
7033
7039
  return styleFunctionSx(_extends({}, props, {
7034
7040
  theme
7035
7041
  }));
@@ -7056,7 +7062,7 @@
7056
7062
  other = _objectWithoutPropertiesLoose(_ref2, _excluded3$1);
7057
7063
 
7058
7064
  return styleArg(_extends({
7059
- theme: isEmpty$1(themeInput) ? defaultTheme : themeInput
7065
+ theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
7060
7066
  }, other));
7061
7067
  };
7062
7068
  }
@@ -7568,13 +7574,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7568
7574
  * @param {Object} theme
7569
7575
  * @param {{
7570
7576
  * prefix?: string,
7571
- * basePrefix?: string,
7572
7577
  * shouldSkipGeneratingVar?: (objectPathKeys: Array<string>, value: string | number) => boolean
7573
7578
  * }} options.
7574
- * `basePrefix`: defined by design system.
7575
- * `prefix`: defined by application
7576
- *
7577
- * the CSS variable value will be adjusted based on the provided `basePrefix` & `prefix` which can be found in `parsedTheme`.
7579
+ * `prefix`: The prefix of the generated CSS variables. This function does not change the value.
7578
7580
  *
7579
7581
  * @returns {{ css: Object, vars: Object, parsedTheme: typeof theme }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme), and `parsedTheme` is the cloned version of theme.
7580
7582
  *
@@ -7585,16 +7587,15 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7585
7587
  * palette: { primary: { 500: 'var(--color)' } }
7586
7588
  * }, { prefix: 'foo' })
7587
7589
  *
7588
- * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--foo-color)' }
7589
- * console.log(vars) // { fontSize: '--foo-fontSize', lineHeight: '--foo-lineHeight', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }
7590
- * console.log(parsedTheme) // { fontSize: 12, lineHeight: 1.2, palette: { primary: { 500: 'var(--foo-color)' } } }
7590
+ * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }
7591
+ * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }
7592
+ * console.log(parsedTheme) // { fontSize: 12, lineHeight: 1.2, palette: { primary: { 500: 'var(--color)' } } }
7591
7593
  */
7592
7594
 
7593
7595
 
7594
7596
  function cssVarsParser(theme, options) {
7595
7597
  const {
7596
7598
  prefix,
7597
- basePrefix = '',
7598
7599
  shouldSkipGeneratingVar
7599
7600
  } = options || {};
7600
7601
  const css = {};
@@ -7602,16 +7603,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7602
7603
  const parsedTheme = {};
7603
7604
  walkObjectDeep(theme, (keys, value, arrayKeys) => {
7604
7605
  if (typeof value === 'string' || typeof value === 'number') {
7605
- if (typeof value === 'string' && value.match(/var\(\s*--/)) {
7606
- // for CSS variable, apply prefix or remove basePrefix from the variable
7607
- if (!basePrefix && prefix) {
7608
- value = value.replace(/var\(\s*--/g, `var(--${prefix}-`);
7609
- } else {
7610
- value = prefix ? value.replace(new RegExp(`var\\(\\s*--${basePrefix}`, 'g'), `var(--${prefix}`) // removing spaces
7611
- : value.replace(new RegExp(`var\\(\\s*--${basePrefix}-`, 'g'), 'var(--');
7612
- }
7613
- }
7614
-
7615
7606
  if (!shouldSkipGeneratingVar || shouldSkipGeneratingVar && !shouldSkipGeneratingVar(keys, value)) {
7616
7607
  // only create css & var if `shouldSkipGeneratingVar` return false
7617
7608
  const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;
@@ -7637,6 +7628,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7637
7628
  const DEFAULT_ATTRIBUTE = 'data-color-scheme';
7638
7629
  function getInitColorSchemeScript$1(options) {
7639
7630
  const {
7631
+ enableColorScheme = true,
7640
7632
  enableSystem = false,
7641
7633
  defaultLightColorScheme = 'light',
7642
7634
  defaultDarkColorScheme = 'dark',
@@ -7650,13 +7642,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7650
7642
  dangerouslySetInnerHTML: {
7651
7643
  __html: `(function() { try {
7652
7644
  var mode = localStorage.getItem('${modeStorageKey}');
7645
+ var cssColorScheme = mode;
7653
7646
  var colorScheme = '';
7654
7647
  if (mode === 'system' || (!mode && !!${enableSystem})) {
7655
7648
  // handle system mode
7656
7649
  var mql = window.matchMedia('(prefers-color-scheme: dark)');
7657
7650
  if (mql.matches) {
7651
+ cssColorScheme = 'dark';
7658
7652
  colorScheme = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';
7659
7653
  } else {
7654
+ cssColorScheme = 'light';
7660
7655
  colorScheme = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';
7661
7656
  }
7662
7657
  }
@@ -7669,6 +7664,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7669
7664
  if (colorScheme) {
7670
7665
  ${colorSchemeNode}.setAttribute('${attribute}', colorScheme);
7671
7666
  }
7667
+ if (${enableColorScheme} && !!cssColorScheme) {
7668
+ ${colorSchemeNode}.style.setProperty('color-scheme', cssColorScheme);
7669
+ }
7672
7670
  } catch (e) {} })();`
7673
7671
  }
7674
7672
  });
@@ -7899,34 +7897,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7899
7897
  });
7900
7898
  }
7901
7899
 
7902
- /**
7903
- * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
7904
- * and they does not need to remember the prefix (defined once).
7905
- */
7906
- function createGetCssVar(prefix = '') {
7907
- function appendVar(...vars) {
7908
- if (!vars.length) {
7909
- return '';
7910
- }
7911
-
7912
- const value = vars[0];
7913
-
7914
- if (typeof value === 'string' && !value.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))/)) {
7915
- return `, var(--${prefix ? `${prefix}-` : ''}${value}${appendVar(...vars.slice(1))})`;
7916
- }
7917
-
7918
- return `, ${value}`;
7919
- } // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.
7920
-
7921
-
7922
- const getCssVar = (field, ...vars) => {
7923
- return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...vars)})`;
7924
- };
7925
-
7926
- return getCssVar;
7927
- }
7928
-
7929
- const _excluded$2f = ["colorSchemes", "components"];
7900
+ const _excluded$2g = ["colorSchemes", "components", "cssVarPrefix"];
7930
7901
  const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
7931
7902
  function createCssVarsProvider(options) {
7932
7903
  const {
@@ -7938,8 +7909,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7938
7909
  defaultColorScheme: designSystemColorScheme,
7939
7910
  disableTransitionOnChange: designSystemTransitionOnChange = false,
7940
7911
  enableColorScheme: designSystemEnableColorScheme = true,
7941
- prefix: designSystemPrefix = '',
7942
- shouldSkipGeneratingVar,
7912
+ shouldSkipGeneratingVar: designSystemShouldSkipGeneratingVar,
7943
7913
  resolveTheme
7944
7914
  } = options;
7945
7915
 
@@ -7962,7 +7932,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7962
7932
  function CssVarsProvider({
7963
7933
  children,
7964
7934
  theme: themeProp = defaultTheme,
7965
- prefix = designSystemPrefix,
7966
7935
  modeStorageKey = defaultModeStorageKey,
7967
7936
  colorSchemeStorageKey = defaultColorSchemeStorageKey,
7968
7937
  attribute = defaultAttribute,
@@ -7973,15 +7942,17 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
7973
7942
  storageWindow = typeof window === 'undefined' ? undefined : window,
7974
7943
  documentNode = typeof document === 'undefined' ? undefined : document,
7975
7944
  colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
7976
- colorSchemeSelector = ':root'
7945
+ colorSchemeSelector = ':root',
7946
+ shouldSkipGeneratingVar = designSystemShouldSkipGeneratingVar
7977
7947
  }) {
7978
7948
  const hasMounted = React__namespace.useRef(false);
7979
7949
 
7980
7950
  const {
7981
7951
  colorSchemes = {},
7982
- components = {}
7952
+ components = {},
7953
+ cssVarPrefix
7983
7954
  } = themeProp,
7984
- restThemeProp = _objectWithoutPropertiesLoose(themeProp, _excluded$2f);
7955
+ restThemeProp = _objectWithoutPropertiesLoose(themeProp, _excluded$2g);
7985
7956
 
7986
7957
  const allColorSchemes = Object.keys(colorSchemes);
7987
7958
  const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
@@ -8024,16 +7995,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8024
7995
  vars: rootVars,
8025
7996
  parsedTheme
8026
7997
  } = cssVarsParser(theme, {
8027
- prefix,
8028
- basePrefix: designSystemPrefix,
7998
+ prefix: cssVarPrefix,
8029
7999
  shouldSkipGeneratingVar
8030
8000
  });
8031
8001
  theme = _extends({}, parsedTheme, {
8032
8002
  components,
8033
8003
  colorSchemes,
8034
- prefix,
8004
+ cssVarPrefix,
8035
8005
  vars: rootVars,
8036
- getCssVar: createGetCssVar(prefix),
8037
8006
  getColorSchemeSelector: targetColorScheme => `[${attribute}="${targetColorScheme}"] &`
8038
8007
  });
8039
8008
  const defaultColorSchemeStyleSheet = {};
@@ -8044,8 +8013,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8044
8013
  vars,
8045
8014
  parsedTheme: parsedScheme
8046
8015
  } = cssVarsParser(scheme, {
8047
- prefix,
8048
- basePrefix: designSystemPrefix,
8016
+ prefix: cssVarPrefix,
8049
8017
  shouldSkipGeneratingVar
8050
8018
  });
8051
8019
  theme.vars = deepmerge(theme.vars, vars);
@@ -8209,9 +8177,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8209
8177
  modeStorageKey: PropTypes.string,
8210
8178
 
8211
8179
  /**
8212
- * CSS variable prefix.
8180
+ * A function to determine if the key, value should be attached as CSS Variable
8213
8181
  */
8214
- prefix: PropTypes.string,
8182
+ shouldSkipGeneratingVar: PropTypes.func,
8215
8183
 
8216
8184
  /**
8217
8185
  * The window that attaches the 'storage' event listener
@@ -8228,7 +8196,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8228
8196
  const getInitColorSchemeScript = params => getInitColorSchemeScript$1(_extends({
8229
8197
  attribute: defaultAttribute,
8230
8198
  colorSchemeStorageKey: defaultColorSchemeStorageKey,
8231
- modeStorageKey: defaultModeStorageKey
8199
+ modeStorageKey: defaultModeStorageKey,
8200
+ enableColorScheme: designSystemEnableColorScheme
8232
8201
  }, params));
8233
8202
 
8234
8203
  return {
@@ -8238,7 +8207,34 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8238
8207
  };
8239
8208
  }
8240
8209
 
8241
- const _excluded$2e = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
8210
+ /**
8211
+ * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
8212
+ * and they does not need to remember the prefix (defined once).
8213
+ */
8214
+ function createGetCssVar$1(prefix = '') {
8215
+ function appendVar(...vars) {
8216
+ if (!vars.length) {
8217
+ return '';
8218
+ }
8219
+
8220
+ const value = vars[0];
8221
+
8222
+ if (typeof value === 'string' && !value.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))/)) {
8223
+ return `, var(--${prefix ? `${prefix}-` : ''}${value}${appendVar(...vars.slice(1))})`;
8224
+ }
8225
+
8226
+ return `, ${value}`;
8227
+ } // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.
8228
+
8229
+
8230
+ const getCssVar = (field, ...fallbacks) => {
8231
+ return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...fallbacks)})`;
8232
+ };
8233
+
8234
+ return getCssVar;
8235
+ }
8236
+
8237
+ const _excluded$2f = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
8242
8238
  const defaultTheme$4 = createTheme$1();
8243
8239
  const defaultCreateStyledComponent = systemStyled('div', {
8244
8240
  name: 'MuiContainer',
@@ -8340,7 +8336,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8340
8336
  fixed = false,
8341
8337
  maxWidth = 'lg'
8342
8338
  } = props,
8343
- other = _objectWithoutPropertiesLoose(props, _excluded$2e);
8339
+ other = _objectWithoutPropertiesLoose(props, _excluded$2f);
8344
8340
 
8345
8341
  const ownerState = _extends({}, props, {
8346
8342
  component,
@@ -8380,7 +8376,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8380
8376
  return Container;
8381
8377
  }
8382
8378
 
8383
- const _excluded$2d = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
8379
+ const _excluded$2e = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
8384
8380
  _excluded2$b = ["type", "mode"];
8385
8381
  function adaptV4Theme(inputTheme) {
8386
8382
  {
@@ -8395,7 +8391,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8395
8391
  props = {},
8396
8392
  styleOverrides = {}
8397
8393
  } = inputTheme,
8398
- other = _objectWithoutPropertiesLoose(inputTheme, _excluded$2d);
8394
+ other = _objectWithoutPropertiesLoose(inputTheme, _excluded$2e);
8399
8395
 
8400
8396
  const theme = _extends({}, other, {
8401
8397
  components: {}
@@ -8467,24 +8463,179 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8467
8463
  return typeof element === 'string';
8468
8464
  }
8469
8465
 
8466
+ /**
8467
+ * Type of the ownerState based on the type of an element it applies to.
8468
+ * This resolves to the provided OwnerState for React components and `undefined` for host components.
8469
+ * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
8470
+ */
8471
+
8470
8472
  /**
8471
8473
  * Appends the ownerState object to the props, merging with the existing one if necessary.
8472
8474
  *
8473
- * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node, `ownerState` are not applied.
8474
- * @param existingProps Props of the element.
8475
+ * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node, `ownerState` is not applied.
8476
+ * @param otherProps Props of the element.
8475
8477
  * @param ownerState
8476
8478
  */
8477
-
8478
- function appendOwnerState(elementType, existingProps = {}, ownerState) {
8479
+ function appendOwnerState(elementType, otherProps = {}, ownerState) {
8479
8480
  if (isHostComponent(elementType)) {
8480
- return existingProps;
8481
+ return otherProps;
8481
8482
  }
8482
8483
 
8483
- return _extends({}, existingProps, {
8484
- ownerState: _extends({}, existingProps.ownerState, ownerState)
8484
+ return _extends({}, otherProps, {
8485
+ ownerState: _extends({}, otherProps.ownerState, ownerState)
8485
8486
  });
8486
8487
  }
8487
8488
 
8489
+ /**
8490
+ * Extracts event handlers from a given object.
8491
+ * A prop is considered an event handler if it is a function and its name starts with `on`.
8492
+ *
8493
+ * @param object An object to extract event handlers from.
8494
+ * @param excludeKeys An array of keys to exclude from the returned object.
8495
+ */
8496
+ function extractEventHandlers(object, excludeKeys = []) {
8497
+ if (object === undefined) {
8498
+ return {};
8499
+ }
8500
+
8501
+ const result = {};
8502
+ Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {
8503
+ result[prop] = object[prop];
8504
+ });
8505
+ return result;
8506
+ }
8507
+
8508
+ /**
8509
+ * If `componentProps` is a function, calls it with the provided `ownerState`.
8510
+ * Otherwise, just returns `componentProps`.
8511
+ */
8512
+ function resolveComponentProps(componentProps, ownerState) {
8513
+ if (typeof componentProps === 'function') {
8514
+ return componentProps(ownerState);
8515
+ }
8516
+
8517
+ return componentProps;
8518
+ }
8519
+
8520
+ /**
8521
+ * Removes event handlers from the given object.
8522
+ * A field is considered an event handler if it is a function with a name beginning with `on`.
8523
+ *
8524
+ * @param object Object to remove event handlers from.
8525
+ * @returns Object with event handlers removed.
8526
+ */
8527
+ function omitEventHandlers(object) {
8528
+ if (object === undefined) {
8529
+ return {};
8530
+ }
8531
+
8532
+ const result = {};
8533
+ Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {
8534
+ result[prop] = object[prop];
8535
+ });
8536
+ return result;
8537
+ }
8538
+
8539
+ /**
8540
+ * Merges the slot component internal props (usually coming from a hook)
8541
+ * with the externally provided ones.
8542
+ *
8543
+ * The merge order is (the latter overrides the former):
8544
+ * 1. The internal props (specified as a getter function to work with get*Props hook result)
8545
+ * 2. Additional props (specified internally on an unstyled component)
8546
+ * 3. External props specified on the owner component. These should only be used on a root slot.
8547
+ * 4. External props specified in the `componentsProps.*` prop.
8548
+ * 5. The `className` prop - combined from all the above.
8549
+ * @param parameters
8550
+ * @returns
8551
+ */
8552
+ function mergeSlotProps(parameters) {
8553
+ const {
8554
+ getSlotProps,
8555
+ additionalProps,
8556
+ externalSlotProps,
8557
+ externalForwardedProps,
8558
+ className
8559
+ } = parameters;
8560
+
8561
+ if (!getSlotProps) {
8562
+ // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,
8563
+ // so we can simply merge all the props without having to worry about extracting event handlers.
8564
+ const joinedClasses = clsx(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className);
8565
+
8566
+ const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
8567
+
8568
+ const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);
8569
+
8570
+ if (joinedClasses.length > 0) {
8571
+ props.className = joinedClasses;
8572
+ }
8573
+
8574
+ if (Object.keys(mergedStyle).length > 0) {
8575
+ props.style = mergedStyle;
8576
+ }
8577
+
8578
+ return {
8579
+ props,
8580
+ internalRef: undefined
8581
+ };
8582
+ } // In this case, getSlotProps is responsible for calling the external event handlers.
8583
+ // We don't need to include them in the merged props because of this.
8584
+
8585
+
8586
+ const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));
8587
+ const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
8588
+ const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
8589
+ const internalSlotProps = getSlotProps(eventHandlers);
8590
+ const joinedClasses = clsx(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className, internalSlotProps == null ? void 0 : internalSlotProps.className);
8591
+
8592
+ const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
8593
+
8594
+ const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);
8595
+
8596
+ if (joinedClasses.length > 0) {
8597
+ props.className = joinedClasses;
8598
+ }
8599
+
8600
+ if (Object.keys(mergedStyle).length > 0) {
8601
+ props.style = mergedStyle;
8602
+ }
8603
+
8604
+ return {
8605
+ props,
8606
+ internalRef: internalSlotProps.ref
8607
+ };
8608
+ }
8609
+
8610
+ const _excluded$2d = ["elementType", "externalSlotProps", "ownerState"];
8611
+
8612
+ /**
8613
+ * Builds the props to be passed into the slot of an unstyled component.
8614
+ * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.
8615
+ * If the slot component is not a host component, it also merges in the `ownerState`.
8616
+ *
8617
+ * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.
8618
+ */
8619
+ function useSlotProps(parameters) {
8620
+ var _parameters$additiona;
8621
+
8622
+ const {
8623
+ elementType,
8624
+ externalSlotProps,
8625
+ ownerState
8626
+ } = parameters,
8627
+ rest = _objectWithoutPropertiesLoose(parameters, _excluded$2d);
8628
+
8629
+ const resolvedComponentsProps = resolveComponentProps(externalSlotProps, ownerState);
8630
+ const merged = mergeSlotProps(_extends({}, rest, {
8631
+ externalSlotProps: resolvedComponentsProps
8632
+ }));
8633
+ const props = appendOwnerState(elementType, _extends({}, merged.props, {
8634
+ ref: useForkRef(merged.internalRef, useForkRef(resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref))
8635
+ }), ownerState);
8636
+ return props;
8637
+ }
8638
+
8488
8639
  // Give up on IE11 support for this feature
8489
8640
 
8490
8641
  function stripDiacritics(string) {
@@ -8550,13 +8701,13 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8550
8701
  autoHighlight = false,
8551
8702
  autoSelect = false,
8552
8703
  blurOnSelect = false,
8553
- disabled: disabledProp,
8554
8704
  clearOnBlur = !props.freeSolo,
8555
8705
  clearOnEscape = false,
8556
8706
  componentName = 'useAutocomplete',
8557
8707
  defaultValue = props.multiple ? [] : null,
8558
8708
  disableClearable = false,
8559
8709
  disableCloseOnSelect = false,
8710
+ disabled: disabledProp,
8560
8711
  disabledItemsFocusable = false,
8561
8712
  disableListWrap = false,
8562
8713
  filterOptions = defaultFilterOptions,
@@ -8568,12 +8719,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
8568
8719
 
8569
8720
  return (_option$label = option.label) != null ? _option$label : option;
8570
8721
  },
8571
- isOptionEqualToValue = (option, value) => option === value,
8572
8722
  groupBy,
8573
8723
  handleHomeEndKeys = !props.freeSolo,
8574
8724
  id: idProp,
8575
8725
  includeInputInList = false,
8576
8726
  inputValue: inputValueProp,
8727
+ isOptionEqualToValue = (option, value) => option === value,
8577
8728
  multiple = false,
8578
8729
  onChange,
8579
8730
  onClose,
@@ -9558,7 +9709,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9558
9709
  }
9559
9710
  generateUtilityClasses('BaseBadge', ['root', 'badge', 'invisible']);
9560
9711
 
9561
- const _excluded$2c = ["badgeContent", "component", "children", "className", "components", "componentsProps", "invisible", "max", "showZero"];
9712
+ const _excluded$2c = ["badgeContent", "component", "children", "components", "componentsProps", "invisible", "max", "showZero"];
9562
9713
 
9563
9714
  const useUtilityClasses$1O = ownerState => {
9564
9715
  const {
@@ -9583,12 +9734,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9583
9734
 
9584
9735
 
9585
9736
  const BadgeUnstyled = /*#__PURE__*/React__namespace.forwardRef(function BadgeUnstyled(props, ref) {
9586
- var _componentsProps$root, _componentsProps$badg;
9587
-
9588
9737
  const {
9589
9738
  component,
9590
9739
  children,
9591
- className,
9592
9740
  components = {},
9593
9741
  componentsProps = {},
9594
9742
  max: maxProp = 99,
@@ -9614,14 +9762,23 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9614
9762
 
9615
9763
  const classes = useUtilityClasses$1O(ownerState);
9616
9764
  const Root = component || components.Root || 'span';
9617
- const rootProps = appendOwnerState(Root, _extends({}, other, componentsProps.root, {
9618
- ref,
9619
- className: clsx(classes.root, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.className, className)
9620
- }), ownerState);
9765
+ const rootProps = useSlotProps({
9766
+ elementType: Root,
9767
+ externalSlotProps: componentsProps.root,
9768
+ externalForwardedProps: other,
9769
+ additionalProps: {
9770
+ ref
9771
+ },
9772
+ ownerState,
9773
+ className: classes.root
9774
+ });
9621
9775
  const Badge = components.Badge || 'span';
9622
- const badgeProps = appendOwnerState(Badge, _extends({}, componentsProps.badge, {
9623
- className: clsx(classes.badge, (_componentsProps$badg = componentsProps.badge) == null ? void 0 : _componentsProps$badg.className)
9624
- }), ownerState);
9776
+ const badgeProps = useSlotProps({
9777
+ elementType: Badge,
9778
+ externalSlotProps: componentsProps.badge,
9779
+ ownerState,
9780
+ className: classes.badge
9781
+ });
9625
9782
  return /*#__PURE__*/jsxRuntime_2(Root, _extends({}, rootProps, {
9626
9783
  children: [children, /*#__PURE__*/jsxRuntime_1(Badge, _extends({}, badgeProps, {
9627
9784
  children: displayValue
@@ -9646,11 +9803,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9646
9803
  */
9647
9804
  children: PropTypes.node,
9648
9805
 
9649
- /**
9650
- * @ignore
9651
- */
9652
- className: PropTypes.string,
9653
-
9654
9806
  /**
9655
9807
  * The component used for the root node.
9656
9808
  * Either a string to use a HTML element or a component.
@@ -9672,8 +9824,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9672
9824
  * @default {}
9673
9825
  */
9674
9826
  componentsProps: PropTypes.shape({
9675
- badge: PropTypes.object,
9676
- root: PropTypes.object
9827
+ badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
9828
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
9677
9829
  }),
9678
9830
 
9679
9831
  /**
@@ -12359,15 +12511,22 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
12359
12511
  });
12360
12512
  element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;
12361
12513
  });
12362
- } // Improve Gatsby support
12363
- // https://css-tricks.com/snippets/css/force-vertical-scrollbar/
12514
+ }
12364
12515
 
12516
+ let scrollContainer;
12365
12517
 
12366
- const parent = container.parentElement;
12367
- const containerWindow = ownerWindow(container);
12368
- const scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container; // Block the scroll even if no scrollbar is visible to account for mobile keyboard
12518
+ if (container.parentNode instanceof DocumentFragment) {
12519
+ scrollContainer = ownerDocument(container).body;
12520
+ } else {
12521
+ // Improve Gatsby support
12522
+ // https://css-tricks.com/snippets/css/force-vertical-scrollbar/
12523
+ const parent = container.parentElement;
12524
+ const containerWindow = ownerWindow(container);
12525
+ scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;
12526
+ } // Block the scroll even if no scrollbar is visible to account for mobile keyboard
12369
12527
  // screensize shrink.
12370
12528
 
12529
+
12371
12530
  restoreStyle.push({
12372
12531
  value: scrollContainer.style.overflow,
12373
12532
  property: 'overflow',
@@ -12875,7 +13034,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
12875
13034
  const modalUnstyledClasses = generateUtilityClasses('MuiModal', ['root', 'hidden']);
12876
13035
  var modalUnstyledClasses$1 = modalUnstyledClasses;
12877
13036
 
12878
- const _excluded$2a = ["BackdropComponent", "BackdropProps", "children", "classes", "className", "closeAfterTransition", "component", "components", "componentsProps", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onKeyDown", "open", "theme", "onTransitionEnter", "onTransitionExited"];
13037
+ const _excluded$2a = ["children", "classes", "className", "closeAfterTransition", "component", "components", "componentsProps", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited"];
12879
13038
 
12880
13039
  const useUtilityClasses$1N = ownerState => {
12881
13040
  const {
@@ -12915,11 +13074,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
12915
13074
  */
12916
13075
 
12917
13076
  const ModalUnstyled = /*#__PURE__*/React__namespace.forwardRef(function ModalUnstyled(props, ref) {
12918
- var _props$ariaHidden;
13077
+ var _props$ariaHidden, _componentsProps$root;
12919
13078
 
12920
13079
  const {
12921
- BackdropComponent,
12922
- BackdropProps,
12923
13080
  children,
12924
13081
  classes: classesProp,
12925
13082
  className,
@@ -12945,7 +13102,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
12945
13102
  open,
12946
13103
 
12947
13104
  /* eslint-disable react/prop-types */
12948
- theme,
12949
13105
  onTransitionEnter,
12950
13106
  onTransitionExited
12951
13107
  } = props,
@@ -13105,26 +13261,25 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13105
13261
  }
13106
13262
 
13107
13263
  const Root = components.Root || component;
13108
- const rootProps = componentsProps.root || {};
13264
+ const rootProps = appendOwnerState(Root, _extends({
13265
+ role: 'presentation'
13266
+ }, other, componentsProps.root, {
13267
+ ref: handleRef,
13268
+ onKeyDown: handleKeyDown,
13269
+ className: clsx(classes.root, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.className, className)
13270
+ }), ownerState);
13271
+ const BackdropComponent = components.Backdrop;
13272
+ const backdropProps = appendOwnerState(BackdropComponent, _extends({
13273
+ 'aria-hidden': true,
13274
+ open,
13275
+ onClick: handleBackdropClick
13276
+ }, componentsProps.backdrop), ownerState);
13109
13277
  return /*#__PURE__*/jsxRuntime_1(Portal$1, {
13110
13278
  ref: handlePortalRef,
13111
13279
  container: container,
13112
13280
  disablePortal: disablePortal,
13113
- children: /*#__PURE__*/jsxRuntime_2(Root, _extends({
13114
- role: "presentation"
13115
- }, rootProps, !isHostComponent(Root) && {
13116
- as: component,
13117
- ownerState: _extends({}, ownerState, rootProps.ownerState),
13118
- theme
13119
- }, other, {
13120
- ref: handleRef,
13121
- onKeyDown: handleKeyDown,
13122
- className: clsx(classes.root, rootProps.className, className),
13123
- children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/jsxRuntime_1(BackdropComponent, _extends({
13124
- "aria-hidden": true,
13125
- open: open,
13126
- onClick: handleBackdropClick
13127
- }, BackdropProps)) : null, /*#__PURE__*/jsxRuntime_1(TrapFocus, {
13281
+ children: /*#__PURE__*/jsxRuntime_2(Root, _extends({}, rootProps, {
13282
+ children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/jsxRuntime_1(BackdropComponent, _extends({}, backdropProps)) : null, /*#__PURE__*/jsxRuntime_1(TrapFocus, {
13128
13283
  disableEnforceFocus: disableEnforceFocus,
13129
13284
  disableAutoFocus: disableAutoFocus,
13130
13285
  disableRestoreFocus: disableRestoreFocus,
@@ -13143,16 +13298,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13143
13298
  // | To update them edit the d.ts file and run "yarn proptypes" |
13144
13299
  // ----------------------------------------------------------------------
13145
13300
 
13146
- /**
13147
- * A backdrop component. This prop enables custom backdrop rendering.
13148
- */
13149
- BackdropComponent: PropTypes.elementType,
13150
-
13151
- /**
13152
- * Props applied to the backdrop element.
13153
- */
13154
- BackdropProps: PropTypes.object,
13155
-
13156
13301
  /**
13157
13302
  * A single child content element.
13158
13303
  */
@@ -13186,6 +13331,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13186
13331
  * @default {}
13187
13332
  */
13188
13333
  components: PropTypes.shape({
13334
+ Backdrop: PropTypes.elementType,
13189
13335
  Root: PropTypes.elementType
13190
13336
  }),
13191
13337
 
@@ -13194,6 +13340,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13194
13340
  * @default {}
13195
13341
  */
13196
13342
  componentsProps: PropTypes.shape({
13343
+ backdrop: PropTypes.object,
13197
13344
  root: PropTypes.object
13198
13345
  }),
13199
13346
 
@@ -13635,7 +13782,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13635
13782
  onFocus: handleFocusVisible,
13636
13783
  ref: focusVisibleRef
13637
13784
  } = useIsFocusVisible();
13638
- const [focusVisible, setFocusVisible] = React__namespace.useState(-1);
13785
+ const [focusedThumbIndex, setFocusedThumbIndex] = React__namespace.useState(-1);
13639
13786
  const sliderRef = React__namespace.useRef();
13640
13787
  const handleFocusRef = useForkRef(focusVisibleRef, sliderRef);
13641
13788
  const handleRef = useForkRef(ref, handleFocusRef);
@@ -13647,7 +13794,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13647
13794
  handleFocusVisible(event);
13648
13795
 
13649
13796
  if (isFocusVisibleRef.current === true) {
13650
- setFocusVisible(index);
13797
+ setFocusedThumbIndex(index);
13651
13798
  }
13652
13799
 
13653
13800
  setOpen(index);
@@ -13660,7 +13807,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13660
13807
  handleBlurVisible(event);
13661
13808
 
13662
13809
  if (isFocusVisibleRef.current === false) {
13663
- setFocusVisible(-1);
13810
+ setFocusedThumbIndex(-1);
13664
13811
  }
13665
13812
 
13666
13813
  setOpen(-1);
@@ -13683,8 +13830,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13683
13830
  setActive(-1);
13684
13831
  }
13685
13832
 
13686
- if (disabled && focusVisible !== -1) {
13687
- setFocusVisible(-1);
13833
+ if (disabled && focusedThumbIndex !== -1) {
13834
+ setFocusedThumbIndex(-1);
13688
13835
  }
13689
13836
 
13690
13837
  const createHandleHiddenInputChange = otherHandlers => event => {
@@ -13733,7 +13880,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
13733
13880
  }
13734
13881
 
13735
13882
  setValueState(newValue);
13736
- setFocusVisible(index);
13883
+ setFocusedThumbIndex(index);
13737
13884
 
13738
13885
  if (handleChange) {
13739
13886
  handleChange(event, newValue, index);
@@ -14044,13 +14191,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14044
14191
  onMouseOver: createHandleMouseOver(otherHandlers || {}),
14045
14192
  onMouseLeave: createHandleMouseLeave(otherHandlers || {})
14046
14193
  };
14047
-
14048
- const mergedEventHandlers = _extends({}, otherHandlers, ownEventHandlers);
14049
-
14050
- return _extends({}, mergedEventHandlers);
14194
+ return _extends({}, otherHandlers, ownEventHandlers);
14051
14195
  };
14052
14196
 
14053
14197
  const getHiddenInputProps = (otherHandlers = {}) => {
14198
+ var _parameters$step;
14199
+
14054
14200
  const ownEventHandlers = {
14055
14201
  onChange: createHandleHiddenInputChange(otherHandlers || {}),
14056
14202
  onFocus: createHandleHiddenInputFocus(otherHandlers || {}),
@@ -14069,7 +14215,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14069
14215
  type: 'range',
14070
14216
  min: parameters.min,
14071
14217
  max: parameters.max,
14072
- step: parameters.step,
14218
+ step: (_parameters$step = parameters.step) != null ? _parameters$step : undefined,
14073
14219
  disabled
14074
14220
  }, mergedEventHandlers, {
14075
14221
  style: _extends({}, visuallyHidden$1, {
@@ -14083,14 +14229,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14083
14229
 
14084
14230
  return {
14085
14231
  active,
14086
- axis,
14232
+ axis: axis,
14087
14233
  axisProps,
14088
14234
  dragging,
14089
- focusVisible,
14235
+ focusedThumbIndex,
14090
14236
  getHiddenInputProps,
14091
14237
  getRootProps,
14092
14238
  getThumbProps,
14093
- marks,
14239
+ marks: marks,
14094
14240
  open,
14095
14241
  range,
14096
14242
  trackLeap,
@@ -14099,7 +14245,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14099
14245
  };
14100
14246
  }
14101
14247
 
14102
- const _excluded$29 = ["aria-label", "aria-valuetext", "className", "component", "classes", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat", "isRtl", "components", "componentsProps"];
14248
+ const _excluded$29 = ["aria-label", "aria-valuetext", "className", "component", "classes", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "scale", "step", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat", "isRtl", "components", "componentsProps"];
14103
14249
 
14104
14250
  const Identity = x => x;
14105
14251
 
@@ -14149,7 +14295,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14149
14295
  marks: marksProp = false,
14150
14296
  max = 100,
14151
14297
  min = 0,
14152
- onMouseDown,
14153
14298
  orientation = 'horizontal',
14154
14299
  scale = Identity,
14155
14300
  step = 1,
@@ -14188,7 +14333,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14188
14333
  active,
14189
14334
  axis,
14190
14335
  range,
14191
- focusVisible,
14336
+ focusedThumbIndex,
14192
14337
  dragging,
14193
14338
  marks,
14194
14339
  values,
@@ -14199,37 +14344,69 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14199
14344
  }));
14200
14345
  ownerState.marked = marks.length > 0 && marks.some(mark => mark.label);
14201
14346
  ownerState.dragging = dragging;
14347
+ ownerState.focusedThumbIndex = focusedThumbIndex;
14348
+ const classes = useUtilityClasses$1M(ownerState);
14202
14349
  const Root = (_ref = component != null ? component : components.Root) != null ? _ref : 'span';
14203
- const rootProps = appendOwnerState(Root, _extends({}, other, componentsProps.root), ownerState);
14350
+ const rootProps = useSlotProps({
14351
+ elementType: Root,
14352
+ getSlotProps: getRootProps,
14353
+ externalSlotProps: componentsProps.root,
14354
+ externalForwardedProps: other,
14355
+ ownerState,
14356
+ className: [classes.root, className]
14357
+ });
14204
14358
  const Rail = (_components$Rail = components.Rail) != null ? _components$Rail : 'span';
14205
- const railProps = appendOwnerState(Rail, componentsProps.rail, ownerState);
14359
+ const railProps = useSlotProps({
14360
+ elementType: Rail,
14361
+ externalSlotProps: componentsProps.rail,
14362
+ ownerState,
14363
+ className: classes.rail
14364
+ });
14206
14365
  const Track = (_components$Track = components.Track) != null ? _components$Track : 'span';
14207
- const trackProps = appendOwnerState(Track, componentsProps.track, ownerState);
14208
-
14209
- const trackStyle = _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));
14210
-
14366
+ const trackProps = useSlotProps({
14367
+ elementType: Track,
14368
+ externalSlotProps: componentsProps.track,
14369
+ additionalProps: {
14370
+ style: _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap))
14371
+ },
14372
+ ownerState,
14373
+ className: classes.track
14374
+ });
14211
14375
  const Thumb = (_components$Thumb = components.Thumb) != null ? _components$Thumb : 'span';
14212
- const thumbProps = appendOwnerState(Thumb, componentsProps.thumb, ownerState);
14376
+ const thumbProps = useSlotProps({
14377
+ elementType: Thumb,
14378
+ getSlotProps: getThumbProps,
14379
+ externalSlotProps: componentsProps.thumb,
14380
+ ownerState
14381
+ });
14213
14382
  const ValueLabel = (_components$ValueLabe = components.ValueLabel) != null ? _components$ValueLabe : SliderValueLabelUnstyled;
14214
- const valueLabelProps = appendOwnerState(ValueLabel, componentsProps.valueLabel, ownerState);
14383
+ const valueLabelProps = useSlotProps({
14384
+ elementType: ValueLabel,
14385
+ externalSlotProps: componentsProps.valueLabel,
14386
+ ownerState
14387
+ });
14215
14388
  const Mark = (_components$Mark = components.Mark) != null ? _components$Mark : 'span';
14216
- const markProps = appendOwnerState(Mark, componentsProps.mark, ownerState);
14389
+ const markProps = useSlotProps({
14390
+ elementType: Mark,
14391
+ externalSlotProps: componentsProps.mark,
14392
+ ownerState,
14393
+ className: classes.mark
14394
+ });
14217
14395
  const MarkLabel = (_components$MarkLabel = components.MarkLabel) != null ? _components$MarkLabel : 'span';
14218
- const markLabelProps = appendOwnerState(MarkLabel, componentsProps.markLabel, ownerState);
14396
+ const markLabelProps = useSlotProps({
14397
+ elementType: MarkLabel,
14398
+ externalSlotProps: componentsProps.markLabel,
14399
+ ownerState
14400
+ });
14219
14401
  const Input = components.Input || 'input';
14220
- const inputProps = appendOwnerState(Input, componentsProps.input, ownerState);
14221
- const hiddenInputProps = getHiddenInputProps();
14222
- const classes = useUtilityClasses$1M(ownerState);
14223
- return /*#__PURE__*/jsxRuntime_2(Root, _extends({}, rootProps, getRootProps({
14224
- onMouseDown
14225
- }), {
14226
- className: clsx(classes.root, rootProps.className, className),
14227
- children: [/*#__PURE__*/jsxRuntime_1(Rail, _extends({}, railProps, {
14228
- className: clsx(classes.rail, railProps.className)
14229
- })), /*#__PURE__*/jsxRuntime_1(Track, _extends({}, trackProps, {
14230
- className: clsx(classes.track, trackProps.className),
14231
- style: _extends({}, trackStyle, trackProps.style)
14232
- })), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => {
14402
+ const inputProps = useSlotProps({
14403
+ elementType: Input,
14404
+ getSlotProps: getHiddenInputProps,
14405
+ externalSlotProps: componentsProps.input,
14406
+ ownerState
14407
+ });
14408
+ return /*#__PURE__*/jsxRuntime_2(Root, _extends({}, rootProps, {
14409
+ children: [/*#__PURE__*/jsxRuntime_1(Rail, _extends({}, railProps)), /*#__PURE__*/jsxRuntime_1(Track, _extends({}, trackProps)), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => {
14233
14410
  const percent = valueToPercent(mark.value, min, max);
14234
14411
  const style = axisProps[axis].offset(percent);
14235
14412
  let markActive;
@@ -14247,7 +14424,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14247
14424
  markActive
14248
14425
  }, {
14249
14426
  style: _extends({}, style, markProps.style),
14250
- className: clsx(classes.mark, markProps.className, markActive && classes.markActive)
14427
+ className: clsx(markProps.className, markActive && classes.markActive)
14251
14428
  })), mark.label != null ? /*#__PURE__*/jsxRuntime_1(MarkLabel, _extends({
14252
14429
  "aria-hidden": true,
14253
14430
  "data-index": index
@@ -14274,23 +14451,20 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14274
14451
  }, valueLabelProps, {
14275
14452
  className: clsx(classes.valueLabel, valueLabelProps.className),
14276
14453
  children: /*#__PURE__*/jsxRuntime_1(Thumb, _extends({
14277
- "data-index": index
14278
- }, thumbProps, getThumbProps(), {
14279
- className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusVisible === index && classes.focusVisible),
14454
+ "data-index": index,
14455
+ "data-focusvisible": focusedThumbIndex === index
14456
+ }, thumbProps, {
14457
+ className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
14280
14458
  style: _extends({}, style, {
14281
14459
  pointerEvents: disableSwap && active !== index ? 'none' : undefined
14282
14460
  }, thumbProps.style),
14283
- children: /*#__PURE__*/jsxRuntime_1(Input, _extends({}, hiddenInputProps, {
14461
+ children: /*#__PURE__*/jsxRuntime_1(Input, _extends({
14284
14462
  "data-index": index,
14285
14463
  "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
14286
14464
  "aria-valuenow": scale(value),
14287
14465
  "aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,
14288
14466
  value: values[index]
14289
- }, !isHostComponent(Input) && {
14290
- ownerState: _extends({}, ownerState, inputProps.ownerState)
14291
- }, inputProps, {
14292
- style: _extends({}, hiddenInputProps.style, inputProps.style)
14293
- }))
14467
+ }, inputProps))
14294
14468
  }))
14295
14469
  }))
14296
14470
  }, index);
@@ -14378,14 +14552,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14378
14552
  * @default {}
14379
14553
  */
14380
14554
  componentsProps: PropTypes.shape({
14381
- input: PropTypes.object,
14382
- mark: PropTypes.object,
14383
- markLabel: PropTypes.object,
14384
- rail: PropTypes.object,
14385
- root: PropTypes.object,
14386
- thumb: PropTypes.object,
14387
- track: PropTypes.object,
14388
- valueLabel: PropTypes.shape({
14555
+ input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
14556
+ mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
14557
+ markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
14558
+ rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
14559
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
14560
+ thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
14561
+ track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
14562
+ valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
14389
14563
  children: PropTypes.element,
14390
14564
  className: PropTypes.string,
14391
14565
  components: PropTypes.shape({
@@ -14395,7 +14569,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14395
14569
  style: PropTypes.object,
14396
14570
  value: PropTypes.number,
14397
14571
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
14398
- })
14572
+ })])
14399
14573
  }),
14400
14574
 
14401
14575
  /**
@@ -14487,11 +14661,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14487
14661
  */
14488
14662
  onChangeCommitted: PropTypes.func,
14489
14663
 
14490
- /**
14491
- * @ignore
14492
- */
14493
- onMouseDown: PropTypes.func,
14494
-
14495
14664
  /**
14496
14665
  * The component orientation.
14497
14666
  * @default 'horizontal'
@@ -14579,6 +14748,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14579
14748
  transform: 'translateZ(0)'
14580
14749
  }
14581
14750
  };
14751
+
14752
+ function isEmpty$1(obj) {
14753
+ return obj === undefined || obj === null || Object.keys(obj).length === 0;
14754
+ }
14755
+
14582
14756
  const TextareaAutosize = /*#__PURE__*/React__namespace.forwardRef(function TextareaAutosize(props, ref) {
14583
14757
  const {
14584
14758
  onChange,
@@ -14597,13 +14771,13 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14597
14771
  const shadowRef = React__namespace.useRef(null);
14598
14772
  const renders = React__namespace.useRef(0);
14599
14773
  const [state, setState] = React__namespace.useState({});
14600
- const syncHeight = React__namespace.useCallback(() => {
14774
+ const getUpdatedState = React__namespace.useCallback(() => {
14601
14775
  const input = inputRef.current;
14602
14776
  const containerWindow = ownerWindow(input);
14603
14777
  const computedStyle = containerWindow.getComputedStyle(input); // If input's width is shrunk and it's not visible, don't sync height.
14604
14778
 
14605
14779
  if (computedStyle.width === '0px') {
14606
- return;
14780
+ return {};
14607
14781
  }
14608
14782
 
14609
14783
  const inputShallow = shadowRef.current;
@@ -14640,30 +14814,77 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14640
14814
 
14641
14815
  const outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);
14642
14816
  const overflow = Math.abs(outerHeight - innerHeight) <= 1;
14643
- setState(prevState => {
14644
- // Need a large enough difference to update the height.
14645
- // This prevents infinite rendering loop.
14646
- if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {
14647
- renders.current += 1;
14648
- return {
14649
- overflow,
14650
- outerHeightStyle
14651
- };
14652
- }
14817
+ return {
14818
+ outerHeightStyle,
14819
+ overflow
14820
+ };
14821
+ }, [maxRows, minRows, props.placeholder]);
14653
14822
 
14654
- {
14655
- if (renders.current === 20) {
14656
- console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\n'));
14657
- }
14823
+ const updateState = (prevState, newState) => {
14824
+ const {
14825
+ outerHeightStyle,
14826
+ overflow
14827
+ } = newState; // Need a large enough difference to update the height.
14828
+ // This prevents infinite rendering loop.
14829
+
14830
+ if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {
14831
+ renders.current += 1;
14832
+ return {
14833
+ overflow,
14834
+ outerHeightStyle
14835
+ };
14836
+ }
14837
+
14838
+ {
14839
+ if (renders.current === 20) {
14840
+ console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\n'));
14658
14841
  }
14842
+ }
14659
14843
 
14660
- return prevState;
14844
+ return prevState;
14845
+ };
14846
+
14847
+ const syncHeight = React__namespace.useCallback(() => {
14848
+ const newState = getUpdatedState();
14849
+
14850
+ if (isEmpty$1(newState)) {
14851
+ return;
14852
+ }
14853
+
14854
+ setState(prevState => {
14855
+ return updateState(prevState, newState);
14661
14856
  });
14662
- }, [maxRows, minRows, props.placeholder]);
14857
+ }, [getUpdatedState]);
14858
+
14859
+ const syncHeightWithFlushSycn = () => {
14860
+ const newState = getUpdatedState();
14861
+
14862
+ if (isEmpty$1(newState)) {
14863
+ return;
14864
+ } // In React 18, state updates in a ResizeObserver's callback are happening after the paint which causes flickering
14865
+ // when doing some visual updates in it. Using flushSync ensures that the dom will be painted after the states updates happen
14866
+ // Related issue - https://github.com/facebook/react/issues/24331
14867
+
14868
+
14869
+ ReactDOM.flushSync(() => {
14870
+ setState(prevState => {
14871
+ return updateState(prevState, newState);
14872
+ });
14873
+ });
14874
+ };
14875
+
14663
14876
  React__namespace.useEffect(() => {
14664
14877
  const handleResize = debounce$1(() => {
14665
- renders.current = 0;
14666
- syncHeight();
14878
+ renders.current = 0; // If the TextareaAutosize component is replaced by Suspense with a fallback, the last
14879
+ // ResizeObserver's handler that runs because of the change in the layout is trying to
14880
+ // access a dom node that is no longer there (as the fallback component is being shown instead).
14881
+ // See https://github.com/mui/material-ui/issues/32640
14882
+ // TODO: Add tests that will ensure the component is not failing when
14883
+ // replaced by Suspense with a fallback, once React is updated to version 18
14884
+
14885
+ if (inputRef.current) {
14886
+ syncHeightWithFlushSycn();
14887
+ }
14667
14888
  });
14668
14889
  const containerWindow = ownerWindow(inputRef.current);
14669
14890
  containerWindow.addEventListener('resize', handleResize);
@@ -14682,7 +14903,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
14682
14903
  resizeObserver.disconnect();
14683
14904
  }
14684
14905
  };
14685
- }, [syncHeight]);
14906
+ });
14686
14907
  useEnhancedEffect$1(() => {
14687
14908
  syncHeight();
14688
14909
  });
@@ -15826,7 +16047,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15826
16047
  } ;
15827
16048
  var Paper$1 = Paper;
15828
16049
 
15829
- const _excluded$22 = ["colorSchemes"],
16050
+ const _excluded$22 = ["colorSchemes", "cssVarPrefix"],
15830
16051
  _excluded2$9 = ["palette"];
15831
16052
  const defaultDarkOverlays = [...Array(25)].map((_, index) => {
15832
16053
  if (index === 0) {
@@ -15836,14 +16057,31 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15836
16057
  const overlay = getOverlayAlpha(index);
15837
16058
  return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;
15838
16059
  });
16060
+
16061
+ function assignNode(obj, keys) {
16062
+ keys.forEach(k => {
16063
+ if (!obj[k]) {
16064
+ obj[k] = {};
16065
+ }
16066
+ });
16067
+ }
16068
+
16069
+ function setColor(obj, key, defaultValue) {
16070
+ obj[key] = obj[key] || defaultValue;
16071
+ }
16072
+
16073
+ const createGetCssVar = (cssVarPrefix = 'mui') => createGetCssVar$1(cssVarPrefix);
15839
16074
  function extendTheme(options = {}, ...args) {
15840
16075
  var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
15841
16076
 
15842
16077
  const {
15843
- colorSchemes: colorSchemesInput = {}
16078
+ colorSchemes: colorSchemesInput = {},
16079
+ cssVarPrefix = 'mui'
15844
16080
  } = options,
15845
16081
  input = _objectWithoutPropertiesLoose(options, _excluded$22);
15846
16082
 
16083
+ const getCssVar = createGetCssVar(cssVarPrefix);
16084
+
15847
16085
  const _createThemeWithoutVa = createTheme(_extends({}, input, colorSchemesInput.light && {
15848
16086
  palette: (_colorSchemesInput$li = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li.palette
15849
16087
  })),
@@ -15861,20 +16099,26 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15861
16099
  });
15862
16100
 
15863
16101
  let theme = _extends({}, muiTheme, {
16102
+ cssVarPrefix,
16103
+ getCssVar,
15864
16104
  colorSchemes: _extends({}, colorSchemesInput, {
15865
16105
  light: _extends({}, colorSchemesInput.light, {
15866
16106
  palette: lightPalette,
15867
16107
  opacity: _extends({
15868
- placeholder: 0.42,
15869
- inputTouchBottomLine: 0.42
16108
+ inputPlaceholder: 0.42,
16109
+ inputUnderline: 0.42,
16110
+ switchTrackDisabled: 0.12,
16111
+ switchTrack: 0.38
15870
16112
  }, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity),
15871
16113
  overlays: ((_colorSchemesInput$li3 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li3.overlays) || []
15872
16114
  }),
15873
16115
  dark: _extends({}, colorSchemesInput.dark, {
15874
16116
  palette: darkPalette,
15875
16117
  opacity: _extends({
15876
- placeholder: 0.5,
15877
- inputTouchBottomLine: 0.7
16118
+ inputPlaceholder: 0.5,
16119
+ inputUnderline: 0.7,
16120
+ switchTrackDisabled: 0.2,
16121
+ switchTrack: 0.3
15878
16122
  }, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity),
15879
16123
  overlays: ((_colorSchemesInput$da3 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da3.overlays) || defaultDarkOverlays
15880
16124
  })
@@ -15884,23 +16128,142 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15884
16128
  Object.keys(theme.colorSchemes).forEach(key => {
15885
16129
  const palette = theme.colorSchemes[key].palette; // attach black & white channels to common node
15886
16130
 
15887
- if (key === 'dark') {
15888
- palette.common.background = palette.common.background || '#000';
15889
- palette.common.onBackground = palette.common.onBackground || '#fff';
16131
+ if (key === 'light') {
16132
+ setColor(palette.common, 'background', '#fff');
16133
+ setColor(palette.common, 'onBackground', '#000');
16134
+ } else {
16135
+ setColor(palette.common, 'background', '#000');
16136
+ setColor(palette.common, 'onBackground', '#fff');
16137
+ } // assign component variables
16138
+
16139
+
16140
+ assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
16141
+
16142
+ if (key === 'light') {
16143
+ setColor(palette.Alert, 'errorColor', darken(palette.error.light, 0.6));
16144
+ setColor(palette.Alert, 'infoColor', darken(palette.info.light, 0.6));
16145
+ setColor(palette.Alert, 'successColor', darken(palette.success.light, 0.6));
16146
+ setColor(palette.Alert, 'warningColor', darken(palette.warning.light, 0.6));
16147
+ setColor(palette.Alert, 'errorFilledBg', getCssVar('palette-error-main'));
16148
+ setColor(palette.Alert, 'infoFilledBg', getCssVar('palette-info-main'));
16149
+ setColor(palette.Alert, 'successFilledBg', getCssVar('palette-success-main'));
16150
+ setColor(palette.Alert, 'warningFilledBg', getCssVar('palette-warning-main'));
16151
+ setColor(palette.Alert, 'errorFilledColor', lightPalette.getContrastText(palette.error.main));
16152
+ setColor(palette.Alert, 'infoFilledColor', lightPalette.getContrastText(palette.info.main));
16153
+ setColor(palette.Alert, 'successFilledColor', lightPalette.getContrastText(palette.success.main));
16154
+ setColor(palette.Alert, 'warningFilledColor', lightPalette.getContrastText(palette.warning.main));
16155
+ setColor(palette.Alert, 'errorStandardBg', lighten(palette.error.light, 0.9));
16156
+ setColor(palette.Alert, 'infoStandardBg', lighten(palette.info.light, 0.9));
16157
+ setColor(palette.Alert, 'successStandardBg', lighten(palette.success.light, 0.9));
16158
+ setColor(palette.Alert, 'warningStandardBg', lighten(palette.warning.light, 0.9));
16159
+ setColor(palette.Alert, 'errorIconColor', getCssVar('palette-error-light'));
16160
+ setColor(palette.Alert, 'infoIconColor', getCssVar('palette-info-light'));
16161
+ setColor(palette.Alert, 'successIconColor', getCssVar('palette-success-light'));
16162
+ setColor(palette.Alert, 'warningIconColor', getCssVar('palette-warning-light'));
16163
+ setColor(palette.AppBar, 'defaultBg', getCssVar('palette-grey-100'));
16164
+ setColor(palette.Avatar, 'defaultBg', getCssVar('palette-grey-400'));
16165
+ setColor(palette.Chip, 'defaultBorder', getCssVar('palette-grey-400'));
16166
+ setColor(palette.Chip, 'defaultAvatarColor', getCssVar('palette-grey-700'));
16167
+ setColor(palette.Chip, 'defaultIconColor', getCssVar('palette-grey-700'));
16168
+ setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
16169
+ setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
16170
+ setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
16171
+ setColor(palette.LinearProgress, 'primaryBg', lighten(palette.primary.main, 0.62));
16172
+ setColor(palette.LinearProgress, 'secondaryBg', lighten(palette.secondary.main, 0.62));
16173
+ setColor(palette.LinearProgress, 'errorBg', lighten(palette.error.main, 0.62));
16174
+ setColor(palette.LinearProgress, 'infoBg', lighten(palette.info.main, 0.62));
16175
+ setColor(palette.LinearProgress, 'successBg', lighten(palette.success.main, 0.62));
16176
+ setColor(palette.LinearProgress, 'warningBg', lighten(palette.warning.main, 0.62));
16177
+ setColor(palette.Skeleton, 'bg', `rgba(${getCssVar('palette-text-primaryChannel')} / 0.11)`);
16178
+ setColor(palette.Slider, 'primaryTrack', lighten(palette.primary.main, 0.62));
16179
+ setColor(palette.Slider, 'secondaryTrack', lighten(palette.secondary.main, 0.62));
16180
+ setColor(palette.Slider, 'errorTrack', lighten(palette.error.main, 0.62));
16181
+ setColor(palette.Slider, 'infoTrack', lighten(palette.info.main, 0.62));
16182
+ setColor(palette.Slider, 'successTrack', lighten(palette.success.main, 0.62));
16183
+ setColor(palette.Slider, 'warningTrack', lighten(palette.warning.main, 0.62));
16184
+ const snackbarContentBackground = emphasize(palette.background.default, 0.8);
16185
+ setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
16186
+ setColor(palette.SnackbarContent, 'color', lightPalette.getContrastText(snackbarContentBackground));
16187
+ setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
16188
+ setColor(palette.StepConnector, 'border', getCssVar('palette-grey-400'));
16189
+ setColor(palette.StepContent, 'border', getCssVar('palette-grey-400'));
16190
+ setColor(palette.Switch, 'defaultColor', getCssVar('palette-common-white'));
16191
+ setColor(palette.Switch, 'defaultDisabledColor', getCssVar('palette-grey-100'));
16192
+ setColor(palette.Switch, 'primaryDisabledColor', lighten(palette.primary.main, 0.62));
16193
+ setColor(palette.Switch, 'secondaryDisabledColor', lighten(palette.secondary.main, 0.62));
16194
+ setColor(palette.Switch, 'errorDisabledColor', lighten(palette.error.main, 0.62));
16195
+ setColor(palette.Switch, 'infoDisabledColor', lighten(palette.info.main, 0.62));
16196
+ setColor(palette.Switch, 'successDisabledColor', lighten(palette.success.main, 0.62));
16197
+ setColor(palette.Switch, 'warningDisabledColor', lighten(palette.warning.main, 0.62));
16198
+ setColor(palette.TableCell, 'border', lighten(alpha(palette.divider, 1), 0.88));
16199
+ setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
15890
16200
  } else {
15891
- palette.common.background = palette.common.background || '#fff';
15892
- palette.common.onBackground = palette.common.onBackground || '#000';
16201
+ setColor(palette.Alert, 'errorColor', lighten(palette.error.light, 0.6));
16202
+ setColor(palette.Alert, 'infoColor', lighten(palette.info.light, 0.6));
16203
+ setColor(palette.Alert, 'successColor', lighten(palette.success.light, 0.6));
16204
+ setColor(palette.Alert, 'warningColor', lighten(palette.warning.light, 0.6));
16205
+ setColor(palette.Alert, 'errorFilledBg', getCssVar('palette-error-dark'));
16206
+ setColor(palette.Alert, 'infoFilledBg', getCssVar('palette-info-dark'));
16207
+ setColor(palette.Alert, 'successFilledBg', getCssVar('palette-success-dark'));
16208
+ setColor(palette.Alert, 'warningFilledBg', getCssVar('palette-warning-dark'));
16209
+ setColor(palette.Alert, 'errorFilledColor', darkPalette.getContrastText(palette.error.dark));
16210
+ setColor(palette.Alert, 'infoFilledColor', darkPalette.getContrastText(palette.info.dark));
16211
+ setColor(palette.Alert, 'successFilledColor', darkPalette.getContrastText(palette.success.dark));
16212
+ setColor(palette.Alert, 'warningFilledColor', darkPalette.getContrastText(palette.warning.dark));
16213
+ setColor(palette.Alert, 'errorStandardBg', darken(palette.error.light, 0.9));
16214
+ setColor(palette.Alert, 'infoStandardBg', darken(palette.info.light, 0.9));
16215
+ setColor(palette.Alert, 'successStandardBg', darken(palette.success.light, 0.9));
16216
+ setColor(palette.Alert, 'warningStandardBg', darken(palette.warning.light, 0.9));
16217
+ setColor(palette.Alert, 'errorIconColor', getCssVar('palette-error-main'));
16218
+ setColor(palette.Alert, 'infoIconColor', getCssVar('palette-info-main'));
16219
+ setColor(palette.Alert, 'successIconColor', getCssVar('palette-success-main'));
16220
+ setColor(palette.Alert, 'warningIconColor', getCssVar('palette-warning-main'));
16221
+ setColor(palette.AppBar, 'defaultBg', getCssVar('palette-grey-900'));
16222
+ setColor(palette.AppBar, 'darkBg', getCssVar('palette-background-paper')); // specific for dark mode
16223
+
16224
+ setColor(palette.AppBar, 'darkColor', getCssVar('palette-text-primary')); // specific for dark mode
16225
+
16226
+ setColor(palette.Avatar, 'defaultBg', getCssVar('palette-grey-600'));
16227
+ setColor(palette.Chip, 'defaultBorder', getCssVar('palette-grey-700'));
16228
+ setColor(palette.Chip, 'defaultAvatarColor', getCssVar('palette-grey-300'));
16229
+ setColor(palette.Chip, 'defaultIconColor', getCssVar('palette-grey-300'));
16230
+ setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
16231
+ setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
16232
+ setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
16233
+ setColor(palette.LinearProgress, 'primaryBg', darken(palette.primary.main, 0.5));
16234
+ setColor(palette.LinearProgress, 'secondaryBg', darken(palette.secondary.main, 0.5));
16235
+ setColor(palette.LinearProgress, 'errorBg', darken(palette.error.main, 0.5));
16236
+ setColor(palette.LinearProgress, 'infoBg', darken(palette.info.main, 0.5));
16237
+ setColor(palette.LinearProgress, 'successBg', darken(palette.success.main, 0.5));
16238
+ setColor(palette.LinearProgress, 'warningBg', darken(palette.warning.main, 0.5));
16239
+ setColor(palette.Skeleton, 'bg', `rgba(${getCssVar('palette-text-primaryChannel')} / 0.13)`);
16240
+ setColor(palette.Slider, 'primaryTrack', darken(palette.primary.main, 0.5));
16241
+ setColor(palette.Slider, 'secondaryTrack', darken(palette.secondary.main, 0.5));
16242
+ setColor(palette.Slider, 'errorTrack', darken(palette.error.main, 0.5));
16243
+ setColor(palette.Slider, 'infoTrack', darken(palette.info.main, 0.5));
16244
+ setColor(palette.Slider, 'successTrack', darken(palette.success.main, 0.5));
16245
+ setColor(palette.Slider, 'warningTrack', darken(palette.warning.main, 0.5));
16246
+ const snackbarContentBackground = emphasize(palette.background.default, 0.98);
16247
+ setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
16248
+ setColor(palette.SnackbarContent, 'color', darkPalette.getContrastText(snackbarContentBackground));
16249
+ setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
16250
+ setColor(palette.StepConnector, 'border', getCssVar('palette-grey-600'));
16251
+ setColor(palette.StepContent, 'border', getCssVar('palette-grey-600'));
16252
+ setColor(palette.Switch, 'defaultColor', getCssVar('palette-grey-300'));
16253
+ setColor(palette.Switch, 'defaultDisabledColor', getCssVar('palette-grey-600'));
16254
+ setColor(palette.Switch, 'primaryDisabledColor', darken(palette.primary.main, 0.55));
16255
+ setColor(palette.Switch, 'secondaryDisabledColor', darken(palette.secondary.main, 0.55));
16256
+ setColor(palette.Switch, 'errorDisabledColor', darken(palette.error.main, 0.55));
16257
+ setColor(palette.Switch, 'infoDisabledColor', darken(palette.info.main, 0.55));
16258
+ setColor(palette.Switch, 'successDisabledColor', darken(palette.success.main, 0.55));
16259
+ setColor(palette.Switch, 'warningDisabledColor', darken(palette.warning.main, 0.55));
16260
+ setColor(palette.TableCell, 'border', darken(alpha(palette.divider, 1), 0.68));
16261
+ setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
15893
16262
  }
15894
16263
 
15895
16264
  palette.common.backgroundChannel = colorChannel(palette.common.background);
15896
16265
  palette.common.onBackgroundChannel = colorChannel(palette.common.onBackground);
15897
- palette.dividerChannel = colorChannel(palette.divider); // special token for Tooltip
15898
- // TODO: consider adding `main`, and `light` to palette.grey to make it consistent.
15899
-
15900
- if (!palette.grey.dark) {
15901
- palette.grey.dark = palette.grey[700];
15902
- }
15903
-
16266
+ palette.dividerChannel = colorChannel(palette.divider);
15904
16267
  Object.keys(palette).forEach(color => {
15905
16268
  const colors = palette[color]; // Color palettes: primary, secondary, error, info, success, and warning
15906
16269
 
@@ -15927,21 +16290,31 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15927
16290
 
15928
16291
  if (colors.secondary) {
15929
16292
  palette[color].secondaryChannel = colorChannel(colors.secondary);
15930
- } // Action colors: action.activeChannel
16293
+ } // Action colors: action.active, action.selected
15931
16294
 
15932
16295
 
15933
16296
  if (colors.active) {
15934
16297
  palette[color].activeChannel = colorChannel(colors.active);
15935
16298
  }
16299
+
16300
+ if (colors.selected) {
16301
+ palette[color].selectedChannel = colorChannel(colors.selected);
16302
+ }
15936
16303
  });
15937
16304
  });
15938
16305
  theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);
15939
16306
  return theme;
15940
16307
  }
15941
16308
 
16309
+ const shouldSkipGeneratingVar = keys => {
16310
+ var _keys$;
16311
+
16312
+ return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
16313
+ };
16314
+
15942
16315
  const defaultTheme$1 = extendTheme();
15943
16316
  const {
15944
- CssVarsProvider: Experimental_CssVarsProvider,
16317
+ CssVarsProvider,
15945
16318
  useColorScheme,
15946
16319
  getInitColorSchemeScript
15947
16320
  } = createCssVarsProvider({
@@ -15953,7 +16326,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15953
16326
  light: 'light',
15954
16327
  dark: 'dark'
15955
16328
  },
15956
- prefix: 'md',
15957
16329
  resolveTheme: theme => {
15958
16330
  const newTheme = _extends({}, theme, {
15959
16331
  typography: createTypography(theme.palette, theme.typography)
@@ -15961,7 +16333,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15961
16333
 
15962
16334
  return newTheme;
15963
16335
  },
15964
- shouldSkipGeneratingVar: keys => !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/)
16336
+ shouldSkipGeneratingVar
15965
16337
  });
15966
16338
 
15967
16339
  function getSvgIconUtilityClass(slot) {
@@ -19503,22 +19875,30 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
19503
19875
  display: 'flex',
19504
19876
  padding: '6px 16px'
19505
19877
  }, color && ownerState.variant === 'standard' && {
19506
- color: getColor(theme.palette[color].light, 0.6),
19507
- backgroundColor: getBackgroundColor(theme.palette[color].light, 0.9),
19508
- [`& .${alertClasses$1.icon}`]: {
19878
+ color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
19879
+ backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color}StandardBg`] : getBackgroundColor(theme.palette[color].light, 0.9),
19880
+ [`& .${alertClasses$1.icon}`]: theme.vars ? {
19881
+ color: theme.vars.palette.Alert[`${color}IconColor`]
19882
+ } : {
19509
19883
  color: theme.palette.mode === 'dark' ? theme.palette[color].main : theme.palette[color].light
19510
19884
  }
19511
19885
  }, color && ownerState.variant === 'outlined' && {
19512
- color: getColor(theme.palette[color].light, 0.6),
19513
- border: `1px solid ${theme.palette[color].light}`,
19514
- [`& .${alertClasses$1.icon}`]: {
19886
+ color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
19887
+ border: `1px solid ${(theme.vars || theme).palette[color].light}`,
19888
+ [`& .${alertClasses$1.icon}`]: theme.vars ? {
19889
+ color: theme.vars.palette.Alert[`${color}IconColor`]
19890
+ } : {
19515
19891
  color: theme.palette.mode === 'dark' ? theme.palette[color].main : theme.palette[color].light
19516
19892
  }
19517
- }, color && ownerState.variant === 'filled' && {
19518
- color: '#fff',
19519
- fontWeight: theme.typography.fontWeightMedium,
19520
- backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main
19521
- });
19893
+ }, color && ownerState.variant === 'filled' && _extends({
19894
+ fontWeight: theme.typography.fontWeightMedium
19895
+ }, theme.vars ? {
19896
+ color: theme.vars.palette.Alert[`${color}FilledColor`],
19897
+ backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`]
19898
+ } : {
19899
+ backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
19900
+ color: theme.palette.getContrastText(theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main)
19901
+ }));
19522
19902
  });
19523
19903
  const AlertIcon = styled$1('div', {
19524
19904
  name: 'MuiAlert',
@@ -20037,7 +20417,11 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20037
20417
  root: ['root', `color${capitalize(color)}`, `position${capitalize(position)}`]
20038
20418
  };
20039
20419
  return composeClasses(slots, getAppBarUtilityClass, classes);
20040
- };
20420
+ }; // var2 is the fallback.
20421
+ // Ex. var1: 'var(--a)', var2: 'var(--b)'; return: 'var(--a, var(--b))'
20422
+
20423
+
20424
+ const joinVars = (var1, var2) => `${var1 == null ? void 0 : var1.replace(')', '')}, ${var2})`;
20041
20425
 
20042
20426
  const AppBarRoot = styled$1(Paper$1, {
20043
20427
  name: 'MuiAppBar',
@@ -20062,7 +20446,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20062
20446
  flexShrink: 0
20063
20447
  }, ownerState.position === 'fixed' && {
20064
20448
  position: 'fixed',
20065
- zIndex: theme.zIndex.appBar,
20449
+ zIndex: (theme.vars || theme).zIndex.appBar,
20066
20450
  top: 0,
20067
20451
  left: 'auto',
20068
20452
  right: 0,
@@ -20072,14 +20456,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20072
20456
  }
20073
20457
  }, ownerState.position === 'absolute' && {
20074
20458
  position: 'absolute',
20075
- zIndex: theme.zIndex.appBar,
20459
+ zIndex: (theme.vars || theme).zIndex.appBar,
20076
20460
  top: 0,
20077
20461
  left: 'auto',
20078
20462
  right: 0
20079
20463
  }, ownerState.position === 'sticky' && {
20080
20464
  // ⚠️ sticky is not supported by IE11.
20081
20465
  position: 'sticky',
20082
- zIndex: theme.zIndex.appBar,
20466
+ zIndex: (theme.vars || theme).zIndex.appBar,
20083
20467
  top: 0,
20084
20468
  left: 'auto',
20085
20469
  right: 0
@@ -20087,7 +20471,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20087
20471
  position: 'static'
20088
20472
  }, ownerState.position === 'relative' && {
20089
20473
  position: 'relative'
20090
- }, ownerState.color === 'default' && {
20474
+ }, !theme.vars && _extends({}, ownerState.color === 'default' && {
20091
20475
  backgroundColor: backgroundColorDefault,
20092
20476
  color: theme.palette.getContrastText(backgroundColorDefault)
20093
20477
  }, ownerState.color && ownerState.color !== 'default' && ownerState.color !== 'inherit' && ownerState.color !== 'transparent' && {
@@ -20103,6 +20487,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20103
20487
  color: 'inherit'
20104
20488
  }, theme.palette.mode === 'dark' && {
20105
20489
  backgroundImage: 'none'
20490
+ })), theme.vars && _extends({}, ownerState.color === 'default' && {
20491
+ '--AppBar-background': ownerState.enableColorOnDark ? theme.vars.palette.AppBar.defaultBg : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette.AppBar.defaultBg),
20492
+ '--AppBar-color': ownerState.enableColorOnDark ? theme.vars.palette.text.primary : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette.text.primary)
20493
+ }, ownerState.color && !ownerState.color.match(/^(default|inherit|transparent)$/) && {
20494
+ '--AppBar-background': ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].main : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette[ownerState.color].main),
20495
+ '--AppBar-color': ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].contrastText : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette[ownerState.color].contrastText)
20496
+ }, {
20497
+ backgroundColor: 'var(--AppBar-background)',
20498
+ color: ownerState.color === 'inherit' ? 'inherit' : 'var(--AppBar-color)'
20499
+ }, ownerState.color === 'transparent' && {
20500
+ backgroundImage: 'none',
20501
+ backgroundColor: 'transparent',
20502
+ color: 'inherit'
20106
20503
  }));
20107
20504
  });
20108
20505
  const AppBar = /*#__PURE__*/React__namespace.forwardRef(function AppBar(inProps, ref) {
@@ -20552,6 +20949,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20552
20949
  ownerState
20553
20950
  }) => {
20554
20951
  const deleteIconColor = alpha(theme.palette.text.primary, 0.26);
20952
+ const textColor = theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300];
20555
20953
  return _extends({
20556
20954
  maxWidth: '100%',
20557
20955
  fontFamily: theme.typography.fontFamily,
@@ -20560,8 +20958,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20560
20958
  alignItems: 'center',
20561
20959
  justifyContent: 'center',
20562
20960
  height: 32,
20563
- color: theme.palette.text.primary,
20564
- backgroundColor: theme.palette.action.selected,
20961
+ color: (theme.vars || theme).palette.text.primary,
20962
+ backgroundColor: (theme.vars || theme).palette.action.selected,
20565
20963
  borderRadius: 32 / 2,
20566
20964
  whiteSpace: 'nowrap',
20567
20965
  transition: theme.transitions.create(['background-color', 'box-shadow']),
@@ -20577,7 +20975,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20577
20975
  verticalAlign: 'middle',
20578
20976
  boxSizing: 'border-box',
20579
20977
  [`&.${chipClasses$1.disabled}`]: {
20580
- opacity: theme.palette.action.disabledOpacity,
20978
+ opacity: (theme.vars || theme).palette.action.disabledOpacity,
20581
20979
  pointerEvents: 'none'
20582
20980
  },
20583
20981
  [`& .${chipClasses$1.avatar}`]: {
@@ -20585,16 +20983,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20585
20983
  marginRight: -6,
20586
20984
  width: 24,
20587
20985
  height: 24,
20588
- color: theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
20986
+ color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor,
20589
20987
  fontSize: theme.typography.pxToRem(12)
20590
20988
  },
20591
20989
  [`& .${chipClasses$1.avatarColorPrimary}`]: {
20592
- color: theme.palette.primary.contrastText,
20593
- backgroundColor: theme.palette.primary.dark
20990
+ color: (theme.vars || theme).palette.primary.contrastText,
20991
+ backgroundColor: (theme.vars || theme).palette.primary.dark
20594
20992
  },
20595
20993
  [`& .${chipClasses$1.avatarColorSecondary}`]: {
20596
- color: theme.palette.secondary.contrastText,
20597
- backgroundColor: theme.palette.secondary.dark
20994
+ color: (theme.vars || theme).palette.secondary.contrastText,
20995
+ backgroundColor: (theme.vars || theme).palette.secondary.dark
20598
20996
  },
20599
20997
  [`& .${chipClasses$1.avatarSmall}`]: {
20600
20998
  marginLeft: 4,
@@ -20604,7 +21002,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20604
21002
  fontSize: theme.typography.pxToRem(10)
20605
21003
  },
20606
21004
  [`& .${chipClasses$1.icon}`]: _extends({
20607
- color: theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
21005
+ color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
20608
21006
  marginLeft: 5,
20609
21007
  marginRight: -6
20610
21008
  }, ownerState.size === 'small' && {
@@ -20616,35 +21014,35 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20616
21014
  }),
20617
21015
  [`& .${chipClasses$1.deleteIcon}`]: _extends({
20618
21016
  WebkitTapHighlightColor: 'transparent',
20619
- color: deleteIconColor,
21017
+ color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.26)` : deleteIconColor,
20620
21018
  fontSize: 22,
20621
21019
  cursor: 'pointer',
20622
21020
  margin: '0 5px 0 -6px',
20623
21021
  '&:hover': {
20624
- color: alpha(deleteIconColor, 0.4)
21022
+ color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.4)` : alpha(deleteIconColor, 0.4)
20625
21023
  }
20626
21024
  }, ownerState.size === 'small' && {
20627
21025
  fontSize: 16,
20628
21026
  marginRight: 4,
20629
21027
  marginLeft: -4
20630
21028
  }, ownerState.color !== 'default' && {
20631
- color: alpha(theme.palette[ownerState.color].contrastText, 0.7),
21029
+ color: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].contrastTextChannel} / 0.7)` : alpha(theme.palette[ownerState.color].contrastText, 0.7),
20632
21030
  '&:hover, &:active': {
20633
- color: theme.palette[ownerState.color].contrastText
21031
+ color: (theme.vars || theme).palette[ownerState.color].contrastText
20634
21032
  }
20635
21033
  })
20636
21034
  }, ownerState.size === 'small' && {
20637
21035
  height: 24
20638
21036
  }, ownerState.color !== 'default' && {
20639
- backgroundColor: theme.palette[ownerState.color].main,
20640
- color: theme.palette[ownerState.color].contrastText
21037
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
21038
+ color: (theme.vars || theme).palette[ownerState.color].contrastText
20641
21039
  }, ownerState.onDelete && {
20642
21040
  [`&.${chipClasses$1.focusVisible}`]: {
20643
- backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
21041
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
20644
21042
  }
20645
21043
  }, ownerState.onDelete && ownerState.color !== 'default' && {
20646
21044
  [`&.${chipClasses$1.focusVisible}`]: {
20647
- backgroundColor: theme.palette[ownerState.color].dark
21045
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
20648
21046
  }
20649
21047
  });
20650
21048
  }, ({
@@ -20655,29 +21053,29 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20655
21053
  WebkitTapHighlightColor: 'transparent',
20656
21054
  cursor: 'pointer',
20657
21055
  '&:hover': {
20658
- backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
21056
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
20659
21057
  },
20660
21058
  [`&.${chipClasses$1.focusVisible}`]: {
20661
- backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
21059
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
20662
21060
  },
20663
21061
  '&:active': {
20664
- boxShadow: theme.shadows[1]
21062
+ boxShadow: (theme.vars || theme).shadows[1]
20665
21063
  }
20666
21064
  }, ownerState.clickable && ownerState.color !== 'default' && {
20667
21065
  [`&:hover, &.${chipClasses$1.focusVisible}`]: {
20668
- backgroundColor: theme.palette[ownerState.color].dark
21066
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
20669
21067
  }
20670
21068
  }), ({
20671
21069
  theme,
20672
21070
  ownerState
20673
21071
  }) => _extends({}, ownerState.variant === 'outlined' && {
20674
21072
  backgroundColor: 'transparent',
20675
- border: `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700]}`,
21073
+ border: theme.vars ? `1px solid ${theme.vars.palette.Chip.defaultBorder}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700]}`,
20676
21074
  [`&.${chipClasses$1.clickable}:hover`]: {
20677
- backgroundColor: theme.palette.action.hover
21075
+ backgroundColor: (theme.vars || theme).palette.action.hover
20678
21076
  },
20679
21077
  [`&.${chipClasses$1.focusVisible}`]: {
20680
- backgroundColor: theme.palette.action.focus
21078
+ backgroundColor: (theme.vars || theme).palette.action.focus
20681
21079
  },
20682
21080
  [`& .${chipClasses$1.avatar}`]: {
20683
21081
  marginLeft: 4
@@ -20698,18 +21096,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
20698
21096
  marginRight: 3
20699
21097
  }
20700
21098
  }, ownerState.variant === 'outlined' && ownerState.color !== 'default' && {
20701
- color: theme.palette[ownerState.color].main,
20702
- border: `1px solid ${alpha(theme.palette[ownerState.color].main, 0.7)}`,
21099
+ color: (theme.vars || theme).palette[ownerState.color].main,
21100
+ border: `1px solid ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.7)` : alpha(theme.palette[ownerState.color].main, 0.7)}`,
20703
21101
  [`&.${chipClasses$1.clickable}:hover`]: {
20704
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity)
21102
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity)
20705
21103
  },
20706
21104
  [`&.${chipClasses$1.focusVisible}`]: {
20707
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
21105
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
20708
21106
  },
20709
21107
  [`& .${chipClasses$1.deleteIcon}`]: {
20710
- color: alpha(theme.palette[ownerState.color].main, 0.7),
21108
+ color: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.7)` : alpha(theme.palette[ownerState.color].main, 0.7),
20711
21109
  '&:hover, &:active': {
20712
- color: theme.palette[ownerState.color].main
21110
+ color: (theme.vars || theme).palette[ownerState.color].main
20713
21111
  }
20714
21112
  }
20715
21113
  }));
@@ -21173,7 +21571,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
21173
21571
  const placeholder = _extends({
21174
21572
  color: 'currentColor'
21175
21573
  }, theme.vars ? {
21176
- opacity: theme.vars.opacity.placeholder
21574
+ opacity: theme.vars.opacity.inputPlaceholder
21177
21575
  } : {
21178
21576
  opacity: light ? 0.42 : 0.5
21179
21577
  }, {
@@ -21186,7 +21584,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
21186
21584
  opacity: '0 !important'
21187
21585
  };
21188
21586
  const placeholderVisible = theme.vars ? {
21189
- opacity: theme.vars.opacity.placeholder
21587
+ opacity: theme.vars.opacity.inputPlaceholder
21190
21588
  } : {
21191
21589
  opacity: light ? 0.42 : 0.5
21192
21590
  };
@@ -22179,7 +22577,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22179
22577
  }
22180
22578
  });
22181
22579
  const Autocomplete = /*#__PURE__*/React__namespace.forwardRef(function Autocomplete(inProps, ref) {
22182
- var _componentsProps$clea, _componentsProps$pape;
22580
+ var _componentsProps$clea, _componentsProps$popu, _componentsProps$popp, _componentsProps$pape;
22183
22581
 
22184
22582
  const props = useThemeProps({
22185
22583
  props: inProps,
@@ -22380,8 +22778,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22380
22778
  disabled: disabled,
22381
22779
  "aria-label": popupOpen ? closeText : openText,
22382
22780
  title: popupOpen ? closeText : openText,
22383
- className: clsx(classes.popupIndicator),
22384
- ownerState: ownerState,
22781
+ ownerState: ownerState
22782
+ }, componentsProps.popupIndicator, {
22783
+ className: clsx(classes.popupIndicator, (_componentsProps$popu = componentsProps.popupIndicator) == null ? void 0 : _componentsProps$popu.className),
22385
22784
  children: popupIcon
22386
22785
  })) : null]
22387
22786
  })
@@ -22392,9 +22791,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22392
22791
  readOnly
22393
22792
  }, getInputProps())
22394
22793
  })
22395
- })), popupOpen && anchorEl ? /*#__PURE__*/jsxRuntime_1(AutocompletePopper, {
22794
+ })), popupOpen && anchorEl ? /*#__PURE__*/jsxRuntime_1(AutocompletePopper, _extends({
22396
22795
  as: PopperComponent,
22397
- className: clsx(classes.popper),
22398
22796
  disablePortal: disablePortal,
22399
22797
  style: {
22400
22798
  width: anchorEl ? anchorEl.clientWidth : null
@@ -22402,7 +22800,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22402
22800
  ownerState: ownerState,
22403
22801
  role: "presentation",
22404
22802
  anchorEl: anchorEl,
22405
- open: true,
22803
+ open: true
22804
+ }, componentsProps.popper, {
22805
+ className: clsx(classes.popper, (_componentsProps$popp = componentsProps.popper) == null ? void 0 : _componentsProps$popp.className),
22406
22806
  children: /*#__PURE__*/jsxRuntime_2(AutocompletePaper, _extends({
22407
22807
  ownerState: ownerState,
22408
22808
  as: PaperComponent
@@ -22439,7 +22839,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22439
22839
  })
22440
22840
  })) : null]
22441
22841
  }))
22442
- }) : null]
22842
+ })) : null]
22443
22843
  });
22444
22844
  });
22445
22845
  Autocomplete.propTypes
@@ -22541,7 +22941,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22541
22941
  */
22542
22942
  componentsProps: PropTypes.shape({
22543
22943
  clearIndicator: PropTypes.object,
22544
- paper: PropTypes.object
22944
+ paper: PropTypes.object,
22945
+ popper: PropTypes.object,
22946
+ popupIndicator: PropTypes.object
22545
22947
  }),
22546
22948
 
22547
22949
  /**
@@ -22963,13 +23365,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
22963
23365
  overflow: 'hidden',
22964
23366
  userSelect: 'none'
22965
23367
  }, ownerState.variant === 'rounded' && {
22966
- borderRadius: theme.shape.borderRadius
23368
+ borderRadius: (theme.vars || theme).shape.borderRadius
22967
23369
  }, ownerState.variant === 'square' && {
22968
23370
  borderRadius: 0
22969
- }, ownerState.colorDefault && {
22970
- color: theme.palette.background.default,
23371
+ }, ownerState.colorDefault && _extends({
23372
+ color: (theme.vars || theme).palette.background.default
23373
+ }, theme.vars ? {
23374
+ backgroundColor: theme.vars.palette.Avatar.defaultBg
23375
+ } : {
22971
23376
  backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
22972
- }));
23377
+ })));
22973
23378
  const AvatarImg = styled$1('img', {
22974
23379
  name: 'MuiAvatar',
22975
23380
  slot: 'Img',
@@ -24080,8 +24485,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
24080
24485
  * @default {}
24081
24486
  */
24082
24487
  componentsProps: PropTypes.shape({
24083
- badge: PropTypes.object,
24084
- root: PropTypes.object
24488
+ badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
24489
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
24085
24490
  }),
24086
24491
 
24087
24492
  /**
@@ -27219,7 +27624,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27219
27624
  };
27220
27625
  }
27221
27626
 
27222
- const _excluded$1t = ["BackdropComponent", "closeAfterTransition", "children", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted"];
27627
+ const _excluded$1t = ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "theme"];
27223
27628
  const modalClasses = modalUnstyledClasses$1;
27224
27629
 
27225
27630
  const extendUtilityClasses$1 = ownerState => {
@@ -27272,7 +27677,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27272
27677
  */
27273
27678
 
27274
27679
  const Modal = /*#__PURE__*/React__namespace.forwardRef(function Modal(inProps, ref) {
27275
- var _componentsProps$root;
27680
+ var _ref, _components$Root;
27276
27681
 
27277
27682
  const props = useThemeProps({
27278
27683
  name: 'MuiModal',
@@ -27281,8 +27686,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27281
27686
 
27282
27687
  const {
27283
27688
  BackdropComponent = ModalBackdrop,
27689
+ BackdropProps,
27284
27690
  closeAfterTransition = false,
27285
27691
  children,
27692
+ component,
27286
27693
  components = {},
27287
27694
  componentsProps = {},
27288
27695
  disableAutoFocus = false,
@@ -27292,7 +27699,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27292
27699
  disableRestoreFocus = false,
27293
27700
  disableScrollLock = false,
27294
27701
  hideBackdrop = false,
27295
- keepMounted = false
27702
+ keepMounted = false,
27703
+ // eslint-disable-next-line react/prop-types
27704
+ theme
27296
27705
  } = props,
27297
27706
  other = _objectWithoutPropertiesLoose(props, _excluded$1t);
27298
27707
 
@@ -27314,16 +27723,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27314
27723
  });
27315
27724
 
27316
27725
  const classes = extendUtilityClasses$1(ownerState);
27726
+ const Root = (_ref = (_components$Root = components.Root) != null ? _components$Root : component) != null ? _ref : ModalRoot;
27317
27727
  return /*#__PURE__*/jsxRuntime_1(ModalUnstyled$1, _extends({
27318
27728
  components: _extends({
27319
- Root: ModalRoot
27729
+ Root,
27730
+ Backdrop: BackdropComponent
27320
27731
  }, components),
27321
27732
  componentsProps: {
27322
- root: _extends({}, componentsProps.root, (!components.Root || !isHostComponent(components.Root)) && {
27323
- ownerState: _extends({}, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.ownerState)
27324
- })
27733
+ root: _extends({}, componentsProps.root, !isHostComponent(Root) && {
27734
+ as: component,
27735
+ theme
27736
+ }),
27737
+ backdrop: _extends({}, BackdropProps, componentsProps.backdrop)
27325
27738
  },
27326
- BackdropComponent: BackdropComponent,
27327
27739
  onTransitionEnter: () => setExited(false),
27328
27740
  onTransitionExited: () => setExited(true),
27329
27741
  ref: ref
@@ -27343,6 +27755,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27343
27755
 
27344
27756
  /**
27345
27757
  * A backdrop component. This prop enables custom backdrop rendering.
27758
+ * @deprecated Use `components.Backdrop` instead.
27346
27759
  * @default styled(Backdrop, {
27347
27760
  * name: 'MuiModal',
27348
27761
  * slot: 'Backdrop',
@@ -27357,6 +27770,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27357
27770
 
27358
27771
  /**
27359
27772
  * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
27773
+ * @deprecated Use `componentsProps.backdrop` instead.
27360
27774
  */
27361
27775
  BackdropProps: PropTypes.object,
27362
27776
 
@@ -27376,12 +27790,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27376
27790
  */
27377
27791
  closeAfterTransition: PropTypes.bool,
27378
27792
 
27793
+ /**
27794
+ * The component used for the root node.
27795
+ * Either a string to use a HTML element or a component.
27796
+ */
27797
+ component: PropTypes.elementType,
27798
+
27379
27799
  /**
27380
27800
  * The components used for each slot inside the Modal.
27381
27801
  * Either a string to use a HTML element or a component.
27382
27802
  * @default {}
27383
27803
  */
27384
27804
  components: PropTypes.shape({
27805
+ Backdrop: PropTypes.elementType,
27385
27806
  Root: PropTypes.elementType
27386
27807
  }),
27387
27808
 
@@ -27390,6 +27811,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27390
27811
  * @default {}
27391
27812
  */
27392
27813
  componentsProps: PropTypes.shape({
27814
+ backdrop: PropTypes.object,
27393
27815
  root: PropTypes.object
27394
27816
  }),
27395
27817
 
@@ -27613,7 +28035,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27613
28035
  maxWidth: 'calc(100% - 64px)'
27614
28036
  }
27615
28037
  }
27616
- }, ownerState.maxWidth !== 'xs' && {
28038
+ }, ownerState.maxWidth && ownerState.maxWidth !== 'xs' && {
27617
28039
  maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`,
27618
28040
  [`&.${dialogClasses$1.paperScrollBody}`]: {
27619
28041
  [theme.breakpoints.down(theme.breakpoints.values[ownerState.maxWidth] + 32 * 2)]: {
@@ -27714,12 +28136,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27714
28136
  }, [ariaLabelledby]);
27715
28137
  return /*#__PURE__*/jsxRuntime_1(DialogRoot, _extends({
27716
28138
  className: clsx(classes.root, className),
27717
- BackdropProps: _extends({
27718
- transitionDuration,
27719
- as: BackdropComponent
27720
- }, BackdropProps),
27721
28139
  closeAfterTransition: true,
27722
- BackdropComponent: DialogBackdrop,
28140
+ components: {
28141
+ Backdrop: DialogBackdrop
28142
+ },
28143
+ componentsProps: {
28144
+ backdrop: _extends({
28145
+ transitionDuration,
28146
+ as: BackdropComponent
28147
+ }, BackdropProps)
28148
+ },
27723
28149
  disableEscapeKeyDown: disableEscapeKeyDown,
27724
28150
  onClose: onClose,
27725
28151
  open: open,
@@ -27775,6 +28201,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27775
28201
 
27776
28202
  /**
27777
28203
  * A backdrop component. This prop enables custom backdrop rendering.
28204
+ * @deprecated Use `components.Backdrop` instead.
27778
28205
  * @default styled(Backdrop, {
27779
28206
  * name: 'MuiModal',
27780
28207
  * slot: 'Backdrop',
@@ -29489,36 +29916,38 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
29489
29916
  theme,
29490
29917
  ownerState
29491
29918
  }) => {
29492
- var _theme$palette;
29919
+ var _palette;
29493
29920
 
29494
29921
  const light = theme.palette.mode === 'light';
29495
29922
  const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
29496
29923
  const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';
29924
+ const hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';
29925
+ const disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';
29497
29926
  return _extends({
29498
29927
  position: 'relative',
29499
- backgroundColor,
29500
- borderTopLeftRadius: theme.shape.borderRadius,
29501
- borderTopRightRadius: theme.shape.borderRadius,
29928
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,
29929
+ borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
29930
+ borderTopRightRadius: (theme.vars || theme).shape.borderRadius,
29502
29931
  transition: theme.transitions.create('background-color', {
29503
29932
  duration: theme.transitions.duration.shorter,
29504
29933
  easing: theme.transitions.easing.easeOut
29505
29934
  }),
29506
29935
  '&:hover': {
29507
- backgroundColor: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)',
29936
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.hoverBg : hoverBackground,
29508
29937
  // Reset on touch devices, it doesn't add specificity
29509
29938
  '@media (hover: none)': {
29510
- backgroundColor
29939
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor
29511
29940
  }
29512
29941
  },
29513
29942
  [`&.${filledInputClasses$1.focused}`]: {
29514
- backgroundColor
29943
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor
29515
29944
  },
29516
29945
  [`&.${filledInputClasses$1.disabled}`]: {
29517
- backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)'
29946
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground
29518
29947
  }
29519
29948
  }, !ownerState.disableUnderline && {
29520
29949
  '&:after': {
29521
- borderBottom: `2px solid ${(_theme$palette = theme.palette[ownerState.color || 'primary']) == null ? void 0 : _theme$palette.main}`,
29950
+ borderBottom: `2px solid ${(_palette = (theme.vars || theme).palette[ownerState.color || 'primary']) == null ? void 0 : _palette.main}`,
29522
29951
  left: 0,
29523
29952
  bottom: 0,
29524
29953
  // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
@@ -29539,12 +29968,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
29539
29968
  transform: 'scaleX(1) translateX(0)'
29540
29969
  },
29541
29970
  [`&.${filledInputClasses$1.error}:after`]: {
29542
- borderBottomColor: theme.palette.error.main,
29971
+ borderBottomColor: (theme.vars || theme).palette.error.main,
29543
29972
  transform: 'scaleX(1)' // error is always underlined in red
29544
29973
 
29545
29974
  },
29546
29975
  '&:before': {
29547
- borderBottom: `1px solid ${bottomLineColor}`,
29976
+ borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,
29548
29977
  left: 0,
29549
29978
  bottom: 0,
29550
29979
  // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
@@ -29558,7 +29987,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
29558
29987
 
29559
29988
  },
29560
29989
  [`&:hover:not(.${filledInputClasses$1.disabled}):before`]: {
29561
- borderBottom: `1px solid ${theme.palette.text.primary}`
29990
+ borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
29562
29991
  },
29563
29992
  [`&.${filledInputClasses$1.disabled}:before`]: {
29564
29993
  borderBottomStyle: 'dotted'
@@ -29588,7 +30017,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
29588
30017
  paddingTop: 25,
29589
30018
  paddingRight: 12,
29590
30019
  paddingBottom: 8,
29591
- paddingLeft: 12,
30020
+ paddingLeft: 12
30021
+ }, !theme.vars && {
29592
30022
  '&:-webkit-autofill': {
29593
30023
  WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
29594
30024
  WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
@@ -29596,6 +30026,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
29596
30026
  borderTopLeftRadius: 'inherit',
29597
30027
  borderTopRightRadius: 'inherit'
29598
30028
  }
30029
+ }, theme.vars && {
30030
+ '&:-webkit-autofill': {
30031
+ borderTopLeftRadius: 'inherit',
30032
+ borderTopRightRadius: 'inherit'
30033
+ },
30034
+ [theme.getColorSchemeSelector('dark')]: {
30035
+ '&:-webkit-autofill': {
30036
+ WebkitBoxShadow: '0 0 0 100px #266798 inset',
30037
+ WebkitTextFillColor: '#fff',
30038
+ caretColor: '#fff'
30039
+ }
30040
+ }
29599
30041
  }, ownerState.size === 'small' && {
29600
30042
  paddingTop: 21,
29601
30043
  paddingBottom: 4
@@ -33238,7 +33680,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
33238
33680
  let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
33239
33681
 
33240
33682
  if (theme.vars) {
33241
- bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputTouchBottomLine})`;
33683
+ bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})`;
33242
33684
  }
33243
33685
 
33244
33686
  return _extends({
@@ -34034,6 +34476,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
34034
34476
  return 'currentColor';
34035
34477
  }
34036
34478
 
34479
+ if (theme.vars) {
34480
+ return theme.vars.palette.LinearProgress[`${color}Bg`];
34481
+ }
34482
+
34037
34483
  return theme.palette.mode === 'light' ? lighten(theme.palette[color].main, 0.62) : darken(theme.palette[color].main, 0.5);
34038
34484
  };
34039
34485
 
@@ -34126,7 +34572,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
34126
34572
  top: 0,
34127
34573
  transition: 'transform 0.2s linear',
34128
34574
  transformOrigin: 'left',
34129
- backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : theme.palette[ownerState.color].main
34575
+ backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
34130
34576
  }, ownerState.variant === 'determinate' && {
34131
34577
  transition: `transform .${TRANSITION_DURATION}s linear`
34132
34578
  }, ownerState.variant === 'buffer' && {
@@ -34159,7 +34605,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
34159
34605
  transition: 'transform 0.2s linear',
34160
34606
  transformOrigin: 'left'
34161
34607
  }, ownerState.variant !== 'buffer' && {
34162
- backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : theme.palette[ownerState.color].main
34608
+ backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
34163
34609
  }, ownerState.color === 'inherit' && {
34164
34610
  opacity: 0.3
34165
34611
  }, ownerState.variant === 'buffer' && {
@@ -37917,25 +38363,25 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
37917
38363
  const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
37918
38364
  return _extends({
37919
38365
  position: 'relative',
37920
- borderRadius: theme.shape.borderRadius,
38366
+ borderRadius: (theme.vars || theme).shape.borderRadius,
37921
38367
  [`&:hover .${outlinedInputClasses$1.notchedOutline}`]: {
37922
- borderColor: theme.palette.text.primary
38368
+ borderColor: (theme.vars || theme).palette.text.primary
37923
38369
  },
37924
38370
  // Reset on touch devices, it doesn't add specificity
37925
38371
  '@media (hover: none)': {
37926
38372
  [`&:hover .${outlinedInputClasses$1.notchedOutline}`]: {
37927
- borderColor
38373
+ borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
37928
38374
  }
37929
38375
  },
37930
38376
  [`&.${outlinedInputClasses$1.focused} .${outlinedInputClasses$1.notchedOutline}`]: {
37931
- borderColor: theme.palette[ownerState.color].main,
38377
+ borderColor: (theme.vars || theme).palette[ownerState.color].main,
37932
38378
  borderWidth: 2
37933
38379
  },
37934
38380
  [`&.${outlinedInputClasses$1.error} .${outlinedInputClasses$1.notchedOutline}`]: {
37935
- borderColor: theme.palette.error.main
38381
+ borderColor: (theme.vars || theme).palette.error.main
37936
38382
  },
37937
38383
  [`&.${outlinedInputClasses$1.disabled} .${outlinedInputClasses$1.notchedOutline}`]: {
37938
- borderColor: theme.palette.action.disabled
38384
+ borderColor: (theme.vars || theme).palette.action.disabled
37939
38385
  }
37940
38386
  }, ownerState.startAdornment && {
37941
38387
  paddingLeft: 14
@@ -37953,9 +38399,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
37953
38399
  overridesResolver: (props, styles) => styles.notchedOutline
37954
38400
  })(({
37955
38401
  theme
37956
- }) => ({
37957
- borderColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'
37958
- }));
38402
+ }) => {
38403
+ const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
38404
+ return {
38405
+ borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
38406
+ };
38407
+ });
37959
38408
  const OutlinedInputInput = styled$1(InputBaseComponent, {
37960
38409
  name: 'MuiOutlinedInput',
37961
38410
  slot: 'Input',
@@ -37964,13 +38413,25 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
37964
38413
  theme,
37965
38414
  ownerState
37966
38415
  }) => _extends({
37967
- padding: '16.5px 14px',
38416
+ padding: '16.5px 14px'
38417
+ }, !theme.vars && {
37968
38418
  '&:-webkit-autofill': {
37969
38419
  WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
37970
38420
  WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
37971
38421
  caretColor: theme.palette.mode === 'light' ? null : '#fff',
37972
38422
  borderRadius: 'inherit'
37973
38423
  }
38424
+ }, theme.vars && {
38425
+ '&:-webkit-autofill': {
38426
+ borderRadius: 'inherit'
38427
+ },
38428
+ [theme.getColorSchemeSelector('dark')]: {
38429
+ '&:-webkit-autofill': {
38430
+ WebkitBoxShadow: '0 0 0 100px #266798 inset',
38431
+ WebkitTextFillColor: '#fff',
38432
+ caretColor: '#fff'
38433
+ }
38434
+ }
37974
38435
  }, ownerState.size === 'small' && {
37975
38436
  padding: '8.5px 14px'
37976
38437
  }, ownerState.multiline && {
@@ -38006,12 +38467,27 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
38006
38467
  muiFormControl,
38007
38468
  states: ['required']
38008
38469
  });
38470
+
38471
+ const ownerState = _extends({}, props, {
38472
+ color: fcs.color || 'primary',
38473
+ disabled: fcs.disabled,
38474
+ error: fcs.error,
38475
+ focused: fcs.focused,
38476
+ formControl: muiFormControl,
38477
+ fullWidth,
38478
+ hiddenLabel: fcs.hiddenLabel,
38479
+ multiline,
38480
+ size: fcs.size,
38481
+ type
38482
+ });
38483
+
38009
38484
  return /*#__PURE__*/jsxRuntime_1(InputBase$1, _extends({
38010
38485
  components: _extends({
38011
38486
  Root: OutlinedInputRoot,
38012
38487
  Input: OutlinedInputInput
38013
38488
  }, components),
38014
38489
  renderSuffix: state => /*#__PURE__*/jsxRuntime_1(NotchedOutlineRoot, {
38490
+ ownerState: ownerState,
38015
38491
  className: classes.notchedOutline,
38016
38492
  label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
38017
38493
  children: [label, "\xA0", '*']
@@ -41214,7 +41690,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41214
41690
  * If the value is an object it must have reference equality with the option in order to be selected.
41215
41691
  * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
41216
41692
  */
41217
- value: PropTypes.any,
41693
+ value: PropTypes.oneOfType([PropTypes.oneOf(['']), PropTypes.any]),
41218
41694
 
41219
41695
  /**
41220
41696
  * The variant to use.
@@ -41299,7 +41775,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41299
41775
  return _extends({
41300
41776
  display: 'block',
41301
41777
  // Create a "on paper" color with sufficient contrast retaining the color
41302
- backgroundColor: alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
41778
+ backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
41303
41779
  height: '1.2em'
41304
41780
  }, ownerState.variant === 'text' && {
41305
41781
  marginTop: 0,
@@ -41338,7 +41814,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41338
41814
 
41339
41815
  &::after {
41340
41816
  animation: ${0} 1.6s linear 0.5s infinite;
41341
- background: linear-gradient(90deg, transparent, ${0}, transparent);
41817
+ background: linear-gradient(
41818
+ 90deg,
41819
+ transparent,
41820
+ ${0},
41821
+ transparent
41822
+ );
41342
41823
  content: '';
41343
41824
  position: absolute;
41344
41825
  transform: translateX(-100%); /* Avoid flash during server-side hydration */
@@ -41347,7 +41828,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41347
41828
  right: 0;
41348
41829
  top: 0;
41349
41830
  }
41350
- `), waveKeyframe, theme.palette.action.hover));
41831
+ `), waveKeyframe, (theme.vars || theme).palette.action.hover));
41351
41832
  const Skeleton = /*#__PURE__*/React__namespace.forwardRef(function Skeleton(inProps, ref) {
41352
41833
  const props = useThemeProps({
41353
41834
  props: inProps,
@@ -41474,7 +41955,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41474
41955
  position: 'relative',
41475
41956
  cursor: 'pointer',
41476
41957
  touchAction: 'none',
41477
- color: theme.palette[ownerState.color].main,
41958
+ color: (theme.vars || theme).palette[ownerState.color].main,
41478
41959
  WebkitTapHighlightColor: 'transparent'
41479
41960
  }, ownerState.orientation === 'horizontal' && _extends({
41480
41961
  height: 4,
@@ -41509,7 +41990,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41509
41990
  [`&.${sliderClasses.disabled}`]: {
41510
41991
  pointerEvents: 'none',
41511
41992
  cursor: 'default',
41512
- color: theme.palette.grey[400]
41993
+ color: (theme.vars || theme).palette.grey[400]
41513
41994
  },
41514
41995
  [`&.${sliderClasses.dragging}`]: {
41515
41996
  [`& .${sliderClasses.thumb}, & .${sliderClasses.track}`]: {
@@ -41600,8 +42081,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41600
42081
  }, ownerState.track === false && {
41601
42082
  display: 'none'
41602
42083
  }, ownerState.track === 'inverted' && {
41603
- backgroundColor: color,
41604
- borderColor: color
42084
+ backgroundColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color,
42085
+ borderColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color
41605
42086
  });
41606
42087
  });
41607
42088
  SliderTrack.propTypes
@@ -41659,7 +42140,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41659
42140
  borderRadius: 'inherit',
41660
42141
  width: '100%',
41661
42142
  height: '100%',
41662
- boxShadow: theme.shadows[2]
42143
+ boxShadow: (theme.vars || theme).shadows[2]
41663
42144
  }, ownerState.size === 'small' && {
41664
42145
  boxShadow: 'none'
41665
42146
  }),
@@ -41675,13 +42156,13 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41675
42156
  transform: 'translate(-50%, -50%)'
41676
42157
  },
41677
42158
  [`&:hover, &.${sliderClasses.focusVisible}`]: {
41678
- boxShadow: `0px 0px 0px 8px ${alpha(theme.palette[ownerState.color].main, 0.16)}`,
42159
+ boxShadow: `0px 0px 0px 8px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : alpha(theme.palette[ownerState.color].main, 0.16)}`,
41679
42160
  '@media (hover: none)': {
41680
42161
  boxShadow: 'none'
41681
42162
  }
41682
42163
  },
41683
42164
  [`&.${sliderClasses.active}`]: {
41684
- boxShadow: `0px 0px 0px 14px ${alpha(theme.palette[ownerState.color].main, 0.16)}`
42165
+ boxShadow: `0px 0px 0px 14px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : alpha(theme.palette[ownerState.color].main, 0.16)}`
41685
42166
  },
41686
42167
  [`&.${sliderClasses.disabled}`]: {
41687
42168
  '&:hover': {
@@ -41723,9 +42204,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41723
42204
  transformOrigin: 'bottom center',
41724
42205
  transform: 'translateY(-100%) scale(0)',
41725
42206
  position: 'absolute',
41726
- backgroundColor: theme.palette.grey[600],
42207
+ backgroundColor: (theme.vars || theme).palette.grey[600],
41727
42208
  borderRadius: 2,
41728
- color: theme.palette.common.white,
42209
+ color: (theme.vars || theme).palette.common.white,
41729
42210
  display: 'flex',
41730
42211
  alignItems: 'center',
41731
42212
  justifyContent: 'center',
@@ -41794,7 +42275,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41794
42275
  left: '50%',
41795
42276
  transform: 'translate(-50%, 1px)'
41796
42277
  }, markActive && {
41797
- backgroundColor: theme.palette.background.paper,
42278
+ backgroundColor: (theme.vars || theme).palette.background.paper,
41798
42279
  opacity: 0.8
41799
42280
  }));
41800
42281
  SliderMark.propTypes
@@ -41820,7 +42301,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41820
42301
  ownerState,
41821
42302
  markLabelActive
41822
42303
  }) => _extends({}, theme.typography.body2, {
41823
- color: theme.palette.text.secondary,
42304
+ color: (theme.vars || theme).palette.text.secondary,
41824
42305
  position: 'absolute',
41825
42306
  whiteSpace: 'nowrap'
41826
42307
  }, ownerState.orientation === 'horizontal' && {
@@ -41836,7 +42317,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41836
42317
  left: 44
41837
42318
  }
41838
42319
  }, markLabelActive && {
41839
- color: theme.palette.text.primary
42320
+ color: (theme.vars || theme).palette.text.primary
41840
42321
  }));
41841
42322
  SliderMarkLabel.propTypes
41842
42323
  /* remove-proptypes */
@@ -42012,14 +42493,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
42012
42493
  * @default {}
42013
42494
  */
42014
42495
  componentsProps: PropTypes.shape({
42015
- input: PropTypes.object,
42016
- mark: PropTypes.object,
42017
- markLabel: PropTypes.object,
42018
- rail: PropTypes.object,
42019
- root: PropTypes.object,
42020
- thumb: PropTypes.object,
42021
- track: PropTypes.object,
42022
- valueLabel: PropTypes.shape({
42496
+ input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
42497
+ mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
42498
+ markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
42499
+ rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
42500
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
42501
+ thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
42502
+ track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
42503
+ valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
42023
42504
  children: PropTypes.element,
42024
42505
  className: PropTypes.string,
42025
42506
  components: PropTypes.shape({
@@ -42029,7 +42510,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
42029
42510
  style: PropTypes.object,
42030
42511
  value: PropTypes.number,
42031
42512
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
42032
- })
42513
+ })])
42033
42514
  }),
42034
42515
 
42035
42516
  /**
@@ -42230,13 +42711,13 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
42230
42711
  const emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
42231
42712
  const backgroundColor = emphasize(theme.palette.background.default, emphasis);
42232
42713
  return _extends({}, theme.typography.body2, {
42233
- color: theme.palette.getContrastText(backgroundColor),
42234
- backgroundColor,
42714
+ color: theme.vars ? theme.vars.palette.SnackbarContent.color : theme.palette.getContrastText(backgroundColor),
42715
+ backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
42235
42716
  display: 'flex',
42236
42717
  alignItems: 'center',
42237
42718
  flexWrap: 'wrap',
42238
42719
  padding: '6px 16px',
42239
- borderRadius: theme.shape.borderRadius,
42720
+ borderRadius: (theme.vars || theme).shape.borderRadius,
42240
42721
  flexGrow: 1,
42241
42722
  [theme.breakpoints.up('sm')]: {
42242
42723
  flexGrow: 'initial',
@@ -43657,7 +44138,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
43657
44138
  theme,
43658
44139
  ownerState
43659
44140
  }) => _extends({
43660
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.grey.darkChannel} / 0.92)` : alpha(theme.palette.grey[700], 0.92),
44141
+ backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),
43661
44142
  borderRadius: (theme.vars || theme).shape.borderRadius,
43662
44143
  color: (theme.vars || theme).palette.common.white,
43663
44144
  fontFamily: theme.typography.fontFamily,
@@ -44401,10 +44882,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
44401
44882
  ownerState
44402
44883
  }) => _extends({
44403
44884
  margin: 8,
44404
- color: theme.palette.text.secondary,
44405
- backgroundColor: theme.palette.background.paper,
44885
+ color: (theme.vars || theme).palette.text.secondary,
44886
+ backgroundColor: (theme.vars || theme).palette.background.paper,
44406
44887
  '&:hover': {
44407
- backgroundColor: emphasize(theme.palette.background.paper, 0.15)
44888
+ backgroundColor: theme.vars ? theme.vars.palette.SpeedDialAction.fabHoverBg : emphasize(theme.palette.background.paper, 0.15)
44408
44889
  },
44409
44890
  transition: `${theme.transitions.create('transform', {
44410
44891
  duration: theme.transitions.duration.shorter
@@ -44457,10 +44938,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
44457
44938
  }) => _extends({
44458
44939
  position: 'absolute'
44459
44940
  }, theme.typography.body1, {
44460
- backgroundColor: theme.palette.background.paper,
44461
- borderRadius: theme.shape.borderRadius,
44462
- boxShadow: theme.shadows[1],
44463
- color: theme.palette.text.secondary,
44941
+ backgroundColor: (theme.vars || theme).palette.background.paper,
44942
+ borderRadius: (theme.vars || theme).shape.borderRadius,
44943
+ boxShadow: (theme.vars || theme).shadows[1],
44944
+ color: (theme.vars || theme).palette.text.secondary,
44464
44945
  padding: '4px 16px',
44465
44946
  wordBreak: 'keep-all'
44466
44947
  }));
@@ -45748,17 +46229,20 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
45748
46229
  })(({
45749
46230
  ownerState,
45750
46231
  theme
45751
- }) => _extends({
45752
- display: 'block',
45753
- borderColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
45754
- }, ownerState.orientation === 'horizontal' && {
45755
- borderTopStyle: 'solid',
45756
- borderTopWidth: 1
45757
- }, ownerState.orientation === 'vertical' && {
45758
- borderLeftStyle: 'solid',
45759
- borderLeftWidth: 1,
45760
- minHeight: 24
45761
- }));
46232
+ }) => {
46233
+ const borderColor = theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600];
46234
+ return _extends({
46235
+ display: 'block',
46236
+ borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor
46237
+ }, ownerState.orientation === 'horizontal' && {
46238
+ borderTopStyle: 'solid',
46239
+ borderTopWidth: 1
46240
+ }, ownerState.orientation === 'vertical' && {
46241
+ borderLeftStyle: 'solid',
46242
+ borderLeftWidth: 1,
46243
+ minHeight: 24
46244
+ });
46245
+ });
45762
46246
  const StepConnector = /*#__PURE__*/React__namespace.forwardRef(function StepConnector(inProps, ref) {
45763
46247
  const props = useThemeProps({
45764
46248
  props: inProps,
@@ -45863,7 +46347,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
45863
46347
  paddingLeft: 8 + 12,
45864
46348
  // margin + half icon
45865
46349
  paddingRight: 8,
45866
- borderLeft: `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
46350
+ borderLeft: theme.vars ? `1px solid ${theme.vars.palette.StepContent.border}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
45867
46351
  }, ownerState.last && {
45868
46352
  borderLeft: 'none'
45869
46353
  }));
@@ -46917,7 +47401,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
46917
47401
  left: 0,
46918
47402
  zIndex: 1,
46919
47403
  // Render above the focus ripple.
46920
- color: theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300],
47404
+ color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]}`,
46921
47405
  transition: theme.transitions.create(['left', 'transform'], {
46922
47406
  duration: theme.transitions.duration.shortest
46923
47407
  }),
@@ -46925,13 +47409,13 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
46925
47409
  transform: 'translateX(20px)'
46926
47410
  },
46927
47411
  [`&.${switchClasses$1.disabled}`]: {
46928
- color: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]
47412
+ color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : `${theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]}`
46929
47413
  },
46930
47414
  [`&.${switchClasses$1.checked} + .${switchClasses$1.track}`]: {
46931
47415
  opacity: 0.5
46932
47416
  },
46933
47417
  [`&.${switchClasses$1.disabled} + .${switchClasses$1.track}`]: {
46934
- opacity: theme.palette.mode === 'light' ? 0.12 : 0.2
47418
+ opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : `${theme.palette.mode === 'light' ? 0.12 : 0.2}`
46935
47419
  },
46936
47420
  [`& .${switchClasses$1.input}`]: {
46937
47421
  left: '-100%',
@@ -46942,7 +47426,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
46942
47426
  ownerState
46943
47427
  }) => _extends({
46944
47428
  '&:hover': {
46945
- backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
47429
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
46946
47430
  // Reset on touch devices, it doesn't add specificity
46947
47431
  '@media (hover: none)': {
46948
47432
  backgroundColor: 'transparent'
@@ -46950,19 +47434,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
46950
47434
  }
46951
47435
  }, ownerState.color !== 'default' && {
46952
47436
  [`&.${switchClasses$1.checked}`]: {
46953
- color: theme.palette[ownerState.color].main,
47437
+ color: (theme.vars || theme).palette[ownerState.color].main,
46954
47438
  '&:hover': {
46955
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
47439
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
46956
47440
  '@media (hover: none)': {
46957
47441
  backgroundColor: 'transparent'
46958
47442
  }
46959
47443
  },
46960
47444
  [`&.${switchClasses$1.disabled}`]: {
46961
- color: theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)
47445
+ color: theme.vars ? theme.vars.palette.Switch[`${ownerState.color}DisabledColor`] : `${theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)}`
46962
47446
  }
46963
47447
  },
46964
47448
  [`&.${switchClasses$1.checked} + .${switchClasses$1.track}`]: {
46965
- backgroundColor: theme.palette[ownerState.color].main
47449
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main
46966
47450
  }
46967
47451
  }));
46968
47452
  const SwitchTrack = styled$1('span', {
@@ -46979,8 +47463,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
46979
47463
  transition: theme.transitions.create(['opacity', 'background-color'], {
46980
47464
  duration: theme.transitions.duration.shortest
46981
47465
  }),
46982
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white,
46983
- opacity: theme.palette.mode === 'light' ? 0.38 : 0.3
47466
+ backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : `${theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white}`,
47467
+ opacity: theme.vars ? theme.vars.opacity.switchTrack : `${theme.palette.mode === 'light' ? 0.38 : 0.3}`
46984
47468
  }));
46985
47469
  const SwitchThumb = styled$1('span', {
46986
47470
  name: 'MuiSwitch',
@@ -46989,7 +47473,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
46989
47473
  })(({
46990
47474
  theme
46991
47475
  }) => ({
46992
- boxShadow: theme.shadows[1],
47476
+ boxShadow: (theme.vars || theme).shadows[1],
46993
47477
  backgroundColor: 'currentColor',
46994
47478
  width: 20,
46995
47479
  height: 20,
@@ -47742,18 +48226,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
47742
48226
  verticalAlign: 'inherit',
47743
48227
  // Workaround for a rendering bug with spanned columns in Chrome 62.0.
47744
48228
  // Removes the alpha (sets it to 1), and lightens or darkens the theme color.
47745
- borderBottom: `1px solid
48229
+ borderBottom: theme.vars ? `1px solid ${theme.vars.palette.TableCell.border}` : `1px solid
47746
48230
  ${theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)}`,
47747
48231
  textAlign: 'left',
47748
48232
  padding: 16
47749
48233
  }, ownerState.variant === 'head' && {
47750
- color: theme.palette.text.primary,
48234
+ color: (theme.vars || theme).palette.text.primary,
47751
48235
  lineHeight: theme.typography.pxToRem(24),
47752
48236
  fontWeight: theme.typography.fontWeightMedium
47753
48237
  }, ownerState.variant === 'body' && {
47754
- color: theme.palette.text.primary
48238
+ color: (theme.vars || theme).palette.text.primary
47755
48239
  }, ownerState.variant === 'footer' && {
47756
- color: theme.palette.text.secondary,
48240
+ color: (theme.vars || theme).palette.text.secondary,
47757
48241
  lineHeight: theme.typography.pxToRem(21),
47758
48242
  fontSize: theme.typography.pxToRem(12)
47759
48243
  }, ownerState.size === 'small' && {
@@ -47785,7 +48269,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
47785
48269
  position: 'sticky',
47786
48270
  top: 0,
47787
48271
  zIndex: 2,
47788
- backgroundColor: theme.palette.background.default
48272
+ backgroundColor: (theme.vars || theme).palette.background.default
47789
48273
  }));
47790
48274
  /**
47791
48275
  * The component renders a `<th>` element when the parent context is a header
@@ -49823,31 +50307,21 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
49823
50307
  scroll(scrollValue);
49824
50308
  };
49825
50309
 
49826
- const getFirstVisibleTab = tabs => {
49827
- const containerSize = tabsRef.current[clientSize];
49828
- const containerStartBound = Math.round(tabsRef.current[scrollStart]);
49829
- const containerEndBound = Math.round(containerStartBound + containerSize);
49830
- const offset = vertical ? 'offsetTop' : 'offsetLeft';
49831
- return tabs.find(tab => {
49832
- const centerPoint = tab[offset] + tab[clientSize] / 2;
49833
- return centerPoint >= containerStartBound && centerPoint <= containerEndBound;
49834
- });
49835
- };
49836
-
49837
50310
  const getScrollSize = () => {
49838
50311
  const containerSize = tabsRef.current[clientSize];
49839
50312
  let totalSize = 0;
49840
50313
  const children = Array.from(tabListRef.current.children);
49841
- const firstVisibleTab = getFirstVisibleTab(children);
49842
-
49843
- if (firstVisibleTab && firstVisibleTab[clientSize] > containerSize) {
49844
- return firstVisibleTab[clientSize];
49845
- }
49846
50314
 
49847
50315
  for (let i = 0; i < children.length; i += 1) {
49848
50316
  const tab = children[i];
49849
50317
 
49850
50318
  if (totalSize + tab[clientSize] > containerSize) {
50319
+ // If the first item is longer than the container size, then only scroll
50320
+ // by the container size.
50321
+ if (i === 0) {
50322
+ totalSize = containerSize;
50323
+ }
50324
+
49851
50325
  break;
49852
50326
  }
49853
50327
 
@@ -49957,8 +50431,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
49957
50431
  });
49958
50432
  React__namespace.useEffect(() => {
49959
50433
  const handleResize = debounce$1(() => {
49960
- updateIndicatorState();
49961
- updateScrollButtonState();
50434
+ // If the Tabs component is replaced by Suspense with a fallback, the last
50435
+ // ResizeObserver's handler that runs because of the change in the layout is trying to
50436
+ // access a dom node that is no longer there (as the fallback component is being shown instead).
50437
+ // See https://github.com/mui/material-ui/issues/33276
50438
+ // TODO: Add tests that will ensure the component is not failing when
50439
+ // replaced by Suspense with a fallback, once React is updated to version 18
50440
+ if (tabsRef.current) {
50441
+ updateIndicatorState();
50442
+ updateScrollButtonState();
50443
+ }
49962
50444
  });
49963
50445
  const win = ownerWindow(tabsRef.current);
49964
50446
  win.addEventListener('resize', handleResize);
@@ -51294,7 +51776,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
51294
51776
  exports.DialogTitle = DialogTitle$1;
51295
51777
  exports.Divider = Divider$1;
51296
51778
  exports.Drawer = Drawer$1;
51297
- exports.Experimental_CssVarsProvider = Experimental_CssVarsProvider;
51779
+ exports.Experimental_CssVarsProvider = CssVarsProvider;
51298
51780
  exports.Fab = Fab$1;
51299
51781
  exports.Fade = Fade$1;
51300
51782
  exports.FilledInput = FilledInput$1;
@@ -51628,6 +52110,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
51628
52110
  exports.scopedCssBaselineClasses = scopedCssBaselineClasses$1;
51629
52111
  exports.selectClasses = selectClasses$1;
51630
52112
  exports.setRef = setRef;
52113
+ exports.shouldSkipGeneratingVar = shouldSkipGeneratingVar;
51631
52114
  exports.skeletonClasses = skeletonClasses$1;
51632
52115
  exports.sliderClasses = sliderClasses;
51633
52116
  exports.snackbarClasses = snackbarClasses$1;